@sashabogi/foundation 2.0.0 → 2.0.1
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/cli.js +177 -22
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
- package/packages/ui/dist/assets/index-oiJTDMJ1.css +1 -0
- package/packages/ui/dist/assets/index-oivszLTx.js +352 -0
- package/packages/ui/dist/index.html +2 -2
- package/packages/ui/dist/assets/index-B7zz_B5Q.js +0 -312
- package/packages/ui/dist/assets/index-fYt-vaxP.css +0 -1
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
function cO(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var fa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var dN={exports:{}},pc={},fN={exports:{}},he={};/**
|
|
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 Vs=Symbol.for("react.element"),uO=Symbol.for("react.portal"),dO=Symbol.for("react.fragment"),fO=Symbol.for("react.strict_mode"),hO=Symbol.for("react.profiler"),pO=Symbol.for("react.provider"),mO=Symbol.for("react.context"),gO=Symbol.for("react.forward_ref"),vO=Symbol.for("react.suspense"),yO=Symbol.for("react.memo"),xO=Symbol.for("react.lazy"),ux=Symbol.iterator;function wO(e){return e===null||typeof e!="object"?null:(e=ux&&e[ux]||e["@@iterator"],typeof e=="function"?e:null)}var hN={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},pN=Object.assign,mN={};function gi(e,t,n){this.props=e,this.context=t,this.refs=mN,this.updater=n||hN}gi.prototype.isReactComponent={};gi.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};gi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function gN(){}gN.prototype=gi.prototype;function Qv(e,t,n){this.props=e,this.context=t,this.refs=mN,this.updater=n||hN}var Zv=Qv.prototype=new gN;Zv.constructor=Qv;pN(Zv,gi.prototype);Zv.isPureReactComponent=!0;var dx=Array.isArray,vN=Object.prototype.hasOwnProperty,Jv={current:null},yN={key:!0,ref:!0,__self:!0,__source:!0};function xN(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)vN.call(t,r)&&!yN.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];o.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)o[r]===void 0&&(o[r]=a[r]);return{$$typeof:Vs,type:e,key:i,ref:s,props:o,_owner:Jv.current}}function bO(e,t){return{$$typeof:Vs,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function ey(e){return typeof e=="object"&&e!==null&&e.$$typeof===Vs}function _O(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var fx=/\/+/g;function Au(e,t){return typeof e=="object"&&e!==null&&e.key!=null?_O(""+e.key):t.toString(36)}function Ka(e,t,n,r,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Vs:case uO:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+Au(s,0):r,dx(o)?(n="",e!=null&&(n=e.replace(fx,"$&/")+"/"),Ka(o,t,n,"",function(c){return c})):o!=null&&(ey(o)&&(o=bO(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(fx,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=r===""?".":r+":",dx(e))for(var a=0;a<e.length;a++){i=e[a];var l=r+Au(i,a);s+=Ka(i,t,n,l,o)}else if(l=wO(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+Au(i,a++),s+=Ka(i,t,n,l,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function ha(e,t,n){if(e==null)return e;var r=[],o=0;return Ka(e,r,"","",function(i){return t.call(n,i,o++)}),r}function SO(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Je={current:null},Xa={transition:null},EO={ReactCurrentDispatcher:Je,ReactCurrentBatchConfig:Xa,ReactCurrentOwner:Jv};function wN(){throw Error("act(...) is not supported in production builds of React.")}he.Children={map:ha,forEach:function(e,t,n){ha(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ha(e,function(){t++}),t},toArray:function(e){return ha(e,function(t){return t})||[]},only:function(e){if(!ey(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};he.Component=gi;he.Fragment=dO;he.Profiler=hO;he.PureComponent=Qv;he.StrictMode=fO;he.Suspense=vO;he.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=EO;he.act=wN;he.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=pN({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=Jv.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)vN.call(t,l)&&!yN.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:Vs,type:e.type,key:o,ref:i,props:r,_owner:s}};he.createContext=function(e){return e={$$typeof:mO,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:pO,_context:e},e.Consumer=e};he.createElement=xN;he.createFactory=function(e){var t=xN.bind(null,e);return t.type=e,t};he.createRef=function(){return{current:null}};he.forwardRef=function(e){return{$$typeof:gO,render:e}};he.isValidElement=ey;he.lazy=function(e){return{$$typeof:xO,_payload:{_status:-1,_result:e},_init:SO}};he.memo=function(e,t){return{$$typeof:yO,type:e,compare:t===void 0?null:t}};he.startTransition=function(e){var t=Xa.transition;Xa.transition={};try{e()}finally{Xa.transition=t}};he.unstable_act=wN;he.useCallback=function(e,t){return Je.current.useCallback(e,t)};he.useContext=function(e){return Je.current.useContext(e)};he.useDebugValue=function(){};he.useDeferredValue=function(e){return Je.current.useDeferredValue(e)};he.useEffect=function(e,t){return Je.current.useEffect(e,t)};he.useId=function(){return Je.current.useId()};he.useImperativeHandle=function(e,t,n){return Je.current.useImperativeHandle(e,t,n)};he.useInsertionEffect=function(e,t){return Je.current.useInsertionEffect(e,t)};he.useLayoutEffect=function(e,t){return Je.current.useLayoutEffect(e,t)};he.useMemo=function(e,t){return Je.current.useMemo(e,t)};he.useReducer=function(e,t,n){return Je.current.useReducer(e,t,n)};he.useRef=function(e){return Je.current.useRef(e)};he.useState=function(e){return Je.current.useState(e)};he.useSyncExternalStore=function(e,t,n){return Je.current.useSyncExternalStore(e,t,n)};he.useTransition=function(){return Je.current.useTransition()};he.version="18.3.1";fN.exports=he;var y=fN.exports;const rn=hc(y),ty=cO({__proto__:null,default:rn},[y]);/**
|
|
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 CO=y,NO=Symbol.for("react.element"),kO=Symbol.for("react.fragment"),RO=Object.prototype.hasOwnProperty,PO=CO.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,jO={key:!0,ref:!0,__self:!0,__source:!0};function bN(e,t,n){var r,o={},i=null,s=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)RO.call(t,r)&&!jO.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:NO,type:e,key:i,ref:s,props:o,_owner:PO.current}}pc.Fragment=kO;pc.jsx=bN;pc.jsxs=bN;dN.exports=pc;var h=dN.exports,_g={},_N={exports:{}},_t={},SN={exports:{}},EN={};/**
|
|
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
|
+
*/(function(e){function t(N,A){var $=N.length;N.push(A);e:for(;0<$;){var z=$-1>>>1,F=N[z];if(0<o(F,A))N[z]=A,N[$]=F,$=z;else break e}}function n(N){return N.length===0?null:N[0]}function r(N){if(N.length===0)return null;var A=N[0],$=N.pop();if($!==A){N[0]=$;e:for(var z=0,F=N.length,V=F>>>1;z<V;){var H=2*(z+1)-1,X=N[H],Q=H+1,q=N[Q];if(0>o(X,$))Q<F&&0>o(q,X)?(N[z]=q,N[Q]=$,z=Q):(N[z]=X,N[H]=$,z=H);else if(Q<F&&0>o(q,$))N[z]=q,N[Q]=$,z=Q;else break e}}return A}function o(N,A){var $=N.sortIndex-A.sortIndex;return $!==0?$:N.id-A.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],c=[],u=1,d=null,f=3,p=!1,g=!1,m=!1,_=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(N){for(var A=n(c);A!==null;){if(A.callback===null)r(c);else if(A.startTime<=N)r(c),A.sortIndex=A.expirationTime,t(l,A);else break;A=n(c)}}function b(N){if(m=!1,x(N),!g)if(n(l)!==null)g=!0,j(S);else{var A=n(c);A!==null&&L(b,A.startTime-N)}}function S(N,A){g=!1,m&&(m=!1,v(k),k=-1),p=!0;var $=f;try{for(x(A),d=n(l);d!==null&&(!(d.expirationTime>A)||N&&!P());){var z=d.callback;if(typeof z=="function"){d.callback=null,f=d.priorityLevel;var F=z(d.expirationTime<=A);A=e.unstable_now(),typeof F=="function"?d.callback=F:d===n(l)&&r(l),x(A)}else r(l);d=n(l)}if(d!==null)var V=!0;else{var H=n(c);H!==null&&L(b,H.startTime-A),V=!1}return V}finally{d=null,f=$,p=!1}}var E=!1,C=null,k=-1,T=5,M=-1;function P(){return!(e.unstable_now()-M<T)}function I(){if(C!==null){var N=e.unstable_now();M=N;var A=!0;try{A=C(!0,N)}finally{A?D():(E=!1,C=null)}}else E=!1}var D;if(typeof w=="function")D=function(){w(I)};else if(typeof MessageChannel<"u"){var R=new MessageChannel,O=R.port2;R.port1.onmessage=I,D=function(){O.postMessage(null)}}else D=function(){_(I,0)};function j(N){C=N,E||(E=!0,D())}function L(N,A){k=_(function(){N(e.unstable_now())},A)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(N){N.callback=null},e.unstable_continueExecution=function(){g||p||(g=!0,j(S))},e.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<N?Math.floor(1e3/N):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(N){switch(f){case 1:case 2:case 3:var A=3;break;default:A=f}var $=f;f=A;try{return N()}finally{f=$}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(N,A){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var $=f;f=N;try{return A()}finally{f=$}},e.unstable_scheduleCallback=function(N,A,$){var z=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?z+$:z):$=z,N){case 1:var F=-1;break;case 2:F=250;break;case 5:F=1073741823;break;case 4:F=1e4;break;default:F=5e3}return F=$+F,N={id:u++,callback:A,priorityLevel:N,startTime:$,expirationTime:F,sortIndex:-1},$>z?(N.sortIndex=$,t(c,N),n(l)===null&&N===n(c)&&(m?(v(k),k=-1):m=!0,L(b,$-z))):(N.sortIndex=F,t(l,N),g||p||(g=!0,j(S))),N},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(N){var A=f;return function(){var $=f;f=A;try{return N.apply(this,arguments)}finally{f=$}}}})(EN);SN.exports=EN;var TO=SN.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 AO=y,wt=TO;function W(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var CN=new Set,ms={};function co(e,t){Xo(e,t),Xo(e+"Capture",t)}function Xo(e,t){for(ms[e]=t,e=0;e<t.length;e++)CN.add(t[e])}var $n=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Sg=Object.prototype.hasOwnProperty,MO=/^[: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]*$/,hx={},px={};function IO(e){return Sg.call(px,e)?!0:Sg.call(hx,e)?!1:MO.test(e)?px[e]=!0:(hx[e]=!0,!1)}function OO(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function LO(e,t,n,r){if(t===null||typeof t>"u"||OO(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function et(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var We={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){We[e]=new et(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];We[t]=new et(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){We[e]=new et(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){We[e]=new et(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){We[e]=new et(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){We[e]=new et(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){We[e]=new et(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){We[e]=new et(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){We[e]=new et(e,5,!1,e.toLowerCase(),null,!1,!1)});var ny=/[\-:]([a-z])/g;function ry(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ny,ry);We[t]=new et(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ny,ry);We[t]=new et(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ny,ry);We[t]=new et(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){We[e]=new et(e,1,!1,e.toLowerCase(),null,!1,!1)});We.xlinkHref=new et("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){We[e]=new et(e,1,!1,e.toLowerCase(),null,!0,!0)});function oy(e,t,n,r){var o=We.hasOwnProperty(t)?We[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(LO(t,n,o,r)&&(n=null),r||o===null?IO(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Un=AO.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,pa=Symbol.for("react.element"),No=Symbol.for("react.portal"),ko=Symbol.for("react.fragment"),iy=Symbol.for("react.strict_mode"),Eg=Symbol.for("react.profiler"),NN=Symbol.for("react.provider"),kN=Symbol.for("react.context"),sy=Symbol.for("react.forward_ref"),Cg=Symbol.for("react.suspense"),Ng=Symbol.for("react.suspense_list"),ay=Symbol.for("react.memo"),ir=Symbol.for("react.lazy"),RN=Symbol.for("react.offscreen"),mx=Symbol.iterator;function Mi(e){return e===null||typeof e!="object"?null:(e=mx&&e[mx]||e["@@iterator"],typeof e=="function"?e:null)}var Pe=Object.assign,Mu;function Vi(e){if(Mu===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Mu=t&&t[1]||""}return`
|
|
34
|
+
`+Mu+e}var Iu=!1;function Ou(e,t){if(!e||Iu)return"";Iu=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var o=c.stack.split(`
|
|
35
|
+
`),i=r.stack.split(`
|
|
36
|
+
`),s=o.length-1,a=i.length-1;1<=s&&0<=a&&o[s]!==i[a];)a--;for(;1<=s&&0<=a;s--,a--)if(o[s]!==i[a]){if(s!==1||a!==1)do if(s--,a--,0>a||o[s]!==i[a]){var l=`
|
|
37
|
+
`+o[s].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{Iu=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Vi(e):""}function DO(e){switch(e.tag){case 5:return Vi(e.type);case 16:return Vi("Lazy");case 13:return Vi("Suspense");case 19:return Vi("SuspenseList");case 0:case 2:case 15:return e=Ou(e.type,!1),e;case 11:return e=Ou(e.type.render,!1),e;case 1:return e=Ou(e.type,!0),e;default:return""}}function kg(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ko:return"Fragment";case No:return"Portal";case Eg:return"Profiler";case iy:return"StrictMode";case Cg:return"Suspense";case Ng:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case kN:return(e.displayName||"Context")+".Consumer";case NN:return(e._context.displayName||"Context")+".Provider";case sy:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ay:return t=e.displayName||null,t!==null?t:kg(e.type)||"Memo";case ir:t=e._payload,e=e._init;try{return kg(e(t))}catch{}}return null}function $O(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return kg(t);case 8:return t===iy?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Sr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function PN(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function zO(e){var t=PN(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ma(e){e._valueTracker||(e._valueTracker=zO(e))}function jN(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=PN(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ml(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Rg(e,t){var n=t.checked;return Pe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function gx(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Sr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function TN(e,t){t=t.checked,t!=null&&oy(e,"checked",t,!1)}function Pg(e,t){TN(e,t);var n=Sr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?jg(e,t.type,n):t.hasOwnProperty("defaultValue")&&jg(e,t.type,Sr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function vx(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function jg(e,t,n){(t!=="number"||ml(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Wi=Array.isArray;function Fo(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Sr(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Tg(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(W(91));return Pe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function yx(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(W(92));if(Wi(n)){if(1<n.length)throw Error(W(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Sr(n)}}function AN(e,t){var n=Sr(t.value),r=Sr(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function xx(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function MN(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ag(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?MN(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ga,IN=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(ga=ga||document.createElement("div"),ga.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ga.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function gs(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var rs={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},FO=["Webkit","ms","Moz","O"];Object.keys(rs).forEach(function(e){FO.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),rs[t]=rs[e]})});function ON(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||rs.hasOwnProperty(e)&&rs[e]?(""+t).trim():t+"px"}function LN(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=ON(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var qO=Pe({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 Mg(e,t){if(t){if(qO[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(W(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(W(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(W(61))}if(t.style!=null&&typeof t.style!="object")throw Error(W(62))}}function Ig(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Og=null;function ly(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Lg=null,qo=null,Bo=null;function wx(e){if(e=Gs(e)){if(typeof Lg!="function")throw Error(W(280));var t=e.stateNode;t&&(t=xc(t),Lg(e.stateNode,e.type,t))}}function DN(e){qo?Bo?Bo.push(e):Bo=[e]:qo=e}function $N(){if(qo){var e=qo,t=Bo;if(Bo=qo=null,wx(e),t)for(e=0;e<t.length;e++)wx(t[e])}}function zN(e,t){return e(t)}function FN(){}var Lu=!1;function qN(e,t,n){if(Lu)return e(t,n);Lu=!0;try{return zN(e,t,n)}finally{Lu=!1,(qo!==null||Bo!==null)&&(FN(),$N())}}function vs(e,t){var n=e.stateNode;if(n===null)return null;var r=xc(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(W(231,t,typeof n));return n}var Dg=!1;if($n)try{var Ii={};Object.defineProperty(Ii,"passive",{get:function(){Dg=!0}}),window.addEventListener("test",Ii,Ii),window.removeEventListener("test",Ii,Ii)}catch{Dg=!1}function BO(e,t,n,r,o,i,s,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var os=!1,gl=null,vl=!1,$g=null,HO={onError:function(e){os=!0,gl=e}};function VO(e,t,n,r,o,i,s,a,l){os=!1,gl=null,BO.apply(HO,arguments)}function WO(e,t,n,r,o,i,s,a,l){if(VO.apply(this,arguments),os){if(os){var c=gl;os=!1,gl=null}else throw Error(W(198));vl||(vl=!0,$g=c)}}function uo(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function BN(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function bx(e){if(uo(e)!==e)throw Error(W(188))}function UO(e){var t=e.alternate;if(!t){if(t=uo(e),t===null)throw Error(W(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var i=o.alternate;if(i===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return bx(o),e;if(i===r)return bx(o),t;i=i.sibling}throw Error(W(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,a=o.child;a;){if(a===n){s=!0,n=o,r=i;break}if(a===r){s=!0,r=o,n=i;break}a=a.sibling}if(!s){for(a=i.child;a;){if(a===n){s=!0,n=i,r=o;break}if(a===r){s=!0,r=i,n=o;break}a=a.sibling}if(!s)throw Error(W(189))}}if(n.alternate!==r)throw Error(W(190))}if(n.tag!==3)throw Error(W(188));return n.stateNode.current===n?e:t}function HN(e){return e=UO(e),e!==null?VN(e):null}function VN(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=VN(e);if(t!==null)return t;e=e.sibling}return null}var WN=wt.unstable_scheduleCallback,_x=wt.unstable_cancelCallback,GO=wt.unstable_shouldYield,YO=wt.unstable_requestPaint,Ae=wt.unstable_now,KO=wt.unstable_getCurrentPriorityLevel,cy=wt.unstable_ImmediatePriority,UN=wt.unstable_UserBlockingPriority,yl=wt.unstable_NormalPriority,XO=wt.unstable_LowPriority,GN=wt.unstable_IdlePriority,mc=null,un=null;function QO(e){if(un&&typeof un.onCommitFiberRoot=="function")try{un.onCommitFiberRoot(mc,e,void 0,(e.current.flags&128)===128)}catch{}}var Ht=Math.clz32?Math.clz32:eL,ZO=Math.log,JO=Math.LN2;function eL(e){return e>>>=0,e===0?32:31-(ZO(e)/JO|0)|0}var va=64,ya=4194304;function Ui(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function xl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~o;a!==0?r=Ui(a):(i&=s,i!==0&&(r=Ui(i)))}else s=n&~o,s!==0?r=Ui(s):i!==0&&(r=Ui(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Ht(t),o=1<<n,r|=e[n],t&=~o;return r}function tL(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function nL(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var s=31-Ht(i),a=1<<s,l=o[s];l===-1?(!(a&n)||a&r)&&(o[s]=tL(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function zg(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function YN(){var e=va;return va<<=1,!(va&4194240)&&(va=64),e}function Du(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ws(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ht(t),e[t]=n}function rL(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-Ht(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}function uy(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ht(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var xe=0;function KN(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var XN,dy,QN,ZN,JN,Fg=!1,xa=[],hr=null,pr=null,mr=null,ys=new Map,xs=new Map,ar=[],oL="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 Sx(e,t){switch(e){case"focusin":case"focusout":hr=null;break;case"dragenter":case"dragleave":pr=null;break;case"mouseover":case"mouseout":mr=null;break;case"pointerover":case"pointerout":ys.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":xs.delete(t.pointerId)}}function Oi(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},t!==null&&(t=Gs(t),t!==null&&dy(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function iL(e,t,n,r,o){switch(t){case"focusin":return hr=Oi(hr,e,t,n,r,o),!0;case"dragenter":return pr=Oi(pr,e,t,n,r,o),!0;case"mouseover":return mr=Oi(mr,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return ys.set(i,Oi(ys.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,xs.set(i,Oi(xs.get(i)||null,e,t,n,r,o)),!0}return!1}function e2(e){var t=Fr(e.target);if(t!==null){var n=uo(t);if(n!==null){if(t=n.tag,t===13){if(t=BN(n),t!==null){e.blockedOn=t,JN(e.priority,function(){QN(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Qa(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=qg(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Og=r,n.target.dispatchEvent(r),Og=null}else return t=Gs(n),t!==null&&dy(t),e.blockedOn=n,!1;t.shift()}return!0}function Ex(e,t,n){Qa(e)&&n.delete(t)}function sL(){Fg=!1,hr!==null&&Qa(hr)&&(hr=null),pr!==null&&Qa(pr)&&(pr=null),mr!==null&&Qa(mr)&&(mr=null),ys.forEach(Ex),xs.forEach(Ex)}function Li(e,t){e.blockedOn===t&&(e.blockedOn=null,Fg||(Fg=!0,wt.unstable_scheduleCallback(wt.unstable_NormalPriority,sL)))}function ws(e){function t(o){return Li(o,e)}if(0<xa.length){Li(xa[0],e);for(var n=1;n<xa.length;n++){var r=xa[n];r.blockedOn===e&&(r.blockedOn=null)}}for(hr!==null&&Li(hr,e),pr!==null&&Li(pr,e),mr!==null&&Li(mr,e),ys.forEach(t),xs.forEach(t),n=0;n<ar.length;n++)r=ar[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<ar.length&&(n=ar[0],n.blockedOn===null);)e2(n),n.blockedOn===null&&ar.shift()}var Ho=Un.ReactCurrentBatchConfig,wl=!0;function aL(e,t,n,r){var o=xe,i=Ho.transition;Ho.transition=null;try{xe=1,fy(e,t,n,r)}finally{xe=o,Ho.transition=i}}function lL(e,t,n,r){var o=xe,i=Ho.transition;Ho.transition=null;try{xe=4,fy(e,t,n,r)}finally{xe=o,Ho.transition=i}}function fy(e,t,n,r){if(wl){var o=qg(e,t,n,r);if(o===null)Gu(e,t,r,bl,n),Sx(e,r);else if(iL(o,e,t,n,r))r.stopPropagation();else if(Sx(e,r),t&4&&-1<oL.indexOf(e)){for(;o!==null;){var i=Gs(o);if(i!==null&&XN(i),i=qg(e,t,n,r),i===null&&Gu(e,t,r,bl,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else Gu(e,t,r,null,n)}}var bl=null;function qg(e,t,n,r){if(bl=null,e=ly(r),e=Fr(e),e!==null)if(t=uo(e),t===null)e=null;else if(n=t.tag,n===13){if(e=BN(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return bl=e,null}function t2(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(KO()){case cy:return 1;case UN:return 4;case yl:case XO:return 16;case GN:return 536870912;default:return 16}default:return 16}}var dr=null,hy=null,Za=null;function n2(){if(Za)return Za;var e,t=hy,n=t.length,r,o="value"in dr?dr.value:dr.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===o[i-r];r++);return Za=o.slice(e,1<r?1-r:void 0)}function Ja(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function wa(){return!0}function Cx(){return!1}function St(e){function t(n,r,o,i,s){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=i,this.target=s,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?wa:Cx,this.isPropagationStopped=Cx,this}return Pe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=wa)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=wa)},persist:function(){},isPersistent:wa}),t}var vi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},py=St(vi),Us=Pe({},vi,{view:0,detail:0}),cL=St(Us),$u,zu,Di,gc=Pe({},Us,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:my,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Di&&(Di&&e.type==="mousemove"?($u=e.screenX-Di.screenX,zu=e.screenY-Di.screenY):zu=$u=0,Di=e),$u)},movementY:function(e){return"movementY"in e?e.movementY:zu}}),Nx=St(gc),uL=Pe({},gc,{dataTransfer:0}),dL=St(uL),fL=Pe({},Us,{relatedTarget:0}),Fu=St(fL),hL=Pe({},vi,{animationName:0,elapsedTime:0,pseudoElement:0}),pL=St(hL),mL=Pe({},vi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),gL=St(mL),vL=Pe({},vi,{data:0}),kx=St(vL),yL={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xL={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"},wL={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function bL(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=wL[e])?!!t[e]:!1}function my(){return bL}var _L=Pe({},Us,{key:function(e){if(e.key){var t=yL[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ja(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?xL[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:my,charCode:function(e){return e.type==="keypress"?Ja(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ja(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),SL=St(_L),EL=Pe({},gc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Rx=St(EL),CL=Pe({},Us,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:my}),NL=St(CL),kL=Pe({},vi,{propertyName:0,elapsedTime:0,pseudoElement:0}),RL=St(kL),PL=Pe({},gc,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),jL=St(PL),TL=[9,13,27,32],gy=$n&&"CompositionEvent"in window,is=null;$n&&"documentMode"in document&&(is=document.documentMode);var AL=$n&&"TextEvent"in window&&!is,r2=$n&&(!gy||is&&8<is&&11>=is),Px=" ",jx=!1;function o2(e,t){switch(e){case"keyup":return TL.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function i2(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ro=!1;function ML(e,t){switch(e){case"compositionend":return i2(t);case"keypress":return t.which!==32?null:(jx=!0,Px);case"textInput":return e=t.data,e===Px&&jx?null:e;default:return null}}function IL(e,t){if(Ro)return e==="compositionend"||!gy&&o2(e,t)?(e=n2(),Za=hy=dr=null,Ro=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return r2&&t.locale!=="ko"?null:t.data;default:return null}}var OL={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 Tx(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!OL[e.type]:t==="textarea"}function s2(e,t,n,r){DN(r),t=_l(t,"onChange"),0<t.length&&(n=new py("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ss=null,bs=null;function LL(e){v2(e,0)}function vc(e){var t=To(e);if(jN(t))return e}function DL(e,t){if(e==="change")return t}var a2=!1;if($n){var qu;if($n){var Bu="oninput"in document;if(!Bu){var Ax=document.createElement("div");Ax.setAttribute("oninput","return;"),Bu=typeof Ax.oninput=="function"}qu=Bu}else qu=!1;a2=qu&&(!document.documentMode||9<document.documentMode)}function Mx(){ss&&(ss.detachEvent("onpropertychange",l2),bs=ss=null)}function l2(e){if(e.propertyName==="value"&&vc(bs)){var t=[];s2(t,bs,e,ly(e)),qN(LL,t)}}function $L(e,t,n){e==="focusin"?(Mx(),ss=t,bs=n,ss.attachEvent("onpropertychange",l2)):e==="focusout"&&Mx()}function zL(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return vc(bs)}function FL(e,t){if(e==="click")return vc(t)}function qL(e,t){if(e==="input"||e==="change")return vc(t)}function BL(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Wt=typeof Object.is=="function"?Object.is:BL;function _s(e,t){if(Wt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!Sg.call(t,o)||!Wt(e[o],t[o]))return!1}return!0}function Ix(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ox(e,t){var n=Ix(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ix(n)}}function c2(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?c2(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function u2(){for(var e=window,t=ml();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ml(e.document)}return t}function vy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function HL(e){var t=u2(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&c2(n.ownerDocument.documentElement,n)){if(r!==null&&vy(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=Ox(n,i);var s=Ox(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var VL=$n&&"documentMode"in document&&11>=document.documentMode,Po=null,Bg=null,as=null,Hg=!1;function Lx(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Hg||Po==null||Po!==ml(r)||(r=Po,"selectionStart"in r&&vy(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),as&&_s(as,r)||(as=r,r=_l(Bg,"onSelect"),0<r.length&&(t=new py("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Po)))}function ba(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var jo={animationend:ba("Animation","AnimationEnd"),animationiteration:ba("Animation","AnimationIteration"),animationstart:ba("Animation","AnimationStart"),transitionend:ba("Transition","TransitionEnd")},Hu={},d2={};$n&&(d2=document.createElement("div").style,"AnimationEvent"in window||(delete jo.animationend.animation,delete jo.animationiteration.animation,delete jo.animationstart.animation),"TransitionEvent"in window||delete jo.transitionend.transition);function yc(e){if(Hu[e])return Hu[e];if(!jo[e])return e;var t=jo[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in d2)return Hu[e]=t[n];return e}var f2=yc("animationend"),h2=yc("animationiteration"),p2=yc("animationstart"),m2=yc("transitionend"),g2=new Map,Dx="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 Pr(e,t){g2.set(e,t),co(t,[e])}for(var Vu=0;Vu<Dx.length;Vu++){var Wu=Dx[Vu],WL=Wu.toLowerCase(),UL=Wu[0].toUpperCase()+Wu.slice(1);Pr(WL,"on"+UL)}Pr(f2,"onAnimationEnd");Pr(h2,"onAnimationIteration");Pr(p2,"onAnimationStart");Pr("dblclick","onDoubleClick");Pr("focusin","onFocus");Pr("focusout","onBlur");Pr(m2,"onTransitionEnd");Xo("onMouseEnter",["mouseout","mouseover"]);Xo("onMouseLeave",["mouseout","mouseover"]);Xo("onPointerEnter",["pointerout","pointerover"]);Xo("onPointerLeave",["pointerout","pointerover"]);co("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));co("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));co("onBeforeInput",["compositionend","keypress","textInput","paste"]);co("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));co("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));co("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Gi="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(" "),GL=new Set("cancel close invalid load scroll toggle".split(" ").concat(Gi));function $x(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,WO(r,t,void 0,e),e.currentTarget=null}function v2(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var s=r.length-1;0<=s;s--){var a=r[s],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==i&&o.isPropagationStopped())break e;$x(o,a,c),i=l}else for(s=0;s<r.length;s++){if(a=r[s],l=a.instance,c=a.currentTarget,a=a.listener,l!==i&&o.isPropagationStopped())break e;$x(o,a,c),i=l}}}if(vl)throw e=$g,vl=!1,$g=null,e}function be(e,t){var n=t[Yg];n===void 0&&(n=t[Yg]=new Set);var r=e+"__bubble";n.has(r)||(y2(t,e,2,!1),n.add(r))}function Uu(e,t,n){var r=0;t&&(r|=4),y2(n,e,r,t)}var _a="_reactListening"+Math.random().toString(36).slice(2);function Ss(e){if(!e[_a]){e[_a]=!0,CN.forEach(function(n){n!=="selectionchange"&&(GL.has(n)||Uu(n,!1,e),Uu(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[_a]||(t[_a]=!0,Uu("selectionchange",!1,t))}}function y2(e,t,n,r){switch(t2(t)){case 1:var o=aL;break;case 4:o=lL;break;default:o=fy}n=o.bind(null,t,n,e),o=void 0,!Dg||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Gu(e,t,n,r,o){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var a=r.stateNode.containerInfo;if(a===o||a.nodeType===8&&a.parentNode===o)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&(l=s.stateNode.containerInfo,l===o||l.nodeType===8&&l.parentNode===o))return;s=s.return}for(;a!==null;){if(s=Fr(a),s===null)return;if(l=s.tag,l===5||l===6){r=i=s;continue e}a=a.parentNode}}r=r.return}qN(function(){var c=i,u=ly(n),d=[];e:{var f=g2.get(e);if(f!==void 0){var p=py,g=e;switch(e){case"keypress":if(Ja(n)===0)break e;case"keydown":case"keyup":p=SL;break;case"focusin":g="focus",p=Fu;break;case"focusout":g="blur",p=Fu;break;case"beforeblur":case"afterblur":p=Fu;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=Nx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=dL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=NL;break;case f2:case h2:case p2:p=pL;break;case m2:p=RL;break;case"scroll":p=cL;break;case"wheel":p=jL;break;case"copy":case"cut":case"paste":p=gL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Rx}var m=(t&4)!==0,_=!m&&e==="scroll",v=m?f!==null?f+"Capture":null:f;m=[];for(var w=c,x;w!==null;){x=w;var b=x.stateNode;if(x.tag===5&&b!==null&&(x=b,v!==null&&(b=vs(w,v),b!=null&&m.push(Es(w,b,x)))),_)break;w=w.return}0<m.length&&(f=new p(f,g,null,n,u),d.push({event:f,listeners:m}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==Og&&(g=n.relatedTarget||n.fromElement)&&(Fr(g)||g[zn]))break e;if((p||f)&&(f=u.window===u?u:(f=u.ownerDocument)?f.defaultView||f.parentWindow:window,p?(g=n.relatedTarget||n.toElement,p=c,g=g?Fr(g):null,g!==null&&(_=uo(g),g!==_||g.tag!==5&&g.tag!==6)&&(g=null)):(p=null,g=c),p!==g)){if(m=Nx,b="onMouseLeave",v="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(m=Rx,b="onPointerLeave",v="onPointerEnter",w="pointer"),_=p==null?f:To(p),x=g==null?f:To(g),f=new m(b,w+"leave",p,n,u),f.target=_,f.relatedTarget=x,b=null,Fr(u)===c&&(m=new m(v,w+"enter",g,n,u),m.target=x,m.relatedTarget=_,b=m),_=b,p&&g)t:{for(m=p,v=g,w=0,x=m;x;x=xo(x))w++;for(x=0,b=v;b;b=xo(b))x++;for(;0<w-x;)m=xo(m),w--;for(;0<x-w;)v=xo(v),x--;for(;w--;){if(m===v||v!==null&&m===v.alternate)break t;m=xo(m),v=xo(v)}m=null}else m=null;p!==null&&zx(d,f,p,m,!1),g!==null&&_!==null&&zx(d,_,g,m,!0)}}e:{if(f=c?To(c):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var S=DL;else if(Tx(f))if(a2)S=qL;else{S=zL;var E=$L}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(S=FL);if(S&&(S=S(e,c))){s2(d,S,n,u);break e}E&&E(e,f,c),e==="focusout"&&(E=f._wrapperState)&&E.controlled&&f.type==="number"&&jg(f,"number",f.value)}switch(E=c?To(c):window,e){case"focusin":(Tx(E)||E.contentEditable==="true")&&(Po=E,Bg=c,as=null);break;case"focusout":as=Bg=Po=null;break;case"mousedown":Hg=!0;break;case"contextmenu":case"mouseup":case"dragend":Hg=!1,Lx(d,n,u);break;case"selectionchange":if(VL)break;case"keydown":case"keyup":Lx(d,n,u)}var C;if(gy)e:{switch(e){case"compositionstart":var k="onCompositionStart";break e;case"compositionend":k="onCompositionEnd";break e;case"compositionupdate":k="onCompositionUpdate";break e}k=void 0}else Ro?o2(e,n)&&(k="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(k="onCompositionStart");k&&(r2&&n.locale!=="ko"&&(Ro||k!=="onCompositionStart"?k==="onCompositionEnd"&&Ro&&(C=n2()):(dr=u,hy="value"in dr?dr.value:dr.textContent,Ro=!0)),E=_l(c,k),0<E.length&&(k=new kx(k,e,null,n,u),d.push({event:k,listeners:E}),C?k.data=C:(C=i2(n),C!==null&&(k.data=C)))),(C=AL?ML(e,n):IL(e,n))&&(c=_l(c,"onBeforeInput"),0<c.length&&(u=new kx("onBeforeInput","beforeinput",null,n,u),d.push({event:u,listeners:c}),u.data=C))}v2(d,t)})}function Es(e,t,n){return{instance:e,listener:t,currentTarget:n}}function _l(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=vs(e,n),i!=null&&r.unshift(Es(e,i,o)),i=vs(e,t),i!=null&&r.push(Es(e,i,o))),e=e.return}return r}function xo(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function zx(e,t,n,r,o){for(var i=t._reactName,s=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,o?(l=vs(n,i),l!=null&&s.unshift(Es(n,l,a))):o||(l=vs(n,i),l!=null&&s.push(Es(n,l,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var YL=/\r\n?/g,KL=/\u0000|\uFFFD/g;function Fx(e){return(typeof e=="string"?e:""+e).replace(YL,`
|
|
38
|
+
`).replace(KL,"")}function Sa(e,t,n){if(t=Fx(t),Fx(e)!==t&&n)throw Error(W(425))}function Sl(){}var Vg=null,Wg=null;function Ug(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Gg=typeof setTimeout=="function"?setTimeout:void 0,XL=typeof clearTimeout=="function"?clearTimeout:void 0,qx=typeof Promise=="function"?Promise:void 0,QL=typeof queueMicrotask=="function"?queueMicrotask:typeof qx<"u"?function(e){return qx.resolve(null).then(e).catch(ZL)}:Gg;function ZL(e){setTimeout(function(){throw e})}function Yu(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),ws(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);ws(t)}function gr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Bx(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var yi=Math.random().toString(36).slice(2),sn="__reactFiber$"+yi,Cs="__reactProps$"+yi,zn="__reactContainer$"+yi,Yg="__reactEvents$"+yi,JL="__reactListeners$"+yi,e4="__reactHandles$"+yi;function Fr(e){var t=e[sn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[zn]||n[sn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Bx(e);e!==null;){if(n=e[sn])return n;e=Bx(e)}return t}e=n,n=e.parentNode}return null}function Gs(e){return e=e[sn]||e[zn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function To(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(W(33))}function xc(e){return e[Cs]||null}var Kg=[],Ao=-1;function jr(e){return{current:e}}function _e(e){0>Ao||(e.current=Kg[Ao],Kg[Ao]=null,Ao--)}function we(e,t){Ao++,Kg[Ao]=e.current,e.current=t}var Er={},Xe=jr(Er),lt=jr(!1),Xr=Er;function Qo(e,t){var n=e.type.contextTypes;if(!n)return Er;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function ct(e){return e=e.childContextTypes,e!=null}function El(){_e(lt),_e(Xe)}function Hx(e,t,n){if(Xe.current!==Er)throw Error(W(168));we(Xe,t),we(lt,n)}function x2(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(W(108,$O(e)||"Unknown",o));return Pe({},n,r)}function Cl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Er,Xr=Xe.current,we(Xe,e),we(lt,lt.current),!0}function Vx(e,t,n){var r=e.stateNode;if(!r)throw Error(W(169));n?(e=x2(e,t,Xr),r.__reactInternalMemoizedMergedChildContext=e,_e(lt),_e(Xe),we(Xe,e)):_e(lt),we(lt,n)}var Pn=null,wc=!1,Ku=!1;function w2(e){Pn===null?Pn=[e]:Pn.push(e)}function t4(e){wc=!0,w2(e)}function Tr(){if(!Ku&&Pn!==null){Ku=!0;var e=0,t=xe;try{var n=Pn;for(xe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Pn=null,wc=!1}catch(o){throw Pn!==null&&(Pn=Pn.slice(e+1)),WN(cy,Tr),o}finally{xe=t,Ku=!1}}return null}var Mo=[],Io=0,Nl=null,kl=0,Et=[],Ct=0,Qr=null,jn=1,Tn="";function Dr(e,t){Mo[Io++]=kl,Mo[Io++]=Nl,Nl=e,kl=t}function b2(e,t,n){Et[Ct++]=jn,Et[Ct++]=Tn,Et[Ct++]=Qr,Qr=e;var r=jn;e=Tn;var o=32-Ht(r)-1;r&=~(1<<o),n+=1;var i=32-Ht(t)+o;if(30<i){var s=o-o%5;i=(r&(1<<s)-1).toString(32),r>>=s,o-=s,jn=1<<32-Ht(t)+o|n<<o|r,Tn=i+e}else jn=1<<i|n<<o|r,Tn=e}function yy(e){e.return!==null&&(Dr(e,1),b2(e,1,0))}function xy(e){for(;e===Nl;)Nl=Mo[--Io],Mo[Io]=null,kl=Mo[--Io],Mo[Io]=null;for(;e===Qr;)Qr=Et[--Ct],Et[Ct]=null,Tn=Et[--Ct],Et[Ct]=null,jn=Et[--Ct],Et[Ct]=null}var yt=null,vt=null,Se=!1,$t=null;function _2(e,t){var n=Nt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Wx(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,yt=e,vt=gr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,yt=e,vt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Qr!==null?{id:jn,overflow:Tn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Nt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,yt=e,vt=null,!0):!1;default:return!1}}function Xg(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Qg(e){if(Se){var t=vt;if(t){var n=t;if(!Wx(e,t)){if(Xg(e))throw Error(W(418));t=gr(n.nextSibling);var r=yt;t&&Wx(e,t)?_2(r,n):(e.flags=e.flags&-4097|2,Se=!1,yt=e)}}else{if(Xg(e))throw Error(W(418));e.flags=e.flags&-4097|2,Se=!1,yt=e}}}function Ux(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;yt=e}function Ea(e){if(e!==yt)return!1;if(!Se)return Ux(e),Se=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ug(e.type,e.memoizedProps)),t&&(t=vt)){if(Xg(e))throw S2(),Error(W(418));for(;t;)_2(e,t),t=gr(t.nextSibling)}if(Ux(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(W(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){vt=gr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}vt=null}}else vt=yt?gr(e.stateNode.nextSibling):null;return!0}function S2(){for(var e=vt;e;)e=gr(e.nextSibling)}function Zo(){vt=yt=null,Se=!1}function wy(e){$t===null?$t=[e]:$t.push(e)}var n4=Un.ReactCurrentBatchConfig;function $i(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(W(309));var r=n.stateNode}if(!r)throw Error(W(147,e));var o=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(s){var a=o.refs;s===null?delete a[i]:a[i]=s},t._stringRef=i,t)}if(typeof e!="string")throw Error(W(284));if(!n._owner)throw Error(W(290,e))}return e}function Ca(e,t){throw e=Object.prototype.toString.call(t),Error(W(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Gx(e){var t=e._init;return t(e._payload)}function E2(e){function t(v,w){if(e){var x=v.deletions;x===null?(v.deletions=[w],v.flags|=16):x.push(w)}}function n(v,w){if(!e)return null;for(;w!==null;)t(v,w),w=w.sibling;return null}function r(v,w){for(v=new Map;w!==null;)w.key!==null?v.set(w.key,w):v.set(w.index,w),w=w.sibling;return v}function o(v,w){return v=wr(v,w),v.index=0,v.sibling=null,v}function i(v,w,x){return v.index=x,e?(x=v.alternate,x!==null?(x=x.index,x<w?(v.flags|=2,w):x):(v.flags|=2,w)):(v.flags|=1048576,w)}function s(v){return e&&v.alternate===null&&(v.flags|=2),v}function a(v,w,x,b){return w===null||w.tag!==6?(w=nd(x,v.mode,b),w.return=v,w):(w=o(w,x),w.return=v,w)}function l(v,w,x,b){var S=x.type;return S===ko?u(v,w,x.props.children,b,x.key):w!==null&&(w.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===ir&&Gx(S)===w.type)?(b=o(w,x.props),b.ref=$i(v,w,x),b.return=v,b):(b=sl(x.type,x.key,x.props,null,v.mode,b),b.ref=$i(v,w,x),b.return=v,b)}function c(v,w,x,b){return w===null||w.tag!==4||w.stateNode.containerInfo!==x.containerInfo||w.stateNode.implementation!==x.implementation?(w=rd(x,v.mode,b),w.return=v,w):(w=o(w,x.children||[]),w.return=v,w)}function u(v,w,x,b,S){return w===null||w.tag!==7?(w=Ur(x,v.mode,b,S),w.return=v,w):(w=o(w,x),w.return=v,w)}function d(v,w,x){if(typeof w=="string"&&w!==""||typeof w=="number")return w=nd(""+w,v.mode,x),w.return=v,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case pa:return x=sl(w.type,w.key,w.props,null,v.mode,x),x.ref=$i(v,null,w),x.return=v,x;case No:return w=rd(w,v.mode,x),w.return=v,w;case ir:var b=w._init;return d(v,b(w._payload),x)}if(Wi(w)||Mi(w))return w=Ur(w,v.mode,x,null),w.return=v,w;Ca(v,w)}return null}function f(v,w,x,b){var S=w!==null?w.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return S!==null?null:a(v,w,""+x,b);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case pa:return x.key===S?l(v,w,x,b):null;case No:return x.key===S?c(v,w,x,b):null;case ir:return S=x._init,f(v,w,S(x._payload),b)}if(Wi(x)||Mi(x))return S!==null?null:u(v,w,x,b,null);Ca(v,x)}return null}function p(v,w,x,b,S){if(typeof b=="string"&&b!==""||typeof b=="number")return v=v.get(x)||null,a(w,v,""+b,S);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case pa:return v=v.get(b.key===null?x:b.key)||null,l(w,v,b,S);case No:return v=v.get(b.key===null?x:b.key)||null,c(w,v,b,S);case ir:var E=b._init;return p(v,w,x,E(b._payload),S)}if(Wi(b)||Mi(b))return v=v.get(x)||null,u(w,v,b,S,null);Ca(w,b)}return null}function g(v,w,x,b){for(var S=null,E=null,C=w,k=w=0,T=null;C!==null&&k<x.length;k++){C.index>k?(T=C,C=null):T=C.sibling;var M=f(v,C,x[k],b);if(M===null){C===null&&(C=T);break}e&&C&&M.alternate===null&&t(v,C),w=i(M,w,k),E===null?S=M:E.sibling=M,E=M,C=T}if(k===x.length)return n(v,C),Se&&Dr(v,k),S;if(C===null){for(;k<x.length;k++)C=d(v,x[k],b),C!==null&&(w=i(C,w,k),E===null?S=C:E.sibling=C,E=C);return Se&&Dr(v,k),S}for(C=r(v,C);k<x.length;k++)T=p(C,v,k,x[k],b),T!==null&&(e&&T.alternate!==null&&C.delete(T.key===null?k:T.key),w=i(T,w,k),E===null?S=T:E.sibling=T,E=T);return e&&C.forEach(function(P){return t(v,P)}),Se&&Dr(v,k),S}function m(v,w,x,b){var S=Mi(x);if(typeof S!="function")throw Error(W(150));if(x=S.call(x),x==null)throw Error(W(151));for(var E=S=null,C=w,k=w=0,T=null,M=x.next();C!==null&&!M.done;k++,M=x.next()){C.index>k?(T=C,C=null):T=C.sibling;var P=f(v,C,M.value,b);if(P===null){C===null&&(C=T);break}e&&C&&P.alternate===null&&t(v,C),w=i(P,w,k),E===null?S=P:E.sibling=P,E=P,C=T}if(M.done)return n(v,C),Se&&Dr(v,k),S;if(C===null){for(;!M.done;k++,M=x.next())M=d(v,M.value,b),M!==null&&(w=i(M,w,k),E===null?S=M:E.sibling=M,E=M);return Se&&Dr(v,k),S}for(C=r(v,C);!M.done;k++,M=x.next())M=p(C,v,k,M.value,b),M!==null&&(e&&M.alternate!==null&&C.delete(M.key===null?k:M.key),w=i(M,w,k),E===null?S=M:E.sibling=M,E=M);return e&&C.forEach(function(I){return t(v,I)}),Se&&Dr(v,k),S}function _(v,w,x,b){if(typeof x=="object"&&x!==null&&x.type===ko&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case pa:e:{for(var S=x.key,E=w;E!==null;){if(E.key===S){if(S=x.type,S===ko){if(E.tag===7){n(v,E.sibling),w=o(E,x.props.children),w.return=v,v=w;break e}}else if(E.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===ir&&Gx(S)===E.type){n(v,E.sibling),w=o(E,x.props),w.ref=$i(v,E,x),w.return=v,v=w;break e}n(v,E);break}else t(v,E);E=E.sibling}x.type===ko?(w=Ur(x.props.children,v.mode,b,x.key),w.return=v,v=w):(b=sl(x.type,x.key,x.props,null,v.mode,b),b.ref=$i(v,w,x),b.return=v,v=b)}return s(v);case No:e:{for(E=x.key;w!==null;){if(w.key===E)if(w.tag===4&&w.stateNode.containerInfo===x.containerInfo&&w.stateNode.implementation===x.implementation){n(v,w.sibling),w=o(w,x.children||[]),w.return=v,v=w;break e}else{n(v,w);break}else t(v,w);w=w.sibling}w=rd(x,v.mode,b),w.return=v,v=w}return s(v);case ir:return E=x._init,_(v,w,E(x._payload),b)}if(Wi(x))return g(v,w,x,b);if(Mi(x))return m(v,w,x,b);Ca(v,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,w!==null&&w.tag===6?(n(v,w.sibling),w=o(w,x),w.return=v,v=w):(n(v,w),w=nd(x,v.mode,b),w.return=v,v=w),s(v)):n(v,w)}return _}var Jo=E2(!0),C2=E2(!1),Rl=jr(null),Pl=null,Oo=null,by=null;function _y(){by=Oo=Pl=null}function Sy(e){var t=Rl.current;_e(Rl),e._currentValue=t}function Zg(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Vo(e,t){Pl=e,by=Oo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(st=!0),e.firstContext=null)}function Rt(e){var t=e._currentValue;if(by!==e)if(e={context:e,memoizedValue:t,next:null},Oo===null){if(Pl===null)throw Error(W(308));Oo=e,Pl.dependencies={lanes:0,firstContext:e}}else Oo=Oo.next=e;return t}var qr=null;function Ey(e){qr===null?qr=[e]:qr.push(e)}function N2(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Ey(t)):(n.next=o.next,o.next=n),t.interleaved=n,Fn(e,r)}function Fn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var sr=!1;function Cy(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function k2(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function On(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function vr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ge&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Fn(e,n)}return o=r.interleaved,o===null?(t.next=t,Ey(r)):(t.next=o.next,o.next=t),r.interleaved=t,Fn(e,n)}function el(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,uy(e,n)}}function Yx(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function jl(e,t,n,r){var o=e.updateQueue;sr=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,c=l.next;l.next=null,s===null?i=c:s.next=c,s=l;var u=e.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==s&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(i!==null){var d=o.baseState;s=0,u=c=l=null,a=i;do{var f=a.lane,p=a.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var g=e,m=a;switch(f=t,p=n,m.tag){case 1:if(g=m.payload,typeof g=="function"){d=g.call(p,d,f);break e}d=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=m.payload,f=typeof g=="function"?g.call(p,d,f):g,f==null)break e;d=Pe({},d,f);break e;case 2:sr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[a]:f.push(a))}else p={eventTime:p,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=p,l=d):u=u.next=p,s|=f;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;f=a,a=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(!0);if(u===null&&(l=d),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);Jr|=s,e.lanes=s,e.memoizedState=d}}function Kx(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(W(191,o));o.call(r)}}}var Ys={},dn=jr(Ys),Ns=jr(Ys),ks=jr(Ys);function Br(e){if(e===Ys)throw Error(W(174));return e}function Ny(e,t){switch(we(ks,t),we(Ns,e),we(dn,Ys),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ag(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ag(t,e)}_e(dn),we(dn,t)}function ei(){_e(dn),_e(Ns),_e(ks)}function R2(e){Br(ks.current);var t=Br(dn.current),n=Ag(t,e.type);t!==n&&(we(Ns,e),we(dn,n))}function ky(e){Ns.current===e&&(_e(dn),_e(Ns))}var ke=jr(0);function Tl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Xu=[];function Ry(){for(var e=0;e<Xu.length;e++)Xu[e]._workInProgressVersionPrimary=null;Xu.length=0}var tl=Un.ReactCurrentDispatcher,Qu=Un.ReactCurrentBatchConfig,Zr=0,Re=null,$e=null,Fe=null,Al=!1,ls=!1,Rs=0,r4=0;function Ge(){throw Error(W(321))}function Py(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Wt(e[n],t[n]))return!1;return!0}function jy(e,t,n,r,o,i){if(Zr=i,Re=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,tl.current=e===null||e.memoizedState===null?a4:l4,e=n(r,o),ls){i=0;do{if(ls=!1,Rs=0,25<=i)throw Error(W(301));i+=1,Fe=$e=null,t.updateQueue=null,tl.current=c4,e=n(r,o)}while(ls)}if(tl.current=Ml,t=$e!==null&&$e.next!==null,Zr=0,Fe=$e=Re=null,Al=!1,t)throw Error(W(300));return e}function Ty(){var e=Rs!==0;return Rs=0,e}function nn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Fe===null?Re.memoizedState=Fe=e:Fe=Fe.next=e,Fe}function Pt(){if($e===null){var e=Re.alternate;e=e!==null?e.memoizedState:null}else e=$e.next;var t=Fe===null?Re.memoizedState:Fe.next;if(t!==null)Fe=t,$e=e;else{if(e===null)throw Error(W(310));$e=e,e={memoizedState:$e.memoizedState,baseState:$e.baseState,baseQueue:$e.baseQueue,queue:$e.queue,next:null},Fe===null?Re.memoizedState=Fe=e:Fe=Fe.next=e}return Fe}function Ps(e,t){return typeof t=="function"?t(e):t}function Zu(e){var t=Pt(),n=t.queue;if(n===null)throw Error(W(311));n.lastRenderedReducer=e;var r=$e,o=r.baseQueue,i=n.pending;if(i!==null){if(o!==null){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(o!==null){i=o.next,r=r.baseState;var a=s=null,l=null,c=i;do{var u=c.lane;if((Zr&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=d,s=r):l=l.next=d,Re.lanes|=u,Jr|=u}c=c.next}while(c!==null&&c!==i);l===null?s=r:l.next=a,Wt(r,t.memoizedState)||(st=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do i=o.lane,Re.lanes|=i,Jr|=i,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ju(e){var t=Pt(),n=t.queue;if(n===null)throw Error(W(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(o!==null){n.pending=null;var s=o=o.next;do i=e(i,s.action),s=s.next;while(s!==o);Wt(i,t.memoizedState)||(st=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function P2(){}function j2(e,t){var n=Re,r=Pt(),o=t(),i=!Wt(r.memoizedState,o);if(i&&(r.memoizedState=o,st=!0),r=r.queue,Ay(M2.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||Fe!==null&&Fe.memoizedState.tag&1){if(n.flags|=2048,js(9,A2.bind(null,n,r,o,t),void 0,null),qe===null)throw Error(W(349));Zr&30||T2(n,t,o)}return o}function T2(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Re.updateQueue,t===null?(t={lastEffect:null,stores:null},Re.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function A2(e,t,n,r){t.value=n,t.getSnapshot=r,I2(t)&&O2(e)}function M2(e,t,n){return n(function(){I2(t)&&O2(e)})}function I2(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Wt(e,n)}catch{return!0}}function O2(e){var t=Fn(e,1);t!==null&&Vt(t,e,1,-1)}function Xx(e){var t=nn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ps,lastRenderedState:e},t.queue=e,e=e.dispatch=s4.bind(null,Re,e),[t.memoizedState,e]}function js(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Re.updateQueue,t===null?(t={lastEffect:null,stores:null},Re.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function L2(){return Pt().memoizedState}function nl(e,t,n,r){var o=nn();Re.flags|=e,o.memoizedState=js(1|t,n,void 0,r===void 0?null:r)}function bc(e,t,n,r){var o=Pt();r=r===void 0?null:r;var i=void 0;if($e!==null){var s=$e.memoizedState;if(i=s.destroy,r!==null&&Py(r,s.deps)){o.memoizedState=js(t,n,i,r);return}}Re.flags|=e,o.memoizedState=js(1|t,n,i,r)}function Qx(e,t){return nl(8390656,8,e,t)}function Ay(e,t){return bc(2048,8,e,t)}function D2(e,t){return bc(4,2,e,t)}function $2(e,t){return bc(4,4,e,t)}function z2(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function F2(e,t,n){return n=n!=null?n.concat([e]):null,bc(4,4,z2.bind(null,t,e),n)}function My(){}function q2(e,t){var n=Pt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Py(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function B2(e,t){var n=Pt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Py(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function H2(e,t,n){return Zr&21?(Wt(n,t)||(n=YN(),Re.lanes|=n,Jr|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,st=!0),e.memoizedState=n)}function o4(e,t){var n=xe;xe=n!==0&&4>n?n:4,e(!0);var r=Qu.transition;Qu.transition={};try{e(!1),t()}finally{xe=n,Qu.transition=r}}function V2(){return Pt().memoizedState}function i4(e,t,n){var r=xr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},W2(e))U2(t,n);else if(n=N2(e,t,n,r),n!==null){var o=Ze();Vt(n,e,r,o),G2(n,t,r)}}function s4(e,t,n){var r=xr(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(W2(e))U2(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,a=i(s,n);if(o.hasEagerState=!0,o.eagerState=a,Wt(a,s)){var l=t.interleaved;l===null?(o.next=o,Ey(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}n=N2(e,t,o,r),n!==null&&(o=Ze(),Vt(n,e,r,o),G2(n,t,r))}}function W2(e){var t=e.alternate;return e===Re||t!==null&&t===Re}function U2(e,t){ls=Al=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function G2(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,uy(e,n)}}var Ml={readContext:Rt,useCallback:Ge,useContext:Ge,useEffect:Ge,useImperativeHandle:Ge,useInsertionEffect:Ge,useLayoutEffect:Ge,useMemo:Ge,useReducer:Ge,useRef:Ge,useState:Ge,useDebugValue:Ge,useDeferredValue:Ge,useTransition:Ge,useMutableSource:Ge,useSyncExternalStore:Ge,useId:Ge,unstable_isNewReconciler:!1},a4={readContext:Rt,useCallback:function(e,t){return nn().memoizedState=[e,t===void 0?null:t],e},useContext:Rt,useEffect:Qx,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,nl(4194308,4,z2.bind(null,t,e),n)},useLayoutEffect:function(e,t){return nl(4194308,4,e,t)},useInsertionEffect:function(e,t){return nl(4,2,e,t)},useMemo:function(e,t){var n=nn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=nn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=i4.bind(null,Re,e),[r.memoizedState,e]},useRef:function(e){var t=nn();return e={current:e},t.memoizedState=e},useState:Xx,useDebugValue:My,useDeferredValue:function(e){return nn().memoizedState=e},useTransition:function(){var e=Xx(!1),t=e[0];return e=o4.bind(null,e[1]),nn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Re,o=nn();if(Se){if(n===void 0)throw Error(W(407));n=n()}else{if(n=t(),qe===null)throw Error(W(349));Zr&30||T2(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Qx(M2.bind(null,r,i,e),[e]),r.flags|=2048,js(9,A2.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=nn(),t=qe.identifierPrefix;if(Se){var n=Tn,r=jn;n=(r&~(1<<32-Ht(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Rs++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=r4++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},l4={readContext:Rt,useCallback:q2,useContext:Rt,useEffect:Ay,useImperativeHandle:F2,useInsertionEffect:D2,useLayoutEffect:$2,useMemo:B2,useReducer:Zu,useRef:L2,useState:function(){return Zu(Ps)},useDebugValue:My,useDeferredValue:function(e){var t=Pt();return H2(t,$e.memoizedState,e)},useTransition:function(){var e=Zu(Ps)[0],t=Pt().memoizedState;return[e,t]},useMutableSource:P2,useSyncExternalStore:j2,useId:V2,unstable_isNewReconciler:!1},c4={readContext:Rt,useCallback:q2,useContext:Rt,useEffect:Ay,useImperativeHandle:F2,useInsertionEffect:D2,useLayoutEffect:$2,useMemo:B2,useReducer:Ju,useRef:L2,useState:function(){return Ju(Ps)},useDebugValue:My,useDeferredValue:function(e){var t=Pt();return $e===null?t.memoizedState=e:H2(t,$e.memoizedState,e)},useTransition:function(){var e=Ju(Ps)[0],t=Pt().memoizedState;return[e,t]},useMutableSource:P2,useSyncExternalStore:j2,useId:V2,unstable_isNewReconciler:!1};function Ot(e,t){if(e&&e.defaultProps){t=Pe({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Jg(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Pe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var _c={isMounted:function(e){return(e=e._reactInternals)?uo(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ze(),o=xr(e),i=On(r,o);i.payload=t,n!=null&&(i.callback=n),t=vr(e,i,o),t!==null&&(Vt(t,e,o,r),el(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ze(),o=xr(e),i=On(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=vr(e,i,o),t!==null&&(Vt(t,e,o,r),el(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ze(),r=xr(e),o=On(n,r);o.tag=2,t!=null&&(o.callback=t),t=vr(e,o,r),t!==null&&(Vt(t,e,r,n),el(t,e,r))}};function Zx(e,t,n,r,o,i,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,s):t.prototype&&t.prototype.isPureReactComponent?!_s(n,r)||!_s(o,i):!0}function Y2(e,t,n){var r=!1,o=Er,i=t.contextType;return typeof i=="object"&&i!==null?i=Rt(i):(o=ct(t)?Xr:Xe.current,r=t.contextTypes,i=(r=r!=null)?Qo(e,o):Er),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=_c,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function Jx(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&_c.enqueueReplaceState(t,t.state,null)}function ev(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Cy(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=Rt(i):(i=ct(t)?Xr:Xe.current,o.context=Qo(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Jg(e,t,i,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&_c.enqueueReplaceState(o,o.state,null),jl(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function ti(e,t){try{var n="",r=t;do n+=DO(r),r=r.return;while(r);var o=n}catch(i){o=`
|
|
39
|
+
Error generating stack: `+i.message+`
|
|
40
|
+
`+i.stack}return{value:e,source:t,stack:o,digest:null}}function ed(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function tv(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var u4=typeof WeakMap=="function"?WeakMap:Map;function K2(e,t,n){n=On(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ol||(Ol=!0,dv=r),tv(e,t)},n}function X2(e,t,n){n=On(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){tv(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){tv(e,t),typeof r!="function"&&(yr===null?yr=new Set([this]):yr.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function ew(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new u4;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=E4.bind(null,e,t,n),t.then(e,e))}function tw(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function nw(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=On(-1,1),t.tag=2,vr(n,t,1))),n.lanes|=1),e)}var d4=Un.ReactCurrentOwner,st=!1;function Qe(e,t,n,r){t.child=e===null?C2(t,null,n,r):Jo(t,e.child,n,r)}function rw(e,t,n,r,o){n=n.render;var i=t.ref;return Vo(t,o),r=jy(e,t,n,r,i,o),n=Ty(),e!==null&&!st?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,qn(e,t,o)):(Se&&n&&yy(t),t.flags|=1,Qe(e,t,r,o),t.child)}function ow(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!qy(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Q2(e,t,i,r,o)):(e=sl(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&o)){var s=i.memoizedProps;if(n=n.compare,n=n!==null?n:_s,n(s,r)&&e.ref===t.ref)return qn(e,t,o)}return t.flags|=1,e=wr(i,r),e.ref=t.ref,e.return=t,t.child=e}function Q2(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(_s(i,r)&&e.ref===t.ref)if(st=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&(st=!0);else return t.lanes=e.lanes,qn(e,t,o)}return nv(e,t,n,r,o)}function Z2(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},we(Do,ht),ht|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,we(Do,ht),ht|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,we(Do,ht),ht|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,we(Do,ht),ht|=r;return Qe(e,t,o,n),t.child}function J2(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function nv(e,t,n,r,o){var i=ct(n)?Xr:Xe.current;return i=Qo(t,i),Vo(t,o),n=jy(e,t,n,r,i,o),r=Ty(),e!==null&&!st?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,qn(e,t,o)):(Se&&r&&yy(t),t.flags|=1,Qe(e,t,n,o),t.child)}function iw(e,t,n,r,o){if(ct(n)){var i=!0;Cl(t)}else i=!1;if(Vo(t,o),t.stateNode===null)rl(e,t),Y2(t,n,r),ev(t,n,r,o),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,c=n.contextType;typeof c=="object"&&c!==null?c=Rt(c):(c=ct(n)?Xr:Xe.current,c=Qo(t,c));var u=n.getDerivedStateFromProps,d=typeof u=="function"||typeof s.getSnapshotBeforeUpdate=="function";d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==c)&&Jx(t,s,r,c),sr=!1;var f=t.memoizedState;s.state=f,jl(t,r,s,o),l=t.memoizedState,a!==r||f!==l||lt.current||sr?(typeof u=="function"&&(Jg(t,n,u,r),l=t.memoizedState),(a=sr||Zx(t,n,a,r,f,l,c))?(d||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=c,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,k2(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:Ot(t.type,a),s.props=c,d=t.pendingProps,f=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=Rt(l):(l=ct(n)?Xr:Xe.current,l=Qo(t,l));var p=n.getDerivedStateFromProps;(u=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==d||f!==l)&&Jx(t,s,r,l),sr=!1,f=t.memoizedState,s.state=f,jl(t,r,s,o);var g=t.memoizedState;a!==d||f!==g||lt.current||sr?(typeof p=="function"&&(Jg(t,n,p,r),g=t.memoizedState),(c=sr||Zx(t,n,c,r,f,g,l)||!1)?(u||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,g,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,g,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=g),s.props=r,s.state=g,s.context=l,r=c):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return rv(e,t,n,r,i,o)}function rv(e,t,n,r,o,i){J2(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return o&&Vx(t,n,!1),qn(e,t,i);r=t.stateNode,d4.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Jo(t,e.child,null,i),t.child=Jo(t,null,a,i)):Qe(e,t,a,i),t.memoizedState=r.state,o&&Vx(t,n,!0),t.child}function ek(e){var t=e.stateNode;t.pendingContext?Hx(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Hx(e,t.context,!1),Ny(e,t.containerInfo)}function sw(e,t,n,r,o){return Zo(),wy(o),t.flags|=256,Qe(e,t,n,r),t.child}var ov={dehydrated:null,treeContext:null,retryLane:0};function iv(e){return{baseLanes:e,cachePool:null,transitions:null}}function tk(e,t,n){var r=t.pendingProps,o=ke.current,i=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(o&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),we(ke,o&1),e===null)return Qg(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,i?(r=t.mode,i=t.child,s={mode:"hidden",children:s},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=s):i=Cc(s,r,0,null),e=Ur(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=iv(n),t.memoizedState=ov,e):Iy(t,s));if(o=e.memoizedState,o!==null&&(a=o.dehydrated,a!==null))return f4(e,t,s,r,a,o,n);if(i){i=r.fallback,s=t.mode,o=e.child,a=o.sibling;var l={mode:"hidden",children:r.children};return!(s&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=wr(o,l),r.subtreeFlags=o.subtreeFlags&14680064),a!==null?i=wr(a,i):(i=Ur(i,s,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,s=e.child.memoizedState,s=s===null?iv(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~n,t.memoizedState=ov,r}return i=e.child,e=i.sibling,r=wr(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Iy(e,t){return t=Cc({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Na(e,t,n,r){return r!==null&&wy(r),Jo(t,e.child,null,n),e=Iy(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function f4(e,t,n,r,o,i,s){if(n)return t.flags&256?(t.flags&=-257,r=ed(Error(W(422))),Na(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=Cc({mode:"visible",children:r.children},o,0,null),i=Ur(i,o,s,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Jo(t,e.child,null,s),t.child.memoizedState=iv(s),t.memoizedState=ov,i);if(!(t.mode&1))return Na(e,t,s,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(W(419)),r=ed(i,r,void 0),Na(e,t,s,r)}if(a=(s&e.childLanes)!==0,st||a){if(r=qe,r!==null){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|s)?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,Fn(e,o),Vt(r,e,o,-1))}return Fy(),r=ed(Error(W(421))),Na(e,t,s,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=C4.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,vt=gr(o.nextSibling),yt=t,Se=!0,$t=null,e!==null&&(Et[Ct++]=jn,Et[Ct++]=Tn,Et[Ct++]=Qr,jn=e.id,Tn=e.overflow,Qr=t),t=Iy(t,r.children),t.flags|=4096,t)}function aw(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Zg(e.return,t,n)}function td(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function nk(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Qe(e,t,r.children,n),r=ke.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&aw(e,n,t);else if(e.tag===19)aw(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(we(ke,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Tl(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),td(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Tl(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}td(t,!0,n,null,i);break;case"together":td(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function rl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function qn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Jr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(W(153));if(t.child!==null){for(e=t.child,n=wr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=wr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function h4(e,t,n){switch(t.tag){case 3:ek(t),Zo();break;case 5:R2(t);break;case 1:ct(t.type)&&Cl(t);break;case 4:Ny(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;we(Rl,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(we(ke,ke.current&1),t.flags|=128,null):n&t.child.childLanes?tk(e,t,n):(we(ke,ke.current&1),e=qn(e,t,n),e!==null?e.sibling:null);we(ke,ke.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return nk(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),we(ke,ke.current),r)break;return null;case 22:case 23:return t.lanes=0,Z2(e,t,n)}return qn(e,t,n)}var rk,sv,ok,ik;rk=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};sv=function(){};ok=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Br(dn.current);var i=null;switch(n){case"input":o=Rg(e,o),r=Rg(e,r),i=[];break;case"select":o=Pe({},o,{value:void 0}),r=Pe({},r,{value:void 0}),i=[];break;case"textarea":o=Tg(e,o),r=Tg(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Sl)}Mg(n,r);var s;n=null;for(c in o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&o[c]!=null)if(c==="style"){var a=o[c];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(ms.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var l=r[c];if(a=o!=null?o[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(s in a)!a.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in l)l.hasOwnProperty(s)&&a[s]!==l[s]&&(n||(n={}),n[s]=l[s])}else n||(i||(i=[]),i.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(ms.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&be("scroll",e),i||a===l||(i=[])):(i=i||[]).push(c,l))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};ik=function(e,t,n,r){n!==r&&(t.flags|=4)};function zi(e,t){if(!Se)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ye(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function p4(e,t,n){var r=t.pendingProps;switch(xy(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ye(t),null;case 1:return ct(t.type)&&El(),Ye(t),null;case 3:return r=t.stateNode,ei(),_e(lt),_e(Xe),Ry(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ea(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,$t!==null&&(pv($t),$t=null))),sv(e,t),Ye(t),null;case 5:ky(t);var o=Br(ks.current);if(n=t.type,e!==null&&t.stateNode!=null)ok(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(W(166));return Ye(t),null}if(e=Br(dn.current),Ea(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[sn]=t,r[Cs]=i,e=(t.mode&1)!==0,n){case"dialog":be("cancel",r),be("close",r);break;case"iframe":case"object":case"embed":be("load",r);break;case"video":case"audio":for(o=0;o<Gi.length;o++)be(Gi[o],r);break;case"source":be("error",r);break;case"img":case"image":case"link":be("error",r),be("load",r);break;case"details":be("toggle",r);break;case"input":gx(r,i),be("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},be("invalid",r);break;case"textarea":yx(r,i),be("invalid",r)}Mg(n,i),o=null;for(var s in i)if(i.hasOwnProperty(s)){var a=i[s];s==="children"?typeof a=="string"?r.textContent!==a&&(i.suppressHydrationWarning!==!0&&Sa(r.textContent,a,e),o=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&Sa(r.textContent,a,e),o=["children",""+a]):ms.hasOwnProperty(s)&&a!=null&&s==="onScroll"&&be("scroll",r)}switch(n){case"input":ma(r),vx(r,i,!0);break;case"textarea":ma(r),xx(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Sl)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=MN(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[sn]=t,e[Cs]=r,rk(e,t,!1,!1),t.stateNode=e;e:{switch(s=Ig(n,r),n){case"dialog":be("cancel",e),be("close",e),o=r;break;case"iframe":case"object":case"embed":be("load",e),o=r;break;case"video":case"audio":for(o=0;o<Gi.length;o++)be(Gi[o],e);o=r;break;case"source":be("error",e),o=r;break;case"img":case"image":case"link":be("error",e),be("load",e),o=r;break;case"details":be("toggle",e),o=r;break;case"input":gx(e,r),o=Rg(e,r),be("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Pe({},r,{value:void 0}),be("invalid",e);break;case"textarea":yx(e,r),o=Tg(e,r),be("invalid",e);break;default:o=r}Mg(n,o),a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?LN(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&IN(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&gs(e,l):typeof l=="number"&&gs(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(ms.hasOwnProperty(i)?l!=null&&i==="onScroll"&&be("scroll",e):l!=null&&oy(e,i,l,s))}switch(n){case"input":ma(e),vx(e,r,!1);break;case"textarea":ma(e),xx(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Sr(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Fo(e,!!r.multiple,i,!1):r.defaultValue!=null&&Fo(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Sl)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ye(t),null;case 6:if(e&&t.stateNode!=null)ik(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(W(166));if(n=Br(ks.current),Br(dn.current),Ea(t)){if(r=t.stateNode,n=t.memoizedProps,r[sn]=t,(i=r.nodeValue!==n)&&(e=yt,e!==null))switch(e.tag){case 3:Sa(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Sa(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[sn]=t,t.stateNode=r}return Ye(t),null;case 13:if(_e(ke),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Se&&vt!==null&&t.mode&1&&!(t.flags&128))S2(),Zo(),t.flags|=98560,i=!1;else if(i=Ea(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(W(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(W(317));i[sn]=t}else Zo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ye(t),i=!1}else $t!==null&&(pv($t),$t=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||ke.current&1?ze===0&&(ze=3):Fy())),t.updateQueue!==null&&(t.flags|=4),Ye(t),null);case 4:return ei(),sv(e,t),e===null&&Ss(t.stateNode.containerInfo),Ye(t),null;case 10:return Sy(t.type._context),Ye(t),null;case 17:return ct(t.type)&&El(),Ye(t),null;case 19:if(_e(ke),i=t.memoizedState,i===null)return Ye(t),null;if(r=(t.flags&128)!==0,s=i.rendering,s===null)if(r)zi(i,!1);else{if(ze!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=Tl(e),s!==null){for(t.flags|=128,zi(i,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,s=i.alternate,s===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return we(ke,ke.current&1|2),t.child}e=e.sibling}i.tail!==null&&Ae()>ni&&(t.flags|=128,r=!0,zi(i,!1),t.lanes=4194304)}else{if(!r)if(e=Tl(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),zi(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Se)return Ye(t),null}else 2*Ae()-i.renderingStartTime>ni&&n!==1073741824&&(t.flags|=128,r=!0,zi(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Ae(),t.sibling=null,n=ke.current,we(ke,r?n&1|2:n&1),t):(Ye(t),null);case 22:case 23:return zy(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ht&1073741824&&(Ye(t),t.subtreeFlags&6&&(t.flags|=8192)):Ye(t),null;case 24:return null;case 25:return null}throw Error(W(156,t.tag))}function m4(e,t){switch(xy(t),t.tag){case 1:return ct(t.type)&&El(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ei(),_e(lt),_e(Xe),Ry(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ky(t),null;case 13:if(_e(ke),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(W(340));Zo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return _e(ke),null;case 4:return ei(),null;case 10:return Sy(t.type._context),null;case 22:case 23:return zy(),null;case 24:return null;default:return null}}var ka=!1,Ke=!1,g4=typeof WeakSet=="function"?WeakSet:Set,ee=null;function Lo(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){je(e,t,r)}else n.current=null}function av(e,t,n){try{n()}catch(r){je(e,t,r)}}var lw=!1;function v4(e,t){if(Vg=wl,e=u2(),vy(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,c=0,u=0,d=e,f=null;t:for(;;){for(var p;d!==n||o!==0&&d.nodeType!==3||(a=s+o),d!==i||r!==0&&d.nodeType!==3||(l=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++c===o&&(a=s),f===i&&++u===r&&(l=s),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Wg={focusedElem:e,selectionRange:n},wl=!1,ee=t;ee!==null;)if(t=ee,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ee=e;else for(;ee!==null;){t=ee;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var m=g.memoizedProps,_=g.memoizedState,v=t.stateNode,w=v.getSnapshotBeforeUpdate(t.elementType===t.type?m:Ot(t.type,m),_);v.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(W(163))}}catch(b){je(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,ee=e;break}ee=t.return}return g=lw,lw=!1,g}function cs(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&av(t,n,i)}o=o.next}while(o!==r)}}function Sc(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function lv(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function sk(e){var t=e.alternate;t!==null&&(e.alternate=null,sk(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[sn],delete t[Cs],delete t[Yg],delete t[JL],delete t[e4])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ak(e){return e.tag===5||e.tag===3||e.tag===4}function cw(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ak(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function cv(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Sl));else if(r!==4&&(e=e.child,e!==null))for(cv(e,t,n),e=e.sibling;e!==null;)cv(e,t,n),e=e.sibling}function uv(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(uv(e,t,n),e=e.sibling;e!==null;)uv(e,t,n),e=e.sibling}var He=null,Lt=!1;function Jn(e,t,n){for(n=n.child;n!==null;)lk(e,t,n),n=n.sibling}function lk(e,t,n){if(un&&typeof un.onCommitFiberUnmount=="function")try{un.onCommitFiberUnmount(mc,n)}catch{}switch(n.tag){case 5:Ke||Lo(n,t);case 6:var r=He,o=Lt;He=null,Jn(e,t,n),He=r,Lt=o,He!==null&&(Lt?(e=He,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):He.removeChild(n.stateNode));break;case 18:He!==null&&(Lt?(e=He,n=n.stateNode,e.nodeType===8?Yu(e.parentNode,n):e.nodeType===1&&Yu(e,n),ws(e)):Yu(He,n.stateNode));break;case 4:r=He,o=Lt,He=n.stateNode.containerInfo,Lt=!0,Jn(e,t,n),He=r,Lt=o;break;case 0:case 11:case 14:case 15:if(!Ke&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&av(n,t,s),o=o.next}while(o!==r)}Jn(e,t,n);break;case 1:if(!Ke&&(Lo(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){je(n,t,a)}Jn(e,t,n);break;case 21:Jn(e,t,n);break;case 22:n.mode&1?(Ke=(r=Ke)||n.memoizedState!==null,Jn(e,t,n),Ke=r):Jn(e,t,n);break;default:Jn(e,t,n)}}function uw(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new g4),t.forEach(function(r){var o=N4.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Mt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,s=t,a=s;e:for(;a!==null;){switch(a.tag){case 5:He=a.stateNode,Lt=!1;break e;case 3:He=a.stateNode.containerInfo,Lt=!0;break e;case 4:He=a.stateNode.containerInfo,Lt=!0;break e}a=a.return}if(He===null)throw Error(W(160));lk(i,s,o),He=null,Lt=!1;var l=o.alternate;l!==null&&(l.return=null),o.return=null}catch(c){je(o,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)ck(t,e),t=t.sibling}function ck(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Mt(t,e),tn(e),r&4){try{cs(3,e,e.return),Sc(3,e)}catch(m){je(e,e.return,m)}try{cs(5,e,e.return)}catch(m){je(e,e.return,m)}}break;case 1:Mt(t,e),tn(e),r&512&&n!==null&&Lo(n,n.return);break;case 5:if(Mt(t,e),tn(e),r&512&&n!==null&&Lo(n,n.return),e.flags&32){var o=e.stateNode;try{gs(o,"")}catch(m){je(e,e.return,m)}}if(r&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,s=n!==null?n.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&TN(o,i),Ig(a,s);var c=Ig(a,i);for(s=0;s<l.length;s+=2){var u=l[s],d=l[s+1];u==="style"?LN(o,d):u==="dangerouslySetInnerHTML"?IN(o,d):u==="children"?gs(o,d):oy(o,u,d,c)}switch(a){case"input":Pg(o,i);break;case"textarea":AN(o,i);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var p=i.value;p!=null?Fo(o,!!i.multiple,p,!1):f!==!!i.multiple&&(i.defaultValue!=null?Fo(o,!!i.multiple,i.defaultValue,!0):Fo(o,!!i.multiple,i.multiple?[]:"",!1))}o[Cs]=i}catch(m){je(e,e.return,m)}}break;case 6:if(Mt(t,e),tn(e),r&4){if(e.stateNode===null)throw Error(W(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(m){je(e,e.return,m)}}break;case 3:if(Mt(t,e),tn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ws(t.containerInfo)}catch(m){je(e,e.return,m)}break;case 4:Mt(t,e),tn(e);break;case 13:Mt(t,e),tn(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(Dy=Ae())),r&4&&uw(e);break;case 22:if(u=n!==null&&n.memoizedState!==null,e.mode&1?(Ke=(c=Ke)||u,Mt(t,e),Ke=c):Mt(t,e),tn(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!u&&e.mode&1)for(ee=e,u=e.child;u!==null;){for(d=ee=u;ee!==null;){switch(f=ee,p=f.child,f.tag){case 0:case 11:case 14:case 15:cs(4,f,f.return);break;case 1:Lo(f,f.return);var g=f.stateNode;if(typeof g.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(m){je(r,n,m)}}break;case 5:Lo(f,f.return);break;case 22:if(f.memoizedState!==null){fw(d);continue}}p!==null?(p.return=f,ee=p):fw(d)}u=u.sibling}e:for(u=null,d=e;;){if(d.tag===5){if(u===null){u=d;try{o=d.stateNode,c?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=d.stateNode,l=d.memoizedProps.style,s=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=ON("display",s))}catch(m){je(e,e.return,m)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(m){je(e,e.return,m)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Mt(t,e),tn(e),r&4&&uw(e);break;case 21:break;default:Mt(t,e),tn(e)}}function tn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(ak(n)){var r=n;break e}n=n.return}throw Error(W(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(gs(o,""),r.flags&=-33);var i=cw(e);uv(e,i,o);break;case 3:case 4:var s=r.stateNode.containerInfo,a=cw(e);cv(e,a,s);break;default:throw Error(W(161))}}catch(l){je(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function y4(e,t,n){ee=e,uk(e)}function uk(e,t,n){for(var r=(e.mode&1)!==0;ee!==null;){var o=ee,i=o.child;if(o.tag===22&&r){var s=o.memoizedState!==null||ka;if(!s){var a=o.alternate,l=a!==null&&a.memoizedState!==null||Ke;a=ka;var c=Ke;if(ka=s,(Ke=l)&&!c)for(ee=o;ee!==null;)s=ee,l=s.child,s.tag===22&&s.memoizedState!==null?hw(o):l!==null?(l.return=s,ee=l):hw(o);for(;i!==null;)ee=i,uk(i),i=i.sibling;ee=o,ka=a,Ke=c}dw(e)}else o.subtreeFlags&8772&&i!==null?(i.return=o,ee=i):dw(e)}}function dw(e){for(;ee!==null;){var t=ee;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ke||Sc(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ke)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:Ot(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Kx(t,i,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Kx(t,s,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var d=u.dehydrated;d!==null&&ws(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(W(163))}Ke||t.flags&512&&lv(t)}catch(f){je(t,t.return,f)}}if(t===e){ee=null;break}if(n=t.sibling,n!==null){n.return=t.return,ee=n;break}ee=t.return}}function fw(e){for(;ee!==null;){var t=ee;if(t===e){ee=null;break}var n=t.sibling;if(n!==null){n.return=t.return,ee=n;break}ee=t.return}}function hw(e){for(;ee!==null;){var t=ee;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Sc(4,t)}catch(l){je(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(l){je(t,o,l)}}var i=t.return;try{lv(t)}catch(l){je(t,i,l)}break;case 5:var s=t.return;try{lv(t)}catch(l){je(t,s,l)}}}catch(l){je(t,t.return,l)}if(t===e){ee=null;break}var a=t.sibling;if(a!==null){a.return=t.return,ee=a;break}ee=t.return}}var x4=Math.ceil,Il=Un.ReactCurrentDispatcher,Oy=Un.ReactCurrentOwner,kt=Un.ReactCurrentBatchConfig,ge=0,qe=null,Ie=null,Ve=0,ht=0,Do=jr(0),ze=0,Ts=null,Jr=0,Ec=0,Ly=0,us=null,nt=null,Dy=0,ni=1/0,Rn=null,Ol=!1,dv=null,yr=null,Ra=!1,fr=null,Ll=0,ds=0,fv=null,ol=-1,il=0;function Ze(){return ge&6?Ae():ol!==-1?ol:ol=Ae()}function xr(e){return e.mode&1?ge&2&&Ve!==0?Ve&-Ve:n4.transition!==null?(il===0&&(il=YN()),il):(e=xe,e!==0||(e=window.event,e=e===void 0?16:t2(e.type)),e):1}function Vt(e,t,n,r){if(50<ds)throw ds=0,fv=null,Error(W(185));Ws(e,n,r),(!(ge&2)||e!==qe)&&(e===qe&&(!(ge&2)&&(Ec|=n),ze===4&&lr(e,Ve)),ut(e,r),n===1&&ge===0&&!(t.mode&1)&&(ni=Ae()+500,wc&&Tr()))}function ut(e,t){var n=e.callbackNode;nL(e,t);var r=xl(e,e===qe?Ve:0);if(r===0)n!==null&&_x(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&_x(n),t===1)e.tag===0?t4(pw.bind(null,e)):w2(pw.bind(null,e)),QL(function(){!(ge&6)&&Tr()}),n=null;else{switch(KN(r)){case 1:n=cy;break;case 4:n=UN;break;case 16:n=yl;break;case 536870912:n=GN;break;default:n=yl}n=yk(n,dk.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function dk(e,t){if(ol=-1,il=0,ge&6)throw Error(W(327));var n=e.callbackNode;if(Wo()&&e.callbackNode!==n)return null;var r=xl(e,e===qe?Ve:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Dl(e,r);else{t=r;var o=ge;ge|=2;var i=hk();(qe!==e||Ve!==t)&&(Rn=null,ni=Ae()+500,Wr(e,t));do try{_4();break}catch(a){fk(e,a)}while(!0);_y(),Il.current=i,ge=o,Ie!==null?t=0:(qe=null,Ve=0,t=ze)}if(t!==0){if(t===2&&(o=zg(e),o!==0&&(r=o,t=hv(e,o))),t===1)throw n=Ts,Wr(e,0),lr(e,r),ut(e,Ae()),n;if(t===6)lr(e,r);else{if(o=e.current.alternate,!(r&30)&&!w4(o)&&(t=Dl(e,r),t===2&&(i=zg(e),i!==0&&(r=i,t=hv(e,i))),t===1))throw n=Ts,Wr(e,0),lr(e,r),ut(e,Ae()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(W(345));case 2:$r(e,nt,Rn);break;case 3:if(lr(e,r),(r&130023424)===r&&(t=Dy+500-Ae(),10<t)){if(xl(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Ze(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Gg($r.bind(null,e,nt,Rn),t);break}$r(e,nt,Rn);break;case 4:if(lr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-Ht(r);i=1<<s,s=t[s],s>o&&(o=s),r&=~i}if(r=o,r=Ae()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*x4(r/1960))-r,10<r){e.timeoutHandle=Gg($r.bind(null,e,nt,Rn),r);break}$r(e,nt,Rn);break;case 5:$r(e,nt,Rn);break;default:throw Error(W(329))}}}return ut(e,Ae()),e.callbackNode===n?dk.bind(null,e):null}function hv(e,t){var n=us;return e.current.memoizedState.isDehydrated&&(Wr(e,t).flags|=256),e=Dl(e,t),e!==2&&(t=nt,nt=n,t!==null&&pv(t)),e}function pv(e){nt===null?nt=e:nt.push.apply(nt,e)}function w4(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!Wt(i(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function lr(e,t){for(t&=~Ly,t&=~Ec,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ht(t),r=1<<n;e[n]=-1,t&=~r}}function pw(e){if(ge&6)throw Error(W(327));Wo();var t=xl(e,0);if(!(t&1))return ut(e,Ae()),null;var n=Dl(e,t);if(e.tag!==0&&n===2){var r=zg(e);r!==0&&(t=r,n=hv(e,r))}if(n===1)throw n=Ts,Wr(e,0),lr(e,t),ut(e,Ae()),n;if(n===6)throw Error(W(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,$r(e,nt,Rn),ut(e,Ae()),null}function $y(e,t){var n=ge;ge|=1;try{return e(t)}finally{ge=n,ge===0&&(ni=Ae()+500,wc&&Tr())}}function eo(e){fr!==null&&fr.tag===0&&!(ge&6)&&Wo();var t=ge;ge|=1;var n=kt.transition,r=xe;try{if(kt.transition=null,xe=1,e)return e()}finally{xe=r,kt.transition=n,ge=t,!(ge&6)&&Tr()}}function zy(){ht=Do.current,_e(Do)}function Wr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,XL(n)),Ie!==null)for(n=Ie.return;n!==null;){var r=n;switch(xy(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&El();break;case 3:ei(),_e(lt),_e(Xe),Ry();break;case 5:ky(r);break;case 4:ei();break;case 13:_e(ke);break;case 19:_e(ke);break;case 10:Sy(r.type._context);break;case 22:case 23:zy()}n=n.return}if(qe=e,Ie=e=wr(e.current,null),Ve=ht=t,ze=0,Ts=null,Ly=Ec=Jr=0,nt=us=null,qr!==null){for(t=0;t<qr.length;t++)if(n=qr[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,i=n.pending;if(i!==null){var s=i.next;i.next=o,r.next=s}n.pending=r}qr=null}return e}function fk(e,t){do{var n=Ie;try{if(_y(),tl.current=Ml,Al){for(var r=Re.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Al=!1}if(Zr=0,Fe=$e=Re=null,ls=!1,Rs=0,Oy.current=null,n===null||n.return===null){ze=1,Ts=t,Ie=null;break}e:{var i=e,s=n.return,a=n,l=t;if(t=Ve,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,d=u.tag;if(!(u.mode&1)&&(d===0||d===11||d===15)){var f=u.alternate;f?(u.updateQueue=f.updateQueue,u.memoizedState=f.memoizedState,u.lanes=f.lanes):(u.updateQueue=null,u.memoizedState=null)}var p=tw(s);if(p!==null){p.flags&=-257,nw(p,s,a,i,t),p.mode&1&&ew(i,c,t),t=p,l=c;var g=t.updateQueue;if(g===null){var m=new Set;m.add(l),t.updateQueue=m}else g.add(l);break e}else{if(!(t&1)){ew(i,c,t),Fy();break e}l=Error(W(426))}}else if(Se&&a.mode&1){var _=tw(s);if(_!==null){!(_.flags&65536)&&(_.flags|=256),nw(_,s,a,i,t),wy(ti(l,a));break e}}i=l=ti(l,a),ze!==4&&(ze=2),us===null?us=[i]:us.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var v=K2(i,l,t);Yx(i,v);break e;case 1:a=l;var w=i.type,x=i.stateNode;if(!(i.flags&128)&&(typeof w.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(yr===null||!yr.has(x)))){i.flags|=65536,t&=-t,i.lanes|=t;var b=X2(i,a,t);Yx(i,b);break e}}i=i.return}while(i!==null)}mk(n)}catch(S){t=S,Ie===n&&n!==null&&(Ie=n=n.return);continue}break}while(!0)}function hk(){var e=Il.current;return Il.current=Ml,e===null?Ml:e}function Fy(){(ze===0||ze===3||ze===2)&&(ze=4),qe===null||!(Jr&268435455)&&!(Ec&268435455)||lr(qe,Ve)}function Dl(e,t){var n=ge;ge|=2;var r=hk();(qe!==e||Ve!==t)&&(Rn=null,Wr(e,t));do try{b4();break}catch(o){fk(e,o)}while(!0);if(_y(),ge=n,Il.current=r,Ie!==null)throw Error(W(261));return qe=null,Ve=0,ze}function b4(){for(;Ie!==null;)pk(Ie)}function _4(){for(;Ie!==null&&!GO();)pk(Ie)}function pk(e){var t=vk(e.alternate,e,ht);e.memoizedProps=e.pendingProps,t===null?mk(e):Ie=t,Oy.current=null}function mk(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=m4(n,t),n!==null){n.flags&=32767,Ie=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ze=6,Ie=null;return}}else if(n=p4(n,t,ht),n!==null){Ie=n;return}if(t=t.sibling,t!==null){Ie=t;return}Ie=t=e}while(t!==null);ze===0&&(ze=5)}function $r(e,t,n){var r=xe,o=kt.transition;try{kt.transition=null,xe=1,S4(e,t,n,r)}finally{kt.transition=o,xe=r}return null}function S4(e,t,n,r){do Wo();while(fr!==null);if(ge&6)throw Error(W(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(W(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(rL(e,i),e===qe&&(Ie=qe=null,Ve=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ra||(Ra=!0,yk(yl,function(){return Wo(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=kt.transition,kt.transition=null;var s=xe;xe=1;var a=ge;ge|=4,Oy.current=null,v4(e,n),ck(n,e),HL(Wg),wl=!!Vg,Wg=Vg=null,e.current=n,y4(n),YO(),ge=a,xe=s,kt.transition=i}else e.current=n;if(Ra&&(Ra=!1,fr=e,Ll=o),i=e.pendingLanes,i===0&&(yr=null),QO(n.stateNode),ut(e,Ae()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Ol)throw Ol=!1,e=dv,dv=null,e;return Ll&1&&e.tag!==0&&Wo(),i=e.pendingLanes,i&1?e===fv?ds++:(ds=0,fv=e):ds=0,Tr(),null}function Wo(){if(fr!==null){var e=KN(Ll),t=kt.transition,n=xe;try{if(kt.transition=null,xe=16>e?16:e,fr===null)var r=!1;else{if(e=fr,fr=null,Ll=0,ge&6)throw Error(W(331));var o=ge;for(ge|=4,ee=e.current;ee!==null;){var i=ee,s=i.child;if(ee.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(ee=c;ee!==null;){var u=ee;switch(u.tag){case 0:case 11:case 15:cs(8,u,i)}var d=u.child;if(d!==null)d.return=u,ee=d;else for(;ee!==null;){u=ee;var f=u.sibling,p=u.return;if(sk(u),u===c){ee=null;break}if(f!==null){f.return=p,ee=f;break}ee=p}}}var g=i.alternate;if(g!==null){var m=g.child;if(m!==null){g.child=null;do{var _=m.sibling;m.sibling=null,m=_}while(m!==null)}}ee=i}}if(i.subtreeFlags&2064&&s!==null)s.return=i,ee=s;else e:for(;ee!==null;){if(i=ee,i.flags&2048)switch(i.tag){case 0:case 11:case 15:cs(9,i,i.return)}var v=i.sibling;if(v!==null){v.return=i.return,ee=v;break e}ee=i.return}}var w=e.current;for(ee=w;ee!==null;){s=ee;var x=s.child;if(s.subtreeFlags&2064&&x!==null)x.return=s,ee=x;else e:for(s=w;ee!==null;){if(a=ee,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Sc(9,a)}}catch(S){je(a,a.return,S)}if(a===s){ee=null;break e}var b=a.sibling;if(b!==null){b.return=a.return,ee=b;break e}ee=a.return}}if(ge=o,Tr(),un&&typeof un.onPostCommitFiberRoot=="function")try{un.onPostCommitFiberRoot(mc,e)}catch{}r=!0}return r}finally{xe=n,kt.transition=t}}return!1}function mw(e,t,n){t=ti(n,t),t=K2(e,t,1),e=vr(e,t,1),t=Ze(),e!==null&&(Ws(e,1,t),ut(e,t))}function je(e,t,n){if(e.tag===3)mw(e,e,n);else for(;t!==null;){if(t.tag===3){mw(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(yr===null||!yr.has(r))){e=ti(n,e),e=X2(t,e,1),t=vr(t,e,1),e=Ze(),t!==null&&(Ws(t,1,e),ut(t,e));break}}t=t.return}}function E4(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ze(),e.pingedLanes|=e.suspendedLanes&n,qe===e&&(Ve&n)===n&&(ze===4||ze===3&&(Ve&130023424)===Ve&&500>Ae()-Dy?Wr(e,0):Ly|=n),ut(e,t)}function gk(e,t){t===0&&(e.mode&1?(t=ya,ya<<=1,!(ya&130023424)&&(ya=4194304)):t=1);var n=Ze();e=Fn(e,t),e!==null&&(Ws(e,t,n),ut(e,n))}function C4(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),gk(e,n)}function N4(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(W(314))}r!==null&&r.delete(t),gk(e,n)}var vk;vk=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||lt.current)st=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return st=!1,h4(e,t,n);st=!!(e.flags&131072)}else st=!1,Se&&t.flags&1048576&&b2(t,kl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;rl(e,t),e=t.pendingProps;var o=Qo(t,Xe.current);Vo(t,n),o=jy(null,t,r,e,o,n);var i=Ty();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ct(r)?(i=!0,Cl(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Cy(t),o.updater=_c,t.stateNode=o,o._reactInternals=t,ev(t,r,e,n),t=rv(null,t,r,!0,i,n)):(t.tag=0,Se&&i&&yy(t),Qe(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(rl(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=R4(r),e=Ot(r,e),o){case 0:t=nv(null,t,r,e,n);break e;case 1:t=iw(null,t,r,e,n);break e;case 11:t=rw(null,t,r,e,n);break e;case 14:t=ow(null,t,r,Ot(r.type,e),n);break e}throw Error(W(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ot(r,o),nv(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ot(r,o),iw(e,t,r,o,n);case 3:e:{if(ek(t),e===null)throw Error(W(387));r=t.pendingProps,i=t.memoizedState,o=i.element,k2(e,t),jl(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=ti(Error(W(423)),t),t=sw(e,t,r,n,o);break e}else if(r!==o){o=ti(Error(W(424)),t),t=sw(e,t,r,n,o);break e}else for(vt=gr(t.stateNode.containerInfo.firstChild),yt=t,Se=!0,$t=null,n=C2(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Zo(),r===o){t=qn(e,t,n);break e}Qe(e,t,r,n)}t=t.child}return t;case 5:return R2(t),e===null&&Qg(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Ug(r,o)?s=null:i!==null&&Ug(r,i)&&(t.flags|=32),J2(e,t),Qe(e,t,s,n),t.child;case 6:return e===null&&Qg(t),null;case 13:return tk(e,t,n);case 4:return Ny(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Jo(t,null,r,n):Qe(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ot(r,o),rw(e,t,r,o,n);case 7:return Qe(e,t,t.pendingProps,n),t.child;case 8:return Qe(e,t,t.pendingProps.children,n),t.child;case 12:return Qe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,we(Rl,r._currentValue),r._currentValue=s,i!==null)if(Wt(i.value,s)){if(i.children===o.children&&!lt.current){t=qn(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=On(-1,n&-n),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Zg(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(W(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Zg(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}Qe(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Vo(t,n),o=Rt(o),r=r(o),t.flags|=1,Qe(e,t,r,n),t.child;case 14:return r=t.type,o=Ot(r,t.pendingProps),o=Ot(r.type,o),ow(e,t,r,o,n);case 15:return Q2(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ot(r,o),rl(e,t),t.tag=1,ct(r)?(e=!0,Cl(t)):e=!1,Vo(t,n),Y2(t,r,o),ev(t,r,o,n),rv(null,t,r,!0,e,n);case 19:return nk(e,t,n);case 22:return Z2(e,t,n)}throw Error(W(156,t.tag))};function yk(e,t){return WN(e,t)}function k4(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Nt(e,t,n,r){return new k4(e,t,n,r)}function qy(e){return e=e.prototype,!(!e||!e.isReactComponent)}function R4(e){if(typeof e=="function")return qy(e)?1:0;if(e!=null){if(e=e.$$typeof,e===sy)return 11;if(e===ay)return 14}return 2}function wr(e,t){var n=e.alternate;return n===null?(n=Nt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function sl(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")qy(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case ko:return Ur(n.children,o,i,t);case iy:s=8,o|=8;break;case Eg:return e=Nt(12,n,t,o|2),e.elementType=Eg,e.lanes=i,e;case Cg:return e=Nt(13,n,t,o),e.elementType=Cg,e.lanes=i,e;case Ng:return e=Nt(19,n,t,o),e.elementType=Ng,e.lanes=i,e;case RN:return Cc(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case NN:s=10;break e;case kN:s=9;break e;case sy:s=11;break e;case ay:s=14;break e;case ir:s=16,r=null;break e}throw Error(W(130,e==null?e:typeof e,""))}return t=Nt(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Ur(e,t,n,r){return e=Nt(7,e,r,t),e.lanes=n,e}function Cc(e,t,n,r){return e=Nt(22,e,r,t),e.elementType=RN,e.lanes=n,e.stateNode={isHidden:!1},e}function nd(e,t,n){return e=Nt(6,e,null,t),e.lanes=n,e}function rd(e,t,n){return t=Nt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function P4(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Du(0),this.expirationTimes=Du(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Du(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function By(e,t,n,r,o,i,s,a,l){return e=new P4(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Nt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Cy(i),e}function j4(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:No,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function xk(e){if(!e)return Er;e=e._reactInternals;e:{if(uo(e)!==e||e.tag!==1)throw Error(W(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ct(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(W(171))}if(e.tag===1){var n=e.type;if(ct(n))return x2(e,n,t)}return t}function wk(e,t,n,r,o,i,s,a,l){return e=By(n,r,!0,e,o,i,s,a,l),e.context=xk(null),n=e.current,r=Ze(),o=xr(n),i=On(r,o),i.callback=t??null,vr(n,i,o),e.current.lanes=o,Ws(e,o,r),ut(e,r),e}function Nc(e,t,n,r){var o=t.current,i=Ze(),s=xr(o);return n=xk(n),t.context===null?t.context=n:t.pendingContext=n,t=On(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=vr(o,t,s),e!==null&&(Vt(e,o,s,i),el(e,o,s)),s}function $l(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function gw(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Hy(e,t){gw(e,t),(e=e.alternate)&&gw(e,t)}function T4(){return null}var bk=typeof reportError=="function"?reportError:function(e){console.error(e)};function Vy(e){this._internalRoot=e}kc.prototype.render=Vy.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(W(409));Nc(e,t,null,null)};kc.prototype.unmount=Vy.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;eo(function(){Nc(null,e,null,null)}),t[zn]=null}};function kc(e){this._internalRoot=e}kc.prototype.unstable_scheduleHydration=function(e){if(e){var t=ZN();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ar.length&&t!==0&&t<ar[n].priority;n++);ar.splice(n,0,e),n===0&&e2(e)}};function Wy(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Rc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function vw(){}function A4(e,t,n,r,o){if(o){if(typeof r=="function"){var i=r;r=function(){var c=$l(s);i.call(c)}}var s=wk(t,r,e,0,null,!1,!1,"",vw);return e._reactRootContainer=s,e[zn]=s.current,Ss(e.nodeType===8?e.parentNode:e),eo(),s}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var a=r;r=function(){var c=$l(l);a.call(c)}}var l=By(e,0,!1,null,null,!1,!1,"",vw);return e._reactRootContainer=l,e[zn]=l.current,Ss(e.nodeType===8?e.parentNode:e),eo(function(){Nc(t,l,n,r)}),l}function Pc(e,t,n,r,o){var i=n._reactRootContainer;if(i){var s=i;if(typeof o=="function"){var a=o;o=function(){var l=$l(s);a.call(l)}}Nc(t,s,e,o)}else s=A4(n,t,e,o,r);return $l(s)}XN=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Ui(t.pendingLanes);n!==0&&(uy(t,n|1),ut(t,Ae()),!(ge&6)&&(ni=Ae()+500,Tr()))}break;case 13:eo(function(){var r=Fn(e,1);if(r!==null){var o=Ze();Vt(r,e,1,o)}}),Hy(e,1)}};dy=function(e){if(e.tag===13){var t=Fn(e,134217728);if(t!==null){var n=Ze();Vt(t,e,134217728,n)}Hy(e,134217728)}};QN=function(e){if(e.tag===13){var t=xr(e),n=Fn(e,t);if(n!==null){var r=Ze();Vt(n,e,t,r)}Hy(e,t)}};ZN=function(){return xe};JN=function(e,t){var n=xe;try{return xe=e,t()}finally{xe=n}};Lg=function(e,t,n){switch(t){case"input":if(Pg(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=xc(r);if(!o)throw Error(W(90));jN(r),Pg(r,o)}}}break;case"textarea":AN(e,n);break;case"select":t=n.value,t!=null&&Fo(e,!!n.multiple,t,!1)}};zN=$y;FN=eo;var M4={usingClientEntryPoint:!1,Events:[Gs,To,xc,DN,$N,$y]},Fi={findFiberByHostInstance:Fr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},I4={bundleType:Fi.bundleType,version:Fi.version,rendererPackageName:Fi.rendererPackageName,rendererConfig:Fi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Un.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=HN(e),e===null?null:e.stateNode},findFiberByHostInstance:Fi.findFiberByHostInstance||T4,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 Pa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pa.isDisabled&&Pa.supportsFiber)try{mc=Pa.inject(I4),un=Pa}catch{}}_t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=M4;_t.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Wy(t))throw Error(W(200));return j4(e,t,null,n)};_t.createRoot=function(e,t){if(!Wy(e))throw Error(W(299));var n=!1,r="",o=bk;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=By(e,1,!1,null,null,n,!1,r,o),e[zn]=t.current,Ss(e.nodeType===8?e.parentNode:e),new Vy(t)};_t.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(W(188)):(e=Object.keys(e).join(","),Error(W(268,e)));return e=HN(t),e=e===null?null:e.stateNode,e};_t.flushSync=function(e){return eo(e)};_t.hydrate=function(e,t,n){if(!Rc(t))throw Error(W(200));return Pc(null,e,t,!0,n)};_t.hydrateRoot=function(e,t,n){if(!Wy(e))throw Error(W(405));var r=n!=null&&n.hydratedSources||null,o=!1,i="",s=bk;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=wk(t,null,e,1,n??null,o,!1,i,s),e[zn]=t.current,Ss(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new kc(t)};_t.render=function(e,t,n){if(!Rc(t))throw Error(W(200));return Pc(null,e,t,!1,n)};_t.unmountComponentAtNode=function(e){if(!Rc(e))throw Error(W(40));return e._reactRootContainer?(eo(function(){Pc(null,null,e,!1,function(){e._reactRootContainer=null,e[zn]=null})}),!0):!1};_t.unstable_batchedUpdates=$y;_t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Rc(n))throw Error(W(200));if(e==null||e._reactInternals===void 0)throw Error(W(38));return Pc(e,t,n,!1,r)};_t.version="18.3.1-next-f1338f8080-20240426";function _k(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(_k)}catch(e){console.error(e)}}_k(),_N.exports=_t;var xi=_N.exports;const O4=hc(xi);var yw=xi;_g.createRoot=yw.createRoot,_g.hydrateRoot=yw.hydrateRoot;/**
|
|
41
|
+
* @license lucide-react v0.563.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 Sk=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
|
46
|
+
* @license lucide-react v0.563.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
|
+
*/const L4=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
51
|
+
* @license lucide-react v0.563.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 D4=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());/**
|
|
56
|
+
* @license lucide-react v0.563.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 xw=e=>{const t=D4(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
|
|
61
|
+
* @license lucide-react v0.563.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
|
+
*/var $4={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"};/**
|
|
66
|
+
* @license lucide-react v0.563.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 z4=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
|
|
71
|
+
* @license lucide-react v0.563.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 F4=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...a},l)=>y.createElement("svg",{ref:l,...$4,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Sk("lucide",o),...!i&&!z4(a)&&{"aria-hidden":"true"},...a},[...s.map(([c,u])=>y.createElement(c,u)),...Array.isArray(i)?i:[i]]));/**
|
|
76
|
+
* @license lucide-react v0.563.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 fe=(e,t)=>{const n=y.forwardRef(({className:r,...o},i)=>y.createElement(F4,{ref:i,iconNode:t,className:Sk(`lucide-${L4(xw(e))}`,`lucide-${e}`,r),...o}));return n.displayName=xw(e),n};/**
|
|
81
|
+
* @license lucide-react v0.563.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 q4=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],B4=fe("activity",q4);/**
|
|
86
|
+
* @license lucide-react v0.563.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 H4=[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"m21 8-4-4-4 4",key:"1c9v7m"}],["path",{d:"M17 4v16",key:"7dpous"}]],Ek=fe("arrow-down-up",H4);/**
|
|
91
|
+
* @license lucide-react v0.563.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 V4=[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]],Ck=fe("arrow-left-right",V4);/**
|
|
96
|
+
* @license lucide-react v0.563.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 W4=[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]],U4=fe("arrow-right-left",W4);/**
|
|
101
|
+
* @license lucide-react v0.563.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 G4=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Y4=fe("arrow-right",G4);/**
|
|
106
|
+
* @license lucide-react v0.563.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 K4=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],mv=fe("brain",K4);/**
|
|
111
|
+
* @license lucide-react v0.563.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 X4=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],Q4=fe("chart-column",X4);/**
|
|
116
|
+
* @license lucide-react v0.563.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 Z4=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Nk=fe("check",Z4);/**
|
|
121
|
+
* @license lucide-react v0.563.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 J4=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],wi=fe("chevron-down",J4);/**
|
|
126
|
+
* @license lucide-react v0.563.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 eD=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],tD=fe("chevron-right",eD);/**
|
|
131
|
+
* @license lucide-react v0.563.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 nD=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],jc=fe("chevron-up",nD);/**
|
|
136
|
+
* @license lucide-react v0.563.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 rD=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],kk=fe("circle-check",rD);/**
|
|
141
|
+
* @license lucide-react v0.563.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 oD=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],iD=fe("circle-x",oD);/**
|
|
146
|
+
* @license lucide-react v0.563.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 sD=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],aD=fe("circle",sD);/**
|
|
151
|
+
* @license lucide-react v0.563.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 lD=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Rk=fe("clock",lD);/**
|
|
156
|
+
* @license lucide-react v0.563.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 cD=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],uD=fe("code-xml",cD);/**
|
|
161
|
+
* @license lucide-react v0.563.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 dD=[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]],fD=fe("file-code-corner",dD);/**
|
|
166
|
+
* @license lucide-react v0.563.0 - ISC
|
|
167
|
+
*
|
|
168
|
+
* This source code is licensed under the ISC license.
|
|
169
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
+
*/const hD=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],pD=fe("file-code",hD);/**
|
|
171
|
+
* @license lucide-react v0.563.0 - ISC
|
|
172
|
+
*
|
|
173
|
+
* This source code is licensed under the ISC license.
|
|
174
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
175
|
+
*/const mD=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],gD=fe("file-exclamation-point",mD);/**
|
|
176
|
+
* @license lucide-react v0.563.0 - ISC
|
|
177
|
+
*
|
|
178
|
+
* This source code is licensed under the ISC license.
|
|
179
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
180
|
+
*/const vD=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]],yD=fe("file-plus",vD);/**
|
|
181
|
+
* @license lucide-react v0.563.0 - ISC
|
|
182
|
+
*
|
|
183
|
+
* This source code is licensed under the ISC license.
|
|
184
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
185
|
+
*/const xD=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],wD=fe("file-text",xD);/**
|
|
186
|
+
* @license lucide-react v0.563.0 - ISC
|
|
187
|
+
*
|
|
188
|
+
* This source code is licensed under the ISC license.
|
|
189
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
190
|
+
*/const bD=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m14.5 12.5-5 5",key:"b62r18"}],["path",{d:"m9.5 12.5 5 5",key:"1rk7el"}]],_D=fe("file-x",bD);/**
|
|
191
|
+
* @license lucide-react v0.563.0 - ISC
|
|
192
|
+
*
|
|
193
|
+
* This source code is licensed under the ISC license.
|
|
194
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
195
|
+
*/const SD=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],ED=fe("file",SD);/**
|
|
196
|
+
* @license lucide-react v0.563.0 - ISC
|
|
197
|
+
*
|
|
198
|
+
* This source code is licensed under the ISC license.
|
|
199
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
+
*/const CD=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],zl=fe("folder-open",CD);/**
|
|
201
|
+
* @license lucide-react v0.563.0 - ISC
|
|
202
|
+
*
|
|
203
|
+
* This source code is licensed under the ISC license.
|
|
204
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
205
|
+
*/const ND=[["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"}]],kD=fe("folder-tree",ND);/**
|
|
206
|
+
* @license lucide-react v0.563.0 - ISC
|
|
207
|
+
*
|
|
208
|
+
* This source code is licensed under the ISC license.
|
|
209
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
210
|
+
*/const RD=[["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"}]],PD=fe("folder",RD);/**
|
|
211
|
+
* @license lucide-react v0.563.0 - ISC
|
|
212
|
+
*
|
|
213
|
+
* This source code is licensed under the ISC license.
|
|
214
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
215
|
+
*/const jD=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],TD=fe("funnel",jD);/**
|
|
216
|
+
* @license lucide-react v0.563.0 - ISC
|
|
217
|
+
*
|
|
218
|
+
* This source code is licensed under the ISC license.
|
|
219
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
220
|
+
*/const AD=[["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"}]],Pk=fe("git-branch",AD);/**
|
|
221
|
+
* @license lucide-react v0.563.0 - ISC
|
|
222
|
+
*
|
|
223
|
+
* This source code is licensed under the ISC license.
|
|
224
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
225
|
+
*/const MD=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],ww=fe("link-2",MD);/**
|
|
226
|
+
* @license lucide-react v0.563.0 - ISC
|
|
227
|
+
*
|
|
228
|
+
* This source code is licensed under the ISC license.
|
|
229
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
230
|
+
*/const ID=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],OD=fe("maximize-2",ID);/**
|
|
231
|
+
* @license lucide-react v0.563.0 - ISC
|
|
232
|
+
*
|
|
233
|
+
* This source code is licensed under the ISC license.
|
|
234
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
235
|
+
*/const LD=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],DD=fe("minimize-2",LD);/**
|
|
236
|
+
* @license lucide-react v0.563.0 - ISC
|
|
237
|
+
*
|
|
238
|
+
* This source code is licensed under the ISC license.
|
|
239
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
240
|
+
*/const $D=[["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"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],zD=fe("package",$D);/**
|
|
241
|
+
* @license lucide-react v0.563.0 - ISC
|
|
242
|
+
*
|
|
243
|
+
* This source code is licensed under the ISC license.
|
|
244
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
245
|
+
*/const FD=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],qD=fe("panel-left",FD);/**
|
|
246
|
+
* @license lucide-react v0.563.0 - ISC
|
|
247
|
+
*
|
|
248
|
+
* This source code is licensed under the ISC license.
|
|
249
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
250
|
+
*/const BD=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],HD=fe("rotate-ccw",BD);/**
|
|
251
|
+
* @license lucide-react v0.563.0 - ISC
|
|
252
|
+
*
|
|
253
|
+
* This source code is licensed under the ISC license.
|
|
254
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
255
|
+
*/const VD=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],jk=fe("search",VD);/**
|
|
256
|
+
* @license lucide-react v0.563.0 - ISC
|
|
257
|
+
*
|
|
258
|
+
* This source code is licensed under the ISC license.
|
|
259
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
260
|
+
*/const WD=[["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"}]],Tk=fe("triangle-alert",WD);/**
|
|
261
|
+
* @license lucide-react v0.563.0 - ISC
|
|
262
|
+
*
|
|
263
|
+
* This source code is licensed under the ISC license.
|
|
264
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
265
|
+
*/const UD=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],gv=fe("upload",UD);/**
|
|
266
|
+
* @license lucide-react v0.563.0 - ISC
|
|
267
|
+
*
|
|
268
|
+
* This source code is licensed under the ISC license.
|
|
269
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
270
|
+
*/const GD=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Uy=fe("x",GD);function Ak(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ak(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Mk(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ak(e))&&(r&&(r+=" "),r+=t);return r}const YD=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},KD=(e,t)=>({classGroupId:e,validator:t}),Ik=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Fl="-",bw=[],XD="arbitrary..",QD=e=>{const t=JD(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return ZD(s);const a=s.split(Fl),l=a[0]===""&&a.length>1?1:0;return Ok(a,l,t)},getConflictingClassGroupIds:(s,a)=>{if(a){const l=r[s],c=n[s];return l?c?YD(c,l):l:c||bw}return n[s]||bw}}},Ok=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const c=Ok(e,t+1,i);if(c)return c}const s=n.validators;if(s===null)return;const a=t===0?e.join(Fl):e.slice(t).join(Fl),l=s.length;for(let c=0;c<l;c++){const u=s[c];if(u.validator(a))return u.classGroupId}},ZD=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?XD+r:void 0})(),JD=e=>{const{theme:t,classGroups:n}=e;return e3(n,t)},e3=(e,t)=>{const n=Ik();for(const r in e){const o=e[r];Gy(o,n,r,t)}return n},Gy=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];t3(s,t,n,r)}},t3=(e,t,n,r)=>{if(typeof e=="string"){n3(e,t,n);return}if(typeof e=="function"){r3(e,t,n,r);return}o3(e,t,n,r)},n3=(e,t,n)=>{const r=e===""?t:Lk(t,e);r.classGroupId=n},r3=(e,t,n,r)=>{if(i3(e)){Gy(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(KD(n,e))},o3=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,l]=o[s];Gy(l,Lk(t,a),n,r)}},Lk=(e,t)=>{let n=e;const r=t.split(Fl),o=r.length;for(let i=0;i<o;i++){const s=r[i];let a=n.nextPart.get(s);a||(a=Ik(),n.nextPart.set(s,a)),n=a}return n},i3=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,s3=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,s)=>{n[i]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let s=n[i];if(s!==void 0)return s;if((s=r[i])!==void 0)return o(i,s),s},set(i,s){i in n?n[i]=s:o(i,s)}}},vv="!",_w=":",a3=[],Sw=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),l3=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let s=0,a=0,l=0,c;const u=o.length;for(let m=0;m<u;m++){const _=o[m];if(s===0&&a===0){if(_===_w){i.push(o.slice(l,m)),l=m+1;continue}if(_==="/"){c=m;continue}}_==="["?s++:_==="]"?s--:_==="("?a++:_===")"&&a--}const d=i.length===0?o:o.slice(l);let f=d,p=!1;d.endsWith(vv)?(f=d.slice(0,-1),p=!0):d.startsWith(vv)&&(f=d.slice(1),p=!0);const g=c&&c>l?c-l:void 0;return Sw(i,p,f,g)};if(t){const o=t+_w,i=r;r=s=>s.startsWith(o)?i(s.slice(o.length)):Sw(a3,!1,s,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},c3=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const s=n[i],a=s[0]==="[",l=t.has(s);a||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},u3=e=>({cache:s3(e.cacheSize),parseClassName:l3(e),sortModifiers:c3(e),...QD(e)}),d3=/\s+/,f3=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,s=[],a=e.trim().split(d3);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{isExternal:d,modifiers:f,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:m}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let _=!!m,v=r(_?g.substring(0,m):g);if(!v){if(!_){l=u+(l.length>0?" "+l:l);continue}if(v=r(g),!v){l=u+(l.length>0?" "+l:l);continue}_=!1}const w=f.length===0?"":f.length===1?f[0]:i(f).join(":"),x=p?w+vv:w,b=x+v;if(s.indexOf(b)>-1)continue;s.push(b);const S=o(v,_);for(let E=0;E<S.length;++E){const C=S[E];s.push(x+C)}l=u+(l.length>0?" "+l:l)}return l},h3=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=Dk(n))&&(o&&(o+=" "),o+=r);return o},Dk=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Dk(e[r]))&&(n&&(n+=" "),n+=t);return n},p3=(e,...t)=>{let n,r,o,i;const s=l=>{const c=t.reduce((u,d)=>d(u),e());return n=u3(c),r=n.cache.get,o=n.cache.set,i=a,a(l)},a=l=>{const c=r(l);if(c)return c;const u=f3(l,n);return o(l,u),u};return i=s,(...l)=>i(h3(...l))},m3=[],De=e=>{const t=n=>n[e]||m3;return t.isThemeGetter=!0,t},$k=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,zk=/^\((?:(\w[\w-]*):)?(.+)\)$/i,g3=/^\d+\/\d+$/,v3=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,y3=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,x3=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,w3=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,b3=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,wo=e=>g3.test(e),ue=e=>!!e&&!Number.isNaN(Number(e)),er=e=>!!e&&Number.isInteger(Number(e)),od=e=>e.endsWith("%")&&ue(e.slice(0,-1)),Cn=e=>v3.test(e),_3=()=>!0,S3=e=>y3.test(e)&&!x3.test(e),Fk=()=>!1,E3=e=>w3.test(e),C3=e=>b3.test(e),N3=e=>!ne(e)&&!re(e),k3=e=>bi(e,Hk,Fk),ne=e=>$k.test(e),Or=e=>bi(e,Vk,S3),id=e=>bi(e,A3,ue),Ew=e=>bi(e,qk,Fk),R3=e=>bi(e,Bk,C3),ja=e=>bi(e,Wk,E3),re=e=>zk.test(e),qi=e=>_i(e,Vk),P3=e=>_i(e,M3),Cw=e=>_i(e,qk),j3=e=>_i(e,Hk),T3=e=>_i(e,Bk),Ta=e=>_i(e,Wk,!0),bi=(e,t,n)=>{const r=$k.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},_i=(e,t,n=!1)=>{const r=zk.exec(e);return r?r[1]?t(r[1]):n:!1},qk=e=>e==="position"||e==="percentage",Bk=e=>e==="image"||e==="url",Hk=e=>e==="length"||e==="size"||e==="bg-size",Vk=e=>e==="length",A3=e=>e==="number",M3=e=>e==="family-name",Wk=e=>e==="shadow",I3=()=>{const e=De("color"),t=De("font"),n=De("text"),r=De("font-weight"),o=De("tracking"),i=De("leading"),s=De("breakpoint"),a=De("container"),l=De("spacing"),c=De("radius"),u=De("shadow"),d=De("inset-shadow"),f=De("text-shadow"),p=De("drop-shadow"),g=De("blur"),m=De("perspective"),_=De("aspect"),v=De("ease"),w=De("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...b(),re,ne],E=()=>["auto","hidden","clip","visible","scroll"],C=()=>["auto","contain","none"],k=()=>[re,ne,l],T=()=>[wo,"full","auto",...k()],M=()=>[er,"none","subgrid",re,ne],P=()=>["auto",{span:["full",er,re,ne]},er,re,ne],I=()=>[er,"auto",re,ne],D=()=>["auto","min","max","fr",re,ne],R=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],O=()=>["start","end","center","stretch","center-safe","end-safe"],j=()=>["auto",...k()],L=()=>[wo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],N=()=>[e,re,ne],A=()=>[...b(),Cw,Ew,{position:[re,ne]}],$=()=>["no-repeat",{repeat:["","x","y","space","round"]}],z=()=>["auto","cover","contain",j3,k3,{size:[re,ne]}],F=()=>[od,qi,Or],V=()=>["","none","full",c,re,ne],H=()=>["",ue,qi,Or],X=()=>["solid","dashed","dotted","double"],Q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],q=()=>[ue,od,Cw,Ew],B=()=>["","none",g,re,ne],G=()=>["none",ue,re,ne],Z=()=>["none",ue,re,ne],Y=()=>[ue,re,ne],U=()=>[wo,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Cn],breakpoint:[Cn],color:[_3],container:[Cn],"drop-shadow":[Cn],ease:["in","out","in-out"],font:[N3],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Cn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Cn],shadow:[Cn],spacing:["px",ue],text:[Cn],"text-shadow":[Cn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",wo,ne,re,_]}],container:["container"],columns:[{columns:[ue,ne,re,a]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:S()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{start:T()}],end:[{end:T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:["visible","invisible","collapse"],z:[{z:[er,"auto",re,ne]}],basis:[{basis:[wo,"full","auto",a,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ue,wo,"auto","initial","none",ne]}],grow:[{grow:["",ue,re,ne]}],shrink:[{shrink:["",ue,re,ne]}],order:[{order:[er,"first","last","none",re,ne]}],"grid-cols":[{"grid-cols":M()}],"col-start-end":[{col:P()}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":M()}],"row-start-end":[{row:P()}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":D()}],"auto-rows":[{"auto-rows":D()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...R(),"normal"]}],"justify-items":[{"justify-items":[...O(),"normal"]}],"justify-self":[{"justify-self":["auto",...O()]}],"align-content":[{content:["normal",...R()]}],"align-items":[{items:[...O(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...O(),{baseline:["","last"]}]}],"place-content":[{"place-content":R()}],"place-items":[{"place-items":[...O(),"baseline"]}],"place-self":[{"place-self":["auto",...O()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:j()}],mx:[{mx:j()}],my:[{my:j()}],ms:[{ms:j()}],me:[{me:j()}],mt:[{mt:j()}],mr:[{mr:j()}],mb:[{mb:j()}],ml:[{ml:j()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:L()}],w:[{w:[a,"screen",...L()]}],"min-w":[{"min-w":[a,"screen","none",...L()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...L()]}],h:[{h:["screen","lh",...L()]}],"min-h":[{"min-h":["screen","lh","none",...L()]}],"max-h":[{"max-h":["screen","lh",...L()]}],"font-size":[{text:["base",n,qi,Or]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,re,id]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",od,ne]}],"font-family":[{font:[P3,ne,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,re,ne]}],"line-clamp":[{"line-clamp":[ue,"none",re,id]}],leading:[{leading:[i,...k()]}],"list-image":[{"list-image":["none",re,ne]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",re,ne]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...X(),"wavy"]}],"text-decoration-thickness":[{decoration:[ue,"from-font","auto",re,Or]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[ue,"auto",re,ne]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",re,ne]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",re,ne]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:A()}],"bg-repeat":[{bg:$()}],"bg-size":[{bg:z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},er,re,ne],radial:["",re,ne],conic:[er,re,ne]},T3,R3]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],rounded:[{rounded:V()}],"rounded-s":[{"rounded-s":V()}],"rounded-e":[{"rounded-e":V()}],"rounded-t":[{"rounded-t":V()}],"rounded-r":[{"rounded-r":V()}],"rounded-b":[{"rounded-b":V()}],"rounded-l":[{"rounded-l":V()}],"rounded-ss":[{"rounded-ss":V()}],"rounded-se":[{"rounded-se":V()}],"rounded-ee":[{"rounded-ee":V()}],"rounded-es":[{"rounded-es":V()}],"rounded-tl":[{"rounded-tl":V()}],"rounded-tr":[{"rounded-tr":V()}],"rounded-br":[{"rounded-br":V()}],"rounded-bl":[{"rounded-bl":V()}],"border-w":[{border:H()}],"border-w-x":[{"border-x":H()}],"border-w-y":[{"border-y":H()}],"border-w-s":[{"border-s":H()}],"border-w-e":[{"border-e":H()}],"border-w-t":[{"border-t":H()}],"border-w-r":[{"border-r":H()}],"border-w-b":[{"border-b":H()}],"border-w-l":[{"border-l":H()}],"divide-x":[{"divide-x":H()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":H()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...X(),"hidden","none"]}],"divide-style":[{divide:[...X(),"hidden","none"]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[...X(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ue,re,ne]}],"outline-w":[{outline:["",ue,qi,Or]}],"outline-color":[{outline:N()}],shadow:[{shadow:["","none",u,Ta,ja]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":["none",d,Ta,ja]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[ue,Or]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":N()}],"text-shadow":[{"text-shadow":["none",f,Ta,ja]}],"text-shadow-color":[{"text-shadow":N()}],opacity:[{opacity:[ue,re,ne]}],"mix-blend":[{"mix-blend":[...Q(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Q()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ue]}],"mask-image-linear-from-pos":[{"mask-linear-from":q()}],"mask-image-linear-to-pos":[{"mask-linear-to":q()}],"mask-image-linear-from-color":[{"mask-linear-from":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"mask-image-t-from-pos":[{"mask-t-from":q()}],"mask-image-t-to-pos":[{"mask-t-to":q()}],"mask-image-t-from-color":[{"mask-t-from":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"mask-image-r-from-pos":[{"mask-r-from":q()}],"mask-image-r-to-pos":[{"mask-r-to":q()}],"mask-image-r-from-color":[{"mask-r-from":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"mask-image-b-from-pos":[{"mask-b-from":q()}],"mask-image-b-to-pos":[{"mask-b-to":q()}],"mask-image-b-from-color":[{"mask-b-from":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"mask-image-l-from-pos":[{"mask-l-from":q()}],"mask-image-l-to-pos":[{"mask-l-to":q()}],"mask-image-l-from-color":[{"mask-l-from":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"mask-image-x-from-pos":[{"mask-x-from":q()}],"mask-image-x-to-pos":[{"mask-x-to":q()}],"mask-image-x-from-color":[{"mask-x-from":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"mask-image-y-from-pos":[{"mask-y-from":q()}],"mask-image-y-to-pos":[{"mask-y-to":q()}],"mask-image-y-from-color":[{"mask-y-from":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[re,ne]}],"mask-image-radial-from-pos":[{"mask-radial-from":q()}],"mask-image-radial-to-pos":[{"mask-radial-to":q()}],"mask-image-radial-from-color":[{"mask-radial-from":N()}],"mask-image-radial-to-color":[{"mask-radial-to":N()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[ue]}],"mask-image-conic-from-pos":[{"mask-conic-from":q()}],"mask-image-conic-to-pos":[{"mask-conic-to":q()}],"mask-image-conic-from-color":[{"mask-conic-from":N()}],"mask-image-conic-to-color":[{"mask-conic-to":N()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:A()}],"mask-repeat":[{mask:$()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",re,ne]}],filter:[{filter:["","none",re,ne]}],blur:[{blur:B()}],brightness:[{brightness:[ue,re,ne]}],contrast:[{contrast:[ue,re,ne]}],"drop-shadow":[{"drop-shadow":["","none",p,Ta,ja]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:["",ue,re,ne]}],"hue-rotate":[{"hue-rotate":[ue,re,ne]}],invert:[{invert:["",ue,re,ne]}],saturate:[{saturate:[ue,re,ne]}],sepia:[{sepia:["",ue,re,ne]}],"backdrop-filter":[{"backdrop-filter":["","none",re,ne]}],"backdrop-blur":[{"backdrop-blur":B()}],"backdrop-brightness":[{"backdrop-brightness":[ue,re,ne]}],"backdrop-contrast":[{"backdrop-contrast":[ue,re,ne]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ue,re,ne]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ue,re,ne]}],"backdrop-invert":[{"backdrop-invert":["",ue,re,ne]}],"backdrop-opacity":[{"backdrop-opacity":[ue,re,ne]}],"backdrop-saturate":[{"backdrop-saturate":[ue,re,ne]}],"backdrop-sepia":[{"backdrop-sepia":["",ue,re,ne]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",re,ne]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ue,"initial",re,ne]}],ease:[{ease:["linear","initial",v,re,ne]}],delay:[{delay:[ue,re,ne]}],animate:[{animate:["none",w,re,ne]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,re,ne]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:G()}],"rotate-x":[{"rotate-x":G()}],"rotate-y":[{"rotate-y":G()}],"rotate-z":[{"rotate-z":G()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:Y()}],"skew-x":[{"skew-x":Y()}],"skew-y":[{"skew-y":Y()}],transform:[{transform:[re,ne,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:U()}],"translate-x":[{"translate-x":U()}],"translate-y":[{"translate-y":U()}],"translate-z":[{"translate-z":U()}],"translate-none":["translate-none"],accent:[{accent:N()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:N()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",re,ne]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",re,ne]}],fill:[{fill:["none",...N()]}],"stroke-w":[{stroke:[ue,qi,Or,id]}],stroke:[{stroke:["none",...N()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},O3=p3(I3);function K(...e){return O3(Mk(e))}const rt=y.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:K("rounded-xl border bg-card text-card-foreground shadow",e),...t}));rt.displayName="Card";const zt=y.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:K("flex flex-col space-y-1.5 p-6",e),...t}));zt.displayName="CardHeader";const Ln=y.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:K("font-semibold leading-none tracking-tight",e),...t}));Ln.displayName="CardTitle";const Uk=y.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:K("text-sm text-muted-foreground",e),...t}));Uk.displayName="CardDescription";const ot=y.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:K("p-6 pt-0",e),...t}));ot.displayName="CardContent";const L3=y.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:K("flex items-center p-6 pt-0",e),...t}));L3.displayName="CardFooter";const Nw=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,kw=Mk,Ks=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return kw(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],d=i==null?void 0:i[c];if(u===null)return null;const f=Nw(u)||Nw(d);return o[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:f,...p}=u;return Object.entries(p).every(g=>{let[m,_]=g;return Array.isArray(_)?_.includes({...i,...a}[m]):{...i,...a}[m]===_})?[...c,d,f]:c},[]);return kw(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},D3=Ks("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function dt({className:e,variant:t,...n}){return h.jsx("div",{className:K(D3({variant:t}),e),...n})}function ql(e){const t=e.split("/");return t[t.length-1]}function Lr({label:e,value:t,icon:n,status:r="neutral"}){return h.jsxs("div",{className:K("flex flex-col items-center justify-center p-3 rounded-lg border min-w-0",r==="good"&&"bg-emerald-950/50 border-emerald-800/60",r==="bad"&&"bg-red-950/50 border-red-800/60",r==="warning"&&"bg-amber-950/50 border-amber-800/60",r==="neutral"&&"bg-neutral-900 border-neutral-700/60"),children:[h.jsxs("div",{className:"flex items-center gap-1.5 mb-0.5",children:[n&&h.jsx("span",{className:"text-muted-foreground",children:n}),h.jsx("span",{className:K("text-2xl font-bold tabular-nums",r==="good"&&"text-emerald-400",r==="bad"&&"text-red-400",r==="warning"&&"text-amber-400",r==="neutral"&&"text-foreground"),children:t})]}),h.jsx("span",{className:"text-[10px] text-muted-foreground uppercase tracking-wide",children:e})]})}function sd({title:e,rows:t,onFileSelect:n,selectedFile:r,countLabel:o,emptyMessage:i,maxItems:s=10}){const[a,l]=y.useState(!1),c=a?t:t.slice(0,s),u=t.length>s;return h.jsxs(rt,{className:"flex flex-col",children:[h.jsx(zt,{className:"pb-2 pt-3 px-3",children:h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx(Ln,{className:"text-sm font-medium",children:e}),h.jsx(dt,{variant:"secondary",className:"text-[10px] px-1.5 py-0",children:t.length})]})}),h.jsx(ot,{className:"pt-0 px-3 pb-3 flex-1",children:t.length===0?h.jsx("p",{className:"text-xs text-muted-foreground py-2",children:i}):h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"max-h-[240px] overflow-y-auto ",style:{scrollbarWidth:"thin"},children:h.jsxs("table",{className:"w-full text-xs",children:[h.jsx("thead",{className:"sticky top-0 bg-card z-10",children:h.jsxs("tr",{className:"border-b border-border/50",children:[h.jsx("th",{className:"text-left py-1.5 pr-2 text-muted-foreground font-medium",children:"File"}),h.jsx("th",{className:"text-right py-1.5 text-muted-foreground font-medium w-16",children:o})]})}),h.jsx("tbody",{children:c.map(d=>h.jsxs("tr",{className:K("border-b border-border/30 cursor-pointer transition-colors",r===d.path?"bg-accent":"hover:bg-muted/50"),onClick:()=>n==null?void 0:n(d.path),children:[h.jsx("td",{className:"py-1.5 pr-2",children:h.jsx("span",{className:"font-mono text-foreground truncate block max-w-[200px]",title:d.path,children:ql(d.path)})}),h.jsx("td",{className:"py-1.5 text-right",children:h.jsx("span",{className:"font-mono text-primary tabular-nums",children:d.count})})]},d.path))})]})}),u&&h.jsx("button",{onClick:()=>l(!a),className:"w-full mt-2 py-1 text-[10px] text-muted-foreground hover:text-foreground flex items-center justify-center gap-1 transition-colors",children:a?h.jsxs(h.Fragment,{children:["Show less ",h.jsx(jc,{className:"h-3 w-3"})]}):h.jsxs(h.Fragment,{children:["Show ",t.length-s," more ",h.jsx(wi,{className:"h-3 w-3"})]})})]})})]})}function $3({cycles:e,onFileSelect:t}){const n=e.length===0,[r,o]=y.useState(!1),i=r?e:e.slice(0,5),s=e.length>5;return h.jsxs(rt,{className:K("flex flex-col",n?"border-emerald-800/30":"border-red-800/30"),children:[h.jsx(zt,{className:"pb-2 pt-3 px-3",children:h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{className:"flex items-center gap-1.5",children:[n?h.jsx(kk,{className:"h-3.5 w-3.5 text-emerald-500"}):h.jsx(Tk,{className:"h-3.5 w-3.5 text-red-500"}),h.jsx(Ln,{className:"text-sm font-medium",children:"Circular Dependencies"})]}),h.jsx(dt,{variant:n?"secondary":"destructive",className:"text-[10px] px-1.5 py-0",children:n?"None":e.length})]})}),h.jsx(ot,{className:"pt-0 px-3 pb-3 flex-1",children:n?h.jsx("p",{className:"text-xs text-emerald-500/80",children:"No circular dependencies detected"}):h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"max-h-[240px] overflow-y-auto space-y-2",style:{scrollbarWidth:"thin"},children:i.map((a,l)=>h.jsx("div",{className:"bg-red-950/30 border border-red-900/40 rounded p-2",children:h.jsxs("div",{className:"flex flex-wrap items-center gap-1 text-[11px] font-mono",children:[a.cycle.map((c,u)=>h.jsxs("span",{className:"flex items-center",children:[h.jsx("button",{className:"text-foreground hover:text-primary transition-colors truncate max-w-[120px]",onClick:()=>t==null?void 0:t(c),title:c,children:ql(c)}),u<a.cycle.length-1&&h.jsx("span",{className:"text-red-500 mx-0.5",children:"→"})]},u)),h.jsx("span",{className:"text-red-500",children:"↺"})]})},l))}),s&&h.jsx("button",{onClick:()=>o(!r),className:"w-full mt-2 py-1 text-[10px] text-muted-foreground hover:text-foreground flex items-center justify-center gap-1 transition-colors",children:r?h.jsxs(h.Fragment,{children:["Show less ",h.jsx(jc,{className:"h-3 w-3"})]}):h.jsxs(h.Fragment,{children:["Show ",e.length-5," more ",h.jsx(wi,{className:"h-3 w-3"})]})})]})})]})}function z3({files:e,imports:t,onFileSelect:n,selectedFile:r,metadata:o}){const i=y.useMemo(()=>new Set(e.map(b=>b.path)),[e]),{importers:s,dependencies:a}=y.useMemo(()=>{var E,C;const b=new Map,S=new Map;for(const k of e)b.set(k.path,new Set),S.set(k.path,new Set);for(const k of t)i.has(k.source)&&i.has(k.target)&&((E=b.get(k.target))==null||E.add(k.source),(C=S.get(k.source))==null||C.add(k.target));return{importers:b,dependencies:S}},[e,t,i]),l=y.useMemo(()=>{var S,E;const b=[];for(const C of e)(((S=s.get(C.path))==null?void 0:S.size)||0)===0&&b.push({path:C.path,count:((E=a.get(C.path))==null?void 0:E.size)||0,lines:C.lines});return b.sort((C,k)=>k.count-C.count)},[e,s,a]),c=y.useMemo(()=>{var S;const b=[];for(const E of e){const C=((S=s.get(E.path))==null?void 0:S.size)||0;C>0&&b.push({path:E.path,count:C,lines:E.lines})}return b.sort((E,C)=>C.count-E.count).slice(0,50)},[e,s]),u=y.useMemo(()=>{var S;const b=[];for(const E of e){const C=((S=a.get(E.path))==null?void 0:S.size)||0;C>0&&b.push({path:E.path,count:C,lines:E.lines})}return b.sort((E,C)=>C.count-E.count).slice(0,50)},[e,a]),d=y.useMemo(()=>{var S,E;const b=[];for(const C of e){const k=((S=s.get(C.path))==null?void 0:S.size)||0,T=((E=a.get(C.path))==null?void 0:E.size)||0;k===0&&T===0&&b.push({path:C.path,count:0,lines:C.lines})}return b},[e,s,a]),f=y.useMemo(()=>{var S;const b=[];for(const E of e){const C=((S=a.get(E.path))==null?void 0:S.size)||0;C>10&&b.push({path:E.path,count:C,lines:E.lines})}return b.sort((E,C)=>C.count-E.count)},[e,a]),p=y.useMemo(()=>{const b=[],S=new Set,E=new Set,C=[];function k(T){S.add(T),E.add(T),C.push(T);const M=a.get(T)||new Set;for(const P of M)if(!S.has(P))k(P);else if(E.has(P)){const I=C.indexOf(P);if(I!==-1){const D=C.slice(I),R=[...D].sort().join("|");b.find(j=>[...j.cycle].sort().join("|")===R)||b.push({cycle:D})}}C.pop(),E.delete(T)}for(const T of e)S.has(T.path)||k(T.path);return b},[e,a]),g=y.useMemo(()=>{const b=u.filter(E=>E.count>10).length,S=e.length>0?d.length/e.length:0;return Math.max(0,Math.min(100,100-p.length*10-Math.min(30,b*2)-(S>.1?10:0)))},[p.length,u,d.length,e.length]),m=b=>b>=80?"good":b>=50?"warning":"bad",_=t.filter(b=>i.has(b.source)&&i.has(b.target)).length,v=y.useMemo(()=>e.reduce((b,S)=>b+S.lines,0),[e]),w=y.useMemo(()=>o!=null&&o.symbolIndex?Object.keys(o.symbolIndex).length:0,[o]),x=y.useMemo(()=>{const b=new Map;for(const S of e){const E=S.extension||"other",C=b.get(E)||{count:0,lines:0};b.set(E,{count:C.count+1,lines:C.lines+S.lines})}return Array.from(b.entries()).sort((S,E)=>E[1].count-S[1].count)},[e]);return e.length===0?h.jsx("div",{className:"p-6 text-muted-foreground text-sm",children:"No file data available. Load a snapshot with enhanced metadata."}):t.length===0?h.jsx("div",{className:"p-6 text-muted-foreground text-sm",children:"No import data available. This snapshot may not include dependency information."}):h.jsxs("div",{className:"h-full overflow-y-auto p-4 space-y-4",children:[h.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 lg:grid-cols-7 gap-2",children:[h.jsx(Lr,{label:"Total Files",value:e.length,icon:h.jsx(fD,{className:"h-4 w-4"}),status:"neutral"}),h.jsx(Lr,{label:"Total Lines",value:v.toLocaleString(),icon:h.jsx(uD,{className:"h-4 w-4"}),status:"neutral"}),h.jsx(Lr,{label:"Symbols",value:w.toLocaleString(),icon:h.jsx(zD,{className:"h-4 w-4"}),status:"neutral"}),h.jsx(Lr,{label:"Imports",value:_,icon:h.jsx(U4,{className:"h-4 w-4"}),status:"neutral"}),h.jsx(Lr,{label:"Entry Points",value:l.length,icon:h.jsx(Pk,{className:"h-4 w-4"}),status:"neutral"}),h.jsx(Lr,{label:"Circular Deps",value:p.length,icon:h.jsx(ww,{className:"h-4 w-4"}),status:p.length===0?"good":"bad"}),h.jsx(Lr,{label:"Health Score",value:g,icon:h.jsx(B4,{className:"h-4 w-4"}),status:m(g)})]}),h.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[h.jsx(sd,{title:"Entry Points",rows:l,onFileSelect:n,selectedFile:r,countLabel:"Deps",emptyMessage:"All files are imported by at least one other file"}),h.jsx(sd,{title:"Most Imported",rows:c,onFileSelect:n,selectedFile:r,countLabel:"Importers",emptyMessage:"No files are imported by other files"}),h.jsx(sd,{title:"Highest Coupling",rows:u,onFileSelect:n,selectedFile:r,countLabel:"Imports",emptyMessage:"No files have dependencies"}),h.jsx($3,{cycles:p,onFileSelect:n})]}),(d.length>0||f.length>0)&&h.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[d.length>0&&h.jsxs(rt,{className:"border-amber-800/30",children:[h.jsx(zt,{className:"pb-2 pt-3 px-3",children:h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{className:"flex items-center gap-1.5",children:[h.jsx(gD,{className:"h-3.5 w-3.5 text-amber-500"}),h.jsx(Ln,{className:"text-sm font-medium",children:"Orphaned Files"})]}),h.jsx(dt,{variant:"secondary",className:"text-[10px] px-1.5 py-0 bg-amber-950/50 text-amber-400 border-amber-800/50",children:d.length})]})}),h.jsxs(ot,{className:"pt-0 px-3 pb-3",children:[h.jsx("p",{className:"text-[10px] text-muted-foreground mb-2",children:"Files with no imports and no importers - may be unused"}),h.jsxs("div",{className:"max-h-[160px] overflow-y-auto space-y-1",style:{scrollbarWidth:"thin"},children:[d.slice(0,10).map(b=>h.jsx("button",{className:K("w-full text-left px-2 py-1 rounded text-xs font-mono truncate transition-colors",r===b.path?"bg-accent":"hover:bg-muted/50"),onClick:()=>n==null?void 0:n(b.path),title:b.path,children:ql(b.path)},b.path)),d.length>10&&h.jsxs("p",{className:"text-[10px] text-muted-foreground px-2 py-1",children:["+",d.length-10," more orphaned files"]})]})]})]}),f.length>0&&h.jsxs(rt,{className:"border-amber-800/30",children:[h.jsx(zt,{className:"pb-2 pt-3 px-3",children:h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{className:"flex items-center gap-1.5",children:[h.jsx(ww,{className:"h-3.5 w-3.5 text-amber-500"}),h.jsx(Ln,{className:"text-sm font-medium",children:"Deep Import Chains"})]}),h.jsx(dt,{variant:"secondary",className:"text-[10px] px-1.5 py-0 bg-amber-950/50 text-amber-400 border-amber-800/50",children:f.length})]})}),h.jsxs(ot,{className:"pt-0 px-3 pb-3",children:[h.jsx("p",{className:"text-[10px] text-muted-foreground mb-2",children:"Files importing 10+ other files - consider refactoring"}),h.jsxs("div",{className:"max-h-[160px] overflow-y-auto ",style:{scrollbarWidth:"thin"},children:[h.jsx("table",{className:"w-full text-xs",children:h.jsx("tbody",{children:f.slice(0,8).map(b=>h.jsxs("tr",{className:K("cursor-pointer transition-colors",r===b.path?"bg-accent":"hover:bg-muted/50"),onClick:()=>n==null?void 0:n(b.path),children:[h.jsx("td",{className:"py-1 pr-2",children:h.jsx("span",{className:"font-mono truncate block max-w-[180px]",title:b.path,children:ql(b.path)})}),h.jsx("td",{className:"py-1 text-right",children:h.jsx("span",{className:"font-mono text-amber-400 tabular-nums",children:b.count})})]},b.path))})}),f.length>8&&h.jsxs("p",{className:"text-[10px] text-muted-foreground px-2 py-1",children:["+",f.length-8," more files"]})]})]})]})]}),x.length>0&&h.jsxs("div",{className:"mt-6 pt-6 border-t border-neutral-800",children:[h.jsx("h3",{className:"text-sm font-medium text-neutral-400 mb-4",children:"File Type Distribution"}),h.jsx("div",{className:"flex flex-wrap gap-2",children:x.map(([b,S])=>h.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-1.5 bg-neutral-900 border border-neutral-700 rounded text-xs",children:[h.jsxs("span",{className:"font-mono text-neutral-200",children:[".",b]}),h.jsxs("span",{className:"text-neutral-500",children:["(",S.count,")"]})]},b))})]})]})}function Oe(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=Oe(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var F3={value:()=>{}};function Tc(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new al(n)}function al(e){this._=e}function q3(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",o=n.indexOf(".");if(o>=0&&(r=n.slice(o+1),n=n.slice(0,o)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}al.prototype=Tc.prototype={constructor:al,on:function(e,t){var n=this._,r=q3(e+"",n),o,i=-1,s=r.length;if(arguments.length<2){for(;++i<s;)if((o=(e=r[i]).type)&&(o=B3(n[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<s;)if(o=(e=r[i]).type)n[o]=Rw(n[o],e.name,t);else if(t==null)for(o in n)n[o]=Rw(n[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new al(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var n=new Array(o),r=0,o,i;r<o;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],r=0,o=i.length;r<o;++r)i[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],o=0,i=r.length;o<i;++o)r[o].value.apply(t,n)}};function B3(e,t){for(var n=0,r=e.length,o;n<r;++n)if((o=e[n]).name===t)return o.value}function Rw(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=F3,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var yv="http://www.w3.org/1999/xhtml";const Pw={svg:"http://www.w3.org/2000/svg",xhtml:yv,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ac(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Pw.hasOwnProperty(t)?{space:Pw[t],local:e}:e}function H3(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===yv&&t.documentElement.namespaceURI===yv?t.createElement(e):t.createElementNS(n,e)}}function V3(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Gk(e){var t=Ac(e);return(t.local?V3:H3)(t)}function W3(){}function Yy(e){return e==null?W3:function(){return this.querySelector(e)}}function U3(e){typeof e!="function"&&(e=Yy(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],s=i.length,a=r[o]=new Array(s),l,c,u=0;u<s;++u)(l=i[u])&&(c=e.call(l,l.__data__,u,i))&&("__data__"in l&&(c.__data__=l.__data__),a[u]=c);return new bt(r,this._parents)}function G3(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Y3(){return[]}function Yk(e){return e==null?Y3:function(){return this.querySelectorAll(e)}}function K3(e){return function(){return G3(e.apply(this,arguments))}}function X3(e){typeof e=="function"?e=K3(e):e=Yk(e);for(var t=this._groups,n=t.length,r=[],o=[],i=0;i<n;++i)for(var s=t[i],a=s.length,l,c=0;c<a;++c)(l=s[c])&&(r.push(e.call(l,l.__data__,c,s)),o.push(l));return new bt(r,o)}function Kk(e){return function(){return this.matches(e)}}function Xk(e){return function(t){return t.matches(e)}}var Q3=Array.prototype.find;function Z3(e){return function(){return Q3.call(this.children,e)}}function J3(){return this.firstElementChild}function e5(e){return this.select(e==null?J3:Z3(typeof e=="function"?e:Xk(e)))}var t5=Array.prototype.filter;function n5(){return Array.from(this.children)}function r5(e){return function(){return t5.call(this.children,e)}}function o5(e){return this.selectAll(e==null?n5:r5(typeof e=="function"?e:Xk(e)))}function i5(e){typeof e!="function"&&(e=Kk(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],s=i.length,a=r[o]=[],l,c=0;c<s;++c)(l=i[c])&&e.call(l,l.__data__,c,i)&&a.push(l);return new bt(r,this._parents)}function Qk(e){return new Array(e.length)}function s5(){return new bt(this._enter||this._groups.map(Qk),this._parents)}function Bl(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Bl.prototype={constructor:Bl,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 a5(e){return function(){return e}}function l5(e,t,n,r,o,i){for(var s=0,a,l=t.length,c=i.length;s<c;++s)(a=t[s])?(a.__data__=i[s],r[s]=a):n[s]=new Bl(e,i[s]);for(;s<l;++s)(a=t[s])&&(o[s]=a)}function c5(e,t,n,r,o,i,s){var a,l,c=new Map,u=t.length,d=i.length,f=new Array(u),p;for(a=0;a<u;++a)(l=t[a])&&(f[a]=p=s.call(l,l.__data__,a,t)+"",c.has(p)?o[a]=l:c.set(p,l));for(a=0;a<d;++a)p=s.call(e,i[a],a,i)+"",(l=c.get(p))?(r[a]=l,l.__data__=i[a],c.delete(p)):n[a]=new Bl(e,i[a]);for(a=0;a<u;++a)(l=t[a])&&c.get(f[a])===l&&(o[a]=l)}function u5(e){return e.__data__}function d5(e,t){if(!arguments.length)return Array.from(this,u5);var n=t?c5:l5,r=this._parents,o=this._groups;typeof e!="function"&&(e=a5(e));for(var i=o.length,s=new Array(i),a=new Array(i),l=new Array(i),c=0;c<i;++c){var u=r[c],d=o[c],f=d.length,p=f5(e.call(u,u&&u.__data__,c,r)),g=p.length,m=a[c]=new Array(g),_=s[c]=new Array(g),v=l[c]=new Array(f);n(u,d,m,_,v,p,t);for(var w=0,x=0,b,S;w<g;++w)if(b=m[w]){for(w>=x&&(x=w+1);!(S=_[x])&&++x<g;);b._next=S||null}}return s=new bt(s,r),s._enter=a,s._exit=l,s}function f5(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function h5(){return new bt(this._exit||this._groups.map(Qk),this._parents)}function p5(e,t,n){var r=this.enter(),o=this,i=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),n==null?i.remove():n(i),r&&o?r.merge(o).order():o}function m5(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,o=n.length,i=r.length,s=Math.min(o,i),a=new Array(o),l=0;l<s;++l)for(var c=n[l],u=r[l],d=c.length,f=a[l]=new Array(d),p,g=0;g<d;++g)(p=c[g]||u[g])&&(f[g]=p);for(;l<o;++l)a[l]=n[l];return new bt(a,this._parents)}function g5(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],o=r.length-1,i=r[o],s;--o>=0;)(s=r[o])&&(i&&s.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(s,i),i=s);return this}function v5(e){e||(e=y5);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var s=n[i],a=s.length,l=o[i]=new Array(a),c,u=0;u<a;++u)(c=s[u])&&(l[u]=c);l.sort(t)}return new bt(o,this._parents).order()}function y5(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function x5(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function w5(){return Array.from(this)}function b5(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,i=r.length;o<i;++o){var s=r[o];if(s)return s}return null}function _5(){let e=0;for(const t of this)++e;return e}function S5(){return!this.node()}function E5(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o=t[n],i=0,s=o.length,a;i<s;++i)(a=o[i])&&e.call(a,a.__data__,i,o);return this}function C5(e){return function(){this.removeAttribute(e)}}function N5(e){return function(){this.removeAttributeNS(e.space,e.local)}}function k5(e,t){return function(){this.setAttribute(e,t)}}function R5(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function P5(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function j5(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function T5(e,t){var n=Ac(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?N5:C5:typeof t=="function"?n.local?j5:P5:n.local?R5:k5)(n,t))}function Zk(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function A5(e){return function(){this.style.removeProperty(e)}}function M5(e,t,n){return function(){this.style.setProperty(e,t,n)}}function I5(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function O5(e,t,n){return arguments.length>1?this.each((t==null?A5:typeof t=="function"?I5:M5)(e,t,n??"")):ri(this.node(),e)}function ri(e,t){return e.style.getPropertyValue(t)||Zk(e).getComputedStyle(e,null).getPropertyValue(t)}function L5(e){return function(){delete this[e]}}function D5(e,t){return function(){this[e]=t}}function $5(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function z5(e,t){return arguments.length>1?this.each((t==null?L5:typeof t=="function"?$5:D5)(e,t)):this.node()[e]}function Jk(e){return e.trim().split(/^|\s+/)}function Ky(e){return e.classList||new eR(e)}function eR(e){this._node=e,this._names=Jk(e.getAttribute("class")||"")}eR.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 tR(e,t){for(var n=Ky(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function nR(e,t){for(var n=Ky(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function F5(e){return function(){tR(this,e)}}function q5(e){return function(){nR(this,e)}}function B5(e,t){return function(){(t.apply(this,arguments)?tR:nR)(this,e)}}function H5(e,t){var n=Jk(e+"");if(arguments.length<2){for(var r=Ky(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each((typeof t=="function"?B5:t?F5:q5)(n,t))}function V5(){this.textContent=""}function W5(e){return function(){this.textContent=e}}function U5(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function G5(e){return arguments.length?this.each(e==null?V5:(typeof e=="function"?U5:W5)(e)):this.node().textContent}function Y5(){this.innerHTML=""}function K5(e){return function(){this.innerHTML=e}}function X5(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Q5(e){return arguments.length?this.each(e==null?Y5:(typeof e=="function"?X5:K5)(e)):this.node().innerHTML}function Z5(){this.nextSibling&&this.parentNode.appendChild(this)}function J5(){return this.each(Z5)}function e$(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function t$(){return this.each(e$)}function n$(e){var t=typeof e=="function"?e:Gk(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function r$(){return null}function o$(e,t){var n=typeof e=="function"?e:Gk(e),r=t==null?r$:typeof t=="function"?t:Yy(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function i$(){var e=this.parentNode;e&&e.removeChild(this)}function s$(){return this.each(i$)}function a$(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function l$(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function c$(e){return this.select(e?l$:a$)}function u$(e){return arguments.length?this.property("__data__",e):this.node().__data__}function d$(e){return function(t){e.call(this,t,this.__data__)}}function f$(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function h$(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,o=t.length,i;n<o;++n)i=t[n],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++r]=i;++r?t.length=r:delete this.__on}}}function p$(e,t,n){return function(){var r=this.__on,o,i=d$(t);if(r){for(var s=0,a=r.length;s<a;++s)if((o=r[s]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=i,o.options=n),o.value=t;return}}this.addEventListener(e.type,i,n),o={type:e.type,name:e.name,value:t,listener:i,options:n},r?r.push(o):this.__on=[o]}}function m$(e,t,n){var r=f$(e+""),o,i=r.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var l=0,c=a.length,u;l<c;++l)for(o=0,u=a[l];o<i;++o)if((s=r[o]).type===u.type&&s.name===u.name)return u.value}return}for(a=t?p$:h$,o=0;o<i;++o)this.each(a(r[o],t,n));return this}function rR(e,t,n){var r=Zk(e),o=r.CustomEvent;typeof o=="function"?o=new o(t,n):(o=r.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function g$(e,t){return function(){return rR(this,e,t)}}function v$(e,t){return function(){return rR(this,e,t.apply(this,arguments))}}function y$(e,t){return this.each((typeof t=="function"?v$:g$)(e,t))}function*x$(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,i=r.length,s;o<i;++o)(s=r[o])&&(yield s)}var oR=[null];function bt(e,t){this._groups=e,this._parents=t}function Xs(){return new bt([[document.documentElement]],oR)}function w$(){return this}bt.prototype=Xs.prototype={constructor:bt,select:U3,selectAll:X3,selectChild:e5,selectChildren:o5,filter:i5,data:d5,enter:s5,exit:h5,join:p5,merge:m5,selection:w$,order:g5,sort:v5,call:x5,nodes:w5,node:b5,size:_5,empty:S5,each:E5,attr:T5,style:O5,property:z5,classed:H5,text:G5,html:Q5,raise:J5,lower:t$,append:n$,insert:o$,remove:s$,clone:c$,datum:u$,on:m$,dispatch:y$,[Symbol.iterator]:x$};function gt(e){return typeof e=="string"?new bt([[document.querySelector(e)]],[document.documentElement]):new bt([[e]],oR)}function b$(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Dt(e,t){if(e=b$(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}const _$={passive:!1},As={capture:!0,passive:!1};function ad(e){e.stopImmediatePropagation()}function Uo(e){e.preventDefault(),e.stopImmediatePropagation()}function iR(e){var t=e.document.documentElement,n=gt(e).on("dragstart.drag",Uo,As);"onselectstart"in t?n.on("selectstart.drag",Uo,As):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function sR(e,t){var n=e.document.documentElement,r=gt(e).on("dragstart.drag",null);t&&(r.on("click.drag",Uo,As),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Aa=e=>()=>e;function xv(e,{sourceEvent:t,subject:n,target:r,identifier:o,active:i,x:s,y:a,dx:l,dy:c,dispatch:u}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:u}})}xv.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function S$(e){return!e.ctrlKey&&!e.button}function E$(){return this.parentNode}function C$(e,t){return t??{x:e.x,y:e.y}}function N$(){return navigator.maxTouchPoints||"ontouchstart"in this}function aR(){var e=S$,t=E$,n=C$,r=N$,o={},i=Tc("start","drag","end"),s=0,a,l,c,u,d=0;function f(b){b.on("mousedown.drag",p).filter(r).on("touchstart.drag",_).on("touchmove.drag",v,_$).on("touchend.drag touchcancel.drag",w).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(b,S){if(!(u||!e.call(this,b,S))){var E=x(this,t.call(this,b,S),b,S,"mouse");E&&(gt(b.view).on("mousemove.drag",g,As).on("mouseup.drag",m,As),iR(b.view),ad(b),c=!1,a=b.clientX,l=b.clientY,E("start",b))}}function g(b){if(Uo(b),!c){var S=b.clientX-a,E=b.clientY-l;c=S*S+E*E>d}o.mouse("drag",b)}function m(b){gt(b.view).on("mousemove.drag mouseup.drag",null),sR(b.view,c),Uo(b),o.mouse("end",b)}function _(b,S){if(e.call(this,b,S)){var E=b.changedTouches,C=t.call(this,b,S),k=E.length,T,M;for(T=0;T<k;++T)(M=x(this,C,b,S,E[T].identifier,E[T]))&&(ad(b),M("start",b,E[T]))}}function v(b){var S=b.changedTouches,E=S.length,C,k;for(C=0;C<E;++C)(k=o[S[C].identifier])&&(Uo(b),k("drag",b,S[C]))}function w(b){var S=b.changedTouches,E=S.length,C,k;for(u&&clearTimeout(u),u=setTimeout(function(){u=null},500),C=0;C<E;++C)(k=o[S[C].identifier])&&(ad(b),k("end",b,S[C]))}function x(b,S,E,C,k,T){var M=i.copy(),P=Dt(T||E,S),I,D,R;if((R=n.call(b,new xv("beforestart",{sourceEvent:E,target:f,identifier:k,active:s,x:P[0],y:P[1],dx:0,dy:0,dispatch:M}),C))!=null)return I=R.x-P[0]||0,D=R.y-P[1]||0,function O(j,L,N){var A=P,$;switch(j){case"start":o[k]=O,$=s++;break;case"end":delete o[k],--s;case"drag":P=Dt(N||L,S),$=s;break}M.call(j,b,new xv(j,{sourceEvent:L,subject:R,target:f,identifier:k,active:$,x:P[0]+I,y:P[1]+D,dx:P[0]-A[0],dy:P[1]-A[1],dispatch:M}),C)}}return f.filter=function(b){return arguments.length?(e=typeof b=="function"?b:Aa(!!b),f):e},f.container=function(b){return arguments.length?(t=typeof b=="function"?b:Aa(b),f):t},f.subject=function(b){return arguments.length?(n=typeof b=="function"?b:Aa(b),f):n},f.touchable=function(b){return arguments.length?(r=typeof b=="function"?b:Aa(!!b),f):r},f.on=function(){var b=i.on.apply(i,arguments);return b===i?f:b},f.clickDistance=function(b){return arguments.length?(d=(b=+b)*b,f):Math.sqrt(d)},f}function Xy(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function lR(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Qs(){}var Ms=.7,Hl=1/Ms,Go="\\s*([+-]?\\d+)\\s*",Is="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",fn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",k$=/^#([0-9a-f]{3,8})$/,R$=new RegExp(`^rgb\\(${Go},${Go},${Go}\\)$`),P$=new RegExp(`^rgb\\(${fn},${fn},${fn}\\)$`),j$=new RegExp(`^rgba\\(${Go},${Go},${Go},${Is}\\)$`),T$=new RegExp(`^rgba\\(${fn},${fn},${fn},${Is}\\)$`),A$=new RegExp(`^hsl\\(${Is},${fn},${fn}\\)$`),M$=new RegExp(`^hsla\\(${Is},${fn},${fn},${Is}\\)$`),jw={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};Xy(Qs,to,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Tw,formatHex:Tw,formatHex8:I$,formatHsl:O$,formatRgb:Aw,toString:Aw});function Tw(){return this.rgb().formatHex()}function I$(){return this.rgb().formatHex8()}function O$(){return cR(this).formatHsl()}function Aw(){return this.rgb().formatRgb()}function to(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=k$.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Mw(t):n===3?new at(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Ma(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Ma(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=R$.exec(e))?new at(t[1],t[2],t[3],1):(t=P$.exec(e))?new at(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=j$.exec(e))?Ma(t[1],t[2],t[3],t[4]):(t=T$.exec(e))?Ma(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=A$.exec(e))?Lw(t[1],t[2]/100,t[3]/100,1):(t=M$.exec(e))?Lw(t[1],t[2]/100,t[3]/100,t[4]):jw.hasOwnProperty(e)?Mw(jw[e]):e==="transparent"?new at(NaN,NaN,NaN,0):null}function Mw(e){return new at(e>>16&255,e>>8&255,e&255,1)}function Ma(e,t,n,r){return r<=0&&(e=t=n=NaN),new at(e,t,n,r)}function L$(e){return e instanceof Qs||(e=to(e)),e?(e=e.rgb(),new at(e.r,e.g,e.b,e.opacity)):new at}function wv(e,t,n,r){return arguments.length===1?L$(e):new at(e,t,n,r??1)}function at(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Xy(at,wv,lR(Qs,{brighter(e){return e=e==null?Hl:Math.pow(Hl,e),new at(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ms:Math.pow(Ms,e),new at(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new at(Gr(this.r),Gr(this.g),Gr(this.b),Vl(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:Iw,formatHex:Iw,formatHex8:D$,formatRgb:Ow,toString:Ow}));function Iw(){return`#${Hr(this.r)}${Hr(this.g)}${Hr(this.b)}`}function D$(){return`#${Hr(this.r)}${Hr(this.g)}${Hr(this.b)}${Hr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ow(){const e=Vl(this.opacity);return`${e===1?"rgb(":"rgba("}${Gr(this.r)}, ${Gr(this.g)}, ${Gr(this.b)}${e===1?")":`, ${e})`}`}function Vl(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Gr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Hr(e){return e=Gr(e),(e<16?"0":"")+e.toString(16)}function Lw(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ft(e,t,n,r)}function cR(e){if(e instanceof Ft)return new Ft(e.h,e.s,e.l,e.opacity);if(e instanceof Qs||(e=to(e)),!e)return new Ft;if(e instanceof Ft)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),s=NaN,a=i-o,l=(i+o)/2;return a?(t===i?s=(n-r)/a+(n<r)*6:n===i?s=(r-t)/a+2:s=(t-n)/a+4,a/=l<.5?i+o:2-i-o,s*=60):a=l>0&&l<1?0:s,new Ft(s,a,l,e.opacity)}function $$(e,t,n,r){return arguments.length===1?cR(e):new Ft(e,t,n,r??1)}function Ft(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Xy(Ft,$$,lR(Qs,{brighter(e){return e=e==null?Hl:Math.pow(Hl,e),new Ft(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ms:Math.pow(Ms,e),new Ft(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new at(ld(e>=240?e-240:e+120,o,r),ld(e,o,r),ld(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new Ft(Dw(this.h),Ia(this.s),Ia(this.l),Vl(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=Vl(this.opacity);return`${e===1?"hsl(":"hsla("}${Dw(this.h)}, ${Ia(this.s)*100}%, ${Ia(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Dw(e){return e=(e||0)%360,e<0?e+360:e}function Ia(e){return Math.max(0,Math.min(1,e||0))}function ld(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Qy=e=>()=>e;function z$(e,t){return function(n){return e+n*t}}function F$(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function q$(e){return(e=+e)==1?uR:function(t,n){return n-t?F$(t,n,e):Qy(isNaN(t)?n:t)}}function uR(e,t){var n=t-e;return n?z$(e,n):Qy(isNaN(e)?t:e)}const Wl=function e(t){var n=q$(t);function r(o,i){var s=n((o=wv(o)).r,(i=wv(i)).r),a=n(o.g,i.g),l=n(o.b,i.b),c=uR(o.opacity,i.opacity);return function(u){return o.r=s(u),o.g=a(u),o.b=l(u),o.opacity=c(u),o+""}}return r.gamma=e,r}(1);function B$(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),o;return function(i){for(o=0;o<n;++o)r[o]=e[o]*(1-i)+t[o]*i;return r}}function H$(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function V$(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,o=new Array(r),i=new Array(n),s;for(s=0;s<r;++s)o[s]=fs(e[s],t[s]);for(;s<n;++s)i[s]=t[s];return function(a){for(s=0;s<r;++s)i[s]=o[s](a);return i}}function W$(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function on(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function U$(e,t){var n={},r={},o;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(o in t)o in e?n[o]=fs(e[o],t[o]):r[o]=t[o];return function(i){for(o in n)r[o]=n[o](i);return r}}var bv=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,cd=new RegExp(bv.source,"g");function G$(e){return function(){return e}}function Y$(e){return function(t){return e(t)+""}}function dR(e,t){var n=bv.lastIndex=cd.lastIndex=0,r,o,i,s=-1,a=[],l=[];for(e=e+"",t=t+"";(r=bv.exec(e))&&(o=cd.exec(t));)(i=o.index)>n&&(i=t.slice(n,i),a[s]?a[s]+=i:a[++s]=i),(r=r[0])===(o=o[0])?a[s]?a[s]+=o:a[++s]=o:(a[++s]=null,l.push({i:s,x:on(r,o)})),n=cd.lastIndex;return n<t.length&&(i=t.slice(n),a[s]?a[s]+=i:a[++s]=i),a.length<2?l[0]?Y$(l[0].x):G$(t):(t=l.length,function(c){for(var u=0,d;u<t;++u)a[(d=l[u]).i]=d.x(c);return a.join("")})}function fs(e,t){var n=typeof t,r;return t==null||n==="boolean"?Qy(t):(n==="number"?on:n==="string"?(r=to(t))?(t=r,Wl):dR:t instanceof to?Wl:t instanceof Date?W$:H$(t)?B$:Array.isArray(t)?V$:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?U$:on)(e,t)}var $w=180/Math.PI,_v={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function fR(e,t,n,r,o,i){var s,a,l;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,l/=a),e*r<t*n&&(e=-e,t=-t,l=-l,s=-s),{translateX:o,translateY:i,rotate:Math.atan2(t,e)*$w,skewX:Math.atan(l)*$w,scaleX:s,scaleY:a}}var Oa;function K$(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?_v:fR(t.a,t.b,t.c,t.d,t.e,t.f)}function X$(e){return e==null||(Oa||(Oa=document.createElementNS("http://www.w3.org/2000/svg","g")),Oa.setAttribute("transform",e),!(e=Oa.transform.baseVal.consolidate()))?_v:(e=e.matrix,fR(e.a,e.b,e.c,e.d,e.e,e.f))}function hR(e,t,n,r){function o(c){return c.length?c.pop()+" ":""}function i(c,u,d,f,p,g){if(c!==d||u!==f){var m=p.push("translate(",null,t,null,n);g.push({i:m-4,x:on(c,d)},{i:m-2,x:on(u,f)})}else(d||f)&&p.push("translate("+d+t+f+n)}function s(c,u,d,f){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),f.push({i:d.push(o(d)+"rotate(",null,r)-2,x:on(c,u)})):u&&d.push(o(d)+"rotate("+u+r)}function a(c,u,d,f){c!==u?f.push({i:d.push(o(d)+"skewX(",null,r)-2,x:on(c,u)}):u&&d.push(o(d)+"skewX("+u+r)}function l(c,u,d,f,p,g){if(c!==d||u!==f){var m=p.push(o(p)+"scale(",null,",",null,")");g.push({i:m-4,x:on(c,d)},{i:m-2,x:on(u,f)})}else(d!==1||f!==1)&&p.push(o(p)+"scale("+d+","+f+")")}return function(c,u){var d=[],f=[];return c=e(c),u=e(u),i(c.translateX,c.translateY,u.translateX,u.translateY,d,f),s(c.rotate,u.rotate,d,f),a(c.skewX,u.skewX,d,f),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,d,f),c=u=null,function(p){for(var g=-1,m=f.length,_;++g<m;)d[(_=f[g]).i]=_.x(p);return d.join("")}}}var Q$=hR(K$,"px, ","px)","deg)"),Z$=hR(X$,", ",")",")"),J$=1e-12;function zw(e){return((e=Math.exp(e))+1/e)/2}function ez(e){return((e=Math.exp(e))-1/e)/2}function tz(e){return((e=Math.exp(2*e))-1)/(e+1)}const ll=function e(t,n,r){function o(i,s){var a=i[0],l=i[1],c=i[2],u=s[0],d=s[1],f=s[2],p=u-a,g=d-l,m=p*p+g*g,_,v;if(m<J$)v=Math.log(f/c)/t,_=function(C){return[a+C*p,l+C*g,c*Math.exp(t*C*v)]};else{var w=Math.sqrt(m),x=(f*f-c*c+r*m)/(2*c*n*w),b=(f*f-c*c-r*m)/(2*f*n*w),S=Math.log(Math.sqrt(x*x+1)-x),E=Math.log(Math.sqrt(b*b+1)-b);v=(E-S)/t,_=function(C){var k=C*v,T=zw(S),M=c/(n*w)*(T*tz(t*k+S)-ez(S));return[a+M*p,l+M*g,c*T/zw(t*k+S)]}}return _.duration=v*1e3*t/Math.SQRT2,_}return o.rho=function(i){var s=Math.max(.001,+i),a=s*s,l=a*a;return e(s,a,l)},o}(Math.SQRT2,2,4);var oi=0,Yi=0,Bi=0,pR=1e3,Ul,Ki,Gl=0,no=0,Mc=0,Os=typeof performance=="object"&&performance.now?performance:Date,mR=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Zy(){return no||(mR(nz),no=Os.now()+Mc)}function nz(){no=0}function Yl(){this._call=this._time=this._next=null}Yl.prototype=gR.prototype={constructor:Yl,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Zy():+n)+(t==null?0:+t),!this._next&&Ki!==this&&(Ki?Ki._next=this:Ul=this,Ki=this),this._call=e,this._time=n,Sv()},stop:function(){this._call&&(this._call=null,this._time=1/0,Sv())}};function gR(e,t,n){var r=new Yl;return r.restart(e,t,n),r}function rz(){Zy(),++oi;for(var e=Ul,t;e;)(t=no-e._time)>=0&&e._call.call(void 0,t),e=e._next;--oi}function Fw(){no=(Gl=Os.now())+Mc,oi=Yi=0;try{rz()}finally{oi=0,iz(),no=0}}function oz(){var e=Os.now(),t=e-Gl;t>pR&&(Mc-=t,Gl=e)}function iz(){for(var e,t=Ul,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Ul=n);Ki=e,Sv(r)}function Sv(e){if(!oi){Yi&&(Yi=clearTimeout(Yi));var t=e-no;t>24?(e<1/0&&(Yi=setTimeout(Fw,e-Os.now()-Mc)),Bi&&(Bi=clearInterval(Bi))):(Bi||(Gl=Os.now(),Bi=setInterval(oz,pR)),oi=1,mR(Fw))}}function qw(e,t,n){var r=new Yl;return t=t==null?0:+t,r.restart(o=>{r.stop(),e(o+t)},t,n),r}var sz=Tc("start","end","cancel","interrupt"),az=[],vR=0,Bw=1,Ev=2,cl=3,Hw=4,Cv=5,ul=6;function Ic(e,t,n,r,o,i){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;lz(e,n,{name:t,index:r,group:o,on:sz,tween:az,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:vR})}function Jy(e,t){var n=Yt(e,t);if(n.state>vR)throw new Error("too late; already scheduled");return n}function vn(e,t){var n=Yt(e,t);if(n.state>cl)throw new Error("too late; already running");return n}function Yt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function lz(e,t,n){var r=e.__transition,o;r[t]=n,n.timer=gR(i,0,n.time);function i(c){n.state=Bw,n.timer.restart(s,n.delay,n.time),n.delay<=c&&s(c-n.delay)}function s(c){var u,d,f,p;if(n.state!==Bw)return l();for(u in r)if(p=r[u],p.name===n.name){if(p.state===cl)return qw(s);p.state===Hw?(p.state=ul,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete r[u]):+u<t&&(p.state=ul,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete r[u])}if(qw(function(){n.state===cl&&(n.state=Hw,n.timer.restart(a,n.delay,n.time),a(c))}),n.state=Ev,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Ev){for(n.state=cl,o=new Array(f=n.tween.length),u=0,d=-1;u<f;++u)(p=n.tween[u].value.call(e,e.__data__,n.index,n.group))&&(o[++d]=p);o.length=d+1}}function a(c){for(var u=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(l),n.state=Cv,1),d=-1,f=o.length;++d<f;)o[d].call(e,u);n.state===Cv&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=ul,n.timer.stop(),delete r[t];for(var c in r)return;delete e.__transition}}function dl(e,t){var n=e.__transition,r,o,i=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((r=n[s]).name!==t){i=!1;continue}o=r.state>Ev&&r.state<Cv,r.state=ul,r.timer.stop(),r.on.call(o?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[s]}i&&delete e.__transition}}function cz(e){return this.each(function(){dl(this,e)})}function uz(e,t){var n,r;return function(){var o=vn(this,e),i=o.tween;if(i!==n){r=n=i;for(var s=0,a=r.length;s<a;++s)if(r[s].name===t){r=r.slice(),r.splice(s,1);break}}o.tween=r}}function dz(e,t,n){var r,o;if(typeof n!="function")throw new Error;return function(){var i=vn(this,e),s=i.tween;if(s!==r){o=(r=s).slice();for(var a={name:t,value:n},l=0,c=o.length;l<c;++l)if(o[l].name===t){o[l]=a;break}l===c&&o.push(a)}i.tween=o}}function fz(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Yt(this.node(),n).tween,o=0,i=r.length,s;o<i;++o)if((s=r[o]).name===e)return s.value;return null}return this.each((t==null?uz:dz)(n,e,t))}function e0(e,t,n){var r=e._id;return e.each(function(){var o=vn(this,r);(o.value||(o.value={}))[t]=n.apply(this,arguments)}),function(o){return Yt(o,r).value[t]}}function yR(e,t){var n;return(typeof t=="number"?on:t instanceof to?Wl:(n=to(t))?(t=n,Wl):dR)(e,t)}function hz(e){return function(){this.removeAttribute(e)}}function pz(e){return function(){this.removeAttributeNS(e.space,e.local)}}function mz(e,t,n){var r,o=n+"",i;return function(){var s=this.getAttribute(e);return s===o?null:s===r?i:i=t(r=s,n)}}function gz(e,t,n){var r,o=n+"",i;return function(){var s=this.getAttributeNS(e.space,e.local);return s===o?null:s===r?i:i=t(r=s,n)}}function vz(e,t,n){var r,o,i;return function(){var s,a=n(this),l;return a==null?void this.removeAttribute(e):(s=this.getAttribute(e),l=a+"",s===l?null:s===r&&l===o?i:(o=l,i=t(r=s,a)))}}function yz(e,t,n){var r,o,i;return function(){var s,a=n(this),l;return a==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),l=a+"",s===l?null:s===r&&l===o?i:(o=l,i=t(r=s,a)))}}function xz(e,t){var n=Ac(e),r=n==="transform"?Z$:yR;return this.attrTween(e,typeof t=="function"?(n.local?yz:vz)(n,r,e0(this,"attr."+e,t)):t==null?(n.local?pz:hz)(n):(n.local?gz:mz)(n,r,t))}function wz(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function bz(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function _z(e,t){var n,r;function o(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&bz(e,i)),n}return o._value=t,o}function Sz(e,t){var n,r;function o(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&wz(e,i)),n}return o._value=t,o}function Ez(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=Ac(e);return this.tween(n,(r.local?_z:Sz)(r,t))}function Cz(e,t){return function(){Jy(this,e).delay=+t.apply(this,arguments)}}function Nz(e,t){return t=+t,function(){Jy(this,e).delay=t}}function kz(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Cz:Nz)(t,e)):Yt(this.node(),t).delay}function Rz(e,t){return function(){vn(this,e).duration=+t.apply(this,arguments)}}function Pz(e,t){return t=+t,function(){vn(this,e).duration=t}}function jz(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Rz:Pz)(t,e)):Yt(this.node(),t).duration}function Tz(e,t){if(typeof t!="function")throw new Error;return function(){vn(this,e).ease=t}}function Az(e){var t=this._id;return arguments.length?this.each(Tz(t,e)):Yt(this.node(),t).ease}function Mz(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;vn(this,e).ease=n}}function Iz(e){if(typeof e!="function")throw new Error;return this.each(Mz(this._id,e))}function Oz(e){typeof e!="function"&&(e=Kk(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],s=i.length,a=r[o]=[],l,c=0;c<s;++c)(l=i[c])&&e.call(l,l.__data__,c,i)&&a.push(l);return new Bn(r,this._parents,this._name,this._id)}function Lz(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,o=n.length,i=Math.min(r,o),s=new Array(r),a=0;a<i;++a)for(var l=t[a],c=n[a],u=l.length,d=s[a]=new Array(u),f,p=0;p<u;++p)(f=l[p]||c[p])&&(d[p]=f);for(;a<r;++a)s[a]=t[a];return new Bn(s,this._parents,this._name,this._id)}function Dz(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function $z(e,t,n){var r,o,i=Dz(t)?Jy:vn;return function(){var s=i(this,e),a=s.on;a!==r&&(o=(r=a).copy()).on(t,n),s.on=o}}function zz(e,t){var n=this._id;return arguments.length<2?Yt(this.node(),n).on.on(e):this.each($z(n,e,t))}function Fz(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function qz(){return this.on("end.remove",Fz(this._id))}function Bz(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Yy(e));for(var r=this._groups,o=r.length,i=new Array(o),s=0;s<o;++s)for(var a=r[s],l=a.length,c=i[s]=new Array(l),u,d,f=0;f<l;++f)(u=a[f])&&(d=e.call(u,u.__data__,f,a))&&("__data__"in u&&(d.__data__=u.__data__),c[f]=d,Ic(c[f],t,n,f,c,Yt(u,n)));return new Bn(i,this._parents,t,n)}function Hz(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Yk(e));for(var r=this._groups,o=r.length,i=[],s=[],a=0;a<o;++a)for(var l=r[a],c=l.length,u,d=0;d<c;++d)if(u=l[d]){for(var f=e.call(u,u.__data__,d,l),p,g=Yt(u,n),m=0,_=f.length;m<_;++m)(p=f[m])&&Ic(p,t,n,m,f,g);i.push(f),s.push(u)}return new Bn(i,s,t,n)}var Vz=Xs.prototype.constructor;function Wz(){return new Vz(this._groups,this._parents)}function Uz(e,t){var n,r,o;return function(){var i=ri(this,e),s=(this.style.removeProperty(e),ri(this,e));return i===s?null:i===n&&s===r?o:o=t(n=i,r=s)}}function xR(e){return function(){this.style.removeProperty(e)}}function Gz(e,t,n){var r,o=n+"",i;return function(){var s=ri(this,e);return s===o?null:s===r?i:i=t(r=s,n)}}function Yz(e,t,n){var r,o,i;return function(){var s=ri(this,e),a=n(this),l=a+"";return a==null&&(l=a=(this.style.removeProperty(e),ri(this,e))),s===l?null:s===r&&l===o?i:(o=l,i=t(r=s,a))}}function Kz(e,t){var n,r,o,i="style."+t,s="end."+i,a;return function(){var l=vn(this,e),c=l.on,u=l.value[i]==null?a||(a=xR(t)):void 0;(c!==n||o!==u)&&(r=(n=c).copy()).on(s,o=u),l.on=r}}function Xz(e,t,n){var r=(e+="")=="transform"?Q$:yR;return t==null?this.styleTween(e,Uz(e,r)).on("end.style."+e,xR(e)):typeof t=="function"?this.styleTween(e,Yz(e,r,e0(this,"style."+e,t))).each(Kz(this._id,e)):this.styleTween(e,Gz(e,r,t),n).on("end.style."+e,null)}function Qz(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function Zz(e,t,n){var r,o;function i(){var s=t.apply(this,arguments);return s!==o&&(r=(o=s)&&Qz(e,s,n)),r}return i._value=t,i}function Jz(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,Zz(e,t,n??""))}function eF(e){return function(){this.textContent=e}}function tF(e){return function(){var t=e(this);this.textContent=t??""}}function nF(e){return this.tween("text",typeof e=="function"?tF(e0(this,"text",e)):eF(e==null?"":e+""))}function rF(e){return function(t){this.textContent=e.call(this,t)}}function oF(e){var t,n;function r(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&rF(o)),t}return r._value=e,r}function iF(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,oF(e))}function sF(){for(var e=this._name,t=this._id,n=wR(),r=this._groups,o=r.length,i=0;i<o;++i)for(var s=r[i],a=s.length,l,c=0;c<a;++c)if(l=s[c]){var u=Yt(l,t);Ic(l,e,n,c,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Bn(r,this._parents,e,n)}function aF(){var e,t,n=this,r=n._id,o=n.size();return new Promise(function(i,s){var a={value:s},l={value:function(){--o===0&&i()}};n.each(function(){var c=vn(this,r),u=c.on;u!==e&&(t=(e=u).copy(),t._.cancel.push(a),t._.interrupt.push(a),t._.end.push(l)),c.on=t}),o===0&&i()})}var lF=0;function Bn(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function wR(){return++lF}var Nn=Xs.prototype;Bn.prototype={constructor:Bn,select:Bz,selectAll:Hz,selectChild:Nn.selectChild,selectChildren:Nn.selectChildren,filter:Oz,merge:Lz,selection:Wz,transition:sF,call:Nn.call,nodes:Nn.nodes,node:Nn.node,size:Nn.size,empty:Nn.empty,each:Nn.each,on:zz,attr:xz,attrTween:Ez,style:Xz,styleTween:Jz,text:nF,textTween:iF,remove:qz,tween:fz,delay:kz,duration:jz,ease:Az,easeVarying:Iz,end:aF,[Symbol.iterator]:Nn[Symbol.iterator]};function cF(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var uF={time:null,delay:0,duration:250,ease:cF};function dF(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function fF(e){var t,n;e instanceof Bn?(t=e._id,e=e._name):(t=wR(),(n=uF).time=Zy(),e=e==null?null:e+"");for(var r=this._groups,o=r.length,i=0;i<o;++i)for(var s=r[i],a=s.length,l,c=0;c<a;++c)(l=s[c])&&Ic(l,e,t,c,s,n||dF(l,t));return new Bn(r,this._parents,e,t)}Xs.prototype.interrupt=cz;Xs.prototype.transition=fF;const La=e=>()=>e;function hF(e,{sourceEvent:t,target:n,transform:r,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:o}})}function An(e,t,n){this.k=e,this.x=t,this.y=n}An.prototype={constructor:An,scale:function(e){return e===1?this:new An(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new An(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 Oc=new An(1,0,0);bR.prototype=An.prototype;function bR(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Oc;return e.__zoom}function ud(e){e.stopImmediatePropagation()}function Hi(e){e.preventDefault(),e.stopImmediatePropagation()}function pF(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function mF(){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 Vw(){return this.__zoom||Oc}function gF(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function vF(){return navigator.maxTouchPoints||"ontouchstart"in this}function yF(e,t,n){var r=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),s>i?(i+s)/2:Math.min(0,i)||Math.max(0,s))}function _R(){var e=pF,t=mF,n=yF,r=gF,o=vF,i=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],a=250,l=ll,c=Tc("start","zoom","end"),u,d,f,p=500,g=150,m=0,_=10;function v(R){R.property("__zoom",Vw).on("wheel.zoom",k,{passive:!1}).on("mousedown.zoom",T).on("dblclick.zoom",M).filter(o).on("touchstart.zoom",P).on("touchmove.zoom",I).on("touchend.zoom touchcancel.zoom",D).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}v.transform=function(R,O,j,L){var N=R.selection?R.selection():R;N.property("__zoom",Vw),R!==N?S(R,O,j,L):N.interrupt().each(function(){E(this,arguments).event(L).start().zoom(null,typeof O=="function"?O.apply(this,arguments):O).end()})},v.scaleBy=function(R,O,j,L){v.scaleTo(R,function(){var N=this.__zoom.k,A=typeof O=="function"?O.apply(this,arguments):O;return N*A},j,L)},v.scaleTo=function(R,O,j,L){v.transform(R,function(){var N=t.apply(this,arguments),A=this.__zoom,$=j==null?b(N):typeof j=="function"?j.apply(this,arguments):j,z=A.invert($),F=typeof O=="function"?O.apply(this,arguments):O;return n(x(w(A,F),$,z),N,s)},j,L)},v.translateBy=function(R,O,j,L){v.transform(R,function(){return n(this.__zoom.translate(typeof O=="function"?O.apply(this,arguments):O,typeof j=="function"?j.apply(this,arguments):j),t.apply(this,arguments),s)},null,L)},v.translateTo=function(R,O,j,L,N){v.transform(R,function(){var A=t.apply(this,arguments),$=this.__zoom,z=L==null?b(A):typeof L=="function"?L.apply(this,arguments):L;return n(Oc.translate(z[0],z[1]).scale($.k).translate(typeof O=="function"?-O.apply(this,arguments):-O,typeof j=="function"?-j.apply(this,arguments):-j),A,s)},L,N)};function w(R,O){return O=Math.max(i[0],Math.min(i[1],O)),O===R.k?R:new An(O,R.x,R.y)}function x(R,O,j){var L=O[0]-j[0]*R.k,N=O[1]-j[1]*R.k;return L===R.x&&N===R.y?R:new An(R.k,L,N)}function b(R){return[(+R[0][0]+ +R[1][0])/2,(+R[0][1]+ +R[1][1])/2]}function S(R,O,j,L){R.on("start.zoom",function(){E(this,arguments).event(L).start()}).on("interrupt.zoom end.zoom",function(){E(this,arguments).event(L).end()}).tween("zoom",function(){var N=this,A=arguments,$=E(N,A).event(L),z=t.apply(N,A),F=j==null?b(z):typeof j=="function"?j.apply(N,A):j,V=Math.max(z[1][0]-z[0][0],z[1][1]-z[0][1]),H=N.__zoom,X=typeof O=="function"?O.apply(N,A):O,Q=l(H.invert(F).concat(V/H.k),X.invert(F).concat(V/X.k));return function(q){if(q===1)q=X;else{var B=Q(q),G=V/B[2];q=new An(G,F[0]-B[0]*G,F[1]-B[1]*G)}$.zoom(null,q)}})}function E(R,O,j){return!j&&R.__zooming||new C(R,O)}function C(R,O){this.that=R,this.args=O,this.active=0,this.sourceEvent=null,this.extent=t.apply(R,O),this.taps=0}C.prototype={event:function(R){return R&&(this.sourceEvent=R),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(R,O){return this.mouse&&R!=="mouse"&&(this.mouse[1]=O.invert(this.mouse[0])),this.touch0&&R!=="touch"&&(this.touch0[1]=O.invert(this.touch0[0])),this.touch1&&R!=="touch"&&(this.touch1[1]=O.invert(this.touch1[0])),this.that.__zoom=O,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(R){var O=gt(this.that).datum();c.call(R,this.that,new hF(R,{sourceEvent:this.sourceEvent,target:v,transform:this.that.__zoom,dispatch:c}),O)}};function k(R,...O){if(!e.apply(this,arguments))return;var j=E(this,O).event(R),L=this.__zoom,N=Math.max(i[0],Math.min(i[1],L.k*Math.pow(2,r.apply(this,arguments)))),A=Dt(R);if(j.wheel)(j.mouse[0][0]!==A[0]||j.mouse[0][1]!==A[1])&&(j.mouse[1]=L.invert(j.mouse[0]=A)),clearTimeout(j.wheel);else{if(L.k===N)return;j.mouse=[A,L.invert(A)],dl(this),j.start()}Hi(R),j.wheel=setTimeout($,g),j.zoom("mouse",n(x(w(L,N),j.mouse[0],j.mouse[1]),j.extent,s));function $(){j.wheel=null,j.end()}}function T(R,...O){if(f||!e.apply(this,arguments))return;var j=R.currentTarget,L=E(this,O,!0).event(R),N=gt(R.view).on("mousemove.zoom",F,!0).on("mouseup.zoom",V,!0),A=Dt(R,j),$=R.clientX,z=R.clientY;iR(R.view),ud(R),L.mouse=[A,this.__zoom.invert(A)],dl(this),L.start();function F(H){if(Hi(H),!L.moved){var X=H.clientX-$,Q=H.clientY-z;L.moved=X*X+Q*Q>m}L.event(H).zoom("mouse",n(x(L.that.__zoom,L.mouse[0]=Dt(H,j),L.mouse[1]),L.extent,s))}function V(H){N.on("mousemove.zoom mouseup.zoom",null),sR(H.view,L.moved),Hi(H),L.event(H).end()}}function M(R,...O){if(e.apply(this,arguments)){var j=this.__zoom,L=Dt(R.changedTouches?R.changedTouches[0]:R,this),N=j.invert(L),A=j.k*(R.shiftKey?.5:2),$=n(x(w(j,A),L,N),t.apply(this,O),s);Hi(R),a>0?gt(this).transition().duration(a).call(S,$,L,R):gt(this).call(v.transform,$,L,R)}}function P(R,...O){if(e.apply(this,arguments)){var j=R.touches,L=j.length,N=E(this,O,R.changedTouches.length===L).event(R),A,$,z,F;for(ud(R),$=0;$<L;++$)z=j[$],F=Dt(z,this),F=[F,this.__zoom.invert(F),z.identifier],N.touch0?!N.touch1&&N.touch0[2]!==F[2]&&(N.touch1=F,N.taps=0):(N.touch0=F,A=!0,N.taps=1+!!u);u&&(u=clearTimeout(u)),A&&(N.taps<2&&(d=F[0],u=setTimeout(function(){u=null},p)),dl(this),N.start())}}function I(R,...O){if(this.__zooming){var j=E(this,O).event(R),L=R.changedTouches,N=L.length,A,$,z,F;for(Hi(R),A=0;A<N;++A)$=L[A],z=Dt($,this),j.touch0&&j.touch0[2]===$.identifier?j.touch0[0]=z:j.touch1&&j.touch1[2]===$.identifier&&(j.touch1[0]=z);if($=j.that.__zoom,j.touch1){var V=j.touch0[0],H=j.touch0[1],X=j.touch1[0],Q=j.touch1[1],q=(q=X[0]-V[0])*q+(q=X[1]-V[1])*q,B=(B=Q[0]-H[0])*B+(B=Q[1]-H[1])*B;$=w($,Math.sqrt(q/B)),z=[(V[0]+X[0])/2,(V[1]+X[1])/2],F=[(H[0]+Q[0])/2,(H[1]+Q[1])/2]}else if(j.touch0)z=j.touch0[0],F=j.touch0[1];else return;j.zoom("touch",n(x($,z,F),j.extent,s))}}function D(R,...O){if(this.__zooming){var j=E(this,O).event(R),L=R.changedTouches,N=L.length,A,$;for(ud(R),f&&clearTimeout(f),f=setTimeout(function(){f=null},p),A=0;A<N;++A)$=L[A],j.touch0&&j.touch0[2]===$.identifier?delete j.touch0:j.touch1&&j.touch1[2]===$.identifier&&delete j.touch1;if(j.touch1&&!j.touch0&&(j.touch0=j.touch1,delete j.touch1),j.touch0)j.touch0[1]=this.__zoom.invert(j.touch0[0]);else if(j.end(),j.taps===2&&($=Dt($,this),Math.hypot(d[0]-$[0],d[1]-$[1])<_)){var z=gt(this).on("dblclick.zoom");z&&z.apply(this,arguments)}}}return v.wheelDelta=function(R){return arguments.length?(r=typeof R=="function"?R:La(+R),v):r},v.filter=function(R){return arguments.length?(e=typeof R=="function"?R:La(!!R),v):e},v.touchable=function(R){return arguments.length?(o=typeof R=="function"?R:La(!!R),v):o},v.extent=function(R){return arguments.length?(t=typeof R=="function"?R:La([[+R[0][0],+R[0][1]],[+R[1][0],+R[1][1]]]),v):t},v.scaleExtent=function(R){return arguments.length?(i[0]=+R[0],i[1]=+R[1],v):[i[0],i[1]]},v.translateExtent=function(R){return arguments.length?(s[0][0]=+R[0][0],s[1][0]=+R[1][0],s[0][1]=+R[0][1],s[1][1]=+R[1][1],v):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},v.constrain=function(R){return arguments.length?(n=R,v):n},v.duration=function(R){return arguments.length?(a=+R,v):a},v.interpolate=function(R){return arguments.length?(l=R,v):l},v.on=function(){var R=c.on.apply(c,arguments);return R===c?v:R},v.clickDistance=function(R){return arguments.length?(m=(R=+R)*R,v):Math.sqrt(m)},v.tapDistance=function(R){return arguments.length?(_=+R,v):_},v}const mn={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:r}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},Ls=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],SR=["Enter"," ","Escape"],ER={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var ii;(function(e){e.Strict="strict",e.Loose="loose"})(ii||(ii={}));var Yr;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Yr||(Yr={}));var Ds;(function(e){e.Partial="partial",e.Full="full"})(Ds||(Ds={}));const CR={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var cr;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(cr||(cr={}));var si;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(si||(si={}));var te;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(te||(te={}));const Ww={[te.Left]:te.Right,[te.Right]:te.Left,[te.Top]:te.Bottom,[te.Bottom]:te.Top};function NR(e){return e===null?null:e?"valid":"invalid"}const kR=e=>"id"in e&&"source"in e&&"target"in e,xF=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),t0=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Zs=(e,t=[0,0])=>{const{width:n,height:r}=Gn(e),o=e.origin??t,i=n*o[0],s=r*o[1];return{x:e.position.x-i,y:e.position.y-s}},wF=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,o)=>{const i=typeof o=="string";let s=!t.nodeLookup&&!i?o:void 0;t.nodeLookup&&(s=i?t.nodeLookup.get(o):t0(o)?o:t.nodeLookup.get(o.id));const a=s?Kl(s,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Lc(r,a)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Dc(n)},Js=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(o=>{(t.filter===void 0||t.filter(o))&&(n=Lc(n,Kl(o)),r=!0)}),r?Dc(n):{x:0,y:0,width:0,height:0}},n0=(e,t,[n,r,o]=[0,0,1],i=!1,s=!1)=>{const a={...ta(t,[n,r,o]),width:t.width/o,height:t.height/o},l=[];for(const c of e.values()){const{measured:u,selectable:d=!0,hidden:f=!1}=c;if(s&&!d||f)continue;const p=u.width??c.width??c.initialWidth??null,g=u.height??c.height??c.initialHeight??null,m=$s(a,li(c)),_=(p??0)*(g??0),v=i&&m>0;(!c.internals.handleBounds||v||m>=_||c.dragging)&&l.push(c)}return l},bF=(e,t)=>{const n=new Set;return e.forEach(r=>{n.add(r.id)}),t.filter(r=>n.has(r.source)||n.has(r.target))};function _F(e,t){const n=new Map,r=t!=null&&t.nodes?new Set(t.nodes.map(o=>o.id)):null;return e.forEach(o=>{o.measured.width&&o.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!o.hidden)&&(!r||r.has(o.id))&&n.set(o.id,o)}),n}async function SF({nodes:e,width:t,height:n,panZoom:r,minZoom:o,maxZoom:i},s){if(e.size===0)return Promise.resolve(!0);const a=_F(e,s),l=Js(a),c=r0(l,t,n,(s==null?void 0:s.minZoom)??o,(s==null?void 0:s.maxZoom)??i,(s==null?void 0:s.padding)??.1);return await r.setViewport(c,{duration:s==null?void 0:s.duration,ease:s==null?void 0:s.ease,interpolate:s==null?void 0:s.interpolate}),Promise.resolve(!0)}function RR({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:o,onError:i}){const s=n.get(e),a=s.parentId?n.get(s.parentId):void 0,{x:l,y:c}=a?a.internals.positionAbsolute:{x:0,y:0},u=s.origin??r;let d=s.extent||o;if(s.extent==="parent"&&!s.expandParent)if(!a)i==null||i("005",mn.error005());else{const p=a.measured.width,g=a.measured.height;p&&g&&(d=[[l,c],[l+p,c+g]])}else a&&ci(s.extent)&&(d=[[s.extent[0][0]+l,s.extent[0][1]+c],[s.extent[1][0]+l,s.extent[1][1]+c]]);const f=ci(d)?ro(t,d,s.measured):t;return(s.measured.width===void 0||s.measured.height===void 0)&&(i==null||i("015",mn.error015())),{position:{x:f.x-l+(s.measured.width??0)*u[0],y:f.y-c+(s.measured.height??0)*u[1]},positionAbsolute:f}}async function EF({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:o}){const i=new Set(e.map(f=>f.id)),s=[];for(const f of n){if(f.deletable===!1)continue;const p=i.has(f.id),g=!p&&f.parentId&&s.find(m=>m.id===f.parentId);(p||g)&&s.push(f)}const a=new Set(t.map(f=>f.id)),l=r.filter(f=>f.deletable!==!1),u=bF(s,l);for(const f of l)a.has(f.id)&&!u.find(g=>g.id===f.id)&&u.push(f);if(!o)return{edges:u,nodes:s};const d=await o({nodes:s,edges:u});return typeof d=="boolean"?d?{edges:u,nodes:s}:{edges:[],nodes:[]}:d}const ai=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),ro=(e={x:0,y:0},t,n)=>({x:ai(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:ai(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function PR(e,t,n){const{width:r,height:o}=Gn(n),{x:i,y:s}=n.internals.positionAbsolute;return ro(e,[[i,s],[i+r,s+o]],t)}const Uw=(e,t,n)=>e<t?ai(Math.abs(e-t),1,t)/t:e>n?-ai(Math.abs(e-n),1,t)/t:0,jR=(e,t,n=15,r=40)=>{const o=Uw(e.x,r,t.width-r)*n,i=Uw(e.y,r,t.height-r)*n;return[o,i]},Lc=(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)}),Nv=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),Dc=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),li=(e,t=[0,0])=>{var o,i;const{x:n,y:r}=t0(e)?e.internals.positionAbsolute:Zs(e,t);return{x:n,y:r,width:((o=e.measured)==null?void 0:o.width)??e.width??e.initialWidth??0,height:((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0}},Kl=(e,t=[0,0])=>{var o,i;const{x:n,y:r}=t0(e)?e.internals.positionAbsolute:Zs(e,t);return{x:n,y:r,x2:n+(((o=e.measured)==null?void 0:o.width)??e.width??e.initialWidth??0),y2:r+(((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0)}},TR=(e,t)=>Dc(Lc(Nv(e),Nv(t))),$s=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},Gw=e=>qt(e.width)&&qt(e.height)&&qt(e.x)&&qt(e.y),qt=e=>!isNaN(e)&&isFinite(e),CF=(e,t)=>{},ea=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),ta=({x:e,y:t},[n,r,o],i=!1,s=[1,1])=>{const a={x:(e-n)/o,y:(t-r)/o};return i?ea(a,s):a},Xl=({x:e,y:t},[n,r,o])=>({x:e*o+n,y:t*o+r});function bo(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function NF(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=bo(e,n),o=bo(e,t);return{top:r,right:o,bottom:r,left:o,x:o*2,y:r*2}}if(typeof e=="object"){const r=bo(e.top??e.y??0,n),o=bo(e.bottom??e.y??0,n),i=bo(e.left??e.x??0,t),s=bo(e.right??e.x??0,t);return{top:r,right:s,bottom:o,left:i,x:i+s,y:r+o}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function kF(e,t,n,r,o,i){const{x:s,y:a}=Xl(e,[t,n,r]),{x:l,y:c}=Xl({x:e.x+e.width,y:e.y+e.height},[t,n,r]),u=o-l,d=i-c;return{left:Math.floor(s),top:Math.floor(a),right:Math.floor(u),bottom:Math.floor(d)}}const r0=(e,t,n,r,o,i)=>{const s=NF(i,t,n),a=(t-s.x)/e.width,l=(n-s.y)/e.height,c=Math.min(a,l),u=ai(c,r,o),d=e.x+e.width/2,f=e.y+e.height/2,p=t/2-d*u,g=n/2-f*u,m=kF(e,p,g,u,t,n),_={left:Math.min(m.left-s.left,0),top:Math.min(m.top-s.top,0),right:Math.min(m.right-s.right,0),bottom:Math.min(m.bottom-s.bottom,0)};return{x:p-_.left+_.right,y:g-_.top+_.bottom,zoom:u}},zs=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function ci(e){return e!=null&&e!=="parent"}function Gn(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function AR(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function MR(e,t={width:0,height:0},n,r,o){const i={...e},s=r.get(n);if(s){const a=s.origin||o;i.x+=s.internals.positionAbsolute.x-(t.width??0)*a[0],i.y+=s.internals.positionAbsolute.y-(t.height??0)*a[1]}return i}function Yw(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function RF(){let e,t;return{promise:new Promise((r,o)=>{e=r,t=o}),resolve:e,reject:t}}function PF(e){return{...ER,...e||{}}}function hs(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:o}){const{x:i,y:s}=Bt(e),a=ta({x:i-((o==null?void 0:o.left)??0),y:s-((o==null?void 0:o.top)??0)},r),{x:l,y:c}=n?ea(a,t):a;return{xSnapped:l,ySnapped:c,...a}}const o0=e=>({width:e.offsetWidth,height:e.offsetHeight}),IR=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},jF=["INPUT","SELECT","TEXTAREA"];function OR(e){var r,o;const t=((o=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:o[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:jF.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const LR=e=>"clientX"in e,Bt=(e,t)=>{var i,s;const n=LR(e),r=n?e.clientX:(i=e.touches)==null?void 0:i[0].clientX,o=n?e.clientY:(s=e.touches)==null?void 0:s[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:o-((t==null?void 0:t.top)??0)}},Kw=(e,t,n,r,o)=>{const i=t.querySelectorAll(`.${e}`);return!i||!i.length?null:Array.from(i).map(s=>{const a=s.getBoundingClientRect();return{id:s.getAttribute("data-handleid"),type:e,nodeId:o,position:s.getAttribute("data-handlepos"),x:(a.left-n.left)/r,y:(a.top-n.top)/r,...o0(s)}})};function DR({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:o,sourceControlY:i,targetControlX:s,targetControlY:a}){const l=e*.125+o*.375+s*.375+n*.125,c=t*.125+i*.375+a*.375+r*.125,u=Math.abs(l-e),d=Math.abs(c-t);return[l,c,u,d]}function Da(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Xw({pos:e,x1:t,y1:n,x2:r,y2:o,c:i}){switch(e){case te.Left:return[t-Da(t-r,i),n];case te.Right:return[t+Da(r-t,i),n];case te.Top:return[t,n-Da(n-o,i)];case te.Bottom:return[t,n+Da(o-n,i)]}}function $R({sourceX:e,sourceY:t,sourcePosition:n=te.Bottom,targetX:r,targetY:o,targetPosition:i=te.Top,curvature:s=.25}){const[a,l]=Xw({pos:n,x1:e,y1:t,x2:r,y2:o,c:s}),[c,u]=Xw({pos:i,x1:r,y1:o,x2:e,y2:t,c:s}),[d,f,p,g]=DR({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:a,sourceControlY:l,targetControlX:c,targetControlY:u});return[`M${e},${t} C${a},${l} ${c},${u} ${r},${o}`,d,f,p,g]}function zR({sourceX:e,sourceY:t,targetX:n,targetY:r}){const o=Math.abs(n-e)/2,i=n<e?n+o:n-o,s=Math.abs(r-t)/2,a=r<t?r+s:r-s;return[i,a,o,s]}function TF({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:o=!1,zIndexMode:i="basic"}){if(i==="manual")return r;const s=o&&n?r+1e3:r,a=Math.max(e.parentId||o&&e.selected?e.internals.z:0,t.parentId||o&&t.selected?t.internals.z:0);return s+a}function AF({sourceNode:e,targetNode:t,width:n,height:r,transform:o}){const i=Lc(Kl(e),Kl(t));i.x===i.x2&&(i.x2+=1),i.y===i.y2&&(i.y2+=1);const s={x:-o[0]/o[2],y:-o[1]/o[2],width:n/o[2],height:r/o[2]};return $s(s,Dc(i))>0}const MF=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,IF=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),OF=(e,t,n={})=>{if(!e.source||!e.target)return t;const r=n.getEdgeId||MF;let o;return kR(e)?o={...e}:o={...e,id:r(e)},IF(o,t)?t:(o.sourceHandle===null&&delete o.sourceHandle,o.targetHandle===null&&delete o.targetHandle,t.concat(o))};function FR({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[o,i,s,a]=zR({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,o,i,s,a]}const Qw={[te.Left]:{x:-1,y:0},[te.Right]:{x:1,y:0},[te.Top]:{x:0,y:-1},[te.Bottom]:{x:0,y:1}},LF=({source:e,sourcePosition:t=te.Bottom,target:n})=>t===te.Left||t===te.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},Zw=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function DF({source:e,sourcePosition:t=te.Bottom,target:n,targetPosition:r=te.Top,center:o,offset:i,stepPosition:s}){const a=Qw[t],l=Qw[r],c={x:e.x+a.x*i,y:e.y+a.y*i},u={x:n.x+l.x*i,y:n.y+l.y*i},d=LF({source:c,sourcePosition:t,target:u}),f=d.x!==0?"x":"y",p=d[f];let g=[],m,_;const v={x:0,y:0},w={x:0,y:0},[,,x,b]=zR({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(a[f]*l[f]===-1){f==="x"?(m=o.x??c.x+(u.x-c.x)*s,_=o.y??(c.y+u.y)/2):(m=o.x??(c.x+u.x)/2,_=o.y??c.y+(u.y-c.y)*s);const E=[{x:m,y:c.y},{x:m,y:u.y}],C=[{x:c.x,y:_},{x:u.x,y:_}];a[f]===p?g=f==="x"?E:C:g=f==="x"?C:E}else{const E=[{x:c.x,y:u.y}],C=[{x:u.x,y:c.y}];if(f==="x"?g=a.x===p?C:E:g=a.y===p?E:C,t===r){const I=Math.abs(e[f]-n[f]);if(I<=i){const D=Math.min(i-1,i-I);a[f]===p?v[f]=(c[f]>e[f]?-1:1)*D:w[f]=(u[f]>n[f]?-1:1)*D}}if(t!==r){const I=f==="x"?"y":"x",D=a[f]===l[I],R=c[I]>u[I],O=c[I]<u[I];(a[f]===1&&(!D&&R||D&&O)||a[f]!==1&&(!D&&O||D&&R))&&(g=f==="x"?E:C)}const k={x:c.x+v.x,y:c.y+v.y},T={x:u.x+w.x,y:u.y+w.y},M=Math.max(Math.abs(k.x-g[0].x),Math.abs(T.x-g[0].x)),P=Math.max(Math.abs(k.y-g[0].y),Math.abs(T.y-g[0].y));M>=P?(m=(k.x+T.x)/2,_=g[0].y):(m=g[0].x,_=(k.y+T.y)/2)}return[[e,{x:c.x+v.x,y:c.y+v.y},...g,{x:u.x+w.x,y:u.y+w.y},n],m,_,x,b]}function $F(e,t,n,r){const o=Math.min(Zw(e,t)/2,Zw(t,n)/2,r),{x:i,y:s}=t;if(e.x===i&&i===n.x||e.y===s&&s===n.y)return`L${i} ${s}`;if(e.y===s){const c=e.x<n.x?-1:1,u=e.y<n.y?1:-1;return`L ${i+o*c},${s}Q ${i},${s} ${i},${s+o*u}`}const a=e.x<n.x?1:-1,l=e.y<n.y?-1:1;return`L ${i},${s+o*l}Q ${i},${s} ${i+o*a},${s}`}function kv({sourceX:e,sourceY:t,sourcePosition:n=te.Bottom,targetX:r,targetY:o,targetPosition:i=te.Top,borderRadius:s=5,centerX:a,centerY:l,offset:c=20,stepPosition:u=.5}){const[d,f,p,g,m]=DF({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:o},targetPosition:i,center:{x:a,y:l},offset:c,stepPosition:u});return[d.reduce((v,w,x)=>{let b="";return x>0&&x<d.length-1?b=$F(d[x-1],w,d[x+1],s):b=`${x===0?"M":"L"}${w.x} ${w.y}`,v+=b,v},""),f,p,g,m]}function Jw(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function zF(e){var d;const{sourceNode:t,targetNode:n}=e;if(!Jw(t)||!Jw(n))return null;const r=t.internals.handleBounds||eb(t.handles),o=n.internals.handleBounds||eb(n.handles),i=tb((r==null?void 0:r.source)??[],e.sourceHandle),s=tb(e.connectionMode===ii.Strict?(o==null?void 0:o.target)??[]:((o==null?void 0:o.target)??[]).concat((o==null?void 0:o.source)??[]),e.targetHandle);if(!i||!s)return(d=e.onError)==null||d.call(e,"008",mn.error008(i?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const a=(i==null?void 0:i.position)||te.Bottom,l=(s==null?void 0:s.position)||te.Top,c=oo(t,i,a),u=oo(n,s,l);return{sourceX:c.x,sourceY:c.y,targetX:u.x,targetY:u.y,sourcePosition:a,targetPosition:l}}function eb(e){if(!e)return null;const t=[],n=[];for(const r of e)r.width=r.width??1,r.height=r.height??1,r.type==="source"?t.push(r):r.type==="target"&&n.push(r);return{source:t,target:n}}function oo(e,t,n=te.Left,r=!1){const o=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,i=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:s,height:a}=t??Gn(e);if(r)return{x:o+s/2,y:i+a/2};switch((t==null?void 0:t.position)??n){case te.Top:return{x:o+s/2,y:i};case te.Right:return{x:o+s,y:i+a/2};case te.Bottom:return{x:o+s/2,y:i+a};case te.Left:return{x:o,y:i+a/2}}}function tb(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function Rv(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function FF(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:o}){const i=new Set;return e.reduce((s,a)=>([a.markerStart||r,a.markerEnd||o].forEach(l=>{if(l&&typeof l=="object"){const c=Rv(l,t);i.has(c)||(s.push({id:c,color:l.color||n,...l}),i.add(c))}}),s),[]).sort((s,a)=>s.id.localeCompare(a.id))}const qR=1e3,qF=10,i0={nodeOrigin:[0,0],nodeExtent:Ls,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},BF={...i0,checkEquality:!0};function s0(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function HF(e,t,n){const r=s0(i0,n);for(const o of e.values())if(o.parentId)l0(o,e,t,r);else{const i=Zs(o,r.nodeOrigin),s=ci(o.extent)?o.extent:r.nodeExtent,a=ro(i,s,Gn(o));o.internals.positionAbsolute=a}}function VF(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const n=[],r=[];for(const o of e.handles){const i={id:o.id,width:o.width??1,height:o.height??1,nodeId:e.id,x:o.x,y:o.y,position:o.position,type:o.type};o.type==="source"?n.push(i):o.type==="target"&&r.push(i)}return{source:n,target:r}}function a0(e){return e==="manual"}function Pv(e,t,n,r={}){var c,u;const o=s0(BF,r),i={i:0},s=new Map(t),a=o!=null&&o.elevateNodesOnSelect&&!a0(o.zIndexMode)?qR:0;let l=e.length>0;t.clear(),n.clear();for(const d of e){let f=s.get(d.id);if(o.checkEquality&&d===(f==null?void 0:f.internals.userNode))t.set(d.id,f);else{const p=Zs(d,o.nodeOrigin),g=ci(d.extent)?d.extent:o.nodeExtent,m=ro(p,g,Gn(d));f={...o.defaults,...d,measured:{width:(c=d.measured)==null?void 0:c.width,height:(u=d.measured)==null?void 0:u.height},internals:{positionAbsolute:m,handleBounds:VF(d,f),z:BR(d,a,o.zIndexMode),userNode:d}},t.set(d.id,f)}(f.measured===void 0||f.measured.width===void 0||f.measured.height===void 0)&&!f.hidden&&(l=!1),d.parentId&&l0(f,t,n,r,i)}return l}function WF(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function l0(e,t,n,r,o){const{elevateNodesOnSelect:i,nodeOrigin:s,nodeExtent:a,zIndexMode:l}=s0(i0,r),c=e.parentId,u=t.get(c);if(!u){console.warn(`Parent node ${c} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}WF(e,n),o&&!u.parentId&&u.internals.rootParentIndex===void 0&&l==="auto"&&(u.internals.rootParentIndex=++o.i,u.internals.z=u.internals.z+o.i*qF),o&&u.internals.rootParentIndex!==void 0&&(o.i=u.internals.rootParentIndex);const d=i&&!a0(l)?qR:0,{x:f,y:p,z:g}=UF(e,u,s,a,d,l),{positionAbsolute:m}=e.internals,_=f!==m.x||p!==m.y;(_||g!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:_?{x:f,y:p}:m,z:g}})}function BR(e,t,n){const r=qt(e.zIndex)?e.zIndex:0;return a0(n)?r:r+(e.selected?t:0)}function UF(e,t,n,r,o,i){const{x:s,y:a}=t.internals.positionAbsolute,l=Gn(e),c=Zs(e,n),u=ci(e.extent)?ro(c,e.extent,l):c;let d=ro({x:s+u.x,y:a+u.y},r,l);e.extent==="parent"&&(d=PR(d,l,t));const f=BR(e,o,i),p=t.internals.z??0;return{x:d.x,y:d.y,z:p>=f?p+1:f}}function c0(e,t,n,r=[0,0]){var s;const o=[],i=new Map;for(const a of e){const l=t.get(a.parentId);if(!l)continue;const c=((s=i.get(a.parentId))==null?void 0:s.expandedRect)??li(l),u=TR(c,a.rect);i.set(a.parentId,{expandedRect:u,parent:l})}return i.size>0&&i.forEach(({expandedRect:a,parent:l},c)=>{var x;const u=l.internals.positionAbsolute,d=Gn(l),f=l.origin??r,p=a.x<u.x?Math.round(Math.abs(u.x-a.x)):0,g=a.y<u.y?Math.round(Math.abs(u.y-a.y)):0,m=Math.max(d.width,Math.round(a.width)),_=Math.max(d.height,Math.round(a.height)),v=(m-d.width)*f[0],w=(_-d.height)*f[1];(p>0||g>0||v||w)&&(o.push({id:c,type:"position",position:{x:l.position.x-p+v,y:l.position.y-g+w}}),(x=n.get(c))==null||x.forEach(b=>{e.some(S=>S.id===b.id)||o.push({id:b.id,type:"position",position:{x:b.position.x+p,y:b.position.y+g}})})),(d.width<a.width||d.height<a.height||p||g)&&o.push({id:c,type:"dimensions",setAttributes:!0,dimensions:{width:m+(p?f[0]*p-v:0),height:_+(g?f[1]*g-w:0)}})}),o}function GF(e,t,n,r,o,i,s){const a=r==null?void 0:r.querySelector(".xyflow__viewport");let l=!1;if(!a)return{changes:[],updatedInternals:l};const c=[],u=window.getComputedStyle(a),{m22:d}=new window.DOMMatrixReadOnly(u.transform),f=[];for(const p of e.values()){const g=t.get(p.id);if(!g)continue;if(g.hidden){t.set(g.id,{...g,internals:{...g.internals,handleBounds:void 0}}),l=!0;continue}const m=o0(p.nodeElement),_=g.measured.width!==m.width||g.measured.height!==m.height;if(!!(m.width&&m.height&&(_||!g.internals.handleBounds||p.force))){const w=p.nodeElement.getBoundingClientRect(),x=ci(g.extent)?g.extent:i;let{positionAbsolute:b}=g.internals;g.parentId&&g.extent==="parent"?b=PR(b,m,t.get(g.parentId)):x&&(b=ro(b,x,m));const S={...g,measured:m,internals:{...g.internals,positionAbsolute:b,handleBounds:{source:Kw("source",p.nodeElement,w,d,g.id),target:Kw("target",p.nodeElement,w,d,g.id)}}};t.set(g.id,S),g.parentId&&l0(S,t,n,{nodeOrigin:o,zIndexMode:s}),l=!0,_&&(c.push({id:g.id,type:"dimensions",dimensions:m}),g.expandParent&&g.parentId&&f.push({id:g.id,parentId:g.parentId,rect:li(S,o)}))}}if(f.length>0){const p=c0(f,t,n,o);c.push(...p)}return{changes:c,updatedInternals:l}}async function YF({delta:e,panZoom:t,transform:n,translateExtent:r,width:o,height:i}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const s=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[o,i]],r),a=!!s&&(s.x!==n[0]||s.y!==n[1]||s.k!==n[2]);return Promise.resolve(a)}function nb(e,t,n,r,o,i){let s=o;const a=r.get(s)||new Map;r.set(s,a.set(n,t)),s=`${o}-${e}`;const l=r.get(s)||new Map;if(r.set(s,l.set(n,t)),i){s=`${o}-${e}-${i}`;const c=r.get(s)||new Map;r.set(s,c.set(n,t))}}function HR(e,t,n){e.clear(),t.clear();for(const r of n){const{source:o,target:i,sourceHandle:s=null,targetHandle:a=null}=r,l={edgeId:r.id,source:o,target:i,sourceHandle:s,targetHandle:a},c=`${o}-${s}--${i}-${a}`,u=`${i}-${a}--${o}-${s}`;nb("source",l,u,e,o,s),nb("target",l,c,e,i,a),t.set(r.id,r)}}function VR(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:VR(n,t):!1}function rb(e,t,n){var o;let r=e;do{if((o=r==null?void 0:r.matches)!=null&&o.call(r,t))return!0;if(r===n)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function KF(e,t,n,r){const o=new Map;for(const[i,s]of e)if((s.selected||s.id===r)&&(!s.parentId||!VR(s,e))&&(s.draggable||t&&typeof s.draggable>"u")){const a=e.get(i);a&&o.set(i,{id:i,position:a.position||{x:0,y:0},distance:{x:n.x-a.internals.positionAbsolute.x,y:n.y-a.internals.positionAbsolute.y},extent:a.extent,parentId:a.parentId,origin:a.origin,expandParent:a.expandParent,internals:{positionAbsolute:a.internals.positionAbsolute||{x:0,y:0}},measured:{width:a.measured.width??0,height:a.measured.height??0}})}return o}function dd({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){var s,a,l;const o=[];for(const[c,u]of t){const d=(s=n.get(c))==null?void 0:s.internals.userNode;d&&o.push({...d,position:u.position,dragging:r})}if(!e)return[o[0],o];const i=(a=n.get(e))==null?void 0:a.internals.userNode;return[i?{...i,position:((l=t.get(e))==null?void 0:l.position)||i.position,dragging:r}:o[0],o]}function XF({dragItems:e,snapGrid:t,x:n,y:r}){const o=e.values().next().value;if(!o)return null;const i={x:n-o.distance.x,y:r-o.distance.y},s=ea(i,t);return{x:s.x-i.x,y:s.y-i.y}}function QF({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:o}){let i={x:null,y:null},s=0,a=new Map,l=!1,c={x:0,y:0},u=null,d=!1,f=null,p=!1,g=!1,m=null;function _({noDragClassName:w,handleSelector:x,domNode:b,isSelectable:S,nodeId:E,nodeClickDistance:C=0}){f=gt(b);function k({x:I,y:D}){const{nodeLookup:R,nodeExtent:O,snapGrid:j,snapToGrid:L,nodeOrigin:N,onNodeDrag:A,onSelectionDrag:$,onError:z,updateNodePositions:F}=t();i={x:I,y:D};let V=!1;const H=a.size>1,X=H&&O?Nv(Js(a)):null,Q=H&&L?XF({dragItems:a,snapGrid:j,x:I,y:D}):null;for(const[q,B]of a){if(!R.has(q))continue;let G={x:I-B.distance.x,y:D-B.distance.y};L&&(G=Q?{x:Math.round(G.x+Q.x),y:Math.round(G.y+Q.y)}:ea(G,j));let Z=null;if(H&&O&&!B.extent&&X){const{positionAbsolute:J}=B.internals,se=J.x-X.x+O[0][0],oe=J.x+B.measured.width-X.x2+O[1][0],le=J.y-X.y+O[0][1],ie=J.y+B.measured.height-X.y2+O[1][1];Z=[[se,le],[oe,ie]]}const{position:Y,positionAbsolute:U}=RR({nodeId:q,nextPosition:G,nodeLookup:R,nodeExtent:Z||O,nodeOrigin:N,onError:z});V=V||B.position.x!==Y.x||B.position.y!==Y.y,B.position=Y,B.internals.positionAbsolute=U}if(g=g||V,!!V&&(F(a,!0),m&&(r||A||!E&&$))){const[q,B]=dd({nodeId:E,dragItems:a,nodeLookup:R});r==null||r(m,a,q,B),A==null||A(m,q,B),E||$==null||$(m,B)}}async function T(){if(!u)return;const{transform:I,panBy:D,autoPanSpeed:R,autoPanOnNodeDrag:O}=t();if(!O){l=!1,cancelAnimationFrame(s);return}const[j,L]=jR(c,u,R);(j!==0||L!==0)&&(i.x=(i.x??0)-j/I[2],i.y=(i.y??0)-L/I[2],await D({x:j,y:L})&&k(i)),s=requestAnimationFrame(T)}function M(I){var H;const{nodeLookup:D,multiSelectionActive:R,nodesDraggable:O,transform:j,snapGrid:L,snapToGrid:N,selectNodesOnDrag:A,onNodeDragStart:$,onSelectionDragStart:z,unselectNodesAndEdges:F}=t();d=!0,(!A||!S)&&!R&&E&&((H=D.get(E))!=null&&H.selected||F()),S&&A&&E&&(e==null||e(E));const V=hs(I.sourceEvent,{transform:j,snapGrid:L,snapToGrid:N,containerBounds:u});if(i=V,a=KF(D,O,V,E),a.size>0&&(n||$||!E&&z)){const[X,Q]=dd({nodeId:E,dragItems:a,nodeLookup:D});n==null||n(I.sourceEvent,a,X,Q),$==null||$(I.sourceEvent,X,Q),E||z==null||z(I.sourceEvent,Q)}}const P=aR().clickDistance(C).on("start",I=>{const{domNode:D,nodeDragThreshold:R,transform:O,snapGrid:j,snapToGrid:L}=t();u=(D==null?void 0:D.getBoundingClientRect())||null,p=!1,g=!1,m=I.sourceEvent,R===0&&M(I),i=hs(I.sourceEvent,{transform:O,snapGrid:j,snapToGrid:L,containerBounds:u}),c=Bt(I.sourceEvent,u)}).on("drag",I=>{const{autoPanOnNodeDrag:D,transform:R,snapGrid:O,snapToGrid:j,nodeDragThreshold:L,nodeLookup:N}=t(),A=hs(I.sourceEvent,{transform:R,snapGrid:O,snapToGrid:j,containerBounds:u});if(m=I.sourceEvent,(I.sourceEvent.type==="touchmove"&&I.sourceEvent.touches.length>1||E&&!N.has(E))&&(p=!0),!p){if(!l&&D&&d&&(l=!0,T()),!d){const $=Bt(I.sourceEvent,u),z=$.x-c.x,F=$.y-c.y;Math.sqrt(z*z+F*F)>L&&M(I)}(i.x!==A.xSnapped||i.y!==A.ySnapped)&&a&&d&&(c=Bt(I.sourceEvent,u),k(A))}}).on("end",I=>{if(!(!d||p)&&(l=!1,d=!1,cancelAnimationFrame(s),a.size>0)){const{nodeLookup:D,updateNodePositions:R,onNodeDragStop:O,onSelectionDragStop:j}=t();if(g&&(R(a,!1),g=!1),o||O||!E&&j){const[L,N]=dd({nodeId:E,dragItems:a,nodeLookup:D,dragging:!1});o==null||o(I.sourceEvent,a,L,N),O==null||O(I.sourceEvent,L,N),E||j==null||j(I.sourceEvent,N)}}}).filter(I=>{const D=I.target;return!I.button&&(!w||!rb(D,`.${w}`,b))&&(!x||rb(D,x,b))});f.call(P)}function v(){f==null||f.on(".drag",null)}return{update:_,destroy:v}}function ZF(e,t,n){const r=[],o={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const i of t.values())$s(o,li(i))>0&&r.push(i);return r}const JF=250;function eq(e,t,n,r){var a,l;let o=[],i=1/0;const s=ZF(e,n,t+JF);for(const c of s){const u=[...((a=c.internals.handleBounds)==null?void 0:a.source)??[],...((l=c.internals.handleBounds)==null?void 0:l.target)??[]];for(const d of u){if(r.nodeId===d.nodeId&&r.type===d.type&&r.id===d.id)continue;const{x:f,y:p}=oo(c,d,d.position,!0),g=Math.sqrt(Math.pow(f-e.x,2)+Math.pow(p-e.y,2));g>t||(g<i?(o=[{...d,x:f,y:p}],i=g):g===i&&o.push({...d,x:f,y:p}))}}if(!o.length)return null;if(o.length>1){const c=r.type==="source"?"target":"source";return o.find(u=>u.type===c)??o[0]}return o[0]}function WR(e,t,n,r,o,i=!1){var c,u,d;const s=r.get(e);if(!s)return null;const a=o==="strict"?(c=s.internals.handleBounds)==null?void 0:c[t]:[...((u=s.internals.handleBounds)==null?void 0:u.source)??[],...((d=s.internals.handleBounds)==null?void 0:d.target)??[]],l=(n?a==null?void 0:a.find(f=>f.id===n):a==null?void 0:a[0])??null;return l&&i?{...l,...oo(s,l,l.position,!0)}:l}function UR(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function tq(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const GR=()=>!0;function nq(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:o,edgeUpdaterType:i,isTarget:s,domNode:a,nodeLookup:l,lib:c,autoPanOnConnect:u,flowId:d,panBy:f,cancelConnection:p,onConnectStart:g,onConnect:m,onConnectEnd:_,isValidConnection:v=GR,onReconnectEnd:w,updateConnection:x,getTransform:b,getFromHandle:S,autoPanSpeed:E,dragThreshold:C=1,handleDomNode:k}){const T=IR(e.target);let M=0,P;const{x:I,y:D}=Bt(e),R=UR(i,k),O=a==null?void 0:a.getBoundingClientRect();let j=!1;if(!O||!R)return;const L=WR(o,R,r,l,t);if(!L)return;let N=Bt(e,O),A=!1,$=null,z=!1,F=null;function V(){if(!u||!O)return;const[Y,U]=jR(N,O,E);f({x:Y,y:U}),M=requestAnimationFrame(V)}const H={...L,nodeId:o,type:R,position:L.position},X=l.get(o);let q={inProgress:!0,isValid:null,from:oo(X,H,te.Left,!0),fromHandle:H,fromPosition:H.position,fromNode:X,to:N,toHandle:null,toPosition:Ww[H.position],toNode:null,pointer:N};function B(){j=!0,x(q),g==null||g(e,{nodeId:o,handleId:r,handleType:R})}C===0&&B();function G(Y){if(!j){const{x:ie,y:Be}=Bt(Y),Te=ie-I,bn=Be-D;if(!(Te*Te+bn*bn>C*C))return;B()}if(!S()||!H){Z(Y);return}const U=b();N=Bt(Y,O),P=eq(ta(N,U,!1,[1,1]),n,l,H),A||(V(),A=!0);const J=YR(Y,{handle:P,connectionMode:t,fromNodeId:o,fromHandleId:r,fromType:s?"target":"source",isValidConnection:v,doc:T,lib:c,flowId:d,nodeLookup:l});F=J.handleDomNode,$=J.connection,z=tq(!!P,J.isValid);const se=l.get(o),oe=se?oo(se,H,te.Left,!0):q.from,le={...q,from:oe,isValid:z,to:J.toHandle&&z?Xl({x:J.toHandle.x,y:J.toHandle.y},U):N,toHandle:J.toHandle,toPosition:z&&J.toHandle?J.toHandle.position:Ww[H.position],toNode:J.toHandle?l.get(J.toHandle.nodeId):null,pointer:N};x(le),q=le}function Z(Y){if(!("touches"in Y&&Y.touches.length>0)){if(j){(P||F)&&$&&z&&(m==null||m($));const{inProgress:U,...J}=q,se={...J,toPosition:q.toHandle?q.toPosition:null};_==null||_(Y,se),i&&(w==null||w(Y,se))}p(),cancelAnimationFrame(M),A=!1,z=!1,$=null,F=null,T.removeEventListener("mousemove",G),T.removeEventListener("mouseup",Z),T.removeEventListener("touchmove",G),T.removeEventListener("touchend",Z)}}T.addEventListener("mousemove",G),T.addEventListener("mouseup",Z),T.addEventListener("touchmove",G),T.addEventListener("touchend",Z)}function YR(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:o,fromType:i,doc:s,lib:a,flowId:l,isValidConnection:c=GR,nodeLookup:u}){const d=i==="target",f=t?s.querySelector(`.${a}-flow__handle[data-id="${l}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:p,y:g}=Bt(e),m=s.elementFromPoint(p,g),_=m!=null&&m.classList.contains(`${a}-flow__handle`)?m:f,v={handleDomNode:_,isValid:!1,connection:null,toHandle:null};if(_){const w=UR(void 0,_),x=_.getAttribute("data-nodeid"),b=_.getAttribute("data-handleid"),S=_.classList.contains("connectable"),E=_.classList.contains("connectableend");if(!x||!w)return v;const C={source:d?x:r,sourceHandle:d?b:o,target:d?r:x,targetHandle:d?o:b};v.connection=C;const T=S&&E&&(n===ii.Strict?d&&w==="source"||!d&&w==="target":x!==r||b!==o);v.isValid=T&&c(C),v.toHandle=WR(x,w,b,u,n,!0)}return v}const jv={onPointerDown:nq,isValid:YR};function rq({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const o=gt(e);function i({translateExtent:a,width:l,height:c,zoomStep:u=1,pannable:d=!0,zoomable:f=!0,inversePan:p=!1}){const g=x=>{if(x.sourceEvent.type!=="wheel"||!t)return;const b=n(),S=x.sourceEvent.ctrlKey&&zs()?10:1,E=-x.sourceEvent.deltaY*(x.sourceEvent.deltaMode===1?.05:x.sourceEvent.deltaMode?1:.002)*u,C=b[2]*Math.pow(2,E*S);t.scaleTo(C)};let m=[0,0];const _=x=>{(x.sourceEvent.type==="mousedown"||x.sourceEvent.type==="touchstart")&&(m=[x.sourceEvent.clientX??x.sourceEvent.touches[0].clientX,x.sourceEvent.clientY??x.sourceEvent.touches[0].clientY])},v=x=>{const b=n();if(x.sourceEvent.type!=="mousemove"&&x.sourceEvent.type!=="touchmove"||!t)return;const S=[x.sourceEvent.clientX??x.sourceEvent.touches[0].clientX,x.sourceEvent.clientY??x.sourceEvent.touches[0].clientY],E=[S[0]-m[0],S[1]-m[1]];m=S;const C=r()*Math.max(b[2],Math.log(b[2]))*(p?-1:1),k={x:b[0]-E[0]*C,y:b[1]-E[1]*C},T=[[0,0],[l,c]];t.setViewportConstrained({x:k.x,y:k.y,zoom:b[2]},T,a)},w=_R().on("start",_).on("zoom",d?v:null).on("zoom.wheel",f?g:null);o.call(w,{})}function s(){o.on("zoom",null)}return{update:i,destroy:s,pointer:Dt}}const $c=e=>({x:e.x,y:e.y,zoom:e.k}),fd=({x:e,y:t,zoom:n})=>Oc.translate(e,t).scale(n),$o=(e,t)=>e.target.closest(`.${t}`),KR=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),oq=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,hd=(e,t=0,n=oq,r=()=>{})=>{const o=typeof t=="number"&&t>0;return o||r(),o?e.transition().duration(t).ease(n).on("end",r):e},XR=e=>{const t=e.ctrlKey&&zs()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function iq({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:o,panOnScrollSpeed:i,zoomOnPinch:s,onPanZoomStart:a,onPanZoom:l,onPanZoomEnd:c}){return u=>{if($o(u,t))return u.ctrlKey&&u.preventDefault(),!1;u.preventDefault(),u.stopImmediatePropagation();const d=n.property("__zoom").k||1;if(u.ctrlKey&&s){const _=Dt(u),v=XR(u),w=d*Math.pow(2,v);r.scaleTo(n,w,_,u);return}const f=u.deltaMode===1?20:1;let p=o===Yr.Vertical?0:u.deltaX*f,g=o===Yr.Horizontal?0:u.deltaY*f;!zs()&&u.shiftKey&&o!==Yr.Vertical&&(p=u.deltaY*f,g=0),r.translateBy(n,-(p/d)*i,-(g/d)*i,{internal:!0});const m=$c(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(l==null||l(u,m),e.panScrollTimeout=setTimeout(()=>{c==null||c(u,m),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,a==null||a(u,m))}}function sq({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,o){const i=r.type==="wheel",s=!t&&i&&!r.ctrlKey,a=$o(r,e);if(r.ctrlKey&&i&&a&&r.preventDefault(),s||a)return null;r.preventDefault(),n.call(this,r,o)}}function aq({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var i,s,a;if((i=r.sourceEvent)!=null&&i.internal)return;const o=$c(r.transform);e.mouseButton=((s=r.sourceEvent)==null?void 0:s.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=o,((a=r.sourceEvent)==null?void 0:a.type)==="mousedown"&&t(!0),n&&(n==null||n(r.sourceEvent,o))}}function lq({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:o}){return i=>{var s,a;e.usedRightMouseButton=!!(n&&KR(t,e.mouseButton??0)),(s=i.sourceEvent)!=null&&s.sync||r([i.transform.x,i.transform.y,i.transform.k]),o&&!((a=i.sourceEvent)!=null&&a.internal)&&(o==null||o(i.sourceEvent,$c(i.transform)))}}function cq({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:o,onPaneContextMenu:i}){return s=>{var a;if(!((a=s.sourceEvent)!=null&&a.internal)&&(e.isZoomingOrPanning=!1,i&&KR(t,e.mouseButton??0)&&!e.usedRightMouseButton&&s.sourceEvent&&i(s.sourceEvent),e.usedRightMouseButton=!1,r(!1),o)){const l=$c(s.transform);e.prevViewport=l,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{o==null||o(s.sourceEvent,l)},n?150:0)}}}function uq({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:o,zoomOnDoubleClick:i,userSelectionActive:s,noWheelClassName:a,noPanClassName:l,lib:c,connectionInProgress:u}){return d=>{var _;const f=e||t,p=n&&d.ctrlKey,g=d.type==="wheel";if(d.button===1&&d.type==="mousedown"&&($o(d,`${c}-flow__node`)||$o(d,`${c}-flow__edge`)))return!0;if(!r&&!f&&!o&&!i&&!n||s||u&&!g||$o(d,a)&&g||$o(d,l)&&(!g||o&&g&&!e)||!n&&d.ctrlKey&&g)return!1;if(!n&&d.type==="touchstart"&&((_=d.touches)==null?void 0:_.length)>1)return d.preventDefault(),!1;if(!f&&!o&&!p&&g||!r&&(d.type==="mousedown"||d.type==="touchstart")||Array.isArray(r)&&!r.includes(d.button)&&d.type==="mousedown")return!1;const m=Array.isArray(r)&&r.includes(d.button)||!d.button||d.button<=1;return(!d.ctrlKey||g)&&m}}function dq({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:o,onPanZoom:i,onPanZoomStart:s,onPanZoomEnd:a,onDraggingChange:l}){const c={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},u=e.getBoundingClientRect(),d=_R().scaleExtent([t,n]).translateExtent(r),f=gt(e).call(d);w({x:o.x,y:o.y,zoom:ai(o.zoom,t,n)},[[0,0],[u.width,u.height]],r);const p=f.on("wheel.zoom"),g=f.on("dblclick.zoom");d.wheelDelta(XR);function m(P,I){return f?new Promise(D=>{d==null||d.interpolate((I==null?void 0:I.interpolate)==="linear"?fs:ll).transform(hd(f,I==null?void 0:I.duration,I==null?void 0:I.ease,()=>D(!0)),P)}):Promise.resolve(!1)}function _({noWheelClassName:P,noPanClassName:I,onPaneContextMenu:D,userSelectionActive:R,panOnScroll:O,panOnDrag:j,panOnScrollMode:L,panOnScrollSpeed:N,preventScrolling:A,zoomOnPinch:$,zoomOnScroll:z,zoomOnDoubleClick:F,zoomActivationKeyPressed:V,lib:H,onTransformChange:X,connectionInProgress:Q,paneClickDistance:q,selectionOnDrag:B}){R&&!c.isZoomingOrPanning&&v();const G=O&&!V&&!R;d.clickDistance(B?1/0:!qt(q)||q<0?0:q);const Z=G?iq({zoomPanValues:c,noWheelClassName:P,d3Selection:f,d3Zoom:d,panOnScrollMode:L,panOnScrollSpeed:N,zoomOnPinch:$,onPanZoomStart:s,onPanZoom:i,onPanZoomEnd:a}):sq({noWheelClassName:P,preventScrolling:A,d3ZoomHandler:p});if(f.on("wheel.zoom",Z,{passive:!1}),!R){const U=aq({zoomPanValues:c,onDraggingChange:l,onPanZoomStart:s});d.on("start",U);const J=lq({zoomPanValues:c,panOnDrag:j,onPaneContextMenu:!!D,onPanZoom:i,onTransformChange:X});d.on("zoom",J);const se=cq({zoomPanValues:c,panOnDrag:j,panOnScroll:O,onPaneContextMenu:D,onPanZoomEnd:a,onDraggingChange:l});d.on("end",se)}const Y=uq({zoomActivationKeyPressed:V,panOnDrag:j,zoomOnScroll:z,panOnScroll:O,zoomOnDoubleClick:F,zoomOnPinch:$,userSelectionActive:R,noPanClassName:I,noWheelClassName:P,lib:H,connectionInProgress:Q});d.filter(Y),F?f.on("dblclick.zoom",g):f.on("dblclick.zoom",null)}function v(){d.on("zoom",null)}async function w(P,I,D){const R=fd(P),O=d==null?void 0:d.constrain()(R,I,D);return O&&await m(O),new Promise(j=>j(O))}async function x(P,I){const D=fd(P);return await m(D,I),new Promise(R=>R(D))}function b(P){if(f){const I=fd(P),D=f.property("__zoom");(D.k!==P.zoom||D.x!==P.x||D.y!==P.y)&&(d==null||d.transform(f,I,null,{sync:!0}))}}function S(){const P=f?bR(f.node()):{x:0,y:0,k:1};return{x:P.x,y:P.y,zoom:P.k}}function E(P,I){return f?new Promise(D=>{d==null||d.interpolate((I==null?void 0:I.interpolate)==="linear"?fs:ll).scaleTo(hd(f,I==null?void 0:I.duration,I==null?void 0:I.ease,()=>D(!0)),P)}):Promise.resolve(!1)}function C(P,I){return f?new Promise(D=>{d==null||d.interpolate((I==null?void 0:I.interpolate)==="linear"?fs:ll).scaleBy(hd(f,I==null?void 0:I.duration,I==null?void 0:I.ease,()=>D(!0)),P)}):Promise.resolve(!1)}function k(P){d==null||d.scaleExtent(P)}function T(P){d==null||d.translateExtent(P)}function M(P){const I=!qt(P)||P<0?0:P;d==null||d.clickDistance(I)}return{update:_,destroy:v,setViewport:x,setViewportConstrained:w,getViewport:S,scaleTo:E,scaleBy:C,setScaleExtent:k,setTranslateExtent:T,syncViewport:b,setClickDistance:M}}var ui;(function(e){e.Line="line",e.Handle="handle"})(ui||(ui={}));function fq({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:o,affectsY:i}){const s=e-t,a=n-r,l=[s>0?1:s<0?-1:0,a>0?1:a<0?-1:0];return s&&o&&(l[0]=l[0]*-1),a&&i&&(l[1]=l[1]*-1),l}function ob(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),r=e.includes("left"),o=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:r,affectsY:o}}function tr(e,t){return Math.max(0,t-e)}function nr(e,t){return Math.max(0,e-t)}function $a(e,t,n){return Math.max(0,t-e,e-n)}function ib(e,t){return e?!t:t}function hq(e,t,n,r,o,i,s,a){let{affectsX:l,affectsY:c}=t;const{isHorizontal:u,isVertical:d}=t,f=u&&d,{xSnapped:p,ySnapped:g}=n,{minWidth:m,maxWidth:_,minHeight:v,maxHeight:w}=r,{x,y:b,width:S,height:E,aspectRatio:C}=e;let k=Math.floor(u?p-e.pointerX:0),T=Math.floor(d?g-e.pointerY:0);const M=S+(l?-k:k),P=E+(c?-T:T),I=-i[0]*S,D=-i[1]*E;let R=$a(M,m,_),O=$a(P,v,w);if(s){let N=0,A=0;l&&k<0?N=tr(x+k+I,s[0][0]):!l&&k>0&&(N=nr(x+M+I,s[1][0])),c&&T<0?A=tr(b+T+D,s[0][1]):!c&&T>0&&(A=nr(b+P+D,s[1][1])),R=Math.max(R,N),O=Math.max(O,A)}if(a){let N=0,A=0;l&&k>0?N=nr(x+k,a[0][0]):!l&&k<0&&(N=tr(x+M,a[1][0])),c&&T>0?A=nr(b+T,a[0][1]):!c&&T<0&&(A=tr(b+P,a[1][1])),R=Math.max(R,N),O=Math.max(O,A)}if(o){if(u){const N=$a(M/C,v,w)*C;if(R=Math.max(R,N),s){let A=0;!l&&!c||l&&!c&&f?A=nr(b+D+M/C,s[1][1])*C:A=tr(b+D+(l?k:-k)/C,s[0][1])*C,R=Math.max(R,A)}if(a){let A=0;!l&&!c||l&&!c&&f?A=tr(b+M/C,a[1][1])*C:A=nr(b+(l?k:-k)/C,a[0][1])*C,R=Math.max(R,A)}}if(d){const N=$a(P*C,m,_)/C;if(O=Math.max(O,N),s){let A=0;!l&&!c||c&&!l&&f?A=nr(x+P*C+I,s[1][0])/C:A=tr(x+(c?T:-T)*C+I,s[0][0])/C,O=Math.max(O,A)}if(a){let A=0;!l&&!c||c&&!l&&f?A=tr(x+P*C,a[1][0])/C:A=nr(x+(c?T:-T)*C,a[0][0])/C,O=Math.max(O,A)}}}T=T+(T<0?O:-O),k=k+(k<0?R:-R),o&&(f?M>P*C?T=(ib(l,c)?-k:k)/C:k=(ib(l,c)?-T:T)*C:u?(T=k/C,c=l):(k=T*C,l=c));const j=l?x+k:x,L=c?b+T:b;return{width:S+(l?-k:k),height:E+(c?-T:T),x:i[0]*k*(l?-1:1)+j,y:i[1]*T*(c?-1:1)+L}}const QR={width:0,height:0,x:0,y:0},pq={...QR,pointerX:0,pointerY:0,aspectRatio:1};function mq(e){return[[0,0],[e.measured.width,e.measured.height]]}function gq(e,t,n){const r=t.position.x+e.position.x,o=t.position.y+e.position.y,i=e.measured.width??0,s=e.measured.height??0,a=n[0]*i,l=n[1]*s;return[[r-a,o-l],[r+i-a,o+s-l]]}function vq({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:o}){const i=gt(e);let s={controlDirection:ob("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function a({controlPosition:c,boundaries:u,keepAspectRatio:d,resizeDirection:f,onResizeStart:p,onResize:g,onResizeEnd:m,shouldResize:_}){let v={...QR},w={...pq};s={boundaries:u,resizeDirection:f,keepAspectRatio:d,controlDirection:ob(c)};let x,b=null,S=[],E,C,k,T=!1;const M=aR().on("start",P=>{const{nodeLookup:I,transform:D,snapGrid:R,snapToGrid:O,nodeOrigin:j,paneDomNode:L}=n();if(x=I.get(t),!x)return;b=(L==null?void 0:L.getBoundingClientRect())??null;const{xSnapped:N,ySnapped:A}=hs(P.sourceEvent,{transform:D,snapGrid:R,snapToGrid:O,containerBounds:b});v={width:x.measured.width??0,height:x.measured.height??0,x:x.position.x??0,y:x.position.y??0},w={...v,pointerX:N,pointerY:A,aspectRatio:v.width/v.height},E=void 0,x.parentId&&(x.extent==="parent"||x.expandParent)&&(E=I.get(x.parentId),C=E&&x.extent==="parent"?mq(E):void 0),S=[],k=void 0;for(const[$,z]of I)if(z.parentId===t&&(S.push({id:$,position:{...z.position},extent:z.extent}),z.extent==="parent"||z.expandParent)){const F=gq(z,x,z.origin??j);k?k=[[Math.min(F[0][0],k[0][0]),Math.min(F[0][1],k[0][1])],[Math.max(F[1][0],k[1][0]),Math.max(F[1][1],k[1][1])]]:k=F}p==null||p(P,{...v})}).on("drag",P=>{const{transform:I,snapGrid:D,snapToGrid:R,nodeOrigin:O}=n(),j=hs(P.sourceEvent,{transform:I,snapGrid:D,snapToGrid:R,containerBounds:b}),L=[];if(!x)return;const{x:N,y:A,width:$,height:z}=v,F={},V=x.origin??O,{width:H,height:X,x:Q,y:q}=hq(w,s.controlDirection,j,s.boundaries,s.keepAspectRatio,V,C,k),B=H!==$,G=X!==z,Z=Q!==N&&B,Y=q!==A&&G;if(!Z&&!Y&&!B&&!G)return;if((Z||Y||V[0]===1||V[1]===1)&&(F.x=Z?Q:v.x,F.y=Y?q:v.y,v.x=F.x,v.y=F.y,S.length>0)){const oe=Q-N,le=q-A;for(const ie of S)ie.position={x:ie.position.x-oe+V[0]*(H-$),y:ie.position.y-le+V[1]*(X-z)},L.push(ie)}if((B||G)&&(F.width=B&&(!s.resizeDirection||s.resizeDirection==="horizontal")?H:v.width,F.height=G&&(!s.resizeDirection||s.resizeDirection==="vertical")?X:v.height,v.width=F.width,v.height=F.height),E&&x.expandParent){const oe=V[0]*(F.width??0);F.x&&F.x<oe&&(v.x=oe,w.x=w.x-(F.x-oe));const le=V[1]*(F.height??0);F.y&&F.y<le&&(v.y=le,w.y=w.y-(F.y-le))}const U=fq({width:v.width,prevWidth:$,height:v.height,prevHeight:z,affectsX:s.controlDirection.affectsX,affectsY:s.controlDirection.affectsY}),J={...v,direction:U};(_==null?void 0:_(P,J))!==!1&&(T=!0,g==null||g(P,J),r(F,L))}).on("end",P=>{T&&(m==null||m(P,{...v}),o==null||o({...v}),T=!1)});i.call(M)}function l(){i.on(".drag",null)}return{update:a,destroy:l}}var ZR={exports:{}},JR={},eP={exports:{}},tP={};/**
|
|
271
|
+
* @license React
|
|
272
|
+
* use-sync-external-store-shim.production.js
|
|
273
|
+
*
|
|
274
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
275
|
+
*
|
|
276
|
+
* This source code is licensed under the MIT license found in the
|
|
277
|
+
* LICENSE file in the root directory of this source tree.
|
|
278
|
+
*/var di=y;function yq(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xq=typeof Object.is=="function"?Object.is:yq,wq=di.useState,bq=di.useEffect,_q=di.useLayoutEffect,Sq=di.useDebugValue;function Eq(e,t){var n=t(),r=wq({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return _q(function(){o.value=n,o.getSnapshot=t,pd(o)&&i({inst:o})},[e,n,t]),bq(function(){return pd(o)&&i({inst:o}),e(function(){pd(o)&&i({inst:o})})},[e]),Sq(n),n}function pd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!xq(e,n)}catch{return!0}}function Cq(e,t){return t()}var Nq=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Cq:Eq;tP.useSyncExternalStore=di.useSyncExternalStore!==void 0?di.useSyncExternalStore:Nq;eP.exports=tP;var kq=eP.exports;/**
|
|
279
|
+
* @license React
|
|
280
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
281
|
+
*
|
|
282
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
283
|
+
*
|
|
284
|
+
* This source code is licensed under the MIT license found in the
|
|
285
|
+
* LICENSE file in the root directory of this source tree.
|
|
286
|
+
*/var zc=y,Rq=kq;function Pq(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var jq=typeof Object.is=="function"?Object.is:Pq,Tq=Rq.useSyncExternalStore,Aq=zc.useRef,Mq=zc.useEffect,Iq=zc.useMemo,Oq=zc.useDebugValue;JR.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=Aq(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=Iq(function(){function l(p){if(!c){if(c=!0,u=p,p=r(p),o!==void 0&&s.hasValue){var g=s.value;if(o(g,p))return d=g}return d=p}if(g=d,jq(u,p))return g;var m=r(p);return o!==void 0&&o(g,m)?(u=p,g):(u=p,d=m)}var c=!1,u,d,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,o]);var a=Tq(e,i[0],i[1]);return Mq(function(){s.hasValue=!0,s.value=a},[a]),Oq(a),a};ZR.exports=JR;var Lq=ZR.exports;const Dq=hc(Lq),$q={},sb=e=>{let t;const n=new Set,r=(u,d)=>{const f=typeof u=="function"?u(t):u;if(!Object.is(f,t)){const p=t;t=d??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(g=>g(t,p))}},o=()=>t,l={setState:r,getState:o,getInitialState:()=>c,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{($q?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},c=t=e(r,o,l);return l},zq=e=>e?sb(e):sb,{useDebugValue:Fq}=rn,{useSyncExternalStoreWithSelector:qq}=Dq,Bq=e=>e;function nP(e,t=Bq,n){const r=qq(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return Fq(r),r}const ab=(e,t)=>{const n=zq(e),r=(o,i=t)=>nP(n,o,i);return Object.assign(r,n),r},Hq=(e,t)=>e?ab(e,t):ab;function Ee(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,o]of e)if(!Object.is(o,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}const Fc=y.createContext(null),Vq=Fc.Provider,rP=mn.error001();function me(e,t){const n=y.useContext(Fc);if(n===null)throw new Error(rP);return nP(n,e,t)}function Ce(){const e=y.useContext(Fc);if(e===null)throw new Error(rP);return y.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const lb={display:"none"},Wq={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},oP="react-flow__node-desc",iP="react-flow__edge-desc",Uq="react-flow__aria-live",Gq=e=>e.ariaLiveMessage,Yq=e=>e.ariaLabelConfig;function Kq({rfId:e}){const t=me(Gq);return h.jsx("div",{id:`${Uq}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:Wq,children:t})}function Xq({rfId:e,disableKeyboardA11y:t}){const n=me(Yq);return h.jsxs(h.Fragment,{children:[h.jsx("div",{id:`${oP}-${e}`,style:lb,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),h.jsx("div",{id:`${iP}-${e}`,style:lb,children:n["edge.a11yDescription.default"]}),!t&&h.jsx(Kq,{rfId:e})]})}const qc=y.forwardRef(({position:e="top-left",children:t,className:n,style:r,...o},i)=>{const s=`${e}`.split("-");return h.jsx("div",{className:Oe(["react-flow__panel",n,...s]),style:r,ref:i,...o,children:t})});qc.displayName="Panel";function Qq({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:h.jsx(qc,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:h.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const Zq=e=>{const t=[],n=[];for(const[,r]of e.nodeLookup)r.selected&&t.push(r.internals.userNode);for(const[,r]of e.edgeLookup)r.selected&&n.push(r);return{selectedNodes:t,selectedEdges:n}},za=e=>e.id;function Jq(e,t){return Ee(e.selectedNodes.map(za),t.selectedNodes.map(za))&&Ee(e.selectedEdges.map(za),t.selectedEdges.map(za))}function e8({onSelectionChange:e}){const t=Ce(),{selectedNodes:n,selectedEdges:r}=me(Zq,Jq);return y.useEffect(()=>{const o={nodes:n,edges:r};e==null||e(o),t.getState().onSelectionChangeHandlers.forEach(i=>i(o))},[n,r,e]),null}const t8=e=>!!e.onSelectionChangeHandlers;function n8({onSelectionChange:e}){const t=me(t8);return e||t?h.jsx(e8,{onSelectionChange:e}):null}const sP=[0,0],r8={x:0,y:0,zoom:1},o8=["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"],cb=[...o8,"rfId"],i8=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}),ub={translateExtent:Ls,nodeOrigin:sP,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function s8(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:o,setTranslateExtent:i,setNodeExtent:s,reset:a,setDefaultNodesAndEdges:l}=me(i8,Ee),c=Ce();y.useEffect(()=>(l(e.defaultNodes,e.defaultEdges),()=>{u.current=ub,a()}),[]);const u=y.useRef(ub);return y.useEffect(()=>{for(const d of cb){const f=e[d],p=u.current[d];f!==p&&(typeof e[d]>"u"||(d==="nodes"?t(f):d==="edges"?n(f):d==="minZoom"?r(f):d==="maxZoom"?o(f):d==="translateExtent"?i(f):d==="nodeExtent"?s(f):d==="ariaLabelConfig"?c.setState({ariaLabelConfig:PF(f)}):d==="fitView"?c.setState({fitViewQueued:f}):d==="fitViewOptions"?c.setState({fitViewOptions:f}):c.setState({[d]:f})))}u.current=e},cb.map(d=>e[d])),null}function db(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function a8(e){var r;const[t,n]=y.useState(e==="system"?null:e);return y.useEffect(()=>{if(e!=="system"){n(e);return}const o=db(),i=()=>n(o!=null&&o.matches?"dark":"light");return i(),o==null||o.addEventListener("change",i),()=>{o==null||o.removeEventListener("change",i)}},[e]),t!==null?t:(r=db())!=null&&r.matches?"dark":"light"}const fb=typeof document<"u"?document:null;function Fs(e=null,t={target:fb,actInsideInputWithModifier:!0}){const[n,r]=y.useState(!1),o=y.useRef(!1),i=y.useRef(new Set([])),[s,a]=y.useMemo(()=>{if(e!==null){const c=(Array.isArray(e)?e:[e]).filter(d=>typeof d=="string").map(d=>d.replace("+",`
|
|
287
|
+
`).replace(`
|
|
288
|
+
|
|
289
|
+
`,`
|
|
290
|
+
+`).split(`
|
|
291
|
+
`)),u=c.reduce((d,f)=>d.concat(...f),[]);return[c,u]}return[[],[]]},[e]);return y.useEffect(()=>{const l=(t==null?void 0:t.target)??fb,c=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const u=p=>{var _,v;if(o.current=p.ctrlKey||p.metaKey||p.shiftKey||p.altKey,(!o.current||o.current&&!c)&&OR(p))return!1;const m=pb(p.code,a);if(i.current.add(p[m]),hb(s,i.current,!1)){const w=((v=(_=p.composedPath)==null?void 0:_.call(p))==null?void 0:v[0])||p.target,x=(w==null?void 0:w.nodeName)==="BUTTON"||(w==null?void 0:w.nodeName)==="A";t.preventDefault!==!1&&(o.current||!x)&&p.preventDefault(),r(!0)}},d=p=>{const g=pb(p.code,a);hb(s,i.current,!0)?(r(!1),i.current.clear()):i.current.delete(p[g]),p.key==="Meta"&&i.current.clear(),o.current=!1},f=()=>{i.current.clear(),r(!1)};return l==null||l.addEventListener("keydown",u),l==null||l.addEventListener("keyup",d),window.addEventListener("blur",f),window.addEventListener("contextmenu",f),()=>{l==null||l.removeEventListener("keydown",u),l==null||l.removeEventListener("keyup",d),window.removeEventListener("blur",f),window.removeEventListener("contextmenu",f)}}},[e,r]),n}function hb(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(o=>t.has(o)))}function pb(e,t){return t.includes(e)?"code":"key"}const l8=()=>{const e=Ce();return y.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(t,{duration:n==null?void 0:n.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[r,o,i],panZoom:s}=e.getState();return s?(await s.setViewport({x:t.x??r,y:t.y??o,zoom:t.zoom??i},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{const{width:r,height:o,minZoom:i,maxZoom:s,panZoom:a}=e.getState(),l=r0(t,r,o,i,s,(n==null?void 0:n.padding)??.1);return a?(await a.setViewport(l,{duration:n==null?void 0:n.duration,ease:n==null?void 0:n.ease,interpolate:n==null?void 0:n.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:r,snapGrid:o,snapToGrid:i,domNode:s}=e.getState();if(!s)return t;const{x:a,y:l}=s.getBoundingClientRect(),c={x:t.x-a,y:t.y-l},u=n.snapGrid??o,d=n.snapToGrid??i;return ta(c,r,d,u)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:o,y:i}=r.getBoundingClientRect(),s=Xl(t,n);return{x:s.x+o,y:s.y+i}}}),[])};function aP(e,t){const n=[],r=new Map,o=[];for(const i of e)if(i.type==="add"){o.push(i);continue}else if(i.type==="remove"||i.type==="replace")r.set(i.id,[i]);else{const s=r.get(i.id);s?s.push(i):r.set(i.id,[i])}for(const i of t){const s=r.get(i.id);if(!s){n.push(i);continue}if(s[0].type==="remove")continue;if(s[0].type==="replace"){n.push({...s[0].item});continue}const a={...i};for(const l of s)c8(l,a);n.push(a)}return o.length&&o.forEach(i=>{i.index!==void 0?n.splice(i.index,0,{...i.item}):n.push({...i.item})}),n}function c8(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 lP(e,t){return aP(e,t)}function cP(e,t){return aP(e,t)}function zr(e,t){return{id:e,type:"select",selected:t}}function zo(e,t=new Set,n=!1){const r=[];for(const[o,i]of e){const s=t.has(o);!(i.selected===void 0&&!s)&&i.selected!==s&&(n&&(i.selected=s),r.push(zr(i.id,s)))}return r}function mb({items:e=[],lookup:t}){var o;const n=[],r=new Map(e.map(i=>[i.id,i]));for(const[i,s]of e.entries()){const a=t.get(s.id),l=((o=a==null?void 0:a.internals)==null?void 0:o.userNode)??a;l!==void 0&&l!==s&&n.push({id:s.id,item:s,type:"replace"}),l===void 0&&n.push({item:s,type:"add",index:i})}for(const[i]of t)r.get(i)===void 0&&n.push({id:i,type:"remove"});return n}function gb(e){return{id:e.id,type:"remove"}}const vb=e=>xF(e),u8=e=>kR(e);function uP(e){return y.forwardRef(e)}const d8=typeof window<"u"?y.useLayoutEffect:y.useEffect;function yb(e){const[t,n]=y.useState(BigInt(0)),[r]=y.useState(()=>f8(()=>n(o=>o+BigInt(1))));return d8(()=>{const o=r.get();o.length&&(e(o),r.reset())},[t]),r}function f8(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const dP=y.createContext(null);function h8({children:e}){const t=Ce(),n=y.useCallback(a=>{const{nodes:l=[],setNodes:c,hasDefaultNodes:u,onNodesChange:d,nodeLookup:f,fitViewQueued:p,onNodesChangeMiddlewareMap:g}=t.getState();let m=l;for(const v of a)m=typeof v=="function"?v(m):v;let _=mb({items:m,lookup:f});for(const v of g.values())_=v(_);u&&c(m),_.length>0?d==null||d(_):p&&window.requestAnimationFrame(()=>{const{fitViewQueued:v,nodes:w,setNodes:x}=t.getState();v&&x(w)})},[]),r=yb(n),o=y.useCallback(a=>{const{edges:l=[],setEdges:c,hasDefaultEdges:u,onEdgesChange:d,edgeLookup:f}=t.getState();let p=l;for(const g of a)p=typeof g=="function"?g(p):g;u?c(p):d&&d(mb({items:p,lookup:f}))},[]),i=yb(o),s=y.useMemo(()=>({nodeQueue:r,edgeQueue:i}),[]);return h.jsx(dP.Provider,{value:s,children:e})}function p8(){const e=y.useContext(dP);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const m8=e=>!!e.panZoom;function u0(){const e=l8(),t=Ce(),n=p8(),r=me(m8),o=y.useMemo(()=>{const i=d=>t.getState().nodeLookup.get(d),s=d=>{n.nodeQueue.push(d)},a=d=>{n.edgeQueue.push(d)},l=d=>{var v,w;const{nodeLookup:f,nodeOrigin:p}=t.getState(),g=vb(d)?d:f.get(d.id),m=g.parentId?MR(g.position,g.measured,g.parentId,f,p):g.position,_={...g,position:m,width:((v=g.measured)==null?void 0:v.width)??g.width,height:((w=g.measured)==null?void 0:w.height)??g.height};return li(_)},c=(d,f,p={replace:!1})=>{s(g=>g.map(m=>{if(m.id===d){const _=typeof f=="function"?f(m):f;return p.replace&&vb(_)?_:{...m,..._}}return m}))},u=(d,f,p={replace:!1})=>{a(g=>g.map(m=>{if(m.id===d){const _=typeof f=="function"?f(m):f;return p.replace&&u8(_)?_:{...m,..._}}return m}))};return{getNodes:()=>t.getState().nodes.map(d=>({...d})),getNode:d=>{var f;return(f=i(d))==null?void 0:f.internals.userNode},getInternalNode:i,getEdges:()=>{const{edges:d=[]}=t.getState();return d.map(f=>({...f}))},getEdge:d=>t.getState().edgeLookup.get(d),setNodes:s,setEdges:a,addNodes:d=>{const f=Array.isArray(d)?d:[d];n.nodeQueue.push(p=>[...p,...f])},addEdges:d=>{const f=Array.isArray(d)?d:[d];n.edgeQueue.push(p=>[...p,...f])},toObject:()=>{const{nodes:d=[],edges:f=[],transform:p}=t.getState(),[g,m,_]=p;return{nodes:d.map(v=>({...v})),edges:f.map(v=>({...v})),viewport:{x:g,y:m,zoom:_}}},deleteElements:async({nodes:d=[],edges:f=[]})=>{const{nodes:p,edges:g,onNodesDelete:m,onEdgesDelete:_,triggerNodeChanges:v,triggerEdgeChanges:w,onDelete:x,onBeforeDelete:b}=t.getState(),{nodes:S,edges:E}=await EF({nodesToRemove:d,edgesToRemove:f,nodes:p,edges:g,onBeforeDelete:b}),C=E.length>0,k=S.length>0;if(C){const T=E.map(gb);_==null||_(E),w(T)}if(k){const T=S.map(gb);m==null||m(S),v(T)}return(k||C)&&(x==null||x({nodes:S,edges:E})),{deletedNodes:S,deletedEdges:E}},getIntersectingNodes:(d,f=!0,p)=>{const g=Gw(d),m=g?d:l(d),_=p!==void 0;return m?(p||t.getState().nodes).filter(v=>{const w=t.getState().nodeLookup.get(v.id);if(w&&!g&&(v.id===d.id||!w.internals.positionAbsolute))return!1;const x=li(_?v:w),b=$s(x,m);return f&&b>0||b>=x.width*x.height||b>=m.width*m.height}):[]},isNodeIntersecting:(d,f,p=!0)=>{const m=Gw(d)?d:l(d);if(!m)return!1;const _=$s(m,f);return p&&_>0||_>=f.width*f.height||_>=m.width*m.height},updateNode:c,updateNodeData:(d,f,p={replace:!1})=>{c(d,g=>{const m=typeof f=="function"?f(g):f;return p.replace?{...g,data:m}:{...g,data:{...g.data,...m}}},p)},updateEdge:u,updateEdgeData:(d,f,p={replace:!1})=>{u(d,g=>{const m=typeof f=="function"?f(g):f;return p.replace?{...g,data:m}:{...g,data:{...g.data,...m}}},p)},getNodesBounds:d=>{const{nodeLookup:f,nodeOrigin:p}=t.getState();return wF(d,{nodeLookup:f,nodeOrigin:p})},getHandleConnections:({type:d,id:f,nodeId:p})=>{var g;return Array.from(((g=t.getState().connectionLookup.get(`${p}-${d}${f?`-${f}`:""}`))==null?void 0:g.values())??[])},getNodeConnections:({type:d,handleId:f,nodeId:p})=>{var g;return Array.from(((g=t.getState().connectionLookup.get(`${p}${d?f?`-${d}-${f}`:`-${d}`:""}`))==null?void 0:g.values())??[])},fitView:async d=>{const f=t.getState().fitViewResolver??RF();return t.setState({fitViewQueued:!0,fitViewOptions:d,fitViewResolver:f}),n.nodeQueue.push(p=>[...p]),f.promise}}},[]);return y.useMemo(()=>({...o,...e,viewportInitialized:r}),[r])}const xb=e=>e.selected,g8=typeof window<"u"?window:void 0;function v8({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=Ce(),{deleteElements:r}=u0(),o=Fs(e,{actInsideInputWithModifier:!1}),i=Fs(t,{target:g8});y.useEffect(()=>{if(o){const{edges:s,nodes:a}=n.getState();r({nodes:a.filter(xb),edges:s.filter(xb)}),n.setState({nodesSelectionActive:!1})}},[o]),y.useEffect(()=>{n.setState({multiSelectionActive:i})},[i])}function y8(e){const t=Ce();y.useEffect(()=>{const n=()=>{var o,i,s,a;if(!e.current||!(((i=(o=e.current).checkVisibility)==null?void 0:i.call(o))??!0))return!1;const r=o0(e.current);(r.height===0||r.width===0)&&((a=(s=t.getState()).onError)==null||a.call(s,"004",mn.error004())),t.setState({width:r.width||500,height:r.height||500})};if(e.current){n(),window.addEventListener("resize",n);const r=new ResizeObserver(()=>n());return r.observe(e.current),()=>{window.removeEventListener("resize",n),r&&e.current&&r.unobserve(e.current)}}},[])}const Bc={position:"absolute",width:"100%",height:"100%",top:0,left:0},x8=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function w8({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:o=.5,panOnScrollMode:i=Yr.Free,zoomOnDoubleClick:s=!0,panOnDrag:a=!0,defaultViewport:l,translateExtent:c,minZoom:u,maxZoom:d,zoomActivationKeyCode:f,preventScrolling:p=!0,children:g,noWheelClassName:m,noPanClassName:_,onViewportChange:v,isControlledViewport:w,paneClickDistance:x,selectionOnDrag:b}){const S=Ce(),E=y.useRef(null),{userSelectionActive:C,lib:k,connectionInProgress:T}=me(x8,Ee),M=Fs(f),P=y.useRef();y8(E);const I=y.useCallback(D=>{v==null||v({x:D[0],y:D[1],zoom:D[2]}),w||S.setState({transform:D})},[v,w]);return y.useEffect(()=>{if(E.current){P.current=dq({domNode:E.current,minZoom:u,maxZoom:d,translateExtent:c,viewport:l,onDraggingChange:j=>S.setState({paneDragging:j}),onPanZoomStart:(j,L)=>{const{onViewportChangeStart:N,onMoveStart:A}=S.getState();A==null||A(j,L),N==null||N(L)},onPanZoom:(j,L)=>{const{onViewportChange:N,onMove:A}=S.getState();A==null||A(j,L),N==null||N(L)},onPanZoomEnd:(j,L)=>{const{onViewportChangeEnd:N,onMoveEnd:A}=S.getState();A==null||A(j,L),N==null||N(L)}});const{x:D,y:R,zoom:O}=P.current.getViewport();return S.setState({panZoom:P.current,transform:[D,R,O],domNode:E.current.closest(".react-flow")}),()=>{var j;(j=P.current)==null||j.destroy()}}},[]),y.useEffect(()=>{var D;(D=P.current)==null||D.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:o,panOnScrollMode:i,zoomOnDoubleClick:s,panOnDrag:a,zoomActivationKeyPressed:M,preventScrolling:p,noPanClassName:_,userSelectionActive:C,noWheelClassName:m,lib:k,onTransformChange:I,connectionInProgress:T,selectionOnDrag:b,paneClickDistance:x})},[e,t,n,r,o,i,s,a,M,p,_,C,m,k,I,T,b,x]),h.jsx("div",{className:"react-flow__renderer",ref:E,style:Bc,children:g})}const b8=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function _8(){const{userSelectionActive:e,userSelectionRect:t}=me(b8,Ee);return e&&t?h.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const md=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},S8=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function E8({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Ds.Full,panOnDrag:r,paneClickDistance:o,selectionOnDrag:i,onSelectionStart:s,onSelectionEnd:a,onPaneClick:l,onPaneContextMenu:c,onPaneScroll:u,onPaneMouseEnter:d,onPaneMouseMove:f,onPaneMouseLeave:p,children:g}){const m=Ce(),{userSelectionActive:_,elementsSelectable:v,dragging:w,connectionInProgress:x}=me(S8,Ee),b=v&&(e||_),S=y.useRef(null),E=y.useRef(),C=y.useRef(new Set),k=y.useRef(new Set),T=y.useRef(!1),M=N=>{if(T.current||x){T.current=!1;return}l==null||l(N),m.getState().resetSelectedElements(),m.setState({nodesSelectionActive:!1})},P=N=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){N.preventDefault();return}c==null||c(N)},I=u?N=>u(N):void 0,D=N=>{T.current&&(N.stopPropagation(),T.current=!1)},R=N=>{var X,Q;const{domNode:A}=m.getState();if(E.current=A==null?void 0:A.getBoundingClientRect(),!E.current)return;const $=N.target===S.current;if(!$&&!!N.target.closest(".nokey")||!e||!(i&&$||t)||N.button!==0||!N.isPrimary)return;(Q=(X=N.target)==null?void 0:X.setPointerCapture)==null||Q.call(X,N.pointerId),T.current=!1;const{x:V,y:H}=Bt(N.nativeEvent,E.current);m.setState({userSelectionRect:{width:0,height:0,startX:V,startY:H,x:V,y:H}}),$||(N.stopPropagation(),N.preventDefault())},O=N=>{const{userSelectionRect:A,transform:$,nodeLookup:z,edgeLookup:F,connectionLookup:V,triggerNodeChanges:H,triggerEdgeChanges:X,defaultEdgeOptions:Q,resetSelectedElements:q}=m.getState();if(!E.current||!A)return;const{x:B,y:G}=Bt(N.nativeEvent,E.current),{startX:Z,startY:Y}=A;if(!T.current){const le=t?0:o;if(Math.hypot(B-Z,G-Y)<=le)return;q(),s==null||s(N)}T.current=!0;const U={startX:Z,startY:Y,x:B<Z?B:Z,y:G<Y?G:Y,width:Math.abs(B-Z),height:Math.abs(G-Y)},J=C.current,se=k.current;C.current=new Set(n0(z,U,$,n===Ds.Partial,!0).map(le=>le.id)),k.current=new Set;const oe=(Q==null?void 0:Q.selectable)??!0;for(const le of C.current){const ie=V.get(le);if(ie)for(const{edgeId:Be}of ie.values()){const Te=F.get(Be);Te&&(Te.selectable??oe)&&k.current.add(Be)}}if(!Yw(J,C.current)){const le=zo(z,C.current,!0);H(le)}if(!Yw(se,k.current)){const le=zo(F,k.current);X(le)}m.setState({userSelectionRect:U,userSelectionActive:!0,nodesSelectionActive:!1})},j=N=>{var A,$;N.button===0&&(($=(A=N.target)==null?void 0:A.releasePointerCapture)==null||$.call(A,N.pointerId),!_&&N.target===S.current&&m.getState().userSelectionRect&&(M==null||M(N)),m.setState({userSelectionActive:!1,userSelectionRect:null}),T.current&&(a==null||a(N),m.setState({nodesSelectionActive:C.current.size>0})))},L=r===!0||Array.isArray(r)&&r.includes(0);return h.jsxs("div",{className:Oe(["react-flow__pane",{draggable:L,dragging:w,selection:e}]),onClick:b?void 0:md(M,S),onContextMenu:md(P,S),onWheel:md(I,S),onPointerEnter:b?void 0:d,onPointerMove:b?O:f,onPointerUp:b?j:void 0,onPointerDownCapture:b?R:void 0,onClickCapture:b?D:void 0,onPointerLeave:p,ref:S,style:Bc,children:[g,h.jsx(_8,{})]})}function Tv({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:o,unselectNodesAndEdges:i,multiSelectionActive:s,nodeLookup:a,onError:l}=t.getState(),c=a.get(e);if(!c){l==null||l("012",mn.error012(e));return}t.setState({nodesSelectionActive:!1}),c.selected?(n||c.selected&&s)&&(i({nodes:[c],edges:[]}),requestAnimationFrame(()=>{var u;return(u=r==null?void 0:r.current)==null?void 0:u.blur()})):o([e])}function fP({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:o,isSelectable:i,nodeClickDistance:s}){const a=Ce(),[l,c]=y.useState(!1),u=y.useRef();return y.useEffect(()=>{u.current=QF({getStoreItems:()=>a.getState(),onNodeMouseDown:d=>{Tv({id:d,store:a,nodeRef:e})},onDragStart:()=>{c(!0)},onDragStop:()=>{c(!1)}})},[]),y.useEffect(()=>{var d,f;if(t)(d=u.current)==null||d.destroy();else if(e.current)return(f=u.current)==null||f.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:i,nodeId:o,nodeClickDistance:s}),()=>{var p;(p=u.current)==null||p.destroy()}},[n,r,t,i,e,o]),l}const C8=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function hP(){const e=Ce();return y.useCallback(n=>{const{nodeExtent:r,snapToGrid:o,snapGrid:i,nodesDraggable:s,onError:a,updateNodePositions:l,nodeLookup:c,nodeOrigin:u}=e.getState(),d=new Map,f=C8(s),p=o?i[0]:5,g=o?i[1]:5,m=n.direction.x*p*n.factor,_=n.direction.y*g*n.factor;for(const[,v]of c){if(!f(v))continue;let w={x:v.internals.positionAbsolute.x+m,y:v.internals.positionAbsolute.y+_};o&&(w=ea(w,i));const{position:x,positionAbsolute:b}=RR({nodeId:v.id,nextPosition:w,nodeLookup:c,nodeExtent:r,nodeOrigin:u,onError:a});v.position=x,v.internals.positionAbsolute=b,d.set(v.id,v)}l(d)},[])}const d0=y.createContext(null),N8=d0.Provider;d0.Consumer;const pP=()=>y.useContext(d0),k8=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),R8=(e,t,n)=>r=>{const{connectionClickStartHandle:o,connectionMode:i,connection:s}=r,{fromHandle:a,toHandle:l,isValid:c}=s,u=(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.id)===t&&(l==null?void 0:l.type)===n;return{connectingFrom:(a==null?void 0:a.nodeId)===e&&(a==null?void 0:a.id)===t&&(a==null?void 0:a.type)===n,connectingTo:u,clickConnecting:(o==null?void 0:o.nodeId)===e&&(o==null?void 0:o.id)===t&&(o==null?void 0:o.type)===n,isPossibleEndHandle:i===ii.Strict?(a==null?void 0:a.type)!==n:e!==(a==null?void 0:a.nodeId)||t!==(a==null?void 0:a.id),connectionInProcess:!!a,clickConnectionInProcess:!!o,valid:u&&c}};function P8({type:e="source",position:t=te.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:o=!0,isConnectableEnd:i=!0,id:s,onConnect:a,children:l,className:c,onMouseDown:u,onTouchStart:d,...f},p){var O,j;const g=s||null,m=e==="target",_=Ce(),v=pP(),{connectOnClick:w,noPanClassName:x,rfId:b}=me(k8,Ee),{connectingFrom:S,connectingTo:E,clickConnecting:C,isPossibleEndHandle:k,connectionInProcess:T,clickConnectionInProcess:M,valid:P}=me(R8(v,g,e),Ee);v||(j=(O=_.getState()).onError)==null||j.call(O,"010",mn.error010());const I=L=>{const{defaultEdgeOptions:N,onConnect:A,hasDefaultEdges:$}=_.getState(),z={...N,...L};if($){const{edges:F,setEdges:V}=_.getState();V(OF(z,F))}A==null||A(z),a==null||a(z)},D=L=>{if(!v)return;const N=LR(L.nativeEvent);if(o&&(N&&L.button===0||!N)){const A=_.getState();jv.onPointerDown(L.nativeEvent,{handleDomNode:L.currentTarget,autoPanOnConnect:A.autoPanOnConnect,connectionMode:A.connectionMode,connectionRadius:A.connectionRadius,domNode:A.domNode,nodeLookup:A.nodeLookup,lib:A.lib,isTarget:m,handleId:g,nodeId:v,flowId:A.rfId,panBy:A.panBy,cancelConnection:A.cancelConnection,onConnectStart:A.onConnectStart,onConnectEnd:A.onConnectEnd,updateConnection:A.updateConnection,onConnect:I,isValidConnection:n||A.isValidConnection,getTransform:()=>_.getState().transform,getFromHandle:()=>_.getState().connection.fromHandle,autoPanSpeed:A.autoPanSpeed,dragThreshold:A.connectionDragThreshold})}N?u==null||u(L):d==null||d(L)},R=L=>{const{onClickConnectStart:N,onClickConnectEnd:A,connectionClickStartHandle:$,connectionMode:z,isValidConnection:F,lib:V,rfId:H,nodeLookup:X,connection:Q}=_.getState();if(!v||!$&&!o)return;if(!$){N==null||N(L.nativeEvent,{nodeId:v,handleId:g,handleType:e}),_.setState({connectionClickStartHandle:{nodeId:v,type:e,id:g}});return}const q=IR(L.target),B=n||F,{connection:G,isValid:Z}=jv.isValid(L.nativeEvent,{handle:{nodeId:v,id:g,type:e},connectionMode:z,fromNodeId:$.nodeId,fromHandleId:$.id||null,fromType:$.type,isValidConnection:B,flowId:H,doc:q,lib:V,nodeLookup:X});Z&&G&&I(G);const Y=structuredClone(Q);delete Y.inProgress,Y.toPosition=Y.toHandle?Y.toHandle.position:null,A==null||A(L,Y),_.setState({connectionClickStartHandle:null})};return h.jsx("div",{"data-handleid":g,"data-nodeid":v,"data-handlepos":t,"data-id":`${b}-${v}-${g}-${e}`,className:Oe(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",x,c,{source:!m,target:m,connectable:r,connectablestart:o,connectableend:i,clickconnecting:C,connectingfrom:S,connectingto:E,valid:P,connectionindicator:r&&(!T||k)&&(T||M?i:o)}]),onMouseDown:D,onTouchStart:D,onClick:w?R:void 0,ref:p,...f,children:l})}const Cr=y.memo(uP(P8));function j8({data:e,isConnectable:t,sourcePosition:n=te.Bottom}){return h.jsxs(h.Fragment,{children:[e==null?void 0:e.label,h.jsx(Cr,{type:"source",position:n,isConnectable:t})]})}function T8({data:e,isConnectable:t,targetPosition:n=te.Top,sourcePosition:r=te.Bottom}){return h.jsxs(h.Fragment,{children:[h.jsx(Cr,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,h.jsx(Cr,{type:"source",position:r,isConnectable:t})]})}function A8(){return null}function M8({data:e,isConnectable:t,targetPosition:n=te.Top}){return h.jsxs(h.Fragment,{children:[h.jsx(Cr,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const Ql={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},wb={input:j8,default:T8,output:M8,group:A8};function I8(e){var t,n,r,o;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((r=e.style)==null?void 0:r.width),height:e.height??((o=e.style)==null?void 0:o.height)}}const O8=e=>{const{width:t,height:n,x:r,y:o}=Js(e.nodeLookup,{filter:i=>!!i.selected});return{width:qt(t)?t:null,height:qt(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${o}px)`}};function L8({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=Ce(),{width:o,height:i,transformString:s,userSelectionActive:a}=me(O8,Ee),l=hP(),c=y.useRef(null);if(y.useEffect(()=>{var f;n||(f=c.current)==null||f.focus({preventScroll:!0})},[n]),fP({nodeRef:c}),a||!o||!i)return null;const u=e?f=>{const p=r.getState().nodes.filter(g=>g.selected);e(f,p)}:void 0,d=f=>{Object.prototype.hasOwnProperty.call(Ql,f.key)&&(f.preventDefault(),l({direction:Ql[f.key],factor:f.shiftKey?4:1}))};return h.jsx("div",{className:Oe(["react-flow__nodesselection","react-flow__container",t]),style:{transform:s},children:h.jsx("div",{ref:c,className:"react-flow__nodesselection-rect",onContextMenu:u,tabIndex:n?void 0:-1,onKeyDown:n?void 0:d,style:{width:o,height:i}})})}const bb=typeof window<"u"?window:void 0,D8=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function mP({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:i,onPaneScroll:s,paneClickDistance:a,deleteKeyCode:l,selectionKeyCode:c,selectionOnDrag:u,selectionMode:d,onSelectionStart:f,onSelectionEnd:p,multiSelectionKeyCode:g,panActivationKeyCode:m,zoomActivationKeyCode:_,elementsSelectable:v,zoomOnScroll:w,zoomOnPinch:x,panOnScroll:b,panOnScrollSpeed:S,panOnScrollMode:E,zoomOnDoubleClick:C,panOnDrag:k,defaultViewport:T,translateExtent:M,minZoom:P,maxZoom:I,preventScrolling:D,onSelectionContextMenu:R,noWheelClassName:O,noPanClassName:j,disableKeyboardA11y:L,onViewportChange:N,isControlledViewport:A}){const{nodesSelectionActive:$,userSelectionActive:z}=me(D8,Ee),F=Fs(c,{target:bb}),V=Fs(m,{target:bb}),H=V||k,X=V||b,Q=u&&H!==!0,q=F||z||Q;return v8({deleteKeyCode:l,multiSelectionKeyCode:g}),h.jsx(w8,{onPaneContextMenu:i,elementsSelectable:v,zoomOnScroll:w,zoomOnPinch:x,panOnScroll:X,panOnScrollSpeed:S,panOnScrollMode:E,zoomOnDoubleClick:C,panOnDrag:!F&&H,defaultViewport:T,translateExtent:M,minZoom:P,maxZoom:I,zoomActivationKeyCode:_,preventScrolling:D,noWheelClassName:O,noPanClassName:j,onViewportChange:N,isControlledViewport:A,paneClickDistance:a,selectionOnDrag:Q,children:h.jsxs(E8,{onSelectionStart:f,onSelectionEnd:p,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:i,onPaneScroll:s,panOnDrag:H,isSelecting:!!q,selectionMode:d,selectionKeyPressed:F,paneClickDistance:a,selectionOnDrag:Q,children:[e,$&&h.jsx(L8,{onSelectionContextMenu:R,noPanClassName:j,disableKeyboardA11y:L})]})})}mP.displayName="FlowRenderer";const $8=y.memo(mP),z8=e=>t=>e?n0(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function F8(e){return me(y.useCallback(z8(e),[e]),Ee)}const q8=e=>e.updateNodeInternals;function B8(){const e=me(q8),[t]=y.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const r=new Map;n.forEach(o=>{const i=o.target.getAttribute("data-id");r.set(i,{id:i,nodeElement:o.target,force:!0})}),e(r)}));return y.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function H8({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const o=Ce(),i=y.useRef(null),s=y.useRef(null),a=y.useRef(e.sourcePosition),l=y.useRef(e.targetPosition),c=y.useRef(t),u=n&&!!e.internals.handleBounds;return y.useEffect(()=>{i.current&&!e.hidden&&(!u||s.current!==i.current)&&(s.current&&(r==null||r.unobserve(s.current)),r==null||r.observe(i.current),s.current=i.current)},[u,e.hidden]),y.useEffect(()=>()=>{s.current&&(r==null||r.unobserve(s.current),s.current=null)},[]),y.useEffect(()=>{if(i.current){const d=c.current!==t,f=a.current!==e.sourcePosition,p=l.current!==e.targetPosition;(d||f||p)&&(c.current=t,a.current=e.sourcePosition,l.current=e.targetPosition,o.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:i.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),i}function V8({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:o,onContextMenu:i,onDoubleClick:s,nodesDraggable:a,elementsSelectable:l,nodesConnectable:c,nodesFocusable:u,resizeObserver:d,noDragClassName:f,noPanClassName:p,disableKeyboardA11y:g,rfId:m,nodeTypes:_,nodeClickDistance:v,onError:w}){const{node:x,internals:b,isParent:S}=me(B=>{const G=B.nodeLookup.get(e),Z=B.parentLookup.has(e);return{node:G,internals:G.internals,isParent:Z}},Ee);let E=x.type||"default",C=(_==null?void 0:_[E])||wb[E];C===void 0&&(w==null||w("003",mn.error003(E)),E="default",C=(_==null?void 0:_.default)||wb.default);const k=!!(x.draggable||a&&typeof x.draggable>"u"),T=!!(x.selectable||l&&typeof x.selectable>"u"),M=!!(x.connectable||c&&typeof x.connectable>"u"),P=!!(x.focusable||u&&typeof x.focusable>"u"),I=Ce(),D=AR(x),R=H8({node:x,nodeType:E,hasDimensions:D,resizeObserver:d}),O=fP({nodeRef:R,disabled:x.hidden||!k,noDragClassName:f,handleSelector:x.dragHandle,nodeId:e,isSelectable:T,nodeClickDistance:v}),j=hP();if(x.hidden)return null;const L=Gn(x),N=I8(x),A=T||k||t||n||r||o,$=n?B=>n(B,{...b.userNode}):void 0,z=r?B=>r(B,{...b.userNode}):void 0,F=o?B=>o(B,{...b.userNode}):void 0,V=i?B=>i(B,{...b.userNode}):void 0,H=s?B=>s(B,{...b.userNode}):void 0,X=B=>{const{selectNodesOnDrag:G,nodeDragThreshold:Z}=I.getState();T&&(!G||!k||Z>0)&&Tv({id:e,store:I,nodeRef:R}),t&&t(B,{...b.userNode})},Q=B=>{if(!(OR(B.nativeEvent)||g)){if(SR.includes(B.key)&&T){const G=B.key==="Escape";Tv({id:e,store:I,unselect:G,nodeRef:R})}else if(k&&x.selected&&Object.prototype.hasOwnProperty.call(Ql,B.key)){B.preventDefault();const{ariaLabelConfig:G}=I.getState();I.setState({ariaLiveMessage:G["node.a11yDescription.ariaLiveMessage"]({direction:B.key.replace("Arrow","").toLowerCase(),x:~~b.positionAbsolute.x,y:~~b.positionAbsolute.y})}),j({direction:Ql[B.key],factor:B.shiftKey?4:1})}}},q=()=>{var se;if(g||!((se=R.current)!=null&&se.matches(":focus-visible")))return;const{transform:B,width:G,height:Z,autoPanOnNodeFocus:Y,setCenter:U}=I.getState();if(!Y)return;n0(new Map([[e,x]]),{x:0,y:0,width:G,height:Z},B,!0).length>0||U(x.position.x+L.width/2,x.position.y+L.height/2,{zoom:B[2]})};return h.jsx("div",{className:Oe(["react-flow__node",`react-flow__node-${E}`,{[p]:k},x.className,{selected:x.selected,selectable:T,parent:S,draggable:k,dragging:O}]),ref:R,style:{zIndex:b.z,transform:`translate(${b.positionAbsolute.x}px,${b.positionAbsolute.y}px)`,pointerEvents:A?"all":"none",visibility:D?"visible":"hidden",...x.style,...N},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:$,onMouseMove:z,onMouseLeave:F,onContextMenu:V,onClick:X,onDoubleClick:H,onKeyDown:P?Q:void 0,tabIndex:P?0:void 0,onFocus:P?q:void 0,role:x.ariaRole??(P?"group":void 0),"aria-roledescription":"node","aria-describedby":g?void 0:`${oP}-${m}`,"aria-label":x.ariaLabel,...x.domAttributes,children:h.jsx(N8,{value:e,children:h.jsx(C,{id:e,data:x.data,type:E,positionAbsoluteX:b.positionAbsolute.x,positionAbsoluteY:b.positionAbsolute.y,selected:x.selected??!1,selectable:T,draggable:k,deletable:x.deletable??!0,isConnectable:M,sourcePosition:x.sourcePosition,targetPosition:x.targetPosition,dragging:O,dragHandle:x.dragHandle,zIndex:b.z,parentId:x.parentId,...L})})})}var W8=y.memo(V8);const U8=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function gP(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:o,onError:i}=me(U8,Ee),s=F8(e.onlyRenderVisibleElements),a=B8();return h.jsx("div",{className:"react-flow__nodes",style:Bc,children:s.map(l=>h.jsx(W8,{id:l,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:a,nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:o,nodeClickDistance:e.nodeClickDistance,onError:i},l))})}gP.displayName="NodeRenderer";const G8=y.memo(gP);function Y8(e){return me(y.useCallback(n=>{if(!e)return n.edges.map(o=>o.id);const r=[];if(n.width&&n.height)for(const o of n.edges){const i=n.nodeLookup.get(o.source),s=n.nodeLookup.get(o.target);i&&s&&AF({sourceNode:i,targetNode:s,width:n.width,height:n.height,transform:n.transform})&&r.push(o.id)}return r},[e]),Ee)}const K8=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return h.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},X8=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return h.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},_b={[si.Arrow]:K8,[si.ArrowClosed]:X8};function Q8(e){const t=Ce();return y.useMemo(()=>{var o,i;return Object.prototype.hasOwnProperty.call(_b,e)?_b[e]:((i=(o=t.getState()).onError)==null||i.call(o,"009",mn.error009(e)),null)},[e])}const Z8=({id:e,type:t,color:n,width:r=12.5,height:o=12.5,markerUnits:i="strokeWidth",strokeWidth:s,orient:a="auto-start-reverse"})=>{const l=Q8(t);return l?h.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${o}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:a,refX:"0",refY:"0",children:h.jsx(l,{color:n,strokeWidth:s})}):null},vP=({defaultColor:e,rfId:t})=>{const n=me(i=>i.edges),r=me(i=>i.defaultEdgeOptions),o=y.useMemo(()=>FF(n,{id:t,defaultColor:e,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[n,r,t,e]);return o.length?h.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:h.jsx("defs",{children:o.map(i=>h.jsx(Z8,{id:i.id,type:i.type,color:i.color,width:i.width,height:i.height,markerUnits:i.markerUnits,strokeWidth:i.strokeWidth,orient:i.orient},i.id))})}):null};vP.displayName="MarkerDefinitions";var J8=y.memo(vP);function yP({x:e,y:t,label:n,labelStyle:r,labelShowBg:o=!0,labelBgStyle:i,labelBgPadding:s=[2,4],labelBgBorderRadius:a=2,children:l,className:c,...u}){const[d,f]=y.useState({x:1,y:0,width:0,height:0}),p=Oe(["react-flow__edge-textwrapper",c]),g=y.useRef(null);return y.useEffect(()=>{if(g.current){const m=g.current.getBBox();f({x:m.x,y:m.y,width:m.width,height:m.height})}},[n]),n?h.jsxs("g",{transform:`translate(${e-d.width/2} ${t-d.height/2})`,className:p,visibility:d.width?"visible":"hidden",...u,children:[o&&h.jsx("rect",{width:d.width+2*s[0],x:-s[0],y:-s[1],height:d.height+2*s[1],className:"react-flow__edge-textbg",style:i,rx:a,ry:a}),h.jsx("text",{className:"react-flow__edge-text",y:d.height/2,dy:"0.3em",ref:g,style:r,children:n}),l]}):null}yP.displayName="EdgeText";const e6=y.memo(yP);function Hc({path:e,labelX:t,labelY:n,label:r,labelStyle:o,labelShowBg:i,labelBgStyle:s,labelBgPadding:a,labelBgBorderRadius:l,interactionWidth:c=20,...u}){return h.jsxs(h.Fragment,{children:[h.jsx("path",{...u,d:e,fill:"none",className:Oe(["react-flow__edge-path",u.className])}),c?h.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:c,className:"react-flow__edge-interaction"}):null,r&&qt(t)&&qt(n)?h.jsx(e6,{x:t,y:n,label:r,labelStyle:o,labelShowBg:i,labelBgStyle:s,labelBgPadding:a,labelBgBorderRadius:l}):null]})}function Sb({pos:e,x1:t,y1:n,x2:r,y2:o}){return e===te.Left||e===te.Right?[.5*(t+r),n]:[t,.5*(n+o)]}function xP({sourceX:e,sourceY:t,sourcePosition:n=te.Bottom,targetX:r,targetY:o,targetPosition:i=te.Top}){const[s,a]=Sb({pos:n,x1:e,y1:t,x2:r,y2:o}),[l,c]=Sb({pos:i,x1:r,y1:o,x2:e,y2:t}),[u,d,f,p]=DR({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:s,sourceControlY:a,targetControlX:l,targetControlY:c});return[`M${e},${t} C${s},${a} ${l},${c} ${r},${o}`,u,d,f,p]}function wP(e){return y.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,sourcePosition:s,targetPosition:a,label:l,labelStyle:c,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:g,markerEnd:m,markerStart:_,interactionWidth:v})=>{const[w,x,b]=xP({sourceX:n,sourceY:r,sourcePosition:s,targetX:o,targetY:i,targetPosition:a}),S=e.isInternal?void 0:t;return h.jsx(Hc,{id:S,path:w,labelX:x,labelY:b,label:l,labelStyle:c,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:g,markerEnd:m,markerStart:_,interactionWidth:v})})}const t6=wP({isInternal:!1}),bP=wP({isInternal:!0});t6.displayName="SimpleBezierEdge";bP.displayName="SimpleBezierEdgeInternal";function _P(e){return y.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,label:s,labelStyle:a,labelShowBg:l,labelBgStyle:c,labelBgPadding:u,labelBgBorderRadius:d,style:f,sourcePosition:p=te.Bottom,targetPosition:g=te.Top,markerEnd:m,markerStart:_,pathOptions:v,interactionWidth:w})=>{const[x,b,S]=kv({sourceX:n,sourceY:r,sourcePosition:p,targetX:o,targetY:i,targetPosition:g,borderRadius:v==null?void 0:v.borderRadius,offset:v==null?void 0:v.offset,stepPosition:v==null?void 0:v.stepPosition}),E=e.isInternal?void 0:t;return h.jsx(Hc,{id:E,path:x,labelX:b,labelY:S,label:s,labelStyle:a,labelShowBg:l,labelBgStyle:c,labelBgPadding:u,labelBgBorderRadius:d,style:f,markerEnd:m,markerStart:_,interactionWidth:w})})}const SP=_P({isInternal:!1}),EP=_P({isInternal:!0});SP.displayName="SmoothStepEdge";EP.displayName="SmoothStepEdgeInternal";function CP(e){return y.memo(({id:t,...n})=>{var o;const r=e.isInternal?void 0:t;return h.jsx(SP,{...n,id:r,pathOptions:y.useMemo(()=>{var i;return{borderRadius:0,offset:(i=n.pathOptions)==null?void 0:i.offset}},[(o=n.pathOptions)==null?void 0:o.offset])})})}const n6=CP({isInternal:!1}),NP=CP({isInternal:!0});n6.displayName="StepEdge";NP.displayName="StepEdgeInternal";function kP(e){return y.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,label:s,labelStyle:a,labelShowBg:l,labelBgStyle:c,labelBgPadding:u,labelBgBorderRadius:d,style:f,markerEnd:p,markerStart:g,interactionWidth:m})=>{const[_,v,w]=FR({sourceX:n,sourceY:r,targetX:o,targetY:i}),x=e.isInternal?void 0:t;return h.jsx(Hc,{id:x,path:_,labelX:v,labelY:w,label:s,labelStyle:a,labelShowBg:l,labelBgStyle:c,labelBgPadding:u,labelBgBorderRadius:d,style:f,markerEnd:p,markerStart:g,interactionWidth:m})})}const r6=kP({isInternal:!1}),RP=kP({isInternal:!0});r6.displayName="StraightEdge";RP.displayName="StraightEdgeInternal";function PP(e){return y.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,sourcePosition:s=te.Bottom,targetPosition:a=te.Top,label:l,labelStyle:c,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:g,markerEnd:m,markerStart:_,pathOptions:v,interactionWidth:w})=>{const[x,b,S]=$R({sourceX:n,sourceY:r,sourcePosition:s,targetX:o,targetY:i,targetPosition:a,curvature:v==null?void 0:v.curvature}),E=e.isInternal?void 0:t;return h.jsx(Hc,{id:E,path:x,labelX:b,labelY:S,label:l,labelStyle:c,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:g,markerEnd:m,markerStart:_,interactionWidth:w})})}const o6=PP({isInternal:!1}),jP=PP({isInternal:!0});o6.displayName="BezierEdge";jP.displayName="BezierEdgeInternal";const Eb={default:jP,straight:RP,step:NP,smoothstep:EP,simplebezier:bP},Cb={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},i6=(e,t,n)=>n===te.Left?e-t:n===te.Right?e+t:e,s6=(e,t,n)=>n===te.Top?e-t:n===te.Bottom?e+t:e,Nb="react-flow__edgeupdater";function kb({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:o,onMouseEnter:i,onMouseOut:s,type:a}){return h.jsx("circle",{onMouseDown:o,onMouseEnter:i,onMouseOut:s,className:Oe([Nb,`${Nb}-${a}`]),cx:i6(t,r,e),cy:s6(n,r,e),r,stroke:"transparent",fill:"transparent"})}function a6({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:o,targetX:i,targetY:s,sourcePosition:a,targetPosition:l,onReconnect:c,onReconnectStart:u,onReconnectEnd:d,setReconnecting:f,setUpdateHover:p}){const g=Ce(),m=(b,S)=>{if(b.button!==0)return;const{autoPanOnConnect:E,domNode:C,isValidConnection:k,connectionMode:T,connectionRadius:M,lib:P,onConnectStart:I,onConnectEnd:D,cancelConnection:R,nodeLookup:O,rfId:j,panBy:L,updateConnection:N}=g.getState(),A=S.type==="target",$=(V,H)=>{f(!1),d==null||d(V,n,S.type,H)},z=V=>c==null?void 0:c(n,V),F=(V,H)=>{f(!0),u==null||u(b,n,S.type),I==null||I(V,H)};jv.onPointerDown(b.nativeEvent,{autoPanOnConnect:E,connectionMode:T,connectionRadius:M,domNode:C,handleId:S.id,nodeId:S.nodeId,nodeLookup:O,isTarget:A,edgeUpdaterType:S.type,lib:P,flowId:j,cancelConnection:R,panBy:L,isValidConnection:k,onConnect:z,onConnectStart:F,onConnectEnd:D,onReconnectEnd:$,updateConnection:N,getTransform:()=>g.getState().transform,getFromHandle:()=>g.getState().connection.fromHandle,dragThreshold:g.getState().connectionDragThreshold,handleDomNode:b.currentTarget})},_=b=>m(b,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),v=b=>m(b,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),w=()=>p(!0),x=()=>p(!1);return h.jsxs(h.Fragment,{children:[(e===!0||e==="source")&&h.jsx(kb,{position:a,centerX:r,centerY:o,radius:t,onMouseDown:_,onMouseEnter:w,onMouseOut:x,type:"source"}),(e===!0||e==="target")&&h.jsx(kb,{position:l,centerX:i,centerY:s,radius:t,onMouseDown:v,onMouseEnter:w,onMouseOut:x,type:"target"})]})}function l6({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:o,onDoubleClick:i,onContextMenu:s,onMouseEnter:a,onMouseMove:l,onMouseLeave:c,reconnectRadius:u,onReconnect:d,onReconnectStart:f,onReconnectEnd:p,rfId:g,edgeTypes:m,noPanClassName:_,onError:v,disableKeyboardA11y:w}){let x=me(U=>U.edgeLookup.get(e));const b=me(U=>U.defaultEdgeOptions);x=b?{...b,...x}:x;let S=x.type||"default",E=(m==null?void 0:m[S])||Eb[S];E===void 0&&(v==null||v("011",mn.error011(S)),S="default",E=(m==null?void 0:m.default)||Eb.default);const C=!!(x.focusable||t&&typeof x.focusable>"u"),k=typeof d<"u"&&(x.reconnectable||n&&typeof x.reconnectable>"u"),T=!!(x.selectable||r&&typeof x.selectable>"u"),M=y.useRef(null),[P,I]=y.useState(!1),[D,R]=y.useState(!1),O=Ce(),{zIndex:j,sourceX:L,sourceY:N,targetX:A,targetY:$,sourcePosition:z,targetPosition:F}=me(y.useCallback(U=>{const J=U.nodeLookup.get(x.source),se=U.nodeLookup.get(x.target);if(!J||!se)return{zIndex:x.zIndex,...Cb};const oe=zF({id:e,sourceNode:J,targetNode:se,sourceHandle:x.sourceHandle||null,targetHandle:x.targetHandle||null,connectionMode:U.connectionMode,onError:v});return{zIndex:TF({selected:x.selected,zIndex:x.zIndex,sourceNode:J,targetNode:se,elevateOnSelect:U.elevateEdgesOnSelect,zIndexMode:U.zIndexMode}),...oe||Cb}},[x.source,x.target,x.sourceHandle,x.targetHandle,x.selected,x.zIndex]),Ee),V=y.useMemo(()=>x.markerStart?`url('#${Rv(x.markerStart,g)}')`:void 0,[x.markerStart,g]),H=y.useMemo(()=>x.markerEnd?`url('#${Rv(x.markerEnd,g)}')`:void 0,[x.markerEnd,g]);if(x.hidden||L===null||N===null||A===null||$===null)return null;const X=U=>{var le;const{addSelectedEdges:J,unselectNodesAndEdges:se,multiSelectionActive:oe}=O.getState();T&&(O.setState({nodesSelectionActive:!1}),x.selected&&oe?(se({nodes:[],edges:[x]}),(le=M.current)==null||le.blur()):J([e])),o&&o(U,x)},Q=i?U=>{i(U,{...x})}:void 0,q=s?U=>{s(U,{...x})}:void 0,B=a?U=>{a(U,{...x})}:void 0,G=l?U=>{l(U,{...x})}:void 0,Z=c?U=>{c(U,{...x})}:void 0,Y=U=>{var J;if(!w&&SR.includes(U.key)&&T){const{unselectNodesAndEdges:se,addSelectedEdges:oe}=O.getState();U.key==="Escape"?((J=M.current)==null||J.blur(),se({edges:[x]})):oe([e])}};return h.jsx("svg",{style:{zIndex:j},children:h.jsxs("g",{className:Oe(["react-flow__edge",`react-flow__edge-${S}`,x.className,_,{selected:x.selected,animated:x.animated,inactive:!T&&!o,updating:P,selectable:T}]),onClick:X,onDoubleClick:Q,onContextMenu:q,onMouseEnter:B,onMouseMove:G,onMouseLeave:Z,onKeyDown:C?Y:void 0,tabIndex:C?0:void 0,role:x.ariaRole??(C?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":x.ariaLabel===null?void 0:x.ariaLabel||`Edge from ${x.source} to ${x.target}`,"aria-describedby":C?`${iP}-${g}`:void 0,ref:M,...x.domAttributes,children:[!D&&h.jsx(E,{id:e,source:x.source,target:x.target,type:x.type,selected:x.selected,animated:x.animated,selectable:T,deletable:x.deletable??!0,label:x.label,labelStyle:x.labelStyle,labelShowBg:x.labelShowBg,labelBgStyle:x.labelBgStyle,labelBgPadding:x.labelBgPadding,labelBgBorderRadius:x.labelBgBorderRadius,sourceX:L,sourceY:N,targetX:A,targetY:$,sourcePosition:z,targetPosition:F,data:x.data,style:x.style,sourceHandleId:x.sourceHandle,targetHandleId:x.targetHandle,markerStart:V,markerEnd:H,pathOptions:"pathOptions"in x?x.pathOptions:void 0,interactionWidth:x.interactionWidth}),k&&h.jsx(a6,{edge:x,isReconnectable:k,reconnectRadius:u,onReconnect:d,onReconnectStart:f,onReconnectEnd:p,sourceX:L,sourceY:N,targetX:A,targetY:$,sourcePosition:z,targetPosition:F,setUpdateHover:I,setReconnecting:R})]})})}var c6=y.memo(l6);const u6=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function TP({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:o,onReconnect:i,onEdgeContextMenu:s,onEdgeMouseEnter:a,onEdgeMouseMove:l,onEdgeMouseLeave:c,onEdgeClick:u,reconnectRadius:d,onEdgeDoubleClick:f,onReconnectStart:p,onReconnectEnd:g,disableKeyboardA11y:m}){const{edgesFocusable:_,edgesReconnectable:v,elementsSelectable:w,onError:x}=me(u6,Ee),b=Y8(t);return h.jsxs("div",{className:"react-flow__edges",children:[h.jsx(J8,{defaultColor:e,rfId:n}),b.map(S=>h.jsx(c6,{id:S,edgesFocusable:_,edgesReconnectable:v,elementsSelectable:w,noPanClassName:o,onReconnect:i,onContextMenu:s,onMouseEnter:a,onMouseMove:l,onMouseLeave:c,onClick:u,reconnectRadius:d,onDoubleClick:f,onReconnectStart:p,onReconnectEnd:g,rfId:n,onError:x,edgeTypes:r,disableKeyboardA11y:m},S))]})}TP.displayName="EdgeRenderer";const d6=y.memo(TP),f6=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function h6({children:e}){const t=me(f6);return h.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function p6(e){const t=u0(),n=y.useRef(!1);y.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const m6=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function g6(e){const t=me(m6),n=Ce();return y.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function v6(e){return e.connection.inProgress?{...e.connection,to:ta(e.connection.to,e.transform)}:{...e.connection}}function y6(e){return v6}function x6(e){const t=y6();return me(t,Ee)}const w6=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function b6({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:o,width:i,height:s,isValid:a,inProgress:l}=me(w6,Ee);return!(i&&o&&l)?null:h.jsx("svg",{style:e,width:i,height:s,className:"react-flow__connectionline react-flow__container",children:h.jsx("g",{className:Oe(["react-flow__connection",NR(a)]),children:h.jsx(AP,{style:t,type:n,CustomComponent:r,isValid:a})})})}const AP=({style:e,type:t=cr.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:o,from:i,fromNode:s,fromHandle:a,fromPosition:l,to:c,toNode:u,toHandle:d,toPosition:f,pointer:p}=x6();if(!o)return;if(n)return h.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:s,fromHandle:a,fromX:i.x,fromY:i.y,toX:c.x,toY:c.y,fromPosition:l,toPosition:f,connectionStatus:NR(r),toNode:u,toHandle:d,pointer:p});let g="";const m={sourceX:i.x,sourceY:i.y,sourcePosition:l,targetX:c.x,targetY:c.y,targetPosition:f};switch(t){case cr.Bezier:[g]=$R(m);break;case cr.SimpleBezier:[g]=xP(m);break;case cr.Step:[g]=kv({...m,borderRadius:0});break;case cr.SmoothStep:[g]=kv(m);break;default:[g]=FR(m)}return h.jsx("path",{d:g,fill:"none",className:"react-flow__connection-path",style:e})};AP.displayName="ConnectionLine";const _6={};function Rb(e=_6){y.useRef(e),Ce(),y.useEffect(()=>{},[e])}function S6(){Ce(),y.useRef(!1),y.useEffect(()=>{},[])}function MP({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:o,onNodeDoubleClick:i,onEdgeDoubleClick:s,onNodeMouseEnter:a,onNodeMouseMove:l,onNodeMouseLeave:c,onNodeContextMenu:u,onSelectionContextMenu:d,onSelectionStart:f,onSelectionEnd:p,connectionLineType:g,connectionLineStyle:m,connectionLineComponent:_,connectionLineContainerStyle:v,selectionKeyCode:w,selectionOnDrag:x,selectionMode:b,multiSelectionKeyCode:S,panActivationKeyCode:E,zoomActivationKeyCode:C,deleteKeyCode:k,onlyRenderVisibleElements:T,elementsSelectable:M,defaultViewport:P,translateExtent:I,minZoom:D,maxZoom:R,preventScrolling:O,defaultMarkerColor:j,zoomOnScroll:L,zoomOnPinch:N,panOnScroll:A,panOnScrollSpeed:$,panOnScrollMode:z,zoomOnDoubleClick:F,panOnDrag:V,onPaneClick:H,onPaneMouseEnter:X,onPaneMouseMove:Q,onPaneMouseLeave:q,onPaneScroll:B,onPaneContextMenu:G,paneClickDistance:Z,nodeClickDistance:Y,onEdgeContextMenu:U,onEdgeMouseEnter:J,onEdgeMouseMove:se,onEdgeMouseLeave:oe,reconnectRadius:le,onReconnect:ie,onReconnectStart:Be,onReconnectEnd:Te,noDragClassName:bn,noWheelClassName:Jt,noPanClassName:tt,disableKeyboardA11y:Me,nodeExtent:Xn,rfId:_n,viewport:Qn,onViewportChange:Zn}){return Rb(e),Rb(t),S6(),p6(n),g6(Qn),h.jsx($8,{onPaneClick:H,onPaneMouseEnter:X,onPaneMouseMove:Q,onPaneMouseLeave:q,onPaneContextMenu:G,onPaneScroll:B,paneClickDistance:Z,deleteKeyCode:k,selectionKeyCode:w,selectionOnDrag:x,selectionMode:b,onSelectionStart:f,onSelectionEnd:p,multiSelectionKeyCode:S,panActivationKeyCode:E,zoomActivationKeyCode:C,elementsSelectable:M,zoomOnScroll:L,zoomOnPinch:N,zoomOnDoubleClick:F,panOnScroll:A,panOnScrollSpeed:$,panOnScrollMode:z,panOnDrag:V,defaultViewport:P,translateExtent:I,minZoom:D,maxZoom:R,onSelectionContextMenu:d,preventScrolling:O,noDragClassName:bn,noWheelClassName:Jt,noPanClassName:tt,disableKeyboardA11y:Me,onViewportChange:Zn,isControlledViewport:!!Qn,children:h.jsxs(h6,{children:[h.jsx(d6,{edgeTypes:t,onEdgeClick:o,onEdgeDoubleClick:s,onReconnect:ie,onReconnectStart:Be,onReconnectEnd:Te,onlyRenderVisibleElements:T,onEdgeContextMenu:U,onEdgeMouseEnter:J,onEdgeMouseMove:se,onEdgeMouseLeave:oe,reconnectRadius:le,defaultMarkerColor:j,noPanClassName:tt,disableKeyboardA11y:Me,rfId:_n}),h.jsx(b6,{style:m,type:g,component:_,containerStyle:v}),h.jsx("div",{className:"react-flow__edgelabel-renderer"}),h.jsx(G8,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:i,onNodeMouseEnter:a,onNodeMouseMove:l,onNodeMouseLeave:c,onNodeContextMenu:u,nodeClickDistance:Y,onlyRenderVisibleElements:T,noPanClassName:tt,noDragClassName:bn,disableKeyboardA11y:Me,nodeExtent:Xn,rfId:_n}),h.jsx("div",{className:"react-flow__viewport-portal"})]})})}MP.displayName="GraphView";const E6=y.memo(MP),Pb=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:i,fitView:s,fitViewOptions:a,minZoom:l=.5,maxZoom:c=2,nodeOrigin:u,nodeExtent:d,zIndexMode:f="basic"}={})=>{const p=new Map,g=new Map,m=new Map,_=new Map,v=r??t??[],w=n??e??[],x=u??[0,0],b=d??Ls;HR(m,_,v);const S=Pv(w,p,g,{nodeOrigin:x,nodeExtent:b,zIndexMode:f});let E=[0,0,1];if(s&&o&&i){const C=Js(p,{filter:P=>!!((P.width||P.initialWidth)&&(P.height||P.initialHeight))}),{x:k,y:T,zoom:M}=r0(C,o,i,l,c,(a==null?void 0:a.padding)??.1);E=[k,T,M]}return{rfId:"1",width:o??0,height:i??0,transform:E,nodes:w,nodesInitialized:S,nodeLookup:p,parentLookup:g,edges:v,edgeLookup:_,connectionLookup:m,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:l,maxZoom:c,translateExtent:Ls,nodeExtent:b,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:ii.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:x,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:s??!1,fitViewOptions:a,fitViewResolver:null,connection:{...CR},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:CF,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:ER,zIndexMode:f,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},C6=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:i,fitView:s,fitViewOptions:a,minZoom:l,maxZoom:c,nodeOrigin:u,nodeExtent:d,zIndexMode:f})=>Hq((p,g)=>{async function m(){const{nodeLookup:_,panZoom:v,fitViewOptions:w,fitViewResolver:x,width:b,height:S,minZoom:E,maxZoom:C}=g();v&&(await SF({nodes:_,width:b,height:S,panZoom:v,minZoom:E,maxZoom:C},w),x==null||x.resolve(!0),p({fitViewResolver:null}))}return{...Pb({nodes:e,edges:t,width:o,height:i,fitView:s,fitViewOptions:a,minZoom:l,maxZoom:c,nodeOrigin:u,nodeExtent:d,defaultNodes:n,defaultEdges:r,zIndexMode:f}),setNodes:_=>{const{nodeLookup:v,parentLookup:w,nodeOrigin:x,elevateNodesOnSelect:b,fitViewQueued:S,zIndexMode:E}=g(),C=Pv(_,v,w,{nodeOrigin:x,nodeExtent:d,elevateNodesOnSelect:b,checkEquality:!0,zIndexMode:E});S&&C?(m(),p({nodes:_,nodesInitialized:C,fitViewQueued:!1,fitViewOptions:void 0})):p({nodes:_,nodesInitialized:C})},setEdges:_=>{const{connectionLookup:v,edgeLookup:w}=g();HR(v,w,_),p({edges:_})},setDefaultNodesAndEdges:(_,v)=>{if(_){const{setNodes:w}=g();w(_),p({hasDefaultNodes:!0})}if(v){const{setEdges:w}=g();w(v),p({hasDefaultEdges:!0})}},updateNodeInternals:_=>{const{triggerNodeChanges:v,nodeLookup:w,parentLookup:x,domNode:b,nodeOrigin:S,nodeExtent:E,debug:C,fitViewQueued:k,zIndexMode:T}=g(),{changes:M,updatedInternals:P}=GF(_,w,x,b,S,E,T);P&&(HF(w,x,{nodeOrigin:S,nodeExtent:E,zIndexMode:T}),k?(m(),p({fitViewQueued:!1,fitViewOptions:void 0})):p({}),(M==null?void 0:M.length)>0&&(C&&console.log("React Flow: trigger node changes",M),v==null||v(M)))},updateNodePositions:(_,v=!1)=>{const w=[];let x=[];const{nodeLookup:b,triggerNodeChanges:S,connection:E,updateConnection:C,onNodesChangeMiddlewareMap:k}=g();for(const[T,M]of _){const P=b.get(T),I=!!(P!=null&&P.expandParent&&(P!=null&&P.parentId)&&(M!=null&&M.position)),D={id:T,type:"position",position:I?{x:Math.max(0,M.position.x),y:Math.max(0,M.position.y)}:M.position,dragging:v};if(P&&E.inProgress&&E.fromNode.id===P.id){const R=oo(P,E.fromHandle,te.Left,!0);C({...E,from:R})}I&&P.parentId&&w.push({id:T,parentId:P.parentId,rect:{...M.internals.positionAbsolute,width:M.measured.width??0,height:M.measured.height??0}}),x.push(D)}if(w.length>0){const{parentLookup:T,nodeOrigin:M}=g(),P=c0(w,b,T,M);x.push(...P)}for(const T of k.values())x=T(x);S(x)},triggerNodeChanges:_=>{const{onNodesChange:v,setNodes:w,nodes:x,hasDefaultNodes:b,debug:S}=g();if(_!=null&&_.length){if(b){const E=lP(_,x);w(E)}S&&console.log("React Flow: trigger node changes",_),v==null||v(_)}},triggerEdgeChanges:_=>{const{onEdgesChange:v,setEdges:w,edges:x,hasDefaultEdges:b,debug:S}=g();if(_!=null&&_.length){if(b){const E=cP(_,x);w(E)}S&&console.log("React Flow: trigger edge changes",_),v==null||v(_)}},addSelectedNodes:_=>{const{multiSelectionActive:v,edgeLookup:w,nodeLookup:x,triggerNodeChanges:b,triggerEdgeChanges:S}=g();if(v){const E=_.map(C=>zr(C,!0));b(E);return}b(zo(x,new Set([..._]),!0)),S(zo(w))},addSelectedEdges:_=>{const{multiSelectionActive:v,edgeLookup:w,nodeLookup:x,triggerNodeChanges:b,triggerEdgeChanges:S}=g();if(v){const E=_.map(C=>zr(C,!0));S(E);return}S(zo(w,new Set([..._]))),b(zo(x,new Set,!0))},unselectNodesAndEdges:({nodes:_,edges:v}={})=>{const{edges:w,nodes:x,nodeLookup:b,triggerNodeChanges:S,triggerEdgeChanges:E}=g(),C=_||x,k=v||w,T=C.map(P=>{const I=b.get(P.id);return I&&(I.selected=!1),zr(P.id,!1)}),M=k.map(P=>zr(P.id,!1));S(T),E(M)},setMinZoom:_=>{const{panZoom:v,maxZoom:w}=g();v==null||v.setScaleExtent([_,w]),p({minZoom:_})},setMaxZoom:_=>{const{panZoom:v,minZoom:w}=g();v==null||v.setScaleExtent([w,_]),p({maxZoom:_})},setTranslateExtent:_=>{var v;(v=g().panZoom)==null||v.setTranslateExtent(_),p({translateExtent:_})},resetSelectedElements:()=>{const{edges:_,nodes:v,triggerNodeChanges:w,triggerEdgeChanges:x,elementsSelectable:b}=g();if(!b)return;const S=v.reduce((C,k)=>k.selected?[...C,zr(k.id,!1)]:C,[]),E=_.reduce((C,k)=>k.selected?[...C,zr(k.id,!1)]:C,[]);w(S),x(E)},setNodeExtent:_=>{const{nodes:v,nodeLookup:w,parentLookup:x,nodeOrigin:b,elevateNodesOnSelect:S,nodeExtent:E,zIndexMode:C}=g();_[0][0]===E[0][0]&&_[0][1]===E[0][1]&&_[1][0]===E[1][0]&&_[1][1]===E[1][1]||(Pv(v,w,x,{nodeOrigin:b,nodeExtent:_,elevateNodesOnSelect:S,checkEquality:!1,zIndexMode:C}),p({nodeExtent:_}))},panBy:_=>{const{transform:v,width:w,height:x,panZoom:b,translateExtent:S}=g();return YF({delta:_,panZoom:b,transform:v,translateExtent:S,width:w,height:x})},setCenter:async(_,v,w)=>{const{width:x,height:b,maxZoom:S,panZoom:E}=g();if(!E)return Promise.resolve(!1);const C=typeof(w==null?void 0:w.zoom)<"u"?w.zoom:S;return await E.setViewport({x:x/2-_*C,y:b/2-v*C,zoom:C},{duration:w==null?void 0:w.duration,ease:w==null?void 0:w.ease,interpolate:w==null?void 0:w.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{p({connection:{...CR}})},updateConnection:_=>{p({connection:_})},reset:()=>p({...Pb()})}},Object.is);function N6({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:o,initialHeight:i,initialMinZoom:s,initialMaxZoom:a,initialFitViewOptions:l,fitView:c,nodeOrigin:u,nodeExtent:d,zIndexMode:f,children:p}){const[g]=y.useState(()=>C6({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:i,fitView:c,minZoom:s,maxZoom:a,fitViewOptions:l,nodeOrigin:u,nodeExtent:d,zIndexMode:f}));return h.jsx(Vq,{value:g,children:h.jsx(h8,{children:p})})}function k6({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:o,width:i,height:s,fitView:a,fitViewOptions:l,minZoom:c,maxZoom:u,nodeOrigin:d,nodeExtent:f,zIndexMode:p}){return y.useContext(Fc)?h.jsx(h.Fragment,{children:e}):h.jsx(N6,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:o,initialWidth:i,initialHeight:s,fitView:a,initialFitViewOptions:l,initialMinZoom:c,initialMaxZoom:u,nodeOrigin:d,nodeExtent:f,zIndexMode:p,children:e})}const R6={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function P6({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:o,nodeTypes:i,edgeTypes:s,onNodeClick:a,onEdgeClick:l,onInit:c,onMove:u,onMoveStart:d,onMoveEnd:f,onConnect:p,onConnectStart:g,onConnectEnd:m,onClickConnectStart:_,onClickConnectEnd:v,onNodeMouseEnter:w,onNodeMouseMove:x,onNodeMouseLeave:b,onNodeContextMenu:S,onNodeDoubleClick:E,onNodeDragStart:C,onNodeDrag:k,onNodeDragStop:T,onNodesDelete:M,onEdgesDelete:P,onDelete:I,onSelectionChange:D,onSelectionDragStart:R,onSelectionDrag:O,onSelectionDragStop:j,onSelectionContextMenu:L,onSelectionStart:N,onSelectionEnd:A,onBeforeDelete:$,connectionMode:z,connectionLineType:F=cr.Bezier,connectionLineStyle:V,connectionLineComponent:H,connectionLineContainerStyle:X,deleteKeyCode:Q="Backspace",selectionKeyCode:q="Shift",selectionOnDrag:B=!1,selectionMode:G=Ds.Full,panActivationKeyCode:Z="Space",multiSelectionKeyCode:Y=zs()?"Meta":"Control",zoomActivationKeyCode:U=zs()?"Meta":"Control",snapToGrid:J,snapGrid:se,onlyRenderVisibleElements:oe=!1,selectNodesOnDrag:le,nodesDraggable:ie,autoPanOnNodeFocus:Be,nodesConnectable:Te,nodesFocusable:bn,nodeOrigin:Jt=sP,edgesFocusable:tt,edgesReconnectable:Me,elementsSelectable:Xn=!0,defaultViewport:_n=r8,minZoom:Qn=.5,maxZoom:Zn=2,translateExtent:Sn=Ls,preventScrolling:ca=!0,nodeExtent:yo,defaultMarkerColor:ju="#b1b1b7",zoomOnScroll:ua=!0,zoomOnPinch:en=!0,panOnScroll:En=!1,panOnScrollSpeed:dI=.5,panOnScrollMode:fI=Yr.Free,zoomOnDoubleClick:hI=!0,panOnDrag:pI=!0,onPaneClick:mI,onPaneMouseEnter:gI,onPaneMouseMove:vI,onPaneMouseLeave:yI,onPaneScroll:xI,onPaneContextMenu:wI,paneClickDistance:bI=1,nodeClickDistance:_I=0,children:SI,onReconnect:EI,onReconnectStart:CI,onReconnectEnd:NI,onEdgeContextMenu:kI,onEdgeDoubleClick:RI,onEdgeMouseEnter:PI,onEdgeMouseMove:jI,onEdgeMouseLeave:TI,reconnectRadius:AI=10,onNodesChange:MI,onEdgesChange:II,noDragClassName:OI="nodrag",noWheelClassName:LI="nowheel",noPanClassName:rx="nopan",fitView:ox,fitViewOptions:ix,connectOnClick:DI,attributionPosition:$I,proOptions:zI,defaultEdgeOptions:FI,elevateNodesOnSelect:qI=!0,elevateEdgesOnSelect:BI=!1,disableKeyboardA11y:sx=!1,autoPanOnConnect:HI,autoPanOnNodeDrag:VI,autoPanSpeed:WI,connectionRadius:UI,isValidConnection:GI,onError:YI,style:KI,id:ax,nodeDragThreshold:XI,connectionDragThreshold:QI,viewport:ZI,onViewportChange:JI,width:eO,height:tO,colorMode:nO="light",debug:rO,onScroll:da,ariaLabelConfig:oO,zIndexMode:lx="basic",...iO},sO){const Tu=ax||"1",aO=a8(nO),lO=y.useCallback(cx=>{cx.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),da==null||da(cx)},[da]);return h.jsx("div",{"data-testid":"rf__wrapper",...iO,onScroll:lO,style:{...KI,...R6},ref:sO,className:Oe(["react-flow",o,aO]),id:ax,role:"application",children:h.jsxs(k6,{nodes:e,edges:t,width:eO,height:tO,fitView:ox,fitViewOptions:ix,minZoom:Qn,maxZoom:Zn,nodeOrigin:Jt,nodeExtent:yo,zIndexMode:lx,children:[h.jsx(E6,{onInit:c,onNodeClick:a,onEdgeClick:l,onNodeMouseEnter:w,onNodeMouseMove:x,onNodeMouseLeave:b,onNodeContextMenu:S,onNodeDoubleClick:E,nodeTypes:i,edgeTypes:s,connectionLineType:F,connectionLineStyle:V,connectionLineComponent:H,connectionLineContainerStyle:X,selectionKeyCode:q,selectionOnDrag:B,selectionMode:G,deleteKeyCode:Q,multiSelectionKeyCode:Y,panActivationKeyCode:Z,zoomActivationKeyCode:U,onlyRenderVisibleElements:oe,defaultViewport:_n,translateExtent:Sn,minZoom:Qn,maxZoom:Zn,preventScrolling:ca,zoomOnScroll:ua,zoomOnPinch:en,zoomOnDoubleClick:hI,panOnScroll:En,panOnScrollSpeed:dI,panOnScrollMode:fI,panOnDrag:pI,onPaneClick:mI,onPaneMouseEnter:gI,onPaneMouseMove:vI,onPaneMouseLeave:yI,onPaneScroll:xI,onPaneContextMenu:wI,paneClickDistance:bI,nodeClickDistance:_I,onSelectionContextMenu:L,onSelectionStart:N,onSelectionEnd:A,onReconnect:EI,onReconnectStart:CI,onReconnectEnd:NI,onEdgeContextMenu:kI,onEdgeDoubleClick:RI,onEdgeMouseEnter:PI,onEdgeMouseMove:jI,onEdgeMouseLeave:TI,reconnectRadius:AI,defaultMarkerColor:ju,noDragClassName:OI,noWheelClassName:LI,noPanClassName:rx,rfId:Tu,disableKeyboardA11y:sx,nodeExtent:yo,viewport:ZI,onViewportChange:JI}),h.jsx(s8,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:p,onConnectStart:g,onConnectEnd:m,onClickConnectStart:_,onClickConnectEnd:v,nodesDraggable:ie,autoPanOnNodeFocus:Be,nodesConnectable:Te,nodesFocusable:bn,edgesFocusable:tt,edgesReconnectable:Me,elementsSelectable:Xn,elevateNodesOnSelect:qI,elevateEdgesOnSelect:BI,minZoom:Qn,maxZoom:Zn,nodeExtent:yo,onNodesChange:MI,onEdgesChange:II,snapToGrid:J,snapGrid:se,connectionMode:z,translateExtent:Sn,connectOnClick:DI,defaultEdgeOptions:FI,fitView:ox,fitViewOptions:ix,onNodesDelete:M,onEdgesDelete:P,onDelete:I,onNodeDragStart:C,onNodeDrag:k,onNodeDragStop:T,onSelectionDrag:O,onSelectionDragStart:R,onSelectionDragStop:j,onMove:u,onMoveStart:d,onMoveEnd:f,noPanClassName:rx,nodeOrigin:Jt,rfId:Tu,autoPanOnConnect:HI,autoPanOnNodeDrag:VI,autoPanSpeed:WI,onError:YI,connectionRadius:UI,isValidConnection:GI,selectNodesOnDrag:le,nodeDragThreshold:XI,connectionDragThreshold:QI,onBeforeDelete:$,debug:rO,ariaLabelConfig:oO,zIndexMode:lx}),h.jsx(n8,{onSelectionChange:D}),SI,h.jsx(Qq,{proOptions:zI,position:$I}),h.jsx(Xq,{rfId:Tu,disableKeyboardA11y:sx})]})})}var IP=uP(P6);function OP(e){const[t,n]=y.useState(e),r=y.useCallback(o=>n(i=>lP(o,i)),[]);return[t,n,r]}function LP(e){const[t,n]=y.useState(e),r=y.useCallback(o=>n(i=>cP(o,i)),[]);return[t,n,r]}function j6({dimensions:e,lineWidth:t,variant:n,className:r}){return h.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Oe(["react-flow__background-pattern",n,r])})}function T6({radius:e,className:t}){return h.jsx("circle",{cx:e,cy:e,r:e,className:Oe(["react-flow__background-pattern","dots",t])})}var hn;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(hn||(hn={}));const A6={[hn.Dots]:1,[hn.Lines]:1,[hn.Cross]:6},M6=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function DP({id:e,variant:t=hn.Dots,gap:n=20,size:r,lineWidth:o=1,offset:i=0,color:s,bgColor:a,style:l,className:c,patternClassName:u}){const d=y.useRef(null),{transform:f,patternId:p}=me(M6,Ee),g=r||A6[t],m=t===hn.Dots,_=t===hn.Cross,v=Array.isArray(n)?n:[n,n],w=[v[0]*f[2]||1,v[1]*f[2]||1],x=g*f[2],b=Array.isArray(i)?i:[i,i],S=_?[x,x]:w,E=[b[0]*f[2]||1+S[0]/2,b[1]*f[2]||1+S[1]/2],C=`${p}${e||""}`;return h.jsxs("svg",{className:Oe(["react-flow__background",c]),style:{...l,...Bc,"--xy-background-color-props":a,"--xy-background-pattern-color-props":s},ref:d,"data-testid":"rf__background",children:[h.jsx("pattern",{id:C,x:f[0]%w[0],y:f[1]%w[1],width:w[0],height:w[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${E[0]},-${E[1]})`,children:m?h.jsx(T6,{radius:x/2,className:u}):h.jsx(j6,{dimensions:S,lineWidth:o,variant:t,className:u})}),h.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${C})`})]})}DP.displayName="Background";const $P=y.memo(DP);function I6(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:h.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function O6(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:h.jsx("path",{d:"M0 0h32v4.2H0z"})})}function L6(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:h.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function D6(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:h.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function $6(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:h.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function Fa({children:e,className:t,...n}){return h.jsx("button",{type:"button",className:Oe(["react-flow__controls-button",t]),...n,children:e})}const z6=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function zP({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:o,onZoomIn:i,onZoomOut:s,onFitView:a,onInteractiveChange:l,className:c,children:u,position:d="bottom-left",orientation:f="vertical","aria-label":p}){const g=Ce(),{isInteractive:m,minZoomReached:_,maxZoomReached:v,ariaLabelConfig:w}=me(z6,Ee),{zoomIn:x,zoomOut:b,fitView:S}=u0(),E=()=>{x(),i==null||i()},C=()=>{b(),s==null||s()},k=()=>{S(o),a==null||a()},T=()=>{g.setState({nodesDraggable:!m,nodesConnectable:!m,elementsSelectable:!m}),l==null||l(!m)},M=f==="horizontal"?"horizontal":"vertical";return h.jsxs(qc,{className:Oe(["react-flow__controls",M,c]),position:d,style:e,"data-testid":"rf__controls","aria-label":p??w["controls.ariaLabel"],children:[t&&h.jsxs(h.Fragment,{children:[h.jsx(Fa,{onClick:E,className:"react-flow__controls-zoomin",title:w["controls.zoomIn.ariaLabel"],"aria-label":w["controls.zoomIn.ariaLabel"],disabled:v,children:h.jsx(I6,{})}),h.jsx(Fa,{onClick:C,className:"react-flow__controls-zoomout",title:w["controls.zoomOut.ariaLabel"],"aria-label":w["controls.zoomOut.ariaLabel"],disabled:_,children:h.jsx(O6,{})})]}),n&&h.jsx(Fa,{className:"react-flow__controls-fitview",onClick:k,title:w["controls.fitView.ariaLabel"],"aria-label":w["controls.fitView.ariaLabel"],children:h.jsx(L6,{})}),r&&h.jsx(Fa,{className:"react-flow__controls-interactive",onClick:T,title:w["controls.interactive.ariaLabel"],"aria-label":w["controls.interactive.ariaLabel"],children:m?h.jsx($6,{}):h.jsx(D6,{})}),u]})}zP.displayName="Controls";const FP=y.memo(zP);function F6({id:e,x:t,y:n,width:r,height:o,style:i,color:s,strokeColor:a,strokeWidth:l,className:c,borderRadius:u,shapeRendering:d,selected:f,onClick:p}){const{background:g,backgroundColor:m}=i||{},_=s||g||m;return h.jsx("rect",{className:Oe(["react-flow__minimap-node",{selected:f},c]),x:t,y:n,rx:u,ry:u,width:r,height:o,style:{fill:_,stroke:a,strokeWidth:l},shapeRendering:d,onClick:p?v=>p(v,e):void 0})}const q6=y.memo(F6),B6=e=>e.nodes.map(t=>t.id),gd=e=>e instanceof Function?e:()=>e;function H6({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:o,nodeComponent:i=q6,onClick:s}){const a=me(B6,Ee),l=gd(t),c=gd(e),u=gd(n),d=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return h.jsx(h.Fragment,{children:a.map(f=>h.jsx(W6,{id:f,nodeColorFunc:l,nodeStrokeColorFunc:c,nodeClassNameFunc:u,nodeBorderRadius:r,nodeStrokeWidth:o,NodeComponent:i,onClick:s,shapeRendering:d},f))})}function V6({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:o,nodeStrokeWidth:i,shapeRendering:s,NodeComponent:a,onClick:l}){const{node:c,x:u,y:d,width:f,height:p}=me(g=>{const{internals:m}=g.nodeLookup.get(e),_=m.userNode,{x:v,y:w}=m.positionAbsolute,{width:x,height:b}=Gn(_);return{node:_,x:v,y:w,width:x,height:b}},Ee);return!c||c.hidden||!AR(c)?null:h.jsx(a,{x:u,y:d,width:f,height:p,style:c.style,selected:!!c.selected,className:r(c),color:t(c),borderRadius:o,strokeColor:n(c),strokeWidth:i,shapeRendering:s,onClick:l,id:c.id})}const W6=y.memo(V6);var U6=y.memo(H6);const G6=200,Y6=150,K6=e=>!e.hidden,X6=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?TR(Js(e.nodeLookup,{filter:K6}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},Q6="react-flow__minimap-desc";function qP({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:o="",nodeBorderRadius:i=5,nodeStrokeWidth:s,nodeComponent:a,bgColor:l,maskColor:c,maskStrokeColor:u,maskStrokeWidth:d,position:f="bottom-right",onClick:p,onNodeClick:g,pannable:m=!1,zoomable:_=!1,ariaLabel:v,inversePan:w,zoomStep:x=1,offsetScale:b=5}){const S=Ce(),E=y.useRef(null),{boundingRect:C,viewBB:k,rfId:T,panZoom:M,translateExtent:P,flowWidth:I,flowHeight:D,ariaLabelConfig:R}=me(X6,Ee),O=(e==null?void 0:e.width)??G6,j=(e==null?void 0:e.height)??Y6,L=C.width/O,N=C.height/j,A=Math.max(L,N),$=A*O,z=A*j,F=b*A,V=C.x-($-C.width)/2-F,H=C.y-(z-C.height)/2-F,X=$+F*2,Q=z+F*2,q=`${Q6}-${T}`,B=y.useRef(0),G=y.useRef();B.current=A,y.useEffect(()=>{if(E.current&&M)return G.current=rq({domNode:E.current,panZoom:M,getTransform:()=>S.getState().transform,getViewScale:()=>B.current}),()=>{var J;(J=G.current)==null||J.destroy()}},[M]),y.useEffect(()=>{var J;(J=G.current)==null||J.update({translateExtent:P,width:I,height:D,inversePan:w,pannable:m,zoomStep:x,zoomable:_})},[m,_,w,x,P,I,D]);const Z=p?J=>{var le;const[se,oe]=((le=G.current)==null?void 0:le.pointer(J))||[0,0];p(J,{x:se,y:oe})}:void 0,Y=g?y.useCallback((J,se)=>{const oe=S.getState().nodeLookup.get(se).internals.userNode;g(J,oe)},[]):void 0,U=v??R["minimap.ariaLabel"];return h.jsx(qc,{position:f,style:{...e,"--xy-minimap-background-color-props":typeof l=="string"?l:void 0,"--xy-minimap-mask-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-stroke-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-width-props":typeof d=="number"?d*A:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof s=="number"?s:void 0},className:Oe(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:h.jsxs("svg",{width:O,height:j,viewBox:`${V} ${H} ${X} ${Q}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":q,ref:E,onClick:Z,children:[U&&h.jsx("title",{id:q,children:U}),h.jsx(U6,{onClick:Y,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:i,nodeClassName:o,nodeStrokeWidth:s,nodeComponent:a}),h.jsx("path",{className:"react-flow__minimap-mask",d:`M${V-F},${H-F}h${X+F*2}v${Q+F*2}h${-X-F*2}z
|
|
292
|
+
M${k.x},${k.y}h${k.width}v${k.height}h${-k.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}qP.displayName="MiniMap";const BP=y.memo(qP),Z6=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,J6={[ui.Line]:"right",[ui.Handle]:"bottom-right"};function eB({nodeId:e,position:t,variant:n=ui.Handle,className:r,style:o=void 0,children:i,color:s,minWidth:a=10,minHeight:l=10,maxWidth:c=Number.MAX_VALUE,maxHeight:u=Number.MAX_VALUE,keepAspectRatio:d=!1,resizeDirection:f,autoScale:p=!0,shouldResize:g,onResizeStart:m,onResize:_,onResizeEnd:v}){const w=pP(),x=typeof e=="string"?e:w,b=Ce(),S=y.useRef(null),E=n===ui.Handle,C=me(y.useCallback(Z6(E&&p),[E,p]),Ee),k=y.useRef(null),T=t??J6[n];y.useEffect(()=>{if(!(!S.current||!x))return k.current||(k.current=vq({domNode:S.current,nodeId:x,getStoreItems:()=>{const{nodeLookup:P,transform:I,snapGrid:D,snapToGrid:R,nodeOrigin:O,domNode:j}=b.getState();return{nodeLookup:P,transform:I,snapGrid:D,snapToGrid:R,nodeOrigin:O,paneDomNode:j}},onChange:(P,I)=>{const{triggerNodeChanges:D,nodeLookup:R,parentLookup:O,nodeOrigin:j}=b.getState(),L=[],N={x:P.x,y:P.y},A=R.get(x);if(A&&A.expandParent&&A.parentId){const $=A.origin??j,z=P.width??A.measured.width??0,F=P.height??A.measured.height??0,V={id:A.id,parentId:A.parentId,rect:{width:z,height:F,...MR({x:P.x??A.position.x,y:P.y??A.position.y},{width:z,height:F},A.parentId,R,$)}},H=c0([V],R,O,j);L.push(...H),N.x=P.x?Math.max($[0]*z,P.x):void 0,N.y=P.y?Math.max($[1]*F,P.y):void 0}if(N.x!==void 0&&N.y!==void 0){const $={id:x,type:"position",position:{...N}};L.push($)}if(P.width!==void 0&&P.height!==void 0){const z={id:x,type:"dimensions",resizing:!0,setAttributes:f?f==="horizontal"?"width":"height":!0,dimensions:{width:P.width,height:P.height}};L.push(z)}for(const $ of I){const z={...$,type:"position"};L.push(z)}D(L)},onEnd:({width:P,height:I})=>{const D={id:x,type:"dimensions",resizing:!1,dimensions:{width:P,height:I}};b.getState().triggerNodeChanges([D])}})),k.current.update({controlPosition:T,boundaries:{minWidth:a,minHeight:l,maxWidth:c,maxHeight:u},keepAspectRatio:d,resizeDirection:f,onResizeStart:m,onResize:_,onResizeEnd:v,shouldResize:g}),()=>{var P;(P=k.current)==null||P.destroy()}},[T,a,l,c,u,d,m,_,v,g]);const M=T.split("-");return h.jsx("div",{className:Oe(["react-flow__resize-control","nodrag",...M,n,r]),ref:S,style:{...o,scale:C,...s&&{[E?"backgroundColor":"borderColor"]:s}},children:i})}y.memo(eB);function f0(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var vd,jb;function tB(){if(jb)return vd;jb=1;function e(){this.__data__=[],this.size=0}return vd=e,vd}var yd,Tb;function Si(){if(Tb)return yd;Tb=1;function e(t,n){return t===n||t!==t&&n!==n}return yd=e,yd}var xd,Ab;function Vc(){if(Ab)return xd;Ab=1;var e=Si();function t(n,r){for(var o=n.length;o--;)if(e(n[o][0],r))return o;return-1}return xd=t,xd}var wd,Mb;function nB(){if(Mb)return wd;Mb=1;var e=Vc(),t=Array.prototype,n=t.splice;function r(o){var i=this.__data__,s=e(i,o);if(s<0)return!1;var a=i.length-1;return s==a?i.pop():n.call(i,s,1),--this.size,!0}return wd=r,wd}var bd,Ib;function rB(){if(Ib)return bd;Ib=1;var e=Vc();function t(n){var r=this.__data__,o=e(r,n);return o<0?void 0:r[o][1]}return bd=t,bd}var _d,Ob;function oB(){if(Ob)return _d;Ob=1;var e=Vc();function t(n){return e(this.__data__,n)>-1}return _d=t,_d}var Sd,Lb;function iB(){if(Lb)return Sd;Lb=1;var e=Vc();function t(n,r){var o=this.__data__,i=e(o,n);return i<0?(++this.size,o.push([n,r])):o[i][1]=r,this}return Sd=t,Sd}var Ed,Db;function Wc(){if(Db)return Ed;Db=1;var e=tB(),t=nB(),n=rB(),r=oB(),o=iB();function i(s){var a=-1,l=s==null?0:s.length;for(this.clear();++a<l;){var c=s[a];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=o,Ed=i,Ed}var Cd,$b;function sB(){if($b)return Cd;$b=1;var e=Wc();function t(){this.__data__=new e,this.size=0}return Cd=t,Cd}var Nd,zb;function aB(){if(zb)return Nd;zb=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return Nd=e,Nd}var kd,Fb;function lB(){if(Fb)return kd;Fb=1;function e(t){return this.__data__.get(t)}return kd=e,kd}var Rd,qb;function cB(){if(qb)return Rd;qb=1;function e(t){return this.__data__.has(t)}return Rd=e,Rd}var Pd,Bb;function HP(){if(Bb)return Pd;Bb=1;var e=typeof fa=="object"&&fa&&fa.Object===Object&&fa;return Pd=e,Pd}var jd,Hb;function Kt(){if(Hb)return jd;Hb=1;var e=HP(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return jd=n,jd}var Td,Vb;function Ei(){if(Vb)return Td;Vb=1;var e=Kt(),t=e.Symbol;return Td=t,Td}var Ad,Wb;function uB(){if(Wb)return Ad;Wb=1;var e=Ei(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,o=e?e.toStringTag:void 0;function i(s){var a=n.call(s,o),l=s[o];try{s[o]=void 0;var c=!0}catch{}var u=r.call(s);return c&&(a?s[o]=l:delete s[o]),u}return Ad=i,Ad}var Md,Ub;function dB(){if(Ub)return Md;Ub=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return Md=n,Md}var Id,Gb;function fo(){if(Gb)return Id;Gb=1;var e=Ei(),t=uB(),n=dB(),r="[object Null]",o="[object Undefined]",i=e?e.toStringTag:void 0;function s(a){return a==null?a===void 0?o:r:i&&i in Object(a)?t(a):n(a)}return Id=s,Id}var Od,Yb;function jt(){if(Yb)return Od;Yb=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return Od=e,Od}var Ld,Kb;function na(){if(Kb)return Ld;Kb=1;var e=fo(),t=jt(),n="[object AsyncFunction]",r="[object Function]",o="[object GeneratorFunction]",i="[object Proxy]";function s(a){if(!t(a))return!1;var l=e(a);return l==r||l==o||l==n||l==i}return Ld=s,Ld}var Dd,Xb;function fB(){if(Xb)return Dd;Xb=1;var e=Kt(),t=e["__core-js_shared__"];return Dd=t,Dd}var $d,Qb;function hB(){if(Qb)return $d;Qb=1;var e=fB(),t=function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function n(r){return!!t&&t in r}return $d=n,$d}var zd,Zb;function VP(){if(Zb)return zd;Zb=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return zd=n,zd}var Fd,Jb;function pB(){if(Jb)return Fd;Jb=1;var e=na(),t=hB(),n=jt(),r=VP(),o=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,s=Function.prototype,a=Object.prototype,l=s.toString,c=a.hasOwnProperty,u=RegExp("^"+l.call(c).replace(o,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function d(f){if(!n(f)||t(f))return!1;var p=e(f)?u:i;return p.test(r(f))}return Fd=d,Fd}var qd,e1;function mB(){if(e1)return qd;e1=1;function e(t,n){return t==null?void 0:t[n]}return qd=e,qd}var Bd,t1;function ho(){if(t1)return Bd;t1=1;var e=pB(),t=mB();function n(r,o){var i=t(r,o);return e(i)?i:void 0}return Bd=n,Bd}var Hd,n1;function h0(){if(n1)return Hd;n1=1;var e=ho(),t=Kt(),n=e(t,"Map");return Hd=n,Hd}var Vd,r1;function Uc(){if(r1)return Vd;r1=1;var e=ho(),t=e(Object,"create");return Vd=t,Vd}var Wd,o1;function gB(){if(o1)return Wd;o1=1;var e=Uc();function t(){this.__data__=e?e(null):{},this.size=0}return Wd=t,Wd}var Ud,i1;function vB(){if(i1)return Ud;i1=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return Ud=e,Ud}var Gd,s1;function yB(){if(s1)return Gd;s1=1;var e=Uc(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function o(i){var s=this.__data__;if(e){var a=s[i];return a===t?void 0:a}return r.call(s,i)?s[i]:void 0}return Gd=o,Gd}var Yd,a1;function xB(){if(a1)return Yd;a1=1;var e=Uc(),t=Object.prototype,n=t.hasOwnProperty;function r(o){var i=this.__data__;return e?i[o]!==void 0:n.call(i,o)}return Yd=r,Yd}var Kd,l1;function wB(){if(l1)return Kd;l1=1;var e=Uc(),t="__lodash_hash_undefined__";function n(r,o){var i=this.__data__;return this.size+=this.has(r)?0:1,i[r]=e&&o===void 0?t:o,this}return Kd=n,Kd}var Xd,c1;function bB(){if(c1)return Xd;c1=1;var e=gB(),t=vB(),n=yB(),r=xB(),o=wB();function i(s){var a=-1,l=s==null?0:s.length;for(this.clear();++a<l;){var c=s[a];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=o,Xd=i,Xd}var Qd,u1;function _B(){if(u1)return Qd;u1=1;var e=bB(),t=Wc(),n=h0();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return Qd=r,Qd}var Zd,d1;function SB(){if(d1)return Zd;d1=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return Zd=e,Zd}var Jd,f1;function Gc(){if(f1)return Jd;f1=1;var e=SB();function t(n,r){var o=n.__data__;return e(r)?o[typeof r=="string"?"string":"hash"]:o.map}return Jd=t,Jd}var ef,h1;function EB(){if(h1)return ef;h1=1;var e=Gc();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return ef=t,ef}var tf,p1;function CB(){if(p1)return tf;p1=1;var e=Gc();function t(n){return e(this,n).get(n)}return tf=t,tf}var nf,m1;function NB(){if(m1)return nf;m1=1;var e=Gc();function t(n){return e(this,n).has(n)}return nf=t,nf}var rf,g1;function kB(){if(g1)return rf;g1=1;var e=Gc();function t(n,r){var o=e(this,n),i=o.size;return o.set(n,r),this.size+=o.size==i?0:1,this}return rf=t,rf}var of,v1;function p0(){if(v1)return of;v1=1;var e=_B(),t=EB(),n=CB(),r=NB(),o=kB();function i(s){var a=-1,l=s==null?0:s.length;for(this.clear();++a<l;){var c=s[a];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=o,of=i,of}var sf,y1;function RB(){if(y1)return sf;y1=1;var e=Wc(),t=h0(),n=p0(),r=200;function o(i,s){var a=this.__data__;if(a instanceof e){var l=a.__data__;if(!t||l.length<r-1)return l.push([i,s]),this.size=++a.size,this;a=this.__data__=new n(l)}return a.set(i,s),this.size=a.size,this}return sf=o,sf}var af,x1;function Yc(){if(x1)return af;x1=1;var e=Wc(),t=sB(),n=aB(),r=lB(),o=cB(),i=RB();function s(a){var l=this.__data__=new e(a);this.size=l.size}return s.prototype.clear=t,s.prototype.delete=n,s.prototype.get=r,s.prototype.has=o,s.prototype.set=i,af=s,af}var lf,w1;function m0(){if(w1)return lf;w1=1;function e(t,n){for(var r=-1,o=t==null?0:t.length;++r<o&&n(t[r],r,t)!==!1;);return t}return lf=e,lf}var cf,b1;function WP(){if(b1)return cf;b1=1;var e=ho(),t=function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}}();return cf=t,cf}var uf,_1;function Kc(){if(_1)return uf;_1=1;var e=WP();function t(n,r,o){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:o,writable:!0}):n[r]=o}return uf=t,uf}var df,S1;function Xc(){if(S1)return df;S1=1;var e=Kc(),t=Si(),n=Object.prototype,r=n.hasOwnProperty;function o(i,s,a){var l=i[s];(!(r.call(i,s)&&t(l,a))||a===void 0&&!(s in i))&&e(i,s,a)}return df=o,df}var ff,E1;function ra(){if(E1)return ff;E1=1;var e=Xc(),t=Kc();function n(r,o,i,s){var a=!i;i||(i={});for(var l=-1,c=o.length;++l<c;){var u=o[l],d=s?s(i[u],r[u],u,i,r):void 0;d===void 0&&(d=r[u]),a?t(i,u,d):e(i,u,d)}return i}return ff=n,ff}var hf,C1;function PB(){if(C1)return hf;C1=1;function e(t,n){for(var r=-1,o=Array(t);++r<t;)o[r]=n(r);return o}return hf=e,hf}var pf,N1;function yn(){if(N1)return pf;N1=1;function e(t){return t!=null&&typeof t=="object"}return pf=e,pf}var mf,k1;function jB(){if(k1)return mf;k1=1;var e=fo(),t=yn(),n="[object Arguments]";function r(o){return t(o)&&e(o)==n}return mf=r,mf}var gf,R1;function oa(){if(R1)return gf;R1=1;var e=jB(),t=yn(),n=Object.prototype,r=n.hasOwnProperty,o=n.propertyIsEnumerable,i=e(function(){return arguments}())?e:function(s){return t(s)&&r.call(s,"callee")&&!o.call(s,"callee")};return gf=i,gf}var vf,P1;function Le(){if(P1)return vf;P1=1;var e=Array.isArray;return vf=e,vf}var Xi={exports:{}},yf,j1;function TB(){if(j1)return yf;j1=1;function e(){return!1}return yf=e,yf}Xi.exports;var T1;function Ci(){return T1||(T1=1,function(e,t){var n=Kt(),r=TB(),o=t&&!t.nodeType&&t,i=o&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===o,a=s?n.Buffer:void 0,l=a?a.isBuffer:void 0,c=l||r;e.exports=c}(Xi,Xi.exports)),Xi.exports}var xf,A1;function Qc(){if(A1)return xf;A1=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,o){var i=typeof r;return o=o??e,!!o&&(i=="number"||i!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<o}return xf=n,xf}var wf,M1;function g0(){if(M1)return wf;M1=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return wf=t,wf}var bf,I1;function AB(){if(I1)return bf;I1=1;var e=fo(),t=g0(),n=yn(),r="[object Arguments]",o="[object Array]",i="[object Boolean]",s="[object Date]",a="[object Error]",l="[object Function]",c="[object Map]",u="[object Number]",d="[object Object]",f="[object RegExp]",p="[object Set]",g="[object String]",m="[object WeakMap]",_="[object ArrayBuffer]",v="[object DataView]",w="[object Float32Array]",x="[object Float64Array]",b="[object Int8Array]",S="[object Int16Array]",E="[object Int32Array]",C="[object Uint8Array]",k="[object Uint8ClampedArray]",T="[object Uint16Array]",M="[object Uint32Array]",P={};P[w]=P[x]=P[b]=P[S]=P[E]=P[C]=P[k]=P[T]=P[M]=!0,P[r]=P[o]=P[_]=P[i]=P[v]=P[s]=P[a]=P[l]=P[c]=P[u]=P[d]=P[f]=P[p]=P[g]=P[m]=!1;function I(D){return n(D)&&t(D.length)&&!!P[e(D)]}return bf=I,bf}var _f,O1;function Zc(){if(O1)return _f;O1=1;function e(t){return function(n){return t(n)}}return _f=e,_f}var Qi={exports:{}};Qi.exports;var L1;function v0(){return L1||(L1=1,function(e,t){var n=HP(),r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,s=i&&n.process,a=function(){try{var l=o&&o.require&&o.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();e.exports=a}(Qi,Qi.exports)),Qi.exports}var Sf,D1;function ia(){if(D1)return Sf;D1=1;var e=AB(),t=Zc(),n=v0(),r=n&&n.isTypedArray,o=r?t(r):e;return Sf=o,Sf}var Ef,$1;function UP(){if($1)return Ef;$1=1;var e=PB(),t=oa(),n=Le(),r=Ci(),o=Qc(),i=ia(),s=Object.prototype,a=s.hasOwnProperty;function l(c,u){var d=n(c),f=!d&&t(c),p=!d&&!f&&r(c),g=!d&&!f&&!p&&i(c),m=d||f||p||g,_=m?e(c.length,String):[],v=_.length;for(var w in c)(u||a.call(c,w))&&!(m&&(w=="length"||p&&(w=="offset"||w=="parent")||g&&(w=="buffer"||w=="byteLength"||w=="byteOffset")||o(w,v)))&&_.push(w);return _}return Ef=l,Ef}var Cf,z1;function Jc(){if(z1)return Cf;z1=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,o=typeof r=="function"&&r.prototype||e;return n===o}return Cf=t,Cf}var Nf,F1;function GP(){if(F1)return Nf;F1=1;function e(t,n){return function(r){return t(n(r))}}return Nf=e,Nf}var kf,q1;function MB(){if(q1)return kf;q1=1;var e=GP(),t=e(Object.keys,Object);return kf=t,kf}var Rf,B1;function y0(){if(B1)return Rf;B1=1;var e=Jc(),t=MB(),n=Object.prototype,r=n.hasOwnProperty;function o(i){if(!e(i))return t(i);var s=[];for(var a in Object(i))r.call(i,a)&&a!="constructor"&&s.push(a);return s}return Rf=o,Rf}var Pf,H1;function Yn(){if(H1)return Pf;H1=1;var e=na(),t=g0();function n(r){return r!=null&&t(r.length)&&!e(r)}return Pf=n,Pf}var jf,V1;function Ar(){if(V1)return jf;V1=1;var e=UP(),t=y0(),n=Yn();function r(o){return n(o)?e(o):t(o)}return jf=r,jf}var Tf,W1;function IB(){if(W1)return Tf;W1=1;var e=ra(),t=Ar();function n(r,o){return r&&e(o,t(o),r)}return Tf=n,Tf}var Af,U1;function OB(){if(U1)return Af;U1=1;function e(t){var n=[];if(t!=null)for(var r in Object(t))n.push(r);return n}return Af=e,Af}var Mf,G1;function LB(){if(G1)return Mf;G1=1;var e=jt(),t=Jc(),n=OB(),r=Object.prototype,o=r.hasOwnProperty;function i(s){if(!e(s))return n(s);var a=t(s),l=[];for(var c in s)c=="constructor"&&(a||!o.call(s,c))||l.push(c);return l}return Mf=i,Mf}var If,Y1;function po(){if(Y1)return If;Y1=1;var e=UP(),t=LB(),n=Yn();function r(o){return n(o)?e(o,!0):t(o)}return If=r,If}var Of,K1;function DB(){if(K1)return Of;K1=1;var e=ra(),t=po();function n(r,o){return r&&e(o,t(o),r)}return Of=n,Of}var Zi={exports:{}};Zi.exports;var X1;function YP(){return X1||(X1=1,function(e,t){var n=Kt(),r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,s=i?n.Buffer:void 0,a=s?s.allocUnsafe:void 0;function l(c,u){if(u)return c.slice();var d=c.length,f=a?a(d):new c.constructor(d);return c.copy(f),f}e.exports=l}(Zi,Zi.exports)),Zi.exports}var Lf,Q1;function KP(){if(Q1)return Lf;Q1=1;function e(t,n){var r=-1,o=t.length;for(n||(n=Array(o));++r<o;)n[r]=t[r];return n}return Lf=e,Lf}var Df,Z1;function XP(){if(Z1)return Df;Z1=1;function e(t,n){for(var r=-1,o=t==null?0:t.length,i=0,s=[];++r<o;){var a=t[r];n(a,r,t)&&(s[i++]=a)}return s}return Df=e,Df}var $f,J1;function QP(){if(J1)return $f;J1=1;function e(){return[]}return $f=e,$f}var zf,e_;function x0(){if(e_)return zf;e_=1;var e=XP(),t=QP(),n=Object.prototype,r=n.propertyIsEnumerable,o=Object.getOwnPropertySymbols,i=o?function(s){return s==null?[]:(s=Object(s),e(o(s),function(a){return r.call(s,a)}))}:t;return zf=i,zf}var Ff,t_;function $B(){if(t_)return Ff;t_=1;var e=ra(),t=x0();function n(r,o){return e(r,t(r),o)}return Ff=n,Ff}var qf,n_;function w0(){if(n_)return qf;n_=1;function e(t,n){for(var r=-1,o=n.length,i=t.length;++r<o;)t[i+r]=n[r];return t}return qf=e,qf}var Bf,r_;function eu(){if(r_)return Bf;r_=1;var e=GP(),t=e(Object.getPrototypeOf,Object);return Bf=t,Bf}var Hf,o_;function ZP(){if(o_)return Hf;o_=1;var e=w0(),t=eu(),n=x0(),r=QP(),o=Object.getOwnPropertySymbols,i=o?function(s){for(var a=[];s;)e(a,n(s)),s=t(s);return a}:r;return Hf=i,Hf}var Vf,i_;function zB(){if(i_)return Vf;i_=1;var e=ra(),t=ZP();function n(r,o){return e(r,t(r),o)}return Vf=n,Vf}var Wf,s_;function JP(){if(s_)return Wf;s_=1;var e=w0(),t=Le();function n(r,o,i){var s=o(r);return t(r)?s:e(s,i(r))}return Wf=n,Wf}var Uf,a_;function ej(){if(a_)return Uf;a_=1;var e=JP(),t=x0(),n=Ar();function r(o){return e(o,n,t)}return Uf=r,Uf}var Gf,l_;function FB(){if(l_)return Gf;l_=1;var e=JP(),t=ZP(),n=po();function r(o){return e(o,n,t)}return Gf=r,Gf}var Yf,c_;function qB(){if(c_)return Yf;c_=1;var e=ho(),t=Kt(),n=e(t,"DataView");return Yf=n,Yf}var Kf,u_;function BB(){if(u_)return Kf;u_=1;var e=ho(),t=Kt(),n=e(t,"Promise");return Kf=n,Kf}var Xf,d_;function tj(){if(d_)return Xf;d_=1;var e=ho(),t=Kt(),n=e(t,"Set");return Xf=n,Xf}var Qf,f_;function HB(){if(f_)return Qf;f_=1;var e=ho(),t=Kt(),n=e(t,"WeakMap");return Qf=n,Qf}var Zf,h_;function Ni(){if(h_)return Zf;h_=1;var e=qB(),t=h0(),n=BB(),r=tj(),o=HB(),i=fo(),s=VP(),a="[object Map]",l="[object Object]",c="[object Promise]",u="[object Set]",d="[object WeakMap]",f="[object DataView]",p=s(e),g=s(t),m=s(n),_=s(r),v=s(o),w=i;return(e&&w(new e(new ArrayBuffer(1)))!=f||t&&w(new t)!=a||n&&w(n.resolve())!=c||r&&w(new r)!=u||o&&w(new o)!=d)&&(w=function(x){var b=i(x),S=b==l?x.constructor:void 0,E=S?s(S):"";if(E)switch(E){case p:return f;case g:return a;case m:return c;case _:return u;case v:return d}return b}),Zf=w,Zf}var Jf,p_;function VB(){if(p_)return Jf;p_=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r){var o=r.length,i=new r.constructor(o);return o&&typeof r[0]=="string"&&t.call(r,"index")&&(i.index=r.index,i.input=r.input),i}return Jf=n,Jf}var eh,m_;function nj(){if(m_)return eh;m_=1;var e=Kt(),t=e.Uint8Array;return eh=t,eh}var th,g_;function b0(){if(g_)return th;g_=1;var e=nj();function t(n){var r=new n.constructor(n.byteLength);return new e(r).set(new e(n)),r}return th=t,th}var nh,v_;function WB(){if(v_)return nh;v_=1;var e=b0();function t(n,r){var o=r?e(n.buffer):n.buffer;return new n.constructor(o,n.byteOffset,n.byteLength)}return nh=t,nh}var rh,y_;function UB(){if(y_)return rh;y_=1;var e=/\w*$/;function t(n){var r=new n.constructor(n.source,e.exec(n));return r.lastIndex=n.lastIndex,r}return rh=t,rh}var oh,x_;function GB(){if(x_)return oh;x_=1;var e=Ei(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;function r(o){return n?Object(n.call(o)):{}}return oh=r,oh}var ih,w_;function rj(){if(w_)return ih;w_=1;var e=b0();function t(n,r){var o=r?e(n.buffer):n.buffer;return new n.constructor(o,n.byteOffset,n.length)}return ih=t,ih}var sh,b_;function YB(){if(b_)return sh;b_=1;var e=b0(),t=WB(),n=UB(),r=GB(),o=rj(),i="[object Boolean]",s="[object Date]",a="[object Map]",l="[object Number]",c="[object RegExp]",u="[object Set]",d="[object String]",f="[object Symbol]",p="[object ArrayBuffer]",g="[object DataView]",m="[object Float32Array]",_="[object Float64Array]",v="[object Int8Array]",w="[object Int16Array]",x="[object Int32Array]",b="[object Uint8Array]",S="[object Uint8ClampedArray]",E="[object Uint16Array]",C="[object Uint32Array]";function k(T,M,P){var I=T.constructor;switch(M){case p:return e(T);case i:case s:return new I(+T);case g:return t(T,P);case m:case _:case v:case w:case x:case b:case S:case E:case C:return o(T,P);case a:return new I;case l:case d:return new I(T);case c:return n(T);case u:return new I;case f:return r(T)}}return sh=k,sh}var ah,__;function oj(){if(__)return ah;__=1;var e=jt(),t=Object.create,n=function(){function r(){}return function(o){if(!e(o))return{};if(t)return t(o);r.prototype=o;var i=new r;return r.prototype=void 0,i}}();return ah=n,ah}var lh,S_;function ij(){if(S_)return lh;S_=1;var e=oj(),t=eu(),n=Jc();function r(o){return typeof o.constructor=="function"&&!n(o)?e(t(o)):{}}return lh=r,lh}var ch,E_;function KB(){if(E_)return ch;E_=1;var e=Ni(),t=yn(),n="[object Map]";function r(o){return t(o)&&e(o)==n}return ch=r,ch}var uh,C_;function XB(){if(C_)return uh;C_=1;var e=KB(),t=Zc(),n=v0(),r=n&&n.isMap,o=r?t(r):e;return uh=o,uh}var dh,N_;function QB(){if(N_)return dh;N_=1;var e=Ni(),t=yn(),n="[object Set]";function r(o){return t(o)&&e(o)==n}return dh=r,dh}var fh,k_;function ZB(){if(k_)return fh;k_=1;var e=QB(),t=Zc(),n=v0(),r=n&&n.isSet,o=r?t(r):e;return fh=o,fh}var hh,R_;function sj(){if(R_)return hh;R_=1;var e=Yc(),t=m0(),n=Xc(),r=IB(),o=DB(),i=YP(),s=KP(),a=$B(),l=zB(),c=ej(),u=FB(),d=Ni(),f=VB(),p=YB(),g=ij(),m=Le(),_=Ci(),v=XB(),w=jt(),x=ZB(),b=Ar(),S=po(),E=1,C=2,k=4,T="[object Arguments]",M="[object Array]",P="[object Boolean]",I="[object Date]",D="[object Error]",R="[object Function]",O="[object GeneratorFunction]",j="[object Map]",L="[object Number]",N="[object Object]",A="[object RegExp]",$="[object Set]",z="[object String]",F="[object Symbol]",V="[object WeakMap]",H="[object ArrayBuffer]",X="[object DataView]",Q="[object Float32Array]",q="[object Float64Array]",B="[object Int8Array]",G="[object Int16Array]",Z="[object Int32Array]",Y="[object Uint8Array]",U="[object Uint8ClampedArray]",J="[object Uint16Array]",se="[object Uint32Array]",oe={};oe[T]=oe[M]=oe[H]=oe[X]=oe[P]=oe[I]=oe[Q]=oe[q]=oe[B]=oe[G]=oe[Z]=oe[j]=oe[L]=oe[N]=oe[A]=oe[$]=oe[z]=oe[F]=oe[Y]=oe[U]=oe[J]=oe[se]=!0,oe[D]=oe[R]=oe[V]=!1;function le(ie,Be,Te,bn,Jt,tt){var Me,Xn=Be&E,_n=Be&C,Qn=Be&k;if(Te&&(Me=Jt?Te(ie,bn,Jt,tt):Te(ie)),Me!==void 0)return Me;if(!w(ie))return ie;var Zn=m(ie);if(Zn){if(Me=f(ie),!Xn)return s(ie,Me)}else{var Sn=d(ie),ca=Sn==R||Sn==O;if(_(ie))return i(ie,Xn);if(Sn==N||Sn==T||ca&&!Jt){if(Me=_n||ca?{}:g(ie),!Xn)return _n?l(ie,o(Me,ie)):a(ie,r(Me,ie))}else{if(!oe[Sn])return Jt?ie:{};Me=p(ie,Sn,Xn)}}tt||(tt=new e);var yo=tt.get(ie);if(yo)return yo;tt.set(ie,Me),x(ie)?ie.forEach(function(en){Me.add(le(en,Be,Te,en,ie,tt))}):v(ie)&&ie.forEach(function(en,En){Me.set(En,le(en,Be,Te,En,ie,tt))});var ju=Qn?_n?u:c:_n?S:b,ua=Zn?void 0:ju(ie);return t(ua||ie,function(en,En){ua&&(En=en,en=ie[En]),n(Me,En,le(en,Be,Te,En,ie,tt))}),Me}return hh=le,hh}var ph,P_;function JB(){if(P_)return ph;P_=1;var e=sj(),t=4;function n(r){return e(r,t)}return ph=n,ph}var mh,j_;function _0(){if(j_)return mh;j_=1;function e(t){return function(){return t}}return mh=e,mh}var gh,T_;function eH(){if(T_)return gh;T_=1;function e(t){return function(n,r,o){for(var i=-1,s=Object(n),a=o(n),l=a.length;l--;){var c=a[t?l:++i];if(r(s[c],c,s)===!1)break}return n}}return gh=e,gh}var vh,A_;function S0(){if(A_)return vh;A_=1;var e=eH(),t=e();return vh=t,vh}var yh,M_;function E0(){if(M_)return yh;M_=1;var e=S0(),t=Ar();function n(r,o){return r&&e(r,o,t)}return yh=n,yh}var xh,I_;function tH(){if(I_)return xh;I_=1;var e=Yn();function t(n,r){return function(o,i){if(o==null)return o;if(!e(o))return n(o,i);for(var s=o.length,a=r?s:-1,l=Object(o);(r?a--:++a<s)&&i(l[a],a,l)!==!1;);return o}}return xh=t,xh}var wh,O_;function tu(){if(O_)return wh;O_=1;var e=E0(),t=tH(),n=t(e);return wh=n,wh}var bh,L_;function mo(){if(L_)return bh;L_=1;function e(t){return t}return bh=e,bh}var _h,D_;function aj(){if(D_)return _h;D_=1;var e=mo();function t(n){return typeof n=="function"?n:e}return _h=t,_h}var Sh,$_;function lj(){if($_)return Sh;$_=1;var e=m0(),t=tu(),n=aj(),r=Le();function o(i,s){var a=r(i)?e:t;return a(i,n(s))}return Sh=o,Sh}var Eh,z_;function cj(){return z_||(z_=1,Eh=lj()),Eh}var Ch,F_;function nH(){if(F_)return Ch;F_=1;var e=tu();function t(n,r){var o=[];return e(n,function(i,s,a){r(i,s,a)&&o.push(i)}),o}return Ch=t,Ch}var Nh,q_;function rH(){if(q_)return Nh;q_=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return Nh=t,Nh}var kh,B_;function oH(){if(B_)return kh;B_=1;function e(t){return this.__data__.has(t)}return kh=e,kh}var Rh,H_;function uj(){if(H_)return Rh;H_=1;var e=p0(),t=rH(),n=oH();function r(o){var i=-1,s=o==null?0:o.length;for(this.__data__=new e;++i<s;)this.add(o[i])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,Rh=r,Rh}var Ph,V_;function iH(){if(V_)return Ph;V_=1;function e(t,n){for(var r=-1,o=t==null?0:t.length;++r<o;)if(n(t[r],r,t))return!0;return!1}return Ph=e,Ph}var jh,W_;function dj(){if(W_)return jh;W_=1;function e(t,n){return t.has(n)}return jh=e,jh}var Th,U_;function fj(){if(U_)return Th;U_=1;var e=uj(),t=iH(),n=dj(),r=1,o=2;function i(s,a,l,c,u,d){var f=l&r,p=s.length,g=a.length;if(p!=g&&!(f&&g>p))return!1;var m=d.get(s),_=d.get(a);if(m&&_)return m==a&&_==s;var v=-1,w=!0,x=l&o?new e:void 0;for(d.set(s,a),d.set(a,s);++v<p;){var b=s[v],S=a[v];if(c)var E=f?c(S,b,v,a,s,d):c(b,S,v,s,a,d);if(E!==void 0){if(E)continue;w=!1;break}if(x){if(!t(a,function(C,k){if(!n(x,k)&&(b===C||u(b,C,l,c,d)))return x.push(k)})){w=!1;break}}else if(!(b===S||u(b,S,l,c,d))){w=!1;break}}return d.delete(s),d.delete(a),w}return Th=i,Th}var Ah,G_;function sH(){if(G_)return Ah;G_=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(o,i){r[++n]=[i,o]}),r}return Ah=e,Ah}var Mh,Y_;function C0(){if(Y_)return Mh;Y_=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(o){r[++n]=o}),r}return Mh=e,Mh}var Ih,K_;function aH(){if(K_)return Ih;K_=1;var e=Ei(),t=nj(),n=Si(),r=fj(),o=sH(),i=C0(),s=1,a=2,l="[object Boolean]",c="[object Date]",u="[object Error]",d="[object Map]",f="[object Number]",p="[object RegExp]",g="[object Set]",m="[object String]",_="[object Symbol]",v="[object ArrayBuffer]",w="[object DataView]",x=e?e.prototype:void 0,b=x?x.valueOf:void 0;function S(E,C,k,T,M,P,I){switch(k){case w:if(E.byteLength!=C.byteLength||E.byteOffset!=C.byteOffset)return!1;E=E.buffer,C=C.buffer;case v:return!(E.byteLength!=C.byteLength||!P(new t(E),new t(C)));case l:case c:case f:return n(+E,+C);case u:return E.name==C.name&&E.message==C.message;case p:case m:return E==C+"";case d:var D=o;case g:var R=T&s;if(D||(D=i),E.size!=C.size&&!R)return!1;var O=I.get(E);if(O)return O==C;T|=a,I.set(E,C);var j=r(D(E),D(C),T,M,P,I);return I.delete(E),j;case _:if(b)return b.call(E)==b.call(C)}return!1}return Ih=S,Ih}var Oh,X_;function lH(){if(X_)return Oh;X_=1;var e=ej(),t=1,n=Object.prototype,r=n.hasOwnProperty;function o(i,s,a,l,c,u){var d=a&t,f=e(i),p=f.length,g=e(s),m=g.length;if(p!=m&&!d)return!1;for(var _=p;_--;){var v=f[_];if(!(d?v in s:r.call(s,v)))return!1}var w=u.get(i),x=u.get(s);if(w&&x)return w==s&&x==i;var b=!0;u.set(i,s),u.set(s,i);for(var S=d;++_<p;){v=f[_];var E=i[v],C=s[v];if(l)var k=d?l(C,E,v,s,i,u):l(E,C,v,i,s,u);if(!(k===void 0?E===C||c(E,C,a,l,u):k)){b=!1;break}S||(S=v=="constructor")}if(b&&!S){var T=i.constructor,M=s.constructor;T!=M&&"constructor"in i&&"constructor"in s&&!(typeof T=="function"&&T instanceof T&&typeof M=="function"&&M instanceof M)&&(b=!1)}return u.delete(i),u.delete(s),b}return Oh=o,Oh}var Lh,Q_;function cH(){if(Q_)return Lh;Q_=1;var e=Yc(),t=fj(),n=aH(),r=lH(),o=Ni(),i=Le(),s=Ci(),a=ia(),l=1,c="[object Arguments]",u="[object Array]",d="[object Object]",f=Object.prototype,p=f.hasOwnProperty;function g(m,_,v,w,x,b){var S=i(m),E=i(_),C=S?u:o(m),k=E?u:o(_);C=C==c?d:C,k=k==c?d:k;var T=C==d,M=k==d,P=C==k;if(P&&s(m)){if(!s(_))return!1;S=!0,T=!1}if(P&&!T)return b||(b=new e),S||a(m)?t(m,_,v,w,x,b):n(m,_,C,v,w,x,b);if(!(v&l)){var I=T&&p.call(m,"__wrapped__"),D=M&&p.call(_,"__wrapped__");if(I||D){var R=I?m.value():m,O=D?_.value():_;return b||(b=new e),x(R,O,v,w,b)}}return P?(b||(b=new e),r(m,_,v,w,x,b)):!1}return Lh=g,Lh}var Dh,Z_;function hj(){if(Z_)return Dh;Z_=1;var e=cH(),t=yn();function n(r,o,i,s,a){return r===o?!0:r==null||o==null||!t(r)&&!t(o)?r!==r&&o!==o:e(r,o,i,s,n,a)}return Dh=n,Dh}var $h,J_;function uH(){if(J_)return $h;J_=1;var e=Yc(),t=hj(),n=1,r=2;function o(i,s,a,l){var c=a.length,u=c,d=!l;if(i==null)return!u;for(i=Object(i);c--;){var f=a[c];if(d&&f[2]?f[1]!==i[f[0]]:!(f[0]in i))return!1}for(;++c<u;){f=a[c];var p=f[0],g=i[p],m=f[1];if(d&&f[2]){if(g===void 0&&!(p in i))return!1}else{var _=new e;if(l)var v=l(g,m,p,i,s,_);if(!(v===void 0?t(m,g,n|r,l,_):v))return!1}}return!0}return $h=o,$h}var zh,eS;function pj(){if(eS)return zh;eS=1;var e=jt();function t(n){return n===n&&!e(n)}return zh=t,zh}var Fh,tS;function dH(){if(tS)return Fh;tS=1;var e=pj(),t=Ar();function n(r){for(var o=t(r),i=o.length;i--;){var s=o[i],a=r[s];o[i]=[s,a,e(a)]}return o}return Fh=n,Fh}var qh,nS;function mj(){if(nS)return qh;nS=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return qh=e,qh}var Bh,rS;function fH(){if(rS)return Bh;rS=1;var e=uH(),t=dH(),n=mj();function r(o){var i=t(o);return i.length==1&&i[0][2]?n(i[0][0],i[0][1]):function(s){return s===o||e(s,o,i)}}return Bh=r,Bh}var Hh,oS;function ki(){if(oS)return Hh;oS=1;var e=fo(),t=yn(),n="[object Symbol]";function r(o){return typeof o=="symbol"||t(o)&&e(o)==n}return Hh=r,Hh}var Vh,iS;function N0(){if(iS)return Vh;iS=1;var e=Le(),t=ki(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function o(i,s){if(e(i))return!1;var a=typeof i;return a=="number"||a=="symbol"||a=="boolean"||i==null||t(i)?!0:r.test(i)||!n.test(i)||s!=null&&i in Object(s)}return Vh=o,Vh}var Wh,sS;function hH(){if(sS)return Wh;sS=1;var e=p0(),t="Expected a function";function n(r,o){if(typeof r!="function"||o!=null&&typeof o!="function")throw new TypeError(t);var i=function(){var s=arguments,a=o?o.apply(this,s):s[0],l=i.cache;if(l.has(a))return l.get(a);var c=r.apply(this,s);return i.cache=l.set(a,c)||l,c};return i.cache=new(n.Cache||e),i}return n.Cache=e,Wh=n,Wh}var Uh,aS;function pH(){if(aS)return Uh;aS=1;var e=hH(),t=500;function n(r){var o=e(r,function(s){return i.size===t&&i.clear(),s}),i=o.cache;return o}return Uh=n,Uh}var Gh,lS;function mH(){if(lS)return Gh;lS=1;var e=pH(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(o){var i=[];return o.charCodeAt(0)===46&&i.push(""),o.replace(t,function(s,a,l,c){i.push(l?c.replace(n,"$1"):a||s)}),i});return Gh=r,Gh}var Yh,cS;function nu(){if(cS)return Yh;cS=1;function e(t,n){for(var r=-1,o=t==null?0:t.length,i=Array(o);++r<o;)i[r]=n(t[r],r,t);return i}return Yh=e,Yh}var Kh,uS;function gH(){if(uS)return Kh;uS=1;var e=Ei(),t=nu(),n=Le(),r=ki(),o=e?e.prototype:void 0,i=o?o.toString:void 0;function s(a){if(typeof a=="string")return a;if(n(a))return t(a,s)+"";if(r(a))return i?i.call(a):"";var l=a+"";return l=="0"&&1/a==-1/0?"-0":l}return Kh=s,Kh}var Xh,dS;function gj(){if(dS)return Xh;dS=1;var e=gH();function t(n){return n==null?"":e(n)}return Xh=t,Xh}var Qh,fS;function ru(){if(fS)return Qh;fS=1;var e=Le(),t=N0(),n=mH(),r=gj();function o(i,s){return e(i)?i:t(i,s)?[i]:n(r(i))}return Qh=o,Qh}var Zh,hS;function sa(){if(hS)return Zh;hS=1;var e=ki();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return Zh=t,Zh}var Jh,pS;function ou(){if(pS)return Jh;pS=1;var e=ru(),t=sa();function n(r,o){o=e(o,r);for(var i=0,s=o.length;r!=null&&i<s;)r=r[t(o[i++])];return i&&i==s?r:void 0}return Jh=n,Jh}var ep,mS;function vH(){if(mS)return ep;mS=1;var e=ou();function t(n,r,o){var i=n==null?void 0:e(n,r);return i===void 0?o:i}return ep=t,ep}var tp,gS;function yH(){if(gS)return tp;gS=1;function e(t,n){return t!=null&&n in Object(t)}return tp=e,tp}var np,vS;function vj(){if(vS)return np;vS=1;var e=ru(),t=oa(),n=Le(),r=Qc(),o=g0(),i=sa();function s(a,l,c){l=e(l,a);for(var u=-1,d=l.length,f=!1;++u<d;){var p=i(l[u]);if(!(f=a!=null&&c(a,p)))break;a=a[p]}return f||++u!=d?f:(d=a==null?0:a.length,!!d&&o(d)&&r(p,d)&&(n(a)||t(a)))}return np=s,np}var rp,yS;function yj(){if(yS)return rp;yS=1;var e=yH(),t=vj();function n(r,o){return r!=null&&t(r,o,e)}return rp=n,rp}var op,xS;function xH(){if(xS)return op;xS=1;var e=hj(),t=vH(),n=yj(),r=N0(),o=pj(),i=mj(),s=sa(),a=1,l=2;function c(u,d){return r(u)&&o(d)?i(s(u),d):function(f){var p=t(f,u);return p===void 0&&p===d?n(f,u):e(d,p,a|l)}}return op=c,op}var ip,wS;function xj(){if(wS)return ip;wS=1;function e(t){return function(n){return n==null?void 0:n[t]}}return ip=e,ip}var sp,bS;function wH(){if(bS)return sp;bS=1;var e=ou();function t(n){return function(r){return e(r,n)}}return sp=t,sp}var ap,_S;function bH(){if(_S)return ap;_S=1;var e=xj(),t=wH(),n=N0(),r=sa();function o(i){return n(i)?e(r(i)):t(i)}return ap=o,ap}var lp,SS;function Kn(){if(SS)return lp;SS=1;var e=fH(),t=xH(),n=mo(),r=Le(),o=bH();function i(s){return typeof s=="function"?s:s==null?n:typeof s=="object"?r(s)?t(s[0],s[1]):e(s):o(s)}return lp=i,lp}var cp,ES;function wj(){if(ES)return cp;ES=1;var e=XP(),t=nH(),n=Kn(),r=Le();function o(i,s){var a=r(i)?e:t;return a(i,n(s,3))}return cp=o,cp}var up,CS;function _H(){if(CS)return up;CS=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r,o){return r!=null&&t.call(r,o)}return up=n,up}var dp,NS;function bj(){if(NS)return dp;NS=1;var e=_H(),t=vj();function n(r,o){return r!=null&&t(r,o,e)}return dp=n,dp}var fp,kS;function SH(){if(kS)return fp;kS=1;var e=y0(),t=Ni(),n=oa(),r=Le(),o=Yn(),i=Ci(),s=Jc(),a=ia(),l="[object Map]",c="[object Set]",u=Object.prototype,d=u.hasOwnProperty;function f(p){if(p==null)return!0;if(o(p)&&(r(p)||typeof p=="string"||typeof p.splice=="function"||i(p)||a(p)||n(p)))return!p.length;var g=t(p);if(g==l||g==c)return!p.size;if(s(p))return!e(p).length;for(var m in p)if(d.call(p,m))return!1;return!0}return fp=f,fp}var hp,RS;function _j(){if(RS)return hp;RS=1;function e(t){return t===void 0}return hp=e,hp}var pp,PS;function Sj(){if(PS)return pp;PS=1;var e=tu(),t=Yn();function n(r,o){var i=-1,s=t(r)?Array(r.length):[];return e(r,function(a,l,c){s[++i]=o(a,l,c)}),s}return pp=n,pp}var mp,jS;function Ej(){if(jS)return mp;jS=1;var e=nu(),t=Kn(),n=Sj(),r=Le();function o(i,s){var a=r(i)?e:n;return a(i,t(s,3))}return mp=o,mp}var gp,TS;function EH(){if(TS)return gp;TS=1;function e(t,n,r,o){var i=-1,s=t==null?0:t.length;for(o&&s&&(r=t[++i]);++i<s;)r=n(r,t[i],i,t);return r}return gp=e,gp}var vp,AS;function CH(){if(AS)return vp;AS=1;function e(t,n,r,o,i){return i(t,function(s,a,l){r=o?(o=!1,s):n(r,s,a,l)}),r}return vp=e,vp}var yp,MS;function Cj(){if(MS)return yp;MS=1;var e=EH(),t=tu(),n=Kn(),r=CH(),o=Le();function i(s,a,l){var c=o(s)?e:r,u=arguments.length<3;return c(s,n(a,4),l,u,t)}return yp=i,yp}var xp,IS;function NH(){if(IS)return xp;IS=1;var e=fo(),t=Le(),n=yn(),r="[object String]";function o(i){return typeof i=="string"||!t(i)&&n(i)&&e(i)==r}return xp=o,xp}var wp,OS;function kH(){if(OS)return wp;OS=1;var e=xj(),t=e("length");return wp=t,wp}var bp,LS;function RH(){if(LS)return bp;LS=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=t+n+r,i="\\ufe0e\\ufe0f",s="\\u200d",a=RegExp("["+s+e+o+i+"]");function l(c){return a.test(c)}return bp=l,bp}var _p,DS;function PH(){if(DS)return _p;DS=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=t+n+r,i="\\ufe0e\\ufe0f",s="["+e+"]",a="["+o+"]",l="\\ud83c[\\udffb-\\udfff]",c="(?:"+a+"|"+l+")",u="[^"+e+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",f="[\\ud800-\\udbff][\\udc00-\\udfff]",p="\\u200d",g=c+"?",m="["+i+"]?",_="(?:"+p+"(?:"+[u,d,f].join("|")+")"+m+g+")*",v=m+g+_,w="(?:"+[u+a+"?",a,d,f,s].join("|")+")",x=RegExp(l+"(?="+l+")|"+w+v,"g");function b(S){for(var E=x.lastIndex=0;x.test(S);)++E;return E}return _p=b,_p}var Sp,$S;function jH(){if($S)return Sp;$S=1;var e=kH(),t=RH(),n=PH();function r(o){return t(o)?n(o):e(o)}return Sp=r,Sp}var Ep,zS;function TH(){if(zS)return Ep;zS=1;var e=y0(),t=Ni(),n=Yn(),r=NH(),o=jH(),i="[object Map]",s="[object Set]";function a(l){if(l==null)return 0;if(n(l))return r(l)?o(l):l.length;var c=t(l);return c==i||c==s?l.size:e(l).length}return Ep=a,Ep}var Cp,FS;function AH(){if(FS)return Cp;FS=1;var e=m0(),t=oj(),n=E0(),r=Kn(),o=eu(),i=Le(),s=Ci(),a=na(),l=jt(),c=ia();function u(d,f,p){var g=i(d),m=g||s(d)||c(d);if(f=r(f,4),p==null){var _=d&&d.constructor;m?p=g?new _:[]:l(d)?p=a(_)?t(o(d)):{}:p={}}return(m?e:n)(d,function(v,w,x){return f(p,v,w,x)}),p}return Cp=u,Cp}var Np,qS;function MH(){if(qS)return Np;qS=1;var e=Ei(),t=oa(),n=Le(),r=e?e.isConcatSpreadable:void 0;function o(i){return n(i)||t(i)||!!(r&&i&&i[r])}return Np=o,Np}var kp,BS;function k0(){if(BS)return kp;BS=1;var e=w0(),t=MH();function n(r,o,i,s,a){var l=-1,c=r.length;for(i||(i=t),a||(a=[]);++l<c;){var u=r[l];o>0&&i(u)?o>1?n(u,o-1,i,s,a):e(a,u):s||(a[a.length]=u)}return a}return kp=n,kp}var Rp,HS;function IH(){if(HS)return Rp;HS=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return Rp=e,Rp}var Pp,VS;function Nj(){if(VS)return Pp;VS=1;var e=IH(),t=Math.max;function n(r,o,i){return o=t(o===void 0?r.length-1:o,0),function(){for(var s=arguments,a=-1,l=t(s.length-o,0),c=Array(l);++a<l;)c[a]=s[o+a];a=-1;for(var u=Array(o+1);++a<o;)u[a]=s[a];return u[o]=i(c),e(r,this,u)}}return Pp=n,Pp}var jp,WS;function OH(){if(WS)return jp;WS=1;var e=_0(),t=WP(),n=mo(),r=t?function(o,i){return t(o,"toString",{configurable:!0,enumerable:!1,value:e(i),writable:!0})}:n;return jp=r,jp}var Tp,US;function LH(){if(US)return Tp;US=1;var e=800,t=16,n=Date.now;function r(o){var i=0,s=0;return function(){var a=n(),l=t-(a-s);if(s=a,l>0){if(++i>=e)return arguments[0]}else i=0;return o.apply(void 0,arguments)}}return Tp=r,Tp}var Ap,GS;function kj(){if(GS)return Ap;GS=1;var e=OH(),t=LH(),n=t(e);return Ap=n,Ap}var Mp,YS;function iu(){if(YS)return Mp;YS=1;var e=mo(),t=Nj(),n=kj();function r(o,i){return n(t(o,i,e),o+"")}return Mp=r,Mp}var Ip,KS;function Rj(){if(KS)return Ip;KS=1;function e(t,n,r,o){for(var i=t.length,s=r+(o?1:-1);o?s--:++s<i;)if(n(t[s],s,t))return s;return-1}return Ip=e,Ip}var Op,XS;function DH(){if(XS)return Op;XS=1;function e(t){return t!==t}return Op=e,Op}var Lp,QS;function $H(){if(QS)return Lp;QS=1;function e(t,n,r){for(var o=r-1,i=t.length;++o<i;)if(t[o]===n)return o;return-1}return Lp=e,Lp}var Dp,ZS;function zH(){if(ZS)return Dp;ZS=1;var e=Rj(),t=DH(),n=$H();function r(o,i,s){return i===i?n(o,i,s):e(o,t,s)}return Dp=r,Dp}var $p,JS;function FH(){if(JS)return $p;JS=1;var e=zH();function t(n,r){var o=n==null?0:n.length;return!!o&&e(n,r,0)>-1}return $p=t,$p}var zp,eE;function qH(){if(eE)return zp;eE=1;function e(t,n,r){for(var o=-1,i=t==null?0:t.length;++o<i;)if(r(n,t[o]))return!0;return!1}return zp=e,zp}var Fp,tE;function BH(){if(tE)return Fp;tE=1;function e(){}return Fp=e,Fp}var qp,nE;function HH(){if(nE)return qp;nE=1;var e=tj(),t=BH(),n=C0(),r=1/0,o=e&&1/n(new e([,-0]))[1]==r?function(i){return new e(i)}:t;return qp=o,qp}var Bp,rE;function VH(){if(rE)return Bp;rE=1;var e=uj(),t=FH(),n=qH(),r=dj(),o=HH(),i=C0(),s=200;function a(l,c,u){var d=-1,f=t,p=l.length,g=!0,m=[],_=m;if(u)g=!1,f=n;else if(p>=s){var v=c?null:o(l);if(v)return i(v);g=!1,f=r,_=new e}else _=c?[]:m;e:for(;++d<p;){var w=l[d],x=c?c(w):w;if(w=u||w!==0?w:0,g&&x===x){for(var b=_.length;b--;)if(_[b]===x)continue e;c&&_.push(x),m.push(w)}else f(_,x,u)||(_!==m&&_.push(x),m.push(w))}return m}return Bp=a,Bp}var Hp,oE;function Pj(){if(oE)return Hp;oE=1;var e=Yn(),t=yn();function n(r){return t(r)&&e(r)}return Hp=n,Hp}var Vp,iE;function WH(){if(iE)return Vp;iE=1;var e=k0(),t=iu(),n=VH(),r=Pj(),o=t(function(i){return n(e(i,1,r,!0))});return Vp=o,Vp}var Wp,sE;function UH(){if(sE)return Wp;sE=1;var e=nu();function t(n,r){return e(r,function(o){return n[o]})}return Wp=t,Wp}var Up,aE;function jj(){if(aE)return Up;aE=1;var e=UH(),t=Ar();function n(r){return r==null?[]:e(r,t(r))}return Up=n,Up}var Gp,lE;function Tt(){if(lE)return Gp;lE=1;var e;if(typeof f0=="function")try{e={clone:JB(),constant:_0(),each:cj(),filter:wj(),has:bj(),isArray:Le(),isEmpty:SH(),isFunction:na(),isUndefined:_j(),keys:Ar(),map:Ej(),reduce:Cj(),size:TH(),transform:AH(),union:WH(),values:jj()}}catch{}return e||(e=window._),Gp=e,Gp}var Yp,cE;function R0(){if(cE)return Yp;cE=1;var e=Tt();Yp=o;var t="\0",n="\0",r="";function o(u){this._isDirected=e.has(u,"directed")?u.directed:!0,this._isMultigraph=e.has(u,"multigraph")?u.multigraph:!1,this._isCompound=e.has(u,"compound")?u.compound:!1,this._label=void 0,this._defaultNodeLabelFn=e.constant(void 0),this._defaultEdgeLabelFn=e.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[n]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}o.prototype._nodeCount=0,o.prototype._edgeCount=0,o.prototype.isDirected=function(){return this._isDirected},o.prototype.isMultigraph=function(){return this._isMultigraph},o.prototype.isCompound=function(){return this._isCompound},o.prototype.setGraph=function(u){return this._label=u,this},o.prototype.graph=function(){return this._label},o.prototype.setDefaultNodeLabel=function(u){return e.isFunction(u)||(u=e.constant(u)),this._defaultNodeLabelFn=u,this},o.prototype.nodeCount=function(){return this._nodeCount},o.prototype.nodes=function(){return e.keys(this._nodes)},o.prototype.sources=function(){var u=this;return e.filter(this.nodes(),function(d){return e.isEmpty(u._in[d])})},o.prototype.sinks=function(){var u=this;return e.filter(this.nodes(),function(d){return e.isEmpty(u._out[d])})},o.prototype.setNodes=function(u,d){var f=arguments,p=this;return e.each(u,function(g){f.length>1?p.setNode(g,d):p.setNode(g)}),this},o.prototype.setNode=function(u,d){return e.has(this._nodes,u)?(arguments.length>1&&(this._nodes[u]=d),this):(this._nodes[u]=arguments.length>1?d:this._defaultNodeLabelFn(u),this._isCompound&&(this._parent[u]=n,this._children[u]={},this._children[n][u]=!0),this._in[u]={},this._preds[u]={},this._out[u]={},this._sucs[u]={},++this._nodeCount,this)},o.prototype.node=function(u){return this._nodes[u]},o.prototype.hasNode=function(u){return e.has(this._nodes,u)},o.prototype.removeNode=function(u){var d=this;if(e.has(this._nodes,u)){var f=function(p){d.removeEdge(d._edgeObjs[p])};delete this._nodes[u],this._isCompound&&(this._removeFromParentsChildList(u),delete this._parent[u],e.each(this.children(u),function(p){d.setParent(p)}),delete this._children[u]),e.each(e.keys(this._in[u]),f),delete this._in[u],delete this._preds[u],e.each(e.keys(this._out[u]),f),delete this._out[u],delete this._sucs[u],--this._nodeCount}return this},o.prototype.setParent=function(u,d){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(d))d=n;else{d+="";for(var f=d;!e.isUndefined(f);f=this.parent(f))if(f===u)throw new Error("Setting "+d+" as parent of "+u+" would create a cycle");this.setNode(d)}return this.setNode(u),this._removeFromParentsChildList(u),this._parent[u]=d,this._children[d][u]=!0,this},o.prototype._removeFromParentsChildList=function(u){delete this._children[this._parent[u]][u]},o.prototype.parent=function(u){if(this._isCompound){var d=this._parent[u];if(d!==n)return d}},o.prototype.children=function(u){if(e.isUndefined(u)&&(u=n),this._isCompound){var d=this._children[u];if(d)return e.keys(d)}else{if(u===n)return this.nodes();if(this.hasNode(u))return[]}},o.prototype.predecessors=function(u){var d=this._preds[u];if(d)return e.keys(d)},o.prototype.successors=function(u){var d=this._sucs[u];if(d)return e.keys(d)},o.prototype.neighbors=function(u){var d=this.predecessors(u);if(d)return e.union(d,this.successors(u))},o.prototype.isLeaf=function(u){var d;return this.isDirected()?d=this.successors(u):d=this.neighbors(u),d.length===0},o.prototype.filterNodes=function(u){var d=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});d.setGraph(this.graph());var f=this;e.each(this._nodes,function(m,_){u(_)&&d.setNode(_,m)}),e.each(this._edgeObjs,function(m){d.hasNode(m.v)&&d.hasNode(m.w)&&d.setEdge(m,f.edge(m))});var p={};function g(m){var _=f.parent(m);return _===void 0||d.hasNode(_)?(p[m]=_,_):_ in p?p[_]:g(_)}return this._isCompound&&e.each(d.nodes(),function(m){d.setParent(m,g(m))}),d},o.prototype.setDefaultEdgeLabel=function(u){return e.isFunction(u)||(u=e.constant(u)),this._defaultEdgeLabelFn=u,this},o.prototype.edgeCount=function(){return this._edgeCount},o.prototype.edges=function(){return e.values(this._edgeObjs)},o.prototype.setPath=function(u,d){var f=this,p=arguments;return e.reduce(u,function(g,m){return p.length>1?f.setEdge(g,m,d):f.setEdge(g,m),m}),this},o.prototype.setEdge=function(){var u,d,f,p,g=!1,m=arguments[0];typeof m=="object"&&m!==null&&"v"in m?(u=m.v,d=m.w,f=m.name,arguments.length===2&&(p=arguments[1],g=!0)):(u=m,d=arguments[1],f=arguments[3],arguments.length>2&&(p=arguments[2],g=!0)),u=""+u,d=""+d,e.isUndefined(f)||(f=""+f);var _=a(this._isDirected,u,d,f);if(e.has(this._edgeLabels,_))return g&&(this._edgeLabels[_]=p),this;if(!e.isUndefined(f)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(u),this.setNode(d),this._edgeLabels[_]=g?p:this._defaultEdgeLabelFn(u,d,f);var v=l(this._isDirected,u,d,f);return u=v.v,d=v.w,Object.freeze(v),this._edgeObjs[_]=v,i(this._preds[d],u),i(this._sucs[u],d),this._in[d][_]=v,this._out[u][_]=v,this._edgeCount++,this},o.prototype.edge=function(u,d,f){var p=arguments.length===1?c(this._isDirected,arguments[0]):a(this._isDirected,u,d,f);return this._edgeLabels[p]},o.prototype.hasEdge=function(u,d,f){var p=arguments.length===1?c(this._isDirected,arguments[0]):a(this._isDirected,u,d,f);return e.has(this._edgeLabels,p)},o.prototype.removeEdge=function(u,d,f){var p=arguments.length===1?c(this._isDirected,arguments[0]):a(this._isDirected,u,d,f),g=this._edgeObjs[p];return g&&(u=g.v,d=g.w,delete this._edgeLabels[p],delete this._edgeObjs[p],s(this._preds[d],u),s(this._sucs[u],d),delete this._in[d][p],delete this._out[u][p],this._edgeCount--),this},o.prototype.inEdges=function(u,d){var f=this._in[u];if(f){var p=e.values(f);return d?e.filter(p,function(g){return g.v===d}):p}},o.prototype.outEdges=function(u,d){var f=this._out[u];if(f){var p=e.values(f);return d?e.filter(p,function(g){return g.w===d}):p}},o.prototype.nodeEdges=function(u,d){var f=this.inEdges(u,d);if(f)return f.concat(this.outEdges(u,d))};function i(u,d){u[d]?u[d]++:u[d]=1}function s(u,d){--u[d]||delete u[d]}function a(u,d,f,p){var g=""+d,m=""+f;if(!u&&g>m){var _=g;g=m,m=_}return g+r+m+r+(e.isUndefined(p)?t:p)}function l(u,d,f,p){var g=""+d,m=""+f;if(!u&&g>m){var _=g;g=m,m=_}var v={v:g,w:m};return p&&(v.name=p),v}function c(u,d){return a(u,d.v,d.w,d.name)}return Yp}var Kp,uE;function GH(){return uE||(uE=1,Kp="2.1.8"),Kp}var Xp,dE;function YH(){return dE||(dE=1,Xp={Graph:R0(),version:GH()}),Xp}var Qp,fE;function KH(){if(fE)return Qp;fE=1;var e=Tt(),t=R0();Qp={write:n,read:i};function n(s){var a={options:{directed:s.isDirected(),multigraph:s.isMultigraph(),compound:s.isCompound()},nodes:r(s),edges:o(s)};return e.isUndefined(s.graph())||(a.value=e.clone(s.graph())),a}function r(s){return e.map(s.nodes(),function(a){var l=s.node(a),c=s.parent(a),u={v:a};return e.isUndefined(l)||(u.value=l),e.isUndefined(c)||(u.parent=c),u})}function o(s){return e.map(s.edges(),function(a){var l=s.edge(a),c={v:a.v,w:a.w};return e.isUndefined(a.name)||(c.name=a.name),e.isUndefined(l)||(c.value=l),c})}function i(s){var a=new t(s.options).setGraph(s.value);return e.each(s.nodes,function(l){a.setNode(l.v,l.value),l.parent&&a.setParent(l.v,l.parent)}),e.each(s.edges,function(l){a.setEdge({v:l.v,w:l.w,name:l.name},l.value)}),a}return Qp}var Zp,hE;function XH(){if(hE)return Zp;hE=1;var e=Tt();Zp=t;function t(n){var r={},o=[],i;function s(a){e.has(r,a)||(r[a]=!0,i.push(a),e.each(n.successors(a),s),e.each(n.predecessors(a),s))}return e.each(n.nodes(),function(a){i=[],s(a),i.length&&o.push(i)}),o}return Zp}var Jp,pE;function Tj(){if(pE)return Jp;pE=1;var e=Tt();Jp=t;function t(){this._arr=[],this._keyIndices={}}return t.prototype.size=function(){return this._arr.length},t.prototype.keys=function(){return this._arr.map(function(n){return n.key})},t.prototype.has=function(n){return e.has(this._keyIndices,n)},t.prototype.priority=function(n){var r=this._keyIndices[n];if(r!==void 0)return this._arr[r].priority},t.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},t.prototype.add=function(n,r){var o=this._keyIndices;if(n=String(n),!e.has(o,n)){var i=this._arr,s=i.length;return o[n]=s,i.push({key:n,priority:r}),this._decrease(s),!0}return!1},t.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var n=this._arr.pop();return delete this._keyIndices[n.key],this._heapify(0),n.key},t.prototype.decrease=function(n,r){var o=this._keyIndices[n];if(r>this._arr[o].priority)throw new Error("New priority is greater than current priority. Key: "+n+" Old: "+this._arr[o].priority+" New: "+r);this._arr[o].priority=r,this._decrease(o)},t.prototype._heapify=function(n){var r=this._arr,o=2*n,i=o+1,s=n;o<r.length&&(s=r[o].priority<r[s].priority?o:s,i<r.length&&(s=r[i].priority<r[s].priority?i:s),s!==n&&(this._swap(n,s),this._heapify(s)))},t.prototype._decrease=function(n){for(var r=this._arr,o=r[n].priority,i;n!==0&&(i=n>>1,!(r[i].priority<o));)this._swap(n,i),n=i},t.prototype._swap=function(n,r){var o=this._arr,i=this._keyIndices,s=o[n],a=o[r];o[n]=a,o[r]=s,i[a.key]=n,i[s.key]=r},Jp}var em,mE;function Aj(){if(mE)return em;mE=1;var e=Tt(),t=Tj();em=r;var n=e.constant(1);function r(i,s,a,l){return o(i,String(s),a||n,l||function(c){return i.outEdges(c)})}function o(i,s,a,l){var c={},u=new t,d,f,p=function(g){var m=g.v!==d?g.v:g.w,_=c[m],v=a(g),w=f.distance+v;if(v<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+g+" Weight: "+v);w<_.distance&&(_.distance=w,_.predecessor=d,u.decrease(m,w))};for(i.nodes().forEach(function(g){var m=g===s?0:Number.POSITIVE_INFINITY;c[g]={distance:m},u.add(g,m)});u.size()>0&&(d=u.removeMin(),f=c[d],f.distance!==Number.POSITIVE_INFINITY);)l(d).forEach(p);return c}return em}var tm,gE;function QH(){if(gE)return tm;gE=1;var e=Aj(),t=Tt();tm=n;function n(r,o,i){return t.transform(r.nodes(),function(s,a){s[a]=e(r,a,o,i)},{})}return tm}var nm,vE;function Mj(){if(vE)return nm;vE=1;var e=Tt();nm=t;function t(n){var r=0,o=[],i={},s=[];function a(l){var c=i[l]={onStack:!0,lowlink:r,index:r++};if(o.push(l),n.successors(l).forEach(function(f){e.has(i,f)?i[f].onStack&&(c.lowlink=Math.min(c.lowlink,i[f].index)):(a(f),c.lowlink=Math.min(c.lowlink,i[f].lowlink))}),c.lowlink===c.index){var u=[],d;do d=o.pop(),i[d].onStack=!1,u.push(d);while(l!==d);s.push(u)}}return n.nodes().forEach(function(l){e.has(i,l)||a(l)}),s}return nm}var rm,yE;function ZH(){if(yE)return rm;yE=1;var e=Tt(),t=Mj();rm=n;function n(r){return e.filter(t(r),function(o){return o.length>1||o.length===1&&r.hasEdge(o[0],o[0])})}return rm}var om,xE;function JH(){if(xE)return om;xE=1;var e=Tt();om=n;var t=e.constant(1);function n(o,i,s){return r(o,i||t,s||function(a){return o.outEdges(a)})}function r(o,i,s){var a={},l=o.nodes();return l.forEach(function(c){a[c]={},a[c][c]={distance:0},l.forEach(function(u){c!==u&&(a[c][u]={distance:Number.POSITIVE_INFINITY})}),s(c).forEach(function(u){var d=u.v===c?u.w:u.v,f=i(u);a[c][d]={distance:f,predecessor:c}})}),l.forEach(function(c){var u=a[c];l.forEach(function(d){var f=a[d];l.forEach(function(p){var g=f[c],m=u[p],_=f[p],v=g.distance+m.distance;v<_.distance&&(_.distance=v,_.predecessor=m.predecessor)})})}),a}return om}var im,wE;function Ij(){if(wE)return im;wE=1;var e=Tt();im=t,t.CycleException=n;function t(r){var o={},i={},s=[];function a(l){if(e.has(i,l))throw new n;e.has(o,l)||(i[l]=!0,o[l]=!0,e.each(r.predecessors(l),a),delete i[l],s.push(l))}if(e.each(r.sinks(),a),e.size(o)!==r.nodeCount())throw new n;return s}function n(){}return n.prototype=new Error,im}var sm,bE;function eV(){if(bE)return sm;bE=1;var e=Ij();sm=t;function t(n){try{e(n)}catch(r){if(r instanceof e.CycleException)return!1;throw r}return!0}return sm}var am,_E;function Oj(){if(_E)return am;_E=1;var e=Tt();am=t;function t(r,o,i){e.isArray(o)||(o=[o]);var s=(r.isDirected()?r.successors:r.neighbors).bind(r),a=[],l={};return e.each(o,function(c){if(!r.hasNode(c))throw new Error("Graph does not have node: "+c);n(r,c,i==="post",l,s,a)}),a}function n(r,o,i,s,a,l){e.has(s,o)||(s[o]=!0,i||l.push(o),e.each(a(o),function(c){n(r,c,i,s,a,l)}),i&&l.push(o))}return am}var lm,SE;function tV(){if(SE)return lm;SE=1;var e=Oj();lm=t;function t(n,r){return e(n,r,"post")}return lm}var cm,EE;function nV(){if(EE)return cm;EE=1;var e=Oj();cm=t;function t(n,r){return e(n,r,"pre")}return cm}var um,CE;function rV(){if(CE)return um;CE=1;var e=Tt(),t=R0(),n=Tj();um=r;function r(o,i){var s=new t,a={},l=new n,c;function u(f){var p=f.v===c?f.w:f.v,g=l.priority(p);if(g!==void 0){var m=i(f);m<g&&(a[p]=c,l.decrease(p,m))}}if(o.nodeCount()===0)return s;e.each(o.nodes(),function(f){l.add(f,Number.POSITIVE_INFINITY),s.setNode(f)}),l.decrease(o.nodes()[0],0);for(var d=!1;l.size()>0;){if(c=l.removeMin(),e.has(a,c))s.setEdge(c,a[c]);else{if(d)throw new Error("Input graph is not connected: "+o);d=!0}o.nodeEdges(c).forEach(u)}return s}return um}var dm,NE;function oV(){return NE||(NE=1,dm={components:XH(),dijkstra:Aj(),dijkstraAll:QH(),findCycles:ZH(),floydWarshall:JH(),isAcyclic:eV(),postorder:tV(),preorder:nV(),prim:rV(),tarjan:Mj(),topsort:Ij()}),dm}var fm,kE;function iV(){if(kE)return fm;kE=1;var e=YH();return fm={Graph:e.Graph,json:KH(),alg:oV(),version:e.version},fm}var Zl;if(typeof f0=="function")try{Zl=iV()}catch{}Zl||(Zl=window.graphlib);var Xt=Zl,hm,RE;function sV(){if(RE)return hm;RE=1;var e=sj(),t=1,n=4;function r(o){return e(o,t|n)}return hm=r,hm}var pm,PE;function su(){if(PE)return pm;PE=1;var e=Si(),t=Yn(),n=Qc(),r=jt();function o(i,s,a){if(!r(a))return!1;var l=typeof s;return(l=="number"?t(a)&&n(s,a.length):l=="string"&&s in a)?e(a[s],i):!1}return pm=o,pm}var mm,jE;function aV(){if(jE)return mm;jE=1;var e=iu(),t=Si(),n=su(),r=po(),o=Object.prototype,i=o.hasOwnProperty,s=e(function(a,l){a=Object(a);var c=-1,u=l.length,d=u>2?l[2]:void 0;for(d&&n(l[0],l[1],d)&&(u=1);++c<u;)for(var f=l[c],p=r(f),g=-1,m=p.length;++g<m;){var _=p[g],v=a[_];(v===void 0||t(v,o[_])&&!i.call(a,_))&&(a[_]=f[_])}return a});return mm=s,mm}var gm,TE;function lV(){if(TE)return gm;TE=1;var e=Kn(),t=Yn(),n=Ar();function r(o){return function(i,s,a){var l=Object(i);if(!t(i)){var c=e(s,3);i=n(i),s=function(d){return c(l[d],d,l)}}var u=o(i,s,a);return u>-1?l[c?i[u]:u]:void 0}}return gm=r,gm}var vm,AE;function cV(){if(AE)return vm;AE=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return vm=t,vm}var ym,ME;function uV(){if(ME)return ym;ME=1;var e=cV(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return ym=n,ym}var xm,IE;function dV(){if(IE)return xm;IE=1;var e=uV(),t=jt(),n=ki(),r=NaN,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,s=/^0o[0-7]+$/i,a=parseInt;function l(c){if(typeof c=="number")return c;if(n(c))return r;if(t(c)){var u=typeof c.valueOf=="function"?c.valueOf():c;c=t(u)?u+"":u}if(typeof c!="string")return c===0?c:+c;c=e(c);var d=i.test(c);return d||s.test(c)?a(c.slice(2),d?2:8):o.test(c)?r:+c}return xm=l,xm}var wm,OE;function Lj(){if(OE)return wm;OE=1;var e=dV(),t=1/0,n=17976931348623157e292;function r(o){if(!o)return o===0?o:0;if(o=e(o),o===t||o===-t){var i=o<0?-1:1;return i*n}return o===o?o:0}return wm=r,wm}var bm,LE;function fV(){if(LE)return bm;LE=1;var e=Lj();function t(n){var r=e(n),o=r%1;return r===r?o?r-o:r:0}return bm=t,bm}var _m,DE;function hV(){if(DE)return _m;DE=1;var e=Rj(),t=Kn(),n=fV(),r=Math.max;function o(i,s,a){var l=i==null?0:i.length;if(!l)return-1;var c=a==null?0:n(a);return c<0&&(c=r(l+c,0)),e(i,t(s,3),c)}return _m=o,_m}var Sm,$E;function pV(){if($E)return Sm;$E=1;var e=lV(),t=hV(),n=e(t);return Sm=n,Sm}var Em,zE;function Dj(){if(zE)return Em;zE=1;var e=k0();function t(n){var r=n==null?0:n.length;return r?e(n,1):[]}return Em=t,Em}var Cm,FE;function mV(){if(FE)return Cm;FE=1;var e=S0(),t=aj(),n=po();function r(o,i){return o==null?o:e(o,t(i),n)}return Cm=r,Cm}var Nm,qE;function gV(){if(qE)return Nm;qE=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return Nm=e,Nm}var km,BE;function vV(){if(BE)return km;BE=1;var e=Kc(),t=E0(),n=Kn();function r(o,i){var s={};return i=n(i,3),t(o,function(a,l,c){e(s,l,i(a,l,c))}),s}return km=r,km}var Rm,HE;function P0(){if(HE)return Rm;HE=1;var e=ki();function t(n,r,o){for(var i=-1,s=n.length;++i<s;){var a=n[i],l=r(a);if(l!=null&&(c===void 0?l===l&&!e(l):o(l,c)))var c=l,u=a}return u}return Rm=t,Rm}var Pm,VE;function yV(){if(VE)return Pm;VE=1;function e(t,n){return t>n}return Pm=e,Pm}var jm,WE;function xV(){if(WE)return jm;WE=1;var e=P0(),t=yV(),n=mo();function r(o){return o&&o.length?e(o,n,t):void 0}return jm=r,jm}var Tm,UE;function $j(){if(UE)return Tm;UE=1;var e=Kc(),t=Si();function n(r,o,i){(i!==void 0&&!t(r[o],i)||i===void 0&&!(o in r))&&e(r,o,i)}return Tm=n,Tm}var Am,GE;function wV(){if(GE)return Am;GE=1;var e=fo(),t=eu(),n=yn(),r="[object Object]",o=Function.prototype,i=Object.prototype,s=o.toString,a=i.hasOwnProperty,l=s.call(Object);function c(u){if(!n(u)||e(u)!=r)return!1;var d=t(u);if(d===null)return!0;var f=a.call(d,"constructor")&&d.constructor;return typeof f=="function"&&f instanceof f&&s.call(f)==l}return Am=c,Am}var Mm,YE;function zj(){if(YE)return Mm;YE=1;function e(t,n){if(!(n==="constructor"&&typeof t[n]=="function")&&n!="__proto__")return t[n]}return Mm=e,Mm}var Im,KE;function bV(){if(KE)return Im;KE=1;var e=ra(),t=po();function n(r){return e(r,t(r))}return Im=n,Im}var Om,XE;function _V(){if(XE)return Om;XE=1;var e=$j(),t=YP(),n=rj(),r=KP(),o=ij(),i=oa(),s=Le(),a=Pj(),l=Ci(),c=na(),u=jt(),d=wV(),f=ia(),p=zj(),g=bV();function m(_,v,w,x,b,S,E){var C=p(_,w),k=p(v,w),T=E.get(k);if(T){e(_,w,T);return}var M=S?S(C,k,w+"",_,v,E):void 0,P=M===void 0;if(P){var I=s(k),D=!I&&l(k),R=!I&&!D&&f(k);M=k,I||D||R?s(C)?M=C:a(C)?M=r(C):D?(P=!1,M=t(k,!0)):R?(P=!1,M=n(k,!0)):M=[]:d(k)||i(k)?(M=C,i(C)?M=g(C):(!u(C)||c(C))&&(M=o(k))):P=!1}P&&(E.set(k,M),b(M,k,x,S,E),E.delete(k)),e(_,w,M)}return Om=m,Om}var Lm,QE;function SV(){if(QE)return Lm;QE=1;var e=Yc(),t=$j(),n=S0(),r=_V(),o=jt(),i=po(),s=zj();function a(l,c,u,d,f){l!==c&&n(c,function(p,g){if(f||(f=new e),o(p))r(l,c,g,u,a,d,f);else{var m=d?d(s(l,g),p,g+"",l,c,f):void 0;m===void 0&&(m=p),t(l,g,m)}},i)}return Lm=a,Lm}var Dm,ZE;function EV(){if(ZE)return Dm;ZE=1;var e=iu(),t=su();function n(r){return e(function(o,i){var s=-1,a=i.length,l=a>1?i[a-1]:void 0,c=a>2?i[2]:void 0;for(l=r.length>3&&typeof l=="function"?(a--,l):void 0,c&&t(i[0],i[1],c)&&(l=a<3?void 0:l,a=1),o=Object(o);++s<a;){var u=i[s];u&&r(o,u,s,l)}return o})}return Dm=n,Dm}var $m,JE;function CV(){if(JE)return $m;JE=1;var e=SV(),t=EV(),n=t(function(r,o,i){e(r,o,i)});return $m=n,$m}var zm,eC;function Fj(){if(eC)return zm;eC=1;function e(t,n){return t<n}return zm=e,zm}var Fm,tC;function NV(){if(tC)return Fm;tC=1;var e=P0(),t=Fj(),n=mo();function r(o){return o&&o.length?e(o,n,t):void 0}return Fm=r,Fm}var qm,nC;function kV(){if(nC)return qm;nC=1;var e=P0(),t=Kn(),n=Fj();function r(o,i){return o&&o.length?e(o,t(i,2),n):void 0}return qm=r,qm}var Bm,rC;function RV(){if(rC)return Bm;rC=1;var e=Kt(),t=function(){return e.Date.now()};return Bm=t,Bm}var Hm,oC;function PV(){if(oC)return Hm;oC=1;var e=Xc(),t=ru(),n=Qc(),r=jt(),o=sa();function i(s,a,l,c){if(!r(s))return s;a=t(a,s);for(var u=-1,d=a.length,f=d-1,p=s;p!=null&&++u<d;){var g=o(a[u]),m=l;if(g==="__proto__"||g==="constructor"||g==="prototype")return s;if(u!=f){var _=p[g];m=c?c(_,g,p):void 0,m===void 0&&(m=r(_)?_:n(a[u+1])?[]:{})}e(p,g,m),p=p[g]}return s}return Hm=i,Hm}var Vm,iC;function jV(){if(iC)return Vm;iC=1;var e=ou(),t=PV(),n=ru();function r(o,i,s){for(var a=-1,l=i.length,c={};++a<l;){var u=i[a],d=e(o,u);s(d,u)&&t(c,n(u,o),d)}return c}return Vm=r,Vm}var Wm,sC;function TV(){if(sC)return Wm;sC=1;var e=jV(),t=yj();function n(r,o){return e(r,o,function(i,s){return t(r,s)})}return Wm=n,Wm}var Um,aC;function AV(){if(aC)return Um;aC=1;var e=Dj(),t=Nj(),n=kj();function r(o){return n(t(o,void 0,e),o+"")}return Um=r,Um}var Gm,lC;function MV(){if(lC)return Gm;lC=1;var e=TV(),t=AV(),n=t(function(r,o){return r==null?{}:e(r,o)});return Gm=n,Gm}var Ym,cC;function IV(){if(cC)return Ym;cC=1;var e=Math.ceil,t=Math.max;function n(r,o,i,s){for(var a=-1,l=t(e((o-r)/(i||1)),0),c=Array(l);l--;)c[s?l:++a]=r,r+=i;return c}return Ym=n,Ym}var Km,uC;function OV(){if(uC)return Km;uC=1;var e=IV(),t=su(),n=Lj();function r(o){return function(i,s,a){return a&&typeof a!="number"&&t(i,s,a)&&(s=a=void 0),i=n(i),s===void 0?(s=i,i=0):s=n(s),a=a===void 0?i<s?1:-1:n(a),e(i,s,a,o)}}return Km=r,Km}var Xm,dC;function LV(){if(dC)return Xm;dC=1;var e=OV(),t=e();return Xm=t,Xm}var Qm,fC;function DV(){if(fC)return Qm;fC=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return Qm=e,Qm}var Zm,hC;function $V(){if(hC)return Zm;hC=1;var e=ki();function t(n,r){if(n!==r){var o=n!==void 0,i=n===null,s=n===n,a=e(n),l=r!==void 0,c=r===null,u=r===r,d=e(r);if(!c&&!d&&!a&&n>r||a&&l&&u&&!c&&!d||i&&l&&u||!o&&u||!s)return 1;if(!i&&!a&&!d&&n<r||d&&o&&s&&!i&&!a||c&&o&&s||!l&&s||!u)return-1}return 0}return Zm=t,Zm}var Jm,pC;function zV(){if(pC)return Jm;pC=1;var e=$V();function t(n,r,o){for(var i=-1,s=n.criteria,a=r.criteria,l=s.length,c=o.length;++i<l;){var u=e(s[i],a[i]);if(u){if(i>=c)return u;var d=o[i];return u*(d=="desc"?-1:1)}}return n.index-r.index}return Jm=t,Jm}var eg,mC;function FV(){if(mC)return eg;mC=1;var e=nu(),t=ou(),n=Kn(),r=Sj(),o=DV(),i=Zc(),s=zV(),a=mo(),l=Le();function c(u,d,f){d.length?d=e(d,function(m){return l(m)?function(_){return t(_,m.length===1?m[0]:m)}:m}):d=[a];var p=-1;d=e(d,i(n));var g=r(u,function(m,_,v){var w=e(d,function(x){return x(m)});return{criteria:w,index:++p,value:m}});return o(g,function(m,_){return s(m,_,f)})}return eg=c,eg}var tg,gC;function qV(){if(gC)return tg;gC=1;var e=k0(),t=FV(),n=iu(),r=su(),o=n(function(i,s){if(i==null)return[];var a=s.length;return a>1&&r(i,s[0],s[1])?s=[]:a>2&&r(s[0],s[1],s[2])&&(s=[s[0]]),t(i,e(s,1),[])});return tg=o,tg}var ng,vC;function BV(){if(vC)return ng;vC=1;var e=gj(),t=0;function n(r){var o=++t;return e(r)+o}return ng=n,ng}var rg,yC;function HV(){if(yC)return rg;yC=1;function e(t,n,r){for(var o=-1,i=t.length,s=n.length,a={};++o<i;){var l=o<s?n[o]:void 0;r(a,t[o],l)}return a}return rg=e,rg}var og,xC;function VV(){if(xC)return og;xC=1;var e=Xc(),t=HV();function n(r,o){return t(r||[],o||[],e)}return og=n,og}var Jl;if(typeof f0=="function")try{Jl={cloneDeep:sV(),constant:_0(),defaults:aV(),each:cj(),filter:wj(),find:pV(),flatten:Dj(),forEach:lj(),forIn:mV(),has:bj(),isUndefined:_j(),last:gV(),map:Ej(),mapValues:vV(),max:xV(),merge:CV(),min:NV(),minBy:kV(),now:RV(),pick:MV(),range:LV(),reduce:Cj(),sortBy:qV(),uniqueId:BV(),values:jj(),zipObject:VV()}}catch{}Jl||(Jl=window._);var Ne=Jl,WV=au;function au(){var e={};e._next=e._prev=e,this._sentinel=e}au.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return qj(t),t};au.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&qj(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t};au.prototype.toString=function(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,UV)),n=n._prev;return"["+e.join(", ")+"]"};function qj(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function UV(e,t){if(e!=="_next"&&e!=="_prev")return t}var Mn=Ne,GV=Xt.Graph,YV=WV,KV=QV,XV=Mn.constant(1);function QV(e,t){if(e.nodeCount()<=1)return[];var n=JV(e,t||XV),r=ZV(n.graph,n.buckets,n.zeroIdx);return Mn.flatten(Mn.map(r,function(o){return e.outEdges(o.v,o.w)}),!0)}function ZV(e,t,n){for(var r=[],o=t[t.length-1],i=t[0],s;e.nodeCount();){for(;s=i.dequeue();)ig(e,t,n,s);for(;s=o.dequeue();)ig(e,t,n,s);if(e.nodeCount()){for(var a=t.length-2;a>0;--a)if(s=t[a].dequeue(),s){r=r.concat(ig(e,t,n,s,!0));break}}}return r}function ig(e,t,n,r,o){var i=o?[]:void 0;return Mn.forEach(e.inEdges(r.v),function(s){var a=e.edge(s),l=e.node(s.v);o&&i.push({v:s.v,w:s.w}),l.out-=a,Av(t,n,l)}),Mn.forEach(e.outEdges(r.v),function(s){var a=e.edge(s),l=s.w,c=e.node(l);c.in-=a,Av(t,n,c)}),e.removeNode(r.v),i}function JV(e,t){var n=new GV,r=0,o=0;Mn.forEach(e.nodes(),function(a){n.setNode(a,{v:a,in:0,out:0})}),Mn.forEach(e.edges(),function(a){var l=n.edge(a.v,a.w)||0,c=t(a),u=l+c;n.setEdge(a.v,a.w,u),o=Math.max(o,n.node(a.v).out+=c),r=Math.max(r,n.node(a.w).in+=c)});var i=Mn.range(o+r+3).map(function(){return new YV}),s=r+1;return Mn.forEach(n.nodes(),function(a){Av(i,s,n.node(a))}),{graph:n,buckets:i,zeroIdx:s}}function Av(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}var Vr=Ne,e7=KV,t7={run:n7,undo:o7};function n7(e){var t=e.graph().acyclicer==="greedy"?e7(e,n(e)):r7(e);Vr.forEach(t,function(r){var o=e.edge(r);e.removeEdge(r),o.forwardName=r.name,o.reversed=!0,e.setEdge(r.w,r.v,o,Vr.uniqueId("rev"))});function n(r){return function(o){return r.edge(o).weight}}}function r7(e){var t=[],n={},r={};function o(i){Vr.has(r,i)||(r[i]=!0,n[i]=!0,Vr.forEach(e.outEdges(i),function(s){Vr.has(n,s.w)?t.push(s):o(s.w)}),delete n[i])}return Vr.forEach(e.nodes(),o),t}function o7(e){Vr.forEach(e.edges(),function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}var ve=Ne,Bj=Xt.Graph,ft={addDummyNode:Hj,simplify:i7,asNonCompoundGraph:s7,successorWeights:a7,predecessorWeights:l7,intersectRect:c7,buildLayerMatrix:u7,normalizeRanks:d7,removeEmptyRanks:f7,addBorderNode:h7,maxRank:Vj,partition:p7,time:m7,notime:g7};function Hj(e,t,n,r){var o;do o=ve.uniqueId(r);while(e.hasNode(o));return n.dummy=t,e.setNode(o,n),o}function i7(e){var t=new Bj().setGraph(e.graph());return ve.forEach(e.nodes(),function(n){t.setNode(n,e.node(n))}),ve.forEach(e.edges(),function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},o=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+o.weight,minlen:Math.max(r.minlen,o.minlen)})}),t}function s7(e){var t=new Bj({multigraph:e.isMultigraph()}).setGraph(e.graph());return ve.forEach(e.nodes(),function(n){e.children(n).length||t.setNode(n,e.node(n))}),ve.forEach(e.edges(),function(n){t.setEdge(n,e.edge(n))}),t}function a7(e){var t=ve.map(e.nodes(),function(n){var r={};return ve.forEach(e.outEdges(n),function(o){r[o.w]=(r[o.w]||0)+e.edge(o).weight}),r});return ve.zipObject(e.nodes(),t)}function l7(e){var t=ve.map(e.nodes(),function(n){var r={};return ve.forEach(e.inEdges(n),function(o){r[o.v]=(r[o.v]||0)+e.edge(o).weight}),r});return ve.zipObject(e.nodes(),t)}function c7(e,t){var n=e.x,r=e.y,o=t.x-n,i=t.y-r,s=e.width/2,a=e.height/2;if(!o&&!i)throw new Error("Not possible to find intersection inside of the rectangle");var l,c;return Math.abs(i)*s>Math.abs(o)*a?(i<0&&(a=-a),l=a*o/i,c=a):(o<0&&(s=-s),l=s,c=s*i/o),{x:n+l,y:r+c}}function u7(e){var t=ve.map(ve.range(Vj(e)+1),function(){return[]});return ve.forEach(e.nodes(),function(n){var r=e.node(n),o=r.rank;ve.isUndefined(o)||(t[o][r.order]=n)}),t}function d7(e){var t=ve.min(ve.map(e.nodes(),function(n){return e.node(n).rank}));ve.forEach(e.nodes(),function(n){var r=e.node(n);ve.has(r,"rank")&&(r.rank-=t)})}function f7(e){var t=ve.min(ve.map(e.nodes(),function(i){return e.node(i).rank})),n=[];ve.forEach(e.nodes(),function(i){var s=e.node(i).rank-t;n[s]||(n[s]=[]),n[s].push(i)});var r=0,o=e.graph().nodeRankFactor;ve.forEach(n,function(i,s){ve.isUndefined(i)&&s%o!==0?--r:r&&ve.forEach(i,function(a){e.node(a).rank+=r})})}function h7(e,t,n,r){var o={width:0,height:0};return arguments.length>=4&&(o.rank=n,o.order=r),Hj(e,"border",o,t)}function Vj(e){return ve.max(ve.map(e.nodes(),function(t){var n=e.node(t).rank;if(!ve.isUndefined(n))return n}))}function p7(e,t){var n={lhs:[],rhs:[]};return ve.forEach(e,function(r){t(r)?n.lhs.push(r):n.rhs.push(r)}),n}function m7(e,t){var n=ve.now();try{return t()}finally{console.log(e+" time: "+(ve.now()-n)+"ms")}}function g7(e,t){return t()}var Wj=Ne,v7=ft,y7={run:x7,undo:b7};function x7(e){e.graph().dummyChains=[],Wj.forEach(e.edges(),function(t){w7(e,t)})}function w7(e,t){var n=t.v,r=e.node(n).rank,o=t.w,i=e.node(o).rank,s=t.name,a=e.edge(t),l=a.labelRank;if(i!==r+1){e.removeEdge(t);var c,u,d;for(d=0,++r;r<i;++d,++r)a.points=[],u={width:0,height:0,edgeLabel:a,edgeObj:t,rank:r},c=v7.addDummyNode(e,"edge",u,"_d"),r===l&&(u.width=a.width,u.height=a.height,u.dummy="edge-label",u.labelpos=a.labelpos),e.setEdge(n,c,{weight:a.weight},s),d===0&&e.graph().dummyChains.push(c),n=c;e.setEdge(n,o,{weight:a.weight},s)}}function b7(e){Wj.forEach(e.graph().dummyChains,function(t){var n=e.node(t),r=n.edgeLabel,o;for(e.setEdge(n.edgeObj,r);n.dummy;)o=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy==="edge-label"&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=o,n=e.node(t)})}var qa=Ne,lu={longestPath:_7,slack:S7};function _7(e){var t={};function n(r){var o=e.node(r);if(qa.has(t,r))return o.rank;t[r]=!0;var i=qa.min(qa.map(e.outEdges(r),function(s){return n(s.w)-e.edge(s).minlen}));return(i===Number.POSITIVE_INFINITY||i===void 0||i===null)&&(i=0),o.rank=i}qa.forEach(e.sources(),n)}function S7(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var ec=Ne,E7=Xt.Graph,tc=lu.slack,Uj=C7;function C7(e){var t=new E7({directed:!1}),n=e.nodes()[0],r=e.nodeCount();t.setNode(n,{});for(var o,i;N7(t,e)<r;)o=k7(t,e),i=t.hasNode(o.v)?tc(e,o):-tc(e,o),R7(t,e,i);return t}function N7(e,t){function n(r){ec.forEach(t.nodeEdges(r),function(o){var i=o.v,s=r===i?o.w:i;!e.hasNode(s)&&!tc(t,o)&&(e.setNode(s,{}),e.setEdge(r,s,{}),n(s))})}return ec.forEach(e.nodes(),n),e.nodeCount()}function k7(e,t){return ec.minBy(t.edges(),function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return tc(t,n)})}function R7(e,t,n){ec.forEach(e.nodes(),function(r){t.node(r).rank+=n})}var Hn=Ne,P7=Uj,j7=lu.slack,T7=lu.longestPath,A7=Xt.alg.preorder,M7=Xt.alg.postorder,I7=ft.simplify,O7=go;go.initLowLimValues=T0;go.initCutValues=j0;go.calcCutValue=Gj;go.leaveEdge=Kj;go.enterEdge=Xj;go.exchangeEdges=Qj;function go(e){e=I7(e),T7(e);var t=P7(e);T0(t),j0(t,e);for(var n,r;n=Kj(t);)r=Xj(t,e,n),Qj(t,e,n,r)}function j0(e,t){var n=M7(e,e.nodes());n=n.slice(0,n.length-1),Hn.forEach(n,function(r){L7(e,t,r)})}function L7(e,t,n){var r=e.node(n),o=r.parent;e.edge(n,o).cutvalue=Gj(e,t,n)}function Gj(e,t,n){var r=e.node(n),o=r.parent,i=!0,s=t.edge(n,o),a=0;return s||(i=!1,s=t.edge(o,n)),a=s.weight,Hn.forEach(t.nodeEdges(n),function(l){var c=l.v===n,u=c?l.w:l.v;if(u!==o){var d=c===i,f=t.edge(l).weight;if(a+=d?f:-f,$7(e,n,u)){var p=e.edge(n,u).cutvalue;a+=d?-p:p}}}),a}function T0(e,t){arguments.length<2&&(t=e.nodes()[0]),Yj(e,{},1,t)}function Yj(e,t,n,r,o){var i=n,s=e.node(r);return t[r]=!0,Hn.forEach(e.neighbors(r),function(a){Hn.has(t,a)||(n=Yj(e,t,n,a,r))}),s.low=i,s.lim=n++,o?s.parent=o:delete s.parent,n}function Kj(e){return Hn.find(e.edges(),function(t){return e.edge(t).cutvalue<0})}function Xj(e,t,n){var r=n.v,o=n.w;t.hasEdge(r,o)||(r=n.w,o=n.v);var i=e.node(r),s=e.node(o),a=i,l=!1;i.lim>s.lim&&(a=s,l=!0);var c=Hn.filter(t.edges(),function(u){return l===wC(e,e.node(u.v),a)&&l!==wC(e,e.node(u.w),a)});return Hn.minBy(c,function(u){return j7(t,u)})}function Qj(e,t,n,r){var o=n.v,i=n.w;e.removeEdge(o,i),e.setEdge(r.v,r.w,{}),T0(e),j0(e,t),D7(e,t)}function D7(e,t){var n=Hn.find(e.nodes(),function(o){return!t.node(o).parent}),r=A7(e,n);r=r.slice(1),Hn.forEach(r,function(o){var i=e.node(o).parent,s=t.edge(o,i),a=!1;s||(s=t.edge(i,o),a=!0),t.node(o).rank=t.node(i).rank+(a?s.minlen:-s.minlen)})}function $7(e,t,n){return e.hasEdge(t,n)}function wC(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}var z7=lu,Zj=z7.longestPath,F7=Uj,q7=O7,B7=H7;function H7(e){switch(e.graph().ranker){case"network-simplex":bC(e);break;case"tight-tree":W7(e);break;case"longest-path":V7(e);break;default:bC(e)}}var V7=Zj;function W7(e){Zj(e),F7(e)}function bC(e){q7(e)}var Mv=Ne,U7=G7;function G7(e){var t=K7(e);Mv.forEach(e.graph().dummyChains,function(n){for(var r=e.node(n),o=r.edgeObj,i=Y7(e,t,o.v,o.w),s=i.path,a=i.lca,l=0,c=s[l],u=!0;n!==o.w;){if(r=e.node(n),u){for(;(c=s[l])!==a&&e.node(c).maxRank<r.rank;)l++;c===a&&(u=!1)}if(!u){for(;l<s.length-1&&e.node(c=s[l+1]).minRank<=r.rank;)l++;c=s[l]}e.setParent(n,c),n=e.successors(n)[0]}})}function Y7(e,t,n,r){var o=[],i=[],s=Math.min(t[n].low,t[r].low),a=Math.max(t[n].lim,t[r].lim),l,c;l=n;do l=e.parent(l),o.push(l);while(l&&(t[l].low>s||a>t[l].lim));for(c=l,l=r;(l=e.parent(l))!==c;)i.push(l);return{path:o.concat(i.reverse()),lca:c}}function K7(e){var t={},n=0;function r(o){var i=n;Mv.forEach(e.children(o),r),t[o]={low:i,lim:n++}}return Mv.forEach(e.children(),r),t}var In=Ne,Iv=ft,X7={run:Q7,cleanup:e9};function Q7(e){var t=Iv.addDummyNode(e,"root",{},"_root"),n=Z7(e),r=In.max(In.values(n))-1,o=2*r+1;e.graph().nestingRoot=t,In.forEach(e.edges(),function(s){e.edge(s).minlen*=o});var i=J7(e)+1;In.forEach(e.children(),function(s){Jj(e,t,o,i,r,n,s)}),e.graph().nodeRankFactor=o}function Jj(e,t,n,r,o,i,s){var a=e.children(s);if(!a.length){s!==t&&e.setEdge(t,s,{weight:0,minlen:n});return}var l=Iv.addBorderNode(e,"_bt"),c=Iv.addBorderNode(e,"_bb"),u=e.node(s);e.setParent(l,s),u.borderTop=l,e.setParent(c,s),u.borderBottom=c,In.forEach(a,function(d){Jj(e,t,n,r,o,i,d);var f=e.node(d),p=f.borderTop?f.borderTop:d,g=f.borderBottom?f.borderBottom:d,m=f.borderTop?r:2*r,_=p!==g?1:o-i[s]+1;e.setEdge(l,p,{weight:m,minlen:_,nestingEdge:!0}),e.setEdge(g,c,{weight:m,minlen:_,nestingEdge:!0})}),e.parent(s)||e.setEdge(t,l,{weight:0,minlen:o+i[s]})}function Z7(e){var t={};function n(r,o){var i=e.children(r);i&&i.length&&In.forEach(i,function(s){n(s,o+1)}),t[r]=o}return In.forEach(e.children(),function(r){n(r,1)}),t}function J7(e){return In.reduce(e.edges(),function(t,n){return t+e.edge(n).weight},0)}function e9(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,In.forEach(e.edges(),function(n){var r=e.edge(n);r.nestingEdge&&e.removeEdge(n)})}var sg=Ne,t9=ft,n9=r9;function r9(e){function t(n){var r=e.children(n),o=e.node(n);if(r.length&&sg.forEach(r,t),sg.has(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var i=o.minRank,s=o.maxRank+1;i<s;++i)_C(e,"borderLeft","_bl",n,o,i),_C(e,"borderRight","_br",n,o,i)}}sg.forEach(e.children(),t)}function _C(e,t,n,r,o,i){var s={width:0,height:0,rank:i,borderType:t},a=o[t][i-1],l=t9.addDummyNode(e,"border",s,n);o[t][i]=l,e.setParent(l,r),a&&e.setEdge(a,l,{weight:1})}var ln=Ne,o9={adjust:i9,undo:s9};function i9(e){var t=e.graph().rankdir.toLowerCase();(t==="lr"||t==="rl")&&eT(e)}function s9(e){var t=e.graph().rankdir.toLowerCase();(t==="bt"||t==="rl")&&a9(e),(t==="lr"||t==="rl")&&(l9(e),eT(e))}function eT(e){ln.forEach(e.nodes(),function(t){SC(e.node(t))}),ln.forEach(e.edges(),function(t){SC(e.edge(t))})}function SC(e){var t=e.width;e.width=e.height,e.height=t}function a9(e){ln.forEach(e.nodes(),function(t){ag(e.node(t))}),ln.forEach(e.edges(),function(t){var n=e.edge(t);ln.forEach(n.points,ag),ln.has(n,"y")&&ag(n)})}function ag(e){e.y=-e.y}function l9(e){ln.forEach(e.nodes(),function(t){lg(e.node(t))}),ln.forEach(e.edges(),function(t){var n=e.edge(t);ln.forEach(n.points,lg),ln.has(n,"x")&&lg(n)})}function lg(e){var t=e.x;e.x=e.y,e.y=t}var kn=Ne,c9=u9;function u9(e){var t={},n=kn.filter(e.nodes(),function(a){return!e.children(a).length}),r=kn.max(kn.map(n,function(a){return e.node(a).rank})),o=kn.map(kn.range(r+1),function(){return[]});function i(a){if(!kn.has(t,a)){t[a]=!0;var l=e.node(a);o[l.rank].push(a),kn.forEach(e.successors(a),i)}}var s=kn.sortBy(n,function(a){return e.node(a).rank});return kn.forEach(s,i),o}var rr=Ne,d9=f9;function f9(e,t){for(var n=0,r=1;r<t.length;++r)n+=h9(e,t[r-1],t[r]);return n}function h9(e,t,n){for(var r=rr.zipObject(n,rr.map(n,function(c,u){return u})),o=rr.flatten(rr.map(t,function(c){return rr.sortBy(rr.map(e.outEdges(c),function(u){return{pos:r[u.w],weight:e.edge(u).weight}}),"pos")}),!0),i=1;i<n.length;)i<<=1;var s=2*i-1;i-=1;var a=rr.map(new Array(s),function(){return 0}),l=0;return rr.forEach(o.forEach(function(c){var u=c.pos+i;a[u]+=c.weight;for(var d=0;u>0;)u%2&&(d+=a[u+1]),u=u-1>>1,a[u]+=c.weight;l+=c.weight*d})),l}var EC=Ne,p9=m9;function m9(e,t){return EC.map(t,function(n){var r=e.inEdges(n);if(r.length){var o=EC.reduce(r,function(i,s){var a=e.edge(s),l=e.node(s.v);return{sum:i.sum+a.weight*l.order,weight:i.weight+a.weight}},{sum:0,weight:0});return{v:n,barycenter:o.sum/o.weight,weight:o.weight}}else return{v:n}})}var pt=Ne,g9=v9;function v9(e,t){var n={};pt.forEach(e,function(o,i){var s=n[o.v]={indegree:0,in:[],out:[],vs:[o.v],i};pt.isUndefined(o.barycenter)||(s.barycenter=o.barycenter,s.weight=o.weight)}),pt.forEach(t.edges(),function(o){var i=n[o.v],s=n[o.w];!pt.isUndefined(i)&&!pt.isUndefined(s)&&(s.indegree++,i.out.push(n[o.w]))});var r=pt.filter(n,function(o){return!o.indegree});return y9(r)}function y9(e){var t=[];function n(i){return function(s){s.merged||(pt.isUndefined(s.barycenter)||pt.isUndefined(i.barycenter)||s.barycenter>=i.barycenter)&&x9(i,s)}}function r(i){return function(s){s.in.push(i),--s.indegree===0&&e.push(s)}}for(;e.length;){var o=e.pop();t.push(o),pt.forEach(o.in.reverse(),n(o)),pt.forEach(o.out,r(o))}return pt.map(pt.filter(t,function(i){return!i.merged}),function(i){return pt.pick(i,["vs","i","barycenter","weight"])})}function x9(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}var Ji=Ne,w9=ft,b9=_9;function _9(e,t){var n=w9.partition(e,function(u){return Ji.has(u,"barycenter")}),r=n.lhs,o=Ji.sortBy(n.rhs,function(u){return-u.i}),i=[],s=0,a=0,l=0;r.sort(S9(!!t)),l=CC(i,o,l),Ji.forEach(r,function(u){l+=u.vs.length,i.push(u.vs),s+=u.barycenter*u.weight,a+=u.weight,l=CC(i,o,l)});var c={vs:Ji.flatten(i,!0)};return a&&(c.barycenter=s/a,c.weight=a),c}function CC(e,t,n){for(var r;t.length&&(r=Ji.last(t)).i<=n;)t.pop(),e.push(r.vs),n++;return n}function S9(e){return function(t,n){return t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}}var ur=Ne,E9=p9,C9=g9,N9=b9,k9=tT;function tT(e,t,n,r){var o=e.children(t),i=e.node(t),s=i?i.borderLeft:void 0,a=i?i.borderRight:void 0,l={};s&&(o=ur.filter(o,function(g){return g!==s&&g!==a}));var c=E9(e,o);ur.forEach(c,function(g){if(e.children(g.v).length){var m=tT(e,g.v,n,r);l[g.v]=m,ur.has(m,"barycenter")&&P9(g,m)}});var u=C9(c,n);R9(u,l);var d=N9(u,r);if(s&&(d.vs=ur.flatten([s,d.vs,a],!0),e.predecessors(s).length)){var f=e.node(e.predecessors(s)[0]),p=e.node(e.predecessors(a)[0]);ur.has(d,"barycenter")||(d.barycenter=0,d.weight=0),d.barycenter=(d.barycenter*d.weight+f.order+p.order)/(d.weight+2),d.weight+=2}return d}function R9(e,t){ur.forEach(e,function(n){n.vs=ur.flatten(n.vs.map(function(r){return t[r]?t[r].vs:r}),!0)})}function P9(e,t){ur.isUndefined(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}var es=Ne,j9=Xt.Graph,T9=A9;function A9(e,t,n){var r=M9(e),o=new j9({compound:!0}).setGraph({root:r}).setDefaultNodeLabel(function(i){return e.node(i)});return es.forEach(e.nodes(),function(i){var s=e.node(i),a=e.parent(i);(s.rank===t||s.minRank<=t&&t<=s.maxRank)&&(o.setNode(i),o.setParent(i,a||r),es.forEach(e[n](i),function(l){var c=l.v===i?l.w:l.v,u=o.edge(c,i),d=es.isUndefined(u)?0:u.weight;o.setEdge(c,i,{weight:e.edge(l).weight+d})}),es.has(s,"minRank")&&o.setNode(i,{borderLeft:s.borderLeft[t],borderRight:s.borderRight[t]}))}),o}function M9(e){for(var t;e.hasNode(t=es.uniqueId("_root")););return t}var I9=Ne,O9=L9;function L9(e,t,n){var r={},o;I9.forEach(n,function(i){for(var s=e.parent(i),a,l;s;){if(a=e.parent(s),a?(l=r[a],r[a]=s):(l=o,o=s),l&&l!==s){t.setEdge(l,s);return}s=a}})}var br=Ne,D9=c9,$9=d9,z9=k9,F9=T9,q9=O9,B9=Xt.Graph,NC=ft,H9=V9;function V9(e){var t=NC.maxRank(e),n=kC(e,br.range(1,t+1),"inEdges"),r=kC(e,br.range(t-1,-1,-1),"outEdges"),o=D9(e);RC(e,o);for(var i=Number.POSITIVE_INFINITY,s,a=0,l=0;l<4;++a,++l){W9(a%2?n:r,a%4>=2),o=NC.buildLayerMatrix(e);var c=$9(e,o);c<i&&(l=0,s=br.cloneDeep(o),i=c)}RC(e,s)}function kC(e,t,n){return br.map(t,function(r){return F9(e,r,n)})}function W9(e,t){var n=new B9;br.forEach(e,function(r){var o=r.graph().root,i=z9(r,o,n,t);br.forEach(i.vs,function(s,a){r.node(s).order=a}),q9(r,n,i.vs)})}function RC(e,t){br.forEach(t,function(n){br.forEach(n,function(r,o){e.node(r).order=o})})}var ae=Ne,U9=Xt.Graph,G9=ft,Y9={positionX:iW};function K9(e,t){var n={};function r(o,i){var s=0,a=0,l=o.length,c=ae.last(i);return ae.forEach(i,function(u,d){var f=Q9(e,u),p=f?e.node(f).order:l;(f||u===c)&&(ae.forEach(i.slice(a,d+1),function(g){ae.forEach(e.predecessors(g),function(m){var _=e.node(m),v=_.order;(v<s||p<v)&&!(_.dummy&&e.node(g).dummy)&&nT(n,m,g)})}),a=d+1,s=p)}),i}return ae.reduce(t,r),n}function X9(e,t){var n={};function r(i,s,a,l,c){var u;ae.forEach(ae.range(s,a),function(d){u=i[d],e.node(u).dummy&&ae.forEach(e.predecessors(u),function(f){var p=e.node(f);p.dummy&&(p.order<l||p.order>c)&&nT(n,f,u)})})}function o(i,s){var a=-1,l,c=0;return ae.forEach(s,function(u,d){if(e.node(u).dummy==="border"){var f=e.predecessors(u);f.length&&(l=e.node(f[0]).order,r(s,c,d,a,l),c=d,a=l)}r(s,c,s.length,l,i.length)}),s}return ae.reduce(t,o),n}function Q9(e,t){if(e.node(t).dummy)return ae.find(e.predecessors(t),function(n){return e.node(n).dummy})}function nT(e,t,n){if(t>n){var r=t;t=n,n=r}var o=e[t];o||(e[t]=o={}),o[n]=!0}function Z9(e,t,n){if(t>n){var r=t;t=n,n=r}return ae.has(e[t],n)}function J9(e,t,n,r){var o={},i={},s={};return ae.forEach(t,function(a){ae.forEach(a,function(l,c){o[l]=l,i[l]=l,s[l]=c})}),ae.forEach(t,function(a){var l=-1;ae.forEach(a,function(c){var u=r(c);if(u.length){u=ae.sortBy(u,function(m){return s[m]});for(var d=(u.length-1)/2,f=Math.floor(d),p=Math.ceil(d);f<=p;++f){var g=u[f];i[c]===c&&l<s[g]&&!Z9(n,c,g)&&(i[g]=c,i[c]=o[c]=o[g],l=s[g])}}})}),{root:o,align:i}}function eW(e,t,n,r,o){var i={},s=tW(e,t,n,o),a=o?"borderLeft":"borderRight";function l(d,f){for(var p=s.nodes(),g=p.pop(),m={};g;)m[g]?d(g):(m[g]=!0,p.push(g),p=p.concat(f(g))),g=p.pop()}function c(d){i[d]=s.inEdges(d).reduce(function(f,p){return Math.max(f,i[p.v]+s.edge(p))},0)}function u(d){var f=s.outEdges(d).reduce(function(g,m){return Math.min(g,i[m.w]-s.edge(m))},Number.POSITIVE_INFINITY),p=e.node(d);f!==Number.POSITIVE_INFINITY&&p.borderType!==a&&(i[d]=Math.max(i[d],f))}return l(c,s.predecessors.bind(s)),l(u,s.successors.bind(s)),ae.forEach(r,function(d){i[d]=i[n[d]]}),i}function tW(e,t,n,r){var o=new U9,i=e.graph(),s=sW(i.nodesep,i.edgesep,r);return ae.forEach(t,function(a){var l;ae.forEach(a,function(c){var u=n[c];if(o.setNode(u),l){var d=n[l],f=o.edge(d,u);o.setEdge(d,u,Math.max(s(e,c,l),f||0))}l=c})}),o}function nW(e,t){return ae.minBy(ae.values(t),function(n){var r=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY;return ae.forIn(n,function(i,s){var a=aW(e,s)/2;r=Math.max(i+a,r),o=Math.min(i-a,o)}),r-o})}function rW(e,t){var n=ae.values(t),r=ae.min(n),o=ae.max(n);ae.forEach(["u","d"],function(i){ae.forEach(["l","r"],function(s){var a=i+s,l=e[a],c;if(l!==t){var u=ae.values(l);c=s==="l"?r-ae.min(u):o-ae.max(u),c&&(e[a]=ae.mapValues(l,function(d){return d+c}))}})})}function oW(e,t){return ae.mapValues(e.ul,function(n,r){if(t)return e[t.toLowerCase()][r];var o=ae.sortBy(ae.map(e,r));return(o[1]+o[2])/2})}function iW(e){var t=G9.buildLayerMatrix(e),n=ae.merge(K9(e,t),X9(e,t)),r={},o;ae.forEach(["u","d"],function(s){o=s==="u"?t:ae.values(t).reverse(),ae.forEach(["l","r"],function(a){a==="r"&&(o=ae.map(o,function(d){return ae.values(d).reverse()}));var l=(s==="u"?e.predecessors:e.successors).bind(e),c=J9(e,o,n,l),u=eW(e,o,c.root,c.align,a==="r");a==="r"&&(u=ae.mapValues(u,function(d){return-d})),r[s+a]=u})});var i=nW(e,r);return rW(r,i),oW(r,e.graph().align)}function sW(e,t,n){return function(r,o,i){var s=r.node(o),a=r.node(i),l=0,c;if(l+=s.width/2,ae.has(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":c=-s.width/2;break;case"r":c=s.width/2;break}if(c&&(l+=n?c:-c),c=0,l+=(s.dummy?t:e)/2,l+=(a.dummy?t:e)/2,l+=a.width/2,ae.has(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":c=a.width/2;break;case"r":c=-a.width/2;break}return c&&(l+=n?c:-c),c=0,l}}function aW(e,t){return e.node(t).width}var ts=Ne,rT=ft,lW=Y9.positionX,cW=uW;function uW(e){e=rT.asNonCompoundGraph(e),dW(e),ts.forEach(lW(e),function(t,n){e.node(n).x=t})}function dW(e){var t=rT.buildLayerMatrix(e),n=e.graph().ranksep,r=0;ts.forEach(t,function(o){var i=ts.max(ts.map(o,function(s){return e.node(s).height}));ts.forEach(o,function(s){e.node(s).y=r+i/2}),r+=i+n})}var de=Ne,PC=t7,jC=y7,fW=B7,hW=ft.normalizeRanks,pW=U7,mW=ft.removeEmptyRanks,TC=X7,gW=n9,AC=o9,vW=H9,yW=cW,Nr=ft,xW=Xt.Graph,wW=bW;function bW(e,t){var n=t&&t.debugTiming?Nr.time:Nr.notime;n("layout",function(){var r=n(" buildLayoutGraph",function(){return AW(e)});n(" runLayout",function(){_W(r,n)}),n(" updateInputGraph",function(){SW(e,r)})})}function _W(e,t){t(" makeSpaceForEdgeLabels",function(){MW(e)}),t(" removeSelfEdges",function(){BW(e)}),t(" acyclic",function(){PC.run(e)}),t(" nestingGraph.run",function(){TC.run(e)}),t(" rank",function(){fW(Nr.asNonCompoundGraph(e))}),t(" injectEdgeLabelProxies",function(){IW(e)}),t(" removeEmptyRanks",function(){mW(e)}),t(" nestingGraph.cleanup",function(){TC.cleanup(e)}),t(" normalizeRanks",function(){hW(e)}),t(" assignRankMinMax",function(){OW(e)}),t(" removeEdgeLabelProxies",function(){LW(e)}),t(" normalize.run",function(){jC.run(e)}),t(" parentDummyChains",function(){pW(e)}),t(" addBorderSegments",function(){gW(e)}),t(" order",function(){vW(e)}),t(" insertSelfEdges",function(){HW(e)}),t(" adjustCoordinateSystem",function(){AC.adjust(e)}),t(" position",function(){yW(e)}),t(" positionSelfEdges",function(){VW(e)}),t(" removeBorderNodes",function(){qW(e)}),t(" normalize.undo",function(){jC.undo(e)}),t(" fixupEdgeLabelCoords",function(){zW(e)}),t(" undoCoordinateSystem",function(){AC.undo(e)}),t(" translateGraph",function(){DW(e)}),t(" assignNodeIntersects",function(){$W(e)}),t(" reversePoints",function(){FW(e)}),t(" acyclic.undo",function(){PC.undo(e)})}function SW(e,t){de.forEach(e.nodes(),function(n){var r=e.node(n),o=t.node(n);r&&(r.x=o.x,r.y=o.y,t.children(n).length&&(r.width=o.width,r.height=o.height))}),de.forEach(e.edges(),function(n){var r=e.edge(n),o=t.edge(n);r.points=o.points,de.has(o,"x")&&(r.x=o.x,r.y=o.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var EW=["nodesep","edgesep","ranksep","marginx","marginy"],CW={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},NW=["acyclicer","ranker","rankdir","align"],kW=["width","height"],RW={width:0,height:0},PW=["minlen","weight","width","height","labeloffset"],jW={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},TW=["labelpos"];function AW(e){var t=new xW({multigraph:!0,compound:!0}),n=ug(e.graph());return t.setGraph(de.merge({},CW,cg(n,EW),de.pick(n,NW))),de.forEach(e.nodes(),function(r){var o=ug(e.node(r));t.setNode(r,de.defaults(cg(o,kW),RW)),t.setParent(r,e.parent(r))}),de.forEach(e.edges(),function(r){var o=ug(e.edge(r));t.setEdge(r,de.merge({},jW,cg(o,PW),de.pick(o,TW)))}),t}function MW(e){var t=e.graph();t.ranksep/=2,de.forEach(e.edges(),function(n){var r=e.edge(n);r.minlen*=2,r.labelpos.toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function IW(e){de.forEach(e.edges(),function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v),o=e.node(t.w),i={rank:(o.rank-r.rank)/2+r.rank,e:t};Nr.addDummyNode(e,"edge-proxy",i,"_ep")}})}function OW(e){var t=0;de.forEach(e.nodes(),function(n){var r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=de.max(t,r.maxRank))}),e.graph().maxRank=t}function LW(e){de.forEach(e.nodes(),function(t){var n=e.node(t);n.dummy==="edge-proxy"&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function DW(e){var t=Number.POSITIVE_INFINITY,n=0,r=Number.POSITIVE_INFINITY,o=0,i=e.graph(),s=i.marginx||0,a=i.marginy||0;function l(c){var u=c.x,d=c.y,f=c.width,p=c.height;t=Math.min(t,u-f/2),n=Math.max(n,u+f/2),r=Math.min(r,d-p/2),o=Math.max(o,d+p/2)}de.forEach(e.nodes(),function(c){l(e.node(c))}),de.forEach(e.edges(),function(c){var u=e.edge(c);de.has(u,"x")&&l(u)}),t-=s,r-=a,de.forEach(e.nodes(),function(c){var u=e.node(c);u.x-=t,u.y-=r}),de.forEach(e.edges(),function(c){var u=e.edge(c);de.forEach(u.points,function(d){d.x-=t,d.y-=r}),de.has(u,"x")&&(u.x-=t),de.has(u,"y")&&(u.y-=r)}),i.width=n-t+s,i.height=o-r+a}function $W(e){de.forEach(e.edges(),function(t){var n=e.edge(t),r=e.node(t.v),o=e.node(t.w),i,s;n.points?(i=n.points[0],s=n.points[n.points.length-1]):(n.points=[],i=o,s=r),n.points.unshift(Nr.intersectRect(r,i)),n.points.push(Nr.intersectRect(o,s))})}function zW(e){de.forEach(e.edges(),function(t){var n=e.edge(t);if(de.has(n,"x"))switch((n.labelpos==="l"||n.labelpos==="r")&&(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset;break}})}function FW(e){de.forEach(e.edges(),function(t){var n=e.edge(t);n.reversed&&n.points.reverse()})}function qW(e){de.forEach(e.nodes(),function(t){if(e.children(t).length){var n=e.node(t),r=e.node(n.borderTop),o=e.node(n.borderBottom),i=e.node(de.last(n.borderLeft)),s=e.node(de.last(n.borderRight));n.width=Math.abs(s.x-i.x),n.height=Math.abs(o.y-r.y),n.x=i.x+n.width/2,n.y=r.y+n.height/2}}),de.forEach(e.nodes(),function(t){e.node(t).dummy==="border"&&e.removeNode(t)})}function BW(e){de.forEach(e.edges(),function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function HW(e){var t=Nr.buildLayerMatrix(e);de.forEach(t,function(n){var r=0;de.forEach(n,function(o,i){var s=e.node(o);s.order=i+r,de.forEach(s.selfEdges,function(a){Nr.addDummyNode(e,"selfedge",{width:a.label.width,height:a.label.height,rank:s.rank,order:i+ ++r,e:a.e,label:a.label},"_se")}),delete s.selfEdges})})}function VW(e){de.forEach(e.nodes(),function(t){var n=e.node(t);if(n.dummy==="selfedge"){var r=e.node(n.e.v),o=r.x+r.width/2,i=r.y,s=n.x-o,a=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:o+2*s/3,y:i-a},{x:o+5*s/6,y:i-a},{x:o+s,y:i},{x:o+5*s/6,y:i+a},{x:o+2*s/3,y:i+a}],n.label.x=n.x,n.label.y=n.y}})}function cg(e,t){return de.mapValues(de.pick(e,t),Number)}function ug(e){var t={};return de.forEach(e,function(n,r){t[r.toLowerCase()]=n}),t}var Ba=Ne,WW=ft,UW=Xt.Graph,GW={debugOrdering:YW};function YW(e){var t=WW.buildLayerMatrix(e),n=new UW({compound:!0,multigraph:!0}).setGraph({});return Ba.forEach(e.nodes(),function(r){n.setNode(r,{label:r}),n.setParent(r,"layer"+e.node(r).rank)}),Ba.forEach(e.edges(),function(r){n.setEdge(r.v,r.w,{},r.name)}),Ba.forEach(t,function(r,o){var i="layer"+o;n.setNode(i,{rank:"same"}),Ba.reduce(r,function(s,a){return n.setEdge(s,a,{style:"invis"}),a})}),n}var KW="0.8.5",XW={graphlib:Xt,layout:wW,debug:GW,util:{time:ft.time,notime:ft.notime},version:KW};const nc=hc(XW);function MC(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ri(...e){return t=>{let n=!1;const r=e.map(o=>{const i=MC(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():MC(e[o],null)}}}}function ye(...e){return y.useCallback(Ri(...e),e)}var QW=Symbol.for("react.lazy"),rc=ty[" use ".trim().toString()];function ZW(e){return typeof e=="object"&&e!==null&&"then"in e}function oT(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===QW&&"_payload"in e&&ZW(e._payload)}function cu(e){const t=JW(e),n=y.forwardRef((r,o)=>{let{children:i,...s}=r;oT(i)&&typeof rc=="function"&&(i=rc(i._payload));const a=y.Children.toArray(i),l=a.find(tU);if(l){const c=l.props.children,u=a.map(d=>d===l?y.Children.count(c)>1?y.Children.only(null):y.isValidElement(c)?c.props.children:null:d);return h.jsx(t,{...s,ref:o,children:y.isValidElement(c)?y.cloneElement(c,void 0,u):null})}return h.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var Pi=cu("Slot");function JW(e){const t=y.forwardRef((n,r)=>{let{children:o,...i}=n;if(oT(o)&&typeof rc=="function"&&(o=rc(o._payload)),y.isValidElement(o)){const s=rU(o),a=nU(i,o.props);return o.type!==y.Fragment&&(a.ref=r?Ri(r,s):s),y.cloneElement(o,a)}return y.Children.count(o)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var eU=Symbol("radix.slottable");function tU(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===eU}function nU(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function rU(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const oU=Ks("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Dn=y.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const s=r?Pi:"button";return h.jsx(s,{className:K(oU({variant:t,size:n,className:e})),ref:i,...o})});Dn.displayName="Button";function ce(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function iU(e,t){const n=y.createContext(t),r=i=>{const{children:s,...a}=i,l=y.useMemo(()=>a,Object.values(a));return h.jsx(n.Provider,{value:l,children:s})};r.displayName=e+"Provider";function o(i){const s=y.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function vo(e,t=[]){let n=[];function r(i,s){const a=y.createContext(s),l=n.length;n=[...n,s];const c=d=>{var v;const{scope:f,children:p,...g}=d,m=((v=f==null?void 0:f[e])==null?void 0:v[l])||a,_=y.useMemo(()=>g,Object.values(g));return h.jsx(m.Provider,{value:_,children:p})};c.displayName=i+"Provider";function u(d,f){var m;const p=((m=f==null?void 0:f[e])==null?void 0:m[l])||a,g=y.useContext(p);if(g)return g;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=n.map(s=>y.createContext(s));return function(a){const l=(a==null?void 0:a[e])||i;return y.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,sU(o,...t)]}function sU(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((a,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...a,...d}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function aU(e){const t=lU(e),n=y.forwardRef((r,o)=>{const{children:i,...s}=r,a=y.Children.toArray(i),l=a.find(uU);if(l){const c=l.props.children,u=a.map(d=>d===l?y.Children.count(c)>1?y.Children.only(null):y.isValidElement(c)?c.props.children:null:d);return h.jsx(t,{...s,ref:o,children:y.isValidElement(c)?y.cloneElement(c,void 0,u):null})}return h.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function lU(e){const t=y.forwardRef((n,r)=>{const{children:o,...i}=n;if(y.isValidElement(o)){const s=fU(o),a=dU(i,o.props);return o.type!==y.Fragment&&(a.ref=r?Ri(r,s):s),y.cloneElement(o,a)}return y.Children.count(o)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var cU=Symbol("radix.slottable");function uU(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===cU}function dU(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function fU(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var hU=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],pe=hU.reduce((e,t)=>{const n=aU(`Primitive.${t}`),r=y.forwardRef((o,i)=>{const{asChild:s,...a}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function pU(e,t){e&&xi.flushSync(()=>e.dispatchEvent(t))}function it(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function mU(e,t=globalThis==null?void 0:globalThis.document){const n=it(e);y.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var gU="DismissableLayer",Ov="dismissableLayer.update",vU="dismissableLayer.pointerDownOutside",yU="dismissableLayer.focusOutside",IC,iT=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),uu=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...l}=e,c=y.useContext(iT),[u,d]=y.useState(null),f=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=y.useState({}),g=ye(t,C=>d(C)),m=Array.from(c.layers),[_]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(_),w=u?m.indexOf(u):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,b=w>=v,S=bU(C=>{const k=C.target,T=[...c.branches].some(M=>M.contains(k));!b||T||(o==null||o(C),s==null||s(C),C.defaultPrevented||a==null||a())},f),E=_U(C=>{const k=C.target;[...c.branches].some(M=>M.contains(k))||(i==null||i(C),s==null||s(C),C.defaultPrevented||a==null||a())},f);return mU(C=>{w===c.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&a&&(C.preventDefault(),a()))},f),y.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(IC=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),OC(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=IC)}},[u,f,n,c]),y.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),OC())},[u,c]),y.useEffect(()=>{const C=()=>p({});return document.addEventListener(Ov,C),()=>document.removeEventListener(Ov,C)},[]),h.jsx(pe.div,{...l,ref:g,style:{pointerEvents:x?b?"auto":"none":void 0,...e.style},onFocusCapture:ce(e.onFocusCapture,E.onFocusCapture),onBlurCapture:ce(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:ce(e.onPointerDownCapture,S.onPointerDownCapture)})});uu.displayName=gU;var xU="DismissableLayerBranch",wU=y.forwardRef((e,t)=>{const n=y.useContext(iT),r=y.useRef(null),o=ye(t,r);return y.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),h.jsx(pe.div,{...e,ref:o})});wU.displayName=xU;function bU(e,t=globalThis==null?void 0:globalThis.document){const n=it(e),r=y.useRef(!1),o=y.useRef(()=>{});return y.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){sT(vU,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function _U(e,t=globalThis==null?void 0:globalThis.document){const n=it(e),r=y.useRef(!1);return y.useEffect(()=>{const o=i=>{i.target&&!r.current&&sT(yU,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function OC(){const e=new CustomEvent(Ov);document.dispatchEvent(e)}function sT(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?pU(o,i):o.dispatchEvent(i)}var Ue=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},SU=ty[" useId ".trim().toString()]||(()=>{}),EU=0;function Kr(e){const[t,n]=y.useState(SU());return Ue(()=>{n(r=>r??String(EU++))},[e]),t?`radix-${t}`:""}const CU=["top","right","bottom","left"],kr=Math.min,mt=Math.max,oc=Math.round,Ha=Math.floor,pn=e=>({x:e,y:e}),NU={left:"right",right:"left",bottom:"top",top:"bottom"},kU={start:"end",end:"start"};function Lv(e,t,n){return mt(e,kr(t,n))}function Vn(e,t){return typeof e=="function"?e(t):e}function Wn(e){return e.split("-")[0]}function ji(e){return e.split("-")[1]}function A0(e){return e==="x"?"y":"x"}function M0(e){return e==="y"?"height":"width"}const RU=new Set(["top","bottom"]);function cn(e){return RU.has(Wn(e))?"y":"x"}function I0(e){return A0(cn(e))}function PU(e,t,n){n===void 0&&(n=!1);const r=ji(e),o=I0(e),i=M0(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=ic(s)),[s,ic(s)]}function jU(e){const t=ic(e);return[Dv(e),t,Dv(t)]}function Dv(e){return e.replace(/start|end/g,t=>kU[t])}const LC=["left","right"],DC=["right","left"],TU=["top","bottom"],AU=["bottom","top"];function MU(e,t,n){switch(e){case"top":case"bottom":return n?t?DC:LC:t?LC:DC;case"left":case"right":return t?TU:AU;default:return[]}}function IU(e,t,n,r){const o=ji(e);let i=MU(Wn(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Dv)))),i}function ic(e){return e.replace(/left|right|bottom|top/g,t=>NU[t])}function OU(e){return{top:0,right:0,bottom:0,left:0,...e}}function aT(e){return typeof e!="number"?OU(e):{top:e,right:e,bottom:e,left:e}}function sc(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function $C(e,t,n){let{reference:r,floating:o}=e;const i=cn(t),s=I0(t),a=M0(s),l=Wn(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(ji(t)){case"start":p[s]-=f*(n&&c?-1:1);break;case"end":p[s]+=f*(n&&c?-1:1);break}return p}async function LU(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Vn(t,e),g=aT(p),_=a[f?d==="floating"?"reference":"floating":d],v=sc(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(_)))==null||n?_:_.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),w=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),b=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},S=sc(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:x,strategy:l}):w);return{top:(v.top-S.top+g.top)/b.y,bottom:(S.bottom-v.bottom+g.bottom)/b.y,left:(v.left-S.left+g.left)/b.x,right:(S.right-v.right+g.right)/b.x}}const DU=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=$C(c,r,l),f=r,p={},g=0;for(let _=0;_<a.length;_++){var m;const{name:v,fn:w}=a[_],{x,y:b,data:S,reset:E}=await w({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:{...s,detectOverflow:(m=s.detectOverflow)!=null?m:LU},elements:{reference:e,floating:t}});u=x??u,d=b??d,p={...p,[v]:{...p[v],...S}},E&&g<=50&&(g++,typeof E=="object"&&(E.placement&&(f=E.placement),E.rects&&(c=E.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:u,y:d}=$C(c,f,l)),_=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}},$U=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=Vn(e,t)||{};if(c==null)return{};const d=aT(u),f={x:n,y:r},p=I0(o),g=M0(p),m=await s.getDimensions(c),_=p==="y",v=_?"top":"left",w=_?"bottom":"right",x=_?"clientHeight":"clientWidth",b=i.reference[g]+i.reference[p]-f[p]-i.floating[g],S=f[p]-i.reference[p],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let C=E?E[x]:0;(!C||!await(s.isElement==null?void 0:s.isElement(E)))&&(C=a.floating[x]||i.floating[g]);const k=b/2-S/2,T=C/2-m[g]/2-1,M=kr(d[v],T),P=kr(d[w],T),I=M,D=C-m[g]-P,R=C/2-m[g]/2+k,O=Lv(I,R,D),j=!l.arrow&&ji(o)!=null&&R!==O&&i.reference[g]/2-(R<I?M:P)-m[g]/2<0,L=j?R<I?R-I:R-D:0;return{[p]:f[p]+L,data:{[p]:O,centerOffset:R-O-L,...j&&{alignmentOffset:L}},reset:j}}}),zU=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,..._}=Vn(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=Wn(o),w=cn(a),x=Wn(a)===a,b=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=f||(x||!m?[ic(a)]:jU(a)),E=g!=="none";!f&&E&&S.push(...IU(a,m,g,b));const C=[a,...S],k=await l.detectOverflow(t,_),T=[];let M=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&T.push(k[v]),d){const R=PU(o,s,b);T.push(k[R[0]],k[R[1]])}if(M=[...M,{placement:o,overflows:T}],!T.every(R=>R<=0)){var P,I;const R=(((P=i.flip)==null?void 0:P.index)||0)+1,O=C[R];if(O&&(!(d==="alignment"?w!==cn(O):!1)||M.every(N=>cn(N.placement)===w?N.overflows[0]>0:!0)))return{data:{index:R,overflows:M},reset:{placement:O}};let j=(I=M.filter(L=>L.overflows[0]<=0).sort((L,N)=>L.overflows[1]-N.overflows[1])[0])==null?void 0:I.placement;if(!j)switch(p){case"bestFit":{var D;const L=(D=M.filter(N=>{if(E){const A=cn(N.placement);return A===w||A==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(A=>A>0).reduce((A,$)=>A+$,0)]).sort((N,A)=>N[1]-A[1])[0])==null?void 0:D[0];L&&(j=L);break}case"initialPlacement":j=a;break}if(o!==j)return{reset:{placement:j}}}return{}}}};function zC(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function FC(e){return CU.some(t=>e[t]>=0)}const FU=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=Vn(e,t);switch(o){case"referenceHidden":{const s=await r.detectOverflow(t,{...i,elementContext:"reference"}),a=zC(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:FC(a)}}}case"escaped":{const s=await r.detectOverflow(t,{...i,altBoundary:!0}),a=zC(s,n.floating);return{data:{escapedOffsets:a,escaped:FC(a)}}}default:return{}}}}},lT=new Set(["left","top"]);async function qU(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Wn(n),a=ji(n),l=cn(n)==="y",c=lT.has(s)?-1:1,u=i&&l?-1:1,d=Vn(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof g=="number"&&(p=a==="end"?g*-1:g),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}const BU=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await qU(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},HU=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:v=>{let{x:w,y:x}=v;return{x:w,y:x}}},...c}=Vn(e,t),u={x:n,y:r},d=await i.detectOverflow(t,c),f=cn(Wn(o)),p=A0(f);let g=u[p],m=u[f];if(s){const v=p==="y"?"top":"left",w=p==="y"?"bottom":"right",x=g+d[v],b=g-d[w];g=Lv(x,g,b)}if(a){const v=f==="y"?"top":"left",w=f==="y"?"bottom":"right",x=m+d[v],b=m-d[w];m=Lv(x,m,b)}const _=l.fn({...t,[p]:g,[f]:m});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:s,[f]:a}}}}}},VU=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Vn(e,t),u={x:n,y:r},d=cn(o),f=A0(d);let p=u[f],g=u[d];const m=Vn(a,t),_=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const x=f==="y"?"height":"width",b=i.reference[f]-i.floating[x]+_.mainAxis,S=i.reference[f]+i.reference[x]-_.mainAxis;p<b?p=b:p>S&&(p=S)}if(c){var v,w;const x=f==="y"?"width":"height",b=lT.has(Wn(o)),S=i.reference[d]-i.floating[x]+(b&&((v=s.offset)==null?void 0:v[d])||0)+(b?0:_.crossAxis),E=i.reference[d]+i.reference[x]+(b?0:((w=s.offset)==null?void 0:w[d])||0)-(b?_.crossAxis:0);g<S?g=S:g>E&&(g=E)}return{[f]:p,[d]:g}}}},WU=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...c}=Vn(e,t),u=await s.detectOverflow(t,c),d=Wn(o),f=ji(o),p=cn(o)==="y",{width:g,height:m}=i.floating;let _,v;d==="top"||d==="bottom"?(_=d,v=f===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,_=f==="end"?"top":"bottom");const w=m-u.top-u.bottom,x=g-u.left-u.right,b=kr(m-u[_],w),S=kr(g-u[v],x),E=!t.middlewareData.shift;let C=b,k=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=w),E&&!f){const M=mt(u.left,0),P=mt(u.right,0),I=mt(u.top,0),D=mt(u.bottom,0);p?k=g-2*(M!==0||P!==0?M+P:mt(u.left,u.right)):C=m-2*(I!==0||D!==0?I+D:mt(u.top,u.bottom))}await l({...t,availableWidth:k,availableHeight:C});const T=await s.getDimensions(a.floating);return g!==T.width||m!==T.height?{reset:{rects:!0}}:{}}}};function du(){return typeof window<"u"}function Ti(e){return cT(e)?(e.nodeName||"").toLowerCase():"#document"}function xt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function xn(e){var t;return(t=(cT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function cT(e){return du()?e instanceof Node||e instanceof xt(e).Node:!1}function Ut(e){return du()?e instanceof Element||e instanceof xt(e).Element:!1}function gn(e){return du()?e instanceof HTMLElement||e instanceof xt(e).HTMLElement:!1}function qC(e){return!du()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof xt(e).ShadowRoot}const UU=new Set(["inline","contents"]);function aa(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Gt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!UU.has(o)}const GU=new Set(["table","td","th"]);function YU(e){return GU.has(Ti(e))}const KU=[":popover-open",":modal"];function fu(e){return KU.some(t=>{try{return e.matches(t)}catch{return!1}})}const XU=["transform","translate","scale","rotate","perspective"],QU=["transform","translate","scale","rotate","perspective","filter"],ZU=["paint","layout","strict","content"];function O0(e){const t=L0(),n=Ut(e)?Gt(e):e;return XU.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||QU.some(r=>(n.willChange||"").includes(r))||ZU.some(r=>(n.contain||"").includes(r))}function JU(e){let t=Rr(e);for(;gn(t)&&!fi(t);){if(O0(t))return t;if(fu(t))return null;t=Rr(t)}return null}function L0(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const eG=new Set(["html","body","#document"]);function fi(e){return eG.has(Ti(e))}function Gt(e){return xt(e).getComputedStyle(e)}function hu(e){return Ut(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Rr(e){if(Ti(e)==="html")return e;const t=e.assignedSlot||e.parentNode||qC(e)&&e.host||xn(e);return qC(t)?t.host:t}function uT(e){const t=Rr(e);return fi(t)?e.ownerDocument?e.ownerDocument.body:e.body:gn(t)&&aa(t)?t:uT(t)}function qs(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=uT(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=xt(o);if(i){const a=$v(s);return t.concat(s,s.visualViewport||[],aa(o)?o:[],a&&n?qs(a):[])}return t.concat(o,qs(o,[],n))}function $v(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function dT(e){const t=Gt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=gn(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=oc(n)!==i||oc(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function D0(e){return Ut(e)?e:e.contextElement}function Yo(e){const t=D0(e);if(!gn(t))return pn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=dT(t);let s=(i?oc(n.width):n.width)/r,a=(i?oc(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const tG=pn(0);function fT(e){const t=xt(e);return!L0()||!t.visualViewport?tG:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function nG(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==xt(e)?!1:t}function io(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=D0(e);let s=pn(1);t&&(r?Ut(r)&&(s=Yo(r)):s=Yo(e));const a=nG(i,n,r)?fT(i):pn(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(i){const f=xt(i),p=r&&Ut(r)?xt(r):r;let g=f,m=$v(g);for(;m&&r&&p!==g;){const _=Yo(m),v=m.getBoundingClientRect(),w=Gt(m),x=v.left+(m.clientLeft+parseFloat(w.paddingLeft))*_.x,b=v.top+(m.clientTop+parseFloat(w.paddingTop))*_.y;l*=_.x,c*=_.y,u*=_.x,d*=_.y,l+=x,c+=b,g=xt(m),m=$v(g)}}return sc({width:u,height:d,x:l,y:c})}function pu(e,t){const n=hu(e).scrollLeft;return t?t.left+n:io(xn(e)).left+n}function hT(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-pu(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function rG(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=xn(r),a=t?fu(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=pn(1);const u=pn(0),d=gn(r);if((d||!d&&!i)&&((Ti(r)!=="body"||aa(s))&&(l=hu(r)),gn(r))){const p=io(r);c=Yo(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}const f=s&&!d&&!i?hT(s,l):pn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function oG(e){return Array.from(e.getClientRects())}function iG(e){const t=xn(e),n=hu(e),r=e.ownerDocument.body,o=mt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=mt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+pu(e);const a=-n.scrollTop;return Gt(r).direction==="rtl"&&(s+=mt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const BC=25;function sG(e,t){const n=xt(e),r=xn(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const u=L0();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const c=pu(r);if(c<=0){const u=r.ownerDocument,d=u.body,f=getComputedStyle(d),p=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,g=Math.abs(r.clientWidth-d.clientWidth-p);g<=BC&&(i-=g)}else c<=BC&&(i+=c);return{width:i,height:s,x:a,y:l}}const aG=new Set(["absolute","fixed"]);function lG(e,t){const n=io(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=gn(e)?Yo(e):pn(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function HC(e,t,n){let r;if(t==="viewport")r=sG(e,n);else if(t==="document")r=iG(xn(e));else if(Ut(t))r=lG(t,n);else{const o=fT(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return sc(r)}function pT(e,t){const n=Rr(e);return n===t||!Ut(n)||fi(n)?!1:Gt(n).position==="fixed"||pT(n,t)}function cG(e,t){const n=t.get(e);if(n)return n;let r=qs(e,[],!1).filter(a=>Ut(a)&&Ti(a)!=="body"),o=null;const i=Gt(e).position==="fixed";let s=i?Rr(e):e;for(;Ut(s)&&!fi(s);){const a=Gt(s),l=O0(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&aG.has(o.position)||aa(s)&&!l&&pT(e,s))?r=r.filter(u=>u!==s):o=a,s=Rr(s)}return t.set(e,r),r}function uG(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?fu(t)?[]:cG(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{const d=HC(t,u,o);return c.top=mt(d.top,c.top),c.right=kr(d.right,c.right),c.bottom=kr(d.bottom,c.bottom),c.left=mt(d.left,c.left),c},HC(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function dG(e){const{width:t,height:n}=dT(e);return{width:t,height:n}}function fG(e,t,n){const r=gn(t),o=xn(t),i=n==="fixed",s=io(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=pn(0);function c(){l.x=pu(o)}if(r||!r&&!i)if((Ti(t)!=="body"||aa(o))&&(a=hu(t)),r){const p=io(t,!0,i,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=o&&!r&&!i?hT(o,a):pn(0),d=s.left+a.scrollLeft-l.x-u.x,f=s.top+a.scrollTop-l.y-u.y;return{x:d,y:f,width:s.width,height:s.height}}function dg(e){return Gt(e).position==="static"}function VC(e,t){if(!gn(e)||Gt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return xn(e)===n&&(n=n.ownerDocument.body),n}function mT(e,t){const n=xt(e);if(fu(e))return n;if(!gn(e)){let o=Rr(e);for(;o&&!fi(o);){if(Ut(o)&&!dg(o))return o;o=Rr(o)}return n}let r=VC(e,t);for(;r&&YU(r)&&dg(r);)r=VC(r,t);return r&&fi(r)&&dg(r)&&!O0(r)?n:r||JU(e)||n}const hG=async function(e){const t=this.getOffsetParent||mT,n=this.getDimensions,r=await n(e.floating);return{reference:fG(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function pG(e){return Gt(e).direction==="rtl"}const mG={convertOffsetParentRelativeRectToViewportRelativeRect:rG,getDocumentElement:xn,getClippingRect:uG,getOffsetParent:mT,getElementRects:hG,getClientRects:oG,getDimensions:dG,getScale:Yo,isElement:Ut,isRTL:pG};function gT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function gG(e,t){let n=null,r;const o=xn(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(a||t(),!f||!p)return;const g=Ha(d),m=Ha(o.clientWidth-(u+f)),_=Ha(o.clientHeight-(d+p)),v=Ha(u),x={rootMargin:-g+"px "+-m+"px "+-_+"px "+-v+"px",threshold:mt(0,kr(1,l))||1};let b=!0;function S(E){const C=E[0].intersectionRatio;if(C!==l){if(!b)return s();C?s(!1,C):r=setTimeout(()=>{s(!1,1e-7)},1e3)}C===1&&!gT(c,e.getBoundingClientRect())&&s(),b=!1}try{n=new IntersectionObserver(S,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,x)}n.observe(e)}return s(!0),i}function vG(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=D0(e),u=o||i?[...c?qs(c):[],...qs(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=c&&a?gG(c,n):null;let f=-1,p=null;s&&(p=new ResizeObserver(v=>{let[w]=v;w&&w.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let g,m=l?io(e):null;l&&_();function _(){const v=io(e);m&&!gT(m,v)&&n(),m=v,g=requestAnimationFrame(_)}return n(),()=>{var v;u.forEach(w=>{o&&w.removeEventListener("scroll",n),i&&w.removeEventListener("resize",n)}),d==null||d(),(v=p)==null||v.disconnect(),p=null,l&&cancelAnimationFrame(g)}}const yG=BU,xG=HU,wG=zU,bG=WU,_G=FU,WC=$U,SG=VU,EG=(e,t,n)=>{const r=new Map,o={platform:mG,...n},i={...o.platform,_c:r};return DU(e,t,{...o,platform:i})};var CG=typeof document<"u",NG=function(){},fl=CG?y.useLayoutEffect:NG;function ac(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ac(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!ac(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function vT(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function UC(e,t){const n=vT(e);return Math.round(t*n)/n}function fg(e){const t=y.useRef(e);return fl(()=>{t.current=e}),t}function kG(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=y.useState(r);ac(f,r)||p(r);const[g,m]=y.useState(null),[_,v]=y.useState(null),w=y.useCallback(N=>{N!==E.current&&(E.current=N,m(N))},[]),x=y.useCallback(N=>{N!==C.current&&(C.current=N,v(N))},[]),b=i||g,S=s||_,E=y.useRef(null),C=y.useRef(null),k=y.useRef(u),T=l!=null,M=fg(l),P=fg(o),I=fg(c),D=y.useCallback(()=>{if(!E.current||!C.current)return;const N={placement:t,strategy:n,middleware:f};P.current&&(N.platform=P.current),EG(E.current,C.current,N).then(A=>{const $={...A,isPositioned:I.current!==!1};R.current&&!ac(k.current,$)&&(k.current=$,xi.flushSync(()=>{d($)}))})},[f,t,n,P,I]);fl(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(N=>({...N,isPositioned:!1})))},[c]);const R=y.useRef(!1);fl(()=>(R.current=!0,()=>{R.current=!1}),[]),fl(()=>{if(b&&(E.current=b),S&&(C.current=S),b&&S){if(M.current)return M.current(b,S,D);D()}},[b,S,D,M,T]);const O=y.useMemo(()=>({reference:E,floating:C,setReference:w,setFloating:x}),[w,x]),j=y.useMemo(()=>({reference:b,floating:S}),[b,S]),L=y.useMemo(()=>{const N={position:n,left:0,top:0};if(!j.floating)return N;const A=UC(j.floating,u.x),$=UC(j.floating,u.y);return a?{...N,transform:"translate("+A+"px, "+$+"px)",...vT(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:A,top:$}},[n,a,j.floating,u.x,u.y]);return y.useMemo(()=>({...u,update:D,refs:O,elements:j,floatingStyles:L}),[u,D,O,j,L])}const RG=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?WC({element:r.current,padding:o}).fn(n):{}:r?WC({element:r,padding:o}).fn(n):{}}}},PG=(e,t)=>({...yG(e),options:[e,t]}),jG=(e,t)=>({...xG(e),options:[e,t]}),TG=(e,t)=>({...SG(e),options:[e,t]}),AG=(e,t)=>({...wG(e),options:[e,t]}),MG=(e,t)=>({...bG(e),options:[e,t]}),IG=(e,t)=>({..._G(e),options:[e,t]}),OG=(e,t)=>({...RG(e),options:[e,t]});var LG="Arrow",yT=y.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return h.jsx(pe.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:h.jsx("polygon",{points:"0,0 30,0 15,10"})})});yT.displayName=LG;var DG=yT;function xT(e){const[t,n]=y.useState(void 0);return Ue(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,a;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;s=c.inlineSize,a=c.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var $0="Popper",[wT,mu]=vo($0),[$G,bT]=wT($0),_T=e=>{const{__scopePopper:t,children:n}=e,[r,o]=y.useState(null);return h.jsx($G,{scope:t,anchor:r,onAnchorChange:o,children:n})};_T.displayName=$0;var ST="PopperAnchor",ET=y.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=bT(ST,n),s=y.useRef(null),a=ye(t,s),l=y.useRef(null);return y.useEffect(()=>{const c=l.current;l.current=(r==null?void 0:r.current)||s.current,c!==l.current&&i.onAnchorChange(l.current)}),r?null:h.jsx(pe.div,{...o,ref:a})});ET.displayName=ST;var z0="PopperContent",[zG,FG]=wT(z0),CT=y.forwardRef((e,t)=>{var q,B,G,Z,Y,U;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:g,...m}=e,_=bT(z0,n),[v,w]=y.useState(null),x=ye(t,J=>w(J)),[b,S]=y.useState(null),E=xT(b),C=(E==null?void 0:E.width)??0,k=(E==null?void 0:E.height)??0,T=r+(i!=="center"?"-"+i:""),M=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},P=Array.isArray(c)?c:[c],I=P.length>0,D={padding:M,boundary:P.filter(BG),altBoundary:I},{refs:R,floatingStyles:O,placement:j,isPositioned:L,middlewareData:N}=kG({strategy:"fixed",placement:T,whileElementsMounted:(...J)=>vG(...J,{animationFrame:p==="always"}),elements:{reference:_.anchor},middleware:[PG({mainAxis:o+k,alignmentAxis:s}),l&&jG({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?TG():void 0,...D}),l&&AG({...D}),MG({...D,apply:({elements:J,rects:se,availableWidth:oe,availableHeight:le})=>{const{width:ie,height:Be}=se.reference,Te=J.floating.style;Te.setProperty("--radix-popper-available-width",`${oe}px`),Te.setProperty("--radix-popper-available-height",`${le}px`),Te.setProperty("--radix-popper-anchor-width",`${ie}px`),Te.setProperty("--radix-popper-anchor-height",`${Be}px`)}}),b&&OG({element:b,padding:a}),HG({arrowWidth:C,arrowHeight:k}),f&&IG({strategy:"referenceHidden",...D})]}),[A,$]=RT(j),z=it(g);Ue(()=>{L&&(z==null||z())},[L,z]);const F=(q=N.arrow)==null?void 0:q.x,V=(B=N.arrow)==null?void 0:B.y,H=((G=N.arrow)==null?void 0:G.centerOffset)!==0,[X,Q]=y.useState();return Ue(()=>{v&&Q(window.getComputedStyle(v).zIndex)},[v]),h.jsx("div",{ref:R.setFloating,"data-radix-popper-content-wrapper":"",style:{...O,transform:L?O.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,"--radix-popper-transform-origin":[(Z=N.transformOrigin)==null?void 0:Z.x,(Y=N.transformOrigin)==null?void 0:Y.y].join(" "),...((U=N.hide)==null?void 0:U.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:h.jsx(zG,{scope:n,placedSide:A,onArrowChange:S,arrowX:F,arrowY:V,shouldHideArrow:H,children:h.jsx(pe.div,{"data-side":A,"data-align":$,...m,ref:x,style:{...m.style,animation:L?void 0:"none"}})})})});CT.displayName=z0;var NT="PopperArrow",qG={top:"bottom",right:"left",bottom:"top",left:"right"},kT=y.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=FG(NT,r),s=qG[i.placedSide];return h.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:h.jsx(DG,{...o,ref:n,style:{...o.style,display:"block"}})})});kT.displayName=NT;function BG(e){return e!==null}var HG=e=>({name:"transformOrigin",options:e,fn(t){var _,v,w;const{placement:n,rects:r,middlewareData:o}=t,s=((_=o.arrow)==null?void 0:_.centerOffset)!==0,a=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[c,u]=RT(n),d={start:"0%",center:"50%",end:"100%"}[u],f=(((v=o.arrow)==null?void 0:v.x)??0)+a/2,p=(((w=o.arrow)==null?void 0:w.y)??0)+l/2;let g="",m="";return c==="bottom"?(g=s?d:`${f}px`,m=`${-l}px`):c==="top"?(g=s?d:`${f}px`,m=`${r.floating.height+l}px`):c==="right"?(g=`${-l}px`,m=s?d:`${p}px`):c==="left"&&(g=`${r.floating.width+l}px`,m=s?d:`${p}px`),{data:{x:g,y:m}}}});function RT(e){const[t,n="center"]=e.split("-");return[t,n]}var PT=_T,jT=ET,TT=CT,AT=kT,VG="Portal",gu=y.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,i]=y.useState(!1);Ue(()=>i(!0),[]);const s=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?O4.createPortal(h.jsx(pe.div,{...r,ref:t}),s):null});gu.displayName=VG;function WG(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var Qt=e=>{const{present:t,children:n}=e,r=UG(t),o=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),i=ye(r.ref,GG(o));return typeof n=="function"||r.isPresent?y.cloneElement(o,{ref:i}):null};Qt.displayName="Presence";function UG(e){const[t,n]=y.useState(),r=y.useRef(null),o=y.useRef(e),i=y.useRef("none"),s=e?"mounted":"unmounted",[a,l]=WG(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const c=Va(r.current);i.current=a==="mounted"?c:"none"},[a]),Ue(()=>{const c=r.current,u=o.current;if(u!==e){const f=i.current,p=Va(c);e?l("MOUNT"):p==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&f!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Ue(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=p=>{const m=Va(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&m&&(l("ANIMATION_END"),!o.current)){const _=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=_)})}},f=p=>{p.target===t&&(i.current=Va(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:y.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function Va(e){return(e==null?void 0:e.animationName)||"none"}function GG(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var YG=Symbol("radix.slottable");function KG(e){const t=({children:n})=>h.jsx(h.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=YG,t}var XG=ty[" useInsertionEffect ".trim().toString()]||Ue;function Bs({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,s]=QG({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:o;{const u=y.useRef(e!==void 0);y.useEffect(()=>{const d=u.current;d!==a&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,r])}const c=y.useCallback(u=>{var d;if(a){const f=ZG(u)?u(e):u;f!==e&&((d=s.current)==null||d.call(s,f))}else i(u)},[a,e,i,s]);return[l,c]}function QG({defaultProp:e,onChange:t}){const[n,r]=y.useState(e),o=y.useRef(n),i=y.useRef(t);return XG(()=>{i.current=t},[t]),y.useEffect(()=>{var s;o.current!==n&&((s=i.current)==null||s.call(i,n),o.current=n)},[n,o]),[n,r,i]}function ZG(e){return typeof e=="function"}var MT=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),JG="VisuallyHidden",IT=y.forwardRef((e,t)=>h.jsx(pe.span,{...e,ref:t,style:{...MT,...e.style}}));IT.displayName=JG;var eY=IT,[vu]=vo("Tooltip",[mu]),yu=mu(),OT="TooltipProvider",tY=700,zv="tooltip.open",[nY,F0]=vu(OT),LT=e=>{const{__scopeTooltip:t,delayDuration:n=tY,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,s=y.useRef(!0),a=y.useRef(!1),l=y.useRef(0);return y.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),h.jsx(nY,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:y.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:y.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:y.useCallback(c=>{a.current=c},[]),disableHoverableContent:o,children:i})};LT.displayName=OT;var Hs="Tooltip",[rY,la]=vu(Hs),DT=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:i,disableHoverableContent:s,delayDuration:a}=e,l=F0(Hs,e.__scopeTooltip),c=yu(t),[u,d]=y.useState(null),f=Kr(),p=y.useRef(0),g=s??l.disableHoverableContent,m=a??l.delayDuration,_=y.useRef(!1),[v,w]=Bs({prop:r,defaultProp:o??!1,onChange:C=>{C?(l.onOpen(),document.dispatchEvent(new CustomEvent(zv))):l.onClose(),i==null||i(C)},caller:Hs}),x=y.useMemo(()=>v?_.current?"delayed-open":"instant-open":"closed",[v]),b=y.useCallback(()=>{window.clearTimeout(p.current),p.current=0,_.current=!1,w(!0)},[w]),S=y.useCallback(()=>{window.clearTimeout(p.current),p.current=0,w(!1)},[w]),E=y.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{_.current=!0,w(!0),p.current=0},m)},[m,w]);return y.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),h.jsx(PT,{...c,children:h.jsx(rY,{scope:t,contentId:f,open:v,stateAttribute:x,trigger:u,onTriggerChange:d,onTriggerEnter:y.useCallback(()=>{l.isOpenDelayedRef.current?E():b()},[l.isOpenDelayedRef,E,b]),onTriggerLeave:y.useCallback(()=>{g?S():(window.clearTimeout(p.current),p.current=0)},[S,g]),onOpen:b,onClose:S,disableHoverableContent:g,children:n})})};DT.displayName=Hs;var Fv="TooltipTrigger",$T=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=la(Fv,n),i=F0(Fv,n),s=yu(n),a=y.useRef(null),l=ye(t,a,o.onTriggerChange),c=y.useRef(!1),u=y.useRef(!1),d=y.useCallback(()=>c.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),h.jsx(jT,{asChild:!0,...s,children:h.jsx(pe.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:ce(e.onPointerMove,f=>{f.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),u.current=!0)}),onPointerLeave:ce(e.onPointerLeave,()=>{o.onTriggerLeave(),u.current=!1}),onPointerDown:ce(e.onPointerDown,()=>{o.open&&o.onClose(),c.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:ce(e.onFocus,()=>{c.current||o.onOpen()}),onBlur:ce(e.onBlur,o.onClose),onClick:ce(e.onClick,o.onClose)})})});$T.displayName=Fv;var q0="TooltipPortal",[oY,iY]=vu(q0,{forceMount:void 0}),zT=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=la(q0,t);return h.jsx(oY,{scope:t,forceMount:n,children:h.jsx(Qt,{present:n||i.open,children:h.jsx(gu,{asChild:!0,container:o,children:r})})})};zT.displayName=q0;var hi="TooltipContent",FT=y.forwardRef((e,t)=>{const n=iY(hi,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,s=la(hi,e.__scopeTooltip);return h.jsx(Qt,{present:r||s.open,children:s.disableHoverableContent?h.jsx(qT,{side:o,...i,ref:t}):h.jsx(sY,{side:o,...i,ref:t})})}),sY=y.forwardRef((e,t)=>{const n=la(hi,e.__scopeTooltip),r=F0(hi,e.__scopeTooltip),o=y.useRef(null),i=ye(t,o),[s,a]=y.useState(null),{trigger:l,onClose:c}=n,u=o.current,{onPointerInTransitChange:d}=r,f=y.useCallback(()=>{a(null),d(!1)},[d]),p=y.useCallback((g,m)=>{const _=g.currentTarget,v={x:g.clientX,y:g.clientY},w=dY(v,_.getBoundingClientRect()),x=fY(v,w),b=hY(m.getBoundingClientRect()),S=mY([...x,...b]);a(S),d(!0)},[d]);return y.useEffect(()=>()=>f(),[f]),y.useEffect(()=>{if(l&&u){const g=_=>p(_,u),m=_=>p(_,l);return l.addEventListener("pointerleave",g),u.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",g),u.removeEventListener("pointerleave",m)}}},[l,u,p,f]),y.useEffect(()=>{if(s){const g=m=>{const _=m.target,v={x:m.clientX,y:m.clientY},w=(l==null?void 0:l.contains(_))||(u==null?void 0:u.contains(_)),x=!pY(v,s);w?f():x&&(f(),c())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,u,s,c,f]),h.jsx(qT,{...e,ref:i})}),[aY,lY]=vu(Hs,{isInside:!1}),cY=KG("TooltipContent"),qT=y.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...a}=e,l=la(hi,n),c=yu(n),{onClose:u}=l;return y.useEffect(()=>(document.addEventListener(zv,u),()=>document.removeEventListener(zv,u)),[u]),y.useEffect(()=>{if(l.trigger){const d=f=>{const p=f.target;p!=null&&p.contains(l.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,u]),h.jsx(uu,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:h.jsxs(TT,{"data-state":l.stateAttribute,...c,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[h.jsx(cY,{children:r}),h.jsx(aY,{scope:n,isInside:!0,children:h.jsx(eY,{id:l.contentId,role:"tooltip",children:o||r})})]})})});FT.displayName=hi;var BT="TooltipArrow",uY=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=yu(n);return lY(BT,n).isInside?null:h.jsx(AT,{...o,...r,ref:t})});uY.displayName=BT;function dY(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function fY(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function hY(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function pY(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const a=t[i],l=t[s],c=a.x,u=a.y,d=l.x,f=l.y;u>r!=f>r&&n<(d-c)*(r-u)/(f-u)+c&&(o=!o)}return o}function mY(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),gY(t)}function gY(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var vY=LT,yY=DT,xY=$T,wY=zT,HT=FT;const VT=vY,WT=yY,UT=xY,B0=y.forwardRef(({className:e,sideOffset:t=4,...n},r)=>h.jsx(wY,{children:h.jsx(HT,{ref:r,sideOffset:t,className:K("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",e),...n})}));B0.displayName=HT.displayName;const bY=(e,t,n="TB")=>{const r=new nc.graphlib.Graph;r.setDefaultEdgeLabel(()=>({})),r.setGraph({rankdir:n,nodesep:50,ranksep:80});const o=200,i=70;return e.forEach(a=>{r.setNode(a.id,{width:o,height:i})}),t.forEach(a=>{r.setEdge(a.source,a.target)}),nc.layout(r),{nodes:e.map(a=>{const l=r.node(a.id);return{...a,position:{x:l.x-o/2,y:l.y-i/2},targetPosition:n==="TB"?te.Top:te.Left,sourcePosition:n==="TB"?te.Bottom:te.Right}}),edges:t}};function _Y(e){const t=e.split("/"),n=t[t.length-1];return n.length>20?n.slice(0,17)+"...":n}function SY({data:e}){const t=K("px-4 py-3 rounded-md border-2 transition-all duration-200 cursor-pointer min-w-[160px] shadow-sm","hover:shadow-lg hover:scale-105",{"bg-emerald-950 border-emerald-500 text-emerald-300":e.isEntryPoint&&!e.isSelected,"bg-red-950 border-red-500 text-red-300":e.isHighCoupling&&!e.isEntryPoint&&!e.isSelected,"bg-blue-950 border-blue-400 text-blue-200 ring-2 ring-blue-400/50 shadow-lg shadow-blue-500/20":e.isSelected,"bg-neutral-900 border-neutral-600 text-neutral-200":!e.isEntryPoint&&!e.isHighCoupling&&!e.isSelected,"opacity-20":e.isFaded});return h.jsx(VT,{children:h.jsxs(WT,{children:[h.jsx(UT,{asChild:!0,children:h.jsxs("div",{className:t,onDoubleClick:()=>e.onDoubleClick(e.fullPath),children:[h.jsx(Cr,{type:"target",position:te.Top,className:"!bg-neutral-500 !w-3 !h-3 !border-2 !border-neutral-400"}),h.jsxs("div",{className:"flex flex-col items-center gap-2",children:[h.jsx("span",{className:"text-sm font-mono font-semibold text-center leading-tight",children:e.label}),h.jsxs("div",{className:"flex gap-1.5",children:[e.importerCount>0&&h.jsxs(dt,{variant:"secondary",className:"text-xs px-1.5 py-0.5 h-5 bg-neutral-800 text-neutral-300 border border-neutral-600",children:["↓",e.importerCount]}),e.importCount>0&&h.jsxs(dt,{variant:"secondary",className:"text-xs px-1.5 py-0.5 h-5 bg-neutral-800 text-neutral-300 border border-neutral-600",children:["↑",e.importCount]})]})]}),h.jsx(Cr,{type:"source",position:te.Bottom,className:"!bg-neutral-500 !w-3 !h-3 !border-2 !border-neutral-400"})]})}),h.jsx(B0,{side:"bottom",className:"max-w-xs",children:h.jsx("p",{className:"font-mono text-xs break-all",children:e.fullPath})})]})})}const GT=y.memo(SY);GT.displayName="FileNode";const EY={fileNode:GT};function CY({files:e,imports:t,onFileSelect:n,selectedFile:r}){const[o,i]=y.useState("TB"),[s,a]=y.useState(!1),[l,c]=y.useState(null),{importers:u,dependencies:d,connectedFiles:f}=y.useMemo(()=>{var $,z;const j=new Set(e.map(F=>F.path)),L=new Map,N=new Map,A=new Set;for(const F of e)L.set(F.path,new Set),N.set(F.path,new Set);for(const F of t)j.has(F.source)&&j.has(F.target)&&(($=L.get(F.target))==null||$.add(F.source),(z=N.get(F.source))==null||z.add(F.target),A.add(F.source),A.add(F.target));return{importers:L,dependencies:N,connectedFiles:A}},[e,t]),p=y.useMemo(()=>{const j=e.map(N=>{var A;return((A=d.get(N.path))==null?void 0:A.size)||0});j.sort((N,A)=>A-N);const L=j[Math.floor(j.length*.1)]||5;return Math.max(L,5)},[e,d]),g=y.useCallback(j=>{const L=new Set;L.add(j);const N=d.get(j);N&&N.forEach($=>L.add($));const A=u.get(j);return A&&A.forEach($=>L.add($)),L},[u,d]),m=y.useCallback(j=>{n==null||n(j)},[n]),{initialNodes:_,initialEdges:v}=y.useMemo(()=>{const j=l?g(l):null,L=s?e.filter(z=>f.has(z.path)):e,N=L.map(z=>{var B,G;const F=((B=d.get(z.path))==null?void 0:B.size)||0,V=((G=u.get(z.path))==null?void 0:G.size)||0,H=V===0&&F>0,X=F>=p,Q=r===z.path,q=j?!j.has(z.path):!1;return{id:z.path,type:"fileNode",position:{x:0,y:0},data:{label:_Y(z.path),fullPath:z.path,importCount:F,importerCount:V,isEntryPoint:H,isHighCoupling:X,isSelected:Q,isFaded:q,onDoubleClick:m}}}),A=new Set(L.map(z=>z.path)),$=t.filter(z=>A.has(z.source)&&A.has(z.target)).map((z,F)=>{const V=j&&j.has(z.source)&&j.has(z.target),H=j&&!V;return{id:`edge-${F}`,source:z.source,target:z.target,type:"smoothstep",markerEnd:{type:si.ArrowClosed,width:15,height:15,color:V?"hsl(var(--primary))":"hsl(var(--border))"},style:{stroke:V?"hsl(var(--primary))":"hsl(var(--border))",strokeWidth:V?2:1,opacity:H?.1:1},animated:V||!1}});return{initialNodes:N,initialEdges:$}},[e,t,u,d,f,p,r,l,s,g,m]),{nodes:w,edges:x}=y.useMemo(()=>bY(_,v,o),[_,v,o]),[b,S,E]=OP(w),[C,k,T]=LP(x);y.useEffect(()=>{S(w),k(x)},[w,x,S,k]);const M=y.useCallback((j,L)=>{c(N=>N===L.id?null:L.id)},[]),P=y.useCallback(()=>{c(null)},[]),I=y.useCallback(()=>{i(j=>j==="TB"?"LR":"TB")},[]),D=y.useCallback(()=>{a(j=>!j)},[]),R=e.length>500,O=s?[...f].length:e.length;return e.length===0?h.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:h.jsx("p",{children:"No file data available. Load a snapshot with enhanced metadata."})}):t.length===0?h.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:h.jsx("p",{children:"No import data available. This snapshot may not include dependency information."})}):h.jsxs("div",{className:"h-full w-full relative",children:[h.jsxs("div",{className:"absolute top-4 left-4 z-10 flex gap-2",children:[h.jsx(Dn,{variant:"secondary",size:"sm",onClick:I,className:"gap-1",children:o==="TB"?h.jsxs(h.Fragment,{children:[h.jsx(Ek,{className:"h-4 w-4"}),h.jsx("span",{className:"hidden sm:inline",children:"Vertical"})]}):h.jsxs(h.Fragment,{children:[h.jsx(Ck,{className:"h-4 w-4"}),h.jsx("span",{className:"hidden sm:inline",children:"Horizontal"})]})}),h.jsxs(Dn,{variant:s?"default":"secondary",size:"sm",onClick:D,className:"gap-1",children:[h.jsx(TD,{className:"h-4 w-4"}),h.jsx("span",{className:"hidden sm:inline",children:"Connected Only"})]}),l&&h.jsxs(Dn,{variant:"secondary",size:"sm",onClick:P,className:"gap-1",children:[h.jsx(HD,{className:"h-4 w-4"}),h.jsx("span",{className:"hidden sm:inline",children:"Clear Focus"})]})]}),R&&!s&&h.jsx("div",{className:"absolute top-4 right-4 z-10",children:h.jsxs("div",{className:"flex items-center gap-2 bg-warning/10 border border-warning/30 text-warning-foreground px-3 py-2 rounded-md text-sm",children:[h.jsx(Tk,{className:"h-4 w-4"}),h.jsxs("span",{children:["Large codebase (",e.length," files). Consider filtering by directory or enabling Connected Only."]})]})}),h.jsxs("div",{className:"absolute bottom-4 left-4 z-10 flex gap-4 bg-neutral-900/95 backdrop-blur-sm border border-neutral-700 rounded-md px-4 py-2.5 text-sm",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"w-4 h-4 rounded bg-emerald-950 border-2 border-emerald-500"}),h.jsx("span",{className:"text-neutral-300",children:"Entry Point"})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"w-4 h-4 rounded bg-red-950 border-2 border-red-500"}),h.jsx("span",{className:"text-neutral-300",children:"High Coupling"})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"w-4 h-4 rounded bg-neutral-900 border-2 border-neutral-600"}),h.jsx("span",{className:"text-neutral-300",children:"Normal"})]})]}),h.jsx("div",{className:"absolute bottom-4 right-4 z-10",children:h.jsxs(dt,{variant:"secondary",children:[O," / ",e.length," files"]})}),h.jsxs(IP,{nodes:b,edges:C,onNodesChange:E,onEdgesChange:T,onNodeClick:M,nodeTypes:EY,fitView:!0,fitViewOptions:{padding:.2},minZoom:.1,maxZoom:2,defaultEdgeOptions:{type:"smoothstep"},children:[h.jsx(FP,{showInteractive:!1}),h.jsx(BP,{nodeColor:j=>{const L=j.data;return L.isSelected?"#3b82f6":L.isEntryPoint?"#10b981":L.isHighCoupling?"#ef4444":"#525252"},maskColor:"rgba(0, 0, 0, 0.8)",className:"!bg-neutral-900/90 !border-neutral-700"}),h.jsx($P,{variant:hn.Dots,gap:16,size:1})]})]})}var NY=y.createContext(void 0);function YT(e){const t=y.useContext(NY);return e||t||"ltr"}function qv(e,[t,n]){return Math.min(n,Math.max(t,e))}function kY(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var H0="ScrollArea",[KT]=vo(H0),[RY,At]=KT(H0),XT=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:i=600,...s}=e,[a,l]=y.useState(null),[c,u]=y.useState(null),[d,f]=y.useState(null),[p,g]=y.useState(null),[m,_]=y.useState(null),[v,w]=y.useState(0),[x,b]=y.useState(0),[S,E]=y.useState(!1),[C,k]=y.useState(!1),T=ye(t,P=>l(P)),M=YT(o);return h.jsx(RY,{scope:n,type:r,dir:M,scrollHideDelay:i,scrollArea:a,viewport:c,onViewportChange:u,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:g,scrollbarXEnabled:S,onScrollbarXEnabledChange:E,scrollbarY:m,onScrollbarYChange:_,scrollbarYEnabled:C,onScrollbarYEnabledChange:k,onCornerWidthChange:w,onCornerHeightChange:b,children:h.jsx(pe.div,{dir:M,...s,ref:T,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":x+"px",...e.style}})})});XT.displayName=H0;var QT="ScrollAreaViewport",ZT=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...i}=e,s=At(QT,n),a=y.useRef(null),l=ye(t,a,s.onViewportChange);return h.jsxs(h.Fragment,{children:[h.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),h.jsx(pe.div,{"data-radix-scroll-area-viewport":"",...i,ref:l,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:h.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});ZT.displayName=QT;var wn="ScrollAreaScrollbar",V0=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=At(wn,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:s}=o,a=e.orientation==="horizontal";return y.useEffect(()=>(a?i(!0):s(!0),()=>{a?i(!1):s(!1)}),[a,i,s]),o.type==="hover"?h.jsx(PY,{...r,ref:t,forceMount:n}):o.type==="scroll"?h.jsx(jY,{...r,ref:t,forceMount:n}):o.type==="auto"?h.jsx(JT,{...r,ref:t,forceMount:n}):o.type==="always"?h.jsx(W0,{...r,ref:t}):null});V0.displayName=wn;var PY=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=At(wn,e.__scopeScrollArea),[i,s]=y.useState(!1);return y.useEffect(()=>{const a=o.scrollArea;let l=0;if(a){const c=()=>{window.clearTimeout(l),s(!0)},u=()=>{l=window.setTimeout(()=>s(!1),o.scrollHideDelay)};return a.addEventListener("pointerenter",c),a.addEventListener("pointerleave",u),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",c),a.removeEventListener("pointerleave",u)}}},[o.scrollArea,o.scrollHideDelay]),h.jsx(Qt,{present:n||i,children:h.jsx(JT,{"data-state":i?"visible":"hidden",...r,ref:t})})}),jY=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=At(wn,e.__scopeScrollArea),i=e.orientation==="horizontal",s=wu(()=>l("SCROLL_END"),100),[a,l]=kY("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return y.useEffect(()=>{if(a==="idle"){const c=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(c)}},[a,o.scrollHideDelay,l]),y.useEffect(()=>{const c=o.viewport,u=i?"scrollLeft":"scrollTop";if(c){let d=c[u];const f=()=>{const p=c[u];d!==p&&(l("SCROLL"),s()),d=p};return c.addEventListener("scroll",f),()=>c.removeEventListener("scroll",f)}},[o.viewport,i,l,s]),h.jsx(Qt,{present:n||a!=="hidden",children:h.jsx(W0,{"data-state":a==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:ce(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:ce(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),JT=y.forwardRef((e,t)=>{const n=At(wn,e.__scopeScrollArea),{forceMount:r,...o}=e,[i,s]=y.useState(!1),a=e.orientation==="horizontal",l=wu(()=>{if(n.viewport){const c=n.viewport.offsetWidth<n.viewport.scrollWidth,u=n.viewport.offsetHeight<n.viewport.scrollHeight;s(a?c:u)}},10);return pi(n.viewport,l),pi(n.content,l),h.jsx(Qt,{present:r||i,children:h.jsx(W0,{"data-state":i?"visible":"hidden",...o,ref:t})})}),W0=y.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=At(wn,e.__scopeScrollArea),i=y.useRef(null),s=y.useRef(0),[a,l]=y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=oA(a.viewport,a.content),u={...r,sizes:a,onSizesChange:l,hasThumb:c>0&&c<1,onThumbChange:f=>i.current=f,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:f=>s.current=f};function d(f,p){return LY(f,s.current,a,p)}return n==="horizontal"?h.jsx(TY,{...u,ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const f=o.viewport.scrollLeft,p=GC(f,a,o.dir);i.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:f=>{o.viewport&&(o.viewport.scrollLeft=f)},onDragScroll:f=>{o.viewport&&(o.viewport.scrollLeft=d(f,o.dir))}}):n==="vertical"?h.jsx(AY,{...u,ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const f=o.viewport.scrollTop,p=GC(f,a);i.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:f=>{o.viewport&&(o.viewport.scrollTop=f)},onDragScroll:f=>{o.viewport&&(o.viewport.scrollTop=d(f))}}):null}),TY=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=At(wn,e.__scopeScrollArea),[s,a]=y.useState(),l=y.useRef(null),c=ye(t,l,i.onScrollbarXChange);return y.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),h.jsx(tA,{"data-orientation":"horizontal",...o,ref:c,sizes:n,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":xu(n)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.x),onDragScroll:u=>e.onDragScroll(u.x),onWheelScroll:(u,d)=>{if(i.viewport){const f=i.viewport.scrollLeft+u.deltaX;e.onWheelScroll(f),sA(f,d)&&u.preventDefault()}},onResize:()=>{l.current&&i.viewport&&s&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:cc(s.paddingLeft),paddingEnd:cc(s.paddingRight)}})}})}),AY=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=At(wn,e.__scopeScrollArea),[s,a]=y.useState(),l=y.useRef(null),c=ye(t,l,i.onScrollbarYChange);return y.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),h.jsx(tA,{"data-orientation":"vertical",...o,ref:c,sizes:n,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":xu(n)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.y),onDragScroll:u=>e.onDragScroll(u.y),onWheelScroll:(u,d)=>{if(i.viewport){const f=i.viewport.scrollTop+u.deltaY;e.onWheelScroll(f),sA(f,d)&&u.preventDefault()}},onResize:()=>{l.current&&i.viewport&&s&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:cc(s.paddingTop),paddingEnd:cc(s.paddingBottom)}})}})}),[MY,eA]=KT(wn),tA=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:i,onThumbPointerUp:s,onThumbPointerDown:a,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:u,onResize:d,...f}=e,p=At(wn,n),[g,m]=y.useState(null),_=ye(t,T=>m(T)),v=y.useRef(null),w=y.useRef(""),x=p.viewport,b=r.content-r.viewport,S=it(u),E=it(l),C=wu(d,10);function k(T){if(v.current){const M=T.clientX-v.current.left,P=T.clientY-v.current.top;c({x:M,y:P})}}return y.useEffect(()=>{const T=M=>{const P=M.target;(g==null?void 0:g.contains(P))&&S(M,b)};return document.addEventListener("wheel",T,{passive:!1}),()=>document.removeEventListener("wheel",T,{passive:!1})},[x,g,b,S]),y.useEffect(E,[r,E]),pi(g,C),pi(p.content,C),h.jsx(MY,{scope:n,scrollbar:g,hasThumb:o,onThumbChange:it(i),onThumbPointerUp:it(s),onThumbPositionChange:E,onThumbPointerDown:it(a),children:h.jsx(pe.div,{...f,ref:_,style:{position:"absolute",...f.style},onPointerDown:ce(e.onPointerDown,T=>{T.button===0&&(T.target.setPointerCapture(T.pointerId),v.current=g.getBoundingClientRect(),w.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),k(T))}),onPointerMove:ce(e.onPointerMove,k),onPointerUp:ce(e.onPointerUp,T=>{const M=T.target;M.hasPointerCapture(T.pointerId)&&M.releasePointerCapture(T.pointerId),document.body.style.webkitUserSelect=w.current,p.viewport&&(p.viewport.style.scrollBehavior=""),v.current=null})})})}),lc="ScrollAreaThumb",nA=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=eA(lc,e.__scopeScrollArea);return h.jsx(Qt,{present:n||o.hasThumb,children:h.jsx(IY,{ref:t,...r})})}),IY=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,i=At(lc,n),s=eA(lc,n),{onThumbPositionChange:a}=s,l=ye(t,d=>s.onThumbChange(d)),c=y.useRef(void 0),u=wu(()=>{c.current&&(c.current(),c.current=void 0)},100);return y.useEffect(()=>{const d=i.viewport;if(d){const f=()=>{if(u(),!c.current){const p=DY(d,a);c.current=p,a()}};return a(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[i.viewport,u,a]),h.jsx(pe.div,{"data-state":s.hasThumb?"visible":"hidden",...o,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:ce(e.onPointerDownCapture,d=>{const p=d.target.getBoundingClientRect(),g=d.clientX-p.left,m=d.clientY-p.top;s.onThumbPointerDown({x:g,y:m})}),onPointerUp:ce(e.onPointerUp,s.onThumbPointerUp)})});nA.displayName=lc;var U0="ScrollAreaCorner",rA=y.forwardRef((e,t)=>{const n=At(U0,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?h.jsx(OY,{...e,ref:t}):null});rA.displayName=U0;var OY=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=At(U0,n),[i,s]=y.useState(0),[a,l]=y.useState(0),c=!!(i&&a);return pi(o.scrollbarX,()=>{var d;const u=((d=o.scrollbarX)==null?void 0:d.offsetHeight)||0;o.onCornerHeightChange(u),l(u)}),pi(o.scrollbarY,()=>{var d;const u=((d=o.scrollbarY)==null?void 0:d.offsetWidth)||0;o.onCornerWidthChange(u),s(u)}),c?h.jsx(pe.div,{...r,ref:t,style:{width:i,height:a,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function cc(e){return e?parseInt(e,10):0}function oA(e,t){const n=e/t;return isNaN(n)?0:n}function xu(e){const t=oA(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function LY(e,t,n,r="ltr"){const o=xu(n),i=o/2,s=t||i,a=o-s,l=n.scrollbar.paddingStart+s,c=n.scrollbar.size-n.scrollbar.paddingEnd-a,u=n.content-n.viewport,d=r==="ltr"?[0,u]:[u*-1,0];return iA([l,c],d)(e)}function GC(e,t,n="ltr"){const r=xu(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,s=t.content-t.viewport,a=i-r,l=n==="ltr"?[0,s]:[s*-1,0],c=qv(e,l);return iA([0,s],[0,a])(c)}function iA(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function sA(e,t){return e>0&&e<t}var DY=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},s=n.left!==i.left,a=n.top!==i.top;(s||a)&&t(),n=i,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function wu(e,t){const n=it(e),r=y.useRef(0);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),y.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function pi(e,t){const n=it(t);Ue(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}var aA=XT,$Y=ZT,zY=rA;const bu=y.forwardRef(({className:e,children:t,...n},r)=>h.jsxs(aA,{ref:r,className:K("relative overflow-hidden",e),...n,children:[h.jsx($Y,{className:"h-full w-full rounded-[inherit]",children:t}),h.jsx(lA,{}),h.jsx(zY,{})]}));bu.displayName=aA.displayName;const lA=y.forwardRef(({className:e,orientation:t="vertical",...n},r)=>h.jsx(V0,{ref:r,orientation:t,className:K("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:h.jsx(nA,{className:"relative flex-1 rounded-full bg-border"})}));lA.displayName=V0.displayName;function hg(e){const t=FY(e),n=qY(e);return{raw:e,metadata:t,fileContents:n}}function FY(e){if(!e.includes("METADATA: IMPORT GRAPH"))return null;const t=[],n=[],r=[],o={},i=/METADATA: IMPORT GRAPH\n={80}\n([\s\S]*?)(?=\n\n={80}\nMETADATA:|$)/g,s=[...e.matchAll(i)],a=s.length>0?s[s.length-1]:null;if(a){const g=a[1].trim();let m="";for(const _ of g.split(`
|
|
293
|
+
`)){const v=_.match(/^([^\s].+):$/);if(v){m=v[1];continue}const w=_.match(/^\s+(?:→|->)\s*(.+)$/);w&&m&&n.push({source:m,target:w[1]})}}const l=/METADATA: EXPORT INDEX\n={80}\n([\s\S]*?)(?=\n\n={80}\nMETADATA:|$)/g,c=[...e.matchAll(l)],u=c.length>0?c[c.length-1]:null;if(u){const g=u[1].trim().split(`
|
|
294
|
+
`);for(const m of g){const _=m.match(/^([^:]+):\s*(.+)$/);if(_){const v=_[1].trim(),x=_[2].trim().split(",").map(b=>b.trim());x.length>0&&(o[v]=x[0]),r.push({file:v,symbols:x})}}}const d=e.match(/METADATA: FILE EXPORTS\n={80}\n([\s\S]*?)(?=\n\n={80}\nMETADATA:|={80}\nFILE:|$)/);if(d){const g=d[1].trim().split(`
|
|
295
|
+
`);for(const m of g){const _=m.match(/^([^:]+):\d+\s*-\s*\w+\s+(\S+)/);if(_){const v=_[1].trim(),w=_[2].split(" ")[0];o[w]=v}}}const f=/^={80}\nFILE: \.\/(.+?)\n={80}/gm;let p;for(;(p=f.exec(e))!==null;){const g=p[1],m=g.split(".").pop()||"",_=p.index+p[0].length,v=e.indexOf(`
|
|
296
|
+
================================================================================
|
|
297
|
+
FILE:`,_),w=e.indexOf(`
|
|
298
|
+
METADATA:`,_),x=Math.min(v===-1?e.length:v,w===-1?e.length:w),S=e.slice(_,x).split(`
|
|
299
|
+
`).length-1;t.push({path:g,lines:S,extension:m})}return{files:t,imports:n,exports:r,symbolIndex:o}}function qY(e){const t=new Map,n="=".repeat(80),r=e.split(n);for(let o=0;o<r.length;o++){const s=r[o].match(/^\nFILE: \.\/(.+?)\n$/);if(s&&o+1<r.length){const a=s[1];let l=r[o+1];l.startsWith(`
|
|
300
|
+
`)&&(l=l.slice(1)),l.endsWith(`
|
|
301
|
+
`)&&(l=l.slice(0,-1)),t.set(a,l)}}if(t.size===0){const o=/^={80}\n\/\/ File: (.+?) \(\d+ lines\)\n={80}\n([\s\S]*?)(?=^={80}|$)/gm;let i;for(;(i=o.exec(e))!==null;)t.set(i[1],i[2].trim())}return t}function BY(e){var r;const t={name:"root",path:"",type:"directory",children:[]};for(const o of e){const i=o.path.split("/");let s=t;for(let a=0;a<i.length;a++){const l=i[a],c=a===i.length-1,u=i.slice(0,a+1).join("/");let d=(r=s.children)==null?void 0:r.find(f=>f.name===l);d||(d={name:l,path:u,type:c?"file":"directory",children:c?void 0:[],extension:c?o.extension:void 0,lines:c?o.lines:void 0},s.children=s.children||[],s.children.push(d)),s=d}}const n=o=>{o.children&&(o.children.sort((i,s)=>i.type!==s.type?i.type==="directory"?-1:1:i.name.localeCompare(s.name)),o.children.forEach(n))};return n(t),t}function HY(e,t,n={}){const{caseSensitive:r=!1,maxResults:o=100}=n,i=[],s=new RegExp(t,r?"g":"gi");for(const[a,l]of e.fileContents){const c=l.split(`
|
|
302
|
+
`);for(let u=0;u<c.length;u++){if(s.test(c[u])&&(i.push({file:a,line:u+1,content:c[u].trim()}),i.length>=o))return i;s.lastIndex=0}}return i}function cA(e){return{ts:"#3178c6",tsx:"#3178c6",js:"#f7df1e",jsx:"#61dafb",py:"#3776ab",rs:"#dea584",go:"#00add8",java:"#b07219",rb:"#cc342d",php:"#777bb4",md:"#083fa1",json:"#292929",css:"#264de4",scss:"#c6538c",html:"#e34c26"}[e]||"#8b949e"}function uA({node:e,depth:t,onFileSelect:n,selectedFile:r,expandedPaths:o,toggleExpanded:i}){const s=o.has(e.path),a=r===e.path,l=e.children&&e.children.length>0,c=()=>{e.type==="directory"?i(e.path):n&&n(e.path)},u=()=>{if(e.type==="directory")return s?h.jsx(zl,{className:"h-4 w-4 text-muted-foreground"}):h.jsx(PD,{className:"h-4 w-4 text-muted-foreground"});const d=e.extension?cA(e.extension):void 0;return h.jsx(ED,{className:"h-4 w-4",style:d?{color:d}:void 0})};return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:K("flex items-center gap-1 px-2 py-1 cursor-pointer rounded-sm transition-colors",a?"bg-accent text-accent-foreground":"hover:bg-muted/50"),style:{paddingLeft:`${t*12+8}px`},onClick:c,children:[e.type==="directory"&&h.jsx("span",{className:"text-muted-foreground",children:s?h.jsx(wi,{className:"h-3 w-3"}):h.jsx(tD,{className:"h-3 w-3"})}),e.type==="file"&&h.jsx("span",{className:"w-3"}),u(),h.jsx("span",{className:"truncate flex-1 text-sm",children:e.name}),e.lines!==void 0&&h.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:e.lines})]}),s&&l&&h.jsx("div",{children:e.children.map(d=>h.jsx(uA,{node:d,depth:t+1,onFileSelect:n,selectedFile:r,expandedPaths:o,toggleExpanded:i},d.path))})]})}function VY({tree:e,onFileSelect:t,selectedFile:n}){const[r,o]=y.useState(new Set([""])),i=y.useCallback(l=>{o(c=>{const u=new Set(c);return u.has(l)?u.delete(l):u.add(l),u})},[]),s=y.useCallback(()=>{const l=new Set,c=u=>{var d;u.type==="directory"&&(l.add(u.path),(d=u.children)==null||d.forEach(c))};c(e),o(l)},[e]),a=y.useCallback(()=>{o(new Set([""]))},[]);return!e.children||e.children.length===0?h.jsx("div",{className:"p-4 text-muted-foreground text-sm",children:"No files loaded. Drop a snapshot file or enter a path."}):h.jsxs("div",{className:"flex flex-col h-full",children:[h.jsxs("div",{className:"flex gap-1 p-2 border-b",children:[h.jsxs(Dn,{variant:"ghost",size:"sm",onClick:s,className:"h-7 px-2 text-xs",children:[h.jsx(OD,{className:"h-3 w-3 mr-1"}),"Expand"]}),h.jsxs(Dn,{variant:"ghost",size:"sm",onClick:a,className:"h-7 px-2 text-xs",children:[h.jsx(DD,{className:"h-3 w-3 mr-1"}),"Collapse"]})]}),h.jsx(bu,{className:"flex-1",children:h.jsx("div",{className:"py-1",children:e.children.map(l=>h.jsx(uA,{node:l,depth:0,onFileSelect:t,selectedFile:n,expandedPaths:r,toggleExpanded:i},l.path))})})]})}function YC({data:e,selectedFile:t,highlightLine:n}){const r=y.useMemo(()=>!e||!t?null:e.fileContents.get(t)||null,[e,t]),o=y.useMemo(()=>t&&t.split(".").pop()||"",[t]);if(!t)return h.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:h.jsxs("div",{className:"text-center",children:[h.jsx(pD,{className:"h-12 w-12 mx-auto mb-4 opacity-50"}),h.jsx("p",{children:"Select a file to view its contents"})]})});if(!r)return h.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:h.jsxs("div",{className:"text-center",children:[h.jsx("p",{children:"File content not found"}),h.jsx("p",{className:"text-sm mt-2 font-mono",children:t})]})});const i=r.split(`
|
|
303
|
+
`),s=cA(o);return h.jsxs("div",{className:"flex flex-col h-full",children:[h.jsxs("div",{className:"px-4 py-2 border-b flex items-center gap-2",children:[h.jsx("span",{className:"w-3 h-3 rounded-full",style:{backgroundColor:s}}),h.jsx("span",{className:"text-sm font-medium truncate flex-1",children:t}),h.jsxs(dt,{variant:"secondary",className:"text-xs",children:[i.length," lines"]})]}),h.jsx(bu,{className:"flex-1",children:h.jsx("table",{className:"w-full font-mono text-sm",children:h.jsx("tbody",{children:i.map((a,l)=>{const c=l+1,u=n===c;return h.jsxs("tr",{className:K("hover:bg-muted/50",u&&"bg-primary/10"),id:`line-${c}`,children:[h.jsx("td",{className:"px-4 py-0.5 text-right text-muted-foreground select-none w-12 border-r tabular-nums",children:c}),h.jsx("td",{className:"px-4 py-0.5 whitespace-pre overflow-x-auto",children:a||" "})]},c)})})})})]})}const _u=y.forwardRef(({className:e,type:t,...n},r)=>h.jsx("input",{type:t,className:K("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));_u.displayName="Input";function dA(e){const t=y.useRef({value:e,previous:e});return y.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Su="Checkbox",[WY]=vo(Su),[UY,G0]=WY(Su);function GY(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:i,form:s,name:a,onCheckedChange:l,required:c,value:u="on",internal_do_not_use_render:d}=e,[f,p]=Bs({prop:n,defaultProp:o??!1,onChange:l,caller:Su}),[g,m]=y.useState(null),[_,v]=y.useState(null),w=y.useRef(!1),x=g?!!s||!!g.closest("form"):!0,b={checked:f,disabled:i,setChecked:p,control:g,setControl:m,name:a,form:s,value:u,hasConsumerStoppedPropagationRef:w,required:c,defaultChecked:_r(o)?!1:o,isFormControl:x,bubbleInput:_,setBubbleInput:v};return h.jsx(UY,{scope:t,...b,children:YY(d)?d(b):r})}var fA="CheckboxTrigger",hA=y.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:i,value:s,disabled:a,checked:l,required:c,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:g}=G0(fA,e),m=ye(o,u),_=y.useRef(l);return y.useEffect(()=>{const v=i==null?void 0:i.form;if(v){const w=()=>d(_.current);return v.addEventListener("reset",w),()=>v.removeEventListener("reset",w)}},[i,d]),h.jsx(pe.button,{type:"button",role:"checkbox","aria-checked":_r(l)?"mixed":l,"aria-required":c,"data-state":yA(l),"data-disabled":a?"":void 0,disabled:a,value:s,...r,ref:m,onKeyDown:ce(t,v=>{v.key==="Enter"&&v.preventDefault()}),onClick:ce(n,v=>{d(w=>_r(w)?!0:!w),g&&p&&(f.current=v.isPropagationStopped(),f.current||v.stopPropagation())})})});hA.displayName=fA;var Y0=y.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:s,disabled:a,value:l,onCheckedChange:c,form:u,...d}=e;return h.jsx(GY,{__scopeCheckbox:n,checked:o,defaultChecked:i,disabled:a,required:s,onCheckedChange:c,name:r,form:u,value:l,internal_do_not_use_render:({isFormControl:f})=>h.jsxs(h.Fragment,{children:[h.jsx(hA,{...d,ref:t,__scopeCheckbox:n}),f&&h.jsx(vA,{__scopeCheckbox:n})]})})});Y0.displayName=Su;var pA="CheckboxIndicator",mA=y.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=G0(pA,n);return h.jsx(Qt,{present:r||_r(i.checked)||i.checked===!0,children:h.jsx(pe.span,{"data-state":yA(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});mA.displayName=pA;var gA="CheckboxBubbleInput",vA=y.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:i,defaultChecked:s,required:a,disabled:l,name:c,value:u,form:d,bubbleInput:f,setBubbleInput:p}=G0(gA,e),g=ye(n,p),m=dA(i),_=xT(r);y.useEffect(()=>{const w=f;if(!w)return;const x=window.HTMLInputElement.prototype,S=Object.getOwnPropertyDescriptor(x,"checked").set,E=!o.current;if(m!==i&&S){const C=new Event("click",{bubbles:E});w.indeterminate=_r(i),S.call(w,_r(i)?!1:i),w.dispatchEvent(C)}},[f,m,i,o]);const v=y.useRef(_r(i)?!1:i);return h.jsx(pe.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??v.current,required:a,disabled:l,name:c,value:u,form:d,...t,tabIndex:-1,ref:g,style:{...t.style,..._,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});vA.displayName=gA;function YY(e){return typeof e=="function"}function _r(e){return e==="indeterminate"}function yA(e){return _r(e)?"indeterminate":e?"checked":"unchecked"}const xA=y.forwardRef(({className:e,...t},n)=>h.jsx(Y0,{ref:n,className:K("grid place-content-center peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:h.jsx(mA,{className:K("grid place-content-center text-current"),children:h.jsx(Nk,{className:"h-4 w-4"})})}));xA.displayName=Y0.displayName;var KY=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],XY=KY.reduce((e,t)=>{const n=cu(`Primitive.${t}`),r=y.forwardRef((o,i)=>{const{asChild:s,...a}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),QY="Label",wA=y.forwardRef((e,t)=>h.jsx(XY.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));wA.displayName=QY;var bA=wA;const ZY=Ks("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),_A=y.forwardRef(({className:e,...t},n)=>h.jsx(bA,{ref:n,className:K(ZY(),e),...t}));_A.displayName=bA.displayName;function JY({data:e,onFileSelect:t}){const[n,r]=y.useState(""),[o,i]=y.useState(!1),s=y.useMemo(()=>{if(!e||!n.trim()||n.length<2)return[];try{return HY(e,n,{caseSensitive:o,maxResults:100})}catch{return[]}},[e,n,o]),a=y.useMemo(()=>{const c=new Map;for(const u of s){const d=c.get(u.file)||[];d.push(u),c.set(u.file,d)}return c},[s]),l=(c,u)=>{t&&t(c,u)};return h.jsxs("div",{className:"flex flex-col h-full",children:[h.jsxs("div",{className:"p-3 border-b space-y-3",children:[h.jsxs("div",{className:"relative",children:[h.jsx(jk,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground"}),h.jsx(_u,{type:"text",value:n,onChange:c=>r(c.target.value),placeholder:"Search in codebase... (regex supported)",className:"pl-9"})]}),h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{className:"flex items-center space-x-2",children:[h.jsx(xA,{id:"case-sensitive",checked:o,onCheckedChange:c=>i(c)}),h.jsx(_A,{htmlFor:"case-sensitive",className:"text-xs text-muted-foreground cursor-pointer",children:"Case sensitive"})]}),s.length>0&&h.jsxs(dt,{variant:"secondary",className:"text-xs",children:[s.length," in ",a.size," file",a.size!==1?"s":""]})]})]}),h.jsxs(bu,{className:"flex-1",children:[n.length>0&&n.length<2&&h.jsx("div",{className:"p-4 text-muted-foreground text-sm",children:"Type at least 2 characters to search"}),n.length>=2&&s.length===0&&h.jsxs("div",{className:"p-4 text-muted-foreground text-sm",children:['No results found for "',n,'"']}),Array.from(a.entries()).map(([c,u])=>h.jsxs("div",{className:"border-b",children:[h.jsxs("div",{className:"px-3 py-2 bg-muted/50 text-sm font-medium text-primary truncate flex items-center justify-between",children:[h.jsx("span",{className:"truncate",children:c}),h.jsx(dt,{variant:"outline",className:"text-xs ml-2 shrink-0",children:u.length})]}),h.jsx("div",{className:"divide-y divide-border/50",children:u.map((d,f)=>h.jsx("div",{className:"px-3 py-2 hover:bg-muted/50 cursor-pointer transition-colors",onClick:()=>l(c,d.line),children:h.jsxs("div",{className:"flex items-start gap-2",children:[h.jsx("span",{className:"text-xs text-muted-foreground font-mono min-w-[40px] tabular-nums",children:d.line}),h.jsx("code",{className:"text-sm break-all",children:eK(d.content,n,o)})]})},`${d.line}-${f}`))})]},c))]})]})}function eK(e,t,n){try{const r=new RegExp(`(${t})`,n?"g":"gi");return e.split(r).map((i,s)=>r.test(i)?(r.lastIndex=0,h.jsx("span",{className:"bg-chart-4/30 text-chart-4 px-0.5 rounded",children:i},s)):i)}catch{return e}}function tK(e,t=[]){let n=[];function r(i,s){const a=y.createContext(s);a.displayName=i+"Context";const l=n.length;n=[...n,s];const c=d=>{var v;const{scope:f,children:p,...g}=d,m=((v=f==null?void 0:f[e])==null?void 0:v[l])||a,_=y.useMemo(()=>g,Object.values(g));return h.jsx(m.Provider,{value:_,children:p})};c.displayName=i+"Provider";function u(d,f){var m;const p=((m=f==null?void 0:f[e])==null?void 0:m[l])||a,g=y.useContext(p);if(g)return g;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=n.map(s=>y.createContext(s));return function(a){const l=(a==null?void 0:a[e])||i;return y.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,nK(o,...t)]}function nK(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((a,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...a,...d}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}var rK=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],SA=rK.reduce((e,t)=>{const n=cu(`Primitive.${t}`),r=y.forwardRef((o,i)=>{const{asChild:s,...a}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),K0="Progress",X0=100,[oK]=tK(K0),[iK,sK]=oK(K0),EA=y.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:i=aK,...s}=e;(o||o===0)&&!KC(o)&&console.error(lK(`${o}`,"Progress"));const a=KC(o)?o:X0;r!==null&&!XC(r,a)&&console.error(cK(`${r}`,"Progress"));const l=XC(r,a)?r:null,c=uc(l)?i(l,a):void 0;return h.jsx(iK,{scope:n,value:l,max:a,children:h.jsx(SA.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":uc(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":kA(l,a),"data-value":l??void 0,"data-max":a,...s,ref:t})})});EA.displayName=K0;var CA="ProgressIndicator",NA=y.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=sK(CA,n);return h.jsx(SA.div,{"data-state":kA(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});NA.displayName=CA;function aK(e,t){return`${Math.round(e/t*100)}%`}function kA(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function uc(e){return typeof e=="number"}function KC(e){return uc(e)&&!isNaN(e)&&e>0}function XC(e,t){return uc(e)&&!isNaN(e)&&e<=t&&e>=0}function lK(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${X0}\`.`}function cK(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
304
|
+
- a positive number
|
|
305
|
+
- less than the value passed to \`max\` (or ${X0} if no \`max\` prop is set)
|
|
306
|
+
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
307
|
+
|
|
308
|
+
Defaulting to \`null\`.`}var RA=EA,uK=NA;const dK=y.forwardRef(({className:e,value:t,...n},r)=>h.jsx(RA,{ref:r,className:K("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...n,children:h.jsx(uK,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));dK.displayName=RA.displayName;function fK(e){if(!e)return"";const t=typeof e=="number"?new Date(e*1e3):new Date(e);if(isNaN(t.getTime()))return String(e);const r=Date.now()-t.getTime(),o=Math.floor(r/6e4);if(o<1)return"just now";if(o<60)return`${o}m ago`;const i=Math.floor(o/60);return i<24?`${i}h ago`:`${Math.floor(i/24)}d ago`}function hK({status:e}){switch(e){case"completed":return h.jsx(kk,{className:"h-4 w-4 text-emerald-400 shrink-0"});case"in_progress":return h.jsx(Y4,{className:"h-4 w-4 text-blue-400 shrink-0"});case"blocked":return h.jsx(iD,{className:"h-4 w-4 text-red-400 shrink-0"});default:return h.jsx(aD,{className:"h-4 w-4 text-neutral-500 shrink-0"})}}function pK(e){switch(e){case"completed":return"completed";case"in_progress":return"in progress";case"blocked":return"blocked";default:return"pending"}}function mK({decision:e}){const[t,n]=y.useState(!1);return h.jsxs("div",{className:"border border-neutral-700/60 rounded-md px-4 py-3 bg-neutral-900/60 cursor-pointer hover:border-neutral-600 transition-colors",onClick:()=>n(r=>!r),children:[h.jsxs("div",{className:"flex items-start justify-between gap-3",children:[h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[h.jsx("span",{className:"text-xs font-semibold text-violet-400 uppercase tracking-wide",children:e.topic}),e.timestamp&&h.jsx("span",{className:"text-xs text-neutral-500",children:fK(e.timestamp)})]}),h.jsx("p",{className:"text-sm text-neutral-200 font-medium leading-snug",children:e.decision})]}),e.rationale&&h.jsx("button",{className:"shrink-0 text-neutral-500 hover:text-neutral-300 mt-0.5",children:t?h.jsx(jc,{className:"h-4 w-4"}):h.jsx(wi,{className:"h-4 w-4"})})]}),t&&e.rationale&&h.jsx("p",{className:"mt-2 text-xs text-neutral-400 leading-relaxed border-t border-neutral-700/50 pt-2",children:e.rationale})]})}function _o({w:e="w-full"}){return h.jsx("div",{className:K("h-4 bg-neutral-800 rounded animate-pulse",e)})}function gK({currentProject:e,onFileSelect:t}){const[n,r]=y.useState(null),[o,i]=y.useState(!0),[s,a]=y.useState(null),l=y.useCallback(async()=>{i(!0),a(null);try{const b=e?`/api/checkpoint?project=${encodeURIComponent(e)}`:"/api/checkpoint",S=await fetch(b);if(!S.ok)r(null),a(null);else{const E=await S.json();r(E)}}catch{r(null)}finally{i(!1)}},[e]);if(y.useEffect(()=>{l()},[l]),o)return h.jsx("div",{className:"flex flex-1 flex-col gap-6 p-6 overflow-auto",children:h.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-5 gap-6",children:[h.jsxs(rt,{className:"lg:col-span-2 border-neutral-700/50 bg-neutral-900/40",children:[h.jsx(zt,{className:"pb-3",children:h.jsx(_o,{w:"w-40"})}),h.jsx(ot,{className:"space-y-3",children:[1,2,3].map(b=>h.jsxs("div",{className:"space-y-1.5",children:[h.jsx(_o,{}),h.jsx(_o,{w:"w-3/4"})]},b))})]}),h.jsxs(rt,{className:"lg:col-span-3 border-neutral-700/50 bg-neutral-900/40",children:[h.jsx(zt,{className:"pb-3",children:h.jsx(_o,{w:"w-32"})}),h.jsx(ot,{className:"space-y-3",children:[1,2].map(b=>h.jsxs("div",{className:"space-y-1.5",children:[h.jsx(_o,{w:"w-1/3"}),h.jsx(_o,{})]},b))})]})]})});if(!n&&!s)return h.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:h.jsx(rt,{className:"max-w-md w-full border-neutral-700/50 bg-neutral-900/40 text-center",children:h.jsxs(ot,{className:"pt-10 pb-8 flex flex-col items-center gap-4",children:[h.jsx("div",{className:"h-12 w-12 rounded-full bg-neutral-800 flex items-center justify-center",children:h.jsx(Rk,{className:"h-6 w-6 text-neutral-400"})}),h.jsxs("div",{children:[h.jsx("p",{className:"text-base font-medium text-neutral-200 mb-1",children:"No checkpoint found"}),h.jsxs("p",{className:"text-sm text-neutral-500",children:["Run"," ",h.jsx("code",{className:"bg-neutral-800 px-1.5 py-0.5 rounded text-xs font-mono text-neutral-300",children:"gaia_checkpoint"})," ","to save session state."]})]})]})})});const c=(n==null?void 0:n.tasks)??[],u=(n==null?void 0:n.decisions)??[],d=(n==null?void 0:n.changed_files)??{},f=d.created??[],p=d.modified??[],g=d.deleted??[],m=c.length,_=c.filter(b=>b.status==="completed").length,v=m>0?Math.round(_/m*100):0,w=["in_progress","blocked","pending","completed"],x=[...c].sort((b,S)=>w.indexOf(b.status)-w.indexOf(S.status));return h.jsxs("div",{className:"flex flex-1 flex-col gap-6 p-6 overflow-auto",children:[h.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-5 gap-6",children:[h.jsxs(rt,{className:"lg:col-span-2 border-neutral-700/50 bg-neutral-900/40",children:[h.jsxs(zt,{className:"pb-3",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs(Ln,{className:"text-sm font-semibold text-neutral-200",children:["Tasks —"," ",h.jsx("span",{className:"text-emerald-400",children:_}),h.jsxs("span",{className:"text-neutral-500",children:["/",m]})," complete"]}),h.jsxs(dt,{variant:"secondary",className:"text-xs",children:[v,"%"]})]}),m>0&&h.jsx("div",{className:"w-full h-1.5 bg-neutral-800 rounded-full mt-2 overflow-hidden",children:h.jsx("div",{className:"h-full bg-emerald-500 rounded-full transition-all duration-500",style:{width:`${v}%`}})})]}),h.jsx(ot,{className:"space-y-2 max-h-96 overflow-y-auto pr-2",children:x.length===0?h.jsx("p",{className:"text-xs text-neutral-500 py-4 text-center",children:"No tasks in checkpoint"}):x.map(b=>h.jsxs("div",{className:K("flex items-start gap-2.5 px-3 py-2.5 rounded-md border text-sm",{"border-emerald-800/40 bg-emerald-950/20":b.status==="completed","border-blue-800/40 bg-blue-950/20":b.status==="in_progress","border-red-800/40 bg-red-950/20":b.status==="blocked","border-neutral-700/40 bg-neutral-800/20":b.status==="pending"}),children:[h.jsx(hK,{status:b.status}),h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsx("p",{className:K("font-medium leading-snug",{"text-neutral-400 line-through":b.status==="completed","text-blue-200":b.status==="in_progress","text-red-300":b.status==="blocked","text-neutral-300":b.status==="pending"}),children:b.subject}),b.description&&h.jsx("p",{className:"text-xs text-neutral-500 mt-0.5 leading-relaxed",children:b.description}),h.jsx("span",{className:K("text-xs mt-1 inline-block",{"text-emerald-500":b.status==="completed","text-blue-400":b.status==="in_progress","text-red-400":b.status==="blocked","text-neutral-600":b.status==="pending"}),children:pK(b.status)})]})]},b.id))})]}),h.jsxs(rt,{className:"lg:col-span-3 border-neutral-700/50 bg-neutral-900/40",children:[h.jsx(zt,{className:"pb-3",children:h.jsxs(Ln,{className:"text-sm font-semibold text-neutral-200",children:["Decisions —"," ",h.jsx("span",{className:"text-violet-400",children:u.length})]})}),h.jsx(ot,{className:"space-y-2 max-h-96 overflow-y-auto pr-2",children:u.length===0?h.jsx("p",{className:"text-xs text-neutral-500 py-4 text-center",children:"No decisions recorded"}):u.map((b,S)=>h.jsx(mK,{decision:b},S))})]})]}),(f.length>0||p.length>0||g.length>0)&&h.jsxs(rt,{className:"border-neutral-700/50 bg-neutral-900/40",children:[h.jsx(zt,{className:"pb-3",children:h.jsx(Ln,{className:"text-sm font-semibold text-neutral-200",children:"Changed Files"})}),h.jsx(ot,{children:h.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-6",children:[h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[h.jsx(yD,{className:"h-3.5 w-3.5 text-emerald-400"}),h.jsxs("span",{className:"text-xs font-semibold text-emerald-400 uppercase tracking-wide",children:["Created (",f.length,")"]})]}),h.jsx("div",{className:"space-y-1",children:f.map(b=>h.jsx("button",{onClick:()=>t(b),className:"block w-full text-left text-xs font-mono text-emerald-300/80 hover:text-emerald-200 truncate px-2 py-1 rounded hover:bg-emerald-950/30 transition-colors",children:b},b))})]}),h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[h.jsx(wD,{className:"h-3.5 w-3.5 text-amber-400"}),h.jsxs("span",{className:"text-xs font-semibold text-amber-400 uppercase tracking-wide",children:["Modified (",p.length,")"]})]}),h.jsx("div",{className:"space-y-1",children:p.map(b=>h.jsx("button",{onClick:()=>t(b),className:"block w-full text-left text-xs font-mono text-amber-300/80 hover:text-amber-200 truncate px-2 py-1 rounded hover:bg-amber-950/30 transition-colors",children:b},b))})]}),h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[h.jsx(_D,{className:"h-3.5 w-3.5 text-red-400"}),h.jsxs("span",{className:"text-xs font-semibold text-red-400 uppercase tracking-wide",children:["Deleted (",g.length,")"]})]}),h.jsx("div",{className:"space-y-1",children:g.map(b=>h.jsx("button",{onClick:()=>t(b),className:"block w-full text-left text-xs font-mono text-red-300/60 hover:text-red-200 line-through truncate px-2 py-1 rounded hover:bg-red-950/20 transition-colors",children:b},b))})]})]})})]})]})}const mi={session:{bg:"bg-sky-950",border:"border-sky-500",text:"text-sky-200",badge:"bg-sky-900 text-sky-300 border-sky-700",mini:"#0ea5e9"},project:{bg:"bg-violet-950",border:"border-violet-500",text:"text-violet-200",badge:"bg-violet-900 text-violet-300 border-violet-700",mini:"#8b5cf6"},global:{bg:"bg-amber-950",border:"border-amber-500",text:"text-amber-200",badge:"bg-amber-900 text-amber-300 border-amber-700",mini:"#f59e0b"},note:{bg:"bg-emerald-950",border:"border-emerald-500",text:"text-emerald-200",badge:"bg-emerald-900 text-emerald-300 border-emerald-700",mini:"#10b981"},observation:{bg:"bg-rose-950",border:"border-rose-500",text:"text-rose-200",badge:"bg-rose-900 text-rose-300 border-rose-700",mini:"#f43f5e"}};function vK(e){switch(e){case"depends_on":return{stroke:"#6b7280",strokeWidth:2};case"extends":return{stroke:"#60a5fa",strokeDasharray:"6 3",strokeWidth:2};case"reverts":return{stroke:"#f87171",strokeWidth:2};case"related":return{stroke:"#4b5563",strokeDasharray:"2 4",strokeWidth:1.5};case"contradicts":return{stroke:"#fb923c",strokeWidth:2};default:return{stroke:"#6b7280",strokeWidth:1.5}}}function yK(e){switch(e){case"depends_on":return"#6b7280";case"extends":return"#60a5fa";case"reverts":return"#f87171";case"related":return"#4b5563";case"contradicts":return"#fb923c";default:return"#6b7280"}}const xK=(e,t,n="TB")=>{const r=new nc.graphlib.Graph;r.setDefaultEdgeLabel(()=>({})),r.setGraph({rankdir:n,nodesep:60,ranksep:100});const o=220,i=90;return e.forEach(a=>{r.setNode(a.id,{width:o,height:i})}),t.forEach(a=>{r.setEdge(a.source,a.target)}),nc.layout(r),{nodes:e.map(a=>{const l=r.node(a.id);return{...a,position:{x:l.x-o/2,y:l.y-i/2},targetPosition:n==="TB"?te.Top:te.Left,sourcePosition:n==="TB"?te.Bottom:te.Right}}),edges:t}};function wK(e,t){return e.length>t?e.slice(0,t)+"…":e}function bK({data:e}){const{memory:t,isSelected:n,isFaded:r,isHighlighted:o,onClick:i}=e,s=mi[t.tier]??mi.note,a=t.tags.slice(0,3),l=t.tags.length-3,c=K("px-3 py-2.5 rounded-md border-2 transition-all duration-150 cursor-pointer w-[220px] shadow-sm","hover:shadow-lg hover:scale-[1.02]",s.bg,s.border,s.text,{"ring-2 ring-white/30 shadow-lg scale-[1.03]":n,"opacity-20":r,"brightness-125":o&&!r});return h.jsxs("div",{className:c,onClick:()=>i(t),children:[h.jsx(Cr,{type:"target",position:te.Top,className:"!bg-neutral-600 !w-2.5 !h-2.5 !border !border-neutral-500"}),h.jsx("div",{className:"mb-1.5",children:h.jsx("span",{className:K("text-[10px] font-semibold uppercase tracking-wider px-1.5 py-0.5 rounded border",s.badge),children:t.tier})}),h.jsx("p",{className:K("text-xs leading-snug font-medium mb-1.5",s.text),children:wK(t.content,60)}),a.length>0&&h.jsxs("div",{className:"flex flex-wrap gap-1",children:[a.map(u=>h.jsx("span",{className:"text-[10px] bg-neutral-800/60 text-neutral-400 px-1 rounded",children:u},u)),l>0&&h.jsxs("span",{className:"text-[10px] text-neutral-500",children:["+",l," more"]})]}),h.jsx(Cr,{type:"source",position:te.Bottom,className:"!bg-neutral-600 !w-2.5 !h-2.5 !border !border-neutral-500"})]})}const PA=y.memo(bK);PA.displayName="MemoryNode";const _K={memoryNode:PA};function SK(e){return new Date(e*1e3).toLocaleString()}function EK({memory:e,onClose:t}){const n=mi[e.tier]??mi.note;return h.jsxs("div",{className:"absolute right-4 top-4 z-20 w-80 rounded-lg border border-neutral-700 bg-neutral-900/95 backdrop-blur-sm shadow-xl overflow-hidden",children:[h.jsxs("div",{className:K("flex items-center justify-between px-4 py-3 border-b border-neutral-700",n.bg),children:[h.jsx("span",{className:K("text-xs font-semibold uppercase tracking-wider",n.text),children:e.tier}),h.jsx("button",{onClick:t,className:"text-neutral-400 hover:text-neutral-200",children:h.jsx(Uy,{className:"h-4 w-4"})})]}),h.jsxs("div",{className:"p-4 space-y-3 max-h-96 overflow-y-auto",children:[h.jsx("p",{className:"text-sm text-neutral-200 leading-relaxed",children:e.content}),e.tags.length>0&&h.jsxs("div",{children:[h.jsx("p",{className:"text-xs text-neutral-500 mb-1 font-semibold uppercase tracking-wide",children:"Tags"}),h.jsx("div",{className:"flex flex-wrap gap-1",children:e.tags.map(r=>h.jsx("span",{className:"text-xs bg-neutral-800 text-neutral-300 px-2 py-0.5 rounded border border-neutral-700",children:r},r))})]}),e.related_files.length>0&&h.jsxs("div",{children:[h.jsx("p",{className:"text-xs text-neutral-500 mb-1 font-semibold uppercase tracking-wide",children:"Related Files"}),h.jsx("div",{className:"space-y-0.5",children:e.related_files.map(r=>h.jsx("p",{className:"text-xs font-mono text-neutral-400 truncate",children:r},r))})]}),h.jsxs("div",{className:"grid grid-cols-2 gap-3 pt-1 border-t border-neutral-800",children:[h.jsxs("div",{children:[h.jsx("p",{className:"text-[10px] text-neutral-600 uppercase tracking-wide",children:"Created"}),h.jsx("p",{className:"text-xs text-neutral-400",children:SK(e.created_at)})]}),e.access_count!==void 0&&h.jsxs("div",{children:[h.jsx("p",{className:"text-[10px] text-neutral-600 uppercase tracking-wide",children:"Access count"}),h.jsx("p",{className:"text-xs text-neutral-400",children:e.access_count})]})]})]})]})}const QC=["session","project","global","note","observation"];function CK({currentProject:e}){const[t,n]=y.useState("TB"),[r,o]=y.useState([]),[i,s]=y.useState([]),[a,l]=y.useState(!0),[c,u]=y.useState(null),[d,f]=y.useState(""),[p,g]=y.useState(new Set(QC));y.useEffect(()=>{(async()=>{l(!0);try{const R=await fetch("/api/memory-graph");if(R.ok){const O=await R.json();o(O.memories??[]),s(O.links??[])}}catch{}finally{l(!1)}})()},[]);const m=y.useCallback(D=>{u(R=>(R==null?void 0:R.id)===D.id?null:D)},[]),_=y.useCallback(D=>{g(R=>{const O=new Set(R);return O.has(D)?O.delete(D):O.add(D),O})},[]),v=d.toLowerCase(),w=y.useMemo(()=>r.filter(D=>p.has(D.tier)),[r,p]),{initialNodes:x,initialEdges:b}=y.useMemo(()=>{const D=new Set(w.map(j=>j.id)),R=w.map(j=>{const L=!v||j.content.toLowerCase().includes(v)||j.tags.some(N=>N.toLowerCase().includes(v));return{id:j.id,type:"memoryNode",position:{x:0,y:0},data:{memory:j,isSelected:(c==null?void 0:c.id)===j.id,isFaded:v?!L:!1,isHighlighted:v?L:!1,onClick:m}}}),O=i.filter(j=>D.has(j.from_memory_id)&&D.has(j.to_memory_id)).map((j,L)=>{const N=vK(j.link_type);return{id:`edge-${L}`,source:j.from_memory_id,target:j.to_memory_id,type:"smoothstep",markerEnd:{type:si.ArrowClosed,width:14,height:14,color:yK(j.link_type)},style:N,label:j.link_type,labelStyle:{fontSize:9,fill:"#6b7280"},labelBgStyle:{fill:"transparent"}}});return{initialNodes:R,initialEdges:O}},[w,i,c,m,v]),{nodes:S,edges:E}=y.useMemo(()=>xK(x,b,t),[x,b,t]),[C,k,T]=OP(S),[M,P,I]=LP(E);return y.useEffect(()=>{k(S),P(E)},[S,E,k,P]),a?h.jsx("div",{className:"flex flex-1 items-center justify-center",children:h.jsxs("div",{className:"flex flex-col items-center gap-3",children:[h.jsx(mv,{className:"h-8 w-8 text-violet-400 animate-pulse"}),h.jsx("p",{className:"text-sm text-neutral-400",children:"Loading memories…"})]})}):r.length===0?h.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:h.jsx(rt,{className:"max-w-md w-full border-neutral-700/50 bg-neutral-900/40 text-center",children:h.jsxs(ot,{className:"pt-10 pb-8 flex flex-col items-center gap-4",children:[h.jsx("div",{className:"h-12 w-12 rounded-full bg-neutral-800 flex items-center justify-center",children:h.jsx(mv,{className:"h-6 w-6 text-violet-400"})}),h.jsxs("div",{children:[h.jsx("p",{className:"text-base font-medium text-neutral-200 mb-1",children:"No memories found"}),h.jsxs("p",{className:"text-sm text-neutral-500 mb-2",children:["Use"," ",h.jsx("code",{className:"bg-neutral-800 px-1.5 py-0.5 rounded text-xs font-mono text-neutral-300",children:"gaia_save"})," ","to save memories."]}),h.jsxs("p",{className:"text-xs text-neutral-600",children:["DB location:"," ",h.jsx("code",{className:"font-mono",children:"~/.foundation/gaia-memory.db"})]})]})]})})}):h.jsxs("div",{className:"h-full w-full relative",children:[h.jsxs("div",{className:"absolute top-4 left-4 z-10 flex flex-col gap-2",children:[h.jsx("div",{className:"flex items-center gap-2",children:h.jsx(Dn,{variant:"secondary",size:"sm",onClick:()=>n(D=>D==="TB"?"LR":"TB"),className:"gap-1",children:t==="TB"?h.jsxs(h.Fragment,{children:[h.jsx(Ek,{className:"h-4 w-4"}),h.jsx("span",{className:"hidden sm:inline",children:"Vertical"})]}):h.jsxs(h.Fragment,{children:[h.jsx(Ck,{className:"h-4 w-4"}),h.jsx("span",{className:"hidden sm:inline",children:"Horizontal"})]})})}),h.jsx("div",{className:"w-52",children:h.jsx(_u,{value:d,onChange:D=>f(D.target.value),placeholder:"Search memories…",className:"h-8 text-xs bg-neutral-900/90 border-neutral-700"})}),h.jsxs("div",{className:"flex flex-col gap-1 bg-neutral-900/90 border border-neutral-700 rounded-md px-3 py-2",children:[h.jsx("p",{className:"text-[10px] text-neutral-500 uppercase tracking-wider mb-1",children:"Tiers"}),QC.map(D=>{const R=mi[D],O=p.has(D);return h.jsxs("button",{onClick:()=>_(D),className:K("flex items-center gap-2 text-xs px-2 py-1 rounded transition-colors text-left",O?"opacity-100":"opacity-40"),children:[h.jsx("div",{className:K("w-3 h-3 rounded-sm border",R.bg,R.border)}),h.jsx("span",{className:"text-neutral-300 capitalize",children:D}),h.jsx("span",{className:"ml-auto text-neutral-600 text-[10px]",children:r.filter(j=>j.tier===D).length})]},D)})]})]}),c&&h.jsx(EK,{memory:c,onClose:()=>u(null)}),h.jsx("div",{className:"absolute bottom-4 left-4 z-10 flex flex-wrap gap-3 bg-neutral-900/95 backdrop-blur-sm border border-neutral-700 rounded-md px-4 py-2 text-xs",children:[["depends_on","#6b7280","solid"],["extends","#60a5fa","dashed"],["reverts","#f87171","solid"],["related","#4b5563","dotted"],["contradicts","#fb923c","solid"]].map(([D,R,O])=>h.jsxs("div",{className:"flex items-center gap-1.5",children:[h.jsx("svg",{width:"20",height:"8",children:h.jsx("line",{x1:"0",y1:"4",x2:"20",y2:"4",stroke:R,strokeWidth:"1.5",strokeDasharray:O==="dashed"?"4 2":O==="dotted"?"1 3":void 0})}),h.jsx("span",{className:"text-neutral-400",children:D})]},D))}),h.jsx("div",{className:"absolute bottom-4 right-4 z-10",children:h.jsxs(dt,{variant:"secondary",children:[w.length," / ",r.length," memories"]})}),h.jsxs(IP,{nodes:C,edges:M,onNodesChange:T,onEdgesChange:I,nodeTypes:_K,fitView:!0,fitViewOptions:{padding:.2},minZoom:.05,maxZoom:2,defaultEdgeOptions:{type:"smoothstep"},children:[h.jsx(FP,{showInteractive:!1}),h.jsx(BP,{nodeColor:D=>{var O,j;const R=D.data;return((j=mi[(O=R.memory)==null?void 0:O.tier])==null?void 0:j.mini)??"#525252"},maskColor:"rgba(0,0,0,0.8)",className:"!bg-neutral-900/90 !border-neutral-700"}),h.jsx($P,{variant:hn.Dots,gap:16,size:1})]})]})}const pg=768;function NK(){const[e,t]=y.useState(void 0);return y.useEffect(()=>{const n=window.matchMedia(`(max-width: ${pg-1}px)`),r=()=>{t(window.innerWidth<pg)};return n.addEventListener("change",r),t(window.innerWidth<pg),()=>n.removeEventListener("change",r)},[]),!!e}var kK=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],RK=kK.reduce((e,t)=>{const n=cu(`Primitive.${t}`),r=y.forwardRef((o,i)=>{const{asChild:s,...a}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),PK="Separator",ZC="horizontal",jK=["horizontal","vertical"],jA=y.forwardRef((e,t)=>{const{decorative:n,orientation:r=ZC,...o}=e,i=TK(r)?r:ZC,a=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return h.jsx(RK.div,{"data-orientation":i,...a,...o,ref:t})});jA.displayName=PK;function TK(e){return jK.includes(e)}var TA=jA;const ps=y.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>h.jsx(TA,{ref:o,decorative:n,orientation:t,className:K("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));ps.displayName=TA.displayName;var mg="focusScope.autoFocusOnMount",gg="focusScope.autoFocusOnUnmount",JC={bubbles:!1,cancelable:!0},AK="FocusScope",Q0=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,l]=y.useState(null),c=it(o),u=it(i),d=y.useRef(null),f=ye(t,m=>l(m)),p=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let m=function(x){if(p.paused||!a)return;const b=x.target;a.contains(b)?d.current=b:or(d.current,{select:!0})},_=function(x){if(p.paused||!a)return;const b=x.relatedTarget;b!==null&&(a.contains(b)||or(d.current,{select:!0}))},v=function(x){if(document.activeElement===document.body)for(const S of x)S.removedNodes.length>0&&or(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",_);const w=new MutationObserver(v);return a&&w.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",_),w.disconnect()}}},[r,a,p.paused]),y.useEffect(()=>{if(a){tN.add(p);const m=document.activeElement;if(!a.contains(m)){const v=new CustomEvent(mg,JC);a.addEventListener(mg,c),a.dispatchEvent(v),v.defaultPrevented||(MK($K(AA(a)),{select:!0}),document.activeElement===m&&or(a))}return()=>{a.removeEventListener(mg,c),setTimeout(()=>{const v=new CustomEvent(gg,JC);a.addEventListener(gg,u),a.dispatchEvent(v),v.defaultPrevented||or(m??document.body,{select:!0}),a.removeEventListener(gg,u),tN.remove(p)},0)}}},[a,c,u,p]);const g=y.useCallback(m=>{if(!n&&!r||p.paused)return;const _=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,v=document.activeElement;if(_&&v){const w=m.currentTarget,[x,b]=IK(w);x&&b?!m.shiftKey&&v===b?(m.preventDefault(),n&&or(x,{select:!0})):m.shiftKey&&v===x&&(m.preventDefault(),n&&or(b,{select:!0})):v===w&&m.preventDefault()}},[n,r,p.paused]);return h.jsx(pe.div,{tabIndex:-1,...s,ref:f,onKeyDown:g})});Q0.displayName=AK;function MK(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(or(r,{select:t}),document.activeElement!==n)return}function IK(e){const t=AA(e),n=eN(t,e),r=eN(t.reverse(),e);return[n,r]}function AA(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function eN(e,t){for(const n of e)if(!OK(n,{upTo:t}))return n}function OK(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function LK(e){return e instanceof HTMLInputElement&&"select"in e}function or(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&LK(e)&&t&&e.select()}}var tN=DK();function DK(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=nN(e,t),e.unshift(t)},remove(t){var n;e=nN(e,t),(n=e[0])==null||n.resume()}}}function nN(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function $K(e){return e.filter(t=>t.tagName!=="A")}var vg=0;function MA(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??rN()),document.body.insertAdjacentElement("beforeend",e[1]??rN()),vg++,()=>{vg===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),vg--}},[])}function rN(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var an=function(){return an=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},an.apply(this,arguments)};function IA(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function zK(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var hl="right-scroll-bar-position",pl="width-before-scroll-bar",FK="with-scroll-bars-hidden",qK="--removed-body-scroll-bar-size";function yg(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function BK(e,t){var n=y.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var HK=typeof window<"u"?y.useLayoutEffect:y.useEffect,oN=new WeakMap;function VK(e,t){var n=BK(null,function(r){return e.forEach(function(o){return yg(o,r)})});return HK(function(){var r=oN.get(n);if(r){var o=new Set(r),i=new Set(e),s=n.current;o.forEach(function(a){i.has(a)||yg(a,null)}),i.forEach(function(a){o.has(a)||yg(a,s)})}oN.set(n,e)},[e]),n}function WK(e){return e}function UK(e,t){t===void 0&&(t=WK);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var s=t(i,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(i),s=n}var l=function(){var u=s;s=[],u.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){s.push(u),c()},filter:function(u){return s=s.filter(u),n}}}};return o}function GK(e){e===void 0&&(e={});var t=UK(null);return t.options=an({async:!0,ssr:!1},e),t}var OA=function(e){var t=e.sideCar,n=IA(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return y.createElement(r,an({},n))};OA.isSideCarExport=!0;function YK(e,t){return e.useMedium(t),OA}var LA=GK(),xg=function(){},Eu=y.forwardRef(function(e,t){var n=y.useRef(null),r=y.useState({onScrollCapture:xg,onWheelCapture:xg,onTouchMoveCapture:xg}),o=r[0],i=r[1],s=e.forwardProps,a=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,g=e.noIsolation,m=e.inert,_=e.allowPinchZoom,v=e.as,w=v===void 0?"div":v,x=e.gapMode,b=IA(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=f,E=VK([n,t]),C=an(an({},b),o);return y.createElement(y.Fragment,null,u&&y.createElement(S,{sideCar:LA,removeScrollBar:c,shards:d,noRelative:p,noIsolation:g,inert:m,setCallbacks:i,allowPinchZoom:!!_,lockRef:n,gapMode:x}),s?y.cloneElement(y.Children.only(a),an(an({},C),{ref:E})):y.createElement(w,an({},C,{className:l,ref:E}),a))});Eu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Eu.classNames={fullWidth:pl,zeroRight:hl};var KK=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function XK(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=KK();return t&&e.setAttribute("nonce",t),e}function QK(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ZK(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var JK=function(){var e=0,t=null;return{add:function(n){e==0&&(t=XK())&&(QK(t,n),ZK(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},eX=function(){var e=JK();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},DA=function(){var e=eX(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},tX={left:0,top:0,right:0,gap:0},wg=function(e){return parseInt(e||"",10)||0},nX=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[wg(n),wg(r),wg(o)]},rX=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return tX;var t=nX(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},oX=DA(),Ko="data-scroll-locked",iX=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
309
|
+
.`.concat(FK,` {
|
|
310
|
+
overflow: hidden `).concat(r,`;
|
|
311
|
+
padding-right: `).concat(a,"px ").concat(r,`;
|
|
312
|
+
}
|
|
313
|
+
body[`).concat(Ko,`] {
|
|
314
|
+
overflow: hidden `).concat(r,`;
|
|
315
|
+
overscroll-behavior: contain;
|
|
316
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
317
|
+
padding-left: `.concat(o,`px;
|
|
318
|
+
padding-top: `).concat(i,`px;
|
|
319
|
+
padding-right: `).concat(s,`px;
|
|
320
|
+
margin-left:0;
|
|
321
|
+
margin-top:0;
|
|
322
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
323
|
+
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.`).concat(hl,` {
|
|
327
|
+
right: `).concat(a,"px ").concat(r,`;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.`).concat(pl,` {
|
|
331
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.`).concat(hl," .").concat(hl,` {
|
|
335
|
+
right: 0 `).concat(r,`;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.`).concat(pl," .").concat(pl,` {
|
|
339
|
+
margin-right: 0 `).concat(r,`;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
body[`).concat(Ko,`] {
|
|
343
|
+
`).concat(qK,": ").concat(a,`px;
|
|
344
|
+
}
|
|
345
|
+
`)},iN=function(){var e=parseInt(document.body.getAttribute(Ko)||"0",10);return isFinite(e)?e:0},sX=function(){y.useEffect(function(){return document.body.setAttribute(Ko,(iN()+1).toString()),function(){var e=iN()-1;e<=0?document.body.removeAttribute(Ko):document.body.setAttribute(Ko,e.toString())}},[])},aX=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;sX();var i=y.useMemo(function(){return rX(o)},[o]);return y.createElement(oX,{styles:iX(i,!t,o,n?"":"!important")})},Bv=!1;if(typeof window<"u")try{var Wa=Object.defineProperty({},"passive",{get:function(){return Bv=!0,!0}});window.addEventListener("test",Wa,Wa),window.removeEventListener("test",Wa,Wa)}catch{Bv=!1}var So=Bv?{passive:!1}:!1,lX=function(e){return e.tagName==="TEXTAREA"},$A=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!lX(e)&&n[t]==="visible")},cX=function(e){return $A(e,"overflowY")},uX=function(e){return $A(e,"overflowX")},sN=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=zA(e,r);if(o){var i=FA(e,r),s=i[1],a=i[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},dX=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},fX=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},zA=function(e,t){return e==="v"?cX(t):uX(t)},FA=function(e,t){return e==="v"?dX(t):fX(t)},hX=function(e,t){return e==="h"&&t==="rtl"?-1:1},pX=function(e,t,n,r,o){var i=hX(e,window.getComputedStyle(t).direction),s=i*r,a=n.target,l=t.contains(a),c=!1,u=s>0,d=0,f=0;do{if(!a)break;var p=FA(e,a),g=p[0],m=p[1],_=p[2],v=m-_-i*g;(g||v)&&zA(e,a)&&(d+=v,f+=g);var w=a.parentNode;a=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(u&&Math.abs(d)<1||!u&&Math.abs(f)<1)&&(c=!0),c},Ua=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},aN=function(e){return[e.deltaX,e.deltaY]},lN=function(e){return e&&"current"in e?e.current:e},mX=function(e,t){return e[0]===t[0]&&e[1]===t[1]},gX=function(e){return`
|
|
346
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
347
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
348
|
+
`)},vX=0,Eo=[];function yX(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),o=y.useState(vX++)[0],i=y.useState(DA)[0],s=y.useRef(e);y.useEffect(function(){s.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=zK([e.lockRef.current],(e.shards||[]).map(lN),!0).filter(Boolean);return m.forEach(function(_){return _.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=y.useCallback(function(m,_){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!s.current.allowPinchZoom;var v=Ua(m),w=n.current,x="deltaX"in m?m.deltaX:w[0]-v[0],b="deltaY"in m?m.deltaY:w[1]-v[1],S,E=m.target,C=Math.abs(x)>Math.abs(b)?"h":"v";if("touches"in m&&C==="h"&&E.type==="range")return!1;var k=window.getSelection(),T=k&&k.anchorNode,M=T?T===E||T.contains(E):!1;if(M)return!1;var P=sN(C,E);if(!P)return!0;if(P?S=C:(S=C==="v"?"h":"v",P=sN(C,E)),!P)return!1;if(!r.current&&"changedTouches"in m&&(x||b)&&(r.current=S),!S)return!0;var I=r.current||S;return pX(I,_,m,I==="h"?x:b)},[]),l=y.useCallback(function(m){var _=m;if(!(!Eo.length||Eo[Eo.length-1]!==i)){var v="deltaY"in _?aN(_):Ua(_),w=t.current.filter(function(S){return S.name===_.type&&(S.target===_.target||_.target===S.shadowParent)&&mX(S.delta,v)})[0];if(w&&w.should){_.cancelable&&_.preventDefault();return}if(!w){var x=(s.current.shards||[]).map(lN).filter(Boolean).filter(function(S){return S.contains(_.target)}),b=x.length>0?a(_,x[0]):!s.current.noIsolation;b&&_.cancelable&&_.preventDefault()}}},[]),c=y.useCallback(function(m,_,v,w){var x={name:m,delta:_,target:v,should:w,shadowParent:xX(v)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(b){return b!==x})},1)},[]),u=y.useCallback(function(m){n.current=Ua(m),r.current=void 0},[]),d=y.useCallback(function(m){c(m.type,aN(m),m.target,a(m,e.lockRef.current))},[]),f=y.useCallback(function(m){c(m.type,Ua(m),m.target,a(m,e.lockRef.current))},[]);y.useEffect(function(){return Eo.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,So),document.addEventListener("touchmove",l,So),document.addEventListener("touchstart",u,So),function(){Eo=Eo.filter(function(m){return m!==i}),document.removeEventListener("wheel",l,So),document.removeEventListener("touchmove",l,So),document.removeEventListener("touchstart",u,So)}},[]);var p=e.removeScrollBar,g=e.inert;return y.createElement(y.Fragment,null,g?y.createElement(i,{styles:gX(o)}):null,p?y.createElement(aX,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function xX(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const wX=YK(LA,yX);var Z0=y.forwardRef(function(e,t){return y.createElement(Eu,an({},e,{ref:t,sideCar:wX}))});Z0.classNames=Eu.classNames;var bX=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Co=new WeakMap,Ga=new WeakMap,Ya={},bg=0,qA=function(e){return e&&(e.host||qA(e.parentNode))},_X=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=qA(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},SX=function(e,t,n,r){var o=_X(t,Array.isArray(e)?e:[e]);Ya[n]||(Ya[n]=new WeakMap);var i=Ya[n],s=[],a=new Set,l=new Set(o),c=function(d){!d||a.has(d)||(a.add(d),c(d.parentNode))};o.forEach(c);var u=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(a.has(f))u(f);else try{var p=f.getAttribute(r),g=p!==null&&p!=="false",m=(Co.get(f)||0)+1,_=(i.get(f)||0)+1;Co.set(f,m),i.set(f,_),s.push(f),m===1&&g&&Ga.set(f,!0),_===1&&f.setAttribute(n,"true"),g||f.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",f,v)}})};return u(t),a.clear(),bg++,function(){s.forEach(function(d){var f=Co.get(d)-1,p=i.get(d)-1;Co.set(d,f),i.set(d,p),f||(Ga.has(d)||d.removeAttribute(r),Ga.delete(d)),p||d.removeAttribute(n)}),bg--,bg||(Co=new WeakMap,Co=new WeakMap,Ga=new WeakMap,Ya={})}},BA=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=bX(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),SX(r,o,n,"aria-hidden")):function(){return null}};function EX(e){const t=CX(e),n=y.forwardRef((r,o)=>{const{children:i,...s}=r,a=y.Children.toArray(i),l=a.find(kX);if(l){const c=l.props.children,u=a.map(d=>d===l?y.Children.count(c)>1?y.Children.only(null):y.isValidElement(c)?c.props.children:null:d);return h.jsx(t,{...s,ref:o,children:y.isValidElement(c)?y.cloneElement(c,void 0,u):null})}return h.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function CX(e){const t=y.forwardRef((n,r)=>{const{children:o,...i}=n;if(y.isValidElement(o)){const s=PX(o),a=RX(i,o.props);return o.type!==y.Fragment&&(a.ref=r?Ri(r,s):s),y.cloneElement(o,a)}return y.Children.count(o)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var NX=Symbol("radix.slottable");function kX(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===NX}function RX(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function PX(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Cu="Dialog",[HA]=vo(Cu),[jX,Zt]=HA(Cu),VA=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,a=y.useRef(null),l=y.useRef(null),[c,u]=Bs({prop:r,defaultProp:o??!1,onChange:i,caller:Cu});return h.jsx(jX,{scope:t,triggerRef:a,contentRef:l,contentId:Kr(),titleId:Kr(),descriptionId:Kr(),open:c,onOpenChange:u,onOpenToggle:y.useCallback(()=>u(d=>!d),[u]),modal:s,children:n})};VA.displayName=Cu;var WA="DialogTrigger",TX=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Zt(WA,n),i=ye(t,o.triggerRef);return h.jsx(pe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":tx(o.open),...r,ref:i,onClick:ce(e.onClick,o.onOpenToggle)})});TX.displayName=WA;var J0="DialogPortal",[AX,UA]=HA(J0,{forceMount:void 0}),GA=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=Zt(J0,t);return h.jsx(AX,{scope:t,forceMount:n,children:y.Children.map(r,s=>h.jsx(Qt,{present:n||i.open,children:h.jsx(gu,{asChild:!0,container:o,children:s})}))})};GA.displayName=J0;var dc="DialogOverlay",YA=y.forwardRef((e,t)=>{const n=UA(dc,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Zt(dc,e.__scopeDialog);return i.modal?h.jsx(Qt,{present:r||i.open,children:h.jsx(IX,{...o,ref:t})}):null});YA.displayName=dc;var MX=EX("DialogOverlay.RemoveScroll"),IX=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Zt(dc,n);return h.jsx(Z0,{as:MX,allowPinchZoom:!0,shards:[o.contentRef],children:h.jsx(pe.div,{"data-state":tx(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),so="DialogContent",KA=y.forwardRef((e,t)=>{const n=UA(so,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Zt(so,e.__scopeDialog);return h.jsx(Qt,{present:r||i.open,children:i.modal?h.jsx(OX,{...o,ref:t}):h.jsx(LX,{...o,ref:t})})});KA.displayName=so;var OX=y.forwardRef((e,t)=>{const n=Zt(so,e.__scopeDialog),r=y.useRef(null),o=ye(t,n.contentRef,r);return y.useEffect(()=>{const i=r.current;if(i)return BA(i)},[]),h.jsx(XA,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ce(e.onCloseAutoFocus,i=>{var s;i.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:ce(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&i.preventDefault()}),onFocusOutside:ce(e.onFocusOutside,i=>i.preventDefault())})}),LX=y.forwardRef((e,t)=>{const n=Zt(so,e.__scopeDialog),r=y.useRef(!1),o=y.useRef(!1);return h.jsx(XA,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s,a;(s=e.onCloseAutoFocus)==null||s.call(e,i),i.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;((c=n.triggerRef.current)==null?void 0:c.contains(s))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),XA=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,a=Zt(so,n),l=y.useRef(null),c=ye(t,l);return MA(),h.jsxs(h.Fragment,{children:[h.jsx(Q0,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:h.jsx(uu,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":tx(a.open),...s,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),h.jsxs(h.Fragment,{children:[h.jsx(DX,{titleId:a.titleId}),h.jsx(zX,{contentRef:l,descriptionId:a.descriptionId})]})]})}),ex="DialogTitle",QA=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Zt(ex,n);return h.jsx(pe.h2,{id:o.titleId,...r,ref:t})});QA.displayName=ex;var ZA="DialogDescription",JA=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Zt(ZA,n);return h.jsx(pe.p,{id:o.descriptionId,...r,ref:t})});JA.displayName=ZA;var eM="DialogClose",tM=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Zt(eM,n);return h.jsx(pe.button,{type:"button",...r,ref:t,onClick:ce(e.onClick,()=>o.onOpenChange(!1))})});tM.displayName=eM;function tx(e){return e?"open":"closed"}var nM="DialogTitleWarning",[tZ,rM]=iU(nM,{contentName:so,titleName:ex,docsSlug:"dialog"}),DX=({titleId:e})=>{const t=rM(nM),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
349
|
+
|
|
350
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
351
|
+
|
|
352
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return y.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},$X="DialogDescriptionWarning",zX=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${rM($X).contentName}}.`;return y.useEffect(()=>{var i;const o=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},FX=VA,qX=GA,oM=YA,iM=KA,sM=QA,aM=JA,BX=tM;const HX=FX,VX=qX,lM=y.forwardRef(({className:e,...t},n)=>h.jsx(oM,{className:K("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));lM.displayName=oM.displayName;const WX=Ks("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),cM=y.forwardRef(({side:e="right",className:t,children:n,...r},o)=>h.jsxs(VX,{children:[h.jsx(lM,{}),h.jsxs(iM,{ref:o,className:K(WX({side:e}),t),...r,children:[h.jsxs(BX,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[h.jsx(Uy,{className:"h-4 w-4"}),h.jsx("span",{className:"sr-only",children:"Close"})]}),n]})]}));cM.displayName=iM.displayName;const uM=({className:e,...t})=>h.jsx("div",{className:K("flex flex-col space-y-2 text-center sm:text-left",e),...t});uM.displayName="SheetHeader";const dM=y.forwardRef(({className:e,...t},n)=>h.jsx(sM,{ref:n,className:K("text-lg font-semibold text-foreground",e),...t}));dM.displayName=sM.displayName;const fM=y.forwardRef(({className:e,...t},n)=>h.jsx(aM,{ref:n,className:K("text-sm text-muted-foreground",e),...t}));fM.displayName=aM.displayName;function cN({className:e,...t}){return h.jsx("div",{className:K("animate-pulse rounded-md bg-primary/10",e),...t})}const UX="sidebar_state",GX=60*60*24*7,YX="16rem",KX="18rem",XX="3rem",QX="b",hM=y.createContext(null);function Nu(){const e=y.useContext(hM);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const pM=y.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:o,children:i,...s},a)=>{const l=NK(),[c,u]=y.useState(!1),[d,f]=y.useState(e),p=t??d,g=y.useCallback(w=>{const x=typeof w=="function"?w(p):w;n?n(x):f(x),document.cookie=`${UX}=${x}; path=/; max-age=${GX}`},[n,p]),m=y.useCallback(()=>l?u(w=>!w):g(w=>!w),[l,g,u]);y.useEffect(()=>{const w=x=>{x.key===QX&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),m())};return window.addEventListener("keydown",w),()=>window.removeEventListener("keydown",w)},[m]);const _=p?"expanded":"collapsed",v=y.useMemo(()=>({state:_,open:p,setOpen:g,isMobile:l,openMobile:c,setOpenMobile:u,toggleSidebar:m}),[_,p,g,l,c,u,m]);return h.jsx(hM.Provider,{value:v,children:h.jsx(VT,{delayDuration:0,children:h.jsx("div",{style:{"--sidebar-width":YX,"--sidebar-width-icon":XX,...o},className:K("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",r),ref:a,...s,children:i})})})});pM.displayName="SidebarProvider";const mM=y.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:o,...i},s)=>{const{isMobile:a,state:l,openMobile:c,setOpenMobile:u}=Nu();return n==="none"?h.jsx("div",{className:K("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",r),ref:s,...i,children:o}):a?h.jsx(HX,{open:c,onOpenChange:u,...i,children:h.jsxs(cM,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":KX},side:e,children:[h.jsxs(uM,{className:"sr-only",children:[h.jsx(dM,{children:"Sidebar"}),h.jsx(fM,{children:"Displays the mobile sidebar."})]}),h.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):h.jsxs("div",{ref:s,className:"group peer hidden text-sidebar-foreground md:block","data-state":l,"data-collapsible":l==="collapsed"?n:"","data-variant":t,"data-side":e,children:[h.jsx("div",{className:K("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),h.jsx("div",{className:K("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...i,children:h.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:o})})]})});mM.displayName="Sidebar";const gM=y.forwardRef(({className:e,onClick:t,...n},r)=>{const{toggleSidebar:o}=Nu();return h.jsxs(Dn,{ref:r,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:K("h-7 w-7",e),onClick:i=>{t==null||t(i),o()},...n,children:[h.jsx(qD,{}),h.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});gM.displayName="SidebarTrigger";const vM=y.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:r}=Nu();return h.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:K("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});vM.displayName="SidebarRail";const yM=y.forwardRef(({className:e,...t},n)=>h.jsx("main",{ref:n,className:K("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));yM.displayName="SidebarInset";const ZX=y.forwardRef(({className:e,...t},n)=>h.jsx(_u,{ref:n,"data-sidebar":"input",className:K("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));ZX.displayName="SidebarInput";const xM=y.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,"data-sidebar":"header",className:K("flex flex-col gap-2 p-2",e),...t}));xM.displayName="SidebarHeader";const wM=y.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,"data-sidebar":"footer",className:K("flex flex-col gap-2 p-2",e),...t}));wM.displayName="SidebarFooter";const JX=y.forwardRef(({className:e,...t},n)=>h.jsx(ps,{ref:n,"data-sidebar":"separator",className:K("mx-2 w-auto bg-sidebar-border",e),...t}));JX.displayName="SidebarSeparator";const bM=y.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,"data-sidebar":"content",className:K("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));bM.displayName="SidebarContent";const Hv=y.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,"data-sidebar":"group",className:K("relative flex w-full min-w-0 flex-col p-2",e),...t}));Hv.displayName="SidebarGroup";const Vv=y.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const o=t?Pi:"div";return h.jsx(o,{ref:r,"data-sidebar":"group-label",className:K("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...n})});Vv.displayName="SidebarGroupLabel";const eQ=y.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const o=t?Pi:"button";return h.jsx(o,{ref:r,"data-sidebar":"group-action",className:K("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...n})});eQ.displayName="SidebarGroupAction";const Wv=y.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,"data-sidebar":"group-content",className:K("w-full text-sm",e),...t}));Wv.displayName="SidebarGroupContent";const _M=y.forwardRef(({className:e,...t},n)=>h.jsx("ul",{ref:n,"data-sidebar":"menu",className:K("flex w-full min-w-0 flex-col gap-1",e),...t}));_M.displayName="SidebarMenu";const SM=y.forwardRef(({className:e,...t},n)=>h.jsx("li",{ref:n,"data-sidebar":"menu-item",className:K("group/menu-item relative",e),...t}));SM.displayName="SidebarMenuItem";const tQ=Ks("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),EM=y.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:o,className:i,...s},a)=>{const l=e?Pi:"button",{isMobile:c,state:u}=Nu(),d=h.jsx(l,{ref:a,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:K(tQ({variant:n,size:r}),i),...s});return o?(typeof o=="string"&&(o={children:o}),h.jsxs(WT,{children:[h.jsx(UT,{asChild:!0,children:d}),h.jsx(B0,{side:"right",align:"center",hidden:u!=="collapsed"||c,...o})]})):d});EM.displayName="SidebarMenuButton";const nQ=y.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...r},o)=>{const i=t?Pi:"button";return h.jsx(i,{ref:o,"data-sidebar":"menu-action",className:K("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",n&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...r})});nQ.displayName="SidebarMenuAction";const rQ=y.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:K("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));rQ.displayName="SidebarMenuBadge";const oQ=y.forwardRef(({className:e,showIcon:t=!1,...n},r)=>{const o=y.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return h.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:K("flex h-8 items-center gap-2 rounded-md px-2",e),...n,children:[t&&h.jsx(cN,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),h.jsx(cN,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})});oQ.displayName="SidebarMenuSkeleton";const iQ=y.forwardRef(({className:e,...t},n)=>h.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:K("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));iQ.displayName="SidebarMenuSub";const sQ=y.forwardRef(({...e},t)=>h.jsx("li",{ref:t,...e}));sQ.displayName="SidebarMenuSubItem";const aQ=y.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:r,...o},i)=>{const s=e?Pi:"a";return h.jsx(s,{ref:i,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:K("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",r),...o})});aQ.displayName="SidebarMenuSubButton";const lQ=[{id:"analysis",label:"Analysis",icon:Q4,description:"Dependency analysis"},{id:"graph",label:"Graph",icon:Pk,description:"Dependency graph"},{id:"files",label:"Files",icon:kD,description:"File explorer"},{id:"search",label:"Search",icon:jk,description:"Search codebase"},{id:"session",label:"Session",icon:Rk,description:"Checkpoint & progress",gaiaOnly:!0},{id:"memory",label:"Memory",icon:mv,description:"Knowledge graph",gaiaOnly:!0}];function cQ({activeTab:e,onTabChange:t,hasSnapshot:n,fileCount:r=0,importCount:o=0,onClear:i,currentProjectPath:s}){return h.jsxs(mM,{collapsible:"icon",children:[h.jsx(xM,{className:"border-b border-sidebar-border",children:h.jsxs("div",{className:"flex items-center gap-2 px-2 py-1",children:[h.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-md bg-primary text-primary-foreground",children:h.jsxs("svg",{className:"h-4 w-4",viewBox:"0 0 24 24",fill:"currentColor",children:[h.jsx("circle",{cx:"12",cy:"12",r:"10",fillOpacity:"0.2"}),h.jsx("circle",{cx:"12",cy:"12",r:"3"}),h.jsx("path",{d:"M12 2v4M12 18v4M2 12h4M18 12h4",stroke:"currentColor",strokeWidth:"2",fill:"none"})]})}),h.jsxs("div",{className:"flex flex-col group-data-[collapsible=icon]:hidden",children:[h.jsx("span",{className:"text-sm font-semibold",children:"Foundation"}),h.jsx("span",{className:"text-xs text-muted-foreground",children:"Codebase Explorer"})]})]})}),h.jsxs(bM,{children:[h.jsxs(Hv,{children:[h.jsx(Vv,{children:"Navigation"}),h.jsx(Wv,{children:h.jsx(_M,{children:lQ.map(a=>h.jsx(SM,{children:h.jsxs(EM,{isActive:e===a.id,onClick:()=>t(a.id),tooltip:a.label,disabled:!n&&!a.gaiaOnly&&a.id!=="analysis",children:[h.jsx(a.icon,{className:"h-4 w-4"}),h.jsx("span",{children:a.label})]})},a.id))})})]}),n&&h.jsxs(Hv,{children:[h.jsx(Vv,{children:"Snapshot Info"}),h.jsx(Wv,{children:h.jsxs("div",{className:"px-2 space-y-2 group-data-[collapsible=icon]:hidden",children:[s&&h.jsxs("div",{className:"flex items-start gap-2 text-sm",children:[h.jsx(zl,{className:"h-4 w-4 text-muted-foreground shrink-0 mt-0.5"}),h.jsx("span",{className:"text-muted-foreground text-xs font-mono break-all leading-relaxed",children:s})]}),h.jsxs("div",{className:"flex items-center justify-between text-sm",children:[h.jsx("span",{className:"text-muted-foreground",children:"Files"}),h.jsx(dt,{variant:"secondary",children:r.toLocaleString()})]}),h.jsxs("div",{className:"flex items-center justify-between text-sm",children:[h.jsx("span",{className:"text-muted-foreground",children:"Imports"}),h.jsx(dt,{variant:"secondary",children:o.toLocaleString()})]})]})})]})]}),h.jsx(wM,{className:"border-t border-sidebar-border",children:n?h.jsxs(Dn,{variant:"ghost",size:"sm",className:"w-full justify-start text-destructive hover:text-destructive hover:bg-destructive/10 group-data-[collapsible=icon]:justify-center",onClick:i,children:[h.jsx(Uy,{className:"h-4 w-4 mr-2 group-data-[collapsible=icon]:mr-0"}),h.jsx("span",{className:"group-data-[collapsible=icon]:hidden",children:"Clear Snapshot"})]}):h.jsx("div",{className:"px-2 py-1 text-xs text-muted-foreground group-data-[collapsible=icon]:hidden",children:h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(gv,{className:"h-3 w-3"}),h.jsx("span",{children:"Drop snapshot to load"})]})})}),h.jsx(vM,{})]})}function uN(e){const t=uQ(e),n=y.forwardRef((r,o)=>{const{children:i,...s}=r,a=y.Children.toArray(i),l=a.find(fQ);if(l){const c=l.props.children,u=a.map(d=>d===l?y.Children.count(c)>1?y.Children.only(null):y.isValidElement(c)?c.props.children:null:d);return h.jsx(t,{...s,ref:o,children:y.isValidElement(c)?y.cloneElement(c,void 0,u):null})}return h.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function uQ(e){const t=y.forwardRef((n,r)=>{const{children:o,...i}=n;if(y.isValidElement(o)){const s=pQ(o),a=hQ(i,o.props);return o.type!==y.Fragment&&(a.ref=r?Ri(r,s):s),y.cloneElement(o,a)}return y.Children.count(o)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var dQ=Symbol("radix.slottable");function fQ(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===dQ}function hQ(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function pQ(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function mQ(e){const t=e+"CollectionProvider",[n,r]=vo(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=m=>{const{scope:_,children:v}=m,w=rn.useRef(null),x=rn.useRef(new Map).current;return h.jsx(o,{scope:_,itemMap:x,collectionRef:w,children:v})};s.displayName=t;const a=e+"CollectionSlot",l=uN(a),c=rn.forwardRef((m,_)=>{const{scope:v,children:w}=m,x=i(a,v),b=ye(_,x.collectionRef);return h.jsx(l,{ref:b,children:w})});c.displayName=a;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=uN(u),p=rn.forwardRef((m,_)=>{const{scope:v,children:w,...x}=m,b=rn.useRef(null),S=ye(_,b),E=i(u,v);return rn.useEffect(()=>(E.itemMap.set(b,{ref:b,...x}),()=>void E.itemMap.delete(b))),h.jsx(f,{[d]:"",ref:S,children:w})});p.displayName=u;function g(m){const _=i(e+"CollectionConsumer",m);return rn.useCallback(()=>{const w=_.collectionRef.current;if(!w)return[];const x=Array.from(w.querySelectorAll(`[${d}]`));return Array.from(_.itemMap.values()).sort((E,C)=>x.indexOf(E.ref.current)-x.indexOf(C.ref.current))},[_.collectionRef,_.itemMap])}return[{Provider:s,Slot:c,ItemSlot:p},g,r]}function gQ(e){const t=vQ(e),n=y.forwardRef((r,o)=>{const{children:i,...s}=r,a=y.Children.toArray(i),l=a.find(xQ);if(l){const c=l.props.children,u=a.map(d=>d===l?y.Children.count(c)>1?y.Children.only(null):y.isValidElement(c)?c.props.children:null:d);return h.jsx(t,{...s,ref:o,children:y.isValidElement(c)?y.cloneElement(c,void 0,u):null})}return h.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function vQ(e){const t=y.forwardRef((n,r)=>{const{children:o,...i}=n;if(y.isValidElement(o)){const s=bQ(o),a=wQ(i,o.props);return o.type!==y.Fragment&&(a.ref=r?Ri(r,s):s),y.cloneElement(o,a)}return y.Children.count(o)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var yQ=Symbol("radix.slottable");function xQ(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===yQ}function wQ(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function bQ(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var _Q=[" ","Enter","ArrowUp","ArrowDown"],SQ=[" ","Enter"],ao="Select",[ku,Ru,EQ]=mQ(ao),[Ai]=vo(ao,[EQ,mu]),Pu=mu(),[CQ,Mr]=Ai(ao),[NQ,kQ]=Ai(ao),CM=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:s,defaultValue:a,onValueChange:l,dir:c,name:u,autoComplete:d,disabled:f,required:p,form:g}=e,m=Pu(t),[_,v]=y.useState(null),[w,x]=y.useState(null),[b,S]=y.useState(!1),E=YT(c),[C,k]=Bs({prop:r,defaultProp:o??!1,onChange:i,caller:ao}),[T,M]=Bs({prop:s,defaultProp:a,onChange:l,caller:ao}),P=y.useRef(null),I=_?g||!!_.closest("form"):!0,[D,R]=y.useState(new Set),O=Array.from(D).map(j=>j.props.value).join(";");return h.jsx(PT,{...m,children:h.jsxs(CQ,{required:p,scope:t,trigger:_,onTriggerChange:v,valueNode:w,onValueNodeChange:x,valueNodeHasChildren:b,onValueNodeHasChildrenChange:S,contentId:Kr(),value:T,onValueChange:M,open:C,onOpenChange:k,dir:E,triggerPointerDownPosRef:P,disabled:f,children:[h.jsx(ku.Provider,{scope:t,children:h.jsx(NQ,{scope:e.__scopeSelect,onNativeOptionAdd:y.useCallback(j=>{R(L=>new Set(L).add(j))},[]),onNativeOptionRemove:y.useCallback(j=>{R(L=>{const N=new Set(L);return N.delete(j),N})},[]),children:n})}),I?h.jsxs(KM,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:d,value:T,onChange:j=>M(j.target.value),disabled:f,form:g,children:[T===void 0?h.jsx("option",{value:""}):null,Array.from(D)]},O):null]})})};CM.displayName=ao;var NM="SelectTrigger",kM=y.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=Pu(n),s=Mr(NM,n),a=s.disabled||r,l=ye(t,s.onTriggerChange),c=Ru(n),u=y.useRef("touch"),[d,f,p]=QM(m=>{const _=c().filter(x=>!x.disabled),v=_.find(x=>x.value===s.value),w=ZM(_,m,v);w!==void 0&&s.onValueChange(w.value)}),g=m=>{a||(s.onOpenChange(!0),p()),m&&(s.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return h.jsx(jT,{asChild:!0,...i,children:h.jsx(pe.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":XM(s.value)?"":void 0,...o,ref:l,onClick:ce(o.onClick,m=>{m.currentTarget.focus(),u.current!=="mouse"&&g(m)}),onPointerDown:ce(o.onPointerDown,m=>{u.current=m.pointerType;const _=m.target;_.hasPointerCapture(m.pointerId)&&_.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(g(m),m.preventDefault())}),onKeyDown:ce(o.onKeyDown,m=>{const _=d.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&f(m.key),!(_&&m.key===" ")&&_Q.includes(m.key)&&(g(),m.preventDefault())})})})});kM.displayName=NM;var RM="SelectValue",PM=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:s="",...a}=e,l=Mr(RM,n),{onValueNodeHasChildrenChange:c}=l,u=i!==void 0,d=ye(t,l.onValueNodeChange);return Ue(()=>{c(u)},[c,u]),h.jsx(pe.span,{...a,ref:d,style:{pointerEvents:"none"},children:XM(l.value)?h.jsx(h.Fragment,{children:s}):i})});PM.displayName=RM;var RQ="SelectIcon",jM=y.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return h.jsx(pe.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});jM.displayName=RQ;var PQ="SelectPortal",TM=e=>h.jsx(gu,{asChild:!0,...e});TM.displayName=PQ;var lo="SelectContent",AM=y.forwardRef((e,t)=>{const n=Mr(lo,e.__scopeSelect),[r,o]=y.useState();if(Ue(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?xi.createPortal(h.jsx(MM,{scope:e.__scopeSelect,children:h.jsx(ku.Slot,{scope:e.__scopeSelect,children:h.jsx("div",{children:e.children})})}),i):null}return h.jsx(IM,{...e,ref:t})});AM.displayName=lo;var It=10,[MM,Ir]=Ai(lo),jQ="SelectContentImpl",TQ=gQ("SelectContent.RemoveScroll"),IM=y.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:s,side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:g,hideWhenDetached:m,avoidCollisions:_,...v}=e,w=Mr(lo,n),[x,b]=y.useState(null),[S,E]=y.useState(null),C=ye(t,q=>b(q)),[k,T]=y.useState(null),[M,P]=y.useState(null),I=Ru(n),[D,R]=y.useState(!1),O=y.useRef(!1);y.useEffect(()=>{if(x)return BA(x)},[x]),MA();const j=y.useCallback(q=>{const[B,...G]=I().map(U=>U.ref.current),[Z]=G.slice(-1),Y=document.activeElement;for(const U of q)if(U===Y||(U==null||U.scrollIntoView({block:"nearest"}),U===B&&S&&(S.scrollTop=0),U===Z&&S&&(S.scrollTop=S.scrollHeight),U==null||U.focus(),document.activeElement!==Y))return},[I,S]),L=y.useCallback(()=>j([k,x]),[j,k,x]);y.useEffect(()=>{D&&L()},[D,L]);const{onOpenChange:N,triggerPointerDownPosRef:A}=w;y.useEffect(()=>{if(x){let q={x:0,y:0};const B=Z=>{var Y,U;q={x:Math.abs(Math.round(Z.pageX)-(((Y=A.current)==null?void 0:Y.x)??0)),y:Math.abs(Math.round(Z.pageY)-(((U=A.current)==null?void 0:U.y)??0))}},G=Z=>{q.x<=10&&q.y<=10?Z.preventDefault():x.contains(Z.target)||N(!1),document.removeEventListener("pointermove",B),A.current=null};return A.current!==null&&(document.addEventListener("pointermove",B),document.addEventListener("pointerup",G,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",B),document.removeEventListener("pointerup",G,{capture:!0})}}},[x,N,A]),y.useEffect(()=>{const q=()=>N(!1);return window.addEventListener("blur",q),window.addEventListener("resize",q),()=>{window.removeEventListener("blur",q),window.removeEventListener("resize",q)}},[N]);const[$,z]=QM(q=>{const B=I().filter(Y=>!Y.disabled),G=B.find(Y=>Y.ref.current===document.activeElement),Z=ZM(B,q,G);Z&&setTimeout(()=>Z.ref.current.focus())}),F=y.useCallback((q,B,G)=>{const Z=!O.current&&!G;(w.value!==void 0&&w.value===B||Z)&&(T(q),Z&&(O.current=!0))},[w.value]),V=y.useCallback(()=>x==null?void 0:x.focus(),[x]),H=y.useCallback((q,B,G)=>{const Z=!O.current&&!G;(w.value!==void 0&&w.value===B||Z)&&P(q)},[w.value]),X=r==="popper"?Uv:OM,Q=X===Uv?{side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:g,hideWhenDetached:m,avoidCollisions:_}:{};return h.jsx(MM,{scope:n,content:x,viewport:S,onViewportChange:E,itemRefCallback:F,selectedItem:k,onItemLeave:V,itemTextRefCallback:H,focusSelectedItem:L,selectedItemText:M,position:r,isPositioned:D,searchRef:$,children:h.jsx(Z0,{as:TQ,allowPinchZoom:!0,children:h.jsx(Q0,{asChild:!0,trapped:w.open,onMountAutoFocus:q=>{q.preventDefault()},onUnmountAutoFocus:ce(o,q=>{var B;(B=w.trigger)==null||B.focus({preventScroll:!0}),q.preventDefault()}),children:h.jsx(uu,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:q=>q.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:h.jsx(X,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:q=>q.preventDefault(),...v,...Q,onPlaced:()=>R(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:ce(v.onKeyDown,q=>{const B=q.ctrlKey||q.altKey||q.metaKey;if(q.key==="Tab"&&q.preventDefault(),!B&&q.key.length===1&&z(q.key),["ArrowUp","ArrowDown","Home","End"].includes(q.key)){let Z=I().filter(Y=>!Y.disabled).map(Y=>Y.ref.current);if(["ArrowUp","End"].includes(q.key)&&(Z=Z.slice().reverse()),["ArrowUp","ArrowDown"].includes(q.key)){const Y=q.target,U=Z.indexOf(Y);Z=Z.slice(U+1)}setTimeout(()=>j(Z)),q.preventDefault()}})})})})})})});IM.displayName=jQ;var AQ="SelectItemAlignedPosition",OM=y.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=Mr(lo,n),s=Ir(lo,n),[a,l]=y.useState(null),[c,u]=y.useState(null),d=ye(t,C=>u(C)),f=Ru(n),p=y.useRef(!1),g=y.useRef(!0),{viewport:m,selectedItem:_,selectedItemText:v,focusSelectedItem:w}=s,x=y.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&c&&m&&_&&v){const C=i.trigger.getBoundingClientRect(),k=c.getBoundingClientRect(),T=i.valueNode.getBoundingClientRect(),M=v.getBoundingClientRect();if(i.dir!=="rtl"){const Y=M.left-k.left,U=T.left-Y,J=C.left-U,se=C.width+J,oe=Math.max(se,k.width),le=window.innerWidth-It,ie=qv(U,[It,Math.max(It,le-oe)]);a.style.minWidth=se+"px",a.style.left=ie+"px"}else{const Y=k.right-M.right,U=window.innerWidth-T.right-Y,J=window.innerWidth-C.right-U,se=C.width+J,oe=Math.max(se,k.width),le=window.innerWidth-It,ie=qv(U,[It,Math.max(It,le-oe)]);a.style.minWidth=se+"px",a.style.right=ie+"px"}const P=f(),I=window.innerHeight-It*2,D=m.scrollHeight,R=window.getComputedStyle(c),O=parseInt(R.borderTopWidth,10),j=parseInt(R.paddingTop,10),L=parseInt(R.borderBottomWidth,10),N=parseInt(R.paddingBottom,10),A=O+j+D+N+L,$=Math.min(_.offsetHeight*5,A),z=window.getComputedStyle(m),F=parseInt(z.paddingTop,10),V=parseInt(z.paddingBottom,10),H=C.top+C.height/2-It,X=I-H,Q=_.offsetHeight/2,q=_.offsetTop+Q,B=O+j+q,G=A-B;if(B<=H){const Y=P.length>0&&_===P[P.length-1].ref.current;a.style.bottom="0px";const U=c.clientHeight-m.offsetTop-m.offsetHeight,J=Math.max(X,Q+(Y?V:0)+U+L),se=B+J;a.style.height=se+"px"}else{const Y=P.length>0&&_===P[0].ref.current;a.style.top="0px";const J=Math.max(H,O+m.offsetTop+(Y?F:0)+Q)+G;a.style.height=J+"px",m.scrollTop=B-H+m.offsetTop}a.style.margin=`${It}px 0`,a.style.minHeight=$+"px",a.style.maxHeight=I+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[f,i.trigger,i.valueNode,a,c,m,_,v,i.dir,r]);Ue(()=>x(),[x]);const[b,S]=y.useState();Ue(()=>{c&&S(window.getComputedStyle(c).zIndex)},[c]);const E=y.useCallback(C=>{C&&g.current===!0&&(x(),w==null||w(),g.current=!1)},[x,w]);return h.jsx(IQ,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:p,onScrollButtonChange:E,children:h.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:b},children:h.jsx(pe.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});OM.displayName=AQ;var MQ="SelectPopperPosition",Uv=y.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=It,...i}=e,s=Pu(n);return h.jsx(TT,{...s,...i,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Uv.displayName=MQ;var[IQ,nx]=Ai(lo,{}),Gv="SelectViewport",LM=y.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,i=Ir(Gv,n),s=nx(Gv,n),a=ye(t,i.onViewportChange),l=y.useRef(0);return h.jsxs(h.Fragment,{children:[h.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),h.jsx(ku.Slot,{scope:n,children:h.jsx(pe.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:ce(o.onScroll,c=>{const u=c.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=s;if(f!=null&&f.current&&d){const p=Math.abs(l.current-u.scrollTop);if(p>0){const g=window.innerHeight-It*2,m=parseFloat(d.style.minHeight),_=parseFloat(d.style.height),v=Math.max(m,_);if(v<g){const w=v+p,x=Math.min(g,w),b=w-x;d.style.height=x+"px",d.style.bottom==="0px"&&(u.scrollTop=b>0?b:0,d.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});LM.displayName=Gv;var DM="SelectGroup",[OQ,LQ]=Ai(DM),DQ=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Kr();return h.jsx(OQ,{scope:n,id:o,children:h.jsx(pe.div,{role:"group","aria-labelledby":o,...r,ref:t})})});DQ.displayName=DM;var $M="SelectLabel",zM=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=LQ($M,n);return h.jsx(pe.div,{id:o.id,...r,ref:t})});zM.displayName=$M;var fc="SelectItem",[$Q,FM]=Ai(fc),qM=y.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...s}=e,a=Mr(fc,n),l=Ir(fc,n),c=a.value===r,[u,d]=y.useState(i??""),[f,p]=y.useState(!1),g=ye(t,w=>{var x;return(x=l.itemRefCallback)==null?void 0:x.call(l,w,r,o)}),m=Kr(),_=y.useRef("touch"),v=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return h.jsx($Q,{scope:n,value:r,disabled:o,textId:m,isSelected:c,onItemTextChange:y.useCallback(w=>{d(x=>x||((w==null?void 0:w.textContent)??"").trim())},[]),children:h.jsx(ku.ItemSlot,{scope:n,value:r,disabled:o,textValue:u,children:h.jsx(pe.div,{role:"option","aria-labelledby":m,"data-highlighted":f?"":void 0,"aria-selected":c&&f,"data-state":c?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:g,onFocus:ce(s.onFocus,()=>p(!0)),onBlur:ce(s.onBlur,()=>p(!1)),onClick:ce(s.onClick,()=>{_.current!=="mouse"&&v()}),onPointerUp:ce(s.onPointerUp,()=>{_.current==="mouse"&&v()}),onPointerDown:ce(s.onPointerDown,w=>{_.current=w.pointerType}),onPointerMove:ce(s.onPointerMove,w=>{var x;_.current=w.pointerType,o?(x=l.onItemLeave)==null||x.call(l):_.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ce(s.onPointerLeave,w=>{var x;w.currentTarget===document.activeElement&&((x=l.onItemLeave)==null||x.call(l))}),onKeyDown:ce(s.onKeyDown,w=>{var b;((b=l.searchRef)==null?void 0:b.current)!==""&&w.key===" "||(SQ.includes(w.key)&&v(),w.key===" "&&w.preventDefault())})})})})});qM.displayName=fc;var ns="SelectItemText",BM=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,s=Mr(ns,n),a=Ir(ns,n),l=FM(ns,n),c=kQ(ns,n),[u,d]=y.useState(null),f=ye(t,v=>d(v),l.onItemTextChange,v=>{var w;return(w=a.itemTextRefCallback)==null?void 0:w.call(a,v,l.value,l.disabled)}),p=u==null?void 0:u.textContent,g=y.useMemo(()=>h.jsx("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:_}=c;return Ue(()=>(m(g),()=>_(g)),[m,_,g]),h.jsxs(h.Fragment,{children:[h.jsx(pe.span,{id:l.textId,...i,ref:f}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?xi.createPortal(i.children,s.valueNode):null]})});BM.displayName=ns;var HM="SelectItemIndicator",VM=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return FM(HM,n).isSelected?h.jsx(pe.span,{"aria-hidden":!0,...r,ref:t}):null});VM.displayName=HM;var Yv="SelectScrollUpButton",WM=y.forwardRef((e,t)=>{const n=Ir(Yv,e.__scopeSelect),r=nx(Yv,e.__scopeSelect),[o,i]=y.useState(!1),s=ye(t,r.onScrollButtonChange);return Ue(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollTop>0;i(c)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?h.jsx(GM,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});WM.displayName=Yv;var Kv="SelectScrollDownButton",UM=y.forwardRef((e,t)=>{const n=Ir(Kv,e.__scopeSelect),r=nx(Kv,e.__scopeSelect),[o,i]=y.useState(!1),s=ye(t,r.onScrollButtonChange);return Ue(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollHeight-l.clientHeight,u=Math.ceil(l.scrollTop)<c;i(u)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?h.jsx(GM,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});UM.displayName=Kv;var GM=y.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=Ir("SelectScrollButton",n),s=y.useRef(null),a=Ru(n),l=y.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return y.useEffect(()=>()=>l(),[l]),Ue(()=>{var u;const c=a().find(d=>d.ref.current===document.activeElement);(u=c==null?void 0:c.ref.current)==null||u.scrollIntoView({block:"nearest"})},[a]),h.jsx(pe.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:ce(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:ce(o.onPointerMove,()=>{var c;(c=i.onItemLeave)==null||c.call(i),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:ce(o.onPointerLeave,()=>{l()})})}),zQ="SelectSeparator",YM=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return h.jsx(pe.div,{"aria-hidden":!0,...r,ref:t})});YM.displayName=zQ;var Xv="SelectArrow",FQ=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Pu(n),i=Mr(Xv,n),s=Ir(Xv,n);return i.open&&s.position==="popper"?h.jsx(AT,{...o,...r,ref:t}):null});FQ.displayName=Xv;var qQ="SelectBubbleInput",KM=y.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=y.useRef(null),i=ye(r,o),s=dA(t);return y.useEffect(()=>{const a=o.current;if(!a)return;const l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&u){const d=new Event("change",{bubbles:!0});u.call(a,t),a.dispatchEvent(d)}},[s,t]),h.jsx(pe.select,{...n,style:{...MT,...n.style},ref:i,defaultValue:t})});KM.displayName=qQ;function XM(e){return e===""||e===void 0}function QM(e){const t=it(e),n=y.useRef(""),r=y.useRef(0),o=y.useCallback(s=>{const a=n.current+s;t(a),function l(c){n.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),i=y.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function ZM(e,t,n){const o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let s=BQ(e,Math.max(i,0));o.length===1&&(s=s.filter(c=>c!==n));const l=s.find(c=>c.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function BQ(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var HQ=CM,JM=kM,VQ=PM,WQ=jM,UQ=TM,eI=AM,GQ=LM,tI=zM,nI=qM,YQ=BM,KQ=VM,rI=WM,oI=UM,iI=YM;const XQ=HQ,QQ=VQ,sI=y.forwardRef(({className:e,children:t,...n},r)=>h.jsxs(JM,{ref:r,className:K("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,h.jsx(WQ,{asChild:!0,children:h.jsx(wi,{className:"h-4 w-4 opacity-50"})})]}));sI.displayName=JM.displayName;const aI=y.forwardRef(({className:e,...t},n)=>h.jsx(rI,{ref:n,className:K("flex cursor-default items-center justify-center py-1",e),...t,children:h.jsx(jc,{className:"h-4 w-4"})}));aI.displayName=rI.displayName;const lI=y.forwardRef(({className:e,...t},n)=>h.jsx(oI,{ref:n,className:K("flex cursor-default items-center justify-center py-1",e),...t,children:h.jsx(wi,{className:"h-4 w-4"})}));lI.displayName=oI.displayName;const cI=y.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>h.jsx(UQ,{children:h.jsxs(eI,{ref:o,className:K("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[h.jsx(aI,{}),h.jsx(GQ,{className:K("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),h.jsx(lI,{})]})}));cI.displayName=eI.displayName;const ZQ=y.forwardRef(({className:e,...t},n)=>h.jsx(tI,{ref:n,className:K("px-2 py-1.5 text-sm font-semibold",e),...t}));ZQ.displayName=tI.displayName;const uI=y.forwardRef(({className:e,children:t,...n},r)=>h.jsxs(nI,{ref:r,className:K("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[h.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:h.jsx(KQ,{children:h.jsx(Nk,{className:"h-4 w-4"})})}),h.jsx(YQ,{children:t})]}));uI.displayName=nI.displayName;const JQ=y.forwardRef(({className:e,...t},n)=>h.jsx(iI,{ref:n,className:K("-mx-1 my-1 h-px bg-muted",e),...t}));JQ.displayName=iI.displayName;function eZ(){var C,k,T;const[e,t]=y.useState(null),[n,r]=y.useState(null),[o,i]=y.useState(),[s,a]=y.useState("analysis"),[l,c]=y.useState(!1),[u,d]=y.useState([]),[f,p]=y.useState(""),[g,m]=y.useState(!1);y.useEffect(()=>{(async()=>{try{const P=await fetch("/api/projects");if(P.ok){const I=await P.json();d(I),I.length>0&&!f&&p(I[0].path)}}catch{console.log("Projects API not available"),d([])}})()},[]),y.useEffect(()=>{const M=async()=>{m(!0);try{const P=f?`/api/snapshot?project=${encodeURIComponent(f)}`:"/api/snapshot",I=await fetch(P);if(I.ok){const D=await I.text(),R=hg(D);t(R),console.log("Loaded snapshot"+(f?` for ${f}`:""))}else t(null)}catch{console.log("No snapshot found"),t(null)}finally{m(!1)}};(f||u.length===0)&&M()},[f,u.length]);const _=y.useMemo(()=>{var M;return(M=e==null?void 0:e.metadata)!=null&&M.files?BY(e.metadata.files):{name:"root",path:"",type:"directory",children:[]}},[e]),v=y.useCallback(M=>{M.preventDefault(),c(!1);const P=M.dataTransfer.files[0];if(P){const I=new FileReader;I.onload=D=>{var O;const R=(O=D.target)==null?void 0:O.result;if(R){const j=hg(R);t(j),r(null),i(void 0)}},I.readAsText(P)}},[]),w=y.useCallback(M=>{M.preventDefault(),c(!0)},[]),x=y.useCallback(()=>{c(!1)},[]),b=y.useCallback((M,P)=>{r(M),i(P),P&&setTimeout(()=>{const I=document.getElementById(`line-${P}`);I==null||I.scrollIntoView({behavior:"smooth",block:"center"})},100)},[]),S=y.useCallback(M=>{if(M.trim()){const P=hg(M);t(P),r(null),i(void 0)}},[]),E=y.useCallback(()=>{t(null),r(null),i(void 0)},[]);return h.jsx(pM,{defaultOpen:!0,children:h.jsxs("div",{className:"flex min-h-screen w-full",onDrop:v,onDragOver:w,onDragLeave:x,children:[h.jsx(cQ,{activeTab:s,onTabChange:a,hasSnapshot:!!e,fileCount:((C=e==null?void 0:e.metadata)==null?void 0:C.files.length)||0,importCount:((k=e==null?void 0:e.metadata)==null?void 0:k.imports.length)||0,onClear:E,currentProjectPath:f}),h.jsxs(yM,{children:[h.jsxs("header",{className:"flex h-14 shrink-0 items-center gap-2 border-b px-4",children:[h.jsx(gM,{className:"-ml-1"}),h.jsx(ps,{orientation:"vertical",className:"mr-2 h-4"}),u.length>0&&h.jsxs(XQ,{value:f,onValueChange:p,children:[h.jsx(sI,{className:"w-[200px] h-8",children:h.jsx(QQ,{placeholder:"Select project",children:f&&h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(zl,{className:"h-4 w-4 text-muted-foreground shrink-0"}),h.jsx("span",{className:"truncate",children:((T=u.find(M=>M.path===f))==null?void 0:T.name)||"Select project"})]})})}),h.jsx(cI,{children:u.map(M=>h.jsx(uI,{value:M.path,children:h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(zl,{className:"h-4 w-4 text-muted-foreground shrink-0"}),h.jsx("span",{children:M.name})]})},M.path))})]}),h.jsx(ps,{orientation:"vertical",className:"mx-2 h-4"}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("h1",{className:"text-sm font-medium",children:s.charAt(0).toUpperCase()+s.slice(1)}),g&&h.jsx("span",{className:"text-xs text-muted-foreground animate-pulse",children:"Loading..."})]})]}),l&&h.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/80 backdrop-blur-sm",children:h.jsx(rt,{className:"border-dashed border-2 border-primary",children:h.jsxs(ot,{className:"flex flex-col items-center gap-2 p-8",children:[h.jsx(gv,{className:"h-8 w-8 text-primary"}),h.jsx("p",{className:"text-lg font-medium",children:"Drop snapshot file here"})]})})}),s==="session"||s==="memory"?h.jsx("div",{className:"flex flex-1 overflow-hidden",children:s==="session"?h.jsx(gK,{currentProject:f,onFileSelect:M=>{b(M),a("files")}}):h.jsx(CK,{currentProject:f})}):e?h.jsx("div",{className:"flex flex-1 overflow-hidden",children:s==="analysis"?h.jsx("div",{className:"flex-1 overflow-hidden",children:e.metadata?h.jsx(z3,{files:e.metadata.files,imports:e.metadata.imports,onFileSelect:b,selectedFile:n,metadata:e.metadata}):h.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:h.jsx("p",{children:"No dependency data available (basic snapshot)"})})}):s==="graph"?h.jsx("div",{className:"flex-1 overflow-hidden",children:e.metadata?h.jsx(CY,{files:e.metadata.files,imports:e.metadata.imports,onFileSelect:b,selectedFile:n}):h.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:h.jsx("p",{children:"No dependency data available (basic snapshot)"})})}):s==="files"?h.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[h.jsx("div",{className:"w-72 border-r overflow-hidden flex flex-col",children:h.jsx(VY,{tree:_,onFileSelect:b,selectedFile:n})}),h.jsx("div",{className:"flex-1 overflow-hidden",children:h.jsx(YC,{data:e,selectedFile:n,highlightLine:o})})]}):h.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[h.jsx("div",{className:"w-80 border-r overflow-hidden flex flex-col",children:h.jsx(JY,{data:e,onFileSelect:b})}),h.jsx("div",{className:"flex-1 overflow-hidden",children:h.jsx(YC,{data:e,selectedFile:n,highlightLine:o})})]})}):h.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:h.jsxs(rt,{className:"max-w-2xl w-full",children:[h.jsxs(zt,{className:"text-center",children:[h.jsx(Ln,{className:"text-2xl",children:"Load a Snapshot"}),h.jsx(Uk,{children:"Drag and drop a snapshot file, or paste content below"})]}),h.jsxs(ot,{className:"space-y-6",children:[h.jsxs("div",{className:"border-2 border-dashed border-border rounded-lg p-8 text-center hover:border-primary/50 transition-colors cursor-pointer",children:[h.jsx("input",{type:"file",id:"file-input",className:"hidden",accept:".txt",onChange:M=>{var I;const P=(I=M.target.files)==null?void 0:I[0];if(P){const D=new FileReader;D.onload=R=>{var j;const O=(j=R.target)==null?void 0:j.result;O&&S(O)},D.readAsText(P)}}}),h.jsxs("label",{htmlFor:"file-input",className:"cursor-pointer",children:[h.jsx(gv,{className:"h-12 w-12 mx-auto text-muted-foreground mb-4"}),h.jsx("p",{className:"text-muted-foreground",children:"Click to browse or drag & drop"})]})]}),h.jsxs("div",{className:"relative",children:[h.jsx("div",{className:"absolute inset-0 flex items-center",children:h.jsx(ps,{})}),h.jsx("div",{className:"relative flex justify-center",children:h.jsx("span",{className:"bg-card px-2 text-xs text-muted-foreground uppercase",children:"or"})})]}),h.jsx("textarea",{placeholder:"Paste snapshot content here...",className:"w-full h-48 p-4 bg-muted/50 border border-input rounded-lg text-sm font-mono resize-none focus:outline-none focus:ring-2 focus:ring-ring",onPaste:M=>{const P=M.clipboardData.getData("text");P&&S(P)}}),h.jsxs("div",{className:"text-center space-y-2",children:[h.jsxs("p",{className:"text-sm text-muted-foreground",children:["Create a snapshot with:"," ",h.jsx("code",{className:"bg-muted px-2 py-1 rounded text-xs",children:"foundation snapshot . -o snapshot.txt"})]}),u.length===0&&h.jsxs("p",{className:"text-sm text-muted-foreground",children:["Or run"," ",h.jsx("code",{className:"bg-muted px-2 py-1 rounded text-xs",children:"foundation snapshot"})," ","in your project directories to register them for quick switching."]})]})]})]})})]})]})})}_g.createRoot(document.getElementById("root")).render(h.jsx(rn.StrictMode,{children:h.jsx(eZ,{})}));
|