@launchsecure/launch-kit 0.0.4 → 0.0.6

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.
@@ -0,0 +1,379 @@
1
+ function yP(e,n){for(var r=0;r<n.length;r++){const o=n[r];if(typeof o!="string"&&!Array.isArray(o)){for(const i in o)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(o,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>o[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))o(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&o(a)}).observe(document,{childList:!0,subtree:!0});function r(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function o(i){if(i.ep)return;i.ep=!0;const s=r(i);fetch(i.href,s)}})();function nu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vx={exports:{}},ru={},Bx={exports:{}},de={};/**
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 ua=Symbol.for("react.element"),vP=Symbol.for("react.portal"),xP=Symbol.for("react.fragment"),wP=Symbol.for("react.strict_mode"),bP=Symbol.for("react.profiler"),_P=Symbol.for("react.provider"),SP=Symbol.for("react.context"),CP=Symbol.for("react.forward_ref"),EP=Symbol.for("react.suspense"),kP=Symbol.for("react.memo"),NP=Symbol.for("react.lazy"),Ag=Symbol.iterator;function PP(e){return e===null||typeof e!="object"?null:(e=Ag&&e[Ag]||e["@@iterator"],typeof e=="function"?e:null)}var Hx={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Wx=Object.assign,Ux={};function Ei(e,n,r){this.props=e,this.context=n,this.refs=Ux,this.updater=r||Hx}Ei.prototype.isReactComponent={};Ei.prototype.setState=function(e,n){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,n,"setState")};Ei.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Gx(){}Gx.prototype=Ei.prototype;function sh(e,n,r){this.props=e,this.context=n,this.refs=Ux,this.updater=r||Hx}var ah=sh.prototype=new Gx;ah.constructor=sh;Wx(ah,Ei.prototype);ah.isPureReactComponent=!0;var Tg=Array.isArray,Yx=Object.prototype.hasOwnProperty,lh={current:null},Xx={key:!0,ref:!0,__self:!0,__source:!0};function Kx(e,n,r){var o,i={},s=null,a=null;if(n!=null)for(o in n.ref!==void 0&&(a=n.ref),n.key!==void 0&&(s=""+n.key),n)Yx.call(n,o)&&!Xx.hasOwnProperty(o)&&(i[o]=n[o]);var l=arguments.length-2;if(l===1)i.children=r;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}if(e&&e.defaultProps)for(o in l=e.defaultProps,l)i[o]===void 0&&(i[o]=l[o]);return{$$typeof:ua,type:e,key:s,ref:a,props:i,_owner:lh.current}}function RP(e,n){return{$$typeof:ua,type:e.type,key:n,ref:e.ref,props:e.props,_owner:e._owner}}function ch(e){return typeof e=="object"&&e!==null&&e.$$typeof===ua}function MP(e){var n={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return n[r]})}var Ig=/\/+/g;function pf(e,n){return typeof e=="object"&&e!==null&&e.key!=null?MP(""+e.key):n.toString(36)}function Nl(e,n,r,o,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(s){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case ua:case vP:a=!0}}if(a)return a=e,i=i(a),e=o===""?"."+pf(a,0):o,Tg(i)?(r="",e!=null&&(r=e.replace(Ig,"$&/")+"/"),Nl(i,n,r,"",function(u){return u})):i!=null&&(ch(i)&&(i=RP(i,r+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(Ig,"$&/")+"/")+e)),n.push(i)),1;if(a=0,o=o===""?".":o+":",Tg(e))for(var l=0;l<e.length;l++){s=e[l];var c=o+pf(s,l);a+=Nl(s,n,r,c,i)}else if(c=PP(e),typeof c=="function")for(e=c.call(e),l=0;!(s=e.next()).done;)s=s.value,c=o+pf(s,l++),a+=Nl(s,n,r,c,i);else if(s==="object")throw n=String(e),Error("Objects are not valid as a React child (found: "+(n==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":n)+"). If you meant to render a collection of children, use an array instead.");return a}function za(e,n,r){if(e==null)return e;var o=[],i=0;return Nl(e,o,"","",function(s){return n.call(r,s,i++)}),o}function jP(e){if(e._status===-1){var n=e._result;n=n(),n.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var st={current:null},Pl={transition:null},AP={ReactCurrentDispatcher:st,ReactCurrentBatchConfig:Pl,ReactCurrentOwner:lh};function qx(){throw Error("act(...) is not supported in production builds of React.")}de.Children={map:za,forEach:function(e,n,r){za(e,function(){n.apply(this,arguments)},r)},count:function(e){var n=0;return za(e,function(){n++}),n},toArray:function(e){return za(e,function(n){return n})||[]},only:function(e){if(!ch(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};de.Component=Ei;de.Fragment=xP;de.Profiler=bP;de.PureComponent=sh;de.StrictMode=wP;de.Suspense=EP;de.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=AP;de.act=qx;de.cloneElement=function(e,n,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=Wx({},e.props),i=e.key,s=e.ref,a=e._owner;if(n!=null){if(n.ref!==void 0&&(s=n.ref,a=lh.current),n.key!==void 0&&(i=""+n.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in n)Yx.call(n,c)&&!Xx.hasOwnProperty(c)&&(o[c]=n[c]===void 0&&l!==void 0?l[c]:n[c])}var c=arguments.length-2;if(c===1)o.children=r;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];o.children=l}return{$$typeof:ua,type:e.type,key:i,ref:s,props:o,_owner:a}};de.createContext=function(e){return e={$$typeof:SP,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:_P,_context:e},e.Consumer=e};de.createElement=Kx;de.createFactory=function(e){var n=Kx.bind(null,e);return n.type=e,n};de.createRef=function(){return{current:null}};de.forwardRef=function(e){return{$$typeof:CP,render:e}};de.isValidElement=ch;de.lazy=function(e){return{$$typeof:NP,_payload:{_status:-1,_result:e},_init:jP}};de.memo=function(e,n){return{$$typeof:kP,type:e,compare:n===void 0?null:n}};de.startTransition=function(e){var n=Pl.transition;Pl.transition={};try{e()}finally{Pl.transition=n}};de.unstable_act=qx;de.useCallback=function(e,n){return st.current.useCallback(e,n)};de.useContext=function(e){return st.current.useContext(e)};de.useDebugValue=function(){};de.useDeferredValue=function(e){return st.current.useDeferredValue(e)};de.useEffect=function(e,n){return st.current.useEffect(e,n)};de.useId=function(){return st.current.useId()};de.useImperativeHandle=function(e,n,r){return st.current.useImperativeHandle(e,n,r)};de.useInsertionEffect=function(e,n){return st.current.useInsertionEffect(e,n)};de.useLayoutEffect=function(e,n){return st.current.useLayoutEffect(e,n)};de.useMemo=function(e,n){return st.current.useMemo(e,n)};de.useReducer=function(e,n,r){return st.current.useReducer(e,n,r)};de.useRef=function(e){return st.current.useRef(e)};de.useState=function(e){return st.current.useState(e)};de.useSyncExternalStore=function(e,n,r){return st.current.useSyncExternalStore(e,n,r)};de.useTransition=function(){return st.current.useTransition()};de.version="18.3.1";Bx.exports=de;var h=Bx.exports;const Je=nu(h),ou=yP({__proto__:null,default:Je},[h]);/**
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 TP=h,IP=Symbol.for("react.element"),$P=Symbol.for("react.fragment"),OP=Object.prototype.hasOwnProperty,DP=TP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,LP={key:!0,ref:!0,__self:!0,__source:!0};function Zx(e,n,r){var o,i={},s=null,a=null;r!==void 0&&(s=""+r),n.key!==void 0&&(s=""+n.key),n.ref!==void 0&&(a=n.ref);for(o in n)OP.call(n,o)&&!LP.hasOwnProperty(o)&&(i[o]=n[o]);if(e&&e.defaultProps)for(o in n=e.defaultProps,n)i[o]===void 0&&(i[o]=n[o]);return{$$typeof:IP,type:e,key:s,ref:a,props:i,_owner:DP.current}}ru.Fragment=$P;ru.jsx=Zx;ru.jsxs=Zx;Vx.exports=ru;var v=Vx.exports,yd={},Qx={exports:{}},Mt={},Jx={exports:{}},ew={};/**
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 n(A,M){var P=A.length;A.push(M);e:for(;0<P;){var W=P-1>>>1,T=A[W];if(0<i(T,M))A[W]=M,A[P]=T,P=W;else break e}}function r(A){return A.length===0?null:A[0]}function o(A){if(A.length===0)return null;var M=A[0],P=A.pop();if(P!==M){A[0]=P;e:for(var W=0,T=A.length,X=T>>>1;W<X;){var F=2*(W+1)-1,B=A[F],G=F+1,U=A[G];if(0>i(B,P))G<T&&0>i(U,B)?(A[W]=U,A[G]=P,W=G):(A[W]=B,A[F]=P,W=F);else if(G<T&&0>i(U,P))A[W]=U,A[G]=P,W=G;else break e}}return M}function i(A,M){var P=A.sortIndex-M.sortIndex;return P!==0?P:A.id-M.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var c=[],u=[],d=1,f=null,p=3,m=!1,g=!1,b=!1,_=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(A){for(var M=r(u);M!==null;){if(M.callback===null)o(u);else if(M.startTime<=A)o(u),M.sortIndex=M.expirationTime,n(c,M);else break;M=r(u)}}function S(A){if(b=!1,w(A),!g)if(r(c)!==null)g=!0,D(C);else{var M=r(u);M!==null&&z(S,M.startTime-A)}}function C(A,M){g=!1,b&&(b=!1,y(N),N=-1),m=!0;var P=p;try{for(w(M),f=r(c);f!==null&&(!(f.expirationTime>M)||A&&!I());){var W=f.callback;if(typeof W=="function"){f.callback=null,p=f.priorityLevel;var T=W(f.expirationTime<=M);M=e.unstable_now(),typeof T=="function"?f.callback=T:f===r(c)&&o(c),w(M)}else o(c);f=r(c)}if(f!==null)var X=!0;else{var F=r(u);F!==null&&z(S,F.startTime-M),X=!1}return X}finally{f=null,p=P,m=!1}}var E=!1,k=null,N=-1,j=5,$=-1;function I(){return!(e.unstable_now()-$<j)}function O(){if(k!==null){var A=e.unstable_now();$=A;var M=!0;try{M=k(!0,A)}finally{M?H():(E=!1,k=null)}}else E=!1}var H;if(typeof x=="function")H=function(){x(O)};else if(typeof MessageChannel<"u"){var R=new MessageChannel,L=R.port2;R.port1.onmessage=O,H=function(){L.postMessage(null)}}else H=function(){_(O,0)};function D(A){k=A,E||(E=!0,H())}function z(A,M){N=_(function(){A(e.unstable_now())},M)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(A){A.callback=null},e.unstable_continueExecution=function(){g||m||(g=!0,D(C))},e.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<A?Math.floor(1e3/A):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return r(c)},e.unstable_next=function(A){switch(p){case 1:case 2:case 3:var M=3;break;default:M=p}var P=p;p=M;try{return A()}finally{p=P}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(A,M){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var P=p;p=A;try{return M()}finally{p=P}},e.unstable_scheduleCallback=function(A,M,P){var W=e.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?W+P:W):P=W,A){case 1:var T=-1;break;case 2:T=250;break;case 5:T=1073741823;break;case 4:T=1e4;break;default:T=5e3}return T=P+T,A={id:d++,callback:M,priorityLevel:A,startTime:P,expirationTime:T,sortIndex:-1},P>W?(A.sortIndex=P,n(u,A),r(c)===null&&A===r(u)&&(b?(y(N),N=-1):b=!0,z(S,P-W))):(A.sortIndex=T,n(c,A),g||m||(g=!0,D(C))),A},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(A){var M=p;return function(){var P=p;p=M;try{return A.apply(this,arguments)}finally{p=P}}}})(ew);Jx.exports=ew;var zP=Jx.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 FP=h,Pt=zP;function q(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)n+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var tw=new Set,js={};function yo(e,n){ii(e,n),ii(e+"Capture",n)}function ii(e,n){for(js[e]=n,e=0;e<n.length;e++)tw.add(n[e])}var Vn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),vd=Object.prototype.hasOwnProperty,VP=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,$g={},Og={};function BP(e){return vd.call(Og,e)?!0:vd.call($g,e)?!1:VP.test(e)?Og[e]=!0:($g[e]=!0,!1)}function HP(e,n,r,o){if(r!==null&&r.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return o?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function WP(e,n,r,o){if(n===null||typeof n>"u"||HP(e,n,r,o))return!0;if(o)return!1;if(r!==null)switch(r.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function at(e,n,r,o,i,s,a){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=o,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=n,this.sanitizeURL=s,this.removeEmptyString=a}var Xe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Xe[e]=new at(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];Xe[n]=new at(n,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Xe[e]=new at(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Xe[e]=new at(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){Xe[e]=new at(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Xe[e]=new at(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Xe[e]=new at(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Xe[e]=new at(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Xe[e]=new at(e,5,!1,e.toLowerCase(),null,!1,!1)});var uh=/[\-:]([a-z])/g;function fh(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var n=e.replace(uh,fh);Xe[n]=new at(n,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(uh,fh);Xe[n]=new at(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(uh,fh);Xe[n]=new at(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Xe[e]=new at(e,1,!1,e.toLowerCase(),null,!1,!1)});Xe.xlinkHref=new at("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Xe[e]=new at(e,1,!1,e.toLowerCase(),null,!0,!0)});function dh(e,n,r,o){var i=Xe.hasOwnProperty(n)?Xe[n]:null;(i!==null?i.type!==0:o||!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(WP(n,r,i,o)&&(r=null),o||i===null?BP(n)&&(r===null?e.removeAttribute(n):e.setAttribute(n,""+r)):i.mustUseProperty?e[i.propertyName]=r===null?i.type===3?!1:"":r:(n=i.attributeName,o=i.attributeNamespace,r===null?e.removeAttribute(n):(i=i.type,r=i===3||i===4&&r===!0?"":""+r,o?e.setAttributeNS(o,n,r):e.setAttribute(n,r))))}var Xn=FP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Fa=Symbol.for("react.element"),$o=Symbol.for("react.portal"),Oo=Symbol.for("react.fragment"),ph=Symbol.for("react.strict_mode"),xd=Symbol.for("react.profiler"),nw=Symbol.for("react.provider"),rw=Symbol.for("react.context"),hh=Symbol.for("react.forward_ref"),wd=Symbol.for("react.suspense"),bd=Symbol.for("react.suspense_list"),mh=Symbol.for("react.memo"),sr=Symbol.for("react.lazy"),ow=Symbol.for("react.offscreen"),Dg=Symbol.iterator;function Fi(e){return e===null||typeof e!="object"?null:(e=Dg&&e[Dg]||e["@@iterator"],typeof e=="function"?e:null)}var Ie=Object.assign,hf;function is(e){if(hf===void 0)try{throw Error()}catch(r){var n=r.stack.trim().match(/\n( *(at )?)/);hf=n&&n[1]||""}return`
34
+ `+hf+e}var mf=!1;function gf(e,n){if(!e||mf)return"";mf=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(n)if(n=function(){throw Error()},Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(n,[])}catch(u){var o=u}Reflect.construct(e,[],n)}else{try{n.call()}catch(u){o=u}e.call(n.prototype)}else{try{throw Error()}catch(u){o=u}e()}}catch(u){if(u&&o&&typeof u.stack=="string"){for(var i=u.stack.split(`
35
+ `),s=o.stack.split(`
36
+ `),a=i.length-1,l=s.length-1;1<=a&&0<=l&&i[a]!==s[l];)l--;for(;1<=a&&0<=l;a--,l--)if(i[a]!==s[l]){if(a!==1||l!==1)do if(a--,l--,0>l||i[a]!==s[l]){var c=`
37
+ `+i[a].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=a&&0<=l);break}}}finally{mf=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?is(e):""}function UP(e){switch(e.tag){case 5:return is(e.type);case 16:return is("Lazy");case 13:return is("Suspense");case 19:return is("SuspenseList");case 0:case 2:case 15:return e=gf(e.type,!1),e;case 11:return e=gf(e.type.render,!1),e;case 1:return e=gf(e.type,!0),e;default:return""}}function _d(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 Oo:return"Fragment";case $o:return"Portal";case xd:return"Profiler";case ph:return"StrictMode";case wd:return"Suspense";case bd:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case rw:return(e.displayName||"Context")+".Consumer";case nw:return(e._context.displayName||"Context")+".Provider";case hh:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case mh:return n=e.displayName||null,n!==null?n:_d(e.type)||"Memo";case sr:n=e._payload,e=e._init;try{return _d(e(n))}catch{}}return null}function GP(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return _d(n);case 8:return n===ph?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function kr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function iw(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function YP(e){var n=iw(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),o=""+e[n];if(!e.hasOwnProperty(n)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,s=r.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return i.call(this)},set:function(a){o=""+a,s.call(this,a)}}),Object.defineProperty(e,n,{enumerable:r.enumerable}),{getValue:function(){return o},setValue:function(a){o=""+a},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Va(e){e._valueTracker||(e._valueTracker=YP(e))}function sw(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var r=n.getValue(),o="";return e&&(o=iw(e)?e.checked?"true":"false":e.value),e=o,e!==r?(n.setValue(e),!0):!1}function ql(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 Sd(e,n){var r=n.checked;return Ie({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Lg(e,n){var r=n.defaultValue==null?"":n.defaultValue,o=n.checked!=null?n.checked:n.defaultChecked;r=kr(n.value!=null?n.value:r),e._wrapperState={initialChecked:o,initialValue:r,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function aw(e,n){n=n.checked,n!=null&&dh(e,"checked",n,!1)}function Cd(e,n){aw(e,n);var r=kr(n.value),o=n.type;if(r!=null)o==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(o==="submit"||o==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?Ed(e,n.type,r):n.hasOwnProperty("defaultValue")&&Ed(e,n.type,kr(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function zg(e,n,r){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var o=n.type;if(!(o!=="submit"&&o!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,r||n===e.value||(e.value=n),e.defaultValue=n}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Ed(e,n,r){(n!=="number"||ql(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var ss=Array.isArray;function Ko(e,n,r,o){if(e=e.options,n){n={};for(var i=0;i<r.length;i++)n["$"+r[i]]=!0;for(r=0;r<e.length;r++)i=n.hasOwnProperty("$"+e[r].value),e[r].selected!==i&&(e[r].selected=i),i&&o&&(e[r].defaultSelected=!0)}else{for(r=""+kr(r),n=null,i=0;i<e.length;i++){if(e[i].value===r){e[i].selected=!0,o&&(e[i].defaultSelected=!0);return}n!==null||e[i].disabled||(n=e[i])}n!==null&&(n.selected=!0)}}function kd(e,n){if(n.dangerouslySetInnerHTML!=null)throw Error(q(91));return Ie({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Fg(e,n){var r=n.value;if(r==null){if(r=n.children,n=n.defaultValue,r!=null){if(n!=null)throw Error(q(92));if(ss(r)){if(1<r.length)throw Error(q(93));r=r[0]}n=r}n==null&&(n=""),r=n}e._wrapperState={initialValue:kr(r)}}function lw(e,n){var r=kr(n.value),o=kr(n.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),n.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),o!=null&&(e.defaultValue=""+o)}function Vg(e){var n=e.textContent;n===e._wrapperState.initialValue&&n!==""&&n!==null&&(e.value=n)}function cw(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 Nd(e,n){return e==null||e==="http://www.w3.org/1999/xhtml"?cw(n):e==="http://www.w3.org/2000/svg"&&n==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ba,uw=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(n,r,o,i){MSApp.execUnsafeLocalFunction(function(){return e(n,r,o,i)})}:e}(function(e,n){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=n;else{for(Ba=Ba||document.createElement("div"),Ba.innerHTML="<svg>"+n.valueOf().toString()+"</svg>",n=Ba.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function As(e,n){if(n){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=n;return}}e.textContent=n}var ms={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},XP=["Webkit","ms","Moz","O"];Object.keys(ms).forEach(function(e){XP.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),ms[n]=ms[e]})});function fw(e,n,r){return n==null||typeof n=="boolean"||n===""?"":r||typeof n!="number"||n===0||ms.hasOwnProperty(e)&&ms[e]?(""+n).trim():n+"px"}function dw(e,n){e=e.style;for(var r in n)if(n.hasOwnProperty(r)){var o=r.indexOf("--")===0,i=fw(r,n[r],o);r==="float"&&(r="cssFloat"),o?e.setProperty(r,i):e[r]=i}}var KP=Ie({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 Pd(e,n){if(n){if(KP[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(q(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(q(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(q(61))}if(n.style!=null&&typeof n.style!="object")throw Error(q(62))}}function Rd(e,n){if(e.indexOf("-")===-1)return typeof n.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Md=null;function gh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var jd=null,qo=null,Zo=null;function Bg(e){if(e=pa(e)){if(typeof jd!="function")throw Error(q(280));var n=e.stateNode;n&&(n=cu(n),jd(e.stateNode,e.type,n))}}function pw(e){qo?Zo?Zo.push(e):Zo=[e]:qo=e}function hw(){if(qo){var e=qo,n=Zo;if(Zo=qo=null,Bg(e),n)for(e=0;e<n.length;e++)Bg(n[e])}}function mw(e,n){return e(n)}function gw(){}var yf=!1;function yw(e,n,r){if(yf)return e(n,r);yf=!0;try{return mw(e,n,r)}finally{yf=!1,(qo!==null||Zo!==null)&&(gw(),hw())}}function Ts(e,n){var r=e.stateNode;if(r===null)return null;var o=cu(r);if(o===null)return null;r=o[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(q(231,n,typeof r));return r}var Ad=!1;if(Vn)try{var Vi={};Object.defineProperty(Vi,"passive",{get:function(){Ad=!0}}),window.addEventListener("test",Vi,Vi),window.removeEventListener("test",Vi,Vi)}catch{Ad=!1}function qP(e,n,r,o,i,s,a,l,c){var u=Array.prototype.slice.call(arguments,3);try{n.apply(r,u)}catch(d){this.onError(d)}}var gs=!1,Zl=null,Ql=!1,Td=null,ZP={onError:function(e){gs=!0,Zl=e}};function QP(e,n,r,o,i,s,a,l,c){gs=!1,Zl=null,qP.apply(ZP,arguments)}function JP(e,n,r,o,i,s,a,l,c){if(QP.apply(this,arguments),gs){if(gs){var u=Zl;gs=!1,Zl=null}else throw Error(q(198));Ql||(Ql=!0,Td=u)}}function vo(e){var n=e,r=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,n.flags&4098&&(r=n.return),e=n.return;while(e)}return n.tag===3?r:null}function vw(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function Hg(e){if(vo(e)!==e)throw Error(q(188))}function eR(e){var n=e.alternate;if(!n){if(n=vo(e),n===null)throw Error(q(188));return n!==e?null:e}for(var r=e,o=n;;){var i=r.return;if(i===null)break;var s=i.alternate;if(s===null){if(o=i.return,o!==null){r=o;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===r)return Hg(i),e;if(s===o)return Hg(i),n;s=s.sibling}throw Error(q(188))}if(r.return!==o.return)r=i,o=s;else{for(var a=!1,l=i.child;l;){if(l===r){a=!0,r=i,o=s;break}if(l===o){a=!0,o=i,r=s;break}l=l.sibling}if(!a){for(l=s.child;l;){if(l===r){a=!0,r=s,o=i;break}if(l===o){a=!0,o=s,r=i;break}l=l.sibling}if(!a)throw Error(q(189))}}if(r.alternate!==o)throw Error(q(190))}if(r.tag!==3)throw Error(q(188));return r.stateNode.current===r?e:n}function xw(e){return e=eR(e),e!==null?ww(e):null}function ww(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var n=ww(e);if(n!==null)return n;e=e.sibling}return null}var bw=Pt.unstable_scheduleCallback,Wg=Pt.unstable_cancelCallback,tR=Pt.unstable_shouldYield,nR=Pt.unstable_requestPaint,De=Pt.unstable_now,rR=Pt.unstable_getCurrentPriorityLevel,yh=Pt.unstable_ImmediatePriority,_w=Pt.unstable_UserBlockingPriority,Jl=Pt.unstable_NormalPriority,oR=Pt.unstable_LowPriority,Sw=Pt.unstable_IdlePriority,iu=null,vn=null;function iR(e){if(vn&&typeof vn.onCommitFiberRoot=="function")try{vn.onCommitFiberRoot(iu,e,void 0,(e.current.flags&128)===128)}catch{}}var nn=Math.clz32?Math.clz32:lR,sR=Math.log,aR=Math.LN2;function lR(e){return e>>>=0,e===0?32:31-(sR(e)/aR|0)|0}var Ha=64,Wa=4194304;function as(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 ec(e,n){var r=e.pendingLanes;if(r===0)return 0;var o=0,i=e.suspendedLanes,s=e.pingedLanes,a=r&268435455;if(a!==0){var l=a&~i;l!==0?o=as(l):(s&=a,s!==0&&(o=as(s)))}else a=r&~i,a!==0?o=as(a):s!==0&&(o=as(s));if(o===0)return 0;if(n!==0&&n!==o&&!(n&i)&&(i=o&-o,s=n&-n,i>=s||i===16&&(s&4194240)!==0))return n;if(o&4&&(o|=r&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=o;0<n;)r=31-nn(n),i=1<<r,o|=e[r],n&=~i;return o}function cR(e,n){switch(e){case 1:case 2:case 4:return n+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function uR(e,n){for(var r=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-nn(s),l=1<<a,c=i[a];c===-1?(!(l&r)||l&o)&&(i[a]=cR(l,n)):c<=n&&(e.expiredLanes|=l),s&=~l}}function Id(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Cw(){var e=Ha;return Ha<<=1,!(Ha&4194240)&&(Ha=64),e}function vf(e){for(var n=[],r=0;31>r;r++)n.push(e);return n}function fa(e,n,r){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-nn(n),e[n]=r}function fR(e,n){var r=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var o=e.eventTimes;for(e=e.expirationTimes;0<r;){var i=31-nn(r),s=1<<i;n[i]=0,o[i]=-1,e[i]=-1,r&=~s}}function vh(e,n){var r=e.entangledLanes|=n;for(e=e.entanglements;r;){var o=31-nn(r),i=1<<o;i&n|e[o]&n&&(e[o]|=n),r&=~i}}var xe=0;function Ew(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var kw,xh,Nw,Pw,Rw,$d=!1,Ua=[],mr=null,gr=null,yr=null,Is=new Map,$s=new Map,cr=[],dR="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 Ug(e,n){switch(e){case"focusin":case"focusout":mr=null;break;case"dragenter":case"dragleave":gr=null;break;case"mouseover":case"mouseout":yr=null;break;case"pointerover":case"pointerout":Is.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":$s.delete(n.pointerId)}}function Bi(e,n,r,o,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:n,domEventName:r,eventSystemFlags:o,nativeEvent:s,targetContainers:[i]},n!==null&&(n=pa(n),n!==null&&xh(n)),e):(e.eventSystemFlags|=o,n=e.targetContainers,i!==null&&n.indexOf(i)===-1&&n.push(i),e)}function pR(e,n,r,o,i){switch(n){case"focusin":return mr=Bi(mr,e,n,r,o,i),!0;case"dragenter":return gr=Bi(gr,e,n,r,o,i),!0;case"mouseover":return yr=Bi(yr,e,n,r,o,i),!0;case"pointerover":var s=i.pointerId;return Is.set(s,Bi(Is.get(s)||null,e,n,r,o,i)),!0;case"gotpointercapture":return s=i.pointerId,$s.set(s,Bi($s.get(s)||null,e,n,r,o,i)),!0}return!1}function Mw(e){var n=Xr(e.target);if(n!==null){var r=vo(n);if(r!==null){if(n=r.tag,n===13){if(n=vw(r),n!==null){e.blockedOn=n,Rw(e.priority,function(){Nw(r)});return}}else if(n===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Rl(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var r=Od(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var o=new r.constructor(r.type,r);Md=o,r.target.dispatchEvent(o),Md=null}else return n=pa(r),n!==null&&xh(n),e.blockedOn=r,!1;n.shift()}return!0}function Gg(e,n,r){Rl(e)&&r.delete(n)}function hR(){$d=!1,mr!==null&&Rl(mr)&&(mr=null),gr!==null&&Rl(gr)&&(gr=null),yr!==null&&Rl(yr)&&(yr=null),Is.forEach(Gg),$s.forEach(Gg)}function Hi(e,n){e.blockedOn===n&&(e.blockedOn=null,$d||($d=!0,Pt.unstable_scheduleCallback(Pt.unstable_NormalPriority,hR)))}function Os(e){function n(i){return Hi(i,e)}if(0<Ua.length){Hi(Ua[0],e);for(var r=1;r<Ua.length;r++){var o=Ua[r];o.blockedOn===e&&(o.blockedOn=null)}}for(mr!==null&&Hi(mr,e),gr!==null&&Hi(gr,e),yr!==null&&Hi(yr,e),Is.forEach(n),$s.forEach(n),r=0;r<cr.length;r++)o=cr[r],o.blockedOn===e&&(o.blockedOn=null);for(;0<cr.length&&(r=cr[0],r.blockedOn===null);)Mw(r),r.blockedOn===null&&cr.shift()}var Qo=Xn.ReactCurrentBatchConfig,tc=!0;function mR(e,n,r,o){var i=xe,s=Qo.transition;Qo.transition=null;try{xe=1,wh(e,n,r,o)}finally{xe=i,Qo.transition=s}}function gR(e,n,r,o){var i=xe,s=Qo.transition;Qo.transition=null;try{xe=4,wh(e,n,r,o)}finally{xe=i,Qo.transition=s}}function wh(e,n,r,o){if(tc){var i=Od(e,n,r,o);if(i===null)Pf(e,n,o,nc,r),Ug(e,o);else if(pR(i,e,n,r,o))o.stopPropagation();else if(Ug(e,o),n&4&&-1<dR.indexOf(e)){for(;i!==null;){var s=pa(i);if(s!==null&&kw(s),s=Od(e,n,r,o),s===null&&Pf(e,n,o,nc,r),s===i)break;i=s}i!==null&&o.stopPropagation()}else Pf(e,n,o,null,r)}}var nc=null;function Od(e,n,r,o){if(nc=null,e=gh(o),e=Xr(e),e!==null)if(n=vo(e),n===null)e=null;else if(r=n.tag,r===13){if(e=vw(n),e!==null)return e;e=null}else if(r===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null);return nc=e,null}function jw(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(rR()){case yh:return 1;case _w:return 4;case Jl:case oR:return 16;case Sw:return 536870912;default:return 16}default:return 16}}var dr=null,bh=null,Ml=null;function Aw(){if(Ml)return Ml;var e,n=bh,r=n.length,o,i="value"in dr?dr.value:dr.textContent,s=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(o=1;o<=a&&n[r-o]===i[s-o];o++);return Ml=i.slice(e,1<o?1-o:void 0)}function jl(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function Ga(){return!0}function Yg(){return!1}function jt(e){function n(r,o,i,s,a){this._reactName=r,this._targetInst=i,this.type=o,this.nativeEvent=s,this.target=a,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(r=e[l],this[l]=r?r(s):s[l]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Ga:Yg,this.isPropagationStopped=Yg,this}return Ie(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Ga)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Ga)},persist:function(){},isPersistent:Ga}),n}var ki={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},_h=jt(ki),da=Ie({},ki,{view:0,detail:0}),yR=jt(da),xf,wf,Wi,su=Ie({},da,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sh,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!==Wi&&(Wi&&e.type==="mousemove"?(xf=e.screenX-Wi.screenX,wf=e.screenY-Wi.screenY):wf=xf=0,Wi=e),xf)},movementY:function(e){return"movementY"in e?e.movementY:wf}}),Xg=jt(su),vR=Ie({},su,{dataTransfer:0}),xR=jt(vR),wR=Ie({},da,{relatedTarget:0}),bf=jt(wR),bR=Ie({},ki,{animationName:0,elapsedTime:0,pseudoElement:0}),_R=jt(bR),SR=Ie({},ki,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),CR=jt(SR),ER=Ie({},ki,{data:0}),Kg=jt(ER),kR={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},NR={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"},PR={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function RR(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=PR[e])?!!n[e]:!1}function Sh(){return RR}var MR=Ie({},da,{key:function(e){if(e.key){var n=kR[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=jl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?NR[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sh,charCode:function(e){return e.type==="keypress"?jl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?jl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),jR=jt(MR),AR=Ie({},su,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),qg=jt(AR),TR=Ie({},da,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sh}),IR=jt(TR),$R=Ie({},ki,{propertyName:0,elapsedTime:0,pseudoElement:0}),OR=jt($R),DR=Ie({},su,{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}),LR=jt(DR),zR=[9,13,27,32],Ch=Vn&&"CompositionEvent"in window,ys=null;Vn&&"documentMode"in document&&(ys=document.documentMode);var FR=Vn&&"TextEvent"in window&&!ys,Tw=Vn&&(!Ch||ys&&8<ys&&11>=ys),Zg=" ",Qg=!1;function Iw(e,n){switch(e){case"keyup":return zR.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $w(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Do=!1;function VR(e,n){switch(e){case"compositionend":return $w(n);case"keypress":return n.which!==32?null:(Qg=!0,Zg);case"textInput":return e=n.data,e===Zg&&Qg?null:e;default:return null}}function BR(e,n){if(Do)return e==="compositionend"||!Ch&&Iw(e,n)?(e=Aw(),Ml=bh=dr=null,Do=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return Tw&&n.locale!=="ko"?null:n.data;default:return null}}var HR={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 Jg(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!HR[e.type]:n==="textarea"}function Ow(e,n,r,o){pw(o),n=rc(n,"onChange"),0<n.length&&(r=new _h("onChange","change",null,r,o),e.push({event:r,listeners:n}))}var vs=null,Ds=null;function WR(e){Yw(e,0)}function au(e){var n=Fo(e);if(sw(n))return e}function UR(e,n){if(e==="change")return n}var Dw=!1;if(Vn){var _f;if(Vn){var Sf="oninput"in document;if(!Sf){var ey=document.createElement("div");ey.setAttribute("oninput","return;"),Sf=typeof ey.oninput=="function"}_f=Sf}else _f=!1;Dw=_f&&(!document.documentMode||9<document.documentMode)}function ty(){vs&&(vs.detachEvent("onpropertychange",Lw),Ds=vs=null)}function Lw(e){if(e.propertyName==="value"&&au(Ds)){var n=[];Ow(n,Ds,e,gh(e)),yw(WR,n)}}function GR(e,n,r){e==="focusin"?(ty(),vs=n,Ds=r,vs.attachEvent("onpropertychange",Lw)):e==="focusout"&&ty()}function YR(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return au(Ds)}function XR(e,n){if(e==="click")return au(n)}function KR(e,n){if(e==="input"||e==="change")return au(n)}function qR(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var on=typeof Object.is=="function"?Object.is:qR;function Ls(e,n){if(on(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var r=Object.keys(e),o=Object.keys(n);if(r.length!==o.length)return!1;for(o=0;o<r.length;o++){var i=r[o];if(!vd.call(n,i)||!on(e[i],n[i]))return!1}return!0}function ny(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ry(e,n){var r=ny(e);e=0;for(var o;r;){if(r.nodeType===3){if(o=e+r.textContent.length,e<=n&&o>=n)return{node:r,offset:n-e};e=o}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ny(r)}}function zw(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?zw(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Fw(){for(var e=window,n=ql();n instanceof e.HTMLIFrameElement;){try{var r=typeof n.contentWindow.location.href=="string"}catch{r=!1}if(r)e=n.contentWindow;else break;n=ql(e.document)}return n}function Eh(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function ZR(e){var n=Fw(),r=e.focusedElem,o=e.selectionRange;if(n!==r&&r&&r.ownerDocument&&zw(r.ownerDocument.documentElement,r)){if(o!==null&&Eh(r)){if(n=o.start,e=o.end,e===void 0&&(e=n),"selectionStart"in r)r.selectionStart=n,r.selectionEnd=Math.min(e,r.value.length);else if(e=(n=r.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,s=Math.min(o.start,i);o=o.end===void 0?s:Math.min(o.end,i),!e.extend&&s>o&&(i=o,o=s,s=i),i=ry(r,s);var a=ry(r,o);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(n=n.createRange(),n.setStart(i.node,i.offset),e.removeAllRanges(),s>o?(e.addRange(n),e.extend(a.node,a.offset)):(n.setEnd(a.node,a.offset),e.addRange(n)))}}for(n=[],e=r;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<n.length;r++)e=n[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var QR=Vn&&"documentMode"in document&&11>=document.documentMode,Lo=null,Dd=null,xs=null,Ld=!1;function oy(e,n,r){var o=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Ld||Lo==null||Lo!==ql(o)||(o=Lo,"selectionStart"in o&&Eh(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),xs&&Ls(xs,o)||(xs=o,o=rc(Dd,"onSelect"),0<o.length&&(n=new _h("onSelect","select",null,n,r),e.push({event:n,listeners:o}),n.target=Lo)))}function Ya(e,n){var r={};return r[e.toLowerCase()]=n.toLowerCase(),r["Webkit"+e]="webkit"+n,r["Moz"+e]="moz"+n,r}var zo={animationend:Ya("Animation","AnimationEnd"),animationiteration:Ya("Animation","AnimationIteration"),animationstart:Ya("Animation","AnimationStart"),transitionend:Ya("Transition","TransitionEnd")},Cf={},Vw={};Vn&&(Vw=document.createElement("div").style,"AnimationEvent"in window||(delete zo.animationend.animation,delete zo.animationiteration.animation,delete zo.animationstart.animation),"TransitionEvent"in window||delete zo.transitionend.transition);function lu(e){if(Cf[e])return Cf[e];if(!zo[e])return e;var n=zo[e],r;for(r in n)if(n.hasOwnProperty(r)&&r in Vw)return Cf[e]=n[r];return e}var Bw=lu("animationend"),Hw=lu("animationiteration"),Ww=lu("animationstart"),Uw=lu("transitionend"),Gw=new Map,iy="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 jr(e,n){Gw.set(e,n),yo(n,[e])}for(var Ef=0;Ef<iy.length;Ef++){var kf=iy[Ef],JR=kf.toLowerCase(),eM=kf[0].toUpperCase()+kf.slice(1);jr(JR,"on"+eM)}jr(Bw,"onAnimationEnd");jr(Hw,"onAnimationIteration");jr(Ww,"onAnimationStart");jr("dblclick","onDoubleClick");jr("focusin","onFocus");jr("focusout","onBlur");jr(Uw,"onTransitionEnd");ii("onMouseEnter",["mouseout","mouseover"]);ii("onMouseLeave",["mouseout","mouseover"]);ii("onPointerEnter",["pointerout","pointerover"]);ii("onPointerLeave",["pointerout","pointerover"]);yo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));yo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));yo("onBeforeInput",["compositionend","keypress","textInput","paste"]);yo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));yo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));yo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ls="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(" "),tM=new Set("cancel close invalid load scroll toggle".split(" ").concat(ls));function sy(e,n,r){var o=e.type||"unknown-event";e.currentTarget=r,JP(o,n,void 0,e),e.currentTarget=null}function Yw(e,n){n=(n&4)!==0;for(var r=0;r<e.length;r++){var o=e[r],i=o.event;o=o.listeners;e:{var s=void 0;if(n)for(var a=o.length-1;0<=a;a--){var l=o[a],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==s&&i.isPropagationStopped())break e;sy(i,l,u),s=c}else for(a=0;a<o.length;a++){if(l=o[a],c=l.instance,u=l.currentTarget,l=l.listener,c!==s&&i.isPropagationStopped())break e;sy(i,l,u),s=c}}}if(Ql)throw e=Td,Ql=!1,Td=null,e}function Se(e,n){var r=n[Hd];r===void 0&&(r=n[Hd]=new Set);var o=e+"__bubble";r.has(o)||(Xw(n,e,2,!1),r.add(o))}function Nf(e,n,r){var o=0;n&&(o|=4),Xw(r,e,o,n)}var Xa="_reactListening"+Math.random().toString(36).slice(2);function zs(e){if(!e[Xa]){e[Xa]=!0,tw.forEach(function(r){r!=="selectionchange"&&(tM.has(r)||Nf(r,!1,e),Nf(r,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[Xa]||(n[Xa]=!0,Nf("selectionchange",!1,n))}}function Xw(e,n,r,o){switch(jw(n)){case 1:var i=mR;break;case 4:i=gR;break;default:i=wh}r=i.bind(null,n,r,e),i=void 0,!Ad||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(i=!0),o?i!==void 0?e.addEventListener(n,r,{capture:!0,passive:i}):e.addEventListener(n,r,!0):i!==void 0?e.addEventListener(n,r,{passive:i}):e.addEventListener(n,r,!1)}function Pf(e,n,r,o,i){var s=o;if(!(n&1)&&!(n&2)&&o!==null)e:for(;;){if(o===null)return;var a=o.tag;if(a===3||a===4){var l=o.stateNode.containerInfo;if(l===i||l.nodeType===8&&l.parentNode===i)break;if(a===4)for(a=o.return;a!==null;){var c=a.tag;if((c===3||c===4)&&(c=a.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;a=a.return}for(;l!==null;){if(a=Xr(l),a===null)return;if(c=a.tag,c===5||c===6){o=s=a;continue e}l=l.parentNode}}o=o.return}yw(function(){var u=s,d=gh(r),f=[];e:{var p=Gw.get(e);if(p!==void 0){var m=_h,g=e;switch(e){case"keypress":if(jl(r)===0)break e;case"keydown":case"keyup":m=jR;break;case"focusin":g="focus",m=bf;break;case"focusout":g="blur",m=bf;break;case"beforeblur":case"afterblur":m=bf;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=Xg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=xR;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=IR;break;case Bw:case Hw:case Ww:m=_R;break;case Uw:m=OR;break;case"scroll":m=yR;break;case"wheel":m=LR;break;case"copy":case"cut":case"paste":m=CR;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=qg}var b=(n&4)!==0,_=!b&&e==="scroll",y=b?p!==null?p+"Capture":null:p;b=[];for(var x=u,w;x!==null;){w=x;var S=w.stateNode;if(w.tag===5&&S!==null&&(w=S,y!==null&&(S=Ts(x,y),S!=null&&b.push(Fs(x,S,w)))),_)break;x=x.return}0<b.length&&(p=new m(p,g,null,r,d),f.push({event:p,listeners:b}))}}if(!(n&7)){e:{if(p=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",p&&r!==Md&&(g=r.relatedTarget||r.fromElement)&&(Xr(g)||g[Bn]))break e;if((m||p)&&(p=d.window===d?d:(p=d.ownerDocument)?p.defaultView||p.parentWindow:window,m?(g=r.relatedTarget||r.toElement,m=u,g=g?Xr(g):null,g!==null&&(_=vo(g),g!==_||g.tag!==5&&g.tag!==6)&&(g=null)):(m=null,g=u),m!==g)){if(b=Xg,S="onMouseLeave",y="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(b=qg,S="onPointerLeave",y="onPointerEnter",x="pointer"),_=m==null?p:Fo(m),w=g==null?p:Fo(g),p=new b(S,x+"leave",m,r,d),p.target=_,p.relatedTarget=w,S=null,Xr(d)===u&&(b=new b(y,x+"enter",g,r,d),b.target=w,b.relatedTarget=_,S=b),_=S,m&&g)t:{for(b=m,y=g,x=0,w=b;w;w=Co(w))x++;for(w=0,S=y;S;S=Co(S))w++;for(;0<x-w;)b=Co(b),x--;for(;0<w-x;)y=Co(y),w--;for(;x--;){if(b===y||y!==null&&b===y.alternate)break t;b=Co(b),y=Co(y)}b=null}else b=null;m!==null&&ay(f,p,m,b,!1),g!==null&&_!==null&&ay(f,_,g,b,!0)}}e:{if(p=u?Fo(u):window,m=p.nodeName&&p.nodeName.toLowerCase(),m==="select"||m==="input"&&p.type==="file")var C=UR;else if(Jg(p))if(Dw)C=KR;else{C=YR;var E=GR}else(m=p.nodeName)&&m.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(C=XR);if(C&&(C=C(e,u))){Ow(f,C,r,d);break e}E&&E(e,p,u),e==="focusout"&&(E=p._wrapperState)&&E.controlled&&p.type==="number"&&Ed(p,"number",p.value)}switch(E=u?Fo(u):window,e){case"focusin":(Jg(E)||E.contentEditable==="true")&&(Lo=E,Dd=u,xs=null);break;case"focusout":xs=Dd=Lo=null;break;case"mousedown":Ld=!0;break;case"contextmenu":case"mouseup":case"dragend":Ld=!1,oy(f,r,d);break;case"selectionchange":if(QR)break;case"keydown":case"keyup":oy(f,r,d)}var k;if(Ch)e:{switch(e){case"compositionstart":var N="onCompositionStart";break e;case"compositionend":N="onCompositionEnd";break e;case"compositionupdate":N="onCompositionUpdate";break e}N=void 0}else Do?Iw(e,r)&&(N="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(N="onCompositionStart");N&&(Tw&&r.locale!=="ko"&&(Do||N!=="onCompositionStart"?N==="onCompositionEnd"&&Do&&(k=Aw()):(dr=d,bh="value"in dr?dr.value:dr.textContent,Do=!0)),E=rc(u,N),0<E.length&&(N=new Kg(N,e,null,r,d),f.push({event:N,listeners:E}),k?N.data=k:(k=$w(r),k!==null&&(N.data=k)))),(k=FR?VR(e,r):BR(e,r))&&(u=rc(u,"onBeforeInput"),0<u.length&&(d=new Kg("onBeforeInput","beforeinput",null,r,d),f.push({event:d,listeners:u}),d.data=k))}Yw(f,n)})}function Fs(e,n,r){return{instance:e,listener:n,currentTarget:r}}function rc(e,n){for(var r=n+"Capture",o=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Ts(e,r),s!=null&&o.unshift(Fs(e,s,i)),s=Ts(e,n),s!=null&&o.push(Fs(e,s,i))),e=e.return}return o}function Co(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function ay(e,n,r,o,i){for(var s=n._reactName,a=[];r!==null&&r!==o;){var l=r,c=l.alternate,u=l.stateNode;if(c!==null&&c===o)break;l.tag===5&&u!==null&&(l=u,i?(c=Ts(r,s),c!=null&&a.unshift(Fs(r,c,l))):i||(c=Ts(r,s),c!=null&&a.push(Fs(r,c,l)))),r=r.return}a.length!==0&&e.push({event:n,listeners:a})}var nM=/\r\n?/g,rM=/\u0000|\uFFFD/g;function ly(e){return(typeof e=="string"?e:""+e).replace(nM,`
38
+ `).replace(rM,"")}function Ka(e,n,r){if(n=ly(n),ly(e)!==n&&r)throw Error(q(425))}function oc(){}var zd=null,Fd=null;function Vd(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Bd=typeof setTimeout=="function"?setTimeout:void 0,oM=typeof clearTimeout=="function"?clearTimeout:void 0,cy=typeof Promise=="function"?Promise:void 0,iM=typeof queueMicrotask=="function"?queueMicrotask:typeof cy<"u"?function(e){return cy.resolve(null).then(e).catch(sM)}:Bd;function sM(e){setTimeout(function(){throw e})}function Rf(e,n){var r=n,o=0;do{var i=r.nextSibling;if(e.removeChild(r),i&&i.nodeType===8)if(r=i.data,r==="/$"){if(o===0){e.removeChild(i),Os(n);return}o--}else r!=="$"&&r!=="$?"&&r!=="$!"||o++;r=i}while(r);Os(n)}function vr(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?")break;if(n==="/$")return null}}return e}function uy(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(n===0)return e;n--}else r==="/$"&&n++}e=e.previousSibling}return null}var Ni=Math.random().toString(36).slice(2),hn="__reactFiber$"+Ni,Vs="__reactProps$"+Ni,Bn="__reactContainer$"+Ni,Hd="__reactEvents$"+Ni,aM="__reactListeners$"+Ni,lM="__reactHandles$"+Ni;function Xr(e){var n=e[hn];if(n)return n;for(var r=e.parentNode;r;){if(n=r[Bn]||r[hn]){if(r=n.alternate,n.child!==null||r!==null&&r.child!==null)for(e=uy(e);e!==null;){if(r=e[hn])return r;e=uy(e)}return n}e=r,r=e.parentNode}return null}function pa(e){return e=e[hn]||e[Bn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Fo(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(q(33))}function cu(e){return e[Vs]||null}var Wd=[],Vo=-1;function Ar(e){return{current:e}}function Ee(e){0>Vo||(e.current=Wd[Vo],Wd[Vo]=null,Vo--)}function be(e,n){Vo++,Wd[Vo]=e.current,e.current=n}var Nr={},nt=Ar(Nr),ht=Ar(!1),ro=Nr;function si(e,n){var r=e.type.contextTypes;if(!r)return Nr;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===n)return o.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in r)i[s]=n[s];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=i),i}function mt(e){return e=e.childContextTypes,e!=null}function ic(){Ee(ht),Ee(nt)}function fy(e,n,r){if(nt.current!==Nr)throw Error(q(168));be(nt,n),be(ht,r)}function Kw(e,n,r){var o=e.stateNode;if(n=n.childContextTypes,typeof o.getChildContext!="function")return r;o=o.getChildContext();for(var i in o)if(!(i in n))throw Error(q(108,GP(e)||"Unknown",i));return Ie({},r,o)}function sc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Nr,ro=nt.current,be(nt,e),be(ht,ht.current),!0}function dy(e,n,r){var o=e.stateNode;if(!o)throw Error(q(169));r?(e=Kw(e,n,ro),o.__reactInternalMemoizedMergedChildContext=e,Ee(ht),Ee(nt),be(nt,e)):Ee(ht),be(ht,r)}var Tn=null,uu=!1,Mf=!1;function qw(e){Tn===null?Tn=[e]:Tn.push(e)}function cM(e){uu=!0,qw(e)}function Tr(){if(!Mf&&Tn!==null){Mf=!0;var e=0,n=xe;try{var r=Tn;for(xe=1;e<r.length;e++){var o=r[e];do o=o(!0);while(o!==null)}Tn=null,uu=!1}catch(i){throw Tn!==null&&(Tn=Tn.slice(e+1)),bw(yh,Tr),i}finally{xe=n,Mf=!1}}return null}var Bo=[],Ho=0,ac=null,lc=0,Dt=[],Lt=0,oo=null,$n=1,On="";function Wr(e,n){Bo[Ho++]=lc,Bo[Ho++]=ac,ac=e,lc=n}function Zw(e,n,r){Dt[Lt++]=$n,Dt[Lt++]=On,Dt[Lt++]=oo,oo=e;var o=$n;e=On;var i=32-nn(o)-1;o&=~(1<<i),r+=1;var s=32-nn(n)+i;if(30<s){var a=i-i%5;s=(o&(1<<a)-1).toString(32),o>>=a,i-=a,$n=1<<32-nn(n)+i|r<<i|o,On=s+e}else $n=1<<s|r<<i|o,On=e}function kh(e){e.return!==null&&(Wr(e,1),Zw(e,1,0))}function Nh(e){for(;e===ac;)ac=Bo[--Ho],Bo[Ho]=null,lc=Bo[--Ho],Bo[Ho]=null;for(;e===oo;)oo=Dt[--Lt],Dt[Lt]=null,On=Dt[--Lt],Dt[Lt]=null,$n=Dt[--Lt],Dt[Lt]=null}var Et=null,Ct=null,Ne=!1,Zt=null;function Qw(e,n){var r=Ft(5,null,null,0);r.elementType="DELETED",r.stateNode=n,r.return=e,n=e.deletions,n===null?(e.deletions=[r],e.flags|=16):n.push(r)}function py(e,n){switch(e.tag){case 5:var r=e.type;return n=n.nodeType!==1||r.toLowerCase()!==n.nodeName.toLowerCase()?null:n,n!==null?(e.stateNode=n,Et=e,Ct=vr(n.firstChild),!0):!1;case 6:return n=e.pendingProps===""||n.nodeType!==3?null:n,n!==null?(e.stateNode=n,Et=e,Ct=null,!0):!1;case 13:return n=n.nodeType!==8?null:n,n!==null?(r=oo!==null?{id:$n,overflow:On}:null,e.memoizedState={dehydrated:n,treeContext:r,retryLane:1073741824},r=Ft(18,null,null,0),r.stateNode=n,r.return=e,e.child=r,Et=e,Ct=null,!0):!1;default:return!1}}function Ud(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Gd(e){if(Ne){var n=Ct;if(n){var r=n;if(!py(e,n)){if(Ud(e))throw Error(q(418));n=vr(r.nextSibling);var o=Et;n&&py(e,n)?Qw(o,r):(e.flags=e.flags&-4097|2,Ne=!1,Et=e)}}else{if(Ud(e))throw Error(q(418));e.flags=e.flags&-4097|2,Ne=!1,Et=e}}}function hy(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Et=e}function qa(e){if(e!==Et)return!1;if(!Ne)return hy(e),Ne=!0,!1;var n;if((n=e.tag!==3)&&!(n=e.tag!==5)&&(n=e.type,n=n!=="head"&&n!=="body"&&!Vd(e.type,e.memoizedProps)),n&&(n=Ct)){if(Ud(e))throw Jw(),Error(q(418));for(;n;)Qw(e,n),n=vr(n.nextSibling)}if(hy(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(q(317));e:{for(e=e.nextSibling,n=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(n===0){Ct=vr(e.nextSibling);break e}n--}else r!=="$"&&r!=="$!"&&r!=="$?"||n++}e=e.nextSibling}Ct=null}}else Ct=Et?vr(e.stateNode.nextSibling):null;return!0}function Jw(){for(var e=Ct;e;)e=vr(e.nextSibling)}function ai(){Ct=Et=null,Ne=!1}function Ph(e){Zt===null?Zt=[e]:Zt.push(e)}var uM=Xn.ReactCurrentBatchConfig;function Ui(e,n,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(q(309));var o=r.stateNode}if(!o)throw Error(q(147,e));var i=o,s=""+e;return n!==null&&n.ref!==null&&typeof n.ref=="function"&&n.ref._stringRef===s?n.ref:(n=function(a){var l=i.refs;a===null?delete l[s]:l[s]=a},n._stringRef=s,n)}if(typeof e!="string")throw Error(q(284));if(!r._owner)throw Error(q(290,e))}return e}function Za(e,n){throw e=Object.prototype.toString.call(n),Error(q(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e))}function my(e){var n=e._init;return n(e._payload)}function e1(e){function n(y,x){if(e){var w=y.deletions;w===null?(y.deletions=[x],y.flags|=16):w.push(x)}}function r(y,x){if(!e)return null;for(;x!==null;)n(y,x),x=x.sibling;return null}function o(y,x){for(y=new Map;x!==null;)x.key!==null?y.set(x.key,x):y.set(x.index,x),x=x.sibling;return y}function i(y,x){return y=_r(y,x),y.index=0,y.sibling=null,y}function s(y,x,w){return y.index=w,e?(w=y.alternate,w!==null?(w=w.index,w<x?(y.flags|=2,x):w):(y.flags|=2,x)):(y.flags|=1048576,x)}function a(y){return e&&y.alternate===null&&(y.flags|=2),y}function l(y,x,w,S){return x===null||x.tag!==6?(x=Df(w,y.mode,S),x.return=y,x):(x=i(x,w),x.return=y,x)}function c(y,x,w,S){var C=w.type;return C===Oo?d(y,x,w.props.children,S,w.key):x!==null&&(x.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===sr&&my(C)===x.type)?(S=i(x,w.props),S.ref=Ui(y,x,w),S.return=y,S):(S=Ll(w.type,w.key,w.props,null,y.mode,S),S.ref=Ui(y,x,w),S.return=y,S)}function u(y,x,w,S){return x===null||x.tag!==4||x.stateNode.containerInfo!==w.containerInfo||x.stateNode.implementation!==w.implementation?(x=Lf(w,y.mode,S),x.return=y,x):(x=i(x,w.children||[]),x.return=y,x)}function d(y,x,w,S,C){return x===null||x.tag!==7?(x=Jr(w,y.mode,S,C),x.return=y,x):(x=i(x,w),x.return=y,x)}function f(y,x,w){if(typeof x=="string"&&x!==""||typeof x=="number")return x=Df(""+x,y.mode,w),x.return=y,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Fa:return w=Ll(x.type,x.key,x.props,null,y.mode,w),w.ref=Ui(y,null,x),w.return=y,w;case $o:return x=Lf(x,y.mode,w),x.return=y,x;case sr:var S=x._init;return f(y,S(x._payload),w)}if(ss(x)||Fi(x))return x=Jr(x,y.mode,w,null),x.return=y,x;Za(y,x)}return null}function p(y,x,w,S){var C=x!==null?x.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return C!==null?null:l(y,x,""+w,S);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Fa:return w.key===C?c(y,x,w,S):null;case $o:return w.key===C?u(y,x,w,S):null;case sr:return C=w._init,p(y,x,C(w._payload),S)}if(ss(w)||Fi(w))return C!==null?null:d(y,x,w,S,null);Za(y,w)}return null}function m(y,x,w,S,C){if(typeof S=="string"&&S!==""||typeof S=="number")return y=y.get(w)||null,l(x,y,""+S,C);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Fa:return y=y.get(S.key===null?w:S.key)||null,c(x,y,S,C);case $o:return y=y.get(S.key===null?w:S.key)||null,u(x,y,S,C);case sr:var E=S._init;return m(y,x,w,E(S._payload),C)}if(ss(S)||Fi(S))return y=y.get(w)||null,d(x,y,S,C,null);Za(x,S)}return null}function g(y,x,w,S){for(var C=null,E=null,k=x,N=x=0,j=null;k!==null&&N<w.length;N++){k.index>N?(j=k,k=null):j=k.sibling;var $=p(y,k,w[N],S);if($===null){k===null&&(k=j);break}e&&k&&$.alternate===null&&n(y,k),x=s($,x,N),E===null?C=$:E.sibling=$,E=$,k=j}if(N===w.length)return r(y,k),Ne&&Wr(y,N),C;if(k===null){for(;N<w.length;N++)k=f(y,w[N],S),k!==null&&(x=s(k,x,N),E===null?C=k:E.sibling=k,E=k);return Ne&&Wr(y,N),C}for(k=o(y,k);N<w.length;N++)j=m(k,y,N,w[N],S),j!==null&&(e&&j.alternate!==null&&k.delete(j.key===null?N:j.key),x=s(j,x,N),E===null?C=j:E.sibling=j,E=j);return e&&k.forEach(function(I){return n(y,I)}),Ne&&Wr(y,N),C}function b(y,x,w,S){var C=Fi(w);if(typeof C!="function")throw Error(q(150));if(w=C.call(w),w==null)throw Error(q(151));for(var E=C=null,k=x,N=x=0,j=null,$=w.next();k!==null&&!$.done;N++,$=w.next()){k.index>N?(j=k,k=null):j=k.sibling;var I=p(y,k,$.value,S);if(I===null){k===null&&(k=j);break}e&&k&&I.alternate===null&&n(y,k),x=s(I,x,N),E===null?C=I:E.sibling=I,E=I,k=j}if($.done)return r(y,k),Ne&&Wr(y,N),C;if(k===null){for(;!$.done;N++,$=w.next())$=f(y,$.value,S),$!==null&&(x=s($,x,N),E===null?C=$:E.sibling=$,E=$);return Ne&&Wr(y,N),C}for(k=o(y,k);!$.done;N++,$=w.next())$=m(k,y,N,$.value,S),$!==null&&(e&&$.alternate!==null&&k.delete($.key===null?N:$.key),x=s($,x,N),E===null?C=$:E.sibling=$,E=$);return e&&k.forEach(function(O){return n(y,O)}),Ne&&Wr(y,N),C}function _(y,x,w,S){if(typeof w=="object"&&w!==null&&w.type===Oo&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Fa:e:{for(var C=w.key,E=x;E!==null;){if(E.key===C){if(C=w.type,C===Oo){if(E.tag===7){r(y,E.sibling),x=i(E,w.props.children),x.return=y,y=x;break e}}else if(E.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===sr&&my(C)===E.type){r(y,E.sibling),x=i(E,w.props),x.ref=Ui(y,E,w),x.return=y,y=x;break e}r(y,E);break}else n(y,E);E=E.sibling}w.type===Oo?(x=Jr(w.props.children,y.mode,S,w.key),x.return=y,y=x):(S=Ll(w.type,w.key,w.props,null,y.mode,S),S.ref=Ui(y,x,w),S.return=y,y=S)}return a(y);case $o:e:{for(E=w.key;x!==null;){if(x.key===E)if(x.tag===4&&x.stateNode.containerInfo===w.containerInfo&&x.stateNode.implementation===w.implementation){r(y,x.sibling),x=i(x,w.children||[]),x.return=y,y=x;break e}else{r(y,x);break}else n(y,x);x=x.sibling}x=Lf(w,y.mode,S),x.return=y,y=x}return a(y);case sr:return E=w._init,_(y,x,E(w._payload),S)}if(ss(w))return g(y,x,w,S);if(Fi(w))return b(y,x,w,S);Za(y,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,x!==null&&x.tag===6?(r(y,x.sibling),x=i(x,w),x.return=y,y=x):(r(y,x),x=Df(w,y.mode,S),x.return=y,y=x),a(y)):r(y,x)}return _}var li=e1(!0),t1=e1(!1),cc=Ar(null),uc=null,Wo=null,Rh=null;function Mh(){Rh=Wo=uc=null}function jh(e){var n=cc.current;Ee(cc),e._currentValue=n}function Yd(e,n,r){for(;e!==null;){var o=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,o!==null&&(o.childLanes|=n)):o!==null&&(o.childLanes&n)!==n&&(o.childLanes|=n),e===r)break;e=e.return}}function Jo(e,n){uc=e,Rh=Wo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&n&&(dt=!0),e.firstContext=null)}function Ht(e){var n=e._currentValue;if(Rh!==e)if(e={context:e,memoizedValue:n,next:null},Wo===null){if(uc===null)throw Error(q(308));Wo=e,uc.dependencies={lanes:0,firstContext:e}}else Wo=Wo.next=e;return n}var Kr=null;function Ah(e){Kr===null?Kr=[e]:Kr.push(e)}function n1(e,n,r,o){var i=n.interleaved;return i===null?(r.next=r,Ah(n)):(r.next=i.next,i.next=r),n.interleaved=r,Hn(e,o)}function Hn(e,n){e.lanes|=n;var r=e.alternate;for(r!==null&&(r.lanes|=n),r=e,e=e.return;e!==null;)e.childLanes|=n,r=e.alternate,r!==null&&(r.childLanes|=n),r=e,e=e.return;return r.tag===3?r.stateNode:null}var ar=!1;function Th(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function r1(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function zn(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function xr(e,n,r){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,me&2){var i=o.pending;return i===null?n.next=n:(n.next=i.next,i.next=n),o.pending=n,Hn(e,r)}return i=o.interleaved,i===null?(n.next=n,Ah(o)):(n.next=i.next,i.next=n),o.interleaved=n,Hn(e,r)}function Al(e,n,r){if(n=n.updateQueue,n!==null&&(n=n.shared,(r&4194240)!==0)){var o=n.lanes;o&=e.pendingLanes,r|=o,n.lanes=r,vh(e,r)}}function gy(e,n){var r=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,r===o)){var i=null,s=null;if(r=r.firstBaseUpdate,r!==null){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};s===null?i=s=a:s=s.next=a,r=r.next}while(r!==null);s===null?i=s=n:s=s.next=n}else i=s=n;r={baseState:o.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:o.shared,effects:o.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=n:e.next=n,r.lastBaseUpdate=n}function fc(e,n,r,o){var i=e.updateQueue;ar=!1;var s=i.firstBaseUpdate,a=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var c=l,u=c.next;c.next=null,a===null?s=u:a.next=u,a=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==a&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(s!==null){var f=i.baseState;a=0,d=u=c=null,l=s;do{var p=l.lane,m=l.eventTime;if((o&p)===p){d!==null&&(d=d.next={eventTime:m,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var g=e,b=l;switch(p=n,m=r,b.tag){case 1:if(g=b.payload,typeof g=="function"){f=g.call(m,f,p);break e}f=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=b.payload,p=typeof g=="function"?g.call(m,f,p):g,p==null)break e;f=Ie({},f,p);break e;case 2:ar=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,p=i.effects,p===null?i.effects=[l]:p.push(l))}else m={eventTime:m,lane:p,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=m,c=f):d=d.next=m,a|=p;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;p=l,l=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(!0);if(d===null&&(c=f),i.baseState=c,i.firstBaseUpdate=u,i.lastBaseUpdate=d,n=i.shared.interleaved,n!==null){i=n;do a|=i.lane,i=i.next;while(i!==n)}else s===null&&(i.shared.lanes=0);so|=a,e.lanes=a,e.memoizedState=f}}function yy(e,n,r){if(e=n.effects,n.effects=null,e!==null)for(n=0;n<e.length;n++){var o=e[n],i=o.callback;if(i!==null){if(o.callback=null,o=r,typeof i!="function")throw Error(q(191,i));i.call(o)}}}var ha={},xn=Ar(ha),Bs=Ar(ha),Hs=Ar(ha);function qr(e){if(e===ha)throw Error(q(174));return e}function Ih(e,n){switch(be(Hs,n),be(Bs,e),be(xn,ha),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:Nd(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=Nd(n,e)}Ee(xn),be(xn,n)}function ci(){Ee(xn),Ee(Bs),Ee(Hs)}function o1(e){qr(Hs.current);var n=qr(xn.current),r=Nd(n,e.type);n!==r&&(be(Bs,e),be(xn,r))}function $h(e){Bs.current===e&&(Ee(xn),Ee(Bs))}var je=Ar(0);function dc(e){for(var n=e;n!==null;){if(n.tag===13){var r=n.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if(n.flags&128)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var jf=[];function Oh(){for(var e=0;e<jf.length;e++)jf[e]._workInProgressVersionPrimary=null;jf.length=0}var Tl=Xn.ReactCurrentDispatcher,Af=Xn.ReactCurrentBatchConfig,io=0,Ae=null,Ve=null,We=null,pc=!1,ws=!1,Ws=0,fM=0;function qe(){throw Error(q(321))}function Dh(e,n){if(n===null)return!1;for(var r=0;r<n.length&&r<e.length;r++)if(!on(e[r],n[r]))return!1;return!0}function Lh(e,n,r,o,i,s){if(io=s,Ae=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,Tl.current=e===null||e.memoizedState===null?mM:gM,e=r(o,i),ws){s=0;do{if(ws=!1,Ws=0,25<=s)throw Error(q(301));s+=1,We=Ve=null,n.updateQueue=null,Tl.current=yM,e=r(o,i)}while(ws)}if(Tl.current=hc,n=Ve!==null&&Ve.next!==null,io=0,We=Ve=Ae=null,pc=!1,n)throw Error(q(300));return e}function zh(){var e=Ws!==0;return Ws=0,e}function dn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return We===null?Ae.memoizedState=We=e:We=We.next=e,We}function Wt(){if(Ve===null){var e=Ae.alternate;e=e!==null?e.memoizedState:null}else e=Ve.next;var n=We===null?Ae.memoizedState:We.next;if(n!==null)We=n,Ve=e;else{if(e===null)throw Error(q(310));Ve=e,e={memoizedState:Ve.memoizedState,baseState:Ve.baseState,baseQueue:Ve.baseQueue,queue:Ve.queue,next:null},We===null?Ae.memoizedState=We=e:We=We.next=e}return We}function Us(e,n){return typeof n=="function"?n(e):n}function Tf(e){var n=Wt(),r=n.queue;if(r===null)throw Error(q(311));r.lastRenderedReducer=e;var o=Ve,i=o.baseQueue,s=r.pending;if(s!==null){if(i!==null){var a=i.next;i.next=s.next,s.next=a}o.baseQueue=i=s,r.pending=null}if(i!==null){s=i.next,o=o.baseState;var l=a=null,c=null,u=s;do{var d=u.lane;if((io&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),o=u.hasEagerState?u.eagerState:e(o,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=f,a=o):c=c.next=f,Ae.lanes|=d,so|=d}u=u.next}while(u!==null&&u!==s);c===null?a=o:c.next=l,on(o,n.memoizedState)||(dt=!0),n.memoizedState=o,n.baseState=a,n.baseQueue=c,r.lastRenderedState=o}if(e=r.interleaved,e!==null){i=e;do s=i.lane,Ae.lanes|=s,so|=s,i=i.next;while(i!==e)}else i===null&&(r.lanes=0);return[n.memoizedState,r.dispatch]}function If(e){var n=Wt(),r=n.queue;if(r===null)throw Error(q(311));r.lastRenderedReducer=e;var o=r.dispatch,i=r.pending,s=n.memoizedState;if(i!==null){r.pending=null;var a=i=i.next;do s=e(s,a.action),a=a.next;while(a!==i);on(s,n.memoizedState)||(dt=!0),n.memoizedState=s,n.baseQueue===null&&(n.baseState=s),r.lastRenderedState=s}return[s,o]}function i1(){}function s1(e,n){var r=Ae,o=Wt(),i=n(),s=!on(o.memoizedState,i);if(s&&(o.memoizedState=i,dt=!0),o=o.queue,Fh(c1.bind(null,r,o,e),[e]),o.getSnapshot!==n||s||We!==null&&We.memoizedState.tag&1){if(r.flags|=2048,Gs(9,l1.bind(null,r,o,i,n),void 0,null),Ue===null)throw Error(q(349));io&30||a1(r,n,i)}return i}function a1(e,n,r){e.flags|=16384,e={getSnapshot:n,value:r},n=Ae.updateQueue,n===null?(n={lastEffect:null,stores:null},Ae.updateQueue=n,n.stores=[e]):(r=n.stores,r===null?n.stores=[e]:r.push(e))}function l1(e,n,r,o){n.value=r,n.getSnapshot=o,u1(n)&&f1(e)}function c1(e,n,r){return r(function(){u1(n)&&f1(e)})}function u1(e){var n=e.getSnapshot;e=e.value;try{var r=n();return!on(e,r)}catch{return!0}}function f1(e){var n=Hn(e,1);n!==null&&rn(n,e,1,-1)}function vy(e){var n=dn();return typeof e=="function"&&(e=e()),n.memoizedState=n.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Us,lastRenderedState:e},n.queue=e,e=e.dispatch=hM.bind(null,Ae,e),[n.memoizedState,e]}function Gs(e,n,r,o){return e={tag:e,create:n,destroy:r,deps:o,next:null},n=Ae.updateQueue,n===null?(n={lastEffect:null,stores:null},Ae.updateQueue=n,n.lastEffect=e.next=e):(r=n.lastEffect,r===null?n.lastEffect=e.next=e:(o=r.next,r.next=e,e.next=o,n.lastEffect=e)),e}function d1(){return Wt().memoizedState}function Il(e,n,r,o){var i=dn();Ae.flags|=e,i.memoizedState=Gs(1|n,r,void 0,o===void 0?null:o)}function fu(e,n,r,o){var i=Wt();o=o===void 0?null:o;var s=void 0;if(Ve!==null){var a=Ve.memoizedState;if(s=a.destroy,o!==null&&Dh(o,a.deps)){i.memoizedState=Gs(n,r,s,o);return}}Ae.flags|=e,i.memoizedState=Gs(1|n,r,s,o)}function xy(e,n){return Il(8390656,8,e,n)}function Fh(e,n){return fu(2048,8,e,n)}function p1(e,n){return fu(4,2,e,n)}function h1(e,n){return fu(4,4,e,n)}function m1(e,n){if(typeof n=="function")return e=e(),n(e),function(){n(null)};if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function g1(e,n,r){return r=r!=null?r.concat([e]):null,fu(4,4,m1.bind(null,n,e),r)}function Vh(){}function y1(e,n){var r=Wt();n=n===void 0?null:n;var o=r.memoizedState;return o!==null&&n!==null&&Dh(n,o[1])?o[0]:(r.memoizedState=[e,n],e)}function v1(e,n){var r=Wt();n=n===void 0?null:n;var o=r.memoizedState;return o!==null&&n!==null&&Dh(n,o[1])?o[0]:(e=e(),r.memoizedState=[e,n],e)}function x1(e,n,r){return io&21?(on(r,n)||(r=Cw(),Ae.lanes|=r,so|=r,e.baseState=!0),n):(e.baseState&&(e.baseState=!1,dt=!0),e.memoizedState=r)}function dM(e,n){var r=xe;xe=r!==0&&4>r?r:4,e(!0);var o=Af.transition;Af.transition={};try{e(!1),n()}finally{xe=r,Af.transition=o}}function w1(){return Wt().memoizedState}function pM(e,n,r){var o=br(e);if(r={lane:o,action:r,hasEagerState:!1,eagerState:null,next:null},b1(e))_1(n,r);else if(r=n1(e,n,r,o),r!==null){var i=it();rn(r,e,o,i),S1(r,n,o)}}function hM(e,n,r){var o=br(e),i={lane:o,action:r,hasEagerState:!1,eagerState:null,next:null};if(b1(e))_1(n,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=n.lastRenderedReducer,s!==null))try{var a=n.lastRenderedState,l=s(a,r);if(i.hasEagerState=!0,i.eagerState=l,on(l,a)){var c=n.interleaved;c===null?(i.next=i,Ah(n)):(i.next=c.next,c.next=i),n.interleaved=i;return}}catch{}finally{}r=n1(e,n,i,o),r!==null&&(i=it(),rn(r,e,o,i),S1(r,n,o))}}function b1(e){var n=e.alternate;return e===Ae||n!==null&&n===Ae}function _1(e,n){ws=pc=!0;var r=e.pending;r===null?n.next=n:(n.next=r.next,r.next=n),e.pending=n}function S1(e,n,r){if(r&4194240){var o=n.lanes;o&=e.pendingLanes,r|=o,n.lanes=r,vh(e,r)}}var hc={readContext:Ht,useCallback:qe,useContext:qe,useEffect:qe,useImperativeHandle:qe,useInsertionEffect:qe,useLayoutEffect:qe,useMemo:qe,useReducer:qe,useRef:qe,useState:qe,useDebugValue:qe,useDeferredValue:qe,useTransition:qe,useMutableSource:qe,useSyncExternalStore:qe,useId:qe,unstable_isNewReconciler:!1},mM={readContext:Ht,useCallback:function(e,n){return dn().memoizedState=[e,n===void 0?null:n],e},useContext:Ht,useEffect:xy,useImperativeHandle:function(e,n,r){return r=r!=null?r.concat([e]):null,Il(4194308,4,m1.bind(null,n,e),r)},useLayoutEffect:function(e,n){return Il(4194308,4,e,n)},useInsertionEffect:function(e,n){return Il(4,2,e,n)},useMemo:function(e,n){var r=dn();return n=n===void 0?null:n,e=e(),r.memoizedState=[e,n],e},useReducer:function(e,n,r){var o=dn();return n=r!==void 0?r(n):n,o.memoizedState=o.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},o.queue=e,e=e.dispatch=pM.bind(null,Ae,e),[o.memoizedState,e]},useRef:function(e){var n=dn();return e={current:e},n.memoizedState=e},useState:vy,useDebugValue:Vh,useDeferredValue:function(e){return dn().memoizedState=e},useTransition:function(){var e=vy(!1),n=e[0];return e=dM.bind(null,e[1]),dn().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,r){var o=Ae,i=dn();if(Ne){if(r===void 0)throw Error(q(407));r=r()}else{if(r=n(),Ue===null)throw Error(q(349));io&30||a1(o,n,r)}i.memoizedState=r;var s={value:r,getSnapshot:n};return i.queue=s,xy(c1.bind(null,o,s,e),[e]),o.flags|=2048,Gs(9,l1.bind(null,o,s,r,n),void 0,null),r},useId:function(){var e=dn(),n=Ue.identifierPrefix;if(Ne){var r=On,o=$n;r=(o&~(1<<32-nn(o)-1)).toString(32)+r,n=":"+n+"R"+r,r=Ws++,0<r&&(n+="H"+r.toString(32)),n+=":"}else r=fM++,n=":"+n+"r"+r.toString(32)+":";return e.memoizedState=n},unstable_isNewReconciler:!1},gM={readContext:Ht,useCallback:y1,useContext:Ht,useEffect:Fh,useImperativeHandle:g1,useInsertionEffect:p1,useLayoutEffect:h1,useMemo:v1,useReducer:Tf,useRef:d1,useState:function(){return Tf(Us)},useDebugValue:Vh,useDeferredValue:function(e){var n=Wt();return x1(n,Ve.memoizedState,e)},useTransition:function(){var e=Tf(Us)[0],n=Wt().memoizedState;return[e,n]},useMutableSource:i1,useSyncExternalStore:s1,useId:w1,unstable_isNewReconciler:!1},yM={readContext:Ht,useCallback:y1,useContext:Ht,useEffect:Fh,useImperativeHandle:g1,useInsertionEffect:p1,useLayoutEffect:h1,useMemo:v1,useReducer:If,useRef:d1,useState:function(){return If(Us)},useDebugValue:Vh,useDeferredValue:function(e){var n=Wt();return Ve===null?n.memoizedState=e:x1(n,Ve.memoizedState,e)},useTransition:function(){var e=If(Us)[0],n=Wt().memoizedState;return[e,n]},useMutableSource:i1,useSyncExternalStore:s1,useId:w1,unstable_isNewReconciler:!1};function Xt(e,n){if(e&&e.defaultProps){n=Ie({},n),e=e.defaultProps;for(var r in e)n[r]===void 0&&(n[r]=e[r]);return n}return n}function Xd(e,n,r,o){n=e.memoizedState,r=r(o,n),r=r==null?n:Ie({},n,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var du={isMounted:function(e){return(e=e._reactInternals)?vo(e)===e:!1},enqueueSetState:function(e,n,r){e=e._reactInternals;var o=it(),i=br(e),s=zn(o,i);s.payload=n,r!=null&&(s.callback=r),n=xr(e,s,i),n!==null&&(rn(n,e,i,o),Al(n,e,i))},enqueueReplaceState:function(e,n,r){e=e._reactInternals;var o=it(),i=br(e),s=zn(o,i);s.tag=1,s.payload=n,r!=null&&(s.callback=r),n=xr(e,s,i),n!==null&&(rn(n,e,i,o),Al(n,e,i))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var r=it(),o=br(e),i=zn(r,o);i.tag=2,n!=null&&(i.callback=n),n=xr(e,i,o),n!==null&&(rn(n,e,o,r),Al(n,e,o))}};function wy(e,n,r,o,i,s,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,s,a):n.prototype&&n.prototype.isPureReactComponent?!Ls(r,o)||!Ls(i,s):!0}function C1(e,n,r){var o=!1,i=Nr,s=n.contextType;return typeof s=="object"&&s!==null?s=Ht(s):(i=mt(n)?ro:nt.current,o=n.contextTypes,s=(o=o!=null)?si(e,i):Nr),n=new n(r,s),e.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=du,e.stateNode=n,n._reactInternals=e,o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),n}function by(e,n,r,o){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(r,o),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(r,o),n.state!==e&&du.enqueueReplaceState(n,n.state,null)}function Kd(e,n,r,o){var i=e.stateNode;i.props=r,i.state=e.memoizedState,i.refs={},Th(e);var s=n.contextType;typeof s=="object"&&s!==null?i.context=Ht(s):(s=mt(n)?ro:nt.current,i.context=si(e,s)),i.state=e.memoizedState,s=n.getDerivedStateFromProps,typeof s=="function"&&(Xd(e,n,s,r),i.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(n=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),n!==i.state&&du.enqueueReplaceState(i,i.state,null),fc(e,r,i,o),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function ui(e,n){try{var r="",o=n;do r+=UP(o),o=o.return;while(o);var i=r}catch(s){i=`
39
+ Error generating stack: `+s.message+`
40
+ `+s.stack}return{value:e,source:n,stack:i,digest:null}}function $f(e,n,r){return{value:e,source:null,stack:r??null,digest:n??null}}function qd(e,n){try{console.error(n.value)}catch(r){setTimeout(function(){throw r})}}var vM=typeof WeakMap=="function"?WeakMap:Map;function E1(e,n,r){r=zn(-1,r),r.tag=3,r.payload={element:null};var o=n.value;return r.callback=function(){gc||(gc=!0,sp=o),qd(e,n)},r}function k1(e,n,r){r=zn(-1,r),r.tag=3;var o=e.type.getDerivedStateFromError;if(typeof o=="function"){var i=n.value;r.payload=function(){return o(i)},r.callback=function(){qd(e,n)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(r.callback=function(){qd(e,n),typeof o!="function"&&(wr===null?wr=new Set([this]):wr.add(this));var a=n.stack;this.componentDidCatch(n.value,{componentStack:a!==null?a:""})}),r}function _y(e,n,r){var o=e.pingCache;if(o===null){o=e.pingCache=new vM;var i=new Set;o.set(n,i)}else i=o.get(n),i===void 0&&(i=new Set,o.set(n,i));i.has(r)||(i.add(r),e=AM.bind(null,e,n,r),n.then(e,e))}function Sy(e){do{var n;if((n=e.tag===13)&&(n=e.memoizedState,n=n!==null?n.dehydrated!==null:!0),n)return e;e=e.return}while(e!==null);return null}function Cy(e,n,r,o,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===n?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(n=zn(-1,1),n.tag=2,xr(r,n,1))),r.lanes|=1),e)}var xM=Xn.ReactCurrentOwner,dt=!1;function rt(e,n,r,o){n.child=e===null?t1(n,null,r,o):li(n,e.child,r,o)}function Ey(e,n,r,o,i){r=r.render;var s=n.ref;return Jo(n,i),o=Lh(e,n,r,o,s,i),r=zh(),e!==null&&!dt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~i,Wn(e,n,i)):(Ne&&r&&kh(n),n.flags|=1,rt(e,n,o,i),n.child)}function ky(e,n,r,o,i){if(e===null){var s=r.type;return typeof s=="function"&&!Kh(s)&&s.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(n.tag=15,n.type=s,N1(e,n,s,o,i)):(e=Ll(r.type,null,o,n,n.mode,i),e.ref=n.ref,e.return=n,n.child=e)}if(s=e.child,!(e.lanes&i)){var a=s.memoizedProps;if(r=r.compare,r=r!==null?r:Ls,r(a,o)&&e.ref===n.ref)return Wn(e,n,i)}return n.flags|=1,e=_r(s,o),e.ref=n.ref,e.return=n,n.child=e}function N1(e,n,r,o,i){if(e!==null){var s=e.memoizedProps;if(Ls(s,o)&&e.ref===n.ref)if(dt=!1,n.pendingProps=o=s,(e.lanes&i)!==0)e.flags&131072&&(dt=!0);else return n.lanes=e.lanes,Wn(e,n,i)}return Zd(e,n,r,o,i)}function P1(e,n,r){var o=n.pendingProps,i=o.children,s=e!==null?e.memoizedState:null;if(o.mode==="hidden")if(!(n.mode&1))n.memoizedState={baseLanes:0,cachePool:null,transitions:null},be(Go,_t),_t|=r;else{if(!(r&1073741824))return e=s!==null?s.baseLanes|r:r,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e,cachePool:null,transitions:null},n.updateQueue=null,be(Go,_t),_t|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},o=s!==null?s.baseLanes:r,be(Go,_t),_t|=o}else s!==null?(o=s.baseLanes|r,n.memoizedState=null):o=r,be(Go,_t),_t|=o;return rt(e,n,i,r),n.child}function R1(e,n){var r=n.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(n.flags|=512,n.flags|=2097152)}function Zd(e,n,r,o,i){var s=mt(r)?ro:nt.current;return s=si(n,s),Jo(n,i),r=Lh(e,n,r,o,s,i),o=zh(),e!==null&&!dt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~i,Wn(e,n,i)):(Ne&&o&&kh(n),n.flags|=1,rt(e,n,r,i),n.child)}function Ny(e,n,r,o,i){if(mt(r)){var s=!0;sc(n)}else s=!1;if(Jo(n,i),n.stateNode===null)$l(e,n),C1(n,r,o),Kd(n,r,o,i),o=!0;else if(e===null){var a=n.stateNode,l=n.memoizedProps;a.props=l;var c=a.context,u=r.contextType;typeof u=="object"&&u!==null?u=Ht(u):(u=mt(r)?ro:nt.current,u=si(n,u));var d=r.getDerivedStateFromProps,f=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function";f||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==o||c!==u)&&by(n,a,o,u),ar=!1;var p=n.memoizedState;a.state=p,fc(n,o,a,i),c=n.memoizedState,l!==o||p!==c||ht.current||ar?(typeof d=="function"&&(Xd(n,r,d,o),c=n.memoizedState),(l=ar||wy(n,r,l,o,p,c,u))?(f||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(n.flags|=4194308)):(typeof a.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=o,n.memoizedState=c),a.props=o,a.state=c,a.context=u,o=l):(typeof a.componentDidMount=="function"&&(n.flags|=4194308),o=!1)}else{a=n.stateNode,r1(e,n),l=n.memoizedProps,u=n.type===n.elementType?l:Xt(n.type,l),a.props=u,f=n.pendingProps,p=a.context,c=r.contextType,typeof c=="object"&&c!==null?c=Ht(c):(c=mt(r)?ro:nt.current,c=si(n,c));var m=r.getDerivedStateFromProps;(d=typeof m=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==f||p!==c)&&by(n,a,o,c),ar=!1,p=n.memoizedState,a.state=p,fc(n,o,a,i);var g=n.memoizedState;l!==f||p!==g||ht.current||ar?(typeof m=="function"&&(Xd(n,r,m,o),g=n.memoizedState),(u=ar||wy(n,r,u,o,p,g,c)||!1)?(d||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(o,g,c),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(o,g,c)),typeof a.componentDidUpdate=="function"&&(n.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(n.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(n.flags|=1024),n.memoizedProps=o,n.memoizedState=g),a.props=o,a.state=g,a.context=c,o=u):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(n.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(n.flags|=1024),o=!1)}return Qd(e,n,r,o,s,i)}function Qd(e,n,r,o,i,s){R1(e,n);var a=(n.flags&128)!==0;if(!o&&!a)return i&&dy(n,r,!1),Wn(e,n,s);o=n.stateNode,xM.current=n;var l=a&&typeof r.getDerivedStateFromError!="function"?null:o.render();return n.flags|=1,e!==null&&a?(n.child=li(n,e.child,null,s),n.child=li(n,null,l,s)):rt(e,n,l,s),n.memoizedState=o.state,i&&dy(n,r,!0),n.child}function M1(e){var n=e.stateNode;n.pendingContext?fy(e,n.pendingContext,n.pendingContext!==n.context):n.context&&fy(e,n.context,!1),Ih(e,n.containerInfo)}function Py(e,n,r,o,i){return ai(),Ph(i),n.flags|=256,rt(e,n,r,o),n.child}var Jd={dehydrated:null,treeContext:null,retryLane:0};function ep(e){return{baseLanes:e,cachePool:null,transitions:null}}function j1(e,n,r){var o=n.pendingProps,i=je.current,s=!1,a=(n.flags&128)!==0,l;if((l=a)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(s=!0,n.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),be(je,i&1),e===null)return Gd(n),e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(n.mode&1?e.data==="$!"?n.lanes=8:n.lanes=1073741824:n.lanes=1,null):(a=o.children,e=o.fallback,s?(o=n.mode,s=n.child,a={mode:"hidden",children:a},!(o&1)&&s!==null?(s.childLanes=0,s.pendingProps=a):s=mu(a,o,0,null),e=Jr(e,o,r,null),s.return=n,e.return=n,s.sibling=e,n.child=s,n.child.memoizedState=ep(r),n.memoizedState=Jd,e):Bh(n,a));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return wM(e,n,a,o,l,i,r);if(s){s=o.fallback,a=n.mode,i=e.child,l=i.sibling;var c={mode:"hidden",children:o.children};return!(a&1)&&n.child!==i?(o=n.child,o.childLanes=0,o.pendingProps=c,n.deletions=null):(o=_r(i,c),o.subtreeFlags=i.subtreeFlags&14680064),l!==null?s=_r(l,s):(s=Jr(s,a,r,null),s.flags|=2),s.return=n,o.return=n,o.sibling=s,n.child=o,o=s,s=n.child,a=e.child.memoizedState,a=a===null?ep(r):{baseLanes:a.baseLanes|r,cachePool:null,transitions:a.transitions},s.memoizedState=a,s.childLanes=e.childLanes&~r,n.memoizedState=Jd,o}return s=e.child,e=s.sibling,o=_r(s,{mode:"visible",children:o.children}),!(n.mode&1)&&(o.lanes=r),o.return=n,o.sibling=null,e!==null&&(r=n.deletions,r===null?(n.deletions=[e],n.flags|=16):r.push(e)),n.child=o,n.memoizedState=null,o}function Bh(e,n){return n=mu({mode:"visible",children:n},e.mode,0,null),n.return=e,e.child=n}function Qa(e,n,r,o){return o!==null&&Ph(o),li(n,e.child,null,r),e=Bh(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function wM(e,n,r,o,i,s,a){if(r)return n.flags&256?(n.flags&=-257,o=$f(Error(q(422))),Qa(e,n,a,o)):n.memoizedState!==null?(n.child=e.child,n.flags|=128,null):(s=o.fallback,i=n.mode,o=mu({mode:"visible",children:o.children},i,0,null),s=Jr(s,i,a,null),s.flags|=2,o.return=n,s.return=n,o.sibling=s,n.child=o,n.mode&1&&li(n,e.child,null,a),n.child.memoizedState=ep(a),n.memoizedState=Jd,s);if(!(n.mode&1))return Qa(e,n,a,null);if(i.data==="$!"){if(o=i.nextSibling&&i.nextSibling.dataset,o)var l=o.dgst;return o=l,s=Error(q(419)),o=$f(s,o,void 0),Qa(e,n,a,o)}if(l=(a&e.childLanes)!==0,dt||l){if(o=Ue,o!==null){switch(a&-a){case 4:i=2;break;case 16:i=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:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(o.suspendedLanes|a)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,Hn(e,i),rn(o,e,i,-1))}return Xh(),o=$f(Error(q(421))),Qa(e,n,a,o)}return i.data==="$?"?(n.flags|=128,n.child=e.child,n=TM.bind(null,e),i._reactRetry=n,null):(e=s.treeContext,Ct=vr(i.nextSibling),Et=n,Ne=!0,Zt=null,e!==null&&(Dt[Lt++]=$n,Dt[Lt++]=On,Dt[Lt++]=oo,$n=e.id,On=e.overflow,oo=n),n=Bh(n,o.children),n.flags|=4096,n)}function Ry(e,n,r){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n),Yd(e.return,n,r)}function Of(e,n,r,o,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:o,tail:r,tailMode:i}:(s.isBackwards=n,s.rendering=null,s.renderingStartTime=0,s.last=o,s.tail=r,s.tailMode=i)}function A1(e,n,r){var o=n.pendingProps,i=o.revealOrder,s=o.tail;if(rt(e,n,o.children,r),o=je.current,o&2)o=o&1|2,n.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ry(e,r,n);else if(e.tag===19)Ry(e,r,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}o&=1}if(be(je,o),!(n.mode&1))n.memoizedState=null;else switch(i){case"forwards":for(r=n.child,i=null;r!==null;)e=r.alternate,e!==null&&dc(e)===null&&(i=r),r=r.sibling;r=i,r===null?(i=n.child,n.child=null):(i=r.sibling,r.sibling=null),Of(n,!1,i,r,s);break;case"backwards":for(r=null,i=n.child,n.child=null;i!==null;){if(e=i.alternate,e!==null&&dc(e)===null){n.child=i;break}e=i.sibling,i.sibling=r,r=i,i=e}Of(n,!0,r,null,s);break;case"together":Of(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function $l(e,n){!(n.mode&1)&&e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2)}function Wn(e,n,r){if(e!==null&&(n.dependencies=e.dependencies),so|=n.lanes,!(r&n.childLanes))return null;if(e!==null&&n.child!==e.child)throw Error(q(153));if(n.child!==null){for(e=n.child,r=_r(e,e.pendingProps),n.child=r,r.return=n;e.sibling!==null;)e=e.sibling,r=r.sibling=_r(e,e.pendingProps),r.return=n;r.sibling=null}return n.child}function bM(e,n,r){switch(n.tag){case 3:M1(n),ai();break;case 5:o1(n);break;case 1:mt(n.type)&&sc(n);break;case 4:Ih(n,n.stateNode.containerInfo);break;case 10:var o=n.type._context,i=n.memoizedProps.value;be(cc,o._currentValue),o._currentValue=i;break;case 13:if(o=n.memoizedState,o!==null)return o.dehydrated!==null?(be(je,je.current&1),n.flags|=128,null):r&n.child.childLanes?j1(e,n,r):(be(je,je.current&1),e=Wn(e,n,r),e!==null?e.sibling:null);be(je,je.current&1);break;case 19:if(o=(r&n.childLanes)!==0,e.flags&128){if(o)return A1(e,n,r);n.flags|=128}if(i=n.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),be(je,je.current),o)break;return null;case 22:case 23:return n.lanes=0,P1(e,n,r)}return Wn(e,n,r)}var T1,tp,I1,$1;T1=function(e,n){for(var r=n.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};tp=function(){};I1=function(e,n,r,o){var i=e.memoizedProps;if(i!==o){e=n.stateNode,qr(xn.current);var s=null;switch(r){case"input":i=Sd(e,i),o=Sd(e,o),s=[];break;case"select":i=Ie({},i,{value:void 0}),o=Ie({},o,{value:void 0}),s=[];break;case"textarea":i=kd(e,i),o=kd(e,o),s=[];break;default:typeof i.onClick!="function"&&typeof o.onClick=="function"&&(e.onclick=oc)}Pd(r,o);var a;r=null;for(u in i)if(!o.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var l=i[u];for(a in l)l.hasOwnProperty(a)&&(r||(r={}),r[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(js.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in o){var c=o[u];if(l=i!=null?i[u]:void 0,o.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(a in l)!l.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(r||(r={}),r[a]="");for(a in c)c.hasOwnProperty(a)&&l[a]!==c[a]&&(r||(r={}),r[a]=c[a])}else r||(s||(s=[]),s.push(u,r)),r=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(s=s||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(s=s||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(js.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&Se("scroll",e),s||l===c||(s=[])):(s=s||[]).push(u,c))}r&&(s=s||[]).push("style",r);var u=s;(n.updateQueue=u)&&(n.flags|=4)}};$1=function(e,n,r,o){r!==o&&(n.flags|=4)};function Gi(e,n){if(!Ne)switch(e.tailMode){case"hidden":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var o=null;r!==null;)r.alternate!==null&&(o=r),r=r.sibling;o===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function Ze(e){var n=e.alternate!==null&&e.alternate.child===e.child,r=0,o=0;if(n)for(var i=e.child;i!==null;)r|=i.lanes|i.childLanes,o|=i.subtreeFlags&14680064,o|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)r|=i.lanes|i.childLanes,o|=i.subtreeFlags,o|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=o,e.childLanes=r,n}function _M(e,n,r){var o=n.pendingProps;switch(Nh(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ze(n),null;case 1:return mt(n.type)&&ic(),Ze(n),null;case 3:return o=n.stateNode,ci(),Ee(ht),Ee(nt),Oh(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(qa(n)?n.flags|=4:e===null||e.memoizedState.isDehydrated&&!(n.flags&256)||(n.flags|=1024,Zt!==null&&(cp(Zt),Zt=null))),tp(e,n),Ze(n),null;case 5:$h(n);var i=qr(Hs.current);if(r=n.type,e!==null&&n.stateNode!=null)I1(e,n,r,o,i),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!o){if(n.stateNode===null)throw Error(q(166));return Ze(n),null}if(e=qr(xn.current),qa(n)){o=n.stateNode,r=n.type;var s=n.memoizedProps;switch(o[hn]=n,o[Vs]=s,e=(n.mode&1)!==0,r){case"dialog":Se("cancel",o),Se("close",o);break;case"iframe":case"object":case"embed":Se("load",o);break;case"video":case"audio":for(i=0;i<ls.length;i++)Se(ls[i],o);break;case"source":Se("error",o);break;case"img":case"image":case"link":Se("error",o),Se("load",o);break;case"details":Se("toggle",o);break;case"input":Lg(o,s),Se("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!s.multiple},Se("invalid",o);break;case"textarea":Fg(o,s),Se("invalid",o)}Pd(r,s),i=null;for(var a in s)if(s.hasOwnProperty(a)){var l=s[a];a==="children"?typeof l=="string"?o.textContent!==l&&(s.suppressHydrationWarning!==!0&&Ka(o.textContent,l,e),i=["children",l]):typeof l=="number"&&o.textContent!==""+l&&(s.suppressHydrationWarning!==!0&&Ka(o.textContent,l,e),i=["children",""+l]):js.hasOwnProperty(a)&&l!=null&&a==="onScroll"&&Se("scroll",o)}switch(r){case"input":Va(o),zg(o,s,!0);break;case"textarea":Va(o),Vg(o);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(o.onclick=oc)}o=i,n.updateQueue=o,o!==null&&(n.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=cw(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=a.createElement(r,{is:o.is}):(e=a.createElement(r),r==="select"&&(a=e,o.multiple?a.multiple=!0:o.size&&(a.size=o.size))):e=a.createElementNS(e,r),e[hn]=n,e[Vs]=o,T1(e,n,!1,!1),n.stateNode=e;e:{switch(a=Rd(r,o),r){case"dialog":Se("cancel",e),Se("close",e),i=o;break;case"iframe":case"object":case"embed":Se("load",e),i=o;break;case"video":case"audio":for(i=0;i<ls.length;i++)Se(ls[i],e);i=o;break;case"source":Se("error",e),i=o;break;case"img":case"image":case"link":Se("error",e),Se("load",e),i=o;break;case"details":Se("toggle",e),i=o;break;case"input":Lg(e,o),i=Sd(e,o),Se("invalid",e);break;case"option":i=o;break;case"select":e._wrapperState={wasMultiple:!!o.multiple},i=Ie({},o,{value:void 0}),Se("invalid",e);break;case"textarea":Fg(e,o),i=kd(e,o),Se("invalid",e);break;default:i=o}Pd(r,i),l=i;for(s in l)if(l.hasOwnProperty(s)){var c=l[s];s==="style"?dw(e,c):s==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&uw(e,c)):s==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&As(e,c):typeof c=="number"&&As(e,""+c):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(js.hasOwnProperty(s)?c!=null&&s==="onScroll"&&Se("scroll",e):c!=null&&dh(e,s,c,a))}switch(r){case"input":Va(e),zg(e,o,!1);break;case"textarea":Va(e),Vg(e);break;case"option":o.value!=null&&e.setAttribute("value",""+kr(o.value));break;case"select":e.multiple=!!o.multiple,s=o.value,s!=null?Ko(e,!!o.multiple,s,!1):o.defaultValue!=null&&Ko(e,!!o.multiple,o.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=oc)}switch(r){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}}o&&(n.flags|=4)}n.ref!==null&&(n.flags|=512,n.flags|=2097152)}return Ze(n),null;case 6:if(e&&n.stateNode!=null)$1(e,n,e.memoizedProps,o);else{if(typeof o!="string"&&n.stateNode===null)throw Error(q(166));if(r=qr(Hs.current),qr(xn.current),qa(n)){if(o=n.stateNode,r=n.memoizedProps,o[hn]=n,(s=o.nodeValue!==r)&&(e=Et,e!==null))switch(e.tag){case 3:Ka(o.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ka(o.nodeValue,r,(e.mode&1)!==0)}s&&(n.flags|=4)}else o=(r.nodeType===9?r:r.ownerDocument).createTextNode(o),o[hn]=n,n.stateNode=o}return Ze(n),null;case 13:if(Ee(je),o=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ne&&Ct!==null&&n.mode&1&&!(n.flags&128))Jw(),ai(),n.flags|=98560,s=!1;else if(s=qa(n),o!==null&&o.dehydrated!==null){if(e===null){if(!s)throw Error(q(318));if(s=n.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(q(317));s[hn]=n}else ai(),!(n.flags&128)&&(n.memoizedState=null),n.flags|=4;Ze(n),s=!1}else Zt!==null&&(cp(Zt),Zt=null),s=!0;if(!s)return n.flags&65536?n:null}return n.flags&128?(n.lanes=r,n):(o=o!==null,o!==(e!==null&&e.memoizedState!==null)&&o&&(n.child.flags|=8192,n.mode&1&&(e===null||je.current&1?Be===0&&(Be=3):Xh())),n.updateQueue!==null&&(n.flags|=4),Ze(n),null);case 4:return ci(),tp(e,n),e===null&&zs(n.stateNode.containerInfo),Ze(n),null;case 10:return jh(n.type._context),Ze(n),null;case 17:return mt(n.type)&&ic(),Ze(n),null;case 19:if(Ee(je),s=n.memoizedState,s===null)return Ze(n),null;if(o=(n.flags&128)!==0,a=s.rendering,a===null)if(o)Gi(s,!1);else{if(Be!==0||e!==null&&e.flags&128)for(e=n.child;e!==null;){if(a=dc(e),a!==null){for(n.flags|=128,Gi(s,!1),o=a.updateQueue,o!==null&&(n.updateQueue=o,n.flags|=4),n.subtreeFlags=0,o=r,r=n.child;r!==null;)s=r,e=o,s.flags&=14680066,a=s.alternate,a===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=a.childLanes,s.lanes=a.lanes,s.child=a.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=a.memoizedProps,s.memoizedState=a.memoizedState,s.updateQueue=a.updateQueue,s.type=a.type,e=a.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return be(je,je.current&1|2),n.child}e=e.sibling}s.tail!==null&&De()>fi&&(n.flags|=128,o=!0,Gi(s,!1),n.lanes=4194304)}else{if(!o)if(e=dc(a),e!==null){if(n.flags|=128,o=!0,r=e.updateQueue,r!==null&&(n.updateQueue=r,n.flags|=4),Gi(s,!0),s.tail===null&&s.tailMode==="hidden"&&!a.alternate&&!Ne)return Ze(n),null}else 2*De()-s.renderingStartTime>fi&&r!==1073741824&&(n.flags|=128,o=!0,Gi(s,!1),n.lanes=4194304);s.isBackwards?(a.sibling=n.child,n.child=a):(r=s.last,r!==null?r.sibling=a:n.child=a,s.last=a)}return s.tail!==null?(n=s.tail,s.rendering=n,s.tail=n.sibling,s.renderingStartTime=De(),n.sibling=null,r=je.current,be(je,o?r&1|2:r&1),n):(Ze(n),null);case 22:case 23:return Yh(),o=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(n.flags|=8192),o&&n.mode&1?_t&1073741824&&(Ze(n),n.subtreeFlags&6&&(n.flags|=8192)):Ze(n),null;case 24:return null;case 25:return null}throw Error(q(156,n.tag))}function SM(e,n){switch(Nh(n),n.tag){case 1:return mt(n.type)&&ic(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return ci(),Ee(ht),Ee(nt),Oh(),e=n.flags,e&65536&&!(e&128)?(n.flags=e&-65537|128,n):null;case 5:return $h(n),null;case 13:if(Ee(je),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(q(340));ai()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return Ee(je),null;case 4:return ci(),null;case 10:return jh(n.type._context),null;case 22:case 23:return Yh(),null;case 24:return null;default:return null}}var Ja=!1,et=!1,CM=typeof WeakSet=="function"?WeakSet:Set,re=null;function Uo(e,n){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(o){Oe(e,n,o)}else r.current=null}function np(e,n,r){try{r()}catch(o){Oe(e,n,o)}}var My=!1;function EM(e,n){if(zd=tc,e=Fw(),Eh(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var o=r.getSelection&&r.getSelection();if(o&&o.rangeCount!==0){r=o.anchorNode;var i=o.anchorOffset,s=o.focusNode;o=o.focusOffset;try{r.nodeType,s.nodeType}catch{r=null;break e}var a=0,l=-1,c=-1,u=0,d=0,f=e,p=null;t:for(;;){for(var m;f!==r||i!==0&&f.nodeType!==3||(l=a+i),f!==s||o!==0&&f.nodeType!==3||(c=a+o),f.nodeType===3&&(a+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break t;if(p===r&&++u===i&&(l=a),p===s&&++d===o&&(c=a),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=l===-1||c===-1?null:{start:l,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(Fd={focusedElem:e,selectionRange:r},tc=!1,re=n;re!==null;)if(n=re,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,re=e;else for(;re!==null;){n=re;try{var g=n.alternate;if(n.flags&1024)switch(n.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var b=g.memoizedProps,_=g.memoizedState,y=n.stateNode,x=y.getSnapshotBeforeUpdate(n.elementType===n.type?b:Xt(n.type,b),_);y.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var w=n.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(q(163))}}catch(S){Oe(n,n.return,S)}if(e=n.sibling,e!==null){e.return=n.return,re=e;break}re=n.return}return g=My,My=!1,g}function bs(e,n,r){var o=n.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var i=o=o.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&np(n,r,s)}i=i.next}while(i!==o)}}function pu(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var r=n=n.next;do{if((r.tag&e)===e){var o=r.create;r.destroy=o()}r=r.next}while(r!==n)}}function rp(e){var n=e.ref;if(n!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof n=="function"?n(e):n.current=e}}function O1(e){var n=e.alternate;n!==null&&(e.alternate=null,O1(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[hn],delete n[Vs],delete n[Hd],delete n[aM],delete n[lM])),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 D1(e){return e.tag===5||e.tag===3||e.tag===4}function jy(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||D1(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 op(e,n,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?r.nodeType===8?r.parentNode.insertBefore(e,n):r.insertBefore(e,n):(r.nodeType===8?(n=r.parentNode,n.insertBefore(e,r)):(n=r,n.appendChild(e)),r=r._reactRootContainer,r!=null||n.onclick!==null||(n.onclick=oc));else if(o!==4&&(e=e.child,e!==null))for(op(e,n,r),e=e.sibling;e!==null;)op(e,n,r),e=e.sibling}function ip(e,n,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?r.insertBefore(e,n):r.appendChild(e);else if(o!==4&&(e=e.child,e!==null))for(ip(e,n,r),e=e.sibling;e!==null;)ip(e,n,r),e=e.sibling}var Ge=null,qt=!1;function Qn(e,n,r){for(r=r.child;r!==null;)L1(e,n,r),r=r.sibling}function L1(e,n,r){if(vn&&typeof vn.onCommitFiberUnmount=="function")try{vn.onCommitFiberUnmount(iu,r)}catch{}switch(r.tag){case 5:et||Uo(r,n);case 6:var o=Ge,i=qt;Ge=null,Qn(e,n,r),Ge=o,qt=i,Ge!==null&&(qt?(e=Ge,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Ge.removeChild(r.stateNode));break;case 18:Ge!==null&&(qt?(e=Ge,r=r.stateNode,e.nodeType===8?Rf(e.parentNode,r):e.nodeType===1&&Rf(e,r),Os(e)):Rf(Ge,r.stateNode));break;case 4:o=Ge,i=qt,Ge=r.stateNode.containerInfo,qt=!0,Qn(e,n,r),Ge=o,qt=i;break;case 0:case 11:case 14:case 15:if(!et&&(o=r.updateQueue,o!==null&&(o=o.lastEffect,o!==null))){i=o=o.next;do{var s=i,a=s.destroy;s=s.tag,a!==void 0&&(s&2||s&4)&&np(r,n,a),i=i.next}while(i!==o)}Qn(e,n,r);break;case 1:if(!et&&(Uo(r,n),o=r.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=r.memoizedProps,o.state=r.memoizedState,o.componentWillUnmount()}catch(l){Oe(r,n,l)}Qn(e,n,r);break;case 21:Qn(e,n,r);break;case 22:r.mode&1?(et=(o=et)||r.memoizedState!==null,Qn(e,n,r),et=o):Qn(e,n,r);break;default:Qn(e,n,r)}}function Ay(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new CM),n.forEach(function(o){var i=IM.bind(null,e,o);r.has(o)||(r.add(o),o.then(i,i))})}}function Ut(e,n){var r=n.deletions;if(r!==null)for(var o=0;o<r.length;o++){var i=r[o];try{var s=e,a=n,l=a;e:for(;l!==null;){switch(l.tag){case 5:Ge=l.stateNode,qt=!1;break e;case 3:Ge=l.stateNode.containerInfo,qt=!0;break e;case 4:Ge=l.stateNode.containerInfo,qt=!0;break e}l=l.return}if(Ge===null)throw Error(q(160));L1(s,a,i),Ge=null,qt=!1;var c=i.alternate;c!==null&&(c.return=null),i.return=null}catch(u){Oe(i,n,u)}}if(n.subtreeFlags&12854)for(n=n.child;n!==null;)z1(n,e),n=n.sibling}function z1(e,n){var r=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ut(n,e),fn(e),o&4){try{bs(3,e,e.return),pu(3,e)}catch(b){Oe(e,e.return,b)}try{bs(5,e,e.return)}catch(b){Oe(e,e.return,b)}}break;case 1:Ut(n,e),fn(e),o&512&&r!==null&&Uo(r,r.return);break;case 5:if(Ut(n,e),fn(e),o&512&&r!==null&&Uo(r,r.return),e.flags&32){var i=e.stateNode;try{As(i,"")}catch(b){Oe(e,e.return,b)}}if(o&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,a=r!==null?r.memoizedProps:s,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&s.type==="radio"&&s.name!=null&&aw(i,s),Rd(l,a);var u=Rd(l,s);for(a=0;a<c.length;a+=2){var d=c[a],f=c[a+1];d==="style"?dw(i,f):d==="dangerouslySetInnerHTML"?uw(i,f):d==="children"?As(i,f):dh(i,d,f,u)}switch(l){case"input":Cd(i,s);break;case"textarea":lw(i,s);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var m=s.value;m!=null?Ko(i,!!s.multiple,m,!1):p!==!!s.multiple&&(s.defaultValue!=null?Ko(i,!!s.multiple,s.defaultValue,!0):Ko(i,!!s.multiple,s.multiple?[]:"",!1))}i[Vs]=s}catch(b){Oe(e,e.return,b)}}break;case 6:if(Ut(n,e),fn(e),o&4){if(e.stateNode===null)throw Error(q(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(b){Oe(e,e.return,b)}}break;case 3:if(Ut(n,e),fn(e),o&4&&r!==null&&r.memoizedState.isDehydrated)try{Os(n.containerInfo)}catch(b){Oe(e,e.return,b)}break;case 4:Ut(n,e),fn(e);break;case 13:Ut(n,e),fn(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Uh=De())),o&4&&Ay(e);break;case 22:if(d=r!==null&&r.memoizedState!==null,e.mode&1?(et=(u=et)||d,Ut(n,e),et=u):Ut(n,e),fn(e),o&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(re=e,d=e.child;d!==null;){for(f=re=d;re!==null;){switch(p=re,m=p.child,p.tag){case 0:case 11:case 14:case 15:bs(4,p,p.return);break;case 1:Uo(p,p.return);var g=p.stateNode;if(typeof g.componentWillUnmount=="function"){o=p,r=p.return;try{n=o,g.props=n.memoizedProps,g.state=n.memoizedState,g.componentWillUnmount()}catch(b){Oe(o,r,b)}}break;case 5:Uo(p,p.return);break;case 22:if(p.memoizedState!==null){Iy(f);continue}}m!==null?(m.return=p,re=m):Iy(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{i=f.stateNode,u?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(l=f.stateNode,c=f.memoizedProps.style,a=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=fw("display",a))}catch(b){Oe(e,e.return,b)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(b){Oe(e,e.return,b)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Ut(n,e),fn(e),o&4&&Ay(e);break;case 21:break;default:Ut(n,e),fn(e)}}function fn(e){var n=e.flags;if(n&2){try{e:{for(var r=e.return;r!==null;){if(D1(r)){var o=r;break e}r=r.return}throw Error(q(160))}switch(o.tag){case 5:var i=o.stateNode;o.flags&32&&(As(i,""),o.flags&=-33);var s=jy(e);ip(e,s,i);break;case 3:case 4:var a=o.stateNode.containerInfo,l=jy(e);op(e,l,a);break;default:throw Error(q(161))}}catch(c){Oe(e,e.return,c)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function kM(e,n,r){re=e,F1(e)}function F1(e,n,r){for(var o=(e.mode&1)!==0;re!==null;){var i=re,s=i.child;if(i.tag===22&&o){var a=i.memoizedState!==null||Ja;if(!a){var l=i.alternate,c=l!==null&&l.memoizedState!==null||et;l=Ja;var u=et;if(Ja=a,(et=c)&&!u)for(re=i;re!==null;)a=re,c=a.child,a.tag===22&&a.memoizedState!==null?$y(i):c!==null?(c.return=a,re=c):$y(i);for(;s!==null;)re=s,F1(s),s=s.sibling;re=i,Ja=l,et=u}Ty(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,re=s):Ty(e)}}function Ty(e){for(;re!==null;){var n=re;if(n.flags&8772){var r=n.alternate;try{if(n.flags&8772)switch(n.tag){case 0:case 11:case 15:et||pu(5,n);break;case 1:var o=n.stateNode;if(n.flags&4&&!et)if(r===null)o.componentDidMount();else{var i=n.elementType===n.type?r.memoizedProps:Xt(n.type,r.memoizedProps);o.componentDidUpdate(i,r.memoizedState,o.__reactInternalSnapshotBeforeUpdate)}var s=n.updateQueue;s!==null&&yy(n,s,o);break;case 3:var a=n.updateQueue;if(a!==null){if(r=null,n.child!==null)switch(n.child.tag){case 5:r=n.child.stateNode;break;case 1:r=n.child.stateNode}yy(n,a,r)}break;case 5:var l=n.stateNode;if(r===null&&n.flags&4){r=l;var c=n.memoizedProps;switch(n.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(n.memoizedState===null){var u=n.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&Os(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(q(163))}et||n.flags&512&&rp(n)}catch(p){Oe(n,n.return,p)}}if(n===e){re=null;break}if(r=n.sibling,r!==null){r.return=n.return,re=r;break}re=n.return}}function Iy(e){for(;re!==null;){var n=re;if(n===e){re=null;break}var r=n.sibling;if(r!==null){r.return=n.return,re=r;break}re=n.return}}function $y(e){for(;re!==null;){var n=re;try{switch(n.tag){case 0:case 11:case 15:var r=n.return;try{pu(4,n)}catch(c){Oe(n,r,c)}break;case 1:var o=n.stateNode;if(typeof o.componentDidMount=="function"){var i=n.return;try{o.componentDidMount()}catch(c){Oe(n,i,c)}}var s=n.return;try{rp(n)}catch(c){Oe(n,s,c)}break;case 5:var a=n.return;try{rp(n)}catch(c){Oe(n,a,c)}}}catch(c){Oe(n,n.return,c)}if(n===e){re=null;break}var l=n.sibling;if(l!==null){l.return=n.return,re=l;break}re=n.return}}var NM=Math.ceil,mc=Xn.ReactCurrentDispatcher,Hh=Xn.ReactCurrentOwner,Vt=Xn.ReactCurrentBatchConfig,me=0,Ue=null,Le=null,Ye=0,_t=0,Go=Ar(0),Be=0,Ys=null,so=0,hu=0,Wh=0,_s=null,ft=null,Uh=0,fi=1/0,An=null,gc=!1,sp=null,wr=null,el=!1,pr=null,yc=0,Ss=0,ap=null,Ol=-1,Dl=0;function it(){return me&6?De():Ol!==-1?Ol:Ol=De()}function br(e){return e.mode&1?me&2&&Ye!==0?Ye&-Ye:uM.transition!==null?(Dl===0&&(Dl=Cw()),Dl):(e=xe,e!==0||(e=window.event,e=e===void 0?16:jw(e.type)),e):1}function rn(e,n,r,o){if(50<Ss)throw Ss=0,ap=null,Error(q(185));fa(e,r,o),(!(me&2)||e!==Ue)&&(e===Ue&&(!(me&2)&&(hu|=r),Be===4&&ur(e,Ye)),gt(e,o),r===1&&me===0&&!(n.mode&1)&&(fi=De()+500,uu&&Tr()))}function gt(e,n){var r=e.callbackNode;uR(e,n);var o=ec(e,e===Ue?Ye:0);if(o===0)r!==null&&Wg(r),e.callbackNode=null,e.callbackPriority=0;else if(n=o&-o,e.callbackPriority!==n){if(r!=null&&Wg(r),n===1)e.tag===0?cM(Oy.bind(null,e)):qw(Oy.bind(null,e)),iM(function(){!(me&6)&&Tr()}),r=null;else{switch(Ew(o)){case 1:r=yh;break;case 4:r=_w;break;case 16:r=Jl;break;case 536870912:r=Sw;break;default:r=Jl}r=X1(r,V1.bind(null,e))}e.callbackPriority=n,e.callbackNode=r}}function V1(e,n){if(Ol=-1,Dl=0,me&6)throw Error(q(327));var r=e.callbackNode;if(ei()&&e.callbackNode!==r)return null;var o=ec(e,e===Ue?Ye:0);if(o===0)return null;if(o&30||o&e.expiredLanes||n)n=vc(e,o);else{n=o;var i=me;me|=2;var s=H1();(Ue!==e||Ye!==n)&&(An=null,fi=De()+500,Qr(e,n));do try{MM();break}catch(l){B1(e,l)}while(!0);Mh(),mc.current=s,me=i,Le!==null?n=0:(Ue=null,Ye=0,n=Be)}if(n!==0){if(n===2&&(i=Id(e),i!==0&&(o=i,n=lp(e,i))),n===1)throw r=Ys,Qr(e,0),ur(e,o),gt(e,De()),r;if(n===6)ur(e,o);else{if(i=e.current.alternate,!(o&30)&&!PM(i)&&(n=vc(e,o),n===2&&(s=Id(e),s!==0&&(o=s,n=lp(e,s))),n===1))throw r=Ys,Qr(e,0),ur(e,o),gt(e,De()),r;switch(e.finishedWork=i,e.finishedLanes=o,n){case 0:case 1:throw Error(q(345));case 2:Ur(e,ft,An);break;case 3:if(ur(e,o),(o&130023424)===o&&(n=Uh+500-De(),10<n)){if(ec(e,0)!==0)break;if(i=e.suspendedLanes,(i&o)!==o){it(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Bd(Ur.bind(null,e,ft,An),n);break}Ur(e,ft,An);break;case 4:if(ur(e,o),(o&4194240)===o)break;for(n=e.eventTimes,i=-1;0<o;){var a=31-nn(o);s=1<<a,a=n[a],a>i&&(i=a),o&=~s}if(o=i,o=De()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*NM(o/1960))-o,10<o){e.timeoutHandle=Bd(Ur.bind(null,e,ft,An),o);break}Ur(e,ft,An);break;case 5:Ur(e,ft,An);break;default:throw Error(q(329))}}}return gt(e,De()),e.callbackNode===r?V1.bind(null,e):null}function lp(e,n){var r=_s;return e.current.memoizedState.isDehydrated&&(Qr(e,n).flags|=256),e=vc(e,n),e!==2&&(n=ft,ft=r,n!==null&&cp(n)),e}function cp(e){ft===null?ft=e:ft.push.apply(ft,e)}function PM(e){for(var n=e;;){if(n.flags&16384){var r=n.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var o=0;o<r.length;o++){var i=r[o],s=i.getSnapshot;i=i.value;try{if(!on(s(),i))return!1}catch{return!1}}}if(r=n.child,n.subtreeFlags&16384&&r!==null)r.return=n,n=r;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function ur(e,n){for(n&=~Wh,n&=~hu,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0<n;){var r=31-nn(n),o=1<<r;e[r]=-1,n&=~o}}function Oy(e){if(me&6)throw Error(q(327));ei();var n=ec(e,0);if(!(n&1))return gt(e,De()),null;var r=vc(e,n);if(e.tag!==0&&r===2){var o=Id(e);o!==0&&(n=o,r=lp(e,o))}if(r===1)throw r=Ys,Qr(e,0),ur(e,n),gt(e,De()),r;if(r===6)throw Error(q(345));return e.finishedWork=e.current.alternate,e.finishedLanes=n,Ur(e,ft,An),gt(e,De()),null}function Gh(e,n){var r=me;me|=1;try{return e(n)}finally{me=r,me===0&&(fi=De()+500,uu&&Tr())}}function ao(e){pr!==null&&pr.tag===0&&!(me&6)&&ei();var n=me;me|=1;var r=Vt.transition,o=xe;try{if(Vt.transition=null,xe=1,e)return e()}finally{xe=o,Vt.transition=r,me=n,!(me&6)&&Tr()}}function Yh(){_t=Go.current,Ee(Go)}function Qr(e,n){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,oM(r)),Le!==null)for(r=Le.return;r!==null;){var o=r;switch(Nh(o),o.tag){case 1:o=o.type.childContextTypes,o!=null&&ic();break;case 3:ci(),Ee(ht),Ee(nt),Oh();break;case 5:$h(o);break;case 4:ci();break;case 13:Ee(je);break;case 19:Ee(je);break;case 10:jh(o.type._context);break;case 22:case 23:Yh()}r=r.return}if(Ue=e,Le=e=_r(e.current,null),Ye=_t=n,Be=0,Ys=null,Wh=hu=so=0,ft=_s=null,Kr!==null){for(n=0;n<Kr.length;n++)if(r=Kr[n],o=r.interleaved,o!==null){r.interleaved=null;var i=o.next,s=r.pending;if(s!==null){var a=s.next;s.next=i,o.next=a}r.pending=o}Kr=null}return e}function B1(e,n){do{var r=Le;try{if(Mh(),Tl.current=hc,pc){for(var o=Ae.memoizedState;o!==null;){var i=o.queue;i!==null&&(i.pending=null),o=o.next}pc=!1}if(io=0,We=Ve=Ae=null,ws=!1,Ws=0,Hh.current=null,r===null||r.return===null){Be=1,Ys=n,Le=null;break}e:{var s=e,a=r.return,l=r,c=n;if(n=Ye,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=l,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=Sy(a);if(m!==null){m.flags&=-257,Cy(m,a,l,s,n),m.mode&1&&_y(s,u,n),n=m,c=u;var g=n.updateQueue;if(g===null){var b=new Set;b.add(c),n.updateQueue=b}else g.add(c);break e}else{if(!(n&1)){_y(s,u,n),Xh();break e}c=Error(q(426))}}else if(Ne&&l.mode&1){var _=Sy(a);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Cy(_,a,l,s,n),Ph(ui(c,l));break e}}s=c=ui(c,l),Be!==4&&(Be=2),_s===null?_s=[s]:_s.push(s),s=a;do{switch(s.tag){case 3:s.flags|=65536,n&=-n,s.lanes|=n;var y=E1(s,c,n);gy(s,y);break e;case 1:l=c;var x=s.type,w=s.stateNode;if(!(s.flags&128)&&(typeof x.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(wr===null||!wr.has(w)))){s.flags|=65536,n&=-n,s.lanes|=n;var S=k1(s,l,n);gy(s,S);break e}}s=s.return}while(s!==null)}U1(r)}catch(C){n=C,Le===r&&r!==null&&(Le=r=r.return);continue}break}while(!0)}function H1(){var e=mc.current;return mc.current=hc,e===null?hc:e}function Xh(){(Be===0||Be===3||Be===2)&&(Be=4),Ue===null||!(so&268435455)&&!(hu&268435455)||ur(Ue,Ye)}function vc(e,n){var r=me;me|=2;var o=H1();(Ue!==e||Ye!==n)&&(An=null,Qr(e,n));do try{RM();break}catch(i){B1(e,i)}while(!0);if(Mh(),me=r,mc.current=o,Le!==null)throw Error(q(261));return Ue=null,Ye=0,Be}function RM(){for(;Le!==null;)W1(Le)}function MM(){for(;Le!==null&&!tR();)W1(Le)}function W1(e){var n=Y1(e.alternate,e,_t);e.memoizedProps=e.pendingProps,n===null?U1(e):Le=n,Hh.current=null}function U1(e){var n=e;do{var r=n.alternate;if(e=n.return,n.flags&32768){if(r=SM(r,n),r!==null){r.flags&=32767,Le=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Be=6,Le=null;return}}else if(r=_M(r,n,_t),r!==null){Le=r;return}if(n=n.sibling,n!==null){Le=n;return}Le=n=e}while(n!==null);Be===0&&(Be=5)}function Ur(e,n,r){var o=xe,i=Vt.transition;try{Vt.transition=null,xe=1,jM(e,n,r,o)}finally{Vt.transition=i,xe=o}return null}function jM(e,n,r,o){do ei();while(pr!==null);if(me&6)throw Error(q(327));r=e.finishedWork;var i=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(q(177));e.callbackNode=null,e.callbackPriority=0;var s=r.lanes|r.childLanes;if(fR(e,s),e===Ue&&(Le=Ue=null,Ye=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||el||(el=!0,X1(Jl,function(){return ei(),null})),s=(r.flags&15990)!==0,r.subtreeFlags&15990||s){s=Vt.transition,Vt.transition=null;var a=xe;xe=1;var l=me;me|=4,Hh.current=null,EM(e,r),z1(r,e),ZR(Fd),tc=!!zd,Fd=zd=null,e.current=r,kM(r),nR(),me=l,xe=a,Vt.transition=s}else e.current=r;if(el&&(el=!1,pr=e,yc=i),s=e.pendingLanes,s===0&&(wr=null),iR(r.stateNode),gt(e,De()),n!==null)for(o=e.onRecoverableError,r=0;r<n.length;r++)i=n[r],o(i.value,{componentStack:i.stack,digest:i.digest});if(gc)throw gc=!1,e=sp,sp=null,e;return yc&1&&e.tag!==0&&ei(),s=e.pendingLanes,s&1?e===ap?Ss++:(Ss=0,ap=e):Ss=0,Tr(),null}function ei(){if(pr!==null){var e=Ew(yc),n=Vt.transition,r=xe;try{if(Vt.transition=null,xe=16>e?16:e,pr===null)var o=!1;else{if(e=pr,pr=null,yc=0,me&6)throw Error(q(331));var i=me;for(me|=4,re=e.current;re!==null;){var s=re,a=s.child;if(re.flags&16){var l=s.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(re=u;re!==null;){var d=re;switch(d.tag){case 0:case 11:case 15:bs(8,d,s)}var f=d.child;if(f!==null)f.return=d,re=f;else for(;re!==null;){d=re;var p=d.sibling,m=d.return;if(O1(d),d===u){re=null;break}if(p!==null){p.return=m,re=p;break}re=m}}}var g=s.alternate;if(g!==null){var b=g.child;if(b!==null){g.child=null;do{var _=b.sibling;b.sibling=null,b=_}while(b!==null)}}re=s}}if(s.subtreeFlags&2064&&a!==null)a.return=s,re=a;else e:for(;re!==null;){if(s=re,s.flags&2048)switch(s.tag){case 0:case 11:case 15:bs(9,s,s.return)}var y=s.sibling;if(y!==null){y.return=s.return,re=y;break e}re=s.return}}var x=e.current;for(re=x;re!==null;){a=re;var w=a.child;if(a.subtreeFlags&2064&&w!==null)w.return=a,re=w;else e:for(a=x;re!==null;){if(l=re,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:pu(9,l)}}catch(C){Oe(l,l.return,C)}if(l===a){re=null;break e}var S=l.sibling;if(S!==null){S.return=l.return,re=S;break e}re=l.return}}if(me=i,Tr(),vn&&typeof vn.onPostCommitFiberRoot=="function")try{vn.onPostCommitFiberRoot(iu,e)}catch{}o=!0}return o}finally{xe=r,Vt.transition=n}}return!1}function Dy(e,n,r){n=ui(r,n),n=E1(e,n,1),e=xr(e,n,1),n=it(),e!==null&&(fa(e,1,n),gt(e,n))}function Oe(e,n,r){if(e.tag===3)Dy(e,e,r);else for(;n!==null;){if(n.tag===3){Dy(n,e,r);break}else if(n.tag===1){var o=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(wr===null||!wr.has(o))){e=ui(r,e),e=k1(n,e,1),n=xr(n,e,1),e=it(),n!==null&&(fa(n,1,e),gt(n,e));break}}n=n.return}}function AM(e,n,r){var o=e.pingCache;o!==null&&o.delete(n),n=it(),e.pingedLanes|=e.suspendedLanes&r,Ue===e&&(Ye&r)===r&&(Be===4||Be===3&&(Ye&130023424)===Ye&&500>De()-Uh?Qr(e,0):Wh|=r),gt(e,n)}function G1(e,n){n===0&&(e.mode&1?(n=Wa,Wa<<=1,!(Wa&130023424)&&(Wa=4194304)):n=1);var r=it();e=Hn(e,n),e!==null&&(fa(e,n,r),gt(e,r))}function TM(e){var n=e.memoizedState,r=0;n!==null&&(r=n.retryLane),G1(e,r)}function IM(e,n){var r=0;switch(e.tag){case 13:var o=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:o=e.stateNode;break;default:throw Error(q(314))}o!==null&&o.delete(n),G1(e,r)}var Y1;Y1=function(e,n,r){if(e!==null)if(e.memoizedProps!==n.pendingProps||ht.current)dt=!0;else{if(!(e.lanes&r)&&!(n.flags&128))return dt=!1,bM(e,n,r);dt=!!(e.flags&131072)}else dt=!1,Ne&&n.flags&1048576&&Zw(n,lc,n.index);switch(n.lanes=0,n.tag){case 2:var o=n.type;$l(e,n),e=n.pendingProps;var i=si(n,nt.current);Jo(n,r),i=Lh(null,n,o,e,i,r);var s=zh();return n.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,mt(o)?(s=!0,sc(n)):s=!1,n.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Th(n),i.updater=du,n.stateNode=i,i._reactInternals=n,Kd(n,o,e,r),n=Qd(null,n,o,!0,s,r)):(n.tag=0,Ne&&s&&kh(n),rt(null,n,i,r),n=n.child),n;case 16:o=n.elementType;e:{switch($l(e,n),e=n.pendingProps,i=o._init,o=i(o._payload),n.type=o,i=n.tag=OM(o),e=Xt(o,e),i){case 0:n=Zd(null,n,o,e,r);break e;case 1:n=Ny(null,n,o,e,r);break e;case 11:n=Ey(null,n,o,e,r);break e;case 14:n=ky(null,n,o,Xt(o.type,e),r);break e}throw Error(q(306,o,""))}return n;case 0:return o=n.type,i=n.pendingProps,i=n.elementType===o?i:Xt(o,i),Zd(e,n,o,i,r);case 1:return o=n.type,i=n.pendingProps,i=n.elementType===o?i:Xt(o,i),Ny(e,n,o,i,r);case 3:e:{if(M1(n),e===null)throw Error(q(387));o=n.pendingProps,s=n.memoizedState,i=s.element,r1(e,n),fc(n,o,null,r);var a=n.memoizedState;if(o=a.element,s.isDehydrated)if(s={element:o,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},n.updateQueue.baseState=s,n.memoizedState=s,n.flags&256){i=ui(Error(q(423)),n),n=Py(e,n,o,r,i);break e}else if(o!==i){i=ui(Error(q(424)),n),n=Py(e,n,o,r,i);break e}else for(Ct=vr(n.stateNode.containerInfo.firstChild),Et=n,Ne=!0,Zt=null,r=t1(n,null,o,r),n.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(ai(),o===i){n=Wn(e,n,r);break e}rt(e,n,o,r)}n=n.child}return n;case 5:return o1(n),e===null&&Gd(n),o=n.type,i=n.pendingProps,s=e!==null?e.memoizedProps:null,a=i.children,Vd(o,i)?a=null:s!==null&&Vd(o,s)&&(n.flags|=32),R1(e,n),rt(e,n,a,r),n.child;case 6:return e===null&&Gd(n),null;case 13:return j1(e,n,r);case 4:return Ih(n,n.stateNode.containerInfo),o=n.pendingProps,e===null?n.child=li(n,null,o,r):rt(e,n,o,r),n.child;case 11:return o=n.type,i=n.pendingProps,i=n.elementType===o?i:Xt(o,i),Ey(e,n,o,i,r);case 7:return rt(e,n,n.pendingProps,r),n.child;case 8:return rt(e,n,n.pendingProps.children,r),n.child;case 12:return rt(e,n,n.pendingProps.children,r),n.child;case 10:e:{if(o=n.type._context,i=n.pendingProps,s=n.memoizedProps,a=i.value,be(cc,o._currentValue),o._currentValue=a,s!==null)if(on(s.value,a)){if(s.children===i.children&&!ht.current){n=Wn(e,n,r);break e}}else for(s=n.child,s!==null&&(s.return=n);s!==null;){var l=s.dependencies;if(l!==null){a=s.child;for(var c=l.firstContext;c!==null;){if(c.context===o){if(s.tag===1){c=zn(-1,r&-r),c.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}s.lanes|=r,c=s.alternate,c!==null&&(c.lanes|=r),Yd(s.return,r,n),l.lanes|=r;break}c=c.next}}else if(s.tag===10)a=s.type===n.type?null:s.child;else if(s.tag===18){if(a=s.return,a===null)throw Error(q(341));a.lanes|=r,l=a.alternate,l!==null&&(l.lanes|=r),Yd(a,r,n),a=s.sibling}else a=s.child;if(a!==null)a.return=s;else for(a=s;a!==null;){if(a===n){a=null;break}if(s=a.sibling,s!==null){s.return=a.return,a=s;break}a=a.return}s=a}rt(e,n,i.children,r),n=n.child}return n;case 9:return i=n.type,o=n.pendingProps.children,Jo(n,r),i=Ht(i),o=o(i),n.flags|=1,rt(e,n,o,r),n.child;case 14:return o=n.type,i=Xt(o,n.pendingProps),i=Xt(o.type,i),ky(e,n,o,i,r);case 15:return N1(e,n,n.type,n.pendingProps,r);case 17:return o=n.type,i=n.pendingProps,i=n.elementType===o?i:Xt(o,i),$l(e,n),n.tag=1,mt(o)?(e=!0,sc(n)):e=!1,Jo(n,r),C1(n,o,i),Kd(n,o,i,r),Qd(null,n,o,!0,e,r);case 19:return A1(e,n,r);case 22:return P1(e,n,r)}throw Error(q(156,n.tag))};function X1(e,n){return bw(e,n)}function $M(e,n,r,o){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ft(e,n,r,o){return new $M(e,n,r,o)}function Kh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function OM(e){if(typeof e=="function")return Kh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===hh)return 11;if(e===mh)return 14}return 2}function _r(e,n){var r=e.alternate;return r===null?(r=Ft(e.tag,n,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=n,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,n=e.dependencies,r.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Ll(e,n,r,o,i,s){var a=2;if(o=e,typeof e=="function")Kh(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Oo:return Jr(r.children,i,s,n);case ph:a=8,i|=8;break;case xd:return e=Ft(12,r,n,i|2),e.elementType=xd,e.lanes=s,e;case wd:return e=Ft(13,r,n,i),e.elementType=wd,e.lanes=s,e;case bd:return e=Ft(19,r,n,i),e.elementType=bd,e.lanes=s,e;case ow:return mu(r,i,s,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case nw:a=10;break e;case rw:a=9;break e;case hh:a=11;break e;case mh:a=14;break e;case sr:a=16,o=null;break e}throw Error(q(130,e==null?e:typeof e,""))}return n=Ft(a,r,n,i),n.elementType=e,n.type=o,n.lanes=s,n}function Jr(e,n,r,o){return e=Ft(7,e,o,n),e.lanes=r,e}function mu(e,n,r,o){return e=Ft(22,e,o,n),e.elementType=ow,e.lanes=r,e.stateNode={isHidden:!1},e}function Df(e,n,r){return e=Ft(6,e,null,n),e.lanes=r,e}function Lf(e,n,r){return n=Ft(4,e.children!==null?e.children:[],e.key,n),n.lanes=r,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function DM(e,n,r,o,i){this.tag=n,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=vf(0),this.expirationTimes=vf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vf(0),this.identifierPrefix=o,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function qh(e,n,r,o,i,s,a,l,c){return e=new DM(e,n,r,l,c),n===1?(n=1,s===!0&&(n|=8)):n=0,s=Ft(3,null,null,n),e.current=s,s.stateNode=e,s.memoizedState={element:o,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Th(s),e}function LM(e,n,r){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:$o,key:o==null?null:""+o,children:e,containerInfo:n,implementation:r}}function K1(e){if(!e)return Nr;e=e._reactInternals;e:{if(vo(e)!==e||e.tag!==1)throw Error(q(170));var n=e;do{switch(n.tag){case 3:n=n.stateNode.context;break e;case 1:if(mt(n.type)){n=n.stateNode.__reactInternalMemoizedMergedChildContext;break e}}n=n.return}while(n!==null);throw Error(q(171))}if(e.tag===1){var r=e.type;if(mt(r))return Kw(e,r,n)}return n}function q1(e,n,r,o,i,s,a,l,c){return e=qh(r,o,!0,e,i,s,a,l,c),e.context=K1(null),r=e.current,o=it(),i=br(r),s=zn(o,i),s.callback=n??null,xr(r,s,i),e.current.lanes=i,fa(e,i,o),gt(e,o),e}function gu(e,n,r,o){var i=n.current,s=it(),a=br(i);return r=K1(r),n.context===null?n.context=r:n.pendingContext=r,n=zn(s,a),n.payload={element:e},o=o===void 0?null:o,o!==null&&(n.callback=o),e=xr(i,n,a),e!==null&&(rn(e,i,a,s),Al(e,i,a)),a}function xc(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 Ly(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<n?r:n}}function Zh(e,n){Ly(e,n),(e=e.alternate)&&Ly(e,n)}function zM(){return null}var Z1=typeof reportError=="function"?reportError:function(e){console.error(e)};function Qh(e){this._internalRoot=e}yu.prototype.render=Qh.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(q(409));gu(e,n,null,null)};yu.prototype.unmount=Qh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;ao(function(){gu(null,e,null,null)}),n[Bn]=null}};function yu(e){this._internalRoot=e}yu.prototype.unstable_scheduleHydration=function(e){if(e){var n=Pw();e={blockedOn:null,target:e,priority:n};for(var r=0;r<cr.length&&n!==0&&n<cr[r].priority;r++);cr.splice(r,0,e),r===0&&Mw(e)}};function Jh(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function vu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function zy(){}function FM(e,n,r,o,i){if(i){if(typeof o=="function"){var s=o;o=function(){var u=xc(a);s.call(u)}}var a=q1(n,o,e,0,null,!1,!1,"",zy);return e._reactRootContainer=a,e[Bn]=a.current,zs(e.nodeType===8?e.parentNode:e),ao(),a}for(;i=e.lastChild;)e.removeChild(i);if(typeof o=="function"){var l=o;o=function(){var u=xc(c);l.call(u)}}var c=qh(e,0,!1,null,null,!1,!1,"",zy);return e._reactRootContainer=c,e[Bn]=c.current,zs(e.nodeType===8?e.parentNode:e),ao(function(){gu(n,c,r,o)}),c}function xu(e,n,r,o,i){var s=r._reactRootContainer;if(s){var a=s;if(typeof i=="function"){var l=i;i=function(){var c=xc(a);l.call(c)}}gu(n,a,e,i)}else a=FM(r,n,e,i,o);return xc(a)}kw=function(e){switch(e.tag){case 3:var n=e.stateNode;if(n.current.memoizedState.isDehydrated){var r=as(n.pendingLanes);r!==0&&(vh(n,r|1),gt(n,De()),!(me&6)&&(fi=De()+500,Tr()))}break;case 13:ao(function(){var o=Hn(e,1);if(o!==null){var i=it();rn(o,e,1,i)}}),Zh(e,1)}};xh=function(e){if(e.tag===13){var n=Hn(e,134217728);if(n!==null){var r=it();rn(n,e,134217728,r)}Zh(e,134217728)}};Nw=function(e){if(e.tag===13){var n=br(e),r=Hn(e,n);if(r!==null){var o=it();rn(r,e,n,o)}Zh(e,n)}};Pw=function(){return xe};Rw=function(e,n){var r=xe;try{return xe=e,n()}finally{xe=r}};jd=function(e,n,r){switch(n){case"input":if(Cd(e,r),n=r.name,r.type==="radio"&&n!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),n=0;n<r.length;n++){var o=r[n];if(o!==e&&o.form===e.form){var i=cu(o);if(!i)throw Error(q(90));sw(o),Cd(o,i)}}}break;case"textarea":lw(e,r);break;case"select":n=r.value,n!=null&&Ko(e,!!r.multiple,n,!1)}};mw=Gh;gw=ao;var VM={usingClientEntryPoint:!1,Events:[pa,Fo,cu,pw,hw,Gh]},Yi={findFiberByHostInstance:Xr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},BM={bundleType:Yi.bundleType,version:Yi.version,rendererPackageName:Yi.rendererPackageName,rendererConfig:Yi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Xn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=xw(e),e===null?null:e.stateNode},findFiberByHostInstance:Yi.findFiberByHostInstance||zM,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 tl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!tl.isDisabled&&tl.supportsFiber)try{iu=tl.inject(BM),vn=tl}catch{}}Mt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=VM;Mt.createPortal=function(e,n){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Jh(n))throw Error(q(200));return LM(e,n,null,r)};Mt.createRoot=function(e,n){if(!Jh(e))throw Error(q(299));var r=!1,o="",i=Z1;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),n=qh(e,1,!1,null,null,r,!1,o,i),e[Bn]=n.current,zs(e.nodeType===8?e.parentNode:e),new Qh(n)};Mt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(q(188)):(e=Object.keys(e).join(","),Error(q(268,e)));return e=xw(n),e=e===null?null:e.stateNode,e};Mt.flushSync=function(e){return ao(e)};Mt.hydrate=function(e,n,r){if(!vu(n))throw Error(q(200));return xu(null,e,n,!0,r)};Mt.hydrateRoot=function(e,n,r){if(!Jh(e))throw Error(q(405));var o=r!=null&&r.hydratedSources||null,i=!1,s="",a=Z1;if(r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(s=r.identifierPrefix),r.onRecoverableError!==void 0&&(a=r.onRecoverableError)),n=q1(n,null,e,1,r??null,i,!1,s,a),e[Bn]=n.current,zs(e),o)for(e=0;e<o.length;e++)r=o[e],i=r._getVersion,i=i(r._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[r,i]:n.mutableSourceEagerHydrationData.push(r,i);return new yu(n)};Mt.render=function(e,n,r){if(!vu(n))throw Error(q(200));return xu(null,e,n,!1,r)};Mt.unmountComponentAtNode=function(e){if(!vu(e))throw Error(q(40));return e._reactRootContainer?(ao(function(){xu(null,null,e,!1,function(){e._reactRootContainer=null,e[Bn]=null})}),!0):!1};Mt.unstable_batchedUpdates=Gh;Mt.unstable_renderSubtreeIntoContainer=function(e,n,r,o){if(!vu(r))throw Error(q(200));if(e==null||e._reactInternals===void 0)throw Error(q(38));return xu(e,n,r,!1,o)};Mt.version="18.3.1-next-f1338f8080-20240426";function Q1(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Q1)}catch(e){console.error(e)}}Q1(),Qx.exports=Mt;var xo=Qx.exports;const HM=nu(xo);var Fy=xo;yd.createRoot=Fy.createRoot,yd.hydrateRoot=Fy.hydrateRoot;/**
41
+ * @remix-run/router v1.23.2
42
+ *
43
+ * Copyright (c) Remix Software Inc.
44
+ *
45
+ * This source code is licensed under the MIT license found in the
46
+ * LICENSE.md file in the root directory of this source tree.
47
+ *
48
+ * @license MIT
49
+ */function Xs(){return Xs=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},Xs.apply(this,arguments)}var hr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(hr||(hr={}));const Vy="popstate";function WM(e){e===void 0&&(e={});function n(o,i){let{pathname:s,search:a,hash:l}=o.location;return up("",{pathname:s,search:a,hash:l},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(o,i){return typeof i=="string"?i:wc(i)}return GM(n,r,null,e)}function Te(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function em(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function UM(){return Math.random().toString(36).substr(2,8)}function By(e,n){return{usr:e.state,key:e.key,idx:n}}function up(e,n,r,o){return r===void 0&&(r=null),Xs({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof n=="string"?Pi(n):n,{state:r,key:n&&n.key||o||UM()})}function wc(e){let{pathname:n="/",search:r="",hash:o=""}=e;return r&&r!=="?"&&(n+=r.charAt(0)==="?"?r:"?"+r),o&&o!=="#"&&(n+=o.charAt(0)==="#"?o:"#"+o),n}function Pi(e){let n={};if(e){let r=e.indexOf("#");r>=0&&(n.hash=e.substr(r),e=e.substr(0,r));let o=e.indexOf("?");o>=0&&(n.search=e.substr(o),e=e.substr(0,o)),e&&(n.pathname=e)}return n}function GM(e,n,r,o){o===void 0&&(o={});let{window:i=document.defaultView,v5Compat:s=!1}=o,a=i.history,l=hr.Pop,c=null,u=d();u==null&&(u=0,a.replaceState(Xs({},a.state,{idx:u}),""));function d(){return(a.state||{idx:null}).idx}function f(){l=hr.Pop;let _=d(),y=_==null?null:_-u;u=_,c&&c({action:l,location:b.location,delta:y})}function p(_,y){l=hr.Push;let x=up(b.location,_,y);u=d()+1;let w=By(x,u),S=b.createHref(x);try{a.pushState(w,"",S)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(S)}s&&c&&c({action:l,location:b.location,delta:1})}function m(_,y){l=hr.Replace;let x=up(b.location,_,y);u=d();let w=By(x,u),S=b.createHref(x);a.replaceState(w,"",S),s&&c&&c({action:l,location:b.location,delta:0})}function g(_){let y=i.location.origin!=="null"?i.location.origin:i.location.href,x=typeof _=="string"?_:wc(_);return x=x.replace(/ $/,"%20"),Te(y,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,y)}let b={get action(){return l},get location(){return e(i,a)},listen(_){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(Vy,f),c=_,()=>{i.removeEventListener(Vy,f),c=null}},createHref(_){return n(i,_)},createURL:g,encodeLocation(_){let y=g(_);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:p,replace:m,go(_){return a.go(_)}};return b}var Hy;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Hy||(Hy={}));function YM(e,n,r){return r===void 0&&(r="/"),XM(e,n,r)}function XM(e,n,r,o){let i=typeof n=="string"?Pi(n):n,s=di(i.pathname||"/",r);if(s==null)return null;let a=J1(e);KM(a);let l=null;for(let c=0;l==null&&c<a.length;++c){let u=sj(s);l=oj(a[c],u)}return l}function J1(e,n,r,o){n===void 0&&(n=[]),r===void 0&&(r=[]),o===void 0&&(o="");let i=(s,a,l)=>{let c={relativePath:l===void 0?s.path||"":l,caseSensitive:s.caseSensitive===!0,childrenIndex:a,route:s};c.relativePath.startsWith("/")&&(Te(c.relativePath.startsWith(o),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+o+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(o.length));let u=Sr([o,c.relativePath]),d=r.concat(c);s.children&&s.children.length>0&&(Te(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),J1(s.children,n,d,u)),!(s.path==null&&!s.index)&&n.push({path:u,score:nj(u,s.index),routesMeta:d})};return e.forEach((s,a)=>{var l;if(s.path===""||!((l=s.path)!=null&&l.includes("?")))i(s,a);else for(let c of eb(s.path))i(s,a,c)}),n}function eb(e){let n=e.split("/");if(n.length===0)return[];let[r,...o]=n,i=r.endsWith("?"),s=r.replace(/\?$/,"");if(o.length===0)return i?[s,""]:[s];let a=eb(o.join("/")),l=[];return l.push(...a.map(c=>c===""?s:[s,c].join("/"))),i&&l.push(...a),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function KM(e){e.sort((n,r)=>n.score!==r.score?r.score-n.score:rj(n.routesMeta.map(o=>o.childrenIndex),r.routesMeta.map(o=>o.childrenIndex)))}const qM=/^:[\w-]+$/,ZM=3,QM=2,JM=1,ej=10,tj=-2,Wy=e=>e==="*";function nj(e,n){let r=e.split("/"),o=r.length;return r.some(Wy)&&(o+=tj),n&&(o+=QM),r.filter(i=>!Wy(i)).reduce((i,s)=>i+(qM.test(s)?ZM:s===""?JM:ej),o)}function rj(e,n){return e.length===n.length&&e.slice(0,-1).every((o,i)=>o===n[i])?e[e.length-1]-n[n.length-1]:0}function oj(e,n,r){let{routesMeta:o}=e,i={},s="/",a=[];for(let l=0;l<o.length;++l){let c=o[l],u=l===o.length-1,d=s==="/"?n:n.slice(s.length)||"/",f=fp({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),p=c.route;if(!f)return null;Object.assign(i,f.params),a.push({params:i,pathname:Sr([s,f.pathname]),pathnameBase:fj(Sr([s,f.pathnameBase])),route:p}),f.pathnameBase!=="/"&&(s=Sr([s,f.pathnameBase]))}return a}function fp(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,o]=ij(e.path,e.caseSensitive,e.end),i=n.match(r);if(!i)return null;let s=i[0],a=s.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:o.reduce((u,d,f)=>{let{paramName:p,isOptional:m}=d;if(p==="*"){let b=l[f]||"";a=s.slice(0,s.length-b.length).replace(/(.)\/+$/,"$1")}const g=l[f];return m&&!g?u[p]=void 0:u[p]=(g||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:a,pattern:e}}function ij(e,n,r){n===void 0&&(n=!1),r===void 0&&(r=!0),em(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let o=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,l,c)=>(o.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(o.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,n?void 0:"i"),o]}function sj(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return em(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+n+").")),e}}function di(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let r=n.endsWith("/")?n.length-1:n.length,o=e.charAt(r);return o&&o!=="/"?null:e.slice(r)||"/"}const aj=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,lj=e=>aj.test(e);function cj(e,n){n===void 0&&(n="/");let{pathname:r,search:o="",hash:i=""}=typeof e=="string"?Pi(e):e,s;if(r)if(lj(r))s=r;else{if(r.includes("//")){let a=r;r=r.replace(/\/\/+/g,"/"),em(!1,"Pathnames cannot have embedded double slashes - normalizing "+(a+" -> "+r))}r.startsWith("/")?s=Uy(r.substring(1),"/"):s=Uy(r,n)}else s=n;return{pathname:s,search:dj(o),hash:pj(i)}}function Uy(e,n){let r=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function zf(e,n,r,o){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+n+"` field ["+JSON.stringify(o)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function uj(e){return e.filter((n,r)=>r===0||n.route.path&&n.route.path.length>0)}function tm(e,n){let r=uj(e);return n?r.map((o,i)=>i===r.length-1?o.pathname:o.pathnameBase):r.map(o=>o.pathnameBase)}function nm(e,n,r,o){o===void 0&&(o=!1);let i;typeof e=="string"?i=Pi(e):(i=Xs({},e),Te(!i.pathname||!i.pathname.includes("?"),zf("?","pathname","search",i)),Te(!i.pathname||!i.pathname.includes("#"),zf("#","pathname","hash",i)),Te(!i.search||!i.search.includes("#"),zf("#","search","hash",i)));let s=e===""||i.pathname==="",a=s?"/":i.pathname,l;if(a==null)l=r;else{let f=n.length-1;if(!o&&a.startsWith("..")){let p=a.split("/");for(;p[0]==="..";)p.shift(),f-=1;i.pathname=p.join("/")}l=f>=0?n[f]:"/"}let c=cj(i,l),u=a&&a!=="/"&&a.endsWith("/"),d=(s||a===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const Sr=e=>e.join("/").replace(/\/\/+/g,"/"),fj=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),dj=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,pj=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function hj(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const tb=["post","put","patch","delete"];new Set(tb);const mj=["get",...tb];new Set(mj);/**
50
+ * React Router v6.30.3
51
+ *
52
+ * Copyright (c) Remix Software Inc.
53
+ *
54
+ * This source code is licensed under the MIT license found in the
55
+ * LICENSE.md file in the root directory of this source tree.
56
+ *
57
+ * @license MIT
58
+ */function Ks(){return Ks=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},Ks.apply(this,arguments)}const wu=h.createContext(null),nb=h.createContext(null),Kn=h.createContext(null),bu=h.createContext(null),Ir=h.createContext({outlet:null,matches:[],isDataRoute:!1}),rb=h.createContext(null);function gj(e,n){let{relative:r}=n===void 0?{}:n;Ri()||Te(!1);let{basename:o,navigator:i}=h.useContext(Kn),{hash:s,pathname:a,search:l}=_u(e,{relative:r}),c=a;return o!=="/"&&(c=a==="/"?o:Sr([o,a])),i.createHref({pathname:c,search:l,hash:s})}function Ri(){return h.useContext(bu)!=null}function Mi(){return Ri()||Te(!1),h.useContext(bu).location}function ob(e){h.useContext(Kn).static||h.useLayoutEffect(e)}function ib(){let{isDataRoute:e}=h.useContext(Ir);return e?Rj():yj()}function yj(){Ri()||Te(!1);let e=h.useContext(wu),{basename:n,future:r,navigator:o}=h.useContext(Kn),{matches:i}=h.useContext(Ir),{pathname:s}=Mi(),a=JSON.stringify(tm(i,r.v7_relativeSplatPath)),l=h.useRef(!1);return ob(()=>{l.current=!0}),h.useCallback(function(u,d){if(d===void 0&&(d={}),!l.current)return;if(typeof u=="number"){o.go(u);return}let f=nm(u,JSON.parse(a),s,d.relative==="path");e==null&&n!=="/"&&(f.pathname=f.pathname==="/"?n:Sr([n,f.pathname])),(d.replace?o.replace:o.push)(f,d.state,d)},[n,o,a,s,e])}function _u(e,n){let{relative:r}=n===void 0?{}:n,{future:o}=h.useContext(Kn),{matches:i}=h.useContext(Ir),{pathname:s}=Mi(),a=JSON.stringify(tm(i,o.v7_relativeSplatPath));return h.useMemo(()=>nm(e,JSON.parse(a),s,r==="path"),[e,a,s,r])}function vj(e,n){return xj(e,n)}function xj(e,n,r,o){Ri()||Te(!1);let{navigator:i}=h.useContext(Kn),{matches:s}=h.useContext(Ir),a=s[s.length-1],l=a?a.params:{};a&&a.pathname;let c=a?a.pathnameBase:"/";a&&a.route;let u=Mi(),d;if(n){var f;let _=typeof n=="string"?Pi(n):n;c==="/"||(f=_.pathname)!=null&&f.startsWith(c)||Te(!1),d=_}else d=u;let p=d.pathname||"/",m=p;if(c!=="/"){let _=c.replace(/^\//,"").split("/");m="/"+p.replace(/^\//,"").split("/").slice(_.length).join("/")}let g=YM(e,{pathname:m}),b=Cj(g&&g.map(_=>Object.assign({},_,{params:Object.assign({},l,_.params),pathname:Sr([c,i.encodeLocation?i.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?c:Sr([c,i.encodeLocation?i.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),s,r,o);return n&&b?h.createElement(bu.Provider,{value:{location:Ks({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:hr.Pop}},b):b}function wj(){let e=Pj(),n=hj(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return h.createElement(h.Fragment,null,h.createElement("h2",null,"Unexpected Application Error!"),h.createElement("h3",{style:{fontStyle:"italic"}},n),r?h.createElement("pre",{style:i},r):null,null)}const bj=h.createElement(wj,null);class _j extends h.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,r){return r.location!==n.location||r.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:r.error,location:r.location,revalidation:n.revalidation||r.revalidation}}componentDidCatch(n,r){console.error("React Router caught the following error during render",n,r)}render(){return this.state.error!==void 0?h.createElement(Ir.Provider,{value:this.props.routeContext},h.createElement(rb.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Sj(e){let{routeContext:n,match:r,children:o}=e,i=h.useContext(wu);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),h.createElement(Ir.Provider,{value:n},o)}function Cj(e,n,r,o){var i;if(n===void 0&&(n=[]),r===void 0&&(r=null),o===void 0&&(o=null),e==null){var s;if(!r)return null;if(r.errors)e=r.matches;else if((s=o)!=null&&s.v7_partialHydration&&n.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let a=e,l=(i=r)==null?void 0:i.errors;if(l!=null){let d=a.findIndex(f=>f.route.id&&(l==null?void 0:l[f.route.id])!==void 0);d>=0||Te(!1),a=a.slice(0,Math.min(a.length,d+1))}let c=!1,u=-1;if(r&&o&&o.v7_partialHydration)for(let d=0;d<a.length;d++){let f=a[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=d),f.route.id){let{loaderData:p,errors:m}=r,g=f.route.loader&&p[f.route.id]===void 0&&(!m||m[f.route.id]===void 0);if(f.route.lazy||g){c=!0,u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((d,f,p)=>{let m,g=!1,b=null,_=null;r&&(m=l&&f.route.id?l[f.route.id]:void 0,b=f.route.errorElement||bj,c&&(u<0&&p===0?(Mj("route-fallback"),g=!0,_=null):u===p&&(g=!0,_=f.route.hydrateFallbackElement||null)));let y=n.concat(a.slice(0,p+1)),x=()=>{let w;return m?w=b:g?w=_:f.route.Component?w=h.createElement(f.route.Component,null):f.route.element?w=f.route.element:w=d,h.createElement(Sj,{match:f,routeContext:{outlet:d,matches:y,isDataRoute:r!=null},children:w})};return r&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?h.createElement(_j,{location:r.location,revalidation:r.revalidation,component:b,error:m,children:x(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):x()},null)}var sb=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(sb||{}),ab=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(ab||{});function Ej(e){let n=h.useContext(wu);return n||Te(!1),n}function kj(e){let n=h.useContext(nb);return n||Te(!1),n}function Nj(e){let n=h.useContext(Ir);return n||Te(!1),n}function lb(e){let n=Nj(),r=n.matches[n.matches.length-1];return r.route.id||Te(!1),r.route.id}function Pj(){var e;let n=h.useContext(rb),r=kj(),o=lb();return n!==void 0?n:(e=r.errors)==null?void 0:e[o]}function Rj(){let{router:e}=Ej(sb.UseNavigateStable),n=lb(ab.UseNavigateStable),r=h.useRef(!1);return ob(()=>{r.current=!0}),h.useCallback(function(i,s){s===void 0&&(s={}),r.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Ks({fromRouteId:n},s)))},[e,n])}const Gy={};function Mj(e,n,r){Gy[e]||(Gy[e]=!0)}function jj(e,n){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Aj(e){let{to:n,replace:r,state:o,relative:i}=e;Ri()||Te(!1);let{future:s,static:a}=h.useContext(Kn),{matches:l}=h.useContext(Ir),{pathname:c}=Mi(),u=ib(),d=nm(n,tm(l,s.v7_relativeSplatPath),c,i==="path"),f=JSON.stringify(d);return h.useEffect(()=>u(JSON.parse(f),{replace:r,state:o,relative:i}),[u,f,i,r,o]),null}function Gr(e){Te(!1)}function Tj(e){let{basename:n="/",children:r=null,location:o,navigationType:i=hr.Pop,navigator:s,static:a=!1,future:l}=e;Ri()&&Te(!1);let c=n.replace(/^\/*/,"/"),u=h.useMemo(()=>({basename:c,navigator:s,static:a,future:Ks({v7_relativeSplatPath:!1},l)}),[c,l,s,a]);typeof o=="string"&&(o=Pi(o));let{pathname:d="/",search:f="",hash:p="",state:m=null,key:g="default"}=o,b=h.useMemo(()=>{let _=di(d,c);return _==null?null:{location:{pathname:_,search:f,hash:p,state:m,key:g},navigationType:i}},[c,d,f,p,m,g,i]);return b==null?null:h.createElement(Kn.Provider,{value:u},h.createElement(bu.Provider,{children:r,value:b}))}function Ij(e){let{children:n,location:r}=e;return vj(dp(n),r)}new Promise(()=>{});function dp(e,n){n===void 0&&(n=[]);let r=[];return h.Children.forEach(e,(o,i)=>{if(!h.isValidElement(o))return;let s=[...n,i];if(o.type===h.Fragment){r.push.apply(r,dp(o.props.children,s));return}o.type!==Gr&&Te(!1),!o.props.index||!o.props.children||Te(!1);let a={id:o.props.id||s.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,loader:o.props.loader,action:o.props.action,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(a.children=dp(o.props.children,s)),r.push(a)}),r}/**
59
+ * React Router DOM v6.30.3
60
+ *
61
+ * Copyright (c) Remix Software Inc.
62
+ *
63
+ * This source code is licensed under the MIT license found in the
64
+ * LICENSE.md file in the root directory of this source tree.
65
+ *
66
+ * @license MIT
67
+ */function bc(){return bc=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},bc.apply(this,arguments)}function cb(e,n){if(e==null)return{};var r={},o=Object.keys(e),i,s;for(s=0;s<o.length;s++)i=o[s],!(n.indexOf(i)>=0)&&(r[i]=e[i]);return r}function $j(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Oj(e,n){return e.button===0&&(!n||n==="_self")&&!$j(e)}const Dj=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Lj=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],zj="6";try{window.__reactRouterVersion=zj}catch{}const Fj=h.createContext({isTransitioning:!1}),Vj="startTransition",Yy=ou[Vj];function Bj(e){let{basename:n,children:r,future:o,window:i}=e,s=h.useRef();s.current==null&&(s.current=WM({window:i,v5Compat:!0}));let a=s.current,[l,c]=h.useState({action:a.action,location:a.location}),{v7_startTransition:u}=o||{},d=h.useCallback(f=>{u&&Yy?Yy(()=>c(f)):c(f)},[c,u]);return h.useLayoutEffect(()=>a.listen(d),[a,d]),h.useEffect(()=>jj(o),[o]),h.createElement(Tj,{basename:n,children:r,location:l.location,navigationType:l.action,navigator:a,future:o})}const Hj=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Wj=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Uj=h.forwardRef(function(n,r){let{onClick:o,relative:i,reloadDocument:s,replace:a,state:l,target:c,to:u,preventScrollReset:d,viewTransition:f}=n,p=cb(n,Dj),{basename:m}=h.useContext(Kn),g,b=!1;if(typeof u=="string"&&Wj.test(u)&&(g=u,Hj))try{let w=new URL(window.location.href),S=u.startsWith("//")?new URL(w.protocol+u):new URL(u),C=di(S.pathname,m);S.origin===w.origin&&C!=null?u=C+S.search+S.hash:b=!0}catch{}let _=gj(u,{relative:i}),y=Xj(u,{replace:a,state:l,target:c,preventScrollReset:d,relative:i,viewTransition:f});function x(w){o&&o(w),w.defaultPrevented||y(w)}return h.createElement("a",bc({},p,{href:g||_,onClick:b||s?o:x,ref:r,target:c}))}),Gj=h.forwardRef(function(n,r){let{"aria-current":o="page",caseSensitive:i=!1,className:s="",end:a=!1,style:l,to:c,viewTransition:u,children:d}=n,f=cb(n,Lj),p=_u(c,{relative:f.relative}),m=Mi(),g=h.useContext(nb),{navigator:b,basename:_}=h.useContext(Kn),y=g!=null&&Kj(p)&&u===!0,x=b.encodeLocation?b.encodeLocation(p).pathname:p.pathname,w=m.pathname,S=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;i||(w=w.toLowerCase(),S=S?S.toLowerCase():null,x=x.toLowerCase()),S&&_&&(S=di(S,_)||S);const C=x!=="/"&&x.endsWith("/")?x.length-1:x.length;let E=w===x||!a&&w.startsWith(x)&&w.charAt(C)==="/",k=S!=null&&(S===x||!a&&S.startsWith(x)&&S.charAt(x.length)==="/"),N={isActive:E,isPending:k,isTransitioning:y},j=E?o:void 0,$;typeof s=="function"?$=s(N):$=[s,E?"active":null,k?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let I=typeof l=="function"?l(N):l;return h.createElement(Uj,bc({},f,{"aria-current":j,className:$,ref:r,style:I,to:c,viewTransition:u}),typeof d=="function"?d(N):d)});var pp;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(pp||(pp={}));var Xy;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Xy||(Xy={}));function Yj(e){let n=h.useContext(wu);return n||Te(!1),n}function Xj(e,n){let{target:r,replace:o,state:i,preventScrollReset:s,relative:a,viewTransition:l}=n===void 0?{}:n,c=ib(),u=Mi(),d=_u(e,{relative:a});return h.useCallback(f=>{if(Oj(f,r)){f.preventDefault();let p=o!==void 0?o:wc(u)===wc(d);c(e,{replace:p,state:i,preventScrollReset:s,relative:a,viewTransition:l})}},[u,c,d,o,i,r,e,s,a,l])}function Kj(e,n){n===void 0&&(n={});let r=h.useContext(Fj);r==null&&Te(!1);let{basename:o}=Yj(pp.useViewTransitionState),i=_u(e,{relative:n.relative});if(!r.isTransitioning)return!1;let s=di(r.currentLocation.pathname,o)||r.currentLocation.pathname,a=di(r.nextLocation.pathname,o)||r.nextLocation.pathname;return fp(i.pathname,a)!=null||fp(i.pathname,s)!=null}const ub=h.createContext({theme:"system",resolvedTheme:"light",setTheme:()=>{}});function qj(){return h.useContext(ub)}function Zj(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Ky(e){return e==="system"?Zj():e}function Qj({children:e}){const[n,r]=h.useState(()=>localStorage.getItem("launchpod-theme")||"system"),[o,i]=h.useState(()=>Ky(localStorage.getItem("launchpod-theme")||"system")),s=h.useCallback(l=>{const c=Ky(l);i(c),document.documentElement.classList.toggle("dark",c==="dark")},[]),a=h.useCallback(l=>{r(l),localStorage.setItem("launchpod-theme",l),s(l)},[s]);return h.useEffect(()=>{s(n);const l=window.matchMedia("(prefers-color-scheme: dark)"),c=()=>{n==="system"&&s("system")};return l.addEventListener("change",c),()=>l.removeEventListener("change",c)},[n,s]),v.jsx(ub.Provider,{value:{theme:n,resolvedTheme:o,setTheme:a},children:e})}function fb(e){var n,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(n=0;n<i;n++)e[n]&&(r=fb(e[n]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function db(){for(var e,n,r=0,o="",i=arguments.length;r<i;r++)(e=arguments[r])&&(n=fb(e))&&(o&&(o+=" "),o+=n);return o}const Jj=(e,n)=>{const r=new Array(e.length+n.length);for(let o=0;o<e.length;o++)r[o]=e[o];for(let o=0;o<n.length;o++)r[e.length+o]=n[o];return r},eA=(e,n)=>({classGroupId:e,validator:n}),pb=(e=new Map,n=null,r)=>({nextPart:e,validators:n,classGroupId:r}),_c="-",qy=[],tA="arbitrary..",nA=e=>{const n=oA(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return rA(a);const l=a.split(_c),c=l[0]===""&&l.length>1?1:0;return hb(l,c,n)},getConflictingClassGroupIds:(a,l)=>{if(l){const c=o[a],u=r[a];return c?u?Jj(u,c):c:u||qy}return r[a]||qy}}},hb=(e,n,r)=>{if(e.length-n===0)return r.classGroupId;const i=e[n],s=r.nextPart.get(i);if(s){const u=hb(e,n+1,s);if(u)return u}const a=r.validators;if(a===null)return;const l=n===0?e.join(_c):e.slice(n).join(_c),c=a.length;for(let u=0;u<c;u++){const d=a[u];if(d.validator(l))return d.classGroupId}},rA=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),r=n.indexOf(":"),o=n.slice(0,r);return o?tA+o:void 0})(),oA=e=>{const{theme:n,classGroups:r}=e;return iA(r,n)},iA=(e,n)=>{const r=pb();for(const o in e){const i=e[o];rm(i,r,o,n)}return r},rm=(e,n,r,o)=>{const i=e.length;for(let s=0;s<i;s++){const a=e[s];sA(a,n,r,o)}},sA=(e,n,r,o)=>{if(typeof e=="string"){aA(e,n,r);return}if(typeof e=="function"){lA(e,n,r,o);return}cA(e,n,r,o)},aA=(e,n,r)=>{const o=e===""?n:mb(n,e);o.classGroupId=r},lA=(e,n,r,o)=>{if(uA(e)){rm(e(o),n,r,o);return}n.validators===null&&(n.validators=[]),n.validators.push(eA(r,e))},cA=(e,n,r,o)=>{const i=Object.entries(e),s=i.length;for(let a=0;a<s;a++){const[l,c]=i[a];rm(c,mb(n,l),r,o)}},mb=(e,n)=>{let r=e;const o=n.split(_c),i=o.length;for(let s=0;s<i;s++){const a=o[s];let l=r.nextPart.get(a);l||(l=pb(),r.nextPart.set(a,l)),r=l}return r},uA=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,fA=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,r=Object.create(null),o=Object.create(null);const i=(s,a)=>{r[s]=a,n++,n>e&&(n=0,o=r,r=Object.create(null))};return{get(s){let a=r[s];if(a!==void 0)return a;if((a=o[s])!==void 0)return i(s,a),a},set(s,a){s in r?r[s]=a:i(s,a)}}},hp="!",Zy=":",dA=[],Qy=(e,n,r,o,i)=>({modifiers:e,hasImportantModifier:n,baseClassName:r,maybePostfixModifierPosition:o,isExternal:i}),pA=e=>{const{prefix:n,experimentalParseClassName:r}=e;let o=i=>{const s=[];let a=0,l=0,c=0,u;const d=i.length;for(let b=0;b<d;b++){const _=i[b];if(a===0&&l===0){if(_===Zy){s.push(i.slice(c,b)),c=b+1;continue}if(_==="/"){u=b;continue}}_==="["?a++:_==="]"?a--:_==="("?l++:_===")"&&l--}const f=s.length===0?i:i.slice(c);let p=f,m=!1;f.endsWith(hp)?(p=f.slice(0,-1),m=!0):f.startsWith(hp)&&(p=f.slice(1),m=!0);const g=u&&u>c?u-c:void 0;return Qy(s,m,p,g)};if(n){const i=n+Zy,s=o;o=a=>a.startsWith(i)?s(a.slice(i.length)):Qy(dA,!1,a,void 0,!0)}if(r){const i=o;o=s=>r({className:s,parseClassName:i})}return o},hA=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((r,o)=>{n.set(r,1e6+o)}),r=>{const o=[];let i=[];for(let s=0;s<r.length;s++){const a=r[s],l=a[0]==="[",c=n.has(a);l||c?(i.length>0&&(i.sort(),o.push(...i),i=[]),o.push(a)):i.push(a)}return i.length>0&&(i.sort(),o.push(...i)),o}},mA=e=>({cache:fA(e.cacheSize),parseClassName:pA(e),sortModifiers:hA(e),...nA(e)}),gA=/\s+/,yA=(e,n)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:i,sortModifiers:s}=n,a=[],l=e.trim().split(gA);let c="";for(let u=l.length-1;u>=0;u-=1){const d=l[u],{isExternal:f,modifiers:p,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:b}=r(d);if(f){c=d+(c.length>0?" "+c:c);continue}let _=!!b,y=o(_?g.substring(0,b):g);if(!y){if(!_){c=d+(c.length>0?" "+c:c);continue}if(y=o(g),!y){c=d+(c.length>0?" "+c:c);continue}_=!1}const x=p.length===0?"":p.length===1?p[0]:s(p).join(":"),w=m?x+hp:x,S=w+y;if(a.indexOf(S)>-1)continue;a.push(S);const C=i(y,_);for(let E=0;E<C.length;++E){const k=C[E];a.push(w+k)}c=d+(c.length>0?" "+c:c)}return c},vA=(...e)=>{let n=0,r,o,i="";for(;n<e.length;)(r=e[n++])&&(o=gb(r))&&(i&&(i+=" "),i+=o);return i},gb=e=>{if(typeof e=="string")return e;let n,r="";for(let o=0;o<e.length;o++)e[o]&&(n=gb(e[o]))&&(r&&(r+=" "),r+=n);return r},xA=(e,...n)=>{let r,o,i,s;const a=c=>{const u=n.reduce((d,f)=>f(d),e());return r=mA(u),o=r.cache.get,i=r.cache.set,s=l,l(c)},l=c=>{const u=o(c);if(u)return u;const d=yA(c,r);return i(c,d),d};return s=a,(...c)=>s(vA(...c))},wA=[],Fe=e=>{const n=r=>r[e]||wA;return n.isThemeGetter=!0,n},yb=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,vb=/^\((?:(\w[\w-]*):)?(.+)\)$/i,bA=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,_A=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,SA=/\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$/,CA=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,EA=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,kA=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Jn=e=>bA.test(e),ue=e=>!!e&&!Number.isNaN(Number(e)),er=e=>!!e&&Number.isInteger(Number(e)),Ff=e=>e.endsWith("%")&&ue(e.slice(0,-1)),Nn=e=>_A.test(e),xb=()=>!0,NA=e=>SA.test(e)&&!CA.test(e),om=()=>!1,PA=e=>EA.test(e),RA=e=>kA.test(e),MA=e=>!oe(e)&&!ie(e),jA=e=>$r(e,_b,om),oe=e=>yb.test(e),Vr=e=>$r(e,Sb,NA),Jy=e=>$r(e,zA,ue),AA=e=>$r(e,Eb,xb),TA=e=>$r(e,Cb,om),ev=e=>$r(e,wb,om),IA=e=>$r(e,bb,RA),nl=e=>$r(e,kb,PA),ie=e=>vb.test(e),Xi=e=>wo(e,Sb),$A=e=>wo(e,Cb),tv=e=>wo(e,wb),OA=e=>wo(e,_b),DA=e=>wo(e,bb),rl=e=>wo(e,kb,!0),LA=e=>wo(e,Eb,!0),$r=(e,n,r)=>{const o=yb.exec(e);return o?o[1]?n(o[1]):r(o[2]):!1},wo=(e,n,r=!1)=>{const o=vb.exec(e);return o?o[1]?n(o[1]):r:!1},wb=e=>e==="position"||e==="percentage",bb=e=>e==="image"||e==="url",_b=e=>e==="length"||e==="size"||e==="bg-size",Sb=e=>e==="length",zA=e=>e==="number",Cb=e=>e==="family-name",Eb=e=>e==="number"||e==="weight",kb=e=>e==="shadow",FA=()=>{const e=Fe("color"),n=Fe("font"),r=Fe("text"),o=Fe("font-weight"),i=Fe("tracking"),s=Fe("leading"),a=Fe("breakpoint"),l=Fe("container"),c=Fe("spacing"),u=Fe("radius"),d=Fe("shadow"),f=Fe("inset-shadow"),p=Fe("text-shadow"),m=Fe("drop-shadow"),g=Fe("blur"),b=Fe("perspective"),_=Fe("aspect"),y=Fe("ease"),x=Fe("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...S(),ie,oe],E=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],N=()=>[ie,oe,c],j=()=>[Jn,"full","auto",...N()],$=()=>[er,"none","subgrid",ie,oe],I=()=>["auto",{span:["full",er,ie,oe]},er,ie,oe],O=()=>[er,"auto",ie,oe],H=()=>["auto","min","max","fr",ie,oe],R=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],L=()=>["start","end","center","stretch","center-safe","end-safe"],D=()=>["auto",...N()],z=()=>[Jn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...N()],A=()=>[Jn,"screen","full","dvw","lvw","svw","min","max","fit",...N()],M=()=>[Jn,"screen","full","lh","dvh","lvh","svh","min","max","fit",...N()],P=()=>[e,ie,oe],W=()=>[...S(),tv,ev,{position:[ie,oe]}],T=()=>["no-repeat",{repeat:["","x","y","space","round"]}],X=()=>["auto","cover","contain",OA,jA,{size:[ie,oe]}],F=()=>[Ff,Xi,Vr],B=()=>["","none","full",u,ie,oe],G=()=>["",ue,Xi,Vr],U=()=>["solid","dashed","dotted","double"],Y=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],K=()=>[ue,Ff,tv,ev],ee=()=>["","none",g,ie,oe],J=()=>["none",ue,ie,oe],Q=()=>["none",ue,ie,oe],ne=()=>[ue,ie,oe],ce=()=>[Jn,"full",...N()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Nn],breakpoint:[Nn],color:[xb],container:[Nn],"drop-shadow":[Nn],ease:["in","out","in-out"],font:[MA],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Nn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Nn],shadow:[Nn],spacing:["px",ue],text:[Nn],"text-shadow":[Nn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Jn,oe,ie,_]}],container:["container"],columns:[{columns:[ue,oe,ie,l]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"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:C()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:j()}],"inset-x":[{"inset-x":j()}],"inset-y":[{"inset-y":j()}],start:[{"inset-s":j(),start:j()}],end:[{"inset-e":j(),end:j()}],"inset-bs":[{"inset-bs":j()}],"inset-be":[{"inset-be":j()}],top:[{top:j()}],right:[{right:j()}],bottom:[{bottom:j()}],left:[{left:j()}],visibility:["visible","invisible","collapse"],z:[{z:[er,"auto",ie,oe]}],basis:[{basis:[Jn,"full","auto",l,...N()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ue,Jn,"auto","initial","none",oe]}],grow:[{grow:["",ue,ie,oe]}],shrink:[{shrink:["",ue,ie,oe]}],order:[{order:[er,"first","last","none",ie,oe]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":H()}],"auto-rows":[{"auto-rows":H()}],gap:[{gap:N()}],"gap-x":[{"gap-x":N()}],"gap-y":[{"gap-y":N()}],"justify-content":[{justify:[...R(),"normal"]}],"justify-items":[{"justify-items":[...L(),"normal"]}],"justify-self":[{"justify-self":["auto",...L()]}],"align-content":[{content:["normal",...R()]}],"align-items":[{items:[...L(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...L(),{baseline:["","last"]}]}],"place-content":[{"place-content":R()}],"place-items":[{"place-items":[...L(),"baseline"]}],"place-self":[{"place-self":["auto",...L()]}],p:[{p:N()}],px:[{px:N()}],py:[{py:N()}],ps:[{ps:N()}],pe:[{pe:N()}],pbs:[{pbs:N()}],pbe:[{pbe:N()}],pt:[{pt:N()}],pr:[{pr:N()}],pb:[{pb:N()}],pl:[{pl:N()}],m:[{m:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mbs:[{mbs:D()}],mbe:[{mbe:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":N()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":N()}],"space-y-reverse":["space-y-reverse"],size:[{size:z()}],"inline-size":[{inline:["auto",...A()]}],"min-inline-size":[{"min-inline":["auto",...A()]}],"max-inline-size":[{"max-inline":["none",...A()]}],"block-size":[{block:["auto",...M()]}],"min-block-size":[{"min-block":["auto",...M()]}],"max-block-size":[{"max-block":["none",...M()]}],w:[{w:[l,"screen",...z()]}],"min-w":[{"min-w":[l,"screen","none",...z()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[a]},...z()]}],h:[{h:["screen","lh",...z()]}],"min-h":[{"min-h":["screen","lh","none",...z()]}],"max-h":[{"max-h":["screen","lh",...z()]}],"font-size":[{text:["base",r,Xi,Vr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,LA,AA]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ff,oe]}],"font-family":[{font:[$A,TA,n]}],"font-features":[{"font-features":[oe]}],"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:[i,ie,oe]}],"line-clamp":[{"line-clamp":[ue,"none",ie,Jy]}],leading:[{leading:[s,...N()]}],"list-image":[{"list-image":["none",ie,oe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ie,oe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:[ue,"from-font","auto",ie,Vr]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[ue,"auto",ie,oe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ie,oe]}],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",ie,oe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:W()}],"bg-repeat":[{bg:T()}],"bg-size":[{bg:X()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},er,ie,oe],radial:["",ie,oe],conic:[er,ie,oe]},DA,IA]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:B()}],"rounded-s":[{"rounded-s":B()}],"rounded-e":[{"rounded-e":B()}],"rounded-t":[{"rounded-t":B()}],"rounded-r":[{"rounded-r":B()}],"rounded-b":[{"rounded-b":B()}],"rounded-l":[{"rounded-l":B()}],"rounded-ss":[{"rounded-ss":B()}],"rounded-se":[{"rounded-se":B()}],"rounded-ee":[{"rounded-ee":B()}],"rounded-es":[{"rounded-es":B()}],"rounded-tl":[{"rounded-tl":B()}],"rounded-tr":[{"rounded-tr":B()}],"rounded-br":[{"rounded-br":B()}],"rounded-bl":[{"rounded-bl":B()}],"border-w":[{border:G()}],"border-w-x":[{"border-x":G()}],"border-w-y":[{"border-y":G()}],"border-w-s":[{"border-s":G()}],"border-w-e":[{"border-e":G()}],"border-w-bs":[{"border-bs":G()}],"border-w-be":[{"border-be":G()}],"border-w-t":[{"border-t":G()}],"border-w-r":[{"border-r":G()}],"border-w-b":[{"border-b":G()}],"border-w-l":[{"border-l":G()}],"divide-x":[{"divide-x":G()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":G()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...U(),"hidden","none"]}],"divide-style":[{divide:[...U(),"hidden","none"]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-bs":[{"border-bs":P()}],"border-color-be":[{"border-be":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...U(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ue,ie,oe]}],"outline-w":[{outline:["",ue,Xi,Vr]}],"outline-color":[{outline:P()}],shadow:[{shadow:["","none",d,rl,nl]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":["none",f,rl,nl]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:G()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[ue,Vr]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":G()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":["none",p,rl,nl]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[ue,ie,oe]}],"mix-blend":[{"mix-blend":[...Y(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Y()}],"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":K()}],"mask-image-linear-to-pos":[{"mask-linear-to":K()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":K()}],"mask-image-t-to-pos":[{"mask-t-to":K()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":K()}],"mask-image-r-to-pos":[{"mask-r-to":K()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":K()}],"mask-image-b-to-pos":[{"mask-b-to":K()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":K()}],"mask-image-l-to-pos":[{"mask-l-to":K()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":K()}],"mask-image-x-to-pos":[{"mask-x-to":K()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":K()}],"mask-image-y-to-pos":[{"mask-y-to":K()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[ie,oe]}],"mask-image-radial-from-pos":[{"mask-radial-from":K()}],"mask-image-radial-to-pos":[{"mask-radial-to":K()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"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":S()}],"mask-image-conic-pos":[{"mask-conic":[ue]}],"mask-image-conic-from-pos":[{"mask-conic-from":K()}],"mask-image-conic-to-pos":[{"mask-conic-to":K()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:W()}],"mask-repeat":[{mask:T()}],"mask-size":[{mask:X()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ie,oe]}],filter:[{filter:["","none",ie,oe]}],blur:[{blur:ee()}],brightness:[{brightness:[ue,ie,oe]}],contrast:[{contrast:[ue,ie,oe]}],"drop-shadow":[{"drop-shadow":["","none",m,rl,nl]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:["",ue,ie,oe]}],"hue-rotate":[{"hue-rotate":[ue,ie,oe]}],invert:[{invert:["",ue,ie,oe]}],saturate:[{saturate:[ue,ie,oe]}],sepia:[{sepia:["",ue,ie,oe]}],"backdrop-filter":[{"backdrop-filter":["","none",ie,oe]}],"backdrop-blur":[{"backdrop-blur":ee()}],"backdrop-brightness":[{"backdrop-brightness":[ue,ie,oe]}],"backdrop-contrast":[{"backdrop-contrast":[ue,ie,oe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ue,ie,oe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ue,ie,oe]}],"backdrop-invert":[{"backdrop-invert":["",ue,ie,oe]}],"backdrop-opacity":[{"backdrop-opacity":[ue,ie,oe]}],"backdrop-saturate":[{"backdrop-saturate":[ue,ie,oe]}],"backdrop-sepia":[{"backdrop-sepia":["",ue,ie,oe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":N()}],"border-spacing-x":[{"border-spacing-x":N()}],"border-spacing-y":[{"border-spacing-y":N()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ie,oe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ue,"initial",ie,oe]}],ease:[{ease:["linear","initial",y,ie,oe]}],delay:[{delay:[ue,ie,oe]}],animate:[{animate:["none",x,ie,oe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,ie,oe]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:J()}],"rotate-x":[{"rotate-x":J()}],"rotate-y":[{"rotate-y":J()}],"rotate-z":[{"rotate-z":J()}],scale:[{scale:Q()}],"scale-x":[{"scale-x":Q()}],"scale-y":[{"scale-y":Q()}],"scale-z":[{"scale-z":Q()}],"scale-3d":["scale-3d"],skew:[{skew:ne()}],"skew-x":[{"skew-x":ne()}],"skew-y":[{"skew-y":ne()}],transform:[{transform:[ie,oe,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ce()}],"translate-x":[{"translate-x":ce()}],"translate-y":[{"translate-y":ce()}],"translate-z":[{"translate-z":ce()}],"translate-none":["translate-none"],accent:[{accent:P()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:P()}],"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",ie,oe]}],"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":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mbs":[{"scroll-mbs":N()}],"scroll-mbe":[{"scroll-mbe":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pbs":[{"scroll-pbs":N()}],"scroll-pbe":[{"scroll-pbe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"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",ie,oe]}],fill:[{fill:["none",...P()]}],"stroke-w":[{stroke:[ue,Xi,Vr,Jy]}],stroke:[{stroke:["none",...P()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-bs","border-w-be","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-bs","border-color-be","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-mbs","scroll-mbe","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-pbs","scroll-pbe","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"]}},VA=xA(FA);function se(...e){return VA(db(e))}function Nb(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a);l.displayName=s+"Context";const c=r.length;r=[...r,a];const u=f=>{var y;const{scope:p,children:m,...g}=f,b=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,_=h.useMemo(()=>g,Object.values(g));return v.jsx(b.Provider,{value:_,children:m})};u.displayName=s+"Provider";function d(f,p){var b;const m=((b=p==null?void 0:p[e])==null?void 0:b[c])||l,g=h.useContext(m);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,BA(i,...n)]}function BA(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const f=c(s)[`__scope${u}`];return{...l,...f}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function _n(e){const n=h.useRef(e);return h.useEffect(()=>{n.current=e}),h.useMemo(()=>(...r)=>{var o;return(o=n.current)==null?void 0:o.call(n,...r)},[])}var He=globalThis!=null&&globalThis.document?h.useLayoutEffect:()=>{};function nv(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function _e(...e){return n=>{let r=!1;const o=e.map(i=>{const s=nv(i,n);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let i=0;i<o.length;i++){const s=o[i];typeof s=="function"?s():nv(e[i],null)}}}}function pe(...e){return h.useCallback(_e(...e),e)}var HA=Symbol.for("react.lazy"),Sc=ou[" use ".trim().toString()];function WA(e){return typeof e=="object"&&e!==null&&"then"in e}function Pb(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===HA&&"_payload"in e&&WA(e._payload)}function Rb(e){const n=UA(e),r=h.forwardRef((o,i)=>{let{children:s,...a}=o;Pb(s)&&typeof Sc=="function"&&(s=Sc(s._payload));const l=h.Children.toArray(s),c=l.find(YA);if(c){const u=c.props.children,d=l.map(f=>f===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:f);return v.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,d):null})}return v.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}var Mb=Rb("Slot");function UA(e){const n=h.forwardRef((r,o)=>{let{children:i,...s}=r;if(Pb(i)&&typeof Sc=="function"&&(i=Sc(i._payload)),h.isValidElement(i)){const a=KA(i),l=XA(s,i.props);return i.type!==h.Fragment&&(l.ref=o?_e(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var GA=Symbol("radix.slottable");function YA(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===GA}function XA(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function KA(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var qA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],lt=qA.reduce((e,n)=>{const r=Rb(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),jb={exports:{}},Ab={};/**
68
+ * @license React
69
+ * use-sync-external-store-shim.production.js
70
+ *
71
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
72
+ *
73
+ * This source code is licensed under the MIT license found in the
74
+ * LICENSE file in the root directory of this source tree.
75
+ */var pi=h;function ZA(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var QA=typeof Object.is=="function"?Object.is:ZA,JA=pi.useState,eT=pi.useEffect,tT=pi.useLayoutEffect,nT=pi.useDebugValue;function rT(e,n){var r=n(),o=JA({inst:{value:r,getSnapshot:n}}),i=o[0].inst,s=o[1];return tT(function(){i.value=r,i.getSnapshot=n,Vf(i)&&s({inst:i})},[e,r,n]),eT(function(){return Vf(i)&&s({inst:i}),e(function(){Vf(i)&&s({inst:i})})},[e]),nT(r),r}function Vf(e){var n=e.getSnapshot;e=e.value;try{var r=n();return!QA(e,r)}catch{return!0}}function oT(e,n){return n()}var iT=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?oT:rT;Ab.useSyncExternalStore=pi.useSyncExternalStore!==void 0?pi.useSyncExternalStore:iT;jb.exports=Ab;var Tb=jb.exports;function sT(){return Tb.useSyncExternalStore(aT,()=>!0,()=>!1)}function aT(){return()=>{}}var im="Avatar",[lT]=Nb(im),[cT,Ib]=lT(im),$b=h.forwardRef((e,n)=>{const{__scopeAvatar:r,...o}=e,[i,s]=h.useState("idle");return v.jsx(cT,{scope:r,imageLoadingStatus:i,onImageLoadingStatusChange:s,children:v.jsx(lt.span,{...o,ref:n})})});$b.displayName=im;var Ob="AvatarImage",Db=h.forwardRef((e,n)=>{const{__scopeAvatar:r,src:o,onLoadingStatusChange:i=()=>{},...s}=e,a=Ib(Ob,r),l=uT(o,s),c=_n(u=>{i(u),a.onImageLoadingStatusChange(u)});return He(()=>{l!=="idle"&&c(l)},[l,c]),l==="loaded"?v.jsx(lt.img,{...s,ref:n,src:o}):null});Db.displayName=Ob;var Lb="AvatarFallback",zb=h.forwardRef((e,n)=>{const{__scopeAvatar:r,delayMs:o,...i}=e,s=Ib(Lb,r),[a,l]=h.useState(o===void 0);return h.useEffect(()=>{if(o!==void 0){const c=window.setTimeout(()=>l(!0),o);return()=>window.clearTimeout(c)}},[o]),a&&s.imageLoadingStatus!=="loaded"?v.jsx(lt.span,{...i,ref:n}):null});zb.displayName=Lb;function rv(e,n){return e?n?(e.src!==n&&(e.src=n),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function uT(e,{referrerPolicy:n,crossOrigin:r}){const o=sT(),i=h.useRef(null),s=o?(i.current||(i.current=new window.Image),i.current):null,[a,l]=h.useState(()=>rv(s,e));return He(()=>{l(rv(s,e))},[s,e]),He(()=>{const c=f=>()=>{l(f)};if(!s)return;const u=c("loaded"),d=c("error");return s.addEventListener("load",u),s.addEventListener("error",d),n&&(s.referrerPolicy=n),typeof r=="string"&&(s.crossOrigin=r),()=>{s.removeEventListener("load",u),s.removeEventListener("error",d)}},[s,r,n]),a}var Fb=$b,Vb=Db,Bb=zb;const fT=h.forwardRef(({className:e,...n},r)=>v.jsx(Fb,{ref:r,className:se("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...n}));fT.displayName=Fb.displayName;const dT=h.forwardRef(({className:e,...n},r)=>v.jsx(Vb,{ref:r,className:se("aspect-square h-full w-full",e),...n}));dT.displayName=Vb.displayName;const pT=h.forwardRef(({className:e,...n},r)=>v.jsx(Bb,{ref:r,className:se("flex h-full w-full items-center justify-center rounded-full bg-primary/10 text-primary font-medium",e),...n}));pT.displayName=Bb.displayName;const ov=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,iv=db,sm=(e,n)=>r=>{var o;if((n==null?void 0:n.variants)==null)return iv(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:s}=n,a=Object.keys(i).map(u=>{const d=r==null?void 0:r[u],f=s==null?void 0:s[u];if(d===null)return null;const p=ov(d)||ov(f);return i[u][p]}),l=r&&Object.entries(r).reduce((u,d)=>{let[f,p]=d;return p===void 0||(u[f]=p),u},{}),c=n==null||(o=n.compoundVariants)===null||o===void 0?void 0:o.reduce((u,d)=>{let{class:f,className:p,...m}=d;return Object.entries(m).every(g=>{let[b,_]=g;return Array.isArray(_)?_.includes({...s,...l}[b]):{...s,...l}[b]===_})?[...u,f,p]:u},[]);return iv(e,a,c,r==null?void 0:r.class,r==null?void 0:r.className)};/**
76
+ * @license lucide-react v0.576.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 Hb=(...e)=>e.filter((n,r,o)=>!!n&&n.trim()!==""&&o.indexOf(n)===r).join(" ").trim();/**
81
+ * @license lucide-react v0.576.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 hT=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
86
+ * @license lucide-react v0.576.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 mT=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,r,o)=>o?o.toUpperCase():r.toLowerCase());/**
91
+ * @license lucide-react v0.576.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 sv=e=>{const n=mT(e);return n.charAt(0).toUpperCase()+n.slice(1)};/**
96
+ * @license lucide-react v0.576.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
+ */var gT={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"};/**
101
+ * @license lucide-react v0.576.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 yT=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1};/**
106
+ * @license lucide-react v0.576.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 vT=h.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:i="",children:s,iconNode:a,...l},c)=>h.createElement("svg",{ref:c,...gT,width:n,height:n,stroke:e,strokeWidth:o?Number(r)*24/Number(n):r,className:Hb("lucide",i),...!s&&!yT(l)&&{"aria-hidden":"true"},...l},[...a.map(([u,d])=>h.createElement(u,d)),...Array.isArray(s)?s:[s]]));/**
111
+ * @license lucide-react v0.576.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 ye=(e,n)=>{const r=h.forwardRef(({className:o,...i},s)=>h.createElement(vT,{ref:s,iconNode:n,className:Hb(`lucide-${hT(sv(e))}`,`lucide-${e}`,o),...i}));return r.displayName=sv(e),r};/**
116
+ * @license lucide-react v0.576.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 xT=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Wb=ye("arrow-left",xT);/**
121
+ * @license lucide-react v0.576.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 wT=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],bT=ye("arrow-right",wT);/**
126
+ * @license lucide-react v0.576.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 _T=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],am=ye("boxes",_T);/**
131
+ * @license lucide-react v0.576.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 ST=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],lm=ye("check",ST);/**
136
+ * @license lucide-react v0.576.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 CT=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ub=ye("chevron-down",CT);/**
141
+ * @license lucide-react v0.576.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 ET=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Cc=ye("chevron-right",ET);/**
146
+ * @license lucide-react v0.576.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 kT=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],NT=ye("chevron-up",kT);/**
151
+ * @license lucide-react v0.576.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 PT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],RT=ye("circle-alert",PT);/**
156
+ * @license lucide-react v0.576.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 MT=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],av=ye("circle-check-big",MT);/**
161
+ * @license lucide-react v0.576.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 jT=[["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"}]],AT=ye("circle-x",jT);/**
166
+ * @license lucide-react v0.576.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 TT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],IT=ye("circle",TT);/**
171
+ * @license lucide-react v0.576.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 $T=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],cm=ye("database",$T);/**
176
+ * @license lucide-react v0.576.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 OT=[["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"}]],DT=ye("file-code",OT);/**
181
+ * @license lucide-react v0.576.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 LT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],um=ye("globe",LT);/**
186
+ * @license lucide-react v0.576.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 zT=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],ma=ye("layers",zT);/**
191
+ * @license lucide-react v0.576.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 FT=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],VT=ye("layout-dashboard",FT);/**
196
+ * @license lucide-react v0.576.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 BT=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],lv=ye("link",BT);/**
201
+ * @license lucide-react v0.576.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 HT=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],WT=ye("moon",HT);/**
206
+ * @license lucide-react v0.576.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 UT=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],GT=ye("network",UT);/**
211
+ * @license lucide-react v0.576.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 YT=[["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"}]],cv=ye("package",YT);/**
216
+ * @license lucide-react v0.576.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 XT=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],uv=ye("plus",XT);/**
221
+ * @license lucide-react v0.576.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 KT=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Gb=ye("refresh-cw",KT);/**
226
+ * @license lucide-react v0.576.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 qT=[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]],ZT=ye("route",qT);/**
231
+ * @license lucide-react v0.576.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 QT=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],JT=ye("save",QT);/**
236
+ * @license lucide-react v0.576.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 e3=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],t3=ye("search",e3);/**
241
+ * @license lucide-react v0.576.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 n3=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Yb=ye("settings",n3);/**
246
+ * @license lucide-react v0.576.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 r3=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],o3=ye("sun",r3);/**
251
+ * @license lucide-react v0.576.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 i3=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],s3=ye("tag",i3);/**
256
+ * @license lucide-react v0.576.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 a3=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],fv=ye("trash-2",a3);/**
261
+ * @license lucide-react v0.576.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 l3=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ec=ye("x",l3);/**
266
+ * @license lucide-react v0.576.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 c3=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],u3=ye("zap",c3),f3=h.forwardRef(({...e},n)=>v.jsx("nav",{ref:n,"aria-label":"breadcrumb",...e}));f3.displayName="Breadcrumb";const d3=h.forwardRef(({className:e,...n},r)=>v.jsx("ol",{ref:r,className:se("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...n}));d3.displayName="BreadcrumbList";const p3=h.forwardRef(({className:e,...n},r)=>v.jsx("li",{ref:r,className:se("inline-flex items-center gap-1.5",e),...n}));p3.displayName="BreadcrumbItem";const h3=h.forwardRef(({asChild:e,className:n,...r},o)=>{const i=e?Mb:"a";return v.jsx(i,{ref:o,className:se("transition-colors hover:text-foreground",n),...r})});h3.displayName="BreadcrumbLink";const m3=h.forwardRef(({className:e,...n},r)=>v.jsx("span",{ref:r,role:"link","aria-disabled":"true","aria-current":"page",className:se("font-normal text-foreground",e),...n}));m3.displayName="BreadcrumbPage";const g3=sm("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"}}),Xb=h.forwardRef(({className:e,variant:n,size:r,asChild:o=!1,...i},s)=>{const a=o?Mb:"button";return v.jsx(a,{className:se(g3({variant:n,size:r,className:e})),ref:s,...i})});Xb.displayName="Button";const y3=h.forwardRef(({className:e,onClick:n,...r},o)=>{const i=h.useRef(null),[s,a]=h.useState(!1);return h.useEffect(()=>{var u;const l=i.current;if(!l)return;const c=!!n||((u=l.parentElement)==null?void 0:u.tagName)==="A"||!!l.querySelector(":scope > a");a(c)},[n]),v.jsx("div",{ref:l=>{i.current=l,typeof o=="function"?o(l):o&&(o.current=l)},className:se("ls-card rounded-xl bg-card text-card-foreground",s&&"interactive",e),onClick:n,...r})});y3.displayName="Card";const v3=h.forwardRef(({className:e,...n},r)=>v.jsx("div",{ref:r,className:se("flex flex-col space-y-1.5 p-6",e),...n}));v3.displayName="CardHeader";const x3=h.forwardRef(({className:e,...n},r)=>v.jsx("div",{ref:r,className:se("font-semibold leading-none tracking-tight",e),...n}));x3.displayName="CardTitle";const w3=h.forwardRef(({className:e,...n},r)=>v.jsx("div",{ref:r,className:se("text-sm text-muted-foreground",e),...n}));w3.displayName="CardDescription";const b3=h.forwardRef(({className:e,...n},r)=>v.jsx("div",{ref:r,className:se("p-6 pt-0",e),...n}));b3.displayName="CardContent";const _3=h.forwardRef(({className:e,...n},r)=>v.jsx("div",{ref:r,className:se("flex items-center p-6 pt-0",e),...n}));_3.displayName="CardFooter";function S3(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=f=>{var y;const{scope:p,children:m,...g}=f,b=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,_=h.useMemo(()=>g,Object.values(g));return v.jsx(b.Provider,{value:_,children:m})};u.displayName=s+"Provider";function d(f,p){var b;const m=((b=p==null?void 0:p[e])==null?void 0:b[c])||l,g=h.useContext(m);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,C3(i,...n)]}function C3(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const f=c(s)[`__scope${u}`];return{...l,...f}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function te(e,n,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return n==null?void 0:n(i)}}var E3=ou[" useInsertionEffect ".trim().toString()]||He;function ga({prop:e,defaultProp:n,onChange:r=()=>{},caller:o}){const[i,s,a]=k3({defaultProp:n,onChange:r}),l=e!==void 0,c=l?e:i;{const d=h.useRef(e!==void 0);h.useEffect(()=>{const f=d.current;f!==l&&console.warn(`${o} is changing from ${f?"controlled":"uncontrolled"} to ${l?"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.`),d.current=l},[l,o])}const u=h.useCallback(d=>{var f;if(l){const p=N3(d)?d(e):d;p!==e&&((f=a.current)==null||f.call(a,p))}else s(d)},[l,e,s,a]);return[c,u]}function k3({defaultProp:e,onChange:n}){const[r,o]=h.useState(e),i=h.useRef(r),s=h.useRef(n);return E3(()=>{s.current=n},[n]),h.useEffect(()=>{var a;i.current!==r&&((a=s.current)==null||a.call(s,r),i.current=r)},[r,i]),[r,o,s]}function N3(e){return typeof e=="function"}function fm(e){const n=h.useRef({value:e,previous:e});return h.useMemo(()=>(n.current.value!==e&&(n.current.previous=n.current.value,n.current.value=e),n.current.previous),[e])}function dm(e){const[n,r]=h.useState(void 0);return He(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let a,l;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,l=u.blockSize}else a=e.offsetWidth,l=e.offsetHeight;r({width:a,height:l})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else r(void 0)},[e]),n}function P3(e,n){return h.useReducer((r,o)=>n[r][o]??r,e)}var yt=e=>{const{present:n,children:r}=e,o=R3(n),i=typeof r=="function"?r({present:o.isPresent}):h.Children.only(r),s=pe(o.ref,M3(i));return typeof r=="function"||o.isPresent?h.cloneElement(i,{ref:s}):null};yt.displayName="Presence";function R3(e){const[n,r]=h.useState(),o=h.useRef(null),i=h.useRef(e),s=h.useRef("none"),a=e?"mounted":"unmounted",[l,c]=P3(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.useEffect(()=>{const u=ol(o.current);s.current=l==="mounted"?u:"none"},[l]),He(()=>{const u=o.current,d=i.current;if(d!==e){const p=s.current,m=ol(u);e?c("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&p!==m?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),He(()=>{if(n){let u;const d=n.ownerDocument.defaultView??window,f=m=>{const b=ol(o.current).includes(CSS.escape(m.animationName));if(m.target===n&&b&&(c("ANIMATION_END"),!i.current)){const _=n.style.animationFillMode;n.style.animationFillMode="forwards",u=d.setTimeout(()=>{n.style.animationFillMode==="forwards"&&(n.style.animationFillMode=_)})}},p=m=>{m.target===n&&(s.current=ol(o.current))};return n.addEventListener("animationstart",p),n.addEventListener("animationcancel",f),n.addEventListener("animationend",f),()=>{d.clearTimeout(u),n.removeEventListener("animationstart",p),n.removeEventListener("animationcancel",f),n.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[n,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:h.useCallback(u=>{o.current=u?getComputedStyle(u):null,r(u)},[])}}function ol(e){return(e==null?void 0:e.animationName)||"none"}function M3(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function j3(e){const n=A3(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(I3);if(c){const u=c.props.children,d=l.map(f=>f===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:f);return v.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,d):null})}return v.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function A3(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=O3(i),l=$3(s,i.props);return i.type!==h.Fragment&&(l.ref=o?_e(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var T3=Symbol("radix.slottable");function I3(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===T3}function $3(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function O3(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var D3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],pm=D3.reduce((e,n)=>{const r=j3(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),Su="Checkbox",[L3]=S3(Su),[z3,hm]=L3(Su);function F3(e){const{__scopeCheckbox:n,checked:r,children:o,defaultChecked:i,disabled:s,form:a,name:l,onCheckedChange:c,required:u,value:d="on",internal_do_not_use_render:f}=e,[p,m]=ga({prop:r,defaultProp:i??!1,onChange:c,caller:Su}),[g,b]=h.useState(null),[_,y]=h.useState(null),x=h.useRef(!1),w=g?!!a||!!g.closest("form"):!0,S={checked:p,disabled:s,setChecked:m,control:g,setControl:b,name:l,form:a,value:d,hasConsumerStoppedPropagationRef:x,required:u,defaultChecked:Cr(i)?!1:i,isFormControl:w,bubbleInput:_,setBubbleInput:y};return v.jsx(z3,{scope:n,...S,children:V3(f)?f(S):o})}var Kb="CheckboxTrigger",qb=h.forwardRef(({__scopeCheckbox:e,onKeyDown:n,onClick:r,...o},i)=>{const{control:s,value:a,disabled:l,checked:c,required:u,setControl:d,setChecked:f,hasConsumerStoppedPropagationRef:p,isFormControl:m,bubbleInput:g}=hm(Kb,e),b=pe(i,d),_=h.useRef(c);return h.useEffect(()=>{const y=s==null?void 0:s.form;if(y){const x=()=>f(_.current);return y.addEventListener("reset",x),()=>y.removeEventListener("reset",x)}},[s,f]),v.jsx(pm.button,{type:"button",role:"checkbox","aria-checked":Cr(c)?"mixed":c,"aria-required":u,"data-state":t_(c),"data-disabled":l?"":void 0,disabled:l,value:a,...o,ref:b,onKeyDown:te(n,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:te(r,y=>{f(x=>Cr(x)?!0:!x),g&&m&&(p.current=y.isPropagationStopped(),p.current||y.stopPropagation())})})});qb.displayName=Kb;var mm=h.forwardRef((e,n)=>{const{__scopeCheckbox:r,name:o,checked:i,defaultChecked:s,required:a,disabled:l,value:c,onCheckedChange:u,form:d,...f}=e;return v.jsx(F3,{__scopeCheckbox:r,checked:i,defaultChecked:s,disabled:l,required:a,onCheckedChange:u,name:o,form:d,value:c,internal_do_not_use_render:({isFormControl:p})=>v.jsxs(v.Fragment,{children:[v.jsx(qb,{...f,ref:n,__scopeCheckbox:r}),p&&v.jsx(e_,{__scopeCheckbox:r})]})})});mm.displayName=Su;var Zb="CheckboxIndicator",Qb=h.forwardRef((e,n)=>{const{__scopeCheckbox:r,forceMount:o,...i}=e,s=hm(Zb,r);return v.jsx(yt,{present:o||Cr(s.checked)||s.checked===!0,children:v.jsx(pm.span,{"data-state":t_(s.checked),"data-disabled":s.disabled?"":void 0,...i,ref:n,style:{pointerEvents:"none",...e.style}})})});Qb.displayName=Zb;var Jb="CheckboxBubbleInput",e_=h.forwardRef(({__scopeCheckbox:e,...n},r)=>{const{control:o,hasConsumerStoppedPropagationRef:i,checked:s,defaultChecked:a,required:l,disabled:c,name:u,value:d,form:f,bubbleInput:p,setBubbleInput:m}=hm(Jb,e),g=pe(r,m),b=fm(s),_=dm(o);h.useEffect(()=>{const x=p;if(!x)return;const w=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(w,"checked").set,E=!i.current;if(b!==s&&C){const k=new Event("click",{bubbles:E});x.indeterminate=Cr(s),C.call(x,Cr(s)?!1:s),x.dispatchEvent(k)}},[p,b,s,i]);const y=h.useRef(Cr(s)?!1:s);return v.jsx(pm.input,{type:"checkbox","aria-hidden":!0,defaultChecked:a??y.current,required:l,disabled:c,name:u,value:d,form:f,...n,tabIndex:-1,ref:g,style:{...n.style,..._,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});e_.displayName=Jb;function V3(e){return typeof e=="function"}function Cr(e){return e==="indeterminate"}function t_(e){return Cr(e)?"indeterminate":e?"checked":"unchecked"}const B3=h.forwardRef(({className:e,...n},r)=>v.jsx(mm,{ref:r,className:se("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),...n,children:v.jsx(Qb,{className:se("grid place-content-center text-current"),children:v.jsx(lm,{className:"h-4 w-4"})})}));B3.displayName=mm.displayName;var H3=ou[" useId ".trim().toString()]||(()=>{}),W3=0;function kt(e){const[n,r]=h.useState(H3());return He(()=>{r(o=>o??String(W3++))},[e]),n?`radix-${n}`:""}var dv=1,U3=.9,G3=.8,Y3=.17,Bf=.1,Hf=.999,X3=.9999,K3=.99,q3=/[\\\/_+.#"@\[\(\{&]/,Z3=/[\\\/_+.#"@\[\(\{&]/g,Q3=/[\s-]/,n_=/[\s-]/g;function mp(e,n,r,o,i,s,a){if(s===n.length)return i===e.length?dv:K3;var l=`${i},${s}`;if(a[l]!==void 0)return a[l];for(var c=o.charAt(s),u=r.indexOf(c,i),d=0,f,p,m,g;u>=0;)f=mp(e,n,r,o,u+1,s+1,a),f>d&&(u===i?f*=dv:q3.test(e.charAt(u-1))?(f*=G3,m=e.slice(i,u-1).match(Z3),m&&i>0&&(f*=Math.pow(Hf,m.length))):Q3.test(e.charAt(u-1))?(f*=U3,g=e.slice(i,u-1).match(n_),g&&i>0&&(f*=Math.pow(Hf,g.length))):(f*=Y3,i>0&&(f*=Math.pow(Hf,u-i))),e.charAt(u)!==n.charAt(s)&&(f*=X3)),(f<Bf&&r.charAt(u-1)===o.charAt(s+1)||o.charAt(s+1)===o.charAt(s)&&r.charAt(u-1)!==o.charAt(s))&&(p=mp(e,n,r,o,u+1,s+2,a),p*Bf>f&&(f=p*Bf)),f>d&&(d=f),u=r.indexOf(c,u+1);return a[l]=d,d}function pv(e){return e.toLowerCase().replace(n_," ")}function J3(e,n,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,mp(e,n,pv(e),pv(n),0,0,{})}function eI(e,n){const r=h.createContext(n),o=s=>{const{children:a,...l}=s,c=h.useMemo(()=>l,Object.values(l));return v.jsx(r.Provider,{value:c,children:a})};o.displayName=e+"Provider";function i(s){const a=h.useContext(r);if(a)return a;if(n!==void 0)return n;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[o,i]}function tI(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=f=>{var y;const{scope:p,children:m,...g}=f,b=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,_=h.useMemo(()=>g,Object.values(g));return v.jsx(b.Provider,{value:_,children:m})};u.displayName=s+"Provider";function d(f,p){var b;const m=((b=p==null?void 0:p[e])==null?void 0:b[c])||l,g=h.useContext(m);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,nI(i,...n)]}function nI(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const f=c(s)[`__scope${u}`];return{...l,...f}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function rI(e){const n=oI(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(sI);if(c){const u=c.props.children,d=l.map(f=>f===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:f);return v.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,d):null})}return v.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function oI(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=lI(i),l=aI(s,i.props);return i.type!==h.Fragment&&(l.ref=o?_e(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var iI=Symbol("radix.slottable");function sI(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===iI}function aI(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function lI(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var cI=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],r_=cI.reduce((e,n)=>{const r=rI(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{});function uI(e,n){e&&xo.flushSync(()=>e.dispatchEvent(n))}function fI(e,n=globalThis==null?void 0:globalThis.document){const r=_n(e);h.useEffect(()=>{const o=i=>{i.key==="Escape"&&r(i)};return n.addEventListener("keydown",o,{capture:!0}),()=>n.removeEventListener("keydown",o,{capture:!0})},[r,n])}var dI="DismissableLayer",gp="dismissableLayer.update",pI="dismissableLayer.pointerDownOutside",hI="dismissableLayer.focusOutside",hv,o_=h.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ji=h.forwardRef((e,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:a,onDismiss:l,...c}=e,u=h.useContext(o_),[d,f]=h.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=h.useState({}),g=pe(n,k=>f(k)),b=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=b.indexOf(_),x=d?b.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,S=x>=y,C=yI(k=>{const N=k.target,j=[...u.branches].some($=>$.contains(N));!S||j||(i==null||i(k),a==null||a(k),k.defaultPrevented||l==null||l())},p),E=vI(k=>{const N=k.target;[...u.branches].some($=>$.contains(N))||(s==null||s(k),a==null||a(k),k.defaultPrevented||l==null||l())},p);return fI(k=>{x===u.layers.size-1&&(o==null||o(k),!k.defaultPrevented&&l&&(k.preventDefault(),l()))},p),h.useEffect(()=>{if(d)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(hv=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),mv(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=hv)}},[d,p,r,u]),h.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),mv())},[d,u]),h.useEffect(()=>{const k=()=>m({});return document.addEventListener(gp,k),()=>document.removeEventListener(gp,k)},[]),v.jsx(r_.div,{...c,ref:g,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:te(e.onFocusCapture,E.onFocusCapture),onBlurCapture:te(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:te(e.onPointerDownCapture,C.onPointerDownCapture)})});ji.displayName=dI;var mI="DismissableLayerBranch",gI=h.forwardRef((e,n)=>{const r=h.useContext(o_),o=h.useRef(null),i=pe(n,o);return h.useEffect(()=>{const s=o.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),v.jsx(r_.div,{...e,ref:i})});gI.displayName=mI;function yI(e,n=globalThis==null?void 0:globalThis.document){const r=_n(e),o=h.useRef(!1),i=h.useRef(()=>{});return h.useEffect(()=>{const s=l=>{if(l.target&&!o.current){let c=function(){i_(pI,r,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(n.removeEventListener("click",i.current),i.current=c,n.addEventListener("click",i.current,{once:!0})):c()}else n.removeEventListener("click",i.current);o.current=!1},a=window.setTimeout(()=>{n.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),n.removeEventListener("pointerdown",s),n.removeEventListener("click",i.current)}},[n,r]),{onPointerDownCapture:()=>o.current=!0}}function vI(e,n=globalThis==null?void 0:globalThis.document){const r=_n(e),o=h.useRef(!1);return h.useEffect(()=>{const i=s=>{s.target&&!o.current&&i_(hI,r,{originalEvent:s},{discrete:!1})};return n.addEventListener("focusin",i),()=>n.removeEventListener("focusin",i)},[n,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function mv(){const e=new CustomEvent(gp);document.dispatchEvent(e)}function i_(e,n,r,{discrete:o}){const i=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});n&&i.addEventListener(e,n,{once:!0}),o?uI(i,s):i.dispatchEvent(s)}function xI(e){const n=wI(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(_I);if(c){const u=c.props.children,d=l.map(f=>f===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:f);return v.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,d):null})}return v.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function wI(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=CI(i),l=SI(s,i.props);return i.type!==h.Fragment&&(l.ref=o?_e(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var bI=Symbol("radix.slottable");function _I(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===bI}function SI(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function CI(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var EI=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],kI=EI.reduce((e,n)=>{const r=xI(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),Wf="focusScope.autoFocusOnMount",Uf="focusScope.autoFocusOnUnmount",gv={bubbles:!1,cancelable:!0},NI="FocusScope",ya=h.forwardRef((e,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...a}=e,[l,c]=h.useState(null),u=_n(i),d=_n(s),f=h.useRef(null),p=pe(n,b=>c(b)),m=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(o){let b=function(w){if(m.paused||!l)return;const S=w.target;l.contains(S)?f.current=S:ir(f.current,{select:!0})},_=function(w){if(m.paused||!l)return;const S=w.relatedTarget;S!==null&&(l.contains(S)||ir(f.current,{select:!0}))},y=function(w){if(document.activeElement===document.body)for(const C of w)C.removedNodes.length>0&&ir(l)};document.addEventListener("focusin",b),document.addEventListener("focusout",_);const x=new MutationObserver(y);return l&&x.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",_),x.disconnect()}}},[o,l,m.paused]),h.useEffect(()=>{if(l){vv.add(m);const b=document.activeElement;if(!l.contains(b)){const y=new CustomEvent(Wf,gv);l.addEventListener(Wf,u),l.dispatchEvent(y),y.defaultPrevented||(PI(TI(s_(l)),{select:!0}),document.activeElement===b&&ir(l))}return()=>{l.removeEventListener(Wf,u),setTimeout(()=>{const y=new CustomEvent(Uf,gv);l.addEventListener(Uf,d),l.dispatchEvent(y),y.defaultPrevented||ir(b??document.body,{select:!0}),l.removeEventListener(Uf,d),vv.remove(m)},0)}}},[l,u,d,m]);const g=h.useCallback(b=>{if(!r&&!o||m.paused)return;const _=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,y=document.activeElement;if(_&&y){const x=b.currentTarget,[w,S]=RI(x);w&&S?!b.shiftKey&&y===S?(b.preventDefault(),r&&ir(w,{select:!0})):b.shiftKey&&y===w&&(b.preventDefault(),r&&ir(S,{select:!0})):y===x&&b.preventDefault()}},[r,o,m.paused]);return v.jsx(kI.div,{tabIndex:-1,...a,ref:p,onKeyDown:g})});ya.displayName=NI;function PI(e,{select:n=!1}={}){const r=document.activeElement;for(const o of e)if(ir(o,{select:n}),document.activeElement!==r)return}function RI(e){const n=s_(e),r=yv(n,e),o=yv(n.reverse(),e);return[r,o]}function s_(e){const n=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const i=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||i?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)n.push(r.currentNode);return n}function yv(e,n){for(const r of e)if(!MI(r,{upTo:n}))return r}function MI(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function jI(e){return e instanceof HTMLInputElement&&"select"in e}function ir(e,{select:n=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&jI(e)&&n&&e.select()}}var vv=AI();function AI(){let e=[];return{add(n){const r=e[0];n!==r&&(r==null||r.pause()),e=xv(e,n),e.unshift(n)},remove(n){var r;e=xv(e,n),(r=e[0])==null||r.resume()}}}function xv(e,n){const r=[...e],o=r.indexOf(n);return o!==-1&&r.splice(o,1),r}function TI(e){return e.filter(n=>n.tagName!=="A")}function II(e){const n=$I(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(DI);if(c){const u=c.props.children,d=l.map(f=>f===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:f);return v.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,d):null})}return v.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function $I(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=zI(i),l=LI(s,i.props);return i.type!==h.Fragment&&(l.ref=o?_e(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var OI=Symbol("radix.slottable");function DI(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===OI}function LI(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function zI(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var FI=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],VI=FI.reduce((e,n)=>{const r=II(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),BI="Portal",Ai=h.forwardRef((e,n)=>{var l;const{container:r,...o}=e,[i,s]=h.useState(!1);He(()=>s(!0),[]);const a=r||i&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return a?HM.createPortal(v.jsx(VI.div,{...o,ref:n}),a):null});Ai.displayName=BI;function a_(e){const n=HI(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(UI);if(c){const u=c.props.children,d=l.map(f=>f===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:f);return v.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,d):null})}return v.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function HI(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=YI(i),l=GI(s,i.props);return i.type!==h.Fragment&&(l.ref=o?_e(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var WI=Symbol("radix.slottable");function UI(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===WI}function GI(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function YI(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var XI=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],va=XI.reduce((e,n)=>{const r=a_(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),Gf=0;function Cu(){h.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??wv()),document.body.insertAdjacentElement("beforeend",e[1]??wv()),Gf++,()=>{Gf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Gf--}},[])}function wv(){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 mn=function(){return mn=Object.assign||function(n){for(var r,o=1,i=arguments.length;o<i;o++){r=arguments[o];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(n[s]=r[s])}return n},mn.apply(this,arguments)};function l_(e,n){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(e);i<o.length;i++)n.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(r[o[i]]=e[o[i]]);return r}function KI(e,n,r){if(r||arguments.length===2)for(var o=0,i=n.length,s;o<i;o++)(s||!(o in n))&&(s||(s=Array.prototype.slice.call(n,0,o)),s[o]=n[o]);return e.concat(s||Array.prototype.slice.call(n))}var zl="right-scroll-bar-position",Fl="width-before-scroll-bar",qI="with-scroll-bars-hidden",ZI="--removed-body-scroll-bar-size";function Yf(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function QI(e,n){var r=h.useState(function(){return{value:e,callback:n,facade:{get current(){return r.value},set current(o){var i=r.value;i!==o&&(r.value=o,r.callback(o,i))}}}})[0];return r.callback=n,r.facade}var JI=typeof window<"u"?h.useLayoutEffect:h.useEffect,bv=new WeakMap;function e5(e,n){var r=QI(null,function(o){return e.forEach(function(i){return Yf(i,o)})});return JI(function(){var o=bv.get(r);if(o){var i=new Set(o),s=new Set(e),a=r.current;i.forEach(function(l){s.has(l)||Yf(l,null)}),s.forEach(function(l){i.has(l)||Yf(l,a)})}bv.set(r,e)},[e]),r}function t5(e){return e}function n5(e,n){n===void 0&&(n=t5);var r=[],o=!1,i={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(s){var a=n(s,o);return r.push(a),function(){r=r.filter(function(l){return l!==a})}},assignSyncMedium:function(s){for(o=!0;r.length;){var a=r;r=[],a.forEach(s)}r={push:function(l){return s(l)},filter:function(){return r}}},assignMedium:function(s){o=!0;var a=[];if(r.length){var l=r;r=[],l.forEach(s),a=r}var c=function(){var d=a;a=[],d.forEach(s)},u=function(){return Promise.resolve().then(c)};u(),r={push:function(d){a.push(d),u()},filter:function(d){return a=a.filter(d),r}}}};return i}function r5(e){e===void 0&&(e={});var n=n5(null);return n.options=mn({async:!0,ssr:!1},e),n}var c_=function(e){var n=e.sideCar,r=l_(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=n.read();if(!o)throw new Error("Sidecar medium not found");return h.createElement(o,mn({},r))};c_.isSideCarExport=!0;function o5(e,n){return e.useMedium(n),c_}var u_=r5(),Xf=function(){},Eu=h.forwardRef(function(e,n){var r=h.useRef(null),o=h.useState({onScrollCapture:Xf,onWheelCapture:Xf,onTouchMoveCapture:Xf}),i=o[0],s=o[1],a=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,g=e.noIsolation,b=e.inert,_=e.allowPinchZoom,y=e.as,x=y===void 0?"div":y,w=e.gapMode,S=l_(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=p,E=e5([r,n]),k=mn(mn({},S),i);return h.createElement(h.Fragment,null,d&&h.createElement(C,{sideCar:u_,removeScrollBar:u,shards:f,noRelative:m,noIsolation:g,inert:b,setCallbacks:s,allowPinchZoom:!!_,lockRef:r,gapMode:w}),a?h.cloneElement(h.Children.only(l),mn(mn({},k),{ref:E})):h.createElement(x,mn({},k,{className:c,ref:E}),l))});Eu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Eu.classNames={fullWidth:Fl,zeroRight:zl};var i5=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function s5(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=i5();return n&&e.setAttribute("nonce",n),e}function a5(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function l5(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var c5=function(){var e=0,n=null;return{add:function(r){e==0&&(n=s5())&&(a5(n,r),l5(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},u5=function(){var e=c5();return function(n,r){h.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&r])}},f_=function(){var e=u5(),n=function(r){var o=r.styles,i=r.dynamic;return e(o,i),null};return n},f5={left:0,top:0,right:0,gap:0},Kf=function(e){return parseInt(e||"",10)||0},d5=function(e){var n=window.getComputedStyle(document.body),r=n[e==="padding"?"paddingLeft":"marginLeft"],o=n[e==="padding"?"paddingTop":"marginTop"],i=n[e==="padding"?"paddingRight":"marginRight"];return[Kf(r),Kf(o),Kf(i)]},p5=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return f5;var n=d5(e),r=document.documentElement.clientWidth,o=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,o-r+n[2]-n[0])}},h5=f_(),ti="data-scroll-locked",m5=function(e,n,r,o){var i=e.left,s=e.top,a=e.right,l=e.gap;return r===void 0&&(r="margin"),`
271
+ .`.concat(qI,` {
272
+ overflow: hidden `).concat(o,`;
273
+ padding-right: `).concat(l,"px ").concat(o,`;
274
+ }
275
+ body[`).concat(ti,`] {
276
+ overflow: hidden `).concat(o,`;
277
+ overscroll-behavior: contain;
278
+ `).concat([n&&"position: relative ".concat(o,";"),r==="margin"&&`
279
+ padding-left: `.concat(i,`px;
280
+ padding-top: `).concat(s,`px;
281
+ padding-right: `).concat(a,`px;
282
+ margin-left:0;
283
+ margin-top:0;
284
+ margin-right: `).concat(l,"px ").concat(o,`;
285
+ `),r==="padding"&&"padding-right: ".concat(l,"px ").concat(o,";")].filter(Boolean).join(""),`
286
+ }
287
+
288
+ .`).concat(zl,` {
289
+ right: `).concat(l,"px ").concat(o,`;
290
+ }
291
+
292
+ .`).concat(Fl,` {
293
+ margin-right: `).concat(l,"px ").concat(o,`;
294
+ }
295
+
296
+ .`).concat(zl," .").concat(zl,` {
297
+ right: 0 `).concat(o,`;
298
+ }
299
+
300
+ .`).concat(Fl," .").concat(Fl,` {
301
+ margin-right: 0 `).concat(o,`;
302
+ }
303
+
304
+ body[`).concat(ti,`] {
305
+ `).concat(ZI,": ").concat(l,`px;
306
+ }
307
+ `)},_v=function(){var e=parseInt(document.body.getAttribute(ti)||"0",10);return isFinite(e)?e:0},g5=function(){h.useEffect(function(){return document.body.setAttribute(ti,(_v()+1).toString()),function(){var e=_v()-1;e<=0?document.body.removeAttribute(ti):document.body.setAttribute(ti,e.toString())}},[])},y5=function(e){var n=e.noRelative,r=e.noImportant,o=e.gapMode,i=o===void 0?"margin":o;g5();var s=h.useMemo(function(){return p5(i)},[i]);return h.createElement(h5,{styles:m5(s,!n,i,r?"":"!important")})},yp=!1;if(typeof window<"u")try{var il=Object.defineProperty({},"passive",{get:function(){return yp=!0,!0}});window.addEventListener("test",il,il),window.removeEventListener("test",il,il)}catch{yp=!1}var Eo=yp?{passive:!1}:!1,v5=function(e){return e.tagName==="TEXTAREA"},d_=function(e,n){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[n]!=="hidden"&&!(r.overflowY===r.overflowX&&!v5(e)&&r[n]==="visible")},x5=function(e){return d_(e,"overflowY")},w5=function(e){return d_(e,"overflowX")},Sv=function(e,n){var r=n.ownerDocument,o=n;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var i=p_(e,o);if(i){var s=h_(e,o),a=s[1],l=s[2];if(a>l)return!0}o=o.parentNode}while(o&&o!==r.body);return!1},b5=function(e){var n=e.scrollTop,r=e.scrollHeight,o=e.clientHeight;return[n,r,o]},_5=function(e){var n=e.scrollLeft,r=e.scrollWidth,o=e.clientWidth;return[n,r,o]},p_=function(e,n){return e==="v"?x5(n):w5(n)},h_=function(e,n){return e==="v"?b5(n):_5(n)},S5=function(e,n){return e==="h"&&n==="rtl"?-1:1},C5=function(e,n,r,o,i){var s=S5(e,window.getComputedStyle(n).direction),a=s*o,l=r.target,c=n.contains(l),u=!1,d=a>0,f=0,p=0;do{if(!l)break;var m=h_(e,l),g=m[0],b=m[1],_=m[2],y=b-_-s*g;(g||y)&&p_(e,l)&&(f+=y,p+=g);var x=l.parentNode;l=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!c&&l!==document.body||c&&(n.contains(l)||n===l));return(d&&Math.abs(f)<1||!d&&Math.abs(p)<1)&&(u=!0),u},sl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Cv=function(e){return[e.deltaX,e.deltaY]},Ev=function(e){return e&&"current"in e?e.current:e},E5=function(e,n){return e[0]===n[0]&&e[1]===n[1]},k5=function(e){return`
308
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
309
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
310
+ `)},N5=0,ko=[];function P5(e){var n=h.useRef([]),r=h.useRef([0,0]),o=h.useRef(),i=h.useState(N5++)[0],s=h.useState(f_)[0],a=h.useRef(e);h.useEffect(function(){a.current=e},[e]),h.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var b=KI([e.lockRef.current],(e.shards||[]).map(Ev),!0).filter(Boolean);return b.forEach(function(_){return _.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),b.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var l=h.useCallback(function(b,_){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!a.current.allowPinchZoom;var y=sl(b),x=r.current,w="deltaX"in b?b.deltaX:x[0]-y[0],S="deltaY"in b?b.deltaY:x[1]-y[1],C,E=b.target,k=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in b&&k==="h"&&E.type==="range")return!1;var N=window.getSelection(),j=N&&N.anchorNode,$=j?j===E||j.contains(E):!1;if($)return!1;var I=Sv(k,E);if(!I)return!0;if(I?C=k:(C=k==="v"?"h":"v",I=Sv(k,E)),!I)return!1;if(!o.current&&"changedTouches"in b&&(w||S)&&(o.current=C),!C)return!0;var O=o.current||C;return C5(O,_,b,O==="h"?w:S)},[]),c=h.useCallback(function(b){var _=b;if(!(!ko.length||ko[ko.length-1]!==s)){var y="deltaY"in _?Cv(_):sl(_),x=n.current.filter(function(C){return C.name===_.type&&(C.target===_.target||_.target===C.shadowParent)&&E5(C.delta,y)})[0];if(x&&x.should){_.cancelable&&_.preventDefault();return}if(!x){var w=(a.current.shards||[]).map(Ev).filter(Boolean).filter(function(C){return C.contains(_.target)}),S=w.length>0?l(_,w[0]):!a.current.noIsolation;S&&_.cancelable&&_.preventDefault()}}},[]),u=h.useCallback(function(b,_,y,x){var w={name:b,delta:_,target:y,should:x,shadowParent:R5(y)};n.current.push(w),setTimeout(function(){n.current=n.current.filter(function(S){return S!==w})},1)},[]),d=h.useCallback(function(b){r.current=sl(b),o.current=void 0},[]),f=h.useCallback(function(b){u(b.type,Cv(b),b.target,l(b,e.lockRef.current))},[]),p=h.useCallback(function(b){u(b.type,sl(b),b.target,l(b,e.lockRef.current))},[]);h.useEffect(function(){return ko.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Eo),document.addEventListener("touchmove",c,Eo),document.addEventListener("touchstart",d,Eo),function(){ko=ko.filter(function(b){return b!==s}),document.removeEventListener("wheel",c,Eo),document.removeEventListener("touchmove",c,Eo),document.removeEventListener("touchstart",d,Eo)}},[]);var m=e.removeScrollBar,g=e.inert;return h.createElement(h.Fragment,null,g?h.createElement(s,{styles:k5(i)}):null,m?h.createElement(y5,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function R5(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const M5=o5(u_,P5);var xa=h.forwardRef(function(e,n){return h.createElement(Eu,mn({},e,{ref:n,sideCar:M5}))});xa.classNames=Eu.classNames;var j5=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},No=new WeakMap,al=new WeakMap,ll={},qf=0,m_=function(e){return e&&(e.host||m_(e.parentNode))},A5=function(e,n){return n.map(function(r){if(e.contains(r))return r;var o=m_(r);return o&&e.contains(o)?o:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},T5=function(e,n,r,o){var i=A5(n,Array.isArray(e)?e:[e]);ll[r]||(ll[r]=new WeakMap);var s=ll[r],a=[],l=new Set,c=new Set(i),u=function(f){!f||l.has(f)||(l.add(f),u(f.parentNode))};i.forEach(u);var d=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(p){if(l.has(p))d(p);else try{var m=p.getAttribute(o),g=m!==null&&m!=="false",b=(No.get(p)||0)+1,_=(s.get(p)||0)+1;No.set(p,b),s.set(p,_),a.push(p),b===1&&g&&al.set(p,!0),_===1&&p.setAttribute(r,"true"),g||p.setAttribute(o,"true")}catch(y){console.error("aria-hidden: cannot operate on ",p,y)}})};return d(n),l.clear(),qf++,function(){a.forEach(function(f){var p=No.get(f)-1,m=s.get(f)-1;No.set(f,p),s.set(f,m),p||(al.has(f)||f.removeAttribute(o),al.delete(f)),m||f.removeAttribute(r)}),qf--,qf||(No=new WeakMap,No=new WeakMap,al=new WeakMap,ll={})}},ku=function(e,n,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),i=j5(e);return i?(o.push.apply(o,Array.from(i.querySelectorAll("[aria-live], script"))),T5(o,i,r,"aria-hidden")):function(){return null}},Nu="Dialog",[g_]=tI(Nu),[I5,ln]=g_(Nu),y_=e=>{const{__scopeDialog:n,children:r,open:o,defaultOpen:i,onOpenChange:s,modal:a=!0}=e,l=h.useRef(null),c=h.useRef(null),[u,d]=ga({prop:o,defaultProp:i??!1,onChange:s,caller:Nu});return v.jsx(I5,{scope:n,triggerRef:l,contentRef:c,contentId:kt(),titleId:kt(),descriptionId:kt(),open:u,onOpenChange:d,onOpenToggle:h.useCallback(()=>d(f=>!f),[d]),modal:a,children:r})};y_.displayName=Nu;var v_="DialogTrigger",$5=h.forwardRef((e,n)=>{const{__scopeDialog:r,...o}=e,i=ln(v_,r),s=pe(n,i.triggerRef);return v.jsx(va.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":vm(i.open),...o,ref:s,onClick:te(e.onClick,i.onOpenToggle)})});$5.displayName=v_;var gm="DialogPortal",[O5,x_]=g_(gm,{forceMount:void 0}),w_=e=>{const{__scopeDialog:n,forceMount:r,children:o,container:i}=e,s=ln(gm,n);return v.jsx(O5,{scope:n,forceMount:r,children:h.Children.map(o,a=>v.jsx(yt,{present:r||s.open,children:v.jsx(Ai,{asChild:!0,container:i,children:a})}))})};w_.displayName=gm;var kc="DialogOverlay",b_=h.forwardRef((e,n)=>{const r=x_(kc,e.__scopeDialog),{forceMount:o=r.forceMount,...i}=e,s=ln(kc,e.__scopeDialog);return s.modal?v.jsx(yt,{present:o||s.open,children:v.jsx(L5,{...i,ref:n})}):null});b_.displayName=kc;var D5=a_("DialogOverlay.RemoveScroll"),L5=h.forwardRef((e,n)=>{const{__scopeDialog:r,...o}=e,i=ln(kc,r);return v.jsx(xa,{as:D5,allowPinchZoom:!0,shards:[i.contentRef],children:v.jsx(va.div,{"data-state":vm(i.open),...o,ref:n,style:{pointerEvents:"auto",...o.style}})})}),lo="DialogContent",__=h.forwardRef((e,n)=>{const r=x_(lo,e.__scopeDialog),{forceMount:o=r.forceMount,...i}=e,s=ln(lo,e.__scopeDialog);return v.jsx(yt,{present:o||s.open,children:s.modal?v.jsx(z5,{...i,ref:n}):v.jsx(F5,{...i,ref:n})})});__.displayName=lo;var z5=h.forwardRef((e,n)=>{const r=ln(lo,e.__scopeDialog),o=h.useRef(null),i=pe(n,r.contentRef,o);return h.useEffect(()=>{const s=o.current;if(s)return ku(s)},[]),v.jsx(S_,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:te(e.onCloseAutoFocus,s=>{var a;s.preventDefault(),(a=r.triggerRef.current)==null||a.focus()}),onPointerDownOutside:te(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0;(a.button===2||l)&&s.preventDefault()}),onFocusOutside:te(e.onFocusOutside,s=>s.preventDefault())})}),F5=h.forwardRef((e,n)=>{const r=ln(lo,e.__scopeDialog),o=h.useRef(!1),i=h.useRef(!1);return v.jsx(S_,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var a,l;(a=e.onCloseAutoFocus)==null||a.call(e,s),s.defaultPrevented||(o.current||(l=r.triggerRef.current)==null||l.focus(),s.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:s=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=s.target;((u=r.triggerRef.current)==null?void 0:u.contains(a))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),S_=h.forwardRef((e,n)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:s,...a}=e,l=ln(lo,r),c=h.useRef(null),u=pe(n,c);return Cu(),v.jsxs(v.Fragment,{children:[v.jsx(ya,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:s,children:v.jsx(ji,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":vm(l.open),...a,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),v.jsxs(v.Fragment,{children:[v.jsx(V5,{titleId:l.titleId}),v.jsx(H5,{contentRef:c,descriptionId:l.descriptionId})]})]})}),ym="DialogTitle",C_=h.forwardRef((e,n)=>{const{__scopeDialog:r,...o}=e,i=ln(ym,r);return v.jsx(va.h2,{id:i.titleId,...o,ref:n})});C_.displayName=ym;var E_="DialogDescription",k_=h.forwardRef((e,n)=>{const{__scopeDialog:r,...o}=e,i=ln(E_,r);return v.jsx(va.p,{id:i.descriptionId,...o,ref:n})});k_.displayName=E_;var N_="DialogClose",P_=h.forwardRef((e,n)=>{const{__scopeDialog:r,...o}=e,i=ln(N_,r);return v.jsx(va.button,{type:"button",...o,ref:n,onClick:te(e.onClick,()=>i.onOpenChange(!1))})});P_.displayName=N_;function vm(e){return e?"open":"closed"}var R_="DialogTitleWarning",[VX,M_]=eI(R_,{contentName:lo,titleName:ym,docsSlug:"dialog"}),V5=({titleId:e})=>{const n=M_(R_),r=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.
311
+
312
+ If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
313
+
314
+ For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return h.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},B5="DialogDescriptionWarning",H5=({contentRef:e,descriptionId:n})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${M_(B5).contentName}}.`;return h.useEffect(()=>{var s;const i=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");n&&i&&(document.getElementById(n)||console.warn(o))},[o,e,n]),null},W5=y_,xm=w_,wa=b_,ba=__,Pu=C_,Ru=k_,j_=P_,Ki='[cmdk-group=""]',Zf='[cmdk-group-items=""]',U5='[cmdk-group-heading=""]',A_='[cmdk-item=""]',kv=`${A_}:not([aria-disabled="true"])`,vp="cmdk-item-select",To="data-value",G5=(e,n,r)=>J3(e,n,r),T_=h.createContext(void 0),_a=()=>h.useContext(T_),I_=h.createContext(void 0),wm=()=>h.useContext(I_),$_=h.createContext(void 0),O_=h.forwardRef((e,n)=>{let r=Io(()=>{var T,X;return{search:"",value:(X=(T=e.value)!=null?T:e.defaultValue)!=null?X:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),o=Io(()=>new Set),i=Io(()=>new Map),s=Io(()=>new Map),a=Io(()=>new Set),l=D_(e),{label:c,children:u,value:d,onValueChange:f,filter:p,shouldFilter:m,loop:g,disablePointerSelection:b=!1,vimBindings:_=!0,...y}=e,x=kt(),w=kt(),S=kt(),C=h.useRef(null),E=r$();co(()=>{if(d!==void 0){let T=d.trim();r.current.value=T,k.emit()}},[d]),co(()=>{E(6,H)},[]);let k=h.useMemo(()=>({subscribe:T=>(a.current.add(T),()=>a.current.delete(T)),snapshot:()=>r.current,setState:(T,X,F)=>{var B,G,U,Y;if(!Object.is(r.current[T],X)){if(r.current[T]=X,T==="search")O(),$(),E(1,I);else if(T==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let K=document.getElementById(S);K?K.focus():(B=document.getElementById(x))==null||B.focus()}if(E(7,()=>{var K;r.current.selectedItemId=(K=R())==null?void 0:K.id,k.emit()}),F||E(5,H),((G=l.current)==null?void 0:G.value)!==void 0){let K=X??"";(Y=(U=l.current).onValueChange)==null||Y.call(U,K);return}}k.emit()}},emit:()=>{a.current.forEach(T=>T())}}),[]),N=h.useMemo(()=>({value:(T,X,F)=>{var B;X!==((B=s.current.get(T))==null?void 0:B.value)&&(s.current.set(T,{value:X,keywords:F}),r.current.filtered.items.set(T,j(X,F)),E(2,()=>{$(),k.emit()}))},item:(T,X)=>(o.current.add(T),X&&(i.current.has(X)?i.current.get(X).add(T):i.current.set(X,new Set([T]))),E(3,()=>{O(),$(),r.current.value||I(),k.emit()}),()=>{s.current.delete(T),o.current.delete(T),r.current.filtered.items.delete(T);let F=R();E(4,()=>{O(),(F==null?void 0:F.getAttribute("id"))===T&&I(),k.emit()})}),group:T=>(i.current.has(T)||i.current.set(T,new Set),()=>{s.current.delete(T),i.current.delete(T)}),filter:()=>l.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:x,inputId:S,labelId:w,listInnerRef:C}),[]);function j(T,X){var F,B;let G=(B=(F=l.current)==null?void 0:F.filter)!=null?B:G5;return T?G(T,r.current.search,X):0}function $(){if(!r.current.search||l.current.shouldFilter===!1)return;let T=r.current.filtered.items,X=[];r.current.filtered.groups.forEach(B=>{let G=i.current.get(B),U=0;G.forEach(Y=>{let K=T.get(Y);U=Math.max(K,U)}),X.push([B,U])});let F=C.current;L().sort((B,G)=>{var U,Y;let K=B.getAttribute("id"),ee=G.getAttribute("id");return((U=T.get(ee))!=null?U:0)-((Y=T.get(K))!=null?Y:0)}).forEach(B=>{let G=B.closest(Zf);G?G.appendChild(B.parentElement===G?B:B.closest(`${Zf} > *`)):F.appendChild(B.parentElement===F?B:B.closest(`${Zf} > *`))}),X.sort((B,G)=>G[1]-B[1]).forEach(B=>{var G;let U=(G=C.current)==null?void 0:G.querySelector(`${Ki}[${To}="${encodeURIComponent(B[0])}"]`);U==null||U.parentElement.appendChild(U)})}function I(){let T=L().find(F=>F.getAttribute("aria-disabled")!=="true"),X=T==null?void 0:T.getAttribute(To);k.setState("value",X||void 0)}function O(){var T,X,F,B;if(!r.current.search||l.current.shouldFilter===!1){r.current.filtered.count=o.current.size;return}r.current.filtered.groups=new Set;let G=0;for(let U of o.current){let Y=(X=(T=s.current.get(U))==null?void 0:T.value)!=null?X:"",K=(B=(F=s.current.get(U))==null?void 0:F.keywords)!=null?B:[],ee=j(Y,K);r.current.filtered.items.set(U,ee),ee>0&&G++}for(let[U,Y]of i.current)for(let K of Y)if(r.current.filtered.items.get(K)>0){r.current.filtered.groups.add(U);break}r.current.filtered.count=G}function H(){var T,X,F;let B=R();B&&(((T=B.parentElement)==null?void 0:T.firstChild)===B&&((F=(X=B.closest(Ki))==null?void 0:X.querySelector(U5))==null||F.scrollIntoView({block:"nearest"})),B.scrollIntoView({block:"nearest"}))}function R(){var T;return(T=C.current)==null?void 0:T.querySelector(`${A_}[aria-selected="true"]`)}function L(){var T;return Array.from(((T=C.current)==null?void 0:T.querySelectorAll(kv))||[])}function D(T){let X=L()[T];X&&k.setState("value",X.getAttribute(To))}function z(T){var X;let F=R(),B=L(),G=B.findIndex(Y=>Y===F),U=B[G+T];(X=l.current)!=null&&X.loop&&(U=G+T<0?B[B.length-1]:G+T===B.length?B[0]:B[G+T]),U&&k.setState("value",U.getAttribute(To))}function A(T){let X=R(),F=X==null?void 0:X.closest(Ki),B;for(;F&&!B;)F=T>0?t$(F,Ki):n$(F,Ki),B=F==null?void 0:F.querySelector(kv);B?k.setState("value",B.getAttribute(To)):z(T)}let M=()=>D(L().length-1),P=T=>{T.preventDefault(),T.metaKey?M():T.altKey?A(1):z(1)},W=T=>{T.preventDefault(),T.metaKey?D(0):T.altKey?A(-1):z(-1)};return h.createElement(lt.div,{ref:n,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:T=>{var X;(X=y.onKeyDown)==null||X.call(y,T);let F=T.nativeEvent.isComposing||T.keyCode===229;if(!(T.defaultPrevented||F))switch(T.key){case"n":case"j":{_&&T.ctrlKey&&P(T);break}case"ArrowDown":{P(T);break}case"p":case"k":{_&&T.ctrlKey&&W(T);break}case"ArrowUp":{W(T);break}case"Home":{T.preventDefault(),D(0);break}case"End":{T.preventDefault(),M();break}case"Enter":{T.preventDefault();let B=R();if(B){let G=new Event(vp);B.dispatchEvent(G)}}}}},h.createElement("label",{"cmdk-label":"",htmlFor:N.inputId,id:N.labelId,style:i$},c),Mu(e,T=>h.createElement(I_.Provider,{value:k},h.createElement(T_.Provider,{value:N},T))))}),Y5=h.forwardRef((e,n)=>{var r,o;let i=kt(),s=h.useRef(null),a=h.useContext($_),l=_a(),c=D_(e),u=(o=(r=c.current)==null?void 0:r.forceMount)!=null?o:a==null?void 0:a.forceMount;co(()=>{if(!u)return l.item(i,a==null?void 0:a.id)},[u]);let d=L_(i,s,[e.value,e.children,s],e.keywords),f=wm(),p=Pr(E=>E.value&&E.value===d.current),m=Pr(E=>u||l.filter()===!1?!0:E.search?E.filtered.items.get(i)>0:!0);h.useEffect(()=>{let E=s.current;if(!(!E||e.disabled))return E.addEventListener(vp,g),()=>E.removeEventListener(vp,g)},[m,e.onSelect,e.disabled]);function g(){var E,k;b(),(k=(E=c.current).onSelect)==null||k.call(E,d.current)}function b(){f.setState("value",d.current,!0)}if(!m)return null;let{disabled:_,value:y,onSelect:x,forceMount:w,keywords:S,...C}=e;return h.createElement(lt.div,{ref:_e(s,n),...C,id:i,"cmdk-item":"",role:"option","aria-disabled":!!_,"aria-selected":!!p,"data-disabled":!!_,"data-selected":!!p,onPointerMove:_||l.getDisablePointerSelection()?void 0:b,onClick:_?void 0:g},e.children)}),X5=h.forwardRef((e,n)=>{let{heading:r,children:o,forceMount:i,...s}=e,a=kt(),l=h.useRef(null),c=h.useRef(null),u=kt(),d=_a(),f=Pr(m=>i||d.filter()===!1?!0:m.search?m.filtered.groups.has(a):!0);co(()=>d.group(a),[]),L_(a,l,[e.value,e.heading,c]);let p=h.useMemo(()=>({id:a,forceMount:i}),[i]);return h.createElement(lt.div,{ref:_e(l,n),...s,"cmdk-group":"",role:"presentation",hidden:f?void 0:!0},r&&h.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:u},r),Mu(e,m=>h.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?u:void 0},h.createElement($_.Provider,{value:p},m))))}),K5=h.forwardRef((e,n)=>{let{alwaysRender:r,...o}=e,i=h.useRef(null),s=Pr(a=>!a.search);return!r&&!s?null:h.createElement(lt.div,{ref:_e(i,n),...o,"cmdk-separator":"",role:"separator"})}),q5=h.forwardRef((e,n)=>{let{onValueChange:r,...o}=e,i=e.value!=null,s=wm(),a=Pr(u=>u.search),l=Pr(u=>u.selectedItemId),c=_a();return h.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),h.createElement(lt.input,{ref:n,...o,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":l,id:c.inputId,type:"text",value:i?e.value:a,onChange:u=>{i||s.setState("search",u.target.value),r==null||r(u.target.value)}})}),Z5=h.forwardRef((e,n)=>{let{children:r,label:o="Suggestions",...i}=e,s=h.useRef(null),a=h.useRef(null),l=Pr(u=>u.selectedItemId),c=_a();return h.useEffect(()=>{if(a.current&&s.current){let u=a.current,d=s.current,f,p=new ResizeObserver(()=>{f=requestAnimationFrame(()=>{let m=u.offsetHeight;d.style.setProperty("--cmdk-list-height",m.toFixed(1)+"px")})});return p.observe(u),()=>{cancelAnimationFrame(f),p.unobserve(u)}}},[]),h.createElement(lt.div,{ref:_e(s,n),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":o,id:c.listId},Mu(e,u=>h.createElement("div",{ref:_e(a,c.listInnerRef),"cmdk-list-sizer":""},u)))}),Q5=h.forwardRef((e,n)=>{let{open:r,onOpenChange:o,overlayClassName:i,contentClassName:s,container:a,...l}=e;return h.createElement(W5,{open:r,onOpenChange:o},h.createElement(xm,{container:a},h.createElement(wa,{"cmdk-overlay":"",className:i}),h.createElement(ba,{"aria-label":e.label,"cmdk-dialog":"",className:s},h.createElement(O_,{ref:n,...l}))))}),J5=h.forwardRef((e,n)=>Pr(r=>r.filtered.count===0)?h.createElement(lt.div,{ref:n,...e,"cmdk-empty":"",role:"presentation"}):null),e$=h.forwardRef((e,n)=>{let{progress:r,children:o,label:i="Loading...",...s}=e;return h.createElement(lt.div,{ref:n,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},Mu(e,a=>h.createElement("div",{"aria-hidden":!0},a)))}),vt=Object.assign(O_,{List:Z5,Item:Y5,Input:q5,Group:X5,Separator:K5,Dialog:Q5,Empty:J5,Loading:e$});function t$(e,n){let r=e.nextElementSibling;for(;r;){if(r.matches(n))return r;r=r.nextElementSibling}}function n$(e,n){let r=e.previousElementSibling;for(;r;){if(r.matches(n))return r;r=r.previousElementSibling}}function D_(e){let n=h.useRef(e);return co(()=>{n.current=e}),n}var co=typeof window>"u"?h.useEffect:h.useLayoutEffect;function Io(e){let n=h.useRef();return n.current===void 0&&(n.current=e()),n}function Pr(e){let n=wm(),r=()=>e(n.snapshot());return h.useSyncExternalStore(n.subscribe,r,r)}function L_(e,n,r,o=[]){let i=h.useRef(),s=_a();return co(()=>{var a;let l=(()=>{var u;for(let d of r){if(typeof d=="string")return d.trim();if(typeof d=="object"&&"current"in d)return d.current?(u=d.current.textContent)==null?void 0:u.trim():i.current}})(),c=o.map(u=>u.trim());s.value(e,l,c),(a=n.current)==null||a.setAttribute(To,l),i.current=l}),i}var r$=()=>{let[e,n]=h.useState(),r=Io(()=>new Map);return co(()=>{r.current.forEach(o=>o()),r.current=new Map},[e]),(o,i)=>{r.current.set(o,i),n({})}};function o$(e){let n=e.type;return typeof n=="function"?n(e.props):"render"in n?n.render(e.props):e}function Mu({asChild:e,children:n},r){return e&&h.isValidElement(n)?h.cloneElement(o$(n),{ref:n.ref},r(n.props.children)):r(n)}var i$={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const s$=h.forwardRef(({className:e,...n},r)=>v.jsx(vt,{ref:r,className:se("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...n}));s$.displayName=vt.displayName;const a$=h.forwardRef(({className:e,...n},r)=>v.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[v.jsx(t3,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),v.jsx(vt.Input,{ref:r,className:se("flex h-9 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...n})]}));a$.displayName=vt.Input.displayName;const l$=h.forwardRef(({className:e,onWheel:n,...r},o)=>v.jsx(vt.List,{ref:o,className:se("overflow-y-auto overflow-x-hidden",e),style:{maxHeight:300},onWheel:n??(i=>{i.currentTarget.scrollTop+=i.deltaY}),...r}));l$.displayName=vt.List.displayName;const c$=h.forwardRef((e,n)=>v.jsx(vt.Empty,{ref:n,className:"py-6 text-center text-sm",...e}));c$.displayName=vt.Empty.displayName;const u$=h.forwardRef(({className:e,...n},r)=>v.jsx(vt.Group,{ref:r,className:se("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...n}));u$.displayName=vt.Group.displayName;const f$=h.forwardRef(({className:e,...n},r)=>v.jsx(vt.Separator,{ref:r,className:se("-mx-1 h-px bg-border",e),...n}));f$.displayName=vt.Separator.displayName;const d$=h.forwardRef(({className:e,...n},r)=>v.jsx(vt.Item,{ref:r,className:se("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...n}));d$.displayName=vt.Item.displayName;const p$=xm,z_=h.forwardRef(({className:e,...n},r)=>v.jsx(wa,{ref:r,className:se("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),...n}));z_.displayName=wa.displayName;const h$=h.forwardRef(({className:e,children:n,...r},o)=>v.jsxs(p$,{children:[v.jsx(z_,{}),v.jsxs(ba,{ref:o,className:se("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[n,v.jsxs(j_,{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-accent data-[state=open]:text-muted-foreground",children:[v.jsx(Ec,{className:"h-4 w-4"}),v.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));h$.displayName=ba.displayName;const m$=h.forwardRef(({className:e,...n},r)=>v.jsx(Pu,{ref:r,className:se("text-lg font-semibold leading-none tracking-tight",e),...n}));m$.displayName=Pu.displayName;const g$=h.forwardRef(({className:e,...n},r)=>v.jsx(Ru,{ref:r,className:se("text-sm text-muted-foreground",e),...n}));g$.displayName=Ru.displayName;function y$(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=f=>{var y;const{scope:p,children:m,...g}=f,b=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,_=h.useMemo(()=>g,Object.values(g));return v.jsx(b.Provider,{value:_,children:m})};u.displayName=s+"Provider";function d(f,p){var b;const m=((b=p==null?void 0:p[e])==null?void 0:b[c])||l,g=h.useContext(m);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,v$(i,...n)]}function v$(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const f=c(s)[`__scope${u}`];return{...l,...f}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function x$(e){const n=w$(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(_$);if(c){const u=c.props.children,d=l.map(f=>f===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:f);return v.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,d):null})}return v.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function w$(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=C$(i),l=S$(s,i.props);return i.type!==h.Fragment&&(l.ref=o?_e(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var b$=Symbol("radix.slottable");function _$(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===b$}function S$(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function C$(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var E$=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],k$=E$.reduce((e,n)=>{const r=x$(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{});function N$(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=f=>{var y;const{scope:p,children:m,...g}=f,b=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,_=h.useMemo(()=>g,Object.values(g));return v.jsx(b.Provider,{value:_,children:m})};u.displayName=s+"Provider";function d(f,p){var b;const m=((b=p==null?void 0:p[e])==null?void 0:b[c])||l,g=h.useContext(m);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,P$(i,...n)]}function P$(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const f=c(s)[`__scope${u}`];return{...l,...f}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function Nv(e){const n=R$(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(j$);if(c){const u=c.props.children,d=l.map(f=>f===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:f);return v.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,d):null})}return v.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function R$(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=T$(i),l=A$(s,i.props);return i.type!==h.Fragment&&(l.ref=o?_e(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var M$=Symbol("radix.slottable");function j$(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===M$}function A$(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function T$(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function bm(e){const n=e+"CollectionProvider",[r,o]=N$(n),[i,s]=r(n,{collectionRef:{current:null},itemMap:new Map}),a=b=>{const{scope:_,children:y}=b,x=Je.useRef(null),w=Je.useRef(new Map).current;return v.jsx(i,{scope:_,itemMap:w,collectionRef:x,children:y})};a.displayName=n;const l=e+"CollectionSlot",c=Nv(l),u=Je.forwardRef((b,_)=>{const{scope:y,children:x}=b,w=s(l,y),S=pe(_,w.collectionRef);return v.jsx(c,{ref:S,children:x})});u.displayName=l;const d=e+"CollectionItemSlot",f="data-radix-collection-item",p=Nv(d),m=Je.forwardRef((b,_)=>{const{scope:y,children:x,...w}=b,S=Je.useRef(null),C=pe(_,S),E=s(d,y);return Je.useEffect(()=>(E.itemMap.set(S,{ref:S,...w}),()=>void E.itemMap.delete(S))),v.jsx(p,{[f]:"",ref:C,children:x})});m.displayName=d;function g(b){const _=s(e+"CollectionConsumer",b);return Je.useCallback(()=>{const x=_.collectionRef.current;if(!x)return[];const w=Array.from(x.querySelectorAll(`[${f}]`));return Array.from(_.itemMap.values()).sort((E,k)=>w.indexOf(E.ref.current)-w.indexOf(k.ref.current))},[_.collectionRef,_.itemMap])}return[{Provider:a,Slot:u,ItemSlot:m},g,o]}function I$(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=f=>{var y;const{scope:p,children:m,...g}=f,b=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,_=h.useMemo(()=>g,Object.values(g));return v.jsx(b.Provider,{value:_,children:m})};u.displayName=s+"Provider";function d(f,p){var b;const m=((b=p==null?void 0:p[e])==null?void 0:b[c])||l,g=h.useContext(m);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,$$(i,...n)]}function $$(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const f=c(s)[`__scope${u}`];return{...l,...f}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}var O$=h.createContext(void 0);function F_(e){const n=h.useContext(O$);return e||n||"ltr"}const D$=["top","right","bottom","left"],Rr=Math.min,St=Math.max,Nc=Math.round,cl=Math.floor,wn=e=>({x:e,y:e}),L$={left:"right",right:"left",bottom:"top",top:"bottom"};function xp(e,n,r){return St(e,Rr(n,r))}function Un(e,n){return typeof e=="function"?e(n):e}function Gn(e){return e.split("-")[0]}function Ti(e){return e.split("-")[1]}function _m(e){return e==="x"?"y":"x"}function Sm(e){return e==="y"?"height":"width"}function gn(e){const n=e[0];return n==="t"||n==="b"?"y":"x"}function Cm(e){return _m(gn(e))}function z$(e,n,r){r===void 0&&(r=!1);const o=Ti(e),i=Cm(e),s=Sm(i);let a=i==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return n.reference[s]>n.floating[s]&&(a=Pc(a)),[a,Pc(a)]}function F$(e){const n=Pc(e);return[wp(e),n,wp(n)]}function wp(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Pv=["left","right"],Rv=["right","left"],V$=["top","bottom"],B$=["bottom","top"];function H$(e,n,r){switch(e){case"top":case"bottom":return r?n?Rv:Pv:n?Pv:Rv;case"left":case"right":return n?V$:B$;default:return[]}}function W$(e,n,r,o){const i=Ti(e);let s=H$(Gn(e),r==="start",o);return i&&(s=s.map(a=>a+"-"+i),n&&(s=s.concat(s.map(wp)))),s}function Pc(e){const n=Gn(e);return L$[n]+e.slice(n.length)}function U$(e){return{top:0,right:0,bottom:0,left:0,...e}}function V_(e){return typeof e!="number"?U$(e):{top:e,right:e,bottom:e,left:e}}function Rc(e){const{x:n,y:r,width:o,height:i}=e;return{width:o,height:i,top:r,left:n,right:n+o,bottom:r+i,x:n,y:r}}function Mv(e,n,r){let{reference:o,floating:i}=e;const s=gn(n),a=Cm(n),l=Sm(a),c=Gn(n),u=s==="y",d=o.x+o.width/2-i.width/2,f=o.y+o.height/2-i.height/2,p=o[l]/2-i[l]/2;let m;switch(c){case"top":m={x:d,y:o.y-i.height};break;case"bottom":m={x:d,y:o.y+o.height};break;case"right":m={x:o.x+o.width,y:f};break;case"left":m={x:o.x-i.width,y:f};break;default:m={x:o.x,y:o.y}}switch(Ti(n)){case"start":m[a]-=p*(r&&u?-1:1);break;case"end":m[a]+=p*(r&&u?-1:1);break}return m}async function G$(e,n){var r;n===void 0&&(n={});const{x:o,y:i,platform:s,rects:a,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:p=!1,padding:m=0}=Un(n,e),g=V_(m),_=l[p?f==="floating"?"reference":"floating":f],y=Rc(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(_)))==null||r?_:_.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),x=f==="floating"?{x:o,y:i,width:a.floating.width,height:a.floating.height}:a.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),S=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},C=Rc(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:x,offsetParent:w,strategy:c}):x);return{top:(y.top-C.top+g.top)/S.y,bottom:(C.bottom-y.bottom+g.bottom)/S.y,left:(y.left-C.left+g.left)/S.x,right:(C.right-y.right+g.right)/S.x}}const Y$=50,X$=async(e,n,r)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:a}=r,l=a.detectOverflow?a:{...a,detectOverflow:G$},c=await(a.isRTL==null?void 0:a.isRTL(n));let u=await a.getElementRects({reference:e,floating:n,strategy:i}),{x:d,y:f}=Mv(u,o,c),p=o,m=0;const g={};for(let b=0;b<s.length;b++){const _=s[b];if(!_)continue;const{name:y,fn:x}=_,{x:w,y:S,data:C,reset:E}=await x({x:d,y:f,initialPlacement:o,placement:p,strategy:i,middlewareData:g,rects:u,platform:l,elements:{reference:e,floating:n}});d=w??d,f=S??f,g[y]={...g[y],...C},E&&m<Y$&&(m++,typeof E=="object"&&(E.placement&&(p=E.placement),E.rects&&(u=E.rects===!0?await a.getElementRects({reference:e,floating:n,strategy:i}):E.rects),{x:d,y:f}=Mv(u,p,c)),b=-1)}return{x:d,y:f,placement:p,strategy:i,middlewareData:g}},K$=e=>({name:"arrow",options:e,async fn(n){const{x:r,y:o,placement:i,rects:s,platform:a,elements:l,middlewareData:c}=n,{element:u,padding:d=0}=Un(e,n)||{};if(u==null)return{};const f=V_(d),p={x:r,y:o},m=Cm(i),g=Sm(m),b=await a.getDimensions(u),_=m==="y",y=_?"top":"left",x=_?"bottom":"right",w=_?"clientHeight":"clientWidth",S=s.reference[g]+s.reference[m]-p[m]-s.floating[g],C=p[m]-s.reference[m],E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let k=E?E[w]:0;(!k||!await(a.isElement==null?void 0:a.isElement(E)))&&(k=l.floating[w]||s.floating[g]);const N=S/2-C/2,j=k/2-b[g]/2-1,$=Rr(f[y],j),I=Rr(f[x],j),O=$,H=k-b[g]-I,R=k/2-b[g]/2+N,L=xp(O,R,H),D=!c.arrow&&Ti(i)!=null&&R!==L&&s.reference[g]/2-(R<O?$:I)-b[g]/2<0,z=D?R<O?R-O:R-H:0;return{[m]:p[m]+z,data:{[m]:L,centerOffset:R-L-z,...D&&{alignmentOffset:z}},reset:D}}}),q$=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(n){var r,o;const{placement:i,middlewareData:s,rects:a,initialPlacement:l,platform:c,elements:u}=n,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:b=!0,..._}=Un(e,n);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const y=Gn(i),x=gn(l),w=Gn(l)===l,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),C=p||(w||!b?[Pc(l)]:F$(l)),E=g!=="none";!p&&E&&C.push(...W$(l,b,g,S));const k=[l,...C],N=await c.detectOverflow(n,_),j=[];let $=((o=s.flip)==null?void 0:o.overflows)||[];if(d&&j.push(N[y]),f){const R=z$(i,a,S);j.push(N[R[0]],N[R[1]])}if($=[...$,{placement:i,overflows:j}],!j.every(R=>R<=0)){var I,O;const R=(((I=s.flip)==null?void 0:I.index)||0)+1,L=k[R];if(L&&(!(f==="alignment"?x!==gn(L):!1)||$.every(A=>gn(A.placement)===x?A.overflows[0]>0:!0)))return{data:{index:R,overflows:$},reset:{placement:L}};let D=(O=$.filter(z=>z.overflows[0]<=0).sort((z,A)=>z.overflows[1]-A.overflows[1])[0])==null?void 0:O.placement;if(!D)switch(m){case"bestFit":{var H;const z=(H=$.filter(A=>{if(E){const M=gn(A.placement);return M===x||M==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(M=>M>0).reduce((M,P)=>M+P,0)]).sort((A,M)=>A[1]-M[1])[0])==null?void 0:H[0];z&&(D=z);break}case"initialPlacement":D=l;break}if(i!==D)return{reset:{placement:D}}}return{}}}};function jv(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}function Av(e){return D$.some(n=>e[n]>=0)}const Z$=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:r,platform:o}=n,{strategy:i="referenceHidden",...s}=Un(e,n);switch(i){case"referenceHidden":{const a=await o.detectOverflow(n,{...s,elementContext:"reference"}),l=jv(a,r.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:Av(l)}}}case"escaped":{const a=await o.detectOverflow(n,{...s,altBoundary:!0}),l=jv(a,r.floating);return{data:{escapedOffsets:l,escaped:Av(l)}}}default:return{}}}}},B_=new Set(["left","top"]);async function Q$(e,n){const{placement:r,platform:o,elements:i}=e,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),a=Gn(r),l=Ti(r),c=gn(r)==="y",u=B_.has(a)?-1:1,d=s&&c?-1:1,f=Un(n,e);let{mainAxis:p,crossAxis:m,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof g=="number"&&(m=l==="end"?g*-1:g),c?{x:m*d,y:p*u}:{x:p*u,y:m*d}}const J$=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var r,o;const{x:i,y:s,placement:a,middlewareData:l}=n,c=await Q$(n,e);return a===((r=l.offset)==null?void 0:r.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:i+c.x,y:s+c.y,data:{...c,placement:a}}}}},eO=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:r,y:o,placement:i,platform:s}=n,{mainAxis:a=!0,crossAxis:l=!1,limiter:c={fn:y=>{let{x,y:w}=y;return{x,y:w}}},...u}=Un(e,n),d={x:r,y:o},f=await s.detectOverflow(n,u),p=gn(Gn(i)),m=_m(p);let g=d[m],b=d[p];if(a){const y=m==="y"?"top":"left",x=m==="y"?"bottom":"right",w=g+f[y],S=g-f[x];g=xp(w,g,S)}if(l){const y=p==="y"?"top":"left",x=p==="y"?"bottom":"right",w=b+f[y],S=b-f[x];b=xp(w,b,S)}const _=c.fn({...n,[m]:g,[p]:b});return{..._,data:{x:_.x-r,y:_.y-o,enabled:{[m]:a,[p]:l}}}}}},tO=function(e){return e===void 0&&(e={}),{options:e,fn(n){const{x:r,y:o,placement:i,rects:s,middlewareData:a}=n,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=Un(e,n),d={x:r,y:o},f=gn(i),p=_m(f);let m=d[p],g=d[f];const b=Un(l,n),_=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(c){const w=p==="y"?"height":"width",S=s.reference[p]-s.floating[w]+_.mainAxis,C=s.reference[p]+s.reference[w]-_.mainAxis;m<S?m=S:m>C&&(m=C)}if(u){var y,x;const w=p==="y"?"width":"height",S=B_.has(Gn(i)),C=s.reference[f]-s.floating[w]+(S&&((y=a.offset)==null?void 0:y[f])||0)+(S?0:_.crossAxis),E=s.reference[f]+s.reference[w]+(S?0:((x=a.offset)==null?void 0:x[f])||0)-(S?_.crossAxis:0);g<C?g=C:g>E&&(g=E)}return{[p]:m,[f]:g}}}},nO=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){var r,o;const{placement:i,rects:s,platform:a,elements:l}=n,{apply:c=()=>{},...u}=Un(e,n),d=await a.detectOverflow(n,u),f=Gn(i),p=Ti(i),m=gn(i)==="y",{width:g,height:b}=s.floating;let _,y;f==="top"||f==="bottom"?(_=f,y=p===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(y=f,_=p==="end"?"top":"bottom");const x=b-d.top-d.bottom,w=g-d.left-d.right,S=Rr(b-d[_],x),C=Rr(g-d[y],w),E=!n.middlewareData.shift;let k=S,N=C;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(N=w),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(k=x),E&&!p){const $=St(d.left,0),I=St(d.right,0),O=St(d.top,0),H=St(d.bottom,0);m?N=g-2*($!==0||I!==0?$+I:St(d.left,d.right)):k=b-2*(O!==0||H!==0?O+H:St(d.top,d.bottom))}await c({...n,availableWidth:N,availableHeight:k});const j=await a.getDimensions(l.floating);return g!==j.width||b!==j.height?{reset:{rects:!0}}:{}}}};function ju(){return typeof window<"u"}function Ii(e){return H_(e)?(e.nodeName||"").toLowerCase():"#document"}function Nt(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function En(e){var n;return(n=(H_(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function H_(e){return ju()?e instanceof Node||e instanceof Nt(e).Node:!1}function sn(e){return ju()?e instanceof Element||e instanceof Nt(e).Element:!1}function qn(e){return ju()?e instanceof HTMLElement||e instanceof Nt(e).HTMLElement:!1}function Tv(e){return!ju()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Nt(e).ShadowRoot}function Sa(e){const{overflow:n,overflowX:r,overflowY:o,display:i}=an(e);return/auto|scroll|overlay|hidden|clip/.test(n+o+r)&&i!=="inline"&&i!=="contents"}function rO(e){return/^(table|td|th)$/.test(Ii(e))}function Au(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const oO=/transform|translate|scale|rotate|perspective|filter/,iO=/paint|layout|strict|content/,Br=e=>!!e&&e!=="none";let Qf;function Em(e){const n=sn(e)?an(e):e;return Br(n.transform)||Br(n.translate)||Br(n.scale)||Br(n.rotate)||Br(n.perspective)||!km()&&(Br(n.backdropFilter)||Br(n.filter))||oO.test(n.willChange||"")||iO.test(n.contain||"")}function sO(e){let n=Mr(e);for(;qn(n)&&!hi(n);){if(Em(n))return n;if(Au(n))return null;n=Mr(n)}return null}function km(){return Qf==null&&(Qf=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Qf}function hi(e){return/^(html|body|#document)$/.test(Ii(e))}function an(e){return Nt(e).getComputedStyle(e)}function Tu(e){return sn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Mr(e){if(Ii(e)==="html")return e;const n=e.assignedSlot||e.parentNode||Tv(e)&&e.host||En(e);return Tv(n)?n.host:n}function W_(e){const n=Mr(e);return hi(n)?e.ownerDocument?e.ownerDocument.body:e.body:qn(n)&&Sa(n)?n:W_(n)}function qs(e,n,r){var o;n===void 0&&(n=[]),r===void 0&&(r=!0);const i=W_(e),s=i===((o=e.ownerDocument)==null?void 0:o.body),a=Nt(i);if(s){const l=bp(a);return n.concat(a,a.visualViewport||[],Sa(i)?i:[],l&&r?qs(l):[])}else return n.concat(i,qs(i,[],r))}function bp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function U_(e){const n=an(e);let r=parseFloat(n.width)||0,o=parseFloat(n.height)||0;const i=qn(e),s=i?e.offsetWidth:r,a=i?e.offsetHeight:o,l=Nc(r)!==s||Nc(o)!==a;return l&&(r=s,o=a),{width:r,height:o,$:l}}function Nm(e){return sn(e)?e:e.contextElement}function ni(e){const n=Nm(e);if(!qn(n))return wn(1);const r=n.getBoundingClientRect(),{width:o,height:i,$:s}=U_(n);let a=(s?Nc(r.width):r.width)/o,l=(s?Nc(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const aO=wn(0);function G_(e){const n=Nt(e);return!km()||!n.visualViewport?aO:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function lO(e,n,r){return n===void 0&&(n=!1),!r||n&&r!==Nt(e)?!1:n}function uo(e,n,r,o){n===void 0&&(n=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),s=Nm(e);let a=wn(1);n&&(o?sn(o)&&(a=ni(o)):a=ni(e));const l=lO(s,r,o)?G_(s):wn(0);let c=(i.left+l.x)/a.x,u=(i.top+l.y)/a.y,d=i.width/a.x,f=i.height/a.y;if(s){const p=Nt(s),m=o&&sn(o)?Nt(o):o;let g=p,b=bp(g);for(;b&&o&&m!==g;){const _=ni(b),y=b.getBoundingClientRect(),x=an(b),w=y.left+(b.clientLeft+parseFloat(x.paddingLeft))*_.x,S=y.top+(b.clientTop+parseFloat(x.paddingTop))*_.y;c*=_.x,u*=_.y,d*=_.x,f*=_.y,c+=w,u+=S,g=Nt(b),b=bp(g)}}return Rc({width:d,height:f,x:c,y:u})}function Iu(e,n){const r=Tu(e).scrollLeft;return n?n.left+r:uo(En(e)).left+r}function Y_(e,n){const r=e.getBoundingClientRect(),o=r.left+n.scrollLeft-Iu(e,r),i=r.top+n.scrollTop;return{x:o,y:i}}function cO(e){let{elements:n,rect:r,offsetParent:o,strategy:i}=e;const s=i==="fixed",a=En(o),l=n?Au(n.floating):!1;if(o===a||l&&s)return r;let c={scrollLeft:0,scrollTop:0},u=wn(1);const d=wn(0),f=qn(o);if((f||!f&&!s)&&((Ii(o)!=="body"||Sa(a))&&(c=Tu(o)),f)){const m=uo(o);u=ni(o),d.x=m.x+o.clientLeft,d.y=m.y+o.clientTop}const p=a&&!f&&!s?Y_(a,c):wn(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+d.x+p.x,y:r.y*u.y-c.scrollTop*u.y+d.y+p.y}}function uO(e){return Array.from(e.getClientRects())}function fO(e){const n=En(e),r=Tu(e),o=e.ownerDocument.body,i=St(n.scrollWidth,n.clientWidth,o.scrollWidth,o.clientWidth),s=St(n.scrollHeight,n.clientHeight,o.scrollHeight,o.clientHeight);let a=-r.scrollLeft+Iu(e);const l=-r.scrollTop;return an(o).direction==="rtl"&&(a+=St(n.clientWidth,o.clientWidth)-i),{width:i,height:s,x:a,y:l}}const Iv=25;function dO(e,n){const r=Nt(e),o=En(e),i=r.visualViewport;let s=o.clientWidth,a=o.clientHeight,l=0,c=0;if(i){s=i.width,a=i.height;const d=km();(!d||d&&n==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}const u=Iu(o);if(u<=0){const d=o.ownerDocument,f=d.body,p=getComputedStyle(f),m=d.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(o.clientWidth-f.clientWidth-m);g<=Iv&&(s-=g)}else u<=Iv&&(s+=u);return{width:s,height:a,x:l,y:c}}function pO(e,n){const r=uo(e,!0,n==="fixed"),o=r.top+e.clientTop,i=r.left+e.clientLeft,s=qn(e)?ni(e):wn(1),a=e.clientWidth*s.x,l=e.clientHeight*s.y,c=i*s.x,u=o*s.y;return{width:a,height:l,x:c,y:u}}function $v(e,n,r){let o;if(n==="viewport")o=dO(e,r);else if(n==="document")o=fO(En(e));else if(sn(n))o=pO(n,r);else{const i=G_(e);o={x:n.x-i.x,y:n.y-i.y,width:n.width,height:n.height}}return Rc(o)}function X_(e,n){const r=Mr(e);return r===n||!sn(r)||hi(r)?!1:an(r).position==="fixed"||X_(r,n)}function hO(e,n){const r=n.get(e);if(r)return r;let o=qs(e,[],!1).filter(l=>sn(l)&&Ii(l)!=="body"),i=null;const s=an(e).position==="fixed";let a=s?Mr(e):e;for(;sn(a)&&!hi(a);){const l=an(a),c=Em(a);!c&&l.position==="fixed"&&(i=null),(s?!c&&!i:!c&&l.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||Sa(a)&&!c&&X_(e,a))?o=o.filter(d=>d!==a):i=l,a=Mr(a)}return n.set(e,o),o}function mO(e){let{element:n,boundary:r,rootBoundary:o,strategy:i}=e;const a=[...r==="clippingAncestors"?Au(n)?[]:hO(n,this._c):[].concat(r),o],l=$v(n,a[0],i);let c=l.top,u=l.right,d=l.bottom,f=l.left;for(let p=1;p<a.length;p++){const m=$v(n,a[p],i);c=St(m.top,c),u=Rr(m.right,u),d=Rr(m.bottom,d),f=St(m.left,f)}return{width:u-f,height:d-c,x:f,y:c}}function gO(e){const{width:n,height:r}=U_(e);return{width:n,height:r}}function yO(e,n,r){const o=qn(n),i=En(n),s=r==="fixed",a=uo(e,!0,s,n);let l={scrollLeft:0,scrollTop:0};const c=wn(0);function u(){c.x=Iu(i)}if(o||!o&&!s)if((Ii(n)!=="body"||Sa(i))&&(l=Tu(n)),o){const m=uo(n,!0,s,n);c.x=m.x+n.clientLeft,c.y=m.y+n.clientTop}else i&&u();s&&!o&&i&&u();const d=i&&!o&&!s?Y_(i,l):wn(0),f=a.left+l.scrollLeft-c.x-d.x,p=a.top+l.scrollTop-c.y-d.y;return{x:f,y:p,width:a.width,height:a.height}}function Jf(e){return an(e).position==="static"}function Ov(e,n){if(!qn(e)||an(e).position==="fixed")return null;if(n)return n(e);let r=e.offsetParent;return En(e)===r&&(r=r.ownerDocument.body),r}function K_(e,n){const r=Nt(e);if(Au(e))return r;if(!qn(e)){let i=Mr(e);for(;i&&!hi(i);){if(sn(i)&&!Jf(i))return i;i=Mr(i)}return r}let o=Ov(e,n);for(;o&&rO(o)&&Jf(o);)o=Ov(o,n);return o&&hi(o)&&Jf(o)&&!Em(o)?r:o||sO(e)||r}const vO=async function(e){const n=this.getOffsetParent||K_,r=this.getDimensions,o=await r(e.floating);return{reference:yO(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function xO(e){return an(e).direction==="rtl"}const wO={convertOffsetParentRelativeRectToViewportRelativeRect:cO,getDocumentElement:En,getClippingRect:mO,getOffsetParent:K_,getElementRects:vO,getClientRects:uO,getDimensions:gO,getScale:ni,isElement:sn,isRTL:xO};function q_(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}function bO(e,n){let r=null,o;const i=En(e);function s(){var l;clearTimeout(o),(l=r)==null||l.disconnect(),r=null}function a(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),s();const u=e.getBoundingClientRect(),{left:d,top:f,width:p,height:m}=u;if(l||n(),!p||!m)return;const g=cl(f),b=cl(i.clientWidth-(d+p)),_=cl(i.clientHeight-(f+m)),y=cl(d),w={rootMargin:-g+"px "+-b+"px "+-_+"px "+-y+"px",threshold:St(0,Rr(1,c))||1};let S=!0;function C(E){const k=E[0].intersectionRatio;if(k!==c){if(!S)return a();k?a(!1,k):o=setTimeout(()=>{a(!1,1e-7)},1e3)}k===1&&!q_(u,e.getBoundingClientRect())&&a(),S=!1}try{r=new IntersectionObserver(C,{...w,root:i.ownerDocument})}catch{r=new IntersectionObserver(C,w)}r.observe(e)}return a(!0),s}function _O(e,n,r,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,u=Nm(e),d=i||s?[...u?qs(u):[],...n?qs(n):[]]:[];d.forEach(y=>{i&&y.addEventListener("scroll",r,{passive:!0}),s&&y.addEventListener("resize",r)});const f=u&&l?bO(u,r):null;let p=-1,m=null;a&&(m=new ResizeObserver(y=>{let[x]=y;x&&x.target===u&&m&&n&&(m.unobserve(n),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=m)==null||w.observe(n)})),r()}),u&&!c&&m.observe(u),n&&m.observe(n));let g,b=c?uo(e):null;c&&_();function _(){const y=uo(e);b&&!q_(b,y)&&r(),b=y,g=requestAnimationFrame(_)}return r(),()=>{var y;d.forEach(x=>{i&&x.removeEventListener("scroll",r),s&&x.removeEventListener("resize",r)}),f==null||f(),(y=m)==null||y.disconnect(),m=null,c&&cancelAnimationFrame(g)}}const SO=J$,CO=eO,EO=q$,kO=nO,NO=Z$,Dv=K$,PO=tO,RO=(e,n,r)=>{const o=new Map,i={platform:wO,...r},s={...i.platform,_c:o};return X$(e,n,{...i,platform:s})};var MO=typeof document<"u",jO=function(){},Vl=MO?h.useLayoutEffect:jO;function Mc(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(typeof e=="function"&&e.toString()===n.toString())return!0;let r,o,i;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==n.length)return!1;for(o=r;o--!==0;)if(!Mc(e[o],n[o]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!{}.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){const s=i[o];if(!(s==="_owner"&&e.$$typeof)&&!Mc(e[s],n[s]))return!1}return!0}return e!==e&&n!==n}function Z_(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Lv(e,n){const r=Z_(e);return Math.round(n*r)/r}function ed(e){const n=h.useRef(e);return Vl(()=>{n.current=e}),n}function AO(e){e===void 0&&(e={});const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:i,elements:{reference:s,floating:a}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,f]=h.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[p,m]=h.useState(o);Mc(p,o)||m(o);const[g,b]=h.useState(null),[_,y]=h.useState(null),x=h.useCallback(A=>{A!==E.current&&(E.current=A,b(A))},[]),w=h.useCallback(A=>{A!==k.current&&(k.current=A,y(A))},[]),S=s||g,C=a||_,E=h.useRef(null),k=h.useRef(null),N=h.useRef(d),j=c!=null,$=ed(c),I=ed(i),O=ed(u),H=h.useCallback(()=>{if(!E.current||!k.current)return;const A={placement:n,strategy:r,middleware:p};I.current&&(A.platform=I.current),RO(E.current,k.current,A).then(M=>{const P={...M,isPositioned:O.current!==!1};R.current&&!Mc(N.current,P)&&(N.current=P,xo.flushSync(()=>{f(P)}))})},[p,n,r,I,O]);Vl(()=>{u===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,f(A=>({...A,isPositioned:!1})))},[u]);const R=h.useRef(!1);Vl(()=>(R.current=!0,()=>{R.current=!1}),[]),Vl(()=>{if(S&&(E.current=S),C&&(k.current=C),S&&C){if($.current)return $.current(S,C,H);H()}},[S,C,H,$,j]);const L=h.useMemo(()=>({reference:E,floating:k,setReference:x,setFloating:w}),[x,w]),D=h.useMemo(()=>({reference:S,floating:C}),[S,C]),z=h.useMemo(()=>{const A={position:r,left:0,top:0};if(!D.floating)return A;const M=Lv(D.floating,d.x),P=Lv(D.floating,d.y);return l?{...A,transform:"translate("+M+"px, "+P+"px)",...Z_(D.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:M,top:P}},[r,l,D.floating,d.x,d.y]);return h.useMemo(()=>({...d,update:H,refs:L,elements:D,floatingStyles:z}),[d,H,L,D,z])}const TO=e=>{function n(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:o,padding:i}=typeof e=="function"?e(r):e;return o&&n(o)?o.current!=null?Dv({element:o.current,padding:i}).fn(r):{}:o?Dv({element:o,padding:i}).fn(r):{}}}},IO=(e,n)=>{const r=SO(e);return{name:r.name,fn:r.fn,options:[e,n]}},$O=(e,n)=>{const r=CO(e);return{name:r.name,fn:r.fn,options:[e,n]}},OO=(e,n)=>({fn:PO(e).fn,options:[e,n]}),DO=(e,n)=>{const r=EO(e);return{name:r.name,fn:r.fn,options:[e,n]}},LO=(e,n)=>{const r=kO(e);return{name:r.name,fn:r.fn,options:[e,n]}},zO=(e,n)=>{const r=NO(e);return{name:r.name,fn:r.fn,options:[e,n]}},FO=(e,n)=>{const r=TO(e);return{name:r.name,fn:r.fn,options:[e,n]}};function VO(e){const n=BO(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(WO);if(c){const u=c.props.children,d=l.map(f=>f===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:f);return v.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,d):null})}return v.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function BO(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=GO(i),l=UO(s,i.props);return i.type!==h.Fragment&&(l.ref=o?_e(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var HO=Symbol("radix.slottable");function WO(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===HO}function UO(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function GO(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var YO=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],XO=YO.reduce((e,n)=>{const r=VO(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),KO="Arrow",Q_=h.forwardRef((e,n)=>{const{children:r,width:o=10,height:i=5,...s}=e;return v.jsx(XO.svg,{...s,ref:n,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:v.jsx("polygon",{points:"0,0 30,0 15,10"})})});Q_.displayName=KO;var qO=Q_;function ZO(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=f=>{var y;const{scope:p,children:m,...g}=f,b=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,_=h.useMemo(()=>g,Object.values(g));return v.jsx(b.Provider,{value:_,children:m})};u.displayName=s+"Provider";function d(f,p){var b;const m=((b=p==null?void 0:p[e])==null?void 0:b[c])||l,g=h.useContext(m);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,QO(i,...n)]}function QO(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const f=c(s)[`__scope${u}`];return{...l,...f}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function JO(e){const n=e4(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(n4);if(c){const u=c.props.children,d=l.map(f=>f===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:f);return v.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,d):null})}return v.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function e4(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=o4(i),l=r4(s,i.props);return i.type!==h.Fragment&&(l.ref=o?_e(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var t4=Symbol("radix.slottable");function n4(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===t4}function r4(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function o4(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var i4=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],J_=i4.reduce((e,n)=>{const r=JO(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),eS="Popper",[tS,Or]=ZO(eS),[BX,nS]=tS(eS),rS="PopperAnchor",oS=h.forwardRef((e,n)=>{const{__scopePopper:r,virtualRef:o,...i}=e,s=nS(rS,r),a=h.useRef(null),l=pe(n,a),c=h.useRef(null);return h.useEffect(()=>{const u=c.current;c.current=(o==null?void 0:o.current)||a.current,u!==c.current&&s.onAnchorChange(c.current)}),o?null:v.jsx(J_.div,{...i,ref:l})});oS.displayName=rS;var Pm="PopperContent",[s4,a4]=tS(Pm),iS=h.forwardRef((e,n)=>{var U,Y,K,ee,J,Q;const{__scopePopper:r,side:o="bottom",sideOffset:i=0,align:s="center",alignOffset:a=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:g,...b}=e,_=nS(Pm,r),[y,x]=h.useState(null),w=pe(n,ne=>x(ne)),[S,C]=h.useState(null),E=dm(S),k=(E==null?void 0:E.width)??0,N=(E==null?void 0:E.height)??0,j=o+(s!=="center"?"-"+s:""),$=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},I=Array.isArray(u)?u:[u],O=I.length>0,H={padding:$,boundary:I.filter(c4),altBoundary:O},{refs:R,floatingStyles:L,placement:D,isPositioned:z,middlewareData:A}=AO({strategy:"fixed",placement:j,whileElementsMounted:(...ne)=>_O(...ne,{animationFrame:m==="always"}),elements:{reference:_.anchor},middleware:[IO({mainAxis:i+N,alignmentAxis:a}),c&&$O({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?OO():void 0,...H}),c&&DO({...H}),LO({...H,apply:({elements:ne,rects:ce,availableWidth:ge,availableHeight:fe})=>{const{width:$e,height:un}=ce.reference,ut=ne.floating.style;ut.setProperty("--radix-popper-available-width",`${ge}px`),ut.setProperty("--radix-popper-available-height",`${fe}px`),ut.setProperty("--radix-popper-anchor-width",`${$e}px`),ut.setProperty("--radix-popper-anchor-height",`${un}px`)}}),S&&FO({element:S,padding:l}),u4({arrowWidth:k,arrowHeight:N}),p&&zO({strategy:"referenceHidden",...H})]}),[M,P]=lS(D),W=_n(g);He(()=>{z&&(W==null||W())},[z,W]);const T=(U=A.arrow)==null?void 0:U.x,X=(Y=A.arrow)==null?void 0:Y.y,F=((K=A.arrow)==null?void 0:K.centerOffset)!==0,[B,G]=h.useState();return He(()=>{y&&G(window.getComputedStyle(y).zIndex)},[y]),v.jsx("div",{ref:R.setFloating,"data-radix-popper-content-wrapper":"",style:{...L,transform:z?L.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:B,"--radix-popper-transform-origin":[(ee=A.transformOrigin)==null?void 0:ee.x,(J=A.transformOrigin)==null?void 0:J.y].join(" "),...((Q=A.hide)==null?void 0:Q.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:v.jsx(s4,{scope:r,placedSide:M,onArrowChange:C,arrowX:T,arrowY:X,shouldHideArrow:F,children:v.jsx(J_.div,{"data-side":M,"data-align":P,...b,ref:w,style:{...b.style,animation:z?void 0:"none"}})})})});iS.displayName=Pm;var sS="PopperArrow",l4={top:"bottom",right:"left",bottom:"top",left:"right"},aS=h.forwardRef(function(n,r){const{__scopePopper:o,...i}=n,s=a4(sS,o),a=l4[s.placedSide];return v.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:v.jsx(qO,{...i,ref:r,style:{...i.style,display:"block"}})})});aS.displayName=sS;function c4(e){return e!==null}var u4=e=>({name:"transformOrigin",options:e,fn(n){var _,y,x;const{placement:r,rects:o,middlewareData:i}=n,a=((_=i.arrow)==null?void 0:_.centerOffset)!==0,l=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[u,d]=lS(r),f={start:"0%",center:"50%",end:"100%"}[d],p=(((y=i.arrow)==null?void 0:y.x)??0)+l/2,m=(((x=i.arrow)==null?void 0:x.y)??0)+c/2;let g="",b="";return u==="bottom"?(g=a?f:`${p}px`,b=`${-c}px`):u==="top"?(g=a?f:`${p}px`,b=`${o.floating.height+c}px`):u==="right"?(g=`${-c}px`,b=a?f:`${m}px`):u==="left"&&(g=`${o.floating.width+c}px`,b=a?f:`${m}px`),{data:{x:g,y:b}}}});function lS(e){const[n,r="center"]=e.split("-");return[n,r]}var Ca=oS,$u=iS,Ou=aS;function cS(e){const n=f4(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(p4);if(c){const u=c.props.children,d=l.map(f=>f===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:f);return v.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,d):null})}return v.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function f4(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=m4(i),l=h4(s,i.props);return i.type!==h.Fragment&&(l.ref=o?_e(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var d4=Symbol("radix.slottable");function p4(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===d4}function h4(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function m4(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var g4=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ea=g4.reduce((e,n)=>{const r=cS(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{});function y4(e,n){e&&xo.flushSync(()=>e.dispatchEvent(n))}function v4(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=f=>{var y;const{scope:p,children:m,...g}=f,b=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,_=h.useMemo(()=>g,Object.values(g));return v.jsx(b.Provider,{value:_,children:m})};u.displayName=s+"Provider";function d(f,p){var b;const m=((b=p==null?void 0:p[e])==null?void 0:b[c])||l,g=h.useContext(m);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,x4(i,...n)]}function x4(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const f=c(s)[`__scope${u}`];return{...l,...f}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function w4(e){const n=b4(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(S4);if(c){const u=c.props.children,d=l.map(f=>f===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:f);return v.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,d):null})}return v.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function b4(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=E4(i),l=C4(s,i.props);return i.type!==h.Fragment&&(l.ref=o?_e(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var _4=Symbol("radix.slottable");function S4(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_4}function C4(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function E4(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var k4=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],uS=k4.reduce((e,n)=>{const r=w4(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),td="rovingFocusGroup.onEntryFocus",N4={bubbles:!1,cancelable:!0},ka="RovingFocusGroup",[_p,fS,P4]=bm(ka),[R4,Du]=v4(ka,[P4]),[M4,j4]=R4(ka),dS=h.forwardRef((e,n)=>v.jsx(_p.Provider,{scope:e.__scopeRovingFocusGroup,children:v.jsx(_p.Slot,{scope:e.__scopeRovingFocusGroup,children:v.jsx(A4,{...e,ref:n})})}));dS.displayName=ka;var A4=h.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:r,orientation:o,loop:i=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,p=h.useRef(null),m=pe(n,p),g=F_(s),[b,_]=ga({prop:a,defaultProp:l??null,onChange:c,caller:ka}),[y,x]=h.useState(!1),w=_n(u),S=fS(r),C=h.useRef(!1),[E,k]=h.useState(0);return h.useEffect(()=>{const N=p.current;if(N)return N.addEventListener(td,w),()=>N.removeEventListener(td,w)},[w]),v.jsx(M4,{scope:r,orientation:o,dir:g,loop:i,currentTabStopId:b,onItemFocus:h.useCallback(N=>_(N),[_]),onItemShiftTab:h.useCallback(()=>x(!0),[]),onFocusableItemAdd:h.useCallback(()=>k(N=>N+1),[]),onFocusableItemRemove:h.useCallback(()=>k(N=>N-1),[]),children:v.jsx(uS.div,{tabIndex:y||E===0?-1:0,"data-orientation":o,...f,ref:m,style:{outline:"none",...e.style},onMouseDown:te(e.onMouseDown,()=>{C.current=!0}),onFocus:te(e.onFocus,N=>{const j=!C.current;if(N.target===N.currentTarget&&j&&!y){const $=new CustomEvent(td,N4);if(N.currentTarget.dispatchEvent($),!$.defaultPrevented){const I=S().filter(D=>D.focusable),O=I.find(D=>D.active),H=I.find(D=>D.id===b),L=[O,H,...I].filter(Boolean).map(D=>D.ref.current);mS(L,d)}}C.current=!1}),onBlur:te(e.onBlur,()=>x(!1))})})}),pS="RovingFocusGroupItem",hS=h.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:r,focusable:o=!0,active:i=!1,tabStopId:s,children:a,...l}=e,c=kt(),u=s||c,d=j4(pS,r),f=d.currentTabStopId===u,p=fS(r),{onFocusableItemAdd:m,onFocusableItemRemove:g,currentTabStopId:b}=d;return h.useEffect(()=>{if(o)return m(),()=>g()},[o,m,g]),v.jsx(_p.ItemSlot,{scope:r,id:u,focusable:o,active:i,children:v.jsx(uS.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...l,ref:n,onMouseDown:te(e.onMouseDown,_=>{o?d.onItemFocus(u):_.preventDefault()}),onFocus:te(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:te(e.onKeyDown,_=>{if(_.key==="Tab"&&_.shiftKey){d.onItemShiftTab();return}if(_.target!==_.currentTarget)return;const y=$4(_,d.orientation,d.dir);if(y!==void 0){if(_.metaKey||_.ctrlKey||_.altKey||_.shiftKey)return;_.preventDefault();let w=p().filter(S=>S.focusable).map(S=>S.ref.current);if(y==="last")w.reverse();else if(y==="prev"||y==="next"){y==="prev"&&w.reverse();const S=w.indexOf(_.currentTarget);w=d.loop?O4(w,S+1):w.slice(S+1)}setTimeout(()=>mS(w))}}),children:typeof a=="function"?a({isCurrentTabStop:f,hasTabStop:b!=null}):a})})});hS.displayName=pS;var T4={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function I4(e,n){return n!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function $4(e,n,r){const o=I4(e.key,r);if(!(n==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(n==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return T4[o]}function mS(e,n=!1){const r=document.activeElement;for(const o of e)if(o===r||(o.focus({preventScroll:n}),document.activeElement!==r))return}function O4(e,n){return e.map((r,o)=>e[(n+o)%e.length])}var gS=dS,yS=hS,Sp=["Enter"," "],D4=["ArrowDown","PageUp","Home"],vS=["ArrowUp","PageDown","End"],L4=[...D4,...vS],z4={ltr:[...Sp,"ArrowRight"],rtl:[...Sp,"ArrowLeft"]},F4={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Lu="Menu",[Zs,V4,B4]=bm(Lu),[bo,xS]=I$(Lu,[B4,Or,Du]),Rm=Or(),wS=Du(),[HX,_o]=bo(Lu),[WX,Na]=bo(Lu),H4="MenuAnchor",Mm=h.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e,i=Rm(r);return v.jsx(Ca,{...i,...o,ref:n})});Mm.displayName=H4;var jm="MenuPortal",[W4,bS]=bo(jm,{forceMount:void 0}),_S=e=>{const{__scopeMenu:n,forceMount:r,children:o,container:i}=e,s=_o(jm,n);return v.jsx(W4,{scope:n,forceMount:r,children:v.jsx(yt,{present:r||s.open,children:v.jsx(Ai,{asChild:!0,container:i,children:o})})})};_S.displayName=jm;var Bt="MenuContent",[U4,Am]=bo(Bt),SS=h.forwardRef((e,n)=>{const r=bS(Bt,e.__scopeMenu),{forceMount:o=r.forceMount,...i}=e,s=_o(Bt,e.__scopeMenu),a=Na(Bt,e.__scopeMenu);return v.jsx(Zs.Provider,{scope:e.__scopeMenu,children:v.jsx(yt,{present:o||s.open,children:v.jsx(Zs.Slot,{scope:e.__scopeMenu,children:a.modal?v.jsx(G4,{...i,ref:n}):v.jsx(Y4,{...i,ref:n})})})})}),G4=h.forwardRef((e,n)=>{const r=_o(Bt,e.__scopeMenu),o=h.useRef(null),i=pe(n,o);return h.useEffect(()=>{const s=o.current;if(s)return ku(s)},[]),v.jsx(Tm,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:te(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),Y4=h.forwardRef((e,n)=>{const r=_o(Bt,e.__scopeMenu);return v.jsx(Tm,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),X4=cS("MenuContent.ScrollLock"),Tm=h.forwardRef((e,n)=>{const{__scopeMenu:r,loop:o=!1,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:m,disableOutsideScroll:g,...b}=e,_=_o(Bt,r),y=Na(Bt,r),x=Rm(r),w=wS(r),S=V4(r),[C,E]=h.useState(null),k=h.useRef(null),N=pe(n,k,_.onContentChange),j=h.useRef(0),$=h.useRef(""),I=h.useRef(0),O=h.useRef(null),H=h.useRef("right"),R=h.useRef(0),L=g?xa:h.Fragment,D=g?{as:X4,allowPinchZoom:!0}:void 0,z=M=>{var U,Y;const P=$.current+M,W=S().filter(K=>!K.disabled),T=document.activeElement,X=(U=W.find(K=>K.ref.current===T))==null?void 0:U.textValue,F=W.map(K=>K.textValue),B=sD(F,P,X),G=(Y=W.find(K=>K.textValue===B))==null?void 0:Y.ref.current;(function K(ee){$.current=ee,window.clearTimeout(j.current),ee!==""&&(j.current=window.setTimeout(()=>K(""),1e3))})(P),G&&setTimeout(()=>G.focus())};h.useEffect(()=>()=>window.clearTimeout(j.current),[]),Cu();const A=h.useCallback(M=>{var W,T;return H.current===((W=O.current)==null?void 0:W.side)&&lD(M,(T=O.current)==null?void 0:T.area)},[]);return v.jsx(U4,{scope:r,searchRef:$,onItemEnter:h.useCallback(M=>{A(M)&&M.preventDefault()},[A]),onItemLeave:h.useCallback(M=>{var P;A(M)||((P=k.current)==null||P.focus(),E(null))},[A]),onTriggerLeave:h.useCallback(M=>{A(M)&&M.preventDefault()},[A]),pointerGraceTimerRef:I,onPointerGraceIntentChange:h.useCallback(M=>{O.current=M},[]),children:v.jsx(L,{...D,children:v.jsx(ya,{asChild:!0,trapped:i,onMountAutoFocus:te(s,M=>{var P;M.preventDefault(),(P=k.current)==null||P.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:v.jsx(ji,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:m,children:v.jsx(gS,{asChild:!0,...w,dir:y.dir,orientation:"vertical",loop:o,currentTabStopId:C,onCurrentTabStopIdChange:E,onEntryFocus:te(c,M=>{y.isUsingKeyboardRef.current||M.preventDefault()}),preventScrollOnEntryFocus:!0,children:v.jsx($u,{role:"menu","aria-orientation":"vertical","data-state":zS(_.open),"data-radix-menu-content":"",dir:y.dir,...x,...b,ref:N,style:{outline:"none",...b.style},onKeyDown:te(b.onKeyDown,M=>{const W=M.target.closest("[data-radix-menu-content]")===M.currentTarget,T=M.ctrlKey||M.altKey||M.metaKey,X=M.key.length===1;W&&(M.key==="Tab"&&M.preventDefault(),!T&&X&&z(M.key));const F=k.current;if(M.target!==F||!L4.includes(M.key))return;M.preventDefault();const G=S().filter(U=>!U.disabled).map(U=>U.ref.current);vS.includes(M.key)&&G.reverse(),oD(G)}),onBlur:te(e.onBlur,M=>{M.currentTarget.contains(M.target)||(window.clearTimeout(j.current),$.current="")}),onPointerMove:te(e.onPointerMove,Qs(M=>{const P=M.target,W=R.current!==M.clientX;if(M.currentTarget.contains(P)&&W){const T=M.clientX>R.current?"right":"left";H.current=T,R.current=M.clientX}}))})})})})})})});SS.displayName=Bt;var K4="MenuGroup",Im=h.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e;return v.jsx(Ea.div,{role:"group",...o,ref:n})});Im.displayName=K4;var q4="MenuLabel",CS=h.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e;return v.jsx(Ea.div,{...o,ref:n})});CS.displayName=q4;var jc="MenuItem",zv="menu.itemSelect",zu=h.forwardRef((e,n)=>{const{disabled:r=!1,onSelect:o,...i}=e,s=h.useRef(null),a=Na(jc,e.__scopeMenu),l=Am(jc,e.__scopeMenu),c=pe(n,s),u=h.useRef(!1),d=()=>{const f=s.current;if(!r&&f){const p=new CustomEvent(zv,{bubbles:!0,cancelable:!0});f.addEventListener(zv,m=>o==null?void 0:o(m),{once:!0}),y4(f,p),p.defaultPrevented?u.current=!1:a.onClose()}};return v.jsx(ES,{...i,ref:c,disabled:r,onClick:te(e.onClick,d),onPointerDown:f=>{var p;(p=e.onPointerDown)==null||p.call(e,f),u.current=!0},onPointerUp:te(e.onPointerUp,f=>{var p;u.current||(p=f.currentTarget)==null||p.click()}),onKeyDown:te(e.onKeyDown,f=>{const p=l.searchRef.current!=="";r||p&&f.key===" "||Sp.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});zu.displayName=jc;var ES=h.forwardRef((e,n)=>{const{__scopeMenu:r,disabled:o=!1,textValue:i,...s}=e,a=Am(jc,r),l=wS(r),c=h.useRef(null),u=pe(n,c),[d,f]=h.useState(!1),[p,m]=h.useState("");return h.useEffect(()=>{const g=c.current;g&&m((g.textContent??"").trim())},[s.children]),v.jsx(Zs.ItemSlot,{scope:r,disabled:o,textValue:i??p,children:v.jsx(yS,{asChild:!0,...l,focusable:!o,children:v.jsx(Ea.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:u,onPointerMove:te(e.onPointerMove,Qs(g=>{o?a.onItemLeave(g):(a.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:te(e.onPointerLeave,Qs(g=>a.onItemLeave(g))),onFocus:te(e.onFocus,()=>f(!0)),onBlur:te(e.onBlur,()=>f(!1))})})})}),Z4="MenuCheckboxItem",kS=h.forwardRef((e,n)=>{const{checked:r=!1,onCheckedChange:o,...i}=e;return v.jsx(jS,{scope:e.__scopeMenu,checked:r,children:v.jsx(zu,{role:"menuitemcheckbox","aria-checked":Ac(r)?"mixed":r,...i,ref:n,"data-state":Om(r),onSelect:te(i.onSelect,()=>o==null?void 0:o(Ac(r)?!0:!r),{checkForDefaultPrevented:!1})})})});kS.displayName=Z4;var NS="MenuRadioGroup",[Q4,J4]=bo(NS,{value:void 0,onValueChange:()=>{}}),PS=h.forwardRef((e,n)=>{const{value:r,onValueChange:o,...i}=e,s=_n(o);return v.jsx(Q4,{scope:e.__scopeMenu,value:r,onValueChange:s,children:v.jsx(Im,{...i,ref:n})})});PS.displayName=NS;var RS="MenuRadioItem",MS=h.forwardRef((e,n)=>{const{value:r,...o}=e,i=J4(RS,e.__scopeMenu),s=r===i.value;return v.jsx(jS,{scope:e.__scopeMenu,checked:s,children:v.jsx(zu,{role:"menuitemradio","aria-checked":s,...o,ref:n,"data-state":Om(s),onSelect:te(o.onSelect,()=>{var a;return(a=i.onValueChange)==null?void 0:a.call(i,r)},{checkForDefaultPrevented:!1})})})});MS.displayName=RS;var $m="MenuItemIndicator",[jS,eD]=bo($m,{checked:!1}),AS=h.forwardRef((e,n)=>{const{__scopeMenu:r,forceMount:o,...i}=e,s=eD($m,r);return v.jsx(yt,{present:o||Ac(s.checked)||s.checked===!0,children:v.jsx(Ea.span,{...i,ref:n,"data-state":Om(s.checked)})})});AS.displayName=$m;var tD="MenuSeparator",TS=h.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e;return v.jsx(Ea.div,{role:"separator","aria-orientation":"horizontal",...o,ref:n})});TS.displayName=tD;var nD="MenuArrow",IS=h.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e,i=Rm(r);return v.jsx(Ou,{...i,...o,ref:n})});IS.displayName=nD;var rD="MenuSub",[UX,$S]=bo(rD),cs="MenuSubTrigger",OS=h.forwardRef((e,n)=>{const r=_o(cs,e.__scopeMenu),o=Na(cs,e.__scopeMenu),i=$S(cs,e.__scopeMenu),s=Am(cs,e.__scopeMenu),a=h.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=s,u={__scopeMenu:e.__scopeMenu},d=h.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return h.useEffect(()=>d,[d]),h.useEffect(()=>{const f=l.current;return()=>{window.clearTimeout(f),c(null)}},[l,c]),v.jsx(Mm,{asChild:!0,...u,children:v.jsx(ES,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":i.contentId,"data-state":zS(r.open),...e,ref:_e(n,i.onTriggerChange),onClick:f=>{var p;(p=e.onClick)==null||p.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:te(e.onPointerMove,Qs(f=>{s.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!r.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{r.onOpenChange(!0),d()},100))})),onPointerLeave:te(e.onPointerLeave,Qs(f=>{var m,g;d();const p=(m=r.content)==null?void 0:m.getBoundingClientRect();if(p){const b=(g=r.content)==null?void 0:g.dataset.side,_=b==="right",y=_?-5:5,x=p[_?"left":"right"],w=p[_?"right":"left"];s.onPointerGraceIntentChange({area:[{x:f.clientX+y,y:f.clientY},{x,y:p.top},{x:w,y:p.top},{x:w,y:p.bottom},{x,y:p.bottom}],side:b}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(f),f.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:te(e.onKeyDown,f=>{var m;const p=s.searchRef.current!=="";e.disabled||p&&f.key===" "||z4[o.dir].includes(f.key)&&(r.onOpenChange(!0),(m=r.content)==null||m.focus(),f.preventDefault())})})})});OS.displayName=cs;var DS="MenuSubContent",LS=h.forwardRef((e,n)=>{const r=bS(Bt,e.__scopeMenu),{forceMount:o=r.forceMount,...i}=e,s=_o(Bt,e.__scopeMenu),a=Na(Bt,e.__scopeMenu),l=$S(DS,e.__scopeMenu),c=h.useRef(null),u=pe(n,c);return v.jsx(Zs.Provider,{scope:e.__scopeMenu,children:v.jsx(yt,{present:o||s.open,children:v.jsx(Zs.Slot,{scope:e.__scopeMenu,children:v.jsx(Tm,{id:l.contentId,"aria-labelledby":l.triggerId,...i,ref:u,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var f;a.isUsingKeyboardRef.current&&((f=c.current)==null||f.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:te(e.onFocusOutside,d=>{d.target!==l.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:te(e.onEscapeKeyDown,d=>{a.onClose(),d.preventDefault()}),onKeyDown:te(e.onKeyDown,d=>{var m;const f=d.currentTarget.contains(d.target),p=F4[a.dir].includes(d.key);f&&p&&(s.onOpenChange(!1),(m=l.trigger)==null||m.focus(),d.preventDefault())})})})})})});LS.displayName=DS;function zS(e){return e?"open":"closed"}function Ac(e){return e==="indeterminate"}function Om(e){return Ac(e)?"indeterminate":e?"checked":"unchecked"}function oD(e){const n=document.activeElement;for(const r of e)if(r===n||(r.focus(),document.activeElement!==n))return}function iD(e,n){return e.map((r,o)=>e[(n+o)%e.length])}function sD(e,n,r){const i=n.length>1&&Array.from(n).every(u=>u===n[0])?n[0]:n,s=r?e.indexOf(r):-1;let a=iD(e,Math.max(s,0));i.length===1&&(a=a.filter(u=>u!==r));const c=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return c!==r?c:void 0}function aD(e,n){const{x:r,y:o}=e;let i=!1;for(let s=0,a=n.length-1;s<n.length;a=s++){const l=n[s],c=n[a],u=l.x,d=l.y,f=c.x,p=c.y;d>o!=p>o&&r<(f-u)*(o-d)/(p-d)+u&&(i=!i)}return i}function lD(e,n){if(!n)return!1;const r={x:e.clientX,y:e.clientY};return aD(r,n)}function Qs(e){return n=>n.pointerType==="mouse"?e(n):void 0}var cD=Mm,uD=_S,fD=SS,dD=Im,pD=CS,hD=zu,mD=kS,gD=PS,yD=MS,vD=AS,xD=TS,wD=IS,bD=OS,_D=LS,FS="DropdownMenu",[SD]=y$(FS,[xS]),xt=xS(),[GX,VS]=SD(FS),BS="DropdownMenuTrigger",CD=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,disabled:o=!1,...i}=e,s=VS(BS,r),a=xt(r);return v.jsx(cD,{asChild:!0,...a,children:v.jsx(k$.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...i,ref:_e(n,s.triggerRef),onPointerDown:te(e.onPointerDown,l=>{!o&&l.button===0&&l.ctrlKey===!1&&(s.onOpenToggle(),s.open||l.preventDefault())}),onKeyDown:te(e.onKeyDown,l=>{o||(["Enter"," "].includes(l.key)&&s.onOpenToggle(),l.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});CD.displayName=BS;var ED="DropdownMenuPortal",HS=e=>{const{__scopeDropdownMenu:n,...r}=e,o=xt(n);return v.jsx(uD,{...o,...r})};HS.displayName=ED;var WS="DropdownMenuContent",US=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=VS(WS,r),s=xt(r),a=h.useRef(!1);return v.jsx(fD,{id:i.contentId,"aria-labelledby":i.triggerId,...s,...o,ref:n,onCloseAutoFocus:te(e.onCloseAutoFocus,l=>{var c;a.current||(c=i.triggerRef.current)==null||c.focus(),a.current=!1,l.preventDefault()}),onInteractOutside:te(e.onInteractOutside,l=>{const c=l.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;(!i.modal||d)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});US.displayName=WS;var kD="DropdownMenuGroup",ND=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=xt(r);return v.jsx(dD,{...i,...o,ref:n})});ND.displayName=kD;var PD="DropdownMenuLabel",GS=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=xt(r);return v.jsx(pD,{...i,...o,ref:n})});GS.displayName=PD;var RD="DropdownMenuItem",YS=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=xt(r);return v.jsx(hD,{...i,...o,ref:n})});YS.displayName=RD;var MD="DropdownMenuCheckboxItem",XS=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=xt(r);return v.jsx(mD,{...i,...o,ref:n})});XS.displayName=MD;var jD="DropdownMenuRadioGroup",AD=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=xt(r);return v.jsx(gD,{...i,...o,ref:n})});AD.displayName=jD;var TD="DropdownMenuRadioItem",KS=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=xt(r);return v.jsx(yD,{...i,...o,ref:n})});KS.displayName=TD;var ID="DropdownMenuItemIndicator",qS=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=xt(r);return v.jsx(vD,{...i,...o,ref:n})});qS.displayName=ID;var $D="DropdownMenuSeparator",ZS=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=xt(r);return v.jsx(xD,{...i,...o,ref:n})});ZS.displayName=$D;var OD="DropdownMenuArrow",DD=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=xt(r);return v.jsx(wD,{...i,...o,ref:n})});DD.displayName=OD;var LD="DropdownMenuSubTrigger",QS=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=xt(r);return v.jsx(bD,{...i,...o,ref:n})});QS.displayName=LD;var zD="DropdownMenuSubContent",JS=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=xt(r);return v.jsx(_D,{...i,...o,ref:n,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});JS.displayName=zD;var FD=HS,eC=US,tC=GS,nC=YS,rC=XS,oC=KS,iC=qS,sC=ZS,aC=QS,lC=JS;const VD=h.forwardRef(({className:e,inset:n,children:r,...o},i)=>v.jsxs(aC,{ref:i,className:se("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",n&&"pl-8",e),...o,children:[r,v.jsx(Cc,{className:"ml-auto"})]}));VD.displayName=aC.displayName;const BD=h.forwardRef(({className:e,...n},r)=>v.jsx(lC,{ref:r,className:se("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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-dropdown-menu-content-transform-origin]",e),...n}));BD.displayName=lC.displayName;const HD=h.forwardRef(({className:e,sideOffset:n=4,...r},o)=>v.jsx(FD,{children:v.jsx(eC,{ref:o,sideOffset:n,className:se("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 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-dropdown-menu-content-transform-origin]",e),...r})}));HD.displayName=eC.displayName;const WD=h.forwardRef(({className:e,inset:n,...r},o)=>v.jsx(nC,{ref:o,className:se("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",n&&"pl-8",e),...r}));WD.displayName=nC.displayName;const UD=h.forwardRef(({className:e,children:n,checked:r,...o},i)=>v.jsxs(rC,{ref:i,className:se("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...o,children:[v.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:v.jsx(iC,{children:v.jsx(lm,{className:"h-4 w-4"})})}),n]}));UD.displayName=rC.displayName;const GD=h.forwardRef(({className:e,children:n,...r},o)=>v.jsxs(oC,{ref:o,className:se("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[v.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:v.jsx(iC,{children:v.jsx(IT,{className:"h-2 w-2 fill-current"})})}),n]}));GD.displayName=oC.displayName;const YD=h.forwardRef(({className:e,inset:n,...r},o)=>v.jsx(tC,{ref:o,className:se("px-2 py-1.5 text-sm font-semibold",n&&"pl-8",e),...r}));YD.displayName=tC.displayName;const XD=h.forwardRef(({className:e,...n},r)=>v.jsx(sC,{ref:r,className:se("-mx-1 my-1 h-px bg-muted",e),...n}));XD.displayName=sC.displayName;const KD=h.forwardRef(({className:e,type:n,...r},o)=>v.jsx("input",{type:n,className:se("flex h-9 w-full rounded-md border border-transparent bg-input px-3 py-1 text-base transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground/50 placeholder:font-light focus-visible:outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:o,...r}));KD.displayName="Input";var qD="Label",cC=h.forwardRef((e,n)=>v.jsx(lt.label,{...e,ref:n,onMouseDown:r=>{var i;r.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));cC.displayName=qD;var uC=cC;const ZD=sm("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),QD=h.forwardRef(({className:e,...n},r)=>v.jsx(uC,{ref:r,className:se(ZD(),e),...n}));QD.displayName=uC.displayName;function JD(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=f=>{var y;const{scope:p,children:m,...g}=f,b=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,_=h.useMemo(()=>g,Object.values(g));return v.jsx(b.Provider,{value:_,children:m})};u.displayName=s+"Provider";function d(f,p){var b;const m=((b=p==null?void 0:p[e])==null?void 0:b[c])||l,g=h.useContext(m);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,eL(i,...n)]}function eL(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const f=c(s)[`__scope${u}`];return{...l,...f}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function fC(e){const n=tL(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(rL);if(c){const u=c.props.children,d=l.map(f=>f===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:f);return v.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,d):null})}return v.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function tL(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=iL(i),l=oL(s,i.props);return i.type!==h.Fragment&&(l.ref=o?_e(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var nL=Symbol("radix.slottable");function rL(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===nL}function oL(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function iL(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var sL=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],dC=sL.reduce((e,n)=>{const r=fC(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),pC="Popover",[hC]=JD(pC,[Or]),Fu=Or(),[YX,Dr]=hC(pC),mC="PopoverAnchor",aL=h.forwardRef((e,n)=>{const{__scopePopover:r,...o}=e,i=Dr(mC,r),s=Fu(r),{onCustomAnchorAdd:a,onCustomAnchorRemove:l}=i;return h.useEffect(()=>(a(),()=>l()),[a,l]),v.jsx(Ca,{...s,...o,ref:n})});aL.displayName=mC;var gC="PopoverTrigger",lL=h.forwardRef((e,n)=>{const{__scopePopover:r,...o}=e,i=Dr(gC,r),s=Fu(r),a=pe(n,i.triggerRef),l=v.jsx(dC.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":bC(i.open),...o,ref:a,onClick:te(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?l:v.jsx(Ca,{asChild:!0,...s,children:l})});lL.displayName=gC;var Dm="PopoverPortal",[cL,uL]=hC(Dm,{forceMount:void 0}),yC=e=>{const{__scopePopover:n,forceMount:r,children:o,container:i}=e,s=Dr(Dm,n);return v.jsx(cL,{scope:n,forceMount:r,children:v.jsx(yt,{present:r||s.open,children:v.jsx(Ai,{asChild:!0,container:i,children:o})})})};yC.displayName=Dm;var mi="PopoverContent",vC=h.forwardRef((e,n)=>{const r=uL(mi,e.__scopePopover),{forceMount:o=r.forceMount,...i}=e,s=Dr(mi,e.__scopePopover);return v.jsx(yt,{present:o||s.open,children:s.modal?v.jsx(dL,{...i,ref:n}):v.jsx(pL,{...i,ref:n})})});vC.displayName=mi;var fL=fC("PopoverContent.RemoveScroll"),dL=h.forwardRef((e,n)=>{const r=Dr(mi,e.__scopePopover),o=h.useRef(null),i=pe(n,o),s=h.useRef(!1);return h.useEffect(()=>{const a=o.current;if(a)return ku(a)},[]),v.jsx(xa,{as:fL,allowPinchZoom:!0,children:v.jsx(xC,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:te(e.onCloseAutoFocus,a=>{var l;a.preventDefault(),s.current||(l=r.triggerRef.current)==null||l.focus()}),onPointerDownOutside:te(e.onPointerDownOutside,a=>{const l=a.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:te(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),pL=h.forwardRef((e,n)=>{const r=Dr(mi,e.__scopePopover),o=h.useRef(!1),i=h.useRef(!1);return v.jsx(xC,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var a,l;(a=e.onCloseAutoFocus)==null||a.call(e,s),s.defaultPrevented||(o.current||(l=r.triggerRef.current)==null||l.focus(),s.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:s=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=s.target;((u=r.triggerRef.current)==null?void 0:u.contains(a))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),xC=h.forwardRef((e,n)=>{const{__scopePopover:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:d,...f}=e,p=Dr(mi,r),m=Fu(r);return Cu(),v.jsx(ya,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:s,children:v.jsx(ji,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:d,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:v.jsx($u,{"data-state":bC(p.open),role:"dialog",id:p.contentId,...m,...f,ref:n,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),wC="PopoverClose",hL=h.forwardRef((e,n)=>{const{__scopePopover:r,...o}=e,i=Dr(wC,r);return v.jsx(dC.button,{type:"button",...o,ref:n,onClick:te(e.onClick,()=>i.onOpenChange(!1))})});hL.displayName=wC;var mL="PopoverArrow",gL=h.forwardRef((e,n)=>{const{__scopePopover:r,...o}=e,i=Fu(r);return v.jsx(Ou,{...i,...o,ref:n})});gL.displayName=mL;function bC(e){return e?"open":"closed"}var yL=yC,_C=vC;const vL=h.forwardRef(({className:e,align:n="start",sideOffset:r=4,...o},i)=>v.jsx(yL,{children:v.jsx(_C,{ref:i,align:n,sideOffset:r,className:se("z-50 w-[var(--radix-popover-trigger-width)] rounded-md border bg-popover p-0 text-popover-foreground shadow-md outline-none 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",e),...o})}));vL.displayName=_C.displayName;var Lm="Progress",zm=100,[xL]=Nb(Lm),[wL,bL]=xL(Lm),SC=h.forwardRef((e,n)=>{const{__scopeProgress:r,value:o=null,max:i,getValueLabel:s=_L,...a}=e;(i||i===0)&&!Fv(i)&&console.error(SL(`${i}`,"Progress"));const l=Fv(i)?i:zm;o!==null&&!Vv(o,l)&&console.error(CL(`${o}`,"Progress"));const c=Vv(o,l)?o:null,u=Tc(c)?s(c,l):void 0;return v.jsx(wL,{scope:r,value:c,max:l,children:v.jsx(lt.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":Tc(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":kC(c,l),"data-value":c??void 0,"data-max":l,...a,ref:n})})});SC.displayName=Lm;var CC="ProgressIndicator",EC=h.forwardRef((e,n)=>{const{__scopeProgress:r,...o}=e,i=bL(CC,r);return v.jsx(lt.div,{"data-state":kC(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...o,ref:n})});EC.displayName=CC;function _L(e,n){return`${Math.round(e/n*100)}%`}function kC(e,n){return e==null?"indeterminate":e===n?"complete":"loading"}function Tc(e){return typeof e=="number"}function Fv(e){return Tc(e)&&!isNaN(e)&&e>0}function Vv(e,n){return Tc(e)&&!isNaN(e)&&e<=n&&e>=0}function SL(e,n){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${n}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${zm}\`.`}function CL(e,n){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${n}\`. The \`value\` prop must be:
315
+ - a positive number
316
+ - less than the value passed to \`max\` (or ${zm} if no \`max\` prop is set)
317
+ - \`null\` or \`undefined\` if the progress is indeterminate.
318
+
319
+ Defaulting to \`null\`.`}var NC=SC,EL=EC;const kL=h.forwardRef(({className:e,value:n,...r},o)=>v.jsx(NC,{ref:o,className:se("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...r,children:v.jsx(EL,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(n||0)}%)`}})}));kL.displayName=NC.displayName;function Bv(e,[n,r]){return Math.min(r,Math.max(n,e))}function NL(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=f=>{var y;const{scope:p,children:m,...g}=f,b=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,_=h.useMemo(()=>g,Object.values(g));return v.jsx(b.Provider,{value:_,children:m})};u.displayName=s+"Provider";function d(f,p){var b;const m=((b=p==null?void 0:p[e])==null?void 0:b[c])||l,g=h.useContext(m);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,PL(i,...n)]}function PL(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const f=c(s)[`__scope${u}`];return{...l,...f}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function PC(e){const n=RL(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(jL);if(c){const u=c.props.children,d=l.map(f=>f===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:f);return v.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,d):null})}return v.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function RL(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=TL(i),l=AL(s,i.props);return i.type!==h.Fragment&&(l.ref=o?_e(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var ML=Symbol("radix.slottable");function jL(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ML}function AL(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function TL(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var IL=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],At=IL.reduce((e,n)=>{const r=PC(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{});function $L(e){const n=OL(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(LL);if(c){const u=c.props.children,d=l.map(f=>f===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:f);return v.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,d):null})}return v.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function OL(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=FL(i),l=zL(s,i.props);return i.type!==h.Fragment&&(l.ref=o?_e(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var DL=Symbol("radix.slottable");function LL(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===DL}function zL(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function FL(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var VL=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],BL=VL.reduce((e,n)=>{const r=$L(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),RC=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"}),HL="VisuallyHidden",MC=h.forwardRef((e,n)=>v.jsx(BL.span,{...e,ref:n,style:{...RC,...e.style}}));MC.displayName=HL;var WL=MC,UL=[" ","Enter","ArrowUp","ArrowDown"],GL=[" ","Enter"],Vu="Select",[Fm,Bu,YL]=bm(Vu),[$i]=NL(Vu,[YL,Or]),Vm=Or(),[XX,Lr]=$i(Vu),[KX,XL]=$i(Vu),jC="SelectTrigger",AC=h.forwardRef((e,n)=>{const{__scopeSelect:r,disabled:o=!1,...i}=e,s=Vm(r),a=Lr(jC,r),l=a.disabled||o,c=pe(n,a.onTriggerChange),u=Bu(r),d=h.useRef("touch"),[f,p,m]=e2(b=>{const _=u().filter(w=>!w.disabled),y=_.find(w=>w.value===a.value),x=t2(_,b,y);x!==void 0&&a.onValueChange(x.value)}),g=b=>{l||(a.onOpenChange(!0),m()),b&&(a.triggerPointerDownPosRef.current={x:Math.round(b.pageX),y:Math.round(b.pageY)})};return v.jsx(Ca,{asChild:!0,...s,children:v.jsx(At.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":JC(a.value)?"":void 0,...i,ref:c,onClick:te(i.onClick,b=>{b.currentTarget.focus(),d.current!=="mouse"&&g(b)}),onPointerDown:te(i.onPointerDown,b=>{d.current=b.pointerType;const _=b.target;_.hasPointerCapture(b.pointerId)&&_.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&b.pointerType==="mouse"&&(g(b),b.preventDefault())}),onKeyDown:te(i.onKeyDown,b=>{const _=f.current!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&p(b.key),!(_&&b.key===" ")&&UL.includes(b.key)&&(g(),b.preventDefault())})})})});AC.displayName=jC;var TC="SelectValue",KL=h.forwardRef((e,n)=>{const{__scopeSelect:r,className:o,style:i,children:s,placeholder:a="",...l}=e,c=Lr(TC,r),{onValueNodeHasChildrenChange:u}=c,d=s!==void 0,f=pe(n,c.onValueNodeChange);return He(()=>{u(d)},[u,d]),v.jsx(At.span,{...l,ref:f,style:{pointerEvents:"none"},children:JC(c.value)?v.jsx(v.Fragment,{children:a}):s})});KL.displayName=TC;var qL="SelectIcon",IC=h.forwardRef((e,n)=>{const{__scopeSelect:r,children:o,...i}=e;return v.jsx(At.span,{"aria-hidden":!0,...i,ref:n,children:o||"▼"})});IC.displayName=qL;var ZL="SelectPortal",$C=e=>v.jsx(Ai,{asChild:!0,...e});$C.displayName=ZL;var fo="SelectContent",OC=h.forwardRef((e,n)=>{const r=Lr(fo,e.__scopeSelect),[o,i]=h.useState();if(He(()=>{i(new DocumentFragment)},[]),!r.open){const s=o;return s?xo.createPortal(v.jsx(DC,{scope:e.__scopeSelect,children:v.jsx(Fm.Slot,{scope:e.__scopeSelect,children:v.jsx("div",{children:e.children})})}),s):null}return v.jsx(LC,{...e,ref:n})});OC.displayName=fo;var Yt=10,[DC,zr]=$i(fo),QL="SelectContentImpl",JL=PC("SelectContent.RemoveScroll"),LC=h.forwardRef((e,n)=>{const{__scopeSelect:r,position:o="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:a,side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:g,hideWhenDetached:b,avoidCollisions:_,...y}=e,x=Lr(fo,r),[w,S]=h.useState(null),[C,E]=h.useState(null),k=pe(n,U=>S(U)),[N,j]=h.useState(null),[$,I]=h.useState(null),O=Bu(r),[H,R]=h.useState(!1),L=h.useRef(!1);h.useEffect(()=>{if(w)return ku(w)},[w]),Cu();const D=h.useCallback(U=>{const[Y,...K]=O().map(Q=>Q.ref.current),[ee]=K.slice(-1),J=document.activeElement;for(const Q of U)if(Q===J||(Q==null||Q.scrollIntoView({block:"nearest"}),Q===Y&&C&&(C.scrollTop=0),Q===ee&&C&&(C.scrollTop=C.scrollHeight),Q==null||Q.focus(),document.activeElement!==J))return},[O,C]),z=h.useCallback(()=>D([N,w]),[D,N,w]);h.useEffect(()=>{H&&z()},[H,z]);const{onOpenChange:A,triggerPointerDownPosRef:M}=x;h.useEffect(()=>{if(w){let U={x:0,y:0};const Y=ee=>{var J,Q;U={x:Math.abs(Math.round(ee.pageX)-(((J=M.current)==null?void 0:J.x)??0)),y:Math.abs(Math.round(ee.pageY)-(((Q=M.current)==null?void 0:Q.y)??0))}},K=ee=>{U.x<=10&&U.y<=10?ee.preventDefault():w.contains(ee.target)||A(!1),document.removeEventListener("pointermove",Y),M.current=null};return M.current!==null&&(document.addEventListener("pointermove",Y),document.addEventListener("pointerup",K,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Y),document.removeEventListener("pointerup",K,{capture:!0})}}},[w,A,M]),h.useEffect(()=>{const U=()=>A(!1);return window.addEventListener("blur",U),window.addEventListener("resize",U),()=>{window.removeEventListener("blur",U),window.removeEventListener("resize",U)}},[A]);const[P,W]=e2(U=>{const Y=O().filter(J=>!J.disabled),K=Y.find(J=>J.ref.current===document.activeElement),ee=t2(Y,U,K);ee&&setTimeout(()=>ee.ref.current.focus())}),T=h.useCallback((U,Y,K)=>{const ee=!L.current&&!K;(x.value!==void 0&&x.value===Y||ee)&&(j(U),ee&&(L.current=!0))},[x.value]),X=h.useCallback(()=>w==null?void 0:w.focus(),[w]),F=h.useCallback((U,Y,K)=>{const ee=!L.current&&!K;(x.value!==void 0&&x.value===Y||ee)&&I(U)},[x.value]),B=o==="popper"?Cp:zC,G=B===Cp?{side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:g,hideWhenDetached:b,avoidCollisions:_}:{};return v.jsx(DC,{scope:r,content:w,viewport:C,onViewportChange:E,itemRefCallback:T,selectedItem:N,onItemLeave:X,itemTextRefCallback:F,focusSelectedItem:z,selectedItemText:$,position:o,isPositioned:H,searchRef:P,children:v.jsx(xa,{as:JL,allowPinchZoom:!0,children:v.jsx(ya,{asChild:!0,trapped:x.open,onMountAutoFocus:U=>{U.preventDefault()},onUnmountAutoFocus:te(i,U=>{var Y;(Y=x.trigger)==null||Y.focus({preventScroll:!0}),U.preventDefault()}),children:v.jsx(ji,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:U=>U.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:v.jsx(B,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:U=>U.preventDefault(),...y,...G,onPlaced:()=>R(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:te(y.onKeyDown,U=>{const Y=U.ctrlKey||U.altKey||U.metaKey;if(U.key==="Tab"&&U.preventDefault(),!Y&&U.key.length===1&&W(U.key),["ArrowUp","ArrowDown","Home","End"].includes(U.key)){let ee=O().filter(J=>!J.disabled).map(J=>J.ref.current);if(["ArrowUp","End"].includes(U.key)&&(ee=ee.slice().reverse()),["ArrowUp","ArrowDown"].includes(U.key)){const J=U.target,Q=ee.indexOf(J);ee=ee.slice(Q+1)}setTimeout(()=>D(ee)),U.preventDefault()}})})})})})})});LC.displayName=QL;var e6="SelectItemAlignedPosition",zC=h.forwardRef((e,n)=>{const{__scopeSelect:r,onPlaced:o,...i}=e,s=Lr(fo,r),a=zr(fo,r),[l,c]=h.useState(null),[u,d]=h.useState(null),f=pe(n,k=>d(k)),p=Bu(r),m=h.useRef(!1),g=h.useRef(!0),{viewport:b,selectedItem:_,selectedItemText:y,focusSelectedItem:x}=a,w=h.useCallback(()=>{if(s.trigger&&s.valueNode&&l&&u&&b&&_&&y){const k=s.trigger.getBoundingClientRect(),N=u.getBoundingClientRect(),j=s.valueNode.getBoundingClientRect(),$=y.getBoundingClientRect();if(s.dir!=="rtl"){const J=$.left-N.left,Q=j.left-J,ne=k.left-Q,ce=k.width+ne,ge=Math.max(ce,N.width),fe=window.innerWidth-Yt,$e=Bv(Q,[Yt,Math.max(Yt,fe-ge)]);l.style.minWidth=ce+"px",l.style.left=$e+"px"}else{const J=N.right-$.right,Q=window.innerWidth-j.right-J,ne=window.innerWidth-k.right-Q,ce=k.width+ne,ge=Math.max(ce,N.width),fe=window.innerWidth-Yt,$e=Bv(Q,[Yt,Math.max(Yt,fe-ge)]);l.style.minWidth=ce+"px",l.style.right=$e+"px"}const I=p(),O=window.innerHeight-Yt*2,H=b.scrollHeight,R=window.getComputedStyle(u),L=parseInt(R.borderTopWidth,10),D=parseInt(R.paddingTop,10),z=parseInt(R.borderBottomWidth,10),A=parseInt(R.paddingBottom,10),M=L+D+H+A+z,P=Math.min(_.offsetHeight*5,M),W=window.getComputedStyle(b),T=parseInt(W.paddingTop,10),X=parseInt(W.paddingBottom,10),F=k.top+k.height/2-Yt,B=O-F,G=_.offsetHeight/2,U=_.offsetTop+G,Y=L+D+U,K=M-Y;if(Y<=F){const J=I.length>0&&_===I[I.length-1].ref.current;l.style.bottom="0px";const Q=u.clientHeight-b.offsetTop-b.offsetHeight,ne=Math.max(B,G+(J?X:0)+Q+z),ce=Y+ne;l.style.height=ce+"px"}else{const J=I.length>0&&_===I[0].ref.current;l.style.top="0px";const ne=Math.max(F,L+b.offsetTop+(J?T:0)+G)+K;l.style.height=ne+"px",b.scrollTop=Y-F+b.offsetTop}l.style.margin=`${Yt}px 0`,l.style.minHeight=P+"px",l.style.maxHeight=O+"px",o==null||o(),requestAnimationFrame(()=>m.current=!0)}},[p,s.trigger,s.valueNode,l,u,b,_,y,s.dir,o]);He(()=>w(),[w]);const[S,C]=h.useState();He(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const E=h.useCallback(k=>{k&&g.current===!0&&(w(),x==null||x(),g.current=!1)},[w,x]);return v.jsx(n6,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:m,onScrollButtonChange:E,children:v.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:v.jsx(At.div,{...i,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});zC.displayName=e6;var t6="SelectPopperPosition",Cp=h.forwardRef((e,n)=>{const{__scopeSelect:r,align:o="start",collisionPadding:i=Yt,...s}=e,a=Vm(r);return v.jsx($u,{...a,...s,ref:n,align:o,collisionPadding:i,style:{boxSizing:"border-box",...s.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)"}})});Cp.displayName=t6;var[n6,Bm]=$i(fo,{}),Ep="SelectViewport",FC=h.forwardRef((e,n)=>{const{__scopeSelect:r,nonce:o,...i}=e,s=zr(Ep,r),a=Bm(Ep,r),l=pe(n,s.onViewportChange),c=h.useRef(0);return v.jsxs(v.Fragment,{children:[v.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:o}),v.jsx(Fm.Slot,{scope:r,children:v.jsx(At.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:te(i.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:p}=a;if(p!=null&&p.current&&f){const m=Math.abs(c.current-d.scrollTop);if(m>0){const g=window.innerHeight-Yt*2,b=parseFloat(f.style.minHeight),_=parseFloat(f.style.height),y=Math.max(b,_);if(y<g){const x=y+m,w=Math.min(g,x),S=x-w;f.style.height=w+"px",f.style.bottom==="0px"&&(d.scrollTop=S>0?S:0,f.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});FC.displayName=Ep;var VC="SelectGroup",[r6,o6]=$i(VC),i6=h.forwardRef((e,n)=>{const{__scopeSelect:r,...o}=e,i=kt();return v.jsx(r6,{scope:r,id:i,children:v.jsx(At.div,{role:"group","aria-labelledby":i,...o,ref:n})})});i6.displayName=VC;var BC="SelectLabel",HC=h.forwardRef((e,n)=>{const{__scopeSelect:r,...o}=e,i=o6(BC,r);return v.jsx(At.div,{id:i.id,...o,ref:n})});HC.displayName=BC;var Ic="SelectItem",[s6,WC]=$i(Ic),UC=h.forwardRef((e,n)=>{const{__scopeSelect:r,value:o,disabled:i=!1,textValue:s,...a}=e,l=Lr(Ic,r),c=zr(Ic,r),u=l.value===o,[d,f]=h.useState(s??""),[p,m]=h.useState(!1),g=pe(n,x=>{var w;return(w=c.itemRefCallback)==null?void 0:w.call(c,x,o,i)}),b=kt(),_=h.useRef("touch"),y=()=>{i||(l.onValueChange(o),l.onOpenChange(!1))};if(o==="")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 v.jsx(s6,{scope:r,value:o,disabled:i,textId:b,isSelected:u,onItemTextChange:h.useCallback(x=>{f(w=>w||((x==null?void 0:x.textContent)??"").trim())},[]),children:v.jsx(Fm.ItemSlot,{scope:r,value:o,disabled:i,textValue:d,children:v.jsx(At.div,{role:"option","aria-labelledby":b,"data-highlighted":p?"":void 0,"aria-selected":u&&p,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...a,ref:g,onFocus:te(a.onFocus,()=>m(!0)),onBlur:te(a.onBlur,()=>m(!1)),onClick:te(a.onClick,()=>{_.current!=="mouse"&&y()}),onPointerUp:te(a.onPointerUp,()=>{_.current==="mouse"&&y()}),onPointerDown:te(a.onPointerDown,x=>{_.current=x.pointerType}),onPointerMove:te(a.onPointerMove,x=>{var w;_.current=x.pointerType,i?(w=c.onItemLeave)==null||w.call(c):_.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:te(a.onPointerLeave,x=>{var w;x.currentTarget===document.activeElement&&((w=c.onItemLeave)==null||w.call(c))}),onKeyDown:te(a.onKeyDown,x=>{var S;((S=c.searchRef)==null?void 0:S.current)!==""&&x.key===" "||(GL.includes(x.key)&&y(),x.key===" "&&x.preventDefault())})})})})});UC.displayName=Ic;var us="SelectItemText",GC=h.forwardRef((e,n)=>{const{__scopeSelect:r,className:o,style:i,...s}=e,a=Lr(us,r),l=zr(us,r),c=WC(us,r),u=XL(us,r),[d,f]=h.useState(null),p=pe(n,y=>f(y),c.onItemTextChange,y=>{var x;return(x=l.itemTextRefCallback)==null?void 0:x.call(l,y,c.value,c.disabled)}),m=d==null?void 0:d.textContent,g=h.useMemo(()=>v.jsx("option",{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:b,onNativeOptionRemove:_}=u;return He(()=>(b(g),()=>_(g)),[b,_,g]),v.jsxs(v.Fragment,{children:[v.jsx(At.span,{id:c.textId,...s,ref:p}),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren?xo.createPortal(s.children,a.valueNode):null]})});GC.displayName=us;var YC="SelectItemIndicator",XC=h.forwardRef((e,n)=>{const{__scopeSelect:r,...o}=e;return WC(YC,r).isSelected?v.jsx(At.span,{"aria-hidden":!0,...o,ref:n}):null});XC.displayName=YC;var kp="SelectScrollUpButton",KC=h.forwardRef((e,n)=>{const r=zr(kp,e.__scopeSelect),o=Bm(kp,e.__scopeSelect),[i,s]=h.useState(!1),a=pe(n,o.onScrollButtonChange);return He(()=>{if(r.viewport&&r.isPositioned){let l=function(){const u=c.scrollTop>0;s(u)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),i?v.jsx(ZC,{...e,ref:a,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});KC.displayName=kp;var Np="SelectScrollDownButton",qC=h.forwardRef((e,n)=>{const r=zr(Np,e.__scopeSelect),o=Bm(Np,e.__scopeSelect),[i,s]=h.useState(!1),a=pe(n,o.onScrollButtonChange);return He(()=>{if(r.viewport&&r.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<u;s(d)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),i?v.jsx(ZC,{...e,ref:a,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});qC.displayName=Np;var ZC=h.forwardRef((e,n)=>{const{__scopeSelect:r,onAutoScroll:o,...i}=e,s=zr("SelectScrollButton",r),a=h.useRef(null),l=Bu(r),c=h.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return h.useEffect(()=>()=>c(),[c]),He(()=>{var d;const u=l().find(f=>f.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[l]),v.jsx(At.div,{"aria-hidden":!0,...i,ref:n,style:{flexShrink:0,...i.style},onPointerDown:te(i.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(o,50))}),onPointerMove:te(i.onPointerMove,()=>{var u;(u=s.onItemLeave)==null||u.call(s),a.current===null&&(a.current=window.setInterval(o,50))}),onPointerLeave:te(i.onPointerLeave,()=>{c()})})}),a6="SelectSeparator",QC=h.forwardRef((e,n)=>{const{__scopeSelect:r,...o}=e;return v.jsx(At.div,{"aria-hidden":!0,...o,ref:n})});QC.displayName=a6;var Pp="SelectArrow",l6=h.forwardRef((e,n)=>{const{__scopeSelect:r,...o}=e,i=Vm(r),s=Lr(Pp,r),a=zr(Pp,r);return s.open&&a.position==="popper"?v.jsx(Ou,{...i,...o,ref:n}):null});l6.displayName=Pp;var c6="SelectBubbleInput",u6=h.forwardRef(({__scopeSelect:e,value:n,...r},o)=>{const i=h.useRef(null),s=pe(o,i),a=fm(n);return h.useEffect(()=>{const l=i.current;if(!l)return;const c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==n&&d){const f=new Event("change",{bubbles:!0});d.call(l,n),l.dispatchEvent(f)}},[a,n]),v.jsx(At.select,{...r,style:{...RC,...r.style},ref:s,defaultValue:n})});u6.displayName=c6;function JC(e){return e===""||e===void 0}function e2(e){const n=_n(e),r=h.useRef(""),o=h.useRef(0),i=h.useCallback(a=>{const l=r.current+a;n(l),function c(u){r.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>c(""),1e3))}(l)},[n]),s=h.useCallback(()=>{r.current="",window.clearTimeout(o.current)},[]);return h.useEffect(()=>()=>window.clearTimeout(o.current),[]),[r,i,s]}function t2(e,n,r){const i=n.length>1&&Array.from(n).every(u=>u===n[0])?n[0]:n,s=r?e.indexOf(r):-1;let a=f6(e,Math.max(s,0));i.length===1&&(a=a.filter(u=>u!==r));const c=a.find(u=>u.textValue.toLowerCase().startsWith(i.toLowerCase()));return c!==r?c:void 0}function f6(e,n){return e.map((r,o)=>e[(n+o)%e.length])}var n2=AC,d6=IC,p6=$C,r2=OC,h6=FC,o2=HC,i2=UC,m6=GC,g6=XC,s2=KC,a2=qC,l2=QC;const y6=h.forwardRef(({className:e,children:n,...r},o)=>v.jsxs(n2,{ref:o,className:se("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-transparent bg-input px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground/50 data-[placeholder]:font-light focus:outline-none focus:border-ring focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[n,v.jsx(d6,{asChild:!0,children:v.jsx(Ub,{className:"h-4 w-4 opacity-50"})})]}));y6.displayName=n2.displayName;const c2=h.forwardRef(({className:e,...n},r)=>v.jsx(s2,{ref:r,className:se("flex cursor-default items-center justify-center py-1",e),...n,children:v.jsx(NT,{className:"h-4 w-4"})}));c2.displayName=s2.displayName;const u2=h.forwardRef(({className:e,...n},r)=>v.jsx(a2,{ref:r,className:se("flex cursor-default items-center justify-center py-1",e),...n,children:v.jsx(Ub,{className:"h-4 w-4"})}));u2.displayName=a2.displayName;const v6=h.forwardRef(({className:e,children:n,position:r="popper",...o},i)=>v.jsx(p6,{children:v.jsxs(r2,{ref:i,className:se("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]",r==="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:r,...o,children:[v.jsx(c2,{}),v.jsx(h6,{className:se("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),v.jsx(u2,{})]})}));v6.displayName=r2.displayName;const x6=h.forwardRef(({className:e,...n},r)=>v.jsx(o2,{ref:r,className:se("px-2 py-1.5 text-sm font-semibold",e),...n}));x6.displayName=o2.displayName;const w6=h.forwardRef(({className:e,children:n,...r},o)=>v.jsxs(i2,{ref:o,className:se("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),...r,children:[v.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:v.jsx(g6,{children:v.jsx(lm,{className:"h-4 w-4"})})}),v.jsx(m6,{children:n})]}));w6.displayName=i2.displayName;const b6=h.forwardRef(({className:e,...n},r)=>v.jsx(l2,{ref:r,className:se("-mx-1 my-1 h-px bg-muted",e),...n}));b6.displayName=l2.displayName;var _6="Separator",Hv="horizontal",S6=["horizontal","vertical"],f2=h.forwardRef((e,n)=>{const{decorative:r,orientation:o=Hv,...i}=e,s=C6(o)?o:Hv,l=r?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return v.jsx(lt.div,{"data-orientation":s,...l,...i,ref:n})});f2.displayName=_6;function C6(e){return S6.includes(e)}var d2=f2;const E6=h.forwardRef(({className:e,orientation:n="horizontal",decorative:r=!0,...o},i)=>v.jsx(d2,{ref:i,decorative:r,orientation:n,className:se("shrink-0 bg-border",n==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));E6.displayName=d2.displayName;const k6=xm,p2=h.forwardRef(({className:e,...n},r)=>v.jsx(wa,{className:se("fixed inset-0 z-50 bg-black/80 [will-change:opacity] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n,ref:r}));p2.displayName=wa.displayName;const N6=sm("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out [will-change:transform,opacity] 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"}}),P6=h.forwardRef(({side:e="right",className:n,children:r,...o},i)=>v.jsxs(k6,{children:[v.jsx(p2,{}),v.jsxs(ba,{ref:i,className:se(N6({side:e}),n),...o,children:[v.jsxs(j_,{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:[v.jsx(Ec,{className:"h-4 w-4"}),v.jsx("span",{className:"sr-only",children:"Close"})]}),r]})]}));P6.displayName=ba.displayName;const R6=h.forwardRef(({className:e,...n},r)=>v.jsx(Pu,{ref:r,className:se("text-lg font-semibold text-foreground",e),...n}));R6.displayName=Pu.displayName;const M6=h.forwardRef(({className:e,...n},r)=>v.jsx(Ru,{ref:r,className:se("text-sm text-muted-foreground",e),...n}));M6.displayName=Ru.displayName;function j6(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=f=>{var y;const{scope:p,children:m,...g}=f,b=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,_=h.useMemo(()=>g,Object.values(g));return v.jsx(b.Provider,{value:_,children:m})};u.displayName=s+"Provider";function d(f,p){var b;const m=((b=p==null?void 0:p[e])==null?void 0:b[c])||l,g=h.useContext(m);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,A6(i,...n)]}function A6(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const f=c(s)[`__scope${u}`];return{...l,...f}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function T6(e){const n=I6(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(O6);if(c){const u=c.props.children,d=l.map(f=>f===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:f);return v.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,d):null})}return v.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function I6(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=L6(i),l=D6(s,i.props);return i.type!==h.Fragment&&(l.ref=o?_e(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var $6=Symbol("radix.slottable");function O6(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===$6}function D6(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function L6(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var z6=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],h2=z6.reduce((e,n)=>{const r=T6(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),Hu="Switch",[F6]=j6(Hu),[V6,B6]=F6(Hu),m2=h.forwardRef((e,n)=>{const{__scopeSwitch:r,name:o,checked:i,defaultChecked:s,required:a,disabled:l,value:c="on",onCheckedChange:u,form:d,...f}=e,[p,m]=h.useState(null),g=pe(n,w=>m(w)),b=h.useRef(!1),_=p?d||!!p.closest("form"):!0,[y,x]=ga({prop:i,defaultProp:s??!1,onChange:u,caller:Hu});return v.jsxs(V6,{scope:r,checked:y,disabled:l,children:[v.jsx(h2.button,{type:"button",role:"switch","aria-checked":y,"aria-required":a,"data-state":x2(y),"data-disabled":l?"":void 0,disabled:l,value:c,...f,ref:g,onClick:te(e.onClick,w=>{x(S=>!S),_&&(b.current=w.isPropagationStopped(),b.current||w.stopPropagation())})}),_&&v.jsx(v2,{control:p,bubbles:!b.current,name:o,value:c,checked:y,required:a,disabled:l,form:d,style:{transform:"translateX(-100%)"}})]})});m2.displayName=Hu;var g2="SwitchThumb",y2=h.forwardRef((e,n)=>{const{__scopeSwitch:r,...o}=e,i=B6(g2,r);return v.jsx(h2.span,{"data-state":x2(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:n})});y2.displayName=g2;var H6="SwitchBubbleInput",v2=h.forwardRef(({__scopeSwitch:e,control:n,checked:r,bubbles:o=!0,...i},s)=>{const a=h.useRef(null),l=pe(a,s),c=fm(r),u=dm(n);return h.useEffect(()=>{const d=a.current;if(!d)return;const f=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(f,"checked").set;if(c!==r&&m){const g=new Event("click",{bubbles:o});m.call(d,r),d.dispatchEvent(g)}},[c,r,o]),v.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...i,tabIndex:-1,ref:l,style:{...i.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});v2.displayName=H6;function x2(e){return e?"checked":"unchecked"}var w2=m2,W6=y2;const U6=h.forwardRef(({className:e,...n},r)=>v.jsx(w2,{ref:r,className:se("peer inline-flex h-4 w-7 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...n,children:v.jsx(W6,{className:se("pointer-events-none block h-3 w-3 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-3 data-[state=unchecked]:translate-x-0")})}));U6.displayName=w2.displayName;function G6(e){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}Array(12).fill(0);let Rp=1;class Y6{constructor(){this.subscribe=n=>(this.subscribers.push(n),()=>{const r=this.subscribers.indexOf(n);this.subscribers.splice(r,1)}),this.publish=n=>{this.subscribers.forEach(r=>r(n))},this.addToast=n=>{this.publish(n),this.toasts=[...this.toasts,n]},this.create=n=>{var r;const{message:o,...i}=n,s=typeof(n==null?void 0:n.id)=="number"||((r=n.id)==null?void 0:r.length)>0?n.id:Rp++,a=this.toasts.find(c=>c.id===s),l=n.dismissible===void 0?!0:n.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),a?this.toasts=this.toasts.map(c=>c.id===s?(this.publish({...c,...n,id:s,title:o}),{...c,...n,id:s,dismissible:l,title:o}):c):this.addToast({title:o,...i,dismissible:l,id:s}),s},this.dismiss=n=>(n?(this.dismissedToasts.add(n),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:n,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(o=>o({id:r.id,dismiss:!0}))}),n),this.message=(n,r)=>this.create({...r,message:n}),this.error=(n,r)=>this.create({...r,message:n,type:"error"}),this.success=(n,r)=>this.create({...r,type:"success",message:n}),this.info=(n,r)=>this.create({...r,type:"info",message:n}),this.warning=(n,r)=>this.create({...r,type:"warning",message:n}),this.loading=(n,r)=>this.create({...r,type:"loading",message:n}),this.promise=(n,r)=>{if(!r)return;let o;r.loading!==void 0&&(o=this.create({...r,promise:n,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const i=Promise.resolve(n instanceof Function?n():n);let s=o!==void 0,a;const l=i.then(async u=>{if(a=["resolve",u],Je.isValidElement(u))s=!1,this.create({id:o,type:"default",message:u});else if(K6(u)&&!u.ok){s=!1;const f=typeof r.error=="function"?await r.error(`HTTP error! status: ${u.status}`):r.error,p=typeof r.description=="function"?await r.description(`HTTP error! status: ${u.status}`):r.description,g=typeof f=="object"&&!Je.isValidElement(f)?f:{message:f};this.create({id:o,type:"error",description:p,...g})}else if(u instanceof Error){s=!1;const f=typeof r.error=="function"?await r.error(u):r.error,p=typeof r.description=="function"?await r.description(u):r.description,g=typeof f=="object"&&!Je.isValidElement(f)?f:{message:f};this.create({id:o,type:"error",description:p,...g})}else if(r.success!==void 0){s=!1;const f=typeof r.success=="function"?await r.success(u):r.success,p=typeof r.description=="function"?await r.description(u):r.description,g=typeof f=="object"&&!Je.isValidElement(f)?f:{message:f};this.create({id:o,type:"success",description:p,...g})}}).catch(async u=>{if(a=["reject",u],r.error!==void 0){s=!1;const d=typeof r.error=="function"?await r.error(u):r.error,f=typeof r.description=="function"?await r.description(u):r.description,m=typeof d=="object"&&!Je.isValidElement(d)?d:{message:d};this.create({id:o,type:"error",description:f,...m})}}).finally(()=>{s&&(this.dismiss(o),o=void 0),r.finally==null||r.finally.call(r)}),c=()=>new Promise((u,d)=>l.then(()=>a[0]==="reject"?d(a[1]):u(a[1])).catch(d));return typeof o!="string"&&typeof o!="number"?{unwrap:c}:Object.assign(o,{unwrap:c})},this.custom=(n,r)=>{const o=(r==null?void 0:r.id)||Rp++;return this.create({jsx:n(o),id:o,...r}),o},this.getActiveToasts=()=>this.toasts.filter(n=>!this.dismissedToasts.has(n.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const $t=new Y6,X6=(e,n)=>{const r=(n==null?void 0:n.id)||Rp++;return $t.addToast({title:e,...n,id:r}),r},K6=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",q6=X6,Z6=()=>$t.toasts,Q6=()=>$t.getActiveToasts();Object.assign(q6,{success:$t.success,info:$t.info,warning:$t.warning,error:$t.error,custom:$t.custom,message:$t.message,promise:$t.promise,dismiss:$t.dismiss,loading:$t.loading},{getHistory:Z6,getToasts:Q6});G6("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function J6(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=f=>{var y;const{scope:p,children:m,...g}=f,b=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,_=h.useMemo(()=>g,Object.values(g));return v.jsx(b.Provider,{value:_,children:m})};u.displayName=s+"Provider";function d(f,p){var b;const m=((b=p==null?void 0:p[e])==null?void 0:b[c])||l,g=h.useContext(m);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,ez(i,...n)]}function ez(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const f=c(s)[`__scope${u}`];return{...l,...f}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function tz(e){const n=nz(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(oz);if(c){const u=c.props.children,d=l.map(f=>f===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:f);return v.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,d):null})}return v.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function nz(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=sz(i),l=iz(s,i.props);return i.type!==h.Fragment&&(l.ref=o?_e(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var rz=Symbol("radix.slottable");function oz(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===rz}function iz(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function sz(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var az=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Wu=az.reduce((e,n)=>{const r=tz(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),Uu="Tabs",[lz]=J6(Uu,[Du]),b2=Du(),[cz,Hm]=lz(Uu),uz=h.forwardRef((e,n)=>{const{__scopeTabs:r,value:o,onValueChange:i,defaultValue:s,orientation:a="horizontal",dir:l,activationMode:c="automatic",...u}=e,d=F_(l),[f,p]=ga({prop:o,onChange:i,defaultProp:s??"",caller:Uu});return v.jsx(cz,{scope:r,baseId:kt(),value:f,onValueChange:p,orientation:a,dir:d,activationMode:c,children:v.jsx(Wu.div,{dir:d,"data-orientation":a,...u,ref:n})})});uz.displayName=Uu;var _2="TabsList",S2=h.forwardRef((e,n)=>{const{__scopeTabs:r,loop:o=!0,...i}=e,s=Hm(_2,r),a=b2(r);return v.jsx(gS,{asChild:!0,...a,orientation:s.orientation,dir:s.dir,loop:o,children:v.jsx(Wu.div,{role:"tablist","aria-orientation":s.orientation,...i,ref:n})})});S2.displayName=_2;var C2="TabsTrigger",E2=h.forwardRef((e,n)=>{const{__scopeTabs:r,value:o,disabled:i=!1,...s}=e,a=Hm(C2,r),l=b2(r),c=P2(a.baseId,o),u=R2(a.baseId,o),d=o===a.value;return v.jsx(yS,{asChild:!0,...l,focusable:!i,active:d,children:v.jsx(Wu.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:c,...s,ref:n,onMouseDown:te(e.onMouseDown,f=>{!i&&f.button===0&&f.ctrlKey===!1?a.onValueChange(o):f.preventDefault()}),onKeyDown:te(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&a.onValueChange(o)}),onFocus:te(e.onFocus,()=>{const f=a.activationMode!=="manual";!d&&!i&&f&&a.onValueChange(o)})})})});E2.displayName=C2;var k2="TabsContent",N2=h.forwardRef((e,n)=>{const{__scopeTabs:r,value:o,forceMount:i,children:s,...a}=e,l=Hm(k2,r),c=P2(l.baseId,o),u=R2(l.baseId,o),d=o===l.value,f=h.useRef(d);return h.useEffect(()=>{const p=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(p)},[]),v.jsx(yt,{present:i||d,children:({present:p})=>v.jsx(Wu.div,{"data-state":d?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!p,id:u,tabIndex:0,...a,ref:n,style:{...e.style,animationDuration:f.current?"0s":void 0},children:p&&s})})});N2.displayName=k2;function P2(e,n){return`${e}-trigger-${n}`}function R2(e,n){return`${e}-content-${n}`}var M2=S2,j2=E2,A2=N2;const fz=h.forwardRef(({className:e,...n},r)=>v.jsx(M2,{ref:r,className:se("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...n}));fz.displayName=M2.displayName;const dz=h.forwardRef(({className:e,...n},r)=>v.jsx(j2,{ref:r,className:se("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-primary/10 data-[state=active]:text-primary data-[state=active]:shadow-sm",e),...n}));dz.displayName=j2.displayName;const pz=h.forwardRef(({className:e,...n},r)=>v.jsx(A2,{ref:r,className:se("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...n}));pz.displayName=A2.displayName;const hz=h.forwardRef(({className:e,...n},r)=>v.jsx("textarea",{className:se("flex min-h-[60px] w-full rounded-md border border-transparent bg-input px-3 py-2 text-base placeholder:text-muted-foreground/50 placeholder:font-light focus-visible:outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));hz.displayName="Textarea";function mz(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=f=>{var y;const{scope:p,children:m,...g}=f,b=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,_=h.useMemo(()=>g,Object.values(g));return v.jsx(b.Provider,{value:_,children:m})};u.displayName=s+"Provider";function d(f,p){var b;const m=((b=p==null?void 0:p[e])==null?void 0:b[c])||l,g=h.useContext(m);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,gz(i,...n)]}function gz(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const f=c(s)[`__scope${u}`];return{...l,...f}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function yz(e){const n=vz(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(wz);if(c){const u=c.props.children,d=l.map(f=>f===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:f);return v.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,d):null})}return v.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function vz(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=_z(i),l=bz(s,i.props);return i.type!==h.Fragment&&(l.ref=o?_e(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var T2=Symbol("radix.slottable");function xz(e){const n=({children:r})=>v.jsx(v.Fragment,{children:r});return n.displayName=`${e}.Slottable`,n.__radixId=T2,n}function wz(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===T2}function bz(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function _z(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Sz=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Cz=Sz.reduce((e,n)=>{const r=yz(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),[Gu]=mz("Tooltip",[Or]),Wm=Or(),Ez="TooltipProvider",Wv="tooltip.open",[qX,I2]=Gu(Ez),$2="Tooltip",[ZX,Pa]=Gu($2),Mp="TooltipTrigger",kz=h.forwardRef((e,n)=>{const{__scopeTooltip:r,...o}=e,i=Pa(Mp,r),s=I2(Mp,r),a=Wm(r),l=h.useRef(null),c=pe(n,l,i.onTriggerChange),u=h.useRef(!1),d=h.useRef(!1),f=h.useCallback(()=>u.current=!1,[]);return h.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),v.jsx(Ca,{asChild:!0,...a,children:v.jsx(Cz.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...o,ref:c,onPointerMove:te(e.onPointerMove,p=>{p.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(i.onTriggerEnter(),d.current=!0)}),onPointerLeave:te(e.onPointerLeave,()=>{i.onTriggerLeave(),d.current=!1}),onPointerDown:te(e.onPointerDown,()=>{i.open&&i.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:te(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:te(e.onBlur,i.onClose),onClick:te(e.onClick,i.onClose)})})});kz.displayName=Mp;var Um="TooltipPortal",[Nz,Pz]=Gu(Um,{forceMount:void 0}),O2=e=>{const{__scopeTooltip:n,forceMount:r,children:o,container:i}=e,s=Pa(Um,n);return v.jsx(Nz,{scope:n,forceMount:r,children:v.jsx(yt,{present:r||s.open,children:v.jsx(Ai,{asChild:!0,container:i,children:o})})})};O2.displayName=Um;var gi="TooltipContent",D2=h.forwardRef((e,n)=>{const r=Pz(gi,e.__scopeTooltip),{forceMount:o=r.forceMount,side:i="top",...s}=e,a=Pa(gi,e.__scopeTooltip);return v.jsx(yt,{present:o||a.open,children:a.disableHoverableContent?v.jsx(L2,{side:i,...s,ref:n}):v.jsx(Rz,{side:i,...s,ref:n})})}),Rz=h.forwardRef((e,n)=>{const r=Pa(gi,e.__scopeTooltip),o=I2(gi,e.__scopeTooltip),i=h.useRef(null),s=pe(n,i),[a,l]=h.useState(null),{trigger:c,onClose:u}=r,d=i.current,{onPointerInTransitChange:f}=o,p=h.useCallback(()=>{l(null),f(!1)},[f]),m=h.useCallback((g,b)=>{const _=g.currentTarget,y={x:g.clientX,y:g.clientY},x=Iz(y,_.getBoundingClientRect()),w=$z(y,x),S=Oz(b.getBoundingClientRect()),C=Lz([...w,...S]);l(C),f(!0)},[f]);return h.useEffect(()=>()=>p(),[p]),h.useEffect(()=>{if(c&&d){const g=_=>m(_,d),b=_=>m(_,c);return c.addEventListener("pointerleave",g),d.addEventListener("pointerleave",b),()=>{c.removeEventListener("pointerleave",g),d.removeEventListener("pointerleave",b)}}},[c,d,m,p]),h.useEffect(()=>{if(a){const g=b=>{const _=b.target,y={x:b.clientX,y:b.clientY},x=(c==null?void 0:c.contains(_))||(d==null?void 0:d.contains(_)),w=!Dz(y,a);x?p():w&&(p(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[c,d,a,u,p]),v.jsx(L2,{...e,ref:s})}),[Mz,jz]=Gu($2,{isInside:!1}),Az=xz("TooltipContent"),L2=h.forwardRef((e,n)=>{const{__scopeTooltip:r,children:o,"aria-label":i,onEscapeKeyDown:s,onPointerDownOutside:a,...l}=e,c=Pa(gi,r),u=Wm(r),{onClose:d}=c;return h.useEffect(()=>(document.addEventListener(Wv,d),()=>document.removeEventListener(Wv,d)),[d]),h.useEffect(()=>{if(c.trigger){const f=p=>{const m=p.target;m!=null&&m.contains(c.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,d]),v.jsx(ji,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:v.jsxs($u,{"data-state":c.stateAttribute,...u,...l,ref:n,style:{...l.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:[v.jsx(Az,{children:o}),v.jsx(Mz,{scope:r,isInside:!0,children:v.jsx(WL,{id:c.contentId,role:"tooltip",children:i||o})})]})})});D2.displayName=gi;var z2="TooltipArrow",Tz=h.forwardRef((e,n)=>{const{__scopeTooltip:r,...o}=e,i=Wm(r);return jz(z2,r).isInside?null:v.jsx(Ou,{...i,...o,ref:n})});Tz.displayName=z2;function Iz(e,n){const r=Math.abs(n.top-e.y),o=Math.abs(n.bottom-e.y),i=Math.abs(n.right-e.x),s=Math.abs(n.left-e.x);switch(Math.min(r,o,i,s)){case s:return"left";case i:return"right";case r:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function $z(e,n,r=5){const o=[];switch(n){case"top":o.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":o.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":o.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":o.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return o}function Oz(e){const{top:n,right:r,bottom:o,left:i}=e;return[{x:i,y:n},{x:r,y:n},{x:r,y:o},{x:i,y:o}]}function Dz(e,n){const{x:r,y:o}=e;let i=!1;for(let s=0,a=n.length-1;s<n.length;a=s++){const l=n[s],c=n[a],u=l.x,d=l.y,f=c.x,p=c.y;d>o!=p>o&&r<(f-u)*(o-d)/(p-d)+u&&(i=!i)}return i}function Lz(e){const n=e.slice();return n.sort((r,o)=>r.x<o.x?-1:r.x>o.x?1:r.y<o.y?-1:r.y>o.y?1:0),zz(n)}function zz(e){if(e.length<=1)return e.slice();const n=[];for(let o=0;o<e.length;o++){const i=e[o];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(i.y-a.y)>=(s.y-a.y)*(i.x-a.x))n.pop();else break}n.push(i)}n.pop();const r=[];for(let o=e.length-1;o>=0;o--){const i=e[o];for(;r.length>=2;){const s=r[r.length-1],a=r[r.length-2];if((s.x-a.x)*(i.y-a.y)>=(s.y-a.y)*(i.x-a.x))r.pop();else break}r.push(i)}return r.pop(),n.length===1&&r.length===1&&n[0].x===r[0].x&&n[0].y===r[0].y?n:n.concat(r)}var Fz=O2,F2=D2;const Vz=h.forwardRef(({className:e,sideOffset:n=4,...r},o)=>v.jsx(Fz,{children:v.jsx(F2,{ref:o,sideOffset:n,className:se("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),...r})}));Vz.displayName=F2.displayName;function Bz(){const{setTheme:e,resolvedTheme:n}=qj();return v.jsxs(Xb,{variant:"ghost",size:"icon",className:"relative h-8 w-8",onClick:()=>e(n==="dark"?"light":"dark"),children:[v.jsx(o3,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),v.jsx(WT,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),v.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}function Hz(){return v.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[v.jsx("circle",{cx:"6",cy:"6",r:"2.5"}),v.jsx("circle",{cx:"18",cy:"6",r:"2.5"}),v.jsx("circle",{cx:"12",cy:"14",r:"2.5"}),v.jsx("circle",{cx:"6",cy:"20",r:"1.8"}),v.jsx("circle",{cx:"18",cy:"20",r:"1.8"}),v.jsx("path",{d:"M7.6 7.6 10.7 12.5"}),v.jsx("path",{d:"M16.4 7.6 13.3 12.5"}),v.jsx("path",{d:"M10.5 15.5 7.2 19"}),v.jsx("path",{d:"M13.5 15.5 16.8 19"})]})}function Wz(){return v.jsxs("header",{className:"sticky top-0 z-40 flex h-[var(--header-height)] items-center border-b bg-background/80 px-4 shadow-sm backdrop-blur-md",children:[v.jsxs("span",{className:"logo",children:[v.jsx("span",{className:"logo-icon",children:v.jsx(Hz,{})}),v.jsx("span",{className:"logo-text",children:"LaunchChart"})]}),v.jsx("div",{className:"ml-auto flex items-center gap-2",children:v.jsx(Bz,{})})]})}const Uz=[{to:"/overview",label:"Overview",icon:VT},{to:"/modules",label:"Modules",icon:am},{to:"/journeys",label:"User Journeys",icon:ZT},{to:"/project-graph",label:"Project Graph",icon:GT},{to:"/settings",label:"Settings",icon:Yb}],Gz="sidebar-nav-item active relative flex items-center gap-3 overflow-hidden rounded-lg px-3 py-1.5 text-sm bg-gradient-to-r from-sidebar-primary/20 via-transparent via-80% to-transparent font-medium text-sidebar-foreground before:absolute before:left-0 before:top-0 before:h-full before:w-[3px] before:rounded-full before:bg-sidebar-primary",Yz="sidebar-nav-item relative flex w-full items-center gap-3 overflow-hidden rounded-lg px-3 py-1.5 text-sm font-normal text-sidebar-muted-foreground transition-colors duration-200 hover:text-sidebar-foreground bg-transparent border-none cursor-pointer";function Xz(){return v.jsx("aside",{className:"hidden lg:flex lg:flex-col w-[var(--sidebar-width)] sidebar-gradient",children:v.jsx("nav",{className:"flex-1 overflow-y-auto px-3 py-4",children:v.jsx("ul",{className:"space-y-1",children:Uz.map(e=>{const n=e.icon;return v.jsx("li",{children:v.jsxs(Gj,{to:e.to,className:({isActive:r})=>r?Gz:Yz,children:[v.jsx(n,{className:"h-4 w-4 shrink-0"}),e.label]})},e.to)})})})})}function Kz(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var o,i,s,a,l=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,n===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(o=s.call(r)).done)&&(l.push(o.value),l.length!==n);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}function qz(e,n,r){return n=o8(n),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function Uv(e,n){return Jz(e)||Kz(e,n)||V2(e,n)||n8()}function Zz(e){return Qz(e)||e8(e)||V2(e)||t8()}function Qz(e){if(Array.isArray(e))return jp(e)}function Jz(e){if(Array.isArray(e))return e}function e8(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function V2(e,n){if(e){if(typeof e=="string")return jp(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return jp(e,n)}}function jp(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,o=new Array(n);r<n;r++)o[r]=e[r];return o}function t8(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
320
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function n8(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
321
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function r8(e,n){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,n);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function o8(e){var n=r8(e,"string");return typeof n=="symbol"?n:String(n)}var i8=function(n,r){var o=new Set(r);return Object.assign.apply(Object,[{}].concat(Zz(Object.entries(n).filter(function(i){var s=Uv(i,1),a=s[0];return!o.has(a)}).map(function(i){var s=Uv(i,2),a=s[0],l=s[1];return qz({},a,l)}))))};function Ap(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,o=Array(n);r<n;r++)o[r]=e[r];return o}function s8(e){if(Array.isArray(e))return e}function a8(e){if(Array.isArray(e))return Ap(e)}function l8(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function c8(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var o,i,s,a,l=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,n!==0)for(;!(c=(o=s.call(r)).done)&&(l.push(o.value),l.length!==n);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}function u8(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
322
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f8(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
323
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d8(e,n){return s8(e)||c8(e,n)||B2(e,n)||u8()}function Gv(e){return a8(e)||l8(e)||B2(e)||f8()}function B2(e,n){if(e){if(typeof e=="string")return Ap(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ap(e,n):void 0}}function p8(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.wrapperElementType,o=r===void 0?"div":r,i=n.nodeMapper,s=i===void 0?function(d){return d}:i,a=n.methodNames,l=a===void 0?[]:a,c=n.initPropNames,u=c===void 0?[]:c;return h.forwardRef(function(d,f){var p=h.useRef(),m=h.useMemo(function(){var _=Object.fromEntries(u.filter(function(y){return d.hasOwnProperty(y)}).map(function(y){return[y,d[y]]}));return e(_)},[]);Yv(function(){m(s(p.current))},h.useLayoutEffect),Yv(function(){return m._destructor instanceof Function?m._destructor:void 0});var g=h.useCallback(function(_){for(var y=arguments.length,x=new Array(y>1?y-1:0),w=1;w<y;w++)x[w-1]=arguments[w];return m[_]instanceof Function?m[_].apply(m,x):void 0},[m]),b=h.useRef({});return Object.keys(i8(d,[].concat(Gv(l),Gv(u)))).filter(function(_){return b.current[_]!==d[_]}).forEach(function(_){return g(_,d[_])}),b.current=d,h.useImperativeHandle(f,function(){return Object.fromEntries(l.map(function(_){return[_,function(){for(var y=arguments.length,x=new Array(y),w=0;w<y;w++)x[w]=arguments[w];return g.apply(void 0,[_].concat(x))}]}))},[g]),Je.createElement(o,{ref:p})})}function Yv(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:h.useEffect,r=h.useRef(),o=h.useRef(!1),i=h.useRef(!1),s=h.useState(0),a=d8(s,2);a[0];var l=a[1];o.current&&(i.current=!0),n(function(){return o.current||(r.current=e(),o.current=!0),l(function(c){return c+1}),function(){i.current&&r.current&&r.current()}},[])}var Tp="http://www.w3.org/1999/xhtml";const Xv={svg:"http://www.w3.org/2000/svg",xhtml:Tp,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Yu(e){var n=e+="",r=n.indexOf(":");return r>=0&&(n=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Xv.hasOwnProperty(n)?{space:Xv[n],local:e}:e}function h8(e){return function(){var n=this.ownerDocument,r=this.namespaceURI;return r===Tp&&n.documentElement.namespaceURI===Tp?n.createElement(e):n.createElementNS(r,e)}}function m8(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function H2(e){var n=Yu(e);return(n.local?m8:h8)(n)}function g8(){}function Gm(e){return e==null?g8:function(){return this.querySelector(e)}}function y8(e){typeof e!="function"&&(e=Gm(e));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,d=0;d<a;++d)(c=s[d])&&(u=e.call(c,c.__data__,d,s))&&("__data__"in c&&(u.__data__=c.__data__),l[d]=u);return new Rt(o,this._parents)}function v8(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function x8(){return[]}function W2(e){return e==null?x8:function(){return this.querySelectorAll(e)}}function w8(e){return function(){return v8(e.apply(this,arguments))}}function b8(e){typeof e=="function"?e=w8(e):e=W2(e);for(var n=this._groups,r=n.length,o=[],i=[],s=0;s<r;++s)for(var a=n[s],l=a.length,c,u=0;u<l;++u)(c=a[u])&&(o.push(e.call(c,c.__data__,u,a)),i.push(c));return new Rt(o,i)}function U2(e){return function(){return this.matches(e)}}function G2(e){return function(n){return n.matches(e)}}var _8=Array.prototype.find;function S8(e){return function(){return _8.call(this.children,e)}}function C8(){return this.firstElementChild}function E8(e){return this.select(e==null?C8:S8(typeof e=="function"?e:G2(e)))}var k8=Array.prototype.filter;function N8(){return Array.from(this.children)}function P8(e){return function(){return k8.call(this.children,e)}}function R8(e){return this.selectAll(e==null?N8:P8(typeof e=="function"?e:G2(e)))}function M8(e){typeof e!="function"&&(e=U2(e));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]=[],c,u=0;u<a;++u)(c=s[u])&&e.call(c,c.__data__,u,s)&&l.push(c);return new Rt(o,this._parents)}function Y2(e){return new Array(e.length)}function j8(){return new Rt(this._enter||this._groups.map(Y2),this._parents)}function $c(e,n){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=n}$c.prototype={constructor:$c,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,n){return this._parent.insertBefore(e,n)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function A8(e){return function(){return e}}function T8(e,n,r,o,i,s){for(var a=0,l,c=n.length,u=s.length;a<u;++a)(l=n[a])?(l.__data__=s[a],o[a]=l):r[a]=new $c(e,s[a]);for(;a<c;++a)(l=n[a])&&(i[a]=l)}function I8(e,n,r,o,i,s,a){var l,c,u=new Map,d=n.length,f=s.length,p=new Array(d),m;for(l=0;l<d;++l)(c=n[l])&&(p[l]=m=a.call(c,c.__data__,l,n)+"",u.has(m)?i[l]=c:u.set(m,c));for(l=0;l<f;++l)m=a.call(e,s[l],l,s)+"",(c=u.get(m))?(o[l]=c,c.__data__=s[l],u.delete(m)):r[l]=new $c(e,s[l]);for(l=0;l<d;++l)(c=n[l])&&u.get(p[l])===c&&(i[l]=c)}function $8(e){return e.__data__}function O8(e,n){if(!arguments.length)return Array.from(this,$8);var r=n?I8:T8,o=this._parents,i=this._groups;typeof e!="function"&&(e=A8(e));for(var s=i.length,a=new Array(s),l=new Array(s),c=new Array(s),u=0;u<s;++u){var d=o[u],f=i[u],p=f.length,m=D8(e.call(d,d&&d.__data__,u,o)),g=m.length,b=l[u]=new Array(g),_=a[u]=new Array(g),y=c[u]=new Array(p);r(d,f,b,_,y,m,n);for(var x=0,w=0,S,C;x<g;++x)if(S=b[x]){for(x>=w&&(w=x+1);!(C=_[w])&&++w<g;);S._next=C||null}}return a=new Rt(a,o),a._enter=l,a._exit=c,a}function D8(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function L8(){return new Rt(this._exit||this._groups.map(Y2),this._parents)}function z8(e,n,r){var o=this.enter(),i=this,s=this.exit();return typeof e=="function"?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),n!=null&&(i=n(i),i&&(i=i.selection())),r==null?s.remove():r(s),o&&i?o.merge(i).order():i}function F8(e){for(var n=e.selection?e.selection():e,r=this._groups,o=n._groups,i=r.length,s=o.length,a=Math.min(i,s),l=new Array(i),c=0;c<a;++c)for(var u=r[c],d=o[c],f=u.length,p=l[c]=new Array(f),m,g=0;g<f;++g)(m=u[g]||d[g])&&(p[g]=m);for(;c<i;++c)l[c]=r[c];return new Rt(l,this._parents)}function V8(){for(var e=this._groups,n=-1,r=e.length;++n<r;)for(var o=e[n],i=o.length-1,s=o[i],a;--i>=0;)(a=o[i])&&(s&&a.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(a,s),s=a);return this}function B8(e){e||(e=H8);function n(f,p){return f&&p?e(f.__data__,p.__data__):!f-!p}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=0;d<l;++d)(u=a[d])&&(c[d]=u);c.sort(n)}return new Rt(i,this._parents).order()}function H8(e,n){return e<n?-1:e>n?1:e>=n?0:NaN}function W8(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function U8(){return Array.from(this)}function G8(){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var o=e[n],i=0,s=o.length;i<s;++i){var a=o[i];if(a)return a}return null}function Y8(){let e=0;for(const n of this)++e;return e}function X8(){return!this.node()}function K8(e){for(var n=this._groups,r=0,o=n.length;r<o;++r)for(var i=n[r],s=0,a=i.length,l;s<a;++s)(l=i[s])&&e.call(l,l.__data__,s,i);return this}function q8(e){return function(){this.removeAttribute(e)}}function Z8(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Q8(e,n){return function(){this.setAttribute(e,n)}}function J8(e,n){return function(){this.setAttributeNS(e.space,e.local,n)}}function eF(e,n){return function(){var r=n.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function tF(e,n){return function(){var r=n.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function nF(e,n){var r=Yu(e);if(arguments.length<2){var o=this.node();return r.local?o.getAttributeNS(r.space,r.local):o.getAttribute(r)}return this.each((n==null?r.local?Z8:q8:typeof n=="function"?r.local?tF:eF:r.local?J8:Q8)(r,n))}function X2(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function rF(e){return function(){this.style.removeProperty(e)}}function oF(e,n,r){return function(){this.style.setProperty(e,n,r)}}function iF(e,n,r){return function(){var o=n.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,r)}}function sF(e,n,r){return arguments.length>1?this.each((n==null?rF:typeof n=="function"?iF:oF)(e,n,r??"")):yi(this.node(),e)}function yi(e,n){return e.style.getPropertyValue(n)||X2(e).getComputedStyle(e,null).getPropertyValue(n)}function aF(e){return function(){delete this[e]}}function lF(e,n){return function(){this[e]=n}}function cF(e,n){return function(){var r=n.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function uF(e,n){return arguments.length>1?this.each((n==null?aF:typeof n=="function"?cF:lF)(e,n)):this.node()[e]}function K2(e){return e.trim().split(/^|\s+/)}function Ym(e){return e.classList||new q2(e)}function q2(e){this._node=e,this._names=K2(e.getAttribute("class")||"")}q2.prototype={add:function(e){var n=this._names.indexOf(e);n<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var n=this._names.indexOf(e);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Z2(e,n){for(var r=Ym(e),o=-1,i=n.length;++o<i;)r.add(n[o])}function Q2(e,n){for(var r=Ym(e),o=-1,i=n.length;++o<i;)r.remove(n[o])}function fF(e){return function(){Z2(this,e)}}function dF(e){return function(){Q2(this,e)}}function pF(e,n){return function(){(n.apply(this,arguments)?Z2:Q2)(this,e)}}function hF(e,n){var r=K2(e+"");if(arguments.length<2){for(var o=Ym(this.node()),i=-1,s=r.length;++i<s;)if(!o.contains(r[i]))return!1;return!0}return this.each((typeof n=="function"?pF:n?fF:dF)(r,n))}function mF(){this.textContent=""}function gF(e){return function(){this.textContent=e}}function yF(e){return function(){var n=e.apply(this,arguments);this.textContent=n??""}}function vF(e){return arguments.length?this.each(e==null?mF:(typeof e=="function"?yF:gF)(e)):this.node().textContent}function xF(){this.innerHTML=""}function wF(e){return function(){this.innerHTML=e}}function bF(e){return function(){var n=e.apply(this,arguments);this.innerHTML=n??""}}function _F(e){return arguments.length?this.each(e==null?xF:(typeof e=="function"?bF:wF)(e)):this.node().innerHTML}function SF(){this.nextSibling&&this.parentNode.appendChild(this)}function CF(){return this.each(SF)}function EF(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function kF(){return this.each(EF)}function NF(e){var n=typeof e=="function"?e:H2(e);return this.select(function(){return this.appendChild(n.apply(this,arguments))})}function PF(){return null}function RF(e,n){var r=typeof e=="function"?e:H2(e),o=n==null?PF:typeof n=="function"?n:Gm(n);return this.select(function(){return this.insertBefore(r.apply(this,arguments),o.apply(this,arguments)||null)})}function MF(){var e=this.parentNode;e&&e.removeChild(this)}function jF(){return this.each(MF)}function AF(){var e=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function TF(){var e=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function IF(e){return this.select(e?TF:AF)}function $F(e){return arguments.length?this.property("__data__",e):this.node().__data__}function OF(e){return function(n){e.call(this,n,this.__data__)}}function DF(e){return e.trim().split(/^|\s+/).map(function(n){var r="",o=n.indexOf(".");return o>=0&&(r=n.slice(o+1),n=n.slice(0,o)),{type:n,name:r}})}function LF(e){return function(){var n=this.__on;if(n){for(var r=0,o=-1,i=n.length,s;r<i;++r)s=n[r],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):n[++o]=s;++o?n.length=o:delete this.__on}}}function zF(e,n,r){return function(){var o=this.__on,i,s=OF(n);if(o){for(var a=0,l=o.length;a<l;++a)if((i=o[a]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=s,i.options=r),i.value=n;return}}this.addEventListener(e.type,s,r),i={type:e.type,name:e.name,value:n,listener:s,options:r},o?o.push(i):this.__on=[i]}}function FF(e,n,r){var o=DF(e+""),i,s=o.length,a;if(arguments.length<2){var l=this.node().__on;if(l){for(var c=0,u=l.length,d;c<u;++c)for(i=0,d=l[c];i<s;++i)if((a=o[i]).type===d.type&&a.name===d.name)return d.value}return}for(l=n?zF:LF,i=0;i<s;++i)this.each(l(o[i],n,r));return this}function J2(e,n,r){var o=X2(e),i=o.CustomEvent;typeof i=="function"?i=new i(n,r):(i=o.document.createEvent("Event"),r?(i.initEvent(n,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(n,!1,!1)),e.dispatchEvent(i)}function VF(e,n){return function(){return J2(this,e,n)}}function BF(e,n){return function(){return J2(this,e,n.apply(this,arguments))}}function HF(e,n){return this.each((typeof n=="function"?BF:VF)(e,n))}function*WF(){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var o=e[n],i=0,s=o.length,a;i<s;++i)(a=o[i])&&(yield a)}var eE=[null];function Rt(e,n){this._groups=e,this._parents=n}function Ra(){return new Rt([[document.documentElement]],eE)}function UF(){return this}Rt.prototype=Ra.prototype={constructor:Rt,select:y8,selectAll:b8,selectChild:E8,selectChildren:R8,filter:M8,data:O8,enter:j8,exit:L8,join:z8,merge:F8,selection:UF,order:V8,sort:B8,call:W8,nodes:U8,node:G8,size:Y8,empty:X8,each:K8,attr:nF,style:sF,property:uF,classed:hF,text:vF,html:_F,raise:CF,lower:kF,append:NF,insert:RF,remove:jF,clone:IF,datum:$F,on:FF,dispatch:HF,[Symbol.iterator]:WF};function tt(e){return typeof e=="string"?new Rt([[document.querySelector(e)]],[document.documentElement]):new Rt([[e]],eE)}function GF(e){let n;for(;n=e.sourceEvent;)e=n;return e}function Ot(e,n){if(e=GF(e),n===void 0&&(n=e.currentTarget),n){var r=n.ownerSVGElement||n;if(r.createSVGPoint){var o=r.createSVGPoint();return o.x=e.clientX,o.y=e.clientY,o=o.matrixTransform(n.getScreenCTM().inverse()),[o.x,o.y]}if(n.getBoundingClientRect){var i=n.getBoundingClientRect();return[e.clientX-i.left-n.clientLeft,e.clientY-i.top-n.clientTop]}}return[e.pageX,e.pageY]}var YF={value:()=>{}};function Ma(){for(var e=0,n=arguments.length,r={},o;e<n;++e){if(!(o=arguments[e]+"")||o in r||/[\s.]/.test(o))throw new Error("illegal type: "+o);r[o]=[]}return new Bl(r)}function Bl(e){this._=e}function XF(e,n){return e.trim().split(/^|\s+/).map(function(r){var o="",i=r.indexOf(".");if(i>=0&&(o=r.slice(i+1),r=r.slice(0,i)),r&&!n.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:o}})}Bl.prototype=Ma.prototype={constructor:Bl,on:function(e,n){var r=this._,o=XF(e+"",r),i,s=-1,a=o.length;if(arguments.length<2){for(;++s<a;)if((i=(e=o[s]).type)&&(i=KF(r[i],e.name)))return i;return}if(n!=null&&typeof n!="function")throw new Error("invalid callback: "+n);for(;++s<a;)if(i=(e=o[s]).type)r[i]=Kv(r[i],e.name,n);else if(n==null)for(i in r)r[i]=Kv(r[i],e.name,null);return this},copy:function(){var e={},n=this._;for(var r in n)e[r]=n[r].slice();return new Bl(e)},call:function(e,n){if((i=arguments.length-2)>0)for(var r=new Array(i),o=0,i,s;o<i;++o)r[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],o=0,i=s.length;o<i;++o)s[o].value.apply(n,r)},apply:function(e,n,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],i=0,s=o.length;i<s;++i)o[i].value.apply(n,r)}};function KF(e,n){for(var r=0,o=e.length,i;r<o;++r)if((i=e[r]).name===n)return i.value}function Kv(e,n,r){for(var o=0,i=e.length;o<i;++o)if(e[o].name===n){e[o]=YF,e=e.slice(0,o).concat(e.slice(o+1));break}return r!=null&&e.push({name:n,value:r}),e}const qF={passive:!1},Js={capture:!0,passive:!1};function nd(e){e.stopImmediatePropagation()}function ri(e){e.preventDefault(),e.stopImmediatePropagation()}function tE(e){var n=e.document.documentElement,r=tt(e).on("dragstart.drag",ri,Js);"onselectstart"in n?r.on("selectstart.drag",ri,Js):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}function nE(e,n){var r=e.document.documentElement,o=tt(e).on("dragstart.drag",null);n&&(o.on("click.drag",ri,Js),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in r?o.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const ul=e=>()=>e;function Ip(e,{sourceEvent:n,subject:r,target:o,identifier:i,active:s,x:a,y:l,dx:c,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}Ip.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function ZF(e){return!e.ctrlKey&&!e.button}function QF(){return this.parentNode}function JF(e,n){return n??{x:e.x,y:e.y}}function e9(){return navigator.maxTouchPoints||"ontouchstart"in this}function Xm(){var e=ZF,n=QF,r=JF,o=e9,i={},s=Ma("start","drag","end"),a=0,l,c,u,d,f=0;function p(S){S.on("mousedown.drag",m).filter(o).on("touchstart.drag",_).on("touchmove.drag",y,qF).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(S,C){if(!(d||!e.call(this,S,C))){var E=w(this,n.call(this,S,C),S,C,"mouse");E&&(tt(S.view).on("mousemove.drag",g,Js).on("mouseup.drag",b,Js),tE(S.view),nd(S),u=!1,l=S.clientX,c=S.clientY,E("start",S))}}function g(S){if(ri(S),!u){var C=S.clientX-l,E=S.clientY-c;u=C*C+E*E>f}i.mouse("drag",S)}function b(S){tt(S.view).on("mousemove.drag mouseup.drag",null),nE(S.view,u),ri(S),i.mouse("end",S)}function _(S,C){if(e.call(this,S,C)){var E=S.changedTouches,k=n.call(this,S,C),N=E.length,j,$;for(j=0;j<N;++j)($=w(this,k,S,C,E[j].identifier,E[j]))&&(nd(S),$("start",S,E[j]))}}function y(S){var C=S.changedTouches,E=C.length,k,N;for(k=0;k<E;++k)(N=i[C[k].identifier])&&(ri(S),N("drag",S,C[k]))}function x(S){var C=S.changedTouches,E=C.length,k,N;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),k=0;k<E;++k)(N=i[C[k].identifier])&&(nd(S),N("end",S,C[k]))}function w(S,C,E,k,N,j){var $=s.copy(),I=Ot(j||E,C),O,H,R;if((R=r.call(S,new Ip("beforestart",{sourceEvent:E,target:p,identifier:N,active:a,x:I[0],y:I[1],dx:0,dy:0,dispatch:$}),k))!=null)return O=R.x-I[0]||0,H=R.y-I[1]||0,function L(D,z,A){var M=I,P;switch(D){case"start":i[N]=L,P=a++;break;case"end":delete i[N],--a;case"drag":I=Ot(A||z,C),P=a;break}$.call(D,S,new Ip(D,{sourceEvent:z,subject:R,target:p,identifier:N,active:P,x:I[0]+O,y:I[1]+H,dx:I[0]-M[0],dy:I[1]-M[1],dispatch:$}),k)}}return p.filter=function(S){return arguments.length?(e=typeof S=="function"?S:ul(!!S),p):e},p.container=function(S){return arguments.length?(n=typeof S=="function"?S:ul(S),p):n},p.subject=function(S){return arguments.length?(r=typeof S=="function"?S:ul(S),p):r},p.touchable=function(S){return arguments.length?(o=typeof S=="function"?S:ul(!!S),p):o},p.on=function(){var S=s.on.apply(s,arguments);return S===s?p:S},p.clickDistance=function(S){return arguments.length?(f=(S=+S)*S,p):Math.sqrt(f)},p}function Km(e,n,r){e.prototype=n.prototype=r,r.constructor=e}function rE(e,n){var r=Object.create(e.prototype);for(var o in n)r[o]=n[o];return r}function ja(){}var ea=.7,Oc=1/ea,oi="\\s*([+-]?\\d+)\\s*",ta="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",bn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",t9=/^#([0-9a-f]{3,8})$/,n9=new RegExp(`^rgb\\(${oi},${oi},${oi}\\)$`),r9=new RegExp(`^rgb\\(${bn},${bn},${bn}\\)$`),o9=new RegExp(`^rgba\\(${oi},${oi},${oi},${ta}\\)$`),i9=new RegExp(`^rgba\\(${bn},${bn},${bn},${ta}\\)$`),s9=new RegExp(`^hsl\\(${ta},${bn},${bn}\\)$`),a9=new RegExp(`^hsla\\(${ta},${bn},${bn},${ta}\\)$`),qv={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};Km(ja,po,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Zv,formatHex:Zv,formatHex8:l9,formatHsl:c9,formatRgb:Qv,toString:Qv});function Zv(){return this.rgb().formatHex()}function l9(){return this.rgb().formatHex8()}function c9(){return oE(this).formatHsl()}function Qv(){return this.rgb().formatRgb()}function po(e){var n,r;return e=(e+"").trim().toLowerCase(),(n=t9.exec(e))?(r=n[1].length,n=parseInt(n[1],16),r===6?Jv(n):r===3?new pt(n>>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):r===8?fl(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):r===4?fl(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=n9.exec(e))?new pt(n[1],n[2],n[3],1):(n=r9.exec(e))?new pt(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=o9.exec(e))?fl(n[1],n[2],n[3],n[4]):(n=i9.exec(e))?fl(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=s9.exec(e))?n0(n[1],n[2]/100,n[3]/100,1):(n=a9.exec(e))?n0(n[1],n[2]/100,n[3]/100,n[4]):qv.hasOwnProperty(e)?Jv(qv[e]):e==="transparent"?new pt(NaN,NaN,NaN,0):null}function Jv(e){return new pt(e>>16&255,e>>8&255,e&255,1)}function fl(e,n,r,o){return o<=0&&(e=n=r=NaN),new pt(e,n,r,o)}function u9(e){return e instanceof ja||(e=po(e)),e?(e=e.rgb(),new pt(e.r,e.g,e.b,e.opacity)):new pt}function $p(e,n,r,o){return arguments.length===1?u9(e):new pt(e,n,r,o??1)}function pt(e,n,r,o){this.r=+e,this.g=+n,this.b=+r,this.opacity=+o}Km(pt,$p,rE(ja,{brighter(e){return e=e==null?Oc:Math.pow(Oc,e),new pt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ea:Math.pow(ea,e),new pt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new pt(eo(this.r),eo(this.g),eo(this.b),Dc(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:e0,formatHex:e0,formatHex8:f9,formatRgb:t0,toString:t0}));function e0(){return`#${Zr(this.r)}${Zr(this.g)}${Zr(this.b)}`}function f9(){return`#${Zr(this.r)}${Zr(this.g)}${Zr(this.b)}${Zr((isNaN(this.opacity)?1:this.opacity)*255)}`}function t0(){const e=Dc(this.opacity);return`${e===1?"rgb(":"rgba("}${eo(this.r)}, ${eo(this.g)}, ${eo(this.b)}${e===1?")":`, ${e})`}`}function Dc(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function eo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Zr(e){return e=eo(e),(e<16?"0":"")+e.toString(16)}function n0(e,n,r,o){return o<=0?e=n=r=NaN:r<=0||r>=1?e=n=NaN:n<=0&&(e=NaN),new Qt(e,n,r,o)}function oE(e){if(e instanceof Qt)return new Qt(e.h,e.s,e.l,e.opacity);if(e instanceof ja||(e=po(e)),!e)return new Qt;if(e instanceof Qt)return e;e=e.rgb();var n=e.r/255,r=e.g/255,o=e.b/255,i=Math.min(n,r,o),s=Math.max(n,r,o),a=NaN,l=s-i,c=(s+i)/2;return l?(n===s?a=(r-o)/l+(r<o)*6:r===s?a=(o-n)/l+2:a=(n-r)/l+4,l/=c<.5?s+i:2-s-i,a*=60):l=c>0&&c<1?0:a,new Qt(a,l,c,e.opacity)}function d9(e,n,r,o){return arguments.length===1?oE(e):new Qt(e,n,r,o??1)}function Qt(e,n,r,o){this.h=+e,this.s=+n,this.l=+r,this.opacity=+o}Km(Qt,d9,rE(ja,{brighter(e){return e=e==null?Oc:Math.pow(Oc,e),new Qt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ea:Math.pow(ea,e),new Qt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,n=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,o=r+(r<.5?r:1-r)*n,i=2*r-o;return new pt(rd(e>=240?e-240:e+120,i,o),rd(e,i,o),rd(e<120?e+240:e-120,i,o),this.opacity)},clamp(){return new Qt(r0(this.h),dl(this.s),dl(this.l),Dc(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=Dc(this.opacity);return`${e===1?"hsl(":"hsla("}${r0(this.h)}, ${dl(this.s)*100}%, ${dl(this.l)*100}%${e===1?")":`, ${e})`}`}}));function r0(e){return e=(e||0)%360,e<0?e+360:e}function dl(e){return Math.max(0,Math.min(1,e||0))}function rd(e,n,r){return(e<60?n+(r-n)*e/60:e<180?r:e<240?n+(r-n)*(240-e)/60:n)*255}const qm=e=>()=>e;function p9(e,n){return function(r){return e+r*n}}function h9(e,n,r){return e=Math.pow(e,r),n=Math.pow(n,r)-e,r=1/r,function(o){return Math.pow(e+o*n,r)}}function m9(e){return(e=+e)==1?iE:function(n,r){return r-n?h9(n,r,e):qm(isNaN(n)?r:n)}}function iE(e,n){var r=n-e;return r?p9(e,r):qm(isNaN(e)?n:e)}const Lc=function e(n){var r=m9(n);function o(i,s){var a=r((i=$p(i)).r,(s=$p(s)).r),l=r(i.g,s.g),c=r(i.b,s.b),u=iE(i.opacity,s.opacity);return function(d){return i.r=a(d),i.g=l(d),i.b=c(d),i.opacity=u(d),i+""}}return o.gamma=e,o}(1);function g9(e,n){n||(n=[]);var r=e?Math.min(n.length,e.length):0,o=n.slice(),i;return function(s){for(i=0;i<r;++i)o[i]=e[i]*(1-s)+n[i]*s;return o}}function y9(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function v9(e,n){var r=n?n.length:0,o=e?Math.min(r,e.length):0,i=new Array(o),s=new Array(r),a;for(a=0;a<o;++a)i[a]=Cs(e[a],n[a]);for(;a<r;++a)s[a]=n[a];return function(l){for(a=0;a<o;++a)s[a]=i[a](l);return s}}function x9(e,n){var r=new Date;return e=+e,n=+n,function(o){return r.setTime(e*(1-o)+n*o),r}}function pn(e,n){return e=+e,n=+n,function(r){return e*(1-r)+n*r}}function w9(e,n){var r={},o={},i;(e===null||typeof e!="object")&&(e={}),(n===null||typeof n!="object")&&(n={});for(i in n)i in e?r[i]=Cs(e[i],n[i]):o[i]=n[i];return function(s){for(i in r)o[i]=r[i](s);return o}}var Op=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,od=new RegExp(Op.source,"g");function b9(e){return function(){return e}}function _9(e){return function(n){return e(n)+""}}function sE(e,n){var r=Op.lastIndex=od.lastIndex=0,o,i,s,a=-1,l=[],c=[];for(e=e+"",n=n+"";(o=Op.exec(e))&&(i=od.exec(n));)(s=i.index)>r&&(s=n.slice(r,s),l[a]?l[a]+=s:l[++a]=s),(o=o[0])===(i=i[0])?l[a]?l[a]+=i:l[++a]=i:(l[++a]=null,c.push({i:a,x:pn(o,i)})),r=od.lastIndex;return r<n.length&&(s=n.slice(r),l[a]?l[a]+=s:l[++a]=s),l.length<2?c[0]?_9(c[0].x):b9(n):(n=c.length,function(u){for(var d=0,f;d<n;++d)l[(f=c[d]).i]=f.x(u);return l.join("")})}function Cs(e,n){var r=typeof n,o;return n==null||r==="boolean"?qm(n):(r==="number"?pn:r==="string"?(o=po(n))?(n=o,Lc):sE:n instanceof po?Lc:n instanceof Date?x9:y9(n)?g9:Array.isArray(n)?v9:typeof n.valueOf!="function"&&typeof n.toString!="function"||isNaN(n)?w9:pn)(e,n)}var o0=180/Math.PI,Dp={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function aE(e,n,r,o,i,s){var a,l,c;return(a=Math.sqrt(e*e+n*n))&&(e/=a,n/=a),(c=e*r+n*o)&&(r-=e*c,o-=n*c),(l=Math.sqrt(r*r+o*o))&&(r/=l,o/=l,c/=l),e*o<n*r&&(e=-e,n=-n,c=-c,a=-a),{translateX:i,translateY:s,rotate:Math.atan2(n,e)*o0,skewX:Math.atan(c)*o0,scaleX:a,scaleY:l}}var pl;function S9(e){const n=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return n.isIdentity?Dp:aE(n.a,n.b,n.c,n.d,n.e,n.f)}function C9(e){return e==null||(pl||(pl=document.createElementNS("http://www.w3.org/2000/svg","g")),pl.setAttribute("transform",e),!(e=pl.transform.baseVal.consolidate()))?Dp:(e=e.matrix,aE(e.a,e.b,e.c,e.d,e.e,e.f))}function lE(e,n,r,o){function i(u){return u.length?u.pop()+" ":""}function s(u,d,f,p,m,g){if(u!==f||d!==p){var b=m.push("translate(",null,n,null,r);g.push({i:b-4,x:pn(u,f)},{i:b-2,x:pn(d,p)})}else(f||p)&&m.push("translate("+f+n+p+r)}function a(u,d,f,p){u!==d?(u-d>180?d+=360:d-u>180&&(u+=360),p.push({i:f.push(i(f)+"rotate(",null,o)-2,x:pn(u,d)})):d&&f.push(i(f)+"rotate("+d+o)}function l(u,d,f,p){u!==d?p.push({i:f.push(i(f)+"skewX(",null,o)-2,x:pn(u,d)}):d&&f.push(i(f)+"skewX("+d+o)}function c(u,d,f,p,m,g){if(u!==f||d!==p){var b=m.push(i(m)+"scale(",null,",",null,")");g.push({i:b-4,x:pn(u,f)},{i:b-2,x:pn(d,p)})}else(f!==1||p!==1)&&m.push(i(m)+"scale("+f+","+p+")")}return function(u,d){var f=[],p=[];return u=e(u),d=e(d),s(u.translateX,u.translateY,d.translateX,d.translateY,f,p),a(u.rotate,d.rotate,f,p),l(u.skewX,d.skewX,f,p),c(u.scaleX,u.scaleY,d.scaleX,d.scaleY,f,p),u=d=null,function(m){for(var g=-1,b=p.length,_;++g<b;)f[(_=p[g]).i]=_.x(m);return f.join("")}}}var E9=lE(S9,"px, ","px)","deg)"),k9=lE(C9,", ",")",")"),N9=1e-12;function i0(e){return((e=Math.exp(e))+1/e)/2}function P9(e){return((e=Math.exp(e))-1/e)/2}function R9(e){return((e=Math.exp(2*e))-1)/(e+1)}const Hl=function e(n,r,o){function i(s,a){var l=s[0],c=s[1],u=s[2],d=a[0],f=a[1],p=a[2],m=d-l,g=f-c,b=m*m+g*g,_,y;if(b<N9)y=Math.log(p/u)/n,_=function(k){return[l+k*m,c+k*g,u*Math.exp(n*k*y)]};else{var x=Math.sqrt(b),w=(p*p-u*u+o*b)/(2*u*r*x),S=(p*p-u*u-o*b)/(2*p*r*x),C=Math.log(Math.sqrt(w*w+1)-w),E=Math.log(Math.sqrt(S*S+1)-S);y=(E-C)/n,_=function(k){var N=k*y,j=i0(C),$=u/(r*x)*(j*R9(n*N+C)-P9(C));return[l+$*m,c+$*g,u*j/i0(n*N+C)]}}return _.duration=y*1e3*n/Math.SQRT2,_}return i.rho=function(s){var a=Math.max(.001,+s),l=a*a,c=l*l;return e(a,l,c)},i}(Math.SQRT2,2,4);var vi=0,fs=0,qi=0,cE=1e3,zc,ds,Fc=0,ho=0,Xu=0,na=typeof performance=="object"&&performance.now?performance:Date,uE=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Zm(){return ho||(uE(M9),ho=na.now()+Xu)}function M9(){ho=0}function Vc(){this._call=this._time=this._next=null}Vc.prototype=Qm.prototype={constructor:Vc,restart:function(e,n,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Zm():+r)+(n==null?0:+n),!this._next&&ds!==this&&(ds?ds._next=this:zc=this,ds=this),this._call=e,this._time=r,Lp()},stop:function(){this._call&&(this._call=null,this._time=1/0,Lp())}};function Qm(e,n,r){var o=new Vc;return o.restart(e,n,r),o}function j9(){Zm(),++vi;for(var e=zc,n;e;)(n=ho-e._time)>=0&&e._call.call(void 0,n),e=e._next;--vi}function s0(){ho=(Fc=na.now())+Xu,vi=fs=0;try{j9()}finally{vi=0,T9(),ho=0}}function A9(){var e=na.now(),n=e-Fc;n>cE&&(Xu-=n,Fc=e)}function T9(){for(var e,n=zc,r,o=1/0;n;)n._call?(o>n._time&&(o=n._time),e=n,n=n._next):(r=n._next,n._next=null,n=e?e._next=r:zc=r);ds=e,Lp(o)}function Lp(e){if(!vi){fs&&(fs=clearTimeout(fs));var n=e-ho;n>24?(e<1/0&&(fs=setTimeout(s0,e-na.now()-Xu)),qi&&(qi=clearInterval(qi))):(qi||(Fc=na.now(),qi=setInterval(A9,cE)),vi=1,uE(s0))}}function a0(e,n,r){var o=new Vc;return n=n==null?0:+n,o.restart(i=>{o.stop(),e(i+n)},n,r),o}var I9=Ma("start","end","cancel","interrupt"),$9=[],fE=0,l0=1,zp=2,Wl=3,c0=4,Fp=5,Ul=6;function Ku(e,n,r,o,i,s){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;O9(e,r,{name:n,index:o,group:i,on:I9,tween:$9,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:fE})}function Jm(e,n){var r=cn(e,n);if(r.state>fE)throw new Error("too late; already scheduled");return r}function kn(e,n){var r=cn(e,n);if(r.state>Wl)throw new Error("too late; already running");return r}function cn(e,n){var r=e.__transition;if(!r||!(r=r[n]))throw new Error("transition not found");return r}function O9(e,n,r){var o=e.__transition,i;o[n]=r,r.timer=Qm(s,0,r.time);function s(u){r.state=l0,r.timer.restart(a,r.delay,r.time),r.delay<=u&&a(u-r.delay)}function a(u){var d,f,p,m;if(r.state!==l0)return c();for(d in o)if(m=o[d],m.name===r.name){if(m.state===Wl)return a0(a);m.state===c0?(m.state=Ul,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete o[d]):+d<n&&(m.state=Ul,m.timer.stop(),m.on.call("cancel",e,e.__data__,m.index,m.group),delete o[d])}if(a0(function(){r.state===Wl&&(r.state=c0,r.timer.restart(l,r.delay,r.time),l(u))}),r.state=zp,r.on.call("start",e,e.__data__,r.index,r.group),r.state===zp){for(r.state=Wl,i=new Array(p=r.tween.length),d=0,f=-1;d<p;++d)(m=r.tween[d].value.call(e,e.__data__,r.index,r.group))&&(i[++f]=m);i.length=f+1}}function l(u){for(var d=u<r.duration?r.ease.call(null,u/r.duration):(r.timer.restart(c),r.state=Fp,1),f=-1,p=i.length;++f<p;)i[f].call(e,d);r.state===Fp&&(r.on.call("end",e,e.__data__,r.index,r.group),c())}function c(){r.state=Ul,r.timer.stop(),delete o[n];for(var u in o)return;delete e.__transition}}function Gl(e,n){var r=e.__transition,o,i,s=!0,a;if(r){n=n==null?null:n+"";for(a in r){if((o=r[a]).name!==n){s=!1;continue}i=o.state>zp&&o.state<Fp,o.state=Ul,o.timer.stop(),o.on.call(i?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete r[a]}s&&delete e.__transition}}function D9(e){return this.each(function(){Gl(this,e)})}function L9(e,n){var r,o;return function(){var i=kn(this,e),s=i.tween;if(s!==r){o=r=s;for(var a=0,l=o.length;a<l;++a)if(o[a].name===n){o=o.slice(),o.splice(a,1);break}}i.tween=o}}function z9(e,n,r){var o,i;if(typeof r!="function")throw new Error;return function(){var s=kn(this,e),a=s.tween;if(a!==o){i=(o=a).slice();for(var l={name:n,value:r},c=0,u=i.length;c<u;++c)if(i[c].name===n){i[c]=l;break}c===u&&i.push(l)}s.tween=i}}function F9(e,n){var r=this._id;if(e+="",arguments.length<2){for(var o=cn(this.node(),r).tween,i=0,s=o.length,a;i<s;++i)if((a=o[i]).name===e)return a.value;return null}return this.each((n==null?L9:z9)(r,e,n))}function eg(e,n,r){var o=e._id;return e.each(function(){var i=kn(this,o);(i.value||(i.value={}))[n]=r.apply(this,arguments)}),function(i){return cn(i,o).value[n]}}function dE(e,n){var r;return(typeof n=="number"?pn:n instanceof po?Lc:(r=po(n))?(n=r,Lc):sE)(e,n)}function V9(e){return function(){this.removeAttribute(e)}}function B9(e){return function(){this.removeAttributeNS(e.space,e.local)}}function H9(e,n,r){var o,i=r+"",s;return function(){var a=this.getAttribute(e);return a===i?null:a===o?s:s=n(o=a,r)}}function W9(e,n,r){var o,i=r+"",s;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===o?s:s=n(o=a,r)}}function U9(e,n,r){var o,i,s;return function(){var a,l=r(this),c;return l==null?void this.removeAttribute(e):(a=this.getAttribute(e),c=l+"",a===c?null:a===o&&c===i?s:(i=c,s=n(o=a,l)))}}function G9(e,n,r){var o,i,s;return function(){var a,l=r(this),c;return l==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),c=l+"",a===c?null:a===o&&c===i?s:(i=c,s=n(o=a,l)))}}function Y9(e,n){var r=Yu(e),o=r==="transform"?k9:dE;return this.attrTween(e,typeof n=="function"?(r.local?G9:U9)(r,o,eg(this,"attr."+e,n)):n==null?(r.local?B9:V9)(r):(r.local?W9:H9)(r,o,n))}function X9(e,n){return function(r){this.setAttribute(e,n.call(this,r))}}function K9(e,n){return function(r){this.setAttributeNS(e.space,e.local,n.call(this,r))}}function q9(e,n){var r,o;function i(){var s=n.apply(this,arguments);return s!==o&&(r=(o=s)&&K9(e,s)),r}return i._value=n,i}function Z9(e,n){var r,o;function i(){var s=n.apply(this,arguments);return s!==o&&(r=(o=s)&&X9(e,s)),r}return i._value=n,i}function Q9(e,n){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(n==null)return this.tween(r,null);if(typeof n!="function")throw new Error;var o=Yu(e);return this.tween(r,(o.local?q9:Z9)(o,n))}function J9(e,n){return function(){Jm(this,e).delay=+n.apply(this,arguments)}}function e7(e,n){return n=+n,function(){Jm(this,e).delay=n}}function t7(e){var n=this._id;return arguments.length?this.each((typeof e=="function"?J9:e7)(n,e)):cn(this.node(),n).delay}function n7(e,n){return function(){kn(this,e).duration=+n.apply(this,arguments)}}function r7(e,n){return n=+n,function(){kn(this,e).duration=n}}function o7(e){var n=this._id;return arguments.length?this.each((typeof e=="function"?n7:r7)(n,e)):cn(this.node(),n).duration}function i7(e,n){if(typeof n!="function")throw new Error;return function(){kn(this,e).ease=n}}function s7(e){var n=this._id;return arguments.length?this.each(i7(n,e)):cn(this.node(),n).ease}function a7(e,n){return function(){var r=n.apply(this,arguments);if(typeof r!="function")throw new Error;kn(this,e).ease=r}}function l7(e){if(typeof e!="function")throw new Error;return this.each(a7(this._id,e))}function c7(e){typeof e!="function"&&(e=U2(e));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]=[],c,u=0;u<a;++u)(c=s[u])&&e.call(c,c.__data__,u,s)&&l.push(c);return new Yn(o,this._parents,this._name,this._id)}function u7(e){if(e._id!==this._id)throw new Error;for(var n=this._groups,r=e._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,m=0;m<d;++m)(p=c[m]||u[m])&&(f[m]=p);for(;l<o;++l)a[l]=n[l];return new Yn(a,this._parents,this._name,this._id)}function f7(e){return(e+"").trim().split(/^|\s+/).every(function(n){var r=n.indexOf(".");return r>=0&&(n=n.slice(0,r)),!n||n==="start"})}function d7(e,n,r){var o,i,s=f7(n)?Jm:kn;return function(){var a=s(this,e),l=a.on;l!==o&&(i=(o=l).copy()).on(n,r),a.on=i}}function p7(e,n){var r=this._id;return arguments.length<2?cn(this.node(),r).on.on(e):this.each(d7(r,e,n))}function h7(e){return function(){var n=this.parentNode;for(var r in this.__transition)if(+r!==e)return;n&&n.removeChild(this)}}function m7(){return this.on("end.remove",h7(this._id))}function g7(e){var n=this._name,r=this._id;typeof e!="function"&&(e=Gm(e));for(var o=this._groups,i=o.length,s=new Array(i),a=0;a<i;++a)for(var l=o[a],c=l.length,u=s[a]=new Array(c),d,f,p=0;p<c;++p)(d=l[p])&&(f=e.call(d,d.__data__,p,l))&&("__data__"in d&&(f.__data__=d.__data__),u[p]=f,Ku(u[p],n,r,p,u,cn(d,r)));return new Yn(s,this._parents,n,r)}function y7(e){var n=this._name,r=this._id;typeof e!="function"&&(e=W2(e));for(var o=this._groups,i=o.length,s=[],a=[],l=0;l<i;++l)for(var c=o[l],u=c.length,d,f=0;f<u;++f)if(d=c[f]){for(var p=e.call(d,d.__data__,f,c),m,g=cn(d,r),b=0,_=p.length;b<_;++b)(m=p[b])&&Ku(m,n,r,b,p,g);s.push(p),a.push(d)}return new Yn(s,a,n,r)}var v7=Ra.prototype.constructor;function x7(){return new v7(this._groups,this._parents)}function w7(e,n){var r,o,i;return function(){var s=yi(this,e),a=(this.style.removeProperty(e),yi(this,e));return s===a?null:s===r&&a===o?i:i=n(r=s,o=a)}}function pE(e){return function(){this.style.removeProperty(e)}}function b7(e,n,r){var o,i=r+"",s;return function(){var a=yi(this,e);return a===i?null:a===o?s:s=n(o=a,r)}}function _7(e,n,r){var o,i,s;return function(){var a=yi(this,e),l=r(this),c=l+"";return l==null&&(c=l=(this.style.removeProperty(e),yi(this,e))),a===c?null:a===o&&c===i?s:(i=c,s=n(o=a,l))}}function S7(e,n){var r,o,i,s="style."+n,a="end."+s,l;return function(){var c=kn(this,e),u=c.on,d=c.value[s]==null?l||(l=pE(n)):void 0;(u!==r||i!==d)&&(o=(r=u).copy()).on(a,i=d),c.on=o}}function C7(e,n,r){var o=(e+="")=="transform"?E9:dE;return n==null?this.styleTween(e,w7(e,o)).on("end.style."+e,pE(e)):typeof n=="function"?this.styleTween(e,_7(e,o,eg(this,"style."+e,n))).each(S7(this._id,e)):this.styleTween(e,b7(e,o,n),r).on("end.style."+e,null)}function E7(e,n,r){return function(o){this.style.setProperty(e,n.call(this,o),r)}}function k7(e,n,r){var o,i;function s(){var a=n.apply(this,arguments);return a!==i&&(o=(i=a)&&E7(e,a,r)),o}return s._value=n,s}function N7(e,n,r){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(n==null)return this.tween(o,null);if(typeof n!="function")throw new Error;return this.tween(o,k7(e,n,r??""))}function P7(e){return function(){this.textContent=e}}function R7(e){return function(){var n=e(this);this.textContent=n??""}}function M7(e){return this.tween("text",typeof e=="function"?R7(eg(this,"text",e)):P7(e==null?"":e+""))}function j7(e){return function(n){this.textContent=e.call(this,n)}}function A7(e){var n,r;function o(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&j7(i)),n}return o._value=e,o}function T7(e){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;return this.tween(n,A7(e))}function I7(){for(var e=this._name,n=this._id,r=hE(),o=this._groups,i=o.length,s=0;s<i;++s)for(var a=o[s],l=a.length,c,u=0;u<l;++u)if(c=a[u]){var d=cn(c,n);Ku(c,e,r,u,a,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new Yn(o,this._parents,e,r)}function $7(){var e,n,r=this,o=r._id,i=r.size();return new Promise(function(s,a){var l={value:a},c={value:function(){--i===0&&s()}};r.each(function(){var u=kn(this,o),d=u.on;d!==e&&(n=(e=d).copy(),n._.cancel.push(l),n._.interrupt.push(l),n._.end.push(c)),u.on=n}),i===0&&s()})}var O7=0;function Yn(e,n,r,o){this._groups=e,this._parents=n,this._name=r,this._id=o}function hE(){return++O7}var Pn=Ra.prototype;Yn.prototype={constructor:Yn,select:g7,selectAll:y7,selectChild:Pn.selectChild,selectChildren:Pn.selectChildren,filter:c7,merge:u7,selection:x7,transition:I7,call:Pn.call,nodes:Pn.nodes,node:Pn.node,size:Pn.size,empty:Pn.empty,each:Pn.each,on:p7,attr:Y9,attrTween:Q9,style:C7,styleTween:N7,text:M7,textTween:T7,remove:m7,tween:F9,delay:t7,duration:o7,ease:s7,easeVarying:l7,end:$7,[Symbol.iterator]:Pn[Symbol.iterator]};function D7(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var L7={time:null,delay:0,duration:250,ease:D7};function z7(e,n){for(var r;!(r=e.__transition)||!(r=r[n]);)if(!(e=e.parentNode))throw new Error(`transition ${n} not found`);return r}function F7(e){var n,r;e instanceof Yn?(n=e._id,e=e._name):(n=hE(),(r=L7).time=Zm(),e=e==null?null:e+"");for(var o=this._groups,i=o.length,s=0;s<i;++s)for(var a=o[s],l=a.length,c,u=0;u<l;++u)(c=a[u])&&Ku(c,e,n,u,a,r||z7(c,n));return new Yn(o,this._parents,e,n)}Ra.prototype.interrupt=D9;Ra.prototype.transition=F7;const hl=e=>()=>e;function V7(e,{sourceEvent:n,target:r,transform:o,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:i}})}function Dn(e,n,r){this.k=e,this.x=n,this.y=r}Dn.prototype={constructor:Dn,scale:function(e){return e===1?this:new Dn(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new Dn(this.k,this.x+this.k*e,this.y+this.k*n)},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 qu=new Dn(1,0,0);Kt.prototype=Dn.prototype;function Kt(e){for(;!e.__zoom;)if(!(e=e.parentNode))return qu;return e.__zoom}function id(e){e.stopImmediatePropagation()}function Zi(e){e.preventDefault(),e.stopImmediatePropagation()}function B7(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function H7(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function u0(){return this.__zoom||qu}function W7(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function U7(){return navigator.maxTouchPoints||"ontouchstart"in this}function G7(e,n,r){var o=e.invertX(n[0][0])-r[0][0],i=e.invertX(n[1][0])-r[1][0],s=e.invertY(n[0][1])-r[0][1],a=e.invertY(n[1][1])-r[1][1];return e.translate(i>o?(o+i)/2:Math.min(0,o)||Math.max(0,i),a>s?(s+a)/2:Math.min(0,s)||Math.max(0,a))}function tg(){var e=B7,n=H7,r=G7,o=W7,i=U7,s=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],l=250,c=Hl,u=Ma("start","zoom","end"),d,f,p,m=500,g=150,b=0,_=10;function y(R){R.property("__zoom",u0).on("wheel.zoom",N,{passive:!1}).on("mousedown.zoom",j).on("dblclick.zoom",$).filter(i).on("touchstart.zoom",I).on("touchmove.zoom",O).on("touchend.zoom touchcancel.zoom",H).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(R,L,D,z){var A=R.selection?R.selection():R;A.property("__zoom",u0),R!==A?C(R,L,D,z):A.interrupt().each(function(){E(this,arguments).event(z).start().zoom(null,typeof L=="function"?L.apply(this,arguments):L).end()})},y.scaleBy=function(R,L,D,z){y.scaleTo(R,function(){var A=this.__zoom.k,M=typeof L=="function"?L.apply(this,arguments):L;return A*M},D,z)},y.scaleTo=function(R,L,D,z){y.transform(R,function(){var A=n.apply(this,arguments),M=this.__zoom,P=D==null?S(A):typeof D=="function"?D.apply(this,arguments):D,W=M.invert(P),T=typeof L=="function"?L.apply(this,arguments):L;return r(w(x(M,T),P,W),A,a)},D,z)},y.translateBy=function(R,L,D,z){y.transform(R,function(){return r(this.__zoom.translate(typeof L=="function"?L.apply(this,arguments):L,typeof D=="function"?D.apply(this,arguments):D),n.apply(this,arguments),a)},null,z)},y.translateTo=function(R,L,D,z,A){y.transform(R,function(){var M=n.apply(this,arguments),P=this.__zoom,W=z==null?S(M):typeof z=="function"?z.apply(this,arguments):z;return r(qu.translate(W[0],W[1]).scale(P.k).translate(typeof L=="function"?-L.apply(this,arguments):-L,typeof D=="function"?-D.apply(this,arguments):-D),M,a)},z,A)};function x(R,L){return L=Math.max(s[0],Math.min(s[1],L)),L===R.k?R:new Dn(L,R.x,R.y)}function w(R,L,D){var z=L[0]-D[0]*R.k,A=L[1]-D[1]*R.k;return z===R.x&&A===R.y?R:new Dn(R.k,z,A)}function S(R){return[(+R[0][0]+ +R[1][0])/2,(+R[0][1]+ +R[1][1])/2]}function C(R,L,D,z){R.on("start.zoom",function(){E(this,arguments).event(z).start()}).on("interrupt.zoom end.zoom",function(){E(this,arguments).event(z).end()}).tween("zoom",function(){var A=this,M=arguments,P=E(A,M).event(z),W=n.apply(A,M),T=D==null?S(W):typeof D=="function"?D.apply(A,M):D,X=Math.max(W[1][0]-W[0][0],W[1][1]-W[0][1]),F=A.__zoom,B=typeof L=="function"?L.apply(A,M):L,G=c(F.invert(T).concat(X/F.k),B.invert(T).concat(X/B.k));return function(U){if(U===1)U=B;else{var Y=G(U),K=X/Y[2];U=new Dn(K,T[0]-Y[0]*K,T[1]-Y[1]*K)}P.zoom(null,U)}})}function E(R,L,D){return!D&&R.__zooming||new k(R,L)}function k(R,L){this.that=R,this.args=L,this.active=0,this.sourceEvent=null,this.extent=n.apply(R,L),this.taps=0}k.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,L){return this.mouse&&R!=="mouse"&&(this.mouse[1]=L.invert(this.mouse[0])),this.touch0&&R!=="touch"&&(this.touch0[1]=L.invert(this.touch0[0])),this.touch1&&R!=="touch"&&(this.touch1[1]=L.invert(this.touch1[0])),this.that.__zoom=L,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(R){var L=tt(this.that).datum();u.call(R,this.that,new V7(R,{sourceEvent:this.sourceEvent,target:y,transform:this.that.__zoom,dispatch:u}),L)}};function N(R,...L){if(!e.apply(this,arguments))return;var D=E(this,L).event(R),z=this.__zoom,A=Math.max(s[0],Math.min(s[1],z.k*Math.pow(2,o.apply(this,arguments)))),M=Ot(R);if(D.wheel)(D.mouse[0][0]!==M[0]||D.mouse[0][1]!==M[1])&&(D.mouse[1]=z.invert(D.mouse[0]=M)),clearTimeout(D.wheel);else{if(z.k===A)return;D.mouse=[M,z.invert(M)],Gl(this),D.start()}Zi(R),D.wheel=setTimeout(P,g),D.zoom("mouse",r(w(x(z,A),D.mouse[0],D.mouse[1]),D.extent,a));function P(){D.wheel=null,D.end()}}function j(R,...L){if(p||!e.apply(this,arguments))return;var D=R.currentTarget,z=E(this,L,!0).event(R),A=tt(R.view).on("mousemove.zoom",T,!0).on("mouseup.zoom",X,!0),M=Ot(R,D),P=R.clientX,W=R.clientY;tE(R.view),id(R),z.mouse=[M,this.__zoom.invert(M)],Gl(this),z.start();function T(F){if(Zi(F),!z.moved){var B=F.clientX-P,G=F.clientY-W;z.moved=B*B+G*G>b}z.event(F).zoom("mouse",r(w(z.that.__zoom,z.mouse[0]=Ot(F,D),z.mouse[1]),z.extent,a))}function X(F){A.on("mousemove.zoom mouseup.zoom",null),nE(F.view,z.moved),Zi(F),z.event(F).end()}}function $(R,...L){if(e.apply(this,arguments)){var D=this.__zoom,z=Ot(R.changedTouches?R.changedTouches[0]:R,this),A=D.invert(z),M=D.k*(R.shiftKey?.5:2),P=r(w(x(D,M),z,A),n.apply(this,L),a);Zi(R),l>0?tt(this).transition().duration(l).call(C,P,z,R):tt(this).call(y.transform,P,z,R)}}function I(R,...L){if(e.apply(this,arguments)){var D=R.touches,z=D.length,A=E(this,L,R.changedTouches.length===z).event(R),M,P,W,T;for(id(R),P=0;P<z;++P)W=D[P],T=Ot(W,this),T=[T,this.__zoom.invert(T),W.identifier],A.touch0?!A.touch1&&A.touch0[2]!==T[2]&&(A.touch1=T,A.taps=0):(A.touch0=T,M=!0,A.taps=1+!!d);d&&(d=clearTimeout(d)),M&&(A.taps<2&&(f=T[0],d=setTimeout(function(){d=null},m)),Gl(this),A.start())}}function O(R,...L){if(this.__zooming){var D=E(this,L).event(R),z=R.changedTouches,A=z.length,M,P,W,T;for(Zi(R),M=0;M<A;++M)P=z[M],W=Ot(P,this),D.touch0&&D.touch0[2]===P.identifier?D.touch0[0]=W:D.touch1&&D.touch1[2]===P.identifier&&(D.touch1[0]=W);if(P=D.that.__zoom,D.touch1){var X=D.touch0[0],F=D.touch0[1],B=D.touch1[0],G=D.touch1[1],U=(U=B[0]-X[0])*U+(U=B[1]-X[1])*U,Y=(Y=G[0]-F[0])*Y+(Y=G[1]-F[1])*Y;P=x(P,Math.sqrt(U/Y)),W=[(X[0]+B[0])/2,(X[1]+B[1])/2],T=[(F[0]+G[0])/2,(F[1]+G[1])/2]}else if(D.touch0)W=D.touch0[0],T=D.touch0[1];else return;D.zoom("touch",r(w(P,W,T),D.extent,a))}}function H(R,...L){if(this.__zooming){var D=E(this,L).event(R),z=R.changedTouches,A=z.length,M,P;for(id(R),p&&clearTimeout(p),p=setTimeout(function(){p=null},m),M=0;M<A;++M)P=z[M],D.touch0&&D.touch0[2]===P.identifier?delete D.touch0:D.touch1&&D.touch1[2]===P.identifier&&delete D.touch1;if(D.touch1&&!D.touch0&&(D.touch0=D.touch1,delete D.touch1),D.touch0)D.touch0[1]=this.__zoom.invert(D.touch0[0]);else if(D.end(),D.taps===2&&(P=Ot(P,this),Math.hypot(f[0]-P[0],f[1]-P[1])<_)){var W=tt(this).on("dblclick.zoom");W&&W.apply(this,arguments)}}}return y.wheelDelta=function(R){return arguments.length?(o=typeof R=="function"?R:hl(+R),y):o},y.filter=function(R){return arguments.length?(e=typeof R=="function"?R:hl(!!R),y):e},y.touchable=function(R){return arguments.length?(i=typeof R=="function"?R:hl(!!R),y):i},y.extent=function(R){return arguments.length?(n=typeof R=="function"?R:hl([[+R[0][0],+R[0][1]],[+R[1][0],+R[1][1]]]),y):n},y.scaleExtent=function(R){return arguments.length?(s[0]=+R[0],s[1]=+R[1],y):[s[0],s[1]]},y.translateExtent=function(R){return arguments.length?(a[0][0]=+R[0][0],a[1][0]=+R[1][0],a[0][1]=+R[0][1],a[1][1]=+R[1][1],y):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},y.constrain=function(R){return arguments.length?(r=R,y):r},y.duration=function(R){return arguments.length?(l=+R,y):l},y.interpolate=function(R){return arguments.length?(c=R,y):c},y.on=function(){var R=u.on.apply(u,arguments);return R===u?y:R},y.clickDistance=function(R){return arguments.length?(b=(R=+R)*R,y):Math.sqrt(b)},y.tapDistance=function(R){return arguments.length?(_=+R,y):_},y}class f0 extends Map{constructor(n,r=K7){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),n!=null)for(const[o,i]of n)this.set(o,i)}get(n){return super.get(d0(this,n))}has(n){return super.has(d0(this,n))}set(n,r){return super.set(Y7(this,n),r)}delete(n){return super.delete(X7(this,n))}}function d0({_intern:e,_key:n},r){const o=n(r);return e.has(o)?e.get(o):r}function Y7({_intern:e,_key:n},r){const o=n(r);return e.has(o)?e.get(o):(e.set(o,r),r)}function X7({_intern:e,_key:n},r){const o=n(r);return e.has(o)&&(r=e.get(o),e.delete(o)),r}function K7(e){return e!==null&&typeof e=="object"?e.valueOf():e}function p0(e,n){let r;if(n===void 0)for(const o of e)o!=null&&(r<o||r===void 0&&o>=o)&&(r=o);else{let o=-1;for(let i of e)(i=n(i,++o,e))!=null&&(r<i||r===void 0&&i>=i)&&(r=i)}return r}function h0(e,n){let r;if(n===void 0)for(const o of e)o!=null&&(r>o||r===void 0&&o>=o)&&(r=o);else{let o=-1;for(let i of e)(i=n(i,++o,e))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}function q7(e,n){let r=0;for(let o of e)(o=+o)&&(r+=o);return r}var Z7=typeof global=="object"&&global&&global.Object===Object&&global,Q7=typeof self=="object"&&self&&self.Object===Object&&self,mE=Z7||Q7||Function("return this")(),Bc=mE.Symbol,gE=Object.prototype,J7=gE.hasOwnProperty,eV=gE.toString,Qi=Bc?Bc.toStringTag:void 0;function tV(e){var n=J7.call(e,Qi),r=e[Qi];try{e[Qi]=void 0;var o=!0}catch{}var i=eV.call(e);return o&&(n?e[Qi]=r:delete e[Qi]),i}var nV=Object.prototype,rV=nV.toString;function oV(e){return rV.call(e)}var iV="[object Null]",sV="[object Undefined]",m0=Bc?Bc.toStringTag:void 0;function aV(e){return e==null?e===void 0?sV:iV:m0&&m0 in Object(e)?tV(e):oV(e)}function lV(e){return e!=null&&typeof e=="object"}var cV="[object Symbol]";function uV(e){return typeof e=="symbol"||lV(e)&&aV(e)==cV}var fV=/\s/;function dV(e){for(var n=e.length;n--&&fV.test(e.charAt(n)););return n}var pV=/^\s+/;function hV(e){return e&&e.slice(0,dV(e)+1).replace(pV,"")}function Hc(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}var g0=NaN,mV=/^[-+]0x[0-9a-f]+$/i,gV=/^0b[01]+$/i,yV=/^0o[0-7]+$/i,vV=parseInt;function y0(e){if(typeof e=="number")return e;if(uV(e))return g0;if(Hc(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=Hc(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=hV(e);var r=gV.test(e);return r||yV.test(e)?vV(e.slice(2),r?2:8):mV.test(e)?g0:+e}var sd=function(){return mE.Date.now()},xV="Expected a function",wV=Math.max,bV=Math.min;function yE(e,n,r){var o,i,s,a,l,c,u=0,d=!1,f=!1,p=!0;if(typeof e!="function")throw new TypeError(xV);n=y0(n)||0,Hc(r)&&(d=!!r.leading,f="maxWait"in r,s=f?wV(y0(r.maxWait)||0,n):s,p="trailing"in r?!!r.trailing:p);function m(E){var k=o,N=i;return o=i=void 0,u=E,a=e.apply(N,k),a}function g(E){return u=E,l=setTimeout(y,n),d?m(E):a}function b(E){var k=E-c,N=E-u,j=n-k;return f?bV(j,s-N):j}function _(E){var k=E-c,N=E-u;return c===void 0||k>=n||k<0||f&&N>=s}function y(){var E=sd();if(_(E))return x(E);l=setTimeout(y,b(E))}function x(E){return l=void 0,p&&o?m(E):(o=i=void 0,a)}function w(){l!==void 0&&clearTimeout(l),u=0,o=c=i=l=void 0}function S(){return l===void 0?a:x(sd())}function C(){var E=sd(),k=_(E);if(o=arguments,i=this,c=E,k){if(l===void 0)return g(c);if(f)return clearTimeout(l),l=setTimeout(y,n),m(c)}return l===void 0&&(l=setTimeout(y,n)),a}return C.cancel=w,C.flush=S,C}var _V="Expected a function";function SV(e,n,r){var o=!0,i=!0;if(typeof e!="function")throw new TypeError(_V);return Hc(r)&&(o="leading"in r?!!r.leading:o,i="trailing"in r?!!r.trailing:i),yE(e,n,{leading:o,maxWait:n,trailing:i})}var to=Object.freeze({Linear:Object.freeze({None:function(e){return e},In:function(e){return e},Out:function(e){return e},InOut:function(e){return e}}),Quadratic:Object.freeze({In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}}),Cubic:Object.freeze({In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}}),Quartic:Object.freeze({In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}}),Quintic:Object.freeze({In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}}),Sinusoidal:Object.freeze({In:function(e){return 1-Math.sin((1-e)*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return .5*(1-Math.sin(Math.PI*(.5-e)))}}),Exponential:Object.freeze({In:function(e){return e===0?0:Math.pow(1024,e-1)},Out:function(e){return e===1?1:1-Math.pow(2,-10*e)},InOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)}}),Circular:Object.freeze({In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}}),Elastic:Object.freeze({In:function(e){return e===0?0:e===1?1:-Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI)},Out:function(e){return e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e-.1)*5*Math.PI)+1},InOut:function(e){return e===0?0:e===1?1:(e*=2,e<1?-.5*Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin((e-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(e){var n=1.70158;return e===1?1:e*e*((n+1)*e-n)},Out:function(e){var n=1.70158;return e===0?0:--e*e*((n+1)*e+n)+1},InOut:function(e){var n=2.5949095;return(e*=2)<1?.5*(e*e*((n+1)*e-n)):.5*((e-=2)*e*((n+1)*e+n)+2)}}),Bounce:Object.freeze({In:function(e){return 1-to.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?to.Bounce.In(e*2)*.5:to.Bounce.Out(e*2-1)*.5+.5}}),generatePow:function(e){return e===void 0&&(e=4),e=e<Number.EPSILON?Number.EPSILON:e,e=e>1e4?1e4:e,{In:function(n){return Math.pow(n,e)},Out:function(n){return 1-Math.pow(1-n,e)},InOut:function(n){return n<.5?Math.pow(n*2,e)/2:(1-Math.pow(2-n*2,e))/2+.5}}}}),ps=function(){return performance.now()},vE=function(){function e(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,n)}return e.prototype.getAll=function(){var n=this;return Object.keys(this._tweens).map(function(r){return n._tweens[r]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(){for(var n,r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];for(var i=0,s=r;i<s.length;i++){var a=s[i];(n=a._group)===null||n===void 0||n.remove(a),a._group=this,this._tweens[a.getId()]=a,this._tweensAddedDuringUpdate[a.getId()]=a}},e.prototype.remove=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];for(var o=0,i=n;o<i.length;o++){var s=i[o];s._group=void 0,delete this._tweens[s.getId()],delete this._tweensAddedDuringUpdate[s.getId()]}},e.prototype.allStopped=function(){return this.getAll().every(function(n){return!n.isPlaying()})},e.prototype.update=function(n,r){n===void 0&&(n=ps()),r===void 0&&(r=!0);var o=Object.keys(this._tweens);if(o.length!==0)for(;o.length>0;){this._tweensAddedDuringUpdate={};for(var i=0;i<o.length;i++){var s=this._tweens[o[i]],a=!r;s&&s.update(n,a)===!1&&!r&&this.remove(s)}o=Object.keys(this._tweensAddedDuringUpdate)}},e}(),Vp={Linear:function(e,n){var r=e.length-1,o=r*n,i=Math.floor(o),s=Vp.Utils.Linear;return n<0?s(e[0],e[1],o):n>1?s(e[r],e[r-1],r-o):s(e[i],e[i+1>r?r:i+1],o-i)},Utils:{Linear:function(e,n,r){return(n-e)*r+e}}},xE=function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e}(),Bp=new vE,v0=function(){function e(n,r){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=to.Linear.None,this._interpolationFunction=Vp.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=xE.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=n,typeof r=="object"?(this._group=r,r.add(this)):r===!0&&(this._group=Bp,Bp.add(this))}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.getDuration=function(){return this._duration},e.prototype.to=function(n,r){if(r===void 0&&(r=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=n,this._propertiesAreSetUp=!1,this._duration=r<0?0:r,this},e.prototype.duration=function(n){return n===void 0&&(n=1e3),this._duration=n<0?0:n,this},e.prototype.dynamic=function(n){return n===void 0&&(n=!1),this._isDynamic=n,this},e.prototype.start=function(n,r){if(n===void 0&&(n=ps()),r===void 0&&(r=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var o in this._valuesStartRepeat)this._swapEndStartRepeatValues(o),this._valuesStart[o]=this._valuesStartRepeat[o]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=n,this._startTime+=this._delayTime,!this._propertiesAreSetUp||r){if(this._propertiesAreSetUp=!0,!this._isDynamic){var i={};for(var s in this._valuesEnd)i[s]=this._valuesEnd[s];this._valuesEnd=i}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,r)}return this},e.prototype.startFromCurrentValues=function(n){return this.start(n,!0)},e.prototype._setupProperties=function(n,r,o,i,s){for(var a in o){var l=n[a],c=Array.isArray(l),u=c?"array":typeof l,d=!c&&Array.isArray(o[a]);if(!(u==="undefined"||u==="function")){if(d){var f=o[a];if(f.length===0)continue;for(var p=[l],m=0,g=f.length;m<g;m+=1){var b=this._handleRelativeValue(l,f[m]);if(isNaN(b)){d=!1,console.warn("Found invalid interpolation list. Skipping.");break}p.push(b)}d&&(o[a]=p)}if((u==="object"||c)&&l&&!d){r[a]=c?[]:{};var _=l;for(var y in _)r[a][y]=_[y];i[a]=c?[]:{};var f=o[a];if(!this._isDynamic){var x={};for(var y in f)x[y]=f[y];o[a]=f=x}this._setupProperties(_,r[a],f,i[a],s)}else(typeof r[a]>"u"||s)&&(r[a]=l),c||(r[a]*=1),d?i[a]=o[a].slice().reverse():i[a]=r[a]||0}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},e.prototype.pause=function(n){return n===void 0&&(n=ps()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=n,this)},e.prototype.resume=function(n){return n===void 0&&(n=ps()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=n-this._pauseStart,this._pauseStart=0,this)},e.prototype.stopChainedTweens=function(){for(var n=0,r=this._chainedTweens.length;n<r;n++)this._chainedTweens[n].stop();return this},e.prototype.group=function(n){return n?(n.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},e.prototype.remove=function(){var n;return(n=this._group)===null||n===void 0||n.remove(this),this},e.prototype.delay=function(n){return n===void 0&&(n=0),this._delayTime=n,this},e.prototype.repeat=function(n){return n===void 0&&(n=0),this._initialRepeat=n,this._repeat=n,this},e.prototype.repeatDelay=function(n){return this._repeatDelayTime=n,this},e.prototype.yoyo=function(n){return n===void 0&&(n=!1),this._yoyo=n,this},e.prototype.easing=function(n){return n===void 0&&(n=to.Linear.None),this._easingFunction=n,this},e.prototype.interpolation=function(n){return n===void 0&&(n=Vp.Linear),this._interpolationFunction=n,this},e.prototype.chain=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return this._chainedTweens=n,this},e.prototype.onStart=function(n){return this._onStartCallback=n,this},e.prototype.onEveryStart=function(n){return this._onEveryStartCallback=n,this},e.prototype.onUpdate=function(n){return this._onUpdateCallback=n,this},e.prototype.onRepeat=function(n){return this._onRepeatCallback=n,this},e.prototype.onComplete=function(n){return this._onCompleteCallback=n,this},e.prototype.onStop=function(n){return this._onStopCallback=n,this},e.prototype.update=function(n,r){var o=this,i;if(n===void 0&&(n=ps()),r===void 0&&(r=e.autoStartOnUpdate),this._isPaused)return!0;var s;if(!this._goToEnd&&!this._isPlaying)if(r)this.start(n,!0);else return!1;if(this._goToEnd=!1,n<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var a=n-this._startTime,l=this._duration+((i=this._repeatDelayTime)!==null&&i!==void 0?i:this._delayTime),c=this._duration+this._repeat*l,u=function(){if(o._duration===0||a>c)return 1;var b=Math.trunc(a/l),_=a-b*l,y=Math.min(_/o._duration,1);return y===0&&a===o._duration?1:y},d=u(),f=this._easingFunction(d);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,f),this._onUpdateCallback&&this._onUpdateCallback(this._object,d),this._duration===0||a>=this._duration)if(this._repeat>0){var p=Math.min(Math.trunc((a-this._duration)/l)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=p);for(s in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[s]=="string"&&(this._valuesStartRepeat[s]=this._valuesStartRepeat[s]+parseFloat(this._valuesEnd[s])),this._yoyo&&this._swapEndStartRepeatValues(s),this._valuesStart[s]=this._valuesStartRepeat[s];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=l*p,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var m=0,g=this._chainedTweens.length;m<g;m++)this._chainedTweens[m].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(n,r,o,i){for(var s in o)if(r[s]!==void 0){var a=r[s]||0,l=o[s],c=Array.isArray(n[s]),u=Array.isArray(l),d=!c&&u;d?n[s]=this._interpolationFunction(l,i):typeof l=="object"&&l?this._updateProperties(n[s],a,l,i):(l=this._handleRelativeValue(a,l),typeof l=="number"&&(n[s]=a+(l-a)*i))}},e.prototype._handleRelativeValue=function(n,r){return typeof r!="string"?r:r.charAt(0)==="+"||r.charAt(0)==="-"?n+parseFloat(r):parseFloat(r)},e.prototype._swapEndStartRepeatValues=function(n){var r=this._valuesStartRepeat[n],o=this._valuesEnd[n];typeof o=="string"?this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(o):this._valuesStartRepeat[n]=this._valuesEnd[n],this._valuesEnd[n]=r},e.autoStartOnUpdate=!1,e}();xE.nextId;var Sn=Bp;Sn.getAll.bind(Sn);Sn.removeAll.bind(Sn);Sn.add.bind(Sn);Sn.remove.bind(Sn);Sn.update.bind(Sn);function x0(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,o=Array(n);r<n;r++)o[r]=e[r];return o}function CV(e){if(Array.isArray(e))return e}function EV(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function kV(e,n,r){return Object.defineProperty(e,"prototype",{writable:!1}),e}function NV(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var o,i,s,a,l=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,n!==0)for(;!(c=(o=s.call(r)).done)&&(l.push(o.value),l.length!==n);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}function PV(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
324
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RV(e,n){return CV(e)||NV(e,n)||MV(e,n)||PV()}function MV(e,n){if(e){if(typeof e=="string")return x0(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?x0(e,n):void 0}}var jV=kV(function e(n,r){var o=r.default,i=o===void 0?null:o,s=r.triggerUpdate,a=s===void 0?!0:s,l=r.onChange,c=l===void 0?function(u,d){}:l;EV(this,e),this.name=n,this.defaultVal=i,this.triggerUpdate=a,this.onChange=c});function ng(e){var n=e.stateInit,r=n===void 0?function(){return{}}:n,o=e.props,i=o===void 0?{}:o,s=e.methods,a=s===void 0?{}:s,l=e.aliases,c=l===void 0?{}:l,u=e.init,d=u===void 0?function(){}:u,f=e.update,p=f===void 0?function(){}:f,m=Object.keys(i).map(function(g){return new jV(g,i[g])});return function g(){for(var b=arguments.length,_=new Array(b),y=0;y<b;y++)_[y]=arguments[y];var x=!!(this instanceof g&&this.constructor),w=x?_.shift():void 0,S=_[0],C=S===void 0?{}:S,E=Object.assign({},r instanceof Function?r(C):r,{initialised:!1}),k={};function N(I){return j(I,C),$(),N}var j=function(O,H){d.call(N,O,E,H),E.initialised=!0},$=yE(function(){E.initialised&&(p.call(N,E,k),k={})},1);return m.forEach(function(I){N[I.name]=O(I);function O(H){var R=H.name,L=H.triggerUpdate,D=L===void 0?!1:L,z=H.onChange,A=z===void 0?function(W,T){}:z,M=H.defaultVal,P=M===void 0?null:M;return function(W){var T=E[R];if(!arguments.length)return T;var X=W===void 0?P:W;return E[R]=X,A.call(N,X,E,T),!k.hasOwnProperty(R)&&(k[R]=T),D&&$(),N}}}),Object.keys(a).forEach(function(I){N[I]=function(){for(var O,H=arguments.length,R=new Array(H),L=0;L<H;L++)R[L]=arguments[L];return(O=a[I]).call.apply(O,[N,E].concat(R))}}),Object.entries(c).forEach(function(I){var O=RV(I,2),H=O[0],R=O[1];return N[H]=N[R]}),N.resetProps=function(){return m.forEach(function(I){N[I.name](I.defaultVal)}),N},N.resetProps(),E._rerender=$,x&&w&&N(w),N}}var ve=function(e){return typeof e=="function"?e:typeof e=="string"?function(n){return n[e]}:function(n){return e}};function Wc(e){"@babel/helpers - typeof";return Wc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Wc(e)}var AV=/^\s+/,TV=/\s+$/;function ae(e,n){if(e=e||"",n=n||{},e instanceof ae)return e;if(!(this instanceof ae))return new ae(e,n);var r=IV(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=n.format||r.format,this._gradientType=n.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}ae.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var n=this.toRgb();return(n.r*299+n.g*587+n.b*114)/1e3},getLuminance:function(){var n=this.toRgb(),r,o,i,s,a,l;return r=n.r/255,o=n.g/255,i=n.b/255,r<=.03928?s=r/12.92:s=Math.pow((r+.055)/1.055,2.4),o<=.03928?a=o/12.92:a=Math.pow((o+.055)/1.055,2.4),i<=.03928?l=i/12.92:l=Math.pow((i+.055)/1.055,2.4),.2126*s+.7152*a+.0722*l},setAlpha:function(n){return this._a=wE(n),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var n=b0(this._r,this._g,this._b);return{h:n.h*360,s:n.s,v:n.v,a:this._a}},toHsvString:function(){var n=b0(this._r,this._g,this._b),r=Math.round(n.h*360),o=Math.round(n.s*100),i=Math.round(n.v*100);return this._a==1?"hsv("+r+", "+o+"%, "+i+"%)":"hsva("+r+", "+o+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var n=w0(this._r,this._g,this._b);return{h:n.h*360,s:n.s,l:n.l,a:this._a}},toHslString:function(){var n=w0(this._r,this._g,this._b),r=Math.round(n.h*360),o=Math.round(n.s*100),i=Math.round(n.l*100);return this._a==1?"hsl("+r+", "+o+"%, "+i+"%)":"hsla("+r+", "+o+"%, "+i+"%, "+this._roundA+")"},toHex:function(n){return _0(this._r,this._g,this._b,n)},toHexString:function(n){return"#"+this.toHex(n)},toHex8:function(n){return LV(this._r,this._g,this._b,this._a,n)},toHex8String:function(n){return"#"+this.toHex8(n)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(ke(this._r,255)*100)+"%",g:Math.round(ke(this._g,255)*100)+"%",b:Math.round(ke(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(ke(this._r,255)*100)+"%, "+Math.round(ke(this._g,255)*100)+"%, "+Math.round(ke(this._b,255)*100)+"%)":"rgba("+Math.round(ke(this._r,255)*100)+"%, "+Math.round(ke(this._g,255)*100)+"%, "+Math.round(ke(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:qV[_0(this._r,this._g,this._b,!0)]||!1},toFilter:function(n){var r="#"+S0(this._r,this._g,this._b,this._a),o=r,i=this._gradientType?"GradientType = 1, ":"";if(n){var s=ae(n);o="#"+S0(s._r,s._g,s._b,s._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+r+",endColorstr="+o+")"},toString:function(n){var r=!!n;n=n||this._format;var o=!1,i=this._a<1&&this._a>=0,s=!r&&i&&(n==="hex"||n==="hex6"||n==="hex3"||n==="hex4"||n==="hex8"||n==="name");return s?n==="name"&&this._a===0?this.toName():this.toRgbString():(n==="rgb"&&(o=this.toRgbString()),n==="prgb"&&(o=this.toPercentageRgbString()),(n==="hex"||n==="hex6")&&(o=this.toHexString()),n==="hex3"&&(o=this.toHexString(!0)),n==="hex4"&&(o=this.toHex8String(!0)),n==="hex8"&&(o=this.toHex8String()),n==="name"&&(o=this.toName()),n==="hsl"&&(o=this.toHslString()),n==="hsv"&&(o=this.toHsvString()),o||this.toHexString())},clone:function(){return ae(this.toString())},_applyModification:function(n,r){var o=n.apply(null,[this].concat([].slice.call(r)));return this._r=o._r,this._g=o._g,this._b=o._b,this.setAlpha(o._a),this},lighten:function(){return this._applyModification(BV,arguments)},brighten:function(){return this._applyModification(HV,arguments)},darken:function(){return this._applyModification(WV,arguments)},desaturate:function(){return this._applyModification(zV,arguments)},saturate:function(){return this._applyModification(FV,arguments)},greyscale:function(){return this._applyModification(VV,arguments)},spin:function(){return this._applyModification(UV,arguments)},_applyCombination:function(n,r){return n.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(XV,arguments)},complement:function(){return this._applyCombination(GV,arguments)},monochromatic:function(){return this._applyCombination(KV,arguments)},splitcomplement:function(){return this._applyCombination(YV,arguments)},triad:function(){return this._applyCombination(C0,[3])},tetrad:function(){return this._applyCombination(C0,[4])}};ae.fromRatio=function(e,n){if(Wc(e)=="object"){var r={};for(var o in e)e.hasOwnProperty(o)&&(o==="a"?r[o]=e[o]:r[o]=hs(e[o]));e=r}return ae(e,n)};function IV(e){var n={r:0,g:0,b:0},r=1,o=null,i=null,s=null,a=!1,l=!1;return typeof e=="string"&&(e=eB(e)),Wc(e)=="object"&&(Rn(e.r)&&Rn(e.g)&&Rn(e.b)?(n=$V(e.r,e.g,e.b),a=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Rn(e.h)&&Rn(e.s)&&Rn(e.v)?(o=hs(e.s),i=hs(e.v),n=DV(e.h,o,i),a=!0,l="hsv"):Rn(e.h)&&Rn(e.s)&&Rn(e.l)&&(o=hs(e.s),s=hs(e.l),n=OV(e.h,o,s),a=!0,l="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=wE(r),{ok:a,format:e.format||l,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:r}}function $V(e,n,r){return{r:ke(e,255)*255,g:ke(n,255)*255,b:ke(r,255)*255}}function w0(e,n,r){e=ke(e,255),n=ke(n,255),r=ke(r,255);var o=Math.max(e,n,r),i=Math.min(e,n,r),s,a,l=(o+i)/2;if(o==i)s=a=0;else{var c=o-i;switch(a=l>.5?c/(2-o-i):c/(o+i),o){case e:s=(n-r)/c+(n<r?6:0);break;case n:s=(r-e)/c+2;break;case r:s=(e-n)/c+4;break}s/=6}return{h:s,s:a,l}}function OV(e,n,r){var o,i,s;e=ke(e,360),n=ke(n,100),r=ke(r,100);function a(u,d,f){return f<0&&(f+=1),f>1&&(f-=1),f<1/6?u+(d-u)*6*f:f<1/2?d:f<2/3?u+(d-u)*(2/3-f)*6:u}if(n===0)o=i=s=r;else{var l=r<.5?r*(1+n):r+n-r*n,c=2*r-l;o=a(c,l,e+1/3),i=a(c,l,e),s=a(c,l,e-1/3)}return{r:o*255,g:i*255,b:s*255}}function b0(e,n,r){e=ke(e,255),n=ke(n,255),r=ke(r,255);var o=Math.max(e,n,r),i=Math.min(e,n,r),s,a,l=o,c=o-i;if(a=o===0?0:c/o,o==i)s=0;else{switch(o){case e:s=(n-r)/c+(n<r?6:0);break;case n:s=(r-e)/c+2;break;case r:s=(e-n)/c+4;break}s/=6}return{h:s,s:a,v:l}}function DV(e,n,r){e=ke(e,360)*6,n=ke(n,100),r=ke(r,100);var o=Math.floor(e),i=e-o,s=r*(1-n),a=r*(1-i*n),l=r*(1-(1-i)*n),c=o%6,u=[r,a,s,s,l,r][c],d=[l,r,r,a,s,s][c],f=[s,s,l,r,r,a][c];return{r:u*255,g:d*255,b:f*255}}function _0(e,n,r,o){var i=[Jt(Math.round(e).toString(16)),Jt(Math.round(n).toString(16)),Jt(Math.round(r).toString(16))];return o&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function LV(e,n,r,o,i){var s=[Jt(Math.round(e).toString(16)),Jt(Math.round(n).toString(16)),Jt(Math.round(r).toString(16)),Jt(bE(o))];return i&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)&&s[3].charAt(0)==s[3].charAt(1)?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}function S0(e,n,r,o){var i=[Jt(bE(o)),Jt(Math.round(e).toString(16)),Jt(Math.round(n).toString(16)),Jt(Math.round(r).toString(16))];return i.join("")}ae.equals=function(e,n){return!e||!n?!1:ae(e).toRgbString()==ae(n).toRgbString()};ae.random=function(){return ae.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function zV(e,n){n=n===0?0:n||10;var r=ae(e).toHsl();return r.s-=n/100,r.s=Zu(r.s),ae(r)}function FV(e,n){n=n===0?0:n||10;var r=ae(e).toHsl();return r.s+=n/100,r.s=Zu(r.s),ae(r)}function VV(e){return ae(e).desaturate(100)}function BV(e,n){n=n===0?0:n||10;var r=ae(e).toHsl();return r.l+=n/100,r.l=Zu(r.l),ae(r)}function HV(e,n){n=n===0?0:n||10;var r=ae(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(n/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(n/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(n/100)))),ae(r)}function WV(e,n){n=n===0?0:n||10;var r=ae(e).toHsl();return r.l-=n/100,r.l=Zu(r.l),ae(r)}function UV(e,n){var r=ae(e).toHsl(),o=(r.h+n)%360;return r.h=o<0?360+o:o,ae(r)}function GV(e){var n=ae(e).toHsl();return n.h=(n.h+180)%360,ae(n)}function C0(e,n){if(isNaN(n)||n<=0)throw new Error("Argument to polyad must be a positive number");for(var r=ae(e).toHsl(),o=[ae(e)],i=360/n,s=1;s<n;s++)o.push(ae({h:(r.h+s*i)%360,s:r.s,l:r.l}));return o}function YV(e){var n=ae(e).toHsl(),r=n.h;return[ae(e),ae({h:(r+72)%360,s:n.s,l:n.l}),ae({h:(r+216)%360,s:n.s,l:n.l})]}function XV(e,n,r){n=n||6,r=r||30;var o=ae(e).toHsl(),i=360/r,s=[ae(e)];for(o.h=(o.h-(i*n>>1)+720)%360;--n;)o.h=(o.h+i)%360,s.push(ae(o));return s}function KV(e,n){n=n||6;for(var r=ae(e).toHsv(),o=r.h,i=r.s,s=r.v,a=[],l=1/n;n--;)a.push(ae({h:o,s:i,v:s})),s=(s+l)%1;return a}ae.mix=function(e,n,r){r=r===0?0:r||50;var o=ae(e).toRgb(),i=ae(n).toRgb(),s=r/100,a={r:(i.r-o.r)*s+o.r,g:(i.g-o.g)*s+o.g,b:(i.b-o.b)*s+o.b,a:(i.a-o.a)*s+o.a};return ae(a)};ae.readability=function(e,n){var r=ae(e),o=ae(n);return(Math.max(r.getLuminance(),o.getLuminance())+.05)/(Math.min(r.getLuminance(),o.getLuminance())+.05)};ae.isReadable=function(e,n,r){var o=ae.readability(e,n),i,s;switch(s=!1,i=tB(r),i.level+i.size){case"AAsmall":case"AAAlarge":s=o>=4.5;break;case"AAlarge":s=o>=3;break;case"AAAsmall":s=o>=7;break}return s};ae.mostReadable=function(e,n,r){var o=null,i=0,s,a,l,c;r=r||{},a=r.includeFallbackColors,l=r.level,c=r.size;for(var u=0;u<n.length;u++)s=ae.readability(e,n[u]),s>i&&(i=s,o=ae(n[u]));return ae.isReadable(e,o,{level:l,size:c})||!a?o:(r.includeFallbackColors=!1,ae.mostReadable(e,["#fff","#000"],r))};var Hp=ae.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},qV=ae.hexNames=ZV(Hp);function ZV(e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[e[r]]=r);return n}function wE(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function ke(e,n){QV(e)&&(e="100%");var r=JV(e);return e=Math.min(n,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*n,10)/100),Math.abs(e-n)<1e-6?1:e%n/parseFloat(n)}function Zu(e){return Math.min(1,Math.max(0,e))}function bt(e){return parseInt(e,16)}function QV(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function JV(e){return typeof e=="string"&&e.indexOf("%")!=-1}function Jt(e){return e.length==1?"0"+e:""+e}function hs(e){return e<=1&&(e=e*100+"%"),e}function bE(e){return Math.round(parseFloat(e)*255).toString(16)}function E0(e){return bt(e)/255}var Gt=function(){var e="[-\\+]?\\d+%?",n="[-\\+]?\\d*\\.\\d+%?",r="(?:"+n+")|(?:"+e+")",o="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",i="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+o),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+o),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+o),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Rn(e){return!!Gt.CSS_UNIT.exec(e)}function eB(e){e=e.replace(AV,"").replace(TV,"").toLowerCase();var n=!1;if(Hp[e])e=Hp[e],n=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=Gt.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=Gt.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=Gt.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=Gt.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=Gt.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=Gt.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=Gt.hex8.exec(e))?{r:bt(r[1]),g:bt(r[2]),b:bt(r[3]),a:E0(r[4]),format:n?"name":"hex8"}:(r=Gt.hex6.exec(e))?{r:bt(r[1]),g:bt(r[2]),b:bt(r[3]),format:n?"name":"hex"}:(r=Gt.hex4.exec(e))?{r:bt(r[1]+""+r[1]),g:bt(r[2]+""+r[2]),b:bt(r[3]+""+r[3]),a:E0(r[4]+""+r[4]),format:n?"name":"hex8"}:(r=Gt.hex3.exec(e))?{r:bt(r[1]+""+r[1]),g:bt(r[2]+""+r[2]),b:bt(r[3]+""+r[3]),format:n?"name":"hex"}:!1}function tB(e){var n,r;return e=e||{level:"AA",size:"small"},n=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),n!=="AA"&&n!=="AAA"&&(n="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:n,size:r}}function Wp(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,o=Array(n);r<n;r++)o[r]=e[r];return o}function nB(e){if(Array.isArray(e))return Wp(e)}function _E(e,n,r){if(typeof e=="function"?e===n:e.has(n))return arguments.length<3?n:r;throw new TypeError("Private element is not present on this object")}function rB(e,n){if(n.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function oB(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Tt(e,n){return e.get(_E(e,n))}function k0(e,n,r){rB(e,n),n.set(e,r)}function N0(e,n,r){return e.set(_E(e,n),r),r}function iB(e,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,fB(o.key),o)}}function sB(e,n,r){return n&&iB(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function aB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function lB(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
325
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cB(e){return nB(e)||aB(e)||dB(e)||lB()}function uB(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,n);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function fB(e){var n=uB(e,"string");return typeof n=="symbol"?n:n+""}function dB(e,n){if(e){if(typeof e=="string")return Wp(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Wp(e,n):void 0}}var pB=123,hB=function(n){return"#".concat(Math.min(n,Math.pow(2,24)).toString(16).padStart(6,"0"))},SE=function(n,r,o){return(n<<16)+(r<<8)+o},mB=function(n){var r=ae(n).toRgb(),o=r.r,i=r.g,s=r.b;return SE(o,i,s)},P0=function(n,r){return n*pB%Math.pow(2,r)},Hr=new WeakMap,Mn=new WeakMap,gB=function(){function e(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:6;oB(this,e),k0(this,Hr,void 0),k0(this,Mn,void 0),N0(Mn,this,n),this.reset()}return sB(e,[{key:"reset",value:function(){N0(Hr,this,["__reserved for background__"])}},{key:"register",value:function(r){if(Tt(Hr,this).length>=Math.pow(2,24-Tt(Mn,this)))return null;var o=Tt(Hr,this).length,i=P0(o,Tt(Mn,this)),s=hB(o+(i<<24-Tt(Mn,this)));return Tt(Hr,this).push(r),s}},{key:"lookup",value:function(r){if(!r)return null;var o=typeof r=="string"?mB(r):SE.apply(void 0,cB(r));if(!o)return null;var i=o&Math.pow(2,24-Tt(Mn,this))-1,s=o>>24-Tt(Mn,this)&Math.pow(2,Tt(Mn,this))-1;return P0(i,Tt(Mn,this))!==s||i>=Tt(Hr,this).length?null:Tt(Hr,this)[i]}}])}(),Aa,Pe,CE,EE,lr,R0,kE,NE,ad,Yl,Es,PE,rg,Up,Gp,Uc={},Gc=[],yB=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Qu=Array.isArray;function yn(e,n){for(var r in n)e[r]=n[r];return e}function og(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function vB(e,n,r){var o,i,s,a={};for(s in n)s=="key"?o=n[s]:s=="ref"?i=n[s]:a[s]=n[s];if(arguments.length>2&&(a.children=arguments.length>3?Aa.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)a[s]===void 0&&(a[s]=e.defaultProps[s]);return ks(e,a,o,i,null)}function ks(e,n,r,o,i){var s={type:e,props:n,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++CE,__i:-1,__u:0};return i==null&&Pe.vnode!=null&&Pe.vnode(s),s}function Ju(e){return e.children}function Xl(e,n){this.props=e,this.context=n}function xi(e,n){if(n==null)return e.__?xi(e.__,e.__i+1):null;for(var r;n<e.__k.length;n++)if((r=e.__k[n])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?xi(e):null}function xB(e){if(e.__P&&e.__d){var n=e.__v,r=n.__e,o=[],i=[],s=yn({},n);s.__v=n.__v+1,Pe.vnode&&Pe.vnode(s),ig(e.__P,s,n,e.__n,e.__P.namespaceURI,32&n.__u?[r]:null,o,r??xi(n),!!(32&n.__u),i),s.__v=n.__v,s.__.__k[s.__i]=s,AE(o,s,i),n.__e=n.__=null,s.__e!=r&&RE(s)}}function RE(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(n){if(n!=null&&n.__e!=null)return e.__e=e.__c.base=n.__e}),RE(e)}function M0(e){(!e.__d&&(e.__d=!0)&&lr.push(e)&&!Yc.__r++||R0!=Pe.debounceRendering)&&((R0=Pe.debounceRendering)||kE)(Yc)}function Yc(){try{for(var e,n=1;lr.length;)lr.length>n&&lr.sort(NE),e=lr.shift(),n=lr.length,xB(e)}finally{lr.length=Yc.__r=0}}function ME(e,n,r,o,i,s,a,l,c,u,d){var f,p,m,g,b,_,y,x=o&&o.__k||Gc,w=n.length;for(c=wB(r,n,x,c,w),f=0;f<w;f++)(m=r.__k[f])!=null&&(p=m.__i!=-1&&x[m.__i]||Uc,m.__i=f,_=ig(e,m,p,i,s,a,l,c,u,d),g=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&sg(p.ref,null,m),d.push(m.ref,m.__c||g,m)),b==null&&g!=null&&(b=g),(y=!!(4&m.__u))||p.__k===m.__k?(c=jE(m,c,e,y),y&&p.__e&&(p.__e=null)):typeof m.type=="function"&&_!==void 0?c=_:g&&(c=g.nextSibling),m.__u&=-7);return r.__e=b,c}function wB(e,n,r,o,i){var s,a,l,c,u,d=r.length,f=d,p=0;for(e.__k=new Array(i),s=0;s<i;s++)(a=n[s])!=null&&typeof a!="boolean"&&typeof a!="function"?(typeof a=="string"||typeof a=="number"||typeof a=="bigint"||a.constructor==String?a=e.__k[s]=ks(null,a,null,null,null):Qu(a)?a=e.__k[s]=ks(Ju,{children:a},null,null,null):a.constructor===void 0&&a.__b>0?a=e.__k[s]=ks(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):e.__k[s]=a,c=s+p,a.__=e,a.__b=e.__b+1,l=null,(u=a.__i=bB(a,r,c,f))!=-1&&(f--,(l=r[u])&&(l.__u|=2)),l==null||l.__v==null?(u==-1&&(i>d?p--:i<d&&p++),typeof a.type!="function"&&(a.__u|=4)):u!=c&&(u==c-1?p--:u==c+1?p++:(u>c?p--:p++,a.__u|=4))):e.__k[s]=null;if(f)for(s=0;s<d;s++)(l=r[s])!=null&&!(2&l.__u)&&(l.__e==o&&(o=xi(l)),IE(l,l));return o}function jE(e,n,r,o){var i,s;if(typeof e.type=="function"){for(i=e.__k,s=0;i&&s<i.length;s++)i[s]&&(i[s].__=e,n=jE(i[s],n,r,o));return n}e.__e!=n&&(o&&(n&&e.type&&!n.parentNode&&(n=xi(e)),r.insertBefore(e.__e,n||null)),n=e.__e);do n=n&&n.nextSibling;while(n!=null&&n.nodeType==8);return n}function bB(e,n,r,o){var i,s,a,l=e.key,c=e.type,u=n[r],d=u!=null&&(2&u.__u)==0;if(u===null&&l==null||d&&l==u.key&&c==u.type)return r;if(o>(d?1:0)){for(i=r-1,s=r+1;i>=0||s<n.length;)if((u=n[a=i>=0?i--:s++])!=null&&!(2&u.__u)&&l==u.key&&c==u.type)return a}return-1}function j0(e,n,r){n[0]=="-"?e.setProperty(n,r??""):e[n]=r==null?"":typeof r!="number"||yB.test(n)?r:r+"px"}function ml(e,n,r,o,i){var s,a;e:if(n=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof o=="string"&&(e.style.cssText=o=""),o)for(n in o)r&&n in r||j0(e.style,n,"");if(r)for(n in r)o&&r[n]==o[n]||j0(e.style,n,r[n])}else if(n[0]=="o"&&n[1]=="n")s=n!=(n=n.replace(PE,"$1")),a=n.toLowerCase(),n=a in e||n=="onFocusOut"||n=="onFocusIn"?a.slice(2):n.slice(2),e.l||(e.l={}),e.l[n+s]=r,r?o?r[Es]=o[Es]:(r[Es]=rg,e.addEventListener(n,s?Gp:Up,s)):e.removeEventListener(n,s?Gp:Up,s);else{if(i=="http://www.w3.org/2000/svg")n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(n!="width"&&n!="height"&&n!="href"&&n!="list"&&n!="form"&&n!="tabIndex"&&n!="download"&&n!="rowSpan"&&n!="colSpan"&&n!="role"&&n!="popover"&&n in e)try{e[n]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&n[4]!="-"?e.removeAttribute(n):e.setAttribute(n,n=="popover"&&r==1?"":r))}}function A0(e){return function(n){if(this.l){var r=this.l[n.type+e];if(n[Yl]==null)n[Yl]=rg++;else if(n[Yl]<r[Es])return;return r(Pe.event?Pe.event(n):n)}}}function ig(e,n,r,o,i,s,a,l,c,u){var d,f,p,m,g,b,_,y,x,w,S,C,E,k,N,j=n.type;if(n.constructor!==void 0)return null;128&r.__u&&(c=!!(32&r.__u),s=[l=n.__e=r.__e]),(d=Pe.__b)&&d(n);e:if(typeof j=="function")try{if(y=n.props,x=j.prototype&&j.prototype.render,w=(d=j.contextType)&&o[d.__c],S=d?w?w.props.value:d.__:o,r.__c?_=(f=n.__c=r.__c).__=f.__E:(x?n.__c=f=new j(y,S):(n.__c=f=new Xl(y,S),f.constructor=j,f.render=SB),w&&w.sub(f),f.state||(f.state={}),f.__n=o,p=f.__d=!0,f.__h=[],f._sb=[]),x&&f.__s==null&&(f.__s=f.state),x&&j.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=yn({},f.__s)),yn(f.__s,j.getDerivedStateFromProps(y,f.__s))),m=f.props,g=f.state,f.__v=n,p)x&&j.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),x&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(x&&j.getDerivedStateFromProps==null&&y!==m&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(y,S),n.__v==r.__v||!f.__e&&f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(y,f.__s,S)===!1){n.__v!=r.__v&&(f.props=y,f.state=f.__s,f.__d=!1),n.__e=r.__e,n.__k=r.__k,n.__k.some(function($){$&&($.__=n)}),Gc.push.apply(f.__h,f._sb),f._sb=[],f.__h.length&&a.push(f);break e}f.componentWillUpdate!=null&&f.componentWillUpdate(y,f.__s,S),x&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(m,g,b)})}if(f.context=S,f.props=y,f.__P=e,f.__e=!1,C=Pe.__r,E=0,x)f.state=f.__s,f.__d=!1,C&&C(n),d=f.render(f.props,f.state,f.context),Gc.push.apply(f.__h,f._sb),f._sb=[];else do f.__d=!1,C&&C(n),d=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++E<25);f.state=f.__s,f.getChildContext!=null&&(o=yn(yn({},o),f.getChildContext())),x&&!p&&f.getSnapshotBeforeUpdate!=null&&(b=f.getSnapshotBeforeUpdate(m,g)),k=d!=null&&d.type===Ju&&d.key==null?TE(d.props.children):d,l=ME(e,Qu(k)?k:[k],n,r,o,i,s,a,l,c,u),f.base=n.__e,n.__u&=-161,f.__h.length&&a.push(f),_&&(f.__E=f.__=null)}catch($){if(n.__v=null,c||s!=null)if($.then){for(n.__u|=c?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;s[s.indexOf(l)]=null,n.__e=l}else{for(N=s.length;N--;)og(s[N]);Yp(n)}else n.__e=r.__e,n.__k=r.__k,$.then||Yp(n);Pe.__e($,n,r)}else s==null&&n.__v==r.__v?(n.__k=r.__k,n.__e=r.__e):l=n.__e=_B(r.__e,n,r,o,i,s,a,c,u);return(d=Pe.diffed)&&d(n),128&n.__u?void 0:l}function Yp(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(Yp))}function AE(e,n,r){for(var o=0;o<r.length;o++)sg(r[o],r[++o],r[++o]);Pe.__c&&Pe.__c(n,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(s){s.call(i)})}catch(s){Pe.__e(s,i.__v)}})}function TE(e){return typeof e!="object"||e==null||e.__b>0?e:Qu(e)?e.map(TE):yn({},e)}function _B(e,n,r,o,i,s,a,l,c){var u,d,f,p,m,g,b,_=r.props||Uc,y=n.props,x=n.type;if(x=="svg"?i="http://www.w3.org/2000/svg":x=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),s!=null){for(u=0;u<s.length;u++)if((m=s[u])&&"setAttribute"in m==!!x&&(x?m.localName==x:m.nodeType==3)){e=m,s[u]=null;break}}if(e==null){if(x==null)return document.createTextNode(y);e=document.createElementNS(i,x,y.is&&y),l&&(Pe.__m&&Pe.__m(n,s),l=!1),s=null}if(x==null)_===y||l&&e.data==y||(e.data=y);else{if(s=s&&Aa.call(e.childNodes),!l&&s!=null)for(_={},u=0;u<e.attributes.length;u++)_[(m=e.attributes[u]).name]=m.value;for(u in _)m=_[u],u=="dangerouslySetInnerHTML"?f=m:u=="children"||u in y||u=="value"&&"defaultValue"in y||u=="checked"&&"defaultChecked"in y||ml(e,u,null,m,i);for(u in y)m=y[u],u=="children"?p=m:u=="dangerouslySetInnerHTML"?d=m:u=="value"?g=m:u=="checked"?b=m:l&&typeof m!="function"||_[u]===m||ml(e,u,m,_[u],i);if(d)l||f&&(d.__html==f.__html||d.__html==e.innerHTML)||(e.innerHTML=d.__html),n.__k=[];else if(f&&(e.innerHTML=""),ME(n.type=="template"?e.content:e,Qu(p)?p:[p],n,r,o,x=="foreignObject"?"http://www.w3.org/1999/xhtml":i,s,a,s?s[0]:r.__k&&xi(r,0),l,c),s!=null)for(u=s.length;u--;)og(s[u]);l||(u="value",x=="progress"&&g==null?e.removeAttribute("value"):g!=null&&(g!==e[u]||x=="progress"&&!g||x=="option"&&g!=_[u])&&ml(e,u,g,_[u],i),u="checked",b!=null&&b!=e[u]&&ml(e,u,b,_[u],i))}return e}function sg(e,n,r){try{if(typeof e=="function"){var o=typeof e.__u=="function";o&&e.__u(),o&&n==null||(e.__u=e(n))}else e.current=n}catch(i){Pe.__e(i,r)}}function IE(e,n,r){var o,i;if(Pe.unmount&&Pe.unmount(e),(o=e.ref)&&(o.current&&o.current!=e.__e||sg(o,null,n)),(o=e.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(s){Pe.__e(s,n)}o.base=o.__P=null}if(o=e.__k)for(i=0;i<o.length;i++)o[i]&&IE(o[i],n,r||typeof e.type!="function");r||og(e.__e),e.__c=e.__=e.__e=void 0}function SB(e,n,r){return this.constructor(e,r)}function CB(e,n,r){var o,i,s,a;n==document&&(n=document.documentElement),Pe.__&&Pe.__(e,n),i=(o=!1)?null:n.__k,s=[],a=[],ig(n,e=n.__k=vB(Ju,null,[e]),i||Uc,Uc,n.namespaceURI,i?null:n.firstChild?Aa.call(n.childNodes):null,s,i?i.__e:n.firstChild,o,a),AE(s,e,a)}function $E(e,n,r){var o,i,s,a,l=yn({},e.props);for(s in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),n)s=="key"?o=n[s]:s=="ref"?i=n[s]:l[s]=n[s]===void 0&&a!=null?a[s]:n[s];return arguments.length>2&&(l.children=arguments.length>3?Aa.call(arguments,2):r),ks(e.type,l,o||e.key,i||e.ref,null)}Aa=Gc.slice,Pe={__e:function(e,n,r,o){for(var i,s,a;n=n.__;)if((i=n.__c)&&!i.__)try{if((s=i.constructor)&&s.getDerivedStateFromError!=null&&(i.setState(s.getDerivedStateFromError(e)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,o||{}),a=i.__d),a)return i.__E=i}catch(l){e=l}throw e}},CE=0,EE=function(e){return e!=null&&e.constructor===void 0},Xl.prototype.setState=function(e,n){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=yn({},this.state),typeof e=="function"&&(e=e(yn({},r),this.props)),e&&yn(r,e),e!=null&&this.__v&&(n&&this._sb.push(n),M0(this))},Xl.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),M0(this))},Xl.prototype.render=Ju,lr=[],kE=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,NE=function(e,n){return e.__v.__b-n.__v.__b},Yc.__r=0,ad=Math.random().toString(8),Yl="__d"+ad,Es="__a"+ad,PE=/(PointerCapture)$|Capture$/i,rg=0,Up=A0(!1),Gp=A0(!0);function T0(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,o=Array(n);r<n;r++)o[r]=e[r];return o}function EB(e){if(Array.isArray(e))return e}function kB(e,n,r){return(n=AB(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function NB(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var o,i,s,a,l=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,n!==0)for(;!(c=(o=s.call(r)).done)&&(l.push(o.value),l.length!==n);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}function PB(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
326
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function I0(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,o)}return r}function RB(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?I0(Object(r),!0).forEach(function(o){kB(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):I0(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function MB(e,n){return EB(e)||NB(e,n)||TB(e,n)||PB()}function jB(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,n);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function AB(e){var n=jB(e,"string");return typeof n=="symbol"?n:n+""}function Xc(e){"@babel/helpers - typeof";return Xc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Xc(e)}function TB(e,n){if(e){if(typeof e=="string")return T0(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?T0(e,n):void 0}}var Xp=function(n){if(Xc(n)!=="object")return n;var r=$E(n);if(r.props){var o;r.props=RB({},r.props),r!=null&&(o=r.props)!==null&&o!==void 0&&o.children&&(r.props.children=Array.isArray(r.props.children)?r.props.children.map(Xp):Xp(r.props.children))}return r},IB=function(n){return EE($E(n))},$B=function(n,r){delete r.__k,CB(Xp(n),r)};function OB(e,n){n===void 0&&(n={});var r=n.insertAt;if(!(typeof document>"u")){var o=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",r==="top"&&o.firstChild?o.insertBefore(i,o.firstChild):o.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var DB=`.float-tooltip-kap {
327
+ position: absolute;
328
+ width: max-content; /* prevent shrinking near right edge */
329
+ max-width: max(50%, 150px);
330
+ padding: 3px 5px;
331
+ border-radius: 3px;
332
+ font: 12px sans-serif;
333
+ color: #eee;
334
+ background: rgba(0,0,0,0.6);
335
+ pointer-events: none;
336
+ }
337
+ `;OB(DB);var LB=ng({props:{content:{default:!1},offsetX:{triggerUpdate:!1},offsetY:{triggerUpdate:!1}},init:function(n,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.style,s=i===void 0?{}:i,a=!!n&&Xc(n)==="object"&&!!n.node&&typeof n.node=="function",l=tt(a?n.node():n);l.style("position")==="static"&&l.style("position","relative"),r.tooltipEl=l.append("div").attr("class","float-tooltip-kap"),Object.entries(s).forEach(function(u){var d=MB(u,2),f=d[0],p=d[1];return r.tooltipEl.style(f,p)}),r.tooltipEl.style("left","-10000px").style("display","none");var c="tooltip-".concat(Math.round(Math.random()*1e12));r.mouseInside=!1,l.on("mousemove.".concat(c),function(u){r.mouseInside=!0;var d=Ot(u),f=l.node(),p=f.offsetWidth,m=f.offsetHeight,g=[r.offsetX===null||r.offsetX===void 0?"-".concat(d[0]/p*100,"%"):typeof r.offsetX=="number"?"calc(-50% + ".concat(r.offsetX,"px)"):r.offsetX,r.offsetY===null||r.offsetY===void 0?m>130&&m-d[1]<100?"calc(-100% - 6px)":"21px":typeof r.offsetY=="number"?r.offsetY<0?"calc(-100% - ".concat(Math.abs(r.offsetY),"px)"):"".concat(r.offsetY,"px"):r.offsetY];r.tooltipEl.style("left",d[0]+"px").style("top",d[1]+"px").style("transform","translate(".concat(g.join(","),")")),r.content&&r.tooltipEl.style("display","inline")}),l.on("mouseover.".concat(c),function(){r.mouseInside=!0,r.content&&r.tooltipEl.style("display","inline")}),l.on("mouseout.".concat(c),function(){r.mouseInside=!1,r.tooltipEl.style("display","none")})},update:function(n){n.tooltipEl.style("display",n.content&&n.mouseInside?"inline":"none"),n.content?n.content instanceof HTMLElement?(n.tooltipEl.text(""),n.tooltipEl.append(function(){return n.content})):typeof n.content=="string"?n.tooltipEl.html(n.content):IB(n.content)?(n.tooltipEl.text(""),$B(n.content,n.tooltipEl.node())):(n.tooltipEl.style("display","none"),console.warn("Tooltip content is invalid, skipping.",n.content,n.content.toString())):n.tooltipEl.text("")}});function zB(e,n,r){var o,i=1;e==null&&(e=0),n==null&&(n=0),r==null&&(r=0);function s(){var a,l=o.length,c,u=0,d=0,f=0;for(a=0;a<l;++a)c=o[a],u+=c.x||0,d+=c.y||0,f+=c.z||0;for(u=(u/l-e)*i,d=(d/l-n)*i,f=(f/l-r)*i,a=0;a<l;++a)c=o[a],u&&(c.x-=u),d&&(c.y-=d),f&&(c.z-=f)}return s.initialize=function(a){o=a},s.x=function(a){return arguments.length?(e=+a,s):e},s.y=function(a){return arguments.length?(n=+a,s):n},s.z=function(a){return arguments.length?(r=+a,s):r},s.strength=function(a){return arguments.length?(i=+a,s):i},s}function FB(e){const n=+this._x.call(null,e);return OE(this.cover(n),n,e)}function OE(e,n,r){if(isNaN(n))return e;var o,i=e._root,s={data:r},a=e._x0,l=e._x1,c,u,d,f,p;if(!i)return e._root=s,e;for(;i.length;)if((d=n>=(c=(a+l)/2))?a=c:l=c,o=i,!(i=i[f=+d]))return o[f]=s,e;if(u=+e._x.call(null,i.data),n===u)return s.next=i,o?o[f]=s:e._root=s,e;do o=o?o[f]=new Array(2):e._root=new Array(2),(d=n>=(c=(a+l)/2))?a=c:l=c;while((f=+d)==(p=+(u>=c)));return o[p]=i,o[f]=s,e}function VB(e){Array.isArray(e)||(e=Array.from(e));const n=e.length,r=new Float64Array(n);let o=1/0,i=-1/0;for(let s=0,a;s<n;++s)isNaN(a=+this._x.call(null,e[s]))||(r[s]=a,a<o&&(o=a),a>i&&(i=a));if(o>i)return this;this.cover(o).cover(i);for(let s=0;s<n;++s)OE(this,r[s],e[s]);return this}function BB(e){if(isNaN(e=+e))return this;var n=this._x0,r=this._x1;if(isNaN(n))r=(n=Math.floor(e))+1;else{for(var o=r-n||1,i=this._root,s,a;n>e||e>=r;)switch(a=+(e<n),s=new Array(2),s[a]=i,i=s,o*=2,a){case 0:r=n+o;break;case 1:n=r-o;break}this._root&&this._root.length&&(this._root=i)}return this._x0=n,this._x1=r,this}function HB(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function WB(e){return arguments.length?this.cover(+e[0][0]).cover(+e[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]}function Fn(e,n,r){this.node=e,this.x0=n,this.x1=r}function UB(e,n){var r,o=this._x0,i,s,a=this._x1,l=[],c=this._root,u,d;for(c&&l.push(new Fn(c,o,a)),n==null?n=1/0:(o=e-n,a=e+n);u=l.pop();)if(!(!(c=u.node)||(i=u.x0)>a||(s=u.x1)<o))if(c.length){var f=(i+s)/2;l.push(new Fn(c[1],f,s),new Fn(c[0],i,f)),(d=+(e>=f))&&(u=l[l.length-1],l[l.length-1]=l[l.length-1-d],l[l.length-1-d]=u)}else{var p=Math.abs(e-+this._x.call(null,c.data));p<n&&(n=p,o=e-p,a=e+p,r=c.data)}return r}function GB(e){if(isNaN(c=+this._x.call(null,e)))return this;var n,r=this._root,o,i,s,a=this._x0,l=this._x1,c,u,d,f,p;if(!r)return this;if(r.length)for(;;){if((d=c>=(u=(a+l)/2))?a=u:l=u,n=r,!(r=r[f=+d]))return this;if(!r.length)break;n[f+1&1]&&(o=n,p=f)}for(;r.data!==e;)if(i=r,!(r=r.next))return this;return(s=r.next)&&delete r.next,i?(s?i.next=s:delete i.next,this):n?(s?n[f]=s:delete n[f],(r=n[0]||n[1])&&r===(n[1]||n[0])&&!r.length&&(o?o[p]=r:this._root=r),this):(this._root=s,this)}function YB(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function XB(){return this._root}function KB(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function qB(e){var n=[],r,o=this._root,i,s,a;for(o&&n.push(new Fn(o,this._x0,this._x1));r=n.pop();)if(!e(o=r.node,s=r.x0,a=r.x1)&&o.length){var l=(s+a)/2;(i=o[1])&&n.push(new Fn(i,l,a)),(i=o[0])&&n.push(new Fn(i,s,l))}return this}function ZB(e){var n=[],r=[],o;for(this._root&&n.push(new Fn(this._root,this._x0,this._x1));o=n.pop();){var i=o.node;if(i.length){var s,a=o.x0,l=o.x1,c=(a+l)/2;(s=i[0])&&n.push(new Fn(s,a,c)),(s=i[1])&&n.push(new Fn(s,c,l))}r.push(o)}for(;o=r.pop();)e(o.node,o.x0,o.x1);return this}function QB(e){return e[0]}function JB(e){return arguments.length?(this._x=e,this):this._x}function DE(e,n){var r=new ag(n??QB,NaN,NaN);return e==null?r:r.addAll(e)}function ag(e,n,r){this._x=e,this._x0=n,this._x1=r,this._root=void 0}function $0(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var wt=DE.prototype=ag.prototype;wt.copy=function(){var e=new ag(this._x,this._x0,this._x1),n=this._root,r,o;if(!n)return e;if(!n.length)return e._root=$0(n),e;for(r=[{source:n,target:e._root=new Array(2)}];n=r.pop();)for(var i=0;i<2;++i)(o=n.source[i])&&(o.length?r.push({source:o,target:n.target[i]=new Array(2)}):n.target[i]=$0(o));return e};wt.add=FB;wt.addAll=VB;wt.cover=BB;wt.data=HB;wt.extent=WB;wt.find=UB;wt.remove=GB;wt.removeAll=YB;wt.root=XB;wt.size=KB;wt.visit=qB;wt.visitAfter=ZB;wt.x=JB;function eH(e){const n=+this._x.call(null,e),r=+this._y.call(null,e);return LE(this.cover(n,r),n,r,e)}function LE(e,n,r,o){if(isNaN(n)||isNaN(r))return e;var i,s=e._root,a={data:o},l=e._x0,c=e._y0,u=e._x1,d=e._y1,f,p,m,g,b,_,y,x;if(!s)return e._root=a,e;for(;s.length;)if((b=n>=(f=(l+u)/2))?l=f:u=f,(_=r>=(p=(c+d)/2))?c=p:d=p,i=s,!(s=s[y=_<<1|b]))return i[y]=a,e;if(m=+e._x.call(null,s.data),g=+e._y.call(null,s.data),n===m&&r===g)return a.next=s,i?i[y]=a:e._root=a,e;do i=i?i[y]=new Array(4):e._root=new Array(4),(b=n>=(f=(l+u)/2))?l=f:u=f,(_=r>=(p=(c+d)/2))?c=p:d=p;while((y=_<<1|b)===(x=(g>=p)<<1|m>=f));return i[x]=s,i[y]=a,e}function tH(e){var n,r,o=e.length,i,s,a=new Array(o),l=new Array(o),c=1/0,u=1/0,d=-1/0,f=-1/0;for(r=0;r<o;++r)isNaN(i=+this._x.call(null,n=e[r]))||isNaN(s=+this._y.call(null,n))||(a[r]=i,l[r]=s,i<c&&(c=i),i>d&&(d=i),s<u&&(u=s),s>f&&(f=s));if(c>d||u>f)return this;for(this.cover(c,u).cover(d,f),r=0;r<o;++r)LE(this,a[r],l[r],e[r]);return this}function nH(e,n){if(isNaN(e=+e)||isNaN(n=+n))return this;var r=this._x0,o=this._y0,i=this._x1,s=this._y1;if(isNaN(r))i=(r=Math.floor(e))+1,s=(o=Math.floor(n))+1;else{for(var a=i-r||1,l=this._root,c,u;r>e||e>=i||o>n||n>=s;)switch(u=(n<o)<<1|e<r,c=new Array(4),c[u]=l,l=c,a*=2,u){case 0:i=r+a,s=o+a;break;case 1:r=i-a,s=o+a;break;case 2:i=r+a,o=s-a;break;case 3:r=i-a,o=s-a;break}this._root&&this._root.length&&(this._root=l)}return this._x0=r,this._y0=o,this._x1=i,this._y1=s,this}function rH(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function oH(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function ot(e,n,r,o,i){this.node=e,this.x0=n,this.y0=r,this.x1=o,this.y1=i}function iH(e,n,r){var o,i=this._x0,s=this._y0,a,l,c,u,d=this._x1,f=this._y1,p=[],m=this._root,g,b;for(m&&p.push(new ot(m,i,s,d,f)),r==null?r=1/0:(i=e-r,s=n-r,d=e+r,f=n+r,r*=r);g=p.pop();)if(!(!(m=g.node)||(a=g.x0)>d||(l=g.y0)>f||(c=g.x1)<i||(u=g.y1)<s))if(m.length){var _=(a+c)/2,y=(l+u)/2;p.push(new ot(m[3],_,y,c,u),new ot(m[2],a,y,_,u),new ot(m[1],_,l,c,y),new ot(m[0],a,l,_,y)),(b=(n>=y)<<1|e>=_)&&(g=p[p.length-1],p[p.length-1]=p[p.length-1-b],p[p.length-1-b]=g)}else{var x=e-+this._x.call(null,m.data),w=n-+this._y.call(null,m.data),S=x*x+w*w;if(S<r){var C=Math.sqrt(r=S);i=e-C,s=n-C,d=e+C,f=n+C,o=m.data}}return o}function sH(e){if(isNaN(d=+this._x.call(null,e))||isNaN(f=+this._y.call(null,e)))return this;var n,r=this._root,o,i,s,a=this._x0,l=this._y0,c=this._x1,u=this._y1,d,f,p,m,g,b,_,y;if(!r)return this;if(r.length)for(;;){if((g=d>=(p=(a+c)/2))?a=p:c=p,(b=f>=(m=(l+u)/2))?l=m:u=m,n=r,!(r=r[_=b<<1|g]))return this;if(!r.length)break;(n[_+1&3]||n[_+2&3]||n[_+3&3])&&(o=n,y=_)}for(;r.data!==e;)if(i=r,!(r=r.next))return this;return(s=r.next)&&delete r.next,i?(s?i.next=s:delete i.next,this):n?(s?n[_]=s:delete n[_],(r=n[0]||n[1]||n[2]||n[3])&&r===(n[3]||n[2]||n[1]||n[0])&&!r.length&&(o?o[y]=r:this._root=r),this):(this._root=s,this)}function aH(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function lH(){return this._root}function cH(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function uH(e){var n=[],r,o=this._root,i,s,a,l,c;for(o&&n.push(new ot(o,this._x0,this._y0,this._x1,this._y1));r=n.pop();)if(!e(o=r.node,s=r.x0,a=r.y0,l=r.x1,c=r.y1)&&o.length){var u=(s+l)/2,d=(a+c)/2;(i=o[3])&&n.push(new ot(i,u,d,l,c)),(i=o[2])&&n.push(new ot(i,s,d,u,c)),(i=o[1])&&n.push(new ot(i,u,a,l,d)),(i=o[0])&&n.push(new ot(i,s,a,u,d))}return this}function fH(e){var n=[],r=[],o;for(this._root&&n.push(new ot(this._root,this._x0,this._y0,this._x1,this._y1));o=n.pop();){var i=o.node;if(i.length){var s,a=o.x0,l=o.y0,c=o.x1,u=o.y1,d=(a+c)/2,f=(l+u)/2;(s=i[0])&&n.push(new ot(s,a,l,d,f)),(s=i[1])&&n.push(new ot(s,d,l,c,f)),(s=i[2])&&n.push(new ot(s,a,f,d,u)),(s=i[3])&&n.push(new ot(s,d,f,c,u))}r.push(o)}for(;o=r.pop();)e(o.node,o.x0,o.y0,o.x1,o.y1);return this}function dH(e){return e[0]}function pH(e){return arguments.length?(this._x=e,this):this._x}function hH(e){return e[1]}function mH(e){return arguments.length?(this._y=e,this):this._y}function zE(e,n,r){var o=new lg(n??dH,r??hH,NaN,NaN,NaN,NaN);return e==null?o:o.addAll(e)}function lg(e,n,r,o,i,s){this._x=e,this._y=n,this._x0=r,this._y0=o,this._x1=i,this._y1=s,this._root=void 0}function O0(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var ct=zE.prototype=lg.prototype;ct.copy=function(){var e=new lg(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root,r,o;if(!n)return e;if(!n.length)return e._root=O0(n),e;for(r=[{source:n,target:e._root=new Array(4)}];n=r.pop();)for(var i=0;i<4;++i)(o=n.source[i])&&(o.length?r.push({source:o,target:n.target[i]=new Array(4)}):n.target[i]=O0(o));return e};ct.add=eH;ct.addAll=tH;ct.cover=nH;ct.data=rH;ct.extent=oH;ct.find=iH;ct.remove=sH;ct.removeAll=aH;ct.root=lH;ct.size=cH;ct.visit=uH;ct.visitAfter=fH;ct.x=pH;ct.y=mH;function gH(e){const n=+this._x.call(null,e),r=+this._y.call(null,e),o=+this._z.call(null,e);return FE(this.cover(n,r,o),n,r,o,e)}function FE(e,n,r,o,i){if(isNaN(n)||isNaN(r)||isNaN(o))return e;var s,a=e._root,l={data:i},c=e._x0,u=e._y0,d=e._z0,f=e._x1,p=e._y1,m=e._z1,g,b,_,y,x,w,S,C,E,k,N;if(!a)return e._root=l,e;for(;a.length;)if((S=n>=(g=(c+f)/2))?c=g:f=g,(C=r>=(b=(u+p)/2))?u=b:p=b,(E=o>=(_=(d+m)/2))?d=_:m=_,s=a,!(a=a[k=E<<2|C<<1|S]))return s[k]=l,e;if(y=+e._x.call(null,a.data),x=+e._y.call(null,a.data),w=+e._z.call(null,a.data),n===y&&r===x&&o===w)return l.next=a,s?s[k]=l:e._root=l,e;do s=s?s[k]=new Array(8):e._root=new Array(8),(S=n>=(g=(c+f)/2))?c=g:f=g,(C=r>=(b=(u+p)/2))?u=b:p=b,(E=o>=(_=(d+m)/2))?d=_:m=_;while((k=E<<2|C<<1|S)===(N=(w>=_)<<2|(x>=b)<<1|y>=g));return s[N]=a,s[k]=l,e}function yH(e){Array.isArray(e)||(e=Array.from(e));const n=e.length,r=new Float64Array(n),o=new Float64Array(n),i=new Float64Array(n);let s=1/0,a=1/0,l=1/0,c=-1/0,u=-1/0,d=-1/0;for(let f=0,p,m,g,b;f<n;++f)isNaN(m=+this._x.call(null,p=e[f]))||isNaN(g=+this._y.call(null,p))||isNaN(b=+this._z.call(null,p))||(r[f]=m,o[f]=g,i[f]=b,m<s&&(s=m),m>c&&(c=m),g<a&&(a=g),g>u&&(u=g),b<l&&(l=b),b>d&&(d=b));if(s>c||a>u||l>d)return this;this.cover(s,a,l).cover(c,u,d);for(let f=0;f<n;++f)FE(this,r[f],o[f],i[f],e[f]);return this}function vH(e,n,r){if(isNaN(e=+e)||isNaN(n=+n)||isNaN(r=+r))return this;var o=this._x0,i=this._y0,s=this._z0,a=this._x1,l=this._y1,c=this._z1;if(isNaN(o))a=(o=Math.floor(e))+1,l=(i=Math.floor(n))+1,c=(s=Math.floor(r))+1;else{for(var u=a-o||1,d=this._root,f,p;o>e||e>=a||i>n||n>=l||s>r||r>=c;)switch(p=(r<s)<<2|(n<i)<<1|e<o,f=new Array(8),f[p]=d,d=f,u*=2,p){case 0:a=o+u,l=i+u,c=s+u;break;case 1:o=a-u,l=i+u,c=s+u;break;case 2:a=o+u,i=l-u,c=s+u;break;case 3:o=a-u,i=l-u,c=s+u;break;case 4:a=o+u,l=i+u,s=c-u;break;case 5:o=a-u,l=i+u,s=c-u;break;case 6:a=o+u,i=l-u,s=c-u;break;case 7:o=a-u,i=l-u,s=c-u;break}this._root&&this._root.length&&(this._root=d)}return this._x0=o,this._y0=i,this._z0=s,this._x1=a,this._y1=l,this._z1=c,this}function xH(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function wH(e){return arguments.length?this.cover(+e[0][0],+e[0][1],+e[0][2]).cover(+e[1][0],+e[1][1],+e[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]}function we(e,n,r,o,i,s,a){this.node=e,this.x0=n,this.y0=r,this.z0=o,this.x1=i,this.y1=s,this.z1=a}function bH(e,n,r,o){var i,s=this._x0,a=this._y0,l=this._z0,c,u,d,f,p,m,g=this._x1,b=this._y1,_=this._z1,y=[],x=this._root,w,S;for(x&&y.push(new we(x,s,a,l,g,b,_)),o==null?o=1/0:(s=e-o,a=n-o,l=r-o,g=e+o,b=n+o,_=r+o,o*=o);w=y.pop();)if(!(!(x=w.node)||(c=w.x0)>g||(u=w.y0)>b||(d=w.z0)>_||(f=w.x1)<s||(p=w.y1)<a||(m=w.z1)<l))if(x.length){var C=(c+f)/2,E=(u+p)/2,k=(d+m)/2;y.push(new we(x[7],C,E,k,f,p,m),new we(x[6],c,E,k,C,p,m),new we(x[5],C,u,k,f,E,m),new we(x[4],c,u,k,C,E,m),new we(x[3],C,E,d,f,p,k),new we(x[2],c,E,d,C,p,k),new we(x[1],C,u,d,f,E,k),new we(x[0],c,u,d,C,E,k)),(S=(r>=k)<<2|(n>=E)<<1|e>=C)&&(w=y[y.length-1],y[y.length-1]=y[y.length-1-S],y[y.length-1-S]=w)}else{var N=e-+this._x.call(null,x.data),j=n-+this._y.call(null,x.data),$=r-+this._z.call(null,x.data),I=N*N+j*j+$*$;if(I<o){var O=Math.sqrt(o=I);s=e-O,a=n-O,l=r-O,g=e+O,b=n+O,_=r+O,i=x.data}}return i}const _H=(e,n,r,o,i,s)=>Math.sqrt((e-o)**2+(n-i)**2+(r-s)**2);function SH(e,n,r,o){const i=[],s=e-o,a=n-o,l=r-o,c=e+o,u=n+o,d=r+o;return this.visit((f,p,m,g,b,_,y)=>{if(!f.length)do{const x=f.data;_H(e,n,r,this._x(x),this._y(x),this._z(x))<=o&&i.push(x)}while(f=f.next);return p>c||m>u||g>d||b<s||_<a||y<l}),i}function CH(e){if(isNaN(p=+this._x.call(null,e))||isNaN(m=+this._y.call(null,e))||isNaN(g=+this._z.call(null,e)))return this;var n,r=this._root,o,i,s,a=this._x0,l=this._y0,c=this._z0,u=this._x1,d=this._y1,f=this._z1,p,m,g,b,_,y,x,w,S,C,E;if(!r)return this;if(r.length)for(;;){if((x=p>=(b=(a+u)/2))?a=b:u=b,(w=m>=(_=(l+d)/2))?l=_:d=_,(S=g>=(y=(c+f)/2))?c=y:f=y,n=r,!(r=r[C=S<<2|w<<1|x]))return this;if(!r.length)break;(n[C+1&7]||n[C+2&7]||n[C+3&7]||n[C+4&7]||n[C+5&7]||n[C+6&7]||n[C+7&7])&&(o=n,E=C)}for(;r.data!==e;)if(i=r,!(r=r.next))return this;return(s=r.next)&&delete r.next,i?(s?i.next=s:delete i.next,this):n?(s?n[C]=s:delete n[C],(r=n[0]||n[1]||n[2]||n[3]||n[4]||n[5]||n[6]||n[7])&&r===(n[7]||n[6]||n[5]||n[4]||n[3]||n[2]||n[1]||n[0])&&!r.length&&(o?o[E]=r:this._root=r),this):(this._root=s,this)}function EH(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function kH(){return this._root}function NH(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function PH(e){var n=[],r,o=this._root,i,s,a,l,c,u,d;for(o&&n.push(new we(o,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));r=n.pop();)if(!e(o=r.node,s=r.x0,a=r.y0,l=r.z0,c=r.x1,u=r.y1,d=r.z1)&&o.length){var f=(s+c)/2,p=(a+u)/2,m=(l+d)/2;(i=o[7])&&n.push(new we(i,f,p,m,c,u,d)),(i=o[6])&&n.push(new we(i,s,p,m,f,u,d)),(i=o[5])&&n.push(new we(i,f,a,m,c,p,d)),(i=o[4])&&n.push(new we(i,s,a,m,f,p,d)),(i=o[3])&&n.push(new we(i,f,p,l,c,u,m)),(i=o[2])&&n.push(new we(i,s,p,l,f,u,m)),(i=o[1])&&n.push(new we(i,f,a,l,c,p,m)),(i=o[0])&&n.push(new we(i,s,a,l,f,p,m))}return this}function RH(e){var n=[],r=[],o;for(this._root&&n.push(new we(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));o=n.pop();){var i=o.node;if(i.length){var s,a=o.x0,l=o.y0,c=o.z0,u=o.x1,d=o.y1,f=o.z1,p=(a+u)/2,m=(l+d)/2,g=(c+f)/2;(s=i[0])&&n.push(new we(s,a,l,c,p,m,g)),(s=i[1])&&n.push(new we(s,p,l,c,u,m,g)),(s=i[2])&&n.push(new we(s,a,m,c,p,d,g)),(s=i[3])&&n.push(new we(s,p,m,c,u,d,g)),(s=i[4])&&n.push(new we(s,a,l,g,p,m,f)),(s=i[5])&&n.push(new we(s,p,l,g,u,m,f)),(s=i[6])&&n.push(new we(s,a,m,g,p,d,f)),(s=i[7])&&n.push(new we(s,p,m,g,u,d,f))}r.push(o)}for(;o=r.pop();)e(o.node,o.x0,o.y0,o.z0,o.x1,o.y1,o.z1);return this}function MH(e){return e[0]}function jH(e){return arguments.length?(this._x=e,this):this._x}function AH(e){return e[1]}function TH(e){return arguments.length?(this._y=e,this):this._y}function IH(e){return e[2]}function $H(e){return arguments.length?(this._z=e,this):this._z}function VE(e,n,r,o){var i=new cg(n??MH,r??AH,o??IH,NaN,NaN,NaN,NaN,NaN,NaN);return e==null?i:i.addAll(e)}function cg(e,n,r,o,i,s,a,l,c){this._x=e,this._y=n,this._z=r,this._x0=o,this._y0=i,this._z0=s,this._x1=a,this._y1=l,this._z1=c,this._root=void 0}function D0(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var Ke=VE.prototype=cg.prototype;Ke.copy=function(){var e=new cg(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),n=this._root,r,o;if(!n)return e;if(!n.length)return e._root=D0(n),e;for(r=[{source:n,target:e._root=new Array(8)}];n=r.pop();)for(var i=0;i<8;++i)(o=n.source[i])&&(o.length?r.push({source:o,target:n.target[i]=new Array(8)}):n.target[i]=D0(o));return e};Ke.add=gH;Ke.addAll=yH;Ke.cover=vH;Ke.data=xH;Ke.extent=wH;Ke.find=bH;Ke.findAllWithinRadius=SH;Ke.remove=CH;Ke.removeAll=EH;Ke.root=kH;Ke.size=NH;Ke.visit=PH;Ke.visitAfter=RH;Ke.x=jH;Ke.y=TH;Ke.z=$H;function Ln(e){return function(){return e}}function In(e){return(e()-.5)*1e-6}function OH(e){return e.index}function L0(e,n){var r=e.get(n);if(!r)throw new Error("node not found: "+n);return r}function DH(e){var n=OH,r=p,o,i=Ln(30),s,a,l,c,u,d,f=1;e==null&&(e=[]);function p(y){return 1/Math.min(c[y.source.index],c[y.target.index])}function m(y){for(var x=0,w=e.length;x<f;++x)for(var S=0,C,E,k,N=0,j=0,$=0,I,O;S<w;++S)C=e[S],E=C.source,k=C.target,N=k.x+k.vx-E.x-E.vx||In(d),l>1&&(j=k.y+k.vy-E.y-E.vy||In(d)),l>2&&($=k.z+k.vz-E.z-E.vz||In(d)),I=Math.sqrt(N*N+j*j+$*$),I=(I-s[S])/I*y*o[S],N*=I,j*=I,$*=I,k.vx-=N*(O=u[S]),l>1&&(k.vy-=j*O),l>2&&(k.vz-=$*O),E.vx+=N*(O=1-O),l>1&&(E.vy+=j*O),l>2&&(E.vz+=$*O)}function g(){if(a){var y,x=a.length,w=e.length,S=new Map(a.map((E,k)=>[n(E,k,a),E])),C;for(y=0,c=new Array(x);y<w;++y)C=e[y],C.index=y,typeof C.source!="object"&&(C.source=L0(S,C.source)),typeof C.target!="object"&&(C.target=L0(S,C.target)),c[C.source.index]=(c[C.source.index]||0)+1,c[C.target.index]=(c[C.target.index]||0)+1;for(y=0,u=new Array(w);y<w;++y)C=e[y],u[y]=c[C.source.index]/(c[C.source.index]+c[C.target.index]);o=new Array(w),b(),s=new Array(w),_()}}function b(){if(a)for(var y=0,x=e.length;y<x;++y)o[y]=+r(e[y],y,e)}function _(){if(a)for(var y=0,x=e.length;y<x;++y)s[y]=+i(e[y],y,e)}return m.initialize=function(y,...x){a=y,d=x.find(w=>typeof w=="function")||Math.random,l=x.find(w=>[1,2,3].includes(w))||2,g()},m.links=function(y){return arguments.length?(e=y,g(),m):e},m.id=function(y){return arguments.length?(n=y,m):n},m.iterations=function(y){return arguments.length?(f=+y,m):f},m.strength=function(y){return arguments.length?(r=typeof y=="function"?y:Ln(+y),b(),m):r},m.distance=function(y){return arguments.length?(i=typeof y=="function"?y:Ln(+y),_(),m):i},m}const LH=1664525,zH=1013904223,z0=4294967296;function FH(){let e=1;return()=>(e=(LH*e+zH)%z0)/z0}var F0=3;function ld(e){return e.x}function V0(e){return e.y}function VH(e){return e.z}var BH=10,HH=Math.PI*(3-Math.sqrt(5)),WH=Math.PI*20/(9+Math.sqrt(221));function UH(e,n){n=n||2;var r=Math.min(F0,Math.max(1,Math.round(n))),o,i=1,s=.001,a=1-Math.pow(s,1/300),l=0,c=.6,u=new Map,d=Qm(m),f=Ma("tick","end"),p=FH();e==null&&(e=[]);function m(){g(),f.call("tick",o),i<s&&(d.stop(),f.call("end",o))}function g(y){var x,w=e.length,S;y===void 0&&(y=1);for(var C=0;C<y;++C)for(i+=(l-i)*a,u.forEach(function(E){E(i)}),x=0;x<w;++x)S=e[x],S.fx==null?S.x+=S.vx*=c:(S.x=S.fx,S.vx=0),r>1&&(S.fy==null?S.y+=S.vy*=c:(S.y=S.fy,S.vy=0)),r>2&&(S.fz==null?S.z+=S.vz*=c:(S.z=S.fz,S.vz=0));return o}function b(){for(var y=0,x=e.length,w;y<x;++y){if(w=e[y],w.index=y,w.fx!=null&&(w.x=w.fx),w.fy!=null&&(w.y=w.fy),w.fz!=null&&(w.z=w.fz),isNaN(w.x)||r>1&&isNaN(w.y)||r>2&&isNaN(w.z)){var S=BH*(r>2?Math.cbrt(.5+y):r>1?Math.sqrt(.5+y):y),C=y*HH,E=y*WH;r===1?w.x=S:r===2?(w.x=S*Math.cos(C),w.y=S*Math.sin(C)):(w.x=S*Math.sin(C)*Math.cos(E),w.y=S*Math.cos(C),w.z=S*Math.sin(C)*Math.sin(E))}(isNaN(w.vx)||r>1&&isNaN(w.vy)||r>2&&isNaN(w.vz))&&(w.vx=0,r>1&&(w.vy=0),r>2&&(w.vz=0))}}function _(y){return y.initialize&&y.initialize(e,p,r),y}return b(),o={tick:g,restart:function(){return d.restart(m),o},stop:function(){return d.stop(),o},numDimensions:function(y){return arguments.length?(r=Math.min(F0,Math.max(1,Math.round(y))),u.forEach(_),o):r},nodes:function(y){return arguments.length?(e=y,b(),u.forEach(_),o):e},alpha:function(y){return arguments.length?(i=+y,o):i},alphaMin:function(y){return arguments.length?(s=+y,o):s},alphaDecay:function(y){return arguments.length?(a=+y,o):+a},alphaTarget:function(y){return arguments.length?(l=+y,o):l},velocityDecay:function(y){return arguments.length?(c=1-y,o):1-c},randomSource:function(y){return arguments.length?(p=y,u.forEach(_),o):p},force:function(y,x){return arguments.length>1?(x==null?u.delete(y):u.set(y,_(x)),o):u.get(y)},find:function(){var y=Array.prototype.slice.call(arguments),x=y.shift()||0,w=(r>1?y.shift():null)||0,S=(r>2?y.shift():null)||0,C=y.shift()||1/0,E=0,k=e.length,N,j,$,I,O,H;for(C*=C,E=0;E<k;++E)O=e[E],N=x-O.x,j=w-(O.y||0),$=S-(O.z||0),I=N*N+j*j+$*$,I<C&&(H=O,C=I);return H},on:function(y,x){return arguments.length>1?(f.on(y,x),o):f.on(y)}}}function GH(){var e,n,r,o,i,s=Ln(-30),a,l=1,c=1/0,u=.81;function d(g){var b,_=e.length,y=(n===1?DE(e,ld):n===2?zE(e,ld,V0):n===3?VE(e,ld,V0,VH):null).visitAfter(p);for(i=g,b=0;b<_;++b)r=e[b],y.visit(m)}function f(){if(e){var g,b=e.length,_;for(a=new Array(b),g=0;g<b;++g)_=e[g],a[_.index]=+s(_,g,e)}}function p(g){var b=0,_,y,x=0,w,S,C,E,k=g.length;if(k){for(w=S=C=E=0;E<k;++E)(_=g[E])&&(y=Math.abs(_.value))&&(b+=_.value,x+=y,w+=y*(_.x||0),S+=y*(_.y||0),C+=y*(_.z||0));b*=Math.sqrt(4/k),g.x=w/x,n>1&&(g.y=S/x),n>2&&(g.z=C/x)}else{_=g,_.x=_.data.x,n>1&&(_.y=_.data.y),n>2&&(_.z=_.data.z);do b+=a[_.data.index];while(_=_.next)}g.value=b}function m(g,b,_,y,x){if(!g.value)return!0;var w=[_,y,x][n-1],S=g.x-r.x,C=n>1?g.y-r.y:0,E=n>2?g.z-r.z:0,k=w-b,N=S*S+C*C+E*E;if(k*k/u<N)return N<c&&(S===0&&(S=In(o),N+=S*S),n>1&&C===0&&(C=In(o),N+=C*C),n>2&&E===0&&(E=In(o),N+=E*E),N<l&&(N=Math.sqrt(l*N)),r.vx+=S*g.value*i/N,n>1&&(r.vy+=C*g.value*i/N),n>2&&(r.vz+=E*g.value*i/N)),!0;if(g.length||N>=c)return;(g.data!==r||g.next)&&(S===0&&(S=In(o),N+=S*S),n>1&&C===0&&(C=In(o),N+=C*C),n>2&&E===0&&(E=In(o),N+=E*E),N<l&&(N=Math.sqrt(l*N)));do g.data!==r&&(k=a[g.data.index]*i/N,r.vx+=S*k,n>1&&(r.vy+=C*k),n>2&&(r.vz+=E*k));while(g=g.next)}return d.initialize=function(g,...b){e=g,o=b.find(_=>typeof _=="function")||Math.random,n=b.find(_=>[1,2,3].includes(_))||2,f()},d.strength=function(g){return arguments.length?(s=typeof g=="function"?g:Ln(+g),f(),d):s},d.distanceMin=function(g){return arguments.length?(l=g*g,d):Math.sqrt(l)},d.distanceMax=function(g){return arguments.length?(c=g*g,d):Math.sqrt(c)},d.theta=function(g){return arguments.length?(u=g*g,d):Math.sqrt(u)},d}function YH(e,n,r,o){var i,s,a=Ln(.1),l,c;typeof e!="function"&&(e=Ln(+e)),n==null&&(n=0),r==null&&(r=0),o==null&&(o=0);function u(f){for(var p=0,m=i.length;p<m;++p){var g=i[p],b=g.x-n||1e-6,_=(g.y||0)-r||1e-6,y=(g.z||0)-o||1e-6,x=Math.sqrt(b*b+_*_+y*y),w=(c[p]-x)*l[p]*f/x;g.vx+=b*w,s>1&&(g.vy+=_*w),s>2&&(g.vz+=y*w)}}function d(){if(i){var f,p=i.length;for(l=new Array(p),c=new Array(p),f=0;f<p;++f)c[f]=+e(i[f],f,i),l[f]=isNaN(c[f])?0:+a(i[f],f,i)}}return u.initialize=function(f,...p){i=f,s=p.find(m=>[1,2,3].includes(m))||2,d()},u.strength=function(f){return arguments.length?(a=typeof f=="function"?f:Ln(+f),d(),u):a},u.radius=function(f){return arguments.length?(e=typeof f=="function"?f:Ln(+f),d(),u):e},u.x=function(f){return arguments.length?(n=+f,u):n},u.y=function(f){return arguments.length?(r=+f,u):r},u.z=function(f){return arguments.length?(o=+f,u):o},u}const{abs:Ji,cos:jn,sin:Po,acos:XH,atan2:es,sqrt:tr,pow:It}=Math;function ts(e){return e<0?-It(-e,1/3):It(e,1/3)}const BE=Math.PI,gl=2*BE,nr=BE/2,KH=1e-6,cd=Number.MAX_SAFE_INTEGER||9007199254740991,ud=Number.MIN_SAFE_INTEGER||-9007199254740991,qH={x:0,y:0,z:0},Z={Tvalues:[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213],Cvalues:[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872],arcfn:function(e,n){const r=n(e);let o=r.x*r.x+r.y*r.y;return typeof r.z<"u"&&(o+=r.z*r.z),tr(o)},compute:function(e,n,r){if(e===0)return n[0].t=0,n[0];const o=n.length-1;if(e===1)return n[o].t=1,n[o];const i=1-e;let s=n;if(o===0)return n[0].t=e,n[0];if(o===1){const l={x:i*s[0].x+e*s[1].x,y:i*s[0].y+e*s[1].y,t:e};return r&&(l.z=i*s[0].z+e*s[1].z),l}if(o<4){let l=i*i,c=e*e,u,d,f,p=0;o===2?(s=[s[0],s[1],s[2],qH],u=l,d=i*e*2,f=c):o===3&&(u=l*i,d=l*e*3,f=i*c*3,p=e*c);const m={x:u*s[0].x+d*s[1].x+f*s[2].x+p*s[3].x,y:u*s[0].y+d*s[1].y+f*s[2].y+p*s[3].y,t:e};return r&&(m.z=u*s[0].z+d*s[1].z+f*s[2].z+p*s[3].z),m}const a=JSON.parse(JSON.stringify(n));for(;a.length>1;){for(let l=0;l<a.length-1;l++)a[l]={x:a[l].x+(a[l+1].x-a[l].x)*e,y:a[l].y+(a[l+1].y-a[l].y)*e},typeof a[l].z<"u"&&(a[l].z=a[l].z+(a[l+1].z-a[l].z)*e);a.splice(a.length-1,1)}return a[0].t=e,a[0]},computeWithRatios:function(e,n,r,o){const i=1-e,s=r,a=n;let l=s[0],c=s[1],u=s[2],d=s[3],f;if(l*=i,c*=e,a.length===2)return f=l+c,{x:(l*a[0].x+c*a[1].x)/f,y:(l*a[0].y+c*a[1].y)/f,z:o?(l*a[0].z+c*a[1].z)/f:!1,t:e};if(l*=i,c*=2*i,u*=e*e,a.length===3)return f=l+c+u,{x:(l*a[0].x+c*a[1].x+u*a[2].x)/f,y:(l*a[0].y+c*a[1].y+u*a[2].y)/f,z:o?(l*a[0].z+c*a[1].z+u*a[2].z)/f:!1,t:e};if(l*=i,c*=1.5*i,u*=3*i,d*=e*e*e,a.length===4)return f=l+c+u+d,{x:(l*a[0].x+c*a[1].x+u*a[2].x+d*a[3].x)/f,y:(l*a[0].y+c*a[1].y+u*a[2].y+d*a[3].y)/f,z:o?(l*a[0].z+c*a[1].z+u*a[2].z+d*a[3].z)/f:!1,t:e}},derive:function(e,n){const r=[];for(let o=e,i=o.length,s=i-1;i>1;i--,s--){const a=[];for(let l=0,c;l<s;l++)c={x:s*(o[l+1].x-o[l].x),y:s*(o[l+1].y-o[l].y)},n&&(c.z=s*(o[l+1].z-o[l].z)),a.push(c);r.push(a),o=a}return r},between:function(e,n,r){return n<=e&&e<=r||Z.approximately(e,n)||Z.approximately(e,r)},approximately:function(e,n,r){return Ji(e-n)<=(r||KH)},length:function(e){const r=Z.Tvalues.length;let o=0;for(let i=0,s;i<r;i++)s=.5*Z.Tvalues[i]+.5,o+=Z.Cvalues[i]*Z.arcfn(s,e);return .5*o},map:function(e,n,r,o,i){const s=r-n,a=i-o,l=e-n,c=l/s;return o+a*c},lerp:function(e,n,r){const o={x:n.x+e*(r.x-n.x),y:n.y+e*(r.y-n.y)};return n.z!==void 0&&r.z!==void 0&&(o.z=n.z+e*(r.z-n.z)),o},pointToString:function(e){let n=e.x+"/"+e.y;return typeof e.z<"u"&&(n+="/"+e.z),n},pointsToString:function(e){return"["+e.map(Z.pointToString).join(", ")+"]"},copy:function(e){return JSON.parse(JSON.stringify(e))},angle:function(e,n,r){const o=n.x-e.x,i=n.y-e.y,s=r.x-e.x,a=r.y-e.y,l=o*a-i*s,c=o*s+i*a;return es(l,c)},round:function(e,n){const r=""+e,o=r.indexOf(".");return parseFloat(r.substring(0,o+1+n))},dist:function(e,n){const r=e.x-n.x,o=e.y-n.y;return tr(r*r+o*o)},closest:function(e,n){let r=It(2,63),o,i;return e.forEach(function(s,a){i=Z.dist(n,s),i<r&&(r=i,o=a)}),{mdist:r,mpos:o}},abcratio:function(e,n){if(n!==2&&n!==3)return!1;if(typeof e>"u")e=.5;else if(e===0||e===1)return e;const r=It(e,n)+It(1-e,n),o=r-1;return Ji(o/r)},projectionratio:function(e,n){if(n!==2&&n!==3)return!1;if(typeof e>"u")e=.5;else if(e===0||e===1)return e;const r=It(1-e,n),o=It(e,n)+r;return r/o},lli8:function(e,n,r,o,i,s,a,l){const c=(e*o-n*r)*(i-a)-(e-r)*(i*l-s*a),u=(e*o-n*r)*(s-l)-(n-o)*(i*l-s*a),d=(e-r)*(s-l)-(n-o)*(i-a);return d==0?!1:{x:c/d,y:u/d}},lli4:function(e,n,r,o){const i=e.x,s=e.y,a=n.x,l=n.y,c=r.x,u=r.y,d=o.x,f=o.y;return Z.lli8(i,s,a,l,c,u,d,f)},lli:function(e,n){return Z.lli4(e,e.c,n,n.c)},makeline:function(e,n){return new Ce(e.x,e.y,(e.x+n.x)/2,(e.y+n.y)/2,n.x,n.y)},findbbox:function(e){let n=cd,r=cd,o=ud,i=ud;return e.forEach(function(s){const a=s.bbox();n>a.x.min&&(n=a.x.min),r>a.y.min&&(r=a.y.min),o<a.x.max&&(o=a.x.max),i<a.y.max&&(i=a.y.max)}),{x:{min:n,mid:(n+o)/2,max:o,size:o-n},y:{min:r,mid:(r+i)/2,max:i,size:i-r}}},shapeintersections:function(e,n,r,o,i){if(!Z.bboxoverlap(n,o))return[];const s=[],a=[e.startcap,e.forward,e.back,e.endcap],l=[r.startcap,r.forward,r.back,r.endcap];return a.forEach(function(c){c.virtual||l.forEach(function(u){if(u.virtual)return;const d=c.intersects(u,i);d.length>0&&(d.c1=c,d.c2=u,d.s1=e,d.s2=r,s.push(d))})}),s},makeshape:function(e,n,r){const o=n.points.length,i=e.points.length,s=Z.makeline(n.points[o-1],e.points[0]),a=Z.makeline(e.points[i-1],n.points[0]),l={startcap:s,forward:e,back:n,endcap:a,bbox:Z.findbbox([s,e,n,a])};return l.intersections=function(c){return Z.shapeintersections(l,l.bbox,c,c.bbox,r)},l},getminmax:function(e,n,r){if(!r)return{min:0,max:0};let o=cd,i=ud,s,a;r.indexOf(0)===-1&&(r=[0].concat(r)),r.indexOf(1)===-1&&r.push(1);for(let l=0,c=r.length;l<c;l++)s=r[l],a=e.get(s),a[n]<o&&(o=a[n]),a[n]>i&&(i=a[n]);return{min:o,mid:(o+i)/2,max:i,size:i-o}},align:function(e,n){const r=n.p1.x,o=n.p1.y,i=-es(n.p2.y-o,n.p2.x-r),s=function(a){return{x:(a.x-r)*jn(i)-(a.y-o)*Po(i),y:(a.x-r)*Po(i)+(a.y-o)*jn(i)}};return e.map(s)},roots:function(e,n){n=n||{p1:{x:0,y:0},p2:{x:1,y:0}};const r=e.length-1,o=Z.align(e,n),i=function(k){return 0<=k&&k<=1};if(r===2){const k=o[0].y,N=o[1].y,j=o[2].y,$=k-2*N+j;if($!==0){const I=-tr(N*N-k*j),O=-k+N,H=-(I+O)/$,R=-(-I+O)/$;return[H,R].filter(i)}else if(N!==j&&$===0)return[(2*N-j)/(2*N-2*j)].filter(i);return[]}const s=o[0].y,a=o[1].y,l=o[2].y,c=o[3].y;let u=-s+3*a-3*l+c,d=3*s-6*a+3*l,f=-3*s+3*a,p=s;if(Z.approximately(u,0)){if(Z.approximately(d,0))return Z.approximately(f,0)?[]:[-p/f].filter(i);const k=tr(f*f-4*d*p),N=2*d;return[(k-f)/N,(-f-k)/N].filter(i)}d/=u,f/=u,p/=u;const m=(3*f-d*d)/3,g=m/3,b=(2*d*d*d-9*d*f+27*p)/27,_=b/2,y=_*_+g*g*g;let x,w,S,C,E;if(y<0){const k=-m/3,N=k*k*k,j=tr(N),$=-b/(2*j),I=$<-1?-1:$>1?1:$,O=XH(I),H=ts(j),R=2*H;return S=R*jn(O/3)-d/3,C=R*jn((O+gl)/3)-d/3,E=R*jn((O+2*gl)/3)-d/3,[S,C,E].filter(i)}else{if(y===0)return x=_<0?ts(-_):-ts(_),S=2*x-d/3,C=-x-d/3,[S,C].filter(i);{const k=tr(y);return x=ts(-_+k),w=ts(_+k),[x-w-d/3].filter(i)}}},droots:function(e){if(e.length===3){const n=e[0],r=e[1],o=e[2],i=n-2*r+o;if(i!==0){const s=-tr(r*r-n*o),a=-n+r,l=-(s+a)/i,c=-(-s+a)/i;return[l,c]}else if(r!==o&&i===0)return[(2*r-o)/(2*(r-o))];return[]}if(e.length===2){const n=e[0],r=e[1];return n!==r?[n/(n-r)]:[]}return[]},curvature:function(e,n,r,o,i){let s,a,l,c,u=0,d=0;const f=Z.compute(e,n),p=Z.compute(e,r),m=f.x*f.x+f.y*f.y;if(o?(s=tr(It(f.y*p.z-p.y*f.z,2)+It(f.z*p.x-p.z*f.x,2)+It(f.x*p.y-p.x*f.y,2)),a=It(m+f.z*f.z,3/2)):(s=f.x*p.y-f.y*p.x,a=It(m,3/2)),s===0||a===0)return{k:0,r:0};if(u=s/a,d=a/s,!i){const g=Z.curvature(e-.001,n,r,o,!0).k,b=Z.curvature(e+.001,n,r,o,!0).k;c=(b-u+(u-g))/2,l=(Ji(b-u)+Ji(u-g))/2}return{k:u,r:d,dk:c,adk:l}},inflections:function(e){if(e.length<4)return[];const n=Z.align(e,{p1:e[0],p2:e.slice(-1)[0]}),r=n[2].x*n[1].y,o=n[3].x*n[1].y,i=n[1].x*n[2].y,s=n[3].x*n[2].y,a=18*(-3*r+2*o+3*i-s),l=18*(3*r-o-3*i),c=18*(i-r);if(Z.approximately(a,0)){if(!Z.approximately(l,0)){let p=-c/l;if(0<=p&&p<=1)return[p]}return[]}const u=2*a;if(Z.approximately(u,0))return[];const d=l*l-4*a*c;if(d<0)return[];const f=Math.sqrt(d);return[(f-l)/u,-(l+f)/u].filter(function(p){return 0<=p&&p<=1})},bboxoverlap:function(e,n){const r=["x","y"],o=r.length;for(let i=0,s,a,l,c;i<o;i++)if(s=r[i],a=e[s].mid,l=n[s].mid,c=(e[s].size+n[s].size)/2,Ji(a-l)>=c)return!1;return!0},expandbox:function(e,n){n.x.min<e.x.min&&(e.x.min=n.x.min),n.y.min<e.y.min&&(e.y.min=n.y.min),n.z&&n.z.min<e.z.min&&(e.z.min=n.z.min),n.x.max>e.x.max&&(e.x.max=n.x.max),n.y.max>e.y.max&&(e.y.max=n.y.max),n.z&&n.z.max>e.z.max&&(e.z.max=n.z.max),e.x.mid=(e.x.min+e.x.max)/2,e.y.mid=(e.y.min+e.y.max)/2,e.z&&(e.z.mid=(e.z.min+e.z.max)/2),e.x.size=e.x.max-e.x.min,e.y.size=e.y.max-e.y.min,e.z&&(e.z.size=e.z.max-e.z.min)},pairiteration:function(e,n,r){const o=e.bbox(),i=n.bbox(),s=1e5,a=r||.5;if(o.x.size+o.y.size<a&&i.x.size+i.y.size<a)return[(s*(e._t1+e._t2)/2|0)/s+"/"+(s*(n._t1+n._t2)/2|0)/s];let l=e.split(.5),c=n.split(.5),u=[{left:l.left,right:c.left},{left:l.left,right:c.right},{left:l.right,right:c.right},{left:l.right,right:c.left}];u=u.filter(function(f){return Z.bboxoverlap(f.left.bbox(),f.right.bbox())});let d=[];return u.length===0||(u.forEach(function(f){d=d.concat(Z.pairiteration(f.left,f.right,a))}),d=d.filter(function(f,p){return d.indexOf(f)===p})),d},getccenter:function(e,n,r){const o=n.x-e.x,i=n.y-e.y,s=r.x-n.x,a=r.y-n.y,l=o*jn(nr)-i*Po(nr),c=o*Po(nr)+i*jn(nr),u=s*jn(nr)-a*Po(nr),d=s*Po(nr)+a*jn(nr),f=(e.x+n.x)/2,p=(e.y+n.y)/2,m=(n.x+r.x)/2,g=(n.y+r.y)/2,b=f+l,_=p+c,y=m+u,x=g+d,w=Z.lli8(f,p,b,_,m,g,y,x),S=Z.dist(w,e);let C=es(e.y-w.y,e.x-w.x),E=es(n.y-w.y,n.x-w.x),k=es(r.y-w.y,r.x-w.x),N;return C<k?((C>E||E>k)&&(C+=gl),C>k&&(N=k,k=C,C=N)):k<E&&E<C?(N=k,k=C,C=N):k+=gl,w.s=C,w.e=k,w.r=S,w},numberSort:function(e,n){return e-n}};class Ns{constructor(n){this.curves=[],this._3d=!1,n&&(this.curves=n,this._3d=this.curves[0]._3d)}valueOf(){return this.toString()}toString(){return"["+this.curves.map(function(n){return Z.pointsToString(n.points)}).join(", ")+"]"}addCurve(n){this.curves.push(n),this._3d=this._3d||n._3d}length(){return this.curves.map(function(n){return n.length()}).reduce(function(n,r){return n+r})}curve(n){return this.curves[n]}bbox(){const n=this.curves;for(var r=n[0].bbox(),o=1;o<n.length;o++)Z.expandbox(r,n[o].bbox());return r}offset(n){const r=[];return this.curves.forEach(function(o){r.push(...o.offset(n))}),new Ns(r)}}const{abs:ns,min:B0,max:H0,cos:ZH,sin:QH,acos:JH,sqrt:rs}=Math,eW=Math.PI;class Ce{constructor(n){let r=n&&n.forEach?n:Array.from(arguments).slice(),o=!1;if(typeof r[0]=="object"){o=r.length;const m=[];r.forEach(function(g){["x","y","z"].forEach(function(b){typeof g[b]<"u"&&m.push(g[b])})}),r=m}let i=!1;const s=r.length;if(o){if(o>4){if(arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");i=!0}}else if(s!==6&&s!==8&&s!==9&&s!==12&&arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");const a=this._3d=!i&&(s===9||s===12)||n&&n[0]&&typeof n[0].z<"u",l=this.points=[];for(let m=0,g=a?3:2;m<s;m+=g){var c={x:r[m],y:r[m+1]};a&&(c.z=r[m+2]),l.push(c)}const u=this.order=l.length-1,d=this.dims=["x","y"];a&&d.push("z"),this.dimlen=d.length;const f=Z.align(l,{p1:l[0],p2:l[u]}),p=Z.dist(l[0],l[u]);this._linear=f.reduce((m,g)=>m+ns(g.y),0)<p/50,this._lut=[],this._t1=0,this._t2=1,this.update()}static quadraticFromPoints(n,r,o,i){if(typeof i>"u"&&(i=.5),i===0)return new Ce(r,r,o);if(i===1)return new Ce(n,r,r);const s=Ce.getABC(2,n,r,o,i);return new Ce(n,s.A,o)}static cubicFromPoints(n,r,o,i,s){typeof i>"u"&&(i=.5);const a=Ce.getABC(3,n,r,o,i);typeof s>"u"&&(s=Z.dist(r,a.C));const l=s*(1-i)/i,c=Z.dist(n,o),u=(o.x-n.x)/c,d=(o.y-n.y)/c,f=s*u,p=s*d,m=l*u,g=l*d,b={x:r.x-f,y:r.y-p},_={x:r.x+m,y:r.y+g},y=a.A,x={x:y.x+(b.x-y.x)/(1-i),y:y.y+(b.y-y.y)/(1-i)},w={x:y.x+(_.x-y.x)/i,y:y.y+(_.y-y.y)/i},S={x:n.x+(x.x-n.x)/i,y:n.y+(x.y-n.y)/i},C={x:o.x+(w.x-o.x)/(1-i),y:o.y+(w.y-o.y)/(1-i)};return new Ce(n,S,C,o)}static getUtils(){return Z}getUtils(){return Ce.getUtils()}static get PolyBezier(){return Ns}valueOf(){return this.toString()}toString(){return Z.pointsToString(this.points)}toSVG(){if(this._3d)return!1;const n=this.points,r=n[0].x,o=n[0].y,i=["M",r,o,this.order===2?"Q":"C"];for(let s=1,a=n.length;s<a;s++)i.push(n[s].x),i.push(n[s].y);return i.join(" ")}setRatios(n){if(n.length!==this.points.length)throw new Error("incorrect number of ratio values");this.ratios=n,this._lut=[]}verify(){const n=this.coordDigest();n!==this._print&&(this._print=n,this.update())}coordDigest(){return this.points.map(function(n,r){return""+r+n.x+n.y+(n.z?n.z:0)}).join("")}update(){this._lut=[],this.dpoints=Z.derive(this.points,this._3d),this.computedirection()}computedirection(){const n=this.points,r=Z.angle(n[0],n[this.order],n[1]);this.clockwise=r>0}length(){return Z.length(this.derivative.bind(this))}static getABC(n=2,r,o,i,s=.5){const a=Z.projectionratio(s,n),l=1-a,c={x:a*r.x+l*i.x,y:a*r.y+l*i.y},u=Z.abcratio(s,n);return{A:{x:o.x+(o.x-c.x)/u,y:o.y+(o.y-c.y)/u},B:o,C:c,S:r,E:i}}getABC(n,r){r=r||this.get(n);let o=this.points[0],i=this.points[this.order];return Ce.getABC(this.order,o,r,i,n)}getLUT(n){if(this.verify(),n=n||100,this._lut.length===n+1)return this._lut;this._lut=[],n++,this._lut=[];for(let r=0,o,i;r<n;r++)i=r/(n-1),o=this.compute(i),o.t=i,this._lut.push(o);return this._lut}on(n,r){r=r||5;const o=this.getLUT(),i=[];for(let s=0,a,l=0;s<o.length;s++)a=o[s],Z.dist(a,n)<r&&(i.push(a),l+=s/o.length);return i.length?t/=i.length:!1}project(n){const r=this.getLUT(),o=r.length-1,i=Z.closest(r,n),s=i.mpos,a=(s-1)/o,l=(s+1)/o,c=.1/o;let u=i.mdist,d=a,f=d,p;u+=1;for(let m;d<l+c;d+=c)p=this.compute(d),m=Z.dist(n,p),m<u&&(u=m,f=d);return f=f<0?0:f>1?1:f,p=this.compute(f),p.t=f,p.d=u,p}get(n){return this.compute(n)}point(n){return this.points[n]}compute(n){return this.ratios?Z.computeWithRatios(n,this.points,this.ratios,this._3d):Z.compute(n,this.points,this._3d,this.ratios)}raise(){const n=this.points,r=[n[0]],o=n.length;for(let i=1,s,a;i<o;i++)s=n[i],a=n[i-1],r[i]={x:(o-i)/o*s.x+i/o*a.x,y:(o-i)/o*s.y+i/o*a.y};return r[o]=n[o-1],new Ce(r)}derivative(n){return Z.compute(n,this.dpoints[0],this._3d)}dderivative(n){return Z.compute(n,this.dpoints[1],this._3d)}align(){let n=this.points;return new Ce(Z.align(n,{p1:n[0],p2:n[n.length-1]}))}curvature(n){return Z.curvature(n,this.dpoints[0],this.dpoints[1],this._3d)}inflections(){return Z.inflections(this.points)}normal(n){return this._3d?this.__normal3(n):this.__normal2(n)}__normal2(n){const r=this.derivative(n),o=rs(r.x*r.x+r.y*r.y);return{t:n,x:-r.y/o,y:r.x/o}}__normal3(n){const r=this.derivative(n),o=this.derivative(n+.01),i=rs(r.x*r.x+r.y*r.y+r.z*r.z),s=rs(o.x*o.x+o.y*o.y+o.z*o.z);r.x/=i,r.y/=i,r.z/=i,o.x/=s,o.y/=s,o.z/=s;const a={x:o.y*r.z-o.z*r.y,y:o.z*r.x-o.x*r.z,z:o.x*r.y-o.y*r.x},l=rs(a.x*a.x+a.y*a.y+a.z*a.z);a.x/=l,a.y/=l,a.z/=l;const c=[a.x*a.x,a.x*a.y-a.z,a.x*a.z+a.y,a.x*a.y+a.z,a.y*a.y,a.y*a.z-a.x,a.x*a.z-a.y,a.y*a.z+a.x,a.z*a.z];return{t:n,x:c[0]*r.x+c[1]*r.y+c[2]*r.z,y:c[3]*r.x+c[4]*r.y+c[5]*r.z,z:c[6]*r.x+c[7]*r.y+c[8]*r.z}}hull(n){let r=this.points,o=[],i=[],s=0;for(i[s++]=r[0],i[s++]=r[1],i[s++]=r[2],this.order===3&&(i[s++]=r[3]);r.length>1;){o=[];for(let a=0,l,c=r.length-1;a<c;a++)l=Z.lerp(n,r[a],r[a+1]),i[s++]=l,o.push(l);r=o}return i}split(n,r){if(n===0&&r)return this.split(r).left;if(r===1)return this.split(n).right;const o=this.hull(n),i={left:this.order===2?new Ce([o[0],o[3],o[5]]):new Ce([o[0],o[4],o[7],o[9]]),right:this.order===2?new Ce([o[5],o[4],o[2]]):new Ce([o[9],o[8],o[6],o[3]]),span:o};return i.left._t1=Z.map(0,0,1,this._t1,this._t2),i.left._t2=Z.map(n,0,1,this._t1,this._t2),i.right._t1=Z.map(n,0,1,this._t1,this._t2),i.right._t2=Z.map(1,0,1,this._t1,this._t2),r?(r=Z.map(r,n,1,0,1),i.right.split(r).left):i}extrema(){const n={};let r=[];return this.dims.forEach((function(o){let i=function(a){return a[o]},s=this.dpoints[0].map(i);n[o]=Z.droots(s),this.order===3&&(s=this.dpoints[1].map(i),n[o]=n[o].concat(Z.droots(s))),n[o]=n[o].filter(function(a){return a>=0&&a<=1}),r=r.concat(n[o].sort(Z.numberSort))}).bind(this)),n.values=r.sort(Z.numberSort).filter(function(o,i){return r.indexOf(o)===i}),n}bbox(){const n=this.extrema(),r={};return this.dims.forEach((function(o){r[o]=Z.getminmax(this,o,n[o])}).bind(this)),r}overlaps(n){const r=this.bbox(),o=n.bbox();return Z.bboxoverlap(r,o)}offset(n,r){if(typeof r<"u"){const o=this.get(n),i=this.normal(n),s={c:o,n:i,x:o.x+i.x*r,y:o.y+i.y*r};return this._3d&&(s.z=o.z+i.z*r),s}if(this._linear){const o=this.normal(0),i=this.points.map(function(s){const a={x:s.x+n*o.x,y:s.y+n*o.y};return s.z&&o.z&&(a.z=s.z+n*o.z),a});return[new Ce(i)]}return this.reduce().map(function(o){return o._linear?o.offset(n)[0]:o.scale(n)})}simple(){if(this.order===3){const i=Z.angle(this.points[0],this.points[3],this.points[1]),s=Z.angle(this.points[0],this.points[3],this.points[2]);if(i>0&&s<0||i<0&&s>0)return!1}const n=this.normal(0),r=this.normal(1);let o=n.x*r.x+n.y*r.y;return this._3d&&(o+=n.z*r.z),ns(JH(o))<eW/3}reduce(){let n,r=0,o=0,i=.01,s,a=[],l=[],c=this.extrema().values;for(c.indexOf(0)===-1&&(c=[0].concat(c)),c.indexOf(1)===-1&&c.push(1),r=c[0],n=1;n<c.length;n++)o=c[n],s=this.split(r,o),s._t1=r,s._t2=o,a.push(s),r=o;return a.forEach(function(u){for(r=0,o=0;o<=1;)for(o=r+i;o<=1+i;o+=i)if(s=u.split(r,o),!s.simple()){if(o-=i,ns(r-o)<i)return[];s=u.split(r,o),s._t1=Z.map(r,0,1,u._t1,u._t2),s._t2=Z.map(o,0,1,u._t1,u._t2),l.push(s),r=o;break}r<1&&(s=u.split(r,1),s._t1=Z.map(r,0,1,u._t1,u._t2),s._t2=u._t2,l.push(s))}),l}translate(n,r,o){o=typeof o=="number"?o:r;const i=this.order;let s=this.points.map((a,l)=>(1-l/i)*r+l/i*o);return new Ce(this.points.map((a,l)=>({x:a.x+n.x*s[l],y:a.y+n.y*s[l]})))}scale(n){const r=this.order;let o=!1;if(typeof n=="function"&&(o=n),o&&r===2)return this.raise().scale(o);const i=this.clockwise,s=this.points;if(this._linear)return this.translate(this.normal(0),o?o(0):n,o?o(1):n);const a=o?o(0):n,l=o?o(1):n,c=[this.offset(0,10),this.offset(1,10)],u=[],d=Z.lli4(c[0],c[0].c,c[1],c[1].c);if(!d)throw new Error("cannot scale this curve. Try reducing it first.");return[0,1].forEach(function(f){const p=u[f*r]=Z.copy(s[f*r]);p.x+=(f?l:a)*c[f].n.x,p.y+=(f?l:a)*c[f].n.y}),o?([0,1].forEach(function(f){if(!(r===2&&f)){var p=s[f+1],m={x:p.x-d.x,y:p.y-d.y},g=o?o((f+1)/r):n;o&&!i&&(g=-g);var b=rs(m.x*m.x+m.y*m.y);m.x/=b,m.y/=b,u[f+1]={x:p.x+g*m.x,y:p.y+g*m.y}}}),new Ce(u)):([0,1].forEach(f=>{if(r===2&&f)return;const p=u[f*r],m=this.derivative(f),g={x:p.x+m.x,y:p.y+m.y};u[f+1]=Z.lli4(p,g,d,s[f+1])}),new Ce(u))}outline(n,r,o,i){if(r=r===void 0?n:r,this._linear){const C=this.normal(0),E=this.points[0],k=this.points[this.points.length-1];let N,j,$;o===void 0&&(o=n,i=r),N={x:E.x+C.x*n,y:E.y+C.y*n},$={x:k.x+C.x*o,y:k.y+C.y*o},j={x:(N.x+$.x)/2,y:(N.y+$.y)/2};const I=[N,j,$];N={x:E.x-C.x*r,y:E.y-C.y*r},$={x:k.x-C.x*i,y:k.y-C.y*i},j={x:(N.x+$.x)/2,y:(N.y+$.y)/2};const O=[$,j,N],H=Z.makeline(O[2],I[0]),R=Z.makeline(I[2],O[0]),L=[H,new Ce(I),R,new Ce(O)];return new Ns(L)}const s=this.reduce(),a=s.length,l=[];let c=[],u,d=0,f=this.length();const p=typeof o<"u"&&typeof i<"u";function m(C,E,k,N,j){return function($){const I=N/k,O=(N+j)/k,H=E-C;return Z.map($,0,1,C+I*H,C+O*H)}}s.forEach(function(C){const E=C.length();p?(l.push(C.scale(m(n,o,f,d,E))),c.push(C.scale(m(-r,-i,f,d,E)))):(l.push(C.scale(n)),c.push(C.scale(-r))),d+=E}),c=c.map(function(C){return u=C.points,u[3]?C.points=[u[3],u[2],u[1],u[0]]:C.points=[u[2],u[1],u[0]],C}).reverse();const g=l[0].points[0],b=l[a-1].points[l[a-1].points.length-1],_=c[a-1].points[c[a-1].points.length-1],y=c[0].points[0],x=Z.makeline(_,g),w=Z.makeline(b,y),S=[x].concat(l).concat([w]).concat(c);return new Ns(S)}outlineshapes(n,r,o){r=r||n;const i=this.outline(n,r).curves,s=[];for(let a=1,l=i.length;a<l/2;a++){const c=Z.makeshape(i[a],i[l-a],o);c.startcap.virtual=a>1,c.endcap.virtual=a<l/2-1,s.push(c)}return s}intersects(n,r){return n?n.p1&&n.p2?this.lineIntersects(n):(n instanceof Ce&&(n=n.reduce()),this.curveintersects(this.reduce(),n,r)):this.selfintersects(r)}lineIntersects(n){const r=B0(n.p1.x,n.p2.x),o=B0(n.p1.y,n.p2.y),i=H0(n.p1.x,n.p2.x),s=H0(n.p1.y,n.p2.y);return Z.roots(this.points,n).filter(a=>{var l=this.get(a);return Z.between(l.x,r,i)&&Z.between(l.y,o,s)})}selfintersects(n){const r=this.reduce(),o=r.length-2,i=[];for(let s=0,a,l,c;s<o;s++)l=r.slice(s,s+1),c=r.slice(s+2),a=this.curveintersects(l,c,n),i.push(...a);return i}curveintersects(n,r,o){const i=[];n.forEach(function(a){r.forEach(function(l){a.overlaps(l)&&i.push({left:a,right:l})})});let s=[];return i.forEach(function(a){const l=Z.pairiteration(a.left,a.right,o);l.length>0&&(s=s.concat(l))}),s}arcs(n){return n=n||.5,this._iterate(n,[])}_error(n,r,o,i){const s=(i-o)/4,a=this.get(o+s),l=this.get(i-s),c=Z.dist(n,r),u=Z.dist(n,a),d=Z.dist(n,l);return ns(u-c)+ns(d-c)}_iterate(n,r){let o=0,i=1,s;do{s=0,i=1;let a=this.get(o),l,c,u,d,f=!1,p=!1,m,g=i,b=1;do if(p=f,d=u,g=(o+i)/2,l=this.get(g),c=this.get(i),u=Z.getccenter(a,l,c),u.interval={start:o,end:i},f=this._error(u,a,o,i)<=n,m=p&&!f,m||(b=i),f){if(i>=1){if(u.interval.end=b=1,d=u,i>1){let y={x:u.x+u.r*ZH(u.e),y:u.y+u.r*QH(u.e)};u.e+=Z.angle({x:u.x,y:u.y},y,this.get(1))}break}i=i+(i-o)/2}else i=g;while(!m&&s++<100);if(s>=100)break;d=d||u,r.push(d),o=b}while(i<1);return r}}function Kp(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,o=Array(n);r<n;r++)o[r]=e[r];return o}function tW(e){if(Array.isArray(e))return e}function nW(e){if(Array.isArray(e))return Kp(e)}function rW(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function oW(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var o,i,s,a,l=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,n!==0)for(;!(c=(o=s.call(r)).done)&&(l.push(o.value),l.length!==n);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}function iW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
338
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sW(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
339
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aW(e,n){if(e==null)return{};var r,o,i=lW(e,n);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)r=s[o],n.includes(r)||{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function lW(e,n){if(e==null)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(n.includes(o))continue;r[o]=e[o]}return r}function cW(e,n){return tW(e)||oW(e,n)||HE(e,n)||iW()}function uW(e){return nW(e)||rW(e)||HE(e)||sW()}function fW(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,n);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function dW(e){var n=fW(e,"string");return typeof n=="symbol"?n:n+""}function HE(e,n){if(e){if(typeof e=="string")return Kp(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Kp(e,n):void 0}}var pW=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=(n instanceof Array?n.length?n:[void 0]:[n]).map(function(l){return{keyAccessor:l,isProp:!(l instanceof Function)}}),s=e.reduce(function(l,c){var u=l,d=c;return i.forEach(function(f,p){var m=f.keyAccessor,g=f.isProp,b;if(g){var _=d,y=_[m],x=aW(_,[m].map(dW));b=y,d=x}else b=m(d,p);p+1<i.length?(u.hasOwnProperty(b)||(u[b]={}),u=u[b]):r?(u.hasOwnProperty(b)||(u[b]=[]),u[b].push(d)):u[b]=d}),l},{});r instanceof Function&&function l(c){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;u===i.length?Object.keys(c).forEach(function(d){return c[d]=r(c[d])}):Object.values(c).forEach(function(d){return l(d,u+1)})}(s);var a=s;return o&&(a=[],function l(c){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];u.length===i.length?a.push({keys:u,vals:c}):Object.entries(c).forEach(function(d){var f=cW(d,2),p=f[0],m=f[1];return l(m,[].concat(uW(u),[p]))})}(s),n instanceof Array&&n.length===0&&a.length===1&&(a[0].keys=[])),a};function hW(e,n){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(n).domain(e);break}return this}const W0=Symbol("implicit");function WE(){var e=new f0,n=[],r=[],o=W0;function i(s){let a=e.get(s);if(a===void 0){if(o!==W0)return o;e.set(s,a=n.push(s)-1)}return r[a%r.length]}return i.domain=function(s){if(!arguments.length)return n.slice();n=[],e=new f0;for(const a of s)e.has(a)||e.set(a,n.push(a)-1);return i},i.range=function(s){return arguments.length?(r=Array.from(s),i):r.slice()},i.unknown=function(s){return arguments.length?(o=s,i):o},i.copy=function(){return WE(n,r).unknown(o)},hW.apply(i,arguments),i}function mW(e){for(var n=e.length/6|0,r=new Array(n),o=0;o<n;)r[o]="#"+e.slice(o*6,++o*6);return r}const gW=mW("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");function yW(e,n){n===void 0&&(n={});var r=n.insertAt;if(!(typeof document>"u")){var o=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",r==="top"&&o.firstChild?o.insertBefore(i,o.firstChild):o.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var vW=`.force-graph-container canvas {
340
+ display: block;
341
+ user-select: none;
342
+ outline: none;
343
+ -webkit-tap-highlight-color: transparent;
344
+ }
345
+
346
+ .force-graph-container .clickable {
347
+ cursor: pointer;
348
+ }
349
+
350
+ .force-graph-container .grabbable {
351
+ cursor: move;
352
+ cursor: grab;
353
+ cursor: -moz-grab;
354
+ cursor: -webkit-grab;
355
+ }
356
+
357
+ .force-graph-container .grabbable:active {
358
+ cursor: grabbing;
359
+ cursor: -moz-grabbing;
360
+ cursor: -webkit-grabbing;
361
+ }
362
+ `;yW(vW);function qp(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,o=Array(n);r<n;r++)o[r]=e[r];return o}function xW(e){if(Array.isArray(e))return e}function wW(e){if(Array.isArray(e))return qp(e)}function U0(e,n,r){if(UE())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,n);var i=new(e.bind.apply(e,o));return i}function ra(e,n,r){return(n=kW(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function UE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(UE=function(){return!!e})()}function bW(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _W(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var o,i,s,a,l=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,n!==0)for(;!(c=(o=s.call(r)).done)&&(l.push(o.value),l.length!==n);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}function SW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
363
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CW(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
364
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function G0(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,o)}return r}function Ro(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?G0(Object(r),!0).forEach(function(o){ra(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):G0(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function Ps(e,n){return xW(e)||_W(e,n)||GE(e,n)||SW()}function zt(e){return wW(e)||bW(e)||GE(e)||CW()}function EW(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,n);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function kW(e){var n=EW(e,"string");return typeof n=="symbol"?n:n+""}function Zp(e){"@babel/helpers - typeof";return Zp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Zp(e)}function GE(e,n){if(e){if(typeof e=="string")return qp(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?qp(e,n):void 0}}var NW=WE(gW);function Y0(e,n,r){!n||typeof r!="string"||e.filter(function(o){return!o[r]}).forEach(function(o){o[r]=NW(n(o))})}function PW(e,n){var r=e.nodes,o=e.links,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=i.nodeFilter,a=s===void 0?function(){return!0}:s,l=i.onLoopError,c=l===void 0?function(m){throw"Invalid DAG structure! Found cycle in node path: ".concat(m.join(" -> "),".")}:l,u={};r.forEach(function(m){return u[n(m)]={data:m,out:[],depth:-1,skip:!a(m)}}),o.forEach(function(m){var g=m.source,b=m.target,_=S(g),y=S(b);if(!u.hasOwnProperty(_))throw"Missing source node with id: ".concat(_);if(!u.hasOwnProperty(y))throw"Missing target node with id: ".concat(y);var x=u[_],w=u[y];x.out.push(w);function S(C){return Zp(C)==="object"?n(C):C}});var d=[];p(Object.values(u));var f=Object.assign.apply(Object,[{}].concat(zt(Object.entries(u).filter(function(m){var g=Ps(m,2),b=g[1];return!b.skip}).map(function(m){var g=Ps(m,2),b=g[0],_=g[1];return ra({},b,_.depth)}))));return f;function p(m){for(var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,_=function(){var S=m[y];if(g.indexOf(S)!==-1){var C=[].concat(zt(g.slice(g.indexOf(S))),[S]).map(function(E){return n(E.data)});return d.some(function(E){return E.length===C.length&&E.every(function(k,N){return k===C[N]})})||(d.push(C),c(C)),1}b>S.depth&&(S.depth=b,p(S.out,[].concat(zt(g),[S]),b+(S.skip?0:1)))},y=0,x=m.length;y<x;y++)_()}}var RW=2,Qe=function(n,r){return r.onNeedsRedraw&&r.onNeedsRedraw()},X0=function(n,r){if(!r.isShadow){var o=ve(r.linkDirectionalParticles);r.graphData.links.forEach(function(i){var s=Math.round(Math.abs(o(i)));s?i.__photons=zt(Array(s)).map(function(){return{}}):delete i.__photons})}},Kc=ng({props:{graphData:{default:{nodes:[],links:[]},onChange:function(n,r){r.engineRunning=!1,X0(n,r)}},dagMode:{onChange:function(n,r){!n&&(r.graphData.nodes||[]).forEach(function(o){return o.fx=o.fy=void 0})}},dagLevelDistance:{},dagNodeFilter:{default:function(n){return!0}},onDagError:{triggerUpdate:!1},nodeRelSize:{default:4,triggerUpdate:!1,onChange:Qe},nodeId:{default:"id"},nodeVal:{default:"val",triggerUpdate:!1,onChange:Qe},nodeColor:{default:"color",triggerUpdate:!1,onChange:Qe},nodeAutoColorBy:{},nodeCanvasObject:{triggerUpdate:!1,onChange:Qe},nodeCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:Qe},nodeVisibility:{default:!0,triggerUpdate:!1,onChange:Qe},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0,triggerUpdate:!1,onChange:Qe},linkColor:{default:"color",triggerUpdate:!1,onChange:Qe},linkAutoColorBy:{},linkLineDash:{triggerUpdate:!1,onChange:Qe},linkWidth:{default:1,triggerUpdate:!1,onChange:Qe},linkCurvature:{default:0,triggerUpdate:!1,onChange:Qe},linkCanvasObject:{triggerUpdate:!1,onChange:Qe},linkCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:Qe},linkDirectionalArrowLength:{default:0,triggerUpdate:!1,onChange:Qe},linkDirectionalArrowColor:{triggerUpdate:!1,onChange:Qe},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1,onChange:Qe},linkDirectionalParticles:{default:0,triggerUpdate:!1,onChange:X0},linkDirectionalParticleSpeed:{default:.01,triggerUpdate:!1},linkDirectionalParticleOffset:{default:0,triggerUpdate:!1},linkDirectionalParticleWidth:{default:4,triggerUpdate:!1},linkDirectionalParticleColor:{triggerUpdate:!1},linkDirectionalParticleCanvasObject:{triggerUpdate:!1},globalScale:{default:1,triggerUpdate:!1},d3AlphaMin:{default:0,triggerUpdate:!1},d3AlphaDecay:{default:.0228,triggerUpdate:!1,onChange:function(n,r){r.forceLayout.alphaDecay(n)}},d3AlphaTarget:{default:0,triggerUpdate:!1,onChange:function(n,r){r.forceLayout.alphaTarget(n)}},d3VelocityDecay:{default:.4,triggerUpdate:!1,onChange:function(n,r){r.forceLayout.velocityDecay(n)}},warmupTicks:{default:0,triggerUpdate:!1},cooldownTicks:{default:1/0,triggerUpdate:!1},cooldownTime:{default:15e3,triggerUpdate:!1},onUpdate:{default:function(){},triggerUpdate:!1},onFinishUpdate:{default:function(){},triggerUpdate:!1},onEngineTick:{default:function(){},triggerUpdate:!1},onEngineStop:{default:function(){},triggerUpdate:!1},onNeedsRedraw:{triggerUpdate:!1},isShadow:{default:!1,triggerUpdate:!1}},methods:{d3Force:function(n,r,o){return o===void 0?n.forceLayout.force(r):(n.forceLayout.force(r,o),this)},d3ReheatSimulation:function(n){return n.forceLayout.alpha(1),this.resetCountdown(),this},resetCountdown:function(n){return n.cntTicks=0,n.startTickTime=new Date,n.engineRunning=!0,this},isEngineRunning:function(n){return!!n.engineRunning},tickFrame:function(n){return!n.isShadow&&r(),i(),!n.isShadow&&s(),!n.isShadow&&a(),o(),this;function r(){n.engineRunning&&(++n.cntTicks>n.cooldownTicks||new Date-n.startTickTime>n.cooldownTime||n.d3AlphaMin>0&&n.forceLayout.alpha()<n.d3AlphaMin?(n.engineRunning=!1,n.onEngineStop()):(n.forceLayout.tick(),n.onEngineTick()))}function o(){var l=ve(n.nodeVisibility),c=ve(n.nodeVal),u=ve(n.nodeColor),d=ve(n.nodeCanvasObjectMode),f=n.ctx,p=n.isShadow/n.globalScale,m=n.graphData.nodes.filter(l);f.save(),m.forEach(function(g){var b=d(g);if(n.nodeCanvasObject&&(b==="before"||b==="replace")&&(n.nodeCanvasObject(g,f,n.globalScale),b==="replace")){f.restore();return}var _=Math.sqrt(Math.max(0,c(g)||1))*n.nodeRelSize+p;f.beginPath(),f.arc(g.x,g.y,_,0,2*Math.PI,!1),f.fillStyle=u(g)||"rgba(31, 120, 180, 0.92)",f.fill(),n.nodeCanvasObject&&b==="after"&&n.nodeCanvasObject(g,n.ctx,n.globalScale)}),f.restore()}function i(){var l=ve(n.linkVisibility),c=ve(n.linkColor),u=ve(n.linkWidth),d=ve(n.linkLineDash),f=ve(n.linkCurvature),p=ve(n.linkCanvasObjectMode),m=n.ctx,g=n.isShadow*2,b=n.graphData.links.filter(l);b.forEach(E);var _=[],y=[],x=b;if(n.linkCanvasObject){var w=[],S=[];b.forEach(function(k){return({before:_,after:y,replace:w}[p(k)]||S).push(k)}),x=[].concat(zt(_),y,S),_=_.concat(w)}m.save(),_.forEach(function(k){return n.linkCanvasObject(k,m,n.globalScale)}),m.restore();var C=pW(x,[c,u,d]);m.save(),Object.entries(C).forEach(function(k){var N=Ps(k,2),j=N[0],$=N[1],I=!j||j==="undefined"?"rgba(0,0,0,0.15)":j;Object.entries($).forEach(function(O){var H=Ps(O,2),R=H[0],L=H[1],D=(R||1)/n.globalScale+g;Object.entries(L).forEach(function(z){var A=Ps(z,2);A[0];var M=A[1],P=d(M[0]);m.beginPath(),M.forEach(function(W){var T=W.source,X=W.target;if(!(!T||!X||!T.hasOwnProperty("x")||!X.hasOwnProperty("x"))){m.moveTo(T.x,T.y);var F=W.__controlPoints;F?m[F.length===2?"quadraticCurveTo":"bezierCurveTo"].apply(m,zt(F).concat([X.x,X.y])):m.lineTo(X.x,X.y)}}),m.strokeStyle=I,m.lineWidth=D,m.setLineDash(P||[]),m.stroke()})})}),m.restore(),m.save(),y.forEach(function(k){return n.linkCanvasObject(k,m,n.globalScale)}),m.restore();function E(k){var N=f(k);if(!N){k.__controlPoints=null;return}var j=k.source,$=k.target;if(!(!j||!$||!j.hasOwnProperty("x")||!$.hasOwnProperty("x"))){var I=Math.sqrt(Math.pow($.x-j.x,2)+Math.pow($.y-j.y,2));if(I>0){var O=Math.atan2($.y-j.y,$.x-j.x),H=I*N,R={x:(j.x+$.x)/2+H*Math.cos(O-Math.PI/2),y:(j.y+$.y)/2+H*Math.sin(O-Math.PI/2)};k.__controlPoints=[R.x,R.y]}else{var L=N*70;k.__controlPoints=[$.x,$.y-L,$.x+L,$.y]}}}}function s(){var l=1.6,c=.2,u=ve(n.linkDirectionalArrowLength),d=ve(n.linkDirectionalArrowRelPos),f=ve(n.linkVisibility),p=ve(n.linkDirectionalArrowColor||n.linkColor),m=ve(n.nodeVal),g=n.ctx;g.save(),n.graphData.links.filter(f).forEach(function(b){var _=u(b);if(!(!_||_<0)){var y=b.source,x=b.target;if(!(!y||!x||!y.hasOwnProperty("x")||!x.hasOwnProperty("x"))){var w=Math.sqrt(Math.max(0,m(y)||1))*n.nodeRelSize,S=Math.sqrt(Math.max(0,m(x)||1))*n.nodeRelSize,C=Math.min(1,Math.max(0,d(b))),E=p(b)||"rgba(0,0,0,0.28)",k=_/l/2,N=b.__controlPoints&&U0(Ce,[y.x,y.y].concat(zt(b.__controlPoints),[x.x,x.y])),j=N?function(D){return N.get(D)}:function(D){return{x:y.x+(x.x-y.x)*D||0,y:y.y+(x.y-y.y)*D||0}},$=N?N.length():Math.sqrt(Math.pow(x.x-y.x,2)+Math.pow(x.y-y.y,2)),I=w+_+($-w-S-_)*C,O=j(I/$),H=j((I-_)/$),R=j((I-_*(1-c))/$),L=Math.atan2(O.y-H.y,O.x-H.x)-Math.PI/2;g.beginPath(),g.moveTo(O.x,O.y),g.lineTo(H.x+k*Math.cos(L),H.y+k*Math.sin(L)),g.lineTo(R.x,R.y),g.lineTo(H.x-k*Math.cos(L),H.y-k*Math.sin(L)),g.fillStyle=E,g.fill()}}}),g.restore()}function a(){var l=ve(n.linkDirectionalParticles),c=ve(n.linkDirectionalParticleSpeed),u=ve(n.linkDirectionalParticleOffset),d=ve(n.linkDirectionalParticleWidth),f=ve(n.linkVisibility),p=ve(n.linkDirectionalParticleColor||n.linkColor),m=n.ctx;m.save(),n.graphData.links.filter(f).forEach(function(g){var b=l(g);if(!(!g.hasOwnProperty("__photons")||!g.__photons.length)){var _=g.source,y=g.target;if(!(!_||!y||!_.hasOwnProperty("x")||!y.hasOwnProperty("x"))){var x=c(g),w=Math.abs(u(g)),S=g.__photons||[],C=Math.max(0,d(g)/2)/Math.sqrt(n.globalScale),E=p(g)||"rgba(0,0,0,0.28)";m.fillStyle=E;var k=g.__controlPoints?U0(Ce,[_.x,_.y].concat(zt(g.__controlPoints),[y.x,y.y])):null,N=0,j=!1;S.forEach(function($){var I=!!$.__singleHop;if($.hasOwnProperty("__progressRatio")||($.__progressRatio=I?0:(N+w)/b),!I&&N++,$.__progressRatio+=x,$.__progressRatio>=1)if(!I)$.__progressRatio=$.__progressRatio%1;else{j=!0;return}var O=$.__progressRatio,H=k?k.get(O):{x:_.x+(y.x-_.x)*O||0,y:_.y+(y.y-_.y)*O||0};n.linkDirectionalParticleCanvasObject?n.linkDirectionalParticleCanvasObject(H.x,H.y,g,m,n.globalScale):(m.beginPath(),m.arc(H.x,H.y,C,0,2*Math.PI,!1),m.fill())}),j&&(g.__photons=g.__photons.filter(function($){return!$.__singleHop||$.__progressRatio<=1}))}}}),m.restore()}},emitParticle:function(n,r){return r&&(!r.__photons&&(r.__photons=[]),r.__photons.push({__singleHop:!0})),this}},stateInit:function(){return{forceLayout:UH().force("link",DH()).force("charge",GH()).force("center",zB()).force("dagRadial",null).stop(),engineRunning:!1}},init:function(n,r){r.ctx=n},update:function(n,r){n.engineRunning=!1,n.onUpdate(),n.nodeAutoColorBy!==null&&Y0(n.graphData.nodes,ve(n.nodeAutoColorBy),n.nodeColor),n.linkAutoColorBy!==null&&Y0(n.graphData.links,ve(n.linkAutoColorBy),n.linkColor),n.graphData.links.forEach(function(p){p.source=p[n.linkSource],p.target=p[n.linkTarget]}),n.forceLayout.stop().alpha(1).nodes(n.graphData.nodes);var o=n.forceLayout.force("link");o&&o.id(function(p){return p[n.nodeId]}).links(n.graphData.links);var i=n.dagMode&&PW(n.graphData,function(p){return p[n.nodeId]},{nodeFilter:n.dagNodeFilter,onLoopError:n.onDagError||void 0}),s=Math.max.apply(Math,zt(Object.values(i||[]))),a=n.dagLevelDistance||n.graphData.nodes.length/(s||1)*RW*(["radialin","radialout"].indexOf(n.dagMode)!==-1?.7:1);if(["lr","rl","td","bu"].includes(r.dagMode)){var l=["lr","rl"].includes(r.dagMode)?"fx":"fy";n.graphData.nodes.filter(n.dagNodeFilter).forEach(function(p){return delete p[l]})}if(["lr","rl","td","bu"].includes(n.dagMode)){var c=["rl","bu"].includes(n.dagMode),u=function(m){return(i[m[n.nodeId]]-s/2)*a*(c?-1:1)},d=["lr","rl"].includes(n.dagMode)?"fx":"fy";n.graphData.nodes.filter(n.dagNodeFilter).forEach(function(p){return p[d]=u(p)})}n.forceLayout.force("dagRadial",["radialin","radialout"].indexOf(n.dagMode)!==-1?YH(function(p){var m=i[p[n.nodeId]]||-1;return(n.dagMode==="radialin"?s-m:m)*a}).strength(function(p){return n.dagNodeFilter(p)?1:0}):null);for(var f=0;f<n.warmupTicks&&!(n.d3AlphaMin>0&&n.forceLayout.alpha()<n.d3AlphaMin);f++)n.forceLayout.tick();this.resetCountdown(),n.onFinishUpdate()}});function YE(e,n){var r=e instanceof Array?e:[e],o=new n;return o._destructor&&o._destructor(),{linkProp:function(s){return{default:o[s](),onChange:function(l,c){r.forEach(function(u){return c[u][s](l)})},triggerUpdate:!1}},linkMethod:function(s){return function(a){for(var l=arguments.length,c=new Array(l>1?l-1:0),u=1;u<l;u++)c[u-1]=arguments[u];var d=[];return r.forEach(function(f){var p=a[f],m=p[s].apply(p,c);m!==p&&d.push(m)}),d.length?d[0]:this}}}}var MW=800,jW=4,AW=5,XE=YE("forceGraph",Kc),TW=YE(["forceGraph","shadowGraph"],Kc),IW=Object.assign.apply(Object,zt(["nodeColor","nodeAutoColorBy","nodeCanvasObject","nodeCanvasObjectMode","linkColor","linkAutoColorBy","linkLineDash","linkWidth","linkCanvasObject","linkCanvasObjectMode","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleOffset","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleCanvasObject","dagMode","dagLevelDistance","dagNodeFilter","onDagError","d3AlphaMin","d3AlphaDecay","d3VelocityDecay","warmupTicks","cooldownTicks","cooldownTime","onEngineTick","onEngineStop"].map(function(e){return ra({},e,XE.linkProp(e))})).concat(zt(["nodeRelSize","nodeId","nodeVal","nodeVisibility","linkSource","linkTarget","linkVisibility","linkCurvature"].map(function(e){return ra({},e,TW.linkProp(e))})))),$W=Object.assign.apply(Object,zt(["d3Force","d3ReheatSimulation","emitParticle"].map(function(e){return ra({},e,XE.linkMethod(e))})));function fd(e){if(e.canvas){var n=e.canvas.width,r=e.canvas.height;n===300&&r===150&&(n=r=0);var o=window.devicePixelRatio;n/=o,r/=o,[e.canvas,e.shadowCanvas].forEach(function(s){s.style.width="".concat(e.width,"px"),s.style.height="".concat(e.height,"px"),s.width=e.width*o,s.height=e.height*o,!n&&!r&&s.getContext("2d").scale(o,o)});var i=Kt(e.canvas).k;e.zoom.translateBy(e.zoom.__baseElem,(e.width-n)/2/i,(e.height-r)/2/i),e.needsRedraw=!0}}function KE(e){var n=window.devicePixelRatio;e.setTransform(n,0,0,n,0,0)}function K0(e,n,r){e.save(),KE(e),e.clearRect(0,0,n,r),e.restore()}var OW=ng({props:Ro({width:{default:window.innerWidth,onChange:function(n,r){return fd(r)},triggerUpdate:!1},height:{default:window.innerHeight,onChange:function(n,r){return fd(r)},triggerUpdate:!1},graphData:{default:{nodes:[],links:[]},onChange:function(n,r){[n.nodes,n.links].every(function(i){return(i||[]).every(function(s){return!s.hasOwnProperty("__indexColor")})})&&r.colorTracker.reset(),[{type:"Node",objs:n.nodes},{type:"Link",objs:n.links}].forEach(o),r.forceGraph.graphData(n),r.shadowGraph.graphData(n);function o(i){var s=i.type,a=i.objs;a.filter(function(l){if(!l.hasOwnProperty("__indexColor"))return!0;var c=r.colorTracker.lookup(l.__indexColor);return!c||!c.hasOwnProperty("d")||c.d!==l}).forEach(function(l){l.__indexColor=r.colorTracker.register({type:s,d:l})})}},triggerUpdate:!1},backgroundColor:{onChange:function(n,r){r.canvas&&n&&(r.canvas.style.background=n)},triggerUpdate:!1},nodeLabel:{default:"name",triggerUpdate:!1},nodePointerAreaPaint:{onChange:function(n,r){r.shadowGraph.nodeCanvasObject(n?function(o,i,s){return n(o,o.__indexColor,i,s)}:null),r.flushShadowCanvas&&r.flushShadowCanvas()},triggerUpdate:!1},linkPointerAreaPaint:{onChange:function(n,r){r.shadowGraph.linkCanvasObject(n?function(o,i,s){return n(o,o.__indexColor,i,s)}:null),r.flushShadowCanvas&&r.flushShadowCanvas()},triggerUpdate:!1},linkLabel:{default:"name",triggerUpdate:!1},linkHoverPrecision:{default:4,triggerUpdate:!1},minZoom:{default:.01,onChange:function(n,r){r.zoom.scaleExtent([n,r.zoom.scaleExtent()[1]])},triggerUpdate:!1},maxZoom:{default:1e3,onChange:function(n,r){r.zoom.scaleExtent([r.zoom.scaleExtent()[0],n])},triggerUpdate:!1},enableNodeDrag:{default:!0,triggerUpdate:!1},enableZoomInteraction:{default:!0,triggerUpdate:!1},enablePanInteraction:{default:!0,triggerUpdate:!1},enableZoomPanInteraction:{default:!0,triggerUpdate:!1},enablePointerInteraction:{default:!0,onChange:function(n,r){r.hoverObj=null},triggerUpdate:!1},autoPauseRedraw:{default:!0,triggerUpdate:!1},onNodeDrag:{default:function(){},triggerUpdate:!1},onNodeDragEnd:{default:function(){},triggerUpdate:!1},onNodeClick:{triggerUpdate:!1},onNodeRightClick:{triggerUpdate:!1},onNodeHover:{triggerUpdate:!1},onLinkClick:{triggerUpdate:!1},onLinkRightClick:{triggerUpdate:!1},onLinkHover:{triggerUpdate:!1},onBackgroundClick:{triggerUpdate:!1},onBackgroundRightClick:{triggerUpdate:!1},showPointerCursor:{default:!0,triggerUpdate:!1},onZoom:{triggerUpdate:!1},onZoomEnd:{triggerUpdate:!1},onRenderFramePre:{triggerUpdate:!1},onRenderFramePost:{triggerUpdate:!1}},IW),aliases:{stopAnimation:"pauseAnimation"},methods:Ro({graph2ScreenCoords:function(n,r,o){var i=Kt(n.canvas);return{x:r*i.k+i.x,y:o*i.k+i.y}},screen2GraphCoords:function(n,r,o){var i=Kt(n.canvas);return{x:(r-i.x)/i.k,y:(o-i.y)/i.k}},centerAt:function(n,r,o,i){if(!n.canvas)return null;if(r!==void 0||o!==void 0){var s=Object.assign({},r!==void 0?{x:r}:{},o!==void 0?{y:o}:{});return i?n.tweenGroup.add(new v0(a()).to(s,i).easing(to.Quadratic.Out).onUpdate(l).onComplete(function(){n.tweenGroup.remove(this)}).start()):l(s),this}return a();function a(){var c=Kt(n.canvas);return{x:(n.width/2-c.x)/c.k,y:(n.height/2-c.y)/c.k}}function l(c){var u=c.x,d=c.y;n.zoom.translateTo(n.zoom.__baseElem,u===void 0?a().x:u,d===void 0?a().y:d),n.needsRedraw=!0}},zoom:function(n,r,o){if(!n.canvas)return null;if(r!==void 0)return o?n.tweenGroup.add(new v0({k:i()}).to({k:r},o).easing(to.Quadratic.Out).onUpdate(function(a){var l=a.k;return s(l)}).onComplete(function(){n.tweenGroup.remove(this)}).start()):s(r),this;return i();function i(){return Kt(n.canvas).k}function s(a){n.zoom.scaleTo(n.zoom.__baseElem,a),n.needsRedraw=!0}},zoomToFit:function(n){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:10,i=arguments.length,s=new Array(i>3?i-3:0),a=3;a<i;a++)s[a-3]=arguments[a];var l=this.getGraphBbox.apply(this,s);if(l){var c={x:(l.x[0]+l.x[1])/2,y:(l.y[0]+l.y[1])/2},u=Math.max(1e-12,Math.min(1e12,(n.width-o*2)/(l.x[1]-l.x[0]),(n.height-o*2)/(l.y[1]-l.y[0])));this.centerAt(c.x,c.y,r),this.zoom(u,r)}return this},getGraphBbox:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){return!0},o=ve(n.nodeVal),i=function(l){return Math.sqrt(Math.max(0,o(l)||1))*n.nodeRelSize},s=n.graphData.nodes.filter(r).map(function(a){return{x:a.x,y:a.y,r:i(a)}});return s.length?{x:[h0(s,function(a){return a.x-a.r}),p0(s,function(a){return a.x+a.r})],y:[h0(s,function(a){return a.y-a.r}),p0(s,function(a){return a.y+a.r})]}:null},pauseAnimation:function(n){return n.animationFrameRequestId&&(cancelAnimationFrame(n.animationFrameRequestId),n.animationFrameRequestId=null),this},resumeAnimation:function(n){return n.animationFrameRequestId||this._animationCycle(),this},_destructor:function(){this.pauseAnimation(),this.graphData({nodes:[],links:[]})}},$W),stateInit:function(){return{lastSetZoom:1,zoom:tg(),forceGraph:new Kc,shadowGraph:new Kc().cooldownTicks(0).nodeColor("__indexColor").linkColor("__indexColor").isShadow(!0),colorTracker:new gB,tweenGroup:new vE}},init:function(n,r){var o=this;n.innerHTML="";var i=document.createElement("div");i.classList.add("force-graph-container"),i.style.position="relative",n.appendChild(i),r.canvas=document.createElement("canvas"),r.backgroundColor&&(r.canvas.style.background=r.backgroundColor),i.appendChild(r.canvas),r.shadowCanvas=document.createElement("canvas");var s=r.canvas.getContext("2d"),a=r.shadowCanvas.getContext("2d",{willReadFrequently:!0}),l={x:-1e12,y:-1e12},c=function(){var f=null,p=window.devicePixelRatio,m=l.x>0&&l.y>0?a.getImageData(l.x*p,l.y*p,1,1):null;return m&&(f=r.colorTracker.lookup(m.data)),f};tt(r.canvas).call(Xm().subject(function(){if(!r.enableNodeDrag)return null;var d=c();return d&&d.type==="Node"?d.d:null}).on("start",function(d){var f=d.subject;f.__initialDragPos={x:f.x,y:f.y,fx:f.fx,fy:f.fy},d.active||(f.fx=f.x,f.fy=f.y),r.canvas.classList.add("grabbable")}).on("drag",function(d){var f=d.subject,p=f.__initialDragPos,m=d,g=Kt(r.canvas).k,b={x:p.x+(m.x-p.x)/g-f.x,y:p.y+(m.y-p.y)/g-f.y};["x","y"].forEach(function(_){return f["f".concat(_)]=f[_]=p[_]+(m[_]-p[_])/g}),!(!f.__dragged&&AW>=Math.sqrt(q7(["x","y"].map(function(_){return Math.pow(d[_]-p[_],2)}))))&&(r.forceGraph.d3AlphaTarget(.3).resetCountdown(),r.isPointerDragging=!0,f.__dragged=!0,r.onNodeDrag(f,b))}).on("end",function(d){var f=d.subject,p=f.__initialDragPos,m={x:f.x-p.x,y:f.y-p.y};p.fx===void 0&&(f.fx=void 0),p.fy===void 0&&(f.fy=void 0),delete f.__initialDragPos,r.forceGraph.d3AlphaTarget()&&r.forceGraph.d3AlphaTarget(0).resetCountdown(),r.canvas.classList.remove("grabbable"),r.isPointerDragging=!1,f.__dragged&&(delete f.__dragged,r.onNodeDragEnd(f,m))})),r.zoom(r.zoom.__baseElem=tt(r.canvas)),r.zoom.__baseElem.on("dblclick.zoom",null),r.zoom.filter(function(d){return!d.button&&r.enableZoomPanInteraction&&(d.type!=="wheel"||ve(r.enableZoomInteraction)(d))&&(d.type==="wheel"||ve(r.enablePanInteraction)(d))}).on("zoom",function(d){var f=d.transform;[s,a].forEach(function(p){KE(p),p.translate(f.x,f.y),p.scale(f.k,f.k)}),r.isPointerDragging=!0,r.onZoom&&r.onZoom(Ro(Ro({},f),o.centerAt())),r.needsRedraw=!0}).on("end",function(d){r.isPointerDragging=!1,r.onZoomEnd&&r.onZoomEnd(Ro(Ro({},d.transform),o.centerAt()))}),fd(r),r.forceGraph.onNeedsRedraw(function(){return r.needsRedraw=!0}).onFinishUpdate(function(){Kt(r.canvas).k===r.lastSetZoom&&r.graphData.nodes.length&&(r.zoom.scaleTo(r.zoom.__baseElem,r.lastSetZoom=jW/Math.cbrt(r.graphData.nodes.length)),r.needsRedraw=!0)}),r.tooltip=new LB(i),["pointermove","pointerdown"].forEach(function(d){return i.addEventListener(d,function(f){d==="pointerdown"&&(r.isPointerPressed=!0,r.pointerDownEvent=f),!r.isPointerDragging&&f.type==="pointermove"&&r.onBackgroundClick&&(f.pressure>0||r.isPointerPressed)&&(f.pointerType==="mouse"||f.movementX===void 0||[f.movementX,f.movementY].some(function(g){return Math.abs(g)>1}))&&(r.isPointerDragging=!0);var p=m(i);l.x=f.pageX-p.left,l.y=f.pageY-p.top;function m(g){var b=g.getBoundingClientRect(),_=window.pageXOffset||document.documentElement.scrollLeft,y=window.pageYOffset||document.documentElement.scrollTop;return{top:b.top+y,left:b.left+_}}},{passive:!0})}),i.addEventListener("pointerup",function(d){if(r.isPointerPressed){if(r.isPointerPressed=!1,r.isPointerDragging){r.isPointerDragging=!1;return}var f=[d,r.pointerDownEvent];requestAnimationFrame(function(){if(d.button===0)if(r.hoverObj){var p=r["on".concat(r.hoverObj.type,"Click")];p&&p.apply(void 0,[r.hoverObj.d].concat(f))}else r.onBackgroundClick&&r.onBackgroundClick.apply(r,f);if(d.button===2)if(r.hoverObj){var m=r["on".concat(r.hoverObj.type,"RightClick")];m&&m.apply(void 0,[r.hoverObj.d].concat(f))}else r.onBackgroundRightClick&&r.onBackgroundRightClick.apply(r,f)})}},{passive:!0}),i.addEventListener("contextmenu",function(d){return!r.onBackgroundRightClick&&!r.onNodeRightClick&&!r.onLinkRightClick?!0:(d.preventDefault(),!1)}),r.forceGraph(s),r.shadowGraph(a);var u=SV(function(){K0(a,r.width,r.height),r.shadowGraph.linkWidth(function(f){return ve(r.linkWidth)(f)+r.linkHoverPrecision});var d=Kt(r.canvas);r.shadowGraph.globalScale(d.k).tickFrame()},MW);r.flushShadowCanvas=u.flush,(this._animationCycle=function d(){var f=!r.autoPauseRedraw||!!r.needsRedraw||r.forceGraph.isEngineRunning()||r.graphData.links.some(function(w){return w.__photons&&w.__photons.length});if(r.needsRedraw=!1,r.enablePointerInteraction){var p=r.isPointerDragging?null:c();if(p!==r.hoverObj){var m=r.hoverObj,g=m?m.type:null,b=p?p.type:null;if(g&&g!==b){var _=r["on".concat(g,"Hover")];_&&_(null,m.d)}if(b){var y=r["on".concat(b,"Hover")];y&&y(p.d,g===b?m.d:null)}r.tooltip.content(p&&ve(r["".concat(p.type.toLowerCase(),"Label")])(p.d)||null),r.canvas.classList[(p&&r["on".concat(b,"Click")]||!p&&r.onBackgroundClick)&&ve(r.showPointerCursor)(p==null?void 0:p.d)?"add":"remove"]("clickable"),r.hoverObj=p}f&&u()}if(f){K0(s,r.width,r.height);var x=Kt(r.canvas).k;r.onRenderFramePre&&r.onRenderFramePre(s,x),r.forceGraph.globalScale(x).tickFrame(),r.onRenderFramePost&&r.onRenderFramePost(s,x)}r.tweenGroup.update(),r.animationFrameRequestId=requestAnimationFrame(d)})()},update:function(n){}}),qE={exports:{}},DW="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",LW=DW,zW=LW;function ZE(){}function QE(){}QE.resetWarningCache=ZE;var FW=function(){function e(o,i,s,a,l,c){if(c!==zW){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function n(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:QE,resetWarningCache:ZE};return r.PropTypes=r,r};qE.exports=FW();var VW=qE.exports;const V=nu(VW),ef={width:V.number,height:V.number,graphData:V.shape({nodes:V.arrayOf(V.object).isRequired,links:V.arrayOf(V.object).isRequired}),backgroundColor:V.string,nodeRelSize:V.number,nodeId:V.string,nodeLabel:V.oneOfType([V.string,V.func]),nodeVal:V.oneOfType([V.number,V.string,V.func]),nodeVisibility:V.oneOfType([V.bool,V.string,V.func]),nodeColor:V.oneOfType([V.string,V.func]),nodeAutoColorBy:V.oneOfType([V.string,V.func]),onNodeHover:V.func,onNodeClick:V.func,linkSource:V.string,linkTarget:V.string,linkLabel:V.oneOfType([V.string,V.func]),linkVisibility:V.oneOfType([V.bool,V.string,V.func]),linkColor:V.oneOfType([V.string,V.func]),linkAutoColorBy:V.oneOfType([V.string,V.func]),linkWidth:V.oneOfType([V.number,V.string,V.func]),linkCurvature:V.oneOfType([V.number,V.string,V.func]),linkDirectionalArrowLength:V.oneOfType([V.number,V.string,V.func]),linkDirectionalArrowColor:V.oneOfType([V.string,V.func]),linkDirectionalArrowRelPos:V.oneOfType([V.number,V.string,V.func]),linkDirectionalParticles:V.oneOfType([V.number,V.string,V.func]),linkDirectionalParticleSpeed:V.oneOfType([V.number,V.string,V.func]),linkDirectionalParticleOffset:V.oneOfType([V.number,V.string,V.func]),linkDirectionalParticleWidth:V.oneOfType([V.number,V.string,V.func]),linkDirectionalParticleColor:V.oneOfType([V.string,V.func]),onLinkHover:V.func,onLinkClick:V.func,dagMode:V.oneOf(["td","bu","lr","rl","zin","zout","radialin","radialout"]),dagLevelDistance:V.number,dagNodeFilter:V.func,onDagError:V.func,d3AlphaMin:V.number,d3AlphaDecay:V.number,d3VelocityDecay:V.number,warmupTicks:V.number,cooldownTicks:V.number,cooldownTime:V.number,onEngineTick:V.func,onEngineStop:V.func,getGraphBbox:V.func},JE={zoomToFit:V.func,onNodeRightClick:V.func,onNodeDrag:V.func,onNodeDragEnd:V.func,onLinkRightClick:V.func,linkHoverPrecision:V.number,onBackgroundClick:V.func,onBackgroundRightClick:V.func,showPointerCursor:V.oneOfType([V.bool,V.func]),enablePointerInteraction:V.bool,enableNodeDrag:V.bool},ug={showNavInfo:V.bool,nodeOpacity:V.number,nodeResolution:V.number,nodeThreeObject:V.oneOfType([V.object,V.string,V.func]),nodeThreeObjectExtend:V.oneOfType([V.bool,V.string,V.func]),nodePositionUpdate:V.func,linkOpacity:V.number,linkResolution:V.number,linkCurveRotation:V.oneOfType([V.number,V.string,V.func]),linkMaterial:V.oneOfType([V.object,V.string,V.func]),linkThreeObject:V.oneOfType([V.object,V.string,V.func]),linkThreeObjectExtend:V.oneOfType([V.bool,V.string,V.func]),linkPositionUpdate:V.func,linkDirectionalArrowResolution:V.number,linkDirectionalParticleResolution:V.number,linkDirectionalParticleThreeObject:V.oneOfType([V.object,V.string,V.func]),forceEngine:V.oneOf(["d3","ngraph"]),ngraphPhysics:V.object,numDimensions:V.oneOf([1,2,3])},BW=Object.assign({},ef,JE,{linkLineDash:V.oneOfType([V.arrayOf(V.number),V.string,V.func]),nodeCanvasObjectMode:V.oneOfType([V.string,V.func]),nodeCanvasObject:V.func,nodePointerAreaPaint:V.func,linkCanvasObjectMode:V.oneOfType([V.string,V.func]),linkCanvasObject:V.func,linkPointerAreaPaint:V.func,linkDirectionalParticleCanvasObject:V.func,autoPauseRedraw:V.bool,minZoom:V.number,maxZoom:V.number,enableZoomInteraction:V.oneOfType([V.bool,V.func]),enablePanInteraction:V.oneOfType([V.bool,V.func]),onZoom:V.func,onZoomEnd:V.func,onRenderFramePre:V.func,onRenderFramePost:V.func});Object.assign({},ef,JE,ug,{enableNavigationControls:V.bool,controlType:V.oneOf(["trackball","orbit","fly"]),rendererConfig:V.object,extraRenderers:V.arrayOf(V.shape({render:V.func.isRequired}))});Object.assign({},ef,ug,{nodeDesc:V.oneOfType([V.string,V.func]),linkDesc:V.oneOfType([V.string,V.func])});Object.assign({},ef,ug,{markerAttrs:V.object,yOffset:V.number,glScale:V.number});const fg=p8(OW,{methodNames:["emitParticle","d3Force","d3ReheatSimulation","stopAnimation","pauseAnimation","resumeAnimation","centerAt","zoom","zoomToFit","getGraphBbox","screen2GraphCoords","graph2ScreenCoords"]});fg.displayName="ForceGraph2D";fg.propTypes=BW;const os={ui:"#60a5fa",api:"#34d399",db:"#f59e0b"},HW="rgba(244, 114, 182, 0.6)",WW="rgba(148, 163, 184, 0.25)";function UW(){const[e,n]=h.useState(null),[r,o]=h.useState(null),[i,s]=h.useState(!0),[a,l]=h.useState(!1),[c,u]=h.useState(new Set(["ui","api","db"])),[d,f]=h.useState(null),p=h.useRef(null),[m,g]=h.useState({width:0,height:0}),b=(x=!1)=>{x?l(!0):s(!0),o(null),fetch(`/api/project-graph${x?"?regenerate=1":""}`).then(w=>w.json()).then(w=>{"error"in w?o(w.error):n(w)}).catch(w=>o(String(w))).finally(()=>{s(!1),l(!1)})};h.useEffect(()=>{b(!1)},[]),h.useEffect(()=>{if(!p.current)return;const x=p.current,w=()=>g({width:x.clientWidth,height:x.clientHeight});w();const S=new ResizeObserver(w);return S.observe(x),()=>S.disconnect()},[e]);const _=h.useMemo(()=>{if(!e)return{nodes:[],links:[]};const x=e.nodes.filter(C=>c.has(C.layer)),w=new Set(x.map(C=>C.id)),S=e.links.filter(C=>{const E=typeof C.source=="string"?C.source:C.source.id,k=typeof C.target=="string"?C.target:C.target.id;return w.has(E)&&w.has(k)});return{nodes:x,links:S}},[e,c]),y=x=>{const w=new Set(c);w.has(x)?w.delete(x):w.add(x),w.size!==0&&u(w)};return v.jsxs("div",{className:"flex h-full flex-col",children:[v.jsxs("div",{className:"flex flex-wrap items-center gap-3 border-b border-sidebar-border px-6 py-3",children:[v.jsx("h1",{className:"text-lg font-semibold",children:"Project Graph"}),e&&v.jsxs("span",{className:"text-xs text-muted-foreground",children:[_.nodes.length," nodes · ",_.links.length," links"]}),v.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[["ui","api","db"].map(x=>v.jsxs("button",{type:"button",onClick:()=>y(x),className:"flex items-center gap-1.5 rounded-md border border-sidebar-border px-2.5 py-1 text-xs transition-opacity",style:{opacity:c.has(x)?1:.4,borderColor:c.has(x)?os[x]:void 0},children:[v.jsx("span",{className:"h-2 w-2 rounded-full",style:{backgroundColor:os[x]}}),x.toUpperCase(),e&&` (${e.stats.byLayer[x]})`]},x)),v.jsx("button",{type:"button",onClick:()=>b(!0),disabled:a||i,className:"rounded-md border border-sidebar-border px-2.5 py-1 text-xs hover:bg-sidebar-accent disabled:opacity-50",children:a?"Regenerating…":"Regenerate"})]})]}),v.jsxs("div",{ref:p,className:"relative flex-1 overflow-hidden",children:[i&&v.jsx("div",{className:"absolute inset-0 flex items-center justify-center text-muted-foreground",children:"Loading graph…"}),r&&v.jsx("div",{className:"absolute inset-0 flex items-center justify-center text-destructive",children:r}),e&&m.width>0&&v.jsx(fg,{width:m.width,height:m.height,graphData:_,nodeId:"id",nodeLabel:x=>`${x.layer}/${x.type}: ${x.name}`,nodeRelSize:3,nodeColor:x=>os[x.layer],linkColor:x=>x.cross?HW:WW,linkWidth:x=>x.cross?1:.5,linkDirectionalParticles:0,cooldownTicks:120,onNodeHover:x=>f(x),backgroundColor:"transparent",nodeCanvasObjectMode:()=>"after",nodeCanvasObject:(x,w,S)=>{if(S<1.4||x.x===void 0||x.y===void 0)return;const C=x.name,E=11/S;w.font=`${E}px -apple-system, system-ui, sans-serif`;const k=w.measureText(C).width,N=3/S,j=1.5/S;w.fillStyle="rgba(15, 15, 20, 0.75)",w.fillRect(x.x-k/2-N,x.y+5/S-j,k+N*2,E+j*2),w.textAlign="center",w.textBaseline="top",w.fillStyle=os[x.layer],w.fillText(C,x.x,x.y+5/S)}}),d&&v.jsxs("div",{className:"pointer-events-none absolute bottom-4 left-4 max-w-md rounded-lg border border-sidebar-border bg-background/90 px-3 py-2 text-xs shadow-lg backdrop-blur",children:[v.jsxs("div",{className:"font-semibold",style:{color:os[d.layer]},children:[d.layer.toUpperCase()," · ",d.type]}),v.jsx("div",{className:"font-mono",children:d.name}),v.jsx("div",{className:"text-muted-foreground",children:d.path}),d.module&&v.jsxs("div",{className:"text-muted-foreground",children:["module: ",d.module]})]})]})]})}function Rs(e){var n;return((n=e.tags)==null?void 0:n.module)??e.module??null}function ek(e){var n;return(n=e.tags)!=null&&n.screen?e.tags.screen==="true":e.type==="page"||e.type==="layout"}function qc(e){return e.split(/[-_]/).map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" ")}function oa(e){if(e.route){const n=e.route.split("/").filter(Boolean).filter(r=>!r.startsWith("(")&&!r.startsWith(":")&&!r.startsWith("["));return n.length>0?n[n.length-1].split(/[-_]/).map(o=>o.charAt(0).toUpperCase()+o.slice(1)).join(" "):"Home"}return e.name}const GW=new Set(["lib","db","config","external","middleware","server-lib","services","mcp","layout","shared-ui"]);function YW(){const[e,n]=h.useState(null),[r,o]=h.useState("loading"),[i,s]=h.useState(null),[a,l]=h.useState(!1),c=h.useCallback(async()=>{try{const p=await fetch("/api/raw-graphs");if(!p.ok)throw new Error(`HTTP ${p.status}`);const m=await p.json();n(m);const g=!!(m.ui||m.api||m.db);o(g?"ready":"empty")}catch(p){s(String(p)),o("error")}},[]);h.useEffect(()=>{c()},[c]);const u=h.useCallback(async()=>{l(!0),s(null);try{const p=await fetch("/api/generate-graph",{method:"POST"});if(!p.ok)throw new Error(`HTTP ${p.status}`);const m=await p.json();if(!m.ok)throw new Error(m.error??"Generation failed");n({ui:m.ui,api:m.api,db:m.db});const g=!!(m.ui||m.api||m.db);o(g?"ready":"empty")}catch(p){s(String(p))}finally{l(!1)}},[]),{moduleBuckets:d,counts:f}=h.useMemo(()=>{if(!(e!=null&&e.ui)||!(e!=null&&e.api)||!(e!=null&&e.db))return{moduleBuckets:[],counts:null};const p=e.ui.nodes.filter(y=>ek(y)&&Rs(y)&&!GW.has(Rs(y))),m=new Map;for(const y of p){const x=Rs(y);m.has(x)||m.set(x,[]),m.get(x).push(y)}const g=[],b=new Map;for(const[y,x]of m)x.length===1?g.push(...x):b.set(y,x);const _=[...b.entries()].map(([y,x])=>({module:y,screens:x})).sort((y,x)=>x.screens.length-y.screens.length);return g.length>0&&_.push({module:"misc",screens:g}),{moduleBuckets:_,counts:{screens:p.length,modules:_.length,endpoints:e.api.nodes.length,tables:e.db.nodes.length,components:e.ui.nodes.filter(y=>y.type==="component").length}}},[e]);return r==="loading"?v.jsx("div",{className:"flex h-full items-center justify-center",children:v.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading overview…"})}):r==="empty"?v.jsx(XW,{onGenerate:u,busy:a,error:i}):r==="error"?v.jsx("div",{className:"flex h-full items-center justify-center p-8",children:v.jsxs("div",{className:"max-w-md text-center",children:[v.jsx("p",{className:"text-sm text-foreground",children:"Failed to load graph"}),v.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:i}),v.jsx("button",{type:"button",onClick:c,className:"mt-4 rounded-md border border-sidebar-border px-3 py-1.5 text-xs text-foreground hover:bg-sidebar-accent",children:"Retry"})]})}):f?v.jsx("div",{className:"h-full overflow-y-auto",children:v.jsxs("div",{className:"mx-auto max-w-6xl px-8 py-8",children:[v.jsxs("header",{className:"mb-8 flex items-start justify-between gap-4",children:[v.jsxs("div",{children:[v.jsx("h1",{className:"text-2xl font-semibold text-foreground",children:"Project Overview"}),v.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"A high-level map of the modules, screens, and systems in this project."})]}),v.jsxs("button",{type:"button",onClick:u,disabled:a,className:"flex shrink-0 items-center gap-1.5 rounded-md border border-sidebar-border px-3 py-1.5 text-xs text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground disabled:cursor-not-allowed disabled:opacity-60",children:[v.jsx(Gb,{className:`h-3 w-3 ${a?"animate-spin":""}`}),a?"Regenerating…":"Regenerate graph"]})]}),i&&v.jsx("div",{className:"mb-4 rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-xs text-destructive",children:i}),v.jsxs("div",{className:"mb-8 grid grid-cols-2 gap-3 md:grid-cols-4",children:[v.jsx(yl,{icon:v.jsx(am,{className:"h-4 w-4"}),label:"Modules",value:f.modules}),v.jsx(yl,{icon:v.jsx(ma,{className:"h-4 w-4"}),label:"Screens",value:f.screens}),v.jsx(yl,{icon:v.jsx(um,{className:"h-4 w-4"}),label:"API endpoints",value:f.endpoints}),v.jsx(yl,{icon:v.jsx(cm,{className:"h-4 w-4"}),label:"Database tables",value:f.tables})]}),v.jsxs("section",{children:[v.jsx("h2",{className:"mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Capability map"}),v.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3",children:d.map(p=>v.jsx(KW,{module:p.module,screens:p.screens},p.module))})]})]})}):null}function XW({onGenerate:e,busy:n,error:r}){return v.jsx("div",{className:"flex h-full items-center justify-center p-8",children:v.jsxs("div",{className:"max-w-md text-center",children:[v.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-sidebar-primary/15 text-sidebar-primary",children:v.jsx(u3,{className:"h-6 w-6"})}),v.jsx("h2",{className:"mt-4 text-lg font-semibold text-foreground",children:"No graph yet"}),v.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"LaunchChart hasn't generated a project graph for this workspace. Generate one to see modules, screens, API endpoints, and database tables."}),v.jsxs("button",{type:"button",onClick:e,disabled:n,className:"mt-6 inline-flex items-center gap-2 rounded-md bg-sidebar-primary px-4 py-2 text-sm font-medium text-white shadow-sm transition-colors hover:bg-sidebar-primary/90 disabled:cursor-not-allowed disabled:opacity-60",children:[v.jsx(Gb,{className:`h-4 w-4 ${n?"animate-spin":""}`}),n?"Generating…":"Generate graph"]}),v.jsx("p",{className:"mt-3 text-[11px] text-muted-foreground",children:"This scans your source tree — takes a few seconds."}),r&&v.jsx("div",{className:"mt-4 rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-xs text-destructive",children:r})]})})}function yl({icon:e,label:n,value:r}){return v.jsxs("div",{className:"rounded-lg border border-sidebar-border bg-background/40 px-4 py-3",children:[v.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[e,v.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider",children:n})]}),v.jsx("p",{className:"mt-1 text-2xl font-semibold tabular-nums text-foreground",children:r})]})}function KW({module:e,screens:n}){const r=n.slice(0,6),o=n.length-r.length;return v.jsxs("div",{className:"rounded-lg border border-sidebar-border bg-background/40 p-5 transition-colors hover:border-sidebar-primary/50",children:[v.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[v.jsx("h3",{className:"text-base font-semibold text-foreground",children:qc(e)}),v.jsxs("span",{className:"rounded bg-sidebar-accent px-2 py-0.5 text-[10px] font-medium tabular-nums text-muted-foreground",children:[n.length," screens"]})]}),v.jsxs("ul",{className:"space-y-1",children:[r.map(i=>v.jsxs("li",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[v.jsx("span",{className:"h-1 w-1 shrink-0 rounded-full bg-sidebar-primary/60"}),v.jsx("span",{className:"truncate text-foreground/90",children:oa(i)})]},i.id)),o>0&&v.jsxs("li",{className:"pl-3 pt-1 text-[11px] italic text-muted-foreground",children:["+",o," more"]})]})]})}function ze(e){if(typeof e=="string"||typeof e=="number")return""+e;let n="";if(Array.isArray(e))for(let r=0,o;r<e.length;r++)(o=ze(e[r]))!==""&&(n+=(n&&" ")+o);else for(let r in e)e[r]&&(n+=(n&&" ")+r);return n}const Cn={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:n,sourceHandle:r,targetHandle:o})=>`Couldn't create edge for ${e} handle id: "${e==="source"?r:o}", edge id: ${n}.`,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."},ia=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],tk=["Enter"," ","Escape"],nk={"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:n,y:r})=>`Moved selected node ${e}. New position, x: ${n}, y: ${r}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var wi;(function(e){e.Strict="strict",e.Loose="loose"})(wi||(wi={}));var no;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(no||(no={}));var sa;(function(e){e.Partial="partial",e.Full="full"})(sa||(sa={}));const rk={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var fr;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(fr||(fr={}));var Zc;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Zc||(Zc={}));var le;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(le||(le={}));const q0={[le.Left]:le.Right,[le.Right]:le.Left,[le.Top]:le.Bottom,[le.Bottom]:le.Top};function ok(e){return e===null?null:e?"valid":"invalid"}const ik=e=>"id"in e&&"source"in e&&"target"in e,qW=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),dg=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Ta=(e,n=[0,0])=>{const{width:r,height:o}=Zn(e),i=e.origin??n,s=r*i[0],a=o*i[1];return{x:e.position.x-s,y:e.position.y-a}},ZW=(e,n={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const r=e.reduce((o,i)=>{const s=typeof i=="string";let a=!n.nodeLookup&&!s?i:void 0;n.nodeLookup&&(a=s?n.nodeLookup.get(i):dg(i)?i:n.nodeLookup.get(i.id));const l=a?Qc(a,n.nodeOrigin):{x:0,y:0,x2:0,y2:0};return tf(o,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return nf(r)},Ia=(e,n={})=>{let r={x:1/0,y:1/0,x2:-1/0,y2:-1/0},o=!1;return e.forEach(i=>{(n.filter===void 0||n.filter(i))&&(r=tf(r,Qc(i)),o=!0)}),o?nf(r):{x:0,y:0,width:0,height:0}},pg=(e,n,[r,o,i]=[0,0,1],s=!1,a=!1)=>{const l={...Oa(n,[r,o,i]),width:n.width/i,height:n.height/i},c=[];for(const u of e.values()){const{measured:d,selectable:f=!0,hidden:p=!1}=u;if(a&&!f||p)continue;const m=d.width??u.width??u.initialWidth??null,g=d.height??u.height??u.initialHeight??null,b=aa(l,_i(u)),_=(m??0)*(g??0),y=s&&b>0;(!u.internals.handleBounds||y||b>=_||u.dragging)&&c.push(u)}return c},QW=(e,n)=>{const r=new Set;return e.forEach(o=>{r.add(o.id)}),n.filter(o=>r.has(o.source)||r.has(o.target))};function JW(e,n){const r=new Map,o=n!=null&&n.nodes?new Set(n.nodes.map(i=>i.id)):null;return e.forEach(i=>{i.measured.width&&i.measured.height&&((n==null?void 0:n.includeHiddenNodes)||!i.hidden)&&(!o||o.has(i.id))&&r.set(i.id,i)}),r}async function eU({nodes:e,width:n,height:r,panZoom:o,minZoom:i,maxZoom:s},a){if(e.size===0)return Promise.resolve(!0);const l=JW(e,a),c=Ia(l),u=hg(c,n,r,(a==null?void 0:a.minZoom)??i,(a==null?void 0:a.maxZoom)??s,(a==null?void 0:a.padding)??.1);return await o.setViewport(u,{duration:a==null?void 0:a.duration,ease:a==null?void 0:a.ease,interpolate:a==null?void 0:a.interpolate}),Promise.resolve(!0)}function sk({nodeId:e,nextPosition:n,nodeLookup:r,nodeOrigin:o=[0,0],nodeExtent:i,onError:s}){const a=r.get(e),l=a.parentId?r.get(a.parentId):void 0,{x:c,y:u}=l?l.internals.positionAbsolute:{x:0,y:0},d=a.origin??o;let f=a.extent||i;if(a.extent==="parent"&&!a.expandParent)if(!l)s==null||s("005",Cn.error005());else{const m=l.measured.width,g=l.measured.height;m&&g&&(f=[[c,u],[c+m,u+g]])}else l&&Si(a.extent)&&(f=[[a.extent[0][0]+c,a.extent[0][1]+u],[a.extent[1][0]+c,a.extent[1][1]+u]]);const p=Si(f)?mo(n,f,a.measured):n;return(a.measured.width===void 0||a.measured.height===void 0)&&(s==null||s("015",Cn.error015())),{position:{x:p.x-c+(a.measured.width??0)*d[0],y:p.y-u+(a.measured.height??0)*d[1]},positionAbsolute:p}}async function tU({nodesToRemove:e=[],edgesToRemove:n=[],nodes:r,edges:o,onBeforeDelete:i}){const s=new Set(e.map(p=>p.id)),a=[];for(const p of r){if(p.deletable===!1)continue;const m=s.has(p.id),g=!m&&p.parentId&&a.find(b=>b.id===p.parentId);(m||g)&&a.push(p)}const l=new Set(n.map(p=>p.id)),c=o.filter(p=>p.deletable!==!1),d=QW(a,c);for(const p of c)l.has(p.id)&&!d.find(g=>g.id===p.id)&&d.push(p);if(!i)return{edges:d,nodes:a};const f=await i({nodes:a,edges:d});return typeof f=="boolean"?f?{edges:d,nodes:a}:{edges:[],nodes:[]}:f}const bi=(e,n=0,r=1)=>Math.min(Math.max(e,n),r),mo=(e={x:0,y:0},n,r)=>({x:bi(e.x,n[0][0],n[1][0]-((r==null?void 0:r.width)??0)),y:bi(e.y,n[0][1],n[1][1]-((r==null?void 0:r.height)??0))});function ak(e,n,r){const{width:o,height:i}=Zn(r),{x:s,y:a}=r.internals.positionAbsolute;return mo(e,[[s,a],[s+o,a+i]],n)}const Z0=(e,n,r)=>e<n?bi(Math.abs(e-n),1,n)/n:e>r?-bi(Math.abs(e-r),1,n)/n:0,lk=(e,n,r=15,o=40)=>{const i=Z0(e.x,o,n.width-o)*r,s=Z0(e.y,o,n.height-o)*r;return[i,s]},tf=(e,n)=>({x:Math.min(e.x,n.x),y:Math.min(e.y,n.y),x2:Math.max(e.x2,n.x2),y2:Math.max(e.y2,n.y2)}),Qp=({x:e,y:n,width:r,height:o})=>({x:e,y:n,x2:e+r,y2:n+o}),nf=({x:e,y:n,x2:r,y2:o})=>({x:e,y:n,width:r-e,height:o-n}),_i=(e,n=[0,0])=>{var i,s;const{x:r,y:o}=dg(e)?e.internals.positionAbsolute:Ta(e,n);return{x:r,y:o,width:((i=e.measured)==null?void 0:i.width)??e.width??e.initialWidth??0,height:((s=e.measured)==null?void 0:s.height)??e.height??e.initialHeight??0}},Qc=(e,n=[0,0])=>{var i,s;const{x:r,y:o}=dg(e)?e.internals.positionAbsolute:Ta(e,n);return{x:r,y:o,x2:r+(((i=e.measured)==null?void 0:i.width)??e.width??e.initialWidth??0),y2:o+(((s=e.measured)==null?void 0:s.height)??e.height??e.initialHeight??0)}},ck=(e,n)=>nf(tf(Qp(e),Qp(n))),aa=(e,n)=>{const r=Math.max(0,Math.min(e.x+e.width,n.x+n.width)-Math.max(e.x,n.x)),o=Math.max(0,Math.min(e.y+e.height,n.y+n.height)-Math.max(e.y,n.y));return Math.ceil(r*o)},Q0=e=>en(e.width)&&en(e.height)&&en(e.x)&&en(e.y),en=e=>!isNaN(e)&&isFinite(e),nU=(e,n)=>{},$a=(e,n=[1,1])=>({x:n[0]*Math.round(e.x/n[0]),y:n[1]*Math.round(e.y/n[1])}),Oa=({x:e,y:n},[r,o,i],s=!1,a=[1,1])=>{const l={x:(e-r)/i,y:(n-o)/i};return s?$a(l,a):l},Jc=({x:e,y:n},[r,o,i])=>({x:e*i+r,y:n*i+o});function Mo(e,n){if(typeof e=="number")return Math.floor((n-n/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const r=parseFloat(e);if(!Number.isNaN(r))return Math.floor(r)}if(typeof e=="string"&&e.endsWith("%")){const r=parseFloat(e);if(!Number.isNaN(r))return Math.floor(n*r*.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 rU(e,n,r){if(typeof e=="string"||typeof e=="number"){const o=Mo(e,r),i=Mo(e,n);return{top:o,right:i,bottom:o,left:i,x:i*2,y:o*2}}if(typeof e=="object"){const o=Mo(e.top??e.y??0,r),i=Mo(e.bottom??e.y??0,r),s=Mo(e.left??e.x??0,n),a=Mo(e.right??e.x??0,n);return{top:o,right:a,bottom:i,left:s,x:s+a,y:o+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function oU(e,n,r,o,i,s){const{x:a,y:l}=Jc(e,[n,r,o]),{x:c,y:u}=Jc({x:e.x+e.width,y:e.y+e.height},[n,r,o]),d=i-c,f=s-u;return{left:Math.floor(a),top:Math.floor(l),right:Math.floor(d),bottom:Math.floor(f)}}const hg=(e,n,r,o,i,s)=>{const a=rU(s,n,r),l=(n-a.x)/e.width,c=(r-a.y)/e.height,u=Math.min(l,c),d=bi(u,o,i),f=e.x+e.width/2,p=e.y+e.height/2,m=n/2-f*d,g=r/2-p*d,b=oU(e,m,g,d,n,r),_={left:Math.min(b.left-a.left,0),top:Math.min(b.top-a.top,0),right:Math.min(b.right-a.right,0),bottom:Math.min(b.bottom-a.bottom,0)};return{x:m-_.left+_.right,y:g-_.top+_.bottom,zoom:d}},la=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Si(e){return e!=null&&e!=="parent"}function Zn(e){var n,r;return{width:((n=e.measured)==null?void 0:n.width)??e.width??e.initialWidth??0,height:((r=e.measured)==null?void 0:r.height)??e.height??e.initialHeight??0}}function uk(e){var n,r;return(((n=e.measured)==null?void 0:n.width)??e.width??e.initialWidth)!==void 0&&(((r=e.measured)==null?void 0:r.height)??e.height??e.initialHeight)!==void 0}function fk(e,n={width:0,height:0},r,o,i){const s={...e},a=o.get(r);if(a){const l=a.origin||i;s.x+=a.internals.positionAbsolute.x-(n.width??0)*l[0],s.y+=a.internals.positionAbsolute.y-(n.height??0)*l[1]}return s}function J0(e,n){if(e.size!==n.size)return!1;for(const r of e)if(!n.has(r))return!1;return!0}function iU(){let e,n;return{promise:new Promise((o,i)=>{e=o,n=i}),resolve:e,reject:n}}function sU(e){return{...nk,...e||{}}}function Ms(e,{snapGrid:n=[0,0],snapToGrid:r=!1,transform:o,containerBounds:i}){const{x:s,y:a}=tn(e),l=Oa({x:s-((i==null?void 0:i.left)??0),y:a-((i==null?void 0:i.top)??0)},o),{x:c,y:u}=r?$a(l,n):l;return{xSnapped:c,ySnapped:u,...l}}const mg=e=>({width:e.offsetWidth,height:e.offsetHeight}),dk=e=>{var n;return((n=e==null?void 0:e.getRootNode)==null?void 0:n.call(e))||(window==null?void 0:window.document)},aU=["INPUT","SELECT","TEXTAREA"];function pk(e){var o,i;const n=((i=(o=e.composedPath)==null?void 0:o.call(e))==null?void 0:i[0])||e.target;return(n==null?void 0:n.nodeType)!==1?!1:aU.includes(n.nodeName)||n.hasAttribute("contenteditable")||!!n.closest(".nokey")}const hk=e=>"clientX"in e,tn=(e,n)=>{var s,a;const r=hk(e),o=r?e.clientX:(s=e.touches)==null?void 0:s[0].clientX,i=r?e.clientY:(a=e.touches)==null?void 0:a[0].clientY;return{x:o-((n==null?void 0:n.left)??0),y:i-((n==null?void 0:n.top)??0)}},ex=(e,n,r,o,i)=>{const s=n.querySelectorAll(`.${e}`);return!s||!s.length?null:Array.from(s).map(a=>{const l=a.getBoundingClientRect();return{id:a.getAttribute("data-handleid"),type:e,nodeId:i,position:a.getAttribute("data-handlepos"),x:(l.left-r.left)/o,y:(l.top-r.top)/o,...mg(a)}})};function mk({sourceX:e,sourceY:n,targetX:r,targetY:o,sourceControlX:i,sourceControlY:s,targetControlX:a,targetControlY:l}){const c=e*.125+i*.375+a*.375+r*.125,u=n*.125+s*.375+l*.375+o*.125,d=Math.abs(c-e),f=Math.abs(u-n);return[c,u,d,f]}function vl(e,n){return e>=0?.5*e:n*25*Math.sqrt(-e)}function tx({pos:e,x1:n,y1:r,x2:o,y2:i,c:s}){switch(e){case le.Left:return[n-vl(n-o,s),r];case le.Right:return[n+vl(o-n,s),r];case le.Top:return[n,r-vl(r-i,s)];case le.Bottom:return[n,r+vl(i-r,s)]}}function gk({sourceX:e,sourceY:n,sourcePosition:r=le.Bottom,targetX:o,targetY:i,targetPosition:s=le.Top,curvature:a=.25}){const[l,c]=tx({pos:r,x1:e,y1:n,x2:o,y2:i,c:a}),[u,d]=tx({pos:s,x1:o,y1:i,x2:e,y2:n,c:a}),[f,p,m,g]=mk({sourceX:e,sourceY:n,targetX:o,targetY:i,sourceControlX:l,sourceControlY:c,targetControlX:u,targetControlY:d});return[`M${e},${n} C${l},${c} ${u},${d} ${o},${i}`,f,p,m,g]}function yk({sourceX:e,sourceY:n,targetX:r,targetY:o}){const i=Math.abs(r-e)/2,s=r<e?r+i:r-i,a=Math.abs(o-n)/2,l=o<n?o+a:o-a;return[s,l,i,a]}function lU({sourceNode:e,targetNode:n,selected:r=!1,zIndex:o=0,elevateOnSelect:i=!1,zIndexMode:s="basic"}){if(s==="manual")return o;const a=i&&r?o+1e3:o,l=Math.max(e.parentId||i&&e.selected?e.internals.z:0,n.parentId||i&&n.selected?n.internals.z:0);return a+l}function cU({sourceNode:e,targetNode:n,width:r,height:o,transform:i}){const s=tf(Qc(e),Qc(n));s.x===s.x2&&(s.x2+=1),s.y===s.y2&&(s.y2+=1);const a={x:-i[0]/i[2],y:-i[1]/i[2],width:r/i[2],height:o/i[2]};return aa(a,nf(s))>0}const uU=({source:e,sourceHandle:n,target:r,targetHandle:o})=>`xy-edge__${e}${n||""}-${r}${o||""}`,fU=(e,n)=>n.some(r=>r.source===e.source&&r.target===e.target&&(r.sourceHandle===e.sourceHandle||!r.sourceHandle&&!e.sourceHandle)&&(r.targetHandle===e.targetHandle||!r.targetHandle&&!e.targetHandle)),dU=(e,n,r={})=>{if(!e.source||!e.target)return n;const o=r.getEdgeId||uU;let i;return ik(e)?i={...e}:i={...e,id:o(e)},fU(i,n)?n:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,n.concat(i))};function vk({sourceX:e,sourceY:n,targetX:r,targetY:o}){const[i,s,a,l]=yk({sourceX:e,sourceY:n,targetX:r,targetY:o});return[`M ${e},${n}L ${r},${o}`,i,s,a,l]}const nx={[le.Left]:{x:-1,y:0},[le.Right]:{x:1,y:0},[le.Top]:{x:0,y:-1},[le.Bottom]:{x:0,y:1}},pU=({source:e,sourcePosition:n=le.Bottom,target:r})=>n===le.Left||n===le.Right?e.x<r.x?{x:1,y:0}:{x:-1,y:0}:e.y<r.y?{x:0,y:1}:{x:0,y:-1},rx=(e,n)=>Math.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2));function hU({source:e,sourcePosition:n=le.Bottom,target:r,targetPosition:o=le.Top,center:i,offset:s,stepPosition:a}){const l=nx[n],c=nx[o],u={x:e.x+l.x*s,y:e.y+l.y*s},d={x:r.x+c.x*s,y:r.y+c.y*s},f=pU({source:u,sourcePosition:n,target:d}),p=f.x!==0?"x":"y",m=f[p];let g=[],b,_;const y={x:0,y:0},x={x:0,y:0},[,,w,S]=yk({sourceX:e.x,sourceY:e.y,targetX:r.x,targetY:r.y});if(l[p]*c[p]===-1){p==="x"?(b=i.x??u.x+(d.x-u.x)*a,_=i.y??(u.y+d.y)/2):(b=i.x??(u.x+d.x)/2,_=i.y??u.y+(d.y-u.y)*a);const N=[{x:b,y:u.y},{x:b,y:d.y}],j=[{x:u.x,y:_},{x:d.x,y:_}];l[p]===m?g=p==="x"?N:j:g=p==="x"?j:N}else{const N=[{x:u.x,y:d.y}],j=[{x:d.x,y:u.y}];if(p==="x"?g=l.x===m?j:N:g=l.y===m?N:j,n===o){const R=Math.abs(e[p]-r[p]);if(R<=s){const L=Math.min(s-1,s-R);l[p]===m?y[p]=(u[p]>e[p]?-1:1)*L:x[p]=(d[p]>r[p]?-1:1)*L}}if(n!==o){const R=p==="x"?"y":"x",L=l[p]===c[R],D=u[R]>d[R],z=u[R]<d[R];(l[p]===1&&(!L&&D||L&&z)||l[p]!==1&&(!L&&z||L&&D))&&(g=p==="x"?N:j)}const $={x:u.x+y.x,y:u.y+y.y},I={x:d.x+x.x,y:d.y+x.y},O=Math.max(Math.abs($.x-g[0].x),Math.abs(I.x-g[0].x)),H=Math.max(Math.abs($.y-g[0].y),Math.abs(I.y-g[0].y));O>=H?(b=($.x+I.x)/2,_=g[0].y):(b=g[0].x,_=($.y+I.y)/2)}const C={x:u.x+y.x,y:u.y+y.y},E={x:d.x+x.x,y:d.y+x.y};return[[e,...C.x!==g[0].x||C.y!==g[0].y?[C]:[],...g,...E.x!==g[g.length-1].x||E.y!==g[g.length-1].y?[E]:[],r],b,_,w,S]}function mU(e,n,r,o){const i=Math.min(rx(e,n)/2,rx(n,r)/2,o),{x:s,y:a}=n;if(e.x===s&&s===r.x||e.y===a&&a===r.y)return`L${s} ${a}`;if(e.y===a){const u=e.x<r.x?-1:1,d=e.y<r.y?1:-1;return`L ${s+i*u},${a}Q ${s},${a} ${s},${a+i*d}`}const l=e.x<r.x?1:-1,c=e.y<r.y?-1:1;return`L ${s},${a+i*c}Q ${s},${a} ${s+i*l},${a}`}function Jp({sourceX:e,sourceY:n,sourcePosition:r=le.Bottom,targetX:o,targetY:i,targetPosition:s=le.Top,borderRadius:a=5,centerX:l,centerY:c,offset:u=20,stepPosition:d=.5}){const[f,p,m,g,b]=hU({source:{x:e,y:n},sourcePosition:r,target:{x:o,y:i},targetPosition:s,center:{x:l,y:c},offset:u,stepPosition:d});let _=`M${f[0].x} ${f[0].y}`;for(let y=1;y<f.length-1;y++)_+=mU(f[y-1],f[y],f[y+1],a);return _+=`L${f[f.length-1].x} ${f[f.length-1].y}`,[_,p,m,g,b]}function ox(e){var n;return e&&!!(e.internals.handleBounds||(n=e.handles)!=null&&n.length)&&!!(e.measured.width||e.width||e.initialWidth)}function gU(e){var f;const{sourceNode:n,targetNode:r}=e;if(!ox(n)||!ox(r))return null;const o=n.internals.handleBounds||ix(n.handles),i=r.internals.handleBounds||ix(r.handles),s=sx((o==null?void 0:o.source)??[],e.sourceHandle),a=sx(e.connectionMode===wi.Strict?(i==null?void 0:i.target)??[]:((i==null?void 0:i.target)??[]).concat((i==null?void 0:i.source)??[]),e.targetHandle);if(!s||!a)return(f=e.onError)==null||f.call(e,"008",Cn.error008(s?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const l=(s==null?void 0:s.position)||le.Bottom,c=(a==null?void 0:a.position)||le.Top,u=go(n,s,l),d=go(r,a,c);return{sourceX:u.x,sourceY:u.y,targetX:d.x,targetY:d.y,sourcePosition:l,targetPosition:c}}function ix(e){if(!e)return null;const n=[],r=[];for(const o of e)o.width=o.width??1,o.height=o.height??1,o.type==="source"?n.push(o):o.type==="target"&&r.push(o);return{source:n,target:r}}function go(e,n,r=le.Left,o=!1){const i=((n==null?void 0:n.x)??0)+e.internals.positionAbsolute.x,s=((n==null?void 0:n.y)??0)+e.internals.positionAbsolute.y,{width:a,height:l}=n??Zn(e);if(o)return{x:i+a/2,y:s+l/2};switch((n==null?void 0:n.position)??r){case le.Top:return{x:i+a/2,y:s};case le.Right:return{x:i+a,y:s+l/2};case le.Bottom:return{x:i+a/2,y:s+l};case le.Left:return{x:i,y:s+l/2}}}function sx(e,n){return e&&(n?e.find(r=>r.id===n):e[0])||null}function eh(e,n){return e?typeof e=="string"?e:`${n?`${n}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`:""}function yU(e,{id:n,defaultColor:r,defaultMarkerStart:o,defaultMarkerEnd:i}){const s=new Set;return e.reduce((a,l)=>([l.markerStart||o,l.markerEnd||i].forEach(c=>{if(c&&typeof c=="object"){const u=eh(c,n);s.has(u)||(a.push({id:u,color:c.color||r,...c}),s.add(u))}}),a),[]).sort((a,l)=>a.id.localeCompare(l.id))}const xk=1e3,vU=10,gg={nodeOrigin:[0,0],nodeExtent:ia,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},xU={...gg,checkEquality:!0};function yg(e,n){const r={...e};for(const o in n)n[o]!==void 0&&(r[o]=n[o]);return r}function wU(e,n,r){const o=yg(gg,r);for(const i of e.values())if(i.parentId)xg(i,e,n,o);else{const s=Ta(i,o.nodeOrigin),a=Si(i.extent)?i.extent:o.nodeExtent,l=mo(s,a,Zn(i));i.internals.positionAbsolute=l}}function bU(e,n){if(!e.handles)return e.measured?n==null?void 0:n.internals.handleBounds:void 0;const r=[],o=[];for(const i of e.handles){const s={id:i.id,width:i.width??1,height:i.height??1,nodeId:e.id,x:i.x,y:i.y,position:i.position,type:i.type};i.type==="source"?r.push(s):i.type==="target"&&o.push(s)}return{source:r,target:o}}function vg(e){return e==="manual"}function th(e,n,r,o={}){var d,f;const i=yg(xU,o),s={i:0},a=new Map(n),l=i!=null&&i.elevateNodesOnSelect&&!vg(i.zIndexMode)?xk:0;let c=e.length>0,u=!1;n.clear(),r.clear();for(const p of e){let m=a.get(p.id);if(i.checkEquality&&p===(m==null?void 0:m.internals.userNode))n.set(p.id,m);else{const g=Ta(p,i.nodeOrigin),b=Si(p.extent)?p.extent:i.nodeExtent,_=mo(g,b,Zn(p));m={...i.defaults,...p,measured:{width:(d=p.measured)==null?void 0:d.width,height:(f=p.measured)==null?void 0:f.height},internals:{positionAbsolute:_,handleBounds:bU(p,m),z:wk(p,l,i.zIndexMode),userNode:p}},n.set(p.id,m)}(m.measured===void 0||m.measured.width===void 0||m.measured.height===void 0)&&!m.hidden&&(c=!1),p.parentId&&xg(m,n,r,o,s),u||(u=p.selected??!1)}return{nodesInitialized:c,hasSelectedNodes:u}}function _U(e,n){if(!e.parentId)return;const r=n.get(e.parentId);r?r.set(e.id,e):n.set(e.parentId,new Map([[e.id,e]]))}function xg(e,n,r,o,i){const{elevateNodesOnSelect:s,nodeOrigin:a,nodeExtent:l,zIndexMode:c}=yg(gg,o),u=e.parentId,d=n.get(u);if(!d){console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}_U(e,r),i&&!d.parentId&&d.internals.rootParentIndex===void 0&&c==="auto"&&(d.internals.rootParentIndex=++i.i,d.internals.z=d.internals.z+i.i*vU),i&&d.internals.rootParentIndex!==void 0&&(i.i=d.internals.rootParentIndex);const f=s&&!vg(c)?xk:0,{x:p,y:m,z:g}=SU(e,d,a,l,f,c),{positionAbsolute:b}=e.internals,_=p!==b.x||m!==b.y;(_||g!==e.internals.z)&&n.set(e.id,{...e,internals:{...e.internals,positionAbsolute:_?{x:p,y:m}:b,z:g}})}function wk(e,n,r){const o=en(e.zIndex)?e.zIndex:0;return vg(r)?o:o+(e.selected?n:0)}function SU(e,n,r,o,i,s){const{x:a,y:l}=n.internals.positionAbsolute,c=Zn(e),u=Ta(e,r),d=Si(e.extent)?mo(u,e.extent,c):u;let f=mo({x:a+d.x,y:l+d.y},o,c);e.extent==="parent"&&(f=ak(f,c,n));const p=wk(e,i,s),m=n.internals.z??0;return{x:f.x,y:f.y,z:m>=p?m+1:p}}function wg(e,n,r,o=[0,0]){var a;const i=[],s=new Map;for(const l of e){const c=n.get(l.parentId);if(!c)continue;const u=((a=s.get(l.parentId))==null?void 0:a.expandedRect)??_i(c),d=ck(u,l.rect);s.set(l.parentId,{expandedRect:d,parent:c})}return s.size>0&&s.forEach(({expandedRect:l,parent:c},u)=>{var w;const d=c.internals.positionAbsolute,f=Zn(c),p=c.origin??o,m=l.x<d.x?Math.round(Math.abs(d.x-l.x)):0,g=l.y<d.y?Math.round(Math.abs(d.y-l.y)):0,b=Math.max(f.width,Math.round(l.width)),_=Math.max(f.height,Math.round(l.height)),y=(b-f.width)*p[0],x=(_-f.height)*p[1];(m>0||g>0||y||x)&&(i.push({id:u,type:"position",position:{x:c.position.x-m+y,y:c.position.y-g+x}}),(w=r.get(u))==null||w.forEach(S=>{e.some(C=>C.id===S.id)||i.push({id:S.id,type:"position",position:{x:S.position.x+m,y:S.position.y+g}})})),(f.width<l.width||f.height<l.height||m||g)&&i.push({id:u,type:"dimensions",setAttributes:!0,dimensions:{width:b+(m?p[0]*m-y:0),height:_+(g?p[1]*g-x:0)}})}),i}function CU(e,n,r,o,i,s,a){const l=o==null?void 0:o.querySelector(".xyflow__viewport");let c=!1;if(!l)return{changes:[],updatedInternals:c};const u=[],d=window.getComputedStyle(l),{m22:f}=new window.DOMMatrixReadOnly(d.transform),p=[];for(const m of e.values()){const g=n.get(m.id);if(!g)continue;if(g.hidden){n.set(g.id,{...g,internals:{...g.internals,handleBounds:void 0}}),c=!0;continue}const b=mg(m.nodeElement),_=g.measured.width!==b.width||g.measured.height!==b.height;if(!!(b.width&&b.height&&(_||!g.internals.handleBounds||m.force))){const x=m.nodeElement.getBoundingClientRect(),w=Si(g.extent)?g.extent:s;let{positionAbsolute:S}=g.internals;g.parentId&&g.extent==="parent"?S=ak(S,b,n.get(g.parentId)):w&&(S=mo(S,w,b));const C={...g,measured:b,internals:{...g.internals,positionAbsolute:S,handleBounds:{source:ex("source",m.nodeElement,x,f,g.id),target:ex("target",m.nodeElement,x,f,g.id)}}};n.set(g.id,C),g.parentId&&xg(C,n,r,{nodeOrigin:i,zIndexMode:a}),c=!0,_&&(u.push({id:g.id,type:"dimensions",dimensions:b}),g.expandParent&&g.parentId&&p.push({id:g.id,parentId:g.parentId,rect:_i(C,i)}))}}if(p.length>0){const m=wg(p,n,r,i);u.push(...m)}return{changes:u,updatedInternals:c}}async function EU({delta:e,panZoom:n,transform:r,translateExtent:o,width:i,height:s}){if(!n||!e.x&&!e.y)return Promise.resolve(!1);const a=await n.setViewportConstrained({x:r[0]+e.x,y:r[1]+e.y,zoom:r[2]},[[0,0],[i,s]],o),l=!!a&&(a.x!==r[0]||a.y!==r[1]||a.k!==r[2]);return Promise.resolve(l)}function ax(e,n,r,o,i,s){let a=i;const l=o.get(a)||new Map;o.set(a,l.set(r,n)),a=`${i}-${e}`;const c=o.get(a)||new Map;if(o.set(a,c.set(r,n)),s){a=`${i}-${e}-${s}`;const u=o.get(a)||new Map;o.set(a,u.set(r,n))}}function bk(e,n,r){e.clear(),n.clear();for(const o of r){const{source:i,target:s,sourceHandle:a=null,targetHandle:l=null}=o,c={edgeId:o.id,source:i,target:s,sourceHandle:a,targetHandle:l},u=`${i}-${a}--${s}-${l}`,d=`${s}-${l}--${i}-${a}`;ax("source",c,d,e,i,a),ax("target",c,u,e,s,l),n.set(o.id,o)}}function _k(e,n){if(!e.parentId)return!1;const r=n.get(e.parentId);return r?r.selected?!0:_k(r,n):!1}function lx(e,n,r){var i;let o=e;do{if((i=o==null?void 0:o.matches)!=null&&i.call(o,n))return!0;if(o===r)return!1;o=o==null?void 0:o.parentElement}while(o);return!1}function kU(e,n,r,o){const i=new Map;for(const[s,a]of e)if((a.selected||a.id===o)&&(!a.parentId||!_k(a,e))&&(a.draggable||n&&typeof a.draggable>"u")){const l=e.get(s);l&&i.set(s,{id:s,position:l.position||{x:0,y:0},distance:{x:r.x-l.internals.positionAbsolute.x,y:r.y-l.internals.positionAbsolute.y},extent:l.extent,parentId:l.parentId,origin:l.origin,expandParent:l.expandParent,internals:{positionAbsolute:l.internals.positionAbsolute||{x:0,y:0}},measured:{width:l.measured.width??0,height:l.measured.height??0}})}return i}function dd({nodeId:e,dragItems:n,nodeLookup:r,dragging:o=!0}){var a,l,c;const i=[];for(const[u,d]of n){const f=(a=r.get(u))==null?void 0:a.internals.userNode;f&&i.push({...f,position:d.position,dragging:o})}if(!e)return[i[0],i];const s=(l=r.get(e))==null?void 0:l.internals.userNode;return[s?{...s,position:((c=n.get(e))==null?void 0:c.position)||s.position,dragging:o}:i[0],i]}function NU({dragItems:e,snapGrid:n,x:r,y:o}){const i=e.values().next().value;if(!i)return null;const s={x:r-i.distance.x,y:o-i.distance.y},a=$a(s,n);return{x:a.x-s.x,y:a.y-s.y}}function PU({onNodeMouseDown:e,getStoreItems:n,onDragStart:r,onDrag:o,onDragStop:i}){let s={x:null,y:null},a=0,l=new Map,c=!1,u={x:0,y:0},d=null,f=!1,p=null,m=!1,g=!1,b=null;function _({noDragClassName:x,handleSelector:w,domNode:S,isSelectable:C,nodeId:E,nodeClickDistance:k=0}){p=tt(S);function N({x:O,y:H}){const{nodeLookup:R,nodeExtent:L,snapGrid:D,snapToGrid:z,nodeOrigin:A,onNodeDrag:M,onSelectionDrag:P,onError:W,updateNodePositions:T}=n();s={x:O,y:H};let X=!1;const F=l.size>1,B=F&&L?Qp(Ia(l)):null,G=F&&z?NU({dragItems:l,snapGrid:D,x:O,y:H}):null;for(const[U,Y]of l){if(!R.has(U))continue;let K={x:O-Y.distance.x,y:H-Y.distance.y};z&&(K=G?{x:Math.round(K.x+G.x),y:Math.round(K.y+G.y)}:$a(K,D));let ee=null;if(F&&L&&!Y.extent&&B){const{positionAbsolute:ne}=Y.internals,ce=ne.x-B.x+L[0][0],ge=ne.x+Y.measured.width-B.x2+L[1][0],fe=ne.y-B.y+L[0][1],$e=ne.y+Y.measured.height-B.y2+L[1][1];ee=[[ce,fe],[ge,$e]]}const{position:J,positionAbsolute:Q}=sk({nodeId:U,nextPosition:K,nodeLookup:R,nodeExtent:ee||L,nodeOrigin:A,onError:W});X=X||Y.position.x!==J.x||Y.position.y!==J.y,Y.position=J,Y.internals.positionAbsolute=Q}if(g=g||X,!!X&&(T(l,!0),b&&(o||M||!E&&P))){const[U,Y]=dd({nodeId:E,dragItems:l,nodeLookup:R});o==null||o(b,l,U,Y),M==null||M(b,U,Y),E||P==null||P(b,Y)}}async function j(){if(!d)return;const{transform:O,panBy:H,autoPanSpeed:R,autoPanOnNodeDrag:L}=n();if(!L){c=!1,cancelAnimationFrame(a);return}const[D,z]=lk(u,d,R);(D!==0||z!==0)&&(s.x=(s.x??0)-D/O[2],s.y=(s.y??0)-z/O[2],await H({x:D,y:z})&&N(s)),a=requestAnimationFrame(j)}function $(O){var F;const{nodeLookup:H,multiSelectionActive:R,nodesDraggable:L,transform:D,snapGrid:z,snapToGrid:A,selectNodesOnDrag:M,onNodeDragStart:P,onSelectionDragStart:W,unselectNodesAndEdges:T}=n();f=!0,(!M||!C)&&!R&&E&&((F=H.get(E))!=null&&F.selected||T()),C&&M&&E&&(e==null||e(E));const X=Ms(O.sourceEvent,{transform:D,snapGrid:z,snapToGrid:A,containerBounds:d});if(s=X,l=kU(H,L,X,E),l.size>0&&(r||P||!E&&W)){const[B,G]=dd({nodeId:E,dragItems:l,nodeLookup:H});r==null||r(O.sourceEvent,l,B,G),P==null||P(O.sourceEvent,B,G),E||W==null||W(O.sourceEvent,G)}}const I=Xm().clickDistance(k).on("start",O=>{const{domNode:H,nodeDragThreshold:R,transform:L,snapGrid:D,snapToGrid:z}=n();d=(H==null?void 0:H.getBoundingClientRect())||null,m=!1,g=!1,b=O.sourceEvent,R===0&&$(O),s=Ms(O.sourceEvent,{transform:L,snapGrid:D,snapToGrid:z,containerBounds:d}),u=tn(O.sourceEvent,d)}).on("drag",O=>{const{autoPanOnNodeDrag:H,transform:R,snapGrid:L,snapToGrid:D,nodeDragThreshold:z,nodeLookup:A}=n(),M=Ms(O.sourceEvent,{transform:R,snapGrid:L,snapToGrid:D,containerBounds:d});if(b=O.sourceEvent,(O.sourceEvent.type==="touchmove"&&O.sourceEvent.touches.length>1||E&&!A.has(E))&&(m=!0),!m){if(!c&&H&&f&&(c=!0,j()),!f){const P=tn(O.sourceEvent,d),W=P.x-u.x,T=P.y-u.y;Math.sqrt(W*W+T*T)>z&&$(O)}(s.x!==M.xSnapped||s.y!==M.ySnapped)&&l&&f&&(u=tn(O.sourceEvent,d),N(M))}}).on("end",O=>{if(!(!f||m)&&(c=!1,f=!1,cancelAnimationFrame(a),l.size>0)){const{nodeLookup:H,updateNodePositions:R,onNodeDragStop:L,onSelectionDragStop:D}=n();if(g&&(R(l,!1),g=!1),i||L||!E&&D){const[z,A]=dd({nodeId:E,dragItems:l,nodeLookup:H,dragging:!1});i==null||i(O.sourceEvent,l,z,A),L==null||L(O.sourceEvent,z,A),E||D==null||D(O.sourceEvent,A)}}}).filter(O=>{const H=O.target;return!O.button&&(!x||!lx(H,`.${x}`,S))&&(!w||lx(H,w,S))});p.call(I)}function y(){p==null||p.on(".drag",null)}return{update:_,destroy:y}}function RU(e,n,r){const o=[],i={x:e.x-r,y:e.y-r,width:r*2,height:r*2};for(const s of n.values())aa(i,_i(s))>0&&o.push(s);return o}const MU=250;function jU(e,n,r,o){var l,c;let i=[],s=1/0;const a=RU(e,r,n+MU);for(const u of a){const d=[...((l=u.internals.handleBounds)==null?void 0:l.source)??[],...((c=u.internals.handleBounds)==null?void 0:c.target)??[]];for(const f of d){if(o.nodeId===f.nodeId&&o.type===f.type&&o.id===f.id)continue;const{x:p,y:m}=go(u,f,f.position,!0),g=Math.sqrt(Math.pow(p-e.x,2)+Math.pow(m-e.y,2));g>n||(g<s?(i=[{...f,x:p,y:m}],s=g):g===s&&i.push({...f,x:p,y:m}))}}if(!i.length)return null;if(i.length>1){const u=o.type==="source"?"target":"source";return i.find(d=>d.type===u)??i[0]}return i[0]}function Sk(e,n,r,o,i,s=!1){var u,d,f;const a=o.get(e);if(!a)return null;const l=i==="strict"?(u=a.internals.handleBounds)==null?void 0:u[n]:[...((d=a.internals.handleBounds)==null?void 0:d.source)??[],...((f=a.internals.handleBounds)==null?void 0:f.target)??[]],c=(r?l==null?void 0:l.find(p=>p.id===r):l==null?void 0:l[0])??null;return c&&s?{...c,...go(a,c,c.position,!0)}:c}function Ck(e,n){return e||(n!=null&&n.classList.contains("target")?"target":n!=null&&n.classList.contains("source")?"source":null)}function AU(e,n){let r=null;return n?r=!0:e&&!n&&(r=!1),r}const Ek=()=>!0;function TU(e,{connectionMode:n,connectionRadius:r,handleId:o,nodeId:i,edgeUpdaterType:s,isTarget:a,domNode:l,nodeLookup:c,lib:u,autoPanOnConnect:d,flowId:f,panBy:p,cancelConnection:m,onConnectStart:g,onConnect:b,onConnectEnd:_,isValidConnection:y=Ek,onReconnectEnd:x,updateConnection:w,getTransform:S,getFromHandle:C,autoPanSpeed:E,dragThreshold:k=1,handleDomNode:N}){const j=dk(e.target);let $=0,I;const{x:O,y:H}=tn(e),R=Ck(s,N),L=l==null?void 0:l.getBoundingClientRect();let D=!1;if(!L||!R)return;const z=Sk(i,R,o,c,n);if(!z)return;let A=tn(e,L),M=!1,P=null,W=!1,T=null;function X(){if(!d||!L)return;const[J,Q]=lk(A,L,E);p({x:J,y:Q}),$=requestAnimationFrame(X)}const F={...z,nodeId:i,type:R,position:z.position},B=c.get(i);let U={inProgress:!0,isValid:null,from:go(B,F,le.Left,!0),fromHandle:F,fromPosition:F.position,fromNode:B,to:A,toHandle:null,toPosition:q0[F.position],toNode:null,pointer:A};function Y(){D=!0,w(U),g==null||g(e,{nodeId:i,handleId:o,handleType:R})}k===0&&Y();function K(J){if(!D){const{x:$e,y:un}=tn(J),ut=$e-O,Fr=un-H;if(!(ut*ut+Fr*Fr>k*k))return;Y()}if(!C()||!F){ee(J);return}const Q=S();A=tn(J,L),I=jU(Oa(A,Q,!1,[1,1]),r,c,F),M||(X(),M=!0);const ne=kk(J,{handle:I,connectionMode:n,fromNodeId:i,fromHandleId:o,fromType:a?"target":"source",isValidConnection:y,doc:j,lib:u,flowId:f,nodeLookup:c});T=ne.handleDomNode,P=ne.connection,W=AU(!!I,ne.isValid);const ce=c.get(i),ge=ce?go(ce,F,le.Left,!0):U.from,fe={...U,from:ge,isValid:W,to:ne.toHandle&&W?Jc({x:ne.toHandle.x,y:ne.toHandle.y},Q):A,toHandle:ne.toHandle,toPosition:W&&ne.toHandle?ne.toHandle.position:q0[F.position],toNode:ne.toHandle?c.get(ne.toHandle.nodeId):null,pointer:A};w(fe),U=fe}function ee(J){if(!("touches"in J&&J.touches.length>0)){if(D){(I||T)&&P&&W&&(b==null||b(P));const{inProgress:Q,...ne}=U,ce={...ne,toPosition:U.toHandle?U.toPosition:null};_==null||_(J,ce),s&&(x==null||x(J,ce))}m(),cancelAnimationFrame($),M=!1,W=!1,P=null,T=null,j.removeEventListener("mousemove",K),j.removeEventListener("mouseup",ee),j.removeEventListener("touchmove",K),j.removeEventListener("touchend",ee)}}j.addEventListener("mousemove",K),j.addEventListener("mouseup",ee),j.addEventListener("touchmove",K),j.addEventListener("touchend",ee)}function kk(e,{handle:n,connectionMode:r,fromNodeId:o,fromHandleId:i,fromType:s,doc:a,lib:l,flowId:c,isValidConnection:u=Ek,nodeLookup:d}){const f=s==="target",p=n?a.querySelector(`.${l}-flow__handle[data-id="${c}-${n==null?void 0:n.nodeId}-${n==null?void 0:n.id}-${n==null?void 0:n.type}"]`):null,{x:m,y:g}=tn(e),b=a.elementFromPoint(m,g),_=b!=null&&b.classList.contains(`${l}-flow__handle`)?b:p,y={handleDomNode:_,isValid:!1,connection:null,toHandle:null};if(_){const x=Ck(void 0,_),w=_.getAttribute("data-nodeid"),S=_.getAttribute("data-handleid"),C=_.classList.contains("connectable"),E=_.classList.contains("connectableend");if(!w||!x)return y;const k={source:f?w:o,sourceHandle:f?S:i,target:f?o:w,targetHandle:f?i:S};y.connection=k;const j=C&&E&&(r===wi.Strict?f&&x==="source"||!f&&x==="target":w!==o||S!==i);y.isValid=j&&u(k),y.toHandle=Sk(w,x,S,d,r,!0)}return y}const nh={onPointerDown:TU,isValid:kk};function IU({domNode:e,panZoom:n,getTransform:r,getViewScale:o}){const i=tt(e);function s({translateExtent:l,width:c,height:u,zoomStep:d=1,pannable:f=!0,zoomable:p=!0,inversePan:m=!1}){const g=w=>{if(w.sourceEvent.type!=="wheel"||!n)return;const S=r(),C=w.sourceEvent.ctrlKey&&la()?10:1,E=-w.sourceEvent.deltaY*(w.sourceEvent.deltaMode===1?.05:w.sourceEvent.deltaMode?1:.002)*d,k=S[2]*Math.pow(2,E*C);n.scaleTo(k)};let b=[0,0];const _=w=>{(w.sourceEvent.type==="mousedown"||w.sourceEvent.type==="touchstart")&&(b=[w.sourceEvent.clientX??w.sourceEvent.touches[0].clientX,w.sourceEvent.clientY??w.sourceEvent.touches[0].clientY])},y=w=>{const S=r();if(w.sourceEvent.type!=="mousemove"&&w.sourceEvent.type!=="touchmove"||!n)return;const C=[w.sourceEvent.clientX??w.sourceEvent.touches[0].clientX,w.sourceEvent.clientY??w.sourceEvent.touches[0].clientY],E=[C[0]-b[0],C[1]-b[1]];b=C;const k=o()*Math.max(S[2],Math.log(S[2]))*(m?-1:1),N={x:S[0]-E[0]*k,y:S[1]-E[1]*k},j=[[0,0],[c,u]];n.setViewportConstrained({x:N.x,y:N.y,zoom:S[2]},j,l)},x=tg().on("start",_).on("zoom",f?y:null).on("zoom.wheel",p?g:null);i.call(x,{})}function a(){i.on("zoom",null)}return{update:s,destroy:a,pointer:Ot}}const rf=e=>({x:e.x,y:e.y,zoom:e.k}),pd=({x:e,y:n,zoom:r})=>qu.translate(e,n).scale(r),Yo=(e,n)=>e.target.closest(`.${n}`),Nk=(e,n)=>n===2&&Array.isArray(e)&&e.includes(2),$U=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,hd=(e,n=0,r=$U,o=()=>{})=>{const i=typeof n=="number"&&n>0;return i||o(),i?e.transition().duration(n).ease(r).on("end",o):e},Pk=e=>{const n=e.ctrlKey&&la()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*n};function OU({zoomPanValues:e,noWheelClassName:n,d3Selection:r,d3Zoom:o,panOnScrollMode:i,panOnScrollSpeed:s,zoomOnPinch:a,onPanZoomStart:l,onPanZoom:c,onPanZoomEnd:u}){return d=>{if(Yo(d,n))return d.ctrlKey&&d.preventDefault(),!1;d.preventDefault(),d.stopImmediatePropagation();const f=r.property("__zoom").k||1;if(d.ctrlKey&&a){const _=Ot(d),y=Pk(d),x=f*Math.pow(2,y);o.scaleTo(r,x,_,d);return}const p=d.deltaMode===1?20:1;let m=i===no.Vertical?0:d.deltaX*p,g=i===no.Horizontal?0:d.deltaY*p;!la()&&d.shiftKey&&i!==no.Vertical&&(m=d.deltaY*p,g=0),o.translateBy(r,-(m/f)*s,-(g/f)*s,{internal:!0});const b=rf(r.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c==null||c(d,b),e.panScrollTimeout=setTimeout(()=>{u==null||u(d,b),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,l==null||l(d,b))}}function DU({noWheelClassName:e,preventScrolling:n,d3ZoomHandler:r}){return function(o,i){const s=o.type==="wheel",a=!n&&s&&!o.ctrlKey,l=Yo(o,e);if(o.ctrlKey&&s&&l&&o.preventDefault(),a||l)return null;o.preventDefault(),r.call(this,o,i)}}function LU({zoomPanValues:e,onDraggingChange:n,onPanZoomStart:r}){return o=>{var s,a,l;if((s=o.sourceEvent)!=null&&s.internal)return;const i=rf(o.transform);e.mouseButton=((a=o.sourceEvent)==null?void 0:a.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=i,((l=o.sourceEvent)==null?void 0:l.type)==="mousedown"&&n(!0),r&&(r==null||r(o.sourceEvent,i))}}function zU({zoomPanValues:e,panOnDrag:n,onPaneContextMenu:r,onTransformChange:o,onPanZoom:i}){return s=>{var a,l;e.usedRightMouseButton=!!(r&&Nk(n,e.mouseButton??0)),(a=s.sourceEvent)!=null&&a.sync||o([s.transform.x,s.transform.y,s.transform.k]),i&&!((l=s.sourceEvent)!=null&&l.internal)&&(i==null||i(s.sourceEvent,rf(s.transform)))}}function FU({zoomPanValues:e,panOnDrag:n,panOnScroll:r,onDraggingChange:o,onPanZoomEnd:i,onPaneContextMenu:s}){return a=>{var l;if(!((l=a.sourceEvent)!=null&&l.internal)&&(e.isZoomingOrPanning=!1,s&&Nk(n,e.mouseButton??0)&&!e.usedRightMouseButton&&a.sourceEvent&&s(a.sourceEvent),e.usedRightMouseButton=!1,o(!1),i)){const c=rf(a.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i==null||i(a.sourceEvent,c)},r?150:0)}}}function VU({zoomActivationKeyPressed:e,zoomOnScroll:n,zoomOnPinch:r,panOnDrag:o,panOnScroll:i,zoomOnDoubleClick:s,userSelectionActive:a,noWheelClassName:l,noPanClassName:c,lib:u,connectionInProgress:d}){return f=>{var _;const p=e||n,m=r&&f.ctrlKey,g=f.type==="wheel";if(f.button===1&&f.type==="mousedown"&&(Yo(f,`${u}-flow__node`)||Yo(f,`${u}-flow__edge`)))return!0;if(!o&&!p&&!i&&!s&&!r||a||d&&!g||Yo(f,l)&&g||Yo(f,c)&&(!g||i&&g&&!e)||!r&&f.ctrlKey&&g)return!1;if(!r&&f.type==="touchstart"&&((_=f.touches)==null?void 0:_.length)>1)return f.preventDefault(),!1;if(!p&&!i&&!m&&g||!o&&(f.type==="mousedown"||f.type==="touchstart")||Array.isArray(o)&&!o.includes(f.button)&&f.type==="mousedown")return!1;const b=Array.isArray(o)&&o.includes(f.button)||!f.button||f.button<=1;return(!f.ctrlKey||g)&&b}}function BU({domNode:e,minZoom:n,maxZoom:r,translateExtent:o,viewport:i,onPanZoom:s,onPanZoomStart:a,onPanZoomEnd:l,onDraggingChange:c}){const u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},d=e.getBoundingClientRect(),f=tg().scaleExtent([n,r]).translateExtent(o),p=tt(e).call(f);x({x:i.x,y:i.y,zoom:bi(i.zoom,n,r)},[[0,0],[d.width,d.height]],o);const m=p.on("wheel.zoom"),g=p.on("dblclick.zoom");f.wheelDelta(Pk);function b(I,O){return p?new Promise(H=>{f==null||f.interpolate((O==null?void 0:O.interpolate)==="linear"?Cs:Hl).transform(hd(p,O==null?void 0:O.duration,O==null?void 0:O.ease,()=>H(!0)),I)}):Promise.resolve(!1)}function _({noWheelClassName:I,noPanClassName:O,onPaneContextMenu:H,userSelectionActive:R,panOnScroll:L,panOnDrag:D,panOnScrollMode:z,panOnScrollSpeed:A,preventScrolling:M,zoomOnPinch:P,zoomOnScroll:W,zoomOnDoubleClick:T,zoomActivationKeyPressed:X,lib:F,onTransformChange:B,connectionInProgress:G,paneClickDistance:U,selectionOnDrag:Y}){R&&!u.isZoomingOrPanning&&y();const K=L&&!X&&!R;f.clickDistance(Y?1/0:!en(U)||U<0?0:U);const ee=K?OU({zoomPanValues:u,noWheelClassName:I,d3Selection:p,d3Zoom:f,panOnScrollMode:z,panOnScrollSpeed:A,zoomOnPinch:P,onPanZoomStart:a,onPanZoom:s,onPanZoomEnd:l}):DU({noWheelClassName:I,preventScrolling:M,d3ZoomHandler:m});if(p.on("wheel.zoom",ee,{passive:!1}),!R){const Q=LU({zoomPanValues:u,onDraggingChange:c,onPanZoomStart:a});f.on("start",Q);const ne=zU({zoomPanValues:u,panOnDrag:D,onPaneContextMenu:!!H,onPanZoom:s,onTransformChange:B});f.on("zoom",ne);const ce=FU({zoomPanValues:u,panOnDrag:D,panOnScroll:L,onPaneContextMenu:H,onPanZoomEnd:l,onDraggingChange:c});f.on("end",ce)}const J=VU({zoomActivationKeyPressed:X,panOnDrag:D,zoomOnScroll:W,panOnScroll:L,zoomOnDoubleClick:T,zoomOnPinch:P,userSelectionActive:R,noPanClassName:O,noWheelClassName:I,lib:F,connectionInProgress:G});f.filter(J),T?p.on("dblclick.zoom",g):p.on("dblclick.zoom",null)}function y(){f.on("zoom",null)}async function x(I,O,H){const R=pd(I),L=f==null?void 0:f.constrain()(R,O,H);return L&&await b(L),new Promise(D=>D(L))}async function w(I,O){const H=pd(I);return await b(H,O),new Promise(R=>R(H))}function S(I){if(p){const O=pd(I),H=p.property("__zoom");(H.k!==I.zoom||H.x!==I.x||H.y!==I.y)&&(f==null||f.transform(p,O,null,{sync:!0}))}}function C(){const I=p?Kt(p.node()):{x:0,y:0,k:1};return{x:I.x,y:I.y,zoom:I.k}}function E(I,O){return p?new Promise(H=>{f==null||f.interpolate((O==null?void 0:O.interpolate)==="linear"?Cs:Hl).scaleTo(hd(p,O==null?void 0:O.duration,O==null?void 0:O.ease,()=>H(!0)),I)}):Promise.resolve(!1)}function k(I,O){return p?new Promise(H=>{f==null||f.interpolate((O==null?void 0:O.interpolate)==="linear"?Cs:Hl).scaleBy(hd(p,O==null?void 0:O.duration,O==null?void 0:O.ease,()=>H(!0)),I)}):Promise.resolve(!1)}function N(I){f==null||f.scaleExtent(I)}function j(I){f==null||f.translateExtent(I)}function $(I){const O=!en(I)||I<0?0:I;f==null||f.clickDistance(O)}return{update:_,destroy:y,setViewport:w,setViewportConstrained:x,getViewport:C,scaleTo:E,scaleBy:k,setScaleExtent:N,setTranslateExtent:j,syncViewport:S,setClickDistance:$}}var Ci;(function(e){e.Line="line",e.Handle="handle"})(Ci||(Ci={}));function HU({width:e,prevWidth:n,height:r,prevHeight:o,affectsX:i,affectsY:s}){const a=e-n,l=r-o,c=[a>0?1:a<0?-1:0,l>0?1:l<0?-1:0];return a&&i&&(c[0]=c[0]*-1),l&&s&&(c[1]=c[1]*-1),c}function cx(e){const n=e.includes("right")||e.includes("left"),r=e.includes("bottom")||e.includes("top"),o=e.includes("left"),i=e.includes("top");return{isHorizontal:n,isVertical:r,affectsX:o,affectsY:i}}function rr(e,n){return Math.max(0,n-e)}function or(e,n){return Math.max(0,e-n)}function xl(e,n,r){return Math.max(0,n-e,e-r)}function ux(e,n){return e?!n:n}function WU(e,n,r,o,i,s,a,l){let{affectsX:c,affectsY:u}=n;const{isHorizontal:d,isVertical:f}=n,p=d&&f,{xSnapped:m,ySnapped:g}=r,{minWidth:b,maxWidth:_,minHeight:y,maxHeight:x}=o,{x:w,y:S,width:C,height:E,aspectRatio:k}=e;let N=Math.floor(d?m-e.pointerX:0),j=Math.floor(f?g-e.pointerY:0);const $=C+(c?-N:N),I=E+(u?-j:j),O=-s[0]*C,H=-s[1]*E;let R=xl($,b,_),L=xl(I,y,x);if(a){let A=0,M=0;c&&N<0?A=rr(w+N+O,a[0][0]):!c&&N>0&&(A=or(w+$+O,a[1][0])),u&&j<0?M=rr(S+j+H,a[0][1]):!u&&j>0&&(M=or(S+I+H,a[1][1])),R=Math.max(R,A),L=Math.max(L,M)}if(l){let A=0,M=0;c&&N>0?A=or(w+N,l[0][0]):!c&&N<0&&(A=rr(w+$,l[1][0])),u&&j>0?M=or(S+j,l[0][1]):!u&&j<0&&(M=rr(S+I,l[1][1])),R=Math.max(R,A),L=Math.max(L,M)}if(i){if(d){const A=xl($/k,y,x)*k;if(R=Math.max(R,A),a){let M=0;!c&&!u||c&&!u&&p?M=or(S+H+$/k,a[1][1])*k:M=rr(S+H+(c?N:-N)/k,a[0][1])*k,R=Math.max(R,M)}if(l){let M=0;!c&&!u||c&&!u&&p?M=rr(S+$/k,l[1][1])*k:M=or(S+(c?N:-N)/k,l[0][1])*k,R=Math.max(R,M)}}if(f){const A=xl(I*k,b,_)/k;if(L=Math.max(L,A),a){let M=0;!c&&!u||u&&!c&&p?M=or(w+I*k+O,a[1][0])/k:M=rr(w+(u?j:-j)*k+O,a[0][0])/k,L=Math.max(L,M)}if(l){let M=0;!c&&!u||u&&!c&&p?M=rr(w+I*k,l[1][0])/k:M=or(w+(u?j:-j)*k,l[0][0])/k,L=Math.max(L,M)}}}j=j+(j<0?L:-L),N=N+(N<0?R:-R),i&&(p?$>I*k?j=(ux(c,u)?-N:N)/k:N=(ux(c,u)?-j:j)*k:d?(j=N/k,u=c):(N=j*k,c=u));const D=c?w+N:w,z=u?S+j:S;return{width:C+(c?-N:N),height:E+(u?-j:j),x:s[0]*N*(c?-1:1)+D,y:s[1]*j*(u?-1:1)+z}}const Rk={width:0,height:0,x:0,y:0},UU={...Rk,pointerX:0,pointerY:0,aspectRatio:1};function GU(e){return[[0,0],[e.measured.width,e.measured.height]]}function YU(e,n,r){const o=n.position.x+e.position.x,i=n.position.y+e.position.y,s=e.measured.width??0,a=e.measured.height??0,l=r[0]*s,c=r[1]*a;return[[o-l,i-c],[o+s-l,i+a-c]]}function XU({domNode:e,nodeId:n,getStoreItems:r,onChange:o,onEnd:i}){const s=tt(e);let a={controlDirection:cx("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function l({controlPosition:u,boundaries:d,keepAspectRatio:f,resizeDirection:p,onResizeStart:m,onResize:g,onResizeEnd:b,shouldResize:_}){let y={...Rk},x={...UU};a={boundaries:d,resizeDirection:p,keepAspectRatio:f,controlDirection:cx(u)};let w,S=null,C=[],E,k,N,j=!1;const $=Xm().on("start",I=>{const{nodeLookup:O,transform:H,snapGrid:R,snapToGrid:L,nodeOrigin:D,paneDomNode:z}=r();if(w=O.get(n),!w)return;S=(z==null?void 0:z.getBoundingClientRect())??null;const{xSnapped:A,ySnapped:M}=Ms(I.sourceEvent,{transform:H,snapGrid:R,snapToGrid:L,containerBounds:S});y={width:w.measured.width??0,height:w.measured.height??0,x:w.position.x??0,y:w.position.y??0},x={...y,pointerX:A,pointerY:M,aspectRatio:y.width/y.height},E=void 0,w.parentId&&(w.extent==="parent"||w.expandParent)&&(E=O.get(w.parentId),k=E&&w.extent==="parent"?GU(E):void 0),C=[],N=void 0;for(const[P,W]of O)if(W.parentId===n&&(C.push({id:P,position:{...W.position},extent:W.extent}),W.extent==="parent"||W.expandParent)){const T=YU(W,w,W.origin??D);N?N=[[Math.min(T[0][0],N[0][0]),Math.min(T[0][1],N[0][1])],[Math.max(T[1][0],N[1][0]),Math.max(T[1][1],N[1][1])]]:N=T}m==null||m(I,{...y})}).on("drag",I=>{const{transform:O,snapGrid:H,snapToGrid:R,nodeOrigin:L}=r(),D=Ms(I.sourceEvent,{transform:O,snapGrid:H,snapToGrid:R,containerBounds:S}),z=[];if(!w)return;const{x:A,y:M,width:P,height:W}=y,T={},X=w.origin??L,{width:F,height:B,x:G,y:U}=WU(x,a.controlDirection,D,a.boundaries,a.keepAspectRatio,X,k,N),Y=F!==P,K=B!==W,ee=G!==A&&Y,J=U!==M&&K;if(!ee&&!J&&!Y&&!K)return;if((ee||J||X[0]===1||X[1]===1)&&(T.x=ee?G:y.x,T.y=J?U:y.y,y.x=T.x,y.y=T.y,C.length>0)){const ge=G-A,fe=U-M;for(const $e of C)$e.position={x:$e.position.x-ge+X[0]*(F-P),y:$e.position.y-fe+X[1]*(B-W)},z.push($e)}if((Y||K)&&(T.width=Y&&(!a.resizeDirection||a.resizeDirection==="horizontal")?F:y.width,T.height=K&&(!a.resizeDirection||a.resizeDirection==="vertical")?B:y.height,y.width=T.width,y.height=T.height),E&&w.expandParent){const ge=X[0]*(T.width??0);T.x&&T.x<ge&&(y.x=ge,x.x=x.x-(T.x-ge));const fe=X[1]*(T.height??0);T.y&&T.y<fe&&(y.y=fe,x.y=x.y-(T.y-fe))}const Q=HU({width:y.width,prevWidth:P,height:y.height,prevHeight:W,affectsX:a.controlDirection.affectsX,affectsY:a.controlDirection.affectsY}),ne={...y,direction:Q};(_==null?void 0:_(I,ne))!==!1&&(j=!0,g==null||g(I,ne),o(T,z))}).on("end",I=>{j&&(b==null||b(I,{...y}),i==null||i({...y}),j=!1)});s.call($)}function c(){s.on(".drag",null)}return{update:l,destroy:c}}var Mk={exports:{}},jk={};/**
365
+ * @license React
366
+ * use-sync-external-store-shim/with-selector.production.js
367
+ *
368
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
369
+ *
370
+ * This source code is licensed under the MIT license found in the
371
+ * LICENSE file in the root directory of this source tree.
372
+ */var of=h,KU=Tb;function qU(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var ZU=typeof Object.is=="function"?Object.is:qU,QU=KU.useSyncExternalStore,JU=of.useRef,eG=of.useEffect,tG=of.useMemo,nG=of.useDebugValue;jk.useSyncExternalStoreWithSelector=function(e,n,r,o,i){var s=JU(null);if(s.current===null){var a={hasValue:!1,value:null};s.current=a}else a=s.current;s=tG(function(){function c(m){if(!u){if(u=!0,d=m,m=o(m),i!==void 0&&a.hasValue){var g=a.value;if(i(g,m))return f=g}return f=m}if(g=f,ZU(d,m))return g;var b=o(m);return i!==void 0&&i(g,b)?(d=m,g):(d=m,f=b)}var u=!1,d,f,p=r===void 0?null:r;return[function(){return c(n())},p===null?void 0:function(){return c(p())}]},[n,r,o,i]);var l=QU(e,s[0],s[1]);return eG(function(){a.hasValue=!0,a.value=l},[l]),nG(l),l};Mk.exports=jk;var rG=Mk.exports;const oG=nu(rG),iG={},fx=e=>{let n;const r=new Set,o=(d,f)=>{const p=typeof d=="function"?d(n):d;if(!Object.is(p,n)){const m=n;n=f??(typeof p!="object"||p===null)?p:Object.assign({},n,p),r.forEach(g=>g(n,m))}},i=()=>n,c={setState:o,getState:i,getInitialState:()=>u,subscribe:d=>(r.add(d),()=>r.delete(d)),destroy:()=>{(iG?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},u=n=e(o,i,c);return c},sG=e=>e?fx(e):fx,{useDebugValue:aG}=Je,{useSyncExternalStoreWithSelector:lG}=oG,cG=e=>e;function Ak(e,n=cG,r){const o=lG(e.subscribe,e.getState,e.getServerState||e.getInitialState,n,r);return aG(o),o}const dx=(e,n)=>{const r=sG(e),o=(i,s=n)=>Ak(r,i,s);return Object.assign(o,r),o},uG=(e,n)=>e?dx(e,n):dx;function Re(e,n){if(Object.is(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;if(e instanceof Map&&n instanceof Map){if(e.size!==n.size)return!1;for(const[o,i]of e)if(!Object.is(i,n.get(o)))return!1;return!0}if(e instanceof Set&&n instanceof Set){if(e.size!==n.size)return!1;for(const o of e)if(!n.has(o))return!1;return!0}const r=Object.keys(e);if(r.length!==Object.keys(n).length)return!1;for(const o of r)if(!Object.prototype.hasOwnProperty.call(n,o)||!Object.is(e[o],n[o]))return!1;return!0}const sf=h.createContext(null),fG=sf.Provider,Tk=Cn.error001();function he(e,n){const r=h.useContext(sf);if(r===null)throw new Error(Tk);return Ak(r,e,n)}function Me(){const e=h.useContext(sf);if(e===null)throw new Error(Tk);return h.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const px={display:"none"},dG={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Ik="react-flow__node-desc",$k="react-flow__edge-desc",pG="react-flow__aria-live",hG=e=>e.ariaLiveMessage,mG=e=>e.ariaLabelConfig;function gG({rfId:e}){const n=he(hG);return v.jsx("div",{id:`${pG}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:dG,children:n})}function yG({rfId:e,disableKeyboardA11y:n}){const r=he(mG);return v.jsxs(v.Fragment,{children:[v.jsx("div",{id:`${Ik}-${e}`,style:px,children:n?r["node.a11yDescription.default"]:r["node.a11yDescription.keyboardDisabled"]}),v.jsx("div",{id:`${$k}-${e}`,style:px,children:r["edge.a11yDescription.default"]}),!n&&v.jsx(gG,{rfId:e})]})}const af=h.forwardRef(({position:e="top-left",children:n,className:r,style:o,...i},s)=>{const a=`${e}`.split("-");return v.jsx("div",{className:ze(["react-flow__panel",r,...a]),style:o,ref:s,...i,children:n})});af.displayName="Panel";function vG({proOptions:e,position:n="bottom-right"}){return e!=null&&e.hideAttribution?null:v.jsx(af,{position:n,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:v.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const xG=e=>{const n=[],r=[];for(const[,o]of e.nodeLookup)o.selected&&n.push(o.internals.userNode);for(const[,o]of e.edgeLookup)o.selected&&r.push(o);return{selectedNodes:n,selectedEdges:r}},wl=e=>e.id;function wG(e,n){return Re(e.selectedNodes.map(wl),n.selectedNodes.map(wl))&&Re(e.selectedEdges.map(wl),n.selectedEdges.map(wl))}function bG({onSelectionChange:e}){const n=Me(),{selectedNodes:r,selectedEdges:o}=he(xG,wG);return h.useEffect(()=>{const i={nodes:r,edges:o};e==null||e(i),n.getState().onSelectionChangeHandlers.forEach(s=>s(i))},[r,o,e]),null}const _G=e=>!!e.onSelectionChangeHandlers;function SG({onSelectionChange:e}){const n=he(_G);return e||n?v.jsx(bG,{onSelectionChange:e}):null}const rh=typeof window<"u"?h.useLayoutEffect:h.useEffect,Ok=[0,0],CG={x:0,y:0,zoom:1},EG=["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"],hx=[...EG,"rfId"],kG=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}),mx={translateExtent:ia,nodeOrigin:Ok,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function NG(e){const{setNodes:n,setEdges:r,setMinZoom:o,setMaxZoom:i,setTranslateExtent:s,setNodeExtent:a,reset:l,setDefaultNodesAndEdges:c}=he(kG,Re),u=Me();rh(()=>(c(e.defaultNodes,e.defaultEdges),()=>{d.current=mx,l()}),[]);const d=h.useRef(mx);return rh(()=>{for(const f of hx){const p=e[f],m=d.current[f];p!==m&&(typeof e[f]>"u"||(f==="nodes"?n(p):f==="edges"?r(p):f==="minZoom"?o(p):f==="maxZoom"?i(p):f==="translateExtent"?s(p):f==="nodeExtent"?a(p):f==="ariaLabelConfig"?u.setState({ariaLabelConfig:sU(p)}):f==="fitView"?u.setState({fitViewQueued:p}):f==="fitViewOptions"?u.setState({fitViewOptions:p}):u.setState({[f]:p})))}d.current=e},hx.map(f=>e[f])),null}function gx(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function PG(e){var o;const[n,r]=h.useState(e==="system"?null:e);return h.useEffect(()=>{if(e!=="system"){r(e);return}const i=gx(),s=()=>r(i!=null&&i.matches?"dark":"light");return s(),i==null||i.addEventListener("change",s),()=>{i==null||i.removeEventListener("change",s)}},[e]),n!==null?n:(o=gx())!=null&&o.matches?"dark":"light"}const yx=typeof document<"u"?document:null;function ca(e=null,n={target:yx,actInsideInputWithModifier:!0}){const[r,o]=h.useState(!1),i=h.useRef(!1),s=h.useRef(new Set([])),[a,l]=h.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(f=>typeof f=="string").map(f=>f.replace("+",`
373
+ `).replace(`
374
+
375
+ `,`
376
+ +`).split(`
377
+ `)),d=u.reduce((f,p)=>f.concat(...p),[]);return[u,d]}return[[],[]]},[e]);return h.useEffect(()=>{const c=(n==null?void 0:n.target)??yx,u=(n==null?void 0:n.actInsideInputWithModifier)??!0;if(e!==null){const d=m=>{var _,y;if(i.current=m.ctrlKey||m.metaKey||m.shiftKey||m.altKey,(!i.current||i.current&&!u)&&pk(m))return!1;const b=xx(m.code,l);if(s.current.add(m[b]),vx(a,s.current,!1)){const x=((y=(_=m.composedPath)==null?void 0:_.call(m))==null?void 0:y[0])||m.target,w=(x==null?void 0:x.nodeName)==="BUTTON"||(x==null?void 0:x.nodeName)==="A";n.preventDefault!==!1&&(i.current||!w)&&m.preventDefault(),o(!0)}},f=m=>{const g=xx(m.code,l);vx(a,s.current,!0)?(o(!1),s.current.clear()):s.current.delete(m[g]),m.key==="Meta"&&s.current.clear(),i.current=!1},p=()=>{s.current.clear(),o(!1)};return c==null||c.addEventListener("keydown",d),c==null||c.addEventListener("keyup",f),window.addEventListener("blur",p),window.addEventListener("contextmenu",p),()=>{c==null||c.removeEventListener("keydown",d),c==null||c.removeEventListener("keyup",f),window.removeEventListener("blur",p),window.removeEventListener("contextmenu",p)}}},[e,o]),r}function vx(e,n,r){return e.filter(o=>r||o.length===n.size).some(o=>o.every(i=>n.has(i)))}function xx(e,n){return n.includes(e)?"code":"key"}const RG=()=>{const e=Me();return h.useMemo(()=>({zoomIn:n=>{const{panZoom:r}=e.getState();return r?r.scaleBy(1.2,n):Promise.resolve(!1)},zoomOut:n=>{const{panZoom:r}=e.getState();return r?r.scaleBy(1/1.2,n):Promise.resolve(!1)},zoomTo:(n,r)=>{const{panZoom:o}=e.getState();return o?o.scaleTo(n,r):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(n,r)=>{const{transform:[o,i,s],panZoom:a}=e.getState();return a?(await a.setViewport({x:n.x??o,y:n.y??i,zoom:n.zoom??s},r),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[n,r,o]=e.getState().transform;return{x:n,y:r,zoom:o}},setCenter:async(n,r,o)=>e.getState().setCenter(n,r,o),fitBounds:async(n,r)=>{const{width:o,height:i,minZoom:s,maxZoom:a,panZoom:l}=e.getState(),c=hg(n,o,i,s,a,(r==null?void 0:r.padding)??.1);return l?(await l.setViewport(c,{duration:r==null?void 0:r.duration,ease:r==null?void 0:r.ease,interpolate:r==null?void 0:r.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(n,r={})=>{const{transform:o,snapGrid:i,snapToGrid:s,domNode:a}=e.getState();if(!a)return n;const{x:l,y:c}=a.getBoundingClientRect(),u={x:n.x-l,y:n.y-c},d=r.snapGrid??i,f=r.snapToGrid??s;return Oa(u,o,f,d)},flowToScreenPosition:n=>{const{transform:r,domNode:o}=e.getState();if(!o)return n;const{x:i,y:s}=o.getBoundingClientRect(),a=Jc(n,r);return{x:a.x+i,y:a.y+s}}}),[])};function Dk(e,n){const r=[],o=new Map,i=[];for(const s of e)if(s.type==="add"){i.push(s);continue}else if(s.type==="remove"||s.type==="replace")o.set(s.id,[s]);else{const a=o.get(s.id);a?a.push(s):o.set(s.id,[s])}for(const s of n){const a=o.get(s.id);if(!a){r.push(s);continue}if(a[0].type==="remove")continue;if(a[0].type==="replace"){r.push({...a[0].item});continue}const l={...s};for(const c of a)MG(c,l);r.push(l)}return i.length&&i.forEach(s=>{s.index!==void 0?r.splice(s.index,0,{...s.item}):r.push({...s.item})}),r}function MG(e,n){switch(e.type){case"select":{n.selected=e.selected;break}case"position":{typeof e.position<"u"&&(n.position=e.position),typeof e.dragging<"u"&&(n.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(n.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(n.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(n.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(n.resizing=e.resizing);break}}}function jG(e,n){return Dk(e,n)}function AG(e,n){return Dk(e,n)}function Yr(e,n){return{id:e,type:"select",selected:n}}function Xo(e,n=new Set,r=!1){const o=[];for(const[i,s]of e){const a=n.has(i);!(s.selected===void 0&&!a)&&s.selected!==a&&(r&&(s.selected=a),o.push(Yr(s.id,a)))}return o}function wx({items:e=[],lookup:n}){var i;const r=[],o=new Map(e.map(s=>[s.id,s]));for(const[s,a]of e.entries()){const l=n.get(a.id),c=((i=l==null?void 0:l.internals)==null?void 0:i.userNode)??l;c!==void 0&&c!==a&&r.push({id:a.id,item:a,type:"replace"}),c===void 0&&r.push({item:a,type:"add",index:s})}for(const[s]of n)o.get(s)===void 0&&r.push({id:s,type:"remove"});return r}function bx(e){return{id:e.id,type:"remove"}}const _x=e=>qW(e),TG=e=>ik(e);function Lk(e){return h.forwardRef(e)}function Sx(e){const[n,r]=h.useState(BigInt(0)),[o]=h.useState(()=>IG(()=>r(i=>i+BigInt(1))));return rh(()=>{const i=o.get();i.length&&(e(i),o.reset())},[n]),o}function IG(e){let n=[];return{get:()=>n,reset:()=>{n=[]},push:r=>{n.push(r),e()}}}const zk=h.createContext(null);function $G({children:e}){const n=Me(),r=h.useCallback(l=>{const{nodes:c=[],setNodes:u,hasDefaultNodes:d,onNodesChange:f,nodeLookup:p,fitViewQueued:m,onNodesChangeMiddlewareMap:g}=n.getState();let b=c;for(const y of l)b=typeof y=="function"?y(b):y;let _=wx({items:b,lookup:p});for(const y of g.values())_=y(_);d&&u(b),_.length>0?f==null||f(_):m&&window.requestAnimationFrame(()=>{const{fitViewQueued:y,nodes:x,setNodes:w}=n.getState();y&&w(x)})},[]),o=Sx(r),i=h.useCallback(l=>{const{edges:c=[],setEdges:u,hasDefaultEdges:d,onEdgesChange:f,edgeLookup:p}=n.getState();let m=c;for(const g of l)m=typeof g=="function"?g(m):g;d?u(m):f&&f(wx({items:m,lookup:p}))},[]),s=Sx(i),a=h.useMemo(()=>({nodeQueue:o,edgeQueue:s}),[]);return v.jsx(zk.Provider,{value:a,children:e})}function OG(){const e=h.useContext(zk);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const DG=e=>!!e.panZoom;function bg(){const e=RG(),n=Me(),r=OG(),o=he(DG),i=h.useMemo(()=>{const s=f=>n.getState().nodeLookup.get(f),a=f=>{r.nodeQueue.push(f)},l=f=>{r.edgeQueue.push(f)},c=f=>{var y,x;const{nodeLookup:p,nodeOrigin:m}=n.getState(),g=_x(f)?f:p.get(f.id),b=g.parentId?fk(g.position,g.measured,g.parentId,p,m):g.position,_={...g,position:b,width:((y=g.measured)==null?void 0:y.width)??g.width,height:((x=g.measured)==null?void 0:x.height)??g.height};return _i(_)},u=(f,p,m={replace:!1})=>{a(g=>g.map(b=>{if(b.id===f){const _=typeof p=="function"?p(b):p;return m.replace&&_x(_)?_:{...b,..._}}return b}))},d=(f,p,m={replace:!1})=>{l(g=>g.map(b=>{if(b.id===f){const _=typeof p=="function"?p(b):p;return m.replace&&TG(_)?_:{...b,..._}}return b}))};return{getNodes:()=>n.getState().nodes.map(f=>({...f})),getNode:f=>{var p;return(p=s(f))==null?void 0:p.internals.userNode},getInternalNode:s,getEdges:()=>{const{edges:f=[]}=n.getState();return f.map(p=>({...p}))},getEdge:f=>n.getState().edgeLookup.get(f),setNodes:a,setEdges:l,addNodes:f=>{const p=Array.isArray(f)?f:[f];r.nodeQueue.push(m=>[...m,...p])},addEdges:f=>{const p=Array.isArray(f)?f:[f];r.edgeQueue.push(m=>[...m,...p])},toObject:()=>{const{nodes:f=[],edges:p=[],transform:m}=n.getState(),[g,b,_]=m;return{nodes:f.map(y=>({...y})),edges:p.map(y=>({...y})),viewport:{x:g,y:b,zoom:_}}},deleteElements:async({nodes:f=[],edges:p=[]})=>{const{nodes:m,edges:g,onNodesDelete:b,onEdgesDelete:_,triggerNodeChanges:y,triggerEdgeChanges:x,onDelete:w,onBeforeDelete:S}=n.getState(),{nodes:C,edges:E}=await tU({nodesToRemove:f,edgesToRemove:p,nodes:m,edges:g,onBeforeDelete:S}),k=E.length>0,N=C.length>0;if(k){const j=E.map(bx);_==null||_(E),x(j)}if(N){const j=C.map(bx);b==null||b(C),y(j)}return(N||k)&&(w==null||w({nodes:C,edges:E})),{deletedNodes:C,deletedEdges:E}},getIntersectingNodes:(f,p=!0,m)=>{const g=Q0(f),b=g?f:c(f),_=m!==void 0;return b?(m||n.getState().nodes).filter(y=>{const x=n.getState().nodeLookup.get(y.id);if(x&&!g&&(y.id===f.id||!x.internals.positionAbsolute))return!1;const w=_i(_?y:x),S=aa(w,b);return p&&S>0||S>=w.width*w.height||S>=b.width*b.height}):[]},isNodeIntersecting:(f,p,m=!0)=>{const b=Q0(f)?f:c(f);if(!b)return!1;const _=aa(b,p);return m&&_>0||_>=p.width*p.height||_>=b.width*b.height},updateNode:u,updateNodeData:(f,p,m={replace:!1})=>{u(f,g=>{const b=typeof p=="function"?p(g):p;return m.replace?{...g,data:b}:{...g,data:{...g.data,...b}}},m)},updateEdge:d,updateEdgeData:(f,p,m={replace:!1})=>{d(f,g=>{const b=typeof p=="function"?p(g):p;return m.replace?{...g,data:b}:{...g,data:{...g.data,...b}}},m)},getNodesBounds:f=>{const{nodeLookup:p,nodeOrigin:m}=n.getState();return ZW(f,{nodeLookup:p,nodeOrigin:m})},getHandleConnections:({type:f,id:p,nodeId:m})=>{var g;return Array.from(((g=n.getState().connectionLookup.get(`${m}-${f}${p?`-${p}`:""}`))==null?void 0:g.values())??[])},getNodeConnections:({type:f,handleId:p,nodeId:m})=>{var g;return Array.from(((g=n.getState().connectionLookup.get(`${m}${f?p?`-${f}-${p}`:`-${f}`:""}`))==null?void 0:g.values())??[])},fitView:async f=>{const p=n.getState().fitViewResolver??iU();return n.setState({fitViewQueued:!0,fitViewOptions:f,fitViewResolver:p}),r.nodeQueue.push(m=>[...m]),p.promise}}},[]);return h.useMemo(()=>({...i,...e,viewportInitialized:o}),[o])}const Cx=e=>e.selected,LG=typeof window<"u"?window:void 0;function zG({deleteKeyCode:e,multiSelectionKeyCode:n}){const r=Me(),{deleteElements:o}=bg(),i=ca(e,{actInsideInputWithModifier:!1}),s=ca(n,{target:LG});h.useEffect(()=>{if(i){const{edges:a,nodes:l}=r.getState();o({nodes:l.filter(Cx),edges:a.filter(Cx)}),r.setState({nodesSelectionActive:!1})}},[i]),h.useEffect(()=>{r.setState({multiSelectionActive:s})},[s])}function FG(e){const n=Me();h.useEffect(()=>{const r=()=>{var i,s,a,l;if(!e.current||!(((s=(i=e.current).checkVisibility)==null?void 0:s.call(i))??!0))return!1;const o=mg(e.current);(o.height===0||o.width===0)&&((l=(a=n.getState()).onError)==null||l.call(a,"004",Cn.error004())),n.setState({width:o.width||500,height:o.height||500})};if(e.current){r(),window.addEventListener("resize",r);const o=new ResizeObserver(()=>r());return o.observe(e.current),()=>{window.removeEventListener("resize",r),o&&e.current&&o.unobserve(e.current)}}},[])}const lf={position:"absolute",width:"100%",height:"100%",top:0,left:0},VG=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function BG({onPaneContextMenu:e,zoomOnScroll:n=!0,zoomOnPinch:r=!0,panOnScroll:o=!1,panOnScrollSpeed:i=.5,panOnScrollMode:s=no.Free,zoomOnDoubleClick:a=!0,panOnDrag:l=!0,defaultViewport:c,translateExtent:u,minZoom:d,maxZoom:f,zoomActivationKeyCode:p,preventScrolling:m=!0,children:g,noWheelClassName:b,noPanClassName:_,onViewportChange:y,isControlledViewport:x,paneClickDistance:w,selectionOnDrag:S}){const C=Me(),E=h.useRef(null),{userSelectionActive:k,lib:N,connectionInProgress:j}=he(VG,Re),$=ca(p),I=h.useRef();FG(E);const O=h.useCallback(H=>{y==null||y({x:H[0],y:H[1],zoom:H[2]}),x||C.setState({transform:H})},[y,x]);return h.useEffect(()=>{if(E.current){I.current=BU({domNode:E.current,minZoom:d,maxZoom:f,translateExtent:u,viewport:c,onDraggingChange:D=>C.setState(z=>z.paneDragging===D?z:{paneDragging:D}),onPanZoomStart:(D,z)=>{const{onViewportChangeStart:A,onMoveStart:M}=C.getState();M==null||M(D,z),A==null||A(z)},onPanZoom:(D,z)=>{const{onViewportChange:A,onMove:M}=C.getState();M==null||M(D,z),A==null||A(z)},onPanZoomEnd:(D,z)=>{const{onViewportChangeEnd:A,onMoveEnd:M}=C.getState();M==null||M(D,z),A==null||A(z)}});const{x:H,y:R,zoom:L}=I.current.getViewport();return C.setState({panZoom:I.current,transform:[H,R,L],domNode:E.current.closest(".react-flow")}),()=>{var D;(D=I.current)==null||D.destroy()}}},[]),h.useEffect(()=>{var H;(H=I.current)==null||H.update({onPaneContextMenu:e,zoomOnScroll:n,zoomOnPinch:r,panOnScroll:o,panOnScrollSpeed:i,panOnScrollMode:s,zoomOnDoubleClick:a,panOnDrag:l,zoomActivationKeyPressed:$,preventScrolling:m,noPanClassName:_,userSelectionActive:k,noWheelClassName:b,lib:N,onTransformChange:O,connectionInProgress:j,selectionOnDrag:S,paneClickDistance:w})},[e,n,r,o,i,s,a,l,$,m,_,k,b,N,O,j,S,w]),v.jsx("div",{className:"react-flow__renderer",ref:E,style:lf,children:g})}const HG=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function WG(){const{userSelectionActive:e,userSelectionRect:n}=he(HG,Re);return e&&n?v.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:n.width,height:n.height,transform:`translate(${n.x}px, ${n.y}px)`}}):null}const md=(e,n)=>r=>{r.target===n.current&&(e==null||e(r))},UG=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function GG({isSelecting:e,selectionKeyPressed:n,selectionMode:r=sa.Full,panOnDrag:o,paneClickDistance:i,selectionOnDrag:s,onSelectionStart:a,onSelectionEnd:l,onPaneClick:c,onPaneContextMenu:u,onPaneScroll:d,onPaneMouseEnter:f,onPaneMouseMove:p,onPaneMouseLeave:m,children:g}){const b=Me(),{userSelectionActive:_,elementsSelectable:y,dragging:x,connectionInProgress:w}=he(UG,Re),S=y&&(e||_),C=h.useRef(null),E=h.useRef(),k=h.useRef(new Set),N=h.useRef(new Set),j=h.useRef(!1),$=A=>{if(j.current||w){j.current=!1;return}c==null||c(A),b.getState().resetSelectedElements(),b.setState({nodesSelectionActive:!1})},I=A=>{if(Array.isArray(o)&&(o!=null&&o.includes(2))){A.preventDefault();return}u==null||u(A)},O=d?A=>d(A):void 0,H=A=>{j.current&&(A.stopPropagation(),j.current=!1)},R=A=>{var B,G;const{domNode:M}=b.getState();if(E.current=M==null?void 0:M.getBoundingClientRect(),!E.current)return;const P=A.target===C.current;if(!P&&!!A.target.closest(".nokey")||!e||!(s&&P||n)||A.button!==0||!A.isPrimary)return;(G=(B=A.target)==null?void 0:B.setPointerCapture)==null||G.call(B,A.pointerId),j.current=!1;const{x:X,y:F}=tn(A.nativeEvent,E.current);b.setState({userSelectionRect:{width:0,height:0,startX:X,startY:F,x:X,y:F}}),P||(A.stopPropagation(),A.preventDefault())},L=A=>{const{userSelectionRect:M,transform:P,nodeLookup:W,edgeLookup:T,connectionLookup:X,triggerNodeChanges:F,triggerEdgeChanges:B,defaultEdgeOptions:G,resetSelectedElements:U}=b.getState();if(!E.current||!M)return;const{x:Y,y:K}=tn(A.nativeEvent,E.current),{startX:ee,startY:J}=M;if(!j.current){const fe=n?0:i;if(Math.hypot(Y-ee,K-J)<=fe)return;U(),a==null||a(A)}j.current=!0;const Q={startX:ee,startY:J,x:Y<ee?Y:ee,y:K<J?K:J,width:Math.abs(Y-ee),height:Math.abs(K-J)},ne=k.current,ce=N.current;k.current=new Set(pg(W,Q,P,r===sa.Partial,!0).map(fe=>fe.id)),N.current=new Set;const ge=(G==null?void 0:G.selectable)??!0;for(const fe of k.current){const $e=X.get(fe);if($e)for(const{edgeId:un}of $e.values()){const ut=T.get(un);ut&&(ut.selectable??ge)&&N.current.add(un)}}if(!J0(ne,k.current)){const fe=Xo(W,k.current,!0);F(fe)}if(!J0(ce,N.current)){const fe=Xo(T,N.current);B(fe)}b.setState({userSelectionRect:Q,userSelectionActive:!0,nodesSelectionActive:!1})},D=A=>{var M,P;A.button===0&&((P=(M=A.target)==null?void 0:M.releasePointerCapture)==null||P.call(M,A.pointerId),!_&&A.target===C.current&&b.getState().userSelectionRect&&($==null||$(A)),b.setState({userSelectionActive:!1,userSelectionRect:null}),j.current&&(l==null||l(A),b.setState({nodesSelectionActive:k.current.size>0})))},z=o===!0||Array.isArray(o)&&o.includes(0);return v.jsxs("div",{className:ze(["react-flow__pane",{draggable:z,dragging:x,selection:e}]),onClick:S?void 0:md($,C),onContextMenu:md(I,C),onWheel:md(O,C),onPointerEnter:S?void 0:f,onPointerMove:S?L:p,onPointerUp:S?D:void 0,onPointerDownCapture:S?R:void 0,onClickCapture:S?H:void 0,onPointerLeave:m,ref:C,style:lf,children:[g,v.jsx(WG,{})]})}function oh({id:e,store:n,unselect:r=!1,nodeRef:o}){const{addSelectedNodes:i,unselectNodesAndEdges:s,multiSelectionActive:a,nodeLookup:l,onError:c}=n.getState(),u=l.get(e);if(!u){c==null||c("012",Cn.error012(e));return}n.setState({nodesSelectionActive:!1}),u.selected?(r||u.selected&&a)&&(s({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var d;return(d=o==null?void 0:o.current)==null?void 0:d.blur()})):i([e])}function Fk({nodeRef:e,disabled:n=!1,noDragClassName:r,handleSelector:o,nodeId:i,isSelectable:s,nodeClickDistance:a}){const l=Me(),[c,u]=h.useState(!1),d=h.useRef();return h.useEffect(()=>{d.current=PU({getStoreItems:()=>l.getState(),onNodeMouseDown:f=>{oh({id:f,store:l,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),h.useEffect(()=>{if(!(n||!e.current||!d.current))return d.current.update({noDragClassName:r,handleSelector:o,domNode:e.current,isSelectable:s,nodeId:i,nodeClickDistance:a}),()=>{var f;(f=d.current)==null||f.destroy()}},[r,o,n,s,e,i,a]),c}const YG=e=>n=>n.selected&&(n.draggable||e&&typeof n.draggable>"u");function Vk(){const e=Me();return h.useCallback(r=>{const{nodeExtent:o,snapToGrid:i,snapGrid:s,nodesDraggable:a,onError:l,updateNodePositions:c,nodeLookup:u,nodeOrigin:d}=e.getState(),f=new Map,p=YG(a),m=i?s[0]:5,g=i?s[1]:5,b=r.direction.x*m*r.factor,_=r.direction.y*g*r.factor;for(const[,y]of u){if(!p(y))continue;let x={x:y.internals.positionAbsolute.x+b,y:y.internals.positionAbsolute.y+_};i&&(x=$a(x,s));const{position:w,positionAbsolute:S}=sk({nodeId:y.id,nextPosition:x,nodeLookup:u,nodeExtent:o,nodeOrigin:d,onError:l});y.position=w,y.internals.positionAbsolute=S,f.set(y.id,y)}c(f)},[])}const _g=h.createContext(null),XG=_g.Provider;_g.Consumer;const Bk=()=>h.useContext(_g),KG=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),qG=(e,n,r)=>o=>{const{connectionClickStartHandle:i,connectionMode:s,connection:a}=o,{fromHandle:l,toHandle:c,isValid:u}=a,d=(c==null?void 0:c.nodeId)===e&&(c==null?void 0:c.id)===n&&(c==null?void 0:c.type)===r;return{connectingFrom:(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.id)===n&&(l==null?void 0:l.type)===r,connectingTo:d,clickConnecting:(i==null?void 0:i.nodeId)===e&&(i==null?void 0:i.id)===n&&(i==null?void 0:i.type)===r,isPossibleEndHandle:s===wi.Strict?(l==null?void 0:l.type)!==r:e!==(l==null?void 0:l.nodeId)||n!==(l==null?void 0:l.id),connectionInProcess:!!l,clickConnectionInProcess:!!i,valid:d&&u}};function ZG({type:e="source",position:n=le.Top,isValidConnection:r,isConnectable:o=!0,isConnectableStart:i=!0,isConnectableEnd:s=!0,id:a,onConnect:l,children:c,className:u,onMouseDown:d,onTouchStart:f,...p},m){var L,D;const g=a||null,b=e==="target",_=Me(),y=Bk(),{connectOnClick:x,noPanClassName:w,rfId:S}=he(KG,Re),{connectingFrom:C,connectingTo:E,clickConnecting:k,isPossibleEndHandle:N,connectionInProcess:j,clickConnectionInProcess:$,valid:I}=he(qG(y,g,e),Re);y||(D=(L=_.getState()).onError)==null||D.call(L,"010",Cn.error010());const O=z=>{const{defaultEdgeOptions:A,onConnect:M,hasDefaultEdges:P}=_.getState(),W={...A,...z};if(P){const{edges:T,setEdges:X}=_.getState();X(dU(W,T))}M==null||M(W),l==null||l(W)},H=z=>{if(!y)return;const A=hk(z.nativeEvent);if(i&&(A&&z.button===0||!A)){const M=_.getState();nh.onPointerDown(z.nativeEvent,{handleDomNode:z.currentTarget,autoPanOnConnect:M.autoPanOnConnect,connectionMode:M.connectionMode,connectionRadius:M.connectionRadius,domNode:M.domNode,nodeLookup:M.nodeLookup,lib:M.lib,isTarget:b,handleId:g,nodeId:y,flowId:M.rfId,panBy:M.panBy,cancelConnection:M.cancelConnection,onConnectStart:M.onConnectStart,onConnectEnd:(...P)=>{var W,T;return(T=(W=_.getState()).onConnectEnd)==null?void 0:T.call(W,...P)},updateConnection:M.updateConnection,onConnect:O,isValidConnection:r||((...P)=>{var W,T;return((T=(W=_.getState()).isValidConnection)==null?void 0:T.call(W,...P))??!0}),getTransform:()=>_.getState().transform,getFromHandle:()=>_.getState().connection.fromHandle,autoPanSpeed:M.autoPanSpeed,dragThreshold:M.connectionDragThreshold})}A?d==null||d(z):f==null||f(z)},R=z=>{const{onClickConnectStart:A,onClickConnectEnd:M,connectionClickStartHandle:P,connectionMode:W,isValidConnection:T,lib:X,rfId:F,nodeLookup:B,connection:G}=_.getState();if(!y||!P&&!i)return;if(!P){A==null||A(z.nativeEvent,{nodeId:y,handleId:g,handleType:e}),_.setState({connectionClickStartHandle:{nodeId:y,type:e,id:g}});return}const U=dk(z.target),Y=r||T,{connection:K,isValid:ee}=nh.isValid(z.nativeEvent,{handle:{nodeId:y,id:g,type:e},connectionMode:W,fromNodeId:P.nodeId,fromHandleId:P.id||null,fromType:P.type,isValidConnection:Y,flowId:F,doc:U,lib:X,nodeLookup:B});ee&&K&&O(K);const J=structuredClone(G);delete J.inProgress,J.toPosition=J.toHandle?J.toHandle.position:null,M==null||M(z,J),_.setState({connectionClickStartHandle:null})};return v.jsx("div",{"data-handleid":g,"data-nodeid":y,"data-handlepos":n,"data-id":`${S}-${y}-${g}-${e}`,className:ze(["react-flow__handle",`react-flow__handle-${n}`,"nodrag",w,u,{source:!b,target:b,connectable:o,connectablestart:i,connectableend:s,clickconnecting:k,connectingfrom:C,connectingto:E,valid:I,connectionindicator:o&&(!j||N)&&(j||$?s:i)}]),onMouseDown:H,onTouchStart:H,onClick:x?R:void 0,ref:m,...p,children:c})}const eu=h.memo(Lk(ZG));function QG({data:e,isConnectable:n,sourcePosition:r=le.Bottom}){return v.jsxs(v.Fragment,{children:[e==null?void 0:e.label,v.jsx(eu,{type:"source",position:r,isConnectable:n})]})}function JG({data:e,isConnectable:n,targetPosition:r=le.Top,sourcePosition:o=le.Bottom}){return v.jsxs(v.Fragment,{children:[v.jsx(eu,{type:"target",position:r,isConnectable:n}),e==null?void 0:e.label,v.jsx(eu,{type:"source",position:o,isConnectable:n})]})}function eY(){return null}function tY({data:e,isConnectable:n,targetPosition:r=le.Top}){return v.jsxs(v.Fragment,{children:[v.jsx(eu,{type:"target",position:r,isConnectable:n}),e==null?void 0:e.label]})}const tu={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},Ex={input:QG,default:JG,output:tY,group:eY};function nY(e){var n,r,o,i;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((n=e.style)==null?void 0:n.width),height:e.height??e.initialHeight??((r=e.style)==null?void 0:r.height)}:{width:e.width??((o=e.style)==null?void 0:o.width),height:e.height??((i=e.style)==null?void 0:i.height)}}const rY=e=>{const{width:n,height:r,x:o,y:i}=Ia(e.nodeLookup,{filter:s=>!!s.selected});return{width:en(n)?n:null,height:en(r)?r:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${o}px,${i}px)`}};function oY({onSelectionContextMenu:e,noPanClassName:n,disableKeyboardA11y:r}){const o=Me(),{width:i,height:s,transformString:a,userSelectionActive:l}=he(rY,Re),c=Vk(),u=h.useRef(null);h.useEffect(()=>{var m;r||(m=u.current)==null||m.focus({preventScroll:!0})},[r]);const d=!l&&i!==null&&s!==null;if(Fk({nodeRef:u,disabled:!d}),!d)return null;const f=e?m=>{const g=o.getState().nodes.filter(b=>b.selected);e(m,g)}:void 0,p=m=>{Object.prototype.hasOwnProperty.call(tu,m.key)&&(m.preventDefault(),c({direction:tu[m.key],factor:m.shiftKey?4:1}))};return v.jsx("div",{className:ze(["react-flow__nodesselection","react-flow__container",n]),style:{transform:a},children:v.jsx("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:f,tabIndex:r?void 0:-1,onKeyDown:r?void 0:p,style:{width:i,height:s}})})}const kx=typeof window<"u"?window:void 0,iY=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function Hk({children:e,onPaneClick:n,onPaneMouseEnter:r,onPaneMouseMove:o,onPaneMouseLeave:i,onPaneContextMenu:s,onPaneScroll:a,paneClickDistance:l,deleteKeyCode:c,selectionKeyCode:u,selectionOnDrag:d,selectionMode:f,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:g,panActivationKeyCode:b,zoomActivationKeyCode:_,elementsSelectable:y,zoomOnScroll:x,zoomOnPinch:w,panOnScroll:S,panOnScrollSpeed:C,panOnScrollMode:E,zoomOnDoubleClick:k,panOnDrag:N,defaultViewport:j,translateExtent:$,minZoom:I,maxZoom:O,preventScrolling:H,onSelectionContextMenu:R,noWheelClassName:L,noPanClassName:D,disableKeyboardA11y:z,onViewportChange:A,isControlledViewport:M}){const{nodesSelectionActive:P,userSelectionActive:W}=he(iY,Re),T=ca(u,{target:kx}),X=ca(b,{target:kx}),F=X||N,B=X||S,G=d&&F!==!0,U=T||W||G;return zG({deleteKeyCode:c,multiSelectionKeyCode:g}),v.jsx(BG,{onPaneContextMenu:s,elementsSelectable:y,zoomOnScroll:x,zoomOnPinch:w,panOnScroll:B,panOnScrollSpeed:C,panOnScrollMode:E,zoomOnDoubleClick:k,panOnDrag:!T&&F,defaultViewport:j,translateExtent:$,minZoom:I,maxZoom:O,zoomActivationKeyCode:_,preventScrolling:H,noWheelClassName:L,noPanClassName:D,onViewportChange:A,isControlledViewport:M,paneClickDistance:l,selectionOnDrag:G,children:v.jsxs(GG,{onSelectionStart:p,onSelectionEnd:m,onPaneClick:n,onPaneMouseEnter:r,onPaneMouseMove:o,onPaneMouseLeave:i,onPaneContextMenu:s,onPaneScroll:a,panOnDrag:F,isSelecting:!!U,selectionMode:f,selectionKeyPressed:T,paneClickDistance:l,selectionOnDrag:G,children:[e,P&&v.jsx(oY,{onSelectionContextMenu:R,noPanClassName:D,disableKeyboardA11y:z})]})})}Hk.displayName="FlowRenderer";const sY=h.memo(Hk),aY=e=>n=>e?pg(n.nodeLookup,{x:0,y:0,width:n.width,height:n.height},n.transform,!0).map(r=>r.id):Array.from(n.nodeLookup.keys());function lY(e){return he(h.useCallback(aY(e),[e]),Re)}const cY=e=>e.updateNodeInternals;function uY(){const e=he(cY),[n]=h.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(r=>{const o=new Map;r.forEach(i=>{const s=i.target.getAttribute("data-id");o.set(s,{id:s,nodeElement:i.target,force:!0})}),e(o)}));return h.useEffect(()=>()=>{n==null||n.disconnect()},[n]),n}function fY({node:e,nodeType:n,hasDimensions:r,resizeObserver:o}){const i=Me(),s=h.useRef(null),a=h.useRef(null),l=h.useRef(e.sourcePosition),c=h.useRef(e.targetPosition),u=h.useRef(n),d=r&&!!e.internals.handleBounds;return h.useEffect(()=>{s.current&&!e.hidden&&(!d||a.current!==s.current)&&(a.current&&(o==null||o.unobserve(a.current)),o==null||o.observe(s.current),a.current=s.current)},[d,e.hidden]),h.useEffect(()=>()=>{a.current&&(o==null||o.unobserve(a.current),a.current=null)},[]),h.useEffect(()=>{if(s.current){const f=u.current!==n,p=l.current!==e.sourcePosition,m=c.current!==e.targetPosition;(f||p||m)&&(u.current=n,l.current=e.sourcePosition,c.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:s.current,force:!0}]])))}},[e.id,n,e.sourcePosition,e.targetPosition]),s}function dY({id:e,onClick:n,onMouseEnter:r,onMouseMove:o,onMouseLeave:i,onContextMenu:s,onDoubleClick:a,nodesDraggable:l,elementsSelectable:c,nodesConnectable:u,nodesFocusable:d,resizeObserver:f,noDragClassName:p,noPanClassName:m,disableKeyboardA11y:g,rfId:b,nodeTypes:_,nodeClickDistance:y,onError:x}){const{node:w,internals:S,isParent:C}=he(Y=>{const K=Y.nodeLookup.get(e),ee=Y.parentLookup.has(e);return{node:K,internals:K.internals,isParent:ee}},Re);let E=w.type||"default",k=(_==null?void 0:_[E])||Ex[E];k===void 0&&(x==null||x("003",Cn.error003(E)),E="default",k=(_==null?void 0:_.default)||Ex.default);const N=!!(w.draggable||l&&typeof w.draggable>"u"),j=!!(w.selectable||c&&typeof w.selectable>"u"),$=!!(w.connectable||u&&typeof w.connectable>"u"),I=!!(w.focusable||d&&typeof w.focusable>"u"),O=Me(),H=uk(w),R=fY({node:w,nodeType:E,hasDimensions:H,resizeObserver:f}),L=Fk({nodeRef:R,disabled:w.hidden||!N,noDragClassName:p,handleSelector:w.dragHandle,nodeId:e,isSelectable:j,nodeClickDistance:y}),D=Vk();if(w.hidden)return null;const z=Zn(w),A=nY(w),M=j||N||n||r||o||i,P=r?Y=>r(Y,{...S.userNode}):void 0,W=o?Y=>o(Y,{...S.userNode}):void 0,T=i?Y=>i(Y,{...S.userNode}):void 0,X=s?Y=>s(Y,{...S.userNode}):void 0,F=a?Y=>a(Y,{...S.userNode}):void 0,B=Y=>{const{selectNodesOnDrag:K,nodeDragThreshold:ee}=O.getState();j&&(!K||!N||ee>0)&&oh({id:e,store:O,nodeRef:R}),n&&n(Y,{...S.userNode})},G=Y=>{if(!(pk(Y.nativeEvent)||g)){if(tk.includes(Y.key)&&j){const K=Y.key==="Escape";oh({id:e,store:O,unselect:K,nodeRef:R})}else if(N&&w.selected&&Object.prototype.hasOwnProperty.call(tu,Y.key)){Y.preventDefault();const{ariaLabelConfig:K}=O.getState();O.setState({ariaLiveMessage:K["node.a11yDescription.ariaLiveMessage"]({direction:Y.key.replace("Arrow","").toLowerCase(),x:~~S.positionAbsolute.x,y:~~S.positionAbsolute.y})}),D({direction:tu[Y.key],factor:Y.shiftKey?4:1})}}},U=()=>{var ce;if(g||!((ce=R.current)!=null&&ce.matches(":focus-visible")))return;const{transform:Y,width:K,height:ee,autoPanOnNodeFocus:J,setCenter:Q}=O.getState();if(!J)return;pg(new Map([[e,w]]),{x:0,y:0,width:K,height:ee},Y,!0).length>0||Q(w.position.x+z.width/2,w.position.y+z.height/2,{zoom:Y[2]})};return v.jsx("div",{className:ze(["react-flow__node",`react-flow__node-${E}`,{[m]:N},w.className,{selected:w.selected,selectable:j,parent:C,draggable:N,dragging:L}]),ref:R,style:{zIndex:S.z,transform:`translate(${S.positionAbsolute.x}px,${S.positionAbsolute.y}px)`,pointerEvents:M?"all":"none",visibility:H?"visible":"hidden",...w.style,...A},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:P,onMouseMove:W,onMouseLeave:T,onContextMenu:X,onClick:B,onDoubleClick:F,onKeyDown:I?G:void 0,tabIndex:I?0:void 0,onFocus:I?U:void 0,role:w.ariaRole??(I?"group":void 0),"aria-roledescription":"node","aria-describedby":g?void 0:`${Ik}-${b}`,"aria-label":w.ariaLabel,...w.domAttributes,children:v.jsx(XG,{value:e,children:v.jsx(k,{id:e,data:w.data,type:E,positionAbsoluteX:S.positionAbsolute.x,positionAbsoluteY:S.positionAbsolute.y,selected:w.selected??!1,selectable:j,draggable:N,deletable:w.deletable??!0,isConnectable:$,sourcePosition:w.sourcePosition,targetPosition:w.targetPosition,dragging:L,dragHandle:w.dragHandle,zIndex:S.z,parentId:w.parentId,...z})})})}var pY=h.memo(dY);const hY=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function Wk(e){const{nodesDraggable:n,nodesConnectable:r,nodesFocusable:o,elementsSelectable:i,onError:s}=he(hY,Re),a=lY(e.onlyRenderVisibleElements),l=uY();return v.jsx("div",{className:"react-flow__nodes",style:lf,children:a.map(c=>v.jsx(pY,{id:c,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:l,nodesDraggable:n,nodesConnectable:r,nodesFocusable:o,elementsSelectable:i,nodeClickDistance:e.nodeClickDistance,onError:s},c))})}Wk.displayName="NodeRenderer";const mY=h.memo(Wk);function gY(e){return he(h.useCallback(r=>{if(!e)return r.edges.map(i=>i.id);const o=[];if(r.width&&r.height)for(const i of r.edges){const s=r.nodeLookup.get(i.source),a=r.nodeLookup.get(i.target);s&&a&&cU({sourceNode:s,targetNode:a,width:r.width,height:r.height,transform:r.transform})&&o.push(i.id)}return o},[e]),Re)}const yY=({color:e="none",strokeWidth:n=1})=>{const r={strokeWidth:n,...e&&{stroke:e}};return v.jsx("polyline",{className:"arrow",style:r,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},vY=({color:e="none",strokeWidth:n=1})=>{const r={strokeWidth:n,...e&&{stroke:e,fill:e}};return v.jsx("polyline",{className:"arrowclosed",style:r,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},Nx={[Zc.Arrow]:yY,[Zc.ArrowClosed]:vY};function xY(e){const n=Me();return h.useMemo(()=>{var i,s;return Object.prototype.hasOwnProperty.call(Nx,e)?Nx[e]:((s=(i=n.getState()).onError)==null||s.call(i,"009",Cn.error009(e)),null)},[e])}const wY=({id:e,type:n,color:r,width:o=12.5,height:i=12.5,markerUnits:s="strokeWidth",strokeWidth:a,orient:l="auto-start-reverse"})=>{const c=xY(n);return c?v.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${o}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:s,orient:l,refX:"0",refY:"0",children:v.jsx(c,{color:r,strokeWidth:a})}):null},Uk=({defaultColor:e,rfId:n})=>{const r=he(s=>s.edges),o=he(s=>s.defaultEdgeOptions),i=h.useMemo(()=>yU(r,{id:n,defaultColor:e,defaultMarkerStart:o==null?void 0:o.markerStart,defaultMarkerEnd:o==null?void 0:o.markerEnd}),[r,o,n,e]);return i.length?v.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:v.jsx("defs",{children:i.map(s=>v.jsx(wY,{id:s.id,type:s.type,color:s.color,width:s.width,height:s.height,markerUnits:s.markerUnits,strokeWidth:s.strokeWidth,orient:s.orient},s.id))})}):null};Uk.displayName="MarkerDefinitions";var bY=h.memo(Uk);function Gk({x:e,y:n,label:r,labelStyle:o,labelShowBg:i=!0,labelBgStyle:s,labelBgPadding:a=[2,4],labelBgBorderRadius:l=2,children:c,className:u,...d}){const[f,p]=h.useState({x:1,y:0,width:0,height:0}),m=ze(["react-flow__edge-textwrapper",u]),g=h.useRef(null);return h.useEffect(()=>{if(g.current){const b=g.current.getBBox();p({x:b.x,y:b.y,width:b.width,height:b.height})}},[r]),r?v.jsxs("g",{transform:`translate(${e-f.width/2} ${n-f.height/2})`,className:m,visibility:f.width?"visible":"hidden",...d,children:[i&&v.jsx("rect",{width:f.width+2*a[0],x:-a[0],y:-a[1],height:f.height+2*a[1],className:"react-flow__edge-textbg",style:s,rx:l,ry:l}),v.jsx("text",{className:"react-flow__edge-text",y:f.height/2,dy:"0.3em",ref:g,style:o,children:r}),c]}):null}Gk.displayName="EdgeText";const _Y=h.memo(Gk);function cf({path:e,labelX:n,labelY:r,label:o,labelStyle:i,labelShowBg:s,labelBgStyle:a,labelBgPadding:l,labelBgBorderRadius:c,interactionWidth:u=20,...d}){return v.jsxs(v.Fragment,{children:[v.jsx("path",{...d,d:e,fill:"none",className:ze(["react-flow__edge-path",d.className])}),u?v.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,o&&en(n)&&en(r)?v.jsx(_Y,{x:n,y:r,label:o,labelStyle:i,labelShowBg:s,labelBgStyle:a,labelBgPadding:l,labelBgBorderRadius:c}):null]})}function Px({pos:e,x1:n,y1:r,x2:o,y2:i}){return e===le.Left||e===le.Right?[.5*(n+o),r]:[n,.5*(r+i)]}function Yk({sourceX:e,sourceY:n,sourcePosition:r=le.Bottom,targetX:o,targetY:i,targetPosition:s=le.Top}){const[a,l]=Px({pos:r,x1:e,y1:n,x2:o,y2:i}),[c,u]=Px({pos:s,x1:o,y1:i,x2:e,y2:n}),[d,f,p,m]=mk({sourceX:e,sourceY:n,targetX:o,targetY:i,sourceControlX:a,sourceControlY:l,targetControlX:c,targetControlY:u});return[`M${e},${n} C${a},${l} ${c},${u} ${o},${i}`,d,f,p,m]}function Xk(e){return h.memo(({id:n,sourceX:r,sourceY:o,targetX:i,targetY:s,sourcePosition:a,targetPosition:l,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:g,markerEnd:b,markerStart:_,interactionWidth:y})=>{const[x,w,S]=Yk({sourceX:r,sourceY:o,sourcePosition:a,targetX:i,targetY:s,targetPosition:l}),C=e.isInternal?void 0:n;return v.jsx(cf,{id:C,path:x,labelX:w,labelY:S,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:g,markerEnd:b,markerStart:_,interactionWidth:y})})}const SY=Xk({isInternal:!1}),Kk=Xk({isInternal:!0});SY.displayName="SimpleBezierEdge";Kk.displayName="SimpleBezierEdgeInternal";function qk(e){return h.memo(({id:n,sourceX:r,sourceY:o,targetX:i,targetY:s,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,sourcePosition:m=le.Bottom,targetPosition:g=le.Top,markerEnd:b,markerStart:_,pathOptions:y,interactionWidth:x})=>{const[w,S,C]=Jp({sourceX:r,sourceY:o,sourcePosition:m,targetX:i,targetY:s,targetPosition:g,borderRadius:y==null?void 0:y.borderRadius,offset:y==null?void 0:y.offset,stepPosition:y==null?void 0:y.stepPosition}),E=e.isInternal?void 0:n;return v.jsx(cf,{id:E,path:w,labelX:S,labelY:C,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:b,markerStart:_,interactionWidth:x})})}const Zk=qk({isInternal:!1}),Qk=qk({isInternal:!0});Zk.displayName="SmoothStepEdge";Qk.displayName="SmoothStepEdgeInternal";function Jk(e){return h.memo(({id:n,...r})=>{var i;const o=e.isInternal?void 0:n;return v.jsx(Zk,{...r,id:o,pathOptions:h.useMemo(()=>{var s;return{borderRadius:0,offset:(s=r.pathOptions)==null?void 0:s.offset}},[(i=r.pathOptions)==null?void 0:i.offset])})})}const CY=Jk({isInternal:!1}),eN=Jk({isInternal:!0});CY.displayName="StepEdge";eN.displayName="StepEdgeInternal";function tN(e){return h.memo(({id:n,sourceX:r,sourceY:o,targetX:i,targetY:s,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:m,markerStart:g,interactionWidth:b})=>{const[_,y,x]=vk({sourceX:r,sourceY:o,targetX:i,targetY:s}),w=e.isInternal?void 0:n;return v.jsx(cf,{id:w,path:_,labelX:y,labelY:x,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:m,markerStart:g,interactionWidth:b})})}const EY=tN({isInternal:!1}),nN=tN({isInternal:!0});EY.displayName="StraightEdge";nN.displayName="StraightEdgeInternal";function rN(e){return h.memo(({id:n,sourceX:r,sourceY:o,targetX:i,targetY:s,sourcePosition:a=le.Bottom,targetPosition:l=le.Top,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:g,markerEnd:b,markerStart:_,pathOptions:y,interactionWidth:x})=>{const[w,S,C]=gk({sourceX:r,sourceY:o,sourcePosition:a,targetX:i,targetY:s,targetPosition:l,curvature:y==null?void 0:y.curvature}),E=e.isInternal?void 0:n;return v.jsx(cf,{id:E,path:w,labelX:S,labelY:C,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:g,markerEnd:b,markerStart:_,interactionWidth:x})})}const kY=rN({isInternal:!1}),oN=rN({isInternal:!0});kY.displayName="BezierEdge";oN.displayName="BezierEdgeInternal";const Rx={default:oN,straight:nN,step:eN,smoothstep:Qk,simplebezier:Kk},Mx={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},NY=(e,n,r)=>r===le.Left?e-n:r===le.Right?e+n:e,PY=(e,n,r)=>r===le.Top?e-n:r===le.Bottom?e+n:e,jx="react-flow__edgeupdater";function Ax({position:e,centerX:n,centerY:r,radius:o=10,onMouseDown:i,onMouseEnter:s,onMouseOut:a,type:l}){return v.jsx("circle",{onMouseDown:i,onMouseEnter:s,onMouseOut:a,className:ze([jx,`${jx}-${l}`]),cx:NY(n,o,e),cy:PY(r,o,e),r:o,stroke:"transparent",fill:"transparent"})}function RY({isReconnectable:e,reconnectRadius:n,edge:r,sourceX:o,sourceY:i,targetX:s,targetY:a,sourcePosition:l,targetPosition:c,onReconnect:u,onReconnectStart:d,onReconnectEnd:f,setReconnecting:p,setUpdateHover:m}){const g=Me(),b=(S,C)=>{if(S.button!==0)return;const{autoPanOnConnect:E,domNode:k,connectionMode:N,connectionRadius:j,lib:$,onConnectStart:I,cancelConnection:O,nodeLookup:H,rfId:R,panBy:L,updateConnection:D}=g.getState(),z=C.type==="target",A=(W,T)=>{p(!1),f==null||f(W,r,C.type,T)},M=W=>u==null?void 0:u(r,W),P=(W,T)=>{p(!0),d==null||d(S,r,C.type),I==null||I(W,T)};nh.onPointerDown(S.nativeEvent,{autoPanOnConnect:E,connectionMode:N,connectionRadius:j,domNode:k,handleId:C.id,nodeId:C.nodeId,nodeLookup:H,isTarget:z,edgeUpdaterType:C.type,lib:$,flowId:R,cancelConnection:O,panBy:L,isValidConnection:(...W)=>{var T,X;return((X=(T=g.getState()).isValidConnection)==null?void 0:X.call(T,...W))??!0},onConnect:M,onConnectStart:P,onConnectEnd:(...W)=>{var T,X;return(X=(T=g.getState()).onConnectEnd)==null?void 0:X.call(T,...W)},onReconnectEnd:A,updateConnection:D,getTransform:()=>g.getState().transform,getFromHandle:()=>g.getState().connection.fromHandle,dragThreshold:g.getState().connectionDragThreshold,handleDomNode:S.currentTarget})},_=S=>b(S,{nodeId:r.target,id:r.targetHandle??null,type:"target"}),y=S=>b(S,{nodeId:r.source,id:r.sourceHandle??null,type:"source"}),x=()=>m(!0),w=()=>m(!1);return v.jsxs(v.Fragment,{children:[(e===!0||e==="source")&&v.jsx(Ax,{position:l,centerX:o,centerY:i,radius:n,onMouseDown:_,onMouseEnter:x,onMouseOut:w,type:"source"}),(e===!0||e==="target")&&v.jsx(Ax,{position:c,centerX:s,centerY:a,radius:n,onMouseDown:y,onMouseEnter:x,onMouseOut:w,type:"target"})]})}function MY({id:e,edgesFocusable:n,edgesReconnectable:r,elementsSelectable:o,onClick:i,onDoubleClick:s,onContextMenu:a,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,reconnectRadius:d,onReconnect:f,onReconnectStart:p,onReconnectEnd:m,rfId:g,edgeTypes:b,noPanClassName:_,onError:y,disableKeyboardA11y:x}){let w=he(Q=>Q.edgeLookup.get(e));const S=he(Q=>Q.defaultEdgeOptions);w=S?{...S,...w}:w;let C=w.type||"default",E=(b==null?void 0:b[C])||Rx[C];E===void 0&&(y==null||y("011",Cn.error011(C)),C="default",E=(b==null?void 0:b.default)||Rx.default);const k=!!(w.focusable||n&&typeof w.focusable>"u"),N=typeof f<"u"&&(w.reconnectable||r&&typeof w.reconnectable>"u"),j=!!(w.selectable||o&&typeof w.selectable>"u"),$=h.useRef(null),[I,O]=h.useState(!1),[H,R]=h.useState(!1),L=Me(),{zIndex:D,sourceX:z,sourceY:A,targetX:M,targetY:P,sourcePosition:W,targetPosition:T}=he(h.useCallback(Q=>{const ne=Q.nodeLookup.get(w.source),ce=Q.nodeLookup.get(w.target);if(!ne||!ce)return{zIndex:w.zIndex,...Mx};const ge=gU({id:e,sourceNode:ne,targetNode:ce,sourceHandle:w.sourceHandle||null,targetHandle:w.targetHandle||null,connectionMode:Q.connectionMode,onError:y});return{zIndex:lU({selected:w.selected,zIndex:w.zIndex,sourceNode:ne,targetNode:ce,elevateOnSelect:Q.elevateEdgesOnSelect,zIndexMode:Q.zIndexMode}),...ge||Mx}},[w.source,w.target,w.sourceHandle,w.targetHandle,w.selected,w.zIndex]),Re),X=h.useMemo(()=>w.markerStart?`url('#${eh(w.markerStart,g)}')`:void 0,[w.markerStart,g]),F=h.useMemo(()=>w.markerEnd?`url('#${eh(w.markerEnd,g)}')`:void 0,[w.markerEnd,g]);if(w.hidden||z===null||A===null||M===null||P===null)return null;const B=Q=>{var fe;const{addSelectedEdges:ne,unselectNodesAndEdges:ce,multiSelectionActive:ge}=L.getState();j&&(L.setState({nodesSelectionActive:!1}),w.selected&&ge?(ce({nodes:[],edges:[w]}),(fe=$.current)==null||fe.blur()):ne([e])),i&&i(Q,w)},G=s?Q=>{s(Q,{...w})}:void 0,U=a?Q=>{a(Q,{...w})}:void 0,Y=l?Q=>{l(Q,{...w})}:void 0,K=c?Q=>{c(Q,{...w})}:void 0,ee=u?Q=>{u(Q,{...w})}:void 0,J=Q=>{var ne;if(!x&&tk.includes(Q.key)&&j){const{unselectNodesAndEdges:ce,addSelectedEdges:ge}=L.getState();Q.key==="Escape"?((ne=$.current)==null||ne.blur(),ce({edges:[w]})):ge([e])}};return v.jsx("svg",{style:{zIndex:D},children:v.jsxs("g",{className:ze(["react-flow__edge",`react-flow__edge-${C}`,w.className,_,{selected:w.selected,animated:w.animated,inactive:!j&&!i,updating:I,selectable:j}]),onClick:B,onDoubleClick:G,onContextMenu:U,onMouseEnter:Y,onMouseMove:K,onMouseLeave:ee,onKeyDown:k?J:void 0,tabIndex:k?0:void 0,role:w.ariaRole??(k?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":w.ariaLabel===null?void 0:w.ariaLabel||`Edge from ${w.source} to ${w.target}`,"aria-describedby":k?`${$k}-${g}`:void 0,ref:$,...w.domAttributes,children:[!H&&v.jsx(E,{id:e,source:w.source,target:w.target,type:w.type,selected:w.selected,animated:w.animated,selectable:j,deletable:w.deletable??!0,label:w.label,labelStyle:w.labelStyle,labelShowBg:w.labelShowBg,labelBgStyle:w.labelBgStyle,labelBgPadding:w.labelBgPadding,labelBgBorderRadius:w.labelBgBorderRadius,sourceX:z,sourceY:A,targetX:M,targetY:P,sourcePosition:W,targetPosition:T,data:w.data,style:w.style,sourceHandleId:w.sourceHandle,targetHandleId:w.targetHandle,markerStart:X,markerEnd:F,pathOptions:"pathOptions"in w?w.pathOptions:void 0,interactionWidth:w.interactionWidth}),N&&v.jsx(RY,{edge:w,isReconnectable:N,reconnectRadius:d,onReconnect:f,onReconnectStart:p,onReconnectEnd:m,sourceX:z,sourceY:A,targetX:M,targetY:P,sourcePosition:W,targetPosition:T,setUpdateHover:O,setReconnecting:R})]})})}var jY=h.memo(MY);const AY=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function iN({defaultMarkerColor:e,onlyRenderVisibleElements:n,rfId:r,edgeTypes:o,noPanClassName:i,onReconnect:s,onEdgeContextMenu:a,onEdgeMouseEnter:l,onEdgeMouseMove:c,onEdgeMouseLeave:u,onEdgeClick:d,reconnectRadius:f,onEdgeDoubleClick:p,onReconnectStart:m,onReconnectEnd:g,disableKeyboardA11y:b}){const{edgesFocusable:_,edgesReconnectable:y,elementsSelectable:x,onError:w}=he(AY,Re),S=gY(n);return v.jsxs("div",{className:"react-flow__edges",children:[v.jsx(bY,{defaultColor:e,rfId:r}),S.map(C=>v.jsx(jY,{id:C,edgesFocusable:_,edgesReconnectable:y,elementsSelectable:x,noPanClassName:i,onReconnect:s,onContextMenu:a,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,onClick:d,reconnectRadius:f,onDoubleClick:p,onReconnectStart:m,onReconnectEnd:g,rfId:r,onError:w,edgeTypes:o,disableKeyboardA11y:b},C))]})}iN.displayName="EdgeRenderer";const TY=h.memo(iN),IY=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function $Y({children:e}){const n=he(IY);return v.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:n},children:e})}function OY(e){const n=bg(),r=h.useRef(!1);h.useEffect(()=>{!r.current&&n.viewportInitialized&&e&&(setTimeout(()=>e(n),1),r.current=!0)},[e,n.viewportInitialized])}const DY=e=>{var n;return(n=e.panZoom)==null?void 0:n.syncViewport};function LY(e){const n=he(DY),r=Me();return h.useEffect(()=>{e&&(n==null||n(e),r.setState({transform:[e.x,e.y,e.zoom]}))},[e,n]),null}function zY(e){return e.connection.inProgress?{...e.connection,to:Oa(e.connection.to,e.transform)}:{...e.connection}}function FY(e){return zY}function VY(e){const n=FY();return he(n,Re)}const BY=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function HY({containerStyle:e,style:n,type:r,component:o}){const{nodesConnectable:i,width:s,height:a,isValid:l,inProgress:c}=he(BY,Re);return!(s&&i&&c)?null:v.jsx("svg",{style:e,width:s,height:a,className:"react-flow__connectionline react-flow__container",children:v.jsx("g",{className:ze(["react-flow__connection",ok(l)]),children:v.jsx(sN,{style:n,type:r,CustomComponent:o,isValid:l})})})}const sN=({style:e,type:n=fr.Bezier,CustomComponent:r,isValid:o})=>{const{inProgress:i,from:s,fromNode:a,fromHandle:l,fromPosition:c,to:u,toNode:d,toHandle:f,toPosition:p,pointer:m}=VY();if(!i)return;if(r)return v.jsx(r,{connectionLineType:n,connectionLineStyle:e,fromNode:a,fromHandle:l,fromX:s.x,fromY:s.y,toX:u.x,toY:u.y,fromPosition:c,toPosition:p,connectionStatus:ok(o),toNode:d,toHandle:f,pointer:m});let g="";const b={sourceX:s.x,sourceY:s.y,sourcePosition:c,targetX:u.x,targetY:u.y,targetPosition:p};switch(n){case fr.Bezier:[g]=gk(b);break;case fr.SimpleBezier:[g]=Yk(b);break;case fr.Step:[g]=Jp({...b,borderRadius:0});break;case fr.SmoothStep:[g]=Jp(b);break;default:[g]=vk(b)}return v.jsx("path",{d:g,fill:"none",className:"react-flow__connection-path",style:e})};sN.displayName="ConnectionLine";const WY={};function Tx(e=WY){h.useRef(e),Me(),h.useEffect(()=>{},[e])}function UY(){Me(),h.useRef(!1),h.useEffect(()=>{},[])}function aN({nodeTypes:e,edgeTypes:n,onInit:r,onNodeClick:o,onEdgeClick:i,onNodeDoubleClick:s,onEdgeDoubleClick:a,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:d,onSelectionContextMenu:f,onSelectionStart:p,onSelectionEnd:m,connectionLineType:g,connectionLineStyle:b,connectionLineComponent:_,connectionLineContainerStyle:y,selectionKeyCode:x,selectionOnDrag:w,selectionMode:S,multiSelectionKeyCode:C,panActivationKeyCode:E,zoomActivationKeyCode:k,deleteKeyCode:N,onlyRenderVisibleElements:j,elementsSelectable:$,defaultViewport:I,translateExtent:O,minZoom:H,maxZoom:R,preventScrolling:L,defaultMarkerColor:D,zoomOnScroll:z,zoomOnPinch:A,panOnScroll:M,panOnScrollSpeed:P,panOnScrollMode:W,zoomOnDoubleClick:T,panOnDrag:X,onPaneClick:F,onPaneMouseEnter:B,onPaneMouseMove:G,onPaneMouseLeave:U,onPaneScroll:Y,onPaneContextMenu:K,paneClickDistance:ee,nodeClickDistance:J,onEdgeContextMenu:Q,onEdgeMouseEnter:ne,onEdgeMouseMove:ce,onEdgeMouseLeave:ge,reconnectRadius:fe,onReconnect:$e,onReconnectStart:un,onReconnectEnd:ut,noDragClassName:Fr,noWheelClassName:Oi,noPanClassName:Di,disableKeyboardA11y:Li,nodeExtent:uf,rfId:Da,viewport:So,onViewportChange:zi}){return Tx(e),Tx(n),UY(),OY(r),LY(So),v.jsx(sY,{onPaneClick:F,onPaneMouseEnter:B,onPaneMouseMove:G,onPaneMouseLeave:U,onPaneContextMenu:K,onPaneScroll:Y,paneClickDistance:ee,deleteKeyCode:N,selectionKeyCode:x,selectionOnDrag:w,selectionMode:S,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:C,panActivationKeyCode:E,zoomActivationKeyCode:k,elementsSelectable:$,zoomOnScroll:z,zoomOnPinch:A,zoomOnDoubleClick:T,panOnScroll:M,panOnScrollSpeed:P,panOnScrollMode:W,panOnDrag:X,defaultViewport:I,translateExtent:O,minZoom:H,maxZoom:R,onSelectionContextMenu:f,preventScrolling:L,noDragClassName:Fr,noWheelClassName:Oi,noPanClassName:Di,disableKeyboardA11y:Li,onViewportChange:zi,isControlledViewport:!!So,children:v.jsxs($Y,{children:[v.jsx(TY,{edgeTypes:n,onEdgeClick:i,onEdgeDoubleClick:a,onReconnect:$e,onReconnectStart:un,onReconnectEnd:ut,onlyRenderVisibleElements:j,onEdgeContextMenu:Q,onEdgeMouseEnter:ne,onEdgeMouseMove:ce,onEdgeMouseLeave:ge,reconnectRadius:fe,defaultMarkerColor:D,noPanClassName:Di,disableKeyboardA11y:Li,rfId:Da}),v.jsx(HY,{style:b,type:g,component:_,containerStyle:y}),v.jsx("div",{className:"react-flow__edgelabel-renderer"}),v.jsx(mY,{nodeTypes:e,onNodeClick:o,onNodeDoubleClick:s,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:d,nodeClickDistance:J,onlyRenderVisibleElements:j,noPanClassName:Di,noDragClassName:Fr,disableKeyboardA11y:Li,nodeExtent:uf,rfId:Da}),v.jsx("div",{className:"react-flow__viewport-portal"})]})})}aN.displayName="GraphView";const GY=h.memo(aN),Ix=({nodes:e,edges:n,defaultNodes:r,defaultEdges:o,width:i,height:s,fitView:a,fitViewOptions:l,minZoom:c=.5,maxZoom:u=2,nodeOrigin:d,nodeExtent:f,zIndexMode:p="basic"}={})=>{const m=new Map,g=new Map,b=new Map,_=new Map,y=o??n??[],x=r??e??[],w=d??[0,0],S=f??ia;bk(b,_,y);const{nodesInitialized:C}=th(x,m,g,{nodeOrigin:w,nodeExtent:S,zIndexMode:p});let E=[0,0,1];if(a&&i&&s){const k=Ia(m,{filter:I=>!!((I.width||I.initialWidth)&&(I.height||I.initialHeight))}),{x:N,y:j,zoom:$}=hg(k,i,s,c,u,(l==null?void 0:l.padding)??.1);E=[N,j,$]}return{rfId:"1",width:i??0,height:s??0,transform:E,nodes:x,nodesInitialized:C,nodeLookup:m,parentLookup:g,edges:y,edgeLookup:_,connectionLookup:b,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:r!==void 0,hasDefaultEdges:o!==void 0,panZoom:null,minZoom:c,maxZoom:u,translateExtent:ia,nodeExtent:S,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:wi.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:w,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:a??!1,fitViewOptions:l,fitViewResolver:null,connection:{...rk},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:nU,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:nk,zIndexMode:p,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},YY=({nodes:e,edges:n,defaultNodes:r,defaultEdges:o,width:i,height:s,fitView:a,fitViewOptions:l,minZoom:c,maxZoom:u,nodeOrigin:d,nodeExtent:f,zIndexMode:p})=>uG((m,g)=>{async function b(){const{nodeLookup:_,panZoom:y,fitViewOptions:x,fitViewResolver:w,width:S,height:C,minZoom:E,maxZoom:k}=g();y&&(await eU({nodes:_,width:S,height:C,panZoom:y,minZoom:E,maxZoom:k},x),w==null||w.resolve(!0),m({fitViewResolver:null}))}return{...Ix({nodes:e,edges:n,width:i,height:s,fitView:a,fitViewOptions:l,minZoom:c,maxZoom:u,nodeOrigin:d,nodeExtent:f,defaultNodes:r,defaultEdges:o,zIndexMode:p}),setNodes:_=>{const{nodeLookup:y,parentLookup:x,nodeOrigin:w,elevateNodesOnSelect:S,fitViewQueued:C,zIndexMode:E,nodesSelectionActive:k}=g(),{nodesInitialized:N,hasSelectedNodes:j}=th(_,y,x,{nodeOrigin:w,nodeExtent:f,elevateNodesOnSelect:S,checkEquality:!0,zIndexMode:E}),$=k&&j;C&&N?(b(),m({nodes:_,nodesInitialized:N,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:$})):m({nodes:_,nodesInitialized:N,nodesSelectionActive:$})},setEdges:_=>{const{connectionLookup:y,edgeLookup:x}=g();bk(y,x,_),m({edges:_})},setDefaultNodesAndEdges:(_,y)=>{if(_){const{setNodes:x}=g();x(_),m({hasDefaultNodes:!0})}if(y){const{setEdges:x}=g();x(y),m({hasDefaultEdges:!0})}},updateNodeInternals:_=>{const{triggerNodeChanges:y,nodeLookup:x,parentLookup:w,domNode:S,nodeOrigin:C,nodeExtent:E,debug:k,fitViewQueued:N,zIndexMode:j}=g(),{changes:$,updatedInternals:I}=CU(_,x,w,S,C,E,j);I&&(wU(x,w,{nodeOrigin:C,nodeExtent:E,zIndexMode:j}),N?(b(),m({fitViewQueued:!1,fitViewOptions:void 0})):m({}),($==null?void 0:$.length)>0&&(k&&console.log("React Flow: trigger node changes",$),y==null||y($)))},updateNodePositions:(_,y=!1)=>{const x=[];let w=[];const{nodeLookup:S,triggerNodeChanges:C,connection:E,updateConnection:k,onNodesChangeMiddlewareMap:N}=g();for(const[j,$]of _){const I=S.get(j),O=!!(I!=null&&I.expandParent&&(I!=null&&I.parentId)&&($!=null&&$.position)),H={id:j,type:"position",position:O?{x:Math.max(0,$.position.x),y:Math.max(0,$.position.y)}:$.position,dragging:y};if(I&&E.inProgress&&E.fromNode.id===I.id){const R=go(I,E.fromHandle,le.Left,!0);k({...E,from:R})}O&&I.parentId&&x.push({id:j,parentId:I.parentId,rect:{...$.internals.positionAbsolute,width:$.measured.width??0,height:$.measured.height??0}}),w.push(H)}if(x.length>0){const{parentLookup:j,nodeOrigin:$}=g(),I=wg(x,S,j,$);w.push(...I)}for(const j of N.values())w=j(w);C(w)},triggerNodeChanges:_=>{const{onNodesChange:y,setNodes:x,nodes:w,hasDefaultNodes:S,debug:C}=g();if(_!=null&&_.length){if(S){const E=jG(_,w);x(E)}C&&console.log("React Flow: trigger node changes",_),y==null||y(_)}},triggerEdgeChanges:_=>{const{onEdgesChange:y,setEdges:x,edges:w,hasDefaultEdges:S,debug:C}=g();if(_!=null&&_.length){if(S){const E=AG(_,w);x(E)}C&&console.log("React Flow: trigger edge changes",_),y==null||y(_)}},addSelectedNodes:_=>{const{multiSelectionActive:y,edgeLookup:x,nodeLookup:w,triggerNodeChanges:S,triggerEdgeChanges:C}=g();if(y){const E=_.map(k=>Yr(k,!0));S(E);return}S(Xo(w,new Set([..._]),!0)),C(Xo(x))},addSelectedEdges:_=>{const{multiSelectionActive:y,edgeLookup:x,nodeLookup:w,triggerNodeChanges:S,triggerEdgeChanges:C}=g();if(y){const E=_.map(k=>Yr(k,!0));C(E);return}C(Xo(x,new Set([..._]))),S(Xo(w,new Set,!0))},unselectNodesAndEdges:({nodes:_,edges:y}={})=>{const{edges:x,nodes:w,nodeLookup:S,triggerNodeChanges:C,triggerEdgeChanges:E}=g(),k=_||w,N=y||x,j=[];for(const I of k){if(!I.selected)continue;const O=S.get(I.id);O&&(O.selected=!1),j.push(Yr(I.id,!1))}const $=[];for(const I of N)I.selected&&$.push(Yr(I.id,!1));C(j),E($)},setMinZoom:_=>{const{panZoom:y,maxZoom:x}=g();y==null||y.setScaleExtent([_,x]),m({minZoom:_})},setMaxZoom:_=>{const{panZoom:y,minZoom:x}=g();y==null||y.setScaleExtent([x,_]),m({maxZoom:_})},setTranslateExtent:_=>{var y;(y=g().panZoom)==null||y.setTranslateExtent(_),m({translateExtent:_})},resetSelectedElements:()=>{const{edges:_,nodes:y,triggerNodeChanges:x,triggerEdgeChanges:w,elementsSelectable:S}=g();if(!S)return;const C=y.reduce((k,N)=>N.selected?[...k,Yr(N.id,!1)]:k,[]),E=_.reduce((k,N)=>N.selected?[...k,Yr(N.id,!1)]:k,[]);x(C),w(E)},setNodeExtent:_=>{const{nodes:y,nodeLookup:x,parentLookup:w,nodeOrigin:S,elevateNodesOnSelect:C,nodeExtent:E,zIndexMode:k}=g();_[0][0]===E[0][0]&&_[0][1]===E[0][1]&&_[1][0]===E[1][0]&&_[1][1]===E[1][1]||(th(y,x,w,{nodeOrigin:S,nodeExtent:_,elevateNodesOnSelect:C,checkEquality:!1,zIndexMode:k}),m({nodeExtent:_}))},panBy:_=>{const{transform:y,width:x,height:w,panZoom:S,translateExtent:C}=g();return EU({delta:_,panZoom:S,transform:y,translateExtent:C,width:x,height:w})},setCenter:async(_,y,x)=>{const{width:w,height:S,maxZoom:C,panZoom:E}=g();if(!E)return Promise.resolve(!1);const k=typeof(x==null?void 0:x.zoom)<"u"?x.zoom:C;return await E.setViewport({x:w/2-_*k,y:S/2-y*k,zoom:k},{duration:x==null?void 0:x.duration,ease:x==null?void 0:x.ease,interpolate:x==null?void 0:x.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{m({connection:{...rk}})},updateConnection:_=>{m({connection:_})},reset:()=>m({...Ix()})}},Object.is);function Sg({initialNodes:e,initialEdges:n,defaultNodes:r,defaultEdges:o,initialWidth:i,initialHeight:s,initialMinZoom:a,initialMaxZoom:l,initialFitViewOptions:c,fitView:u,nodeOrigin:d,nodeExtent:f,zIndexMode:p,children:m}){const[g]=h.useState(()=>YY({nodes:e,edges:n,defaultNodes:r,defaultEdges:o,width:i,height:s,fitView:u,minZoom:a,maxZoom:l,fitViewOptions:c,nodeOrigin:d,nodeExtent:f,zIndexMode:p}));return v.jsx(fG,{value:g,children:v.jsx($G,{children:m})})}function XY({children:e,nodes:n,edges:r,defaultNodes:o,defaultEdges:i,width:s,height:a,fitView:l,fitViewOptions:c,minZoom:u,maxZoom:d,nodeOrigin:f,nodeExtent:p,zIndexMode:m}){return h.useContext(sf)?v.jsx(v.Fragment,{children:e}):v.jsx(Sg,{initialNodes:n,initialEdges:r,defaultNodes:o,defaultEdges:i,initialWidth:s,initialHeight:a,fitView:l,initialFitViewOptions:c,initialMinZoom:u,initialMaxZoom:d,nodeOrigin:f,nodeExtent:p,zIndexMode:m,children:e})}const KY={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function qY({nodes:e,edges:n,defaultNodes:r,defaultEdges:o,className:i,nodeTypes:s,edgeTypes:a,onNodeClick:l,onEdgeClick:c,onInit:u,onMove:d,onMoveStart:f,onMoveEnd:p,onConnect:m,onConnectStart:g,onConnectEnd:b,onClickConnectStart:_,onClickConnectEnd:y,onNodeMouseEnter:x,onNodeMouseMove:w,onNodeMouseLeave:S,onNodeContextMenu:C,onNodeDoubleClick:E,onNodeDragStart:k,onNodeDrag:N,onNodeDragStop:j,onNodesDelete:$,onEdgesDelete:I,onDelete:O,onSelectionChange:H,onSelectionDragStart:R,onSelectionDrag:L,onSelectionDragStop:D,onSelectionContextMenu:z,onSelectionStart:A,onSelectionEnd:M,onBeforeDelete:P,connectionMode:W,connectionLineType:T=fr.Bezier,connectionLineStyle:X,connectionLineComponent:F,connectionLineContainerStyle:B,deleteKeyCode:G="Backspace",selectionKeyCode:U="Shift",selectionOnDrag:Y=!1,selectionMode:K=sa.Full,panActivationKeyCode:ee="Space",multiSelectionKeyCode:J=la()?"Meta":"Control",zoomActivationKeyCode:Q=la()?"Meta":"Control",snapToGrid:ne,snapGrid:ce,onlyRenderVisibleElements:ge=!1,selectNodesOnDrag:fe,nodesDraggable:$e,autoPanOnNodeFocus:un,nodesConnectable:ut,nodesFocusable:Fr,nodeOrigin:Oi=Ok,edgesFocusable:Di,edgesReconnectable:Li,elementsSelectable:uf=!0,defaultViewport:Da=CG,minZoom:So=.5,maxZoom:zi=2,translateExtent:Cg=ia,preventScrolling:hN=!0,nodeExtent:ff,defaultMarkerColor:mN="#b1b1b7",zoomOnScroll:gN=!0,zoomOnPinch:yN=!0,panOnScroll:vN=!1,panOnScrollSpeed:xN=.5,panOnScrollMode:wN=no.Free,zoomOnDoubleClick:bN=!0,panOnDrag:_N=!0,onPaneClick:SN,onPaneMouseEnter:CN,onPaneMouseMove:EN,onPaneMouseLeave:kN,onPaneScroll:NN,onPaneContextMenu:PN,paneClickDistance:RN=1,nodeClickDistance:MN=0,children:jN,onReconnect:AN,onReconnectStart:TN,onReconnectEnd:IN,onEdgeContextMenu:$N,onEdgeDoubleClick:ON,onEdgeMouseEnter:DN,onEdgeMouseMove:LN,onEdgeMouseLeave:zN,reconnectRadius:FN=10,onNodesChange:VN,onEdgesChange:BN,noDragClassName:HN="nodrag",noWheelClassName:WN="nowheel",noPanClassName:Eg="nopan",fitView:kg,fitViewOptions:Ng,connectOnClick:UN,attributionPosition:GN,proOptions:YN,defaultEdgeOptions:XN,elevateNodesOnSelect:KN=!0,elevateEdgesOnSelect:qN=!1,disableKeyboardA11y:Pg=!1,autoPanOnConnect:ZN,autoPanOnNodeDrag:QN,autoPanSpeed:JN,connectionRadius:eP,isValidConnection:tP,onError:nP,style:rP,id:Rg,nodeDragThreshold:oP,connectionDragThreshold:iP,viewport:sP,onViewportChange:aP,width:lP,height:cP,colorMode:uP="light",debug:fP,onScroll:La,ariaLabelConfig:dP,zIndexMode:Mg="basic",...pP},hP){const df=Rg||"1",mP=PG(uP),gP=h.useCallback(jg=>{jg.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),La==null||La(jg)},[La]);return v.jsx("div",{"data-testid":"rf__wrapper",...pP,onScroll:gP,style:{...rP,...KY},ref:hP,className:ze(["react-flow",i,mP]),id:Rg,role:"application",children:v.jsxs(XY,{nodes:e,edges:n,width:lP,height:cP,fitView:kg,fitViewOptions:Ng,minZoom:So,maxZoom:zi,nodeOrigin:Oi,nodeExtent:ff,zIndexMode:Mg,children:[v.jsx(NG,{nodes:e,edges:n,defaultNodes:r,defaultEdges:o,onConnect:m,onConnectStart:g,onConnectEnd:b,onClickConnectStart:_,onClickConnectEnd:y,nodesDraggable:$e,autoPanOnNodeFocus:un,nodesConnectable:ut,nodesFocusable:Fr,edgesFocusable:Di,edgesReconnectable:Li,elementsSelectable:uf,elevateNodesOnSelect:KN,elevateEdgesOnSelect:qN,minZoom:So,maxZoom:zi,nodeExtent:ff,onNodesChange:VN,onEdgesChange:BN,snapToGrid:ne,snapGrid:ce,connectionMode:W,translateExtent:Cg,connectOnClick:UN,defaultEdgeOptions:XN,fitView:kg,fitViewOptions:Ng,onNodesDelete:$,onEdgesDelete:I,onDelete:O,onNodeDragStart:k,onNodeDrag:N,onNodeDragStop:j,onSelectionDrag:L,onSelectionDragStart:R,onSelectionDragStop:D,onMove:d,onMoveStart:f,onMoveEnd:p,noPanClassName:Eg,nodeOrigin:Oi,rfId:df,autoPanOnConnect:ZN,autoPanOnNodeDrag:QN,autoPanSpeed:JN,onError:nP,connectionRadius:eP,isValidConnection:tP,selectNodesOnDrag:fe,nodeDragThreshold:oP,connectionDragThreshold:iP,onBeforeDelete:P,debug:fP,ariaLabelConfig:dP,zIndexMode:Mg}),v.jsx(GY,{onInit:u,onNodeClick:l,onEdgeClick:c,onNodeMouseEnter:x,onNodeMouseMove:w,onNodeMouseLeave:S,onNodeContextMenu:C,onNodeDoubleClick:E,nodeTypes:s,edgeTypes:a,connectionLineType:T,connectionLineStyle:X,connectionLineComponent:F,connectionLineContainerStyle:B,selectionKeyCode:U,selectionOnDrag:Y,selectionMode:K,deleteKeyCode:G,multiSelectionKeyCode:J,panActivationKeyCode:ee,zoomActivationKeyCode:Q,onlyRenderVisibleElements:ge,defaultViewport:Da,translateExtent:Cg,minZoom:So,maxZoom:zi,preventScrolling:hN,zoomOnScroll:gN,zoomOnPinch:yN,zoomOnDoubleClick:bN,panOnScroll:vN,panOnScrollSpeed:xN,panOnScrollMode:wN,panOnDrag:_N,onPaneClick:SN,onPaneMouseEnter:CN,onPaneMouseMove:EN,onPaneMouseLeave:kN,onPaneScroll:NN,onPaneContextMenu:PN,paneClickDistance:RN,nodeClickDistance:MN,onSelectionContextMenu:z,onSelectionStart:A,onSelectionEnd:M,onReconnect:AN,onReconnectStart:TN,onReconnectEnd:IN,onEdgeContextMenu:$N,onEdgeDoubleClick:ON,onEdgeMouseEnter:DN,onEdgeMouseMove:LN,onEdgeMouseLeave:zN,reconnectRadius:FN,defaultMarkerColor:mN,noDragClassName:HN,noWheelClassName:WN,noPanClassName:Eg,rfId:df,disableKeyboardA11y:Pg,nodeExtent:ff,viewport:sP,onViewportChange:aP}),v.jsx(SG,{onSelectionChange:H}),jN,v.jsx(vG,{proOptions:YN,position:GN}),v.jsx(yG,{rfId:df,disableKeyboardA11y:Pg})]})})}var lN=Lk(qY);function ZY({dimensions:e,lineWidth:n,variant:r,className:o}){return v.jsx("path",{strokeWidth:n,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:ze(["react-flow__background-pattern",r,o])})}function QY({radius:e,className:n}){return v.jsx("circle",{cx:e,cy:e,r:e,className:ze(["react-flow__background-pattern","dots",n])})}var Er;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Er||(Er={}));const JY={[Er.Dots]:1,[Er.Lines]:1,[Er.Cross]:6},eX=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function cN({id:e,variant:n=Er.Dots,gap:r=20,size:o,lineWidth:i=1,offset:s=0,color:a,bgColor:l,style:c,className:u,patternClassName:d}){const f=h.useRef(null),{transform:p,patternId:m}=he(eX,Re),g=o||JY[n],b=n===Er.Dots,_=n===Er.Cross,y=Array.isArray(r)?r:[r,r],x=[y[0]*p[2]||1,y[1]*p[2]||1],w=g*p[2],S=Array.isArray(s)?s:[s,s],C=_?[w,w]:x,E=[S[0]*p[2]||1+C[0]/2,S[1]*p[2]||1+C[1]/2],k=`${m}${e||""}`;return v.jsxs("svg",{className:ze(["react-flow__background",u]),style:{...c,...lf,"--xy-background-color-props":l,"--xy-background-pattern-color-props":a},ref:f,"data-testid":"rf__background",children:[v.jsx("pattern",{id:k,x:p[0]%x[0],y:p[1]%x[1],width:x[0],height:x[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${E[0]},-${E[1]})`,children:b?v.jsx(QY,{radius:w/2,className:d}):v.jsx(ZY,{dimensions:C,lineWidth:i,variant:n,className:d})}),v.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${k})`})]})}cN.displayName="Background";const uN=h.memo(cN);function tX(){return v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:v.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function nX(){return v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:v.jsx("path",{d:"M0 0h32v4.2H0z"})})}function rX(){return v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:v.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 oX(){return v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:v.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 iX(){return v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:v.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 bl({children:e,className:n,...r}){return v.jsx("button",{type:"button",className:ze(["react-flow__controls-button",n]),...r,children:e})}const sX=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function fN({style:e,showZoom:n=!0,showFitView:r=!0,showInteractive:o=!0,fitViewOptions:i,onZoomIn:s,onZoomOut:a,onFitView:l,onInteractiveChange:c,className:u,children:d,position:f="bottom-left",orientation:p="vertical","aria-label":m}){const g=Me(),{isInteractive:b,minZoomReached:_,maxZoomReached:y,ariaLabelConfig:x}=he(sX,Re),{zoomIn:w,zoomOut:S,fitView:C}=bg(),E=()=>{w(),s==null||s()},k=()=>{S(),a==null||a()},N=()=>{C(i),l==null||l()},j=()=>{g.setState({nodesDraggable:!b,nodesConnectable:!b,elementsSelectable:!b}),c==null||c(!b)},$=p==="horizontal"?"horizontal":"vertical";return v.jsxs(af,{className:ze(["react-flow__controls",$,u]),position:f,style:e,"data-testid":"rf__controls","aria-label":m??x["controls.ariaLabel"],children:[n&&v.jsxs(v.Fragment,{children:[v.jsx(bl,{onClick:E,className:"react-flow__controls-zoomin",title:x["controls.zoomIn.ariaLabel"],"aria-label":x["controls.zoomIn.ariaLabel"],disabled:y,children:v.jsx(tX,{})}),v.jsx(bl,{onClick:k,className:"react-flow__controls-zoomout",title:x["controls.zoomOut.ariaLabel"],"aria-label":x["controls.zoomOut.ariaLabel"],disabled:_,children:v.jsx(nX,{})})]}),r&&v.jsx(bl,{className:"react-flow__controls-fitview",onClick:N,title:x["controls.fitView.ariaLabel"],"aria-label":x["controls.fitView.ariaLabel"],children:v.jsx(rX,{})}),o&&v.jsx(bl,{className:"react-flow__controls-interactive",onClick:j,title:x["controls.interactive.ariaLabel"],"aria-label":x["controls.interactive.ariaLabel"],children:b?v.jsx(iX,{}):v.jsx(oX,{})}),d]})}fN.displayName="Controls";const dN=h.memo(fN);function aX({id:e,x:n,y:r,width:o,height:i,style:s,color:a,strokeColor:l,strokeWidth:c,className:u,borderRadius:d,shapeRendering:f,selected:p,onClick:m}){const{background:g,backgroundColor:b}=s||{},_=a||g||b;return v.jsx("rect",{className:ze(["react-flow__minimap-node",{selected:p},u]),x:n,y:r,rx:d,ry:d,width:o,height:i,style:{fill:_,stroke:l,strokeWidth:c},shapeRendering:f,onClick:m?y=>m(y,e):void 0})}const lX=h.memo(aX),cX=e=>e.nodes.map(n=>n.id),gd=e=>e instanceof Function?e:()=>e;function uX({nodeStrokeColor:e,nodeColor:n,nodeClassName:r="",nodeBorderRadius:o=5,nodeStrokeWidth:i,nodeComponent:s=lX,onClick:a}){const l=he(cX,Re),c=gd(n),u=gd(e),d=gd(r),f=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return v.jsx(v.Fragment,{children:l.map(p=>v.jsx(dX,{id:p,nodeColorFunc:c,nodeStrokeColorFunc:u,nodeClassNameFunc:d,nodeBorderRadius:o,nodeStrokeWidth:i,NodeComponent:s,onClick:a,shapeRendering:f},p))})}function fX({id:e,nodeColorFunc:n,nodeStrokeColorFunc:r,nodeClassNameFunc:o,nodeBorderRadius:i,nodeStrokeWidth:s,shapeRendering:a,NodeComponent:l,onClick:c}){const{node:u,x:d,y:f,width:p,height:m}=he(g=>{const b=g.nodeLookup.get(e);if(!b)return{node:void 0,x:0,y:0,width:0,height:0};const _=b.internals.userNode,{x:y,y:x}=b.internals.positionAbsolute,{width:w,height:S}=Zn(_);return{node:_,x:y,y:x,width:w,height:S}},Re);return!u||u.hidden||!uk(u)?null:v.jsx(l,{x:d,y:f,width:p,height:m,style:u.style,selected:!!u.selected,className:o(u),color:n(u),borderRadius:i,strokeColor:r(u),strokeWidth:s,shapeRendering:a,onClick:c,id:u.id})}const dX=h.memo(fX);var pX=h.memo(uX);const hX=200,mX=150,gX=e=>!e.hidden,yX=e=>{const n={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:n,boundingRect:e.nodeLookup.size>0?ck(Ia(e.nodeLookup,{filter:gX}),n):n,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},vX="react-flow__minimap-desc";function pN({style:e,className:n,nodeStrokeColor:r,nodeColor:o,nodeClassName:i="",nodeBorderRadius:s=5,nodeStrokeWidth:a,nodeComponent:l,bgColor:c,maskColor:u,maskStrokeColor:d,maskStrokeWidth:f,position:p="bottom-right",onClick:m,onNodeClick:g,pannable:b=!1,zoomable:_=!1,ariaLabel:y,inversePan:x,zoomStep:w=1,offsetScale:S=5}){const C=Me(),E=h.useRef(null),{boundingRect:k,viewBB:N,rfId:j,panZoom:$,translateExtent:I,flowWidth:O,flowHeight:H,ariaLabelConfig:R}=he(yX,Re),L=(e==null?void 0:e.width)??hX,D=(e==null?void 0:e.height)??mX,z=k.width/L,A=k.height/D,M=Math.max(z,A),P=M*L,W=M*D,T=S*M,X=k.x-(P-k.width)/2-T,F=k.y-(W-k.height)/2-T,B=P+T*2,G=W+T*2,U=`${vX}-${j}`,Y=h.useRef(0),K=h.useRef();Y.current=M,h.useEffect(()=>{if(E.current&&$)return K.current=IU({domNode:E.current,panZoom:$,getTransform:()=>C.getState().transform,getViewScale:()=>Y.current}),()=>{var ne;(ne=K.current)==null||ne.destroy()}},[$]),h.useEffect(()=>{var ne;(ne=K.current)==null||ne.update({translateExtent:I,width:O,height:H,inversePan:x,pannable:b,zoomStep:w,zoomable:_})},[b,_,x,w,I,O,H]);const ee=m?ne=>{var fe;const[ce,ge]=((fe=K.current)==null?void 0:fe.pointer(ne))||[0,0];m(ne,{x:ce,y:ge})}:void 0,J=g?h.useCallback((ne,ce)=>{const ge=C.getState().nodeLookup.get(ce).internals.userNode;g(ne,ge)},[]):void 0,Q=y??R["minimap.ariaLabel"];return v.jsx(af,{position:p,style:{...e,"--xy-minimap-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-width-props":typeof f=="number"?f*M:void 0,"--xy-minimap-node-background-color-props":typeof o=="string"?o:void 0,"--xy-minimap-node-stroke-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-width-props":typeof a=="number"?a:void 0},className:ze(["react-flow__minimap",n]),"data-testid":"rf__minimap",children:v.jsxs("svg",{width:L,height:D,viewBox:`${X} ${F} ${B} ${G}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":U,ref:E,onClick:ee,children:[Q&&v.jsx("title",{id:U,children:Q}),v.jsx(pX,{onClick:J,nodeColor:o,nodeStrokeColor:r,nodeBorderRadius:s,nodeClassName:i,nodeStrokeWidth:a,nodeComponent:l}),v.jsx("path",{className:"react-flow__minimap-mask",d:`M${X-T},${F-T}h${B+T*2}v${G+T*2}h${-B-T*2}z
378
+ M${N.x},${N.y}h${N.width}v${N.height}h${-N.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}pN.displayName="MiniMap";h.memo(pN);const xX=e=>n=>e?`${Math.max(1/n.transform[2],1)}`:void 0,wX={[Ci.Line]:"right",[Ci.Handle]:"bottom-right"};function bX({nodeId:e,position:n,variant:r=Ci.Handle,className:o,style:i=void 0,children:s,color:a,minWidth:l=10,minHeight:c=10,maxWidth:u=Number.MAX_VALUE,maxHeight:d=Number.MAX_VALUE,keepAspectRatio:f=!1,resizeDirection:p,autoScale:m=!0,shouldResize:g,onResizeStart:b,onResize:_,onResizeEnd:y}){const x=Bk(),w=typeof e=="string"?e:x,S=Me(),C=h.useRef(null),E=r===Ci.Handle,k=he(h.useCallback(xX(E&&m),[E,m]),Re),N=h.useRef(null),j=n??wX[r];h.useEffect(()=>{if(!(!C.current||!w))return N.current||(N.current=XU({domNode:C.current,nodeId:w,getStoreItems:()=>{const{nodeLookup:I,transform:O,snapGrid:H,snapToGrid:R,nodeOrigin:L,domNode:D}=S.getState();return{nodeLookup:I,transform:O,snapGrid:H,snapToGrid:R,nodeOrigin:L,paneDomNode:D}},onChange:(I,O)=>{const{triggerNodeChanges:H,nodeLookup:R,parentLookup:L,nodeOrigin:D}=S.getState(),z=[],A={x:I.x,y:I.y},M=R.get(w);if(M&&M.expandParent&&M.parentId){const P=M.origin??D,W=I.width??M.measured.width??0,T=I.height??M.measured.height??0,X={id:M.id,parentId:M.parentId,rect:{width:W,height:T,...fk({x:I.x??M.position.x,y:I.y??M.position.y},{width:W,height:T},M.parentId,R,P)}},F=wg([X],R,L,D);z.push(...F),A.x=I.x?Math.max(P[0]*W,I.x):void 0,A.y=I.y?Math.max(P[1]*T,I.y):void 0}if(A.x!==void 0&&A.y!==void 0){const P={id:w,type:"position",position:{...A}};z.push(P)}if(I.width!==void 0&&I.height!==void 0){const W={id:w,type:"dimensions",resizing:!0,setAttributes:p?p==="horizontal"?"width":"height":!0,dimensions:{width:I.width,height:I.height}};z.push(W)}for(const P of O){const W={...P,type:"position"};z.push(W)}H(z)},onEnd:({width:I,height:O})=>{const H={id:w,type:"dimensions",resizing:!1,dimensions:{width:I,height:O}};S.getState().triggerNodeChanges([H])}})),N.current.update({controlPosition:j,boundaries:{minWidth:l,minHeight:c,maxWidth:u,maxHeight:d},keepAspectRatio:f,resizeDirection:p,onResizeStart:b,onResize:_,onResizeEnd:y,shouldResize:g}),()=>{var I;(I=N.current)==null||I.destroy()}},[j,l,c,u,d,f,b,_,y,g]);const $=j.split("-");return v.jsx("div",{className:ze(["react-flow__resize-control","nodrag",...$,r,o]),ref:C,style:{...i,scale:k,...a&&{[E?"backgroundColor":"borderColor"]:a}},children:s})}h.memo(bX);const $x=3,_l={screen:0,hook:160,api:340,table:520},ih=220,Ox=40;function Sl(e,n){const r=new Map,o=e.length,s=-(o*ih+(o-1)*Ox)/2;return e.forEach((a,l)=>{r.set(a,{x:s+l*(ih+Ox),y:n})}),r}function Dx(e,n,r){const o=e.map(i=>{const a=(r.get(i)??[]).map(c=>{var u;return((u=n.get(c))==null?void 0:u.x)??0}),l=a.length>0?a.reduce((c,u)=>c+u,0)/a.length:0;return{id:i,avg:l}});return o.sort((i,s)=>i.avg-s.avg),o.map(i=>i.id)}function Cl(e){const n={width:ih,padding:"10px 12px",borderRadius:10,border:"1px solid rgba(255, 255, 255, 0.14)",background:"rgba(48, 50, 72, 0.96)",color:"#f2f2f6",fontSize:12,fontFamily:"inherit",boxShadow:"0 2px 10px rgba(0, 0, 0, 0.4)"};return e==="screen"?{...n,borderColor:"rgba(139, 92, 246, 0.9)",background:"linear-gradient(135deg, rgba(139,92,246,0.45) 0%, rgba(58, 48, 90, 0.96) 100%)",boxShadow:"0 2px 14px rgba(139, 92, 246, 0.25)"}:e==="api"?{...n,borderColor:"rgba(139, 92, 246, 0.55)"}:e==="table"?{...n,borderColor:"rgba(34, 197, 94, 0.55)",background:"rgba(38, 58, 48, 0.96)"}:n}function El(e,n,r){const o=e==="screen"?ma:e==="hook"?DT:e==="api"?um:cm;return v.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:3},children:[v.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[v.jsx(o,{style:{width:12,height:12,opacity:.7}}),v.jsx("span",{style:{fontWeight:600},children:n})]}),r&&v.jsx("span",{style:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSize:10,opacity:.7,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r})]})}function _X({screen:e,graphs:n,onNodeSelect:r,selectedNodeId:o}){const{nodes:i,edges:s,empty:a}=h.useMemo(()=>{if(!n.ui||!n.api||!n.db)return{nodes:[],edges:[],empty:!0};const y=new Map;for(const F of n.ui.edges)F.type==="imports"&&(y.has(F.source)||y.set(F.source,[]),y.get(F.source).push(F.target));const x=new Set([e.id]);{let F=[e.id];for(let B=0;B<$x&&F.length>0;B++){const G=[];for(const U of F)for(const Y of y.get(U)??[])x.has(Y)||(x.add(Y),G.push(Y));F=G}}const w=new Map;for(const F of n.ui.cross_refs??[])F.type!=="calls_api"&&F.type!=="references_api"||F.layer!=="api"||x.has(F.source)&&(w.has(F.source)||w.set(F.source,[]),w.get(F.source).push(F.target));const S=new Set;for(const F of w.values())for(const B of F)S.add(B);if(S.size===0)return{nodes:[],edges:[],empty:!0};const C=(y.get(e.id)??[]).filter(F=>F!==e.id),E=[],k=new Map;for(const F of C){const B=new Set([F]);let G=[F];for(let Y=0;Y<$x&&G.length>0;Y++){const K=[];for(const ee of G)for(const J of y.get(ee)??[])B.has(J)||(B.add(J),K.push(J));G=K}const U=new Set;for(const Y of B)for(const K of w.get(Y)??[])U.add(K);U.size>0&&(E.push(F),k.set(F,U))}const N=new Set(w.get(e.id)??[]),j=n.api.nodes.filter(F=>S.has(F.id)),$=new Set,I=new Map;for(const F of j){const B=(F.db_models??[]).map(G=>G);I.set(F.id,B);for(const G of B)$.add(G)}const O=n.db.nodes.filter(F=>$.has(F.name)||$.has(F.name.toLowerCase())),H=new Map;for(const F of O)H.set(F.name,F.id),H.set(F.name.toLowerCase(),F.id);const R=[],L=[],D=Sl([e.id],_l.screen);R.push({id:`screen:${e.id}`,position:D.get(e.id),data:{label:El("screen",oa(e),e.route??void 0)},style:Cl("screen"),sourcePosition:"bottom",targetPosition:"top"});const z=[...E].sort((F,B)=>{const G=[...k.get(F)??[]],U=[...k.get(B)??[]],Y=j.map(ee=>ee.id),K=ee=>{const J=ee.map(Q=>Y.indexOf(Q)).filter(Q=>Q>=0);return J.length>0?J.reduce((Q,ne)=>Q+ne,0)/J.length:0};return K(G)-K(U)});if(z.length>0){const F=Sl(z,_l.hook);for(const B of z){const G=B.split("/").pop()??B;R.push({id:`hook:${B}`,position:F.get(B),data:{label:El("hook",G.replace(/\.tsx?$/,""),B)},style:Cl("hook"),sourcePosition:"bottom",targetPosition:"top"}),L.push({id:`e:screen-${B}`,source:`screen:${e.id}`,target:`hook:${B}`,animated:!1,style:{stroke:"rgba(139,92,246,0.95)"}})}}const A=new Map;for(const F of E){const B=R.find(G=>G.id===`hook:${F}`);B&&A.set(F,B.position)}A.set(e.id,D.get(e.id));const M=new Map;for(const F of S){const B=[];N.has(F)&&B.push(e.id);for(const[G,U]of k.entries())U.has(F)&&B.push(G);M.set(F,B)}const P=Dx(j.map(F=>F.id),A,M);if(P.length>0){const F=Sl(P,_l.api);for(const B of j)R.push({id:`api:${B.id}`,position:F.get(B.id),data:{label:El("api",`${B.methods.join(",")} ${B.path.split("/").pop()||"/"}`,B.path)},style:Cl("api"),sourcePosition:"bottom",targetPosition:"top"});for(const B of N)S.has(B)&&L.push({id:`e:screen-api-${B}`,source:`screen:${e.id}`,target:`api:${B}`,style:{stroke:"rgba(139,92,246,0.95)"}});for(const[B,G]of k.entries())for(const U of G)L.push({id:`e:${B}-${U}`,source:`hook:${B}`,target:`api:${U}`,style:{stroke:"rgba(139,92,246,0.95)"}})}const W=new Map;for(const F of P){const B=R.find(G=>G.id===`api:${F}`);B&&W.set(F,B.position)}const T=new Map;for(const F of j){const B=I.get(F.id)??[];for(const G of B){const U=H.get(G)??H.get(G.toLowerCase());U&&(T.has(U)||T.set(U,[]),T.get(U).push(F.id))}}const X=Dx(O.map(F=>F.id),W,T);if(X.length>0){const F=Sl(X,_l.table);for(const B of O)R.push({id:`table:${B.id}`,position:F.get(B.id),data:{label:El("table",B.name)},style:Cl("table"),sourcePosition:"bottom",targetPosition:"top"});for(const B of j){const G=I.get(B.id)??[];for(const U of G){const Y=H.get(U)??H.get(U.toLowerCase());Y&&L.push({id:`e:${B.id}-${Y}`,source:`api:${B.id}`,target:`table:${Y}`,style:{stroke:"rgba(34,197,94,0.95)"}})}}}return{nodes:R,edges:L,empty:!1}},[e,n]),l=h.useRef(null),c=i,u=s,d=h.useCallback(y=>{const x=l.current;if(!x)return;const w=new Set([y]);for(const S of s)S.source===y&&w.add(S.target),S.target===y&&w.add(S.source);x.querySelectorAll(".react-flow__node").forEach(S=>{const C=S.getAttribute("data-id")??"";S.style.opacity=w.has(C)?"1":"0.15",S.style.transition="opacity 120ms ease"}),x.querySelectorAll(".react-flow__edge").forEach(S=>{S.style.opacity="0.08",S.style.transition="opacity 120ms ease"}),x.querySelectorAll(`.react-flow__edge[data-source="${y}"], .react-flow__edge[data-target="${y}"]`).forEach(S=>{S.style.opacity="1"})},[s]),f=h.useCallback(()=>{const y=l.current;y&&(y.querySelectorAll(".react-flow__node").forEach(x=>{x.style.opacity="",x.style.transition=""}),y.querySelectorAll(".react-flow__edge").forEach(x=>{x.style.opacity="",x.style.transition=""}))},[]),p=h.useCallback((y,x)=>{d(x.id)},[d]),m=h.useCallback(()=>{f()},[f]),g=(y,x)=>{const[w,...S]=x.id.split(":"),C=S.join(":"),E={screen:"ui",hook:"ui",api:"api",table:"db"};r==null||r(C,E[w]??"ui")};if(a)return v.jsx("div",{className:"flex h-full items-center justify-center p-8",children:v.jsxs("div",{className:"text-center",children:[v.jsx("h3",{className:"text-sm font-semibold text-foreground",children:oa(e)}),v.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:"No API or database dependencies detected for this screen."})]})});const{focusedNodes:b,focusedEdges:_}=h.useMemo(()=>{var C;if(!o)return{focusedNodes:c,focusedEdges:u};const y=(C=c.find(E=>{const[,...k]=E.id.split(":");return k.join(":")===o}))==null?void 0:C.id;if(!y)return{focusedNodes:c,focusedEdges:u};const x=new Set([y]);for(const E of u)E.source===y&&x.add(E.target),E.target===y&&x.add(E.source);const w=c.filter(E=>x.has(E.id)),S=u.filter(E=>x.has(E.source)&&x.has(E.target));return{focusedNodes:w,focusedEdges:S}},[c,u,o]);return v.jsx("div",{ref:l,className:"relative h-full w-full",children:v.jsx(Sg,{children:v.jsxs(lN,{nodes:b,edges:_,fitView:!0,fitViewOptions:{padding:.3},proOptions:{hideAttribution:!0},minZoom:.2,maxZoom:1.5,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,onNodeMouseEnter:p,onNodeMouseLeave:m,onNodeClick:g,children:[v.jsx(uN,{color:"rgba(255,255,255,0.05)",gap:24}),v.jsx(dN,{showInteractive:!1})]},o??"full")})})}const Kl=220,Lx=40,SX=110,CX=0,EX=180,jo=6;function zx(e){const n={width:Kl,padding:"10px 12px",borderRadius:10,border:"1px solid rgba(255, 255, 255, 0.14)",background:"rgba(48, 50, 72, 0.96)",color:"#f2f2f6",fontSize:12,fontFamily:"inherit",boxShadow:"0 2px 10px rgba(0, 0, 0, 0.4)"};return e?{...n,borderColor:"rgba(139, 92, 246, 0.9)",background:"linear-gradient(135deg, rgba(139,92,246,0.45) 0%, rgba(58, 48, 90, 0.96) 100%)",boxShadow:"0 2px 14px rgba(139, 92, 246, 0.25)"}:{...n,cursor:"pointer"}}function Fx(e,n,r){const o=r?am:ma;return v.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:3},children:[v.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[v.jsx(o,{style:{width:12,height:12,opacity:.7}}),v.jsx("span",{style:{fontWeight:600},children:e})]}),n&&v.jsx("span",{style:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSize:10,opacity:.7,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n})]})}function kX({module:e,screens:n,onScreenClick:r}){const{nodes:o,edges:i}=h.useMemo(()=>{const a=[],l=[];Math.max(1,Math.ceil(n.length/jo)),Math.min(jo,n.length);const c=0;return a.push({id:`module:${e}`,position:{x:c-Kl/2,y:CX},data:{label:Fx(qc(e),`${n.length} screens`,!0)},style:zx(!0),sourcePosition:"bottom",targetPosition:"top",selectable:!1,draggable:!1}),n.forEach((u,d)=>{const f=Math.floor(d/jo),p=d%jo,m=Math.min(jo,n.length-f*jo),g=m*Kl+(m-1)*Lx,_=c-g/2+p*(Kl+Lx),y=EX+f*SX;a.push({id:`screen:${u.id}`,position:{x:_,y},data:{label:Fx(oa(u),u.route??void 0,!1),screenId:u.id},style:zx(!1),sourcePosition:"bottom",targetPosition:"top",draggable:!1}),l.push({id:`e:module-${u.id}`,source:`module:${e}`,target:`screen:${u.id}`,style:{stroke:"rgba(139,92,246,0.95)"}})}),{nodes:a,edges:l}},[e,n]),s=(a,l)=>{const c=l.data.screenId;c&&r(c)};return v.jsx("div",{className:"h-full w-full",children:v.jsx(Sg,{children:v.jsxs(lN,{nodes:o,edges:i,fitView:!0,fitViewOptions:{padding:.2},proOptions:{hideAttribution:!0},minZoom:.2,maxZoom:1.5,nodesConnectable:!1,onNodeClick:s,children:[v.jsx(uN,{color:"rgba(255,255,255,0.05)",gap:24}),v.jsx(dN,{showInteractive:!1})]})})})}function NX(e,n,r){var o;if(n==="ui"&&r.ui){const i=r.ui.nodes.find(s=>s.id===e);if(i)return{id:i.id,name:i.name,type:i.type,layer:n,route:i.route,module:((o=i.tags)==null?void 0:o.module)??i.module??null,exports:i.exports,tags:i.tags}}if(n==="api"&&r.api){const i=r.api.nodes.find(s=>s.id===e);if(i)return{id:i.id,name:i.name,type:i.type,layer:n,methods:i.methods,path:i.path,db_models:i.db_models,tags:i.tags}}if(n==="db"&&r.db){const i=r.db.nodes.find(s=>s.id===e);if(i)return{id:i.id,name:i.name,type:i.type,layer:n,columns:i.columns,tags:i.tags}}return null}function PX(e,n,r){const o=[];if(n==="ui"&&r.ui)for(const i of r.ui.edges){if(i.source===e){const s=r.ui.nodes.find(a=>a.id===i.target);s&&o.push({nodeId:i.target,nodeName:s.name,edgeType:i.type,direction:"outgoing"})}if(i.target===e){const s=r.ui.nodes.find(a=>a.id===i.source);s&&o.push({nodeId:i.source,nodeName:s.name,edgeType:i.type,direction:"incoming"})}}return o}function RX(e,n){const r=[],o=[];if(!n.ui)return{to:r,from:o};for(const i of n.ui.edges)if(i.type==="navigates"){if(i.source===e){const s=n.ui.nodes.find(a=>a.id===i.target);s&&r.push(s)}if(i.target===e){const s=n.ui.nodes.find(a=>a.id===i.source);s&&o.push(s)}}return{to:r,from:o}}const MX={ui:ma,api:um,db:cm},jX={page:"bg-violet-500/20 text-violet-300",layout:"bg-indigo-500/20 text-indigo-300",component:"bg-blue-500/20 text-blue-300",hook:"bg-sky-500/20 text-sky-300",context:"bg-teal-500/20 text-teal-300",util:"bg-slate-500/20 text-slate-300",config:"bg-amber-500/20 text-amber-300",endpoint:"bg-violet-500/20 text-violet-300",table:"bg-emerald-500/20 text-emerald-300",enum:"bg-orange-500/20 text-orange-300"};function AX({type:e}){const n=jX[e]??"bg-zinc-500/20 text-zinc-300";return v.jsx("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium uppercase tracking-wider ${n}`,children:e})}function Ao({children:e}){return v.jsx("h3",{className:"mb-2 text-[11px] font-semibold uppercase tracking-wider text-slate-400",children:e})}function kl({label:e,edges:n,icon:r,onNavigate:o}){return n.length===0?null:v.jsxs("div",{className:"mb-3",children:[v.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5 text-[10px] font-medium uppercase tracking-wider text-slate-500",children:[v.jsx(r,{className:"h-3 w-3"}),e,v.jsxs("span",{className:"text-slate-600",children:["(",n.length,")"]})]}),v.jsx("ul",{className:"space-y-0.5",children:n.map(i=>v.jsx("li",{children:v.jsxs("button",{type:"button",onClick:()=>o(i.nodeId),className:"flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-xs text-slate-300 transition-colors hover:bg-slate-700/50 hover:text-slate-100",children:[v.jsx(Cc,{className:"h-3 w-3 shrink-0 text-slate-500"}),v.jsx("span",{className:"truncate",children:i.nodeName}),v.jsx("span",{className:"ml-auto shrink-0 text-[10px] text-slate-600",children:i.edgeType})]})},`${i.direction}-${i.edgeType}-${i.nodeId}`))})]})}function TX({filePath:e}){const[n,r]=h.useState(null),[o,i]=h.useState(!0),[s,a]=h.useState(null);if(h.useEffect(()=>{i(!0),a(null),r(null);const c=[e];e.startsWith("src/")||c.push(`src/${e}`);async function u(){for(const d of c)try{const f=await fetch(`/api/file-content?path=${encodeURIComponent(d)}`);if(!f.ok)continue;const p=await f.json();r(p.content),i(!1);return}catch{continue}a("File not found"),i(!1)}u()},[e]),o)return v.jsx("p",{className:"px-3 py-2 text-xs text-slate-500",children:"Loading source..."});if(s)return v.jsxs("p",{className:"px-3 py-2 text-xs text-red-400",children:["Failed to load: ",s]});if(!n)return null;const l=n.split(`
379
+ `);return v.jsx("div",{className:"overflow-auto rounded border border-slate-700/50 bg-slate-900/80",children:v.jsx("pre",{className:"p-3 text-[11px] leading-[1.6]",children:v.jsx("code",{children:l.map((c,u)=>v.jsxs("div",{className:"flex",children:[v.jsx("span",{className:"mr-4 inline-block w-8 select-none text-right text-slate-600",children:u+1}),v.jsx("span",{className:"flex-1 text-slate-300",children:c||" "})]},u))})})})}function IX({nodeId:e,nodeLayer:n,graphs:r,onClose:o,onNavigate:i}){const s=NX(e,n,r),a=PX(e,n,r),l=n==="ui"?RX(e,r):{to:[],from:[]},c=a.filter(g=>g.edgeType==="renders"&&g.direction==="outgoing"),u=a.filter(g=>g.edgeType==="renders"&&g.direction==="incoming"),d=a.filter(g=>g.edgeType==="imports"&&g.direction==="outgoing"),f=a.filter(g=>g.edgeType==="imports"&&g.direction==="incoming");if(!s)return v.jsx("div",{className:"flex h-full flex-col bg-slate-900/95",children:v.jsxs("div",{className:"flex items-center justify-between border-b border-slate-700/50 px-4 py-3",children:[v.jsx("span",{className:"text-sm text-slate-400",children:"Node not found"}),v.jsx("button",{type:"button",onClick:o,className:"rounded p-1 hover:bg-slate-700/50",children:v.jsx(Ec,{className:"h-4 w-4 text-slate-400"})})]})});const p=MX[n],m=g=>i(g,"ui");return v.jsxs("div",{className:"flex h-full flex-col bg-slate-900/95 overflow-hidden",children:[v.jsxs("div",{className:"flex items-center gap-3 border-b border-slate-700/50 px-5 py-4",children:[v.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-slate-800",children:v.jsx(p,{className:"h-4 w-4 text-slate-400"})}),v.jsxs("div",{className:"min-w-0 flex-1",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("h2",{className:"truncate text-sm font-semibold text-slate-100",children:s.name}),v.jsx(AX,{type:s.type})]}),v.jsx("p",{className:"mt-0.5 truncate font-mono text-[10px] text-slate-500",children:s.id})]}),v.jsx("button",{type:"button",onClick:o,className:"rounded-md p-1.5 text-slate-400 transition-colors hover:bg-slate-700/50 hover:text-slate-200",children:v.jsx(Ec,{className:"h-4 w-4"})})]}),v.jsxs("div",{className:"flex-1 overflow-y-auto px-5 py-4 space-y-5",children:[v.jsxs("section",{children:[v.jsx(Ao,{children:"Info"}),v.jsxs("div",{className:"space-y-1.5 text-xs",children:[s.module&&v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("span",{className:"w-16 shrink-0 text-slate-500",children:"Module"}),v.jsx("span",{className:`text-slate-300 ${s.module==="untagged"?"text-yellow-500/70 italic":""}`,children:s.module})]}),s.route&&v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("span",{className:"w-16 shrink-0 text-slate-500",children:"Route"}),v.jsx("span",{className:"font-mono text-slate-300",children:s.route})]}),s.methods&&s.methods.length>0&&v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("span",{className:"w-16 shrink-0 text-slate-500",children:"Methods"}),v.jsx("span",{className:"flex gap-1",children:s.methods.map(g=>v.jsx("span",{className:"rounded bg-violet-500/15 px-1.5 py-0.5 font-mono text-[10px] text-violet-300",children:g},g))})]}),s.path&&v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("span",{className:"w-16 shrink-0 text-slate-500",children:"Path"}),v.jsx("span",{className:"font-mono text-slate-300",children:s.path})]}),s.exports&&s.exports.length>0&&v.jsxs("div",{className:"flex items-start gap-2",children:[v.jsx("span",{className:"w-16 shrink-0 pt-0.5 text-slate-500",children:"Exports"}),v.jsx("div",{className:"flex flex-wrap gap-1",children:s.exports.map(g=>v.jsx("span",{className:"rounded bg-slate-700/50 px-1.5 py-0.5 font-mono text-[10px] text-slate-300",children:g},g))})]}),s.db_models&&s.db_models.length>0&&v.jsxs("div",{className:"flex items-start gap-2",children:[v.jsx("span",{className:"w-16 shrink-0 pt-0.5 text-slate-500",children:"Models"}),v.jsx("div",{className:"flex flex-wrap gap-1",children:s.db_models.map(g=>v.jsx("span",{className:"rounded bg-emerald-500/15 px-1.5 py-0.5 font-mono text-[10px] text-emerald-300",children:g},g))})]})]})]}),s.tags&&Object.keys(s.tags).length>0&&v.jsxs("section",{children:[v.jsx(Ao,{children:"Tags"}),v.jsx("div",{className:"flex flex-wrap gap-1.5",children:Object.entries(s.tags).map(([g,b])=>v.jsxs("span",{className:`inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[10px] ${g==="module"||g==="screen"?"bg-purple-500/15 text-purple-300":"bg-sky-500/15 text-sky-300"}`,children:[v.jsxs("span",{className:"font-medium",children:[g,":"]}),v.jsx("span",{children:b})]},g))})]}),s.columns&&s.columns.length>0&&v.jsxs("section",{children:[v.jsx(Ao,{children:"Columns"}),v.jsx("div",{className:"overflow-hidden rounded border border-slate-700/50",children:v.jsxs("table",{className:"w-full text-xs",children:[v.jsx("thead",{children:v.jsxs("tr",{className:"border-b border-slate-700/50 bg-slate-800/50",children:[v.jsx("th",{className:"px-3 py-1.5 text-left font-medium text-slate-400",children:"Name"}),v.jsx("th",{className:"px-3 py-1.5 text-left font-medium text-slate-400",children:"Type"})]})}),v.jsx("tbody",{children:s.columns.map(g=>v.jsxs("tr",{className:"border-b border-slate-800/50 last:border-0",children:[v.jsx("td",{className:"px-3 py-1.5 font-mono text-slate-300",children:g.name}),v.jsx("td",{className:"px-3 py-1.5 font-mono text-slate-500",children:g.type})]},g.name))})]})})]}),(c.length>0||u.length>0||d.length>0||f.length>0)&&v.jsxs("section",{children:[v.jsx(Ao,{children:"Component Tree"}),v.jsx(kl,{label:"Renders",edges:c,icon:bT,onNavigate:m}),v.jsx(kl,{label:"Rendered by",edges:u,icon:Wb,onNavigate:m}),v.jsx(kl,{label:"Imports",edges:d,icon:cv,onNavigate:m}),v.jsx(kl,{label:"Imported by",edges:f,icon:cv,onNavigate:m})]}),(l.to.length>0||l.from.length>0)&&v.jsxs("section",{children:[v.jsx(Ao,{children:"Navigation"}),l.to.length>0&&v.jsxs("div",{className:"mb-3",children:[v.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5 text-[10px] font-medium uppercase tracking-wider text-slate-500",children:[v.jsx(lv,{className:"h-3 w-3"}),"Navigates to",v.jsxs("span",{className:"text-slate-600",children:["(",l.to.length,")"]})]}),v.jsx("ul",{className:"space-y-0.5",children:l.to.map(g=>v.jsx("li",{children:v.jsxs("button",{type:"button",onClick:()=>m(g.id),className:"flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-xs text-slate-300 transition-colors hover:bg-slate-700/50 hover:text-slate-100",children:[v.jsx(Cc,{className:"h-3 w-3 shrink-0 text-slate-500"}),v.jsx("span",{className:"truncate",children:g.name}),g.route&&v.jsx("span",{className:"ml-auto shrink-0 font-mono text-[10px] text-slate-600",children:g.route})]})},g.id))})]}),l.from.length>0&&v.jsxs("div",{className:"mb-3",children:[v.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5 text-[10px] font-medium uppercase tracking-wider text-slate-500",children:[v.jsx(lv,{className:"h-3 w-3"}),"Navigated from",v.jsxs("span",{className:"text-slate-600",children:["(",l.from.length,")"]})]}),v.jsx("ul",{className:"space-y-0.5",children:l.from.map(g=>v.jsx("li",{children:v.jsxs("button",{type:"button",onClick:()=>m(g.id),className:"flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-xs text-slate-300 transition-colors hover:bg-slate-700/50 hover:text-slate-100",children:[v.jsx(Cc,{className:"h-3 w-3 shrink-0 text-slate-500"}),v.jsx("span",{className:"truncate",children:g.name}),g.route&&v.jsx("span",{className:"ml-auto shrink-0 font-mono text-[10px] text-slate-600",children:g.route})]})},g.id))})]})]}),v.jsxs("section",{children:[v.jsx(Ao,{children:"Source Code"}),v.jsx(TX,{filePath:s.id})]})]})]})}function $X(){var y;const[e,n]=h.useState(null),[r,o]=h.useState(null),[i,s]=h.useState(null),[a,l]=h.useState(null),[c,u]=h.useState(null),[d,f]=h.useState("ui");h.useEffect(()=>{fetch("/api/raw-graphs").then(x=>{if(!x.ok)throw new Error(`HTTP ${x.status}`);return x.json()}).then(x=>n(x)).catch(x=>o(String(x)))},[]);const p=h.useMemo(()=>e!=null&&e.ui?e.ui.nodes.filter(x=>ek(x)&&Rs(x)):[],[e]),m=h.useMemo(()=>{const x=new Map;for(const E of p){const k=Rs(E);x.has(k)||x.set(k,[]),x.get(k).push(E)}const w=[],S=new Map;for(const[E,k]of x)k.length===1?w.push(...k):S.set(E,k);const C=[...S.entries()].map(([E,k])=>({module:E,screens:k})).sort((E,k)=>k.screens.length-E.screens.length);return w.length>0&&C.push({module:"misc",screens:w}),C.sort((E,k)=>E.module==="untagged"?1:k.module==="untagged"?-1:E.module==="misc"?1:k.module==="misc"?-1:k.screens.length-E.screens.length),C},[p]),g=i??((y=m[0])==null?void 0:y.module)??null,b=h.useMemo(()=>{var x;return g?((x=m.find(w=>w.module===g))==null?void 0:x.screens)??[]:[]},[m,g]),_=h.useMemo(()=>!(e!=null&&e.ui)||!a?null:e.ui.nodes.find(x=>x.id===a)??null,[e,a]);return r?v.jsx(DX,{message:r}):e?v.jsxs("div",{className:"flex h-full min-h-0",children:[v.jsxs("div",{className:`flex w-64 flex-col border-r border-sidebar-border bg-sidebar-background/40 ${c?"hidden":""}`,children:[v.jsxs("div",{className:"border-b border-sidebar-border px-4 py-3",children:[v.jsx("h2",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Modules"}),v.jsxs("p",{className:"mt-0.5 text-[11px] text-muted-foreground",children:[m.length," modules · ",p.length," screens"]})]}),v.jsx("ul",{className:"flex-1 overflow-y-auto px-2 py-2",children:m.map(x=>{const w=x.module===g;return v.jsx("li",{children:v.jsxs("button",{type:"button",onClick:()=>{s(x.module),l(null),u(null)},className:`flex w-full items-center justify-between rounded-md px-3 py-2 text-sm transition-colors ${w?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"} ${x.module==="untagged"?"border border-dashed border-yellow-500/30":""}`,children:[v.jsxs("span",{className:"flex items-center gap-2",children:[v.jsx(ma,{className:`h-3.5 w-3.5 shrink-0 ${x.module==="untagged"?"text-yellow-500/70":"opacity-70"}`}),qc(x.module)]}),v.jsx("span",{className:"text-xs tabular-nums text-muted-foreground",children:x.screens.length})]})},x.module)})})]}),v.jsx("div",{className:"flex flex-1 flex-col overflow-hidden",children:_?v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"flex items-center gap-3 border-b border-sidebar-border px-6 py-4",children:[v.jsxs("button",{type:"button",onClick:()=>{l(null),u(null)},className:"flex items-center gap-1.5 rounded-md border border-sidebar-border px-2.5 py-1 text-xs text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground",children:[v.jsx(Wb,{className:"h-3 w-3"}),"Back"]}),v.jsxs("div",{className:"min-w-0",children:[v.jsx("h1",{className:"truncate text-lg font-semibold text-foreground",children:oa(_)}),_.route&&v.jsx("p",{className:"mt-0.5 truncate font-mono text-[11px] text-muted-foreground",children:_.route})]})]}),v.jsx("div",{className:"flex-1 min-h-0",children:v.jsx(_X,{screen:_,graphs:e,selectedNodeId:c,onNodeSelect:(x,w)=>{u(x),f(w)}})})]}):v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"border-b border-sidebar-border px-6 py-4",children:[v.jsx("h1",{className:"text-lg font-semibold text-foreground",children:g?qc(g):"Select a module"}),v.jsxs("p",{className:"mt-0.5 text-xs text-muted-foreground",children:[b.length," screens · click a screen to drill in"]})]}),v.jsx("div",{className:"flex-1 min-h-0",children:g&&b.length>0?v.jsx(kX,{module:g,screens:b,onScreenClick:l},g):v.jsx("div",{className:"flex h-full items-center justify-center",children:v.jsx("p",{className:"text-sm text-muted-foreground",children:g?"No screens in this module.":"Select a module."})})})]})}),c&&e&&v.jsx("div",{className:"flex w-[420px] shrink-0 flex-col border-l border-sidebar-border bg-slate-900/95",children:v.jsx(IX,{nodeId:c,nodeLayer:d,graphs:e,onClose:()=>u(null),onNavigate:(x,w)=>{u(x),f(w)}})})]}):v.jsx(OX,{})}function OX(){return v.jsx("div",{className:"flex h-full items-center justify-center",children:v.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading graph data…"})})}function DX({message:e}){return v.jsx("div",{className:"flex h-full items-center justify-center p-8",children:v.jsxs("div",{className:"max-w-md text-center",children:[v.jsx("h2",{className:"text-sm font-semibold text-foreground",children:"Failed to load graph"}),v.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:e})]})})}function LX(){return v.jsx("div",{className:"flex h-full items-center justify-center p-8",children:v.jsxs("div",{className:"text-center",children:[v.jsx("h1",{className:"text-2xl font-semibold text-foreground",children:"User Journeys"}),v.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"User journey flowcharts coming soon."})]})})}function zX(){const[e,n]=h.useState(null),[r,o]=h.useState(!0),[i,s]=h.useState(!1),[a,l]=h.useState(!1),[c,u]=h.useState(null),[d,f]=h.useState(new Set),[p,m]=h.useState("fetch-resolver"),[g,b]=h.useState([]),[_,y]=h.useState(""),[x,w]=h.useState("crosslayer"),[S,C]=h.useState(new Set),[E,k]=h.useState({module:!0,screen:!0}),[N,j]=h.useState([]),[$,I]=h.useState(""),[O,H]=h.useState(""),R=h.useCallback(async()=>{var P,W,T,X,F,B,G,U;try{const Y=await fetch("/api/parser-config");if(!Y.ok)throw new Error(`HTTP ${Y.status}`);const K=await Y.json();n(K),f(new Set(((P=K.config.parsers)==null?void 0:P.disabled)??[])),m(((T=(W=K.config.parsers)==null?void 0:W.primary)==null?void 0:T.crosslayer)??"fetch-resolver"),b(((X=K.config.parsers)==null?void 0:X.custom)??[]),C(new Set(((F=K.config.taggers)==null?void 0:F.disabled)??[])),k(((B=K.config.taggers)==null?void 0:B.trackUntagged)??{module:!0,screen:!0}),j(((U=(G=K.config.taggers)==null?void 0:G.module)==null?void 0:U.rules)??[]),o(!1)}catch(Y){u(String(Y)),o(!1)}},[]);h.useEffect(()=>{R()},[R]);const L=h.useCallback(async()=>{s(!0),l(!1),u(null);try{const P={};S.size>0&&(P.disabled=[...S]),Object.keys(E).length>0&&(P.trackUntagged=E),N.length>0&&(P.module={rules:N});const W={parsers:{primary:{crosslayer:p},disabled:[...d],custom:g.length>0?g:void 0},...Object.keys(P).length>0&&{taggers:P}};W.parsers.disabled.length===0&&delete W.parsers.disabled,W.parsers.custom||delete W.parsers.custom;const T=await fetch("/api/parser-config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(W)});if(!T.ok)throw new Error(`HTTP ${T.status}`);l(!0),setTimeout(()=>l(!1),3e3)}catch(P){u(String(P))}finally{s(!1)}},[p,d,g,S,E,N]),D=P=>{f(W=>{const T=new Set(W);return T.has(P)?T.delete(P):T.add(P),T})},z=()=>{_.trim()&&(b(P=>[...P,{path:_.trim(),layer:x}]),y(""))},A=P=>{b(W=>W.filter((T,X)=>X!==P))};if(r)return v.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:"Loading configuration..."});const M=[...((e==null?void 0:e.detection)??[]).map(P=>({...P,kind:"standard"})),...((e==null?void 0:e.crosslayerParsers)??[]).map(P=>({id:P.id,layer:"crosslayer",label:P.label,detected:!0,kind:"crosslayer"}))];return v.jsxs("div",{className:"h-full overflow-y-auto p-6",children:[v.jsxs("div",{className:"flex items-center justify-between mb-6",children:[v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx(Yb,{className:"h-6 w-6 text-muted-foreground"}),v.jsx("h1",{className:"text-xl font-semibold",children:"Parser Configuration"})]}),v.jsxs("button",{onClick:L,disabled:i,className:"flex items-center gap-2 px-4 py-2 rounded-lg bg-purple-600 hover:bg-purple-500 text-white text-sm font-medium transition-colors disabled:opacity-50",children:[a?v.jsx(av,{className:"h-4 w-4"}):v.jsx(JT,{className:"h-4 w-4"}),i?"Saving...":a?"Saved":"Save"]})]}),c&&v.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-lg bg-red-500/10 text-red-400 text-sm mb-6",children:[v.jsx(RT,{className:"h-4 w-4 shrink-0"}),c]}),v.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-6",children:[v.jsxs("div",{className:"space-y-6",children:[v.jsxs("section",{className:"space-y-3",children:[v.jsx("h2",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:"Stack Detection"}),v.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 xl:grid-cols-1 gap-2",children:((e==null?void 0:e.detection)??[]).map(P=>v.jsxs("div",{className:`flex items-center gap-2 p-3 rounded-lg border ${P.detected?"border-green-500/30 bg-green-500/5":"border-border/50 bg-muted/20 opacity-50"}`,children:[P.detected?v.jsx(av,{className:"h-4 w-4 text-green-500 shrink-0"}):v.jsx(AT,{className:"h-4 w-4 text-muted-foreground shrink-0"}),v.jsxs("div",{children:[v.jsx("div",{className:"text-sm font-medium",children:P.label}),v.jsxs("div",{className:"text-xs text-muted-foreground",children:[P.layer," layer"]})]})]},P.id))})]}),v.jsxs("section",{className:"space-y-3",children:[v.jsx("h2",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:"Primary Cross-Layer Parser"}),v.jsx("p",{className:"text-xs text-muted-foreground",children:'API calls detected by other parsers but not by the primary will be flagged as "out of pattern".'}),v.jsx("div",{className:"space-y-2",children:((e==null?void 0:e.crosslayerParsers)??[]).map(P=>v.jsxs("label",{className:`flex items-center gap-3 p-3 rounded-lg border cursor-pointer transition-colors ${p===P.id?"border-purple-500/50 bg-purple-500/5":"border-border/50 bg-card hover:border-border"}`,children:[v.jsx("input",{type:"radio",name:"primary",value:P.id,checked:p===P.id,onChange:()=>m(P.id),className:"accent-purple-600"}),v.jsxs("div",{children:[v.jsx("div",{className:"text-sm font-medium",children:P.label}),v.jsx("div",{className:"text-xs text-muted-foreground",children:P.id})]})]},P.id))})]})]}),v.jsxs("div",{className:"space-y-6",children:[v.jsxs("section",{className:"space-y-3",children:[v.jsx("h2",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:"Parsers"}),v.jsx("div",{className:"space-y-2",children:M.map(P=>v.jsxs("div",{className:"flex items-center justify-between p-3 rounded-lg border border-border/50 bg-card",children:[v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx("button",{onClick:()=>D(P.id),className:`w-10 h-5 rounded-full transition-colors relative shrink-0 ${d.has(P.id)?"bg-muted":"bg-purple-600"}`,children:v.jsx("span",{className:`block absolute top-0.5 left-0.5 h-4 w-4 rounded-full bg-white transition-all ${d.has(P.id)?"left-0.5":"left-[22px]"}`})}),v.jsxs("div",{children:[v.jsx("div",{className:"text-sm font-medium",children:P.label}),v.jsxs("div",{className:"text-xs text-muted-foreground",children:[P.id," — ",P.layer]})]})]}),P.kind==="crosslayer"&&v.jsx("span",{className:"text-xs px-2 py-0.5 rounded bg-purple-500/10 text-purple-400",children:"cross-layer"})]},P.id))})]}),v.jsxs("section",{className:"space-y-3",children:[v.jsx("h2",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:"Custom Parsers"}),v.jsx("p",{className:"text-xs text-muted-foreground",children:"JS files exporting a parser object. Path relative to project root."}),g.length>0&&v.jsx("div",{className:"space-y-2",children:g.map((P,W)=>v.jsxs("div",{className:"flex items-center gap-2 p-2 rounded-lg border border-border/50 bg-card",children:[v.jsx("code",{className:"text-xs flex-1 text-muted-foreground",children:P.path}),v.jsx("span",{className:"text-xs px-2 py-0.5 rounded bg-muted text-muted-foreground",children:P.layer}),v.jsx("button",{onClick:()=>A(W),className:"text-red-400 hover:text-red-300",children:v.jsx(fv,{className:"h-3.5 w-3.5"})})]},W))}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("input",{type:"text",value:_,onChange:P=>y(P.target.value),placeholder:"./parsers/my-parser.js",className:"flex-1 px-3 py-1.5 text-sm rounded-lg border border-border/50 bg-background text-foreground placeholder:text-muted-foreground",onKeyDown:P=>P.key==="Enter"&&z()}),v.jsxs("select",{value:x,onChange:P=>w(P.target.value),className:"px-2 py-1.5 text-sm rounded-lg border border-border/50 bg-background text-foreground",children:[v.jsx("option",{value:"crosslayer",children:"crosslayer"}),v.jsx("option",{value:"ui",children:"ui"}),v.jsx("option",{value:"api",children:"api"}),v.jsx("option",{value:"db",children:"db"})]}),v.jsx("button",{onClick:z,className:"p-1.5 rounded-lg border border-border/50 hover:bg-muted transition-colors",children:v.jsx(uv,{className:"h-4 w-4"})})]})]})]})]}),v.jsxs("div",{className:"mt-8 border-t border-border/30 pt-6",children:[v.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[v.jsx(s3,{className:"h-5 w-5 text-muted-foreground"}),v.jsx("h2",{className:"text-lg font-semibold",children:"Taggers"})]}),v.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-6",children:[v.jsxs("section",{className:"space-y-3",children:[v.jsx("h3",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:"Built-in Taggers"}),[{id:"module",label:"Module",description:"Assigns modules from directory structure"},{id:"screen",label:"Screen",description:"Marks pages and layouts as screens"}].map(P=>v.jsxs("div",{className:"p-3 rounded-lg border border-border/50 bg-card space-y-2",children:[v.jsx("div",{className:"flex items-center justify-between",children:v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx("button",{onClick:()=>C(W=>{const T=new Set(W);return T.has(P.id)?T.delete(P.id):T.add(P.id),T}),className:`w-10 h-5 rounded-full transition-colors relative shrink-0 ${S.has(P.id)?"bg-muted":"bg-purple-600"}`,children:v.jsx("span",{className:`block absolute top-0.5 left-0.5 h-4 w-4 rounded-full bg-white transition-all ${S.has(P.id)?"left-0.5":"left-[22px]"}`})}),v.jsxs("div",{children:[v.jsx("div",{className:"text-sm font-medium",children:P.label}),v.jsx("div",{className:"text-xs text-muted-foreground",children:P.description})]})]})}),v.jsxs("label",{className:"flex items-center gap-2 text-xs text-muted-foreground pl-[52px]",children:[v.jsx("input",{type:"checkbox",checked:E[P.id]??!0,onChange:W=>k(T=>({...T,[P.id]:W.target.checked})),className:"accent-purple-600"}),"Track untagged nodes"]})]},P.id))]}),v.jsxs("section",{className:"space-y-3",children:[v.jsx("h3",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:"Module Rules"}),v.jsx("p",{className:"text-xs text-muted-foreground",children:"Custom glob patterns to assign modules. Matched before auto-detection."}),N.length>0&&v.jsx("div",{className:"space-y-2",children:N.map((P,W)=>v.jsxs("div",{className:"flex items-center gap-2 p-2 rounded-lg border border-border/50 bg-card",children:[v.jsx("code",{className:"text-xs flex-1 text-muted-foreground",children:P.match}),v.jsx("span",{className:"text-xs px-2 py-0.5 rounded bg-purple-500/10 text-purple-400",children:P.module}),v.jsx("button",{onClick:()=>j(T=>T.filter((X,F)=>F!==W)),className:"text-red-400 hover:text-red-300",children:v.jsx(fv,{className:"h-3.5 w-3.5"})})]},W))}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("input",{type:"text",value:$,onChange:P=>I(P.target.value),placeholder:"app/(admin)/**",className:"flex-1 px-3 py-1.5 text-sm rounded-lg border border-border/50 bg-background text-foreground placeholder:text-muted-foreground"}),v.jsx("input",{type:"text",value:O,onChange:P=>H(P.target.value),placeholder:"admin",className:"w-28 px-3 py-1.5 text-sm rounded-lg border border-border/50 bg-background text-foreground placeholder:text-muted-foreground"}),v.jsx("button",{onClick:()=>{$.trim()&&O.trim()&&(j(P=>[...P,{match:$.trim(),module:O.trim()}]),I(""),H(""))},className:"p-1.5 rounded-lg border border-border/50 hover:bg-muted transition-colors",children:v.jsx(uv,{className:"h-4 w-4"})})]})]})]})]})]})}function FX(){return v.jsxs("div",{className:"flex h-screen flex-col overflow-hidden bg-background text-foreground",children:[v.jsx(Wz,{}),v.jsxs("div",{className:"flex flex-1 min-h-0",children:[v.jsx(Xz,{}),v.jsx("main",{className:"flex-1 min-h-0 overflow-hidden content-gradient",children:v.jsxs(Ij,{children:[v.jsx(Gr,{path:"/overview",element:v.jsx(YW,{})}),v.jsx(Gr,{path:"/modules",element:v.jsx($X,{})}),v.jsx(Gr,{path:"/journeys",element:v.jsx(LX,{})}),v.jsx(Gr,{path:"/project-graph",element:v.jsx(UW,{})}),v.jsx(Gr,{path:"/settings",element:v.jsx(zX,{})}),v.jsx(Gr,{path:"*",element:v.jsx(Aj,{to:"/overview",replace:!0})})]})})]})]})}yd.createRoot(document.getElementById("root")).render(v.jsx(Je.StrictMode,{children:v.jsx(Bj,{children:v.jsx(Qj,{children:v.jsx(FX,{})})})}));