modscape 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,40 +0,0 @@
1
- function TS(t,i){for(var a=0;a<i.length;a++){const r=i[a];if(typeof r!="string"&&!Array.isArray(r)){for(const u in r)if(u!=="default"&&!(u in t)){const f=Object.getOwnPropertyDescriptor(r,u);f&&Object.defineProperty(t,u,f.get?f:{enumerable:!0,get:()=>r[u]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))r(u);new MutationObserver(u=>{for(const f of u)if(f.type==="childList")for(const s of f.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function a(u){const f={};return u.integrity&&(f.integrity=u.integrity),u.referrerPolicy&&(f.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?f.credentials="include":u.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function r(u){if(u.ep)return;u.ep=!0;const f=a(u);fetch(u.href,f)}})();function gy(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Af={exports:{}},Co={};var Um;function MS(){if(Um)return Co;Um=1;var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function a(r,u,f){var s=null;if(f!==void 0&&(s=""+f),u.key!==void 0&&(s=""+u.key),"key"in u){f={};for(var h in u)h!=="key"&&(f[h]=u[h])}else f=u;return u=f.ref,{$$typeof:t,type:r,key:s,ref:u!==void 0?u:null,props:f}}return Co.Fragment=i,Co.jsx=a,Co.jsxs=a,Co}var Lm;function zS(){return Lm||(Lm=1,Af.exports=MS()),Af.exports}var A=zS(),Nf={exports:{}},we={};var Bm;function OS(){if(Bm)return we;Bm=1;var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),s=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),b=Symbol.iterator;function E(_){return _===null||typeof _!="object"?null:(_=b&&_[b]||_["@@iterator"],typeof _=="function"?_:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,T={};function M(_,U,F){this.props=_,this.context=U,this.refs=T,this.updater=F||C}M.prototype.isReactComponent={},M.prototype.setState=function(_,U){if(typeof _!="object"&&typeof _!="function"&&_!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,_,U,"setState")},M.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function D(){}D.prototype=M.prototype;function q(_,U,F){this.props=_,this.context=U,this.refs=T,this.updater=F||C}var j=q.prototype=new D;j.constructor=q,N(j,M.prototype),j.isPureReactComponent=!0;var I=Array.isArray;function G(){}var $={H:null,A:null,T:null,S:null},B=Object.prototype.hasOwnProperty;function ee(_,U,F){var P=F.ref;return{$$typeof:t,type:_,key:U,ref:P!==void 0?P:null,props:F}}function oe(_,U){return ee(_.type,U,_.props)}function re(_){return typeof _=="object"&&_!==null&&_.$$typeof===t}function ue(_){var U={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(F){return U[F]})}var ie=/\/+/g;function x(_,U){return typeof _=="object"&&_!==null&&_.key!=null?ue(""+_.key):U.toString(36)}function H(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(G,G):(_.status="pending",_.then(function(U){_.status==="pending"&&(_.status="fulfilled",_.value=U)},function(U){_.status==="pending"&&(_.status="rejected",_.reason=U)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function w(_,U,F,P,ae){var ce=typeof _;(ce==="undefined"||ce==="boolean")&&(_=null);var fe=!1;if(_===null)fe=!0;else switch(ce){case"bigint":case"string":case"number":fe=!0;break;case"object":switch(_.$$typeof){case t:case i:fe=!0;break;case g:return fe=_._init,w(fe(_._payload),U,F,P,ae)}}if(fe)return ae=ae(_),fe=P===""?"."+x(_,0):P,I(ae)?(F="",fe!=null&&(F=fe.replace(ie,"$&/")+"/"),w(ae,U,F,"",function(Ae){return Ae})):ae!=null&&(re(ae)&&(ae=oe(ae,F+(ae.key==null||_&&_.key===ae.key?"":(""+ae.key).replace(ie,"$&/")+"/")+fe)),U.push(ae)),1;fe=0;var be=P===""?".":P+":";if(I(_))for(var de=0;de<_.length;de++)P=_[de],ce=be+x(P,de),fe+=w(P,U,F,ce,ae);else if(de=E(_),typeof de=="function")for(_=de.call(_),de=0;!(P=_.next()).done;)P=P.value,ce=be+x(P,de++),fe+=w(P,U,F,ce,ae);else if(ce==="object"){if(typeof _.then=="function")return w(H(_),U,F,P,ae);throw U=String(_),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.")}return fe}function R(_,U,F){if(_==null)return _;var P=[],ae=0;return w(_,P,"","",function(ce){return U.call(F,ce,ae++)}),P}function X(_){if(_._status===-1){var U=_._result;U=U(),U.then(function(F){(_._status===0||_._status===-1)&&(_._status=1,_._result=F)},function(F){(_._status===0||_._status===-1)&&(_._status=2,_._result=F)}),_._status===-1&&(_._status=0,_._result=U)}if(_._status===1)return _._result.default;throw _._result}var L=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var U=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(U))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)},Y={map:R,forEach:function(_,U,F){R(_,function(){U.apply(this,arguments)},F)},count:function(_){var U=0;return R(_,function(){U++}),U},toArray:function(_){return R(_,function(U){return U})||[]},only:function(_){if(!re(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return we.Activity=v,we.Children=Y,we.Component=M,we.Fragment=a,we.Profiler=u,we.PureComponent=q,we.StrictMode=r,we.Suspense=p,we.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=$,we.__COMPILER_RUNTIME={__proto__:null,c:function(_){return $.H.useMemoCache(_)}},we.cache=function(_){return function(){return _.apply(null,arguments)}},we.cacheSignal=function(){return null},we.cloneElement=function(_,U,F){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var P=N({},_.props),ae=_.key;if(U!=null)for(ce in U.key!==void 0&&(ae=""+U.key),U)!B.call(U,ce)||ce==="key"||ce==="__self"||ce==="__source"||ce==="ref"&&U.ref===void 0||(P[ce]=U[ce]);var ce=arguments.length-2;if(ce===1)P.children=F;else if(1<ce){for(var fe=Array(ce),be=0;be<ce;be++)fe[be]=arguments[be+2];P.children=fe}return ee(_.type,ae,P)},we.createContext=function(_){return _={$$typeof:s,_currentValue:_,_currentValue2:_,_threadCount:0,Provider:null,Consumer:null},_.Provider=_,_.Consumer={$$typeof:f,_context:_},_},we.createElement=function(_,U,F){var P,ae={},ce=null;if(U!=null)for(P in U.key!==void 0&&(ce=""+U.key),U)B.call(U,P)&&P!=="key"&&P!=="__self"&&P!=="__source"&&(ae[P]=U[P]);var fe=arguments.length-2;if(fe===1)ae.children=F;else if(1<fe){for(var be=Array(fe),de=0;de<fe;de++)be[de]=arguments[de+2];ae.children=be}if(_&&_.defaultProps)for(P in fe=_.defaultProps,fe)ae[P]===void 0&&(ae[P]=fe[P]);return ee(_,ce,ae)},we.createRef=function(){return{current:null}},we.forwardRef=function(_){return{$$typeof:h,render:_}},we.isValidElement=re,we.lazy=function(_){return{$$typeof:g,_payload:{_status:-1,_result:_},_init:X}},we.memo=function(_,U){return{$$typeof:m,type:_,compare:U===void 0?null:U}},we.startTransition=function(_){var U=$.T,F={};$.T=F;try{var P=_(),ae=$.S;ae!==null&&ae(F,P),typeof P=="object"&&P!==null&&typeof P.then=="function"&&P.then(G,L)}catch(ce){L(ce)}finally{U!==null&&F.types!==null&&(U.types=F.types),$.T=U}},we.unstable_useCacheRefresh=function(){return $.H.useCacheRefresh()},we.use=function(_){return $.H.use(_)},we.useActionState=function(_,U,F){return $.H.useActionState(_,U,F)},we.useCallback=function(_,U){return $.H.useCallback(_,U)},we.useContext=function(_){return $.H.useContext(_)},we.useDebugValue=function(){},we.useDeferredValue=function(_,U){return $.H.useDeferredValue(_,U)},we.useEffect=function(_,U){return $.H.useEffect(_,U)},we.useEffectEvent=function(_){return $.H.useEffectEvent(_)},we.useId=function(){return $.H.useId()},we.useImperativeHandle=function(_,U,F){return $.H.useImperativeHandle(_,U,F)},we.useInsertionEffect=function(_,U){return $.H.useInsertionEffect(_,U)},we.useLayoutEffect=function(_,U){return $.H.useLayoutEffect(_,U)},we.useMemo=function(_,U){return $.H.useMemo(_,U)},we.useOptimistic=function(_,U){return $.H.useOptimistic(_,U)},we.useReducer=function(_,U,F){return $.H.useReducer(_,U,F)},we.useRef=function(_){return $.H.useRef(_)},we.useState=function(_){return $.H.useState(_)},we.useSyncExternalStore=function(_,U,F){return $.H.useSyncExternalStore(_,U,F)},we.useTransition=function(){return $.H.useTransition()},we.version="19.2.4",we}var Ym;function Fo(){return Ym||(Ym=1,Nf.exports=OS()),Nf.exports}var z=Fo();const W=gy(z),yy=TS({__proto__:null,default:W},[z]);var Cf={exports:{}},To={},Tf={exports:{}},Mf={};var Vm;function DS(){return Vm||(Vm=1,(function(t){function i(w,R){var X=w.length;w.push(R);e:for(;0<X;){var L=X-1>>>1,Y=w[L];if(0<u(Y,R))w[L]=R,w[X]=Y,X=L;else break e}}function a(w){return w.length===0?null:w[0]}function r(w){if(w.length===0)return null;var R=w[0],X=w.pop();if(X!==R){w[0]=X;e:for(var L=0,Y=w.length,_=Y>>>1;L<_;){var U=2*(L+1)-1,F=w[U],P=U+1,ae=w[P];if(0>u(F,X))P<Y&&0>u(ae,F)?(w[L]=ae,w[P]=X,L=P):(w[L]=F,w[U]=X,L=U);else if(P<Y&&0>u(ae,X))w[L]=ae,w[P]=X,L=P;else break e}}return R}function u(w,R){var X=w.sortIndex-R.sortIndex;return X!==0?X:w.id-R.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;t.unstable_now=function(){return f.now()}}else{var s=Date,h=s.now();t.unstable_now=function(){return s.now()-h}}var p=[],m=[],g=1,v=null,b=3,E=!1,C=!1,N=!1,T=!1,M=typeof setTimeout=="function"?setTimeout:null,D=typeof clearTimeout=="function"?clearTimeout:null,q=typeof setImmediate<"u"?setImmediate:null;function j(w){for(var R=a(m);R!==null;){if(R.callback===null)r(m);else if(R.startTime<=w)r(m),R.sortIndex=R.expirationTime,i(p,R);else break;R=a(m)}}function I(w){if(N=!1,j(w),!C)if(a(p)!==null)C=!0,G||(G=!0,ue());else{var R=a(m);R!==null&&H(I,R.startTime-w)}}var G=!1,$=-1,B=5,ee=-1;function oe(){return T?!0:!(t.unstable_now()-ee<B)}function re(){if(T=!1,G){var w=t.unstable_now();ee=w;var R=!0;try{e:{C=!1,N&&(N=!1,D($),$=-1),E=!0;var X=b;try{t:{for(j(w),v=a(p);v!==null&&!(v.expirationTime>w&&oe());){var L=v.callback;if(typeof L=="function"){v.callback=null,b=v.priorityLevel;var Y=L(v.expirationTime<=w);if(w=t.unstable_now(),typeof Y=="function"){v.callback=Y,j(w),R=!0;break t}v===a(p)&&r(p),j(w)}else r(p);v=a(p)}if(v!==null)R=!0;else{var _=a(m);_!==null&&H(I,_.startTime-w),R=!1}}break e}finally{v=null,b=X,E=!1}R=void 0}}finally{R?ue():G=!1}}}var ue;if(typeof q=="function")ue=function(){q(re)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,x=ie.port2;ie.port1.onmessage=re,ue=function(){x.postMessage(null)}}else ue=function(){M(re,0)};function H(w,R){$=M(function(){w(t.unstable_now())},R)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(w){w.callback=null},t.unstable_forceFrameRate=function(w){0>w||125<w?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<w?Math.floor(1e3/w):5},t.unstable_getCurrentPriorityLevel=function(){return b},t.unstable_next=function(w){switch(b){case 1:case 2:case 3:var R=3;break;default:R=b}var X=b;b=R;try{return w()}finally{b=X}},t.unstable_requestPaint=function(){T=!0},t.unstable_runWithPriority=function(w,R){switch(w){case 1:case 2:case 3:case 4:case 5:break;default:w=3}var X=b;b=w;try{return R()}finally{b=X}},t.unstable_scheduleCallback=function(w,R,X){var L=t.unstable_now();switch(typeof X=="object"&&X!==null?(X=X.delay,X=typeof X=="number"&&0<X?L+X:L):X=L,w){case 1:var Y=-1;break;case 2:Y=250;break;case 5:Y=1073741823;break;case 4:Y=1e4;break;default:Y=5e3}return Y=X+Y,w={id:g++,callback:R,priorityLevel:w,startTime:X,expirationTime:Y,sortIndex:-1},X>L?(w.sortIndex=X,i(m,w),a(p)===null&&w===a(m)&&(N?(D($),$=-1):N=!0,H(I,X-L))):(w.sortIndex=Y,i(p,w),C||E||(C=!0,G||(G=!0,ue()))),w},t.unstable_shouldYield=oe,t.unstable_wrapCallback=function(w){var R=b;return function(){var X=b;b=R;try{return w.apply(this,arguments)}finally{b=X}}}})(Mf)),Mf}var qm;function RS(){return qm||(qm=1,Tf.exports=DS()),Tf.exports}var zf={exports:{}},Ot={};var Gm;function HS(){if(Gm)return Ot;Gm=1;var t=Fo();function i(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)m+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var r={d:{f:a,r:function(){throw Error(i(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},u=Symbol.for("react.portal");function f(p,m,g){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:v==null?null:""+v,children:p,containerInfo:m,implementation:g}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Ot.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Ot.createPortal=function(p,m){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(i(299));return f(p,m,null,g)},Ot.flushSync=function(p){var m=s.T,g=r.p;try{if(s.T=null,r.p=2,p)return p()}finally{s.T=m,r.p=g,r.d.f()}},Ot.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,r.d.C(p,m))},Ot.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},Ot.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var g=m.as,v=h(g,m.crossOrigin),b=typeof m.integrity=="string"?m.integrity:void 0,E=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;g==="style"?r.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:v,integrity:b,fetchPriority:E}):g==="script"&&r.d.X(p,{crossOrigin:v,integrity:b,fetchPriority:E,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Ot.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var g=h(m.as,m.crossOrigin);r.d.M(p,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&r.d.M(p)},Ot.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var g=m.as,v=h(g,m.crossOrigin);r.d.L(p,g,{crossOrigin:v,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Ot.preloadModule=function(p,m){if(typeof p=="string")if(m){var g=h(m.as,m.crossOrigin);r.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else r.d.m(p)},Ot.requestFormReset=function(p){r.d.r(p)},Ot.unstable_batchedUpdates=function(p,m){return p(m)},Ot.useFormState=function(p,m,g){return s.H.useFormState(p,m,g)},Ot.useFormStatus=function(){return s.H.useHostTransitionStatus()},Ot.version="19.2.4",Ot}var Xm;function vy(){if(Xm)return zf.exports;Xm=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(i){console.error(i)}}return t(),zf.exports=HS(),zf.exports}var Zm;function jS(){if(Zm)return To;Zm=1;var t=RS(),i=Fo(),a=vy();function r(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)n+="&args[]="+encodeURIComponent(arguments[l])}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."}function u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var n=e,l=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(l=n.return),e=n.return;while(e)}return n.tag===3?l:null}function s(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 h(e){if(e.tag===31){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function p(e){if(f(e)!==e)throw Error(r(188))}function m(e){var n=e.alternate;if(!n){if(n=f(e),n===null)throw Error(r(188));return n!==e?null:e}for(var l=e,o=n;;){var c=l.return;if(c===null)break;var d=c.alternate;if(d===null){if(o=c.return,o!==null){l=o;continue}break}if(c.child===d.child){for(d=c.child;d;){if(d===l)return p(c),e;if(d===o)return p(c),n;d=d.sibling}throw Error(r(188))}if(l.return!==o.return)l=c,o=d;else{for(var y=!1,S=c.child;S;){if(S===l){y=!0,l=c,o=d;break}if(S===o){y=!0,o=c,l=d;break}S=S.sibling}if(!y){for(S=d.child;S;){if(S===l){y=!0,l=d,o=c;break}if(S===o){y=!0,o=d,l=c;break}S=S.sibling}if(!y)throw Error(r(189))}}if(l.alternate!==o)throw Error(r(190))}if(l.tag!==3)throw Error(r(188));return l.stateNode.current===l?e:n}function g(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=g(e),n!==null)return n;e=e.sibling}return null}var v=Object.assign,b=Symbol.for("react.element"),E=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),D=Symbol.for("react.consumer"),q=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),G=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),B=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),oe=Symbol.for("react.memo_cache_sentinel"),re=Symbol.iterator;function ue(e){return e===null||typeof e!="object"?null:(e=re&&e[re]||e["@@iterator"],typeof e=="function"?e:null)}var ie=Symbol.for("react.client.reference");function x(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ie?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case N:return"Fragment";case M:return"Profiler";case T:return"StrictMode";case I:return"Suspense";case G:return"SuspenseList";case ee:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case C:return"Portal";case q:return e.displayName||"Context";case D:return(e._context.displayName||"Context")+".Consumer";case j:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $:return n=e.displayName||null,n!==null?n:x(e.type)||"Memo";case B:n=e._payload,e=e._init;try{return x(e(n))}catch{}}return null}var H=Array.isArray,w=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,R=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X={pending:!1,data:null,method:null,action:null},L=[],Y=-1;function _(e){return{current:e}}function U(e){0>Y||(e.current=L[Y],L[Y]=null,Y--)}function F(e,n){Y++,L[Y]=e.current,e.current=n}var P=_(null),ae=_(null),ce=_(null),fe=_(null);function be(e,n){switch(F(ce,n),F(ae,e),F(P,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?om(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=om(n),e=rm(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}U(P),F(P,e)}function de(){U(P),U(ae),U(ce)}function Ae(e){e.memoizedState!==null&&F(fe,e);var n=P.current,l=rm(n,e.type);n!==l&&(F(ae,e),F(P,l))}function Re(e){ae.current===e&&(U(P),U(ae)),fe.current===e&&(U(fe),Eo._currentValue=X)}var Ve,Pe;function Ye(e){if(Ve===void 0)try{throw Error()}catch(l){var n=l.stack.trim().match(/\n( *(at )?)/);Ve=n&&n[1]||"",Pe=-1<l.stack.indexOf(`
2
- at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+Ve+e+Pe}var He=!1;function pt(e,n){if(!e||He)return"";He=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(n){var le=function(){throw Error()};if(Object.defineProperty(le.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(le,[])}catch(J){var K=J}Reflect.construct(e,[],le)}else{try{le.call()}catch(J){K=J}e.call(le.prototype)}}else{try{throw Error()}catch(J){K=J}(le=e())&&typeof le.catch=="function"&&le.catch(function(){})}}catch(J){if(J&&K&&typeof J.stack=="string")return[J.stack,K.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=o.DetermineComponentFrameRoot(),y=d[0],S=d[1];if(y&&S){var O=y.split(`
4
- `),Q=S.split(`
5
- `);for(c=o=0;o<O.length&&!O[o].includes("DetermineComponentFrameRoot");)o++;for(;c<Q.length&&!Q[c].includes("DetermineComponentFrameRoot");)c++;if(o===O.length||c===Q.length)for(o=O.length-1,c=Q.length-1;1<=o&&0<=c&&O[o]!==Q[c];)c--;for(;1<=o&&0<=c;o--,c--)if(O[o]!==Q[c]){if(o!==1||c!==1)do if(o--,c--,0>c||O[o]!==Q[c]){var te=`
6
- `+O[o].replace(" at new "," at ");return e.displayName&&te.includes("<anonymous>")&&(te=te.replace("<anonymous>",e.displayName)),te}while(1<=o&&0<=c);break}}}finally{He=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Ye(l):""}function je(e,n){switch(e.tag){case 26:case 27:case 5:return Ye(e.type);case 16:return Ye("Lazy");case 13:return e.child!==n&&n!==null?Ye("Suspense Fallback"):Ye("Suspense");case 19:return Ye("SuspenseList");case 0:case 15:return pt(e.type,!1);case 11:return pt(e.type.render,!1);case 1:return pt(e.type,!0);case 31:return Ye("Activity");default:return""}}function se(e){try{var n="",l=null;do n+=je(e,l),l=e,e=e.return;while(e);return n}catch(o){return`
7
- Error generating stack: `+o.message+`
8
- `+o.stack}}var ke=Object.prototype.hasOwnProperty,Bt=t.unstable_scheduleCallback,an=t.unstable_cancelCallback,Tn=t.unstable_shouldYield,bn=t.unstable_requestPaint,Fe=t.unstable_now,Tt=t.unstable_getCurrentPriorityLevel,Mt=t.unstable_ImmediatePriority,Ht=t.unstable_UserBlockingPriority,zt=t.unstable_NormalPriority,on=t.unstable_LowPriority,ml=t.unstable_IdlePriority,bt=t.log,rn=t.unstable_setDisableYieldValue,It=null,it=null;function jt(e){if(typeof bt=="function"&&rn(e),it&&typeof it.setStrictMode=="function")try{it.setStrictMode(It,e)}catch{}}var Je=Math.clz32?Math.clz32:Da,Yn=Math.log,Oa=Math.LN2;function Da(e){return e>>>=0,e===0?32:31-(Yn(e)/Oa|0)|0}var Mn=256,gl=262144,ti=4194304;function kt(e){var n=e&42;if(n!==0)return n;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Oi(e,n,l){var o=e.pendingLanes;if(o===0)return 0;var c=0,d=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var S=o&134217727;return S!==0?(o=S&~d,o!==0?c=kt(o):(y&=S,y!==0?c=kt(y):l||(l=S&~e,l!==0&&(c=kt(l))))):(S=o&~d,S!==0?c=kt(S):y!==0?c=kt(y):l||(l=o&~e,l!==0&&(c=kt(l)))),c===0?0:n!==0&&n!==c&&(n&d)===0&&(d=c&-c,l=n&-n,d>=l||d===32&&(l&4194048)!==0)?n:c}function ni(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function dc(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32: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:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function tr(){var e=ti;return ti<<=1,(ti&62914560)===0&&(ti=4194304),e}function Ra(e){for(var n=[],l=0;31>l;l++)n.push(e);return n}function li(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function hc(e,n,l,o,c,d){var y=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var S=e.entanglements,O=e.expirationTimes,Q=e.hiddenUpdates;for(l=y&~l;0<l;){var te=31-Je(l),le=1<<te;S[te]=0,O[te]=-1;var K=Q[te];if(K!==null)for(Q[te]=null,te=0;te<K.length;te++){var J=K[te];J!==null&&(J.lane&=-536870913)}l&=~le}o!==0&&nr(e,o,0),d!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=d&~(y&~n))}function nr(e,n,l){e.pendingLanes|=n,e.suspendedLanes&=~n;var o=31-Je(n);e.entangledLanes|=n,e.entanglements[o]=e.entanglements[o]|1073741824|l&261930}function lr(e,n){var l=e.entangledLanes|=n;for(e=e.entanglements;l;){var o=31-Je(l),c=1<<o;c&n|e[o]&n&&(e[o]|=n),l&=~c}}function ir(e,n){var l=n&-n;return l=(l&42)!==0?1:Ha(l),(l&(e.suspendedLanes|n))!==0?0:l}function Ha(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ja(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ar(){var e=R.p;return e!==0?e:(e=window.event,e===void 0?32:zm(e.type))}function or(e,n){var l=R.p;try{return R.p=e,n()}finally{R.p=l}}var zn=Math.random().toString(36).slice(2),mt="__reactFiber$"+zn,wt="__reactProps$"+zn,yl="__reactContainer$"+zn,ka="__reactEvents$"+zn,pc="__reactListeners$"+zn,mc="__reactHandles$"+zn,rr="__reactResources$"+zn,ii="__reactMarker$"+zn;function Ua(e){delete e[mt],delete e[wt],delete e[ka],delete e[pc],delete e[mc]}function vl(e){var n=e[mt];if(n)return n;for(var l=e.parentNode;l;){if(n=l[yl]||l[mt]){if(l=n.alternate,n.child!==null||l!==null&&l.child!==null)for(e=pm(e);e!==null;){if(l=e[mt])return l;e=pm(e)}return n}e=l,l=e.parentNode}return null}function Vn(e){if(e=e[mt]||e[yl]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function ai(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(r(33))}function xl(e){var n=e[rr];return n||(n=e[rr]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function rt(e){e[ii]=!0}var ur=new Set,cr={};function qn(e,n){Gn(e,n),Gn(e+"Capture",n)}function Gn(e,n){for(cr[e]=n,e=0;e<n.length;e++)ur.add(n[e])}var gc=RegExp("^[: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]*$"),sr={},fr={};function La(e){return ke.call(fr,e)?!0:ke.call(sr,e)?!1:gc.test(e)?fr[e]=!0:(sr[e]=!0,!1)}function dr(e,n,l){if(La(n))if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var o=n.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+l)}}function hr(e,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+l)}}function Xn(e,n,l,o){if(o===null)e.removeAttribute(l);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(n,l,""+o)}}function un(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Wd(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function S1(e,n,l){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var c=o.get,d=o.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return c.call(this)},set:function(y){l=""+y,d.call(this,y)}}),Object.defineProperty(e,n,{enumerable:o.enumerable}),{getValue:function(){return l},setValue:function(y){l=""+y},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function yc(e){if(!e._valueTracker){var n=Wd(e)?"checked":"value";e._valueTracker=S1(e,n,""+e[n])}}function Pd(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var l=n.getValue(),o="";return e&&(o=Wd(e)?e.checked?"true":"false":e.value),e=o,e!==l?(n.setValue(e),!0):!1}function pr(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}}var w1=/[\n"\\]/g;function cn(e){return e.replace(w1,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function vc(e,n,l,o,c,d,y,S){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),n!=null?y==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+un(n)):e.value!==""+un(n)&&(e.value=""+un(n)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),n!=null?xc(e,y,un(n)):l!=null?xc(e,y,un(l)):o!=null&&e.removeAttribute("value"),c==null&&d!=null&&(e.defaultChecked=!!d),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.name=""+un(S):e.removeAttribute("name")}function eh(e,n,l,o,c,d,y,S){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),n!=null||l!=null){if(!(d!=="submit"&&d!=="reset"||n!=null)){yc(e);return}l=l!=null?""+un(l):"",n=n!=null?""+un(n):l,S||n===e.value||(e.value=n),e.defaultValue=n}o=o??c,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=S?e.checked:!!o,e.defaultChecked=!!o,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),yc(e)}function xc(e,n,l){n==="number"&&pr(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function Di(e,n,l,o){if(e=e.options,n){n={};for(var c=0;c<l.length;c++)n["$"+l[c]]=!0;for(l=0;l<e.length;l++)c=n.hasOwnProperty("$"+e[l].value),e[l].selected!==c&&(e[l].selected=c),c&&o&&(e[l].defaultSelected=!0)}else{for(l=""+un(l),n=null,c=0;c<e.length;c++){if(e[c].value===l){e[c].selected=!0,o&&(e[c].defaultSelected=!0);return}n!==null||e[c].disabled||(n=e[c])}n!==null&&(n.selected=!0)}}function th(e,n,l){if(n!=null&&(n=""+un(n),n!==e.value&&(e.value=n),l==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=l!=null?""+un(l):""}function nh(e,n,l,o){if(n==null){if(o!=null){if(l!=null)throw Error(r(92));if(H(o)){if(1<o.length)throw Error(r(93));o=o[0]}l=o}l==null&&(l=""),n=l}l=un(n),e.defaultValue=l,o=e.textContent,o===l&&o!==""&&o!==null&&(e.value=o),yc(e)}function Ri(e,n){if(n){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=n;return}}e.textContent=n}var E1=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function lh(e,n,l){var o=n.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?o?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":o?e.setProperty(n,l):typeof l!="number"||l===0||E1.has(n)?n==="float"?e.cssFloat=l:e[n]=(""+l).trim():e[n]=l+"px"}function ih(e,n,l){if(n!=null&&typeof n!="object")throw Error(r(62));if(e=e.style,l!=null){for(var o in l)!l.hasOwnProperty(o)||n!=null&&n.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var c in n)o=n[c],n.hasOwnProperty(c)&&l[c]!==o&&lh(e,c,o)}else for(var d in n)n.hasOwnProperty(d)&&lh(e,d,n[d])}function bc(e){if(e.indexOf("-")===-1)return!1;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 _1=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),A1=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function mr(e){return A1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Zn(){}var Sc=null;function wc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Hi=null,ji=null;function ah(e){var n=Vn(e);if(n&&(e=n.stateNode)){var l=e[wt]||null;e:switch(e=n.stateNode,n.type){case"input":if(vc(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),n=l.name,l.type==="radio"&&n!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+cn(""+n)+'"][type="radio"]'),n=0;n<l.length;n++){var o=l[n];if(o!==e&&o.form===e.form){var c=o[wt]||null;if(!c)throw Error(r(90));vc(o,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(n=0;n<l.length;n++)o=l[n],o.form===e.form&&Pd(o)}break e;case"textarea":th(e,l.value,l.defaultValue);break e;case"select":n=l.value,n!=null&&Di(e,!!l.multiple,n,!1)}}}var Ec=!1;function oh(e,n,l){if(Ec)return e(n,l);Ec=!0;try{var o=e(n);return o}finally{if(Ec=!1,(Hi!==null||ji!==null)&&(nu(),Hi&&(n=Hi,e=ji,ji=Hi=null,ah(n),e)))for(n=0;n<e.length;n++)ah(e[n])}}function Ba(e,n){var l=e.stateNode;if(l===null)return null;var o=l[wt]||null;if(o===null)return null;l=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(l&&typeof l!="function")throw Error(r(231,n,typeof l));return l}var Qn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_c=!1;if(Qn)try{var Ya={};Object.defineProperty(Ya,"passive",{get:function(){_c=!0}}),window.addEventListener("test",Ya,Ya),window.removeEventListener("test",Ya,Ya)}catch{_c=!1}var bl=null,Ac=null,gr=null;function rh(){if(gr)return gr;var e,n=Ac,l=n.length,o,c="value"in bl?bl.value:bl.textContent,d=c.length;for(e=0;e<l&&n[e]===c[e];e++);var y=l-e;for(o=1;o<=y&&n[l-o]===c[d-o];o++);return gr=c.slice(e,1<o?1-o:void 0)}function yr(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 vr(){return!0}function uh(){return!1}function Yt(e){function n(l,o,c,d,y){this._reactName=l,this._targetInst=c,this.type=o,this.nativeEvent=d,this.target=y,this.currentTarget=null;for(var S in e)e.hasOwnProperty(S)&&(l=e[S],this[S]=l?l(d):d[S]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?vr:uh,this.isPropagationStopped=uh,this}return v(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=vr)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=vr)},persist:function(){},isPersistent:vr}),n}var oi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xr=Yt(oi),Va=v({},oi,{view:0,detail:0}),N1=Yt(Va),Nc,Cc,qa,br=v({},Va,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Mc,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!==qa&&(qa&&e.type==="mousemove"?(Nc=e.screenX-qa.screenX,Cc=e.screenY-qa.screenY):Cc=Nc=0,qa=e),Nc)},movementY:function(e){return"movementY"in e?e.movementY:Cc}}),ch=Yt(br),C1=v({},br,{dataTransfer:0}),T1=Yt(C1),M1=v({},Va,{relatedTarget:0}),Tc=Yt(M1),z1=v({},oi,{animationName:0,elapsedTime:0,pseudoElement:0}),O1=Yt(z1),D1=v({},oi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),R1=Yt(D1),H1=v({},oi,{data:0}),sh=Yt(H1),j1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},k1={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"},U1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function L1(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=U1[e])?!!n[e]:!1}function Mc(){return L1}var B1=v({},Va,{key:function(e){if(e.key){var n=j1[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=yr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?k1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Mc,charCode:function(e){return e.type==="keypress"?yr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?yr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Y1=Yt(B1),V1=v({},br,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),fh=Yt(V1),q1=v({},Va,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Mc}),G1=Yt(q1),X1=v({},oi,{propertyName:0,elapsedTime:0,pseudoElement:0}),Z1=Yt(X1),Q1=v({},br,{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}),$1=Yt(Q1),K1=v({},oi,{newState:0,oldState:0}),I1=Yt(K1),F1=[9,13,27,32],zc=Qn&&"CompositionEvent"in window,Ga=null;Qn&&"documentMode"in document&&(Ga=document.documentMode);var J1=Qn&&"TextEvent"in window&&!Ga,dh=Qn&&(!zc||Ga&&8<Ga&&11>=Ga),hh=" ",ph=!1;function mh(e,n){switch(e){case"keyup":return F1.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function gh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ki=!1;function W1(e,n){switch(e){case"compositionend":return gh(n);case"keypress":return n.which!==32?null:(ph=!0,hh);case"textInput":return e=n.data,e===hh&&ph?null:e;default:return null}}function P1(e,n){if(ki)return e==="compositionend"||!zc&&mh(e,n)?(e=rh(),gr=Ac=bl=null,ki=!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 dh&&n.locale!=="ko"?null:n.data;default:return null}}var eb={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 yh(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!eb[e.type]:n==="textarea"}function vh(e,n,l,o){Hi?ji?ji.push(o):ji=[o]:Hi=o,n=cu(n,"onChange"),0<n.length&&(l=new xr("onChange","change",null,l,o),e.push({event:l,listeners:n}))}var Xa=null,Za=null;function tb(e){em(e,0)}function Sr(e){var n=ai(e);if(Pd(n))return e}function xh(e,n){if(e==="change")return n}var bh=!1;if(Qn){var Oc;if(Qn){var Dc="oninput"in document;if(!Dc){var Sh=document.createElement("div");Sh.setAttribute("oninput","return;"),Dc=typeof Sh.oninput=="function"}Oc=Dc}else Oc=!1;bh=Oc&&(!document.documentMode||9<document.documentMode)}function wh(){Xa&&(Xa.detachEvent("onpropertychange",Eh),Za=Xa=null)}function Eh(e){if(e.propertyName==="value"&&Sr(Za)){var n=[];vh(n,Za,e,wc(e)),oh(tb,n)}}function nb(e,n,l){e==="focusin"?(wh(),Xa=n,Za=l,Xa.attachEvent("onpropertychange",Eh)):e==="focusout"&&wh()}function lb(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Sr(Za)}function ib(e,n){if(e==="click")return Sr(n)}function ab(e,n){if(e==="input"||e==="change")return Sr(n)}function ob(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Ft=typeof Object.is=="function"?Object.is:ob;function Qa(e,n){if(Ft(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var l=Object.keys(e),o=Object.keys(n);if(l.length!==o.length)return!1;for(o=0;o<l.length;o++){var c=l[o];if(!ke.call(n,c)||!Ft(e[c],n[c]))return!1}return!0}function _h(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ah(e,n){var l=_h(e);e=0;for(var o;l;){if(l.nodeType===3){if(o=e+l.textContent.length,e<=n&&o>=n)return{node:l,offset:n-e};e=o}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=_h(l)}}function Nh(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Nh(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Ch(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=pr(e.document);n instanceof e.HTMLIFrameElement;){try{var l=typeof n.contentWindow.location.href=="string"}catch{l=!1}if(l)e=n.contentWindow;else break;n=pr(e.document)}return n}function Rc(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")}var rb=Qn&&"documentMode"in document&&11>=document.documentMode,Ui=null,Hc=null,$a=null,jc=!1;function Th(e,n,l){var o=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;jc||Ui==null||Ui!==pr(o)||(o=Ui,"selectionStart"in o&&Rc(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}),$a&&Qa($a,o)||($a=o,o=cu(Hc,"onSelect"),0<o.length&&(n=new xr("onSelect","select",null,n,l),e.push({event:n,listeners:o}),n.target=Ui)))}function ri(e,n){var l={};return l[e.toLowerCase()]=n.toLowerCase(),l["Webkit"+e]="webkit"+n,l["Moz"+e]="moz"+n,l}var Li={animationend:ri("Animation","AnimationEnd"),animationiteration:ri("Animation","AnimationIteration"),animationstart:ri("Animation","AnimationStart"),transitionrun:ri("Transition","TransitionRun"),transitionstart:ri("Transition","TransitionStart"),transitioncancel:ri("Transition","TransitionCancel"),transitionend:ri("Transition","TransitionEnd")},kc={},Mh={};Qn&&(Mh=document.createElement("div").style,"AnimationEvent"in window||(delete Li.animationend.animation,delete Li.animationiteration.animation,delete Li.animationstart.animation),"TransitionEvent"in window||delete Li.transitionend.transition);function ui(e){if(kc[e])return kc[e];if(!Li[e])return e;var n=Li[e],l;for(l in n)if(n.hasOwnProperty(l)&&l in Mh)return kc[e]=n[l];return e}var zh=ui("animationend"),Oh=ui("animationiteration"),Dh=ui("animationstart"),ub=ui("transitionrun"),cb=ui("transitionstart"),sb=ui("transitioncancel"),Rh=ui("transitionend"),Hh=new Map,Uc="abort auxClick beforeToggle 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(" ");Uc.push("scrollEnd");function Sn(e,n){Hh.set(e,n),qn(n,[e])}var wr=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},sn=[],Bi=0,Lc=0;function Er(){for(var e=Bi,n=Lc=Bi=0;n<e;){var l=sn[n];sn[n++]=null;var o=sn[n];sn[n++]=null;var c=sn[n];sn[n++]=null;var d=sn[n];if(sn[n++]=null,o!==null&&c!==null){var y=o.pending;y===null?c.next=c:(c.next=y.next,y.next=c),o.pending=c}d!==0&&jh(l,c,d)}}function _r(e,n,l,o){sn[Bi++]=e,sn[Bi++]=n,sn[Bi++]=l,sn[Bi++]=o,Lc|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function Bc(e,n,l,o){return _r(e,n,l,o),Ar(e)}function ci(e,n){return _r(e,null,null,n),Ar(e)}function jh(e,n,l){e.lanes|=l;var o=e.alternate;o!==null&&(o.lanes|=l);for(var c=!1,d=e.return;d!==null;)d.childLanes|=l,o=d.alternate,o!==null&&(o.childLanes|=l),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(c=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,c&&n!==null&&(c=31-Je(l),e=d.hiddenUpdates,o=e[c],o===null?e[c]=[n]:o.push(n),n.lane=l|536870912),d):null}function Ar(e){if(50<go)throw go=0,Ks=null,Error(r(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var Yi={};function fb(e,n,l,o){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=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 Jt(e,n,l,o){return new fb(e,n,l,o)}function Yc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function $n(e,n){var l=e.alternate;return l===null?(l=Jt(e.tag,n,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=n,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,n=e.dependencies,l.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function kh(e,n){e.flags&=65011714;var l=e.alternate;return l===null?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,n=l.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function Nr(e,n,l,o,c,d){var y=0;if(o=e,typeof e=="function")Yc(e)&&(y=1);else if(typeof e=="string")y=gS(e,l,P.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ee:return e=Jt(31,l,n,c),e.elementType=ee,e.lanes=d,e;case N:return si(l.children,c,d,n);case T:y=8,c|=24;break;case M:return e=Jt(12,l,n,c|2),e.elementType=M,e.lanes=d,e;case I:return e=Jt(13,l,n,c),e.elementType=I,e.lanes=d,e;case G:return e=Jt(19,l,n,c),e.elementType=G,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case q:y=10;break e;case D:y=9;break e;case j:y=11;break e;case $:y=14;break e;case B:y=16,o=null;break e}y=29,l=Error(r(130,e===null?"null":typeof e,"")),o=null}return n=Jt(y,l,n,c),n.elementType=e,n.type=o,n.lanes=d,n}function si(e,n,l,o){return e=Jt(7,e,o,n),e.lanes=l,e}function Vc(e,n,l){return e=Jt(6,e,null,n),e.lanes=l,e}function Uh(e){var n=Jt(18,null,null,0);return n.stateNode=e,n}function qc(e,n,l){return n=Jt(4,e.children!==null?e.children:[],e.key,n),n.lanes=l,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var Lh=new WeakMap;function fn(e,n){if(typeof e=="object"&&e!==null){var l=Lh.get(e);return l!==void 0?l:(n={value:e,source:n,stack:se(n)},Lh.set(e,n),n)}return{value:e,source:n,stack:se(n)}}var Vi=[],qi=0,Cr=null,Ka=0,dn=[],hn=0,Sl=null,On=1,Dn="";function Kn(e,n){Vi[qi++]=Ka,Vi[qi++]=Cr,Cr=e,Ka=n}function Bh(e,n,l){dn[hn++]=On,dn[hn++]=Dn,dn[hn++]=Sl,Sl=e;var o=On;e=Dn;var c=32-Je(o)-1;o&=~(1<<c),l+=1;var d=32-Je(n)+c;if(30<d){var y=c-c%5;d=(o&(1<<y)-1).toString(32),o>>=y,c-=y,On=1<<32-Je(n)+c|l<<c|o,Dn=d+e}else On=1<<d|l<<c|o,Dn=e}function Gc(e){e.return!==null&&(Kn(e,1),Bh(e,1,0))}function Xc(e){for(;e===Cr;)Cr=Vi[--qi],Vi[qi]=null,Ka=Vi[--qi],Vi[qi]=null;for(;e===Sl;)Sl=dn[--hn],dn[hn]=null,Dn=dn[--hn],dn[hn]=null,On=dn[--hn],dn[hn]=null}function Yh(e,n){dn[hn++]=On,dn[hn++]=Dn,dn[hn++]=Sl,On=n.id,Dn=n.overflow,Sl=e}var Et=null,Ke=null,De=!1,wl=null,pn=!1,Zc=Error(r(519));function El(e){var n=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ia(fn(n,e)),Zc}function Vh(e){var n=e.stateNode,l=e.type,o=e.memoizedProps;switch(n[mt]=e,n[wt]=o,l){case"dialog":Me("cancel",n),Me("close",n);break;case"iframe":case"object":case"embed":Me("load",n);break;case"video":case"audio":for(l=0;l<vo.length;l++)Me(vo[l],n);break;case"source":Me("error",n);break;case"img":case"image":case"link":Me("error",n),Me("load",n);break;case"details":Me("toggle",n);break;case"input":Me("invalid",n),eh(n,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":Me("invalid",n);break;case"textarea":Me("invalid",n),nh(n,o.value,o.defaultValue,o.children)}l=o.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||n.textContent===""+l||o.suppressHydrationWarning===!0||im(n.textContent,l)?(o.popover!=null&&(Me("beforetoggle",n),Me("toggle",n)),o.onScroll!=null&&Me("scroll",n),o.onScrollEnd!=null&&Me("scrollend",n),o.onClick!=null&&(n.onclick=Zn),n=!0):n=!1,n||El(e,!0)}function qh(e){for(Et=e.return;Et;)switch(Et.tag){case 5:case 31:case 13:pn=!1;return;case 27:case 3:pn=!0;return;default:Et=Et.return}}function Gi(e){if(e!==Et)return!1;if(!De)return qh(e),De=!0,!1;var n=e.tag,l;if((l=n!==3&&n!==27)&&((l=n===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||sf(e.type,e.memoizedProps)),l=!l),l&&Ke&&El(e),qh(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ke=hm(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ke=hm(e)}else n===27?(n=Ke,Ul(e.type)?(e=mf,mf=null,Ke=e):Ke=n):Ke=Et?gn(e.stateNode.nextSibling):null;return!0}function fi(){Ke=Et=null,De=!1}function Qc(){var e=wl;return e!==null&&(Xt===null?Xt=e:Xt.push.apply(Xt,e),wl=null),e}function Ia(e){wl===null?wl=[e]:wl.push(e)}var $c=_(null),di=null,In=null;function _l(e,n,l){F($c,n._currentValue),n._currentValue=l}function Fn(e){e._currentValue=$c.current,U($c)}function Kc(e,n,l){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===l)break;e=e.return}}function Ic(e,n,l,o){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var d=c.dependencies;if(d!==null){var y=c.child;d=d.firstContext;e:for(;d!==null;){var S=d;d=c;for(var O=0;O<n.length;O++)if(S.context===n[O]){d.lanes|=l,S=d.alternate,S!==null&&(S.lanes|=l),Kc(d.return,l,e),o||(y=null);break e}d=S.next}}else if(c.tag===18){if(y=c.return,y===null)throw Error(r(341));y.lanes|=l,d=y.alternate,d!==null&&(d.lanes|=l),Kc(y,l,e),y=null}else y=c.child;if(y!==null)y.return=c;else for(y=c;y!==null;){if(y===e){y=null;break}if(c=y.sibling,c!==null){c.return=y.return,y=c;break}y=y.return}c=y}}function Xi(e,n,l,o){e=null;for(var c=n,d=!1;c!==null;){if(!d){if((c.flags&524288)!==0)d=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var y=c.alternate;if(y===null)throw Error(r(387));if(y=y.memoizedProps,y!==null){var S=c.type;Ft(c.pendingProps.value,y.value)||(e!==null?e.push(S):e=[S])}}else if(c===fe.current){if(y=c.alternate,y===null)throw Error(r(387));y.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(Eo):e=[Eo])}c=c.return}e!==null&&Ic(n,e,l,o),n.flags|=262144}function Tr(e){for(e=e.firstContext;e!==null;){if(!Ft(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function hi(e){di=e,In=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function _t(e){return Gh(di,e)}function Mr(e,n){return di===null&&hi(e),Gh(e,n)}function Gh(e,n){var l=n._currentValue;if(n={context:n,memoizedValue:l,next:null},In===null){if(e===null)throw Error(r(308));In=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else In=In.next=n;return l}var db=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(l,o){e.push(o)}};this.abort=function(){n.aborted=!0,e.forEach(function(l){return l()})}},hb=t.unstable_scheduleCallback,pb=t.unstable_NormalPriority,ut={$$typeof:q,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Fc(){return{controller:new db,data:new Map,refCount:0}}function Fa(e){e.refCount--,e.refCount===0&&hb(pb,function(){e.controller.abort()})}var Ja=null,Jc=0,Zi=0,Qi=null;function mb(e,n){if(Ja===null){var l=Ja=[];Jc=0,Zi=ef(),Qi={status:"pending",value:void 0,then:function(o){l.push(o)}}}return Jc++,n.then(Xh,Xh),n}function Xh(){if(--Jc===0&&Ja!==null){Qi!==null&&(Qi.status="fulfilled");var e=Ja;Ja=null,Zi=0,Qi=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function gb(e,n){var l=[],o={status:"pending",value:null,reason:null,then:function(c){l.push(c)}};return e.then(function(){o.status="fulfilled",o.value=n;for(var c=0;c<l.length;c++)(0,l[c])(n)},function(c){for(o.status="rejected",o.reason=c,c=0;c<l.length;c++)(0,l[c])(void 0)}),o}var Zh=w.S;w.S=function(e,n){T0=Fe(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&mb(e,n),Zh!==null&&Zh(e,n)};var pi=_(null);function Wc(){var e=pi.current;return e!==null?e:$e.pooledCache}function zr(e,n){n===null?F(pi,pi.current):F(pi,n.pool)}function Qh(){var e=Wc();return e===null?null:{parent:ut._currentValue,pool:e}}var $i=Error(r(460)),Pc=Error(r(474)),Or=Error(r(542)),Dr={then:function(){}};function $h(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Kh(e,n,l){switch(l=e[l],l===void 0?e.push(n):l!==n&&(n.then(Zn,Zn),n=l),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Fh(e),e;default:if(typeof n.status=="string")n.then(Zn,Zn);else{if(e=$e,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=n,e.status="pending",e.then(function(o){if(n.status==="pending"){var c=n;c.status="fulfilled",c.value=o}},function(o){if(n.status==="pending"){var c=n;c.status="rejected",c.reason=o}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Fh(e),e}throw gi=n,$i}}function mi(e){try{var n=e._init;return n(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(gi=l,$i):l}}var gi=null;function Ih(){if(gi===null)throw Error(r(459));var e=gi;return gi=null,e}function Fh(e){if(e===$i||e===Or)throw Error(r(483))}var Ki=null,Wa=0;function Rr(e){var n=Wa;return Wa+=1,Ki===null&&(Ki=[]),Kh(Ki,e,n)}function Pa(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function Hr(e,n){throw n.$$typeof===b?Error(r(525)):(e=Object.prototype.toString.call(n),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function Jh(e){function n(V,k){if(e){var Z=V.deletions;Z===null?(V.deletions=[k],V.flags|=16):Z.push(k)}}function l(V,k){if(!e)return null;for(;k!==null;)n(V,k),k=k.sibling;return null}function o(V){for(var k=new Map;V!==null;)V.key!==null?k.set(V.key,V):k.set(V.index,V),V=V.sibling;return k}function c(V,k){return V=$n(V,k),V.index=0,V.sibling=null,V}function d(V,k,Z){return V.index=Z,e?(Z=V.alternate,Z!==null?(Z=Z.index,Z<k?(V.flags|=67108866,k):Z):(V.flags|=67108866,k)):(V.flags|=1048576,k)}function y(V){return e&&V.alternate===null&&(V.flags|=67108866),V}function S(V,k,Z,ne){return k===null||k.tag!==6?(k=Vc(Z,V.mode,ne),k.return=V,k):(k=c(k,Z),k.return=V,k)}function O(V,k,Z,ne){var xe=Z.type;return xe===N?te(V,k,Z.props.children,ne,Z.key):k!==null&&(k.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===B&&mi(xe)===k.type)?(k=c(k,Z.props),Pa(k,Z),k.return=V,k):(k=Nr(Z.type,Z.key,Z.props,null,V.mode,ne),Pa(k,Z),k.return=V,k)}function Q(V,k,Z,ne){return k===null||k.tag!==4||k.stateNode.containerInfo!==Z.containerInfo||k.stateNode.implementation!==Z.implementation?(k=qc(Z,V.mode,ne),k.return=V,k):(k=c(k,Z.children||[]),k.return=V,k)}function te(V,k,Z,ne,xe){return k===null||k.tag!==7?(k=si(Z,V.mode,ne,xe),k.return=V,k):(k=c(k,Z),k.return=V,k)}function le(V,k,Z){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=Vc(""+k,V.mode,Z),k.return=V,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case E:return Z=Nr(k.type,k.key,k.props,null,V.mode,Z),Pa(Z,k),Z.return=V,Z;case C:return k=qc(k,V.mode,Z),k.return=V,k;case B:return k=mi(k),le(V,k,Z)}if(H(k)||ue(k))return k=si(k,V.mode,Z,null),k.return=V,k;if(typeof k.then=="function")return le(V,Rr(k),Z);if(k.$$typeof===q)return le(V,Mr(V,k),Z);Hr(V,k)}return null}function K(V,k,Z,ne){var xe=k!==null?k.key:null;if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return xe!==null?null:S(V,k,""+Z,ne);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case E:return Z.key===xe?O(V,k,Z,ne):null;case C:return Z.key===xe?Q(V,k,Z,ne):null;case B:return Z=mi(Z),K(V,k,Z,ne)}if(H(Z)||ue(Z))return xe!==null?null:te(V,k,Z,ne,null);if(typeof Z.then=="function")return K(V,k,Rr(Z),ne);if(Z.$$typeof===q)return K(V,k,Mr(V,Z),ne);Hr(V,Z)}return null}function J(V,k,Z,ne,xe){if(typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint")return V=V.get(Z)||null,S(k,V,""+ne,xe);if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case E:return V=V.get(ne.key===null?Z:ne.key)||null,O(k,V,ne,xe);case C:return V=V.get(ne.key===null?Z:ne.key)||null,Q(k,V,ne,xe);case B:return ne=mi(ne),J(V,k,Z,ne,xe)}if(H(ne)||ue(ne))return V=V.get(Z)||null,te(k,V,ne,xe,null);if(typeof ne.then=="function")return J(V,k,Z,Rr(ne),xe);if(ne.$$typeof===q)return J(V,k,Z,Mr(k,ne),xe);Hr(k,ne)}return null}function he(V,k,Z,ne){for(var xe=null,Ue=null,ge=k,_e=k=0,Oe=null;ge!==null&&_e<Z.length;_e++){ge.index>_e?(Oe=ge,ge=null):Oe=ge.sibling;var Le=K(V,ge,Z[_e],ne);if(Le===null){ge===null&&(ge=Oe);break}e&&ge&&Le.alternate===null&&n(V,ge),k=d(Le,k,_e),Ue===null?xe=Le:Ue.sibling=Le,Ue=Le,ge=Oe}if(_e===Z.length)return l(V,ge),De&&Kn(V,_e),xe;if(ge===null){for(;_e<Z.length;_e++)ge=le(V,Z[_e],ne),ge!==null&&(k=d(ge,k,_e),Ue===null?xe=ge:Ue.sibling=ge,Ue=ge);return De&&Kn(V,_e),xe}for(ge=o(ge);_e<Z.length;_e++)Oe=J(ge,V,_e,Z[_e],ne),Oe!==null&&(e&&Oe.alternate!==null&&ge.delete(Oe.key===null?_e:Oe.key),k=d(Oe,k,_e),Ue===null?xe=Oe:Ue.sibling=Oe,Ue=Oe);return e&&ge.forEach(function(ql){return n(V,ql)}),De&&Kn(V,_e),xe}function Se(V,k,Z,ne){if(Z==null)throw Error(r(151));for(var xe=null,Ue=null,ge=k,_e=k=0,Oe=null,Le=Z.next();ge!==null&&!Le.done;_e++,Le=Z.next()){ge.index>_e?(Oe=ge,ge=null):Oe=ge.sibling;var ql=K(V,ge,Le.value,ne);if(ql===null){ge===null&&(ge=Oe);break}e&&ge&&ql.alternate===null&&n(V,ge),k=d(ql,k,_e),Ue===null?xe=ql:Ue.sibling=ql,Ue=ql,ge=Oe}if(Le.done)return l(V,ge),De&&Kn(V,_e),xe;if(ge===null){for(;!Le.done;_e++,Le=Z.next())Le=le(V,Le.value,ne),Le!==null&&(k=d(Le,k,_e),Ue===null?xe=Le:Ue.sibling=Le,Ue=Le);return De&&Kn(V,_e),xe}for(ge=o(ge);!Le.done;_e++,Le=Z.next())Le=J(ge,V,_e,Le.value,ne),Le!==null&&(e&&Le.alternate!==null&&ge.delete(Le.key===null?_e:Le.key),k=d(Le,k,_e),Ue===null?xe=Le:Ue.sibling=Le,Ue=Le);return e&&ge.forEach(function(CS){return n(V,CS)}),De&&Kn(V,_e),xe}function Qe(V,k,Z,ne){if(typeof Z=="object"&&Z!==null&&Z.type===N&&Z.key===null&&(Z=Z.props.children),typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case E:e:{for(var xe=Z.key;k!==null;){if(k.key===xe){if(xe=Z.type,xe===N){if(k.tag===7){l(V,k.sibling),ne=c(k,Z.props.children),ne.return=V,V=ne;break e}}else if(k.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===B&&mi(xe)===k.type){l(V,k.sibling),ne=c(k,Z.props),Pa(ne,Z),ne.return=V,V=ne;break e}l(V,k);break}else n(V,k);k=k.sibling}Z.type===N?(ne=si(Z.props.children,V.mode,ne,Z.key),ne.return=V,V=ne):(ne=Nr(Z.type,Z.key,Z.props,null,V.mode,ne),Pa(ne,Z),ne.return=V,V=ne)}return y(V);case C:e:{for(xe=Z.key;k!==null;){if(k.key===xe)if(k.tag===4&&k.stateNode.containerInfo===Z.containerInfo&&k.stateNode.implementation===Z.implementation){l(V,k.sibling),ne=c(k,Z.children||[]),ne.return=V,V=ne;break e}else{l(V,k);break}else n(V,k);k=k.sibling}ne=qc(Z,V.mode,ne),ne.return=V,V=ne}return y(V);case B:return Z=mi(Z),Qe(V,k,Z,ne)}if(H(Z))return he(V,k,Z,ne);if(ue(Z)){if(xe=ue(Z),typeof xe!="function")throw Error(r(150));return Z=xe.call(Z),Se(V,k,Z,ne)}if(typeof Z.then=="function")return Qe(V,k,Rr(Z),ne);if(Z.$$typeof===q)return Qe(V,k,Mr(V,Z),ne);Hr(V,Z)}return typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint"?(Z=""+Z,k!==null&&k.tag===6?(l(V,k.sibling),ne=c(k,Z),ne.return=V,V=ne):(l(V,k),ne=Vc(Z,V.mode,ne),ne.return=V,V=ne),y(V)):l(V,k)}return function(V,k,Z,ne){try{Wa=0;var xe=Qe(V,k,Z,ne);return Ki=null,xe}catch(ge){if(ge===$i||ge===Or)throw ge;var Ue=Jt(29,ge,null,V.mode);return Ue.lanes=ne,Ue.return=V,Ue}}}var yi=Jh(!0),Wh=Jh(!1),Al=!1;function es(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ts(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Nl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Cl(e,n,l){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Be&2)!==0){var c=o.pending;return c===null?n.next=n:(n.next=c.next,c.next=n),o.pending=n,n=Ar(e),jh(e,null,l),n}return _r(e,o,n,l),Ar(e)}function eo(e,n,l){if(n=n.updateQueue,n!==null&&(n=n.shared,(l&4194048)!==0)){var o=n.lanes;o&=e.pendingLanes,l|=o,n.lanes=l,lr(e,l)}}function ns(e,n){var l=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,l===o)){var c=null,d=null;if(l=l.firstBaseUpdate,l!==null){do{var y={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};d===null?c=d=y:d=d.next=y,l=l.next}while(l!==null);d===null?c=d=n:d=d.next=n}else c=d=n;l={baseState:o.baseState,firstBaseUpdate:c,lastBaseUpdate:d,shared:o.shared,callbacks:o.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=n:e.next=n,l.lastBaseUpdate=n}var ls=!1;function to(){if(ls){var e=Qi;if(e!==null)throw e}}function no(e,n,l,o){ls=!1;var c=e.updateQueue;Al=!1;var d=c.firstBaseUpdate,y=c.lastBaseUpdate,S=c.shared.pending;if(S!==null){c.shared.pending=null;var O=S,Q=O.next;O.next=null,y===null?d=Q:y.next=Q,y=O;var te=e.alternate;te!==null&&(te=te.updateQueue,S=te.lastBaseUpdate,S!==y&&(S===null?te.firstBaseUpdate=Q:S.next=Q,te.lastBaseUpdate=O))}if(d!==null){var le=c.baseState;y=0,te=Q=O=null,S=d;do{var K=S.lane&-536870913,J=K!==S.lane;if(J?(ze&K)===K:(o&K)===K){K!==0&&K===Zi&&(ls=!0),te!==null&&(te=te.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var he=e,Se=S;K=n;var Qe=l;switch(Se.tag){case 1:if(he=Se.payload,typeof he=="function"){le=he.call(Qe,le,K);break e}le=he;break e;case 3:he.flags=he.flags&-65537|128;case 0:if(he=Se.payload,K=typeof he=="function"?he.call(Qe,le,K):he,K==null)break e;le=v({},le,K);break e;case 2:Al=!0}}K=S.callback,K!==null&&(e.flags|=64,J&&(e.flags|=8192),J=c.callbacks,J===null?c.callbacks=[K]:J.push(K))}else J={lane:K,tag:S.tag,payload:S.payload,callback:S.callback,next:null},te===null?(Q=te=J,O=le):te=te.next=J,y|=K;if(S=S.next,S===null){if(S=c.shared.pending,S===null)break;J=S,S=J.next,J.next=null,c.lastBaseUpdate=J,c.shared.pending=null}}while(!0);te===null&&(O=le),c.baseState=O,c.firstBaseUpdate=Q,c.lastBaseUpdate=te,d===null&&(c.shared.lanes=0),Dl|=y,e.lanes=y,e.memoizedState=le}}function Ph(e,n){if(typeof e!="function")throw Error(r(191,e));e.call(n)}function ep(e,n){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Ph(l[e],n)}var Ii=_(null),jr=_(0);function tp(e,n){e=al,F(jr,e),F(Ii,n),al=e|n.baseLanes}function is(){F(jr,al),F(Ii,Ii.current)}function as(){al=jr.current,U(Ii),U(jr)}var Wt=_(null),mn=null;function Tl(e){var n=e.alternate;F(at,at.current&1),F(Wt,e),mn===null&&(n===null||Ii.current!==null||n.memoizedState!==null)&&(mn=e)}function os(e){F(at,at.current),F(Wt,e),mn===null&&(mn=e)}function np(e){e.tag===22?(F(at,at.current),F(Wt,e),mn===null&&(mn=e)):Ml()}function Ml(){F(at,at.current),F(Wt,Wt.current)}function Pt(e){U(Wt),mn===e&&(mn=null),U(at)}var at=_(0);function kr(e){for(var n=e;n!==null;){if(n.tag===13){var l=n.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||hf(l)||pf(l)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Jn=0,Ee=null,Xe=null,ct=null,Ur=!1,Fi=!1,vi=!1,Lr=0,lo=0,Ji=null,yb=0;function tt(){throw Error(r(321))}function rs(e,n){if(n===null)return!1;for(var l=0;l<n.length&&l<e.length;l++)if(!Ft(e[l],n[l]))return!1;return!0}function us(e,n,l,o,c,d){return Jn=d,Ee=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,w.H=e===null||e.memoizedState===null?Bp:Es,vi=!1,d=l(o,c),vi=!1,Fi&&(d=ip(n,l,o,c)),lp(e),d}function lp(e){w.H=oo;var n=Xe!==null&&Xe.next!==null;if(Jn=0,ct=Xe=Ee=null,Ur=!1,lo=0,Ji=null,n)throw Error(r(300));e===null||st||(e=e.dependencies,e!==null&&Tr(e)&&(st=!0))}function ip(e,n,l,o){Ee=e;var c=0;do{if(Fi&&(Ji=null),lo=0,Fi=!1,25<=c)throw Error(r(301));if(c+=1,ct=Xe=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}w.H=Yp,d=n(l,o)}while(Fi);return d}function vb(){var e=w.H,n=e.useState()[0];return n=typeof n.then=="function"?io(n):n,e=e.useState()[0],(Xe!==null?Xe.memoizedState:null)!==e&&(Ee.flags|=1024),n}function cs(){var e=Lr!==0;return Lr=0,e}function ss(e,n,l){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~l}function fs(e){if(Ur){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}Ur=!1}Jn=0,ct=Xe=Ee=null,Fi=!1,lo=Lr=0,Ji=null}function Ut(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ct===null?Ee.memoizedState=ct=e:ct=ct.next=e,ct}function ot(){if(Xe===null){var e=Ee.alternate;e=e!==null?e.memoizedState:null}else e=Xe.next;var n=ct===null?Ee.memoizedState:ct.next;if(n!==null)ct=n,Xe=e;else{if(e===null)throw Ee.alternate===null?Error(r(467)):Error(r(310));Xe=e,e={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},ct===null?Ee.memoizedState=ct=e:ct=ct.next=e}return ct}function Br(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function io(e){var n=lo;return lo+=1,Ji===null&&(Ji=[]),e=Kh(Ji,e,n),n=Ee,(ct===null?n.memoizedState:ct.next)===null&&(n=n.alternate,w.H=n===null||n.memoizedState===null?Bp:Es),e}function Yr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return io(e);if(e.$$typeof===q)return _t(e)}throw Error(r(438,String(e)))}function ds(e){var n=null,l=Ee.updateQueue;if(l!==null&&(n=l.memoCache),n==null){var o=Ee.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(n={data:o.data.map(function(c){return c.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),l===null&&(l=Br(),Ee.updateQueue=l),l.memoCache=n,l=n.data[n.index],l===void 0)for(l=n.data[n.index]=Array(e),o=0;o<e;o++)l[o]=oe;return n.index++,l}function Wn(e,n){return typeof n=="function"?n(e):n}function Vr(e){var n=ot();return hs(n,Xe,e)}function hs(e,n,l){var o=e.queue;if(o===null)throw Error(r(311));o.lastRenderedReducer=l;var c=e.baseQueue,d=o.pending;if(d!==null){if(c!==null){var y=c.next;c.next=d.next,d.next=y}n.baseQueue=c=d,o.pending=null}if(d=e.baseState,c===null)e.memoizedState=d;else{n=c.next;var S=y=null,O=null,Q=n,te=!1;do{var le=Q.lane&-536870913;if(le!==Q.lane?(ze&le)===le:(Jn&le)===le){var K=Q.revertLane;if(K===0)O!==null&&(O=O.next={lane:0,revertLane:0,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),le===Zi&&(te=!0);else if((Jn&K)===K){Q=Q.next,K===Zi&&(te=!0);continue}else le={lane:0,revertLane:Q.revertLane,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},O===null?(S=O=le,y=d):O=O.next=le,Ee.lanes|=K,Dl|=K;le=Q.action,vi&&l(d,le),d=Q.hasEagerState?Q.eagerState:l(d,le)}else K={lane:le,revertLane:Q.revertLane,gesture:Q.gesture,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},O===null?(S=O=K,y=d):O=O.next=K,Ee.lanes|=le,Dl|=le;Q=Q.next}while(Q!==null&&Q!==n);if(O===null?y=d:O.next=S,!Ft(d,e.memoizedState)&&(st=!0,te&&(l=Qi,l!==null)))throw l;e.memoizedState=d,e.baseState=y,e.baseQueue=O,o.lastRenderedState=d}return c===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function ps(e){var n=ot(),l=n.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=e;var o=l.dispatch,c=l.pending,d=n.memoizedState;if(c!==null){l.pending=null;var y=c=c.next;do d=e(d,y.action),y=y.next;while(y!==c);Ft(d,n.memoizedState)||(st=!0),n.memoizedState=d,n.baseQueue===null&&(n.baseState=d),l.lastRenderedState=d}return[d,o]}function ap(e,n,l){var o=Ee,c=ot(),d=De;if(d){if(l===void 0)throw Error(r(407));l=l()}else l=n();var y=!Ft((Xe||c).memoizedState,l);if(y&&(c.memoizedState=l,st=!0),c=c.queue,ys(up.bind(null,o,c,e),[e]),c.getSnapshot!==n||y||ct!==null&&ct.memoizedState.tag&1){if(o.flags|=2048,Wi(9,{destroy:void 0},rp.bind(null,o,c,l,n),null),$e===null)throw Error(r(349));d||(Jn&127)!==0||op(o,n,l)}return l}function op(e,n,l){e.flags|=16384,e={getSnapshot:n,value:l},n=Ee.updateQueue,n===null?(n=Br(),Ee.updateQueue=n,n.stores=[e]):(l=n.stores,l===null?n.stores=[e]:l.push(e))}function rp(e,n,l,o){n.value=l,n.getSnapshot=o,cp(n)&&sp(e)}function up(e,n,l){return l(function(){cp(n)&&sp(e)})}function cp(e){var n=e.getSnapshot;e=e.value;try{var l=n();return!Ft(e,l)}catch{return!0}}function sp(e){var n=ci(e,2);n!==null&&Zt(n,e,2)}function ms(e){var n=Ut();if(typeof e=="function"){var l=e;if(e=l(),vi){jt(!0);try{l()}finally{jt(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:e},n}function fp(e,n,l,o){return e.baseState=l,hs(e,Xe,typeof o=="function"?o:Wn)}function xb(e,n,l,o,c){if(Xr(e))throw Error(r(485));if(e=n.action,e!==null){var d={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){d.listeners.push(y)}};w.T!==null?l(!0):d.isTransition=!1,o(d),l=n.pending,l===null?(d.next=n.pending=d,dp(n,d)):(d.next=l.next,n.pending=l.next=d)}}function dp(e,n){var l=n.action,o=n.payload,c=e.state;if(n.isTransition){var d=w.T,y={};w.T=y;try{var S=l(c,o),O=w.S;O!==null&&O(y,S),hp(e,n,S)}catch(Q){gs(e,n,Q)}finally{d!==null&&y.types!==null&&(d.types=y.types),w.T=d}}else try{d=l(c,o),hp(e,n,d)}catch(Q){gs(e,n,Q)}}function hp(e,n,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(o){pp(e,n,o)},function(o){return gs(e,n,o)}):pp(e,n,l)}function pp(e,n,l){n.status="fulfilled",n.value=l,mp(n),e.state=l,n=e.pending,n!==null&&(l=n.next,l===n?e.pending=null:(l=l.next,n.next=l,dp(e,l)))}function gs(e,n,l){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do n.status="rejected",n.reason=l,mp(n),n=n.next;while(n!==o)}e.action=null}function mp(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function gp(e,n){return n}function yp(e,n){if(De){var l=$e.formState;if(l!==null){e:{var o=Ee;if(De){if(Ke){t:{for(var c=Ke,d=pn;c.nodeType!==8;){if(!d){c=null;break t}if(c=gn(c.nextSibling),c===null){c=null;break t}}d=c.data,c=d==="F!"||d==="F"?c:null}if(c){Ke=gn(c.nextSibling),o=c.data==="F!";break e}}El(o)}o=!1}o&&(n=l[0])}}return l=Ut(),l.memoizedState=l.baseState=n,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:gp,lastRenderedState:n},l.queue=o,l=kp.bind(null,Ee,o),o.dispatch=l,o=ms(!1),d=ws.bind(null,Ee,!1,o.queue),o=Ut(),c={state:n,dispatch:null,action:e,pending:null},o.queue=c,l=xb.bind(null,Ee,c,d,l),c.dispatch=l,o.memoizedState=e,[n,l,!1]}function vp(e){var n=ot();return xp(n,Xe,e)}function xp(e,n,l){if(n=hs(e,n,gp)[0],e=Vr(Wn)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var o=io(n)}catch(y){throw y===$i?Or:y}else o=n;n=ot();var c=n.queue,d=c.dispatch;return l!==n.memoizedState&&(Ee.flags|=2048,Wi(9,{destroy:void 0},bb.bind(null,c,l),null)),[o,d,e]}function bb(e,n){e.action=n}function bp(e){var n=ot(),l=Xe;if(l!==null)return xp(n,l,e);ot(),n=n.memoizedState,l=ot();var o=l.queue.dispatch;return l.memoizedState=e,[n,o,!1]}function Wi(e,n,l,o){return e={tag:e,create:l,deps:o,inst:n,next:null},n=Ee.updateQueue,n===null&&(n=Br(),Ee.updateQueue=n),l=n.lastEffect,l===null?n.lastEffect=e.next=e:(o=l.next,l.next=e,e.next=o,n.lastEffect=e),e}function Sp(){return ot().memoizedState}function qr(e,n,l,o){var c=Ut();Ee.flags|=e,c.memoizedState=Wi(1|n,{destroy:void 0},l,o===void 0?null:o)}function Gr(e,n,l,o){var c=ot();o=o===void 0?null:o;var d=c.memoizedState.inst;Xe!==null&&o!==null&&rs(o,Xe.memoizedState.deps)?c.memoizedState=Wi(n,d,l,o):(Ee.flags|=e,c.memoizedState=Wi(1|n,d,l,o))}function wp(e,n){qr(8390656,8,e,n)}function ys(e,n){Gr(2048,8,e,n)}function Sb(e){Ee.flags|=4;var n=Ee.updateQueue;if(n===null)n=Br(),Ee.updateQueue=n,n.events=[e];else{var l=n.events;l===null?n.events=[e]:l.push(e)}}function Ep(e){var n=ot().memoizedState;return Sb({ref:n,nextImpl:e}),function(){if((Be&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}function _p(e,n){return Gr(4,2,e,n)}function Ap(e,n){return Gr(4,4,e,n)}function Np(e,n){if(typeof n=="function"){e=e();var l=n(e);return function(){typeof l=="function"?l():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function Cp(e,n,l){l=l!=null?l.concat([e]):null,Gr(4,4,Np.bind(null,n,e),l)}function vs(){}function Tp(e,n){var l=ot();n=n===void 0?null:n;var o=l.memoizedState;return n!==null&&rs(n,o[1])?o[0]:(l.memoizedState=[e,n],e)}function Mp(e,n){var l=ot();n=n===void 0?null:n;var o=l.memoizedState;if(n!==null&&rs(n,o[1]))return o[0];if(o=e(),vi){jt(!0);try{e()}finally{jt(!1)}}return l.memoizedState=[o,n],o}function xs(e,n,l){return l===void 0||(Jn&1073741824)!==0&&(ze&261930)===0?e.memoizedState=n:(e.memoizedState=l,e=z0(),Ee.lanes|=e,Dl|=e,l)}function zp(e,n,l,o){return Ft(l,n)?l:Ii.current!==null?(e=xs(e,l,o),Ft(e,n)||(st=!0),e):(Jn&42)===0||(Jn&1073741824)!==0&&(ze&261930)===0?(st=!0,e.memoizedState=l):(e=z0(),Ee.lanes|=e,Dl|=e,n)}function Op(e,n,l,o,c){var d=R.p;R.p=d!==0&&8>d?d:8;var y=w.T,S={};w.T=S,ws(e,!1,n,l);try{var O=c(),Q=w.S;if(Q!==null&&Q(S,O),O!==null&&typeof O=="object"&&typeof O.then=="function"){var te=gb(O,o);ao(e,n,te,nn(e))}else ao(e,n,o,nn(e))}catch(le){ao(e,n,{then:function(){},status:"rejected",reason:le},nn())}finally{R.p=d,y!==null&&S.types!==null&&(y.types=S.types),w.T=y}}function wb(){}function bs(e,n,l,o){if(e.tag!==5)throw Error(r(476));var c=Dp(e).queue;Op(e,c,n,X,l===null?wb:function(){return Rp(e),l(o)})}function Dp(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:X,baseState:X,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:X},next:null};var l={};return n.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:l},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function Rp(e){var n=Dp(e);n.next===null&&(n=e.alternate.memoizedState),ao(e,n.next.queue,{},nn())}function Ss(){return _t(Eo)}function Hp(){return ot().memoizedState}function jp(){return ot().memoizedState}function Eb(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var l=nn();e=Nl(l);var o=Cl(n,e,l);o!==null&&(Zt(o,n,l),eo(o,n,l)),n={cache:Fc()},e.payload=n;return}n=n.return}}function _b(e,n,l){var o=nn();l={lane:o,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Xr(e)?Up(n,l):(l=Bc(e,n,l,o),l!==null&&(Zt(l,e,o),Lp(l,n,o)))}function kp(e,n,l){var o=nn();ao(e,n,l,o)}function ao(e,n,l,o){var c={lane:o,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Xr(e))Up(n,c);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=n.lastRenderedReducer,d!==null))try{var y=n.lastRenderedState,S=d(y,l);if(c.hasEagerState=!0,c.eagerState=S,Ft(S,y))return _r(e,n,c,0),$e===null&&Er(),!1}catch{}if(l=Bc(e,n,c,o),l!==null)return Zt(l,e,o),Lp(l,n,o),!0}return!1}function ws(e,n,l,o){if(o={lane:2,revertLane:ef(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Xr(e)){if(n)throw Error(r(479))}else n=Bc(e,l,o,2),n!==null&&Zt(n,e,2)}function Xr(e){var n=e.alternate;return e===Ee||n!==null&&n===Ee}function Up(e,n){Fi=Ur=!0;var l=e.pending;l===null?n.next=n:(n.next=l.next,l.next=n),e.pending=n}function Lp(e,n,l){if((l&4194048)!==0){var o=n.lanes;o&=e.pendingLanes,l|=o,n.lanes=l,lr(e,l)}}var oo={readContext:_t,use:Yr,useCallback:tt,useContext:tt,useEffect:tt,useImperativeHandle:tt,useLayoutEffect:tt,useInsertionEffect:tt,useMemo:tt,useReducer:tt,useRef:tt,useState:tt,useDebugValue:tt,useDeferredValue:tt,useTransition:tt,useSyncExternalStore:tt,useId:tt,useHostTransitionStatus:tt,useFormState:tt,useActionState:tt,useOptimistic:tt,useMemoCache:tt,useCacheRefresh:tt};oo.useEffectEvent=tt;var Bp={readContext:_t,use:Yr,useCallback:function(e,n){return Ut().memoizedState=[e,n===void 0?null:n],e},useContext:_t,useEffect:wp,useImperativeHandle:function(e,n,l){l=l!=null?l.concat([e]):null,qr(4194308,4,Np.bind(null,n,e),l)},useLayoutEffect:function(e,n){return qr(4194308,4,e,n)},useInsertionEffect:function(e,n){qr(4,2,e,n)},useMemo:function(e,n){var l=Ut();n=n===void 0?null:n;var o=e();if(vi){jt(!0);try{e()}finally{jt(!1)}}return l.memoizedState=[o,n],o},useReducer:function(e,n,l){var o=Ut();if(l!==void 0){var c=l(n);if(vi){jt(!0);try{l(n)}finally{jt(!1)}}}else c=n;return o.memoizedState=o.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},o.queue=e,e=e.dispatch=_b.bind(null,Ee,e),[o.memoizedState,e]},useRef:function(e){var n=Ut();return e={current:e},n.memoizedState=e},useState:function(e){e=ms(e);var n=e.queue,l=kp.bind(null,Ee,n);return n.dispatch=l,[e.memoizedState,l]},useDebugValue:vs,useDeferredValue:function(e,n){var l=Ut();return xs(l,e,n)},useTransition:function(){var e=ms(!1);return e=Op.bind(null,Ee,e.queue,!0,!1),Ut().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,l){var o=Ee,c=Ut();if(De){if(l===void 0)throw Error(r(407));l=l()}else{if(l=n(),$e===null)throw Error(r(349));(ze&127)!==0||op(o,n,l)}c.memoizedState=l;var d={value:l,getSnapshot:n};return c.queue=d,wp(up.bind(null,o,d,e),[e]),o.flags|=2048,Wi(9,{destroy:void 0},rp.bind(null,o,d,l,n),null),l},useId:function(){var e=Ut(),n=$e.identifierPrefix;if(De){var l=Dn,o=On;l=(o&~(1<<32-Je(o)-1)).toString(32)+l,n="_"+n+"R_"+l,l=Lr++,0<l&&(n+="H"+l.toString(32)),n+="_"}else l=yb++,n="_"+n+"r_"+l.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:Ss,useFormState:yp,useActionState:yp,useOptimistic:function(e){var n=Ut();n.memoizedState=n.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=l,n=ws.bind(null,Ee,!0,l),l.dispatch=n,[e,n]},useMemoCache:ds,useCacheRefresh:function(){return Ut().memoizedState=Eb.bind(null,Ee)},useEffectEvent:function(e){var n=Ut(),l={impl:e};return n.memoizedState=l,function(){if((Be&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},Es={readContext:_t,use:Yr,useCallback:Tp,useContext:_t,useEffect:ys,useImperativeHandle:Cp,useInsertionEffect:_p,useLayoutEffect:Ap,useMemo:Mp,useReducer:Vr,useRef:Sp,useState:function(){return Vr(Wn)},useDebugValue:vs,useDeferredValue:function(e,n){var l=ot();return zp(l,Xe.memoizedState,e,n)},useTransition:function(){var e=Vr(Wn)[0],n=ot().memoizedState;return[typeof e=="boolean"?e:io(e),n]},useSyncExternalStore:ap,useId:Hp,useHostTransitionStatus:Ss,useFormState:vp,useActionState:vp,useOptimistic:function(e,n){var l=ot();return fp(l,Xe,e,n)},useMemoCache:ds,useCacheRefresh:jp};Es.useEffectEvent=Ep;var Yp={readContext:_t,use:Yr,useCallback:Tp,useContext:_t,useEffect:ys,useImperativeHandle:Cp,useInsertionEffect:_p,useLayoutEffect:Ap,useMemo:Mp,useReducer:ps,useRef:Sp,useState:function(){return ps(Wn)},useDebugValue:vs,useDeferredValue:function(e,n){var l=ot();return Xe===null?xs(l,e,n):zp(l,Xe.memoizedState,e,n)},useTransition:function(){var e=ps(Wn)[0],n=ot().memoizedState;return[typeof e=="boolean"?e:io(e),n]},useSyncExternalStore:ap,useId:Hp,useHostTransitionStatus:Ss,useFormState:bp,useActionState:bp,useOptimistic:function(e,n){var l=ot();return Xe!==null?fp(l,Xe,e,n):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:ds,useCacheRefresh:jp};Yp.useEffectEvent=Ep;function _s(e,n,l,o){n=e.memoizedState,l=l(o,n),l=l==null?n:v({},n,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var As={enqueueSetState:function(e,n,l){e=e._reactInternals;var o=nn(),c=Nl(o);c.payload=n,l!=null&&(c.callback=l),n=Cl(e,c,o),n!==null&&(Zt(n,e,o),eo(n,e,o))},enqueueReplaceState:function(e,n,l){e=e._reactInternals;var o=nn(),c=Nl(o);c.tag=1,c.payload=n,l!=null&&(c.callback=l),n=Cl(e,c,o),n!==null&&(Zt(n,e,o),eo(n,e,o))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var l=nn(),o=Nl(l);o.tag=2,n!=null&&(o.callback=n),n=Cl(e,o,l),n!==null&&(Zt(n,e,l),eo(n,e,l))}};function Vp(e,n,l,o,c,d,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,d,y):n.prototype&&n.prototype.isPureReactComponent?!Qa(l,o)||!Qa(c,d):!0}function qp(e,n,l,o){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(l,o),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(l,o),n.state!==e&&As.enqueueReplaceState(n,n.state,null)}function xi(e,n){var l=n;if("ref"in n){l={};for(var o in n)o!=="ref"&&(l[o]=n[o])}if(e=e.defaultProps){l===n&&(l=v({},l));for(var c in e)l[c]===void 0&&(l[c]=e[c])}return l}function Gp(e){wr(e)}function Xp(e){console.error(e)}function Zp(e){wr(e)}function Zr(e,n){try{var l=e.onUncaughtError;l(n.value,{componentStack:n.stack})}catch(o){setTimeout(function(){throw o})}}function Qp(e,n,l){try{var o=e.onCaughtError;o(l.value,{componentStack:l.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Ns(e,n,l){return l=Nl(l),l.tag=3,l.payload={element:null},l.callback=function(){Zr(e,n)},l}function $p(e){return e=Nl(e),e.tag=3,e}function Kp(e,n,l,o){var c=l.type.getDerivedStateFromError;if(typeof c=="function"){var d=o.value;e.payload=function(){return c(d)},e.callback=function(){Qp(n,l,o)}}var y=l.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){Qp(n,l,o),typeof c!="function"&&(Rl===null?Rl=new Set([this]):Rl.add(this));var S=o.stack;this.componentDidCatch(o.value,{componentStack:S!==null?S:""})})}function Ab(e,n,l,o,c){if(l.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(n=l.alternate,n!==null&&Xi(n,l,c,!0),l=Wt.current,l!==null){switch(l.tag){case 31:case 13:return mn===null?lu():l.alternate===null&&nt===0&&(nt=3),l.flags&=-257,l.flags|=65536,l.lanes=c,o===Dr?l.flags|=16384:(n=l.updateQueue,n===null?l.updateQueue=new Set([o]):n.add(o),Js(e,o,c)),!1;case 22:return l.flags|=65536,o===Dr?l.flags|=16384:(n=l.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([o])},l.updateQueue=n):(l=n.retryQueue,l===null?n.retryQueue=new Set([o]):l.add(o)),Js(e,o,c)),!1}throw Error(r(435,l.tag))}return Js(e,o,c),lu(),!1}if(De)return n=Wt.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=c,o!==Zc&&(e=Error(r(422),{cause:o}),Ia(fn(e,l)))):(o!==Zc&&(n=Error(r(423),{cause:o}),Ia(fn(n,l))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,o=fn(o,l),c=Ns(e.stateNode,o,c),ns(e,c),nt!==4&&(nt=2)),!1;var d=Error(r(520),{cause:o});if(d=fn(d,l),mo===null?mo=[d]:mo.push(d),nt!==4&&(nt=2),n===null)return!0;o=fn(o,l),l=n;do{switch(l.tag){case 3:return l.flags|=65536,e=c&-c,l.lanes|=e,e=Ns(l.stateNode,o,e),ns(l,e),!1;case 1:if(n=l.type,d=l.stateNode,(l.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(Rl===null||!Rl.has(d))))return l.flags|=65536,c&=-c,l.lanes|=c,c=$p(c),Kp(c,e,l,o),ns(l,c),!1}l=l.return}while(l!==null);return!1}var Cs=Error(r(461)),st=!1;function At(e,n,l,o){n.child=e===null?Wh(n,null,l,o):yi(n,e.child,l,o)}function Ip(e,n,l,o,c){l=l.render;var d=n.ref;if("ref"in o){var y={};for(var S in o)S!=="ref"&&(y[S]=o[S])}else y=o;return hi(n),o=us(e,n,l,y,d,c),S=cs(),e!==null&&!st?(ss(e,n,c),Pn(e,n,c)):(De&&S&&Gc(n),n.flags|=1,At(e,n,o,c),n.child)}function Fp(e,n,l,o,c){if(e===null){var d=l.type;return typeof d=="function"&&!Yc(d)&&d.defaultProps===void 0&&l.compare===null?(n.tag=15,n.type=d,Jp(e,n,d,o,c)):(e=Nr(l.type,null,o,n,n.mode,c),e.ref=n.ref,e.return=n,n.child=e)}if(d=e.child,!js(e,c)){var y=d.memoizedProps;if(l=l.compare,l=l!==null?l:Qa,l(y,o)&&e.ref===n.ref)return Pn(e,n,c)}return n.flags|=1,e=$n(d,o),e.ref=n.ref,e.return=n,n.child=e}function Jp(e,n,l,o,c){if(e!==null){var d=e.memoizedProps;if(Qa(d,o)&&e.ref===n.ref)if(st=!1,n.pendingProps=o=d,js(e,c))(e.flags&131072)!==0&&(st=!0);else return n.lanes=e.lanes,Pn(e,n,c)}return Ts(e,n,l,o,c)}function Wp(e,n,l,o){var c=o.children,d=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((n.flags&128)!==0){if(d=d!==null?d.baseLanes|l:l,e!==null){for(o=n.child=e.child,c=0;o!==null;)c=c|o.lanes|o.childLanes,o=o.sibling;o=c&~d}else o=0,n.child=null;return Pp(e,n,d,l,o)}if((l&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&zr(n,d!==null?d.cachePool:null),d!==null?tp(n,d):is(),np(n);else return o=n.lanes=536870912,Pp(e,n,d!==null?d.baseLanes|l:l,l,o)}else d!==null?(zr(n,d.cachePool),tp(n,d),Ml(),n.memoizedState=null):(e!==null&&zr(n,null),is(),Ml());return At(e,n,c,l),n.child}function ro(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Pp(e,n,l,o,c){var d=Wc();return d=d===null?null:{parent:ut._currentValue,pool:d},n.memoizedState={baseLanes:l,cachePool:d},e!==null&&zr(n,null),is(),np(n),e!==null&&Xi(e,n,o,!0),n.childLanes=c,null}function Qr(e,n){return n=Kr({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function e0(e,n,l){return yi(n,e.child,null,l),e=Qr(n,n.pendingProps),e.flags|=2,Pt(n),n.memoizedState=null,e}function Nb(e,n,l){var o=n.pendingProps,c=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(De){if(o.mode==="hidden")return e=Qr(n,o),n.lanes=536870912,ro(null,e);if(os(n),(e=Ke)?(e=dm(e,pn),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Sl!==null?{id:On,overflow:Dn}:null,retryLane:536870912,hydrationErrors:null},l=Uh(e),l.return=n,n.child=l,Et=n,Ke=null)):e=null,e===null)throw El(n);return n.lanes=536870912,null}return Qr(n,o)}var d=e.memoizedState;if(d!==null){var y=d.dehydrated;if(os(n),c)if(n.flags&256)n.flags&=-257,n=e0(e,n,l);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(r(558));else if(st||Xi(e,n,l,!1),c=(l&e.childLanes)!==0,st||c){if(o=$e,o!==null&&(y=ir(o,l),y!==0&&y!==d.retryLane))throw d.retryLane=y,ci(e,y),Zt(o,e,y),Cs;lu(),n=e0(e,n,l)}else e=d.treeContext,Ke=gn(y.nextSibling),Et=n,De=!0,wl=null,pn=!1,e!==null&&Yh(n,e),n=Qr(n,o),n.flags|=4096;return n}return e=$n(e.child,{mode:o.mode,children:o.children}),e.ref=n.ref,n.child=e,e.return=n,e}function $r(e,n){var l=n.ref;if(l===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(e===null||e.ref!==l)&&(n.flags|=4194816)}}function Ts(e,n,l,o,c){return hi(n),l=us(e,n,l,o,void 0,c),o=cs(),e!==null&&!st?(ss(e,n,c),Pn(e,n,c)):(De&&o&&Gc(n),n.flags|=1,At(e,n,l,c),n.child)}function t0(e,n,l,o,c,d){return hi(n),n.updateQueue=null,l=ip(n,o,l,c),lp(e),o=cs(),e!==null&&!st?(ss(e,n,d),Pn(e,n,d)):(De&&o&&Gc(n),n.flags|=1,At(e,n,l,d),n.child)}function n0(e,n,l,o,c){if(hi(n),n.stateNode===null){var d=Yi,y=l.contextType;typeof y=="object"&&y!==null&&(d=_t(y)),d=new l(o,d),n.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=As,n.stateNode=d,d._reactInternals=n,d=n.stateNode,d.props=o,d.state=n.memoizedState,d.refs={},es(n),y=l.contextType,d.context=typeof y=="object"&&y!==null?_t(y):Yi,d.state=n.memoizedState,y=l.getDerivedStateFromProps,typeof y=="function"&&(_s(n,l,y,o),d.state=n.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(y=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),y!==d.state&&As.enqueueReplaceState(d,d.state,null),no(n,o,d,c),to(),d.state=n.memoizedState),typeof d.componentDidMount=="function"&&(n.flags|=4194308),o=!0}else if(e===null){d=n.stateNode;var S=n.memoizedProps,O=xi(l,S);d.props=O;var Q=d.context,te=l.contextType;y=Yi,typeof te=="object"&&te!==null&&(y=_t(te));var le=l.getDerivedStateFromProps;te=typeof le=="function"||typeof d.getSnapshotBeforeUpdate=="function",S=n.pendingProps!==S,te||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(S||Q!==y)&&qp(n,d,o,y),Al=!1;var K=n.memoizedState;d.state=K,no(n,o,d,c),to(),Q=n.memoizedState,S||K!==Q||Al?(typeof le=="function"&&(_s(n,l,le,o),Q=n.memoizedState),(O=Al||Vp(n,l,O,o,K,Q,y))?(te||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(n.flags|=4194308)):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=o,n.memoizedState=Q),d.props=o,d.state=Q,d.context=y,o=O):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),o=!1)}else{d=n.stateNode,ts(e,n),y=n.memoizedProps,te=xi(l,y),d.props=te,le=n.pendingProps,K=d.context,Q=l.contextType,O=Yi,typeof Q=="object"&&Q!==null&&(O=_t(Q)),S=l.getDerivedStateFromProps,(Q=typeof S=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(y!==le||K!==O)&&qp(n,d,o,O),Al=!1,K=n.memoizedState,d.state=K,no(n,o,d,c),to();var J=n.memoizedState;y!==le||K!==J||Al||e!==null&&e.dependencies!==null&&Tr(e.dependencies)?(typeof S=="function"&&(_s(n,l,S,o),J=n.memoizedState),(te=Al||Vp(n,l,te,o,K,J,O)||e!==null&&e.dependencies!==null&&Tr(e.dependencies))?(Q||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(o,J,O),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(o,J,O)),typeof d.componentDidUpdate=="function"&&(n.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof d.componentDidUpdate!="function"||y===e.memoizedProps&&K===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&K===e.memoizedState||(n.flags|=1024),n.memoizedProps=o,n.memoizedState=J),d.props=o,d.state=J,d.context=O,o=te):(typeof d.componentDidUpdate!="function"||y===e.memoizedProps&&K===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&K===e.memoizedState||(n.flags|=1024),o=!1)}return d=o,$r(e,n),o=(n.flags&128)!==0,d||o?(d=n.stateNode,l=o&&typeof l.getDerivedStateFromError!="function"?null:d.render(),n.flags|=1,e!==null&&o?(n.child=yi(n,e.child,null,c),n.child=yi(n,null,l,c)):At(e,n,l,c),n.memoizedState=d.state,e=n.child):e=Pn(e,n,c),e}function l0(e,n,l,o){return fi(),n.flags|=256,At(e,n,l,o),n.child}var Ms={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function zs(e){return{baseLanes:e,cachePool:Qh()}}function Os(e,n,l){return e=e!==null?e.childLanes&~l:0,n&&(e|=tn),e}function i0(e,n,l){var o=n.pendingProps,c=!1,d=(n.flags&128)!==0,y;if((y=d)||(y=e!==null&&e.memoizedState===null?!1:(at.current&2)!==0),y&&(c=!0,n.flags&=-129),y=(n.flags&32)!==0,n.flags&=-33,e===null){if(De){if(c?Tl(n):Ml(),(e=Ke)?(e=dm(e,pn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Sl!==null?{id:On,overflow:Dn}:null,retryLane:536870912,hydrationErrors:null},l=Uh(e),l.return=n,n.child=l,Et=n,Ke=null)):e=null,e===null)throw El(n);return pf(e)?n.lanes=32:n.lanes=536870912,null}var S=o.children;return o=o.fallback,c?(Ml(),c=n.mode,S=Kr({mode:"hidden",children:S},c),o=si(o,c,l,null),S.return=n,o.return=n,S.sibling=o,n.child=S,o=n.child,o.memoizedState=zs(l),o.childLanes=Os(e,y,l),n.memoizedState=Ms,ro(null,o)):(Tl(n),Ds(n,S))}var O=e.memoizedState;if(O!==null&&(S=O.dehydrated,S!==null)){if(d)n.flags&256?(Tl(n),n.flags&=-257,n=Rs(e,n,l)):n.memoizedState!==null?(Ml(),n.child=e.child,n.flags|=128,n=null):(Ml(),S=o.fallback,c=n.mode,o=Kr({mode:"visible",children:o.children},c),S=si(S,c,l,null),S.flags|=2,o.return=n,S.return=n,o.sibling=S,n.child=o,yi(n,e.child,null,l),o=n.child,o.memoizedState=zs(l),o.childLanes=Os(e,y,l),n.memoizedState=Ms,n=ro(null,o));else if(Tl(n),pf(S)){if(y=S.nextSibling&&S.nextSibling.dataset,y)var Q=y.dgst;y=Q,o=Error(r(419)),o.stack="",o.digest=y,Ia({value:o,source:null,stack:null}),n=Rs(e,n,l)}else if(st||Xi(e,n,l,!1),y=(l&e.childLanes)!==0,st||y){if(y=$e,y!==null&&(o=ir(y,l),o!==0&&o!==O.retryLane))throw O.retryLane=o,ci(e,o),Zt(y,e,o),Cs;hf(S)||lu(),n=Rs(e,n,l)}else hf(S)?(n.flags|=192,n.child=e.child,n=null):(e=O.treeContext,Ke=gn(S.nextSibling),Et=n,De=!0,wl=null,pn=!1,e!==null&&Yh(n,e),n=Ds(n,o.children),n.flags|=4096);return n}return c?(Ml(),S=o.fallback,c=n.mode,O=e.child,Q=O.sibling,o=$n(O,{mode:"hidden",children:o.children}),o.subtreeFlags=O.subtreeFlags&65011712,Q!==null?S=$n(Q,S):(S=si(S,c,l,null),S.flags|=2),S.return=n,o.return=n,o.sibling=S,n.child=o,ro(null,o),o=n.child,S=e.child.memoizedState,S===null?S=zs(l):(c=S.cachePool,c!==null?(O=ut._currentValue,c=c.parent!==O?{parent:O,pool:O}:c):c=Qh(),S={baseLanes:S.baseLanes|l,cachePool:c}),o.memoizedState=S,o.childLanes=Os(e,y,l),n.memoizedState=Ms,ro(e.child,o)):(Tl(n),l=e.child,e=l.sibling,l=$n(l,{mode:"visible",children:o.children}),l.return=n,l.sibling=null,e!==null&&(y=n.deletions,y===null?(n.deletions=[e],n.flags|=16):y.push(e)),n.child=l,n.memoizedState=null,l)}function Ds(e,n){return n=Kr({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function Kr(e,n){return e=Jt(22,e,null,n),e.lanes=0,e}function Rs(e,n,l){return yi(n,e.child,null,l),e=Ds(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function a0(e,n,l){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n),Kc(e.return,n,l)}function Hs(e,n,l,o,c,d){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:o,tail:l,tailMode:c,treeForkCount:d}:(y.isBackwards=n,y.rendering=null,y.renderingStartTime=0,y.last=o,y.tail=l,y.tailMode=c,y.treeForkCount=d)}function o0(e,n,l){var o=n.pendingProps,c=o.revealOrder,d=o.tail;o=o.children;var y=at.current,S=(y&2)!==0;if(S?(y=y&1|2,n.flags|=128):y&=1,F(at,y),At(e,n,o,l),o=De?Ka:0,!S&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&a0(e,l,n);else if(e.tag===19)a0(e,l,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}switch(c){case"forwards":for(l=n.child,c=null;l!==null;)e=l.alternate,e!==null&&kr(e)===null&&(c=l),l=l.sibling;l=c,l===null?(c=n.child,n.child=null):(c=l.sibling,l.sibling=null),Hs(n,!1,c,l,d,o);break;case"backwards":case"unstable_legacy-backwards":for(l=null,c=n.child,n.child=null;c!==null;){if(e=c.alternate,e!==null&&kr(e)===null){n.child=c;break}e=c.sibling,c.sibling=l,l=c,c=e}Hs(n,!0,l,null,d,o);break;case"together":Hs(n,!1,null,null,void 0,o);break;default:n.memoizedState=null}return n.child}function Pn(e,n,l){if(e!==null&&(n.dependencies=e.dependencies),Dl|=n.lanes,(l&n.childLanes)===0)if(e!==null){if(Xi(e,n,l,!1),(l&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(r(153));if(n.child!==null){for(e=n.child,l=$n(e,e.pendingProps),n.child=l,l.return=n;e.sibling!==null;)e=e.sibling,l=l.sibling=$n(e,e.pendingProps),l.return=n;l.sibling=null}return n.child}function js(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&Tr(e)))}function Cb(e,n,l){switch(n.tag){case 3:be(n,n.stateNode.containerInfo),_l(n,ut,e.memoizedState.cache),fi();break;case 27:case 5:Ae(n);break;case 4:be(n,n.stateNode.containerInfo);break;case 10:_l(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,os(n),null;break;case 13:var o=n.memoizedState;if(o!==null)return o.dehydrated!==null?(Tl(n),n.flags|=128,null):(l&n.child.childLanes)!==0?i0(e,n,l):(Tl(n),e=Pn(e,n,l),e!==null?e.sibling:null);Tl(n);break;case 19:var c=(e.flags&128)!==0;if(o=(l&n.childLanes)!==0,o||(Xi(e,n,l,!1),o=(l&n.childLanes)!==0),c){if(o)return o0(e,n,l);n.flags|=128}if(c=n.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),F(at,at.current),o)break;return null;case 22:return n.lanes=0,Wp(e,n,l,n.pendingProps);case 24:_l(n,ut,e.memoizedState.cache)}return Pn(e,n,l)}function r0(e,n,l){if(e!==null)if(e.memoizedProps!==n.pendingProps)st=!0;else{if(!js(e,l)&&(n.flags&128)===0)return st=!1,Cb(e,n,l);st=(e.flags&131072)!==0}else st=!1,De&&(n.flags&1048576)!==0&&Bh(n,Ka,n.index);switch(n.lanes=0,n.tag){case 16:e:{var o=n.pendingProps;if(e=mi(n.elementType),n.type=e,typeof e=="function")Yc(e)?(o=xi(e,o),n.tag=1,n=n0(null,n,e,o,l)):(n.tag=0,n=Ts(null,n,e,o,l));else{if(e!=null){var c=e.$$typeof;if(c===j){n.tag=11,n=Ip(null,n,e,o,l);break e}else if(c===$){n.tag=14,n=Fp(null,n,e,o,l);break e}}throw n=x(e)||e,Error(r(306,n,""))}}return n;case 0:return Ts(e,n,n.type,n.pendingProps,l);case 1:return o=n.type,c=xi(o,n.pendingProps),n0(e,n,o,c,l);case 3:e:{if(be(n,n.stateNode.containerInfo),e===null)throw Error(r(387));o=n.pendingProps;var d=n.memoizedState;c=d.element,ts(e,n),no(n,o,null,l);var y=n.memoizedState;if(o=y.cache,_l(n,ut,o),o!==d.cache&&Ic(n,[ut],l,!0),to(),o=y.element,d.isDehydrated)if(d={element:o,isDehydrated:!1,cache:y.cache},n.updateQueue.baseState=d,n.memoizedState=d,n.flags&256){n=l0(e,n,o,l);break e}else if(o!==c){c=fn(Error(r(424)),n),Ia(c),n=l0(e,n,o,l);break e}else for(e=n.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Ke=gn(e.firstChild),Et=n,De=!0,wl=null,pn=!0,l=Wh(n,null,o,l),n.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(fi(),o===c){n=Pn(e,n,l);break e}At(e,n,o,l)}n=n.child}return n;case 26:return $r(e,n),e===null?(l=vm(n.type,null,n.pendingProps,null))?n.memoizedState=l:De||(l=n.type,e=n.pendingProps,o=su(ce.current).createElement(l),o[mt]=n,o[wt]=e,Nt(o,l,e),rt(o),n.stateNode=o):n.memoizedState=vm(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return Ae(n),e===null&&De&&(o=n.stateNode=mm(n.type,n.pendingProps,ce.current),Et=n,pn=!0,c=Ke,Ul(n.type)?(mf=c,Ke=gn(o.firstChild)):Ke=c),At(e,n,n.pendingProps.children,l),$r(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&De&&((c=o=Ke)&&(o=lS(o,n.type,n.pendingProps,pn),o!==null?(n.stateNode=o,Et=n,Ke=gn(o.firstChild),pn=!1,c=!0):c=!1),c||El(n)),Ae(n),c=n.type,d=n.pendingProps,y=e!==null?e.memoizedProps:null,o=d.children,sf(c,d)?o=null:y!==null&&sf(c,y)&&(n.flags|=32),n.memoizedState!==null&&(c=us(e,n,vb,null,null,l),Eo._currentValue=c),$r(e,n),At(e,n,o,l),n.child;case 6:return e===null&&De&&((e=l=Ke)&&(l=iS(l,n.pendingProps,pn),l!==null?(n.stateNode=l,Et=n,Ke=null,e=!0):e=!1),e||El(n)),null;case 13:return i0(e,n,l);case 4:return be(n,n.stateNode.containerInfo),o=n.pendingProps,e===null?n.child=yi(n,null,o,l):At(e,n,o,l),n.child;case 11:return Ip(e,n,n.type,n.pendingProps,l);case 7:return At(e,n,n.pendingProps,l),n.child;case 8:return At(e,n,n.pendingProps.children,l),n.child;case 12:return At(e,n,n.pendingProps.children,l),n.child;case 10:return o=n.pendingProps,_l(n,n.type,o.value),At(e,n,o.children,l),n.child;case 9:return c=n.type._context,o=n.pendingProps.children,hi(n),c=_t(c),o=o(c),n.flags|=1,At(e,n,o,l),n.child;case 14:return Fp(e,n,n.type,n.pendingProps,l);case 15:return Jp(e,n,n.type,n.pendingProps,l);case 19:return o0(e,n,l);case 31:return Nb(e,n,l);case 22:return Wp(e,n,l,n.pendingProps);case 24:return hi(n),o=_t(ut),e===null?(c=Wc(),c===null&&(c=$e,d=Fc(),c.pooledCache=d,d.refCount++,d!==null&&(c.pooledCacheLanes|=l),c=d),n.memoizedState={parent:o,cache:c},es(n),_l(n,ut,c)):((e.lanes&l)!==0&&(ts(e,n),no(n,null,null,l),to()),c=e.memoizedState,d=n.memoizedState,c.parent!==o?(c={parent:o,cache:o},n.memoizedState=c,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=c),_l(n,ut,o)):(o=d.cache,_l(n,ut,o),o!==c.cache&&Ic(n,[ut],l,!0))),At(e,n,n.pendingProps.children,l),n.child;case 29:throw n.pendingProps}throw Error(r(156,n.tag))}function el(e){e.flags|=4}function ks(e,n,l,o,c){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(H0())e.flags|=8192;else throw gi=Dr,Pc}else e.flags&=-16777217}function u0(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Em(n))if(H0())e.flags|=8192;else throw gi=Dr,Pc}function Ir(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?tr():536870912,e.lanes|=n,na|=n)}function uo(e,n){if(!De)switch(e.tailMode){case"hidden":n=e.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var o=null;l!==null;)l.alternate!==null&&(o=l),l=l.sibling;o===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function Ie(e){var n=e.alternate!==null&&e.alternate.child===e.child,l=0,o=0;if(n)for(var c=e.child;c!==null;)l|=c.lanes|c.childLanes,o|=c.subtreeFlags&65011712,o|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)l|=c.lanes|c.childLanes,o|=c.subtreeFlags,o|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=o,e.childLanes=l,n}function Tb(e,n,l){var o=n.pendingProps;switch(Xc(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ie(n),null;case 1:return Ie(n),null;case 3:return l=n.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),n.memoizedState.cache!==o&&(n.flags|=2048),Fn(ut),de(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Gi(n)?el(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Qc())),Ie(n),null;case 26:var c=n.type,d=n.memoizedState;return e===null?(el(n),d!==null?(Ie(n),u0(n,d)):(Ie(n),ks(n,c,null,o,l))):d?d!==e.memoizedState?(el(n),Ie(n),u0(n,d)):(Ie(n),n.flags&=-16777217):(e=e.memoizedProps,e!==o&&el(n),Ie(n),ks(n,c,e,o,l)),null;case 27:if(Re(n),l=ce.current,c=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==o&&el(n);else{if(!o){if(n.stateNode===null)throw Error(r(166));return Ie(n),null}e=P.current,Gi(n)?Vh(n):(e=mm(c,o,l),n.stateNode=e,el(n))}return Ie(n),null;case 5:if(Re(n),c=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==o&&el(n);else{if(!o){if(n.stateNode===null)throw Error(r(166));return Ie(n),null}if(d=P.current,Gi(n))Vh(n);else{var y=su(ce.current);switch(d){case 1:d=y.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:d=y.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":d=y.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":d=y.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":d=y.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof o.is=="string"?y.createElement("select",{is:o.is}):y.createElement("select"),o.multiple?d.multiple=!0:o.size&&(d.size=o.size);break;default:d=typeof o.is=="string"?y.createElement(c,{is:o.is}):y.createElement(c)}}d[mt]=n,d[wt]=o;e:for(y=n.child;y!==null;){if(y.tag===5||y.tag===6)d.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===n)break e;for(;y.sibling===null;){if(y.return===null||y.return===n)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}n.stateNode=d;e:switch(Nt(d,c,o),c){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&el(n)}}return Ie(n),ks(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,l),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==o&&el(n);else{if(typeof o!="string"&&n.stateNode===null)throw Error(r(166));if(e=ce.current,Gi(n)){if(e=n.stateNode,l=n.memoizedProps,o=null,c=Et,c!==null)switch(c.tag){case 27:case 5:o=c.memoizedProps}e[mt]=n,e=!!(e.nodeValue===l||o!==null&&o.suppressHydrationWarning===!0||im(e.nodeValue,l)),e||El(n,!0)}else e=su(e).createTextNode(o),e[mt]=n,n.stateNode=e}return Ie(n),null;case 31:if(l=n.memoizedState,e===null||e.memoizedState!==null){if(o=Gi(n),l!==null){if(e===null){if(!o)throw Error(r(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[mt]=n}else fi(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Ie(n),e=!1}else l=Qc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return n.flags&256?(Pt(n),n):(Pt(n),null);if((n.flags&128)!==0)throw Error(r(558))}return Ie(n),null;case 13:if(o=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=Gi(n),o!==null&&o.dehydrated!==null){if(e===null){if(!c)throw Error(r(318));if(c=n.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(r(317));c[mt]=n}else fi(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Ie(n),c=!1}else c=Qc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return n.flags&256?(Pt(n),n):(Pt(n),null)}return Pt(n),(n.flags&128)!==0?(n.lanes=l,n):(l=o!==null,e=e!==null&&e.memoizedState!==null,l&&(o=n.child,c=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(c=o.alternate.memoizedState.cachePool.pool),d=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),d!==c&&(o.flags|=2048)),l!==e&&l&&(n.child.flags|=8192),Ir(n,n.updateQueue),Ie(n),null);case 4:return de(),e===null&&af(n.stateNode.containerInfo),Ie(n),null;case 10:return Fn(n.type),Ie(n),null;case 19:if(U(at),o=n.memoizedState,o===null)return Ie(n),null;if(c=(n.flags&128)!==0,d=o.rendering,d===null)if(c)uo(o,!1);else{if(nt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(d=kr(e),d!==null){for(n.flags|=128,uo(o,!1),e=d.updateQueue,n.updateQueue=e,Ir(n,e),n.subtreeFlags=0,e=l,l=n.child;l!==null;)kh(l,e),l=l.sibling;return F(at,at.current&1|2),De&&Kn(n,o.treeForkCount),n.child}e=e.sibling}o.tail!==null&&Fe()>eu&&(n.flags|=128,c=!0,uo(o,!1),n.lanes=4194304)}else{if(!c)if(e=kr(d),e!==null){if(n.flags|=128,c=!0,e=e.updateQueue,n.updateQueue=e,Ir(n,e),uo(o,!0),o.tail===null&&o.tailMode==="hidden"&&!d.alternate&&!De)return Ie(n),null}else 2*Fe()-o.renderingStartTime>eu&&l!==536870912&&(n.flags|=128,c=!0,uo(o,!1),n.lanes=4194304);o.isBackwards?(d.sibling=n.child,n.child=d):(e=o.last,e!==null?e.sibling=d:n.child=d,o.last=d)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=Fe(),e.sibling=null,l=at.current,F(at,c?l&1|2:l&1),De&&Kn(n,o.treeForkCount),e):(Ie(n),null);case 22:case 23:return Pt(n),as(),o=n.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(n.flags|=8192):o&&(n.flags|=8192),o?(l&536870912)!==0&&(n.flags&128)===0&&(Ie(n),n.subtreeFlags&6&&(n.flags|=8192)):Ie(n),l=n.updateQueue,l!==null&&Ir(n,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),o=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),o!==l&&(n.flags|=2048),e!==null&&U(pi),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),Fn(ut),Ie(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function Mb(e,n){switch(Xc(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Fn(ut),de(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return Re(n),null;case 31:if(n.memoizedState!==null){if(Pt(n),n.alternate===null)throw Error(r(340));fi()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(Pt(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));fi()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return U(at),null;case 4:return de(),null;case 10:return Fn(n.type),null;case 22:case 23:return Pt(n),as(),e!==null&&U(pi),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return Fn(ut),null;case 25:return null;default:return null}}function c0(e,n){switch(Xc(n),n.tag){case 3:Fn(ut),de();break;case 26:case 27:case 5:Re(n);break;case 4:de();break;case 31:n.memoizedState!==null&&Pt(n);break;case 13:Pt(n);break;case 19:U(at);break;case 10:Fn(n.type);break;case 22:case 23:Pt(n),as(),e!==null&&U(pi);break;case 24:Fn(ut)}}function co(e,n){try{var l=n.updateQueue,o=l!==null?l.lastEffect:null;if(o!==null){var c=o.next;l=c;do{if((l.tag&e)===e){o=void 0;var d=l.create,y=l.inst;o=d(),y.destroy=o}l=l.next}while(l!==c)}}catch(S){Ge(n,n.return,S)}}function zl(e,n,l){try{var o=n.updateQueue,c=o!==null?o.lastEffect:null;if(c!==null){var d=c.next;o=d;do{if((o.tag&e)===e){var y=o.inst,S=y.destroy;if(S!==void 0){y.destroy=void 0,c=n;var O=l,Q=S;try{Q()}catch(te){Ge(c,O,te)}}}o=o.next}while(o!==d)}}catch(te){Ge(n,n.return,te)}}function s0(e){var n=e.updateQueue;if(n!==null){var l=e.stateNode;try{ep(n,l)}catch(o){Ge(e,e.return,o)}}}function f0(e,n,l){l.props=xi(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(o){Ge(e,n,o)}}function so(e,n){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof l=="function"?e.refCleanup=l(o):l.current=o}}catch(c){Ge(e,n,c)}}function Rn(e,n){var l=e.ref,o=e.refCleanup;if(l!==null)if(typeof o=="function")try{o()}catch(c){Ge(e,n,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(c){Ge(e,n,c)}else l.current=null}function d0(e){var n=e.type,l=e.memoizedProps,o=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":l.autoFocus&&o.focus();break e;case"img":l.src?o.src=l.src:l.srcSet&&(o.srcset=l.srcSet)}}catch(c){Ge(e,e.return,c)}}function Us(e,n,l){try{var o=e.stateNode;Jb(o,e.type,l,n),o[wt]=n}catch(c){Ge(e,e.return,c)}}function h0(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ul(e.type)||e.tag===4}function Ls(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||h0(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.tag===27&&Ul(e.type)||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 Bs(e,n,l){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,n):(n=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,n.appendChild(e),l=l._reactRootContainer,l!=null||n.onclick!==null||(n.onclick=Zn));else if(o!==4&&(o===27&&Ul(e.type)&&(l=e.stateNode,n=null),e=e.child,e!==null))for(Bs(e,n,l),e=e.sibling;e!==null;)Bs(e,n,l),e=e.sibling}function Fr(e,n,l){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?l.insertBefore(e,n):l.appendChild(e);else if(o!==4&&(o===27&&Ul(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Fr(e,n,l),e=e.sibling;e!==null;)Fr(e,n,l),e=e.sibling}function p0(e){var n=e.stateNode,l=e.memoizedProps;try{for(var o=e.type,c=n.attributes;c.length;)n.removeAttributeNode(c[0]);Nt(n,o,l),n[mt]=e,n[wt]=l}catch(d){Ge(e,e.return,d)}}var tl=!1,ft=!1,Ys=!1,m0=typeof WeakSet=="function"?WeakSet:Set,St=null;function zb(e,n){if(e=e.containerInfo,uf=yu,e=Ch(e),Rc(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var o=l.getSelection&&l.getSelection();if(o&&o.rangeCount!==0){l=o.anchorNode;var c=o.anchorOffset,d=o.focusNode;o=o.focusOffset;try{l.nodeType,d.nodeType}catch{l=null;break e}var y=0,S=-1,O=-1,Q=0,te=0,le=e,K=null;t:for(;;){for(var J;le!==l||c!==0&&le.nodeType!==3||(S=y+c),le!==d||o!==0&&le.nodeType!==3||(O=y+o),le.nodeType===3&&(y+=le.nodeValue.length),(J=le.firstChild)!==null;)K=le,le=J;for(;;){if(le===e)break t;if(K===l&&++Q===c&&(S=y),K===d&&++te===o&&(O=y),(J=le.nextSibling)!==null)break;le=K,K=le.parentNode}le=J}l=S===-1||O===-1?null:{start:S,end:O}}else l=null}l=l||{start:0,end:0}}else l=null;for(cf={focusedElem:e,selectionRange:l},yu=!1,St=n;St!==null;)if(n=St,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,St=e;else for(;St!==null;){switch(n=St,d=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l<e.length;l++)c=e[l],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,l=n,c=d.memoizedProps,d=d.memoizedState,o=l.stateNode;try{var he=xi(l.type,c);e=o.getSnapshotBeforeUpdate(he,d),o.__reactInternalSnapshotBeforeUpdate=e}catch(Se){Ge(l,l.return,Se)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,l=e.nodeType,l===9)df(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":df(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=n.sibling,e!==null){e.return=n.return,St=e;break}St=n.return}}function g0(e,n,l){var o=l.flags;switch(l.tag){case 0:case 11:case 15:ll(e,l),o&4&&co(5,l);break;case 1:if(ll(e,l),o&4)if(e=l.stateNode,n===null)try{e.componentDidMount()}catch(y){Ge(l,l.return,y)}else{var c=xi(l.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(c,n,e.__reactInternalSnapshotBeforeUpdate)}catch(y){Ge(l,l.return,y)}}o&64&&s0(l),o&512&&so(l,l.return);break;case 3:if(ll(e,l),o&64&&(e=l.updateQueue,e!==null)){if(n=null,l.child!==null)switch(l.child.tag){case 27:case 5:n=l.child.stateNode;break;case 1:n=l.child.stateNode}try{ep(e,n)}catch(y){Ge(l,l.return,y)}}break;case 27:n===null&&o&4&&p0(l);case 26:case 5:ll(e,l),n===null&&o&4&&d0(l),o&512&&so(l,l.return);break;case 12:ll(e,l);break;case 31:ll(e,l),o&4&&x0(e,l);break;case 13:ll(e,l),o&4&&b0(e,l),o&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Bb.bind(null,l),aS(e,l))));break;case 22:if(o=l.memoizedState!==null||tl,!o){n=n!==null&&n.memoizedState!==null||ft,c=tl;var d=ft;tl=o,(ft=n)&&!d?il(e,l,(l.subtreeFlags&8772)!==0):ll(e,l),tl=c,ft=d}break;case 30:break;default:ll(e,l)}}function y0(e){var n=e.alternate;n!==null&&(e.alternate=null,y0(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&Ua(n)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var We=null,Vt=!1;function nl(e,n,l){for(l=l.child;l!==null;)v0(e,n,l),l=l.sibling}function v0(e,n,l){if(it&&typeof it.onCommitFiberUnmount=="function")try{it.onCommitFiberUnmount(It,l)}catch{}switch(l.tag){case 26:ft||Rn(l,n),nl(e,n,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:ft||Rn(l,n);var o=We,c=Vt;Ul(l.type)&&(We=l.stateNode,Vt=!1),nl(e,n,l),bo(l.stateNode),We=o,Vt=c;break;case 5:ft||Rn(l,n);case 6:if(o=We,c=Vt,We=null,nl(e,n,l),We=o,Vt=c,We!==null)if(Vt)try{(We.nodeType===9?We.body:We.nodeName==="HTML"?We.ownerDocument.body:We).removeChild(l.stateNode)}catch(d){Ge(l,n,d)}else try{We.removeChild(l.stateNode)}catch(d){Ge(l,n,d)}break;case 18:We!==null&&(Vt?(e=We,sm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),sa(e)):sm(We,l.stateNode));break;case 4:o=We,c=Vt,We=l.stateNode.containerInfo,Vt=!0,nl(e,n,l),We=o,Vt=c;break;case 0:case 11:case 14:case 15:zl(2,l,n),ft||zl(4,l,n),nl(e,n,l);break;case 1:ft||(Rn(l,n),o=l.stateNode,typeof o.componentWillUnmount=="function"&&f0(l,n,o)),nl(e,n,l);break;case 21:nl(e,n,l);break;case 22:ft=(o=ft)||l.memoizedState!==null,nl(e,n,l),ft=o;break;default:nl(e,n,l)}}function x0(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{sa(e)}catch(l){Ge(n,n.return,l)}}}function b0(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{sa(e)}catch(l){Ge(n,n.return,l)}}function Ob(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new m0),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new m0),n;default:throw Error(r(435,e.tag))}}function Jr(e,n){var l=Ob(e);n.forEach(function(o){if(!l.has(o)){l.add(o);var c=Yb.bind(null,e,o);o.then(c,c)}})}function qt(e,n){var l=n.deletions;if(l!==null)for(var o=0;o<l.length;o++){var c=l[o],d=e,y=n,S=y;e:for(;S!==null;){switch(S.tag){case 27:if(Ul(S.type)){We=S.stateNode,Vt=!1;break e}break;case 5:We=S.stateNode,Vt=!1;break e;case 3:case 4:We=S.stateNode.containerInfo,Vt=!0;break e}S=S.return}if(We===null)throw Error(r(160));v0(d,y,c),We=null,Vt=!1,d=c.alternate,d!==null&&(d.return=null),c.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)S0(n,e),n=n.sibling}var wn=null;function S0(e,n){var l=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:qt(n,e),Gt(e),o&4&&(zl(3,e,e.return),co(3,e),zl(5,e,e.return));break;case 1:qt(n,e),Gt(e),o&512&&(ft||l===null||Rn(l,l.return)),o&64&&tl&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?o:l.concat(o))));break;case 26:var c=wn;if(qt(n,e),Gt(e),o&512&&(ft||l===null||Rn(l,l.return)),o&4){var d=l!==null?l.memoizedState:null;if(o=e.memoizedState,l===null)if(o===null)if(e.stateNode===null){e:{o=e.type,l=e.memoizedProps,c=c.ownerDocument||c;t:switch(o){case"title":d=c.getElementsByTagName("title")[0],(!d||d[ii]||d[mt]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=c.createElement(o),c.head.insertBefore(d,c.querySelector("head > title"))),Nt(d,o,l),d[mt]=e,rt(d),o=d;break e;case"link":var y=Sm("link","href",c).get(o+(l.href||""));if(y){for(var S=0;S<y.length;S++)if(d=y[S],d.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&d.getAttribute("rel")===(l.rel==null?null:l.rel)&&d.getAttribute("title")===(l.title==null?null:l.title)&&d.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){y.splice(S,1);break t}}d=c.createElement(o),Nt(d,o,l),c.head.appendChild(d);break;case"meta":if(y=Sm("meta","content",c).get(o+(l.content||""))){for(S=0;S<y.length;S++)if(d=y[S],d.getAttribute("content")===(l.content==null?null:""+l.content)&&d.getAttribute("name")===(l.name==null?null:l.name)&&d.getAttribute("property")===(l.property==null?null:l.property)&&d.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&d.getAttribute("charset")===(l.charSet==null?null:l.charSet)){y.splice(S,1);break t}}d=c.createElement(o),Nt(d,o,l),c.head.appendChild(d);break;default:throw Error(r(468,o))}d[mt]=e,rt(d),o=d}e.stateNode=o}else wm(c,e.type,e.stateNode);else e.stateNode=bm(c,o,e.memoizedProps);else d!==o?(d===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):d.count--,o===null?wm(c,e.type,e.stateNode):bm(c,o,e.memoizedProps)):o===null&&e.stateNode!==null&&Us(e,e.memoizedProps,l.memoizedProps)}break;case 27:qt(n,e),Gt(e),o&512&&(ft||l===null||Rn(l,l.return)),l!==null&&o&4&&Us(e,e.memoizedProps,l.memoizedProps);break;case 5:if(qt(n,e),Gt(e),o&512&&(ft||l===null||Rn(l,l.return)),e.flags&32){c=e.stateNode;try{Ri(c,"")}catch(he){Ge(e,e.return,he)}}o&4&&e.stateNode!=null&&(c=e.memoizedProps,Us(e,c,l!==null?l.memoizedProps:c)),o&1024&&(Ys=!0);break;case 6:if(qt(n,e),Gt(e),o&4){if(e.stateNode===null)throw Error(r(162));o=e.memoizedProps,l=e.stateNode;try{l.nodeValue=o}catch(he){Ge(e,e.return,he)}}break;case 3:if(hu=null,c=wn,wn=fu(n.containerInfo),qt(n,e),wn=c,Gt(e),o&4&&l!==null&&l.memoizedState.isDehydrated)try{sa(n.containerInfo)}catch(he){Ge(e,e.return,he)}Ys&&(Ys=!1,w0(e));break;case 4:o=wn,wn=fu(e.stateNode.containerInfo),qt(n,e),Gt(e),wn=o;break;case 12:qt(n,e),Gt(e);break;case 31:qt(n,e),Gt(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Jr(e,o)));break;case 13:qt(n,e),Gt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Pr=Fe()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Jr(e,o)));break;case 22:c=e.memoizedState!==null;var O=l!==null&&l.memoizedState!==null,Q=tl,te=ft;if(tl=Q||c,ft=te||O,qt(n,e),ft=te,tl=Q,Gt(e),o&8192)e:for(n=e.stateNode,n._visibility=c?n._visibility&-2:n._visibility|1,c&&(l===null||O||tl||ft||bi(e)),l=null,n=e;;){if(n.tag===5||n.tag===26){if(l===null){O=l=n;try{if(d=O.stateNode,c)y=d.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{S=O.stateNode;var le=O.memoizedProps.style,K=le!=null&&le.hasOwnProperty("display")?le.display:null;S.style.display=K==null||typeof K=="boolean"?"":(""+K).trim()}}catch(he){Ge(O,O.return,he)}}}else if(n.tag===6){if(l===null){O=n;try{O.stateNode.nodeValue=c?"":O.memoizedProps}catch(he){Ge(O,O.return,he)}}}else if(n.tag===18){if(l===null){O=n;try{var J=O.stateNode;c?fm(J,!0):fm(O.stateNode,!1)}catch(he){Ge(O,O.return,he)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;l===n&&(l=null),n=n.return}l===n&&(l=null),n.sibling.return=n.return,n=n.sibling}o&4&&(o=e.updateQueue,o!==null&&(l=o.retryQueue,l!==null&&(o.retryQueue=null,Jr(e,l))));break;case 19:qt(n,e),Gt(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Jr(e,o)));break;case 30:break;case 21:break;default:qt(n,e),Gt(e)}}function Gt(e){var n=e.flags;if(n&2){try{for(var l,o=e.return;o!==null;){if(h0(o)){l=o;break}o=o.return}if(l==null)throw Error(r(160));switch(l.tag){case 27:var c=l.stateNode,d=Ls(e);Fr(e,d,c);break;case 5:var y=l.stateNode;l.flags&32&&(Ri(y,""),l.flags&=-33);var S=Ls(e);Fr(e,S,y);break;case 3:case 4:var O=l.stateNode.containerInfo,Q=Ls(e);Bs(e,Q,O);break;default:throw Error(r(161))}}catch(te){Ge(e,e.return,te)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function w0(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;w0(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function ll(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)g0(e,n.alternate,n),n=n.sibling}function bi(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:zl(4,n,n.return),bi(n);break;case 1:Rn(n,n.return);var l=n.stateNode;typeof l.componentWillUnmount=="function"&&f0(n,n.return,l),bi(n);break;case 27:bo(n.stateNode);case 26:case 5:Rn(n,n.return),bi(n);break;case 22:n.memoizedState===null&&bi(n);break;case 30:bi(n);break;default:bi(n)}e=e.sibling}}function il(e,n,l){for(l=l&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var o=n.alternate,c=e,d=n,y=d.flags;switch(d.tag){case 0:case 11:case 15:il(c,d,l),co(4,d);break;case 1:if(il(c,d,l),o=d,c=o.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(Q){Ge(o,o.return,Q)}if(o=d,c=o.updateQueue,c!==null){var S=o.stateNode;try{var O=c.shared.hiddenCallbacks;if(O!==null)for(c.shared.hiddenCallbacks=null,c=0;c<O.length;c++)Ph(O[c],S)}catch(Q){Ge(o,o.return,Q)}}l&&y&64&&s0(d),so(d,d.return);break;case 27:p0(d);case 26:case 5:il(c,d,l),l&&o===null&&y&4&&d0(d),so(d,d.return);break;case 12:il(c,d,l);break;case 31:il(c,d,l),l&&y&4&&x0(c,d);break;case 13:il(c,d,l),l&&y&4&&b0(c,d);break;case 22:d.memoizedState===null&&il(c,d,l),so(d,d.return);break;case 30:break;default:il(c,d,l)}n=n.sibling}}function Vs(e,n){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&Fa(l))}function qs(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Fa(e))}function En(e,n,l,o){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)E0(e,n,l,o),n=n.sibling}function E0(e,n,l,o){var c=n.flags;switch(n.tag){case 0:case 11:case 15:En(e,n,l,o),c&2048&&co(9,n);break;case 1:En(e,n,l,o);break;case 3:En(e,n,l,o),c&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Fa(e)));break;case 12:if(c&2048){En(e,n,l,o),e=n.stateNode;try{var d=n.memoizedProps,y=d.id,S=d.onPostCommit;typeof S=="function"&&S(y,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(O){Ge(n,n.return,O)}}else En(e,n,l,o);break;case 31:En(e,n,l,o);break;case 13:En(e,n,l,o);break;case 23:break;case 22:d=n.stateNode,y=n.alternate,n.memoizedState!==null?d._visibility&2?En(e,n,l,o):fo(e,n):d._visibility&2?En(e,n,l,o):(d._visibility|=2,Pi(e,n,l,o,(n.subtreeFlags&10256)!==0||!1)),c&2048&&Vs(y,n);break;case 24:En(e,n,l,o),c&2048&&qs(n.alternate,n);break;default:En(e,n,l,o)}}function Pi(e,n,l,o,c){for(c=c&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var d=e,y=n,S=l,O=o,Q=y.flags;switch(y.tag){case 0:case 11:case 15:Pi(d,y,S,O,c),co(8,y);break;case 23:break;case 22:var te=y.stateNode;y.memoizedState!==null?te._visibility&2?Pi(d,y,S,O,c):fo(d,y):(te._visibility|=2,Pi(d,y,S,O,c)),c&&Q&2048&&Vs(y.alternate,y);break;case 24:Pi(d,y,S,O,c),c&&Q&2048&&qs(y.alternate,y);break;default:Pi(d,y,S,O,c)}n=n.sibling}}function fo(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var l=e,o=n,c=o.flags;switch(o.tag){case 22:fo(l,o),c&2048&&Vs(o.alternate,o);break;case 24:fo(l,o),c&2048&&qs(o.alternate,o);break;default:fo(l,o)}n=n.sibling}}var ho=8192;function ea(e,n,l){if(e.subtreeFlags&ho)for(e=e.child;e!==null;)_0(e,n,l),e=e.sibling}function _0(e,n,l){switch(e.tag){case 26:ea(e,n,l),e.flags&ho&&e.memoizedState!==null&&yS(l,wn,e.memoizedState,e.memoizedProps);break;case 5:ea(e,n,l);break;case 3:case 4:var o=wn;wn=fu(e.stateNode.containerInfo),ea(e,n,l),wn=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=ho,ho=16777216,ea(e,n,l),ho=o):ea(e,n,l));break;default:ea(e,n,l)}}function A0(e){var n=e.alternate;if(n!==null&&(e=n.child,e!==null)){n.child=null;do n=e.sibling,e.sibling=null,e=n;while(e!==null)}}function po(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var o=n[l];St=o,C0(o,e)}A0(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)N0(e),e=e.sibling}function N0(e){switch(e.tag){case 0:case 11:case 15:po(e),e.flags&2048&&zl(9,e,e.return);break;case 3:po(e);break;case 12:po(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,Wr(e)):po(e);break;default:po(e)}}function Wr(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var o=n[l];St=o,C0(o,e)}A0(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:zl(8,n,n.return),Wr(n);break;case 22:l=n.stateNode,l._visibility&2&&(l._visibility&=-3,Wr(n));break;default:Wr(n)}e=e.sibling}}function C0(e,n){for(;St!==null;){var l=St;switch(l.tag){case 0:case 11:case 15:zl(8,l,n);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var o=l.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:Fa(l.memoizedState.cache)}if(o=l.child,o!==null)o.return=l,St=o;else e:for(l=e;St!==null;){o=St;var c=o.sibling,d=o.return;if(y0(o),o===l){St=null;break e}if(c!==null){c.return=d,St=c;break e}St=d}}}var Db={getCacheForType:function(e){var n=_t(ut),l=n.data.get(e);return l===void 0&&(l=e(),n.data.set(e,l)),l},cacheSignal:function(){return _t(ut).controller.signal}},Rb=typeof WeakMap=="function"?WeakMap:Map,Be=0,$e=null,Te=null,ze=0,qe=0,en=null,Ol=!1,ta=!1,Gs=!1,al=0,nt=0,Dl=0,Si=0,Xs=0,tn=0,na=0,mo=null,Xt=null,Zs=!1,Pr=0,T0=0,eu=1/0,tu=null,Rl=null,gt=0,Hl=null,la=null,ol=0,Qs=0,$s=null,M0=null,go=0,Ks=null;function nn(){return(Be&2)!==0&&ze!==0?ze&-ze:w.T!==null?ef():ar()}function z0(){if(tn===0)if((ze&536870912)===0||De){var e=gl;gl<<=1,(gl&3932160)===0&&(gl=262144),tn=e}else tn=536870912;return e=Wt.current,e!==null&&(e.flags|=32),tn}function Zt(e,n,l){(e===$e&&(qe===2||qe===9)||e.cancelPendingCommit!==null)&&(ia(e,0),jl(e,ze,tn,!1)),li(e,l),((Be&2)===0||e!==$e)&&(e===$e&&((Be&2)===0&&(Si|=l),nt===4&&jl(e,ze,tn,!1)),Hn(e))}function O0(e,n,l){if((Be&6)!==0)throw Error(r(327));var o=!l&&(n&127)===0&&(n&e.expiredLanes)===0||ni(e,n),c=o?kb(e,n):Fs(e,n,!0),d=o;do{if(c===0){ta&&!o&&jl(e,n,0,!1);break}else{if(l=e.current.alternate,d&&!Hb(l)){c=Fs(e,n,!1),d=!1;continue}if(c===2){if(d=n,e.errorRecoveryDisabledLanes&d)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){n=y;e:{var S=e;c=mo;var O=S.current.memoizedState.isDehydrated;if(O&&(ia(S,y).flags|=256),y=Fs(S,y,!1),y!==2){if(Gs&&!O){S.errorRecoveryDisabledLanes|=d,Si|=d,c=4;break e}d=Xt,Xt=c,d!==null&&(Xt===null?Xt=d:Xt.push.apply(Xt,d))}c=y}if(d=!1,c!==2)continue}}if(c===1){ia(e,0),jl(e,n,0,!0);break}e:{switch(o=e,d=c,d){case 0:case 1:throw Error(r(345));case 4:if((n&4194048)!==n)break;case 6:jl(o,n,tn,!Ol);break e;case 2:Xt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((n&62914560)===n&&(c=Pr+300-Fe(),10<c)){if(jl(o,n,tn,!Ol),Oi(o,0,!0)!==0)break e;ol=n,o.timeoutHandle=um(D0.bind(null,o,l,Xt,tu,Zs,n,tn,Si,na,Ol,d,"Throttled",-0,0),c);break e}D0(o,l,Xt,tu,Zs,n,tn,Si,na,Ol,d,null,-0,0)}}break}while(!0);Hn(e)}function D0(e,n,l,o,c,d,y,S,O,Q,te,le,K,J){if(e.timeoutHandle=-1,le=n.subtreeFlags,le&8192||(le&16785408)===16785408){le={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Zn},_0(n,d,le);var he=(d&62914560)===d?Pr-Fe():(d&4194048)===d?T0-Fe():0;if(he=vS(le,he),he!==null){ol=d,e.cancelPendingCommit=he(Y0.bind(null,e,n,d,l,o,c,y,S,O,te,le,null,K,J)),jl(e,d,y,!Q);return}}Y0(e,n,d,l,o,c,y,S,O)}function Hb(e){for(var n=e;;){var l=n.tag;if((l===0||l===11||l===15)&&n.flags&16384&&(l=n.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var o=0;o<l.length;o++){var c=l[o],d=c.getSnapshot;c=c.value;try{if(!Ft(d(),c))return!1}catch{return!1}}if(l=n.child,n.subtreeFlags&16384&&l!==null)l.return=n,n=l;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 jl(e,n,l,o){n&=~Xs,n&=~Si,e.suspendedLanes|=n,e.pingedLanes&=~n,o&&(e.warmLanes|=n),o=e.expirationTimes;for(var c=n;0<c;){var d=31-Je(c),y=1<<d;o[d]=-1,c&=~y}l!==0&&nr(e,l,n)}function nu(){return(Be&6)===0?(yo(0),!1):!0}function Is(){if(Te!==null){if(qe===0)var e=Te.return;else e=Te,In=di=null,fs(e),Ki=null,Wa=0,e=Te;for(;e!==null;)c0(e.alternate,e),e=e.return;Te=null}}function ia(e,n){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,eS(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),ol=0,Is(),$e=e,Te=l=$n(e.current,null),ze=n,qe=0,en=null,Ol=!1,ta=ni(e,n),Gs=!1,na=tn=Xs=Si=Dl=nt=0,Xt=mo=null,Zs=!1,(n&8)!==0&&(n|=n&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=n;0<o;){var c=31-Je(o),d=1<<c;n|=e[c],o&=~d}return al=n,Er(),l}function R0(e,n){Ee=null,w.H=oo,n===$i||n===Or?(n=Ih(),qe=3):n===Pc?(n=Ih(),qe=4):qe=n===Cs?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,en=n,Te===null&&(nt=1,Zr(e,fn(n,e.current)))}function H0(){var e=Wt.current;return e===null?!0:(ze&4194048)===ze?mn===null:(ze&62914560)===ze||(ze&536870912)!==0?e===mn:!1}function j0(){var e=w.H;return w.H=oo,e===null?oo:e}function k0(){var e=w.A;return w.A=Db,e}function lu(){nt=4,Ol||(ze&4194048)!==ze&&Wt.current!==null||(ta=!0),(Dl&134217727)===0&&(Si&134217727)===0||$e===null||jl($e,ze,tn,!1)}function Fs(e,n,l){var o=Be;Be|=2;var c=j0(),d=k0();($e!==e||ze!==n)&&(tu=null,ia(e,n)),n=!1;var y=nt;e:do try{if(qe!==0&&Te!==null){var S=Te,O=en;switch(qe){case 8:Is(),y=6;break e;case 3:case 2:case 9:case 6:Wt.current===null&&(n=!0);var Q=qe;if(qe=0,en=null,aa(e,S,O,Q),l&&ta){y=0;break e}break;default:Q=qe,qe=0,en=null,aa(e,S,O,Q)}}jb(),y=nt;break}catch(te){R0(e,te)}while(!0);return n&&e.shellSuspendCounter++,In=di=null,Be=o,w.H=c,w.A=d,Te===null&&($e=null,ze=0,Er()),y}function jb(){for(;Te!==null;)U0(Te)}function kb(e,n){var l=Be;Be|=2;var o=j0(),c=k0();$e!==e||ze!==n?(tu=null,eu=Fe()+500,ia(e,n)):ta=ni(e,n);e:do try{if(qe!==0&&Te!==null){n=Te;var d=en;t:switch(qe){case 1:qe=0,en=null,aa(e,n,d,1);break;case 2:case 9:if($h(d)){qe=0,en=null,L0(n);break}n=function(){qe!==2&&qe!==9||$e!==e||(qe=7),Hn(e)},d.then(n,n);break e;case 3:qe=7;break e;case 4:qe=5;break e;case 7:$h(d)?(qe=0,en=null,L0(n)):(qe=0,en=null,aa(e,n,d,7));break;case 5:var y=null;switch(Te.tag){case 26:y=Te.memoizedState;case 5:case 27:var S=Te;if(y?Em(y):S.stateNode.complete){qe=0,en=null;var O=S.sibling;if(O!==null)Te=O;else{var Q=S.return;Q!==null?(Te=Q,iu(Q)):Te=null}break t}}qe=0,en=null,aa(e,n,d,5);break;case 6:qe=0,en=null,aa(e,n,d,6);break;case 8:Is(),nt=6;break e;default:throw Error(r(462))}}Ub();break}catch(te){R0(e,te)}while(!0);return In=di=null,w.H=o,w.A=c,Be=l,Te!==null?0:($e=null,ze=0,Er(),nt)}function Ub(){for(;Te!==null&&!Tn();)U0(Te)}function U0(e){var n=r0(e.alternate,e,al);e.memoizedProps=e.pendingProps,n===null?iu(e):Te=n}function L0(e){var n=e,l=n.alternate;switch(n.tag){case 15:case 0:n=t0(l,n,n.pendingProps,n.type,void 0,ze);break;case 11:n=t0(l,n,n.pendingProps,n.type.render,n.ref,ze);break;case 5:fs(n);default:c0(l,n),n=Te=kh(n,al),n=r0(l,n,al)}e.memoizedProps=e.pendingProps,n===null?iu(e):Te=n}function aa(e,n,l,o){In=di=null,fs(n),Ki=null,Wa=0;var c=n.return;try{if(Ab(e,c,n,l,ze)){nt=1,Zr(e,fn(l,e.current)),Te=null;return}}catch(d){if(c!==null)throw Te=c,d;nt=1,Zr(e,fn(l,e.current)),Te=null;return}n.flags&32768?(De||o===1?e=!0:ta||(ze&536870912)!==0?e=!1:(Ol=e=!0,(o===2||o===9||o===3||o===6)&&(o=Wt.current,o!==null&&o.tag===13&&(o.flags|=16384))),B0(n,e)):iu(n)}function iu(e){var n=e;do{if((n.flags&32768)!==0){B0(n,Ol);return}e=n.return;var l=Tb(n.alternate,n,al);if(l!==null){Te=l;return}if(n=n.sibling,n!==null){Te=n;return}Te=n=e}while(n!==null);nt===0&&(nt=5)}function B0(e,n){do{var l=Mb(e.alternate,e);if(l!==null){l.flags&=32767,Te=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!n&&(e=e.sibling,e!==null)){Te=e;return}Te=e=l}while(e!==null);nt=6,Te=null}function Y0(e,n,l,o,c,d,y,S,O){e.cancelPendingCommit=null;do au();while(gt!==0);if((Be&6)!==0)throw Error(r(327));if(n!==null){if(n===e.current)throw Error(r(177));if(d=n.lanes|n.childLanes,d|=Lc,hc(e,l,d,y,S,O),e===$e&&(Te=$e=null,ze=0),la=n,Hl=e,ol=l,Qs=d,$s=c,M0=o,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Vb(zt,function(){return Z0(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||o){o=w.T,w.T=null,c=R.p,R.p=2,y=Be,Be|=4;try{zb(e,n,l)}finally{Be=y,R.p=c,w.T=o}}gt=1,V0(),q0(),G0()}}function V0(){if(gt===1){gt=0;var e=Hl,n=la,l=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||l){l=w.T,w.T=null;var o=R.p;R.p=2;var c=Be;Be|=4;try{S0(n,e);var d=cf,y=Ch(e.containerInfo),S=d.focusedElem,O=d.selectionRange;if(y!==S&&S&&S.ownerDocument&&Nh(S.ownerDocument.documentElement,S)){if(O!==null&&Rc(S)){var Q=O.start,te=O.end;if(te===void 0&&(te=Q),"selectionStart"in S)S.selectionStart=Q,S.selectionEnd=Math.min(te,S.value.length);else{var le=S.ownerDocument||document,K=le&&le.defaultView||window;if(K.getSelection){var J=K.getSelection(),he=S.textContent.length,Se=Math.min(O.start,he),Qe=O.end===void 0?Se:Math.min(O.end,he);!J.extend&&Se>Qe&&(y=Qe,Qe=Se,Se=y);var V=Ah(S,Se),k=Ah(S,Qe);if(V&&k&&(J.rangeCount!==1||J.anchorNode!==V.node||J.anchorOffset!==V.offset||J.focusNode!==k.node||J.focusOffset!==k.offset)){var Z=le.createRange();Z.setStart(V.node,V.offset),J.removeAllRanges(),Se>Qe?(J.addRange(Z),J.extend(k.node,k.offset)):(Z.setEnd(k.node,k.offset),J.addRange(Z))}}}}for(le=[],J=S;J=J.parentNode;)J.nodeType===1&&le.push({element:J,left:J.scrollLeft,top:J.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<le.length;S++){var ne=le[S];ne.element.scrollLeft=ne.left,ne.element.scrollTop=ne.top}}yu=!!uf,cf=uf=null}finally{Be=c,R.p=o,w.T=l}}e.current=n,gt=2}}function q0(){if(gt===2){gt=0;var e=Hl,n=la,l=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||l){l=w.T,w.T=null;var o=R.p;R.p=2;var c=Be;Be|=4;try{g0(e,n.alternate,n)}finally{Be=c,R.p=o,w.T=l}}gt=3}}function G0(){if(gt===4||gt===3){gt=0,bn();var e=Hl,n=la,l=ol,o=M0;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?gt=5:(gt=0,la=Hl=null,X0(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(Rl=null),ja(l),n=n.stateNode,it&&typeof it.onCommitFiberRoot=="function")try{it.onCommitFiberRoot(It,n,void 0,(n.current.flags&128)===128)}catch{}if(o!==null){n=w.T,c=R.p,R.p=2,w.T=null;try{for(var d=e.onRecoverableError,y=0;y<o.length;y++){var S=o[y];d(S.value,{componentStack:S.stack})}}finally{w.T=n,R.p=c}}(ol&3)!==0&&au(),Hn(e),c=e.pendingLanes,(l&261930)!==0&&(c&42)!==0?e===Ks?go++:(go=0,Ks=e):go=0,yo(0)}}function X0(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,Fa(n)))}function au(){return V0(),q0(),G0(),Z0()}function Z0(){if(gt!==5)return!1;var e=Hl,n=Qs;Qs=0;var l=ja(ol),o=w.T,c=R.p;try{R.p=32>l?32:l,w.T=null,l=$s,$s=null;var d=Hl,y=ol;if(gt=0,la=Hl=null,ol=0,(Be&6)!==0)throw Error(r(331));var S=Be;if(Be|=4,N0(d.current),E0(d,d.current,y,l),Be=S,yo(0,!1),it&&typeof it.onPostCommitFiberRoot=="function")try{it.onPostCommitFiberRoot(It,d)}catch{}return!0}finally{R.p=c,w.T=o,X0(e,n)}}function Q0(e,n,l){n=fn(l,n),n=Ns(e.stateNode,n,2),e=Cl(e,n,2),e!==null&&(li(e,2),Hn(e))}function Ge(e,n,l){if(e.tag===3)Q0(e,e,l);else for(;n!==null;){if(n.tag===3){Q0(n,e,l);break}else if(n.tag===1){var o=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Rl===null||!Rl.has(o))){e=fn(l,e),l=$p(2),o=Cl(n,l,2),o!==null&&(Kp(l,o,n,e),li(o,2),Hn(o));break}}n=n.return}}function Js(e,n,l){var o=e.pingCache;if(o===null){o=e.pingCache=new Rb;var c=new Set;o.set(n,c)}else c=o.get(n),c===void 0&&(c=new Set,o.set(n,c));c.has(l)||(Gs=!0,c.add(l),e=Lb.bind(null,e,n,l),n.then(e,e))}function Lb(e,n,l){var o=e.pingCache;o!==null&&o.delete(n),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,$e===e&&(ze&l)===l&&(nt===4||nt===3&&(ze&62914560)===ze&&300>Fe()-Pr?(Be&2)===0&&ia(e,0):Xs|=l,na===ze&&(na=0)),Hn(e)}function $0(e,n){n===0&&(n=tr()),e=ci(e,n),e!==null&&(li(e,n),Hn(e))}function Bb(e){var n=e.memoizedState,l=0;n!==null&&(l=n.retryLane),$0(e,l)}function Yb(e,n){var l=0;switch(e.tag){case 31:case 13:var o=e.stateNode,c=e.memoizedState;c!==null&&(l=c.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(r(314))}o!==null&&o.delete(n),$0(e,l)}function Vb(e,n){return Bt(e,n)}var ou=null,oa=null,Ws=!1,ru=!1,Ps=!1,kl=0;function Hn(e){e!==oa&&e.next===null&&(oa===null?ou=oa=e:oa=oa.next=e),ru=!0,Ws||(Ws=!0,Gb())}function yo(e,n){if(!Ps&&ru){Ps=!0;do for(var l=!1,o=ou;o!==null;){if(e!==0){var c=o.pendingLanes;if(c===0)var d=0;else{var y=o.suspendedLanes,S=o.pingedLanes;d=(1<<31-Je(42|e)+1)-1,d&=c&~(y&~S),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(l=!0,J0(o,d))}else d=ze,d=Oi(o,o===$e?d:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(d&3)===0||ni(o,d)||(l=!0,J0(o,d));o=o.next}while(l);Ps=!1}}function qb(){K0()}function K0(){ru=Ws=!1;var e=0;kl!==0&&Pb()&&(e=kl);for(var n=Fe(),l=null,o=ou;o!==null;){var c=o.next,d=I0(o,n);d===0?(o.next=null,l===null?ou=c:l.next=c,c===null&&(oa=l)):(l=o,(e!==0||(d&3)!==0)&&(ru=!0)),o=c}gt!==0&&gt!==5||yo(e),kl!==0&&(kl=0)}function I0(e,n){for(var l=e.suspendedLanes,o=e.pingedLanes,c=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var y=31-Je(d),S=1<<y,O=c[y];O===-1?((S&l)===0||(S&o)!==0)&&(c[y]=dc(S,n)):O<=n&&(e.expiredLanes|=S),d&=~S}if(n=$e,l=ze,l=Oi(e,e===n?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,l===0||e===n&&(qe===2||qe===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&an(o),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||ni(e,l)){if(n=l&-l,n===e.callbackPriority)return n;switch(o!==null&&an(o),ja(l)){case 2:case 8:l=Ht;break;case 32:l=zt;break;case 268435456:l=ml;break;default:l=zt}return o=F0.bind(null,e),l=Bt(l,o),e.callbackPriority=n,e.callbackNode=l,n}return o!==null&&o!==null&&an(o),e.callbackPriority=2,e.callbackNode=null,2}function F0(e,n){if(gt!==0&&gt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(au()&&e.callbackNode!==l)return null;var o=ze;return o=Oi(e,e===$e?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(O0(e,o,n),I0(e,Fe()),e.callbackNode!=null&&e.callbackNode===l?F0.bind(null,e):null)}function J0(e,n){if(au())return null;O0(e,n,!0)}function Gb(){tS(function(){(Be&6)!==0?Bt(Mt,qb):K0()})}function ef(){if(kl===0){var e=Zi;e===0&&(e=Mn,Mn<<=1,(Mn&261888)===0&&(Mn=256)),kl=e}return kl}function W0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:mr(""+e)}function P0(e,n){var l=n.ownerDocument.createElement("input");return l.name=n.name,l.value=n.value,e.id&&l.setAttribute("form",e.id),n.parentNode.insertBefore(l,n),e=new FormData(e),l.parentNode.removeChild(l),e}function Xb(e,n,l,o,c){if(n==="submit"&&l&&l.stateNode===c){var d=W0((c[wt]||null).action),y=o.submitter;y&&(n=(n=y[wt]||null)?W0(n.formAction):y.getAttribute("formAction"),n!==null&&(d=n,y=null));var S=new xr("action","action",null,o,c);e.push({event:S,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(kl!==0){var O=y?P0(c,y):new FormData(c);bs(l,{pending:!0,data:O,method:c.method,action:d},null,O)}}else typeof d=="function"&&(S.preventDefault(),O=y?P0(c,y):new FormData(c),bs(l,{pending:!0,data:O,method:c.method,action:d},d,O))},currentTarget:c}]})}}for(var tf=0;tf<Uc.length;tf++){var nf=Uc[tf],Zb=nf.toLowerCase(),Qb=nf[0].toUpperCase()+nf.slice(1);Sn(Zb,"on"+Qb)}Sn(zh,"onAnimationEnd"),Sn(Oh,"onAnimationIteration"),Sn(Dh,"onAnimationStart"),Sn("dblclick","onDoubleClick"),Sn("focusin","onFocus"),Sn("focusout","onBlur"),Sn(ub,"onTransitionRun"),Sn(cb,"onTransitionStart"),Sn(sb,"onTransitionCancel"),Sn(Rh,"onTransitionEnd"),Gn("onMouseEnter",["mouseout","mouseover"]),Gn("onMouseLeave",["mouseout","mouseover"]),Gn("onPointerEnter",["pointerout","pointerover"]),Gn("onPointerLeave",["pointerout","pointerover"]),qn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),qn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),qn("onBeforeInput",["compositionend","keypress","textInput","paste"]),qn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),qn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),qn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var vo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),$b=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(vo));function em(e,n){n=(n&4)!==0;for(var l=0;l<e.length;l++){var o=e[l],c=o.event;o=o.listeners;e:{var d=void 0;if(n)for(var y=o.length-1;0<=y;y--){var S=o[y],O=S.instance,Q=S.currentTarget;if(S=S.listener,O!==d&&c.isPropagationStopped())break e;d=S,c.currentTarget=Q;try{d(c)}catch(te){wr(te)}c.currentTarget=null,d=O}else for(y=0;y<o.length;y++){if(S=o[y],O=S.instance,Q=S.currentTarget,S=S.listener,O!==d&&c.isPropagationStopped())break e;d=S,c.currentTarget=Q;try{d(c)}catch(te){wr(te)}c.currentTarget=null,d=O}}}}function Me(e,n){var l=n[ka];l===void 0&&(l=n[ka]=new Set);var o=e+"__bubble";l.has(o)||(tm(n,e,2,!1),l.add(o))}function lf(e,n,l){var o=0;n&&(o|=4),tm(l,e,o,n)}var uu="_reactListening"+Math.random().toString(36).slice(2);function af(e){if(!e[uu]){e[uu]=!0,ur.forEach(function(l){l!=="selectionchange"&&($b.has(l)||lf(l,!1,e),lf(l,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[uu]||(n[uu]=!0,lf("selectionchange",!1,n))}}function tm(e,n,l,o){switch(zm(n)){case 2:var c=SS;break;case 8:c=wS;break;default:c=bf}l=c.bind(null,n,l,e),c=void 0,!_c||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(c=!0),o?c!==void 0?e.addEventListener(n,l,{capture:!0,passive:c}):e.addEventListener(n,l,!0):c!==void 0?e.addEventListener(n,l,{passive:c}):e.addEventListener(n,l,!1)}function of(e,n,l,o,c){var d=o;if((n&1)===0&&(n&2)===0&&o!==null)e:for(;;){if(o===null)return;var y=o.tag;if(y===3||y===4){var S=o.stateNode.containerInfo;if(S===c)break;if(y===4)for(y=o.return;y!==null;){var O=y.tag;if((O===3||O===4)&&y.stateNode.containerInfo===c)return;y=y.return}for(;S!==null;){if(y=vl(S),y===null)return;if(O=y.tag,O===5||O===6||O===26||O===27){o=d=y;continue e}S=S.parentNode}}o=o.return}oh(function(){var Q=d,te=wc(l),le=[];e:{var K=Hh.get(e);if(K!==void 0){var J=xr,he=e;switch(e){case"keypress":if(yr(l)===0)break e;case"keydown":case"keyup":J=Y1;break;case"focusin":he="focus",J=Tc;break;case"focusout":he="blur",J=Tc;break;case"beforeblur":case"afterblur":J=Tc;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":J=ch;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":J=T1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":J=G1;break;case zh:case Oh:case Dh:J=O1;break;case Rh:J=Z1;break;case"scroll":case"scrollend":J=N1;break;case"wheel":J=$1;break;case"copy":case"cut":case"paste":J=R1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":J=fh;break;case"toggle":case"beforetoggle":J=I1}var Se=(n&4)!==0,Qe=!Se&&(e==="scroll"||e==="scrollend"),V=Se?K!==null?K+"Capture":null:K;Se=[];for(var k=Q,Z;k!==null;){var ne=k;if(Z=ne.stateNode,ne=ne.tag,ne!==5&&ne!==26&&ne!==27||Z===null||V===null||(ne=Ba(k,V),ne!=null&&Se.push(xo(k,ne,Z))),Qe)break;k=k.return}0<Se.length&&(K=new J(K,he,null,l,te),le.push({event:K,listeners:Se}))}}if((n&7)===0){e:{if(K=e==="mouseover"||e==="pointerover",J=e==="mouseout"||e==="pointerout",K&&l!==Sc&&(he=l.relatedTarget||l.fromElement)&&(vl(he)||he[yl]))break e;if((J||K)&&(K=te.window===te?te:(K=te.ownerDocument)?K.defaultView||K.parentWindow:window,J?(he=l.relatedTarget||l.toElement,J=Q,he=he?vl(he):null,he!==null&&(Qe=f(he),Se=he.tag,he!==Qe||Se!==5&&Se!==27&&Se!==6)&&(he=null)):(J=null,he=Q),J!==he)){if(Se=ch,ne="onMouseLeave",V="onMouseEnter",k="mouse",(e==="pointerout"||e==="pointerover")&&(Se=fh,ne="onPointerLeave",V="onPointerEnter",k="pointer"),Qe=J==null?K:ai(J),Z=he==null?K:ai(he),K=new Se(ne,k+"leave",J,l,te),K.target=Qe,K.relatedTarget=Z,ne=null,vl(te)===Q&&(Se=new Se(V,k+"enter",he,l,te),Se.target=Z,Se.relatedTarget=Qe,ne=Se),Qe=ne,J&&he)t:{for(Se=Kb,V=J,k=he,Z=0,ne=V;ne;ne=Se(ne))Z++;ne=0;for(var xe=k;xe;xe=Se(xe))ne++;for(;0<Z-ne;)V=Se(V),Z--;for(;0<ne-Z;)k=Se(k),ne--;for(;Z--;){if(V===k||k!==null&&V===k.alternate){Se=V;break t}V=Se(V),k=Se(k)}Se=null}else Se=null;J!==null&&nm(le,K,J,Se,!1),he!==null&&Qe!==null&&nm(le,Qe,he,Se,!0)}}e:{if(K=Q?ai(Q):window,J=K.nodeName&&K.nodeName.toLowerCase(),J==="select"||J==="input"&&K.type==="file")var Ue=xh;else if(yh(K))if(bh)Ue=ab;else{Ue=lb;var ge=nb}else J=K.nodeName,!J||J.toLowerCase()!=="input"||K.type!=="checkbox"&&K.type!=="radio"?Q&&bc(Q.elementType)&&(Ue=xh):Ue=ib;if(Ue&&(Ue=Ue(e,Q))){vh(le,Ue,l,te);break e}ge&&ge(e,K,Q),e==="focusout"&&Q&&K.type==="number"&&Q.memoizedProps.value!=null&&xc(K,"number",K.value)}switch(ge=Q?ai(Q):window,e){case"focusin":(yh(ge)||ge.contentEditable==="true")&&(Ui=ge,Hc=Q,$a=null);break;case"focusout":$a=Hc=Ui=null;break;case"mousedown":jc=!0;break;case"contextmenu":case"mouseup":case"dragend":jc=!1,Th(le,l,te);break;case"selectionchange":if(rb)break;case"keydown":case"keyup":Th(le,l,te)}var _e;if(zc)e:{switch(e){case"compositionstart":var Oe="onCompositionStart";break e;case"compositionend":Oe="onCompositionEnd";break e;case"compositionupdate":Oe="onCompositionUpdate";break e}Oe=void 0}else ki?mh(e,l)&&(Oe="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(Oe="onCompositionStart");Oe&&(dh&&l.locale!=="ko"&&(ki||Oe!=="onCompositionStart"?Oe==="onCompositionEnd"&&ki&&(_e=rh()):(bl=te,Ac="value"in bl?bl.value:bl.textContent,ki=!0)),ge=cu(Q,Oe),0<ge.length&&(Oe=new sh(Oe,e,null,l,te),le.push({event:Oe,listeners:ge}),_e?Oe.data=_e:(_e=gh(l),_e!==null&&(Oe.data=_e)))),(_e=J1?W1(e,l):P1(e,l))&&(Oe=cu(Q,"onBeforeInput"),0<Oe.length&&(ge=new sh("onBeforeInput","beforeinput",null,l,te),le.push({event:ge,listeners:Oe}),ge.data=_e)),Xb(le,e,Q,l,te)}em(le,n)})}function xo(e,n,l){return{instance:e,listener:n,currentTarget:l}}function cu(e,n){for(var l=n+"Capture",o=[];e!==null;){var c=e,d=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||d===null||(c=Ba(e,l),c!=null&&o.unshift(xo(e,c,d)),c=Ba(e,n),c!=null&&o.push(xo(e,c,d))),e.tag===3)return o;e=e.return}return[]}function Kb(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function nm(e,n,l,o,c){for(var d=n._reactName,y=[];l!==null&&l!==o;){var S=l,O=S.alternate,Q=S.stateNode;if(S=S.tag,O!==null&&O===o)break;S!==5&&S!==26&&S!==27||Q===null||(O=Q,c?(Q=Ba(l,d),Q!=null&&y.unshift(xo(l,Q,O))):c||(Q=Ba(l,d),Q!=null&&y.push(xo(l,Q,O)))),l=l.return}y.length!==0&&e.push({event:n,listeners:y})}var Ib=/\r\n?/g,Fb=/\u0000|\uFFFD/g;function lm(e){return(typeof e=="string"?e:""+e).replace(Ib,`
9
- `).replace(Fb,"")}function im(e,n){return n=lm(n),lm(e)===n}function Ze(e,n,l,o,c,d){switch(l){case"children":typeof o=="string"?n==="body"||n==="textarea"&&o===""||Ri(e,o):(typeof o=="number"||typeof o=="bigint")&&n!=="body"&&Ri(e,""+o);break;case"className":hr(e,"class",o);break;case"tabIndex":hr(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":hr(e,l,o);break;case"style":ih(e,o,d);break;case"data":if(n!=="object"){hr(e,"data",o);break}case"src":case"href":if(o===""&&(n!=="a"||l!=="href")){e.removeAttribute(l);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(l);break}o=mr(""+o),e.setAttribute(l,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof d=="function"&&(l==="formAction"?(n!=="input"&&Ze(e,n,"name",c.name,c,null),Ze(e,n,"formEncType",c.formEncType,c,null),Ze(e,n,"formMethod",c.formMethod,c,null),Ze(e,n,"formTarget",c.formTarget,c,null)):(Ze(e,n,"encType",c.encType,c,null),Ze(e,n,"method",c.method,c,null),Ze(e,n,"target",c.target,c,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(l);break}o=mr(""+o),e.setAttribute(l,o);break;case"onClick":o!=null&&(e.onclick=Zn);break;case"onScroll":o!=null&&Me("scroll",e);break;case"onScrollEnd":o!=null&&Me("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(r(61));if(l=o.__html,l!=null){if(c.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}l=mr(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(l,""+o):e.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":o===!0?e.setAttribute(l,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(l,o):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(l,o):e.removeAttribute(l);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(l):e.setAttribute(l,o);break;case"popover":Me("beforetoggle",e),Me("toggle",e),dr(e,"popover",o);break;case"xlinkActuate":Xn(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Xn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Xn(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Xn(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Xn(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Xn(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Xn(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Xn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Xn(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":dr(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=_1.get(l)||l,dr(e,l,o))}}function rf(e,n,l,o,c,d){switch(l){case"style":ih(e,o,d);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(r(61));if(l=o.__html,l!=null){if(c.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"children":typeof o=="string"?Ri(e,o):(typeof o=="number"||typeof o=="bigint")&&Ri(e,""+o);break;case"onScroll":o!=null&&Me("scroll",e);break;case"onScrollEnd":o!=null&&Me("scrollend",e);break;case"onClick":o!=null&&(e.onclick=Zn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!cr.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(c=l.endsWith("Capture"),n=l.slice(2,c?l.length-7:void 0),d=e[wt]||null,d=d!=null?d[l]:null,typeof d=="function"&&e.removeEventListener(n,d,c),typeof o=="function")){typeof d!="function"&&d!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(n,o,c);break e}l in e?e[l]=o:o===!0?e.setAttribute(l,""):dr(e,l,o)}}}function Nt(e,n,l){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Me("error",e),Me("load",e);var o=!1,c=!1,d;for(d in l)if(l.hasOwnProperty(d)){var y=l[d];if(y!=null)switch(d){case"src":o=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:Ze(e,n,d,y,l,null)}}c&&Ze(e,n,"srcSet",l.srcSet,l,null),o&&Ze(e,n,"src",l.src,l,null);return;case"input":Me("invalid",e);var S=d=y=c=null,O=null,Q=null;for(o in l)if(l.hasOwnProperty(o)){var te=l[o];if(te!=null)switch(o){case"name":c=te;break;case"type":y=te;break;case"checked":O=te;break;case"defaultChecked":Q=te;break;case"value":d=te;break;case"defaultValue":S=te;break;case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(r(137,n));break;default:Ze(e,n,o,te,l,null)}}eh(e,d,S,O,Q,y,c,!1);return;case"select":Me("invalid",e),o=y=d=null;for(c in l)if(l.hasOwnProperty(c)&&(S=l[c],S!=null))switch(c){case"value":d=S;break;case"defaultValue":y=S;break;case"multiple":o=S;default:Ze(e,n,c,S,l,null)}n=d,l=y,e.multiple=!!o,n!=null?Di(e,!!o,n,!1):l!=null&&Di(e,!!o,l,!0);return;case"textarea":Me("invalid",e),d=c=o=null;for(y in l)if(l.hasOwnProperty(y)&&(S=l[y],S!=null))switch(y){case"value":o=S;break;case"defaultValue":c=S;break;case"children":d=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(r(91));break;default:Ze(e,n,y,S,l,null)}nh(e,o,c,d);return;case"option":for(O in l)l.hasOwnProperty(O)&&(o=l[O],o!=null)&&(O==="selected"?e.selected=o&&typeof o!="function"&&typeof o!="symbol":Ze(e,n,O,o,l,null));return;case"dialog":Me("beforetoggle",e),Me("toggle",e),Me("cancel",e),Me("close",e);break;case"iframe":case"object":Me("load",e);break;case"video":case"audio":for(o=0;o<vo.length;o++)Me(vo[o],e);break;case"image":Me("error",e),Me("load",e);break;case"details":Me("toggle",e);break;case"embed":case"source":case"link":Me("error",e),Me("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Q in l)if(l.hasOwnProperty(Q)&&(o=l[Q],o!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:Ze(e,n,Q,o,l,null)}return;default:if(bc(n)){for(te in l)l.hasOwnProperty(te)&&(o=l[te],o!==void 0&&rf(e,n,te,o,l,void 0));return}}for(S in l)l.hasOwnProperty(S)&&(o=l[S],o!=null&&Ze(e,n,S,o,l,null))}function Jb(e,n,l,o){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,d=null,y=null,S=null,O=null,Q=null,te=null;for(J in l){var le=l[J];if(l.hasOwnProperty(J)&&le!=null)switch(J){case"checked":break;case"value":break;case"defaultValue":O=le;default:o.hasOwnProperty(J)||Ze(e,n,J,null,o,le)}}for(var K in o){var J=o[K];if(le=l[K],o.hasOwnProperty(K)&&(J!=null||le!=null))switch(K){case"type":d=J;break;case"name":c=J;break;case"checked":Q=J;break;case"defaultChecked":te=J;break;case"value":y=J;break;case"defaultValue":S=J;break;case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(r(137,n));break;default:J!==le&&Ze(e,n,K,J,o,le)}}vc(e,y,S,O,Q,te,d,c);return;case"select":J=y=S=K=null;for(d in l)if(O=l[d],l.hasOwnProperty(d)&&O!=null)switch(d){case"value":break;case"multiple":J=O;default:o.hasOwnProperty(d)||Ze(e,n,d,null,o,O)}for(c in o)if(d=o[c],O=l[c],o.hasOwnProperty(c)&&(d!=null||O!=null))switch(c){case"value":K=d;break;case"defaultValue":S=d;break;case"multiple":y=d;default:d!==O&&Ze(e,n,c,d,o,O)}n=S,l=y,o=J,K!=null?Di(e,!!l,K,!1):!!o!=!!l&&(n!=null?Di(e,!!l,n,!0):Di(e,!!l,l?[]:"",!1));return;case"textarea":J=K=null;for(S in l)if(c=l[S],l.hasOwnProperty(S)&&c!=null&&!o.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:Ze(e,n,S,null,o,c)}for(y in o)if(c=o[y],d=l[y],o.hasOwnProperty(y)&&(c!=null||d!=null))switch(y){case"value":K=c;break;case"defaultValue":J=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(r(91));break;default:c!==d&&Ze(e,n,y,c,o,d)}th(e,K,J);return;case"option":for(var he in l)K=l[he],l.hasOwnProperty(he)&&K!=null&&!o.hasOwnProperty(he)&&(he==="selected"?e.selected=!1:Ze(e,n,he,null,o,K));for(O in o)K=o[O],J=l[O],o.hasOwnProperty(O)&&K!==J&&(K!=null||J!=null)&&(O==="selected"?e.selected=K&&typeof K!="function"&&typeof K!="symbol":Ze(e,n,O,K,o,J));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Se in l)K=l[Se],l.hasOwnProperty(Se)&&K!=null&&!o.hasOwnProperty(Se)&&Ze(e,n,Se,null,o,K);for(Q in o)if(K=o[Q],J=l[Q],o.hasOwnProperty(Q)&&K!==J&&(K!=null||J!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(r(137,n));break;default:Ze(e,n,Q,K,o,J)}return;default:if(bc(n)){for(var Qe in l)K=l[Qe],l.hasOwnProperty(Qe)&&K!==void 0&&!o.hasOwnProperty(Qe)&&rf(e,n,Qe,void 0,o,K);for(te in o)K=o[te],J=l[te],!o.hasOwnProperty(te)||K===J||K===void 0&&J===void 0||rf(e,n,te,K,o,J);return}}for(var V in l)K=l[V],l.hasOwnProperty(V)&&K!=null&&!o.hasOwnProperty(V)&&Ze(e,n,V,null,o,K);for(le in o)K=o[le],J=l[le],!o.hasOwnProperty(le)||K===J||K==null&&J==null||Ze(e,n,le,K,o,J)}function am(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Wb(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,l=performance.getEntriesByType("resource"),o=0;o<l.length;o++){var c=l[o],d=c.transferSize,y=c.initiatorType,S=c.duration;if(d&&S&&am(y)){for(y=0,S=c.responseEnd,o+=1;o<l.length;o++){var O=l[o],Q=O.startTime;if(Q>S)break;var te=O.transferSize,le=O.initiatorType;te&&am(le)&&(O=O.responseEnd,y+=te*(O<S?1:(S-Q)/(O-Q)))}if(--o,n+=8*(d+y)/(c.duration/1e3),e++,10<e)break}}if(0<e)return n/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var uf=null,cf=null;function su(e){return e.nodeType===9?e:e.ownerDocument}function om(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function rm(e,n){if(e===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&n==="foreignObject"?0:e}function sf(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var ff=null;function Pb(){var e=window.event;return e&&e.type==="popstate"?e===ff?!1:(ff=e,!0):(ff=null,!1)}var um=typeof setTimeout=="function"?setTimeout:void 0,eS=typeof clearTimeout=="function"?clearTimeout:void 0,cm=typeof Promise=="function"?Promise:void 0,tS=typeof queueMicrotask=="function"?queueMicrotask:typeof cm<"u"?function(e){return cm.resolve(null).then(e).catch(nS)}:um;function nS(e){setTimeout(function(){throw e})}function Ul(e){return e==="head"}function sm(e,n){var l=n,o=0;do{var c=l.nextSibling;if(e.removeChild(l),c&&c.nodeType===8)if(l=c.data,l==="/$"||l==="/&"){if(o===0){e.removeChild(c),sa(n);return}o--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")o++;else if(l==="html")bo(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,bo(l);for(var d=l.firstChild;d;){var y=d.nextSibling,S=d.nodeName;d[ii]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&d.rel.toLowerCase()==="stylesheet"||l.removeChild(d),d=y}}else l==="body"&&bo(e.ownerDocument.body);l=c}while(l);sa(n)}function fm(e,n){var l=e;e=0;do{var o=l.nextSibling;if(l.nodeType===1?n?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(n?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),o&&o.nodeType===8)if(l=o.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=o}while(l)}function df(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var l=n;switch(n=n.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":df(l),Ua(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function lS(e,n,l,o){for(;e.nodeType===1;){var c=l;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[ii])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var d=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=gn(e.nextSibling),e===null)break}return null}function iS(e,n,l){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=gn(e.nextSibling),e===null))return null;return e}function dm(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=gn(e.nextSibling),e===null))return null;return e}function hf(e){return e.data==="$?"||e.data==="$~"}function pf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function aS(e,n){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||l.readyState!=="loading")n();else{var o=function(){n(),l.removeEventListener("DOMContentLoaded",o)};l.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function gn(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==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return e}var mf=null;function hm(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(n===0)return gn(e.nextSibling);n--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||n++}e=e.nextSibling}return null}function pm(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(n===0)return e;n--}else l!=="/$"&&l!=="/&"||n++}e=e.previousSibling}return null}function mm(e,n,l){switch(n=su(l),e){case"html":if(e=n.documentElement,!e)throw Error(r(452));return e;case"head":if(e=n.head,!e)throw Error(r(453));return e;case"body":if(e=n.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function bo(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);Ua(e)}var yn=new Map,gm=new Set;function fu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var rl=R.d;R.d={f:oS,r:rS,D:uS,C:cS,L:sS,m:fS,X:hS,S:dS,M:pS};function oS(){var e=rl.f(),n=nu();return e||n}function rS(e){var n=Vn(e);n!==null&&n.tag===5&&n.type==="form"?Rp(n):rl.r(e)}var ra=typeof document>"u"?null:document;function ym(e,n,l){var o=ra;if(o&&typeof n=="string"&&n){var c=cn(n);c='link[rel="'+e+'"][href="'+c+'"]',typeof l=="string"&&(c+='[crossorigin="'+l+'"]'),gm.has(c)||(gm.add(c),e={rel:e,crossOrigin:l,href:n},o.querySelector(c)===null&&(n=o.createElement("link"),Nt(n,"link",e),rt(n),o.head.appendChild(n)))}}function uS(e){rl.D(e),ym("dns-prefetch",e,null)}function cS(e,n){rl.C(e,n),ym("preconnect",e,n)}function sS(e,n,l){rl.L(e,n,l);var o=ra;if(o&&e&&n){var c='link[rel="preload"][as="'+cn(n)+'"]';n==="image"&&l&&l.imageSrcSet?(c+='[imagesrcset="'+cn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(c+='[imagesizes="'+cn(l.imageSizes)+'"]')):c+='[href="'+cn(e)+'"]';var d=c;switch(n){case"style":d=ua(e);break;case"script":d=ca(e)}yn.has(d)||(e=v({rel:"preload",href:n==="image"&&l&&l.imageSrcSet?void 0:e,as:n},l),yn.set(d,e),o.querySelector(c)!==null||n==="style"&&o.querySelector(So(d))||n==="script"&&o.querySelector(wo(d))||(n=o.createElement("link"),Nt(n,"link",e),rt(n),o.head.appendChild(n)))}}function fS(e,n){rl.m(e,n);var l=ra;if(l&&e){var o=n&&typeof n.as=="string"?n.as:"script",c='link[rel="modulepreload"][as="'+cn(o)+'"][href="'+cn(e)+'"]',d=c;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=ca(e)}if(!yn.has(d)&&(e=v({rel:"modulepreload",href:e},n),yn.set(d,e),l.querySelector(c)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(wo(d)))return}o=l.createElement("link"),Nt(o,"link",e),rt(o),l.head.appendChild(o)}}}function dS(e,n,l){rl.S(e,n,l);var o=ra;if(o&&e){var c=xl(o).hoistableStyles,d=ua(e);n=n||"default";var y=c.get(d);if(!y){var S={loading:0,preload:null};if(y=o.querySelector(So(d)))S.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":n},l),(l=yn.get(d))&&gf(e,l);var O=y=o.createElement("link");rt(O),Nt(O,"link",e),O._p=new Promise(function(Q,te){O.onload=Q,O.onerror=te}),O.addEventListener("load",function(){S.loading|=1}),O.addEventListener("error",function(){S.loading|=2}),S.loading|=4,du(y,n,o)}y={type:"stylesheet",instance:y,count:1,state:S},c.set(d,y)}}}function hS(e,n){rl.X(e,n);var l=ra;if(l&&e){var o=xl(l).hoistableScripts,c=ca(e),d=o.get(c);d||(d=l.querySelector(wo(c)),d||(e=v({src:e,async:!0},n),(n=yn.get(c))&&yf(e,n),d=l.createElement("script"),rt(d),Nt(d,"link",e),l.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(c,d))}}function pS(e,n){rl.M(e,n);var l=ra;if(l&&e){var o=xl(l).hoistableScripts,c=ca(e),d=o.get(c);d||(d=l.querySelector(wo(c)),d||(e=v({src:e,async:!0,type:"module"},n),(n=yn.get(c))&&yf(e,n),d=l.createElement("script"),rt(d),Nt(d,"link",e),l.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(c,d))}}function vm(e,n,l,o){var c=(c=ce.current)?fu(c):null;if(!c)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(n=ua(l.href),l=xl(c).hoistableStyles,o=l.get(n),o||(o={type:"style",instance:null,count:0,state:null},l.set(n,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=ua(l.href);var d=xl(c).hoistableStyles,y=d.get(e);if(y||(c=c.ownerDocument||c,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,y),(d=c.querySelector(So(e)))&&!d._p&&(y.instance=d,y.state.loading=5),yn.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},yn.set(e,l),d||mS(c,e,l,y.state))),n&&o===null)throw Error(r(528,""));return y}if(n&&o!==null)throw Error(r(529,""));return null;case"script":return n=l.async,l=l.src,typeof l=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=ca(l),l=xl(c).hoistableScripts,o=l.get(n),o||(o={type:"script",instance:null,count:0,state:null},l.set(n,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function ua(e){return'href="'+cn(e)+'"'}function So(e){return'link[rel="stylesheet"]['+e+"]"}function xm(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function mS(e,n,l,o){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?o.loading=1:(n=e.createElement("link"),o.preload=n,n.addEventListener("load",function(){return o.loading|=1}),n.addEventListener("error",function(){return o.loading|=2}),Nt(n,"link",l),rt(n),e.head.appendChild(n))}function ca(e){return'[src="'+cn(e)+'"]'}function wo(e){return"script[async]"+e}function bm(e,n,l){if(n.count++,n.instance===null)switch(n.type){case"style":var o=e.querySelector('style[data-href~="'+cn(l.href)+'"]');if(o)return n.instance=o,rt(o),o;var c=v({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),rt(o),Nt(o,"style",c),du(o,l.precedence,e),n.instance=o;case"stylesheet":c=ua(l.href);var d=e.querySelector(So(c));if(d)return n.state.loading|=4,n.instance=d,rt(d),d;o=xm(l),(c=yn.get(c))&&gf(o,c),d=(e.ownerDocument||e).createElement("link"),rt(d);var y=d;return y._p=new Promise(function(S,O){y.onload=S,y.onerror=O}),Nt(d,"link",o),n.state.loading|=4,du(d,l.precedence,e),n.instance=d;case"script":return d=ca(l.src),(c=e.querySelector(wo(d)))?(n.instance=c,rt(c),c):(o=l,(c=yn.get(d))&&(o=v({},l),yf(o,c)),e=e.ownerDocument||e,c=e.createElement("script"),rt(c),Nt(c,"link",o),e.head.appendChild(c),n.instance=c);case"void":return null;default:throw Error(r(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(o=n.instance,n.state.loading|=4,du(o,l.precedence,e));return n.instance}function du(e,n,l){for(var o=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=o.length?o[o.length-1]:null,d=c,y=0;y<o.length;y++){var S=o[y];if(S.dataset.precedence===n)d=S;else if(d!==c)break}d?d.parentNode.insertBefore(e,d.nextSibling):(n=l.nodeType===9?l.head:l,n.insertBefore(e,n.firstChild))}function gf(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function yf(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var hu=null;function Sm(e,n,l){if(hu===null){var o=new Map,c=hu=new Map;c.set(l,o)}else c=hu,o=c.get(l),o||(o=new Map,c.set(l,o));if(o.has(e))return o;for(o.set(e,null),l=l.getElementsByTagName(e),c=0;c<l.length;c++){var d=l[c];if(!(d[ii]||d[mt]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var y=d.getAttribute(n)||"";y=e+y;var S=o.get(y);S?S.push(d):o.set(y,[d])}}return o}function wm(e,n,l){e=e.ownerDocument||e,e.head.insertBefore(l,n==="title"?e.querySelector("head > title"):null)}function gS(e,n,l){if(l===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;return n.rel==="stylesheet"?(e=n.disabled,typeof n.precedence=="string"&&e==null):!0;case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function Em(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function yS(e,n,l,o){if(l.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var c=ua(o.href),d=n.querySelector(So(c));if(d){n=d._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=pu.bind(e),n.then(e,e)),l.state.loading|=4,l.instance=d,rt(d);return}d=n.ownerDocument||n,o=xm(o),(c=yn.get(c))&&gf(o,c),d=d.createElement("link"),rt(d);var y=d;y._p=new Promise(function(S,O){y.onload=S,y.onerror=O}),Nt(d,"link",o),l.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,n),(n=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=pu.bind(e),n.addEventListener("load",l),n.addEventListener("error",l))}}var vf=0;function vS(e,n){return e.stylesheets&&e.count===0&&gu(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var o=setTimeout(function(){if(e.stylesheets&&gu(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+n);0<e.imgBytes&&vf===0&&(vf=62500*Wb());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&gu(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>vf?50:800)+n);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(c)}}:null}function pu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)gu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var mu=null;function gu(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,mu=new Map,n.forEach(xS,e),mu=null,pu.call(e))}function xS(e,n){if(!(n.state.loading&4)){var l=mu.get(e);if(l)var o=l.get(null);else{l=new Map,mu.set(e,l);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<c.length;d++){var y=c[d];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(l.set(y.dataset.precedence,y),o=y)}o&&l.set(null,o)}c=n.instance,y=c.getAttribute("data-precedence"),d=l.get(y)||o,d===o&&l.set(null,c),l.set(y,c),this.count++,o=pu.bind(this),c.addEventListener("load",o),c.addEventListener("error",o),d?d.parentNode.insertBefore(c,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),n.state.loading|=4}}var Eo={$$typeof:q,Provider:null,Consumer:null,_currentValue:X,_currentValue2:X,_threadCount:0};function bS(e,n,l,o,c,d,y,S,O){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ra(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ra(0),this.hiddenUpdates=Ra(null),this.identifierPrefix=o,this.onUncaughtError=c,this.onCaughtError=d,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=O,this.incompleteTransitions=new Map}function _m(e,n,l,o,c,d,y,S,O,Q,te,le){return e=new bS(e,n,l,y,O,Q,te,le,S),n=1,d===!0&&(n|=24),d=Jt(3,null,null,n),e.current=d,d.stateNode=e,n=Fc(),n.refCount++,e.pooledCache=n,n.refCount++,d.memoizedState={element:o,isDehydrated:l,cache:n},es(d),e}function Am(e){return e?(e=Yi,e):Yi}function Nm(e,n,l,o,c,d){c=Am(c),o.context===null?o.context=c:o.pendingContext=c,o=Nl(n),o.payload={element:l},d=d===void 0?null:d,d!==null&&(o.callback=d),l=Cl(e,o,n),l!==null&&(Zt(l,e,n),eo(l,e,n))}function Cm(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<n?l:n}}function xf(e,n){Cm(e,n),(e=e.alternate)&&Cm(e,n)}function Tm(e){if(e.tag===13||e.tag===31){var n=ci(e,67108864);n!==null&&Zt(n,e,67108864),xf(e,67108864)}}function Mm(e){if(e.tag===13||e.tag===31){var n=nn();n=Ha(n);var l=ci(e,n);l!==null&&Zt(l,e,n),xf(e,n)}}var yu=!0;function SS(e,n,l,o){var c=w.T;w.T=null;var d=R.p;try{R.p=2,bf(e,n,l,o)}finally{R.p=d,w.T=c}}function wS(e,n,l,o){var c=w.T;w.T=null;var d=R.p;try{R.p=8,bf(e,n,l,o)}finally{R.p=d,w.T=c}}function bf(e,n,l,o){if(yu){var c=Sf(o);if(c===null)of(e,n,o,vu,l),Om(e,o);else if(_S(c,e,n,l,o))o.stopPropagation();else if(Om(e,o),n&4&&-1<ES.indexOf(e)){for(;c!==null;){var d=Vn(c);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var y=kt(d.pendingLanes);if(y!==0){var S=d;for(S.pendingLanes|=2,S.entangledLanes|=2;y;){var O=1<<31-Je(y);S.entanglements[1]|=O,y&=~O}Hn(d),(Be&6)===0&&(eu=Fe()+500,yo(0))}}break;case 31:case 13:S=ci(d,2),S!==null&&Zt(S,d,2),nu(),xf(d,2)}if(d=Sf(o),d===null&&of(e,n,o,vu,l),d===c)break;c=d}c!==null&&o.stopPropagation()}else of(e,n,o,null,l)}}function Sf(e){return e=wc(e),wf(e)}var vu=null;function wf(e){if(vu=null,e=vl(e),e!==null){var n=f(e);if(n===null)e=null;else{var l=n.tag;if(l===13){if(e=s(n),e!==null)return e;e=null}else if(l===31){if(e=h(n),e!==null)return e;e=null}else if(l===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return vu=e,null}function zm(e){switch(e){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Tt()){case Mt:return 2;case Ht:return 8;case zt:case on:return 32;case ml:return 268435456;default:return 32}default:return 32}}var Ef=!1,Ll=null,Bl=null,Yl=null,_o=new Map,Ao=new Map,Vl=[],ES="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".split(" ");function Om(e,n){switch(e){case"focusin":case"focusout":Ll=null;break;case"dragenter":case"dragleave":Bl=null;break;case"mouseover":case"mouseout":Yl=null;break;case"pointerover":case"pointerout":_o.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ao.delete(n.pointerId)}}function No(e,n,l,o,c,d){return e===null||e.nativeEvent!==d?(e={blockedOn:n,domEventName:l,eventSystemFlags:o,nativeEvent:d,targetContainers:[c]},n!==null&&(n=Vn(n),n!==null&&Tm(n)),e):(e.eventSystemFlags|=o,n=e.targetContainers,c!==null&&n.indexOf(c)===-1&&n.push(c),e)}function _S(e,n,l,o,c){switch(n){case"focusin":return Ll=No(Ll,e,n,l,o,c),!0;case"dragenter":return Bl=No(Bl,e,n,l,o,c),!0;case"mouseover":return Yl=No(Yl,e,n,l,o,c),!0;case"pointerover":var d=c.pointerId;return _o.set(d,No(_o.get(d)||null,e,n,l,o,c)),!0;case"gotpointercapture":return d=c.pointerId,Ao.set(d,No(Ao.get(d)||null,e,n,l,o,c)),!0}return!1}function Dm(e){var n=vl(e.target);if(n!==null){var l=f(n);if(l!==null){if(n=l.tag,n===13){if(n=s(l),n!==null){e.blockedOn=n,or(e.priority,function(){Mm(l)});return}}else if(n===31){if(n=h(l),n!==null){e.blockedOn=n,or(e.priority,function(){Mm(l)});return}}else if(n===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function xu(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var l=Sf(e.nativeEvent);if(l===null){l=e.nativeEvent;var o=new l.constructor(l.type,l);Sc=o,l.target.dispatchEvent(o),Sc=null}else return n=Vn(l),n!==null&&Tm(n),e.blockedOn=l,!1;n.shift()}return!0}function Rm(e,n,l){xu(e)&&l.delete(n)}function AS(){Ef=!1,Ll!==null&&xu(Ll)&&(Ll=null),Bl!==null&&xu(Bl)&&(Bl=null),Yl!==null&&xu(Yl)&&(Yl=null),_o.forEach(Rm),Ao.forEach(Rm)}function bu(e,n){e.blockedOn===n&&(e.blockedOn=null,Ef||(Ef=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,AS)))}var Su=null;function Hm(e){Su!==e&&(Su=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Su===e&&(Su=null);for(var n=0;n<e.length;n+=3){var l=e[n],o=e[n+1],c=e[n+2];if(typeof o!="function"){if(wf(o||l)===null)continue;break}var d=Vn(l);d!==null&&(e.splice(n,3),n-=3,bs(d,{pending:!0,data:c,method:l.method,action:o},o,c))}}))}function sa(e){function n(O){return bu(O,e)}Ll!==null&&bu(Ll,e),Bl!==null&&bu(Bl,e),Yl!==null&&bu(Yl,e),_o.forEach(n),Ao.forEach(n);for(var l=0;l<Vl.length;l++){var o=Vl[l];o.blockedOn===e&&(o.blockedOn=null)}for(;0<Vl.length&&(l=Vl[0],l.blockedOn===null);)Dm(l),l.blockedOn===null&&Vl.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(o=0;o<l.length;o+=3){var c=l[o],d=l[o+1],y=c[wt]||null;if(typeof d=="function")y||Hm(l);else if(y){var S=null;if(d&&d.hasAttribute("formAction")){if(c=d,y=d[wt]||null)S=y.formAction;else if(wf(c)!==null)continue}else S=y.action;typeof S=="function"?l[o+1]=S:(l.splice(o,3),o-=3),Hm(l)}}}function jm(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(y){return c=y})},focusReset:"manual",scroll:"manual"})}function n(){c!==null&&(c(),c=null),o||setTimeout(l,20)}function l(){if(!o&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(l,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),c!==null&&(c(),c=null)}}}function _f(e){this._internalRoot=e}wu.prototype.render=_f.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(r(409));var l=n.current,o=nn();Nm(l,o,e,n,null,null)},wu.prototype.unmount=_f.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;Nm(e.current,2,null,e,null,null),nu(),n[yl]=null}};function wu(e){this._internalRoot=e}wu.prototype.unstable_scheduleHydration=function(e){if(e){var n=ar();e={blockedOn:null,target:e,priority:n};for(var l=0;l<Vl.length&&n!==0&&n<Vl[l].priority;l++);Vl.splice(l,0,e),l===0&&Dm(e)}};var km=i.version;if(km!=="19.2.4")throw Error(r(527,km,"19.2.4"));R.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=m(n),e=e!==null?g(e):null,e=e===null?null:e.stateNode,e};var NS={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:w,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Eu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Eu.isDisabled&&Eu.supportsFiber)try{It=Eu.inject(NS),it=Eu}catch{}}return To.createRoot=function(e,n){if(!u(e))throw Error(r(299));var l=!1,o="",c=Gp,d=Xp,y=Zp;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(c=n.onUncaughtError),n.onCaughtError!==void 0&&(d=n.onCaughtError),n.onRecoverableError!==void 0&&(y=n.onRecoverableError)),n=_m(e,1,!1,null,null,l,o,null,c,d,y,jm),e[yl]=n.current,af(e),new _f(n)},To.hydrateRoot=function(e,n,l){if(!u(e))throw Error(r(299));var o=!1,c="",d=Gp,y=Xp,S=Zp,O=null;return l!=null&&(l.unstable_strictMode===!0&&(o=!0),l.identifierPrefix!==void 0&&(c=l.identifierPrefix),l.onUncaughtError!==void 0&&(d=l.onUncaughtError),l.onCaughtError!==void 0&&(y=l.onCaughtError),l.onRecoverableError!==void 0&&(S=l.onRecoverableError),l.formState!==void 0&&(O=l.formState)),n=_m(e,1,!0,n,l??null,o,c,O,d,y,S,jm),n.context=Am(null),l=n.current,o=nn(),o=Ha(o),c=Nl(o),c.callback=null,Cl(l,c,o),l=o,n.current.lanes=l,li(n,l),Hn(n),e[yl]=n.current,af(e),new wu(n)},To.version="19.2.4",To}var Qm;function kS(){if(Qm)return Cf.exports;Qm=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(i){console.error(i)}}return t(),Cf.exports=jS(),Cf.exports}var US=kS();function Dt(t){if(typeof t=="string"||typeof t=="number")return""+t;let i="";if(Array.isArray(t))for(let a=0,r;a<t.length;a++)(r=Dt(t[a]))!==""&&(i+=(i&&" ")+r);else for(let a in t)t[a]&&(i+=(i&&" ")+a);return i}var Of={exports:{}},Df={},Rf={exports:{}},Hf={};var $m;function LS(){if($m)return Hf;$m=1;var t=Fo();function i(v,b){return v===b&&(v!==0||1/v===1/b)||v!==v&&b!==b}var a=typeof Object.is=="function"?Object.is:i,r=t.useState,u=t.useEffect,f=t.useLayoutEffect,s=t.useDebugValue;function h(v,b){var E=b(),C=r({inst:{value:E,getSnapshot:b}}),N=C[0].inst,T=C[1];return f(function(){N.value=E,N.getSnapshot=b,p(N)&&T({inst:N})},[v,E,b]),u(function(){return p(N)&&T({inst:N}),v(function(){p(N)&&T({inst:N})})},[v]),s(E),E}function p(v){var b=v.getSnapshot;v=v.value;try{var E=b();return!a(v,E)}catch{return!0}}function m(v,b){return b()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:h;return Hf.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:g,Hf}var Km;function BS(){return Km||(Km=1,Rf.exports=LS()),Rf.exports}var Im;function YS(){if(Im)return Df;Im=1;var t=Fo(),i=BS();function a(m,g){return m===g&&(m!==0||1/m===1/g)||m!==m&&g!==g}var r=typeof Object.is=="function"?Object.is:a,u=i.useSyncExternalStore,f=t.useRef,s=t.useEffect,h=t.useMemo,p=t.useDebugValue;return Df.useSyncExternalStoreWithSelector=function(m,g,v,b,E){var C=f(null);if(C.current===null){var N={hasValue:!1,value:null};C.current=N}else N=C.current;C=h(function(){function M(G){if(!D){if(D=!0,q=G,G=b(G),E!==void 0&&N.hasValue){var $=N.value;if(E($,G))return j=$}return j=G}if($=j,r(q,G))return $;var B=b(G);return E!==void 0&&E($,B)?(q=G,$):(q=G,j=B)}var D=!1,q,j,I=v===void 0?null:v;return[function(){return M(g())},I===null?void 0:function(){return M(I())}]},[g,v,b,E]);var T=u(m,C[0],C[1]);return s(function(){N.hasValue=!0,N.value=T},[T]),p(T),T},Df}var Fm;function VS(){return Fm||(Fm=1,Of.exports=YS()),Of.exports}var qS=VS();const GS=gy(qS),XS={},Jm=t=>{let i;const a=new Set,r=(g,v)=>{const b=typeof g=="function"?g(i):g;if(!Object.is(b,i)){const E=i;i=v??(typeof b!="object"||b===null)?b:Object.assign({},i,b),a.forEach(C=>C(i,E))}},u=()=>i,p={setState:r,getState:u,getInitialState:()=>m,subscribe:g=>(a.add(g),()=>a.delete(g)),destroy:()=>{(XS?"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."),a.clear()}},m=i=t(r,u,p);return p},ZS=t=>t?Jm(t):Jm,{useDebugValue:QS}=W,{useSyncExternalStoreWithSelector:$S}=GS,KS=t=>t;function xy(t,i=KS,a){const r=$S(t.subscribe,t.getState,t.getServerState||t.getInitialState,i,a);return QS(r),r}const Wm=(t,i)=>{const a=ZS(t),r=(u,f=i)=>xy(a,u,f);return Object.assign(r,a),r},IS=(t,i)=>t?Wm(t,i):Wm;function Kt(t,i){if(Object.is(t,i))return!0;if(typeof t!="object"||t===null||typeof i!="object"||i===null)return!1;if(t instanceof Map&&i instanceof Map){if(t.size!==i.size)return!1;for(const[r,u]of t)if(!Object.is(u,i.get(r)))return!1;return!0}if(t instanceof Set&&i instanceof Set){if(t.size!==i.size)return!1;for(const r of t)if(!i.has(r))return!1;return!0}const a=Object.keys(t);if(a.length!==Object.keys(i).length)return!1;for(const r of a)if(!Object.prototype.hasOwnProperty.call(i,r)||!Object.is(t[r],i[r]))return!1;return!0}var FS={value:()=>{}};function lc(){for(var t=0,i=arguments.length,a={},r;t<i;++t){if(!(r=arguments[t]+"")||r in a||/[\s.]/.test(r))throw new Error("illegal type: "+r);a[r]=[]}return new ku(a)}function ku(t){this._=t}function JS(t,i){return t.trim().split(/^|\s+/).map(function(a){var r="",u=a.indexOf(".");if(u>=0&&(r=a.slice(u+1),a=a.slice(0,u)),a&&!i.hasOwnProperty(a))throw new Error("unknown type: "+a);return{type:a,name:r}})}ku.prototype=lc.prototype={constructor:ku,on:function(t,i){var a=this._,r=JS(t+"",a),u,f=-1,s=r.length;if(arguments.length<2){for(;++f<s;)if((u=(t=r[f]).type)&&(u=WS(a[u],t.name)))return u;return}if(i!=null&&typeof i!="function")throw new Error("invalid callback: "+i);for(;++f<s;)if(u=(t=r[f]).type)a[u]=Pm(a[u],t.name,i);else if(i==null)for(u in a)a[u]=Pm(a[u],t.name,null);return this},copy:function(){var t={},i=this._;for(var a in i)t[a]=i[a].slice();return new ku(t)},call:function(t,i){if((u=arguments.length-2)>0)for(var a=new Array(u),r=0,u,f;r<u;++r)a[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(f=this._[t],r=0,u=f.length;r<u;++r)f[r].value.apply(i,a)},apply:function(t,i,a){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],u=0,f=r.length;u<f;++u)r[u].value.apply(i,a)}};function WS(t,i){for(var a=0,r=t.length,u;a<r;++a)if((u=t[a]).name===i)return u.value}function Pm(t,i,a){for(var r=0,u=t.length;r<u;++r)if(t[r].name===i){t[r]=FS,t=t.slice(0,r).concat(t.slice(r+1));break}return a!=null&&t.push({name:i,value:a}),t}var If="http://www.w3.org/1999/xhtml";const eg={svg:"http://www.w3.org/2000/svg",xhtml:If,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ic(t){var i=t+="",a=i.indexOf(":");return a>=0&&(i=t.slice(0,a))!=="xmlns"&&(t=t.slice(a+1)),eg.hasOwnProperty(i)?{space:eg[i],local:t}:t}function PS(t){return function(){var i=this.ownerDocument,a=this.namespaceURI;return a===If&&i.documentElement.namespaceURI===If?i.createElement(t):i.createElementNS(a,t)}}function e2(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function by(t){var i=ic(t);return(i.local?e2:PS)(i)}function t2(){}function wd(t){return t==null?t2:function(){return this.querySelector(t)}}function n2(t){typeof t!="function"&&(t=wd(t));for(var i=this._groups,a=i.length,r=new Array(a),u=0;u<a;++u)for(var f=i[u],s=f.length,h=r[u]=new Array(s),p,m,g=0;g<s;++g)(p=f[g])&&(m=t.call(p,p.__data__,g,f))&&("__data__"in p&&(m.__data__=p.__data__),h[g]=m);return new ln(r,this._parents)}function l2(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function i2(){return[]}function Sy(t){return t==null?i2:function(){return this.querySelectorAll(t)}}function a2(t){return function(){return l2(t.apply(this,arguments))}}function o2(t){typeof t=="function"?t=a2(t):t=Sy(t);for(var i=this._groups,a=i.length,r=[],u=[],f=0;f<a;++f)for(var s=i[f],h=s.length,p,m=0;m<h;++m)(p=s[m])&&(r.push(t.call(p,p.__data__,m,s)),u.push(p));return new ln(r,u)}function wy(t){return function(){return this.matches(t)}}function Ey(t){return function(i){return i.matches(t)}}var r2=Array.prototype.find;function u2(t){return function(){return r2.call(this.children,t)}}function c2(){return this.firstElementChild}function s2(t){return this.select(t==null?c2:u2(typeof t=="function"?t:Ey(t)))}var f2=Array.prototype.filter;function d2(){return Array.from(this.children)}function h2(t){return function(){return f2.call(this.children,t)}}function p2(t){return this.selectAll(t==null?d2:h2(typeof t=="function"?t:Ey(t)))}function m2(t){typeof t!="function"&&(t=wy(t));for(var i=this._groups,a=i.length,r=new Array(a),u=0;u<a;++u)for(var f=i[u],s=f.length,h=r[u]=[],p,m=0;m<s;++m)(p=f[m])&&t.call(p,p.__data__,m,f)&&h.push(p);return new ln(r,this._parents)}function _y(t){return new Array(t.length)}function g2(){return new ln(this._enter||this._groups.map(_y),this._parents)}function Yu(t,i){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=i}Yu.prototype={constructor:Yu,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,i){return this._parent.insertBefore(t,i)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function y2(t){return function(){return t}}function v2(t,i,a,r,u,f){for(var s=0,h,p=i.length,m=f.length;s<m;++s)(h=i[s])?(h.__data__=f[s],r[s]=h):a[s]=new Yu(t,f[s]);for(;s<p;++s)(h=i[s])&&(u[s]=h)}function x2(t,i,a,r,u,f,s){var h,p,m=new Map,g=i.length,v=f.length,b=new Array(g),E;for(h=0;h<g;++h)(p=i[h])&&(b[h]=E=s.call(p,p.__data__,h,i)+"",m.has(E)?u[h]=p:m.set(E,p));for(h=0;h<v;++h)E=s.call(t,f[h],h,f)+"",(p=m.get(E))?(r[h]=p,p.__data__=f[h],m.delete(E)):a[h]=new Yu(t,f[h]);for(h=0;h<g;++h)(p=i[h])&&m.get(b[h])===p&&(u[h]=p)}function b2(t){return t.__data__}function S2(t,i){if(!arguments.length)return Array.from(this,b2);var a=i?x2:v2,r=this._parents,u=this._groups;typeof t!="function"&&(t=y2(t));for(var f=u.length,s=new Array(f),h=new Array(f),p=new Array(f),m=0;m<f;++m){var g=r[m],v=u[m],b=v.length,E=w2(t.call(g,g&&g.__data__,m,r)),C=E.length,N=h[m]=new Array(C),T=s[m]=new Array(C),M=p[m]=new Array(b);a(g,v,N,T,M,E,i);for(var D=0,q=0,j,I;D<C;++D)if(j=N[D]){for(D>=q&&(q=D+1);!(I=T[q])&&++q<C;);j._next=I||null}}return s=new ln(s,r),s._enter=h,s._exit=p,s}function w2(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function E2(){return new ln(this._exit||this._groups.map(_y),this._parents)}function _2(t,i,a){var r=this.enter(),u=this,f=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),i!=null&&(u=i(u),u&&(u=u.selection())),a==null?f.remove():a(f),r&&u?r.merge(u).order():u}function A2(t){for(var i=t.selection?t.selection():t,a=this._groups,r=i._groups,u=a.length,f=r.length,s=Math.min(u,f),h=new Array(u),p=0;p<s;++p)for(var m=a[p],g=r[p],v=m.length,b=h[p]=new Array(v),E,C=0;C<v;++C)(E=m[C]||g[C])&&(b[C]=E);for(;p<u;++p)h[p]=a[p];return new ln(h,this._parents)}function N2(){for(var t=this._groups,i=-1,a=t.length;++i<a;)for(var r=t[i],u=r.length-1,f=r[u],s;--u>=0;)(s=r[u])&&(f&&s.compareDocumentPosition(f)^4&&f.parentNode.insertBefore(s,f),f=s);return this}function C2(t){t||(t=T2);function i(v,b){return v&&b?t(v.__data__,b.__data__):!v-!b}for(var a=this._groups,r=a.length,u=new Array(r),f=0;f<r;++f){for(var s=a[f],h=s.length,p=u[f]=new Array(h),m,g=0;g<h;++g)(m=s[g])&&(p[g]=m);p.sort(i)}return new ln(u,this._parents).order()}function T2(t,i){return t<i?-1:t>i?1:t>=i?0:NaN}function M2(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function z2(){return Array.from(this)}function O2(){for(var t=this._groups,i=0,a=t.length;i<a;++i)for(var r=t[i],u=0,f=r.length;u<f;++u){var s=r[u];if(s)return s}return null}function D2(){let t=0;for(const i of this)++t;return t}function R2(){return!this.node()}function H2(t){for(var i=this._groups,a=0,r=i.length;a<r;++a)for(var u=i[a],f=0,s=u.length,h;f<s;++f)(h=u[f])&&t.call(h,h.__data__,f,u);return this}function j2(t){return function(){this.removeAttribute(t)}}function k2(t){return function(){this.removeAttributeNS(t.space,t.local)}}function U2(t,i){return function(){this.setAttribute(t,i)}}function L2(t,i){return function(){this.setAttributeNS(t.space,t.local,i)}}function B2(t,i){return function(){var a=i.apply(this,arguments);a==null?this.removeAttribute(t):this.setAttribute(t,a)}}function Y2(t,i){return function(){var a=i.apply(this,arguments);a==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,a)}}function V2(t,i){var a=ic(t);if(arguments.length<2){var r=this.node();return a.local?r.getAttributeNS(a.space,a.local):r.getAttribute(a)}return this.each((i==null?a.local?k2:j2:typeof i=="function"?a.local?Y2:B2:a.local?L2:U2)(a,i))}function Ay(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function q2(t){return function(){this.style.removeProperty(t)}}function G2(t,i,a){return function(){this.style.setProperty(t,i,a)}}function X2(t,i,a){return function(){var r=i.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,a)}}function Z2(t,i,a){return arguments.length>1?this.each((i==null?q2:typeof i=="function"?X2:G2)(t,i,a??"")):Na(this.node(),t)}function Na(t,i){return t.style.getPropertyValue(i)||Ay(t).getComputedStyle(t,null).getPropertyValue(i)}function Q2(t){return function(){delete this[t]}}function $2(t,i){return function(){this[t]=i}}function K2(t,i){return function(){var a=i.apply(this,arguments);a==null?delete this[t]:this[t]=a}}function I2(t,i){return arguments.length>1?this.each((i==null?Q2:typeof i=="function"?K2:$2)(t,i)):this.node()[t]}function Ny(t){return t.trim().split(/^|\s+/)}function Ed(t){return t.classList||new Cy(t)}function Cy(t){this._node=t,this._names=Ny(t.getAttribute("class")||"")}Cy.prototype={add:function(t){var i=this._names.indexOf(t);i<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var i=this._names.indexOf(t);i>=0&&(this._names.splice(i,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Ty(t,i){for(var a=Ed(t),r=-1,u=i.length;++r<u;)a.add(i[r])}function My(t,i){for(var a=Ed(t),r=-1,u=i.length;++r<u;)a.remove(i[r])}function F2(t){return function(){Ty(this,t)}}function J2(t){return function(){My(this,t)}}function W2(t,i){return function(){(i.apply(this,arguments)?Ty:My)(this,t)}}function P2(t,i){var a=Ny(t+"");if(arguments.length<2){for(var r=Ed(this.node()),u=-1,f=a.length;++u<f;)if(!r.contains(a[u]))return!1;return!0}return this.each((typeof i=="function"?W2:i?F2:J2)(a,i))}function ew(){this.textContent=""}function tw(t){return function(){this.textContent=t}}function nw(t){return function(){var i=t.apply(this,arguments);this.textContent=i??""}}function lw(t){return arguments.length?this.each(t==null?ew:(typeof t=="function"?nw:tw)(t)):this.node().textContent}function iw(){this.innerHTML=""}function aw(t){return function(){this.innerHTML=t}}function ow(t){return function(){var i=t.apply(this,arguments);this.innerHTML=i??""}}function rw(t){return arguments.length?this.each(t==null?iw:(typeof t=="function"?ow:aw)(t)):this.node().innerHTML}function uw(){this.nextSibling&&this.parentNode.appendChild(this)}function cw(){return this.each(uw)}function sw(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function fw(){return this.each(sw)}function dw(t){var i=typeof t=="function"?t:by(t);return this.select(function(){return this.appendChild(i.apply(this,arguments))})}function hw(){return null}function pw(t,i){var a=typeof t=="function"?t:by(t),r=i==null?hw:typeof i=="function"?i:wd(i);return this.select(function(){return this.insertBefore(a.apply(this,arguments),r.apply(this,arguments)||null)})}function mw(){var t=this.parentNode;t&&t.removeChild(this)}function gw(){return this.each(mw)}function yw(){var t=this.cloneNode(!1),i=this.parentNode;return i?i.insertBefore(t,this.nextSibling):t}function vw(){var t=this.cloneNode(!0),i=this.parentNode;return i?i.insertBefore(t,this.nextSibling):t}function xw(t){return this.select(t?vw:yw)}function bw(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Sw(t){return function(i){t.call(this,i,this.__data__)}}function ww(t){return t.trim().split(/^|\s+/).map(function(i){var a="",r=i.indexOf(".");return r>=0&&(a=i.slice(r+1),i=i.slice(0,r)),{type:i,name:a}})}function Ew(t){return function(){var i=this.__on;if(i){for(var a=0,r=-1,u=i.length,f;a<u;++a)f=i[a],(!t.type||f.type===t.type)&&f.name===t.name?this.removeEventListener(f.type,f.listener,f.options):i[++r]=f;++r?i.length=r:delete this.__on}}}function _w(t,i,a){return function(){var r=this.__on,u,f=Sw(i);if(r){for(var s=0,h=r.length;s<h;++s)if((u=r[s]).type===t.type&&u.name===t.name){this.removeEventListener(u.type,u.listener,u.options),this.addEventListener(u.type,u.listener=f,u.options=a),u.value=i;return}}this.addEventListener(t.type,f,a),u={type:t.type,name:t.name,value:i,listener:f,options:a},r?r.push(u):this.__on=[u]}}function Aw(t,i,a){var r=ww(t+""),u,f=r.length,s;if(arguments.length<2){var h=this.node().__on;if(h){for(var p=0,m=h.length,g;p<m;++p)for(u=0,g=h[p];u<f;++u)if((s=r[u]).type===g.type&&s.name===g.name)return g.value}return}for(h=i?_w:Ew,u=0;u<f;++u)this.each(h(r[u],i,a));return this}function zy(t,i,a){var r=Ay(t),u=r.CustomEvent;typeof u=="function"?u=new u(i,a):(u=r.document.createEvent("Event"),a?(u.initEvent(i,a.bubbles,a.cancelable),u.detail=a.detail):u.initEvent(i,!1,!1)),t.dispatchEvent(u)}function Nw(t,i){return function(){return zy(this,t,i)}}function Cw(t,i){return function(){return zy(this,t,i.apply(this,arguments))}}function Tw(t,i){return this.each((typeof i=="function"?Cw:Nw)(t,i))}function*Mw(){for(var t=this._groups,i=0,a=t.length;i<a;++i)for(var r=t[i],u=0,f=r.length,s;u<f;++u)(s=r[u])&&(yield s)}var Oy=[null];function ln(t,i){this._groups=t,this._parents=i}function Jo(){return new ln([[document.documentElement]],Oy)}function zw(){return this}ln.prototype=Jo.prototype={constructor:ln,select:n2,selectAll:o2,selectChild:s2,selectChildren:p2,filter:m2,data:S2,enter:g2,exit:E2,join:_2,merge:A2,selection:zw,order:N2,sort:C2,call:M2,nodes:z2,node:O2,size:D2,empty:R2,each:H2,attr:V2,style:Z2,property:I2,classed:P2,text:lw,html:rw,raise:cw,lower:fw,append:dw,insert:pw,remove:gw,clone:xw,datum:bw,on:Aw,dispatch:Tw,[Symbol.iterator]:Mw};function vn(t){return typeof t=="string"?new ln([[document.querySelector(t)]],[document.documentElement]):new ln([[t]],Oy)}function Ow(t){let i;for(;i=t.sourceEvent;)t=i;return t}function kn(t,i){if(t=Ow(t),i===void 0&&(i=t.currentTarget),i){var a=i.ownerSVGElement||i;if(a.createSVGPoint){var r=a.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(i.getScreenCTM().inverse()),[r.x,r.y]}if(i.getBoundingClientRect){var u=i.getBoundingClientRect();return[t.clientX-u.left-i.clientLeft,t.clientY-u.top-i.clientTop]}}return[t.pageX,t.pageY]}const Dw={passive:!1},Bo={capture:!0,passive:!1};function jf(t){t.stopImmediatePropagation()}function Sa(t){t.preventDefault(),t.stopImmediatePropagation()}function Dy(t){var i=t.document.documentElement,a=vn(t).on("dragstart.drag",Sa,Bo);"onselectstart"in i?a.on("selectstart.drag",Sa,Bo):(i.__noselect=i.style.MozUserSelect,i.style.MozUserSelect="none")}function Ry(t,i){var a=t.document.documentElement,r=vn(t).on("dragstart.drag",null);i&&(r.on("click.drag",Sa,Bo),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in a?r.on("selectstart.drag",null):(a.style.MozUserSelect=a.__noselect,delete a.__noselect)}const _u=t=>()=>t;function Ff(t,{sourceEvent:i,subject:a,target:r,identifier:u,active:f,x:s,y:h,dx:p,dy:m,dispatch:g}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:i,enumerable:!0,configurable:!0},subject:{value:a,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:u,enumerable:!0,configurable:!0},active:{value:f,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:h,enumerable:!0,configurable:!0},dx:{value:p,enumerable:!0,configurable:!0},dy:{value:m,enumerable:!0,configurable:!0},_:{value:g}})}Ff.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function Rw(t){return!t.ctrlKey&&!t.button}function Hw(){return this.parentNode}function jw(t,i){return i??{x:t.x,y:t.y}}function kw(){return navigator.maxTouchPoints||"ontouchstart"in this}function Hy(){var t=Rw,i=Hw,a=jw,r=kw,u={},f=lc("start","drag","end"),s=0,h,p,m,g,v=0;function b(j){j.on("mousedown.drag",E).filter(r).on("touchstart.drag",T).on("touchmove.drag",M,Dw).on("touchend.drag touchcancel.drag",D).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function E(j,I){if(!(g||!t.call(this,j,I))){var G=q(this,i.call(this,j,I),j,I,"mouse");G&&(vn(j.view).on("mousemove.drag",C,Bo).on("mouseup.drag",N,Bo),Dy(j.view),jf(j),m=!1,h=j.clientX,p=j.clientY,G("start",j))}}function C(j){if(Sa(j),!m){var I=j.clientX-h,G=j.clientY-p;m=I*I+G*G>v}u.mouse("drag",j)}function N(j){vn(j.view).on("mousemove.drag mouseup.drag",null),Ry(j.view,m),Sa(j),u.mouse("end",j)}function T(j,I){if(t.call(this,j,I)){var G=j.changedTouches,$=i.call(this,j,I),B=G.length,ee,oe;for(ee=0;ee<B;++ee)(oe=q(this,$,j,I,G[ee].identifier,G[ee]))&&(jf(j),oe("start",j,G[ee]))}}function M(j){var I=j.changedTouches,G=I.length,$,B;for($=0;$<G;++$)(B=u[I[$].identifier])&&(Sa(j),B("drag",j,I[$]))}function D(j){var I=j.changedTouches,G=I.length,$,B;for(g&&clearTimeout(g),g=setTimeout(function(){g=null},500),$=0;$<G;++$)(B=u[I[$].identifier])&&(jf(j),B("end",j,I[$]))}function q(j,I,G,$,B,ee){var oe=f.copy(),re=kn(ee||G,I),ue,ie,x;if((x=a.call(j,new Ff("beforestart",{sourceEvent:G,target:b,identifier:B,active:s,x:re[0],y:re[1],dx:0,dy:0,dispatch:oe}),$))!=null)return ue=x.x-re[0]||0,ie=x.y-re[1]||0,function H(w,R,X){var L=re,Y;switch(w){case"start":u[B]=H,Y=s++;break;case"end":delete u[B],--s;case"drag":re=kn(X||R,I),Y=s;break}oe.call(w,j,new Ff(w,{sourceEvent:R,subject:x,target:b,identifier:B,active:Y,x:re[0]+ue,y:re[1]+ie,dx:re[0]-L[0],dy:re[1]-L[1],dispatch:oe}),$)}}return b.filter=function(j){return arguments.length?(t=typeof j=="function"?j:_u(!!j),b):t},b.container=function(j){return arguments.length?(i=typeof j=="function"?j:_u(j),b):i},b.subject=function(j){return arguments.length?(a=typeof j=="function"?j:_u(j),b):a},b.touchable=function(j){return arguments.length?(r=typeof j=="function"?j:_u(!!j),b):r},b.on=function(){var j=f.on.apply(f,arguments);return j===f?b:j},b.clickDistance=function(j){return arguments.length?(v=(j=+j)*j,b):Math.sqrt(v)},b}function _d(t,i,a){t.prototype=i.prototype=a,a.constructor=t}function jy(t,i){var a=Object.create(t.prototype);for(var r in i)a[r]=i[r];return a}function Wo(){}var Yo=.7,Vu=1/Yo,wa="\\s*([+-]?\\d+)\\s*",Vo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Un="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Uw=/^#([0-9a-f]{3,8})$/,Lw=new RegExp(`^rgb\\(${wa},${wa},${wa}\\)$`),Bw=new RegExp(`^rgb\\(${Un},${Un},${Un}\\)$`),Yw=new RegExp(`^rgba\\(${wa},${wa},${wa},${Vo}\\)$`),Vw=new RegExp(`^rgba\\(${Un},${Un},${Un},${Vo}\\)$`),qw=new RegExp(`^hsl\\(${Vo},${Un},${Un}\\)$`),Gw=new RegExp(`^hsla\\(${Vo},${Un},${Un},${Vo}\\)$`),tg={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};_d(Wo,qo,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:ng,formatHex:ng,formatHex8:Xw,formatHsl:Zw,formatRgb:lg,toString:lg});function ng(){return this.rgb().formatHex()}function Xw(){return this.rgb().formatHex8()}function Zw(){return ky(this).formatHsl()}function lg(){return this.rgb().formatRgb()}function qo(t){var i,a;return t=(t+"").trim().toLowerCase(),(i=Uw.exec(t))?(a=i[1].length,i=parseInt(i[1],16),a===6?ig(i):a===3?new Qt(i>>8&15|i>>4&240,i>>4&15|i&240,(i&15)<<4|i&15,1):a===8?Au(i>>24&255,i>>16&255,i>>8&255,(i&255)/255):a===4?Au(i>>12&15|i>>8&240,i>>8&15|i>>4&240,i>>4&15|i&240,((i&15)<<4|i&15)/255):null):(i=Lw.exec(t))?new Qt(i[1],i[2],i[3],1):(i=Bw.exec(t))?new Qt(i[1]*255/100,i[2]*255/100,i[3]*255/100,1):(i=Yw.exec(t))?Au(i[1],i[2],i[3],i[4]):(i=Vw.exec(t))?Au(i[1]*255/100,i[2]*255/100,i[3]*255/100,i[4]):(i=qw.exec(t))?rg(i[1],i[2]/100,i[3]/100,1):(i=Gw.exec(t))?rg(i[1],i[2]/100,i[3]/100,i[4]):tg.hasOwnProperty(t)?ig(tg[t]):t==="transparent"?new Qt(NaN,NaN,NaN,0):null}function ig(t){return new Qt(t>>16&255,t>>8&255,t&255,1)}function Au(t,i,a,r){return r<=0&&(t=i=a=NaN),new Qt(t,i,a,r)}function Qw(t){return t instanceof Wo||(t=qo(t)),t?(t=t.rgb(),new Qt(t.r,t.g,t.b,t.opacity)):new Qt}function Jf(t,i,a,r){return arguments.length===1?Qw(t):new Qt(t,i,a,r??1)}function Qt(t,i,a,r){this.r=+t,this.g=+i,this.b=+a,this.opacity=+r}_d(Qt,Jf,jy(Wo,{brighter(t){return t=t==null?Vu:Math.pow(Vu,t),new Qt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Yo:Math.pow(Yo,t),new Qt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Qt(Ni(this.r),Ni(this.g),Ni(this.b),qu(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:ag,formatHex:ag,formatHex8:$w,formatRgb:og,toString:og}));function ag(){return`#${_i(this.r)}${_i(this.g)}${_i(this.b)}`}function $w(){return`#${_i(this.r)}${_i(this.g)}${_i(this.b)}${_i((isNaN(this.opacity)?1:this.opacity)*255)}`}function og(){const t=qu(this.opacity);return`${t===1?"rgb(":"rgba("}${Ni(this.r)}, ${Ni(this.g)}, ${Ni(this.b)}${t===1?")":`, ${t})`}`}function qu(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ni(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function _i(t){return t=Ni(t),(t<16?"0":"")+t.toString(16)}function rg(t,i,a,r){return r<=0?t=i=a=NaN:a<=0||a>=1?t=i=NaN:i<=0&&(t=NaN),new _n(t,i,a,r)}function ky(t){if(t instanceof _n)return new _n(t.h,t.s,t.l,t.opacity);if(t instanceof Wo||(t=qo(t)),!t)return new _n;if(t instanceof _n)return t;t=t.rgb();var i=t.r/255,a=t.g/255,r=t.b/255,u=Math.min(i,a,r),f=Math.max(i,a,r),s=NaN,h=f-u,p=(f+u)/2;return h?(i===f?s=(a-r)/h+(a<r)*6:a===f?s=(r-i)/h+2:s=(i-a)/h+4,h/=p<.5?f+u:2-f-u,s*=60):h=p>0&&p<1?0:s,new _n(s,h,p,t.opacity)}function Kw(t,i,a,r){return arguments.length===1?ky(t):new _n(t,i,a,r??1)}function _n(t,i,a,r){this.h=+t,this.s=+i,this.l=+a,this.opacity=+r}_d(_n,Kw,jy(Wo,{brighter(t){return t=t==null?Vu:Math.pow(Vu,t),new _n(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Yo:Math.pow(Yo,t),new _n(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,i=isNaN(t)||isNaN(this.s)?0:this.s,a=this.l,r=a+(a<.5?a:1-a)*i,u=2*a-r;return new Qt(kf(t>=240?t-240:t+120,u,r),kf(t,u,r),kf(t<120?t+240:t-120,u,r),this.opacity)},clamp(){return new _n(ug(this.h),Nu(this.s),Nu(this.l),qu(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=qu(this.opacity);return`${t===1?"hsl(":"hsla("}${ug(this.h)}, ${Nu(this.s)*100}%, ${Nu(this.l)*100}%${t===1?")":`, ${t})`}`}}));function ug(t){return t=(t||0)%360,t<0?t+360:t}function Nu(t){return Math.max(0,Math.min(1,t||0))}function kf(t,i,a){return(t<60?i+(a-i)*t/60:t<180?a:t<240?i+(a-i)*(240-t)/60:i)*255}const Uy=t=>()=>t;function Iw(t,i){return function(a){return t+a*i}}function Fw(t,i,a){return t=Math.pow(t,a),i=Math.pow(i,a)-t,a=1/a,function(r){return Math.pow(t+r*i,a)}}function Jw(t){return(t=+t)==1?Ly:function(i,a){return a-i?Fw(i,a,t):Uy(isNaN(i)?a:i)}}function Ly(t,i){var a=i-t;return a?Iw(t,a):Uy(isNaN(t)?i:t)}const cg=(function t(i){var a=Jw(i);function r(u,f){var s=a((u=Jf(u)).r,(f=Jf(f)).r),h=a(u.g,f.g),p=a(u.b,f.b),m=Ly(u.opacity,f.opacity);return function(g){return u.r=s(g),u.g=h(g),u.b=p(g),u.opacity=m(g),u+""}}return r.gamma=t,r})(1);function Ql(t,i){return t=+t,i=+i,function(a){return t*(1-a)+i*a}}var Wf=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Uf=new RegExp(Wf.source,"g");function Ww(t){return function(){return t}}function Pw(t){return function(i){return t(i)+""}}function eE(t,i){var a=Wf.lastIndex=Uf.lastIndex=0,r,u,f,s=-1,h=[],p=[];for(t=t+"",i=i+"";(r=Wf.exec(t))&&(u=Uf.exec(i));)(f=u.index)>a&&(f=i.slice(a,f),h[s]?h[s]+=f:h[++s]=f),(r=r[0])===(u=u[0])?h[s]?h[s]+=u:h[++s]=u:(h[++s]=null,p.push({i:s,x:Ql(r,u)})),a=Uf.lastIndex;return a<i.length&&(f=i.slice(a),h[s]?h[s]+=f:h[++s]=f),h.length<2?p[0]?Pw(p[0].x):Ww(i):(i=p.length,function(m){for(var g=0,v;g<i;++g)h[(v=p[g]).i]=v.x(m);return h.join("")})}var sg=180/Math.PI,Pf={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function By(t,i,a,r,u,f){var s,h,p;return(s=Math.sqrt(t*t+i*i))&&(t/=s,i/=s),(p=t*a+i*r)&&(a-=t*p,r-=i*p),(h=Math.sqrt(a*a+r*r))&&(a/=h,r/=h,p/=h),t*r<i*a&&(t=-t,i=-i,p=-p,s=-s),{translateX:u,translateY:f,rotate:Math.atan2(i,t)*sg,skewX:Math.atan(p)*sg,scaleX:s,scaleY:h}}var Cu;function tE(t){const i=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return i.isIdentity?Pf:By(i.a,i.b,i.c,i.d,i.e,i.f)}function nE(t){return t==null||(Cu||(Cu=document.createElementNS("http://www.w3.org/2000/svg","g")),Cu.setAttribute("transform",t),!(t=Cu.transform.baseVal.consolidate()))?Pf:(t=t.matrix,By(t.a,t.b,t.c,t.d,t.e,t.f))}function Yy(t,i,a,r){function u(m){return m.length?m.pop()+" ":""}function f(m,g,v,b,E,C){if(m!==v||g!==b){var N=E.push("translate(",null,i,null,a);C.push({i:N-4,x:Ql(m,v)},{i:N-2,x:Ql(g,b)})}else(v||b)&&E.push("translate("+v+i+b+a)}function s(m,g,v,b){m!==g?(m-g>180?g+=360:g-m>180&&(m+=360),b.push({i:v.push(u(v)+"rotate(",null,r)-2,x:Ql(m,g)})):g&&v.push(u(v)+"rotate("+g+r)}function h(m,g,v,b){m!==g?b.push({i:v.push(u(v)+"skewX(",null,r)-2,x:Ql(m,g)}):g&&v.push(u(v)+"skewX("+g+r)}function p(m,g,v,b,E,C){if(m!==v||g!==b){var N=E.push(u(E)+"scale(",null,",",null,")");C.push({i:N-4,x:Ql(m,v)},{i:N-2,x:Ql(g,b)})}else(v!==1||b!==1)&&E.push(u(E)+"scale("+v+","+b+")")}return function(m,g){var v=[],b=[];return m=t(m),g=t(g),f(m.translateX,m.translateY,g.translateX,g.translateY,v,b),s(m.rotate,g.rotate,v,b),h(m.skewX,g.skewX,v,b),p(m.scaleX,m.scaleY,g.scaleX,g.scaleY,v,b),m=g=null,function(E){for(var C=-1,N=b.length,T;++C<N;)v[(T=b[C]).i]=T.x(E);return v.join("")}}}var lE=Yy(tE,"px, ","px)","deg)"),iE=Yy(nE,", ",")",")"),aE=1e-12;function fg(t){return((t=Math.exp(t))+1/t)/2}function oE(t){return((t=Math.exp(t))-1/t)/2}function rE(t){return((t=Math.exp(2*t))-1)/(t+1)}const uE=(function t(i,a,r){function u(f,s){var h=f[0],p=f[1],m=f[2],g=s[0],v=s[1],b=s[2],E=g-h,C=v-p,N=E*E+C*C,T,M;if(N<aE)M=Math.log(b/m)/i,T=function($){return[h+$*E,p+$*C,m*Math.exp(i*$*M)]};else{var D=Math.sqrt(N),q=(b*b-m*m+r*N)/(2*m*a*D),j=(b*b-m*m-r*N)/(2*b*a*D),I=Math.log(Math.sqrt(q*q+1)-q),G=Math.log(Math.sqrt(j*j+1)-j);M=(G-I)/i,T=function($){var B=$*M,ee=fg(I),oe=m/(a*D)*(ee*rE(i*B+I)-oE(I));return[h+oe*E,p+oe*C,m*ee/fg(i*B+I)]}}return T.duration=M*1e3*i/Math.SQRT2,T}return u.rho=function(f){var s=Math.max(.001,+f),h=s*s,p=h*h;return t(s,h,p)},u})(Math.SQRT2,2,4);var Ca=0,jo=0,Mo=0,Vy=1e3,Gu,ko,Xu=0,Ti=0,ac=0,Go=typeof performance=="object"&&performance.now?performance:Date,qy=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Ad(){return Ti||(qy(cE),Ti=Go.now()+ac)}function cE(){Ti=0}function Zu(){this._call=this._time=this._next=null}Zu.prototype=Gy.prototype={constructor:Zu,restart:function(t,i,a){if(typeof t!="function")throw new TypeError("callback is not a function");a=(a==null?Ad():+a)+(i==null?0:+i),!this._next&&ko!==this&&(ko?ko._next=this:Gu=this,ko=this),this._call=t,this._time=a,ed()},stop:function(){this._call&&(this._call=null,this._time=1/0,ed())}};function Gy(t,i,a){var r=new Zu;return r.restart(t,i,a),r}function sE(){Ad(),++Ca;for(var t=Gu,i;t;)(i=Ti-t._time)>=0&&t._call.call(void 0,i),t=t._next;--Ca}function dg(){Ti=(Xu=Go.now())+ac,Ca=jo=0;try{sE()}finally{Ca=0,dE(),Ti=0}}function fE(){var t=Go.now(),i=t-Xu;i>Vy&&(ac-=i,Xu=t)}function dE(){for(var t,i=Gu,a,r=1/0;i;)i._call?(r>i._time&&(r=i._time),t=i,i=i._next):(a=i._next,i._next=null,i=t?t._next=a:Gu=a);ko=t,ed(r)}function ed(t){if(!Ca){jo&&(jo=clearTimeout(jo));var i=t-Ti;i>24?(t<1/0&&(jo=setTimeout(dg,t-Go.now()-ac)),Mo&&(Mo=clearInterval(Mo))):(Mo||(Xu=Go.now(),Mo=setInterval(fE,Vy)),Ca=1,qy(dg))}}function hg(t,i,a){var r=new Zu;return i=i==null?0:+i,r.restart(u=>{r.stop(),t(u+i)},i,a),r}var hE=lc("start","end","cancel","interrupt"),pE=[],Xy=0,pg=1,td=2,Uu=3,mg=4,nd=5,Lu=6;function oc(t,i,a,r,u,f){var s=t.__transition;if(!s)t.__transition={};else if(a in s)return;mE(t,a,{name:i,index:r,group:u,on:hE,tween:pE,time:f.time,delay:f.delay,duration:f.duration,ease:f.ease,timer:null,state:Xy})}function Nd(t,i){var a=Nn(t,i);if(a.state>Xy)throw new Error("too late; already scheduled");return a}function Bn(t,i){var a=Nn(t,i);if(a.state>Uu)throw new Error("too late; already running");return a}function Nn(t,i){var a=t.__transition;if(!a||!(a=a[i]))throw new Error("transition not found");return a}function mE(t,i,a){var r=t.__transition,u;r[i]=a,a.timer=Gy(f,0,a.time);function f(m){a.state=pg,a.timer.restart(s,a.delay,a.time),a.delay<=m&&s(m-a.delay)}function s(m){var g,v,b,E;if(a.state!==pg)return p();for(g in r)if(E=r[g],E.name===a.name){if(E.state===Uu)return hg(s);E.state===mg?(E.state=Lu,E.timer.stop(),E.on.call("interrupt",t,t.__data__,E.index,E.group),delete r[g]):+g<i&&(E.state=Lu,E.timer.stop(),E.on.call("cancel",t,t.__data__,E.index,E.group),delete r[g])}if(hg(function(){a.state===Uu&&(a.state=mg,a.timer.restart(h,a.delay,a.time),h(m))}),a.state=td,a.on.call("start",t,t.__data__,a.index,a.group),a.state===td){for(a.state=Uu,u=new Array(b=a.tween.length),g=0,v=-1;g<b;++g)(E=a.tween[g].value.call(t,t.__data__,a.index,a.group))&&(u[++v]=E);u.length=v+1}}function h(m){for(var g=m<a.duration?a.ease.call(null,m/a.duration):(a.timer.restart(p),a.state=nd,1),v=-1,b=u.length;++v<b;)u[v].call(t,g);a.state===nd&&(a.on.call("end",t,t.__data__,a.index,a.group),p())}function p(){a.state=Lu,a.timer.stop(),delete r[i];for(var m in r)return;delete t.__transition}}function Bu(t,i){var a=t.__transition,r,u,f=!0,s;if(a){i=i==null?null:i+"";for(s in a){if((r=a[s]).name!==i){f=!1;continue}u=r.state>td&&r.state<nd,r.state=Lu,r.timer.stop(),r.on.call(u?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete a[s]}f&&delete t.__transition}}function gE(t){return this.each(function(){Bu(this,t)})}function yE(t,i){var a,r;return function(){var u=Bn(this,t),f=u.tween;if(f!==a){r=a=f;for(var s=0,h=r.length;s<h;++s)if(r[s].name===i){r=r.slice(),r.splice(s,1);break}}u.tween=r}}function vE(t,i,a){var r,u;if(typeof a!="function")throw new Error;return function(){var f=Bn(this,t),s=f.tween;if(s!==r){u=(r=s).slice();for(var h={name:i,value:a},p=0,m=u.length;p<m;++p)if(u[p].name===i){u[p]=h;break}p===m&&u.push(h)}f.tween=u}}function xE(t,i){var a=this._id;if(t+="",arguments.length<2){for(var r=Nn(this.node(),a).tween,u=0,f=r.length,s;u<f;++u)if((s=r[u]).name===t)return s.value;return null}return this.each((i==null?yE:vE)(a,t,i))}function Cd(t,i,a){var r=t._id;return t.each(function(){var u=Bn(this,r);(u.value||(u.value={}))[i]=a.apply(this,arguments)}),function(u){return Nn(u,r).value[i]}}function Zy(t,i){var a;return(typeof i=="number"?Ql:i instanceof qo?cg:(a=qo(i))?(i=a,cg):eE)(t,i)}function bE(t){return function(){this.removeAttribute(t)}}function SE(t){return function(){this.removeAttributeNS(t.space,t.local)}}function wE(t,i,a){var r,u=a+"",f;return function(){var s=this.getAttribute(t);return s===u?null:s===r?f:f=i(r=s,a)}}function EE(t,i,a){var r,u=a+"",f;return function(){var s=this.getAttributeNS(t.space,t.local);return s===u?null:s===r?f:f=i(r=s,a)}}function _E(t,i,a){var r,u,f;return function(){var s,h=a(this),p;return h==null?void this.removeAttribute(t):(s=this.getAttribute(t),p=h+"",s===p?null:s===r&&p===u?f:(u=p,f=i(r=s,h)))}}function AE(t,i,a){var r,u,f;return function(){var s,h=a(this),p;return h==null?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local),p=h+"",s===p?null:s===r&&p===u?f:(u=p,f=i(r=s,h)))}}function NE(t,i){var a=ic(t),r=a==="transform"?iE:Zy;return this.attrTween(t,typeof i=="function"?(a.local?AE:_E)(a,r,Cd(this,"attr."+t,i)):i==null?(a.local?SE:bE)(a):(a.local?EE:wE)(a,r,i))}function CE(t,i){return function(a){this.setAttribute(t,i.call(this,a))}}function TE(t,i){return function(a){this.setAttributeNS(t.space,t.local,i.call(this,a))}}function ME(t,i){var a,r;function u(){var f=i.apply(this,arguments);return f!==r&&(a=(r=f)&&TE(t,f)),a}return u._value=i,u}function zE(t,i){var a,r;function u(){var f=i.apply(this,arguments);return f!==r&&(a=(r=f)&&CE(t,f)),a}return u._value=i,u}function OE(t,i){var a="attr."+t;if(arguments.length<2)return(a=this.tween(a))&&a._value;if(i==null)return this.tween(a,null);if(typeof i!="function")throw new Error;var r=ic(t);return this.tween(a,(r.local?ME:zE)(r,i))}function DE(t,i){return function(){Nd(this,t).delay=+i.apply(this,arguments)}}function RE(t,i){return i=+i,function(){Nd(this,t).delay=i}}function HE(t){var i=this._id;return arguments.length?this.each((typeof t=="function"?DE:RE)(i,t)):Nn(this.node(),i).delay}function jE(t,i){return function(){Bn(this,t).duration=+i.apply(this,arguments)}}function kE(t,i){return i=+i,function(){Bn(this,t).duration=i}}function UE(t){var i=this._id;return arguments.length?this.each((typeof t=="function"?jE:kE)(i,t)):Nn(this.node(),i).duration}function LE(t,i){if(typeof i!="function")throw new Error;return function(){Bn(this,t).ease=i}}function BE(t){var i=this._id;return arguments.length?this.each(LE(i,t)):Nn(this.node(),i).ease}function YE(t,i){return function(){var a=i.apply(this,arguments);if(typeof a!="function")throw new Error;Bn(this,t).ease=a}}function VE(t){if(typeof t!="function")throw new Error;return this.each(YE(this._id,t))}function qE(t){typeof t!="function"&&(t=wy(t));for(var i=this._groups,a=i.length,r=new Array(a),u=0;u<a;++u)for(var f=i[u],s=f.length,h=r[u]=[],p,m=0;m<s;++m)(p=f[m])&&t.call(p,p.__data__,m,f)&&h.push(p);return new dl(r,this._parents,this._name,this._id)}function GE(t){if(t._id!==this._id)throw new Error;for(var i=this._groups,a=t._groups,r=i.length,u=a.length,f=Math.min(r,u),s=new Array(r),h=0;h<f;++h)for(var p=i[h],m=a[h],g=p.length,v=s[h]=new Array(g),b,E=0;E<g;++E)(b=p[E]||m[E])&&(v[E]=b);for(;h<r;++h)s[h]=i[h];return new dl(s,this._parents,this._name,this._id)}function XE(t){return(t+"").trim().split(/^|\s+/).every(function(i){var a=i.indexOf(".");return a>=0&&(i=i.slice(0,a)),!i||i==="start"})}function ZE(t,i,a){var r,u,f=XE(i)?Nd:Bn;return function(){var s=f(this,t),h=s.on;h!==r&&(u=(r=h).copy()).on(i,a),s.on=u}}function QE(t,i){var a=this._id;return arguments.length<2?Nn(this.node(),a).on.on(t):this.each(ZE(a,t,i))}function $E(t){return function(){var i=this.parentNode;for(var a in this.__transition)if(+a!==t)return;i&&i.removeChild(this)}}function KE(){return this.on("end.remove",$E(this._id))}function IE(t){var i=this._name,a=this._id;typeof t!="function"&&(t=wd(t));for(var r=this._groups,u=r.length,f=new Array(u),s=0;s<u;++s)for(var h=r[s],p=h.length,m=f[s]=new Array(p),g,v,b=0;b<p;++b)(g=h[b])&&(v=t.call(g,g.__data__,b,h))&&("__data__"in g&&(v.__data__=g.__data__),m[b]=v,oc(m[b],i,a,b,m,Nn(g,a)));return new dl(f,this._parents,i,a)}function FE(t){var i=this._name,a=this._id;typeof t!="function"&&(t=Sy(t));for(var r=this._groups,u=r.length,f=[],s=[],h=0;h<u;++h)for(var p=r[h],m=p.length,g,v=0;v<m;++v)if(g=p[v]){for(var b=t.call(g,g.__data__,v,p),E,C=Nn(g,a),N=0,T=b.length;N<T;++N)(E=b[N])&&oc(E,i,a,N,b,C);f.push(b),s.push(g)}return new dl(f,s,i,a)}var JE=Jo.prototype.constructor;function WE(){return new JE(this._groups,this._parents)}function PE(t,i){var a,r,u;return function(){var f=Na(this,t),s=(this.style.removeProperty(t),Na(this,t));return f===s?null:f===a&&s===r?u:u=i(a=f,r=s)}}function Qy(t){return function(){this.style.removeProperty(t)}}function e_(t,i,a){var r,u=a+"",f;return function(){var s=Na(this,t);return s===u?null:s===r?f:f=i(r=s,a)}}function t_(t,i,a){var r,u,f;return function(){var s=Na(this,t),h=a(this),p=h+"";return h==null&&(p=h=(this.style.removeProperty(t),Na(this,t))),s===p?null:s===r&&p===u?f:(u=p,f=i(r=s,h))}}function n_(t,i){var a,r,u,f="style."+i,s="end."+f,h;return function(){var p=Bn(this,t),m=p.on,g=p.value[f]==null?h||(h=Qy(i)):void 0;(m!==a||u!==g)&&(r=(a=m).copy()).on(s,u=g),p.on=r}}function l_(t,i,a){var r=(t+="")=="transform"?lE:Zy;return i==null?this.styleTween(t,PE(t,r)).on("end.style."+t,Qy(t)):typeof i=="function"?this.styleTween(t,t_(t,r,Cd(this,"style."+t,i))).each(n_(this._id,t)):this.styleTween(t,e_(t,r,i),a).on("end.style."+t,null)}function i_(t,i,a){return function(r){this.style.setProperty(t,i.call(this,r),a)}}function a_(t,i,a){var r,u;function f(){var s=i.apply(this,arguments);return s!==u&&(r=(u=s)&&i_(t,s,a)),r}return f._value=i,f}function o_(t,i,a){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(i==null)return this.tween(r,null);if(typeof i!="function")throw new Error;return this.tween(r,a_(t,i,a??""))}function r_(t){return function(){this.textContent=t}}function u_(t){return function(){var i=t(this);this.textContent=i??""}}function c_(t){return this.tween("text",typeof t=="function"?u_(Cd(this,"text",t)):r_(t==null?"":t+""))}function s_(t){return function(i){this.textContent=t.call(this,i)}}function f_(t){var i,a;function r(){var u=t.apply(this,arguments);return u!==a&&(i=(a=u)&&s_(u)),i}return r._value=t,r}function d_(t){var i="text";if(arguments.length<1)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,f_(t))}function h_(){for(var t=this._name,i=this._id,a=$y(),r=this._groups,u=r.length,f=0;f<u;++f)for(var s=r[f],h=s.length,p,m=0;m<h;++m)if(p=s[m]){var g=Nn(p,i);oc(p,t,a,m,s,{time:g.time+g.delay+g.duration,delay:0,duration:g.duration,ease:g.ease})}return new dl(r,this._parents,t,a)}function p_(){var t,i,a=this,r=a._id,u=a.size();return new Promise(function(f,s){var h={value:s},p={value:function(){--u===0&&f()}};a.each(function(){var m=Bn(this,r),g=m.on;g!==t&&(i=(t=g).copy(),i._.cancel.push(h),i._.interrupt.push(h),i._.end.push(p)),m.on=i}),u===0&&f()})}var m_=0;function dl(t,i,a,r){this._groups=t,this._parents=i,this._name=a,this._id=r}function $y(){return++m_}var ul=Jo.prototype;dl.prototype={constructor:dl,select:IE,selectAll:FE,selectChild:ul.selectChild,selectChildren:ul.selectChildren,filter:qE,merge:GE,selection:WE,transition:h_,call:ul.call,nodes:ul.nodes,node:ul.node,size:ul.size,empty:ul.empty,each:ul.each,on:QE,attr:NE,attrTween:OE,style:l_,styleTween:o_,text:c_,textTween:d_,remove:KE,tween:xE,delay:HE,duration:UE,ease:BE,easeVarying:VE,end:p_,[Symbol.iterator]:ul[Symbol.iterator]};function g_(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var y_={time:null,delay:0,duration:250,ease:g_};function v_(t,i){for(var a;!(a=t.__transition)||!(a=a[i]);)if(!(t=t.parentNode))throw new Error(`transition ${i} not found`);return a}function x_(t){var i,a;t instanceof dl?(i=t._id,t=t._name):(i=$y(),(a=y_).time=Ad(),t=t==null?null:t+"");for(var r=this._groups,u=r.length,f=0;f<u;++f)for(var s=r[f],h=s.length,p,m=0;m<h;++m)(p=s[m])&&oc(p,t,i,m,s,a||v_(p,i));return new dl(r,this._parents,t,i)}Jo.prototype.interrupt=gE;Jo.prototype.transition=x_;const Tu=t=>()=>t;function b_(t,{sourceEvent:i,target:a,transform:r,dispatch:u}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:i,enumerable:!0,configurable:!0},target:{value:a,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:u}})}function sl(t,i,a){this.k=t,this.x=i,this.y=a}sl.prototype={constructor:sl,scale:function(t){return t===1?this:new sl(this.k*t,this.x,this.y)},translate:function(t,i){return t===0&i===0?this:new sl(this.k,this.x+this.k*t,this.y+this.k*i)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Il=new sl(1,0,0);sl.prototype;function Lf(t){t.stopImmediatePropagation()}function zo(t){t.preventDefault(),t.stopImmediatePropagation()}function S_(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function w_(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function gg(){return this.__zoom||Il}function E_(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function __(){return navigator.maxTouchPoints||"ontouchstart"in this}function A_(t,i,a){var r=t.invertX(i[0][0])-a[0][0],u=t.invertX(i[1][0])-a[1][0],f=t.invertY(i[0][1])-a[0][1],s=t.invertY(i[1][1])-a[1][1];return t.translate(u>r?(r+u)/2:Math.min(0,r)||Math.max(0,u),s>f?(f+s)/2:Math.min(0,f)||Math.max(0,s))}function N_(){var t=S_,i=w_,a=A_,r=E_,u=__,f=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],h=250,p=uE,m=lc("start","zoom","end"),g,v,b,E=500,C=150,N=0,T=10;function M(x){x.property("__zoom",gg).on("wheel.zoom",B,{passive:!1}).on("mousedown.zoom",ee).on("dblclick.zoom",oe).filter(u).on("touchstart.zoom",re).on("touchmove.zoom",ue).on("touchend.zoom touchcancel.zoom",ie).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}M.transform=function(x,H,w,R){var X=x.selection?x.selection():x;X.property("__zoom",gg),x!==X?I(x,H,w,R):X.interrupt().each(function(){G(this,arguments).event(R).start().zoom(null,typeof H=="function"?H.apply(this,arguments):H).end()})},M.scaleBy=function(x,H,w,R){M.scaleTo(x,function(){var X=this.__zoom.k,L=typeof H=="function"?H.apply(this,arguments):H;return X*L},w,R)},M.scaleTo=function(x,H,w,R){M.transform(x,function(){var X=i.apply(this,arguments),L=this.__zoom,Y=w==null?j(X):typeof w=="function"?w.apply(this,arguments):w,_=L.invert(Y),U=typeof H=="function"?H.apply(this,arguments):H;return a(q(D(L,U),Y,_),X,s)},w,R)},M.translateBy=function(x,H,w,R){M.transform(x,function(){return a(this.__zoom.translate(typeof H=="function"?H.apply(this,arguments):H,typeof w=="function"?w.apply(this,arguments):w),i.apply(this,arguments),s)},null,R)},M.translateTo=function(x,H,w,R,X){M.transform(x,function(){var L=i.apply(this,arguments),Y=this.__zoom,_=R==null?j(L):typeof R=="function"?R.apply(this,arguments):R;return a(Il.translate(_[0],_[1]).scale(Y.k).translate(typeof H=="function"?-H.apply(this,arguments):-H,typeof w=="function"?-w.apply(this,arguments):-w),L,s)},R,X)};function D(x,H){return H=Math.max(f[0],Math.min(f[1],H)),H===x.k?x:new sl(H,x.x,x.y)}function q(x,H,w){var R=H[0]-w[0]*x.k,X=H[1]-w[1]*x.k;return R===x.x&&X===x.y?x:new sl(x.k,R,X)}function j(x){return[(+x[0][0]+ +x[1][0])/2,(+x[0][1]+ +x[1][1])/2]}function I(x,H,w,R){x.on("start.zoom",function(){G(this,arguments).event(R).start()}).on("interrupt.zoom end.zoom",function(){G(this,arguments).event(R).end()}).tween("zoom",function(){var X=this,L=arguments,Y=G(X,L).event(R),_=i.apply(X,L),U=w==null?j(_):typeof w=="function"?w.apply(X,L):w,F=Math.max(_[1][0]-_[0][0],_[1][1]-_[0][1]),P=X.__zoom,ae=typeof H=="function"?H.apply(X,L):H,ce=p(P.invert(U).concat(F/P.k),ae.invert(U).concat(F/ae.k));return function(fe){if(fe===1)fe=ae;else{var be=ce(fe),de=F/be[2];fe=new sl(de,U[0]-be[0]*de,U[1]-be[1]*de)}Y.zoom(null,fe)}})}function G(x,H,w){return!w&&x.__zooming||new $(x,H)}function $(x,H){this.that=x,this.args=H,this.active=0,this.sourceEvent=null,this.extent=i.apply(x,H),this.taps=0}$.prototype={event:function(x){return x&&(this.sourceEvent=x),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(x,H){return this.mouse&&x!=="mouse"&&(this.mouse[1]=H.invert(this.mouse[0])),this.touch0&&x!=="touch"&&(this.touch0[1]=H.invert(this.touch0[0])),this.touch1&&x!=="touch"&&(this.touch1[1]=H.invert(this.touch1[0])),this.that.__zoom=H,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(x){var H=vn(this.that).datum();m.call(x,this.that,new b_(x,{sourceEvent:this.sourceEvent,target:M,transform:this.that.__zoom,dispatch:m}),H)}};function B(x,...H){if(!t.apply(this,arguments))return;var w=G(this,H).event(x),R=this.__zoom,X=Math.max(f[0],Math.min(f[1],R.k*Math.pow(2,r.apply(this,arguments)))),L=kn(x);if(w.wheel)(w.mouse[0][0]!==L[0]||w.mouse[0][1]!==L[1])&&(w.mouse[1]=R.invert(w.mouse[0]=L)),clearTimeout(w.wheel);else{if(R.k===X)return;w.mouse=[L,R.invert(L)],Bu(this),w.start()}zo(x),w.wheel=setTimeout(Y,C),w.zoom("mouse",a(q(D(R,X),w.mouse[0],w.mouse[1]),w.extent,s));function Y(){w.wheel=null,w.end()}}function ee(x,...H){if(b||!t.apply(this,arguments))return;var w=x.currentTarget,R=G(this,H,!0).event(x),X=vn(x.view).on("mousemove.zoom",U,!0).on("mouseup.zoom",F,!0),L=kn(x,w),Y=x.clientX,_=x.clientY;Dy(x.view),Lf(x),R.mouse=[L,this.__zoom.invert(L)],Bu(this),R.start();function U(P){if(zo(P),!R.moved){var ae=P.clientX-Y,ce=P.clientY-_;R.moved=ae*ae+ce*ce>N}R.event(P).zoom("mouse",a(q(R.that.__zoom,R.mouse[0]=kn(P,w),R.mouse[1]),R.extent,s))}function F(P){X.on("mousemove.zoom mouseup.zoom",null),Ry(P.view,R.moved),zo(P),R.event(P).end()}}function oe(x,...H){if(t.apply(this,arguments)){var w=this.__zoom,R=kn(x.changedTouches?x.changedTouches[0]:x,this),X=w.invert(R),L=w.k*(x.shiftKey?.5:2),Y=a(q(D(w,L),R,X),i.apply(this,H),s);zo(x),h>0?vn(this).transition().duration(h).call(I,Y,R,x):vn(this).call(M.transform,Y,R,x)}}function re(x,...H){if(t.apply(this,arguments)){var w=x.touches,R=w.length,X=G(this,H,x.changedTouches.length===R).event(x),L,Y,_,U;for(Lf(x),Y=0;Y<R;++Y)_=w[Y],U=kn(_,this),U=[U,this.__zoom.invert(U),_.identifier],X.touch0?!X.touch1&&X.touch0[2]!==U[2]&&(X.touch1=U,X.taps=0):(X.touch0=U,L=!0,X.taps=1+!!g);g&&(g=clearTimeout(g)),L&&(X.taps<2&&(v=U[0],g=setTimeout(function(){g=null},E)),Bu(this),X.start())}}function ue(x,...H){if(this.__zooming){var w=G(this,H).event(x),R=x.changedTouches,X=R.length,L,Y,_,U;for(zo(x),L=0;L<X;++L)Y=R[L],_=kn(Y,this),w.touch0&&w.touch0[2]===Y.identifier?w.touch0[0]=_:w.touch1&&w.touch1[2]===Y.identifier&&(w.touch1[0]=_);if(Y=w.that.__zoom,w.touch1){var F=w.touch0[0],P=w.touch0[1],ae=w.touch1[0],ce=w.touch1[1],fe=(fe=ae[0]-F[0])*fe+(fe=ae[1]-F[1])*fe,be=(be=ce[0]-P[0])*be+(be=ce[1]-P[1])*be;Y=D(Y,Math.sqrt(fe/be)),_=[(F[0]+ae[0])/2,(F[1]+ae[1])/2],U=[(P[0]+ce[0])/2,(P[1]+ce[1])/2]}else if(w.touch0)_=w.touch0[0],U=w.touch0[1];else return;w.zoom("touch",a(q(Y,_,U),w.extent,s))}}function ie(x,...H){if(this.__zooming){var w=G(this,H).event(x),R=x.changedTouches,X=R.length,L,Y;for(Lf(x),b&&clearTimeout(b),b=setTimeout(function(){b=null},E),L=0;L<X;++L)Y=R[L],w.touch0&&w.touch0[2]===Y.identifier?delete w.touch0:w.touch1&&w.touch1[2]===Y.identifier&&delete w.touch1;if(w.touch1&&!w.touch0&&(w.touch0=w.touch1,delete w.touch1),w.touch0)w.touch0[1]=this.__zoom.invert(w.touch0[0]);else if(w.end(),w.taps===2&&(Y=kn(Y,this),Math.hypot(v[0]-Y[0],v[1]-Y[1])<T)){var _=vn(this).on("dblclick.zoom");_&&_.apply(this,arguments)}}}return M.wheelDelta=function(x){return arguments.length?(r=typeof x=="function"?x:Tu(+x),M):r},M.filter=function(x){return arguments.length?(t=typeof x=="function"?x:Tu(!!x),M):t},M.touchable=function(x){return arguments.length?(u=typeof x=="function"?x:Tu(!!x),M):u},M.extent=function(x){return arguments.length?(i=typeof x=="function"?x:Tu([[+x[0][0],+x[0][1]],[+x[1][0],+x[1][1]]]),M):i},M.scaleExtent=function(x){return arguments.length?(f[0]=+x[0],f[1]=+x[1],M):[f[0],f[1]]},M.translateExtent=function(x){return arguments.length?(s[0][0]=+x[0][0],s[1][0]=+x[1][0],s[0][1]=+x[0][1],s[1][1]=+x[1][1],M):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},M.constrain=function(x){return arguments.length?(a=x,M):a},M.duration=function(x){return arguments.length?(h=+x,M):h},M.interpolate=function(x){return arguments.length?(p=x,M):p},M.on=function(){var x=m.on.apply(m,arguments);return x===m?M:x},M.clickDistance=function(x){return arguments.length?(N=(x=+x)*x,M):Math.sqrt(N)},M.tapDistance=function(x){return arguments.length?(T=+x,M):T},M}vy();const rc=z.createContext(null),C_=rc.Provider,hl={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:t=>`Node type "${t}" 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:t=>`The old edge with id=${t} does not exist.`,error009:t=>`Marker type "${t}" doesn't exist.`,error008:(t,i)=>`Couldn't create edge for ${t?"target":"source"} handle id: "${t?i.targetHandle:i.sourceHandle}", edge id: ${i.id}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:t=>`Edge type "${t}" not found. Using fallback type "default".`,error012:t=>`Node with id "${t}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`},Ky=hl.error001();function et(t,i){const a=z.useContext(rc);if(a===null)throw new Error(Ky);return xy(a,t,i)}const xt=()=>{const t=z.useContext(rc);if(t===null)throw new Error(Ky);return z.useMemo(()=>({getState:t.getState,setState:t.setState,subscribe:t.subscribe,destroy:t.destroy}),[t])},T_=t=>t.userSelectionActive?"none":"all";function Iy({position:t,children:i,className:a,style:r,...u}){const f=et(T_),s=`${t}`.split("-");return W.createElement("div",{className:Dt(["react-flow__panel",a,...s]),style:{...r,pointerEvents:f},...u},i)}function M_({proOptions:t,position:i="bottom-right"}){return t?.hideAttribution?null:W.createElement(Iy,{position:i,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://reactflow.dev/pro"},W.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution"},"React Flow"))}const z_=({x:t,y:i,label:a,labelStyle:r={},labelShowBg:u=!0,labelBgStyle:f={},labelBgPadding:s=[2,4],labelBgBorderRadius:h=2,children:p,className:m,...g})=>{const v=z.useRef(null),[b,E]=z.useState({x:0,y:0,width:0,height:0}),C=Dt(["react-flow__edge-textwrapper",m]);return z.useEffect(()=>{if(v.current){const N=v.current.getBBox();E({x:N.x,y:N.y,width:N.width,height:N.height})}},[a]),typeof a>"u"||!a?null:W.createElement("g",{transform:`translate(${t-b.width/2} ${i-b.height/2})`,className:C,visibility:b.width?"visible":"hidden",...g},u&&W.createElement("rect",{width:b.width+2*s[0],x:-s[0],y:-s[1],height:b.height+2*s[1],className:"react-flow__edge-textbg",style:f,rx:h,ry:h}),W.createElement("text",{className:"react-flow__edge-text",y:b.height/2,dy:"0.3em",ref:v,style:r},a),p)};var O_=z.memo(z_);const Td=t=>({width:t.offsetWidth,height:t.offsetHeight}),Wl=(t,i=0,a=1)=>Math.min(Math.max(t,i),a),Md=(t={x:0,y:0},i)=>({x:Wl(t.x,i[0][0],i[1][0]),y:Wl(t.y,i[0][1],i[1][1])}),yg=(t,i,a)=>t<i?Wl(Math.abs(t-i),1,50)/50:t>a?-Wl(Math.abs(t-a),1,50)/50:0,Fy=(t,i)=>{const a=yg(t.x,35,i.width-35)*20,r=yg(t.y,35,i.height-35)*20;return[a,r]},Jy=t=>t.getRootNode?.()||window?.document,D_=(t,i)=>({x:Math.min(t.x,i.x),y:Math.min(t.y,i.y),x2:Math.max(t.x2,i.x2),y2:Math.max(t.y2,i.y2)}),zd=({x:t,y:i,width:a,height:r})=>({x:t,y:i,x2:t+a,y2:i+r}),R_=({x:t,y:i,x2:a,y2:r})=>({x:t,y:i,width:a-t,height:r-i}),vg=t=>({...t.positionAbsolute||{x:0,y:0},width:t.width||0,height:t.height||0}),ld=(t,i)=>{const a=Math.max(0,Math.min(t.x+t.width,i.x+i.width)-Math.max(t.x,i.x)),r=Math.max(0,Math.min(t.y+t.height,i.y+i.height)-Math.max(t.y,i.y));return Math.ceil(a*r)},H_=t=>xn(t.width)&&xn(t.height)&&xn(t.x)&&xn(t.y),xn=t=>!isNaN(t)&&isFinite(t),lt=Symbol.for("internals"),Wy=["Enter"," ","Escape"],j_=(t,i)=>{},k_=t=>"nativeEvent"in t;function id(t){const a=(k_(t)?t.nativeEvent:t).composedPath?.()?.[0]||t.target;return["INPUT","SELECT","TEXTAREA"].includes(a?.nodeName)||a?.hasAttribute("contenteditable")||!!a?.closest(".nokey")}const Py=t=>"clientX"in t,Fl=(t,i)=>{const a=Py(t),r=a?t.clientX:t.touches?.[0].clientX,u=a?t.clientY:t.touches?.[0].clientY;return{x:r-(i?.left??0),y:u-(i?.top??0)}},Qu=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0,Po=({id:t,path:i,labelX:a,labelY:r,label:u,labelStyle:f,labelShowBg:s,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:m,style:g,markerEnd:v,markerStart:b,interactionWidth:E=20})=>W.createElement(W.Fragment,null,W.createElement("path",{id:t,style:g,d:i,fill:"none",className:"react-flow__edge-path",markerEnd:v,markerStart:b}),E&&W.createElement("path",{d:i,fill:"none",strokeOpacity:0,strokeWidth:E,className:"react-flow__edge-interaction"}),u&&xn(a)&&xn(r)?W.createElement(O_,{x:a,y:r,label:u,labelStyle:f,labelShowBg:s,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:m}):null);Po.displayName="BaseEdge";function Oo(t,i,a){return a===void 0?a:r=>{const u=i().edges.find(f=>f.id===t);u&&a(r,{...u})}}function ev({sourceX:t,sourceY:i,targetX:a,targetY:r}){const u=Math.abs(a-t)/2,f=a<t?a+u:a-u,s=Math.abs(r-i)/2,h=r<i?r+s:r-s;return[f,h,u,s]}function tv({sourceX:t,sourceY:i,targetX:a,targetY:r,sourceControlX:u,sourceControlY:f,targetControlX:s,targetControlY:h}){const p=t*.125+u*.375+s*.375+a*.125,m=i*.125+f*.375+h*.375+r*.125,g=Math.abs(p-t),v=Math.abs(m-i);return[p,m,g,v]}var Mi;(function(t){t.Strict="strict",t.Loose="loose"})(Mi||(Mi={}));var Ai;(function(t){t.Free="free",t.Vertical="vertical",t.Horizontal="horizontal"})(Ai||(Ai={}));var Xo;(function(t){t.Partial="partial",t.Full="full"})(Xo||(Xo={}));var Kl;(function(t){t.Bezier="default",t.Straight="straight",t.Step="step",t.SmoothStep="smoothstep",t.SimpleBezier="simplebezier"})(Kl||(Kl={}));var $u;(function(t){t.Arrow="arrow",t.ArrowClosed="arrowclosed"})($u||($u={}));var ve;(function(t){t.Left="left",t.Top="top",t.Right="right",t.Bottom="bottom"})(ve||(ve={}));function xg({pos:t,x1:i,y1:a,x2:r,y2:u}){return t===ve.Left||t===ve.Right?[.5*(i+r),a]:[i,.5*(a+u)]}function nv({sourceX:t,sourceY:i,sourcePosition:a=ve.Bottom,targetX:r,targetY:u,targetPosition:f=ve.Top}){const[s,h]=xg({pos:a,x1:t,y1:i,x2:r,y2:u}),[p,m]=xg({pos:f,x1:r,y1:u,x2:t,y2:i}),[g,v,b,E]=tv({sourceX:t,sourceY:i,targetX:r,targetY:u,sourceControlX:s,sourceControlY:h,targetControlX:p,targetControlY:m});return[`M${t},${i} C${s},${h} ${p},${m} ${r},${u}`,g,v,b,E]}const Od=z.memo(({sourceX:t,sourceY:i,targetX:a,targetY:r,sourcePosition:u=ve.Bottom,targetPosition:f=ve.Top,label:s,labelStyle:h,labelShowBg:p,labelBgStyle:m,labelBgPadding:g,labelBgBorderRadius:v,style:b,markerEnd:E,markerStart:C,interactionWidth:N})=>{const[T,M,D]=nv({sourceX:t,sourceY:i,sourcePosition:u,targetX:a,targetY:r,targetPosition:f});return W.createElement(Po,{path:T,labelX:M,labelY:D,label:s,labelStyle:h,labelShowBg:p,labelBgStyle:m,labelBgPadding:g,labelBgBorderRadius:v,style:b,markerEnd:E,markerStart:C,interactionWidth:N})});Od.displayName="SimpleBezierEdge";const bg={[ve.Left]:{x:-1,y:0},[ve.Right]:{x:1,y:0},[ve.Top]:{x:0,y:-1},[ve.Bottom]:{x:0,y:1}},U_=({source:t,sourcePosition:i=ve.Bottom,target:a})=>i===ve.Left||i===ve.Right?t.x<a.x?{x:1,y:0}:{x:-1,y:0}:t.y<a.y?{x:0,y:1}:{x:0,y:-1},Sg=(t,i)=>Math.sqrt(Math.pow(i.x-t.x,2)+Math.pow(i.y-t.y,2));function L_({source:t,sourcePosition:i=ve.Bottom,target:a,targetPosition:r=ve.Top,center:u,offset:f}){const s=bg[i],h=bg[r],p={x:t.x+s.x*f,y:t.y+s.y*f},m={x:a.x+h.x*f,y:a.y+h.y*f},g=U_({source:p,sourcePosition:i,target:m}),v=g.x!==0?"x":"y",b=g[v];let E=[],C,N;const T={x:0,y:0},M={x:0,y:0},[D,q,j,I]=ev({sourceX:t.x,sourceY:t.y,targetX:a.x,targetY:a.y});if(s[v]*h[v]===-1){C=u.x??D,N=u.y??q;const $=[{x:C,y:p.y},{x:C,y:m.y}],B=[{x:p.x,y:N},{x:m.x,y:N}];s[v]===b?E=v==="x"?$:B:E=v==="x"?B:$}else{const $=[{x:p.x,y:m.y}],B=[{x:m.x,y:p.y}];if(v==="x"?E=s.x===b?B:$:E=s.y===b?$:B,i===r){const ie=Math.abs(t[v]-a[v]);if(ie<=f){const x=Math.min(f-1,f-ie);s[v]===b?T[v]=(p[v]>t[v]?-1:1)*x:M[v]=(m[v]>a[v]?-1:1)*x}}if(i!==r){const ie=v==="x"?"y":"x",x=s[v]===h[ie],H=p[ie]>m[ie],w=p[ie]<m[ie];(s[v]===1&&(!x&&H||x&&w)||s[v]!==1&&(!x&&w||x&&H))&&(E=v==="x"?$:B)}const ee={x:p.x+T.x,y:p.y+T.y},oe={x:m.x+M.x,y:m.y+M.y},re=Math.max(Math.abs(ee.x-E[0].x),Math.abs(oe.x-E[0].x)),ue=Math.max(Math.abs(ee.y-E[0].y),Math.abs(oe.y-E[0].y));re>=ue?(C=(ee.x+oe.x)/2,N=E[0].y):(C=E[0].x,N=(ee.y+oe.y)/2)}return[[t,{x:p.x+T.x,y:p.y+T.y},...E,{x:m.x+M.x,y:m.y+M.y},a],C,N,j,I]}function B_(t,i,a,r){const u=Math.min(Sg(t,i)/2,Sg(i,a)/2,r),{x:f,y:s}=i;if(t.x===f&&f===a.x||t.y===s&&s===a.y)return`L${f} ${s}`;if(t.y===s){const m=t.x<a.x?-1:1,g=t.y<a.y?1:-1;return`L ${f+u*m},${s}Q ${f},${s} ${f},${s+u*g}`}const h=t.x<a.x?1:-1,p=t.y<a.y?-1:1;return`L ${f},${s+u*p}Q ${f},${s} ${f+u*h},${s}`}function ad({sourceX:t,sourceY:i,sourcePosition:a=ve.Bottom,targetX:r,targetY:u,targetPosition:f=ve.Top,borderRadius:s=5,centerX:h,centerY:p,offset:m=20}){const[g,v,b,E,C]=L_({source:{x:t,y:i},sourcePosition:a,target:{x:r,y:u},targetPosition:f,center:{x:h,y:p},offset:m});return[g.reduce((T,M,D)=>{let q="";return D>0&&D<g.length-1?q=B_(g[D-1],M,g[D+1],s):q=`${D===0?"M":"L"}${M.x} ${M.y}`,T+=q,T},""),v,b,E,C]}const uc=z.memo(({sourceX:t,sourceY:i,targetX:a,targetY:r,label:u,labelStyle:f,labelShowBg:s,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:m,style:g,sourcePosition:v=ve.Bottom,targetPosition:b=ve.Top,markerEnd:E,markerStart:C,pathOptions:N,interactionWidth:T})=>{const[M,D,q]=ad({sourceX:t,sourceY:i,sourcePosition:v,targetX:a,targetY:r,targetPosition:b,borderRadius:N?.borderRadius,offset:N?.offset});return W.createElement(Po,{path:M,labelX:D,labelY:q,label:u,labelStyle:f,labelShowBg:s,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:m,style:g,markerEnd:E,markerStart:C,interactionWidth:T})});uc.displayName="SmoothStepEdge";const Dd=z.memo(t=>W.createElement(uc,{...t,pathOptions:z.useMemo(()=>({borderRadius:0,offset:t.pathOptions?.offset}),[t.pathOptions?.offset])}));Dd.displayName="StepEdge";function Y_({sourceX:t,sourceY:i,targetX:a,targetY:r}){const[u,f,s,h]=ev({sourceX:t,sourceY:i,targetX:a,targetY:r});return[`M ${t},${i}L ${a},${r}`,u,f,s,h]}const Rd=z.memo(({sourceX:t,sourceY:i,targetX:a,targetY:r,label:u,labelStyle:f,labelShowBg:s,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:m,style:g,markerEnd:v,markerStart:b,interactionWidth:E})=>{const[C,N,T]=Y_({sourceX:t,sourceY:i,targetX:a,targetY:r});return W.createElement(Po,{path:C,labelX:N,labelY:T,label:u,labelStyle:f,labelShowBg:s,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:m,style:g,markerEnd:v,markerStart:b,interactionWidth:E})});Rd.displayName="StraightEdge";function Mu(t,i){return t>=0?.5*t:i*25*Math.sqrt(-t)}function wg({pos:t,x1:i,y1:a,x2:r,y2:u,c:f}){switch(t){case ve.Left:return[i-Mu(i-r,f),a];case ve.Right:return[i+Mu(r-i,f),a];case ve.Top:return[i,a-Mu(a-u,f)];case ve.Bottom:return[i,a+Mu(u-a,f)]}}function lv({sourceX:t,sourceY:i,sourcePosition:a=ve.Bottom,targetX:r,targetY:u,targetPosition:f=ve.Top,curvature:s=.25}){const[h,p]=wg({pos:a,x1:t,y1:i,x2:r,y2:u,c:s}),[m,g]=wg({pos:f,x1:r,y1:u,x2:t,y2:i,c:s}),[v,b,E,C]=tv({sourceX:t,sourceY:i,targetX:r,targetY:u,sourceControlX:h,sourceControlY:p,targetControlX:m,targetControlY:g});return[`M${t},${i} C${h},${p} ${m},${g} ${r},${u}`,v,b,E,C]}const Ku=z.memo(({sourceX:t,sourceY:i,targetX:a,targetY:r,sourcePosition:u=ve.Bottom,targetPosition:f=ve.Top,label:s,labelStyle:h,labelShowBg:p,labelBgStyle:m,labelBgPadding:g,labelBgBorderRadius:v,style:b,markerEnd:E,markerStart:C,pathOptions:N,interactionWidth:T})=>{const[M,D,q]=lv({sourceX:t,sourceY:i,sourcePosition:u,targetX:a,targetY:r,targetPosition:f,curvature:N?.curvature});return W.createElement(Po,{path:M,labelX:D,labelY:q,label:s,labelStyle:h,labelShowBg:p,labelBgStyle:m,labelBgPadding:g,labelBgBorderRadius:v,style:b,markerEnd:E,markerStart:C,interactionWidth:T})});Ku.displayName="BezierEdge";const Hd=z.createContext(null),V_=Hd.Provider;Hd.Consumer;const iv=()=>z.useContext(Hd),q_=t=>"id"in t&&"source"in t&&"target"in t,G_=({source:t,sourceHandle:i,target:a,targetHandle:r})=>`reactflow__edge-${t}${i||""}-${a}${r||""}`,od=(t,i)=>typeof t>"u"?"":typeof t=="string"?t:`${i?`${i}__`:""}${Object.keys(t).sort().map(r=>`${r}=${t[r]}`).join("&")}`,X_=(t,i)=>i.some(a=>a.source===t.source&&a.target===t.target&&(a.sourceHandle===t.sourceHandle||!a.sourceHandle&&!t.sourceHandle)&&(a.targetHandle===t.targetHandle||!a.targetHandle&&!t.targetHandle)),Z_=(t,i)=>{if(!t.source||!t.target)return i;let a;return q_(t)?a={...t}:a={...t,id:G_(t)},X_(a,i)?i:i.concat(a)},rd=({x:t,y:i},[a,r,u],f,[s,h])=>{const p={x:(t-a)/u,y:(i-r)/u};return f?{x:s*Math.round(p.x/s),y:h*Math.round(p.y/h)}:p},av=({x:t,y:i},[a,r,u])=>({x:t*u+a,y:i*u+r}),Ea=(t,i=[0,0])=>{if(!t)return{x:0,y:0,positionAbsolute:{x:0,y:0}};const a=(t.width??0)*i[0],r=(t.height??0)*i[1],u={x:t.position.x-a,y:t.position.y-r};return{...u,positionAbsolute:t.positionAbsolute?{x:t.positionAbsolute.x-a,y:t.positionAbsolute.y-r}:u}},jd=(t,i=[0,0])=>{if(t.length===0)return{x:0,y:0,width:0,height:0};const a=t.reduce((r,u)=>{const{x:f,y:s}=Ea(u,i).positionAbsolute;return D_(r,zd({x:f,y:s,width:u.width||0,height:u.height||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return R_(a)},ov=(t,i,[a,r,u]=[0,0,1],f=!1,s=!1,h=[0,0])=>{const p={x:(i.x-a)/u,y:(i.y-r)/u,width:i.width/u,height:i.height/u},m=[];return t.forEach(g=>{const{width:v,height:b,selectable:E=!0,hidden:C=!1}=g;if(s&&!E||C)return!1;const{positionAbsolute:N}=Ea(g,h),T={x:N.x,y:N.y,width:v||0,height:b||0},M=ld(p,T),D=typeof v>"u"||typeof b>"u"||v===null||b===null,q=f&&M>0,j=(v||0)*(b||0);(D||q||M>=j||g.dragging)&&m.push(g)}),m},rv=(t,i)=>{const a=t.map(r=>r.id);return i.filter(r=>a.includes(r.source)||a.includes(r.target))},uv=(t,i,a,r,u,f=.1)=>{const s=i/(t.width*(1+f)),h=a/(t.height*(1+f)),p=Math.min(s,h),m=Wl(p,r,u),g=t.x+t.width/2,v=t.y+t.height/2,b=i/2-g*m,E=a/2-v*m;return{x:b,y:E,zoom:m}},Ei=(t,i=0)=>t.transition().duration(i);function Eg(t,i,a,r){return(i[a]||[]).reduce((u,f)=>(`${t.id}-${f.id}-${a}`!==r&&u.push({id:f.id||null,type:a,nodeId:t.id,x:(t.positionAbsolute?.x??0)+f.x+f.width/2,y:(t.positionAbsolute?.y??0)+f.y+f.height/2}),u),[])}function Q_(t,i,a,r,u,f){const{x:s,y:h}=Fl(t),m=i.elementsFromPoint(s,h).find(C=>C.classList.contains("react-flow__handle"));if(m){const C=m.getAttribute("data-nodeid");if(C){const N=kd(void 0,m),T=m.getAttribute("data-handleid"),M=f({nodeId:C,id:T,type:N});if(M){const D=u.find(q=>q.nodeId===C&&q.type===N&&q.id===T);return{handle:{id:T,type:N,nodeId:C,x:D?.x||a.x,y:D?.y||a.y},validHandleResult:M}}}}let g=[],v=1/0;if(u.forEach(C=>{const N=Math.sqrt((C.x-a.x)**2+(C.y-a.y)**2);if(N<=r){const T=f(C);N<=v&&(N<v?g=[{handle:C,validHandleResult:T}]:N===v&&g.push({handle:C,validHandleResult:T}),v=N)}}),!g.length)return{handle:null,validHandleResult:cv()};if(g.length===1)return g[0];const b=g.some(({validHandleResult:C})=>C.isValid),E=g.some(({handle:C})=>C.type==="target");return g.find(({handle:C,validHandleResult:N})=>E?C.type==="target":b?N.isValid:!0)||g[0]}const $_={source:null,target:null,sourceHandle:null,targetHandle:null},cv=()=>({handleDomNode:null,isValid:!1,connection:$_,endHandle:null});function sv(t,i,a,r,u,f,s){const h=u==="target",p=s.querySelector(`.react-flow__handle[data-id="${t?.nodeId}-${t?.id}-${t?.type}"]`),m={...cv(),handleDomNode:p};if(p){const g=kd(void 0,p),v=p.getAttribute("data-nodeid"),b=p.getAttribute("data-handleid"),E=p.classList.contains("connectable"),C=p.classList.contains("connectableend"),N={source:h?v:a,sourceHandle:h?b:r,target:h?a:v,targetHandle:h?r:b};m.connection=N,E&&C&&(i===Mi.Strict?h&&g==="source"||!h&&g==="target":v!==a||b!==r)&&(m.endHandle={nodeId:v,handleId:b,type:g},m.isValid=f(N))}return m}function K_({nodes:t,nodeId:i,handleId:a,handleType:r}){return t.reduce((u,f)=>{if(f[lt]){const{handleBounds:s}=f[lt];let h=[],p=[];s&&(h=Eg(f,s,"source",`${i}-${a}-${r}`),p=Eg(f,s,"target",`${i}-${a}-${r}`)),u.push(...h,...p)}return u},[])}function kd(t,i){return t||(i?.classList.contains("target")?"target":i?.classList.contains("source")?"source":null)}function Bf(t){t?.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function I_(t,i){let a=null;return i?a="valid":t&&!i&&(a="invalid"),a}function fv({event:t,handleId:i,nodeId:a,onConnect:r,isTarget:u,getState:f,setState:s,isValidConnection:h,edgeUpdaterType:p,onReconnectEnd:m}){const g=Jy(t.target),{connectionMode:v,domNode:b,autoPanOnConnect:E,connectionRadius:C,onConnectStart:N,panBy:T,getNodes:M,cancelConnection:D}=f();let q=0,j;const{x:I,y:G}=Fl(t),$=g?.elementFromPoint(I,G),B=kd(p,$),ee=b?.getBoundingClientRect();if(!ee||!B)return;let oe,re=Fl(t,ee),ue=!1,ie=null,x=!1,H=null;const w=K_({nodes:M(),nodeId:a,handleId:i,handleType:B}),R=()=>{if(!E)return;const[Y,_]=Fy(re,ee);T({x:Y,y:_}),q=requestAnimationFrame(R)};s({connectionPosition:re,connectionStatus:null,connectionNodeId:a,connectionHandleId:i,connectionHandleType:B,connectionStartHandle:{nodeId:a,handleId:i,type:B},connectionEndHandle:null}),N?.(t,{nodeId:a,handleId:i,handleType:B});function X(Y){const{transform:_}=f();re=Fl(Y,ee);const{handle:U,validHandleResult:F}=Q_(Y,g,rd(re,_,!1,[1,1]),C,w,P=>sv(P,v,a,i,u?"target":"source",h,g));if(j=U,ue||(R(),ue=!0),H=F.handleDomNode,ie=F.connection,x=F.isValid,s({connectionPosition:j&&x?av({x:j.x,y:j.y},_):re,connectionStatus:I_(!!j,x),connectionEndHandle:F.endHandle}),!j&&!x&&!H)return Bf(oe);ie.source!==ie.target&&H&&(Bf(oe),oe=H,H.classList.add("connecting","react-flow__handle-connecting"),H.classList.toggle("valid",x),H.classList.toggle("react-flow__handle-valid",x))}function L(Y){(j||H)&&ie&&x&&r?.(ie),f().onConnectEnd?.(Y),p&&m?.(Y),Bf(oe),D(),cancelAnimationFrame(q),ue=!1,x=!1,ie=null,H=null,g.removeEventListener("mousemove",X),g.removeEventListener("mouseup",L),g.removeEventListener("touchmove",X),g.removeEventListener("touchend",L)}g.addEventListener("mousemove",X),g.addEventListener("mouseup",L),g.addEventListener("touchmove",X),g.addEventListener("touchend",L)}const _g=()=>!0,F_=t=>({connectionStartHandle:t.connectionStartHandle,connectOnClick:t.connectOnClick,noPanClassName:t.noPanClassName}),J_=(t,i,a)=>r=>{const{connectionStartHandle:u,connectionEndHandle:f,connectionClickStartHandle:s}=r;return{connecting:u?.nodeId===t&&u?.handleId===i&&u?.type===a||f?.nodeId===t&&f?.handleId===i&&f?.type===a,clickConnecting:s?.nodeId===t&&s?.handleId===i&&s?.type===a}},dv=z.forwardRef(({type:t="source",position:i=ve.Top,isValidConnection:a,isConnectable:r=!0,isConnectableStart:u=!0,isConnectableEnd:f=!0,id:s,onConnect:h,children:p,className:m,onMouseDown:g,onTouchStart:v,...b},E)=>{const C=s||null,N=t==="target",T=xt(),M=iv(),{connectOnClick:D,noPanClassName:q}=et(F_,Kt),{connecting:j,clickConnecting:I}=et(J_(M,C,t),Kt);M||T.getState().onError?.("010",hl.error010());const G=ee=>{const{defaultEdgeOptions:oe,onConnect:re,hasDefaultEdges:ue}=T.getState(),ie={...oe,...ee};if(ue){const{edges:x,setEdges:H}=T.getState();H(Z_(ie,x))}re?.(ie),h?.(ie)},$=ee=>{if(!M)return;const oe=Py(ee);u&&(oe&&ee.button===0||!oe)&&fv({event:ee,handleId:C,nodeId:M,onConnect:G,isTarget:N,getState:T.getState,setState:T.setState,isValidConnection:a||T.getState().isValidConnection||_g}),oe?g?.(ee):v?.(ee)},B=ee=>{const{onClickConnectStart:oe,onClickConnectEnd:re,connectionClickStartHandle:ue,connectionMode:ie,isValidConnection:x}=T.getState();if(!M||!ue&&!u)return;if(!ue){oe?.(ee,{nodeId:M,handleId:C,handleType:t}),T.setState({connectionClickStartHandle:{nodeId:M,type:t,handleId:C}});return}const H=Jy(ee.target),w=a||x||_g,{connection:R,isValid:X}=sv({nodeId:M,id:C,type:t},ie,ue.nodeId,ue.handleId||null,ue.type,w,H);X&&G(R),re?.(ee),T.setState({connectionClickStartHandle:null})};return W.createElement("div",{"data-handleid":C,"data-nodeid":M,"data-handlepos":i,"data-id":`${M}-${C}-${t}`,className:Dt(["react-flow__handle",`react-flow__handle-${i}`,"nodrag",q,m,{source:!N,target:N,connectable:r,connectablestart:u,connectableend:f,connecting:I,connectionindicator:r&&(u&&!j||f&&j)}]),onMouseDown:$,onTouchStart:$,onClick:D?B:void 0,ref:E,...b},p)});dv.displayName="Handle";var Ta=z.memo(dv);const hv=({data:t,isConnectable:i,targetPosition:a=ve.Top,sourcePosition:r=ve.Bottom})=>W.createElement(W.Fragment,null,W.createElement(Ta,{type:"target",position:a,isConnectable:i}),t?.label,W.createElement(Ta,{type:"source",position:r,isConnectable:i}));hv.displayName="DefaultNode";var ud=z.memo(hv);const pv=({data:t,isConnectable:i,sourcePosition:a=ve.Bottom})=>W.createElement(W.Fragment,null,t?.label,W.createElement(Ta,{type:"source",position:a,isConnectable:i}));pv.displayName="InputNode";var mv=z.memo(pv);const gv=({data:t,isConnectable:i,targetPosition:a=ve.Top})=>W.createElement(W.Fragment,null,W.createElement(Ta,{type:"target",position:a,isConnectable:i}),t?.label);gv.displayName="OutputNode";var yv=z.memo(gv);const Ud=()=>null;Ud.displayName="GroupNode";const W_=t=>({selectedNodes:t.getNodes().filter(i=>i.selected),selectedEdges:t.edges.filter(i=>i.selected).map(i=>({...i}))}),zu=t=>t.id;function P_(t,i){return Kt(t.selectedNodes.map(zu),i.selectedNodes.map(zu))&&Kt(t.selectedEdges.map(zu),i.selectedEdges.map(zu))}const vv=z.memo(({onSelectionChange:t})=>{const i=xt(),{selectedNodes:a,selectedEdges:r}=et(W_,P_);return z.useEffect(()=>{const u={nodes:a,edges:r};t?.(u),i.getState().onSelectionChange.forEach(f=>f(u))},[a,r,t]),null});vv.displayName="SelectionListener";const eA=t=>!!t.onSelectionChange;function tA({onSelectionChange:t}){const i=et(eA);return t||i?W.createElement(vv,{onSelectionChange:t}):null}const nA=t=>({setNodes:t.setNodes,setEdges:t.setEdges,setDefaultNodesAndEdges:t.setDefaultNodesAndEdges,setMinZoom:t.setMinZoom,setMaxZoom:t.setMaxZoom,setTranslateExtent:t.setTranslateExtent,setNodeExtent:t.setNodeExtent,reset:t.reset});function fa(t,i){z.useEffect(()=>{typeof t<"u"&&i(t)},[t])}function Ce(t,i,a){z.useEffect(()=>{typeof i<"u"&&a({[t]:i})},[i])}const lA=({nodes:t,edges:i,defaultNodes:a,defaultEdges:r,onConnect:u,onConnectStart:f,onConnectEnd:s,onClickConnectStart:h,onClickConnectEnd:p,nodesDraggable:m,nodesConnectable:g,nodesFocusable:v,edgesFocusable:b,edgesUpdatable:E,elevateNodesOnSelect:C,minZoom:N,maxZoom:T,nodeExtent:M,onNodesChange:D,onEdgesChange:q,elementsSelectable:j,connectionMode:I,snapGrid:G,snapToGrid:$,translateExtent:B,connectOnClick:ee,defaultEdgeOptions:oe,fitView:re,fitViewOptions:ue,onNodesDelete:ie,onEdgesDelete:x,onNodeDrag:H,onNodeDragStart:w,onNodeDragStop:R,onSelectionDrag:X,onSelectionDragStart:L,onSelectionDragStop:Y,noPanClassName:_,nodeOrigin:U,rfId:F,autoPanOnConnect:P,autoPanOnNodeDrag:ae,onError:ce,connectionRadius:fe,isValidConnection:be,nodeDragThreshold:de})=>{const{setNodes:Ae,setEdges:Re,setDefaultNodesAndEdges:Ve,setMinZoom:Pe,setMaxZoom:Ye,setTranslateExtent:He,setNodeExtent:pt,reset:je}=et(nA,Kt),se=xt();return z.useEffect(()=>{const ke=r?.map(Bt=>({...Bt,...oe}));return Ve(a,ke),()=>{je()}},[]),Ce("defaultEdgeOptions",oe,se.setState),Ce("connectionMode",I,se.setState),Ce("onConnect",u,se.setState),Ce("onConnectStart",f,se.setState),Ce("onConnectEnd",s,se.setState),Ce("onClickConnectStart",h,se.setState),Ce("onClickConnectEnd",p,se.setState),Ce("nodesDraggable",m,se.setState),Ce("nodesConnectable",g,se.setState),Ce("nodesFocusable",v,se.setState),Ce("edgesFocusable",b,se.setState),Ce("edgesUpdatable",E,se.setState),Ce("elementsSelectable",j,se.setState),Ce("elevateNodesOnSelect",C,se.setState),Ce("snapToGrid",$,se.setState),Ce("snapGrid",G,se.setState),Ce("onNodesChange",D,se.setState),Ce("onEdgesChange",q,se.setState),Ce("connectOnClick",ee,se.setState),Ce("fitViewOnInit",re,se.setState),Ce("fitViewOnInitOptions",ue,se.setState),Ce("onNodesDelete",ie,se.setState),Ce("onEdgesDelete",x,se.setState),Ce("onNodeDrag",H,se.setState),Ce("onNodeDragStart",w,se.setState),Ce("onNodeDragStop",R,se.setState),Ce("onSelectionDrag",X,se.setState),Ce("onSelectionDragStart",L,se.setState),Ce("onSelectionDragStop",Y,se.setState),Ce("noPanClassName",_,se.setState),Ce("nodeOrigin",U,se.setState),Ce("rfId",F,se.setState),Ce("autoPanOnConnect",P,se.setState),Ce("autoPanOnNodeDrag",ae,se.setState),Ce("onError",ce,se.setState),Ce("connectionRadius",fe,se.setState),Ce("isValidConnection",be,se.setState),Ce("nodeDragThreshold",de,se.setState),fa(t,Ae),fa(i,Re),fa(N,Pe),fa(T,Ye),fa(B,He),fa(M,pt),null},Ag={display:"none"},iA={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},xv="react-flow__node-desc",bv="react-flow__edge-desc",aA="react-flow__aria-live",oA=t=>t.ariaLiveMessage;function rA({rfId:t}){const i=et(oA);return W.createElement("div",{id:`${aA}-${t}`,"aria-live":"assertive","aria-atomic":"true",style:iA},i)}function uA({rfId:t,disableKeyboardA11y:i}){return W.createElement(W.Fragment,null,W.createElement("div",{id:`${xv}-${t}`,style:Ag},"Press enter or space to select a node.",!i&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "),W.createElement("div",{id:`${bv}-${t}`,style:Ag},"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."),!i&&W.createElement(rA,{rfId:t}))}var Zo=(t=null,i={actInsideInputWithModifier:!0})=>{const[a,r]=z.useState(!1),u=z.useRef(!1),f=z.useRef(new Set([])),[s,h]=z.useMemo(()=>{if(t!==null){const m=(Array.isArray(t)?t:[t]).filter(v=>typeof v=="string").map(v=>v.split("+")),g=m.reduce((v,b)=>v.concat(...b),[]);return[m,g]}return[[],[]]},[t]);return z.useEffect(()=>{const p=typeof document<"u"?document:null,m=i?.target||p;if(t!==null){const g=E=>{if(u.current=E.ctrlKey||E.metaKey||E.shiftKey,(!u.current||u.current&&!i.actInsideInputWithModifier)&&id(E))return!1;const N=Cg(E.code,h);f.current.add(E[N]),Ng(s,f.current,!1)&&(E.preventDefault(),r(!0))},v=E=>{if((!u.current||u.current&&!i.actInsideInputWithModifier)&&id(E))return!1;const N=Cg(E.code,h);Ng(s,f.current,!0)?(r(!1),f.current.clear()):f.current.delete(E[N]),E.key==="Meta"&&f.current.clear(),u.current=!1},b=()=>{f.current.clear(),r(!1)};return m?.addEventListener("keydown",g),m?.addEventListener("keyup",v),window.addEventListener("blur",b),()=>{m?.removeEventListener("keydown",g),m?.removeEventListener("keyup",v),window.removeEventListener("blur",b)}}},[t,r]),a};function Ng(t,i,a){return t.filter(r=>a||r.length===i.size).some(r=>r.every(u=>i.has(u)))}function Cg(t,i){return i.includes(t)?"code":"key"}function Sv(t,i,a,r){const u=t.parentNode||t.parentId;if(!u)return a;const f=i.get(u),s=Ea(f,r);return Sv(f,i,{x:(a.x??0)+s.x,y:(a.y??0)+s.y,z:(f[lt]?.z??0)>(a.z??0)?f[lt]?.z??0:a.z??0},r)}function wv(t,i,a){t.forEach(r=>{const u=r.parentNode||r.parentId;if(u&&!t.has(u))throw new Error(`Parent node ${u} not found`);if(u||a?.[r.id]){const{x:f,y:s,z:h}=Sv(r,t,{...r.position,z:r[lt]?.z??0},i);r.positionAbsolute={x:f,y:s},r[lt].z=h,a?.[r.id]&&(r[lt].isParent=!0)}})}function Yf(t,i,a,r){const u=new Map,f={},s=r?1e3:0;return t.forEach(h=>{const p=(xn(h.zIndex)?h.zIndex:0)+(h.selected?s:0),m=i.get(h.id),g={...h,positionAbsolute:{x:h.position.x,y:h.position.y}},v=h.parentNode||h.parentId;v&&(f[v]=!0);const b=m?.type&&m?.type!==h.type;Object.defineProperty(g,lt,{enumerable:!1,value:{handleBounds:b?void 0:m?.[lt]?.handleBounds,z:p}}),u.set(h.id,g)}),wv(u,a,f),u}function Ev(t,i={}){const{getNodes:a,width:r,height:u,minZoom:f,maxZoom:s,d3Zoom:h,d3Selection:p,fitViewOnInitDone:m,fitViewOnInit:g,nodeOrigin:v}=t(),b=i.initial&&!m&&g;if(h&&p&&(b||!i.initial)){const C=a().filter(T=>{const M=i.includeHiddenNodes?T.width&&T.height:!T.hidden;return i.nodes?.length?M&&i.nodes.some(D=>D.id===T.id):M}),N=C.every(T=>T.width&&T.height);if(C.length>0&&N){const T=jd(C,v),{x:M,y:D,zoom:q}=uv(T,r,u,i.minZoom??f,i.maxZoom??s,i.padding??.1),j=Il.translate(M,D).scale(q);return typeof i.duration=="number"&&i.duration>0?h.transform(Ei(p,i.duration),j):h.transform(p,j),!0}}return!1}function cA(t,i){return t.forEach(a=>{const r=i.get(a.id);r&&i.set(r.id,{...r,[lt]:r[lt],selected:a.selected})}),new Map(i)}function sA(t,i){return i.map(a=>{const r=t.find(u=>u.id===a.id);return r&&(a.selected=r.selected),a})}function Ou({changedNodes:t,changedEdges:i,get:a,set:r}){const{nodeInternals:u,edges:f,onNodesChange:s,onEdgesChange:h,hasDefaultNodes:p,hasDefaultEdges:m}=a();t?.length&&(p&&r({nodeInternals:cA(t,u)}),s?.(t)),i?.length&&(m&&r({edges:sA(i,f)}),h?.(i))}const da=()=>{},fA={zoomIn:da,zoomOut:da,zoomTo:da,getZoom:()=>1,setViewport:da,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:da,fitBounds:da,project:t=>t,screenToFlowPosition:t=>t,flowToScreenPosition:t=>t,viewportInitialized:!1},dA=t=>({d3Zoom:t.d3Zoom,d3Selection:t.d3Selection}),hA=()=>{const t=xt(),{d3Zoom:i,d3Selection:a}=et(dA,Kt);return z.useMemo(()=>a&&i?{zoomIn:u=>i.scaleBy(Ei(a,u?.duration),1.2),zoomOut:u=>i.scaleBy(Ei(a,u?.duration),1/1.2),zoomTo:(u,f)=>i.scaleTo(Ei(a,f?.duration),u),getZoom:()=>t.getState().transform[2],setViewport:(u,f)=>{const[s,h,p]=t.getState().transform,m=Il.translate(u.x??s,u.y??h).scale(u.zoom??p);i.transform(Ei(a,f?.duration),m)},getViewport:()=>{const[u,f,s]=t.getState().transform;return{x:u,y:f,zoom:s}},fitView:u=>Ev(t.getState,u),setCenter:(u,f,s)=>{const{width:h,height:p,maxZoom:m}=t.getState(),g=typeof s?.zoom<"u"?s.zoom:m,v=h/2-u*g,b=p/2-f*g,E=Il.translate(v,b).scale(g);i.transform(Ei(a,s?.duration),E)},fitBounds:(u,f)=>{const{width:s,height:h,minZoom:p,maxZoom:m}=t.getState(),{x:g,y:v,zoom:b}=uv(u,s,h,p,m,f?.padding??.1),E=Il.translate(g,v).scale(b);i.transform(Ei(a,f?.duration),E)},project:u=>{const{transform:f,snapToGrid:s,snapGrid:h}=t.getState();return console.warn("[DEPRECATED] `project` is deprecated. Instead use `screenToFlowPosition`. There is no need to subtract the react flow bounds anymore! https://reactflow.dev/api-reference/types/react-flow-instance#screen-to-flow-position"),rd(u,f,s,h)},screenToFlowPosition:u=>{const{transform:f,snapToGrid:s,snapGrid:h,domNode:p}=t.getState();if(!p)return u;const{x:m,y:g}=p.getBoundingClientRect(),v={x:u.x-m,y:u.y-g};return rd(v,f,s,h)},flowToScreenPosition:u=>{const{transform:f,domNode:s}=t.getState();if(!s)return u;const{x:h,y:p}=s.getBoundingClientRect(),m=av(u,f);return{x:m.x+h,y:m.y+p}},viewportInitialized:!0}:fA,[i,a])};function cc(){const t=hA(),i=xt(),a=z.useCallback(()=>i.getState().getNodes().map(N=>({...N})),[]),r=z.useCallback(N=>i.getState().nodeInternals.get(N),[]),u=z.useCallback(()=>{const{edges:N=[]}=i.getState();return N.map(T=>({...T}))},[]),f=z.useCallback(N=>{const{edges:T=[]}=i.getState();return T.find(M=>M.id===N)},[]),s=z.useCallback(N=>{const{getNodes:T,setNodes:M,hasDefaultNodes:D,onNodesChange:q}=i.getState(),j=T(),I=typeof N=="function"?N(j):N;if(D)M(I);else if(q){const G=I.length===0?j.map($=>({type:"remove",id:$.id})):I.map($=>({item:$,type:"reset"}));q(G)}},[]),h=z.useCallback(N=>{const{edges:T=[],setEdges:M,hasDefaultEdges:D,onEdgesChange:q}=i.getState(),j=typeof N=="function"?N(T):N;if(D)M(j);else if(q){const I=j.length===0?T.map(G=>({type:"remove",id:G.id})):j.map(G=>({item:G,type:"reset"}));q(I)}},[]),p=z.useCallback(N=>{const T=Array.isArray(N)?N:[N],{getNodes:M,setNodes:D,hasDefaultNodes:q,onNodesChange:j}=i.getState();if(q){const G=[...M(),...T];D(G)}else if(j){const I=T.map(G=>({item:G,type:"add"}));j(I)}},[]),m=z.useCallback(N=>{const T=Array.isArray(N)?N:[N],{edges:M=[],setEdges:D,hasDefaultEdges:q,onEdgesChange:j}=i.getState();if(q)D([...M,...T]);else if(j){const I=T.map(G=>({item:G,type:"add"}));j(I)}},[]),g=z.useCallback(()=>{const{getNodes:N,edges:T=[],transform:M}=i.getState(),[D,q,j]=M;return{nodes:N().map(I=>({...I})),edges:T.map(I=>({...I})),viewport:{x:D,y:q,zoom:j}}},[]),v=z.useCallback(({nodes:N,edges:T})=>{const{nodeInternals:M,getNodes:D,edges:q,hasDefaultNodes:j,hasDefaultEdges:I,onNodesDelete:G,onEdgesDelete:$,onNodesChange:B,onEdgesChange:ee}=i.getState(),oe=(N||[]).map(H=>H.id),re=(T||[]).map(H=>H.id),ue=D().reduce((H,w)=>{const R=w.parentNode||w.parentId,X=!oe.includes(w.id)&&R&&H.find(Y=>Y.id===R);return(typeof w.deletable!="boolean"||w.deletable)&&(oe.includes(w.id)||X)&&H.push(w),H},[]),ie=q.filter(H=>typeof H.deletable=="boolean"?H.deletable:!0),x=ie.filter(H=>re.includes(H.id));if(ue||x){const H=rv(ue,ie),w=[...x,...H],R=w.reduce((X,L)=>(X.includes(L.id)||X.push(L.id),X),[]);if((I||j)&&(I&&i.setState({edges:q.filter(X=>!R.includes(X.id))}),j&&(ue.forEach(X=>{M.delete(X.id)}),i.setState({nodeInternals:new Map(M)}))),R.length>0&&($?.(w),ee&&ee(R.map(X=>({id:X,type:"remove"})))),ue.length>0&&(G?.(ue),B)){const X=ue.map(L=>({id:L.id,type:"remove"}));B(X)}}},[]),b=z.useCallback(N=>{const T=H_(N),M=T?null:i.getState().nodeInternals.get(N.id);return!T&&!M?[null,null,T]:[T?N:vg(M),M,T]},[]),E=z.useCallback((N,T=!0,M)=>{const[D,q,j]=b(N);return D?(M||i.getState().getNodes()).filter(I=>{if(!j&&(I.id===q.id||!I.positionAbsolute))return!1;const G=vg(I),$=ld(G,D);return T&&$>0||$>=D.width*D.height}):[]},[]),C=z.useCallback((N,T,M=!0)=>{const[D]=b(N);if(!D)return!1;const q=ld(D,T);return M&&q>0||q>=D.width*D.height},[]);return z.useMemo(()=>({...t,getNodes:a,getNode:r,getEdges:u,getEdge:f,setNodes:s,setEdges:h,addNodes:p,addEdges:m,toObject:g,deleteElements:v,getIntersectingNodes:E,isNodeIntersecting:C}),[t,a,r,u,f,s,h,p,m,g,v,E,C])}const pA={actInsideInputWithModifier:!1};var mA=({deleteKeyCode:t,multiSelectionKeyCode:i})=>{const a=xt(),{deleteElements:r}=cc(),u=Zo(t,pA),f=Zo(i);z.useEffect(()=>{if(u){const{edges:s,getNodes:h}=a.getState(),p=h().filter(g=>g.selected),m=s.filter(g=>g.selected);r({nodes:p,edges:m}),a.setState({nodesSelectionActive:!1})}},[u]),z.useEffect(()=>{a.setState({multiSelectionActive:f})},[f])};function gA(t){const i=xt();z.useEffect(()=>{let a;const r=()=>{if(!t.current)return;const u=Td(t.current);(u.height===0||u.width===0)&&i.getState().onError?.("004",hl.error004()),i.setState({width:u.width||500,height:u.height||500})};return r(),window.addEventListener("resize",r),t.current&&(a=new ResizeObserver(()=>r()),a.observe(t.current)),()=>{window.removeEventListener("resize",r),a&&t.current&&a.unobserve(t.current)}},[])}const Ld={position:"absolute",width:"100%",height:"100%",top:0,left:0},yA=(t,i)=>t.x!==i.x||t.y!==i.y||t.zoom!==i.k,Du=t=>({x:t.x,y:t.y,zoom:t.k}),ha=(t,i)=>t.target.closest(`.${i}`),Tg=(t,i)=>i===2&&Array.isArray(t)&&t.includes(2),Mg=t=>{const i=t.ctrlKey&&Qu()?10:1;return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*i},vA=t=>({d3Zoom:t.d3Zoom,d3Selection:t.d3Selection,d3ZoomHandler:t.d3ZoomHandler,userSelectionActive:t.userSelectionActive}),xA=({onMove:t,onMoveStart:i,onMoveEnd:a,onPaneContextMenu:r,zoomOnScroll:u=!0,zoomOnPinch:f=!0,panOnScroll:s=!1,panOnScrollSpeed:h=.5,panOnScrollMode:p=Ai.Free,zoomOnDoubleClick:m=!0,elementsSelectable:g,panOnDrag:v=!0,defaultViewport:b,translateExtent:E,minZoom:C,maxZoom:N,zoomActivationKeyCode:T,preventScrolling:M=!0,children:D,noWheelClassName:q,noPanClassName:j})=>{const I=z.useRef(),G=xt(),$=z.useRef(!1),B=z.useRef(!1),ee=z.useRef(null),oe=z.useRef({x:0,y:0,zoom:0}),{d3Zoom:re,d3Selection:ue,d3ZoomHandler:ie,userSelectionActive:x}=et(vA,Kt),H=Zo(T),w=z.useRef(0),R=z.useRef(!1),X=z.useRef();return gA(ee),z.useEffect(()=>{if(ee.current){const L=ee.current.getBoundingClientRect(),Y=N_().scaleExtent([C,N]).translateExtent(E),_=vn(ee.current).call(Y),U=Il.translate(b.x,b.y).scale(Wl(b.zoom,C,N)),F=[[0,0],[L.width,L.height]],P=Y.constrain()(U,F,E);Y.transform(_,P),Y.wheelDelta(Mg),G.setState({d3Zoom:Y,d3Selection:_,d3ZoomHandler:_.on("wheel.zoom"),transform:[P.x,P.y,P.k],domNode:ee.current.closest(".react-flow")})}},[]),z.useEffect(()=>{ue&&re&&(s&&!H&&!x?ue.on("wheel.zoom",L=>{if(ha(L,q))return!1;L.preventDefault(),L.stopImmediatePropagation();const Y=ue.property("__zoom").k||1;if(L.ctrlKey&&f){const be=kn(L),de=Mg(L),Ae=Y*Math.pow(2,de);re.scaleTo(ue,Ae,be,L);return}const _=L.deltaMode===1?20:1;let U=p===Ai.Vertical?0:L.deltaX*_,F=p===Ai.Horizontal?0:L.deltaY*_;!Qu()&&L.shiftKey&&p!==Ai.Vertical&&(U=L.deltaY*_,F=0),re.translateBy(ue,-(U/Y)*h,-(F/Y)*h,{internal:!0});const P=Du(ue.property("__zoom")),{onViewportChangeStart:ae,onViewportChange:ce,onViewportChangeEnd:fe}=G.getState();clearTimeout(X.current),R.current||(R.current=!0,i?.(L,P),ae?.(P)),R.current&&(t?.(L,P),ce?.(P),X.current=setTimeout(()=>{a?.(L,P),fe?.(P),R.current=!1},150))},{passive:!1}):typeof ie<"u"&&ue.on("wheel.zoom",function(L,Y){if(!M&&L.type==="wheel"&&!L.ctrlKey||ha(L,q))return null;L.preventDefault(),ie.call(this,L,Y)},{passive:!1}))},[x,s,p,ue,re,ie,H,f,M,q,i,t,a]),z.useEffect(()=>{re&&re.on("start",L=>{if(!L.sourceEvent||L.sourceEvent.internal)return null;w.current=L.sourceEvent?.button;const{onViewportChangeStart:Y}=G.getState(),_=Du(L.transform);$.current=!0,oe.current=_,L.sourceEvent?.type==="mousedown"&&G.setState({paneDragging:!0}),Y?.(_),i?.(L.sourceEvent,_)})},[re,i]),z.useEffect(()=>{re&&(x&&!$.current?re.on("zoom",null):x||re.on("zoom",L=>{const{onViewportChange:Y}=G.getState();if(G.setState({transform:[L.transform.x,L.transform.y,L.transform.k]}),B.current=!!(r&&Tg(v,w.current??0)),(t||Y)&&!L.sourceEvent?.internal){const _=Du(L.transform);Y?.(_),t?.(L.sourceEvent,_)}}))},[x,re,t,v,r]),z.useEffect(()=>{re&&re.on("end",L=>{if(!L.sourceEvent||L.sourceEvent.internal)return null;const{onViewportChangeEnd:Y}=G.getState();if($.current=!1,G.setState({paneDragging:!1}),r&&Tg(v,w.current??0)&&!B.current&&r(L.sourceEvent),B.current=!1,(a||Y)&&yA(oe.current,L.transform)){const _=Du(L.transform);oe.current=_,clearTimeout(I.current),I.current=setTimeout(()=>{Y?.(_),a?.(L.sourceEvent,_)},s?150:0)}})},[re,s,v,a,r]),z.useEffect(()=>{re&&re.filter(L=>{const Y=H||u,_=f&&L.ctrlKey;if((v===!0||Array.isArray(v)&&v.includes(1))&&L.button===1&&L.type==="mousedown"&&(ha(L,"react-flow__node")||ha(L,"react-flow__edge")))return!0;if(!v&&!Y&&!s&&!m&&!f||x||!m&&L.type==="dblclick"||ha(L,q)&&L.type==="wheel"||ha(L,j)&&(L.type!=="wheel"||s&&L.type==="wheel"&&!H)||!f&&L.ctrlKey&&L.type==="wheel"||!Y&&!s&&!_&&L.type==="wheel"||!v&&(L.type==="mousedown"||L.type==="touchstart")||Array.isArray(v)&&!v.includes(L.button)&&L.type==="mousedown")return!1;const U=Array.isArray(v)&&v.includes(L.button)||!L.button||L.button<=1;return(!L.ctrlKey||L.type==="wheel")&&U})},[x,re,u,f,s,m,v,g,H]),W.createElement("div",{className:"react-flow__renderer",ref:ee,style:Ld},D)},bA=t=>({userSelectionActive:t.userSelectionActive,userSelectionRect:t.userSelectionRect});function SA(){const{userSelectionActive:t,userSelectionRect:i}=et(bA,Kt);return t&&i?W.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:i.width,height:i.height,transform:`translate(${i.x}px, ${i.y}px)`}}):null}function zg(t,i){const a=i.parentNode||i.parentId,r=t.find(u=>u.id===a);if(r){const u=i.position.x+i.width-r.width,f=i.position.y+i.height-r.height;if(u>0||f>0||i.position.x<0||i.position.y<0){if(r.style={...r.style},r.style.width=r.style.width??r.width,r.style.height=r.style.height??r.height,u>0&&(r.style.width+=u),f>0&&(r.style.height+=f),i.position.x<0){const s=Math.abs(i.position.x);r.position.x=r.position.x-s,r.style.width+=s,i.position.x=0}if(i.position.y<0){const s=Math.abs(i.position.y);r.position.y=r.position.y-s,r.style.height+=s,i.position.y=0}r.width=r.style.width,r.height=r.style.height}}}function _v(t,i){if(t.some(r=>r.type==="reset"))return t.filter(r=>r.type==="reset").map(r=>r.item);const a=t.filter(r=>r.type==="add").map(r=>r.item);return i.reduce((r,u)=>{const f=t.filter(h=>h.id===u.id);if(f.length===0)return r.push(u),r;const s={...u};for(const h of f)if(h)switch(h.type){case"select":{s.selected=h.selected;break}case"position":{typeof h.position<"u"&&(s.position=h.position),typeof h.positionAbsolute<"u"&&(s.positionAbsolute=h.positionAbsolute),typeof h.dragging<"u"&&(s.dragging=h.dragging),s.expandParent&&zg(r,s);break}case"dimensions":{typeof h.dimensions<"u"&&(s.width=h.dimensions.width,s.height=h.dimensions.height),typeof h.updateStyle<"u"&&(s.style={...s.style||{},...h.dimensions}),typeof h.resizing=="boolean"&&(s.resizing=h.resizing),s.expandParent&&zg(r,s);break}case"remove":return r}return r.push(s),r},a)}function Av(t,i){return _v(t,i)}function wA(t,i){return _v(t,i)}const $l=(t,i)=>({id:t,type:"select",selected:i});function ya(t,i){return t.reduce((a,r)=>{const u=i.includes(r.id);return!r.selected&&u?(r.selected=!0,a.push($l(r.id,!0))):r.selected&&!u&&(r.selected=!1,a.push($l(r.id,!1))),a},[])}const Vf=(t,i)=>a=>{a.target===i.current&&t?.(a)},EA=t=>({userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable,dragging:t.paneDragging}),Nv=z.memo(({isSelecting:t,selectionMode:i=Xo.Full,panOnDrag:a,onSelectionStart:r,onSelectionEnd:u,onPaneClick:f,onPaneContextMenu:s,onPaneScroll:h,onPaneMouseEnter:p,onPaneMouseMove:m,onPaneMouseLeave:g,children:v})=>{const b=z.useRef(null),E=xt(),C=z.useRef(0),N=z.useRef(0),T=z.useRef(),{userSelectionActive:M,elementsSelectable:D,dragging:q}=et(EA,Kt),j=()=>{E.setState({userSelectionActive:!1,userSelectionRect:null}),C.current=0,N.current=0},I=ie=>{f?.(ie),E.getState().resetSelectedElements(),E.setState({nodesSelectionActive:!1})},G=ie=>{if(Array.isArray(a)&&a?.includes(2)){ie.preventDefault();return}s?.(ie)},$=h?ie=>h(ie):void 0,B=ie=>{const{resetSelectedElements:x,domNode:H}=E.getState();if(T.current=H?.getBoundingClientRect(),!D||!t||ie.button!==0||ie.target!==b.current||!T.current)return;const{x:w,y:R}=Fl(ie,T.current);x(),E.setState({userSelectionRect:{width:0,height:0,startX:w,startY:R,x:w,y:R}}),r?.(ie)},ee=ie=>{const{userSelectionRect:x,nodeInternals:H,edges:w,transform:R,onNodesChange:X,onEdgesChange:L,nodeOrigin:Y,getNodes:_}=E.getState();if(!t||!T.current||!x)return;E.setState({userSelectionActive:!0,nodesSelectionActive:!1});const U=Fl(ie,T.current),F=x.startX??0,P=x.startY??0,ae={...x,x:U.x<F?U.x:F,y:U.y<P?U.y:P,width:Math.abs(U.x-F),height:Math.abs(U.y-P)},ce=_(),fe=ov(H,ae,R,i===Xo.Partial,!0,Y),be=rv(fe,w).map(Ae=>Ae.id),de=fe.map(Ae=>Ae.id);if(C.current!==de.length){C.current=de.length;const Ae=ya(ce,de);Ae.length&&X?.(Ae)}if(N.current!==be.length){N.current=be.length;const Ae=ya(w,be);Ae.length&&L?.(Ae)}E.setState({userSelectionRect:ae})},oe=ie=>{if(ie.button!==0)return;const{userSelectionRect:x}=E.getState();!M&&x&&ie.target===b.current&&I?.(ie),E.setState({nodesSelectionActive:C.current>0}),j(),u?.(ie)},re=ie=>{M&&(E.setState({nodesSelectionActive:C.current>0}),u?.(ie)),j()},ue=D&&(t||M);return W.createElement("div",{className:Dt(["react-flow__pane",{dragging:q,selection:t}]),onClick:ue?void 0:Vf(I,b),onContextMenu:Vf(G,b),onWheel:Vf($,b),onMouseEnter:ue?void 0:p,onMouseDown:ue?B:void 0,onMouseMove:ue?ee:m,onMouseUp:ue?oe:void 0,onMouseLeave:ue?re:g,ref:b,style:Ld},v,W.createElement(SA,null))});Nv.displayName="Pane";function Cv(t,i){const a=t.parentNode||t.parentId;if(!a)return!1;const r=i.get(a);return r?r.selected?!0:Cv(r,i):!1}function Og(t,i,a){let r=t;do{if(r?.matches(i))return!0;if(r===a.current)return!1;r=r.parentElement}while(r);return!1}function _A(t,i,a,r){return Array.from(t.values()).filter(u=>(u.selected||u.id===r)&&(!u.parentNode||u.parentId||!Cv(u,t))&&(u.draggable||i&&typeof u.draggable>"u")).map(u=>({id:u.id,position:u.position||{x:0,y:0},positionAbsolute:u.positionAbsolute||{x:0,y:0},distance:{x:a.x-(u.positionAbsolute?.x??0),y:a.y-(u.positionAbsolute?.y??0)},delta:{x:0,y:0},extent:u.extent,parentNode:u.parentNode||u.parentId,parentId:u.parentNode||u.parentId,width:u.width,height:u.height,expandParent:u.expandParent}))}function AA(t,i){return!i||i==="parent"?i:[i[0],[i[1][0]-(t.width||0),i[1][1]-(t.height||0)]]}function Tv(t,i,a,r,u=[0,0],f){const s=AA(t,t.extent||r);let h=s;const p=t.parentNode||t.parentId;if(t.extent==="parent"&&!t.expandParent)if(p&&t.width&&t.height){const v=a.get(p),{x:b,y:E}=Ea(v,u).positionAbsolute;h=v&&xn(b)&&xn(E)&&xn(v.width)&&xn(v.height)?[[b+t.width*u[0],E+t.height*u[1]],[b+v.width-t.width+t.width*u[0],E+v.height-t.height+t.height*u[1]]]:h}else f?.("005",hl.error005()),h=s;else if(t.extent&&p&&t.extent!=="parent"){const v=a.get(p),{x:b,y:E}=Ea(v,u).positionAbsolute;h=[[t.extent[0][0]+b,t.extent[0][1]+E],[t.extent[1][0]+b,t.extent[1][1]+E]]}let m={x:0,y:0};if(p){const v=a.get(p);m=Ea(v,u).positionAbsolute}const g=h&&h!=="parent"?Md(i,h):i;return{position:{x:g.x-m.x,y:g.y-m.y},positionAbsolute:g}}function qf({nodeId:t,dragItems:i,nodeInternals:a}){const r=i.map(u=>({...a.get(u.id),position:u.position,positionAbsolute:u.positionAbsolute}));return[t?r.find(u=>u.id===t):r[0],r]}const Dg=(t,i,a,r)=>{const u=i.querySelectorAll(t);if(!u||!u.length)return null;const f=Array.from(u),s=i.getBoundingClientRect(),h={x:s.width*r[0],y:s.height*r[1]};return f.map(p=>{const m=p.getBoundingClientRect();return{id:p.getAttribute("data-handleid"),position:p.getAttribute("data-handlepos"),x:(m.left-s.left-h.x)/a,y:(m.top-s.top-h.y)/a,...Td(p)}})};function Do(t,i,a){return a===void 0?a:r=>{const u=i().nodeInternals.get(t);u&&a(r,{...u})}}function cd({id:t,store:i,unselect:a=!1,nodeRef:r}){const{addSelectedNodes:u,unselectNodesAndEdges:f,multiSelectionActive:s,nodeInternals:h,onError:p}=i.getState(),m=h.get(t);if(!m){p?.("012",hl.error012(t));return}i.setState({nodesSelectionActive:!1}),m.selected?(a||m.selected&&s)&&(f({nodes:[m],edges:[]}),requestAnimationFrame(()=>r?.current?.blur())):u([t])}function Mv(){const t=xt();return z.useCallback(({sourceEvent:a})=>{const{transform:r,snapGrid:u,snapToGrid:f}=t.getState(),s=a.touches?a.touches[0].clientX:a.clientX,h=a.touches?a.touches[0].clientY:a.clientY,p={x:(s-r[0])/r[2],y:(h-r[1])/r[2]};return{xSnapped:f?u[0]*Math.round(p.x/u[0]):p.x,ySnapped:f?u[1]*Math.round(p.y/u[1]):p.y,...p}},[])}function Gf(t){return(i,a,r)=>t?.(i,r)}function zv({nodeRef:t,disabled:i=!1,noDragClassName:a,handleSelector:r,nodeId:u,isSelectable:f,selectNodesOnDrag:s}){const h=xt(),[p,m]=z.useState(!1),g=z.useRef([]),v=z.useRef({x:null,y:null}),b=z.useRef(0),E=z.useRef(null),C=z.useRef({x:0,y:0}),N=z.useRef(null),T=z.useRef(!1),M=z.useRef(!1),D=z.useRef(!1),q=Mv();return z.useEffect(()=>{if(t?.current){const j=vn(t.current),I=({x:B,y:ee})=>{const{nodeInternals:oe,onNodeDrag:re,onSelectionDrag:ue,updateNodePositions:ie,nodeExtent:x,snapGrid:H,snapToGrid:w,nodeOrigin:R,onError:X}=h.getState();v.current={x:B,y:ee};let L=!1,Y={x:0,y:0,x2:0,y2:0};if(g.current.length>1&&x){const U=jd(g.current,R);Y=zd(U)}if(g.current=g.current.map(U=>{const F={x:B-U.distance.x,y:ee-U.distance.y};w&&(F.x=H[0]*Math.round(F.x/H[0]),F.y=H[1]*Math.round(F.y/H[1]));const P=[[x[0][0],x[0][1]],[x[1][0],x[1][1]]];g.current.length>1&&x&&!U.extent&&(P[0][0]=U.positionAbsolute.x-Y.x+x[0][0],P[1][0]=U.positionAbsolute.x+(U.width??0)-Y.x2+x[1][0],P[0][1]=U.positionAbsolute.y-Y.y+x[0][1],P[1][1]=U.positionAbsolute.y+(U.height??0)-Y.y2+x[1][1]);const ae=Tv(U,F,oe,P,R,X);return L=L||U.position.x!==ae.position.x||U.position.y!==ae.position.y,U.position=ae.position,U.positionAbsolute=ae.positionAbsolute,U}),!L)return;ie(g.current,!0,!0),m(!0);const _=u?re:Gf(ue);if(_&&N.current){const[U,F]=qf({nodeId:u,dragItems:g.current,nodeInternals:oe});_(N.current,U,F)}},G=()=>{if(!E.current)return;const[B,ee]=Fy(C.current,E.current);if(B!==0||ee!==0){const{transform:oe,panBy:re}=h.getState();v.current.x=(v.current.x??0)-B/oe[2],v.current.y=(v.current.y??0)-ee/oe[2],re({x:B,y:ee})&&I(v.current)}b.current=requestAnimationFrame(G)},$=B=>{const{nodeInternals:ee,multiSelectionActive:oe,nodesDraggable:re,unselectNodesAndEdges:ue,onNodeDragStart:ie,onSelectionDragStart:x}=h.getState();M.current=!0;const H=u?ie:Gf(x);(!s||!f)&&!oe&&u&&(ee.get(u)?.selected||ue()),u&&f&&s&&cd({id:u,store:h,nodeRef:t});const w=q(B);if(v.current=w,g.current=_A(ee,re,w,u),H&&g.current){const[R,X]=qf({nodeId:u,dragItems:g.current,nodeInternals:ee});H(B.sourceEvent,R,X)}};if(i)j.on(".drag",null);else{const B=Hy().on("start",ee=>{const{domNode:oe,nodeDragThreshold:re}=h.getState();re===0&&$(ee),D.current=!1;const ue=q(ee);v.current=ue,E.current=oe?.getBoundingClientRect()||null,C.current=Fl(ee.sourceEvent,E.current)}).on("drag",ee=>{const oe=q(ee),{autoPanOnNodeDrag:re,nodeDragThreshold:ue}=h.getState();if(ee.sourceEvent.type==="touchmove"&&ee.sourceEvent.touches.length>1&&(D.current=!0),!D.current){if(!T.current&&M.current&&re&&(T.current=!0,G()),!M.current){const ie=oe.xSnapped-(v?.current?.x??0),x=oe.ySnapped-(v?.current?.y??0);Math.sqrt(ie*ie+x*x)>ue&&$(ee)}(v.current.x!==oe.xSnapped||v.current.y!==oe.ySnapped)&&g.current&&M.current&&(N.current=ee.sourceEvent,C.current=Fl(ee.sourceEvent,E.current),I(oe))}}).on("end",ee=>{if(!(!M.current||D.current)&&(m(!1),T.current=!1,M.current=!1,cancelAnimationFrame(b.current),g.current)){const{updateNodePositions:oe,nodeInternals:re,onNodeDragStop:ue,onSelectionDragStop:ie}=h.getState(),x=u?ue:Gf(ie);if(oe(g.current,!1,!1),x){const[H,w]=qf({nodeId:u,dragItems:g.current,nodeInternals:re});x(ee.sourceEvent,H,w)}}}).filter(ee=>{const oe=ee.target;return!ee.button&&(!a||!Og(oe,`.${a}`,t))&&(!r||Og(oe,r,t))});return j.call(B),()=>{j.on(".drag",null)}}}},[t,i,a,r,f,h,u,s,q]),p}function Ov(){const t=xt();return z.useCallback(a=>{const{nodeInternals:r,nodeExtent:u,updateNodePositions:f,getNodes:s,snapToGrid:h,snapGrid:p,onError:m,nodesDraggable:g}=t.getState(),v=s().filter(D=>D.selected&&(D.draggable||g&&typeof D.draggable>"u")),b=h?p[0]:5,E=h?p[1]:5,C=a.isShiftPressed?4:1,N=a.x*b*C,T=a.y*E*C,M=v.map(D=>{if(D.positionAbsolute){const q={x:D.positionAbsolute.x+N,y:D.positionAbsolute.y+T};h&&(q.x=p[0]*Math.round(q.x/p[0]),q.y=p[1]*Math.round(q.y/p[1]));const{positionAbsolute:j,position:I}=Tv(D,q,r,u,void 0,m);D.position=I,D.positionAbsolute=j}return D});f(M,!0,!1)},[])}const _a={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var Ro=t=>{const i=({id:a,type:r,data:u,xPos:f,yPos:s,xPosOrigin:h,yPosOrigin:p,selected:m,onClick:g,onMouseEnter:v,onMouseMove:b,onMouseLeave:E,onContextMenu:C,onDoubleClick:N,style:T,className:M,isDraggable:D,isSelectable:q,isConnectable:j,isFocusable:I,selectNodesOnDrag:G,sourcePosition:$,targetPosition:B,hidden:ee,resizeObserver:oe,dragHandle:re,zIndex:ue,isParent:ie,noDragClassName:x,noPanClassName:H,initialized:w,disableKeyboardA11y:R,ariaLabel:X,rfId:L,hasHandleBounds:Y})=>{const _=xt(),U=z.useRef(null),F=z.useRef(null),P=z.useRef($),ae=z.useRef(B),ce=z.useRef(r),fe=q||D||g||v||b||E,be=Ov(),de=Do(a,_.getState,v),Ae=Do(a,_.getState,b),Re=Do(a,_.getState,E),Ve=Do(a,_.getState,C),Pe=Do(a,_.getState,N),Ye=je=>{const{nodeDragThreshold:se}=_.getState();if(q&&(!G||!D||se>0)&&cd({id:a,store:_,nodeRef:U}),g){const ke=_.getState().nodeInternals.get(a);ke&&g(je,{...ke})}},He=je=>{if(!id(je)&&!R)if(Wy.includes(je.key)&&q){const se=je.key==="Escape";cd({id:a,store:_,unselect:se,nodeRef:U})}else D&&m&&Object.prototype.hasOwnProperty.call(_a,je.key)&&(_.setState({ariaLiveMessage:`Moved selected node ${je.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~f}, y: ${~~s}`}),be({x:_a[je.key].x,y:_a[je.key].y,isShiftPressed:je.shiftKey}))};z.useEffect(()=>()=>{F.current&&(oe?.unobserve(F.current),F.current=null)},[]),z.useEffect(()=>{if(U.current&&!ee){const je=U.current;(!w||!Y||F.current!==je)&&(F.current&&oe?.unobserve(F.current),oe?.observe(je),F.current=je)}},[ee,w,Y]),z.useEffect(()=>{const je=ce.current!==r,se=P.current!==$,ke=ae.current!==B;U.current&&(je||se||ke)&&(je&&(ce.current=r),se&&(P.current=$),ke&&(ae.current=B),_.getState().updateNodeDimensions([{id:a,nodeElement:U.current,forceUpdate:!0}]))},[a,r,$,B]);const pt=zv({nodeRef:U,disabled:ee||!D,noDragClassName:x,handleSelector:re,nodeId:a,isSelectable:q,selectNodesOnDrag:G});return ee?null:W.createElement("div",{className:Dt(["react-flow__node",`react-flow__node-${r}`,{[H]:D},M,{selected:m,selectable:q,parent:ie,dragging:pt}]),ref:U,style:{zIndex:ue,transform:`translate(${h}px,${p}px)`,pointerEvents:fe?"all":"none",visibility:w?"visible":"hidden",...T},"data-id":a,"data-testid":`rf__node-${a}`,onMouseEnter:de,onMouseMove:Ae,onMouseLeave:Re,onContextMenu:Ve,onClick:Ye,onDoubleClick:Pe,onKeyDown:I?He:void 0,tabIndex:I?0:void 0,role:I?"button":void 0,"aria-describedby":R?void 0:`${xv}-${L}`,"aria-label":X},W.createElement(V_,{value:a},W.createElement(t,{id:a,data:u,type:r,xPos:f,yPos:s,selected:m,isConnectable:j,sourcePosition:$,targetPosition:B,dragging:pt,dragHandle:re,zIndex:ue})))};return i.displayName="NodeWrapper",z.memo(i)};const NA=t=>{const i=t.getNodes().filter(a=>a.selected);return{...jd(i,t.nodeOrigin),transformString:`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]})`,userSelectionActive:t.userSelectionActive}};function CA({onSelectionContextMenu:t,noPanClassName:i,disableKeyboardA11y:a}){const r=xt(),{width:u,height:f,x:s,y:h,transformString:p,userSelectionActive:m}=et(NA,Kt),g=Ov(),v=z.useRef(null);if(z.useEffect(()=>{a||v.current?.focus({preventScroll:!0})},[a]),zv({nodeRef:v}),m||!u||!f)return null;const b=t?C=>{const N=r.getState().getNodes().filter(T=>T.selected);t(C,N)}:void 0,E=C=>{Object.prototype.hasOwnProperty.call(_a,C.key)&&g({x:_a[C.key].x,y:_a[C.key].y,isShiftPressed:C.shiftKey})};return W.createElement("div",{className:Dt(["react-flow__nodesselection","react-flow__container",i]),style:{transform:p}},W.createElement("div",{ref:v,className:"react-flow__nodesselection-rect",onContextMenu:b,tabIndex:a?void 0:-1,onKeyDown:a?void 0:E,style:{width:u,height:f,top:h,left:s}}))}var TA=z.memo(CA);const MA=t=>t.nodesSelectionActive,Dv=({children:t,onPaneClick:i,onPaneMouseEnter:a,onPaneMouseMove:r,onPaneMouseLeave:u,onPaneContextMenu:f,onPaneScroll:s,deleteKeyCode:h,onMove:p,onMoveStart:m,onMoveEnd:g,selectionKeyCode:v,selectionOnDrag:b,selectionMode:E,onSelectionStart:C,onSelectionEnd:N,multiSelectionKeyCode:T,panActivationKeyCode:M,zoomActivationKeyCode:D,elementsSelectable:q,zoomOnScroll:j,zoomOnPinch:I,panOnScroll:G,panOnScrollSpeed:$,panOnScrollMode:B,zoomOnDoubleClick:ee,panOnDrag:oe,defaultViewport:re,translateExtent:ue,minZoom:ie,maxZoom:x,preventScrolling:H,onSelectionContextMenu:w,noWheelClassName:R,noPanClassName:X,disableKeyboardA11y:L})=>{const Y=et(MA),_=Zo(v),U=Zo(M),F=U||oe,P=U||G,ae=_||b&&F!==!0;return mA({deleteKeyCode:h,multiSelectionKeyCode:T}),W.createElement(xA,{onMove:p,onMoveStart:m,onMoveEnd:g,onPaneContextMenu:f,elementsSelectable:q,zoomOnScroll:j,zoomOnPinch:I,panOnScroll:P,panOnScrollSpeed:$,panOnScrollMode:B,zoomOnDoubleClick:ee,panOnDrag:!_&&F,defaultViewport:re,translateExtent:ue,minZoom:ie,maxZoom:x,zoomActivationKeyCode:D,preventScrolling:H,noWheelClassName:R,noPanClassName:X},W.createElement(Nv,{onSelectionStart:C,onSelectionEnd:N,onPaneClick:i,onPaneMouseEnter:a,onPaneMouseMove:r,onPaneMouseLeave:u,onPaneContextMenu:f,onPaneScroll:s,panOnDrag:F,isSelecting:!!ae,selectionMode:E},t,Y&&W.createElement(TA,{onSelectionContextMenu:w,noPanClassName:X,disableKeyboardA11y:L})))};Dv.displayName="FlowRenderer";var zA=z.memo(Dv);function OA(t){return et(z.useCallback(a=>t?ov(a.nodeInternals,{x:0,y:0,width:a.width,height:a.height},a.transform,!0):a.getNodes(),[t]))}function DA(t){const i={input:Ro(t.input||mv),default:Ro(t.default||ud),output:Ro(t.output||yv),group:Ro(t.group||Ud)},a={},r=Object.keys(t).filter(u=>!["input","default","output","group"].includes(u)).reduce((u,f)=>(u[f]=Ro(t[f]||ud),u),a);return{...i,...r}}const RA=({x:t,y:i,width:a,height:r,origin:u})=>!a||!r?{x:t,y:i}:u[0]<0||u[1]<0||u[0]>1||u[1]>1?{x:t,y:i}:{x:t-a*u[0],y:i-r*u[1]},HA=t=>({nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,nodesFocusable:t.nodesFocusable,elementsSelectable:t.elementsSelectable,updateNodeDimensions:t.updateNodeDimensions,onError:t.onError}),Rv=t=>{const{nodesDraggable:i,nodesConnectable:a,nodesFocusable:r,elementsSelectable:u,updateNodeDimensions:f,onError:s}=et(HA,Kt),h=OA(t.onlyRenderVisibleElements),p=z.useRef(),m=z.useMemo(()=>{if(typeof ResizeObserver>"u")return null;const g=new ResizeObserver(v=>{const b=v.map(E=>({id:E.target.getAttribute("data-id"),nodeElement:E.target,forceUpdate:!0}));f(b)});return p.current=g,g},[]);return z.useEffect(()=>()=>{p?.current?.disconnect()},[]),W.createElement("div",{className:"react-flow__nodes",style:Ld},h.map(g=>{let v=g.type||"default";t.nodeTypes[v]||(s?.("003",hl.error003(v)),v="default");const b=t.nodeTypes[v]||t.nodeTypes.default,E=!!(g.draggable||i&&typeof g.draggable>"u"),C=!!(g.selectable||u&&typeof g.selectable>"u"),N=!!(g.connectable||a&&typeof g.connectable>"u"),T=!!(g.focusable||r&&typeof g.focusable>"u"),M=t.nodeExtent?Md(g.positionAbsolute,t.nodeExtent):g.positionAbsolute,D=M?.x??0,q=M?.y??0,j=RA({x:D,y:q,width:g.width??0,height:g.height??0,origin:t.nodeOrigin});return W.createElement(b,{key:g.id,id:g.id,className:g.className,style:g.style,type:v,data:g.data,sourcePosition:g.sourcePosition||ve.Bottom,targetPosition:g.targetPosition||ve.Top,hidden:g.hidden,xPos:D,yPos:q,xPosOrigin:j.x,yPosOrigin:j.y,selectNodesOnDrag:t.selectNodesOnDrag,onClick:t.onNodeClick,onMouseEnter:t.onNodeMouseEnter,onMouseMove:t.onNodeMouseMove,onMouseLeave:t.onNodeMouseLeave,onContextMenu:t.onNodeContextMenu,onDoubleClick:t.onNodeDoubleClick,selected:!!g.selected,isDraggable:E,isSelectable:C,isConnectable:N,isFocusable:T,resizeObserver:m,dragHandle:g.dragHandle,zIndex:g[lt]?.z??0,isParent:!!g[lt]?.isParent,noDragClassName:t.noDragClassName,noPanClassName:t.noPanClassName,initialized:!!g.width&&!!g.height,rfId:t.rfId,disableKeyboardA11y:t.disableKeyboardA11y,ariaLabel:g.ariaLabel,hasHandleBounds:!!g[lt]?.handleBounds})}))};Rv.displayName="NodeRenderer";var jA=z.memo(Rv);const kA=(t,i,a)=>a===ve.Left?t-i:a===ve.Right?t+i:t,UA=(t,i,a)=>a===ve.Top?t-i:a===ve.Bottom?t+i:t,Rg="react-flow__edgeupdater",Hg=({position:t,centerX:i,centerY:a,radius:r=10,onMouseDown:u,onMouseEnter:f,onMouseOut:s,type:h})=>W.createElement("circle",{onMouseDown:u,onMouseEnter:f,onMouseOut:s,className:Dt([Rg,`${Rg}-${h}`]),cx:kA(i,r,t),cy:UA(a,r,t),r,stroke:"transparent",fill:"transparent"}),LA=()=>!0;var pa=t=>{const i=({id:a,className:r,type:u,data:f,onClick:s,onEdgeDoubleClick:h,selected:p,animated:m,label:g,labelStyle:v,labelShowBg:b,labelBgStyle:E,labelBgPadding:C,labelBgBorderRadius:N,style:T,source:M,target:D,sourceX:q,sourceY:j,targetX:I,targetY:G,sourcePosition:$,targetPosition:B,elementsSelectable:ee,hidden:oe,sourceHandleId:re,targetHandleId:ue,onContextMenu:ie,onMouseEnter:x,onMouseMove:H,onMouseLeave:w,reconnectRadius:R,onReconnect:X,onReconnectStart:L,onReconnectEnd:Y,markerEnd:_,markerStart:U,rfId:F,ariaLabel:P,isFocusable:ae,isReconnectable:ce,pathOptions:fe,interactionWidth:be,disableKeyboardA11y:de})=>{const Ae=z.useRef(null),[Re,Ve]=z.useState(!1),[Pe,Ye]=z.useState(!1),He=xt(),pt=z.useMemo(()=>`url('#${od(U,F)}')`,[U,F]),je=z.useMemo(()=>`url('#${od(_,F)}')`,[_,F]);if(oe)return null;const se=bt=>{const{edges:rn,addSelectedEdges:It,unselectNodesAndEdges:it,multiSelectionActive:jt}=He.getState(),Je=rn.find(Yn=>Yn.id===a);Je&&(ee&&(He.setState({nodesSelectionActive:!1}),Je.selected&&jt?(it({nodes:[],edges:[Je]}),Ae.current?.blur()):It([a])),s&&s(bt,Je))},ke=Oo(a,He.getState,h),Bt=Oo(a,He.getState,ie),an=Oo(a,He.getState,x),Tn=Oo(a,He.getState,H),bn=Oo(a,He.getState,w),Fe=(bt,rn)=>{if(bt.button!==0)return;const{edges:It,isValidConnection:it}=He.getState(),jt=rn?D:M,Je=(rn?ue:re)||null,Yn=rn?"target":"source",Oa=it||LA,Da=rn,Mn=It.find(kt=>kt.id===a);Ye(!0),L?.(bt,Mn,Yn);const gl=kt=>{Ye(!1),Y?.(kt,Mn,Yn)};fv({event:bt,handleId:Je,nodeId:jt,onConnect:kt=>X?.(Mn,kt),isTarget:Da,getState:He.getState,setState:He.setState,isValidConnection:Oa,edgeUpdaterType:Yn,onReconnectEnd:gl})},Tt=bt=>Fe(bt,!0),Mt=bt=>Fe(bt,!1),Ht=()=>Ve(!0),zt=()=>Ve(!1),on=!ee&&!s,ml=bt=>{if(!de&&Wy.includes(bt.key)&&ee){const{unselectNodesAndEdges:rn,addSelectedEdges:It,edges:it}=He.getState();bt.key==="Escape"?(Ae.current?.blur(),rn({edges:[it.find(Je=>Je.id===a)]})):It([a])}};return W.createElement("g",{className:Dt(["react-flow__edge",`react-flow__edge-${u}`,r,{selected:p,animated:m,inactive:on,updating:Re}]),onClick:se,onDoubleClick:ke,onContextMenu:Bt,onMouseEnter:an,onMouseMove:Tn,onMouseLeave:bn,onKeyDown:ae?ml:void 0,tabIndex:ae?0:void 0,role:ae?"button":"img","data-testid":`rf__edge-${a}`,"aria-label":P===null?void 0:P||`Edge from ${M} to ${D}`,"aria-describedby":ae?`${bv}-${F}`:void 0,ref:Ae},!Pe&&W.createElement(t,{id:a,source:M,target:D,selected:p,animated:m,label:g,labelStyle:v,labelShowBg:b,labelBgStyle:E,labelBgPadding:C,labelBgBorderRadius:N,data:f,style:T,sourceX:q,sourceY:j,targetX:I,targetY:G,sourcePosition:$,targetPosition:B,sourceHandleId:re,targetHandleId:ue,markerStart:pt,markerEnd:je,pathOptions:fe,interactionWidth:be}),ce&&W.createElement(W.Fragment,null,(ce==="source"||ce===!0)&&W.createElement(Hg,{position:$,centerX:q,centerY:j,radius:R,onMouseDown:Tt,onMouseEnter:Ht,onMouseOut:zt,type:"source"}),(ce==="target"||ce===!0)&&W.createElement(Hg,{position:B,centerX:I,centerY:G,radius:R,onMouseDown:Mt,onMouseEnter:Ht,onMouseOut:zt,type:"target"})))};return i.displayName="EdgeWrapper",z.memo(i)};function BA(t){const i={default:pa(t.default||Ku),straight:pa(t.bezier||Rd),step:pa(t.step||Dd),smoothstep:pa(t.step||uc),simplebezier:pa(t.simplebezier||Od)},a={},r=Object.keys(t).filter(u=>!["default","bezier"].includes(u)).reduce((u,f)=>(u[f]=pa(t[f]||Ku),u),a);return{...i,...r}}function jg(t,i,a=null){const r=(a?.x||0)+i.x,u=(a?.y||0)+i.y,f=a?.width||i.width,s=a?.height||i.height;switch(t){case ve.Top:return{x:r+f/2,y:u};case ve.Right:return{x:r+f,y:u+s/2};case ve.Bottom:return{x:r+f/2,y:u+s};case ve.Left:return{x:r,y:u+s/2}}}function kg(t,i){return t?t.length===1||!i?t[0]:i&&t.find(a=>a.id===i)||null:null}const YA=(t,i,a,r,u,f)=>{const s=jg(a,t,i),h=jg(f,r,u);return{sourceX:s.x,sourceY:s.y,targetX:h.x,targetY:h.y}};function VA({sourcePos:t,targetPos:i,sourceWidth:a,sourceHeight:r,targetWidth:u,targetHeight:f,width:s,height:h,transform:p}){const m={x:Math.min(t.x,i.x),y:Math.min(t.y,i.y),x2:Math.max(t.x+a,i.x+u),y2:Math.max(t.y+r,i.y+f)};m.x===m.x2&&(m.x2+=1),m.y===m.y2&&(m.y2+=1);const g=zd({x:(0-p[0])/p[2],y:(0-p[1])/p[2],width:s/p[2],height:h/p[2]}),v=Math.max(0,Math.min(g.x2,m.x2)-Math.max(g.x,m.x)),b=Math.max(0,Math.min(g.y2,m.y2)-Math.max(g.y,m.y));return Math.ceil(v*b)>0}function Ug(t){const i=t?.[lt]?.handleBounds||null,a=i&&t?.width&&t?.height&&typeof t?.positionAbsolute?.x<"u"&&typeof t?.positionAbsolute?.y<"u";return[{x:t?.positionAbsolute?.x||0,y:t?.positionAbsolute?.y||0,width:t?.width||0,height:t?.height||0},i,!!a]}const qA=[{level:0,isMaxLevel:!0,edges:[]}];function GA(t,i,a=!1){let r=-1;const u=t.reduce((s,h)=>{const p=xn(h.zIndex);let m=p?h.zIndex:0;if(a){const g=i.get(h.target),v=i.get(h.source),b=h.selected||g?.selected||v?.selected,E=Math.max(v?.[lt]?.z||0,g?.[lt]?.z||0,1e3);m=(p?h.zIndex:0)+(b?E:0)}return s[m]?s[m].push(h):s[m]=[h],r=m>r?m:r,s},{}),f=Object.entries(u).map(([s,h])=>{const p=+s;return{edges:h,level:p,isMaxLevel:p===r}});return f.length===0?qA:f}function XA(t,i,a){const r=et(z.useCallback(u=>t?u.edges.filter(f=>{const s=i.get(f.source),h=i.get(f.target);return s?.width&&s?.height&&h?.width&&h?.height&&VA({sourcePos:s.positionAbsolute||{x:0,y:0},targetPos:h.positionAbsolute||{x:0,y:0},sourceWidth:s.width,sourceHeight:s.height,targetWidth:h.width,targetHeight:h.height,width:u.width,height:u.height,transform:u.transform})}):u.edges,[t,i]));return GA(r,i,a)}const ZA=({color:t="none",strokeWidth:i=1})=>W.createElement("polyline",{style:{stroke:t,strokeWidth:i},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),QA=({color:t="none",strokeWidth:i=1})=>W.createElement("polyline",{style:{stroke:t,fill:t,strokeWidth:i},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"}),Lg={[$u.Arrow]:ZA,[$u.ArrowClosed]:QA};function $A(t){const i=xt();return z.useMemo(()=>Object.prototype.hasOwnProperty.call(Lg,t)?Lg[t]:(i.getState().onError?.("009",hl.error009(t)),null),[t])}const KA=({id:t,type:i,color:a,width:r=12.5,height:u=12.5,markerUnits:f="strokeWidth",strokeWidth:s,orient:h="auto-start-reverse"})=>{const p=$A(i);return p?W.createElement("marker",{className:"react-flow__arrowhead",id:t,markerWidth:`${r}`,markerHeight:`${u}`,viewBox:"-10 -10 20 20",markerUnits:f,orient:h,refX:"0",refY:"0"},W.createElement(p,{color:a,strokeWidth:s})):null},IA=({defaultColor:t,rfId:i})=>a=>{const r=[];return a.edges.reduce((u,f)=>([f.markerStart,f.markerEnd].forEach(s=>{if(s&&typeof s=="object"){const h=od(s,i);r.includes(h)||(u.push({id:h,color:s.color||t,...s}),r.push(h))}}),u),[]).sort((u,f)=>u.id.localeCompare(f.id))},Hv=({defaultColor:t,rfId:i})=>{const a=et(z.useCallback(IA({defaultColor:t,rfId:i}),[t,i]),(r,u)=>!(r.length!==u.length||r.some((f,s)=>f.id!==u[s].id)));return W.createElement("defs",null,a.map(r=>W.createElement(KA,{id:r.id,key:r.id,type:r.type,color:r.color,width:r.width,height:r.height,markerUnits:r.markerUnits,strokeWidth:r.strokeWidth,orient:r.orient})))};Hv.displayName="MarkerDefinitions";var FA=z.memo(Hv);const JA=t=>({nodesConnectable:t.nodesConnectable,edgesFocusable:t.edgesFocusable,edgesUpdatable:t.edgesUpdatable,elementsSelectable:t.elementsSelectable,width:t.width,height:t.height,connectionMode:t.connectionMode,nodeInternals:t.nodeInternals,onError:t.onError}),jv=({defaultMarkerColor:t,onlyRenderVisibleElements:i,elevateEdgesOnSelect:a,rfId:r,edgeTypes:u,noPanClassName:f,onEdgeContextMenu:s,onEdgeMouseEnter:h,onEdgeMouseMove:p,onEdgeMouseLeave:m,onEdgeClick:g,onEdgeDoubleClick:v,onReconnect:b,onReconnectStart:E,onReconnectEnd:C,reconnectRadius:N,children:T,disableKeyboardA11y:M})=>{const{edgesFocusable:D,edgesUpdatable:q,elementsSelectable:j,width:I,height:G,connectionMode:$,nodeInternals:B,onError:ee}=et(JA,Kt),oe=XA(i,B,a);return I?W.createElement(W.Fragment,null,oe.map(({level:re,edges:ue,isMaxLevel:ie})=>W.createElement("svg",{key:re,style:{zIndex:re},width:I,height:G,className:"react-flow__edges react-flow__container"},ie&&W.createElement(FA,{defaultColor:t,rfId:r}),W.createElement("g",null,ue.map(x=>{const[H,w,R]=Ug(B.get(x.source)),[X,L,Y]=Ug(B.get(x.target));if(!R||!Y)return null;let _=x.type||"default";u[_]||(ee?.("011",hl.error011(_)),_="default");const U=u[_]||u.default,F=$===Mi.Strict?L.target:(L.target??[]).concat(L.source??[]),P=kg(w.source,x.sourceHandle),ae=kg(F,x.targetHandle),ce=P?.position||ve.Bottom,fe=ae?.position||ve.Top,be=!!(x.focusable||D&&typeof x.focusable>"u"),de=x.reconnectable||x.updatable,Ae=typeof b<"u"&&(de||q&&typeof de>"u");if(!P||!ae)return ee?.("008",hl.error008(P,x)),null;const{sourceX:Re,sourceY:Ve,targetX:Pe,targetY:Ye}=YA(H,P,ce,X,ae,fe);return W.createElement(U,{key:x.id,id:x.id,className:Dt([x.className,f]),type:_,data:x.data,selected:!!x.selected,animated:!!x.animated,hidden:!!x.hidden,label:x.label,labelStyle:x.labelStyle,labelShowBg:x.labelShowBg,labelBgStyle:x.labelBgStyle,labelBgPadding:x.labelBgPadding,labelBgBorderRadius:x.labelBgBorderRadius,style:x.style,source:x.source,target:x.target,sourceHandleId:x.sourceHandle,targetHandleId:x.targetHandle,markerEnd:x.markerEnd,markerStart:x.markerStart,sourceX:Re,sourceY:Ve,targetX:Pe,targetY:Ye,sourcePosition:ce,targetPosition:fe,elementsSelectable:j,onContextMenu:s,onMouseEnter:h,onMouseMove:p,onMouseLeave:m,onClick:g,onEdgeDoubleClick:v,onReconnect:b,onReconnectStart:E,onReconnectEnd:C,reconnectRadius:N,rfId:r,ariaLabel:x.ariaLabel,isFocusable:be,isReconnectable:Ae,pathOptions:"pathOptions"in x?x.pathOptions:void 0,interactionWidth:x.interactionWidth,disableKeyboardA11y:M})})))),T):null};jv.displayName="EdgeRenderer";var WA=z.memo(jv);const PA=t=>`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]})`;function e3({children:t}){const i=et(PA);return W.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:i}},t)}function t3(t){const i=cc(),a=z.useRef(!1);z.useEffect(()=>{!a.current&&i.viewportInitialized&&t&&(setTimeout(()=>t(i),1),a.current=!0)},[t,i.viewportInitialized])}const n3={[ve.Left]:ve.Right,[ve.Right]:ve.Left,[ve.Top]:ve.Bottom,[ve.Bottom]:ve.Top},kv=({nodeId:t,handleType:i,style:a,type:r=Kl.Bezier,CustomComponent:u,connectionStatus:f})=>{const{fromNode:s,handleId:h,toX:p,toY:m,connectionMode:g}=et(z.useCallback(G=>({fromNode:G.nodeInternals.get(t),handleId:G.connectionHandleId,toX:(G.connectionPosition.x-G.transform[0])/G.transform[2],toY:(G.connectionPosition.y-G.transform[1])/G.transform[2],connectionMode:G.connectionMode}),[t]),Kt),v=s?.[lt]?.handleBounds;let b=v?.[i];if(g===Mi.Loose&&(b=b||v?.[i==="source"?"target":"source"]),!s||!b)return null;const E=h?b.find(G=>G.id===h):b[0],C=E?E.x+E.width/2:(s.width??0)/2,N=E?E.y+E.height/2:s.height??0,T=(s.positionAbsolute?.x??0)+C,M=(s.positionAbsolute?.y??0)+N,D=E?.position,q=D?n3[D]:null;if(!D||!q)return null;if(u)return W.createElement(u,{connectionLineType:r,connectionLineStyle:a,fromNode:s,fromHandle:E,fromX:T,fromY:M,toX:p,toY:m,fromPosition:D,toPosition:q,connectionStatus:f});let j="";const I={sourceX:T,sourceY:M,sourcePosition:D,targetX:p,targetY:m,targetPosition:q};return r===Kl.Bezier?[j]=lv(I):r===Kl.Step?[j]=ad({...I,borderRadius:0}):r===Kl.SmoothStep?[j]=ad(I):r===Kl.SimpleBezier?[j]=nv(I):j=`M${T},${M} ${p},${m}`,W.createElement("path",{d:j,fill:"none",className:"react-flow__connection-path",style:a})};kv.displayName="ConnectionLine";const l3=t=>({nodeId:t.connectionNodeId,handleType:t.connectionHandleType,nodesConnectable:t.nodesConnectable,connectionStatus:t.connectionStatus,width:t.width,height:t.height});function i3({containerStyle:t,style:i,type:a,component:r}){const{nodeId:u,handleType:f,nodesConnectable:s,width:h,height:p,connectionStatus:m}=et(l3,Kt);return!(u&&f&&h&&s)?null:W.createElement("svg",{style:t,width:h,height:p,className:"react-flow__edges react-flow__connectionline react-flow__container"},W.createElement("g",{className:Dt(["react-flow__connection",m])},W.createElement(kv,{nodeId:u,handleType:f,style:i,type:a,CustomComponent:r,connectionStatus:m})))}function Bg(t,i){return z.useRef(null),xt(),z.useMemo(()=>i(t),[t])}const Uv=({nodeTypes:t,edgeTypes:i,onMove:a,onMoveStart:r,onMoveEnd:u,onInit:f,onNodeClick:s,onEdgeClick:h,onNodeDoubleClick:p,onEdgeDoubleClick:m,onNodeMouseEnter:g,onNodeMouseMove:v,onNodeMouseLeave:b,onNodeContextMenu:E,onSelectionContextMenu:C,onSelectionStart:N,onSelectionEnd:T,connectionLineType:M,connectionLineStyle:D,connectionLineComponent:q,connectionLineContainerStyle:j,selectionKeyCode:I,selectionOnDrag:G,selectionMode:$,multiSelectionKeyCode:B,panActivationKeyCode:ee,zoomActivationKeyCode:oe,deleteKeyCode:re,onlyRenderVisibleElements:ue,elementsSelectable:ie,selectNodesOnDrag:x,defaultViewport:H,translateExtent:w,minZoom:R,maxZoom:X,preventScrolling:L,defaultMarkerColor:Y,zoomOnScroll:_,zoomOnPinch:U,panOnScroll:F,panOnScrollSpeed:P,panOnScrollMode:ae,zoomOnDoubleClick:ce,panOnDrag:fe,onPaneClick:be,onPaneMouseEnter:de,onPaneMouseMove:Ae,onPaneMouseLeave:Re,onPaneScroll:Ve,onPaneContextMenu:Pe,onEdgeContextMenu:Ye,onEdgeMouseEnter:He,onEdgeMouseMove:pt,onEdgeMouseLeave:je,onReconnect:se,onReconnectStart:ke,onReconnectEnd:Bt,reconnectRadius:an,noDragClassName:Tn,noWheelClassName:bn,noPanClassName:Fe,elevateEdgesOnSelect:Tt,disableKeyboardA11y:Mt,nodeOrigin:Ht,nodeExtent:zt,rfId:on})=>{const ml=Bg(t,DA),bt=Bg(i,BA);return t3(f),W.createElement(zA,{onPaneClick:be,onPaneMouseEnter:de,onPaneMouseMove:Ae,onPaneMouseLeave:Re,onPaneContextMenu:Pe,onPaneScroll:Ve,deleteKeyCode:re,selectionKeyCode:I,selectionOnDrag:G,selectionMode:$,onSelectionStart:N,onSelectionEnd:T,multiSelectionKeyCode:B,panActivationKeyCode:ee,zoomActivationKeyCode:oe,elementsSelectable:ie,onMove:a,onMoveStart:r,onMoveEnd:u,zoomOnScroll:_,zoomOnPinch:U,zoomOnDoubleClick:ce,panOnScroll:F,panOnScrollSpeed:P,panOnScrollMode:ae,panOnDrag:fe,defaultViewport:H,translateExtent:w,minZoom:R,maxZoom:X,onSelectionContextMenu:C,preventScrolling:L,noDragClassName:Tn,noWheelClassName:bn,noPanClassName:Fe,disableKeyboardA11y:Mt},W.createElement(e3,null,W.createElement(WA,{edgeTypes:bt,onEdgeClick:h,onEdgeDoubleClick:m,onlyRenderVisibleElements:ue,onEdgeContextMenu:Ye,onEdgeMouseEnter:He,onEdgeMouseMove:pt,onEdgeMouseLeave:je,onReconnect:se,onReconnectStart:ke,onReconnectEnd:Bt,reconnectRadius:an,defaultMarkerColor:Y,noPanClassName:Fe,elevateEdgesOnSelect:!!Tt,disableKeyboardA11y:Mt,rfId:on},W.createElement(i3,{style:D,type:M,component:q,containerStyle:j})),W.createElement("div",{className:"react-flow__edgelabel-renderer"}),W.createElement(jA,{nodeTypes:ml,onNodeClick:s,onNodeDoubleClick:p,onNodeMouseEnter:g,onNodeMouseMove:v,onNodeMouseLeave:b,onNodeContextMenu:E,selectNodesOnDrag:x,onlyRenderVisibleElements:ue,noPanClassName:Fe,noDragClassName:Tn,disableKeyboardA11y:Mt,nodeOrigin:Ht,nodeExtent:zt,rfId:on})))};Uv.displayName="GraphView";var a3=z.memo(Uv);const sd=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Gl={rfId:"1",width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:sd,nodeExtent:sd,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:Mi.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:[0,0],nodeDragThreshold:0,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesUpdatable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,onSelectionChange:[],multiSelectionActive:!1,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,connectionRadius:20,onError:j_,isValidConnection:void 0},o3=()=>IS((t,i)=>({...Gl,setNodes:a=>{const{nodeInternals:r,nodeOrigin:u,elevateNodesOnSelect:f}=i();t({nodeInternals:Yf(a,r,u,f)})},getNodes:()=>Array.from(i().nodeInternals.values()),setEdges:a=>{const{defaultEdgeOptions:r={}}=i();t({edges:a.map(u=>({...r,...u}))})},setDefaultNodesAndEdges:(a,r)=>{const u=typeof a<"u",f=typeof r<"u",s=u?Yf(a,new Map,i().nodeOrigin,i().elevateNodesOnSelect):new Map;t({nodeInternals:s,edges:f?r:[],hasDefaultNodes:u,hasDefaultEdges:f})},updateNodeDimensions:a=>{const{onNodesChange:r,nodeInternals:u,fitViewOnInit:f,fitViewOnInitDone:s,fitViewOnInitOptions:h,domNode:p,nodeOrigin:m}=i(),g=p?.querySelector(".react-flow__viewport");if(!g)return;const v=window.getComputedStyle(g),{m22:b}=new window.DOMMatrixReadOnly(v.transform),E=a.reduce((N,T)=>{const M=u.get(T.id);if(M?.hidden)u.set(M.id,{...M,[lt]:{...M[lt],handleBounds:void 0}});else if(M){const D=Td(T.nodeElement);D.width&&D.height&&(M.width!==D.width||M.height!==D.height||T.forceUpdate)&&(u.set(M.id,{...M,[lt]:{...M[lt],handleBounds:{source:Dg(".source",T.nodeElement,b,m),target:Dg(".target",T.nodeElement,b,m)}},...D}),N.push({id:M.id,type:"dimensions",dimensions:D}))}return N},[]);wv(u,m);const C=s||f&&!s&&Ev(i,{initial:!0,...h});t({nodeInternals:new Map(u),fitViewOnInitDone:C}),E?.length>0&&r?.(E)},updateNodePositions:(a,r=!0,u=!1)=>{const{triggerNodeChanges:f}=i(),s=a.map(h=>{const p={id:h.id,type:"position",dragging:u};return r&&(p.positionAbsolute=h.positionAbsolute,p.position=h.position),p});f(s)},triggerNodeChanges:a=>{const{onNodesChange:r,nodeInternals:u,hasDefaultNodes:f,nodeOrigin:s,getNodes:h,elevateNodesOnSelect:p}=i();if(a?.length){if(f){const m=Av(a,h()),g=Yf(m,u,s,p);t({nodeInternals:g})}r?.(a)}},addSelectedNodes:a=>{const{multiSelectionActive:r,edges:u,getNodes:f}=i();let s,h=null;r?s=a.map(p=>$l(p,!0)):(s=ya(f(),a),h=ya(u,[])),Ou({changedNodes:s,changedEdges:h,get:i,set:t})},addSelectedEdges:a=>{const{multiSelectionActive:r,edges:u,getNodes:f}=i();let s,h=null;r?s=a.map(p=>$l(p,!0)):(s=ya(u,a),h=ya(f(),[])),Ou({changedNodes:h,changedEdges:s,get:i,set:t})},unselectNodesAndEdges:({nodes:a,edges:r}={})=>{const{edges:u,getNodes:f}=i(),s=a||f(),h=r||u,p=s.map(g=>(g.selected=!1,$l(g.id,!1))),m=h.map(g=>$l(g.id,!1));Ou({changedNodes:p,changedEdges:m,get:i,set:t})},setMinZoom:a=>{const{d3Zoom:r,maxZoom:u}=i();r?.scaleExtent([a,u]),t({minZoom:a})},setMaxZoom:a=>{const{d3Zoom:r,minZoom:u}=i();r?.scaleExtent([u,a]),t({maxZoom:a})},setTranslateExtent:a=>{i().d3Zoom?.translateExtent(a),t({translateExtent:a})},resetSelectedElements:()=>{const{edges:a,getNodes:r}=i(),f=r().filter(h=>h.selected).map(h=>$l(h.id,!1)),s=a.filter(h=>h.selected).map(h=>$l(h.id,!1));Ou({changedNodes:f,changedEdges:s,get:i,set:t})},setNodeExtent:a=>{const{nodeInternals:r}=i();r.forEach(u=>{u.positionAbsolute=Md(u.position,a)}),t({nodeExtent:a,nodeInternals:new Map(r)})},panBy:a=>{const{transform:r,width:u,height:f,d3Zoom:s,d3Selection:h,translateExtent:p}=i();if(!s||!h||!a.x&&!a.y)return!1;const m=Il.translate(r[0]+a.x,r[1]+a.y).scale(r[2]),g=[[0,0],[u,f]],v=s?.constrain()(m,g,p);return s.transform(h,v),r[0]!==v.x||r[1]!==v.y||r[2]!==v.k},cancelConnection:()=>t({connectionNodeId:Gl.connectionNodeId,connectionHandleId:Gl.connectionHandleId,connectionHandleType:Gl.connectionHandleType,connectionStatus:Gl.connectionStatus,connectionStartHandle:Gl.connectionStartHandle,connectionEndHandle:Gl.connectionEndHandle}),reset:()=>t({...Gl})}),Object.is),Bd=({children:t})=>{const i=z.useRef(null);return i.current||(i.current=o3()),W.createElement(C_,{value:i.current},t)};Bd.displayName="ReactFlowProvider";const Lv=({children:t})=>z.useContext(rc)?W.createElement(W.Fragment,null,t):W.createElement(Bd,null,t);Lv.displayName="ReactFlowWrapper";const r3={input:mv,default:ud,output:yv,group:Ud},u3={default:Ku,straight:Rd,step:Dd,smoothstep:uc,simplebezier:Od},c3=[0,0],s3=[15,15],f3={x:0,y:0,zoom:1},d3={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},Bv=z.forwardRef(({nodes:t,edges:i,defaultNodes:a,defaultEdges:r,className:u,nodeTypes:f=r3,edgeTypes:s=u3,onNodeClick:h,onEdgeClick:p,onInit:m,onMove:g,onMoveStart:v,onMoveEnd:b,onConnect:E,onConnectStart:C,onConnectEnd:N,onClickConnectStart:T,onClickConnectEnd:M,onNodeMouseEnter:D,onNodeMouseMove:q,onNodeMouseLeave:j,onNodeContextMenu:I,onNodeDoubleClick:G,onNodeDragStart:$,onNodeDrag:B,onNodeDragStop:ee,onNodesDelete:oe,onEdgesDelete:re,onSelectionChange:ue,onSelectionDragStart:ie,onSelectionDrag:x,onSelectionDragStop:H,onSelectionContextMenu:w,onSelectionStart:R,onSelectionEnd:X,connectionMode:L=Mi.Strict,connectionLineType:Y=Kl.Bezier,connectionLineStyle:_,connectionLineComponent:U,connectionLineContainerStyle:F,deleteKeyCode:P="Backspace",selectionKeyCode:ae="Shift",selectionOnDrag:ce=!1,selectionMode:fe=Xo.Full,panActivationKeyCode:be="Space",multiSelectionKeyCode:de=Qu()?"Meta":"Control",zoomActivationKeyCode:Ae=Qu()?"Meta":"Control",snapToGrid:Re=!1,snapGrid:Ve=s3,onlyRenderVisibleElements:Pe=!1,selectNodesOnDrag:Ye=!0,nodesDraggable:He,nodesConnectable:pt,nodesFocusable:je,nodeOrigin:se=c3,edgesFocusable:ke,edgesUpdatable:Bt,elementsSelectable:an,defaultViewport:Tn=f3,minZoom:bn=.5,maxZoom:Fe=2,translateExtent:Tt=sd,preventScrolling:Mt=!0,nodeExtent:Ht,defaultMarkerColor:zt="#b1b1b7",zoomOnScroll:on=!0,zoomOnPinch:ml=!0,panOnScroll:bt=!1,panOnScrollSpeed:rn=.5,panOnScrollMode:It=Ai.Free,zoomOnDoubleClick:it=!0,panOnDrag:jt=!0,onPaneClick:Je,onPaneMouseEnter:Yn,onPaneMouseMove:Oa,onPaneMouseLeave:Da,onPaneScroll:Mn,onPaneContextMenu:gl,children:ti,onEdgeContextMenu:kt,onEdgeDoubleClick:Oi,onEdgeMouseEnter:ni,onEdgeMouseMove:dc,onEdgeMouseLeave:tr,onEdgeUpdate:Ra,onEdgeUpdateStart:li,onEdgeUpdateEnd:hc,onReconnect:nr,onReconnectStart:lr,onReconnectEnd:ir,reconnectRadius:Ha=10,edgeUpdaterRadius:ja=10,onNodesChange:ar,onEdgesChange:or,noDragClassName:zn="nodrag",noWheelClassName:mt="nowheel",noPanClassName:wt="nopan",fitView:yl=!1,fitViewOptions:ka,connectOnClick:pc=!0,attributionPosition:mc,proOptions:rr,defaultEdgeOptions:ii,elevateNodesOnSelect:Ua=!0,elevateEdgesOnSelect:vl=!1,disableKeyboardA11y:Vn=!1,autoPanOnConnect:ai=!0,autoPanOnNodeDrag:xl=!0,connectionRadius:rt=20,isValidConnection:ur,onError:cr,style:qn,id:Gn,nodeDragThreshold:gc,...sr},fr)=>{const La=Gn||"1";return W.createElement("div",{...sr,style:{...qn,...d3},ref:fr,className:Dt(["react-flow",u]),"data-testid":"rf__wrapper",id:Gn},W.createElement(Lv,null,W.createElement(a3,{onInit:m,onMove:g,onMoveStart:v,onMoveEnd:b,onNodeClick:h,onEdgeClick:p,onNodeMouseEnter:D,onNodeMouseMove:q,onNodeMouseLeave:j,onNodeContextMenu:I,onNodeDoubleClick:G,nodeTypes:f,edgeTypes:s,connectionLineType:Y,connectionLineStyle:_,connectionLineComponent:U,connectionLineContainerStyle:F,selectionKeyCode:ae,selectionOnDrag:ce,selectionMode:fe,deleteKeyCode:P,multiSelectionKeyCode:de,panActivationKeyCode:be,zoomActivationKeyCode:Ae,onlyRenderVisibleElements:Pe,selectNodesOnDrag:Ye,defaultViewport:Tn,translateExtent:Tt,minZoom:bn,maxZoom:Fe,preventScrolling:Mt,zoomOnScroll:on,zoomOnPinch:ml,zoomOnDoubleClick:it,panOnScroll:bt,panOnScrollSpeed:rn,panOnScrollMode:It,panOnDrag:jt,onPaneClick:Je,onPaneMouseEnter:Yn,onPaneMouseMove:Oa,onPaneMouseLeave:Da,onPaneScroll:Mn,onPaneContextMenu:gl,onSelectionContextMenu:w,onSelectionStart:R,onSelectionEnd:X,onEdgeContextMenu:kt,onEdgeDoubleClick:Oi,onEdgeMouseEnter:ni,onEdgeMouseMove:dc,onEdgeMouseLeave:tr,onReconnect:nr??Ra,onReconnectStart:lr??li,onReconnectEnd:ir??hc,reconnectRadius:Ha??ja,defaultMarkerColor:zt,noDragClassName:zn,noWheelClassName:mt,noPanClassName:wt,elevateEdgesOnSelect:vl,rfId:La,disableKeyboardA11y:Vn,nodeOrigin:se,nodeExtent:Ht}),W.createElement(lA,{nodes:t,edges:i,defaultNodes:a,defaultEdges:r,onConnect:E,onConnectStart:C,onConnectEnd:N,onClickConnectStart:T,onClickConnectEnd:M,nodesDraggable:He,nodesConnectable:pt,nodesFocusable:je,edgesFocusable:ke,edgesUpdatable:Bt,elementsSelectable:an,elevateNodesOnSelect:Ua,minZoom:bn,maxZoom:Fe,nodeExtent:Ht,onNodesChange:ar,onEdgesChange:or,snapToGrid:Re,snapGrid:Ve,connectionMode:L,translateExtent:Tt,connectOnClick:pc,defaultEdgeOptions:ii,fitView:yl,fitViewOptions:ka,onNodesDelete:oe,onEdgesDelete:re,onNodeDragStart:$,onNodeDrag:B,onNodeDragStop:ee,onSelectionDrag:x,onSelectionDragStart:ie,onSelectionDragStop:H,noPanClassName:wt,nodeOrigin:se,rfId:La,autoPanOnConnect:ai,autoPanOnNodeDrag:xl,onError:cr,connectionRadius:rt,isValidConnection:ur,nodeDragThreshold:gc}),W.createElement(tA,{onSelectionChange:ue}),ti,W.createElement(M_,{proOptions:rr,position:mc}),W.createElement(uA,{rfId:La,disableKeyboardA11y:Vn})))});Bv.displayName="ReactFlow";function Yv(t){return i=>{const[a,r]=z.useState(i),u=z.useCallback(f=>r(s=>t(f,s)),[]);return[a,r,u]}}const h3=Yv(Av),p3=Yv(wA);function m3(t,i){if(Object.is(t,i))return!0;if(typeof t!="object"||t===null||typeof i!="object"||i===null)return!1;if(t instanceof Map&&i instanceof Map){if(t.size!==i.size)return!1;for(const[r,u]of t)if(!Object.is(u,i.get(r)))return!1;return!0}if(t instanceof Set&&i instanceof Set){if(t.size!==i.size)return!1;for(const r of t)if(!i.has(r))return!1;return!0}const a=Object.keys(t);if(a.length!==Object.keys(i).length)return!1;for(const r of a)if(!Object.prototype.hasOwnProperty.call(i,r)||!Object.is(t[r],i[r]))return!1;return!0}function g3(){return W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},W.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function y3(){return W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},W.createElement("path",{d:"M0 0h32v4.2H0z"}))}function v3(){return W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},W.createElement("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 x3(){return W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},W.createElement("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 b3(){return W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},W.createElement("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"}))}const Uo=({children:t,className:i,...a})=>W.createElement("button",{type:"button",className:Dt(["react-flow__controls-button",i]),...a},t);Uo.displayName="ControlButton";const S3=t=>({isInteractive:t.nodesDraggable||t.nodesConnectable||t.elementsSelectable,minZoomReached:t.transform[2]<=t.minZoom,maxZoomReached:t.transform[2]>=t.maxZoom}),Vv=({style:t,showZoom:i=!0,showFitView:a=!0,showInteractive:r=!0,fitViewOptions:u,onZoomIn:f,onZoomOut:s,onFitView:h,onInteractiveChange:p,className:m,children:g,position:v="bottom-left"})=>{const b=xt(),[E,C]=z.useState(!1),{isInteractive:N,minZoomReached:T,maxZoomReached:M}=et(S3,m3),{zoomIn:D,zoomOut:q,fitView:j}=cc();if(z.useEffect(()=>{C(!0)},[]),!E)return null;const I=()=>{D(),f?.()},G=()=>{q(),s?.()},$=()=>{j(u),h?.()},B=()=>{b.setState({nodesDraggable:!N,nodesConnectable:!N,elementsSelectable:!N}),p?.(!N)};return W.createElement(Iy,{className:Dt(["react-flow__controls",m]),position:v,style:t,"data-testid":"rf__controls"},i&&W.createElement(W.Fragment,null,W.createElement(Uo,{onClick:I,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:M},W.createElement(g3,null)),W.createElement(Uo,{onClick:G,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:T},W.createElement(y3,null))),a&&W.createElement(Uo,{className:"react-flow__controls-fitview",onClick:$,title:"fit view","aria-label":"fit view"},W.createElement(v3,null)),r&&W.createElement(Uo,{className:"react-flow__controls-interactive",onClick:B,title:"toggle interactivity","aria-label":"toggle interactivity"},N?W.createElement(b3,null):W.createElement(x3,null)),g)};Vv.displayName="Controls";var w3=z.memo(Vv);function E3(t,i){if(Object.is(t,i))return!0;if(typeof t!="object"||t===null||typeof i!="object"||i===null)return!1;if(t instanceof Map&&i instanceof Map){if(t.size!==i.size)return!1;for(const[r,u]of t)if(!Object.is(u,i.get(r)))return!1;return!0}if(t instanceof Set&&i instanceof Set){if(t.size!==i.size)return!1;for(const r of t)if(!i.has(r))return!1;return!0}const a=Object.keys(t);if(a.length!==Object.keys(i).length)return!1;for(const r of a)if(!Object.prototype.hasOwnProperty.call(i,r)||!Object.is(t[r],i[r]))return!1;return!0}var An;(function(t){t.Lines="lines",t.Dots="dots",t.Cross="cross"})(An||(An={}));function _3({color:t,dimensions:i,lineWidth:a}){return W.createElement("path",{stroke:t,strokeWidth:a,d:`M${i[0]/2} 0 V${i[1]} M0 ${i[1]/2} H${i[0]}`})}function A3({color:t,radius:i}){return W.createElement("circle",{cx:i,cy:i,r:i,fill:t})}const N3={[An.Dots]:"#91919a",[An.Lines]:"#eee",[An.Cross]:"#e2e2e2"},C3={[An.Dots]:1,[An.Lines]:1,[An.Cross]:6},T3=t=>({transform:t.transform,patternId:`pattern-${t.rfId}`});function qv({id:t,variant:i=An.Dots,gap:a=20,size:r,lineWidth:u=1,offset:f=2,color:s,style:h,className:p}){const m=z.useRef(null),{transform:g,patternId:v}=et(T3,E3),b=s||N3[i],E=r||C3[i],C=i===An.Dots,N=i===An.Cross,T=Array.isArray(a)?a:[a,a],M=[T[0]*g[2]||1,T[1]*g[2]||1],D=E*g[2],q=N?[D,D]:M,j=C?[D/f,D/f]:[q[0]/f,q[1]/f];return W.createElement("svg",{className:Dt(["react-flow__background",p]),style:{...h,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:m,"data-testid":"rf__background"},W.createElement("pattern",{id:v+t,x:g[0]%M[0],y:g[1]%M[1],width:M[0],height:M[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${j[0]},-${j[1]})`},C?W.createElement(A3,{color:b,radius:D/f}):W.createElement(_3,{dimensions:q,color:b,lineWidth:u})),W.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${v+t})`}))}qv.displayName="Background";var M3=z.memo(qv),Aa;(function(t){t.Line="line",t.Handle="handle"})(Aa||(Aa={}));function z3({width:t,prevWidth:i,height:a,prevHeight:r,invertX:u,invertY:f}){const s=t-i,h=a-r,p=[s>0?1:s<0?-1:0,h>0?1:h<0?-1:0];return s&&u&&(p[0]=p[0]*-1),h&&f&&(p[1]=p[1]*-1),p}const Gv={width:0,height:0,x:0,y:0},O3={...Gv,pointerX:0,pointerY:0,aspectRatio:1};function D3({nodeId:t,position:i,variant:a=Aa.Handle,className:r,style:u={},children:f,color:s,minWidth:h=10,minHeight:p=10,maxWidth:m=Number.MAX_VALUE,maxHeight:g=Number.MAX_VALUE,keepAspectRatio:v=!1,shouldResize:b,onResizeStart:E,onResize:C,onResizeEnd:N}){const T=iv(),M=typeof t=="string"?t:T,D=xt(),q=z.useRef(null),j=z.useRef(O3),I=z.useRef(Gv),G=Mv(),$=a===Aa.Line?"right":"bottom-right",B=i??$;z.useEffect(()=>{if(!q.current||!M)return;const ue=vn(q.current),ie=B.includes("right")||B.includes("left"),x=B.includes("bottom")||B.includes("top"),H=B.includes("left"),w=B.includes("top"),R=Hy().on("start",X=>{const L=D.getState().nodeInternals.get(M),{xSnapped:Y,ySnapped:_}=G(X);I.current={width:L?.width??0,height:L?.height??0,x:L?.position.x??0,y:L?.position.y??0},j.current={...I.current,pointerX:Y,pointerY:_,aspectRatio:I.current.width/I.current.height},E?.(X,{...I.current})}).on("drag",X=>{const{nodeInternals:L,triggerNodeChanges:Y}=D.getState(),{xSnapped:_,ySnapped:U}=G(X),F=L.get(M);if(F){const P=[],{pointerX:ae,pointerY:ce,width:fe,height:be,x:de,y:Ae,aspectRatio:Re}=j.current,{x:Ve,y:Pe,width:Ye,height:He}=I.current,pt=Math.floor(ie?_-ae:0),je=Math.floor(x?U-ce:0);let se=Wl(fe+(H?-pt:pt),h,m),ke=Wl(be+(w?-je:je),p,g);if(v){const Tt=se/ke,Mt=ie&&x,Ht=ie&&!x,zt=x&&!ie;se=Tt<=Re&&Mt||zt?ke*Re:se,ke=Tt>Re&&Mt||Ht?se/Re:ke,se>=m?(se=m,ke=m/Re):se<=h&&(se=h,ke=h/Re),ke>=g?(ke=g,se=g*Re):ke<=p&&(ke=p,se=p*Re)}const Bt=se!==Ye,an=ke!==He;if(H||w){const Tt=H?de-(se-fe):de,Mt=w?Ae-(ke-be):Ae,Ht=Tt!==Ve&&Bt,zt=Mt!==Pe&&an;if(Ht||zt){const on={id:F.id,type:"position",position:{x:Ht?Tt:Ve,y:zt?Mt:Pe}};P.push(on),I.current.x=on.position.x,I.current.y=on.position.y}}if(Bt||an){const Tt={id:M,type:"dimensions",updateStyle:!0,resizing:!0,dimensions:{width:se,height:ke}};P.push(Tt),I.current.width=se,I.current.height=ke}if(P.length===0)return;const Tn=z3({width:I.current.width,prevWidth:Ye,height:I.current.height,prevHeight:He,invertX:H,invertY:w}),bn={...I.current,direction:Tn};if(b?.(X,bn)===!1)return;C?.(X,bn),Y(P)}}).on("end",X=>{const L={id:M,type:"dimensions",resizing:!1};N?.(X,{...I.current}),D.getState().triggerNodeChanges([L])});return ue.call(R),()=>{ue.on(".drag",null)}},[M,B,h,p,m,g,v,G,E,C,N]);const ee=B.split("-"),oe=a===Aa.Line?"borderColor":"backgroundColor",re=s?{...u,[oe]:s}:u;return W.createElement("div",{className:Dt(["react-flow__resize-control","nodrag",...ee,a,r]),ref:q,style:re},f)}var Yg=z.memo(D3);const R3=["top-left","top-right","bottom-left","bottom-right"],H3=["top","right","bottom","left"];function Xv({nodeId:t,isVisible:i=!0,handleClassName:a,handleStyle:r,lineClassName:u,lineStyle:f,color:s,minWidth:h=10,minHeight:p=10,maxWidth:m=Number.MAX_VALUE,maxHeight:g=Number.MAX_VALUE,keepAspectRatio:v=!1,shouldResize:b,onResizeStart:E,onResize:C,onResizeEnd:N}){return i?W.createElement(W.Fragment,null,H3.map(T=>W.createElement(Yg,{key:T,className:u,style:f,nodeId:t,position:T,variant:Aa.Line,color:s,minWidth:h,minHeight:p,maxWidth:m,maxHeight:g,onResizeStart:E,keepAspectRatio:v,shouldResize:b,onResize:C,onResizeEnd:N})),R3.map(T=>W.createElement(Yg,{key:T,className:a,style:r,nodeId:t,position:T,color:s,minWidth:h,minHeight:p,maxWidth:m,maxHeight:g,onResizeStart:E,keepAspectRatio:v,shouldResize:b,onResize:C,onResizeEnd:N}))):null}const Vg=t=>{let i;const a=new Set,r=(m,g)=>{const v=typeof m=="function"?m(i):m;if(!Object.is(v,i)){const b=i;i=g??(typeof v!="object"||v===null)?v:Object.assign({},i,v),a.forEach(E=>E(i,b))}},u=()=>i,h={setState:r,getState:u,getInitialState:()=>p,subscribe:m=>(a.add(m),()=>a.delete(m))},p=i=t(r,u,h);return h},j3=(t=>t?Vg(t):Vg),k3=t=>t;function U3(t,i=k3){const a=W.useSyncExternalStore(t.subscribe,W.useCallback(()=>i(t.getState()),[t,i]),W.useCallback(()=>i(t.getInitialState()),[t,i]));return W.useDebugValue(a),a}const qg=t=>{const i=j3(t),a=r=>U3(i,r);return Object.assign(a,i),a},L3=(t=>t?qg(t):qg);function Zv(t){return typeof t>"u"||t===null}function B3(t){return typeof t=="object"&&t!==null}function Y3(t){return Array.isArray(t)?t:Zv(t)?[]:[t]}function V3(t,i){var a,r,u,f;if(i)for(f=Object.keys(i),a=0,r=f.length;a<r;a+=1)u=f[a],t[u]=i[u];return t}function q3(t,i){var a="",r;for(r=0;r<i;r+=1)a+=t;return a}function G3(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}var X3=Zv,Z3=B3,Q3=Y3,$3=q3,K3=G3,I3=V3,vt={isNothing:X3,isObject:Z3,toArray:Q3,repeat:$3,isNegativeZero:K3,extend:I3};function Qv(t,i){var a="",r=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(a+='in "'+t.mark.name+'" '),a+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!i&&t.mark.snippet&&(a+=`
10
-
11
- `+t.mark.snippet),r+" "+a):r}function Qo(t,i){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=i,this.message=Qv(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Qo.prototype=Object.create(Error.prototype);Qo.prototype.constructor=Qo;Qo.prototype.toString=function(i){return this.name+": "+Qv(this,i)};var Lt=Qo;function Xf(t,i,a,r,u){var f="",s="",h=Math.floor(u/2)-1;return r-i>h&&(f=" ... ",i=r-h+f.length),a-r>h&&(s=" ...",a=r+h-s.length),{str:f+t.slice(i,a).replace(/\t/g,"→")+s,pos:r-i+f.length}}function Zf(t,i){return vt.repeat(" ",i-t.length)+t}function F3(t,i){if(i=Object.create(i||null),!t.buffer)return null;i.maxLength||(i.maxLength=79),typeof i.indent!="number"&&(i.indent=1),typeof i.linesBefore!="number"&&(i.linesBefore=3),typeof i.linesAfter!="number"&&(i.linesAfter=2);for(var a=/\r?\n|\r|\0/g,r=[0],u=[],f,s=-1;f=a.exec(t.buffer);)u.push(f.index),r.push(f.index+f[0].length),t.position<=f.index&&s<0&&(s=r.length-2);s<0&&(s=r.length-1);var h="",p,m,g=Math.min(t.line+i.linesAfter,u.length).toString().length,v=i.maxLength-(i.indent+g+3);for(p=1;p<=i.linesBefore&&!(s-p<0);p++)m=Xf(t.buffer,r[s-p],u[s-p],t.position-(r[s]-r[s-p]),v),h=vt.repeat(" ",i.indent)+Zf((t.line-p+1).toString(),g)+" | "+m.str+`
12
- `+h;for(m=Xf(t.buffer,r[s],u[s],t.position,v),h+=vt.repeat(" ",i.indent)+Zf((t.line+1).toString(),g)+" | "+m.str+`
13
- `,h+=vt.repeat("-",i.indent+g+3+m.pos)+`^
14
- `,p=1;p<=i.linesAfter&&!(s+p>=u.length);p++)m=Xf(t.buffer,r[s+p],u[s+p],t.position-(r[s]-r[s+p]),v),h+=vt.repeat(" ",i.indent)+Zf((t.line+p+1).toString(),g)+" | "+m.str+`
15
- `;return h.replace(/\n$/,"")}var J3=F3,W3=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],P3=["scalar","sequence","mapping"];function eN(t){var i={};return t!==null&&Object.keys(t).forEach(function(a){t[a].forEach(function(r){i[String(r)]=a})}),i}function tN(t,i){if(i=i||{},Object.keys(i).forEach(function(a){if(W3.indexOf(a)===-1)throw new Lt('Unknown option "'+a+'" is met in definition of "'+t+'" YAML type.')}),this.options=i,this.tag=t,this.kind=i.kind||null,this.resolve=i.resolve||function(){return!0},this.construct=i.construct||function(a){return a},this.instanceOf=i.instanceOf||null,this.predicate=i.predicate||null,this.represent=i.represent||null,this.representName=i.representName||null,this.defaultStyle=i.defaultStyle||null,this.multi=i.multi||!1,this.styleAliases=eN(i.styleAliases||null),P3.indexOf(this.kind)===-1)throw new Lt('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var Ct=tN;function Gg(t,i){var a=[];return t[i].forEach(function(r){var u=a.length;a.forEach(function(f,s){f.tag===r.tag&&f.kind===r.kind&&f.multi===r.multi&&(u=s)}),a[u]=r}),a}function nN(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},i,a;function r(u){u.multi?(t.multi[u.kind].push(u),t.multi.fallback.push(u)):t[u.kind][u.tag]=t.fallback[u.tag]=u}for(i=0,a=arguments.length;i<a;i+=1)arguments[i].forEach(r);return t}function fd(t){return this.extend(t)}fd.prototype.extend=function(i){var a=[],r=[];if(i instanceof Ct)r.push(i);else if(Array.isArray(i))r=r.concat(i);else if(i&&(Array.isArray(i.implicit)||Array.isArray(i.explicit)))i.implicit&&(a=a.concat(i.implicit)),i.explicit&&(r=r.concat(i.explicit));else throw new Lt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");a.forEach(function(f){if(!(f instanceof Ct))throw new Lt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(f.loadKind&&f.loadKind!=="scalar")throw new Lt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(f.multi)throw new Lt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(f){if(!(f instanceof Ct))throw new Lt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var u=Object.create(fd.prototype);return u.implicit=(this.implicit||[]).concat(a),u.explicit=(this.explicit||[]).concat(r),u.compiledImplicit=Gg(u,"implicit"),u.compiledExplicit=Gg(u,"explicit"),u.compiledTypeMap=nN(u.compiledImplicit,u.compiledExplicit),u};var $v=fd,Kv=new Ct("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),Iv=new Ct("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),Fv=new Ct("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),Jv=new $v({explicit:[Kv,Iv,Fv]});function lN(t){if(t===null)return!0;var i=t.length;return i===1&&t==="~"||i===4&&(t==="null"||t==="Null"||t==="NULL")}function iN(){return null}function aN(t){return t===null}var Wv=new Ct("tag:yaml.org,2002:null",{kind:"scalar",resolve:lN,construct:iN,predicate:aN,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function oN(t){if(t===null)return!1;var i=t.length;return i===4&&(t==="true"||t==="True"||t==="TRUE")||i===5&&(t==="false"||t==="False"||t==="FALSE")}function rN(t){return t==="true"||t==="True"||t==="TRUE"}function uN(t){return Object.prototype.toString.call(t)==="[object Boolean]"}var Pv=new Ct("tag:yaml.org,2002:bool",{kind:"scalar",resolve:oN,construct:rN,predicate:uN,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"});function cN(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function sN(t){return 48<=t&&t<=55}function fN(t){return 48<=t&&t<=57}function dN(t){if(t===null)return!1;var i=t.length,a=0,r=!1,u;if(!i)return!1;if(u=t[a],(u==="-"||u==="+")&&(u=t[++a]),u==="0"){if(a+1===i)return!0;if(u=t[++a],u==="b"){for(a++;a<i;a++)if(u=t[a],u!=="_"){if(u!=="0"&&u!=="1")return!1;r=!0}return r&&u!=="_"}if(u==="x"){for(a++;a<i;a++)if(u=t[a],u!=="_"){if(!cN(t.charCodeAt(a)))return!1;r=!0}return r&&u!=="_"}if(u==="o"){for(a++;a<i;a++)if(u=t[a],u!=="_"){if(!sN(t.charCodeAt(a)))return!1;r=!0}return r&&u!=="_"}}if(u==="_")return!1;for(;a<i;a++)if(u=t[a],u!=="_"){if(!fN(t.charCodeAt(a)))return!1;r=!0}return!(!r||u==="_")}function hN(t){var i=t,a=1,r;if(i.indexOf("_")!==-1&&(i=i.replace(/_/g,"")),r=i[0],(r==="-"||r==="+")&&(r==="-"&&(a=-1),i=i.slice(1),r=i[0]),i==="0")return 0;if(r==="0"){if(i[1]==="b")return a*parseInt(i.slice(2),2);if(i[1]==="x")return a*parseInt(i.slice(2),16);if(i[1]==="o")return a*parseInt(i.slice(2),8)}return a*parseInt(i,10)}function pN(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!vt.isNegativeZero(t)}var ex=new Ct("tag:yaml.org,2002:int",{kind:"scalar",resolve:dN,construct:hN,predicate:pN,represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),mN=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function gN(t){return!(t===null||!mN.test(t)||t[t.length-1]==="_")}function yN(t){var i,a;return i=t.replace(/_/g,"").toLowerCase(),a=i[0]==="-"?-1:1,"+-".indexOf(i[0])>=0&&(i=i.slice(1)),i===".inf"?a===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:i===".nan"?NaN:a*parseFloat(i,10)}var vN=/^[-+]?[0-9]+e/;function xN(t,i){var a;if(isNaN(t))switch(i){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(i){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(i){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(vt.isNegativeZero(t))return"-0.0";return a=t.toString(10),vN.test(a)?a.replace("e",".e"):a}function bN(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||vt.isNegativeZero(t))}var tx=new Ct("tag:yaml.org,2002:float",{kind:"scalar",resolve:gN,construct:yN,predicate:bN,represent:xN,defaultStyle:"lowercase"}),nx=Jv.extend({implicit:[Wv,Pv,ex,tx]}),lx=nx,ix=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),ax=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function SN(t){return t===null?!1:ix.exec(t)!==null||ax.exec(t)!==null}function wN(t){var i,a,r,u,f,s,h,p=0,m=null,g,v,b;if(i=ix.exec(t),i===null&&(i=ax.exec(t)),i===null)throw new Error("Date resolve error");if(a=+i[1],r=+i[2]-1,u=+i[3],!i[4])return new Date(Date.UTC(a,r,u));if(f=+i[4],s=+i[5],h=+i[6],i[7]){for(p=i[7].slice(0,3);p.length<3;)p+="0";p=+p}return i[9]&&(g=+i[10],v=+(i[11]||0),m=(g*60+v)*6e4,i[9]==="-"&&(m=-m)),b=new Date(Date.UTC(a,r,u,f,s,h,p)),m&&b.setTime(b.getTime()-m),b}function EN(t){return t.toISOString()}var ox=new Ct("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:SN,construct:wN,instanceOf:Date,represent:EN});function _N(t){return t==="<<"||t===null}var rx=new Ct("tag:yaml.org,2002:merge",{kind:"scalar",resolve:_N}),Yd=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
16
- \r`;function AN(t){if(t===null)return!1;var i,a,r=0,u=t.length,f=Yd;for(a=0;a<u;a++)if(i=f.indexOf(t.charAt(a)),!(i>64)){if(i<0)return!1;r+=6}return r%8===0}function NN(t){var i,a,r=t.replace(/[\r\n=]/g,""),u=r.length,f=Yd,s=0,h=[];for(i=0;i<u;i++)i%4===0&&i&&(h.push(s>>16&255),h.push(s>>8&255),h.push(s&255)),s=s<<6|f.indexOf(r.charAt(i));return a=u%4*6,a===0?(h.push(s>>16&255),h.push(s>>8&255),h.push(s&255)):a===18?(h.push(s>>10&255),h.push(s>>2&255)):a===12&&h.push(s>>4&255),new Uint8Array(h)}function CN(t){var i="",a=0,r,u,f=t.length,s=Yd;for(r=0;r<f;r++)r%3===0&&r&&(i+=s[a>>18&63],i+=s[a>>12&63],i+=s[a>>6&63],i+=s[a&63]),a=(a<<8)+t[r];return u=f%3,u===0?(i+=s[a>>18&63],i+=s[a>>12&63],i+=s[a>>6&63],i+=s[a&63]):u===2?(i+=s[a>>10&63],i+=s[a>>4&63],i+=s[a<<2&63],i+=s[64]):u===1&&(i+=s[a>>2&63],i+=s[a<<4&63],i+=s[64],i+=s[64]),i}function TN(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}var ux=new Ct("tag:yaml.org,2002:binary",{kind:"scalar",resolve:AN,construct:NN,predicate:TN,represent:CN}),MN=Object.prototype.hasOwnProperty,zN=Object.prototype.toString;function ON(t){if(t===null)return!0;var i=[],a,r,u,f,s,h=t;for(a=0,r=h.length;a<r;a+=1){if(u=h[a],s=!1,zN.call(u)!=="[object Object]")return!1;for(f in u)if(MN.call(u,f))if(!s)s=!0;else return!1;if(!s)return!1;if(i.indexOf(f)===-1)i.push(f);else return!1}return!0}function DN(t){return t!==null?t:[]}var cx=new Ct("tag:yaml.org,2002:omap",{kind:"sequence",resolve:ON,construct:DN}),RN=Object.prototype.toString;function HN(t){if(t===null)return!0;var i,a,r,u,f,s=t;for(f=new Array(s.length),i=0,a=s.length;i<a;i+=1){if(r=s[i],RN.call(r)!=="[object Object]"||(u=Object.keys(r),u.length!==1))return!1;f[i]=[u[0],r[u[0]]]}return!0}function jN(t){if(t===null)return[];var i,a,r,u,f,s=t;for(f=new Array(s.length),i=0,a=s.length;i<a;i+=1)r=s[i],u=Object.keys(r),f[i]=[u[0],r[u[0]]];return f}var sx=new Ct("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:HN,construct:jN}),kN=Object.prototype.hasOwnProperty;function UN(t){if(t===null)return!0;var i,a=t;for(i in a)if(kN.call(a,i)&&a[i]!==null)return!1;return!0}function LN(t){return t!==null?t:{}}var fx=new Ct("tag:yaml.org,2002:set",{kind:"mapping",resolve:UN,construct:LN}),Vd=lx.extend({implicit:[ox,rx],explicit:[ux,cx,sx,fx]}),Pl=Object.prototype.hasOwnProperty,Iu=1,dx=2,hx=3,Fu=4,Qf=1,BN=2,Xg=3,YN=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,VN=/[\x85\u2028\u2029]/,qN=/[,\[\]\{\}]/,px=/^(?:!|!!|![a-z\-]+!)$/i,mx=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Zg(t){return Object.prototype.toString.call(t)}function Ln(t){return t===10||t===13}function Ci(t){return t===9||t===32}function $t(t){return t===9||t===32||t===10||t===13}function va(t){return t===44||t===91||t===93||t===123||t===125}function GN(t){var i;return 48<=t&&t<=57?t-48:(i=t|32,97<=i&&i<=102?i-97+10:-1)}function XN(t){return t===120?2:t===117?4:t===85?8:0}function ZN(t){return 48<=t&&t<=57?t-48:-1}function Qg(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
17
- `:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"…":t===95?" ":t===76?"\u2028":t===80?"\u2029":""}function QN(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}function gx(t,i,a){i==="__proto__"?Object.defineProperty(t,i,{configurable:!0,enumerable:!0,writable:!0,value:a}):t[i]=a}var yx=new Array(256),vx=new Array(256);for(var ma=0;ma<256;ma++)yx[ma]=Qg(ma)?1:0,vx[ma]=Qg(ma);function $N(t,i){this.input=t,this.filename=i.filename||null,this.schema=i.schema||Vd,this.onWarning=i.onWarning||null,this.legacy=i.legacy||!1,this.json=i.json||!1,this.listener=i.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function xx(t,i){var a={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return a.snippet=J3(a),new Lt(i,a)}function ye(t,i){throw xx(t,i)}function Ju(t,i){t.onWarning&&t.onWarning.call(null,xx(t,i))}var $g={YAML:function(i,a,r){var u,f,s;i.version!==null&&ye(i,"duplication of %YAML directive"),r.length!==1&&ye(i,"YAML directive accepts exactly one argument"),u=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),u===null&&ye(i,"ill-formed argument of the YAML directive"),f=parseInt(u[1],10),s=parseInt(u[2],10),f!==1&&ye(i,"unacceptable YAML version of the document"),i.version=r[0],i.checkLineBreaks=s<2,s!==1&&s!==2&&Ju(i,"unsupported YAML version of the document")},TAG:function(i,a,r){var u,f;r.length!==2&&ye(i,"TAG directive accepts exactly two arguments"),u=r[0],f=r[1],px.test(u)||ye(i,"ill-formed tag handle (first argument) of the TAG directive"),Pl.call(i.tagMap,u)&&ye(i,'there is a previously declared suffix for "'+u+'" tag handle'),mx.test(f)||ye(i,"ill-formed tag prefix (second argument) of the TAG directive");try{f=decodeURIComponent(f)}catch{ye(i,"tag prefix is malformed: "+f)}i.tagMap[u]=f}};function Jl(t,i,a,r){var u,f,s,h;if(i<a){if(h=t.input.slice(i,a),r)for(u=0,f=h.length;u<f;u+=1)s=h.charCodeAt(u),s===9||32<=s&&s<=1114111||ye(t,"expected valid JSON character");else YN.test(h)&&ye(t,"the stream contains non-printable characters");t.result+=h}}function Kg(t,i,a,r){var u,f,s,h;for(vt.isObject(a)||ye(t,"cannot merge mappings; the provided source object is unacceptable"),u=Object.keys(a),s=0,h=u.length;s<h;s+=1)f=u[s],Pl.call(i,f)||(gx(i,f,a[f]),r[f]=!0)}function xa(t,i,a,r,u,f,s,h,p){var m,g;if(Array.isArray(u))for(u=Array.prototype.slice.call(u),m=0,g=u.length;m<g;m+=1)Array.isArray(u[m])&&ye(t,"nested arrays are not supported inside keys"),typeof u=="object"&&Zg(u[m])==="[object Object]"&&(u[m]="[object Object]");if(typeof u=="object"&&Zg(u)==="[object Object]"&&(u="[object Object]"),u=String(u),i===null&&(i={}),r==="tag:yaml.org,2002:merge")if(Array.isArray(f))for(m=0,g=f.length;m<g;m+=1)Kg(t,i,f[m],a);else Kg(t,i,f,a);else!t.json&&!Pl.call(a,u)&&Pl.call(i,u)&&(t.line=s||t.line,t.lineStart=h||t.lineStart,t.position=p||t.position,ye(t,"duplicated mapping key")),gx(i,u,f),delete a[u];return i}function qd(t){var i;i=t.input.charCodeAt(t.position),i===10?t.position++:i===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):ye(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function dt(t,i,a){for(var r=0,u=t.input.charCodeAt(t.position);u!==0;){for(;Ci(u);)u===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),u=t.input.charCodeAt(++t.position);if(i&&u===35)do u=t.input.charCodeAt(++t.position);while(u!==10&&u!==13&&u!==0);if(Ln(u))for(qd(t),u=t.input.charCodeAt(t.position),r++,t.lineIndent=0;u===32;)t.lineIndent++,u=t.input.charCodeAt(++t.position);else break}return a!==-1&&r!==0&&t.lineIndent<a&&Ju(t,"deficient indentation"),r}function sc(t){var i=t.position,a;return a=t.input.charCodeAt(i),!!((a===45||a===46)&&a===t.input.charCodeAt(i+1)&&a===t.input.charCodeAt(i+2)&&(i+=3,a=t.input.charCodeAt(i),a===0||$t(a)))}function Gd(t,i){i===1?t.result+=" ":i>1&&(t.result+=vt.repeat(`
18
- `,i-1))}function KN(t,i,a){var r,u,f,s,h,p,m,g,v=t.kind,b=t.result,E;if(E=t.input.charCodeAt(t.position),$t(E)||va(E)||E===35||E===38||E===42||E===33||E===124||E===62||E===39||E===34||E===37||E===64||E===96||(E===63||E===45)&&(u=t.input.charCodeAt(t.position+1),$t(u)||a&&va(u)))return!1;for(t.kind="scalar",t.result="",f=s=t.position,h=!1;E!==0;){if(E===58){if(u=t.input.charCodeAt(t.position+1),$t(u)||a&&va(u))break}else if(E===35){if(r=t.input.charCodeAt(t.position-1),$t(r))break}else{if(t.position===t.lineStart&&sc(t)||a&&va(E))break;if(Ln(E))if(p=t.line,m=t.lineStart,g=t.lineIndent,dt(t,!1,-1),t.lineIndent>=i){h=!0,E=t.input.charCodeAt(t.position);continue}else{t.position=s,t.line=p,t.lineStart=m,t.lineIndent=g;break}}h&&(Jl(t,f,s,!1),Gd(t,t.line-p),f=s=t.position,h=!1),Ci(E)||(s=t.position+1),E=t.input.charCodeAt(++t.position)}return Jl(t,f,s,!1),t.result?!0:(t.kind=v,t.result=b,!1)}function IN(t,i){var a,r,u;if(a=t.input.charCodeAt(t.position),a!==39)return!1;for(t.kind="scalar",t.result="",t.position++,r=u=t.position;(a=t.input.charCodeAt(t.position))!==0;)if(a===39)if(Jl(t,r,t.position,!0),a=t.input.charCodeAt(++t.position),a===39)r=t.position,t.position++,u=t.position;else return!0;else Ln(a)?(Jl(t,r,u,!0),Gd(t,dt(t,!1,i)),r=u=t.position):t.position===t.lineStart&&sc(t)?ye(t,"unexpected end of the document within a single quoted scalar"):(t.position++,u=t.position);ye(t,"unexpected end of the stream within a single quoted scalar")}function FN(t,i){var a,r,u,f,s,h;if(h=t.input.charCodeAt(t.position),h!==34)return!1;for(t.kind="scalar",t.result="",t.position++,a=r=t.position;(h=t.input.charCodeAt(t.position))!==0;){if(h===34)return Jl(t,a,t.position,!0),t.position++,!0;if(h===92){if(Jl(t,a,t.position,!0),h=t.input.charCodeAt(++t.position),Ln(h))dt(t,!1,i);else if(h<256&&yx[h])t.result+=vx[h],t.position++;else if((s=XN(h))>0){for(u=s,f=0;u>0;u--)h=t.input.charCodeAt(++t.position),(s=GN(h))>=0?f=(f<<4)+s:ye(t,"expected hexadecimal character");t.result+=QN(f),t.position++}else ye(t,"unknown escape sequence");a=r=t.position}else Ln(h)?(Jl(t,a,r,!0),Gd(t,dt(t,!1,i)),a=r=t.position):t.position===t.lineStart&&sc(t)?ye(t,"unexpected end of the document within a double quoted scalar"):(t.position++,r=t.position)}ye(t,"unexpected end of the stream within a double quoted scalar")}function JN(t,i){var a=!0,r,u,f,s=t.tag,h,p=t.anchor,m,g,v,b,E,C=Object.create(null),N,T,M,D;if(D=t.input.charCodeAt(t.position),D===91)g=93,E=!1,h=[];else if(D===123)g=125,E=!0,h={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=h),D=t.input.charCodeAt(++t.position);D!==0;){if(dt(t,!0,i),D=t.input.charCodeAt(t.position),D===g)return t.position++,t.tag=s,t.anchor=p,t.kind=E?"mapping":"sequence",t.result=h,!0;a?D===44&&ye(t,"expected the node content, but found ','"):ye(t,"missed comma between flow collection entries"),T=N=M=null,v=b=!1,D===63&&(m=t.input.charCodeAt(t.position+1),$t(m)&&(v=b=!0,t.position++,dt(t,!0,i))),r=t.line,u=t.lineStart,f=t.position,Ma(t,i,Iu,!1,!0),T=t.tag,N=t.result,dt(t,!0,i),D=t.input.charCodeAt(t.position),(b||t.line===r)&&D===58&&(v=!0,D=t.input.charCodeAt(++t.position),dt(t,!0,i),Ma(t,i,Iu,!1,!0),M=t.result),E?xa(t,h,C,T,N,M,r,u,f):v?h.push(xa(t,null,C,T,N,M,r,u,f)):h.push(N),dt(t,!0,i),D=t.input.charCodeAt(t.position),D===44?(a=!0,D=t.input.charCodeAt(++t.position)):a=!1}ye(t,"unexpected end of the stream within a flow collection")}function WN(t,i){var a,r,u=Qf,f=!1,s=!1,h=i,p=0,m=!1,g,v;if(v=t.input.charCodeAt(t.position),v===124)r=!1;else if(v===62)r=!0;else return!1;for(t.kind="scalar",t.result="";v!==0;)if(v=t.input.charCodeAt(++t.position),v===43||v===45)Qf===u?u=v===43?Xg:BN:ye(t,"repeat of a chomping mode identifier");else if((g=ZN(v))>=0)g===0?ye(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?ye(t,"repeat of an indentation width identifier"):(h=i+g-1,s=!0);else break;if(Ci(v)){do v=t.input.charCodeAt(++t.position);while(Ci(v));if(v===35)do v=t.input.charCodeAt(++t.position);while(!Ln(v)&&v!==0)}for(;v!==0;){for(qd(t),t.lineIndent=0,v=t.input.charCodeAt(t.position);(!s||t.lineIndent<h)&&v===32;)t.lineIndent++,v=t.input.charCodeAt(++t.position);if(!s&&t.lineIndent>h&&(h=t.lineIndent),Ln(v)){p++;continue}if(t.lineIndent<h){u===Xg?t.result+=vt.repeat(`
19
- `,f?1+p:p):u===Qf&&f&&(t.result+=`
20
- `);break}for(r?Ci(v)?(m=!0,t.result+=vt.repeat(`
21
- `,f?1+p:p)):m?(m=!1,t.result+=vt.repeat(`
22
- `,p+1)):p===0?f&&(t.result+=" "):t.result+=vt.repeat(`
23
- `,p):t.result+=vt.repeat(`
24
- `,f?1+p:p),f=!0,s=!0,p=0,a=t.position;!Ln(v)&&v!==0;)v=t.input.charCodeAt(++t.position);Jl(t,a,t.position,!1)}return!0}function Ig(t,i){var a,r=t.tag,u=t.anchor,f=[],s,h=!1,p;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=f),p=t.input.charCodeAt(t.position);p!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,ye(t,"tab characters must not be used in indentation")),!(p!==45||(s=t.input.charCodeAt(t.position+1),!$t(s))));){if(h=!0,t.position++,dt(t,!0,-1)&&t.lineIndent<=i){f.push(null),p=t.input.charCodeAt(t.position);continue}if(a=t.line,Ma(t,i,hx,!1,!0),f.push(t.result),dt(t,!0,-1),p=t.input.charCodeAt(t.position),(t.line===a||t.lineIndent>i)&&p!==0)ye(t,"bad indentation of a sequence entry");else if(t.lineIndent<i)break}return h?(t.tag=r,t.anchor=u,t.kind="sequence",t.result=f,!0):!1}function PN(t,i,a){var r,u,f,s,h,p,m=t.tag,g=t.anchor,v={},b=Object.create(null),E=null,C=null,N=null,T=!1,M=!1,D;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=v),D=t.input.charCodeAt(t.position);D!==0;){if(!T&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,ye(t,"tab characters must not be used in indentation")),r=t.input.charCodeAt(t.position+1),f=t.line,(D===63||D===58)&&$t(r))D===63?(T&&(xa(t,v,b,E,C,null,s,h,p),E=C=N=null),M=!0,T=!0,u=!0):T?(T=!1,u=!0):ye(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,D=r;else{if(s=t.line,h=t.lineStart,p=t.position,!Ma(t,a,dx,!1,!0))break;if(t.line===f){for(D=t.input.charCodeAt(t.position);Ci(D);)D=t.input.charCodeAt(++t.position);if(D===58)D=t.input.charCodeAt(++t.position),$t(D)||ye(t,"a whitespace character is expected after the key-value separator within a block mapping"),T&&(xa(t,v,b,E,C,null,s,h,p),E=C=N=null),M=!0,T=!1,u=!1,E=t.tag,C=t.result;else if(M)ye(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=m,t.anchor=g,!0}else if(M)ye(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=m,t.anchor=g,!0}if((t.line===f||t.lineIndent>i)&&(T&&(s=t.line,h=t.lineStart,p=t.position),Ma(t,i,Fu,!0,u)&&(T?C=t.result:N=t.result),T||(xa(t,v,b,E,C,N,s,h,p),E=C=N=null),dt(t,!0,-1),D=t.input.charCodeAt(t.position)),(t.line===f||t.lineIndent>i)&&D!==0)ye(t,"bad indentation of a mapping entry");else if(t.lineIndent<i)break}return T&&xa(t,v,b,E,C,null,s,h,p),M&&(t.tag=m,t.anchor=g,t.kind="mapping",t.result=v),M}function eC(t){var i,a=!1,r=!1,u,f,s;if(s=t.input.charCodeAt(t.position),s!==33)return!1;if(t.tag!==null&&ye(t,"duplication of a tag property"),s=t.input.charCodeAt(++t.position),s===60?(a=!0,s=t.input.charCodeAt(++t.position)):s===33?(r=!0,u="!!",s=t.input.charCodeAt(++t.position)):u="!",i=t.position,a){do s=t.input.charCodeAt(++t.position);while(s!==0&&s!==62);t.position<t.length?(f=t.input.slice(i,t.position),s=t.input.charCodeAt(++t.position)):ye(t,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!$t(s);)s===33&&(r?ye(t,"tag suffix cannot contain exclamation marks"):(u=t.input.slice(i-1,t.position+1),px.test(u)||ye(t,"named tag handle cannot contain such characters"),r=!0,i=t.position+1)),s=t.input.charCodeAt(++t.position);f=t.input.slice(i,t.position),qN.test(f)&&ye(t,"tag suffix cannot contain flow indicator characters")}f&&!mx.test(f)&&ye(t,"tag name cannot contain such characters: "+f);try{f=decodeURIComponent(f)}catch{ye(t,"tag name is malformed: "+f)}return a?t.tag=f:Pl.call(t.tagMap,u)?t.tag=t.tagMap[u]+f:u==="!"?t.tag="!"+f:u==="!!"?t.tag="tag:yaml.org,2002:"+f:ye(t,'undeclared tag handle "'+u+'"'),!0}function tC(t){var i,a;if(a=t.input.charCodeAt(t.position),a!==38)return!1;for(t.anchor!==null&&ye(t,"duplication of an anchor property"),a=t.input.charCodeAt(++t.position),i=t.position;a!==0&&!$t(a)&&!va(a);)a=t.input.charCodeAt(++t.position);return t.position===i&&ye(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(i,t.position),!0}function nC(t){var i,a,r;if(r=t.input.charCodeAt(t.position),r!==42)return!1;for(r=t.input.charCodeAt(++t.position),i=t.position;r!==0&&!$t(r)&&!va(r);)r=t.input.charCodeAt(++t.position);return t.position===i&&ye(t,"name of an alias node must contain at least one character"),a=t.input.slice(i,t.position),Pl.call(t.anchorMap,a)||ye(t,'unidentified alias "'+a+'"'),t.result=t.anchorMap[a],dt(t,!0,-1),!0}function Ma(t,i,a,r,u){var f,s,h,p=1,m=!1,g=!1,v,b,E,C,N,T;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,f=s=h=Fu===a||hx===a,r&&dt(t,!0,-1)&&(m=!0,t.lineIndent>i?p=1:t.lineIndent===i?p=0:t.lineIndent<i&&(p=-1)),p===1)for(;eC(t)||tC(t);)dt(t,!0,-1)?(m=!0,h=f,t.lineIndent>i?p=1:t.lineIndent===i?p=0:t.lineIndent<i&&(p=-1)):h=!1;if(h&&(h=m||u),(p===1||Fu===a)&&(Iu===a||dx===a?N=i:N=i+1,T=t.position-t.lineStart,p===1?h&&(Ig(t,T)||PN(t,T,N))||JN(t,N)?g=!0:(s&&WN(t,N)||IN(t,N)||FN(t,N)?g=!0:nC(t)?(g=!0,(t.tag!==null||t.anchor!==null)&&ye(t,"alias node should not have any properties")):KN(t,N,Iu===a)&&(g=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):p===0&&(g=h&&Ig(t,T))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&ye(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),v=0,b=t.implicitTypes.length;v<b;v+=1)if(C=t.implicitTypes[v],C.resolve(t.result)){t.result=C.construct(t.result),t.tag=C.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(Pl.call(t.typeMap[t.kind||"fallback"],t.tag))C=t.typeMap[t.kind||"fallback"][t.tag];else for(C=null,E=t.typeMap.multi[t.kind||"fallback"],v=0,b=E.length;v<b;v+=1)if(t.tag.slice(0,E[v].tag.length)===E[v].tag){C=E[v];break}C||ye(t,"unknown tag !<"+t.tag+">"),t.result!==null&&C.kind!==t.kind&&ye(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+C.kind+'", not "'+t.kind+'"'),C.resolve(t.result,t.tag)?(t.result=C.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):ye(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||g}function lC(t){var i=t.position,a,r,u,f=!1,s;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(s=t.input.charCodeAt(t.position))!==0&&(dt(t,!0,-1),s=t.input.charCodeAt(t.position),!(t.lineIndent>0||s!==37));){for(f=!0,s=t.input.charCodeAt(++t.position),a=t.position;s!==0&&!$t(s);)s=t.input.charCodeAt(++t.position);for(r=t.input.slice(a,t.position),u=[],r.length<1&&ye(t,"directive name must not be less than one character in length");s!==0;){for(;Ci(s);)s=t.input.charCodeAt(++t.position);if(s===35){do s=t.input.charCodeAt(++t.position);while(s!==0&&!Ln(s));break}if(Ln(s))break;for(a=t.position;s!==0&&!$t(s);)s=t.input.charCodeAt(++t.position);u.push(t.input.slice(a,t.position))}s!==0&&qd(t),Pl.call($g,r)?$g[r](t,r,u):Ju(t,'unknown document directive "'+r+'"')}if(dt(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,dt(t,!0,-1)):f&&ye(t,"directives end mark is expected"),Ma(t,t.lineIndent-1,Fu,!1,!0),dt(t,!0,-1),t.checkLineBreaks&&VN.test(t.input.slice(i,t.position))&&Ju(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&sc(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,dt(t,!0,-1));return}if(t.position<t.length-1)ye(t,"end of the stream or a document separator is expected");else return}function bx(t,i){t=String(t),i=i||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
25
- `),t.charCodeAt(0)===65279&&(t=t.slice(1)));var a=new $N(t,i),r=t.indexOf("\0");for(r!==-1&&(a.position=r,ye(a,"null byte is not allowed in input")),a.input+="\0";a.input.charCodeAt(a.position)===32;)a.lineIndent+=1,a.position+=1;for(;a.position<a.length-1;)lC(a);return a.documents}function iC(t,i,a){i!==null&&typeof i=="object"&&typeof a>"u"&&(a=i,i=null);var r=bx(t,a);if(typeof i!="function")return r;for(var u=0,f=r.length;u<f;u+=1)i(r[u])}function aC(t,i){var a=bx(t,i);if(a.length!==0){if(a.length===1)return a[0];throw new Lt("expected a single document in the stream, but found more")}}var oC=iC,rC=aC,Sx={loadAll:oC,load:rC},wx=Object.prototype.toString,Ex=Object.prototype.hasOwnProperty,Xd=65279,uC=9,$o=10,cC=13,sC=32,fC=33,dC=34,dd=35,hC=37,pC=38,mC=39,gC=42,_x=44,yC=45,Wu=58,vC=61,xC=62,bC=63,SC=64,Ax=91,Nx=93,wC=96,Cx=123,EC=124,Tx=125,Rt={};Rt[0]="\\0";Rt[7]="\\a";Rt[8]="\\b";Rt[9]="\\t";Rt[10]="\\n";Rt[11]="\\v";Rt[12]="\\f";Rt[13]="\\r";Rt[27]="\\e";Rt[34]='\\"';Rt[92]="\\\\";Rt[133]="\\N";Rt[160]="\\_";Rt[8232]="\\L";Rt[8233]="\\P";var _C=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],AC=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function NC(t,i){var a,r,u,f,s,h,p;if(i===null)return{};for(a={},r=Object.keys(i),u=0,f=r.length;u<f;u+=1)s=r[u],h=String(i[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),p=t.compiledTypeMap.fallback[s],p&&Ex.call(p.styleAliases,h)&&(h=p.styleAliases[h]),a[s]=h;return a}function CC(t){var i,a,r;if(i=t.toString(16).toUpperCase(),t<=255)a="x",r=2;else if(t<=65535)a="u",r=4;else if(t<=4294967295)a="U",r=8;else throw new Lt("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+a+vt.repeat("0",r-i.length)+i}var TC=1,Ko=2;function MC(t){this.schema=t.schema||Vd,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=vt.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=NC(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType=t.quotingType==='"'?Ko:TC,this.forceQuotes=t.forceQuotes||!1,this.replacer=typeof t.replacer=="function"?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Fg(t,i){for(var a=vt.repeat(" ",i),r=0,u=-1,f="",s,h=t.length;r<h;)u=t.indexOf(`
26
- `,r),u===-1?(s=t.slice(r),r=h):(s=t.slice(r,u+1),r=u+1),s.length&&s!==`
27
- `&&(f+=a),f+=s;return f}function hd(t,i){return`
28
- `+vt.repeat(" ",t.indent*i)}function zC(t,i){var a,r,u;for(a=0,r=t.implicitTypes.length;a<r;a+=1)if(u=t.implicitTypes[a],u.resolve(i))return!0;return!1}function Pu(t){return t===sC||t===uC}function Io(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==Xd||65536<=t&&t<=1114111}function Jg(t){return Io(t)&&t!==Xd&&t!==cC&&t!==$o}function Wg(t,i,a){var r=Jg(t),u=r&&!Pu(t);return(a?r:r&&t!==_x&&t!==Ax&&t!==Nx&&t!==Cx&&t!==Tx)&&t!==dd&&!(i===Wu&&!u)||Jg(i)&&!Pu(i)&&t===dd||i===Wu&&u}function OC(t){return Io(t)&&t!==Xd&&!Pu(t)&&t!==yC&&t!==bC&&t!==Wu&&t!==_x&&t!==Ax&&t!==Nx&&t!==Cx&&t!==Tx&&t!==dd&&t!==pC&&t!==gC&&t!==fC&&t!==EC&&t!==vC&&t!==xC&&t!==mC&&t!==dC&&t!==hC&&t!==SC&&t!==wC}function DC(t){return!Pu(t)&&t!==Wu}function Lo(t,i){var a=t.charCodeAt(i),r;return a>=55296&&a<=56319&&i+1<t.length&&(r=t.charCodeAt(i+1),r>=56320&&r<=57343)?(a-55296)*1024+r-56320+65536:a}function Mx(t){var i=/^\n* /;return i.test(t)}var zx=1,pd=2,Ox=3,Dx=4,ga=5;function RC(t,i,a,r,u,f,s,h){var p,m=0,g=null,v=!1,b=!1,E=r!==-1,C=-1,N=OC(Lo(t,0))&&DC(Lo(t,t.length-1));if(i||s)for(p=0;p<t.length;m>=65536?p+=2:p++){if(m=Lo(t,p),!Io(m))return ga;N=N&&Wg(m,g,h),g=m}else{for(p=0;p<t.length;m>=65536?p+=2:p++){if(m=Lo(t,p),m===$o)v=!0,E&&(b=b||p-C-1>r&&t[C+1]!==" ",C=p);else if(!Io(m))return ga;N=N&&Wg(m,g,h),g=m}b=b||E&&p-C-1>r&&t[C+1]!==" "}return!v&&!b?N&&!s&&!u(t)?zx:f===Ko?ga:pd:a>9&&Mx(t)?ga:s?f===Ko?ga:pd:b?Dx:Ox}function HC(t,i,a,r,u){t.dump=(function(){if(i.length===0)return t.quotingType===Ko?'""':"''";if(!t.noCompatMode&&(_C.indexOf(i)!==-1||AC.test(i)))return t.quotingType===Ko?'"'+i+'"':"'"+i+"'";var f=t.indent*Math.max(1,a),s=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-f),h=r||t.flowLevel>-1&&a>=t.flowLevel;function p(m){return zC(t,m)}switch(RC(i,h,t.indent,s,p,t.quotingType,t.forceQuotes&&!r,u)){case zx:return i;case pd:return"'"+i.replace(/'/g,"''")+"'";case Ox:return"|"+Pg(i,t.indent)+ey(Fg(i,f));case Dx:return">"+Pg(i,t.indent)+ey(Fg(jC(i,s),f));case ga:return'"'+kC(i)+'"';default:throw new Lt("impossible error: invalid scalar style")}})()}function Pg(t,i){var a=Mx(t)?String(i):"",r=t[t.length-1]===`
29
- `,u=r&&(t[t.length-2]===`
30
- `||t===`
31
- `),f=u?"+":r?"":"-";return a+f+`
32
- `}function ey(t){return t[t.length-1]===`
33
- `?t.slice(0,-1):t}function jC(t,i){for(var a=/(\n+)([^\n]*)/g,r=(function(){var m=t.indexOf(`
34
- `);return m=m!==-1?m:t.length,a.lastIndex=m,ty(t.slice(0,m),i)})(),u=t[0]===`
35
- `||t[0]===" ",f,s;s=a.exec(t);){var h=s[1],p=s[2];f=p[0]===" ",r+=h+(!u&&!f&&p!==""?`
36
- `:"")+ty(p,i),u=f}return r}function ty(t,i){if(t===""||t[0]===" ")return t;for(var a=/ [^ ]/g,r,u=0,f,s=0,h=0,p="";r=a.exec(t);)h=r.index,h-u>i&&(f=s>u?s:h,p+=`
37
- `+t.slice(u,f),u=f+1),s=h;return p+=`
38
- `,t.length-u>i&&s>u?p+=t.slice(u,s)+`
39
- `+t.slice(s+1):p+=t.slice(u),p.slice(1)}function kC(t){for(var i="",a=0,r,u=0;u<t.length;a>=65536?u+=2:u++)a=Lo(t,u),r=Rt[a],!r&&Io(a)?(i+=t[u],a>=65536&&(i+=t[u+1])):i+=r||CC(a);return i}function UC(t,i,a){var r="",u=t.tag,f,s,h;for(f=0,s=a.length;f<s;f+=1)h=a[f],t.replacer&&(h=t.replacer.call(a,String(f),h)),(pl(t,i,h,!1,!1)||typeof h>"u"&&pl(t,i,null,!1,!1))&&(r!==""&&(r+=","+(t.condenseFlow?"":" ")),r+=t.dump);t.tag=u,t.dump="["+r+"]"}function ny(t,i,a,r){var u="",f=t.tag,s,h,p;for(s=0,h=a.length;s<h;s+=1)p=a[s],t.replacer&&(p=t.replacer.call(a,String(s),p)),(pl(t,i+1,p,!0,!0,!1,!0)||typeof p>"u"&&pl(t,i+1,null,!0,!0,!1,!0))&&((!r||u!=="")&&(u+=hd(t,i)),t.dump&&$o===t.dump.charCodeAt(0)?u+="-":u+="- ",u+=t.dump);t.tag=f,t.dump=u||"[]"}function LC(t,i,a){var r="",u=t.tag,f=Object.keys(a),s,h,p,m,g;for(s=0,h=f.length;s<h;s+=1)g="",r!==""&&(g+=", "),t.condenseFlow&&(g+='"'),p=f[s],m=a[p],t.replacer&&(m=t.replacer.call(a,p,m)),pl(t,i,p,!1,!1)&&(t.dump.length>1024&&(g+="? "),g+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),pl(t,i,m,!1,!1)&&(g+=t.dump,r+=g));t.tag=u,t.dump="{"+r+"}"}function BC(t,i,a,r){var u="",f=t.tag,s=Object.keys(a),h,p,m,g,v,b;if(t.sortKeys===!0)s.sort();else if(typeof t.sortKeys=="function")s.sort(t.sortKeys);else if(t.sortKeys)throw new Lt("sortKeys must be a boolean or a function");for(h=0,p=s.length;h<p;h+=1)b="",(!r||u!=="")&&(b+=hd(t,i)),m=s[h],g=a[m],t.replacer&&(g=t.replacer.call(a,m,g)),pl(t,i+1,m,!0,!0,!0)&&(v=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,v&&(t.dump&&$o===t.dump.charCodeAt(0)?b+="?":b+="? "),b+=t.dump,v&&(b+=hd(t,i)),pl(t,i+1,g,!0,v)&&(t.dump&&$o===t.dump.charCodeAt(0)?b+=":":b+=": ",b+=t.dump,u+=b));t.tag=f,t.dump=u||"{}"}function ly(t,i,a){var r,u,f,s,h,p;for(u=a?t.explicitTypes:t.implicitTypes,f=0,s=u.length;f<s;f+=1)if(h=u[f],(h.instanceOf||h.predicate)&&(!h.instanceOf||typeof i=="object"&&i instanceof h.instanceOf)&&(!h.predicate||h.predicate(i))){if(a?h.multi&&h.representName?t.tag=h.representName(i):t.tag=h.tag:t.tag="?",h.represent){if(p=t.styleMap[h.tag]||h.defaultStyle,wx.call(h.represent)==="[object Function]")r=h.represent(i,p);else if(Ex.call(h.represent,p))r=h.represent[p](i,p);else throw new Lt("!<"+h.tag+'> tag resolver accepts not "'+p+'" style');t.dump=r}return!0}return!1}function pl(t,i,a,r,u,f,s){t.tag=null,t.dump=a,ly(t,a,!1)||ly(t,a,!0);var h=wx.call(t.dump),p=r,m;r&&(r=t.flowLevel<0||t.flowLevel>i);var g=h==="[object Object]"||h==="[object Array]",v,b;if(g&&(v=t.duplicates.indexOf(a),b=v!==-1),(t.tag!==null&&t.tag!=="?"||b||t.indent!==2&&i>0)&&(u=!1),b&&t.usedDuplicates[v])t.dump="*ref_"+v;else{if(g&&b&&!t.usedDuplicates[v]&&(t.usedDuplicates[v]=!0),h==="[object Object]")r&&Object.keys(t.dump).length!==0?(BC(t,i,t.dump,u),b&&(t.dump="&ref_"+v+t.dump)):(LC(t,i,t.dump),b&&(t.dump="&ref_"+v+" "+t.dump));else if(h==="[object Array]")r&&t.dump.length!==0?(t.noArrayIndent&&!s&&i>0?ny(t,i-1,t.dump,u):ny(t,i,t.dump,u),b&&(t.dump="&ref_"+v+t.dump)):(UC(t,i,t.dump),b&&(t.dump="&ref_"+v+" "+t.dump));else if(h==="[object String]")t.tag!=="?"&&HC(t,t.dump,i,f,p);else{if(h==="[object Undefined]")return!1;if(t.skipInvalid)return!1;throw new Lt("unacceptable kind of an object to dump "+h)}t.tag!==null&&t.tag!=="?"&&(m=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?m="!"+m:m.slice(0,18)==="tag:yaml.org,2002:"?m="!!"+m.slice(18):m="!<"+m+">",t.dump=m+" "+t.dump)}return!0}function YC(t,i){var a=[],r=[],u,f;for(md(t,a,r),u=0,f=r.length;u<f;u+=1)i.duplicates.push(a[r[u]]);i.usedDuplicates=new Array(f)}function md(t,i,a){var r,u,f;if(t!==null&&typeof t=="object")if(u=i.indexOf(t),u!==-1)a.indexOf(u)===-1&&a.push(u);else if(i.push(t),Array.isArray(t))for(u=0,f=t.length;u<f;u+=1)md(t[u],i,a);else for(r=Object.keys(t),u=0,f=r.length;u<f;u+=1)md(t[r[u]],i,a)}function VC(t,i){i=i||{};var a=new MC(i);a.noRefs||YC(t,a);var r=t;return a.replacer&&(r=a.replacer.call({"":r},"",r)),pl(a,0,r,!0,!0)?a.dump+`
40
- `:""}var qC=VC,GC={dump:qC};function Zd(t,i){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+i+" instead, which is now safe by default.")}}var XC=Ct,ZC=$v,QC=Jv,$C=nx,KC=lx,IC=Vd,FC=Sx.load,JC=Sx.loadAll,WC=GC.dump,PC=Lt,eT={binary:ux,float:tx,map:Fv,null:Wv,pairs:sx,set:fx,timestamp:ox,bool:Pv,int:ex,merge:rx,omap:cx,seq:Iv,str:Kv},tT=Zd("safeLoad","load"),nT=Zd("safeLoadAll","loadAll"),lT=Zd("safeDump","dump"),Rx={Type:XC,Schema:ZC,FAILSAFE_SCHEMA:QC,JSON_SCHEMA:$C,CORE_SCHEMA:KC,DEFAULT_SCHEMA:IC,load:FC,loadAll:JC,dump:WC,YAMLException:PC,types:eT,safeLoad:tT,safeLoadAll:nT,safeDump:lT};function jn(t){if(!t||typeof t!="object")throw new Error("Invalid YAML: Root must be an object");const i={tables:Array.isArray(t.tables)?t.tables:[],relationships:Array.isArray(t.relationships)?t.relationships:[],domains:Array.isArray(t.domains)?t.domains:[],layout:t.layout||{}};return i.tables=i.tables.map(a=>({...a,id:a.id||"unknown",name:a.name||a.id||"Unnamed Table",appearance:a.appearance||void 0,columns:Array.isArray(a.columns)?a.columns:[]})),i}function iT(t){try{const i=Rx.load(t);return jn(i)}catch(i){throw new Error(`YAML Parsing Error: ${i.message}`)}}const Cn=L3((t,i)=>({schema:null,selectedTableId:null,hoveredColumnId:null,error:null,isCliMode:typeof window<"u"&&window.MODSCAPE_CLI_MODE===!0,yamlInput:"",setYamlInput:a=>t({yamlInput:a}),syncToYamlInput:()=>{const{schema:a}=i();if(a){const r=Rx.dump(a,{indent:2,lineWidth:-1,noRefs:!0});t({yamlInput:r})}},availableFiles:[],currentModelSlug:null,isSidebarOpen:!0,activeTab:"editor",focusNodeId:null,setSchema:a=>{try{const r=jn(a);t({schema:r,error:null}),i().syncToYamlInput()}catch(r){t({error:r.message})}},setSelectedTableId:a=>t({selectedTableId:a}),setHoveredColumnId:a=>t({hoveredColumnId:a}),setIsCliMode:a=>t({isCliMode:a}),setIsSidebarOpen:a=>t({isSidebarOpen:a}),setActiveTab:a=>t({activeTab:a}),setFocusNodeId:a=>t({focusNodeId:a}),fetchAvailableFiles:async()=>{const a=window.__MODSCAPE_DATA__;if(a&&a.models){const r=a.models.map(u=>({slug:u.slug,name:u.name,path:""}));t({availableFiles:r});return}try{const u=await(await fetch("/api/files")).json();t({availableFiles:u})}catch(r){console.error("Failed to fetch files:",r)}},setCurrentModel:async a=>{const r=window.__MODSCAPE_DATA__;if(r&&r.models){const u=r.models.find(f=>f.slug===a);if(u){t({currentModelSlug:a,schema:jn(u.schema),selectedTableId:null,error:null}),i().syncToYamlInput();const f=new URLSearchParams(window.location.search);f.set("model",a);const s=window.location.pathname+"?"+f.toString();window.history.pushState(null,"",s)}return}try{const u=`/api/model?model=${a}`,s=await(await fetch(u)).json();t({currentModelSlug:a,schema:jn(s),selectedTableId:null,error:null}),i().syncToYamlInput();const h=new URLSearchParams(window.location.search);h.set("model",a);const p=window.location.pathname+"?"+h.toString();window.history.pushState(null,"",p)}catch(u){console.error("Failed to fetch model:",u)}},parseAndSetSchema:a=>{try{const r=iT(a);t({schema:r,error:null})}catch(r){t({error:r.message})}},updateNodePosition:(a,r,u,f)=>{const s=i().schema;if(!s)return;let h=s.domains||[];f!==void 0&&(h=h.map(g=>({...g,tables:g.tables.filter(v=>v!==a)})),f&&(h=h.map(g=>g.id===f?{...g,tables:Array.from(new Set([...g.tables,a]))}:g)));const p=s.layout?.[a]||{x:0,y:0},m={...s.layout||{},[a]:{...p,x:Math.round(r),y:Math.round(u)}};t({schema:{...s,domains:h,layout:m}}),i().syncToYamlInput()},updateNodeDimensions:(a,r,u)=>{const f=i().schema;if(!f)return;const s=f.layout?.[a]||{x:0,y:0},h={...f.layout||{},[a]:{...s,width:Math.round(r),height:Math.round(u)}};t({schema:{...f,layout:h}}),i().syncToYamlInput()},saveLayout:async()=>{const{schema:a,currentModelSlug:r}=i();if(!(!a||!a.layout))try{const u=r?`/api/layout?model=${r}`:"/api/layout";await fetch(u,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a.layout)})}catch(u){console.error("Failed to save layout:",u)}},addTable:(a,r)=>{const u=i().schema||{tables:[],relationships:[],domains:[],layout:{}},f=`new_table_${Date.now()}`,s={id:f,name:"NEW_TABLE",appearance:{type:"fact"},columns:[{id:"id",logical:{name:"ID",type:"Integer",isPrimaryKey:!0}}]},h={...u,tables:[...u.tables||[],s],layout:{...u.layout||{},[f]:{x:Math.round(a),y:Math.round(r)}}};t({schema:jn(h),error:null}),i().syncToYamlInput()},addDomain:(a,r)=>{const u=i().schema||{tables:[],relationships:[],domains:[],layout:{}},f=`new_domain_${Date.now()}`,s={id:f,name:"NEW_DOMAIN",description:"Domain purpose",tables:[],color:"rgba(59, 130, 246, 0.05)"},h={...u,domains:[...u.domains||[],s],layout:{...u.layout||{},[f]:{x:Math.round(a),y:Math.round(r),width:600,height:400}}};t({schema:jn(h),error:null}),i().syncToYamlInput()},addEdge:(a,r)=>{const u=i().schema;if(!u)return;const f={from:{table:a,column:"id"},to:{table:r,column:"id"},type:"one-to-many"},s={...u,relationships:[...u.relationships||[],f]};t({schema:jn(s)}),i().syncToYamlInput()},removeNode:a=>{const{schema:r}=i();if(!r)return;const u=r.tables.filter(m=>m.id!==a),f=(r.domains||[]).filter(m=>m.id!==a).map(m=>({...m,tables:m.tables.filter(g=>g!==a)})),s=(r.relationships||[]).filter(m=>m.from.table!==a&&m.to.table!==a),h={...r.layout||{}};delete h[a];const p={...r,tables:u,domains:f,relationships:s,layout:h};t({schema:jn(p),selectedTableId:null}),i().syncToYamlInput()},updateTable:(a,r)=>{const{schema:u}=i();if(!u)return;const f=u.tables.map(h=>h.id===a?{...h,...r}:h),s={...u,tables:f};t({schema:jn(s)}),i().syncToYamlInput()},updateDomain:(a,r)=>{const{schema:u}=i();if(!u||!u.domains)return;const f=u.domains.map(h=>h.id===a?{...h,...r}:h),s={...u,domains:f};t({schema:jn(s)}),i().syncToYamlInput()},getSelectedTable:()=>{const{schema:a,selectedTableId:r}=i();return!a||!r?null:a.tables.find(u=>u.id===r)||null},getSelectedDomain:()=>{const{schema:a,selectedTableId:r}=i();return!a||!r||!a.domains?null:a.domains.find(u=>u.id===r)||null}}));const Hx=(...t)=>t.filter((i,a,r)=>!!i&&i.trim()!==""&&r.indexOf(i)===a).join(" ").trim();const aT=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const oT=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,a,r)=>r?r.toUpperCase():a.toLowerCase());const iy=t=>{const i=oT(t);return i.charAt(0).toUpperCase()+i.slice(1)};var rT={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"};const uT=t=>{for(const i in t)if(i.startsWith("aria-")||i==="role"||i==="title")return!0;return!1};const cT=z.forwardRef(({color:t="currentColor",size:i=24,strokeWidth:a=2,absoluteStrokeWidth:r,className:u="",children:f,iconNode:s,...h},p)=>z.createElement("svg",{ref:p,...rT,width:i,height:i,stroke:t,strokeWidth:r?Number(a)*24/Number(i):a,className:Hx("lucide",u),...!f&&!uT(h)&&{"aria-hidden":"true"},...h},[...s.map(([m,g])=>z.createElement(m,g)),...Array.isArray(f)?f:[f]]));const ht=(t,i)=>{const a=z.forwardRef(({className:r,...u},f)=>z.createElement(cT,{ref:f,iconNode:i,className:Hx(`lucide-${aT(iy(t))}`,`lucide-${t}`,r),...u}));return a.displayName=iy(t),a};const sT=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],ay=ht("arrow-up-right",sT);const fT=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],dT=ht("chevron-down",fT);const hT=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],pT=ht("chevron-left",hT);const mT=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],gT=ht("chevron-right",mT);const yT=[["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"}]],oy=ht("circle-alert",yT);const vT=[["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"}]],jx=ht("database",vT);const xT=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],bT=ht("grid-3x3",xT);const ST=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],wT=ht("hash",ST);const ET=[["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"}]],gd=ht("layers",ET);const _T=[["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"M3 10a2 2 0 0 0 2 2h3",key:"1npucw"}],["path",{d:"M3 5v12a2 2 0 0 0 2 2h3",key:"x1gjn2"}]],AT=ht("list-tree",_T);const NT=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]],CT=ht("panels-top-left",NT);const TT=[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],MT=ht("pen-line",TT);const zT=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],OT=ht("play",zT);const DT=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],yd=ht("plus",DT);const RT=[["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"}]],HT=ht("save",RT);const jT=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],kT=ht("search",jT);const UT=[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]],LT=ht("table",UT);const BT=[["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"}]],YT=ht("tag",BT);const VT=[["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"}]],ry=ht("trash-2",VT);const qT=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ba=ht("x",qT),GT={fact:{color:"#f87171",icon:"📊",label:"FACT"},dimension:{color:"#60a5fa",icon:"🏷️",label:"DIM"},hub:{color:"#fbbf24",icon:"🌐",label:"HUB"},link:{color:"#34d399",icon:"🔗",label:"LINK"},satellite:{color:"#a78bfa",icon:"🛰️",label:"SAT"}},XT=({id:t,data:i,selected:a})=>{const{table:r}=i,{updateNodeDimensions:u,saveLayout:f,hoveredColumnId:s,removeNode:h,selectedTableId:p,setSelectedTableId:m}=Cn(),g=a||p===t,v=r.columns&&r.columns.length>0,b=r.appearance?.type?GT[r.appearance.type]:null,E=r.appearance?.color||b?.color||"#334155",C=r.appearance?.icon||b?.icon||"",N=b?.label||"",T=(D,q)=>{u(t,q.width,q.height),f()},M=D=>{D.stopPropagation(),m(t)};return A.jsxs("div",{onClick:M,style:{width:"100%",height:"100%",minWidth:"220px",minHeight:"100px",position:"relative",cursor:"default"},children:[A.jsx(Xv,{color:"#3b82f6",isVisible:g,minWidth:220,minHeight:100,onResizeEnd:T,handleStyle:{width:12,height:12,borderRadius:"50%",backgroundColor:"#3b82f6",border:"2px solid #ffffff",zIndex:100}}),g&&A.jsx("button",{onClick:D=>{D.preventDefault(),D.stopPropagation(),h(t)},style:{position:"absolute",top:"-15px",right:"-15px",width:"28px",height:"28px",backgroundColor:"#ef4444",color:"white",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",border:"2px solid #ffffff",cursor:"pointer",zIndex:1001,boxShadow:"0 4px 6px rgba(0,0,0,0.3)",transition:"transform 0.1s ease"},onMouseDown:D=>D.stopPropagation(),title:"Delete Table",children:A.jsx(ba,{size:16})}),A.jsx(Ta,{type:"target",position:ve.Top,style:{background:"#94a3b8",width:"8px",height:"8px",zIndex:10}}),A.jsxs("div",{style:{width:"100%",height:"100%",backgroundColor:"#1e293b",borderLeft:`2px solid ${g?"#3b82f6":"#334155"}`,borderRight:`2px solid ${g?"#3b82f6":"#334155"}`,borderBottom:`2px solid ${g?"#3b82f6":"#334155"}`,borderTop:`4px solid ${E}`,borderRadius:"8px",overflow:"hidden",color:"#f1f5f9",boxShadow:g?"0 0 0 4px rgba(59, 130, 246, 0.2)":"0 4px 6px -1px rgba(0, 0, 0, 0.1)",fontFamily:"sans-serif",display:"flex",flexDirection:"column"},children:[A.jsxs("div",{className:"table-drag-handle",style:{padding:"12px",backgroundColor:"rgba(15, 23, 42, 0.8)",borderBottom:v?"1px solid #334155":"none",flexShrink:0,cursor:"grab"},children:[A.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[A.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",minWidth:0},children:[C&&A.jsx("span",{style:{fontSize:"14px",flexShrink:0},children:C}),A.jsx("div",{style:{fontSize:"14px",fontWeight:"bold",color:"#ffffff",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r.name})]}),N&&A.jsx("div",{style:{fontSize:"9px",fontWeight:800,padding:"2px 6px",borderRadius:"4px",backgroundColor:`${E}20`,color:E,border:`1px solid ${E}40`,flexShrink:0,marginLeft:"8px"},children:N})]}),A.jsx("div",{style:{fontSize:"10px",color:"#94a3b8",textTransform:"uppercase",marginTop:"2px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r.id})]}),v&&A.jsx("div",{className:"nodrag",style:{padding:"0",overflowY:"auto",flex:1,cursor:"default"},children:A.jsx("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:"11px"},children:A.jsx("tbody",{children:r.columns.map(D=>A.jsxs("tr",{style:{borderBottom:"1px solid #334155",backgroundColor:s===D.id?"rgba(30, 58, 138, 0.6)":"transparent"},children:[A.jsx("td",{style:{padding:"6px 12px",fontWeight:500,color:"#e2e8f0",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"350px"},children:A.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[D.logical?.isPrimaryKey&&A.jsx("span",{style:{color:"#eab308",marginRight:"4px"},children:"🔑"}),D.logical?.isForeignKey&&A.jsx("span",{style:{marginRight:"4px"},children:"🔩"}),D.logical?.isPartitionKey&&A.jsx("span",{style:{marginRight:"4px"},children:"📂"}),A.jsx("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis"},children:D.logical?.name||D.id})]})}),A.jsx("td",{style:{padding:"6px 12px",textAlign:"right",fontStyle:"italic",color:"#94a3b8",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"150px"},children:D.logical?.type||"Unknown"})]},D.id))})})})]}),A.jsx(Ta,{type:"source",position:ve.Bottom,style:{background:"#94a3b8",width:"8px",height:"8px",zIndex:10}})]})},ZT=z.memo(XT),QT=({id:t,data:i,selected:a})=>{const{updateNodeDimensions:r,saveLayout:u,removeNode:f,selectedTableId:s,setSelectedTableId:h}=Cn(),p=a||s===t,m=i.color||"#1e293b",v=m.startsWith("rgba")||m.startsWith("hsla")||m.startsWith("#")&&m.length>7?1:.5,b=(C,N)=>{r(t,N.width,N.height),u()},E=C=>{C.stopPropagation(),h(t)};return A.jsxs("div",{onClick:E,style:{width:"100%",height:"100%",border:`2px dashed ${p?"#3b82f6":"#334155"}`,borderRadius:"12px",padding:"10px",position:"relative",color:"#94a3b8",pointerEvents:"all",cursor:"default"},children:[A.jsx(Xv,{color:"#3b82f6",isVisible:p,minWidth:200,minHeight:150,onResizeEnd:b,handleStyle:{width:14,height:14,borderRadius:"50%",backgroundColor:"#3b82f6",border:"2px solid #ffffff",zIndex:100}}),p&&A.jsx("button",{onClick:C=>{C.preventDefault(),C.stopPropagation(),f(t)},style:{position:"absolute",top:"-15px",right:"-15px",width:"28px",height:"28px",backgroundColor:"#ef4444",color:"white",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",border:"2px solid #ffffff",cursor:"pointer",zIndex:1001,boxShadow:"0 4px 6px rgba(0,0,0,0.3)"},onMouseDown:C=>C.stopPropagation(),title:"Delete Domain",children:A.jsx(ba,{size:16})}),A.jsx("div",{className:"nodrag",style:{position:"absolute",inset:0,backgroundColor:m,opacity:v,borderRadius:"10px",zIndex:-1,cursor:"default"}}),A.jsx("div",{className:"domain-drag-handle",style:{position:"absolute",top:"-25px",left:"0",fontSize:"14px",fontWeight:"bold",color:"#f1f5f9",whiteSpace:"nowrap",pointerEvents:"all",cursor:"grab",padding:"2px 8px",backgroundColor:"rgba(30, 41, 59, 0.8)",borderRadius:"4px 4px 0 0"},children:i.label})]})},$T=z.memo(QT),KT={fact:{color:"#f87171",icon:"📊",label:"FACT"},dimension:{color:"#60a5fa",icon:"🏷️",label:"DIM"},hub:{color:"#fbbf24",icon:"🌐",label:"HUB"},link:{color:"#34d399",icon:"🔗",label:"LINK"},satellite:{color:"#a78bfa",icon:"🛰️",label:"SAT"}},IT=()=>{const{selectedTableId:t,getSelectedTable:i,getSelectedDomain:a,setSelectedTableId:r,updateTable:u,updateDomain:f}=Cn(),s=i(),h=a(),[p,m]=z.useState("conceptual"),[g,v]=z.useState("");if(!t||!s&&!h)return null;if(h)return A.jsxs("div",{className:"bg-slate-900 border-t border-slate-800 shadow-2xl z-50 flex flex-col text-slate-100",style:{height:"35vh",maxHeight:"400px",minHeight:"200px",backgroundColor:"#0f172a",borderTop:`2px solid ${h.color||"#3b82f6"}`,display:"flex",flexDirection:"column",color:"#f1f5f9",boxShadow:"0 -10px 25px -5px rgba(0, 0, 0, 0.4)",fontFamily:"sans-serif"},children:[A.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 20px",borderBottom:"1px solid #1e293b",backgroundColor:"#020617"},children:[A.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",flex:1},children:[A.jsx(gd,{size:18,style:{color:h.color||"#3b82f6"}}),A.jsxs("div",{style:{flex:1},children:[A.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[A.jsx("input",{value:h.name,onChange:x=>f(h.id,{name:x.target.value}),style:{fontSize:"16px",fontWeight:"bold",color:"#ffffff",backgroundColor:"transparent",border:"none",borderBottom:"1px solid transparent",padding:"2px 0",outline:"none",width:"fit-content",minWidth:"200px"},onFocus:x=>x.target.style.borderBottom="1px solid #3b82f6",onBlur:x=>x.target.style.borderBottom="1px solid transparent"}),A.jsx("span",{style:{fontSize:"9px",fontWeight:800,padding:"1px 5px",borderRadius:"3px",backgroundColor:"rgba(59, 130, 246, 0.1)",color:"#60a5fa",border:"1px solid rgba(59, 130, 246, 0.2)",textTransform:"uppercase"},children:"DOMAIN"})]}),A.jsx("p",{style:{fontSize:"11px",color:"#94a3b8",textTransform:"uppercase",margin:0},children:h.id})]})]}),A.jsx("button",{onClick:()=>r(null),style:{padding:"6px",backgroundColor:"transparent",border:"none",color:"#94a3b8",cursor:"pointer"},children:A.jsx(ba,{size:18})})]}),A.jsx("div",{style:{flex:1,overflowY:"auto",padding:"20px"},children:A.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"20px"},children:[A.jsxs("section",{children:[A.jsx("h3",{style:{fontSize:"11px",fontWeight:700,color:"#475569",marginBottom:"8px",textTransform:"uppercase",letterSpacing:"0.1em"},children:"Domain Description"}),A.jsx("textarea",{value:h.description||"",onChange:x=>f(h.id,{description:x.target.value}),placeholder:"What is the purpose of this domain?",style:{width:"100%",minHeight:"80px",backgroundColor:"#1e293b",border:"1px solid #334155",borderRadius:"6px",padding:"12px",color:"#e2e8f0",fontSize:"13px",lineHeight:"1.6",resize:"none",outline:"none"}})]}),A.jsxs("section",{children:[A.jsx("h3",{style:{fontSize:"11px",fontWeight:700,color:"#475569",marginBottom:"8px",textTransform:"uppercase",letterSpacing:"0.1em"},children:"Domain Theme Color"}),A.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[A.jsx("input",{type:"color",value:h.color?.startsWith("rgba")?"#3b82f6":h.color||"#3b82f6",onChange:x=>f(h.id,{color:x.target.value}),style:{width:"40px",height:"40px",padding:0,border:"none",borderRadius:"4px",cursor:"pointer",backgroundColor:"transparent"}}),A.jsx("input",{value:h.color||"",onChange:x=>f(h.id,{color:x.target.value}),placeholder:"e.g. #3b82f6 or rgba(...)",className:"bg-slate-800 border border-slate-700 text-slate-300 font-mono text-sm p-2 rounded focus:ring-1 focus:ring-blue-500 outline-none flex-1"})]})]})]})})]});const b=[{id:"conceptual",label:"Conceptual",icon:A.jsx(YT,{size:14})},{id:"logical",label:"Logical",icon:A.jsx(gd,{size:14})},{id:"physical",label:"Physical",icon:A.jsx(jx,{size:14})},{id:"sample",label:"Sample Data",icon:A.jsx(LT,{size:14})}],E=s.appearance?.type?KT[s.appearance.type]:null,C=s.appearance?.color||E?.color||"#334155",N=s.appearance?.icon||E?.icon||"",T=E?.label||"",M=x=>{u(s.id,x)},D=()=>{const x={id:`col_${Date.now()}`,logical:{name:"New Column",type:"String",description:""},physical:{name:"",type:"VARCHAR(255)",constraints:[]}};M({columns:[...s.columns||[],x]})},q=x=>{const H=s.columns?.filter(w=>w.id!==x)||[];M({columns:H})},j=(x,H)=>{const w=s.columns?.map(R=>R.id===x?{...R,logical:{name:R.logical?.name||R.id,type:R.logical?.type||"String",...R.logical,...H}}:R)||[];M({columns:w})},I=(x,H)=>{const w=s.columns?.map(R=>R.id===x?{...R,physical:{...R.physical,...H}}:R)||[];M({columns:w})},G=x=>{if(x.key==="Enter"&&g.trim()){const H=s.conceptual?.tags||[];H.includes(g.trim())||M({conceptual:{...s.conceptual,tags:[...H,g.trim()]}}),v("")}},$=x=>{const H=s.conceptual?.tags||[];M({conceptual:{...s.conceptual,tags:H.filter(w=>w!==x)}})},B=x=>{const H=s.sampleData||{columns:[],rows:[]};M({sampleData:{...H,...x}})},ee=()=>{const x=s.sampleData||{columns:[],rows:[]},H=new Array(x.columns.length).fill("");B({rows:[...x.rows,H]})},oe=x=>{const w=(s.sampleData||{rows:[]}).rows.filter((R,X)=>X!==x);B({rows:w})},re=(x,H,w)=>{const X=[...(s.sampleData||{rows:[]}).rows];X[x]=[...X[x]],X[x][H]=w,B({rows:X})},ue=x=>{const H=s.sampleData||{columns:[],rows:[]};if(H.columns.includes(x))return;const w=[...H.columns,x],R=H.rows.map(X=>[...X,""]);B({columns:w,rows:R})},ie=x=>{const H=s.sampleData||{columns:[],rows:[]},w=H.columns.indexOf(x);if(w===-1)return;const R=H.columns.filter(L=>L!==x),X=H.rows.map(L=>L.filter((Y,_)=>_!==w));B({columns:R,rows:X})};return A.jsxs("div",{className:"bg-slate-900 border-t border-slate-800 shadow-2xl z-50 flex flex-col text-slate-100",style:{height:"45vh",maxHeight:"600px",minHeight:"300px",backgroundColor:"#0f172a",borderTop:`2px solid ${C}`,display:"flex",flexDirection:"column",color:"#f1f5f9",boxShadow:"0 -10px 25px -5px rgba(0, 0, 0, 0.4)",fontFamily:"sans-serif"},children:[A.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 20px",borderBottom:"1px solid #1e293b",backgroundColor:"#020617"},children:[A.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",flex:1},children:[N&&A.jsx("span",{style:{fontSize:"18px"},children:N}),A.jsxs("div",{style:{flex:1},children:[A.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[A.jsx("input",{value:s.name,onChange:x=>M({name:x.target.value}),title:"Logical Table Name",style:{fontSize:"16px",fontWeight:"bold",color:"#ffffff",backgroundColor:"transparent",border:"none",borderBottom:"1px solid transparent",padding:"2px 0",outline:"none",width:"fit-content",minWidth:"200px"},onFocus:x=>x.target.style.borderBottom="1px solid #3b82f6",onBlur:x=>x.target.style.borderBottom="1px solid transparent"}),T&&A.jsx("span",{style:{fontSize:"9px",fontWeight:800,padding:"1px 5px",borderRadius:"3px",backgroundColor:`${C}20`,color:C,border:`1px solid ${C}40`,textTransform:"uppercase"},children:T})]}),A.jsx("p",{style:{fontSize:"11px",color:"#94a3b8",textTransform:"uppercase",margin:0},children:s.id})]})]}),A.jsx("button",{onClick:x=>{x.stopPropagation(),r(null)},style:{padding:"6px",backgroundColor:"transparent",border:"none",color:"#94a3b8",cursor:"pointer",borderRadius:"50%"},children:A.jsx(ba,{size:18})})]}),A.jsx("div",{style:{display:"flex",gap:"24px",padding:"0 20px",borderBottom:"1px solid #1e293b",backgroundColor:"#0f172a"},children:b.map(x=>A.jsxs("button",{onClick:()=>m(x.id),style:{padding:"12px 0",backgroundColor:"transparent",border:"none",borderBottom:p===x.id?"2px solid #3b82f6":"2px solid transparent",color:p===x.id?"#60a5fa":"#94a3b8",fontSize:"13px",fontWeight:500,cursor:"pointer",display:"flex",alignItems:"center",gap:"6px",transition:"all 0.2s"},children:[x.icon," ",x.label]},x.id))}),A.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"15px 20px"},children:[p==="conceptual"&&A.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"20px"},children:[A.jsxs("section",{children:[A.jsx("h3",{style:{fontSize:"11px",fontWeight:700,color:"#475569",marginBottom:"8px",textTransform:"uppercase",letterSpacing:"0.1em"},children:"Description"}),A.jsx("textarea",{value:s.conceptual?.description||"",onChange:x=>M({conceptual:{...s.conceptual,description:x.target.value}}),placeholder:"Enter business description...",style:{width:"100%",minHeight:"100px",backgroundColor:"#1e293b",border:"1px solid #334155",borderRadius:"6px",padding:"12px",color:"#e2e8f0",fontSize:"13px",lineHeight:"1.6",resize:"none",outline:"none"}})]}),A.jsxs("section",{children:[A.jsx("h3",{style:{fontSize:"11px",fontWeight:700,color:"#475569",marginBottom:"8px",textTransform:"uppercase",letterSpacing:"0.1em"},children:"Tags"}),A.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"8px",alignItems:"center"},children:[s.conceptual?.tags?.map(x=>A.jsxs("span",{className:"flex items-center gap-2 px-3 py-1 bg-blue-500/10 text-blue-400 border border-blue-500/20 rounded-full text-xs",children:[x,A.jsx("button",{onClick:()=>$(x),className:"hover:text-red-400",children:A.jsx(ba,{size:12})})]},x)),A.jsx("div",{style:{position:"relative"},children:A.jsx("input",{type:"text",value:g,onChange:x=>v(x.target.value),onKeyDown:G,placeholder:"+ New Tag",style:{backgroundColor:"transparent",border:"1px dashed #334155",borderRadius:"16px",padding:"4px 12px",fontSize:"11px",color:"#e2e8f0",outline:"none",width:"100px"}})})]})]})]}),p==="logical"&&A.jsxs("div",{children:[A.jsxs("div",{className:"flex justify-between items-center mb-4",children:[A.jsx("h3",{style:{fontSize:"11px",fontWeight:700,color:"#475569",textTransform:"uppercase",letterSpacing:"0.1em"},children:"Logical Model"}),A.jsxs("button",{onClick:D,className:"flex items-center gap-2 px-3 py-1.5 bg-blue-600 hover:bg-blue-700 text-white rounded text-xs transition-colors",children:[A.jsx(yd,{size:14})," Add Column"]})]}),A.jsx("div",{style:{border:"1px solid #1e293b",borderRadius:"8px",overflow:"hidden"},children:A.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:"12px"},children:[A.jsx("thead",{style:{backgroundColor:"#020617",borderBottom:"1px solid #1e293b",textAlign:"left"},children:A.jsxs("tr",{children:[A.jsx("th",{style:{padding:"10px 16px",color:"#64748b",width:"30%"},children:"Logical Name"}),A.jsx("th",{style:{padding:"10px 16px",color:"#64748b",width:"20%"},children:"Type"}),A.jsx("th",{style:{padding:"10px 16px",color:"#64748b",width:"40%"},children:"Description"}),A.jsx("th",{style:{padding:"10px 16px",width:"50px"}})]})}),A.jsx("tbody",{children:(s.columns||[]).map(x=>A.jsxs("tr",{style:{borderBottom:"1px solid #1e293b",backgroundColor:"#0f172a"},children:[A.jsx("td",{style:{padding:"6px 16px"},children:A.jsxs("div",{className:"flex items-center gap-2",children:[A.jsx("button",{onClick:()=>j(x.id,{isPrimaryKey:!x.logical?.isPrimaryKey}),className:`transition-opacity ${x.logical?.isPrimaryKey?"opacity-100":"opacity-20 hover:opacity-50"}`,children:"🔑"}),A.jsx("input",{value:x.logical?.name||x.id,onChange:H=>j(x.id,{name:H.target.value}),className:"bg-transparent border-none text-slate-100 w-full outline-none p-1 focus:bg-slate-800 rounded"})]})}),A.jsx("td",{style:{padding:"6px 16px"},children:A.jsx("input",{value:x.logical?.type||"",onChange:H=>j(x.id,{type:H.target.value}),placeholder:"Type...",className:"bg-transparent border-none text-slate-400 font-mono text-[11px] w-full outline-none p-1 focus:bg-slate-800 rounded"})}),A.jsx("td",{style:{padding:"6px 16px"},children:A.jsx("input",{value:x.logical?.description||"",onChange:H=>j(x.id,{description:H.target.value}),placeholder:"Description...",className:"bg-transparent border-none text-slate-500 text-[11px] w-full outline-none p-1 focus:bg-slate-800 rounded"})}),A.jsx("td",{style:{padding:"6px 16px",textAlign:"right"},children:A.jsx("button",{onClick:()=>q(x.id),className:"text-red-500/50 hover:text-red-500 p-1 transition-colors",children:A.jsx(ry,{size:14})})})]},x.id))})]})})]}),p==="physical"&&A.jsx("div",{children:A.jsxs("div",{className:"flex flex-col gap-4",children:[A.jsx("div",{className:"flex justify-between items-center",children:A.jsx("h3",{style:{fontSize:"11px",fontWeight:700,color:"#475569",textTransform:"uppercase",letterSpacing:"0.1em"},children:"Physical Mappings"})}),A.jsx("div",{style:{border:"1px solid #1e293b",borderRadius:"8px",overflow:"hidden"},children:A.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:"12px"},children:[A.jsx("thead",{style:{backgroundColor:"#020617",borderBottom:"1px solid #1e293b",textAlign:"left"},children:A.jsxs("tr",{children:[A.jsx("th",{style:{padding:"10px 16px",color:"#64748b",width:"25%"},children:"Logical Column"}),A.jsx("th",{style:{padding:"10px 16px",color:"#64748b",width:"30%"},children:"DB Column Name"}),A.jsx("th",{style:{padding:"10px 16px",color:"#64748b",width:"20%"},children:"DB Type"}),A.jsx("th",{style:{padding:"10px 16px",color:"#64748b",width:"25%"},children:"Constraints"})]})}),A.jsx("tbody",{children:(s.columns||[]).map(x=>A.jsxs("tr",{style:{borderBottom:"1px solid #1e293b",backgroundColor:"#0f172a"},children:[A.jsx("td",{style:{padding:"6px 16px",color:"#94a3b8",borderRight:"1px solid #1e293b"},children:A.jsx("div",{className:"text-[11px] font-medium truncate",title:x.logical?.name||x.id,children:x.logical?.name||x.id})}),A.jsx("td",{style:{padding:"6px 16px"},children:A.jsx("input",{value:x.physical?.name||"",onChange:H=>I(x.id,{name:H.target.value}),placeholder:x.logical?.name.toLowerCase().replace(/ /g,"_"),className:"bg-transparent border-none text-blue-400 font-mono text-[11px] w-full outline-none p-1 focus:bg-slate-800 rounded"})}),A.jsx("td",{style:{padding:"6px 16px"},children:A.jsx("input",{value:x.physical?.type||"",onChange:H=>I(x.id,{type:H.target.value}),placeholder:x.logical?.type.toUpperCase(),className:"bg-transparent border-none text-slate-400 font-mono text-[11px] w-full outline-none p-1 focus:bg-slate-800 rounded"})}),A.jsx("td",{style:{padding:"6px 16px"},children:A.jsx("input",{value:x.physical?.constraints?.join(", ")||"",onChange:H=>I(x.id,{constraints:H.target.value.split(",").map(w=>w.trim()).filter(Boolean)}),placeholder:"e.g. NOT NULL",className:"bg-transparent border-none text-slate-500 text-[11px] w-full outline-none p-1 focus:bg-slate-800 rounded"})})]},x.id))})]})})]})}),p==="sample"&&A.jsxs("div",{className:"flex flex-col h-full",children:[A.jsxs("div",{className:"flex justify-between items-center mb-4",children:[A.jsx("h3",{style:{fontSize:"11px",fontWeight:700,color:"#475569",textTransform:"uppercase",letterSpacing:"0.1em"},children:"Sample Data Editor"}),A.jsxs("div",{className:"flex gap-2",children:[A.jsxs("select",{className:"bg-slate-800 border border-slate-700 text-xs rounded px-2 outline-none focus:ring-1 focus:ring-blue-500",onChange:x=>{x.target.value&&ue(x.target.value),x.target.value=""},value:"",children:[A.jsx("option",{value:"",children:"+ Add Column"}),(s.columns||[]).filter(x=>!s.sampleData?.columns.includes(x.id)).map(x=>A.jsx("option",{value:x.id,children:x.logical?.name||x.id},x.id))]}),A.jsxs("button",{onClick:ee,className:"flex items-center gap-2 px-3 py-1 bg-emerald-600 hover:bg-emerald-700 text-white rounded text-xs transition-colors",children:[A.jsx(yd,{size:14})," Add Row"]})]})]}),!s.sampleData||s.sampleData.columns.length===0?A.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center p-8 bg-slate-900/50 rounded-lg border border-dashed border-slate-700",children:[A.jsx("p",{className:"text-sm text-slate-500 italic mb-4",children:"No sample data structure defined."}),A.jsx("button",{onClick:()=>M({sampleData:{columns:(s.columns||[]).slice(0,3).map(x=>x.id),rows:[["Sample 1","Sample 2","Sample 3"]]}}),className:"text-blue-500 hover:underline text-xs",children:"Auto-generate from first 3 columns"})]}):A.jsx("div",{className:"flex-1 overflow-auto border border-slate-800 rounded-lg",children:A.jsxs("table",{className:"w-full border-collapse text-xs",children:[A.jsx("thead",{className:"sticky top-0 bg-slate-950 z-10 border-bottom border-slate-800",children:A.jsxs("tr",{children:[s.sampleData.columns.map(x=>{const H=s.columns?.find(w=>w.id===x);return A.jsx("th",{className:"p-3 text-left border-r border-slate-800 min-w-[140px]",children:A.jsxs("div",{className:"flex justify-between items-start",children:[A.jsxs("div",{className:"flex flex-col gap-0.5",children:[A.jsx("span",{className:"font-bold text-slate-200",children:H?.logical?.name||x}),A.jsx("span",{className:"text-[10px] text-blue-400 font-mono italic",children:H?.physical?.name||H?.logical?.name?.toLowerCase().replace(/ /g,"_")||x})]}),A.jsx("button",{onClick:()=>ie(x),className:"text-slate-600 hover:text-red-400 p-0.5",children:A.jsx(ba,{size:10})})]})},x)}),A.jsx("th",{className:"w-10 bg-slate-950"})]})}),A.jsx("tbody",{children:s.sampleData.rows.map((x,H)=>A.jsxs("tr",{className:"border-b border-slate-800 hover:bg-slate-800/30",children:[x.map((w,R)=>A.jsx("td",{className:"p-0 border-r border-slate-800",children:A.jsx("input",{value:String(w),onChange:X=>re(H,R,X.target.value),className:"w-full bg-transparent border-none p-3 outline-none focus:bg-slate-800 text-slate-300 font-mono"})},R)),A.jsx("td",{className:"p-2 text-center",children:A.jsx("button",{onClick:()=>oe(H),className:"text-slate-600 hover:text-red-400",children:A.jsx(ry,{size:12})})})]},H))})]})})]})]})]})};function fl(t,i,{checkForDefaultPrevented:a=!0}={}){return function(u){if(t?.(u),a===!1||!u.defaultPrevented)return i?.(u)}}function Qd(t,i=[]){let a=[];function r(f,s){const h=z.createContext(s),p=a.length;a=[...a,s];const m=v=>{const{scope:b,children:E,...C}=v,N=b?.[t]?.[p]||h,T=z.useMemo(()=>C,Object.values(C));return A.jsx(N.Provider,{value:T,children:E})};m.displayName=f+"Provider";function g(v,b){const E=b?.[t]?.[p]||h,C=z.useContext(E);if(C)return C;if(s!==void 0)return s;throw new Error(`\`${v}\` must be used within \`${f}\``)}return[m,g]}const u=()=>{const f=a.map(s=>z.createContext(s));return function(h){const p=h?.[t]||f;return z.useMemo(()=>({[`__scope${t}`]:{...h,[t]:p}}),[h,p])}};return u.scopeName=t,[r,FT(u,...i)]}function FT(...t){const i=t[0];if(t.length===1)return i;const a=()=>{const r=t.map(u=>({useScope:u(),scopeName:u.scopeName}));return function(f){const s=r.reduce((h,{useScope:p,scopeName:m})=>{const v=p(f)[`__scope${m}`];return{...h,...v}},{});return z.useMemo(()=>({[`__scope${i.scopeName}`]:s}),[s])}};return a.scopeName=i.scopeName,a}function uy(t,i){if(typeof t=="function")return t(i);t!=null&&(t.current=i)}function $d(...t){return i=>{let a=!1;const r=t.map(u=>{const f=uy(u,i);return!a&&typeof f=="function"&&(a=!0),f});if(a)return()=>{for(let u=0;u<r.length;u++){const f=r[u];typeof f=="function"?f():uy(t[u],null)}}}}function ec(...t){return z.useCallback($d(...t),t)}function cy(t){const i=JT(t),a=z.forwardRef((r,u)=>{const{children:f,...s}=r,h=z.Children.toArray(f),p=h.find(PT);if(p){const m=p.props.children,g=h.map(v=>v===p?z.Children.count(m)>1?z.Children.only(null):z.isValidElement(m)?m.props.children:null:v);return A.jsx(i,{...s,ref:u,children:z.isValidElement(m)?z.cloneElement(m,void 0,g):null})}return A.jsx(i,{...s,ref:u,children:f})});return a.displayName=`${t}.Slot`,a}function JT(t){const i=z.forwardRef((a,r)=>{const{children:u,...f}=a;if(z.isValidElement(u)){const s=tM(u),h=eM(f,u.props);return u.type!==z.Fragment&&(h.ref=r?$d(r,s):s),z.cloneElement(u,h)}return z.Children.count(u)>1?z.Children.only(null):null});return i.displayName=`${t}.SlotClone`,i}var WT=Symbol("radix.slottable");function PT(t){return z.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===WT}function eM(t,i){const a={...i};for(const r in i){const u=t[r],f=i[r];/^on[A-Z]/.test(r)?u&&f?a[r]=(...h)=>{const p=f(...h);return u(...h),p}:u&&(a[r]=u):r==="style"?a[r]={...u,...f}:r==="className"&&(a[r]=[u,f].filter(Boolean).join(" "))}return{...t,...a}}function tM(t){let i=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,a=i&&"isReactWarning"in i&&i.isReactWarning;return a?t.ref:(i=Object.getOwnPropertyDescriptor(t,"ref")?.get,a=i&&"isReactWarning"in i&&i.isReactWarning,a?t.props.ref:t.props.ref||t.ref)}function nM(t){const i=t+"CollectionProvider",[a,r]=Qd(i),[u,f]=a(i,{collectionRef:{current:null},itemMap:new Map}),s=N=>{const{scope:T,children:M}=N,D=W.useRef(null),q=W.useRef(new Map).current;return A.jsx(u,{scope:T,itemMap:q,collectionRef:D,children:M})};s.displayName=i;const h=t+"CollectionSlot",p=cy(h),m=W.forwardRef((N,T)=>{const{scope:M,children:D}=N,q=f(h,M),j=ec(T,q.collectionRef);return A.jsx(p,{ref:j,children:D})});m.displayName=h;const g=t+"CollectionItemSlot",v="data-radix-collection-item",b=cy(g),E=W.forwardRef((N,T)=>{const{scope:M,children:D,...q}=N,j=W.useRef(null),I=ec(T,j),G=f(g,M);return W.useEffect(()=>(G.itemMap.set(j,{ref:j,...q}),()=>{G.itemMap.delete(j)})),A.jsx(b,{[v]:"",ref:I,children:D})});E.displayName=g;function C(N){const T=f(t+"CollectionConsumer",N);return W.useCallback(()=>{const D=T.collectionRef.current;if(!D)return[];const q=Array.from(D.querySelectorAll(`[${v}]`));return Array.from(T.itemMap.values()).sort((G,$)=>q.indexOf(G.ref.current)-q.indexOf($.ref.current))},[T.collectionRef,T.itemMap])}return[{Provider:s,Slot:m,ItemSlot:E},C,r]}var tc=globalThis?.document?z.useLayoutEffect:()=>{},lM=yy[" useId ".trim().toString()]||(()=>{}),iM=0;function kx(t){const[i,a]=z.useState(lM());return tc(()=>{a(r=>r??String(iM++))},[t]),i?`radix-${i}`:""}function aM(t){const i=oM(t),a=z.forwardRef((r,u)=>{const{children:f,...s}=r,h=z.Children.toArray(f),p=h.find(uM);if(p){const m=p.props.children,g=h.map(v=>v===p?z.Children.count(m)>1?z.Children.only(null):z.isValidElement(m)?m.props.children:null:v);return A.jsx(i,{...s,ref:u,children:z.isValidElement(m)?z.cloneElement(m,void 0,g):null})}return A.jsx(i,{...s,ref:u,children:f})});return a.displayName=`${t}.Slot`,a}function oM(t){const i=z.forwardRef((a,r)=>{const{children:u,...f}=a;if(z.isValidElement(u)){const s=sM(u),h=cM(f,u.props);return u.type!==z.Fragment&&(h.ref=r?$d(r,s):s),z.cloneElement(u,h)}return z.Children.count(u)>1?z.Children.only(null):null});return i.displayName=`${t}.SlotClone`,i}var rM=Symbol("radix.slottable");function uM(t){return z.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===rM}function cM(t,i){const a={...i};for(const r in i){const u=t[r],f=i[r];/^on[A-Z]/.test(r)?u&&f?a[r]=(...h)=>{const p=f(...h);return u(...h),p}:u&&(a[r]=u):r==="style"?a[r]={...u,...f}:r==="className"&&(a[r]=[u,f].filter(Boolean).join(" "))}return{...t,...a}}function sM(t){let i=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,a=i&&"isReactWarning"in i&&i.isReactWarning;return a?t.ref:(i=Object.getOwnPropertyDescriptor(t,"ref")?.get,a=i&&"isReactWarning"in i&&i.isReactWarning,a?t.props.ref:t.props.ref||t.ref)}var fM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],za=fM.reduce((t,i)=>{const a=aM(`Primitive.${i}`),r=z.forwardRef((u,f)=>{const{asChild:s,...h}=u,p=s?a:i;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),A.jsx(p,{...h,ref:f})});return r.displayName=`Primitive.${i}`,{...t,[i]:r}},{});function dM(t){const i=z.useRef(t);return z.useEffect(()=>{i.current=t}),z.useMemo(()=>(...a)=>i.current?.(...a),[])}var hM=yy[" useInsertionEffect ".trim().toString()]||tc;function Ux({prop:t,defaultProp:i,onChange:a=()=>{},caller:r}){const[u,f,s]=pM({defaultProp:i,onChange:a}),h=t!==void 0,p=h?t:u;{const g=z.useRef(t!==void 0);z.useEffect(()=>{const v=g.current;v!==h&&console.warn(`${r} is changing from ${v?"controlled":"uncontrolled"} to ${h?"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.`),g.current=h},[h,r])}const m=z.useCallback(g=>{if(h){const v=mM(g)?g(t):g;v!==t&&s.current?.(v)}else f(g)},[h,t,f,s]);return[p,m]}function pM({defaultProp:t,onChange:i}){const[a,r]=z.useState(t),u=z.useRef(a),f=z.useRef(i);return hM(()=>{f.current=i},[i]),z.useEffect(()=>{u.current!==a&&(f.current?.(a),u.current=a)},[a,u]),[a,r,f]}function mM(t){return typeof t=="function"}var gM=z.createContext(void 0);function Lx(t){const i=z.useContext(gM);return t||i||"ltr"}var $f="rovingFocusGroup.onEntryFocus",yM={bubbles:!1,cancelable:!0},er="RovingFocusGroup",[vd,Bx,vM]=nM(er),[xM,Yx]=Qd(er,[vM]),[bM,SM]=xM(er),Vx=z.forwardRef((t,i)=>A.jsx(vd.Provider,{scope:t.__scopeRovingFocusGroup,children:A.jsx(vd.Slot,{scope:t.__scopeRovingFocusGroup,children:A.jsx(wM,{...t,ref:i})})}));Vx.displayName=er;var wM=z.forwardRef((t,i)=>{const{__scopeRovingFocusGroup:a,orientation:r,loop:u=!1,dir:f,currentTabStopId:s,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:p,onEntryFocus:m,preventScrollOnEntryFocus:g=!1,...v}=t,b=z.useRef(null),E=ec(i,b),C=Lx(f),[N,T]=Ux({prop:s,defaultProp:h??null,onChange:p,caller:er}),[M,D]=z.useState(!1),q=dM(m),j=Bx(a),I=z.useRef(!1),[G,$]=z.useState(0);return z.useEffect(()=>{const B=b.current;if(B)return B.addEventListener($f,q),()=>B.removeEventListener($f,q)},[q]),A.jsx(bM,{scope:a,orientation:r,dir:C,loop:u,currentTabStopId:N,onItemFocus:z.useCallback(B=>T(B),[T]),onItemShiftTab:z.useCallback(()=>D(!0),[]),onFocusableItemAdd:z.useCallback(()=>$(B=>B+1),[]),onFocusableItemRemove:z.useCallback(()=>$(B=>B-1),[]),children:A.jsx(za.div,{tabIndex:M||G===0?-1:0,"data-orientation":r,...v,ref:E,style:{outline:"none",...t.style},onMouseDown:fl(t.onMouseDown,()=>{I.current=!0}),onFocus:fl(t.onFocus,B=>{const ee=!I.current;if(B.target===B.currentTarget&&ee&&!M){const oe=new CustomEvent($f,yM);if(B.currentTarget.dispatchEvent(oe),!oe.defaultPrevented){const re=j().filter(w=>w.focusable),ue=re.find(w=>w.active),ie=re.find(w=>w.id===N),H=[ue,ie,...re].filter(Boolean).map(w=>w.ref.current);Xx(H,g)}}I.current=!1}),onBlur:fl(t.onBlur,()=>D(!1))})})}),qx="RovingFocusGroupItem",Gx=z.forwardRef((t,i)=>{const{__scopeRovingFocusGroup:a,focusable:r=!0,active:u=!1,tabStopId:f,children:s,...h}=t,p=kx(),m=f||p,g=SM(qx,a),v=g.currentTabStopId===m,b=Bx(a),{onFocusableItemAdd:E,onFocusableItemRemove:C,currentTabStopId:N}=g;return z.useEffect(()=>{if(r)return E(),()=>C()},[r,E,C]),A.jsx(vd.ItemSlot,{scope:a,id:m,focusable:r,active:u,children:A.jsx(za.span,{tabIndex:v?0:-1,"data-orientation":g.orientation,...h,ref:i,onMouseDown:fl(t.onMouseDown,T=>{r?g.onItemFocus(m):T.preventDefault()}),onFocus:fl(t.onFocus,()=>g.onItemFocus(m)),onKeyDown:fl(t.onKeyDown,T=>{if(T.key==="Tab"&&T.shiftKey){g.onItemShiftTab();return}if(T.target!==T.currentTarget)return;const M=AM(T,g.orientation,g.dir);if(M!==void 0){if(T.metaKey||T.ctrlKey||T.altKey||T.shiftKey)return;T.preventDefault();let q=b().filter(j=>j.focusable).map(j=>j.ref.current);if(M==="last")q.reverse();else if(M==="prev"||M==="next"){M==="prev"&&q.reverse();const j=q.indexOf(T.currentTarget);q=g.loop?NM(q,j+1):q.slice(j+1)}setTimeout(()=>Xx(q))}}),children:typeof s=="function"?s({isCurrentTabStop:v,hasTabStop:N!=null}):s})})});Gx.displayName=qx;var EM={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function _M(t,i){return i!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function AM(t,i,a){const r=_M(t.key,a);if(!(i==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(i==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return EM[r]}function Xx(t,i=!1){const a=document.activeElement;for(const r of t)if(r===a||(r.focus({preventScroll:i}),document.activeElement!==a))return}function NM(t,i){return t.map((a,r)=>t[(i+r)%t.length])}var CM=Vx,TM=Gx;function MM(t,i){return z.useReducer((a,r)=>i[a][r]??a,t)}var Zx=t=>{const{present:i,children:a}=t,r=zM(i),u=typeof a=="function"?a({present:r.isPresent}):z.Children.only(a),f=ec(r.ref,OM(u));return typeof a=="function"||r.isPresent?z.cloneElement(u,{ref:f}):null};Zx.displayName="Presence";function zM(t){const[i,a]=z.useState(),r=z.useRef(null),u=z.useRef(t),f=z.useRef("none"),s=t?"mounted":"unmounted",[h,p]=MM(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return z.useEffect(()=>{const m=Ru(r.current);f.current=h==="mounted"?m:"none"},[h]),tc(()=>{const m=r.current,g=u.current;if(g!==t){const b=f.current,E=Ru(m);t?p("MOUNT"):E==="none"||m?.display==="none"?p("UNMOUNT"):p(g&&b!==E?"ANIMATION_OUT":"UNMOUNT"),u.current=t}},[t,p]),tc(()=>{if(i){let m;const g=i.ownerDocument.defaultView??window,v=E=>{const N=Ru(r.current).includes(CSS.escape(E.animationName));if(E.target===i&&N&&(p("ANIMATION_END"),!u.current)){const T=i.style.animationFillMode;i.style.animationFillMode="forwards",m=g.setTimeout(()=>{i.style.animationFillMode==="forwards"&&(i.style.animationFillMode=T)})}},b=E=>{E.target===i&&(f.current=Ru(r.current))};return i.addEventListener("animationstart",b),i.addEventListener("animationcancel",v),i.addEventListener("animationend",v),()=>{g.clearTimeout(m),i.removeEventListener("animationstart",b),i.removeEventListener("animationcancel",v),i.removeEventListener("animationend",v)}}else p("ANIMATION_END")},[i,p]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:z.useCallback(m=>{r.current=m?getComputedStyle(m):null,a(m)},[])}}function Ru(t){return t?.animationName||"none"}function OM(t){let i=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,a=i&&"isReactWarning"in i&&i.isReactWarning;return a?t.ref:(i=Object.getOwnPropertyDescriptor(t,"ref")?.get,a=i&&"isReactWarning"in i&&i.isReactWarning,a?t.props.ref:t.props.ref||t.ref)}var fc="Tabs",[DM]=Qd(fc,[Yx]),Qx=Yx(),[RM,Kd]=DM(fc),$x=z.forwardRef((t,i)=>{const{__scopeTabs:a,value:r,onValueChange:u,defaultValue:f,orientation:s="horizontal",dir:h,activationMode:p="automatic",...m}=t,g=Lx(h),[v,b]=Ux({prop:r,onChange:u,defaultProp:f??"",caller:fc});return A.jsx(RM,{scope:a,baseId:kx(),value:v,onValueChange:b,orientation:s,dir:g,activationMode:p,children:A.jsx(za.div,{dir:g,"data-orientation":s,...m,ref:i})})});$x.displayName=fc;var Kx="TabsList",Ix=z.forwardRef((t,i)=>{const{__scopeTabs:a,loop:r=!0,...u}=t,f=Kd(Kx,a),s=Qx(a);return A.jsx(CM,{asChild:!0,...s,orientation:f.orientation,dir:f.dir,loop:r,children:A.jsx(za.div,{role:"tablist","aria-orientation":f.orientation,...u,ref:i})})});Ix.displayName=Kx;var Fx="TabsTrigger",Jx=z.forwardRef((t,i)=>{const{__scopeTabs:a,value:r,disabled:u=!1,...f}=t,s=Kd(Fx,a),h=Qx(a),p=e1(s.baseId,r),m=t1(s.baseId,r),g=r===s.value;return A.jsx(TM,{asChild:!0,...h,focusable:!u,active:g,children:A.jsx(za.button,{type:"button",role:"tab","aria-selected":g,"aria-controls":m,"data-state":g?"active":"inactive","data-disabled":u?"":void 0,disabled:u,id:p,...f,ref:i,onMouseDown:fl(t.onMouseDown,v=>{!u&&v.button===0&&v.ctrlKey===!1?s.onValueChange(r):v.preventDefault()}),onKeyDown:fl(t.onKeyDown,v=>{[" ","Enter"].includes(v.key)&&s.onValueChange(r)}),onFocus:fl(t.onFocus,()=>{const v=s.activationMode!=="manual";!g&&!u&&v&&s.onValueChange(r)})})})});Jx.displayName=Fx;var Wx="TabsContent",Px=z.forwardRef((t,i)=>{const{__scopeTabs:a,value:r,forceMount:u,children:f,...s}=t,h=Kd(Wx,a),p=e1(h.baseId,r),m=t1(h.baseId,r),g=r===h.value,v=z.useRef(g);return z.useEffect(()=>{const b=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(b)},[]),A.jsx(Zx,{present:u||g,children:({present:b})=>A.jsx(za.div,{"data-state":g?"active":"inactive","data-orientation":h.orientation,role:"tabpanel","aria-labelledby":p,hidden:!b,id:m,tabIndex:0,...s,ref:i,style:{...t.style,animationDuration:v.current?"0s":void 0},children:b&&f})})});Px.displayName=Wx;function e1(t,i){return`${t}-trigger-${i}`}function t1(t,i){return`${t}-content-${i}`}var HM=$x,n1=Ix,l1=Jx,i1=Px;function a1(t){var i,a,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var u=t.length;for(i=0;i<u;i++)t[i]&&(a=a1(t[i]))&&(r&&(r+=" "),r+=a)}else for(a in t)t[a]&&(r&&(r+=" "),r+=a);return r}function jM(){for(var t,i,a=0,r="",u=arguments.length;a<u;a++)(t=arguments[a])&&(i=a1(t))&&(r&&(r+=" "),r+=i);return r}const kM=(t,i)=>{const a=new Array(t.length+i.length);for(let r=0;r<t.length;r++)a[r]=t[r];for(let r=0;r<i.length;r++)a[t.length+r]=i[r];return a},UM=(t,i)=>({classGroupId:t,validator:i}),o1=(t=new Map,i=null,a)=>({nextPart:t,validators:i,classGroupId:a}),nc="-",sy=[],LM="arbitrary..",BM=t=>{const i=VM(t),{conflictingClassGroups:a,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return YM(s);const h=s.split(nc),p=h[0]===""&&h.length>1?1:0;return r1(h,p,i)},getConflictingClassGroupIds:(s,h)=>{if(h){const p=r[s],m=a[s];return p?m?kM(m,p):p:m||sy}return a[s]||sy}}},r1=(t,i,a)=>{if(t.length-i===0)return a.classGroupId;const u=t[i],f=a.nextPart.get(u);if(f){const m=r1(t,i+1,f);if(m)return m}const s=a.validators;if(s===null)return;const h=i===0?t.join(nc):t.slice(i).join(nc),p=s.length;for(let m=0;m<p;m++){const g=s[m];if(g.validator(h))return g.classGroupId}},YM=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const i=t.slice(1,-1),a=i.indexOf(":"),r=i.slice(0,a);return r?LM+r:void 0})(),VM=t=>{const{theme:i,classGroups:a}=t;return qM(a,i)},qM=(t,i)=>{const a=o1();for(const r in t){const u=t[r];Id(u,a,r,i)}return a},Id=(t,i,a,r)=>{const u=t.length;for(let f=0;f<u;f++){const s=t[f];GM(s,i,a,r)}},GM=(t,i,a,r)=>{if(typeof t=="string"){XM(t,i,a);return}if(typeof t=="function"){ZM(t,i,a,r);return}QM(t,i,a,r)},XM=(t,i,a)=>{const r=t===""?i:u1(i,t);r.classGroupId=a},ZM=(t,i,a,r)=>{if($M(t)){Id(t(r),i,a,r);return}i.validators===null&&(i.validators=[]),i.validators.push(UM(a,t))},QM=(t,i,a,r)=>{const u=Object.entries(t),f=u.length;for(let s=0;s<f;s++){const[h,p]=u[s];Id(p,u1(i,h),a,r)}},u1=(t,i)=>{let a=t;const r=i.split(nc),u=r.length;for(let f=0;f<u;f++){const s=r[f];let h=a.nextPart.get(s);h||(h=o1(),a.nextPart.set(s,h)),a=h}return a},$M=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,KM=t=>{if(t<1)return{get:()=>{},set:()=>{}};let i=0,a=Object.create(null),r=Object.create(null);const u=(f,s)=>{a[f]=s,i++,i>t&&(i=0,r=a,a=Object.create(null))};return{get(f){let s=a[f];if(s!==void 0)return s;if((s=r[f])!==void 0)return u(f,s),s},set(f,s){f in a?a[f]=s:u(f,s)}}},xd="!",fy=":",IM=[],dy=(t,i,a,r,u)=>({modifiers:t,hasImportantModifier:i,baseClassName:a,maybePostfixModifierPosition:r,isExternal:u}),FM=t=>{const{prefix:i,experimentalParseClassName:a}=t;let r=u=>{const f=[];let s=0,h=0,p=0,m;const g=u.length;for(let N=0;N<g;N++){const T=u[N];if(s===0&&h===0){if(T===fy){f.push(u.slice(p,N)),p=N+1;continue}if(T==="/"){m=N;continue}}T==="["?s++:T==="]"?s--:T==="("?h++:T===")"&&h--}const v=f.length===0?u:u.slice(p);let b=v,E=!1;v.endsWith(xd)?(b=v.slice(0,-1),E=!0):v.startsWith(xd)&&(b=v.slice(1),E=!0);const C=m&&m>p?m-p:void 0;return dy(f,E,b,C)};if(i){const u=i+fy,f=r;r=s=>s.startsWith(u)?f(s.slice(u.length)):dy(IM,!1,s,void 0,!0)}if(a){const u=r;r=f=>a({className:f,parseClassName:u})}return r},JM=t=>{const i=new Map;return t.orderSensitiveModifiers.forEach((a,r)=>{i.set(a,1e6+r)}),a=>{const r=[];let u=[];for(let f=0;f<a.length;f++){const s=a[f],h=s[0]==="[",p=i.has(s);h||p?(u.length>0&&(u.sort(),r.push(...u),u=[]),r.push(s)):u.push(s)}return u.length>0&&(u.sort(),r.push(...u)),r}},WM=t=>({cache:KM(t.cacheSize),parseClassName:FM(t),sortModifiers:JM(t),...BM(t)}),PM=/\s+/,e4=(t,i)=>{const{parseClassName:a,getClassGroupId:r,getConflictingClassGroupIds:u,sortModifiers:f}=i,s=[],h=t.trim().split(PM);let p="";for(let m=h.length-1;m>=0;m-=1){const g=h[m],{isExternal:v,modifiers:b,hasImportantModifier:E,baseClassName:C,maybePostfixModifierPosition:N}=a(g);if(v){p=g+(p.length>0?" "+p:p);continue}let T=!!N,M=r(T?C.substring(0,N):C);if(!M){if(!T){p=g+(p.length>0?" "+p:p);continue}if(M=r(C),!M){p=g+(p.length>0?" "+p:p);continue}T=!1}const D=b.length===0?"":b.length===1?b[0]:f(b).join(":"),q=E?D+xd:D,j=q+M;if(s.indexOf(j)>-1)continue;s.push(j);const I=u(M,T);for(let G=0;G<I.length;++G){const $=I[G];s.push(q+$)}p=g+(p.length>0?" "+p:p)}return p},t4=(...t)=>{let i=0,a,r,u="";for(;i<t.length;)(a=t[i++])&&(r=c1(a))&&(u&&(u+=" "),u+=r);return u},c1=t=>{if(typeof t=="string")return t;let i,a="";for(let r=0;r<t.length;r++)t[r]&&(i=c1(t[r]))&&(a&&(a+=" "),a+=i);return a},n4=(t,...i)=>{let a,r,u,f;const s=p=>{const m=i.reduce((g,v)=>v(g),t());return a=WM(m),r=a.cache.get,u=a.cache.set,f=h,h(p)},h=p=>{const m=r(p);if(m)return m;const g=e4(p,a);return u(p,g),g};return f=s,(...p)=>f(t4(...p))},l4=[],yt=t=>{const i=a=>a[t]||l4;return i.isThemeGetter=!0,i},s1=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,f1=/^\((?:(\w[\w-]*):)?(.+)\)$/i,i4=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,a4=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,o4=/\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$/,r4=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,u4=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,c4=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Xl=t=>i4.test(t),Ne=t=>!!t&&!Number.isNaN(Number(t)),Zl=t=>!!t&&Number.isInteger(Number(t)),Kf=t=>t.endsWith("%")&&Ne(t.slice(0,-1)),cl=t=>a4.test(t),d1=()=>!0,s4=t=>o4.test(t)&&!r4.test(t),Fd=()=>!1,f4=t=>u4.test(t),d4=t=>c4.test(t),h4=t=>!pe(t)&&!me(t),p4=t=>ei(t,m1,Fd),pe=t=>s1.test(t),wi=t=>ei(t,g1,s4),hy=t=>ei(t,w4,Ne),m4=t=>ei(t,v1,d1),g4=t=>ei(t,y1,Fd),py=t=>ei(t,h1,Fd),y4=t=>ei(t,p1,d4),Hu=t=>ei(t,x1,f4),me=t=>f1.test(t),Ho=t=>zi(t,g1),v4=t=>zi(t,y1),my=t=>zi(t,h1),x4=t=>zi(t,m1),b4=t=>zi(t,p1),ju=t=>zi(t,x1,!0),S4=t=>zi(t,v1,!0),ei=(t,i,a)=>{const r=s1.exec(t);return r?r[1]?i(r[1]):a(r[2]):!1},zi=(t,i,a=!1)=>{const r=f1.exec(t);return r?r[1]?i(r[1]):a:!1},h1=t=>t==="position"||t==="percentage",p1=t=>t==="image"||t==="url",m1=t=>t==="length"||t==="size"||t==="bg-size",g1=t=>t==="length",w4=t=>t==="number",y1=t=>t==="family-name",v1=t=>t==="number"||t==="weight",x1=t=>t==="shadow",E4=()=>{const t=yt("color"),i=yt("font"),a=yt("text"),r=yt("font-weight"),u=yt("tracking"),f=yt("leading"),s=yt("breakpoint"),h=yt("container"),p=yt("spacing"),m=yt("radius"),g=yt("shadow"),v=yt("inset-shadow"),b=yt("text-shadow"),E=yt("drop-shadow"),C=yt("blur"),N=yt("perspective"),T=yt("aspect"),M=yt("ease"),D=yt("animate"),q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],I=()=>[...j(),me,pe],G=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto","contain","none"],B=()=>[me,pe,p],ee=()=>[Xl,"full","auto",...B()],oe=()=>[Zl,"none","subgrid",me,pe],re=()=>["auto",{span:["full",Zl,me,pe]},Zl,me,pe],ue=()=>[Zl,"auto",me,pe],ie=()=>["auto","min","max","fr",me,pe],x=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],H=()=>["start","end","center","stretch","center-safe","end-safe"],w=()=>["auto",...B()],R=()=>[Xl,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...B()],X=()=>[Xl,"screen","full","dvw","lvw","svw","min","max","fit",...B()],L=()=>[Xl,"screen","full","lh","dvh","lvh","svh","min","max","fit",...B()],Y=()=>[t,me,pe],_=()=>[...j(),my,py,{position:[me,pe]}],U=()=>["no-repeat",{repeat:["","x","y","space","round"]}],F=()=>["auto","cover","contain",x4,p4,{size:[me,pe]}],P=()=>[Kf,Ho,wi],ae=()=>["","none","full",m,me,pe],ce=()=>["",Ne,Ho,wi],fe=()=>["solid","dashed","dotted","double"],be=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],de=()=>[Ne,Kf,my,py],Ae=()=>["","none",C,me,pe],Re=()=>["none",Ne,me,pe],Ve=()=>["none",Ne,me,pe],Pe=()=>[Ne,me,pe],Ye=()=>[Xl,"full",...B()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[cl],breakpoint:[cl],color:[d1],container:[cl],"drop-shadow":[cl],ease:["in","out","in-out"],font:[h4],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[cl],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[cl],shadow:[cl],spacing:["px",Ne],text:[cl],"text-shadow":[cl],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Xl,pe,me,T]}],container:["container"],columns:[{columns:[Ne,pe,me,h]}],"break-after":[{"break-after":q()}],"break-before":[{"break-before":q()}],"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:I()}],overflow:[{overflow:G()}],"overflow-x":[{"overflow-x":G()}],"overflow-y":[{"overflow-y":G()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ee()}],"inset-x":[{"inset-x":ee()}],"inset-y":[{"inset-y":ee()}],start:[{"inset-s":ee(),start:ee()}],end:[{"inset-e":ee(),end:ee()}],"inset-bs":[{"inset-bs":ee()}],"inset-be":[{"inset-be":ee()}],top:[{top:ee()}],right:[{right:ee()}],bottom:[{bottom:ee()}],left:[{left:ee()}],visibility:["visible","invisible","collapse"],z:[{z:[Zl,"auto",me,pe]}],basis:[{basis:[Xl,"full","auto",h,...B()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ne,Xl,"auto","initial","none",pe]}],grow:[{grow:["",Ne,me,pe]}],shrink:[{shrink:["",Ne,me,pe]}],order:[{order:[Zl,"first","last","none",me,pe]}],"grid-cols":[{"grid-cols":oe()}],"col-start-end":[{col:re()}],"col-start":[{"col-start":ue()}],"col-end":[{"col-end":ue()}],"grid-rows":[{"grid-rows":oe()}],"row-start-end":[{row:re()}],"row-start":[{"row-start":ue()}],"row-end":[{"row-end":ue()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ie()}],"auto-rows":[{"auto-rows":ie()}],gap:[{gap:B()}],"gap-x":[{"gap-x":B()}],"gap-y":[{"gap-y":B()}],"justify-content":[{justify:[...x(),"normal"]}],"justify-items":[{"justify-items":[...H(),"normal"]}],"justify-self":[{"justify-self":["auto",...H()]}],"align-content":[{content:["normal",...x()]}],"align-items":[{items:[...H(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...H(),{baseline:["","last"]}]}],"place-content":[{"place-content":x()}],"place-items":[{"place-items":[...H(),"baseline"]}],"place-self":[{"place-self":["auto",...H()]}],p:[{p:B()}],px:[{px:B()}],py:[{py:B()}],ps:[{ps:B()}],pe:[{pe:B()}],pbs:[{pbs:B()}],pbe:[{pbe:B()}],pt:[{pt:B()}],pr:[{pr:B()}],pb:[{pb:B()}],pl:[{pl:B()}],m:[{m:w()}],mx:[{mx:w()}],my:[{my:w()}],ms:[{ms:w()}],me:[{me:w()}],mbs:[{mbs:w()}],mbe:[{mbe:w()}],mt:[{mt:w()}],mr:[{mr:w()}],mb:[{mb:w()}],ml:[{ml:w()}],"space-x":[{"space-x":B()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":B()}],"space-y-reverse":["space-y-reverse"],size:[{size:R()}],"inline-size":[{inline:["auto",...X()]}],"min-inline-size":[{"min-inline":["auto",...X()]}],"max-inline-size":[{"max-inline":["none",...X()]}],"block-size":[{block:["auto",...L()]}],"min-block-size":[{"min-block":["auto",...L()]}],"max-block-size":[{"max-block":["none",...L()]}],w:[{w:[h,"screen",...R()]}],"min-w":[{"min-w":[h,"screen","none",...R()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[s]},...R()]}],h:[{h:["screen","lh",...R()]}],"min-h":[{"min-h":["screen","lh","none",...R()]}],"max-h":[{"max-h":["screen","lh",...R()]}],"font-size":[{text:["base",a,Ho,wi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,S4,m4]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Kf,pe]}],"font-family":[{font:[v4,g4,i]}],"font-features":[{"font-features":[pe]}],"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:[u,me,pe]}],"line-clamp":[{"line-clamp":[Ne,"none",me,hy]}],leading:[{leading:[f,...B()]}],"list-image":[{"list-image":["none",me,pe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",me,pe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Y()}],"text-color":[{text:Y()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...fe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ne,"from-font","auto",me,wi]}],"text-decoration-color":[{decoration:Y()}],"underline-offset":[{"underline-offset":[Ne,"auto",me,pe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",me,pe]}],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",me,pe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:_()}],"bg-repeat":[{bg:U()}],"bg-size":[{bg:F()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Zl,me,pe],radial:["",me,pe],conic:[Zl,me,pe]},b4,y4]}],"bg-color":[{bg:Y()}],"gradient-from-pos":[{from:P()}],"gradient-via-pos":[{via:P()}],"gradient-to-pos":[{to:P()}],"gradient-from":[{from:Y()}],"gradient-via":[{via:Y()}],"gradient-to":[{to:Y()}],rounded:[{rounded:ae()}],"rounded-s":[{"rounded-s":ae()}],"rounded-e":[{"rounded-e":ae()}],"rounded-t":[{"rounded-t":ae()}],"rounded-r":[{"rounded-r":ae()}],"rounded-b":[{"rounded-b":ae()}],"rounded-l":[{"rounded-l":ae()}],"rounded-ss":[{"rounded-ss":ae()}],"rounded-se":[{"rounded-se":ae()}],"rounded-ee":[{"rounded-ee":ae()}],"rounded-es":[{"rounded-es":ae()}],"rounded-tl":[{"rounded-tl":ae()}],"rounded-tr":[{"rounded-tr":ae()}],"rounded-br":[{"rounded-br":ae()}],"rounded-bl":[{"rounded-bl":ae()}],"border-w":[{border:ce()}],"border-w-x":[{"border-x":ce()}],"border-w-y":[{"border-y":ce()}],"border-w-s":[{"border-s":ce()}],"border-w-e":[{"border-e":ce()}],"border-w-bs":[{"border-bs":ce()}],"border-w-be":[{"border-be":ce()}],"border-w-t":[{"border-t":ce()}],"border-w-r":[{"border-r":ce()}],"border-w-b":[{"border-b":ce()}],"border-w-l":[{"border-l":ce()}],"divide-x":[{"divide-x":ce()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ce()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...fe(),"hidden","none"]}],"divide-style":[{divide:[...fe(),"hidden","none"]}],"border-color":[{border:Y()}],"border-color-x":[{"border-x":Y()}],"border-color-y":[{"border-y":Y()}],"border-color-s":[{"border-s":Y()}],"border-color-e":[{"border-e":Y()}],"border-color-bs":[{"border-bs":Y()}],"border-color-be":[{"border-be":Y()}],"border-color-t":[{"border-t":Y()}],"border-color-r":[{"border-r":Y()}],"border-color-b":[{"border-b":Y()}],"border-color-l":[{"border-l":Y()}],"divide-color":[{divide:Y()}],"outline-style":[{outline:[...fe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ne,me,pe]}],"outline-w":[{outline:["",Ne,Ho,wi]}],"outline-color":[{outline:Y()}],shadow:[{shadow:["","none",g,ju,Hu]}],"shadow-color":[{shadow:Y()}],"inset-shadow":[{"inset-shadow":["none",v,ju,Hu]}],"inset-shadow-color":[{"inset-shadow":Y()}],"ring-w":[{ring:ce()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Y()}],"ring-offset-w":[{"ring-offset":[Ne,wi]}],"ring-offset-color":[{"ring-offset":Y()}],"inset-ring-w":[{"inset-ring":ce()}],"inset-ring-color":[{"inset-ring":Y()}],"text-shadow":[{"text-shadow":["none",b,ju,Hu]}],"text-shadow-color":[{"text-shadow":Y()}],opacity:[{opacity:[Ne,me,pe]}],"mix-blend":[{"mix-blend":[...be(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":be()}],"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":[Ne]}],"mask-image-linear-from-pos":[{"mask-linear-from":de()}],"mask-image-linear-to-pos":[{"mask-linear-to":de()}],"mask-image-linear-from-color":[{"mask-linear-from":Y()}],"mask-image-linear-to-color":[{"mask-linear-to":Y()}],"mask-image-t-from-pos":[{"mask-t-from":de()}],"mask-image-t-to-pos":[{"mask-t-to":de()}],"mask-image-t-from-color":[{"mask-t-from":Y()}],"mask-image-t-to-color":[{"mask-t-to":Y()}],"mask-image-r-from-pos":[{"mask-r-from":de()}],"mask-image-r-to-pos":[{"mask-r-to":de()}],"mask-image-r-from-color":[{"mask-r-from":Y()}],"mask-image-r-to-color":[{"mask-r-to":Y()}],"mask-image-b-from-pos":[{"mask-b-from":de()}],"mask-image-b-to-pos":[{"mask-b-to":de()}],"mask-image-b-from-color":[{"mask-b-from":Y()}],"mask-image-b-to-color":[{"mask-b-to":Y()}],"mask-image-l-from-pos":[{"mask-l-from":de()}],"mask-image-l-to-pos":[{"mask-l-to":de()}],"mask-image-l-from-color":[{"mask-l-from":Y()}],"mask-image-l-to-color":[{"mask-l-to":Y()}],"mask-image-x-from-pos":[{"mask-x-from":de()}],"mask-image-x-to-pos":[{"mask-x-to":de()}],"mask-image-x-from-color":[{"mask-x-from":Y()}],"mask-image-x-to-color":[{"mask-x-to":Y()}],"mask-image-y-from-pos":[{"mask-y-from":de()}],"mask-image-y-to-pos":[{"mask-y-to":de()}],"mask-image-y-from-color":[{"mask-y-from":Y()}],"mask-image-y-to-color":[{"mask-y-to":Y()}],"mask-image-radial":[{"mask-radial":[me,pe]}],"mask-image-radial-from-pos":[{"mask-radial-from":de()}],"mask-image-radial-to-pos":[{"mask-radial-to":de()}],"mask-image-radial-from-color":[{"mask-radial-from":Y()}],"mask-image-radial-to-color":[{"mask-radial-to":Y()}],"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":j()}],"mask-image-conic-pos":[{"mask-conic":[Ne]}],"mask-image-conic-from-pos":[{"mask-conic-from":de()}],"mask-image-conic-to-pos":[{"mask-conic-to":de()}],"mask-image-conic-from-color":[{"mask-conic-from":Y()}],"mask-image-conic-to-color":[{"mask-conic-to":Y()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:_()}],"mask-repeat":[{mask:U()}],"mask-size":[{mask:F()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",me,pe]}],filter:[{filter:["","none",me,pe]}],blur:[{blur:Ae()}],brightness:[{brightness:[Ne,me,pe]}],contrast:[{contrast:[Ne,me,pe]}],"drop-shadow":[{"drop-shadow":["","none",E,ju,Hu]}],"drop-shadow-color":[{"drop-shadow":Y()}],grayscale:[{grayscale:["",Ne,me,pe]}],"hue-rotate":[{"hue-rotate":[Ne,me,pe]}],invert:[{invert:["",Ne,me,pe]}],saturate:[{saturate:[Ne,me,pe]}],sepia:[{sepia:["",Ne,me,pe]}],"backdrop-filter":[{"backdrop-filter":["","none",me,pe]}],"backdrop-blur":[{"backdrop-blur":Ae()}],"backdrop-brightness":[{"backdrop-brightness":[Ne,me,pe]}],"backdrop-contrast":[{"backdrop-contrast":[Ne,me,pe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ne,me,pe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ne,me,pe]}],"backdrop-invert":[{"backdrop-invert":["",Ne,me,pe]}],"backdrop-opacity":[{"backdrop-opacity":[Ne,me,pe]}],"backdrop-saturate":[{"backdrop-saturate":[Ne,me,pe]}],"backdrop-sepia":[{"backdrop-sepia":["",Ne,me,pe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":B()}],"border-spacing-x":[{"border-spacing-x":B()}],"border-spacing-y":[{"border-spacing-y":B()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",me,pe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ne,"initial",me,pe]}],ease:[{ease:["linear","initial",M,me,pe]}],delay:[{delay:[Ne,me,pe]}],animate:[{animate:["none",D,me,pe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[N,me,pe]}],"perspective-origin":[{"perspective-origin":I()}],rotate:[{rotate:Re()}],"rotate-x":[{"rotate-x":Re()}],"rotate-y":[{"rotate-y":Re()}],"rotate-z":[{"rotate-z":Re()}],scale:[{scale:Ve()}],"scale-x":[{"scale-x":Ve()}],"scale-y":[{"scale-y":Ve()}],"scale-z":[{"scale-z":Ve()}],"scale-3d":["scale-3d"],skew:[{skew:Pe()}],"skew-x":[{"skew-x":Pe()}],"skew-y":[{"skew-y":Pe()}],transform:[{transform:[me,pe,"","none","gpu","cpu"]}],"transform-origin":[{origin:I()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ye()}],"translate-x":[{"translate-x":Ye()}],"translate-y":[{"translate-y":Ye()}],"translate-z":[{"translate-z":Ye()}],"translate-none":["translate-none"],accent:[{accent:Y()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Y()}],"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",me,pe]}],"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":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mbs":[{"scroll-mbs":B()}],"scroll-mbe":[{"scroll-mbe":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pbs":[{"scroll-pbs":B()}],"scroll-pbe":[{"scroll-pbe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"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",me,pe]}],fill:[{fill:["none",...Y()]}],"stroke-w":[{stroke:[Ne,Ho,wi,hy]}],stroke:[{stroke:["none",...Y()]}],"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"]}},_4=n4(E4);function Jd(...t){return _4(jM(t))}const A4=HM,b1=z.forwardRef(({className:t,...i},a)=>A.jsx(n1,{ref:a,className:Jd("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",t),...i}));b1.displayName=n1.displayName;const bd=z.forwardRef(({className:t,...i},a)=>A.jsx(l1,{ref:a,className:Jd("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 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-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",t),...i}));bd.displayName=l1.displayName;const Sd=z.forwardRef(({className:t,...i},a)=>A.jsx(i1,{ref:a,className:Jd("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),...i}));Sd.displayName=i1.displayName;const N4=()=>{const{error:t,isCliMode:i,currentModelSlug:a,yamlInput:r,setYamlInput:u,parseAndSetSchema:f}=Cn(),s=async()=>{if(f(r),i)try{const h=a?`/api/save-yaml?model=${a}`:"/api/save-yaml";await fetch(h,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({yaml:r})})}catch(h){console.error("Failed to save YAML to file:",h)}};return A.jsxs("div",{className:"flex-1 flex flex-col gap-3 overflow-hidden p-4 pt-2 h-full",children:[!i&&A.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 bg-blue-500/10 border border-blue-500/30 rounded-md shrink-0",children:[A.jsx(oy,{size:14,className:"text-blue-400"}),A.jsx("span",{className:"text-[11px] text-blue-300 font-medium",children:"Sandbox Mode (Temporary)"})]}),A.jsxs("div",{className:"relative flex-1 flex flex-col min-h-0",children:[A.jsx("textarea",{className:"flex-1 w-full p-4 bg-slate-800/50 text-slate-100 border border-slate-700 rounded-md font-mono text-sm focus:outline-none focus:ring-1 focus:ring-blue-500/50 transition-all resize-none shadow-inner",placeholder:"tables: ...",value:r,onChange:h=>u(h.target.value)}),t&&A.jsxs("div",{className:"mt-2 p-3 bg-red-500/10 border border-red-500/30 rounded-md text-red-400 text-xs flex gap-2 items-start shrink-0",children:[A.jsx(oy,{size:14,className:"shrink-0 mt-0.5"}),A.jsx("span",{children:t})]})]}),A.jsxs("div",{className:"flex justify-between items-center pt-1 shrink-0",children:[A.jsx("div",{className:"text-[10px] text-slate-500 italic",children:i?"Saves to local file":"Changes reset on reload"}),A.jsxs("button",{onClick:s,className:`flex items-center gap-2 px-4 py-2 rounded-md font-medium text-sm transition-all shadow-lg shrink-0 ${i?"bg-blue-600 hover:bg-blue-700 text-white":"bg-emerald-600 hover:bg-emerald-700 text-white"}`,children:[i?A.jsx(HT,{size:16}):A.jsx(OT,{size:16}),i?"Save & Update":"Apply Changes"]})]})]})},C4=()=>{const{schema:t,setSelectedTableId:i,setFocusNodeId:a}=Cn(),[r,u]=z.useState("");if(!t)return null;const f=t.tables.filter(p=>p.name.toLowerCase().includes(r.toLowerCase())||p.id.toLowerCase().includes(r.toLowerCase())),s=t.domains?.filter(p=>p.name.toLowerCase().includes(r.toLowerCase())||p.id.toLowerCase().includes(r.toLowerCase()))||[],h=p=>{i(p),a(p)};return A.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden p-4 pt-2",children:[A.jsxs("div",{className:"relative mb-4 shrink-0",children:[A.jsx(kT,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-500"}),A.jsx("input",{type:"text",value:r,onChange:p=>u(p.target.value),placeholder:"Search entities...",className:"w-full pl-9 pr-4 py-2 bg-slate-800 border border-slate-700 rounded-md text-sm text-slate-100 focus:outline-none focus:ring-1 focus:ring-blue-500/50 transition-all shadow-sm"})]}),A.jsxs("div",{className:"flex-1 space-y-6 overflow-auto pr-1",children:[s.length>0&&A.jsxs("section",{children:[A.jsxs("div",{className:"flex items-center gap-2 mb-2 px-1",children:[A.jsx(gd,{size:12,className:"text-slate-500"}),A.jsx("h3",{className:"text-[10px] font-bold uppercase tracking-wider text-slate-500",children:"Domains"})]}),A.jsx("div",{className:"space-y-1",children:s.map(p=>A.jsxs("button",{onClick:()=>h(p.id),className:"w-full flex items-center justify-between group p-2 text-sm rounded border border-transparent hover:bg-slate-800/50 hover:border-slate-700/50 text-slate-300 transition-all text-left",children:[A.jsxs("div",{className:"flex items-center gap-2",children:[A.jsx("div",{className:"w-1.5 h-1.5 rounded-full",style:{backgroundColor:p.color||"#3b82f6"}}),A.jsx("span",{className:"font-medium group-hover:text-blue-400",children:p.name})]}),A.jsx(ay,{size:12,className:"opacity-0 group-hover:opacity-100 text-slate-500 transition-opacity"})]},p.id))})]}),A.jsxs("section",{children:[A.jsxs("div",{className:"flex items-center gap-2 mb-2 px-1",children:[A.jsx(wT,{size:12,className:"text-slate-500"}),A.jsx("h3",{className:"text-[10px] font-bold uppercase tracking-wider text-slate-500",children:"Tables"})]}),A.jsx("div",{className:"space-y-1",children:f.map(p=>A.jsxs("button",{onClick:()=>h(p.id),className:"w-full flex items-center justify-between group p-2 text-sm rounded border border-transparent hover:bg-slate-800/50 hover:border-slate-700/50 text-slate-300 transition-all text-left",children:[A.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[A.jsx("span",{className:"truncate font-medium group-hover:text-blue-400",children:p.name}),A.jsxs("span",{className:"text-[10px] text-slate-500 shrink-0",children:["(",p.columns?.length||0,")"]})]}),A.jsx(ay,{size:12,className:"opacity-0 group-hover:opacity-100 text-slate-500 transition-opacity"})]},p.id))})]}),f.length===0&&s.length===0&&A.jsx("div",{className:"text-center py-10",children:A.jsxs("p",{className:"text-sm text-slate-500 italic",children:['No entities found for "',r,'"']})})]})]})},T4=()=>{const{isSidebarOpen:t,setIsSidebarOpen:i}=Cn();return A.jsx("button",{onClick:()=>i(!t),className:"absolute -right-3.5 top-1/2 -translate-y-1/2 z-[60] flex h-7 w-7 items-center justify-center rounded-full border border-slate-700 bg-slate-900 text-slate-400 hover:text-white hover:bg-slate-800 transition-all shadow-xl","aria-label":t?"Collapse sidebar":"Expand sidebar",children:t?A.jsx(pT,{size:16}):A.jsx(gT,{size:16})})},M4=()=>{const{availableFiles:t,currentModelSlug:i,setCurrentModel:a,isSidebarOpen:r}=Cn();if(!r||t.length<=1)return null;const u=i||t[0]?.slug;return A.jsxs("div",{className:"px-4 mb-4",children:[A.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-slate-500 mb-1.5 px-1",children:"Current Model"}),A.jsxs("div",{className:"relative group",children:[A.jsx("select",{value:u,onChange:f=>a(f.target.value),className:"w-full pl-9 pr-8 py-2 bg-slate-800 border border-slate-700 rounded-md text-sm text-slate-100 appearance-none focus:outline-none focus:ring-1 focus:ring-blue-500/50 transition-all shadow-sm cursor-pointer hover:bg-slate-750",children:t.map(f=>A.jsx("option",{value:f.slug,children:f.name},f.slug))}),A.jsx(jx,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-blue-400 pointer-events-none"}),A.jsx(dT,{size:14,className:"absolute right-3 top-1/2 -translate-y-1/2 text-slate-500 pointer-events-none group-hover:text-slate-300"})]})]})},z4=""+new URL("../favicon.svg",import.meta.url).href,O4=()=>{const{isSidebarOpen:t,activeTab:i,setActiveTab:a,isCliMode:r}=Cn();return A.jsxs("div",{className:`relative h-full flex flex-col border-r border-slate-800 bg-slate-900 transition-all duration-300 ease-in-out shadow-2xl z-50 ${t?"w-[400px]":"w-[50px]"}`,children:[A.jsx(T4,{}),A.jsxs("div",{className:`p-4 border-b border-slate-800 flex items-center justify-between ${!t&&"hidden"}`,children:[A.jsxs("div",{className:"flex items-center gap-2",children:[A.jsx("img",{src:z4,alt:"Modscape Logo",className:"w-5 h-5 rounded-md"}),A.jsx("h1",{className:"text-base font-bold text-white tracking-tight",children:"Modscape"})]}),r&&A.jsx("span",{className:"px-1.5 py-0.5 bg-emerald-500/10 border border-emerald-500/30 text-emerald-400 text-[10px] font-bold rounded uppercase",children:"Live"})]}),A.jsx("div",{className:"mt-4",children:t&&A.jsx(M4,{})}),A.jsxs(A4,{value:i,onValueChange:u=>a(u),className:`flex-1 flex flex-col overflow-hidden ${!t&&"items-center py-4"}`,children:[A.jsx("div",{className:`px-4 pt-4 ${!t&&"px-0"}`,children:A.jsxs(b1,{className:`w-full bg-slate-800/50 p-1 border border-slate-700/50 ${!t&&"flex-col h-auto w-10 gap-2 p-0 bg-transparent border-none"}`,children:[A.jsxs(bd,{value:"editor",className:`flex-1 gap-2 ${!t&&"w-9 h-9 p-0 rounded-md bg-slate-800/50 hover:bg-slate-800 text-slate-400 data-[state=active]:bg-blue-600 data-[state=active]:text-white shadow-sm transition-all"}`,title:"Editor",children:[A.jsx(MT,{size:14}),t&&A.jsx("span",{children:"Editor"})]}),A.jsxs(bd,{value:"entities",className:`flex-1 gap-2 ${!t&&"w-9 h-9 p-0 rounded-md bg-slate-800/50 hover:bg-slate-800 text-slate-400 data-[state=active]:bg-blue-600 data-[state=active]:text-white shadow-sm transition-all"}`,title:"Entities",children:[A.jsx(AT,{size:14}),t&&A.jsx("span",{children:"Entities"})]})]})}),t&&A.jsxs("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:[A.jsx(Sd,{value:"editor",className:"flex-1 flex flex-col min-h-0 mt-0 data-[state=inactive]:hidden",children:A.jsx(N4,{})}),A.jsx(Sd,{value:"entities",className:"flex-1 flex flex-col min-h-0 mt-0 data-[state=inactive]:hidden",children:A.jsx(C4,{})})]})]}),t&&A.jsx("div",{className:"p-3 border-t border-slate-800 bg-slate-950/20",children:A.jsx("p",{className:"text-[10px] text-slate-500 text-center font-medium",children:"Modscape v0.5.0"})})]})},D4=()=>{const{addTable:t,addDomain:i}=Cn();return A.jsxs("div",{className:"absolute top-4 right-4 flex gap-2 z-10",children:[A.jsxs("div",{className:"flex bg-slate-900/80 backdrop-blur-md border border-slate-700 rounded-lg shadow-2xl p-1 overflow-hidden",children:[A.jsxs("button",{onClick:()=>i(100,100),className:"flex items-center gap-2 px-3 py-1.5 text-xs font-semibold text-slate-300 hover:text-white hover:bg-slate-800 rounded-md transition-all group",title:"Add new Domain",children:[A.jsx(CT,{size:14,className:"text-blue-400 group-hover:scale-110 transition-transform"}),A.jsx("span",{children:"Domain"})]}),A.jsx("div",{className:"w-[1px] bg-slate-700 mx-1 my-1"}),A.jsxs("button",{onClick:()=>t(200,200),className:"flex items-center gap-2 px-3 py-1.5 text-xs font-semibold text-slate-300 hover:text-white hover:bg-slate-800 rounded-md transition-all group",title:"Add new Table",children:[A.jsx(bT,{size:14,className:"text-emerald-400 group-hover:scale-110 transition-transform"}),A.jsx("span",{children:"Table"})]})]}),A.jsx("div",{className:"bg-blue-600 rounded-lg p-2 shadow-lg flex items-center justify-center",children:A.jsx(yd,{size:18,className:"text-white"})})]})},R4={table:ZT,domain:$T},H4={stroke:"#4ade80",strokeWidth:3},j4={stroke:"#334155",strokeWidth:1};function k4(){const{schema:t,setSelectedTableId:i,selectedTableId:a,updateNodePosition:r,saveLayout:u,isCliMode:f,focusNodeId:s,setFocusNodeId:h,addEdge:p,removeNode:m}=Cn(),[g,v,b]=h3([]),[E,C,N]=p3([]),{setCenter:T,getNode:M}=cc();z.useEffect(()=>{if(s){const G=M(s);if(G){const $=G.position.x+(G.width||0)/2,B=G.position.y+(G.height||0)/2;T($,B,{zoom:1.2,duration:800})}h(null)}},[s,M,T,h]),z.useEffect(()=>{if(!t)return;const G=[],$=320,B=250,ee=60,oe=3;t.domains&&t.domains.forEach((w,R)=>{const X=w.tables.length,L=Math.ceil(X/oe),Y=Math.min(X,oe),_=Math.max(2,Y)*$+ee,U=Math.max(1.5,L)*B+ee,F=t.layout?.[w.id],P=Math.floor(R/2),ae=R%2,ce=F?.x??ae*1600,fe=F?.y??P*1200,be=F?.width??_,de=F?.height??U;G.push({id:w.id,type:"domain",position:{x:ce,y:fe},style:{width:be,height:de},dragHandle:".domain-drag-handle",data:{label:w.name,color:w.color}}),w.tables.forEach((Ae,Re)=>{const Ve=t.tables.find(se=>se.id===Ae);if(!Ve)return;const Pe=Math.floor(Re/oe),Ye=Re%oe,He=t.layout?.[Ve.id],pt=He?.x??Ye*$+ee/2,je=He?.y??Pe*B+ee/2;G.push({id:Ve.id,type:"table",position:{x:pt,y:je},style:He?.width?{width:He.width,height:He.height}:void 0,dragHandle:".table-drag-handle",data:{table:Ve},parentNode:w.id,extent:"parent"})})});const re=new Set(t.domains?.flatMap(ie=>ie.tables)||[]);t.tables.filter(ie=>!re.has(ie.id)).forEach((ie,x)=>{const H=t.layout?.[ie.id]||{x:x*300,y:100};G.push({id:ie.id,type:"table",position:{x:H.x,y:H.y},style:H?.width?{width:H.width,height:H.height}:void 0,dragHandle:".table-drag-handle",data:{table:ie}})}),v(G)},[t,v]);const D=z.useMemo(()=>!t||!t.relationships?[]:t.relationships.map((G,$)=>{const B=a===G.from.table||a===G.to.table;return{id:`e-${$}`,source:G.from.table,target:G.to.table,label:B?G.type:void 0,animated:B,style:B?H4:j4,zIndex:B?10:1}}),[t,a]);z.useEffect(()=>{C(D)},[D,C]);const q=z.useCallback(G=>{G.source&&G.target&&p(G.source,G.target)},[p]),j=z.useCallback(G=>{G.forEach($=>m($.id)),u()},[m,u]),I=z.useCallback((G,$)=>{if(!f)return;let B=$.parentNode;if($.type==="table"){const ee=$.position.x+($.width||0)/2,oe=$.position.y+($.height||0)/2,ue=g.filter(ie=>ie.type==="domain"&&ie.id!==$.id).find(ie=>{const x=ie.position.x,H=ie.position.y,w=ie.width||600,R=ie.height||400;return ee>=x&&ee<=x+w&&oe>=H&&oe<=H+R});B=ue?ue.id:void 0}r($.id,$.position.x,$.position.y,B),u()},[f,r,u,g]);return A.jsxs("div",{className:"flex-1 relative h-full",children:[A.jsx(D4,{}),A.jsxs(Bv,{nodes:g,edges:E,onNodesChange:b,onEdgesChange:N,onNodesDelete:j,onNodeDragStop:I,onConnect:q,nodeTypes:R4,onNodeClick:(G,$)=>i($.id),onPaneClick:()=>i(null),fitView:!0,children:[A.jsx(M3,{color:"#334155",gap:20}),A.jsx(w3,{})]})]})}function U4(){const{isCliMode:t,fetchAvailableFiles:i,setCurrentModel:a,setSchema:r}=Cn(),u=!!window.__MODSCAPE_DATA__;return z.useEffect(()=>{if(t){i().then(()=>{const s=new URLSearchParams(window.location.search).get("model");s?a(s):fetch("/api/model").then(h=>h.json()).then(h=>r(h))});return}if(u){const f=window.__MODSCAPE_DATA__;f&&f.isMultiFile&&f.models?i().then(()=>{const h=new URLSearchParams(window.location.search).get("model");h?a(h):(r(f.models[0].schema),a(f.models[0].slug))}):f&&f.schema?r(f.schema):r(f)}},[t,u,i,a,r]),A.jsx(Bd,{children:A.jsxs("div",{className:"flex h-screen w-screen overflow-hidden bg-slate-950 text-slate-100 font-sans",children:[A.jsx(O4,{}),A.jsxs("div",{className:"flex-1 flex flex-col h-full overflow-hidden relative",children:[A.jsx(k4,{}),A.jsx(IT,{})]})]})})}US.createRoot(document.getElementById("root")).render(A.jsx(z.StrictMode,{children:A.jsx(U4,{})}));