gitblast 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analyzer.d.ts +12 -0
- package/dist/analyzer.d.ts.map +1 -0
- package/dist/analyzer.js +140 -0
- package/dist/analyzer.js.map +1 -0
- package/dist/ast-analyzer.d.ts +12 -0
- package/dist/ast-analyzer.d.ts.map +1 -0
- package/dist/ast-analyzer.js +274 -0
- package/dist/ast-analyzer.js.map +1 -0
- package/dist/blast-radius.d.ts +17 -0
- package/dist/blast-radius.d.ts.map +1 -0
- package/dist/blast-radius.js +82 -0
- package/dist/blast-radius.js.map +1 -0
- package/dist/call-graph.d.ts +8 -0
- package/dist/call-graph.d.ts.map +1 -0
- package/dist/call-graph.js +252 -0
- package/dist/call-graph.js.map +1 -0
- package/dist/call-resolver.d.ts +18 -0
- package/dist/call-resolver.d.ts.map +1 -0
- package/dist/call-resolver.js +130 -0
- package/dist/call-resolver.js.map +1 -0
- package/dist/file-scanner.d.ts +2 -0
- package/dist/file-scanner.d.ts.map +1 -0
- package/dist/file-scanner.js +42 -0
- package/dist/file-scanner.js.map +1 -0
- package/dist/function-blast-radius.d.ts +7 -0
- package/dist/function-blast-radius.d.ts.map +1 -0
- package/dist/function-blast-radius.js +52 -0
- package/dist/function-blast-radius.js.map +1 -0
- package/dist/git.d.ts +27 -0
- package/dist/git.d.ts.map +1 -0
- package/dist/git.js +69 -0
- package/dist/git.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +385 -0
- package/dist/index.js.map +1 -0
- package/dist/tool-runner.d.ts +65 -0
- package/dist/tool-runner.d.ts.map +1 -0
- package/dist/tool-runner.js +178 -0
- package/dist/tool-runner.js.map +1 -0
- package/dist/types.d.ts +92 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/web/assets/index-BEQJnpxt.js +17 -0
- package/dist/web/assets/index-CqmVdlle.css +1 -0
- package/dist/web/index.html +14 -0
- package/dist/web/vite.svg +1 -0
- package/package.json +44 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))s(c);new MutationObserver(c=>{for(const f of c)if(f.type==="childList")for(const d of f.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&s(d)}).observe(document,{childList:!0,subtree:!0});function o(c){const f={};return c.integrity&&(f.integrity=c.integrity),c.referrerPolicy&&(f.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?f.credentials="include":c.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function s(c){if(c.ep)return;c.ep=!0;const f=o(c);fetch(c.href,f)}})();function Gg(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Zr={exports:{}},Qi={};var wm;function Lv(){if(wm)return Qi;wm=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function o(s,c,f){var d=null;if(f!==void 0&&(d=""+f),c.key!==void 0&&(d=""+c.key),"key"in c){f={};for(var m in c)m!=="key"&&(f[m]=c[m])}else f=c;return c=f.ref,{$$typeof:n,type:s,key:d,ref:c!==void 0?c:null,props:f}}return Qi.Fragment=i,Qi.jsx=o,Qi.jsxs=o,Qi}var _m;function Yv(){return _m||(_m=1,Zr.exports=Lv()),Zr.exports}var x=Yv(),kr={exports:{}},Ne={};var Mm;function Vv(){if(Mm)return Ne;Mm=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),d=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),b=Symbol.iterator;function N(E){return E===null||typeof E!="object"?null:(E=b&&E[b]||E["@@iterator"],typeof E=="function"?E:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,T={};function A(E,j,I){this.props=E,this.context=j,this.refs=T,this.updater=I||_}A.prototype.isReactComponent={},A.prototype.setState=function(E,j){if(typeof E!="object"&&typeof E!="function"&&E!=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,E,j,"setState")},A.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function Y(){}Y.prototype=A.prototype;function w(E,j,I){this.props=E,this.context=j,this.refs=T,this.updater=I||_}var z=w.prototype=new Y;z.constructor=w,C(z,A.prototype),z.isPureReactComponent=!0;var q=Array.isArray;function B(){}var R={H:null,A:null,T:null,S:null},$=Object.prototype.hasOwnProperty;function J(E,j,I){var ee=I.ref;return{$$typeof:n,type:E,key:j,ref:ee!==void 0?ee:null,props:I}}function se(E,j){return J(E.type,j,E.props)}function k(E){return typeof E=="object"&&E!==null&&E.$$typeof===n}function W(E){var j={"=":"=0",":":"=2"};return"$"+E.replace(/[=:]/g,function(I){return j[I]})}var oe=/\/+/g;function D(E,j){return typeof E=="object"&&E!==null&&E.key!=null?W(""+E.key):j.toString(36)}function Z(E){switch(E.status){case"fulfilled":return E.value;case"rejected":throw E.reason;default:switch(typeof E.status=="string"?E.then(B,B):(E.status="pending",E.then(function(j){E.status==="pending"&&(E.status="fulfilled",E.value=j)},function(j){E.status==="pending"&&(E.status="rejected",E.reason=j)})),E.status){case"fulfilled":return E.value;case"rejected":throw E.reason}}throw E}function M(E,j,I,ee,ue){var re=typeof E;(re==="undefined"||re==="boolean")&&(E=null);var fe=!1;if(E===null)fe=!0;else switch(re){case"bigint":case"string":case"number":fe=!0;break;case"object":switch(E.$$typeof){case n:case i:fe=!0;break;case v:return fe=E._init,M(fe(E._payload),j,I,ee,ue)}}if(fe)return ue=ue(E),fe=ee===""?"."+D(E,0):ee,q(ue)?(I="",fe!=null&&(I=fe.replace(oe,"$&/")+"/"),M(ue,j,I,"",function(le){return le})):ue!=null&&(k(ue)&&(ue=se(ue,I+(ue.key==null||E&&E.key===ue.key?"":(""+ue.key).replace(oe,"$&/")+"/")+fe)),j.push(ue)),1;fe=0;var ce=ee===""?".":ee+":";if(q(E))for(var ge=0;ge<E.length;ge++)ee=E[ge],re=ce+D(ee,ge),fe+=M(ee,j,I,re,ue);else if(ge=N(E),typeof ge=="function")for(E=ge.call(E),ge=0;!(ee=E.next()).done;)ee=ee.value,re=ce+D(ee,ge++),fe+=M(ee,j,I,re,ue);else if(re==="object"){if(typeof E.then=="function")return M(Z(E),j,I,ee,ue);throw j=String(E),Error("Objects are not valid as a React child (found: "+(j==="[object Object]"?"object with keys {"+Object.keys(E).join(", ")+"}":j)+"). If you meant to render a collection of children, use an array instead.")}return fe}function H(E,j,I){if(E==null)return E;var ee=[],ue=0;return M(E,ee,"","",function(re){return j.call(I,re,ue++)}),ee}function L(E){if(E._status===-1){var j=E._result;j=j(),j.then(function(I){(E._status===0||E._status===-1)&&(E._status=1,E._result=I)},function(I){(E._status===0||E._status===-1)&&(E._status=2,E._result=I)}),E._status===-1&&(E._status=0,E._result=j)}if(E._status===1)return E._result.default;throw E._result}var G=typeof reportError=="function"?reportError:function(E){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var j=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(j))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",E);return}console.error(E)},te={map:H,forEach:function(E,j,I){H(E,function(){j.apply(this,arguments)},I)},count:function(E){var j=0;return H(E,function(){j++}),j},toArray:function(E){return H(E,function(j){return j})||[]},only:function(E){if(!k(E))throw Error("React.Children.only expected to receive a single React element child.");return E}};return Ne.Activity=p,Ne.Children=te,Ne.Component=A,Ne.Fragment=o,Ne.Profiler=c,Ne.PureComponent=w,Ne.StrictMode=s,Ne.Suspense=g,Ne.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=R,Ne.__COMPILER_RUNTIME={__proto__:null,c:function(E){return R.H.useMemoCache(E)}},Ne.cache=function(E){return function(){return E.apply(null,arguments)}},Ne.cacheSignal=function(){return null},Ne.cloneElement=function(E,j,I){if(E==null)throw Error("The argument must be a React element, but you passed "+E+".");var ee=C({},E.props),ue=E.key;if(j!=null)for(re in j.key!==void 0&&(ue=""+j.key),j)!$.call(j,re)||re==="key"||re==="__self"||re==="__source"||re==="ref"&&j.ref===void 0||(ee[re]=j[re]);var re=arguments.length-2;if(re===1)ee.children=I;else if(1<re){for(var fe=Array(re),ce=0;ce<re;ce++)fe[ce]=arguments[ce+2];ee.children=fe}return J(E.type,ue,ee)},Ne.createContext=function(E){return E={$$typeof:d,_currentValue:E,_currentValue2:E,_threadCount:0,Provider:null,Consumer:null},E.Provider=E,E.Consumer={$$typeof:f,_context:E},E},Ne.createElement=function(E,j,I){var ee,ue={},re=null;if(j!=null)for(ee in j.key!==void 0&&(re=""+j.key),j)$.call(j,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(ue[ee]=j[ee]);var fe=arguments.length-2;if(fe===1)ue.children=I;else if(1<fe){for(var ce=Array(fe),ge=0;ge<fe;ge++)ce[ge]=arguments[ge+2];ue.children=ce}if(E&&E.defaultProps)for(ee in fe=E.defaultProps,fe)ue[ee]===void 0&&(ue[ee]=fe[ee]);return J(E,re,ue)},Ne.createRef=function(){return{current:null}},Ne.forwardRef=function(E){return{$$typeof:m,render:E}},Ne.isValidElement=k,Ne.lazy=function(E){return{$$typeof:v,_payload:{_status:-1,_result:E},_init:L}},Ne.memo=function(E,j){return{$$typeof:h,type:E,compare:j===void 0?null:j}},Ne.startTransition=function(E){var j=R.T,I={};R.T=I;try{var ee=E(),ue=R.S;ue!==null&&ue(I,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(B,G)}catch(re){G(re)}finally{j!==null&&I.types!==null&&(j.types=I.types),R.T=j}},Ne.unstable_useCacheRefresh=function(){return R.H.useCacheRefresh()},Ne.use=function(E){return R.H.use(E)},Ne.useActionState=function(E,j,I){return R.H.useActionState(E,j,I)},Ne.useCallback=function(E,j){return R.H.useCallback(E,j)},Ne.useContext=function(E){return R.H.useContext(E)},Ne.useDebugValue=function(){},Ne.useDeferredValue=function(E,j){return R.H.useDeferredValue(E,j)},Ne.useEffect=function(E,j){return R.H.useEffect(E,j)},Ne.useEffectEvent=function(E){return R.H.useEffectEvent(E)},Ne.useId=function(){return R.H.useId()},Ne.useImperativeHandle=function(E,j,I){return R.H.useImperativeHandle(E,j,I)},Ne.useInsertionEffect=function(E,j){return R.H.useInsertionEffect(E,j)},Ne.useLayoutEffect=function(E,j){return R.H.useLayoutEffect(E,j)},Ne.useMemo=function(E,j){return R.H.useMemo(E,j)},Ne.useOptimistic=function(E,j){return R.H.useOptimistic(E,j)},Ne.useReducer=function(E,j,I){return R.H.useReducer(E,j,I)},Ne.useRef=function(E){return R.H.useRef(E)},Ne.useState=function(E){return R.H.useState(E)},Ne.useSyncExternalStore=function(E,j,I){return R.H.useSyncExternalStore(E,j,I)},Ne.useTransition=function(){return R.H.useTransition()},Ne.version="19.2.4",Ne}var Cm;function fo(){return Cm||(Cm=1,kr.exports=Vv()),kr.exports}var V=fo();const qv=Gg(V);var $r={exports:{}},Ki={},Qr={exports:{}},Kr={};var Am;function Xv(){return Am||(Am=1,(function(n){function i(M,H){var L=M.length;M.push(H);e:for(;0<L;){var G=L-1>>>1,te=M[G];if(0<c(te,H))M[G]=H,M[L]=te,L=G;else break e}}function o(M){return M.length===0?null:M[0]}function s(M){if(M.length===0)return null;var H=M[0],L=M.pop();if(L!==H){M[0]=L;e:for(var G=0,te=M.length,E=te>>>1;G<E;){var j=2*(G+1)-1,I=M[j],ee=j+1,ue=M[ee];if(0>c(I,L))ee<te&&0>c(ue,I)?(M[G]=ue,M[ee]=L,G=ee):(M[G]=I,M[j]=L,G=j);else if(ee<te&&0>c(ue,L))M[G]=ue,M[ee]=L,G=ee;else break e}}return H}function c(M,H){var L=M.sortIndex-H.sortIndex;return L!==0?L:M.id-H.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var d=Date,m=d.now();n.unstable_now=function(){return d.now()-m}}var g=[],h=[],v=1,p=null,b=3,N=!1,_=!1,C=!1,T=!1,A=typeof setTimeout=="function"?setTimeout:null,Y=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;function z(M){for(var H=o(h);H!==null;){if(H.callback===null)s(h);else if(H.startTime<=M)s(h),H.sortIndex=H.expirationTime,i(g,H);else break;H=o(h)}}function q(M){if(C=!1,z(M),!_)if(o(g)!==null)_=!0,B||(B=!0,W());else{var H=o(h);H!==null&&Z(q,H.startTime-M)}}var B=!1,R=-1,$=5,J=-1;function se(){return T?!0:!(n.unstable_now()-J<$)}function k(){if(T=!1,B){var M=n.unstable_now();J=M;var H=!0;try{e:{_=!1,C&&(C=!1,Y(R),R=-1),N=!0;var L=b;try{t:{for(z(M),p=o(g);p!==null&&!(p.expirationTime>M&&se());){var G=p.callback;if(typeof G=="function"){p.callback=null,b=p.priorityLevel;var te=G(p.expirationTime<=M);if(M=n.unstable_now(),typeof te=="function"){p.callback=te,z(M),H=!0;break t}p===o(g)&&s(g),z(M)}else s(g);p=o(g)}if(p!==null)H=!0;else{var E=o(h);E!==null&&Z(q,E.startTime-M),H=!1}}break e}finally{p=null,b=L,N=!1}H=void 0}}finally{H?W():B=!1}}}var W;if(typeof w=="function")W=function(){w(k)};else if(typeof MessageChannel<"u"){var oe=new MessageChannel,D=oe.port2;oe.port1.onmessage=k,W=function(){D.postMessage(null)}}else W=function(){A(k,0)};function Z(M,H){R=A(function(){M(n.unstable_now())},H)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(M){M.callback=null},n.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<M?Math.floor(1e3/M):5},n.unstable_getCurrentPriorityLevel=function(){return b},n.unstable_next=function(M){switch(b){case 1:case 2:case 3:var H=3;break;default:H=b}var L=b;b=H;try{return M()}finally{b=L}},n.unstable_requestPaint=function(){T=!0},n.unstable_runWithPriority=function(M,H){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var L=b;b=M;try{return H()}finally{b=L}},n.unstable_scheduleCallback=function(M,H,L){var G=n.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?G+L:G):L=G,M){case 1:var te=-1;break;case 2:te=250;break;case 5:te=1073741823;break;case 4:te=1e4;break;default:te=5e3}return te=L+te,M={id:v++,callback:H,priorityLevel:M,startTime:L,expirationTime:te,sortIndex:-1},L>G?(M.sortIndex=L,i(h,M),o(g)===null&&M===o(h)&&(C?(Y(R),R=-1):C=!0,Z(q,L-G))):(M.sortIndex=te,i(g,M),_||N||(_=!0,B||(B=!0,W()))),M},n.unstable_shouldYield=se,n.unstable_wrapCallback=function(M){var H=b;return function(){var L=b;b=H;try{return M.apply(this,arguments)}finally{b=L}}}})(Kr)),Kr}var Tm;function Gv(){return Tm||(Tm=1,Qr.exports=Xv()),Qr.exports}var Jr={exports:{}},vt={};var zm;function Zv(){if(zm)return vt;zm=1;var n=fo();function i(g){var h="https://react.dev/errors/"+g;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)h+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+g+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var s={d:{f:o,r:function(){throw Error(i(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},c=Symbol.for("react.portal");function f(g,h,v){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:p==null?null:""+p,children:g,containerInfo:h,implementation:v}}var d=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(g,h){if(g==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return vt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,vt.createPortal=function(g,h){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(i(299));return f(g,h,null,v)},vt.flushSync=function(g){var h=d.T,v=s.p;try{if(d.T=null,s.p=2,g)return g()}finally{d.T=h,s.p=v,s.d.f()}},vt.preconnect=function(g,h){typeof g=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,s.d.C(g,h))},vt.prefetchDNS=function(g){typeof g=="string"&&s.d.D(g)},vt.preinit=function(g,h){if(typeof g=="string"&&h&&typeof h.as=="string"){var v=h.as,p=m(v,h.crossOrigin),b=typeof h.integrity=="string"?h.integrity:void 0,N=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;v==="style"?s.d.S(g,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:p,integrity:b,fetchPriority:N}):v==="script"&&s.d.X(g,{crossOrigin:p,integrity:b,fetchPriority:N,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},vt.preinitModule=function(g,h){if(typeof g=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var v=m(h.as,h.crossOrigin);s.d.M(g,{crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&s.d.M(g)},vt.preload=function(g,h){if(typeof g=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var v=h.as,p=m(v,h.crossOrigin);s.d.L(g,v,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},vt.preloadModule=function(g,h){if(typeof g=="string")if(h){var v=m(h.as,h.crossOrigin);s.d.m(g,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else s.d.m(g)},vt.requestFormReset=function(g){s.d.r(g)},vt.unstable_batchedUpdates=function(g,h){return g(h)},vt.useFormState=function(g,h,v){return d.H.useFormState(g,h,v)},vt.useFormStatus=function(){return d.H.useHostTransitionStatus()},vt.version="19.2.4",vt}var jm;function Zg(){if(jm)return Jr.exports;jm=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),Jr.exports=Zv(),Jr.exports}var Dm;function kv(){if(Dm)return Ki;Dm=1;var n=Gv(),i=fo(),o=Zg();function s(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(l=t.return),e=t.return;while(e)}return t.tag===3?l:null}function d(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function g(e){if(f(e)!==e)throw Error(s(188))}function h(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(s(188));return t!==e?null:e}for(var l=e,a=t;;){var u=l.return;if(u===null)break;var r=u.alternate;if(r===null){if(a=u.return,a!==null){l=a;continue}break}if(u.child===r.child){for(r=u.child;r;){if(r===l)return g(u),e;if(r===a)return g(u),t;r=r.sibling}throw Error(s(188))}if(l.return!==a.return)l=u,a=r;else{for(var y=!1,S=u.child;S;){if(S===l){y=!0,l=u,a=r;break}if(S===a){y=!0,a=u,l=r;break}S=S.sibling}if(!y){for(S=r.child;S;){if(S===l){y=!0,l=r,a=u;break}if(S===a){y=!0,a=r,l=u;break}S=S.sibling}if(!y)throw Error(s(189))}}if(l.alternate!==a)throw Error(s(190))}if(l.tag!==3)throw Error(s(188));return l.stateNode.current===l?e:t}function v(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=v(e),t!==null)return t;e=e.sibling}return null}var p=Object.assign,b=Symbol.for("react.element"),N=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),Y=Symbol.for("react.consumer"),w=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),q=Symbol.for("react.suspense"),B=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),J=Symbol.for("react.activity"),se=Symbol.for("react.memo_cache_sentinel"),k=Symbol.iterator;function W(e){return e===null||typeof e!="object"?null:(e=k&&e[k]||e["@@iterator"],typeof e=="function"?e:null)}var oe=Symbol.for("react.client.reference");function D(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===oe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case C:return"Fragment";case A:return"Profiler";case T:return"StrictMode";case q:return"Suspense";case B:return"SuspenseList";case J:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case _:return"Portal";case w:return e.displayName||"Context";case Y:return(e._context.displayName||"Context")+".Consumer";case z:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case R:return t=e.displayName||null,t!==null?t:D(e.type)||"Memo";case $:t=e._payload,e=e._init;try{return D(e(t))}catch{}}return null}var Z=Array.isArray,M=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L={pending:!1,data:null,method:null,action:null},G=[],te=-1;function E(e){return{current:e}}function j(e){0>te||(e.current=G[te],G[te]=null,te--)}function I(e,t){te++,G[te]=e.current,e.current=t}var ee=E(null),ue=E(null),re=E(null),fe=E(null);function ce(e,t){switch(I(re,t),I(ue,e),I(ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Q0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Q0(t),e=K0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}j(ee),I(ee,e)}function ge(){j(ee),j(ue),j(re)}function le(e){e.memoizedState!==null&&I(fe,e);var t=ee.current,l=K0(t,e.type);t!==l&&(I(ue,e),I(ee,l))}function he(e){ue.current===e&&(j(ee),j(ue)),fe.current===e&&(j(fe),Gi._currentValue=L)}var de,pe;function me(e){if(de===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);de=t&&t[1]||"",pe=-1<l.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+de+e+pe}var _e=!1;function Se(e,t){if(!e||_e)return"";_e=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var ie=function(){throw Error()};if(Object.defineProperty(ie.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ie,[])}catch(P){var F=P}Reflect.construct(e,[],ie)}else{try{ie.call()}catch(P){F=P}e.call(ie.prototype)}}else{try{throw Error()}catch(P){F=P}(ie=e())&&typeof ie.catch=="function"&&ie.catch(function(){})}}catch(P){if(P&&F&&typeof P.stack=="string")return[P.stack,F.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var r=a.DetermineComponentFrameRoot(),y=r[0],S=r[1];if(y&&S){var O=y.split(`
|
|
4
|
+
`),K=S.split(`
|
|
5
|
+
`);for(u=a=0;a<O.length&&!O[a].includes("DetermineComponentFrameRoot");)a++;for(;u<K.length&&!K[u].includes("DetermineComponentFrameRoot");)u++;if(a===O.length||u===K.length)for(a=O.length-1,u=K.length-1;1<=a&&0<=u&&O[a]!==K[u];)u--;for(;1<=a&&0<=u;a--,u--)if(O[a]!==K[u]){if(a!==1||u!==1)do if(a--,u--,0>u||O[a]!==K[u]){var ne=`
|
|
6
|
+
`+O[a].replace(" at new "," at ");return e.displayName&&ne.includes("<anonymous>")&&(ne=ne.replace("<anonymous>",e.displayName)),ne}while(1<=a&&0<=u);break}}}finally{_e=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?me(l):""}function Be(e,t){switch(e.tag){case 26:case 27:case 5:return me(e.type);case 16:return me("Lazy");case 13:return e.child!==t&&t!==null?me("Suspense Fallback"):me("Suspense");case 19:return me("SuspenseList");case 0:case 15:return Se(e.type,!1);case 11:return Se(e.type.render,!1);case 1:return Se(e.type,!0);case 31:return me("Activity");default:return""}}function Ue(e){try{var t="",l=null;do t+=Be(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
|
|
7
|
+
Error generating stack: `+a.message+`
|
|
8
|
+
`+a.stack}}var ft=Object.prototype.hasOwnProperty,Qe=n.unstable_scheduleCallback,Ve=n.unstable_cancelCallback,qe=n.unstable_shouldYield,ht=n.unstable_requestPaint,ke=n.unstable_now,yn=n.unstable_getCurrentPriorityLevel,xn=n.unstable_ImmediatePriority,Zn=n.unstable_UserBlockingPriority,Nl=n.unstable_NormalPriority,Cu=n.unstable_LowPriority,ea=n.unstable_IdlePriority,Au=n.log,Tu=n.unstable_setDisableYieldValue,wl=null,bt=null;function an(e){if(typeof Au=="function"&&Tu(e),bt&&typeof bt.setStrictMode=="function")try{bt.setStrictMode(wl,e)}catch{}}var St=Math.clz32?Math.clz32:Du,zu=Math.log,ju=Math.LN2;function Du(e){return e>>>=0,e===0?32:31-(zu(e)/ju|0)|0}var ta=256,na=262144,la=4194304;function vn(e){var t=e&42;if(t!==0)return t;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 aa(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var u=0,r=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var S=a&134217727;return S!==0?(a=S&~r,a!==0?u=vn(a):(y&=S,y!==0?u=vn(y):l||(l=S&~e,l!==0&&(u=vn(l))))):(S=a&~r,S!==0?u=vn(S):y!==0?u=vn(y):l||(l=a&~e,l!==0&&(u=vn(l)))),u===0?0:t!==0&&t!==u&&(t&r)===0&&(r=u&-u,l=t&-t,r>=l||r===32&&(l&4194048)!==0)?t:u}function _l(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ou(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 vo(){var e=la;return la<<=1,(la&62914560)===0&&(la=4194304),e}function ei(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Ml(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Hu(e,t,l,a,u,r){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,K=e.hiddenUpdates;for(l=y&~l;0<l;){var ne=31-St(l),ie=1<<ne;S[ne]=0,O[ne]=-1;var F=K[ne];if(F!==null)for(K[ne]=null,ne=0;ne<F.length;ne++){var P=F[ne];P!==null&&(P.lane&=-536870913)}l&=~ie}a!==0&&bo(e,a,0),r!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=r&~(y&~t))}function bo(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-St(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function So(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-St(l),u=1<<a;u&t|e[a]&t&&(e[a]|=t),l&=~u}}function Eo(e,t){var l=t&-t;return l=(l&42)!==0?1:ti(l),(l&(e.suspendedLanes|t))!==0?0:l}function ti(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 ni(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function No(){var e=H.p;return e!==0?e:(e=window.event,e===void 0?32:ym(e.type))}function wo(e,t){var l=H.p;try{return H.p=e,t()}finally{H.p=l}}var on=Math.random().toString(36).slice(2),ct="__reactFiber$"+on,xt="__reactProps$"+on,bn="__reactContainer$"+on,ia="__reactEvents$"+on,_o="__reactListeners$"+on,Ru="__reactHandles$"+on,Mo="__reactResources$"+on,Cl="__reactMarker$"+on;function li(e){delete e[ct],delete e[xt],delete e[ia],delete e[_o],delete e[Ru]}function kn(e){var t=e[ct];if(t)return t;for(var l=e.parentNode;l;){if(t=l[bn]||l[ct]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=tm(e);e!==null;){if(l=e[ct])return l;e=tm(e)}return t}e=l,l=e.parentNode}return null}function $n(e){if(e=e[ct]||e[bn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Qn(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(s(33))}function Kn(e){var t=e[Mo];return t||(t=e[Mo]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function lt(e){e[Cl]=!0}var Co=new Set,Ao={};function Sn(e,t){Jn(e,t),Jn(e+"Capture",t)}function Jn(e,t){for(Ao[e]=t,e=0;e<t.length;e++)Co.add(t[e])}var Bu=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]*$"),ai={},To={};function Uu(e){return ft.call(To,e)?!0:ft.call(ai,e)?!1:Bu.test(e)?To[e]=!0:(ai[e]=!0,!1)}function oa(e,t,l){if(Uu(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function sa(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+l)}}function Jt(e,t,l,a){if(a===null)e.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+a)}}function Nt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function zo(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Lu(e,t,l){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var u=a.get,r=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(y){l=""+y,r.call(this,y)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(y){l=""+y},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ua(e){if(!e._valueTracker){var t=zo(e)?"checked":"value";e._valueTracker=Lu(e,t,""+e[t])}}function jo(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=zo(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}function Al(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 Yu=/[\n"\\]/g;function wt(e){return e.replace(Yu,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Tl(e,t,l,a,u,r,y,S){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),t!=null?y==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Nt(t)):e.value!==""+Nt(t)&&(e.value=""+Nt(t)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),t!=null?ii(e,y,Nt(t)):l!=null?ii(e,y,Nt(l)):a!=null&&e.removeAttribute("value"),u==null&&r!=null&&(e.defaultChecked=!!r),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.name=""+Nt(S):e.removeAttribute("name")}function Do(e,t,l,a,u,r,y,S){if(r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.type=r),t!=null||l!=null){if(!(r!=="submit"&&r!=="reset"||t!=null)){ua(e);return}l=l!=null?""+Nt(l):"",t=t!=null?""+Nt(t):l,S||t===e.value||(e.value=t),e.defaultValue=t}a=a??u,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=S?e.checked:!!a,e.defaultChecked=!!a,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),ua(e)}function ii(e,t,l){t==="number"&&Al(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function En(e,t,l,a){if(e=e.options,t){t={};for(var u=0;u<l.length;u++)t["$"+l[u]]=!0;for(l=0;l<e.length;l++)u=t.hasOwnProperty("$"+e[l].value),e[l].selected!==u&&(e[l].selected=u),u&&a&&(e[l].defaultSelected=!0)}else{for(l=""+Nt(l),t=null,u=0;u<e.length;u++){if(e[u].value===l){e[u].selected=!0,a&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function Xf(e,t,l){if(t!=null&&(t=""+Nt(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+Nt(l):""}function Gf(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(s(92));if(Z(a)){if(1<a.length)throw Error(s(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=Nt(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),ua(e)}function ca(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var Oy=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 Zf(e,t,l){var a=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,l):typeof l!="number"||l===0||Oy.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function kf(e,t,l){if(t!=null&&typeof t!="object")throw Error(s(62));if(e=e.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var u in t)a=t[u],t.hasOwnProperty(u)&&l[u]!==a&&Zf(e,u,a)}else for(var r in t)t.hasOwnProperty(r)&&Zf(e,r,t[r])}function Vu(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 Hy=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"]]),Ry=/^[\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 Oo(e){return Ry.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Nn(){}var qu=null;function Xu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ra=null,fa=null;function $f(e){var t=$n(e);if(t&&(e=t.stateNode)){var l=e[xt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Tl(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+wt(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var u=a[xt]||null;if(!u)throw Error(s(90));Tl(a,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&jo(a)}break e;case"textarea":Xf(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&En(e,!!l.multiple,t,!1)}}}var Gu=!1;function Qf(e,t,l){if(Gu)return e(t,l);Gu=!0;try{var a=e(t);return a}finally{if(Gu=!1,(ra!==null||fa!==null)&&(bs(),ra&&(t=ra,e=fa,fa=ra=null,$f(t),e)))for(t=0;t<e.length;t++)$f(e[t])}}function oi(e,t){var l=e.stateNode;if(l===null)return null;var a=l[xt]||null;if(a===null)return null;l=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(s(231,t,typeof l));return l}var wn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Zu=!1;if(wn)try{var si={};Object.defineProperty(si,"passive",{get:function(){Zu=!0}}),window.addEventListener("test",si,si),window.removeEventListener("test",si,si)}catch{Zu=!1}var Fn=null,ku=null,Ho=null;function Kf(){if(Ho)return Ho;var e,t=ku,l=t.length,a,u="value"in Fn?Fn.value:Fn.textContent,r=u.length;for(e=0;e<l&&t[e]===u[e];e++);var y=l-e;for(a=1;a<=y&&t[l-a]===u[r-a];a++);return Ho=u.slice(e,1<a?1-a:void 0)}function Ro(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Bo(){return!0}function Jf(){return!1}function _t(e){function t(l,a,u,r,y){this._reactName=l,this._targetInst=u,this.type=a,this.nativeEvent=r,this.target=y,this.currentTarget=null;for(var S in e)e.hasOwnProperty(S)&&(l=e[S],this[S]=l?l(r):r[S]);return this.isDefaultPrevented=(r.defaultPrevented!=null?r.defaultPrevented:r.returnValue===!1)?Bo:Jf,this.isPropagationStopped=Jf,this}return p(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Bo)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Bo)},persist:function(){},isPersistent:Bo}),t}var zl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Uo=_t(zl),ui=p({},zl,{view:0,detail:0}),By=_t(ui),$u,Qu,ci,Lo=p({},ui,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ju,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!==ci&&(ci&&e.type==="mousemove"?($u=e.screenX-ci.screenX,Qu=e.screenY-ci.screenY):Qu=$u=0,ci=e),$u)},movementY:function(e){return"movementY"in e?e.movementY:Qu}}),Ff=_t(Lo),Uy=p({},Lo,{dataTransfer:0}),Ly=_t(Uy),Yy=p({},ui,{relatedTarget:0}),Ku=_t(Yy),Vy=p({},zl,{animationName:0,elapsedTime:0,pseudoElement:0}),qy=_t(Vy),Xy=p({},zl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Gy=_t(Xy),Zy=p({},zl,{data:0}),Wf=_t(Zy),ky={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},$y={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"},Qy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ky(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Qy[e])?!!t[e]:!1}function Ju(){return Ky}var Jy=p({},ui,{key:function(e){if(e.key){var t=ky[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ro(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?$y[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ju,charCode:function(e){return e.type==="keypress"?Ro(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ro(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Fy=_t(Jy),Wy=p({},Lo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),If=_t(Wy),Iy=p({},ui,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ju}),Py=_t(Iy),ex=p({},zl,{propertyName:0,elapsedTime:0,pseudoElement:0}),tx=_t(ex),nx=p({},Lo,{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}),lx=_t(nx),ax=p({},zl,{newState:0,oldState:0}),ix=_t(ax),ox=[9,13,27,32],Fu=wn&&"CompositionEvent"in window,ri=null;wn&&"documentMode"in document&&(ri=document.documentMode);var sx=wn&&"TextEvent"in window&&!ri,Pf=wn&&(!Fu||ri&&8<ri&&11>=ri),ed=" ",td=!1;function nd(e,t){switch(e){case"keyup":return ox.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ld(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var da=!1;function ux(e,t){switch(e){case"compositionend":return ld(t);case"keypress":return t.which!==32?null:(td=!0,ed);case"textInput":return e=t.data,e===ed&&td?null:e;default:return null}}function cx(e,t){if(da)return e==="compositionend"||!Fu&&nd(e,t)?(e=Kf(),Ho=ku=Fn=null,da=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Pf&&t.locale!=="ko"?null:t.data;default:return null}}var rx={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 ad(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!rx[e.type]:t==="textarea"}function id(e,t,l,a){ra?fa?fa.push(a):fa=[a]:ra=a,t=Cs(t,"onChange"),0<t.length&&(l=new Uo("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var fi=null,di=null;function fx(e){q0(e,0)}function Yo(e){var t=Qn(e);if(jo(t))return e}function od(e,t){if(e==="change")return t}var sd=!1;if(wn){var Wu;if(wn){var Iu="oninput"in document;if(!Iu){var ud=document.createElement("div");ud.setAttribute("oninput","return;"),Iu=typeof ud.oninput=="function"}Wu=Iu}else Wu=!1;sd=Wu&&(!document.documentMode||9<document.documentMode)}function cd(){fi&&(fi.detachEvent("onpropertychange",rd),di=fi=null)}function rd(e){if(e.propertyName==="value"&&Yo(di)){var t=[];id(t,di,e,Xu(e)),Qf(fx,t)}}function dx(e,t,l){e==="focusin"?(cd(),fi=t,di=l,fi.attachEvent("onpropertychange",rd)):e==="focusout"&&cd()}function hx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Yo(di)}function mx(e,t){if(e==="click")return Yo(t)}function gx(e,t){if(e==="input"||e==="change")return Yo(t)}function px(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Dt=typeof Object.is=="function"?Object.is:px;function hi(e,t){if(Dt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),a=Object.keys(t);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var u=l[a];if(!ft.call(t,u)||!Dt(e[u],t[u]))return!1}return!0}function fd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function dd(e,t){var l=fd(e);e=0;for(var a;l;){if(l.nodeType===3){if(a=e+l.textContent.length,e<=t&&a>=t)return{node:l,offset:t-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=fd(l)}}function hd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?hd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function md(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Al(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Al(e.document)}return t}function Pu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var yx=wn&&"documentMode"in document&&11>=document.documentMode,ha=null,ec=null,mi=null,tc=!1;function gd(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;tc||ha==null||ha!==Al(a)||(a=ha,"selectionStart"in a&&Pu(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),mi&&hi(mi,a)||(mi=a,a=Cs(ec,"onSelect"),0<a.length&&(t=new Uo("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=ha)))}function jl(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var ma={animationend:jl("Animation","AnimationEnd"),animationiteration:jl("Animation","AnimationIteration"),animationstart:jl("Animation","AnimationStart"),transitionrun:jl("Transition","TransitionRun"),transitionstart:jl("Transition","TransitionStart"),transitioncancel:jl("Transition","TransitionCancel"),transitionend:jl("Transition","TransitionEnd")},nc={},pd={};wn&&(pd=document.createElement("div").style,"AnimationEvent"in window||(delete ma.animationend.animation,delete ma.animationiteration.animation,delete ma.animationstart.animation),"TransitionEvent"in window||delete ma.transitionend.transition);function Dl(e){if(nc[e])return nc[e];if(!ma[e])return e;var t=ma[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in pd)return nc[e]=t[l];return e}var yd=Dl("animationend"),xd=Dl("animationiteration"),vd=Dl("animationstart"),xx=Dl("transitionrun"),vx=Dl("transitionstart"),bx=Dl("transitioncancel"),bd=Dl("transitionend"),Sd=new Map,lc="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(" ");lc.push("scrollEnd");function Ft(e,t){Sd.set(e,t),Sn(t,[e])}var Vo=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=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(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},qt=[],ga=0,ac=0;function qo(){for(var e=ga,t=ac=ga=0;t<e;){var l=qt[t];qt[t++]=null;var a=qt[t];qt[t++]=null;var u=qt[t];qt[t++]=null;var r=qt[t];if(qt[t++]=null,a!==null&&u!==null){var y=a.pending;y===null?u.next=u:(u.next=y.next,y.next=u),a.pending=u}r!==0&&Ed(l,u,r)}}function Xo(e,t,l,a){qt[ga++]=e,qt[ga++]=t,qt[ga++]=l,qt[ga++]=a,ac|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function ic(e,t,l,a){return Xo(e,t,l,a),Go(e)}function Ol(e,t){return Xo(e,null,null,t),Go(e)}function Ed(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var u=!1,r=e.return;r!==null;)r.childLanes|=l,a=r.alternate,a!==null&&(a.childLanes|=l),r.tag===22&&(e=r.stateNode,e===null||e._visibility&1||(u=!0)),e=r,r=r.return;return e.tag===3?(r=e.stateNode,u&&t!==null&&(u=31-St(l),e=r.hiddenUpdates,a=e[u],a===null?e[u]=[t]:a.push(t),t.lane=l|536870912),r):null}function Go(e){if(50<Bi)throw Bi=0,mr=null,Error(s(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var pa={};function Sx(e,t,l,a){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=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ot(e,t,l,a){return new Sx(e,t,l,a)}function oc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _n(e,t){var l=e.alternate;return l===null?(l=Ot(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,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,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function Nd(e,t){e.flags&=65011714;var l=e.alternate;return l===null?(e.childLanes=0,e.lanes=t,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,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Zo(e,t,l,a,u,r){var y=0;if(a=e,typeof e=="function")oc(e)&&(y=1);else if(typeof e=="string")y=Mv(e,l,ee.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case J:return e=Ot(31,l,t,u),e.elementType=J,e.lanes=r,e;case C:return Hl(l.children,u,r,t);case T:y=8,u|=24;break;case A:return e=Ot(12,l,t,u|2),e.elementType=A,e.lanes=r,e;case q:return e=Ot(13,l,t,u),e.elementType=q,e.lanes=r,e;case B:return e=Ot(19,l,t,u),e.elementType=B,e.lanes=r,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case w:y=10;break e;case Y:y=9;break e;case z:y=11;break e;case R:y=14;break e;case $:y=16,a=null;break e}y=29,l=Error(s(130,e===null?"null":typeof e,"")),a=null}return t=Ot(y,l,t,u),t.elementType=e,t.type=a,t.lanes=r,t}function Hl(e,t,l,a){return e=Ot(7,e,a,t),e.lanes=l,e}function sc(e,t,l){return e=Ot(6,e,null,t),e.lanes=l,e}function wd(e){var t=Ot(18,null,null,0);return t.stateNode=e,t}function uc(e,t,l){return t=Ot(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var _d=new WeakMap;function Xt(e,t){if(typeof e=="object"&&e!==null){var l=_d.get(e);return l!==void 0?l:(t={value:e,source:t,stack:Ue(t)},_d.set(e,t),t)}return{value:e,source:t,stack:Ue(t)}}var ya=[],xa=0,ko=null,gi=0,Gt=[],Zt=0,Wn=null,sn=1,un="";function Mn(e,t){ya[xa++]=gi,ya[xa++]=ko,ko=e,gi=t}function Md(e,t,l){Gt[Zt++]=sn,Gt[Zt++]=un,Gt[Zt++]=Wn,Wn=e;var a=sn;e=un;var u=32-St(a)-1;a&=~(1<<u),l+=1;var r=32-St(t)+u;if(30<r){var y=u-u%5;r=(a&(1<<y)-1).toString(32),a>>=y,u-=y,sn=1<<32-St(t)+u|l<<u|a,un=r+e}else sn=1<<r|l<<u|a,un=e}function cc(e){e.return!==null&&(Mn(e,1),Md(e,1,0))}function rc(e){for(;e===ko;)ko=ya[--xa],ya[xa]=null,gi=ya[--xa],ya[xa]=null;for(;e===Wn;)Wn=Gt[--Zt],Gt[Zt]=null,un=Gt[--Zt],Gt[Zt]=null,sn=Gt[--Zt],Gt[Zt]=null}function Cd(e,t){Gt[Zt++]=sn,Gt[Zt++]=un,Gt[Zt++]=Wn,sn=t.id,un=t.overflow,Wn=e}var mt=null,Ke=null,je=!1,In=null,kt=!1,fc=Error(s(519));function Pn(e){var t=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw pi(Xt(t,e)),fc}function Ad(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[ct]=e,t[xt]=a,l){case"dialog":Ae("cancel",t),Ae("close",t);break;case"iframe":case"object":case"embed":Ae("load",t);break;case"video":case"audio":for(l=0;l<Li.length;l++)Ae(Li[l],t);break;case"source":Ae("error",t);break;case"img":case"image":case"link":Ae("error",t),Ae("load",t);break;case"details":Ae("toggle",t);break;case"input":Ae("invalid",t),Do(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Ae("invalid",t);break;case"textarea":Ae("invalid",t),Gf(t,a.value,a.defaultValue,a.children)}l=a.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||a.suppressHydrationWarning===!0||k0(t.textContent,l)?(a.popover!=null&&(Ae("beforetoggle",t),Ae("toggle",t)),a.onScroll!=null&&Ae("scroll",t),a.onScrollEnd!=null&&Ae("scrollend",t),a.onClick!=null&&(t.onclick=Nn),t=!0):t=!1,t||Pn(e,!0)}function Td(e){for(mt=e.return;mt;)switch(mt.tag){case 5:case 31:case 13:kt=!1;return;case 27:case 3:kt=!0;return;default:mt=mt.return}}function va(e){if(e!==mt)return!1;if(!je)return Td(e),je=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Tr(e.type,e.memoizedProps)),l=!l),l&&Ke&&Pn(e),Td(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));Ke=em(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));Ke=em(e)}else t===27?(t=Ke,hl(e.type)?(e=Hr,Hr=null,Ke=e):Ke=t):Ke=mt?Qt(e.stateNode.nextSibling):null;return!0}function Rl(){Ke=mt=null,je=!1}function dc(){var e=In;return e!==null&&(Tt===null?Tt=e:Tt.push.apply(Tt,e),In=null),e}function pi(e){In===null?In=[e]:In.push(e)}var hc=E(null),Bl=null,Cn=null;function el(e,t,l){I(hc,t._currentValue),t._currentValue=l}function An(e){e._currentValue=hc.current,j(hc)}function mc(e,t,l){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===l)break;e=e.return}}function gc(e,t,l,a){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var r=u.dependencies;if(r!==null){var y=u.child;r=r.firstContext;e:for(;r!==null;){var S=r;r=u;for(var O=0;O<t.length;O++)if(S.context===t[O]){r.lanes|=l,S=r.alternate,S!==null&&(S.lanes|=l),mc(r.return,l,e),a||(y=null);break e}r=S.next}}else if(u.tag===18){if(y=u.return,y===null)throw Error(s(341));y.lanes|=l,r=y.alternate,r!==null&&(r.lanes|=l),mc(y,l,e),y=null}else y=u.child;if(y!==null)y.return=u;else for(y=u;y!==null;){if(y===e){y=null;break}if(u=y.sibling,u!==null){u.return=y.return,y=u;break}y=y.return}u=y}}function ba(e,t,l,a){e=null;for(var u=t,r=!1;u!==null;){if(!r){if((u.flags&524288)!==0)r=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var y=u.alternate;if(y===null)throw Error(s(387));if(y=y.memoizedProps,y!==null){var S=u.type;Dt(u.pendingProps.value,y.value)||(e!==null?e.push(S):e=[S])}}else if(u===fe.current){if(y=u.alternate,y===null)throw Error(s(387));y.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(Gi):e=[Gi])}u=u.return}e!==null&&gc(t,e,l,a),t.flags|=262144}function $o(e){for(e=e.firstContext;e!==null;){if(!Dt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ul(e){Bl=e,Cn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function gt(e){return zd(Bl,e)}function Qo(e,t){return Bl===null&&Ul(e),zd(e,t)}function zd(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Cn===null){if(e===null)throw Error(s(308));Cn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Cn=Cn.next=t;return l}var Ex=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},Nx=n.unstable_scheduleCallback,wx=n.unstable_NormalPriority,at={$$typeof:w,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function pc(){return{controller:new Ex,data:new Map,refCount:0}}function yi(e){e.refCount--,e.refCount===0&&Nx(wx,function(){e.controller.abort()})}var xi=null,yc=0,Sa=0,Ea=null;function _x(e,t){if(xi===null){var l=xi=[];yc=0,Sa=br(),Ea={status:"pending",value:void 0,then:function(a){l.push(a)}}}return yc++,t.then(jd,jd),t}function jd(){if(--yc===0&&xi!==null){Ea!==null&&(Ea.status="fulfilled");var e=xi;xi=null,Sa=0,Ea=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Mx(e,t){var l=[],a={status:"pending",value:null,reason:null,then:function(u){l.push(u)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var u=0;u<l.length;u++)(0,l[u])(t)},function(u){for(a.status="rejected",a.reason=u,u=0;u<l.length;u++)(0,l[u])(void 0)}),a}var Dd=M.S;M.S=function(e,t){g0=ke(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&_x(e,t),Dd!==null&&Dd(e,t)};var Ll=E(null);function xc(){var e=Ll.current;return e!==null?e:$e.pooledCache}function Ko(e,t){t===null?I(Ll,Ll.current):I(Ll,t.pool)}function Od(){var e=xc();return e===null?null:{parent:at._currentValue,pool:e}}var Na=Error(s(460)),vc=Error(s(474)),Jo=Error(s(542)),Fo={then:function(){}};function Hd(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Rd(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Nn,Nn),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ud(e),e;default:if(typeof t.status=="string")t.then(Nn,Nn);else{if(e=$e,e!==null&&100<e.shellSuspendCounter)throw Error(s(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var u=t;u.status="fulfilled",u.value=a}},function(a){if(t.status==="pending"){var u=t;u.status="rejected",u.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ud(e),e}throw Vl=t,Na}}function Yl(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Vl=l,Na):l}}var Vl=null;function Bd(){if(Vl===null)throw Error(s(459));var e=Vl;return Vl=null,e}function Ud(e){if(e===Na||e===Jo)throw Error(s(483))}var wa=null,vi=0;function Wo(e){var t=vi;return vi+=1,wa===null&&(wa=[]),Rd(wa,e,t)}function bi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Io(e,t){throw t.$$typeof===b?Error(s(525)):(e=Object.prototype.toString.call(t),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Ld(e){function t(X,U){if(e){var Q=X.deletions;Q===null?(X.deletions=[U],X.flags|=16):Q.push(U)}}function l(X,U){if(!e)return null;for(;U!==null;)t(X,U),U=U.sibling;return null}function a(X){for(var U=new Map;X!==null;)X.key!==null?U.set(X.key,X):U.set(X.index,X),X=X.sibling;return U}function u(X,U){return X=_n(X,U),X.index=0,X.sibling=null,X}function r(X,U,Q){return X.index=Q,e?(Q=X.alternate,Q!==null?(Q=Q.index,Q<U?(X.flags|=67108866,U):Q):(X.flags|=67108866,U)):(X.flags|=1048576,U)}function y(X){return e&&X.alternate===null&&(X.flags|=67108866),X}function S(X,U,Q,ae){return U===null||U.tag!==6?(U=sc(Q,X.mode,ae),U.return=X,U):(U=u(U,Q),U.return=X,U)}function O(X,U,Q,ae){var be=Q.type;return be===C?ne(X,U,Q.props.children,ae,Q.key):U!==null&&(U.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===$&&Yl(be)===U.type)?(U=u(U,Q.props),bi(U,Q),U.return=X,U):(U=Zo(Q.type,Q.key,Q.props,null,X.mode,ae),bi(U,Q),U.return=X,U)}function K(X,U,Q,ae){return U===null||U.tag!==4||U.stateNode.containerInfo!==Q.containerInfo||U.stateNode.implementation!==Q.implementation?(U=uc(Q,X.mode,ae),U.return=X,U):(U=u(U,Q.children||[]),U.return=X,U)}function ne(X,U,Q,ae,be){return U===null||U.tag!==7?(U=Hl(Q,X.mode,ae,be),U.return=X,U):(U=u(U,Q),U.return=X,U)}function ie(X,U,Q){if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return U=sc(""+U,X.mode,Q),U.return=X,U;if(typeof U=="object"&&U!==null){switch(U.$$typeof){case N:return Q=Zo(U.type,U.key,U.props,null,X.mode,Q),bi(Q,U),Q.return=X,Q;case _:return U=uc(U,X.mode,Q),U.return=X,U;case $:return U=Yl(U),ie(X,U,Q)}if(Z(U)||W(U))return U=Hl(U,X.mode,Q,null),U.return=X,U;if(typeof U.then=="function")return ie(X,Wo(U),Q);if(U.$$typeof===w)return ie(X,Qo(X,U),Q);Io(X,U)}return null}function F(X,U,Q,ae){var be=U!==null?U.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return be!==null?null:S(X,U,""+Q,ae);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case N:return Q.key===be?O(X,U,Q,ae):null;case _:return Q.key===be?K(X,U,Q,ae):null;case $:return Q=Yl(Q),F(X,U,Q,ae)}if(Z(Q)||W(Q))return be!==null?null:ne(X,U,Q,ae,null);if(typeof Q.then=="function")return F(X,U,Wo(Q),ae);if(Q.$$typeof===w)return F(X,U,Qo(X,Q),ae);Io(X,Q)}return null}function P(X,U,Q,ae,be){if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return X=X.get(Q)||null,S(U,X,""+ae,be);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case N:return X=X.get(ae.key===null?Q:ae.key)||null,O(U,X,ae,be);case _:return X=X.get(ae.key===null?Q:ae.key)||null,K(U,X,ae,be);case $:return ae=Yl(ae),P(X,U,Q,ae,be)}if(Z(ae)||W(ae))return X=X.get(Q)||null,ne(U,X,ae,be,null);if(typeof ae.then=="function")return P(X,U,Q,Wo(ae),be);if(ae.$$typeof===w)return P(X,U,Q,Qo(U,ae),be);Io(U,ae)}return null}function ye(X,U,Q,ae){for(var be=null,Oe=null,ve=U,Me=U=0,ze=null;ve!==null&&Me<Q.length;Me++){ve.index>Me?(ze=ve,ve=null):ze=ve.sibling;var He=F(X,ve,Q[Me],ae);if(He===null){ve===null&&(ve=ze);break}e&&ve&&He.alternate===null&&t(X,ve),U=r(He,U,Me),Oe===null?be=He:Oe.sibling=He,Oe=He,ve=ze}if(Me===Q.length)return l(X,ve),je&&Mn(X,Me),be;if(ve===null){for(;Me<Q.length;Me++)ve=ie(X,Q[Me],ae),ve!==null&&(U=r(ve,U,Me),Oe===null?be=ve:Oe.sibling=ve,Oe=ve);return je&&Mn(X,Me),be}for(ve=a(ve);Me<Q.length;Me++)ze=P(ve,X,Me,Q[Me],ae),ze!==null&&(e&&ze.alternate!==null&&ve.delete(ze.key===null?Me:ze.key),U=r(ze,U,Me),Oe===null?be=ze:Oe.sibling=ze,Oe=ze);return e&&ve.forEach(function(xl){return t(X,xl)}),je&&Mn(X,Me),be}function Ee(X,U,Q,ae){if(Q==null)throw Error(s(151));for(var be=null,Oe=null,ve=U,Me=U=0,ze=null,He=Q.next();ve!==null&&!He.done;Me++,He=Q.next()){ve.index>Me?(ze=ve,ve=null):ze=ve.sibling;var xl=F(X,ve,He.value,ae);if(xl===null){ve===null&&(ve=ze);break}e&&ve&&xl.alternate===null&&t(X,ve),U=r(xl,U,Me),Oe===null?be=xl:Oe.sibling=xl,Oe=xl,ve=ze}if(He.done)return l(X,ve),je&&Mn(X,Me),be;if(ve===null){for(;!He.done;Me++,He=Q.next())He=ie(X,He.value,ae),He!==null&&(U=r(He,U,Me),Oe===null?be=He:Oe.sibling=He,Oe=He);return je&&Mn(X,Me),be}for(ve=a(ve);!He.done;Me++,He=Q.next())He=P(ve,X,Me,He.value,ae),He!==null&&(e&&He.alternate!==null&&ve.delete(He.key===null?Me:He.key),U=r(He,U,Me),Oe===null?be=He:Oe.sibling=He,Oe=He);return e&&ve.forEach(function(Uv){return t(X,Uv)}),je&&Mn(X,Me),be}function Ze(X,U,Q,ae){if(typeof Q=="object"&&Q!==null&&Q.type===C&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case N:e:{for(var be=Q.key;U!==null;){if(U.key===be){if(be=Q.type,be===C){if(U.tag===7){l(X,U.sibling),ae=u(U,Q.props.children),ae.return=X,X=ae;break e}}else if(U.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===$&&Yl(be)===U.type){l(X,U.sibling),ae=u(U,Q.props),bi(ae,Q),ae.return=X,X=ae;break e}l(X,U);break}else t(X,U);U=U.sibling}Q.type===C?(ae=Hl(Q.props.children,X.mode,ae,Q.key),ae.return=X,X=ae):(ae=Zo(Q.type,Q.key,Q.props,null,X.mode,ae),bi(ae,Q),ae.return=X,X=ae)}return y(X);case _:e:{for(be=Q.key;U!==null;){if(U.key===be)if(U.tag===4&&U.stateNode.containerInfo===Q.containerInfo&&U.stateNode.implementation===Q.implementation){l(X,U.sibling),ae=u(U,Q.children||[]),ae.return=X,X=ae;break e}else{l(X,U);break}else t(X,U);U=U.sibling}ae=uc(Q,X.mode,ae),ae.return=X,X=ae}return y(X);case $:return Q=Yl(Q),Ze(X,U,Q,ae)}if(Z(Q))return ye(X,U,Q,ae);if(W(Q)){if(be=W(Q),typeof be!="function")throw Error(s(150));return Q=be.call(Q),Ee(X,U,Q,ae)}if(typeof Q.then=="function")return Ze(X,U,Wo(Q),ae);if(Q.$$typeof===w)return Ze(X,U,Qo(X,Q),ae);Io(X,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint"?(Q=""+Q,U!==null&&U.tag===6?(l(X,U.sibling),ae=u(U,Q),ae.return=X,X=ae):(l(X,U),ae=sc(Q,X.mode,ae),ae.return=X,X=ae),y(X)):l(X,U)}return function(X,U,Q,ae){try{vi=0;var be=Ze(X,U,Q,ae);return wa=null,be}catch(ve){if(ve===Na||ve===Jo)throw ve;var Oe=Ot(29,ve,null,X.mode);return Oe.lanes=ae,Oe.return=X,Oe}}}var ql=Ld(!0),Yd=Ld(!1),tl=!1;function bc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Sc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.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 ll(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Re&2)!==0){var u=a.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),a.pending=t,t=Go(e),Ed(e,null,l),t}return Xo(e,a,t,l),Go(e)}function Si(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,So(e,l)}}function Ec(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var u=null,r=null;if(l=l.firstBaseUpdate,l!==null){do{var y={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};r===null?u=r=y:r=r.next=y,l=l.next}while(l!==null);r===null?u=r=t:r=r.next=t}else u=r=t;l={baseState:a.baseState,firstBaseUpdate:u,lastBaseUpdate:r,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var Nc=!1;function Ei(){if(Nc){var e=Ea;if(e!==null)throw e}}function Ni(e,t,l,a){Nc=!1;var u=e.updateQueue;tl=!1;var r=u.firstBaseUpdate,y=u.lastBaseUpdate,S=u.shared.pending;if(S!==null){u.shared.pending=null;var O=S,K=O.next;O.next=null,y===null?r=K:y.next=K,y=O;var ne=e.alternate;ne!==null&&(ne=ne.updateQueue,S=ne.lastBaseUpdate,S!==y&&(S===null?ne.firstBaseUpdate=K:S.next=K,ne.lastBaseUpdate=O))}if(r!==null){var ie=u.baseState;y=0,ne=K=O=null,S=r;do{var F=S.lane&-536870913,P=F!==S.lane;if(P?(Te&F)===F:(a&F)===F){F!==0&&F===Sa&&(Nc=!0),ne!==null&&(ne=ne.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var ye=e,Ee=S;F=t;var Ze=l;switch(Ee.tag){case 1:if(ye=Ee.payload,typeof ye=="function"){ie=ye.call(Ze,ie,F);break e}ie=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=Ee.payload,F=typeof ye=="function"?ye.call(Ze,ie,F):ye,F==null)break e;ie=p({},ie,F);break e;case 2:tl=!0}}F=S.callback,F!==null&&(e.flags|=64,P&&(e.flags|=8192),P=u.callbacks,P===null?u.callbacks=[F]:P.push(F))}else P={lane:F,tag:S.tag,payload:S.payload,callback:S.callback,next:null},ne===null?(K=ne=P,O=ie):ne=ne.next=P,y|=F;if(S=S.next,S===null){if(S=u.shared.pending,S===null)break;P=S,S=P.next,P.next=null,u.lastBaseUpdate=P,u.shared.pending=null}}while(!0);ne===null&&(O=ie),u.baseState=O,u.firstBaseUpdate=K,u.lastBaseUpdate=ne,r===null&&(u.shared.lanes=0),ul|=y,e.lanes=y,e.memoizedState=ie}}function Vd(e,t){if(typeof e!="function")throw Error(s(191,e));e.call(t)}function qd(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Vd(l[e],t)}var _a=E(null),Po=E(0);function Xd(e,t){e=Un,I(Po,e),I(_a,t),Un=e|t.baseLanes}function wc(){I(Po,Un),I(_a,_a.current)}function _c(){Un=Po.current,j(_a),j(Po)}var Ht=E(null),$t=null;function al(e){var t=e.alternate;I(tt,tt.current&1),I(Ht,e),$t===null&&(t===null||_a.current!==null||t.memoizedState!==null)&&($t=e)}function Mc(e){I(tt,tt.current),I(Ht,e),$t===null&&($t=e)}function Gd(e){e.tag===22?(I(tt,tt.current),I(Ht,e),$t===null&&($t=e)):il()}function il(){I(tt,tt.current),I(Ht,Ht.current)}function Rt(e){j(Ht),$t===e&&($t=null),j(tt)}var tt=E(0);function es(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Dr(l)||Or(l)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Tn=0,we=null,Xe=null,it=null,ts=!1,Ma=!1,Xl=!1,ns=0,wi=0,Ca=null,Cx=0;function Pe(){throw Error(s(321))}function Cc(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!Dt(e[l],t[l]))return!1;return!0}function Ac(e,t,l,a,u,r){return Tn=r,we=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?Mh:Gc,Xl=!1,r=l(a,u),Xl=!1,Ma&&(r=kd(t,l,a,u)),Zd(e),r}function Zd(e){M.H=Ci;var t=Xe!==null&&Xe.next!==null;if(Tn=0,it=Xe=we=null,ts=!1,wi=0,Ca=null,t)throw Error(s(300));e===null||ot||(e=e.dependencies,e!==null&&$o(e)&&(ot=!0))}function kd(e,t,l,a){we=e;var u=0;do{if(Ma&&(Ca=null),wi=0,Ma=!1,25<=u)throw Error(s(301));if(u+=1,it=Xe=null,e.updateQueue!=null){var r=e.updateQueue;r.lastEffect=null,r.events=null,r.stores=null,r.memoCache!=null&&(r.memoCache.index=0)}M.H=Ch,r=t(l,a)}while(Ma);return r}function Ax(){var e=M.H,t=e.useState()[0];return t=typeof t.then=="function"?_i(t):t,e=e.useState()[0],(Xe!==null?Xe.memoizedState:null)!==e&&(we.flags|=1024),t}function Tc(){var e=ns!==0;return ns=0,e}function zc(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function jc(e){if(ts){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ts=!1}Tn=0,it=Xe=we=null,Ma=!1,wi=ns=0,Ca=null}function Et(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return it===null?we.memoizedState=it=e:it=it.next=e,it}function nt(){if(Xe===null){var e=we.alternate;e=e!==null?e.memoizedState:null}else e=Xe.next;var t=it===null?we.memoizedState:it.next;if(t!==null)it=t,Xe=e;else{if(e===null)throw we.alternate===null?Error(s(467)):Error(s(310));Xe=e,e={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},it===null?we.memoizedState=it=e:it=it.next=e}return it}function ls(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function _i(e){var t=wi;return wi+=1,Ca===null&&(Ca=[]),e=Rd(Ca,e,t),t=we,(it===null?t.memoizedState:it.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?Mh:Gc),e}function as(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return _i(e);if(e.$$typeof===w)return gt(e)}throw Error(s(438,String(e)))}function Dc(e){var t=null,l=we.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=we.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(u){return u.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=ls(),we.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),a=0;a<e;a++)l[a]=se;return t.index++,l}function zn(e,t){return typeof t=="function"?t(e):t}function is(e){var t=nt();return Oc(t,Xe,e)}function Oc(e,t,l){var a=e.queue;if(a===null)throw Error(s(311));a.lastRenderedReducer=l;var u=e.baseQueue,r=a.pending;if(r!==null){if(u!==null){var y=u.next;u.next=r.next,r.next=y}t.baseQueue=u=r,a.pending=null}if(r=e.baseState,u===null)e.memoizedState=r;else{t=u.next;var S=y=null,O=null,K=t,ne=!1;do{var ie=K.lane&-536870913;if(ie!==K.lane?(Te&ie)===ie:(Tn&ie)===ie){var F=K.revertLane;if(F===0)O!==null&&(O=O.next={lane:0,revertLane:0,gesture:null,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null}),ie===Sa&&(ne=!0);else if((Tn&F)===F){K=K.next,F===Sa&&(ne=!0);continue}else ie={lane:0,revertLane:K.revertLane,gesture:null,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null},O===null?(S=O=ie,y=r):O=O.next=ie,we.lanes|=F,ul|=F;ie=K.action,Xl&&l(r,ie),r=K.hasEagerState?K.eagerState:l(r,ie)}else F={lane:ie,revertLane:K.revertLane,gesture:K.gesture,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null},O===null?(S=O=F,y=r):O=O.next=F,we.lanes|=ie,ul|=ie;K=K.next}while(K!==null&&K!==t);if(O===null?y=r:O.next=S,!Dt(r,e.memoizedState)&&(ot=!0,ne&&(l=Ea,l!==null)))throw l;e.memoizedState=r,e.baseState=y,e.baseQueue=O,a.lastRenderedState=r}return u===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Hc(e){var t=nt(),l=t.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=e;var a=l.dispatch,u=l.pending,r=t.memoizedState;if(u!==null){l.pending=null;var y=u=u.next;do r=e(r,y.action),y=y.next;while(y!==u);Dt(r,t.memoizedState)||(ot=!0),t.memoizedState=r,t.baseQueue===null&&(t.baseState=r),l.lastRenderedState=r}return[r,a]}function $d(e,t,l){var a=we,u=nt(),r=je;if(r){if(l===void 0)throw Error(s(407));l=l()}else l=t();var y=!Dt((Xe||u).memoizedState,l);if(y&&(u.memoizedState=l,ot=!0),u=u.queue,Uc(Jd.bind(null,a,u,e),[e]),u.getSnapshot!==t||y||it!==null&&it.memoizedState.tag&1){if(a.flags|=2048,Aa(9,{destroy:void 0},Kd.bind(null,a,u,l,t),null),$e===null)throw Error(s(349));r||(Tn&127)!==0||Qd(a,t,l)}return l}function Qd(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=we.updateQueue,t===null?(t=ls(),we.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function Kd(e,t,l,a){t.value=l,t.getSnapshot=a,Fd(t)&&Wd(e)}function Jd(e,t,l){return l(function(){Fd(t)&&Wd(e)})}function Fd(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!Dt(e,l)}catch{return!0}}function Wd(e){var t=Ol(e,2);t!==null&&zt(t,e,2)}function Rc(e){var t=Et();if(typeof e=="function"){var l=e;if(e=l(),Xl){an(!0);try{l()}finally{an(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zn,lastRenderedState:e},t}function Id(e,t,l,a){return e.baseState=l,Oc(e,Xe,typeof a=="function"?a:zn)}function Tx(e,t,l,a,u){if(us(e))throw Error(s(485));if(e=t.action,e!==null){var r={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){r.listeners.push(y)}};M.T!==null?l(!0):r.isTransition=!1,a(r),l=t.pending,l===null?(r.next=t.pending=r,Pd(t,r)):(r.next=l.next,t.pending=l.next=r)}}function Pd(e,t){var l=t.action,a=t.payload,u=e.state;if(t.isTransition){var r=M.T,y={};M.T=y;try{var S=l(u,a),O=M.S;O!==null&&O(y,S),eh(e,t,S)}catch(K){Bc(e,t,K)}finally{r!==null&&y.types!==null&&(r.types=y.types),M.T=r}}else try{r=l(u,a),eh(e,t,r)}catch(K){Bc(e,t,K)}}function eh(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){th(e,t,a)},function(a){return Bc(e,t,a)}):th(e,t,l)}function th(e,t,l){t.status="fulfilled",t.value=l,nh(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,Pd(e,l)))}function Bc(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,nh(t),t=t.next;while(t!==a)}e.action=null}function nh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function lh(e,t){return t}function ah(e,t){if(je){var l=$e.formState;if(l!==null){e:{var a=we;if(je){if(Ke){t:{for(var u=Ke,r=kt;u.nodeType!==8;){if(!r){u=null;break t}if(u=Qt(u.nextSibling),u===null){u=null;break t}}r=u.data,u=r==="F!"||r==="F"?u:null}if(u){Ke=Qt(u.nextSibling),a=u.data==="F!";break e}}Pn(a)}a=!1}a&&(t=l[0])}}return l=Et(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:lh,lastRenderedState:t},l.queue=a,l=Nh.bind(null,we,a),a.dispatch=l,a=Rc(!1),r=Xc.bind(null,we,!1,a.queue),a=Et(),u={state:t,dispatch:null,action:e,pending:null},a.queue=u,l=Tx.bind(null,we,u,r,l),u.dispatch=l,a.memoizedState=e,[t,l,!1]}function ih(e){var t=nt();return oh(t,Xe,e)}function oh(e,t,l){if(t=Oc(e,t,lh)[0],e=is(zn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=_i(t)}catch(y){throw y===Na?Jo:y}else a=t;t=nt();var u=t.queue,r=u.dispatch;return l!==t.memoizedState&&(we.flags|=2048,Aa(9,{destroy:void 0},zx.bind(null,u,l),null)),[a,r,e]}function zx(e,t){e.action=t}function sh(e){var t=nt(),l=Xe;if(l!==null)return oh(t,l,e);nt(),t=t.memoizedState,l=nt();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function Aa(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=we.updateQueue,t===null&&(t=ls(),we.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(a=l.next,l.next=e,e.next=a,t.lastEffect=e),e}function uh(){return nt().memoizedState}function os(e,t,l,a){var u=Et();we.flags|=e,u.memoizedState=Aa(1|t,{destroy:void 0},l,a===void 0?null:a)}function ss(e,t,l,a){var u=nt();a=a===void 0?null:a;var r=u.memoizedState.inst;Xe!==null&&a!==null&&Cc(a,Xe.memoizedState.deps)?u.memoizedState=Aa(t,r,l,a):(we.flags|=e,u.memoizedState=Aa(1|t,r,l,a))}function ch(e,t){os(8390656,8,e,t)}function Uc(e,t){ss(2048,8,e,t)}function jx(e){we.flags|=4;var t=we.updateQueue;if(t===null)t=ls(),we.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function rh(e){var t=nt().memoizedState;return jx({ref:t,nextImpl:e}),function(){if((Re&2)!==0)throw Error(s(440));return t.impl.apply(void 0,arguments)}}function fh(e,t){return ss(4,2,e,t)}function dh(e,t){return ss(4,4,e,t)}function hh(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function mh(e,t,l){l=l!=null?l.concat([e]):null,ss(4,4,hh.bind(null,t,e),l)}function Lc(){}function gh(e,t){var l=nt();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&Cc(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function ph(e,t){var l=nt();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&Cc(t,a[1]))return a[0];if(a=e(),Xl){an(!0);try{e()}finally{an(!1)}}return l.memoizedState=[a,t],a}function Yc(e,t,l){return l===void 0||(Tn&1073741824)!==0&&(Te&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=y0(),we.lanes|=e,ul|=e,l)}function yh(e,t,l,a){return Dt(l,t)?l:_a.current!==null?(e=Yc(e,l,a),Dt(e,t)||(ot=!0),e):(Tn&42)===0||(Tn&1073741824)!==0&&(Te&261930)===0?(ot=!0,e.memoizedState=l):(e=y0(),we.lanes|=e,ul|=e,t)}function xh(e,t,l,a,u){var r=H.p;H.p=r!==0&&8>r?r:8;var y=M.T,S={};M.T=S,Xc(e,!1,t,l);try{var O=u(),K=M.S;if(K!==null&&K(S,O),O!==null&&typeof O=="object"&&typeof O.then=="function"){var ne=Mx(O,a);Mi(e,t,ne,Lt(e))}else Mi(e,t,a,Lt(e))}catch(ie){Mi(e,t,{then:function(){},status:"rejected",reason:ie},Lt())}finally{H.p=r,y!==null&&S.types!==null&&(y.types=S.types),M.T=y}}function Dx(){}function Vc(e,t,l,a){if(e.tag!==5)throw Error(s(476));var u=vh(e).queue;xh(e,u,t,L,l===null?Dx:function(){return bh(e),l(a)})}function vh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:L,baseState:L,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zn,lastRenderedState:L},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zn,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function bh(e){var t=vh(e);t.next===null&&(t=e.alternate.memoizedState),Mi(e,t.next.queue,{},Lt())}function qc(){return gt(Gi)}function Sh(){return nt().memoizedState}function Eh(){return nt().memoizedState}function Ox(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Lt();e=nl(l);var a=ll(t,e,l);a!==null&&(zt(a,t,l),Si(a,t,l)),t={cache:pc()},e.payload=t;return}t=t.return}}function Hx(e,t,l){var a=Lt();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},us(e)?wh(t,l):(l=ic(e,t,l,a),l!==null&&(zt(l,e,a),_h(l,t,a)))}function Nh(e,t,l){var a=Lt();Mi(e,t,l,a)}function Mi(e,t,l,a){var u={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(us(e))wh(t,u);else{var r=e.alternate;if(e.lanes===0&&(r===null||r.lanes===0)&&(r=t.lastRenderedReducer,r!==null))try{var y=t.lastRenderedState,S=r(y,l);if(u.hasEagerState=!0,u.eagerState=S,Dt(S,y))return Xo(e,t,u,0),$e===null&&qo(),!1}catch{}if(l=ic(e,t,u,a),l!==null)return zt(l,e,a),_h(l,t,a),!0}return!1}function Xc(e,t,l,a){if(a={lane:2,revertLane:br(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},us(e)){if(t)throw Error(s(479))}else t=ic(e,l,a,2),t!==null&&zt(t,e,2)}function us(e){var t=e.alternate;return e===we||t!==null&&t===we}function wh(e,t){Ma=ts=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function _h(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,So(e,l)}}var Ci={readContext:gt,use:as,useCallback:Pe,useContext:Pe,useEffect:Pe,useImperativeHandle:Pe,useLayoutEffect:Pe,useInsertionEffect:Pe,useMemo:Pe,useReducer:Pe,useRef:Pe,useState:Pe,useDebugValue:Pe,useDeferredValue:Pe,useTransition:Pe,useSyncExternalStore:Pe,useId:Pe,useHostTransitionStatus:Pe,useFormState:Pe,useActionState:Pe,useOptimistic:Pe,useMemoCache:Pe,useCacheRefresh:Pe};Ci.useEffectEvent=Pe;var Mh={readContext:gt,use:as,useCallback:function(e,t){return Et().memoizedState=[e,t===void 0?null:t],e},useContext:gt,useEffect:ch,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,os(4194308,4,hh.bind(null,t,e),l)},useLayoutEffect:function(e,t){return os(4194308,4,e,t)},useInsertionEffect:function(e,t){os(4,2,e,t)},useMemo:function(e,t){var l=Et();t=t===void 0?null:t;var a=e();if(Xl){an(!0);try{e()}finally{an(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=Et();if(l!==void 0){var u=l(t);if(Xl){an(!0);try{l(t)}finally{an(!1)}}}else u=t;return a.memoizedState=a.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},a.queue=e,e=e.dispatch=Hx.bind(null,we,e),[a.memoizedState,e]},useRef:function(e){var t=Et();return e={current:e},t.memoizedState=e},useState:function(e){e=Rc(e);var t=e.queue,l=Nh.bind(null,we,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:Lc,useDeferredValue:function(e,t){var l=Et();return Yc(l,e,t)},useTransition:function(){var e=Rc(!1);return e=xh.bind(null,we,e.queue,!0,!1),Et().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=we,u=Et();if(je){if(l===void 0)throw Error(s(407));l=l()}else{if(l=t(),$e===null)throw Error(s(349));(Te&127)!==0||Qd(a,t,l)}u.memoizedState=l;var r={value:l,getSnapshot:t};return u.queue=r,ch(Jd.bind(null,a,r,e),[e]),a.flags|=2048,Aa(9,{destroy:void 0},Kd.bind(null,a,r,l,t),null),l},useId:function(){var e=Et(),t=$e.identifierPrefix;if(je){var l=un,a=sn;l=(a&~(1<<32-St(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=ns++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=Cx++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:qc,useFormState:ah,useActionState:ah,useOptimistic:function(e){var t=Et();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=Xc.bind(null,we,!0,l),l.dispatch=t,[e,t]},useMemoCache:Dc,useCacheRefresh:function(){return Et().memoizedState=Ox.bind(null,we)},useEffectEvent:function(e){var t=Et(),l={impl:e};return t.memoizedState=l,function(){if((Re&2)!==0)throw Error(s(440));return l.impl.apply(void 0,arguments)}}},Gc={readContext:gt,use:as,useCallback:gh,useContext:gt,useEffect:Uc,useImperativeHandle:mh,useInsertionEffect:fh,useLayoutEffect:dh,useMemo:ph,useReducer:is,useRef:uh,useState:function(){return is(zn)},useDebugValue:Lc,useDeferredValue:function(e,t){var l=nt();return yh(l,Xe.memoizedState,e,t)},useTransition:function(){var e=is(zn)[0],t=nt().memoizedState;return[typeof e=="boolean"?e:_i(e),t]},useSyncExternalStore:$d,useId:Sh,useHostTransitionStatus:qc,useFormState:ih,useActionState:ih,useOptimistic:function(e,t){var l=nt();return Id(l,Xe,e,t)},useMemoCache:Dc,useCacheRefresh:Eh};Gc.useEffectEvent=rh;var Ch={readContext:gt,use:as,useCallback:gh,useContext:gt,useEffect:Uc,useImperativeHandle:mh,useInsertionEffect:fh,useLayoutEffect:dh,useMemo:ph,useReducer:Hc,useRef:uh,useState:function(){return Hc(zn)},useDebugValue:Lc,useDeferredValue:function(e,t){var l=nt();return Xe===null?Yc(l,e,t):yh(l,Xe.memoizedState,e,t)},useTransition:function(){var e=Hc(zn)[0],t=nt().memoizedState;return[typeof e=="boolean"?e:_i(e),t]},useSyncExternalStore:$d,useId:Sh,useHostTransitionStatus:qc,useFormState:sh,useActionState:sh,useOptimistic:function(e,t){var l=nt();return Xe!==null?Id(l,Xe,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Dc,useCacheRefresh:Eh};Ch.useEffectEvent=rh;function Zc(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:p({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var kc={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=Lt(),u=nl(a);u.payload=t,l!=null&&(u.callback=l),t=ll(e,u,a),t!==null&&(zt(t,e,a),Si(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=Lt(),u=nl(a);u.tag=1,u.payload=t,l!=null&&(u.callback=l),t=ll(e,u,a),t!==null&&(zt(t,e,a),Si(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=Lt(),a=nl(l);a.tag=2,t!=null&&(a.callback=t),t=ll(e,a,l),t!==null&&(zt(t,e,l),Si(t,e,l))}};function Ah(e,t,l,a,u,r,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,r,y):t.prototype&&t.prototype.isPureReactComponent?!hi(l,a)||!hi(u,r):!0}function Th(e,t,l,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,a),t.state!==e&&kc.enqueueReplaceState(t,t.state,null)}function Gl(e,t){var l=t;if("ref"in t){l={};for(var a in t)a!=="ref"&&(l[a]=t[a])}if(e=e.defaultProps){l===t&&(l=p({},l));for(var u in e)l[u]===void 0&&(l[u]=e[u])}return l}function zh(e){Vo(e)}function jh(e){console.error(e)}function Dh(e){Vo(e)}function cs(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Oh(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function $c(e,t,l){return l=nl(l),l.tag=3,l.payload={element:null},l.callback=function(){cs(e,t)},l}function Hh(e){return e=nl(e),e.tag=3,e}function Rh(e,t,l,a){var u=l.type.getDerivedStateFromError;if(typeof u=="function"){var r=a.value;e.payload=function(){return u(r)},e.callback=function(){Oh(t,l,a)}}var y=l.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){Oh(t,l,a),typeof u!="function"&&(cl===null?cl=new Set([this]):cl.add(this));var S=a.stack;this.componentDidCatch(a.value,{componentStack:S!==null?S:""})})}function Rx(e,t,l,a,u){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&ba(t,l,u,!0),l=Ht.current,l!==null){switch(l.tag){case 31:case 13:return $t===null?Ss():l.alternate===null&&et===0&&(et=3),l.flags&=-257,l.flags|=65536,l.lanes=u,a===Fo?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),yr(e,a,u)),!1;case 22:return l.flags|=65536,a===Fo?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([a]):l.add(a)),yr(e,a,u)),!1}throw Error(s(435,l.tag))}return yr(e,a,u),Ss(),!1}if(je)return t=Ht.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,a!==fc&&(e=Error(s(422),{cause:a}),pi(Xt(e,l)))):(a!==fc&&(t=Error(s(423),{cause:a}),pi(Xt(t,l))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,a=Xt(a,l),u=$c(e.stateNode,a,u),Ec(e,u),et!==4&&(et=2)),!1;var r=Error(s(520),{cause:a});if(r=Xt(r,l),Ri===null?Ri=[r]:Ri.push(r),et!==4&&(et=2),t===null)return!0;a=Xt(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=u&-u,l.lanes|=e,e=$c(l.stateNode,a,e),Ec(l,e),!1;case 1:if(t=l.type,r=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||r!==null&&typeof r.componentDidCatch=="function"&&(cl===null||!cl.has(r))))return l.flags|=65536,u&=-u,l.lanes|=u,u=Hh(u),Rh(u,e,l,a),Ec(l,u),!1}l=l.return}while(l!==null);return!1}var Qc=Error(s(461)),ot=!1;function pt(e,t,l,a){t.child=e===null?Yd(t,null,l,a):ql(t,e.child,l,a)}function Bh(e,t,l,a,u){l=l.render;var r=t.ref;if("ref"in a){var y={};for(var S in a)S!=="ref"&&(y[S]=a[S])}else y=a;return Ul(t),a=Ac(e,t,l,y,r,u),S=Tc(),e!==null&&!ot?(zc(e,t,u),jn(e,t,u)):(je&&S&&cc(t),t.flags|=1,pt(e,t,a,u),t.child)}function Uh(e,t,l,a,u){if(e===null){var r=l.type;return typeof r=="function"&&!oc(r)&&r.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=r,Lh(e,t,r,a,u)):(e=Zo(l.type,null,a,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(r=e.child,!tr(e,u)){var y=r.memoizedProps;if(l=l.compare,l=l!==null?l:hi,l(y,a)&&e.ref===t.ref)return jn(e,t,u)}return t.flags|=1,e=_n(r,a),e.ref=t.ref,e.return=t,t.child=e}function Lh(e,t,l,a,u){if(e!==null){var r=e.memoizedProps;if(hi(r,a)&&e.ref===t.ref)if(ot=!1,t.pendingProps=a=r,tr(e,u))(e.flags&131072)!==0&&(ot=!0);else return t.lanes=e.lanes,jn(e,t,u)}return Kc(e,t,l,a,u)}function Yh(e,t,l,a){var u=a.children,r=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(r=r!==null?r.baseLanes|l:l,e!==null){for(a=t.child=e.child,u=0;a!==null;)u=u|a.lanes|a.childLanes,a=a.sibling;a=u&~r}else a=0,t.child=null;return Vh(e,t,r,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ko(t,r!==null?r.cachePool:null),r!==null?Xd(t,r):wc(),Gd(t);else return a=t.lanes=536870912,Vh(e,t,r!==null?r.baseLanes|l:l,l,a)}else r!==null?(Ko(t,r.cachePool),Xd(t,r),il(),t.memoizedState=null):(e!==null&&Ko(t,null),wc(),il());return pt(e,t,u,l),t.child}function Ai(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Vh(e,t,l,a,u){var r=xc();return r=r===null?null:{parent:at._currentValue,pool:r},t.memoizedState={baseLanes:l,cachePool:r},e!==null&&Ko(t,null),wc(),Gd(t),e!==null&&ba(e,t,a,!0),t.childLanes=u,null}function rs(e,t){return t=ds({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function qh(e,t,l){return ql(t,e.child,null,l),e=rs(t,t.pendingProps),e.flags|=2,Rt(t),t.memoizedState=null,e}function Bx(e,t,l){var a=t.pendingProps,u=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(je){if(a.mode==="hidden")return e=rs(t,a),t.lanes=536870912,Ai(null,e);if(Mc(t),(e=Ke)?(e=P0(e,kt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Wn!==null?{id:sn,overflow:un}:null,retryLane:536870912,hydrationErrors:null},l=wd(e),l.return=t,t.child=l,mt=t,Ke=null)):e=null,e===null)throw Pn(t);return t.lanes=536870912,null}return rs(t,a)}var r=e.memoizedState;if(r!==null){var y=r.dehydrated;if(Mc(t),u)if(t.flags&256)t.flags&=-257,t=qh(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(s(558));else if(ot||ba(e,t,l,!1),u=(l&e.childLanes)!==0,ot||u){if(a=$e,a!==null&&(y=Eo(a,l),y!==0&&y!==r.retryLane))throw r.retryLane=y,Ol(e,y),zt(a,e,y),Qc;Ss(),t=qh(e,t,l)}else e=r.treeContext,Ke=Qt(y.nextSibling),mt=t,je=!0,In=null,kt=!1,e!==null&&Cd(t,e),t=rs(t,a),t.flags|=4096;return t}return e=_n(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function fs(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(s(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function Kc(e,t,l,a,u){return Ul(t),l=Ac(e,t,l,a,void 0,u),a=Tc(),e!==null&&!ot?(zc(e,t,u),jn(e,t,u)):(je&&a&&cc(t),t.flags|=1,pt(e,t,l,u),t.child)}function Xh(e,t,l,a,u,r){return Ul(t),t.updateQueue=null,l=kd(t,a,l,u),Zd(e),a=Tc(),e!==null&&!ot?(zc(e,t,r),jn(e,t,r)):(je&&a&&cc(t),t.flags|=1,pt(e,t,l,r),t.child)}function Gh(e,t,l,a,u){if(Ul(t),t.stateNode===null){var r=pa,y=l.contextType;typeof y=="object"&&y!==null&&(r=gt(y)),r=new l(a,r),t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=kc,t.stateNode=r,r._reactInternals=t,r=t.stateNode,r.props=a,r.state=t.memoizedState,r.refs={},bc(t),y=l.contextType,r.context=typeof y=="object"&&y!==null?gt(y):pa,r.state=t.memoizedState,y=l.getDerivedStateFromProps,typeof y=="function"&&(Zc(t,l,y,a),r.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(y=r.state,typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount(),y!==r.state&&kc.enqueueReplaceState(r,r.state,null),Ni(t,a,r,u),Ei(),r.state=t.memoizedState),typeof r.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){r=t.stateNode;var S=t.memoizedProps,O=Gl(l,S);r.props=O;var K=r.context,ne=l.contextType;y=pa,typeof ne=="object"&&ne!==null&&(y=gt(ne));var ie=l.getDerivedStateFromProps;ne=typeof ie=="function"||typeof r.getSnapshotBeforeUpdate=="function",S=t.pendingProps!==S,ne||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(S||K!==y)&&Th(t,r,a,y),tl=!1;var F=t.memoizedState;r.state=F,Ni(t,a,r,u),Ei(),K=t.memoizedState,S||F!==K||tl?(typeof ie=="function"&&(Zc(t,l,ie,a),K=t.memoizedState),(O=tl||Ah(t,l,O,a,F,K,y))?(ne||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount()),typeof r.componentDidMount=="function"&&(t.flags|=4194308)):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=K),r.props=a,r.state=K,r.context=y,a=O):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{r=t.stateNode,Sc(e,t),y=t.memoizedProps,ne=Gl(l,y),r.props=ne,ie=t.pendingProps,F=r.context,K=l.contextType,O=pa,typeof K=="object"&&K!==null&&(O=gt(K)),S=l.getDerivedStateFromProps,(K=typeof S=="function"||typeof r.getSnapshotBeforeUpdate=="function")||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(y!==ie||F!==O)&&Th(t,r,a,O),tl=!1,F=t.memoizedState,r.state=F,Ni(t,a,r,u),Ei();var P=t.memoizedState;y!==ie||F!==P||tl||e!==null&&e.dependencies!==null&&$o(e.dependencies)?(typeof S=="function"&&(Zc(t,l,S,a),P=t.memoizedState),(ne=tl||Ah(t,l,ne,a,F,P,O)||e!==null&&e.dependencies!==null&&$o(e.dependencies))?(K||typeof r.UNSAFE_componentWillUpdate!="function"&&typeof r.componentWillUpdate!="function"||(typeof r.componentWillUpdate=="function"&&r.componentWillUpdate(a,P,O),typeof r.UNSAFE_componentWillUpdate=="function"&&r.UNSAFE_componentWillUpdate(a,P,O)),typeof r.componentDidUpdate=="function"&&(t.flags|=4),typeof r.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof r.componentDidUpdate!="function"||y===e.memoizedProps&&F===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&F===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=P),r.props=a,r.state=P,r.context=O,a=ne):(typeof r.componentDidUpdate!="function"||y===e.memoizedProps&&F===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&F===e.memoizedState||(t.flags|=1024),a=!1)}return r=a,fs(e,t),a=(t.flags&128)!==0,r||a?(r=t.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:r.render(),t.flags|=1,e!==null&&a?(t.child=ql(t,e.child,null,u),t.child=ql(t,null,l,u)):pt(e,t,l,u),t.memoizedState=r.state,e=t.child):e=jn(e,t,u),e}function Zh(e,t,l,a){return Rl(),t.flags|=256,pt(e,t,l,a),t.child}var Jc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Fc(e){return{baseLanes:e,cachePool:Od()}}function Wc(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=Ut),e}function kh(e,t,l){var a=t.pendingProps,u=!1,r=(t.flags&128)!==0,y;if((y=r)||(y=e!==null&&e.memoizedState===null?!1:(tt.current&2)!==0),y&&(u=!0,t.flags&=-129),y=(t.flags&32)!==0,t.flags&=-33,e===null){if(je){if(u?al(t):il(),(e=Ke)?(e=P0(e,kt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Wn!==null?{id:sn,overflow:un}:null,retryLane:536870912,hydrationErrors:null},l=wd(e),l.return=t,t.child=l,mt=t,Ke=null)):e=null,e===null)throw Pn(t);return Or(e)?t.lanes=32:t.lanes=536870912,null}var S=a.children;return a=a.fallback,u?(il(),u=t.mode,S=ds({mode:"hidden",children:S},u),a=Hl(a,u,l,null),S.return=t,a.return=t,S.sibling=a,t.child=S,a=t.child,a.memoizedState=Fc(l),a.childLanes=Wc(e,y,l),t.memoizedState=Jc,Ai(null,a)):(al(t),Ic(t,S))}var O=e.memoizedState;if(O!==null&&(S=O.dehydrated,S!==null)){if(r)t.flags&256?(al(t),t.flags&=-257,t=Pc(e,t,l)):t.memoizedState!==null?(il(),t.child=e.child,t.flags|=128,t=null):(il(),S=a.fallback,u=t.mode,a=ds({mode:"visible",children:a.children},u),S=Hl(S,u,l,null),S.flags|=2,a.return=t,S.return=t,a.sibling=S,t.child=a,ql(t,e.child,null,l),a=t.child,a.memoizedState=Fc(l),a.childLanes=Wc(e,y,l),t.memoizedState=Jc,t=Ai(null,a));else if(al(t),Or(S)){if(y=S.nextSibling&&S.nextSibling.dataset,y)var K=y.dgst;y=K,a=Error(s(419)),a.stack="",a.digest=y,pi({value:a,source:null,stack:null}),t=Pc(e,t,l)}else if(ot||ba(e,t,l,!1),y=(l&e.childLanes)!==0,ot||y){if(y=$e,y!==null&&(a=Eo(y,l),a!==0&&a!==O.retryLane))throw O.retryLane=a,Ol(e,a),zt(y,e,a),Qc;Dr(S)||Ss(),t=Pc(e,t,l)}else Dr(S)?(t.flags|=192,t.child=e.child,t=null):(e=O.treeContext,Ke=Qt(S.nextSibling),mt=t,je=!0,In=null,kt=!1,e!==null&&Cd(t,e),t=Ic(t,a.children),t.flags|=4096);return t}return u?(il(),S=a.fallback,u=t.mode,O=e.child,K=O.sibling,a=_n(O,{mode:"hidden",children:a.children}),a.subtreeFlags=O.subtreeFlags&65011712,K!==null?S=_n(K,S):(S=Hl(S,u,l,null),S.flags|=2),S.return=t,a.return=t,a.sibling=S,t.child=a,Ai(null,a),a=t.child,S=e.child.memoizedState,S===null?S=Fc(l):(u=S.cachePool,u!==null?(O=at._currentValue,u=u.parent!==O?{parent:O,pool:O}:u):u=Od(),S={baseLanes:S.baseLanes|l,cachePool:u}),a.memoizedState=S,a.childLanes=Wc(e,y,l),t.memoizedState=Jc,Ai(e.child,a)):(al(t),l=e.child,e=l.sibling,l=_n(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(y=t.deletions,y===null?(t.deletions=[e],t.flags|=16):y.push(e)),t.child=l,t.memoizedState=null,l)}function Ic(e,t){return t=ds({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ds(e,t){return e=Ot(22,e,null,t),e.lanes=0,e}function Pc(e,t,l){return ql(t,e.child,null,l),e=Ic(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function $h(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),mc(e.return,t,l)}function er(e,t,l,a,u,r){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:u,treeForkCount:r}:(y.isBackwards=t,y.rendering=null,y.renderingStartTime=0,y.last=a,y.tail=l,y.tailMode=u,y.treeForkCount=r)}function Qh(e,t,l){var a=t.pendingProps,u=a.revealOrder,r=a.tail;a=a.children;var y=tt.current,S=(y&2)!==0;if(S?(y=y&1|2,t.flags|=128):y&=1,I(tt,y),pt(e,t,a,l),a=je?gi:0,!S&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&$h(e,l,t);else if(e.tag===19)$h(e,l,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(u){case"forwards":for(l=t.child,u=null;l!==null;)e=l.alternate,e!==null&&es(e)===null&&(u=l),l=l.sibling;l=u,l===null?(u=t.child,t.child=null):(u=l.sibling,l.sibling=null),er(t,!1,u,l,r,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&es(e)===null){t.child=u;break}e=u.sibling,u.sibling=l,l=u,u=e}er(t,!0,l,null,r,a);break;case"together":er(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function jn(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),ul|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(ba(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,l=_n(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=_n(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function tr(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&$o(e)))}function Ux(e,t,l){switch(t.tag){case 3:ce(t,t.stateNode.containerInfo),el(t,at,e.memoizedState.cache),Rl();break;case 27:case 5:le(t);break;case 4:ce(t,t.stateNode.containerInfo);break;case 10:el(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Mc(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(al(t),t.flags|=128,null):(l&t.child.childLanes)!==0?kh(e,t,l):(al(t),e=jn(e,t,l),e!==null?e.sibling:null);al(t);break;case 19:var u=(e.flags&128)!==0;if(a=(l&t.childLanes)!==0,a||(ba(e,t,l,!1),a=(l&t.childLanes)!==0),u){if(a)return Qh(e,t,l);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),I(tt,tt.current),a)break;return null;case 22:return t.lanes=0,Yh(e,t,l,t.pendingProps);case 24:el(t,at,e.memoizedState.cache)}return jn(e,t,l)}function Kh(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)ot=!0;else{if(!tr(e,l)&&(t.flags&128)===0)return ot=!1,Ux(e,t,l);ot=(e.flags&131072)!==0}else ot=!1,je&&(t.flags&1048576)!==0&&Md(t,gi,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=Yl(t.elementType),t.type=e,typeof e=="function")oc(e)?(a=Gl(e,a),t.tag=1,t=Gh(null,t,e,a,l)):(t.tag=0,t=Kc(null,t,e,a,l));else{if(e!=null){var u=e.$$typeof;if(u===z){t.tag=11,t=Bh(null,t,e,a,l);break e}else if(u===R){t.tag=14,t=Uh(null,t,e,a,l);break e}}throw t=D(e)||e,Error(s(306,t,""))}}return t;case 0:return Kc(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,u=Gl(a,t.pendingProps),Gh(e,t,a,u,l);case 3:e:{if(ce(t,t.stateNode.containerInfo),e===null)throw Error(s(387));a=t.pendingProps;var r=t.memoizedState;u=r.element,Sc(e,t),Ni(t,a,null,l);var y=t.memoizedState;if(a=y.cache,el(t,at,a),a!==r.cache&&gc(t,[at],l,!0),Ei(),a=y.element,r.isDehydrated)if(r={element:a,isDehydrated:!1,cache:y.cache},t.updateQueue.baseState=r,t.memoizedState=r,t.flags&256){t=Zh(e,t,a,l);break e}else if(a!==u){u=Xt(Error(s(424)),t),pi(u),t=Zh(e,t,a,l);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Ke=Qt(e.firstChild),mt=t,je=!0,In=null,kt=!0,l=Yd(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Rl(),a===u){t=jn(e,t,l);break e}pt(e,t,a,l)}t=t.child}return t;case 26:return fs(e,t),e===null?(l=im(t.type,null,t.pendingProps,null))?t.memoizedState=l:je||(l=t.type,e=t.pendingProps,a=As(re.current).createElement(l),a[ct]=t,a[xt]=e,yt(a,l,e),lt(a),t.stateNode=a):t.memoizedState=im(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return le(t),e===null&&je&&(a=t.stateNode=nm(t.type,t.pendingProps,re.current),mt=t,kt=!0,u=Ke,hl(t.type)?(Hr=u,Ke=Qt(a.firstChild)):Ke=u),pt(e,t,t.pendingProps.children,l),fs(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&je&&((u=a=Ke)&&(a=hv(a,t.type,t.pendingProps,kt),a!==null?(t.stateNode=a,mt=t,Ke=Qt(a.firstChild),kt=!1,u=!0):u=!1),u||Pn(t)),le(t),u=t.type,r=t.pendingProps,y=e!==null?e.memoizedProps:null,a=r.children,Tr(u,r)?a=null:y!==null&&Tr(u,y)&&(t.flags|=32),t.memoizedState!==null&&(u=Ac(e,t,Ax,null,null,l),Gi._currentValue=u),fs(e,t),pt(e,t,a,l),t.child;case 6:return e===null&&je&&((e=l=Ke)&&(l=mv(l,t.pendingProps,kt),l!==null?(t.stateNode=l,mt=t,Ke=null,e=!0):e=!1),e||Pn(t)),null;case 13:return kh(e,t,l);case 4:return ce(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=ql(t,null,a,l):pt(e,t,a,l),t.child;case 11:return Bh(e,t,t.type,t.pendingProps,l);case 7:return pt(e,t,t.pendingProps,l),t.child;case 8:return pt(e,t,t.pendingProps.children,l),t.child;case 12:return pt(e,t,t.pendingProps.children,l),t.child;case 10:return a=t.pendingProps,el(t,t.type,a.value),pt(e,t,a.children,l),t.child;case 9:return u=t.type._context,a=t.pendingProps.children,Ul(t),u=gt(u),a=a(u),t.flags|=1,pt(e,t,a,l),t.child;case 14:return Uh(e,t,t.type,t.pendingProps,l);case 15:return Lh(e,t,t.type,t.pendingProps,l);case 19:return Qh(e,t,l);case 31:return Bx(e,t,l);case 22:return Yh(e,t,l,t.pendingProps);case 24:return Ul(t),a=gt(at),e===null?(u=xc(),u===null&&(u=$e,r=pc(),u.pooledCache=r,r.refCount++,r!==null&&(u.pooledCacheLanes|=l),u=r),t.memoizedState={parent:a,cache:u},bc(t),el(t,at,u)):((e.lanes&l)!==0&&(Sc(e,t),Ni(t,null,null,l),Ei()),u=e.memoizedState,r=t.memoizedState,u.parent!==a?(u={parent:a,cache:a},t.memoizedState=u,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=u),el(t,at,a)):(a=r.cache,el(t,at,a),a!==u.cache&&gc(t,[at],l,!0))),pt(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function Dn(e){e.flags|=4}function nr(e,t,l,a,u){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(u&335544128)===u)if(e.stateNode.complete)e.flags|=8192;else if(S0())e.flags|=8192;else throw Vl=Fo,vc}else e.flags&=-16777217}function Jh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!rm(t))if(S0())e.flags|=8192;else throw Vl=Fo,vc}function hs(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?vo():536870912,e.lanes|=t,Da|=t)}function Ti(e,t){if(!je)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Je(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var u=e.child;u!==null;)l|=u.lanes|u.childLanes,a|=u.subtreeFlags&65011712,a|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)l|=u.lanes|u.childLanes,a|=u.subtreeFlags,a|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function Lx(e,t,l){var a=t.pendingProps;switch(rc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Je(t),null;case 1:return Je(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),An(at),ge(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(va(t)?Dn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,dc())),Je(t),null;case 26:var u=t.type,r=t.memoizedState;return e===null?(Dn(t),r!==null?(Je(t),Jh(t,r)):(Je(t),nr(t,u,null,a,l))):r?r!==e.memoizedState?(Dn(t),Je(t),Jh(t,r)):(Je(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&Dn(t),Je(t),nr(t,u,e,a,l)),null;case 27:if(he(t),l=re.current,u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Dn(t);else{if(!a){if(t.stateNode===null)throw Error(s(166));return Je(t),null}e=ee.current,va(t)?Ad(t):(e=nm(u,a,l),t.stateNode=e,Dn(t))}return Je(t),null;case 5:if(he(t),u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Dn(t);else{if(!a){if(t.stateNode===null)throw Error(s(166));return Je(t),null}if(r=ee.current,va(t))Ad(t);else{var y=As(re.current);switch(r){case 1:r=y.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:r=y.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":r=y.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":r=y.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":r=y.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild);break;case"select":r=typeof a.is=="string"?y.createElement("select",{is:a.is}):y.createElement("select"),a.multiple?r.multiple=!0:a.size&&(r.size=a.size);break;default:r=typeof a.is=="string"?y.createElement(u,{is:a.is}):y.createElement(u)}}r[ct]=t,r[xt]=a;e:for(y=t.child;y!==null;){if(y.tag===5||y.tag===6)r.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===t)break e;for(;y.sibling===null;){if(y.return===null||y.return===t)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}t.stateNode=r;e:switch(yt(r,u,a),u){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Dn(t)}}return Je(t),nr(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Dn(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(s(166));if(e=re.current,va(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,u=mt,u!==null)switch(u.tag){case 27:case 5:a=u.memoizedProps}e[ct]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||k0(e.nodeValue,l)),e||Pn(t,!0)}else e=As(e).createTextNode(a),e[ct]=t,t.stateNode=e}return Je(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=va(t),l!==null){if(e===null){if(!a)throw Error(s(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(557));e[ct]=t}else Rl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Je(t),e=!1}else l=dc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(Rt(t),t):(Rt(t),null);if((t.flags&128)!==0)throw Error(s(558))}return Je(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=va(t),a!==null&&a.dehydrated!==null){if(e===null){if(!u)throw Error(s(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(s(317));u[ct]=t}else Rl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Je(t),u=!1}else u=dc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(Rt(t),t):(Rt(t),null)}return Rt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,u=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(u=a.alternate.memoizedState.cachePool.pool),r=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(r=a.memoizedState.cachePool.pool),r!==u&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),hs(t,t.updateQueue),Je(t),null);case 4:return ge(),e===null&&wr(t.stateNode.containerInfo),Je(t),null;case 10:return An(t.type),Je(t),null;case 19:if(j(tt),a=t.memoizedState,a===null)return Je(t),null;if(u=(t.flags&128)!==0,r=a.rendering,r===null)if(u)Ti(a,!1);else{if(et!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(r=es(e),r!==null){for(t.flags|=128,Ti(a,!1),e=r.updateQueue,t.updateQueue=e,hs(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Nd(l,e),l=l.sibling;return I(tt,tt.current&1|2),je&&Mn(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&ke()>xs&&(t.flags|=128,u=!0,Ti(a,!1),t.lanes=4194304)}else{if(!u)if(e=es(r),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,hs(t,e),Ti(a,!0),a.tail===null&&a.tailMode==="hidden"&&!r.alternate&&!je)return Je(t),null}else 2*ke()-a.renderingStartTime>xs&&l!==536870912&&(t.flags|=128,u=!0,Ti(a,!1),t.lanes=4194304);a.isBackwards?(r.sibling=t.child,t.child=r):(e=a.last,e!==null?e.sibling=r:t.child=r,a.last=r)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=ke(),e.sibling=null,l=tt.current,I(tt,u?l&1|2:l&1),je&&Mn(t,a.treeForkCount),e):(Je(t),null);case 22:case 23:return Rt(t),_c(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(l&536870912)!==0&&(t.flags&128)===0&&(Je(t),t.subtreeFlags&6&&(t.flags|=8192)):Je(t),l=t.updateQueue,l!==null&&hs(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&j(Ll),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),An(at),Je(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function Yx(e,t){switch(rc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return An(at),ge(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return he(t),null;case 31:if(t.memoizedState!==null){if(Rt(t),t.alternate===null)throw Error(s(340));Rl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Rt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));Rl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return j(tt),null;case 4:return ge(),null;case 10:return An(t.type),null;case 22:case 23:return Rt(t),_c(),e!==null&&j(Ll),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return An(at),null;case 25:return null;default:return null}}function Fh(e,t){switch(rc(t),t.tag){case 3:An(at),ge();break;case 26:case 27:case 5:he(t);break;case 4:ge();break;case 31:t.memoizedState!==null&&Rt(t);break;case 13:Rt(t);break;case 19:j(tt);break;case 10:An(t.type);break;case 22:case 23:Rt(t),_c(),e!==null&&j(Ll);break;case 24:An(at)}}function zi(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var u=a.next;l=u;do{if((l.tag&e)===e){a=void 0;var r=l.create,y=l.inst;a=r(),y.destroy=a}l=l.next}while(l!==u)}}catch(S){Ye(t,t.return,S)}}function ol(e,t,l){try{var a=t.updateQueue,u=a!==null?a.lastEffect:null;if(u!==null){var r=u.next;a=r;do{if((a.tag&e)===e){var y=a.inst,S=y.destroy;if(S!==void 0){y.destroy=void 0,u=t;var O=l,K=S;try{K()}catch(ne){Ye(u,O,ne)}}}a=a.next}while(a!==r)}}catch(ne){Ye(t,t.return,ne)}}function Wh(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{qd(t,l)}catch(a){Ye(e,e.return,a)}}}function Ih(e,t,l){l.props=Gl(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){Ye(e,t,a)}}function ji(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(u){Ye(e,t,u)}}function cn(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(u){Ye(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(u){Ye(e,t,u)}else l.current=null}function Ph(e){var t=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(u){Ye(e,e.return,u)}}function lr(e,t,l){try{var a=e.stateNode;sv(a,e.type,l,t),a[xt]=t}catch(u){Ye(e,e.return,u)}}function e0(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&hl(e.type)||e.tag===4}function ar(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||e0(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&&hl(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 ir(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=Nn));else if(a!==4&&(a===27&&hl(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(ir(e,t,l),e=e.sibling;e!==null;)ir(e,t,l),e=e.sibling}function ms(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(a!==4&&(a===27&&hl(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(ms(e,t,l),e=e.sibling;e!==null;)ms(e,t,l),e=e.sibling}function t0(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);yt(t,a,l),t[ct]=e,t[xt]=l}catch(r){Ye(e,e.return,r)}}var On=!1,st=!1,or=!1,n0=typeof WeakSet=="function"?WeakSet:Set,dt=null;function Vx(e,t){if(e=e.containerInfo,Cr=Rs,e=md(e),Pu(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var u=a.anchorOffset,r=a.focusNode;a=a.focusOffset;try{l.nodeType,r.nodeType}catch{l=null;break e}var y=0,S=-1,O=-1,K=0,ne=0,ie=e,F=null;t:for(;;){for(var P;ie!==l||u!==0&&ie.nodeType!==3||(S=y+u),ie!==r||a!==0&&ie.nodeType!==3||(O=y+a),ie.nodeType===3&&(y+=ie.nodeValue.length),(P=ie.firstChild)!==null;)F=ie,ie=P;for(;;){if(ie===e)break t;if(F===l&&++K===u&&(S=y),F===r&&++ne===a&&(O=y),(P=ie.nextSibling)!==null)break;ie=F,F=ie.parentNode}ie=P}l=S===-1||O===-1?null:{start:S,end:O}}else l=null}l=l||{start:0,end:0}}else l=null;for(Ar={focusedElem:e,selectionRange:l},Rs=!1,dt=t;dt!==null;)if(t=dt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,dt=e;else for(;dt!==null;){switch(t=dt,r=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l<e.length;l++)u=e[l],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&r!==null){e=void 0,l=t,u=r.memoizedProps,r=r.memoizedState,a=l.stateNode;try{var ye=Gl(l.type,u);e=a.getSnapshotBeforeUpdate(ye,r),a.__reactInternalSnapshotBeforeUpdate=e}catch(Ee){Ye(l,l.return,Ee)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)jr(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":jr(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(s(163))}if(e=t.sibling,e!==null){e.return=t.return,dt=e;break}dt=t.return}}function l0(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:Rn(e,l),a&4&&zi(5,l);break;case 1:if(Rn(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(y){Ye(l,l.return,y)}else{var u=Gl(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(y){Ye(l,l.return,y)}}a&64&&Wh(l),a&512&&ji(l,l.return);break;case 3:if(Rn(e,l),a&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{qd(e,t)}catch(y){Ye(l,l.return,y)}}break;case 27:t===null&&a&4&&t0(l);case 26:case 5:Rn(e,l),t===null&&a&4&&Ph(l),a&512&&ji(l,l.return);break;case 12:Rn(e,l);break;case 31:Rn(e,l),a&4&&o0(e,l);break;case 13:Rn(e,l),a&4&&s0(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Jx.bind(null,l),gv(e,l))));break;case 22:if(a=l.memoizedState!==null||On,!a){t=t!==null&&t.memoizedState!==null||st,u=On;var r=st;On=a,(st=t)&&!r?Bn(e,l,(l.subtreeFlags&8772)!==0):Rn(e,l),On=u,st=r}break;case 30:break;default:Rn(e,l)}}function a0(e){var t=e.alternate;t!==null&&(e.alternate=null,a0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&li(t)),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 Fe=null,Mt=!1;function Hn(e,t,l){for(l=l.child;l!==null;)i0(e,t,l),l=l.sibling}function i0(e,t,l){if(bt&&typeof bt.onCommitFiberUnmount=="function")try{bt.onCommitFiberUnmount(wl,l)}catch{}switch(l.tag){case 26:st||cn(l,t),Hn(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:st||cn(l,t);var a=Fe,u=Mt;hl(l.type)&&(Fe=l.stateNode,Mt=!1),Hn(e,t,l),Vi(l.stateNode),Fe=a,Mt=u;break;case 5:st||cn(l,t);case 6:if(a=Fe,u=Mt,Fe=null,Hn(e,t,l),Fe=a,Mt=u,Fe!==null)if(Mt)try{(Fe.nodeType===9?Fe.body:Fe.nodeName==="HTML"?Fe.ownerDocument.body:Fe).removeChild(l.stateNode)}catch(r){Ye(l,t,r)}else try{Fe.removeChild(l.stateNode)}catch(r){Ye(l,t,r)}break;case 18:Fe!==null&&(Mt?(e=Fe,W0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),Va(e)):W0(Fe,l.stateNode));break;case 4:a=Fe,u=Mt,Fe=l.stateNode.containerInfo,Mt=!0,Hn(e,t,l),Fe=a,Mt=u;break;case 0:case 11:case 14:case 15:ol(2,l,t),st||ol(4,l,t),Hn(e,t,l);break;case 1:st||(cn(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&Ih(l,t,a)),Hn(e,t,l);break;case 21:Hn(e,t,l);break;case 22:st=(a=st)||l.memoizedState!==null,Hn(e,t,l),st=a;break;default:Hn(e,t,l)}}function o0(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Va(e)}catch(l){Ye(t,t.return,l)}}}function s0(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Va(e)}catch(l){Ye(t,t.return,l)}}function qx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new n0),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new n0),t;default:throw Error(s(435,e.tag))}}function gs(e,t){var l=qx(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var u=Fx.bind(null,e,a);a.then(u,u)}})}function Ct(e,t){var l=t.deletions;if(l!==null)for(var a=0;a<l.length;a++){var u=l[a],r=e,y=t,S=y;e:for(;S!==null;){switch(S.tag){case 27:if(hl(S.type)){Fe=S.stateNode,Mt=!1;break e}break;case 5:Fe=S.stateNode,Mt=!1;break e;case 3:case 4:Fe=S.stateNode.containerInfo,Mt=!0;break e}S=S.return}if(Fe===null)throw Error(s(160));i0(r,y,u),Fe=null,Mt=!1,r=u.alternate,r!==null&&(r.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)u0(t,e),t=t.sibling}var Wt=null;function u0(e,t){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ct(t,e),At(e),a&4&&(ol(3,e,e.return),zi(3,e),ol(5,e,e.return));break;case 1:Ct(t,e),At(e),a&512&&(st||l===null||cn(l,l.return)),a&64&&On&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?a:l.concat(a))));break;case 26:var u=Wt;if(Ct(t,e),At(e),a&512&&(st||l===null||cn(l,l.return)),a&4){var r=l!==null?l.memoizedState:null;if(a=e.memoizedState,l===null)if(a===null)if(e.stateNode===null){e:{a=e.type,l=e.memoizedProps,u=u.ownerDocument||u;t:switch(a){case"title":r=u.getElementsByTagName("title")[0],(!r||r[Cl]||r[ct]||r.namespaceURI==="http://www.w3.org/2000/svg"||r.hasAttribute("itemprop"))&&(r=u.createElement(a),u.head.insertBefore(r,u.querySelector("head > title"))),yt(r,a,l),r[ct]=e,lt(r),a=r;break e;case"link":var y=um("link","href",u).get(a+(l.href||""));if(y){for(var S=0;S<y.length;S++)if(r=y[S],r.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&r.getAttribute("rel")===(l.rel==null?null:l.rel)&&r.getAttribute("title")===(l.title==null?null:l.title)&&r.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){y.splice(S,1);break t}}r=u.createElement(a),yt(r,a,l),u.head.appendChild(r);break;case"meta":if(y=um("meta","content",u).get(a+(l.content||""))){for(S=0;S<y.length;S++)if(r=y[S],r.getAttribute("content")===(l.content==null?null:""+l.content)&&r.getAttribute("name")===(l.name==null?null:l.name)&&r.getAttribute("property")===(l.property==null?null:l.property)&&r.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&r.getAttribute("charset")===(l.charSet==null?null:l.charSet)){y.splice(S,1);break t}}r=u.createElement(a),yt(r,a,l),u.head.appendChild(r);break;default:throw Error(s(468,a))}r[ct]=e,lt(r),a=r}e.stateNode=a}else cm(u,e.type,e.stateNode);else e.stateNode=sm(u,a,e.memoizedProps);else r!==a?(r===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):r.count--,a===null?cm(u,e.type,e.stateNode):sm(u,a,e.memoizedProps)):a===null&&e.stateNode!==null&&lr(e,e.memoizedProps,l.memoizedProps)}break;case 27:Ct(t,e),At(e),a&512&&(st||l===null||cn(l,l.return)),l!==null&&a&4&&lr(e,e.memoizedProps,l.memoizedProps);break;case 5:if(Ct(t,e),At(e),a&512&&(st||l===null||cn(l,l.return)),e.flags&32){u=e.stateNode;try{ca(u,"")}catch(ye){Ye(e,e.return,ye)}}a&4&&e.stateNode!=null&&(u=e.memoizedProps,lr(e,u,l!==null?l.memoizedProps:u)),a&1024&&(or=!0);break;case 6:if(Ct(t,e),At(e),a&4){if(e.stateNode===null)throw Error(s(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(ye){Ye(e,e.return,ye)}}break;case 3:if(js=null,u=Wt,Wt=Ts(t.containerInfo),Ct(t,e),Wt=u,At(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{Va(t.containerInfo)}catch(ye){Ye(e,e.return,ye)}or&&(or=!1,c0(e));break;case 4:a=Wt,Wt=Ts(e.stateNode.containerInfo),Ct(t,e),At(e),Wt=a;break;case 12:Ct(t,e),At(e);break;case 31:Ct(t,e),At(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,gs(e,a)));break;case 13:Ct(t,e),At(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(ys=ke()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,gs(e,a)));break;case 22:u=e.memoizedState!==null;var O=l!==null&&l.memoizedState!==null,K=On,ne=st;if(On=K||u,st=ne||O,Ct(t,e),st=ne,On=K,At(e),a&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(l===null||O||On||st||Zl(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){O=l=t;try{if(r=O.stateNode,u)y=r.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{S=O.stateNode;var ie=O.memoizedProps.style,F=ie!=null&&ie.hasOwnProperty("display")?ie.display:null;S.style.display=F==null||typeof F=="boolean"?"":(""+F).trim()}}catch(ye){Ye(O,O.return,ye)}}}else if(t.tag===6){if(l===null){O=t;try{O.stateNode.nodeValue=u?"":O.memoizedProps}catch(ye){Ye(O,O.return,ye)}}}else if(t.tag===18){if(l===null){O=t;try{var P=O.stateNode;u?I0(P,!0):I0(O.stateNode,!1)}catch(ye){Ye(O,O.return,ye)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(l=a.retryQueue,l!==null&&(a.retryQueue=null,gs(e,l))));break;case 19:Ct(t,e),At(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,gs(e,a)));break;case 30:break;case 21:break;default:Ct(t,e),At(e)}}function At(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(e0(a)){l=a;break}a=a.return}if(l==null)throw Error(s(160));switch(l.tag){case 27:var u=l.stateNode,r=ar(e);ms(e,r,u);break;case 5:var y=l.stateNode;l.flags&32&&(ca(y,""),l.flags&=-33);var S=ar(e);ms(e,S,y);break;case 3:case 4:var O=l.stateNode.containerInfo,K=ar(e);ir(e,K,O);break;default:throw Error(s(161))}}catch(ne){Ye(e,e.return,ne)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function c0(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;c0(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Rn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)l0(e,t.alternate,t),t=t.sibling}function Zl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:ol(4,t,t.return),Zl(t);break;case 1:cn(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&Ih(t,t.return,l),Zl(t);break;case 27:Vi(t.stateNode);case 26:case 5:cn(t,t.return),Zl(t);break;case 22:t.memoizedState===null&&Zl(t);break;case 30:Zl(t);break;default:Zl(t)}e=e.sibling}}function Bn(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,u=e,r=t,y=r.flags;switch(r.tag){case 0:case 11:case 15:Bn(u,r,l),zi(4,r);break;case 1:if(Bn(u,r,l),a=r,u=a.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(K){Ye(a,a.return,K)}if(a=r,u=a.updateQueue,u!==null){var S=a.stateNode;try{var O=u.shared.hiddenCallbacks;if(O!==null)for(u.shared.hiddenCallbacks=null,u=0;u<O.length;u++)Vd(O[u],S)}catch(K){Ye(a,a.return,K)}}l&&y&64&&Wh(r),ji(r,r.return);break;case 27:t0(r);case 26:case 5:Bn(u,r,l),l&&a===null&&y&4&&Ph(r),ji(r,r.return);break;case 12:Bn(u,r,l);break;case 31:Bn(u,r,l),l&&y&4&&o0(u,r);break;case 13:Bn(u,r,l),l&&y&4&&s0(u,r);break;case 22:r.memoizedState===null&&Bn(u,r,l),ji(r,r.return);break;case 30:break;default:Bn(u,r,l)}t=t.sibling}}function sr(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&yi(l))}function ur(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&yi(e))}function It(e,t,l,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)r0(e,t,l,a),t=t.sibling}function r0(e,t,l,a){var u=t.flags;switch(t.tag){case 0:case 11:case 15:It(e,t,l,a),u&2048&&zi(9,t);break;case 1:It(e,t,l,a);break;case 3:It(e,t,l,a),u&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&yi(e)));break;case 12:if(u&2048){It(e,t,l,a),e=t.stateNode;try{var r=t.memoizedProps,y=r.id,S=r.onPostCommit;typeof S=="function"&&S(y,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(O){Ye(t,t.return,O)}}else It(e,t,l,a);break;case 31:It(e,t,l,a);break;case 13:It(e,t,l,a);break;case 23:break;case 22:r=t.stateNode,y=t.alternate,t.memoizedState!==null?r._visibility&2?It(e,t,l,a):Di(e,t):r._visibility&2?It(e,t,l,a):(r._visibility|=2,Ta(e,t,l,a,(t.subtreeFlags&10256)!==0||!1)),u&2048&&sr(y,t);break;case 24:It(e,t,l,a),u&2048&&ur(t.alternate,t);break;default:It(e,t,l,a)}}function Ta(e,t,l,a,u){for(u=u&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var r=e,y=t,S=l,O=a,K=y.flags;switch(y.tag){case 0:case 11:case 15:Ta(r,y,S,O,u),zi(8,y);break;case 23:break;case 22:var ne=y.stateNode;y.memoizedState!==null?ne._visibility&2?Ta(r,y,S,O,u):Di(r,y):(ne._visibility|=2,Ta(r,y,S,O,u)),u&&K&2048&&sr(y.alternate,y);break;case 24:Ta(r,y,S,O,u),u&&K&2048&&ur(y.alternate,y);break;default:Ta(r,y,S,O,u)}t=t.sibling}}function Di(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,u=a.flags;switch(a.tag){case 22:Di(l,a),u&2048&&sr(a.alternate,a);break;case 24:Di(l,a),u&2048&&ur(a.alternate,a);break;default:Di(l,a)}t=t.sibling}}var Oi=8192;function za(e,t,l){if(e.subtreeFlags&Oi)for(e=e.child;e!==null;)f0(e,t,l),e=e.sibling}function f0(e,t,l){switch(e.tag){case 26:za(e,t,l),e.flags&Oi&&e.memoizedState!==null&&Cv(l,Wt,e.memoizedState,e.memoizedProps);break;case 5:za(e,t,l);break;case 3:case 4:var a=Wt;Wt=Ts(e.stateNode.containerInfo),za(e,t,l),Wt=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Oi,Oi=16777216,za(e,t,l),Oi=a):za(e,t,l));break;default:za(e,t,l)}}function d0(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Hi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];dt=a,m0(a,e)}d0(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)h0(e),e=e.sibling}function h0(e){switch(e.tag){case 0:case 11:case 15:Hi(e),e.flags&2048&&ol(9,e,e.return);break;case 3:Hi(e);break;case 12:Hi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ps(e)):Hi(e);break;default:Hi(e)}}function ps(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];dt=a,m0(a,e)}d0(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ol(8,t,t.return),ps(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,ps(t));break;default:ps(t)}e=e.sibling}}function m0(e,t){for(;dt!==null;){var l=dt;switch(l.tag){case 0:case 11:case 15:ol(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var a=l.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:yi(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,dt=a;else e:for(l=e;dt!==null;){a=dt;var u=a.sibling,r=a.return;if(a0(a),a===l){dt=null;break e}if(u!==null){u.return=r,dt=u;break e}dt=r}}}var Xx={getCacheForType:function(e){var t=gt(at),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return gt(at).controller.signal}},Gx=typeof WeakMap=="function"?WeakMap:Map,Re=0,$e=null,Ce=null,Te=0,Le=0,Bt=null,sl=!1,ja=!1,cr=!1,Un=0,et=0,ul=0,kl=0,rr=0,Ut=0,Da=0,Ri=null,Tt=null,fr=!1,ys=0,g0=0,xs=1/0,vs=null,cl=null,rt=0,rl=null,Oa=null,Ln=0,dr=0,hr=null,p0=null,Bi=0,mr=null;function Lt(){return(Re&2)!==0&&Te!==0?Te&-Te:M.T!==null?br():No()}function y0(){if(Ut===0)if((Te&536870912)===0||je){var e=na;na<<=1,(na&3932160)===0&&(na=262144),Ut=e}else Ut=536870912;return e=Ht.current,e!==null&&(e.flags|=32),Ut}function zt(e,t,l){(e===$e&&(Le===2||Le===9)||e.cancelPendingCommit!==null)&&(Ha(e,0),fl(e,Te,Ut,!1)),Ml(e,l),((Re&2)===0||e!==$e)&&(e===$e&&((Re&2)===0&&(kl|=l),et===4&&fl(e,Te,Ut,!1)),rn(e))}function x0(e,t,l){if((Re&6)!==0)throw Error(s(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||_l(e,t),u=a?$x(e,t):pr(e,t,!0),r=a;do{if(u===0){ja&&!a&&fl(e,t,0,!1);break}else{if(l=e.current.alternate,r&&!Zx(l)){u=pr(e,t,!1),r=!1;continue}if(u===2){if(r=t,e.errorRecoveryDisabledLanes&r)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){t=y;e:{var S=e;u=Ri;var O=S.current.memoizedState.isDehydrated;if(O&&(Ha(S,y).flags|=256),y=pr(S,y,!1),y!==2){if(cr&&!O){S.errorRecoveryDisabledLanes|=r,kl|=r,u=4;break e}r=Tt,Tt=u,r!==null&&(Tt===null?Tt=r:Tt.push.apply(Tt,r))}u=y}if(r=!1,u!==2)continue}}if(u===1){Ha(e,0),fl(e,t,0,!0);break}e:{switch(a=e,r=u,r){case 0:case 1:throw Error(s(345));case 4:if((t&4194048)!==t)break;case 6:fl(a,t,Ut,!sl);break e;case 2:Tt=null;break;case 3:case 5:break;default:throw Error(s(329))}if((t&62914560)===t&&(u=ys+300-ke(),10<u)){if(fl(a,t,Ut,!sl),aa(a,0,!0)!==0)break e;Ln=t,a.timeoutHandle=J0(v0.bind(null,a,l,Tt,vs,fr,t,Ut,kl,Da,sl,r,"Throttled",-0,0),u);break e}v0(a,l,Tt,vs,fr,t,Ut,kl,Da,sl,r,null,-0,0)}}break}while(!0);rn(e)}function v0(e,t,l,a,u,r,y,S,O,K,ne,ie,F,P){if(e.timeoutHandle=-1,ie=t.subtreeFlags,ie&8192||(ie&16785408)===16785408){ie={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Nn},f0(t,r,ie);var ye=(r&62914560)===r?ys-ke():(r&4194048)===r?g0-ke():0;if(ye=Av(ie,ye),ye!==null){Ln=r,e.cancelPendingCommit=ye(C0.bind(null,e,t,r,l,a,u,y,S,O,ne,ie,null,F,P)),fl(e,r,y,!K);return}}C0(e,t,r,l,a,u,y,S,O)}function Zx(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var u=l[a],r=u.getSnapshot;u=u.value;try{if(!Dt(r(),u))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function fl(e,t,l,a){t&=~rr,t&=~kl,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var u=t;0<u;){var r=31-St(u),y=1<<r;a[r]=-1,u&=~y}l!==0&&bo(e,l,t)}function bs(){return(Re&6)===0?(Ui(0),!1):!0}function gr(){if(Ce!==null){if(Le===0)var e=Ce.return;else e=Ce,Cn=Bl=null,jc(e),wa=null,vi=0,e=Ce;for(;e!==null;)Fh(e.alternate,e),e=e.return;Ce=null}}function Ha(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,rv(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),Ln=0,gr(),$e=e,Ce=l=_n(e.current,null),Te=t,Le=0,Bt=null,sl=!1,ja=_l(e,t),cr=!1,Da=Ut=rr=kl=ul=et=0,Tt=Ri=null,fr=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var u=31-St(a),r=1<<u;t|=e[u],a&=~r}return Un=t,qo(),l}function b0(e,t){we=null,M.H=Ci,t===Na||t===Jo?(t=Bd(),Le=3):t===vc?(t=Bd(),Le=4):Le=t===Qc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Bt=t,Ce===null&&(et=1,cs(e,Xt(t,e.current)))}function S0(){var e=Ht.current;return e===null?!0:(Te&4194048)===Te?$t===null:(Te&62914560)===Te||(Te&536870912)!==0?e===$t:!1}function E0(){var e=M.H;return M.H=Ci,e===null?Ci:e}function N0(){var e=M.A;return M.A=Xx,e}function Ss(){et=4,sl||(Te&4194048)!==Te&&Ht.current!==null||(ja=!0),(ul&134217727)===0&&(kl&134217727)===0||$e===null||fl($e,Te,Ut,!1)}function pr(e,t,l){var a=Re;Re|=2;var u=E0(),r=N0();($e!==e||Te!==t)&&(vs=null,Ha(e,t)),t=!1;var y=et;e:do try{if(Le!==0&&Ce!==null){var S=Ce,O=Bt;switch(Le){case 8:gr(),y=6;break e;case 3:case 2:case 9:case 6:Ht.current===null&&(t=!0);var K=Le;if(Le=0,Bt=null,Ra(e,S,O,K),l&&ja){y=0;break e}break;default:K=Le,Le=0,Bt=null,Ra(e,S,O,K)}}kx(),y=et;break}catch(ne){b0(e,ne)}while(!0);return t&&e.shellSuspendCounter++,Cn=Bl=null,Re=a,M.H=u,M.A=r,Ce===null&&($e=null,Te=0,qo()),y}function kx(){for(;Ce!==null;)w0(Ce)}function $x(e,t){var l=Re;Re|=2;var a=E0(),u=N0();$e!==e||Te!==t?(vs=null,xs=ke()+500,Ha(e,t)):ja=_l(e,t);e:do try{if(Le!==0&&Ce!==null){t=Ce;var r=Bt;t:switch(Le){case 1:Le=0,Bt=null,Ra(e,t,r,1);break;case 2:case 9:if(Hd(r)){Le=0,Bt=null,_0(t);break}t=function(){Le!==2&&Le!==9||$e!==e||(Le=7),rn(e)},r.then(t,t);break e;case 3:Le=7;break e;case 4:Le=5;break e;case 7:Hd(r)?(Le=0,Bt=null,_0(t)):(Le=0,Bt=null,Ra(e,t,r,7));break;case 5:var y=null;switch(Ce.tag){case 26:y=Ce.memoizedState;case 5:case 27:var S=Ce;if(y?rm(y):S.stateNode.complete){Le=0,Bt=null;var O=S.sibling;if(O!==null)Ce=O;else{var K=S.return;K!==null?(Ce=K,Es(K)):Ce=null}break t}}Le=0,Bt=null,Ra(e,t,r,5);break;case 6:Le=0,Bt=null,Ra(e,t,r,6);break;case 8:gr(),et=6;break e;default:throw Error(s(462))}}Qx();break}catch(ne){b0(e,ne)}while(!0);return Cn=Bl=null,M.H=a,M.A=u,Re=l,Ce!==null?0:($e=null,Te=0,qo(),et)}function Qx(){for(;Ce!==null&&!qe();)w0(Ce)}function w0(e){var t=Kh(e.alternate,e,Un);e.memoizedProps=e.pendingProps,t===null?Es(e):Ce=t}function _0(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=Xh(l,t,t.pendingProps,t.type,void 0,Te);break;case 11:t=Xh(l,t,t.pendingProps,t.type.render,t.ref,Te);break;case 5:jc(t);default:Fh(l,t),t=Ce=Nd(t,Un),t=Kh(l,t,Un)}e.memoizedProps=e.pendingProps,t===null?Es(e):Ce=t}function Ra(e,t,l,a){Cn=Bl=null,jc(t),wa=null,vi=0;var u=t.return;try{if(Rx(e,u,t,l,Te)){et=1,cs(e,Xt(l,e.current)),Ce=null;return}}catch(r){if(u!==null)throw Ce=u,r;et=1,cs(e,Xt(l,e.current)),Ce=null;return}t.flags&32768?(je||a===1?e=!0:ja||(Te&536870912)!==0?e=!1:(sl=e=!0,(a===2||a===9||a===3||a===6)&&(a=Ht.current,a!==null&&a.tag===13&&(a.flags|=16384))),M0(t,e)):Es(t)}function Es(e){var t=e;do{if((t.flags&32768)!==0){M0(t,sl);return}e=t.return;var l=Lx(t.alternate,t,Un);if(l!==null){Ce=l;return}if(t=t.sibling,t!==null){Ce=t;return}Ce=t=e}while(t!==null);et===0&&(et=5)}function M0(e,t){do{var l=Yx(e.alternate,e);if(l!==null){l.flags&=32767,Ce=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){Ce=e;return}Ce=e=l}while(e!==null);et=6,Ce=null}function C0(e,t,l,a,u,r,y,S,O){e.cancelPendingCommit=null;do Ns();while(rt!==0);if((Re&6)!==0)throw Error(s(327));if(t!==null){if(t===e.current)throw Error(s(177));if(r=t.lanes|t.childLanes,r|=ac,Hu(e,l,r,y,S,O),e===$e&&(Ce=$e=null,Te=0),Oa=t,rl=e,Ln=l,dr=r,hr=u,p0=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Wx(Nl,function(){return D0(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=M.T,M.T=null,u=H.p,H.p=2,y=Re,Re|=4;try{Vx(e,t,l)}finally{Re=y,H.p=u,M.T=a}}rt=1,A0(),T0(),z0()}}function A0(){if(rt===1){rt=0;var e=rl,t=Oa,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=M.T,M.T=null;var a=H.p;H.p=2;var u=Re;Re|=4;try{u0(t,e);var r=Ar,y=md(e.containerInfo),S=r.focusedElem,O=r.selectionRange;if(y!==S&&S&&S.ownerDocument&&hd(S.ownerDocument.documentElement,S)){if(O!==null&&Pu(S)){var K=O.start,ne=O.end;if(ne===void 0&&(ne=K),"selectionStart"in S)S.selectionStart=K,S.selectionEnd=Math.min(ne,S.value.length);else{var ie=S.ownerDocument||document,F=ie&&ie.defaultView||window;if(F.getSelection){var P=F.getSelection(),ye=S.textContent.length,Ee=Math.min(O.start,ye),Ze=O.end===void 0?Ee:Math.min(O.end,ye);!P.extend&&Ee>Ze&&(y=Ze,Ze=Ee,Ee=y);var X=dd(S,Ee),U=dd(S,Ze);if(X&&U&&(P.rangeCount!==1||P.anchorNode!==X.node||P.anchorOffset!==X.offset||P.focusNode!==U.node||P.focusOffset!==U.offset)){var Q=ie.createRange();Q.setStart(X.node,X.offset),P.removeAllRanges(),Ee>Ze?(P.addRange(Q),P.extend(U.node,U.offset)):(Q.setEnd(U.node,U.offset),P.addRange(Q))}}}}for(ie=[],P=S;P=P.parentNode;)P.nodeType===1&&ie.push({element:P,left:P.scrollLeft,top:P.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<ie.length;S++){var ae=ie[S];ae.element.scrollLeft=ae.left,ae.element.scrollTop=ae.top}}Rs=!!Cr,Ar=Cr=null}finally{Re=u,H.p=a,M.T=l}}e.current=t,rt=2}}function T0(){if(rt===2){rt=0;var e=rl,t=Oa,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=M.T,M.T=null;var a=H.p;H.p=2;var u=Re;Re|=4;try{l0(e,t.alternate,t)}finally{Re=u,H.p=a,M.T=l}}rt=3}}function z0(){if(rt===4||rt===3){rt=0,ht();var e=rl,t=Oa,l=Ln,a=p0;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?rt=5:(rt=0,Oa=rl=null,j0(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(cl=null),ni(l),t=t.stateNode,bt&&typeof bt.onCommitFiberRoot=="function")try{bt.onCommitFiberRoot(wl,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=M.T,u=H.p,H.p=2,M.T=null;try{for(var r=e.onRecoverableError,y=0;y<a.length;y++){var S=a[y];r(S.value,{componentStack:S.stack})}}finally{M.T=t,H.p=u}}(Ln&3)!==0&&Ns(),rn(e),u=e.pendingLanes,(l&261930)!==0&&(u&42)!==0?e===mr?Bi++:(Bi=0,mr=e):Bi=0,Ui(0)}}function j0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,yi(t)))}function Ns(){return A0(),T0(),z0(),D0()}function D0(){if(rt!==5)return!1;var e=rl,t=dr;dr=0;var l=ni(Ln),a=M.T,u=H.p;try{H.p=32>l?32:l,M.T=null,l=hr,hr=null;var r=rl,y=Ln;if(rt=0,Oa=rl=null,Ln=0,(Re&6)!==0)throw Error(s(331));var S=Re;if(Re|=4,h0(r.current),r0(r,r.current,y,l),Re=S,Ui(0,!1),bt&&typeof bt.onPostCommitFiberRoot=="function")try{bt.onPostCommitFiberRoot(wl,r)}catch{}return!0}finally{H.p=u,M.T=a,j0(e,t)}}function O0(e,t,l){t=Xt(l,t),t=$c(e.stateNode,t,2),e=ll(e,t,2),e!==null&&(Ml(e,2),rn(e))}function Ye(e,t,l){if(e.tag===3)O0(e,e,l);else for(;t!==null;){if(t.tag===3){O0(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(cl===null||!cl.has(a))){e=Xt(l,e),l=Hh(2),a=ll(t,l,2),a!==null&&(Rh(l,a,t,e),Ml(a,2),rn(a));break}}t=t.return}}function yr(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new Gx;var u=new Set;a.set(t,u)}else u=a.get(t),u===void 0&&(u=new Set,a.set(t,u));u.has(l)||(cr=!0,u.add(l),e=Kx.bind(null,e,t,l),t.then(e,e))}function Kx(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,$e===e&&(Te&l)===l&&(et===4||et===3&&(Te&62914560)===Te&&300>ke()-ys?(Re&2)===0&&Ha(e,0):rr|=l,Da===Te&&(Da=0)),rn(e)}function H0(e,t){t===0&&(t=vo()),e=Ol(e,t),e!==null&&(Ml(e,t),rn(e))}function Jx(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),H0(e,l)}function Fx(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,u=e.memoizedState;u!==null&&(l=u.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(s(314))}a!==null&&a.delete(t),H0(e,l)}function Wx(e,t){return Qe(e,t)}var ws=null,Ba=null,xr=!1,_s=!1,vr=!1,dl=0;function rn(e){e!==Ba&&e.next===null&&(Ba===null?ws=Ba=e:Ba=Ba.next=e),_s=!0,xr||(xr=!0,Px())}function Ui(e,t){if(!vr&&_s){vr=!0;do for(var l=!1,a=ws;a!==null;){if(e!==0){var u=a.pendingLanes;if(u===0)var r=0;else{var y=a.suspendedLanes,S=a.pingedLanes;r=(1<<31-St(42|e)+1)-1,r&=u&~(y&~S),r=r&201326741?r&201326741|1:r?r|2:0}r!==0&&(l=!0,L0(a,r))}else r=Te,r=aa(a,a===$e?r:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(r&3)===0||_l(a,r)||(l=!0,L0(a,r));a=a.next}while(l);vr=!1}}function Ix(){R0()}function R0(){_s=xr=!1;var e=0;dl!==0&&cv()&&(e=dl);for(var t=ke(),l=null,a=ws;a!==null;){var u=a.next,r=B0(a,t);r===0?(a.next=null,l===null?ws=u:l.next=u,u===null&&(Ba=l)):(l=a,(e!==0||(r&3)!==0)&&(_s=!0)),a=u}rt!==0&&rt!==5||Ui(e),dl!==0&&(dl=0)}function B0(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,u=e.expirationTimes,r=e.pendingLanes&-62914561;0<r;){var y=31-St(r),S=1<<y,O=u[y];O===-1?((S&l)===0||(S&a)!==0)&&(u[y]=Ou(S,t)):O<=t&&(e.expiredLanes|=S),r&=~S}if(t=$e,l=Te,l=aa(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(Le===2||Le===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Ve(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||_l(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&Ve(a),ni(l)){case 2:case 8:l=Zn;break;case 32:l=Nl;break;case 268435456:l=ea;break;default:l=Nl}return a=U0.bind(null,e),l=Qe(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&Ve(a),e.callbackPriority=2,e.callbackNode=null,2}function U0(e,t){if(rt!==0&&rt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(Ns()&&e.callbackNode!==l)return null;var a=Te;return a=aa(e,e===$e?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(x0(e,a,t),B0(e,ke()),e.callbackNode!=null&&e.callbackNode===l?U0.bind(null,e):null)}function L0(e,t){if(Ns())return null;x0(e,t,!0)}function Px(){fv(function(){(Re&6)!==0?Qe(xn,Ix):R0()})}function br(){if(dl===0){var e=Sa;e===0&&(e=ta,ta<<=1,(ta&261888)===0&&(ta=256)),dl=e}return dl}function Y0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Oo(""+e)}function V0(e,t){var l=t.ownerDocument.createElement("input");return l.name=t.name,l.value=t.value,e.id&&l.setAttribute("form",e.id),t.parentNode.insertBefore(l,t),e=new FormData(e),l.parentNode.removeChild(l),e}function ev(e,t,l,a,u){if(t==="submit"&&l&&l.stateNode===u){var r=Y0((u[xt]||null).action),y=a.submitter;y&&(t=(t=y[xt]||null)?Y0(t.formAction):y.getAttribute("formAction"),t!==null&&(r=t,y=null));var S=new Uo("action","action",null,a,u);e.push({event:S,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(dl!==0){var O=y?V0(u,y):new FormData(u);Vc(l,{pending:!0,data:O,method:u.method,action:r},null,O)}}else typeof r=="function"&&(S.preventDefault(),O=y?V0(u,y):new FormData(u),Vc(l,{pending:!0,data:O,method:u.method,action:r},r,O))},currentTarget:u}]})}}for(var Sr=0;Sr<lc.length;Sr++){var Er=lc[Sr],tv=Er.toLowerCase(),nv=Er[0].toUpperCase()+Er.slice(1);Ft(tv,"on"+nv)}Ft(yd,"onAnimationEnd"),Ft(xd,"onAnimationIteration"),Ft(vd,"onAnimationStart"),Ft("dblclick","onDoubleClick"),Ft("focusin","onFocus"),Ft("focusout","onBlur"),Ft(xx,"onTransitionRun"),Ft(vx,"onTransitionStart"),Ft(bx,"onTransitionCancel"),Ft(bd,"onTransitionEnd"),Jn("onMouseEnter",["mouseout","mouseover"]),Jn("onMouseLeave",["mouseout","mouseover"]),Jn("onPointerEnter",["pointerout","pointerover"]),Jn("onPointerLeave",["pointerout","pointerover"]),Sn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Sn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Sn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Sn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Sn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Sn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Li="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(" "),lv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Li));function q0(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],u=a.event;a=a.listeners;e:{var r=void 0;if(t)for(var y=a.length-1;0<=y;y--){var S=a[y],O=S.instance,K=S.currentTarget;if(S=S.listener,O!==r&&u.isPropagationStopped())break e;r=S,u.currentTarget=K;try{r(u)}catch(ne){Vo(ne)}u.currentTarget=null,r=O}else for(y=0;y<a.length;y++){if(S=a[y],O=S.instance,K=S.currentTarget,S=S.listener,O!==r&&u.isPropagationStopped())break e;r=S,u.currentTarget=K;try{r(u)}catch(ne){Vo(ne)}u.currentTarget=null,r=O}}}}function Ae(e,t){var l=t[ia];l===void 0&&(l=t[ia]=new Set);var a=e+"__bubble";l.has(a)||(X0(t,e,2,!1),l.add(a))}function Nr(e,t,l){var a=0;t&&(a|=4),X0(l,e,a,t)}var Ms="_reactListening"+Math.random().toString(36).slice(2);function wr(e){if(!e[Ms]){e[Ms]=!0,Co.forEach(function(l){l!=="selectionchange"&&(lv.has(l)||Nr(l,!1,e),Nr(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ms]||(t[Ms]=!0,Nr("selectionchange",!1,t))}}function X0(e,t,l,a){switch(ym(t)){case 2:var u=jv;break;case 8:u=Dv;break;default:u=Yr}l=u.bind(null,t,l,e),u=void 0,!Zu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),a?u!==void 0?e.addEventListener(t,l,{capture:!0,passive:u}):e.addEventListener(t,l,!0):u!==void 0?e.addEventListener(t,l,{passive:u}):e.addEventListener(t,l,!1)}function _r(e,t,l,a,u){var r=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var y=a.tag;if(y===3||y===4){var S=a.stateNode.containerInfo;if(S===u)break;if(y===4)for(y=a.return;y!==null;){var O=y.tag;if((O===3||O===4)&&y.stateNode.containerInfo===u)return;y=y.return}for(;S!==null;){if(y=kn(S),y===null)return;if(O=y.tag,O===5||O===6||O===26||O===27){a=r=y;continue e}S=S.parentNode}}a=a.return}Qf(function(){var K=r,ne=Xu(l),ie=[];e:{var F=Sd.get(e);if(F!==void 0){var P=Uo,ye=e;switch(e){case"keypress":if(Ro(l)===0)break e;case"keydown":case"keyup":P=Fy;break;case"focusin":ye="focus",P=Ku;break;case"focusout":ye="blur",P=Ku;break;case"beforeblur":case"afterblur":P=Ku;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":P=Ff;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":P=Ly;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":P=Py;break;case yd:case xd:case vd:P=qy;break;case bd:P=tx;break;case"scroll":case"scrollend":P=By;break;case"wheel":P=lx;break;case"copy":case"cut":case"paste":P=Gy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":P=If;break;case"toggle":case"beforetoggle":P=ix}var Ee=(t&4)!==0,Ze=!Ee&&(e==="scroll"||e==="scrollend"),X=Ee?F!==null?F+"Capture":null:F;Ee=[];for(var U=K,Q;U!==null;){var ae=U;if(Q=ae.stateNode,ae=ae.tag,ae!==5&&ae!==26&&ae!==27||Q===null||X===null||(ae=oi(U,X),ae!=null&&Ee.push(Yi(U,ae,Q))),Ze)break;U=U.return}0<Ee.length&&(F=new P(F,ye,null,l,ne),ie.push({event:F,listeners:Ee}))}}if((t&7)===0){e:{if(F=e==="mouseover"||e==="pointerover",P=e==="mouseout"||e==="pointerout",F&&l!==qu&&(ye=l.relatedTarget||l.fromElement)&&(kn(ye)||ye[bn]))break e;if((P||F)&&(F=ne.window===ne?ne:(F=ne.ownerDocument)?F.defaultView||F.parentWindow:window,P?(ye=l.relatedTarget||l.toElement,P=K,ye=ye?kn(ye):null,ye!==null&&(Ze=f(ye),Ee=ye.tag,ye!==Ze||Ee!==5&&Ee!==27&&Ee!==6)&&(ye=null)):(P=null,ye=K),P!==ye)){if(Ee=Ff,ae="onMouseLeave",X="onMouseEnter",U="mouse",(e==="pointerout"||e==="pointerover")&&(Ee=If,ae="onPointerLeave",X="onPointerEnter",U="pointer"),Ze=P==null?F:Qn(P),Q=ye==null?F:Qn(ye),F=new Ee(ae,U+"leave",P,l,ne),F.target=Ze,F.relatedTarget=Q,ae=null,kn(ne)===K&&(Ee=new Ee(X,U+"enter",ye,l,ne),Ee.target=Q,Ee.relatedTarget=Ze,ae=Ee),Ze=ae,P&&ye)t:{for(Ee=av,X=P,U=ye,Q=0,ae=X;ae;ae=Ee(ae))Q++;ae=0;for(var be=U;be;be=Ee(be))ae++;for(;0<Q-ae;)X=Ee(X),Q--;for(;0<ae-Q;)U=Ee(U),ae--;for(;Q--;){if(X===U||U!==null&&X===U.alternate){Ee=X;break t}X=Ee(X),U=Ee(U)}Ee=null}else Ee=null;P!==null&&G0(ie,F,P,Ee,!1),ye!==null&&Ze!==null&&G0(ie,Ze,ye,Ee,!0)}}e:{if(F=K?Qn(K):window,P=F.nodeName&&F.nodeName.toLowerCase(),P==="select"||P==="input"&&F.type==="file")var Oe=od;else if(ad(F))if(sd)Oe=gx;else{Oe=hx;var ve=dx}else P=F.nodeName,!P||P.toLowerCase()!=="input"||F.type!=="checkbox"&&F.type!=="radio"?K&&Vu(K.elementType)&&(Oe=od):Oe=mx;if(Oe&&(Oe=Oe(e,K))){id(ie,Oe,l,ne);break e}ve&&ve(e,F,K),e==="focusout"&&K&&F.type==="number"&&K.memoizedProps.value!=null&&ii(F,"number",F.value)}switch(ve=K?Qn(K):window,e){case"focusin":(ad(ve)||ve.contentEditable==="true")&&(ha=ve,ec=K,mi=null);break;case"focusout":mi=ec=ha=null;break;case"mousedown":tc=!0;break;case"contextmenu":case"mouseup":case"dragend":tc=!1,gd(ie,l,ne);break;case"selectionchange":if(yx)break;case"keydown":case"keyup":gd(ie,l,ne)}var Me;if(Fu)e:{switch(e){case"compositionstart":var ze="onCompositionStart";break e;case"compositionend":ze="onCompositionEnd";break e;case"compositionupdate":ze="onCompositionUpdate";break e}ze=void 0}else da?nd(e,l)&&(ze="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(ze="onCompositionStart");ze&&(Pf&&l.locale!=="ko"&&(da||ze!=="onCompositionStart"?ze==="onCompositionEnd"&&da&&(Me=Kf()):(Fn=ne,ku="value"in Fn?Fn.value:Fn.textContent,da=!0)),ve=Cs(K,ze),0<ve.length&&(ze=new Wf(ze,e,null,l,ne),ie.push({event:ze,listeners:ve}),Me?ze.data=Me:(Me=ld(l),Me!==null&&(ze.data=Me)))),(Me=sx?ux(e,l):cx(e,l))&&(ze=Cs(K,"onBeforeInput"),0<ze.length&&(ve=new Wf("onBeforeInput","beforeinput",null,l,ne),ie.push({event:ve,listeners:ze}),ve.data=Me)),ev(ie,e,K,l,ne)}q0(ie,t)})}function Yi(e,t,l){return{instance:e,listener:t,currentTarget:l}}function Cs(e,t){for(var l=t+"Capture",a=[];e!==null;){var u=e,r=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||r===null||(u=oi(e,l),u!=null&&a.unshift(Yi(e,u,r)),u=oi(e,t),u!=null&&a.push(Yi(e,u,r))),e.tag===3)return a;e=e.return}return[]}function av(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function G0(e,t,l,a,u){for(var r=t._reactName,y=[];l!==null&&l!==a;){var S=l,O=S.alternate,K=S.stateNode;if(S=S.tag,O!==null&&O===a)break;S!==5&&S!==26&&S!==27||K===null||(O=K,u?(K=oi(l,r),K!=null&&y.unshift(Yi(l,K,O))):u||(K=oi(l,r),K!=null&&y.push(Yi(l,K,O)))),l=l.return}y.length!==0&&e.push({event:t,listeners:y})}var iv=/\r\n?/g,ov=/\u0000|\uFFFD/g;function Z0(e){return(typeof e=="string"?e:""+e).replace(iv,`
|
|
9
|
+
`).replace(ov,"")}function k0(e,t){return t=Z0(t),Z0(e)===t}function Ge(e,t,l,a,u,r){switch(l){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||ca(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&ca(e,""+a);break;case"className":sa(e,"class",a);break;case"tabIndex":sa(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":sa(e,l,a);break;case"style":kf(e,a,r);break;case"data":if(t!=="object"){sa(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=Oo(""+a),e.setAttribute(l,a);break;case"action":case"formAction":if(typeof a=="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 r=="function"&&(l==="formAction"?(t!=="input"&&Ge(e,t,"name",u.name,u,null),Ge(e,t,"formEncType",u.formEncType,u,null),Ge(e,t,"formMethod",u.formMethod,u,null),Ge(e,t,"formTarget",u.formTarget,u,null)):(Ge(e,t,"encType",u.encType,u,null),Ge(e,t,"method",u.method,u,null),Ge(e,t,"target",u.target,u,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=Oo(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=Nn);break;case"onScroll":a!=null&&Ae("scroll",e);break;case"onScrollEnd":a!=null&&Ae("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(s(61));if(l=a.__html,l!=null){if(u.children!=null)throw Error(s(60));e.innerHTML=l}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}l=Oo(""+a),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":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""+a):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":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":a===!0?e.setAttribute(l,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(l,a):e.removeAttribute(l);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(l):e.setAttribute(l,a);break;case"popover":Ae("beforetoggle",e),Ae("toggle",e),oa(e,"popover",a);break;case"xlinkActuate":Jt(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Jt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Jt(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Jt(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Jt(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Jt(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Jt(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Jt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Jt(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":oa(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=Hy.get(l)||l,oa(e,l,a))}}function Mr(e,t,l,a,u,r){switch(l){case"style":kf(e,a,r);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(s(61));if(l=a.__html,l!=null){if(u.children!=null)throw Error(s(60));e.innerHTML=l}}break;case"children":typeof a=="string"?ca(e,a):(typeof a=="number"||typeof a=="bigint")&&ca(e,""+a);break;case"onScroll":a!=null&&Ae("scroll",e);break;case"onScrollEnd":a!=null&&Ae("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Nn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ao.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(u=l.endsWith("Capture"),t=l.slice(2,u?l.length-7:void 0),r=e[xt]||null,r=r!=null?r[l]:null,typeof r=="function"&&e.removeEventListener(t,r,u),typeof a=="function")){typeof r!="function"&&r!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,a,u);break e}l in e?e[l]=a:a===!0?e.setAttribute(l,""):oa(e,l,a)}}}function yt(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ae("error",e),Ae("load",e);var a=!1,u=!1,r;for(r in l)if(l.hasOwnProperty(r)){var y=l[r];if(y!=null)switch(r){case"src":a=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:Ge(e,t,r,y,l,null)}}u&&Ge(e,t,"srcSet",l.srcSet,l,null),a&&Ge(e,t,"src",l.src,l,null);return;case"input":Ae("invalid",e);var S=r=y=u=null,O=null,K=null;for(a in l)if(l.hasOwnProperty(a)){var ne=l[a];if(ne!=null)switch(a){case"name":u=ne;break;case"type":y=ne;break;case"checked":O=ne;break;case"defaultChecked":K=ne;break;case"value":r=ne;break;case"defaultValue":S=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(s(137,t));break;default:Ge(e,t,a,ne,l,null)}}Do(e,r,S,O,K,y,u,!1);return;case"select":Ae("invalid",e),a=y=r=null;for(u in l)if(l.hasOwnProperty(u)&&(S=l[u],S!=null))switch(u){case"value":r=S;break;case"defaultValue":y=S;break;case"multiple":a=S;default:Ge(e,t,u,S,l,null)}t=r,l=y,e.multiple=!!a,t!=null?En(e,!!a,t,!1):l!=null&&En(e,!!a,l,!0);return;case"textarea":Ae("invalid",e),r=u=a=null;for(y in l)if(l.hasOwnProperty(y)&&(S=l[y],S!=null))switch(y){case"value":a=S;break;case"defaultValue":u=S;break;case"children":r=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(s(91));break;default:Ge(e,t,y,S,l,null)}Gf(e,a,u,r);return;case"option":for(O in l)l.hasOwnProperty(O)&&(a=l[O],a!=null)&&(O==="selected"?e.selected=a&&typeof a!="function"&&typeof a!="symbol":Ge(e,t,O,a,l,null));return;case"dialog":Ae("beforetoggle",e),Ae("toggle",e),Ae("cancel",e),Ae("close",e);break;case"iframe":case"object":Ae("load",e);break;case"video":case"audio":for(a=0;a<Li.length;a++)Ae(Li[a],e);break;case"image":Ae("error",e),Ae("load",e);break;case"details":Ae("toggle",e);break;case"embed":case"source":case"link":Ae("error",e),Ae("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(K in l)if(l.hasOwnProperty(K)&&(a=l[K],a!=null))switch(K){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:Ge(e,t,K,a,l,null)}return;default:if(Vu(t)){for(ne in l)l.hasOwnProperty(ne)&&(a=l[ne],a!==void 0&&Mr(e,t,ne,a,l,void 0));return}}for(S in l)l.hasOwnProperty(S)&&(a=l[S],a!=null&&Ge(e,t,S,a,l,null))}function sv(e,t,l,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,r=null,y=null,S=null,O=null,K=null,ne=null;for(P in l){var ie=l[P];if(l.hasOwnProperty(P)&&ie!=null)switch(P){case"checked":break;case"value":break;case"defaultValue":O=ie;default:a.hasOwnProperty(P)||Ge(e,t,P,null,a,ie)}}for(var F in a){var P=a[F];if(ie=l[F],a.hasOwnProperty(F)&&(P!=null||ie!=null))switch(F){case"type":r=P;break;case"name":u=P;break;case"checked":K=P;break;case"defaultChecked":ne=P;break;case"value":y=P;break;case"defaultValue":S=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(s(137,t));break;default:P!==ie&&Ge(e,t,F,P,a,ie)}}Tl(e,y,S,O,K,ne,r,u);return;case"select":P=y=S=F=null;for(r in l)if(O=l[r],l.hasOwnProperty(r)&&O!=null)switch(r){case"value":break;case"multiple":P=O;default:a.hasOwnProperty(r)||Ge(e,t,r,null,a,O)}for(u in a)if(r=a[u],O=l[u],a.hasOwnProperty(u)&&(r!=null||O!=null))switch(u){case"value":F=r;break;case"defaultValue":S=r;break;case"multiple":y=r;default:r!==O&&Ge(e,t,u,r,a,O)}t=S,l=y,a=P,F!=null?En(e,!!l,F,!1):!!a!=!!l&&(t!=null?En(e,!!l,t,!0):En(e,!!l,l?[]:"",!1));return;case"textarea":P=F=null;for(S in l)if(u=l[S],l.hasOwnProperty(S)&&u!=null&&!a.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:Ge(e,t,S,null,a,u)}for(y in a)if(u=a[y],r=l[y],a.hasOwnProperty(y)&&(u!=null||r!=null))switch(y){case"value":F=u;break;case"defaultValue":P=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(s(91));break;default:u!==r&&Ge(e,t,y,u,a,r)}Xf(e,F,P);return;case"option":for(var ye in l)F=l[ye],l.hasOwnProperty(ye)&&F!=null&&!a.hasOwnProperty(ye)&&(ye==="selected"?e.selected=!1:Ge(e,t,ye,null,a,F));for(O in a)F=a[O],P=l[O],a.hasOwnProperty(O)&&F!==P&&(F!=null||P!=null)&&(O==="selected"?e.selected=F&&typeof F!="function"&&typeof F!="symbol":Ge(e,t,O,F,a,P));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 Ee in l)F=l[Ee],l.hasOwnProperty(Ee)&&F!=null&&!a.hasOwnProperty(Ee)&&Ge(e,t,Ee,null,a,F);for(K in a)if(F=a[K],P=l[K],a.hasOwnProperty(K)&&F!==P&&(F!=null||P!=null))switch(K){case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(s(137,t));break;default:Ge(e,t,K,F,a,P)}return;default:if(Vu(t)){for(var Ze in l)F=l[Ze],l.hasOwnProperty(Ze)&&F!==void 0&&!a.hasOwnProperty(Ze)&&Mr(e,t,Ze,void 0,a,F);for(ne in a)F=a[ne],P=l[ne],!a.hasOwnProperty(ne)||F===P||F===void 0&&P===void 0||Mr(e,t,ne,F,a,P);return}}for(var X in l)F=l[X],l.hasOwnProperty(X)&&F!=null&&!a.hasOwnProperty(X)&&Ge(e,t,X,null,a,F);for(ie in a)F=a[ie],P=l[ie],!a.hasOwnProperty(ie)||F===P||F==null&&P==null||Ge(e,t,ie,F,a,P)}function $0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function uv(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var u=l[a],r=u.transferSize,y=u.initiatorType,S=u.duration;if(r&&S&&$0(y)){for(y=0,S=u.responseEnd,a+=1;a<l.length;a++){var O=l[a],K=O.startTime;if(K>S)break;var ne=O.transferSize,ie=O.initiatorType;ne&&$0(ie)&&(O=O.responseEnd,y+=ne*(O<S?1:(S-K)/(O-K)))}if(--a,t+=8*(r+y)/(u.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Cr=null,Ar=null;function As(e){return e.nodeType===9?e:e.ownerDocument}function Q0(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 K0(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Tr(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var zr=null;function cv(){var e=window.event;return e&&e.type==="popstate"?e===zr?!1:(zr=e,!0):(zr=null,!1)}var J0=typeof setTimeout=="function"?setTimeout:void 0,rv=typeof clearTimeout=="function"?clearTimeout:void 0,F0=typeof Promise=="function"?Promise:void 0,fv=typeof queueMicrotask=="function"?queueMicrotask:typeof F0<"u"?function(e){return F0.resolve(null).then(e).catch(dv)}:J0;function dv(e){setTimeout(function(){throw e})}function hl(e){return e==="head"}function W0(e,t){var l=t,a=0;do{var u=l.nextSibling;if(e.removeChild(l),u&&u.nodeType===8)if(l=u.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(u),Va(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")Vi(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Vi(l);for(var r=l.firstChild;r;){var y=r.nextSibling,S=r.nodeName;r[Cl]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&r.rel.toLowerCase()==="stylesheet"||l.removeChild(r),r=y}}else l==="body"&&Vi(e.ownerDocument.body);l=u}while(l);Va(t)}function I0(e,t){var l=e;e=0;do{var a=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),a&&a.nodeType===8)if(l=a.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=a}while(l)}function jr(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":jr(l),li(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function hv(e,t,l,a){for(;e.nodeType===1;){var u=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Cl])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(r=e.getAttribute("rel"),r==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(r!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(r=e.getAttribute("src"),(r!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&r&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var r=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===r)return e}else return e;if(e=Qt(e.nextSibling),e===null)break}return null}function mv(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=Qt(e.nextSibling),e===null))return null;return e}function P0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Qt(e.nextSibling),e===null))return null;return e}function Dr(e){return e.data==="$?"||e.data==="$~"}function Or(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function gv(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var a=function(){t(),l.removeEventListener("DOMContentLoaded",a)};l.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function Qt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Hr=null;function em(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return Qt(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function tm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function nm(e,t,l){switch(t=As(l),e){case"html":if(e=t.documentElement,!e)throw Error(s(452));return e;case"head":if(e=t.head,!e)throw Error(s(453));return e;case"body":if(e=t.body,!e)throw Error(s(454));return e;default:throw Error(s(451))}}function Vi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);li(e)}var Kt=new Map,lm=new Set;function Ts(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Yn=H.d;H.d={f:pv,r:yv,D:xv,C:vv,L:bv,m:Sv,X:Nv,S:Ev,M:wv};function pv(){var e=Yn.f(),t=bs();return e||t}function yv(e){var t=$n(e);t!==null&&t.tag===5&&t.type==="form"?bh(t):Yn.r(e)}var Ua=typeof document>"u"?null:document;function am(e,t,l){var a=Ua;if(a&&typeof t=="string"&&t){var u=wt(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof l=="string"&&(u+='[crossorigin="'+l+'"]'),lm.has(u)||(lm.add(u),e={rel:e,crossOrigin:l,href:t},a.querySelector(u)===null&&(t=a.createElement("link"),yt(t,"link",e),lt(t),a.head.appendChild(t)))}}function xv(e){Yn.D(e),am("dns-prefetch",e,null)}function vv(e,t){Yn.C(e,t),am("preconnect",e,t)}function bv(e,t,l){Yn.L(e,t,l);var a=Ua;if(a&&e&&t){var u='link[rel="preload"][as="'+wt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(u+='[imagesrcset="'+wt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(u+='[imagesizes="'+wt(l.imageSizes)+'"]')):u+='[href="'+wt(e)+'"]';var r=u;switch(t){case"style":r=La(e);break;case"script":r=Ya(e)}Kt.has(r)||(e=p({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Kt.set(r,e),a.querySelector(u)!==null||t==="style"&&a.querySelector(qi(r))||t==="script"&&a.querySelector(Xi(r))||(t=a.createElement("link"),yt(t,"link",e),lt(t),a.head.appendChild(t)))}}function Sv(e,t){Yn.m(e,t);var l=Ua;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+wt(a)+'"][href="'+wt(e)+'"]',r=u;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":r=Ya(e)}if(!Kt.has(r)&&(e=p({rel:"modulepreload",href:e},t),Kt.set(r,e),l.querySelector(u)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Xi(r)))return}a=l.createElement("link"),yt(a,"link",e),lt(a),l.head.appendChild(a)}}}function Ev(e,t,l){Yn.S(e,t,l);var a=Ua;if(a&&e){var u=Kn(a).hoistableStyles,r=La(e);t=t||"default";var y=u.get(r);if(!y){var S={loading:0,preload:null};if(y=a.querySelector(qi(r)))S.loading=5;else{e=p({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Kt.get(r))&&Rr(e,l);var O=y=a.createElement("link");lt(O),yt(O,"link",e),O._p=new Promise(function(K,ne){O.onload=K,O.onerror=ne}),O.addEventListener("load",function(){S.loading|=1}),O.addEventListener("error",function(){S.loading|=2}),S.loading|=4,zs(y,t,a)}y={type:"stylesheet",instance:y,count:1,state:S},u.set(r,y)}}}function Nv(e,t){Yn.X(e,t);var l=Ua;if(l&&e){var a=Kn(l).hoistableScripts,u=Ya(e),r=a.get(u);r||(r=l.querySelector(Xi(u)),r||(e=p({src:e,async:!0},t),(t=Kt.get(u))&&Br(e,t),r=l.createElement("script"),lt(r),yt(r,"link",e),l.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},a.set(u,r))}}function wv(e,t){Yn.M(e,t);var l=Ua;if(l&&e){var a=Kn(l).hoistableScripts,u=Ya(e),r=a.get(u);r||(r=l.querySelector(Xi(u)),r||(e=p({src:e,async:!0,type:"module"},t),(t=Kt.get(u))&&Br(e,t),r=l.createElement("script"),lt(r),yt(r,"link",e),l.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},a.set(u,r))}}function im(e,t,l,a){var u=(u=re.current)?Ts(u):null;if(!u)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=La(l.href),l=Kn(u).hoistableStyles,a=l.get(t),a||(a={type:"style",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=La(l.href);var r=Kn(u).hoistableStyles,y=r.get(e);if(y||(u=u.ownerDocument||u,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},r.set(e,y),(r=u.querySelector(qi(e)))&&!r._p&&(y.instance=r,y.state.loading=5),Kt.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},Kt.set(e,l),r||_v(u,e,l,y.state))),t&&a===null)throw Error(s(528,""));return y}if(t&&a!==null)throw Error(s(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ya(l),l=Kn(u).hoistableScripts,a=l.get(t),a||(a={type:"script",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,e))}}function La(e){return'href="'+wt(e)+'"'}function qi(e){return'link[rel="stylesheet"]['+e+"]"}function om(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function _v(e,t,l,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),yt(t,"link",l),lt(t),e.head.appendChild(t))}function Ya(e){return'[src="'+wt(e)+'"]'}function Xi(e){return"script[async]"+e}function sm(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+wt(l.href)+'"]');if(a)return t.instance=a,lt(a),a;var u=p({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),lt(a),yt(a,"style",u),zs(a,l.precedence,e),t.instance=a;case"stylesheet":u=La(l.href);var r=e.querySelector(qi(u));if(r)return t.state.loading|=4,t.instance=r,lt(r),r;a=om(l),(u=Kt.get(u))&&Rr(a,u),r=(e.ownerDocument||e).createElement("link"),lt(r);var y=r;return y._p=new Promise(function(S,O){y.onload=S,y.onerror=O}),yt(r,"link",a),t.state.loading|=4,zs(r,l.precedence,e),t.instance=r;case"script":return r=Ya(l.src),(u=e.querySelector(Xi(r)))?(t.instance=u,lt(u),u):(a=l,(u=Kt.get(r))&&(a=p({},l),Br(a,u)),e=e.ownerDocument||e,u=e.createElement("script"),lt(u),yt(u,"link",a),e.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(s(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,zs(a,l.precedence,e));return t.instance}function zs(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=a.length?a[a.length-1]:null,r=u,y=0;y<a.length;y++){var S=a[y];if(S.dataset.precedence===t)r=S;else if(r!==u)break}r?r.parentNode.insertBefore(e,r.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function Rr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Br(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var js=null;function um(e,t,l){if(js===null){var a=new Map,u=js=new Map;u.set(l,a)}else u=js,a=u.get(l),a||(a=new Map,u.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),u=0;u<l.length;u++){var r=l[u];if(!(r[Cl]||r[ct]||e==="link"&&r.getAttribute("rel")==="stylesheet")&&r.namespaceURI!=="http://www.w3.org/2000/svg"){var y=r.getAttribute(t)||"";y=e+y;var S=a.get(y);S?S.push(r):a.set(y,[r])}}return a}function cm(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function Mv(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function rm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Cv(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var u=La(a.href),r=t.querySelector(qi(u));if(r){t=r._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ds.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=r,lt(r);return}r=t.ownerDocument||t,a=om(a),(u=Kt.get(u))&&Rr(a,u),r=r.createElement("link"),lt(r);var y=r;y._p=new Promise(function(S,O){y.onload=S,y.onerror=O}),yt(r,"link",a),l.instance=r}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Ds.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Ur=0;function Av(e,t){return e.stylesheets&&e.count===0&&Hs(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&Hs(e,e.stylesheets),e.unsuspend){var r=e.unsuspend;e.unsuspend=null,r()}},6e4+t);0<e.imgBytes&&Ur===0&&(Ur=62500*uv());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Hs(e,e.stylesheets),e.unsuspend)){var r=e.unsuspend;e.unsuspend=null,r()}},(e.imgBytes>Ur?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(u)}}:null}function Ds(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Hs(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Os=null;function Hs(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Os=new Map,t.forEach(Tv,e),Os=null,Ds.call(e))}function Tv(e,t){if(!(t.state.loading&4)){var l=Os.get(e);if(l)var a=l.get(null);else{l=new Map,Os.set(e,l);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),r=0;r<u.length;r++){var y=u[r];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(l.set(y.dataset.precedence,y),a=y)}a&&l.set(null,a)}u=t.instance,y=u.getAttribute("data-precedence"),r=l.get(y)||a,r===a&&l.set(null,u),l.set(y,u),this.count++,a=Ds.bind(this),u.addEventListener("load",a),u.addEventListener("error",a),r?r.parentNode.insertBefore(u,r.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),t.state.loading|=4}}var Gi={$$typeof:w,Provider:null,Consumer:null,_currentValue:L,_currentValue2:L,_threadCount:0};function zv(e,t,l,a,u,r,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=ei(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ei(0),this.hiddenUpdates=ei(null),this.identifierPrefix=a,this.onUncaughtError=u,this.onCaughtError=r,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=O,this.incompleteTransitions=new Map}function fm(e,t,l,a,u,r,y,S,O,K,ne,ie){return e=new zv(e,t,l,y,O,K,ne,ie,S),t=1,r===!0&&(t|=24),r=Ot(3,null,null,t),e.current=r,r.stateNode=e,t=pc(),t.refCount++,e.pooledCache=t,t.refCount++,r.memoizedState={element:a,isDehydrated:l,cache:t},bc(r),e}function dm(e){return e?(e=pa,e):pa}function hm(e,t,l,a,u,r){u=dm(u),a.context===null?a.context=u:a.pendingContext=u,a=nl(t),a.payload={element:l},r=r===void 0?null:r,r!==null&&(a.callback=r),l=ll(e,a,t),l!==null&&(zt(l,e,t),Si(l,e,t))}function mm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Lr(e,t){mm(e,t),(e=e.alternate)&&mm(e,t)}function gm(e){if(e.tag===13||e.tag===31){var t=Ol(e,67108864);t!==null&&zt(t,e,67108864),Lr(e,67108864)}}function pm(e){if(e.tag===13||e.tag===31){var t=Lt();t=ti(t);var l=Ol(e,t);l!==null&&zt(l,e,t),Lr(e,t)}}var Rs=!0;function jv(e,t,l,a){var u=M.T;M.T=null;var r=H.p;try{H.p=2,Yr(e,t,l,a)}finally{H.p=r,M.T=u}}function Dv(e,t,l,a){var u=M.T;M.T=null;var r=H.p;try{H.p=8,Yr(e,t,l,a)}finally{H.p=r,M.T=u}}function Yr(e,t,l,a){if(Rs){var u=Vr(a);if(u===null)_r(e,t,a,Bs,l),xm(e,a);else if(Hv(u,e,t,l,a))a.stopPropagation();else if(xm(e,a),t&4&&-1<Ov.indexOf(e)){for(;u!==null;){var r=$n(u);if(r!==null)switch(r.tag){case 3:if(r=r.stateNode,r.current.memoizedState.isDehydrated){var y=vn(r.pendingLanes);if(y!==0){var S=r;for(S.pendingLanes|=2,S.entangledLanes|=2;y;){var O=1<<31-St(y);S.entanglements[1]|=O,y&=~O}rn(r),(Re&6)===0&&(xs=ke()+500,Ui(0))}}break;case 31:case 13:S=Ol(r,2),S!==null&&zt(S,r,2),bs(),Lr(r,2)}if(r=Vr(a),r===null&&_r(e,t,a,Bs,l),r===u)break;u=r}u!==null&&a.stopPropagation()}else _r(e,t,a,null,l)}}function Vr(e){return e=Xu(e),qr(e)}var Bs=null;function qr(e){if(Bs=null,e=kn(e),e!==null){var t=f(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=d(t),e!==null)return e;e=null}else if(l===31){if(e=m(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Bs=e,null}function ym(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(yn()){case xn:return 2;case Zn:return 8;case Nl:case Cu:return 32;case ea:return 268435456;default:return 32}default:return 32}}var Xr=!1,ml=null,gl=null,pl=null,Zi=new Map,ki=new Map,yl=[],Ov="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 xm(e,t){switch(e){case"focusin":case"focusout":ml=null;break;case"dragenter":case"dragleave":gl=null;break;case"mouseover":case"mouseout":pl=null;break;case"pointerover":case"pointerout":Zi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ki.delete(t.pointerId)}}function $i(e,t,l,a,u,r){return e===null||e.nativeEvent!==r?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:r,targetContainers:[u]},t!==null&&(t=$n(t),t!==null&&gm(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function Hv(e,t,l,a,u){switch(t){case"focusin":return ml=$i(ml,e,t,l,a,u),!0;case"dragenter":return gl=$i(gl,e,t,l,a,u),!0;case"mouseover":return pl=$i(pl,e,t,l,a,u),!0;case"pointerover":var r=u.pointerId;return Zi.set(r,$i(Zi.get(r)||null,e,t,l,a,u)),!0;case"gotpointercapture":return r=u.pointerId,ki.set(r,$i(ki.get(r)||null,e,t,l,a,u)),!0}return!1}function vm(e){var t=kn(e.target);if(t!==null){var l=f(t);if(l!==null){if(t=l.tag,t===13){if(t=d(l),t!==null){e.blockedOn=t,wo(e.priority,function(){pm(l)});return}}else if(t===31){if(t=m(l),t!==null){e.blockedOn=t,wo(e.priority,function(){pm(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Us(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Vr(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);qu=a,l.target.dispatchEvent(a),qu=null}else return t=$n(l),t!==null&&gm(t),e.blockedOn=l,!1;t.shift()}return!0}function bm(e,t,l){Us(e)&&l.delete(t)}function Rv(){Xr=!1,ml!==null&&Us(ml)&&(ml=null),gl!==null&&Us(gl)&&(gl=null),pl!==null&&Us(pl)&&(pl=null),Zi.forEach(bm),ki.forEach(bm)}function Ls(e,t){e.blockedOn===t&&(e.blockedOn=null,Xr||(Xr=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Rv)))}var Ys=null;function Sm(e){Ys!==e&&(Ys=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Ys===e&&(Ys=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],u=e[t+2];if(typeof a!="function"){if(qr(a||l)===null)continue;break}var r=$n(l);r!==null&&(e.splice(t,3),t-=3,Vc(r,{pending:!0,data:u,method:l.method,action:a},a,u))}}))}function Va(e){function t(O){return Ls(O,e)}ml!==null&&Ls(ml,e),gl!==null&&Ls(gl,e),pl!==null&&Ls(pl,e),Zi.forEach(t),ki.forEach(t);for(var l=0;l<yl.length;l++){var a=yl[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<yl.length&&(l=yl[0],l.blockedOn===null);)vm(l),l.blockedOn===null&&yl.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var u=l[a],r=l[a+1],y=u[xt]||null;if(typeof r=="function")y||Sm(l);else if(y){var S=null;if(r&&r.hasAttribute("formAction")){if(u=r,y=r[xt]||null)S=y.formAction;else if(qr(u)!==null)continue}else S=y.action;typeof S=="function"?l[a+1]=S:(l.splice(a,3),a-=3),Sm(l)}}}function Em(){function e(r){r.canIntercept&&r.info==="react-transition"&&r.intercept({handler:function(){return new Promise(function(y){return u=y})},focusReset:"manual",scroll:"manual"})}function t(){u!==null&&(u(),u=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var r=navigation.currentEntry;r&&r.url!=null&&navigation.navigate(r.url,{state:r.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,u=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),u!==null&&(u(),u=null)}}}function Gr(e){this._internalRoot=e}Vs.prototype.render=Gr.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));var l=t.current,a=Lt();hm(l,a,e,t,null,null)},Vs.prototype.unmount=Gr.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;hm(e.current,2,null,e,null,null),bs(),t[bn]=null}};function Vs(e){this._internalRoot=e}Vs.prototype.unstable_scheduleHydration=function(e){if(e){var t=No();e={blockedOn:null,target:e,priority:t};for(var l=0;l<yl.length&&t!==0&&t<yl[l].priority;l++);yl.splice(l,0,e),l===0&&vm(e)}};var Nm=i.version;if(Nm!=="19.2.4")throw Error(s(527,Nm,"19.2.4"));H.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=h(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var Bv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var qs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!qs.isDisabled&&qs.supportsFiber)try{wl=qs.inject(Bv),bt=qs}catch{}}return Ki.createRoot=function(e,t){if(!c(e))throw Error(s(299));var l=!1,a="",u=zh,r=jh,y=Dh;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(r=t.onCaughtError),t.onRecoverableError!==void 0&&(y=t.onRecoverableError)),t=fm(e,1,!1,null,null,l,a,null,u,r,y,Em),e[bn]=t.current,wr(e),new Gr(t)},Ki.hydrateRoot=function(e,t,l){if(!c(e))throw Error(s(299));var a=!1,u="",r=zh,y=jh,S=Dh,O=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(u=l.identifierPrefix),l.onUncaughtError!==void 0&&(r=l.onUncaughtError),l.onCaughtError!==void 0&&(y=l.onCaughtError),l.onRecoverableError!==void 0&&(S=l.onRecoverableError),l.formState!==void 0&&(O=l.formState)),t=fm(e,1,!0,t,l??null,a,u,O,r,y,S,Em),t.context=dm(null),l=t.current,a=Lt(),a=ti(a),u=nl(a),u.callback=null,ll(l,u,a),l=a,t.current.lanes=l,Ml(t,l),rn(t),e[bn]=t.current,wr(e),new Vs(t)},Ki.version="19.2.4",Ki}var Om;function $v(){if(Om)return $r.exports;Om=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),$r.exports=kv(),$r.exports}var Qv=$v();function Kv(){const[n,i]=V.useState(null),[o,s]=V.useState(!0),[c,f]=V.useState(null),d=V.useCallback(async()=>{s(!0),f(null);try{const g=await fetch("/api/graph");if(!g.ok)throw new Error(`HTTP ${g.status}`);const h=await g.json();i(h)}catch(g){f(g.message)}s(!1)},[]);V.useEffect(()=>{d()},[d]);const m=V.useCallback(async()=>{try{const g=await fetch("/api/reanalyze",{method:"POST"});if(!g.ok)throw new Error(`HTTP ${g.status}`);const h=await g.json();i(h)}catch(g){f(g.message)}},[]);return{data:n,loading:o,error:c,refetch:m,setData:i}}function Jv(){const[n,i]=V.useState(null),[o,s]=V.useState(null),[c,f]=V.useState(!1);V.useEffect(()=>{fetch("/api/git/info").then(h=>h.ok?h.json():null).then(h=>{h?.isGitRepo&&i(h)}).catch(()=>{})},[]);const d=V.useCallback(async(h,v)=>{try{const p=await fetch(`/api/git/diff?from=${encodeURIComponent(h)}&to=${encodeURIComponent(v)}`);if(!p.ok)return;const b=await p.json();s(b)}catch{}},[]),m=V.useCallback(async h=>{f(!0);try{const v=await fetch("/api/git/checkout",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({branch:h})});if(!v.ok){const b=await v.json();return console.error("Branch switch failed:",b.error),f(!1),!1}const p=await fetch("/api/git/info");if(p.ok){const b=await p.json();i(b)}return f(!1),!0}catch{return f(!1),!1}},[]),g=V.useCallback(()=>s(null),[]);return{gitInfo:n,diff:o,loading:c,fetchDiff:d,switchBranch:m,clearDiff:g}}function Fv(){const[n,i]=V.useState(null),[o,s]=V.useState(!1),[c,f]=V.useState(null),d=V.useCallback(async()=>{try{const g=await fetch("/api/tools");if(!g.ok)return;const h=await g.json();h.cachedAt&&i(h)}catch{}},[]),m=V.useCallback(async()=>{s(!0),f(null);try{const g=await fetch("/api/tools/run",{method:"POST"});if(!g.ok)throw new Error(`HTTP ${g.status}`);const h=await g.json();i(h)}catch(g){f(g.message||"Failed to run deep analysis")}s(!1)},[]);return{results:n,loading:o,error:c,fetchResults:d,runDeepAnalysis:m}}function Wv(){const[n,i]=V.useState(null),[o,s]=V.useState(!1),c=V.useCallback(async d=>{s(!0);try{const m=await fetch(`/api/blast-radius?file=${encodeURIComponent(d)}`);if(!m.ok)throw new Error(`HTTP ${m.status}`);const g=await m.json();i(g)}catch{i(null)}s(!1)},[]),f=V.useCallback(()=>{i(null)},[]);return{result:n,loading:o,computeBlastRadius:c,clearBlastRadius:f}}function Iv(n){return V.useMemo(()=>{const i=new Set;for(const d of n.edges)i.add(d.target);const o=n.nodes.filter(d=>!i.has(d.id)).map(d=>d.id),s=new Set;for(const d of n.edges)for(const m of d.imports)s.add(`${d.target}::${m}`);for(const d of n.callEdges)s.add(d.callee);const c=[];for(const d of n.nodes)for(const m of d.exports)s.has(`${d.id}::${m.name}`)||c.push({fileId:d.id,name:m.name,kind:m.kind});const f=n.scopes.filter(d=>d.kind!=="module").length;return{totalFiles:n.nodes.length,totalDeps:n.edges.length,totalFunctions:f,unreferencedFiles:o,unusedExports:c}},[n])}function ut(n){if(typeof n=="string"||typeof n=="number")return""+n;let i="";if(Array.isArray(n))for(let o=0,s;o<n.length;o++)(s=ut(n[o]))!==""&&(i+=(i&&" ")+s);else for(let o in n)n[o]&&(i+=(i&&" ")+o);return i}var Pv={value:()=>{}};function gu(){for(var n=0,i=arguments.length,o={},s;n<i;++n){if(!(s=arguments[n]+"")||s in o||/[\s.]/.test(s))throw new Error("illegal type: "+s);o[s]=[]}return new Is(o)}function Is(n){this._=n}function e1(n,i){return n.trim().split(/^|\s+/).map(function(o){var s="",c=o.indexOf(".");if(c>=0&&(s=o.slice(c+1),o=o.slice(0,c)),o&&!i.hasOwnProperty(o))throw new Error("unknown type: "+o);return{type:o,name:s}})}Is.prototype=gu.prototype={constructor:Is,on:function(n,i){var o=this._,s=e1(n+"",o),c,f=-1,d=s.length;if(arguments.length<2){for(;++f<d;)if((c=(n=s[f]).type)&&(c=t1(o[c],n.name)))return c;return}if(i!=null&&typeof i!="function")throw new Error("invalid callback: "+i);for(;++f<d;)if(c=(n=s[f]).type)o[c]=Hm(o[c],n.name,i);else if(i==null)for(c in o)o[c]=Hm(o[c],n.name,null);return this},copy:function(){var n={},i=this._;for(var o in i)n[o]=i[o].slice();return new Is(n)},call:function(n,i){if((c=arguments.length-2)>0)for(var o=new Array(c),s=0,c,f;s<c;++s)o[s]=arguments[s+2];if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(f=this._[n],s=0,c=f.length;s<c;++s)f[s].value.apply(i,o)},apply:function(n,i,o){if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(var s=this._[n],c=0,f=s.length;c<f;++c)s[c].value.apply(i,o)}};function t1(n,i){for(var o=0,s=n.length,c;o<s;++o)if((c=n[o]).name===i)return c.value}function Hm(n,i,o){for(var s=0,c=n.length;s<c;++s)if(n[s].name===i){n[s]=Pv,n=n.slice(0,s).concat(n.slice(s+1));break}return o!=null&&n.push({name:i,value:o}),n}var rf="http://www.w3.org/1999/xhtml";const Rm={svg:"http://www.w3.org/2000/svg",xhtml:rf,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function pu(n){var i=n+="",o=i.indexOf(":");return o>=0&&(i=n.slice(0,o))!=="xmlns"&&(n=n.slice(o+1)),Rm.hasOwnProperty(i)?{space:Rm[i],local:n}:n}function n1(n){return function(){var i=this.ownerDocument,o=this.namespaceURI;return o===rf&&i.documentElement.namespaceURI===rf?i.createElement(n):i.createElementNS(o,n)}}function l1(n){return function(){return this.ownerDocument.createElementNS(n.space,n.local)}}function kg(n){var i=pu(n);return(i.local?l1:n1)(i)}function a1(){}function wf(n){return n==null?a1:function(){return this.querySelector(n)}}function i1(n){typeof n!="function"&&(n=wf(n));for(var i=this._groups,o=i.length,s=new Array(o),c=0;c<o;++c)for(var f=i[c],d=f.length,m=s[c]=new Array(d),g,h,v=0;v<d;++v)(g=f[v])&&(h=n.call(g,g.__data__,v,f))&&("__data__"in g&&(h.__data__=g.__data__),m[v]=h);return new Vt(s,this._parents)}function o1(n){return n==null?[]:Array.isArray(n)?n:Array.from(n)}function s1(){return[]}function $g(n){return n==null?s1:function(){return this.querySelectorAll(n)}}function u1(n){return function(){return o1(n.apply(this,arguments))}}function c1(n){typeof n=="function"?n=u1(n):n=$g(n);for(var i=this._groups,o=i.length,s=[],c=[],f=0;f<o;++f)for(var d=i[f],m=d.length,g,h=0;h<m;++h)(g=d[h])&&(s.push(n.call(g,g.__data__,h,d)),c.push(g));return new Vt(s,c)}function Qg(n){return function(){return this.matches(n)}}function Kg(n){return function(i){return i.matches(n)}}var r1=Array.prototype.find;function f1(n){return function(){return r1.call(this.children,n)}}function d1(){return this.firstElementChild}function h1(n){return this.select(n==null?d1:f1(typeof n=="function"?n:Kg(n)))}var m1=Array.prototype.filter;function g1(){return Array.from(this.children)}function p1(n){return function(){return m1.call(this.children,n)}}function y1(n){return this.selectAll(n==null?g1:p1(typeof n=="function"?n:Kg(n)))}function x1(n){typeof n!="function"&&(n=Qg(n));for(var i=this._groups,o=i.length,s=new Array(o),c=0;c<o;++c)for(var f=i[c],d=f.length,m=s[c]=[],g,h=0;h<d;++h)(g=f[h])&&n.call(g,g.__data__,h,f)&&m.push(g);return new Vt(s,this._parents)}function Jg(n){return new Array(n.length)}function v1(){return new Vt(this._enter||this._groups.map(Jg),this._parents)}function au(n,i){this.ownerDocument=n.ownerDocument,this.namespaceURI=n.namespaceURI,this._next=null,this._parent=n,this.__data__=i}au.prototype={constructor:au,appendChild:function(n){return this._parent.insertBefore(n,this._next)},insertBefore:function(n,i){return this._parent.insertBefore(n,i)},querySelector:function(n){return this._parent.querySelector(n)},querySelectorAll:function(n){return this._parent.querySelectorAll(n)}};function b1(n){return function(){return n}}function S1(n,i,o,s,c,f){for(var d=0,m,g=i.length,h=f.length;d<h;++d)(m=i[d])?(m.__data__=f[d],s[d]=m):o[d]=new au(n,f[d]);for(;d<g;++d)(m=i[d])&&(c[d]=m)}function E1(n,i,o,s,c,f,d){var m,g,h=new Map,v=i.length,p=f.length,b=new Array(v),N;for(m=0;m<v;++m)(g=i[m])&&(b[m]=N=d.call(g,g.__data__,m,i)+"",h.has(N)?c[m]=g:h.set(N,g));for(m=0;m<p;++m)N=d.call(n,f[m],m,f)+"",(g=h.get(N))?(s[m]=g,g.__data__=f[m],h.delete(N)):o[m]=new au(n,f[m]);for(m=0;m<v;++m)(g=i[m])&&h.get(b[m])===g&&(c[m]=g)}function N1(n){return n.__data__}function w1(n,i){if(!arguments.length)return Array.from(this,N1);var o=i?E1:S1,s=this._parents,c=this._groups;typeof n!="function"&&(n=b1(n));for(var f=c.length,d=new Array(f),m=new Array(f),g=new Array(f),h=0;h<f;++h){var v=s[h],p=c[h],b=p.length,N=_1(n.call(v,v&&v.__data__,h,s)),_=N.length,C=m[h]=new Array(_),T=d[h]=new Array(_),A=g[h]=new Array(b);o(v,p,C,T,A,N,i);for(var Y=0,w=0,z,q;Y<_;++Y)if(z=C[Y]){for(Y>=w&&(w=Y+1);!(q=T[w])&&++w<_;);z._next=q||null}}return d=new Vt(d,s),d._enter=m,d._exit=g,d}function _1(n){return typeof n=="object"&&"length"in n?n:Array.from(n)}function M1(){return new Vt(this._exit||this._groups.map(Jg),this._parents)}function C1(n,i,o){var s=this.enter(),c=this,f=this.exit();return typeof n=="function"?(s=n(s),s&&(s=s.selection())):s=s.append(n+""),i!=null&&(c=i(c),c&&(c=c.selection())),o==null?f.remove():o(f),s&&c?s.merge(c).order():c}function A1(n){for(var i=n.selection?n.selection():n,o=this._groups,s=i._groups,c=o.length,f=s.length,d=Math.min(c,f),m=new Array(c),g=0;g<d;++g)for(var h=o[g],v=s[g],p=h.length,b=m[g]=new Array(p),N,_=0;_<p;++_)(N=h[_]||v[_])&&(b[_]=N);for(;g<c;++g)m[g]=o[g];return new Vt(m,this._parents)}function T1(){for(var n=this._groups,i=-1,o=n.length;++i<o;)for(var s=n[i],c=s.length-1,f=s[c],d;--c>=0;)(d=s[c])&&(f&&d.compareDocumentPosition(f)^4&&f.parentNode.insertBefore(d,f),f=d);return this}function z1(n){n||(n=j1);function i(p,b){return p&&b?n(p.__data__,b.__data__):!p-!b}for(var o=this._groups,s=o.length,c=new Array(s),f=0;f<s;++f){for(var d=o[f],m=d.length,g=c[f]=new Array(m),h,v=0;v<m;++v)(h=d[v])&&(g[v]=h);g.sort(i)}return new Vt(c,this._parents).order()}function j1(n,i){return n<i?-1:n>i?1:n>=i?0:NaN}function D1(){var n=arguments[0];return arguments[0]=this,n.apply(null,arguments),this}function O1(){return Array.from(this)}function H1(){for(var n=this._groups,i=0,o=n.length;i<o;++i)for(var s=n[i],c=0,f=s.length;c<f;++c){var d=s[c];if(d)return d}return null}function R1(){let n=0;for(const i of this)++n;return n}function B1(){return!this.node()}function U1(n){for(var i=this._groups,o=0,s=i.length;o<s;++o)for(var c=i[o],f=0,d=c.length,m;f<d;++f)(m=c[f])&&n.call(m,m.__data__,f,c);return this}function L1(n){return function(){this.removeAttribute(n)}}function Y1(n){return function(){this.removeAttributeNS(n.space,n.local)}}function V1(n,i){return function(){this.setAttribute(n,i)}}function q1(n,i){return function(){this.setAttributeNS(n.space,n.local,i)}}function X1(n,i){return function(){var o=i.apply(this,arguments);o==null?this.removeAttribute(n):this.setAttribute(n,o)}}function G1(n,i){return function(){var o=i.apply(this,arguments);o==null?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,o)}}function Z1(n,i){var o=pu(n);if(arguments.length<2){var s=this.node();return o.local?s.getAttributeNS(o.space,o.local):s.getAttribute(o)}return this.each((i==null?o.local?Y1:L1:typeof i=="function"?o.local?G1:X1:o.local?q1:V1)(o,i))}function Fg(n){return n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView}function k1(n){return function(){this.style.removeProperty(n)}}function $1(n,i,o){return function(){this.style.setProperty(n,i,o)}}function Q1(n,i,o){return function(){var s=i.apply(this,arguments);s==null?this.style.removeProperty(n):this.style.setProperty(n,s,o)}}function K1(n,i,o){return arguments.length>1?this.each((i==null?k1:typeof i=="function"?Q1:$1)(n,i,o??"")):Qa(this.node(),n)}function Qa(n,i){return n.style.getPropertyValue(i)||Fg(n).getComputedStyle(n,null).getPropertyValue(i)}function J1(n){return function(){delete this[n]}}function F1(n,i){return function(){this[n]=i}}function W1(n,i){return function(){var o=i.apply(this,arguments);o==null?delete this[n]:this[n]=o}}function I1(n,i){return arguments.length>1?this.each((i==null?J1:typeof i=="function"?W1:F1)(n,i)):this.node()[n]}function Wg(n){return n.trim().split(/^|\s+/)}function _f(n){return n.classList||new Ig(n)}function Ig(n){this._node=n,this._names=Wg(n.getAttribute("class")||"")}Ig.prototype={add:function(n){var i=this._names.indexOf(n);i<0&&(this._names.push(n),this._node.setAttribute("class",this._names.join(" ")))},remove:function(n){var i=this._names.indexOf(n);i>=0&&(this._names.splice(i,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(n){return this._names.indexOf(n)>=0}};function Pg(n,i){for(var o=_f(n),s=-1,c=i.length;++s<c;)o.add(i[s])}function ep(n,i){for(var o=_f(n),s=-1,c=i.length;++s<c;)o.remove(i[s])}function P1(n){return function(){Pg(this,n)}}function eb(n){return function(){ep(this,n)}}function tb(n,i){return function(){(i.apply(this,arguments)?Pg:ep)(this,n)}}function nb(n,i){var o=Wg(n+"");if(arguments.length<2){for(var s=_f(this.node()),c=-1,f=o.length;++c<f;)if(!s.contains(o[c]))return!1;return!0}return this.each((typeof i=="function"?tb:i?P1:eb)(o,i))}function lb(){this.textContent=""}function ab(n){return function(){this.textContent=n}}function ib(n){return function(){var i=n.apply(this,arguments);this.textContent=i??""}}function ob(n){return arguments.length?this.each(n==null?lb:(typeof n=="function"?ib:ab)(n)):this.node().textContent}function sb(){this.innerHTML=""}function ub(n){return function(){this.innerHTML=n}}function cb(n){return function(){var i=n.apply(this,arguments);this.innerHTML=i??""}}function rb(n){return arguments.length?this.each(n==null?sb:(typeof n=="function"?cb:ub)(n)):this.node().innerHTML}function fb(){this.nextSibling&&this.parentNode.appendChild(this)}function db(){return this.each(fb)}function hb(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function mb(){return this.each(hb)}function gb(n){var i=typeof n=="function"?n:kg(n);return this.select(function(){return this.appendChild(i.apply(this,arguments))})}function pb(){return null}function yb(n,i){var o=typeof n=="function"?n:kg(n),s=i==null?pb:typeof i=="function"?i:wf(i);return this.select(function(){return this.insertBefore(o.apply(this,arguments),s.apply(this,arguments)||null)})}function xb(){var n=this.parentNode;n&&n.removeChild(this)}function vb(){return this.each(xb)}function bb(){var n=this.cloneNode(!1),i=this.parentNode;return i?i.insertBefore(n,this.nextSibling):n}function Sb(){var n=this.cloneNode(!0),i=this.parentNode;return i?i.insertBefore(n,this.nextSibling):n}function Eb(n){return this.select(n?Sb:bb)}function Nb(n){return arguments.length?this.property("__data__",n):this.node().__data__}function wb(n){return function(i){n.call(this,i,this.__data__)}}function _b(n){return n.trim().split(/^|\s+/).map(function(i){var o="",s=i.indexOf(".");return s>=0&&(o=i.slice(s+1),i=i.slice(0,s)),{type:i,name:o}})}function Mb(n){return function(){var i=this.__on;if(i){for(var o=0,s=-1,c=i.length,f;o<c;++o)f=i[o],(!n.type||f.type===n.type)&&f.name===n.name?this.removeEventListener(f.type,f.listener,f.options):i[++s]=f;++s?i.length=s:delete this.__on}}}function Cb(n,i,o){return function(){var s=this.__on,c,f=wb(i);if(s){for(var d=0,m=s.length;d<m;++d)if((c=s[d]).type===n.type&&c.name===n.name){this.removeEventListener(c.type,c.listener,c.options),this.addEventListener(c.type,c.listener=f,c.options=o),c.value=i;return}}this.addEventListener(n.type,f,o),c={type:n.type,name:n.name,value:i,listener:f,options:o},s?s.push(c):this.__on=[c]}}function Ab(n,i,o){var s=_b(n+""),c,f=s.length,d;if(arguments.length<2){var m=this.node().__on;if(m){for(var g=0,h=m.length,v;g<h;++g)for(c=0,v=m[g];c<f;++c)if((d=s[c]).type===v.type&&d.name===v.name)return v.value}return}for(m=i?Cb:Mb,c=0;c<f;++c)this.each(m(s[c],i,o));return this}function tp(n,i,o){var s=Fg(n),c=s.CustomEvent;typeof c=="function"?c=new c(i,o):(c=s.document.createEvent("Event"),o?(c.initEvent(i,o.bubbles,o.cancelable),c.detail=o.detail):c.initEvent(i,!1,!1)),n.dispatchEvent(c)}function Tb(n,i){return function(){return tp(this,n,i)}}function zb(n,i){return function(){return tp(this,n,i.apply(this,arguments))}}function jb(n,i){return this.each((typeof i=="function"?zb:Tb)(n,i))}function*Db(){for(var n=this._groups,i=0,o=n.length;i<o;++i)for(var s=n[i],c=0,f=s.length,d;c<f;++c)(d=s[c])&&(yield d)}var np=[null];function Vt(n,i){this._groups=n,this._parents=i}function ho(){return new Vt([[document.documentElement]],np)}function Ob(){return this}Vt.prototype=ho.prototype={constructor:Vt,select:i1,selectAll:c1,selectChild:h1,selectChildren:y1,filter:x1,data:w1,enter:v1,exit:M1,join:C1,merge:A1,selection:Ob,order:T1,sort:z1,call:D1,nodes:O1,node:H1,size:R1,empty:B1,each:U1,attr:Z1,style:K1,property:I1,classed:nb,text:ob,html:rb,raise:db,lower:mb,append:gb,insert:yb,remove:vb,clone:Eb,datum:Nb,on:Ab,dispatch:jb,[Symbol.iterator]:Db};function Yt(n){return typeof n=="string"?new Vt([[document.querySelector(n)]],[document.documentElement]):new Vt([[n]],np)}function Hb(n){let i;for(;i=n.sourceEvent;)n=i;return n}function Pt(n,i){if(n=Hb(n),i===void 0&&(i=n.currentTarget),i){var o=i.ownerSVGElement||i;if(o.createSVGPoint){var s=o.createSVGPoint();return s.x=n.clientX,s.y=n.clientY,s=s.matrixTransform(i.getScreenCTM().inverse()),[s.x,s.y]}if(i.getBoundingClientRect){var c=i.getBoundingClientRect();return[n.clientX-c.left-i.clientLeft,n.clientY-c.top-i.clientTop]}}return[n.pageX,n.pageY]}const Rb={passive:!1},no={capture:!0,passive:!1};function Fr(n){n.stopImmediatePropagation()}function ka(n){n.preventDefault(),n.stopImmediatePropagation()}function lp(n){var i=n.document.documentElement,o=Yt(n).on("dragstart.drag",ka,no);"onselectstart"in i?o.on("selectstart.drag",ka,no):(i.__noselect=i.style.MozUserSelect,i.style.MozUserSelect="none")}function ap(n,i){var o=n.document.documentElement,s=Yt(n).on("dragstart.drag",null);i&&(s.on("click.drag",ka,no),setTimeout(function(){s.on("click.drag",null)},0)),"onselectstart"in o?s.on("selectstart.drag",null):(o.style.MozUserSelect=o.__noselect,delete o.__noselect)}const Xs=n=>()=>n;function ff(n,{sourceEvent:i,subject:o,target:s,identifier:c,active:f,x:d,y:m,dx:g,dy:h,dispatch:v}){Object.defineProperties(this,{type:{value:n,enumerable:!0,configurable:!0},sourceEvent:{value:i,enumerable:!0,configurable:!0},subject:{value:o,enumerable:!0,configurable:!0},target:{value:s,enumerable:!0,configurable:!0},identifier:{value:c,enumerable:!0,configurable:!0},active:{value:f,enumerable:!0,configurable:!0},x:{value:d,enumerable:!0,configurable:!0},y:{value:m,enumerable:!0,configurable:!0},dx:{value:g,enumerable:!0,configurable:!0},dy:{value:h,enumerable:!0,configurable:!0},_:{value:v}})}ff.prototype.on=function(){var n=this._.on.apply(this._,arguments);return n===this._?this:n};function Bb(n){return!n.ctrlKey&&!n.button}function Ub(){return this.parentNode}function Lb(n,i){return i??{x:n.x,y:n.y}}function Yb(){return navigator.maxTouchPoints||"ontouchstart"in this}function ip(){var n=Bb,i=Ub,o=Lb,s=Yb,c={},f=gu("start","drag","end"),d=0,m,g,h,v,p=0;function b(z){z.on("mousedown.drag",N).filter(s).on("touchstart.drag",T).on("touchmove.drag",A,Rb).on("touchend.drag touchcancel.drag",Y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function N(z,q){if(!(v||!n.call(this,z,q))){var B=w(this,i.call(this,z,q),z,q,"mouse");B&&(Yt(z.view).on("mousemove.drag",_,no).on("mouseup.drag",C,no),lp(z.view),Fr(z),h=!1,m=z.clientX,g=z.clientY,B("start",z))}}function _(z){if(ka(z),!h){var q=z.clientX-m,B=z.clientY-g;h=q*q+B*B>p}c.mouse("drag",z)}function C(z){Yt(z.view).on("mousemove.drag mouseup.drag",null),ap(z.view,h),ka(z),c.mouse("end",z)}function T(z,q){if(n.call(this,z,q)){var B=z.changedTouches,R=i.call(this,z,q),$=B.length,J,se;for(J=0;J<$;++J)(se=w(this,R,z,q,B[J].identifier,B[J]))&&(Fr(z),se("start",z,B[J]))}}function A(z){var q=z.changedTouches,B=q.length,R,$;for(R=0;R<B;++R)($=c[q[R].identifier])&&(ka(z),$("drag",z,q[R]))}function Y(z){var q=z.changedTouches,B=q.length,R,$;for(v&&clearTimeout(v),v=setTimeout(function(){v=null},500),R=0;R<B;++R)($=c[q[R].identifier])&&(Fr(z),$("end",z,q[R]))}function w(z,q,B,R,$,J){var se=f.copy(),k=Pt(J||B,q),W,oe,D;if((D=o.call(z,new ff("beforestart",{sourceEvent:B,target:b,identifier:$,active:d,x:k[0],y:k[1],dx:0,dy:0,dispatch:se}),R))!=null)return W=D.x-k[0]||0,oe=D.y-k[1]||0,function Z(M,H,L){var G=k,te;switch(M){case"start":c[$]=Z,te=d++;break;case"end":delete c[$],--d;case"drag":k=Pt(L||H,q),te=d;break}se.call(M,z,new ff(M,{sourceEvent:H,subject:D,target:b,identifier:$,active:te,x:k[0]+W,y:k[1]+oe,dx:k[0]-G[0],dy:k[1]-G[1],dispatch:se}),R)}}return b.filter=function(z){return arguments.length?(n=typeof z=="function"?z:Xs(!!z),b):n},b.container=function(z){return arguments.length?(i=typeof z=="function"?z:Xs(z),b):i},b.subject=function(z){return arguments.length?(o=typeof z=="function"?z:Xs(z),b):o},b.touchable=function(z){return arguments.length?(s=typeof z=="function"?z:Xs(!!z),b):s},b.on=function(){var z=f.on.apply(f,arguments);return z===f?b:z},b.clickDistance=function(z){return arguments.length?(p=(z=+z)*z,b):Math.sqrt(p)},b}function Mf(n,i,o){n.prototype=i.prototype=o,o.constructor=n}function op(n,i){var o=Object.create(n.prototype);for(var s in i)o[s]=i[s];return o}function mo(){}var lo=.7,iu=1/lo,$a="\\s*([+-]?\\d+)\\s*",ao="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",mn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Vb=/^#([0-9a-f]{3,8})$/,qb=new RegExp(`^rgb\\(${$a},${$a},${$a}\\)$`),Xb=new RegExp(`^rgb\\(${mn},${mn},${mn}\\)$`),Gb=new RegExp(`^rgba\\(${$a},${$a},${$a},${ao}\\)$`),Zb=new RegExp(`^rgba\\(${mn},${mn},${mn},${ao}\\)$`),kb=new RegExp(`^hsl\\(${ao},${mn},${mn}\\)$`),$b=new RegExp(`^hsla\\(${ao},${mn},${mn},${ao}\\)$`),Bm={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};Mf(mo,Fl,{copy(n){return Object.assign(new this.constructor,this,n)},displayable(){return this.rgb().displayable()},hex:Um,formatHex:Um,formatHex8:Qb,formatHsl:Kb,formatRgb:Lm,toString:Lm});function Um(){return this.rgb().formatHex()}function Qb(){return this.rgb().formatHex8()}function Kb(){return sp(this).formatHsl()}function Lm(){return this.rgb().formatRgb()}function Fl(n){var i,o;return n=(n+"").trim().toLowerCase(),(i=Vb.exec(n))?(o=i[1].length,i=parseInt(i[1],16),o===6?Ym(i):o===3?new jt(i>>8&15|i>>4&240,i>>4&15|i&240,(i&15)<<4|i&15,1):o===8?Gs(i>>24&255,i>>16&255,i>>8&255,(i&255)/255):o===4?Gs(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=qb.exec(n))?new jt(i[1],i[2],i[3],1):(i=Xb.exec(n))?new jt(i[1]*255/100,i[2]*255/100,i[3]*255/100,1):(i=Gb.exec(n))?Gs(i[1],i[2],i[3],i[4]):(i=Zb.exec(n))?Gs(i[1]*255/100,i[2]*255/100,i[3]*255/100,i[4]):(i=kb.exec(n))?Xm(i[1],i[2]/100,i[3]/100,1):(i=$b.exec(n))?Xm(i[1],i[2]/100,i[3]/100,i[4]):Bm.hasOwnProperty(n)?Ym(Bm[n]):n==="transparent"?new jt(NaN,NaN,NaN,0):null}function Ym(n){return new jt(n>>16&255,n>>8&255,n&255,1)}function Gs(n,i,o,s){return s<=0&&(n=i=o=NaN),new jt(n,i,o,s)}function Jb(n){return n instanceof mo||(n=Fl(n)),n?(n=n.rgb(),new jt(n.r,n.g,n.b,n.opacity)):new jt}function df(n,i,o,s){return arguments.length===1?Jb(n):new jt(n,i,o,s??1)}function jt(n,i,o,s){this.r=+n,this.g=+i,this.b=+o,this.opacity=+s}Mf(jt,df,op(mo,{brighter(n){return n=n==null?iu:Math.pow(iu,n),new jt(this.r*n,this.g*n,this.b*n,this.opacity)},darker(n){return n=n==null?lo:Math.pow(lo,n),new jt(this.r*n,this.g*n,this.b*n,this.opacity)},rgb(){return this},clamp(){return new jt(Kl(this.r),Kl(this.g),Kl(this.b),ou(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:Vm,formatHex:Vm,formatHex8:Fb,formatRgb:qm,toString:qm}));function Vm(){return`#${Ql(this.r)}${Ql(this.g)}${Ql(this.b)}`}function Fb(){return`#${Ql(this.r)}${Ql(this.g)}${Ql(this.b)}${Ql((isNaN(this.opacity)?1:this.opacity)*255)}`}function qm(){const n=ou(this.opacity);return`${n===1?"rgb(":"rgba("}${Kl(this.r)}, ${Kl(this.g)}, ${Kl(this.b)}${n===1?")":`, ${n})`}`}function ou(n){return isNaN(n)?1:Math.max(0,Math.min(1,n))}function Kl(n){return Math.max(0,Math.min(255,Math.round(n)||0))}function Ql(n){return n=Kl(n),(n<16?"0":"")+n.toString(16)}function Xm(n,i,o,s){return s<=0?n=i=o=NaN:o<=0||o>=1?n=i=NaN:i<=0&&(n=NaN),new en(n,i,o,s)}function sp(n){if(n instanceof en)return new en(n.h,n.s,n.l,n.opacity);if(n instanceof mo||(n=Fl(n)),!n)return new en;if(n instanceof en)return n;n=n.rgb();var i=n.r/255,o=n.g/255,s=n.b/255,c=Math.min(i,o,s),f=Math.max(i,o,s),d=NaN,m=f-c,g=(f+c)/2;return m?(i===f?d=(o-s)/m+(o<s)*6:o===f?d=(s-i)/m+2:d=(i-o)/m+4,m/=g<.5?f+c:2-f-c,d*=60):m=g>0&&g<1?0:d,new en(d,m,g,n.opacity)}function Wb(n,i,o,s){return arguments.length===1?sp(n):new en(n,i,o,s??1)}function en(n,i,o,s){this.h=+n,this.s=+i,this.l=+o,this.opacity=+s}Mf(en,Wb,op(mo,{brighter(n){return n=n==null?iu:Math.pow(iu,n),new en(this.h,this.s,this.l*n,this.opacity)},darker(n){return n=n==null?lo:Math.pow(lo,n),new en(this.h,this.s,this.l*n,this.opacity)},rgb(){var n=this.h%360+(this.h<0)*360,i=isNaN(n)||isNaN(this.s)?0:this.s,o=this.l,s=o+(o<.5?o:1-o)*i,c=2*o-s;return new jt(Wr(n>=240?n-240:n+120,c,s),Wr(n,c,s),Wr(n<120?n+240:n-120,c,s),this.opacity)},clamp(){return new en(Gm(this.h),Zs(this.s),Zs(this.l),ou(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 n=ou(this.opacity);return`${n===1?"hsl(":"hsla("}${Gm(this.h)}, ${Zs(this.s)*100}%, ${Zs(this.l)*100}%${n===1?")":`, ${n})`}`}}));function Gm(n){return n=(n||0)%360,n<0?n+360:n}function Zs(n){return Math.max(0,Math.min(1,n||0))}function Wr(n,i,o){return(n<60?i+(o-i)*n/60:n<180?o:n<240?i+(o-i)*(240-n)/60:i)*255}const Cf=n=>()=>n;function Ib(n,i){return function(o){return n+o*i}}function Pb(n,i,o){return n=Math.pow(n,o),i=Math.pow(i,o)-n,o=1/o,function(s){return Math.pow(n+s*i,o)}}function eS(n){return(n=+n)==1?up:function(i,o){return o-i?Pb(i,o,n):Cf(isNaN(i)?o:i)}}function up(n,i){var o=i-n;return o?Ib(n,o):Cf(isNaN(n)?i:n)}const su=(function n(i){var o=eS(i);function s(c,f){var d=o((c=df(c)).r,(f=df(f)).r),m=o(c.g,f.g),g=o(c.b,f.b),h=up(c.opacity,f.opacity);return function(v){return c.r=d(v),c.g=m(v),c.b=g(v),c.opacity=h(v),c+""}}return s.gamma=n,s})(1);function tS(n,i){i||(i=[]);var o=n?Math.min(i.length,n.length):0,s=i.slice(),c;return function(f){for(c=0;c<o;++c)s[c]=n[c]*(1-f)+i[c]*f;return s}}function nS(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function lS(n,i){var o=i?i.length:0,s=n?Math.min(o,n.length):0,c=new Array(s),f=new Array(o),d;for(d=0;d<s;++d)c[d]=eo(n[d],i[d]);for(;d<o;++d)f[d]=i[d];return function(m){for(d=0;d<s;++d)f[d]=c[d](m);return f}}function aS(n,i){var o=new Date;return n=+n,i=+i,function(s){return o.setTime(n*(1-s)+i*s),o}}function dn(n,i){return n=+n,i=+i,function(o){return n*(1-o)+i*o}}function iS(n,i){var o={},s={},c;(n===null||typeof n!="object")&&(n={}),(i===null||typeof i!="object")&&(i={});for(c in i)c in n?o[c]=eo(n[c],i[c]):s[c]=i[c];return function(f){for(c in o)s[c]=o[c](f);return s}}var hf=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ir=new RegExp(hf.source,"g");function oS(n){return function(){return n}}function sS(n){return function(i){return n(i)+""}}function cp(n,i){var o=hf.lastIndex=Ir.lastIndex=0,s,c,f,d=-1,m=[],g=[];for(n=n+"",i=i+"";(s=hf.exec(n))&&(c=Ir.exec(i));)(f=c.index)>o&&(f=i.slice(o,f),m[d]?m[d]+=f:m[++d]=f),(s=s[0])===(c=c[0])?m[d]?m[d]+=c:m[++d]=c:(m[++d]=null,g.push({i:d,x:dn(s,c)})),o=Ir.lastIndex;return o<i.length&&(f=i.slice(o),m[d]?m[d]+=f:m[++d]=f),m.length<2?g[0]?sS(g[0].x):oS(i):(i=g.length,function(h){for(var v=0,p;v<i;++v)m[(p=g[v]).i]=p.x(h);return m.join("")})}function eo(n,i){var o=typeof i,s;return i==null||o==="boolean"?Cf(i):(o==="number"?dn:o==="string"?(s=Fl(i))?(i=s,su):cp:i instanceof Fl?su:i instanceof Date?aS:nS(i)?tS:Array.isArray(i)?lS:typeof i.valueOf!="function"&&typeof i.toString!="function"||isNaN(i)?iS:dn)(n,i)}var Zm=180/Math.PI,mf={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function rp(n,i,o,s,c,f){var d,m,g;return(d=Math.sqrt(n*n+i*i))&&(n/=d,i/=d),(g=n*o+i*s)&&(o-=n*g,s-=i*g),(m=Math.sqrt(o*o+s*s))&&(o/=m,s/=m,g/=m),n*s<i*o&&(n=-n,i=-i,g=-g,d=-d),{translateX:c,translateY:f,rotate:Math.atan2(i,n)*Zm,skewX:Math.atan(g)*Zm,scaleX:d,scaleY:m}}var ks;function uS(n){const i=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(n+"");return i.isIdentity?mf:rp(i.a,i.b,i.c,i.d,i.e,i.f)}function cS(n){return n==null||(ks||(ks=document.createElementNS("http://www.w3.org/2000/svg","g")),ks.setAttribute("transform",n),!(n=ks.transform.baseVal.consolidate()))?mf:(n=n.matrix,rp(n.a,n.b,n.c,n.d,n.e,n.f))}function fp(n,i,o,s){function c(h){return h.length?h.pop()+" ":""}function f(h,v,p,b,N,_){if(h!==p||v!==b){var C=N.push("translate(",null,i,null,o);_.push({i:C-4,x:dn(h,p)},{i:C-2,x:dn(v,b)})}else(p||b)&&N.push("translate("+p+i+b+o)}function d(h,v,p,b){h!==v?(h-v>180?v+=360:v-h>180&&(h+=360),b.push({i:p.push(c(p)+"rotate(",null,s)-2,x:dn(h,v)})):v&&p.push(c(p)+"rotate("+v+s)}function m(h,v,p,b){h!==v?b.push({i:p.push(c(p)+"skewX(",null,s)-2,x:dn(h,v)}):v&&p.push(c(p)+"skewX("+v+s)}function g(h,v,p,b,N,_){if(h!==p||v!==b){var C=N.push(c(N)+"scale(",null,",",null,")");_.push({i:C-4,x:dn(h,p)},{i:C-2,x:dn(v,b)})}else(p!==1||b!==1)&&N.push(c(N)+"scale("+p+","+b+")")}return function(h,v){var p=[],b=[];return h=n(h),v=n(v),f(h.translateX,h.translateY,v.translateX,v.translateY,p,b),d(h.rotate,v.rotate,p,b),m(h.skewX,v.skewX,p,b),g(h.scaleX,h.scaleY,v.scaleX,v.scaleY,p,b),h=v=null,function(N){for(var _=-1,C=b.length,T;++_<C;)p[(T=b[_]).i]=T.x(N);return p.join("")}}}var rS=fp(uS,"px, ","px)","deg)"),fS=fp(cS,", ",")",")"),dS=1e-12;function km(n){return((n=Math.exp(n))+1/n)/2}function hS(n){return((n=Math.exp(n))-1/n)/2}function mS(n){return((n=Math.exp(2*n))-1)/(n+1)}const Ps=(function n(i,o,s){function c(f,d){var m=f[0],g=f[1],h=f[2],v=d[0],p=d[1],b=d[2],N=v-m,_=p-g,C=N*N+_*_,T,A;if(C<dS)A=Math.log(b/h)/i,T=function(R){return[m+R*N,g+R*_,h*Math.exp(i*R*A)]};else{var Y=Math.sqrt(C),w=(b*b-h*h+s*C)/(2*h*o*Y),z=(b*b-h*h-s*C)/(2*b*o*Y),q=Math.log(Math.sqrt(w*w+1)-w),B=Math.log(Math.sqrt(z*z+1)-z);A=(B-q)/i,T=function(R){var $=R*A,J=km(q),se=h/(o*Y)*(J*mS(i*$+q)-hS(q));return[m+se*N,g+se*_,h*J/km(i*$+q)]}}return T.duration=A*1e3*i/Math.SQRT2,T}return c.rho=function(f){var d=Math.max(.001,+f),m=d*d,g=m*m;return n(d,m,g)},c})(Math.SQRT2,2,4);var Ka=0,Wi=0,Ji=0,dp=1e3,uu,Ii,cu=0,Wl=0,yu=0,io=typeof performance=="object"&&performance.now?performance:Date,hp=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(n){setTimeout(n,17)};function Af(){return Wl||(hp(gS),Wl=io.now()+yu)}function gS(){Wl=0}function ru(){this._call=this._time=this._next=null}ru.prototype=mp.prototype={constructor:ru,restart:function(n,i,o){if(typeof n!="function")throw new TypeError("callback is not a function");o=(o==null?Af():+o)+(i==null?0:+i),!this._next&&Ii!==this&&(Ii?Ii._next=this:uu=this,Ii=this),this._call=n,this._time=o,gf()},stop:function(){this._call&&(this._call=null,this._time=1/0,gf())}};function mp(n,i,o){var s=new ru;return s.restart(n,i,o),s}function pS(){Af(),++Ka;for(var n=uu,i;n;)(i=Wl-n._time)>=0&&n._call.call(void 0,i),n=n._next;--Ka}function $m(){Wl=(cu=io.now())+yu,Ka=Wi=0;try{pS()}finally{Ka=0,xS(),Wl=0}}function yS(){var n=io.now(),i=n-cu;i>dp&&(yu-=i,cu=n)}function xS(){for(var n,i=uu,o,s=1/0;i;)i._call?(s>i._time&&(s=i._time),n=i,i=i._next):(o=i._next,i._next=null,i=n?n._next=o:uu=o);Ii=n,gf(s)}function gf(n){if(!Ka){Wi&&(Wi=clearTimeout(Wi));var i=n-Wl;i>24?(n<1/0&&(Wi=setTimeout($m,n-io.now()-yu)),Ji&&(Ji=clearInterval(Ji))):(Ji||(cu=io.now(),Ji=setInterval(yS,dp)),Ka=1,hp($m))}}function Qm(n,i,o){var s=new ru;return i=i==null?0:+i,s.restart(c=>{s.stop(),n(c+i)},i,o),s}var vS=gu("start","end","cancel","interrupt"),bS=[],gp=0,Km=1,pf=2,eu=3,Jm=4,yf=5,tu=6;function xu(n,i,o,s,c,f){var d=n.__transition;if(!d)n.__transition={};else if(o in d)return;SS(n,o,{name:i,index:s,group:c,on:vS,tween:bS,time:f.time,delay:f.delay,duration:f.duration,ease:f.ease,timer:null,state:gp})}function Tf(n,i){var o=ln(n,i);if(o.state>gp)throw new Error("too late; already scheduled");return o}function pn(n,i){var o=ln(n,i);if(o.state>eu)throw new Error("too late; already running");return o}function ln(n,i){var o=n.__transition;if(!o||!(o=o[i]))throw new Error("transition not found");return o}function SS(n,i,o){var s=n.__transition,c;s[i]=o,o.timer=mp(f,0,o.time);function f(h){o.state=Km,o.timer.restart(d,o.delay,o.time),o.delay<=h&&d(h-o.delay)}function d(h){var v,p,b,N;if(o.state!==Km)return g();for(v in s)if(N=s[v],N.name===o.name){if(N.state===eu)return Qm(d);N.state===Jm?(N.state=tu,N.timer.stop(),N.on.call("interrupt",n,n.__data__,N.index,N.group),delete s[v]):+v<i&&(N.state=tu,N.timer.stop(),N.on.call("cancel",n,n.__data__,N.index,N.group),delete s[v])}if(Qm(function(){o.state===eu&&(o.state=Jm,o.timer.restart(m,o.delay,o.time),m(h))}),o.state=pf,o.on.call("start",n,n.__data__,o.index,o.group),o.state===pf){for(o.state=eu,c=new Array(b=o.tween.length),v=0,p=-1;v<b;++v)(N=o.tween[v].value.call(n,n.__data__,o.index,o.group))&&(c[++p]=N);c.length=p+1}}function m(h){for(var v=h<o.duration?o.ease.call(null,h/o.duration):(o.timer.restart(g),o.state=yf,1),p=-1,b=c.length;++p<b;)c[p].call(n,v);o.state===yf&&(o.on.call("end",n,n.__data__,o.index,o.group),g())}function g(){o.state=tu,o.timer.stop(),delete s[i];for(var h in s)return;delete n.__transition}}function nu(n,i){var o=n.__transition,s,c,f=!0,d;if(o){i=i==null?null:i+"";for(d in o){if((s=o[d]).name!==i){f=!1;continue}c=s.state>pf&&s.state<yf,s.state=tu,s.timer.stop(),s.on.call(c?"interrupt":"cancel",n,n.__data__,s.index,s.group),delete o[d]}f&&delete n.__transition}}function ES(n){return this.each(function(){nu(this,n)})}function NS(n,i){var o,s;return function(){var c=pn(this,n),f=c.tween;if(f!==o){s=o=f;for(var d=0,m=s.length;d<m;++d)if(s[d].name===i){s=s.slice(),s.splice(d,1);break}}c.tween=s}}function wS(n,i,o){var s,c;if(typeof o!="function")throw new Error;return function(){var f=pn(this,n),d=f.tween;if(d!==s){c=(s=d).slice();for(var m={name:i,value:o},g=0,h=c.length;g<h;++g)if(c[g].name===i){c[g]=m;break}g===h&&c.push(m)}f.tween=c}}function _S(n,i){var o=this._id;if(n+="",arguments.length<2){for(var s=ln(this.node(),o).tween,c=0,f=s.length,d;c<f;++c)if((d=s[c]).name===n)return d.value;return null}return this.each((i==null?NS:wS)(o,n,i))}function zf(n,i,o){var s=n._id;return n.each(function(){var c=pn(this,s);(c.value||(c.value={}))[i]=o.apply(this,arguments)}),function(c){return ln(c,s).value[i]}}function pp(n,i){var o;return(typeof i=="number"?dn:i instanceof Fl?su:(o=Fl(i))?(i=o,su):cp)(n,i)}function MS(n){return function(){this.removeAttribute(n)}}function CS(n){return function(){this.removeAttributeNS(n.space,n.local)}}function AS(n,i,o){var s,c=o+"",f;return function(){var d=this.getAttribute(n);return d===c?null:d===s?f:f=i(s=d,o)}}function TS(n,i,o){var s,c=o+"",f;return function(){var d=this.getAttributeNS(n.space,n.local);return d===c?null:d===s?f:f=i(s=d,o)}}function zS(n,i,o){var s,c,f;return function(){var d,m=o(this),g;return m==null?void this.removeAttribute(n):(d=this.getAttribute(n),g=m+"",d===g?null:d===s&&g===c?f:(c=g,f=i(s=d,m)))}}function jS(n,i,o){var s,c,f;return function(){var d,m=o(this),g;return m==null?void this.removeAttributeNS(n.space,n.local):(d=this.getAttributeNS(n.space,n.local),g=m+"",d===g?null:d===s&&g===c?f:(c=g,f=i(s=d,m)))}}function DS(n,i){var o=pu(n),s=o==="transform"?fS:pp;return this.attrTween(n,typeof i=="function"?(o.local?jS:zS)(o,s,zf(this,"attr."+n,i)):i==null?(o.local?CS:MS)(o):(o.local?TS:AS)(o,s,i))}function OS(n,i){return function(o){this.setAttribute(n,i.call(this,o))}}function HS(n,i){return function(o){this.setAttributeNS(n.space,n.local,i.call(this,o))}}function RS(n,i){var o,s;function c(){var f=i.apply(this,arguments);return f!==s&&(o=(s=f)&&HS(n,f)),o}return c._value=i,c}function BS(n,i){var o,s;function c(){var f=i.apply(this,arguments);return f!==s&&(o=(s=f)&&OS(n,f)),o}return c._value=i,c}function US(n,i){var o="attr."+n;if(arguments.length<2)return(o=this.tween(o))&&o._value;if(i==null)return this.tween(o,null);if(typeof i!="function")throw new Error;var s=pu(n);return this.tween(o,(s.local?RS:BS)(s,i))}function LS(n,i){return function(){Tf(this,n).delay=+i.apply(this,arguments)}}function YS(n,i){return i=+i,function(){Tf(this,n).delay=i}}function VS(n){var i=this._id;return arguments.length?this.each((typeof n=="function"?LS:YS)(i,n)):ln(this.node(),i).delay}function qS(n,i){return function(){pn(this,n).duration=+i.apply(this,arguments)}}function XS(n,i){return i=+i,function(){pn(this,n).duration=i}}function GS(n){var i=this._id;return arguments.length?this.each((typeof n=="function"?qS:XS)(i,n)):ln(this.node(),i).duration}function ZS(n,i){if(typeof i!="function")throw new Error;return function(){pn(this,n).ease=i}}function kS(n){var i=this._id;return arguments.length?this.each(ZS(i,n)):ln(this.node(),i).ease}function $S(n,i){return function(){var o=i.apply(this,arguments);if(typeof o!="function")throw new Error;pn(this,n).ease=o}}function QS(n){if(typeof n!="function")throw new Error;return this.each($S(this._id,n))}function KS(n){typeof n!="function"&&(n=Qg(n));for(var i=this._groups,o=i.length,s=new Array(o),c=0;c<o;++c)for(var f=i[c],d=f.length,m=s[c]=[],g,h=0;h<d;++h)(g=f[h])&&n.call(g,g.__data__,h,f)&&m.push(g);return new Xn(s,this._parents,this._name,this._id)}function JS(n){if(n._id!==this._id)throw new Error;for(var i=this._groups,o=n._groups,s=i.length,c=o.length,f=Math.min(s,c),d=new Array(s),m=0;m<f;++m)for(var g=i[m],h=o[m],v=g.length,p=d[m]=new Array(v),b,N=0;N<v;++N)(b=g[N]||h[N])&&(p[N]=b);for(;m<s;++m)d[m]=i[m];return new Xn(d,this._parents,this._name,this._id)}function FS(n){return(n+"").trim().split(/^|\s+/).every(function(i){var o=i.indexOf(".");return o>=0&&(i=i.slice(0,o)),!i||i==="start"})}function WS(n,i,o){var s,c,f=FS(i)?Tf:pn;return function(){var d=f(this,n),m=d.on;m!==s&&(c=(s=m).copy()).on(i,o),d.on=c}}function IS(n,i){var o=this._id;return arguments.length<2?ln(this.node(),o).on.on(n):this.each(WS(o,n,i))}function PS(n){return function(){var i=this.parentNode;for(var o in this.__transition)if(+o!==n)return;i&&i.removeChild(this)}}function e2(){return this.on("end.remove",PS(this._id))}function t2(n){var i=this._name,o=this._id;typeof n!="function"&&(n=wf(n));for(var s=this._groups,c=s.length,f=new Array(c),d=0;d<c;++d)for(var m=s[d],g=m.length,h=f[d]=new Array(g),v,p,b=0;b<g;++b)(v=m[b])&&(p=n.call(v,v.__data__,b,m))&&("__data__"in v&&(p.__data__=v.__data__),h[b]=p,xu(h[b],i,o,b,h,ln(v,o)));return new Xn(f,this._parents,i,o)}function n2(n){var i=this._name,o=this._id;typeof n!="function"&&(n=$g(n));for(var s=this._groups,c=s.length,f=[],d=[],m=0;m<c;++m)for(var g=s[m],h=g.length,v,p=0;p<h;++p)if(v=g[p]){for(var b=n.call(v,v.__data__,p,g),N,_=ln(v,o),C=0,T=b.length;C<T;++C)(N=b[C])&&xu(N,i,o,C,b,_);f.push(b),d.push(v)}return new Xn(f,d,i,o)}var l2=ho.prototype.constructor;function a2(){return new l2(this._groups,this._parents)}function i2(n,i){var o,s,c;return function(){var f=Qa(this,n),d=(this.style.removeProperty(n),Qa(this,n));return f===d?null:f===o&&d===s?c:c=i(o=f,s=d)}}function yp(n){return function(){this.style.removeProperty(n)}}function o2(n,i,o){var s,c=o+"",f;return function(){var d=Qa(this,n);return d===c?null:d===s?f:f=i(s=d,o)}}function s2(n,i,o){var s,c,f;return function(){var d=Qa(this,n),m=o(this),g=m+"";return m==null&&(g=m=(this.style.removeProperty(n),Qa(this,n))),d===g?null:d===s&&g===c?f:(c=g,f=i(s=d,m))}}function u2(n,i){var o,s,c,f="style."+i,d="end."+f,m;return function(){var g=pn(this,n),h=g.on,v=g.value[f]==null?m||(m=yp(i)):void 0;(h!==o||c!==v)&&(s=(o=h).copy()).on(d,c=v),g.on=s}}function c2(n,i,o){var s=(n+="")=="transform"?rS:pp;return i==null?this.styleTween(n,i2(n,s)).on("end.style."+n,yp(n)):typeof i=="function"?this.styleTween(n,s2(n,s,zf(this,"style."+n,i))).each(u2(this._id,n)):this.styleTween(n,o2(n,s,i),o).on("end.style."+n,null)}function r2(n,i,o){return function(s){this.style.setProperty(n,i.call(this,s),o)}}function f2(n,i,o){var s,c;function f(){var d=i.apply(this,arguments);return d!==c&&(s=(c=d)&&r2(n,d,o)),s}return f._value=i,f}function d2(n,i,o){var s="style."+(n+="");if(arguments.length<2)return(s=this.tween(s))&&s._value;if(i==null)return this.tween(s,null);if(typeof i!="function")throw new Error;return this.tween(s,f2(n,i,o??""))}function h2(n){return function(){this.textContent=n}}function m2(n){return function(){var i=n(this);this.textContent=i??""}}function g2(n){return this.tween("text",typeof n=="function"?m2(zf(this,"text",n)):h2(n==null?"":n+""))}function p2(n){return function(i){this.textContent=n.call(this,i)}}function y2(n){var i,o;function s(){var c=n.apply(this,arguments);return c!==o&&(i=(o=c)&&p2(c)),i}return s._value=n,s}function x2(n){var i="text";if(arguments.length<1)return(i=this.tween(i))&&i._value;if(n==null)return this.tween(i,null);if(typeof n!="function")throw new Error;return this.tween(i,y2(n))}function v2(){for(var n=this._name,i=this._id,o=xp(),s=this._groups,c=s.length,f=0;f<c;++f)for(var d=s[f],m=d.length,g,h=0;h<m;++h)if(g=d[h]){var v=ln(g,i);xu(g,n,o,h,d,{time:v.time+v.delay+v.duration,delay:0,duration:v.duration,ease:v.ease})}return new Xn(s,this._parents,n,o)}function b2(){var n,i,o=this,s=o._id,c=o.size();return new Promise(function(f,d){var m={value:d},g={value:function(){--c===0&&f()}};o.each(function(){var h=pn(this,s),v=h.on;v!==n&&(i=(n=v).copy(),i._.cancel.push(m),i._.interrupt.push(m),i._.end.push(g)),h.on=i}),c===0&&f()})}var S2=0;function Xn(n,i,o,s){this._groups=n,this._parents=i,this._name=o,this._id=s}function xp(){return++S2}var Vn=ho.prototype;Xn.prototype={constructor:Xn,select:t2,selectAll:n2,selectChild:Vn.selectChild,selectChildren:Vn.selectChildren,filter:KS,merge:JS,selection:a2,transition:v2,call:Vn.call,nodes:Vn.nodes,node:Vn.node,size:Vn.size,empty:Vn.empty,each:Vn.each,on:IS,attr:DS,attrTween:US,style:c2,styleTween:d2,text:g2,textTween:x2,remove:e2,tween:_S,delay:VS,duration:GS,ease:kS,easeVarying:QS,end:b2,[Symbol.iterator]:Vn[Symbol.iterator]};function E2(n){return((n*=2)<=1?n*n*n:(n-=2)*n*n+2)/2}var N2={time:null,delay:0,duration:250,ease:E2};function w2(n,i){for(var o;!(o=n.__transition)||!(o=o[i]);)if(!(n=n.parentNode))throw new Error(`transition ${i} not found`);return o}function _2(n){var i,o;n instanceof Xn?(i=n._id,n=n._name):(i=xp(),(o=N2).time=Af(),n=n==null?null:n+"");for(var s=this._groups,c=s.length,f=0;f<c;++f)for(var d=s[f],m=d.length,g,h=0;h<m;++h)(g=d[h])&&xu(g,n,i,h,d,o||w2(g,i));return new Xn(s,this._parents,n,i)}ho.prototype.interrupt=ES;ho.prototype.transition=_2;const $s=n=>()=>n;function M2(n,{sourceEvent:i,target:o,transform:s,dispatch:c}){Object.defineProperties(this,{type:{value:n,enumerable:!0,configurable:!0},sourceEvent:{value:i,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},transform:{value:s,enumerable:!0,configurable:!0},_:{value:c}})}function qn(n,i,o){this.k=n,this.x=i,this.y=o}qn.prototype={constructor:qn,scale:function(n){return n===1?this:new qn(this.k*n,this.x,this.y)},translate:function(n,i){return n===0&i===0?this:new qn(this.k,this.x+this.k*n,this.y+this.k*i)},apply:function(n){return[n[0]*this.k+this.x,n[1]*this.k+this.y]},applyX:function(n){return n*this.k+this.x},applyY:function(n){return n*this.k+this.y},invert:function(n){return[(n[0]-this.x)/this.k,(n[1]-this.y)/this.k]},invertX:function(n){return(n-this.x)/this.k},invertY:function(n){return(n-this.y)/this.k},rescaleX:function(n){return n.copy().domain(n.range().map(this.invertX,this).map(n.invert,n))},rescaleY:function(n){return n.copy().domain(n.range().map(this.invertY,this).map(n.invert,n))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var vu=new qn(1,0,0);vp.prototype=qn.prototype;function vp(n){for(;!n.__zoom;)if(!(n=n.parentNode))return vu;return n.__zoom}function Pr(n){n.stopImmediatePropagation()}function Fi(n){n.preventDefault(),n.stopImmediatePropagation()}function C2(n){return(!n.ctrlKey||n.type==="wheel")&&!n.button}function A2(){var n=this;return n instanceof SVGElement?(n=n.ownerSVGElement||n,n.hasAttribute("viewBox")?(n=n.viewBox.baseVal,[[n.x,n.y],[n.x+n.width,n.y+n.height]]):[[0,0],[n.width.baseVal.value,n.height.baseVal.value]]):[[0,0],[n.clientWidth,n.clientHeight]]}function Fm(){return this.__zoom||vu}function T2(n){return-n.deltaY*(n.deltaMode===1?.05:n.deltaMode?1:.002)*(n.ctrlKey?10:1)}function z2(){return navigator.maxTouchPoints||"ontouchstart"in this}function j2(n,i,o){var s=n.invertX(i[0][0])-o[0][0],c=n.invertX(i[1][0])-o[1][0],f=n.invertY(i[0][1])-o[0][1],d=n.invertY(i[1][1])-o[1][1];return n.translate(c>s?(s+c)/2:Math.min(0,s)||Math.max(0,c),d>f?(f+d)/2:Math.min(0,f)||Math.max(0,d))}function bp(){var n=C2,i=A2,o=j2,s=T2,c=z2,f=[0,1/0],d=[[-1/0,-1/0],[1/0,1/0]],m=250,g=Ps,h=gu("start","zoom","end"),v,p,b,N=500,_=150,C=0,T=10;function A(D){D.property("__zoom",Fm).on("wheel.zoom",$,{passive:!1}).on("mousedown.zoom",J).on("dblclick.zoom",se).filter(c).on("touchstart.zoom",k).on("touchmove.zoom",W).on("touchend.zoom touchcancel.zoom",oe).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}A.transform=function(D,Z,M,H){var L=D.selection?D.selection():D;L.property("__zoom",Fm),D!==L?q(D,Z,M,H):L.interrupt().each(function(){B(this,arguments).event(H).start().zoom(null,typeof Z=="function"?Z.apply(this,arguments):Z).end()})},A.scaleBy=function(D,Z,M,H){A.scaleTo(D,function(){var L=this.__zoom.k,G=typeof Z=="function"?Z.apply(this,arguments):Z;return L*G},M,H)},A.scaleTo=function(D,Z,M,H){A.transform(D,function(){var L=i.apply(this,arguments),G=this.__zoom,te=M==null?z(L):typeof M=="function"?M.apply(this,arguments):M,E=G.invert(te),j=typeof Z=="function"?Z.apply(this,arguments):Z;return o(w(Y(G,j),te,E),L,d)},M,H)},A.translateBy=function(D,Z,M,H){A.transform(D,function(){return o(this.__zoom.translate(typeof Z=="function"?Z.apply(this,arguments):Z,typeof M=="function"?M.apply(this,arguments):M),i.apply(this,arguments),d)},null,H)},A.translateTo=function(D,Z,M,H,L){A.transform(D,function(){var G=i.apply(this,arguments),te=this.__zoom,E=H==null?z(G):typeof H=="function"?H.apply(this,arguments):H;return o(vu.translate(E[0],E[1]).scale(te.k).translate(typeof Z=="function"?-Z.apply(this,arguments):-Z,typeof M=="function"?-M.apply(this,arguments):-M),G,d)},H,L)};function Y(D,Z){return Z=Math.max(f[0],Math.min(f[1],Z)),Z===D.k?D:new qn(Z,D.x,D.y)}function w(D,Z,M){var H=Z[0]-M[0]*D.k,L=Z[1]-M[1]*D.k;return H===D.x&&L===D.y?D:new qn(D.k,H,L)}function z(D){return[(+D[0][0]+ +D[1][0])/2,(+D[0][1]+ +D[1][1])/2]}function q(D,Z,M,H){D.on("start.zoom",function(){B(this,arguments).event(H).start()}).on("interrupt.zoom end.zoom",function(){B(this,arguments).event(H).end()}).tween("zoom",function(){var L=this,G=arguments,te=B(L,G).event(H),E=i.apply(L,G),j=M==null?z(E):typeof M=="function"?M.apply(L,G):M,I=Math.max(E[1][0]-E[0][0],E[1][1]-E[0][1]),ee=L.__zoom,ue=typeof Z=="function"?Z.apply(L,G):Z,re=g(ee.invert(j).concat(I/ee.k),ue.invert(j).concat(I/ue.k));return function(fe){if(fe===1)fe=ue;else{var ce=re(fe),ge=I/ce[2];fe=new qn(ge,j[0]-ce[0]*ge,j[1]-ce[1]*ge)}te.zoom(null,fe)}})}function B(D,Z,M){return!M&&D.__zooming||new R(D,Z)}function R(D,Z){this.that=D,this.args=Z,this.active=0,this.sourceEvent=null,this.extent=i.apply(D,Z),this.taps=0}R.prototype={event:function(D){return D&&(this.sourceEvent=D),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(D,Z){return this.mouse&&D!=="mouse"&&(this.mouse[1]=Z.invert(this.mouse[0])),this.touch0&&D!=="touch"&&(this.touch0[1]=Z.invert(this.touch0[0])),this.touch1&&D!=="touch"&&(this.touch1[1]=Z.invert(this.touch1[0])),this.that.__zoom=Z,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(D){var Z=Yt(this.that).datum();h.call(D,this.that,new M2(D,{sourceEvent:this.sourceEvent,target:A,transform:this.that.__zoom,dispatch:h}),Z)}};function $(D,...Z){if(!n.apply(this,arguments))return;var M=B(this,Z).event(D),H=this.__zoom,L=Math.max(f[0],Math.min(f[1],H.k*Math.pow(2,s.apply(this,arguments)))),G=Pt(D);if(M.wheel)(M.mouse[0][0]!==G[0]||M.mouse[0][1]!==G[1])&&(M.mouse[1]=H.invert(M.mouse[0]=G)),clearTimeout(M.wheel);else{if(H.k===L)return;M.mouse=[G,H.invert(G)],nu(this),M.start()}Fi(D),M.wheel=setTimeout(te,_),M.zoom("mouse",o(w(Y(H,L),M.mouse[0],M.mouse[1]),M.extent,d));function te(){M.wheel=null,M.end()}}function J(D,...Z){if(b||!n.apply(this,arguments))return;var M=D.currentTarget,H=B(this,Z,!0).event(D),L=Yt(D.view).on("mousemove.zoom",j,!0).on("mouseup.zoom",I,!0),G=Pt(D,M),te=D.clientX,E=D.clientY;lp(D.view),Pr(D),H.mouse=[G,this.__zoom.invert(G)],nu(this),H.start();function j(ee){if(Fi(ee),!H.moved){var ue=ee.clientX-te,re=ee.clientY-E;H.moved=ue*ue+re*re>C}H.event(ee).zoom("mouse",o(w(H.that.__zoom,H.mouse[0]=Pt(ee,M),H.mouse[1]),H.extent,d))}function I(ee){L.on("mousemove.zoom mouseup.zoom",null),ap(ee.view,H.moved),Fi(ee),H.event(ee).end()}}function se(D,...Z){if(n.apply(this,arguments)){var M=this.__zoom,H=Pt(D.changedTouches?D.changedTouches[0]:D,this),L=M.invert(H),G=M.k*(D.shiftKey?.5:2),te=o(w(Y(M,G),H,L),i.apply(this,Z),d);Fi(D),m>0?Yt(this).transition().duration(m).call(q,te,H,D):Yt(this).call(A.transform,te,H,D)}}function k(D,...Z){if(n.apply(this,arguments)){var M=D.touches,H=M.length,L=B(this,Z,D.changedTouches.length===H).event(D),G,te,E,j;for(Pr(D),te=0;te<H;++te)E=M[te],j=Pt(E,this),j=[j,this.__zoom.invert(j),E.identifier],L.touch0?!L.touch1&&L.touch0[2]!==j[2]&&(L.touch1=j,L.taps=0):(L.touch0=j,G=!0,L.taps=1+!!v);v&&(v=clearTimeout(v)),G&&(L.taps<2&&(p=j[0],v=setTimeout(function(){v=null},N)),nu(this),L.start())}}function W(D,...Z){if(this.__zooming){var M=B(this,Z).event(D),H=D.changedTouches,L=H.length,G,te,E,j;for(Fi(D),G=0;G<L;++G)te=H[G],E=Pt(te,this),M.touch0&&M.touch0[2]===te.identifier?M.touch0[0]=E:M.touch1&&M.touch1[2]===te.identifier&&(M.touch1[0]=E);if(te=M.that.__zoom,M.touch1){var I=M.touch0[0],ee=M.touch0[1],ue=M.touch1[0],re=M.touch1[1],fe=(fe=ue[0]-I[0])*fe+(fe=ue[1]-I[1])*fe,ce=(ce=re[0]-ee[0])*ce+(ce=re[1]-ee[1])*ce;te=Y(te,Math.sqrt(fe/ce)),E=[(I[0]+ue[0])/2,(I[1]+ue[1])/2],j=[(ee[0]+re[0])/2,(ee[1]+re[1])/2]}else if(M.touch0)E=M.touch0[0],j=M.touch0[1];else return;M.zoom("touch",o(w(te,E,j),M.extent,d))}}function oe(D,...Z){if(this.__zooming){var M=B(this,Z).event(D),H=D.changedTouches,L=H.length,G,te;for(Pr(D),b&&clearTimeout(b),b=setTimeout(function(){b=null},N),G=0;G<L;++G)te=H[G],M.touch0&&M.touch0[2]===te.identifier?delete M.touch0:M.touch1&&M.touch1[2]===te.identifier&&delete M.touch1;if(M.touch1&&!M.touch0&&(M.touch0=M.touch1,delete M.touch1),M.touch0)M.touch0[1]=this.__zoom.invert(M.touch0[0]);else if(M.end(),M.taps===2&&(te=Pt(te,this),Math.hypot(p[0]-te[0],p[1]-te[1])<T)){var E=Yt(this).on("dblclick.zoom");E&&E.apply(this,arguments)}}}return A.wheelDelta=function(D){return arguments.length?(s=typeof D=="function"?D:$s(+D),A):s},A.filter=function(D){return arguments.length?(n=typeof D=="function"?D:$s(!!D),A):n},A.touchable=function(D){return arguments.length?(c=typeof D=="function"?D:$s(!!D),A):c},A.extent=function(D){return arguments.length?(i=typeof D=="function"?D:$s([[+D[0][0],+D[0][1]],[+D[1][0],+D[1][1]]]),A):i},A.scaleExtent=function(D){return arguments.length?(f[0]=+D[0],f[1]=+D[1],A):[f[0],f[1]]},A.translateExtent=function(D){return arguments.length?(d[0][0]=+D[0][0],d[1][0]=+D[1][0],d[0][1]=+D[0][1],d[1][1]=+D[1][1],A):[[d[0][0],d[0][1]],[d[1][0],d[1][1]]]},A.constrain=function(D){return arguments.length?(o=D,A):o},A.duration=function(D){return arguments.length?(m=+D,A):m},A.interpolate=function(D){return arguments.length?(g=D,A):g},A.on=function(){var D=h.on.apply(h,arguments);return D===h?A:D},A.clickDistance=function(D){return arguments.length?(C=(D=+D)*D,A):Math.sqrt(C)},A.tapDistance=function(D){return arguments.length?(T=+D,A):T},A}const gn={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:n=>`Node type "${n}" 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:n=>`The old edge with id=${n} does not exist.`,error009:n=>`Marker type "${n}" doesn't exist.`,error008:(n,{id:i,sourceHandle:o,targetHandle:s})=>`Couldn't create edge for ${n} handle id: "${n==="source"?o:s}", edge id: ${i}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:n=>`Edge type "${n}" not found. Using fallback type "default".`,error012:n=>`Node with id "${n}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(n="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${n}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},oo=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Sp=["Enter"," ","Escape"],Ep={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:n,x:i,y:o})=>`Moved selected node ${n}. New position, x: ${i}, y: ${o}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Ja;(function(n){n.Strict="strict",n.Loose="loose"})(Ja||(Ja={}));var Jl;(function(n){n.Free="free",n.Vertical="vertical",n.Horizontal="horizontal"})(Jl||(Jl={}));var so;(function(n){n.Partial="partial",n.Full="full"})(so||(so={}));const Np={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var Sl;(function(n){n.Bezier="default",n.Straight="straight",n.Step="step",n.SmoothStep="smoothstep",n.SimpleBezier="simplebezier"})(Sl||(Sl={}));var fu;(function(n){n.Arrow="arrow",n.ArrowClosed="arrowclosed"})(fu||(fu={}));var xe;(function(n){n.Left="left",n.Top="top",n.Right="right",n.Bottom="bottom"})(xe||(xe={}));const Wm={[xe.Left]:xe.Right,[xe.Right]:xe.Left,[xe.Top]:xe.Bottom,[xe.Bottom]:xe.Top};function wp(n){return n===null?null:n?"valid":"invalid"}const _p=n=>"id"in n&&"source"in n&&"target"in n,D2=n=>"id"in n&&"position"in n&&!("source"in n)&&!("target"in n),jf=n=>"id"in n&&"internals"in n&&!("source"in n)&&!("target"in n),go=(n,i=[0,0])=>{const{width:o,height:s}=Gn(n),c=n.origin??i,f=o*c[0],d=s*c[1];return{x:n.position.x-f,y:n.position.y-d}},O2=(n,i={nodeOrigin:[0,0]})=>{if(n.length===0)return{x:0,y:0,width:0,height:0};const o=n.reduce((s,c)=>{const f=typeof c=="string";let d=!i.nodeLookup&&!f?c:void 0;i.nodeLookup&&(d=f?i.nodeLookup.get(c):jf(c)?c:i.nodeLookup.get(c.id));const m=d?du(d,i.nodeOrigin):{x:0,y:0,x2:0,y2:0};return bu(s,m)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Su(o)},po=(n,i={})=>{let o={x:1/0,y:1/0,x2:-1/0,y2:-1/0},s=!1;return n.forEach(c=>{(i.filter===void 0||i.filter(c))&&(o=bu(o,du(c)),s=!0)}),s?Su(o):{x:0,y:0,width:0,height:0}},Df=(n,i,[o,s,c]=[0,0,1],f=!1,d=!1)=>{const m={...xo(i,[o,s,c]),width:i.width/c,height:i.height/c},g=[];for(const h of n.values()){const{measured:v,selectable:p=!0,hidden:b=!1}=h;if(d&&!p||b)continue;const N=v.width??h.width??h.initialWidth??null,_=v.height??h.height??h.initialHeight??null,C=uo(m,Wa(h)),T=(N??0)*(_??0),A=f&&C>0;(!h.internals.handleBounds||A||C>=T||h.dragging)&&g.push(h)}return g},H2=(n,i)=>{const o=new Set;return n.forEach(s=>{o.add(s.id)}),i.filter(s=>o.has(s.source)||o.has(s.target))};function R2(n,i){const o=new Map,s=i?.nodes?new Set(i.nodes.map(c=>c.id)):null;return n.forEach(c=>{c.measured.width&&c.measured.height&&(i?.includeHiddenNodes||!c.hidden)&&(!s||s.has(c.id))&&o.set(c.id,c)}),o}async function B2({nodes:n,width:i,height:o,panZoom:s,minZoom:c,maxZoom:f},d){if(n.size===0)return Promise.resolve(!0);const m=R2(n,d),g=po(m),h=Of(g,i,o,d?.minZoom??c,d?.maxZoom??f,d?.padding??.1);return await s.setViewport(h,{duration:d?.duration,ease:d?.ease,interpolate:d?.interpolate}),Promise.resolve(!0)}function Mp({nodeId:n,nextPosition:i,nodeLookup:o,nodeOrigin:s=[0,0],nodeExtent:c,onError:f}){const d=o.get(n),m=d.parentId?o.get(d.parentId):void 0,{x:g,y:h}=m?m.internals.positionAbsolute:{x:0,y:0},v=d.origin??s;let p=d.extent||c;if(d.extent==="parent"&&!d.expandParent)if(!m)f?.("005",gn.error005());else{const N=m.measured.width,_=m.measured.height;N&&_&&(p=[[g,h],[g+N,h+_]])}else m&&Ia(d.extent)&&(p=[[d.extent[0][0]+g,d.extent[0][1]+h],[d.extent[1][0]+g,d.extent[1][1]+h]]);const b=Ia(p)?Il(i,p,d.measured):i;return(d.measured.width===void 0||d.measured.height===void 0)&&f?.("015",gn.error015()),{position:{x:b.x-g+(d.measured.width??0)*v[0],y:b.y-h+(d.measured.height??0)*v[1]},positionAbsolute:b}}async function U2({nodesToRemove:n=[],edgesToRemove:i=[],nodes:o,edges:s,onBeforeDelete:c}){const f=new Set(n.map(b=>b.id)),d=[];for(const b of o){if(b.deletable===!1)continue;const N=f.has(b.id),_=!N&&b.parentId&&d.find(C=>C.id===b.parentId);(N||_)&&d.push(b)}const m=new Set(i.map(b=>b.id)),g=s.filter(b=>b.deletable!==!1),v=H2(d,g);for(const b of g)m.has(b.id)&&!v.find(_=>_.id===b.id)&&v.push(b);if(!c)return{edges:v,nodes:d};const p=await c({nodes:d,edges:v});return typeof p=="boolean"?p?{edges:v,nodes:d}:{edges:[],nodes:[]}:p}const Fa=(n,i=0,o=1)=>Math.min(Math.max(n,i),o),Il=(n={x:0,y:0},i,o)=>({x:Fa(n.x,i[0][0],i[1][0]-(o?.width??0)),y:Fa(n.y,i[0][1],i[1][1]-(o?.height??0))});function Cp(n,i,o){const{width:s,height:c}=Gn(o),{x:f,y:d}=o.internals.positionAbsolute;return Il(n,[[f,d],[f+s,d+c]],i)}const Im=(n,i,o)=>n<i?Fa(Math.abs(n-i),1,i)/i:n>o?-Fa(Math.abs(n-o),1,i)/i:0,Ap=(n,i,o=15,s=40)=>{const c=Im(n.x,s,i.width-s)*o,f=Im(n.y,s,i.height-s)*o;return[c,f]},bu=(n,i)=>({x:Math.min(n.x,i.x),y:Math.min(n.y,i.y),x2:Math.max(n.x2,i.x2),y2:Math.max(n.y2,i.y2)}),xf=({x:n,y:i,width:o,height:s})=>({x:n,y:i,x2:n+o,y2:i+s}),Su=({x:n,y:i,x2:o,y2:s})=>({x:n,y:i,width:o-n,height:s-i}),Wa=(n,i=[0,0])=>{const{x:o,y:s}=jf(n)?n.internals.positionAbsolute:go(n,i);return{x:o,y:s,width:n.measured?.width??n.width??n.initialWidth??0,height:n.measured?.height??n.height??n.initialHeight??0}},du=(n,i=[0,0])=>{const{x:o,y:s}=jf(n)?n.internals.positionAbsolute:go(n,i);return{x:o,y:s,x2:o+(n.measured?.width??n.width??n.initialWidth??0),y2:s+(n.measured?.height??n.height??n.initialHeight??0)}},Tp=(n,i)=>Su(bu(xf(n),xf(i))),uo=(n,i)=>{const o=Math.max(0,Math.min(n.x+n.width,i.x+i.width)-Math.max(n.x,i.x)),s=Math.max(0,Math.min(n.y+n.height,i.y+i.height)-Math.max(n.y,i.y));return Math.ceil(o*s)},Pm=n=>tn(n.width)&&tn(n.height)&&tn(n.x)&&tn(n.y),tn=n=>!isNaN(n)&&isFinite(n),L2=(n,i)=>{},yo=(n,i=[1,1])=>({x:i[0]*Math.round(n.x/i[0]),y:i[1]*Math.round(n.y/i[1])}),xo=({x:n,y:i},[o,s,c],f=!1,d=[1,1])=>{const m={x:(n-o)/c,y:(i-s)/c};return f?yo(m,d):m},hu=({x:n,y:i},[o,s,c])=>({x:n*c+o,y:i*c+s});function qa(n,i){if(typeof n=="number")return Math.floor((i-i/(1+n))*.5);if(typeof n=="string"&&n.endsWith("px")){const o=parseFloat(n);if(!Number.isNaN(o))return Math.floor(o)}if(typeof n=="string"&&n.endsWith("%")){const o=parseFloat(n);if(!Number.isNaN(o))return Math.floor(i*o*.01)}return console.error(`[React Flow] The padding value "${n}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function Y2(n,i,o){if(typeof n=="string"||typeof n=="number"){const s=qa(n,o),c=qa(n,i);return{top:s,right:c,bottom:s,left:c,x:c*2,y:s*2}}if(typeof n=="object"){const s=qa(n.top??n.y??0,o),c=qa(n.bottom??n.y??0,o),f=qa(n.left??n.x??0,i),d=qa(n.right??n.x??0,i);return{top:s,right:d,bottom:c,left:f,x:f+d,y:s+c}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function V2(n,i,o,s,c,f){const{x:d,y:m}=hu(n,[i,o,s]),{x:g,y:h}=hu({x:n.x+n.width,y:n.y+n.height},[i,o,s]),v=c-g,p=f-h;return{left:Math.floor(d),top:Math.floor(m),right:Math.floor(v),bottom:Math.floor(p)}}const Of=(n,i,o,s,c,f)=>{const d=Y2(f,i,o),m=(i-d.x)/n.width,g=(o-d.y)/n.height,h=Math.min(m,g),v=Fa(h,s,c),p=n.x+n.width/2,b=n.y+n.height/2,N=i/2-p*v,_=o/2-b*v,C=V2(n,N,_,v,i,o),T={left:Math.min(C.left-d.left,0),top:Math.min(C.top-d.top,0),right:Math.min(C.right-d.right,0),bottom:Math.min(C.bottom-d.bottom,0)};return{x:N-T.left+T.right,y:_-T.top+T.bottom,zoom:v}},co=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function Ia(n){return n!=null&&n!=="parent"}function Gn(n){return{width:n.measured?.width??n.width??n.initialWidth??0,height:n.measured?.height??n.height??n.initialHeight??0}}function zp(n){return(n.measured?.width??n.width??n.initialWidth)!==void 0&&(n.measured?.height??n.height??n.initialHeight)!==void 0}function jp(n,i={width:0,height:0},o,s,c){const f={...n},d=s.get(o);if(d){const m=d.origin||c;f.x+=d.internals.positionAbsolute.x-(i.width??0)*m[0],f.y+=d.internals.positionAbsolute.y-(i.height??0)*m[1]}return f}function eg(n,i){if(n.size!==i.size)return!1;for(const o of n)if(!i.has(o))return!1;return!0}function q2(){let n,i;return{promise:new Promise((s,c)=>{n=s,i=c}),resolve:n,reject:i}}function X2(n){return{...Ep,...n||{}}}function to(n,{snapGrid:i=[0,0],snapToGrid:o=!1,transform:s,containerBounds:c}){const{x:f,y:d}=nn(n),m=xo({x:f-(c?.left??0),y:d-(c?.top??0)},s),{x:g,y:h}=o?yo(m,i):m;return{xSnapped:g,ySnapped:h,...m}}const Hf=n=>({width:n.offsetWidth,height:n.offsetHeight}),Dp=n=>n?.getRootNode?.()||window?.document,G2=["INPUT","SELECT","TEXTAREA"];function Op(n){const i=n.composedPath?.()?.[0]||n.target;return i?.nodeType!==1?!1:G2.includes(i.nodeName)||i.hasAttribute("contenteditable")||!!i.closest(".nokey")}const Hp=n=>"clientX"in n,nn=(n,i)=>{const o=Hp(n),s=o?n.clientX:n.touches?.[0].clientX,c=o?n.clientY:n.touches?.[0].clientY;return{x:s-(i?.left??0),y:c-(i?.top??0)}},tg=(n,i,o,s,c)=>{const f=i.querySelectorAll(`.${n}`);return!f||!f.length?null:Array.from(f).map(d=>{const m=d.getBoundingClientRect();return{id:d.getAttribute("data-handleid"),type:n,nodeId:c,position:d.getAttribute("data-handlepos"),x:(m.left-o.left)/s,y:(m.top-o.top)/s,...Hf(d)}})};function Rp({sourceX:n,sourceY:i,targetX:o,targetY:s,sourceControlX:c,sourceControlY:f,targetControlX:d,targetControlY:m}){const g=n*.125+c*.375+d*.375+o*.125,h=i*.125+f*.375+m*.375+s*.125,v=Math.abs(g-n),p=Math.abs(h-i);return[g,h,v,p]}function Qs(n,i){return n>=0?.5*n:i*25*Math.sqrt(-n)}function ng({pos:n,x1:i,y1:o,x2:s,y2:c,c:f}){switch(n){case xe.Left:return[i-Qs(i-s,f),o];case xe.Right:return[i+Qs(s-i,f),o];case xe.Top:return[i,o-Qs(o-c,f)];case xe.Bottom:return[i,o+Qs(c-o,f)]}}function Bp({sourceX:n,sourceY:i,sourcePosition:o=xe.Bottom,targetX:s,targetY:c,targetPosition:f=xe.Top,curvature:d=.25}){const[m,g]=ng({pos:o,x1:n,y1:i,x2:s,y2:c,c:d}),[h,v]=ng({pos:f,x1:s,y1:c,x2:n,y2:i,c:d}),[p,b,N,_]=Rp({sourceX:n,sourceY:i,targetX:s,targetY:c,sourceControlX:m,sourceControlY:g,targetControlX:h,targetControlY:v});return[`M${n},${i} C${m},${g} ${h},${v} ${s},${c}`,p,b,N,_]}function Up({sourceX:n,sourceY:i,targetX:o,targetY:s}){const c=Math.abs(o-n)/2,f=o<n?o+c:o-c,d=Math.abs(s-i)/2,m=s<i?s+d:s-d;return[f,m,c,d]}function Z2({sourceNode:n,targetNode:i,selected:o=!1,zIndex:s=0,elevateOnSelect:c=!1,zIndexMode:f="basic"}){if(f==="manual")return s;const d=c&&o?s+1e3:s,m=Math.max(n.parentId||c&&n.selected?n.internals.z:0,i.parentId||c&&i.selected?i.internals.z:0);return d+m}function k2({sourceNode:n,targetNode:i,width:o,height:s,transform:c}){const f=bu(du(n),du(i));f.x===f.x2&&(f.x2+=1),f.y===f.y2&&(f.y2+=1);const d={x:-c[0]/c[2],y:-c[1]/c[2],width:o/c[2],height:s/c[2]};return uo(d,Su(f))>0}const $2=({source:n,sourceHandle:i,target:o,targetHandle:s})=>`xy-edge__${n}${i||""}-${o}${s||""}`,Q2=(n,i)=>i.some(o=>o.source===n.source&&o.target===n.target&&(o.sourceHandle===n.sourceHandle||!o.sourceHandle&&!n.sourceHandle)&&(o.targetHandle===n.targetHandle||!o.targetHandle&&!n.targetHandle)),K2=(n,i,o={})=>{if(!n.source||!n.target)return i;const s=o.getEdgeId||$2;let c;return _p(n)?c={...n}:c={...n,id:s(n)},Q2(c,i)?i:(c.sourceHandle===null&&delete c.sourceHandle,c.targetHandle===null&&delete c.targetHandle,i.concat(c))};function Lp({sourceX:n,sourceY:i,targetX:o,targetY:s}){const[c,f,d,m]=Up({sourceX:n,sourceY:i,targetX:o,targetY:s});return[`M ${n},${i}L ${o},${s}`,c,f,d,m]}const lg={[xe.Left]:{x:-1,y:0},[xe.Right]:{x:1,y:0},[xe.Top]:{x:0,y:-1},[xe.Bottom]:{x:0,y:1}},J2=({source:n,sourcePosition:i=xe.Bottom,target:o})=>i===xe.Left||i===xe.Right?n.x<o.x?{x:1,y:0}:{x:-1,y:0}:n.y<o.y?{x:0,y:1}:{x:0,y:-1},ag=(n,i)=>Math.sqrt(Math.pow(i.x-n.x,2)+Math.pow(i.y-n.y,2));function F2({source:n,sourcePosition:i=xe.Bottom,target:o,targetPosition:s=xe.Top,center:c,offset:f,stepPosition:d}){const m=lg[i],g=lg[s],h={x:n.x+m.x*f,y:n.y+m.y*f},v={x:o.x+g.x*f,y:o.y+g.y*f},p=J2({source:h,sourcePosition:i,target:v}),b=p.x!==0?"x":"y",N=p[b];let _=[],C,T;const A={x:0,y:0},Y={x:0,y:0},[,,w,z]=Up({sourceX:n.x,sourceY:n.y,targetX:o.x,targetY:o.y});if(m[b]*g[b]===-1){b==="x"?(C=c.x??h.x+(v.x-h.x)*d,T=c.y??(h.y+v.y)/2):(C=c.x??(h.x+v.x)/2,T=c.y??h.y+(v.y-h.y)*d);const B=[{x:C,y:h.y},{x:C,y:v.y}],R=[{x:h.x,y:T},{x:v.x,y:T}];m[b]===N?_=b==="x"?B:R:_=b==="x"?R:B}else{const B=[{x:h.x,y:v.y}],R=[{x:v.x,y:h.y}];if(b==="x"?_=m.x===N?R:B:_=m.y===N?B:R,i===s){const W=Math.abs(n[b]-o[b]);if(W<=f){const oe=Math.min(f-1,f-W);m[b]===N?A[b]=(h[b]>n[b]?-1:1)*oe:Y[b]=(v[b]>o[b]?-1:1)*oe}}if(i!==s){const W=b==="x"?"y":"x",oe=m[b]===g[W],D=h[W]>v[W],Z=h[W]<v[W];(m[b]===1&&(!oe&&D||oe&&Z)||m[b]!==1&&(!oe&&Z||oe&&D))&&(_=b==="x"?B:R)}const $={x:h.x+A.x,y:h.y+A.y},J={x:v.x+Y.x,y:v.y+Y.y},se=Math.max(Math.abs($.x-_[0].x),Math.abs(J.x-_[0].x)),k=Math.max(Math.abs($.y-_[0].y),Math.abs(J.y-_[0].y));se>=k?(C=($.x+J.x)/2,T=_[0].y):(C=_[0].x,T=($.y+J.y)/2)}return[[n,{x:h.x+A.x,y:h.y+A.y},..._,{x:v.x+Y.x,y:v.y+Y.y},o],C,T,w,z]}function W2(n,i,o,s){const c=Math.min(ag(n,i)/2,ag(i,o)/2,s),{x:f,y:d}=i;if(n.x===f&&f===o.x||n.y===d&&d===o.y)return`L${f} ${d}`;if(n.y===d){const h=n.x<o.x?-1:1,v=n.y<o.y?1:-1;return`L ${f+c*h},${d}Q ${f},${d} ${f},${d+c*v}`}const m=n.x<o.x?1:-1,g=n.y<o.y?-1:1;return`L ${f},${d+c*g}Q ${f},${d} ${f+c*m},${d}`}function vf({sourceX:n,sourceY:i,sourcePosition:o=xe.Bottom,targetX:s,targetY:c,targetPosition:f=xe.Top,borderRadius:d=5,centerX:m,centerY:g,offset:h=20,stepPosition:v=.5}){const[p,b,N,_,C]=F2({source:{x:n,y:i},sourcePosition:o,target:{x:s,y:c},targetPosition:f,center:{x:m,y:g},offset:h,stepPosition:v});return[p.reduce((A,Y,w)=>{let z="";return w>0&&w<p.length-1?z=W2(p[w-1],Y,p[w+1],d):z=`${w===0?"M":"L"}${Y.x} ${Y.y}`,A+=z,A},""),b,N,_,C]}function ig(n){return n&&!!(n.internals.handleBounds||n.handles?.length)&&!!(n.measured.width||n.width||n.initialWidth)}function I2(n){const{sourceNode:i,targetNode:o}=n;if(!ig(i)||!ig(o))return null;const s=i.internals.handleBounds||og(i.handles),c=o.internals.handleBounds||og(o.handles),f=sg(s?.source??[],n.sourceHandle),d=sg(n.connectionMode===Ja.Strict?c?.target??[]:(c?.target??[]).concat(c?.source??[]),n.targetHandle);if(!f||!d)return n.onError?.("008",gn.error008(f?"target":"source",{id:n.id,sourceHandle:n.sourceHandle,targetHandle:n.targetHandle})),null;const m=f?.position||xe.Bottom,g=d?.position||xe.Top,h=Pl(i,f,m),v=Pl(o,d,g);return{sourceX:h.x,sourceY:h.y,targetX:v.x,targetY:v.y,sourcePosition:m,targetPosition:g}}function og(n){if(!n)return null;const i=[],o=[];for(const s of n)s.width=s.width??1,s.height=s.height??1,s.type==="source"?i.push(s):s.type==="target"&&o.push(s);return{source:i,target:o}}function Pl(n,i,o=xe.Left,s=!1){const c=(i?.x??0)+n.internals.positionAbsolute.x,f=(i?.y??0)+n.internals.positionAbsolute.y,{width:d,height:m}=i??Gn(n);if(s)return{x:c+d/2,y:f+m/2};switch(i?.position??o){case xe.Top:return{x:c+d/2,y:f};case xe.Right:return{x:c+d,y:f+m/2};case xe.Bottom:return{x:c+d/2,y:f+m};case xe.Left:return{x:c,y:f+m/2}}}function sg(n,i){return n&&(i?n.find(o=>o.id===i):n[0])||null}function bf(n,i){return n?typeof n=="string"?n:`${i?`${i}__`:""}${Object.keys(n).sort().map(s=>`${s}=${n[s]}`).join("&")}`:""}function P2(n,{id:i,defaultColor:o,defaultMarkerStart:s,defaultMarkerEnd:c}){const f=new Set;return n.reduce((d,m)=>([m.markerStart||s,m.markerEnd||c].forEach(g=>{if(g&&typeof g=="object"){const h=bf(g,i);f.has(h)||(d.push({id:h,color:g.color||o,...g}),f.add(h))}}),d),[]).sort((d,m)=>d.id.localeCompare(m.id))}const Yp=1e3,eE=10,Rf={nodeOrigin:[0,0],nodeExtent:oo,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},tE={...Rf,checkEquality:!0};function Bf(n,i){const o={...n};for(const s in i)i[s]!==void 0&&(o[s]=i[s]);return o}function nE(n,i,o){const s=Bf(Rf,o);for(const c of n.values())if(c.parentId)Lf(c,n,i,s);else{const f=go(c,s.nodeOrigin),d=Ia(c.extent)?c.extent:s.nodeExtent,m=Il(f,d,Gn(c));c.internals.positionAbsolute=m}}function lE(n,i){if(!n.handles)return n.measured?i?.internals.handleBounds:void 0;const o=[],s=[];for(const c of n.handles){const f={id:c.id,width:c.width??1,height:c.height??1,nodeId:n.id,x:c.x,y:c.y,position:c.position,type:c.type};c.type==="source"?o.push(f):c.type==="target"&&s.push(f)}return{source:o,target:s}}function Uf(n){return n==="manual"}function Sf(n,i,o,s={}){const c=Bf(tE,s),f={i:0},d=new Map(i),m=c?.elevateNodesOnSelect&&!Uf(c.zIndexMode)?Yp:0;let g=n.length>0;i.clear(),o.clear();for(const h of n){let v=d.get(h.id);if(c.checkEquality&&h===v?.internals.userNode)i.set(h.id,v);else{const p=go(h,c.nodeOrigin),b=Ia(h.extent)?h.extent:c.nodeExtent,N=Il(p,b,Gn(h));v={...c.defaults,...h,measured:{width:h.measured?.width,height:h.measured?.height},internals:{positionAbsolute:N,handleBounds:lE(h,v),z:Vp(h,m,c.zIndexMode),userNode:h}},i.set(h.id,v)}(v.measured===void 0||v.measured.width===void 0||v.measured.height===void 0)&&!v.hidden&&(g=!1),h.parentId&&Lf(v,i,o,s,f)}return g}function aE(n,i){if(!n.parentId)return;const o=i.get(n.parentId);o?o.set(n.id,n):i.set(n.parentId,new Map([[n.id,n]]))}function Lf(n,i,o,s,c){const{elevateNodesOnSelect:f,nodeOrigin:d,nodeExtent:m,zIndexMode:g}=Bf(Rf,s),h=n.parentId,v=i.get(h);if(!v){console.warn(`Parent node ${h} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}aE(n,o),c&&!v.parentId&&v.internals.rootParentIndex===void 0&&g==="auto"&&(v.internals.rootParentIndex=++c.i,v.internals.z=v.internals.z+c.i*eE),c&&v.internals.rootParentIndex!==void 0&&(c.i=v.internals.rootParentIndex);const p=f&&!Uf(g)?Yp:0,{x:b,y:N,z:_}=iE(n,v,d,m,p,g),{positionAbsolute:C}=n.internals,T=b!==C.x||N!==C.y;(T||_!==n.internals.z)&&i.set(n.id,{...n,internals:{...n.internals,positionAbsolute:T?{x:b,y:N}:C,z:_}})}function Vp(n,i,o){const s=tn(n.zIndex)?n.zIndex:0;return Uf(o)?s:s+(n.selected?i:0)}function iE(n,i,o,s,c,f){const{x:d,y:m}=i.internals.positionAbsolute,g=Gn(n),h=go(n,o),v=Ia(n.extent)?Il(h,n.extent,g):h;let p=Il({x:d+v.x,y:m+v.y},s,g);n.extent==="parent"&&(p=Cp(p,g,i));const b=Vp(n,c,f),N=i.internals.z??0;return{x:p.x,y:p.y,z:N>=b?N+1:b}}function Yf(n,i,o,s=[0,0]){const c=[],f=new Map;for(const d of n){const m=i.get(d.parentId);if(!m)continue;const g=f.get(d.parentId)?.expandedRect??Wa(m),h=Tp(g,d.rect);f.set(d.parentId,{expandedRect:h,parent:m})}return f.size>0&&f.forEach(({expandedRect:d,parent:m},g)=>{const h=m.internals.positionAbsolute,v=Gn(m),p=m.origin??s,b=d.x<h.x?Math.round(Math.abs(h.x-d.x)):0,N=d.y<h.y?Math.round(Math.abs(h.y-d.y)):0,_=Math.max(v.width,Math.round(d.width)),C=Math.max(v.height,Math.round(d.height)),T=(_-v.width)*p[0],A=(C-v.height)*p[1];(b>0||N>0||T||A)&&(c.push({id:g,type:"position",position:{x:m.position.x-b+T,y:m.position.y-N+A}}),o.get(g)?.forEach(Y=>{n.some(w=>w.id===Y.id)||c.push({id:Y.id,type:"position",position:{x:Y.position.x+b,y:Y.position.y+N}})})),(v.width<d.width||v.height<d.height||b||N)&&c.push({id:g,type:"dimensions",setAttributes:!0,dimensions:{width:_+(b?p[0]*b-T:0),height:C+(N?p[1]*N-A:0)}})}),c}function oE(n,i,o,s,c,f,d){const m=s?.querySelector(".xyflow__viewport");let g=!1;if(!m)return{changes:[],updatedInternals:g};const h=[],v=window.getComputedStyle(m),{m22:p}=new window.DOMMatrixReadOnly(v.transform),b=[];for(const N of n.values()){const _=i.get(N.id);if(!_)continue;if(_.hidden){i.set(_.id,{..._,internals:{..._.internals,handleBounds:void 0}}),g=!0;continue}const C=Hf(N.nodeElement),T=_.measured.width!==C.width||_.measured.height!==C.height;if(!!(C.width&&C.height&&(T||!_.internals.handleBounds||N.force))){const Y=N.nodeElement.getBoundingClientRect(),w=Ia(_.extent)?_.extent:f;let{positionAbsolute:z}=_.internals;_.parentId&&_.extent==="parent"?z=Cp(z,C,i.get(_.parentId)):w&&(z=Il(z,w,C));const q={..._,measured:C,internals:{..._.internals,positionAbsolute:z,handleBounds:{source:tg("source",N.nodeElement,Y,p,_.id),target:tg("target",N.nodeElement,Y,p,_.id)}}};i.set(_.id,q),_.parentId&&Lf(q,i,o,{nodeOrigin:c,zIndexMode:d}),g=!0,T&&(h.push({id:_.id,type:"dimensions",dimensions:C}),_.expandParent&&_.parentId&&b.push({id:_.id,parentId:_.parentId,rect:Wa(q,c)}))}}if(b.length>0){const N=Yf(b,i,o,c);h.push(...N)}return{changes:h,updatedInternals:g}}async function sE({delta:n,panZoom:i,transform:o,translateExtent:s,width:c,height:f}){if(!i||!n.x&&!n.y)return Promise.resolve(!1);const d=await i.setViewportConstrained({x:o[0]+n.x,y:o[1]+n.y,zoom:o[2]},[[0,0],[c,f]],s),m=!!d&&(d.x!==o[0]||d.y!==o[1]||d.k!==o[2]);return Promise.resolve(m)}function ug(n,i,o,s,c,f){let d=c;const m=s.get(d)||new Map;s.set(d,m.set(o,i)),d=`${c}-${n}`;const g=s.get(d)||new Map;if(s.set(d,g.set(o,i)),f){d=`${c}-${n}-${f}`;const h=s.get(d)||new Map;s.set(d,h.set(o,i))}}function qp(n,i,o){n.clear(),i.clear();for(const s of o){const{source:c,target:f,sourceHandle:d=null,targetHandle:m=null}=s,g={edgeId:s.id,source:c,target:f,sourceHandle:d,targetHandle:m},h=`${c}-${d}--${f}-${m}`,v=`${f}-${m}--${c}-${d}`;ug("source",g,v,n,c,d),ug("target",g,h,n,f,m),i.set(s.id,s)}}function Xp(n,i){if(!n.parentId)return!1;const o=i.get(n.parentId);return o?o.selected?!0:Xp(o,i):!1}function cg(n,i,o){let s=n;do{if(s?.matches?.(i))return!0;if(s===o)return!1;s=s?.parentElement}while(s);return!1}function uE(n,i,o,s){const c=new Map;for(const[f,d]of n)if((d.selected||d.id===s)&&(!d.parentId||!Xp(d,n))&&(d.draggable||i&&typeof d.draggable>"u")){const m=n.get(f);m&&c.set(f,{id:f,position:m.position||{x:0,y:0},distance:{x:o.x-m.internals.positionAbsolute.x,y:o.y-m.internals.positionAbsolute.y},extent:m.extent,parentId:m.parentId,origin:m.origin,expandParent:m.expandParent,internals:{positionAbsolute:m.internals.positionAbsolute||{x:0,y:0}},measured:{width:m.measured.width??0,height:m.measured.height??0}})}return c}function ef({nodeId:n,dragItems:i,nodeLookup:o,dragging:s=!0}){const c=[];for(const[d,m]of i){const g=o.get(d)?.internals.userNode;g&&c.push({...g,position:m.position,dragging:s})}if(!n)return[c[0],c];const f=o.get(n)?.internals.userNode;return[f?{...f,position:i.get(n)?.position||f.position,dragging:s}:c[0],c]}function cE({dragItems:n,snapGrid:i,x:o,y:s}){const c=n.values().next().value;if(!c)return null;const f={x:o-c.distance.x,y:s-c.distance.y},d=yo(f,i);return{x:d.x-f.x,y:d.y-f.y}}function rE({onNodeMouseDown:n,getStoreItems:i,onDragStart:o,onDrag:s,onDragStop:c}){let f={x:null,y:null},d=0,m=new Map,g=!1,h={x:0,y:0},v=null,p=!1,b=null,N=!1,_=!1,C=null;function T({noDragClassName:Y,handleSelector:w,domNode:z,isSelectable:q,nodeId:B,nodeClickDistance:R=0}){b=Yt(z);function $({x:W,y:oe}){const{nodeLookup:D,nodeExtent:Z,snapGrid:M,snapToGrid:H,nodeOrigin:L,onNodeDrag:G,onSelectionDrag:te,onError:E,updateNodePositions:j}=i();f={x:W,y:oe};let I=!1;const ee=m.size>1,ue=ee&&Z?xf(po(m)):null,re=ee&&H?cE({dragItems:m,snapGrid:M,x:W,y:oe}):null;for(const[fe,ce]of m){if(!D.has(fe))continue;let ge={x:W-ce.distance.x,y:oe-ce.distance.y};H&&(ge=re?{x:Math.round(ge.x+re.x),y:Math.round(ge.y+re.y)}:yo(ge,M));let le=null;if(ee&&Z&&!ce.extent&&ue){const{positionAbsolute:pe}=ce.internals,me=pe.x-ue.x+Z[0][0],_e=pe.x+ce.measured.width-ue.x2+Z[1][0],Se=pe.y-ue.y+Z[0][1],Be=pe.y+ce.measured.height-ue.y2+Z[1][1];le=[[me,Se],[_e,Be]]}const{position:he,positionAbsolute:de}=Mp({nodeId:fe,nextPosition:ge,nodeLookup:D,nodeExtent:le||Z,nodeOrigin:L,onError:E});I=I||ce.position.x!==he.x||ce.position.y!==he.y,ce.position=he,ce.internals.positionAbsolute=de}if(_=_||I,!!I&&(j(m,!0),C&&(s||G||!B&&te))){const[fe,ce]=ef({nodeId:B,dragItems:m,nodeLookup:D});s?.(C,m,fe,ce),G?.(C,fe,ce),B||te?.(C,ce)}}async function J(){if(!v)return;const{transform:W,panBy:oe,autoPanSpeed:D,autoPanOnNodeDrag:Z}=i();if(!Z){g=!1,cancelAnimationFrame(d);return}const[M,H]=Ap(h,v,D);(M!==0||H!==0)&&(f.x=(f.x??0)-M/W[2],f.y=(f.y??0)-H/W[2],await oe({x:M,y:H})&&$(f)),d=requestAnimationFrame(J)}function se(W){const{nodeLookup:oe,multiSelectionActive:D,nodesDraggable:Z,transform:M,snapGrid:H,snapToGrid:L,selectNodesOnDrag:G,onNodeDragStart:te,onSelectionDragStart:E,unselectNodesAndEdges:j}=i();p=!0,(!G||!q)&&!D&&B&&(oe.get(B)?.selected||j()),q&&G&&B&&n?.(B);const I=to(W.sourceEvent,{transform:M,snapGrid:H,snapToGrid:L,containerBounds:v});if(f=I,m=uE(oe,Z,I,B),m.size>0&&(o||te||!B&&E)){const[ee,ue]=ef({nodeId:B,dragItems:m,nodeLookup:oe});o?.(W.sourceEvent,m,ee,ue),te?.(W.sourceEvent,ee,ue),B||E?.(W.sourceEvent,ue)}}const k=ip().clickDistance(R).on("start",W=>{const{domNode:oe,nodeDragThreshold:D,transform:Z,snapGrid:M,snapToGrid:H}=i();v=oe?.getBoundingClientRect()||null,N=!1,_=!1,C=W.sourceEvent,D===0&&se(W),f=to(W.sourceEvent,{transform:Z,snapGrid:M,snapToGrid:H,containerBounds:v}),h=nn(W.sourceEvent,v)}).on("drag",W=>{const{autoPanOnNodeDrag:oe,transform:D,snapGrid:Z,snapToGrid:M,nodeDragThreshold:H,nodeLookup:L}=i(),G=to(W.sourceEvent,{transform:D,snapGrid:Z,snapToGrid:M,containerBounds:v});if(C=W.sourceEvent,(W.sourceEvent.type==="touchmove"&&W.sourceEvent.touches.length>1||B&&!L.has(B))&&(N=!0),!N){if(!g&&oe&&p&&(g=!0,J()),!p){const te=nn(W.sourceEvent,v),E=te.x-h.x,j=te.y-h.y;Math.sqrt(E*E+j*j)>H&&se(W)}(f.x!==G.xSnapped||f.y!==G.ySnapped)&&m&&p&&(h=nn(W.sourceEvent,v),$(G))}}).on("end",W=>{if(!(!p||N)&&(g=!1,p=!1,cancelAnimationFrame(d),m.size>0)){const{nodeLookup:oe,updateNodePositions:D,onNodeDragStop:Z,onSelectionDragStop:M}=i();if(_&&(D(m,!1),_=!1),c||Z||!B&&M){const[H,L]=ef({nodeId:B,dragItems:m,nodeLookup:oe,dragging:!1});c?.(W.sourceEvent,m,H,L),Z?.(W.sourceEvent,H,L),B||M?.(W.sourceEvent,L)}}}).filter(W=>{const oe=W.target;return!W.button&&(!Y||!cg(oe,`.${Y}`,z))&&(!w||cg(oe,w,z))});b.call(k)}function A(){b?.on(".drag",null)}return{update:T,destroy:A}}function fE(n,i,o){const s=[],c={x:n.x-o,y:n.y-o,width:o*2,height:o*2};for(const f of i.values())uo(c,Wa(f))>0&&s.push(f);return s}const dE=250;function hE(n,i,o,s){let c=[],f=1/0;const d=fE(n,o,i+dE);for(const m of d){const g=[...m.internals.handleBounds?.source??[],...m.internals.handleBounds?.target??[]];for(const h of g){if(s.nodeId===h.nodeId&&s.type===h.type&&s.id===h.id)continue;const{x:v,y:p}=Pl(m,h,h.position,!0),b=Math.sqrt(Math.pow(v-n.x,2)+Math.pow(p-n.y,2));b>i||(b<f?(c=[{...h,x:v,y:p}],f=b):b===f&&c.push({...h,x:v,y:p}))}}if(!c.length)return null;if(c.length>1){const m=s.type==="source"?"target":"source";return c.find(g=>g.type===m)??c[0]}return c[0]}function Gp(n,i,o,s,c,f=!1){const d=s.get(n);if(!d)return null;const m=c==="strict"?d.internals.handleBounds?.[i]:[...d.internals.handleBounds?.source??[],...d.internals.handleBounds?.target??[]],g=(o?m?.find(h=>h.id===o):m?.[0])??null;return g&&f?{...g,...Pl(d,g,g.position,!0)}:g}function Zp(n,i){return n||(i?.classList.contains("target")?"target":i?.classList.contains("source")?"source":null)}function mE(n,i){let o=null;return i?o=!0:n&&!i&&(o=!1),o}const kp=()=>!0;function gE(n,{connectionMode:i,connectionRadius:o,handleId:s,nodeId:c,edgeUpdaterType:f,isTarget:d,domNode:m,nodeLookup:g,lib:h,autoPanOnConnect:v,flowId:p,panBy:b,cancelConnection:N,onConnectStart:_,onConnect:C,onConnectEnd:T,isValidConnection:A=kp,onReconnectEnd:Y,updateConnection:w,getTransform:z,getFromHandle:q,autoPanSpeed:B,dragThreshold:R=1,handleDomNode:$}){const J=Dp(n.target);let se=0,k;const{x:W,y:oe}=nn(n),D=Zp(f,$),Z=m?.getBoundingClientRect();let M=!1;if(!Z||!D)return;const H=Gp(c,D,s,g,i);if(!H)return;let L=nn(n,Z),G=!1,te=null,E=!1,j=null;function I(){if(!v||!Z)return;const[he,de]=Ap(L,Z,B);b({x:he,y:de}),se=requestAnimationFrame(I)}const ee={...H,nodeId:c,type:D,position:H.position},ue=g.get(c);let fe={inProgress:!0,isValid:null,from:Pl(ue,ee,xe.Left,!0),fromHandle:ee,fromPosition:ee.position,fromNode:ue,to:L,toHandle:null,toPosition:Wm[ee.position],toNode:null,pointer:L};function ce(){M=!0,w(fe),_?.(n,{nodeId:c,handleId:s,handleType:D})}R===0&&ce();function ge(he){if(!M){const{x:Be,y:Ue}=nn(he),ft=Be-W,Qe=Ue-oe;if(!(ft*ft+Qe*Qe>R*R))return;ce()}if(!q()||!ee){le(he);return}const de=z();L=nn(he,Z),k=hE(xo(L,de,!1,[1,1]),o,g,ee),G||(I(),G=!0);const pe=$p(he,{handle:k,connectionMode:i,fromNodeId:c,fromHandleId:s,fromType:d?"target":"source",isValidConnection:A,doc:J,lib:h,flowId:p,nodeLookup:g});j=pe.handleDomNode,te=pe.connection,E=mE(!!k,pe.isValid);const me=g.get(c),_e=me?Pl(me,ee,xe.Left,!0):fe.from,Se={...fe,from:_e,isValid:E,to:pe.toHandle&&E?hu({x:pe.toHandle.x,y:pe.toHandle.y},de):L,toHandle:pe.toHandle,toPosition:E&&pe.toHandle?pe.toHandle.position:Wm[ee.position],toNode:pe.toHandle?g.get(pe.toHandle.nodeId):null,pointer:L};w(Se),fe=Se}function le(he){if(!("touches"in he&&he.touches.length>0)){if(M){(k||j)&&te&&E&&C?.(te);const{inProgress:de,...pe}=fe,me={...pe,toPosition:fe.toHandle?fe.toPosition:null};T?.(he,me),f&&Y?.(he,me)}N(),cancelAnimationFrame(se),G=!1,E=!1,te=null,j=null,J.removeEventListener("mousemove",ge),J.removeEventListener("mouseup",le),J.removeEventListener("touchmove",ge),J.removeEventListener("touchend",le)}}J.addEventListener("mousemove",ge),J.addEventListener("mouseup",le),J.addEventListener("touchmove",ge),J.addEventListener("touchend",le)}function $p(n,{handle:i,connectionMode:o,fromNodeId:s,fromHandleId:c,fromType:f,doc:d,lib:m,flowId:g,isValidConnection:h=kp,nodeLookup:v}){const p=f==="target",b=i?d.querySelector(`.${m}-flow__handle[data-id="${g}-${i?.nodeId}-${i?.id}-${i?.type}"]`):null,{x:N,y:_}=nn(n),C=d.elementFromPoint(N,_),T=C?.classList.contains(`${m}-flow__handle`)?C:b,A={handleDomNode:T,isValid:!1,connection:null,toHandle:null};if(T){const Y=Zp(void 0,T),w=T.getAttribute("data-nodeid"),z=T.getAttribute("data-handleid"),q=T.classList.contains("connectable"),B=T.classList.contains("connectableend");if(!w||!Y)return A;const R={source:p?w:s,sourceHandle:p?z:c,target:p?s:w,targetHandle:p?c:z};A.connection=R;const J=q&&B&&(o===Ja.Strict?p&&Y==="source"||!p&&Y==="target":w!==s||z!==c);A.isValid=J&&h(R),A.toHandle=Gp(w,Y,z,v,o,!0)}return A}const Ef={onPointerDown:gE,isValid:$p};function pE({domNode:n,panZoom:i,getTransform:o,getViewScale:s}){const c=Yt(n);function f({translateExtent:m,width:g,height:h,zoomStep:v=1,pannable:p=!0,zoomable:b=!0,inversePan:N=!1}){const _=w=>{if(w.sourceEvent.type!=="wheel"||!i)return;const z=o(),q=w.sourceEvent.ctrlKey&&co()?10:1,B=-w.sourceEvent.deltaY*(w.sourceEvent.deltaMode===1?.05:w.sourceEvent.deltaMode?1:.002)*v,R=z[2]*Math.pow(2,B*q);i.scaleTo(R)};let C=[0,0];const T=w=>{(w.sourceEvent.type==="mousedown"||w.sourceEvent.type==="touchstart")&&(C=[w.sourceEvent.clientX??w.sourceEvent.touches[0].clientX,w.sourceEvent.clientY??w.sourceEvent.touches[0].clientY])},A=w=>{const z=o();if(w.sourceEvent.type!=="mousemove"&&w.sourceEvent.type!=="touchmove"||!i)return;const q=[w.sourceEvent.clientX??w.sourceEvent.touches[0].clientX,w.sourceEvent.clientY??w.sourceEvent.touches[0].clientY],B=[q[0]-C[0],q[1]-C[1]];C=q;const R=s()*Math.max(z[2],Math.log(z[2]))*(N?-1:1),$={x:z[0]-B[0]*R,y:z[1]-B[1]*R},J=[[0,0],[g,h]];i.setViewportConstrained({x:$.x,y:$.y,zoom:z[2]},J,m)},Y=bp().on("start",T).on("zoom",p?A:null).on("zoom.wheel",b?_:null);c.call(Y,{})}function d(){c.on("zoom",null)}return{update:f,destroy:d,pointer:Pt}}const Eu=n=>({x:n.x,y:n.y,zoom:n.k}),tf=({x:n,y:i,zoom:o})=>vu.translate(n,i).scale(o),Xa=(n,i)=>n.target.closest(`.${i}`),Qp=(n,i)=>i===2&&Array.isArray(n)&&n.includes(2),yE=n=>((n*=2)<=1?n*n*n:(n-=2)*n*n+2)/2,nf=(n,i=0,o=yE,s=()=>{})=>{const c=typeof i=="number"&&i>0;return c||s(),c?n.transition().duration(i).ease(o).on("end",s):n},Kp=n=>{const i=n.ctrlKey&&co()?10:1;return-n.deltaY*(n.deltaMode===1?.05:n.deltaMode?1:.002)*i};function xE({zoomPanValues:n,noWheelClassName:i,d3Selection:o,d3Zoom:s,panOnScrollMode:c,panOnScrollSpeed:f,zoomOnPinch:d,onPanZoomStart:m,onPanZoom:g,onPanZoomEnd:h}){return v=>{if(Xa(v,i))return v.ctrlKey&&v.preventDefault(),!1;v.preventDefault(),v.stopImmediatePropagation();const p=o.property("__zoom").k||1;if(v.ctrlKey&&d){const T=Pt(v),A=Kp(v),Y=p*Math.pow(2,A);s.scaleTo(o,Y,T,v);return}const b=v.deltaMode===1?20:1;let N=c===Jl.Vertical?0:v.deltaX*b,_=c===Jl.Horizontal?0:v.deltaY*b;!co()&&v.shiftKey&&c!==Jl.Vertical&&(N=v.deltaY*b,_=0),s.translateBy(o,-(N/p)*f,-(_/p)*f,{internal:!0});const C=Eu(o.property("__zoom"));clearTimeout(n.panScrollTimeout),n.isPanScrolling?(g?.(v,C),n.panScrollTimeout=setTimeout(()=>{h?.(v,C),n.isPanScrolling=!1},150)):(n.isPanScrolling=!0,m?.(v,C))}}function vE({noWheelClassName:n,preventScrolling:i,d3ZoomHandler:o}){return function(s,c){const f=s.type==="wheel",d=!i&&f&&!s.ctrlKey,m=Xa(s,n);if(s.ctrlKey&&f&&m&&s.preventDefault(),d||m)return null;s.preventDefault(),o.call(this,s,c)}}function bE({zoomPanValues:n,onDraggingChange:i,onPanZoomStart:o}){return s=>{if(s.sourceEvent?.internal)return;const c=Eu(s.transform);n.mouseButton=s.sourceEvent?.button||0,n.isZoomingOrPanning=!0,n.prevViewport=c,s.sourceEvent?.type==="mousedown"&&i(!0),o&&o?.(s.sourceEvent,c)}}function SE({zoomPanValues:n,panOnDrag:i,onPaneContextMenu:o,onTransformChange:s,onPanZoom:c}){return f=>{n.usedRightMouseButton=!!(o&&Qp(i,n.mouseButton??0)),f.sourceEvent?.sync||s([f.transform.x,f.transform.y,f.transform.k]),c&&!f.sourceEvent?.internal&&c?.(f.sourceEvent,Eu(f.transform))}}function EE({zoomPanValues:n,panOnDrag:i,panOnScroll:o,onDraggingChange:s,onPanZoomEnd:c,onPaneContextMenu:f}){return d=>{if(!d.sourceEvent?.internal&&(n.isZoomingOrPanning=!1,f&&Qp(i,n.mouseButton??0)&&!n.usedRightMouseButton&&d.sourceEvent&&f(d.sourceEvent),n.usedRightMouseButton=!1,s(!1),c)){const m=Eu(d.transform);n.prevViewport=m,clearTimeout(n.timerId),n.timerId=setTimeout(()=>{c?.(d.sourceEvent,m)},o?150:0)}}}function NE({zoomActivationKeyPressed:n,zoomOnScroll:i,zoomOnPinch:o,panOnDrag:s,panOnScroll:c,zoomOnDoubleClick:f,userSelectionActive:d,noWheelClassName:m,noPanClassName:g,lib:h,connectionInProgress:v}){return p=>{const b=n||i,N=o&&p.ctrlKey,_=p.type==="wheel";if(p.button===1&&p.type==="mousedown"&&(Xa(p,`${h}-flow__node`)||Xa(p,`${h}-flow__edge`)))return!0;if(!s&&!b&&!c&&!f&&!o||d||v&&!_||Xa(p,m)&&_||Xa(p,g)&&(!_||c&&_&&!n)||!o&&p.ctrlKey&&_)return!1;if(!o&&p.type==="touchstart"&&p.touches?.length>1)return p.preventDefault(),!1;if(!b&&!c&&!N&&_||!s&&(p.type==="mousedown"||p.type==="touchstart")||Array.isArray(s)&&!s.includes(p.button)&&p.type==="mousedown")return!1;const C=Array.isArray(s)&&s.includes(p.button)||!p.button||p.button<=1;return(!p.ctrlKey||_)&&C}}function wE({domNode:n,minZoom:i,maxZoom:o,translateExtent:s,viewport:c,onPanZoom:f,onPanZoomStart:d,onPanZoomEnd:m,onDraggingChange:g}){const h={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},v=n.getBoundingClientRect(),p=bp().scaleExtent([i,o]).translateExtent(s),b=Yt(n).call(p);Y({x:c.x,y:c.y,zoom:Fa(c.zoom,i,o)},[[0,0],[v.width,v.height]],s);const N=b.on("wheel.zoom"),_=b.on("dblclick.zoom");p.wheelDelta(Kp);function C(k,W){return b?new Promise(oe=>{p?.interpolate(W?.interpolate==="linear"?eo:Ps).transform(nf(b,W?.duration,W?.ease,()=>oe(!0)),k)}):Promise.resolve(!1)}function T({noWheelClassName:k,noPanClassName:W,onPaneContextMenu:oe,userSelectionActive:D,panOnScroll:Z,panOnDrag:M,panOnScrollMode:H,panOnScrollSpeed:L,preventScrolling:G,zoomOnPinch:te,zoomOnScroll:E,zoomOnDoubleClick:j,zoomActivationKeyPressed:I,lib:ee,onTransformChange:ue,connectionInProgress:re,paneClickDistance:fe,selectionOnDrag:ce}){D&&!h.isZoomingOrPanning&&A();const ge=Z&&!I&&!D;p.clickDistance(ce?1/0:!tn(fe)||fe<0?0:fe);const le=ge?xE({zoomPanValues:h,noWheelClassName:k,d3Selection:b,d3Zoom:p,panOnScrollMode:H,panOnScrollSpeed:L,zoomOnPinch:te,onPanZoomStart:d,onPanZoom:f,onPanZoomEnd:m}):vE({noWheelClassName:k,preventScrolling:G,d3ZoomHandler:N});if(b.on("wheel.zoom",le,{passive:!1}),!D){const de=bE({zoomPanValues:h,onDraggingChange:g,onPanZoomStart:d});p.on("start",de);const pe=SE({zoomPanValues:h,panOnDrag:M,onPaneContextMenu:!!oe,onPanZoom:f,onTransformChange:ue});p.on("zoom",pe);const me=EE({zoomPanValues:h,panOnDrag:M,panOnScroll:Z,onPaneContextMenu:oe,onPanZoomEnd:m,onDraggingChange:g});p.on("end",me)}const he=NE({zoomActivationKeyPressed:I,panOnDrag:M,zoomOnScroll:E,panOnScroll:Z,zoomOnDoubleClick:j,zoomOnPinch:te,userSelectionActive:D,noPanClassName:W,noWheelClassName:k,lib:ee,connectionInProgress:re});p.filter(he),j?b.on("dblclick.zoom",_):b.on("dblclick.zoom",null)}function A(){p.on("zoom",null)}async function Y(k,W,oe){const D=tf(k),Z=p?.constrain()(D,W,oe);return Z&&await C(Z),new Promise(M=>M(Z))}async function w(k,W){const oe=tf(k);return await C(oe,W),new Promise(D=>D(oe))}function z(k){if(b){const W=tf(k),oe=b.property("__zoom");(oe.k!==k.zoom||oe.x!==k.x||oe.y!==k.y)&&p?.transform(b,W,null,{sync:!0})}}function q(){const k=b?vp(b.node()):{x:0,y:0,k:1};return{x:k.x,y:k.y,zoom:k.k}}function B(k,W){return b?new Promise(oe=>{p?.interpolate(W?.interpolate==="linear"?eo:Ps).scaleTo(nf(b,W?.duration,W?.ease,()=>oe(!0)),k)}):Promise.resolve(!1)}function R(k,W){return b?new Promise(oe=>{p?.interpolate(W?.interpolate==="linear"?eo:Ps).scaleBy(nf(b,W?.duration,W?.ease,()=>oe(!0)),k)}):Promise.resolve(!1)}function $(k){p?.scaleExtent(k)}function J(k){p?.translateExtent(k)}function se(k){const W=!tn(k)||k<0?0:k;p?.clickDistance(W)}return{update:T,destroy:A,setViewport:w,setViewportConstrained:Y,getViewport:q,scaleTo:B,scaleBy:R,setScaleExtent:$,setTranslateExtent:J,syncViewport:z,setClickDistance:se}}var Pa;(function(n){n.Line="line",n.Handle="handle"})(Pa||(Pa={}));function _E({width:n,prevWidth:i,height:o,prevHeight:s,affectsX:c,affectsY:f}){const d=n-i,m=o-s,g=[d>0?1:d<0?-1:0,m>0?1:m<0?-1:0];return d&&c&&(g[0]=g[0]*-1),m&&f&&(g[1]=g[1]*-1),g}function rg(n){const i=n.includes("right")||n.includes("left"),o=n.includes("bottom")||n.includes("top"),s=n.includes("left"),c=n.includes("top");return{isHorizontal:i,isVertical:o,affectsX:s,affectsY:c}}function vl(n,i){return Math.max(0,i-n)}function bl(n,i){return Math.max(0,n-i)}function Ks(n,i,o){return Math.max(0,i-n,n-o)}function fg(n,i){return n?!i:i}function ME(n,i,o,s,c,f,d,m){let{affectsX:g,affectsY:h}=i;const{isHorizontal:v,isVertical:p}=i,b=v&&p,{xSnapped:N,ySnapped:_}=o,{minWidth:C,maxWidth:T,minHeight:A,maxHeight:Y}=s,{x:w,y:z,width:q,height:B,aspectRatio:R}=n;let $=Math.floor(v?N-n.pointerX:0),J=Math.floor(p?_-n.pointerY:0);const se=q+(g?-$:$),k=B+(h?-J:J),W=-f[0]*q,oe=-f[1]*B;let D=Ks(se,C,T),Z=Ks(k,A,Y);if(d){let L=0,G=0;g&&$<0?L=vl(w+$+W,d[0][0]):!g&&$>0&&(L=bl(w+se+W,d[1][0])),h&&J<0?G=vl(z+J+oe,d[0][1]):!h&&J>0&&(G=bl(z+k+oe,d[1][1])),D=Math.max(D,L),Z=Math.max(Z,G)}if(m){let L=0,G=0;g&&$>0?L=bl(w+$,m[0][0]):!g&&$<0&&(L=vl(w+se,m[1][0])),h&&J>0?G=bl(z+J,m[0][1]):!h&&J<0&&(G=vl(z+k,m[1][1])),D=Math.max(D,L),Z=Math.max(Z,G)}if(c){if(v){const L=Ks(se/R,A,Y)*R;if(D=Math.max(D,L),d){let G=0;!g&&!h||g&&!h&&b?G=bl(z+oe+se/R,d[1][1])*R:G=vl(z+oe+(g?$:-$)/R,d[0][1])*R,D=Math.max(D,G)}if(m){let G=0;!g&&!h||g&&!h&&b?G=vl(z+se/R,m[1][1])*R:G=bl(z+(g?$:-$)/R,m[0][1])*R,D=Math.max(D,G)}}if(p){const L=Ks(k*R,C,T)/R;if(Z=Math.max(Z,L),d){let G=0;!g&&!h||h&&!g&&b?G=bl(w+k*R+W,d[1][0])/R:G=vl(w+(h?J:-J)*R+W,d[0][0])/R,Z=Math.max(Z,G)}if(m){let G=0;!g&&!h||h&&!g&&b?G=vl(w+k*R,m[1][0])/R:G=bl(w+(h?J:-J)*R,m[0][0])/R,Z=Math.max(Z,G)}}}J=J+(J<0?Z:-Z),$=$+($<0?D:-D),c&&(b?se>k*R?J=(fg(g,h)?-$:$)/R:$=(fg(g,h)?-J:J)*R:v?(J=$/R,h=g):($=J*R,g=h));const M=g?w+$:w,H=h?z+J:z;return{width:q+(g?-$:$),height:B+(h?-J:J),x:f[0]*$*(g?-1:1)+M,y:f[1]*J*(h?-1:1)+H}}const Jp={width:0,height:0,x:0,y:0},CE={...Jp,pointerX:0,pointerY:0,aspectRatio:1};function AE(n){return[[0,0],[n.measured.width,n.measured.height]]}function TE(n,i,o){const s=i.position.x+n.position.x,c=i.position.y+n.position.y,f=n.measured.width??0,d=n.measured.height??0,m=o[0]*f,g=o[1]*d;return[[s-m,c-g],[s+f-m,c+d-g]]}function zE({domNode:n,nodeId:i,getStoreItems:o,onChange:s,onEnd:c}){const f=Yt(n);let d={controlDirection:rg("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function m({controlPosition:h,boundaries:v,keepAspectRatio:p,resizeDirection:b,onResizeStart:N,onResize:_,onResizeEnd:C,shouldResize:T}){let A={...Jp},Y={...CE};d={boundaries:v,resizeDirection:b,keepAspectRatio:p,controlDirection:rg(h)};let w,z=null,q=[],B,R,$,J=!1;const se=ip().on("start",k=>{const{nodeLookup:W,transform:oe,snapGrid:D,snapToGrid:Z,nodeOrigin:M,paneDomNode:H}=o();if(w=W.get(i),!w)return;z=H?.getBoundingClientRect()??null;const{xSnapped:L,ySnapped:G}=to(k.sourceEvent,{transform:oe,snapGrid:D,snapToGrid:Z,containerBounds:z});A={width:w.measured.width??0,height:w.measured.height??0,x:w.position.x??0,y:w.position.y??0},Y={...A,pointerX:L,pointerY:G,aspectRatio:A.width/A.height},B=void 0,w.parentId&&(w.extent==="parent"||w.expandParent)&&(B=W.get(w.parentId),R=B&&w.extent==="parent"?AE(B):void 0),q=[],$=void 0;for(const[te,E]of W)if(E.parentId===i&&(q.push({id:te,position:{...E.position},extent:E.extent}),E.extent==="parent"||E.expandParent)){const j=TE(E,w,E.origin??M);$?$=[[Math.min(j[0][0],$[0][0]),Math.min(j[0][1],$[0][1])],[Math.max(j[1][0],$[1][0]),Math.max(j[1][1],$[1][1])]]:$=j}N?.(k,{...A})}).on("drag",k=>{const{transform:W,snapGrid:oe,snapToGrid:D,nodeOrigin:Z}=o(),M=to(k.sourceEvent,{transform:W,snapGrid:oe,snapToGrid:D,containerBounds:z}),H=[];if(!w)return;const{x:L,y:G,width:te,height:E}=A,j={},I=w.origin??Z,{width:ee,height:ue,x:re,y:fe}=ME(Y,d.controlDirection,M,d.boundaries,d.keepAspectRatio,I,R,$),ce=ee!==te,ge=ue!==E,le=re!==L&&ce,he=fe!==G&≥if(!le&&!he&&!ce&&!ge)return;if((le||he||I[0]===1||I[1]===1)&&(j.x=le?re:A.x,j.y=he?fe:A.y,A.x=j.x,A.y=j.y,q.length>0)){const _e=re-L,Se=fe-G;for(const Be of q)Be.position={x:Be.position.x-_e+I[0]*(ee-te),y:Be.position.y-Se+I[1]*(ue-E)},H.push(Be)}if((ce||ge)&&(j.width=ce&&(!d.resizeDirection||d.resizeDirection==="horizontal")?ee:A.width,j.height=ge&&(!d.resizeDirection||d.resizeDirection==="vertical")?ue:A.height,A.width=j.width,A.height=j.height),B&&w.expandParent){const _e=I[0]*(j.width??0);j.x&&j.x<_e&&(A.x=_e,Y.x=Y.x-(j.x-_e));const Se=I[1]*(j.height??0);j.y&&j.y<Se&&(A.y=Se,Y.y=Y.y-(j.y-Se))}const de=_E({width:A.width,prevWidth:te,height:A.height,prevHeight:E,affectsX:d.controlDirection.affectsX,affectsY:d.controlDirection.affectsY}),pe={...A,direction:de};T?.(k,pe)!==!1&&(J=!0,_?.(k,pe),s(j,H))}).on("end",k=>{J&&(C?.(k,{...A}),c?.({...A}),J=!1)});f.call(se)}function g(){f.on(".drag",null)}return{update:m,destroy:g}}var lf={exports:{}},af={},of={exports:{}},sf={};var dg;function jE(){if(dg)return sf;dg=1;var n=fo();function i(p,b){return p===b&&(p!==0||1/p===1/b)||p!==p&&b!==b}var o=typeof Object.is=="function"?Object.is:i,s=n.useState,c=n.useEffect,f=n.useLayoutEffect,d=n.useDebugValue;function m(p,b){var N=b(),_=s({inst:{value:N,getSnapshot:b}}),C=_[0].inst,T=_[1];return f(function(){C.value=N,C.getSnapshot=b,g(C)&&T({inst:C})},[p,N,b]),c(function(){return g(C)&&T({inst:C}),p(function(){g(C)&&T({inst:C})})},[p]),d(N),N}function g(p){var b=p.getSnapshot;p=p.value;try{var N=b();return!o(p,N)}catch{return!0}}function h(p,b){return b()}var v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:m;return sf.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:v,sf}var hg;function DE(){return hg||(hg=1,of.exports=jE()),of.exports}var mg;function OE(){if(mg)return af;mg=1;var n=fo(),i=DE();function o(h,v){return h===v&&(h!==0||1/h===1/v)||h!==h&&v!==v}var s=typeof Object.is=="function"?Object.is:o,c=i.useSyncExternalStore,f=n.useRef,d=n.useEffect,m=n.useMemo,g=n.useDebugValue;return af.useSyncExternalStoreWithSelector=function(h,v,p,b,N){var _=f(null);if(_.current===null){var C={hasValue:!1,value:null};_.current=C}else C=_.current;_=m(function(){function A(B){if(!Y){if(Y=!0,w=B,B=b(B),N!==void 0&&C.hasValue){var R=C.value;if(N(R,B))return z=R}return z=B}if(R=z,s(w,B))return R;var $=b(B);return N!==void 0&&N(R,$)?(w=B,R):(w=B,z=$)}var Y=!1,w,z,q=p===void 0?null:p;return[function(){return A(v())},q===null?void 0:function(){return A(q())}]},[v,p,b,N]);var T=c(h,_[0],_[1]);return d(function(){C.hasValue=!0,C.value=T},[T]),g(T),T},af}var gg;function HE(){return gg||(gg=1,lf.exports=OE()),lf.exports}var RE=HE();const BE=Gg(RE),UE={},pg=n=>{let i;const o=new Set,s=(v,p)=>{const b=typeof v=="function"?v(i):v;if(!Object.is(b,i)){const N=i;i=p??(typeof b!="object"||b===null)?b:Object.assign({},i,b),o.forEach(_=>_(i,N))}},c=()=>i,g={setState:s,getState:c,getInitialState:()=>h,subscribe:v=>(o.add(v),()=>o.delete(v)),destroy:()=>{(UE?"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."),o.clear()}},h=i=n(s,c,g);return g},LE=n=>n?pg(n):pg,{useDebugValue:YE}=qv,{useSyncExternalStoreWithSelector:VE}=BE,qE=n=>n;function Fp(n,i=qE,o){const s=VE(n.subscribe,n.getState,n.getServerState||n.getInitialState,i,o);return YE(s),s}const yg=(n,i)=>{const o=LE(n),s=(c,f=i)=>Fp(o,c,f);return Object.assign(s,o),s},XE=(n,i)=>n?yg(n,i):yg;function We(n,i){if(Object.is(n,i))return!0;if(typeof n!="object"||n===null||typeof i!="object"||i===null)return!1;if(n instanceof Map&&i instanceof Map){if(n.size!==i.size)return!1;for(const[s,c]of n)if(!Object.is(c,i.get(s)))return!1;return!0}if(n instanceof Set&&i instanceof Set){if(n.size!==i.size)return!1;for(const s of n)if(!i.has(s))return!1;return!0}const o=Object.keys(n);if(o.length!==Object.keys(i).length)return!1;for(const s of o)if(!Object.prototype.hasOwnProperty.call(i,s)||!Object.is(n[s],i[s]))return!1;return!0}Zg();const Nu=V.createContext(null),GE=Nu.Provider,Wp=gn.error001();function De(n,i){const o=V.useContext(Nu);if(o===null)throw new Error(Wp);return Fp(o,n,i)}function Ie(){const n=V.useContext(Nu);if(n===null)throw new Error(Wp);return V.useMemo(()=>({getState:n.getState,setState:n.setState,subscribe:n.subscribe}),[n])}const xg={display:"none"},ZE={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Ip="react-flow__node-desc",Pp="react-flow__edge-desc",kE="react-flow__aria-live",$E=n=>n.ariaLiveMessage,QE=n=>n.ariaLabelConfig;function KE({rfId:n}){const i=De($E);return x.jsx("div",{id:`${kE}-${n}`,"aria-live":"assertive","aria-atomic":"true",style:ZE,children:i})}function JE({rfId:n,disableKeyboardA11y:i}){const o=De(QE);return x.jsxs(x.Fragment,{children:[x.jsx("div",{id:`${Ip}-${n}`,style:xg,children:i?o["node.a11yDescription.default"]:o["node.a11yDescription.keyboardDisabled"]}),x.jsx("div",{id:`${Pp}-${n}`,style:xg,children:o["edge.a11yDescription.default"]}),!i&&x.jsx(KE,{rfId:n})]})}const wu=V.forwardRef(({position:n="top-left",children:i,className:o,style:s,...c},f)=>{const d=`${n}`.split("-");return x.jsx("div",{className:ut(["react-flow__panel",o,...d]),style:s,ref:f,...c,children:i})});wu.displayName="Panel";function FE({proOptions:n,position:i="bottom-right"}){return n?.hideAttribution?null:x.jsx(wu,{position:i,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:x.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const WE=n=>{const i=[],o=[];for(const[,s]of n.nodeLookup)s.selected&&i.push(s.internals.userNode);for(const[,s]of n.edgeLookup)s.selected&&o.push(s);return{selectedNodes:i,selectedEdges:o}},Js=n=>n.id;function IE(n,i){return We(n.selectedNodes.map(Js),i.selectedNodes.map(Js))&&We(n.selectedEdges.map(Js),i.selectedEdges.map(Js))}function PE({onSelectionChange:n}){const i=Ie(),{selectedNodes:o,selectedEdges:s}=De(WE,IE);return V.useEffect(()=>{const c={nodes:o,edges:s};n?.(c),i.getState().onSelectionChangeHandlers.forEach(f=>f(c))},[o,s,n]),null}const eN=n=>!!n.onSelectionChangeHandlers;function tN({onSelectionChange:n}){const i=De(eN);return n||i?x.jsx(PE,{onSelectionChange:n}):null}const ey=[0,0],nN={x:0,y:0,zoom:1},lN=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],vg=[...lN,"rfId"],aN=n=>({setNodes:n.setNodes,setEdges:n.setEdges,setMinZoom:n.setMinZoom,setMaxZoom:n.setMaxZoom,setTranslateExtent:n.setTranslateExtent,setNodeExtent:n.setNodeExtent,reset:n.reset,setDefaultNodesAndEdges:n.setDefaultNodesAndEdges}),bg={translateExtent:oo,nodeOrigin:ey,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function iN(n){const{setNodes:i,setEdges:o,setMinZoom:s,setMaxZoom:c,setTranslateExtent:f,setNodeExtent:d,reset:m,setDefaultNodesAndEdges:g}=De(aN,We),h=Ie();V.useEffect(()=>(g(n.defaultNodes,n.defaultEdges),()=>{v.current=bg,m()}),[]);const v=V.useRef(bg);return V.useEffect(()=>{for(const p of vg){const b=n[p],N=v.current[p];b!==N&&(typeof n[p]>"u"||(p==="nodes"?i(b):p==="edges"?o(b):p==="minZoom"?s(b):p==="maxZoom"?c(b):p==="translateExtent"?f(b):p==="nodeExtent"?d(b):p==="ariaLabelConfig"?h.setState({ariaLabelConfig:X2(b)}):p==="fitView"?h.setState({fitViewQueued:b}):p==="fitViewOptions"?h.setState({fitViewOptions:b}):h.setState({[p]:b})))}v.current=n},vg.map(p=>n[p])),null}function Sg(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function oN(n){const[i,o]=V.useState(n==="system"?null:n);return V.useEffect(()=>{if(n!=="system"){o(n);return}const s=Sg(),c=()=>o(s?.matches?"dark":"light");return c(),s?.addEventListener("change",c),()=>{s?.removeEventListener("change",c)}},[n]),i!==null?i:Sg()?.matches?"dark":"light"}const Eg=typeof document<"u"?document:null;function ro(n=null,i={target:Eg,actInsideInputWithModifier:!0}){const[o,s]=V.useState(!1),c=V.useRef(!1),f=V.useRef(new Set([])),[d,m]=V.useMemo(()=>{if(n!==null){const h=(Array.isArray(n)?n:[n]).filter(p=>typeof p=="string").map(p=>p.replace("+",`
|
|
10
|
+
`).replace(`
|
|
11
|
+
|
|
12
|
+
`,`
|
|
13
|
+
+`).split(`
|
|
14
|
+
`)),v=h.reduce((p,b)=>p.concat(...b),[]);return[h,v]}return[[],[]]},[n]);return V.useEffect(()=>{const g=i?.target??Eg,h=i?.actInsideInputWithModifier??!0;if(n!==null){const v=N=>{if(c.current=N.ctrlKey||N.metaKey||N.shiftKey||N.altKey,(!c.current||c.current&&!h)&&Op(N))return!1;const C=wg(N.code,m);if(f.current.add(N[C]),Ng(d,f.current,!1)){const T=N.composedPath?.()?.[0]||N.target,A=T?.nodeName==="BUTTON"||T?.nodeName==="A";i.preventDefault!==!1&&(c.current||!A)&&N.preventDefault(),s(!0)}},p=N=>{const _=wg(N.code,m);Ng(d,f.current,!0)?(s(!1),f.current.clear()):f.current.delete(N[_]),N.key==="Meta"&&f.current.clear(),c.current=!1},b=()=>{f.current.clear(),s(!1)};return g?.addEventListener("keydown",v),g?.addEventListener("keyup",p),window.addEventListener("blur",b),window.addEventListener("contextmenu",b),()=>{g?.removeEventListener("keydown",v),g?.removeEventListener("keyup",p),window.removeEventListener("blur",b),window.removeEventListener("contextmenu",b)}}},[n,s]),o}function Ng(n,i,o){return n.filter(s=>o||s.length===i.size).some(s=>s.every(c=>i.has(c)))}function wg(n,i){return i.includes(n)?"code":"key"}const sN=()=>{const n=Ie();return V.useMemo(()=>({zoomIn:i=>{const{panZoom:o}=n.getState();return o?o.scaleBy(1.2,{duration:i?.duration}):Promise.resolve(!1)},zoomOut:i=>{const{panZoom:o}=n.getState();return o?o.scaleBy(1/1.2,{duration:i?.duration}):Promise.resolve(!1)},zoomTo:(i,o)=>{const{panZoom:s}=n.getState();return s?s.scaleTo(i,{duration:o?.duration}):Promise.resolve(!1)},getZoom:()=>n.getState().transform[2],setViewport:async(i,o)=>{const{transform:[s,c,f],panZoom:d}=n.getState();return d?(await d.setViewport({x:i.x??s,y:i.y??c,zoom:i.zoom??f},o),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[i,o,s]=n.getState().transform;return{x:i,y:o,zoom:s}},setCenter:async(i,o,s)=>n.getState().setCenter(i,o,s),fitBounds:async(i,o)=>{const{width:s,height:c,minZoom:f,maxZoom:d,panZoom:m}=n.getState(),g=Of(i,s,c,f,d,o?.padding??.1);return m?(await m.setViewport(g,{duration:o?.duration,ease:o?.ease,interpolate:o?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(i,o={})=>{const{transform:s,snapGrid:c,snapToGrid:f,domNode:d}=n.getState();if(!d)return i;const{x:m,y:g}=d.getBoundingClientRect(),h={x:i.x-m,y:i.y-g},v=o.snapGrid??c,p=o.snapToGrid??f;return xo(h,s,p,v)},flowToScreenPosition:i=>{const{transform:o,domNode:s}=n.getState();if(!s)return i;const{x:c,y:f}=s.getBoundingClientRect(),d=hu(i,o);return{x:d.x+c,y:d.y+f}}}),[])};function ty(n,i){const o=[],s=new Map,c=[];for(const f of n)if(f.type==="add"){c.push(f);continue}else if(f.type==="remove"||f.type==="replace")s.set(f.id,[f]);else{const d=s.get(f.id);d?d.push(f):s.set(f.id,[f])}for(const f of i){const d=s.get(f.id);if(!d){o.push(f);continue}if(d[0].type==="remove")continue;if(d[0].type==="replace"){o.push({...d[0].item});continue}const m={...f};for(const g of d)uN(g,m);o.push(m)}return c.length&&c.forEach(f=>{f.index!==void 0?o.splice(f.index,0,{...f.item}):o.push({...f.item})}),o}function uN(n,i){switch(n.type){case"select":{i.selected=n.selected;break}case"position":{typeof n.position<"u"&&(i.position=n.position),typeof n.dragging<"u"&&(i.dragging=n.dragging);break}case"dimensions":{typeof n.dimensions<"u"&&(i.measured={...n.dimensions},n.setAttributes&&((n.setAttributes===!0||n.setAttributes==="width")&&(i.width=n.dimensions.width),(n.setAttributes===!0||n.setAttributes==="height")&&(i.height=n.dimensions.height))),typeof n.resizing=="boolean"&&(i.resizing=n.resizing);break}}}function cN(n,i){return ty(n,i)}function rN(n,i){return ty(n,i)}function $l(n,i){return{id:n,type:"select",selected:i}}function Ga(n,i=new Set,o=!1){const s=[];for(const[c,f]of n){const d=i.has(c);!(f.selected===void 0&&!d)&&f.selected!==d&&(o&&(f.selected=d),s.push($l(f.id,d)))}return s}function _g({items:n=[],lookup:i}){const o=[],s=new Map(n.map(c=>[c.id,c]));for(const[c,f]of n.entries()){const d=i.get(f.id),m=d?.internals?.userNode??d;m!==void 0&&m!==f&&o.push({id:f.id,item:f,type:"replace"}),m===void 0&&o.push({item:f,type:"add",index:c})}for(const[c]of i)s.get(c)===void 0&&o.push({id:c,type:"remove"});return o}function Mg(n){return{id:n.id,type:"remove"}}const Cg=n=>D2(n),fN=n=>_p(n);function ny(n){return V.forwardRef(n)}const dN=typeof window<"u"?V.useLayoutEffect:V.useEffect;function Ag(n){const[i,o]=V.useState(BigInt(0)),[s]=V.useState(()=>hN(()=>o(c=>c+BigInt(1))));return dN(()=>{const c=s.get();c.length&&(n(c),s.reset())},[i]),s}function hN(n){let i=[];return{get:()=>i,reset:()=>{i=[]},push:o=>{i.push(o),n()}}}const ly=V.createContext(null);function mN({children:n}){const i=Ie(),o=V.useCallback(m=>{const{nodes:g=[],setNodes:h,hasDefaultNodes:v,onNodesChange:p,nodeLookup:b,fitViewQueued:N,onNodesChangeMiddlewareMap:_}=i.getState();let C=g;for(const A of m)C=typeof A=="function"?A(C):A;let T=_g({items:C,lookup:b});for(const A of _.values())T=A(T);v&&h(C),T.length>0?p?.(T):N&&window.requestAnimationFrame(()=>{const{fitViewQueued:A,nodes:Y,setNodes:w}=i.getState();A&&w(Y)})},[]),s=Ag(o),c=V.useCallback(m=>{const{edges:g=[],setEdges:h,hasDefaultEdges:v,onEdgesChange:p,edgeLookup:b}=i.getState();let N=g;for(const _ of m)N=typeof _=="function"?_(N):_;v?h(N):p&&p(_g({items:N,lookup:b}))},[]),f=Ag(c),d=V.useMemo(()=>({nodeQueue:s,edgeQueue:f}),[]);return x.jsx(ly.Provider,{value:d,children:n})}function gN(){const n=V.useContext(ly);if(!n)throw new Error("useBatchContext must be used within a BatchProvider");return n}const pN=n=>!!n.panZoom;function Vf(){const n=sN(),i=Ie(),o=gN(),s=De(pN),c=V.useMemo(()=>{const f=p=>i.getState().nodeLookup.get(p),d=p=>{o.nodeQueue.push(p)},m=p=>{o.edgeQueue.push(p)},g=p=>{const{nodeLookup:b,nodeOrigin:N}=i.getState(),_=Cg(p)?p:b.get(p.id),C=_.parentId?jp(_.position,_.measured,_.parentId,b,N):_.position,T={..._,position:C,width:_.measured?.width??_.width,height:_.measured?.height??_.height};return Wa(T)},h=(p,b,N={replace:!1})=>{d(_=>_.map(C=>{if(C.id===p){const T=typeof b=="function"?b(C):b;return N.replace&&Cg(T)?T:{...C,...T}}return C}))},v=(p,b,N={replace:!1})=>{m(_=>_.map(C=>{if(C.id===p){const T=typeof b=="function"?b(C):b;return N.replace&&fN(T)?T:{...C,...T}}return C}))};return{getNodes:()=>i.getState().nodes.map(p=>({...p})),getNode:p=>f(p)?.internals.userNode,getInternalNode:f,getEdges:()=>{const{edges:p=[]}=i.getState();return p.map(b=>({...b}))},getEdge:p=>i.getState().edgeLookup.get(p),setNodes:d,setEdges:m,addNodes:p=>{const b=Array.isArray(p)?p:[p];o.nodeQueue.push(N=>[...N,...b])},addEdges:p=>{const b=Array.isArray(p)?p:[p];o.edgeQueue.push(N=>[...N,...b])},toObject:()=>{const{nodes:p=[],edges:b=[],transform:N}=i.getState(),[_,C,T]=N;return{nodes:p.map(A=>({...A})),edges:b.map(A=>({...A})),viewport:{x:_,y:C,zoom:T}}},deleteElements:async({nodes:p=[],edges:b=[]})=>{const{nodes:N,edges:_,onNodesDelete:C,onEdgesDelete:T,triggerNodeChanges:A,triggerEdgeChanges:Y,onDelete:w,onBeforeDelete:z}=i.getState(),{nodes:q,edges:B}=await U2({nodesToRemove:p,edgesToRemove:b,nodes:N,edges:_,onBeforeDelete:z}),R=B.length>0,$=q.length>0;if(R){const J=B.map(Mg);T?.(B),Y(J)}if($){const J=q.map(Mg);C?.(q),A(J)}return($||R)&&w?.({nodes:q,edges:B}),{deletedNodes:q,deletedEdges:B}},getIntersectingNodes:(p,b=!0,N)=>{const _=Pm(p),C=_?p:g(p),T=N!==void 0;return C?(N||i.getState().nodes).filter(A=>{const Y=i.getState().nodeLookup.get(A.id);if(Y&&!_&&(A.id===p.id||!Y.internals.positionAbsolute))return!1;const w=Wa(T?A:Y),z=uo(w,C);return b&&z>0||z>=w.width*w.height||z>=C.width*C.height}):[]},isNodeIntersecting:(p,b,N=!0)=>{const C=Pm(p)?p:g(p);if(!C)return!1;const T=uo(C,b);return N&&T>0||T>=b.width*b.height||T>=C.width*C.height},updateNode:h,updateNodeData:(p,b,N={replace:!1})=>{h(p,_=>{const C=typeof b=="function"?b(_):b;return N.replace?{..._,data:C}:{..._,data:{..._.data,...C}}},N)},updateEdge:v,updateEdgeData:(p,b,N={replace:!1})=>{v(p,_=>{const C=typeof b=="function"?b(_):b;return N.replace?{..._,data:C}:{..._,data:{..._.data,...C}}},N)},getNodesBounds:p=>{const{nodeLookup:b,nodeOrigin:N}=i.getState();return O2(p,{nodeLookup:b,nodeOrigin:N})},getHandleConnections:({type:p,id:b,nodeId:N})=>Array.from(i.getState().connectionLookup.get(`${N}-${p}${b?`-${b}`:""}`)?.values()??[]),getNodeConnections:({type:p,handleId:b,nodeId:N})=>Array.from(i.getState().connectionLookup.get(`${N}${p?b?`-${p}-${b}`:`-${p}`:""}`)?.values()??[]),fitView:async p=>{const b=i.getState().fitViewResolver??q2();return i.setState({fitViewQueued:!0,fitViewOptions:p,fitViewResolver:b}),o.nodeQueue.push(N=>[...N]),b.promise}}},[]);return V.useMemo(()=>({...c,...n,viewportInitialized:s}),[s])}const Tg=n=>n.selected,yN=typeof window<"u"?window:void 0;function xN({deleteKeyCode:n,multiSelectionKeyCode:i}){const o=Ie(),{deleteElements:s}=Vf(),c=ro(n,{actInsideInputWithModifier:!1}),f=ro(i,{target:yN});V.useEffect(()=>{if(c){const{edges:d,nodes:m}=o.getState();s({nodes:m.filter(Tg),edges:d.filter(Tg)}),o.setState({nodesSelectionActive:!1})}},[c]),V.useEffect(()=>{o.setState({multiSelectionActive:f})},[f])}function vN(n){const i=Ie();V.useEffect(()=>{const o=()=>{if(!n.current||!(n.current.checkVisibility?.()??!0))return!1;const s=Hf(n.current);(s.height===0||s.width===0)&&i.getState().onError?.("004",gn.error004()),i.setState({width:s.width||500,height:s.height||500})};if(n.current){o(),window.addEventListener("resize",o);const s=new ResizeObserver(()=>o());return s.observe(n.current),()=>{window.removeEventListener("resize",o),s&&n.current&&s.unobserve(n.current)}}},[])}const _u={position:"absolute",width:"100%",height:"100%",top:0,left:0},bN=n=>({userSelectionActive:n.userSelectionActive,lib:n.lib,connectionInProgress:n.connection.inProgress});function SN({onPaneContextMenu:n,zoomOnScroll:i=!0,zoomOnPinch:o=!0,panOnScroll:s=!1,panOnScrollSpeed:c=.5,panOnScrollMode:f=Jl.Free,zoomOnDoubleClick:d=!0,panOnDrag:m=!0,defaultViewport:g,translateExtent:h,minZoom:v,maxZoom:p,zoomActivationKeyCode:b,preventScrolling:N=!0,children:_,noWheelClassName:C,noPanClassName:T,onViewportChange:A,isControlledViewport:Y,paneClickDistance:w,selectionOnDrag:z}){const q=Ie(),B=V.useRef(null),{userSelectionActive:R,lib:$,connectionInProgress:J}=De(bN,We),se=ro(b),k=V.useRef();vN(B);const W=V.useCallback(oe=>{A?.({x:oe[0],y:oe[1],zoom:oe[2]}),Y||q.setState({transform:oe})},[A,Y]);return V.useEffect(()=>{if(B.current){k.current=wE({domNode:B.current,minZoom:v,maxZoom:p,translateExtent:h,viewport:g,onDraggingChange:M=>q.setState({paneDragging:M}),onPanZoomStart:(M,H)=>{const{onViewportChangeStart:L,onMoveStart:G}=q.getState();G?.(M,H),L?.(H)},onPanZoom:(M,H)=>{const{onViewportChange:L,onMove:G}=q.getState();G?.(M,H),L?.(H)},onPanZoomEnd:(M,H)=>{const{onViewportChangeEnd:L,onMoveEnd:G}=q.getState();G?.(M,H),L?.(H)}});const{x:oe,y:D,zoom:Z}=k.current.getViewport();return q.setState({panZoom:k.current,transform:[oe,D,Z],domNode:B.current.closest(".react-flow")}),()=>{k.current?.destroy()}}},[]),V.useEffect(()=>{k.current?.update({onPaneContextMenu:n,zoomOnScroll:i,zoomOnPinch:o,panOnScroll:s,panOnScrollSpeed:c,panOnScrollMode:f,zoomOnDoubleClick:d,panOnDrag:m,zoomActivationKeyPressed:se,preventScrolling:N,noPanClassName:T,userSelectionActive:R,noWheelClassName:C,lib:$,onTransformChange:W,connectionInProgress:J,selectionOnDrag:z,paneClickDistance:w})},[n,i,o,s,c,f,d,m,se,N,T,R,C,$,W,J,z,w]),x.jsx("div",{className:"react-flow__renderer",ref:B,style:_u,children:_})}const EN=n=>({userSelectionActive:n.userSelectionActive,userSelectionRect:n.userSelectionRect});function NN(){const{userSelectionActive:n,userSelectionRect:i}=De(EN,We);return n&&i?x.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:i.width,height:i.height,transform:`translate(${i.x}px, ${i.y}px)`}}):null}const uf=(n,i)=>o=>{o.target===i.current&&n?.(o)},wN=n=>({userSelectionActive:n.userSelectionActive,elementsSelectable:n.elementsSelectable,connectionInProgress:n.connection.inProgress,dragging:n.paneDragging});function _N({isSelecting:n,selectionKeyPressed:i,selectionMode:o=so.Full,panOnDrag:s,paneClickDistance:c,selectionOnDrag:f,onSelectionStart:d,onSelectionEnd:m,onPaneClick:g,onPaneContextMenu:h,onPaneScroll:v,onPaneMouseEnter:p,onPaneMouseMove:b,onPaneMouseLeave:N,children:_}){const C=Ie(),{userSelectionActive:T,elementsSelectable:A,dragging:Y,connectionInProgress:w}=De(wN,We),z=A&&(n||T),q=V.useRef(null),B=V.useRef(),R=V.useRef(new Set),$=V.useRef(new Set),J=V.useRef(!1),se=L=>{if(J.current||w){J.current=!1;return}g?.(L),C.getState().resetSelectedElements(),C.setState({nodesSelectionActive:!1})},k=L=>{if(Array.isArray(s)&&s?.includes(2)){L.preventDefault();return}h?.(L)},W=v?L=>v(L):void 0,oe=L=>{J.current&&(L.stopPropagation(),J.current=!1)},D=L=>{const{domNode:G}=C.getState();if(B.current=G?.getBoundingClientRect(),!B.current)return;const te=L.target===q.current;if(!te&&!!L.target.closest(".nokey")||!n||!(f&&te||i)||L.button!==0||!L.isPrimary)return;L.target?.setPointerCapture?.(L.pointerId),J.current=!1;const{x:I,y:ee}=nn(L.nativeEvent,B.current);C.setState({userSelectionRect:{width:0,height:0,startX:I,startY:ee,x:I,y:ee}}),te||(L.stopPropagation(),L.preventDefault())},Z=L=>{const{userSelectionRect:G,transform:te,nodeLookup:E,edgeLookup:j,connectionLookup:I,triggerNodeChanges:ee,triggerEdgeChanges:ue,defaultEdgeOptions:re,resetSelectedElements:fe}=C.getState();if(!B.current||!G)return;const{x:ce,y:ge}=nn(L.nativeEvent,B.current),{startX:le,startY:he}=G;if(!J.current){const Se=i?0:c;if(Math.hypot(ce-le,ge-he)<=Se)return;fe(),d?.(L)}J.current=!0;const de={startX:le,startY:he,x:ce<le?ce:le,y:ge<he?ge:he,width:Math.abs(ce-le),height:Math.abs(ge-he)},pe=R.current,me=$.current;R.current=new Set(Df(E,de,te,o===so.Partial,!0).map(Se=>Se.id)),$.current=new Set;const _e=re?.selectable??!0;for(const Se of R.current){const Be=I.get(Se);if(Be)for(const{edgeId:Ue}of Be.values()){const ft=j.get(Ue);ft&&(ft.selectable??_e)&&$.current.add(Ue)}}if(!eg(pe,R.current)){const Se=Ga(E,R.current,!0);ee(Se)}if(!eg(me,$.current)){const Se=Ga(j,$.current);ue(Se)}C.setState({userSelectionRect:de,userSelectionActive:!0,nodesSelectionActive:!1})},M=L=>{L.button===0&&(L.target?.releasePointerCapture?.(L.pointerId),!T&&L.target===q.current&&C.getState().userSelectionRect&&se?.(L),C.setState({userSelectionActive:!1,userSelectionRect:null}),J.current&&(m?.(L),C.setState({nodesSelectionActive:R.current.size>0})))},H=s===!0||Array.isArray(s)&&s.includes(0);return x.jsxs("div",{className:ut(["react-flow__pane",{draggable:H,dragging:Y,selection:n}]),onClick:z?void 0:uf(se,q),onContextMenu:uf(k,q),onWheel:uf(W,q),onPointerEnter:z?void 0:p,onPointerMove:z?Z:b,onPointerUp:z?M:void 0,onPointerDownCapture:z?D:void 0,onClickCapture:z?oe:void 0,onPointerLeave:N,ref:q,style:_u,children:[_,x.jsx(NN,{})]})}function Nf({id:n,store:i,unselect:o=!1,nodeRef:s}){const{addSelectedNodes:c,unselectNodesAndEdges:f,multiSelectionActive:d,nodeLookup:m,onError:g}=i.getState(),h=m.get(n);if(!h){g?.("012",gn.error012(n));return}i.setState({nodesSelectionActive:!1}),h.selected?(o||h.selected&&d)&&(f({nodes:[h],edges:[]}),requestAnimationFrame(()=>s?.current?.blur())):c([n])}function ay({nodeRef:n,disabled:i=!1,noDragClassName:o,handleSelector:s,nodeId:c,isSelectable:f,nodeClickDistance:d}){const m=Ie(),[g,h]=V.useState(!1),v=V.useRef();return V.useEffect(()=>{v.current=rE({getStoreItems:()=>m.getState(),onNodeMouseDown:p=>{Nf({id:p,store:m,nodeRef:n})},onDragStart:()=>{h(!0)},onDragStop:()=>{h(!1)}})},[]),V.useEffect(()=>{if(i)v.current?.destroy();else if(n.current)return v.current?.update({noDragClassName:o,handleSelector:s,domNode:n.current,isSelectable:f,nodeId:c,nodeClickDistance:d}),()=>{v.current?.destroy()}},[o,s,i,f,n,c]),g}const MN=n=>i=>i.selected&&(i.draggable||n&&typeof i.draggable>"u");function iy(){const n=Ie();return V.useCallback(o=>{const{nodeExtent:s,snapToGrid:c,snapGrid:f,nodesDraggable:d,onError:m,updateNodePositions:g,nodeLookup:h,nodeOrigin:v}=n.getState(),p=new Map,b=MN(d),N=c?f[0]:5,_=c?f[1]:5,C=o.direction.x*N*o.factor,T=o.direction.y*_*o.factor;for(const[,A]of h){if(!b(A))continue;let Y={x:A.internals.positionAbsolute.x+C,y:A.internals.positionAbsolute.y+T};c&&(Y=yo(Y,f));const{position:w,positionAbsolute:z}=Mp({nodeId:A.id,nextPosition:Y,nodeLookup:h,nodeExtent:s,nodeOrigin:v,onError:m});A.position=w,A.internals.positionAbsolute=z,p.set(A.id,A)}g(p)},[])}const qf=V.createContext(null),CN=qf.Provider;qf.Consumer;const oy=()=>V.useContext(qf),AN=n=>({connectOnClick:n.connectOnClick,noPanClassName:n.noPanClassName,rfId:n.rfId}),TN=(n,i,o)=>s=>{const{connectionClickStartHandle:c,connectionMode:f,connection:d}=s,{fromHandle:m,toHandle:g,isValid:h}=d,v=g?.nodeId===n&&g?.id===i&&g?.type===o;return{connectingFrom:m?.nodeId===n&&m?.id===i&&m?.type===o,connectingTo:v,clickConnecting:c?.nodeId===n&&c?.id===i&&c?.type===o,isPossibleEndHandle:f===Ja.Strict?m?.type!==o:n!==m?.nodeId||i!==m?.id,connectionInProcess:!!m,clickConnectionInProcess:!!c,valid:v&&h}};function zN({type:n="source",position:i=xe.Top,isValidConnection:o,isConnectable:s=!0,isConnectableStart:c=!0,isConnectableEnd:f=!0,id:d,onConnect:m,children:g,className:h,onMouseDown:v,onTouchStart:p,...b},N){const _=d||null,C=n==="target",T=Ie(),A=oy(),{connectOnClick:Y,noPanClassName:w,rfId:z}=De(AN,We),{connectingFrom:q,connectingTo:B,clickConnecting:R,isPossibleEndHandle:$,connectionInProcess:J,clickConnectionInProcess:se,valid:k}=De(TN(A,_,n),We);A||T.getState().onError?.("010",gn.error010());const W=Z=>{const{defaultEdgeOptions:M,onConnect:H,hasDefaultEdges:L}=T.getState(),G={...M,...Z};if(L){const{edges:te,setEdges:E}=T.getState();E(K2(G,te))}H?.(G),m?.(G)},oe=Z=>{if(!A)return;const M=Hp(Z.nativeEvent);if(c&&(M&&Z.button===0||!M)){const H=T.getState();Ef.onPointerDown(Z.nativeEvent,{handleDomNode:Z.currentTarget,autoPanOnConnect:H.autoPanOnConnect,connectionMode:H.connectionMode,connectionRadius:H.connectionRadius,domNode:H.domNode,nodeLookup:H.nodeLookup,lib:H.lib,isTarget:C,handleId:_,nodeId:A,flowId:H.rfId,panBy:H.panBy,cancelConnection:H.cancelConnection,onConnectStart:H.onConnectStart,onConnectEnd:H.onConnectEnd,updateConnection:H.updateConnection,onConnect:W,isValidConnection:o||H.isValidConnection,getTransform:()=>T.getState().transform,getFromHandle:()=>T.getState().connection.fromHandle,autoPanSpeed:H.autoPanSpeed,dragThreshold:H.connectionDragThreshold})}M?v?.(Z):p?.(Z)},D=Z=>{const{onClickConnectStart:M,onClickConnectEnd:H,connectionClickStartHandle:L,connectionMode:G,isValidConnection:te,lib:E,rfId:j,nodeLookup:I,connection:ee}=T.getState();if(!A||!L&&!c)return;if(!L){M?.(Z.nativeEvent,{nodeId:A,handleId:_,handleType:n}),T.setState({connectionClickStartHandle:{nodeId:A,type:n,id:_}});return}const ue=Dp(Z.target),re=o||te,{connection:fe,isValid:ce}=Ef.isValid(Z.nativeEvent,{handle:{nodeId:A,id:_,type:n},connectionMode:G,fromNodeId:L.nodeId,fromHandleId:L.id||null,fromType:L.type,isValidConnection:re,flowId:j,doc:ue,lib:E,nodeLookup:I});ce&&fe&&W(fe);const ge=structuredClone(ee);delete ge.inProgress,ge.toPosition=ge.toHandle?ge.toHandle.position:null,H?.(Z,ge),T.setState({connectionClickStartHandle:null})};return x.jsx("div",{"data-handleid":_,"data-nodeid":A,"data-handlepos":i,"data-id":`${z}-${A}-${_}-${n}`,className:ut(["react-flow__handle",`react-flow__handle-${i}`,"nodrag",w,h,{source:!C,target:C,connectable:s,connectablestart:c,connectableend:f,clickconnecting:R,connectingfrom:q,connectingto:B,valid:k,connectionindicator:s&&(!J||$)&&(J||se?f:c)}]),onMouseDown:oe,onTouchStart:oe,onClick:Y?D:void 0,ref:N,...b,children:g})}const hn=V.memo(ny(zN));function jN({data:n,isConnectable:i,sourcePosition:o=xe.Bottom}){return x.jsxs(x.Fragment,{children:[n?.label,x.jsx(hn,{type:"source",position:o,isConnectable:i})]})}function DN({data:n,isConnectable:i,targetPosition:o=xe.Top,sourcePosition:s=xe.Bottom}){return x.jsxs(x.Fragment,{children:[x.jsx(hn,{type:"target",position:o,isConnectable:i}),n?.label,x.jsx(hn,{type:"source",position:s,isConnectable:i})]})}function ON(){return null}function HN({data:n,isConnectable:i,targetPosition:o=xe.Top}){return x.jsxs(x.Fragment,{children:[x.jsx(hn,{type:"target",position:o,isConnectable:i}),n?.label]})}const mu={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},zg={input:jN,default:DN,output:HN,group:ON};function RN(n){return n.internals.handleBounds===void 0?{width:n.width??n.initialWidth??n.style?.width,height:n.height??n.initialHeight??n.style?.height}:{width:n.width??n.style?.width,height:n.height??n.style?.height}}const BN=n=>{const{width:i,height:o,x:s,y:c}=po(n.nodeLookup,{filter:f=>!!f.selected});return{width:tn(i)?i:null,height:tn(o)?o:null,userSelectionActive:n.userSelectionActive,transformString:`translate(${n.transform[0]}px,${n.transform[1]}px) scale(${n.transform[2]}) translate(${s}px,${c}px)`}};function UN({onSelectionContextMenu:n,noPanClassName:i,disableKeyboardA11y:o}){const s=Ie(),{width:c,height:f,transformString:d,userSelectionActive:m}=De(BN,We),g=iy(),h=V.useRef(null);if(V.useEffect(()=>{o||h.current?.focus({preventScroll:!0})},[o]),ay({nodeRef:h}),m||!c||!f)return null;const v=n?b=>{const N=s.getState().nodes.filter(_=>_.selected);n(b,N)}:void 0,p=b=>{Object.prototype.hasOwnProperty.call(mu,b.key)&&(b.preventDefault(),g({direction:mu[b.key],factor:b.shiftKey?4:1}))};return x.jsx("div",{className:ut(["react-flow__nodesselection","react-flow__container",i]),style:{transform:d},children:x.jsx("div",{ref:h,className:"react-flow__nodesselection-rect",onContextMenu:v,tabIndex:o?void 0:-1,onKeyDown:o?void 0:p,style:{width:c,height:f}})})}const jg=typeof window<"u"?window:void 0,LN=n=>({nodesSelectionActive:n.nodesSelectionActive,userSelectionActive:n.userSelectionActive});function sy({children:n,onPaneClick:i,onPaneMouseEnter:o,onPaneMouseMove:s,onPaneMouseLeave:c,onPaneContextMenu:f,onPaneScroll:d,paneClickDistance:m,deleteKeyCode:g,selectionKeyCode:h,selectionOnDrag:v,selectionMode:p,onSelectionStart:b,onSelectionEnd:N,multiSelectionKeyCode:_,panActivationKeyCode:C,zoomActivationKeyCode:T,elementsSelectable:A,zoomOnScroll:Y,zoomOnPinch:w,panOnScroll:z,panOnScrollSpeed:q,panOnScrollMode:B,zoomOnDoubleClick:R,panOnDrag:$,defaultViewport:J,translateExtent:se,minZoom:k,maxZoom:W,preventScrolling:oe,onSelectionContextMenu:D,noWheelClassName:Z,noPanClassName:M,disableKeyboardA11y:H,onViewportChange:L,isControlledViewport:G}){const{nodesSelectionActive:te,userSelectionActive:E}=De(LN,We),j=ro(h,{target:jg}),I=ro(C,{target:jg}),ee=I||$,ue=I||z,re=v&&ee!==!0,fe=j||E||re;return xN({deleteKeyCode:g,multiSelectionKeyCode:_}),x.jsx(SN,{onPaneContextMenu:f,elementsSelectable:A,zoomOnScroll:Y,zoomOnPinch:w,panOnScroll:ue,panOnScrollSpeed:q,panOnScrollMode:B,zoomOnDoubleClick:R,panOnDrag:!j&&ee,defaultViewport:J,translateExtent:se,minZoom:k,maxZoom:W,zoomActivationKeyCode:T,preventScrolling:oe,noWheelClassName:Z,noPanClassName:M,onViewportChange:L,isControlledViewport:G,paneClickDistance:m,selectionOnDrag:re,children:x.jsxs(_N,{onSelectionStart:b,onSelectionEnd:N,onPaneClick:i,onPaneMouseEnter:o,onPaneMouseMove:s,onPaneMouseLeave:c,onPaneContextMenu:f,onPaneScroll:d,panOnDrag:ee,isSelecting:!!fe,selectionMode:p,selectionKeyPressed:j,paneClickDistance:m,selectionOnDrag:re,children:[n,te&&x.jsx(UN,{onSelectionContextMenu:D,noPanClassName:M,disableKeyboardA11y:H})]})})}sy.displayName="FlowRenderer";const YN=V.memo(sy),VN=n=>i=>n?Df(i.nodeLookup,{x:0,y:0,width:i.width,height:i.height},i.transform,!0).map(o=>o.id):Array.from(i.nodeLookup.keys());function qN(n){return De(V.useCallback(VN(n),[n]),We)}const XN=n=>n.updateNodeInternals;function GN(){const n=De(XN),[i]=V.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(o=>{const s=new Map;o.forEach(c=>{const f=c.target.getAttribute("data-id");s.set(f,{id:f,nodeElement:c.target,force:!0})}),n(s)}));return V.useEffect(()=>()=>{i?.disconnect()},[i]),i}function ZN({node:n,nodeType:i,hasDimensions:o,resizeObserver:s}){const c=Ie(),f=V.useRef(null),d=V.useRef(null),m=V.useRef(n.sourcePosition),g=V.useRef(n.targetPosition),h=V.useRef(i),v=o&&!!n.internals.handleBounds;return V.useEffect(()=>{f.current&&!n.hidden&&(!v||d.current!==f.current)&&(d.current&&s?.unobserve(d.current),s?.observe(f.current),d.current=f.current)},[v,n.hidden]),V.useEffect(()=>()=>{d.current&&(s?.unobserve(d.current),d.current=null)},[]),V.useEffect(()=>{if(f.current){const p=h.current!==i,b=m.current!==n.sourcePosition,N=g.current!==n.targetPosition;(p||b||N)&&(h.current=i,m.current=n.sourcePosition,g.current=n.targetPosition,c.getState().updateNodeInternals(new Map([[n.id,{id:n.id,nodeElement:f.current,force:!0}]])))}},[n.id,i,n.sourcePosition,n.targetPosition]),f}function kN({id:n,onClick:i,onMouseEnter:o,onMouseMove:s,onMouseLeave:c,onContextMenu:f,onDoubleClick:d,nodesDraggable:m,elementsSelectable:g,nodesConnectable:h,nodesFocusable:v,resizeObserver:p,noDragClassName:b,noPanClassName:N,disableKeyboardA11y:_,rfId:C,nodeTypes:T,nodeClickDistance:A,onError:Y}){const{node:w,internals:z,isParent:q}=De(ce=>{const ge=ce.nodeLookup.get(n),le=ce.parentLookup.has(n);return{node:ge,internals:ge.internals,isParent:le}},We);let B=w.type||"default",R=T?.[B]||zg[B];R===void 0&&(Y?.("003",gn.error003(B)),B="default",R=T?.default||zg.default);const $=!!(w.draggable||m&&typeof w.draggable>"u"),J=!!(w.selectable||g&&typeof w.selectable>"u"),se=!!(w.connectable||h&&typeof w.connectable>"u"),k=!!(w.focusable||v&&typeof w.focusable>"u"),W=Ie(),oe=zp(w),D=ZN({node:w,nodeType:B,hasDimensions:oe,resizeObserver:p}),Z=ay({nodeRef:D,disabled:w.hidden||!$,noDragClassName:b,handleSelector:w.dragHandle,nodeId:n,isSelectable:J,nodeClickDistance:A}),M=iy();if(w.hidden)return null;const H=Gn(w),L=RN(w),G=J||$||i||o||s||c,te=o?ce=>o(ce,{...z.userNode}):void 0,E=s?ce=>s(ce,{...z.userNode}):void 0,j=c?ce=>c(ce,{...z.userNode}):void 0,I=f?ce=>f(ce,{...z.userNode}):void 0,ee=d?ce=>d(ce,{...z.userNode}):void 0,ue=ce=>{const{selectNodesOnDrag:ge,nodeDragThreshold:le}=W.getState();J&&(!ge||!$||le>0)&&Nf({id:n,store:W,nodeRef:D}),i&&i(ce,{...z.userNode})},re=ce=>{if(!(Op(ce.nativeEvent)||_)){if(Sp.includes(ce.key)&&J){const ge=ce.key==="Escape";Nf({id:n,store:W,unselect:ge,nodeRef:D})}else if($&&w.selected&&Object.prototype.hasOwnProperty.call(mu,ce.key)){ce.preventDefault();const{ariaLabelConfig:ge}=W.getState();W.setState({ariaLiveMessage:ge["node.a11yDescription.ariaLiveMessage"]({direction:ce.key.replace("Arrow","").toLowerCase(),x:~~z.positionAbsolute.x,y:~~z.positionAbsolute.y})}),M({direction:mu[ce.key],factor:ce.shiftKey?4:1})}}},fe=()=>{if(_||!D.current?.matches(":focus-visible"))return;const{transform:ce,width:ge,height:le,autoPanOnNodeFocus:he,setCenter:de}=W.getState();if(!he)return;Df(new Map([[n,w]]),{x:0,y:0,width:ge,height:le},ce,!0).length>0||de(w.position.x+H.width/2,w.position.y+H.height/2,{zoom:ce[2]})};return x.jsx("div",{className:ut(["react-flow__node",`react-flow__node-${B}`,{[N]:$},w.className,{selected:w.selected,selectable:J,parent:q,draggable:$,dragging:Z}]),ref:D,style:{zIndex:z.z,transform:`translate(${z.positionAbsolute.x}px,${z.positionAbsolute.y}px)`,pointerEvents:G?"all":"none",visibility:oe?"visible":"hidden",...w.style,...L},"data-id":n,"data-testid":`rf__node-${n}`,onMouseEnter:te,onMouseMove:E,onMouseLeave:j,onContextMenu:I,onClick:ue,onDoubleClick:ee,onKeyDown:k?re:void 0,tabIndex:k?0:void 0,onFocus:k?fe:void 0,role:w.ariaRole??(k?"group":void 0),"aria-roledescription":"node","aria-describedby":_?void 0:`${Ip}-${C}`,"aria-label":w.ariaLabel,...w.domAttributes,children:x.jsx(CN,{value:n,children:x.jsx(R,{id:n,data:w.data,type:B,positionAbsoluteX:z.positionAbsolute.x,positionAbsoluteY:z.positionAbsolute.y,selected:w.selected??!1,selectable:J,draggable:$,deletable:w.deletable??!0,isConnectable:se,sourcePosition:w.sourcePosition,targetPosition:w.targetPosition,dragging:Z,dragHandle:w.dragHandle,zIndex:z.z,parentId:w.parentId,...H})})})}var $N=V.memo(kN);const QN=n=>({nodesDraggable:n.nodesDraggable,nodesConnectable:n.nodesConnectable,nodesFocusable:n.nodesFocusable,elementsSelectable:n.elementsSelectable,onError:n.onError});function uy(n){const{nodesDraggable:i,nodesConnectable:o,nodesFocusable:s,elementsSelectable:c,onError:f}=De(QN,We),d=qN(n.onlyRenderVisibleElements),m=GN();return x.jsx("div",{className:"react-flow__nodes",style:_u,children:d.map(g=>x.jsx($N,{id:g,nodeTypes:n.nodeTypes,nodeExtent:n.nodeExtent,onClick:n.onNodeClick,onMouseEnter:n.onNodeMouseEnter,onMouseMove:n.onNodeMouseMove,onMouseLeave:n.onNodeMouseLeave,onContextMenu:n.onNodeContextMenu,onDoubleClick:n.onNodeDoubleClick,noDragClassName:n.noDragClassName,noPanClassName:n.noPanClassName,rfId:n.rfId,disableKeyboardA11y:n.disableKeyboardA11y,resizeObserver:m,nodesDraggable:i,nodesConnectable:o,nodesFocusable:s,elementsSelectable:c,nodeClickDistance:n.nodeClickDistance,onError:f},g))})}uy.displayName="NodeRenderer";const KN=V.memo(uy);function JN(n){return De(V.useCallback(o=>{if(!n)return o.edges.map(c=>c.id);const s=[];if(o.width&&o.height)for(const c of o.edges){const f=o.nodeLookup.get(c.source),d=o.nodeLookup.get(c.target);f&&d&&k2({sourceNode:f,targetNode:d,width:o.width,height:o.height,transform:o.transform})&&s.push(c.id)}return s},[n]),We)}const FN=({color:n="none",strokeWidth:i=1})=>{const o={strokeWidth:i,...n&&{stroke:n}};return x.jsx("polyline",{className:"arrow",style:o,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},WN=({color:n="none",strokeWidth:i=1})=>{const o={strokeWidth:i,...n&&{stroke:n,fill:n}};return x.jsx("polyline",{className:"arrowclosed",style:o,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},Dg={[fu.Arrow]:FN,[fu.ArrowClosed]:WN};function IN(n){const i=Ie();return V.useMemo(()=>Object.prototype.hasOwnProperty.call(Dg,n)?Dg[n]:(i.getState().onError?.("009",gn.error009(n)),null),[n])}const PN=({id:n,type:i,color:o,width:s=12.5,height:c=12.5,markerUnits:f="strokeWidth",strokeWidth:d,orient:m="auto-start-reverse"})=>{const g=IN(i);return g?x.jsx("marker",{className:"react-flow__arrowhead",id:n,markerWidth:`${s}`,markerHeight:`${c}`,viewBox:"-10 -10 20 20",markerUnits:f,orient:m,refX:"0",refY:"0",children:x.jsx(g,{color:o,strokeWidth:d})}):null},cy=({defaultColor:n,rfId:i})=>{const o=De(f=>f.edges),s=De(f=>f.defaultEdgeOptions),c=V.useMemo(()=>P2(o,{id:i,defaultColor:n,defaultMarkerStart:s?.markerStart,defaultMarkerEnd:s?.markerEnd}),[o,s,i,n]);return c.length?x.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:x.jsx("defs",{children:c.map(f=>x.jsx(PN,{id:f.id,type:f.type,color:f.color,width:f.width,height:f.height,markerUnits:f.markerUnits,strokeWidth:f.strokeWidth,orient:f.orient},f.id))})}):null};cy.displayName="MarkerDefinitions";var ew=V.memo(cy);function ry({x:n,y:i,label:o,labelStyle:s,labelShowBg:c=!0,labelBgStyle:f,labelBgPadding:d=[2,4],labelBgBorderRadius:m=2,children:g,className:h,...v}){const[p,b]=V.useState({x:1,y:0,width:0,height:0}),N=ut(["react-flow__edge-textwrapper",h]),_=V.useRef(null);return V.useEffect(()=>{if(_.current){const C=_.current.getBBox();b({x:C.x,y:C.y,width:C.width,height:C.height})}},[o]),o?x.jsxs("g",{transform:`translate(${n-p.width/2} ${i-p.height/2})`,className:N,visibility:p.width?"visible":"hidden",...v,children:[c&&x.jsx("rect",{width:p.width+2*d[0],x:-d[0],y:-d[1],height:p.height+2*d[1],className:"react-flow__edge-textbg",style:f,rx:m,ry:m}),x.jsx("text",{className:"react-flow__edge-text",y:p.height/2,dy:"0.3em",ref:_,style:s,children:o}),g]}):null}ry.displayName="EdgeText";const tw=V.memo(ry);function Mu({path:n,labelX:i,labelY:o,label:s,labelStyle:c,labelShowBg:f,labelBgStyle:d,labelBgPadding:m,labelBgBorderRadius:g,interactionWidth:h=20,...v}){return x.jsxs(x.Fragment,{children:[x.jsx("path",{...v,d:n,fill:"none",className:ut(["react-flow__edge-path",v.className])}),h?x.jsx("path",{d:n,fill:"none",strokeOpacity:0,strokeWidth:h,className:"react-flow__edge-interaction"}):null,s&&tn(i)&&tn(o)?x.jsx(tw,{x:i,y:o,label:s,labelStyle:c,labelShowBg:f,labelBgStyle:d,labelBgPadding:m,labelBgBorderRadius:g}):null]})}function Og({pos:n,x1:i,y1:o,x2:s,y2:c}){return n===xe.Left||n===xe.Right?[.5*(i+s),o]:[i,.5*(o+c)]}function fy({sourceX:n,sourceY:i,sourcePosition:o=xe.Bottom,targetX:s,targetY:c,targetPosition:f=xe.Top}){const[d,m]=Og({pos:o,x1:n,y1:i,x2:s,y2:c}),[g,h]=Og({pos:f,x1:s,y1:c,x2:n,y2:i}),[v,p,b,N]=Rp({sourceX:n,sourceY:i,targetX:s,targetY:c,sourceControlX:d,sourceControlY:m,targetControlX:g,targetControlY:h});return[`M${n},${i} C${d},${m} ${g},${h} ${s},${c}`,v,p,b,N]}function dy(n){return V.memo(({id:i,sourceX:o,sourceY:s,targetX:c,targetY:f,sourcePosition:d,targetPosition:m,label:g,labelStyle:h,labelShowBg:v,labelBgStyle:p,labelBgPadding:b,labelBgBorderRadius:N,style:_,markerEnd:C,markerStart:T,interactionWidth:A})=>{const[Y,w,z]=fy({sourceX:o,sourceY:s,sourcePosition:d,targetX:c,targetY:f,targetPosition:m}),q=n.isInternal?void 0:i;return x.jsx(Mu,{id:q,path:Y,labelX:w,labelY:z,label:g,labelStyle:h,labelShowBg:v,labelBgStyle:p,labelBgPadding:b,labelBgBorderRadius:N,style:_,markerEnd:C,markerStart:T,interactionWidth:A})})}const nw=dy({isInternal:!1}),hy=dy({isInternal:!0});nw.displayName="SimpleBezierEdge";hy.displayName="SimpleBezierEdgeInternal";function my(n){return V.memo(({id:i,sourceX:o,sourceY:s,targetX:c,targetY:f,label:d,labelStyle:m,labelShowBg:g,labelBgStyle:h,labelBgPadding:v,labelBgBorderRadius:p,style:b,sourcePosition:N=xe.Bottom,targetPosition:_=xe.Top,markerEnd:C,markerStart:T,pathOptions:A,interactionWidth:Y})=>{const[w,z,q]=vf({sourceX:o,sourceY:s,sourcePosition:N,targetX:c,targetY:f,targetPosition:_,borderRadius:A?.borderRadius,offset:A?.offset,stepPosition:A?.stepPosition}),B=n.isInternal?void 0:i;return x.jsx(Mu,{id:B,path:w,labelX:z,labelY:q,label:d,labelStyle:m,labelShowBg:g,labelBgStyle:h,labelBgPadding:v,labelBgBorderRadius:p,style:b,markerEnd:C,markerStart:T,interactionWidth:Y})})}const gy=my({isInternal:!1}),py=my({isInternal:!0});gy.displayName="SmoothStepEdge";py.displayName="SmoothStepEdgeInternal";function yy(n){return V.memo(({id:i,...o})=>{const s=n.isInternal?void 0:i;return x.jsx(gy,{...o,id:s,pathOptions:V.useMemo(()=>({borderRadius:0,offset:o.pathOptions?.offset}),[o.pathOptions?.offset])})})}const lw=yy({isInternal:!1}),xy=yy({isInternal:!0});lw.displayName="StepEdge";xy.displayName="StepEdgeInternal";function vy(n){return V.memo(({id:i,sourceX:o,sourceY:s,targetX:c,targetY:f,label:d,labelStyle:m,labelShowBg:g,labelBgStyle:h,labelBgPadding:v,labelBgBorderRadius:p,style:b,markerEnd:N,markerStart:_,interactionWidth:C})=>{const[T,A,Y]=Lp({sourceX:o,sourceY:s,targetX:c,targetY:f}),w=n.isInternal?void 0:i;return x.jsx(Mu,{id:w,path:T,labelX:A,labelY:Y,label:d,labelStyle:m,labelShowBg:g,labelBgStyle:h,labelBgPadding:v,labelBgBorderRadius:p,style:b,markerEnd:N,markerStart:_,interactionWidth:C})})}const aw=vy({isInternal:!1}),by=vy({isInternal:!0});aw.displayName="StraightEdge";by.displayName="StraightEdgeInternal";function Sy(n){return V.memo(({id:i,sourceX:o,sourceY:s,targetX:c,targetY:f,sourcePosition:d=xe.Bottom,targetPosition:m=xe.Top,label:g,labelStyle:h,labelShowBg:v,labelBgStyle:p,labelBgPadding:b,labelBgBorderRadius:N,style:_,markerEnd:C,markerStart:T,pathOptions:A,interactionWidth:Y})=>{const[w,z,q]=Bp({sourceX:o,sourceY:s,sourcePosition:d,targetX:c,targetY:f,targetPosition:m,curvature:A?.curvature}),B=n.isInternal?void 0:i;return x.jsx(Mu,{id:B,path:w,labelX:z,labelY:q,label:g,labelStyle:h,labelShowBg:v,labelBgStyle:p,labelBgPadding:b,labelBgBorderRadius:N,style:_,markerEnd:C,markerStart:T,interactionWidth:Y})})}const iw=Sy({isInternal:!1}),Ey=Sy({isInternal:!0});iw.displayName="BezierEdge";Ey.displayName="BezierEdgeInternal";const Hg={default:Ey,straight:by,step:xy,smoothstep:py,simplebezier:hy},Rg={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},ow=(n,i,o)=>o===xe.Left?n-i:o===xe.Right?n+i:n,sw=(n,i,o)=>o===xe.Top?n-i:o===xe.Bottom?n+i:n,Bg="react-flow__edgeupdater";function Ug({position:n,centerX:i,centerY:o,radius:s=10,onMouseDown:c,onMouseEnter:f,onMouseOut:d,type:m}){return x.jsx("circle",{onMouseDown:c,onMouseEnter:f,onMouseOut:d,className:ut([Bg,`${Bg}-${m}`]),cx:ow(i,s,n),cy:sw(o,s,n),r:s,stroke:"transparent",fill:"transparent"})}function uw({isReconnectable:n,reconnectRadius:i,edge:o,sourceX:s,sourceY:c,targetX:f,targetY:d,sourcePosition:m,targetPosition:g,onReconnect:h,onReconnectStart:v,onReconnectEnd:p,setReconnecting:b,setUpdateHover:N}){const _=Ie(),C=(z,q)=>{if(z.button!==0)return;const{autoPanOnConnect:B,domNode:R,isValidConnection:$,connectionMode:J,connectionRadius:se,lib:k,onConnectStart:W,onConnectEnd:oe,cancelConnection:D,nodeLookup:Z,rfId:M,panBy:H,updateConnection:L}=_.getState(),G=q.type==="target",te=(I,ee)=>{b(!1),p?.(I,o,q.type,ee)},E=I=>h?.(o,I),j=(I,ee)=>{b(!0),v?.(z,o,q.type),W?.(I,ee)};Ef.onPointerDown(z.nativeEvent,{autoPanOnConnect:B,connectionMode:J,connectionRadius:se,domNode:R,handleId:q.id,nodeId:q.nodeId,nodeLookup:Z,isTarget:G,edgeUpdaterType:q.type,lib:k,flowId:M,cancelConnection:D,panBy:H,isValidConnection:$,onConnect:E,onConnectStart:j,onConnectEnd:oe,onReconnectEnd:te,updateConnection:L,getTransform:()=>_.getState().transform,getFromHandle:()=>_.getState().connection.fromHandle,dragThreshold:_.getState().connectionDragThreshold,handleDomNode:z.currentTarget})},T=z=>C(z,{nodeId:o.target,id:o.targetHandle??null,type:"target"}),A=z=>C(z,{nodeId:o.source,id:o.sourceHandle??null,type:"source"}),Y=()=>N(!0),w=()=>N(!1);return x.jsxs(x.Fragment,{children:[(n===!0||n==="source")&&x.jsx(Ug,{position:m,centerX:s,centerY:c,radius:i,onMouseDown:T,onMouseEnter:Y,onMouseOut:w,type:"source"}),(n===!0||n==="target")&&x.jsx(Ug,{position:g,centerX:f,centerY:d,radius:i,onMouseDown:A,onMouseEnter:Y,onMouseOut:w,type:"target"})]})}function cw({id:n,edgesFocusable:i,edgesReconnectable:o,elementsSelectable:s,onClick:c,onDoubleClick:f,onContextMenu:d,onMouseEnter:m,onMouseMove:g,onMouseLeave:h,reconnectRadius:v,onReconnect:p,onReconnectStart:b,onReconnectEnd:N,rfId:_,edgeTypes:C,noPanClassName:T,onError:A,disableKeyboardA11y:Y}){let w=De(de=>de.edgeLookup.get(n));const z=De(de=>de.defaultEdgeOptions);w=z?{...z,...w}:w;let q=w.type||"default",B=C?.[q]||Hg[q];B===void 0&&(A?.("011",gn.error011(q)),q="default",B=C?.default||Hg.default);const R=!!(w.focusable||i&&typeof w.focusable>"u"),$=typeof p<"u"&&(w.reconnectable||o&&typeof w.reconnectable>"u"),J=!!(w.selectable||s&&typeof w.selectable>"u"),se=V.useRef(null),[k,W]=V.useState(!1),[oe,D]=V.useState(!1),Z=Ie(),{zIndex:M,sourceX:H,sourceY:L,targetX:G,targetY:te,sourcePosition:E,targetPosition:j}=De(V.useCallback(de=>{const pe=de.nodeLookup.get(w.source),me=de.nodeLookup.get(w.target);if(!pe||!me)return{zIndex:w.zIndex,...Rg};const _e=I2({id:n,sourceNode:pe,targetNode:me,sourceHandle:w.sourceHandle||null,targetHandle:w.targetHandle||null,connectionMode:de.connectionMode,onError:A});return{zIndex:Z2({selected:w.selected,zIndex:w.zIndex,sourceNode:pe,targetNode:me,elevateOnSelect:de.elevateEdgesOnSelect,zIndexMode:de.zIndexMode}),..._e||Rg}},[w.source,w.target,w.sourceHandle,w.targetHandle,w.selected,w.zIndex]),We),I=V.useMemo(()=>w.markerStart?`url('#${bf(w.markerStart,_)}')`:void 0,[w.markerStart,_]),ee=V.useMemo(()=>w.markerEnd?`url('#${bf(w.markerEnd,_)}')`:void 0,[w.markerEnd,_]);if(w.hidden||H===null||L===null||G===null||te===null)return null;const ue=de=>{const{addSelectedEdges:pe,unselectNodesAndEdges:me,multiSelectionActive:_e}=Z.getState();J&&(Z.setState({nodesSelectionActive:!1}),w.selected&&_e?(me({nodes:[],edges:[w]}),se.current?.blur()):pe([n])),c&&c(de,w)},re=f?de=>{f(de,{...w})}:void 0,fe=d?de=>{d(de,{...w})}:void 0,ce=m?de=>{m(de,{...w})}:void 0,ge=g?de=>{g(de,{...w})}:void 0,le=h?de=>{h(de,{...w})}:void 0,he=de=>{if(!Y&&Sp.includes(de.key)&&J){const{unselectNodesAndEdges:pe,addSelectedEdges:me}=Z.getState();de.key==="Escape"?(se.current?.blur(),pe({edges:[w]})):me([n])}};return x.jsx("svg",{style:{zIndex:M},children:x.jsxs("g",{className:ut(["react-flow__edge",`react-flow__edge-${q}`,w.className,T,{selected:w.selected,animated:w.animated,inactive:!J&&!c,updating:k,selectable:J}]),onClick:ue,onDoubleClick:re,onContextMenu:fe,onMouseEnter:ce,onMouseMove:ge,onMouseLeave:le,onKeyDown:R?he:void 0,tabIndex:R?0:void 0,role:w.ariaRole??(R?"group":"img"),"aria-roledescription":"edge","data-id":n,"data-testid":`rf__edge-${n}`,"aria-label":w.ariaLabel===null?void 0:w.ariaLabel||`Edge from ${w.source} to ${w.target}`,"aria-describedby":R?`${Pp}-${_}`:void 0,ref:se,...w.domAttributes,children:[!oe&&x.jsx(B,{id:n,source:w.source,target:w.target,type:w.type,selected:w.selected,animated:w.animated,selectable:J,deletable:w.deletable??!0,label:w.label,labelStyle:w.labelStyle,labelShowBg:w.labelShowBg,labelBgStyle:w.labelBgStyle,labelBgPadding:w.labelBgPadding,labelBgBorderRadius:w.labelBgBorderRadius,sourceX:H,sourceY:L,targetX:G,targetY:te,sourcePosition:E,targetPosition:j,data:w.data,style:w.style,sourceHandleId:w.sourceHandle,targetHandleId:w.targetHandle,markerStart:I,markerEnd:ee,pathOptions:"pathOptions"in w?w.pathOptions:void 0,interactionWidth:w.interactionWidth}),$&&x.jsx(uw,{edge:w,isReconnectable:$,reconnectRadius:v,onReconnect:p,onReconnectStart:b,onReconnectEnd:N,sourceX:H,sourceY:L,targetX:G,targetY:te,sourcePosition:E,targetPosition:j,setUpdateHover:W,setReconnecting:D})]})})}var rw=V.memo(cw);const fw=n=>({edgesFocusable:n.edgesFocusable,edgesReconnectable:n.edgesReconnectable,elementsSelectable:n.elementsSelectable,connectionMode:n.connectionMode,onError:n.onError});function Ny({defaultMarkerColor:n,onlyRenderVisibleElements:i,rfId:o,edgeTypes:s,noPanClassName:c,onReconnect:f,onEdgeContextMenu:d,onEdgeMouseEnter:m,onEdgeMouseMove:g,onEdgeMouseLeave:h,onEdgeClick:v,reconnectRadius:p,onEdgeDoubleClick:b,onReconnectStart:N,onReconnectEnd:_,disableKeyboardA11y:C}){const{edgesFocusable:T,edgesReconnectable:A,elementsSelectable:Y,onError:w}=De(fw,We),z=JN(i);return x.jsxs("div",{className:"react-flow__edges",children:[x.jsx(ew,{defaultColor:n,rfId:o}),z.map(q=>x.jsx(rw,{id:q,edgesFocusable:T,edgesReconnectable:A,elementsSelectable:Y,noPanClassName:c,onReconnect:f,onContextMenu:d,onMouseEnter:m,onMouseMove:g,onMouseLeave:h,onClick:v,reconnectRadius:p,onDoubleClick:b,onReconnectStart:N,onReconnectEnd:_,rfId:o,onError:w,edgeTypes:s,disableKeyboardA11y:C},q))]})}Ny.displayName="EdgeRenderer";const dw=V.memo(Ny),hw=n=>`translate(${n.transform[0]}px,${n.transform[1]}px) scale(${n.transform[2]})`;function mw({children:n}){const i=De(hw);return x.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:i},children:n})}function gw(n){const i=Vf(),o=V.useRef(!1);V.useEffect(()=>{!o.current&&i.viewportInitialized&&n&&(setTimeout(()=>n(i),1),o.current=!0)},[n,i.viewportInitialized])}const pw=n=>n.panZoom?.syncViewport;function yw(n){const i=De(pw),o=Ie();return V.useEffect(()=>{n&&(i?.(n),o.setState({transform:[n.x,n.y,n.zoom]}))},[n,i]),null}function xw(n){return n.connection.inProgress?{...n.connection,to:xo(n.connection.to,n.transform)}:{...n.connection}}function vw(n){return xw}function bw(n){const i=vw();return De(i,We)}const Sw=n=>({nodesConnectable:n.nodesConnectable,isValid:n.connection.isValid,inProgress:n.connection.inProgress,width:n.width,height:n.height});function Ew({containerStyle:n,style:i,type:o,component:s}){const{nodesConnectable:c,width:f,height:d,isValid:m,inProgress:g}=De(Sw,We);return!(f&&c&&g)?null:x.jsx("svg",{style:n,width:f,height:d,className:"react-flow__connectionline react-flow__container",children:x.jsx("g",{className:ut(["react-flow__connection",wp(m)]),children:x.jsx(wy,{style:i,type:o,CustomComponent:s,isValid:m})})})}const wy=({style:n,type:i=Sl.Bezier,CustomComponent:o,isValid:s})=>{const{inProgress:c,from:f,fromNode:d,fromHandle:m,fromPosition:g,to:h,toNode:v,toHandle:p,toPosition:b,pointer:N}=bw();if(!c)return;if(o)return x.jsx(o,{connectionLineType:i,connectionLineStyle:n,fromNode:d,fromHandle:m,fromX:f.x,fromY:f.y,toX:h.x,toY:h.y,fromPosition:g,toPosition:b,connectionStatus:wp(s),toNode:v,toHandle:p,pointer:N});let _="";const C={sourceX:f.x,sourceY:f.y,sourcePosition:g,targetX:h.x,targetY:h.y,targetPosition:b};switch(i){case Sl.Bezier:[_]=Bp(C);break;case Sl.SimpleBezier:[_]=fy(C);break;case Sl.Step:[_]=vf({...C,borderRadius:0});break;case Sl.SmoothStep:[_]=vf(C);break;default:[_]=Lp(C)}return x.jsx("path",{d:_,fill:"none",className:"react-flow__connection-path",style:n})};wy.displayName="ConnectionLine";const Nw={};function Lg(n=Nw){V.useRef(n),Ie(),V.useEffect(()=>{},[n])}function ww(){Ie(),V.useRef(!1),V.useEffect(()=>{},[])}function _y({nodeTypes:n,edgeTypes:i,onInit:o,onNodeClick:s,onEdgeClick:c,onNodeDoubleClick:f,onEdgeDoubleClick:d,onNodeMouseEnter:m,onNodeMouseMove:g,onNodeMouseLeave:h,onNodeContextMenu:v,onSelectionContextMenu:p,onSelectionStart:b,onSelectionEnd:N,connectionLineType:_,connectionLineStyle:C,connectionLineComponent:T,connectionLineContainerStyle:A,selectionKeyCode:Y,selectionOnDrag:w,selectionMode:z,multiSelectionKeyCode:q,panActivationKeyCode:B,zoomActivationKeyCode:R,deleteKeyCode:$,onlyRenderVisibleElements:J,elementsSelectable:se,defaultViewport:k,translateExtent:W,minZoom:oe,maxZoom:D,preventScrolling:Z,defaultMarkerColor:M,zoomOnScroll:H,zoomOnPinch:L,panOnScroll:G,panOnScrollSpeed:te,panOnScrollMode:E,zoomOnDoubleClick:j,panOnDrag:I,onPaneClick:ee,onPaneMouseEnter:ue,onPaneMouseMove:re,onPaneMouseLeave:fe,onPaneScroll:ce,onPaneContextMenu:ge,paneClickDistance:le,nodeClickDistance:he,onEdgeContextMenu:de,onEdgeMouseEnter:pe,onEdgeMouseMove:me,onEdgeMouseLeave:_e,reconnectRadius:Se,onReconnect:Be,onReconnectStart:Ue,onReconnectEnd:ft,noDragClassName:Qe,noWheelClassName:Ve,noPanClassName:qe,disableKeyboardA11y:ht,nodeExtent:ke,rfId:yn,viewport:xn,onViewportChange:Zn}){return Lg(n),Lg(i),ww(),gw(o),yw(xn),x.jsx(YN,{onPaneClick:ee,onPaneMouseEnter:ue,onPaneMouseMove:re,onPaneMouseLeave:fe,onPaneContextMenu:ge,onPaneScroll:ce,paneClickDistance:le,deleteKeyCode:$,selectionKeyCode:Y,selectionOnDrag:w,selectionMode:z,onSelectionStart:b,onSelectionEnd:N,multiSelectionKeyCode:q,panActivationKeyCode:B,zoomActivationKeyCode:R,elementsSelectable:se,zoomOnScroll:H,zoomOnPinch:L,zoomOnDoubleClick:j,panOnScroll:G,panOnScrollSpeed:te,panOnScrollMode:E,panOnDrag:I,defaultViewport:k,translateExtent:W,minZoom:oe,maxZoom:D,onSelectionContextMenu:p,preventScrolling:Z,noDragClassName:Qe,noWheelClassName:Ve,noPanClassName:qe,disableKeyboardA11y:ht,onViewportChange:Zn,isControlledViewport:!!xn,children:x.jsxs(mw,{children:[x.jsx(dw,{edgeTypes:i,onEdgeClick:c,onEdgeDoubleClick:d,onReconnect:Be,onReconnectStart:Ue,onReconnectEnd:ft,onlyRenderVisibleElements:J,onEdgeContextMenu:de,onEdgeMouseEnter:pe,onEdgeMouseMove:me,onEdgeMouseLeave:_e,reconnectRadius:Se,defaultMarkerColor:M,noPanClassName:qe,disableKeyboardA11y:ht,rfId:yn}),x.jsx(Ew,{style:C,type:_,component:T,containerStyle:A}),x.jsx("div",{className:"react-flow__edgelabel-renderer"}),x.jsx(KN,{nodeTypes:n,onNodeClick:s,onNodeDoubleClick:f,onNodeMouseEnter:m,onNodeMouseMove:g,onNodeMouseLeave:h,onNodeContextMenu:v,nodeClickDistance:he,onlyRenderVisibleElements:J,noPanClassName:qe,noDragClassName:Qe,disableKeyboardA11y:ht,nodeExtent:ke,rfId:yn}),x.jsx("div",{className:"react-flow__viewport-portal"})]})})}_y.displayName="GraphView";const _w=V.memo(_y),Yg=({nodes:n,edges:i,defaultNodes:o,defaultEdges:s,width:c,height:f,fitView:d,fitViewOptions:m,minZoom:g=.5,maxZoom:h=2,nodeOrigin:v,nodeExtent:p,zIndexMode:b="basic"}={})=>{const N=new Map,_=new Map,C=new Map,T=new Map,A=s??i??[],Y=o??n??[],w=v??[0,0],z=p??oo;qp(C,T,A);const q=Sf(Y,N,_,{nodeOrigin:w,nodeExtent:z,zIndexMode:b});let B=[0,0,1];if(d&&c&&f){const R=po(N,{filter:k=>!!((k.width||k.initialWidth)&&(k.height||k.initialHeight))}),{x:$,y:J,zoom:se}=Of(R,c,f,g,h,m?.padding??.1);B=[$,J,se]}return{rfId:"1",width:c??0,height:f??0,transform:B,nodes:Y,nodesInitialized:q,nodeLookup:N,parentLookup:_,edges:A,edgeLookup:T,connectionLookup:C,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:o!==void 0,hasDefaultEdges:s!==void 0,panZoom:null,minZoom:g,maxZoom:h,translateExtent:oo,nodeExtent:z,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Ja.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:w,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:d??!1,fitViewOptions:m,fitViewResolver:null,connection:{...Np},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:L2,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:Ep,zIndexMode:b,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},Mw=({nodes:n,edges:i,defaultNodes:o,defaultEdges:s,width:c,height:f,fitView:d,fitViewOptions:m,minZoom:g,maxZoom:h,nodeOrigin:v,nodeExtent:p,zIndexMode:b})=>XE((N,_)=>{async function C(){const{nodeLookup:T,panZoom:A,fitViewOptions:Y,fitViewResolver:w,width:z,height:q,minZoom:B,maxZoom:R}=_();A&&(await B2({nodes:T,width:z,height:q,panZoom:A,minZoom:B,maxZoom:R},Y),w?.resolve(!0),N({fitViewResolver:null}))}return{...Yg({nodes:n,edges:i,width:c,height:f,fitView:d,fitViewOptions:m,minZoom:g,maxZoom:h,nodeOrigin:v,nodeExtent:p,defaultNodes:o,defaultEdges:s,zIndexMode:b}),setNodes:T=>{const{nodeLookup:A,parentLookup:Y,nodeOrigin:w,elevateNodesOnSelect:z,fitViewQueued:q,zIndexMode:B}=_(),R=Sf(T,A,Y,{nodeOrigin:w,nodeExtent:p,elevateNodesOnSelect:z,checkEquality:!0,zIndexMode:B});q&&R?(C(),N({nodes:T,nodesInitialized:R,fitViewQueued:!1,fitViewOptions:void 0})):N({nodes:T,nodesInitialized:R})},setEdges:T=>{const{connectionLookup:A,edgeLookup:Y}=_();qp(A,Y,T),N({edges:T})},setDefaultNodesAndEdges:(T,A)=>{if(T){const{setNodes:Y}=_();Y(T),N({hasDefaultNodes:!0})}if(A){const{setEdges:Y}=_();Y(A),N({hasDefaultEdges:!0})}},updateNodeInternals:T=>{const{triggerNodeChanges:A,nodeLookup:Y,parentLookup:w,domNode:z,nodeOrigin:q,nodeExtent:B,debug:R,fitViewQueued:$,zIndexMode:J}=_(),{changes:se,updatedInternals:k}=oE(T,Y,w,z,q,B,J);k&&(nE(Y,w,{nodeOrigin:q,nodeExtent:B,zIndexMode:J}),$?(C(),N({fitViewQueued:!1,fitViewOptions:void 0})):N({}),se?.length>0&&(R&&console.log("React Flow: trigger node changes",se),A?.(se)))},updateNodePositions:(T,A=!1)=>{const Y=[];let w=[];const{nodeLookup:z,triggerNodeChanges:q,connection:B,updateConnection:R,onNodesChangeMiddlewareMap:$}=_();for(const[J,se]of T){const k=z.get(J),W=!!(k?.expandParent&&k?.parentId&&se?.position),oe={id:J,type:"position",position:W?{x:Math.max(0,se.position.x),y:Math.max(0,se.position.y)}:se.position,dragging:A};if(k&&B.inProgress&&B.fromNode.id===k.id){const D=Pl(k,B.fromHandle,xe.Left,!0);R({...B,from:D})}W&&k.parentId&&Y.push({id:J,parentId:k.parentId,rect:{...se.internals.positionAbsolute,width:se.measured.width??0,height:se.measured.height??0}}),w.push(oe)}if(Y.length>0){const{parentLookup:J,nodeOrigin:se}=_(),k=Yf(Y,z,J,se);w.push(...k)}for(const J of $.values())w=J(w);q(w)},triggerNodeChanges:T=>{const{onNodesChange:A,setNodes:Y,nodes:w,hasDefaultNodes:z,debug:q}=_();if(T?.length){if(z){const B=cN(T,w);Y(B)}q&&console.log("React Flow: trigger node changes",T),A?.(T)}},triggerEdgeChanges:T=>{const{onEdgesChange:A,setEdges:Y,edges:w,hasDefaultEdges:z,debug:q}=_();if(T?.length){if(z){const B=rN(T,w);Y(B)}q&&console.log("React Flow: trigger edge changes",T),A?.(T)}},addSelectedNodes:T=>{const{multiSelectionActive:A,edgeLookup:Y,nodeLookup:w,triggerNodeChanges:z,triggerEdgeChanges:q}=_();if(A){const B=T.map(R=>$l(R,!0));z(B);return}z(Ga(w,new Set([...T]),!0)),q(Ga(Y))},addSelectedEdges:T=>{const{multiSelectionActive:A,edgeLookup:Y,nodeLookup:w,triggerNodeChanges:z,triggerEdgeChanges:q}=_();if(A){const B=T.map(R=>$l(R,!0));q(B);return}q(Ga(Y,new Set([...T]))),z(Ga(w,new Set,!0))},unselectNodesAndEdges:({nodes:T,edges:A}={})=>{const{edges:Y,nodes:w,nodeLookup:z,triggerNodeChanges:q,triggerEdgeChanges:B}=_(),R=T||w,$=A||Y,J=R.map(k=>{const W=z.get(k.id);return W&&(W.selected=!1),$l(k.id,!1)}),se=$.map(k=>$l(k.id,!1));q(J),B(se)},setMinZoom:T=>{const{panZoom:A,maxZoom:Y}=_();A?.setScaleExtent([T,Y]),N({minZoom:T})},setMaxZoom:T=>{const{panZoom:A,minZoom:Y}=_();A?.setScaleExtent([Y,T]),N({maxZoom:T})},setTranslateExtent:T=>{_().panZoom?.setTranslateExtent(T),N({translateExtent:T})},resetSelectedElements:()=>{const{edges:T,nodes:A,triggerNodeChanges:Y,triggerEdgeChanges:w,elementsSelectable:z}=_();if(!z)return;const q=A.reduce((R,$)=>$.selected?[...R,$l($.id,!1)]:R,[]),B=T.reduce((R,$)=>$.selected?[...R,$l($.id,!1)]:R,[]);Y(q),w(B)},setNodeExtent:T=>{const{nodes:A,nodeLookup:Y,parentLookup:w,nodeOrigin:z,elevateNodesOnSelect:q,nodeExtent:B,zIndexMode:R}=_();T[0][0]===B[0][0]&&T[0][1]===B[0][1]&&T[1][0]===B[1][0]&&T[1][1]===B[1][1]||(Sf(A,Y,w,{nodeOrigin:z,nodeExtent:T,elevateNodesOnSelect:q,checkEquality:!1,zIndexMode:R}),N({nodeExtent:T}))},panBy:T=>{const{transform:A,width:Y,height:w,panZoom:z,translateExtent:q}=_();return sE({delta:T,panZoom:z,transform:A,translateExtent:q,width:Y,height:w})},setCenter:async(T,A,Y)=>{const{width:w,height:z,maxZoom:q,panZoom:B}=_();if(!B)return Promise.resolve(!1);const R=typeof Y?.zoom<"u"?Y.zoom:q;return await B.setViewport({x:w/2-T*R,y:z/2-A*R,zoom:R},{duration:Y?.duration,ease:Y?.ease,interpolate:Y?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{N({connection:{...Np}})},updateConnection:T=>{N({connection:T})},reset:()=>N({...Yg()})}},Object.is);function Cw({initialNodes:n,initialEdges:i,defaultNodes:o,defaultEdges:s,initialWidth:c,initialHeight:f,initialMinZoom:d,initialMaxZoom:m,initialFitViewOptions:g,fitView:h,nodeOrigin:v,nodeExtent:p,zIndexMode:b,children:N}){const[_]=V.useState(()=>Mw({nodes:n,edges:i,defaultNodes:o,defaultEdges:s,width:c,height:f,fitView:h,minZoom:d,maxZoom:m,fitViewOptions:g,nodeOrigin:v,nodeExtent:p,zIndexMode:b}));return x.jsx(GE,{value:_,children:x.jsx(mN,{children:N})})}function Aw({children:n,nodes:i,edges:o,defaultNodes:s,defaultEdges:c,width:f,height:d,fitView:m,fitViewOptions:g,minZoom:h,maxZoom:v,nodeOrigin:p,nodeExtent:b,zIndexMode:N}){return V.useContext(Nu)?x.jsx(x.Fragment,{children:n}):x.jsx(Cw,{initialNodes:i,initialEdges:o,defaultNodes:s,defaultEdges:c,initialWidth:f,initialHeight:d,fitView:m,initialFitViewOptions:g,initialMinZoom:h,initialMaxZoom:v,nodeOrigin:p,nodeExtent:b,zIndexMode:N,children:n})}const Tw={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function zw({nodes:n,edges:i,defaultNodes:o,defaultEdges:s,className:c,nodeTypes:f,edgeTypes:d,onNodeClick:m,onEdgeClick:g,onInit:h,onMove:v,onMoveStart:p,onMoveEnd:b,onConnect:N,onConnectStart:_,onConnectEnd:C,onClickConnectStart:T,onClickConnectEnd:A,onNodeMouseEnter:Y,onNodeMouseMove:w,onNodeMouseLeave:z,onNodeContextMenu:q,onNodeDoubleClick:B,onNodeDragStart:R,onNodeDrag:$,onNodeDragStop:J,onNodesDelete:se,onEdgesDelete:k,onDelete:W,onSelectionChange:oe,onSelectionDragStart:D,onSelectionDrag:Z,onSelectionDragStop:M,onSelectionContextMenu:H,onSelectionStart:L,onSelectionEnd:G,onBeforeDelete:te,connectionMode:E,connectionLineType:j=Sl.Bezier,connectionLineStyle:I,connectionLineComponent:ee,connectionLineContainerStyle:ue,deleteKeyCode:re="Backspace",selectionKeyCode:fe="Shift",selectionOnDrag:ce=!1,selectionMode:ge=so.Full,panActivationKeyCode:le="Space",multiSelectionKeyCode:he=co()?"Meta":"Control",zoomActivationKeyCode:de=co()?"Meta":"Control",snapToGrid:pe,snapGrid:me,onlyRenderVisibleElements:_e=!1,selectNodesOnDrag:Se,nodesDraggable:Be,autoPanOnNodeFocus:Ue,nodesConnectable:ft,nodesFocusable:Qe,nodeOrigin:Ve=ey,edgesFocusable:qe,edgesReconnectable:ht,elementsSelectable:ke=!0,defaultViewport:yn=nN,minZoom:xn=.5,maxZoom:Zn=2,translateExtent:Nl=oo,preventScrolling:Cu=!0,nodeExtent:ea,defaultMarkerColor:Au="#b1b1b7",zoomOnScroll:Tu=!0,zoomOnPinch:wl=!0,panOnScroll:bt=!1,panOnScrollSpeed:an=.5,panOnScrollMode:St=Jl.Free,zoomOnDoubleClick:zu=!0,panOnDrag:ju=!0,onPaneClick:Du,onPaneMouseEnter:ta,onPaneMouseMove:na,onPaneMouseLeave:la,onPaneScroll:vn,onPaneContextMenu:aa,paneClickDistance:_l=1,nodeClickDistance:Ou=0,children:vo,onReconnect:ei,onReconnectStart:Ml,onReconnectEnd:Hu,onEdgeContextMenu:bo,onEdgeDoubleClick:So,onEdgeMouseEnter:Eo,onEdgeMouseMove:ti,onEdgeMouseLeave:ni,reconnectRadius:No=10,onNodesChange:wo,onEdgesChange:on,noDragClassName:ct="nodrag",noWheelClassName:xt="nowheel",noPanClassName:bn="nopan",fitView:ia,fitViewOptions:_o,connectOnClick:Ru,attributionPosition:Mo,proOptions:Cl,defaultEdgeOptions:li,elevateNodesOnSelect:kn=!0,elevateEdgesOnSelect:$n=!1,disableKeyboardA11y:Qn=!1,autoPanOnConnect:Kn,autoPanOnNodeDrag:lt,autoPanSpeed:Co,connectionRadius:Ao,isValidConnection:Sn,onError:Jn,style:Bu,id:ai,nodeDragThreshold:To,connectionDragThreshold:Uu,viewport:oa,onViewportChange:sa,width:Jt,height:Nt,colorMode:zo="light",debug:Lu,onScroll:ua,ariaLabelConfig:jo,zIndexMode:Al="basic",...Yu},wt){const Tl=ai||"1",Do=oN(zo),ii=V.useCallback(En=>{En.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),ua?.(En)},[ua]);return x.jsx("div",{"data-testid":"rf__wrapper",...Yu,onScroll:ii,style:{...Bu,...Tw},ref:wt,className:ut(["react-flow",c,Do]),id:ai,role:"application",children:x.jsxs(Aw,{nodes:n,edges:i,width:Jt,height:Nt,fitView:ia,fitViewOptions:_o,minZoom:xn,maxZoom:Zn,nodeOrigin:Ve,nodeExtent:ea,zIndexMode:Al,children:[x.jsx(_w,{onInit:h,onNodeClick:m,onEdgeClick:g,onNodeMouseEnter:Y,onNodeMouseMove:w,onNodeMouseLeave:z,onNodeContextMenu:q,onNodeDoubleClick:B,nodeTypes:f,edgeTypes:d,connectionLineType:j,connectionLineStyle:I,connectionLineComponent:ee,connectionLineContainerStyle:ue,selectionKeyCode:fe,selectionOnDrag:ce,selectionMode:ge,deleteKeyCode:re,multiSelectionKeyCode:he,panActivationKeyCode:le,zoomActivationKeyCode:de,onlyRenderVisibleElements:_e,defaultViewport:yn,translateExtent:Nl,minZoom:xn,maxZoom:Zn,preventScrolling:Cu,zoomOnScroll:Tu,zoomOnPinch:wl,zoomOnDoubleClick:zu,panOnScroll:bt,panOnScrollSpeed:an,panOnScrollMode:St,panOnDrag:ju,onPaneClick:Du,onPaneMouseEnter:ta,onPaneMouseMove:na,onPaneMouseLeave:la,onPaneScroll:vn,onPaneContextMenu:aa,paneClickDistance:_l,nodeClickDistance:Ou,onSelectionContextMenu:H,onSelectionStart:L,onSelectionEnd:G,onReconnect:ei,onReconnectStart:Ml,onReconnectEnd:Hu,onEdgeContextMenu:bo,onEdgeDoubleClick:So,onEdgeMouseEnter:Eo,onEdgeMouseMove:ti,onEdgeMouseLeave:ni,reconnectRadius:No,defaultMarkerColor:Au,noDragClassName:ct,noWheelClassName:xt,noPanClassName:bn,rfId:Tl,disableKeyboardA11y:Qn,nodeExtent:ea,viewport:oa,onViewportChange:sa}),x.jsx(iN,{nodes:n,edges:i,defaultNodes:o,defaultEdges:s,onConnect:N,onConnectStart:_,onConnectEnd:C,onClickConnectStart:T,onClickConnectEnd:A,nodesDraggable:Be,autoPanOnNodeFocus:Ue,nodesConnectable:ft,nodesFocusable:Qe,edgesFocusable:qe,edgesReconnectable:ht,elementsSelectable:ke,elevateNodesOnSelect:kn,elevateEdgesOnSelect:$n,minZoom:xn,maxZoom:Zn,nodeExtent:ea,onNodesChange:wo,onEdgesChange:on,snapToGrid:pe,snapGrid:me,connectionMode:E,translateExtent:Nl,connectOnClick:Ru,defaultEdgeOptions:li,fitView:ia,fitViewOptions:_o,onNodesDelete:se,onEdgesDelete:k,onDelete:W,onNodeDragStart:R,onNodeDrag:$,onNodeDragStop:J,onSelectionDrag:Z,onSelectionDragStart:D,onSelectionDragStop:M,onMove:v,onMoveStart:p,onMoveEnd:b,noPanClassName:bn,nodeOrigin:Ve,rfId:Tl,autoPanOnConnect:Kn,autoPanOnNodeDrag:lt,autoPanSpeed:Co,onError:Jn,connectionRadius:Ao,isValidConnection:Sn,selectNodesOnDrag:Se,nodeDragThreshold:To,connectionDragThreshold:Uu,onBeforeDelete:te,debug:Lu,ariaLabelConfig:jo,zIndexMode:Al}),x.jsx(tN,{onSelectionChange:oe}),vo,x.jsx(FE,{proOptions:Cl,position:Mo}),x.jsx(JE,{rfId:Tl,disableKeyboardA11y:Qn})]})})}var jw=ny(zw);function Dw({dimensions:n,lineWidth:i,variant:o,className:s}){return x.jsx("path",{strokeWidth:i,d:`M${n[0]/2} 0 V${n[1]} M0 ${n[1]/2} H${n[0]}`,className:ut(["react-flow__background-pattern",o,s])})}function Ow({radius:n,className:i}){return x.jsx("circle",{cx:n,cy:n,r:n,className:ut(["react-flow__background-pattern","dots",i])})}var El;(function(n){n.Lines="lines",n.Dots="dots",n.Cross="cross"})(El||(El={}));const Hw={[El.Dots]:1,[El.Lines]:1,[El.Cross]:6},Rw=n=>({transform:n.transform,patternId:`pattern-${n.rfId}`});function My({id:n,variant:i=El.Dots,gap:o=20,size:s,lineWidth:c=1,offset:f=0,color:d,bgColor:m,style:g,className:h,patternClassName:v}){const p=V.useRef(null),{transform:b,patternId:N}=De(Rw,We),_=s||Hw[i],C=i===El.Dots,T=i===El.Cross,A=Array.isArray(o)?o:[o,o],Y=[A[0]*b[2]||1,A[1]*b[2]||1],w=_*b[2],z=Array.isArray(f)?f:[f,f],q=T?[w,w]:Y,B=[z[0]*b[2]||1+q[0]/2,z[1]*b[2]||1+q[1]/2],R=`${N}${n||""}`;return x.jsxs("svg",{className:ut(["react-flow__background",h]),style:{...g,..._u,"--xy-background-color-props":m,"--xy-background-pattern-color-props":d},ref:p,"data-testid":"rf__background",children:[x.jsx("pattern",{id:R,x:b[0]%Y[0],y:b[1]%Y[1],width:Y[0],height:Y[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${B[0]},-${B[1]})`,children:C?x.jsx(Ow,{radius:w/2,className:v}):x.jsx(Dw,{dimensions:q,lineWidth:c,variant:i,className:v})}),x.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${R})`})]})}My.displayName="Background";const Bw=V.memo(My);function Uw(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:x.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function Lw(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:x.jsx("path",{d:"M0 0h32v4.2H0z"})})}function Yw(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:x.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function Vw(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:x.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function qw(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:x.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function Fs({children:n,className:i,...o}){return x.jsx("button",{type:"button",className:ut(["react-flow__controls-button",i]),...o,children:n})}const Xw=n=>({isInteractive:n.nodesDraggable||n.nodesConnectable||n.elementsSelectable,minZoomReached:n.transform[2]<=n.minZoom,maxZoomReached:n.transform[2]>=n.maxZoom,ariaLabelConfig:n.ariaLabelConfig});function Cy({style:n,showZoom:i=!0,showFitView:o=!0,showInteractive:s=!0,fitViewOptions:c,onZoomIn:f,onZoomOut:d,onFitView:m,onInteractiveChange:g,className:h,children:v,position:p="bottom-left",orientation:b="vertical","aria-label":N}){const _=Ie(),{isInteractive:C,minZoomReached:T,maxZoomReached:A,ariaLabelConfig:Y}=De(Xw,We),{zoomIn:w,zoomOut:z,fitView:q}=Vf(),B=()=>{w(),f?.()},R=()=>{z(),d?.()},$=()=>{q(c),m?.()},J=()=>{_.setState({nodesDraggable:!C,nodesConnectable:!C,elementsSelectable:!C}),g?.(!C)},se=b==="horizontal"?"horizontal":"vertical";return x.jsxs(wu,{className:ut(["react-flow__controls",se,h]),position:p,style:n,"data-testid":"rf__controls","aria-label":N??Y["controls.ariaLabel"],children:[i&&x.jsxs(x.Fragment,{children:[x.jsx(Fs,{onClick:B,className:"react-flow__controls-zoomin",title:Y["controls.zoomIn.ariaLabel"],"aria-label":Y["controls.zoomIn.ariaLabel"],disabled:A,children:x.jsx(Uw,{})}),x.jsx(Fs,{onClick:R,className:"react-flow__controls-zoomout",title:Y["controls.zoomOut.ariaLabel"],"aria-label":Y["controls.zoomOut.ariaLabel"],disabled:T,children:x.jsx(Lw,{})})]}),o&&x.jsx(Fs,{className:"react-flow__controls-fitview",onClick:$,title:Y["controls.fitView.ariaLabel"],"aria-label":Y["controls.fitView.ariaLabel"],children:x.jsx(Yw,{})}),s&&x.jsx(Fs,{className:"react-flow__controls-interactive",onClick:J,title:Y["controls.interactive.ariaLabel"],"aria-label":Y["controls.interactive.ariaLabel"],children:C?x.jsx(qw,{}):x.jsx(Vw,{})}),v]})}Cy.displayName="Controls";V.memo(Cy);function Gw({id:n,x:i,y:o,width:s,height:c,style:f,color:d,strokeColor:m,strokeWidth:g,className:h,borderRadius:v,shapeRendering:p,selected:b,onClick:N}){const{background:_,backgroundColor:C}=f||{},T=d||_||C;return x.jsx("rect",{className:ut(["react-flow__minimap-node",{selected:b},h]),x:i,y:o,rx:v,ry:v,width:s,height:c,style:{fill:T,stroke:m,strokeWidth:g},shapeRendering:p,onClick:N?A=>N(A,n):void 0})}const Zw=V.memo(Gw),kw=n=>n.nodes.map(i=>i.id),cf=n=>n instanceof Function?n:()=>n;function $w({nodeStrokeColor:n,nodeColor:i,nodeClassName:o="",nodeBorderRadius:s=5,nodeStrokeWidth:c,nodeComponent:f=Zw,onClick:d}){const m=De(kw,We),g=cf(i),h=cf(n),v=cf(o),p=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return x.jsx(x.Fragment,{children:m.map(b=>x.jsx(Kw,{id:b,nodeColorFunc:g,nodeStrokeColorFunc:h,nodeClassNameFunc:v,nodeBorderRadius:s,nodeStrokeWidth:c,NodeComponent:f,onClick:d,shapeRendering:p},b))})}function Qw({id:n,nodeColorFunc:i,nodeStrokeColorFunc:o,nodeClassNameFunc:s,nodeBorderRadius:c,nodeStrokeWidth:f,shapeRendering:d,NodeComponent:m,onClick:g}){const{node:h,x:v,y:p,width:b,height:N}=De(_=>{const{internals:C}=_.nodeLookup.get(n),T=C.userNode,{x:A,y:Y}=C.positionAbsolute,{width:w,height:z}=Gn(T);return{node:T,x:A,y:Y,width:w,height:z}},We);return!h||h.hidden||!zp(h)?null:x.jsx(m,{x:v,y:p,width:b,height:N,style:h.style,selected:!!h.selected,className:s(h),color:i(h),borderRadius:c,strokeColor:o(h),strokeWidth:f,shapeRendering:d,onClick:g,id:h.id})}const Kw=V.memo(Qw);var Jw=V.memo($w);const Fw=200,Ww=150,Iw=n=>!n.hidden,Pw=n=>{const i={x:-n.transform[0]/n.transform[2],y:-n.transform[1]/n.transform[2],width:n.width/n.transform[2],height:n.height/n.transform[2]};return{viewBB:i,boundingRect:n.nodeLookup.size>0?Tp(po(n.nodeLookup,{filter:Iw}),i):i,rfId:n.rfId,panZoom:n.panZoom,translateExtent:n.translateExtent,flowWidth:n.width,flowHeight:n.height,ariaLabelConfig:n.ariaLabelConfig}},e_="react-flow__minimap-desc";function Ay({style:n,className:i,nodeStrokeColor:o,nodeColor:s,nodeClassName:c="",nodeBorderRadius:f=5,nodeStrokeWidth:d,nodeComponent:m,bgColor:g,maskColor:h,maskStrokeColor:v,maskStrokeWidth:p,position:b="bottom-right",onClick:N,onNodeClick:_,pannable:C=!1,zoomable:T=!1,ariaLabel:A,inversePan:Y,zoomStep:w=1,offsetScale:z=5}){const q=Ie(),B=V.useRef(null),{boundingRect:R,viewBB:$,rfId:J,panZoom:se,translateExtent:k,flowWidth:W,flowHeight:oe,ariaLabelConfig:D}=De(Pw,We),Z=n?.width??Fw,M=n?.height??Ww,H=R.width/Z,L=R.height/M,G=Math.max(H,L),te=G*Z,E=G*M,j=z*G,I=R.x-(te-R.width)/2-j,ee=R.y-(E-R.height)/2-j,ue=te+j*2,re=E+j*2,fe=`${e_}-${J}`,ce=V.useRef(0),ge=V.useRef();ce.current=G,V.useEffect(()=>{if(B.current&&se)return ge.current=pE({domNode:B.current,panZoom:se,getTransform:()=>q.getState().transform,getViewScale:()=>ce.current}),()=>{ge.current?.destroy()}},[se]),V.useEffect(()=>{ge.current?.update({translateExtent:k,width:W,height:oe,inversePan:Y,pannable:C,zoomStep:w,zoomable:T})},[C,T,Y,w,k,W,oe]);const le=N?pe=>{const[me,_e]=ge.current?.pointer(pe)||[0,0];N(pe,{x:me,y:_e})}:void 0,he=_?V.useCallback((pe,me)=>{const _e=q.getState().nodeLookup.get(me).internals.userNode;_(pe,_e)},[]):void 0,de=A??D["minimap.ariaLabel"];return x.jsx(wu,{position:b,style:{...n,"--xy-minimap-background-color-props":typeof g=="string"?g:void 0,"--xy-minimap-mask-background-color-props":typeof h=="string"?h:void 0,"--xy-minimap-mask-stroke-color-props":typeof v=="string"?v:void 0,"--xy-minimap-mask-stroke-width-props":typeof p=="number"?p*G:void 0,"--xy-minimap-node-background-color-props":typeof s=="string"?s:void 0,"--xy-minimap-node-stroke-color-props":typeof o=="string"?o:void 0,"--xy-minimap-node-stroke-width-props":typeof d=="number"?d:void 0},className:ut(["react-flow__minimap",i]),"data-testid":"rf__minimap",children:x.jsxs("svg",{width:Z,height:M,viewBox:`${I} ${ee} ${ue} ${re}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":fe,ref:B,onClick:le,children:[de&&x.jsx("title",{id:fe,children:de}),x.jsx(Jw,{onClick:he,nodeColor:s,nodeStrokeColor:o,nodeBorderRadius:f,nodeClassName:c,nodeStrokeWidth:d,nodeComponent:m}),x.jsx("path",{className:"react-flow__minimap-mask",d:`M${I-j},${ee-j}h${ue+j*2}v${re+j*2}h${-ue-j*2}z
|
|
15
|
+
M${$.x},${$.y}h${$.width}v${$.height}h${-$.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}Ay.displayName="MiniMap";V.memo(Ay);const t_=n=>i=>n?`${Math.max(1/i.transform[2],1)}`:void 0,n_={[Pa.Line]:"right",[Pa.Handle]:"bottom-right"};function l_({nodeId:n,position:i,variant:o=Pa.Handle,className:s,style:c=void 0,children:f,color:d,minWidth:m=10,minHeight:g=10,maxWidth:h=Number.MAX_VALUE,maxHeight:v=Number.MAX_VALUE,keepAspectRatio:p=!1,resizeDirection:b,autoScale:N=!0,shouldResize:_,onResizeStart:C,onResize:T,onResizeEnd:A}){const Y=oy(),w=typeof n=="string"?n:Y,z=Ie(),q=V.useRef(null),B=o===Pa.Handle,R=De(V.useCallback(t_(B&&N),[B,N]),We),$=V.useRef(null),J=i??n_[o];V.useEffect(()=>{if(!(!q.current||!w))return $.current||($.current=zE({domNode:q.current,nodeId:w,getStoreItems:()=>{const{nodeLookup:k,transform:W,snapGrid:oe,snapToGrid:D,nodeOrigin:Z,domNode:M}=z.getState();return{nodeLookup:k,transform:W,snapGrid:oe,snapToGrid:D,nodeOrigin:Z,paneDomNode:M}},onChange:(k,W)=>{const{triggerNodeChanges:oe,nodeLookup:D,parentLookup:Z,nodeOrigin:M}=z.getState(),H=[],L={x:k.x,y:k.y},G=D.get(w);if(G&&G.expandParent&&G.parentId){const te=G.origin??M,E=k.width??G.measured.width??0,j=k.height??G.measured.height??0,I={id:G.id,parentId:G.parentId,rect:{width:E,height:j,...jp({x:k.x??G.position.x,y:k.y??G.position.y},{width:E,height:j},G.parentId,D,te)}},ee=Yf([I],D,Z,M);H.push(...ee),L.x=k.x?Math.max(te[0]*E,k.x):void 0,L.y=k.y?Math.max(te[1]*j,k.y):void 0}if(L.x!==void 0&&L.y!==void 0){const te={id:w,type:"position",position:{...L}};H.push(te)}if(k.width!==void 0&&k.height!==void 0){const E={id:w,type:"dimensions",resizing:!0,setAttributes:b?b==="horizontal"?"width":"height":!0,dimensions:{width:k.width,height:k.height}};H.push(E)}for(const te of W){const E={...te,type:"position"};H.push(E)}oe(H)},onEnd:({width:k,height:W})=>{const oe={id:w,type:"dimensions",resizing:!1,dimensions:{width:k,height:W}};z.getState().triggerNodeChanges([oe])}})),$.current.update({controlPosition:J,boundaries:{minWidth:m,minHeight:g,maxWidth:h,maxHeight:v},keepAspectRatio:p,resizeDirection:b,onResizeStart:C,onResize:T,onResizeEnd:A,shouldResize:_}),()=>{$.current?.destroy()}},[J,m,g,h,v,p,C,T,A,_]);const se=J.split("-");return x.jsx("div",{className:ut(["react-flow__resize-control","nodrag",...se,o,s]),ref:q,style:{...c,scale:R,...d&&{[B?"backgroundColor":"borderColor"]:d}},children:f})}V.memo(l_);const Pi=28,lu=22,a_=6,Za=28;function Ty(n){return n===0?Za:Pi+n*lu+a_}const i_={function:"#a78bfa",arrow:"#a78bfa",class:"#f472b6",method:"#f472b6",variable:"#34d399",type:"#38bdf8",interface:"#38bdf8",enum:"#fb923c",default:"#8888a0",unknown:"#8888a0",module:"#8888a0"};function o_({data:n}){const i=n.label,o=n.isSource,s=n.isExpanded,c=n.functions||[],f=n.color||"#4a4a6a",d=n.selectedElement,m=n.dimmed,g=n.tracedElements||[];if(!s)return x.jsxs("div",{className:"rounded-md flex items-center gap-1.5",style:{background:o?"#1e1b4b":`${f}15`,border:o?"2px solid #6366f1":`1px solid ${f}40`,color:o?"#c7d2fe":`${f}cc`,fontSize:"10px",padding:"4px 10px",width:250,height:Za,cursor:"default",opacity:m?.25:1},children:[x.jsx(hn,{type:"target",position:xe.Left,id:"file",className:"!bg-[#4a4a6a] !w-1.5 !h-1.5 !border-0"}),x.jsx(hn,{type:"source",position:xe.Right,id:"file",className:"!bg-[#4a4a6a] !w-1.5 !h-1.5 !border-0"}),x.jsx("span",{className:"truncate",children:i}),c.length>0&&x.jsx("span",{"data-action":"toggle",className:"ml-auto flex-shrink-0 w-4 h-4 flex items-center justify-center rounded hover:bg-white/10 transition-colors cursor-pointer",style:{color:`${f}80`,fontSize:"12px",lineHeight:1},children:"+"})]});const h=Ty(c.length);return x.jsxs("div",{className:"rounded-md overflow-hidden",style:{background:o?"#1e1b4b":`${f}08`,border:o?"2px solid #6366f1":`1px solid ${f}30`,width:250,height:h,cursor:"default",opacity:m?.25:1},children:[x.jsx(hn,{type:"target",position:xe.Left,id:"file",className:"!bg-transparent !w-0 !h-0 !border-0 !min-w-0 !min-h-0",style:{top:Pi/2}}),x.jsx(hn,{type:"source",position:xe.Right,id:"file",className:"!bg-transparent !w-0 !h-0 !border-0 !min-w-0 !min-h-0",style:{top:Pi/2}}),x.jsxs("div",{className:"flex items-center gap-1.5 px-2.5",style:{height:Pi,borderBottom:`1px solid ${o?"#6366f130":`${f}20`}`,color:o?"#c7d2fe":`${f}cc`,fontSize:"10px",fontWeight:500},children:[x.jsx("span",{className:"truncate",children:i}),x.jsx("span",{"data-action":"toggle",className:"ml-auto flex-shrink-0 w-4 h-4 flex items-center justify-center rounded hover:bg-white/10 transition-colors cursor-pointer",style:{color:`${f}80`,fontSize:"11px",lineHeight:1},children:"−"})]}),c.map((v,p)=>{const b=Pi+p*lu+lu/2,N=i_[v.kind]||"#8888a0",_=d===v.name,C=g.includes(v.name),T=_||C||v.connected,A=d!=null&&!_&&!C;return x.jsxs("div",{"data-action":"select-element","data-element":v.name,className:"flex items-center gap-1.5 px-2.5 transition-colors",style:{height:lu,fontSize:"9px",color:_?"#fff":C?"#e4e4ef":v.connected?o?"#a5b4fc":"#e4e4ef":"#4a4a6a",background:_?`${N}20`:C?`${N}08`:"transparent",cursor:"pointer",opacity:A?.3:1},children:[x.jsx(hn,{type:"target",position:xe.Left,id:`fn-${v.name}`,className:T?"!bg-[#6a6a80] !w-1 !h-1 !border-0":"!bg-[#2a2a3a] !w-1 !h-1 !border-0",style:{top:b}}),x.jsx(hn,{type:"source",position:xe.Right,id:`fn-${v.name}`,className:T?"!bg-[#6a6a80] !w-1 !h-1 !border-0":"!bg-[#2a2a3a] !w-1 !h-1 !border-0",style:{top:b}}),x.jsx("div",{className:"w-1 h-1 rounded-full flex-shrink-0",style:{backgroundColor:T?N:`${N}40`}}),x.jsx("span",{className:`truncate font-mono ${v.dead?"line-through":""}`,style:v.dead?{textDecorationColor:"#f59e0b60"}:void 0,children:v.name}),v.dead&&x.jsx("span",{className:"flex-shrink-0",style:{fontSize:"7px",color:"#f59e0b80"},title:"Unused — nothing imports this export",children:"!"}),x.jsx("span",{className:"ml-auto flex-shrink-0",style:{fontSize:"8px",color:T?`${N}90`:"#2a2a3a"},children:v.kind})]},v.name)})]})}const s_=V.memo(o_),u_={expandableFile:s_};function c_(n){return n===1?"#f97316":n===2?"#ef4444":n===3?"#dc2626":"#991b1b"}function r_(n){const i=n.split("/");return i.length>2?`.../${i.slice(-2).join("/")}`:n}function fn(n){const i=n.indexOf("::");return{fileId:n.slice(0,i),fnName:n.slice(i+2)}}function Vg({sourceFile:n,blastRadius:i,data:o,changedFiles:s,sourceFiles:c}){const f=c??[n],[d,m]=V.useState(new Set),[g,h]=V.useState(null);V.useEffect(()=>{m(new Set),h(null)},[n]);const v=V.useCallback(B=>{setTimeout(()=>B.fitView({padding:.15}),100)},[]),p=V.useCallback((B,R)=>{const $=B.target;if($.closest("[data-action='toggle']")){m(k=>{const W=new Set(k);return W.has(R.id)?W.delete(R.id):W.add(R.id),W});return}const se=$.closest("[data-action='select-element']");if(se){const k=se.getAttribute("data-element");k&&h(W=>W?.fileId===R.id&&W?.name===k?null:{fileId:R.id,name:k});return}},[]),b=V.useCallback(()=>{h(null)},[]),{nodes:N,edges:_,directCount:C,indirectCount:T}=V.useMemo(()=>{const B=[],R=[],$=new Set([...f,...i.affected.map(le=>le.fileId)]),J=new Map;for(const le of f)J.set(le,0);for(const le of i.affected)J.set(le.fileId,le.depth);const se=o.callEdges.filter(le=>{const he=fn(le.caller).fileId,de=fn(le.callee).fileId;return $.has(he)&&$.has(de)}),k=new Set;for(const le of se)k.add(le.caller),k.add(le.callee);const W=new Set;for(const le of o.edges)for(const he of le.imports)W.add(`${le.target}::${he}`);for(const le of o.callEdges)W.add(le.callee);const oe=new Map;for(const le of $){const he=new Set,de=[];for(const me of o.scopes)me.fileId===le&&me.name!=="<module>"&&(he.add(me.name),de.push({name:me.name,kind:me.kind,connected:k.has(me.id),dead:me.isExported&&!W.has(`${le}::${me.name}`)}));const pe=o.nodes.find(me=>me.id===le);if(pe)for(const me of pe.exports)he.has(me.name)||(he.add(me.name),de.push({name:me.name,kind:me.kind,connected:k.has(`${le}::${me.name}`),dead:!W.has(`${le}::${me.name}`)}));de.sort((me,_e)=>me.name.localeCompare(_e.name)),oe.set(le,de)}const D=new Map;for(const[le,he]of oe)D.set(le,new Set(he.map(de=>de.name)));const Z=new Map;for(const[le,he]of J)Z.has(he)||Z.set(he,[]),Z.get(he).push(le);for(const le of Z.values())le.sort();const M=Array.from(Z.keys()).sort((le,he)=>le-he),H=M.length>0?M[M.length-1]:0,L=280,G=8;function te(le){const he=oe.get(le)||[];return d.has(le)&&he.length>0?Ty(he.length):Za}let E=Za;const j=new Map;for(const le of[0,...M.filter(he=>he>0)]){const he=Z.get(le)||[];let de=0;for(const pe of he)de+=te(pe)+G;de-=G,j.set(le,Math.max(de,Za)),de>E&&(E=de)}const I=new Map;for(const le of o.edges)if(!(!$.has(le.source)||!$.has(le.target)))for(const he of le.imports){const de=`${le.target}::${he}`;I.has(de)||I.set(de,new Set),I.get(de).add(le.source)}const ee=new Map,ue=new Map;for(const le of se)ee.has(le.callee)||ee.set(le.callee,[]),ee.get(le.callee).push(le.caller),ue.has(le.caller)||ue.set(le.caller,[]),ue.get(le.caller).push(le.callee);const re=new Set,fe=new Set;if(g){const le=`${g.fileId}::${g.name}`;re.add(le),fe.add(g.fileId);const he=[le],de=new Set([le]);for(;he.length>0;){const _e=he.shift(),{fnName:Se}=fn(_e);for(const Ue of ee.get(_e)||[])de.has(Ue)||(de.add(Ue),re.add(Ue),fe.add(fn(Ue).fileId),he.push(Ue));const Be=I.get(_e);if(Be){for(const Ue of Be)if(fe.add(Ue),o.nodes.find(Qe=>Qe.id===Ue)?.exports.some(Qe=>Qe.name===Se)){const Qe=`${Ue}::${Se}`;de.has(Qe)||(de.add(Qe),re.add(Qe),he.push(Qe))}}}const pe=[le],me=new Set([le]);for(;pe.length>0;){const _e=pe.shift();for(const Se of ue.get(_e)||[])me.has(Se)||(me.add(Se),re.add(Se),fe.add(fn(Se).fileId),pe.push(Se))}}for(const le of[0,...M.filter(he=>he>0)]){const he=Z.get(le)||[],de=(H-le)*L,pe=j.get(le)||Za;let me=(E-pe)/2;const _e=le===0?"#6366f1":c_(le);for(const Se of he){const Be=te(Se),Ue=oe.get(Se)||[],ft=d.has(Se)&&Ue.length>0,Qe=g!=null&&!fe.has(Se),Ve=s?.has(Se)??!1,qe=g?Ue.filter(ke=>re.has(`${Se}::${ke.name}`)).map(ke=>ke.name):[],ht=Ve?"#22c55e":_e;B.push({id:Se,type:"expandableFile",position:{x:de,y:me},sourcePosition:xe.Right,targetPosition:xe.Left,data:{label:r_(Se),isSource:le===0,isExpanded:ft,functions:Ue,color:ht,dimmed:Qe,selectedElement:g?.fileId===Se?g.name:null,tracedElements:qe}}),me+=Be+G}}for(const le of o.edges){if(!$.has(le.source)||!$.has(le.target))continue;const he=J.get(le.source),de=J.get(le.target);if(he===void 0||de===void 0||Math.abs(he-de)!==1)continue;const pe=le.source,me=le.target,_e=d.has(pe)&&(oe.get(pe)?.length??0)>0,Se=d.has(me)&&(oe.get(me)?.length??0)>0,Be=de===0,Ue=D.get(me),ft=g!=null&&le.imports.some(Ve=>re.has(`${me}::${Ve}`)),Qe=se.filter(Ve=>{const qe=fn(Ve.caller).fileId,ht=fn(Ve.callee).fileId;return qe===pe&&ht===me});if((_e||Se)&&Qe.length>0){for(const Ve of Qe){const qe=fn(Ve.caller).fnName,ht=fn(Ve.callee).fnName,ke=`${Ve.caller}->${Ve.callee}`,yn=g==null||re.has(Ve.caller)&&re.has(Ve.callee);R.push({id:ke,source:pe,target:me,sourceHandle:_e?`fn-${qe}`:"file",targetHandle:Se?`fn-${ht}`:"file",style:{stroke:yn?Be?"#f97316":"#4a4a6a80":"#4a4a6a10",strokeWidth:yn?1.5:.5}})}if(Se){const Ve=new Set(Qe.map(qe=>fn(qe.callee).fnName));for(const qe of le.imports){if(Ve.has(qe)||!Ue?.has(qe))continue;const ht=`${pe}::import->${me}::${qe}`,ke=g==null||re.has(`${me}::${qe}`);R.push({id:ht,source:pe,target:me,sourceHandle:"file",targetHandle:`fn-${qe}`,style:{stroke:ke?Be?"#f9731630":"#4a4a6a20":"#4a4a6a08",strokeWidth:.5,strokeDasharray:"4 2"}})}}}else if(Se){for(const qe of le.imports){if(!Ue?.has(qe))continue;const ht=`${pe}->${me}::${qe}`,ke=g==null||re.has(`${me}::${qe}`);R.push({id:ht,source:pe,target:me,sourceHandle:"file",targetHandle:`fn-${qe}`,style:{stroke:ke?Be?"#f9731640":"#4a4a6a30":"#4a4a6a08",strokeWidth:1}})}le.imports.some(qe=>Ue?.has(qe))||R.push({id:`${pe}->${me}`,source:pe,target:me,sourceHandle:"file",targetHandle:"file",style:{stroke:Be?"#f9731630":"#4a4a6a20",strokeWidth:1}})}else{const Ve=g==null||ft;R.push({id:`${pe}->${me}`,source:pe,target:me,sourceHandle:"file",targetHandle:"file",style:{stroke:Ve?Be?"#f9731650":"#4a4a6a30":"#4a4a6a08",strokeWidth:1}})}}const ce=i.affected.filter(le=>le.depth===1).length,ge=i.affected.length-ce;return{nodes:B,edges:R,directCount:ce,indirectCount:ge}},[n,i,o,d,g,s,f]),A=f.length>1,Y=o.nodes.length,w=Y>0?i.affected.length/Y*100:0,z=w<5?"low":w<15?"medium":w<30?"high":"critical",q={low:{color:"text-green-400",bg:"bg-green-500/10",ring:"ring-green-500/30",label:"Low risk"},medium:{color:"text-yellow-400",bg:"bg-yellow-500/10",ring:"ring-yellow-500/30",label:"Medium risk"},high:{color:"text-orange-400",bg:"bg-orange-500/10",ring:"ring-orange-500/30",label:"High risk"},critical:{color:"text-red-400",bg:"bg-red-500/10",ring:"ring-red-500/30",label:"Critical"}}[z];return x.jsxs("div",{className:"flex-1 flex flex-col",children:[x.jsx("div",{className:"px-4 py-3 border-b border-[#1a1a2a]",children:x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsxs("div",{className:"flex-1",children:[x.jsxs("div",{className:"flex items-baseline gap-2",children:[x.jsx("span",{className:"text-sm font-medium text-[#e4e4ef]",children:A?"Commit blast radius":"Blast radius"}),A?x.jsxs("span",{className:"text-sm text-green-400 font-mono",children:[f.length," changed files"]}):x.jsx("span",{className:"text-sm text-indigo-400 font-mono",children:n.split("/").pop()})]}),x.jsxs("p",{className:"text-[11px] text-[#6a6a80] mt-1",children:[x.jsxs("span",{className:"text-orange-400",children:[C," direct"]}),T>0&&x.jsxs("span",{children:[" ","· ",x.jsxs("span",{className:"text-red-400",children:[T," indirect"]})]})," ","· ",i.affected.length," total files affected",g&&x.jsxs("span",{className:"text-indigo-400",children:[" ","· viewing ",x.jsx("span",{className:"font-mono",children:g.name})]})]})]}),x.jsxs("div",{className:`flex flex-col items-center px-3 py-1.5 rounded-lg ${q.bg} ring-1 ${q.ring}`,children:[x.jsxs("span",{className:`text-lg font-bold leading-none ${q.color}`,children:[w<1&&w>0?"<1":Math.round(w),"%"]}),x.jsx("span",{className:`text-[9px] mt-0.5 ${q.color} opacity-70`,children:q.label})]})]})}),x.jsx("div",{className:"flex-1",children:x.jsx(jw,{nodes:N,edges:_,nodeTypes:u_,onInit:v,onNodeClick:p,onPaneClick:b,fitView:!0,fitViewOptions:{padding:.15},minZoom:.05,maxZoom:1.5,proOptions:{hideAttribution:!0},nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,children:x.jsx(Bw,{color:"#141425",gap:16})},n)}),x.jsxs("div",{className:"px-4 py-2 border-t border-[#1a1a2a] flex items-center gap-4 text-[10px] text-[#6a6a80]",children:[x.jsxs("span",{className:"flex items-center gap-1.5",children:[x.jsx("span",{className:"w-2.5 h-2.5 rounded bg-indigo-500/30 border border-indigo-500 flex-shrink-0"}),"selected file"]}),x.jsxs("span",{className:"flex items-center gap-1.5",children:[x.jsx("span",{className:"w-2.5 h-2.5 rounded bg-orange-500/15 border border-orange-500/50 flex-shrink-0"}),"direct"]}),x.jsxs("span",{className:"flex items-center gap-1.5",children:[x.jsx("span",{className:"w-2.5 h-2.5 rounded bg-red-500/15 border border-red-500/50 flex-shrink-0"}),"indirect"]}),x.jsx("span",{className:"text-[9px] ml-auto text-[#4a4a6a]",children:"+/− to expand · click a symbol to trace it"})]})]})}function f_(n,i,o){const s=[];if(s.push(`# Code Cleanup — ${o}`),s.push(""),s.push("The following items were detected as potentially unused by static analysis."),s.push("Please review and remove them if they are no longer needed."),s.push(""),n.length>0){s.push(`## Unreferenced Files (${n.length})`),s.push(""),s.push("These files are never imported by any other file in the project:"),s.push("");for(const c of n)s.push(`- \`${c}\``);s.push("")}if(i.length>0){s.push(`## Unused Exports (${i.length})`),s.push(""),s.push("These exports are never imported or called anywhere:"),s.push(""),s.push("| File | Export | Kind |"),s.push("|------|--------|------|");for(const c of i)s.push(`| \`${c.fileId}\` | \`${c.name}\` | ${c.kind} |`);s.push("")}return n.length===0&&i.length===0?(s.push("No unused code detected. The codebase looks clean!"),s.push("")):(s.push("## Instructions"),s.push(""),s.push("1. Review each item — some may be entry points, test files, or intentionally standalone."),s.push("2. For unreferenced files: delete if truly unused, or add to entry point config if intentional."),s.push("3. For unused exports: remove the export keyword if internal-only, or delete if dead code."),s.push("4. Run your test suite after each removal to verify nothing breaks.")),s.join(`
|
|
16
|
+
`)}function d_({prompt:n,onClose:i}){const[o,s]=V.useState(!1),c=V.useRef(null);V.useEffect(()=>{function g(h){c.current&&!c.current.contains(h.target)&&i()}return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[i]);const f=()=>{navigator.clipboard.writeText(n).then(()=>{s(!0),setTimeout(()=>s(!1),2e3)})},d=n.split(`
|
|
17
|
+
`).length,m=(n.match(/^- `/gm)||[]).length+(n.match(/^\| `/gm)||[]).length;return x.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:x.jsxs("div",{ref:c,className:"bg-[#0e0e1a] border border-[#1a1a2a] rounded-lg shadow-2xl w-[480px] max-h-[70vh] flex flex-col",children:[x.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[#1a1a2a]",children:[x.jsxs("div",{children:[x.jsx("h3",{className:"text-sm font-medium text-[#e4e4ef]",children:"Fix with AI"}),x.jsx("p",{className:"text-[10px] text-[#6a6a80] mt-0.5",children:"Copy this prompt and paste it into your AI assistant to clean up dead code."})]}),x.jsx("button",{onClick:i,className:"text-[#6a6a80] hover:text-[#e4e4ef] text-lg leading-none",children:"×"})]}),x.jsx("div",{className:"flex-1 overflow-y-auto px-4 py-3",children:x.jsx("pre",{className:"text-[10px] text-[#8888a0] font-mono whitespace-pre-wrap leading-relaxed",children:n})}),x.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-t border-[#1a1a2a]",children:[x.jsxs("span",{className:"text-[10px] text-[#4a4a6a]",children:[m," issues · ",d," lines"]}),x.jsx("button",{onClick:f,className:`px-3 py-1.5 rounded text-[11px] font-medium transition-colors ${o?"bg-green-500/20 text-green-400":"bg-indigo-500/20 text-indigo-300 hover:bg-indigo-500/30"}`,children:o?"Copied to clipboard!":"Copy prompt"})]})]})})}function h_({stats:n,rootDir:i,activeFilter:o,onFilterChange:s,toolResults:c,toolLoading:f,onRunDeepAnalysis:d}){const[m,g]=V.useState(!1),h=f_(n.unreferencedFiles,n.unusedExports,i),v=V.useCallback(b=>{s(o===b?null:b)},[o,s]),p=n.unreferencedFiles.length>0||n.unusedExports.length>0;return x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 border-b border-[#1a1a2a] bg-[#0c0c18] text-[10px] overflow-x-auto flex-wrap",children:[x.jsxs("span",{className:"text-[#8888a0] whitespace-nowrap",children:[n.totalFiles," files"]}),x.jsx("span",{className:"text-[#4a4a6a]",children:"·"}),x.jsxs("span",{className:"text-[#8888a0] whitespace-nowrap",children:[n.totalDeps," deps"]}),x.jsx("span",{className:"text-[#4a4a6a]",children:"·"}),x.jsxs("span",{className:"text-[#8888a0] whitespace-nowrap",children:[n.totalFunctions," functions"]}),n.unreferencedFiles.length>0&&x.jsxs(x.Fragment,{children:[x.jsx("span",{className:"text-[#4a4a6a]",children:"|"}),x.jsxs("button",{onClick:()=>v("unreferenced"),className:`px-1.5 py-0.5 rounded whitespace-nowrap transition-colors ${o==="unreferenced"?"bg-amber-500/20 text-amber-300 ring-1 ring-amber-500/30":"bg-amber-500/10 text-amber-400/80 hover:bg-amber-500/15"}`,children:[n.unreferencedFiles.length," unreferenced"]})]}),n.unusedExports.length>0&&x.jsxs("button",{onClick:()=>v("unused-exports"),className:`px-1.5 py-0.5 rounded whitespace-nowrap transition-colors ${o==="unused-exports"?"bg-amber-500/20 text-amber-300 ring-1 ring-amber-500/30":"bg-amber-500/10 text-amber-400/80 hover:bg-amber-500/15"}`,children:[n.unusedExports.length," unused exports"]}),c?.depCruiser&&c.depCruiser.circularDeps.length>0&&x.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-red-500/10 text-red-400/80 whitespace-nowrap",children:[c.depCruiser.circularDeps.length," circular"]}),c?.jscpd&&c.jscpd.totalDuplication>0&&x.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-yellow-500/10 text-yellow-400/80 whitespace-nowrap",children:[c.jscpd.totalDuplication.toFixed(1),"% duplication"]}),x.jsxs("div",{className:"ml-auto flex items-center gap-1.5",children:[!c?.cachedAt&&x.jsx("button",{onClick:d,disabled:f,className:"px-1.5 py-0.5 rounded text-[#6a6a80] hover:text-[#999] hover:bg-[#1a1a2a] transition-colors whitespace-nowrap disabled:opacity-50",title:"Run knip, dependency-cruiser, and jscpd for deeper analysis",children:f?x.jsxs("span",{className:"flex items-center gap-1",children:[x.jsx("span",{className:"w-2.5 h-2.5 border border-indigo-500 border-t-transparent rounded-full animate-spin"}),"Scanning..."]}):"Deep scan"}),c?.cachedAt&&x.jsx("button",{onClick:d,disabled:f,className:"px-1.5 py-0.5 rounded text-[#4a4a6a] hover:text-[#6a6a80] hover:bg-[#1a1a2a] transition-colors whitespace-nowrap disabled:opacity-50",title:"Re-run deep analysis",children:f?"Scanning...":"Re-scan"}),p&&x.jsxs("button",{onClick:()=>g(!0),className:"flex items-center gap-1 px-1.5 py-0.5 rounded bg-indigo-500/10 text-indigo-400 hover:bg-indigo-500/20 transition-colors whitespace-nowrap",title:"Generate a cleanup prompt for your AI assistant",children:[x.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})}),x.jsx("span",{children:"Fix with AI"})]})]})]}),m&&x.jsx(d_,{prompt:h,onClose:()=>g(!1)})]})}function m_({tabs:n,activeTab:i,onTabChange:o}){return x.jsx("div",{className:"flex border-b border-[#1a1a2a]",children:n.map(s=>x.jsxs("button",{onClick:()=>o(s.id),className:`px-3 py-1.5 text-[11px] font-medium transition-colors relative ${i===s.id?"text-[#e4e4ef]":"text-[#6a6a80] hover:text-[#999]"}`,children:[s.label,s.count!==void 0&&s.count>0&&x.jsx("span",{className:`ml-1.5 px-1 py-0.5 rounded text-[9px] ${i===s.id?"bg-indigo-500/20 text-indigo-300":"bg-[#1a1a2a] text-[#6a6a80]"}`,children:s.count}),i===s.id&&x.jsx("span",{className:"absolute bottom-0 left-0 right-0 h-px bg-indigo-500"})]},s.id))})}const qg={function:"text-purple-400",class:"text-pink-400",variable:"text-green-400",type:"text-cyan-400",interface:"text-cyan-400",enum:"text-yellow-400",default:"text-[#8888a0]",unknown:"text-[#6a6a80]"};function g_({stats:n,toolResults:i,onFileClick:o}){const[s,c]=V.useState("files"),f=i?.knip,d=f?.unusedFiles??n.unreferencedFiles,m=f?f.unusedExports.map(p=>({fileId:p.file,name:p.name,kind:p.kind})):n.unusedExports,g=V.useMemo(()=>{const p=new Map;for(const b of m)p.has(b.fileId)||p.set(b.fileId,[]),p.get(b.fileId).push({name:b.name,kind:b.kind});return p},[m]),h=V.useMemo(()=>{if(!f?.unusedTypes.length)return null;const p=new Map;for(const b of f.unusedTypes)p.has(b.file)||p.set(b.file,[]),p.get(b.file).push(b.name);return p},[f]);return d.length+m.length+(f?.unusedTypes.length??0)+(f?.unusedDependencies.length??0)+(f?.duplicateExports.length??0)===0?x.jsx("div",{className:"flex-1 flex items-center justify-center",children:x.jsxs("div",{className:"text-center",children:[x.jsx("p",{className:"text-sm text-green-400 mb-1",children:"All clean"}),x.jsx("p",{className:"text-[11px] text-[#6a6a80]",children:"No dead code detected."})]})}):x.jsxs("div",{className:"flex-1 overflow-y-auto",children:[x.jsxs("div",{className:"flex gap-1 px-3 py-2 border-b border-[#1a1a2a] flex-wrap",children:[x.jsxs("button",{onClick:()=>c("files"),className:`px-2 py-0.5 rounded text-[10px] font-medium transition-colors ${s==="files"?"bg-amber-500/15 text-amber-300":"text-[#6a6a80] hover:text-[#999]"}`,children:["Unused Files (",d.length,")"]}),x.jsxs("button",{onClick:()=>c("exports"),className:`px-2 py-0.5 rounded text-[10px] font-medium transition-colors ${s==="exports"?"bg-amber-500/15 text-amber-300":"text-[#6a6a80] hover:text-[#999]"}`,children:["Unused Exports (",m.length,")"]}),f&&f.unusedTypes.length>0&&x.jsxs("button",{onClick:()=>c("types"),className:`px-2 py-0.5 rounded text-[10px] font-medium transition-colors ${s==="types"?"bg-cyan-500/15 text-cyan-300":"text-[#6a6a80] hover:text-[#999]"}`,children:["Unused Types (",f.unusedTypes.length,")"]}),f&&(f.unusedDependencies.length>0||f.duplicateExports.length>0)&&x.jsxs("button",{onClick:()=>c("deps"),className:`px-2 py-0.5 rounded text-[10px] font-medium transition-colors ${s==="deps"?"bg-orange-500/15 text-orange-300":"text-[#6a6a80] hover:text-[#999]"}`,children:["Dependencies (",f.unusedDependencies.length+f.duplicateExports.length,")"]}),f&&x.jsx("span",{className:"ml-auto text-[9px] text-indigo-400/50 self-center",children:"via knip"})]}),s==="files"&&x.jsx("div",{className:"py-1",children:d.length===0?x.jsx("p",{className:"px-3 py-2 text-[11px] text-[#6a6a80]",children:"No unused files."}):d.map(p=>x.jsxs("div",{onClick:()=>o(p),className:"flex items-center gap-1.5 px-3 py-1 cursor-pointer hover:bg-amber-500/8 transition-colors",children:[x.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-500/60 flex-shrink-0"}),x.jsx("span",{className:"text-[11px] text-amber-400/80 font-mono truncate",children:p})]},p))}),s==="exports"&&x.jsx("div",{className:"py-1",children:m.length===0?x.jsx("p",{className:"px-3 py-2 text-[11px] text-[#6a6a80]",children:"No unused exports."}):Array.from(g.entries()).map(([p,b])=>x.jsxs("div",{className:"border-b border-[#1a1a2a] last:border-b-0",children:[x.jsx("div",{onClick:()=>o(p),className:"px-3 py-1.5 cursor-pointer hover:bg-[#1a1a2e] transition-colors",children:x.jsx("span",{className:"text-[11px] text-[#8888a0] font-mono truncate",children:p})}),x.jsx("div",{className:"pl-6 pb-1",children:b.map(N=>x.jsxs("div",{className:"flex items-center gap-2 py-0.5 px-3",children:[x.jsx("span",{className:`text-[10px] w-14 ${qg[N.kind]??qg.unknown}`,children:N.kind}),x.jsx("span",{className:"text-[11px] text-amber-400/70 font-mono",children:N.name})]},`${p}::${N.name}`))})]},p))}),s==="types"&&h&&x.jsx("div",{className:"py-1",children:Array.from(h.entries()).map(([p,b])=>x.jsxs("div",{className:"border-b border-[#1a1a2a] last:border-b-0",children:[x.jsx("div",{onClick:()=>o(p),className:"px-3 py-1.5 cursor-pointer hover:bg-[#1a1a2e] transition-colors",children:x.jsx("span",{className:"text-[11px] text-[#8888a0] font-mono truncate",children:p})}),x.jsx("div",{className:"pl-6 pb-1",children:b.map(N=>x.jsxs("div",{className:"flex items-center gap-2 py-0.5 px-3",children:[x.jsx("span",{className:"text-[10px] w-14 text-cyan-400",children:"type"}),x.jsx("span",{className:"text-[11px] text-cyan-400/70 font-mono",children:N})]},`${p}::${N}`))})]},p))}),s==="deps"&&f&&x.jsxs("div",{className:"py-1",children:[f.unusedDependencies.length>0&&x.jsxs("div",{className:"mb-2",children:[x.jsx("div",{className:"px-3 py-1.5",children:x.jsx("span",{className:"text-[10px] text-orange-400 font-medium",children:"Unused Dependencies"})}),f.unusedDependencies.map(p=>x.jsxs("div",{className:"flex items-center gap-2 px-3 py-0.5 pl-6",children:[x.jsx("span",{className:"text-[11px] text-orange-400/70 font-mono",children:p.name}),x.jsxs("span",{className:"text-[9px] text-[#4a4a6a]",children:["in ",p.packageJson]})]},p.name))]}),f.duplicateExports.length>0&&x.jsxs("div",{children:[x.jsx("div",{className:"px-3 py-1.5",children:x.jsx("span",{className:"text-[10px] text-yellow-400 font-medium",children:"Duplicate Exports"})}),f.duplicateExports.map(p=>x.jsxs("div",{className:"flex items-center gap-2 px-3 py-0.5 pl-6",children:[x.jsx("span",{className:"text-[11px] text-yellow-400/70 font-mono",children:p.name}),x.jsxs("span",{className:"text-[9px] text-[#4a4a6a]",children:["in ",p.file]})]},`${p.file}::${p.name}`))]})]})]})}function p_({toolResults:n,onFileClick:i}){const{depCruiser:o,jscpd:s,knip:c}=n;return o&&(o.circularDeps.length>0||o.orphanModules.length>0)||s&&s.duplicates.length>0||c&&(c.unusedDependencies.length>0||c.unlistedDependencies.length>0)?x.jsxs("div",{className:"flex-1 overflow-y-auto py-1",children:[o&&o.circularDeps.length>0&&x.jsxs("div",{className:"border-b border-[#1a1a2a] pb-2 mb-2",children:[x.jsx("div",{className:"px-3 py-1.5",children:x.jsxs("span",{className:"text-[11px] font-medium text-red-400",children:["Circular Dependencies (",o.circularDeps.length,")"]})}),o.circularDeps.map((d,m)=>x.jsx("div",{className:"px-3 py-1 hover:bg-red-500/5 transition-colors",children:x.jsxs("div",{className:"flex items-center gap-1 text-[10px] text-[#8888a0] font-mono",children:[d.cycle.map((g,h)=>x.jsxs("span",{className:"flex items-center gap-1",children:[h>0&&x.jsx("span",{className:"text-red-400/50",children:"→"}),x.jsx("span",{className:"cursor-pointer hover:text-red-300 transition-colors",onClick:()=>i(g),children:g.split("/").pop()})]},h)),x.jsx("span",{className:"text-red-400/50",children:"→"}),x.jsx("span",{className:"text-red-400/30 italic",children:"cycle"})]})},m))]}),s&&s.duplicates.length>0&&x.jsxs("div",{className:"border-b border-[#1a1a2a] pb-2 mb-2",children:[x.jsxs("div",{className:"px-3 py-1.5 flex items-baseline gap-2",children:[x.jsxs("span",{className:"text-[11px] font-medium text-yellow-400",children:["Code Duplicates (",s.duplicates.length,")"]}),x.jsxs("span",{className:"text-[9px] text-[#6a6a80]",children:[s.totalDuplication.toFixed(1),"% duplication"]})]}),s.duplicates.map((d,m)=>x.jsx("div",{className:"px-3 py-1 hover:bg-yellow-500/5 transition-colors",children:x.jsxs("div",{className:"flex items-center gap-2 text-[10px]",children:[x.jsxs("span",{className:"text-[#8888a0] font-mono cursor-pointer hover:text-yellow-300 transition-colors truncate",onClick:()=>i(d.firstFile),children:[d.firstFile.split("/").pop(),":",d.firstStart,"-",d.firstEnd]}),x.jsx("span",{className:"text-[#4a4a6a]",children:"="}),x.jsxs("span",{className:"text-[#8888a0] font-mono cursor-pointer hover:text-yellow-300 transition-colors truncate",onClick:()=>i(d.secondFile),children:[d.secondFile.split("/").pop(),":",d.secondStart,"-",d.secondEnd]}),x.jsxs("span",{className:"text-[#6a6a80] ml-auto whitespace-nowrap",children:[d.lines," lines"]})]})},m))]}),c&&(c.unusedDependencies.length>0||c.unlistedDependencies.length>0)&&x.jsxs("div",{className:"pb-2",children:[x.jsx("div",{className:"px-3 py-1.5",children:x.jsxs("span",{className:"text-[11px] font-medium text-orange-400",children:["Dependency Issues (",c.unusedDependencies.length+c.unlistedDependencies.length,")"]})}),c.unusedDependencies.length>0&&x.jsxs("div",{className:"px-3 py-1",children:[x.jsx("span",{className:"text-[10px] text-[#6a6a80]",children:"Unused packages:"}),c.unusedDependencies.map(d=>x.jsxs("div",{className:"flex items-center gap-2 py-0.5 pl-2",children:[x.jsx("span",{className:"text-[10px] text-orange-400/70 font-mono",children:d.name}),x.jsxs("span",{className:"text-[9px] text-[#4a4a6a]",children:["in ",d.packageJson]})]},d.name))]}),c.unlistedDependencies.length>0&&x.jsxs("div",{className:"px-3 py-1",children:[x.jsx("span",{className:"text-[10px] text-[#6a6a80]",children:"Unlisted (used but not in package.json):"}),c.unlistedDependencies.map(d=>x.jsxs("div",{className:"flex items-center gap-2 py-0.5 pl-2",children:[x.jsx("span",{className:"text-[10px] text-red-400/70 font-mono",children:d.name}),x.jsxs("span",{className:"text-[9px] text-[#4a4a6a]",children:["used in ",d.file]})]},`${d.name}:${d.file}`))]})]})]}):x.jsx("div",{className:"flex-1 flex items-center justify-center",children:x.jsxs("div",{className:"text-center",children:[x.jsx("p",{className:"text-sm text-green-400 mb-1",children:"Looking good"}),x.jsx("p",{className:"text-[11px] text-[#6a6a80]",children:"No quality issues detected."})]})})}const Xg={added:{label:"A",color:"text-green-400 bg-green-500/15"},modified:{label:"M",color:"text-blue-400 bg-blue-500/15"},deleted:{label:"D",color:"text-red-400 bg-red-500/15"},renamed:{label:"R",color:"text-purple-400 bg-purple-500/15"}};function y_({diff:n,onFileClick:i,onShowAggregate:o}){if(!n)return x.jsx("div",{className:"flex-1 flex items-center justify-center",children:x.jsxs("div",{className:"text-center max-w-xs",children:[x.jsx("p",{className:"text-sm text-[#6a6a80] mb-2",children:"No changes selected"}),x.jsx("p",{className:"text-[11px] text-[#4a4a6a]",children:"Use the branch/commit selector in the top bar to pick a commit range."})]})});if(n.files.length===0)return x.jsx("div",{className:"flex-1 flex items-center justify-center",children:x.jsxs("div",{className:"text-center",children:[x.jsx("p",{className:"text-sm text-green-400 mb-1",children:"No changes"}),x.jsxs("p",{className:"text-[11px] text-[#6a6a80]",children:["No files changed between ",n.fromRef," and ",n.toRef,"."]})]})});const s=n.files.filter(c=>c.status!=="deleted").map(c=>c.path);return x.jsxs("div",{className:"flex-1 overflow-y-auto",children:[x.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-[#1a1a2a]",children:[x.jsxs("span",{className:"text-[10px] text-[#6a6a80]",children:[n.files.length," changed file",n.files.length!==1?"s":""]}),x.jsxs("span",{className:"text-[9px] text-[#4a4a6a] font-mono",children:[n.fromRef,"..",n.toRef]}),s.length>0&&x.jsx("button",{onClick:()=>o(s),className:"ml-auto px-2 py-0.5 rounded text-[10px] bg-indigo-500/10 text-indigo-400 hover:bg-indigo-500/20 transition-colors",children:"Show aggregate impact"})]}),x.jsx("div",{className:"py-1",children:n.files.map(c=>{const f=Xg[c.status]??Xg.modified;return x.jsxs("div",{onClick:()=>c.status!=="deleted"&&i(c.path),className:`flex items-center gap-2 px-3 py-1 transition-colors ${c.status==="deleted"?"opacity-50":"cursor-pointer hover:bg-[#1a1a2e]"}`,children:[x.jsx("span",{className:`text-[9px] font-bold px-1 py-0.5 rounded ${f.color}`,children:f.label}),x.jsx("span",{className:"text-[11px] text-[#8888a0] font-mono truncate",children:c.path})]},c.path)})})]})}function x_({gitInfo:n,loading:i,onBranchSwitch:o,onCommitRangeSelect:s}){const[c,f]=V.useState(!1),[d,m]=V.useState("branches"),[g,h]=V.useState(null),v=V.useRef(null);return V.useEffect(()=>{function p(b){v.current&&!v.current.contains(b.target)&&f(!1)}return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[]),x.jsxs("div",{className:"relative",ref:v,children:[x.jsxs("button",{onClick:()=>f(!c),className:"flex items-center gap-1.5 px-2 py-1 rounded text-[11px] text-[#8888a0] hover:text-[#e4e4ef] hover:bg-[#1a1a2e] transition-colors",disabled:i,children:[x.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})}),x.jsx("span",{className:"font-mono",children:i?"switching...":n.currentBranch??"detached"}),x.jsx("svg",{className:"w-2.5 h-2.5 opacity-50",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),c&&x.jsxs("div",{className:"absolute top-full left-0 mt-1 w-72 bg-[#0e0e1a] border border-[#1a1a2a] rounded-lg shadow-xl z-50 overflow-hidden",children:[x.jsxs("div",{className:"flex border-b border-[#1a1a2a]",children:[x.jsx("button",{onClick:()=>{m("branches"),h(null)},className:`flex-1 px-3 py-1.5 text-[10px] font-medium ${d==="branches"?"text-[#e4e4ef] bg-[#1a1a2a]":"text-[#6a6a80]"}`,children:"Branches"}),x.jsx("button",{onClick:()=>m("commits"),className:`flex-1 px-3 py-1.5 text-[10px] font-medium ${d==="commits"?"text-[#e4e4ef] bg-[#1a1a2a]":"text-[#6a6a80]"}`,children:"Commits"})]}),x.jsxs("div",{className:"max-h-64 overflow-y-auto",children:[d==="branches"&&n.branches.map(p=>x.jsxs("button",{onClick:()=>{p!==n.currentBranch&&o(p),f(!1)},className:`w-full text-left px-3 py-1.5 text-[11px] font-mono transition-colors ${p===n.currentBranch?"text-indigo-300 bg-indigo-500/10":"text-[#8888a0] hover:bg-[#1a1a2e] hover:text-[#ccc]"}`,children:[p===n.currentBranch&&x.jsx("span",{className:"text-indigo-400 mr-1.5",children:"*"}),p]},p)),d==="commits"&&x.jsxs(x.Fragment,{children:[g&&x.jsxs("div",{className:"px-3 py-1.5 border-b border-[#1a1a2a] text-[10px] text-[#6a6a80]",children:["From: ",x.jsx("span",{className:"text-indigo-300 font-mono",children:g}),x.jsx("span",{className:"ml-1",children:'— now select "to"'})]}),n.recentCommits.map(p=>x.jsxs("button",{onClick:()=>{g?(s(g,p.hash),h(null),f(!1)):h(p.hash)},className:`w-full text-left px-3 py-1.5 transition-colors ${g===p.hash?"bg-indigo-500/10":"hover:bg-[#1a1a2e]"}`,children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("span",{className:"text-[10px] text-indigo-400 font-mono flex-shrink-0",children:p.hash}),x.jsx("span",{className:"text-[11px] text-[#8888a0] truncate",children:p.subject})]}),x.jsxs("div",{className:"text-[9px] text-[#4a4a6a] mt-0.5",children:[p.author," · ",new Date(p.date).toLocaleDateString()]})]},p.hash))]})]})]})]})}function v_({score:n,size:i=80}){const o=(i-8)/2,s=2*Math.PI*o,c=s-n/100*s,f=n>=80?"#22c55e":n>=60?"#eab308":n>=40?"#f97316":"#ef4444";return x.jsxs("div",{className:"relative",style:{width:i,height:i},children:[x.jsxs("svg",{width:i,height:i,className:"-rotate-90",children:[x.jsx("circle",{cx:i/2,cy:i/2,r:o,fill:"none",stroke:"#1a1a2a",strokeWidth:4}),x.jsx("circle",{cx:i/2,cy:i/2,r:o,fill:"none",stroke:f,strokeWidth:4,strokeLinecap:"round",strokeDasharray:s,strokeDashoffset:c,className:"transition-all duration-700"})]}),x.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[x.jsx("span",{className:"text-xl font-bold",style:{color:f},children:n}),x.jsx("span",{className:"text-[8px] text-[#6a6a80] -mt-0.5",children:"/ 100"})]})]})}function Ws({label:n,value:i,max:o,color:s}){const c=o>0?Math.min(100,i/o*100):0;return x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx("span",{className:"text-[10px] text-[#6a6a80] w-28 text-right",children:n}),x.jsx("div",{className:"flex-1 h-1.5 bg-[#1a1a2a] rounded-full overflow-hidden",children:x.jsx("div",{className:"h-full rounded-full transition-all duration-500",style:{width:`${c}%`,backgroundColor:s}})}),x.jsx("span",{className:"text-[10px] font-mono w-8",style:{color:s},children:i})]})}function b_({stats:n,toolResults:i}){const{healthScore:o}=V.useMemo(()=>{const f=n.totalFiles>0?n.unusedExports.length+n.totalFiles*3:1,d=n.unreferencedFiles.length/Math.max(1,n.totalFiles)*100,m=n.unusedExports.length/Math.max(1,f)*100,g=Math.min(30,d),h=Math.min(20,m*2),v=i?.depCruiser?Math.min(15,i.depCruiser.circularDeps.length*3):0,p=i?.jscpd?Math.min(15,i.jscpd.totalDuplication*.5):0;return{healthScore:Math.max(0,Math.round(100-g-h-v-p)),breakdown:{deadFilePct:d,unusedExportPct:m,circularPenalty:v,duplicationPenalty:p}}},[n,i]),s=o>=90?"A":o>=80?"B":o>=70?"C":o>=60?"D":"F",c=o>=80?"text-green-400":o>=60?"text-yellow-400":"text-red-400";return x.jsx("div",{className:"flex-1 flex items-center justify-center",children:x.jsxs("div",{className:"max-w-sm w-full px-6",children:[x.jsxs("div",{className:"flex items-center gap-6 mb-8",children:[x.jsx(v_,{score:o}),x.jsxs("div",{children:[x.jsxs("p",{className:"text-sm text-[#e4e4ef]",children:["Codebase health: ",x.jsx("span",{className:`font-bold ${c}`,children:s})]}),x.jsx("p",{className:"text-[11px] text-[#6a6a80] mt-1",children:o>=80?"Looking good. Minor cleanup opportunities.":o>=60?"Some issues to address. Review the details below.":"Significant cleanup needed. Prioritize dead code removal."})]})]}),x.jsxs("div",{className:"space-y-3",children:[x.jsx(Ws,{label:"Unreferenced files",value:n.unreferencedFiles.length,max:n.totalFiles,color:n.unreferencedFiles.length>n.totalFiles*.1?"#f97316":"#22c55e"}),x.jsx(Ws,{label:"Unused exports",value:n.unusedExports.length,max:n.unusedExports.length+n.totalFunctions,color:n.unusedExports.length>20?"#f97316":"#22c55e"}),i?.depCruiser&&x.jsx(Ws,{label:"Circular deps",value:i.depCruiser.circularDeps.length,max:Math.max(10,i.depCruiser.circularDeps.length),color:i.depCruiser.circularDeps.length>0?"#ef4444":"#22c55e"}),i?.jscpd&&x.jsx(Ws,{label:"Code duplication",value:Math.round(i.jscpd.totalDuplication*10)/10,max:20,color:i.jscpd.totalDuplication>5?"#eab308":"#22c55e"})]}),x.jsxs("div",{className:"mt-6 grid grid-cols-3 gap-3",children:[x.jsxs("div",{className:"text-center px-3 py-2 rounded-lg bg-[#0e0e1a] border border-[#1a1a2a]",children:[x.jsx("p",{className:"text-lg font-bold text-[#e4e4ef]",children:n.totalFiles}),x.jsx("p",{className:"text-[9px] text-[#6a6a80]",children:"files"})]}),x.jsxs("div",{className:"text-center px-3 py-2 rounded-lg bg-[#0e0e1a] border border-[#1a1a2a]",children:[x.jsx("p",{className:"text-lg font-bold text-[#e4e4ef]",children:n.totalDeps}),x.jsx("p",{className:"text-[9px] text-[#6a6a80]",children:"dependencies"})]}),x.jsxs("div",{className:"text-center px-3 py-2 rounded-lg bg-[#0e0e1a] border border-[#1a1a2a]",children:[x.jsx("p",{className:"text-lg font-bold text-[#e4e4ef]",children:n.totalFunctions}),x.jsx("p",{className:"text-[9px] text-[#6a6a80]",children:"functions"})]})]})]})})}function S_({toolResults:n}){const{depCruiser:i,jscpd:o,knip:s}=n,c=i?.circularDeps.length??0,f=o?.duplicates.length??0,d=o?.totalDuplication??0,m=s?.unusedDependencies.length??0,g=s?.unlistedDependencies.length??0;return c+f+m+g===0?x.jsx("div",{className:"flex-1 flex items-center justify-center",children:x.jsxs("div",{className:"text-center",children:[x.jsx("p",{className:"text-lg text-green-400 mb-1",children:"All clean"}),x.jsx("p",{className:"text-[11px] text-[#6a6a80]",children:"No quality issues detected by external tools."})]})}):x.jsx("div",{className:"flex-1 flex items-center justify-center",children:x.jsxs("div",{className:"max-w-lg w-full px-6",children:[x.jsx("h3",{className:"text-sm font-medium text-[#e4e4ef] mb-4",children:"Code quality summary"}),x.jsxs("div",{className:"grid grid-cols-2 gap-3 mb-6",children:[x.jsxs("div",{className:`px-4 py-3 rounded-lg border ${c>0?"bg-red-500/5 border-red-500/20":"bg-[#0e0e1a] border-[#1a1a2a]"}`,children:[x.jsx("p",{className:`text-2xl font-bold ${c>0?"text-red-400":"text-green-400"}`,children:c}),x.jsx("p",{className:"text-[10px] text-[#6a6a80] mt-0.5",children:"Circular dependencies"}),c>0&&i&&x.jsxs("div",{className:"mt-2 space-y-1",children:[i.circularDeps.slice(0,3).map((v,p)=>x.jsx("p",{className:"text-[9px] text-red-400/60 font-mono truncate",children:v.cycle.map(b=>b.split("/").pop()).join(" ↔ ")},p)),c>3&&x.jsxs("p",{className:"text-[9px] text-[#4a4a6a]",children:["+",c-3," more"]})]})]}),x.jsxs("div",{className:`px-4 py-3 rounded-lg border ${d>3?"bg-yellow-500/5 border-yellow-500/20":"bg-[#0e0e1a] border-[#1a1a2a]"}`,children:[x.jsxs("p",{className:`text-2xl font-bold ${d>5?"text-yellow-400":d>3?"text-yellow-400/70":"text-green-400"}`,children:[d.toFixed(1),"%"]}),x.jsx("p",{className:"text-[10px] text-[#6a6a80] mt-0.5",children:"Code duplication"}),f>0&&x.jsxs("p",{className:"text-[9px] text-[#6a6a80] mt-2",children:[f," duplicate block",f!==1?"s":""]})]}),x.jsxs("div",{className:`px-4 py-3 rounded-lg border ${m>0?"bg-orange-500/5 border-orange-500/20":"bg-[#0e0e1a] border-[#1a1a2a]"}`,children:[x.jsx("p",{className:`text-2xl font-bold ${m>0?"text-orange-400":"text-green-400"}`,children:m}),x.jsx("p",{className:"text-[10px] text-[#6a6a80] mt-0.5",children:"Unused packages"}),m>0&&s&&x.jsxs("div",{className:"mt-2 space-y-0.5",children:[s.unusedDependencies.slice(0,3).map(v=>x.jsx("p",{className:"text-[9px] text-orange-400/60 font-mono truncate",children:v.name},v.name)),m>3&&x.jsxs("p",{className:"text-[9px] text-[#4a4a6a]",children:["+",m-3," more"]})]})]}),x.jsxs("div",{className:`px-4 py-3 rounded-lg border ${g>0?"bg-red-500/5 border-red-500/20":"bg-[#0e0e1a] border-[#1a1a2a]"}`,children:[x.jsx("p",{className:`text-2xl font-bold ${g>0?"text-red-400":"text-green-400"}`,children:g}),x.jsx("p",{className:"text-[10px] text-[#6a6a80] mt-0.5",children:"Unlisted dependencies"}),g>0&&s&&x.jsxs("div",{className:"mt-2 space-y-0.5",children:[s.unlistedDependencies.slice(0,3).map(v=>x.jsx("p",{className:"text-[9px] text-red-400/60 font-mono truncate",children:v.name},`${v.name}:${v.file}`)),g>3&&x.jsxs("p",{className:"text-[9px] text-[#4a4a6a]",children:["+",g-3," more"]})]})]})]}),n.errors.length>0&&x.jsx("div",{className:"text-[10px] text-[#4a4a6a]",children:n.errors.map((v,p)=>x.jsxs("p",{children:[v.tool,": ",v.message]},p))})]})})}function E_(n){const i=new Map;for(const d of n.directories){const m=d.parentDir??"__root__";i.has(m)||i.set(m,[]),i.get(m).push(d.id)}const o=new Map(n.directories.map(d=>[d.id,d])),s=new Map;for(const d of n.nodes){const m=d.directory||"__root__";s.has(m)||s.set(m,[]),s.get(m).push(d)}function c(d){const m=o.get(d),g=[];for(const h of(i.get(d)??[]).sort())g.push(c(h));for(const h of(s.get(d)??[]).sort((v,p)=>v.fileName.localeCompare(p.fileName)))g.push({id:h.id,name:h.fileName,type:"file",children:[],language:h.language,linesOfCode:h.linesOfCode,exportCount:h.exports.length,importCount:h.imports.length});return{id:`folder:${d}`,name:m.name,type:"folder",children:g}}const f=[];for(const d of(i.get("__root__")??[]).sort())f.push(c(d));for(const d of(s.get("__root__")??[]).sort((m,g)=>m.fileName.localeCompare(g.fileName)))f.push({id:d.id,name:d.fileName,type:"file",children:[],language:d.language,linesOfCode:d.linesOfCode,exportCount:d.exports.length,importCount:d.imports.length});return f}function zy(n,i){if(n.type==="file")return i.has(n.id)?1:0;let o=0;for(const s of n.children)o+=zy(s,i);return o}function jy(n,i){return n.type==="file"?i.has(n.id):n.children.some(o=>jy(o,i))}const N_={typescript:"#3178c6",tsx:"#3178c6",javascript:"#f7df1e",jsx:"#f7df1e"};function Dy({node:n,depth:i,expandedFolders:o,toggleFolder:s,selectedFile:c,onFileClick:f,blastMap:d,deadFiles:m,filterSet:g,changedFiles:h}){if(g&&!jy(n,g))return null;const v=n.type==="file"&&n.id===c,p=n.type==="file"?d.get(n.id):void 0,b=p!==void 0&&!v,N=n.type==="file"&&m.has(n.id),_=n.type==="file"&&h?.has(n.id);if(n.type==="folder"){const C=o.has(n.id),T=d.size>0?zy(n,d):0;return x.jsxs("div",{children:[x.jsxs("div",{onClick:()=>s(n.id),className:`flex items-center gap-1.5 py-0.5 px-2 rounded transition-colors cursor-pointer group ${T>0?"hover:bg-orange-500/10":"hover:bg-[#1a1a2e]"}`,style:{paddingLeft:`${i*14+6}px`},children:[x.jsx("span",{className:"text-[9px] text-[#6a6a80] w-3 flex-shrink-0",children:C?"▼":"▶"}),x.jsx("span",{className:`text-[11px] font-medium truncate ${T>0?"text-orange-300":"text-indigo-300"}`,children:n.name}),T>0&&x.jsxs("span",{className:"ml-auto text-[9px] text-orange-400/70 flex-shrink-0",title:`${T} files inside this folder would be affected`,children:[T," affected"]})]}),C&&n.children.map(A=>x.jsx(Dy,{node:A,depth:i+1,expandedFolders:o,toggleFolder:s,selectedFile:c,onFileClick:f,blastMap:d,deadFiles:m,filterSet:g,changedFiles:h},A.id))]})}return x.jsxs("div",{onClick:()=>f(n.id),className:`flex items-center gap-1.5 py-0.5 px-2 rounded transition-colors cursor-pointer group ${v?"bg-indigo-500/20 ring-1 ring-indigo-500/40":b?"bg-orange-500/8 hover:bg-orange-500/15":_?"bg-green-500/8 hover:bg-green-500/15":N?"hover:bg-amber-500/8":"hover:bg-[#1a1a2e]"}`,style:{paddingLeft:`${i*14+6}px`},children:[x.jsx("span",{className:"w-1.5 h-1.5 rounded-full flex-shrink-0",style:{backgroundColor:_?"#22c55e":N?"#f59e0b60":N_[n.language??""]??"#555"}}),x.jsx("span",{className:`text-[11px] truncate ${v?"text-indigo-300 font-medium":b?"text-orange-200":_?"text-green-300":N?"text-amber-400/60":"text-[#999] group-hover:text-[#ccc]"}`,children:n.name}),b&&x.jsx("span",{className:"ml-auto text-[9px] text-orange-400/60 flex-shrink-0",title:`${p} step${p>1?"s":""} from the changed file`,children:p===1?"direct":`${p} steps away`}),_&&!b&&!v&&x.jsx("span",{className:"ml-auto text-[9px] text-green-500/60 flex-shrink-0",children:"changed"}),N&&!b&&!v&&!_&&x.jsx("span",{className:"ml-auto text-[9px] text-amber-500/50 flex-shrink-0",title:"Nothing imports this file — potentially unused",children:"unused"})]})}function w_({data:n,gitInfo:i,gitLoading:o,gitDiff:s,toolResults:c,toolLoading:f,onBranchSwitch:d,onCommitRangeSelect:m,onRunDeepAnalysis:g}){const[h,v]=V.useState(()=>{const E=new Set;for(const j of n.directories)j.parentDir===null&&E.add(`folder:${j.id}`);return E}),[p,b]=V.useState(null),[N,_]=V.useState("files"),[C,T]=V.useState(null),[A,Y]=V.useState(null),[w,z]=V.useState(null),[q,B]=V.useState([]),{result:R,computeBlastRadius:$,clearBlastRadius:J}=Wv(),se=Iv(n),k=V.useMemo(()=>E_(n),[n]),W=V.useMemo(()=>{const E=new Set;for(const j of n.edges)E.add(j.target);return new Set(n.nodes.filter(j=>!E.has(j.id)).map(j=>j.id))},[n]),oe=V.useMemo(()=>{const E=new Map;if(R)for(const j of R.affected)E.set(j.fileId,j.depth);return E},[R]),D=V.useMemo(()=>s?new Set(s.files.filter(E=>E.status!=="deleted").map(E=>E.path)):null,[s]);V.useEffect(()=>{if(!s||s.files.length===0){z(null),B([]),Y(null);return}const E=s.files.filter(j=>j.status!=="deleted").map(j=>j.path);if(E.length===0){z(null),B([]),Y(null);return}Y(new Set(E)),B(E),fetch(`/api/blast-radius/aggregate?files=${encodeURIComponent(E.join(","))}`).then(j=>j.ok?j.json():null).then(j=>{j&&z({sourceFile:E[0],affected:j.affected})}).catch(()=>{})},[s]);const Z=V.useMemo(()=>C?C==="unreferenced"?new Set(se.unreferencedFiles):C==="unused-exports"?new Set(se.unusedExports.map(E=>E.fileId)):null:null,[C,se]),M=V.useCallback(E=>{v(j=>{const I=new Set(j);return I.has(E)?I.delete(E):I.add(E),I})},[]),H=V.useCallback(E=>{p===E?(b(null),J(),Y(null)):(b(E),$(E),Y(null))},[p,$,J]),L=V.useCallback(E=>{b(null),J()},[J]),G=R?.affected.length??0,te=V.useMemo(()=>{const E=[{id:"files",label:"Files"},{id:"dead-code",label:"Dead Code",count:se.unreferencedFiles.length+se.unusedExports.length}];if(s&&E.push({id:"changes",label:"Changes",count:s.files.length}),c?.cachedAt){const j=(c.depCruiser?.circularDeps.length??0)+(c.jscpd?.duplicates.length??0)+(c.knip?.unusedDependencies.length??0)+(c.knip?.unlistedDependencies.length??0);j>0&&E.push({id:"quality",label:"Quality",count:j})}return E},[se,s,c]);return x.jsxs("div",{className:"h-screen w-screen flex flex-col bg-[#08080f]",children:[x.jsxs("div",{className:"flex items-center gap-3 px-5 py-2.5 border-b border-[#1a1a2a] bg-[#0a0a14]",children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("div",{className:"w-5 h-5 rounded-md bg-gradient-to-br from-indigo-500 to-purple-600 flex items-center justify-center",children:x.jsx("span",{className:"text-white text-[9px] font-bold",children:"G"})}),x.jsx("span",{className:"text-sm font-semibold text-[#e4e4ef] tracking-tight",children:"gitblast"})]}),i&&x.jsx(x_,{gitInfo:i,loading:o,onBranchSwitch:d,onCommitRangeSelect:(E,j)=>{m(E,j),_("changes")}}),x.jsxs("span",{className:"text-[10px] text-[#4a4a6a] ml-auto",children:[n.nodes.length," files · ",n.edges.length," dependencies"]})]}),x.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[x.jsxs("div",{className:"w-[300px] min-w-[260px] flex flex-col border-r border-[#1a1a2a]",children:[x.jsx(h_,{stats:se,rootDir:n.rootDir,activeFilter:C,onFilterChange:T,toolResults:c,toolLoading:f,onRunDeepAnalysis:g}),x.jsx(m_,{tabs:te,activeTab:N,onTabChange:_}),N==="files"&&x.jsxs(x.Fragment,{children:[p&&x.jsxs("div",{className:"px-3 py-2 border-b border-[#1a1a2a] bg-indigo-500/5",children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("span",{className:"text-[10px] text-indigo-300 font-mono truncate flex-1",children:p.split("/").pop()}),G>0&&n.nodes.length>0&&x.jsxs("span",{className:"text-[10px] font-bold text-orange-400 flex-shrink-0",children:[Math.round(G/n.nodes.length*100),"%"]}),x.jsx("button",{onClick:()=>{b(null),J(),Y(null)},className:"text-[#6a6a80] hover:text-[#e4e4ef] text-xs leading-none",children:"×"})]}),G>0&&x.jsxs("p",{className:"text-[10px] text-orange-400 mt-1",children:[G," file",G!==1?"s":""," affected (",Math.round(G/n.nodes.length*100),"% of codebase)"]}),G===0&&R&&x.jsx("p",{className:"text-[10px] text-green-400 mt-1",children:"No other files depend on this — safe to change"})]}),C&&x.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 border-b border-[#1a1a2a] bg-amber-500/5",children:[x.jsxs("span",{className:"text-[10px] text-amber-400",children:["Showing: ",C==="unreferenced"?"unreferenced files":"files with unused exports"]}),x.jsx("button",{onClick:()=>T(null),className:"text-[#6a6a80] hover:text-[#e4e4ef] text-xs leading-none ml-auto",children:"×"})]}),x.jsx("div",{className:"flex-1 overflow-y-auto py-1",children:k.map(E=>x.jsx(Dy,{node:E,depth:0,expandedFolders:h,toggleFolder:M,selectedFile:p,onFileClick:H,blastMap:oe,deadFiles:W,filterSet:Z,changedFiles:D},E.id))})]}),N==="dead-code"&&x.jsx(g_,{stats:se,toolResults:c,onFileClick:H}),N==="changes"&&x.jsx(y_,{diff:s,onFileClick:H,onShowAggregate:L}),N==="quality"&&c&&x.jsx(p_,{toolResults:c,onFileClick:H})]}),x.jsx("div",{className:"flex-1 flex flex-col",children:p&&R&&G>0?x.jsx(Vg,{sourceFile:p,blastRadius:R,data:n,changedFiles:D??A}):p&&R&&G===0?x.jsx("div",{className:"flex-1 flex items-center justify-center",children:x.jsxs("div",{className:"text-center",children:[x.jsx("p",{className:"text-lg text-green-400 mb-1",children:"All clear"}),x.jsx("p",{className:"text-[11px] text-[#6a6a80]",children:"No other files import from this file."}),x.jsx("p",{className:"text-[11px] text-[#6a6a80]",children:"Changes here won't break anything else."})]})}):p?x.jsx("div",{className:"flex-1 flex items-center justify-center",children:x.jsx("div",{className:"w-5 h-5 border-2 border-indigo-500 border-t-transparent rounded-full animate-spin"})}):w&&w.affected.length>0?x.jsx(Vg,{sourceFile:q[0],sourceFiles:q,blastRadius:w,data:n,changedFiles:A}):w&&w.affected.length===0&&s?x.jsx("div",{className:"flex-1 flex items-center justify-center",children:x.jsxs("div",{className:"text-center",children:[x.jsx("p",{className:"text-lg text-green-400 mb-1",children:"All clear"}),x.jsxs("p",{className:"text-[11px] text-[#6a6a80]",children:["None of the ",s.files.length," changed files are imported by other files."]}),x.jsx("p",{className:"text-[11px] text-[#6a6a80]",children:"This commit has no downstream impact."})]})}):N==="dead-code"?x.jsx(b_,{stats:se,toolResults:c}):N==="quality"&&c?x.jsx(S_,{toolResults:c}):x.jsx("div",{className:"flex-1 flex items-center justify-center",children:x.jsxs("div",{className:"text-center max-w-xs",children:[x.jsx("p",{className:"text-sm text-[#6a6a80] mb-2",children:"Click a file to see its blast radius"}),x.jsx("p",{className:"text-[11px] text-[#4a4a6a]",children:"Select any file to see which files depend on it. Then click nodes on the graph to expand and see function-level detail."})]})})})]})]})}function __(){const{data:n,loading:i,error:o,setData:s}=Kv(),{gitInfo:c,diff:f,loading:d,fetchDiff:m,switchBranch:g,clearDiff:h}=Jv(),{results:v,loading:p,runDeepAnalysis:b}=Fv(),N=V.useCallback(async C=>{if(await g(C)){const A=await fetch("/api/graph");if(A.ok){const Y=await A.json();s(Y)}h()}},[g,s,h]),_=V.useCallback((C,T)=>{m(C,T)},[m]);return i?x.jsx("div",{className:"h-screen w-screen flex items-center justify-center",children:x.jsxs("div",{className:"text-center",children:[x.jsx("div",{className:"w-8 h-8 border-2 border-indigo-500 border-t-transparent rounded-full animate-spin mx-auto mb-4"}),x.jsx("p",{className:"text-sm text-[#8888a0]",children:"Loading graph data..."})]})}):o?x.jsx("div",{className:"h-screen w-screen flex items-center justify-center",children:x.jsxs("div",{className:"text-center max-w-md",children:[x.jsx("p",{className:"text-red-400 text-sm mb-2",children:"Failed to load graph data"}),x.jsx("p",{className:"text-[#8888a0] text-xs",children:o}),x.jsx("p",{className:"text-[#8888a0] text-xs mt-4",children:"Make sure the gitblast CLI is running and serving on the expected port."})]})}):n?x.jsx(w_,{data:n,gitInfo:c,gitLoading:d,gitDiff:f,toolResults:v,toolLoading:p,onBranchSwitch:N,onCommitRangeSelect:_,onRunDeepAnalysis:b}):null}Qv.createRoot(document.getElementById("root")).render(x.jsx(V.StrictMode,{children:x.jsx(__,{})}));
|