clitrigger 0.1.7 → 0.1.9
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/README.md +39 -5
- package/README_KR.md +39 -5
- package/bin/clitrigger.js +27 -60
- package/dist/client/assets/index-D4Xur2yY.css +1 -0
- package/dist/client/assets/index-Dz1uDy_d.js +567 -0
- package/dist/client/index.html +2 -2
- package/dist/server/db/queries.d.ts +25 -2
- package/dist/server/db/queries.d.ts.map +1 -1
- package/dist/server/db/queries.js +65 -0
- package/dist/server/db/queries.js.map +1 -1
- package/dist/server/db/schema.d.ts.map +1 -1
- package/dist/server/db/schema.js +4 -0
- package/dist/server/db/schema.js.map +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +2 -0
- package/dist/server/index.js.map +1 -1
- package/dist/server/routes/planner.d.ts.map +1 -1
- package/dist/server/routes/planner.js +194 -50
- package/dist/server/routes/planner.js.map +1 -1
- package/dist/server/routes/review.d.ts +3 -0
- package/dist/server/routes/review.d.ts.map +1 -0
- package/dist/server/routes/review.js +63 -0
- package/dist/server/routes/review.js.map +1 -0
- package/dist/server/services/discussion-orchestrator.js +1 -1
- package/dist/server/services/discussion-orchestrator.js.map +1 -1
- package/dist/server/services/orchestrator.d.ts.map +1 -1
- package/dist/server/services/orchestrator.js +4 -1
- package/dist/server/services/orchestrator.js.map +1 -1
- package/dist/server/services/review-capture.d.ts +20 -0
- package/dist/server/services/review-capture.d.ts.map +1 -0
- package/dist/server/services/review-capture.js +86 -0
- package/dist/server/services/review-capture.js.map +1 -0
- package/dist/server/services/session-manager.js +1 -1
- package/dist/server/services/session-manager.js.map +1 -1
- package/dist/server/services/worktree-manager.d.ts +1 -1
- package/dist/server/services/worktree-manager.d.ts.map +1 -1
- package/dist/server/services/worktree-manager.js +9 -5
- package/dist/server/services/worktree-manager.js.map +1 -1
- package/package.json +3 -1
- package/dist/client/assets/index-BiXO2oR3.js +0 -541
- package/dist/client/assets/index-tGOot928.css +0 -1
|
@@ -0,0 +1,567 @@
|
|
|
1
|
+
var KZ=Object.defineProperty;var WZ=(e,t,n)=>t in e?KZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var w0=(e,t,n)=>WZ(e,typeof t!="symbol"?t+"":t,n);function YZ(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in e)){const i=Object.getOwnPropertyDescriptor(r,a);i&&Object.defineProperty(e,a,i.get?i:{enumerable:!0,get:()=>r[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(a){if(a.ep)return;a.ep=!0;const i=n(a);fetch(a.href,i)}})();var Nm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ta(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var S0={exports:{}},hd={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var MP;function XZ(){if(MP)return hd;MP=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,i){var s=null;if(i!==void 0&&(s=""+i),a.key!==void 0&&(s=""+a.key),"key"in a){i={};for(var l in a)l!=="key"&&(i[l]=a[l])}else i=a;return a=i.ref,{$$typeof:e,type:r,key:s,ref:a!==void 0?a:null,props:i}}return hd.Fragment=t,hd.jsx=n,hd.jsxs=n,hd}var PP;function ZZ(){return PP||(PP=1,S0.exports=XZ()),S0.exports}var f=ZZ(),j0={exports:{}},ut={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var DP;function QZ(){if(DP)return ut;DP=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),g=Symbol.iterator;function v(H){return H===null||typeof H!="object"?null:(H=g&&H[g]||H["@@iterator"],typeof H=="function"?H:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,S={};function j(H,K,U){this.props=H,this.context=K,this.refs=S,this.updater=U||b}j.prototype.isReactComponent={},j.prototype.setState=function(H,K){if(typeof H!="object"&&typeof H!="function"&&H!=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,H,K,"setState")},j.prototype.forceUpdate=function(H){this.updater.enqueueForceUpdate(this,H,"forceUpdate")};function _(){}_.prototype=j.prototype;function k(H,K,U){this.props=H,this.context=K,this.refs=S,this.updater=U||b}var E=k.prototype=new _;E.constructor=k,w(E,j.prototype),E.isPureReactComponent=!0;var T=Array.isArray;function A(){}var O={H:null,A:null,T:null,S:null},I=Object.prototype.hasOwnProperty;function P(H,K,U){var X=U.ref;return{$$typeof:e,type:H,key:K,ref:X!==void 0?X:null,props:U}}function D(H,K){return P(H.type,K,H.props)}function q(H){return typeof H=="object"&&H!==null&&H.$$typeof===e}function z(H){var K={"=":"=0",":":"=2"};return"$"+H.replace(/[=:]/g,function(U){return K[U]})}var F=/\/+/g;function R(H,K){return typeof H=="object"&&H!==null&&H.key!=null?z(""+H.key):K.toString(36)}function M(H){switch(H.status){case"fulfilled":return H.value;case"rejected":throw H.reason;default:switch(typeof H.status=="string"?H.then(A,A):(H.status="pending",H.then(function(K){H.status==="pending"&&(H.status="fulfilled",H.value=K)},function(K){H.status==="pending"&&(H.status="rejected",H.reason=K)})),H.status){case"fulfilled":return H.value;case"rejected":throw H.reason}}throw H}function L(H,K,U,X,J){var Q=typeof H;(Q==="undefined"||Q==="boolean")&&(H=null);var re=!1;if(H===null)re=!0;else switch(Q){case"bigint":case"string":case"number":re=!0;break;case"object":switch(H.$$typeof){case e:case t:re=!0;break;case h:return re=H._init,L(re(H._payload),K,U,X,J)}}if(re)return J=J(H),re=X===""?"."+R(H,0):X,T(J)?(U="",re!=null&&(U=re.replace(F,"$&/")+"/"),L(J,K,U,"",function(se){return se})):J!=null&&(q(J)&&(J=D(J,U+(J.key==null||H&&H.key===J.key?"":(""+J.key).replace(F,"$&/")+"/")+re)),K.push(J)),1;re=0;var ue=X===""?".":X+":";if(T(H))for(var Z=0;Z<H.length;Z++)X=H[Z],Q=ue+R(X,Z),re+=L(X,K,U,Q,J);else if(Z=v(H),typeof Z=="function")for(H=Z.call(H),Z=0;!(X=H.next()).done;)X=X.value,Q=ue+R(X,Z++),re+=L(X,K,U,Q,J);else if(Q==="object"){if(typeof H.then=="function")return L(M(H),K,U,X,J);throw K=String(H),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(H).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.")}return re}function G(H,K,U){if(H==null)return H;var X=[],J=0;return L(H,X,"","",function(Q){return K.call(U,Q,J++)}),X}function W(H){if(H._status===-1){var K=H._result;K=K(),K.then(function(U){(H._status===0||H._status===-1)&&(H._status=1,H._result=U)},function(U){(H._status===0||H._status===-1)&&(H._status=2,H._result=U)}),H._status===-1&&(H._status=0,H._result=K)}if(H._status===1)return H._result.default;throw H._result}var Y=typeof reportError=="function"?reportError:function(H){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var K=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof H=="object"&&H!==null&&typeof H.message=="string"?String(H.message):String(H),error:H});if(!window.dispatchEvent(K))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",H);return}console.error(H)},B={map:G,forEach:function(H,K,U){G(H,function(){K.apply(this,arguments)},U)},count:function(H){var K=0;return G(H,function(){K++}),K},toArray:function(H){return G(H,function(K){return K})||[]},only:function(H){if(!q(H))throw Error("React.Children.only expected to receive a single React element child.");return H}};return ut.Activity=m,ut.Children=B,ut.Component=j,ut.Fragment=n,ut.Profiler=a,ut.PureComponent=k,ut.StrictMode=r,ut.Suspense=c,ut.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O,ut.__COMPILER_RUNTIME={__proto__:null,c:function(H){return O.H.useMemoCache(H)}},ut.cache=function(H){return function(){return H.apply(null,arguments)}},ut.cacheSignal=function(){return null},ut.cloneElement=function(H,K,U){if(H==null)throw Error("The argument must be a React element, but you passed "+H+".");var X=w({},H.props),J=H.key;if(K!=null)for(Q in K.key!==void 0&&(J=""+K.key),K)!I.call(K,Q)||Q==="key"||Q==="__self"||Q==="__source"||Q==="ref"&&K.ref===void 0||(X[Q]=K[Q]);var Q=arguments.length-2;if(Q===1)X.children=U;else if(1<Q){for(var re=Array(Q),ue=0;ue<Q;ue++)re[ue]=arguments[ue+2];X.children=re}return P(H.type,J,X)},ut.createContext=function(H){return H={$$typeof:s,_currentValue:H,_currentValue2:H,_threadCount:0,Provider:null,Consumer:null},H.Provider=H,H.Consumer={$$typeof:i,_context:H},H},ut.createElement=function(H,K,U){var X,J={},Q=null;if(K!=null)for(X in K.key!==void 0&&(Q=""+K.key),K)I.call(K,X)&&X!=="key"&&X!=="__self"&&X!=="__source"&&(J[X]=K[X]);var re=arguments.length-2;if(re===1)J.children=U;else if(1<re){for(var ue=Array(re),Z=0;Z<re;Z++)ue[Z]=arguments[Z+2];J.children=ue}if(H&&H.defaultProps)for(X in re=H.defaultProps,re)J[X]===void 0&&(J[X]=re[X]);return P(H,Q,J)},ut.createRef=function(){return{current:null}},ut.forwardRef=function(H){return{$$typeof:l,render:H}},ut.isValidElement=q,ut.lazy=function(H){return{$$typeof:h,_payload:{_status:-1,_result:H},_init:W}},ut.memo=function(H,K){return{$$typeof:d,type:H,compare:K===void 0?null:K}},ut.startTransition=function(H){var K=O.T,U={};O.T=U;try{var X=H(),J=O.S;J!==null&&J(U,X),typeof X=="object"&&X!==null&&typeof X.then=="function"&&X.then(A,Y)}catch(Q){Y(Q)}finally{K!==null&&U.types!==null&&(K.types=U.types),O.T=K}},ut.unstable_useCacheRefresh=function(){return O.H.useCacheRefresh()},ut.use=function(H){return O.H.use(H)},ut.useActionState=function(H,K,U){return O.H.useActionState(H,K,U)},ut.useCallback=function(H,K){return O.H.useCallback(H,K)},ut.useContext=function(H){return O.H.useContext(H)},ut.useDebugValue=function(){},ut.useDeferredValue=function(H,K){return O.H.useDeferredValue(H,K)},ut.useEffect=function(H,K){return O.H.useEffect(H,K)},ut.useEffectEvent=function(H){return O.H.useEffectEvent(H)},ut.useId=function(){return O.H.useId()},ut.useImperativeHandle=function(H,K,U){return O.H.useImperativeHandle(H,K,U)},ut.useInsertionEffect=function(H,K){return O.H.useInsertionEffect(H,K)},ut.useLayoutEffect=function(H,K){return O.H.useLayoutEffect(H,K)},ut.useMemo=function(H,K){return O.H.useMemo(H,K)},ut.useOptimistic=function(H,K){return O.H.useOptimistic(H,K)},ut.useReducer=function(H,K,U){return O.H.useReducer(H,K,U)},ut.useRef=function(H){return O.H.useRef(H)},ut.useState=function(H){return O.H.useState(H)},ut.useSyncExternalStore=function(H,K,U){return O.H.useSyncExternalStore(H,K,U)},ut.useTransition=function(){return O.H.useTransition()},ut.version="19.2.4",ut}var RP;function rc(){return RP||(RP=1,j0.exports=QZ()),j0.exports}var x=rc();const z2=ta(x),JZ=YZ({__proto__:null,default:z2},[x]);var k0={exports:{}},md={},_0={exports:{}},C0={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var IP;function eQ(){return IP||(IP=1,(function(e){function t(L,G){var W=L.length;L.push(G);e:for(;0<W;){var Y=W-1>>>1,B=L[Y];if(0<a(B,G))L[Y]=G,L[W]=B,W=Y;else break e}}function n(L){return L.length===0?null:L[0]}function r(L){if(L.length===0)return null;var G=L[0],W=L.pop();if(W!==G){L[0]=W;e:for(var Y=0,B=L.length,H=B>>>1;Y<H;){var K=2*(Y+1)-1,U=L[K],X=K+1,J=L[X];if(0>a(U,W))X<B&&0>a(J,U)?(L[Y]=J,L[X]=W,Y=X):(L[Y]=U,L[K]=W,Y=K);else if(X<B&&0>a(J,W))L[Y]=J,L[X]=W,Y=X;else break e}}return G}function a(L,G){var W=L.sortIndex-G.sortIndex;return W!==0?W:L.id-G.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var c=[],d=[],h=1,m=null,g=3,v=!1,b=!1,w=!1,S=!1,j=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function E(L){for(var G=n(d);G!==null;){if(G.callback===null)r(d);else if(G.startTime<=L)r(d),G.sortIndex=G.expirationTime,t(c,G);else break;G=n(d)}}function T(L){if(w=!1,E(L),!b)if(n(c)!==null)b=!0,A||(A=!0,z());else{var G=n(d);G!==null&&M(T,G.startTime-L)}}var A=!1,O=-1,I=5,P=-1;function D(){return S?!0:!(e.unstable_now()-P<I)}function q(){if(S=!1,A){var L=e.unstable_now();P=L;var G=!0;try{e:{b=!1,w&&(w=!1,_(O),O=-1),v=!0;var W=g;try{t:{for(E(L),m=n(c);m!==null&&!(m.expirationTime>L&&D());){var Y=m.callback;if(typeof Y=="function"){m.callback=null,g=m.priorityLevel;var B=Y(m.expirationTime<=L);if(L=e.unstable_now(),typeof B=="function"){m.callback=B,E(L),G=!0;break t}m===n(c)&&r(c),E(L)}else r(c);m=n(c)}if(m!==null)G=!0;else{var H=n(d);H!==null&&M(T,H.startTime-L),G=!1}}break e}finally{m=null,g=W,v=!1}G=void 0}}finally{G?z():A=!1}}}var z;if(typeof k=="function")z=function(){k(q)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,R=F.port2;F.port1.onmessage=q,z=function(){R.postMessage(null)}}else z=function(){j(q,0)};function M(L,G){O=j(function(){L(e.unstable_now())},G)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(L){L.callback=null},e.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<L?Math.floor(1e3/L):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(L){switch(g){case 1:case 2:case 3:var G=3;break;default:G=g}var W=g;g=G;try{return L()}finally{g=W}},e.unstable_requestPaint=function(){S=!0},e.unstable_runWithPriority=function(L,G){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var W=g;g=L;try{return G()}finally{g=W}},e.unstable_scheduleCallback=function(L,G,W){var Y=e.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?Y+W:Y):W=Y,L){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=W+B,L={id:h++,callback:G,priorityLevel:L,startTime:W,expirationTime:B,sortIndex:-1},W>Y?(L.sortIndex=W,t(d,L),n(c)===null&&L===n(d)&&(w?(_(O),O=-1):w=!0,M(T,W-Y))):(L.sortIndex=B,t(c,L),b||v||(b=!0,A||(A=!0,z()))),L},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(L){var G=g;return function(){var W=g;g=G;try{return L.apply(this,arguments)}finally{g=W}}}})(C0)),C0}var LP;function tQ(){return LP||(LP=1,_0.exports=eQ()),_0.exports}var N0={exports:{}},or={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var zP;function nQ(){if(zP)return or;zP=1;var e=rc();function t(c){var d="https://react.dev/errors/"+c;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)d+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+c+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},a=Symbol.for("react.portal");function i(c,d,h){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:m==null?null:""+m,children:c,containerInfo:d,implementation:h}}var s=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(c,d){if(c==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return or.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,or.createPortal=function(c,d){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(t(299));return i(c,d,null,h)},or.flushSync=function(c){var d=s.T,h=r.p;try{if(s.T=null,r.p=2,c)return c()}finally{s.T=d,r.p=h,r.d.f()}},or.preconnect=function(c,d){typeof c=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,r.d.C(c,d))},or.prefetchDNS=function(c){typeof c=="string"&&r.d.D(c)},or.preinit=function(c,d){if(typeof c=="string"&&d&&typeof d.as=="string"){var h=d.as,m=l(h,d.crossOrigin),g=typeof d.integrity=="string"?d.integrity:void 0,v=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;h==="style"?r.d.S(c,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:m,integrity:g,fetchPriority:v}):h==="script"&&r.d.X(c,{crossOrigin:m,integrity:g,fetchPriority:v,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},or.preinitModule=function(c,d){if(typeof c=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var h=l(d.as,d.crossOrigin);r.d.M(c,{crossOrigin:h,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&r.d.M(c)},or.preload=function(c,d){if(typeof c=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var h=d.as,m=l(h,d.crossOrigin);r.d.L(c,h,{crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},or.preloadModule=function(c,d){if(typeof c=="string")if(d){var h=l(d.as,d.crossOrigin);r.d.m(c,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:h,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else r.d.m(c)},or.requestFormReset=function(c){r.d.r(c)},or.unstable_batchedUpdates=function(c,d){return c(d)},or.useFormState=function(c,d,h){return s.H.useFormState(c,d,h)},or.useFormStatus=function(){return s.H.useHostTransitionStatus()},or.version="19.2.4",or}var $P;function MF(){if($P)return N0.exports;$P=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),N0.exports=nQ(),N0.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var qP;function rQ(){if(qP)return md;qP=1;var e=tQ(),t=rc(),n=MF();function r(o){var u="https://react.dev/errors/"+o;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)u+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+o+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function i(o){var u=o,p=o;if(o.alternate)for(;u.return;)u=u.return;else{o=u;do u=o,(u.flags&4098)!==0&&(p=u.return),o=u.return;while(o)}return u.tag===3?p:null}function s(o){if(o.tag===13){var u=o.memoizedState;if(u===null&&(o=o.alternate,o!==null&&(u=o.memoizedState)),u!==null)return u.dehydrated}return null}function l(o){if(o.tag===31){var u=o.memoizedState;if(u===null&&(o=o.alternate,o!==null&&(u=o.memoizedState)),u!==null)return u.dehydrated}return null}function c(o){if(i(o)!==o)throw Error(r(188))}function d(o){var u=o.alternate;if(!u){if(u=i(o),u===null)throw Error(r(188));return u!==o?null:o}for(var p=o,y=u;;){var C=p.return;if(C===null)break;var N=C.alternate;if(N===null){if(y=C.return,y!==null){p=y;continue}break}if(C.child===N.child){for(N=C.child;N;){if(N===p)return c(C),o;if(N===y)return c(C),u;N=N.sibling}throw Error(r(188))}if(p.return!==y.return)p=C,y=N;else{for(var $=!1,V=C.child;V;){if(V===p){$=!0,p=C,y=N;break}if(V===y){$=!0,y=C,p=N;break}V=V.sibling}if(!$){for(V=N.child;V;){if(V===p){$=!0,p=N,y=C;break}if(V===y){$=!0,y=N,p=C;break}V=V.sibling}if(!$)throw Error(r(189))}}if(p.alternate!==y)throw Error(r(190))}if(p.tag!==3)throw Error(r(188));return p.stateNode.current===p?o:u}function h(o){var u=o.tag;if(u===5||u===26||u===27||u===6)return o;for(o=o.child;o!==null;){if(u=h(o),u!==null)return u;o=o.sibling}return null}var m=Object.assign,g=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),k=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),P=Symbol.for("react.activity"),D=Symbol.for("react.memo_cache_sentinel"),q=Symbol.iterator;function z(o){return o===null||typeof o!="object"?null:(o=q&&o[q]||o["@@iterator"],typeof o=="function"?o:null)}var F=Symbol.for("react.client.reference");function R(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===F?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case w:return"Fragment";case j:return"Profiler";case S:return"StrictMode";case T:return"Suspense";case A:return"SuspenseList";case P:return"Activity"}if(typeof o=="object")switch(o.$$typeof){case b:return"Portal";case k:return o.displayName||"Context";case _:return(o._context.displayName||"Context")+".Consumer";case E:var u=o.render;return o=o.displayName,o||(o=u.displayName||u.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case O:return u=o.displayName||null,u!==null?u:R(o.type)||"Memo";case I:u=o._payload,o=o._init;try{return R(o(u))}catch{}}return null}var M=Array.isArray,L=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W={pending:!1,data:null,method:null,action:null},Y=[],B=-1;function H(o){return{current:o}}function K(o){0>B||(o.current=Y[B],Y[B]=null,B--)}function U(o,u){B++,Y[B]=o.current,o.current=u}var X=H(null),J=H(null),Q=H(null),re=H(null);function ue(o,u){switch(U(Q,u),U(J,o),U(X,null),u.nodeType){case 9:case 11:o=(o=u.documentElement)&&(o=o.namespaceURI)?tP(o):0;break;default:if(o=u.tagName,u=u.namespaceURI)u=tP(u),o=nP(u,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}K(X),U(X,o)}function Z(){K(X),K(J),K(Q)}function se(o){o.memoizedState!==null&&U(re,o);var u=X.current,p=nP(u,o.type);u!==p&&(U(J,o),U(X,p))}function ce(o){J.current===o&&(K(X),K(J)),re.current===o&&(K(re),ud._currentValue=W)}var ee,ae;function oe(o){if(ee===void 0)try{throw Error()}catch(p){var u=p.stack.trim().match(/\n( *(at )?)/);ee=u&&u[1]||"",ae=-1<p.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<p.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+ee+o+ae}var fe=!1;function Ce(o,u){if(!o||fe)return"";fe=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var y={DetermineComponentFrameRoot:function(){try{if(u){var Ae=function(){throw Error()};if(Object.defineProperty(Ae.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ae,[])}catch(ke){var xe=ke}Reflect.construct(o,[],Ae)}else{try{Ae.call()}catch(ke){xe=ke}o.call(Ae.prototype)}}else{try{throw Error()}catch(ke){xe=ke}(Ae=o())&&typeof Ae.catch=="function"&&Ae.catch(function(){})}}catch(ke){if(ke&&xe&&typeof ke.stack=="string")return[ke.stack,xe.stack]}return[null,null]}};y.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var C=Object.getOwnPropertyDescriptor(y.DetermineComponentFrameRoot,"name");C&&C.configurable&&Object.defineProperty(y.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var N=y.DetermineComponentFrameRoot(),$=N[0],V=N[1];if($&&V){var te=$.split(`
|
|
44
|
+
`),ve=V.split(`
|
|
45
|
+
`);for(C=y=0;y<te.length&&!te[y].includes("DetermineComponentFrameRoot");)y++;for(;C<ve.length&&!ve[C].includes("DetermineComponentFrameRoot");)C++;if(y===te.length||C===ve.length)for(y=te.length-1,C=ve.length-1;1<=y&&0<=C&&te[y]!==ve[C];)C--;for(;1<=y&&0<=C;y--,C--)if(te[y]!==ve[C]){if(y!==1||C!==1)do if(y--,C--,0>C||te[y]!==ve[C]){var _e=`
|
|
46
|
+
`+te[y].replace(" at new "," at ");return o.displayName&&_e.includes("<anonymous>")&&(_e=_e.replace("<anonymous>",o.displayName)),_e}while(1<=y&&0<=C);break}}}finally{fe=!1,Error.prepareStackTrace=p}return(p=o?o.displayName||o.name:"")?oe(p):""}function Te(o,u){switch(o.tag){case 26:case 27:case 5:return oe(o.type);case 16:return oe("Lazy");case 13:return o.child!==u&&u!==null?oe("Suspense Fallback"):oe("Suspense");case 19:return oe("SuspenseList");case 0:case 15:return Ce(o.type,!1);case 11:return Ce(o.type.render,!1);case 1:return Ce(o.type,!0);case 31:return oe("Activity");default:return""}}function pe(o){try{var u="",p=null;do u+=Te(o,p),p=o,o=o.return;while(o);return u}catch(y){return`
|
|
47
|
+
Error generating stack: `+y.message+`
|
|
48
|
+
`+y.stack}}var De=Object.prototype.hasOwnProperty,Xe=e.unstable_scheduleCallback,We=e.unstable_cancelCallback,at=e.unstable_shouldYield,Ne=e.unstable_requestPaint,Fe=e.unstable_now,ye=e.unstable_getCurrentPriorityLevel,le=e.unstable_ImmediatePriority,me=e.unstable_UserBlockingPriority,Oe=e.unstable_NormalPriority,Pe=e.unstable_LowPriority,be=e.unstable_IdlePriority,nt=e.log,ot=e.unstable_setDisableYieldValue,gt=null,lt=null;function Me(o){if(typeof nt=="function"&&ot(o),lt&&typeof lt.setStrictMode=="function")try{lt.setStrictMode(gt,o)}catch{}}var $e=Math.clz32?Math.clz32:st,Qe=Math.log,vt=Math.LN2;function st(o){return o>>>=0,o===0?32:31-(Qe(o)/vt|0)|0}var Et=256,Je=262144,At=4194304;function It(o){var u=o&42;if(u!==0)return u;switch(o&-o){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 o&261888;case 262144:case 524288:case 1048576:case 2097152:return o&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return o&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return o}}function hn(o,u,p){var y=o.pendingLanes;if(y===0)return 0;var C=0,N=o.suspendedLanes,$=o.pingedLanes;o=o.warmLanes;var V=y&134217727;return V!==0?(y=V&~N,y!==0?C=It(y):($&=V,$!==0?C=It($):p||(p=V&~o,p!==0&&(C=It(p))))):(V=y&~N,V!==0?C=It(V):$!==0?C=It($):p||(p=y&~o,p!==0&&(C=It(p)))),C===0?0:u!==0&&u!==C&&(u&N)===0&&(N=C&-C,p=u&-u,N>=p||N===32&&(p&4194048)!==0)?u:C}function ne(o,u){return(o.pendingLanes&~(o.suspendedLanes&~o.pingedLanes)&u)===0}function we(o,u){switch(o){case 1:case 2:case 4:case 8:case 64:return u+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 u+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 Se(){var o=At;return At<<=1,(At&62914560)===0&&(At=4194304),o}function Ie(o){for(var u=[],p=0;31>p;p++)u.push(o);return u}function ze(o,u){o.pendingLanes|=u,u!==268435456&&(o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0)}function ft(o,u,p,y,C,N){var $=o.pendingLanes;o.pendingLanes=p,o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0,o.expiredLanes&=p,o.entangledLanes&=p,o.errorRecoveryDisabledLanes&=p,o.shellSuspendCounter=0;var V=o.entanglements,te=o.expirationTimes,ve=o.hiddenUpdates;for(p=$&~p;0<p;){var _e=31-$e(p),Ae=1<<_e;V[_e]=0,te[_e]=-1;var xe=ve[_e];if(xe!==null)for(ve[_e]=null,_e=0;_e<xe.length;_e++){var ke=xe[_e];ke!==null&&(ke.lane&=-536870913)}p&=~Ae}y!==0&&Vt(o,y,0),N!==0&&C===0&&o.tag!==0&&(o.suspendedLanes|=N&~($&~u))}function Vt(o,u,p){o.pendingLanes|=u,o.suspendedLanes&=~u;var y=31-$e(u);o.entangledLanes|=u,o.entanglements[y]=o.entanglements[y]|1073741824|p&261930}function ir(o,u){var p=o.entangledLanes|=u;for(o=o.entanglements;p;){var y=31-$e(p),C=1<<y;C&u|o[y]&u&&(o[y]|=u),p&=~C}}function Le(o,u){var p=u&-u;return p=(p&42)!==0?1:Cn(p),(p&(o.suspendedLanes|u))!==0?0:p}function Cn(o){switch(o){case 2:o=1;break;case 8:o=4;break;case 32:o=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:o=128;break;case 268435456:o=134217728;break;default:o=0}return o}function Dr(o){return o&=-o,2<o?8<o?(o&134217727)!==0?32:268435456:8:2}function Ml(){var o=G.p;return o!==0?o:(o=window.event,o===void 0?32:_P(o.type))}function Pl(o,u){var p=G.p;try{return G.p=o,u()}finally{G.p=p}}var Rr=Math.random().toString(36).slice(2),jn="__reactFiber$"+Rr,Gn="__reactProps$"+Rr,Sa="__reactContainer$"+Rr,ys="__reactEvents$"+Rr,Si="__reactListeners$"+Rr,jc="__reactHandles$"+Rr,mo="__reactResources$"+Rr,ji="__reactMarker$"+Rr;function po(o){delete o[jn],delete o[Gn],delete o[ys],delete o[Si],delete o[jc]}function Ua(o){var u=o[jn];if(u)return u;for(var p=o.parentNode;p;){if(u=p[Sa]||p[jn]){if(p=u.alternate,u.child!==null||p!==null&&p.child!==null)for(o=uP(o);o!==null;){if(p=o[jn])return p;o=uP(o)}return u}o=p,p=o.parentNode}return null}function Ga(o){if(o=o[jn]||o[Sa]){var u=o.tag;if(u===5||u===6||u===13||u===31||u===26||u===27||u===3)return o}return null}function Va(o){var u=o.tag;if(u===5||u===26||u===27||u===6)return o.stateNode;throw Error(r(33))}function Ka(o){var u=o[mo];return u||(u=o[mo]={hoistableStyles:new Map,hoistableScripts:new Map}),u}function gn(o){o[ji]=!0}var go=new Set,ja={};function Vn(o,u){wr(o,u),wr(o+"Capture",u)}function wr(o,u){for(ja[o]=u,o=0;o<u.length;o++)go.add(u[o])}var kc=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]*$"),vo={},Dl={};function _c(o){return De.call(Dl,o)?!0:De.call(vo,o)?!1:kc.test(o)?Dl[o]=!0:(vo[o]=!0,!1)}function xs(o,u,p){if(_c(u))if(p===null)o.removeAttribute(u);else{switch(typeof p){case"undefined":case"function":case"symbol":o.removeAttribute(u);return;case"boolean":var y=u.toLowerCase().slice(0,5);if(y!=="data-"&&y!=="aria-"){o.removeAttribute(u);return}}o.setAttribute(u,""+p)}}function bs(o,u,p){if(p===null)o.removeAttribute(u);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(u);return}o.setAttribute(u,""+p)}}function Ir(o,u,p,y){if(y===null)o.removeAttribute(p);else{switch(typeof y){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(p);return}o.setAttributeNS(u,p,""+y)}}function sr(o){switch(typeof o){case"bigint":case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function yo(o){var u=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(u==="checkbox"||u==="radio")}function Rl(o,u,p){var y=Object.getOwnPropertyDescriptor(o.constructor.prototype,u);if(!o.hasOwnProperty(u)&&typeof y<"u"&&typeof y.get=="function"&&typeof y.set=="function"){var C=y.get,N=y.set;return Object.defineProperty(o,u,{configurable:!0,get:function(){return C.call(this)},set:function($){p=""+$,N.call(this,$)}}),Object.defineProperty(o,u,{enumerable:y.enumerable}),{getValue:function(){return p},setValue:function($){p=""+$},stopTracking:function(){o._valueTracker=null,delete o[u]}}}}function je(o){if(!o._valueTracker){var u=yo(o)?"checked":"value";o._valueTracker=Rl(o,u,""+o[u])}}function ht(o){if(!o)return!1;var u=o._valueTracker;if(!u)return!0;var p=u.getValue(),y="";return o&&(y=yo(o)?o.checked?"true":"false":o.value),o=y,o!==p?(u.setValue(o),!0):!1}function St(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}var vn=/[\n"\\]/g;function yt(o){return o.replace(vn,function(u){return"\\"+u.charCodeAt(0).toString(16)+" "})}function ka(o,u,p,y,C,N,$,V){o.name="",$!=null&&typeof $!="function"&&typeof $!="symbol"&&typeof $!="boolean"?o.type=$:o.removeAttribute("type"),u!=null?$==="number"?(u===0&&o.value===""||o.value!=u)&&(o.value=""+sr(u)):o.value!==""+sr(u)&&(o.value=""+sr(u)):$!=="submit"&&$!=="reset"||o.removeAttribute("value"),u!=null?xo(o,$,sr(u)):p!=null?xo(o,$,sr(p)):y!=null&&o.removeAttribute("value"),C==null&&N!=null&&(o.defaultChecked=!!N),C!=null&&(o.checked=C&&typeof C!="function"&&typeof C!="symbol"),V!=null&&typeof V!="function"&&typeof V!="symbol"&&typeof V!="boolean"?o.name=""+sr(V):o.removeAttribute("name")}function Il(o,u,p,y,C,N,$,V){if(N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"&&(o.type=N),u!=null||p!=null){if(!(N!=="submit"&&N!=="reset"||u!=null)){je(o);return}p=p!=null?""+sr(p):"",u=u!=null?""+sr(u):p,V||u===o.value||(o.value=u),o.defaultValue=u}y=y??C,y=typeof y!="function"&&typeof y!="symbol"&&!!y,o.checked=V?o.checked:!!y,o.defaultChecked=!!y,$!=null&&typeof $!="function"&&typeof $!="symbol"&&typeof $!="boolean"&&(o.name=$),je(o)}function xo(o,u,p){u==="number"&&St(o.ownerDocument)===o||o.defaultValue===""+p||(o.defaultValue=""+p)}function na(o,u,p,y){if(o=o.options,u){u={};for(var C=0;C<p.length;C++)u["$"+p[C]]=!0;for(p=0;p<o.length;p++)C=u.hasOwnProperty("$"+o[p].value),o[p].selected!==C&&(o[p].selected=C),C&&y&&(o[p].defaultSelected=!0)}else{for(p=""+sr(p),u=null,C=0;C<o.length;C++){if(o[C].value===p){o[C].selected=!0,y&&(o[C].defaultSelected=!0);return}u!==null||o[C].disabled||(u=o[C])}u!==null&&(u.selected=!0)}}function XA(o,u,p){if(u!=null&&(u=""+sr(u),u!==o.value&&(o.value=u),p==null)){o.defaultValue!==u&&(o.defaultValue=u);return}o.defaultValue=p!=null?""+sr(p):""}function ZA(o,u,p,y){if(u==null){if(y!=null){if(p!=null)throw Error(r(92));if(M(y)){if(1<y.length)throw Error(r(93));y=y[0]}p=y}p==null&&(p=""),u=p}p=sr(u),o.defaultValue=p,y=o.textContent,y===p&&y!==""&&y!==null&&(o.value=y),je(o)}function Ll(o,u){if(u){var p=o.firstChild;if(p&&p===o.lastChild&&p.nodeType===3){p.nodeValue=u;return}}o.textContent=u}var FY=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 QA(o,u,p){var y=u.indexOf("--")===0;p==null||typeof p=="boolean"||p===""?y?o.setProperty(u,""):u==="float"?o.cssFloat="":o[u]="":y?o.setProperty(u,p):typeof p!="number"||p===0||FY.has(u)?u==="float"?o.cssFloat=p:o[u]=(""+p).trim():o[u]=p+"px"}function JA(o,u,p){if(u!=null&&typeof u!="object")throw Error(r(62));if(o=o.style,p!=null){for(var y in p)!p.hasOwnProperty(y)||u!=null&&u.hasOwnProperty(y)||(y.indexOf("--")===0?o.setProperty(y,""):y==="float"?o.cssFloat="":o[y]="");for(var C in u)y=u[C],u.hasOwnProperty(C)&&p[C]!==y&&QA(o,C,y)}else for(var N in u)u.hasOwnProperty(N)&&QA(o,N,u[N])}function vy(o){if(o.indexOf("-")===-1)return!1;switch(o){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"]]),UY=/^[\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 yh(o){return UY.test(""+o)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":o}function ki(){}var yy=null;function xy(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var zl=null,$l=null;function eT(o){var u=Ga(o);if(u&&(o=u.stateNode)){var p=o[Gn]||null;e:switch(o=u.stateNode,u.type){case"input":if(ka(o,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name),u=p.name,p.type==="radio"&&u!=null){for(p=o;p.parentNode;)p=p.parentNode;for(p=p.querySelectorAll('input[name="'+yt(""+u)+'"][type="radio"]'),u=0;u<p.length;u++){var y=p[u];if(y!==o&&y.form===o.form){var C=y[Gn]||null;if(!C)throw Error(r(90));ka(y,C.value,C.defaultValue,C.defaultValue,C.checked,C.defaultChecked,C.type,C.name)}}for(u=0;u<p.length;u++)y=p[u],y.form===o.form&&ht(y)}break e;case"textarea":XA(o,p.value,p.defaultValue);break e;case"select":u=p.value,u!=null&&na(o,!!p.multiple,u,!1)}}}var by=!1;function tT(o,u,p){if(by)return o(u,p);by=!0;try{var y=o(u);return y}finally{if(by=!1,(zl!==null||$l!==null)&&(im(),zl&&(u=zl,o=$l,$l=zl=null,eT(u),o)))for(u=0;u<o.length;u++)eT(o[u])}}function Cc(o,u){var p=o.stateNode;if(p===null)return null;var y=p[Gn]||null;if(y===null)return null;p=y[u];e:switch(u){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(y=!y.disabled)||(o=o.type,y=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!y;break e;default:o=!1}if(o)return null;if(p&&typeof p!="function")throw Error(r(231,u,typeof p));return p}var _i=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),wy=!1;if(_i)try{var Nc={};Object.defineProperty(Nc,"passive",{get:function(){wy=!0}}),window.addEventListener("test",Nc,Nc),window.removeEventListener("test",Nc,Nc)}catch{wy=!1}var ws=null,Sy=null,xh=null;function nT(){if(xh)return xh;var o,u=Sy,p=u.length,y,C="value"in ws?ws.value:ws.textContent,N=C.length;for(o=0;o<p&&u[o]===C[o];o++);var $=p-o;for(y=1;y<=$&&u[p-y]===C[N-y];y++);return xh=C.slice(o,1<y?1-y:void 0)}function bh(o){var u=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&u===13&&(o=13)):o=u,o===10&&(o=13),32<=o||o===13?o:0}function wh(){return!0}function rT(){return!1}function Sr(o){function u(p,y,C,N,$){this._reactName=p,this._targetInst=C,this.type=y,this.nativeEvent=N,this.target=$,this.currentTarget=null;for(var V in o)o.hasOwnProperty(V)&&(p=o[V],this[V]=p?p(N):N[V]);return this.isDefaultPrevented=(N.defaultPrevented!=null?N.defaultPrevented:N.returnValue===!1)?wh:rT,this.isPropagationStopped=rT,this}return m(u.prototype,{preventDefault:function(){this.defaultPrevented=!0;var p=this.nativeEvent;p&&(p.preventDefault?p.preventDefault():typeof p.returnValue!="unknown"&&(p.returnValue=!1),this.isDefaultPrevented=wh)},stopPropagation:function(){var p=this.nativeEvent;p&&(p.stopPropagation?p.stopPropagation():typeof p.cancelBubble!="unknown"&&(p.cancelBubble=!0),this.isPropagationStopped=wh)},persist:function(){},isPersistent:wh}),u}var bo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Sh=Sr(bo),Ec=m({},bo,{view:0,detail:0}),GY=Sr(Ec),jy,ky,Ac,jh=m({},Ec,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cy,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==Ac&&(Ac&&o.type==="mousemove"?(jy=o.screenX-Ac.screenX,ky=o.screenY-Ac.screenY):ky=jy=0,Ac=o),jy)},movementY:function(o){return"movementY"in o?o.movementY:ky}}),aT=Sr(jh),VY=m({},jh,{dataTransfer:0}),KY=Sr(VY),WY=m({},Ec,{relatedTarget:0}),_y=Sr(WY),YY=m({},bo,{animationName:0,elapsedTime:0,pseudoElement:0}),XY=Sr(YY),ZY=m({},bo,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),QY=Sr(ZY),JY=m({},bo,{data:0}),iT=Sr(JY),eX={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},tX={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"},nX={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function rX(o){var u=this.nativeEvent;return u.getModifierState?u.getModifierState(o):(o=nX[o])?!!u[o]:!1}function Cy(){return rX}var aX=m({},Ec,{key:function(o){if(o.key){var u=eX[o.key]||o.key;if(u!=="Unidentified")return u}return o.type==="keypress"?(o=bh(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?tX[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cy,charCode:function(o){return o.type==="keypress"?bh(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?bh(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),iX=Sr(aX),sX=m({},jh,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),sT=Sr(sX),oX=m({},Ec,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cy}),lX=Sr(oX),uX=m({},bo,{propertyName:0,elapsedTime:0,pseudoElement:0}),cX=Sr(uX),dX=m({},jh,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),fX=Sr(dX),hX=m({},bo,{newState:0,oldState:0}),mX=Sr(hX),pX=[9,13,27,32],Ny=_i&&"CompositionEvent"in window,Tc=null;_i&&"documentMode"in document&&(Tc=document.documentMode);var gX=_i&&"TextEvent"in window&&!Tc,oT=_i&&(!Ny||Tc&&8<Tc&&11>=Tc),lT=" ",uT=!1;function cT(o,u){switch(o){case"keyup":return pX.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function dT(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var ql=!1;function vX(o,u){switch(o){case"compositionend":return dT(u);case"keypress":return u.which!==32?null:(uT=!0,lT);case"textInput":return o=u.data,o===lT&&uT?null:o;default:return null}}function yX(o,u){if(ql)return o==="compositionend"||!Ny&&cT(o,u)?(o=nT(),xh=Sy=ws=null,ql=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1<u.char.length)return u.char;if(u.which)return String.fromCharCode(u.which)}return null;case"compositionend":return oT&&u.locale!=="ko"?null:u.data;default:return null}}var xX={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 fT(o){var u=o&&o.nodeName&&o.nodeName.toLowerCase();return u==="input"?!!xX[o.type]:u==="textarea"}function hT(o,u,p,y){zl?$l?$l.push(y):$l=[y]:zl=y,u=fm(u,"onChange"),0<u.length&&(p=new Sh("onChange","change",null,p,y),o.push({event:p,listeners:u}))}var Oc=null,Mc=null;function bX(o){YM(o,0)}function kh(o){var u=Va(o);if(ht(u))return o}function mT(o,u){if(o==="change")return u}var pT=!1;if(_i){var Ey;if(_i){var Ay="oninput"in document;if(!Ay){var gT=document.createElement("div");gT.setAttribute("oninput","return;"),Ay=typeof gT.oninput=="function"}Ey=Ay}else Ey=!1;pT=Ey&&(!document.documentMode||9<document.documentMode)}function vT(){Oc&&(Oc.detachEvent("onpropertychange",yT),Mc=Oc=null)}function yT(o){if(o.propertyName==="value"&&kh(Mc)){var u=[];hT(u,Mc,o,xy(o)),tT(bX,u)}}function wX(o,u,p){o==="focusin"?(vT(),Oc=u,Mc=p,Oc.attachEvent("onpropertychange",yT)):o==="focusout"&&vT()}function SX(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return kh(Mc)}function jX(o,u){if(o==="click")return kh(u)}function kX(o,u){if(o==="input"||o==="change")return kh(u)}function _X(o,u){return o===u&&(o!==0||1/o===1/u)||o!==o&&u!==u}var Lr=typeof Object.is=="function"?Object.is:_X;function Pc(o,u){if(Lr(o,u))return!0;if(typeof o!="object"||o===null||typeof u!="object"||u===null)return!1;var p=Object.keys(o),y=Object.keys(u);if(p.length!==y.length)return!1;for(y=0;y<p.length;y++){var C=p[y];if(!De.call(u,C)||!Lr(o[C],u[C]))return!1}return!0}function xT(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function bT(o,u){var p=xT(o);o=0;for(var y;p;){if(p.nodeType===3){if(y=o+p.textContent.length,o<=u&&y>=u)return{node:p,offset:u-o};o=y}e:{for(;p;){if(p.nextSibling){p=p.nextSibling;break e}p=p.parentNode}p=void 0}p=xT(p)}}function wT(o,u){return o&&u?o===u?!0:o&&o.nodeType===3?!1:u&&u.nodeType===3?wT(o,u.parentNode):"contains"in o?o.contains(u):o.compareDocumentPosition?!!(o.compareDocumentPosition(u)&16):!1:!1}function ST(o){o=o!=null&&o.ownerDocument!=null&&o.ownerDocument.defaultView!=null?o.ownerDocument.defaultView:window;for(var u=St(o.document);u instanceof o.HTMLIFrameElement;){try{var p=typeof u.contentWindow.location.href=="string"}catch{p=!1}if(p)o=u.contentWindow;else break;u=St(o.document)}return u}function Ty(o){var u=o&&o.nodeName&&o.nodeName.toLowerCase();return u&&(u==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||u==="textarea"||o.contentEditable==="true")}var CX=_i&&"documentMode"in document&&11>=document.documentMode,Bl=null,Oy=null,Dc=null,My=!1;function jT(o,u,p){var y=p.window===p?p.document:p.nodeType===9?p:p.ownerDocument;My||Bl==null||Bl!==St(y)||(y=Bl,"selectionStart"in y&&Ty(y)?y={start:y.selectionStart,end:y.selectionEnd}:(y=(y.ownerDocument&&y.ownerDocument.defaultView||window).getSelection(),y={anchorNode:y.anchorNode,anchorOffset:y.anchorOffset,focusNode:y.focusNode,focusOffset:y.focusOffset}),Dc&&Pc(Dc,y)||(Dc=y,y=fm(Oy,"onSelect"),0<y.length&&(u=new Sh("onSelect","select",null,u,p),o.push({event:u,listeners:y}),u.target=Bl)))}function wo(o,u){var p={};return p[o.toLowerCase()]=u.toLowerCase(),p["Webkit"+o]="webkit"+u,p["Moz"+o]="moz"+u,p}var Fl={animationend:wo("Animation","AnimationEnd"),animationiteration:wo("Animation","AnimationIteration"),animationstart:wo("Animation","AnimationStart"),transitionrun:wo("Transition","TransitionRun"),transitionstart:wo("Transition","TransitionStart"),transitioncancel:wo("Transition","TransitionCancel"),transitionend:wo("Transition","TransitionEnd")},Py={},kT={};_i&&(kT=document.createElement("div").style,"AnimationEvent"in window||(delete Fl.animationend.animation,delete Fl.animationiteration.animation,delete Fl.animationstart.animation),"TransitionEvent"in window||delete Fl.transitionend.transition);function So(o){if(Py[o])return Py[o];if(!Fl[o])return o;var u=Fl[o],p;for(p in u)if(u.hasOwnProperty(p)&&p in kT)return Py[o]=u[p];return o}var _T=So("animationend"),CT=So("animationiteration"),NT=So("animationstart"),NX=So("transitionrun"),EX=So("transitionstart"),AX=So("transitioncancel"),ET=So("transitionend"),AT=new Map,Dy="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(" ");Dy.push("scrollEnd");function _a(o,u){AT.set(o,u),Vn(u,[o])}var _h=typeof reportError=="function"?reportError:function(o){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var u=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof o=="object"&&o!==null&&typeof o.message=="string"?String(o.message):String(o),error:o});if(!window.dispatchEvent(u))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",o);return}console.error(o)},ra=[],Hl=0,Ry=0;function Ch(){for(var o=Hl,u=Ry=Hl=0;u<o;){var p=ra[u];ra[u++]=null;var y=ra[u];ra[u++]=null;var C=ra[u];ra[u++]=null;var N=ra[u];if(ra[u++]=null,y!==null&&C!==null){var $=y.pending;$===null?C.next=C:(C.next=$.next,$.next=C),y.pending=C}N!==0&&TT(p,C,N)}}function Nh(o,u,p,y){ra[Hl++]=o,ra[Hl++]=u,ra[Hl++]=p,ra[Hl++]=y,Ry|=y,o.lanes|=y,o=o.alternate,o!==null&&(o.lanes|=y)}function Iy(o,u,p,y){return Nh(o,u,p,y),Eh(o)}function jo(o,u){return Nh(o,null,null,u),Eh(o)}function TT(o,u,p){o.lanes|=p;var y=o.alternate;y!==null&&(y.lanes|=p);for(var C=!1,N=o.return;N!==null;)N.childLanes|=p,y=N.alternate,y!==null&&(y.childLanes|=p),N.tag===22&&(o=N.stateNode,o===null||o._visibility&1||(C=!0)),o=N,N=N.return;return o.tag===3?(N=o.stateNode,C&&u!==null&&(C=31-$e(p),o=N.hiddenUpdates,y=o[C],y===null?o[C]=[u]:y.push(u),u.lane=p|536870912),N):null}function Eh(o){if(50<nd)throw nd=0,Gx=null,Error(r(185));for(var u=o.return;u!==null;)o=u,u=o.return;return o.tag===3?o.stateNode:null}var Ul={};function TX(o,u,p,y){this.tag=o,this.key=p,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=y,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function zr(o,u,p,y){return new TX(o,u,p,y)}function Ly(o){return o=o.prototype,!(!o||!o.isReactComponent)}function Ci(o,u){var p=o.alternate;return p===null?(p=zr(o.tag,u,o.key,o.mode),p.elementType=o.elementType,p.type=o.type,p.stateNode=o.stateNode,p.alternate=o,o.alternate=p):(p.pendingProps=u,p.type=o.type,p.flags=0,p.subtreeFlags=0,p.deletions=null),p.flags=o.flags&65011712,p.childLanes=o.childLanes,p.lanes=o.lanes,p.child=o.child,p.memoizedProps=o.memoizedProps,p.memoizedState=o.memoizedState,p.updateQueue=o.updateQueue,u=o.dependencies,p.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},p.sibling=o.sibling,p.index=o.index,p.ref=o.ref,p.refCleanup=o.refCleanup,p}function OT(o,u){o.flags&=65011714;var p=o.alternate;return p===null?(o.childLanes=0,o.lanes=u,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=p.childLanes,o.lanes=p.lanes,o.child=p.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=p.memoizedProps,o.memoizedState=p.memoizedState,o.updateQueue=p.updateQueue,o.type=p.type,u=p.dependencies,o.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext}),o}function Ah(o,u,p,y,C,N){var $=0;if(y=o,typeof o=="function")Ly(o)&&($=1);else if(typeof o=="string")$=RZ(o,p,X.current)?26:o==="html"||o==="head"||o==="body"?27:5;else e:switch(o){case P:return o=zr(31,p,u,C),o.elementType=P,o.lanes=N,o;case w:return ko(p.children,C,N,u);case S:$=8,C|=24;break;case j:return o=zr(12,p,u,C|2),o.elementType=j,o.lanes=N,o;case T:return o=zr(13,p,u,C),o.elementType=T,o.lanes=N,o;case A:return o=zr(19,p,u,C),o.elementType=A,o.lanes=N,o;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case k:$=10;break e;case _:$=9;break e;case E:$=11;break e;case O:$=14;break e;case I:$=16,y=null;break e}$=29,p=Error(r(130,o===null?"null":typeof o,"")),y=null}return u=zr($,p,u,C),u.elementType=o,u.type=y,u.lanes=N,u}function ko(o,u,p,y){return o=zr(7,o,y,u),o.lanes=p,o}function zy(o,u,p){return o=zr(6,o,null,u),o.lanes=p,o}function MT(o){var u=zr(18,null,null,0);return u.stateNode=o,u}function $y(o,u,p){return u=zr(4,o.children!==null?o.children:[],o.key,u),u.lanes=p,u.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},u}var PT=new WeakMap;function aa(o,u){if(typeof o=="object"&&o!==null){var p=PT.get(o);return p!==void 0?p:(u={value:o,source:u,stack:pe(u)},PT.set(o,u),u)}return{value:o,source:u,stack:pe(u)}}var Gl=[],Vl=0,Th=null,Rc=0,ia=[],sa=0,Ss=null,Wa=1,Ya="";function Ni(o,u){Gl[Vl++]=Rc,Gl[Vl++]=Th,Th=o,Rc=u}function DT(o,u,p){ia[sa++]=Wa,ia[sa++]=Ya,ia[sa++]=Ss,Ss=o;var y=Wa;o=Ya;var C=32-$e(y)-1;y&=~(1<<C),p+=1;var N=32-$e(u)+C;if(30<N){var $=C-C%5;N=(y&(1<<$)-1).toString(32),y>>=$,C-=$,Wa=1<<32-$e(u)+C|p<<C|y,Ya=N+o}else Wa=1<<N|p<<C|y,Ya=o}function qy(o){o.return!==null&&(Ni(o,1),DT(o,1,0))}function By(o){for(;o===Th;)Th=Gl[--Vl],Gl[Vl]=null,Rc=Gl[--Vl],Gl[Vl]=null;for(;o===Ss;)Ss=ia[--sa],ia[sa]=null,Ya=ia[--sa],ia[sa]=null,Wa=ia[--sa],ia[sa]=null}function RT(o,u){ia[sa++]=Wa,ia[sa++]=Ya,ia[sa++]=Ss,Wa=u.id,Ya=u.overflow,Ss=o}var Jn=null,en=null,_t=!1,js=null,oa=!1,Fy=Error(r(519));function ks(o){var u=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ic(aa(u,o)),Fy}function IT(o){var u=o.stateNode,p=o.type,y=o.memoizedProps;switch(u[jn]=o,u[Gn]=y,p){case"dialog":bt("cancel",u),bt("close",u);break;case"iframe":case"object":case"embed":bt("load",u);break;case"video":case"audio":for(p=0;p<ad.length;p++)bt(ad[p],u);break;case"source":bt("error",u);break;case"img":case"image":case"link":bt("error",u),bt("load",u);break;case"details":bt("toggle",u);break;case"input":bt("invalid",u),Il(u,y.value,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name,!0);break;case"select":bt("invalid",u);break;case"textarea":bt("invalid",u),ZA(u,y.value,y.defaultValue,y.children)}p=y.children,typeof p!="string"&&typeof p!="number"&&typeof p!="bigint"||u.textContent===""+p||y.suppressHydrationWarning===!0||JM(u.textContent,p)?(y.popover!=null&&(bt("beforetoggle",u),bt("toggle",u)),y.onScroll!=null&&bt("scroll",u),y.onScrollEnd!=null&&bt("scrollend",u),y.onClick!=null&&(u.onclick=ki),u=!0):u=!1,u||ks(o,!0)}function LT(o){for(Jn=o.return;Jn;)switch(Jn.tag){case 5:case 31:case 13:oa=!1;return;case 27:case 3:oa=!0;return;default:Jn=Jn.return}}function Kl(o){if(o!==Jn)return!1;if(!_t)return LT(o),_t=!0,!1;var u=o.tag,p;if((p=u!==3&&u!==27)&&((p=u===5)&&(p=o.type,p=!(p!=="form"&&p!=="button")||s0(o.type,o.memoizedProps)),p=!p),p&&en&&ks(o),LT(o),u===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));en=lP(o)}else if(u===31){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));en=lP(o)}else u===27?(u=en,zs(o.type)?(o=d0,d0=null,en=o):en=u):en=Jn?ua(o.stateNode.nextSibling):null;return!0}function _o(){en=Jn=null,_t=!1}function Hy(){var o=js;return o!==null&&(Cr===null?Cr=o:Cr.push.apply(Cr,o),js=null),o}function Ic(o){js===null?js=[o]:js.push(o)}var Uy=H(null),Co=null,Ei=null;function _s(o,u,p){U(Uy,u._currentValue),u._currentValue=p}function Ai(o){o._currentValue=Uy.current,K(Uy)}function Gy(o,u,p){for(;o!==null;){var y=o.alternate;if((o.childLanes&u)!==u?(o.childLanes|=u,y!==null&&(y.childLanes|=u)):y!==null&&(y.childLanes&u)!==u&&(y.childLanes|=u),o===p)break;o=o.return}}function Vy(o,u,p,y){var C=o.child;for(C!==null&&(C.return=o);C!==null;){var N=C.dependencies;if(N!==null){var $=C.child;N=N.firstContext;e:for(;N!==null;){var V=N;N=C;for(var te=0;te<u.length;te++)if(V.context===u[te]){N.lanes|=p,V=N.alternate,V!==null&&(V.lanes|=p),Gy(N.return,p,o),y||($=null);break e}N=V.next}}else if(C.tag===18){if($=C.return,$===null)throw Error(r(341));$.lanes|=p,N=$.alternate,N!==null&&(N.lanes|=p),Gy($,p,o),$=null}else $=C.child;if($!==null)$.return=C;else for($=C;$!==null;){if($===o){$=null;break}if(C=$.sibling,C!==null){C.return=$.return,$=C;break}$=$.return}C=$}}function Wl(o,u,p,y){o=null;for(var C=u,N=!1;C!==null;){if(!N){if((C.flags&524288)!==0)N=!0;else if((C.flags&262144)!==0)break}if(C.tag===10){var $=C.alternate;if($===null)throw Error(r(387));if($=$.memoizedProps,$!==null){var V=C.type;Lr(C.pendingProps.value,$.value)||(o!==null?o.push(V):o=[V])}}else if(C===re.current){if($=C.alternate,$===null)throw Error(r(387));$.memoizedState.memoizedState!==C.memoizedState.memoizedState&&(o!==null?o.push(ud):o=[ud])}C=C.return}o!==null&&Vy(u,o,p,y),u.flags|=262144}function Oh(o){for(o=o.firstContext;o!==null;){if(!Lr(o.context._currentValue,o.memoizedValue))return!0;o=o.next}return!1}function No(o){Co=o,Ei=null,o=o.dependencies,o!==null&&(o.firstContext=null)}function er(o){return zT(Co,o)}function Mh(o,u){return Co===null&&No(o),zT(o,u)}function zT(o,u){var p=u._currentValue;if(u={context:u,memoizedValue:p,next:null},Ei===null){if(o===null)throw Error(r(308));Ei=u,o.dependencies={lanes:0,firstContext:u},o.flags|=524288}else Ei=Ei.next=u;return p}var OX=typeof AbortController<"u"?AbortController:function(){var o=[],u=this.signal={aborted:!1,addEventListener:function(p,y){o.push(y)}};this.abort=function(){u.aborted=!0,o.forEach(function(p){return p()})}},MX=e.unstable_scheduleCallback,PX=e.unstable_NormalPriority,Nn={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ky(){return{controller:new OX,data:new Map,refCount:0}}function Lc(o){o.refCount--,o.refCount===0&&MX(PX,function(){o.controller.abort()})}var zc=null,Wy=0,Yl=0,Xl=null;function DX(o,u){if(zc===null){var p=zc=[];Wy=0,Yl=Zx(),Xl={status:"pending",value:void 0,then:function(y){p.push(y)}}}return Wy++,u.then($T,$T),u}function $T(){if(--Wy===0&&zc!==null){Xl!==null&&(Xl.status="fulfilled");var o=zc;zc=null,Yl=0,Xl=null;for(var u=0;u<o.length;u++)(0,o[u])()}}function RX(o,u){var p=[],y={status:"pending",value:null,reason:null,then:function(C){p.push(C)}};return o.then(function(){y.status="fulfilled",y.value=u;for(var C=0;C<p.length;C++)(0,p[C])(u)},function(C){for(y.status="rejected",y.reason=C,C=0;C<p.length;C++)(0,p[C])(void 0)}),y}var qT=L.S;L.S=function(o,u){jM=Fe(),typeof u=="object"&&u!==null&&typeof u.then=="function"&&DX(o,u),qT!==null&&qT(o,u)};var Eo=H(null);function Yy(){var o=Eo.current;return o!==null?o:Kt.pooledCache}function Ph(o,u){u===null?U(Eo,Eo.current):U(Eo,u.pool)}function BT(){var o=Yy();return o===null?null:{parent:Nn._currentValue,pool:o}}var Zl=Error(r(460)),Xy=Error(r(474)),Dh=Error(r(542)),Rh={then:function(){}};function FT(o){return o=o.status,o==="fulfilled"||o==="rejected"}function HT(o,u,p){switch(p=o[p],p===void 0?o.push(u):p!==u&&(u.then(ki,ki),u=p),u.status){case"fulfilled":return u.value;case"rejected":throw o=u.reason,GT(o),o;default:if(typeof u.status=="string")u.then(ki,ki);else{if(o=Kt,o!==null&&100<o.shellSuspendCounter)throw Error(r(482));o=u,o.status="pending",o.then(function(y){if(u.status==="pending"){var C=u;C.status="fulfilled",C.value=y}},function(y){if(u.status==="pending"){var C=u;C.status="rejected",C.reason=y}})}switch(u.status){case"fulfilled":return u.value;case"rejected":throw o=u.reason,GT(o),o}throw To=u,Zl}}function Ao(o){try{var u=o._init;return u(o._payload)}catch(p){throw p!==null&&typeof p=="object"&&typeof p.then=="function"?(To=p,Zl):p}}var To=null;function UT(){if(To===null)throw Error(r(459));var o=To;return To=null,o}function GT(o){if(o===Zl||o===Dh)throw Error(r(483))}var Ql=null,$c=0;function Ih(o){var u=$c;return $c+=1,Ql===null&&(Ql=[]),HT(Ql,o,u)}function qc(o,u){u=u.props.ref,o.ref=u!==void 0?u:null}function Lh(o,u){throw u.$$typeof===g?Error(r(525)):(o=Object.prototype.toString.call(u),Error(r(31,o==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":o)))}function VT(o){function u(de,ie){if(o){var ge=de.deletions;ge===null?(de.deletions=[ie],de.flags|=16):ge.push(ie)}}function p(de,ie){if(!o)return null;for(;ie!==null;)u(de,ie),ie=ie.sibling;return null}function y(de){for(var ie=new Map;de!==null;)de.key!==null?ie.set(de.key,de):ie.set(de.index,de),de=de.sibling;return ie}function C(de,ie){return de=Ci(de,ie),de.index=0,de.sibling=null,de}function N(de,ie,ge){return de.index=ge,o?(ge=de.alternate,ge!==null?(ge=ge.index,ge<ie?(de.flags|=67108866,ie):ge):(de.flags|=67108866,ie)):(de.flags|=1048576,ie)}function $(de){return o&&de.alternate===null&&(de.flags|=67108866),de}function V(de,ie,ge,Ee){return ie===null||ie.tag!==6?(ie=zy(ge,de.mode,Ee),ie.return=de,ie):(ie=C(ie,ge),ie.return=de,ie)}function te(de,ie,ge,Ee){var tt=ge.type;return tt===w?_e(de,ie,ge.props.children,Ee,ge.key):ie!==null&&(ie.elementType===tt||typeof tt=="object"&&tt!==null&&tt.$$typeof===I&&Ao(tt)===ie.type)?(ie=C(ie,ge.props),qc(ie,ge),ie.return=de,ie):(ie=Ah(ge.type,ge.key,ge.props,null,de.mode,Ee),qc(ie,ge),ie.return=de,ie)}function ve(de,ie,ge,Ee){return ie===null||ie.tag!==4||ie.stateNode.containerInfo!==ge.containerInfo||ie.stateNode.implementation!==ge.implementation?(ie=$y(ge,de.mode,Ee),ie.return=de,ie):(ie=C(ie,ge.children||[]),ie.return=de,ie)}function _e(de,ie,ge,Ee,tt){return ie===null||ie.tag!==7?(ie=ko(ge,de.mode,Ee,tt),ie.return=de,ie):(ie=C(ie,ge),ie.return=de,ie)}function Ae(de,ie,ge){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return ie=zy(""+ie,de.mode,ge),ie.return=de,ie;if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case v:return ge=Ah(ie.type,ie.key,ie.props,null,de.mode,ge),qc(ge,ie),ge.return=de,ge;case b:return ie=$y(ie,de.mode,ge),ie.return=de,ie;case I:return ie=Ao(ie),Ae(de,ie,ge)}if(M(ie)||z(ie))return ie=ko(ie,de.mode,ge,null),ie.return=de,ie;if(typeof ie.then=="function")return Ae(de,Ih(ie),ge);if(ie.$$typeof===k)return Ae(de,Mh(de,ie),ge);Lh(de,ie)}return null}function xe(de,ie,ge,Ee){var tt=ie!==null?ie.key:null;if(typeof ge=="string"&&ge!==""||typeof ge=="number"||typeof ge=="bigint")return tt!==null?null:V(de,ie,""+ge,Ee);if(typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case v:return ge.key===tt?te(de,ie,ge,Ee):null;case b:return ge.key===tt?ve(de,ie,ge,Ee):null;case I:return ge=Ao(ge),xe(de,ie,ge,Ee)}if(M(ge)||z(ge))return tt!==null?null:_e(de,ie,ge,Ee,null);if(typeof ge.then=="function")return xe(de,ie,Ih(ge),Ee);if(ge.$$typeof===k)return xe(de,ie,Mh(de,ge),Ee);Lh(de,ge)}return null}function ke(de,ie,ge,Ee,tt){if(typeof Ee=="string"&&Ee!==""||typeof Ee=="number"||typeof Ee=="bigint")return de=de.get(ge)||null,V(ie,de,""+Ee,tt);if(typeof Ee=="object"&&Ee!==null){switch(Ee.$$typeof){case v:return de=de.get(Ee.key===null?ge:Ee.key)||null,te(ie,de,Ee,tt);case b:return de=de.get(Ee.key===null?ge:Ee.key)||null,ve(ie,de,Ee,tt);case I:return Ee=Ao(Ee),ke(de,ie,ge,Ee,tt)}if(M(Ee)||z(Ee))return de=de.get(ge)||null,_e(ie,de,Ee,tt,null);if(typeof Ee.then=="function")return ke(de,ie,ge,Ih(Ee),tt);if(Ee.$$typeof===k)return ke(de,ie,ge,Mh(ie,Ee),tt);Lh(ie,Ee)}return null}function Ve(de,ie,ge,Ee){for(var tt=null,Mt=null,Ye=ie,mt=ie=0,kt=null;Ye!==null&&mt<ge.length;mt++){Ye.index>mt?(kt=Ye,Ye=null):kt=Ye.sibling;var Pt=xe(de,Ye,ge[mt],Ee);if(Pt===null){Ye===null&&(Ye=kt);break}o&&Ye&&Pt.alternate===null&&u(de,Ye),ie=N(Pt,ie,mt),Mt===null?tt=Pt:Mt.sibling=Pt,Mt=Pt,Ye=kt}if(mt===ge.length)return p(de,Ye),_t&&Ni(de,mt),tt;if(Ye===null){for(;mt<ge.length;mt++)Ye=Ae(de,ge[mt],Ee),Ye!==null&&(ie=N(Ye,ie,mt),Mt===null?tt=Ye:Mt.sibling=Ye,Mt=Ye);return _t&&Ni(de,mt),tt}for(Ye=y(Ye);mt<ge.length;mt++)kt=ke(Ye,de,mt,ge[mt],Ee),kt!==null&&(o&&kt.alternate!==null&&Ye.delete(kt.key===null?mt:kt.key),ie=N(kt,ie,mt),Mt===null?tt=kt:Mt.sibling=kt,Mt=kt);return o&&Ye.forEach(function(Hs){return u(de,Hs)}),_t&&Ni(de,mt),tt}function it(de,ie,ge,Ee){if(ge==null)throw Error(r(151));for(var tt=null,Mt=null,Ye=ie,mt=ie=0,kt=null,Pt=ge.next();Ye!==null&&!Pt.done;mt++,Pt=ge.next()){Ye.index>mt?(kt=Ye,Ye=null):kt=Ye.sibling;var Hs=xe(de,Ye,Pt.value,Ee);if(Hs===null){Ye===null&&(Ye=kt);break}o&&Ye&&Hs.alternate===null&&u(de,Ye),ie=N(Hs,ie,mt),Mt===null?tt=Hs:Mt.sibling=Hs,Mt=Hs,Ye=kt}if(Pt.done)return p(de,Ye),_t&&Ni(de,mt),tt;if(Ye===null){for(;!Pt.done;mt++,Pt=ge.next())Pt=Ae(de,Pt.value,Ee),Pt!==null&&(ie=N(Pt,ie,mt),Mt===null?tt=Pt:Mt.sibling=Pt,Mt=Pt);return _t&&Ni(de,mt),tt}for(Ye=y(Ye);!Pt.done;mt++,Pt=ge.next())Pt=ke(Ye,de,mt,Pt.value,Ee),Pt!==null&&(o&&Pt.alternate!==null&&Ye.delete(Pt.key===null?mt:Pt.key),ie=N(Pt,ie,mt),Mt===null?tt=Pt:Mt.sibling=Pt,Mt=Pt);return o&&Ye.forEach(function(VZ){return u(de,VZ)}),_t&&Ni(de,mt),tt}function Ut(de,ie,ge,Ee){if(typeof ge=="object"&&ge!==null&&ge.type===w&&ge.key===null&&(ge=ge.props.children),typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case v:e:{for(var tt=ge.key;ie!==null;){if(ie.key===tt){if(tt=ge.type,tt===w){if(ie.tag===7){p(de,ie.sibling),Ee=C(ie,ge.props.children),Ee.return=de,de=Ee;break e}}else if(ie.elementType===tt||typeof tt=="object"&&tt!==null&&tt.$$typeof===I&&Ao(tt)===ie.type){p(de,ie.sibling),Ee=C(ie,ge.props),qc(Ee,ge),Ee.return=de,de=Ee;break e}p(de,ie);break}else u(de,ie);ie=ie.sibling}ge.type===w?(Ee=ko(ge.props.children,de.mode,Ee,ge.key),Ee.return=de,de=Ee):(Ee=Ah(ge.type,ge.key,ge.props,null,de.mode,Ee),qc(Ee,ge),Ee.return=de,de=Ee)}return $(de);case b:e:{for(tt=ge.key;ie!==null;){if(ie.key===tt)if(ie.tag===4&&ie.stateNode.containerInfo===ge.containerInfo&&ie.stateNode.implementation===ge.implementation){p(de,ie.sibling),Ee=C(ie,ge.children||[]),Ee.return=de,de=Ee;break e}else{p(de,ie);break}else u(de,ie);ie=ie.sibling}Ee=$y(ge,de.mode,Ee),Ee.return=de,de=Ee}return $(de);case I:return ge=Ao(ge),Ut(de,ie,ge,Ee)}if(M(ge))return Ve(de,ie,ge,Ee);if(z(ge)){if(tt=z(ge),typeof tt!="function")throw Error(r(150));return ge=tt.call(ge),it(de,ie,ge,Ee)}if(typeof ge.then=="function")return Ut(de,ie,Ih(ge),Ee);if(ge.$$typeof===k)return Ut(de,ie,Mh(de,ge),Ee);Lh(de,ge)}return typeof ge=="string"&&ge!==""||typeof ge=="number"||typeof ge=="bigint"?(ge=""+ge,ie!==null&&ie.tag===6?(p(de,ie.sibling),Ee=C(ie,ge),Ee.return=de,de=Ee):(p(de,ie),Ee=zy(ge,de.mode,Ee),Ee.return=de,de=Ee),$(de)):p(de,ie)}return function(de,ie,ge,Ee){try{$c=0;var tt=Ut(de,ie,ge,Ee);return Ql=null,tt}catch(Ye){if(Ye===Zl||Ye===Dh)throw Ye;var Mt=zr(29,Ye,null,de.mode);return Mt.lanes=Ee,Mt.return=de,Mt}finally{}}}var Oo=VT(!0),KT=VT(!1),Cs=!1;function Zy(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Qy(o,u){o=o.updateQueue,u.updateQueue===o&&(u.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,callbacks:null})}function Ns(o){return{lane:o,tag:0,payload:null,callback:null,next:null}}function Es(o,u,p){var y=o.updateQueue;if(y===null)return null;if(y=y.shared,(Lt&2)!==0){var C=y.pending;return C===null?u.next=u:(u.next=C.next,C.next=u),y.pending=u,u=Eh(o),TT(o,null,p),u}return Nh(o,y,u,p),Eh(o)}function Bc(o,u,p){if(u=u.updateQueue,u!==null&&(u=u.shared,(p&4194048)!==0)){var y=u.lanes;y&=o.pendingLanes,p|=y,u.lanes=p,ir(o,p)}}function Jy(o,u){var p=o.updateQueue,y=o.alternate;if(y!==null&&(y=y.updateQueue,p===y)){var C=null,N=null;if(p=p.firstBaseUpdate,p!==null){do{var $={lane:p.lane,tag:p.tag,payload:p.payload,callback:null,next:null};N===null?C=N=$:N=N.next=$,p=p.next}while(p!==null);N===null?C=N=u:N=N.next=u}else C=N=u;p={baseState:y.baseState,firstBaseUpdate:C,lastBaseUpdate:N,shared:y.shared,callbacks:y.callbacks},o.updateQueue=p;return}o=p.lastBaseUpdate,o===null?p.firstBaseUpdate=u:o.next=u,p.lastBaseUpdate=u}var ex=!1;function Fc(){if(ex){var o=Xl;if(o!==null)throw o}}function Hc(o,u,p,y){ex=!1;var C=o.updateQueue;Cs=!1;var N=C.firstBaseUpdate,$=C.lastBaseUpdate,V=C.shared.pending;if(V!==null){C.shared.pending=null;var te=V,ve=te.next;te.next=null,$===null?N=ve:$.next=ve,$=te;var _e=o.alternate;_e!==null&&(_e=_e.updateQueue,V=_e.lastBaseUpdate,V!==$&&(V===null?_e.firstBaseUpdate=ve:V.next=ve,_e.lastBaseUpdate=te))}if(N!==null){var Ae=C.baseState;$=0,_e=ve=te=null,V=N;do{var xe=V.lane&-536870913,ke=xe!==V.lane;if(ke?(jt&xe)===xe:(y&xe)===xe){xe!==0&&xe===Yl&&(ex=!0),_e!==null&&(_e=_e.next={lane:0,tag:V.tag,payload:V.payload,callback:null,next:null});e:{var Ve=o,it=V;xe=u;var Ut=p;switch(it.tag){case 1:if(Ve=it.payload,typeof Ve=="function"){Ae=Ve.call(Ut,Ae,xe);break e}Ae=Ve;break e;case 3:Ve.flags=Ve.flags&-65537|128;case 0:if(Ve=it.payload,xe=typeof Ve=="function"?Ve.call(Ut,Ae,xe):Ve,xe==null)break e;Ae=m({},Ae,xe);break e;case 2:Cs=!0}}xe=V.callback,xe!==null&&(o.flags|=64,ke&&(o.flags|=8192),ke=C.callbacks,ke===null?C.callbacks=[xe]:ke.push(xe))}else ke={lane:xe,tag:V.tag,payload:V.payload,callback:V.callback,next:null},_e===null?(ve=_e=ke,te=Ae):_e=_e.next=ke,$|=xe;if(V=V.next,V===null){if(V=C.shared.pending,V===null)break;ke=V,V=ke.next,ke.next=null,C.lastBaseUpdate=ke,C.shared.pending=null}}while(!0);_e===null&&(te=Ae),C.baseState=te,C.firstBaseUpdate=ve,C.lastBaseUpdate=_e,N===null&&(C.shared.lanes=0),Ps|=$,o.lanes=$,o.memoizedState=Ae}}function WT(o,u){if(typeof o!="function")throw Error(r(191,o));o.call(u)}function YT(o,u){var p=o.callbacks;if(p!==null)for(o.callbacks=null,o=0;o<p.length;o++)WT(p[o],u)}var Jl=H(null),zh=H(0);function XT(o,u){o=zi,U(zh,o),U(Jl,u),zi=o|u.baseLanes}function tx(){U(zh,zi),U(Jl,Jl.current)}function nx(){zi=zh.current,K(Jl),K(zh)}var $r=H(null),la=null;function As(o){var u=o.alternate;U(kn,kn.current&1),U($r,o),la===null&&(u===null||Jl.current!==null||u.memoizedState!==null)&&(la=o)}function rx(o){U(kn,kn.current),U($r,o),la===null&&(la=o)}function ZT(o){o.tag===22?(U(kn,kn.current),U($r,o),la===null&&(la=o)):Ts()}function Ts(){U(kn,kn.current),U($r,$r.current)}function qr(o){K($r),la===o&&(la=null),K(kn)}var kn=H(0);function $h(o){for(var u=o;u!==null;){if(u.tag===13){var p=u.memoizedState;if(p!==null&&(p=p.dehydrated,p===null||u0(p)||c0(p)))return u}else if(u.tag===19&&(u.memoizedProps.revealOrder==="forwards"||u.memoizedProps.revealOrder==="backwards"||u.memoizedProps.revealOrder==="unstable_legacy-backwards"||u.memoizedProps.revealOrder==="together")){if((u.flags&128)!==0)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===o)break;for(;u.sibling===null;){if(u.return===null||u.return===o)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}var Ti=0,dt=null,Ft=null,En=null,qh=!1,eu=!1,Mo=!1,Bh=0,Uc=0,tu=null,IX=0;function yn(){throw Error(r(321))}function ax(o,u){if(u===null)return!1;for(var p=0;p<u.length&&p<o.length;p++)if(!Lr(o[p],u[p]))return!1;return!0}function ix(o,u,p,y,C,N){return Ti=N,dt=u,u.memoizedState=null,u.updateQueue=null,u.lanes=0,L.H=o===null||o.memoizedState===null?DO:bx,Mo=!1,N=p(y,C),Mo=!1,eu&&(N=JT(u,p,y,C)),QT(o),N}function QT(o){L.H=Kc;var u=Ft!==null&&Ft.next!==null;if(Ti=0,En=Ft=dt=null,qh=!1,Uc=0,tu=null,u)throw Error(r(300));o===null||An||(o=o.dependencies,o!==null&&Oh(o)&&(An=!0))}function JT(o,u,p,y){dt=o;var C=0;do{if(eu&&(tu=null),Uc=0,eu=!1,25<=C)throw Error(r(301));if(C+=1,En=Ft=null,o.updateQueue!=null){var N=o.updateQueue;N.lastEffect=null,N.events=null,N.stores=null,N.memoCache!=null&&(N.memoCache.index=0)}L.H=RO,N=u(p,y)}while(eu);return N}function LX(){var o=L.H,u=o.useState()[0];return u=typeof u.then=="function"?Gc(u):u,o=o.useState()[0],(Ft!==null?Ft.memoizedState:null)!==o&&(dt.flags|=1024),u}function sx(){var o=Bh!==0;return Bh=0,o}function ox(o,u,p){u.updateQueue=o.updateQueue,u.flags&=-2053,o.lanes&=~p}function lx(o){if(qh){for(o=o.memoizedState;o!==null;){var u=o.queue;u!==null&&(u.pending=null),o=o.next}qh=!1}Ti=0,En=Ft=dt=null,eu=!1,Uc=Bh=0,tu=null}function pr(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return En===null?dt.memoizedState=En=o:En=En.next=o,En}function _n(){if(Ft===null){var o=dt.alternate;o=o!==null?o.memoizedState:null}else o=Ft.next;var u=En===null?dt.memoizedState:En.next;if(u!==null)En=u,Ft=o;else{if(o===null)throw dt.alternate===null?Error(r(467)):Error(r(310));Ft=o,o={memoizedState:Ft.memoizedState,baseState:Ft.baseState,baseQueue:Ft.baseQueue,queue:Ft.queue,next:null},En===null?dt.memoizedState=En=o:En=En.next=o}return En}function Fh(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Gc(o){var u=Uc;return Uc+=1,tu===null&&(tu=[]),o=HT(tu,o,u),u=dt,(En===null?u.memoizedState:En.next)===null&&(u=u.alternate,L.H=u===null||u.memoizedState===null?DO:bx),o}function Hh(o){if(o!==null&&typeof o=="object"){if(typeof o.then=="function")return Gc(o);if(o.$$typeof===k)return er(o)}throw Error(r(438,String(o)))}function ux(o){var u=null,p=dt.updateQueue;if(p!==null&&(u=p.memoCache),u==null){var y=dt.alternate;y!==null&&(y=y.updateQueue,y!==null&&(y=y.memoCache,y!=null&&(u={data:y.data.map(function(C){return C.slice()}),index:0})))}if(u==null&&(u={data:[],index:0}),p===null&&(p=Fh(),dt.updateQueue=p),p.memoCache=u,p=u.data[u.index],p===void 0)for(p=u.data[u.index]=Array(o),y=0;y<o;y++)p[y]=D;return u.index++,p}function Oi(o,u){return typeof u=="function"?u(o):u}function Uh(o){var u=_n();return cx(u,Ft,o)}function cx(o,u,p){var y=o.queue;if(y===null)throw Error(r(311));y.lastRenderedReducer=p;var C=o.baseQueue,N=y.pending;if(N!==null){if(C!==null){var $=C.next;C.next=N.next,N.next=$}u.baseQueue=C=N,y.pending=null}if(N=o.baseState,C===null)o.memoizedState=N;else{u=C.next;var V=$=null,te=null,ve=u,_e=!1;do{var Ae=ve.lane&-536870913;if(Ae!==ve.lane?(jt&Ae)===Ae:(Ti&Ae)===Ae){var xe=ve.revertLane;if(xe===0)te!==null&&(te=te.next={lane:0,revertLane:0,gesture:null,action:ve.action,hasEagerState:ve.hasEagerState,eagerState:ve.eagerState,next:null}),Ae===Yl&&(_e=!0);else if((Ti&xe)===xe){ve=ve.next,xe===Yl&&(_e=!0);continue}else Ae={lane:0,revertLane:ve.revertLane,gesture:null,action:ve.action,hasEagerState:ve.hasEagerState,eagerState:ve.eagerState,next:null},te===null?(V=te=Ae,$=N):te=te.next=Ae,dt.lanes|=xe,Ps|=xe;Ae=ve.action,Mo&&p(N,Ae),N=ve.hasEagerState?ve.eagerState:p(N,Ae)}else xe={lane:Ae,revertLane:ve.revertLane,gesture:ve.gesture,action:ve.action,hasEagerState:ve.hasEagerState,eagerState:ve.eagerState,next:null},te===null?(V=te=xe,$=N):te=te.next=xe,dt.lanes|=Ae,Ps|=Ae;ve=ve.next}while(ve!==null&&ve!==u);if(te===null?$=N:te.next=V,!Lr(N,o.memoizedState)&&(An=!0,_e&&(p=Xl,p!==null)))throw p;o.memoizedState=N,o.baseState=$,o.baseQueue=te,y.lastRenderedState=N}return C===null&&(y.lanes=0),[o.memoizedState,y.dispatch]}function dx(o){var u=_n(),p=u.queue;if(p===null)throw Error(r(311));p.lastRenderedReducer=o;var y=p.dispatch,C=p.pending,N=u.memoizedState;if(C!==null){p.pending=null;var $=C=C.next;do N=o(N,$.action),$=$.next;while($!==C);Lr(N,u.memoizedState)||(An=!0),u.memoizedState=N,u.baseQueue===null&&(u.baseState=N),p.lastRenderedState=N}return[N,y]}function eO(o,u,p){var y=dt,C=_n(),N=_t;if(N){if(p===void 0)throw Error(r(407));p=p()}else p=u();var $=!Lr((Ft||C).memoizedState,p);if($&&(C.memoizedState=p,An=!0),C=C.queue,mx(rO.bind(null,y,C,o),[o]),C.getSnapshot!==u||$||En!==null&&En.memoizedState.tag&1){if(y.flags|=2048,nu(9,{destroy:void 0},nO.bind(null,y,C,p,u),null),Kt===null)throw Error(r(349));N||(Ti&127)!==0||tO(y,u,p)}return p}function tO(o,u,p){o.flags|=16384,o={getSnapshot:u,value:p},u=dt.updateQueue,u===null?(u=Fh(),dt.updateQueue=u,u.stores=[o]):(p=u.stores,p===null?u.stores=[o]:p.push(o))}function nO(o,u,p,y){u.value=p,u.getSnapshot=y,aO(u)&&iO(o)}function rO(o,u,p){return p(function(){aO(u)&&iO(o)})}function aO(o){var u=o.getSnapshot;o=o.value;try{var p=u();return!Lr(o,p)}catch{return!0}}function iO(o){var u=jo(o,2);u!==null&&Nr(u,o,2)}function fx(o){var u=pr();if(typeof o=="function"){var p=o;if(o=p(),Mo){Me(!0);try{p()}finally{Me(!1)}}}return u.memoizedState=u.baseState=o,u.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oi,lastRenderedState:o},u}function sO(o,u,p,y){return o.baseState=p,cx(o,Ft,typeof y=="function"?y:Oi)}function zX(o,u,p,y,C){if(Kh(o))throw Error(r(485));if(o=u.action,o!==null){var N={payload:C,action:o,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function($){N.listeners.push($)}};L.T!==null?p(!0):N.isTransition=!1,y(N),p=u.pending,p===null?(N.next=u.pending=N,oO(u,N)):(N.next=p.next,u.pending=p.next=N)}}function oO(o,u){var p=u.action,y=u.payload,C=o.state;if(u.isTransition){var N=L.T,$={};L.T=$;try{var V=p(C,y),te=L.S;te!==null&&te($,V),lO(o,u,V)}catch(ve){hx(o,u,ve)}finally{N!==null&&$.types!==null&&(N.types=$.types),L.T=N}}else try{N=p(C,y),lO(o,u,N)}catch(ve){hx(o,u,ve)}}function lO(o,u,p){p!==null&&typeof p=="object"&&typeof p.then=="function"?p.then(function(y){uO(o,u,y)},function(y){return hx(o,u,y)}):uO(o,u,p)}function uO(o,u,p){u.status="fulfilled",u.value=p,cO(u),o.state=p,u=o.pending,u!==null&&(p=u.next,p===u?o.pending=null:(p=p.next,u.next=p,oO(o,p)))}function hx(o,u,p){var y=o.pending;if(o.pending=null,y!==null){y=y.next;do u.status="rejected",u.reason=p,cO(u),u=u.next;while(u!==y)}o.action=null}function cO(o){o=o.listeners;for(var u=0;u<o.length;u++)(0,o[u])()}function dO(o,u){return u}function fO(o,u){if(_t){var p=Kt.formState;if(p!==null){e:{var y=dt;if(_t){if(en){t:{for(var C=en,N=oa;C.nodeType!==8;){if(!N){C=null;break t}if(C=ua(C.nextSibling),C===null){C=null;break t}}N=C.data,C=N==="F!"||N==="F"?C:null}if(C){en=ua(C.nextSibling),y=C.data==="F!";break e}}ks(y)}y=!1}y&&(u=p[0])}}return p=pr(),p.memoizedState=p.baseState=u,y={pending:null,lanes:0,dispatch:null,lastRenderedReducer:dO,lastRenderedState:u},p.queue=y,p=OO.bind(null,dt,y),y.dispatch=p,y=fx(!1),N=xx.bind(null,dt,!1,y.queue),y=pr(),C={state:u,dispatch:null,action:o,pending:null},y.queue=C,p=zX.bind(null,dt,C,N,p),C.dispatch=p,y.memoizedState=o,[u,p,!1]}function hO(o){var u=_n();return mO(u,Ft,o)}function mO(o,u,p){if(u=cx(o,u,dO)[0],o=Uh(Oi)[0],typeof u=="object"&&u!==null&&typeof u.then=="function")try{var y=Gc(u)}catch($){throw $===Zl?Dh:$}else y=u;u=_n();var C=u.queue,N=C.dispatch;return p!==u.memoizedState&&(dt.flags|=2048,nu(9,{destroy:void 0},$X.bind(null,C,p),null)),[y,N,o]}function $X(o,u){o.action=u}function pO(o){var u=_n(),p=Ft;if(p!==null)return mO(u,p,o);_n(),u=u.memoizedState,p=_n();var y=p.queue.dispatch;return p.memoizedState=o,[u,y,!1]}function nu(o,u,p,y){return o={tag:o,create:p,deps:y,inst:u,next:null},u=dt.updateQueue,u===null&&(u=Fh(),dt.updateQueue=u),p=u.lastEffect,p===null?u.lastEffect=o.next=o:(y=p.next,p.next=o,o.next=y,u.lastEffect=o),o}function gO(){return _n().memoizedState}function Gh(o,u,p,y){var C=pr();dt.flags|=o,C.memoizedState=nu(1|u,{destroy:void 0},p,y===void 0?null:y)}function Vh(o,u,p,y){var C=_n();y=y===void 0?null:y;var N=C.memoizedState.inst;Ft!==null&&y!==null&&ax(y,Ft.memoizedState.deps)?C.memoizedState=nu(u,N,p,y):(dt.flags|=o,C.memoizedState=nu(1|u,N,p,y))}function vO(o,u){Gh(8390656,8,o,u)}function mx(o,u){Vh(2048,8,o,u)}function qX(o){dt.flags|=4;var u=dt.updateQueue;if(u===null)u=Fh(),dt.updateQueue=u,u.events=[o];else{var p=u.events;p===null?u.events=[o]:p.push(o)}}function yO(o){var u=_n().memoizedState;return qX({ref:u,nextImpl:o}),function(){if((Lt&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}function xO(o,u){return Vh(4,2,o,u)}function bO(o,u){return Vh(4,4,o,u)}function wO(o,u){if(typeof u=="function"){o=o();var p=u(o);return function(){typeof p=="function"?p():u(null)}}if(u!=null)return o=o(),u.current=o,function(){u.current=null}}function SO(o,u,p){p=p!=null?p.concat([o]):null,Vh(4,4,wO.bind(null,u,o),p)}function px(){}function jO(o,u){var p=_n();u=u===void 0?null:u;var y=p.memoizedState;return u!==null&&ax(u,y[1])?y[0]:(p.memoizedState=[o,u],o)}function kO(o,u){var p=_n();u=u===void 0?null:u;var y=p.memoizedState;if(u!==null&&ax(u,y[1]))return y[0];if(y=o(),Mo){Me(!0);try{o()}finally{Me(!1)}}return p.memoizedState=[y,u],y}function gx(o,u,p){return p===void 0||(Ti&1073741824)!==0&&(jt&261930)===0?o.memoizedState=u:(o.memoizedState=p,o=_M(),dt.lanes|=o,Ps|=o,p)}function _O(o,u,p,y){return Lr(p,u)?p:Jl.current!==null?(o=gx(o,p,y),Lr(o,u)||(An=!0),o):(Ti&42)===0||(Ti&1073741824)!==0&&(jt&261930)===0?(An=!0,o.memoizedState=p):(o=_M(),dt.lanes|=o,Ps|=o,u)}function CO(o,u,p,y,C){var N=G.p;G.p=N!==0&&8>N?N:8;var $=L.T,V={};L.T=V,xx(o,!1,u,p);try{var te=C(),ve=L.S;if(ve!==null&&ve(V,te),te!==null&&typeof te=="object"&&typeof te.then=="function"){var _e=RX(te,y);Vc(o,u,_e,Hr(o))}else Vc(o,u,y,Hr(o))}catch(Ae){Vc(o,u,{then:function(){},status:"rejected",reason:Ae},Hr())}finally{G.p=N,$!==null&&V.types!==null&&($.types=V.types),L.T=$}}function BX(){}function vx(o,u,p,y){if(o.tag!==5)throw Error(r(476));var C=NO(o).queue;CO(o,C,u,W,p===null?BX:function(){return EO(o),p(y)})}function NO(o){var u=o.memoizedState;if(u!==null)return u;u={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oi,lastRenderedState:W},next:null};var p={};return u.next={memoizedState:p,baseState:p,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oi,lastRenderedState:p},next:null},o.memoizedState=u,o=o.alternate,o!==null&&(o.memoizedState=u),u}function EO(o){var u=NO(o);u.next===null&&(u=o.alternate.memoizedState),Vc(o,u.next.queue,{},Hr())}function yx(){return er(ud)}function AO(){return _n().memoizedState}function TO(){return _n().memoizedState}function FX(o){for(var u=o.return;u!==null;){switch(u.tag){case 24:case 3:var p=Hr();o=Ns(p);var y=Es(u,o,p);y!==null&&(Nr(y,u,p),Bc(y,u,p)),u={cache:Ky()},o.payload=u;return}u=u.return}}function HX(o,u,p){var y=Hr();p={lane:y,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},Kh(o)?MO(u,p):(p=Iy(o,u,p,y),p!==null&&(Nr(p,o,y),PO(p,u,y)))}function OO(o,u,p){var y=Hr();Vc(o,u,p,y)}function Vc(o,u,p,y){var C={lane:y,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null};if(Kh(o))MO(u,C);else{var N=o.alternate;if(o.lanes===0&&(N===null||N.lanes===0)&&(N=u.lastRenderedReducer,N!==null))try{var $=u.lastRenderedState,V=N($,p);if(C.hasEagerState=!0,C.eagerState=V,Lr(V,$))return Nh(o,u,C,0),Kt===null&&Ch(),!1}catch{}finally{}if(p=Iy(o,u,C,y),p!==null)return Nr(p,o,y),PO(p,u,y),!0}return!1}function xx(o,u,p,y){if(y={lane:2,revertLane:Zx(),gesture:null,action:y,hasEagerState:!1,eagerState:null,next:null},Kh(o)){if(u)throw Error(r(479))}else u=Iy(o,p,y,2),u!==null&&Nr(u,o,2)}function Kh(o){var u=o.alternate;return o===dt||u!==null&&u===dt}function MO(o,u){eu=qh=!0;var p=o.pending;p===null?u.next=u:(u.next=p.next,p.next=u),o.pending=u}function PO(o,u,p){if((p&4194048)!==0){var y=u.lanes;y&=o.pendingLanes,p|=y,u.lanes=p,ir(o,p)}}var Kc={readContext:er,use:Hh,useCallback:yn,useContext:yn,useEffect:yn,useImperativeHandle:yn,useLayoutEffect:yn,useInsertionEffect:yn,useMemo:yn,useReducer:yn,useRef:yn,useState:yn,useDebugValue:yn,useDeferredValue:yn,useTransition:yn,useSyncExternalStore:yn,useId:yn,useHostTransitionStatus:yn,useFormState:yn,useActionState:yn,useOptimistic:yn,useMemoCache:yn,useCacheRefresh:yn};Kc.useEffectEvent=yn;var DO={readContext:er,use:Hh,useCallback:function(o,u){return pr().memoizedState=[o,u===void 0?null:u],o},useContext:er,useEffect:vO,useImperativeHandle:function(o,u,p){p=p!=null?p.concat([o]):null,Gh(4194308,4,wO.bind(null,u,o),p)},useLayoutEffect:function(o,u){return Gh(4194308,4,o,u)},useInsertionEffect:function(o,u){Gh(4,2,o,u)},useMemo:function(o,u){var p=pr();u=u===void 0?null:u;var y=o();if(Mo){Me(!0);try{o()}finally{Me(!1)}}return p.memoizedState=[y,u],y},useReducer:function(o,u,p){var y=pr();if(p!==void 0){var C=p(u);if(Mo){Me(!0);try{p(u)}finally{Me(!1)}}}else C=u;return y.memoizedState=y.baseState=C,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:C},y.queue=o,o=o.dispatch=HX.bind(null,dt,o),[y.memoizedState,o]},useRef:function(o){var u=pr();return o={current:o},u.memoizedState=o},useState:function(o){o=fx(o);var u=o.queue,p=OO.bind(null,dt,u);return u.dispatch=p,[o.memoizedState,p]},useDebugValue:px,useDeferredValue:function(o,u){var p=pr();return gx(p,o,u)},useTransition:function(){var o=fx(!1);return o=CO.bind(null,dt,o.queue,!0,!1),pr().memoizedState=o,[!1,o]},useSyncExternalStore:function(o,u,p){var y=dt,C=pr();if(_t){if(p===void 0)throw Error(r(407));p=p()}else{if(p=u(),Kt===null)throw Error(r(349));(jt&127)!==0||tO(y,u,p)}C.memoizedState=p;var N={value:p,getSnapshot:u};return C.queue=N,vO(rO.bind(null,y,N,o),[o]),y.flags|=2048,nu(9,{destroy:void 0},nO.bind(null,y,N,p,u),null),p},useId:function(){var o=pr(),u=Kt.identifierPrefix;if(_t){var p=Ya,y=Wa;p=(y&~(1<<32-$e(y)-1)).toString(32)+p,u="_"+u+"R_"+p,p=Bh++,0<p&&(u+="H"+p.toString(32)),u+="_"}else p=IX++,u="_"+u+"r_"+p.toString(32)+"_";return o.memoizedState=u},useHostTransitionStatus:yx,useFormState:fO,useActionState:fO,useOptimistic:function(o){var u=pr();u.memoizedState=u.baseState=o;var p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return u.queue=p,u=xx.bind(null,dt,!0,p),p.dispatch=u,[o,u]},useMemoCache:ux,useCacheRefresh:function(){return pr().memoizedState=FX.bind(null,dt)},useEffectEvent:function(o){var u=pr(),p={impl:o};return u.memoizedState=p,function(){if((Lt&2)!==0)throw Error(r(440));return p.impl.apply(void 0,arguments)}}},bx={readContext:er,use:Hh,useCallback:jO,useContext:er,useEffect:mx,useImperativeHandle:SO,useInsertionEffect:xO,useLayoutEffect:bO,useMemo:kO,useReducer:Uh,useRef:gO,useState:function(){return Uh(Oi)},useDebugValue:px,useDeferredValue:function(o,u){var p=_n();return _O(p,Ft.memoizedState,o,u)},useTransition:function(){var o=Uh(Oi)[0],u=_n().memoizedState;return[typeof o=="boolean"?o:Gc(o),u]},useSyncExternalStore:eO,useId:AO,useHostTransitionStatus:yx,useFormState:hO,useActionState:hO,useOptimistic:function(o,u){var p=_n();return sO(p,Ft,o,u)},useMemoCache:ux,useCacheRefresh:TO};bx.useEffectEvent=yO;var RO={readContext:er,use:Hh,useCallback:jO,useContext:er,useEffect:mx,useImperativeHandle:SO,useInsertionEffect:xO,useLayoutEffect:bO,useMemo:kO,useReducer:dx,useRef:gO,useState:function(){return dx(Oi)},useDebugValue:px,useDeferredValue:function(o,u){var p=_n();return Ft===null?gx(p,o,u):_O(p,Ft.memoizedState,o,u)},useTransition:function(){var o=dx(Oi)[0],u=_n().memoizedState;return[typeof o=="boolean"?o:Gc(o),u]},useSyncExternalStore:eO,useId:AO,useHostTransitionStatus:yx,useFormState:pO,useActionState:pO,useOptimistic:function(o,u){var p=_n();return Ft!==null?sO(p,Ft,o,u):(p.baseState=o,[o,p.queue.dispatch])},useMemoCache:ux,useCacheRefresh:TO};RO.useEffectEvent=yO;function wx(o,u,p,y){u=o.memoizedState,p=p(y,u),p=p==null?u:m({},u,p),o.memoizedState=p,o.lanes===0&&(o.updateQueue.baseState=p)}var Sx={enqueueSetState:function(o,u,p){o=o._reactInternals;var y=Hr(),C=Ns(y);C.payload=u,p!=null&&(C.callback=p),u=Es(o,C,y),u!==null&&(Nr(u,o,y),Bc(u,o,y))},enqueueReplaceState:function(o,u,p){o=o._reactInternals;var y=Hr(),C=Ns(y);C.tag=1,C.payload=u,p!=null&&(C.callback=p),u=Es(o,C,y),u!==null&&(Nr(u,o,y),Bc(u,o,y))},enqueueForceUpdate:function(o,u){o=o._reactInternals;var p=Hr(),y=Ns(p);y.tag=2,u!=null&&(y.callback=u),u=Es(o,y,p),u!==null&&(Nr(u,o,p),Bc(u,o,p))}};function IO(o,u,p,y,C,N,$){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(y,N,$):u.prototype&&u.prototype.isPureReactComponent?!Pc(p,y)||!Pc(C,N):!0}function LO(o,u,p,y){o=u.state,typeof u.componentWillReceiveProps=="function"&&u.componentWillReceiveProps(p,y),typeof u.UNSAFE_componentWillReceiveProps=="function"&&u.UNSAFE_componentWillReceiveProps(p,y),u.state!==o&&Sx.enqueueReplaceState(u,u.state,null)}function Po(o,u){var p=u;if("ref"in u){p={};for(var y in u)y!=="ref"&&(p[y]=u[y])}if(o=o.defaultProps){p===u&&(p=m({},p));for(var C in o)p[C]===void 0&&(p[C]=o[C])}return p}function zO(o){_h(o)}function $O(o){console.error(o)}function qO(o){_h(o)}function Wh(o,u){try{var p=o.onUncaughtError;p(u.value,{componentStack:u.stack})}catch(y){setTimeout(function(){throw y})}}function BO(o,u,p){try{var y=o.onCaughtError;y(p.value,{componentStack:p.stack,errorBoundary:u.tag===1?u.stateNode:null})}catch(C){setTimeout(function(){throw C})}}function jx(o,u,p){return p=Ns(p),p.tag=3,p.payload={element:null},p.callback=function(){Wh(o,u)},p}function FO(o){return o=Ns(o),o.tag=3,o}function HO(o,u,p,y){var C=p.type.getDerivedStateFromError;if(typeof C=="function"){var N=y.value;o.payload=function(){return C(N)},o.callback=function(){BO(u,p,y)}}var $=p.stateNode;$!==null&&typeof $.componentDidCatch=="function"&&(o.callback=function(){BO(u,p,y),typeof C!="function"&&(Ds===null?Ds=new Set([this]):Ds.add(this));var V=y.stack;this.componentDidCatch(y.value,{componentStack:V!==null?V:""})})}function UX(o,u,p,y,C){if(p.flags|=32768,y!==null&&typeof y=="object"&&typeof y.then=="function"){if(u=p.alternate,u!==null&&Wl(u,p,C,!0),p=$r.current,p!==null){switch(p.tag){case 31:case 13:return la===null?sm():p.alternate===null&&xn===0&&(xn=3),p.flags&=-257,p.flags|=65536,p.lanes=C,y===Rh?p.flags|=16384:(u=p.updateQueue,u===null?p.updateQueue=new Set([y]):u.add(y),Wx(o,y,C)),!1;case 22:return p.flags|=65536,y===Rh?p.flags|=16384:(u=p.updateQueue,u===null?(u={transitions:null,markerInstances:null,retryQueue:new Set([y])},p.updateQueue=u):(p=u.retryQueue,p===null?u.retryQueue=new Set([y]):p.add(y)),Wx(o,y,C)),!1}throw Error(r(435,p.tag))}return Wx(o,y,C),sm(),!1}if(_t)return u=$r.current,u!==null?((u.flags&65536)===0&&(u.flags|=256),u.flags|=65536,u.lanes=C,y!==Fy&&(o=Error(r(422),{cause:y}),Ic(aa(o,p)))):(y!==Fy&&(u=Error(r(423),{cause:y}),Ic(aa(u,p))),o=o.current.alternate,o.flags|=65536,C&=-C,o.lanes|=C,y=aa(y,p),C=jx(o.stateNode,y,C),Jy(o,C),xn!==4&&(xn=2)),!1;var N=Error(r(520),{cause:y});if(N=aa(N,p),td===null?td=[N]:td.push(N),xn!==4&&(xn=2),u===null)return!0;y=aa(y,p),p=u;do{switch(p.tag){case 3:return p.flags|=65536,o=C&-C,p.lanes|=o,o=jx(p.stateNode,y,o),Jy(p,o),!1;case 1:if(u=p.type,N=p.stateNode,(p.flags&128)===0&&(typeof u.getDerivedStateFromError=="function"||N!==null&&typeof N.componentDidCatch=="function"&&(Ds===null||!Ds.has(N))))return p.flags|=65536,C&=-C,p.lanes|=C,C=FO(C),HO(C,o,p,y),Jy(p,C),!1}p=p.return}while(p!==null);return!1}var kx=Error(r(461)),An=!1;function tr(o,u,p,y){u.child=o===null?KT(u,null,p,y):Oo(u,o.child,p,y)}function UO(o,u,p,y,C){p=p.render;var N=u.ref;if("ref"in y){var $={};for(var V in y)V!=="ref"&&($[V]=y[V])}else $=y;return No(u),y=ix(o,u,p,$,N,C),V=sx(),o!==null&&!An?(ox(o,u,C),Mi(o,u,C)):(_t&&V&&qy(u),u.flags|=1,tr(o,u,y,C),u.child)}function GO(o,u,p,y,C){if(o===null){var N=p.type;return typeof N=="function"&&!Ly(N)&&N.defaultProps===void 0&&p.compare===null?(u.tag=15,u.type=N,VO(o,u,N,y,C)):(o=Ah(p.type,null,y,u,u.mode,C),o.ref=u.ref,o.return=u,u.child=o)}if(N=o.child,!Mx(o,C)){var $=N.memoizedProps;if(p=p.compare,p=p!==null?p:Pc,p($,y)&&o.ref===u.ref)return Mi(o,u,C)}return u.flags|=1,o=Ci(N,y),o.ref=u.ref,o.return=u,u.child=o}function VO(o,u,p,y,C){if(o!==null){var N=o.memoizedProps;if(Pc(N,y)&&o.ref===u.ref)if(An=!1,u.pendingProps=y=N,Mx(o,C))(o.flags&131072)!==0&&(An=!0);else return u.lanes=o.lanes,Mi(o,u,C)}return _x(o,u,p,y,C)}function KO(o,u,p,y){var C=y.children,N=o!==null?o.memoizedState:null;if(o===null&&u.stateNode===null&&(u.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),y.mode==="hidden"){if((u.flags&128)!==0){if(N=N!==null?N.baseLanes|p:p,o!==null){for(y=u.child=o.child,C=0;y!==null;)C=C|y.lanes|y.childLanes,y=y.sibling;y=C&~N}else y=0,u.child=null;return WO(o,u,N,p,y)}if((p&536870912)!==0)u.memoizedState={baseLanes:0,cachePool:null},o!==null&&Ph(u,N!==null?N.cachePool:null),N!==null?XT(u,N):tx(),ZT(u);else return y=u.lanes=536870912,WO(o,u,N!==null?N.baseLanes|p:p,p,y)}else N!==null?(Ph(u,N.cachePool),XT(u,N),Ts(),u.memoizedState=null):(o!==null&&Ph(u,null),tx(),Ts());return tr(o,u,C,p),u.child}function Wc(o,u){return o!==null&&o.tag===22||u.stateNode!==null||(u.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.sibling}function WO(o,u,p,y,C){var N=Yy();return N=N===null?null:{parent:Nn._currentValue,pool:N},u.memoizedState={baseLanes:p,cachePool:N},o!==null&&Ph(u,null),tx(),ZT(u),o!==null&&Wl(o,u,y,!0),u.childLanes=C,null}function Yh(o,u){return u=Zh({mode:u.mode,children:u.children},o.mode),u.ref=o.ref,o.child=u,u.return=o,u}function YO(o,u,p){return Oo(u,o.child,null,p),o=Yh(u,u.pendingProps),o.flags|=2,qr(u),u.memoizedState=null,o}function GX(o,u,p){var y=u.pendingProps,C=(u.flags&128)!==0;if(u.flags&=-129,o===null){if(_t){if(y.mode==="hidden")return o=Yh(u,y),u.lanes=536870912,Wc(null,o);if(rx(u),(o=en)?(o=oP(o,oa),o=o!==null&&o.data==="&"?o:null,o!==null&&(u.memoizedState={dehydrated:o,treeContext:Ss!==null?{id:Wa,overflow:Ya}:null,retryLane:536870912,hydrationErrors:null},p=MT(o),p.return=u,u.child=p,Jn=u,en=null)):o=null,o===null)throw ks(u);return u.lanes=536870912,null}return Yh(u,y)}var N=o.memoizedState;if(N!==null){var $=N.dehydrated;if(rx(u),C)if(u.flags&256)u.flags&=-257,u=YO(o,u,p);else if(u.memoizedState!==null)u.child=o.child,u.flags|=128,u=null;else throw Error(r(558));else if(An||Wl(o,u,p,!1),C=(p&o.childLanes)!==0,An||C){if(y=Kt,y!==null&&($=Le(y,p),$!==0&&$!==N.retryLane))throw N.retryLane=$,jo(o,$),Nr(y,o,$),kx;sm(),u=YO(o,u,p)}else o=N.treeContext,en=ua($.nextSibling),Jn=u,_t=!0,js=null,oa=!1,o!==null&&RT(u,o),u=Yh(u,y),u.flags|=4096;return u}return o=Ci(o.child,{mode:y.mode,children:y.children}),o.ref=u.ref,u.child=o,o.return=u,o}function Xh(o,u){var p=u.ref;if(p===null)o!==null&&o.ref!==null&&(u.flags|=4194816);else{if(typeof p!="function"&&typeof p!="object")throw Error(r(284));(o===null||o.ref!==p)&&(u.flags|=4194816)}}function _x(o,u,p,y,C){return No(u),p=ix(o,u,p,y,void 0,C),y=sx(),o!==null&&!An?(ox(o,u,C),Mi(o,u,C)):(_t&&y&&qy(u),u.flags|=1,tr(o,u,p,C),u.child)}function XO(o,u,p,y,C,N){return No(u),u.updateQueue=null,p=JT(u,y,p,C),QT(o),y=sx(),o!==null&&!An?(ox(o,u,N),Mi(o,u,N)):(_t&&y&&qy(u),u.flags|=1,tr(o,u,p,N),u.child)}function ZO(o,u,p,y,C){if(No(u),u.stateNode===null){var N=Ul,$=p.contextType;typeof $=="object"&&$!==null&&(N=er($)),N=new p(y,N),u.memoizedState=N.state!==null&&N.state!==void 0?N.state:null,N.updater=Sx,u.stateNode=N,N._reactInternals=u,N=u.stateNode,N.props=y,N.state=u.memoizedState,N.refs={},Zy(u),$=p.contextType,N.context=typeof $=="object"&&$!==null?er($):Ul,N.state=u.memoizedState,$=p.getDerivedStateFromProps,typeof $=="function"&&(wx(u,p,$,y),N.state=u.memoizedState),typeof p.getDerivedStateFromProps=="function"||typeof N.getSnapshotBeforeUpdate=="function"||typeof N.UNSAFE_componentWillMount!="function"&&typeof N.componentWillMount!="function"||($=N.state,typeof N.componentWillMount=="function"&&N.componentWillMount(),typeof N.UNSAFE_componentWillMount=="function"&&N.UNSAFE_componentWillMount(),$!==N.state&&Sx.enqueueReplaceState(N,N.state,null),Hc(u,y,N,C),Fc(),N.state=u.memoizedState),typeof N.componentDidMount=="function"&&(u.flags|=4194308),y=!0}else if(o===null){N=u.stateNode;var V=u.memoizedProps,te=Po(p,V);N.props=te;var ve=N.context,_e=p.contextType;$=Ul,typeof _e=="object"&&_e!==null&&($=er(_e));var Ae=p.getDerivedStateFromProps;_e=typeof Ae=="function"||typeof N.getSnapshotBeforeUpdate=="function",V=u.pendingProps!==V,_e||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||(V||ve!==$)&&LO(u,N,y,$),Cs=!1;var xe=u.memoizedState;N.state=xe,Hc(u,y,N,C),Fc(),ve=u.memoizedState,V||xe!==ve||Cs?(typeof Ae=="function"&&(wx(u,p,Ae,y),ve=u.memoizedState),(te=Cs||IO(u,p,te,y,xe,ve,$))?(_e||typeof N.UNSAFE_componentWillMount!="function"&&typeof N.componentWillMount!="function"||(typeof N.componentWillMount=="function"&&N.componentWillMount(),typeof N.UNSAFE_componentWillMount=="function"&&N.UNSAFE_componentWillMount()),typeof N.componentDidMount=="function"&&(u.flags|=4194308)):(typeof N.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=y,u.memoizedState=ve),N.props=y,N.state=ve,N.context=$,y=te):(typeof N.componentDidMount=="function"&&(u.flags|=4194308),y=!1)}else{N=u.stateNode,Qy(o,u),$=u.memoizedProps,_e=Po(p,$),N.props=_e,Ae=u.pendingProps,xe=N.context,ve=p.contextType,te=Ul,typeof ve=="object"&&ve!==null&&(te=er(ve)),V=p.getDerivedStateFromProps,(ve=typeof V=="function"||typeof N.getSnapshotBeforeUpdate=="function")||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||($!==Ae||xe!==te)&&LO(u,N,y,te),Cs=!1,xe=u.memoizedState,N.state=xe,Hc(u,y,N,C),Fc();var ke=u.memoizedState;$!==Ae||xe!==ke||Cs||o!==null&&o.dependencies!==null&&Oh(o.dependencies)?(typeof V=="function"&&(wx(u,p,V,y),ke=u.memoizedState),(_e=Cs||IO(u,p,_e,y,xe,ke,te)||o!==null&&o.dependencies!==null&&Oh(o.dependencies))?(ve||typeof N.UNSAFE_componentWillUpdate!="function"&&typeof N.componentWillUpdate!="function"||(typeof N.componentWillUpdate=="function"&&N.componentWillUpdate(y,ke,te),typeof N.UNSAFE_componentWillUpdate=="function"&&N.UNSAFE_componentWillUpdate(y,ke,te)),typeof N.componentDidUpdate=="function"&&(u.flags|=4),typeof N.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof N.componentDidUpdate!="function"||$===o.memoizedProps&&xe===o.memoizedState||(u.flags|=4),typeof N.getSnapshotBeforeUpdate!="function"||$===o.memoizedProps&&xe===o.memoizedState||(u.flags|=1024),u.memoizedProps=y,u.memoizedState=ke),N.props=y,N.state=ke,N.context=te,y=_e):(typeof N.componentDidUpdate!="function"||$===o.memoizedProps&&xe===o.memoizedState||(u.flags|=4),typeof N.getSnapshotBeforeUpdate!="function"||$===o.memoizedProps&&xe===o.memoizedState||(u.flags|=1024),y=!1)}return N=y,Xh(o,u),y=(u.flags&128)!==0,N||y?(N=u.stateNode,p=y&&typeof p.getDerivedStateFromError!="function"?null:N.render(),u.flags|=1,o!==null&&y?(u.child=Oo(u,o.child,null,C),u.child=Oo(u,null,p,C)):tr(o,u,p,C),u.memoizedState=N.state,o=u.child):o=Mi(o,u,C),o}function QO(o,u,p,y){return _o(),u.flags|=256,tr(o,u,p,y),u.child}var Cx={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Nx(o){return{baseLanes:o,cachePool:BT()}}function Ex(o,u,p){return o=o!==null?o.childLanes&~p:0,u&&(o|=Fr),o}function JO(o,u,p){var y=u.pendingProps,C=!1,N=(u.flags&128)!==0,$;if(($=N)||($=o!==null&&o.memoizedState===null?!1:(kn.current&2)!==0),$&&(C=!0,u.flags&=-129),$=(u.flags&32)!==0,u.flags&=-33,o===null){if(_t){if(C?As(u):Ts(),(o=en)?(o=oP(o,oa),o=o!==null&&o.data!=="&"?o:null,o!==null&&(u.memoizedState={dehydrated:o,treeContext:Ss!==null?{id:Wa,overflow:Ya}:null,retryLane:536870912,hydrationErrors:null},p=MT(o),p.return=u,u.child=p,Jn=u,en=null)):o=null,o===null)throw ks(u);return c0(o)?u.lanes=32:u.lanes=536870912,null}var V=y.children;return y=y.fallback,C?(Ts(),C=u.mode,V=Zh({mode:"hidden",children:V},C),y=ko(y,C,p,null),V.return=u,y.return=u,V.sibling=y,u.child=V,y=u.child,y.memoizedState=Nx(p),y.childLanes=Ex(o,$,p),u.memoizedState=Cx,Wc(null,y)):(As(u),Ax(u,V))}var te=o.memoizedState;if(te!==null&&(V=te.dehydrated,V!==null)){if(N)u.flags&256?(As(u),u.flags&=-257,u=Tx(o,u,p)):u.memoizedState!==null?(Ts(),u.child=o.child,u.flags|=128,u=null):(Ts(),V=y.fallback,C=u.mode,y=Zh({mode:"visible",children:y.children},C),V=ko(V,C,p,null),V.flags|=2,y.return=u,V.return=u,y.sibling=V,u.child=y,Oo(u,o.child,null,p),y=u.child,y.memoizedState=Nx(p),y.childLanes=Ex(o,$,p),u.memoizedState=Cx,u=Wc(null,y));else if(As(u),c0(V)){if($=V.nextSibling&&V.nextSibling.dataset,$)var ve=$.dgst;$=ve,y=Error(r(419)),y.stack="",y.digest=$,Ic({value:y,source:null,stack:null}),u=Tx(o,u,p)}else if(An||Wl(o,u,p,!1),$=(p&o.childLanes)!==0,An||$){if($=Kt,$!==null&&(y=Le($,p),y!==0&&y!==te.retryLane))throw te.retryLane=y,jo(o,y),Nr($,o,y),kx;u0(V)||sm(),u=Tx(o,u,p)}else u0(V)?(u.flags|=192,u.child=o.child,u=null):(o=te.treeContext,en=ua(V.nextSibling),Jn=u,_t=!0,js=null,oa=!1,o!==null&&RT(u,o),u=Ax(u,y.children),u.flags|=4096);return u}return C?(Ts(),V=y.fallback,C=u.mode,te=o.child,ve=te.sibling,y=Ci(te,{mode:"hidden",children:y.children}),y.subtreeFlags=te.subtreeFlags&65011712,ve!==null?V=Ci(ve,V):(V=ko(V,C,p,null),V.flags|=2),V.return=u,y.return=u,y.sibling=V,u.child=y,Wc(null,y),y=u.child,V=o.child.memoizedState,V===null?V=Nx(p):(C=V.cachePool,C!==null?(te=Nn._currentValue,C=C.parent!==te?{parent:te,pool:te}:C):C=BT(),V={baseLanes:V.baseLanes|p,cachePool:C}),y.memoizedState=V,y.childLanes=Ex(o,$,p),u.memoizedState=Cx,Wc(o.child,y)):(As(u),p=o.child,o=p.sibling,p=Ci(p,{mode:"visible",children:y.children}),p.return=u,p.sibling=null,o!==null&&($=u.deletions,$===null?(u.deletions=[o],u.flags|=16):$.push(o)),u.child=p,u.memoizedState=null,p)}function Ax(o,u){return u=Zh({mode:"visible",children:u},o.mode),u.return=o,o.child=u}function Zh(o,u){return o=zr(22,o,null,u),o.lanes=0,o}function Tx(o,u,p){return Oo(u,o.child,null,p),o=Ax(u,u.pendingProps.children),o.flags|=2,u.memoizedState=null,o}function eM(o,u,p){o.lanes|=u;var y=o.alternate;y!==null&&(y.lanes|=u),Gy(o.return,u,p)}function Ox(o,u,p,y,C,N){var $=o.memoizedState;$===null?o.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:y,tail:p,tailMode:C,treeForkCount:N}:($.isBackwards=u,$.rendering=null,$.renderingStartTime=0,$.last=y,$.tail=p,$.tailMode=C,$.treeForkCount=N)}function tM(o,u,p){var y=u.pendingProps,C=y.revealOrder,N=y.tail;y=y.children;var $=kn.current,V=($&2)!==0;if(V?($=$&1|2,u.flags|=128):$&=1,U(kn,$),tr(o,u,y,p),y=_t?Rc:0,!V&&o!==null&&(o.flags&128)!==0)e:for(o=u.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&eM(o,p,u);else if(o.tag===19)eM(o,p,u);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===u)break e;for(;o.sibling===null;){if(o.return===null||o.return===u)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}switch(C){case"forwards":for(p=u.child,C=null;p!==null;)o=p.alternate,o!==null&&$h(o)===null&&(C=p),p=p.sibling;p=C,p===null?(C=u.child,u.child=null):(C=p.sibling,p.sibling=null),Ox(u,!1,C,p,N,y);break;case"backwards":case"unstable_legacy-backwards":for(p=null,C=u.child,u.child=null;C!==null;){if(o=C.alternate,o!==null&&$h(o)===null){u.child=C;break}o=C.sibling,C.sibling=p,p=C,C=o}Ox(u,!0,p,null,N,y);break;case"together":Ox(u,!1,null,null,void 0,y);break;default:u.memoizedState=null}return u.child}function Mi(o,u,p){if(o!==null&&(u.dependencies=o.dependencies),Ps|=u.lanes,(p&u.childLanes)===0)if(o!==null){if(Wl(o,u,p,!1),(p&u.childLanes)===0)return null}else return null;if(o!==null&&u.child!==o.child)throw Error(r(153));if(u.child!==null){for(o=u.child,p=Ci(o,o.pendingProps),u.child=p,p.return=u;o.sibling!==null;)o=o.sibling,p=p.sibling=Ci(o,o.pendingProps),p.return=u;p.sibling=null}return u.child}function Mx(o,u){return(o.lanes&u)!==0?!0:(o=o.dependencies,!!(o!==null&&Oh(o)))}function VX(o,u,p){switch(u.tag){case 3:ue(u,u.stateNode.containerInfo),_s(u,Nn,o.memoizedState.cache),_o();break;case 27:case 5:se(u);break;case 4:ue(u,u.stateNode.containerInfo);break;case 10:_s(u,u.type,u.memoizedProps.value);break;case 31:if(u.memoizedState!==null)return u.flags|=128,rx(u),null;break;case 13:var y=u.memoizedState;if(y!==null)return y.dehydrated!==null?(As(u),u.flags|=128,null):(p&u.child.childLanes)!==0?JO(o,u,p):(As(u),o=Mi(o,u,p),o!==null?o.sibling:null);As(u);break;case 19:var C=(o.flags&128)!==0;if(y=(p&u.childLanes)!==0,y||(Wl(o,u,p,!1),y=(p&u.childLanes)!==0),C){if(y)return tM(o,u,p);u.flags|=128}if(C=u.memoizedState,C!==null&&(C.rendering=null,C.tail=null,C.lastEffect=null),U(kn,kn.current),y)break;return null;case 22:return u.lanes=0,KO(o,u,p,u.pendingProps);case 24:_s(u,Nn,o.memoizedState.cache)}return Mi(o,u,p)}function nM(o,u,p){if(o!==null)if(o.memoizedProps!==u.pendingProps)An=!0;else{if(!Mx(o,p)&&(u.flags&128)===0)return An=!1,VX(o,u,p);An=(o.flags&131072)!==0}else An=!1,_t&&(u.flags&1048576)!==0&&DT(u,Rc,u.index);switch(u.lanes=0,u.tag){case 16:e:{var y=u.pendingProps;if(o=Ao(u.elementType),u.type=o,typeof o=="function")Ly(o)?(y=Po(o,y),u.tag=1,u=ZO(null,u,o,y,p)):(u.tag=0,u=_x(null,u,o,y,p));else{if(o!=null){var C=o.$$typeof;if(C===E){u.tag=11,u=UO(null,u,o,y,p);break e}else if(C===O){u.tag=14,u=GO(null,u,o,y,p);break e}}throw u=R(o)||o,Error(r(306,u,""))}}return u;case 0:return _x(o,u,u.type,u.pendingProps,p);case 1:return y=u.type,C=Po(y,u.pendingProps),ZO(o,u,y,C,p);case 3:e:{if(ue(u,u.stateNode.containerInfo),o===null)throw Error(r(387));y=u.pendingProps;var N=u.memoizedState;C=N.element,Qy(o,u),Hc(u,y,null,p);var $=u.memoizedState;if(y=$.cache,_s(u,Nn,y),y!==N.cache&&Vy(u,[Nn],p,!0),Fc(),y=$.element,N.isDehydrated)if(N={element:y,isDehydrated:!1,cache:$.cache},u.updateQueue.baseState=N,u.memoizedState=N,u.flags&256){u=QO(o,u,y,p);break e}else if(y!==C){C=aa(Error(r(424)),u),Ic(C),u=QO(o,u,y,p);break e}else{switch(o=u.stateNode.containerInfo,o.nodeType){case 9:o=o.body;break;default:o=o.nodeName==="HTML"?o.ownerDocument.body:o}for(en=ua(o.firstChild),Jn=u,_t=!0,js=null,oa=!0,p=KT(u,null,y,p),u.child=p;p;)p.flags=p.flags&-3|4096,p=p.sibling}else{if(_o(),y===C){u=Mi(o,u,p);break e}tr(o,u,y,p)}u=u.child}return u;case 26:return Xh(o,u),o===null?(p=hP(u.type,null,u.pendingProps,null))?u.memoizedState=p:_t||(p=u.type,o=u.pendingProps,y=hm(Q.current).createElement(p),y[jn]=u,y[Gn]=o,nr(y,p,o),gn(y),u.stateNode=y):u.memoizedState=hP(u.type,o.memoizedProps,u.pendingProps,o.memoizedState),null;case 27:return se(u),o===null&&_t&&(y=u.stateNode=cP(u.type,u.pendingProps,Q.current),Jn=u,oa=!0,C=en,zs(u.type)?(d0=C,en=ua(y.firstChild)):en=C),tr(o,u,u.pendingProps.children,p),Xh(o,u),o===null&&(u.flags|=4194304),u.child;case 5:return o===null&&_t&&((C=y=en)&&(y=SZ(y,u.type,u.pendingProps,oa),y!==null?(u.stateNode=y,Jn=u,en=ua(y.firstChild),oa=!1,C=!0):C=!1),C||ks(u)),se(u),C=u.type,N=u.pendingProps,$=o!==null?o.memoizedProps:null,y=N.children,s0(C,N)?y=null:$!==null&&s0(C,$)&&(u.flags|=32),u.memoizedState!==null&&(C=ix(o,u,LX,null,null,p),ud._currentValue=C),Xh(o,u),tr(o,u,y,p),u.child;case 6:return o===null&&_t&&((o=p=en)&&(p=jZ(p,u.pendingProps,oa),p!==null?(u.stateNode=p,Jn=u,en=null,o=!0):o=!1),o||ks(u)),null;case 13:return JO(o,u,p);case 4:return ue(u,u.stateNode.containerInfo),y=u.pendingProps,o===null?u.child=Oo(u,null,y,p):tr(o,u,y,p),u.child;case 11:return UO(o,u,u.type,u.pendingProps,p);case 7:return tr(o,u,u.pendingProps,p),u.child;case 8:return tr(o,u,u.pendingProps.children,p),u.child;case 12:return tr(o,u,u.pendingProps.children,p),u.child;case 10:return y=u.pendingProps,_s(u,u.type,y.value),tr(o,u,y.children,p),u.child;case 9:return C=u.type._context,y=u.pendingProps.children,No(u),C=er(C),y=y(C),u.flags|=1,tr(o,u,y,p),u.child;case 14:return GO(o,u,u.type,u.pendingProps,p);case 15:return VO(o,u,u.type,u.pendingProps,p);case 19:return tM(o,u,p);case 31:return GX(o,u,p);case 22:return KO(o,u,p,u.pendingProps);case 24:return No(u),y=er(Nn),o===null?(C=Yy(),C===null&&(C=Kt,N=Ky(),C.pooledCache=N,N.refCount++,N!==null&&(C.pooledCacheLanes|=p),C=N),u.memoizedState={parent:y,cache:C},Zy(u),_s(u,Nn,C)):((o.lanes&p)!==0&&(Qy(o,u),Hc(u,null,null,p),Fc()),C=o.memoizedState,N=u.memoizedState,C.parent!==y?(C={parent:y,cache:y},u.memoizedState=C,u.lanes===0&&(u.memoizedState=u.updateQueue.baseState=C),_s(u,Nn,y)):(y=N.cache,_s(u,Nn,y),y!==C.cache&&Vy(u,[Nn],p,!0))),tr(o,u,u.pendingProps.children,p),u.child;case 29:throw u.pendingProps}throw Error(r(156,u.tag))}function Pi(o){o.flags|=4}function Px(o,u,p,y,C){if((u=(o.mode&32)!==0)&&(u=!1),u){if(o.flags|=16777216,(C&335544128)===C)if(o.stateNode.complete)o.flags|=8192;else if(AM())o.flags|=8192;else throw To=Rh,Xy}else o.flags&=-16777217}function rM(o,u){if(u.type!=="stylesheet"||(u.state.loading&4)!==0)o.flags&=-16777217;else if(o.flags|=16777216,!yP(u))if(AM())o.flags|=8192;else throw To=Rh,Xy}function Qh(o,u){u!==null&&(o.flags|=4),o.flags&16384&&(u=o.tag!==22?Se():536870912,o.lanes|=u,su|=u)}function Yc(o,u){if(!_t)switch(o.tailMode){case"hidden":u=o.tail;for(var p=null;u!==null;)u.alternate!==null&&(p=u),u=u.sibling;p===null?o.tail=null:p.sibling=null;break;case"collapsed":p=o.tail;for(var y=null;p!==null;)p.alternate!==null&&(y=p),p=p.sibling;y===null?u||o.tail===null?o.tail=null:o.tail.sibling=null:y.sibling=null}}function tn(o){var u=o.alternate!==null&&o.alternate.child===o.child,p=0,y=0;if(u)for(var C=o.child;C!==null;)p|=C.lanes|C.childLanes,y|=C.subtreeFlags&65011712,y|=C.flags&65011712,C.return=o,C=C.sibling;else for(C=o.child;C!==null;)p|=C.lanes|C.childLanes,y|=C.subtreeFlags,y|=C.flags,C.return=o,C=C.sibling;return o.subtreeFlags|=y,o.childLanes=p,u}function KX(o,u,p){var y=u.pendingProps;switch(By(u),u.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return tn(u),null;case 1:return tn(u),null;case 3:return p=u.stateNode,y=null,o!==null&&(y=o.memoizedState.cache),u.memoizedState.cache!==y&&(u.flags|=2048),Ai(Nn),Z(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(o===null||o.child===null)&&(Kl(u)?Pi(u):o===null||o.memoizedState.isDehydrated&&(u.flags&256)===0||(u.flags|=1024,Hy())),tn(u),null;case 26:var C=u.type,N=u.memoizedState;return o===null?(Pi(u),N!==null?(tn(u),rM(u,N)):(tn(u),Px(u,C,null,y,p))):N?N!==o.memoizedState?(Pi(u),tn(u),rM(u,N)):(tn(u),u.flags&=-16777217):(o=o.memoizedProps,o!==y&&Pi(u),tn(u),Px(u,C,o,y,p)),null;case 27:if(ce(u),p=Q.current,C=u.type,o!==null&&u.stateNode!=null)o.memoizedProps!==y&&Pi(u);else{if(!y){if(u.stateNode===null)throw Error(r(166));return tn(u),null}o=X.current,Kl(u)?IT(u):(o=cP(C,y,p),u.stateNode=o,Pi(u))}return tn(u),null;case 5:if(ce(u),C=u.type,o!==null&&u.stateNode!=null)o.memoizedProps!==y&&Pi(u);else{if(!y){if(u.stateNode===null)throw Error(r(166));return tn(u),null}if(N=X.current,Kl(u))IT(u);else{var $=hm(Q.current);switch(N){case 1:N=$.createElementNS("http://www.w3.org/2000/svg",C);break;case 2:N=$.createElementNS("http://www.w3.org/1998/Math/MathML",C);break;default:switch(C){case"svg":N=$.createElementNS("http://www.w3.org/2000/svg",C);break;case"math":N=$.createElementNS("http://www.w3.org/1998/Math/MathML",C);break;case"script":N=$.createElement("div"),N.innerHTML="<script><\/script>",N=N.removeChild(N.firstChild);break;case"select":N=typeof y.is=="string"?$.createElement("select",{is:y.is}):$.createElement("select"),y.multiple?N.multiple=!0:y.size&&(N.size=y.size);break;default:N=typeof y.is=="string"?$.createElement(C,{is:y.is}):$.createElement(C)}}N[jn]=u,N[Gn]=y;e:for($=u.child;$!==null;){if($.tag===5||$.tag===6)N.appendChild($.stateNode);else if($.tag!==4&&$.tag!==27&&$.child!==null){$.child.return=$,$=$.child;continue}if($===u)break e;for(;$.sibling===null;){if($.return===null||$.return===u)break e;$=$.return}$.sibling.return=$.return,$=$.sibling}u.stateNode=N;e:switch(nr(N,C,y),C){case"button":case"input":case"select":case"textarea":y=!!y.autoFocus;break e;case"img":y=!0;break e;default:y=!1}y&&Pi(u)}}return tn(u),Px(u,u.type,o===null?null:o.memoizedProps,u.pendingProps,p),null;case 6:if(o&&u.stateNode!=null)o.memoizedProps!==y&&Pi(u);else{if(typeof y!="string"&&u.stateNode===null)throw Error(r(166));if(o=Q.current,Kl(u)){if(o=u.stateNode,p=u.memoizedProps,y=null,C=Jn,C!==null)switch(C.tag){case 27:case 5:y=C.memoizedProps}o[jn]=u,o=!!(o.nodeValue===p||y!==null&&y.suppressHydrationWarning===!0||JM(o.nodeValue,p)),o||ks(u,!0)}else o=hm(o).createTextNode(y),o[jn]=u,u.stateNode=o}return tn(u),null;case 31:if(p=u.memoizedState,o===null||o.memoizedState!==null){if(y=Kl(u),p!==null){if(o===null){if(!y)throw Error(r(318));if(o=u.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(557));o[jn]=u}else _o(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;tn(u),o=!1}else p=Hy(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=p),o=!0;if(!o)return u.flags&256?(qr(u),u):(qr(u),null);if((u.flags&128)!==0)throw Error(r(558))}return tn(u),null;case 13:if(y=u.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(C=Kl(u),y!==null&&y.dehydrated!==null){if(o===null){if(!C)throw Error(r(318));if(C=u.memoizedState,C=C!==null?C.dehydrated:null,!C)throw Error(r(317));C[jn]=u}else _o(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;tn(u),C=!1}else C=Hy(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=C),C=!0;if(!C)return u.flags&256?(qr(u),u):(qr(u),null)}return qr(u),(u.flags&128)!==0?(u.lanes=p,u):(p=y!==null,o=o!==null&&o.memoizedState!==null,p&&(y=u.child,C=null,y.alternate!==null&&y.alternate.memoizedState!==null&&y.alternate.memoizedState.cachePool!==null&&(C=y.alternate.memoizedState.cachePool.pool),N=null,y.memoizedState!==null&&y.memoizedState.cachePool!==null&&(N=y.memoizedState.cachePool.pool),N!==C&&(y.flags|=2048)),p!==o&&p&&(u.child.flags|=8192),Qh(u,u.updateQueue),tn(u),null);case 4:return Z(),o===null&&t0(u.stateNode.containerInfo),tn(u),null;case 10:return Ai(u.type),tn(u),null;case 19:if(K(kn),y=u.memoizedState,y===null)return tn(u),null;if(C=(u.flags&128)!==0,N=y.rendering,N===null)if(C)Yc(y,!1);else{if(xn!==0||o!==null&&(o.flags&128)!==0)for(o=u.child;o!==null;){if(N=$h(o),N!==null){for(u.flags|=128,Yc(y,!1),o=N.updateQueue,u.updateQueue=o,Qh(u,o),u.subtreeFlags=0,o=p,p=u.child;p!==null;)OT(p,o),p=p.sibling;return U(kn,kn.current&1|2),_t&&Ni(u,y.treeForkCount),u.child}o=o.sibling}y.tail!==null&&Fe()>rm&&(u.flags|=128,C=!0,Yc(y,!1),u.lanes=4194304)}else{if(!C)if(o=$h(N),o!==null){if(u.flags|=128,C=!0,o=o.updateQueue,u.updateQueue=o,Qh(u,o),Yc(y,!0),y.tail===null&&y.tailMode==="hidden"&&!N.alternate&&!_t)return tn(u),null}else 2*Fe()-y.renderingStartTime>rm&&p!==536870912&&(u.flags|=128,C=!0,Yc(y,!1),u.lanes=4194304);y.isBackwards?(N.sibling=u.child,u.child=N):(o=y.last,o!==null?o.sibling=N:u.child=N,y.last=N)}return y.tail!==null?(o=y.tail,y.rendering=o,y.tail=o.sibling,y.renderingStartTime=Fe(),o.sibling=null,p=kn.current,U(kn,C?p&1|2:p&1),_t&&Ni(u,y.treeForkCount),o):(tn(u),null);case 22:case 23:return qr(u),nx(),y=u.memoizedState!==null,o!==null?o.memoizedState!==null!==y&&(u.flags|=8192):y&&(u.flags|=8192),y?(p&536870912)!==0&&(u.flags&128)===0&&(tn(u),u.subtreeFlags&6&&(u.flags|=8192)):tn(u),p=u.updateQueue,p!==null&&Qh(u,p.retryQueue),p=null,o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(p=o.memoizedState.cachePool.pool),y=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(y=u.memoizedState.cachePool.pool),y!==p&&(u.flags|=2048),o!==null&&K(Eo),null;case 24:return p=null,o!==null&&(p=o.memoizedState.cache),u.memoizedState.cache!==p&&(u.flags|=2048),Ai(Nn),tn(u),null;case 25:return null;case 30:return null}throw Error(r(156,u.tag))}function WX(o,u){switch(By(u),u.tag){case 1:return o=u.flags,o&65536?(u.flags=o&-65537|128,u):null;case 3:return Ai(Nn),Z(),o=u.flags,(o&65536)!==0&&(o&128)===0?(u.flags=o&-65537|128,u):null;case 26:case 27:case 5:return ce(u),null;case 31:if(u.memoizedState!==null){if(qr(u),u.alternate===null)throw Error(r(340));_o()}return o=u.flags,o&65536?(u.flags=o&-65537|128,u):null;case 13:if(qr(u),o=u.memoizedState,o!==null&&o.dehydrated!==null){if(u.alternate===null)throw Error(r(340));_o()}return o=u.flags,o&65536?(u.flags=o&-65537|128,u):null;case 19:return K(kn),null;case 4:return Z(),null;case 10:return Ai(u.type),null;case 22:case 23:return qr(u),nx(),o!==null&&K(Eo),o=u.flags,o&65536?(u.flags=o&-65537|128,u):null;case 24:return Ai(Nn),null;case 25:return null;default:return null}}function aM(o,u){switch(By(u),u.tag){case 3:Ai(Nn),Z();break;case 26:case 27:case 5:ce(u);break;case 4:Z();break;case 31:u.memoizedState!==null&&qr(u);break;case 13:qr(u);break;case 19:K(kn);break;case 10:Ai(u.type);break;case 22:case 23:qr(u),nx(),o!==null&&K(Eo);break;case 24:Ai(Nn)}}function Xc(o,u){try{var p=u.updateQueue,y=p!==null?p.lastEffect:null;if(y!==null){var C=y.next;p=C;do{if((p.tag&o)===o){y=void 0;var N=p.create,$=p.inst;y=N(),$.destroy=y}p=p.next}while(p!==C)}}catch(V){Bt(u,u.return,V)}}function Os(o,u,p){try{var y=u.updateQueue,C=y!==null?y.lastEffect:null;if(C!==null){var N=C.next;y=N;do{if((y.tag&o)===o){var $=y.inst,V=$.destroy;if(V!==void 0){$.destroy=void 0,C=u;var te=p,ve=V;try{ve()}catch(_e){Bt(C,te,_e)}}}y=y.next}while(y!==N)}}catch(_e){Bt(u,u.return,_e)}}function iM(o){var u=o.updateQueue;if(u!==null){var p=o.stateNode;try{YT(u,p)}catch(y){Bt(o,o.return,y)}}}function sM(o,u,p){p.props=Po(o.type,o.memoizedProps),p.state=o.memoizedState;try{p.componentWillUnmount()}catch(y){Bt(o,u,y)}}function Zc(o,u){try{var p=o.ref;if(p!==null){switch(o.tag){case 26:case 27:case 5:var y=o.stateNode;break;case 30:y=o.stateNode;break;default:y=o.stateNode}typeof p=="function"?o.refCleanup=p(y):p.current=y}}catch(C){Bt(o,u,C)}}function Xa(o,u){var p=o.ref,y=o.refCleanup;if(p!==null)if(typeof y=="function")try{y()}catch(C){Bt(o,u,C)}finally{o.refCleanup=null,o=o.alternate,o!=null&&(o.refCleanup=null)}else if(typeof p=="function")try{p(null)}catch(C){Bt(o,u,C)}else p.current=null}function oM(o){var u=o.type,p=o.memoizedProps,y=o.stateNode;try{e:switch(u){case"button":case"input":case"select":case"textarea":p.autoFocus&&y.focus();break e;case"img":p.src?y.src=p.src:p.srcSet&&(y.srcset=p.srcSet)}}catch(C){Bt(o,o.return,C)}}function Dx(o,u,p){try{var y=o.stateNode;gZ(y,o.type,p,u),y[Gn]=u}catch(C){Bt(o,o.return,C)}}function lM(o){return o.tag===5||o.tag===3||o.tag===26||o.tag===27&&zs(o.type)||o.tag===4}function Rx(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||lM(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.tag===27&&zs(o.type)||o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function Ix(o,u,p){var y=o.tag;if(y===5||y===6)o=o.stateNode,u?(p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p).insertBefore(o,u):(u=p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p,u.appendChild(o),p=p._reactRootContainer,p!=null||u.onclick!==null||(u.onclick=ki));else if(y!==4&&(y===27&&zs(o.type)&&(p=o.stateNode,u=null),o=o.child,o!==null))for(Ix(o,u,p),o=o.sibling;o!==null;)Ix(o,u,p),o=o.sibling}function Jh(o,u,p){var y=o.tag;if(y===5||y===6)o=o.stateNode,u?p.insertBefore(o,u):p.appendChild(o);else if(y!==4&&(y===27&&zs(o.type)&&(p=o.stateNode),o=o.child,o!==null))for(Jh(o,u,p),o=o.sibling;o!==null;)Jh(o,u,p),o=o.sibling}function uM(o){var u=o.stateNode,p=o.memoizedProps;try{for(var y=o.type,C=u.attributes;C.length;)u.removeAttributeNode(C[0]);nr(u,y,p),u[jn]=o,u[Gn]=p}catch(N){Bt(o,o.return,N)}}var Di=!1,Tn=!1,Lx=!1,cM=typeof WeakSet=="function"?WeakSet:Set,Kn=null;function YX(o,u){if(o=o.containerInfo,a0=bm,o=ST(o),Ty(o)){if("selectionStart"in o)var p={start:o.selectionStart,end:o.selectionEnd};else e:{p=(p=o.ownerDocument)&&p.defaultView||window;var y=p.getSelection&&p.getSelection();if(y&&y.rangeCount!==0){p=y.anchorNode;var C=y.anchorOffset,N=y.focusNode;y=y.focusOffset;try{p.nodeType,N.nodeType}catch{p=null;break e}var $=0,V=-1,te=-1,ve=0,_e=0,Ae=o,xe=null;t:for(;;){for(var ke;Ae!==p||C!==0&&Ae.nodeType!==3||(V=$+C),Ae!==N||y!==0&&Ae.nodeType!==3||(te=$+y),Ae.nodeType===3&&($+=Ae.nodeValue.length),(ke=Ae.firstChild)!==null;)xe=Ae,Ae=ke;for(;;){if(Ae===o)break t;if(xe===p&&++ve===C&&(V=$),xe===N&&++_e===y&&(te=$),(ke=Ae.nextSibling)!==null)break;Ae=xe,xe=Ae.parentNode}Ae=ke}p=V===-1||te===-1?null:{start:V,end:te}}else p=null}p=p||{start:0,end:0}}else p=null;for(i0={focusedElem:o,selectionRange:p},bm=!1,Kn=u;Kn!==null;)if(u=Kn,o=u.child,(u.subtreeFlags&1028)!==0&&o!==null)o.return=u,Kn=o;else for(;Kn!==null;){switch(u=Kn,N=u.alternate,o=u.flags,u.tag){case 0:if((o&4)!==0&&(o=u.updateQueue,o=o!==null?o.events:null,o!==null))for(p=0;p<o.length;p++)C=o[p],C.ref.impl=C.nextImpl;break;case 11:case 15:break;case 1:if((o&1024)!==0&&N!==null){o=void 0,p=u,C=N.memoizedProps,N=N.memoizedState,y=p.stateNode;try{var Ve=Po(p.type,C);o=y.getSnapshotBeforeUpdate(Ve,N),y.__reactInternalSnapshotBeforeUpdate=o}catch(it){Bt(p,p.return,it)}}break;case 3:if((o&1024)!==0){if(o=u.stateNode.containerInfo,p=o.nodeType,p===9)l0(o);else if(p===1)switch(o.nodeName){case"HEAD":case"HTML":case"BODY":l0(o);break;default:o.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((o&1024)!==0)throw Error(r(163))}if(o=u.sibling,o!==null){o.return=u.return,Kn=o;break}Kn=u.return}}function dM(o,u,p){var y=p.flags;switch(p.tag){case 0:case 11:case 15:Ii(o,p),y&4&&Xc(5,p);break;case 1:if(Ii(o,p),y&4)if(o=p.stateNode,u===null)try{o.componentDidMount()}catch($){Bt(p,p.return,$)}else{var C=Po(p.type,u.memoizedProps);u=u.memoizedState;try{o.componentDidUpdate(C,u,o.__reactInternalSnapshotBeforeUpdate)}catch($){Bt(p,p.return,$)}}y&64&&iM(p),y&512&&Zc(p,p.return);break;case 3:if(Ii(o,p),y&64&&(o=p.updateQueue,o!==null)){if(u=null,p.child!==null)switch(p.child.tag){case 27:case 5:u=p.child.stateNode;break;case 1:u=p.child.stateNode}try{YT(o,u)}catch($){Bt(p,p.return,$)}}break;case 27:u===null&&y&4&&uM(p);case 26:case 5:Ii(o,p),u===null&&y&4&&oM(p),y&512&&Zc(p,p.return);break;case 12:Ii(o,p);break;case 31:Ii(o,p),y&4&&mM(o,p);break;case 13:Ii(o,p),y&4&&pM(o,p),y&64&&(o=p.memoizedState,o!==null&&(o=o.dehydrated,o!==null&&(p=aZ.bind(null,p),kZ(o,p))));break;case 22:if(y=p.memoizedState!==null||Di,!y){u=u!==null&&u.memoizedState!==null||Tn,C=Di;var N=Tn;Di=y,(Tn=u)&&!N?Li(o,p,(p.subtreeFlags&8772)!==0):Ii(o,p),Di=C,Tn=N}break;case 30:break;default:Ii(o,p)}}function fM(o){var u=o.alternate;u!==null&&(o.alternate=null,fM(u)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(u=o.stateNode,u!==null&&po(u)),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}var an=null,jr=!1;function Ri(o,u,p){for(p=p.child;p!==null;)hM(o,u,p),p=p.sibling}function hM(o,u,p){if(lt&&typeof lt.onCommitFiberUnmount=="function")try{lt.onCommitFiberUnmount(gt,p)}catch{}switch(p.tag){case 26:Tn||Xa(p,u),Ri(o,u,p),p.memoizedState?p.memoizedState.count--:p.stateNode&&(p=p.stateNode,p.parentNode.removeChild(p));break;case 27:Tn||Xa(p,u);var y=an,C=jr;zs(p.type)&&(an=p.stateNode,jr=!1),Ri(o,u,p),sd(p.stateNode),an=y,jr=C;break;case 5:Tn||Xa(p,u);case 6:if(y=an,C=jr,an=null,Ri(o,u,p),an=y,jr=C,an!==null)if(jr)try{(an.nodeType===9?an.body:an.nodeName==="HTML"?an.ownerDocument.body:an).removeChild(p.stateNode)}catch(N){Bt(p,u,N)}else try{an.removeChild(p.stateNode)}catch(N){Bt(p,u,N)}break;case 18:an!==null&&(jr?(o=an,iP(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,p.stateNode),mu(o)):iP(an,p.stateNode));break;case 4:y=an,C=jr,an=p.stateNode.containerInfo,jr=!0,Ri(o,u,p),an=y,jr=C;break;case 0:case 11:case 14:case 15:Os(2,p,u),Tn||Os(4,p,u),Ri(o,u,p);break;case 1:Tn||(Xa(p,u),y=p.stateNode,typeof y.componentWillUnmount=="function"&&sM(p,u,y)),Ri(o,u,p);break;case 21:Ri(o,u,p);break;case 22:Tn=(y=Tn)||p.memoizedState!==null,Ri(o,u,p),Tn=y;break;default:Ri(o,u,p)}}function mM(o,u){if(u.memoizedState===null&&(o=u.alternate,o!==null&&(o=o.memoizedState,o!==null))){o=o.dehydrated;try{mu(o)}catch(p){Bt(u,u.return,p)}}}function pM(o,u){if(u.memoizedState===null&&(o=u.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null))))try{mu(o)}catch(p){Bt(u,u.return,p)}}function XX(o){switch(o.tag){case 31:case 13:case 19:var u=o.stateNode;return u===null&&(u=o.stateNode=new cM),u;case 22:return o=o.stateNode,u=o._retryCache,u===null&&(u=o._retryCache=new cM),u;default:throw Error(r(435,o.tag))}}function em(o,u){var p=XX(o);u.forEach(function(y){if(!p.has(y)){p.add(y);var C=iZ.bind(null,o,y);y.then(C,C)}})}function kr(o,u){var p=u.deletions;if(p!==null)for(var y=0;y<p.length;y++){var C=p[y],N=o,$=u,V=$;e:for(;V!==null;){switch(V.tag){case 27:if(zs(V.type)){an=V.stateNode,jr=!1;break e}break;case 5:an=V.stateNode,jr=!1;break e;case 3:case 4:an=V.stateNode.containerInfo,jr=!0;break e}V=V.return}if(an===null)throw Error(r(160));hM(N,$,C),an=null,jr=!1,N=C.alternate,N!==null&&(N.return=null),C.return=null}if(u.subtreeFlags&13886)for(u=u.child;u!==null;)gM(u,o),u=u.sibling}var Ca=null;function gM(o,u){var p=o.alternate,y=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:kr(u,o),_r(o),y&4&&(Os(3,o,o.return),Xc(3,o),Os(5,o,o.return));break;case 1:kr(u,o),_r(o),y&512&&(Tn||p===null||Xa(p,p.return)),y&64&&Di&&(o=o.updateQueue,o!==null&&(y=o.callbacks,y!==null&&(p=o.shared.hiddenCallbacks,o.shared.hiddenCallbacks=p===null?y:p.concat(y))));break;case 26:var C=Ca;if(kr(u,o),_r(o),y&512&&(Tn||p===null||Xa(p,p.return)),y&4){var N=p!==null?p.memoizedState:null;if(y=o.memoizedState,p===null)if(y===null)if(o.stateNode===null){e:{y=o.type,p=o.memoizedProps,C=C.ownerDocument||C;t:switch(y){case"title":N=C.getElementsByTagName("title")[0],(!N||N[ji]||N[jn]||N.namespaceURI==="http://www.w3.org/2000/svg"||N.hasAttribute("itemprop"))&&(N=C.createElement(y),C.head.insertBefore(N,C.querySelector("head > title"))),nr(N,y,p),N[jn]=o,gn(N),y=N;break e;case"link":var $=gP("link","href",C).get(y+(p.href||""));if($){for(var V=0;V<$.length;V++)if(N=$[V],N.getAttribute("href")===(p.href==null||p.href===""?null:p.href)&&N.getAttribute("rel")===(p.rel==null?null:p.rel)&&N.getAttribute("title")===(p.title==null?null:p.title)&&N.getAttribute("crossorigin")===(p.crossOrigin==null?null:p.crossOrigin)){$.splice(V,1);break t}}N=C.createElement(y),nr(N,y,p),C.head.appendChild(N);break;case"meta":if($=gP("meta","content",C).get(y+(p.content||""))){for(V=0;V<$.length;V++)if(N=$[V],N.getAttribute("content")===(p.content==null?null:""+p.content)&&N.getAttribute("name")===(p.name==null?null:p.name)&&N.getAttribute("property")===(p.property==null?null:p.property)&&N.getAttribute("http-equiv")===(p.httpEquiv==null?null:p.httpEquiv)&&N.getAttribute("charset")===(p.charSet==null?null:p.charSet)){$.splice(V,1);break t}}N=C.createElement(y),nr(N,y,p),C.head.appendChild(N);break;default:throw Error(r(468,y))}N[jn]=o,gn(N),y=N}o.stateNode=y}else vP(C,o.type,o.stateNode);else o.stateNode=pP(C,y,o.memoizedProps);else N!==y?(N===null?p.stateNode!==null&&(p=p.stateNode,p.parentNode.removeChild(p)):N.count--,y===null?vP(C,o.type,o.stateNode):pP(C,y,o.memoizedProps)):y===null&&o.stateNode!==null&&Dx(o,o.memoizedProps,p.memoizedProps)}break;case 27:kr(u,o),_r(o),y&512&&(Tn||p===null||Xa(p,p.return)),p!==null&&y&4&&Dx(o,o.memoizedProps,p.memoizedProps);break;case 5:if(kr(u,o),_r(o),y&512&&(Tn||p===null||Xa(p,p.return)),o.flags&32){C=o.stateNode;try{Ll(C,"")}catch(Ve){Bt(o,o.return,Ve)}}y&4&&o.stateNode!=null&&(C=o.memoizedProps,Dx(o,C,p!==null?p.memoizedProps:C)),y&1024&&(Lx=!0);break;case 6:if(kr(u,o),_r(o),y&4){if(o.stateNode===null)throw Error(r(162));y=o.memoizedProps,p=o.stateNode;try{p.nodeValue=y}catch(Ve){Bt(o,o.return,Ve)}}break;case 3:if(gm=null,C=Ca,Ca=mm(u.containerInfo),kr(u,o),Ca=C,_r(o),y&4&&p!==null&&p.memoizedState.isDehydrated)try{mu(u.containerInfo)}catch(Ve){Bt(o,o.return,Ve)}Lx&&(Lx=!1,vM(o));break;case 4:y=Ca,Ca=mm(o.stateNode.containerInfo),kr(u,o),_r(o),Ca=y;break;case 12:kr(u,o),_r(o);break;case 31:kr(u,o),_r(o),y&4&&(y=o.updateQueue,y!==null&&(o.updateQueue=null,em(o,y)));break;case 13:kr(u,o),_r(o),o.child.flags&8192&&o.memoizedState!==null!=(p!==null&&p.memoizedState!==null)&&(nm=Fe()),y&4&&(y=o.updateQueue,y!==null&&(o.updateQueue=null,em(o,y)));break;case 22:C=o.memoizedState!==null;var te=p!==null&&p.memoizedState!==null,ve=Di,_e=Tn;if(Di=ve||C,Tn=_e||te,kr(u,o),Tn=_e,Di=ve,_r(o),y&8192)e:for(u=o.stateNode,u._visibility=C?u._visibility&-2:u._visibility|1,C&&(p===null||te||Di||Tn||Do(o)),p=null,u=o;;){if(u.tag===5||u.tag===26){if(p===null){te=p=u;try{if(N=te.stateNode,C)$=N.style,typeof $.setProperty=="function"?$.setProperty("display","none","important"):$.display="none";else{V=te.stateNode;var Ae=te.memoizedProps.style,xe=Ae!=null&&Ae.hasOwnProperty("display")?Ae.display:null;V.style.display=xe==null||typeof xe=="boolean"?"":(""+xe).trim()}}catch(Ve){Bt(te,te.return,Ve)}}}else if(u.tag===6){if(p===null){te=u;try{te.stateNode.nodeValue=C?"":te.memoizedProps}catch(Ve){Bt(te,te.return,Ve)}}}else if(u.tag===18){if(p===null){te=u;try{var ke=te.stateNode;C?sP(ke,!0):sP(te.stateNode,!1)}catch(Ve){Bt(te,te.return,Ve)}}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===o)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===o)break e;for(;u.sibling===null;){if(u.return===null||u.return===o)break e;p===u&&(p=null),u=u.return}p===u&&(p=null),u.sibling.return=u.return,u=u.sibling}y&4&&(y=o.updateQueue,y!==null&&(p=y.retryQueue,p!==null&&(y.retryQueue=null,em(o,p))));break;case 19:kr(u,o),_r(o),y&4&&(y=o.updateQueue,y!==null&&(o.updateQueue=null,em(o,y)));break;case 30:break;case 21:break;default:kr(u,o),_r(o)}}function _r(o){var u=o.flags;if(u&2){try{for(var p,y=o.return;y!==null;){if(lM(y)){p=y;break}y=y.return}if(p==null)throw Error(r(160));switch(p.tag){case 27:var C=p.stateNode,N=Rx(o);Jh(o,N,C);break;case 5:var $=p.stateNode;p.flags&32&&(Ll($,""),p.flags&=-33);var V=Rx(o);Jh(o,V,$);break;case 3:case 4:var te=p.stateNode.containerInfo,ve=Rx(o);Ix(o,ve,te);break;default:throw Error(r(161))}}catch(_e){Bt(o,o.return,_e)}o.flags&=-3}u&4096&&(o.flags&=-4097)}function vM(o){if(o.subtreeFlags&1024)for(o=o.child;o!==null;){var u=o;vM(u),u.tag===5&&u.flags&1024&&u.stateNode.reset(),o=o.sibling}}function Ii(o,u){if(u.subtreeFlags&8772)for(u=u.child;u!==null;)dM(o,u.alternate,u),u=u.sibling}function Do(o){for(o=o.child;o!==null;){var u=o;switch(u.tag){case 0:case 11:case 14:case 15:Os(4,u,u.return),Do(u);break;case 1:Xa(u,u.return);var p=u.stateNode;typeof p.componentWillUnmount=="function"&&sM(u,u.return,p),Do(u);break;case 27:sd(u.stateNode);case 26:case 5:Xa(u,u.return),Do(u);break;case 22:u.memoizedState===null&&Do(u);break;case 30:Do(u);break;default:Do(u)}o=o.sibling}}function Li(o,u,p){for(p=p&&(u.subtreeFlags&8772)!==0,u=u.child;u!==null;){var y=u.alternate,C=o,N=u,$=N.flags;switch(N.tag){case 0:case 11:case 15:Li(C,N,p),Xc(4,N);break;case 1:if(Li(C,N,p),y=N,C=y.stateNode,typeof C.componentDidMount=="function")try{C.componentDidMount()}catch(ve){Bt(y,y.return,ve)}if(y=N,C=y.updateQueue,C!==null){var V=y.stateNode;try{var te=C.shared.hiddenCallbacks;if(te!==null)for(C.shared.hiddenCallbacks=null,C=0;C<te.length;C++)WT(te[C],V)}catch(ve){Bt(y,y.return,ve)}}p&&$&64&&iM(N),Zc(N,N.return);break;case 27:uM(N);case 26:case 5:Li(C,N,p),p&&y===null&&$&4&&oM(N),Zc(N,N.return);break;case 12:Li(C,N,p);break;case 31:Li(C,N,p),p&&$&4&&mM(C,N);break;case 13:Li(C,N,p),p&&$&4&&pM(C,N);break;case 22:N.memoizedState===null&&Li(C,N,p),Zc(N,N.return);break;case 30:break;default:Li(C,N,p)}u=u.sibling}}function zx(o,u){var p=null;o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(p=o.memoizedState.cachePool.pool),o=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(o=u.memoizedState.cachePool.pool),o!==p&&(o!=null&&o.refCount++,p!=null&&Lc(p))}function $x(o,u){o=null,u.alternate!==null&&(o=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==o&&(u.refCount++,o!=null&&Lc(o))}function Na(o,u,p,y){if(u.subtreeFlags&10256)for(u=u.child;u!==null;)yM(o,u,p,y),u=u.sibling}function yM(o,u,p,y){var C=u.flags;switch(u.tag){case 0:case 11:case 15:Na(o,u,p,y),C&2048&&Xc(9,u);break;case 1:Na(o,u,p,y);break;case 3:Na(o,u,p,y),C&2048&&(o=null,u.alternate!==null&&(o=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==o&&(u.refCount++,o!=null&&Lc(o)));break;case 12:if(C&2048){Na(o,u,p,y),o=u.stateNode;try{var N=u.memoizedProps,$=N.id,V=N.onPostCommit;typeof V=="function"&&V($,u.alternate===null?"mount":"update",o.passiveEffectDuration,-0)}catch(te){Bt(u,u.return,te)}}else Na(o,u,p,y);break;case 31:Na(o,u,p,y);break;case 13:Na(o,u,p,y);break;case 23:break;case 22:N=u.stateNode,$=u.alternate,u.memoizedState!==null?N._visibility&2?Na(o,u,p,y):Qc(o,u):N._visibility&2?Na(o,u,p,y):(N._visibility|=2,ru(o,u,p,y,(u.subtreeFlags&10256)!==0||!1)),C&2048&&zx($,u);break;case 24:Na(o,u,p,y),C&2048&&$x(u.alternate,u);break;default:Na(o,u,p,y)}}function ru(o,u,p,y,C){for(C=C&&((u.subtreeFlags&10256)!==0||!1),u=u.child;u!==null;){var N=o,$=u,V=p,te=y,ve=$.flags;switch($.tag){case 0:case 11:case 15:ru(N,$,V,te,C),Xc(8,$);break;case 23:break;case 22:var _e=$.stateNode;$.memoizedState!==null?_e._visibility&2?ru(N,$,V,te,C):Qc(N,$):(_e._visibility|=2,ru(N,$,V,te,C)),C&&ve&2048&&zx($.alternate,$);break;case 24:ru(N,$,V,te,C),C&&ve&2048&&$x($.alternate,$);break;default:ru(N,$,V,te,C)}u=u.sibling}}function Qc(o,u){if(u.subtreeFlags&10256)for(u=u.child;u!==null;){var p=o,y=u,C=y.flags;switch(y.tag){case 22:Qc(p,y),C&2048&&zx(y.alternate,y);break;case 24:Qc(p,y),C&2048&&$x(y.alternate,y);break;default:Qc(p,y)}u=u.sibling}}var Jc=8192;function au(o,u,p){if(o.subtreeFlags&Jc)for(o=o.child;o!==null;)xM(o,u,p),o=o.sibling}function xM(o,u,p){switch(o.tag){case 26:au(o,u,p),o.flags&Jc&&o.memoizedState!==null&&IZ(p,Ca,o.memoizedState,o.memoizedProps);break;case 5:au(o,u,p);break;case 3:case 4:var y=Ca;Ca=mm(o.stateNode.containerInfo),au(o,u,p),Ca=y;break;case 22:o.memoizedState===null&&(y=o.alternate,y!==null&&y.memoizedState!==null?(y=Jc,Jc=16777216,au(o,u,p),Jc=y):au(o,u,p));break;default:au(o,u,p)}}function bM(o){var u=o.alternate;if(u!==null&&(o=u.child,o!==null)){u.child=null;do u=o.sibling,o.sibling=null,o=u;while(o!==null)}}function ed(o){var u=o.deletions;if((o.flags&16)!==0){if(u!==null)for(var p=0;p<u.length;p++){var y=u[p];Kn=y,SM(y,o)}bM(o)}if(o.subtreeFlags&10256)for(o=o.child;o!==null;)wM(o),o=o.sibling}function wM(o){switch(o.tag){case 0:case 11:case 15:ed(o),o.flags&2048&&Os(9,o,o.return);break;case 3:ed(o);break;case 12:ed(o);break;case 22:var u=o.stateNode;o.memoizedState!==null&&u._visibility&2&&(o.return===null||o.return.tag!==13)?(u._visibility&=-3,tm(o)):ed(o);break;default:ed(o)}}function tm(o){var u=o.deletions;if((o.flags&16)!==0){if(u!==null)for(var p=0;p<u.length;p++){var y=u[p];Kn=y,SM(y,o)}bM(o)}for(o=o.child;o!==null;){switch(u=o,u.tag){case 0:case 11:case 15:Os(8,u,u.return),tm(u);break;case 22:p=u.stateNode,p._visibility&2&&(p._visibility&=-3,tm(u));break;default:tm(u)}o=o.sibling}}function SM(o,u){for(;Kn!==null;){var p=Kn;switch(p.tag){case 0:case 11:case 15:Os(8,p,u);break;case 23:case 22:if(p.memoizedState!==null&&p.memoizedState.cachePool!==null){var y=p.memoizedState.cachePool.pool;y!=null&&y.refCount++}break;case 24:Lc(p.memoizedState.cache)}if(y=p.child,y!==null)y.return=p,Kn=y;else e:for(p=o;Kn!==null;){y=Kn;var C=y.sibling,N=y.return;if(fM(y),y===p){Kn=null;break e}if(C!==null){C.return=N,Kn=C;break e}Kn=N}}}var ZX={getCacheForType:function(o){var u=er(Nn),p=u.data.get(o);return p===void 0&&(p=o(),u.data.set(o,p)),p},cacheSignal:function(){return er(Nn).controller.signal}},QX=typeof WeakMap=="function"?WeakMap:Map,Lt=0,Kt=null,xt=null,jt=0,qt=0,Br=null,Ms=!1,iu=!1,qx=!1,zi=0,xn=0,Ps=0,Ro=0,Bx=0,Fr=0,su=0,td=null,Cr=null,Fx=!1,nm=0,jM=0,rm=1/0,am=null,Ds=null,Ln=0,Rs=null,ou=null,$i=0,Hx=0,Ux=null,kM=null,nd=0,Gx=null;function Hr(){return(Lt&2)!==0&&jt!==0?jt&-jt:L.T!==null?Zx():Ml()}function _M(){if(Fr===0)if((jt&536870912)===0||_t){var o=Je;Je<<=1,(Je&3932160)===0&&(Je=262144),Fr=o}else Fr=536870912;return o=$r.current,o!==null&&(o.flags|=32),Fr}function Nr(o,u,p){(o===Kt&&(qt===2||qt===9)||o.cancelPendingCommit!==null)&&(lu(o,0),Is(o,jt,Fr,!1)),ze(o,p),((Lt&2)===0||o!==Kt)&&(o===Kt&&((Lt&2)===0&&(Ro|=p),xn===4&&Is(o,jt,Fr,!1)),Za(o))}function CM(o,u,p){if((Lt&6)!==0)throw Error(r(327));var y=!p&&(u&127)===0&&(u&o.expiredLanes)===0||ne(o,u),C=y?tZ(o,u):Kx(o,u,!0),N=y;do{if(C===0){iu&&!y&&Is(o,u,0,!1);break}else{if(p=o.current.alternate,N&&!JX(p)){C=Kx(o,u,!1),N=!1;continue}if(C===2){if(N=u,o.errorRecoveryDisabledLanes&N)var $=0;else $=o.pendingLanes&-536870913,$=$!==0?$:$&536870912?536870912:0;if($!==0){u=$;e:{var V=o;C=td;var te=V.current.memoizedState.isDehydrated;if(te&&(lu(V,$).flags|=256),$=Kx(V,$,!1),$!==2){if(qx&&!te){V.errorRecoveryDisabledLanes|=N,Ro|=N,C=4;break e}N=Cr,Cr=C,N!==null&&(Cr===null?Cr=N:Cr.push.apply(Cr,N))}C=$}if(N=!1,C!==2)continue}}if(C===1){lu(o,0),Is(o,u,0,!0);break}e:{switch(y=o,N=C,N){case 0:case 1:throw Error(r(345));case 4:if((u&4194048)!==u)break;case 6:Is(y,u,Fr,!Ms);break e;case 2:Cr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((u&62914560)===u&&(C=nm+300-Fe(),10<C)){if(Is(y,u,Fr,!Ms),hn(y,0,!0)!==0)break e;$i=u,y.timeoutHandle=rP(NM.bind(null,y,p,Cr,am,Fx,u,Fr,Ro,su,Ms,N,"Throttled",-0,0),C);break e}NM(y,p,Cr,am,Fx,u,Fr,Ro,su,Ms,N,null,-0,0)}}break}while(!0);Za(o)}function NM(o,u,p,y,C,N,$,V,te,ve,_e,Ae,xe,ke){if(o.timeoutHandle=-1,Ae=u.subtreeFlags,Ae&8192||(Ae&16785408)===16785408){Ae={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ki},xM(u,N,Ae);var Ve=(N&62914560)===N?nm-Fe():(N&4194048)===N?jM-Fe():0;if(Ve=LZ(Ae,Ve),Ve!==null){$i=N,o.cancelPendingCommit=Ve(RM.bind(null,o,u,N,p,y,C,$,V,te,_e,Ae,null,xe,ke)),Is(o,N,$,!ve);return}}RM(o,u,N,p,y,C,$,V,te)}function JX(o){for(var u=o;;){var p=u.tag;if((p===0||p===11||p===15)&&u.flags&16384&&(p=u.updateQueue,p!==null&&(p=p.stores,p!==null)))for(var y=0;y<p.length;y++){var C=p[y],N=C.getSnapshot;C=C.value;try{if(!Lr(N(),C))return!1}catch{return!1}}if(p=u.child,u.subtreeFlags&16384&&p!==null)p.return=u,u=p;else{if(u===o)break;for(;u.sibling===null;){if(u.return===null||u.return===o)return!0;u=u.return}u.sibling.return=u.return,u=u.sibling}}return!0}function Is(o,u,p,y){u&=~Bx,u&=~Ro,o.suspendedLanes|=u,o.pingedLanes&=~u,y&&(o.warmLanes|=u),y=o.expirationTimes;for(var C=u;0<C;){var N=31-$e(C),$=1<<N;y[N]=-1,C&=~$}p!==0&&Vt(o,p,u)}function im(){return(Lt&6)===0?(rd(0),!1):!0}function Vx(){if(xt!==null){if(qt===0)var o=xt.return;else o=xt,Ei=Co=null,lx(o),Ql=null,$c=0,o=xt;for(;o!==null;)aM(o.alternate,o),o=o.return;xt=null}}function lu(o,u){var p=o.timeoutHandle;p!==-1&&(o.timeoutHandle=-1,xZ(p)),p=o.cancelPendingCommit,p!==null&&(o.cancelPendingCommit=null,p()),$i=0,Vx(),Kt=o,xt=p=Ci(o.current,null),jt=u,qt=0,Br=null,Ms=!1,iu=ne(o,u),qx=!1,su=Fr=Bx=Ro=Ps=xn=0,Cr=td=null,Fx=!1,(u&8)!==0&&(u|=u&32);var y=o.entangledLanes;if(y!==0)for(o=o.entanglements,y&=u;0<y;){var C=31-$e(y),N=1<<C;u|=o[C],y&=~N}return zi=u,Ch(),p}function EM(o,u){dt=null,L.H=Kc,u===Zl||u===Dh?(u=UT(),qt=3):u===Xy?(u=UT(),qt=4):qt=u===kx?8:u!==null&&typeof u=="object"&&typeof u.then=="function"?6:1,Br=u,xt===null&&(xn=1,Wh(o,aa(u,o.current)))}function AM(){var o=$r.current;return o===null?!0:(jt&4194048)===jt?la===null:(jt&62914560)===jt||(jt&536870912)!==0?o===la:!1}function TM(){var o=L.H;return L.H=Kc,o===null?Kc:o}function OM(){var o=L.A;return L.A=ZX,o}function sm(){xn=4,Ms||(jt&4194048)!==jt&&$r.current!==null||(iu=!0),(Ps&134217727)===0&&(Ro&134217727)===0||Kt===null||Is(Kt,jt,Fr,!1)}function Kx(o,u,p){var y=Lt;Lt|=2;var C=TM(),N=OM();(Kt!==o||jt!==u)&&(am=null,lu(o,u)),u=!1;var $=xn;e:do try{if(qt!==0&&xt!==null){var V=xt,te=Br;switch(qt){case 8:Vx(),$=6;break e;case 3:case 2:case 9:case 6:$r.current===null&&(u=!0);var ve=qt;if(qt=0,Br=null,uu(o,V,te,ve),p&&iu){$=0;break e}break;default:ve=qt,qt=0,Br=null,uu(o,V,te,ve)}}eZ(),$=xn;break}catch(_e){EM(o,_e)}while(!0);return u&&o.shellSuspendCounter++,Ei=Co=null,Lt=y,L.H=C,L.A=N,xt===null&&(Kt=null,jt=0,Ch()),$}function eZ(){for(;xt!==null;)MM(xt)}function tZ(o,u){var p=Lt;Lt|=2;var y=TM(),C=OM();Kt!==o||jt!==u?(am=null,rm=Fe()+500,lu(o,u)):iu=ne(o,u);e:do try{if(qt!==0&&xt!==null){u=xt;var N=Br;t:switch(qt){case 1:qt=0,Br=null,uu(o,u,N,1);break;case 2:case 9:if(FT(N)){qt=0,Br=null,PM(u);break}u=function(){qt!==2&&qt!==9||Kt!==o||(qt=7),Za(o)},N.then(u,u);break e;case 3:qt=7;break e;case 4:qt=5;break e;case 7:FT(N)?(qt=0,Br=null,PM(u)):(qt=0,Br=null,uu(o,u,N,7));break;case 5:var $=null;switch(xt.tag){case 26:$=xt.memoizedState;case 5:case 27:var V=xt;if($?yP($):V.stateNode.complete){qt=0,Br=null;var te=V.sibling;if(te!==null)xt=te;else{var ve=V.return;ve!==null?(xt=ve,om(ve)):xt=null}break t}}qt=0,Br=null,uu(o,u,N,5);break;case 6:qt=0,Br=null,uu(o,u,N,6);break;case 8:Vx(),xn=6;break e;default:throw Error(r(462))}}nZ();break}catch(_e){EM(o,_e)}while(!0);return Ei=Co=null,L.H=y,L.A=C,Lt=p,xt!==null?0:(Kt=null,jt=0,Ch(),xn)}function nZ(){for(;xt!==null&&!at();)MM(xt)}function MM(o){var u=nM(o.alternate,o,zi);o.memoizedProps=o.pendingProps,u===null?om(o):xt=u}function PM(o){var u=o,p=u.alternate;switch(u.tag){case 15:case 0:u=XO(p,u,u.pendingProps,u.type,void 0,jt);break;case 11:u=XO(p,u,u.pendingProps,u.type.render,u.ref,jt);break;case 5:lx(u);default:aM(p,u),u=xt=OT(u,zi),u=nM(p,u,zi)}o.memoizedProps=o.pendingProps,u===null?om(o):xt=u}function uu(o,u,p,y){Ei=Co=null,lx(u),Ql=null,$c=0;var C=u.return;try{if(UX(o,C,u,p,jt)){xn=1,Wh(o,aa(p,o.current)),xt=null;return}}catch(N){if(C!==null)throw xt=C,N;xn=1,Wh(o,aa(p,o.current)),xt=null;return}u.flags&32768?(_t||y===1?o=!0:iu||(jt&536870912)!==0?o=!1:(Ms=o=!0,(y===2||y===9||y===3||y===6)&&(y=$r.current,y!==null&&y.tag===13&&(y.flags|=16384))),DM(u,o)):om(u)}function om(o){var u=o;do{if((u.flags&32768)!==0){DM(u,Ms);return}o=u.return;var p=KX(u.alternate,u,zi);if(p!==null){xt=p;return}if(u=u.sibling,u!==null){xt=u;return}xt=u=o}while(u!==null);xn===0&&(xn=5)}function DM(o,u){do{var p=WX(o.alternate,o);if(p!==null){p.flags&=32767,xt=p;return}if(p=o.return,p!==null&&(p.flags|=32768,p.subtreeFlags=0,p.deletions=null),!u&&(o=o.sibling,o!==null)){xt=o;return}xt=o=p}while(o!==null);xn=6,xt=null}function RM(o,u,p,y,C,N,$,V,te){o.cancelPendingCommit=null;do lm();while(Ln!==0);if((Lt&6)!==0)throw Error(r(327));if(u!==null){if(u===o.current)throw Error(r(177));if(N=u.lanes|u.childLanes,N|=Ry,ft(o,p,N,$,V,te),o===Kt&&(xt=Kt=null,jt=0),ou=u,Rs=o,$i=p,Hx=N,Ux=C,kM=y,(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?(o.callbackNode=null,o.callbackPriority=0,sZ(Oe,function(){return qM(),null})):(o.callbackNode=null,o.callbackPriority=0),y=(u.flags&13878)!==0,(u.subtreeFlags&13878)!==0||y){y=L.T,L.T=null,C=G.p,G.p=2,$=Lt,Lt|=4;try{YX(o,u,p)}finally{Lt=$,G.p=C,L.T=y}}Ln=1,IM(),LM(),zM()}}function IM(){if(Ln===1){Ln=0;var o=Rs,u=ou,p=(u.flags&13878)!==0;if((u.subtreeFlags&13878)!==0||p){p=L.T,L.T=null;var y=G.p;G.p=2;var C=Lt;Lt|=4;try{gM(u,o);var N=i0,$=ST(o.containerInfo),V=N.focusedElem,te=N.selectionRange;if($!==V&&V&&V.ownerDocument&&wT(V.ownerDocument.documentElement,V)){if(te!==null&&Ty(V)){var ve=te.start,_e=te.end;if(_e===void 0&&(_e=ve),"selectionStart"in V)V.selectionStart=ve,V.selectionEnd=Math.min(_e,V.value.length);else{var Ae=V.ownerDocument||document,xe=Ae&&Ae.defaultView||window;if(xe.getSelection){var ke=xe.getSelection(),Ve=V.textContent.length,it=Math.min(te.start,Ve),Ut=te.end===void 0?it:Math.min(te.end,Ve);!ke.extend&&it>Ut&&($=Ut,Ut=it,it=$);var de=bT(V,it),ie=bT(V,Ut);if(de&&ie&&(ke.rangeCount!==1||ke.anchorNode!==de.node||ke.anchorOffset!==de.offset||ke.focusNode!==ie.node||ke.focusOffset!==ie.offset)){var ge=Ae.createRange();ge.setStart(de.node,de.offset),ke.removeAllRanges(),it>Ut?(ke.addRange(ge),ke.extend(ie.node,ie.offset)):(ge.setEnd(ie.node,ie.offset),ke.addRange(ge))}}}}for(Ae=[],ke=V;ke=ke.parentNode;)ke.nodeType===1&&Ae.push({element:ke,left:ke.scrollLeft,top:ke.scrollTop});for(typeof V.focus=="function"&&V.focus(),V=0;V<Ae.length;V++){var Ee=Ae[V];Ee.element.scrollLeft=Ee.left,Ee.element.scrollTop=Ee.top}}bm=!!a0,i0=a0=null}finally{Lt=C,G.p=y,L.T=p}}o.current=u,Ln=2}}function LM(){if(Ln===2){Ln=0;var o=Rs,u=ou,p=(u.flags&8772)!==0;if((u.subtreeFlags&8772)!==0||p){p=L.T,L.T=null;var y=G.p;G.p=2;var C=Lt;Lt|=4;try{dM(o,u.alternate,u)}finally{Lt=C,G.p=y,L.T=p}}Ln=3}}function zM(){if(Ln===4||Ln===3){Ln=0,Ne();var o=Rs,u=ou,p=$i,y=kM;(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?Ln=5:(Ln=0,ou=Rs=null,$M(o,o.pendingLanes));var C=o.pendingLanes;if(C===0&&(Ds=null),Dr(p),u=u.stateNode,lt&&typeof lt.onCommitFiberRoot=="function")try{lt.onCommitFiberRoot(gt,u,void 0,(u.current.flags&128)===128)}catch{}if(y!==null){u=L.T,C=G.p,G.p=2,L.T=null;try{for(var N=o.onRecoverableError,$=0;$<y.length;$++){var V=y[$];N(V.value,{componentStack:V.stack})}}finally{L.T=u,G.p=C}}($i&3)!==0&&lm(),Za(o),C=o.pendingLanes,(p&261930)!==0&&(C&42)!==0?o===Gx?nd++:(nd=0,Gx=o):nd=0,rd(0)}}function $M(o,u){(o.pooledCacheLanes&=u)===0&&(u=o.pooledCache,u!=null&&(o.pooledCache=null,Lc(u)))}function lm(){return IM(),LM(),zM(),qM()}function qM(){if(Ln!==5)return!1;var o=Rs,u=Hx;Hx=0;var p=Dr($i),y=L.T,C=G.p;try{G.p=32>p?32:p,L.T=null,p=Ux,Ux=null;var N=Rs,$=$i;if(Ln=0,ou=Rs=null,$i=0,(Lt&6)!==0)throw Error(r(331));var V=Lt;if(Lt|=4,wM(N.current),yM(N,N.current,$,p),Lt=V,rd(0,!1),lt&&typeof lt.onPostCommitFiberRoot=="function")try{lt.onPostCommitFiberRoot(gt,N)}catch{}return!0}finally{G.p=C,L.T=y,$M(o,u)}}function BM(o,u,p){u=aa(p,u),u=jx(o.stateNode,u,2),o=Es(o,u,2),o!==null&&(ze(o,2),Za(o))}function Bt(o,u,p){if(o.tag===3)BM(o,o,p);else for(;u!==null;){if(u.tag===3){BM(u,o,p);break}else if(u.tag===1){var y=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(Ds===null||!Ds.has(y))){o=aa(p,o),p=FO(2),y=Es(u,p,2),y!==null&&(HO(p,y,u,o),ze(y,2),Za(y));break}}u=u.return}}function Wx(o,u,p){var y=o.pingCache;if(y===null){y=o.pingCache=new QX;var C=new Set;y.set(u,C)}else C=y.get(u),C===void 0&&(C=new Set,y.set(u,C));C.has(p)||(qx=!0,C.add(p),o=rZ.bind(null,o,u,p),u.then(o,o))}function rZ(o,u,p){var y=o.pingCache;y!==null&&y.delete(u),o.pingedLanes|=o.suspendedLanes&p,o.warmLanes&=~p,Kt===o&&(jt&p)===p&&(xn===4||xn===3&&(jt&62914560)===jt&&300>Fe()-nm?(Lt&2)===0&&lu(o,0):Bx|=p,su===jt&&(su=0)),Za(o)}function FM(o,u){u===0&&(u=Se()),o=jo(o,u),o!==null&&(ze(o,u),Za(o))}function aZ(o){var u=o.memoizedState,p=0;u!==null&&(p=u.retryLane),FM(o,p)}function iZ(o,u){var p=0;switch(o.tag){case 31:case 13:var y=o.stateNode,C=o.memoizedState;C!==null&&(p=C.retryLane);break;case 19:y=o.stateNode;break;case 22:y=o.stateNode._retryCache;break;default:throw Error(r(314))}y!==null&&y.delete(u),FM(o,p)}function sZ(o,u){return Xe(o,u)}var um=null,cu=null,Yx=!1,cm=!1,Xx=!1,Ls=0;function Za(o){o!==cu&&o.next===null&&(cu===null?um=cu=o:cu=cu.next=o),cm=!0,Yx||(Yx=!0,lZ())}function rd(o,u){if(!Xx&&cm){Xx=!0;do for(var p=!1,y=um;y!==null;){if(o!==0){var C=y.pendingLanes;if(C===0)var N=0;else{var $=y.suspendedLanes,V=y.pingedLanes;N=(1<<31-$e(42|o)+1)-1,N&=C&~($&~V),N=N&201326741?N&201326741|1:N?N|2:0}N!==0&&(p=!0,VM(y,N))}else N=jt,N=hn(y,y===Kt?N:0,y.cancelPendingCommit!==null||y.timeoutHandle!==-1),(N&3)===0||ne(y,N)||(p=!0,VM(y,N));y=y.next}while(p);Xx=!1}}function oZ(){HM()}function HM(){cm=Yx=!1;var o=0;Ls!==0&&yZ()&&(o=Ls);for(var u=Fe(),p=null,y=um;y!==null;){var C=y.next,N=UM(y,u);N===0?(y.next=null,p===null?um=C:p.next=C,C===null&&(cu=p)):(p=y,(o!==0||(N&3)!==0)&&(cm=!0)),y=C}Ln!==0&&Ln!==5||rd(o),Ls!==0&&(Ls=0)}function UM(o,u){for(var p=o.suspendedLanes,y=o.pingedLanes,C=o.expirationTimes,N=o.pendingLanes&-62914561;0<N;){var $=31-$e(N),V=1<<$,te=C[$];te===-1?((V&p)===0||(V&y)!==0)&&(C[$]=we(V,u)):te<=u&&(o.expiredLanes|=V),N&=~V}if(u=Kt,p=jt,p=hn(o,o===u?p:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),y=o.callbackNode,p===0||o===u&&(qt===2||qt===9)||o.cancelPendingCommit!==null)return y!==null&&y!==null&&We(y),o.callbackNode=null,o.callbackPriority=0;if((p&3)===0||ne(o,p)){if(u=p&-p,u===o.callbackPriority)return u;switch(y!==null&&We(y),Dr(p)){case 2:case 8:p=me;break;case 32:p=Oe;break;case 268435456:p=be;break;default:p=Oe}return y=GM.bind(null,o),p=Xe(p,y),o.callbackPriority=u,o.callbackNode=p,u}return y!==null&&y!==null&&We(y),o.callbackPriority=2,o.callbackNode=null,2}function GM(o,u){if(Ln!==0&&Ln!==5)return o.callbackNode=null,o.callbackPriority=0,null;var p=o.callbackNode;if(lm()&&o.callbackNode!==p)return null;var y=jt;return y=hn(o,o===Kt?y:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),y===0?null:(CM(o,y,u),UM(o,Fe()),o.callbackNode!=null&&o.callbackNode===p?GM.bind(null,o):null)}function VM(o,u){if(lm())return null;CM(o,u,!0)}function lZ(){bZ(function(){(Lt&6)!==0?Xe(le,oZ):HM()})}function Zx(){if(Ls===0){var o=Yl;o===0&&(o=Et,Et<<=1,(Et&261888)===0&&(Et=256)),Ls=o}return Ls}function KM(o){return o==null||typeof o=="symbol"||typeof o=="boolean"?null:typeof o=="function"?o:yh(""+o)}function WM(o,u){var p=u.ownerDocument.createElement("input");return p.name=u.name,p.value=u.value,o.id&&p.setAttribute("form",o.id),u.parentNode.insertBefore(p,u),o=new FormData(o),p.parentNode.removeChild(p),o}function uZ(o,u,p,y,C){if(u==="submit"&&p&&p.stateNode===C){var N=KM((C[Gn]||null).action),$=y.submitter;$&&(u=(u=$[Gn]||null)?KM(u.formAction):$.getAttribute("formAction"),u!==null&&(N=u,$=null));var V=new Sh("action","action",null,y,C);o.push({event:V,listeners:[{instance:null,listener:function(){if(y.defaultPrevented){if(Ls!==0){var te=$?WM(C,$):new FormData(C);vx(p,{pending:!0,data:te,method:C.method,action:N},null,te)}}else typeof N=="function"&&(V.preventDefault(),te=$?WM(C,$):new FormData(C),vx(p,{pending:!0,data:te,method:C.method,action:N},N,te))},currentTarget:C}]})}}for(var Qx=0;Qx<Dy.length;Qx++){var Jx=Dy[Qx],cZ=Jx.toLowerCase(),dZ=Jx[0].toUpperCase()+Jx.slice(1);_a(cZ,"on"+dZ)}_a(_T,"onAnimationEnd"),_a(CT,"onAnimationIteration"),_a(NT,"onAnimationStart"),_a("dblclick","onDoubleClick"),_a("focusin","onFocus"),_a("focusout","onBlur"),_a(NX,"onTransitionRun"),_a(EX,"onTransitionStart"),_a(AX,"onTransitionCancel"),_a(ET,"onTransitionEnd"),wr("onMouseEnter",["mouseout","mouseover"]),wr("onMouseLeave",["mouseout","mouseover"]),wr("onPointerEnter",["pointerout","pointerover"]),wr("onPointerLeave",["pointerout","pointerover"]),Vn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Vn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Vn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Vn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Vn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Vn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ad="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(" "),fZ=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ad));function YM(o,u){u=(u&4)!==0;for(var p=0;p<o.length;p++){var y=o[p],C=y.event;y=y.listeners;e:{var N=void 0;if(u)for(var $=y.length-1;0<=$;$--){var V=y[$],te=V.instance,ve=V.currentTarget;if(V=V.listener,te!==N&&C.isPropagationStopped())break e;N=V,C.currentTarget=ve;try{N(C)}catch(_e){_h(_e)}C.currentTarget=null,N=te}else for($=0;$<y.length;$++){if(V=y[$],te=V.instance,ve=V.currentTarget,V=V.listener,te!==N&&C.isPropagationStopped())break e;N=V,C.currentTarget=ve;try{N(C)}catch(_e){_h(_e)}C.currentTarget=null,N=te}}}}function bt(o,u){var p=u[ys];p===void 0&&(p=u[ys]=new Set);var y=o+"__bubble";p.has(y)||(XM(u,o,2,!1),p.add(y))}function e0(o,u,p){var y=0;u&&(y|=4),XM(p,o,y,u)}var dm="_reactListening"+Math.random().toString(36).slice(2);function t0(o){if(!o[dm]){o[dm]=!0,go.forEach(function(p){p!=="selectionchange"&&(fZ.has(p)||e0(p,!1,o),e0(p,!0,o))});var u=o.nodeType===9?o:o.ownerDocument;u===null||u[dm]||(u[dm]=!0,e0("selectionchange",!1,u))}}function XM(o,u,p,y){switch(_P(u)){case 2:var C=qZ;break;case 8:C=BZ;break;default:C=g0}p=C.bind(null,u,p,o),C=void 0,!wy||u!=="touchstart"&&u!=="touchmove"&&u!=="wheel"||(C=!0),y?C!==void 0?o.addEventListener(u,p,{capture:!0,passive:C}):o.addEventListener(u,p,!0):C!==void 0?o.addEventListener(u,p,{passive:C}):o.addEventListener(u,p,!1)}function n0(o,u,p,y,C){var N=y;if((u&1)===0&&(u&2)===0&&y!==null)e:for(;;){if(y===null)return;var $=y.tag;if($===3||$===4){var V=y.stateNode.containerInfo;if(V===C)break;if($===4)for($=y.return;$!==null;){var te=$.tag;if((te===3||te===4)&&$.stateNode.containerInfo===C)return;$=$.return}for(;V!==null;){if($=Ua(V),$===null)return;if(te=$.tag,te===5||te===6||te===26||te===27){y=N=$;continue e}V=V.parentNode}}y=y.return}tT(function(){var ve=N,_e=xy(p),Ae=[];e:{var xe=AT.get(o);if(xe!==void 0){var ke=Sh,Ve=o;switch(o){case"keypress":if(bh(p)===0)break e;case"keydown":case"keyup":ke=iX;break;case"focusin":Ve="focus",ke=_y;break;case"focusout":Ve="blur",ke=_y;break;case"beforeblur":case"afterblur":ke=_y;break;case"click":if(p.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ke=aT;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ke=KY;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ke=lX;break;case _T:case CT:case NT:ke=XY;break;case ET:ke=cX;break;case"scroll":case"scrollend":ke=GY;break;case"wheel":ke=fX;break;case"copy":case"cut":case"paste":ke=QY;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ke=sT;break;case"toggle":case"beforetoggle":ke=mX}var it=(u&4)!==0,Ut=!it&&(o==="scroll"||o==="scrollend"),de=it?xe!==null?xe+"Capture":null:xe;it=[];for(var ie=ve,ge;ie!==null;){var Ee=ie;if(ge=Ee.stateNode,Ee=Ee.tag,Ee!==5&&Ee!==26&&Ee!==27||ge===null||de===null||(Ee=Cc(ie,de),Ee!=null&&it.push(id(ie,Ee,ge))),Ut)break;ie=ie.return}0<it.length&&(xe=new ke(xe,Ve,null,p,_e),Ae.push({event:xe,listeners:it}))}}if((u&7)===0){e:{if(xe=o==="mouseover"||o==="pointerover",ke=o==="mouseout"||o==="pointerout",xe&&p!==yy&&(Ve=p.relatedTarget||p.fromElement)&&(Ua(Ve)||Ve[Sa]))break e;if((ke||xe)&&(xe=_e.window===_e?_e:(xe=_e.ownerDocument)?xe.defaultView||xe.parentWindow:window,ke?(Ve=p.relatedTarget||p.toElement,ke=ve,Ve=Ve?Ua(Ve):null,Ve!==null&&(Ut=i(Ve),it=Ve.tag,Ve!==Ut||it!==5&&it!==27&&it!==6)&&(Ve=null)):(ke=null,Ve=ve),ke!==Ve)){if(it=aT,Ee="onMouseLeave",de="onMouseEnter",ie="mouse",(o==="pointerout"||o==="pointerover")&&(it=sT,Ee="onPointerLeave",de="onPointerEnter",ie="pointer"),Ut=ke==null?xe:Va(ke),ge=Ve==null?xe:Va(Ve),xe=new it(Ee,ie+"leave",ke,p,_e),xe.target=Ut,xe.relatedTarget=ge,Ee=null,Ua(_e)===ve&&(it=new it(de,ie+"enter",Ve,p,_e),it.target=ge,it.relatedTarget=Ut,Ee=it),Ut=Ee,ke&&Ve)t:{for(it=hZ,de=ke,ie=Ve,ge=0,Ee=de;Ee;Ee=it(Ee))ge++;Ee=0;for(var tt=ie;tt;tt=it(tt))Ee++;for(;0<ge-Ee;)de=it(de),ge--;for(;0<Ee-ge;)ie=it(ie),Ee--;for(;ge--;){if(de===ie||ie!==null&&de===ie.alternate){it=de;break t}de=it(de),ie=it(ie)}it=null}else it=null;ke!==null&&ZM(Ae,xe,ke,it,!1),Ve!==null&&Ut!==null&&ZM(Ae,Ut,Ve,it,!0)}}e:{if(xe=ve?Va(ve):window,ke=xe.nodeName&&xe.nodeName.toLowerCase(),ke==="select"||ke==="input"&&xe.type==="file")var Mt=mT;else if(fT(xe))if(pT)Mt=kX;else{Mt=SX;var Ye=wX}else ke=xe.nodeName,!ke||ke.toLowerCase()!=="input"||xe.type!=="checkbox"&&xe.type!=="radio"?ve&&vy(ve.elementType)&&(Mt=mT):Mt=jX;if(Mt&&(Mt=Mt(o,ve))){hT(Ae,Mt,p,_e);break e}Ye&&Ye(o,xe,ve),o==="focusout"&&ve&&xe.type==="number"&&ve.memoizedProps.value!=null&&xo(xe,"number",xe.value)}switch(Ye=ve?Va(ve):window,o){case"focusin":(fT(Ye)||Ye.contentEditable==="true")&&(Bl=Ye,Oy=ve,Dc=null);break;case"focusout":Dc=Oy=Bl=null;break;case"mousedown":My=!0;break;case"contextmenu":case"mouseup":case"dragend":My=!1,jT(Ae,p,_e);break;case"selectionchange":if(CX)break;case"keydown":case"keyup":jT(Ae,p,_e)}var mt;if(Ny)e:{switch(o){case"compositionstart":var kt="onCompositionStart";break e;case"compositionend":kt="onCompositionEnd";break e;case"compositionupdate":kt="onCompositionUpdate";break e}kt=void 0}else ql?cT(o,p)&&(kt="onCompositionEnd"):o==="keydown"&&p.keyCode===229&&(kt="onCompositionStart");kt&&(oT&&p.locale!=="ko"&&(ql||kt!=="onCompositionStart"?kt==="onCompositionEnd"&&ql&&(mt=nT()):(ws=_e,Sy="value"in ws?ws.value:ws.textContent,ql=!0)),Ye=fm(ve,kt),0<Ye.length&&(kt=new iT(kt,o,null,p,_e),Ae.push({event:kt,listeners:Ye}),mt?kt.data=mt:(mt=dT(p),mt!==null&&(kt.data=mt)))),(mt=gX?vX(o,p):yX(o,p))&&(kt=fm(ve,"onBeforeInput"),0<kt.length&&(Ye=new iT("onBeforeInput","beforeinput",null,p,_e),Ae.push({event:Ye,listeners:kt}),Ye.data=mt)),uZ(Ae,o,ve,p,_e)}YM(Ae,u)})}function id(o,u,p){return{instance:o,listener:u,currentTarget:p}}function fm(o,u){for(var p=u+"Capture",y=[];o!==null;){var C=o,N=C.stateNode;if(C=C.tag,C!==5&&C!==26&&C!==27||N===null||(C=Cc(o,p),C!=null&&y.unshift(id(o,C,N)),C=Cc(o,u),C!=null&&y.push(id(o,C,N))),o.tag===3)return y;o=o.return}return[]}function hZ(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5&&o.tag!==27);return o||null}function ZM(o,u,p,y,C){for(var N=u._reactName,$=[];p!==null&&p!==y;){var V=p,te=V.alternate,ve=V.stateNode;if(V=V.tag,te!==null&&te===y)break;V!==5&&V!==26&&V!==27||ve===null||(te=ve,C?(ve=Cc(p,N),ve!=null&&$.unshift(id(p,ve,te))):C||(ve=Cc(p,N),ve!=null&&$.push(id(p,ve,te)))),p=p.return}$.length!==0&&o.push({event:u,listeners:$})}var mZ=/\r\n?/g,pZ=/\u0000|\uFFFD/g;function QM(o){return(typeof o=="string"?o:""+o).replace(mZ,`
|
|
49
|
+
`).replace(pZ,"")}function JM(o,u){return u=QM(u),QM(o)===u}function Ht(o,u,p,y,C,N){switch(p){case"children":typeof y=="string"?u==="body"||u==="textarea"&&y===""||Ll(o,y):(typeof y=="number"||typeof y=="bigint")&&u!=="body"&&Ll(o,""+y);break;case"className":bs(o,"class",y);break;case"tabIndex":bs(o,"tabindex",y);break;case"dir":case"role":case"viewBox":case"width":case"height":bs(o,p,y);break;case"style":JA(o,y,N);break;case"data":if(u!=="object"){bs(o,"data",y);break}case"src":case"href":if(y===""&&(u!=="a"||p!=="href")){o.removeAttribute(p);break}if(y==null||typeof y=="function"||typeof y=="symbol"||typeof y=="boolean"){o.removeAttribute(p);break}y=yh(""+y),o.setAttribute(p,y);break;case"action":case"formAction":if(typeof y=="function"){o.setAttribute(p,"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 N=="function"&&(p==="formAction"?(u!=="input"&&Ht(o,u,"name",C.name,C,null),Ht(o,u,"formEncType",C.formEncType,C,null),Ht(o,u,"formMethod",C.formMethod,C,null),Ht(o,u,"formTarget",C.formTarget,C,null)):(Ht(o,u,"encType",C.encType,C,null),Ht(o,u,"method",C.method,C,null),Ht(o,u,"target",C.target,C,null)));if(y==null||typeof y=="symbol"||typeof y=="boolean"){o.removeAttribute(p);break}y=yh(""+y),o.setAttribute(p,y);break;case"onClick":y!=null&&(o.onclick=ki);break;case"onScroll":y!=null&&bt("scroll",o);break;case"onScrollEnd":y!=null&&bt("scrollend",o);break;case"dangerouslySetInnerHTML":if(y!=null){if(typeof y!="object"||!("__html"in y))throw Error(r(61));if(p=y.__html,p!=null){if(C.children!=null)throw Error(r(60));o.innerHTML=p}}break;case"multiple":o.multiple=y&&typeof y!="function"&&typeof y!="symbol";break;case"muted":o.muted=y&&typeof y!="function"&&typeof y!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(y==null||typeof y=="function"||typeof y=="boolean"||typeof y=="symbol"){o.removeAttribute("xlink:href");break}p=yh(""+y),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",p);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":y!=null&&typeof y!="function"&&typeof y!="symbol"?o.setAttribute(p,""+y):o.removeAttribute(p);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":y&&typeof y!="function"&&typeof y!="symbol"?o.setAttribute(p,""):o.removeAttribute(p);break;case"capture":case"download":y===!0?o.setAttribute(p,""):y!==!1&&y!=null&&typeof y!="function"&&typeof y!="symbol"?o.setAttribute(p,y):o.removeAttribute(p);break;case"cols":case"rows":case"size":case"span":y!=null&&typeof y!="function"&&typeof y!="symbol"&&!isNaN(y)&&1<=y?o.setAttribute(p,y):o.removeAttribute(p);break;case"rowSpan":case"start":y==null||typeof y=="function"||typeof y=="symbol"||isNaN(y)?o.removeAttribute(p):o.setAttribute(p,y);break;case"popover":bt("beforetoggle",o),bt("toggle",o),xs(o,"popover",y);break;case"xlinkActuate":Ir(o,"http://www.w3.org/1999/xlink","xlink:actuate",y);break;case"xlinkArcrole":Ir(o,"http://www.w3.org/1999/xlink","xlink:arcrole",y);break;case"xlinkRole":Ir(o,"http://www.w3.org/1999/xlink","xlink:role",y);break;case"xlinkShow":Ir(o,"http://www.w3.org/1999/xlink","xlink:show",y);break;case"xlinkTitle":Ir(o,"http://www.w3.org/1999/xlink","xlink:title",y);break;case"xlinkType":Ir(o,"http://www.w3.org/1999/xlink","xlink:type",y);break;case"xmlBase":Ir(o,"http://www.w3.org/XML/1998/namespace","xml:base",y);break;case"xmlLang":Ir(o,"http://www.w3.org/XML/1998/namespace","xml:lang",y);break;case"xmlSpace":Ir(o,"http://www.w3.org/XML/1998/namespace","xml:space",y);break;case"is":xs(o,"is",y);break;case"innerText":case"textContent":break;default:(!(2<p.length)||p[0]!=="o"&&p[0]!=="O"||p[1]!=="n"&&p[1]!=="N")&&(p=HY.get(p)||p,xs(o,p,y))}}function r0(o,u,p,y,C,N){switch(p){case"style":JA(o,y,N);break;case"dangerouslySetInnerHTML":if(y!=null){if(typeof y!="object"||!("__html"in y))throw Error(r(61));if(p=y.__html,p!=null){if(C.children!=null)throw Error(r(60));o.innerHTML=p}}break;case"children":typeof y=="string"?Ll(o,y):(typeof y=="number"||typeof y=="bigint")&&Ll(o,""+y);break;case"onScroll":y!=null&&bt("scroll",o);break;case"onScrollEnd":y!=null&&bt("scrollend",o);break;case"onClick":y!=null&&(o.onclick=ki);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ja.hasOwnProperty(p))e:{if(p[0]==="o"&&p[1]==="n"&&(C=p.endsWith("Capture"),u=p.slice(2,C?p.length-7:void 0),N=o[Gn]||null,N=N!=null?N[p]:null,typeof N=="function"&&o.removeEventListener(u,N,C),typeof y=="function")){typeof N!="function"&&N!==null&&(p in o?o[p]=null:o.hasAttribute(p)&&o.removeAttribute(p)),o.addEventListener(u,y,C);break e}p in o?o[p]=y:y===!0?o.setAttribute(p,""):xs(o,p,y)}}}function nr(o,u,p){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":bt("error",o),bt("load",o);var y=!1,C=!1,N;for(N in p)if(p.hasOwnProperty(N)){var $=p[N];if($!=null)switch(N){case"src":y=!0;break;case"srcSet":C=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,u));default:Ht(o,u,N,$,p,null)}}C&&Ht(o,u,"srcSet",p.srcSet,p,null),y&&Ht(o,u,"src",p.src,p,null);return;case"input":bt("invalid",o);var V=N=$=C=null,te=null,ve=null;for(y in p)if(p.hasOwnProperty(y)){var _e=p[y];if(_e!=null)switch(y){case"name":C=_e;break;case"type":$=_e;break;case"checked":te=_e;break;case"defaultChecked":ve=_e;break;case"value":N=_e;break;case"defaultValue":V=_e;break;case"children":case"dangerouslySetInnerHTML":if(_e!=null)throw Error(r(137,u));break;default:Ht(o,u,y,_e,p,null)}}Il(o,N,V,te,ve,$,C,!1);return;case"select":bt("invalid",o),y=$=N=null;for(C in p)if(p.hasOwnProperty(C)&&(V=p[C],V!=null))switch(C){case"value":N=V;break;case"defaultValue":$=V;break;case"multiple":y=V;default:Ht(o,u,C,V,p,null)}u=N,p=$,o.multiple=!!y,u!=null?na(o,!!y,u,!1):p!=null&&na(o,!!y,p,!0);return;case"textarea":bt("invalid",o),N=C=y=null;for($ in p)if(p.hasOwnProperty($)&&(V=p[$],V!=null))switch($){case"value":y=V;break;case"defaultValue":C=V;break;case"children":N=V;break;case"dangerouslySetInnerHTML":if(V!=null)throw Error(r(91));break;default:Ht(o,u,$,V,p,null)}ZA(o,y,C,N);return;case"option":for(te in p)if(p.hasOwnProperty(te)&&(y=p[te],y!=null))switch(te){case"selected":o.selected=y&&typeof y!="function"&&typeof y!="symbol";break;default:Ht(o,u,te,y,p,null)}return;case"dialog":bt("beforetoggle",o),bt("toggle",o),bt("cancel",o),bt("close",o);break;case"iframe":case"object":bt("load",o);break;case"video":case"audio":for(y=0;y<ad.length;y++)bt(ad[y],o);break;case"image":bt("error",o),bt("load",o);break;case"details":bt("toggle",o);break;case"embed":case"source":case"link":bt("error",o),bt("load",o);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ve in p)if(p.hasOwnProperty(ve)&&(y=p[ve],y!=null))switch(ve){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,u));default:Ht(o,u,ve,y,p,null)}return;default:if(vy(u)){for(_e in p)p.hasOwnProperty(_e)&&(y=p[_e],y!==void 0&&r0(o,u,_e,y,p,void 0));return}}for(V in p)p.hasOwnProperty(V)&&(y=p[V],y!=null&&Ht(o,u,V,y,p,null))}function gZ(o,u,p,y){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var C=null,N=null,$=null,V=null,te=null,ve=null,_e=null;for(ke in p){var Ae=p[ke];if(p.hasOwnProperty(ke)&&Ae!=null)switch(ke){case"checked":break;case"value":break;case"defaultValue":te=Ae;default:y.hasOwnProperty(ke)||Ht(o,u,ke,null,y,Ae)}}for(var xe in y){var ke=y[xe];if(Ae=p[xe],y.hasOwnProperty(xe)&&(ke!=null||Ae!=null))switch(xe){case"type":N=ke;break;case"name":C=ke;break;case"checked":ve=ke;break;case"defaultChecked":_e=ke;break;case"value":$=ke;break;case"defaultValue":V=ke;break;case"children":case"dangerouslySetInnerHTML":if(ke!=null)throw Error(r(137,u));break;default:ke!==Ae&&Ht(o,u,xe,ke,y,Ae)}}ka(o,$,V,te,ve,_e,N,C);return;case"select":ke=$=V=xe=null;for(N in p)if(te=p[N],p.hasOwnProperty(N)&&te!=null)switch(N){case"value":break;case"multiple":ke=te;default:y.hasOwnProperty(N)||Ht(o,u,N,null,y,te)}for(C in y)if(N=y[C],te=p[C],y.hasOwnProperty(C)&&(N!=null||te!=null))switch(C){case"value":xe=N;break;case"defaultValue":V=N;break;case"multiple":$=N;default:N!==te&&Ht(o,u,C,N,y,te)}u=V,p=$,y=ke,xe!=null?na(o,!!p,xe,!1):!!y!=!!p&&(u!=null?na(o,!!p,u,!0):na(o,!!p,p?[]:"",!1));return;case"textarea":ke=xe=null;for(V in p)if(C=p[V],p.hasOwnProperty(V)&&C!=null&&!y.hasOwnProperty(V))switch(V){case"value":break;case"children":break;default:Ht(o,u,V,null,y,C)}for($ in y)if(C=y[$],N=p[$],y.hasOwnProperty($)&&(C!=null||N!=null))switch($){case"value":xe=C;break;case"defaultValue":ke=C;break;case"children":break;case"dangerouslySetInnerHTML":if(C!=null)throw Error(r(91));break;default:C!==N&&Ht(o,u,$,C,y,N)}XA(o,xe,ke);return;case"option":for(var Ve in p)if(xe=p[Ve],p.hasOwnProperty(Ve)&&xe!=null&&!y.hasOwnProperty(Ve))switch(Ve){case"selected":o.selected=!1;break;default:Ht(o,u,Ve,null,y,xe)}for(te in y)if(xe=y[te],ke=p[te],y.hasOwnProperty(te)&&xe!==ke&&(xe!=null||ke!=null))switch(te){case"selected":o.selected=xe&&typeof xe!="function"&&typeof xe!="symbol";break;default:Ht(o,u,te,xe,y,ke)}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 it in p)xe=p[it],p.hasOwnProperty(it)&&xe!=null&&!y.hasOwnProperty(it)&&Ht(o,u,it,null,y,xe);for(ve in y)if(xe=y[ve],ke=p[ve],y.hasOwnProperty(ve)&&xe!==ke&&(xe!=null||ke!=null))switch(ve){case"children":case"dangerouslySetInnerHTML":if(xe!=null)throw Error(r(137,u));break;default:Ht(o,u,ve,xe,y,ke)}return;default:if(vy(u)){for(var Ut in p)xe=p[Ut],p.hasOwnProperty(Ut)&&xe!==void 0&&!y.hasOwnProperty(Ut)&&r0(o,u,Ut,void 0,y,xe);for(_e in y)xe=y[_e],ke=p[_e],!y.hasOwnProperty(_e)||xe===ke||xe===void 0&&ke===void 0||r0(o,u,_e,xe,y,ke);return}}for(var de in p)xe=p[de],p.hasOwnProperty(de)&&xe!=null&&!y.hasOwnProperty(de)&&Ht(o,u,de,null,y,xe);for(Ae in y)xe=y[Ae],ke=p[Ae],!y.hasOwnProperty(Ae)||xe===ke||xe==null&&ke==null||Ht(o,u,Ae,xe,y,ke)}function eP(o){switch(o){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function vZ(){if(typeof performance.getEntriesByType=="function"){for(var o=0,u=0,p=performance.getEntriesByType("resource"),y=0;y<p.length;y++){var C=p[y],N=C.transferSize,$=C.initiatorType,V=C.duration;if(N&&V&&eP($)){for($=0,V=C.responseEnd,y+=1;y<p.length;y++){var te=p[y],ve=te.startTime;if(ve>V)break;var _e=te.transferSize,Ae=te.initiatorType;_e&&eP(Ae)&&(te=te.responseEnd,$+=_e*(te<V?1:(V-ve)/(te-ve)))}if(--y,u+=8*(N+$)/(C.duration/1e3),o++,10<o)break}}if(0<o)return u/o/1e6}return navigator.connection&&(o=navigator.connection.downlink,typeof o=="number")?o:5}var a0=null,i0=null;function hm(o){return o.nodeType===9?o:o.ownerDocument}function tP(o){switch(o){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function nP(o,u){if(o===0)switch(u){case"svg":return 1;case"math":return 2;default:return 0}return o===1&&u==="foreignObject"?0:o}function s0(o,u){return o==="textarea"||o==="noscript"||typeof u.children=="string"||typeof u.children=="number"||typeof u.children=="bigint"||typeof u.dangerouslySetInnerHTML=="object"&&u.dangerouslySetInnerHTML!==null&&u.dangerouslySetInnerHTML.__html!=null}var o0=null;function yZ(){var o=window.event;return o&&o.type==="popstate"?o===o0?!1:(o0=o,!0):(o0=null,!1)}var rP=typeof setTimeout=="function"?setTimeout:void 0,xZ=typeof clearTimeout=="function"?clearTimeout:void 0,aP=typeof Promise=="function"?Promise:void 0,bZ=typeof queueMicrotask=="function"?queueMicrotask:typeof aP<"u"?function(o){return aP.resolve(null).then(o).catch(wZ)}:rP;function wZ(o){setTimeout(function(){throw o})}function zs(o){return o==="head"}function iP(o,u){var p=u,y=0;do{var C=p.nextSibling;if(o.removeChild(p),C&&C.nodeType===8)if(p=C.data,p==="/$"||p==="/&"){if(y===0){o.removeChild(C),mu(u);return}y--}else if(p==="$"||p==="$?"||p==="$~"||p==="$!"||p==="&")y++;else if(p==="html")sd(o.ownerDocument.documentElement);else if(p==="head"){p=o.ownerDocument.head,sd(p);for(var N=p.firstChild;N;){var $=N.nextSibling,V=N.nodeName;N[ji]||V==="SCRIPT"||V==="STYLE"||V==="LINK"&&N.rel.toLowerCase()==="stylesheet"||p.removeChild(N),N=$}}else p==="body"&&sd(o.ownerDocument.body);p=C}while(p);mu(u)}function sP(o,u){var p=o;o=0;do{var y=p.nextSibling;if(p.nodeType===1?u?(p._stashedDisplay=p.style.display,p.style.display="none"):(p.style.display=p._stashedDisplay||"",p.getAttribute("style")===""&&p.removeAttribute("style")):p.nodeType===3&&(u?(p._stashedText=p.nodeValue,p.nodeValue=""):p.nodeValue=p._stashedText||""),y&&y.nodeType===8)if(p=y.data,p==="/$"){if(o===0)break;o--}else p!=="$"&&p!=="$?"&&p!=="$~"&&p!=="$!"||o++;p=y}while(p)}function l0(o){var u=o.firstChild;for(u&&u.nodeType===10&&(u=u.nextSibling);u;){var p=u;switch(u=u.nextSibling,p.nodeName){case"HTML":case"HEAD":case"BODY":l0(p),po(p);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(p.rel.toLowerCase()==="stylesheet")continue}o.removeChild(p)}}function SZ(o,u,p,y){for(;o.nodeType===1;){var C=p;if(o.nodeName.toLowerCase()!==u.toLowerCase()){if(!y&&(o.nodeName!=="INPUT"||o.type!=="hidden"))break}else if(y){if(!o[ji])switch(u){case"meta":if(!o.hasAttribute("itemprop"))break;return o;case"link":if(N=o.getAttribute("rel"),N==="stylesheet"&&o.hasAttribute("data-precedence"))break;if(N!==C.rel||o.getAttribute("href")!==(C.href==null||C.href===""?null:C.href)||o.getAttribute("crossorigin")!==(C.crossOrigin==null?null:C.crossOrigin)||o.getAttribute("title")!==(C.title==null?null:C.title))break;return o;case"style":if(o.hasAttribute("data-precedence"))break;return o;case"script":if(N=o.getAttribute("src"),(N!==(C.src==null?null:C.src)||o.getAttribute("type")!==(C.type==null?null:C.type)||o.getAttribute("crossorigin")!==(C.crossOrigin==null?null:C.crossOrigin))&&N&&o.hasAttribute("async")&&!o.hasAttribute("itemprop"))break;return o;default:return o}}else if(u==="input"&&o.type==="hidden"){var N=C.name==null?null:""+C.name;if(C.type==="hidden"&&o.getAttribute("name")===N)return o}else return o;if(o=ua(o.nextSibling),o===null)break}return null}function jZ(o,u,p){if(u==="")return null;for(;o.nodeType!==3;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!p||(o=ua(o.nextSibling),o===null))return null;return o}function oP(o,u){for(;o.nodeType!==8;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!u||(o=ua(o.nextSibling),o===null))return null;return o}function u0(o){return o.data==="$?"||o.data==="$~"}function c0(o){return o.data==="$!"||o.data==="$?"&&o.ownerDocument.readyState!=="loading"}function kZ(o,u){var p=o.ownerDocument;if(o.data==="$~")o._reactRetry=u;else if(o.data!=="$?"||p.readyState!=="loading")u();else{var y=function(){u(),p.removeEventListener("DOMContentLoaded",y)};p.addEventListener("DOMContentLoaded",y),o._reactRetry=y}}function ua(o){for(;o!=null;o=o.nextSibling){var u=o.nodeType;if(u===1||u===3)break;if(u===8){if(u=o.data,u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"||u==="F!"||u==="F")break;if(u==="/$"||u==="/&")return null}}return o}var d0=null;function lP(o){o=o.nextSibling;for(var u=0;o;){if(o.nodeType===8){var p=o.data;if(p==="/$"||p==="/&"){if(u===0)return ua(o.nextSibling);u--}else p!=="$"&&p!=="$!"&&p!=="$?"&&p!=="$~"&&p!=="&"||u++}o=o.nextSibling}return null}function uP(o){o=o.previousSibling;for(var u=0;o;){if(o.nodeType===8){var p=o.data;if(p==="$"||p==="$!"||p==="$?"||p==="$~"||p==="&"){if(u===0)return o;u--}else p!=="/$"&&p!=="/&"||u++}o=o.previousSibling}return null}function cP(o,u,p){switch(u=hm(p),o){case"html":if(o=u.documentElement,!o)throw Error(r(452));return o;case"head":if(o=u.head,!o)throw Error(r(453));return o;case"body":if(o=u.body,!o)throw Error(r(454));return o;default:throw Error(r(451))}}function sd(o){for(var u=o.attributes;u.length;)o.removeAttributeNode(u[0]);po(o)}var ca=new Map,dP=new Set;function mm(o){return typeof o.getRootNode=="function"?o.getRootNode():o.nodeType===9?o:o.ownerDocument}var qi=G.d;G.d={f:_Z,r:CZ,D:NZ,C:EZ,L:AZ,m:TZ,X:MZ,S:OZ,M:PZ};function _Z(){var o=qi.f(),u=im();return o||u}function CZ(o){var u=Ga(o);u!==null&&u.tag===5&&u.type==="form"?EO(u):qi.r(o)}var du=typeof document>"u"?null:document;function fP(o,u,p){var y=du;if(y&&typeof u=="string"&&u){var C=yt(u);C='link[rel="'+o+'"][href="'+C+'"]',typeof p=="string"&&(C+='[crossorigin="'+p+'"]'),dP.has(C)||(dP.add(C),o={rel:o,crossOrigin:p,href:u},y.querySelector(C)===null&&(u=y.createElement("link"),nr(u,"link",o),gn(u),y.head.appendChild(u)))}}function NZ(o){qi.D(o),fP("dns-prefetch",o,null)}function EZ(o,u){qi.C(o,u),fP("preconnect",o,u)}function AZ(o,u,p){qi.L(o,u,p);var y=du;if(y&&o&&u){var C='link[rel="preload"][as="'+yt(u)+'"]';u==="image"&&p&&p.imageSrcSet?(C+='[imagesrcset="'+yt(p.imageSrcSet)+'"]',typeof p.imageSizes=="string"&&(C+='[imagesizes="'+yt(p.imageSizes)+'"]')):C+='[href="'+yt(o)+'"]';var N=C;switch(u){case"style":N=fu(o);break;case"script":N=hu(o)}ca.has(N)||(o=m({rel:"preload",href:u==="image"&&p&&p.imageSrcSet?void 0:o,as:u},p),ca.set(N,o),y.querySelector(C)!==null||u==="style"&&y.querySelector(od(N))||u==="script"&&y.querySelector(ld(N))||(u=y.createElement("link"),nr(u,"link",o),gn(u),y.head.appendChild(u)))}}function TZ(o,u){qi.m(o,u);var p=du;if(p&&o){var y=u&&typeof u.as=="string"?u.as:"script",C='link[rel="modulepreload"][as="'+yt(y)+'"][href="'+yt(o)+'"]',N=C;switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":N=hu(o)}if(!ca.has(N)&&(o=m({rel:"modulepreload",href:o},u),ca.set(N,o),p.querySelector(C)===null)){switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(p.querySelector(ld(N)))return}y=p.createElement("link"),nr(y,"link",o),gn(y),p.head.appendChild(y)}}}function OZ(o,u,p){qi.S(o,u,p);var y=du;if(y&&o){var C=Ka(y).hoistableStyles,N=fu(o);u=u||"default";var $=C.get(N);if(!$){var V={loading:0,preload:null};if($=y.querySelector(od(N)))V.loading=5;else{o=m({rel:"stylesheet",href:o,"data-precedence":u},p),(p=ca.get(N))&&f0(o,p);var te=$=y.createElement("link");gn(te),nr(te,"link",o),te._p=new Promise(function(ve,_e){te.onload=ve,te.onerror=_e}),te.addEventListener("load",function(){V.loading|=1}),te.addEventListener("error",function(){V.loading|=2}),V.loading|=4,pm($,u,y)}$={type:"stylesheet",instance:$,count:1,state:V},C.set(N,$)}}}function MZ(o,u){qi.X(o,u);var p=du;if(p&&o){var y=Ka(p).hoistableScripts,C=hu(o),N=y.get(C);N||(N=p.querySelector(ld(C)),N||(o=m({src:o,async:!0},u),(u=ca.get(C))&&h0(o,u),N=p.createElement("script"),gn(N),nr(N,"link",o),p.head.appendChild(N)),N={type:"script",instance:N,count:1,state:null},y.set(C,N))}}function PZ(o,u){qi.M(o,u);var p=du;if(p&&o){var y=Ka(p).hoistableScripts,C=hu(o),N=y.get(C);N||(N=p.querySelector(ld(C)),N||(o=m({src:o,async:!0,type:"module"},u),(u=ca.get(C))&&h0(o,u),N=p.createElement("script"),gn(N),nr(N,"link",o),p.head.appendChild(N)),N={type:"script",instance:N,count:1,state:null},y.set(C,N))}}function hP(o,u,p,y){var C=(C=Q.current)?mm(C):null;if(!C)throw Error(r(446));switch(o){case"meta":case"title":return null;case"style":return typeof p.precedence=="string"&&typeof p.href=="string"?(u=fu(p.href),p=Ka(C).hoistableStyles,y=p.get(u),y||(y={type:"style",instance:null,count:0,state:null},p.set(u,y)),y):{type:"void",instance:null,count:0,state:null};case"link":if(p.rel==="stylesheet"&&typeof p.href=="string"&&typeof p.precedence=="string"){o=fu(p.href);var N=Ka(C).hoistableStyles,$=N.get(o);if($||(C=C.ownerDocument||C,$={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},N.set(o,$),(N=C.querySelector(od(o)))&&!N._p&&($.instance=N,$.state.loading=5),ca.has(o)||(p={rel:"preload",as:"style",href:p.href,crossOrigin:p.crossOrigin,integrity:p.integrity,media:p.media,hrefLang:p.hrefLang,referrerPolicy:p.referrerPolicy},ca.set(o,p),N||DZ(C,o,p,$.state))),u&&y===null)throw Error(r(528,""));return $}if(u&&y!==null)throw Error(r(529,""));return null;case"script":return u=p.async,p=p.src,typeof p=="string"&&u&&typeof u!="function"&&typeof u!="symbol"?(u=hu(p),p=Ka(C).hoistableScripts,y=p.get(u),y||(y={type:"script",instance:null,count:0,state:null},p.set(u,y)),y):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,o))}}function fu(o){return'href="'+yt(o)+'"'}function od(o){return'link[rel="stylesheet"]['+o+"]"}function mP(o){return m({},o,{"data-precedence":o.precedence,precedence:null})}function DZ(o,u,p,y){o.querySelector('link[rel="preload"][as="style"]['+u+"]")?y.loading=1:(u=o.createElement("link"),y.preload=u,u.addEventListener("load",function(){return y.loading|=1}),u.addEventListener("error",function(){return y.loading|=2}),nr(u,"link",p),gn(u),o.head.appendChild(u))}function hu(o){return'[src="'+yt(o)+'"]'}function ld(o){return"script[async]"+o}function pP(o,u,p){if(u.count++,u.instance===null)switch(u.type){case"style":var y=o.querySelector('style[data-href~="'+yt(p.href)+'"]');if(y)return u.instance=y,gn(y),y;var C=m({},p,{"data-href":p.href,"data-precedence":p.precedence,href:null,precedence:null});return y=(o.ownerDocument||o).createElement("style"),gn(y),nr(y,"style",C),pm(y,p.precedence,o),u.instance=y;case"stylesheet":C=fu(p.href);var N=o.querySelector(od(C));if(N)return u.state.loading|=4,u.instance=N,gn(N),N;y=mP(p),(C=ca.get(C))&&f0(y,C),N=(o.ownerDocument||o).createElement("link"),gn(N);var $=N;return $._p=new Promise(function(V,te){$.onload=V,$.onerror=te}),nr(N,"link",y),u.state.loading|=4,pm(N,p.precedence,o),u.instance=N;case"script":return N=hu(p.src),(C=o.querySelector(ld(N)))?(u.instance=C,gn(C),C):(y=p,(C=ca.get(N))&&(y=m({},p),h0(y,C)),o=o.ownerDocument||o,C=o.createElement("script"),gn(C),nr(C,"link",y),o.head.appendChild(C),u.instance=C);case"void":return null;default:throw Error(r(443,u.type))}else u.type==="stylesheet"&&(u.state.loading&4)===0&&(y=u.instance,u.state.loading|=4,pm(y,p.precedence,o));return u.instance}function pm(o,u,p){for(var y=p.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),C=y.length?y[y.length-1]:null,N=C,$=0;$<y.length;$++){var V=y[$];if(V.dataset.precedence===u)N=V;else if(N!==C)break}N?N.parentNode.insertBefore(o,N.nextSibling):(u=p.nodeType===9?p.head:p,u.insertBefore(o,u.firstChild))}function f0(o,u){o.crossOrigin==null&&(o.crossOrigin=u.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=u.referrerPolicy),o.title==null&&(o.title=u.title)}function h0(o,u){o.crossOrigin==null&&(o.crossOrigin=u.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=u.referrerPolicy),o.integrity==null&&(o.integrity=u.integrity)}var gm=null;function gP(o,u,p){if(gm===null){var y=new Map,C=gm=new Map;C.set(p,y)}else C=gm,y=C.get(p),y||(y=new Map,C.set(p,y));if(y.has(o))return y;for(y.set(o,null),p=p.getElementsByTagName(o),C=0;C<p.length;C++){var N=p[C];if(!(N[ji]||N[jn]||o==="link"&&N.getAttribute("rel")==="stylesheet")&&N.namespaceURI!=="http://www.w3.org/2000/svg"){var $=N.getAttribute(u)||"";$=o+$;var V=y.get($);V?V.push(N):y.set($,[N])}}return y}function vP(o,u,p){o=o.ownerDocument||o,o.head.insertBefore(p,u==="title"?o.querySelector("head > title"):null)}function RZ(o,u,p){if(p===1||u.itemProp!=null)return!1;switch(o){case"meta":case"title":return!0;case"style":if(typeof u.precedence!="string"||typeof u.href!="string"||u.href==="")break;return!0;case"link":if(typeof u.rel!="string"||typeof u.href!="string"||u.href===""||u.onLoad||u.onError)break;switch(u.rel){case"stylesheet":return o=u.disabled,typeof u.precedence=="string"&&o==null;default:return!0}case"script":if(u.async&&typeof u.async!="function"&&typeof u.async!="symbol"&&!u.onLoad&&!u.onError&&u.src&&typeof u.src=="string")return!0}return!1}function yP(o){return!(o.type==="stylesheet"&&(o.state.loading&3)===0)}function IZ(o,u,p,y){if(p.type==="stylesheet"&&(typeof y.media!="string"||matchMedia(y.media).matches!==!1)&&(p.state.loading&4)===0){if(p.instance===null){var C=fu(y.href),N=u.querySelector(od(C));if(N){u=N._p,u!==null&&typeof u=="object"&&typeof u.then=="function"&&(o.count++,o=vm.bind(o),u.then(o,o)),p.state.loading|=4,p.instance=N,gn(N);return}N=u.ownerDocument||u,y=mP(y),(C=ca.get(C))&&f0(y,C),N=N.createElement("link"),gn(N);var $=N;$._p=new Promise(function(V,te){$.onload=V,$.onerror=te}),nr(N,"link",y),p.instance=N}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(p,u),(u=p.state.preload)&&(p.state.loading&3)===0&&(o.count++,p=vm.bind(o),u.addEventListener("load",p),u.addEventListener("error",p))}}var m0=0;function LZ(o,u){return o.stylesheets&&o.count===0&&xm(o,o.stylesheets),0<o.count||0<o.imgCount?function(p){var y=setTimeout(function(){if(o.stylesheets&&xm(o,o.stylesheets),o.unsuspend){var N=o.unsuspend;o.unsuspend=null,N()}},6e4+u);0<o.imgBytes&&m0===0&&(m0=62500*vZ());var C=setTimeout(function(){if(o.waitingForImages=!1,o.count===0&&(o.stylesheets&&xm(o,o.stylesheets),o.unsuspend)){var N=o.unsuspend;o.unsuspend=null,N()}},(o.imgBytes>m0?50:800)+u);return o.unsuspend=p,function(){o.unsuspend=null,clearTimeout(y),clearTimeout(C)}}:null}function vm(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)xm(this,this.stylesheets);else if(this.unsuspend){var o=this.unsuspend;this.unsuspend=null,o()}}}var ym=null;function xm(o,u){o.stylesheets=null,o.unsuspend!==null&&(o.count++,ym=new Map,u.forEach(zZ,o),ym=null,vm.call(o))}function zZ(o,u){if(!(u.state.loading&4)){var p=ym.get(o);if(p)var y=p.get(null);else{p=new Map,ym.set(o,p);for(var C=o.querySelectorAll("link[data-precedence],style[data-precedence]"),N=0;N<C.length;N++){var $=C[N];($.nodeName==="LINK"||$.getAttribute("media")!=="not all")&&(p.set($.dataset.precedence,$),y=$)}y&&p.set(null,y)}C=u.instance,$=C.getAttribute("data-precedence"),N=p.get($)||y,N===y&&p.set(null,C),p.set($,C),this.count++,y=vm.bind(this),C.addEventListener("load",y),C.addEventListener("error",y),N?N.parentNode.insertBefore(C,N.nextSibling):(o=o.nodeType===9?o.head:o,o.insertBefore(C,o.firstChild)),u.state.loading|=4}}var ud={$$typeof:k,Provider:null,Consumer:null,_currentValue:W,_currentValue2:W,_threadCount:0};function $Z(o,u,p,y,C,N,$,V,te){this.tag=1,this.containerInfo=o,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=Ie(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ie(0),this.hiddenUpdates=Ie(null),this.identifierPrefix=y,this.onUncaughtError=C,this.onCaughtError=N,this.onRecoverableError=$,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=te,this.incompleteTransitions=new Map}function xP(o,u,p,y,C,N,$,V,te,ve,_e,Ae){return o=new $Z(o,u,p,$,te,ve,_e,Ae,V),u=1,N===!0&&(u|=24),N=zr(3,null,null,u),o.current=N,N.stateNode=o,u=Ky(),u.refCount++,o.pooledCache=u,u.refCount++,N.memoizedState={element:y,isDehydrated:p,cache:u},Zy(N),o}function bP(o){return o?(o=Ul,o):Ul}function wP(o,u,p,y,C,N){C=bP(C),y.context===null?y.context=C:y.pendingContext=C,y=Ns(u),y.payload={element:p},N=N===void 0?null:N,N!==null&&(y.callback=N),p=Es(o,y,u),p!==null&&(Nr(p,o,u),Bc(p,o,u))}function SP(o,u){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var p=o.retryLane;o.retryLane=p!==0&&p<u?p:u}}function p0(o,u){SP(o,u),(o=o.alternate)&&SP(o,u)}function jP(o){if(o.tag===13||o.tag===31){var u=jo(o,67108864);u!==null&&Nr(u,o,67108864),p0(o,67108864)}}function kP(o){if(o.tag===13||o.tag===31){var u=Hr();u=Cn(u);var p=jo(o,u);p!==null&&Nr(p,o,u),p0(o,u)}}var bm=!0;function qZ(o,u,p,y){var C=L.T;L.T=null;var N=G.p;try{G.p=2,g0(o,u,p,y)}finally{G.p=N,L.T=C}}function BZ(o,u,p,y){var C=L.T;L.T=null;var N=G.p;try{G.p=8,g0(o,u,p,y)}finally{G.p=N,L.T=C}}function g0(o,u,p,y){if(bm){var C=v0(y);if(C===null)n0(o,u,y,wm,p),CP(o,y);else if(HZ(C,o,u,p,y))y.stopPropagation();else if(CP(o,y),u&4&&-1<FZ.indexOf(o)){for(;C!==null;){var N=Ga(C);if(N!==null)switch(N.tag){case 3:if(N=N.stateNode,N.current.memoizedState.isDehydrated){var $=It(N.pendingLanes);if($!==0){var V=N;for(V.pendingLanes|=2,V.entangledLanes|=2;$;){var te=1<<31-$e($);V.entanglements[1]|=te,$&=~te}Za(N),(Lt&6)===0&&(rm=Fe()+500,rd(0))}}break;case 31:case 13:V=jo(N,2),V!==null&&Nr(V,N,2),im(),p0(N,2)}if(N=v0(y),N===null&&n0(o,u,y,wm,p),N===C)break;C=N}C!==null&&y.stopPropagation()}else n0(o,u,y,null,p)}}function v0(o){return o=xy(o),y0(o)}var wm=null;function y0(o){if(wm=null,o=Ua(o),o!==null){var u=i(o);if(u===null)o=null;else{var p=u.tag;if(p===13){if(o=s(u),o!==null)return o;o=null}else if(p===31){if(o=l(u),o!==null)return o;o=null}else if(p===3){if(u.stateNode.current.memoizedState.isDehydrated)return u.tag===3?u.stateNode.containerInfo:null;o=null}else u!==o&&(o=null)}}return wm=o,null}function _P(o){switch(o){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(ye()){case le:return 2;case me:return 8;case Oe:case Pe:return 32;case be:return 268435456;default:return 32}default:return 32}}var x0=!1,$s=null,qs=null,Bs=null,cd=new Map,dd=new Map,Fs=[],FZ="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 CP(o,u){switch(o){case"focusin":case"focusout":$s=null;break;case"dragenter":case"dragleave":qs=null;break;case"mouseover":case"mouseout":Bs=null;break;case"pointerover":case"pointerout":cd.delete(u.pointerId);break;case"gotpointercapture":case"lostpointercapture":dd.delete(u.pointerId)}}function fd(o,u,p,y,C,N){return o===null||o.nativeEvent!==N?(o={blockedOn:u,domEventName:p,eventSystemFlags:y,nativeEvent:N,targetContainers:[C]},u!==null&&(u=Ga(u),u!==null&&jP(u)),o):(o.eventSystemFlags|=y,u=o.targetContainers,C!==null&&u.indexOf(C)===-1&&u.push(C),o)}function HZ(o,u,p,y,C){switch(u){case"focusin":return $s=fd($s,o,u,p,y,C),!0;case"dragenter":return qs=fd(qs,o,u,p,y,C),!0;case"mouseover":return Bs=fd(Bs,o,u,p,y,C),!0;case"pointerover":var N=C.pointerId;return cd.set(N,fd(cd.get(N)||null,o,u,p,y,C)),!0;case"gotpointercapture":return N=C.pointerId,dd.set(N,fd(dd.get(N)||null,o,u,p,y,C)),!0}return!1}function NP(o){var u=Ua(o.target);if(u!==null){var p=i(u);if(p!==null){if(u=p.tag,u===13){if(u=s(p),u!==null){o.blockedOn=u,Pl(o.priority,function(){kP(p)});return}}else if(u===31){if(u=l(p),u!==null){o.blockedOn=u,Pl(o.priority,function(){kP(p)});return}}else if(u===3&&p.stateNode.current.memoizedState.isDehydrated){o.blockedOn=p.tag===3?p.stateNode.containerInfo:null;return}}}o.blockedOn=null}function Sm(o){if(o.blockedOn!==null)return!1;for(var u=o.targetContainers;0<u.length;){var p=v0(o.nativeEvent);if(p===null){p=o.nativeEvent;var y=new p.constructor(p.type,p);yy=y,p.target.dispatchEvent(y),yy=null}else return u=Ga(p),u!==null&&jP(u),o.blockedOn=p,!1;u.shift()}return!0}function EP(o,u,p){Sm(o)&&p.delete(u)}function UZ(){x0=!1,$s!==null&&Sm($s)&&($s=null),qs!==null&&Sm(qs)&&(qs=null),Bs!==null&&Sm(Bs)&&(Bs=null),cd.forEach(EP),dd.forEach(EP)}function jm(o,u){o.blockedOn===u&&(o.blockedOn=null,x0||(x0=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,UZ)))}var km=null;function AP(o){km!==o&&(km=o,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){km===o&&(km=null);for(var u=0;u<o.length;u+=3){var p=o[u],y=o[u+1],C=o[u+2];if(typeof y!="function"){if(y0(y||p)===null)continue;break}var N=Ga(p);N!==null&&(o.splice(u,3),u-=3,vx(N,{pending:!0,data:C,method:p.method,action:y},y,C))}}))}function mu(o){function u(te){return jm(te,o)}$s!==null&&jm($s,o),qs!==null&&jm(qs,o),Bs!==null&&jm(Bs,o),cd.forEach(u),dd.forEach(u);for(var p=0;p<Fs.length;p++){var y=Fs[p];y.blockedOn===o&&(y.blockedOn=null)}for(;0<Fs.length&&(p=Fs[0],p.blockedOn===null);)NP(p),p.blockedOn===null&&Fs.shift();if(p=(o.ownerDocument||o).$$reactFormReplay,p!=null)for(y=0;y<p.length;y+=3){var C=p[y],N=p[y+1],$=C[Gn]||null;if(typeof N=="function")$||AP(p);else if($){var V=null;if(N&&N.hasAttribute("formAction")){if(C=N,$=N[Gn]||null)V=$.formAction;else if(y0(C)!==null)continue}else V=$.action;typeof V=="function"?p[y+1]=V:(p.splice(y,3),y-=3),AP(p)}}}function TP(){function o(N){N.canIntercept&&N.info==="react-transition"&&N.intercept({handler:function(){return new Promise(function($){return C=$})},focusReset:"manual",scroll:"manual"})}function u(){C!==null&&(C(),C=null),y||setTimeout(p,20)}function p(){if(!y&&!navigation.transition){var N=navigation.currentEntry;N&&N.url!=null&&navigation.navigate(N.url,{state:N.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var y=!1,C=null;return navigation.addEventListener("navigate",o),navigation.addEventListener("navigatesuccess",u),navigation.addEventListener("navigateerror",u),setTimeout(p,100),function(){y=!0,navigation.removeEventListener("navigate",o),navigation.removeEventListener("navigatesuccess",u),navigation.removeEventListener("navigateerror",u),C!==null&&(C(),C=null)}}}function b0(o){this._internalRoot=o}_m.prototype.render=b0.prototype.render=function(o){var u=this._internalRoot;if(u===null)throw Error(r(409));var p=u.current,y=Hr();wP(p,y,o,u,null,null)},_m.prototype.unmount=b0.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var u=o.containerInfo;wP(o.current,2,null,o,null,null),im(),u[Sa]=null}};function _m(o){this._internalRoot=o}_m.prototype.unstable_scheduleHydration=function(o){if(o){var u=Ml();o={blockedOn:null,target:o,priority:u};for(var p=0;p<Fs.length&&u!==0&&u<Fs[p].priority;p++);Fs.splice(p,0,o),p===0&&NP(o)}};var OP=t.version;if(OP!=="19.2.4")throw Error(r(527,OP,"19.2.4"));G.findDOMNode=function(o){var u=o._reactInternals;if(u===void 0)throw typeof o.render=="function"?Error(r(188)):(o=Object.keys(o).join(","),Error(r(268,o)));return o=d(u),o=o!==null?h(o):null,o=o===null?null:o.stateNode,o};var GZ={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Cm=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Cm.isDisabled&&Cm.supportsFiber)try{gt=Cm.inject(GZ),lt=Cm}catch{}}return md.createRoot=function(o,u){if(!a(o))throw Error(r(299));var p=!1,y="",C=zO,N=$O,$=qO;return u!=null&&(u.unstable_strictMode===!0&&(p=!0),u.identifierPrefix!==void 0&&(y=u.identifierPrefix),u.onUncaughtError!==void 0&&(C=u.onUncaughtError),u.onCaughtError!==void 0&&(N=u.onCaughtError),u.onRecoverableError!==void 0&&($=u.onRecoverableError)),u=xP(o,1,!1,null,null,p,y,null,C,N,$,TP),o[Sa]=u.current,t0(o),new b0(u)},md.hydrateRoot=function(o,u,p){if(!a(o))throw Error(r(299));var y=!1,C="",N=zO,$=$O,V=qO,te=null;return p!=null&&(p.unstable_strictMode===!0&&(y=!0),p.identifierPrefix!==void 0&&(C=p.identifierPrefix),p.onUncaughtError!==void 0&&(N=p.onUncaughtError),p.onCaughtError!==void 0&&($=p.onCaughtError),p.onRecoverableError!==void 0&&(V=p.onRecoverableError),p.formState!==void 0&&(te=p.formState)),u=xP(o,1,!0,u,p??null,y,C,te,N,$,V,TP),u.context=bP(null),p=u.current,y=Hr(),y=Cn(y),C=Ns(y),C.callback=null,Es(p,C,y),p=y,u.current.lanes=p,ze(u,p),Za(u),o[Sa]=u.current,t0(o),new _m(u)},md.version="19.2.4",md}var BP;function aQ(){if(BP)return k0.exports;BP=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),k0.exports=rQ(),k0.exports}var iQ=aQ();const sQ=ta(iQ);/**
|
|
50
|
+
* react-router v7.13.2
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Remix Software Inc.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
+
*
|
|
57
|
+
* @license MIT
|
|
58
|
+
*/var FP="popstate";function HP(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function oQ(e={}){function t(r,a){var d;let i=(d=a.state)==null?void 0:d.masked,{pathname:s,search:l,hash:c}=i||r.location;return sC("",{pathname:s,search:l,hash:c},a.state&&a.state.usr||null,a.state&&a.state.key||"default",i?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,a){return typeof a=="string"?a:Qd(a)}return uQ(t,n,null,e)}function mn(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ia(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function lQ(){return Math.random().toString(36).substring(2,10)}function UP(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function sC(e,t,n=null,r,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?ac(t):t,state:n,key:t&&t.key||r||lQ(),unstable_mask:a}}function Qd({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function ac(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function uQ(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:i=!1}=r,s=a.history,l="POP",c=null,d=h();d==null&&(d=0,s.replaceState({...s.state,idx:d},""));function h(){return(s.state||{idx:null}).idx}function m(){l="POP";let S=h(),j=S==null?null:S-d;d=S,c&&c({action:l,location:w.location,delta:j})}function g(S,j){l="PUSH";let _=HP(S)?S:sC(w.location,S,j);d=h()+1;let k=UP(_,d),E=w.createHref(_.unstable_mask||_);try{s.pushState(k,"",E)}catch(T){if(T instanceof DOMException&&T.name==="DataCloneError")throw T;a.location.assign(E)}i&&c&&c({action:l,location:w.location,delta:1})}function v(S,j){l="REPLACE";let _=HP(S)?S:sC(w.location,S,j);d=h();let k=UP(_,d),E=w.createHref(_.unstable_mask||_);s.replaceState(k,"",E),i&&c&&c({action:l,location:w.location,delta:0})}function b(S){return cQ(S)}let w={get action(){return l},get location(){return e(a,s)},listen(S){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(FP,m),c=S,()=>{a.removeEventListener(FP,m),c=null}},createHref(S){return t(a,S)},createURL:b,encodeLocation(S){let j=b(S);return{pathname:j.pathname,search:j.search,hash:j.hash}},push:g,replace:v,go(S){return s.go(S)}};return w}function cQ(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),mn(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:Qd(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function PF(e,t,n="/"){return dQ(e,t,n,!1)}function dQ(e,t,n,r){let a=typeof t=="string"?ac(t):t,i=Ji(a.pathname||"/",n);if(i==null)return null;let s=DF(e);fQ(s);let l=null;for(let c=0;l==null&&c<s.length;++c){let d=jQ(i);l=wQ(s[c],d,r)}return l}function DF(e,t=[],n=[],r="",a=!1){let i=(s,l,c=a,d)=>{let h={relativePath:d===void 0?s.path||"":d,caseSensitive:s.caseSensitive===!0,childrenIndex:l,route:s};if(h.relativePath.startsWith("/")){if(!h.relativePath.startsWith(r)&&c)return;mn(h.relativePath.startsWith(r),`Absolute route path "${h.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),h.relativePath=h.relativePath.slice(r.length)}let m=li([r,h.relativePath]),g=n.concat(h);s.children&&s.children.length>0&&(mn(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),DF(s.children,t,g,m,c)),!(s.path==null&&!s.index)&&t.push({path:m,score:xQ(m,s.index),routesMeta:g})};return e.forEach((s,l)=>{var c;if(s.path===""||!((c=s.path)!=null&&c.includes("?")))i(s,l);else for(let d of RF(s.path))i(s,l,!0,d)}),t}function RF(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return a?[i,""]:[i];let s=RF(r.join("/")),l=[];return l.push(...s.map(c=>c===""?i:[i,c].join("/"))),a&&l.push(...s),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function fQ(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:bQ(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var hQ=/^:[\w-]+$/,mQ=3,pQ=2,gQ=1,vQ=10,yQ=-2,GP=e=>e==="*";function xQ(e,t){let n=e.split("/"),r=n.length;return n.some(GP)&&(r+=yQ),t&&(r+=pQ),n.filter(a=>!GP(a)).reduce((a,i)=>a+(hQ.test(i)?mQ:i===""?gQ:vQ),r)}function bQ(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function wQ(e,t,n=!1){let{routesMeta:r}=e,a={},i="/",s=[];for(let l=0;l<r.length;++l){let c=r[l],d=l===r.length-1,h=i==="/"?t:t.slice(i.length)||"/",m=Np({path:c.relativePath,caseSensitive:c.caseSensitive,end:d},h),g=c.route;if(!m&&d&&n&&!r[r.length-1].route.index&&(m=Np({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},h)),!m)return null;Object.assign(a,m.params),s.push({params:a,pathname:li([i,m.pathname]),pathnameBase:NQ(li([i,m.pathnameBase])),route:g}),m.pathnameBase!=="/"&&(i=li([i,m.pathnameBase]))}return s}function Np(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=SQ(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let i=a[0],s=i.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:r.reduce((d,{paramName:h,isOptional:m},g)=>{if(h==="*"){let b=l[g]||"";s=i.slice(0,i.length-b.length).replace(/(.)\/+$/,"$1")}const v=l[g];return m&&!v?d[h]=void 0:d[h]=(v||"").replace(/%2F/g,"/"),d},{}),pathname:i,pathnameBase:s,pattern:e}}function SQ(e,t=!1,n=!0){Ia(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,l,c,d,h)=>{if(r.push({paramName:l,isOptional:c!=null}),c){let m=h.charAt(d+s.length);return m&&m!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function jQ(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ia(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Ji(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}var kQ=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function _Q(e,t="/"){let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?ac(e):e,i;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?i=VP(n.substring(1),"/"):i=VP(n,t)):i=t,{pathname:i,search:EQ(r),hash:AQ(a)}}function VP(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function E0(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function CQ(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function IF(e){let t=CQ(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function $2(e,t,n,r=!1){let a;typeof e=="string"?a=ac(e):(a={...e},mn(!a.pathname||!a.pathname.includes("?"),E0("?","pathname","search",a)),mn(!a.pathname||!a.pathname.includes("#"),E0("#","pathname","hash",a)),mn(!a.search||!a.search.includes("#"),E0("#","search","hash",a)));let i=e===""||a.pathname==="",s=i?"/":a.pathname,l;if(s==null)l=n;else{let m=t.length-1;if(!r&&s.startsWith("..")){let g=s.split("/");for(;g[0]==="..";)g.shift(),m-=1;a.pathname=g.join("/")}l=m>=0?t[m]:"/"}let c=_Q(a,l),d=s&&s!=="/"&&s.endsWith("/"),h=(i||s===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(d||h)&&(c.pathname+="/"),c}var li=e=>e.join("/").replace(/\/\/+/g,"/"),NQ=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),EQ=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,AQ=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,TQ=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function OQ(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function MQ(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var LF=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function zF(e,t){let n=e;if(typeof n!="string"||!kQ.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,a=!1;if(LF)try{let i=new URL(window.location.href),s=n.startsWith("//")?new URL(i.protocol+n):new URL(n),l=Ji(s.pathname,t);s.origin===i.origin&&l!=null?n=l+s.search+s.hash:a=!0}catch{Ia(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:a,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var $F=["POST","PUT","PATCH","DELETE"];new Set($F);var PQ=["GET",...$F];new Set(PQ);var ic=x.createContext(null);ic.displayName="DataRouter";var Lg=x.createContext(null);Lg.displayName="DataRouterState";var DQ=x.createContext(!1),qF=x.createContext({isTransitioning:!1});qF.displayName="ViewTransition";var RQ=x.createContext(new Map);RQ.displayName="Fetchers";var IQ=x.createContext(null);IQ.displayName="Await";var ya=x.createContext(null);ya.displayName="Navigation";var Tf=x.createContext(null);Tf.displayName="Location";var vi=x.createContext({outlet:null,matches:[],isDataRoute:!1});vi.displayName="Route";var q2=x.createContext(null);q2.displayName="RouteError";var BF="REACT_ROUTER_ERROR",LQ="REDIRECT",zQ="ROUTE_ERROR_RESPONSE";function $Q(e){if(e.startsWith(`${BF}:${LQ}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function qQ(e){if(e.startsWith(`${BF}:${zQ}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new TQ(t.status,t.statusText,t.data)}catch{}}function BQ(e,{relative:t}={}){mn(Of(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=x.useContext(ya),{hash:a,pathname:i,search:s}=Mf(e,{relative:t}),l=i;return n!=="/"&&(l=i==="/"?n:li([n,i])),r.createHref({pathname:l,search:s,hash:a})}function Of(){return x.useContext(Tf)!=null}function yi(){return mn(Of(),"useLocation() may be used only in the context of a <Router> component."),x.useContext(Tf).location}var FF="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function HF(e){x.useContext(ya).static||x.useLayoutEffect(e)}function zg(){let{isDataRoute:e}=x.useContext(vi);return e?eJ():FQ()}function FQ(){mn(Of(),"useNavigate() may be used only in the context of a <Router> component.");let e=x.useContext(ic),{basename:t,navigator:n}=x.useContext(ya),{matches:r}=x.useContext(vi),{pathname:a}=yi(),i=JSON.stringify(IF(r)),s=x.useRef(!1);return HF(()=>{s.current=!0}),x.useCallback((c,d={})=>{if(Ia(s.current,FF),!s.current)return;if(typeof c=="number"){n.go(c);return}let h=$2(c,JSON.parse(i),a,d.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:li([t,h.pathname])),(d.replace?n.replace:n.push)(h,d.state,d)},[t,n,i,a,e])}x.createContext(null);function UF(){let{matches:e}=x.useContext(vi),t=e[e.length-1];return t?t.params:{}}function Mf(e,{relative:t}={}){let{matches:n}=x.useContext(vi),{pathname:r}=yi(),a=JSON.stringify(IF(n));return x.useMemo(()=>$2(e,JSON.parse(a),r,t==="path"),[e,a,r,t])}function HQ(e,t){return GF(e,t)}function GF(e,t,n){var S;mn(Of(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=x.useContext(ya),{matches:a}=x.useContext(vi),i=a[a.length-1],s=i?i.params:{},l=i?i.pathname:"/",c=i?i.pathnameBase:"/",d=i&&i.route;{let j=d&&d.path||"";KF(l,!d||j.endsWith("*")||j.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${j}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
59
|
+
|
|
60
|
+
Please change the parent <Route path="${j}"> to <Route path="${j==="/"?"*":`${j}/*`}">.`)}let h=yi(),m;if(t){let j=typeof t=="string"?ac(t):t;mn(c==="/"||((S=j.pathname)==null?void 0:S.startsWith(c)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${j.pathname}" was given in the \`location\` prop.`),m=j}else m=h;let g=m.pathname||"/",v=g;if(c!=="/"){let j=c.replace(/^\//,"").split("/");v="/"+g.replace(/^\//,"").split("/").slice(j.length).join("/")}let b=PF(e,{pathname:v});Ia(d||b!=null,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),Ia(b==null||b[b.length-1].route.element!==void 0||b[b.length-1].route.Component!==void 0||b[b.length-1].route.lazy!==void 0,`Matched leaf route at location "${m.pathname}${m.search}${m.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let w=WQ(b&&b.map(j=>Object.assign({},j,{params:Object.assign({},s,j.params),pathname:li([c,r.encodeLocation?r.encodeLocation(j.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:j.pathname]),pathnameBase:j.pathnameBase==="/"?c:li([c,r.encodeLocation?r.encodeLocation(j.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:j.pathnameBase])})),a,n);return t&&w?x.createElement(Tf.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...m},navigationType:"POP"}},w):w}function UQ(){let e=JQ(),t=OQ(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=x.createElement(x.Fragment,null,x.createElement("p",null,"💿 Hey developer 👋"),x.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",x.createElement("code",{style:i},"ErrorBoundary")," or"," ",x.createElement("code",{style:i},"errorElement")," prop on your route.")),x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),n?x.createElement("pre",{style:a},n):null,s)}var GQ=x.createElement(UQ,null),VF=class extends x.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=qQ(e.digest);n&&(e=n)}let t=e!==void 0?x.createElement(vi.Provider,{value:this.props.routeContext},x.createElement(q2.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?x.createElement(VQ,{error:e},t):t}};VF.contextType=DQ;var A0=new WeakMap;function VQ({children:e,error:t}){let{basename:n}=x.useContext(ya);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=$Q(t.digest);if(r){let a=A0.get(t);if(a)throw a;let i=zF(r.location,n);if(LF&&!A0.get(t))if(i.isExternal||r.reloadDocument)window.location.href=i.absoluteURL||i.to;else{const s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:r.replace}));throw A0.set(t,s),s}return x.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i.absoluteURL||i.to}`})}}return e}function KQ({routeContext:e,match:t,children:n}){let r=x.useContext(ic);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),x.createElement(vi.Provider,{value:e},n)}function WQ(e,t=[],n){let r=n==null?void 0:n.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let a=e,i=r==null?void 0:r.errors;if(i!=null){let h=a.findIndex(m=>m.route.id&&(i==null?void 0:i[m.route.id])!==void 0);mn(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),a=a.slice(0,Math.min(a.length,h+1))}let s=!1,l=-1;if(n&&r){s=r.renderFallback;for(let h=0;h<a.length;h++){let m=a[h];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(l=h),m.route.id){let{loaderData:g,errors:v}=r,b=m.route.loader&&!g.hasOwnProperty(m.route.id)&&(!v||v[m.route.id]===void 0);if(m.route.lazy||b){n.isStatic&&(s=!0),l>=0?a=a.slice(0,l+1):a=[a[0]];break}}}}let c=n==null?void 0:n.onError,d=r&&c?(h,m)=>{var g,v;c(h,{location:r.location,params:((v=(g=r.matches)==null?void 0:g[0])==null?void 0:v.params)??{},unstable_pattern:MQ(r.matches),errorInfo:m})}:void 0;return a.reduceRight((h,m,g)=>{let v,b=!1,w=null,S=null;r&&(v=i&&m.route.id?i[m.route.id]:void 0,w=m.route.errorElement||GQ,s&&(l<0&&g===0?(KF("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),b=!0,S=null):l===g&&(b=!0,S=m.route.hydrateFallbackElement||null)));let j=t.concat(a.slice(0,g+1)),_=()=>{let k;return v?k=w:b?k=S:m.route.Component?k=x.createElement(m.route.Component,null):m.route.element?k=m.route.element:k=h,x.createElement(KQ,{match:m,routeContext:{outlet:h,matches:j,isDataRoute:r!=null},children:k})};return r&&(m.route.ErrorBoundary||m.route.errorElement||g===0)?x.createElement(VF,{location:r.location,revalidation:r.revalidation,component:w,error:v,children:_(),routeContext:{outlet:null,matches:j,isDataRoute:!0},onError:d}):_()},null)}function B2(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function YQ(e){let t=x.useContext(ic);return mn(t,B2(e)),t}function XQ(e){let t=x.useContext(Lg);return mn(t,B2(e)),t}function ZQ(e){let t=x.useContext(vi);return mn(t,B2(e)),t}function F2(e){let t=ZQ(e),n=t.matches[t.matches.length-1];return mn(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function QQ(){return F2("useRouteId")}function JQ(){var r;let e=x.useContext(q2),t=XQ("useRouteError"),n=F2("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function eJ(){let{router:e}=YQ("useNavigate"),t=F2("useNavigate"),n=x.useRef(!1);return HF(()=>{n.current=!0}),x.useCallback(async(a,i={})=>{Ia(n.current,FF),n.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...i}))},[e,t])}var KP={};function KF(e,t,n){!t&&!KP[e]&&(KP[e]=!0,Ia(!1,n))}x.memo(tJ);function tJ({routes:e,future:t,state:n,isStatic:r,onError:a}){return GF(e,void 0,{state:n,isStatic:r,onError:a})}function Pd(e){mn(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function nJ({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:i=!1,unstable_useTransitions:s}){mn(!Of(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),c=x.useMemo(()=>({basename:l,navigator:a,static:i,unstable_useTransitions:s,future:{}}),[l,a,i,s]);typeof n=="string"&&(n=ac(n));let{pathname:d="/",search:h="",hash:m="",state:g=null,key:v="default",unstable_mask:b}=n,w=x.useMemo(()=>{let S=Ji(d,l);return S==null?null:{location:{pathname:S,search:h,hash:m,state:g,key:v,unstable_mask:b},navigationType:r}},[l,d,h,m,g,v,r,b]);return Ia(w!=null,`<Router basename="${l}"> is not able to match the URL "${d}${h}${m}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:x.createElement(ya.Provider,{value:c},x.createElement(Tf.Provider,{children:t,value:w}))}function rJ({children:e,location:t}){return HQ(oC(e),t)}function oC(e,t=[]){let n=[];return x.Children.forEach(e,(r,a)=>{if(!x.isValidElement(r))return;let i=[...t,a];if(r.type===x.Fragment){n.push.apply(n,oC(r.props.children,i));return}mn(r.type===Pd,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),mn(!r.props.index||!r.props.children,"An index route cannot have child routes.");let s={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=oC(r.props.children,i)),n.push(s)}),n}var cp="get",dp="application/x-www-form-urlencoded";function $g(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function aJ(e){return $g(e)&&e.tagName.toLowerCase()==="button"}function iJ(e){return $g(e)&&e.tagName.toLowerCase()==="form"}function sJ(e){return $g(e)&&e.tagName.toLowerCase()==="input"}function oJ(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function lJ(e,t){return e.button===0&&(!t||t==="_self")&&!oJ(e)}function lC(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(a=>[n,a]):[[n,r]])},[]))}function uJ(e,t){let n=lC(e);return t&&t.forEach((r,a)=>{n.has(a)||t.getAll(a).forEach(i=>{n.append(a,i)})}),n}var Em=null;function cJ(){if(Em===null)try{new FormData(document.createElement("form"),0),Em=!1}catch{Em=!0}return Em}var dJ=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function T0(e){return e!=null&&!dJ.has(e)?(Ia(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${dp}"`),null):e}function fJ(e,t){let n,r,a,i,s;if(iJ(e)){let l=e.getAttribute("action");r=l?Ji(l,t):null,n=e.getAttribute("method")||cp,a=T0(e.getAttribute("enctype"))||dp,i=new FormData(e)}else if(aJ(e)||sJ(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||l.getAttribute("action");if(r=c?Ji(c,t):null,n=e.getAttribute("formmethod")||l.getAttribute("method")||cp,a=T0(e.getAttribute("formenctype"))||T0(l.getAttribute("enctype"))||dp,i=new FormData(l,e),!cJ()){let{name:d,type:h,value:m}=e;if(h==="image"){let g=d?`${d}.`:"";i.append(`${g}x`,"0"),i.append(`${g}y`,"0")}else d&&i.append(d,m)}}else{if($g(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=cp,r=null,a=dp,s=e}return i&&a==="text/plain"&&(s=i,i=void 0),{action:r,method:n.toLowerCase(),encType:a,formData:i,body:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function H2(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function hJ(e,t,n,r){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${r}`:a.pathname=`${a.pathname}.${r}`:a.pathname==="/"?a.pathname=`_root.${r}`:t&&Ji(a.pathname,t)==="/"?a.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:a.pathname=`${a.pathname.replace(/\/$/,"")}.${r}`,a}async function mJ(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function pJ(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function gJ(e,t,n){let r=await Promise.all(e.map(async a=>{let i=t.routes[a.route.id];if(i){let s=await mJ(i,n);return s.links?s.links():[]}return[]}));return bJ(r.flat(1).filter(pJ).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function WP(e,t,n,r,a,i){let s=(c,d)=>n[d]?c.route.id!==n[d].route.id:!0,l=(c,d)=>{var h;return n[d].pathname!==c.pathname||((h=n[d].route.path)==null?void 0:h.endsWith("*"))&&n[d].params["*"]!==c.params["*"]};return i==="assets"?t.filter((c,d)=>s(c,d)||l(c,d)):i==="data"?t.filter((c,d)=>{var m;let h=r.routes[c.route.id];if(!h||!h.hasLoader)return!1;if(s(c,d)||l(c,d))return!0;if(c.route.shouldRevalidate){let g=c.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((m=n[0])==null?void 0:m.params)||{},nextUrl:new URL(e,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function vJ(e,t,{includeHydrateFallback:n}={}){return yJ(e.map(r=>{let a=t.routes[r.route.id];if(!a)return[];let i=[a.module];return a.clientActionModule&&(i=i.concat(a.clientActionModule)),a.clientLoaderModule&&(i=i.concat(a.clientLoaderModule)),n&&a.hydrateFallbackModule&&(i=i.concat(a.hydrateFallbackModule)),a.imports&&(i=i.concat(a.imports)),i}).flat(1))}function yJ(e){return[...new Set(e)]}function xJ(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function bJ(e,t){let n=new Set;return new Set(t),e.reduce((r,a)=>{let i=JSON.stringify(xJ(a));return n.has(i)||(n.add(i),r.push({key:i,link:a})),r},[])}function WF(){let e=x.useContext(ic);return H2(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function wJ(){let e=x.useContext(Lg);return H2(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var U2=x.createContext(void 0);U2.displayName="FrameworkContext";function YF(){let e=x.useContext(U2);return H2(e,"You must render this element inside a <HydratedRouter> element"),e}function SJ(e,t){let n=x.useContext(U2),[r,a]=x.useState(!1),[i,s]=x.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:d,onMouseLeave:h,onTouchStart:m}=t,g=x.useRef(null);x.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let w=j=>{j.forEach(_=>{s(_.isIntersecting)})},S=new IntersectionObserver(w,{threshold:.5});return g.current&&S.observe(g.current),()=>{S.disconnect()}}},[e]),x.useEffect(()=>{if(r){let w=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(w)}}},[r]);let v=()=>{a(!0)},b=()=>{a(!1),s(!1)};return n?e!=="intent"?[i,g,{}]:[i,g,{onFocus:pd(l,v),onBlur:pd(c,b),onMouseEnter:pd(d,v),onMouseLeave:pd(h,b),onTouchStart:pd(m,v)}]:[!1,g,{}]}function pd(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function jJ({page:e,...t}){let{router:n}=WF(),r=x.useMemo(()=>PF(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?x.createElement(_J,{page:e,matches:r,...t}):null}function kJ(e){let{manifest:t,routeModules:n}=YF(),[r,a]=x.useState([]);return x.useEffect(()=>{let i=!1;return gJ(e,t,n).then(s=>{i||a(s)}),()=>{i=!0}},[e,t,n]),r}function _J({page:e,matches:t,...n}){let r=yi(),{future:a,manifest:i,routeModules:s}=YF(),{basename:l}=WF(),{loaderData:c,matches:d}=wJ(),h=x.useMemo(()=>WP(e,t,d,i,r,"data"),[e,t,d,i,r]),m=x.useMemo(()=>WP(e,t,d,i,r,"assets"),[e,t,d,i,r]),g=x.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let w=new Set,S=!1;if(t.forEach(_=>{var E;let k=i.routes[_.route.id];!k||!k.hasLoader||(!h.some(T=>T.route.id===_.route.id)&&_.route.id in c&&((E=s[_.route.id])!=null&&E.shouldRevalidate)||k.hasClientLoader?S=!0:w.add(_.route.id))}),w.size===0)return[];let j=hJ(e,l,a.unstable_trailingSlashAwareDataRequests,"data");return S&&w.size>0&&j.searchParams.set("_routes",t.filter(_=>w.has(_.route.id)).map(_=>_.route.id).join(",")),[j.pathname+j.search]},[l,a.unstable_trailingSlashAwareDataRequests,c,r,i,h,t,e,s]),v=x.useMemo(()=>vJ(m,i),[m,i]),b=kJ(m);return x.createElement(x.Fragment,null,g.map(w=>x.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...n})),v.map(w=>x.createElement("link",{key:w,rel:"modulepreload",href:w,...n})),b.map(({key:w,link:S})=>x.createElement("link",{key:w,nonce:n.nonce,...S,crossOrigin:S.crossOrigin??n.crossOrigin})))}function CJ(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var NJ=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{NJ&&(window.__reactRouterVersion="7.13.2")}catch{}function EJ({basename:e,children:t,unstable_useTransitions:n,window:r}){let a=x.useRef();a.current==null&&(a.current=oQ({window:r,v5Compat:!0}));let i=a.current,[s,l]=x.useState({action:i.action,location:i.location}),c=x.useCallback(d=>{n===!1?l(d):x.startTransition(()=>l(d))},[n]);return x.useLayoutEffect(()=>i.listen(c),[i,c]),x.createElement(nJ,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:i,unstable_useTransitions:n})}var XF=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ai=x.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:a,reloadDocument:i,replace:s,unstable_mask:l,state:c,target:d,to:h,preventScrollReset:m,viewTransition:g,unstable_defaultShouldRevalidate:v,...b},w){let{basename:S,navigator:j,unstable_useTransitions:_}=x.useContext(ya),k=typeof h=="string"&&XF.test(h),E=zF(h,S);h=E.to;let T=BQ(h,{relative:a}),A=yi(),O=null;if(l){let M=$2(l,[],A.unstable_mask?A.unstable_mask.pathname:"/",!0);S!=="/"&&(M.pathname=M.pathname==="/"?S:li([S,M.pathname])),O=j.createHref(M)}let[I,P,D]=SJ(r,b),q=MJ(h,{replace:s,unstable_mask:l,state:c,target:d,preventScrollReset:m,relative:a,viewTransition:g,unstable_defaultShouldRevalidate:v,unstable_useTransitions:_});function z(M){t&&t(M),M.defaultPrevented||q(M)}let F=!(E.isExternal||i),R=x.createElement("a",{...b,...D,href:(F?O:void 0)||E.absoluteURL||T,onClick:F?z:t,ref:CJ(w,P),target:d,"data-discover":!k&&n==="render"?"true":void 0});return I&&!k?x.createElement(x.Fragment,null,R,x.createElement(jJ,{page:T})):R});ai.displayName="Link";var AJ=x.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:a=!1,style:i,to:s,viewTransition:l,children:c,...d},h){let m=Mf(s,{relative:d.relative}),g=yi(),v=x.useContext(Lg),{navigator:b,basename:w}=x.useContext(ya),S=v!=null&&zJ(m)&&l===!0,j=b.encodeLocation?b.encodeLocation(m).pathname:m.pathname,_=g.pathname,k=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;n||(_=_.toLowerCase(),k=k?k.toLowerCase():null,j=j.toLowerCase()),k&&w&&(k=Ji(k,w)||k);const E=j!=="/"&&j.endsWith("/")?j.length-1:j.length;let T=_===j||!a&&_.startsWith(j)&&_.charAt(E)==="/",A=k!=null&&(k===j||!a&&k.startsWith(j)&&k.charAt(j.length)==="/"),O={isActive:T,isPending:A,isTransitioning:S},I=T?t:void 0,P;typeof r=="function"?P=r(O):P=[r,T?"active":null,A?"pending":null,S?"transitioning":null].filter(Boolean).join(" ");let D=typeof i=="function"?i(O):i;return x.createElement(ai,{...d,"aria-current":I,className:P,ref:h,style:D,to:s,viewTransition:l},typeof c=="function"?c(O):c)});AJ.displayName="NavLink";var TJ=x.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:a,state:i,method:s=cp,action:l,onSubmit:c,relative:d,preventScrollReset:h,viewTransition:m,unstable_defaultShouldRevalidate:g,...v},b)=>{let{unstable_useTransitions:w}=x.useContext(ya),S=IJ(),j=LJ(l,{relative:d}),_=s.toLowerCase()==="get"?"get":"post",k=typeof l=="string"&&XF.test(l),E=T=>{if(c&&c(T),T.defaultPrevented)return;T.preventDefault();let A=T.nativeEvent.submitter,O=(A==null?void 0:A.getAttribute("formmethod"))||s,I=()=>S(A||T.currentTarget,{fetcherKey:t,method:O,navigate:n,replace:a,state:i,relative:d,preventScrollReset:h,viewTransition:m,unstable_defaultShouldRevalidate:g});w&&n!==!1?x.startTransition(()=>I()):I()};return x.createElement("form",{ref:b,method:_,action:j,onSubmit:r?c:E,...v,"data-discover":!k&&e==="render"?"true":void 0})});TJ.displayName="Form";function OJ(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ZF(e){let t=x.useContext(ic);return mn(t,OJ(e)),t}function MJ(e,{target:t,replace:n,unstable_mask:r,state:a,preventScrollReset:i,relative:s,viewTransition:l,unstable_defaultShouldRevalidate:c,unstable_useTransitions:d}={}){let h=zg(),m=yi(),g=Mf(e,{relative:s});return x.useCallback(v=>{if(lJ(v,t)){v.preventDefault();let b=n!==void 0?n:Qd(m)===Qd(g),w=()=>h(e,{replace:b,unstable_mask:r,state:a,preventScrollReset:i,relative:s,viewTransition:l,unstable_defaultShouldRevalidate:c});d?x.startTransition(()=>w()):w()}},[m,h,g,n,r,a,t,e,i,s,l,c,d])}function PJ(e){Ia(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=x.useRef(lC(e)),n=x.useRef(!1),r=yi(),a=x.useMemo(()=>uJ(r.search,n.current?null:t.current),[r.search]),i=zg(),s=x.useCallback((l,c)=>{const d=lC(typeof l=="function"?l(new URLSearchParams(a)):l);n.current=!0,i("?"+d,c)},[i,a]);return[a,s]}var DJ=0,RJ=()=>`__${String(++DJ)}__`;function IJ(){let{router:e}=ZF("useSubmit"),{basename:t}=x.useContext(ya),n=QQ(),r=e.fetch,a=e.navigate;return x.useCallback(async(i,s={})=>{let{action:l,method:c,encType:d,formData:h,body:m}=fJ(i,t);if(s.navigate===!1){let g=s.fetcherKey||RJ();await r(g,n,s.action||l,{unstable_defaultShouldRevalidate:s.unstable_defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:h,body:m,formMethod:s.method||c,formEncType:s.encType||d,flushSync:s.flushSync})}else await a(s.action||l,{unstable_defaultShouldRevalidate:s.unstable_defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:h,body:m,formMethod:s.method||c,formEncType:s.encType||d,replace:s.replace,state:s.state,fromRouteId:n,flushSync:s.flushSync,viewTransition:s.viewTransition})},[r,a,t,n])}function LJ(e,{relative:t}={}){let{basename:n}=x.useContext(ya),r=x.useContext(vi);mn(r,"useFormAction must be used inside a RouteContext");let[a]=r.matches.slice(-1),i={...Mf(e||".",{relative:t})},s=yi();if(e==null){i.search=s.search;let l=new URLSearchParams(i.search),c=l.getAll("index");if(c.some(h=>h==="")){l.delete("index"),c.filter(m=>m).forEach(m=>l.append("index",m));let h=l.toString();i.search=h?`?${h}`:""}}return(!e||e===".")&&a.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(i.pathname=i.pathname==="/"?n:li([n,i.pathname])),Qd(i)}function zJ(e,{relative:t}={}){let n=x.useContext(qF);mn(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=ZF("useViewTransitionState"),a=Mf(e,{relative:t});if(!n.isTransitioning)return!1;let i=Ji(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=Ji(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Np(a.pathname,s)!=null||Np(a.pathname,i)!=null}var vl=MF();class YP extends Error{constructor(t,n){super(n),this.status=t}}async function qg(e,t,n){const r={method:e,credentials:"include",headers:{"Content-Type":"application/json"}};n!==void 0&&(r.body=JSON.stringify(n));const a=await fetch(t,r);if(a.status===401)throw window.dispatchEvent(new CustomEvent("auth:unauthorized")),new YP(401,"Unauthorized");if(!a.ok){const i=await a.text().catch(()=>a.statusText);let s=i;try{const l=JSON.parse(i);l.error&&(s=l.error)}catch{}throw new YP(a.status,s)}if(a.status!==204)return a.json()}function ct(e){return qg("GET",e)}function Be(e,t){return qg("POST",e,t)}function oo(e,t){return qg("PUT",e,t)}function $a(e){return qg("DELETE",e)}function $J(e){return Be("/api/auth/login",{password:e})}function qJ(){return Be("/api/auth/logout")}function BJ(){return ct("/api/auth/status")}function FJ(){const[e,t]=x.useState(!1),[n,r]=x.useState(!0),[a,i]=x.useState(!0);x.useEffect(()=>{BJ().then(c=>{t(c.authenticated),r(c.authRequired)}).catch(()=>t(!1)).finally(()=>i(!1))},[]),x.useEffect(()=>{const c=()=>t(!1);return window.addEventListener("auth:unauthorized",c),()=>window.removeEventListener("auth:unauthorized",c)},[]);const s=x.useCallback(async c=>{await $J(c),t(!0)},[]),l=x.useCallback(async()=>{await qJ(),t(!1)},[]);return{authenticated:e,authRequired:n,loading:a,login:s,logout:l}}function HJ(e){const[t,n]=x.useState(!1),r=x.useRef(null),a=x.useRef(new Set),i=x.useRef(void 0),s=x.useRef(0),l=x.useCallback(()=>{if(!e)return;const m=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`,g=new WebSocket(m);r.current=g,g.onopen=()=>{n(!0),s.current=0},g.onmessage=v=>{try{const b=JSON.parse(v.data);a.current.forEach(w=>w(b))}catch{}},g.onclose=()=>{n(!1),r.current=null;const v=Math.min(1e3*2**s.current,3e4);s.current++,i.current=setTimeout(l,v)},g.onerror=()=>{g.close()}},[e]);x.useEffect(()=>(l(),()=>{i.current&&clearTimeout(i.current),r.current&&r.current.close()}),[l]);const c=x.useCallback(h=>(a.current.add(h),()=>{a.current.delete(h)}),[]),d=x.useCallback(h=>{r.current&&r.current.readyState===WebSocket.OPEN&&r.current.send(JSON.stringify(h))},[]);return{connected:t,onEvent:c,sendMessage:d}}const G2=new Map;function Am(e){G2.set(e.id,e)}function uC(){return Array.from(G2.values())}function XP(e){return uC().filter(t=>t.hasTab&&t.isEnabled(e))}function UJ(){const e={},t={};for(const n of G2.values())Object.assign(e,n.translations.en),Object.assign(t,n.translations.ko);return{en:e,ko:t}}const GJ={en:{"login.title":"CLITrigger","login.subtitle":"Authentication Required","login.password":"Enter password","login.submit":"Sign In","login.loading":"Authenticating...","login.error":"Access denied. Please try again.","login.footer":"Secure Access","login.disclaimer":'This software is provided "as is" without any warranties. Users are solely responsible for all actions taken using this tool, including any costs incurred from AI CLI usage, data loss, or unintended code changes. The developers assume no liability for any direct, indirect, or consequential damages arising from use.',"sidebar.home":"Home","sidebar.review":"Review Queue","sidebar.workspaces":"Workspaces","review.title":"Review Queue","review.subtitle":"Triage overnight todos across all projects","review.refresh":"Refresh","review.empty":"Nothing to review in this window.","review.viewDetails":"View","review.approve":"Approve & Merge","review.requestChanges":"Request changes","review.discard":"Discard","review.cancel":"Cancel","review.send":"Send","review.continuePlaceholder":"Describe what to fix or change…","review.discardConfirm":"Discard this todo and clean up its worktree?","review.mergeFailed":"Merge failed","review.continueFailed":"Continue failed","review.discardFailed":"Discard failed","review.closeDetails":"Close details","review.justNow":"just now","review.minAgo":"m ago","review.hourAgo":"h ago","review.dayAgo":"d ago","review.files":"files","review.lines":"lines","review.rounds":"rounds","review.window.12h":"Last 12h","review.window.24h":"Last 24h","review.window.7d":"Last 7d","review.filter.all":"All","review.filter.risky":"Risky","review.filter.quickWins":"Quick wins","review.filter.failed":"Failed","review.risk.low":"Low risk","review.risk.medium":"Medium risk","review.risk.high":"High risk","review.tokens.total":"Total tokens","review.tokens.todos":"Todos","review.tokens.byCli":"By CLI tool","projects.title":"All Projects","projects.subtitle":"Project Console","projects.new":"New Project","projects.logout":"Sign Out","projects.loading":"Loading projects...","projects.empty":"No projects yet","projects.emptyHint":"Create your first project to get started.","projects.tasks":"tasks","projects.active":"active","projects.done":"done","projects.search":"Search projects...","projects.delete":"Delete project","projects.deleteConfirm":"Are you sure you want to delete this project?","projects.pathMissing":"Path not found","projects.pathMissingConfirm":"The local folder for this project no longer exists. Delete it?","projects.noGit":"No Git","detail.back":"Projects","detail.loading":"Loading...","detail.notFound":"Project not found","detail.backToProjects":"Back to Projects","detail.live":"Connected","header.branch":"Branch","header.editName":"Click to rename project","header.openFolder":"Open folder","header.workers":"Workers","header.model":"Model","header.settings":"Settings","header.runAll":"Run All","header.stopAll":"Stop All","header.config":"Project Settings","header.maxWorkers":"Max Workers","settings.defaultMaxTurns":"Default Max Turns","settings.defaultMaxTurnsHint":"Default turn limit per task. Tasks can override individually.","header.cliTool":"CLI Tool","header.aiModel":"AI Model","header.cliFlags":"CLI Flags","header.cancel":"Cancel","header.save":"Save","header.saving":"Saving...","header.noGit":"No Git","header.noGitHint":'This project is not a git repository. Tasks will run directly without worktree isolation. Run "git init" in the project path, then re-check.',"header.recheckGit":"Re-check Git Status","header.fallbackChainTitle":"CLI Fallback Chain","header.fallbackChainHint":"When a CLI tool runs out of context, automatically switch to the next tool in the chain.","header.sandboxTitle":"Sandbox Mode","header.sandboxBadgeStrict":"Sandbox: Strict","header.sandboxBadgePermissive":"Sandbox: Permissive","header.sandboxStrict":"Strict (Recommended)","header.sandboxStrictDesc":"CLI tools can only access files within the worktree directory.","header.sandboxPermissive":"Permissive","header.sandboxPermissiveDesc":"CLI tools can access any file on the system.","header.sandboxWarning":"Warning: In permissive mode, CLI tools can access files outside the worktree. Use with caution.","header.worktreeTitle":"Worktree Isolation","header.worktreeEnabled":"Worktree (Recommended)","header.worktreeEnabledDesc":"Each task runs in its own branch. Safe for parallel tasks.","header.worktreeDisabled":"Direct (Main Branch)","header.worktreeDisabledDesc":"Tasks run on the main branch. Max workers forced to 1.","header.worktreeWarning":"Warning: Tasks will modify the main branch directly. Concurrent execution is disabled.","header.npmAutoInstallLabel":"Auto-run `npm install` on worktree creation","header.npmAutoInstallHint":"Lets agents run test/build inside the worktree immediately for npm projects. Disable for pnpm/yarn/bun or non-npm projects.","header.noWorktreeBadge":"No Worktree","header.debugBadge":"Debug Logs","header.showTokenUsageTitle":"Token Usage Display","header.showTokenUsageDesc":"Show token usage (input/output) after task completion.","header.showTokenUsageEnable":"Show token usage","header.debugLoggingTitle":"Debug Logging","header.debugLoggingDesc":"Save full CLI input/output to .debug-logs/ for each task execution.","header.debugLoggingEnable":"Enable debug log files","header.gstackTitle":"gstack Skills","header.gstackEnabled":"Enable gstack skill injection","header.gstackCredit":"Powered by gstack (MIT License, Garry Tan)","header.usageLimit":"Usage","header.cliNotInstalled":"{tool} is not installed","header.cliInstalled":"Installed","header.cliNotFound":"Not installed","header.cliInstallHint.claude":"npm install -g @anthropic-ai/claude-code","header.cliInstallHint.gemini":"npm install -g @anthropic-ai/gemini-cli","header.cliInstallHint.codex":"npm install -g @openai/codex","header.cliRefresh":"Re-check","header.gstackClaudeOnly":"gstack skills are only available with Claude CLI.","header.modelSettings":"AI Model Settings","header.modelValue":"Model ID","header.modelLabel":"Display Name","header.addModel":"Add","header.modelSettingsHint":"Add custom models here. They will appear in model dropdowns across all projects.","header.modelDeprecated":"deprecated","header.modelDeprecatedWarning":"This model is no longer supported by the installed CLI. It will fall back to the default at execution time.","header.modelDeprecatedTitle":"Model marked as deprecated","header.modelDeprecatedReason":"The installed CLI no longer reports this model in --help, and it is not listed in the bundled model registry. At execution time it will silently fall back to the CLI default.","header.modelDeprecatedFixHeading":"How to fix","header.modelDeprecatedFix1":"Pick a currently-supported model in project settings → Config.","header.modelDeprecatedFix2":"Or upgrade the CLI so it reports this model again.","header.modelDeprecatedFix3":"Or add it as a custom model in AI Model Settings if you know it is still valid.","header.modelDeprecatedOpenSettings":"Open settings","header.jiraTitle":"Jira Integration","header.jiraBaseUrl":"Jira URL","header.jiraBaseUrlPlaceholder":"https://yoursite.atlassian.net","header.jiraEmail":"Email","header.jiraEmailPlaceholder":"your@email.com","header.jiraApiToken":"API Token","header.jiraApiTokenPlaceholder":"Atlassian API token","header.jiraProjectKey":"Project Key","header.jiraProjectKeyPlaceholder":"e.g. PROJ","header.jiraTestConnection":"Test Connection","header.jiraTesting":"Testing...","header.jiraConnected":"Connected","header.jiraFailed":"Connection failed","header.jiraTokenHint":"Generate at id.atlassian.com > Security > API tokens","form.newProject":"New Project","form.projectName":"Project Name","form.folderPath":"Folder Path","form.cancel":"Cancel","form.create":"Create","browse.title":"Browse Folder","browse.select":"Select","browse.loading":"Loading...","browse.error":"Failed to load directory","browse.empty":"No folders found","todos.title":"Tasks","todos.add":"Add Task","todos.empty":"No tasks yet","todos.emptyHint":"Add a task to begin.","todos.merge":"Merge","todos.filterAll":"All","todos.filterActive":"In Progress","todos.filterCompleted":"Completed","todos.filterCancelled":"Cancelled","todos.filterEmpty":"No tasks in this filter.","todos.stackModeOn":"Stack mode on — click ✕ to disable","todos.stackModeOff":"Enable stack mode (iOS-style collapse)","todos.collapseStack":"Collapse to stack","todos.expandStack":"Click to expand","todo.description":"Description","todo.noDescription":"No description provided.","todo.attachedImages":"Attached Images","todo.branch":"Branch","todo.path":"Path","todo.worktree":"Worktree","todo.result":"Result","todo.mergeFailed":"Merge failed","todo.diffError":"Diff error","todo.diffOutput":"Changes","todo.files":"files","todo.systemLog":"Activity Log","todo.start":"Start","todo.startHeadless":"Headless","todo.startHeadlessDesc":"Runs autonomously. All permissions auto-approved. No user input needed.","todo.startInteractive":"Interactive","todo.startInteractiveDesc":"Keeps stdin open so you can send messages during execution.","todo.startVerbose":"Verbose","todo.startVerboseDesc":"Auto-approved + full raw log output in real-time.","todo.sendPlaceholder":"Type a message...","todo.startWithDependency":"Start parent task first","todo.stop":"Stop","todo.viewDiff":"View Diff","todo.hideDiff":"Hide Diff","todo.viewDebugLog":"Debug Log","todo.merge":"Merge","todo.mergeChain":"Merge Chain","todo.mergeChainDesc":"Merge all tasks in this chain to main branch","todo.chainComplete":"Chain Complete","todo.chainTasks":"{count} tasks","todo.edit":"Edit","todo.delete":"Delete","todo.cleanup":"Clean up worktree","todo.cleanupFailed":"Cleanup failed","cleanup.confirmDeleteBranch":`Worktree will be removed. Also delete branch "{name}"?
|
|
61
|
+
|
|
62
|
+
OK = delete worktree + branch
|
|
63
|
+
Cancel = delete worktree only`,"todo.retry":"Retry","todo.retryDesc":"Cleans up previous worktree, clears logs, and re-runs from scratch.","todo.retryFailed":"Retry failed","todo.continue":"Continue","todo.continueDesc":"Run a follow-up prompt in the same worktree, preserving prior work.","todo.continuing":"Continuing...","todo.confirmContinue":"Run follow-up","todo.continuePromptLabel":"Follow-up prompt","todo.continuePromptPlaceholder":"Describe the next step or fix to apply in this worktree...","todo.continuePromptRequired":"Follow-up prompt is required.","todo.roundLabel":"round","todo.dependsOn":"Depends on","todo.mergedFrom":"Inherited from","todo.transferredTo":"Transferred to","todo.schedule":"Schedule","todo.scheduleDesc":"Convert this task into a one-time scheduled run.","todo.scheduleAt":"Run at","todo.scheduling":"Scheduling...","todo.confirmSchedule":"Schedule","todo.scheduleKeepOriginal":"Keep original task","todo.scheduleOnReset":"Run on Reset","todo.scheduleOnResetDesc":"Auto-run a new task when the rate limit resets.","todo.scheduleOnResetLabel":"Rate limit resets at","todo.resetPromptPlaceholder":"Enter the prompt to run after rate limit resets...","todo.confirmResetSchedule":"Schedule on Reset","todoForm.titlePlaceholder":"Task title...","todoForm.descPlaceholder":"Description (optional)...","todoForm.cliTool":"CLI Tool","todoForm.aiModel":"AI Model","todoForm.addImage":"Add Image","todoForm.pasteHint":"Ctrl+V to paste image","todoForm.images":"Images","todoForm.maxTurns":"Max Turns","todoForm.maxTurnsPlaceholder":"No limit","todoForm.maxTurnsHint":"Limit the number of agentic turns to prevent excessive token usage.","todoForm.dependsOn":"Depends On","todoForm.noDependency":"None (independent task)","todoForm.dependsOnHint":"This task will wait for the dependency to complete, then squash merge its changes into a new branch.","todoForm.worktreeMode":"Execution Branch","todoForm.worktreeInherit":"Follow project setting","todoForm.worktreeForceOn":"Use worktree (isolated branch)","todoForm.worktreeForceOff":"Run on main branch","todoForm.worktreeProjectDefaultOn":"Project default: worktree","todoForm.worktreeProjectDefaultOff":"Project default: main branch","todoForm.worktreeMainWarning":"Running on main branch blocks other todos from running concurrently.","todoForm.cancel":"Cancel","todoForm.save":"Save","dnd.dropHint":"Run after this task","dnd.removeDep":"Remove dependency","dnd.dropToRemoveDep":"Drop here to remove dependency","dnd.cyclicWarning":"Cannot link: circular dependency","graph.autoLayout":"Auto Layout","graph.listView":"List View","graph.graphView":"Graph View","status.pending":"Idle","status.running":"Running","status.completed":"Done","status.failed":"Failed","status.stopped":"Stopped","status.merged":"Merged","progress.complete":"complete","progress.done":"Done","progress.live":"Running","progress.idle":"Idle","progress.fail":"Failed","progress.stop":"Stopped","progress.merged":"Merged","failure.title":"Failure Reason","failure.exitCode":"Exit code","failure.fix":"Fix This: Creates a new task that analyzes the failure and attempts to fix the issue.","failure.fixPrefix":"[Fix] ","result.duration":"Duration","result.commits":"commits","result.filesChanged":"files changed","result.commitHistory":"Commit History","result.changedFiles":"Changed Files","result.tokenUsage":"Token Usage","result.inputTokens":"input","result.outputTokens":"output","result.totalCost":"Cost","result.cacheTokens":"cache","result.turns":"turns","result.contextUsed":"ctx","result.levelLight":"Light","result.levelModerate":"Moderate","result.levelHigh":"High","result.levelHeavy":"Heavy","log.awaiting":"Awaiting output...","log.waitingResponse":"Waiting for response...","log.noChanges":"No changes detected.","log.copy":"Copy","log.copied":"Copied!","log.viewChat":"Chat","log.viewRaw":"Raw","schedules.title":"Schedules","schedules.add":"New Schedule","schedules.empty":"No schedules yet","schedules.emptyHint":"Create a schedule to automate recurring tasks.","schedule.type":"Schedule Type","schedule.recurring":"Recurring","schedule.once":"One-time","schedule.runAtLabel":"Run at","schedule.cronExpression":"Frequency","schedule.cronHint":"e.g. */30 * * * * (every 30min), 0 9 * * * (daily 9am), 0 9 * * 1-5 (weekdays 9am)","cron.everyMinutes":"Minutes","cron.hourly":"Hourly","cron.daily":"Daily","cron.weekly":"Weekly","cron.monthly":"Monthly","cron.custom":"Custom","cron.every":"Every","cron.minutesLabel":"minutes","cron.everyHourAt":"Every hour at","cron.minutesPast":"min past","cron.everyDayAt":"Every day at","cron.at":"at","cron.everyMonthOn":"Every month on day","cron.dayAt":"at","cron.expression":"Cron","cron.mon":"Mon","cron.tue":"Tue","cron.wed":"Wed","cron.thu":"Thu","cron.fri":"Fri","cron.sat":"Sat","cron.sun":"Sun","schedule.skipIfRunning":"Skip if previous run still active","schedule.active":"Active","schedule.paused":"Paused","schedule.lastRun":"Last run","schedule.never":"Never","schedule.trigger":"Run Now","schedule.activate":"Activate","schedule.pause":"Pause","schedule.edit":"Edit","schedule.delete":"Delete","schedule.runs":"Run History","schedule.runTriggered":"Triggered","schedule.runSkipped":"Skipped","schedule.runCompleted":"Completed","schedule.runFailed":"Failed","schedule.noRuns":"No runs yet","scheduleForm.titlePlaceholder":"Schedule title...","scheduleForm.descPlaceholder":"Task description template...","scheduleForm.cliTool":"CLI Tool","scheduleForm.aiModel":"AI Model","scheduleForm.cancel":"Cancel","scheduleForm.save":"Save","jira.title":"Jira Issues","jira.search":"Search issues...","jira.allStatuses":"All Statuses","jira.refresh":"Refresh","jira.import":"Import as Task","jira.importing":"Importing...","jira.imported":"Imported!","jira.noIssues":"No issues found","jira.noIssuesHint":"Try changing the filter or search query.","jira.loadMore":"Load More","jira.total":"total","jira.transition":"Change Status","jira.comment":"Comment","jira.commentPlaceholder":"Add a comment...","jira.commentSend":"Send","jira.createIssue":"Create Issue","jira.createSummary":"Summary","jira.createDesc":"Description","jira.createType":"Issue Type","jira.creating":"Creating...","jira.notConfigured":"Jira is not configured. Enable it in project settings.","jira.assignee":"Assignee","jira.unassigned":"Unassigned","jira.updated":"Updated","notion.title":"Notion Pages","notion.search":"Search pages...","notion.refresh":"Refresh","notion.import":"Import as Task","notion.importing":"Importing...","notion.imported":"Imported!","notion.noPages":"No pages found","notion.noPagesHint":"Try changing the search query.","notion.loadMore":"Load More","notion.createPage":"Create Page","notion.pageTitle":"Title","notion.creating":"Creating...","notion.notConfigured":"Notion is not configured. Enable it in project settings.","notion.loadingContent":"Loading content...","notion.noContent":"No content","header.notionTitle":"Notion Integration","header.notionApiKey":"Integration Token","header.notionApiKeyPlaceholder":"ntn_...","header.notionDatabaseId":"Database ID","header.notionDatabaseIdPlaceholder":"e.g. abc123def456...","header.notionTestConnection":"Test Connection","header.notionTesting":"Testing...","header.notionConnected":"Connected","header.notionFailed":"Connection failed","header.notionTokenHint":"Create an integration at notion.so/my-integrations and share the database with it","github.title":"GitHub Issues","github.search":"Search issues...","github.refresh":"Refresh","github.import":"Import as Task","github.importing":"Importing...","github.imported":"Imported!","github.noIssues":"No issues found","github.noIssuesHint":"Try changing the filter or search query.","github.loadMore":"Load More","github.createIssue":"Create Issue","github.issueTitle":"Title","github.issueBody":"Description","github.creating":"Creating...","github.notConfigured":"GitHub is not configured. Enable it in project settings.","github.loadingComments":"Loading comments...","github.comments":"Comments","github.noBody":"No description provided.","github.open":"Open","github.closed":"Closed","github.all":"All","header.githubTitle":"GitHub Integration","header.githubToken":"Personal Access Token","header.githubTokenPlaceholder":"ghp_...","header.githubOwner":"Repository Owner","header.githubOwnerPlaceholder":"username or org","header.githubRepo":"Repository Name","header.githubRepoPlaceholder":"repo-name","header.githubTestConnection":"Test Connection","header.githubTesting":"Testing...","header.githubConnected":"Connected","header.githubFailed":"Connection failed","header.githubTokenHint":"Create a token at github.com/settings/tokens with repo scope","tabs.tasks":"Auto Tasks","tabs.sessions":"Sessions","tabs.discussions":"Discussions","tabs.schedules":"Schedules","tabs.jira":"Jira","tabs.notion":"Notion","tabs.github":"GitHub","tabs.git":"Git","tabs.planner":"Planner","tabs.analytics":"Analytics","planner.title":"Planner","planner.add":"New Item","planner.empty":"No planner items yet","planner.emptyHint":"Add ideas, tasks, and plans to your planner.","planner.filterTag":"All Tags","planner.filterStatus":"All Statuses","planner.col.title":"Title","planner.col.tags":"Tags","planner.col.dueDate":"Due Date","planner.col.status":"Status","planner.col.actions":"","planner.edit":"Edit","planner.delete":"Delete","planner.deleteConfirm":"Delete this planner item?","planner.convertToTask":"Convert to Task","planner.convertToSchedule":"Convert to Schedule","planner.movedToTodo":"Moved to Tasks","planner.movedToSchedule":"Moved to Schedules","planner.noDueDate":"—","planner.export":"Export","planner.exportTooltip":"Export planner items to a Markdown file","planner.exportError":"Export failed","planner.import":"Import","planner.importTooltip":"Import planner items from a Markdown file","planner.importSuccess":"Imported {items} item(s) and {tags} tag(s).","planner.importError":"Import failed","planner.importInvalidMarkdown":"File is empty or not valid Markdown","planner.importNoImages":"Note: images are not included in exported files.","planner.dropHint":"Drop a Markdown file to import","planner.dropHintSub":".md or .markdown","planner.dropInvalidFile":"Only Markdown files (.md / .markdown) can be imported","plannerForm.titlePlaceholder":"Planner item title...","plannerForm.descPlaceholder":"Description or details...","plannerForm.tags":"Tags","plannerForm.tagsPlaceholder":"Type and press Enter","plannerForm.dueDate":"Due Date","plannerForm.priority":"Priority","plannerForm.priorityLow":"Low","plannerForm.priorityNormal":"Normal","plannerForm.priorityHigh":"High","plannerForm.priorityCritical":"Critical","plannerForm.status":"Status","plannerForm.addImage":"Add Image","plannerForm.pasteHint":"Ctrl+V to paste image","plannerForm.images":"Images","plannerForm.cancel":"Cancel","plannerForm.save":"Save","plannerStatus.pending":"Pending","plannerStatus.in_progress":"In Progress","plannerStatus.done":"Done","plannerStatus.moved":"Moved","plannerConvert.toTask":"Convert to Task","plannerConvert.toSchedule":"Convert to Schedule","plannerConvert.cliTool":"CLI Tool","plannerConvert.model":"Model","plannerConvert.maxTurns":"Max Turns","plannerConvert.scheduleType":"Schedule Type","plannerConvert.recurring":"Recurring","plannerConvert.once":"One-time","plannerConvert.cronExpression":"Cron Expression","plannerConvert.runAt":"Run At","plannerConvert.cancel":"Cancel","plannerConvert.convert":"Convert","plannerConvert.projectDefault":"Project Default","plannerTag.selectOrCreate":"Select or create","plannerTag.delete":"Delete","plannerTag.deleteConfirm":"Remove this tag from all items?","plannerTag.color":"Color","plannerTag.rename":"Rename","plannerTag.color.default":"Default","plannerTag.color.gray":"Gray","plannerTag.color.brown":"Brown","plannerTag.color.orange":"Orange","plannerTag.color.yellow":"Yellow","plannerTag.color.green":"Green","plannerTag.color.blue":"Blue","plannerTag.color.purple":"Purple","plannerTag.color.pink":"Pink","plannerTag.color.red":"Red","session.new":"New Session","session.title":"Session Title","session.description":"Initial Prompt (Optional)","session.start":"Start","session.stop":"Stop","session.delete":"Delete","session.empty":"No sessions yet","session.emptyHint":"Start an interactive AI conversation.","session.create":"Create Session","session.cliTool":"CLI Tool","session.model":"Model","session.worktree":"Use worktree (isolated branch)","session.cleanup":"Clean up worktree","analytics.title":"Execution Analytics","analytics.loading":"Loading analytics...","analytics.noData":"No data available","analytics.totalTasks":"Total Tasks","analytics.successRate":"Success Rate","analytics.totalCost":"Total Cost","analytics.totalTokens":"Total Tokens","analytics.avgPerTask":"Avg / Task","analytics.byStatus":"By Status","analytics.byCliTool":"By CLI Tool","analytics.dailyActivity":"Daily Activity","analytics.dailyCost":"Daily Cost","analytics.costBreakdown":"Cost Summary","analytics.tasks":"tasks","analytics.period.7d":"7D","analytics.period.30d":"30D","analytics.period.90d":"90D","analytics.period.all":"All","discussions.title":"Discussions","discussions.add":"New Discussion","discussions.empty":"No discussions yet","discussions.emptyHint":"Create a discussion to have agents collaborate on a feature.","discussions.round":"Round","discussions.maxRounds":"Max Rounds","discussions.agents":"Agents","discussions.speaking":"Speaking...","discussions.inject":"Send Message","discussions.skipTurn":"Skip Turn","discussions.implement":"Start Implementation","discussions.implementHint":"Select an agent to implement the discussed feature.","discussions.selectAgent":"Select Implementer","discussions.notFound":"Discussion not found","discussions.back":"Back to Discussions","discussions.userMessage":"Your message...","discussions.implementation":"Implementation","discussions.resume":"Resume","discussions.retry":"Retry","discussions.failureTitle":"Discussion Failed","discussions.noErrorLogs":"No error details available","discussions.pause":"Pause","discussions.waiting":"Waiting...","discussions.roundExplain":"One round = each agent speaks once.","discussions.autoImplement":"Auto-implement after discussion","discussions.autoImplementHint":"Automatically start implementation when all rounds complete.","discussions.collapse":"Collapse","discussions.expand":"Expand","discussions.collapseAll":"Collapse All","discussions.expandAll":"Expand All","status.skipped":"Skipped","status.paused":"Paused","agents.title":"Agent Personas","agents.add":"Add Agent","agents.name":"Name","agents.role":"Role","agents.systemPrompt":"System Prompt","agents.cliTool":"CLI Tool","agents.cliModel":"Model","agents.color":"Color","agents.empty":"No agents yet. Create agent personas to start a discussion.","agents.manage":"Manage Agents","agents.presets":"Preset Templates","agents.roles.architect":"Architect","agents.roles.developer":"Developer","agents.roles.reviewer":"Reviewer","agents.roles.pm":"Product Manager","agents.roles.tester":"Tester","agents.roles.custom":"Custom","agents.canImplement":"Implement during discussion","agents.canImplementHelp":"When it is this agent's turn, they can write code and commit to the discussion branch — not just talk. Useful for developer-style agents that should demonstrate ideas mid-discussion.","agents.canImplementBadge":"Implementer","git.ahead":"ahead","git.behind":"behind","git.staged":"Staged","git.unstaged":"Unstaged","git.noChanges":"Working tree clean","git.refresh":"Refresh","git.files":"files","git.commitHistory":"Commit History","git.branches":"Branches","git.remotes":"Remotes","git.tags":"Tags","git.stashes":"Stashes","git.noCommits":"No commits yet","git.loadMore":"Loading more...","git.author":"Author","git.hash":"Hash","git.graph":"Graph","git.description":"Description","git.date":"Date","git.commit":"Commit","git.pull":"Pull","git.push":"Push","git.fetch":"Fetch","git.branch":"Branch","git.merge":"Merge","git.stash":"Stash","git.discard":"Discard","git.tag":"Tag","git.untracked":"Untracked","git.fileStatus":"File Status","git.stageAll":"Stage All","git.unstageAll":"Unstage All","git.stage":"Stage","git.unstage":"Unstage","git.commitMessage":"Commit message...","git.branchName":"Branch name...","git.tagName":"Tag name...","git.tagMessage":"Tag message (optional)...","git.stashMessage":"Stash message (optional)...","git.selectBranch":"Select branch...","git.discardAll":"Discard All","git.confirmDiscard":"Discard all changes? This cannot be undone.","git.confirmDiscardFile":"Discard changes to this file?","git.newBranch":"New Branch","git.deleteBranch":"Delete Branch","git.stashPop":"Pop","git.noStashes":"No stashes","git.actions":"Actions","git.close":"Close","git.create":"Create","git.delete":"Delete","git.modified":"Modified","git.added":"Added","git.deleted":"Deleted","git.renamed":"Renamed","git.copied":"Copied","git.checkout":"Checkout","git.mergeInto":"Merge into current branch","git.rebaseOnto":"Rebase current onto","git.renameBranch":"Rename branch","git.confirmDelete":"Delete branch {name}?","git.newBranchName":"New branch name...","git.rename":"Rename","git.checkoutRemote":"Checkout as local branch","git.commitDetail":"Commit Detail","git.changedFiles":"Changed Files","git.selectFileToViewDiff":"Select a file to view diff","git.noFilesChanged":"No files changed","git.loadingFiles":"Loading files...","git.loadingDiff":"Loading diff...","git.worktrees":"Worktrees","git.cleanupWorktree":"Cleanup","git.confirmCleanupWorktree":"Remove worktree and branch {name}?","git.deleteWorktreeAndBranch":"Delete branch + worktree","git.confirmDeleteWorktreeAndBranch":"Delete branch {name} and its worktree?","git.confirmForceDelete":"Branch {name} is not fully merged. Force delete anyway? Unmerged commits will be lost.","git.workspace":"WORKSPACE","git.viewFileStatus":"File Status","git.viewHistory":"History","git.search":"Search","git.searchPlaceholder":"Search","git.stagedFiles":"Staged files","git.unstagedFiles":"Unstaged files","git.untrackedFiles":"Untracked files","git.unstageAllShort":"Unstage all","git.unstageSelectedShort":"Unstage selected","git.stageAllShort":"Stage all","git.stageSelectedShort":"Stage selected","git.commitOptions":"Commit options","git.pushImmediately":"Push to {remote} after commit","git.amendLastCommit":"Amend last commit","git.commitButton":"Commit","git.selectFileForDiff":"Select a file to view the diff","git.binaryFile":"Binary file (no diff preview)","git.untrackedNewFile":"(new file)","git.workingTreeClean":"Working tree is clean — nothing to commit","lang.toggle":"KO","theme.light":"Light","theme.dark":"Dark","notification.taskCompleted":"Task Completed","notification.taskFailed":"Task Failed","notification.discussionCompleted":"Discussion Completed","notification.discussionFailed":"Discussion Failed","notification.toggle":"Toggle notifications","notification.blocked":"Notifications blocked by browser"},ko:{"login.title":"CLITrigger","login.subtitle":"인증이 필요합니다","login.password":"비밀번호 입력","login.submit":"로그인","login.loading":"인증 중...","login.error":"접근이 거부되었습니다. 다시 시도해주세요.","login.footer":"보안 접속","login.disclaimer":'This software is provided "as is" without any warranties. Users are solely responsible for all actions taken using this tool, including any costs incurred from AI CLI usage, data loss, or unintended code changes. The developers assume no liability for any direct, indirect, or consequential damages arising from use.',"sidebar.home":"홈","sidebar.review":"리뷰 큐","sidebar.workspaces":"워크스페이스","review.title":"리뷰 큐","review.subtitle":"모든 프로젝트의 밤샘 결과를 한 화면에서 정리","review.refresh":"새로고침","review.empty":"이 기간에 리뷰할 항목이 없습니다.","review.viewDetails":"자세히","review.approve":"승인 · 머지","review.requestChanges":"수정 요청","review.discard":"폐기","review.cancel":"취소","review.send":"전송","review.continuePlaceholder":"무엇을 고치거나 바꿔야 하는지 설명…","review.discardConfirm":"이 todo를 폐기하고 워크트리를 정리할까요?","review.mergeFailed":"머지 실패","review.continueFailed":"이어가기 실패","review.discardFailed":"폐기 실패","review.closeDetails":"닫기","review.justNow":"방금","review.minAgo":"분 전","review.hourAgo":"시간 전","review.dayAgo":"일 전","review.files":"파일","review.lines":"줄","review.rounds":"라운드","review.window.12h":"12시간","review.window.24h":"24시간","review.window.7d":"7일","review.filter.all":"전체","review.filter.risky":"위험","review.filter.quickWins":"Quick wins","review.filter.failed":"실패","review.risk.low":"낮은 위험","review.risk.medium":"중간 위험","review.risk.high":"높은 위험","review.tokens.total":"총 토큰","review.tokens.todos":"Todo 수","review.tokens.byCli":"CLI별","projects.title":"전체 프로젝트","projects.subtitle":"프로젝트 콘솔","projects.new":"새 프로젝트","projects.logout":"로그아웃","projects.loading":"프로젝트 로딩 중...","projects.empty":"프로젝트가 없습니다","projects.emptyHint":"첫 번째 프로젝트를 만들어보세요.","projects.tasks":"작업","projects.active":"실행 중","projects.done":"완료","projects.search":"프로젝트 검색...","projects.delete":"프로젝트 삭제","projects.deleteConfirm":"이 프로젝트를 삭제하시겠습니까?","projects.pathMissing":"경로 없음","projects.pathMissingConfirm":"이 프로젝트의 로컬 폴더가 존재하지 않습니다. 삭제하시겠습니까?","projects.noGit":"Git 없음","detail.back":"프로젝트","detail.loading":"로딩 중...","detail.notFound":"프로젝트를 찾을 수 없습니다","detail.backToProjects":"프로젝트 목록으로","detail.live":"연결됨","header.branch":"브랜치","header.editName":"클릭하여 프로젝트 이름 변경","header.openFolder":"폴더 열기","header.workers":"워커","header.model":"모델","header.settings":"설정","header.runAll":"전체 실행","header.stopAll":"전체 중지","header.config":"프로젝트 설정","header.maxWorkers":"최대 워커 수","settings.defaultMaxTurns":"기본 턴 제한","settings.defaultMaxTurnsHint":"작업별 기본 턴 제한. 개별 작업에서 재설정 가능.","header.cliTool":"CLI 도구","header.aiModel":"AI 모델","header.cliFlags":"CLI 플래그","header.cancel":"취소","header.save":"저장","header.saving":"저장 중...","header.noGit":"Git 없음","header.noGitHint":'이 프로젝트는 Git 저장소가 아닙니다. 작업은 워크트리 격리 없이 직접 실행됩니다. 프로젝트 경로에서 "git init" 실행 후 재확인하세요.',"header.recheckGit":"Git 상태 재확인","header.fallbackChainTitle":"CLI 폴백 체인","header.fallbackChainHint":"CLI 도구의 컨텍스트가 소진되면 체인의 다음 도구로 자동 전환합니다.","header.sandboxTitle":"샌드박스 모드","header.sandboxBadgeStrict":"샌드박스: 엄격","header.sandboxBadgePermissive":"샌드박스: 허용","header.sandboxStrict":"엄격 (권장)","header.sandboxStrictDesc":"CLI 도구가 워크트리 디렉토리 내 파일만 접근할 수 있습니다.","header.sandboxPermissive":"허용","header.sandboxPermissiveDesc":"CLI 도구가 시스템의 모든 파일에 접근할 수 있습니다.","header.sandboxWarning":"경고: 허용 모드에서는 CLI 도구가 워크트리 밖 파일에도 접근할 수 있습니다. 주의해서 사용하세요.","header.worktreeTitle":"워크트리 격리","header.worktreeEnabled":"워크트리 (권장)","header.worktreeEnabledDesc":"각 작업이 독립 브랜치에서 실행됩니다. 병렬 작업에 안전합니다.","header.worktreeDisabled":"직접 실행 (메인 브랜치)","header.worktreeDisabledDesc":"메인 브랜치에서 직접 실행합니다. 최대 워커 1개로 제한됩니다.","header.worktreeWarning":"경고: 메인 브랜치를 직접 수정합니다. 동시 실행이 비활성화됩니다.","header.npmAutoInstallLabel":"워크트리 생성 시 `npm install` 자동 실행","header.npmAutoInstallHint":"npm 프로젝트에서 에이전트가 워크트리 안에서 test/build를 바로 돌릴 수 있게 합니다. pnpm/yarn/bun이나 npm이 아닌 프로젝트에서는 꺼두세요.","header.noWorktreeBadge":"워크트리 없음","header.debugBadge":"디버그 로그","header.showTokenUsageTitle":"토큰 사용량 표시","header.showTokenUsageDesc":"작업 완료 후 토큰 사용량(입력/출력)을 표시합니다.","header.showTokenUsageEnable":"토큰 사용량 표시","header.debugLoggingTitle":"디버그 로깅","header.debugLoggingDesc":"각 태스크 실행 시 CLI 입출력 전체를 .debug-logs/ 파일로 저장합니다.","header.debugLoggingEnable":"디버그 로그 파일 활성화","header.gstackTitle":"gstack 스킬","header.gstackEnabled":"gstack 스킬 주입 활성화","header.gstackCredit":"gstack 기반 (MIT 라이선스, Garry Tan)","header.usageLimit":"사용량","header.cliNotInstalled":"{tool}이(가) 설치되지 않았습니다","header.cliInstalled":"설치됨","header.cliNotFound":"미설치","header.cliInstallHint.claude":"npm install -g @anthropic-ai/claude-code","header.cliInstallHint.gemini":"npm install -g @anthropic-ai/gemini-cli","header.cliInstallHint.codex":"npm install -g @openai/codex","header.cliRefresh":"재확인","header.gstackClaudeOnly":"gstack 스킬은 Claude CLI에서만 사용 가능합니다.","header.modelSettings":"AI 모델 설정","header.modelValue":"모델 ID","header.modelLabel":"표시 이름","header.addModel":"추가","header.modelSettingsHint":"커스텀 모델을 추가하세요. 모든 프로젝트의 모델 드롭다운에 표시됩니다.","header.modelDeprecated":"사용 중단됨","header.modelDeprecatedWarning":"설치된 CLI가 더 이상 지원하지 않는 모델입니다. 실행 시 기본 모델로 자동 대체됩니다.","header.modelDeprecatedTitle":"사용 중단된 모델","header.modelDeprecatedReason":"설치된 CLI의 --help 출력에 더 이상 이 모델이 보이지 않고, 번들 모델 레지스트리에도 없어서 표시된 경고입니다. 실행 시 CLI 기본 모델로 조용히 대체됩니다.","header.modelDeprecatedFixHeading":"해결 방법","header.modelDeprecatedFix1":"프로젝트 설정 → 실행 설정에서 현재 지원되는 모델로 변경하세요.","header.modelDeprecatedFix2":"또는 CLI를 업그레이드해서 이 모델이 다시 지원 목록에 나타나게 하세요.","header.modelDeprecatedFix3":"여전히 유효한 모델이라고 확신한다면 AI 모델 설정에서 커스텀 모델로 추가하세요.","header.modelDeprecatedOpenSettings":"설정 열기","header.jiraTitle":"Jira 연동","header.jiraBaseUrl":"Jira URL","header.jiraBaseUrlPlaceholder":"https://yoursite.atlassian.net","header.jiraEmail":"이메일","header.jiraEmailPlaceholder":"your@email.com","header.jiraApiToken":"API 토큰","header.jiraApiTokenPlaceholder":"Atlassian API 토큰","header.jiraProjectKey":"프로젝트 키","header.jiraProjectKeyPlaceholder":"예: PROJ","header.jiraTestConnection":"연결 테스트","header.jiraTesting":"테스트 중...","header.jiraConnected":"연결 성공","header.jiraFailed":"연결 실패","header.jiraTokenHint":"id.atlassian.com > 보안 > API 토큰에서 생성","form.newProject":"새 프로젝트","form.projectName":"프로젝트 이름","form.folderPath":"폴더 경로","form.cancel":"취소","form.create":"생성","browse.title":"폴더 찾아보기","browse.select":"선택","browse.loading":"불러오는 중...","browse.error":"디렉토리를 불러올 수 없습니다","browse.empty":"폴더가 없습니다","todos.title":"작업 목록","todos.add":"작업 추가","todos.empty":"작업이 없습니다","todos.emptyHint":"작업을 추가해보세요.","todos.filterAll":"전체","todos.filterActive":"작업중","todos.filterCompleted":"완료","todos.filterCancelled":"취소","todos.filterEmpty":"해당 상태의 작업이 없습니다.","todos.stackModeOn":"스택 모드 켜짐 — 다시 누르면 해제","todos.stackModeOff":"스택 모드 켜기 (iOS 알림 스타일)","todos.collapseStack":"스택으로 접기","todos.expandStack":"클릭하면 펼쳐집니다","todos.merge":"병합","todo.description":"설명","todo.noDescription":"설명이 없습니다.","todo.attachedImages":"첨부 이미지","todo.branch":"브랜치","todo.path":"경로","todo.worktree":"워크트리","todo.result":"실행 결과","todo.mergeFailed":"병합 실패","todo.diffError":"Diff 오류","todo.diffOutput":"변경사항","todo.files":"파일","todo.systemLog":"활동 로그","todo.start":"시작","todo.startHeadless":"Headless","todo.startHeadlessDesc":"자율 실행. 모든 권한 자동 승인.","todo.startInteractive":"Interactive","todo.startInteractiveDesc":"stdin을 열어두고 실행 중 메시지 전송 가능.","todo.startVerbose":"Verbose","todo.startVerboseDesc":"자동 승인 + 모든 로그 실시간 출력.","todo.sendPlaceholder":"메시지 입력...","todo.startWithDependency":"선행 작업 먼저 시작","todo.stop":"중지","todo.viewDiff":"Diff 보기","todo.hideDiff":"Diff 접기","todo.viewDebugLog":"디버그 로그","todo.merge":"병합","todo.mergeChain":"체인 병합","todo.mergeChainDesc":"이 체인의 모든 작업을 메인 브랜치에 병합","todo.chainComplete":"체인 완료","todo.chainTasks":"{count}개 작업","todo.edit":"편집","todo.delete":"삭제","todo.cleanup":"워크트리 삭제","todo.cleanupFailed":"정리 실패","cleanup.confirmDeleteBranch":`워크트리를 삭제합니다. 브랜치 "{name}"도 함께 삭제할까요?
|
|
64
|
+
|
|
65
|
+
확인 = 워크트리 + 브랜치 삭제
|
|
66
|
+
취소 = 워크트리만 삭제`,"todo.retry":"재시도","todo.retryDesc":"이전 워크트리를 정리하고 처음부터 다시 실행합니다.","todo.retryFailed":"재시도 실패","todo.continue":"이어서","todo.continueDesc":"같은 워크트리에서 후속 프롬프트를 실행합니다.","todo.continuing":"이어가는 중...","todo.confirmContinue":"이어서 실행","todo.continuePromptLabel":"후속 프롬프트","todo.continuePromptPlaceholder":"이 워크트리에 적용할 다음 지시사항을 입력하세요...","todo.continuePromptRequired":"후속 프롬프트를 입력해주세요.","todo.roundLabel":"라운드","todo.dependsOn":"선행 작업","todo.mergedFrom":"이전 작업에서 병합","todo.transferredTo":"작업 이전됨","todo.schedule":"예약","todo.scheduleDesc":"특정 시간에 1회 실행되도록 스케줄로 변환합니다.","todo.scheduleAt":"실행 시각","todo.scheduling":"예약 중...","todo.confirmSchedule":"예약","todo.scheduleKeepOriginal":"원본 작업 유지","todo.scheduleOnReset":"리셋 시 실행","todo.scheduleOnResetDesc":"토큰 한도 리셋 시 자동으로 새 작업을 실행합니다.","todo.scheduleOnResetLabel":"리셋 시각","todo.resetPromptPlaceholder":"리셋 후 실행할 프롬프트를 입력하세요...","todo.confirmResetSchedule":"리셋 시 실행 예약","todoForm.titlePlaceholder":"작업 제목...","todoForm.descPlaceholder":"설명 (선택사항)...","todoForm.cliTool":"CLI 도구","todoForm.aiModel":"AI 모델","todoForm.addImage":"이미지 추가","todoForm.pasteHint":"Ctrl+V로 이미지 붙여넣기","todoForm.images":"이미지","todoForm.maxTurns":"최대 턴 수","todoForm.maxTurnsPlaceholder":"제한 없음","todoForm.maxTurnsHint":"에이전트 턴 수를 제한하여 과도한 토큰 사용을 방지합니다.","todoForm.dependsOn":"선행 작업","todoForm.noDependency":"없음 (독립 작업)","todoForm.dependsOnHint":"선행 작업이 완료되면 변경사항을 스쿼시 머지하고 새 브랜치에서 실행됩니다.","todoForm.worktreeMode":"실행 브랜치","todoForm.worktreeInherit":"프로젝트 설정 따름","todoForm.worktreeForceOn":"워크트리 사용 (격리 브랜치)","todoForm.worktreeForceOff":"메인 브랜치에서 실행","todoForm.worktreeProjectDefaultOn":"프로젝트 기본: 워크트리","todoForm.worktreeProjectDefaultOff":"프로젝트 기본: 메인 브랜치","todoForm.worktreeMainWarning":"메인 브랜치에서 실행 시 다른 작업의 동시 실행이 차단됩니다.","todoForm.cancel":"취소","todoForm.save":"저장","dnd.dropHint":"이 작업 이후에 실행","dnd.removeDep":"의존성 제거","dnd.dropToRemoveDep":"여기에 놓으면 의존성 제거","dnd.cyclicWarning":"순환 의존성으로 연결할 수 없습니다","graph.autoLayout":"자동 정렬","graph.listView":"리스트 보기","graph.graphView":"그래프 보기","status.pending":"대기","status.running":"실행 중","status.completed":"완료","status.failed":"실패","status.stopped":"중지","status.merged":"병합됨","progress.complete":"완료","progress.done":"완료","progress.live":"실행 중","progress.idle":"대기","progress.fail":"실패","progress.stop":"중지","progress.merged":"병합됨","failure.title":"실패 원인","failure.exitCode":"종료 코드","failure.fix":"수정하기: 실패 원인을 분석하고 문제를 수정하는 새 작업을 생성합니다.","failure.fixPrefix":"[수정] ","result.duration":"소요 시간","result.commits":"커밋","result.filesChanged":"파일 변경","result.commitHistory":"커밋 이력","result.changedFiles":"변경된 파일","result.tokenUsage":"토큰 사용량","result.inputTokens":"입력","result.outputTokens":"출력","result.totalCost":"비용","result.cacheTokens":"캐시","result.turns":"턴","result.contextUsed":"사용","result.levelLight":"가벼움","result.levelModerate":"보통","result.levelHigh":"많음","result.levelHeavy":"과다","log.awaiting":"출력 대기 중...","log.waitingResponse":"응답 대기 중...","log.noChanges":"변경사항이 없습니다.","log.copy":"복사","log.copied":"복사됨!","log.viewChat":"대화","log.viewRaw":"원시","schedules.title":"스케줄","schedules.add":"새 스케줄","schedules.empty":"스케줄이 없습니다","schedules.emptyHint":"반복 작업을 자동화할 스케줄을 만들어보세요.","schedule.type":"스케줄 유형","schedule.recurring":"반복","schedule.once":"1회","schedule.runAtLabel":"실행 시각","schedule.cronExpression":"실행 주기","schedule.cronHint":"예: */30 * * * * (30분마다), 0 9 * * * (매일 9시), 0 9 * * 1-5 (평일 9시)","cron.everyMinutes":"분 간격","cron.hourly":"매시간","cron.daily":"매일","cron.weekly":"매주","cron.monthly":"매월","cron.custom":"직접 입력","cron.every":"매","cron.minutesLabel":"분마다","cron.everyHourAt":"매시간","cron.minutesPast":"분에","cron.everyDayAt":"매일","cron.at":"시간","cron.everyMonthOn":"매월","cron.dayAt":"일","cron.expression":"Cron","cron.mon":"월","cron.tue":"화","cron.wed":"수","cron.thu":"목","cron.fri":"금","cron.sat":"토","cron.sun":"일","schedule.skipIfRunning":"이전 실행이 진행 중이면 건너뛰기","schedule.active":"활성","schedule.paused":"일시정지","schedule.lastRun":"마지막 실행","schedule.never":"없음","schedule.trigger":"즉시 실행","schedule.activate":"활성화","schedule.pause":"일시정지","schedule.edit":"편집","schedule.delete":"삭제","schedule.runs":"실행 이력","schedule.runTriggered":"실행됨","schedule.runSkipped":"건너뜀","schedule.runCompleted":"완료","schedule.runFailed":"실패","schedule.noRuns":"실행 이력이 없습니다","scheduleForm.titlePlaceholder":"스케줄 제목...","scheduleForm.descPlaceholder":"작업 설명 템플릿...","scheduleForm.cliTool":"CLI 도구","scheduleForm.aiModel":"AI 모델","scheduleForm.cancel":"취소","scheduleForm.save":"저장","jira.title":"Jira 이슈","jira.search":"이슈 검색...","jira.allStatuses":"모든 상태","jira.refresh":"새로고침","jira.import":"작업으로 가져오기","jira.importing":"가져오는 중...","jira.imported":"가져옴!","jira.noIssues":"이슈가 없습니다","jira.noIssuesHint":"필터나 검색어를 변경해보세요.","jira.loadMore":"더 보기","jira.total":"건","jira.transition":"상태 변경","jira.comment":"댓글","jira.commentPlaceholder":"댓글 입력...","jira.commentSend":"전송","jira.createIssue":"이슈 생성","jira.createSummary":"제목","jira.createDesc":"설명","jira.createType":"이슈 유형","jira.creating":"생성 중...","jira.notConfigured":"Jira가 설정되지 않았습니다. 프로젝트 설정에서 활성화하세요.","jira.assignee":"담당자","jira.unassigned":"미배정","jira.updated":"업데이트","notion.title":"Notion 페이지","notion.search":"페이지 검색...","notion.refresh":"새로고침","notion.import":"작업으로 가져오기","notion.importing":"가져오는 중...","notion.imported":"가져옴!","notion.noPages":"페이지가 없습니다","notion.noPagesHint":"검색어를 변경해보세요.","notion.loadMore":"더 보기","notion.createPage":"페이지 생성","notion.pageTitle":"제목","notion.creating":"생성 중...","notion.notConfigured":"Notion이 설정되지 않았습니다. 프로젝트 설정에서 활성화하세요.","notion.loadingContent":"콘텐츠 로딩 중...","notion.noContent":"콘텐츠 없음","header.notionTitle":"Notion 연동","header.notionApiKey":"통합 토큰","header.notionApiKeyPlaceholder":"ntn_...","header.notionDatabaseId":"데이터베이스 ID","header.notionDatabaseIdPlaceholder":"예: abc123def456...","header.notionTestConnection":"연결 테스트","header.notionTesting":"테스트 중...","header.notionConnected":"연결 성공","header.notionFailed":"연결 실패","header.notionTokenHint":"notion.so/my-integrations에서 통합을 생성하고 데이터베이스를 공유하세요","github.title":"GitHub 이슈","github.search":"이슈 검색...","github.refresh":"새로고침","github.import":"작업으로 가져오기","github.importing":"가져오는 중...","github.imported":"가져옴!","github.noIssues":"이슈가 없습니다","github.noIssuesHint":"필터나 검색어를 변경해보세요.","github.loadMore":"더 보기","github.createIssue":"이슈 생성","github.issueTitle":"제목","github.issueBody":"설명","github.creating":"생성 중...","github.notConfigured":"GitHub이 설정되지 않았습니다. 프로젝트 설정에서 활성화하세요.","github.loadingComments":"댓글 로딩 중...","github.comments":"댓글","github.noBody":"설명이 없습니다.","github.open":"열림","github.closed":"닫힘","github.all":"전체","header.githubTitle":"GitHub 연동","header.githubToken":"개인 액세스 토큰","header.githubTokenPlaceholder":"ghp_...","header.githubOwner":"저장소 소유자","header.githubOwnerPlaceholder":"사용자명 또는 조직","header.githubRepo":"저장소 이름","header.githubRepoPlaceholder":"repo-name","header.githubTestConnection":"연결 테스트","header.githubTesting":"테스트 중...","header.githubConnected":"연결 성공","header.githubFailed":"연결 실패","header.githubTokenHint":"github.com/settings/tokens에서 repo 권한으로 토큰을 생성하세요","tabs.tasks":"자동 작업","tabs.sessions":"세션","tabs.discussions":"토론","tabs.schedules":"스케줄","tabs.jira":"Jira","tabs.notion":"Notion","tabs.github":"GitHub","tabs.git":"Git","tabs.planner":"플래너","tabs.analytics":"통계","planner.title":"플래너","planner.add":"새 항목","planner.empty":"플래너 항목이 없습니다","planner.emptyHint":"아이디어, 작업, 계획을 플래너에 추가하세요.","planner.filterTag":"모든 태그","planner.filterStatus":"모든 상태","planner.col.title":"제목","planner.col.tags":"태그","planner.col.dueDate":"마감일","planner.col.status":"상태","planner.col.actions":"","planner.edit":"수정","planner.delete":"삭제","planner.deleteConfirm":"이 플래너 항목을 삭제하시겠습니까?","planner.convertToTask":"작업으로 변환","planner.convertToSchedule":"스케줄로 변환","planner.movedToTodo":"작업으로 이동됨","planner.movedToSchedule":"스케줄로 이동됨","planner.noDueDate":"—","planner.export":"내보내기","planner.exportTooltip":"플래너 항목을 Markdown 파일로 내보내기","planner.exportError":"내보내기 실패","planner.import":"가져오기","planner.importTooltip":"Markdown 파일에서 플래너 항목 가져오기","planner.importSuccess":"{items}개 항목과 {tags}개 태그를 가져왔습니다.","planner.importError":"가져오기 실패","planner.importInvalidMarkdown":"파일이 비어 있거나 유효한 Markdown이 아닙니다","planner.importNoImages":"참고: 이미지는 내보낸 파일에 포함되지 않습니다.","planner.dropHint":"여기에 Markdown 파일을 놓아 가져오기","planner.dropHintSub":".md 또는 .markdown","planner.dropInvalidFile":"Markdown 파일(.md / .markdown)만 가져올 수 있습니다","plannerForm.titlePlaceholder":"플래너 항목 제목...","plannerForm.descPlaceholder":"설명 또는 세부 사항...","plannerForm.tags":"태그","plannerForm.tagsPlaceholder":"태그를 입력하고 Enter를 누르세요","plannerForm.dueDate":"마감일","plannerForm.priority":"우선순위","plannerForm.priorityLow":"낮음","plannerForm.priorityNormal":"보통","plannerForm.priorityHigh":"높음","plannerForm.priorityCritical":"긴급","plannerForm.status":"상태","plannerForm.addImage":"이미지 추가","plannerForm.pasteHint":"Ctrl+V로 이미지 붙여넣기","plannerForm.images":"이미지","plannerForm.cancel":"취소","plannerForm.save":"저장","plannerStatus.pending":"대기","plannerStatus.in_progress":"진행 중","plannerStatus.done":"완료","plannerStatus.moved":"이동됨","plannerConvert.toTask":"작업으로 변환","plannerConvert.toSchedule":"스케줄로 변환","plannerConvert.cliTool":"CLI 도구","plannerConvert.model":"모델","plannerConvert.maxTurns":"최대 턴","plannerConvert.scheduleType":"스케줄 유형","plannerConvert.recurring":"반복","plannerConvert.once":"일회성","plannerConvert.cronExpression":"Cron 표현식","plannerConvert.runAt":"실행 시각","plannerConvert.cancel":"취소","plannerConvert.convert":"변환","plannerConvert.projectDefault":"프로젝트 기본값","plannerTag.selectOrCreate":"옵션 선택 또는 생성","plannerTag.delete":"삭제","plannerTag.deleteConfirm":"이 태그를 모든 항목에서 제거하시겠습니까?","plannerTag.color":"색","plannerTag.rename":"이름 변경","plannerTag.color.default":"기본","plannerTag.color.gray":"회색","plannerTag.color.brown":"갈색","plannerTag.color.orange":"주황색","plannerTag.color.yellow":"노란색","plannerTag.color.green":"초록색","plannerTag.color.blue":"파란색","plannerTag.color.purple":"보라색","plannerTag.color.pink":"분홍색","plannerTag.color.red":"빨간색","session.new":"새 세션","session.title":"세션 제목","session.description":"초기 프롬프트 (선택)","session.start":"시작","session.stop":"중지","session.delete":"삭제","session.empty":"세션이 없습니다","session.emptyHint":"대화형 AI 세션을 시작하세요.","session.create":"세션 생성","session.cliTool":"CLI 도구","session.model":"모델","session.worktree":"워크트리 사용 (격리된 브랜치)","session.cleanup":"워크트리 삭제","analytics.title":"실행 통계","analytics.loading":"통계 로딩 중...","analytics.noData":"데이터 없음","analytics.totalTasks":"총 작업","analytics.successRate":"성공률","analytics.totalCost":"총 비용","analytics.totalTokens":"총 토큰","analytics.avgPerTask":"작업당 평균","analytics.byStatus":"상태별","analytics.byCliTool":"CLI 도구별","analytics.dailyActivity":"일별 활동","analytics.dailyCost":"일별 비용","analytics.costBreakdown":"비용 요약","analytics.tasks":"작업","analytics.period.7d":"7일","analytics.period.30d":"30일","analytics.period.90d":"90일","analytics.period.all":"전체","discussions.title":"에이전트 토론","discussions.add":"새 토론","discussions.empty":"아직 토론이 없습니다","discussions.emptyHint":"에이전트들이 피쳐를 함께 토론하도록 새 토론을 만드세요.","discussions.round":"라운드","discussions.maxRounds":"최대 라운드","discussions.agents":"에이전트","discussions.speaking":"발언 중...","discussions.inject":"메시지 전송","discussions.skipTurn":"턴 건너뛰기","discussions.implement":"구현 시작","discussions.implementHint":"토론된 기능을 구현할 에이전트를 선택하세요.","discussions.selectAgent":"구현 에이전트 선택","discussions.notFound":"토론을 찾을 수 없습니다","discussions.back":"토론 목록으로","discussions.userMessage":"메시지를 입력하세요...","discussions.implementation":"구현","discussions.resume":"재개","discussions.retry":"다시 실행","discussions.failureTitle":"토론 실패","discussions.noErrorLogs":"에러 상세 정보가 없습니다","discussions.pause":"일시 중지","discussions.waiting":"대기 중...","discussions.roundExplain":"에이전트 전원이 한 번씩 발언하는 단위입니다.","discussions.autoImplement":"토론 후 자동 구현","discussions.autoImplementHint":"모든 라운드 완료 후 자동으로 구현을 시작합니다.","discussions.collapse":"접기","discussions.expand":"펼치기","discussions.collapseAll":"전체 접기","discussions.expandAll":"전체 펼치기","status.skipped":"건너뜀","status.paused":"일시 중지","agents.title":"에이전트 페르소나","agents.add":"에이전트 추가","agents.name":"이름","agents.role":"역할","agents.systemPrompt":"시스템 프롬프트","agents.cliTool":"CLI 도구","agents.cliModel":"모델","agents.color":"색상","agents.empty":"에이전트가 없습니다. 토론을 시작하려면 에이전트 페르소나를 만드세요.","agents.manage":"에이전트 관리","agents.presets":"프리셋 템플릿","agents.roles.architect":"아키텍트","agents.roles.developer":"개발자","agents.roles.reviewer":"리뷰어","agents.roles.pm":"PM","agents.roles.tester":"테스터","agents.roles.custom":"사용자 정의","agents.canImplement":"토론 중 구현 수행","agents.canImplementHelp":"이 에이전트의 턴에서 발언뿐 아니라 실제 코드 작성·커밋까지 수행합니다. 개발자 역할 에이전트가 아이디어를 즉석에서 시연하도록 할 때 유용합니다.","agents.canImplementBadge":"구현자","git.ahead":"앞섬","git.behind":"뒤처짐","git.staged":"스테이징","git.unstaged":"변경됨","git.noChanges":"작업 트리 깨끗","git.refresh":"새로고침","git.files":"파일","git.commitHistory":"커밋 히스토리","git.branches":"브랜치","git.remotes":"원격","git.tags":"태그","git.stashes":"스태시","git.noCommits":"아직 커밋이 없습니다","git.loadMore":"더 불러오는 중...","git.author":"작성자","git.hash":"해시","git.graph":"그래프","git.description":"설명","git.date":"날짜","git.commit":"커밋","git.pull":"Pull","git.push":"Push","git.fetch":"패치","git.branch":"브랜치","git.merge":"병합","git.stash":"스태시","git.discard":"폐기","git.tag":"태그","git.untracked":"추적 안 됨","git.fileStatus":"파일 상태","git.stageAll":"모두 스테이지","git.unstageAll":"모두 언스테이지","git.stage":"스테이지","git.unstage":"언스테이지","git.commitMessage":"커밋 메시지...","git.branchName":"브랜치 이름...","git.tagName":"태그 이름...","git.tagMessage":"태그 메시지 (선택)...","git.stashMessage":"스태시 메시지 (선택)...","git.selectBranch":"브랜치 선택...","git.discardAll":"모두 폐기","git.confirmDiscard":"모든 변경 사항을 폐기하시겠습니까? 되돌릴 수 없습니다.","git.confirmDiscardFile":"이 파일의 변경 사항을 폐기하시겠습니까?","git.newBranch":"새 브랜치","git.deleteBranch":"브랜치 삭제","git.stashPop":"꺼내기","git.noStashes":"스태시 없음","git.actions":"작업","git.close":"닫기","git.create":"생성","git.delete":"삭제","git.modified":"수정됨","git.added":"추가됨","git.deleted":"삭제됨","git.renamed":"이름변경","git.copied":"복사됨","git.checkout":"체크아웃","git.mergeInto":"현재 브랜치로 병합","git.rebaseOnto":"현재 변경사항을 재배치","git.renameBranch":"브랜치 이름 변경","git.confirmDelete":"브랜치 {name}을(를) 삭제하시겠습니까?","git.newBranchName":"새 브랜치 이름...","git.rename":"이름 변경","git.checkoutRemote":"로컬 브랜치로 체크아웃","git.commitDetail":"커밋 상세","git.changedFiles":"변경된 파일","git.selectFileToViewDiff":"파일을 선택하면 차이를 볼 수 있습니다","git.noFilesChanged":"변경된 파일 없음","git.loadingFiles":"파일 불러오는 중...","git.loadingDiff":"차이 불러오는 중...","git.worktrees":"워크트리","git.cleanupWorktree":"정리","git.confirmCleanupWorktree":"워크트리와 브랜치 {name}을(를) 삭제하시겠습니까?","git.deleteWorktreeAndBranch":"브랜치 + 워크트리 삭제","git.confirmDeleteWorktreeAndBranch":"브랜치 {name}과(와) 연결된 워크트리를 함께 삭제할까요?","git.confirmForceDelete":"브랜치 {name}은(는) 어디에도 머지되지 않았습니다. 그래도 강제로 삭제할까요? 머지되지 않은 커밋은 사라집니다.","git.workspace":"워크스페이스","git.viewFileStatus":"파일 상태","git.viewHistory":"History","git.search":"Search","git.searchPlaceholder":"검색","git.stagedFiles":"스테이지에 올라간 파일","git.unstagedFiles":"스테이지에 올라가지 않은 파일","git.untrackedFiles":"추적 안 되는 파일","git.unstageAllShort":"모두 스테이지에서 내리기","git.unstageSelectedShort":"선택 내용 스테이지에서 내리기","git.stageAllShort":"모두 스테이지에 올리기","git.stageSelectedShort":"선택 내용 스테이지에 올리기","git.commitOptions":"커밋 옵션","git.pushImmediately":"커밋 후 {remote}에 즉시 푸시","git.amendLastCommit":"마지막 커밋 정정","git.commitButton":"커밋","git.selectFileForDiff":"파일을 선택하면 차이를 볼 수 있습니다","git.binaryFile":"바이너리 파일 (미리보기 불가)","git.untrackedNewFile":"(새 파일)","git.workingTreeClean":"작업 트리가 깨끗합니다 — 커밋할 변경사항이 없습니다","lang.toggle":"EN","theme.light":"라이트","theme.dark":"다크","notification.taskCompleted":"작업 완료","notification.taskFailed":"작업 실패","notification.discussionCompleted":"토론 완료","notification.discussionFailed":"토론 실패","notification.toggle":"알림 토글","notification.blocked":"브라우저에서 알림이 차단되었습니다"}},QF=x.createContext(null);function VJ({children:e}){const[t,n]=x.useState(()=>{const s=localStorage.getItem("clitrigger-lang");return s==="ko"||s==="en"?s:"ko"}),r=x.useCallback(()=>{n(s=>{const l=s==="en"?"ko":"en";return localStorage.setItem("clitrigger-lang",l),l})},[]),a=x.useMemo(()=>UJ(),[]),i=x.useCallback(s=>GJ[t][s]??a[t][s]??s,[t,a]);return f.jsx(QF.Provider,{value:{lang:t,toggleLang:r,t:i},children:e})}function Ze(){const e=x.useContext(QF);if(!e)throw new Error("useI18n must be used within I18nProvider");return e}const Ue=({className:e="",variant:t="text",width:n,height:r,count:a=1})=>{const i="animate-pulse bg-warm-200",s={text:"rounded h-3 mb-2 last:mb-0",circular:"rounded-full",rectangular:"rounded-none",rounded:"rounded-xl"},l={width:n,height:r},c=Array.from({length:a});return f.jsx(f.Fragment,{children:c.map((d,h)=>f.jsx("div",{className:`${i} ${s[t]} ${e}`,style:l},h))})};/**
|
|
67
|
+
* @license lucide-react v1.8.0 - ISC
|
|
68
|
+
*
|
|
69
|
+
* This source code is licensed under the ISC license.
|
|
70
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
+
*/const JF=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
|
72
|
+
* @license lucide-react v1.8.0 - ISC
|
|
73
|
+
*
|
|
74
|
+
* This source code is licensed under the ISC license.
|
|
75
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
+
*/const KJ=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
77
|
+
* @license lucide-react v1.8.0 - ISC
|
|
78
|
+
*
|
|
79
|
+
* This source code is licensed under the ISC license.
|
|
80
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
+
*/const WJ=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());/**
|
|
82
|
+
* @license lucide-react v1.8.0 - ISC
|
|
83
|
+
*
|
|
84
|
+
* This source code is licensed under the ISC license.
|
|
85
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
+
*/const ZP=e=>{const t=WJ(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
|
|
87
|
+
* @license lucide-react v1.8.0 - ISC
|
|
88
|
+
*
|
|
89
|
+
* This source code is licensed under the ISC license.
|
|
90
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
+
*/var O0={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
92
|
+
* @license lucide-react v1.8.0 - ISC
|
|
93
|
+
*
|
|
94
|
+
* This source code is licensed under the ISC license.
|
|
95
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
+
*/const YJ=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},XJ=x.createContext({}),ZJ=()=>x.useContext(XJ),QJ=x.forwardRef(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:a="",children:i,iconNode:s,...l},c)=>{const{size:d=24,strokeWidth:h=2,absoluteStrokeWidth:m=!1,color:g="currentColor",className:v=""}=ZJ()??{},b=r??m?Number(n??h)*24/Number(t??d):n??h;return x.createElement("svg",{ref:c,...O0,width:t??d??O0.width,height:t??d??O0.height,stroke:e??g,strokeWidth:b,className:JF("lucide",v,a),...!i&&!YJ(l)&&{"aria-hidden":"true"},...l},[...s.map(([w,S])=>x.createElement(w,S)),...Array.isArray(i)?i:[i]])});/**
|
|
97
|
+
* @license lucide-react v1.8.0 - ISC
|
|
98
|
+
*
|
|
99
|
+
* This source code is licensed under the ISC license.
|
|
100
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
+
*/const qe=(e,t)=>{const n=x.forwardRef(({className:r,...a},i)=>x.createElement(QJ,{ref:i,iconNode:t,className:JF(`lucide-${KJ(ZP(e))}`,`lucide-${e}`,r),...a}));return n.displayName=ZP(e),n};/**
|
|
102
|
+
* @license lucide-react v1.8.0 - ISC
|
|
103
|
+
*
|
|
104
|
+
* This source code is licensed under the ISC license.
|
|
105
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
+
*/const JJ=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],V2=qe("archive",JJ);/**
|
|
107
|
+
* @license lucide-react v1.8.0 - ISC
|
|
108
|
+
*
|
|
109
|
+
* This source code is licensed under the ISC license.
|
|
110
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
+
*/const eee=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],tee=qe("arrow-down",eee);/**
|
|
112
|
+
* @license lucide-react v1.8.0 - ISC
|
|
113
|
+
*
|
|
114
|
+
* This source code is licensed under the ISC license.
|
|
115
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
+
*/const nee=[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]],ree=qe("arrow-left-right",nee);/**
|
|
117
|
+
* @license lucide-react v1.8.0 - ISC
|
|
118
|
+
*
|
|
119
|
+
* This source code is licensed under the ISC license.
|
|
120
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
+
*/const aee=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],iee=qe("arrow-right",aee);/**
|
|
122
|
+
* @license lucide-react v1.8.0 - ISC
|
|
123
|
+
*
|
|
124
|
+
* This source code is licensed under the ISC license.
|
|
125
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
+
*/const see=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],oee=qe("arrow-up",see);/**
|
|
127
|
+
* @license lucide-react v1.8.0 - ISC
|
|
128
|
+
*
|
|
129
|
+
* This source code is licensed under the ISC license.
|
|
130
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
+
*/const lee=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]],uee=qe("ban",lee);/**
|
|
132
|
+
* @license lucide-react v1.8.0 - ISC
|
|
133
|
+
*
|
|
134
|
+
* This source code is licensed under the ISC license.
|
|
135
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
+
*/const cee=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742",key:"178tsu"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05",key:"1hqiys"}]],dee=qe("bell-off",cee);/**
|
|
137
|
+
* @license lucide-react v1.8.0 - ISC
|
|
138
|
+
*
|
|
139
|
+
* This source code is licensed under the ISC license.
|
|
140
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
+
*/const fee=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],hee=qe("bell",fee);/**
|
|
142
|
+
* @license lucide-react v1.8.0 - ISC
|
|
143
|
+
*
|
|
144
|
+
* This source code is licensed under the ISC license.
|
|
145
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
+
*/const mee=[["path",{d:"M16 14v2.2l1.6 1",key:"fo4ql5"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]],pee=qe("calendar-clock",mee);/**
|
|
147
|
+
* @license lucide-react v1.8.0 - ISC
|
|
148
|
+
*
|
|
149
|
+
* This source code is licensed under the ISC license.
|
|
150
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
+
*/const gee=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],vee=qe("calendar",gee);/**
|
|
152
|
+
* @license lucide-react v1.8.0 - ISC
|
|
153
|
+
*
|
|
154
|
+
* This source code is licensed under the ISC license.
|
|
155
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
+
*/const yee=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],xee=qe("chart-column",yee);/**
|
|
157
|
+
* @license lucide-react v1.8.0 - ISC
|
|
158
|
+
*
|
|
159
|
+
* This source code is licensed under the ISC license.
|
|
160
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
+
*/const bee=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],wee=qe("check",bee);/**
|
|
162
|
+
* @license lucide-react v1.8.0 - ISC
|
|
163
|
+
*
|
|
164
|
+
* This source code is licensed under the ISC license.
|
|
165
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
+
*/const See=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],jee=qe("chevron-left",See);/**
|
|
167
|
+
* @license lucide-react v1.8.0 - ISC
|
|
168
|
+
*
|
|
169
|
+
* This source code is licensed under the ISC license.
|
|
170
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
+
*/const kee=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],zu=qe("chevron-right",kee);/**
|
|
172
|
+
* @license lucide-react v1.8.0 - ISC
|
|
173
|
+
*
|
|
174
|
+
* This source code is licensed under the ISC license.
|
|
175
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
+
*/const _ee=[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]],Cee=qe("chevrons-right",_ee);/**
|
|
177
|
+
* @license lucide-react v1.8.0 - ISC
|
|
178
|
+
*
|
|
179
|
+
* This source code is licensed under the ISC license.
|
|
180
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
+
*/const Nee=[["path",{d:"m17 11-5-5-5 5",key:"e8nh98"}],["path",{d:"m17 18-5-5-5 5",key:"2avn1x"}]],Eee=qe("chevrons-up",Nee);/**
|
|
182
|
+
* @license lucide-react v1.8.0 - ISC
|
|
183
|
+
*
|
|
184
|
+
* This source code is licensed under the ISC license.
|
|
185
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
+
*/const Aee=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Tee=qe("circle-check-big",Aee);/**
|
|
187
|
+
* @license lucide-react v1.8.0 - ISC
|
|
188
|
+
*
|
|
189
|
+
* This source code is licensed under the ISC license.
|
|
190
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
+
*/const Oee=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],e8=qe("circle-check",Oee);/**
|
|
192
|
+
* @license lucide-react v1.8.0 - ISC
|
|
193
|
+
*
|
|
194
|
+
* This source code is licensed under the ISC license.
|
|
195
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
+
*/const Mee=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],Pee=qe("circle-dot",Mee);/**
|
|
197
|
+
* @license lucide-react v1.8.0 - ISC
|
|
198
|
+
*
|
|
199
|
+
* This source code is licensed under the ISC license.
|
|
200
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
+
*/const Dee=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}]],Ree=qe("circle-minus",Dee);/**
|
|
202
|
+
* @license lucide-react v1.8.0 - ISC
|
|
203
|
+
*
|
|
204
|
+
* This source code is licensed under the ISC license.
|
|
205
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
+
*/const Iee=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]],Lee=qe("circle-pause",Iee);/**
|
|
207
|
+
* @license lucide-react v1.8.0 - ISC
|
|
208
|
+
*
|
|
209
|
+
* This source code is licensed under the ISC license.
|
|
210
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
+
*/const zee=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],t8=qe("circle-x",zee);/**
|
|
212
|
+
* @license lucide-react v1.8.0 - ISC
|
|
213
|
+
*
|
|
214
|
+
* This source code is licensed under the ISC license.
|
|
215
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
+
*/const $ee=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]],qee=qe("clipboard-list",$ee);/**
|
|
217
|
+
* @license lucide-react v1.8.0 - ISC
|
|
218
|
+
*
|
|
219
|
+
* This source code is licensed under the ISC license.
|
|
220
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
+
*/const Bee=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],Jd=qe("clock",Bee);/**
|
|
222
|
+
* @license lucide-react v1.8.0 - ISC
|
|
223
|
+
*
|
|
224
|
+
* This source code is licensed under the ISC license.
|
|
225
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
+
*/const Fee=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],Hee=qe("code",Fee);/**
|
|
227
|
+
* @license lucide-react v1.8.0 - ISC
|
|
228
|
+
*
|
|
229
|
+
* This source code is licensed under the ISC license.
|
|
230
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
231
|
+
*/const Uee=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Gee=qe("download",Uee);/**
|
|
232
|
+
* @license lucide-react v1.8.0 - ISC
|
|
233
|
+
*
|
|
234
|
+
* This source code is licensed under the ISC license.
|
|
235
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
236
|
+
*/const Vee=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],n8=qe("ellipsis-vertical",Vee);/**
|
|
237
|
+
* @license lucide-react v1.8.0 - ISC
|
|
238
|
+
*
|
|
239
|
+
* This source code is licensed under the ISC license.
|
|
240
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
241
|
+
*/const Kee=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Wee=qe("eye",Kee);/**
|
|
242
|
+
* @license lucide-react v1.8.0 - ISC
|
|
243
|
+
*
|
|
244
|
+
* This source code is licensed under the ISC license.
|
|
245
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
246
|
+
*/const Yee=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Ep=qe("file-text",Yee);/**
|
|
247
|
+
* @license lucide-react v1.8.0 - ISC
|
|
248
|
+
*
|
|
249
|
+
* This source code is licensed under the ISC license.
|
|
250
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
251
|
+
*/const Xee=[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],Zee=qe("folder-git-2",Xee);/**
|
|
252
|
+
* @license lucide-react v1.8.0 - ISC
|
|
253
|
+
*
|
|
254
|
+
* This source code is licensed under the ISC license.
|
|
255
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
256
|
+
*/const Qee=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],K2=qe("folder-open",Qee);/**
|
|
257
|
+
* @license lucide-react v1.8.0 - ISC
|
|
258
|
+
*
|
|
259
|
+
* This source code is licensed under the ISC license.
|
|
260
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
261
|
+
*/const Jee=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],ete=qe("git-commit-horizontal",Jee);/**
|
|
262
|
+
* @license lucide-react v1.8.0 - ISC
|
|
263
|
+
*
|
|
264
|
+
* This source code is licensed under the ISC license.
|
|
265
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
266
|
+
*/const tte=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],Bg=qe("git-branch",tte);/**
|
|
267
|
+
* @license lucide-react v1.8.0 - ISC
|
|
268
|
+
*
|
|
269
|
+
* This source code is licensed under the ISC license.
|
|
270
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
271
|
+
*/const nte=[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]],rte=qe("git-fork",nte);/**
|
|
272
|
+
* @license lucide-react v1.8.0 - ISC
|
|
273
|
+
*
|
|
274
|
+
* This source code is licensed under the ISC license.
|
|
275
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
276
|
+
*/const ate=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],Pf=qe("git-merge",ate);/**
|
|
277
|
+
* @license lucide-react v1.8.0 - ISC
|
|
278
|
+
*
|
|
279
|
+
* This source code is licensed under the ISC license.
|
|
280
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
281
|
+
*/const ite=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],ste=qe("grip-vertical",ite);/**
|
|
282
|
+
* @license lucide-react v1.8.0 - ISC
|
|
283
|
+
*
|
|
284
|
+
* This source code is licensed under the ISC license.
|
|
285
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
286
|
+
*/const ote=[["path",{d:"m15 12-9.373 9.373a1 1 0 0 1-3.001-3L12 9",key:"1hayfq"}],["path",{d:"m18 15 4-4",key:"16gjal"}],["path",{d:"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172v-.344a2 2 0 0 0-.586-1.414l-1.657-1.657A6 6 0 0 0 12.516 3H9l1.243 1.243A6 6 0 0 1 12 8.485V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5",key:"15ts47"}]],QP=qe("hammer",ote);/**
|
|
287
|
+
* @license lucide-react v1.8.0 - ISC
|
|
288
|
+
*
|
|
289
|
+
* This source code is licensed under the ISC license.
|
|
290
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
291
|
+
*/const lte=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],ef=qe("image",lte);/**
|
|
292
|
+
* @license lucide-react v1.8.0 - ISC
|
|
293
|
+
*
|
|
294
|
+
* This source code is licensed under the ISC license.
|
|
295
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
296
|
+
*/const ute=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],cC=qe("inbox",ute);/**
|
|
297
|
+
* @license lucide-react v1.8.0 - ISC
|
|
298
|
+
*
|
|
299
|
+
* This source code is licensed under the ISC license.
|
|
300
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
301
|
+
*/const cte=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],dte=qe("layers",cte);/**
|
|
302
|
+
* @license lucide-react v1.8.0 - ISC
|
|
303
|
+
*
|
|
304
|
+
* This source code is licensed under the ISC license.
|
|
305
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
306
|
+
*/const fte=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],hte=qe("layout-dashboard",fte);/**
|
|
307
|
+
* @license lucide-react v1.8.0 - ISC
|
|
308
|
+
*
|
|
309
|
+
* This source code is licensed under the ISC license.
|
|
310
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
311
|
+
*/const mte=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],dC=qe("layout-grid",mte);/**
|
|
312
|
+
* @license lucide-react v1.8.0 - ISC
|
|
313
|
+
*
|
|
314
|
+
* This source code is licensed under the ISC license.
|
|
315
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
316
|
+
*/const pte=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}],["path",{d:"M14 4h7",key:"3xa0d5"}],["path",{d:"M14 9h7",key:"1icrd9"}],["path",{d:"M14 15h7",key:"1mj8o2"}],["path",{d:"M14 20h7",key:"11slyb"}]],gte=qe("layout-list",pte);/**
|
|
317
|
+
* @license lucide-react v1.8.0 - ISC
|
|
318
|
+
*
|
|
319
|
+
* This source code is licensed under the ISC license.
|
|
320
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
321
|
+
*/const vte=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],tf=qe("link",vte);/**
|
|
322
|
+
* @license lucide-react v1.8.0 - ISC
|
|
323
|
+
*
|
|
324
|
+
* This source code is licensed under the ISC license.
|
|
325
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
326
|
+
*/const yte=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],JP=qe("list",yte);/**
|
|
327
|
+
* @license lucide-react v1.8.0 - ISC
|
|
328
|
+
*
|
|
329
|
+
* This source code is licensed under the ISC license.
|
|
330
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
331
|
+
*/const xte=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ap=qe("loader-circle",xte);/**
|
|
332
|
+
* @license lucide-react v1.8.0 - ISC
|
|
333
|
+
*
|
|
334
|
+
* This source code is licensed under the ISC license.
|
|
335
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
336
|
+
*/const bte=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],wte=qe("log-out",bte);/**
|
|
337
|
+
* @license lucide-react v1.8.0 - ISC
|
|
338
|
+
*
|
|
339
|
+
* This source code is licensed under the ISC license.
|
|
340
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
341
|
+
*/const Ste=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],jte=qe("menu",Ste);/**
|
|
342
|
+
* @license lucide-react v1.8.0 - ISC
|
|
343
|
+
*
|
|
344
|
+
* This source code is licensed under the ISC license.
|
|
345
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
346
|
+
*/const kte=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],_te=qe("message-square",kte);/**
|
|
347
|
+
* @license lucide-react v1.8.0 - ISC
|
|
348
|
+
*
|
|
349
|
+
* This source code is licensed under the ISC license.
|
|
350
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
351
|
+
*/const Cte=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],Nte=qe("moon",Cte);/**
|
|
352
|
+
* @license lucide-react v1.8.0 - ISC
|
|
353
|
+
*
|
|
354
|
+
* This source code is licensed under the ISC license.
|
|
355
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
356
|
+
*/const Ete=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],W2=qe("pause",Ete);/**
|
|
357
|
+
* @license lucide-react v1.8.0 - ISC
|
|
358
|
+
*
|
|
359
|
+
* This source code is licensed under the ISC license.
|
|
360
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
361
|
+
*/const Ate=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Df=qe("pencil",Ate);/**
|
|
362
|
+
* @license lucide-react v1.8.0 - ISC
|
|
363
|
+
*
|
|
364
|
+
* This source code is licensed under the ISC license.
|
|
365
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
366
|
+
*/const Tte=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],yl=qe("play",Tte);/**
|
|
367
|
+
* @license lucide-react v1.8.0 - ISC
|
|
368
|
+
*
|
|
369
|
+
* This source code is licensed under the ISC license.
|
|
370
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
371
|
+
*/const Ote=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],sc=qe("plus",Ote);/**
|
|
372
|
+
* @license lucide-react v1.8.0 - ISC
|
|
373
|
+
*
|
|
374
|
+
* This source code is licensed under the ISC license.
|
|
375
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
376
|
+
*/const Mte=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Pte=qe("refresh-cw",Mte);/**
|
|
377
|
+
* @license lucide-react v1.8.0 - ISC
|
|
378
|
+
*
|
|
379
|
+
* This source code is licensed under the ISC license.
|
|
380
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
381
|
+
*/const Dte=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],Fg=qe("rotate-ccw",Dte);/**
|
|
382
|
+
* @license lucide-react v1.8.0 - ISC
|
|
383
|
+
*
|
|
384
|
+
* This source code is licensed under the ISC license.
|
|
385
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
386
|
+
*/const Rte=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Hg=qe("search",Rte);/**
|
|
387
|
+
* @license lucide-react v1.8.0 - ISC
|
|
388
|
+
*
|
|
389
|
+
* This source code is licensed under the ISC license.
|
|
390
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
391
|
+
*/const Ite=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Lte=qe("settings",Ite);/**
|
|
392
|
+
* @license lucide-react v1.8.0 - ISC
|
|
393
|
+
*
|
|
394
|
+
* This source code is licensed under the ISC license.
|
|
395
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
396
|
+
*/const zte=[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]],$te=qe("sliders-horizontal",zte);/**
|
|
397
|
+
* @license lucide-react v1.8.0 - ISC
|
|
398
|
+
*
|
|
399
|
+
* This source code is licensed under the ISC license.
|
|
400
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
401
|
+
*/const qte=[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],r8=qe("square-terminal",qte);/**
|
|
402
|
+
* @license lucide-react v1.8.0 - ISC
|
|
403
|
+
*
|
|
404
|
+
* This source code is licensed under the ISC license.
|
|
405
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
406
|
+
*/const Bte=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Ug=qe("square",Bte);/**
|
|
407
|
+
* @license lucide-react v1.8.0 - ISC
|
|
408
|
+
*
|
|
409
|
+
* This source code is licensed under the ISC license.
|
|
410
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
411
|
+
*/const Fte=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],Hte=qe("sun",Fte);/**
|
|
412
|
+
* @license lucide-react v1.8.0 - ISC
|
|
413
|
+
*
|
|
414
|
+
* This source code is licensed under the ISC license.
|
|
415
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
416
|
+
*/const Ute=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Gte=qe("terminal",Ute);/**
|
|
417
|
+
* @license lucide-react v1.8.0 - ISC
|
|
418
|
+
*
|
|
419
|
+
* This source code is licensed under the ISC license.
|
|
420
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
421
|
+
*/const Vte=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],es=qe("trash-2",Vte);/**
|
|
422
|
+
* @license lucide-react v1.8.0 - ISC
|
|
423
|
+
*
|
|
424
|
+
* This source code is licensed under the ISC license.
|
|
425
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
426
|
+
*/const Kte=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],nf=qe("triangle-alert",Kte);/**
|
|
427
|
+
* @license lucide-react v1.8.0 - ISC
|
|
428
|
+
*
|
|
429
|
+
* This source code is licensed under the ISC license.
|
|
430
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
431
|
+
*/const Wte=[["path",{d:"m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71",key:"yqzxt4"}],["path",{d:"m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71",key:"4qinb0"}],["line",{x1:"8",x2:"8",y1:"2",y2:"5",key:"1041cp"}],["line",{x1:"2",x2:"5",y1:"8",y2:"8",key:"14m1p5"}],["line",{x1:"16",x2:"16",y1:"19",y2:"22",key:"rzdirn"}],["line",{x1:"19",x2:"22",y1:"16",y2:"16",key:"ox905f"}]],Yte=qe("unlink",Wte);/**
|
|
432
|
+
* @license lucide-react v1.8.0 - ISC
|
|
433
|
+
*
|
|
434
|
+
* This source code is licensed under the ISC license.
|
|
435
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
436
|
+
*/const Xte=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],eD=qe("upload",Xte);/**
|
|
437
|
+
* @license lucide-react v1.8.0 - ISC
|
|
438
|
+
*
|
|
439
|
+
* This source code is licensed under the ISC license.
|
|
440
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
441
|
+
*/const Zte=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Qte=qe("users",Zte);/**
|
|
442
|
+
* @license lucide-react v1.8.0 - ISC
|
|
443
|
+
*
|
|
444
|
+
* This source code is licensed under the ISC license.
|
|
445
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
446
|
+
*/const Jte=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Wr=qe("x",Jte);function ene({onLogin:e}){const[t,n]=x.useState(""),[r,a]=x.useState(""),[i,s]=x.useState(!1),{t:l,toggleLang:c}=Ze(),d=async h=>{if(h.preventDefault(),!!t){a(""),s(!0);try{await e(t)}catch{a(l("login.error"))}finally{s(!1)}}};return f.jsxs("div",{className:"min-h-screen bg-theme-bg flex items-center justify-center px-4 relative",children:[f.jsx("button",{onClick:c,className:"lang-toggle absolute top-6 right-6",children:l("lang.toggle")}),f.jsxs("div",{className:"w-full max-w-sm animate-fade-in",children:[f.jsxs("div",{className:"text-center mb-10",children:[f.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-2xl bg-accent/10 mb-5",children:f.jsx(r8,{size:32,className:"text-accent",strokeWidth:1.5})}),f.jsx("h1",{className:"text-2xl font-semibold text-theme-text",children:l("login.title")}),f.jsx("p",{className:"text-theme-muted text-sm mt-2",children:l("login.subtitle")})]}),f.jsx("form",{onSubmit:d,children:f.jsxs("div",{className:"card p-8",children:[f.jsx("label",{className:"block text-sm font-medium text-theme-text-secondary mb-2",children:l("login.password")}),f.jsx("input",{type:"password",value:t,onChange:h=>n(h.target.value),placeholder:"*************",className:"input-field text-base",autoFocus:!0}),r&&f.jsx("div",{className:"mt-4 py-2.5 px-4 bg-status-error/5 border border-status-error/20 rounded-xl text-sm text-status-error",children:r}),f.jsx("button",{type:"submit",disabled:!t||i,className:"btn-primary w-full mt-6 py-3",children:l(i?"login.loading":"login.submit")})]})}),f.jsx("div",{className:"mt-6 text-center text-xs text-theme-text-tertiary",children:l("login.footer")}),f.jsx("div",{className:"mt-4 px-2 py-3 rounded-xl text-xs text-theme-text-tertiary border leading-relaxed text-center",children:l("login.disclaimer")})]})]})}function tne(e){return Be("/api/projects/browse",{initialPath:e})}function nne(e){return Be("/api/projects/open-folder",{path:e})}function a8(){return ct("/api/projects")}function rne(e){return ct(`/api/projects/${e}`)}function i8(e){return Be("/api/projects",e)}function tD(e,t){return oo(`/api/projects/${e}`,t)}function s8(e,t){const n=t?`?todoId=${encodeURIComponent(t)}`:"";return ct(`/api/projects/${e}/debug-logs${n}`)}function o8(e){return $a(`/api/projects/${e}`)}function ane(e){return Be(`/api/projects/${e}/start`)}function ine(e){return Be(`/api/projects/${e}/stop`)}function l8(e){return ct(`/api/projects/${e}/status`)}function sne(e){return Be(`/api/projects/${e}/check-git`)}function one(e,t){return ct(`/api/projects/${e}/git-status`)}function lne(e,t=0,n=50,r){const a=new URLSearchParams({skip:String(t),limit:String(n)});return ct(`/api/projects/${e}/git-log?${a}`)}function une(e,t){return ct(`/api/projects/${e}/git-refs`)}function cne(e,t){return Be(`/api/projects/${e}/git-stage`,{files:t})}function dne(e,t){return Be(`/api/projects/${e}/git-unstage`,{files:t})}function u8(e,t){return Be(`/api/projects/${e}/git-commit`,{message:t})}function c8(e,t,n){return Be(`/api/projects/${e}/git-pull`,{remote:t,branch:n})}function Y2(e,t,n,r){return Be(`/api/projects/${e}/git-push`,{remote:t,branch:n,setUpstream:r})}function d8(e,t,n){return Be(`/api/projects/${e}/git-fetch`,{remote:t,prune:n})}function fne(e,t,n){return Be(`/api/projects/${e}/git-branch`,{name:t,startPoint:n})}function fC(e,t,n){return Be(`/api/projects/${e}/git-branch-delete`,{name:t,force:n})}function hC(e,t){return Be(`/api/projects/${e}/git-checkout`,{branch:t})}function f8(e,t){return Be(`/api/projects/${e}/git-merge`,{branch:t})}function hne(e,t){return Be(`/api/projects/${e}/git-stash`,{message:t})}function mne(e,t){return Be(`/api/projects/${e}/git-stash-pop`,{index:t})}function pne(e){return ct(`/api/projects/${e}/git-stash-list`)}function gne(e,t,n){return Be(`/api/projects/${e}/git-discard`,{files:t,all:n})}function vne(e,t,n,r){return Be(`/api/projects/${e}/git-tag`,{name:t,message:n,commit:r})}function nD(e,t,n){return Be(`/api/projects/${e}/git-branch-rename`,{oldName:t,newName:n})}function yne(e,t){return Be(`/api/projects/${e}/git-rebase`,{onto:t})}function xne(e,t,n){const r=new URLSearchParams;return t&&r.set("file",t),n&&r.set("staged","true"),ct(`/api/projects/${e}/git-diff?${r}`)}function bne(e,t){const n=new URLSearchParams({hash:t});return ct(`/api/projects/${e}/git-commit-files?${n}`)}function rD(e,t,n){const r=new URLSearchParams({hash:t});return n&&r.set("file",n),ct(`/api/projects/${e}/git-commit-diff?${r}`)}function aD(e){return ct(`/api/projects/${e}/worktrees`)}function iD(e,t,n){return Be(`/api/projects/${e}/worktree-cleanup`,{worktreePath:t,branchName:n})}function h8(e){const t=new URLSearchParams;e.hours!==void 0&&t.set("hours",String(e.hours)),e.statuses&&e.statuses.length>0&&t.set("statuses",e.statuses.join(","));const n=t.toString();return n?`?${n}`:""}function wne(e={}){return ct(`/api/review/queue${h8(e)}`)}function m8(e={}){return ct(`/api/review/summary${h8(e)}`)}const p8=x.createContext({theme:"light",toggleTheme:()=>{}});function Sne(){const[e,t]=x.useState(()=>{const r=localStorage.getItem("theme");return r==="light"||r==="dark"?r:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"});x.useEffect(()=>{document.documentElement.setAttribute("data-theme",e),localStorage.setItem("theme",e)},[e]);const n=x.useCallback(()=>{t(r=>r==="light"?"dark":"light")},[]);return{theme:e,toggleTheme:n}}function g8(){return x.useContext(p8)}const v8=x.createContext({enabled:!1,supported:!1,toggleNotification:()=>{},sendNotification:()=>{}});function jne(){const e="Notification"in window,[t,n]=x.useState(()=>e?localStorage.getItem("clitrigger-notifications")==="on"&&Notification.permission==="granted":!1),r=x.useRef(t);x.useEffect(()=>{r.current=t},[t]);const a=x.useCallback(async()=>{if(e)if(r.current)localStorage.setItem("clitrigger-notifications","off"),n(!1);else{if(Notification.permission==="denied"||Notification.permission==="default"&&await Notification.requestPermission()!=="granted")return;localStorage.setItem("clitrigger-notifications","on"),n(!0)}},[e]),i=x.useCallback((s,l)=>{if(!r.current)return;const c=new Notification(s,{body:l});c.onclick=()=>{window.focus(),c.close()}},[]);return{enabled:t,supported:e,toggleNotification:a,sendNotification:i}}function X2(){return x.useContext(v8)}function Eu(...e){return e.filter(Boolean).join(" ")}const kne={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl"},_ne={scale:"animate-scale-in","slide-up":"animate-slide-up"};function ts({open:e,onClose:t,size:n="md",position:r="center",animation:a="scale",disableEscClose:i=!1,disableBackdropClose:s=!1,children:l}){const c=x.useRef(null);return x.useEffect(()=>{if(!e||i)return;const d=h=>{h.key==="Escape"&&t()};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[e,i,t]),e?vl.createPortal(f.jsx("div",{ref:c,className:Eu("fixed inset-0 bg-black/50 backdrop-blur-sm z-modal flex",r==="center"?"items-center justify-center p-4":"items-start justify-center px-4 pt-[20vh]"),onClick:d=>{!s&&d.target===c.current&&t()},children:f.jsx("div",{className:Eu("w-full",kne[n],_ne[a]),children:l})}),document.body):null}function y8({onSubmit:e,onCancel:t}){const[n,r]=x.useState(""),[a,i]=x.useState(""),[s,l]=x.useState(!1),{t:c}=Ze(),d=m=>{m.preventDefault(),!(!n.trim()||!a.trim())&&e(n.trim(),a.trim())},h=async()=>{l(!0);try{const m=await tne(a||void 0);m.path&&i(m.path)}catch{}l(!1)};return f.jsx(ts,{open:!0,onClose:t,size:"md",children:f.jsxs("div",{className:"card p-8 shadow-2xl rounded-2xl",children:[f.jsx("h2",{className:"text-lg font-semibold text-warm-800 mb-6",children:c("form.newProject")}),f.jsxs("form",{onSubmit:d,children:[f.jsxs("div",{className:"mb-5",children:[f.jsx("label",{className:"block text-sm font-medium text-warm-600 mb-2",children:c("form.projectName")}),f.jsx("input",{type:"text",placeholder:"my-project",value:n,onChange:m=>r(m.target.value),className:"input-field",autoFocus:!0})]}),f.jsxs("div",{className:"mb-8",children:[f.jsx("label",{className:"block text-sm font-medium text-warm-600 mb-2",children:c("form.folderPath")}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx("input",{type:"text",placeholder:"C:/Projects/my-project",value:a,onChange:m=>i(m.target.value),className:"input-field text-sm flex-1"}),f.jsx("button",{type:"button",onClick:h,disabled:s,className:"btn-ghost text-sm px-3 shrink-0",title:c("browse.title"),children:s?f.jsx(Ap,{size:16,className:"animate-spin"}):f.jsx(K2,{size:16})})]})]}),f.jsxs("div",{className:"flex justify-end gap-3",children:[f.jsx("button",{type:"button",onClick:t,className:"btn-ghost text-sm",children:c("form.cancel")}),f.jsx("button",{type:"submit",disabled:!n.trim()||!a.trim(),className:"btn-primary text-sm",children:c("form.create")})]})]})]})})}function Cne({onLogout:e,authRequired:t,connected:n,onEvent:r,onClose:a}){var z;const[i,s]=x.useState([]),[l,c]=x.useState({}),[d,h]=x.useState(null),[m,g]=x.useState(!1),v=yi(),b=zg(),{t:w,toggleLang:S}=Ze(),{theme:j,toggleTheme:_}=g8(),{enabled:k,supported:E,toggleNotification:T}=X2(),A=((z=v.pathname.match(/^\/projects\/([^/]+)/))==null?void 0:z[1])||null;x.useEffect(()=>{I()},[]),x.useEffect(()=>{const F=()=>I();return window.addEventListener("projects:changed",F),()=>window.removeEventListener("projects:changed",F)},[]),x.useEffect(()=>r(F=>{F.type==="project:status-changed"&&F.projectId&&c(R=>({...R,[F.projectId]:{running:F.running??0,completed:F.completed??0,total:F.total??0}})),F.type==="todo:status-changed"&&O()}),[r]),x.useEffect(()=>{O()},[]);function O(){m8({hours:24}).then(F=>h(F.total_todos)).catch(()=>{})}function I(){a8().then(F=>{s(F),F.forEach(R=>{l8(R.id).then(M=>{c(L=>({...L,[R.id]:M}))}).catch(()=>{})})}).catch(()=>{})}const P=()=>{a==null||a()},D=async(F,R)=>{try{await i8({name:F,path:R}),g(!1),window.dispatchEvent(new Event("projects:changed"))}catch{}},q=async(F,R)=>{if(R.preventDefault(),R.stopPropagation(),!!confirm(w("projects.deleteConfirm")))try{await o8(F),s(M=>M.filter(L=>L.id!==F)),window.dispatchEvent(new Event("projects:changed")),A===String(F)&&b("/")}catch{}};return f.jsxs("div",{className:"flex flex-col h-full glass border-none",children:[f.jsx("div",{className:"px-4 pt-5 pb-3",children:f.jsx(ai,{to:"/",onClick:P,className:"block",children:f.jsxs("svg",{viewBox:"0 0 200 32",fill:"none",className:"h-6 w-auto",children:[f.jsxs("text",{x:"0",y:"24",fontFamily:"'JetBrains Mono', monospace",fontSize:"22",fontWeight:"500",fill:"var(--color-accent)",opacity:"0.5",children:[">","_"]}),f.jsx("text",{x:"38",y:"24",fontFamily:"'JetBrains Mono', monospace",fontSize:"22",fontWeight:"700",fill:"var(--color-accent)",children:"CLI"}),f.jsx("text",{x:"96",y:"24",fontFamily:"'JetBrains Mono', monospace",fontSize:"22",fontWeight:"500",fill:"var(--color-text-primary)",children:"Trigger"})]})})}),f.jsxs("nav",{className:"px-3 mb-2 space-y-0.5",children:[f.jsxs(ai,{to:"/",onClick:P,className:`relative flex items-center gap-3 px-3 py-2 rounded-lg text-sm transition-all duration-200 active:scale-95 ${v.pathname==="/"?"font-medium":""}`,style:v.pathname==="/"?{backgroundColor:"var(--color-bg-hover)",color:"var(--color-text-primary)",boxShadow:"var(--shadow-soft)"}:{color:"var(--color-text-tertiary)"},children:[v.pathname==="/"&&f.jsx("span",{className:"absolute left-0 top-1/4 bottom-1/4 w-[3px] rounded-r-full",style:{backgroundColor:"var(--color-accent)"}}),f.jsx(hte,{size:16}),w("sidebar.home")]}),f.jsxs(ai,{to:"/review",onClick:P,className:`relative flex items-center gap-3 px-3 py-2 rounded-lg text-sm transition-all duration-200 active:scale-95 ${v.pathname==="/review"?"font-medium":""}`,style:v.pathname==="/review"?{backgroundColor:"var(--color-bg-hover)",color:"var(--color-text-primary)",boxShadow:"var(--shadow-soft)"}:{color:"var(--color-text-tertiary)"},children:[v.pathname==="/review"&&f.jsx("span",{className:"absolute left-0 top-1/4 bottom-1/4 w-[3px] rounded-r-full",style:{backgroundColor:"var(--color-accent)"}}),f.jsx(cC,{size:16}),f.jsx("span",{className:"flex-1",children:w("sidebar.review")}),d!==null&&d>0&&f.jsx("span",{className:"text-2xs px-1.5 py-0.5 rounded-full font-medium",style:{backgroundColor:"var(--color-accent)",color:"white"},children:d})]})]}),f.jsx("div",{className:"mx-4 border-t",style:{borderColor:"var(--color-border)"}}),f.jsxs("div",{className:"flex-1 overflow-y-auto px-3 pt-3",children:[f.jsxs("div",{className:"px-3 mb-2 flex items-center justify-between",children:[f.jsx("span",{className:"text-2xs font-semibold uppercase tracking-wider",style:{color:"var(--color-text-muted)"},children:w("sidebar.workspaces")}),f.jsx("button",{onClick:()=>g(!0),className:"flex items-center justify-center w-5 h-5 rounded-md transition-colors hover:bg-theme-hover",style:{color:"var(--color-text-tertiary)"},title:w("projects.new"),children:f.jsx(sc,{size:14,strokeWidth:2})})]}),f.jsx("div",{className:"space-y-0.5",children:i.map(F=>{const R=l[F.id],M=A===String(F.id),L=R&&R.running>0;return f.jsxs(ai,{to:`/projects/${F.id}`,onClick:P,className:`relative flex items-center gap-2.5 px-3 py-1.5 rounded-lg text-sm transition-all duration-200 hover:bg-theme-hover active:scale-95 group ${M?"font-medium":""}`,style:M?{backgroundColor:"var(--color-bg-hover)",color:"var(--color-text-primary)",boxShadow:"var(--shadow-soft)"}:{color:"var(--color-text-tertiary)"},children:[M&&f.jsx("span",{className:"absolute left-0 top-1/4 bottom-1/4 w-[3px] rounded-r-full",style:{backgroundColor:"var(--color-accent)"}}),f.jsx("span",{className:`w-2 h-2 rounded-full flex-shrink-0 ${L?"bg-status-running animate-pulse":""}`,style:L?void 0:{backgroundColor:M?"var(--color-accent)":"var(--color-text-faint)"}}),f.jsx("span",{className:"truncate flex-1",children:F.name}),f.jsx("button",{onClick:G=>q(F.id,G),className:"flex-shrink-0 p-0.5 rounded opacity-0 group-hover:opacity-100 transition-all hover:bg-status-error/10",style:{color:"var(--color-text-muted)"},title:w("projects.delete"),children:f.jsx(Wr,{size:12,strokeWidth:2})})]},F.id)})})]}),m&&f.jsx(y8,{onSubmit:(F,R)=>D(F,R),onCancel:()=>g(!1)}),f.jsx("div",{className:"px-3 pb-4 pt-2",style:{borderTop:"1px solid var(--color-border)"},children:f.jsxs("div",{className:"flex items-center gap-1 px-1",children:[f.jsx("span",{className:`w-1.5 h-1.5 rounded-full flex-shrink-0 mr-1 ${n?"bg-status-success":"bg-status-error"}`,title:n?w("detail.live"):"Disconnected"}),f.jsx("button",{onClick:_,className:"flex items-center justify-center w-8 h-8 rounded-lg transition-colors",style:{color:"var(--color-text-tertiary)"},title:w(j==="light"?"theme.dark":"theme.light"),children:j==="light"?f.jsx(Nte,{size:16}):f.jsx(Hte,{size:16})}),f.jsx("button",{onClick:S,className:"flex items-center justify-center w-8 h-8 rounded-lg transition-colors text-xs font-medium",style:{color:"var(--color-text-tertiary)"},children:w("lang.toggle")}),E&&f.jsx("button",{onClick:T,className:"flex items-center justify-center w-8 h-8 rounded-lg transition-colors",style:{color:k?"var(--color-accent)":"var(--color-text-tertiary)"},title:"Notification"in window&&Notification.permission==="denied"?w("notification.blocked"):w("notification.toggle"),children:k?f.jsx(hee,{size:16}):f.jsx(dee,{size:16})}),t&&f.jsx("button",{onClick:e,className:"flex items-center justify-center w-8 h-8 rounded-lg transition-colors ml-auto",style:{color:"var(--color-text-tertiary)"},title:w("projects.logout"),children:f.jsx(wte,{size:16})})]})})]})}const Nne=80,sD=120,Bi=180,oD=.03,lD=8;function Ene(){const e=x.useRef(null),t=x.useRef({x:-1e3,y:-1e3}),n=x.useRef([]),r=x.useRef(0);return x.useEffect(()=>{const a=e.current;if(!a)return;const i=a.getContext("2d");if(!i)return;let s=0,l=0;function c(){const v=a.parentElement;v&&(s=v.clientWidth,l=v.clientHeight,a.width=s*window.devicePixelRatio,a.height=l*window.devicePixelRatio,a.style.width=`${s}px`,a.style.height=`${l}px`,i.setTransform(window.devicePixelRatio,0,0,window.devicePixelRatio,0,0),d())}function d(){n.current=[];for(let v=0;v<Nne;v++){const b=Math.random()*s,w=Math.random()*l;n.current.push({x:b,y:w,baseX:b,baseY:w,vx:(Math.random()-.5)*.3,vy:(Math.random()-.5)*.3,size:Math.random()*1.5+.5,alpha:Math.random()*.4+.1})}}function h(v){const b=a.getBoundingClientRect();t.current.x=v.clientX-b.left,t.current.y=v.clientY-b.top}function m(){t.current.x=-1e3,t.current.y=-1e3}function g(){if(!i)return;i.clearRect(0,0,s,l);const v=n.current,b=t.current;for(const w of v){const S=w.x-b.x,j=w.y-b.y,_=Math.sqrt(S*S+j*j);if(_<Bi&&_>0){const k=(Bi-_)/Bi,E=Math.atan2(j,S);w.vx+=Math.cos(E)*k*lD*.05,w.vy+=Math.sin(E)*k*lD*.05}w.vx+=(w.baseX-w.x)*oD,w.vy+=(w.baseY-w.y)*oD,w.baseX+=(Math.random()-.5)*.1,w.baseY+=(Math.random()-.5)*.1,w.baseX<0&&(w.baseX=0),w.baseX>s&&(w.baseX=s),w.baseY<0&&(w.baseY=0),w.baseY>l&&(w.baseY=l),w.vx*=.92,w.vy*=.92,w.x+=w.vx,w.y+=w.vy}for(let w=0;w<v.length;w++){for(let k=w+1;k<v.length;k++){const E=v[w].x-v[k].x,T=v[w].y-v[k].y,A=Math.sqrt(E*E+T*T);if(A<sD){const O=(1-A/sD)*.15;i.beginPath(),i.strokeStyle=`rgba(75, 141, 255, ${O})`,i.lineWidth=.5,i.moveTo(v[w].x,v[w].y),i.lineTo(v[k].x,v[k].y),i.stroke()}}const S=v[w].x-b.x,j=v[w].y-b.y,_=Math.sqrt(S*S+j*j);if(_<Bi){const k=(1-_/Bi)*.3;i.beginPath(),i.strokeStyle=`rgba(75, 141, 255, ${k})`,i.lineWidth=.8,i.moveTo(v[w].x,v[w].y),i.lineTo(b.x,b.y),i.stroke()}}for(const w of v){const S=w.x-b.x,j=w.y-b.y,_=Math.sqrt(S*S+j*j),k=_<Bi?w.alpha+(1-_/Bi)*.5:w.alpha;i.beginPath(),i.arc(w.x,w.y,w.size,0,Math.PI*2),i.fillStyle=`rgba(75, 141, 255, ${k})`,i.fill(),_<Bi&&(i.beginPath(),i.arc(w.x,w.y,w.size*3,0,Math.PI*2),i.fillStyle=`rgba(75, 141, 255, ${(1-_/Bi)*.08})`,i.fill())}r.current=requestAnimationFrame(g)}return c(),a.addEventListener("mousemove",h),a.addEventListener("mouseleave",m),window.addEventListener("resize",c),r.current=requestAnimationFrame(g),()=>{cancelAnimationFrame(r.current),a.removeEventListener("mousemove",h),a.removeEventListener("mouseleave",m),window.removeEventListener("resize",c)}},[]),f.jsx("canvas",{ref:e,className:"absolute inset-0 pointer-events-auto",style:{zIndex:0}})}function Ane({children:e,onLogout:t,authRequired:n,connected:r,onEvent:a}){const[i,s]=x.useState(!1);return f.jsxs("div",{className:"flex h-screen bg-theme-bg",children:[f.jsx("aside",{className:`
|
|
447
|
+
fixed inset-y-0 left-0 z-40 w-60 flex-shrink-0
|
|
448
|
+
transform transition-transform duration-200 ease-in-out
|
|
449
|
+
md:translate-x-0 md:static md:z-auto
|
|
450
|
+
${i?"translate-x-0":"-translate-x-full"}
|
|
451
|
+
`,children:f.jsx(Cne,{onLogout:t,authRequired:n,connected:r,onEvent:a,onClose:()=>s(!1)})}),i&&f.jsx("div",{className:"fixed inset-0 z-overlay bg-black/50 backdrop-blur-sm md:hidden",onClick:()=>s(!1)}),f.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden min-w-0",children:[f.jsxs("div",{className:"md:hidden flex items-center px-4 py-3 border-b border-theme-border glass z-20",children:[f.jsx("button",{onClick:()=>s(!0),className:"p-1.5 rounded-lg hover:bg-theme-hover transition-colors text-theme-text-secondary",children:f.jsx(jte,{size:20})}),f.jsx("span",{className:"ml-3 text-sm font-semibold text-theme-text",children:"CLITrigger"})]}),f.jsxs("main",{className:"flex-1 overflow-y-auto relative",children:[f.jsx(Ene,{}),f.jsx("div",{className:"relative",style:{zIndex:1},children:e})]})]})]})}const Tne={sm:{wrapper:"py-8",iconBox:"w-10 h-10 rounded-xl",iconSize:20,title:"text-sm",desc:"text-xs"},md:{wrapper:"py-12",iconBox:"w-14 h-14 rounded-2xl",iconSize:28,title:"text-sm",desc:"text-xs"},lg:{wrapper:"py-20",iconBox:"w-16 h-16 rounded-2xl",iconSize:32,title:"text-base",desc:"text-sm"}};function xl({icon:e,title:t,description:n,action:r,size:a="md",className:i}){const s=Tne[a],l=r==null?void 0:r.icon;return f.jsxs("div",{className:Eu("text-center animate-fade-in",s.wrapper,i),children:[e&&f.jsx("div",{className:Eu("inline-flex items-center justify-center mb-4 bg-theme-hover",s.iconBox),children:f.jsx(e,{size:s.iconSize,strokeWidth:1.5,className:"text-theme-muted"})}),f.jsx("p",{className:Eu("font-medium text-theme-text-secondary",s.title),children:t}),n&&f.jsx("p",{className:Eu("mt-1 text-theme-muted",s.desc),children:n}),r&&f.jsxs("button",{onClick:r.onClick,className:"btn-primary btn-sm mt-4 inline-flex items-center gap-1.5",children:[l&&f.jsx(l,{size:14}),r.label]})]})}function One({onEvent:e}){const[t,n]=x.useState([]),[r,a]=x.useState({}),[i,s]=x.useState(!1),[l,c]=x.useState(!0),[d,h]=x.useState(""),{t:m}=Ze();x.useEffect(()=>{a8().then(w=>{n(w),w.forEach(S=>{l8(S.id).then(j=>{a(_=>({..._,[S.id]:j}))}).catch(()=>{})})}).catch(()=>{}).finally(()=>c(!1))},[]),x.useEffect(()=>e(w=>{w.type==="project:status-changed"&&w.projectId&&a(S=>({...S,[w.projectId]:{running:w.running??0,completed:w.completed??0,total:w.total??0}}))}),[e]);const g=async(w,S)=>{try{const j=await i8({name:w,path:S});n(_=>[..._,j]),s(!1),window.dispatchEvent(new Event("projects:changed"))}catch{}},v=async(w,S,j=!1)=>{if(S.preventDefault(),S.stopPropagation(),!(!j&&!confirm(m("projects.deleteConfirm"))))try{await o8(w),n(_=>_.filter(k=>k.id!==w)),window.dispatchEvent(new Event("projects:changed"))}catch{}},b=d?t.filter(w=>w.name.toLowerCase().includes(d.toLowerCase())||w.path.toLowerCase().includes(d.toLowerCase())):t;return f.jsx("div",{className:"px-6 py-6 sm:px-8 sm:py-8 min-h-full",children:f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center justify-between gap-4 mb-8",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-3xl font-bold tracking-tight text-primary",children:m("projects.title")}),f.jsxs("p",{className:"text-sm mt-1 text-secondary",children:[b.length," ",m("projects.tasks")]})]}),f.jsxs("button",{onClick:()=>s(!0),className:"btn-primary",children:[f.jsx(sc,{size:20,strokeWidth:2.5}),f.jsx("span",{className:"hidden sm:inline font-bold",children:m("projects.new")})]})]}),f.jsxs("div",{className:"mb-8 relative group",children:[f.jsx(Hg,{className:"absolute left-4 top-1/2 -translate-y-1/2 text-muted group-focus-within:text-accent transition-colors",size:20,strokeWidth:2}),f.jsx("input",{type:"text",value:d,onChange:w=>h(w.target.value),placeholder:m("projects.search"),className:"input-field pl-12 py-3 text-base shadow-soft"})]}),l?f.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:[...Array(6)].map((w,S)=>f.jsxs("div",{className:"card p-5 space-y-3",children:[f.jsx(Ue,{className:"h-5 w-2/3"}),f.jsx(Ue,{className:"h-3 w-full"}),f.jsx("div",{className:"flex gap-2",children:f.jsx(Ue,{className:"h-5 w-12 rounded-full"})}),f.jsxs("div",{className:"flex gap-2 pt-2",children:[f.jsx(Ue,{className:"h-6 w-16"}),f.jsx(Ue,{className:"h-6 w-16"})]}),f.jsx(Ue,{className:"h-1 w-full mt-2"})]},S))}):b.length===0?f.jsx(xl,{icon:K2,title:m("projects.empty"),description:m("projects.emptyHint"),size:"lg"}):f.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:b.map((w,S)=>{const j=r[w.id]||{total:0,completed:0,running:0},_=w.path_exists===!1,k=_?"div":ai,E=_?{onClick:T=>{confirm(m("projects.pathMissingConfirm"))&&v(w.id,T,!0)},className:"card group block p-5 opacity-50 relative cursor-pointer animate-fade-in"}:{to:`/projects/${w.id}`,className:"card group block p-5 relative hover:border-accent/30 animate-fade-in"};return f.jsxs(k,{...E,style:{animationDelay:`${S*50}ms`},children:[f.jsx("button",{onClick:T=>v(w.id,T),className:"absolute top-3 right-3 p-1.5 rounded-lg opacity-0 group-hover:opacity-100 transition-all hover:bg-status-error/10 text-theme-muted",title:m("projects.delete"),children:f.jsx(Wr,{size:14,strokeWidth:2})}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-9 h-9 rounded-lg flex items-center justify-center text-sm font-bold flex-shrink-0 bg-theme-bg-tertiary text-theme-text-secondary",children:w.name.charAt(0).toUpperCase()}),f.jsxs("div",{className:"min-w-0",children:[f.jsx("h3",{className:"text-sm font-semibold truncate text-theme-text",children:w.name}),f.jsx("p",{className:"text-2xs font-mono truncate text-theme-muted",children:w.path.split(/[/\\]/).slice(-2).join("/")})]})]}),f.jsxs("div",{className:"mt-4 flex items-center justify-between gap-3",children:[f.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[j.running>0&&f.jsxs("span",{className:"inline-flex items-center gap-1 text-status-running font-medium",children:[f.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-status-running"}),j.running]}),f.jsxs("span",{className:"text-theme-muted",children:[j.completed,"/",j.total]})]}),j.total>0&&f.jsxs("span",{className:"text-2xs font-medium text-theme-muted",children:[Math.round(j.completed/j.total*100),"%"]})]}),j.total>0&&f.jsx("div",{className:"mt-1.5 h-1 rounded-full overflow-hidden bg-theme-bg-tertiary",children:f.jsx("div",{className:"h-full rounded-full transition-all duration-500 bg-accent",style:{width:`${j.completed/j.total*100}%`}})})]},w.id)})}),i&&f.jsx(y8,{onSubmit:(w,S)=>g(w,S),onCancel:()=>s(!1)})]})})}function M0(e){return ct(`/api/projects/${e}/todos`)}function P0(e,t){return Be(`/api/projects/${e}/todos`,t)}function Tm(e,t){return oo(`/api/todos/${e}`,t)}function Mne(e){return $a(`/api/todos/${e}`)}function uD(e,t="headless"){return Be(`/api/todos/${e}/start`,{mode:t})}function Pne(e){return Be(`/api/todos/${e}/stop`)}function Z2(e){return ct(`/api/todos/${e}/logs`)}function x8(e){return ct(`/api/todos/${e}/diff`)}function b8(e){return ct(`/api/todos/${e}/result`)}function w8(e){return Be(`/api/todos/${e}/merge`)}function Dne(e){return Be(`/api/todos/${e}/merge-chain`)}function S8(e,t=!0){return Be(`/api/todos/${e}/cleanup`,{delete_branch:t})}function Rne(e,t="headless"){return Be(`/api/todos/${e}/retry`,{mode:t})}function j8(e,t,n="headless"){return Be(`/api/todos/${e}/continue`,{prompt:t,mode:n})}function Q2(e,t){return Be(`/api/todos/${e}/images`,{images:t})}function k8(e,t){return $a(`/api/todos/${e}/images/${t}`)}function rf(e,t){return`/api/todos/${e}/images/${t}`}function cD(e){return ct(`/api/projects/${e}/schedules`)}function Ine(e,t){return Be(`/api/projects/${e}/schedules`,t)}function Lne(e,t){return oo(`/api/schedules/${e}`,t)}function zne(e,t,n=!1){return Be(`/api/todos/${e}/schedule`,{run_at:t,keep_original:n})}function $ne(e){return $a(`/api/schedules/${e}`)}function qne(e){return Be(`/api/schedules/${e}/activate`)}function Bne(e){return Be(`/api/schedules/${e}/pause`)}function D0(e){return ct(`/api/schedules/${e}/runs`)}function Fne(e){return Be(`/api/schedules/${e}/trigger`)}function Hne(){return ct("/api/rate-limit")}function Une(e,t){return Be(`/api/todos/${e}/schedule-on-reset`,{prompt:t})}function _8(e){return ct(`/api/projects/${e}/agents`)}function Gne(e,t){return Be(`/api/projects/${e}/agents`,t)}function Vne(e,t){return oo(`/api/agents/${e}`,t)}function Kne(e){return $a(`/api/agents/${e}`)}function dD(e){return ct(`/api/projects/${e}/discussions`)}function Wne(e,t){return Be(`/api/projects/${e}/discussions`,t)}function Io(e){return ct(`/api/discussions/${e}`)}function Yne(e,t){return oo(`/api/discussions/${e}`,t)}function Xne(e){return $a(`/api/discussions/${e}`)}function C8(e){return Be(`/api/discussions/${e}/start`)}function N8(e){return Be(`/api/discussions/${e}/stop`)}function Zne(e,t){return Be(`/api/discussions/${e}/inject`,{content:t})}function Qne(e){return Be(`/api/discussions/${e}/skip-turn`)}function Jne(e,t){return Be(`/api/discussions/${e}/implement`,{agent_id:t})}function ere(e,t){return ct(`/api/discussions/${e}/logs`)}function tre(e){return Be(`/api/discussions/${e}/merge`)}function nre(e){return Be(`/api/discussions/${e}/cleanup`)}function rre(e){return ct(`/api/projects/${e}/sessions`)}function are(e,t){return Be(`/api/projects/${e}/sessions`,t)}function ire(e){return $a(`/api/sessions/${e}`)}function sre(e){return Be(`/api/sessions/${e}/start`)}function ore(e){return Be(`/api/sessions/${e}/stop`)}function lre(e){return ct(`/api/sessions/${e}/logs`)}function ure(e,t=!0){return Be(`/api/sessions/${e}/cleanup`,{delete_branch:t})}function Om(e){return ct(`/api/projects/${e}/planner`)}function Mm(e){return ct(`/api/projects/${e}/planner/tags`)}function cre(e,t,n){return oo(`/api/projects/${e}/planner/tags/${encodeURIComponent(t)}`,n)}function dre(e,t){return $a(`/api/projects/${e}/planner/tags/${encodeURIComponent(t)}`)}function fre(e,t){return Be(`/api/projects/${e}/planner`,t)}function hre(e,t){return oo(`/api/planner/${e}`,t)}function mre(e){return $a(`/api/planner/${e}`)}function pre(e,t){return Be(`/api/planner/${e}/convert-to-todo`,t)}function E8(e,t){return Be(`/api/planner/${e}/images`,{images:t})}function A8(e,t){return $a(`/api/planner/${e}/images/${t}`)}function T8(e,t){return`/api/planner/${e}/images/${t}`}function gre(e,t){return Be(`/api/planner/${e}/convert-to-schedule`,t)}async function vre(e){const t=await fetch(`/api/projects/${e}/planner/export`,{credentials:"include"});if(t.status===401)throw window.dispatchEvent(new CustomEvent("auth:unauthorized")),new Error("Unauthorized");if(!t.ok){const s=await t.text().catch(()=>t.statusText);let l=s;try{const c=JSON.parse(s);c.error&&(l=c.error)}catch{}throw new Error(l||"Export failed")}const r=(t.headers.get("Content-Disposition")||"").match(/filename="?([^"]+)"?/i),a=r?r[1]:`planner-${e}.md`;return{blob:await t.blob(),filename:a}}async function yre(e,t){const n=await fetch(`/api/projects/${e}/planner/import`,{method:"POST",credentials:"include",headers:{"Content-Type":"text/markdown; charset=utf-8"},body:t});if(n.status===401)throw window.dispatchEvent(new CustomEvent("auth:unauthorized")),new Error("Unauthorized");if(!n.ok){const r=await n.text().catch(()=>n.statusText);let a=r;try{const i=JSON.parse(r);i.error&&(a=i.error)}catch{}throw new Error(a||"Import failed")}return n.json()}function xre(e,t){return ct(`/api/plugins/${e}/config/${t}`)}function bre(e,t,n){return oo(`/api/plugins/${e}/config/${t}`,n)}function wre(){return ct("/api/cli/status")}function Sre(){return Be("/api/cli/status/refresh")}function O8(){return ct("/api/models")}function jre(e,t,n){return Be("/api/models",{cliTool:e,modelValue:t,modelLabel:n})}function kre(e){return $a(`/api/models/${e}`)}const mC=[{value:"claude",label:"Claude Code",supportsInteractive:!0,models:[{value:"",label:"Default"},{value:"claude-sonnet-4-6",label:"Claude Sonnet 4.6"},{value:"claude-opus-4-6",label:"Claude Opus 4.6"},{value:"claude-haiku-4-5",label:"Claude Haiku 4.5"}]},{value:"gemini",label:"Gemini CLI",supportsInteractive:!0,models:[{value:"",label:"Default (Gemini 2.5 Pro)"}]},{value:"codex",label:"Codex CLI",supportsInteractive:!0,models:[{value:"",label:"Default"},{value:"gpt-4.1",label:"GPT-4.1"},{value:"gpt-4.1-mini",label:"GPT-4.1 Mini"},{value:"gpt-4.1-nano",label:"GPT-4.1 Nano"},{value:"o3",label:"o3"},{value:"o4-mini",label:"o4-mini"}]}],ii=mC;let Wi=null,Dd=null;function M8(){return Dd||(Dd=O8().then(e=>{Wi=e}).catch(()=>{Wi=null}),Dd)}function _re(){return Dd=null,Wi=null,M8()}function $u(e){const t=mC.find(n=>n.value===e)??mC[0];if(Wi&&Wi[e]){const n=[],r=[];for(const a of Wi[e])a.deprecated?r.push({value:a.value,label:`${a.label} (deprecated)`,deprecated:!0}):n.push({value:a.value,label:a.label});return{...t,models:[...n,...r]}}return t}function Cre(e,t){if(!Wi||!Wi[e])return!1;const n=Wi[e].find(r=>r.value===t);return!!(n!=null&&n.deprecated)}function oc(){const[e,t]=x.useState(!1),[,n]=x.useState(0);x.useEffect(()=>{M8().then(()=>t(!0))},[]);const r=x.useCallback(()=>{_re().then(()=>n(i=>i+1))},[]),a=x.useCallback(i=>$u(i),[e]);return{loaded:e,refresh:r,getToolConfig:a}}function Nre(){const{t:e}=Ze(),{refresh:t}=oc(),[n,r]=x.useState({}),[a,i]=x.useState("claude"),[s,l]=x.useState(""),[c,d]=x.useState(""),[h,m]=x.useState(!1),[g,v]=x.useState(""),b=()=>{O8().then(r).catch(()=>{})};x.useEffect(()=>{b()},[]);const w=async()=>{if(!(!s.trim()||!c.trim())){m(!0),v("");try{await jre(a,s.trim(),c.trim()),l(""),d(""),b(),t()}catch(_){_ instanceof Error&&v(_.message)}finally{m(!1)}}},S=async _=>{try{await kre(_),b(),t()}catch{}},j=n[a]||[];return f.jsxs("div",{className:"mt-6 p-4 border border-warm-200 rounded-xl",children:[f.jsx("h4",{className:"text-sm font-semibold text-warm-700 mb-3",children:e("header.modelSettings")||"AI Model Settings"}),f.jsx("div",{className:"flex gap-1.5 mb-4",children:ii.map(_=>f.jsx("button",{type:"button",onClick:()=>{i(_.value),v("")},className:`px-3 py-1.5 rounded-md text-xs font-medium transition-colors ${a===_.value?"bg-accent text-white":"bg-warm-100 text-warm-500 hover:bg-warm-200"}`,children:_.label},_.value))}),f.jsx("div",{className:"space-y-1.5 mb-4",children:j.map(_=>f.jsxs("div",{className:`flex items-center justify-between px-3 py-2 rounded-lg bg-warm-50 ${_.deprecated?"opacity-60":""}`,children:[f.jsxs("div",{className:"min-w-0",children:[f.jsx("span",{className:`text-xs font-medium ${_.deprecated?"text-warm-400 line-through":"text-warm-700"}`,children:_.label}),_.value&&f.jsx("span",{className:"ml-2 text-2xs text-warm-400 font-mono",children:_.value}),_.isDefault&&f.jsx("span",{className:"ml-2 text-2xs text-warm-300",children:"(built-in)"}),_.deprecated&&f.jsx("span",{className:"ml-2 text-2xs text-status-warning font-medium",children:e("header.modelDeprecated")||"(deprecated)"})]}),!_.isDefault&&f.jsx("button",{type:"button",onClick:()=>S(_.id),className:"text-warm-300 hover:text-status-error transition-colors p-1",children:f.jsx(Wr,{size:14})})]},_.id))}),f.jsxs("div",{className:"flex gap-2 items-end",children:[f.jsxs("div",{className:"flex-1",children:[f.jsx("label",{className:"block text-2xs font-medium text-warm-400 mb-1",children:e("header.modelValue")||"Model ID"}),f.jsx("input",{type:"text",value:s,onChange:_=>l(_.target.value),placeholder:"e.g. claude-sonnet-4-7",className:"input-field text-xs"})]}),f.jsxs("div",{className:"flex-1",children:[f.jsx("label",{className:"block text-2xs font-medium text-warm-400 mb-1",children:e("header.modelLabel")||"Display Name"}),f.jsx("input",{type:"text",value:c,onChange:_=>d(_.target.value),placeholder:"e.g. Claude Sonnet 4.7",className:"input-field text-xs"})]}),f.jsx("button",{type:"button",onClick:w,disabled:h||!s.trim()||!c.trim(),className:"btn-primary text-xs px-3 py-2 flex-shrink-0",children:h?"...":e("header.addModel")||"Add"})]}),g&&f.jsx("p",{className:"text-xs text-status-error mt-1.5",children:g}),f.jsx("p",{className:"text-2xs text-warm-300 mt-3",children:e("header.modelSettingsHint")||"Add custom models here. They will appear in model dropdowns across all projects."})]})}function Ere({model:e,onOpenSettings:t}){const{t:n}=Ze(),[r,a]=x.useState(!1),[i,s]=x.useState(!1),l=x.useRef(null),c=x.useRef(null),[d,h]=x.useState({top:0,left:0}),m=x.useCallback(()=>{if(!l.current)return;const g=l.current.getBoundingClientRect(),v=window.innerWidth,b=window.innerHeight,w=c.current,S=(w==null?void 0:w.offsetWidth)??320,j=(w==null?void 0:w.offsetHeight)??200;let _=g.bottom+6,k=g.left;k+S>v-8&&(k=v-8-S),k<8&&(k=8),_+j>b-8&&(_=g.top-j-6),_<8&&(_=8),h({top:_,left:k}),s(!0)},[]);return x.useEffect(()=>{if(!r){s(!1);return}m();const g=requestAnimationFrame(m);return window.addEventListener("scroll",m,!0),window.addEventListener("resize",m),()=>{cancelAnimationFrame(g),window.removeEventListener("scroll",m,!0),window.removeEventListener("resize",m)}},[r,m]),f.jsxs(f.Fragment,{children:[f.jsxs("span",{ref:l,className:"badge bg-status-warning/15 text-status-warning inline-flex items-center gap-1 cursor-help",tabIndex:0,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),onFocus:()=>a(!0),onBlur:()=>a(!1),children:[f.jsx(nf,{size:10}),n("header.modelDeprecated")||"Model deprecated"]}),r&&vl.createPortal(f.jsxs("div",{ref:c,role:"tooltip",className:"fixed w-80 p-3 rounded-lg shadow-elevated text-xs leading-relaxed z-tooltip",style:{top:d.top,left:d.left,opacity:i?1:0,backgroundColor:"var(--color-bg-card)",borderColor:"var(--color-border)",borderWidth:"1px",color:"var(--color-text-primary)"},onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),children:[f.jsxs("div",{className:"flex items-center gap-1.5 font-semibold text-status-warning mb-1.5 flex-wrap",children:[f.jsx(nf,{size:12}),n("header.modelDeprecatedTitle"),f.jsx("code",{className:"ml-1 px-1 py-0.5 rounded text-[10px] font-mono",style:{backgroundColor:"var(--color-bg-tertiary)"},children:e})]}),f.jsx("p",{className:"mb-2",style:{color:"var(--color-text-secondary)"},children:n("header.modelDeprecatedReason")}),f.jsx("div",{className:"font-semibold mb-1",children:n("header.modelDeprecatedFixHeading")}),f.jsxs("ul",{className:"list-disc pl-4 space-y-0.5 mb-2",style:{color:"var(--color-text-secondary)"},children:[f.jsx("li",{children:n("header.modelDeprecatedFix1")}),f.jsx("li",{children:n("header.modelDeprecatedFix2")}),f.jsx("li",{children:n("header.modelDeprecatedFix3")})]}),f.jsx("button",{type:"button",onMouseDown:g=>{g.preventDefault(),t(),a(!1)},className:"btn-primary text-xs px-2.5 py-1",children:n("header.modelDeprecatedOpenSettings")})]}),document.body)]})}function Are({project:e,todos:t,onStartAll:n,onStopAll:r,onProjectUpdate:a}){var Pe;const i=t.some(be=>be.status==="pending"||be.status==="failed"||be.status==="stopped"),s=t.some(be=>be.status==="running"),{t:l}=Ze(),[c,d]=x.useState(!1),[h,m]=x.useState("execution"),[g,v]=x.useState(!1),[b,w]=x.useState(e.name),S=x.useRef(null),[j,_]=x.useState(e.max_concurrent??3),[k,E]=x.useState(e.default_max_turns??30),[T,A]=x.useState(e.cli_tool||"claude"),[O,I]=x.useState(e.claude_model??""),[P,D]=x.useState(e.claude_options??""),[q,z]=x.useState(e.sandbox_mode||"strict"),[F,R]=x.useState(!!e.debug_logging),[M,L]=x.useState(!!e.show_token_usage),[G,W]=x.useState(e.use_worktree!==0),[Y,B]=x.useState(!!e.npm_auto_install),[H,K]=x.useState(!1),[U,X]=x.useState(!1),[J,Q]=x.useState(!1),[re,ue]=x.useState([]),[Z,se]=x.useState(!1),[ce,ee]=x.useState({}),[ae,oe]=x.useState(()=>{try{return e.cli_fallback_chain?JSON.parse(e.cli_fallback_chain):[]}catch{return[]}});x.useEffect(()=>{const be=uC();Promise.all(be.map(async nt=>{try{const ot=await xre(nt.id,e.id);return[nt.id,ot]}catch{return[nt.id,{}]}})).then(nt=>{const ot={};for(const[gt,lt]of nt)ot[gt]=lt;ee(ot)})},[e.id]);const{getToolConfig:fe,refresh:Ce}=oc();x.useEffect(()=>{c&&wre().then(be=>{ue(be),Ce()}).catch(()=>{}).finally(()=>se(!0))},[c,Ce]);const Te=re.find(be=>be.tool===T),pe=x.useCallback(()=>{se(!1),Sre().then(be=>{ue(be),Ce()}).catch(()=>{}).finally(()=>se(!0))},[Ce]),De=be=>{A(be),I("")},Xe=fe(T),We=x.useCallback(async()=>{Q(!0);try{const be=await sne(e.id);a(be)}catch{}finally{Q(!1)}},[e.id,a]),at=(be,nt)=>{ee(ot=>({...ot,[be]:{...ot[be],...nt}}))},Ne=async()=>{var be,nt,ot,gt,lt,Me,$e,Qe,vt,st,Et,Je,At,It;X(!0);try{const hn=!G&&e.is_git_repo?1:j,ne=await tD(e.id,{max_concurrent:hn,default_max_turns:k,cli_tool:T,sandbox_mode:q,debug_logging:F?1:0,use_worktree:G?1:0,npm_auto_install:Y?1:0,show_token_usage:M?1:0,claude_model:O||null,claude_options:P||null,cli_fallback_chain:ae.length>0?JSON.stringify(ae):null,gstack_enabled:((be=ce.gstack)==null?void 0:be.enabled)==="1"?1:0,gstack_skills:((nt=ce.gstack)==null?void 0:nt.skills)||null,jira_enabled:((ot=ce.jira)==null?void 0:ot.enabled)==="1"?1:0,jira_base_url:((gt=ce.jira)==null?void 0:gt.base_url)||null,jira_email:((lt=ce.jira)==null?void 0:lt.email)||null,jira_api_token:((Me=ce.jira)==null?void 0:Me.api_token)||null,jira_project_key:(($e=ce.jira)==null?void 0:$e.project_key)||null,notion_enabled:((Qe=ce.notion)==null?void 0:Qe.enabled)==="1"?1:0,notion_api_key:((vt=ce.notion)==null?void 0:vt.api_key)||null,notion_database_id:((st=ce.notion)==null?void 0:st.database_id)||null,github_enabled:((Et=ce.github)==null?void 0:Et.enabled)==="1"?1:0,github_token:((Je=ce.github)==null?void 0:Je.token)||null,github_owner:((At=ce.github)==null?void 0:At.owner)||null,github_repo:((It=ce.github)==null?void 0:It.repo)||null});await Promise.all(Object.entries(ce).map(([we,Se])=>bre(we,e.id,Se))),a(ne),d(!1)}catch{}finally{X(!1)}},Fe=async()=>{const be=b.trim();if(!be||be===e.name){w(e.name),v(!1);return}try{const nt=await tD(e.id,{name:be});a(nt)}catch{w(e.name)}v(!1)},ye=t.length,le=t.filter(be=>be.status==="completed"||be.status==="merged").length,me=t.filter(be=>be.status==="running").length,Oe=ye>0?Math.round(le/ye*100):0;return f.jsxs("div",{className:"mb-6",children:[f.jsxs("div",{className:"card p-5 sm:p-6",children:[f.jsxs("div",{className:"flex items-start justify-between gap-4",children:[f.jsxs("div",{className:"min-w-0 flex-1",children:[g?f.jsx("input",{ref:S,type:"text",value:b,onChange:be=>w(be.target.value),onBlur:Fe,onKeyDown:be=>{be.key==="Enter"&&Fe(),be.key==="Escape"&&(w(e.name),v(!1))},className:"text-lg sm:text-xl font-semibold text-warm-800 bg-transparent border-b-2 border-accent outline-none w-full max-w-md",autoFocus:!0}):f.jsxs("h1",{className:"text-lg sm:text-xl font-semibold text-warm-800 truncate cursor-pointer hover:text-accent transition-colors group flex items-center gap-2",onClick:()=>{v(!0),w(e.name)},title:l("header.editName"),children:[e.name,f.jsx(Df,{size:14,className:"opacity-0 group-hover:opacity-50 transition-opacity flex-shrink-0"})]}),f.jsxs("button",{type:"button",className:"mt-0.5 text-[11px] text-warm-400 font-mono truncate hover:text-accent transition-colors cursor-pointer flex items-center gap-1 max-w-full",title:l("header.openFolder"),onClick:()=>nne(e.path),children:[f.jsx(K2,{size:12,className:"flex-shrink-0"}),f.jsx("span",{className:"truncate",children:e.path})]})]}),f.jsxs("div",{className:"flex gap-2 flex-shrink-0",children:[f.jsx("button",{onClick:()=>d(!c),className:"btn-ghost text-sm",title:l("header.settings"),children:f.jsx(Lte,{size:16})}),f.jsxs("button",{onClick:n,disabled:!i,className:"btn-ghost text-sm",children:[f.jsx(yl,{size:16}),l("header.runAll")]}),f.jsxs("button",{onClick:r,disabled:!s,className:"btn-ghost text-sm",children:[f.jsx(Ug,{size:16}),l("header.stopAll")]})]})]}),f.jsx("div",{className:"my-4 border-t",style:{borderColor:"var(--color-border)"}}),f.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-3",children:[f.jsxs("div",{className:"flex flex-wrap gap-1.5 flex-1",children:[e.is_git_repo?f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"badge bg-warm-200/60 text-warm-600",children:"Git"}),f.jsxs("span",{className:"badge bg-warm-200/60 text-warm-600",children:[l("header.branch"),": ",e.default_branch]})]}):f.jsx("span",{className:"badge bg-status-warning/10 text-status-warning",children:l("header.noGit")}),f.jsx("span",{className:"badge bg-warm-200/60 text-warm-600",children:fe(e.cli_tool||"claude").label}),f.jsx("span",{className:"badge bg-warm-200/60 text-warm-600",children:(e.sandbox_mode||"strict")==="strict"?l("header.sandboxBadgeStrict"):l("header.sandboxBadgePermissive")}),e.claude_model&&Cre(e.cli_tool||"claude",e.claude_model)&&f.jsx(Ere,{model:e.claude_model,onOpenSettings:()=>{m("execution"),d(!0)}})]}),f.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[me>0&&f.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs text-status-running font-medium",children:[f.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-status-running animate-pulse"}),me," ",l("projects.active")]}),f.jsxs("span",{className:"text-xs font-medium text-warm-500",children:[Oe,"% ",f.jsxs("span",{className:"text-warm-400",children:[le,"/",ye]})]})]})]})]}),c&&f.jsxs("div",{className:"mt-5 card p-6 animate-fade-in",children:[f.jsx("div",{className:"flex gap-1 mb-5 p-0.5 rounded-lg",style:{backgroundColor:"var(--color-bg-tertiary)"},children:[{key:"execution",label:l("header.config")},{key:"security",label:l("header.sandboxTitle")},{key:"plugins",label:l("tabs.plugins")||"Plugins"}].map(be=>f.jsx("button",{onClick:()=>m(be.key),className:`px-3 py-1.5 text-xs font-medium rounded-md transition-all ${h===be.key?"text-warm-800 shadow-soft":"text-warm-500 hover:text-warm-700"}`,style:h===be.key?{backgroundColor:"var(--color-bg-card)"}:void 0,children:be.label},be.key))}),h==="execution"&&f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-5",children:[f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-2",children:l("header.maxWorkers")}),f.jsx("input",{type:"number",min:1,max:10,value:j,onChange:be=>_(Math.min(10,Math.max(1,parseInt(be.target.value,10)||1))),className:"input-field"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-2",children:l("settings.defaultMaxTurns")}),f.jsx("input",{type:"number",min:5,max:200,value:k,onChange:be=>E(Math.min(200,Math.max(5,parseInt(be.target.value,10)||30))),className:"input-field"}),f.jsx("p",{className:"text-2xs text-warm-400 mt-1",children:l("settings.defaultMaxTurnsHint")})]}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-2",children:l("header.cliTool")}),f.jsx("select",{value:T,onChange:be=>De(be.target.value),className:"input-field",children:ii.map(be=>f.jsx("option",{value:be.value,children:be.label},be.value))}),T==="claude"&&f.jsxs("a",{href:"https://claude.ai/settings/usage",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 mt-1.5 text-xs text-accent hover:text-accent-dark transition-colors",children:[f.jsx(xee,{size:12}),l("header.usageLimit")]}),Z&&Te&&f.jsxs("div",{className:"flex items-center gap-1.5 mt-1.5",children:[f.jsx("span",{className:`inline-block w-2 h-2 rounded-full ${Te.installed?"bg-status-success":"bg-status-error"}`}),f.jsx("span",{className:"text-2xs text-warm-400",children:Te.installed?Te.version||l("header.cliInstalled"):l("header.cliNotFound")}),f.jsx("button",{type:"button",onClick:pe,className:"text-warm-400 hover:text-warm-600 transition-colors ml-1",title:l("header.cliRefresh"),children:f.jsx(Fg,{size:12})})]}),Z&&Te&&!Te.installed&&f.jsx("div",{className:"mt-2 p-2.5 bg-status-warning/5 border border-status-warning/20 rounded-xl",children:f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsx(nf,{size:16,className:"text-status-warning flex-shrink-0 mt-0.5"}),f.jsxs("div",{children:[f.jsx("p",{className:"text-xs font-medium text-status-warning",children:l("header.cliNotInstalled").replace("{tool}",((Pe=ii.find(be=>be.value===T))==null?void 0:Pe.label)||T)}),f.jsx("code",{className:"block mt-1 text-2xs text-warm-500 bg-warm-100 px-2 py-1 rounded select-all",children:l(`header.cliInstallHint.${T}`)})]})]})})]}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-2",children:l("header.aiModel")}),f.jsx("select",{value:O,onChange:be=>I(be.target.value),className:"input-field",children:Xe.models.map(be=>f.jsx("option",{value:be.value,children:be.label},be.value))})]}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-2",children:l("header.cliFlags")}),f.jsx("input",{type:"text",value:P,onChange:be=>D(be.target.value),placeholder:"--verbose",className:"input-field"})]})]}),f.jsxs("div",{className:"mt-5 p-4 border border-warm-200 rounded-xl",children:[f.jsx("h4",{className:"text-xs font-semibold text-warm-600 mb-2",children:l("header.fallbackChainTitle")}),f.jsx("p",{className:"text-2xs text-warm-400 mb-3",children:l("header.fallbackChainHint")}),f.jsx("div",{className:"flex flex-wrap gap-2",children:ii.map(be=>{const nt=ae.indexOf(be.value),ot=nt!==-1;return f.jsxs("button",{type:"button",onClick:()=>{oe(gt=>ot?gt.filter(lt=>lt!==be.value):[...gt,be.value])},className:`px-3 py-1.5 rounded-lg text-xs font-medium border transition-colors ${ot?"bg-accent/10 border-accent text-accent":"bg-warm-50 border-warm-200 text-warm-500 hover:border-warm-300"}`,children:[ot&&f.jsxs("span",{className:"mr-1 font-bold",children:[nt+1,"."]}),be.label]},be.value)})}),ae.length>0&&f.jsx("p",{className:"text-2xs text-warm-500 mt-2",children:ae.map(be=>{var nt;return((nt=ii.find(ot=>ot.value===be))==null?void 0:nt.label)??be}).join(" → ")})]})]}),h==="security"&&f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"p-4 border border-warm-200 rounded-xl",children:[f.jsx("h4",{className:"text-sm font-semibold text-warm-700 mb-2",children:l("header.sandboxTitle")}),f.jsxs("div",{className:"flex gap-3",children:[f.jsxs("button",{type:"button",onClick:()=>z("strict"),className:`flex-1 px-4 py-3 rounded-lg border text-left transition-colors ${q==="strict"?"bg-status-success/10 border-status-success text-status-success":"bg-warm-50 border-warm-200 text-warm-500 hover:border-warm-300"}`,children:[f.jsx("div",{className:"text-xs font-semibold",children:l("header.sandboxStrict")}),f.jsx("div",{className:"text-2xs mt-1 opacity-80",children:l("header.sandboxStrictDesc")})]}),f.jsxs("button",{type:"button",onClick:()=>{q!=="permissive"&&K(!0)},className:`flex-1 px-4 py-3 rounded-lg border text-left transition-colors ${q==="permissive"?"bg-status-warning/10 border-status-warning text-status-warning":"bg-warm-50 border-warm-200 text-warm-500 hover:border-warm-300"}`,children:[f.jsx("div",{className:"text-xs font-semibold",children:l("header.sandboxPermissive")}),f.jsx("div",{className:"text-2xs mt-1 opacity-80",children:l("header.sandboxPermissiveDesc")})]})]}),q==="permissive"&&f.jsx("p",{className:"text-2xs text-status-warning mt-2",children:l("header.sandboxWarning")})]}),H&&f.jsx(ts,{open:!0,onClose:()=>K(!1),size:"sm",children:f.jsxs("div",{className:"bg-theme-card rounded-2xl p-6 shadow-xl",children:[f.jsx("p",{className:"text-sm text-warm-700 mb-4",children:l("header.sandboxWarning")}),f.jsxs("div",{className:"flex justify-end gap-3",children:[f.jsx("button",{onClick:()=>K(!1),className:"btn-ghost text-sm",children:l("header.cancel")}),f.jsx("button",{onClick:()=>{z("permissive"),K(!1)},className:"btn-danger text-sm",children:l("header.sandboxPermissive")})]})]})}),e.is_git_repo?f.jsxs("div",{className:"mt-6 p-4 border border-warm-200 rounded-xl",children:[f.jsx("h4",{className:"text-sm font-semibold text-warm-700 mb-2",children:l("header.worktreeTitle")}),f.jsxs("div",{className:"flex gap-3",children:[f.jsxs("button",{type:"button",onClick:()=>W(!0),className:`flex-1 px-4 py-3 rounded-lg border text-left transition-colors ${G?"bg-status-success/10 border-status-success text-status-success":"bg-warm-50 border-warm-200 text-warm-500 hover:border-warm-300"}`,children:[f.jsx("div",{className:"text-xs font-semibold",children:l("header.worktreeEnabled")}),f.jsx("div",{className:"text-2xs mt-1 opacity-80",children:l("header.worktreeEnabledDesc")})]}),f.jsxs("button",{type:"button",onClick:()=>W(!1),className:`flex-1 px-4 py-3 rounded-lg border text-left transition-colors ${G?"bg-warm-50 border-warm-200 text-warm-500 hover:border-warm-300":"bg-status-warning/10 border-status-warning text-status-warning"}`,children:[f.jsx("div",{className:"text-xs font-semibold",children:l("header.worktreeDisabled")}),f.jsx("div",{className:"text-2xs mt-1 opacity-80",children:l("header.worktreeDisabledDesc")})]})]}),!G&&f.jsx("p",{className:"text-2xs text-status-warning mt-2",children:l("header.worktreeWarning")}),f.jsx("div",{className:"mt-3 pt-3 border-t border-warm-200",children:f.jsxs("label",{className:`flex items-start gap-2 ${G?"cursor-pointer":"opacity-50 cursor-not-allowed"}`,children:[f.jsx("input",{type:"checkbox",checked:Y,disabled:!G,onChange:be=>B(be.target.checked),className:"mt-0.5 rounded"}),f.jsxs("div",{children:[f.jsx("div",{className:"text-xs font-medium text-warm-700",children:l("header.npmAutoInstallLabel")}),f.jsx("div",{className:"text-2xs text-warm-500 mt-0.5",children:l("header.npmAutoInstallHint")})]})]})})]}):null,f.jsxs("div",{className:"mt-6 p-4 border border-warm-200 rounded-xl",children:[f.jsx("h4",{className:"text-sm font-semibold text-warm-700 mb-2",children:l("header.showTokenUsageTitle")}),f.jsx("p",{className:"text-2xs text-warm-500 mb-3",children:l("header.showTokenUsageDesc")}),f.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[f.jsx("input",{type:"checkbox",checked:M,onChange:be=>L(be.target.checked),className:"rounded"}),f.jsx("span",{className:"text-xs text-warm-600",children:l("header.showTokenUsageEnable")})]})]}),f.jsxs("div",{className:"mt-6 p-4 border border-warm-200 rounded-xl",children:[f.jsx("h4",{className:"text-sm font-semibold text-warm-700 mb-2",children:l("header.debugLoggingTitle")}),f.jsx("p",{className:"text-2xs text-warm-500 mb-3",children:l("header.debugLoggingDesc")}),f.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[f.jsx("input",{type:"checkbox",checked:F,onChange:be=>R(be.target.checked),className:"rounded"}),f.jsx("span",{className:"text-xs text-warm-600",children:l("header.debugLoggingEnable")})]})]})]}),h==="plugins"&&f.jsxs(f.Fragment,{children:[uC().map(be=>f.jsx("div",{className:"mt-6",children:f.jsx(be.SettingsComponent,{project:e,config:ce[be.id]||{},onConfigChange:nt=>at(be.id,nt)})},be.id)),f.jsx(Nre,{})]}),!e.is_git_repo&&f.jsxs("div",{className:"mt-5 p-3 bg-status-warning/5 border border-status-warning/20 rounded-xl",children:[f.jsx("p",{className:"text-xs text-warm-600 mb-2",children:l("header.noGitHint")}),f.jsx("button",{onClick:We,disabled:J,className:"btn-ghost text-xs",children:J?"...":l("header.recheckGit")})]}),f.jsxs("div",{className:"flex justify-end gap-3 mt-6",children:[f.jsx("button",{onClick:()=>d(!1),className:"btn-ghost text-sm",children:l("header.cancel")}),f.jsx("button",{onClick:Ne,disabled:U,className:"btn-primary text-sm",children:l(U?"header.saving":"header.save")})]})]})]})}function J2({status:e}){const{t}=Ze(),n={pending:{labelKey:"status.pending",classes:"bg-warm-200 text-warm-500",icon:f.jsx(Jd,{size:10})},running:{labelKey:"status.running",classes:"bg-status-running/10 text-status-running",icon:f.jsx(Ap,{size:10,className:"animate-spin"})},completed:{labelKey:"status.completed",classes:"bg-status-success/10 text-status-success",icon:f.jsx(e8,{size:10})},failed:{labelKey:"status.failed",classes:"bg-status-error/10 text-status-error",icon:f.jsx(t8,{size:10})},stopped:{labelKey:"status.stopped",classes:"bg-status-warning/10 text-status-warning",icon:f.jsx(Lee,{size:10})},merged:{labelKey:"status.merged",classes:"bg-status-merged/10 text-status-merged",icon:f.jsx(Pf,{size:10})}},{labelKey:r,classes:a,icon:i}=n[e];return f.jsxs("span",{className:`badge text-2xs font-semibold ${a}`,children:[i,t(r)]})}function Tre(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Ore=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Mre=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Pre={};function fD(e,t){return(Pre.jsx?Mre:Ore).test(e)}const Dre=/[ \t\n\f\r]/g;function Rre(e){return typeof e=="object"?e.type==="text"?hD(e.value):!1:hD(e)}function hD(e){return e.replace(Dre,"")===""}class Rf{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Rf.prototype.normal={};Rf.prototype.property={};Rf.prototype.space=void 0;function P8(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new Rf(n,r,t)}function pC(e){return e.toLowerCase()}class Mr{constructor(t,n){this.attribute=n,this.property=t}}Mr.prototype.attribute="";Mr.prototype.booleanish=!1;Mr.prototype.boolean=!1;Mr.prototype.commaOrSpaceSeparated=!1;Mr.prototype.commaSeparated=!1;Mr.prototype.defined=!1;Mr.prototype.mustUseProperty=!1;Mr.prototype.number=!1;Mr.prototype.overloadedBoolean=!1;Mr.prototype.property="";Mr.prototype.spaceSeparated=!1;Mr.prototype.space=void 0;let Ire=0;const pt=bl(),On=bl(),gC=bl(),Re=bl(),Zt=bl(),Pu=bl(),Ur=bl();function bl(){return 2**++Ire}const vC=Object.freeze(Object.defineProperty({__proto__:null,boolean:pt,booleanish:On,commaOrSpaceSeparated:Ur,commaSeparated:Pu,number:Re,overloadedBoolean:gC,spaceSeparated:Zt},Symbol.toStringTag,{value:"Module"})),R0=Object.keys(vC);class eN extends Mr{constructor(t,n,r,a){let i=-1;if(super(t,n),mD(this,"space",a),typeof r=="number")for(;++i<R0.length;){const s=R0[i];mD(this,R0[i],(r&vC[s])===vC[s])}}}eN.prototype.defined=!0;function mD(e,t,n){n&&(e[t]=n)}function lc(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const i=new eN(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[pC(r)]=r,n[pC(i.attribute)]=r}return new Rf(t,n,e.space)}const D8=lc({properties:{ariaActiveDescendant:null,ariaAtomic:On,ariaAutoComplete:null,ariaBusy:On,ariaChecked:On,ariaColCount:Re,ariaColIndex:Re,ariaColSpan:Re,ariaControls:Zt,ariaCurrent:null,ariaDescribedBy:Zt,ariaDetails:null,ariaDisabled:On,ariaDropEffect:Zt,ariaErrorMessage:null,ariaExpanded:On,ariaFlowTo:Zt,ariaGrabbed:On,ariaHasPopup:null,ariaHidden:On,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Zt,ariaLevel:Re,ariaLive:null,ariaModal:On,ariaMultiLine:On,ariaMultiSelectable:On,ariaOrientation:null,ariaOwns:Zt,ariaPlaceholder:null,ariaPosInSet:Re,ariaPressed:On,ariaReadOnly:On,ariaRelevant:null,ariaRequired:On,ariaRoleDescription:Zt,ariaRowCount:Re,ariaRowIndex:Re,ariaRowSpan:Re,ariaSelected:On,ariaSetSize:Re,ariaSort:null,ariaValueMax:Re,ariaValueMin:Re,ariaValueNow:Re,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function R8(e,t){return t in e?e[t]:t}function I8(e,t){return R8(e,t.toLowerCase())}const Lre=lc({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Pu,acceptCharset:Zt,accessKey:Zt,action:null,allow:null,allowFullScreen:pt,allowPaymentRequest:pt,allowUserMedia:pt,alt:null,as:null,async:pt,autoCapitalize:null,autoComplete:Zt,autoFocus:pt,autoPlay:pt,blocking:Zt,capture:null,charSet:null,checked:pt,cite:null,className:Zt,cols:Re,colSpan:null,content:null,contentEditable:On,controls:pt,controlsList:Zt,coords:Re|Pu,crossOrigin:null,data:null,dateTime:null,decoding:null,default:pt,defer:pt,dir:null,dirName:null,disabled:pt,download:gC,draggable:On,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:pt,formTarget:null,headers:Zt,height:Re,hidden:gC,high:Re,href:null,hrefLang:null,htmlFor:Zt,httpEquiv:Zt,id:null,imageSizes:null,imageSrcSet:null,inert:pt,inputMode:null,integrity:null,is:null,isMap:pt,itemId:null,itemProp:Zt,itemRef:Zt,itemScope:pt,itemType:Zt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:pt,low:Re,manifest:null,max:null,maxLength:Re,media:null,method:null,min:null,minLength:Re,multiple:pt,muted:pt,name:null,nonce:null,noModule:pt,noValidate:pt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:pt,optimum:Re,pattern:null,ping:Zt,placeholder:null,playsInline:pt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:pt,referrerPolicy:null,rel:Zt,required:pt,reversed:pt,rows:Re,rowSpan:Re,sandbox:Zt,scope:null,scoped:pt,seamless:pt,selected:pt,shadowRootClonable:pt,shadowRootDelegatesFocus:pt,shadowRootMode:null,shape:null,size:Re,sizes:null,slot:null,span:Re,spellCheck:On,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Re,step:null,style:null,tabIndex:Re,target:null,title:null,translate:null,type:null,typeMustMatch:pt,useMap:null,value:On,width:Re,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Zt,axis:null,background:null,bgColor:null,border:Re,borderColor:null,bottomMargin:Re,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:pt,declare:pt,event:null,face:null,frame:null,frameBorder:null,hSpace:Re,leftMargin:Re,link:null,longDesc:null,lowSrc:null,marginHeight:Re,marginWidth:Re,noResize:pt,noHref:pt,noShade:pt,noWrap:pt,object:null,profile:null,prompt:null,rev:null,rightMargin:Re,rules:null,scheme:null,scrolling:On,standby:null,summary:null,text:null,topMargin:Re,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Re,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:pt,disableRemotePlayback:pt,prefix:null,property:null,results:Re,security:null,unselectable:null},space:"html",transform:I8}),zre=lc({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",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",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",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",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",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",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Ur,accentHeight:Re,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Re,amplitude:Re,arabicForm:null,ascent:Re,attributeName:null,attributeType:null,azimuth:Re,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Re,by:null,calcMode:null,capHeight:Re,className:Zt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Re,diffuseConstant:Re,direction:null,display:null,dur:null,divisor:Re,dominantBaseline:null,download:pt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Re,enableBackground:null,end:null,event:null,exponent:Re,externalResourcesRequired:null,fill:null,fillOpacity:Re,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Pu,g2:Pu,glyphName:Pu,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Re,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Re,horizOriginX:Re,horizOriginY:Re,id:null,ideographic:Re,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Re,k:Re,k1:Re,k2:Re,k3:Re,k4:Re,kernelMatrix:Ur,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Re,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Re,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Re,overlineThickness:Re,paintOrder:null,panose1:null,path:null,pathLength:Re,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Zt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Re,pointsAtY:Re,pointsAtZ:Re,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ur,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ur,rev:Ur,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ur,requiredFeatures:Ur,requiredFonts:Ur,requiredFormats:Ur,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Re,specularExponent:Re,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Re,strikethroughThickness:Re,string:null,stroke:null,strokeDashArray:Ur,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Re,strokeOpacity:Re,strokeWidth:null,style:null,surfaceScale:Re,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ur,tabIndex:Re,tableValues:null,target:null,targetX:Re,targetY:Re,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ur,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Re,underlineThickness:Re,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Re,values:null,vAlphabetic:Re,vMathematical:Re,vectorEffect:null,vHanging:Re,vIdeographic:Re,version:null,vertAdvY:Re,vertOriginX:Re,vertOriginY:Re,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Re,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:R8}),L8=lc({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),z8=lc({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:I8}),$8=lc({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),$re={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},qre=/[A-Z]/g,pD=/-[a-z]/g,Bre=/^data[-\w.:]+$/i;function Fre(e,t){const n=pC(t);let r=t,a=Mr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Bre.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(pD,Ure);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!pD.test(i)){let s=i.replace(qre,Hre);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}a=eN}return new a(r,t)}function Hre(e){return"-"+e.toLowerCase()}function Ure(e){return e.charAt(1).toUpperCase()}const Gre=P8([D8,Lre,L8,z8,$8],"html"),tN=P8([D8,zre,L8,z8,$8],"svg");function Vre(e){return e.join(" ").trim()}var pu={},I0,gD;function Kre(){if(gD)return I0;gD=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,l=/^\s+|\s+$/g,c=`
|
|
452
|
+
`,d="/",h="*",m="",g="comment",v="declaration";function b(S,j){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];j=j||{};var _=1,k=1;function E(R){var M=R.match(t);M&&(_+=M.length);var L=R.lastIndexOf(c);k=~L?R.length-L:k+R.length}function T(){var R={line:_,column:k};return function(M){return M.position=new A(R),P(),M}}function A(R){this.start=R,this.end={line:_,column:k},this.source=j.source}A.prototype.content=S;function O(R){var M=new Error(j.source+":"+_+":"+k+": "+R);if(M.reason=R,M.filename=j.source,M.line=_,M.column=k,M.source=S,!j.silent)throw M}function I(R){var M=R.exec(S);if(M){var L=M[0];return E(L),S=S.slice(L.length),M}}function P(){I(n)}function D(R){var M;for(R=R||[];M=q();)M!==!1&&R.push(M);return R}function q(){var R=T();if(!(d!=S.charAt(0)||h!=S.charAt(1))){for(var M=2;m!=S.charAt(M)&&(h!=S.charAt(M)||d!=S.charAt(M+1));)++M;if(M+=2,m===S.charAt(M-1))return O("End of comment missing");var L=S.slice(2,M-2);return k+=2,E(L),S=S.slice(M),k+=2,R({type:g,comment:L})}}function z(){var R=T(),M=I(r);if(M){if(q(),!I(a))return O("property missing ':'");var L=I(i),G=R({type:v,property:w(M[0].replace(e,m)),value:L?w(L[0].replace(e,m)):m});return I(s),G}}function F(){var R=[];D(R);for(var M;M=z();)M!==!1&&(R.push(M),D(R));return R}return P(),F()}function w(S){return S?S.replace(l,m):m}return I0=b,I0}var vD;function Wre(){if(vD)return pu;vD=1;var e=pu&&pu.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(pu,"__esModule",{value:!0}),pu.default=n;const t=e(Kre());function n(r,a){let i=null;if(!r||typeof r!="string")return i;const s=(0,t.default)(r),l=typeof a=="function";return s.forEach(c=>{if(c.type!=="declaration")return;const{property:d,value:h}=c;l?a(d,h,c):h&&(i=i||{},i[d]=h)}),i}return pu}var gd={},yD;function Yre(){if(yD)return gd;yD=1,Object.defineProperty(gd,"__esModule",{value:!0}),gd.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,i=function(d){return!d||n.test(d)||e.test(d)},s=function(d,h){return h.toUpperCase()},l=function(d,h){return"".concat(h,"-")},c=function(d,h){return h===void 0&&(h={}),i(d)?d:(d=d.toLowerCase(),h.reactCompat?d=d.replace(a,l):d=d.replace(r,l),d.replace(t,s))};return gd.camelCase=c,gd}var vd,xD;function Xre(){if(xD)return vd;xD=1;var e=vd&&vd.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(Wre()),n=Yre();function r(a,i){var s={};return!a||typeof a!="string"||(0,t.default)(a,function(l,c){l&&c&&(s[(0,n.camelCase)(l,i)]=c)}),s}return r.default=r,vd=r,vd}var Zre=Xre();const Qre=ta(Zre),q8=B8("end"),nN=B8("start");function B8(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Jre(e){const t=nN(e),n=q8(e);if(t&&n)return{start:t,end:n}}function Ud(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?bD(e.position):"start"in e||"end"in e?bD(e):"line"in e||"column"in e?yC(e):""}function yC(e){return wD(e&&e.line)+":"+wD(e&&e.column)}function bD(e){return yC(e&&e.start)+"-"+yC(e&&e.end)}function wD(e){return e&&typeof e=="number"?e:1}class fr extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let a="",i={},s=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?a=t:!i.cause&&t&&(s=!0,a=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?i.ruleId=r:(i.source=r.slice(0,c),i.ruleId=r.slice(c+1))}if(!i.place&&i.ancestors&&i.ancestors){const c=i.ancestors[i.ancestors.length-1];c&&(i.place=c.position)}const l=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=l?l.line:void 0,this.name=Ud(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=s&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}fr.prototype.file="";fr.prototype.name="";fr.prototype.reason="";fr.prototype.message="";fr.prototype.stack="";fr.prototype.column=void 0;fr.prototype.line=void 0;fr.prototype.ancestors=void 0;fr.prototype.cause=void 0;fr.prototype.fatal=void 0;fr.prototype.place=void 0;fr.prototype.ruleId=void 0;fr.prototype.source=void 0;const rN={}.hasOwnProperty,eae=new Map,tae=/[A-Z]/g,nae=new Set(["table","tbody","thead","tfoot","tr"]),rae=new Set(["td","th"]),F8="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function aae(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=fae(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=dae(n,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?tN:Gre,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=H8(a,e,void 0);return i&&typeof i!="string"?i:a.create(e,a.Fragment,{children:i||void 0},void 0)}function H8(e,t,n){if(t.type==="element")return iae(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return sae(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return lae(e,t,n);if(t.type==="mdxjsEsm")return oae(e,t);if(t.type==="root")return uae(e,t,n);if(t.type==="text")return cae(e,t)}function iae(e,t,n){const r=e.schema;let a=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(a=tN,e.schema=a),e.ancestors.push(t);const i=G8(e,t.tagName,!1),s=hae(e,t);let l=iN(e,t);return nae.has(t.tagName)&&(l=l.filter(function(c){return typeof c=="string"?!Rre(c):!0})),U8(e,s,i,t),aN(s,l),e.ancestors.pop(),e.schema=r,e.create(t,i,s,n)}function sae(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}af(e,t.position)}function oae(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);af(e,t.position)}function lae(e,t,n){const r=e.schema;let a=r;t.name==="svg"&&r.space==="html"&&(a=tN,e.schema=a),e.ancestors.push(t);const i=t.name===null?e.Fragment:G8(e,t.name,!0),s=mae(e,t),l=iN(e,t);return U8(e,s,i,t),aN(s,l),e.ancestors.pop(),e.schema=r,e.create(t,i,s,n)}function uae(e,t,n){const r={};return aN(r,iN(e,t)),e.create(t,e.Fragment,r,n)}function cae(e,t){return t.value}function U8(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function aN(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function dae(e,t,n){return r;function r(a,i,s,l){const d=Array.isArray(s.children)?n:t;return l?d(i,s,l):d(i,s)}}function fae(e,t){return n;function n(r,a,i,s){const l=Array.isArray(i.children),c=nN(r);return t(a,i,s,l,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function hae(e,t){const n={};let r,a;for(a in t.properties)if(a!=="children"&&rN.call(t.properties,a)){const i=pae(e,a,t.properties[a]);if(i){const[s,l]=i;e.tableCellAlignToStyle&&s==="align"&&typeof l=="string"&&rae.has(t.tagName)?r=l:n[s]=l}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function mae(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const s=i.expression;s.type;const l=s.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else af(e,t.position);else{const a=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,i=e.evaluater.evaluateExpression(l.expression)}else af(e,t.position);else i=r.value===null?!0:r.value;n[a]=i}return n}function iN(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:eae;for(;++r<t.children.length;){const i=t.children[r];let s;if(e.passKeys){const c=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(c){const d=a.get(c)||0;s=c+"-"+d,a.set(c,d+1)}}const l=H8(e,i,s);l!==void 0&&n.push(l)}return n}function pae(e,t,n){const r=Fre(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Tre(n):Vre(n)),r.property==="style"){let a=typeof n=="object"?n:gae(e,String(n));return e.stylePropertyNameCase==="css"&&(a=vae(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&r.space?$re[r.property]||r.property:r.attribute,n]}}function gae(e,t){try{return Qre(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,a=new fr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=F8+"#cannot-parse-style-attribute",a}}function G8(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let i=-1,s;for(;++i<a.length;){const l=fD(a[i])?{type:"Identifier",name:a[i]}:{type:"Literal",value:a[i]};s=s?{type:"MemberExpression",object:s,property:l,computed:!!(i&&l.type==="Literal"),optional:!1}:l}r=s}else r=fD(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const a=r.value;return rN.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(r);af(e)}function af(e,t){const n=new fr("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=F8+"#cannot-handle-mdx-estrees-without-createevaluater",n}function vae(e){const t={};let n;for(n in e)rN.call(e,n)&&(t[yae(n)]=e[n]);return t}function yae(e){let t=e.replace(tae,xae);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function xae(e){return"-"+e.toLowerCase()}const L0={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},bae={};function sN(e,t){const n=bae,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return V8(e,r,a)}function V8(e,t,n){if(wae(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return SD(e.children,t,n)}return Array.isArray(e)?SD(e,t,n):""}function SD(e,t,n){const r=[];let a=-1;for(;++a<e.length;)r[a]=V8(e[a],t,n);return r.join("")}function wae(e){return!!(e&&typeof e=="object")}const jD=document.createElement("i");function oN(e){const t="&"+e+";";jD.innerHTML=t;const n=jD.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Yr(e,t,n,r){const a=e.length;let i=0,s;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);i<r.length;)s=r.slice(i,i+1e4),s.unshift(t,0),e.splice(...s),i+=1e4,t+=1e4}function ma(e,t){return e.length>0?(Yr(e,e.length,0,t),e):t}const kD={}.hasOwnProperty;function K8(e){const t={};let n=-1;for(;++n<e.length;)Sae(t,e[n]);return t}function Sae(e,t){let n;for(n in t){const a=(kD.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let s;if(i)for(s in i){kD.call(a,s)||(a[s]=[]);const l=i[s];jae(a[s],Array.isArray(l)?l:l?[l]:[])}}}function jae(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Yr(e,0,0,r)}function W8(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Ra(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const vr=lo(/[A-Za-z]/),cr=lo(/[\dA-Za-z]/),kae=lo(/[#-'*+\--9=?A-Z^-~]/);function Tp(e){return e!==null&&(e<32||e===127)}const xC=lo(/\d/),_ae=lo(/[\dA-Fa-f]/),Cae=lo(/[!-/:-@[-`{-~]/);function rt(e){return e!==null&&e<-2}function Xt(e){return e!==null&&(e<0||e===32)}function wt(e){return e===-2||e===-1||e===32}const Gg=lo(new RegExp("\\p{P}|\\p{S}","u")),nl=lo(/\s/);function lo(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function uc(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const i=e.charCodeAt(n);let s="";if(i===37&&cr(e.charCodeAt(n+1))&&cr(e.charCodeAt(n+2)))a=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(s=String.fromCharCode(i));else if(i>55295&&i<57344){const l=e.charCodeAt(n+1);i<56320&&l>56319&&l<57344?(s=String.fromCharCode(i,l),a=1):s="�"}else s=String.fromCharCode(i);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+a+1,s=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}function Tt(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let i=0;return s;function s(c){return wt(c)?(e.enter(n),l(c)):t(c)}function l(c){return wt(c)&&i++<a?(e.consume(c),l):(e.exit(n),t(c))}}const Nae={tokenize:Eae};function Eae(e){const t=e.attempt(this.parser.constructs.contentInitial,r,a);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Tt(e,t,"linePrefix")}function a(l){return e.enter("paragraph"),i(l)}function i(l){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,s(l)}function s(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return rt(l)?(e.consume(l),e.exit("chunkText"),i):(e.consume(l),s)}}const Aae={tokenize:Tae},_D={tokenize:Oae};function Tae(e){const t=this,n=[];let r=0,a,i,s;return l;function l(k){if(r<n.length){const E=n[r];return t.containerState=E[1],e.attempt(E[0].continuation,c,d)(k)}return d(k)}function c(k){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&_();const E=t.events.length;let T=E,A;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){A=t.events[T][1].end;break}j(r);let O=E;for(;O<t.events.length;)t.events[O][1].end={...A},O++;return Yr(t.events,T+1,0,t.events.slice(E)),t.events.length=O,d(k)}return l(k)}function d(k){if(r===n.length){if(!a)return g(k);if(a.currentConstruct&&a.currentConstruct.concrete)return b(k);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(_D,h,m)(k)}function h(k){return a&&_(),j(r),g(k)}function m(k){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,b(k)}function g(k){return t.containerState={},e.attempt(_D,v,b)(k)}function v(k){return r++,n.push([t.currentConstruct,t.containerState]),g(k)}function b(k){if(k===null){a&&_(),j(0),e.consume(k);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:i}),w(k)}function w(k){if(k===null){S(e.exit("chunkFlow"),!0),j(0),e.consume(k);return}return rt(k)?(e.consume(k),S(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(k),w)}function S(k,E){const T=t.sliceStream(k);if(E&&T.push(null),k.previous=i,i&&(i.next=k),i=k,a.defineSkip(k.start),a.write(T),t.parser.lazy[k.start.line]){let A=a.events.length;for(;A--;)if(a.events[A][1].start.offset<s&&(!a.events[A][1].end||a.events[A][1].end.offset>s))return;const O=t.events.length;let I=O,P,D;for(;I--;)if(t.events[I][0]==="exit"&&t.events[I][1].type==="chunkFlow"){if(P){D=t.events[I][1].end;break}P=!0}for(j(r),A=O;A<t.events.length;)t.events[A][1].end={...D},A++;Yr(t.events,I+1,0,t.events.slice(O)),t.events.length=A}}function j(k){let E=n.length;for(;E-- >k;){const T=n[E];t.containerState=T[1],T[0].exit.call(t,e)}n.length=k}function _(){a.write([null]),i=void 0,a=void 0,t.containerState._closeFlow=void 0}}function Oae(e,t,n){return Tt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function qu(e){if(e===null||Xt(e)||nl(e))return 1;if(Gg(e))return 2}function Vg(e,t,n){const r=[];let a=-1;for(;++a<e.length;){const i=e[a].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const bC={name:"attention",resolveAll:Mae,tokenize:Pae};function Mae(e,t){let n=-1,r,a,i,s,l,c,d,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m={...e[r][1].end},g={...e[n][1].start};CD(m,-c),CD(g,c),s={type:c>1?"strongSequence":"emphasisSequence",start:m,end:{...e[r][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:g},i={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},a={type:c>1?"strong":"emphasis",start:{...s.start},end:{...l.end}},e[r][1].end={...s.start},e[n][1].start={...l.end},d=[],e[r][1].end.offset-e[r][1].start.offset&&(d=ma(d,[["enter",e[r][1],t],["exit",e[r][1],t]])),d=ma(d,[["enter",a,t],["enter",s,t],["exit",s,t],["enter",i,t]]),d=ma(d,Vg(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),d=ma(d,[["exit",i,t],["enter",l,t],["exit",l,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,d=ma(d,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,Yr(e,r-1,n-r+3,d),n=r+d.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Pae(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,a=qu(r);let i;return s;function s(c){return i=c,e.enter("attentionSequence"),l(c)}function l(c){if(c===i)return e.consume(c),l;const d=e.exit("attentionSequence"),h=qu(c),m=!h||h===2&&a||n.includes(c),g=!a||a===2&&h||n.includes(r);return d._open=!!(i===42?m:m&&(a||!g)),d._close=!!(i===42?g:g&&(h||!m)),t(c)}}function CD(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Dae={name:"autolink",tokenize:Rae};function Rae(e,t,n){let r=0;return a;function a(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(v){return vr(v)?(e.consume(v),s):v===64?n(v):d(v)}function s(v){return v===43||v===45||v===46||cr(v)?(r=1,l(v)):d(v)}function l(v){return v===58?(e.consume(v),r=0,c):(v===43||v===45||v===46||cr(v))&&r++<32?(e.consume(v),l):(r=0,d(v))}function c(v){return v===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):v===null||v===32||v===60||Tp(v)?n(v):(e.consume(v),c)}function d(v){return v===64?(e.consume(v),h):kae(v)?(e.consume(v),d):n(v)}function h(v){return cr(v)?m(v):n(v)}function m(v){return v===46?(e.consume(v),r=0,h):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):g(v)}function g(v){if((v===45||cr(v))&&r++<63){const b=v===45?g:m;return e.consume(v),b}return n(v)}}const If={partial:!0,tokenize:Iae};function Iae(e,t,n){return r;function r(i){return wt(i)?Tt(e,a,"linePrefix")(i):a(i)}function a(i){return i===null||rt(i)?t(i):n(i)}}const Y8={continuation:{tokenize:zae},exit:$ae,name:"blockQuote",tokenize:Lae};function Lae(e,t,n){const r=this;return a;function a(s){if(s===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),i}return n(s)}function i(s){return wt(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function zae(e,t,n){const r=this;return a;function a(s){return wt(s)?Tt(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):i(s)}function i(s){return e.attempt(Y8,t,n)(s)}}function $ae(e){e.exit("blockQuote")}const X8={name:"characterEscape",tokenize:qae};function qae(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),a}function a(i){return Cae(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const Z8={name:"characterReference",tokenize:Bae};function Bae(e,t,n){const r=this;let a=0,i,s;return l;function l(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),c}function c(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),d):(e.enter("characterReferenceValue"),i=31,s=cr,h(m))}function d(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,s=_ae,h):(e.enter("characterReferenceValue"),i=7,s=xC,h(m))}function h(m){if(m===59&&a){const g=e.exit("characterReferenceValue");return s===cr&&!oN(r.sliceSerialize(g))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(m)&&a++<i?(e.consume(m),h):n(m)}}const ND={partial:!0,tokenize:Hae},ED={concrete:!0,name:"codeFenced",tokenize:Fae};function Fae(e,t,n){const r=this,a={partial:!0,tokenize:T};let i=0,s=0,l;return c;function c(A){return d(A)}function d(A){const O=r.events[r.events.length-1];return i=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,l=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(A)}function h(A){return A===l?(s++,e.consume(A),h):s<3?n(A):(e.exit("codeFencedFenceSequence"),wt(A)?Tt(e,m,"whitespace")(A):m(A))}function m(A){return A===null||rt(A)?(e.exit("codeFencedFence"),r.interrupt?t(A):e.check(ND,w,E)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),g(A))}function g(A){return A===null||rt(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(A)):wt(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Tt(e,v,"whitespace")(A)):A===96&&A===l?n(A):(e.consume(A),g)}function v(A){return A===null||rt(A)?m(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(A))}function b(A){return A===null||rt(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(A)):A===96&&A===l?n(A):(e.consume(A),b)}function w(A){return e.attempt(a,E,S)(A)}function S(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),j}function j(A){return i>0&&wt(A)?Tt(e,_,"linePrefix",i+1)(A):_(A)}function _(A){return A===null||rt(A)?e.check(ND,w,E)(A):(e.enter("codeFlowValue"),k(A))}function k(A){return A===null||rt(A)?(e.exit("codeFlowValue"),_(A)):(e.consume(A),k)}function E(A){return e.exit("codeFenced"),t(A)}function T(A,O,I){let P=0;return D;function D(M){return A.enter("lineEnding"),A.consume(M),A.exit("lineEnding"),q}function q(M){return A.enter("codeFencedFence"),wt(M)?Tt(A,z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):z(M)}function z(M){return M===l?(A.enter("codeFencedFenceSequence"),F(M)):I(M)}function F(M){return M===l?(P++,A.consume(M),F):P>=s?(A.exit("codeFencedFenceSequence"),wt(M)?Tt(A,R,"whitespace")(M):R(M)):I(M)}function R(M){return M===null||rt(M)?(A.exit("codeFencedFence"),O(M)):I(M)}}}function Hae(e,t,n){const r=this;return a;function a(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i)}function i(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const z0={name:"codeIndented",tokenize:Gae},Uae={partial:!0,tokenize:Vae};function Gae(e,t,n){const r=this;return a;function a(d){return e.enter("codeIndented"),Tt(e,i,"linePrefix",5)(d)}function i(d){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?s(d):n(d)}function s(d){return d===null?c(d):rt(d)?e.attempt(Uae,s,c)(d):(e.enter("codeFlowValue"),l(d))}function l(d){return d===null||rt(d)?(e.exit("codeFlowValue"),s(d)):(e.consume(d),l)}function c(d){return e.exit("codeIndented"),t(d)}}function Vae(e,t,n){const r=this;return a;function a(s){return r.parser.lazy[r.now().line]?n(s):rt(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):Tt(e,i,"linePrefix",5)(s)}function i(s){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):rt(s)?a(s):n(s)}}const Kae={name:"codeText",previous:Yae,resolve:Wae,tokenize:Xae};function Wae(e){let t=e.length-4,n=3,r,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)a===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(a=r):(r===t||e[r][1].type==="lineEnding")&&(e[a][1].type="codeTextData",r!==a+2&&(e[a][1].end=e[r-1][1].end,e.splice(a+2,r-a-2),t-=r-a-2,r=a+2),a=void 0);return e}function Yae(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Xae(e,t,n){let r=0,a,i;return s;function s(m){return e.enter("codeText"),e.enter("codeTextSequence"),l(m)}function l(m){return m===96?(e.consume(m),r++,l):(e.exit("codeTextSequence"),c(m))}function c(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),c):m===96?(i=e.enter("codeTextSequence"),a=0,h(m)):rt(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),c):(e.enter("codeTextData"),d(m))}function d(m){return m===null||m===32||m===96||rt(m)?(e.exit("codeTextData"),c(m)):(e.consume(m),d)}function h(m){return m===96?(e.consume(m),a++,h):a===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(i.type="codeTextData",d(m))}}class Zae{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const a=n||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return r&&yd(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),yd(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),yd(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);yd(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);yd(this.left,n.reverse())}}}function yd(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Q8(e){const t={};let n=-1,r,a,i,s,l,c,d;const h=new Zae(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,i=0,i<c.length&&c[i][1].type==="lineEndingBlank"&&(i+=2),i<c.length&&c[i][1].type==="content"))for(;++i<c.length&&c[i][1].type!=="content";)c[i][1].type==="chunkText"&&(c[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Qae(h,n)),n=t[n],d=!0);else if(r[1]._container){for(i=n,a=void 0;i--;)if(s=h.get(i),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(a&&(h.get(a)[1].type="lineEndingBlank"),s[1].type="lineEnding",a=i);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;a&&(r[1].end={...h.get(a)[1].start},l=h.slice(a,n),l.unshift(r),h.splice(a,n-a+1,l))}}return Yr(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!d}function Qae(e,t){const n=e.get(t)[1],r=e.get(t)[2];let a=t-1;const i=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const l=s.events,c=[],d={};let h,m,g=-1,v=n,b=0,w=0;const S=[w];for(;v;){for(;e.get(++a)[1]!==v;);i.push(a),v._tokenizer||(h=r.sliceStream(v),v.next||h.push(null),m&&s.defineSkip(v.start),v._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(h),v._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),m=v,v=v.next}for(v=n;++g<l.length;)l[g][0]==="exit"&&l[g-1][0]==="enter"&&l[g][1].type===l[g-1][1].type&&l[g][1].start.line!==l[g][1].end.line&&(w=g+1,S.push(w),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(s.events=[],v?(v._tokenizer=void 0,v.previous=void 0):S.pop(),g=S.length;g--;){const j=l.slice(S[g],S[g+1]),_=i.pop();c.push([_,_+j.length-1]),e.splice(_,2,j)}for(c.reverse(),g=-1;++g<c.length;)d[b+c[g][0]]=b+c[g][1],b+=c[g][1]-c[g][0]-1;return d}const Jae={resolve:tie,tokenize:nie},eie={partial:!0,tokenize:rie};function tie(e){return Q8(e),e}function nie(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),a(l)}function a(l){return l===null?i(l):rt(l)?e.check(eie,s,i)(l):(e.consume(l),a)}function i(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function s(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,a}}function rie(e,t,n){const r=this;return a;function a(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Tt(e,i,"linePrefix")}function i(s){if(s===null||rt(s))return n(s);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function J8(e,t,n,r,a,i,s,l,c){const d=c||Number.POSITIVE_INFINITY;let h=0;return m;function m(j){return j===60?(e.enter(r),e.enter(a),e.enter(i),e.consume(j),e.exit(i),g):j===null||j===32||j===41||Tp(j)?n(j):(e.enter(r),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),w(j))}function g(j){return j===62?(e.enter(i),e.consume(j),e.exit(i),e.exit(a),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),v(j))}function v(j){return j===62?(e.exit("chunkString"),e.exit(l),g(j)):j===null||j===60||rt(j)?n(j):(e.consume(j),j===92?b:v)}function b(j){return j===60||j===62||j===92?(e.consume(j),v):v(j)}function w(j){return!h&&(j===null||j===41||Xt(j))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(r),t(j)):h<d&&j===40?(e.consume(j),h++,w):j===41?(e.consume(j),h--,w):j===null||j===32||j===40||Tp(j)?n(j):(e.consume(j),j===92?S:w)}function S(j){return j===40||j===41||j===92?(e.consume(j),w):w(j)}}function eH(e,t,n,r,a,i){const s=this;let l=0,c;return d;function d(v){return e.enter(r),e.enter(a),e.consume(v),e.exit(a),e.enter(i),h}function h(v){return l>999||v===null||v===91||v===93&&!c||v===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(v):v===93?(e.exit(i),e.enter(a),e.consume(v),e.exit(a),e.exit(r),t):rt(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),m(v))}function m(v){return v===null||v===91||v===93||rt(v)||l++>999?(e.exit("chunkString"),h(v)):(e.consume(v),c||(c=!wt(v)),v===92?g:m)}function g(v){return v===91||v===92||v===93?(e.consume(v),l++,m):m(v)}}function tH(e,t,n,r,a,i){let s;return l;function l(g){return g===34||g===39||g===40?(e.enter(r),e.enter(a),e.consume(g),e.exit(a),s=g===40?41:g,c):n(g)}function c(g){return g===s?(e.enter(a),e.consume(g),e.exit(a),e.exit(r),t):(e.enter(i),d(g))}function d(g){return g===s?(e.exit(i),c(s)):g===null?n(g):rt(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),Tt(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===s||g===null||rt(g)?(e.exit("chunkString"),d(g)):(e.consume(g),g===92?m:h)}function m(g){return g===s||g===92?(e.consume(g),h):h(g)}}function Gd(e,t){let n;return r;function r(a){return rt(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r):wt(a)?Tt(e,r,n?"linePrefix":"lineSuffix")(a):t(a)}}const aie={name:"definition",tokenize:sie},iie={partial:!0,tokenize:oie};function sie(e,t,n){const r=this;let a;return i;function i(v){return e.enter("definition"),s(v)}function s(v){return eH.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function l(v){return a=Ra(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),c):n(v)}function c(v){return Xt(v)?Gd(e,d)(v):d(v)}function d(v){return J8(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function h(v){return e.attempt(iie,m,m)(v)}function m(v){return wt(v)?Tt(e,g,"whitespace")(v):g(v)}function g(v){return v===null||rt(v)?(e.exit("definition"),r.parser.defined.push(a),t(v)):n(v)}}function oie(e,t,n){return r;function r(l){return Xt(l)?Gd(e,a)(l):n(l)}function a(l){return tH(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function i(l){return wt(l)?Tt(e,s,"whitespace")(l):s(l)}function s(l){return l===null||rt(l)?t(l):n(l)}}const lie={name:"hardBreakEscape",tokenize:uie};function uie(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),a}function a(i){return rt(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const cie={name:"headingAtx",resolve:die,tokenize:fie};function die(e,t){let n=e.length-2,r=3,a,i;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(a={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Yr(e,r,n-r+1,[["enter",a,t],["enter",i,t],["exit",i,t],["exit",a,t]])),e}function fie(e,t,n){let r=0;return a;function a(h){return e.enter("atxHeading"),i(h)}function i(h){return e.enter("atxHeadingSequence"),s(h)}function s(h){return h===35&&r++<6?(e.consume(h),s):h===null||Xt(h)?(e.exit("atxHeadingSequence"),l(h)):n(h)}function l(h){return h===35?(e.enter("atxHeadingSequence"),c(h)):h===null||rt(h)?(e.exit("atxHeading"),t(h)):wt(h)?Tt(e,l,"whitespace")(h):(e.enter("atxHeadingText"),d(h))}function c(h){return h===35?(e.consume(h),c):(e.exit("atxHeadingSequence"),l(h))}function d(h){return h===null||h===35||Xt(h)?(e.exit("atxHeadingText"),l(h)):(e.consume(h),d)}}const hie=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],AD=["pre","script","style","textarea"],mie={concrete:!0,name:"htmlFlow",resolveTo:vie,tokenize:yie},pie={partial:!0,tokenize:bie},gie={partial:!0,tokenize:xie};function vie(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function yie(e,t,n){const r=this;let a,i,s,l,c;return d;function d(U){return h(U)}function h(U){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(U),m}function m(U){return U===33?(e.consume(U),g):U===47?(e.consume(U),i=!0,w):U===63?(e.consume(U),a=3,r.interrupt?t:B):vr(U)?(e.consume(U),s=String.fromCharCode(U),S):n(U)}function g(U){return U===45?(e.consume(U),a=2,v):U===91?(e.consume(U),a=5,l=0,b):vr(U)?(e.consume(U),a=4,r.interrupt?t:B):n(U)}function v(U){return U===45?(e.consume(U),r.interrupt?t:B):n(U)}function b(U){const X="CDATA[";return U===X.charCodeAt(l++)?(e.consume(U),l===X.length?r.interrupt?t:z:b):n(U)}function w(U){return vr(U)?(e.consume(U),s=String.fromCharCode(U),S):n(U)}function S(U){if(U===null||U===47||U===62||Xt(U)){const X=U===47,J=s.toLowerCase();return!X&&!i&&AD.includes(J)?(a=1,r.interrupt?t(U):z(U)):hie.includes(s.toLowerCase())?(a=6,X?(e.consume(U),j):r.interrupt?t(U):z(U)):(a=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(U):i?_(U):k(U))}return U===45||cr(U)?(e.consume(U),s+=String.fromCharCode(U),S):n(U)}function j(U){return U===62?(e.consume(U),r.interrupt?t:z):n(U)}function _(U){return wt(U)?(e.consume(U),_):D(U)}function k(U){return U===47?(e.consume(U),D):U===58||U===95||vr(U)?(e.consume(U),E):wt(U)?(e.consume(U),k):D(U)}function E(U){return U===45||U===46||U===58||U===95||cr(U)?(e.consume(U),E):T(U)}function T(U){return U===61?(e.consume(U),A):wt(U)?(e.consume(U),T):k(U)}function A(U){return U===null||U===60||U===61||U===62||U===96?n(U):U===34||U===39?(e.consume(U),c=U,O):wt(U)?(e.consume(U),A):I(U)}function O(U){return U===c?(e.consume(U),c=null,P):U===null||rt(U)?n(U):(e.consume(U),O)}function I(U){return U===null||U===34||U===39||U===47||U===60||U===61||U===62||U===96||Xt(U)?T(U):(e.consume(U),I)}function P(U){return U===47||U===62||wt(U)?k(U):n(U)}function D(U){return U===62?(e.consume(U),q):n(U)}function q(U){return U===null||rt(U)?z(U):wt(U)?(e.consume(U),q):n(U)}function z(U){return U===45&&a===2?(e.consume(U),L):U===60&&a===1?(e.consume(U),G):U===62&&a===4?(e.consume(U),H):U===63&&a===3?(e.consume(U),B):U===93&&a===5?(e.consume(U),Y):rt(U)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(pie,K,F)(U)):U===null||rt(U)?(e.exit("htmlFlowData"),F(U)):(e.consume(U),z)}function F(U){return e.check(gie,R,K)(U)}function R(U){return e.enter("lineEnding"),e.consume(U),e.exit("lineEnding"),M}function M(U){return U===null||rt(U)?F(U):(e.enter("htmlFlowData"),z(U))}function L(U){return U===45?(e.consume(U),B):z(U)}function G(U){return U===47?(e.consume(U),s="",W):z(U)}function W(U){if(U===62){const X=s.toLowerCase();return AD.includes(X)?(e.consume(U),H):z(U)}return vr(U)&&s.length<8?(e.consume(U),s+=String.fromCharCode(U),W):z(U)}function Y(U){return U===93?(e.consume(U),B):z(U)}function B(U){return U===62?(e.consume(U),H):U===45&&a===2?(e.consume(U),B):z(U)}function H(U){return U===null||rt(U)?(e.exit("htmlFlowData"),K(U)):(e.consume(U),H)}function K(U){return e.exit("htmlFlow"),t(U)}}function xie(e,t,n){const r=this;return a;function a(s){return rt(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):n(s)}function i(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function bie(e,t,n){return r;function r(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(If,t,n)}}const wie={name:"htmlText",tokenize:Sie};function Sie(e,t,n){const r=this;let a,i,s;return l;function l(B){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(B),c}function c(B){return B===33?(e.consume(B),d):B===47?(e.consume(B),T):B===63?(e.consume(B),k):vr(B)?(e.consume(B),I):n(B)}function d(B){return B===45?(e.consume(B),h):B===91?(e.consume(B),i=0,b):vr(B)?(e.consume(B),_):n(B)}function h(B){return B===45?(e.consume(B),v):n(B)}function m(B){return B===null?n(B):B===45?(e.consume(B),g):rt(B)?(s=m,G(B)):(e.consume(B),m)}function g(B){return B===45?(e.consume(B),v):m(B)}function v(B){return B===62?L(B):B===45?g(B):m(B)}function b(B){const H="CDATA[";return B===H.charCodeAt(i++)?(e.consume(B),i===H.length?w:b):n(B)}function w(B){return B===null?n(B):B===93?(e.consume(B),S):rt(B)?(s=w,G(B)):(e.consume(B),w)}function S(B){return B===93?(e.consume(B),j):w(B)}function j(B){return B===62?L(B):B===93?(e.consume(B),j):w(B)}function _(B){return B===null||B===62?L(B):rt(B)?(s=_,G(B)):(e.consume(B),_)}function k(B){return B===null?n(B):B===63?(e.consume(B),E):rt(B)?(s=k,G(B)):(e.consume(B),k)}function E(B){return B===62?L(B):k(B)}function T(B){return vr(B)?(e.consume(B),A):n(B)}function A(B){return B===45||cr(B)?(e.consume(B),A):O(B)}function O(B){return rt(B)?(s=O,G(B)):wt(B)?(e.consume(B),O):L(B)}function I(B){return B===45||cr(B)?(e.consume(B),I):B===47||B===62||Xt(B)?P(B):n(B)}function P(B){return B===47?(e.consume(B),L):B===58||B===95||vr(B)?(e.consume(B),D):rt(B)?(s=P,G(B)):wt(B)?(e.consume(B),P):L(B)}function D(B){return B===45||B===46||B===58||B===95||cr(B)?(e.consume(B),D):q(B)}function q(B){return B===61?(e.consume(B),z):rt(B)?(s=q,G(B)):wt(B)?(e.consume(B),q):P(B)}function z(B){return B===null||B===60||B===61||B===62||B===96?n(B):B===34||B===39?(e.consume(B),a=B,F):rt(B)?(s=z,G(B)):wt(B)?(e.consume(B),z):(e.consume(B),R)}function F(B){return B===a?(e.consume(B),a=void 0,M):B===null?n(B):rt(B)?(s=F,G(B)):(e.consume(B),F)}function R(B){return B===null||B===34||B===39||B===60||B===61||B===96?n(B):B===47||B===62||Xt(B)?P(B):(e.consume(B),R)}function M(B){return B===47||B===62||Xt(B)?P(B):n(B)}function L(B){return B===62?(e.consume(B),e.exit("htmlTextData"),e.exit("htmlText"),t):n(B)}function G(B){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(B),e.exit("lineEnding"),W}function W(B){return wt(B)?Tt(e,Y,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):Y(B)}function Y(B){return e.enter("htmlTextData"),s(B)}}const lN={name:"labelEnd",resolveAll:Cie,resolveTo:Nie,tokenize:Eie},jie={tokenize:Aie},kie={tokenize:Tie},_ie={tokenize:Oie};function Cie(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const a=r.type==="labelImage"?4:2;r.type="data",t+=a}}return e.length!==n.length&&Yr(e,0,e.length,n),e}function Nie(e,t){let n=e.length,r=0,a,i,s,l;for(;n--;)if(a=e[n][1],i){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[n][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(i=n,a.type!=="labelLink")){r=2;break}}else a.type==="labelEnd"&&(s=n);const c={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},d={type:"label",start:{...e[i][1].start},end:{...e[s][1].end}},h={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[s-2][1].start}};return l=[["enter",c,t],["enter",d,t]],l=ma(l,e.slice(i+1,i+r+3)),l=ma(l,[["enter",h,t]]),l=ma(l,Vg(t.parser.constructs.insideSpan.null,e.slice(i+r+4,s-3),t)),l=ma(l,[["exit",h,t],e[s-2],e[s-1],["exit",d,t]]),l=ma(l,e.slice(s+1)),l=ma(l,[["exit",c,t]]),Yr(e,i,e.length,l),e}function Eie(e,t,n){const r=this;let a=r.events.length,i,s;for(;a--;)if((r.events[a][1].type==="labelImage"||r.events[a][1].type==="labelLink")&&!r.events[a][1]._balanced){i=r.events[a][1];break}return l;function l(g){return i?i._inactive?m(g):(s=r.parser.defined.includes(Ra(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(g),e.exit("labelMarker"),e.exit("labelEnd"),c):n(g)}function c(g){return g===40?e.attempt(jie,h,s?h:m)(g):g===91?e.attempt(kie,h,s?d:m)(g):s?h(g):m(g)}function d(g){return e.attempt(_ie,h,m)(g)}function h(g){return t(g)}function m(g){return i._balanced=!0,n(g)}}function Aie(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),a}function a(m){return Xt(m)?Gd(e,i)(m):i(m)}function i(m){return m===41?h(m):J8(e,s,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function s(m){return Xt(m)?Gd(e,c)(m):h(m)}function l(m){return n(m)}function c(m){return m===34||m===39||m===40?tH(e,d,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):h(m)}function d(m){return Xt(m)?Gd(e,h)(m):h(m)}function h(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function Tie(e,t,n){const r=this;return a;function a(l){return eH.call(r,e,i,s,"reference","referenceMarker","referenceString")(l)}function i(l){return r.parser.defined.includes(Ra(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function s(l){return n(l)}}function Oie(e,t,n){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),a}function a(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}const Mie={name:"labelStartImage",resolveAll:lN.resolveAll,tokenize:Pie};function Pie(e,t,n){const r=this;return a;function a(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),i}function i(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),s):n(l)}function s(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const Die={name:"labelStartLink",resolveAll:lN.resolveAll,tokenize:Rie};function Rie(e,t,n){const r=this;return a;function a(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),i}function i(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const $0={name:"lineEnding",tokenize:Iie};function Iie(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Tt(e,t,"linePrefix")}}const fp={name:"thematicBreak",tokenize:Lie};function Lie(e,t,n){let r=0,a;return i;function i(d){return e.enter("thematicBreak"),s(d)}function s(d){return a=d,l(d)}function l(d){return d===a?(e.enter("thematicBreakSequence"),c(d)):r>=3&&(d===null||rt(d))?(e.exit("thematicBreak"),t(d)):n(d)}function c(d){return d===a?(e.consume(d),r++,c):(e.exit("thematicBreakSequence"),wt(d)?Tt(e,l,"whitespace")(d):l(d))}}const Er={continuation:{tokenize:Bie},exit:Hie,name:"list",tokenize:qie},zie={partial:!0,tokenize:Uie},$ie={partial:!0,tokenize:Fie};function qie(e,t,n){const r=this,a=r.events[r.events.length-1];let i=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,s=0;return l;function l(v){const b=r.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||v===r.containerState.marker:xC(v)){if(r.containerState.type||(r.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(fp,n,d)(v):d(v);if(!r.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(v)}return n(v)}function c(v){return xC(v)&&++s<10?(e.consume(v),c):(!r.interrupt||s<2)&&(r.containerState.marker?v===r.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),d(v)):n(v)}function d(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||v,e.check(If,r.interrupt?n:h,e.attempt(zie,g,m))}function h(v){return r.containerState.initialBlankLine=!0,i++,g(v)}function m(v){return wt(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),g):n(v)}function g(v){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(v)}}function Bie(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(If,a,i);function a(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Tt(e,t,"listItemIndent",r.containerState.size+1)(l)}function i(l){return r.containerState.furtherBlankLines||!wt(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt($ie,t,s)(l))}function s(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,Tt(e,e.attempt(Er,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function Fie(e,t,n){const r=this;return Tt(e,a,"listItemIndent",r.containerState.size+1);function a(i){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(i):n(i)}}function Hie(e){e.exit(this.containerState.type)}function Uie(e,t,n){const r=this;return Tt(e,a,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(i){const s=r.events[r.events.length-1];return!wt(i)&&s&&s[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const TD={name:"setextUnderline",resolveTo:Gie,tokenize:Vie};function Gie(e,t){let n=e.length,r,a,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",i?(e.splice(a,0,["enter",s,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end={...e[i][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function Vie(e,t,n){const r=this;let a;return i;function i(d){let h=r.events.length,m;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){m=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),a=d,s(d)):n(d)}function s(d){return e.enter("setextHeadingLineSequence"),l(d)}function l(d){return d===a?(e.consume(d),l):(e.exit("setextHeadingLineSequence"),wt(d)?Tt(e,c,"lineSuffix")(d):c(d))}function c(d){return d===null||rt(d)?(e.exit("setextHeadingLine"),t(d)):n(d)}}const Kie={tokenize:Wie};function Wie(e){const t=this,n=e.attempt(If,r,e.attempt(this.parser.constructs.flowInitial,a,Tt(e,e.attempt(this.parser.constructs.flow,a,e.attempt(Jae,a)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function a(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Yie={resolveAll:rH()},Xie=nH("string"),Zie=nH("text");function nH(e){return{resolveAll:rH(e==="text"?Qie:void 0),tokenize:t};function t(n){const r=this,a=this.parser.constructs[e],i=n.attempt(a,s,l);return s;function s(h){return d(h)?i(h):l(h)}function l(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),c}function c(h){return d(h)?(n.exit("data"),i(h)):(n.consume(h),c)}function d(h){if(h===null)return!0;const m=a[h];let g=-1;if(m)for(;++g<m.length;){const v=m[g];if(!v.previous||v.previous.call(r,r.previous))return!0}return!1}}}function rH(e){return t;function t(n,r){let a=-1,i;for(;++a<=n.length;)i===void 0?n[a]&&n[a][1].type==="data"&&(i=a,a++):(!n[a]||n[a][1].type!=="data")&&(a!==i+2&&(n[i][1].end=n[a-1][1].end,n.splice(i+2,a-i-2),a=i+2),i=void 0);return e?e(n,r):n}}function Qie(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],a=t.sliceStream(r);let i=a.length,s=-1,l=0,c;for(;i--;){const d=a[i];if(typeof d=="string"){for(s=d.length;d.charCodeAt(s-1)===32;)l++,s--;if(s)break;s=-1}else if(d===-2)c=!0,l++;else if(d!==-1){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const d={type:n===e.length||c||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?s:r.start._bufferIndex+s,_index:r.start._index+i,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...d.start},r.start.offset===r.end.offset?Object.assign(r,d):(e.splice(n,0,["enter",d,t],["exit",d,t]),n+=2)}n++}return e}const Jie={42:Er,43:Er,45:Er,48:Er,49:Er,50:Er,51:Er,52:Er,53:Er,54:Er,55:Er,56:Er,57:Er,62:Y8},ese={91:aie},tse={[-2]:z0,[-1]:z0,32:z0},nse={35:cie,42:fp,45:[TD,fp],60:mie,61:TD,95:fp,96:ED,126:ED},rse={38:Z8,92:X8},ase={[-5]:$0,[-4]:$0,[-3]:$0,33:Mie,38:Z8,42:bC,60:[Dae,wie],91:Die,92:[lie,X8],93:lN,95:bC,96:Kae},ise={null:[bC,Yie]},sse={null:[42,95]},ose={null:[]},lse=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:sse,contentInitial:ese,disable:ose,document:Jie,flow:nse,flowInitial:tse,insideSpan:ise,string:rse,text:ase},Symbol.toStringTag,{value:"Module"}));function use(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const a={},i=[];let s=[],l=[];const c={attempt:O(T),check:O(A),consume:_,enter:k,exit:E,interrupt:O(A,{interrupt:!0})},d={code:null,containerState:{},defineSkip:w,events:[],now:b,parser:e,previous:null,sliceSerialize:g,sliceStream:v,write:m};let h=t.tokenize.call(d,c);return t.resolveAll&&i.push(t),d;function m(q){return s=ma(s,q),S(),s[s.length-1]!==null?[]:(I(t,0),d.events=Vg(i,d.events,d),d.events)}function g(q,z){return dse(v(q),z)}function v(q){return cse(s,q)}function b(){const{_bufferIndex:q,_index:z,line:F,column:R,offset:M}=r;return{_bufferIndex:q,_index:z,line:F,column:R,offset:M}}function w(q){a[q.line]=q.column,D()}function S(){let q;for(;r._index<s.length;){const z=s[r._index];if(typeof z=="string")for(q=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===q&&r._bufferIndex<z.length;)j(z.charCodeAt(r._bufferIndex));else j(z)}}function j(q){h=h(q)}function _(q){rt(q)?(r.line++,r.column=1,r.offset+=q===-3?2:1,D()):q!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),d.previous=q}function k(q,z){const F=z||{};return F.type=q,F.start=b(),d.events.push(["enter",F,d]),l.push(F),F}function E(q){const z=l.pop();return z.end=b(),d.events.push(["exit",z,d]),z}function T(q,z){I(q,z.from)}function A(q,z){z.restore()}function O(q,z){return F;function F(R,M,L){let G,W,Y,B;return Array.isArray(R)?K(R):"tokenize"in R?K([R]):H(R);function H(Q){return re;function re(ue){const Z=ue!==null&&Q[ue],se=ue!==null&&Q.null,ce=[...Array.isArray(Z)?Z:Z?[Z]:[],...Array.isArray(se)?se:se?[se]:[]];return K(ce)(ue)}}function K(Q){return G=Q,W=0,Q.length===0?L:U(Q[W])}function U(Q){return re;function re(ue){return B=P(),Y=Q,Q.partial||(d.currentConstruct=Q),Q.name&&d.parser.constructs.disable.null.includes(Q.name)?J():Q.tokenize.call(z?Object.assign(Object.create(d),z):d,c,X,J)(ue)}}function X(Q){return q(Y,B),M}function J(Q){return B.restore(),++W<G.length?U(G[W]):L}}}function I(q,z){q.resolveAll&&!i.includes(q)&&i.push(q),q.resolve&&Yr(d.events,z,d.events.length-z,q.resolve(d.events.slice(z),d)),q.resolveTo&&(d.events=q.resolveTo(d.events,d))}function P(){const q=b(),z=d.previous,F=d.currentConstruct,R=d.events.length,M=Array.from(l);return{from:R,restore:L};function L(){r=q,d.previous=z,d.currentConstruct=F,d.events.length=R,l=M,D()}}function D(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}function cse(e,t){const n=t.start._index,r=t.start._bufferIndex,a=t.end._index,i=t.end._bufferIndex;let s;if(n===a)s=[e[n].slice(r,i)];else{if(s=e.slice(n,a),r>-1){const l=s[0];typeof l=="string"?s[0]=l.slice(r):s.shift()}i>0&&s.push(e[a].slice(0,i))}return s}function dse(e,t){let n=-1;const r=[];let a;for(;++n<e.length;){const i=e[n];let s;if(typeof i=="string")s=i;else switch(i){case-5:{s="\r";break}case-4:{s=`
|
|
453
|
+
`;break}case-3:{s=`\r
|
|
454
|
+
`;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&a)continue;s=" ";break}default:s=String.fromCharCode(i)}a=i===-2,r.push(s)}return r.join("")}function fse(e){const r={constructs:K8([lse,...(e||{}).extensions||[]]),content:a(Nae),defined:[],document:a(Aae),flow:a(Kie),lazy:{},string:a(Xie),text:a(Zie)};return r;function a(i){return s;function s(l){return use(r,i,l)}}}function hse(e){for(;!Q8(e););return e}const OD=/[\0\t\n\r]/g;function mse(){let e=1,t="",n=!0,r;return a;function a(i,s,l){const c=[];let d,h,m,g,v;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(s||void 0).decode(i)),m=0,t="",n&&(i.charCodeAt(0)===65279&&m++,n=void 0);m<i.length;){if(OD.lastIndex=m,d=OD.exec(i),g=d&&d.index!==void 0?d.index:i.length,v=i.charCodeAt(g),!d){t=i.slice(m);break}if(v===10&&m===g&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),m<g&&(c.push(i.slice(m,g)),e+=g-m),v){case 0:{c.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,c.push(-2);e++<h;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}m=g+1}return l&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const pse=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function gse(e){return e.replace(pse,vse)}function vse(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),i=a===120||a===88;return W8(n.slice(i?2:1),i?16:10)}return oN(n)||e}const aH={}.hasOwnProperty;function yse(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),xse(n)(hse(fse(n).document().write(mse()(e,t,!0))))}function xse(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(De),autolinkProtocol:P,autolinkEmail:P,atxHeading:i(fe),blockQuote:i(se),characterEscape:P,characterReference:P,codeFenced:i(ce),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:i(ce,s),codeText:i(ee,s),codeTextData:P,data:P,codeFlowValue:P,definition:i(ae),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:i(oe),hardBreakEscape:i(Ce),hardBreakTrailing:i(Ce),htmlFlow:i(Te,s),htmlFlowData:P,htmlText:i(Te,s),htmlTextData:P,image:i(pe),label:s,link:i(De),listItem:i(We),listItemValue:g,listOrdered:i(Xe,m),listUnordered:i(Xe),paragraph:i(at),reference:U,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:i(fe),strong:i(Ne),thematicBreak:i(ye)},exit:{atxHeading:c(),atxHeadingSequence:T,autolink:c(),autolinkEmail:Z,autolinkProtocol:ue,blockQuote:c(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:J,characterReferenceMarkerNumeric:J,characterReferenceValue:Q,characterReference:re,codeFenced:c(S),codeFencedFence:w,codeFencedFenceInfo:v,codeFencedFenceMeta:b,codeFlowValue:D,codeIndented:c(j),codeText:c(M),codeTextData:D,data:D,definition:c(),definitionDestinationString:E,definitionLabelString:_,definitionTitleString:k,emphasis:c(),hardBreakEscape:c(z),hardBreakTrailing:c(z),htmlFlow:c(F),htmlFlowData:D,htmlText:c(R),htmlTextData:D,image:c(G),label:Y,labelText:W,lineEnding:q,link:c(L),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:X,resourceDestinationString:B,resourceTitleString:H,resource:K,setextHeading:c(I),setextHeadingLineSequence:O,setextHeadingText:A,strong:c(),thematicBreak:c()}};iH(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(le){let me={type:"root",children:[]};const Oe={stack:[me],tokenStack:[],config:t,enter:l,exit:d,buffer:s,resume:h,data:n},Pe=[];let be=-1;for(;++be<le.length;)if(le[be][1].type==="listOrdered"||le[be][1].type==="listUnordered")if(le[be][0]==="enter")Pe.push(be);else{const nt=Pe.pop();be=a(le,nt,be)}for(be=-1;++be<le.length;){const nt=t[le[be][0]];aH.call(nt,le[be][1].type)&&nt[le[be][1].type].call(Object.assign({sliceSerialize:le[be][2].sliceSerialize},Oe),le[be][1])}if(Oe.tokenStack.length>0){const nt=Oe.tokenStack[Oe.tokenStack.length-1];(nt[1]||MD).call(Oe,void 0,nt[0])}for(me.position={start:Us(le.length>0?le[0][1].start:{line:1,column:1,offset:0}),end:Us(le.length>0?le[le.length-2][1].end:{line:1,column:1,offset:0})},be=-1;++be<t.transforms.length;)me=t.transforms[be](me)||me;return me}function a(le,me,Oe){let Pe=me-1,be=-1,nt=!1,ot,gt,lt,Me;for(;++Pe<=Oe;){const $e=le[Pe];switch($e[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{$e[0]==="enter"?be++:be--,Me=void 0;break}case"lineEndingBlank":{$e[0]==="enter"&&(ot&&!Me&&!be&&!lt&&(lt=Pe),Me=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Me=void 0}if(!be&&$e[0]==="enter"&&$e[1].type==="listItemPrefix"||be===-1&&$e[0]==="exit"&&($e[1].type==="listUnordered"||$e[1].type==="listOrdered")){if(ot){let Qe=Pe;for(gt=void 0;Qe--;){const vt=le[Qe];if(vt[1].type==="lineEnding"||vt[1].type==="lineEndingBlank"){if(vt[0]==="exit")continue;gt&&(le[gt][1].type="lineEndingBlank",nt=!0),vt[1].type="lineEnding",gt=Qe}else if(!(vt[1].type==="linePrefix"||vt[1].type==="blockQuotePrefix"||vt[1].type==="blockQuotePrefixWhitespace"||vt[1].type==="blockQuoteMarker"||vt[1].type==="listItemIndent"))break}lt&&(!gt||lt<gt)&&(ot._spread=!0),ot.end=Object.assign({},gt?le[gt][1].start:$e[1].end),le.splice(gt||Pe,0,["exit",ot,$e[2]]),Pe++,Oe++}if($e[1].type==="listItemPrefix"){const Qe={type:"listItem",_spread:!1,start:Object.assign({},$e[1].start),end:void 0};ot=Qe,le.splice(Pe,0,["enter",Qe,$e[2]]),Pe++,Oe++,lt=void 0,Me=!0}}}return le[me][1]._spread=nt,Oe}function i(le,me){return Oe;function Oe(Pe){l.call(this,le(Pe),Pe),me&&me.call(this,Pe)}}function s(){this.stack.push({type:"fragment",children:[]})}function l(le,me,Oe){this.stack[this.stack.length-1].children.push(le),this.stack.push(le),this.tokenStack.push([me,Oe||void 0]),le.position={start:Us(me.start),end:void 0}}function c(le){return me;function me(Oe){le&&le.call(this,Oe),d.call(this,Oe)}}function d(le,me){const Oe=this.stack.pop(),Pe=this.tokenStack.pop();if(Pe)Pe[0].type!==le.type&&(me?me.call(this,le,Pe[0]):(Pe[1]||MD).call(this,le,Pe[0]));else throw new Error("Cannot close `"+le.type+"` ("+Ud({start:le.start,end:le.end})+"): it’s not open");Oe.position.end=Us(le.end)}function h(){return sN(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function g(le){if(this.data.expectingFirstListItemValue){const me=this.stack[this.stack.length-2];me.start=Number.parseInt(this.sliceSerialize(le),10),this.data.expectingFirstListItemValue=void 0}}function v(){const le=this.resume(),me=this.stack[this.stack.length-1];me.lang=le}function b(){const le=this.resume(),me=this.stack[this.stack.length-1];me.meta=le}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const le=this.resume(),me=this.stack[this.stack.length-1];me.value=le.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function j(){const le=this.resume(),me=this.stack[this.stack.length-1];me.value=le.replace(/(\r?\n|\r)$/g,"")}function _(le){const me=this.resume(),Oe=this.stack[this.stack.length-1];Oe.label=me,Oe.identifier=Ra(this.sliceSerialize(le)).toLowerCase()}function k(){const le=this.resume(),me=this.stack[this.stack.length-1];me.title=le}function E(){const le=this.resume(),me=this.stack[this.stack.length-1];me.url=le}function T(le){const me=this.stack[this.stack.length-1];if(!me.depth){const Oe=this.sliceSerialize(le).length;me.depth=Oe}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function O(le){const me=this.stack[this.stack.length-1];me.depth=this.sliceSerialize(le).codePointAt(0)===61?1:2}function I(){this.data.setextHeadingSlurpLineEnding=void 0}function P(le){const Oe=this.stack[this.stack.length-1].children;let Pe=Oe[Oe.length-1];(!Pe||Pe.type!=="text")&&(Pe=Fe(),Pe.position={start:Us(le.start),end:void 0},Oe.push(Pe)),this.stack.push(Pe)}function D(le){const me=this.stack.pop();me.value+=this.sliceSerialize(le),me.position.end=Us(le.end)}function q(le){const me=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Oe=me.children[me.children.length-1];Oe.position.end=Us(le.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(me.type)&&(P.call(this,le),D.call(this,le))}function z(){this.data.atHardBreak=!0}function F(){const le=this.resume(),me=this.stack[this.stack.length-1];me.value=le}function R(){const le=this.resume(),me=this.stack[this.stack.length-1];me.value=le}function M(){const le=this.resume(),me=this.stack[this.stack.length-1];me.value=le}function L(){const le=this.stack[this.stack.length-1];if(this.data.inReference){const me=this.data.referenceType||"shortcut";le.type+="Reference",le.referenceType=me,delete le.url,delete le.title}else delete le.identifier,delete le.label;this.data.referenceType=void 0}function G(){const le=this.stack[this.stack.length-1];if(this.data.inReference){const me=this.data.referenceType||"shortcut";le.type+="Reference",le.referenceType=me,delete le.url,delete le.title}else delete le.identifier,delete le.label;this.data.referenceType=void 0}function W(le){const me=this.sliceSerialize(le),Oe=this.stack[this.stack.length-2];Oe.label=gse(me),Oe.identifier=Ra(me).toLowerCase()}function Y(){const le=this.stack[this.stack.length-1],me=this.resume(),Oe=this.stack[this.stack.length-1];if(this.data.inReference=!0,Oe.type==="link"){const Pe=le.children;Oe.children=Pe}else Oe.alt=me}function B(){const le=this.resume(),me=this.stack[this.stack.length-1];me.url=le}function H(){const le=this.resume(),me=this.stack[this.stack.length-1];me.title=le}function K(){this.data.inReference=void 0}function U(){this.data.referenceType="collapsed"}function X(le){const me=this.resume(),Oe=this.stack[this.stack.length-1];Oe.label=me,Oe.identifier=Ra(this.sliceSerialize(le)).toLowerCase(),this.data.referenceType="full"}function J(le){this.data.characterReferenceType=le.type}function Q(le){const me=this.sliceSerialize(le),Oe=this.data.characterReferenceType;let Pe;Oe?(Pe=W8(me,Oe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Pe=oN(me);const be=this.stack[this.stack.length-1];be.value+=Pe}function re(le){const me=this.stack.pop();me.position.end=Us(le.end)}function ue(le){D.call(this,le);const me=this.stack[this.stack.length-1];me.url=this.sliceSerialize(le)}function Z(le){D.call(this,le);const me=this.stack[this.stack.length-1];me.url="mailto:"+this.sliceSerialize(le)}function se(){return{type:"blockquote",children:[]}}function ce(){return{type:"code",lang:null,meta:null,value:""}}function ee(){return{type:"inlineCode",value:""}}function ae(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function oe(){return{type:"emphasis",children:[]}}function fe(){return{type:"heading",depth:0,children:[]}}function Ce(){return{type:"break"}}function Te(){return{type:"html",value:""}}function pe(){return{type:"image",title:null,url:"",alt:null}}function De(){return{type:"link",title:null,url:"",children:[]}}function Xe(le){return{type:"list",ordered:le.type==="listOrdered",start:null,spread:le._spread,children:[]}}function We(le){return{type:"listItem",spread:le._spread,checked:null,children:[]}}function at(){return{type:"paragraph",children:[]}}function Ne(){return{type:"strong",children:[]}}function Fe(){return{type:"text",value:""}}function ye(){return{type:"thematicBreak"}}}function Us(e){return{line:e.line,column:e.column,offset:e.offset}}function iH(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?iH(e,r):bse(e,r)}}function bse(e,t){let n;for(n in t)if(aH.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function MD(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ud({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ud({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ud({start:t.start,end:t.end})+") is still open")}function wse(e){const t=this;t.parser=n;function n(r){return yse(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Sse(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function jse(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
455
|
+
`}]}function kse(e,t){const n=t.value?t.value+`
|
|
456
|
+
`:"",r={},a=t.lang?t.lang.split(/\s+/):[];a.length>0&&(r.className=["language-"+a[0]]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function _se(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Cse(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Nse(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),a=uc(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let s,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=i+1,l+=1,e.footnoteCounts.set(r,l);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,c);const d={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,d),e.applyData(t,d)}function Ese(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ase(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function sH(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const a=e.all(t),i=a[0];i&&i.type==="text"?i.value="["+i.value:a.unshift({type:"text",value:"["});const s=a[a.length-1];return s&&s.type==="text"?s.value+=r:a.push({type:"text",value:r}),a}function Tse(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return sH(e,t);const a={src:uc(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(a.title=r.title);const i={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,i),e.applyData(t,i)}function Ose(e,t){const n={src:uc(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Mse(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Pse(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return sH(e,t);const a={href:uc(r.url||"")};r.title!==null&&r.title!==void 0&&(a.title=r.title);const i={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function Dse(e,t){const n={href:uc(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Rse(e,t,n){const r=e.all(t),a=n?Ise(n):oH(t),i={},s=[];if(typeof t.checked=="boolean"){const h=r[0];let m;h&&h.type==="element"&&h.tagName==="p"?m=h:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const h=r[l];(a||l!==0||h.type!=="element"||h.tagName!=="p")&&s.push({type:"text",value:`
|
|
457
|
+
`}),h.type==="element"&&h.tagName==="p"&&!a?s.push(...h.children):s.push(h)}const c=r[r.length-1];c&&(a||c.type!=="element"||c.tagName!=="p")&&s.push({type:"text",value:`
|
|
458
|
+
`});const d={type:"element",tagName:"li",properties:i,children:s};return e.patch(t,d),e.applyData(t,d)}function Ise(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=oH(n[r])}return t}function oH(e){const t=e.spread;return t??e.children.length>1}function Lse(e,t){const n={},r=e.all(t);let a=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++a<r.length;){const s=r[a];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)}function zse(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function $se(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function qse(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Bse(e,t){const n=e.all(t),r=n.shift(),a=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),a.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=nN(t.children[1]),c=q8(t.children[t.children.length-1]);l&&c&&(s.position={start:l,end:c}),a.push(s)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,i),e.applyData(t,i)}function Fse(e,t,n){const r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,l=s?s.length:t.children.length;let c=-1;const d=[];for(;++c<l;){const m=t.children[c],g={},v=s?s[c]:void 0;v&&(g.align=v);let b={type:"element",tagName:i,properties:g,children:[]};m&&(b.children=e.all(m),e.patch(m,b),b=e.applyData(m,b)),d.push(b)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(d,!0)};return e.patch(t,h),e.applyData(t,h)}function Hse(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const PD=9,DD=32;function Use(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),a=0;const i=[];for(;r;)i.push(RD(t.slice(a,r.index),a>0,!0),r[0]),a=r.index+r[0].length,r=n.exec(t);return i.push(RD(t.slice(a),a>0,!1)),i.join("")}function RD(e,t,n){let r=0,a=e.length;if(t){let i=e.codePointAt(r);for(;i===PD||i===DD;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(a-1);for(;i===PD||i===DD;)a--,i=e.codePointAt(a-1)}return a>r?e.slice(r,a):""}function Gse(e,t){const n={type:"text",value:Use(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Vse(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Kse={blockquote:Sse,break:jse,code:kse,delete:_se,emphasis:Cse,footnoteReference:Nse,heading:Ese,html:Ase,imageReference:Tse,image:Ose,inlineCode:Mse,linkReference:Pse,link:Dse,listItem:Rse,list:Lse,paragraph:zse,root:$se,strong:qse,table:Bse,tableCell:Hse,tableRow:Fse,text:Gse,thematicBreak:Vse,toml:Pm,yaml:Pm,definition:Pm,footnoteDefinition:Pm};function Pm(){}const lH=-1,Kg=0,Vd=1,Op=2,uN=3,cN=4,dN=5,fN=6,uH=7,cH=8,ID=typeof self=="object"?self:globalThis,Wse=(e,t)=>{const n=(a,i)=>(e.set(i,a),a),r=a=>{if(e.has(a))return e.get(a);const[i,s]=t[a];switch(i){case Kg:case lH:return n(s,a);case Vd:{const l=n([],a);for(const c of s)l.push(r(c));return l}case Op:{const l=n({},a);for(const[c,d]of s)l[r(c)]=r(d);return l}case uN:return n(new Date(s),a);case cN:{const{source:l,flags:c}=s;return n(new RegExp(l,c),a)}case dN:{const l=n(new Map,a);for(const[c,d]of s)l.set(r(c),r(d));return l}case fN:{const l=n(new Set,a);for(const c of s)l.add(r(c));return l}case uH:{const{name:l,message:c}=s;return n(new ID[l](c),a)}case cH:return n(BigInt(s),a);case"BigInt":return n(Object(BigInt(s)),a);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:l}=new Uint8Array(s);return n(new DataView(l),s)}}return n(new ID[i](s),a)};return r},LD=e=>Wse(new Map,e)(0),gu="",{toString:Yse}={},{keys:Xse}=Object,xd=e=>{const t=typeof e;if(t!=="object"||!e)return[Kg,t];const n=Yse.call(e).slice(8,-1);switch(n){case"Array":return[Vd,gu];case"Object":return[Op,gu];case"Date":return[uN,gu];case"RegExp":return[cN,gu];case"Map":return[dN,gu];case"Set":return[fN,gu];case"DataView":return[Vd,n]}return n.includes("Array")?[Vd,n]:n.includes("Error")?[uH,n]:[Op,n]},Dm=([e,t])=>e===Kg&&(t==="function"||t==="symbol"),Zse=(e,t,n,r)=>{const a=(s,l)=>{const c=r.push(s)-1;return n.set(l,c),c},i=s=>{if(n.has(s))return n.get(s);let[l,c]=xd(s);switch(l){case Kg:{let h=s;switch(c){case"bigint":l=cH,h=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);h=null;break;case"undefined":return a([lH],s)}return a([l,h],s)}case Vd:{if(c){let g=s;return c==="DataView"?g=new Uint8Array(s.buffer):c==="ArrayBuffer"&&(g=new Uint8Array(s)),a([c,[...g]],s)}const h=[],m=a([l,h],s);for(const g of s)h.push(i(g));return m}case Op:{if(c)switch(c){case"BigInt":return a([c,s.toString()],s);case"Boolean":case"Number":case"String":return a([c,s.valueOf()],s)}if(t&&"toJSON"in s)return i(s.toJSON());const h=[],m=a([l,h],s);for(const g of Xse(s))(e||!Dm(xd(s[g])))&&h.push([i(g),i(s[g])]);return m}case uN:return a([l,s.toISOString()],s);case cN:{const{source:h,flags:m}=s;return a([l,{source:h,flags:m}],s)}case dN:{const h=[],m=a([l,h],s);for(const[g,v]of s)(e||!(Dm(xd(g))||Dm(xd(v))))&&h.push([i(g),i(v)]);return m}case fN:{const h=[],m=a([l,h],s);for(const g of s)(e||!Dm(xd(g)))&&h.push(i(g));return m}}const{message:d}=s;return a([l,{name:c,message:d}],s)};return i},zD=(e,{json:t,lossy:n}={})=>{const r=[];return Zse(!(t||n),!!t,new Map,r)(e),r},Mp=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?LD(zD(e,t)):structuredClone(e):(e,t)=>LD(zD(e,t));function Qse(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Jse(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function eoe(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Qse,r=e.options.footnoteBackLabel||Jse,a=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c<e.footnoteOrder.length;){const d=e.footnoteById.get(e.footnoteOrder[c]);if(!d)continue;const h=e.all(d),m=String(d.identifier).toUpperCase(),g=uc(m.toLowerCase());let v=0;const b=[],w=e.footnoteCounts.get(m);for(;w!==void 0&&++v<=w;){b.length>0&&b.push({type:"text",value:" "});let _=typeof n=="string"?n:n(c,v);typeof _=="string"&&(_={type:"text",value:_}),b.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+g+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,v),className:["data-footnote-backref"]},children:Array.isArray(_)?_:[_]})}const S=h[h.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const _=S.children[S.children.length-1];_&&_.type==="text"?_.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...b)}else h.push(...b);const j={type:"element",tagName:"li",properties:{id:t+"fn-"+g},children:e.wrap(h,!0)};e.patch(d,j),l.push(j)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...Mp(s),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:`
|
|
459
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
|
|
460
|
+
`}]}}const Wg=(function(e){if(e==null)return aoe;if(typeof e=="function")return Yg(e);if(typeof e=="object")return Array.isArray(e)?toe(e):noe(e);if(typeof e=="string")return roe(e);throw new Error("Expected function, string, or object as test")});function toe(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Wg(e[n]);return Yg(r);function r(...a){let i=-1;for(;++i<t.length;)if(t[i].apply(this,a))return!0;return!1}}function noe(e){const t=e;return Yg(n);function n(r){const a=r;let i;for(i in e)if(a[i]!==t[i])return!1;return!0}}function roe(e){return Yg(t);function t(n){return n&&n.type===e}}function Yg(e){return t;function t(n,r,a){return!!(ioe(n)&&e.call(this,n,typeof r=="number"?r:void 0,a||void 0))}}function aoe(){return!0}function ioe(e){return e!==null&&typeof e=="object"&&"type"in e}const dH=[],soe=!0,wC=!1,ooe="skip";function fH(e,t,n,r){let a;typeof t=="function"&&typeof n!="function"?(r=n,n=t):a=t;const i=Wg(a),s=r?-1:1;l(e,void 0,[])();function l(c,d,h){const m=c&&typeof c=="object"?c:{};if(typeof m.type=="string"){const v=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(g,"name",{value:"node ("+(c.type+(v?"<"+v+">":""))+")"})}return g;function g(){let v=dH,b,w,S;if((!t||i(c,d,h[h.length-1]||void 0))&&(v=loe(n(c,h)),v[0]===wC))return v;if("children"in c&&c.children){const j=c;if(j.children&&v[0]!==ooe)for(w=(r?j.children.length:-1)+s,S=h.concat(j);w>-1&&w<j.children.length;){const _=j.children[w];if(b=l(_,w,S)(),b[0]===wC)return b;w=typeof b[1]=="number"?b[1]:w+s}}return v}}}function loe(e){return Array.isArray(e)?e:typeof e=="number"?[soe,e]:e==null?dH:[e]}function hN(e,t,n,r){let a,i,s;typeof t=="function"&&typeof n!="function"?(i=void 0,s=t,a=n):(i=t,s=n,a=r),fH(e,i,l,a);function l(c,d){const h=d[d.length-1],m=h?h.children.indexOf(c):void 0;return s(c,m,h)}}const SC={}.hasOwnProperty,uoe={};function coe(e,t){const n=t||uoe,r=new Map,a=new Map,i=new Map,s={...Kse,...n.handlers},l={all:d,applyData:foe,definitionById:r,footnoteById:a,footnoteCounts:i,footnoteOrder:[],handlers:s,one:c,options:n,patch:doe,wrap:moe};return hN(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const m=h.type==="definition"?r:a,g=String(h.identifier).toUpperCase();m.has(g)||m.set(g,h)}}),l;function c(h,m){const g=h.type,v=l.handlers[g];if(SC.call(l.handlers,g)&&v)return v(l,h,m);if(l.options.passThrough&&l.options.passThrough.includes(g)){if("children"in h){const{children:w,...S}=h,j=Mp(S);return j.children=l.all(h),j}return Mp(h)}return(l.options.unknownHandler||hoe)(l,h,m)}function d(h){const m=[];if("children"in h){const g=h.children;let v=-1;for(;++v<g.length;){const b=l.one(g[v],h);if(b){if(v&&g[v-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=$D(b.value)),!Array.isArray(b)&&b.type==="element")){const w=b.children[0];w&&w.type==="text"&&(w.value=$D(w.value))}Array.isArray(b)?m.push(...b):m.push(b)}}}return m}}function doe(e,t){e.position&&(t.position=Jre(e))}function foe(e,t){let n=t;if(e&&e.data){const r=e.data.hName,a=e.data.hChildren,i=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&i&&Object.assign(n.properties,Mp(i)),"children"in n&&n.children&&a!==null&&a!==void 0&&(n.children=a)}return n}function hoe(e,t){const n=t.data||{},r="value"in t&&!(SC.call(n,"hProperties")||SC.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function moe(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
461
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
462
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
463
|
+
`}),n}function $D(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function qD(e,t){const n=coe(e,t),r=n.one(e,void 0),a=eoe(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return a&&i.children.push({type:"text",value:`
|
|
464
|
+
`},a),i}function poe(e,t){return e&&"run"in e?async function(n,r){const a=qD(n,{file:r,...t});await e.run(a,r)}:function(n,r){return qD(n,{file:r,...e||t})}}function BD(e){if(e)throw e}var q0,FD;function goe(){if(FD)return q0;FD=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,a=function(d){return typeof Array.isArray=="function"?Array.isArray(d):t.call(d)==="[object Array]"},i=function(d){if(!d||t.call(d)!=="[object Object]")return!1;var h=e.call(d,"constructor"),m=d.constructor&&d.constructor.prototype&&e.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!h&&!m)return!1;var g;for(g in d);return typeof g>"u"||e.call(d,g)},s=function(d,h){n&&h.name==="__proto__"?n(d,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):d[h.name]=h.newValue},l=function(d,h){if(h==="__proto__")if(e.call(d,h)){if(r)return r(d,h).value}else return;return d[h]};return q0=function c(){var d,h,m,g,v,b,w=arguments[0],S=1,j=arguments.length,_=!1;for(typeof w=="boolean"&&(_=w,w=arguments[1]||{},S=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});S<j;++S)if(d=arguments[S],d!=null)for(h in d)m=l(w,h),g=l(d,h),w!==g&&(_&&g&&(i(g)||(v=a(g)))?(v?(v=!1,b=m&&a(m)?m:[]):b=m&&i(m)?m:{},s(w,{name:h,newValue:c(_,b,g)})):typeof g<"u"&&s(w,{name:h,newValue:g}));return w},q0}var voe=goe();const B0=ta(voe);function jC(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function yoe(){const e=[],t={run:n,use:r};return t;function n(...a){let i=-1;const s=a.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);l(null,...a);function l(c,...d){const h=e[++i];let m=-1;if(c){s(c);return}for(;++m<a.length;)(d[m]===null||d[m]===void 0)&&(d[m]=a[m]);a=d,h?xoe(h,l)(...d):s(null,...d)}}function r(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),t}}function xoe(e,t){let n;return r;function r(...s){const l=e.length>s.length;let c;l&&s.push(a);try{c=e.apply(this,s)}catch(d){const h=d;if(l&&n)throw h;return a(h)}l||(c&&c.then&&typeof c.then=="function"?c.then(i,a):c instanceof Error?a(c):i(c))}function a(s,...l){n||(n=!0,t(s,...l))}function i(s){a(null,s)}}const ni={basename:boe,dirname:woe,extname:Soe,join:joe,sep:"/"};function boe(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Lf(e);let n=0,r=-1,a=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(i){n=a+1;break}}else r<0&&(i=!0,r=a+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,l=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(i){n=a+1;break}}else s<0&&(i=!0,s=a+1),l>-1&&(e.codePointAt(a)===t.codePointAt(l--)?l<0&&(r=a):(l=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function woe(e){if(Lf(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Soe(e){Lf(e);let t=e.length,n=-1,r=0,a=-1,i=0,s;for(;t--;){const l=e.codePointAt(t);if(l===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),l===46?a<0?a=t:i!==1&&(i=1):a>-1&&(i=-1)}return a<0||n<0||i===0||i===1&&a===n-1&&a===r+1?"":e.slice(a,n)}function joe(...e){let t=-1,n;for(;++t<e.length;)Lf(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":koe(n)}function koe(e){Lf(e);const t=e.codePointAt(0)===47;let n=_oe(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function _oe(e,t){let n="",r=0,a=-1,i=0,s=-1,l,c;for(;++s<=e.length;){if(s<e.length)l=e.codePointAt(s);else{if(l===47)break;l=47}if(l===47){if(!(a===s-1||i===1))if(a!==s-1&&i===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),a=s,i=0;continue}}else if(n.length>0){n="",r=0,a=s,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(a+1,s):n=e.slice(a+1,s),r=s-a-1;a=s,i=0}else l===46&&i>-1?i++:i=-1}return n}function Lf(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Coe={cwd:Noe};function Noe(){return"/"}function kC(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Eoe(e){if(typeof e=="string")e=new URL(e);else if(!kC(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Aoe(e)}function Aoe(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(t)}const F0=["history","path","basename","stem","extname","dirname"];class hH{constructor(t){let n;t?kC(t)?n={path:t}:typeof t=="string"||Toe(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Coe.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<F0.length;){const i=F0[r];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let a;for(a in n)F0.includes(a)||(this[a]=n[a])}get basename(){return typeof this.path=="string"?ni.basename(this.path):void 0}set basename(t){U0(t,"basename"),H0(t,"basename"),this.path=ni.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ni.dirname(this.path):void 0}set dirname(t){HD(this.basename,"dirname"),this.path=ni.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ni.extname(this.path):void 0}set extname(t){if(H0(t,"extname"),HD(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ni.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){kC(t)&&(t=Eoe(t)),U0(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ni.basename(this.path,this.extname):void 0}set stem(t){U0(t,"stem"),H0(t,"stem"),this.path=ni.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const a=this.message(t,n,r);throw a.fatal=!0,a}info(t,n,r){const a=this.message(t,n,r);return a.fatal=void 0,a}message(t,n,r){const a=new fr(t,n,r);return this.path&&(a.name=this.path+":"+a.name,a.file=this.path),a.fatal=!1,this.messages.push(a),a}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function H0(e,t){if(e&&e.includes(ni.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ni.sep+"`")}function U0(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function HD(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Toe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Ooe=(function(e){const r=this.constructor.prototype,a=r[e],i=function(){return a.apply(i,arguments)};return Object.setPrototypeOf(i,r),i}),Moe={}.hasOwnProperty;class mN extends Ooe{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=yoe()}copy(){const t=new mN;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(B0(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(K0("data",this.frozen),this.namespace[t]=n,this):Moe.call(this.namespace,t)&&this.namespace[t]||void 0:t?(K0("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const a=n.call(t,...r);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Rm(t),r=this.parser||this.Parser;return G0("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),G0("process",this.parser||this.Parser),V0("process",this.compiler||this.Compiler),n?a(void 0,n):new Promise(a);function a(i,s){const l=Rm(t),c=r.parse(l);r.run(c,l,function(h,m,g){if(h||!m||!g)return d(h);const v=m,b=r.stringify(v,g);Roe(b)?g.value=b:g.result=b,d(h,g)});function d(h,m){h||!m?s(h):i?i(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),G0("processSync",this.parser||this.Parser),V0("processSync",this.compiler||this.Compiler),this.process(t,a),GD("processSync","process",n),r;function a(i,s){n=!0,BD(i),r=s}}run(t,n,r){UD(t),this.freeze();const a=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(s,l){const c=Rm(n);a.run(t,c,d);function d(h,m,g){const v=m||t;h?l(h):s?s(v):r(void 0,v,g)}}}runSync(t,n){let r=!1,a;return this.run(t,n,i),GD("runSync","run",r),a;function i(s,l){BD(s),a=l,r=!0}}stringify(t,n){this.freeze();const r=Rm(n),a=this.compiler||this.Compiler;return V0("stringify",a),UD(t),a(t,r)}use(t,...n){const r=this.attachers,a=this.namespace;if(K0("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(d){if(typeof d=="function")c(d,[]);else if(typeof d=="object")if(Array.isArray(d)){const[h,...m]=d;c(h,m)}else s(d);else throw new TypeError("Expected usable value, not `"+d+"`")}function s(d){if(!("plugins"in d)&&!("settings"in d))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(d.plugins),d.settings&&(a.settings=B0(!0,a.settings,d.settings))}function l(d){let h=-1;if(d!=null)if(Array.isArray(d))for(;++h<d.length;){const m=d[h];i(m)}else throw new TypeError("Expected a list of plugins, not `"+d+"`")}function c(d,h){let m=-1,g=-1;for(;++m<r.length;)if(r[m][0]===d){g=m;break}if(g===-1)r.push([d,...h]);else if(h.length>0){let[v,...b]=h;const w=r[g][1];jC(w)&&jC(v)&&(v=B0(!0,w,v)),r[g]=[d,v,...b]}}}}const Poe=new mN().freeze();function G0(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function V0(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function K0(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function UD(e){if(!jC(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function GD(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Rm(e){return Doe(e)?e:new hH(e)}function Doe(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Roe(e){return typeof e=="string"||Ioe(e)}function Ioe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Loe="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",VD=[],KD={allowDangerousHtml:!0},zoe=/^(https?|ircs?|mailto|xmpp)$/i,$oe=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function qoe(e){const t=Boe(e),n=Foe(e);return Hoe(t.runSync(t.parse(n),n),e)}function Boe(e){const t=e.rehypePlugins||VD,n=e.remarkPlugins||VD,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...KD}:KD;return Poe().use(wse).use(n).use(poe,r).use(t)}function Foe(e){const t=e.children||"",n=new hH;return typeof t=="string"&&(n.value=t),n}function Hoe(e,t){const n=t.allowedElements,r=t.allowElement,a=t.components,i=t.disallowedElements,s=t.skipHtml,l=t.unwrapDisallowed,c=t.urlTransform||Uoe;for(const h of $oe)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+Loe+h.id,void 0);return hN(e,d),aae(e,{Fragment:f.Fragment,components:a,ignoreInvalidStyle:!0,jsx:f.jsx,jsxs:f.jsxs,passKeys:!0,passNode:!0});function d(h,m,g){if(h.type==="raw"&&g&&typeof m=="number")return s?g.children.splice(m,1):g.children[m]={type:"text",value:h.value},m;if(h.type==="element"){let v;for(v in L0)if(Object.hasOwn(L0,v)&&Object.hasOwn(h.properties,v)){const b=h.properties[v],w=L0[v];(w===null||w.includes(h.tagName))&&(h.properties[v]=c(String(b||""),v,h))}}if(h.type==="element"){let v=n?!n.includes(h.tagName):i?i.includes(h.tagName):!1;if(!v&&r&&typeof m=="number"&&(v=!r(h,m,g)),v&&g&&typeof m=="number")return l&&h.children?g.children.splice(m,1,...h.children):g.children.splice(m,1),m}}}function Uoe(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),a=e.indexOf("/");return t===-1||a!==-1&&t>a||n!==-1&&t>n||r!==-1&&t>r||zoe.test(e.slice(0,t))?e:""}function WD(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,a=n.indexOf(t);for(;a!==-1;)r++,a=n.indexOf(t,a+t.length);return r}function Goe(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Voe(e,t,n){const a=Wg((n||{}).ignore||[]),i=Koe(t);let s=-1;for(;++s<i.length;)fH(e,"text",l);function l(d,h){let m=-1,g;for(;++m<h.length;){const v=h[m],b=g?g.children:void 0;if(a(v,b?b.indexOf(v):void 0,g))return;g=v}if(g)return c(d,h)}function c(d,h){const m=h[h.length-1],g=i[s][0],v=i[s][1];let b=0;const S=m.children.indexOf(d);let j=!1,_=[];g.lastIndex=0;let k=g.exec(d.value);for(;k;){const E=k.index,T={index:k.index,input:k.input,stack:[...h,d]};let A=v(...k,T);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?g.lastIndex=E+1:(b!==E&&_.push({type:"text",value:d.value.slice(b,E)}),Array.isArray(A)?_.push(...A):A&&_.push(A),b=E+k[0].length,j=!0),!g.global)break;k=g.exec(d.value)}return j?(b<d.value.length&&_.push({type:"text",value:d.value.slice(b)}),m.children.splice(S,1,..._)):_=[d],S+_.length}}function Koe(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const a=n[r];t.push([Woe(a[0]),Yoe(a[1])])}return t}function Woe(e){return typeof e=="string"?new RegExp(Goe(e),"g"):e}function Yoe(e){return typeof e=="function"?e:function(){return e}}const W0="phrasing",Y0=["autolink","link","image","label"];function Xoe(){return{transforms:[rle],enter:{literalAutolink:Qoe,literalAutolinkEmail:X0,literalAutolinkHttp:X0,literalAutolinkWww:X0},exit:{literalAutolink:nle,literalAutolinkEmail:tle,literalAutolinkHttp:Joe,literalAutolinkWww:ele}}}function Zoe(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:W0,notInConstruct:Y0},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:W0,notInConstruct:Y0},{character:":",before:"[ps]",after:"\\/",inConstruct:W0,notInConstruct:Y0}]}}function Qoe(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function X0(e){this.config.enter.autolinkProtocol.call(this,e)}function Joe(e){this.config.exit.autolinkProtocol.call(this,e)}function ele(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function tle(e){this.config.exit.autolinkEmail.call(this,e)}function nle(e){this.exit(e)}function rle(e){Voe(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,ale],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),ile]],{ignore:["link","linkReference"]})}function ale(e,t,n,r,a){let i="";if(!mH(a)||(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!sle(n)))return!1;const s=ole(n+r);if(!s[0])return!1;const l={type:"link",title:null,url:i+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[l,{type:"text",value:s[1]}]:l}function ile(e,t,n,r){return!mH(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function sle(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function ole(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const a=WD(e,"(");let i=WD(e,")");for(;r!==-1&&a>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}function mH(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||nl(n)||Gg(n))&&(!t||n!==47)}pH.peek=gle;function lle(){this.buffer()}function ule(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function cle(){this.buffer()}function dle(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function fle(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ra(this.sliceSerialize(e)).toLowerCase(),n.label=t}function hle(e){this.exit(e)}function mle(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ra(this.sliceSerialize(e)).toLowerCase(),n.label=t}function ple(e){this.exit(e)}function gle(){return"["}function pH(e,t,n,r){const a=n.createTracker(r);let i=a.move("[^");const s=n.enter("footnoteReference"),l=n.enter("reference");return i+=a.move(n.safe(n.associationId(e),{after:"]",before:i})),l(),s(),i+=a.move("]"),i}function vle(){return{enter:{gfmFootnoteCallString:lle,gfmFootnoteCall:ule,gfmFootnoteDefinitionLabelString:cle,gfmFootnoteDefinition:dle},exit:{gfmFootnoteCallString:fle,gfmFootnoteCall:hle,gfmFootnoteDefinitionLabelString:mle,gfmFootnoteDefinition:ple}}}function yle(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:pH},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,a,i,s){const l=i.createTracker(s);let c=l.move("[^");const d=i.enter("footnoteDefinition"),h=i.enter("label");return c+=l.move(i.safe(i.associationId(r),{before:c,after:"]"})),h(),c+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),c+=l.move((t?`
|
|
465
|
+
`:" ")+i.indentLines(i.containerFlow(r,l.current()),t?gH:xle))),d(),c}}function xle(e,t,n){return t===0?e:gH(e,t,n)}function gH(e,t,n){return(n?"":" ")+e}const ble=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];vH.peek=_le;function wle(){return{canContainEols:["delete"],enter:{strikethrough:jle},exit:{strikethrough:kle}}}function Sle(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:ble}],handlers:{delete:vH}}}function jle(e){this.enter({type:"delete",children:[]},e)}function kle(e){this.exit(e)}function vH(e,t,n,r){const a=n.createTracker(r),i=n.enter("strikethrough");let s=a.move("~~");return s+=n.containerPhrasing(e,{...a.current(),before:s,after:"~"}),s+=a.move("~~"),i(),s}function _le(){return"~"}function Cle(e){return e.length}function Nle(e,t){const n=t||{},r=(n.align||[]).concat(),a=n.stringLength||Cle,i=[],s=[],l=[],c=[];let d=0,h=-1;for(;++h<e.length;){const w=[],S=[];let j=-1;for(e[h].length>d&&(d=e[h].length);++j<e[h].length;){const _=Ele(e[h][j]);if(n.alignDelimiters!==!1){const k=a(_);S[j]=k,(c[j]===void 0||k>c[j])&&(c[j]=k)}w.push(_)}s[h]=w,l[h]=S}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<d;)i[m]=YD(r[m]);else{const w=YD(r);for(;++m<d;)i[m]=w}m=-1;const g=[],v=[];for(;++m<d;){const w=i[m];let S="",j="";w===99?(S=":",j=":"):w===108?S=":":w===114&&(j=":");let _=n.alignDelimiters===!1?1:Math.max(1,c[m]-S.length-j.length);const k=S+"-".repeat(_)+j;n.alignDelimiters!==!1&&(_=S.length+_+j.length,_>c[m]&&(c[m]=_),v[m]=_),g[m]=k}s.splice(1,0,g),l.splice(1,0,v),h=-1;const b=[];for(;++h<s.length;){const w=s[h],S=l[h];m=-1;const j=[];for(;++m<d;){const _=w[m]||"";let k="",E="";if(n.alignDelimiters!==!1){const T=c[m]-(S[m]||0),A=i[m];A===114?k=" ".repeat(T):A===99?T%2?(k=" ".repeat(T/2+.5),E=" ".repeat(T/2-.5)):(k=" ".repeat(T/2),E=k):E=" ".repeat(T)}n.delimiterStart!==!1&&!m&&j.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&_==="")&&(n.delimiterStart!==!1||m)&&j.push(" "),n.alignDelimiters!==!1&&j.push(k),j.push(_),n.alignDelimiters!==!1&&j.push(E),n.padding!==!1&&j.push(" "),(n.delimiterEnd!==!1||m!==d-1)&&j.push("|")}b.push(n.delimiterEnd===!1?j.join("").replace(/ +$/,""):j.join(""))}return b.join(`
|
|
466
|
+
`)}function Ele(e){return e==null?"":String(e)}function YD(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function Ale(e,t,n,r){const a=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const s=n.indentLines(n.containerFlow(e,i.current()),Tle);return a(),s}function Tle(e,t,n){return">"+(n?"":" ")+e}function Ole(e,t){return XD(e,t.inConstruct,!0)&&!XD(e,t.notInConstruct,!1)}function XD(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function ZD(e,t,n,r){let a=-1;for(;++a<n.unsafe.length;)if(n.unsafe[a].character===`
|
|
467
|
+
`&&Ole(n.stack,n.unsafe[a]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
468
|
+
`}function Mle(e,t){const n=String(e);let r=n.indexOf(t),a=r,i=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===a?++i>s&&(s=i):i=1,a=r+t.length,r=n.indexOf(t,a);return s}function Ple(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Dle(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Rle(e,t,n,r){const a=Dle(n),i=e.value||"",s=a==="`"?"GraveAccent":"Tilde";if(Ple(e,n)){const m=n.enter("codeIndented"),g=n.indentLines(i,Ile);return m(),g}const l=n.createTracker(r),c=a.repeat(Math.max(Mle(i,a)+1,3)),d=n.enter("codeFenced");let h=l.move(c);if(e.lang){const m=n.enter(`codeFencedLang${s}`);h+=l.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...l.current()})),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${s}`);h+=l.move(" "),h+=l.move(n.safe(e.meta,{before:h,after:`
|
|
469
|
+
`,encode:["`"],...l.current()})),m()}return h+=l.move(`
|
|
470
|
+
`),i&&(h+=l.move(i+`
|
|
471
|
+
`)),h+=l.move(c),d(),h}function Ile(e,t,n){return(n?"":" ")+e}function pN(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Lle(e,t,n,r){const a=pN(n),i=a==='"'?"Quote":"Apostrophe",s=n.enter("definition");let l=n.enter("label");const c=n.createTracker(r);let d=c.move("[");return d+=c.move(n.safe(n.associationId(e),{before:d,after:"]",...c.current()})),d+=c.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),d+=c.move("<"),d+=c.move(n.safe(e.url,{before:d,after:">",...c.current()})),d+=c.move(">")):(l=n.enter("destinationRaw"),d+=c.move(n.safe(e.url,{before:d,after:e.title?" ":`
|
|
472
|
+
`,...c.current()}))),l(),e.title&&(l=n.enter(`title${i}`),d+=c.move(" "+a),d+=c.move(n.safe(e.title,{before:d,after:a,...c.current()})),d+=c.move(a),l()),s(),d}function zle(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function sf(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Pp(e,t,n){const r=qu(e),a=qu(t);return r===void 0?a===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}yH.peek=$le;function yH(e,t,n,r){const a=zle(n),i=n.enter("emphasis"),s=n.createTracker(r),l=s.move(a);let c=s.move(n.containerPhrasing(e,{after:a,before:l,...s.current()}));const d=c.charCodeAt(0),h=Pp(r.before.charCodeAt(r.before.length-1),d,a);h.inside&&(c=sf(d)+c.slice(1));const m=c.charCodeAt(c.length-1),g=Pp(r.after.charCodeAt(0),m,a);g.inside&&(c=c.slice(0,-1)+sf(m));const v=s.move(a);return i(),n.attentionEncodeSurroundingInfo={after:g.outside,before:h.outside},l+c+v}function $le(e,t,n){return n.options.emphasis||"*"}function qle(e,t){let n=!1;return hN(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,wC}),!!((!e.depth||e.depth<3)&&sN(e)&&(t.options.setext||n))}function Ble(e,t,n,r){const a=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(qle(e,n)){const h=n.enter("headingSetext"),m=n.enter("phrasing"),g=n.containerPhrasing(e,{...i.current(),before:`
|
|
473
|
+
`,after:`
|
|
474
|
+
`});return m(),h(),g+`
|
|
475
|
+
`+(a===1?"=":"-").repeat(g.length-(Math.max(g.lastIndexOf("\r"),g.lastIndexOf(`
|
|
476
|
+
`))+1))}const s="#".repeat(a),l=n.enter("headingAtx"),c=n.enter("phrasing");i.move(s+" ");let d=n.containerPhrasing(e,{before:"# ",after:`
|
|
477
|
+
`,...i.current()});return/^[\t ]/.test(d)&&(d=sf(d.charCodeAt(0))+d.slice(1)),d=d?s+" "+d:s,n.options.closeAtx&&(d+=" "+s),c(),l(),d}xH.peek=Fle;function xH(e){return e.value||""}function Fle(){return"<"}bH.peek=Hle;function bH(e,t,n,r){const a=pN(n),i=a==='"'?"Quote":"Apostrophe",s=n.enter("image");let l=n.enter("label");const c=n.createTracker(r);let d=c.move("![");return d+=c.move(n.safe(e.alt,{before:d,after:"]",...c.current()})),d+=c.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),d+=c.move("<"),d+=c.move(n.safe(e.url,{before:d,after:">",...c.current()})),d+=c.move(">")):(l=n.enter("destinationRaw"),d+=c.move(n.safe(e.url,{before:d,after:e.title?" ":")",...c.current()}))),l(),e.title&&(l=n.enter(`title${i}`),d+=c.move(" "+a),d+=c.move(n.safe(e.title,{before:d,after:a,...c.current()})),d+=c.move(a),l()),d+=c.move(")"),s(),d}function Hle(){return"!"}wH.peek=Ule;function wH(e,t,n,r){const a=e.referenceType,i=n.enter("imageReference");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");const d=n.safe(e.alt,{before:c,after:"]",...l.current()});c+=l.move(d+"]["),s();const h=n.stack;n.stack=[],s=n.enter("reference");const m=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return s(),n.stack=h,i(),a==="full"||!d||d!==m?c+=l.move(m+"]"):a==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function Ule(){return"!"}SH.peek=Gle;function SH(e,t,n){let r=e.value||"",a="`",i=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(r);)a+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const s=n.unsafe[i],l=n.compilePattern(s);let c;if(s.atBreak)for(;c=l.exec(r);){let d=c.index;r.charCodeAt(d)===10&&r.charCodeAt(d-1)===13&&d--,r=r.slice(0,d)+" "+r.slice(c.index+1)}}return a+r+a}function Gle(){return"`"}function jH(e,t){const n=sN(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}kH.peek=Vle;function kH(e,t,n,r){const a=pN(n),i=a==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let l,c;if(jH(e,n)){const h=n.stack;n.stack=[],l=n.enter("autolink");let m=s.move("<");return m+=s.move(n.containerPhrasing(e,{before:m,after:">",...s.current()})),m+=s.move(">"),l(),n.stack=h,m}l=n.enter("link"),c=n.enter("label");let d=s.move("[");return d+=s.move(n.containerPhrasing(e,{before:d,after:"](",...s.current()})),d+=s.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),d+=s.move("<"),d+=s.move(n.safe(e.url,{before:d,after:">",...s.current()})),d+=s.move(">")):(c=n.enter("destinationRaw"),d+=s.move(n.safe(e.url,{before:d,after:e.title?" ":")",...s.current()}))),c(),e.title&&(c=n.enter(`title${i}`),d+=s.move(" "+a),d+=s.move(n.safe(e.title,{before:d,after:a,...s.current()})),d+=s.move(a),c()),d+=s.move(")"),l(),d}function Vle(e,t,n){return jH(e,n)?"<":"["}_H.peek=Kle;function _H(e,t,n,r){const a=e.referenceType,i=n.enter("linkReference");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");const d=n.containerPhrasing(e,{before:c,after:"]",...l.current()});c+=l.move(d+"]["),s();const h=n.stack;n.stack=[],s=n.enter("reference");const m=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return s(),n.stack=h,i(),a==="full"||!d||d!==m?c+=l.move(m+"]"):a==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function Kle(){return"["}function gN(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Wle(e){const t=gN(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Yle(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function CH(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Xle(e,t,n,r){const a=n.enter("list"),i=n.bulletCurrent;let s=e.ordered?Yle(n):gN(n);const l=e.ordered?s==="."?")":".":Wle(n);let c=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&h&&(!h.children||!h.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),CH(n)===s&&h){let m=-1;for(;++m<e.children.length;){const g=e.children[m];if(g&&g.type==="listItem"&&g.children&&g.children[0]&&g.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(s=l),n.bulletCurrent=s;const d=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=i,a(),d}function Zle(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Qle(e,t,n,r){const a=Zle(n);let i=n.bulletCurrent||gN(n);t&&t.type==="list"&&t.ordered&&(i=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+i);let s=i.length+1;(a==="tab"||a==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const l=n.createTracker(r);l.move(i+" ".repeat(s-i.length)),l.shift(s);const c=n.enter("listItem"),d=n.indentLines(n.containerFlow(e,l.current()),h);return c(),d;function h(m,g,v){return g?(v?"":" ".repeat(s))+m:(v?i:i+" ".repeat(s-i.length))+m}}function Jle(e,t,n,r){const a=n.enter("paragraph"),i=n.enter("phrasing"),s=n.containerPhrasing(e,r);return i(),a(),s}const eue=Wg(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function tue(e,t,n,r){return(e.children.some(function(s){return eue(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function nue(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}NH.peek=rue;function NH(e,t,n,r){const a=nue(n),i=n.enter("strong"),s=n.createTracker(r),l=s.move(a+a);let c=s.move(n.containerPhrasing(e,{after:a,before:l,...s.current()}));const d=c.charCodeAt(0),h=Pp(r.before.charCodeAt(r.before.length-1),d,a);h.inside&&(c=sf(d)+c.slice(1));const m=c.charCodeAt(c.length-1),g=Pp(r.after.charCodeAt(0),m,a);g.inside&&(c=c.slice(0,-1)+sf(m));const v=s.move(a+a);return i(),n.attentionEncodeSurroundingInfo={after:g.outside,before:h.outside},l+c+v}function rue(e,t,n){return n.options.strong||"*"}function aue(e,t,n,r){return n.safe(e.value,r)}function iue(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function sue(e,t,n){const r=(CH(n)+(n.options.ruleSpaces?" ":"")).repeat(iue(n));return n.options.ruleSpaces?r.slice(0,-1):r}const EH={blockquote:Ale,break:ZD,code:Rle,definition:Lle,emphasis:yH,hardBreak:ZD,heading:Ble,html:xH,image:bH,imageReference:wH,inlineCode:SH,link:kH,linkReference:_H,list:Xle,listItem:Qle,paragraph:Jle,root:tue,strong:NH,text:aue,thematicBreak:sue};function oue(){return{enter:{table:lue,tableData:QD,tableHeader:QD,tableRow:cue},exit:{codeText:due,table:uue,tableData:Z0,tableHeader:Z0,tableRow:Z0}}}function lue(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function uue(e){this.exit(e),this.data.inTable=void 0}function cue(e){this.enter({type:"tableRow",children:[]},e)}function Z0(e){this.exit(e)}function QD(e){this.enter({type:"tableCell",children:[]},e)}function due(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,fue));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function fue(e,t){return t==="|"?t:e}function hue(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,a=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
478
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:g,table:s,tableCell:c,tableRow:l}};function s(v,b,w,S){return d(h(v,w,S),v.align)}function l(v,b,w,S){const j=m(v,w,S),_=d([j]);return _.slice(0,_.indexOf(`
|
|
479
|
+
`))}function c(v,b,w,S){const j=w.enter("tableCell"),_=w.enter("phrasing"),k=w.containerPhrasing(v,{...S,before:i,after:i});return _(),j(),k}function d(v,b){return Nle(v,{align:b,alignDelimiters:r,padding:n,stringLength:a})}function h(v,b,w){const S=v.children;let j=-1;const _=[],k=b.enter("table");for(;++j<S.length;)_[j]=m(S[j],b,w);return k(),_}function m(v,b,w){const S=v.children;let j=-1;const _=[],k=b.enter("tableRow");for(;++j<S.length;)_[j]=c(S[j],v,b,w);return k(),_}function g(v,b,w){let S=EH.inlineCode(v,b,w);return w.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function mue(){return{exit:{taskListCheckValueChecked:JD,taskListCheckValueUnchecked:JD,paragraph:gue}}}function pue(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:vue}}}function JD(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function gue(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const a=t.children;let i=-1,s;for(;++i<a.length;){const l=a[i];if(l.type==="paragraph"){s=l;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function vue(e,t,n,r){const a=e.children[0],i=typeof e.checked=="boolean"&&a&&a.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);i&&l.move(s);let c=EH.listItem(e,t,n,{...r,...l.current()});return i&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,d)),c;function d(h){return h+s}}function yue(){return[Xoe(),vle(),wle(),oue(),mue()]}function xue(e){return{extensions:[Zoe(),yle(e),Sle(),hue(e),pue()]}}const bue={tokenize:Cue,partial:!0},AH={tokenize:Nue,partial:!0},TH={tokenize:Eue,partial:!0},OH={tokenize:Aue,partial:!0},wue={tokenize:Tue,partial:!0},MH={name:"wwwAutolink",tokenize:kue,previous:DH},PH={name:"protocolAutolink",tokenize:_ue,previous:RH},os={name:"emailAutolink",tokenize:jue,previous:IH},xi={};function Sue(){return{text:xi}}let Lo=48;for(;Lo<123;)xi[Lo]=os,Lo++,Lo===58?Lo=65:Lo===91&&(Lo=97);xi[43]=os;xi[45]=os;xi[46]=os;xi[95]=os;xi[72]=[os,PH];xi[104]=[os,PH];xi[87]=[os,MH];xi[119]=[os,MH];function jue(e,t,n){const r=this;let a,i;return s;function s(m){return!_C(m)||!IH.call(r,r.previous)||vN(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(m))}function l(m){return _C(m)?(e.consume(m),l):m===64?(e.consume(m),c):n(m)}function c(m){return m===46?e.check(wue,h,d)(m):m===45||m===95||cr(m)?(i=!0,e.consume(m),c):h(m)}function d(m){return e.consume(m),a=!0,c}function h(m){return i&&a&&vr(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function kue(e,t,n){const r=this;return a;function a(s){return s!==87&&s!==119||!DH.call(r,r.previous)||vN(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(bue,e.attempt(AH,e.attempt(TH,i),n),n)(s))}function i(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function _ue(e,t,n){const r=this;let a="",i=!1;return s;function s(m){return(m===72||m===104)&&RH.call(r,r.previous)&&!vN(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(m),e.consume(m),l):n(m)}function l(m){if(vr(m)&&a.length<5)return a+=String.fromCodePoint(m),e.consume(m),l;if(m===58){const g=a.toLowerCase();if(g==="http"||g==="https")return e.consume(m),c}return n(m)}function c(m){return m===47?(e.consume(m),i?d:(i=!0,c)):n(m)}function d(m){return m===null||Tp(m)||Xt(m)||nl(m)||Gg(m)?n(m):e.attempt(AH,e.attempt(TH,h),n)(m)}function h(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function Cue(e,t,n){let r=0;return a;function a(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),a):s===46&&r===3?(e.consume(s),i):n(s)}function i(s){return s===null?n(s):t(s)}}function Nue(e,t,n){let r,a,i;return s;function s(d){return d===46||d===95?e.check(OH,c,l)(d):d===null||Xt(d)||nl(d)||d!==45&&Gg(d)?c(d):(i=!0,e.consume(d),s)}function l(d){return d===95?r=!0:(a=r,r=void 0),e.consume(d),s}function c(d){return a||r||!i?n(d):t(d)}}function Eue(e,t){let n=0,r=0;return a;function a(s){return s===40?(n++,e.consume(s),a):s===41&&r<n?i(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(OH,t,i)(s):s===null||Xt(s)||nl(s)?t(s):(e.consume(s),a)}function i(s){return s===41&&r++,e.consume(s),a}}function Aue(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),i):l===93?(e.consume(l),a):l===60||l===null||Xt(l)||nl(l)?t(l):n(l)}function a(l){return l===null||l===40||l===91||Xt(l)||nl(l)?t(l):r(l)}function i(l){return vr(l)?s(l):n(l)}function s(l){return l===59?(e.consume(l),r):vr(l)?(e.consume(l),s):n(l)}}function Tue(e,t,n){return r;function r(i){return e.consume(i),a}function a(i){return cr(i)?n(i):t(i)}}function DH(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Xt(e)}function RH(e){return!vr(e)}function IH(e){return!(e===47||_C(e))}function _C(e){return e===43||e===45||e===46||e===95||cr(e)}function vN(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Oue={tokenize:$ue,partial:!0};function Mue(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Iue,continuation:{tokenize:Lue},exit:zue}},text:{91:{name:"gfmFootnoteCall",tokenize:Rue},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Pue,resolveTo:Due}}}}function Pue(e,t,n){const r=this;let a=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;a--;){const c=r.events[a][1];if(c.type==="labelImage"){s=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return l;function l(c){if(!s||!s._balanced)return n(c);const d=Ra(r.sliceSerialize({start:s.end,end:r.now()}));return d.codePointAt(0)!==94||!i.includes(d.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function Due(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function Rue(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,s;return l;function l(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),c}function c(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",d)}function d(m){if(i>999||m===93&&!s||m===null||m===91||Xt(m))return n(m);if(m===93){e.exit("chunkString");const g=e.exit("gfmFootnoteCallString");return a.includes(Ra(r.sliceSerialize(g)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return Xt(m)||(s=!0),i++,e.consume(m),m===92?h:d}function h(m){return m===91||m===92||m===93?(e.consume(m),i++,d):d(m)}}function Iue(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,s=0,l;return c;function c(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(b){return b===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(b)}function h(b){if(s>999||b===93&&!l||b===null||b===91||Xt(b))return n(b);if(b===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return i=Ra(r.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),g}return Xt(b)||(l=!0),s++,e.consume(b),b===92?m:h}function m(b){return b===91||b===92||b===93?(e.consume(b),s++,h):h(b)}function g(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),a.includes(i)||a.push(i),Tt(e,v,"gfmFootnoteDefinitionWhitespace")):n(b)}function v(b){return t(b)}}function Lue(e,t,n){return e.check(If,t,e.attempt(Oue,t,n))}function zue(e){e.exit("gfmFootnoteDefinition")}function $ue(e,t,n){const r=this;return Tt(e,a,"gfmFootnoteDefinitionIndent",5);function a(i){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(i):n(i)}}function que(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:i,resolveAll:a};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function a(s,l){let c=-1;for(;++c<s.length;)if(s[c][0]==="enter"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._close){let d=c;for(;d--;)if(s[d][0]==="exit"&&s[d][1].type==="strikethroughSequenceTemporary"&&s[d][1]._open&&s[c][1].end.offset-s[c][1].start.offset===s[d][1].end.offset-s[d][1].start.offset){s[c][1].type="strikethroughSequence",s[d][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},s[d][1].start),end:Object.assign({},s[c][1].end)},m={type:"strikethroughText",start:Object.assign({},s[d][1].end),end:Object.assign({},s[c][1].start)},g=[["enter",h,l],["enter",s[d][1],l],["exit",s[d][1],l],["enter",m,l]],v=l.parser.constructs.insideSpan.null;v&&Yr(g,g.length,0,Vg(v,s.slice(d+1,c),l)),Yr(g,g.length,0,[["exit",m,l],["enter",s[c][1],l],["exit",s[c][1],l],["exit",h,l]]),Yr(s,d-1,c-d+3,g),c=d+g.length-2;break}}for(c=-1;++c<s.length;)s[c][1].type==="strikethroughSequenceTemporary"&&(s[c][1].type="data");return s}function i(s,l,c){const d=this.previous,h=this.events;let m=0;return g;function g(b){return d===126&&h[h.length-1][1].type!=="characterEscape"?c(b):(s.enter("strikethroughSequenceTemporary"),v(b))}function v(b){const w=qu(d);if(b===126)return m>1?c(b):(s.consume(b),m++,v);if(m<2&&!n)return c(b);const S=s.exit("strikethroughSequenceTemporary"),j=qu(b);return S._open=!j||j===2&&!!w,S._close=!w||w===2&&!!j,l(b)}}}class Bue{constructor(){this.map=[]}add(t,n,r){Fue(this,t,n,r)}consume(t){if(this.map.sort(function(i,s){return i[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let a=r.pop();for(;a;){for(const i of a)t.push(i);a=r.pop()}this.map.length=0}}function Fue(e,t,n,r){let a=0;if(!(n===0&&r.length===0)){for(;a<e.map.length;){if(e.map[a][0]===t){e.map[a][1]+=n,e.map[a][2].push(...r);return}a+=1}e.map.push([t,n,r])}}function Hue(e,t){let n=!1;const r=[];for(;t<e.length;){const a=e[t];if(n){if(a[0]==="enter")a[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(a[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=r.length-1;r[i]=r[i]==="left"?"center":"right"}}else if(a[1].type==="tableDelimiterRow")break}else a[0]==="enter"&&a[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Uue(){return{flow:{null:{name:"table",tokenize:Gue,resolveAll:Vue}}}}function Gue(e,t,n){const r=this;let a=0,i=0,s;return l;function l(D){let q=r.events.length-1;for(;q>-1;){const R=r.events[q][1].type;if(R==="lineEnding"||R==="linePrefix")q--;else break}const z=q>-1?r.events[q][1].type:null,F=z==="tableHead"||z==="tableRow"?A:c;return F===A&&r.parser.lazy[r.now().line]?n(D):F(D)}function c(D){return e.enter("tableHead"),e.enter("tableRow"),d(D)}function d(D){return D===124||(s=!0,i+=1),h(D)}function h(D){return D===null?n(D):rt(D)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),v):n(D):wt(D)?Tt(e,h,"whitespace")(D):(i+=1,s&&(s=!1,a+=1),D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),s=!0,h):(e.enter("data"),m(D)))}function m(D){return D===null||D===124||Xt(D)?(e.exit("data"),h(D)):(e.consume(D),D===92?g:m)}function g(D){return D===92||D===124?(e.consume(D),m):m(D)}function v(D){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(D):(e.enter("tableDelimiterRow"),s=!1,wt(D)?Tt(e,b,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):b(D))}function b(D){return D===45||D===58?S(D):D===124?(s=!0,e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),w):T(D)}function w(D){return wt(D)?Tt(e,S,"whitespace")(D):S(D)}function S(D){return D===58?(i+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),j):D===45?(i+=1,j(D)):D===null||rt(D)?E(D):T(D)}function j(D){return D===45?(e.enter("tableDelimiterFiller"),_(D)):T(D)}function _(D){return D===45?(e.consume(D),_):D===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),k):(e.exit("tableDelimiterFiller"),k(D))}function k(D){return wt(D)?Tt(e,E,"whitespace")(D):E(D)}function E(D){return D===124?b(D):D===null||rt(D)?!s||a!==i?T(D):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(D)):T(D)}function T(D){return n(D)}function A(D){return e.enter("tableRow"),O(D)}function O(D){return D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),O):D===null||rt(D)?(e.exit("tableRow"),t(D)):wt(D)?Tt(e,O,"whitespace")(D):(e.enter("data"),I(D))}function I(D){return D===null||D===124||Xt(D)?(e.exit("data"),O(D)):(e.consume(D),D===92?P:I)}function P(D){return D===92||D===124?(e.consume(D),I):I(D)}}function Vue(e,t){let n=-1,r=!0,a=0,i=[0,0,0,0],s=[0,0,0,0],l=!1,c=0,d,h,m;const g=new Bue;for(;++n<e.length;){const v=e[n],b=v[1];v[0]==="enter"?b.type==="tableHead"?(l=!1,c!==0&&(eR(g,t,c,d,h),h=void 0,c=0),d={type:"table",start:Object.assign({},b.start),end:Object.assign({},b.end)},g.add(n,0,[["enter",d,t]])):b.type==="tableRow"||b.type==="tableDelimiterRow"?(r=!0,m=void 0,i=[0,0,0,0],s=[0,n+1,0,0],l&&(l=!1,h={type:"tableBody",start:Object.assign({},b.start),end:Object.assign({},b.end)},g.add(n,0,[["enter",h,t]])),a=b.type==="tableDelimiterRow"?2:h?3:1):a&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(i[1]!==0&&(s[0]=s[1],m=Im(g,t,i,a,void 0,m),i=[0,0,0,0]),s[2]=n)):b.type==="tableCellDivider"&&(r?r=!1:(i[1]!==0&&(s[0]=s[1],m=Im(g,t,i,a,void 0,m)),i=s,s=[i[1],n,0,0])):b.type==="tableHead"?(l=!0,c=n):b.type==="tableRow"||b.type==="tableDelimiterRow"?(c=n,i[1]!==0?(s[0]=s[1],m=Im(g,t,i,a,n,m)):s[1]!==0&&(m=Im(g,t,s,a,n,m)),a=0):a&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(s[3]=n)}for(c!==0&&eR(g,t,c,d,h),g.consume(t.events),n=-1;++n<t.events.length;){const v=t.events[n];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=Hue(t.events,n))}return e}function Im(e,t,n,r,a,i){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(i.end=Object.assign({},Cu(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const c=Cu(t.events,n[1]);if(i={type:s,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",i,t]]),n[2]!==0){const d=Cu(t.events,n[2]),h=Cu(t.events,n[3]),m={type:l,start:Object.assign({},d),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const g=t.events[n[2]],v=t.events[n[3]];if(g[1].end=Object.assign({},v[1].end),g[1].type="chunkText",g[1].contentType="text",n[3]>n[2]+1){const b=n[2]+1,w=n[3]-n[2]-1;e.add(b,w,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return a!==void 0&&(i.end=Object.assign({},Cu(t.events,a)),e.add(a,0,[["exit",i,t]]),i=void 0),i}function eR(e,t,n,r,a){const i=[],s=Cu(t.events,n);a&&(a.end=Object.assign({},s),i.push(["exit",a,t])),r.end=Object.assign({},s),i.push(["exit",r,t]),e.add(n+1,0,i)}function Cu(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Kue={name:"tasklistCheck",tokenize:Yue};function Wue(){return{text:{91:Kue}}}function Yue(e,t,n){const r=this;return a;function a(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),i)}function i(c){return Xt(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),s):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),s):n(c)}function s(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(c)}function l(c){return rt(c)?t(c):wt(c)?e.check({tokenize:Xue},t,n)(c):n(c)}}function Xue(e,t,n){return Tt(e,r,"whitespace");function r(a){return a===null?n(a):t(a)}}function Zue(e){return K8([Sue(),Mue(),que(e),Uue(),Wue()])}const Que={};function Jue(e){const t=this,n=e||Que,r=t.data(),a=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);a.push(Zue(n)),i.push(yue()),s.push(xue(n))}function LH({content:e,className:t}){return f.jsx("div",{className:`markdown-content ${t??""}`,children:f.jsx(qoe,{remarkPlugins:[Jue],components:{a:({href:n,children:r})=>f.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer",children:r})},children:e})})}const Qa={bg:"#1e1e1e",border:"#3c3c3c",cursor:"#aeafad",timestamp:"#6a9955",prefix:{info:"#569cd6",error:"#f44747",output:"#9cdcfe",commit:"#4ec9b0",input:"#c586c0",prompt:"#c586c0",warning:"#dcdcaa",assistant:"#b392f0",tool_use:"#79c0ff",tool_result:"#56d364"},message:{info:"#9cdcfe",error:"#f1807e",output:"#d4d4d4",commit:"#a8c990",input:"#ce9178",prompt:"#c586c0",warning:"#dcdcaa",assistant:"#e6e6e6",tool_use:"#8b949e",tool_result:"#7ee787"}},tR={info:"[INF]",error:"[ERR]",output:"[OUT]",commit:"[GIT]",input:"[>>>]",prompt:"[PRM]",warning:"[WRN]",assistant:"[CLU]",tool_use:"[USE]",tool_result:"[RES]"};function ece(e,t){const n=[],r=/(\*\*(.+?)\*\*)|(`(.+?)`)|(\*(.+?)\*)/g;let a=0,i,s=0;for(;(i=r.exec(e))!==null;)i.index>a&&n.push(e.slice(a,i.index)),i[1]?n.push(f.jsx("strong",{style:{color:"#d7ba7d",fontWeight:700},children:i[2]},s++)):i[3]?n.push(f.jsx("code",{style:{color:"#ce9178",background:"rgba(255,255,255,0.07)",padding:"0 3px",borderRadius:3,fontSize:"0.7rem"},children:i[4]},s++)):i[5]&&n.push(f.jsx("em",{style:{color:t,opacity:.75,fontStyle:"italic"},children:i[6]},s++)),a=i.index+i[0].length;return a<e.length&&n.push(e.slice(a)),n.length>0?n:[e]}function Q0(e){try{const n=JSON.parse(e);if(n&&typeof n.tool=="string")return n}catch{}const t=e.match(/^\[Tool:\s*(\w+)\](.*)$/);return t?{tool:t[1],summary:t[2].trim()}:null}function Xg({logs:e,interactive:t,todoId:n,onSendInput:r,embedded:a}){const i=x.useRef(null),[s,l]=x.useState(""),[c,d]=x.useState(!1),[h,m]=x.useState(!1),g=x.useRef(0),[v,b]=x.useState(new Set),{t:w}=Ze(),S=x.useMemo(()=>e.some(P=>P.log_type==="assistant"||P.log_type==="tool_use"),[e]),[j,_]=x.useState("chat");x.useEffect(()=>{_(S?"chat":"raw")},[S]),x.useEffect(()=>{i.current&&(i.current.scrollTop=i.current.scrollHeight)},[e]),x.useEffect(()=>{if(!h||e.length===0)return;const P=Date.now()-g.current,D=e[e.length-1];if(D.log_type==="output"||D.log_type==="error"||D.log_type==="commit"||D.log_type==="assistant")if(P>=1e3)m(!1);else{const q=setTimeout(()=>m(!1),1e3-P);return()=>clearTimeout(q)}},[e,h]);const k=P=>{P.preventDefault(),!(!s.trim()||!n||!r)&&(r(n,s),l(""),m(!0),g.current=Date.now())},E=async()=>{const P=e.map(D=>{const q=new Date(D.created_at).toLocaleTimeString();if(j==="chat"){if(D.log_type==="assistant")return`${q} [Claude]
|
|
480
|
+
${D.message}
|
|
481
|
+
`;if(D.log_type==="tool_use"){const z=Q0(D.message);return z?`${q} [Tool: ${z.tool}] ${z.summary}`:`${q} [USE] ${D.message}`}if(D.log_type==="tool_result")return`${q} [Result] ${D.message.slice(0,200)}`}return`${q} ${tR[D.log_type]||"[???]"} ${D.message}`}).join(`
|
|
482
|
+
`);await navigator.clipboard.writeText(P),d(!0),setTimeout(()=>d(!1),2e3)},T=P=>{b(D=>{const q=new Set(D);return q.has(P)?q.delete(P):q.add(P),q})},A=P=>{const D=new Date(P.created_at).toLocaleTimeString(),q=Qa.prefix[P.log_type]||Qa.prefix.output,z=Qa.message[P.log_type]||Qa.message.output;return f.jsxs("div",{className:"mb-0.5 leading-relaxed",children:[f.jsx("span",{style:{color:Qa.timestamp},children:D})," ",f.jsx("span",{style:{color:q,fontWeight:700},children:tR[P.log_type]||"[???]"})," ",f.jsx("span",{style:{color:z},children:ece(P.message,z)})]},P.id)},O=P=>{if(P.log_type==="assistant")return f.jsx("div",{style:{borderLeft:"3px solid #b392f0",background:"rgba(179, 146, 240, 0.06)",borderRadius:8,padding:"8px 12px",margin:"6px 0"},children:f.jsx(LH,{content:P.message,className:"markdown-content-dark"})},P.id);if(P.log_type==="tool_use"){const D=Q0(P.message),q=v.has(P.id);return D?f.jsxs("div",{style:{margin:"2px 0",fontSize:"0.7rem"},children:[f.jsxs("button",{onClick:()=>T(P.id),style:{background:"none",border:"none",cursor:"pointer",padding:"2px 4px",fontFamily:"monospace",fontSize:"0.7rem",display:"flex",alignItems:"center",gap:6,width:"100%",textAlign:"left",borderRadius:4,transition:"background 0.15s"},onMouseEnter:z=>z.currentTarget.style.background="rgba(255,255,255,0.05)",onMouseLeave:z=>z.currentTarget.style.background="none",children:[f.jsx("span",{style:{color:"#6a9955",fontSize:"0.6rem"},children:q?"▾":"▸"}),f.jsx("span",{style:{color:"#79c0ff",fontWeight:600},children:D.tool}),f.jsx("span",{style:{color:"#8b949e",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:D.summary})]}),q&&D.input&&f.jsx("pre",{style:{background:"rgba(0,0,0,0.25)",border:"1px solid #3c3c3c",borderRadius:6,padding:"6px 10px",margin:"2px 0 2px 18px",fontSize:"0.65rem",color:"#8b949e",overflow:"auto",maxHeight:200},children:JSON.stringify(D.input,null,2)})]},P.id):A(P)}if(P.log_type==="tool_result"){const D=v.has(P.id),q=P.message.split(`
|
|
483
|
+
`).slice(0,3).join(`
|
|
484
|
+
`);return f.jsxs("div",{style:{margin:"1px 0 1px 18px",fontSize:"0.65rem"},children:[f.jsx("button",{onClick:()=>T(P.id),style:{background:"none",border:"none",cursor:"pointer",padding:"1px 4px",fontFamily:"monospace",fontSize:"0.65rem",color:"#56d364",opacity:.5},children:D?"▾ Result":"▸ Result"}),D&&f.jsx("pre",{style:{background:"rgba(0,0,0,0.2)",border:"1px solid #3c3c3c",borderRadius:6,padding:"4px 8px",margin:"2px 0",fontSize:"0.6rem",color:"#7ee787",opacity:.6,overflow:"auto",maxHeight:300},children:P.message}),!D&&q!==P.message&&f.jsxs("span",{style:{color:"#56d364",opacity:.3,marginLeft:8},children:[q.slice(0,80),"..."]})]},P.id)}if(P.log_type==="output"){const D=Q0(P.message);if(D){const q=v.has(P.id);return f.jsxs("div",{style:{margin:"2px 0",fontSize:"0.7rem"},children:[f.jsxs("button",{onClick:()=>T(P.id),style:{background:"none",border:"none",cursor:"pointer",padding:"2px 4px",fontFamily:"monospace",fontSize:"0.7rem",display:"flex",alignItems:"center",gap:6},onMouseEnter:z=>z.currentTarget.style.background="rgba(255,255,255,0.05)",onMouseLeave:z=>z.currentTarget.style.background="none",children:[f.jsx("span",{style:{color:"#6a9955",fontSize:"0.6rem"},children:q?"▾":"▸"}),f.jsx("span",{style:{color:"#79c0ff",fontWeight:600},children:D.tool}),f.jsx("span",{style:{color:"#8b949e"},children:D.summary})]}),q&&D.input&&f.jsx("pre",{style:{background:"rgba(0,0,0,0.25)",border:"1px solid #3c3c3c",borderRadius:6,padding:"6px 10px",margin:"2px 0 2px 18px",fontSize:"0.65rem",color:"#8b949e",overflow:"auto",maxHeight:200},children:JSON.stringify(D.input,null,2)})]},P.id)}}return A(P)},I=P=>({padding:"1px 6px",fontSize:"9px",fontFamily:"monospace",borderRadius:3,background:P?"#3c3c3c":"transparent",color:P?"#d4d4d4":"#858585",border:"none",cursor:"pointer",transition:"all 0.15s"});return f.jsxs("div",{className:"flex flex-col",children:[f.jsxs("div",{className:"relative",children:[e.length>0&&!a&&f.jsxs("div",{style:{position:"absolute",top:8,right:8,zIndex:10,display:"flex",alignItems:"center",gap:4},children:[f.jsxs("div",{style:{display:"flex",borderRadius:4,border:"1px solid #3c3c3c",overflow:"hidden"},children:[f.jsx("button",{onClick:()=>_("chat"),style:I(j==="chat"),children:w("log.viewChat")}),f.jsx("button",{onClick:()=>_("raw"),style:I(j==="raw"),children:w("log.viewRaw")})]}),f.jsx("button",{onClick:E,style:{padding:"2px 8px",fontSize:"10px",fontFamily:"monospace",borderRadius:4,background:"#2d2d2d",color:"#858585",border:"1px solid #3c3c3c",cursor:"pointer",transition:"color 0.15s"},onMouseEnter:P=>P.currentTarget.style.color="#d4d4d4",onMouseLeave:P=>P.currentTarget.style.color="#858585",children:w(c?"log.copied":"log.copy")})]}),f.jsxs("div",{ref:i,className:a?"max-h-64 overflow-y-auto overflow-x-auto font-mono text-xs":"h-48 sm:h-64 overflow-y-auto overflow-x-auto rounded-xl p-3 sm:p-4 font-mono text-xs",style:a?void 0:{backgroundColor:Qa.bg,border:`1px solid ${Qa.border}`},children:[e.length===0?f.jsx("p",{style:{color:"#6a9955"},children:w("log.awaiting")}):e.map(P=>j==="chat"?O(P):A(P)),t&&h&&f.jsxs("div",{className:"mb-0.5 leading-relaxed",children:[f.jsxs("span",{className:"inline-flex gap-1",style:{color:"#569cd6"},children:[f.jsx("span",{className:"animate-bounce",style:{animationDelay:"0ms",animationDuration:"1.2s"},children:"●"}),f.jsx("span",{className:"animate-bounce",style:{animationDelay:"200ms",animationDuration:"1.2s"},children:"●"}),f.jsx("span",{className:"animate-bounce",style:{animationDelay:"400ms",animationDuration:"1.2s"},children:"●"})]}),f.jsx("span",{className:"ml-2",style:{color:"#6a9955",fontSize:"0.65rem"},children:w("log.waitingResponse")})]}),f.jsx("span",{style:{color:Qa.cursor},className:"animate-pulse",children:"_"})]})]}),t&&f.jsxs("form",{onSubmit:k,style:a?{display:"flex",alignItems:"center",gap:8,padding:"4px 0",marginTop:4}:{display:"flex",alignItems:"center",gap:8,backgroundColor:Qa.bg,border:`1px solid ${Qa.border}`,borderTop:"none",borderBottomLeftRadius:12,borderBottomRightRadius:12,padding:"6px 16px"},children:[f.jsx("span",{style:{color:"#569cd6",fontFamily:"monospace",fontWeight:700,fontSize:12},children:"$"}),f.jsx("input",{type:"text",value:s,onChange:P=>l(P.target.value),style:{flex:1,background:"transparent",border:"none",outline:"none",color:"#ce9178",fontFamily:"monospace",fontSize:12},placeholder:w("todo.sendPlaceholder"),autoFocus:!0}),f.jsx("button",{type:"submit",style:{color:"#569cd6",fontFamily:"monospace",fontWeight:700,fontSize:12,letterSpacing:"0.05em",background:"none",border:"none",cursor:"pointer"},onMouseEnter:P=>P.currentTarget.style.color="#9cdcfe",onMouseLeave:P=>P.currentTarget.style.color="#569cd6",children:"SEND"})]})]})}let tce=0;function Zg({onSave:e,onCancel:t,initialTitle:n="",initialDescription:r="",initialCliTool:a,initialCliModel:i,initialDependsOn:s,initialMaxTurns:l,initialUseWorktree:c=null,projectCliTool:d="claude",projectCliModel:h="",projectIsGitRepo:m=!1,projectUseWorktree:g=!0,existingImages:v=[],todoId:b,onDeleteImage:w,availableTodos:S=[]}){const[j,_]=x.useState(n),[k,E]=x.useState(r),[T,A]=x.useState(a||d||"claude"),[O,I]=x.useState(i??h??""),[P,D]=x.useState(s??""),[q,z]=x.useState((l==null?void 0:l.toString())??""),[F,R]=x.useState(c===1?"force-on":c===0?"force-off":"inherit"),[M,L]=x.useState([]),[G,W]=x.useState(v),Y=x.useRef(null),B=x.useRef(null),{t:H}=Ze(),{getToolConfig:K}=oc(),U=K(T),X=ae=>{A(ae),I("")},J=x.useCallback(ae=>{const oe=Array.from(ae).filter(fe=>fe.type.startsWith("image/"));for(const fe of oe){const Ce=new FileReader;Ce.onload=()=>{const Te=Ce.result,pe=`pending-${++tce}`;L(De=>[...De,{id:pe,name:fe.name,data:Te,preview:Te}])},Ce.readAsDataURL(fe)}},[]),Q=x.useCallback(ae=>{var Te;const oe=(Te=ae.clipboardData)==null?void 0:Te.items;if(!oe)return;const fe=[];for(let pe=0;pe<oe.length;pe++)oe[pe].type.startsWith("image/")&&fe.push(oe[pe]);if(fe.length===0)return;ae.preventDefault();const Ce=[];for(const pe of fe){const De=pe.getAsFile();De&&Ce.push(De)}J(Ce)},[J]),re=x.useCallback(ae=>{var oe;ae.preventDefault(),ae.stopPropagation(),(oe=ae.dataTransfer)!=null&&oe.files&&J(ae.dataTransfer.files)},[J]),ue=x.useCallback(ae=>{ae.preventDefault(),ae.stopPropagation()},[]),Z=ae=>{L(oe=>oe.filter(fe=>fe.id!==ae))},se=ae=>{w&&w(ae),W(oe=>oe.filter(fe=>fe.id!==ae))},ce=ae=>{if(ae.preventDefault(),!j.trim())return;const oe=q?parseInt(q,10):void 0,fe=F==="force-on"?1:F==="force-off"?0:null;e(j.trim(),k.trim(),T,O||void 0,M.length>0?M:void 0,P||void 0,oe||void 0,fe)},ee=G.length+M.length;return f.jsxs("form",{onSubmit:ce,className:"card p-5 border-accent/30",children:[f.jsx("div",{className:"mb-3",children:f.jsx("input",{type:"text",placeholder:H("todoForm.titlePlaceholder"),value:j,onChange:ae=>_(ae.target.value),className:"input-field",autoFocus:!0})}),f.jsxs("div",{className:"mb-4",children:[f.jsx("textarea",{ref:Y,placeholder:H("todoForm.descPlaceholder"),value:k,onChange:ae=>E(ae.target.value),onPaste:Q,onDrop:re,onDragOver:ue,rows:3,className:"input-field resize-none"}),f.jsxs("div",{className:"flex items-center gap-2 mt-1.5",children:[f.jsxs("button",{type:"button",onClick:()=>{var ae;return(ae=B.current)==null?void 0:ae.click()},className:"inline-flex items-center gap-1 px-2 py-1 rounded text-2xs font-medium text-warm-400 hover:text-warm-600 hover:bg-warm-100 transition-colors",children:[f.jsx(ef,{size:14}),H("todoForm.addImage")]}),f.jsx("span",{className:"text-2xs text-warm-300",children:H("todoForm.pasteHint")})]}),f.jsx("input",{ref:B,type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:ae=>{ae.target.files&&J(ae.target.files),ae.target.value=""}})]}),ee>0&&f.jsxs("div",{className:"mb-4",children:[f.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[f.jsx("h4",{className:"text-xs font-semibold text-warm-500 uppercase tracking-wider",children:H("todoForm.images")}),f.jsxs("span",{className:"text-2xs text-warm-400",children:["(",ee,")"]})]}),f.jsxs("div",{className:"flex flex-wrap gap-2",children:[G.map(ae=>f.jsxs("div",{className:"relative group",children:[f.jsx("img",{src:b?rf(b,ae.id):"",alt:ae.originalName,className:"h-20 w-20 object-cover rounded-lg border border-warm-200"}),f.jsx("button",{type:"button",onClick:()=>se(ae.id),className:"absolute -top-1.5 -right-1.5 h-5 w-5 rounded-full bg-status-error text-white flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",children:f.jsx(Wr,{size:12,strokeWidth:3})}),f.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-black/50 rounded-b-lg px-1 py-0.5",children:f.jsx("span",{className:"text-[8px] text-white truncate block",children:ae.originalName})})]},ae.id)),M.map(ae=>f.jsxs("div",{className:"relative group",children:[f.jsx("img",{src:ae.preview,alt:ae.name,className:"h-20 w-20 object-cover rounded-lg border border-accent/30"}),f.jsx("button",{type:"button",onClick:()=>Z(ae.id),className:"absolute -top-1.5 -right-1.5 h-5 w-5 rounded-full bg-status-error text-white flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",children:f.jsx(Wr,{size:12,strokeWidth:3})}),f.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-black/50 rounded-b-lg px-1 py-0.5",children:f.jsx("span",{className:"text-[8px] text-white truncate block",children:ae.name})})]},ae.id))]})]}),f.jsxs("div",{className:"mb-4 grid grid-cols-2 gap-3",children:[f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-1.5",children:H("todoForm.cliTool")}),f.jsx("select",{value:T,onChange:ae=>X(ae.target.value),className:"input-field text-sm",children:ii.map(ae=>f.jsx("option",{value:ae.value,children:ae.label},ae.value))})]}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-1.5",children:H("todoForm.aiModel")}),f.jsx("select",{value:O,onChange:ae=>I(ae.target.value),className:"input-field text-sm",children:U.models.map(ae=>f.jsx("option",{value:ae.value,children:ae.label},ae.value))})]})]}),T==="claude"&&f.jsxs("div",{className:"mb-4",children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-1.5",children:H("todoForm.maxTurns")}),f.jsx("input",{type:"number",min:"1",max:"500",placeholder:H("todoForm.maxTurnsPlaceholder"),value:q,onChange:ae=>z(ae.target.value),className:"input-field text-sm w-32"}),f.jsx("p",{className:"text-2xs text-warm-400 mt-1",children:H("todoForm.maxTurnsHint")})]}),m&&f.jsxs("div",{className:"mb-4",children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-1.5",children:H("todoForm.worktreeMode")}),f.jsxs("div",{className:"flex flex-col gap-1.5",children:[f.jsxs("label",{className:"flex items-center gap-2 cursor-pointer text-sm",children:[f.jsx("input",{type:"radio",name:"useWorktreeMode",checked:F==="inherit",onChange:()=>R("inherit")}),f.jsxs("span",{children:[H("todoForm.worktreeInherit"),f.jsxs("span",{className:"text-2xs text-warm-400 ml-1",children:["(",H(g?"todoForm.worktreeProjectDefaultOn":"todoForm.worktreeProjectDefaultOff"),")"]})]})]}),f.jsxs("label",{className:"flex items-center gap-2 cursor-pointer text-sm",children:[f.jsx("input",{type:"radio",name:"useWorktreeMode",checked:F==="force-on",onChange:()=>R("force-on")}),f.jsx("span",{children:H("todoForm.worktreeForceOn")})]}),f.jsxs("label",{className:"flex items-center gap-2 cursor-pointer text-sm",children:[f.jsx("input",{type:"radio",name:"useWorktreeMode",checked:F==="force-off",onChange:()=>R("force-off")}),f.jsx("span",{children:H("todoForm.worktreeForceOff")})]})]}),(F==="force-off"||F==="inherit"&&!g)&&f.jsx("p",{className:"text-2xs text-status-warning mt-1.5",children:H("todoForm.worktreeMainWarning")})]}),S.length>0&&f.jsxs("div",{className:"mb-4",children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-1.5",children:H("todoForm.dependsOn")}),f.jsxs("select",{value:P,onChange:ae=>D(ae.target.value),className:"input-field text-sm",children:[f.jsx("option",{value:"",children:H("todoForm.noDependency")}),S.map(ae=>f.jsxs("option",{value:ae.id,children:[ae.title," (",H(`status.${ae.status}`),")"]},ae.id))]}),P&&f.jsx("p",{className:"text-2xs text-warm-400 mt-1",children:H("todoForm.dependsOnHint")})]}),f.jsxs("div",{className:"flex gap-3 justify-end",children:[f.jsx("button",{type:"button",onClick:t,className:"btn-ghost text-sm",children:H("todoForm.cancel")}),f.jsx("button",{type:"submit",disabled:!j.trim(),className:"btn-primary text-sm",children:H("todoForm.save")})]})]})}const Wt={titleBg:"#2d2d2d",titleText:"#999",bg:"#0c0c0c",text:"#cccccc",dim:"#666666",bright:"#f2f2f2",prompt:"#16c60c",success:"#16c60c",error:"#f14c4c",warning:"#cca700",info:"#569cd6",separator:"#333333"},Kd="'Cascadia Code', 'Cascadia Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Courier New', monospace";function nce({children:e}){const[t,n]=x.useState(!1),[r,a]=x.useState(!1),i=x.useRef(null),s=x.useRef(null),[l,c]=x.useState({top:0,left:0}),d=x.useCallback(()=>{if(!i.current)return;const m=i.current.getBoundingClientRect(),g=window.innerWidth,v=window.innerHeight;let b=m.bottom+4;const w=s.current;if(w){const S=w.offsetWidth,j=w.offsetHeight;let _=m.right-S;_<8&&(_=8),_+S>g-8&&(_=g-8-S),b+j>v-8&&(b=m.top-j-4),c({top:b,left:_}),a(!0)}else c({top:b,left:Math.max(8,m.right-180)})},[]);x.useEffect(()=>{if(!t){a(!1);return}d();const m=requestAnimationFrame(d),g=v=>{var w,S;const b=v.target;(w=i.current)!=null&&w.contains(b)||(S=s.current)!=null&&S.contains(b)||n(!1)};return document.addEventListener("mousedown",g),window.addEventListener("scroll",d,!0),window.addEventListener("resize",d),()=>{cancelAnimationFrame(m),document.removeEventListener("mousedown",g),window.removeEventListener("scroll",d,!0),window.removeEventListener("resize",d)}},[t,d]);const h=(Array.isArray(e)?e:[e]).filter(Boolean);return h.length===0?null:f.jsxs(f.Fragment,{children:[f.jsx("button",{ref:i,onClick:()=>n(!t),className:"p-1.5 text-warm-400 hover:text-warm-600 hover:bg-theme-hover rounded-lg transition-colors",title:"More",children:f.jsx(n8,{size:14})}),t&&vl.createPortal(f.jsx("div",{ref:s,className:`fixed z-tooltip min-w-[160px] rounded-xl py-1 shadow-elevated${r?" animate-scale-in":""}`,style:{top:l.top,left:l.left,opacity:r?1:0,backgroundColor:"var(--color-bg-card)",border:"1px solid var(--color-border)"},onClick:()=>n(!1),children:h}),document.body)]})}function rce({todo:e,allTodos:t=[],projectCliTool:n,projectIsGitRepo:r,projectUseWorktree:a,onStart:i,onStop:s,onDelete:l,onEdit:c,onMerge:d,onCleanup:h,onRetry:m,onContinue:g,onFix:v,onSchedule:b,onScheduleOnReset:w,resetsAt:S,onEvent:j,isInteractive:_,onSendInput:k,isDragSource:E,isDragging:T,isDragOver:A,isValidDropTarget:O,onDragStart:I,onDragEnd:P,onDragOverTarget:D,onDragLeaveTarget:q,onDropTarget:z,onRemoveDependency:F,debugLogging:R,showTokenUsage:M,isChainMember:L}){const[G,W]=x.useState(!1),[Y,B]=x.useState(!1),[H,K]=x.useState([]),[U,X]=x.useState(!1),[J,Q]=x.useState(!1),[re,ue]=x.useState(null),[Z,se]=x.useState(!1),[ce,ee]=x.useState(null),[ae,oe]=x.useState(!1),[fe,Ce]=x.useState(null),[Te,pe]=x.useState(!1),[De,Xe]=x.useState(null),[We,at]=x.useState(!1),[Ne,Fe]=x.useState(null),[ye,le]=x.useState(!1),[me,Oe]=x.useState(""),[Pe,be]=x.useState(!1),[nt,ot]=x.useState(null),[gt,lt]=x.useState(!1),[Me,$e]=x.useState(""),[Qe,vt]=x.useState(!1),[st,Et]=x.useState(null),[Je,At]=x.useState(null),[It,hn]=x.useState(!1),[ne,we]=x.useState(!1),[Se,Ie]=x.useState(!1),[ze,ft]=x.useState(()=>{const je=new Date;je.setHours(je.getHours()+1),je.setMinutes(0,0,0);const ht=je.getFullYear(),St=String(je.getMonth()+1).padStart(2,"0"),vn=String(je.getDate()).padStart(2,"0"),yt=String(je.getHours()).padStart(2,"0"),ka=String(je.getMinutes()).padStart(2,"0");return`${ht}-${St}-${vn}T${yt}:${ka}`}),[Vt,ir]=x.useState(!1),{t:Le}=Ze(),Cn=e.status==="pending"||e.status==="failed"||e.status==="stopped",Dr=(e.status==="pending"||e.status==="failed"||e.status==="stopped")&&!!b,Ml=(e.status==="pending"||e.status==="completed"||e.status==="failed"||e.status==="stopped")&&!!w&&!!S&&S>Math.floor(Date.now()/1e3),Pl=e.status==="running",Rr=e.status==="completed"||e.status==="stopped"||e.status==="merged",jn=e.status==="completed"&&!L&&!!e.branch_name,Gn=e.status==="completed"||e.status==="failed"||e.status==="stopped",Sa=!!g&&e.status==="completed"&&!!e.worktree_path,ys=e.status!=="running"&&e.status!=="pending"&&!!e.worktree_path&&!L,Si=e.status==="completed"||e.status==="failed"||e.status==="stopped"||e.status==="merged";x.useEffect(()=>{_&&e.status==="running"&&!G&&W(!0)},[_,e.status]),x.useEffect(()=>{G&&!U&&Z2(e.id).then(je=>{K(je),X(!0)}).catch(()=>{})},[G,U,e.id]),x.useEffect(()=>{G&&Si&&!It&&b8(e.id).then(je=>{At(je),hn(!0)}).catch(()=>{hn(!0)})},[G,Si,It,e.id]),x.useEffect(()=>j(je=>{if(je.type==="todo:log"&&je.todoId===e.id&&je.message){const ht={id:`ws-${Date.now()}-${Math.random()}`,todo_id:e.id,log_type:je.logType||"output",message:je.message,created_at:new Date().toISOString()};K(St=>[...St,ht])}if(je.type==="todo:commit"&&je.todoId===e.id&&je.message){const ht={id:`ws-commit-${Date.now()}-${Math.random()}`,todo_id:e.id,log_type:"commit",message:`${je.commitHash?`[${je.commitHash}] `:""}${je.message}`,created_at:new Date().toISOString()};K(St=>[...St,ht])}}),[j,e.id]);const jc=async()=>{try{const{files:je}=await s8(e.project_id,e.id);je.length>0&&window.open(`/api/projects/${e.project_id}/debug-logs/${encodeURIComponent(je[0].name)}`,"_blank")}catch{}},mo=async()=>{if(J){Q(!1);return}se(!0),ee(null);try{const je=await x8(e.id);ue(je),Q(!0),W(!0)}catch(je){ee(je instanceof Error?je.message:"Failed to load diff"),W(!0)}finally{se(!1)}},ji=async()=>{oe(!0),Ce(null);try{await d(e.id)}catch(je){Ce(je instanceof Error?je.message:"Merge failed")}finally{oe(!1)}},po=async()=>{const je=e.branch_name?confirm(Le("cleanup.confirmDeleteBranch").replace("{name}",e.branch_name)):!1;pe(!0),Xe(null);try{await h(e.id,je)}catch(ht){Xe(ht instanceof Error?ht.message:"Cleanup failed")}finally{pe(!1)}},Ua=async(je="headless")=>{at(!0),Fe(null),K([]),X(!1),ue(null),Q(!1),At(null),hn(!1);try{await m(e.id,je)}catch(ht){Fe(ht instanceof Error?ht.message:"Retry failed")}finally{at(!1)}},Ga=async(je="headless")=>{if(!g)return;const ht=me.trim();if(!ht){ot(Le("todo.continuePromptRequired"));return}be(!0),ot(null);try{await g(e.id,ht,je),le(!1),Oe(""),K([]),X(!1)}catch(St){ot(St instanceof Error?St.message:"Continue failed")}finally{be(!1)}},Va=async()=>{if(!(!w||!Me.trim())){vt(!0),Et(null);try{await w(e.id,Me.trim()),lt(!1),$e("")}catch(je){Et(je instanceof Error?je.message:"Failed")}finally{vt(!1)}}},Ka=async()=>{if(!(!b||!ze)){ir(!0);try{await b(e.id,new Date(ze).toISOString(),Se),we(!1)}catch{}finally{ir(!1)}}},gn=je=>{if(je<60)return`${je}s`;const ht=Math.floor(je/60),St=je%60;if(ht<60)return St>0?`${ht}m ${St}s`:`${ht}m`;const vn=Math.floor(ht/60),yt=ht%60;return yt>0?`${vn}h ${yt}m`:`${vn}h`},go=je=>je>=1e6?`${(je/1e6).toFixed(1)}M`:je>=1e3?`${(je/1e3).toFixed(1)}k`:String(je),ja=e.images?JSON.parse(e.images):[],Vn=e.depends_on?t.find(je=>je.id===e.depends_on):null,wr=t.find(je=>je.depends_on===e.id&&je.merged_from_branch),kc=e.cli_tool||n||"claude",vo=$u(kc).supportsInteractive;if(Y)return f.jsx(Zg,{initialTitle:e.title,initialDescription:e.description??void 0,initialCliTool:e.cli_tool??void 0,initialCliModel:e.cli_model??void 0,initialDependsOn:e.depends_on??void 0,initialMaxTurns:e.max_turns??void 0,initialUseWorktree:e.use_worktree??null,projectIsGitRepo:r,projectUseWorktree:a,existingImages:ja,todoId:e.id,availableTodos:t.filter(je=>je.id!==e.id),onDeleteImage:async je=>{await k8(e.id,je)},onSave:async(je,ht,St,vn,yt,ka,Il,xo)=>{await c(e.id,je,ht,St,vn,ka,Il,xo),yt&&yt.length>0&&await Q2(e.id,yt.map(na=>({name:na.name,data:na.data}))),B(!1)},onCancel:()=>B(!1)});const Dl={pending:"border-l-warm-300",running:"border-l-status-running",completed:"border-l-status-success",failed:"border-l-status-error",stopped:"border-l-status-warning",merged:"border-l-status-merged"}[e.status],_c=je=>{je.dataTransfer.setData("text/plain",e.id),je.dataTransfer.effectAllowed="link",I==null||I(e.id)},xs=()=>{P==null||P()},bs=je=>{!T||E||(je.preventDefault(),je.dataTransfer.dropEffect=O?"link":"none",D==null||D(e.id))},Ir=()=>{q==null||q(e.id)},sr=je=>{je.preventDefault(),!(!T||E||!O)&&(z==null||z(e.id))},yo=T&&!E&&A&&O,Rl=T&&!E&&A&&!O;return f.jsxs("div",{className:`relative transition-opacity duration-200 ${E?"opacity-40":""}`,onDragOver:bs,onDragLeave:Ir,onDrop:sr,children:[f.jsxs("div",{className:`card border-l-4 ${Dl} overflow-hidden transition-all duration-200 ${yo?"ring-2 ring-cyan-400 ring-offset-1":""} ${Rl?"ring-2 ring-red-300 ring-offset-1":""}`,children:[f.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 md:flex-nowrap md:gap-3 px-3 md:px-4 py-3 md:py-3.5 cursor-pointer hover:bg-warm-50 transition-colors",onClick:()=>W(!G),children:[f.jsx("div",{draggable:!0,onDragStart:_c,onDragEnd:xs,onClick:je=>je.stopPropagation(),className:"flex-shrink-0 cursor-grab active:cursor-grabbing text-warm-300 hover:text-warm-500 transition-colors p-0.5 -ml-1",title:Le("dnd.dropHint"),children:f.jsx(ste,{size:16})}),f.jsx("button",{className:"text-warm-400 hover:text-accent flex-shrink-0 transition-colors",children:f.jsx(zu,{size:14,className:`transition-transform duration-200 ${G?"rotate-90":""}`})}),f.jsxs("span",{className:"text-2xs font-mono text-warm-400 w-6 flex-shrink-0",children:["#",e.priority]}),f.jsx("span",{className:"flex-1 basis-[calc(100%-100px)] md:basis-auto min-w-0 text-sm text-warm-800 font-medium truncate order-none",children:e.title}),ja.length>0&&f.jsxs("span",{className:"inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded-full text-2xs font-mono text-warm-400 bg-warm-100 flex-shrink-0",children:[f.jsx(ef,{size:12}),ja.length]}),Vn&&f.jsxs("span",{className:"hidden md:inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-2xs font-mono font-medium bg-cyan-500/10 text-cyan-600 flex-shrink-0 group/dep",title:`${Le("todo.dependsOn")}: ${Vn.title}`,children:[f.jsx(tf,{size:12}),Vn.title.length>20?Vn.title.slice(0,20)+"...":Vn.title,F&&f.jsx("button",{onClick:je=>{je.stopPropagation(),F(e.id)},className:"ml-0.5 h-3.5 w-3.5 rounded-full hover:bg-cyan-500/20 inline-flex items-center justify-center opacity-0 group-hover/dep:opacity-100 transition-opacity",title:Le("dnd.removeDep"),children:f.jsx(Wr,{size:10})})]}),e.cli_tool&&f.jsxs("span",{className:"hidden md:inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-2xs font-mono font-medium bg-status-merged/10 text-status-merged flex-shrink-0",children:[$u(e.cli_tool||"claude").label,e.cli_model&&f.jsxs("span",{className:"text-warm-400",children:["/ ",e.cli_model]})]}),f.jsx(J2,{status:e.status}),f.jsxs("div",{className:"flex items-center gap-0.5 ml-auto md:ml-2 flex-shrink-0",onClick:je=>je.stopPropagation(),children:[Cn&&f.jsx("button",{onClick:()=>i(e.id,"headless"),className:"p-1.5 text-status-success/60 hover:text-status-success hover:bg-status-success/10 rounded-lg transition-colors",title:Le("todo.startHeadless"),children:f.jsx(yl,{size:14})}),Pl&&f.jsx("button",{onClick:()=>s(e.id),className:"p-1.5 text-status-error/60 hover:text-status-error hover:bg-status-error/10 rounded-lg transition-colors",title:Le("todo.stop"),children:f.jsx(Ug,{size:14})}),jn&&f.jsx("button",{onClick:ji,disabled:ae,className:"p-1.5 text-status-merged/60 hover:text-status-merged hover:bg-status-merged/10 rounded-lg transition-colors disabled:opacity-30",title:Le("todo.merge"),children:f.jsx(Pf,{size:14})}),Sa&&f.jsx("button",{onClick:()=>{le(je=>!je),ot(null)},disabled:Pe,className:"p-1.5 text-status-success/60 hover:text-status-success hover:bg-status-success/10 rounded-lg transition-colors disabled:opacity-30",title:Le("todo.continue"),children:f.jsx(Cee,{size:14})}),Gn&&f.jsx("button",{onClick:()=>Ua("headless"),disabled:We,className:"p-1.5 text-accent/60 hover:text-accent hover:bg-accent/10 rounded-lg transition-colors disabled:opacity-30",title:Le("todo.retry"),children:f.jsx(Fg,{size:14})}),f.jsxs(nce,{children:[Cn&&vo&&f.jsxs("button",{onClick:()=>i(e.id,"interactive"),className:"flex items-center gap-2 w-full px-3 py-1.5 text-xs text-warm-600 hover:bg-theme-hover rounded-md transition-colors text-left",title:Le("todo.startInteractiveDesc"),children:[f.jsx(Gte,{size:14}),Le("todo.startInteractive")]}),Cn&&f.jsxs("button",{onClick:()=>i(e.id,"verbose"),className:"flex items-center gap-2 w-full px-3 py-1.5 text-xs text-warm-600 hover:bg-theme-hover rounded-md transition-colors text-left",title:Le("todo.startVerboseDesc"),children:[f.jsx(Wee,{size:14}),Le("todo.startVerbose")]}),Dr&&f.jsxs("button",{onClick:()=>we(!ne),className:"flex items-center gap-2 w-full px-3 py-1.5 text-xs text-warm-600 hover:bg-theme-hover rounded-md transition-colors text-left",title:Le("todo.scheduleDesc"),children:[f.jsx(vee,{size:14}),Le("todo.schedule")]}),Ml&&f.jsxs("button",{onClick:()=>{lt(je=>!je),Et(null)},className:"flex items-center gap-2 w-full px-3 py-1.5 text-xs text-warm-600 hover:bg-theme-hover rounded-md transition-colors text-left",title:Le("todo.scheduleOnResetDesc"),children:[f.jsx(Jd,{size:14}),Le("todo.scheduleOnReset")]}),Rr&&f.jsxs("button",{onClick:mo,disabled:Z,className:"flex items-center gap-2 w-full px-3 py-1.5 text-xs text-warm-600 hover:bg-theme-hover rounded-md transition-colors text-left disabled:opacity-30",children:[f.jsx(Ep,{size:14}),Le("todo.viewDiff")]}),R&&Si&&f.jsxs("button",{onClick:jc,className:"flex items-center gap-2 w-full px-3 py-1.5 text-xs text-warm-600 hover:bg-theme-hover rounded-md transition-colors text-left",children:[f.jsx($te,{size:14}),Le("todo.viewDebugLog")]}),ys&&f.jsxs("button",{onClick:po,disabled:Te,className:"flex items-center gap-2 w-full px-3 py-1.5 text-xs text-warm-600 hover:bg-theme-hover rounded-md transition-colors text-left disabled:opacity-30",children:[f.jsx(V2,{size:14}),Le("todo.cleanup")]}),f.jsxs("button",{onClick:()=>B(!0),className:"flex items-center gap-2 w-full px-3 py-1.5 text-xs text-warm-600 hover:bg-theme-hover rounded-md transition-colors text-left",children:[f.jsx(Df,{size:14}),Le("todo.edit")]}),f.jsxs("button",{onClick:()=>l(e.id),className:"flex items-center gap-2 w-full px-3 py-1.5 text-xs text-status-error hover:bg-status-error/10 rounded-md transition-colors text-left",children:[f.jsx(es,{size:14}),Le("todo.delete")]})]})]})]}),ne&&f.jsx("div",{className:"border-t border-blue-200 px-5 py-3 bg-blue-50/50 animate-fade-in",children:f.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[f.jsx("label",{className:"text-xs font-medium text-blue-600",children:Le("todo.scheduleAt")}),f.jsx("input",{type:"datetime-local",value:ze,onChange:je=>ft(je.target.value),className:"bg-theme-card border border-blue-200 rounded-lg px-2 py-1.5 text-sm font-mono text-warm-800 focus:border-blue-400 focus:outline-none focus:ring-2 focus:ring-blue-400/20",min:new Date().toISOString().slice(0,16)}),f.jsx("button",{onClick:Ka,disabled:Vt||!ze,className:"btn-primary text-xs py-1.5 !bg-blue-500 hover:!bg-blue-600 disabled:opacity-30",children:Le(Vt?"todo.scheduling":"todo.confirmSchedule")}),f.jsx("button",{onClick:()=>we(!1),className:"btn-ghost text-xs py-1.5",children:Le("scheduleForm.cancel")}),f.jsxs("label",{className:"flex items-center gap-2 text-xs text-blue-700",children:[f.jsx("input",{type:"checkbox",checked:Se,onChange:je=>Ie(je.target.checked),className:"rounded border-blue-300 text-blue-500 focus:ring-blue-400"}),Le("todo.scheduleKeepOriginal")]})]})}),ye&&f.jsx("div",{className:"border-t border-emerald-200 px-5 py-3 bg-emerald-50/50 animate-fade-in",children:f.jsxs("div",{className:"flex flex-col gap-2",children:[f.jsxs("label",{className:"text-xs font-medium text-emerald-600",children:[Le("todo.continuePromptLabel"),(e.round_count??1)>1&&f.jsxs("span",{className:"ml-2 text-emerald-500/70",children:["(",Le("todo.roundLabel")," ",e.round_count,")"]})]}),f.jsx("textarea",{value:me,onChange:je=>Oe(je.target.value),placeholder:Le("todo.continuePromptPlaceholder"),rows:3,className:"w-full bg-theme-card border border-emerald-200 rounded-lg px-3 py-2 text-sm text-warm-800 focus:border-emerald-400 focus:outline-none focus:ring-2 focus:ring-emerald-400/20 resize-y",disabled:Pe}),nt&&f.jsx("p",{className:"text-xs text-status-error",children:nt}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("button",{onClick:()=>Ga("headless"),disabled:Pe||!me.trim(),className:"btn-primary text-xs py-1.5 !bg-emerald-500 hover:!bg-emerald-600 disabled:opacity-30",children:Le(Pe?"todo.continuing":"todo.confirmContinue")}),f.jsx("button",{onClick:()=>{le(!1),ot(null)},disabled:Pe,className:"btn-ghost text-xs py-1.5",children:Le("scheduleForm.cancel")})]})]})}),gt&&S&&f.jsx("div",{className:"border-t border-amber-200 px-5 py-3 bg-amber-50/50 animate-fade-in",children:f.jsxs("div",{className:"flex flex-col gap-2",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("label",{className:"text-xs font-medium text-amber-600",children:Le("todo.scheduleOnResetLabel")}),f.jsx("span",{className:"text-xs text-amber-500/80 font-mono",children:new Date(S*1e3).toLocaleString()})]}),f.jsx("textarea",{value:Me,onChange:je=>$e(je.target.value),placeholder:Le("todo.resetPromptPlaceholder"),rows:3,className:"w-full bg-theme-card border border-amber-200 rounded-lg px-3 py-2 text-sm text-warm-800 focus:border-amber-400 focus:outline-none focus:ring-2 focus:ring-amber-400/20 resize-y",disabled:Qe}),st&&f.jsx("p",{className:"text-xs text-status-error",children:st}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("button",{onClick:Va,disabled:Qe||!Me.trim(),className:"btn-primary text-xs py-1.5 !bg-amber-500 hover:!bg-amber-600 disabled:opacity-30",children:Le(Qe?"todo.scheduling":"todo.confirmResetSchedule")}),f.jsx("button",{onClick:()=>{lt(!1),Et(null)},disabled:Qe,className:"btn-ghost text-xs py-1.5",children:Le("scheduleForm.cancel")})]})]})}),G&&f.jsx("div",{className:"animate-fade-in overflow-hidden border-t border-theme-border",children:f.jsxs("div",{className:"px-4 py-3 space-y-3",children:[f.jsxs("section",{children:[f.jsx("h4",{className:"text-2xs font-semibold text-warm-500 uppercase tracking-wider mb-1.5",children:Le("todo.description")}),f.jsx("div",{className:"rounded-lg border border-theme-border bg-theme-card/50 px-3 py-2",children:e.description?f.jsx("p",{className:"text-sm text-warm-700 whitespace-pre-wrap",children:e.description}):f.jsx("p",{className:"text-sm text-warm-400 italic",children:Le("todo.noDescription")})})]}),ja.length>0&&f.jsxs("section",{children:[f.jsxs("h4",{className:"text-2xs font-semibold text-warm-500 uppercase tracking-wider mb-1.5",children:[Le("todo.attachedImages")," ",f.jsxs("span",{className:"text-warm-400 normal-case",children:["(",ja.length,")"]})]}),f.jsx("div",{className:"flex flex-wrap gap-1.5",children:ja.map(je=>f.jsx("a",{href:rf(e.id,je.id),target:"_blank",rel:"noopener noreferrer",children:f.jsx("img",{src:rf(e.id,je.id),alt:je.originalName,className:"h-16 w-16 object-cover rounded-md border border-theme-border"})},je.id))})]}),(Vn||e.branch_name||wr)&&f.jsxs("section",{children:[f.jsx("h4",{className:"text-2xs font-semibold text-warm-500 uppercase tracking-wider mb-1.5",children:Le("todo.branch")}),f.jsxs("div",{className:"rounded-lg border border-theme-border bg-theme-card/50 px-3 py-2 space-y-1.5",children:[Vn&&f.jsxs("div",{className:"flex items-start gap-2 text-xs",children:[f.jsx("span",{className:"text-warm-400 w-24 flex-shrink-0 pt-0.5",children:Le("todo.dependsOn")}),f.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded bg-accent/10 text-accent text-2xs font-medium",children:Vn.title})]}),e.branch_name&&f.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[f.jsx("span",{className:"text-warm-400 w-24 flex-shrink-0",children:Le("todo.branch")}),f.jsx(Bg,{size:12,className:"text-status-success flex-shrink-0"}),f.jsx("code",{className:"font-mono text-xs text-warm-700 break-all",children:e.branch_name})]}),e.worktree_path&&f.jsxs("div",{className:"flex items-start gap-2 text-xs",children:[f.jsx("span",{className:"text-warm-400 w-24 flex-shrink-0 pt-0.5",children:Le("todo.worktree")}),f.jsx("code",{className:"font-mono text-2xs text-warm-500 break-all",children:e.worktree_path})]}),e.merged_from_branch&&f.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[f.jsx("span",{className:"text-warm-400 w-24 flex-shrink-0",children:Le("todo.mergedFrom")}),f.jsx("code",{className:"font-mono text-xs text-status-merged break-all",children:e.merged_from_branch})]}),!e.worktree_path&&wr&&f.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[f.jsx("span",{className:"text-warm-400 w-24 flex-shrink-0",children:Le("todo.transferredTo")}),f.jsx("span",{className:"text-warm-700 truncate",children:wr.title.length>30?wr.title.slice(0,27)+"...":wr.title})]})]})]}),e.status==="failed"&&H.length>0&&(()=>{var vn;const je=H.filter(yt=>yt.log_type==="error");if(je.length===0)return null;const ht=je.find(yt=>/exited with code (\d+)/.test(yt.message)),St=ht?(vn=ht.message.match(/exited with code (\d+)/))==null?void 0:vn[1]:null;return f.jsxs("div",{style:{background:Wt.bg,fontFamily:Kd,fontSize:12,lineHeight:"1.5",padding:"10px 12px",borderRadius:8,border:`1px solid ${Wt.separator}`,color:Wt.text},children:[f.jsxs("div",{children:[f.jsx("span",{style:{color:Wt.error},children:">"})," ",f.jsx("span",{style:{color:Wt.error,fontWeight:700},children:"FAILED"}),St&&f.jsxs("span",{style:{color:Wt.dim},children:[" (exit code: ",St,")"]}),v&&f.jsx("button",{onClick:()=>v(e,je),style:{marginLeft:12,color:Wt.warning,background:"none",border:`1px solid ${Wt.warning}`,padding:"1px 8px",borderRadius:2,cursor:"pointer",fontSize:11,fontFamily:Kd},children:Le("failure.fix")})]}),f.jsx("div",{style:{maxHeight:192,overflowY:"auto",marginTop:4},children:je.map(yt=>f.jsxs("div",{children:[f.jsx("span",{style:{color:Wt.dim},children:new Date(yt.created_at).toLocaleTimeString()})," ",f.jsx("span",{style:{color:Wt.error},children:yt.message})]},yt.id))})]})})(),Si&&Je&&f.jsxs("section",{children:[f.jsx("h4",{className:"text-2xs font-semibold text-warm-500 uppercase tracking-wider mb-1.5",children:Le("todo.result")}),f.jsxs("div",{className:"rounded-lg border border-theme-border bg-theme-card/50 px-3 py-2 space-y-2.5",children:[f.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-xs",children:[Je.duration_seconds!==null&&f.jsxs("span",{className:"inline-flex items-center gap-1",children:[f.jsx(Jd,{size:12,className:"text-warm-400"}),f.jsx("span",{className:"text-warm-400",children:Le("result.duration")}),f.jsx("span",{className:"text-warm-700 font-medium",children:gn(Je.duration_seconds)})]}),Je.commits.length>0&&f.jsxs("span",{className:"inline-flex items-center gap-1",children:[f.jsx(ete,{size:12,className:"text-status-success"}),f.jsx("span",{className:"text-status-success font-medium",children:Je.commits.length}),f.jsx("span",{className:"text-warm-400",children:Le("result.commits")})]}),Je.diff_stats.files_changed>0&&f.jsxs("span",{className:"inline-flex items-center gap-1",children:[f.jsx(Ep,{size:12,className:"text-warm-400"}),f.jsx("span",{className:"text-warm-700 font-medium",children:Je.diff_stats.files_changed}),f.jsx("span",{className:"text-warm-400",children:Le("result.filesChanged")}),f.jsxs("span",{className:"text-status-success font-mono",children:["+",Je.diff_stats.insertions]}),f.jsxs("span",{className:"text-status-error font-mono",children:["-",Je.diff_stats.deletions]})]}),M&&Je.token_usage&&(()=>{const je=Je.token_usage,ht=(je.input_tokens??0)+(je.cache_read_input_tokens??0)+(je.cache_creation_input_tokens??0),St=ht+(je.output_tokens??0);let vn,yt;return St>=5e5?(vn=Le("result.levelHeavy"),yt="text-status-error"):St>=3e5?(vn=Le("result.levelHigh"),yt="text-orange-500"):St>=1e5?(vn=Le("result.levelModerate"),yt="text-status-warning"):(vn=Le("result.levelLight"),yt="text-status-info"),f.jsxs("span",{className:"inline-flex items-center gap-1",children:[ht>0&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"text-warm-400",children:Le("result.inputTokens")}),f.jsx("span",{className:"text-warm-700 font-medium",children:go(ht)})]}),ht>0&&je.output_tokens!==null&&f.jsx("span",{className:"text-warm-400",children:"·"}),je.output_tokens!==null&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"text-warm-400",children:Le("result.outputTokens")}),f.jsx("span",{className:"text-warm-700 font-medium",children:go(je.output_tokens)})]}),je.num_turns!=null&&je.num_turns>1&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"text-warm-400",children:"·"}),f.jsxs("span",{className:"text-warm-700",children:[je.num_turns,Le("result.turns")]})]}),f.jsx("span",{className:"text-warm-400",children:"·"}),f.jsx("span",{className:`font-medium ${yt}`,children:vn})]})})()]}),Je.commits.length>0&&f.jsxs("div",{children:[f.jsx("h5",{className:"text-2xs font-semibold text-warm-400 uppercase tracking-wider mb-1",children:Le("result.commitHistory")}),f.jsx("div",{className:"space-y-0.5",children:Je.commits.map((je,ht)=>f.jsxs("div",{className:"flex items-center gap-2 px-1.5 py-1 text-xs rounded hover:bg-theme-hover",children:[f.jsx("code",{className:"font-mono text-accent flex-shrink-0",children:je.hash.slice(0,7)||"-------"}),f.jsx("span",{className:"text-warm-700 truncate flex-1",children:je.message}),f.jsx("span",{className:"text-2xs text-warm-400 flex-shrink-0",children:new Date(je.date).toLocaleTimeString()})]},ht))})]}),Je.changed_files.length>0&&f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center justify-between mb-1",children:[f.jsx("h5",{className:"text-2xs font-semibold text-warm-400 uppercase tracking-wider",children:Le("result.changedFiles")}),Rr&&f.jsxs("button",{onClick:mo,disabled:Z,className:"flex items-center gap-1 text-2xs text-warm-500 hover:text-accent transition-colors disabled:opacity-30",children:[f.jsx(zu,{size:10,className:`transition-transform ${J?"rotate-90":""}`}),f.jsx("span",{children:Le(J?"todo.hideDiff":"todo.viewDiff")})]})]}),f.jsx("div",{className:"space-y-0.5",children:Je.changed_files.map((je,ht)=>{const St=je.status==="A"?"bg-status-success/15 text-status-success":je.status==="D"?"bg-status-error/15 text-status-error":je.status==="M"?"bg-status-warning/15 text-status-warning":"bg-warm-200 text-warm-600";return f.jsxs("div",{className:"flex items-center gap-2 px-1.5 py-0.5 text-xs",children:[f.jsx("span",{className:`inline-flex items-center justify-center w-5 h-4 rounded text-[10px] font-bold ${St}`,children:je.status}),f.jsx("span",{className:"text-warm-700 font-mono text-2xs break-all flex-1",children:je.file}),je.renamedFrom&&f.jsxs("span",{className:"text-warm-400 text-2xs flex-shrink-0",children:["← ",je.renamedFrom]})]},ht)})})]})]})]}),fe&&f.jsxs("div",{className:"rounded-md bg-status-error/10 text-status-error text-xs px-3 py-2",children:[Le("todo.mergeFailed"),": ",fe]}),De&&f.jsxs("div",{className:"rounded-md bg-status-error/10 text-status-error text-xs px-3 py-2",children:[Le("todo.cleanupFailed"),": ",De]}),Ne&&f.jsxs("div",{className:"rounded-md bg-status-error/10 text-status-error text-xs px-3 py-2",children:[Le("todo.retryFailed"),": ",Ne]}),ce&&f.jsxs("div",{className:"rounded-md bg-status-error/10 text-status-error text-xs px-3 py-2",children:[Le("todo.diffError"),": ",ce]}),J&&re&&f.jsxs("section",{children:[f.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[f.jsx("h4",{className:"text-2xs font-semibold text-warm-500 uppercase tracking-wider",children:Le("todo.diffOutput")}),f.jsxs("div",{className:"flex items-center gap-1.5 text-2xs",children:[f.jsxs("span",{className:"text-warm-500",children:[re.stats.files_changed," ",Le("todo.files")]}),f.jsxs("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded bg-status-success/10 text-status-success font-mono",children:["+",re.stats.insertions]}),f.jsxs("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded bg-status-error/10 text-status-error font-mono",children:["-",re.stats.deletions]})]})]}),f.jsx("div",{className:"max-h-80 overflow-y-auto rounded-lg border border-theme-border bg-theme-card/50 px-3 py-2 font-mono text-xs leading-tight",children:re.diff?re.diff.split(`
|
|
485
|
+
`).map((je,ht)=>{let St="text-theme-text",vn="";return je.startsWith("+")&&!je.startsWith("+++")?St="text-theme-text bg-status-success/15":je.startsWith("-")&&!je.startsWith("---")?St="text-theme-text bg-status-error/15":je.startsWith("@@")?St="text-accent":je.startsWith("diff ")&&(St="text-warm-700",vn="font-semibold"),f.jsx("div",{className:`whitespace-pre ${St} ${vn}`,children:je},ht)}):f.jsx("span",{className:"text-warm-400 italic",children:Le("log.noChanges")})})]}),f.jsxs("div",{className:"rounded-lg overflow-hidden",style:{background:Wt.bg,fontFamily:Kd,border:`1px solid ${Wt.separator}`},children:[f.jsxs("div",{style:{padding:"8px 12px",borderBottom:`1px solid ${Wt.separator}`,fontSize:12,color:Wt.text},children:[f.jsx("span",{style:{color:Wt.prompt},children:"$"})," ",f.jsx("span",{style:{color:Wt.bright},children:"tail"})," ",f.jsx("span",{style:{color:Wt.dim},children:"-f task.log"})]}),f.jsx(Xg,{logs:H,interactive:_&&e.status==="running",todoId:e.id,onSendInput:k,embedded:!0})]})]})})]}),yo&&f.jsxs("div",{className:"mt-1.5 flex items-center gap-2 px-4 py-2 rounded-lg border-2 border-dashed border-cyan-400 bg-cyan-50/50 animate-fade-in",children:[f.jsx(tf,{size:14,className:"text-cyan-500 flex-shrink-0"}),f.jsx("span",{className:"text-xs font-medium text-cyan-600",children:Le("dnd.dropHint")})]}),Rl&&f.jsxs("div",{className:"mt-1.5 flex items-center gap-2 px-4 py-2 rounded-lg border-2 border-dashed border-red-300 bg-red-50/50 animate-fade-in",children:[f.jsx(uee,{size:14,className:"text-red-400 flex-shrink-0"}),f.jsx("span",{className:"text-xs font-medium text-red-400",children:Le("dnd.cyclicWarning")})]})]})}function Rn(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=Rn(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var ace={value:()=>{}};function Qg(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new hp(n)}function hp(e){this._=e}function ice(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",a=n.indexOf(".");if(a>=0&&(r=n.slice(a+1),n=n.slice(0,a)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}hp.prototype=Qg.prototype={constructor:hp,on:function(e,t){var n=this._,r=ice(e+"",n),a,i=-1,s=r.length;if(arguments.length<2){for(;++i<s;)if((a=(e=r[i]).type)&&(a=sce(n[a],e.name)))return a;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<s;)if(a=(e=r[i]).type)n[a]=nR(n[a],e.name,t);else if(t==null)for(a in n)n[a]=nR(n[a],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new hp(e)},call:function(e,t){if((a=arguments.length-2)>0)for(var n=new Array(a),r=0,a,i;r<a;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],r=0,a=i.length;r<a;++r)i[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],a=0,i=r.length;a<i;++a)r[a].value.apply(t,n)}};function sce(e,t){for(var n=0,r=e.length,a;n<r;++n)if((a=e[n]).name===t)return a.value}function nR(e,t,n){for(var r=0,a=e.length;r<a;++r)if(e[r].name===t){e[r]=ace,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var CC="http://www.w3.org/1999/xhtml";const rR={svg:"http://www.w3.org/2000/svg",xhtml:CC,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Jg(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),rR.hasOwnProperty(t)?{space:rR[t],local:e}:e}function oce(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===CC&&t.documentElement.namespaceURI===CC?t.createElement(e):t.createElementNS(n,e)}}function lce(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function zH(e){var t=Jg(e);return(t.local?lce:oce)(t)}function uce(){}function yN(e){return e==null?uce:function(){return this.querySelector(e)}}function cce(e){typeof e!="function"&&(e=yN(e));for(var t=this._groups,n=t.length,r=new Array(n),a=0;a<n;++a)for(var i=t[a],s=i.length,l=r[a]=new Array(s),c,d,h=0;h<s;++h)(c=i[h])&&(d=e.call(c,c.__data__,h,i))&&("__data__"in c&&(d.__data__=c.__data__),l[h]=d);return new Zr(r,this._parents)}function dce(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function fce(){return[]}function $H(e){return e==null?fce:function(){return this.querySelectorAll(e)}}function hce(e){return function(){return dce(e.apply(this,arguments))}}function mce(e){typeof e=="function"?e=hce(e):e=$H(e);for(var t=this._groups,n=t.length,r=[],a=[],i=0;i<n;++i)for(var s=t[i],l=s.length,c,d=0;d<l;++d)(c=s[d])&&(r.push(e.call(c,c.__data__,d,s)),a.push(c));return new Zr(r,a)}function qH(e){return function(){return this.matches(e)}}function BH(e){return function(t){return t.matches(e)}}var pce=Array.prototype.find;function gce(e){return function(){return pce.call(this.children,e)}}function vce(){return this.firstElementChild}function yce(e){return this.select(e==null?vce:gce(typeof e=="function"?e:BH(e)))}var xce=Array.prototype.filter;function bce(){return Array.from(this.children)}function wce(e){return function(){return xce.call(this.children,e)}}function Sce(e){return this.selectAll(e==null?bce:wce(typeof e=="function"?e:BH(e)))}function jce(e){typeof e!="function"&&(e=qH(e));for(var t=this._groups,n=t.length,r=new Array(n),a=0;a<n;++a)for(var i=t[a],s=i.length,l=r[a]=[],c,d=0;d<s;++d)(c=i[d])&&e.call(c,c.__data__,d,i)&&l.push(c);return new Zr(r,this._parents)}function FH(e){return new Array(e.length)}function kce(){return new Zr(this._enter||this._groups.map(FH),this._parents)}function Dp(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Dp.prototype={constructor:Dp,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function _ce(e){return function(){return e}}function Cce(e,t,n,r,a,i){for(var s=0,l,c=t.length,d=i.length;s<d;++s)(l=t[s])?(l.__data__=i[s],r[s]=l):n[s]=new Dp(e,i[s]);for(;s<c;++s)(l=t[s])&&(a[s]=l)}function Nce(e,t,n,r,a,i,s){var l,c,d=new Map,h=t.length,m=i.length,g=new Array(h),v;for(l=0;l<h;++l)(c=t[l])&&(g[l]=v=s.call(c,c.__data__,l,t)+"",d.has(v)?a[l]=c:d.set(v,c));for(l=0;l<m;++l)v=s.call(e,i[l],l,i)+"",(c=d.get(v))?(r[l]=c,c.__data__=i[l],d.delete(v)):n[l]=new Dp(e,i[l]);for(l=0;l<h;++l)(c=t[l])&&d.get(g[l])===c&&(a[l]=c)}function Ece(e){return e.__data__}function Ace(e,t){if(!arguments.length)return Array.from(this,Ece);var n=t?Nce:Cce,r=this._parents,a=this._groups;typeof e!="function"&&(e=_ce(e));for(var i=a.length,s=new Array(i),l=new Array(i),c=new Array(i),d=0;d<i;++d){var h=r[d],m=a[d],g=m.length,v=Tce(e.call(h,h&&h.__data__,d,r)),b=v.length,w=l[d]=new Array(b),S=s[d]=new Array(b),j=c[d]=new Array(g);n(h,m,w,S,j,v,t);for(var _=0,k=0,E,T;_<b;++_)if(E=w[_]){for(_>=k&&(k=_+1);!(T=S[k])&&++k<b;);E._next=T||null}}return s=new Zr(s,r),s._enter=l,s._exit=c,s}function Tce(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Oce(){return new Zr(this._exit||this._groups.map(FH),this._parents)}function Mce(e,t,n){var r=this.enter(),a=this,i=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(a=t(a),a&&(a=a.selection())),n==null?i.remove():n(i),r&&a?r.merge(a).order():a}function Pce(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,a=n.length,i=r.length,s=Math.min(a,i),l=new Array(a),c=0;c<s;++c)for(var d=n[c],h=r[c],m=d.length,g=l[c]=new Array(m),v,b=0;b<m;++b)(v=d[b]||h[b])&&(g[b]=v);for(;c<a;++c)l[c]=n[c];return new Zr(l,this._parents)}function Dce(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],a=r.length-1,i=r[a],s;--a>=0;)(s=r[a])&&(i&&s.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(s,i),i=s);return this}function Rce(e){e||(e=Ice);function t(m,g){return m&&g?e(m.__data__,g.__data__):!m-!g}for(var n=this._groups,r=n.length,a=new Array(r),i=0;i<r;++i){for(var s=n[i],l=s.length,c=a[i]=new Array(l),d,h=0;h<l;++h)(d=s[h])&&(c[h]=d);c.sort(t)}return new Zr(a,this._parents).order()}function Ice(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Lce(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function zce(){return Array.from(this)}function $ce(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],a=0,i=r.length;a<i;++a){var s=r[a];if(s)return s}return null}function qce(){let e=0;for(const t of this)++e;return e}function Bce(){return!this.node()}function Fce(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var a=t[n],i=0,s=a.length,l;i<s;++i)(l=a[i])&&e.call(l,l.__data__,i,a);return this}function Hce(e){return function(){this.removeAttribute(e)}}function Uce(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Gce(e,t){return function(){this.setAttribute(e,t)}}function Vce(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Kce(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Wce(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Yce(e,t){var n=Jg(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?Uce:Hce:typeof t=="function"?n.local?Wce:Kce:n.local?Vce:Gce)(n,t))}function HH(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Xce(e){return function(){this.style.removeProperty(e)}}function Zce(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Qce(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Jce(e,t,n){return arguments.length>1?this.each((t==null?Xce:typeof t=="function"?Qce:Zce)(e,t,n??"")):Bu(this.node(),e)}function Bu(e,t){return e.style.getPropertyValue(t)||HH(e).getComputedStyle(e,null).getPropertyValue(t)}function ede(e){return function(){delete this[e]}}function tde(e,t){return function(){this[e]=t}}function nde(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function rde(e,t){return arguments.length>1?this.each((t==null?ede:typeof t=="function"?nde:tde)(e,t)):this.node()[e]}function UH(e){return e.trim().split(/^|\s+/)}function xN(e){return e.classList||new GH(e)}function GH(e){this._node=e,this._names=UH(e.getAttribute("class")||"")}GH.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function VH(e,t){for(var n=xN(e),r=-1,a=t.length;++r<a;)n.add(t[r])}function KH(e,t){for(var n=xN(e),r=-1,a=t.length;++r<a;)n.remove(t[r])}function ade(e){return function(){VH(this,e)}}function ide(e){return function(){KH(this,e)}}function sde(e,t){return function(){(t.apply(this,arguments)?VH:KH)(this,e)}}function ode(e,t){var n=UH(e+"");if(arguments.length<2){for(var r=xN(this.node()),a=-1,i=n.length;++a<i;)if(!r.contains(n[a]))return!1;return!0}return this.each((typeof t=="function"?sde:t?ade:ide)(n,t))}function lde(){this.textContent=""}function ude(e){return function(){this.textContent=e}}function cde(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function dde(e){return arguments.length?this.each(e==null?lde:(typeof e=="function"?cde:ude)(e)):this.node().textContent}function fde(){this.innerHTML=""}function hde(e){return function(){this.innerHTML=e}}function mde(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function pde(e){return arguments.length?this.each(e==null?fde:(typeof e=="function"?mde:hde)(e)):this.node().innerHTML}function gde(){this.nextSibling&&this.parentNode.appendChild(this)}function vde(){return this.each(gde)}function yde(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function xde(){return this.each(yde)}function bde(e){var t=typeof e=="function"?e:zH(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function wde(){return null}function Sde(e,t){var n=typeof e=="function"?e:zH(e),r=t==null?wde:typeof t=="function"?t:yN(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function jde(){var e=this.parentNode;e&&e.removeChild(this)}function kde(){return this.each(jde)}function _de(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Cde(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Nde(e){return this.select(e?Cde:_de)}function Ede(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Ade(e){return function(t){e.call(this,t,this.__data__)}}function Tde(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function Ode(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,a=t.length,i;n<a;++n)i=t[n],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++r]=i;++r?t.length=r:delete this.__on}}}function Mde(e,t,n){return function(){var r=this.__on,a,i=Ade(t);if(r){for(var s=0,l=r.length;s<l;++s)if((a=r[s]).type===e.type&&a.name===e.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=i,a.options=n),a.value=t;return}}this.addEventListener(e.type,i,n),a={type:e.type,name:e.name,value:t,listener:i,options:n},r?r.push(a):this.__on=[a]}}function Pde(e,t,n){var r=Tde(e+""),a,i=r.length,s;if(arguments.length<2){var l=this.node().__on;if(l){for(var c=0,d=l.length,h;c<d;++c)for(a=0,h=l[c];a<i;++a)if((s=r[a]).type===h.type&&s.name===h.name)return h.value}return}for(l=t?Mde:Ode,a=0;a<i;++a)this.each(l(r[a],t,n));return this}function WH(e,t,n){var r=HH(e),a=r.CustomEvent;typeof a=="function"?a=new a(t,n):(a=r.document.createEvent("Event"),n?(a.initEvent(t,n.bubbles,n.cancelable),a.detail=n.detail):a.initEvent(t,!1,!1)),e.dispatchEvent(a)}function Dde(e,t){return function(){return WH(this,e,t)}}function Rde(e,t){return function(){return WH(this,e,t.apply(this,arguments))}}function Ide(e,t){return this.each((typeof t=="function"?Rde:Dde)(e,t))}function*Lde(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],a=0,i=r.length,s;a<i;++a)(s=r[a])&&(yield s)}var YH=[null];function Zr(e,t){this._groups=e,this._parents=t}function zf(){return new Zr([[document.documentElement]],YH)}function zde(){return this}Zr.prototype=zf.prototype={constructor:Zr,select:cce,selectAll:mce,selectChild:yce,selectChildren:Sce,filter:jce,data:Ace,enter:kce,exit:Oce,join:Mce,merge:Pce,selection:zde,order:Dce,sort:Rce,call:Lce,nodes:zce,node:$ce,size:qce,empty:Bce,each:Fce,attr:Yce,style:Jce,property:rde,classed:ode,text:dde,html:pde,raise:vde,lower:xde,append:bde,insert:Sde,remove:kde,clone:Nde,datum:Ede,on:Pde,dispatch:Ide,[Symbol.iterator]:Lde};function Gr(e){return typeof e=="string"?new Zr([[document.querySelector(e)]],[document.documentElement]):new Zr([[e]],YH)}function $de(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Ea(e,t){if(e=$de(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var a=t.getBoundingClientRect();return[e.clientX-a.left-t.clientLeft,e.clientY-a.top-t.clientTop]}}return[e.pageX,e.pageY]}const qde={passive:!1},of={capture:!0,passive:!1};function J0(e){e.stopImmediatePropagation()}function Du(e){e.preventDefault(),e.stopImmediatePropagation()}function XH(e){var t=e.document.documentElement,n=Gr(e).on("dragstart.drag",Du,of);"onselectstart"in t?n.on("selectstart.drag",Du,of):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function ZH(e,t){var n=e.document.documentElement,r=Gr(e).on("dragstart.drag",null);t&&(r.on("click.drag",Du,of),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Lm=e=>()=>e;function NC(e,{sourceEvent:t,subject:n,target:r,identifier:a,active:i,x:s,y:l,dx:c,dy:d,dispatch:h}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:d,enumerable:!0,configurable:!0},_:{value:h}})}NC.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Bde(e){return!e.ctrlKey&&!e.button}function Fde(){return this.parentNode}function Hde(e,t){return t??{x:e.x,y:e.y}}function Ude(){return navigator.maxTouchPoints||"ontouchstart"in this}function QH(){var e=Bde,t=Fde,n=Hde,r=Ude,a={},i=Qg("start","drag","end"),s=0,l,c,d,h,m=0;function g(E){E.on("mousedown.drag",v).filter(r).on("touchstart.drag",S).on("touchmove.drag",j,qde).on("touchend.drag touchcancel.drag",_).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(E,T){if(!(h||!e.call(this,E,T))){var A=k(this,t.call(this,E,T),E,T,"mouse");A&&(Gr(E.view).on("mousemove.drag",b,of).on("mouseup.drag",w,of),XH(E.view),J0(E),d=!1,l=E.clientX,c=E.clientY,A("start",E))}}function b(E){if(Du(E),!d){var T=E.clientX-l,A=E.clientY-c;d=T*T+A*A>m}a.mouse("drag",E)}function w(E){Gr(E.view).on("mousemove.drag mouseup.drag",null),ZH(E.view,d),Du(E),a.mouse("end",E)}function S(E,T){if(e.call(this,E,T)){var A=E.changedTouches,O=t.call(this,E,T),I=A.length,P,D;for(P=0;P<I;++P)(D=k(this,O,E,T,A[P].identifier,A[P]))&&(J0(E),D("start",E,A[P]))}}function j(E){var T=E.changedTouches,A=T.length,O,I;for(O=0;O<A;++O)(I=a[T[O].identifier])&&(Du(E),I("drag",E,T[O]))}function _(E){var T=E.changedTouches,A=T.length,O,I;for(h&&clearTimeout(h),h=setTimeout(function(){h=null},500),O=0;O<A;++O)(I=a[T[O].identifier])&&(J0(E),I("end",E,T[O]))}function k(E,T,A,O,I,P){var D=i.copy(),q=Ea(P||A,T),z,F,R;if((R=n.call(E,new NC("beforestart",{sourceEvent:A,target:g,identifier:I,active:s,x:q[0],y:q[1],dx:0,dy:0,dispatch:D}),O))!=null)return z=R.x-q[0]||0,F=R.y-q[1]||0,function M(L,G,W){var Y=q,B;switch(L){case"start":a[I]=M,B=s++;break;case"end":delete a[I],--s;case"drag":q=Ea(W||G,T),B=s;break}D.call(L,E,new NC(L,{sourceEvent:G,subject:R,target:g,identifier:I,active:B,x:q[0]+z,y:q[1]+F,dx:q[0]-Y[0],dy:q[1]-Y[1],dispatch:D}),O)}}return g.filter=function(E){return arguments.length?(e=typeof E=="function"?E:Lm(!!E),g):e},g.container=function(E){return arguments.length?(t=typeof E=="function"?E:Lm(E),g):t},g.subject=function(E){return arguments.length?(n=typeof E=="function"?E:Lm(E),g):n},g.touchable=function(E){return arguments.length?(r=typeof E=="function"?E:Lm(!!E),g):r},g.on=function(){var E=i.on.apply(i,arguments);return E===i?g:E},g.clickDistance=function(E){return arguments.length?(m=(E=+E)*E,g):Math.sqrt(m)},g}function bN(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function JH(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function $f(){}var lf=.7,Rp=1/lf,Ru="\\s*([+-]?\\d+)\\s*",uf="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ui="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Gde=/^#([0-9a-f]{3,8})$/,Vde=new RegExp(`^rgb\\(${Ru},${Ru},${Ru}\\)$`),Kde=new RegExp(`^rgb\\(${ui},${ui},${ui}\\)$`),Wde=new RegExp(`^rgba\\(${Ru},${Ru},${Ru},${uf}\\)$`),Yde=new RegExp(`^rgba\\(${ui},${ui},${ui},${uf}\\)$`),Xde=new RegExp(`^hsl\\(${uf},${ui},${ui}\\)$`),Zde=new RegExp(`^hsla\\(${uf},${ui},${ui},${uf}\\)$`),aR={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};bN($f,rl,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:iR,formatHex:iR,formatHex8:Qde,formatHsl:Jde,formatRgb:sR,toString:sR});function iR(){return this.rgb().formatHex()}function Qde(){return this.rgb().formatHex8()}function Jde(){return e9(this).formatHsl()}function sR(){return this.rgb().formatRgb()}function rl(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Gde.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?oR(t):n===3?new Ar(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?zm(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?zm(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Vde.exec(e))?new Ar(t[1],t[2],t[3],1):(t=Kde.exec(e))?new Ar(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Wde.exec(e))?zm(t[1],t[2],t[3],t[4]):(t=Yde.exec(e))?zm(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Xde.exec(e))?cR(t[1],t[2]/100,t[3]/100,1):(t=Zde.exec(e))?cR(t[1],t[2]/100,t[3]/100,t[4]):aR.hasOwnProperty(e)?oR(aR[e]):e==="transparent"?new Ar(NaN,NaN,NaN,0):null}function oR(e){return new Ar(e>>16&255,e>>8&255,e&255,1)}function zm(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ar(e,t,n,r)}function efe(e){return e instanceof $f||(e=rl(e)),e?(e=e.rgb(),new Ar(e.r,e.g,e.b,e.opacity)):new Ar}function EC(e,t,n,r){return arguments.length===1?efe(e):new Ar(e,t,n,r??1)}function Ar(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}bN(Ar,EC,JH($f,{brighter(e){return e=e==null?Rp:Math.pow(Rp,e),new Ar(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?lf:Math.pow(lf,e),new Ar(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ar(Qo(this.r),Qo(this.g),Qo(this.b),Ip(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:lR,formatHex:lR,formatHex8:tfe,formatRgb:uR,toString:uR}));function lR(){return`#${Wo(this.r)}${Wo(this.g)}${Wo(this.b)}`}function tfe(){return`#${Wo(this.r)}${Wo(this.g)}${Wo(this.b)}${Wo((isNaN(this.opacity)?1:this.opacity)*255)}`}function uR(){const e=Ip(this.opacity);return`${e===1?"rgb(":"rgba("}${Qo(this.r)}, ${Qo(this.g)}, ${Qo(this.b)}${e===1?")":`, ${e})`}`}function Ip(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Qo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Wo(e){return e=Qo(e),(e<16?"0":"")+e.toString(16)}function cR(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ta(e,t,n,r)}function e9(e){if(e instanceof Ta)return new Ta(e.h,e.s,e.l,e.opacity);if(e instanceof $f||(e=rl(e)),!e)return new Ta;if(e instanceof Ta)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),i=Math.max(t,n,r),s=NaN,l=i-a,c=(i+a)/2;return l?(t===i?s=(n-r)/l+(n<r)*6:n===i?s=(r-t)/l+2:s=(t-n)/l+4,l/=c<.5?i+a:2-i-a,s*=60):l=c>0&&c<1?0:s,new Ta(s,l,c,e.opacity)}function nfe(e,t,n,r){return arguments.length===1?e9(e):new Ta(e,t,n,r??1)}function Ta(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}bN(Ta,nfe,JH($f,{brighter(e){return e=e==null?Rp:Math.pow(Rp,e),new Ta(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?lf:Math.pow(lf,e),new Ta(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new Ar(eb(e>=240?e-240:e+120,a,r),eb(e,a,r),eb(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new Ta(dR(this.h),$m(this.s),$m(this.l),Ip(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Ip(this.opacity);return`${e===1?"hsl(":"hsla("}${dR(this.h)}, ${$m(this.s)*100}%, ${$m(this.l)*100}%${e===1?")":`, ${e})`}`}}));function dR(e){return e=(e||0)%360,e<0?e+360:e}function $m(e){return Math.max(0,Math.min(1,e||0))}function eb(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const wN=e=>()=>e;function rfe(e,t){return function(n){return e+n*t}}function afe(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function ife(e){return(e=+e)==1?t9:function(t,n){return n-t?afe(t,n,e):wN(isNaN(t)?n:t)}}function t9(e,t){var n=t-e;return n?rfe(e,n):wN(isNaN(e)?t:e)}const Lp=(function e(t){var n=ife(t);function r(a,i){var s=n((a=EC(a)).r,(i=EC(i)).r),l=n(a.g,i.g),c=n(a.b,i.b),d=t9(a.opacity,i.opacity);return function(h){return a.r=s(h),a.g=l(h),a.b=c(h),a.opacity=d(h),a+""}}return r.gamma=e,r})(1);function sfe(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),a;return function(i){for(a=0;a<n;++a)r[a]=e[a]*(1-i)+t[a]*i;return r}}function ofe(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function lfe(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,a=new Array(r),i=new Array(n),s;for(s=0;s<r;++s)a[s]=Yi(e[s],t[s]);for(;s<n;++s)i[s]=t[s];return function(l){for(s=0;s<r;++s)i[s]=a[s](l);return i}}function ufe(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Aa(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function cfe(e,t){var n={},r={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?n[a]=Yi(e[a],t[a]):r[a]=t[a];return function(i){for(a in n)r[a]=n[a](i);return r}}var AC=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,tb=new RegExp(AC.source,"g");function dfe(e){return function(){return e}}function ffe(e){return function(t){return e(t)+""}}function n9(e,t){var n=AC.lastIndex=tb.lastIndex=0,r,a,i,s=-1,l=[],c=[];for(e=e+"",t=t+"";(r=AC.exec(e))&&(a=tb.exec(t));)(i=a.index)>n&&(i=t.slice(n,i),l[s]?l[s]+=i:l[++s]=i),(r=r[0])===(a=a[0])?l[s]?l[s]+=a:l[++s]=a:(l[++s]=null,c.push({i:s,x:Aa(r,a)})),n=tb.lastIndex;return n<t.length&&(i=t.slice(n),l[s]?l[s]+=i:l[++s]=i),l.length<2?c[0]?ffe(c[0].x):dfe(t):(t=c.length,function(d){for(var h=0,m;h<t;++h)l[(m=c[h]).i]=m.x(d);return l.join("")})}function Yi(e,t){var n=typeof t,r;return t==null||n==="boolean"?wN(t):(n==="number"?Aa:n==="string"?(r=rl(t))?(t=r,Lp):n9:t instanceof rl?Lp:t instanceof Date?ufe:ofe(t)?sfe:Array.isArray(t)?lfe:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?cfe:Aa)(e,t)}function SN(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var fR=180/Math.PI,TC={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function r9(e,t,n,r,a,i){var s,l,c;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,c/=l),e*r<t*n&&(e=-e,t=-t,c=-c,s=-s),{translateX:a,translateY:i,rotate:Math.atan2(t,e)*fR,skewX:Math.atan(c)*fR,scaleX:s,scaleY:l}}var qm;function hfe(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?TC:r9(t.a,t.b,t.c,t.d,t.e,t.f)}function mfe(e){return e==null||(qm||(qm=document.createElementNS("http://www.w3.org/2000/svg","g")),qm.setAttribute("transform",e),!(e=qm.transform.baseVal.consolidate()))?TC:(e=e.matrix,r9(e.a,e.b,e.c,e.d,e.e,e.f))}function a9(e,t,n,r){function a(d){return d.length?d.pop()+" ":""}function i(d,h,m,g,v,b){if(d!==m||h!==g){var w=v.push("translate(",null,t,null,n);b.push({i:w-4,x:Aa(d,m)},{i:w-2,x:Aa(h,g)})}else(m||g)&&v.push("translate("+m+t+g+n)}function s(d,h,m,g){d!==h?(d-h>180?h+=360:h-d>180&&(d+=360),g.push({i:m.push(a(m)+"rotate(",null,r)-2,x:Aa(d,h)})):h&&m.push(a(m)+"rotate("+h+r)}function l(d,h,m,g){d!==h?g.push({i:m.push(a(m)+"skewX(",null,r)-2,x:Aa(d,h)}):h&&m.push(a(m)+"skewX("+h+r)}function c(d,h,m,g,v,b){if(d!==m||h!==g){var w=v.push(a(v)+"scale(",null,",",null,")");b.push({i:w-4,x:Aa(d,m)},{i:w-2,x:Aa(h,g)})}else(m!==1||g!==1)&&v.push(a(v)+"scale("+m+","+g+")")}return function(d,h){var m=[],g=[];return d=e(d),h=e(h),i(d.translateX,d.translateY,h.translateX,h.translateY,m,g),s(d.rotate,h.rotate,m,g),l(d.skewX,h.skewX,m,g),c(d.scaleX,d.scaleY,h.scaleX,h.scaleY,m,g),d=h=null,function(v){for(var b=-1,w=g.length,S;++b<w;)m[(S=g[b]).i]=S.x(v);return m.join("")}}}var pfe=a9(hfe,"px, ","px)","deg)"),gfe=a9(mfe,", ",")",")"),vfe=1e-12;function hR(e){return((e=Math.exp(e))+1/e)/2}function yfe(e){return((e=Math.exp(e))-1/e)/2}function xfe(e){return((e=Math.exp(2*e))-1)/(e+1)}const mp=(function e(t,n,r){function a(i,s){var l=i[0],c=i[1],d=i[2],h=s[0],m=s[1],g=s[2],v=h-l,b=m-c,w=v*v+b*b,S,j;if(w<vfe)j=Math.log(g/d)/t,S=function(O){return[l+O*v,c+O*b,d*Math.exp(t*O*j)]};else{var _=Math.sqrt(w),k=(g*g-d*d+r*w)/(2*d*n*_),E=(g*g-d*d-r*w)/(2*g*n*_),T=Math.log(Math.sqrt(k*k+1)-k),A=Math.log(Math.sqrt(E*E+1)-E);j=(A-T)/t,S=function(O){var I=O*j,P=hR(T),D=d/(n*_)*(P*xfe(t*I+T)-yfe(T));return[l+D*v,c+D*b,d*P/hR(t*I+T)]}}return S.duration=j*1e3*t/Math.SQRT2,S}return a.rho=function(i){var s=Math.max(.001,+i),l=s*s,c=l*l;return e(s,l,c)},a})(Math.SQRT2,2,4);function bfe(e,t){t===void 0&&(t=e,e=Yi);for(var n=0,r=t.length-1,a=t[0],i=new Array(r<0?0:r);n<r;)i[n]=e(a,a=t[++n]);return function(s){var l=Math.max(0,Math.min(r-1,Math.floor(s*=r)));return i[l](s-l)}}var Fu=0,Rd=0,bd=0,i9=1e3,zp,Id,$p=0,al=0,ev=0,cf=typeof performance=="object"&&performance.now?performance:Date,s9=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function jN(){return al||(s9(wfe),al=cf.now()+ev)}function wfe(){al=0}function qp(){this._call=this._time=this._next=null}qp.prototype=o9.prototype={constructor:qp,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?jN():+n)+(t==null?0:+t),!this._next&&Id!==this&&(Id?Id._next=this:zp=this,Id=this),this._call=e,this._time=n,OC()},stop:function(){this._call&&(this._call=null,this._time=1/0,OC())}};function o9(e,t,n){var r=new qp;return r.restart(e,t,n),r}function Sfe(){jN(),++Fu;for(var e=zp,t;e;)(t=al-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Fu}function mR(){al=($p=cf.now())+ev,Fu=Rd=0;try{Sfe()}finally{Fu=0,kfe(),al=0}}function jfe(){var e=cf.now(),t=e-$p;t>i9&&(ev-=t,$p=e)}function kfe(){for(var e,t=zp,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:zp=n);Id=e,OC(r)}function OC(e){if(!Fu){Rd&&(Rd=clearTimeout(Rd));var t=e-al;t>24?(e<1/0&&(Rd=setTimeout(mR,e-cf.now()-ev)),bd&&(bd=clearInterval(bd))):(bd||($p=cf.now(),bd=setInterval(jfe,i9)),Fu=1,s9(mR))}}function pR(e,t,n){var r=new qp;return t=t==null?0:+t,r.restart(a=>{r.stop(),e(a+t)},t,n),r}var _fe=Qg("start","end","cancel","interrupt"),Cfe=[],l9=0,gR=1,MC=2,pp=3,vR=4,PC=5,gp=6;function tv(e,t,n,r,a,i){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;Nfe(e,n,{name:t,index:r,group:a,on:_fe,tween:Cfe,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:l9})}function kN(e,t){var n=qa(e,t);if(n.state>l9)throw new Error("too late; already scheduled");return n}function bi(e,t){var n=qa(e,t);if(n.state>pp)throw new Error("too late; already running");return n}function qa(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Nfe(e,t,n){var r=e.__transition,a;r[t]=n,n.timer=o9(i,0,n.time);function i(d){n.state=gR,n.timer.restart(s,n.delay,n.time),n.delay<=d&&s(d-n.delay)}function s(d){var h,m,g,v;if(n.state!==gR)return c();for(h in r)if(v=r[h],v.name===n.name){if(v.state===pp)return pR(s);v.state===vR?(v.state=gp,v.timer.stop(),v.on.call("interrupt",e,e.__data__,v.index,v.group),delete r[h]):+h<t&&(v.state=gp,v.timer.stop(),v.on.call("cancel",e,e.__data__,v.index,v.group),delete r[h])}if(pR(function(){n.state===pp&&(n.state=vR,n.timer.restart(l,n.delay,n.time),l(d))}),n.state=MC,n.on.call("start",e,e.__data__,n.index,n.group),n.state===MC){for(n.state=pp,a=new Array(g=n.tween.length),h=0,m=-1;h<g;++h)(v=n.tween[h].value.call(e,e.__data__,n.index,n.group))&&(a[++m]=v);a.length=m+1}}function l(d){for(var h=d<n.duration?n.ease.call(null,d/n.duration):(n.timer.restart(c),n.state=PC,1),m=-1,g=a.length;++m<g;)a[m].call(e,h);n.state===PC&&(n.on.call("end",e,e.__data__,n.index,n.group),c())}function c(){n.state=gp,n.timer.stop(),delete r[t];for(var d in r)return;delete e.__transition}}function vp(e,t){var n=e.__transition,r,a,i=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((r=n[s]).name!==t){i=!1;continue}a=r.state>MC&&r.state<PC,r.state=gp,r.timer.stop(),r.on.call(a?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[s]}i&&delete e.__transition}}function Efe(e){return this.each(function(){vp(this,e)})}function Afe(e,t){var n,r;return function(){var a=bi(this,e),i=a.tween;if(i!==n){r=n=i;for(var s=0,l=r.length;s<l;++s)if(r[s].name===t){r=r.slice(),r.splice(s,1);break}}a.tween=r}}function Tfe(e,t,n){var r,a;if(typeof n!="function")throw new Error;return function(){var i=bi(this,e),s=i.tween;if(s!==r){a=(r=s).slice();for(var l={name:t,value:n},c=0,d=a.length;c<d;++c)if(a[c].name===t){a[c]=l;break}c===d&&a.push(l)}i.tween=a}}function Ofe(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=qa(this.node(),n).tween,a=0,i=r.length,s;a<i;++a)if((s=r[a]).name===e)return s.value;return null}return this.each((t==null?Afe:Tfe)(n,e,t))}function _N(e,t,n){var r=e._id;return e.each(function(){var a=bi(this,r);(a.value||(a.value={}))[t]=n.apply(this,arguments)}),function(a){return qa(a,r).value[t]}}function u9(e,t){var n;return(typeof t=="number"?Aa:t instanceof rl?Lp:(n=rl(t))?(t=n,Lp):n9)(e,t)}function Mfe(e){return function(){this.removeAttribute(e)}}function Pfe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Dfe(e,t,n){var r,a=n+"",i;return function(){var s=this.getAttribute(e);return s===a?null:s===r?i:i=t(r=s,n)}}function Rfe(e,t,n){var r,a=n+"",i;return function(){var s=this.getAttributeNS(e.space,e.local);return s===a?null:s===r?i:i=t(r=s,n)}}function Ife(e,t,n){var r,a,i;return function(){var s,l=n(this),c;return l==null?void this.removeAttribute(e):(s=this.getAttribute(e),c=l+"",s===c?null:s===r&&c===a?i:(a=c,i=t(r=s,l)))}}function Lfe(e,t,n){var r,a,i;return function(){var s,l=n(this),c;return l==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),c=l+"",s===c?null:s===r&&c===a?i:(a=c,i=t(r=s,l)))}}function zfe(e,t){var n=Jg(e),r=n==="transform"?gfe:u9;return this.attrTween(e,typeof t=="function"?(n.local?Lfe:Ife)(n,r,_N(this,"attr."+e,t)):t==null?(n.local?Pfe:Mfe)(n):(n.local?Rfe:Dfe)(n,r,t))}function $fe(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function qfe(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Bfe(e,t){var n,r;function a(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&qfe(e,i)),n}return a._value=t,a}function Ffe(e,t){var n,r;function a(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&$fe(e,i)),n}return a._value=t,a}function Hfe(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=Jg(e);return this.tween(n,(r.local?Bfe:Ffe)(r,t))}function Ufe(e,t){return function(){kN(this,e).delay=+t.apply(this,arguments)}}function Gfe(e,t){return t=+t,function(){kN(this,e).delay=t}}function Vfe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Ufe:Gfe)(t,e)):qa(this.node(),t).delay}function Kfe(e,t){return function(){bi(this,e).duration=+t.apply(this,arguments)}}function Wfe(e,t){return t=+t,function(){bi(this,e).duration=t}}function Yfe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Kfe:Wfe)(t,e)):qa(this.node(),t).duration}function Xfe(e,t){if(typeof t!="function")throw new Error;return function(){bi(this,e).ease=t}}function Zfe(e){var t=this._id;return arguments.length?this.each(Xfe(t,e)):qa(this.node(),t).ease}function Qfe(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;bi(this,e).ease=n}}function Jfe(e){if(typeof e!="function")throw new Error;return this.each(Qfe(this._id,e))}function ehe(e){typeof e!="function"&&(e=qH(e));for(var t=this._groups,n=t.length,r=new Array(n),a=0;a<n;++a)for(var i=t[a],s=i.length,l=r[a]=[],c,d=0;d<s;++d)(c=i[d])&&e.call(c,c.__data__,d,i)&&l.push(c);return new ns(r,this._parents,this._name,this._id)}function the(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,a=n.length,i=Math.min(r,a),s=new Array(r),l=0;l<i;++l)for(var c=t[l],d=n[l],h=c.length,m=s[l]=new Array(h),g,v=0;v<h;++v)(g=c[v]||d[v])&&(m[v]=g);for(;l<r;++l)s[l]=t[l];return new ns(s,this._parents,this._name,this._id)}function nhe(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function rhe(e,t,n){var r,a,i=nhe(t)?kN:bi;return function(){var s=i(this,e),l=s.on;l!==r&&(a=(r=l).copy()).on(t,n),s.on=a}}function ahe(e,t){var n=this._id;return arguments.length<2?qa(this.node(),n).on.on(e):this.each(rhe(n,e,t))}function ihe(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function she(){return this.on("end.remove",ihe(this._id))}function ohe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=yN(e));for(var r=this._groups,a=r.length,i=new Array(a),s=0;s<a;++s)for(var l=r[s],c=l.length,d=i[s]=new Array(c),h,m,g=0;g<c;++g)(h=l[g])&&(m=e.call(h,h.__data__,g,l))&&("__data__"in h&&(m.__data__=h.__data__),d[g]=m,tv(d[g],t,n,g,d,qa(h,n)));return new ns(i,this._parents,t,n)}function lhe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=$H(e));for(var r=this._groups,a=r.length,i=[],s=[],l=0;l<a;++l)for(var c=r[l],d=c.length,h,m=0;m<d;++m)if(h=c[m]){for(var g=e.call(h,h.__data__,m,c),v,b=qa(h,n),w=0,S=g.length;w<S;++w)(v=g[w])&&tv(v,t,n,w,g,b);i.push(g),s.push(h)}return new ns(i,s,t,n)}var uhe=zf.prototype.constructor;function che(){return new uhe(this._groups,this._parents)}function dhe(e,t){var n,r,a;return function(){var i=Bu(this,e),s=(this.style.removeProperty(e),Bu(this,e));return i===s?null:i===n&&s===r?a:a=t(n=i,r=s)}}function c9(e){return function(){this.style.removeProperty(e)}}function fhe(e,t,n){var r,a=n+"",i;return function(){var s=Bu(this,e);return s===a?null:s===r?i:i=t(r=s,n)}}function hhe(e,t,n){var r,a,i;return function(){var s=Bu(this,e),l=n(this),c=l+"";return l==null&&(c=l=(this.style.removeProperty(e),Bu(this,e))),s===c?null:s===r&&c===a?i:(a=c,i=t(r=s,l))}}function mhe(e,t){var n,r,a,i="style."+t,s="end."+i,l;return function(){var c=bi(this,e),d=c.on,h=c.value[i]==null?l||(l=c9(t)):void 0;(d!==n||a!==h)&&(r=(n=d).copy()).on(s,a=h),c.on=r}}function phe(e,t,n){var r=(e+="")=="transform"?pfe:u9;return t==null?this.styleTween(e,dhe(e,r)).on("end.style."+e,c9(e)):typeof t=="function"?this.styleTween(e,hhe(e,r,_N(this,"style."+e,t))).each(mhe(this._id,e)):this.styleTween(e,fhe(e,r,t),n).on("end.style."+e,null)}function ghe(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function vhe(e,t,n){var r,a;function i(){var s=t.apply(this,arguments);return s!==a&&(r=(a=s)&&ghe(e,s,n)),r}return i._value=t,i}function yhe(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,vhe(e,t,n??""))}function xhe(e){return function(){this.textContent=e}}function bhe(e){return function(){var t=e(this);this.textContent=t??""}}function whe(e){return this.tween("text",typeof e=="function"?bhe(_N(this,"text",e)):xhe(e==null?"":e+""))}function She(e){return function(t){this.textContent=e.call(this,t)}}function jhe(e){var t,n;function r(){var a=e.apply(this,arguments);return a!==n&&(t=(n=a)&&She(a)),t}return r._value=e,r}function khe(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,jhe(e))}function _he(){for(var e=this._name,t=this._id,n=d9(),r=this._groups,a=r.length,i=0;i<a;++i)for(var s=r[i],l=s.length,c,d=0;d<l;++d)if(c=s[d]){var h=qa(c,t);tv(c,e,n,d,s,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new ns(r,this._parents,e,n)}function Che(){var e,t,n=this,r=n._id,a=n.size();return new Promise(function(i,s){var l={value:s},c={value:function(){--a===0&&i()}};n.each(function(){var d=bi(this,r),h=d.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(c)),d.on=t}),a===0&&i()})}var Nhe=0;function ns(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function d9(){return++Nhe}var Fi=zf.prototype;ns.prototype={constructor:ns,select:ohe,selectAll:lhe,selectChild:Fi.selectChild,selectChildren:Fi.selectChildren,filter:ehe,merge:the,selection:che,transition:_he,call:Fi.call,nodes:Fi.nodes,node:Fi.node,size:Fi.size,empty:Fi.empty,each:Fi.each,on:ahe,attr:zfe,attrTween:Hfe,style:phe,styleTween:yhe,text:whe,textTween:khe,remove:she,tween:Ofe,delay:Vfe,duration:Yfe,ease:Zfe,easeVarying:Jfe,end:Che,[Symbol.iterator]:Fi[Symbol.iterator]};function Ehe(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Ahe={time:null,delay:0,duration:250,ease:Ehe};function The(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function Ohe(e){var t,n;e instanceof ns?(t=e._id,e=e._name):(t=d9(),(n=Ahe).time=jN(),e=e==null?null:e+"");for(var r=this._groups,a=r.length,i=0;i<a;++i)for(var s=r[i],l=s.length,c,d=0;d<l;++d)(c=s[d])&&tv(c,e,t,d,s,n||The(c,t));return new ns(r,this._parents,e,t)}zf.prototype.interrupt=Efe;zf.prototype.transition=Ohe;const Bm=e=>()=>e;function Mhe(e,{sourceEvent:t,target:n,transform:r,dispatch:a}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:a}})}function Gi(e,t,n){this.k=e,this.x=t,this.y=n}Gi.prototype={constructor:Gi,scale:function(e){return e===1?this:new Gi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Gi(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var nv=new Gi(1,0,0);f9.prototype=Gi.prototype;function f9(e){for(;!e.__zoom;)if(!(e=e.parentNode))return nv;return e.__zoom}function nb(e){e.stopImmediatePropagation()}function wd(e){e.preventDefault(),e.stopImmediatePropagation()}function Phe(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Dhe(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function yR(){return this.__zoom||nv}function Rhe(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Ihe(){return navigator.maxTouchPoints||"ontouchstart"in this}function Lhe(e,t,n){var r=e.invertX(t[0][0])-n[0][0],a=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(a>r?(r+a)/2:Math.min(0,r)||Math.max(0,a),s>i?(i+s)/2:Math.min(0,i)||Math.max(0,s))}function h9(){var e=Phe,t=Dhe,n=Lhe,r=Rhe,a=Ihe,i=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,c=mp,d=Qg("start","zoom","end"),h,m,g,v=500,b=150,w=0,S=10;function j(R){R.property("__zoom",yR).on("wheel.zoom",I,{passive:!1}).on("mousedown.zoom",P).on("dblclick.zoom",D).filter(a).on("touchstart.zoom",q).on("touchmove.zoom",z).on("touchend.zoom touchcancel.zoom",F).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}j.transform=function(R,M,L,G){var W=R.selection?R.selection():R;W.property("__zoom",yR),R!==W?T(R,M,L,G):W.interrupt().each(function(){A(this,arguments).event(G).start().zoom(null,typeof M=="function"?M.apply(this,arguments):M).end()})},j.scaleBy=function(R,M,L,G){j.scaleTo(R,function(){var W=this.__zoom.k,Y=typeof M=="function"?M.apply(this,arguments):M;return W*Y},L,G)},j.scaleTo=function(R,M,L,G){j.transform(R,function(){var W=t.apply(this,arguments),Y=this.__zoom,B=L==null?E(W):typeof L=="function"?L.apply(this,arguments):L,H=Y.invert(B),K=typeof M=="function"?M.apply(this,arguments):M;return n(k(_(Y,K),B,H),W,s)},L,G)},j.translateBy=function(R,M,L,G){j.transform(R,function(){return n(this.__zoom.translate(typeof M=="function"?M.apply(this,arguments):M,typeof L=="function"?L.apply(this,arguments):L),t.apply(this,arguments),s)},null,G)},j.translateTo=function(R,M,L,G,W){j.transform(R,function(){var Y=t.apply(this,arguments),B=this.__zoom,H=G==null?E(Y):typeof G=="function"?G.apply(this,arguments):G;return n(nv.translate(H[0],H[1]).scale(B.k).translate(typeof M=="function"?-M.apply(this,arguments):-M,typeof L=="function"?-L.apply(this,arguments):-L),Y,s)},G,W)};function _(R,M){return M=Math.max(i[0],Math.min(i[1],M)),M===R.k?R:new Gi(M,R.x,R.y)}function k(R,M,L){var G=M[0]-L[0]*R.k,W=M[1]-L[1]*R.k;return G===R.x&&W===R.y?R:new Gi(R.k,G,W)}function E(R){return[(+R[0][0]+ +R[1][0])/2,(+R[0][1]+ +R[1][1])/2]}function T(R,M,L,G){R.on("start.zoom",function(){A(this,arguments).event(G).start()}).on("interrupt.zoom end.zoom",function(){A(this,arguments).event(G).end()}).tween("zoom",function(){var W=this,Y=arguments,B=A(W,Y).event(G),H=t.apply(W,Y),K=L==null?E(H):typeof L=="function"?L.apply(W,Y):L,U=Math.max(H[1][0]-H[0][0],H[1][1]-H[0][1]),X=W.__zoom,J=typeof M=="function"?M.apply(W,Y):M,Q=c(X.invert(K).concat(U/X.k),J.invert(K).concat(U/J.k));return function(re){if(re===1)re=J;else{var ue=Q(re),Z=U/ue[2];re=new Gi(Z,K[0]-ue[0]*Z,K[1]-ue[1]*Z)}B.zoom(null,re)}})}function A(R,M,L){return!L&&R.__zooming||new O(R,M)}function O(R,M){this.that=R,this.args=M,this.active=0,this.sourceEvent=null,this.extent=t.apply(R,M),this.taps=0}O.prototype={event:function(R){return R&&(this.sourceEvent=R),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(R,M){return this.mouse&&R!=="mouse"&&(this.mouse[1]=M.invert(this.mouse[0])),this.touch0&&R!=="touch"&&(this.touch0[1]=M.invert(this.touch0[0])),this.touch1&&R!=="touch"&&(this.touch1[1]=M.invert(this.touch1[0])),this.that.__zoom=M,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(R){var M=Gr(this.that).datum();d.call(R,this.that,new Mhe(R,{sourceEvent:this.sourceEvent,target:j,transform:this.that.__zoom,dispatch:d}),M)}};function I(R,...M){if(!e.apply(this,arguments))return;var L=A(this,M).event(R),G=this.__zoom,W=Math.max(i[0],Math.min(i[1],G.k*Math.pow(2,r.apply(this,arguments)))),Y=Ea(R);if(L.wheel)(L.mouse[0][0]!==Y[0]||L.mouse[0][1]!==Y[1])&&(L.mouse[1]=G.invert(L.mouse[0]=Y)),clearTimeout(L.wheel);else{if(G.k===W)return;L.mouse=[Y,G.invert(Y)],vp(this),L.start()}wd(R),L.wheel=setTimeout(B,b),L.zoom("mouse",n(k(_(G,W),L.mouse[0],L.mouse[1]),L.extent,s));function B(){L.wheel=null,L.end()}}function P(R,...M){if(g||!e.apply(this,arguments))return;var L=R.currentTarget,G=A(this,M,!0).event(R),W=Gr(R.view).on("mousemove.zoom",K,!0).on("mouseup.zoom",U,!0),Y=Ea(R,L),B=R.clientX,H=R.clientY;XH(R.view),nb(R),G.mouse=[Y,this.__zoom.invert(Y)],vp(this),G.start();function K(X){if(wd(X),!G.moved){var J=X.clientX-B,Q=X.clientY-H;G.moved=J*J+Q*Q>w}G.event(X).zoom("mouse",n(k(G.that.__zoom,G.mouse[0]=Ea(X,L),G.mouse[1]),G.extent,s))}function U(X){W.on("mousemove.zoom mouseup.zoom",null),ZH(X.view,G.moved),wd(X),G.event(X).end()}}function D(R,...M){if(e.apply(this,arguments)){var L=this.__zoom,G=Ea(R.changedTouches?R.changedTouches[0]:R,this),W=L.invert(G),Y=L.k*(R.shiftKey?.5:2),B=n(k(_(L,Y),G,W),t.apply(this,M),s);wd(R),l>0?Gr(this).transition().duration(l).call(T,B,G,R):Gr(this).call(j.transform,B,G,R)}}function q(R,...M){if(e.apply(this,arguments)){var L=R.touches,G=L.length,W=A(this,M,R.changedTouches.length===G).event(R),Y,B,H,K;for(nb(R),B=0;B<G;++B)H=L[B],K=Ea(H,this),K=[K,this.__zoom.invert(K),H.identifier],W.touch0?!W.touch1&&W.touch0[2]!==K[2]&&(W.touch1=K,W.taps=0):(W.touch0=K,Y=!0,W.taps=1+!!h);h&&(h=clearTimeout(h)),Y&&(W.taps<2&&(m=K[0],h=setTimeout(function(){h=null},v)),vp(this),W.start())}}function z(R,...M){if(this.__zooming){var L=A(this,M).event(R),G=R.changedTouches,W=G.length,Y,B,H,K;for(wd(R),Y=0;Y<W;++Y)B=G[Y],H=Ea(B,this),L.touch0&&L.touch0[2]===B.identifier?L.touch0[0]=H:L.touch1&&L.touch1[2]===B.identifier&&(L.touch1[0]=H);if(B=L.that.__zoom,L.touch1){var U=L.touch0[0],X=L.touch0[1],J=L.touch1[0],Q=L.touch1[1],re=(re=J[0]-U[0])*re+(re=J[1]-U[1])*re,ue=(ue=Q[0]-X[0])*ue+(ue=Q[1]-X[1])*ue;B=_(B,Math.sqrt(re/ue)),H=[(U[0]+J[0])/2,(U[1]+J[1])/2],K=[(X[0]+Q[0])/2,(X[1]+Q[1])/2]}else if(L.touch0)H=L.touch0[0],K=L.touch0[1];else return;L.zoom("touch",n(k(B,H,K),L.extent,s))}}function F(R,...M){if(this.__zooming){var L=A(this,M).event(R),G=R.changedTouches,W=G.length,Y,B;for(nb(R),g&&clearTimeout(g),g=setTimeout(function(){g=null},v),Y=0;Y<W;++Y)B=G[Y],L.touch0&&L.touch0[2]===B.identifier?delete L.touch0:L.touch1&&L.touch1[2]===B.identifier&&delete L.touch1;if(L.touch1&&!L.touch0&&(L.touch0=L.touch1,delete L.touch1),L.touch0)L.touch0[1]=this.__zoom.invert(L.touch0[0]);else if(L.end(),L.taps===2&&(B=Ea(B,this),Math.hypot(m[0]-B[0],m[1]-B[1])<S)){var H=Gr(this).on("dblclick.zoom");H&&H.apply(this,arguments)}}}return j.wheelDelta=function(R){return arguments.length?(r=typeof R=="function"?R:Bm(+R),j):r},j.filter=function(R){return arguments.length?(e=typeof R=="function"?R:Bm(!!R),j):e},j.touchable=function(R){return arguments.length?(a=typeof R=="function"?R:Bm(!!R),j):a},j.extent=function(R){return arguments.length?(t=typeof R=="function"?R:Bm([[+R[0][0],+R[0][1]],[+R[1][0],+R[1][1]]]),j):t},j.scaleExtent=function(R){return arguments.length?(i[0]=+R[0],i[1]=+R[1],j):[i[0],i[1]]},j.translateExtent=function(R){return arguments.length?(s[0][0]=+R[0][0],s[1][0]=+R[1][0],s[0][1]=+R[0][1],s[1][1]=+R[1][1],j):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},j.constrain=function(R){return arguments.length?(n=R,j):n},j.duration=function(R){return arguments.length?(l=+R,j):l},j.interpolate=function(R){return arguments.length?(c=R,j):c},j.on=function(){var R=d.on.apply(d,arguments);return R===d?j:R},j.clickDistance=function(R){return arguments.length?(w=(R=+R)*R,j):Math.sqrt(w)},j.tapDistance=function(R){return arguments.length?(S=+R,j):S},j}const di={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:r}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},df=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],m9=["Enter"," ","Escape"],p9={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Hu;(function(e){e.Strict="strict",e.Loose="loose"})(Hu||(Hu={}));var Jo;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Jo||(Jo={}));var ff;(function(e){e.Partial="partial",e.Full="full"})(ff||(ff={}));const g9={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var Zs;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Zs||(Zs={}));var hf;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(hf||(hf={}));var et;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(et||(et={}));const xR={[et.Left]:et.Right,[et.Right]:et.Left,[et.Top]:et.Bottom,[et.Bottom]:et.Top};function v9(e){return e===null?null:e?"valid":"invalid"}const y9=e=>"id"in e&&"source"in e&&"target"in e,zhe=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),CN=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),qf=(e,t=[0,0])=>{const{width:n,height:r}=ls(e),a=e.origin??t,i=n*a[0],s=r*a[1];return{x:e.position.x-i,y:e.position.y-s}},$he=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,a)=>{const i=typeof a=="string";let s=!t.nodeLookup&&!i?a:void 0;t.nodeLookup&&(s=i?t.nodeLookup.get(a):CN(a)?a:t.nodeLookup.get(a.id));const l=s?Bp(s,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return rv(r,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return av(n)},Bf=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(a=>{(t.filter===void 0||t.filter(a))&&(n=rv(n,Bp(a)),r=!0)}),r?av(n):{x:0,y:0,width:0,height:0}},NN=(e,t,[n,r,a]=[0,0,1],i=!1,s=!1)=>{const l={...Hf(t,[n,r,a]),width:t.width/a,height:t.height/a},c=[];for(const d of e.values()){const{measured:h,selectable:m=!0,hidden:g=!1}=d;if(s&&!m||g)continue;const v=h.width??d.width??d.initialWidth??null,b=h.height??d.height??d.initialHeight??null,w=mf(l,Gu(d)),S=(v??0)*(b??0),j=i&&w>0;(!d.internals.handleBounds||j||w>=S||d.dragging)&&c.push(d)}return c},qhe=(e,t)=>{const n=new Set;return e.forEach(r=>{n.add(r.id)}),t.filter(r=>n.has(r.source)||n.has(r.target))};function Bhe(e,t){const n=new Map,r=t!=null&&t.nodes?new Set(t.nodes.map(a=>a.id)):null;return e.forEach(a=>{a.measured.width&&a.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!a.hidden)&&(!r||r.has(a.id))&&n.set(a.id,a)}),n}async function Fhe({nodes:e,width:t,height:n,panZoom:r,minZoom:a,maxZoom:i},s){if(e.size===0)return Promise.resolve(!0);const l=Bhe(e,s),c=Bf(l),d=EN(c,t,n,(s==null?void 0:s.minZoom)??a,(s==null?void 0:s.maxZoom)??i,(s==null?void 0:s.padding)??.1);return await r.setViewport(d,{duration:s==null?void 0:s.duration,ease:s==null?void 0:s.ease,interpolate:s==null?void 0:s.interpolate}),Promise.resolve(!0)}function x9({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:a,onError:i}){const s=n.get(e),l=s.parentId?n.get(s.parentId):void 0,{x:c,y:d}=l?l.internals.positionAbsolute:{x:0,y:0},h=s.origin??r;let m=s.extent||a;if(s.extent==="parent"&&!s.expandParent)if(!l)i==null||i("005",di.error005());else{const v=l.measured.width,b=l.measured.height;v&&b&&(m=[[c,d],[c+v,d+b]])}else l&&Vu(s.extent)&&(m=[[s.extent[0][0]+c,s.extent[0][1]+d],[s.extent[1][0]+c,s.extent[1][1]+d]]);const g=Vu(m)?il(t,m,s.measured):t;return(s.measured.width===void 0||s.measured.height===void 0)&&(i==null||i("015",di.error015())),{position:{x:g.x-c+(s.measured.width??0)*h[0],y:g.y-d+(s.measured.height??0)*h[1]},positionAbsolute:g}}async function Hhe({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:a}){const i=new Set(e.map(g=>g.id)),s=[];for(const g of n){if(g.deletable===!1)continue;const v=i.has(g.id),b=!v&&g.parentId&&s.find(w=>w.id===g.parentId);(v||b)&&s.push(g)}const l=new Set(t.map(g=>g.id)),c=r.filter(g=>g.deletable!==!1),h=qhe(s,c);for(const g of c)l.has(g.id)&&!h.find(b=>b.id===g.id)&&h.push(g);if(!a)return{edges:h,nodes:s};const m=await a({nodes:s,edges:h});return typeof m=="boolean"?m?{edges:h,nodes:s}:{edges:[],nodes:[]}:m}const Uu=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),il=(e={x:0,y:0},t,n)=>({x:Uu(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:Uu(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function b9(e,t,n){const{width:r,height:a}=ls(n),{x:i,y:s}=n.internals.positionAbsolute;return il(e,[[i,s],[i+r,s+a]],t)}const bR=(e,t,n)=>e<t?Uu(Math.abs(e-t),1,t)/t:e>n?-Uu(Math.abs(e-n),1,t)/t:0,w9=(e,t,n=15,r=40)=>{const a=bR(e.x,r,t.width-r)*n,i=bR(e.y,r,t.height-r)*n;return[a,i]},rv=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),DC=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),av=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),Gu=(e,t=[0,0])=>{var a,i;const{x:n,y:r}=CN(e)?e.internals.positionAbsolute:qf(e,t);return{x:n,y:r,width:((a=e.measured)==null?void 0:a.width)??e.width??e.initialWidth??0,height:((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0}},Bp=(e,t=[0,0])=>{var a,i;const{x:n,y:r}=CN(e)?e.internals.positionAbsolute:qf(e,t);return{x:n,y:r,x2:n+(((a=e.measured)==null?void 0:a.width)??e.width??e.initialWidth??0),y2:r+(((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0)}},S9=(e,t)=>av(rv(DC(e),DC(t))),mf=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},wR=e=>Pa(e.width)&&Pa(e.height)&&Pa(e.x)&&Pa(e.y),Pa=e=>!isNaN(e)&&isFinite(e),Uhe=(e,t)=>{},Ff=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Hf=({x:e,y:t},[n,r,a],i=!1,s=[1,1])=>{const l={x:(e-n)/a,y:(t-r)/a};return i?Ff(l,s):l},Fp=({x:e,y:t},[n,r,a])=>({x:e*a+n,y:t*a+r});function vu(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function Ghe(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=vu(e,n),a=vu(e,t);return{top:r,right:a,bottom:r,left:a,x:a*2,y:r*2}}if(typeof e=="object"){const r=vu(e.top??e.y??0,n),a=vu(e.bottom??e.y??0,n),i=vu(e.left??e.x??0,t),s=vu(e.right??e.x??0,t);return{top:r,right:s,bottom:a,left:i,x:i+s,y:r+a}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function Vhe(e,t,n,r,a,i){const{x:s,y:l}=Fp(e,[t,n,r]),{x:c,y:d}=Fp({x:e.x+e.width,y:e.y+e.height},[t,n,r]),h=a-c,m=i-d;return{left:Math.floor(s),top:Math.floor(l),right:Math.floor(h),bottom:Math.floor(m)}}const EN=(e,t,n,r,a,i)=>{const s=Ghe(i,t,n),l=(t-s.x)/e.width,c=(n-s.y)/e.height,d=Math.min(l,c),h=Uu(d,r,a),m=e.x+e.width/2,g=e.y+e.height/2,v=t/2-m*h,b=n/2-g*h,w=Vhe(e,v,b,h,t,n),S={left:Math.min(w.left-s.left,0),top:Math.min(w.top-s.top,0),right:Math.min(w.right-s.right,0),bottom:Math.min(w.bottom-s.bottom,0)};return{x:v-S.left+S.right,y:b-S.top+S.bottom,zoom:h}},pf=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Vu(e){return e!=null&&e!=="parent"}function ls(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function j9(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function k9(e,t={width:0,height:0},n,r,a){const i={...e},s=r.get(n);if(s){const l=s.origin||a;i.x+=s.internals.positionAbsolute.x-(t.width??0)*l[0],i.y+=s.internals.positionAbsolute.y-(t.height??0)*l[1]}return i}function SR(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function Khe(){let e,t;return{promise:new Promise((r,a)=>{e=r,t=a}),resolve:e,reject:t}}function Whe(e){return{...p9,...e||{}}}function Wd(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:a}){const{x:i,y:s}=Da(e),l=Hf({x:i-((a==null?void 0:a.left)??0),y:s-((a==null?void 0:a.top)??0)},r),{x:c,y:d}=n?Ff(l,t):l;return{xSnapped:c,ySnapped:d,...l}}const AN=e=>({width:e.offsetWidth,height:e.offsetHeight}),_9=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},Yhe=["INPUT","SELECT","TEXTAREA"];function C9(e){var r,a;const t=((a=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:a[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:Yhe.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const N9=e=>"clientX"in e,Da=(e,t)=>{var i,s;const n=N9(e),r=n?e.clientX:(i=e.touches)==null?void 0:i[0].clientX,a=n?e.clientY:(s=e.touches)==null?void 0:s[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:a-((t==null?void 0:t.top)??0)}},jR=(e,t,n,r,a)=>{const i=t.querySelectorAll(`.${e}`);return!i||!i.length?null:Array.from(i).map(s=>{const l=s.getBoundingClientRect();return{id:s.getAttribute("data-handleid"),type:e,nodeId:a,position:s.getAttribute("data-handlepos"),x:(l.left-n.left)/r,y:(l.top-n.top)/r,...AN(s)}})};function E9({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:a,sourceControlY:i,targetControlX:s,targetControlY:l}){const c=e*.125+a*.375+s*.375+n*.125,d=t*.125+i*.375+l*.375+r*.125,h=Math.abs(c-e),m=Math.abs(d-t);return[c,d,h,m]}function Fm(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function kR({pos:e,x1:t,y1:n,x2:r,y2:a,c:i}){switch(e){case et.Left:return[t-Fm(t-r,i),n];case et.Right:return[t+Fm(r-t,i),n];case et.Top:return[t,n-Fm(n-a,i)];case et.Bottom:return[t,n+Fm(a-n,i)]}}function A9({sourceX:e,sourceY:t,sourcePosition:n=et.Bottom,targetX:r,targetY:a,targetPosition:i=et.Top,curvature:s=.25}){const[l,c]=kR({pos:n,x1:e,y1:t,x2:r,y2:a,c:s}),[d,h]=kR({pos:i,x1:r,y1:a,x2:e,y2:t,c:s}),[m,g,v,b]=E9({sourceX:e,sourceY:t,targetX:r,targetY:a,sourceControlX:l,sourceControlY:c,targetControlX:d,targetControlY:h});return[`M${e},${t} C${l},${c} ${d},${h} ${r},${a}`,m,g,v,b]}function T9({sourceX:e,sourceY:t,targetX:n,targetY:r}){const a=Math.abs(n-e)/2,i=n<e?n+a:n-a,s=Math.abs(r-t)/2,l=r<t?r+s:r-s;return[i,l,a,s]}function Xhe({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:a=!1,zIndexMode:i="basic"}){if(i==="manual")return r;const s=a&&n?r+1e3:r,l=Math.max(e.parentId||a&&e.selected?e.internals.z:0,t.parentId||a&&t.selected?t.internals.z:0);return s+l}function Zhe({sourceNode:e,targetNode:t,width:n,height:r,transform:a}){const i=rv(Bp(e),Bp(t));i.x===i.x2&&(i.x2+=1),i.y===i.y2&&(i.y2+=1);const s={x:-a[0]/a[2],y:-a[1]/a[2],width:n/a[2],height:r/a[2]};return mf(s,av(i))>0}const Qhe=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,Jhe=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),eme=(e,t,n={})=>{if(!e.source||!e.target)return t;const r=n.getEdgeId||Qhe;let a;return y9(e)?a={...e}:a={...e,id:r(e)},Jhe(a,t)?t:(a.sourceHandle===null&&delete a.sourceHandle,a.targetHandle===null&&delete a.targetHandle,t.concat(a))};function O9({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[a,i,s,l]=T9({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,a,i,s,l]}const _R={[et.Left]:{x:-1,y:0},[et.Right]:{x:1,y:0},[et.Top]:{x:0,y:-1},[et.Bottom]:{x:0,y:1}},tme=({source:e,sourcePosition:t=et.Bottom,target:n})=>t===et.Left||t===et.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},CR=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function nme({source:e,sourcePosition:t=et.Bottom,target:n,targetPosition:r=et.Top,center:a,offset:i,stepPosition:s}){const l=_R[t],c=_R[r],d={x:e.x+l.x*i,y:e.y+l.y*i},h={x:n.x+c.x*i,y:n.y+c.y*i},m=tme({source:d,sourcePosition:t,target:h}),g=m.x!==0?"x":"y",v=m[g];let b=[],w,S;const j={x:0,y:0},_={x:0,y:0},[,,k,E]=T9({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[g]*c[g]===-1){g==="x"?(w=a.x??d.x+(h.x-d.x)*s,S=a.y??(d.y+h.y)/2):(w=a.x??(d.x+h.x)/2,S=a.y??d.y+(h.y-d.y)*s);const I=[{x:w,y:d.y},{x:w,y:h.y}],P=[{x:d.x,y:S},{x:h.x,y:S}];l[g]===v?b=g==="x"?I:P:b=g==="x"?P:I}else{const I=[{x:d.x,y:h.y}],P=[{x:h.x,y:d.y}];if(g==="x"?b=l.x===v?P:I:b=l.y===v?I:P,t===r){const R=Math.abs(e[g]-n[g]);if(R<=i){const M=Math.min(i-1,i-R);l[g]===v?j[g]=(d[g]>e[g]?-1:1)*M:_[g]=(h[g]>n[g]?-1:1)*M}}if(t!==r){const R=g==="x"?"y":"x",M=l[g]===c[R],L=d[R]>h[R],G=d[R]<h[R];(l[g]===1&&(!M&&L||M&&G)||l[g]!==1&&(!M&&G||M&&L))&&(b=g==="x"?I:P)}const D={x:d.x+j.x,y:d.y+j.y},q={x:h.x+_.x,y:h.y+_.y},z=Math.max(Math.abs(D.x-b[0].x),Math.abs(q.x-b[0].x)),F=Math.max(Math.abs(D.y-b[0].y),Math.abs(q.y-b[0].y));z>=F?(w=(D.x+q.x)/2,S=b[0].y):(w=b[0].x,S=(D.y+q.y)/2)}const T={x:d.x+j.x,y:d.y+j.y},A={x:h.x+_.x,y:h.y+_.y};return[[e,...T.x!==b[0].x||T.y!==b[0].y?[T]:[],...b,...A.x!==b[b.length-1].x||A.y!==b[b.length-1].y?[A]:[],n],w,S,k,E]}function rme(e,t,n,r){const a=Math.min(CR(e,t)/2,CR(t,n)/2,r),{x:i,y:s}=t;if(e.x===i&&i===n.x||e.y===s&&s===n.y)return`L${i} ${s}`;if(e.y===s){const d=e.x<n.x?-1:1,h=e.y<n.y?1:-1;return`L ${i+a*d},${s}Q ${i},${s} ${i},${s+a*h}`}const l=e.x<n.x?1:-1,c=e.y<n.y?-1:1;return`L ${i},${s+a*c}Q ${i},${s} ${i+a*l},${s}`}function RC({sourceX:e,sourceY:t,sourcePosition:n=et.Bottom,targetX:r,targetY:a,targetPosition:i=et.Top,borderRadius:s=5,centerX:l,centerY:c,offset:d=20,stepPosition:h=.5}){const[m,g,v,b,w]=nme({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:a},targetPosition:i,center:{x:l,y:c},offset:d,stepPosition:h});let S=`M${m[0].x} ${m[0].y}`;for(let j=1;j<m.length-1;j++)S+=rme(m[j-1],m[j],m[j+1],s);return S+=`L${m[m.length-1].x} ${m[m.length-1].y}`,[S,g,v,b,w]}function NR(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function ame(e){var m;const{sourceNode:t,targetNode:n}=e;if(!NR(t)||!NR(n))return null;const r=t.internals.handleBounds||ER(t.handles),a=n.internals.handleBounds||ER(n.handles),i=AR((r==null?void 0:r.source)??[],e.sourceHandle),s=AR(e.connectionMode===Hu.Strict?(a==null?void 0:a.target)??[]:((a==null?void 0:a.target)??[]).concat((a==null?void 0:a.source)??[]),e.targetHandle);if(!i||!s)return(m=e.onError)==null||m.call(e,"008",di.error008(i?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const l=(i==null?void 0:i.position)||et.Bottom,c=(s==null?void 0:s.position)||et.Top,d=sl(t,i,l),h=sl(n,s,c);return{sourceX:d.x,sourceY:d.y,targetX:h.x,targetY:h.y,sourcePosition:l,targetPosition:c}}function ER(e){if(!e)return null;const t=[],n=[];for(const r of e)r.width=r.width??1,r.height=r.height??1,r.type==="source"?t.push(r):r.type==="target"&&n.push(r);return{source:t,target:n}}function sl(e,t,n=et.Left,r=!1){const a=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,i=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:s,height:l}=t??ls(e);if(r)return{x:a+s/2,y:i+l/2};switch((t==null?void 0:t.position)??n){case et.Top:return{x:a+s/2,y:i};case et.Right:return{x:a+s,y:i+l/2};case et.Bottom:return{x:a+s/2,y:i+l};case et.Left:return{x:a,y:i+l/2}}}function AR(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function IC(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function ime(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:a}){const i=new Set;return e.reduce((s,l)=>([l.markerStart||r,l.markerEnd||a].forEach(c=>{if(c&&typeof c=="object"){const d=IC(c,t);i.has(d)||(s.push({id:d,color:c.color||n,...c}),i.add(d))}}),s),[]).sort((s,l)=>s.id.localeCompare(l.id))}const M9=1e3,sme=10,TN={nodeOrigin:[0,0],nodeExtent:df,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},ome={...TN,checkEquality:!0};function ON(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function lme(e,t,n){const r=ON(TN,n);for(const a of e.values())if(a.parentId)PN(a,e,t,r);else{const i=qf(a,r.nodeOrigin),s=Vu(a.extent)?a.extent:r.nodeExtent,l=il(i,s,ls(a));a.internals.positionAbsolute=l}}function ume(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const n=[],r=[];for(const a of e.handles){const i={id:a.id,width:a.width??1,height:a.height??1,nodeId:e.id,x:a.x,y:a.y,position:a.position,type:a.type};a.type==="source"?n.push(i):a.type==="target"&&r.push(i)}return{source:n,target:r}}function MN(e){return e==="manual"}function LC(e,t,n,r={}){var h,m;const a=ON(ome,r),i={i:0},s=new Map(t),l=a!=null&&a.elevateNodesOnSelect&&!MN(a.zIndexMode)?M9:0;let c=e.length>0,d=!1;t.clear(),n.clear();for(const g of e){let v=s.get(g.id);if(a.checkEquality&&g===(v==null?void 0:v.internals.userNode))t.set(g.id,v);else{const b=qf(g,a.nodeOrigin),w=Vu(g.extent)?g.extent:a.nodeExtent,S=il(b,w,ls(g));v={...a.defaults,...g,measured:{width:(h=g.measured)==null?void 0:h.width,height:(m=g.measured)==null?void 0:m.height},internals:{positionAbsolute:S,handleBounds:ume(g,v),z:P9(g,l,a.zIndexMode),userNode:g}},t.set(g.id,v)}(v.measured===void 0||v.measured.width===void 0||v.measured.height===void 0)&&!v.hidden&&(c=!1),g.parentId&&PN(v,t,n,r,i),d||(d=g.selected??!1)}return{nodesInitialized:c,hasSelectedNodes:d}}function cme(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function PN(e,t,n,r,a){const{elevateNodesOnSelect:i,nodeOrigin:s,nodeExtent:l,zIndexMode:c}=ON(TN,r),d=e.parentId,h=t.get(d);if(!h){console.warn(`Parent node ${d} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}cme(e,n),a&&!h.parentId&&h.internals.rootParentIndex===void 0&&c==="auto"&&(h.internals.rootParentIndex=++a.i,h.internals.z=h.internals.z+a.i*sme),a&&h.internals.rootParentIndex!==void 0&&(a.i=h.internals.rootParentIndex);const m=i&&!MN(c)?M9:0,{x:g,y:v,z:b}=dme(e,h,s,l,m,c),{positionAbsolute:w}=e.internals,S=g!==w.x||v!==w.y;(S||b!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:S?{x:g,y:v}:w,z:b}})}function P9(e,t,n){const r=Pa(e.zIndex)?e.zIndex:0;return MN(n)?r:r+(e.selected?t:0)}function dme(e,t,n,r,a,i){const{x:s,y:l}=t.internals.positionAbsolute,c=ls(e),d=qf(e,n),h=Vu(e.extent)?il(d,e.extent,c):d;let m=il({x:s+h.x,y:l+h.y},r,c);e.extent==="parent"&&(m=b9(m,c,t));const g=P9(e,a,i),v=t.internals.z??0;return{x:m.x,y:m.y,z:v>=g?v+1:g}}function DN(e,t,n,r=[0,0]){var s;const a=[],i=new Map;for(const l of e){const c=t.get(l.parentId);if(!c)continue;const d=((s=i.get(l.parentId))==null?void 0:s.expandedRect)??Gu(c),h=S9(d,l.rect);i.set(l.parentId,{expandedRect:h,parent:c})}return i.size>0&&i.forEach(({expandedRect:l,parent:c},d)=>{var k;const h=c.internals.positionAbsolute,m=ls(c),g=c.origin??r,v=l.x<h.x?Math.round(Math.abs(h.x-l.x)):0,b=l.y<h.y?Math.round(Math.abs(h.y-l.y)):0,w=Math.max(m.width,Math.round(l.width)),S=Math.max(m.height,Math.round(l.height)),j=(w-m.width)*g[0],_=(S-m.height)*g[1];(v>0||b>0||j||_)&&(a.push({id:d,type:"position",position:{x:c.position.x-v+j,y:c.position.y-b+_}}),(k=n.get(d))==null||k.forEach(E=>{e.some(T=>T.id===E.id)||a.push({id:E.id,type:"position",position:{x:E.position.x+v,y:E.position.y+b}})})),(m.width<l.width||m.height<l.height||v||b)&&a.push({id:d,type:"dimensions",setAttributes:!0,dimensions:{width:w+(v?g[0]*v-j:0),height:S+(b?g[1]*b-_:0)}})}),a}function fme(e,t,n,r,a,i,s){const l=r==null?void 0:r.querySelector(".xyflow__viewport");let c=!1;if(!l)return{changes:[],updatedInternals:c};const d=[],h=window.getComputedStyle(l),{m22:m}=new window.DOMMatrixReadOnly(h.transform),g=[];for(const v of e.values()){const b=t.get(v.id);if(!b)continue;if(b.hidden){t.set(b.id,{...b,internals:{...b.internals,handleBounds:void 0}}),c=!0;continue}const w=AN(v.nodeElement),S=b.measured.width!==w.width||b.measured.height!==w.height;if(!!(w.width&&w.height&&(S||!b.internals.handleBounds||v.force))){const _=v.nodeElement.getBoundingClientRect(),k=Vu(b.extent)?b.extent:i;let{positionAbsolute:E}=b.internals;b.parentId&&b.extent==="parent"?E=b9(E,w,t.get(b.parentId)):k&&(E=il(E,k,w));const T={...b,measured:w,internals:{...b.internals,positionAbsolute:E,handleBounds:{source:jR("source",v.nodeElement,_,m,b.id),target:jR("target",v.nodeElement,_,m,b.id)}}};t.set(b.id,T),b.parentId&&PN(T,t,n,{nodeOrigin:a,zIndexMode:s}),c=!0,S&&(d.push({id:b.id,type:"dimensions",dimensions:w}),b.expandParent&&b.parentId&&g.push({id:b.id,parentId:b.parentId,rect:Gu(T,a)}))}}if(g.length>0){const v=DN(g,t,n,a);d.push(...v)}return{changes:d,updatedInternals:c}}async function hme({delta:e,panZoom:t,transform:n,translateExtent:r,width:a,height:i}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const s=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[a,i]],r),l=!!s&&(s.x!==n[0]||s.y!==n[1]||s.k!==n[2]);return Promise.resolve(l)}function TR(e,t,n,r,a,i){let s=a;const l=r.get(s)||new Map;r.set(s,l.set(n,t)),s=`${a}-${e}`;const c=r.get(s)||new Map;if(r.set(s,c.set(n,t)),i){s=`${a}-${e}-${i}`;const d=r.get(s)||new Map;r.set(s,d.set(n,t))}}function D9(e,t,n){e.clear(),t.clear();for(const r of n){const{source:a,target:i,sourceHandle:s=null,targetHandle:l=null}=r,c={edgeId:r.id,source:a,target:i,sourceHandle:s,targetHandle:l},d=`${a}-${s}--${i}-${l}`,h=`${i}-${l}--${a}-${s}`;TR("source",c,h,e,a,s),TR("target",c,d,e,i,l),t.set(r.id,r)}}function R9(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:R9(n,t):!1}function OR(e,t,n){var a;let r=e;do{if((a=r==null?void 0:r.matches)!=null&&a.call(r,t))return!0;if(r===n)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function mme(e,t,n,r){const a=new Map;for(const[i,s]of e)if((s.selected||s.id===r)&&(!s.parentId||!R9(s,e))&&(s.draggable||t&&typeof s.draggable>"u")){const l=e.get(i);l&&a.set(i,{id:i,position:l.position||{x:0,y:0},distance:{x:n.x-l.internals.positionAbsolute.x,y:n.y-l.internals.positionAbsolute.y},extent:l.extent,parentId:l.parentId,origin:l.origin,expandParent:l.expandParent,internals:{positionAbsolute:l.internals.positionAbsolute||{x:0,y:0}},measured:{width:l.measured.width??0,height:l.measured.height??0}})}return a}function rb({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){var s,l,c;const a=[];for(const[d,h]of t){const m=(s=n.get(d))==null?void 0:s.internals.userNode;m&&a.push({...m,position:h.position,dragging:r})}if(!e)return[a[0],a];const i=(l=n.get(e))==null?void 0:l.internals.userNode;return[i?{...i,position:((c=t.get(e))==null?void 0:c.position)||i.position,dragging:r}:a[0],a]}function pme({dragItems:e,snapGrid:t,x:n,y:r}){const a=e.values().next().value;if(!a)return null;const i={x:n-a.distance.x,y:r-a.distance.y},s=Ff(i,t);return{x:s.x-i.x,y:s.y-i.y}}function gme({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:a}){let i={x:null,y:null},s=0,l=new Map,c=!1,d={x:0,y:0},h=null,m=!1,g=null,v=!1,b=!1,w=null;function S({noDragClassName:_,handleSelector:k,domNode:E,isSelectable:T,nodeId:A,nodeClickDistance:O=0}){g=Gr(E);function I({x:z,y:F}){const{nodeLookup:R,nodeExtent:M,snapGrid:L,snapToGrid:G,nodeOrigin:W,onNodeDrag:Y,onSelectionDrag:B,onError:H,updateNodePositions:K}=t();i={x:z,y:F};let U=!1;const X=l.size>1,J=X&&M?DC(Bf(l)):null,Q=X&&G?pme({dragItems:l,snapGrid:L,x:z,y:F}):null;for(const[re,ue]of l){if(!R.has(re))continue;let Z={x:z-ue.distance.x,y:F-ue.distance.y};G&&(Z=Q?{x:Math.round(Z.x+Q.x),y:Math.round(Z.y+Q.y)}:Ff(Z,L));let se=null;if(X&&M&&!ue.extent&&J){const{positionAbsolute:ae}=ue.internals,oe=ae.x-J.x+M[0][0],fe=ae.x+ue.measured.width-J.x2+M[1][0],Ce=ae.y-J.y+M[0][1],Te=ae.y+ue.measured.height-J.y2+M[1][1];se=[[oe,Ce],[fe,Te]]}const{position:ce,positionAbsolute:ee}=x9({nodeId:re,nextPosition:Z,nodeLookup:R,nodeExtent:se||M,nodeOrigin:W,onError:H});U=U||ue.position.x!==ce.x||ue.position.y!==ce.y,ue.position=ce,ue.internals.positionAbsolute=ee}if(b=b||U,!!U&&(K(l,!0),w&&(r||Y||!A&&B))){const[re,ue]=rb({nodeId:A,dragItems:l,nodeLookup:R});r==null||r(w,l,re,ue),Y==null||Y(w,re,ue),A||B==null||B(w,ue)}}async function P(){if(!h)return;const{transform:z,panBy:F,autoPanSpeed:R,autoPanOnNodeDrag:M}=t();if(!M){c=!1,cancelAnimationFrame(s);return}const[L,G]=w9(d,h,R);(L!==0||G!==0)&&(i.x=(i.x??0)-L/z[2],i.y=(i.y??0)-G/z[2],await F({x:L,y:G})&&I(i)),s=requestAnimationFrame(P)}function D(z){var X;const{nodeLookup:F,multiSelectionActive:R,nodesDraggable:M,transform:L,snapGrid:G,snapToGrid:W,selectNodesOnDrag:Y,onNodeDragStart:B,onSelectionDragStart:H,unselectNodesAndEdges:K}=t();m=!0,(!Y||!T)&&!R&&A&&((X=F.get(A))!=null&&X.selected||K()),T&&Y&&A&&(e==null||e(A));const U=Wd(z.sourceEvent,{transform:L,snapGrid:G,snapToGrid:W,containerBounds:h});if(i=U,l=mme(F,M,U,A),l.size>0&&(n||B||!A&&H)){const[J,Q]=rb({nodeId:A,dragItems:l,nodeLookup:F});n==null||n(z.sourceEvent,l,J,Q),B==null||B(z.sourceEvent,J,Q),A||H==null||H(z.sourceEvent,Q)}}const q=QH().clickDistance(O).on("start",z=>{const{domNode:F,nodeDragThreshold:R,transform:M,snapGrid:L,snapToGrid:G}=t();h=(F==null?void 0:F.getBoundingClientRect())||null,v=!1,b=!1,w=z.sourceEvent,R===0&&D(z),i=Wd(z.sourceEvent,{transform:M,snapGrid:L,snapToGrid:G,containerBounds:h}),d=Da(z.sourceEvent,h)}).on("drag",z=>{const{autoPanOnNodeDrag:F,transform:R,snapGrid:M,snapToGrid:L,nodeDragThreshold:G,nodeLookup:W}=t(),Y=Wd(z.sourceEvent,{transform:R,snapGrid:M,snapToGrid:L,containerBounds:h});if(w=z.sourceEvent,(z.sourceEvent.type==="touchmove"&&z.sourceEvent.touches.length>1||A&&!W.has(A))&&(v=!0),!v){if(!c&&F&&m&&(c=!0,P()),!m){const B=Da(z.sourceEvent,h),H=B.x-d.x,K=B.y-d.y;Math.sqrt(H*H+K*K)>G&&D(z)}(i.x!==Y.xSnapped||i.y!==Y.ySnapped)&&l&&m&&(d=Da(z.sourceEvent,h),I(Y))}}).on("end",z=>{if(!(!m||v)&&(c=!1,m=!1,cancelAnimationFrame(s),l.size>0)){const{nodeLookup:F,updateNodePositions:R,onNodeDragStop:M,onSelectionDragStop:L}=t();if(b&&(R(l,!1),b=!1),a||M||!A&&L){const[G,W]=rb({nodeId:A,dragItems:l,nodeLookup:F,dragging:!1});a==null||a(z.sourceEvent,l,G,W),M==null||M(z.sourceEvent,G,W),A||L==null||L(z.sourceEvent,W)}}}).filter(z=>{const F=z.target;return!z.button&&(!_||!OR(F,`.${_}`,E))&&(!k||OR(F,k,E))});g.call(q)}function j(){g==null||g.on(".drag",null)}return{update:S,destroy:j}}function vme(e,t,n){const r=[],a={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const i of t.values())mf(a,Gu(i))>0&&r.push(i);return r}const yme=250;function xme(e,t,n,r){var l,c;let a=[],i=1/0;const s=vme(e,n,t+yme);for(const d of s){const h=[...((l=d.internals.handleBounds)==null?void 0:l.source)??[],...((c=d.internals.handleBounds)==null?void 0:c.target)??[]];for(const m of h){if(r.nodeId===m.nodeId&&r.type===m.type&&r.id===m.id)continue;const{x:g,y:v}=sl(d,m,m.position,!0),b=Math.sqrt(Math.pow(g-e.x,2)+Math.pow(v-e.y,2));b>t||(b<i?(a=[{...m,x:g,y:v}],i=b):b===i&&a.push({...m,x:g,y:v}))}}if(!a.length)return null;if(a.length>1){const d=r.type==="source"?"target":"source";return a.find(h=>h.type===d)??a[0]}return a[0]}function I9(e,t,n,r,a,i=!1){var d,h,m;const s=r.get(e);if(!s)return null;const l=a==="strict"?(d=s.internals.handleBounds)==null?void 0:d[t]:[...((h=s.internals.handleBounds)==null?void 0:h.source)??[],...((m=s.internals.handleBounds)==null?void 0:m.target)??[]],c=(n?l==null?void 0:l.find(g=>g.id===n):l==null?void 0:l[0])??null;return c&&i?{...c,...sl(s,c,c.position,!0)}:c}function L9(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function bme(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const z9=()=>!0;function wme(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:a,edgeUpdaterType:i,isTarget:s,domNode:l,nodeLookup:c,lib:d,autoPanOnConnect:h,flowId:m,panBy:g,cancelConnection:v,onConnectStart:b,onConnect:w,onConnectEnd:S,isValidConnection:j=z9,onReconnectEnd:_,updateConnection:k,getTransform:E,getFromHandle:T,autoPanSpeed:A,dragThreshold:O=1,handleDomNode:I}){const P=_9(e.target);let D=0,q;const{x:z,y:F}=Da(e),R=L9(i,I),M=l==null?void 0:l.getBoundingClientRect();let L=!1;if(!M||!R)return;const G=I9(a,R,r,c,t);if(!G)return;let W=Da(e,M),Y=!1,B=null,H=!1,K=null;function U(){if(!h||!M)return;const[ce,ee]=w9(W,M,A);g({x:ce,y:ee}),D=requestAnimationFrame(U)}const X={...G,nodeId:a,type:R,position:G.position},J=c.get(a);let re={inProgress:!0,isValid:null,from:sl(J,X,et.Left,!0),fromHandle:X,fromPosition:X.position,fromNode:J,to:W,toHandle:null,toPosition:xR[X.position],toNode:null,pointer:W};function ue(){L=!0,k(re),b==null||b(e,{nodeId:a,handleId:r,handleType:R})}O===0&&ue();function Z(ce){if(!L){const{x:Te,y:pe}=Da(ce),De=Te-z,Xe=pe-F;if(!(De*De+Xe*Xe>O*O))return;ue()}if(!T()||!X){se(ce);return}const ee=E();W=Da(ce,M),q=xme(Hf(W,ee,!1,[1,1]),n,c,X),Y||(U(),Y=!0);const ae=$9(ce,{handle:q,connectionMode:t,fromNodeId:a,fromHandleId:r,fromType:s?"target":"source",isValidConnection:j,doc:P,lib:d,flowId:m,nodeLookup:c});K=ae.handleDomNode,B=ae.connection,H=bme(!!q,ae.isValid);const oe=c.get(a),fe=oe?sl(oe,X,et.Left,!0):re.from,Ce={...re,from:fe,isValid:H,to:ae.toHandle&&H?Fp({x:ae.toHandle.x,y:ae.toHandle.y},ee):W,toHandle:ae.toHandle,toPosition:H&&ae.toHandle?ae.toHandle.position:xR[X.position],toNode:ae.toHandle?c.get(ae.toHandle.nodeId):null,pointer:W};k(Ce),re=Ce}function se(ce){if(!("touches"in ce&&ce.touches.length>0)){if(L){(q||K)&&B&&H&&(w==null||w(B));const{inProgress:ee,...ae}=re,oe={...ae,toPosition:re.toHandle?re.toPosition:null};S==null||S(ce,oe),i&&(_==null||_(ce,oe))}v(),cancelAnimationFrame(D),Y=!1,H=!1,B=null,K=null,P.removeEventListener("mousemove",Z),P.removeEventListener("mouseup",se),P.removeEventListener("touchmove",Z),P.removeEventListener("touchend",se)}}P.addEventListener("mousemove",Z),P.addEventListener("mouseup",se),P.addEventListener("touchmove",Z),P.addEventListener("touchend",se)}function $9(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:a,fromType:i,doc:s,lib:l,flowId:c,isValidConnection:d=z9,nodeLookup:h}){const m=i==="target",g=t?s.querySelector(`.${l}-flow__handle[data-id="${c}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:v,y:b}=Da(e),w=s.elementFromPoint(v,b),S=w!=null&&w.classList.contains(`${l}-flow__handle`)?w:g,j={handleDomNode:S,isValid:!1,connection:null,toHandle:null};if(S){const _=L9(void 0,S),k=S.getAttribute("data-nodeid"),E=S.getAttribute("data-handleid"),T=S.classList.contains("connectable"),A=S.classList.contains("connectableend");if(!k||!_)return j;const O={source:m?k:r,sourceHandle:m?E:a,target:m?r:k,targetHandle:m?a:E};j.connection=O;const P=T&&A&&(n===Hu.Strict?m&&_==="source"||!m&&_==="target":k!==r||E!==a);j.isValid=P&&d(O),j.toHandle=I9(k,_,E,h,n,!0)}return j}const zC={onPointerDown:wme,isValid:$9};function Sme({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const a=Gr(e);function i({translateExtent:l,width:c,height:d,zoomStep:h=1,pannable:m=!0,zoomable:g=!0,inversePan:v=!1}){const b=k=>{if(k.sourceEvent.type!=="wheel"||!t)return;const E=n(),T=k.sourceEvent.ctrlKey&&pf()?10:1,A=-k.sourceEvent.deltaY*(k.sourceEvent.deltaMode===1?.05:k.sourceEvent.deltaMode?1:.002)*h,O=E[2]*Math.pow(2,A*T);t.scaleTo(O)};let w=[0,0];const S=k=>{(k.sourceEvent.type==="mousedown"||k.sourceEvent.type==="touchstart")&&(w=[k.sourceEvent.clientX??k.sourceEvent.touches[0].clientX,k.sourceEvent.clientY??k.sourceEvent.touches[0].clientY])},j=k=>{const E=n();if(k.sourceEvent.type!=="mousemove"&&k.sourceEvent.type!=="touchmove"||!t)return;const T=[k.sourceEvent.clientX??k.sourceEvent.touches[0].clientX,k.sourceEvent.clientY??k.sourceEvent.touches[0].clientY],A=[T[0]-w[0],T[1]-w[1]];w=T;const O=r()*Math.max(E[2],Math.log(E[2]))*(v?-1:1),I={x:E[0]-A[0]*O,y:E[1]-A[1]*O},P=[[0,0],[c,d]];t.setViewportConstrained({x:I.x,y:I.y,zoom:E[2]},P,l)},_=h9().on("start",S).on("zoom",m?j:null).on("zoom.wheel",g?b:null);a.call(_,{})}function s(){a.on("zoom",null)}return{update:i,destroy:s,pointer:Ea}}const iv=e=>({x:e.x,y:e.y,zoom:e.k}),ab=({x:e,y:t,zoom:n})=>nv.translate(e,t).scale(n),Au=(e,t)=>e.target.closest(`.${t}`),q9=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),jme=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,ib=(e,t=0,n=jme,r=()=>{})=>{const a=typeof t=="number"&&t>0;return a||r(),a?e.transition().duration(t).ease(n).on("end",r):e},B9=e=>{const t=e.ctrlKey&&pf()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function kme({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:a,panOnScrollSpeed:i,zoomOnPinch:s,onPanZoomStart:l,onPanZoom:c,onPanZoomEnd:d}){return h=>{if(Au(h,t))return h.ctrlKey&&h.preventDefault(),!1;h.preventDefault(),h.stopImmediatePropagation();const m=n.property("__zoom").k||1;if(h.ctrlKey&&s){const S=Ea(h),j=B9(h),_=m*Math.pow(2,j);r.scaleTo(n,_,S,h);return}const g=h.deltaMode===1?20:1;let v=a===Jo.Vertical?0:h.deltaX*g,b=a===Jo.Horizontal?0:h.deltaY*g;!pf()&&h.shiftKey&&a!==Jo.Vertical&&(v=h.deltaY*g,b=0),r.translateBy(n,-(v/m)*i,-(b/m)*i,{internal:!0});const w=iv(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c==null||c(h,w),e.panScrollTimeout=setTimeout(()=>{d==null||d(h,w),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,l==null||l(h,w))}}function _me({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,a){const i=r.type==="wheel",s=!t&&i&&!r.ctrlKey,l=Au(r,e);if(r.ctrlKey&&i&&l&&r.preventDefault(),s||l)return null;r.preventDefault(),n.call(this,r,a)}}function Cme({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var i,s,l;if((i=r.sourceEvent)!=null&&i.internal)return;const a=iv(r.transform);e.mouseButton=((s=r.sourceEvent)==null?void 0:s.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=a,((l=r.sourceEvent)==null?void 0:l.type)==="mousedown"&&t(!0),n&&(n==null||n(r.sourceEvent,a))}}function Nme({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:a}){return i=>{var s,l;e.usedRightMouseButton=!!(n&&q9(t,e.mouseButton??0)),(s=i.sourceEvent)!=null&&s.sync||r([i.transform.x,i.transform.y,i.transform.k]),a&&!((l=i.sourceEvent)!=null&&l.internal)&&(a==null||a(i.sourceEvent,iv(i.transform)))}}function Eme({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:a,onPaneContextMenu:i}){return s=>{var l;if(!((l=s.sourceEvent)!=null&&l.internal)&&(e.isZoomingOrPanning=!1,i&&q9(t,e.mouseButton??0)&&!e.usedRightMouseButton&&s.sourceEvent&&i(s.sourceEvent),e.usedRightMouseButton=!1,r(!1),a)){const c=iv(s.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{a==null||a(s.sourceEvent,c)},n?150:0)}}}function Ame({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:a,zoomOnDoubleClick:i,userSelectionActive:s,noWheelClassName:l,noPanClassName:c,lib:d,connectionInProgress:h}){return m=>{var S;const g=e||t,v=n&&m.ctrlKey,b=m.type==="wheel";if(m.button===1&&m.type==="mousedown"&&(Au(m,`${d}-flow__node`)||Au(m,`${d}-flow__edge`)))return!0;if(!r&&!g&&!a&&!i&&!n||s||h&&!b||Au(m,l)&&b||Au(m,c)&&(!b||a&&b&&!e)||!n&&m.ctrlKey&&b)return!1;if(!n&&m.type==="touchstart"&&((S=m.touches)==null?void 0:S.length)>1)return m.preventDefault(),!1;if(!g&&!a&&!v&&b||!r&&(m.type==="mousedown"||m.type==="touchstart")||Array.isArray(r)&&!r.includes(m.button)&&m.type==="mousedown")return!1;const w=Array.isArray(r)&&r.includes(m.button)||!m.button||m.button<=1;return(!m.ctrlKey||b)&&w}}function Tme({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:a,onPanZoom:i,onPanZoomStart:s,onPanZoomEnd:l,onDraggingChange:c}){const d={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},h=e.getBoundingClientRect(),m=h9().scaleExtent([t,n]).translateExtent(r),g=Gr(e).call(m);_({x:a.x,y:a.y,zoom:Uu(a.zoom,t,n)},[[0,0],[h.width,h.height]],r);const v=g.on("wheel.zoom"),b=g.on("dblclick.zoom");m.wheelDelta(B9);function w(q,z){return g?new Promise(F=>{m==null||m.interpolate((z==null?void 0:z.interpolate)==="linear"?Yi:mp).transform(ib(g,z==null?void 0:z.duration,z==null?void 0:z.ease,()=>F(!0)),q)}):Promise.resolve(!1)}function S({noWheelClassName:q,noPanClassName:z,onPaneContextMenu:F,userSelectionActive:R,panOnScroll:M,panOnDrag:L,panOnScrollMode:G,panOnScrollSpeed:W,preventScrolling:Y,zoomOnPinch:B,zoomOnScroll:H,zoomOnDoubleClick:K,zoomActivationKeyPressed:U,lib:X,onTransformChange:J,connectionInProgress:Q,paneClickDistance:re,selectionOnDrag:ue}){R&&!d.isZoomingOrPanning&&j();const Z=M&&!U&&!R;m.clickDistance(ue?1/0:!Pa(re)||re<0?0:re);const se=Z?kme({zoomPanValues:d,noWheelClassName:q,d3Selection:g,d3Zoom:m,panOnScrollMode:G,panOnScrollSpeed:W,zoomOnPinch:B,onPanZoomStart:s,onPanZoom:i,onPanZoomEnd:l}):_me({noWheelClassName:q,preventScrolling:Y,d3ZoomHandler:v});if(g.on("wheel.zoom",se,{passive:!1}),!R){const ee=Cme({zoomPanValues:d,onDraggingChange:c,onPanZoomStart:s});m.on("start",ee);const ae=Nme({zoomPanValues:d,panOnDrag:L,onPaneContextMenu:!!F,onPanZoom:i,onTransformChange:J});m.on("zoom",ae);const oe=Eme({zoomPanValues:d,panOnDrag:L,panOnScroll:M,onPaneContextMenu:F,onPanZoomEnd:l,onDraggingChange:c});m.on("end",oe)}const ce=Ame({zoomActivationKeyPressed:U,panOnDrag:L,zoomOnScroll:H,panOnScroll:M,zoomOnDoubleClick:K,zoomOnPinch:B,userSelectionActive:R,noPanClassName:z,noWheelClassName:q,lib:X,connectionInProgress:Q});m.filter(ce),K?g.on("dblclick.zoom",b):g.on("dblclick.zoom",null)}function j(){m.on("zoom",null)}async function _(q,z,F){const R=ab(q),M=m==null?void 0:m.constrain()(R,z,F);return M&&await w(M),new Promise(L=>L(M))}async function k(q,z){const F=ab(q);return await w(F,z),new Promise(R=>R(F))}function E(q){if(g){const z=ab(q),F=g.property("__zoom");(F.k!==q.zoom||F.x!==q.x||F.y!==q.y)&&(m==null||m.transform(g,z,null,{sync:!0}))}}function T(){const q=g?f9(g.node()):{x:0,y:0,k:1};return{x:q.x,y:q.y,zoom:q.k}}function A(q,z){return g?new Promise(F=>{m==null||m.interpolate((z==null?void 0:z.interpolate)==="linear"?Yi:mp).scaleTo(ib(g,z==null?void 0:z.duration,z==null?void 0:z.ease,()=>F(!0)),q)}):Promise.resolve(!1)}function O(q,z){return g?new Promise(F=>{m==null||m.interpolate((z==null?void 0:z.interpolate)==="linear"?Yi:mp).scaleBy(ib(g,z==null?void 0:z.duration,z==null?void 0:z.ease,()=>F(!0)),q)}):Promise.resolve(!1)}function I(q){m==null||m.scaleExtent(q)}function P(q){m==null||m.translateExtent(q)}function D(q){const z=!Pa(q)||q<0?0:q;m==null||m.clickDistance(z)}return{update:S,destroy:j,setViewport:k,setViewportConstrained:_,getViewport:T,scaleTo:A,scaleBy:O,setScaleExtent:I,setTranslateExtent:P,syncViewport:E,setClickDistance:D}}var Ku;(function(e){e.Line="line",e.Handle="handle"})(Ku||(Ku={}));function Ome({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:a,affectsY:i}){const s=e-t,l=n-r,c=[s>0?1:s<0?-1:0,l>0?1:l<0?-1:0];return s&&a&&(c[0]=c[0]*-1),l&&i&&(c[1]=c[1]*-1),c}function MR(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),r=e.includes("left"),a=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:r,affectsY:a}}function Gs(e,t){return Math.max(0,t-e)}function Vs(e,t){return Math.max(0,e-t)}function Hm(e,t,n){return Math.max(0,t-e,e-n)}function PR(e,t){return e?!t:t}function Mme(e,t,n,r,a,i,s,l){let{affectsX:c,affectsY:d}=t;const{isHorizontal:h,isVertical:m}=t,g=h&&m,{xSnapped:v,ySnapped:b}=n,{minWidth:w,maxWidth:S,minHeight:j,maxHeight:_}=r,{x:k,y:E,width:T,height:A,aspectRatio:O}=e;let I=Math.floor(h?v-e.pointerX:0),P=Math.floor(m?b-e.pointerY:0);const D=T+(c?-I:I),q=A+(d?-P:P),z=-i[0]*T,F=-i[1]*A;let R=Hm(D,w,S),M=Hm(q,j,_);if(s){let W=0,Y=0;c&&I<0?W=Gs(k+I+z,s[0][0]):!c&&I>0&&(W=Vs(k+D+z,s[1][0])),d&&P<0?Y=Gs(E+P+F,s[0][1]):!d&&P>0&&(Y=Vs(E+q+F,s[1][1])),R=Math.max(R,W),M=Math.max(M,Y)}if(l){let W=0,Y=0;c&&I>0?W=Vs(k+I,l[0][0]):!c&&I<0&&(W=Gs(k+D,l[1][0])),d&&P>0?Y=Vs(E+P,l[0][1]):!d&&P<0&&(Y=Gs(E+q,l[1][1])),R=Math.max(R,W),M=Math.max(M,Y)}if(a){if(h){const W=Hm(D/O,j,_)*O;if(R=Math.max(R,W),s){let Y=0;!c&&!d||c&&!d&&g?Y=Vs(E+F+D/O,s[1][1])*O:Y=Gs(E+F+(c?I:-I)/O,s[0][1])*O,R=Math.max(R,Y)}if(l){let Y=0;!c&&!d||c&&!d&&g?Y=Gs(E+D/O,l[1][1])*O:Y=Vs(E+(c?I:-I)/O,l[0][1])*O,R=Math.max(R,Y)}}if(m){const W=Hm(q*O,w,S)/O;if(M=Math.max(M,W),s){let Y=0;!c&&!d||d&&!c&&g?Y=Vs(k+q*O+z,s[1][0])/O:Y=Gs(k+(d?P:-P)*O+z,s[0][0])/O,M=Math.max(M,Y)}if(l){let Y=0;!c&&!d||d&&!c&&g?Y=Gs(k+q*O,l[1][0])/O:Y=Vs(k+(d?P:-P)*O,l[0][0])/O,M=Math.max(M,Y)}}}P=P+(P<0?M:-M),I=I+(I<0?R:-R),a&&(g?D>q*O?P=(PR(c,d)?-I:I)/O:I=(PR(c,d)?-P:P)*O:h?(P=I/O,d=c):(I=P*O,c=d));const L=c?k+I:k,G=d?E+P:E;return{width:T+(c?-I:I),height:A+(d?-P:P),x:i[0]*I*(c?-1:1)+L,y:i[1]*P*(d?-1:1)+G}}const F9={width:0,height:0,x:0,y:0},Pme={...F9,pointerX:0,pointerY:0,aspectRatio:1};function Dme(e){return[[0,0],[e.measured.width,e.measured.height]]}function Rme(e,t,n){const r=t.position.x+e.position.x,a=t.position.y+e.position.y,i=e.measured.width??0,s=e.measured.height??0,l=n[0]*i,c=n[1]*s;return[[r-l,a-c],[r+i-l,a+s-c]]}function Ime({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:a}){const i=Gr(e);let s={controlDirection:MR("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function l({controlPosition:d,boundaries:h,keepAspectRatio:m,resizeDirection:g,onResizeStart:v,onResize:b,onResizeEnd:w,shouldResize:S}){let j={...F9},_={...Pme};s={boundaries:h,resizeDirection:g,keepAspectRatio:m,controlDirection:MR(d)};let k,E=null,T=[],A,O,I,P=!1;const D=QH().on("start",q=>{const{nodeLookup:z,transform:F,snapGrid:R,snapToGrid:M,nodeOrigin:L,paneDomNode:G}=n();if(k=z.get(t),!k)return;E=(G==null?void 0:G.getBoundingClientRect())??null;const{xSnapped:W,ySnapped:Y}=Wd(q.sourceEvent,{transform:F,snapGrid:R,snapToGrid:M,containerBounds:E});j={width:k.measured.width??0,height:k.measured.height??0,x:k.position.x??0,y:k.position.y??0},_={...j,pointerX:W,pointerY:Y,aspectRatio:j.width/j.height},A=void 0,k.parentId&&(k.extent==="parent"||k.expandParent)&&(A=z.get(k.parentId),O=A&&k.extent==="parent"?Dme(A):void 0),T=[],I=void 0;for(const[B,H]of z)if(H.parentId===t&&(T.push({id:B,position:{...H.position},extent:H.extent}),H.extent==="parent"||H.expandParent)){const K=Rme(H,k,H.origin??L);I?I=[[Math.min(K[0][0],I[0][0]),Math.min(K[0][1],I[0][1])],[Math.max(K[1][0],I[1][0]),Math.max(K[1][1],I[1][1])]]:I=K}v==null||v(q,{...j})}).on("drag",q=>{const{transform:z,snapGrid:F,snapToGrid:R,nodeOrigin:M}=n(),L=Wd(q.sourceEvent,{transform:z,snapGrid:F,snapToGrid:R,containerBounds:E}),G=[];if(!k)return;const{x:W,y:Y,width:B,height:H}=j,K={},U=k.origin??M,{width:X,height:J,x:Q,y:re}=Mme(_,s.controlDirection,L,s.boundaries,s.keepAspectRatio,U,O,I),ue=X!==B,Z=J!==H,se=Q!==W&&ue,ce=re!==Y&&Z;if(!se&&!ce&&!ue&&!Z)return;if((se||ce||U[0]===1||U[1]===1)&&(K.x=se?Q:j.x,K.y=ce?re:j.y,j.x=K.x,j.y=K.y,T.length>0)){const fe=Q-W,Ce=re-Y;for(const Te of T)Te.position={x:Te.position.x-fe+U[0]*(X-B),y:Te.position.y-Ce+U[1]*(J-H)},G.push(Te)}if((ue||Z)&&(K.width=ue&&(!s.resizeDirection||s.resizeDirection==="horizontal")?X:j.width,K.height=Z&&(!s.resizeDirection||s.resizeDirection==="vertical")?J:j.height,j.width=K.width,j.height=K.height),A&&k.expandParent){const fe=U[0]*(K.width??0);K.x&&K.x<fe&&(j.x=fe,_.x=_.x-(K.x-fe));const Ce=U[1]*(K.height??0);K.y&&K.y<Ce&&(j.y=Ce,_.y=_.y-(K.y-Ce))}const ee=Ome({width:j.width,prevWidth:B,height:j.height,prevHeight:H,affectsX:s.controlDirection.affectsX,affectsY:s.controlDirection.affectsY}),ae={...j,direction:ee};(S==null?void 0:S(q,ae))!==!1&&(P=!0,b==null||b(q,ae),r(K,G))}).on("end",q=>{P&&(w==null||w(q,{...j}),a==null||a({...j}),P=!1)});i.call(D)}function c(){i.on(".drag",null)}return{update:l,destroy:c}}var sb={exports:{}},ob={},lb={exports:{}},ub={};/**
|
|
486
|
+
* @license React
|
|
487
|
+
* use-sync-external-store-shim.production.js
|
|
488
|
+
*
|
|
489
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
490
|
+
*
|
|
491
|
+
* This source code is licensed under the MIT license found in the
|
|
492
|
+
* LICENSE file in the root directory of this source tree.
|
|
493
|
+
*/var DR;function Lme(){if(DR)return ub;DR=1;var e=rc();function t(m,g){return m===g&&(m!==0||1/m===1/g)||m!==m&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,a=e.useEffect,i=e.useLayoutEffect,s=e.useDebugValue;function l(m,g){var v=g(),b=r({inst:{value:v,getSnapshot:g}}),w=b[0].inst,S=b[1];return i(function(){w.value=v,w.getSnapshot=g,c(w)&&S({inst:w})},[m,v,g]),a(function(){return c(w)&&S({inst:w}),m(function(){c(w)&&S({inst:w})})},[m]),s(v),v}function c(m){var g=m.getSnapshot;m=m.value;try{var v=g();return!n(m,v)}catch{return!0}}function d(m,g){return g()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:l;return ub.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,ub}var RR;function zme(){return RR||(RR=1,lb.exports=Lme()),lb.exports}/**
|
|
494
|
+
* @license React
|
|
495
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
496
|
+
*
|
|
497
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
498
|
+
*
|
|
499
|
+
* This source code is licensed under the MIT license found in the
|
|
500
|
+
* LICENSE file in the root directory of this source tree.
|
|
501
|
+
*/var IR;function $me(){if(IR)return ob;IR=1;var e=rc(),t=zme();function n(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var r=typeof Object.is=="function"?Object.is:n,a=t.useSyncExternalStore,i=e.useRef,s=e.useEffect,l=e.useMemo,c=e.useDebugValue;return ob.useSyncExternalStoreWithSelector=function(d,h,m,g,v){var b=i(null);if(b.current===null){var w={hasValue:!1,value:null};b.current=w}else w=b.current;b=l(function(){function j(A){if(!_){if(_=!0,k=A,A=g(A),v!==void 0&&w.hasValue){var O=w.value;if(v(O,A))return E=O}return E=A}if(O=E,r(k,A))return O;var I=g(A);return v!==void 0&&v(O,I)?(k=A,O):(k=A,E=I)}var _=!1,k,E,T=m===void 0?null:m;return[function(){return j(h())},T===null?void 0:function(){return j(T())}]},[h,m,g,v]);var S=a(d,b[0],b[1]);return s(function(){w.hasValue=!0,w.value=S},[S]),c(S),S},ob}var LR;function qme(){return LR||(LR=1,sb.exports=$me()),sb.exports}var H9=qme();const Bme=ta(H9),Fme={},zR=e=>{let t;const n=new Set,r=(h,m)=>{const g=typeof h=="function"?h(t):h;if(!Object.is(g,t)){const v=t;t=m??(typeof g!="object"||g===null)?g:Object.assign({},t,g),n.forEach(b=>b(t,v))}},a=()=>t,c={setState:r,getState:a,getInitialState:()=>d,subscribe:h=>(n.add(h),()=>n.delete(h)),destroy:()=>{(Fme?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},d=t=e(r,a,c);return c},Hme=e=>e?zR(e):zR,{useDebugValue:Ume}=z2,{useSyncExternalStoreWithSelector:Gme}=Bme,Vme=e=>e;function U9(e,t=Vme,n){const r=Gme(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return Ume(r),r}const $R=(e,t)=>{const n=Hme(e),r=(a,i=t)=>U9(n,a,i);return Object.assign(r,n),r},Kme=(e,t)=>e?$R(e,t):$R;function un(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,a]of e)if(!Object.is(a,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}const sv=x.createContext(null),Wme=sv.Provider,G9=di.error001();function Ot(e,t){const n=x.useContext(sv);if(n===null)throw new Error(G9);return U9(n,e,t)}function dn(){const e=x.useContext(sv);if(e===null)throw new Error(G9);return x.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const qR={display:"none"},Yme={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},V9="react-flow__node-desc",K9="react-flow__edge-desc",Xme="react-flow__aria-live",Zme=e=>e.ariaLiveMessage,Qme=e=>e.ariaLabelConfig;function Jme({rfId:e}){const t=Ot(Zme);return f.jsx("div",{id:`${Xme}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:Yme,children:t})}function epe({rfId:e,disableKeyboardA11y:t}){const n=Ot(Qme);return f.jsxs(f.Fragment,{children:[f.jsx("div",{id:`${V9}-${e}`,style:qR,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),f.jsx("div",{id:`${K9}-${e}`,style:qR,children:n["edge.a11yDescription.default"]}),!t&&f.jsx(Jme,{rfId:e})]})}const ov=x.forwardRef(({position:e="top-left",children:t,className:n,style:r,...a},i)=>{const s=`${e}`.split("-");return f.jsx("div",{className:Rn(["react-flow__panel",n,...s]),style:r,ref:i,...a,children:t})});ov.displayName="Panel";function tpe({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:f.jsx(ov,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:f.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const npe=e=>{const t=[],n=[];for(const[,r]of e.nodeLookup)r.selected&&t.push(r.internals.userNode);for(const[,r]of e.edgeLookup)r.selected&&n.push(r);return{selectedNodes:t,selectedEdges:n}},Um=e=>e.id;function rpe(e,t){return un(e.selectedNodes.map(Um),t.selectedNodes.map(Um))&&un(e.selectedEdges.map(Um),t.selectedEdges.map(Um))}function ape({onSelectionChange:e}){const t=dn(),{selectedNodes:n,selectedEdges:r}=Ot(npe,rpe);return x.useEffect(()=>{const a={nodes:n,edges:r};e==null||e(a),t.getState().onSelectionChangeHandlers.forEach(i=>i(a))},[n,r,e]),null}const ipe=e=>!!e.onSelectionChangeHandlers;function spe({onSelectionChange:e}){const t=Ot(ipe);return e||t?f.jsx(ape,{onSelectionChange:e}):null}const $C=typeof window<"u"?x.useLayoutEffect:x.useEffect,W9=[0,0],ope={x:0,y:0,zoom:1},lpe=["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"],BR=[...lpe,"rfId"],upe=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),FR={translateExtent:df,nodeOrigin:W9,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function cpe(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:a,setTranslateExtent:i,setNodeExtent:s,reset:l,setDefaultNodesAndEdges:c}=Ot(upe,un),d=dn();$C(()=>(c(e.defaultNodes,e.defaultEdges),()=>{h.current=FR,l()}),[]);const h=x.useRef(FR);return $C(()=>{for(const m of BR){const g=e[m],v=h.current[m];g!==v&&(typeof e[m]>"u"||(m==="nodes"?t(g):m==="edges"?n(g):m==="minZoom"?r(g):m==="maxZoom"?a(g):m==="translateExtent"?i(g):m==="nodeExtent"?s(g):m==="ariaLabelConfig"?d.setState({ariaLabelConfig:Whe(g)}):m==="fitView"?d.setState({fitViewQueued:g}):m==="fitViewOptions"?d.setState({fitViewOptions:g}):d.setState({[m]:g})))}h.current=e},BR.map(m=>e[m])),null}function HR(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function dpe(e){var r;const[t,n]=x.useState(e==="system"?null:e);return x.useEffect(()=>{if(e!=="system"){n(e);return}const a=HR(),i=()=>n(a!=null&&a.matches?"dark":"light");return i(),a==null||a.addEventListener("change",i),()=>{a==null||a.removeEventListener("change",i)}},[e]),t!==null?t:(r=HR())!=null&&r.matches?"dark":"light"}const UR=typeof document<"u"?document:null;function gf(e=null,t={target:UR,actInsideInputWithModifier:!0}){const[n,r]=x.useState(!1),a=x.useRef(!1),i=x.useRef(new Set([])),[s,l]=x.useMemo(()=>{if(e!==null){const d=(Array.isArray(e)?e:[e]).filter(m=>typeof m=="string").map(m=>m.replace("+",`
|
|
502
|
+
`).replace(`
|
|
503
|
+
|
|
504
|
+
`,`
|
|
505
|
+
+`).split(`
|
|
506
|
+
`)),h=d.reduce((m,g)=>m.concat(...g),[]);return[d,h]}return[[],[]]},[e]);return x.useEffect(()=>{const c=(t==null?void 0:t.target)??UR,d=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const h=v=>{var S,j;if(a.current=v.ctrlKey||v.metaKey||v.shiftKey||v.altKey,(!a.current||a.current&&!d)&&C9(v))return!1;const w=VR(v.code,l);if(i.current.add(v[w]),GR(s,i.current,!1)){const _=((j=(S=v.composedPath)==null?void 0:S.call(v))==null?void 0:j[0])||v.target,k=(_==null?void 0:_.nodeName)==="BUTTON"||(_==null?void 0:_.nodeName)==="A";t.preventDefault!==!1&&(a.current||!k)&&v.preventDefault(),r(!0)}},m=v=>{const b=VR(v.code,l);GR(s,i.current,!0)?(r(!1),i.current.clear()):i.current.delete(v[b]),v.key==="Meta"&&i.current.clear(),a.current=!1},g=()=>{i.current.clear(),r(!1)};return c==null||c.addEventListener("keydown",h),c==null||c.addEventListener("keyup",m),window.addEventListener("blur",g),window.addEventListener("contextmenu",g),()=>{c==null||c.removeEventListener("keydown",h),c==null||c.removeEventListener("keyup",m),window.removeEventListener("blur",g),window.removeEventListener("contextmenu",g)}}},[e,r]),n}function GR(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(a=>t.has(a)))}function VR(e,t){return t.includes(e)?"code":"key"}const fpe=()=>{const e=dn();return x.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(t,n):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[r,a,i],panZoom:s}=e.getState();return s?(await s.setViewport({x:t.x??r,y:t.y??a,zoom:t.zoom??i},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{const{width:r,height:a,minZoom:i,maxZoom:s,panZoom:l}=e.getState(),c=EN(t,r,a,i,s,(n==null?void 0:n.padding)??.1);return l?(await l.setViewport(c,{duration:n==null?void 0:n.duration,ease:n==null?void 0:n.ease,interpolate:n==null?void 0:n.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:r,snapGrid:a,snapToGrid:i,domNode:s}=e.getState();if(!s)return t;const{x:l,y:c}=s.getBoundingClientRect(),d={x:t.x-l,y:t.y-c},h=n.snapGrid??a,m=n.snapToGrid??i;return Hf(d,r,m,h)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:a,y:i}=r.getBoundingClientRect(),s=Fp(t,n);return{x:s.x+a,y:s.y+i}}}),[])};function Y9(e,t){const n=[],r=new Map,a=[];for(const i of e)if(i.type==="add"){a.push(i);continue}else if(i.type==="remove"||i.type==="replace")r.set(i.id,[i]);else{const s=r.get(i.id);s?s.push(i):r.set(i.id,[i])}for(const i of t){const s=r.get(i.id);if(!s){n.push(i);continue}if(s[0].type==="remove")continue;if(s[0].type==="replace"){n.push({...s[0].item});continue}const l={...i};for(const c of s)hpe(c,l);n.push(l)}return a.length&&a.forEach(i=>{i.index!==void 0?n.splice(i.index,0,{...i.item}):n.push({...i.item})}),n}function hpe(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function X9(e,t){return Y9(e,t)}function Z9(e,t){return Y9(e,t)}function Uo(e,t){return{id:e,type:"select",selected:t}}function Tu(e,t=new Set,n=!1){const r=[];for(const[a,i]of e){const s=t.has(a);!(i.selected===void 0&&!s)&&i.selected!==s&&(n&&(i.selected=s),r.push(Uo(i.id,s)))}return r}function KR({items:e=[],lookup:t}){var a;const n=[],r=new Map(e.map(i=>[i.id,i]));for(const[i,s]of e.entries()){const l=t.get(s.id),c=((a=l==null?void 0:l.internals)==null?void 0:a.userNode)??l;c!==void 0&&c!==s&&n.push({id:s.id,item:s,type:"replace"}),c===void 0&&n.push({item:s,type:"add",index:i})}for(const[i]of t)r.get(i)===void 0&&n.push({id:i,type:"remove"});return n}function WR(e){return{id:e.id,type:"remove"}}const YR=e=>zhe(e),mpe=e=>y9(e);function Q9(e){return x.forwardRef(e)}function XR(e){const[t,n]=x.useState(BigInt(0)),[r]=x.useState(()=>ppe(()=>n(a=>a+BigInt(1))));return $C(()=>{const a=r.get();a.length&&(e(a),r.reset())},[t]),r}function ppe(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const J9=x.createContext(null);function gpe({children:e}){const t=dn(),n=x.useCallback(l=>{const{nodes:c=[],setNodes:d,hasDefaultNodes:h,onNodesChange:m,nodeLookup:g,fitViewQueued:v,onNodesChangeMiddlewareMap:b}=t.getState();let w=c;for(const j of l)w=typeof j=="function"?j(w):j;let S=KR({items:w,lookup:g});for(const j of b.values())S=j(S);h&&d(w),S.length>0?m==null||m(S):v&&window.requestAnimationFrame(()=>{const{fitViewQueued:j,nodes:_,setNodes:k}=t.getState();j&&k(_)})},[]),r=XR(n),a=x.useCallback(l=>{const{edges:c=[],setEdges:d,hasDefaultEdges:h,onEdgesChange:m,edgeLookup:g}=t.getState();let v=c;for(const b of l)v=typeof b=="function"?b(v):b;h?d(v):m&&m(KR({items:v,lookup:g}))},[]),i=XR(a),s=x.useMemo(()=>({nodeQueue:r,edgeQueue:i}),[]);return f.jsx(J9.Provider,{value:s,children:e})}function vpe(){const e=x.useContext(J9);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const ype=e=>!!e.panZoom;function RN(){const e=fpe(),t=dn(),n=vpe(),r=Ot(ype),a=x.useMemo(()=>{const i=m=>t.getState().nodeLookup.get(m),s=m=>{n.nodeQueue.push(m)},l=m=>{n.edgeQueue.push(m)},c=m=>{var j,_;const{nodeLookup:g,nodeOrigin:v}=t.getState(),b=YR(m)?m:g.get(m.id),w=b.parentId?k9(b.position,b.measured,b.parentId,g,v):b.position,S={...b,position:w,width:((j=b.measured)==null?void 0:j.width)??b.width,height:((_=b.measured)==null?void 0:_.height)??b.height};return Gu(S)},d=(m,g,v={replace:!1})=>{s(b=>b.map(w=>{if(w.id===m){const S=typeof g=="function"?g(w):g;return v.replace&&YR(S)?S:{...w,...S}}return w}))},h=(m,g,v={replace:!1})=>{l(b=>b.map(w=>{if(w.id===m){const S=typeof g=="function"?g(w):g;return v.replace&&mpe(S)?S:{...w,...S}}return w}))};return{getNodes:()=>t.getState().nodes.map(m=>({...m})),getNode:m=>{var g;return(g=i(m))==null?void 0:g.internals.userNode},getInternalNode:i,getEdges:()=>{const{edges:m=[]}=t.getState();return m.map(g=>({...g}))},getEdge:m=>t.getState().edgeLookup.get(m),setNodes:s,setEdges:l,addNodes:m=>{const g=Array.isArray(m)?m:[m];n.nodeQueue.push(v=>[...v,...g])},addEdges:m=>{const g=Array.isArray(m)?m:[m];n.edgeQueue.push(v=>[...v,...g])},toObject:()=>{const{nodes:m=[],edges:g=[],transform:v}=t.getState(),[b,w,S]=v;return{nodes:m.map(j=>({...j})),edges:g.map(j=>({...j})),viewport:{x:b,y:w,zoom:S}}},deleteElements:async({nodes:m=[],edges:g=[]})=>{const{nodes:v,edges:b,onNodesDelete:w,onEdgesDelete:S,triggerNodeChanges:j,triggerEdgeChanges:_,onDelete:k,onBeforeDelete:E}=t.getState(),{nodes:T,edges:A}=await Hhe({nodesToRemove:m,edgesToRemove:g,nodes:v,edges:b,onBeforeDelete:E}),O=A.length>0,I=T.length>0;if(O){const P=A.map(WR);S==null||S(A),_(P)}if(I){const P=T.map(WR);w==null||w(T),j(P)}return(I||O)&&(k==null||k({nodes:T,edges:A})),{deletedNodes:T,deletedEdges:A}},getIntersectingNodes:(m,g=!0,v)=>{const b=wR(m),w=b?m:c(m),S=v!==void 0;return w?(v||t.getState().nodes).filter(j=>{const _=t.getState().nodeLookup.get(j.id);if(_&&!b&&(j.id===m.id||!_.internals.positionAbsolute))return!1;const k=Gu(S?j:_),E=mf(k,w);return g&&E>0||E>=k.width*k.height||E>=w.width*w.height}):[]},isNodeIntersecting:(m,g,v=!0)=>{const w=wR(m)?m:c(m);if(!w)return!1;const S=mf(w,g);return v&&S>0||S>=g.width*g.height||S>=w.width*w.height},updateNode:d,updateNodeData:(m,g,v={replace:!1})=>{d(m,b=>{const w=typeof g=="function"?g(b):g;return v.replace?{...b,data:w}:{...b,data:{...b.data,...w}}},v)},updateEdge:h,updateEdgeData:(m,g,v={replace:!1})=>{h(m,b=>{const w=typeof g=="function"?g(b):g;return v.replace?{...b,data:w}:{...b,data:{...b.data,...w}}},v)},getNodesBounds:m=>{const{nodeLookup:g,nodeOrigin:v}=t.getState();return $he(m,{nodeLookup:g,nodeOrigin:v})},getHandleConnections:({type:m,id:g,nodeId:v})=>{var b;return Array.from(((b=t.getState().connectionLookup.get(`${v}-${m}${g?`-${g}`:""}`))==null?void 0:b.values())??[])},getNodeConnections:({type:m,handleId:g,nodeId:v})=>{var b;return Array.from(((b=t.getState().connectionLookup.get(`${v}${m?g?`-${m}-${g}`:`-${m}`:""}`))==null?void 0:b.values())??[])},fitView:async m=>{const g=t.getState().fitViewResolver??Khe();return t.setState({fitViewQueued:!0,fitViewOptions:m,fitViewResolver:g}),n.nodeQueue.push(v=>[...v]),g.promise}}},[]);return x.useMemo(()=>({...a,...e,viewportInitialized:r}),[r])}const ZR=e=>e.selected,xpe=typeof window<"u"?window:void 0;function bpe({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=dn(),{deleteElements:r}=RN(),a=gf(e,{actInsideInputWithModifier:!1}),i=gf(t,{target:xpe});x.useEffect(()=>{if(a){const{edges:s,nodes:l}=n.getState();r({nodes:l.filter(ZR),edges:s.filter(ZR)}),n.setState({nodesSelectionActive:!1})}},[a]),x.useEffect(()=>{n.setState({multiSelectionActive:i})},[i])}function wpe(e){const t=dn();x.useEffect(()=>{const n=()=>{var a,i,s,l;if(!e.current||!(((i=(a=e.current).checkVisibility)==null?void 0:i.call(a))??!0))return!1;const r=AN(e.current);(r.height===0||r.width===0)&&((l=(s=t.getState()).onError)==null||l.call(s,"004",di.error004())),t.setState({width:r.width||500,height:r.height||500})};if(e.current){n(),window.addEventListener("resize",n);const r=new ResizeObserver(()=>n());return r.observe(e.current),()=>{window.removeEventListener("resize",n),r&&e.current&&r.unobserve(e.current)}}},[])}const lv={position:"absolute",width:"100%",height:"100%",top:0,left:0},Spe=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function jpe({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:a=.5,panOnScrollMode:i=Jo.Free,zoomOnDoubleClick:s=!0,panOnDrag:l=!0,defaultViewport:c,translateExtent:d,minZoom:h,maxZoom:m,zoomActivationKeyCode:g,preventScrolling:v=!0,children:b,noWheelClassName:w,noPanClassName:S,onViewportChange:j,isControlledViewport:_,paneClickDistance:k,selectionOnDrag:E}){const T=dn(),A=x.useRef(null),{userSelectionActive:O,lib:I,connectionInProgress:P}=Ot(Spe,un),D=gf(g),q=x.useRef();wpe(A);const z=x.useCallback(F=>{j==null||j({x:F[0],y:F[1],zoom:F[2]}),_||T.setState({transform:F})},[j,_]);return x.useEffect(()=>{if(A.current){q.current=Tme({domNode:A.current,minZoom:h,maxZoom:m,translateExtent:d,viewport:c,onDraggingChange:L=>T.setState(G=>G.paneDragging===L?G:{paneDragging:L}),onPanZoomStart:(L,G)=>{const{onViewportChangeStart:W,onMoveStart:Y}=T.getState();Y==null||Y(L,G),W==null||W(G)},onPanZoom:(L,G)=>{const{onViewportChange:W,onMove:Y}=T.getState();Y==null||Y(L,G),W==null||W(G)},onPanZoomEnd:(L,G)=>{const{onViewportChangeEnd:W,onMoveEnd:Y}=T.getState();Y==null||Y(L,G),W==null||W(G)}});const{x:F,y:R,zoom:M}=q.current.getViewport();return T.setState({panZoom:q.current,transform:[F,R,M],domNode:A.current.closest(".react-flow")}),()=>{var L;(L=q.current)==null||L.destroy()}}},[]),x.useEffect(()=>{var F;(F=q.current)==null||F.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:a,panOnScrollMode:i,zoomOnDoubleClick:s,panOnDrag:l,zoomActivationKeyPressed:D,preventScrolling:v,noPanClassName:S,userSelectionActive:O,noWheelClassName:w,lib:I,onTransformChange:z,connectionInProgress:P,selectionOnDrag:E,paneClickDistance:k})},[e,t,n,r,a,i,s,l,D,v,S,O,w,I,z,P,E,k]),f.jsx("div",{className:"react-flow__renderer",ref:A,style:lv,children:b})}const kpe=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function _pe(){const{userSelectionActive:e,userSelectionRect:t}=Ot(kpe,un);return e&&t?f.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const cb=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},Cpe=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function Npe({isSelecting:e,selectionKeyPressed:t,selectionMode:n=ff.Full,panOnDrag:r,paneClickDistance:a,selectionOnDrag:i,onSelectionStart:s,onSelectionEnd:l,onPaneClick:c,onPaneContextMenu:d,onPaneScroll:h,onPaneMouseEnter:m,onPaneMouseMove:g,onPaneMouseLeave:v,children:b}){const w=dn(),{userSelectionActive:S,elementsSelectable:j,dragging:_,connectionInProgress:k}=Ot(Cpe,un),E=j&&(e||S),T=x.useRef(null),A=x.useRef(),O=x.useRef(new Set),I=x.useRef(new Set),P=x.useRef(!1),D=W=>{if(P.current||k){P.current=!1;return}c==null||c(W),w.getState().resetSelectedElements(),w.setState({nodesSelectionActive:!1})},q=W=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){W.preventDefault();return}d==null||d(W)},z=h?W=>h(W):void 0,F=W=>{P.current&&(W.stopPropagation(),P.current=!1)},R=W=>{var J,Q;const{domNode:Y}=w.getState();if(A.current=Y==null?void 0:Y.getBoundingClientRect(),!A.current)return;const B=W.target===T.current;if(!B&&!!W.target.closest(".nokey")||!e||!(i&&B||t)||W.button!==0||!W.isPrimary)return;(Q=(J=W.target)==null?void 0:J.setPointerCapture)==null||Q.call(J,W.pointerId),P.current=!1;const{x:U,y:X}=Da(W.nativeEvent,A.current);w.setState({userSelectionRect:{width:0,height:0,startX:U,startY:X,x:U,y:X}}),B||(W.stopPropagation(),W.preventDefault())},M=W=>{const{userSelectionRect:Y,transform:B,nodeLookup:H,edgeLookup:K,connectionLookup:U,triggerNodeChanges:X,triggerEdgeChanges:J,defaultEdgeOptions:Q,resetSelectedElements:re}=w.getState();if(!A.current||!Y)return;const{x:ue,y:Z}=Da(W.nativeEvent,A.current),{startX:se,startY:ce}=Y;if(!P.current){const Ce=t?0:a;if(Math.hypot(ue-se,Z-ce)<=Ce)return;re(),s==null||s(W)}P.current=!0;const ee={startX:se,startY:ce,x:ue<se?ue:se,y:Z<ce?Z:ce,width:Math.abs(ue-se),height:Math.abs(Z-ce)},ae=O.current,oe=I.current;O.current=new Set(NN(H,ee,B,n===ff.Partial,!0).map(Ce=>Ce.id)),I.current=new Set;const fe=(Q==null?void 0:Q.selectable)??!0;for(const Ce of O.current){const Te=U.get(Ce);if(Te)for(const{edgeId:pe}of Te.values()){const De=K.get(pe);De&&(De.selectable??fe)&&I.current.add(pe)}}if(!SR(ae,O.current)){const Ce=Tu(H,O.current,!0);X(Ce)}if(!SR(oe,I.current)){const Ce=Tu(K,I.current);J(Ce)}w.setState({userSelectionRect:ee,userSelectionActive:!0,nodesSelectionActive:!1})},L=W=>{var Y,B;W.button===0&&((B=(Y=W.target)==null?void 0:Y.releasePointerCapture)==null||B.call(Y,W.pointerId),!S&&W.target===T.current&&w.getState().userSelectionRect&&(D==null||D(W)),w.setState({userSelectionActive:!1,userSelectionRect:null}),P.current&&(l==null||l(W),w.setState({nodesSelectionActive:O.current.size>0})))},G=r===!0||Array.isArray(r)&&r.includes(0);return f.jsxs("div",{className:Rn(["react-flow__pane",{draggable:G,dragging:_,selection:e}]),onClick:E?void 0:cb(D,T),onContextMenu:cb(q,T),onWheel:cb(z,T),onPointerEnter:E?void 0:m,onPointerMove:E?M:g,onPointerUp:E?L:void 0,onPointerDownCapture:E?R:void 0,onClickCapture:E?F:void 0,onPointerLeave:v,ref:T,style:lv,children:[b,f.jsx(_pe,{})]})}function qC({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:a,unselectNodesAndEdges:i,multiSelectionActive:s,nodeLookup:l,onError:c}=t.getState(),d=l.get(e);if(!d){c==null||c("012",di.error012(e));return}t.setState({nodesSelectionActive:!1}),d.selected?(n||d.selected&&s)&&(i({nodes:[d],edges:[]}),requestAnimationFrame(()=>{var h;return(h=r==null?void 0:r.current)==null?void 0:h.blur()})):a([e])}function eU({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:a,isSelectable:i,nodeClickDistance:s}){const l=dn(),[c,d]=x.useState(!1),h=x.useRef();return x.useEffect(()=>{h.current=gme({getStoreItems:()=>l.getState(),onNodeMouseDown:m=>{qC({id:m,store:l,nodeRef:e})},onDragStart:()=>{d(!0)},onDragStop:()=>{d(!1)}})},[]),x.useEffect(()=>{if(!(t||!e.current||!h.current))return h.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:i,nodeId:a,nodeClickDistance:s}),()=>{var m;(m=h.current)==null||m.destroy()}},[n,r,t,i,e,a,s]),c}const Epe=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function tU(){const e=dn();return x.useCallback(n=>{const{nodeExtent:r,snapToGrid:a,snapGrid:i,nodesDraggable:s,onError:l,updateNodePositions:c,nodeLookup:d,nodeOrigin:h}=e.getState(),m=new Map,g=Epe(s),v=a?i[0]:5,b=a?i[1]:5,w=n.direction.x*v*n.factor,S=n.direction.y*b*n.factor;for(const[,j]of d){if(!g(j))continue;let _={x:j.internals.positionAbsolute.x+w,y:j.internals.positionAbsolute.y+S};a&&(_=Ff(_,i));const{position:k,positionAbsolute:E}=x9({nodeId:j.id,nextPosition:_,nodeLookup:d,nodeExtent:r,nodeOrigin:h,onError:l});j.position=k,j.internals.positionAbsolute=E,m.set(j.id,j)}c(m)},[])}const IN=x.createContext(null),Ape=IN.Provider;IN.Consumer;const nU=()=>x.useContext(IN),Tpe=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),Ope=(e,t,n)=>r=>{const{connectionClickStartHandle:a,connectionMode:i,connection:s}=r,{fromHandle:l,toHandle:c,isValid:d}=s,h=(c==null?void 0:c.nodeId)===e&&(c==null?void 0:c.id)===t&&(c==null?void 0:c.type)===n;return{connectingFrom:(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.id)===t&&(l==null?void 0:l.type)===n,connectingTo:h,clickConnecting:(a==null?void 0:a.nodeId)===e&&(a==null?void 0:a.id)===t&&(a==null?void 0:a.type)===n,isPossibleEndHandle:i===Hu.Strict?(l==null?void 0:l.type)!==n:e!==(l==null?void 0:l.nodeId)||t!==(l==null?void 0:l.id),connectionInProcess:!!l,clickConnectionInProcess:!!a,valid:h&&d}};function Mpe({type:e="source",position:t=et.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:a=!0,isConnectableEnd:i=!0,id:s,onConnect:l,children:c,className:d,onMouseDown:h,onTouchStart:m,...g},v){var M,L;const b=s||null,w=e==="target",S=dn(),j=nU(),{connectOnClick:_,noPanClassName:k,rfId:E}=Ot(Tpe,un),{connectingFrom:T,connectingTo:A,clickConnecting:O,isPossibleEndHandle:I,connectionInProcess:P,clickConnectionInProcess:D,valid:q}=Ot(Ope(j,b,e),un);j||(L=(M=S.getState()).onError)==null||L.call(M,"010",di.error010());const z=G=>{const{defaultEdgeOptions:W,onConnect:Y,hasDefaultEdges:B}=S.getState(),H={...W,...G};if(B){const{edges:K,setEdges:U}=S.getState();U(eme(H,K))}Y==null||Y(H),l==null||l(H)},F=G=>{if(!j)return;const W=N9(G.nativeEvent);if(a&&(W&&G.button===0||!W)){const Y=S.getState();zC.onPointerDown(G.nativeEvent,{handleDomNode:G.currentTarget,autoPanOnConnect:Y.autoPanOnConnect,connectionMode:Y.connectionMode,connectionRadius:Y.connectionRadius,domNode:Y.domNode,nodeLookup:Y.nodeLookup,lib:Y.lib,isTarget:w,handleId:b,nodeId:j,flowId:Y.rfId,panBy:Y.panBy,cancelConnection:Y.cancelConnection,onConnectStart:Y.onConnectStart,onConnectEnd:(...B)=>{var H,K;return(K=(H=S.getState()).onConnectEnd)==null?void 0:K.call(H,...B)},updateConnection:Y.updateConnection,onConnect:z,isValidConnection:n||((...B)=>{var H,K;return((K=(H=S.getState()).isValidConnection)==null?void 0:K.call(H,...B))??!0}),getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,autoPanSpeed:Y.autoPanSpeed,dragThreshold:Y.connectionDragThreshold})}W?h==null||h(G):m==null||m(G)},R=G=>{const{onClickConnectStart:W,onClickConnectEnd:Y,connectionClickStartHandle:B,connectionMode:H,isValidConnection:K,lib:U,rfId:X,nodeLookup:J,connection:Q}=S.getState();if(!j||!B&&!a)return;if(!B){W==null||W(G.nativeEvent,{nodeId:j,handleId:b,handleType:e}),S.setState({connectionClickStartHandle:{nodeId:j,type:e,id:b}});return}const re=_9(G.target),ue=n||K,{connection:Z,isValid:se}=zC.isValid(G.nativeEvent,{handle:{nodeId:j,id:b,type:e},connectionMode:H,fromNodeId:B.nodeId,fromHandleId:B.id||null,fromType:B.type,isValidConnection:ue,flowId:X,doc:re,lib:U,nodeLookup:J});se&&Z&&z(Z);const ce=structuredClone(Q);delete ce.inProgress,ce.toPosition=ce.toHandle?ce.toHandle.position:null,Y==null||Y(G,ce),S.setState({connectionClickStartHandle:null})};return f.jsx("div",{"data-handleid":b,"data-nodeid":j,"data-handlepos":t,"data-id":`${E}-${j}-${b}-${e}`,className:Rn(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",k,d,{source:!w,target:w,connectable:r,connectablestart:a,connectableend:i,clickconnecting:O,connectingfrom:T,connectingto:A,valid:q,connectionindicator:r&&(!P||I)&&(P||D?i:a)}]),onMouseDown:F,onTouchStart:F,onClick:_?R:void 0,ref:v,...g,children:c})}const Wu=x.memo(Q9(Mpe));function Ppe({data:e,isConnectable:t,sourcePosition:n=et.Bottom}){return f.jsxs(f.Fragment,{children:[e==null?void 0:e.label,f.jsx(Wu,{type:"source",position:n,isConnectable:t})]})}function Dpe({data:e,isConnectable:t,targetPosition:n=et.Top,sourcePosition:r=et.Bottom}){return f.jsxs(f.Fragment,{children:[f.jsx(Wu,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,f.jsx(Wu,{type:"source",position:r,isConnectable:t})]})}function Rpe(){return null}function Ipe({data:e,isConnectable:t,targetPosition:n=et.Top}){return f.jsxs(f.Fragment,{children:[f.jsx(Wu,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const Hp={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},QR={input:Ppe,default:Dpe,output:Ipe,group:Rpe};function Lpe(e){var t,n,r,a;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((r=e.style)==null?void 0:r.width),height:e.height??((a=e.style)==null?void 0:a.height)}}const zpe=e=>{const{width:t,height:n,x:r,y:a}=Bf(e.nodeLookup,{filter:i=>!!i.selected});return{width:Pa(t)?t:null,height:Pa(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${a}px)`}};function $pe({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=dn(),{width:a,height:i,transformString:s,userSelectionActive:l}=Ot(zpe,un),c=tU(),d=x.useRef(null);x.useEffect(()=>{var v;n||(v=d.current)==null||v.focus({preventScroll:!0})},[n]);const h=!l&&a!==null&&i!==null;if(eU({nodeRef:d,disabled:!h}),!h)return null;const m=e?v=>{const b=r.getState().nodes.filter(w=>w.selected);e(v,b)}:void 0,g=v=>{Object.prototype.hasOwnProperty.call(Hp,v.key)&&(v.preventDefault(),c({direction:Hp[v.key],factor:v.shiftKey?4:1}))};return f.jsx("div",{className:Rn(["react-flow__nodesselection","react-flow__container",t]),style:{transform:s},children:f.jsx("div",{ref:d,className:"react-flow__nodesselection-rect",onContextMenu:m,tabIndex:n?void 0:-1,onKeyDown:n?void 0:g,style:{width:a,height:i}})})}const JR=typeof window<"u"?window:void 0,qpe=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function rU({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:a,onPaneContextMenu:i,onPaneScroll:s,paneClickDistance:l,deleteKeyCode:c,selectionKeyCode:d,selectionOnDrag:h,selectionMode:m,onSelectionStart:g,onSelectionEnd:v,multiSelectionKeyCode:b,panActivationKeyCode:w,zoomActivationKeyCode:S,elementsSelectable:j,zoomOnScroll:_,zoomOnPinch:k,panOnScroll:E,panOnScrollSpeed:T,panOnScrollMode:A,zoomOnDoubleClick:O,panOnDrag:I,defaultViewport:P,translateExtent:D,minZoom:q,maxZoom:z,preventScrolling:F,onSelectionContextMenu:R,noWheelClassName:M,noPanClassName:L,disableKeyboardA11y:G,onViewportChange:W,isControlledViewport:Y}){const{nodesSelectionActive:B,userSelectionActive:H}=Ot(qpe,un),K=gf(d,{target:JR}),U=gf(w,{target:JR}),X=U||I,J=U||E,Q=h&&X!==!0,re=K||H||Q;return bpe({deleteKeyCode:c,multiSelectionKeyCode:b}),f.jsx(jpe,{onPaneContextMenu:i,elementsSelectable:j,zoomOnScroll:_,zoomOnPinch:k,panOnScroll:J,panOnScrollSpeed:T,panOnScrollMode:A,zoomOnDoubleClick:O,panOnDrag:!K&&X,defaultViewport:P,translateExtent:D,minZoom:q,maxZoom:z,zoomActivationKeyCode:S,preventScrolling:F,noWheelClassName:M,noPanClassName:L,onViewportChange:W,isControlledViewport:Y,paneClickDistance:l,selectionOnDrag:Q,children:f.jsxs(Npe,{onSelectionStart:g,onSelectionEnd:v,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:a,onPaneContextMenu:i,onPaneScroll:s,panOnDrag:X,isSelecting:!!re,selectionMode:m,selectionKeyPressed:K,paneClickDistance:l,selectionOnDrag:Q,children:[e,B&&f.jsx($pe,{onSelectionContextMenu:R,noPanClassName:L,disableKeyboardA11y:G})]})})}rU.displayName="FlowRenderer";const Bpe=x.memo(rU),Fpe=e=>t=>e?NN(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function Hpe(e){return Ot(x.useCallback(Fpe(e),[e]),un)}const Upe=e=>e.updateNodeInternals;function Gpe(){const e=Ot(Upe),[t]=x.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const r=new Map;n.forEach(a=>{const i=a.target.getAttribute("data-id");r.set(i,{id:i,nodeElement:a.target,force:!0})}),e(r)}));return x.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function Vpe({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const a=dn(),i=x.useRef(null),s=x.useRef(null),l=x.useRef(e.sourcePosition),c=x.useRef(e.targetPosition),d=x.useRef(t),h=n&&!!e.internals.handleBounds;return x.useEffect(()=>{i.current&&!e.hidden&&(!h||s.current!==i.current)&&(s.current&&(r==null||r.unobserve(s.current)),r==null||r.observe(i.current),s.current=i.current)},[h,e.hidden]),x.useEffect(()=>()=>{s.current&&(r==null||r.unobserve(s.current),s.current=null)},[]),x.useEffect(()=>{if(i.current){const m=d.current!==t,g=l.current!==e.sourcePosition,v=c.current!==e.targetPosition;(m||g||v)&&(d.current=t,l.current=e.sourcePosition,c.current=e.targetPosition,a.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:i.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),i}function Kpe({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:a,onContextMenu:i,onDoubleClick:s,nodesDraggable:l,elementsSelectable:c,nodesConnectable:d,nodesFocusable:h,resizeObserver:m,noDragClassName:g,noPanClassName:v,disableKeyboardA11y:b,rfId:w,nodeTypes:S,nodeClickDistance:j,onError:_}){const{node:k,internals:E,isParent:T}=Ot(ue=>{const Z=ue.nodeLookup.get(e),se=ue.parentLookup.has(e);return{node:Z,internals:Z.internals,isParent:se}},un);let A=k.type||"default",O=(S==null?void 0:S[A])||QR[A];O===void 0&&(_==null||_("003",di.error003(A)),A="default",O=(S==null?void 0:S.default)||QR.default);const I=!!(k.draggable||l&&typeof k.draggable>"u"),P=!!(k.selectable||c&&typeof k.selectable>"u"),D=!!(k.connectable||d&&typeof k.connectable>"u"),q=!!(k.focusable||h&&typeof k.focusable>"u"),z=dn(),F=j9(k),R=Vpe({node:k,nodeType:A,hasDimensions:F,resizeObserver:m}),M=eU({nodeRef:R,disabled:k.hidden||!I,noDragClassName:g,handleSelector:k.dragHandle,nodeId:e,isSelectable:P,nodeClickDistance:j}),L=tU();if(k.hidden)return null;const G=ls(k),W=Lpe(k),Y=P||I||t||n||r||a,B=n?ue=>n(ue,{...E.userNode}):void 0,H=r?ue=>r(ue,{...E.userNode}):void 0,K=a?ue=>a(ue,{...E.userNode}):void 0,U=i?ue=>i(ue,{...E.userNode}):void 0,X=s?ue=>s(ue,{...E.userNode}):void 0,J=ue=>{const{selectNodesOnDrag:Z,nodeDragThreshold:se}=z.getState();P&&(!Z||!I||se>0)&&qC({id:e,store:z,nodeRef:R}),t&&t(ue,{...E.userNode})},Q=ue=>{if(!(C9(ue.nativeEvent)||b)){if(m9.includes(ue.key)&&P){const Z=ue.key==="Escape";qC({id:e,store:z,unselect:Z,nodeRef:R})}else if(I&&k.selected&&Object.prototype.hasOwnProperty.call(Hp,ue.key)){ue.preventDefault();const{ariaLabelConfig:Z}=z.getState();z.setState({ariaLiveMessage:Z["node.a11yDescription.ariaLiveMessage"]({direction:ue.key.replace("Arrow","").toLowerCase(),x:~~E.positionAbsolute.x,y:~~E.positionAbsolute.y})}),L({direction:Hp[ue.key],factor:ue.shiftKey?4:1})}}},re=()=>{var oe;if(b||!((oe=R.current)!=null&&oe.matches(":focus-visible")))return;const{transform:ue,width:Z,height:se,autoPanOnNodeFocus:ce,setCenter:ee}=z.getState();if(!ce)return;NN(new Map([[e,k]]),{x:0,y:0,width:Z,height:se},ue,!0).length>0||ee(k.position.x+G.width/2,k.position.y+G.height/2,{zoom:ue[2]})};return f.jsx("div",{className:Rn(["react-flow__node",`react-flow__node-${A}`,{[v]:I},k.className,{selected:k.selected,selectable:P,parent:T,draggable:I,dragging:M}]),ref:R,style:{zIndex:E.z,transform:`translate(${E.positionAbsolute.x}px,${E.positionAbsolute.y}px)`,pointerEvents:Y?"all":"none",visibility:F?"visible":"hidden",...k.style,...W},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:B,onMouseMove:H,onMouseLeave:K,onContextMenu:U,onClick:J,onDoubleClick:X,onKeyDown:q?Q:void 0,tabIndex:q?0:void 0,onFocus:q?re:void 0,role:k.ariaRole??(q?"group":void 0),"aria-roledescription":"node","aria-describedby":b?void 0:`${V9}-${w}`,"aria-label":k.ariaLabel,...k.domAttributes,children:f.jsx(Ape,{value:e,children:f.jsx(O,{id:e,data:k.data,type:A,positionAbsoluteX:E.positionAbsolute.x,positionAbsoluteY:E.positionAbsolute.y,selected:k.selected??!1,selectable:P,draggable:I,deletable:k.deletable??!0,isConnectable:D,sourcePosition:k.sourcePosition,targetPosition:k.targetPosition,dragging:M,dragHandle:k.dragHandle,zIndex:E.z,parentId:k.parentId,...G})})})}var Wpe=x.memo(Kpe);const Ype=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function aU(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:a,onError:i}=Ot(Ype,un),s=Hpe(e.onlyRenderVisibleElements),l=Gpe();return f.jsx("div",{className:"react-flow__nodes",style:lv,children:s.map(c=>f.jsx(Wpe,{id:c,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:l,nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:a,nodeClickDistance:e.nodeClickDistance,onError:i},c))})}aU.displayName="NodeRenderer";const Xpe=x.memo(aU);function Zpe(e){return Ot(x.useCallback(n=>{if(!e)return n.edges.map(a=>a.id);const r=[];if(n.width&&n.height)for(const a of n.edges){const i=n.nodeLookup.get(a.source),s=n.nodeLookup.get(a.target);i&&s&&Zhe({sourceNode:i,targetNode:s,width:n.width,height:n.height,transform:n.transform})&&r.push(a.id)}return r},[e]),un)}const Qpe=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return f.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},Jpe=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return f.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},e5={[hf.Arrow]:Qpe,[hf.ArrowClosed]:Jpe};function ege(e){const t=dn();return x.useMemo(()=>{var a,i;return Object.prototype.hasOwnProperty.call(e5,e)?e5[e]:((i=(a=t.getState()).onError)==null||i.call(a,"009",di.error009(e)),null)},[e])}const tge=({id:e,type:t,color:n,width:r=12.5,height:a=12.5,markerUnits:i="strokeWidth",strokeWidth:s,orient:l="auto-start-reverse"})=>{const c=ege(t);return c?f.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${a}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:l,refX:"0",refY:"0",children:f.jsx(c,{color:n,strokeWidth:s})}):null},iU=({defaultColor:e,rfId:t})=>{const n=Ot(i=>i.edges),r=Ot(i=>i.defaultEdgeOptions),a=x.useMemo(()=>ime(n,{id:t,defaultColor:e,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[n,r,t,e]);return a.length?f.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:f.jsx("defs",{children:a.map(i=>f.jsx(tge,{id:i.id,type:i.type,color:i.color,width:i.width,height:i.height,markerUnits:i.markerUnits,strokeWidth:i.strokeWidth,orient:i.orient},i.id))})}):null};iU.displayName="MarkerDefinitions";var nge=x.memo(iU);function sU({x:e,y:t,label:n,labelStyle:r,labelShowBg:a=!0,labelBgStyle:i,labelBgPadding:s=[2,4],labelBgBorderRadius:l=2,children:c,className:d,...h}){const[m,g]=x.useState({x:1,y:0,width:0,height:0}),v=Rn(["react-flow__edge-textwrapper",d]),b=x.useRef(null);return x.useEffect(()=>{if(b.current){const w=b.current.getBBox();g({x:w.x,y:w.y,width:w.width,height:w.height})}},[n]),n?f.jsxs("g",{transform:`translate(${e-m.width/2} ${t-m.height/2})`,className:v,visibility:m.width?"visible":"hidden",...h,children:[a&&f.jsx("rect",{width:m.width+2*s[0],x:-s[0],y:-s[1],height:m.height+2*s[1],className:"react-flow__edge-textbg",style:i,rx:l,ry:l}),f.jsx("text",{className:"react-flow__edge-text",y:m.height/2,dy:"0.3em",ref:b,style:r,children:n}),c]}):null}sU.displayName="EdgeText";const rge=x.memo(sU);function uv({path:e,labelX:t,labelY:n,label:r,labelStyle:a,labelShowBg:i,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:c,interactionWidth:d=20,...h}){return f.jsxs(f.Fragment,{children:[f.jsx("path",{...h,d:e,fill:"none",className:Rn(["react-flow__edge-path",h.className])}),d?f.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:d,className:"react-flow__edge-interaction"}):null,r&&Pa(t)&&Pa(n)?f.jsx(rge,{x:t,y:n,label:r,labelStyle:a,labelShowBg:i,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:c}):null]})}function t5({pos:e,x1:t,y1:n,x2:r,y2:a}){return e===et.Left||e===et.Right?[.5*(t+r),n]:[t,.5*(n+a)]}function oU({sourceX:e,sourceY:t,sourcePosition:n=et.Bottom,targetX:r,targetY:a,targetPosition:i=et.Top}){const[s,l]=t5({pos:n,x1:e,y1:t,x2:r,y2:a}),[c,d]=t5({pos:i,x1:r,y1:a,x2:e,y2:t}),[h,m,g,v]=E9({sourceX:e,sourceY:t,targetX:r,targetY:a,sourceControlX:s,sourceControlY:l,targetControlX:c,targetControlY:d});return[`M${e},${t} C${s},${l} ${c},${d} ${r},${a}`,h,m,g,v]}function lU(e){return x.memo(({id:t,sourceX:n,sourceY:r,targetX:a,targetY:i,sourcePosition:s,targetPosition:l,label:c,labelStyle:d,labelShowBg:h,labelBgStyle:m,labelBgPadding:g,labelBgBorderRadius:v,style:b,markerEnd:w,markerStart:S,interactionWidth:j})=>{const[_,k,E]=oU({sourceX:n,sourceY:r,sourcePosition:s,targetX:a,targetY:i,targetPosition:l}),T=e.isInternal?void 0:t;return f.jsx(uv,{id:T,path:_,labelX:k,labelY:E,label:c,labelStyle:d,labelShowBg:h,labelBgStyle:m,labelBgPadding:g,labelBgBorderRadius:v,style:b,markerEnd:w,markerStart:S,interactionWidth:j})})}const age=lU({isInternal:!1}),uU=lU({isInternal:!0});age.displayName="SimpleBezierEdge";uU.displayName="SimpleBezierEdgeInternal";function cU(e){return x.memo(({id:t,sourceX:n,sourceY:r,targetX:a,targetY:i,label:s,labelStyle:l,labelShowBg:c,labelBgStyle:d,labelBgPadding:h,labelBgBorderRadius:m,style:g,sourcePosition:v=et.Bottom,targetPosition:b=et.Top,markerEnd:w,markerStart:S,pathOptions:j,interactionWidth:_})=>{const[k,E,T]=RC({sourceX:n,sourceY:r,sourcePosition:v,targetX:a,targetY:i,targetPosition:b,borderRadius:j==null?void 0:j.borderRadius,offset:j==null?void 0:j.offset,stepPosition:j==null?void 0:j.stepPosition}),A=e.isInternal?void 0:t;return f.jsx(uv,{id:A,path:k,labelX:E,labelY:T,label:s,labelStyle:l,labelShowBg:c,labelBgStyle:d,labelBgPadding:h,labelBgBorderRadius:m,style:g,markerEnd:w,markerStart:S,interactionWidth:_})})}const dU=cU({isInternal:!1}),fU=cU({isInternal:!0});dU.displayName="SmoothStepEdge";fU.displayName="SmoothStepEdgeInternal";function hU(e){return x.memo(({id:t,...n})=>{var a;const r=e.isInternal?void 0:t;return f.jsx(dU,{...n,id:r,pathOptions:x.useMemo(()=>{var i;return{borderRadius:0,offset:(i=n.pathOptions)==null?void 0:i.offset}},[(a=n.pathOptions)==null?void 0:a.offset])})})}const ige=hU({isInternal:!1}),mU=hU({isInternal:!0});ige.displayName="StepEdge";mU.displayName="StepEdgeInternal";function pU(e){return x.memo(({id:t,sourceX:n,sourceY:r,targetX:a,targetY:i,label:s,labelStyle:l,labelShowBg:c,labelBgStyle:d,labelBgPadding:h,labelBgBorderRadius:m,style:g,markerEnd:v,markerStart:b,interactionWidth:w})=>{const[S,j,_]=O9({sourceX:n,sourceY:r,targetX:a,targetY:i}),k=e.isInternal?void 0:t;return f.jsx(uv,{id:k,path:S,labelX:j,labelY:_,label:s,labelStyle:l,labelShowBg:c,labelBgStyle:d,labelBgPadding:h,labelBgBorderRadius:m,style:g,markerEnd:v,markerStart:b,interactionWidth:w})})}const sge=pU({isInternal:!1}),gU=pU({isInternal:!0});sge.displayName="StraightEdge";gU.displayName="StraightEdgeInternal";function vU(e){return x.memo(({id:t,sourceX:n,sourceY:r,targetX:a,targetY:i,sourcePosition:s=et.Bottom,targetPosition:l=et.Top,label:c,labelStyle:d,labelShowBg:h,labelBgStyle:m,labelBgPadding:g,labelBgBorderRadius:v,style:b,markerEnd:w,markerStart:S,pathOptions:j,interactionWidth:_})=>{const[k,E,T]=A9({sourceX:n,sourceY:r,sourcePosition:s,targetX:a,targetY:i,targetPosition:l,curvature:j==null?void 0:j.curvature}),A=e.isInternal?void 0:t;return f.jsx(uv,{id:A,path:k,labelX:E,labelY:T,label:c,labelStyle:d,labelShowBg:h,labelBgStyle:m,labelBgPadding:g,labelBgBorderRadius:v,style:b,markerEnd:w,markerStart:S,interactionWidth:_})})}const oge=vU({isInternal:!1}),yU=vU({isInternal:!0});oge.displayName="BezierEdge";yU.displayName="BezierEdgeInternal";const n5={default:yU,straight:gU,step:mU,smoothstep:fU,simplebezier:uU},r5={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},lge=(e,t,n)=>n===et.Left?e-t:n===et.Right?e+t:e,uge=(e,t,n)=>n===et.Top?e-t:n===et.Bottom?e+t:e,a5="react-flow__edgeupdater";function i5({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:a,onMouseEnter:i,onMouseOut:s,type:l}){return f.jsx("circle",{onMouseDown:a,onMouseEnter:i,onMouseOut:s,className:Rn([a5,`${a5}-${l}`]),cx:lge(t,r,e),cy:uge(n,r,e),r,stroke:"transparent",fill:"transparent"})}function cge({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:a,targetX:i,targetY:s,sourcePosition:l,targetPosition:c,onReconnect:d,onReconnectStart:h,onReconnectEnd:m,setReconnecting:g,setUpdateHover:v}){const b=dn(),w=(E,T)=>{if(E.button!==0)return;const{autoPanOnConnect:A,domNode:O,connectionMode:I,connectionRadius:P,lib:D,onConnectStart:q,cancelConnection:z,nodeLookup:F,rfId:R,panBy:M,updateConnection:L}=b.getState(),G=T.type==="target",W=(H,K)=>{g(!1),m==null||m(H,n,T.type,K)},Y=H=>d==null?void 0:d(n,H),B=(H,K)=>{g(!0),h==null||h(E,n,T.type),q==null||q(H,K)};zC.onPointerDown(E.nativeEvent,{autoPanOnConnect:A,connectionMode:I,connectionRadius:P,domNode:O,handleId:T.id,nodeId:T.nodeId,nodeLookup:F,isTarget:G,edgeUpdaterType:T.type,lib:D,flowId:R,cancelConnection:z,panBy:M,isValidConnection:(...H)=>{var K,U;return((U=(K=b.getState()).isValidConnection)==null?void 0:U.call(K,...H))??!0},onConnect:Y,onConnectStart:B,onConnectEnd:(...H)=>{var K,U;return(U=(K=b.getState()).onConnectEnd)==null?void 0:U.call(K,...H)},onReconnectEnd:W,updateConnection:L,getTransform:()=>b.getState().transform,getFromHandle:()=>b.getState().connection.fromHandle,dragThreshold:b.getState().connectionDragThreshold,handleDomNode:E.currentTarget})},S=E=>w(E,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),j=E=>w(E,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),_=()=>v(!0),k=()=>v(!1);return f.jsxs(f.Fragment,{children:[(e===!0||e==="source")&&f.jsx(i5,{position:l,centerX:r,centerY:a,radius:t,onMouseDown:S,onMouseEnter:_,onMouseOut:k,type:"source"}),(e===!0||e==="target")&&f.jsx(i5,{position:c,centerX:i,centerY:s,radius:t,onMouseDown:j,onMouseEnter:_,onMouseOut:k,type:"target"})]})}function dge({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:a,onDoubleClick:i,onContextMenu:s,onMouseEnter:l,onMouseMove:c,onMouseLeave:d,reconnectRadius:h,onReconnect:m,onReconnectStart:g,onReconnectEnd:v,rfId:b,edgeTypes:w,noPanClassName:S,onError:j,disableKeyboardA11y:_}){let k=Ot(ee=>ee.edgeLookup.get(e));const E=Ot(ee=>ee.defaultEdgeOptions);k=E?{...E,...k}:k;let T=k.type||"default",A=(w==null?void 0:w[T])||n5[T];A===void 0&&(j==null||j("011",di.error011(T)),T="default",A=(w==null?void 0:w.default)||n5.default);const O=!!(k.focusable||t&&typeof k.focusable>"u"),I=typeof m<"u"&&(k.reconnectable||n&&typeof k.reconnectable>"u"),P=!!(k.selectable||r&&typeof k.selectable>"u"),D=x.useRef(null),[q,z]=x.useState(!1),[F,R]=x.useState(!1),M=dn(),{zIndex:L,sourceX:G,sourceY:W,targetX:Y,targetY:B,sourcePosition:H,targetPosition:K}=Ot(x.useCallback(ee=>{const ae=ee.nodeLookup.get(k.source),oe=ee.nodeLookup.get(k.target);if(!ae||!oe)return{zIndex:k.zIndex,...r5};const fe=ame({id:e,sourceNode:ae,targetNode:oe,sourceHandle:k.sourceHandle||null,targetHandle:k.targetHandle||null,connectionMode:ee.connectionMode,onError:j});return{zIndex:Xhe({selected:k.selected,zIndex:k.zIndex,sourceNode:ae,targetNode:oe,elevateOnSelect:ee.elevateEdgesOnSelect,zIndexMode:ee.zIndexMode}),...fe||r5}},[k.source,k.target,k.sourceHandle,k.targetHandle,k.selected,k.zIndex]),un),U=x.useMemo(()=>k.markerStart?`url('#${IC(k.markerStart,b)}')`:void 0,[k.markerStart,b]),X=x.useMemo(()=>k.markerEnd?`url('#${IC(k.markerEnd,b)}')`:void 0,[k.markerEnd,b]);if(k.hidden||G===null||W===null||Y===null||B===null)return null;const J=ee=>{var Ce;const{addSelectedEdges:ae,unselectNodesAndEdges:oe,multiSelectionActive:fe}=M.getState();P&&(M.setState({nodesSelectionActive:!1}),k.selected&&fe?(oe({nodes:[],edges:[k]}),(Ce=D.current)==null||Ce.blur()):ae([e])),a&&a(ee,k)},Q=i?ee=>{i(ee,{...k})}:void 0,re=s?ee=>{s(ee,{...k})}:void 0,ue=l?ee=>{l(ee,{...k})}:void 0,Z=c?ee=>{c(ee,{...k})}:void 0,se=d?ee=>{d(ee,{...k})}:void 0,ce=ee=>{var ae;if(!_&&m9.includes(ee.key)&&P){const{unselectNodesAndEdges:oe,addSelectedEdges:fe}=M.getState();ee.key==="Escape"?((ae=D.current)==null||ae.blur(),oe({edges:[k]})):fe([e])}};return f.jsx("svg",{style:{zIndex:L},children:f.jsxs("g",{className:Rn(["react-flow__edge",`react-flow__edge-${T}`,k.className,S,{selected:k.selected,animated:k.animated,inactive:!P&&!a,updating:q,selectable:P}]),onClick:J,onDoubleClick:Q,onContextMenu:re,onMouseEnter:ue,onMouseMove:Z,onMouseLeave:se,onKeyDown:O?ce:void 0,tabIndex:O?0:void 0,role:k.ariaRole??(O?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":k.ariaLabel===null?void 0:k.ariaLabel||`Edge from ${k.source} to ${k.target}`,"aria-describedby":O?`${K9}-${b}`:void 0,ref:D,...k.domAttributes,children:[!F&&f.jsx(A,{id:e,source:k.source,target:k.target,type:k.type,selected:k.selected,animated:k.animated,selectable:P,deletable:k.deletable??!0,label:k.label,labelStyle:k.labelStyle,labelShowBg:k.labelShowBg,labelBgStyle:k.labelBgStyle,labelBgPadding:k.labelBgPadding,labelBgBorderRadius:k.labelBgBorderRadius,sourceX:G,sourceY:W,targetX:Y,targetY:B,sourcePosition:H,targetPosition:K,data:k.data,style:k.style,sourceHandleId:k.sourceHandle,targetHandleId:k.targetHandle,markerStart:U,markerEnd:X,pathOptions:"pathOptions"in k?k.pathOptions:void 0,interactionWidth:k.interactionWidth}),I&&f.jsx(cge,{edge:k,isReconnectable:I,reconnectRadius:h,onReconnect:m,onReconnectStart:g,onReconnectEnd:v,sourceX:G,sourceY:W,targetX:Y,targetY:B,sourcePosition:H,targetPosition:K,setUpdateHover:z,setReconnecting:R})]})})}var fge=x.memo(dge);const hge=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function xU({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:a,onReconnect:i,onEdgeContextMenu:s,onEdgeMouseEnter:l,onEdgeMouseMove:c,onEdgeMouseLeave:d,onEdgeClick:h,reconnectRadius:m,onEdgeDoubleClick:g,onReconnectStart:v,onReconnectEnd:b,disableKeyboardA11y:w}){const{edgesFocusable:S,edgesReconnectable:j,elementsSelectable:_,onError:k}=Ot(hge,un),E=Zpe(t);return f.jsxs("div",{className:"react-flow__edges",children:[f.jsx(nge,{defaultColor:e,rfId:n}),E.map(T=>f.jsx(fge,{id:T,edgesFocusable:S,edgesReconnectable:j,elementsSelectable:_,noPanClassName:a,onReconnect:i,onContextMenu:s,onMouseEnter:l,onMouseMove:c,onMouseLeave:d,onClick:h,reconnectRadius:m,onDoubleClick:g,onReconnectStart:v,onReconnectEnd:b,rfId:n,onError:k,edgeTypes:r,disableKeyboardA11y:w},T))]})}xU.displayName="EdgeRenderer";const mge=x.memo(xU),pge=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function gge({children:e}){const t=Ot(pge);return f.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function vge(e){const t=RN(),n=x.useRef(!1);x.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const yge=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function xge(e){const t=Ot(yge),n=dn();return x.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function bge(e){return e.connection.inProgress?{...e.connection,to:Hf(e.connection.to,e.transform)}:{...e.connection}}function wge(e){return bge}function Sge(e){const t=wge();return Ot(t,un)}const jge=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function kge({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:a,width:i,height:s,isValid:l,inProgress:c}=Ot(jge,un);return!(i&&a&&c)?null:f.jsx("svg",{style:e,width:i,height:s,className:"react-flow__connectionline react-flow__container",children:f.jsx("g",{className:Rn(["react-flow__connection",v9(l)]),children:f.jsx(bU,{style:t,type:n,CustomComponent:r,isValid:l})})})}const bU=({style:e,type:t=Zs.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:a,from:i,fromNode:s,fromHandle:l,fromPosition:c,to:d,toNode:h,toHandle:m,toPosition:g,pointer:v}=Sge();if(!a)return;if(n)return f.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:s,fromHandle:l,fromX:i.x,fromY:i.y,toX:d.x,toY:d.y,fromPosition:c,toPosition:g,connectionStatus:v9(r),toNode:h,toHandle:m,pointer:v});let b="";const w={sourceX:i.x,sourceY:i.y,sourcePosition:c,targetX:d.x,targetY:d.y,targetPosition:g};switch(t){case Zs.Bezier:[b]=A9(w);break;case Zs.SimpleBezier:[b]=oU(w);break;case Zs.Step:[b]=RC({...w,borderRadius:0});break;case Zs.SmoothStep:[b]=RC(w);break;default:[b]=O9(w)}return f.jsx("path",{d:b,fill:"none",className:"react-flow__connection-path",style:e})};bU.displayName="ConnectionLine";const _ge={};function s5(e=_ge){x.useRef(e),dn(),x.useEffect(()=>{},[e])}function Cge(){dn(),x.useRef(!1),x.useEffect(()=>{},[])}function wU({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:a,onNodeDoubleClick:i,onEdgeDoubleClick:s,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:d,onNodeContextMenu:h,onSelectionContextMenu:m,onSelectionStart:g,onSelectionEnd:v,connectionLineType:b,connectionLineStyle:w,connectionLineComponent:S,connectionLineContainerStyle:j,selectionKeyCode:_,selectionOnDrag:k,selectionMode:E,multiSelectionKeyCode:T,panActivationKeyCode:A,zoomActivationKeyCode:O,deleteKeyCode:I,onlyRenderVisibleElements:P,elementsSelectable:D,defaultViewport:q,translateExtent:z,minZoom:F,maxZoom:R,preventScrolling:M,defaultMarkerColor:L,zoomOnScroll:G,zoomOnPinch:W,panOnScroll:Y,panOnScrollSpeed:B,panOnScrollMode:H,zoomOnDoubleClick:K,panOnDrag:U,onPaneClick:X,onPaneMouseEnter:J,onPaneMouseMove:Q,onPaneMouseLeave:re,onPaneScroll:ue,onPaneContextMenu:Z,paneClickDistance:se,nodeClickDistance:ce,onEdgeContextMenu:ee,onEdgeMouseEnter:ae,onEdgeMouseMove:oe,onEdgeMouseLeave:fe,reconnectRadius:Ce,onReconnect:Te,onReconnectStart:pe,onReconnectEnd:De,noDragClassName:Xe,noWheelClassName:We,noPanClassName:at,disableKeyboardA11y:Ne,nodeExtent:Fe,rfId:ye,viewport:le,onViewportChange:me}){return s5(e),s5(t),Cge(),vge(n),xge(le),f.jsx(Bpe,{onPaneClick:X,onPaneMouseEnter:J,onPaneMouseMove:Q,onPaneMouseLeave:re,onPaneContextMenu:Z,onPaneScroll:ue,paneClickDistance:se,deleteKeyCode:I,selectionKeyCode:_,selectionOnDrag:k,selectionMode:E,onSelectionStart:g,onSelectionEnd:v,multiSelectionKeyCode:T,panActivationKeyCode:A,zoomActivationKeyCode:O,elementsSelectable:D,zoomOnScroll:G,zoomOnPinch:W,zoomOnDoubleClick:K,panOnScroll:Y,panOnScrollSpeed:B,panOnScrollMode:H,panOnDrag:U,defaultViewport:q,translateExtent:z,minZoom:F,maxZoom:R,onSelectionContextMenu:m,preventScrolling:M,noDragClassName:Xe,noWheelClassName:We,noPanClassName:at,disableKeyboardA11y:Ne,onViewportChange:me,isControlledViewport:!!le,children:f.jsxs(gge,{children:[f.jsx(mge,{edgeTypes:t,onEdgeClick:a,onEdgeDoubleClick:s,onReconnect:Te,onReconnectStart:pe,onReconnectEnd:De,onlyRenderVisibleElements:P,onEdgeContextMenu:ee,onEdgeMouseEnter:ae,onEdgeMouseMove:oe,onEdgeMouseLeave:fe,reconnectRadius:Ce,defaultMarkerColor:L,noPanClassName:at,disableKeyboardA11y:Ne,rfId:ye}),f.jsx(kge,{style:w,type:b,component:S,containerStyle:j}),f.jsx("div",{className:"react-flow__edgelabel-renderer"}),f.jsx(Xpe,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:i,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:d,onNodeContextMenu:h,nodeClickDistance:ce,onlyRenderVisibleElements:P,noPanClassName:at,noDragClassName:Xe,disableKeyboardA11y:Ne,nodeExtent:Fe,rfId:ye}),f.jsx("div",{className:"react-flow__viewport-portal"})]})})}wU.displayName="GraphView";const Nge=x.memo(wU),o5=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:a,height:i,fitView:s,fitViewOptions:l,minZoom:c=.5,maxZoom:d=2,nodeOrigin:h,nodeExtent:m,zIndexMode:g="basic"}={})=>{const v=new Map,b=new Map,w=new Map,S=new Map,j=r??t??[],_=n??e??[],k=h??[0,0],E=m??df;D9(w,S,j);const{nodesInitialized:T}=LC(_,v,b,{nodeOrigin:k,nodeExtent:E,zIndexMode:g});let A=[0,0,1];if(s&&a&&i){const O=Bf(v,{filter:q=>!!((q.width||q.initialWidth)&&(q.height||q.initialHeight))}),{x:I,y:P,zoom:D}=EN(O,a,i,c,d,(l==null?void 0:l.padding)??.1);A=[I,P,D]}return{rfId:"1",width:a??0,height:i??0,transform:A,nodes:_,nodesInitialized:T,nodeLookup:v,parentLookup:b,edges:j,edgeLookup:S,connectionLookup:w,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:c,maxZoom:d,translateExtent:df,nodeExtent:E,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Hu.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:k,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:s??!1,fitViewOptions:l,fitViewResolver:null,connection:{...g9},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:Uhe,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:p9,zIndexMode:g,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},Ege=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:a,height:i,fitView:s,fitViewOptions:l,minZoom:c,maxZoom:d,nodeOrigin:h,nodeExtent:m,zIndexMode:g})=>Kme((v,b)=>{async function w(){const{nodeLookup:S,panZoom:j,fitViewOptions:_,fitViewResolver:k,width:E,height:T,minZoom:A,maxZoom:O}=b();j&&(await Fhe({nodes:S,width:E,height:T,panZoom:j,minZoom:A,maxZoom:O},_),k==null||k.resolve(!0),v({fitViewResolver:null}))}return{...o5({nodes:e,edges:t,width:a,height:i,fitView:s,fitViewOptions:l,minZoom:c,maxZoom:d,nodeOrigin:h,nodeExtent:m,defaultNodes:n,defaultEdges:r,zIndexMode:g}),setNodes:S=>{const{nodeLookup:j,parentLookup:_,nodeOrigin:k,elevateNodesOnSelect:E,fitViewQueued:T,zIndexMode:A,nodesSelectionActive:O}=b(),{nodesInitialized:I,hasSelectedNodes:P}=LC(S,j,_,{nodeOrigin:k,nodeExtent:m,elevateNodesOnSelect:E,checkEquality:!0,zIndexMode:A}),D=O&&P;T&&I?(w(),v({nodes:S,nodesInitialized:I,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:D})):v({nodes:S,nodesInitialized:I,nodesSelectionActive:D})},setEdges:S=>{const{connectionLookup:j,edgeLookup:_}=b();D9(j,_,S),v({edges:S})},setDefaultNodesAndEdges:(S,j)=>{if(S){const{setNodes:_}=b();_(S),v({hasDefaultNodes:!0})}if(j){const{setEdges:_}=b();_(j),v({hasDefaultEdges:!0})}},updateNodeInternals:S=>{const{triggerNodeChanges:j,nodeLookup:_,parentLookup:k,domNode:E,nodeOrigin:T,nodeExtent:A,debug:O,fitViewQueued:I,zIndexMode:P}=b(),{changes:D,updatedInternals:q}=fme(S,_,k,E,T,A,P);q&&(lme(_,k,{nodeOrigin:T,nodeExtent:A,zIndexMode:P}),I?(w(),v({fitViewQueued:!1,fitViewOptions:void 0})):v({}),(D==null?void 0:D.length)>0&&(O&&console.log("React Flow: trigger node changes",D),j==null||j(D)))},updateNodePositions:(S,j=!1)=>{const _=[];let k=[];const{nodeLookup:E,triggerNodeChanges:T,connection:A,updateConnection:O,onNodesChangeMiddlewareMap:I}=b();for(const[P,D]of S){const q=E.get(P),z=!!(q!=null&&q.expandParent&&(q!=null&&q.parentId)&&(D!=null&&D.position)),F={id:P,type:"position",position:z?{x:Math.max(0,D.position.x),y:Math.max(0,D.position.y)}:D.position,dragging:j};if(q&&A.inProgress&&A.fromNode.id===q.id){const R=sl(q,A.fromHandle,et.Left,!0);O({...A,from:R})}z&&q.parentId&&_.push({id:P,parentId:q.parentId,rect:{...D.internals.positionAbsolute,width:D.measured.width??0,height:D.measured.height??0}}),k.push(F)}if(_.length>0){const{parentLookup:P,nodeOrigin:D}=b(),q=DN(_,E,P,D);k.push(...q)}for(const P of I.values())k=P(k);T(k)},triggerNodeChanges:S=>{const{onNodesChange:j,setNodes:_,nodes:k,hasDefaultNodes:E,debug:T}=b();if(S!=null&&S.length){if(E){const A=X9(S,k);_(A)}T&&console.log("React Flow: trigger node changes",S),j==null||j(S)}},triggerEdgeChanges:S=>{const{onEdgesChange:j,setEdges:_,edges:k,hasDefaultEdges:E,debug:T}=b();if(S!=null&&S.length){if(E){const A=Z9(S,k);_(A)}T&&console.log("React Flow: trigger edge changes",S),j==null||j(S)}},addSelectedNodes:S=>{const{multiSelectionActive:j,edgeLookup:_,nodeLookup:k,triggerNodeChanges:E,triggerEdgeChanges:T}=b();if(j){const A=S.map(O=>Uo(O,!0));E(A);return}E(Tu(k,new Set([...S]),!0)),T(Tu(_))},addSelectedEdges:S=>{const{multiSelectionActive:j,edgeLookup:_,nodeLookup:k,triggerNodeChanges:E,triggerEdgeChanges:T}=b();if(j){const A=S.map(O=>Uo(O,!0));T(A);return}T(Tu(_,new Set([...S]))),E(Tu(k,new Set,!0))},unselectNodesAndEdges:({nodes:S,edges:j}={})=>{const{edges:_,nodes:k,nodeLookup:E,triggerNodeChanges:T,triggerEdgeChanges:A}=b(),O=S||k,I=j||_,P=[];for(const q of O){if(!q.selected)continue;const z=E.get(q.id);z&&(z.selected=!1),P.push(Uo(q.id,!1))}const D=[];for(const q of I)q.selected&&D.push(Uo(q.id,!1));T(P),A(D)},setMinZoom:S=>{const{panZoom:j,maxZoom:_}=b();j==null||j.setScaleExtent([S,_]),v({minZoom:S})},setMaxZoom:S=>{const{panZoom:j,minZoom:_}=b();j==null||j.setScaleExtent([_,S]),v({maxZoom:S})},setTranslateExtent:S=>{var j;(j=b().panZoom)==null||j.setTranslateExtent(S),v({translateExtent:S})},resetSelectedElements:()=>{const{edges:S,nodes:j,triggerNodeChanges:_,triggerEdgeChanges:k,elementsSelectable:E}=b();if(!E)return;const T=j.reduce((O,I)=>I.selected?[...O,Uo(I.id,!1)]:O,[]),A=S.reduce((O,I)=>I.selected?[...O,Uo(I.id,!1)]:O,[]);_(T),k(A)},setNodeExtent:S=>{const{nodes:j,nodeLookup:_,parentLookup:k,nodeOrigin:E,elevateNodesOnSelect:T,nodeExtent:A,zIndexMode:O}=b();S[0][0]===A[0][0]&&S[0][1]===A[0][1]&&S[1][0]===A[1][0]&&S[1][1]===A[1][1]||(LC(j,_,k,{nodeOrigin:E,nodeExtent:S,elevateNodesOnSelect:T,checkEquality:!1,zIndexMode:O}),v({nodeExtent:S}))},panBy:S=>{const{transform:j,width:_,height:k,panZoom:E,translateExtent:T}=b();return hme({delta:S,panZoom:E,transform:j,translateExtent:T,width:_,height:k})},setCenter:async(S,j,_)=>{const{width:k,height:E,maxZoom:T,panZoom:A}=b();if(!A)return Promise.resolve(!1);const O=typeof(_==null?void 0:_.zoom)<"u"?_.zoom:T;return await A.setViewport({x:k/2-S*O,y:E/2-j*O,zoom:O},{duration:_==null?void 0:_.duration,ease:_==null?void 0:_.ease,interpolate:_==null?void 0:_.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{v({connection:{...g9}})},updateConnection:S=>{v({connection:S})},reset:()=>v({...o5()})}},Object.is);function Age({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:a,initialHeight:i,initialMinZoom:s,initialMaxZoom:l,initialFitViewOptions:c,fitView:d,nodeOrigin:h,nodeExtent:m,zIndexMode:g,children:v}){const[b]=x.useState(()=>Ege({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:a,height:i,fitView:d,minZoom:s,maxZoom:l,fitViewOptions:c,nodeOrigin:h,nodeExtent:m,zIndexMode:g}));return f.jsx(Wme,{value:b,children:f.jsx(gpe,{children:v})})}function Tge({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:a,width:i,height:s,fitView:l,fitViewOptions:c,minZoom:d,maxZoom:h,nodeOrigin:m,nodeExtent:g,zIndexMode:v}){return x.useContext(sv)?f.jsx(f.Fragment,{children:e}):f.jsx(Age,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:a,initialWidth:i,initialHeight:s,fitView:l,initialFitViewOptions:c,initialMinZoom:d,initialMaxZoom:h,nodeOrigin:m,nodeExtent:g,zIndexMode:v,children:e})}const Oge={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function Mge({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:a,nodeTypes:i,edgeTypes:s,onNodeClick:l,onEdgeClick:c,onInit:d,onMove:h,onMoveStart:m,onMoveEnd:g,onConnect:v,onConnectStart:b,onConnectEnd:w,onClickConnectStart:S,onClickConnectEnd:j,onNodeMouseEnter:_,onNodeMouseMove:k,onNodeMouseLeave:E,onNodeContextMenu:T,onNodeDoubleClick:A,onNodeDragStart:O,onNodeDrag:I,onNodeDragStop:P,onNodesDelete:D,onEdgesDelete:q,onDelete:z,onSelectionChange:F,onSelectionDragStart:R,onSelectionDrag:M,onSelectionDragStop:L,onSelectionContextMenu:G,onSelectionStart:W,onSelectionEnd:Y,onBeforeDelete:B,connectionMode:H,connectionLineType:K=Zs.Bezier,connectionLineStyle:U,connectionLineComponent:X,connectionLineContainerStyle:J,deleteKeyCode:Q="Backspace",selectionKeyCode:re="Shift",selectionOnDrag:ue=!1,selectionMode:Z=ff.Full,panActivationKeyCode:se="Space",multiSelectionKeyCode:ce=pf()?"Meta":"Control",zoomActivationKeyCode:ee=pf()?"Meta":"Control",snapToGrid:ae,snapGrid:oe,onlyRenderVisibleElements:fe=!1,selectNodesOnDrag:Ce,nodesDraggable:Te,autoPanOnNodeFocus:pe,nodesConnectable:De,nodesFocusable:Xe,nodeOrigin:We=W9,edgesFocusable:at,edgesReconnectable:Ne,elementsSelectable:Fe=!0,defaultViewport:ye=ope,minZoom:le=.5,maxZoom:me=2,translateExtent:Oe=df,preventScrolling:Pe=!0,nodeExtent:be,defaultMarkerColor:nt="#b1b1b7",zoomOnScroll:ot=!0,zoomOnPinch:gt=!0,panOnScroll:lt=!1,panOnScrollSpeed:Me=.5,panOnScrollMode:$e=Jo.Free,zoomOnDoubleClick:Qe=!0,panOnDrag:vt=!0,onPaneClick:st,onPaneMouseEnter:Et,onPaneMouseMove:Je,onPaneMouseLeave:At,onPaneScroll:It,onPaneContextMenu:hn,paneClickDistance:ne=1,nodeClickDistance:we=0,children:Se,onReconnect:Ie,onReconnectStart:ze,onReconnectEnd:ft,onEdgeContextMenu:Vt,onEdgeDoubleClick:ir,onEdgeMouseEnter:Le,onEdgeMouseMove:Cn,onEdgeMouseLeave:Dr,reconnectRadius:Ml=10,onNodesChange:Pl,onEdgesChange:Rr,noDragClassName:jn="nodrag",noWheelClassName:Gn="nowheel",noPanClassName:Sa="nopan",fitView:ys,fitViewOptions:Si,connectOnClick:jc,attributionPosition:mo,proOptions:ji,defaultEdgeOptions:po,elevateNodesOnSelect:Ua=!0,elevateEdgesOnSelect:Ga=!1,disableKeyboardA11y:Va=!1,autoPanOnConnect:Ka,autoPanOnNodeDrag:gn,autoPanSpeed:go,connectionRadius:ja,isValidConnection:Vn,onError:wr,style:kc,id:vo,nodeDragThreshold:Dl,connectionDragThreshold:_c,viewport:xs,onViewportChange:bs,width:Ir,height:sr,colorMode:yo="light",debug:Rl,onScroll:je,ariaLabelConfig:ht,zIndexMode:St="basic",...vn},yt){const ka=vo||"1",Il=dpe(yo),xo=x.useCallback(na=>{na.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),je==null||je(na)},[je]);return f.jsx("div",{"data-testid":"rf__wrapper",...vn,onScroll:xo,style:{...kc,...Oge},ref:yt,className:Rn(["react-flow",a,Il]),id:vo,role:"application",children:f.jsxs(Tge,{nodes:e,edges:t,width:Ir,height:sr,fitView:ys,fitViewOptions:Si,minZoom:le,maxZoom:me,nodeOrigin:We,nodeExtent:be,zIndexMode:St,children:[f.jsx(cpe,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:v,onConnectStart:b,onConnectEnd:w,onClickConnectStart:S,onClickConnectEnd:j,nodesDraggable:Te,autoPanOnNodeFocus:pe,nodesConnectable:De,nodesFocusable:Xe,edgesFocusable:at,edgesReconnectable:Ne,elementsSelectable:Fe,elevateNodesOnSelect:Ua,elevateEdgesOnSelect:Ga,minZoom:le,maxZoom:me,nodeExtent:be,onNodesChange:Pl,onEdgesChange:Rr,snapToGrid:ae,snapGrid:oe,connectionMode:H,translateExtent:Oe,connectOnClick:jc,defaultEdgeOptions:po,fitView:ys,fitViewOptions:Si,onNodesDelete:D,onEdgesDelete:q,onDelete:z,onNodeDragStart:O,onNodeDrag:I,onNodeDragStop:P,onSelectionDrag:M,onSelectionDragStart:R,onSelectionDragStop:L,onMove:h,onMoveStart:m,onMoveEnd:g,noPanClassName:Sa,nodeOrigin:We,rfId:ka,autoPanOnConnect:Ka,autoPanOnNodeDrag:gn,autoPanSpeed:go,onError:wr,connectionRadius:ja,isValidConnection:Vn,selectNodesOnDrag:Ce,nodeDragThreshold:Dl,connectionDragThreshold:_c,onBeforeDelete:B,debug:Rl,ariaLabelConfig:ht,zIndexMode:St}),f.jsx(Nge,{onInit:d,onNodeClick:l,onEdgeClick:c,onNodeMouseEnter:_,onNodeMouseMove:k,onNodeMouseLeave:E,onNodeContextMenu:T,onNodeDoubleClick:A,nodeTypes:i,edgeTypes:s,connectionLineType:K,connectionLineStyle:U,connectionLineComponent:X,connectionLineContainerStyle:J,selectionKeyCode:re,selectionOnDrag:ue,selectionMode:Z,deleteKeyCode:Q,multiSelectionKeyCode:ce,panActivationKeyCode:se,zoomActivationKeyCode:ee,onlyRenderVisibleElements:fe,defaultViewport:ye,translateExtent:Oe,minZoom:le,maxZoom:me,preventScrolling:Pe,zoomOnScroll:ot,zoomOnPinch:gt,zoomOnDoubleClick:Qe,panOnScroll:lt,panOnScrollSpeed:Me,panOnScrollMode:$e,panOnDrag:vt,onPaneClick:st,onPaneMouseEnter:Et,onPaneMouseMove:Je,onPaneMouseLeave:At,onPaneScroll:It,onPaneContextMenu:hn,paneClickDistance:ne,nodeClickDistance:we,onSelectionContextMenu:G,onSelectionStart:W,onSelectionEnd:Y,onReconnect:Ie,onReconnectStart:ze,onReconnectEnd:ft,onEdgeContextMenu:Vt,onEdgeDoubleClick:ir,onEdgeMouseEnter:Le,onEdgeMouseMove:Cn,onEdgeMouseLeave:Dr,reconnectRadius:Ml,defaultMarkerColor:nt,noDragClassName:jn,noWheelClassName:Gn,noPanClassName:Sa,rfId:ka,disableKeyboardA11y:Va,nodeExtent:be,viewport:xs,onViewportChange:bs}),f.jsx(spe,{onSelectionChange:F}),Se,f.jsx(tpe,{proOptions:ji,position:mo}),f.jsx(epe,{rfId:ka,disableKeyboardA11y:Va})]})})}var Pge=Q9(Mge);function Dge(e){const[t,n]=x.useState(e),r=x.useCallback(a=>n(i=>X9(a,i)),[]);return[t,n,r]}function Rge(e){const[t,n]=x.useState(e),r=x.useCallback(a=>n(i=>Z9(a,i)),[]);return[t,n,r]}function Ige({dimensions:e,lineWidth:t,variant:n,className:r}){return f.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Rn(["react-flow__background-pattern",n,r])})}function Lge({radius:e,className:t}){return f.jsx("circle",{cx:e,cy:e,r:e,className:Rn(["react-flow__background-pattern","dots",t])})}var Xi;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Xi||(Xi={}));const zge={[Xi.Dots]:1,[Xi.Lines]:1,[Xi.Cross]:6},$ge=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function SU({id:e,variant:t=Xi.Dots,gap:n=20,size:r,lineWidth:a=1,offset:i=0,color:s,bgColor:l,style:c,className:d,patternClassName:h}){const m=x.useRef(null),{transform:g,patternId:v}=Ot($ge,un),b=r||zge[t],w=t===Xi.Dots,S=t===Xi.Cross,j=Array.isArray(n)?n:[n,n],_=[j[0]*g[2]||1,j[1]*g[2]||1],k=b*g[2],E=Array.isArray(i)?i:[i,i],T=S?[k,k]:_,A=[E[0]*g[2]||1+T[0]/2,E[1]*g[2]||1+T[1]/2],O=`${v}${e||""}`;return f.jsxs("svg",{className:Rn(["react-flow__background",d]),style:{...c,...lv,"--xy-background-color-props":l,"--xy-background-pattern-color-props":s},ref:m,"data-testid":"rf__background",children:[f.jsx("pattern",{id:O,x:g[0]%_[0],y:g[1]%_[1],width:_[0],height:_[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${A[0]},-${A[1]})`,children:w?f.jsx(Lge,{radius:k/2,className:h}):f.jsx(Ige,{dimensions:T,lineWidth:a,variant:t,className:h})}),f.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${O})`})]})}SU.displayName="Background";const qge=x.memo(SU);function Bge(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:f.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function Fge(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:f.jsx("path",{d:"M0 0h32v4.2H0z"})})}function Hge(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:f.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 Uge(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:f.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 Gge(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:f.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 Gm({children:e,className:t,...n}){return f.jsx("button",{type:"button",className:Rn(["react-flow__controls-button",t]),...n,children:e})}const Vge=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function jU({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:a,onZoomIn:i,onZoomOut:s,onFitView:l,onInteractiveChange:c,className:d,children:h,position:m="bottom-left",orientation:g="vertical","aria-label":v}){const b=dn(),{isInteractive:w,minZoomReached:S,maxZoomReached:j,ariaLabelConfig:_}=Ot(Vge,un),{zoomIn:k,zoomOut:E,fitView:T}=RN(),A=()=>{k(),i==null||i()},O=()=>{E(),s==null||s()},I=()=>{T(a),l==null||l()},P=()=>{b.setState({nodesDraggable:!w,nodesConnectable:!w,elementsSelectable:!w}),c==null||c(!w)},D=g==="horizontal"?"horizontal":"vertical";return f.jsxs(ov,{className:Rn(["react-flow__controls",D,d]),position:m,style:e,"data-testid":"rf__controls","aria-label":v??_["controls.ariaLabel"],children:[t&&f.jsxs(f.Fragment,{children:[f.jsx(Gm,{onClick:A,className:"react-flow__controls-zoomin",title:_["controls.zoomIn.ariaLabel"],"aria-label":_["controls.zoomIn.ariaLabel"],disabled:j,children:f.jsx(Bge,{})}),f.jsx(Gm,{onClick:O,className:"react-flow__controls-zoomout",title:_["controls.zoomOut.ariaLabel"],"aria-label":_["controls.zoomOut.ariaLabel"],disabled:S,children:f.jsx(Fge,{})})]}),n&&f.jsx(Gm,{className:"react-flow__controls-fitview",onClick:I,title:_["controls.fitView.ariaLabel"],"aria-label":_["controls.fitView.ariaLabel"],children:f.jsx(Hge,{})}),r&&f.jsx(Gm,{className:"react-flow__controls-interactive",onClick:P,title:_["controls.interactive.ariaLabel"],"aria-label":_["controls.interactive.ariaLabel"],children:w?f.jsx(Gge,{}):f.jsx(Uge,{})}),h]})}jU.displayName="Controls";const Kge=x.memo(jU);function Wge({id:e,x:t,y:n,width:r,height:a,style:i,color:s,strokeColor:l,strokeWidth:c,className:d,borderRadius:h,shapeRendering:m,selected:g,onClick:v}){const{background:b,backgroundColor:w}=i||{},S=s||b||w;return f.jsx("rect",{className:Rn(["react-flow__minimap-node",{selected:g},d]),x:t,y:n,rx:h,ry:h,width:r,height:a,style:{fill:S,stroke:l,strokeWidth:c},shapeRendering:m,onClick:v?j=>v(j,e):void 0})}const Yge=x.memo(Wge),Xge=e=>e.nodes.map(t=>t.id),db=e=>e instanceof Function?e:()=>e;function Zge({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:a,nodeComponent:i=Yge,onClick:s}){const l=Ot(Xge,un),c=db(t),d=db(e),h=db(n),m=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return f.jsx(f.Fragment,{children:l.map(g=>f.jsx(Jge,{id:g,nodeColorFunc:c,nodeStrokeColorFunc:d,nodeClassNameFunc:h,nodeBorderRadius:r,nodeStrokeWidth:a,NodeComponent:i,onClick:s,shapeRendering:m},g))})}function Qge({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:a,nodeStrokeWidth:i,shapeRendering:s,NodeComponent:l,onClick:c}){const{node:d,x:h,y:m,width:g,height:v}=Ot(b=>{const w=b.nodeLookup.get(e);if(!w)return{node:void 0,x:0,y:0,width:0,height:0};const S=w.internals.userNode,{x:j,y:_}=w.internals.positionAbsolute,{width:k,height:E}=ls(S);return{node:S,x:j,y:_,width:k,height:E}},un);return!d||d.hidden||!j9(d)?null:f.jsx(l,{x:h,y:m,width:g,height:v,style:d.style,selected:!!d.selected,className:r(d),color:t(d),borderRadius:a,strokeColor:n(d),strokeWidth:i,shapeRendering:s,onClick:c,id:d.id})}const Jge=x.memo(Qge);var eve=x.memo(Zge);const tve=200,nve=150,rve=e=>!e.hidden,ave=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?S9(Bf(e.nodeLookup,{filter:rve}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},ive="react-flow__minimap-desc";function kU({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:a="",nodeBorderRadius:i=5,nodeStrokeWidth:s,nodeComponent:l,bgColor:c,maskColor:d,maskStrokeColor:h,maskStrokeWidth:m,position:g="bottom-right",onClick:v,onNodeClick:b,pannable:w=!1,zoomable:S=!1,ariaLabel:j,inversePan:_,zoomStep:k=1,offsetScale:E=5}){const T=dn(),A=x.useRef(null),{boundingRect:O,viewBB:I,rfId:P,panZoom:D,translateExtent:q,flowWidth:z,flowHeight:F,ariaLabelConfig:R}=Ot(ave,un),M=(e==null?void 0:e.width)??tve,L=(e==null?void 0:e.height)??nve,G=O.width/M,W=O.height/L,Y=Math.max(G,W),B=Y*M,H=Y*L,K=E*Y,U=O.x-(B-O.width)/2-K,X=O.y-(H-O.height)/2-K,J=B+K*2,Q=H+K*2,re=`${ive}-${P}`,ue=x.useRef(0),Z=x.useRef();ue.current=Y,x.useEffect(()=>{if(A.current&&D)return Z.current=Sme({domNode:A.current,panZoom:D,getTransform:()=>T.getState().transform,getViewScale:()=>ue.current}),()=>{var ae;(ae=Z.current)==null||ae.destroy()}},[D]),x.useEffect(()=>{var ae;(ae=Z.current)==null||ae.update({translateExtent:q,width:z,height:F,inversePan:_,pannable:w,zoomStep:k,zoomable:S})},[w,S,_,k,q,z,F]);const se=v?ae=>{var Ce;const[oe,fe]=((Ce=Z.current)==null?void 0:Ce.pointer(ae))||[0,0];v(ae,{x:oe,y:fe})}:void 0,ce=b?x.useCallback((ae,oe)=>{const fe=T.getState().nodeLookup.get(oe).internals.userNode;b(ae,fe)},[]):void 0,ee=j??R["minimap.ariaLabel"];return f.jsx(ov,{position:g,style:{...e,"--xy-minimap-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-background-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-color-props":typeof h=="string"?h:void 0,"--xy-minimap-mask-stroke-width-props":typeof m=="number"?m*Y:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof s=="number"?s:void 0},className:Rn(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:f.jsxs("svg",{width:M,height:L,viewBox:`${U} ${X} ${J} ${Q}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":re,ref:A,onClick:se,children:[ee&&f.jsx("title",{id:re,children:ee}),f.jsx(eve,{onClick:ce,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:i,nodeClassName:a,nodeStrokeWidth:s,nodeComponent:l}),f.jsx("path",{className:"react-flow__minimap-mask",d:`M${U-K},${X-K}h${J+K*2}v${Q+K*2}h${-J-K*2}z
|
|
507
|
+
M${I.x},${I.y}h${I.width}v${I.height}h${-I.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}kU.displayName="MiniMap";const sve=x.memo(kU),ove=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,lve={[Ku.Line]:"right",[Ku.Handle]:"bottom-right"};function uve({nodeId:e,position:t,variant:n=Ku.Handle,className:r,style:a=void 0,children:i,color:s,minWidth:l=10,minHeight:c=10,maxWidth:d=Number.MAX_VALUE,maxHeight:h=Number.MAX_VALUE,keepAspectRatio:m=!1,resizeDirection:g,autoScale:v=!0,shouldResize:b,onResizeStart:w,onResize:S,onResizeEnd:j}){const _=nU(),k=typeof e=="string"?e:_,E=dn(),T=x.useRef(null),A=n===Ku.Handle,O=Ot(x.useCallback(ove(A&&v),[A,v]),un),I=x.useRef(null),P=t??lve[n];x.useEffect(()=>{if(!(!T.current||!k))return I.current||(I.current=Ime({domNode:T.current,nodeId:k,getStoreItems:()=>{const{nodeLookup:q,transform:z,snapGrid:F,snapToGrid:R,nodeOrigin:M,domNode:L}=E.getState();return{nodeLookup:q,transform:z,snapGrid:F,snapToGrid:R,nodeOrigin:M,paneDomNode:L}},onChange:(q,z)=>{const{triggerNodeChanges:F,nodeLookup:R,parentLookup:M,nodeOrigin:L}=E.getState(),G=[],W={x:q.x,y:q.y},Y=R.get(k);if(Y&&Y.expandParent&&Y.parentId){const B=Y.origin??L,H=q.width??Y.measured.width??0,K=q.height??Y.measured.height??0,U={id:Y.id,parentId:Y.parentId,rect:{width:H,height:K,...k9({x:q.x??Y.position.x,y:q.y??Y.position.y},{width:H,height:K},Y.parentId,R,B)}},X=DN([U],R,M,L);G.push(...X),W.x=q.x?Math.max(B[0]*H,q.x):void 0,W.y=q.y?Math.max(B[1]*K,q.y):void 0}if(W.x!==void 0&&W.y!==void 0){const B={id:k,type:"position",position:{...W}};G.push(B)}if(q.width!==void 0&&q.height!==void 0){const H={id:k,type:"dimensions",resizing:!0,setAttributes:g?g==="horizontal"?"width":"height":!0,dimensions:{width:q.width,height:q.height}};G.push(H)}for(const B of z){const H={...B,type:"position"};G.push(H)}F(G)},onEnd:({width:q,height:z})=>{const F={id:k,type:"dimensions",resizing:!1,dimensions:{width:q,height:z}};E.getState().triggerNodeChanges([F])}})),I.current.update({controlPosition:P,boundaries:{minWidth:l,minHeight:c,maxWidth:d,maxHeight:h},keepAspectRatio:m,resizeDirection:g,onResizeStart:w,onResize:S,onResizeEnd:j,shouldResize:b}),()=>{var q;(q=I.current)==null||q.destroy()}},[P,l,c,d,h,m,w,S,j,b]);const D=P.split("-");return f.jsx("div",{className:Rn(["react-flow__resize-control","nodrag",...D,n,r]),ref:T,style:{...a,scale:O,...s&&{[A?"backgroundColor":"borderColor"]:s}},children:i})}x.memo(uve);function LN(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var fb,l5;function cve(){if(l5)return fb;l5=1;function e(){this.__data__=[],this.size=0}return fb=e,fb}var hb,u5;function cc(){if(u5)return hb;u5=1;function e(t,n){return t===n||t!==t&&n!==n}return hb=e,hb}var mb,c5;function cv(){if(c5)return mb;c5=1;var e=cc();function t(n,r){for(var a=n.length;a--;)if(e(n[a][0],r))return a;return-1}return mb=t,mb}var pb,d5;function dve(){if(d5)return pb;d5=1;var e=cv(),t=Array.prototype,n=t.splice;function r(a){var i=this.__data__,s=e(i,a);if(s<0)return!1;var l=i.length-1;return s==l?i.pop():n.call(i,s,1),--this.size,!0}return pb=r,pb}var gb,f5;function fve(){if(f5)return gb;f5=1;var e=cv();function t(n){var r=this.__data__,a=e(r,n);return a<0?void 0:r[a][1]}return gb=t,gb}var vb,h5;function hve(){if(h5)return vb;h5=1;var e=cv();function t(n){return e(this.__data__,n)>-1}return vb=t,vb}var yb,m5;function mve(){if(m5)return yb;m5=1;var e=cv();function t(n,r){var a=this.__data__,i=e(a,n);return i<0?(++this.size,a.push([n,r])):a[i][1]=r,this}return yb=t,yb}var xb,p5;function dv(){if(p5)return xb;p5=1;var e=cve(),t=dve(),n=fve(),r=hve(),a=mve();function i(s){var l=-1,c=s==null?0:s.length;for(this.clear();++l<c;){var d=s[l];this.set(d[0],d[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=a,xb=i,xb}var bb,g5;function pve(){if(g5)return bb;g5=1;var e=dv();function t(){this.__data__=new e,this.size=0}return bb=t,bb}var wb,v5;function gve(){if(v5)return wb;v5=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return wb=e,wb}var Sb,y5;function vve(){if(y5)return Sb;y5=1;function e(t){return this.__data__.get(t)}return Sb=e,Sb}var jb,x5;function yve(){if(x5)return jb;x5=1;function e(t){return this.__data__.has(t)}return jb=e,jb}var kb,b5;function _U(){if(b5)return kb;b5=1;var e=typeof Nm=="object"&&Nm&&Nm.Object===Object&&Nm;return kb=e,kb}var _b,w5;function Ba(){if(w5)return _b;w5=1;var e=_U(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return _b=n,_b}var Cb,S5;function dc(){if(S5)return Cb;S5=1;var e=Ba(),t=e.Symbol;return Cb=t,Cb}var Nb,j5;function xve(){if(j5)return Nb;j5=1;var e=dc(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,a=e?e.toStringTag:void 0;function i(s){var l=n.call(s,a),c=s[a];try{s[a]=void 0;var d=!0}catch{}var h=r.call(s);return d&&(l?s[a]=c:delete s[a]),h}return Nb=i,Nb}var Eb,k5;function bve(){if(k5)return Eb;k5=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return Eb=n,Eb}var Ab,_5;function wl(){if(_5)return Ab;_5=1;var e=dc(),t=xve(),n=bve(),r="[object Null]",a="[object Undefined]",i=e?e.toStringTag:void 0;function s(l){return l==null?l===void 0?a:r:i&&i in Object(l)?t(l):n(l)}return Ab=s,Ab}var Tb,C5;function xa(){if(C5)return Tb;C5=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return Tb=e,Tb}var Ob,N5;function Uf(){if(N5)return Ob;N5=1;var e=wl(),t=xa(),n="[object AsyncFunction]",r="[object Function]",a="[object GeneratorFunction]",i="[object Proxy]";function s(l){if(!t(l))return!1;var c=e(l);return c==r||c==a||c==n||c==i}return Ob=s,Ob}var Mb,E5;function wve(){if(E5)return Mb;E5=1;var e=Ba(),t=e["__core-js_shared__"];return Mb=t,Mb}var Pb,A5;function Sve(){if(A5)return Pb;A5=1;var e=wve(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return Pb=n,Pb}var Db,T5;function CU(){if(T5)return Db;T5=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return Db=n,Db}var Rb,O5;function jve(){if(O5)return Rb;O5=1;var e=Uf(),t=Sve(),n=xa(),r=CU(),a=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,s=Function.prototype,l=Object.prototype,c=s.toString,d=l.hasOwnProperty,h=RegExp("^"+c.call(d).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function m(g){if(!n(g)||t(g))return!1;var v=e(g)?h:i;return v.test(r(g))}return Rb=m,Rb}var Ib,M5;function kve(){if(M5)return Ib;M5=1;function e(t,n){return t==null?void 0:t[n]}return Ib=e,Ib}var Lb,P5;function Sl(){if(P5)return Lb;P5=1;var e=jve(),t=kve();function n(r,a){var i=t(r,a);return e(i)?i:void 0}return Lb=n,Lb}var zb,D5;function zN(){if(D5)return zb;D5=1;var e=Sl(),t=Ba(),n=e(t,"Map");return zb=n,zb}var $b,R5;function fv(){if(R5)return $b;R5=1;var e=Sl(),t=e(Object,"create");return $b=t,$b}var qb,I5;function _ve(){if(I5)return qb;I5=1;var e=fv();function t(){this.__data__=e?e(null):{},this.size=0}return qb=t,qb}var Bb,L5;function Cve(){if(L5)return Bb;L5=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return Bb=e,Bb}var Fb,z5;function Nve(){if(z5)return Fb;z5=1;var e=fv(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function a(i){var s=this.__data__;if(e){var l=s[i];return l===t?void 0:l}return r.call(s,i)?s[i]:void 0}return Fb=a,Fb}var Hb,$5;function Eve(){if($5)return Hb;$5=1;var e=fv(),t=Object.prototype,n=t.hasOwnProperty;function r(a){var i=this.__data__;return e?i[a]!==void 0:n.call(i,a)}return Hb=r,Hb}var Ub,q5;function Ave(){if(q5)return Ub;q5=1;var e=fv(),t="__lodash_hash_undefined__";function n(r,a){var i=this.__data__;return this.size+=this.has(r)?0:1,i[r]=e&&a===void 0?t:a,this}return Ub=n,Ub}var Gb,B5;function Tve(){if(B5)return Gb;B5=1;var e=_ve(),t=Cve(),n=Nve(),r=Eve(),a=Ave();function i(s){var l=-1,c=s==null?0:s.length;for(this.clear();++l<c;){var d=s[l];this.set(d[0],d[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=a,Gb=i,Gb}var Vb,F5;function Ove(){if(F5)return Vb;F5=1;var e=Tve(),t=dv(),n=zN();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return Vb=r,Vb}var Kb,H5;function Mve(){if(H5)return Kb;H5=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return Kb=e,Kb}var Wb,U5;function hv(){if(U5)return Wb;U5=1;var e=Mve();function t(n,r){var a=n.__data__;return e(r)?a[typeof r=="string"?"string":"hash"]:a.map}return Wb=t,Wb}var Yb,G5;function Pve(){if(G5)return Yb;G5=1;var e=hv();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return Yb=t,Yb}var Xb,V5;function Dve(){if(V5)return Xb;V5=1;var e=hv();function t(n){return e(this,n).get(n)}return Xb=t,Xb}var Zb,K5;function Rve(){if(K5)return Zb;K5=1;var e=hv();function t(n){return e(this,n).has(n)}return Zb=t,Zb}var Qb,W5;function Ive(){if(W5)return Qb;W5=1;var e=hv();function t(n,r){var a=e(this,n),i=a.size;return a.set(n,r),this.size+=a.size==i?0:1,this}return Qb=t,Qb}var Jb,Y5;function $N(){if(Y5)return Jb;Y5=1;var e=Ove(),t=Pve(),n=Dve(),r=Rve(),a=Ive();function i(s){var l=-1,c=s==null?0:s.length;for(this.clear();++l<c;){var d=s[l];this.set(d[0],d[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=a,Jb=i,Jb}var e1,X5;function Lve(){if(X5)return e1;X5=1;var e=dv(),t=zN(),n=$N(),r=200;function a(i,s){var l=this.__data__;if(l instanceof e){var c=l.__data__;if(!t||c.length<r-1)return c.push([i,s]),this.size=++l.size,this;l=this.__data__=new n(c)}return l.set(i,s),this.size=l.size,this}return e1=a,e1}var t1,Z5;function mv(){if(Z5)return t1;Z5=1;var e=dv(),t=pve(),n=gve(),r=vve(),a=yve(),i=Lve();function s(l){var c=this.__data__=new e(l);this.size=c.size}return s.prototype.clear=t,s.prototype.delete=n,s.prototype.get=r,s.prototype.has=a,s.prototype.set=i,t1=s,t1}var n1,Q5;function qN(){if(Q5)return n1;Q5=1;function e(t,n){for(var r=-1,a=t==null?0:t.length;++r<a&&n(t[r],r,t)!==!1;);return t}return n1=e,n1}var r1,J5;function NU(){if(J5)return r1;J5=1;var e=Sl(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return r1=t,r1}var a1,e3;function pv(){if(e3)return a1;e3=1;var e=NU();function t(n,r,a){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:a,writable:!0}):n[r]=a}return a1=t,a1}var i1,t3;function gv(){if(t3)return i1;t3=1;var e=pv(),t=cc(),n=Object.prototype,r=n.hasOwnProperty;function a(i,s,l){var c=i[s];(!(r.call(i,s)&&t(c,l))||l===void 0&&!(s in i))&&e(i,s,l)}return i1=a,i1}var s1,n3;function Gf(){if(n3)return s1;n3=1;var e=gv(),t=pv();function n(r,a,i,s){var l=!i;i||(i={});for(var c=-1,d=a.length;++c<d;){var h=a[c],m=s?s(i[h],r[h],h,i,r):void 0;m===void 0&&(m=r[h]),l?t(i,h,m):e(i,h,m)}return i}return s1=n,s1}var o1,r3;function zve(){if(r3)return o1;r3=1;function e(t,n){for(var r=-1,a=Array(t);++r<t;)a[r]=n(r);return a}return o1=e,o1}var l1,a3;function wi(){if(a3)return l1;a3=1;function e(t){return t!=null&&typeof t=="object"}return l1=e,l1}var u1,i3;function $ve(){if(i3)return u1;i3=1;var e=wl(),t=wi(),n="[object Arguments]";function r(a){return t(a)&&e(a)==n}return u1=r,u1}var c1,s3;function Vf(){if(s3)return c1;s3=1;var e=$ve(),t=wi(),n=Object.prototype,r=n.hasOwnProperty,a=n.propertyIsEnumerable,i=e((function(){return arguments})())?e:function(s){return t(s)&&r.call(s,"callee")&&!a.call(s,"callee")};return c1=i,c1}var d1,o3;function In(){if(o3)return d1;o3=1;var e=Array.isArray;return d1=e,d1}var Ld={exports:{}},f1,l3;function qve(){if(l3)return f1;l3=1;function e(){return!1}return f1=e,f1}Ld.exports;var u3;function fc(){return u3||(u3=1,(function(e,t){var n=Ba(),r=qve(),a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===a,l=s?n.Buffer:void 0,c=l?l.isBuffer:void 0,d=c||r;e.exports=d})(Ld,Ld.exports)),Ld.exports}var h1,c3;function vv(){if(c3)return h1;c3=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,a){var i=typeof r;return a=a??e,!!a&&(i=="number"||i!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<a}return h1=n,h1}var m1,d3;function BN(){if(d3)return m1;d3=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return m1=t,m1}var p1,f3;function Bve(){if(f3)return p1;f3=1;var e=wl(),t=BN(),n=wi(),r="[object Arguments]",a="[object Array]",i="[object Boolean]",s="[object Date]",l="[object Error]",c="[object Function]",d="[object Map]",h="[object Number]",m="[object Object]",g="[object RegExp]",v="[object Set]",b="[object String]",w="[object WeakMap]",S="[object ArrayBuffer]",j="[object DataView]",_="[object Float32Array]",k="[object Float64Array]",E="[object Int8Array]",T="[object Int16Array]",A="[object Int32Array]",O="[object Uint8Array]",I="[object Uint8ClampedArray]",P="[object Uint16Array]",D="[object Uint32Array]",q={};q[_]=q[k]=q[E]=q[T]=q[A]=q[O]=q[I]=q[P]=q[D]=!0,q[r]=q[a]=q[S]=q[i]=q[j]=q[s]=q[l]=q[c]=q[d]=q[h]=q[m]=q[g]=q[v]=q[b]=q[w]=!1;function z(F){return n(F)&&t(F.length)&&!!q[e(F)]}return p1=z,p1}var g1,h3;function yv(){if(h3)return g1;h3=1;function e(t){return function(n){return t(n)}}return g1=e,g1}var zd={exports:{}};zd.exports;var m3;function FN(){return m3||(m3=1,(function(e,t){var n=_U(),r=t&&!t.nodeType&&t,a=r&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===r,s=i&&n.process,l=(function(){try{var c=a&&a.require&&a.require("util").types;return c||s&&s.binding&&s.binding("util")}catch{}})();e.exports=l})(zd,zd.exports)),zd.exports}var v1,p3;function Kf(){if(p3)return v1;p3=1;var e=Bve(),t=yv(),n=FN(),r=n&&n.isTypedArray,a=r?t(r):e;return v1=a,v1}var y1,g3;function EU(){if(g3)return y1;g3=1;var e=zve(),t=Vf(),n=In(),r=fc(),a=vv(),i=Kf(),s=Object.prototype,l=s.hasOwnProperty;function c(d,h){var m=n(d),g=!m&&t(d),v=!m&&!g&&r(d),b=!m&&!g&&!v&&i(d),w=m||g||v||b,S=w?e(d.length,String):[],j=S.length;for(var _ in d)(h||l.call(d,_))&&!(w&&(_=="length"||v&&(_=="offset"||_=="parent")||b&&(_=="buffer"||_=="byteLength"||_=="byteOffset")||a(_,j)))&&S.push(_);return S}return y1=c,y1}var x1,v3;function xv(){if(v3)return x1;v3=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,a=typeof r=="function"&&r.prototype||e;return n===a}return x1=t,x1}var b1,y3;function AU(){if(y3)return b1;y3=1;function e(t,n){return function(r){return t(n(r))}}return b1=e,b1}var w1,x3;function Fve(){if(x3)return w1;x3=1;var e=AU(),t=e(Object.keys,Object);return w1=t,w1}var S1,b3;function HN(){if(b3)return S1;b3=1;var e=xv(),t=Fve(),n=Object.prototype,r=n.hasOwnProperty;function a(i){if(!e(i))return t(i);var s=[];for(var l in Object(i))r.call(i,l)&&l!="constructor"&&s.push(l);return s}return S1=a,S1}var j1,w3;function us(){if(w3)return j1;w3=1;var e=Uf(),t=BN();function n(r){return r!=null&&t(r.length)&&!e(r)}return j1=n,j1}var k1,S3;function uo(){if(S3)return k1;S3=1;var e=EU(),t=HN(),n=us();function r(a){return n(a)?e(a):t(a)}return k1=r,k1}var _1,j3;function Hve(){if(j3)return _1;j3=1;var e=Gf(),t=uo();function n(r,a){return r&&e(a,t(a),r)}return _1=n,_1}var C1,k3;function Uve(){if(k3)return C1;k3=1;function e(t){var n=[];if(t!=null)for(var r in Object(t))n.push(r);return n}return C1=e,C1}var N1,_3;function Gve(){if(_3)return N1;_3=1;var e=xa(),t=xv(),n=Uve(),r=Object.prototype,a=r.hasOwnProperty;function i(s){if(!e(s))return n(s);var l=t(s),c=[];for(var d in s)d=="constructor"&&(l||!a.call(s,d))||c.push(d);return c}return N1=i,N1}var E1,C3;function jl(){if(C3)return E1;C3=1;var e=EU(),t=Gve(),n=us();function r(a){return n(a)?e(a,!0):t(a)}return E1=r,E1}var A1,N3;function Vve(){if(N3)return A1;N3=1;var e=Gf(),t=jl();function n(r,a){return r&&e(a,t(a),r)}return A1=n,A1}var $d={exports:{}};$d.exports;var E3;function TU(){return E3||(E3=1,(function(e,t){var n=Ba(),r=t&&!t.nodeType&&t,a=r&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===r,s=i?n.Buffer:void 0,l=s?s.allocUnsafe:void 0;function c(d,h){if(h)return d.slice();var m=d.length,g=l?l(m):new d.constructor(m);return d.copy(g),g}e.exports=c})($d,$d.exports)),$d.exports}var T1,A3;function OU(){if(A3)return T1;A3=1;function e(t,n){var r=-1,a=t.length;for(n||(n=Array(a));++r<a;)n[r]=t[r];return n}return T1=e,T1}var O1,T3;function MU(){if(T3)return O1;T3=1;function e(t,n){for(var r=-1,a=t==null?0:t.length,i=0,s=[];++r<a;){var l=t[r];n(l,r,t)&&(s[i++]=l)}return s}return O1=e,O1}var M1,O3;function PU(){if(O3)return M1;O3=1;function e(){return[]}return M1=e,M1}var P1,M3;function UN(){if(M3)return P1;M3=1;var e=MU(),t=PU(),n=Object.prototype,r=n.propertyIsEnumerable,a=Object.getOwnPropertySymbols,i=a?function(s){return s==null?[]:(s=Object(s),e(a(s),function(l){return r.call(s,l)}))}:t;return P1=i,P1}var D1,P3;function Kve(){if(P3)return D1;P3=1;var e=Gf(),t=UN();function n(r,a){return e(r,t(r),a)}return D1=n,D1}var R1,D3;function GN(){if(D3)return R1;D3=1;function e(t,n){for(var r=-1,a=n.length,i=t.length;++r<a;)t[i+r]=n[r];return t}return R1=e,R1}var I1,R3;function bv(){if(R3)return I1;R3=1;var e=AU(),t=e(Object.getPrototypeOf,Object);return I1=t,I1}var L1,I3;function DU(){if(I3)return L1;I3=1;var e=GN(),t=bv(),n=UN(),r=PU(),a=Object.getOwnPropertySymbols,i=a?function(s){for(var l=[];s;)e(l,n(s)),s=t(s);return l}:r;return L1=i,L1}var z1,L3;function Wve(){if(L3)return z1;L3=1;var e=Gf(),t=DU();function n(r,a){return e(r,t(r),a)}return z1=n,z1}var $1,z3;function RU(){if(z3)return $1;z3=1;var e=GN(),t=In();function n(r,a,i){var s=a(r);return t(r)?s:e(s,i(r))}return $1=n,$1}var q1,$3;function IU(){if($3)return q1;$3=1;var e=RU(),t=UN(),n=uo();function r(a){return e(a,n,t)}return q1=r,q1}var B1,q3;function Yve(){if(q3)return B1;q3=1;var e=RU(),t=DU(),n=jl();function r(a){return e(a,n,t)}return B1=r,B1}var F1,B3;function Xve(){if(B3)return F1;B3=1;var e=Sl(),t=Ba(),n=e(t,"DataView");return F1=n,F1}var H1,F3;function Zve(){if(F3)return H1;F3=1;var e=Sl(),t=Ba(),n=e(t,"Promise");return H1=n,H1}var U1,H3;function LU(){if(H3)return U1;H3=1;var e=Sl(),t=Ba(),n=e(t,"Set");return U1=n,U1}var G1,U3;function Qve(){if(U3)return G1;U3=1;var e=Sl(),t=Ba(),n=e(t,"WeakMap");return G1=n,G1}var V1,G3;function hc(){if(G3)return V1;G3=1;var e=Xve(),t=zN(),n=Zve(),r=LU(),a=Qve(),i=wl(),s=CU(),l="[object Map]",c="[object Object]",d="[object Promise]",h="[object Set]",m="[object WeakMap]",g="[object DataView]",v=s(e),b=s(t),w=s(n),S=s(r),j=s(a),_=i;return(e&&_(new e(new ArrayBuffer(1)))!=g||t&&_(new t)!=l||n&&_(n.resolve())!=d||r&&_(new r)!=h||a&&_(new a)!=m)&&(_=function(k){var E=i(k),T=E==c?k.constructor:void 0,A=T?s(T):"";if(A)switch(A){case v:return g;case b:return l;case w:return d;case S:return h;case j:return m}return E}),V1=_,V1}var K1,V3;function Jve(){if(V3)return K1;V3=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r){var a=r.length,i=new r.constructor(a);return a&&typeof r[0]=="string"&&t.call(r,"index")&&(i.index=r.index,i.input=r.input),i}return K1=n,K1}var W1,K3;function zU(){if(K3)return W1;K3=1;var e=Ba(),t=e.Uint8Array;return W1=t,W1}var Y1,W3;function VN(){if(W3)return Y1;W3=1;var e=zU();function t(n){var r=new n.constructor(n.byteLength);return new e(r).set(new e(n)),r}return Y1=t,Y1}var X1,Y3;function eye(){if(Y3)return X1;Y3=1;var e=VN();function t(n,r){var a=r?e(n.buffer):n.buffer;return new n.constructor(a,n.byteOffset,n.byteLength)}return X1=t,X1}var Z1,X3;function tye(){if(X3)return Z1;X3=1;var e=/\w*$/;function t(n){var r=new n.constructor(n.source,e.exec(n));return r.lastIndex=n.lastIndex,r}return Z1=t,Z1}var Q1,Z3;function nye(){if(Z3)return Q1;Z3=1;var e=dc(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;function r(a){return n?Object(n.call(a)):{}}return Q1=r,Q1}var J1,Q3;function $U(){if(Q3)return J1;Q3=1;var e=VN();function t(n,r){var a=r?e(n.buffer):n.buffer;return new n.constructor(a,n.byteOffset,n.length)}return J1=t,J1}var ew,J3;function rye(){if(J3)return ew;J3=1;var e=VN(),t=eye(),n=tye(),r=nye(),a=$U(),i="[object Boolean]",s="[object Date]",l="[object Map]",c="[object Number]",d="[object RegExp]",h="[object Set]",m="[object String]",g="[object Symbol]",v="[object ArrayBuffer]",b="[object DataView]",w="[object Float32Array]",S="[object Float64Array]",j="[object Int8Array]",_="[object Int16Array]",k="[object Int32Array]",E="[object Uint8Array]",T="[object Uint8ClampedArray]",A="[object Uint16Array]",O="[object Uint32Array]";function I(P,D,q){var z=P.constructor;switch(D){case v:return e(P);case i:case s:return new z(+P);case b:return t(P,q);case w:case S:case j:case _:case k:case E:case T:case A:case O:return a(P,q);case l:return new z;case c:case m:return new z(P);case d:return n(P);case h:return new z;case g:return r(P)}}return ew=I,ew}var tw,eI;function qU(){if(eI)return tw;eI=1;var e=xa(),t=Object.create,n=(function(){function r(){}return function(a){if(!e(a))return{};if(t)return t(a);r.prototype=a;var i=new r;return r.prototype=void 0,i}})();return tw=n,tw}var nw,tI;function BU(){if(tI)return nw;tI=1;var e=qU(),t=bv(),n=xv();function r(a){return typeof a.constructor=="function"&&!n(a)?e(t(a)):{}}return nw=r,nw}var rw,nI;function aye(){if(nI)return rw;nI=1;var e=hc(),t=wi(),n="[object Map]";function r(a){return t(a)&&e(a)==n}return rw=r,rw}var aw,rI;function iye(){if(rI)return aw;rI=1;var e=aye(),t=yv(),n=FN(),r=n&&n.isMap,a=r?t(r):e;return aw=a,aw}var iw,aI;function sye(){if(aI)return iw;aI=1;var e=hc(),t=wi(),n="[object Set]";function r(a){return t(a)&&e(a)==n}return iw=r,iw}var sw,iI;function oye(){if(iI)return sw;iI=1;var e=sye(),t=yv(),n=FN(),r=n&&n.isSet,a=r?t(r):e;return sw=a,sw}var ow,sI;function FU(){if(sI)return ow;sI=1;var e=mv(),t=qN(),n=gv(),r=Hve(),a=Vve(),i=TU(),s=OU(),l=Kve(),c=Wve(),d=IU(),h=Yve(),m=hc(),g=Jve(),v=rye(),b=BU(),w=In(),S=fc(),j=iye(),_=xa(),k=oye(),E=uo(),T=jl(),A=1,O=2,I=4,P="[object Arguments]",D="[object Array]",q="[object Boolean]",z="[object Date]",F="[object Error]",R="[object Function]",M="[object GeneratorFunction]",L="[object Map]",G="[object Number]",W="[object Object]",Y="[object RegExp]",B="[object Set]",H="[object String]",K="[object Symbol]",U="[object WeakMap]",X="[object ArrayBuffer]",J="[object DataView]",Q="[object Float32Array]",re="[object Float64Array]",ue="[object Int8Array]",Z="[object Int16Array]",se="[object Int32Array]",ce="[object Uint8Array]",ee="[object Uint8ClampedArray]",ae="[object Uint16Array]",oe="[object Uint32Array]",fe={};fe[P]=fe[D]=fe[X]=fe[J]=fe[q]=fe[z]=fe[Q]=fe[re]=fe[ue]=fe[Z]=fe[se]=fe[L]=fe[G]=fe[W]=fe[Y]=fe[B]=fe[H]=fe[K]=fe[ce]=fe[ee]=fe[ae]=fe[oe]=!0,fe[F]=fe[R]=fe[U]=!1;function Ce(Te,pe,De,Xe,We,at){var Ne,Fe=pe&A,ye=pe&O,le=pe&I;if(De&&(Ne=We?De(Te,Xe,We,at):De(Te)),Ne!==void 0)return Ne;if(!_(Te))return Te;var me=w(Te);if(me){if(Ne=g(Te),!Fe)return s(Te,Ne)}else{var Oe=m(Te),Pe=Oe==R||Oe==M;if(S(Te))return i(Te,Fe);if(Oe==W||Oe==P||Pe&&!We){if(Ne=ye||Pe?{}:b(Te),!Fe)return ye?c(Te,a(Ne,Te)):l(Te,r(Ne,Te))}else{if(!fe[Oe])return We?Te:{};Ne=v(Te,Oe,Fe)}}at||(at=new e);var be=at.get(Te);if(be)return be;at.set(Te,Ne),k(Te)?Te.forEach(function(gt){Ne.add(Ce(gt,pe,De,gt,Te,at))}):j(Te)&&Te.forEach(function(gt,lt){Ne.set(lt,Ce(gt,pe,De,lt,Te,at))});var nt=le?ye?h:d:ye?T:E,ot=me?void 0:nt(Te);return t(ot||Te,function(gt,lt){ot&&(lt=gt,gt=Te[lt]),n(Ne,lt,Ce(gt,pe,De,lt,Te,at))}),Ne}return ow=Ce,ow}var lw,oI;function lye(){if(oI)return lw;oI=1;var e=FU(),t=4;function n(r){return e(r,t)}return lw=n,lw}var uw,lI;function KN(){if(lI)return uw;lI=1;function e(t){return function(){return t}}return uw=e,uw}var cw,uI;function uye(){if(uI)return cw;uI=1;function e(t){return function(n,r,a){for(var i=-1,s=Object(n),l=a(n),c=l.length;c--;){var d=l[t?c:++i];if(r(s[d],d,s)===!1)break}return n}}return cw=e,cw}var dw,cI;function WN(){if(cI)return dw;cI=1;var e=uye(),t=e();return dw=t,dw}var fw,dI;function YN(){if(dI)return fw;dI=1;var e=WN(),t=uo();function n(r,a){return r&&e(r,a,t)}return fw=n,fw}var hw,fI;function cye(){if(fI)return hw;fI=1;var e=us();function t(n,r){return function(a,i){if(a==null)return a;if(!e(a))return n(a,i);for(var s=a.length,l=r?s:-1,c=Object(a);(r?l--:++l<s)&&i(c[l],l,c)!==!1;);return a}}return hw=t,hw}var mw,hI;function wv(){if(hI)return mw;hI=1;var e=YN(),t=cye(),n=t(e);return mw=n,mw}var pw,mI;function kl(){if(mI)return pw;mI=1;function e(t){return t}return pw=e,pw}var gw,pI;function HU(){if(pI)return gw;pI=1;var e=kl();function t(n){return typeof n=="function"?n:e}return gw=t,gw}var vw,gI;function UU(){if(gI)return vw;gI=1;var e=qN(),t=wv(),n=HU(),r=In();function a(i,s){var l=r(i)?e:t;return l(i,n(s))}return vw=a,vw}var yw,vI;function GU(){return vI||(vI=1,yw=UU()),yw}var xw,yI;function dye(){if(yI)return xw;yI=1;var e=wv();function t(n,r){var a=[];return e(n,function(i,s,l){r(i,s,l)&&a.push(i)}),a}return xw=t,xw}var bw,xI;function fye(){if(xI)return bw;xI=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return bw=t,bw}var ww,bI;function hye(){if(bI)return ww;bI=1;function e(t){return this.__data__.has(t)}return ww=e,ww}var Sw,wI;function VU(){if(wI)return Sw;wI=1;var e=$N(),t=fye(),n=hye();function r(a){var i=-1,s=a==null?0:a.length;for(this.__data__=new e;++i<s;)this.add(a[i])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,Sw=r,Sw}var jw,SI;function mye(){if(SI)return jw;SI=1;function e(t,n){for(var r=-1,a=t==null?0:t.length;++r<a;)if(n(t[r],r,t))return!0;return!1}return jw=e,jw}var kw,jI;function KU(){if(jI)return kw;jI=1;function e(t,n){return t.has(n)}return kw=e,kw}var _w,kI;function WU(){if(kI)return _w;kI=1;var e=VU(),t=mye(),n=KU(),r=1,a=2;function i(s,l,c,d,h,m){var g=c&r,v=s.length,b=l.length;if(v!=b&&!(g&&b>v))return!1;var w=m.get(s),S=m.get(l);if(w&&S)return w==l&&S==s;var j=-1,_=!0,k=c&a?new e:void 0;for(m.set(s,l),m.set(l,s);++j<v;){var E=s[j],T=l[j];if(d)var A=g?d(T,E,j,l,s,m):d(E,T,j,s,l,m);if(A!==void 0){if(A)continue;_=!1;break}if(k){if(!t(l,function(O,I){if(!n(k,I)&&(E===O||h(E,O,c,d,m)))return k.push(I)})){_=!1;break}}else if(!(E===T||h(E,T,c,d,m))){_=!1;break}}return m.delete(s),m.delete(l),_}return _w=i,_w}var Cw,_I;function pye(){if(_I)return Cw;_I=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(a,i){r[++n]=[i,a]}),r}return Cw=e,Cw}var Nw,CI;function XN(){if(CI)return Nw;CI=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(a){r[++n]=a}),r}return Nw=e,Nw}var Ew,NI;function gye(){if(NI)return Ew;NI=1;var e=dc(),t=zU(),n=cc(),r=WU(),a=pye(),i=XN(),s=1,l=2,c="[object Boolean]",d="[object Date]",h="[object Error]",m="[object Map]",g="[object Number]",v="[object RegExp]",b="[object Set]",w="[object String]",S="[object Symbol]",j="[object ArrayBuffer]",_="[object DataView]",k=e?e.prototype:void 0,E=k?k.valueOf:void 0;function T(A,O,I,P,D,q,z){switch(I){case _:if(A.byteLength!=O.byteLength||A.byteOffset!=O.byteOffset)return!1;A=A.buffer,O=O.buffer;case j:return!(A.byteLength!=O.byteLength||!q(new t(A),new t(O)));case c:case d:case g:return n(+A,+O);case h:return A.name==O.name&&A.message==O.message;case v:case w:return A==O+"";case m:var F=a;case b:var R=P&s;if(F||(F=i),A.size!=O.size&&!R)return!1;var M=z.get(A);if(M)return M==O;P|=l,z.set(A,O);var L=r(F(A),F(O),P,D,q,z);return z.delete(A),L;case S:if(E)return E.call(A)==E.call(O)}return!1}return Ew=T,Ew}var Aw,EI;function vye(){if(EI)return Aw;EI=1;var e=IU(),t=1,n=Object.prototype,r=n.hasOwnProperty;function a(i,s,l,c,d,h){var m=l&t,g=e(i),v=g.length,b=e(s),w=b.length;if(v!=w&&!m)return!1;for(var S=v;S--;){var j=g[S];if(!(m?j in s:r.call(s,j)))return!1}var _=h.get(i),k=h.get(s);if(_&&k)return _==s&&k==i;var E=!0;h.set(i,s),h.set(s,i);for(var T=m;++S<v;){j=g[S];var A=i[j],O=s[j];if(c)var I=m?c(O,A,j,s,i,h):c(A,O,j,i,s,h);if(!(I===void 0?A===O||d(A,O,l,c,h):I)){E=!1;break}T||(T=j=="constructor")}if(E&&!T){var P=i.constructor,D=s.constructor;P!=D&&"constructor"in i&&"constructor"in s&&!(typeof P=="function"&&P instanceof P&&typeof D=="function"&&D instanceof D)&&(E=!1)}return h.delete(i),h.delete(s),E}return Aw=a,Aw}var Tw,AI;function yye(){if(AI)return Tw;AI=1;var e=mv(),t=WU(),n=gye(),r=vye(),a=hc(),i=In(),s=fc(),l=Kf(),c=1,d="[object Arguments]",h="[object Array]",m="[object Object]",g=Object.prototype,v=g.hasOwnProperty;function b(w,S,j,_,k,E){var T=i(w),A=i(S),O=T?h:a(w),I=A?h:a(S);O=O==d?m:O,I=I==d?m:I;var P=O==m,D=I==m,q=O==I;if(q&&s(w)){if(!s(S))return!1;T=!0,P=!1}if(q&&!P)return E||(E=new e),T||l(w)?t(w,S,j,_,k,E):n(w,S,O,j,_,k,E);if(!(j&c)){var z=P&&v.call(w,"__wrapped__"),F=D&&v.call(S,"__wrapped__");if(z||F){var R=z?w.value():w,M=F?S.value():S;return E||(E=new e),k(R,M,j,_,E)}}return q?(E||(E=new e),r(w,S,j,_,k,E)):!1}return Tw=b,Tw}var Ow,TI;function YU(){if(TI)return Ow;TI=1;var e=yye(),t=wi();function n(r,a,i,s,l){return r===a?!0:r==null||a==null||!t(r)&&!t(a)?r!==r&&a!==a:e(r,a,i,s,n,l)}return Ow=n,Ow}var Mw,OI;function xye(){if(OI)return Mw;OI=1;var e=mv(),t=YU(),n=1,r=2;function a(i,s,l,c){var d=l.length,h=d,m=!c;if(i==null)return!h;for(i=Object(i);d--;){var g=l[d];if(m&&g[2]?g[1]!==i[g[0]]:!(g[0]in i))return!1}for(;++d<h;){g=l[d];var v=g[0],b=i[v],w=g[1];if(m&&g[2]){if(b===void 0&&!(v in i))return!1}else{var S=new e;if(c)var j=c(b,w,v,i,s,S);if(!(j===void 0?t(w,b,n|r,c,S):j))return!1}}return!0}return Mw=a,Mw}var Pw,MI;function XU(){if(MI)return Pw;MI=1;var e=xa();function t(n){return n===n&&!e(n)}return Pw=t,Pw}var Dw,PI;function bye(){if(PI)return Dw;PI=1;var e=XU(),t=uo();function n(r){for(var a=t(r),i=a.length;i--;){var s=a[i],l=r[s];a[i]=[s,l,e(l)]}return a}return Dw=n,Dw}var Rw,DI;function ZU(){if(DI)return Rw;DI=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return Rw=e,Rw}var Iw,RI;function wye(){if(RI)return Iw;RI=1;var e=xye(),t=bye(),n=ZU();function r(a){var i=t(a);return i.length==1&&i[0][2]?n(i[0][0],i[0][1]):function(s){return s===a||e(s,a,i)}}return Iw=r,Iw}var Lw,II;function mc(){if(II)return Lw;II=1;var e=wl(),t=wi(),n="[object Symbol]";function r(a){return typeof a=="symbol"||t(a)&&e(a)==n}return Lw=r,Lw}var zw,LI;function ZN(){if(LI)return zw;LI=1;var e=In(),t=mc(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function a(i,s){if(e(i))return!1;var l=typeof i;return l=="number"||l=="symbol"||l=="boolean"||i==null||t(i)?!0:r.test(i)||!n.test(i)||s!=null&&i in Object(s)}return zw=a,zw}var $w,zI;function Sye(){if(zI)return $w;zI=1;var e=$N(),t="Expected a function";function n(r,a){if(typeof r!="function"||a!=null&&typeof a!="function")throw new TypeError(t);var i=function(){var s=arguments,l=a?a.apply(this,s):s[0],c=i.cache;if(c.has(l))return c.get(l);var d=r.apply(this,s);return i.cache=c.set(l,d)||c,d};return i.cache=new(n.Cache||e),i}return n.Cache=e,$w=n,$w}var qw,$I;function jye(){if($I)return qw;$I=1;var e=Sye(),t=500;function n(r){var a=e(r,function(s){return i.size===t&&i.clear(),s}),i=a.cache;return a}return qw=n,qw}var Bw,qI;function kye(){if(qI)return Bw;qI=1;var e=jye(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(a){var i=[];return a.charCodeAt(0)===46&&i.push(""),a.replace(t,function(s,l,c,d){i.push(c?d.replace(n,"$1"):l||s)}),i});return Bw=r,Bw}var Fw,BI;function Sv(){if(BI)return Fw;BI=1;function e(t,n){for(var r=-1,a=t==null?0:t.length,i=Array(a);++r<a;)i[r]=n(t[r],r,t);return i}return Fw=e,Fw}var Hw,FI;function _ye(){if(FI)return Hw;FI=1;var e=dc(),t=Sv(),n=In(),r=mc(),a=e?e.prototype:void 0,i=a?a.toString:void 0;function s(l){if(typeof l=="string")return l;if(n(l))return t(l,s)+"";if(r(l))return i?i.call(l):"";var c=l+"";return c=="0"&&1/l==-1/0?"-0":c}return Hw=s,Hw}var Uw,HI;function QU(){if(HI)return Uw;HI=1;var e=_ye();function t(n){return n==null?"":e(n)}return Uw=t,Uw}var Gw,UI;function jv(){if(UI)return Gw;UI=1;var e=In(),t=ZN(),n=kye(),r=QU();function a(i,s){return e(i)?i:t(i,s)?[i]:n(r(i))}return Gw=a,Gw}var Vw,GI;function Wf(){if(GI)return Vw;GI=1;var e=mc();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return Vw=t,Vw}var Kw,VI;function kv(){if(VI)return Kw;VI=1;var e=jv(),t=Wf();function n(r,a){a=e(a,r);for(var i=0,s=a.length;r!=null&&i<s;)r=r[t(a[i++])];return i&&i==s?r:void 0}return Kw=n,Kw}var Ww,KI;function Cye(){if(KI)return Ww;KI=1;var e=kv();function t(n,r,a){var i=n==null?void 0:e(n,r);return i===void 0?a:i}return Ww=t,Ww}var Yw,WI;function Nye(){if(WI)return Yw;WI=1;function e(t,n){return t!=null&&n in Object(t)}return Yw=e,Yw}var Xw,YI;function JU(){if(YI)return Xw;YI=1;var e=jv(),t=Vf(),n=In(),r=vv(),a=BN(),i=Wf();function s(l,c,d){c=e(c,l);for(var h=-1,m=c.length,g=!1;++h<m;){var v=i(c[h]);if(!(g=l!=null&&d(l,v)))break;l=l[v]}return g||++h!=m?g:(m=l==null?0:l.length,!!m&&a(m)&&r(v,m)&&(n(l)||t(l)))}return Xw=s,Xw}var Zw,XI;function e7(){if(XI)return Zw;XI=1;var e=Nye(),t=JU();function n(r,a){return r!=null&&t(r,a,e)}return Zw=n,Zw}var Qw,ZI;function Eye(){if(ZI)return Qw;ZI=1;var e=YU(),t=Cye(),n=e7(),r=ZN(),a=XU(),i=ZU(),s=Wf(),l=1,c=2;function d(h,m){return r(h)&&a(m)?i(s(h),m):function(g){var v=t(g,h);return v===void 0&&v===m?n(g,h):e(m,v,l|c)}}return Qw=d,Qw}var Jw,QI;function t7(){if(QI)return Jw;QI=1;function e(t){return function(n){return n==null?void 0:n[t]}}return Jw=e,Jw}var eS,JI;function Aye(){if(JI)return eS;JI=1;var e=kv();function t(n){return function(r){return e(r,n)}}return eS=t,eS}var tS,e4;function Tye(){if(e4)return tS;e4=1;var e=t7(),t=Aye(),n=ZN(),r=Wf();function a(i){return n(i)?e(r(i)):t(i)}return tS=a,tS}var nS,t4;function cs(){if(t4)return nS;t4=1;var e=wye(),t=Eye(),n=kl(),r=In(),a=Tye();function i(s){return typeof s=="function"?s:s==null?n:typeof s=="object"?r(s)?t(s[0],s[1]):e(s):a(s)}return nS=i,nS}var rS,n4;function n7(){if(n4)return rS;n4=1;var e=MU(),t=dye(),n=cs(),r=In();function a(i,s){var l=r(i)?e:t;return l(i,n(s,3))}return rS=a,rS}var aS,r4;function Oye(){if(r4)return aS;r4=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r,a){return r!=null&&t.call(r,a)}return aS=n,aS}var iS,a4;function r7(){if(a4)return iS;a4=1;var e=Oye(),t=JU();function n(r,a){return r!=null&&t(r,a,e)}return iS=n,iS}var sS,i4;function Mye(){if(i4)return sS;i4=1;var e=HN(),t=hc(),n=Vf(),r=In(),a=us(),i=fc(),s=xv(),l=Kf(),c="[object Map]",d="[object Set]",h=Object.prototype,m=h.hasOwnProperty;function g(v){if(v==null)return!0;if(a(v)&&(r(v)||typeof v=="string"||typeof v.splice=="function"||i(v)||l(v)||n(v)))return!v.length;var b=t(v);if(b==c||b==d)return!v.size;if(s(v))return!e(v).length;for(var w in v)if(m.call(v,w))return!1;return!0}return sS=g,sS}var oS,s4;function a7(){if(s4)return oS;s4=1;function e(t){return t===void 0}return oS=e,oS}var lS,o4;function i7(){if(o4)return lS;o4=1;var e=wv(),t=us();function n(r,a){var i=-1,s=t(r)?Array(r.length):[];return e(r,function(l,c,d){s[++i]=a(l,c,d)}),s}return lS=n,lS}var uS,l4;function s7(){if(l4)return uS;l4=1;var e=Sv(),t=cs(),n=i7(),r=In();function a(i,s){var l=r(i)?e:n;return l(i,t(s,3))}return uS=a,uS}var cS,u4;function Pye(){if(u4)return cS;u4=1;function e(t,n,r,a){var i=-1,s=t==null?0:t.length;for(a&&s&&(r=t[++i]);++i<s;)r=n(r,t[i],i,t);return r}return cS=e,cS}var dS,c4;function Dye(){if(c4)return dS;c4=1;function e(t,n,r,a,i){return i(t,function(s,l,c){r=a?(a=!1,s):n(r,s,l,c)}),r}return dS=e,dS}var fS,d4;function o7(){if(d4)return fS;d4=1;var e=Pye(),t=wv(),n=cs(),r=Dye(),a=In();function i(s,l,c){var d=a(s)?e:r,h=arguments.length<3;return d(s,n(l,4),c,h,t)}return fS=i,fS}var hS,f4;function Rye(){if(f4)return hS;f4=1;var e=wl(),t=In(),n=wi(),r="[object String]";function a(i){return typeof i=="string"||!t(i)&&n(i)&&e(i)==r}return hS=a,hS}var mS,h4;function Iye(){if(h4)return mS;h4=1;var e=t7(),t=e("length");return mS=t,mS}var pS,m4;function Lye(){if(m4)return pS;m4=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",a=t+n+r,i="\\ufe0e\\ufe0f",s="\\u200d",l=RegExp("["+s+e+a+i+"]");function c(d){return l.test(d)}return pS=c,pS}var gS,p4;function zye(){if(p4)return gS;p4=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",a=t+n+r,i="\\ufe0e\\ufe0f",s="["+e+"]",l="["+a+"]",c="\\ud83c[\\udffb-\\udfff]",d="(?:"+l+"|"+c+")",h="[^"+e+"]",m="(?:\\ud83c[\\udde6-\\uddff]){2}",g="[\\ud800-\\udbff][\\udc00-\\udfff]",v="\\u200d",b=d+"?",w="["+i+"]?",S="(?:"+v+"(?:"+[h,m,g].join("|")+")"+w+b+")*",j=w+b+S,_="(?:"+[h+l+"?",l,m,g,s].join("|")+")",k=RegExp(c+"(?="+c+")|"+_+j,"g");function E(T){for(var A=k.lastIndex=0;k.test(T);)++A;return A}return gS=E,gS}var vS,g4;function $ye(){if(g4)return vS;g4=1;var e=Iye(),t=Lye(),n=zye();function r(a){return t(a)?n(a):e(a)}return vS=r,vS}var yS,v4;function qye(){if(v4)return yS;v4=1;var e=HN(),t=hc(),n=us(),r=Rye(),a=$ye(),i="[object Map]",s="[object Set]";function l(c){if(c==null)return 0;if(n(c))return r(c)?a(c):c.length;var d=t(c);return d==i||d==s?c.size:e(c).length}return yS=l,yS}var xS,y4;function Bye(){if(y4)return xS;y4=1;var e=qN(),t=qU(),n=YN(),r=cs(),a=bv(),i=In(),s=fc(),l=Uf(),c=xa(),d=Kf();function h(m,g,v){var b=i(m),w=b||s(m)||d(m);if(g=r(g,4),v==null){var S=m&&m.constructor;w?v=b?new S:[]:c(m)?v=l(S)?t(a(m)):{}:v={}}return(w?e:n)(m,function(j,_,k){return g(v,j,_,k)}),v}return xS=h,xS}var bS,x4;function Fye(){if(x4)return bS;x4=1;var e=dc(),t=Vf(),n=In(),r=e?e.isConcatSpreadable:void 0;function a(i){return n(i)||t(i)||!!(r&&i&&i[r])}return bS=a,bS}var wS,b4;function QN(){if(b4)return wS;b4=1;var e=GN(),t=Fye();function n(r,a,i,s,l){var c=-1,d=r.length;for(i||(i=t),l||(l=[]);++c<d;){var h=r[c];a>0&&i(h)?a>1?n(h,a-1,i,s,l):e(l,h):s||(l[l.length]=h)}return l}return wS=n,wS}var SS,w4;function Hye(){if(w4)return SS;w4=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return SS=e,SS}var jS,S4;function l7(){if(S4)return jS;S4=1;var e=Hye(),t=Math.max;function n(r,a,i){return a=t(a===void 0?r.length-1:a,0),function(){for(var s=arguments,l=-1,c=t(s.length-a,0),d=Array(c);++l<c;)d[l]=s[a+l];l=-1;for(var h=Array(a+1);++l<a;)h[l]=s[l];return h[a]=i(d),e(r,this,h)}}return jS=n,jS}var kS,j4;function Uye(){if(j4)return kS;j4=1;var e=KN(),t=NU(),n=kl(),r=t?function(a,i){return t(a,"toString",{configurable:!0,enumerable:!1,value:e(i),writable:!0})}:n;return kS=r,kS}var _S,k4;function Gye(){if(k4)return _S;k4=1;var e=800,t=16,n=Date.now;function r(a){var i=0,s=0;return function(){var l=n(),c=t-(l-s);if(s=l,c>0){if(++i>=e)return arguments[0]}else i=0;return a.apply(void 0,arguments)}}return _S=r,_S}var CS,_4;function u7(){if(_4)return CS;_4=1;var e=Uye(),t=Gye(),n=t(e);return CS=n,CS}var NS,C4;function _v(){if(C4)return NS;C4=1;var e=kl(),t=l7(),n=u7();function r(a,i){return n(t(a,i,e),a+"")}return NS=r,NS}var ES,N4;function c7(){if(N4)return ES;N4=1;function e(t,n,r,a){for(var i=t.length,s=r+(a?1:-1);a?s--:++s<i;)if(n(t[s],s,t))return s;return-1}return ES=e,ES}var AS,E4;function Vye(){if(E4)return AS;E4=1;function e(t){return t!==t}return AS=e,AS}var TS,A4;function Kye(){if(A4)return TS;A4=1;function e(t,n,r){for(var a=r-1,i=t.length;++a<i;)if(t[a]===n)return a;return-1}return TS=e,TS}var OS,T4;function Wye(){if(T4)return OS;T4=1;var e=c7(),t=Vye(),n=Kye();function r(a,i,s){return i===i?n(a,i,s):e(a,t,s)}return OS=r,OS}var MS,O4;function Yye(){if(O4)return MS;O4=1;var e=Wye();function t(n,r){var a=n==null?0:n.length;return!!a&&e(n,r,0)>-1}return MS=t,MS}var PS,M4;function Xye(){if(M4)return PS;M4=1;function e(t,n,r){for(var a=-1,i=t==null?0:t.length;++a<i;)if(r(n,t[a]))return!0;return!1}return PS=e,PS}var DS,P4;function Zye(){if(P4)return DS;P4=1;function e(){}return DS=e,DS}var RS,D4;function Qye(){if(D4)return RS;D4=1;var e=LU(),t=Zye(),n=XN(),r=1/0,a=e&&1/n(new e([,-0]))[1]==r?function(i){return new e(i)}:t;return RS=a,RS}var IS,R4;function Jye(){if(R4)return IS;R4=1;var e=VU(),t=Yye(),n=Xye(),r=KU(),a=Qye(),i=XN(),s=200;function l(c,d,h){var m=-1,g=t,v=c.length,b=!0,w=[],S=w;if(h)b=!1,g=n;else if(v>=s){var j=d?null:a(c);if(j)return i(j);b=!1,g=r,S=new e}else S=d?[]:w;e:for(;++m<v;){var _=c[m],k=d?d(_):_;if(_=h||_!==0?_:0,b&&k===k){for(var E=S.length;E--;)if(S[E]===k)continue e;d&&S.push(k),w.push(_)}else g(S,k,h)||(S!==w&&S.push(k),w.push(_))}return w}return IS=l,IS}var LS,I4;function d7(){if(I4)return LS;I4=1;var e=us(),t=wi();function n(r){return t(r)&&e(r)}return LS=n,LS}var zS,L4;function exe(){if(L4)return zS;L4=1;var e=QN(),t=_v(),n=Jye(),r=d7(),a=t(function(i){return n(e(i,1,r,!0))});return zS=a,zS}var $S,z4;function txe(){if(z4)return $S;z4=1;var e=Sv();function t(n,r){return e(r,function(a){return n[a]})}return $S=t,$S}var qS,$4;function f7(){if($4)return qS;$4=1;var e=txe(),t=uo();function n(r){return r==null?[]:e(r,t(r))}return qS=n,qS}var BS,q4;function ba(){if(q4)return BS;q4=1;var e;if(typeof LN=="function")try{e={clone:lye(),constant:KN(),each:GU(),filter:n7(),has:r7(),isArray:In(),isEmpty:Mye(),isFunction:Uf(),isUndefined:a7(),keys:uo(),map:s7(),reduce:o7(),size:qye(),transform:Bye(),union:exe(),values:f7()}}catch{}return e||(e=window._),BS=e,BS}var FS,B4;function JN(){if(B4)return FS;B4=1;var e=ba();FS=a;var t="\0",n="\0",r="";function a(h){this._isDirected=e.has(h,"directed")?h.directed:!0,this._isMultigraph=e.has(h,"multigraph")?h.multigraph:!1,this._isCompound=e.has(h,"compound")?h.compound:!1,this._label=void 0,this._defaultNodeLabelFn=e.constant(void 0),this._defaultEdgeLabelFn=e.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[n]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}a.prototype._nodeCount=0,a.prototype._edgeCount=0,a.prototype.isDirected=function(){return this._isDirected},a.prototype.isMultigraph=function(){return this._isMultigraph},a.prototype.isCompound=function(){return this._isCompound},a.prototype.setGraph=function(h){return this._label=h,this},a.prototype.graph=function(){return this._label},a.prototype.setDefaultNodeLabel=function(h){return e.isFunction(h)||(h=e.constant(h)),this._defaultNodeLabelFn=h,this},a.prototype.nodeCount=function(){return this._nodeCount},a.prototype.nodes=function(){return e.keys(this._nodes)},a.prototype.sources=function(){var h=this;return e.filter(this.nodes(),function(m){return e.isEmpty(h._in[m])})},a.prototype.sinks=function(){var h=this;return e.filter(this.nodes(),function(m){return e.isEmpty(h._out[m])})},a.prototype.setNodes=function(h,m){var g=arguments,v=this;return e.each(h,function(b){g.length>1?v.setNode(b,m):v.setNode(b)}),this},a.prototype.setNode=function(h,m){return e.has(this._nodes,h)?(arguments.length>1&&(this._nodes[h]=m),this):(this._nodes[h]=arguments.length>1?m:this._defaultNodeLabelFn(h),this._isCompound&&(this._parent[h]=n,this._children[h]={},this._children[n][h]=!0),this._in[h]={},this._preds[h]={},this._out[h]={},this._sucs[h]={},++this._nodeCount,this)},a.prototype.node=function(h){return this._nodes[h]},a.prototype.hasNode=function(h){return e.has(this._nodes,h)},a.prototype.removeNode=function(h){var m=this;if(e.has(this._nodes,h)){var g=function(v){m.removeEdge(m._edgeObjs[v])};delete this._nodes[h],this._isCompound&&(this._removeFromParentsChildList(h),delete this._parent[h],e.each(this.children(h),function(v){m.setParent(v)}),delete this._children[h]),e.each(e.keys(this._in[h]),g),delete this._in[h],delete this._preds[h],e.each(e.keys(this._out[h]),g),delete this._out[h],delete this._sucs[h],--this._nodeCount}return this},a.prototype.setParent=function(h,m){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(m))m=n;else{m+="";for(var g=m;!e.isUndefined(g);g=this.parent(g))if(g===h)throw new Error("Setting "+m+" as parent of "+h+" would create a cycle");this.setNode(m)}return this.setNode(h),this._removeFromParentsChildList(h),this._parent[h]=m,this._children[m][h]=!0,this},a.prototype._removeFromParentsChildList=function(h){delete this._children[this._parent[h]][h]},a.prototype.parent=function(h){if(this._isCompound){var m=this._parent[h];if(m!==n)return m}},a.prototype.children=function(h){if(e.isUndefined(h)&&(h=n),this._isCompound){var m=this._children[h];if(m)return e.keys(m)}else{if(h===n)return this.nodes();if(this.hasNode(h))return[]}},a.prototype.predecessors=function(h){var m=this._preds[h];if(m)return e.keys(m)},a.prototype.successors=function(h){var m=this._sucs[h];if(m)return e.keys(m)},a.prototype.neighbors=function(h){var m=this.predecessors(h);if(m)return e.union(m,this.successors(h))},a.prototype.isLeaf=function(h){var m;return this.isDirected()?m=this.successors(h):m=this.neighbors(h),m.length===0},a.prototype.filterNodes=function(h){var m=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});m.setGraph(this.graph());var g=this;e.each(this._nodes,function(w,S){h(S)&&m.setNode(S,w)}),e.each(this._edgeObjs,function(w){m.hasNode(w.v)&&m.hasNode(w.w)&&m.setEdge(w,g.edge(w))});var v={};function b(w){var S=g.parent(w);return S===void 0||m.hasNode(S)?(v[w]=S,S):S in v?v[S]:b(S)}return this._isCompound&&e.each(m.nodes(),function(w){m.setParent(w,b(w))}),m},a.prototype.setDefaultEdgeLabel=function(h){return e.isFunction(h)||(h=e.constant(h)),this._defaultEdgeLabelFn=h,this},a.prototype.edgeCount=function(){return this._edgeCount},a.prototype.edges=function(){return e.values(this._edgeObjs)},a.prototype.setPath=function(h,m){var g=this,v=arguments;return e.reduce(h,function(b,w){return v.length>1?g.setEdge(b,w,m):g.setEdge(b,w),w}),this},a.prototype.setEdge=function(){var h,m,g,v,b=!1,w=arguments[0];typeof w=="object"&&w!==null&&"v"in w?(h=w.v,m=w.w,g=w.name,arguments.length===2&&(v=arguments[1],b=!0)):(h=w,m=arguments[1],g=arguments[3],arguments.length>2&&(v=arguments[2],b=!0)),h=""+h,m=""+m,e.isUndefined(g)||(g=""+g);var S=l(this._isDirected,h,m,g);if(e.has(this._edgeLabels,S))return b&&(this._edgeLabels[S]=v),this;if(!e.isUndefined(g)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(h),this.setNode(m),this._edgeLabels[S]=b?v:this._defaultEdgeLabelFn(h,m,g);var j=c(this._isDirected,h,m,g);return h=j.v,m=j.w,Object.freeze(j),this._edgeObjs[S]=j,i(this._preds[m],h),i(this._sucs[h],m),this._in[m][S]=j,this._out[h][S]=j,this._edgeCount++,this},a.prototype.edge=function(h,m,g){var v=arguments.length===1?d(this._isDirected,arguments[0]):l(this._isDirected,h,m,g);return this._edgeLabels[v]},a.prototype.hasEdge=function(h,m,g){var v=arguments.length===1?d(this._isDirected,arguments[0]):l(this._isDirected,h,m,g);return e.has(this._edgeLabels,v)},a.prototype.removeEdge=function(h,m,g){var v=arguments.length===1?d(this._isDirected,arguments[0]):l(this._isDirected,h,m,g),b=this._edgeObjs[v];return b&&(h=b.v,m=b.w,delete this._edgeLabels[v],delete this._edgeObjs[v],s(this._preds[m],h),s(this._sucs[h],m),delete this._in[m][v],delete this._out[h][v],this._edgeCount--),this},a.prototype.inEdges=function(h,m){var g=this._in[h];if(g){var v=e.values(g);return m?e.filter(v,function(b){return b.v===m}):v}},a.prototype.outEdges=function(h,m){var g=this._out[h];if(g){var v=e.values(g);return m?e.filter(v,function(b){return b.w===m}):v}},a.prototype.nodeEdges=function(h,m){var g=this.inEdges(h,m);if(g)return g.concat(this.outEdges(h,m))};function i(h,m){h[m]?h[m]++:h[m]=1}function s(h,m){--h[m]||delete h[m]}function l(h,m,g,v){var b=""+m,w=""+g;if(!h&&b>w){var S=b;b=w,w=S}return b+r+w+r+(e.isUndefined(v)?t:v)}function c(h,m,g,v){var b=""+m,w=""+g;if(!h&&b>w){var S=b;b=w,w=S}var j={v:b,w};return v&&(j.name=v),j}function d(h,m){return l(h,m.v,m.w,m.name)}return FS}var HS,F4;function nxe(){return F4||(F4=1,HS="2.1.8"),HS}var US,H4;function rxe(){return H4||(H4=1,US={Graph:JN(),version:nxe()}),US}var GS,U4;function axe(){if(U4)return GS;U4=1;var e=ba(),t=JN();GS={write:n,read:i};function n(s){var l={options:{directed:s.isDirected(),multigraph:s.isMultigraph(),compound:s.isCompound()},nodes:r(s),edges:a(s)};return e.isUndefined(s.graph())||(l.value=e.clone(s.graph())),l}function r(s){return e.map(s.nodes(),function(l){var c=s.node(l),d=s.parent(l),h={v:l};return e.isUndefined(c)||(h.value=c),e.isUndefined(d)||(h.parent=d),h})}function a(s){return e.map(s.edges(),function(l){var c=s.edge(l),d={v:l.v,w:l.w};return e.isUndefined(l.name)||(d.name=l.name),e.isUndefined(c)||(d.value=c),d})}function i(s){var l=new t(s.options).setGraph(s.value);return e.each(s.nodes,function(c){l.setNode(c.v,c.value),c.parent&&l.setParent(c.v,c.parent)}),e.each(s.edges,function(c){l.setEdge({v:c.v,w:c.w,name:c.name},c.value)}),l}return GS}var VS,G4;function ixe(){if(G4)return VS;G4=1;var e=ba();VS=t;function t(n){var r={},a=[],i;function s(l){e.has(r,l)||(r[l]=!0,i.push(l),e.each(n.successors(l),s),e.each(n.predecessors(l),s))}return e.each(n.nodes(),function(l){i=[],s(l),i.length&&a.push(i)}),a}return VS}var KS,V4;function h7(){if(V4)return KS;V4=1;var e=ba();KS=t;function t(){this._arr=[],this._keyIndices={}}return t.prototype.size=function(){return this._arr.length},t.prototype.keys=function(){return this._arr.map(function(n){return n.key})},t.prototype.has=function(n){return e.has(this._keyIndices,n)},t.prototype.priority=function(n){var r=this._keyIndices[n];if(r!==void 0)return this._arr[r].priority},t.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},t.prototype.add=function(n,r){var a=this._keyIndices;if(n=String(n),!e.has(a,n)){var i=this._arr,s=i.length;return a[n]=s,i.push({key:n,priority:r}),this._decrease(s),!0}return!1},t.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var n=this._arr.pop();return delete this._keyIndices[n.key],this._heapify(0),n.key},t.prototype.decrease=function(n,r){var a=this._keyIndices[n];if(r>this._arr[a].priority)throw new Error("New priority is greater than current priority. Key: "+n+" Old: "+this._arr[a].priority+" New: "+r);this._arr[a].priority=r,this._decrease(a)},t.prototype._heapify=function(n){var r=this._arr,a=2*n,i=a+1,s=n;a<r.length&&(s=r[a].priority<r[s].priority?a:s,i<r.length&&(s=r[i].priority<r[s].priority?i:s),s!==n&&(this._swap(n,s),this._heapify(s)))},t.prototype._decrease=function(n){for(var r=this._arr,a=r[n].priority,i;n!==0&&(i=n>>1,!(r[i].priority<a));)this._swap(n,i),n=i},t.prototype._swap=function(n,r){var a=this._arr,i=this._keyIndices,s=a[n],l=a[r];a[n]=l,a[r]=s,i[l.key]=n,i[s.key]=r},KS}var WS,K4;function m7(){if(K4)return WS;K4=1;var e=ba(),t=h7();WS=r;var n=e.constant(1);function r(i,s,l,c){return a(i,String(s),l||n,c||function(d){return i.outEdges(d)})}function a(i,s,l,c){var d={},h=new t,m,g,v=function(b){var w=b.v!==m?b.v:b.w,S=d[w],j=l(b),_=g.distance+j;if(j<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+b+" Weight: "+j);_<S.distance&&(S.distance=_,S.predecessor=m,h.decrease(w,_))};for(i.nodes().forEach(function(b){var w=b===s?0:Number.POSITIVE_INFINITY;d[b]={distance:w},h.add(b,w)});h.size()>0&&(m=h.removeMin(),g=d[m],g.distance!==Number.POSITIVE_INFINITY);)c(m).forEach(v);return d}return WS}var YS,W4;function sxe(){if(W4)return YS;W4=1;var e=m7(),t=ba();YS=n;function n(r,a,i){return t.transform(r.nodes(),function(s,l){s[l]=e(r,l,a,i)},{})}return YS}var XS,Y4;function p7(){if(Y4)return XS;Y4=1;var e=ba();XS=t;function t(n){var r=0,a=[],i={},s=[];function l(c){var d=i[c]={onStack:!0,lowlink:r,index:r++};if(a.push(c),n.successors(c).forEach(function(g){e.has(i,g)?i[g].onStack&&(d.lowlink=Math.min(d.lowlink,i[g].index)):(l(g),d.lowlink=Math.min(d.lowlink,i[g].lowlink))}),d.lowlink===d.index){var h=[],m;do m=a.pop(),i[m].onStack=!1,h.push(m);while(c!==m);s.push(h)}}return n.nodes().forEach(function(c){e.has(i,c)||l(c)}),s}return XS}var ZS,X4;function oxe(){if(X4)return ZS;X4=1;var e=ba(),t=p7();ZS=n;function n(r){return e.filter(t(r),function(a){return a.length>1||a.length===1&&r.hasEdge(a[0],a[0])})}return ZS}var QS,Z4;function lxe(){if(Z4)return QS;Z4=1;var e=ba();QS=n;var t=e.constant(1);function n(a,i,s){return r(a,i||t,s||function(l){return a.outEdges(l)})}function r(a,i,s){var l={},c=a.nodes();return c.forEach(function(d){l[d]={},l[d][d]={distance:0},c.forEach(function(h){d!==h&&(l[d][h]={distance:Number.POSITIVE_INFINITY})}),s(d).forEach(function(h){var m=h.v===d?h.w:h.v,g=i(h);l[d][m]={distance:g,predecessor:d}})}),c.forEach(function(d){var h=l[d];c.forEach(function(m){var g=l[m];c.forEach(function(v){var b=g[d],w=h[v],S=g[v],j=b.distance+w.distance;j<S.distance&&(S.distance=j,S.predecessor=w.predecessor)})})}),l}return QS}var JS,Q4;function g7(){if(Q4)return JS;Q4=1;var e=ba();JS=t,t.CycleException=n;function t(r){var a={},i={},s=[];function l(c){if(e.has(i,c))throw new n;e.has(a,c)||(i[c]=!0,a[c]=!0,e.each(r.predecessors(c),l),delete i[c],s.push(c))}if(e.each(r.sinks(),l),e.size(a)!==r.nodeCount())throw new n;return s}function n(){}return n.prototype=new Error,JS}var ej,J4;function uxe(){if(J4)return ej;J4=1;var e=g7();ej=t;function t(n){try{e(n)}catch(r){if(r instanceof e.CycleException)return!1;throw r}return!0}return ej}var tj,eL;function v7(){if(eL)return tj;eL=1;var e=ba();tj=t;function t(r,a,i){e.isArray(a)||(a=[a]);var s=(r.isDirected()?r.successors:r.neighbors).bind(r),l=[],c={};return e.each(a,function(d){if(!r.hasNode(d))throw new Error("Graph does not have node: "+d);n(r,d,i==="post",c,s,l)}),l}function n(r,a,i,s,l,c){e.has(s,a)||(s[a]=!0,i||c.push(a),e.each(l(a),function(d){n(r,d,i,s,l,c)}),i&&c.push(a))}return tj}var nj,tL;function cxe(){if(tL)return nj;tL=1;var e=v7();nj=t;function t(n,r){return e(n,r,"post")}return nj}var rj,nL;function dxe(){if(nL)return rj;nL=1;var e=v7();rj=t;function t(n,r){return e(n,r,"pre")}return rj}var aj,rL;function fxe(){if(rL)return aj;rL=1;var e=ba(),t=JN(),n=h7();aj=r;function r(a,i){var s=new t,l={},c=new n,d;function h(g){var v=g.v===d?g.w:g.v,b=c.priority(v);if(b!==void 0){var w=i(g);w<b&&(l[v]=d,c.decrease(v,w))}}if(a.nodeCount()===0)return s;e.each(a.nodes(),function(g){c.add(g,Number.POSITIVE_INFINITY),s.setNode(g)}),c.decrease(a.nodes()[0],0);for(var m=!1;c.size()>0;){if(d=c.removeMin(),e.has(l,d))s.setEdge(d,l[d]);else{if(m)throw new Error("Input graph is not connected: "+a);m=!0}a.nodeEdges(d).forEach(h)}return s}return aj}var ij,aL;function hxe(){return aL||(aL=1,ij={components:ixe(),dijkstra:m7(),dijkstraAll:sxe(),findCycles:oxe(),floydWarshall:lxe(),isAcyclic:uxe(),postorder:cxe(),preorder:dxe(),prim:fxe(),tarjan:p7(),topsort:g7()}),ij}var sj,iL;function mxe(){if(iL)return sj;iL=1;var e=rxe();return sj={Graph:e.Graph,json:axe(),alg:hxe(),version:e.version},sj}var oj,sL;function La(){if(sL)return oj;sL=1;var e;if(typeof LN=="function")try{e=mxe()}catch{}return e||(e=window.graphlib),oj=e,oj}var lj,oL;function pxe(){if(oL)return lj;oL=1;var e=FU(),t=1,n=4;function r(a){return e(a,t|n)}return lj=r,lj}var uj,lL;function Cv(){if(lL)return uj;lL=1;var e=cc(),t=us(),n=vv(),r=xa();function a(i,s,l){if(!r(l))return!1;var c=typeof s;return(c=="number"?t(l)&&n(s,l.length):c=="string"&&s in l)?e(l[s],i):!1}return uj=a,uj}var cj,uL;function gxe(){if(uL)return cj;uL=1;var e=_v(),t=cc(),n=Cv(),r=jl(),a=Object.prototype,i=a.hasOwnProperty,s=e(function(l,c){l=Object(l);var d=-1,h=c.length,m=h>2?c[2]:void 0;for(m&&n(c[0],c[1],m)&&(h=1);++d<h;)for(var g=c[d],v=r(g),b=-1,w=v.length;++b<w;){var S=v[b],j=l[S];(j===void 0||t(j,a[S])&&!i.call(l,S))&&(l[S]=g[S])}return l});return cj=s,cj}var dj,cL;function vxe(){if(cL)return dj;cL=1;var e=cs(),t=us(),n=uo();function r(a){return function(i,s,l){var c=Object(i);if(!t(i)){var d=e(s,3);i=n(i),s=function(m){return d(c[m],m,c)}}var h=a(i,s,l);return h>-1?c[d?i[h]:h]:void 0}}return dj=r,dj}var fj,dL;function yxe(){if(dL)return fj;dL=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return fj=t,fj}var hj,fL;function xxe(){if(fL)return hj;fL=1;var e=yxe(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return hj=n,hj}var mj,hL;function bxe(){if(hL)return mj;hL=1;var e=xxe(),t=xa(),n=mc(),r=NaN,a=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,s=/^0o[0-7]+$/i,l=parseInt;function c(d){if(typeof d=="number")return d;if(n(d))return r;if(t(d)){var h=typeof d.valueOf=="function"?d.valueOf():d;d=t(h)?h+"":h}if(typeof d!="string")return d===0?d:+d;d=e(d);var m=i.test(d);return m||s.test(d)?l(d.slice(2),m?2:8):a.test(d)?r:+d}return mj=c,mj}var pj,mL;function y7(){if(mL)return pj;mL=1;var e=bxe(),t=1/0,n=17976931348623157e292;function r(a){if(!a)return a===0?a:0;if(a=e(a),a===t||a===-t){var i=a<0?-1:1;return i*n}return a===a?a:0}return pj=r,pj}var gj,pL;function wxe(){if(pL)return gj;pL=1;var e=y7();function t(n){var r=e(n),a=r%1;return r===r?a?r-a:r:0}return gj=t,gj}var vj,gL;function Sxe(){if(gL)return vj;gL=1;var e=c7(),t=cs(),n=wxe(),r=Math.max;function a(i,s,l){var c=i==null?0:i.length;if(!c)return-1;var d=l==null?0:n(l);return d<0&&(d=r(c+d,0)),e(i,t(s,3),d)}return vj=a,vj}var yj,vL;function jxe(){if(vL)return yj;vL=1;var e=vxe(),t=Sxe(),n=e(t);return yj=n,yj}var xj,yL;function x7(){if(yL)return xj;yL=1;var e=QN();function t(n){var r=n==null?0:n.length;return r?e(n,1):[]}return xj=t,xj}var bj,xL;function kxe(){if(xL)return bj;xL=1;var e=WN(),t=HU(),n=jl();function r(a,i){return a==null?a:e(a,t(i),n)}return bj=r,bj}var wj,bL;function _xe(){if(bL)return wj;bL=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return wj=e,wj}var Sj,wL;function Cxe(){if(wL)return Sj;wL=1;var e=pv(),t=YN(),n=cs();function r(a,i){var s={};return i=n(i,3),t(a,function(l,c,d){e(s,c,i(l,c,d))}),s}return Sj=r,Sj}var jj,SL;function eE(){if(SL)return jj;SL=1;var e=mc();function t(n,r,a){for(var i=-1,s=n.length;++i<s;){var l=n[i],c=r(l);if(c!=null&&(d===void 0?c===c&&!e(c):a(c,d)))var d=c,h=l}return h}return jj=t,jj}var kj,jL;function Nxe(){if(jL)return kj;jL=1;function e(t,n){return t>n}return kj=e,kj}var _j,kL;function Exe(){if(kL)return _j;kL=1;var e=eE(),t=Nxe(),n=kl();function r(a){return a&&a.length?e(a,n,t):void 0}return _j=r,_j}var Cj,_L;function b7(){if(_L)return Cj;_L=1;var e=pv(),t=cc();function n(r,a,i){(i!==void 0&&!t(r[a],i)||i===void 0&&!(a in r))&&e(r,a,i)}return Cj=n,Cj}var Nj,CL;function Axe(){if(CL)return Nj;CL=1;var e=wl(),t=bv(),n=wi(),r="[object Object]",a=Function.prototype,i=Object.prototype,s=a.toString,l=i.hasOwnProperty,c=s.call(Object);function d(h){if(!n(h)||e(h)!=r)return!1;var m=t(h);if(m===null)return!0;var g=l.call(m,"constructor")&&m.constructor;return typeof g=="function"&&g instanceof g&&s.call(g)==c}return Nj=d,Nj}var Ej,NL;function w7(){if(NL)return Ej;NL=1;function e(t,n){if(!(n==="constructor"&&typeof t[n]=="function")&&n!="__proto__")return t[n]}return Ej=e,Ej}var Aj,EL;function Txe(){if(EL)return Aj;EL=1;var e=Gf(),t=jl();function n(r){return e(r,t(r))}return Aj=n,Aj}var Tj,AL;function Oxe(){if(AL)return Tj;AL=1;var e=b7(),t=TU(),n=$U(),r=OU(),a=BU(),i=Vf(),s=In(),l=d7(),c=fc(),d=Uf(),h=xa(),m=Axe(),g=Kf(),v=w7(),b=Txe();function w(S,j,_,k,E,T,A){var O=v(S,_),I=v(j,_),P=A.get(I);if(P){e(S,_,P);return}var D=T?T(O,I,_+"",S,j,A):void 0,q=D===void 0;if(q){var z=s(I),F=!z&&c(I),R=!z&&!F&&g(I);D=I,z||F||R?s(O)?D=O:l(O)?D=r(O):F?(q=!1,D=t(I,!0)):R?(q=!1,D=n(I,!0)):D=[]:m(I)||i(I)?(D=O,i(O)?D=b(O):(!h(O)||d(O))&&(D=a(I))):q=!1}q&&(A.set(I,D),E(D,I,k,T,A),A.delete(I)),e(S,_,D)}return Tj=w,Tj}var Oj,TL;function Mxe(){if(TL)return Oj;TL=1;var e=mv(),t=b7(),n=WN(),r=Oxe(),a=xa(),i=jl(),s=w7();function l(c,d,h,m,g){c!==d&&n(d,function(v,b){if(g||(g=new e),a(v))r(c,d,b,h,l,m,g);else{var w=m?m(s(c,b),v,b+"",c,d,g):void 0;w===void 0&&(w=v),t(c,b,w)}},i)}return Oj=l,Oj}var Mj,OL;function Pxe(){if(OL)return Mj;OL=1;var e=_v(),t=Cv();function n(r){return e(function(a,i){var s=-1,l=i.length,c=l>1?i[l-1]:void 0,d=l>2?i[2]:void 0;for(c=r.length>3&&typeof c=="function"?(l--,c):void 0,d&&t(i[0],i[1],d)&&(c=l<3?void 0:c,l=1),a=Object(a);++s<l;){var h=i[s];h&&r(a,h,s,c)}return a})}return Mj=n,Mj}var Pj,ML;function Dxe(){if(ML)return Pj;ML=1;var e=Mxe(),t=Pxe(),n=t(function(r,a,i){e(r,a,i)});return Pj=n,Pj}var Dj,PL;function S7(){if(PL)return Dj;PL=1;function e(t,n){return t<n}return Dj=e,Dj}var Rj,DL;function Rxe(){if(DL)return Rj;DL=1;var e=eE(),t=S7(),n=kl();function r(a){return a&&a.length?e(a,n,t):void 0}return Rj=r,Rj}var Ij,RL;function Ixe(){if(RL)return Ij;RL=1;var e=eE(),t=cs(),n=S7();function r(a,i){return a&&a.length?e(a,t(i,2),n):void 0}return Ij=r,Ij}var Lj,IL;function Lxe(){if(IL)return Lj;IL=1;var e=Ba(),t=function(){return e.Date.now()};return Lj=t,Lj}var zj,LL;function zxe(){if(LL)return zj;LL=1;var e=gv(),t=jv(),n=vv(),r=xa(),a=Wf();function i(s,l,c,d){if(!r(s))return s;l=t(l,s);for(var h=-1,m=l.length,g=m-1,v=s;v!=null&&++h<m;){var b=a(l[h]),w=c;if(b==="__proto__"||b==="constructor"||b==="prototype")return s;if(h!=g){var S=v[b];w=d?d(S,b,v):void 0,w===void 0&&(w=r(S)?S:n(l[h+1])?[]:{})}e(v,b,w),v=v[b]}return s}return zj=i,zj}var $j,zL;function $xe(){if(zL)return $j;zL=1;var e=kv(),t=zxe(),n=jv();function r(a,i,s){for(var l=-1,c=i.length,d={};++l<c;){var h=i[l],m=e(a,h);s(m,h)&&t(d,n(h,a),m)}return d}return $j=r,$j}var qj,$L;function qxe(){if($L)return qj;$L=1;var e=$xe(),t=e7();function n(r,a){return e(r,a,function(i,s){return t(r,s)})}return qj=n,qj}var Bj,qL;function Bxe(){if(qL)return Bj;qL=1;var e=x7(),t=l7(),n=u7();function r(a){return n(t(a,void 0,e),a+"")}return Bj=r,Bj}var Fj,BL;function Fxe(){if(BL)return Fj;BL=1;var e=qxe(),t=Bxe(),n=t(function(r,a){return r==null?{}:e(r,a)});return Fj=n,Fj}var Hj,FL;function Hxe(){if(FL)return Hj;FL=1;var e=Math.ceil,t=Math.max;function n(r,a,i,s){for(var l=-1,c=t(e((a-r)/(i||1)),0),d=Array(c);c--;)d[s?c:++l]=r,r+=i;return d}return Hj=n,Hj}var Uj,HL;function Uxe(){if(HL)return Uj;HL=1;var e=Hxe(),t=Cv(),n=y7();function r(a){return function(i,s,l){return l&&typeof l!="number"&&t(i,s,l)&&(s=l=void 0),i=n(i),s===void 0?(s=i,i=0):s=n(s),l=l===void 0?i<s?1:-1:n(l),e(i,s,l,a)}}return Uj=r,Uj}var Gj,UL;function Gxe(){if(UL)return Gj;UL=1;var e=Uxe(),t=e();return Gj=t,Gj}var Vj,GL;function Vxe(){if(GL)return Vj;GL=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return Vj=e,Vj}var Kj,VL;function Kxe(){if(VL)return Kj;VL=1;var e=mc();function t(n,r){if(n!==r){var a=n!==void 0,i=n===null,s=n===n,l=e(n),c=r!==void 0,d=r===null,h=r===r,m=e(r);if(!d&&!m&&!l&&n>r||l&&c&&h&&!d&&!m||i&&c&&h||!a&&h||!s)return 1;if(!i&&!l&&!m&&n<r||m&&a&&s&&!i&&!l||d&&a&&s||!c&&s||!h)return-1}return 0}return Kj=t,Kj}var Wj,KL;function Wxe(){if(KL)return Wj;KL=1;var e=Kxe();function t(n,r,a){for(var i=-1,s=n.criteria,l=r.criteria,c=s.length,d=a.length;++i<c;){var h=e(s[i],l[i]);if(h){if(i>=d)return h;var m=a[i];return h*(m=="desc"?-1:1)}}return n.index-r.index}return Wj=t,Wj}var Yj,WL;function Yxe(){if(WL)return Yj;WL=1;var e=Sv(),t=kv(),n=cs(),r=i7(),a=Vxe(),i=yv(),s=Wxe(),l=kl(),c=In();function d(h,m,g){m.length?m=e(m,function(w){return c(w)?function(S){return t(S,w.length===1?w[0]:w)}:w}):m=[l];var v=-1;m=e(m,i(n));var b=r(h,function(w,S,j){var _=e(m,function(k){return k(w)});return{criteria:_,index:++v,value:w}});return a(b,function(w,S){return s(w,S,g)})}return Yj=d,Yj}var Xj,YL;function Xxe(){if(YL)return Xj;YL=1;var e=QN(),t=Yxe(),n=_v(),r=Cv(),a=n(function(i,s){if(i==null)return[];var l=s.length;return l>1&&r(i,s[0],s[1])?s=[]:l>2&&r(s[0],s[1],s[2])&&(s=[s[0]]),t(i,e(s,1),[])});return Xj=a,Xj}var Zj,XL;function Zxe(){if(XL)return Zj;XL=1;var e=QU(),t=0;function n(r){var a=++t;return e(r)+a}return Zj=n,Zj}var Qj,ZL;function Qxe(){if(ZL)return Qj;ZL=1;function e(t,n,r){for(var a=-1,i=t.length,s=n.length,l={};++a<i;){var c=a<s?n[a]:void 0;r(l,t[a],c)}return l}return Qj=e,Qj}var Jj,QL;function Jxe(){if(QL)return Jj;QL=1;var e=gv(),t=Qxe();function n(r,a){return t(r||[],a||[],e)}return Jj=n,Jj}var ek,JL;function fn(){if(JL)return ek;JL=1;var e;if(typeof LN=="function")try{e={cloneDeep:pxe(),constant:KN(),defaults:gxe(),each:GU(),filter:n7(),find:jxe(),flatten:x7(),forEach:UU(),forIn:kxe(),has:r7(),isUndefined:a7(),last:_xe(),map:s7(),mapValues:Cxe(),max:Exe(),merge:Dxe(),min:Rxe(),minBy:Ixe(),now:Lxe(),pick:Fxe(),range:Gxe(),reduce:o7(),sortBy:Xxe(),uniqueId:Zxe(),values:f7(),zipObject:Jxe()}}catch{}return e||(e=window._),ek=e,ek}var tk,ez;function e0e(){if(ez)return tk;ez=1,tk=e;function e(){var r={};r._next=r._prev=r,this._sentinel=r}e.prototype.dequeue=function(){var r=this._sentinel,a=r._prev;if(a!==r)return t(a),a},e.prototype.enqueue=function(r){var a=this._sentinel;r._prev&&r._next&&t(r),r._next=a._next,a._next._prev=r,a._next=r,r._prev=a},e.prototype.toString=function(){for(var r=[],a=this._sentinel,i=a._prev;i!==a;)r.push(JSON.stringify(i,n)),i=i._prev;return"["+r.join(", ")+"]"};function t(r){r._prev._next=r._next,r._next._prev=r._prev,delete r._next,delete r._prev}function n(r,a){if(r!=="_next"&&r!=="_prev")return a}return tk}var nk,tz;function t0e(){if(tz)return nk;tz=1;var e=fn(),t=La().Graph,n=e0e();nk=a;var r=e.constant(1);function a(d,h){if(d.nodeCount()<=1)return[];var m=l(d,h||r),g=i(m.graph,m.buckets,m.zeroIdx);return e.flatten(e.map(g,function(v){return d.outEdges(v.v,v.w)}),!0)}function i(d,h,m){for(var g=[],v=h[h.length-1],b=h[0],w;d.nodeCount();){for(;w=b.dequeue();)s(d,h,m,w);for(;w=v.dequeue();)s(d,h,m,w);if(d.nodeCount()){for(var S=h.length-2;S>0;--S)if(w=h[S].dequeue(),w){g=g.concat(s(d,h,m,w,!0));break}}}return g}function s(d,h,m,g,v){var b=v?[]:void 0;return e.forEach(d.inEdges(g.v),function(w){var S=d.edge(w),j=d.node(w.v);v&&b.push({v:w.v,w:w.w}),j.out-=S,c(h,m,j)}),e.forEach(d.outEdges(g.v),function(w){var S=d.edge(w),j=w.w,_=d.node(j);_.in-=S,c(h,m,_)}),d.removeNode(g.v),b}function l(d,h){var m=new t,g=0,v=0;e.forEach(d.nodes(),function(S){m.setNode(S,{v:S,in:0,out:0})}),e.forEach(d.edges(),function(S){var j=m.edge(S.v,S.w)||0,_=h(S),k=j+_;m.setEdge(S.v,S.w,k),v=Math.max(v,m.node(S.v).out+=_),g=Math.max(g,m.node(S.w).in+=_)});var b=e.range(v+g+3).map(function(){return new n}),w=g+1;return e.forEach(m.nodes(),function(S){c(b,w,m.node(S))}),{graph:m,buckets:b,zeroIdx:w}}function c(d,h,m){m.out?m.in?d[m.out-m.in+h].enqueue(m):d[d.length-1].enqueue(m):d[0].enqueue(m)}return nk}var rk,nz;function n0e(){if(nz)return rk;nz=1;var e=fn(),t=t0e();rk={run:n,undo:a};function n(i){var s=i.graph().acyclicer==="greedy"?t(i,l(i)):r(i);e.forEach(s,function(c){var d=i.edge(c);i.removeEdge(c),d.forwardName=c.name,d.reversed=!0,i.setEdge(c.w,c.v,d,e.uniqueId("rev"))});function l(c){return function(d){return c.edge(d).weight}}}function r(i){var s=[],l={},c={};function d(h){e.has(c,h)||(c[h]=!0,l[h]=!0,e.forEach(i.outEdges(h),function(m){e.has(l,m.w)?s.push(m):d(m.w)}),delete l[h])}return e.forEach(i.nodes(),d),s}function a(i){e.forEach(i.edges(),function(s){var l=i.edge(s);if(l.reversed){i.removeEdge(s);var c=l.forwardName;delete l.reversed,delete l.forwardName,i.setEdge(s.w,s.v,l,c)}})}return rk}var ak,rz;function Or(){if(rz)return ak;rz=1;var e=fn(),t=La().Graph;ak={addDummyNode:n,simplify:r,asNonCompoundGraph:a,successorWeights:i,predecessorWeights:s,intersectRect:l,buildLayerMatrix:c,normalizeRanks:d,removeEmptyRanks:h,addBorderNode:m,maxRank:g,partition:v,time:b,notime:w};function n(S,j,_,k){var E;do E=e.uniqueId(k);while(S.hasNode(E));return _.dummy=j,S.setNode(E,_),E}function r(S){var j=new t().setGraph(S.graph());return e.forEach(S.nodes(),function(_){j.setNode(_,S.node(_))}),e.forEach(S.edges(),function(_){var k=j.edge(_.v,_.w)||{weight:0,minlen:1},E=S.edge(_);j.setEdge(_.v,_.w,{weight:k.weight+E.weight,minlen:Math.max(k.minlen,E.minlen)})}),j}function a(S){var j=new t({multigraph:S.isMultigraph()}).setGraph(S.graph());return e.forEach(S.nodes(),function(_){S.children(_).length||j.setNode(_,S.node(_))}),e.forEach(S.edges(),function(_){j.setEdge(_,S.edge(_))}),j}function i(S){var j=e.map(S.nodes(),function(_){var k={};return e.forEach(S.outEdges(_),function(E){k[E.w]=(k[E.w]||0)+S.edge(E).weight}),k});return e.zipObject(S.nodes(),j)}function s(S){var j=e.map(S.nodes(),function(_){var k={};return e.forEach(S.inEdges(_),function(E){k[E.v]=(k[E.v]||0)+S.edge(E).weight}),k});return e.zipObject(S.nodes(),j)}function l(S,j){var _=S.x,k=S.y,E=j.x-_,T=j.y-k,A=S.width/2,O=S.height/2;if(!E&&!T)throw new Error("Not possible to find intersection inside of the rectangle");var I,P;return Math.abs(T)*A>Math.abs(E)*O?(T<0&&(O=-O),I=O*E/T,P=O):(E<0&&(A=-A),I=A,P=A*T/E),{x:_+I,y:k+P}}function c(S){var j=e.map(e.range(g(S)+1),function(){return[]});return e.forEach(S.nodes(),function(_){var k=S.node(_),E=k.rank;e.isUndefined(E)||(j[E][k.order]=_)}),j}function d(S){var j=e.min(e.map(S.nodes(),function(_){return S.node(_).rank}));e.forEach(S.nodes(),function(_){var k=S.node(_);e.has(k,"rank")&&(k.rank-=j)})}function h(S){var j=e.min(e.map(S.nodes(),function(T){return S.node(T).rank})),_=[];e.forEach(S.nodes(),function(T){var A=S.node(T).rank-j;_[A]||(_[A]=[]),_[A].push(T)});var k=0,E=S.graph().nodeRankFactor;e.forEach(_,function(T,A){e.isUndefined(T)&&A%E!==0?--k:k&&e.forEach(T,function(O){S.node(O).rank+=k})})}function m(S,j,_,k){var E={width:0,height:0};return arguments.length>=4&&(E.rank=_,E.order=k),n(S,"border",E,j)}function g(S){return e.max(e.map(S.nodes(),function(j){var _=S.node(j).rank;if(!e.isUndefined(_))return _}))}function v(S,j){var _={lhs:[],rhs:[]};return e.forEach(S,function(k){j(k)?_.lhs.push(k):_.rhs.push(k)}),_}function b(S,j){var _=e.now();try{return j()}finally{console.log(S+" time: "+(e.now()-_)+"ms")}}function w(S,j){return j()}return ak}var ik,az;function r0e(){if(az)return ik;az=1;var e=fn(),t=Or();ik={run:n,undo:a};function n(i){i.graph().dummyChains=[],e.forEach(i.edges(),function(s){r(i,s)})}function r(i,s){var l=s.v,c=i.node(l).rank,d=s.w,h=i.node(d).rank,m=s.name,g=i.edge(s),v=g.labelRank;if(h!==c+1){i.removeEdge(s);var b,w,S;for(S=0,++c;c<h;++S,++c)g.points=[],w={width:0,height:0,edgeLabel:g,edgeObj:s,rank:c},b=t.addDummyNode(i,"edge",w,"_d"),c===v&&(w.width=g.width,w.height=g.height,w.dummy="edge-label",w.labelpos=g.labelpos),i.setEdge(l,b,{weight:g.weight},m),S===0&&i.graph().dummyChains.push(b),l=b;i.setEdge(l,d,{weight:g.weight},m)}}function a(i){e.forEach(i.graph().dummyChains,function(s){var l=i.node(s),c=l.edgeLabel,d;for(i.setEdge(l.edgeObj,c);l.dummy;)d=i.successors(s)[0],i.removeNode(s),c.points.push({x:l.x,y:l.y}),l.dummy==="edge-label"&&(c.x=l.x,c.y=l.y,c.width=l.width,c.height=l.height),s=d,l=i.node(s)})}return ik}var sk,iz;function Up(){if(iz)return sk;iz=1;var e=fn();sk={longestPath:t,slack:n};function t(r){var a={};function i(s){var l=r.node(s);if(e.has(a,s))return l.rank;a[s]=!0;var c=e.min(e.map(r.outEdges(s),function(d){return i(d.w)-r.edge(d).minlen}));return(c===Number.POSITIVE_INFINITY||c===void 0||c===null)&&(c=0),l.rank=c}e.forEach(r.sources(),i)}function n(r,a){return r.node(a.w).rank-r.node(a.v).rank-r.edge(a).minlen}return sk}var ok,sz;function j7(){if(sz)return ok;sz=1;var e=fn(),t=La().Graph,n=Up().slack;ok=r;function r(l){var c=new t({directed:!1}),d=l.nodes()[0],h=l.nodeCount();c.setNode(d,{});for(var m,g;a(c,l)<h;)m=i(c,l),g=c.hasNode(m.v)?n(l,m):-n(l,m),s(c,l,g);return c}function a(l,c){function d(h){e.forEach(c.nodeEdges(h),function(m){var g=m.v,v=h===g?m.w:g;!l.hasNode(v)&&!n(c,m)&&(l.setNode(v,{}),l.setEdge(h,v,{}),d(v))})}return e.forEach(l.nodes(),d),l.nodeCount()}function i(l,c){return e.minBy(c.edges(),function(d){if(l.hasNode(d.v)!==l.hasNode(d.w))return n(c,d)})}function s(l,c,d){e.forEach(l.nodes(),function(h){c.node(h).rank+=d})}return ok}var lk,oz;function a0e(){if(oz)return lk;oz=1;var e=fn(),t=j7(),n=Up().slack,r=Up().longestPath,a=La().alg.preorder,i=La().alg.postorder,s=Or().simplify;lk=l,l.initLowLimValues=m,l.initCutValues=c,l.calcCutValue=h,l.leaveEdge=v,l.enterEdge=b,l.exchangeEdges=w;function l(k){k=s(k),r(k);var E=t(k);m(E),c(E,k);for(var T,A;T=v(E);)A=b(E,k,T),w(E,k,T,A)}function c(k,E){var T=i(k,k.nodes());T=T.slice(0,T.length-1),e.forEach(T,function(A){d(k,E,A)})}function d(k,E,T){var A=k.node(T),O=A.parent;k.edge(T,O).cutvalue=h(k,E,T)}function h(k,E,T){var A=k.node(T),O=A.parent,I=!0,P=E.edge(T,O),D=0;return P||(I=!1,P=E.edge(O,T)),D=P.weight,e.forEach(E.nodeEdges(T),function(q){var z=q.v===T,F=z?q.w:q.v;if(F!==O){var R=z===I,M=E.edge(q).weight;if(D+=R?M:-M,j(k,T,F)){var L=k.edge(T,F).cutvalue;D+=R?-L:L}}}),D}function m(k,E){arguments.length<2&&(E=k.nodes()[0]),g(k,{},1,E)}function g(k,E,T,A,O){var I=T,P=k.node(A);return E[A]=!0,e.forEach(k.neighbors(A),function(D){e.has(E,D)||(T=g(k,E,T,D,A))}),P.low=I,P.lim=T++,O?P.parent=O:delete P.parent,T}function v(k){return e.find(k.edges(),function(E){return k.edge(E).cutvalue<0})}function b(k,E,T){var A=T.v,O=T.w;E.hasEdge(A,O)||(A=T.w,O=T.v);var I=k.node(A),P=k.node(O),D=I,q=!1;I.lim>P.lim&&(D=P,q=!0);var z=e.filter(E.edges(),function(F){return q===_(k,k.node(F.v),D)&&q!==_(k,k.node(F.w),D)});return e.minBy(z,function(F){return n(E,F)})}function w(k,E,T,A){var O=T.v,I=T.w;k.removeEdge(O,I),k.setEdge(A.v,A.w,{}),m(k),c(k,E),S(k,E)}function S(k,E){var T=e.find(k.nodes(),function(O){return!E.node(O).parent}),A=a(k,T);A=A.slice(1),e.forEach(A,function(O){var I=k.node(O).parent,P=E.edge(O,I),D=!1;P||(P=E.edge(I,O),D=!0),E.node(O).rank=E.node(I).rank+(D?P.minlen:-P.minlen)})}function j(k,E,T){return k.hasEdge(E,T)}function _(k,E,T){return T.low<=E.lim&&E.lim<=T.lim}return lk}var uk,lz;function i0e(){if(lz)return uk;lz=1;var e=Up(),t=e.longestPath,n=j7(),r=a0e();uk=a;function a(c){switch(c.graph().ranker){case"network-simplex":l(c);break;case"tight-tree":s(c);break;case"longest-path":i(c);break;default:l(c)}}var i=t;function s(c){t(c),n(c)}function l(c){r(c)}return uk}var ck,uz;function s0e(){if(uz)return ck;uz=1;var e=fn();ck=t;function t(a){var i=r(a);e.forEach(a.graph().dummyChains,function(s){for(var l=a.node(s),c=l.edgeObj,d=n(a,i,c.v,c.w),h=d.path,m=d.lca,g=0,v=h[g],b=!0;s!==c.w;){if(l=a.node(s),b){for(;(v=h[g])!==m&&a.node(v).maxRank<l.rank;)g++;v===m&&(b=!1)}if(!b){for(;g<h.length-1&&a.node(v=h[g+1]).minRank<=l.rank;)g++;v=h[g]}a.setParent(s,v),s=a.successors(s)[0]}})}function n(a,i,s,l){var c=[],d=[],h=Math.min(i[s].low,i[l].low),m=Math.max(i[s].lim,i[l].lim),g,v;g=s;do g=a.parent(g),c.push(g);while(g&&(i[g].low>h||m>i[g].lim));for(v=g,g=l;(g=a.parent(g))!==v;)d.push(g);return{path:c.concat(d.reverse()),lca:v}}function r(a){var i={},s=0;function l(c){var d=s;e.forEach(a.children(c),l),i[c]={low:d,lim:s++}}return e.forEach(a.children(),l),i}return ck}var dk,cz;function o0e(){if(cz)return dk;cz=1;var e=fn(),t=Or();dk={run:n,cleanup:s};function n(l){var c=t.addDummyNode(l,"root",{},"_root"),d=a(l),h=e.max(e.values(d))-1,m=2*h+1;l.graph().nestingRoot=c,e.forEach(l.edges(),function(v){l.edge(v).minlen*=m});var g=i(l)+1;e.forEach(l.children(),function(v){r(l,c,m,g,h,d,v)}),l.graph().nodeRankFactor=m}function r(l,c,d,h,m,g,v){var b=l.children(v);if(!b.length){v!==c&&l.setEdge(c,v,{weight:0,minlen:d});return}var w=t.addBorderNode(l,"_bt"),S=t.addBorderNode(l,"_bb"),j=l.node(v);l.setParent(w,v),j.borderTop=w,l.setParent(S,v),j.borderBottom=S,e.forEach(b,function(_){r(l,c,d,h,m,g,_);var k=l.node(_),E=k.borderTop?k.borderTop:_,T=k.borderBottom?k.borderBottom:_,A=k.borderTop?h:2*h,O=E!==T?1:m-g[v]+1;l.setEdge(w,E,{weight:A,minlen:O,nestingEdge:!0}),l.setEdge(T,S,{weight:A,minlen:O,nestingEdge:!0})}),l.parent(v)||l.setEdge(c,w,{weight:0,minlen:m+g[v]})}function a(l){var c={};function d(h,m){var g=l.children(h);g&&g.length&&e.forEach(g,function(v){d(v,m+1)}),c[h]=m}return e.forEach(l.children(),function(h){d(h,1)}),c}function i(l){return e.reduce(l.edges(),function(c,d){return c+l.edge(d).weight},0)}function s(l){var c=l.graph();l.removeNode(c.nestingRoot),delete c.nestingRoot,e.forEach(l.edges(),function(d){var h=l.edge(d);h.nestingEdge&&l.removeEdge(d)})}return dk}var fk,dz;function l0e(){if(dz)return fk;dz=1;var e=fn(),t=Or();fk=n;function n(a){function i(s){var l=a.children(s),c=a.node(s);if(l.length&&e.forEach(l,i),e.has(c,"minRank")){c.borderLeft=[],c.borderRight=[];for(var d=c.minRank,h=c.maxRank+1;d<h;++d)r(a,"borderLeft","_bl",s,c,d),r(a,"borderRight","_br",s,c,d)}}e.forEach(a.children(),i)}function r(a,i,s,l,c,d){var h={width:0,height:0,rank:d,borderType:i},m=c[i][d-1],g=t.addDummyNode(a,"border",h,s);c[i][d]=g,a.setParent(g,l),m&&a.setEdge(m,g,{weight:1})}return fk}var hk,fz;function u0e(){if(fz)return hk;fz=1;var e=fn();hk={adjust:t,undo:n};function t(d){var h=d.graph().rankdir.toLowerCase();(h==="lr"||h==="rl")&&r(d)}function n(d){var h=d.graph().rankdir.toLowerCase();(h==="bt"||h==="rl")&&i(d),(h==="lr"||h==="rl")&&(l(d),r(d))}function r(d){e.forEach(d.nodes(),function(h){a(d.node(h))}),e.forEach(d.edges(),function(h){a(d.edge(h))})}function a(d){var h=d.width;d.width=d.height,d.height=h}function i(d){e.forEach(d.nodes(),function(h){s(d.node(h))}),e.forEach(d.edges(),function(h){var m=d.edge(h);e.forEach(m.points,s),e.has(m,"y")&&s(m)})}function s(d){d.y=-d.y}function l(d){e.forEach(d.nodes(),function(h){c(d.node(h))}),e.forEach(d.edges(),function(h){var m=d.edge(h);e.forEach(m.points,c),e.has(m,"x")&&c(m)})}function c(d){var h=d.x;d.x=d.y,d.y=h}return hk}var mk,hz;function c0e(){if(hz)return mk;hz=1;var e=fn();mk=t;function t(n){var r={},a=e.filter(n.nodes(),function(d){return!n.children(d).length}),i=e.max(e.map(a,function(d){return n.node(d).rank})),s=e.map(e.range(i+1),function(){return[]});function l(d){if(!e.has(r,d)){r[d]=!0;var h=n.node(d);s[h.rank].push(d),e.forEach(n.successors(d),l)}}var c=e.sortBy(a,function(d){return n.node(d).rank});return e.forEach(c,l),s}return mk}var pk,mz;function d0e(){if(mz)return pk;mz=1;var e=fn();pk=t;function t(r,a){for(var i=0,s=1;s<a.length;++s)i+=n(r,a[s-1],a[s]);return i}function n(r,a,i){for(var s=e.zipObject(i,e.map(i,function(g,v){return v})),l=e.flatten(e.map(a,function(g){return e.sortBy(e.map(r.outEdges(g),function(v){return{pos:s[v.w],weight:r.edge(v).weight}}),"pos")}),!0),c=1;c<i.length;)c<<=1;var d=2*c-1;c-=1;var h=e.map(new Array(d),function(){return 0}),m=0;return e.forEach(l.forEach(function(g){var v=g.pos+c;h[v]+=g.weight;for(var b=0;v>0;)v%2&&(b+=h[v+1]),v=v-1>>1,h[v]+=g.weight;m+=g.weight*b})),m}return pk}var gk,pz;function f0e(){if(pz)return gk;pz=1;var e=fn();gk=t;function t(n,r){return e.map(r,function(a){var i=n.inEdges(a);if(i.length){var s=e.reduce(i,function(l,c){var d=n.edge(c),h=n.node(c.v);return{sum:l.sum+d.weight*h.order,weight:l.weight+d.weight}},{sum:0,weight:0});return{v:a,barycenter:s.sum/s.weight,weight:s.weight}}else return{v:a}})}return gk}var vk,gz;function h0e(){if(gz)return vk;gz=1;var e=fn();vk=t;function t(a,i){var s={};e.forEach(a,function(c,d){var h=s[c.v]={indegree:0,in:[],out:[],vs:[c.v],i:d};e.isUndefined(c.barycenter)||(h.barycenter=c.barycenter,h.weight=c.weight)}),e.forEach(i.edges(),function(c){var d=s[c.v],h=s[c.w];!e.isUndefined(d)&&!e.isUndefined(h)&&(h.indegree++,d.out.push(s[c.w]))});var l=e.filter(s,function(c){return!c.indegree});return n(l)}function n(a){var i=[];function s(d){return function(h){h.merged||(e.isUndefined(h.barycenter)||e.isUndefined(d.barycenter)||h.barycenter>=d.barycenter)&&r(d,h)}}function l(d){return function(h){h.in.push(d),--h.indegree===0&&a.push(h)}}for(;a.length;){var c=a.pop();i.push(c),e.forEach(c.in.reverse(),s(c)),e.forEach(c.out,l(c))}return e.map(e.filter(i,function(d){return!d.merged}),function(d){return e.pick(d,["vs","i","barycenter","weight"])})}function r(a,i){var s=0,l=0;a.weight&&(s+=a.barycenter*a.weight,l+=a.weight),i.weight&&(s+=i.barycenter*i.weight,l+=i.weight),a.vs=i.vs.concat(a.vs),a.barycenter=s/l,a.weight=l,a.i=Math.min(i.i,a.i),i.merged=!0}return vk}var yk,vz;function m0e(){if(vz)return yk;vz=1;var e=fn(),t=Or();yk=n;function n(i,s){var l=t.partition(i,function(w){return e.has(w,"barycenter")}),c=l.lhs,d=e.sortBy(l.rhs,function(w){return-w.i}),h=[],m=0,g=0,v=0;c.sort(a(!!s)),v=r(h,d,v),e.forEach(c,function(w){v+=w.vs.length,h.push(w.vs),m+=w.barycenter*w.weight,g+=w.weight,v=r(h,d,v)});var b={vs:e.flatten(h,!0)};return g&&(b.barycenter=m/g,b.weight=g),b}function r(i,s,l){for(var c;s.length&&(c=e.last(s)).i<=l;)s.pop(),i.push(c.vs),l++;return l}function a(i){return function(s,l){return s.barycenter<l.barycenter?-1:s.barycenter>l.barycenter?1:i?l.i-s.i:s.i-l.i}}return yk}var xk,yz;function p0e(){if(yz)return xk;yz=1;var e=fn(),t=f0e(),n=h0e(),r=m0e();xk=a;function a(l,c,d,h){var m=l.children(c),g=l.node(c),v=g?g.borderLeft:void 0,b=g?g.borderRight:void 0,w={};v&&(m=e.filter(m,function(T){return T!==v&&T!==b}));var S=t(l,m);e.forEach(S,function(T){if(l.children(T.v).length){var A=a(l,T.v,d,h);w[T.v]=A,e.has(A,"barycenter")&&s(T,A)}});var j=n(S,d);i(j,w);var _=r(j,h);if(v&&(_.vs=e.flatten([v,_.vs,b],!0),l.predecessors(v).length)){var k=l.node(l.predecessors(v)[0]),E=l.node(l.predecessors(b)[0]);e.has(_,"barycenter")||(_.barycenter=0,_.weight=0),_.barycenter=(_.barycenter*_.weight+k.order+E.order)/(_.weight+2),_.weight+=2}return _}function i(l,c){e.forEach(l,function(d){d.vs=e.flatten(d.vs.map(function(h){return c[h]?c[h].vs:h}),!0)})}function s(l,c){e.isUndefined(l.barycenter)?(l.barycenter=c.barycenter,l.weight=c.weight):(l.barycenter=(l.barycenter*l.weight+c.barycenter*c.weight)/(l.weight+c.weight),l.weight+=c.weight)}return xk}var bk,xz;function g0e(){if(xz)return bk;xz=1;var e=fn(),t=La().Graph;bk=n;function n(a,i,s){var l=r(a),c=new t({compound:!0}).setGraph({root:l}).setDefaultNodeLabel(function(d){return a.node(d)});return e.forEach(a.nodes(),function(d){var h=a.node(d),m=a.parent(d);(h.rank===i||h.minRank<=i&&i<=h.maxRank)&&(c.setNode(d),c.setParent(d,m||l),e.forEach(a[s](d),function(g){var v=g.v===d?g.w:g.v,b=c.edge(v,d),w=e.isUndefined(b)?0:b.weight;c.setEdge(v,d,{weight:a.edge(g).weight+w})}),e.has(h,"minRank")&&c.setNode(d,{borderLeft:h.borderLeft[i],borderRight:h.borderRight[i]}))}),c}function r(a){for(var i;a.hasNode(i=e.uniqueId("_root")););return i}return bk}var wk,bz;function v0e(){if(bz)return wk;bz=1;var e=fn();wk=t;function t(n,r,a){var i={},s;e.forEach(a,function(l){for(var c=n.parent(l),d,h;c;){if(d=n.parent(c),d?(h=i[d],i[d]=c):(h=s,s=c),h&&h!==c){r.setEdge(h,c);return}c=d}})}return wk}var Sk,wz;function y0e(){if(wz)return Sk;wz=1;var e=fn(),t=c0e(),n=d0e(),r=p0e(),a=g0e(),i=v0e(),s=La().Graph,l=Or();Sk=c;function c(g){var v=l.maxRank(g),b=d(g,e.range(1,v+1),"inEdges"),w=d(g,e.range(v-1,-1,-1),"outEdges"),S=t(g);m(g,S);for(var j=Number.POSITIVE_INFINITY,_,k=0,E=0;E<4;++k,++E){h(k%2?b:w,k%4>=2),S=l.buildLayerMatrix(g);var T=n(g,S);T<j&&(E=0,_=e.cloneDeep(S),j=T)}m(g,_)}function d(g,v,b){return e.map(v,function(w){return a(g,w,b)})}function h(g,v){var b=new s;e.forEach(g,function(w){var S=w.graph().root,j=r(w,S,b,v);e.forEach(j.vs,function(_,k){w.node(_).order=k}),i(w,b,j.vs)})}function m(g,v){e.forEach(v,function(b){e.forEach(b,function(w,S){g.node(w).order=S})})}return Sk}var jk,Sz;function x0e(){if(Sz)return jk;Sz=1;var e=fn(),t=La().Graph,n=Or();jk={positionX:b,findType1Conflicts:r,findType2Conflicts:a,addConflict:s,hasConflict:l,verticalAlignment:c,horizontalCompaction:d,alignCoordinates:g,findSmallestWidthAlignment:m,balance:v};function r(j,_){var k={};function E(T,A){var O=0,I=0,P=T.length,D=e.last(A);return e.forEach(A,function(q,z){var F=i(j,q),R=F?j.node(F).order:P;(F||q===D)&&(e.forEach(A.slice(I,z+1),function(M){e.forEach(j.predecessors(M),function(L){var G=j.node(L),W=G.order;(W<O||R<W)&&!(G.dummy&&j.node(M).dummy)&&s(k,L,M)})}),I=z+1,O=R)}),A}return e.reduce(_,E),k}function a(j,_){var k={};function E(A,O,I,P,D){var q;e.forEach(e.range(O,I),function(z){q=A[z],j.node(q).dummy&&e.forEach(j.predecessors(q),function(F){var R=j.node(F);R.dummy&&(R.order<P||R.order>D)&&s(k,F,q)})})}function T(A,O){var I=-1,P,D=0;return e.forEach(O,function(q,z){if(j.node(q).dummy==="border"){var F=j.predecessors(q);F.length&&(P=j.node(F[0]).order,E(O,D,z,I,P),D=z,I=P)}E(O,D,O.length,P,A.length)}),O}return e.reduce(_,T),k}function i(j,_){if(j.node(_).dummy)return e.find(j.predecessors(_),function(k){return j.node(k).dummy})}function s(j,_,k){if(_>k){var E=_;_=k,k=E}var T=j[_];T||(j[_]=T={}),T[k]=!0}function l(j,_,k){if(_>k){var E=_;_=k,k=E}return e.has(j[_],k)}function c(j,_,k,E){var T={},A={},O={};return e.forEach(_,function(I){e.forEach(I,function(P,D){T[P]=P,A[P]=P,O[P]=D})}),e.forEach(_,function(I){var P=-1;e.forEach(I,function(D){var q=E(D);if(q.length){q=e.sortBy(q,function(L){return O[L]});for(var z=(q.length-1)/2,F=Math.floor(z),R=Math.ceil(z);F<=R;++F){var M=q[F];A[D]===D&&P<O[M]&&!l(k,D,M)&&(A[M]=D,A[D]=T[D]=T[M],P=O[M])}}})}),{root:T,align:A}}function d(j,_,k,E,T){var A={},O=h(j,_,k,T),I=T?"borderLeft":"borderRight";function P(z,F){for(var R=O.nodes(),M=R.pop(),L={};M;)L[M]?z(M):(L[M]=!0,R.push(M),R=R.concat(F(M))),M=R.pop()}function D(z){A[z]=O.inEdges(z).reduce(function(F,R){return Math.max(F,A[R.v]+O.edge(R))},0)}function q(z){var F=O.outEdges(z).reduce(function(M,L){return Math.min(M,A[L.w]-O.edge(L))},Number.POSITIVE_INFINITY),R=j.node(z);F!==Number.POSITIVE_INFINITY&&R.borderType!==I&&(A[z]=Math.max(A[z],F))}return P(D,O.predecessors.bind(O)),P(q,O.successors.bind(O)),e.forEach(E,function(z){A[z]=A[k[z]]}),A}function h(j,_,k,E){var T=new t,A=j.graph(),O=w(A.nodesep,A.edgesep,E);return e.forEach(_,function(I){var P;e.forEach(I,function(D){var q=k[D];if(T.setNode(q),P){var z=k[P],F=T.edge(z,q);T.setEdge(z,q,Math.max(O(j,D,P),F||0))}P=D})}),T}function m(j,_){return e.minBy(e.values(_),function(k){var E=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY;return e.forIn(k,function(A,O){var I=S(j,O)/2;E=Math.max(A+I,E),T=Math.min(A-I,T)}),E-T})}function g(j,_){var k=e.values(_),E=e.min(k),T=e.max(k);e.forEach(["u","d"],function(A){e.forEach(["l","r"],function(O){var I=A+O,P=j[I],D;if(P!==_){var q=e.values(P);D=O==="l"?E-e.min(q):T-e.max(q),D&&(j[I]=e.mapValues(P,function(z){return z+D}))}})})}function v(j,_){return e.mapValues(j.ul,function(k,E){if(_)return j[_.toLowerCase()][E];var T=e.sortBy(e.map(j,E));return(T[1]+T[2])/2})}function b(j){var _=n.buildLayerMatrix(j),k=e.merge(r(j,_),a(j,_)),E={},T;e.forEach(["u","d"],function(O){T=O==="u"?_:e.values(_).reverse(),e.forEach(["l","r"],function(I){I==="r"&&(T=e.map(T,function(z){return e.values(z).reverse()}));var P=(O==="u"?j.predecessors:j.successors).bind(j),D=c(j,T,k,P),q=d(j,T,D.root,D.align,I==="r");I==="r"&&(q=e.mapValues(q,function(z){return-z})),E[O+I]=q})});var A=m(j,E);return g(E,A),v(E,j.graph().align)}function w(j,_,k){return function(E,T,A){var O=E.node(T),I=E.node(A),P=0,D;if(P+=O.width/2,e.has(O,"labelpos"))switch(O.labelpos.toLowerCase()){case"l":D=-O.width/2;break;case"r":D=O.width/2;break}if(D&&(P+=k?D:-D),D=0,P+=(O.dummy?_:j)/2,P+=(I.dummy?_:j)/2,P+=I.width/2,e.has(I,"labelpos"))switch(I.labelpos.toLowerCase()){case"l":D=I.width/2;break;case"r":D=-I.width/2;break}return D&&(P+=k?D:-D),D=0,P}}function S(j,_){return j.node(_).width}return jk}var kk,jz;function b0e(){if(jz)return kk;jz=1;var e=fn(),t=Or(),n=x0e().positionX;kk=r;function r(i){i=t.asNonCompoundGraph(i),a(i),e.forEach(n(i),function(s,l){i.node(l).x=s})}function a(i){var s=t.buildLayerMatrix(i),l=i.graph().ranksep,c=0;e.forEach(s,function(d){var h=e.max(e.map(d,function(m){return i.node(m).height}));e.forEach(d,function(m){i.node(m).y=c+h/2}),c+=h+l})}return kk}var _k,kz;function w0e(){if(kz)return _k;kz=1;var e=fn(),t=n0e(),n=r0e(),r=i0e(),a=Or().normalizeRanks,i=s0e(),s=Or().removeEmptyRanks,l=o0e(),c=l0e(),d=u0e(),h=y0e(),m=b0e(),g=Or(),v=La().Graph;_k=b;function b(X,J){var Q=J&&J.debugTiming?g.time:g.notime;Q("layout",function(){var re=Q(" buildLayoutGraph",function(){return P(X)});Q(" runLayout",function(){w(re,Q)}),Q(" updateInputGraph",function(){S(X,re)})})}function w(X,J){J(" makeSpaceForEdgeLabels",function(){D(X)}),J(" removeSelfEdges",function(){Y(X)}),J(" acyclic",function(){t.run(X)}),J(" nestingGraph.run",function(){l.run(X)}),J(" rank",function(){r(g.asNonCompoundGraph(X))}),J(" injectEdgeLabelProxies",function(){q(X)}),J(" removeEmptyRanks",function(){s(X)}),J(" nestingGraph.cleanup",function(){l.cleanup(X)}),J(" normalizeRanks",function(){a(X)}),J(" assignRankMinMax",function(){z(X)}),J(" removeEdgeLabelProxies",function(){F(X)}),J(" normalize.run",function(){n.run(X)}),J(" parentDummyChains",function(){i(X)}),J(" addBorderSegments",function(){c(X)}),J(" order",function(){h(X)}),J(" insertSelfEdges",function(){B(X)}),J(" adjustCoordinateSystem",function(){d.adjust(X)}),J(" position",function(){m(X)}),J(" positionSelfEdges",function(){H(X)}),J(" removeBorderNodes",function(){W(X)}),J(" normalize.undo",function(){n.undo(X)}),J(" fixupEdgeLabelCoords",function(){L(X)}),J(" undoCoordinateSystem",function(){d.undo(X)}),J(" translateGraph",function(){R(X)}),J(" assignNodeIntersects",function(){M(X)}),J(" reversePoints",function(){G(X)}),J(" acyclic.undo",function(){t.undo(X)})}function S(X,J){e.forEach(X.nodes(),function(Q){var re=X.node(Q),ue=J.node(Q);re&&(re.x=ue.x,re.y=ue.y,J.children(Q).length&&(re.width=ue.width,re.height=ue.height))}),e.forEach(X.edges(),function(Q){var re=X.edge(Q),ue=J.edge(Q);re.points=ue.points,e.has(ue,"x")&&(re.x=ue.x,re.y=ue.y)}),X.graph().width=J.graph().width,X.graph().height=J.graph().height}var j=["nodesep","edgesep","ranksep","marginx","marginy"],_={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},k=["acyclicer","ranker","rankdir","align"],E=["width","height"],T={width:0,height:0},A=["minlen","weight","width","height","labeloffset"],O={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},I=["labelpos"];function P(X){var J=new v({multigraph:!0,compound:!0}),Q=U(X.graph());return J.setGraph(e.merge({},_,K(Q,j),e.pick(Q,k))),e.forEach(X.nodes(),function(re){var ue=U(X.node(re));J.setNode(re,e.defaults(K(ue,E),T)),J.setParent(re,X.parent(re))}),e.forEach(X.edges(),function(re){var ue=U(X.edge(re));J.setEdge(re,e.merge({},O,K(ue,A),e.pick(ue,I)))}),J}function D(X){var J=X.graph();J.ranksep/=2,e.forEach(X.edges(),function(Q){var re=X.edge(Q);re.minlen*=2,re.labelpos.toLowerCase()!=="c"&&(J.rankdir==="TB"||J.rankdir==="BT"?re.width+=re.labeloffset:re.height+=re.labeloffset)})}function q(X){e.forEach(X.edges(),function(J){var Q=X.edge(J);if(Q.width&&Q.height){var re=X.node(J.v),ue=X.node(J.w),Z={rank:(ue.rank-re.rank)/2+re.rank,e:J};g.addDummyNode(X,"edge-proxy",Z,"_ep")}})}function z(X){var J=0;e.forEach(X.nodes(),function(Q){var re=X.node(Q);re.borderTop&&(re.minRank=X.node(re.borderTop).rank,re.maxRank=X.node(re.borderBottom).rank,J=e.max(J,re.maxRank))}),X.graph().maxRank=J}function F(X){e.forEach(X.nodes(),function(J){var Q=X.node(J);Q.dummy==="edge-proxy"&&(X.edge(Q.e).labelRank=Q.rank,X.removeNode(J))})}function R(X){var J=Number.POSITIVE_INFINITY,Q=0,re=Number.POSITIVE_INFINITY,ue=0,Z=X.graph(),se=Z.marginx||0,ce=Z.marginy||0;function ee(ae){var oe=ae.x,fe=ae.y,Ce=ae.width,Te=ae.height;J=Math.min(J,oe-Ce/2),Q=Math.max(Q,oe+Ce/2),re=Math.min(re,fe-Te/2),ue=Math.max(ue,fe+Te/2)}e.forEach(X.nodes(),function(ae){ee(X.node(ae))}),e.forEach(X.edges(),function(ae){var oe=X.edge(ae);e.has(oe,"x")&&ee(oe)}),J-=se,re-=ce,e.forEach(X.nodes(),function(ae){var oe=X.node(ae);oe.x-=J,oe.y-=re}),e.forEach(X.edges(),function(ae){var oe=X.edge(ae);e.forEach(oe.points,function(fe){fe.x-=J,fe.y-=re}),e.has(oe,"x")&&(oe.x-=J),e.has(oe,"y")&&(oe.y-=re)}),Z.width=Q-J+se,Z.height=ue-re+ce}function M(X){e.forEach(X.edges(),function(J){var Q=X.edge(J),re=X.node(J.v),ue=X.node(J.w),Z,se;Q.points?(Z=Q.points[0],se=Q.points[Q.points.length-1]):(Q.points=[],Z=ue,se=re),Q.points.unshift(g.intersectRect(re,Z)),Q.points.push(g.intersectRect(ue,se))})}function L(X){e.forEach(X.edges(),function(J){var Q=X.edge(J);if(e.has(Q,"x"))switch((Q.labelpos==="l"||Q.labelpos==="r")&&(Q.width-=Q.labeloffset),Q.labelpos){case"l":Q.x-=Q.width/2+Q.labeloffset;break;case"r":Q.x+=Q.width/2+Q.labeloffset;break}})}function G(X){e.forEach(X.edges(),function(J){var Q=X.edge(J);Q.reversed&&Q.points.reverse()})}function W(X){e.forEach(X.nodes(),function(J){if(X.children(J).length){var Q=X.node(J),re=X.node(Q.borderTop),ue=X.node(Q.borderBottom),Z=X.node(e.last(Q.borderLeft)),se=X.node(e.last(Q.borderRight));Q.width=Math.abs(se.x-Z.x),Q.height=Math.abs(ue.y-re.y),Q.x=Z.x+Q.width/2,Q.y=re.y+Q.height/2}}),e.forEach(X.nodes(),function(J){X.node(J).dummy==="border"&&X.removeNode(J)})}function Y(X){e.forEach(X.edges(),function(J){if(J.v===J.w){var Q=X.node(J.v);Q.selfEdges||(Q.selfEdges=[]),Q.selfEdges.push({e:J,label:X.edge(J)}),X.removeEdge(J)}})}function B(X){var J=g.buildLayerMatrix(X);e.forEach(J,function(Q){var re=0;e.forEach(Q,function(ue,Z){var se=X.node(ue);se.order=Z+re,e.forEach(se.selfEdges,function(ce){g.addDummyNode(X,"selfedge",{width:ce.label.width,height:ce.label.height,rank:se.rank,order:Z+ ++re,e:ce.e,label:ce.label},"_se")}),delete se.selfEdges})})}function H(X){e.forEach(X.nodes(),function(J){var Q=X.node(J);if(Q.dummy==="selfedge"){var re=X.node(Q.e.v),ue=re.x+re.width/2,Z=re.y,se=Q.x-ue,ce=re.height/2;X.setEdge(Q.e,Q.label),X.removeNode(J),Q.label.points=[{x:ue+2*se/3,y:Z-ce},{x:ue+5*se/6,y:Z-ce},{x:ue+se,y:Z},{x:ue+5*se/6,y:Z+ce},{x:ue+2*se/3,y:Z+ce}],Q.label.x=Q.x,Q.label.y=Q.y}})}function K(X,J){return e.mapValues(e.pick(X,J),Number)}function U(X){var J={};return e.forEach(X,function(Q,re){J[re.toLowerCase()]=Q}),J}return _k}var Ck,_z;function S0e(){if(_z)return Ck;_z=1;var e=fn(),t=Or(),n=La().Graph;Ck={debugOrdering:r};function r(a){var i=t.buildLayerMatrix(a),s=new n({compound:!0,multigraph:!0}).setGraph({});return e.forEach(a.nodes(),function(l){s.setNode(l,{label:l}),s.setParent(l,"layer"+a.node(l).rank)}),e.forEach(a.edges(),function(l){s.setEdge(l.v,l.w,{},l.name)}),e.forEach(i,function(l,c){var d="layer"+c;s.setNode(d,{rank:"same"}),e.reduce(l,function(h,m){return s.setEdge(h,m,{style:"invis"}),m})}),s}return Ck}var Nk,Cz;function j0e(){return Cz||(Cz=1,Nk="0.8.5"),Nk}var Ek,Nz;function k0e(){return Nz||(Nz=1,Ek={graphlib:La(),layout:w0e(),debug:S0e(),util:{time:Or().time,notime:Or().notime},version:j0e()}),Ek}var _0e=k0e();const Ez=ta(_0e),C0e={pending:"#D4B896",running:"#2196F3",completed:"#4CAF50",failed:"#E53935",stopped:"#FF9800",merged:"#9C27B0"},N0e={pending:"",running:"ring-2 ring-status-running/50 animate-pulse",completed:"",failed:"ring-1 ring-status-error/30",stopped:"",merged:""};function E0e({data:e}){const t=e,{todo:n,allTodos:r,selected:a,onStart:i,onStop:s,onDelete:l,onMerge:c,onCleanup:d,onRetry:h,onSelect:m}=t,{t:g}=Ze(),v=n.status==="pending"||n.status==="failed"||n.status==="stopped",b=n.status==="running",w=n.status==="completed",S=n.status!=="running"&&n.status!=="pending"&&(n.worktree_path||n.branch_name),j=n.status==="completed"||n.status==="failed"||n.status==="stopped",_=n.depends_on?r.find(T=>T.id===n.depends_on):null,k=!!_&&_.status!=="completed",E=C0e[n.status];return f.jsxs("div",{className:`bg-theme-card rounded-xl shadow-card min-w-[240px] max-w-[280px] overflow-hidden transition-all duration-300 ${N0e[n.status]} ${a?"ring-2 ring-accent shadow-elevated -translate-y-1":"hover:shadow-elevated hover:-translate-y-0.5"}`,style:{borderLeft:`4px solid ${E}`,position:"relative"},children:[f.jsx("div",{className:"absolute top-0 left-0 right-0 h-px bg-white/10 z-10 pointer-events-none"}),f.jsx(Wu,{type:"target",position:et.Top,className:"!w-3 !h-3 !bg-cyan-500 !border-2 !border-white !-top-1.5"}),f.jsxs("div",{className:"px-3 py-2.5 cursor-pointer hover:bg-warm-50 transition-colors",onClick:()=>m(n.id),children:[f.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[f.jsxs("span",{className:"text-2xs font-mono text-warm-400",children:["#",n.priority]}),f.jsx("span",{className:"flex-1 text-xs text-warm-800 font-medium truncate",title:n.title,children:n.title}),f.jsx(J2,{status:n.status})]}),f.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[n.cli_tool&&f.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-[9px] font-mono font-medium bg-status-merged/10 text-status-merged",children:$u(n.cli_tool||"claude").label}),_&&f.jsxs("span",{className:"inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded text-[9px] font-mono bg-cyan-500/10 text-cyan-600",children:[f.jsx(tf,{size:10}),_.title.length>15?_.title.slice(0,15)+"...":_.title]})]})]}),f.jsxs("div",{className:"flex items-center justify-end gap-0 px-2 py-1.5 border-t border-warm-100 bg-warm-50/50",children:[v&&f.jsx("button",{onClick:T=>{T.stopPropagation(),i(n.id,"headless")},className:"p-1 text-status-success/60 hover:text-status-success hover:bg-status-success/10 rounded transition-colors",title:g(k?"todo.startWithDependency":"todo.startHeadless"),children:f.jsx(yl,{size:12})}),b&&f.jsx("button",{onClick:T=>{T.stopPropagation(),s(n.id)},className:"p-1 text-status-error/60 hover:text-status-error hover:bg-status-error/10 rounded transition-colors",title:g("todo.stop"),children:f.jsx(Ug,{size:12})}),w&&f.jsx("button",{onClick:T=>{T.stopPropagation(),c(n.id)},className:"p-1 text-status-merged/60 hover:text-status-merged hover:bg-status-merged/10 rounded transition-colors",title:g("todo.merge"),children:f.jsx(Pf,{size:12})}),S&&f.jsx("button",{onClick:T=>{T.stopPropagation(),d(n.id)},className:"p-1 text-orange-500/60 hover:text-orange-500 hover:bg-orange-500/10 rounded transition-colors",title:g("todo.cleanup"),children:f.jsx(V2,{size:12})}),j&&f.jsx("button",{onClick:T=>{T.stopPropagation(),h(n.id,"headless")},className:"p-1 text-cyan-500/60 hover:text-cyan-500 hover:bg-cyan-500/10 rounded transition-colors",title:g("todo.retry"),children:f.jsx(Fg,{size:12})}),f.jsx("button",{onClick:T=>{T.stopPropagation(),l(n.id)},className:"p-1 text-warm-400 hover:text-status-error hover:bg-status-error/10 rounded transition-colors",title:g("todo.delete"),children:f.jsx(es,{size:12})})]}),f.jsx(Wu,{type:"source",position:et.Bottom,className:"!w-3 !h-3 !bg-accent !border-2 !border-white !-bottom-1.5"})]})}const A0e=x.memo(E0e);function T0e({todo:e,allTodos:t,projectIsGitRepo:n,projectUseWorktree:r,onClose:a,onEdit:i,onStart:s,onStop:l,onMerge:c,onCleanup:d,onRetry:h,onContinue:m,onFix:g,onEvent:v,isInteractive:b,onSendInput:w,debugLogging:S,showTokenUsage:j}){const[_,k]=x.useState([]),[E,T]=x.useState(!1),[A,O]=x.useState(!1),[I,P]=x.useState(!1),[D,q]=x.useState(null),[z,F]=x.useState(!1),[R,M]=x.useState(null),[L,G]=x.useState(!1),[W,Y]=x.useState(!1),[B,H]=x.useState(""),[K,U]=x.useState(!1),[X,J]=x.useState(null),{t:Q}=Ze(),re=e.status==="pending"||e.status==="failed"||e.status==="stopped",ue=e.status==="running",Z=e.status==="completed"||e.status==="stopped"||e.status==="merged",se=e.status==="completed",ce=e.status==="completed"||e.status==="failed"||e.status==="stopped",ee=!!m&&e.status==="completed"&&!!e.worktree_path,ae=e.status!=="running"&&e.status!=="pending"&&(e.worktree_path||e.branch_name),oe=e.status==="completed"||e.status==="failed"||e.status==="stopped"||e.status==="merged",fe=e.images?JSON.parse(e.images):[],Ce=e.depends_on?t.find(Ne=>Ne.id===e.depends_on):null,Te=!!Ce&&Ce.status!=="completed",pe=t.find(Ne=>Ne.depends_on===e.id&&Ne.merged_from_branch);x.useEffect(()=>{k([]),T(!1),M(null),G(!1),q(null),P(!1),Z2(e.id).then(Ne=>{k(Ne),T(!0)}).catch(()=>{T(!0)})},[e.id]),x.useEffect(()=>{oe&&!L&&b8(e.id).then(Ne=>{M(Ne),G(!0)}).catch(()=>{G(!0)})},[oe,L,e.id]),x.useEffect(()=>v(Ne=>{if(Ne.type==="todo:log"&&Ne.todoId===e.id&&Ne.message){const Fe={id:`ws-${Date.now()}-${Math.random()}`,todo_id:e.id,log_type:Ne.logType||"output",message:Ne.message,created_at:new Date().toISOString()};k(ye=>[...ye,Fe])}if(Ne.type==="todo:commit"&&Ne.todoId===e.id&&Ne.message){const Fe={id:`ws-commit-${Date.now()}-${Math.random()}`,todo_id:e.id,log_type:"commit",message:`${Ne.commitHash?`[${Ne.commitHash}] `:""}${Ne.message}`,created_at:new Date().toISOString()};k(ye=>[...ye,Fe])}}),[v,e.id]);const De=async()=>{if(I){P(!1);return}F(!0);try{const Ne=await x8(e.id);q(Ne),P(!0)}catch{}finally{F(!1)}},Xe=async()=>{try{const{files:Ne}=await s8(e.project_id,e.id);Ne.length>0&&window.open(`/api/projects/${e.project_id}/debug-logs/${encodeURIComponent(Ne[0].name)}`,"_blank")}catch{}},We=Ne=>{if(Ne<60)return`${Ne}s`;const Fe=Math.floor(Ne/60),ye=Ne%60;if(Fe<60)return ye>0?`${Fe}m ${ye}s`:`${Fe}m`;const le=Math.floor(Fe/60),me=Fe%60;return me>0?`${le}h ${me}m`:`${le}h`},at=Ne=>Ne>=1e6?`${(Ne/1e6).toFixed(1)}M`:Ne>=1e3?`${(Ne/1e3).toFixed(1)}k`:String(Ne);return A?f.jsx("div",{className:"w-[380px] border-l border-warm-200 bg-theme-card overflow-y-auto p-4",children:f.jsx(Zg,{initialTitle:e.title,initialDescription:e.description??void 0,initialCliTool:e.cli_tool??void 0,initialCliModel:e.cli_model??void 0,initialDependsOn:e.depends_on??void 0,initialMaxTurns:e.max_turns??void 0,initialUseWorktree:e.use_worktree??null,projectIsGitRepo:n,projectUseWorktree:r,existingImages:fe,todoId:e.id,availableTodos:t.filter(Ne=>Ne.id!==e.id),onDeleteImage:async Ne=>{await k8(e.id,Ne)},onSave:async(Ne,Fe,ye,le,me,Oe,Pe,be)=>{await i(e.id,Ne,Fe,ye,le,Oe,Pe,be),me&&me.length>0&&await Q2(e.id,me.map(nt=>({name:nt.name,data:nt.data}))),O(!1)},onCancel:()=>O(!1)})}):f.jsxs("div",{className:"w-[380px] border-l border-warm-200 bg-theme-card overflow-y-auto animate-slide-up",children:[f.jsxs("div",{className:"sticky top-0 bg-theme-card border-b border-warm-200 px-4 py-3 flex items-center gap-2 z-10",children:[f.jsx(J2,{status:e.status}),f.jsx("span",{className:"flex-1 text-sm font-medium text-warm-800 truncate",children:e.title}),f.jsx("button",{onClick:()=>O(!0),className:"p-1.5 text-warm-400 hover:text-accent hover:bg-accent/10 rounded-lg transition-colors",title:Q("todo.edit"),children:f.jsx(Df,{size:14})}),f.jsx("button",{onClick:a,className:"p-1.5 text-warm-400 hover:text-warm-600 hover:bg-warm-100 rounded-lg transition-colors",children:f.jsx(Wr,{size:16})})]}),f.jsxs("div",{className:"px-4 py-4 space-y-4",children:[f.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[re&&f.jsx(f.Fragment,{children:f.jsx("button",{onClick:()=>s(e.id,"headless"),className:"btn-ghost text-xs py-1.5 text-status-success",title:Q(Te?"todo.startWithDependency":"todo.startHeadless"),children:Q("todo.startHeadless")})}),ue&&f.jsx("button",{onClick:()=>l(e.id),className:"btn-ghost text-xs py-1.5 text-status-error",children:Q("todo.stop")}),Z&&f.jsx("button",{onClick:De,disabled:z,className:"btn-ghost text-xs py-1.5 text-status-info disabled:opacity-30",children:Q("todo.viewDiff")}),S&&oe&&f.jsx("button",{onClick:Xe,className:"btn-ghost text-xs py-1.5",children:Q("todo.viewDebugLog")}),se&&f.jsx("button",{onClick:()=>c(e.id),className:"btn-ghost text-xs py-1.5 text-status-merged",children:Q("todo.merge")}),ae&&f.jsx("button",{onClick:()=>d(e.id),className:"btn-ghost text-xs py-1.5 text-orange-500",children:Q("todo.cleanup")}),ee&&f.jsx("button",{onClick:()=>{Y(Ne=>!Ne),J(null)},disabled:K,className:"btn-ghost text-xs py-1.5 text-emerald-500",children:Q("todo.continue")}),ce&&f.jsx("button",{onClick:()=>h(e.id,"headless"),className:"btn-ghost text-xs py-1.5 text-cyan-500",children:Q("todo.retry")})]}),W&&m&&f.jsxs("div",{className:"border border-emerald-200 rounded-lg px-3 py-2 bg-emerald-50/50 space-y-2",children:[f.jsxs("label",{className:"text-xs font-medium text-emerald-600",children:[Q("todo.continuePromptLabel"),(e.round_count??1)>1&&f.jsxs("span",{className:"ml-2 text-emerald-500/70",children:["(",Q("todo.roundLabel")," ",e.round_count,")"]})]}),f.jsx("textarea",{value:B,onChange:Ne=>H(Ne.target.value),placeholder:Q("todo.continuePromptPlaceholder"),rows:3,disabled:K,className:"w-full bg-theme-card border border-emerald-200 rounded-lg px-2 py-1.5 text-xs text-warm-800 focus:border-emerald-400 focus:outline-none focus:ring-2 focus:ring-emerald-400/20 resize-y"}),X&&f.jsx("p",{className:"text-xs text-status-error",children:X}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("button",{onClick:async()=>{const Ne=B.trim();if(!Ne){J(Q("todo.continuePromptRequired"));return}U(!0),J(null);try{await m(e.id,Ne,"headless"),Y(!1),H("")}catch(Fe){J(Fe instanceof Error?Fe.message:"Continue failed")}finally{U(!1)}},disabled:K||!B.trim(),className:"btn-primary text-xs py-1.5 !bg-emerald-500 hover:!bg-emerald-600 disabled:opacity-30",children:Q(K?"todo.continuing":"todo.confirmContinue")}),f.jsx("button",{onClick:()=>{Y(!1),J(null)},disabled:K,className:"btn-ghost text-xs py-1.5",children:Q("scheduleForm.cancel")})]})]}),f.jsxs("div",{children:[f.jsx("h4",{className:"text-xs font-semibold text-warm-500 uppercase tracking-wider mb-1",children:Q("todo.description")}),f.jsx("p",{className:"text-xs text-warm-600 whitespace-pre-wrap leading-relaxed",children:e.description||Q("todo.noDescription")})]}),fe.length>0&&f.jsxs("div",{children:[f.jsxs("h4",{className:"text-xs font-semibold text-warm-500 uppercase tracking-wider mb-1",children:[Q("todo.attachedImages")," (",fe.length,")"]}),f.jsx("div",{className:"flex flex-wrap gap-2",children:fe.map(Ne=>f.jsx("a",{href:rf(e.id,Ne.id),target:"_blank",rel:"noopener noreferrer",children:f.jsx("img",{src:rf(e.id,Ne.id),alt:Ne.originalName,className:"h-16 w-16 object-cover rounded-lg border border-warm-200 hover:border-accent transition-colors"})},Ne.id))})]}),f.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[f.jsxs("span",{className:"text-2xs font-mono text-warm-400 badge bg-warm-100",children:["#",e.priority]}),e.cli_tool&&f.jsxs("span",{className:"badge text-2xs font-mono bg-warm-200/60 text-warm-600",children:[$u(e.cli_tool||"claude").label,e.cli_model&&f.jsxs("span",{className:"text-warm-400 ml-1",children:["/ ",e.cli_model]})]}),Ce&&f.jsxs("span",{className:"badge text-2xs font-mono bg-warm-200/60 text-warm-600",children:[Q("todo.dependsOn"),": ",Ce.title.length>20?Ce.title.slice(0,20)+"...":Ce.title]})]}),e.branch_name&&f.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[f.jsxs("span",{className:"badge text-2xs bg-warm-200/60 text-warm-600",children:[Q("todo.branch"),": ",e.branch_name]}),e.merged_from_branch&&f.jsxs("span",{className:"badge text-2xs bg-warm-200/60 text-warm-600",children:[Q("todo.mergedFrom"),": ",e.merged_from_branch]}),!e.worktree_path&&pe&&f.jsxs("span",{className:"badge text-2xs bg-amber-500/10 text-amber-600",children:[Q("todo.transferredTo"),": ",pe.title.length>20?pe.title.slice(0,20)+"...":pe.title]})]}),e.status==="failed"&&_.length>0&&(()=>{const Ne=_.filter(Fe=>Fe.log_type==="error");return Ne.length===0?null:f.jsxs("div",{className:"rounded-lg border border-status-error/30 bg-status-error/5 overflow-hidden",children:[f.jsxs("div",{className:"flex items-center justify-between px-3 py-2 bg-status-error/10 border-b border-status-error/20",children:[f.jsx("h4",{className:"text-2xs font-semibold text-status-error uppercase tracking-wider",children:Q("failure.title")}),g&&f.jsx("button",{onClick:()=>g(e,Ne),className:"text-2xs font-medium text-amber-500 hover:text-amber-600",children:Q("failure.fix")})]}),f.jsx("div",{className:"px-3 py-2 space-y-1 max-h-32 overflow-y-auto",children:Ne.map(Fe=>f.jsx("div",{className:"text-2xs font-mono text-status-error whitespace-pre-wrap break-all",children:Fe.message},Fe.id))})]})})(),oe&&R&&f.jsxs("div",{className:"space-y-2",children:[f.jsxs("div",{className:"flex flex-wrap gap-2",children:[R.duration_seconds!==null&&f.jsx("span",{className:"text-2xs font-mono badge bg-warm-100 text-warm-600",children:We(R.duration_seconds)}),R.commits.length>0&&f.jsxs("span",{className:"text-2xs font-mono badge bg-status-success/10 text-status-success",children:[R.commits.length," commits"]}),R.diff_stats.files_changed>0&&f.jsxs("span",{className:"text-2xs font-mono badge bg-status-info/10 text-status-info",children:[R.diff_stats.files_changed," files",f.jsxs("span",{className:"text-status-success ml-1",children:["+",R.diff_stats.insertions]}),f.jsxs("span",{className:"text-status-error ml-1",children:["-",R.diff_stats.deletions]})]}),j&&R.token_usage&&R.token_usage.input_tokens!==null&&f.jsxs("span",{className:"text-2xs font-mono badge bg-warm-200/60 text-warm-600",children:[at(R.token_usage.input_tokens)," in / ",at(R.token_usage.output_tokens??0)," out"]})]}),R.commits.length>0&&f.jsxs("div",{children:[f.jsx("h4",{className:"text-2xs font-semibold text-warm-500 uppercase tracking-wider mb-1",children:Q("result.commitHistory")}),f.jsx("div",{className:"space-y-0.5",children:R.commits.map((Ne,Fe)=>f.jsxs("div",{className:"flex items-start gap-1.5 text-2xs",children:[f.jsx("span",{className:"font-mono text-status-info flex-shrink-0",children:Ne.hash.slice(0,7)}),f.jsx("span",{className:"text-warm-700 truncate",children:Ne.message})]},Fe))})]})]}),I&&D&&f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center justify-between mb-1",children:[f.jsx("h4",{className:"text-2xs font-semibold text-warm-500 uppercase tracking-wider",children:Q("todo.diffOutput")}),f.jsxs("div",{className:"flex gap-2 text-2xs",children:[f.jsxs("span",{className:"text-status-success",children:["+",D.stats.insertions]}),f.jsxs("span",{className:"text-status-error",children:["-",D.stats.deletions]})]})]}),f.jsx("pre",{className:"h-48 overflow-auto bg-warm-800 rounded-lg p-3 font-mono text-2xs leading-relaxed",children:D.diff?D.diff.split(`
|
|
508
|
+
`).map((Ne,Fe)=>{let ye="text-warm-100";return Ne.startsWith("+")&&!Ne.startsWith("+++")?ye="text-warm-100 bg-green-500/20":Ne.startsWith("-")&&!Ne.startsWith("---")?ye="text-warm-100 bg-red-500/20":Ne.startsWith("@@")?ye="text-blue-400":Ne.startsWith("diff ")&&(ye="text-amber-300 font-bold"),f.jsx("div",{className:ye,children:Ne},Fe)}):f.jsx("span",{className:"text-warm-500 italic",children:Q("log.noChanges")})})]}),f.jsxs("div",{children:[f.jsx("h4",{className:"text-2xs font-semibold text-warm-500 uppercase tracking-wider mb-1",children:Q("todo.systemLog")}),f.jsx(Xg,{logs:_,interactive:b&&e.status==="running",todoId:e.id,onSendInput:w})]})]})]})}const O0e={taskNode:A0e},Az=260,Tz=100;function Oz(e){const t=new Ez.graphlib.Graph;t.setDefaultEdgeLabel(()=>({})),t.setGraph({rankdir:"TB",nodesep:60,ranksep:100});for(const r of e)t.setNode(r.id,{width:Az,height:Tz});for(const r of e)r.depends_on&&t.setEdge(r.depends_on,r.id);Ez.layout(t);const n=new Map;for(const r of e){const a=t.node(r.id);a&&n.set(r.id,{x:a.x-Az/2,y:a.y-Tz/2})}return{nodePositions:n}}function Mz(e,t,n){let r=n;const a=new Set;for(;r;){if(r===t)return!0;if(a.has(r))return!1;a.add(r);const i=e.find(s=>s.id===r);r=(i==null?void 0:i.depends_on)??null}return!1}const Ak={running:"#2196F3",completed:"#4CAF50",failed:"#E53935",stopped:"#FF9800",merged:"#9C27B0",pending:"#B8A88A"};function M0e({todos:e,projectCliTool:t,projectCliModel:n,projectIsGitRepo:r,projectUseWorktree:a,onAddTodo:i,onStartTodo:s,onStopTodo:l,onDeleteTodo:c,onEditTodo:d,onMergeTodo:h,onCleanupTodo:m,onRetryTodo:g,onContinueTodo:v,onFixTodo:b,onUpdateDependency:w,onUpdatePosition:S,onEvent:j,onSendInput:_,interactiveTodos:k,debugLogging:E,showTokenUsage:T}){const[A,O]=x.useState(null),[I,P]=x.useState(!1),{t:D}=Ze(),{theme:q}=g8(),z=q==="dark",F=x.useCallback(ce=>{O(ee=>ee===ce?null:ce)},[]),{initialNodes:R,initialEdges:M}=x.useMemo(()=>{const ee=e.some(fe=>fe.position_x==null||fe.position_y==null)?Oz(e).nodePositions:null,ae=e.map(fe=>{var Ce,Te;return{id:fe.id,type:"taskNode",position:{x:fe.position_x??((Ce=ee==null?void 0:ee.get(fe.id))==null?void 0:Ce.x)??0,y:fe.position_y??((Te=ee==null?void 0:ee.get(fe.id))==null?void 0:Te.y)??0},data:{todo:fe,allTodos:e,selected:fe.id===A,onStart:s,onStop:l,onDelete:c,onMerge:h,onCleanup:m,onRetry:g,onFix:b,onSelect:F}}}),oe=e.filter(fe=>fe.depends_on).map(fe=>{var Te;const Ce=((Te=e.find(pe=>pe.id===fe.depends_on))==null?void 0:Te.status)??"pending";return{id:`e-${fe.depends_on}-${fe.id}`,source:fe.depends_on,target:fe.id,type:"smoothstep",animated:Ce==="running",style:{stroke:Ak[Ce]??"#B8A88A",strokeWidth:2},markerEnd:{type:hf.ArrowClosed,width:16,height:16,color:Ak[Ce]??"#B8A88A"}}});return{initialNodes:ae,initialEdges:oe}},[e,A,s,l,c,h,m,g,b,F]),[L,G,W]=Dge(R),[Y,B,H]=Rge(M);x.useEffect(()=>{G(R),B(M)},[R,M,G,B]);const K=x.useCallback(ce=>{!ce.source||!ce.target||!w||Mz(e,ce.source,ce.target)||w(ce.target,ce.source)},[e,w]),U=x.useCallback(ce=>{if(w)for(const ee of ce)w(ee.target,null)},[w]),X=x.useCallback((ce,ee)=>{S&&S(ee.id,ee.position.x,ee.position.y)},[S]),J=x.useRef(!0),Q=x.useCallback(()=>{J.current=!1},[]),re=x.useCallback((ce,ee)=>{J.current=!0,!(!w||!ee.source||!ee.target)&&(w(ce.target,null),Mz(e,ee.source,ee.target)||w(ee.target,ee.source))},[e,w]),ue=x.useCallback((ce,ee)=>{!J.current&&w&&w(ee.target,null),J.current=!0},[w]),Z=x.useCallback(()=>{const{nodePositions:ce}=Oz(e);if(G(ee=>ee.map(ae=>{const oe=ce.get(ae.id);return oe?{...ae,position:oe}:ae})),S)for(const[ee,ae]of ce)S(ee,ae.x,ae.y)},[e,G,S]),se=A?e.find(ce=>ce.id===A):null;return f.jsxs("div",{className:"flex gap-0 h-[600px]",children:[f.jsxs("div",{className:"flex-1 rounded-xl border border-warm-200 overflow-hidden bg-warm-50 ",children:[f.jsxs(Pge,{nodes:L,edges:Y,onNodesChange:W,onEdgesChange:H,onConnect:K,onEdgesDelete:U,onReconnectStart:Q,onReconnect:re,onReconnectEnd:ue,onNodeDragStop:X,nodeTypes:O0e,fitView:!0,fitViewOptions:{padding:.2},minZoom:.3,maxZoom:2,deleteKeyCode:"Delete",proOptions:{hideAttribution:!0},children:[f.jsx(qge,{variant:Xi.Dots,gap:20,size:1,color:z?"#4A4A60":"#D4B896",style:{opacity:.3}}),f.jsx(Kge,{showInteractive:!1,className:"!bg-theme-card !border-warm-200 !shadow-soft !rounded-lg"}),f.jsx(sve,{nodeColor:ce=>{var oe;const ee=ce.data,ae=((oe=ee==null?void 0:ee.todo)==null?void 0:oe.status)??"pending";return Ak[ae]??"#B8A88A"},maskColor:z?"rgba(23, 23, 31, 0.7)":"rgba(245, 241, 235, 0.7)",className:"!bg-theme-card !border-warm-200 !shadow-soft !rounded-lg"})]}),f.jsxs("div",{className:"absolute top-3 right-3 flex items-center gap-2 z-10",children:[f.jsxs("button",{onClick:Z,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-theme-card border border-warm-200 rounded-lg shadow-soft hover:bg-warm-50 text-warm-600 transition-colors",title:D("graph.autoLayout"),children:[f.jsx(dC,{size:14}),D("graph.autoLayout")]}),f.jsxs("button",{onClick:()=>P(!0),className:"btn-primary text-xs py-1.5",children:[f.jsx(sc,{size:14}),D("todos.add")]})]})]}),se&&f.jsx(T0e,{todo:se,allTodos:e,projectIsGitRepo:r,projectUseWorktree:a,onClose:()=>O(null),onEdit:d,onStart:s,onStop:l,onMerge:h,onCleanup:m,onRetry:g,onContinue:v,onFix:b,onEvent:j,isInteractive:k.has(se.id),onSendInput:_,debugLogging:E,showTokenUsage:T}),I&&f.jsx(ts,{open:!0,onClose:()=>P(!1),size:"lg",children:f.jsx(Zg,{projectCliTool:t,projectCliModel:n,projectIsGitRepo:r,projectUseWorktree:a,availableTodos:e,onSave:async(ce,ee,ae,oe,fe,Ce,Te,pe)=>{await i(ce,ee,ae,oe,fe,Ce,Te,pe),P(!1)},onCancel:()=>P(!1)})})]})}const Vm={all:null,active:["pending","running"],completed:["completed","merged"],cancelled:["stopped","failed"]};function Pz(e,t,n){let r=n;const a=new Set;for(;r;){if(r===t)return!0;if(a.has(r))return!1;a.add(r);const i=e.find(s=>s.id===r);r=(i==null?void 0:i.depends_on)??null}return!1}function P0e({todos:e,projectCliTool:t,projectCliModel:n,projectIsGitRepo:r,projectUseWorktree:a,onAddTodo:i,onStartTodo:s,onStopTodo:l,onDeleteTodo:c,onEditTodo:d,onMergeTodo:h,onMergeChain:m,onCleanupTodo:g,onRetryTodo:v,onContinueTodo:b,onFixTodo:w,onScheduleTodo:S,onScheduleOnResetTodo:j,resetsAt:_,onUpdateDependency:k,onUpdatePosition:E,onReorderTodos:T,onEvent:A,onSendInput:O,interactiveTodos:I,debugLogging:P,showTokenUsage:D}){var lt;const[q,z]=x.useState(!1),[F,R]=x.useState(null),[M,L]=x.useState(null),[G,W]=x.useState(null),[Y,B]=x.useState(()=>{try{return localStorage.getItem("todoViewMode")||"list"}catch{return"list"}}),[H,K]=x.useState(()=>{try{return localStorage.getItem("todoStatusFilter")||"all"}catch{return"all"}}),[U,X]=x.useState(()=>{try{return localStorage.getItem("todoStackModeEnabled")==="true"}catch{return!1}}),[J,Q]=x.useState(()=>{try{return localStorage.getItem("todoStackCollapsed")==="true"}catch{return!1}}),{t:re}=Ze(),ue=x.useCallback(Me=>{B(Me);try{localStorage.setItem("todoViewMode",Me)}catch{}},[]),Z=x.useCallback(Me=>{K(Me);try{localStorage.setItem("todoStatusFilter",Me)}catch{}},[]),se=x.useCallback(()=>{X(Me=>{const $e=!Me;try{localStorage.setItem("todoStackModeEnabled",String($e))}catch{}if(!$e){Q(!1);try{localStorage.setItem("todoStackCollapsed","false")}catch{}}return $e})},[]),ce=x.useCallback(()=>{Q(Me=>{const $e=!Me;try{localStorage.setItem("todoStackCollapsed",String($e))}catch{}return $e})},[]),ee=U&&J&&Y==="list",ae=x.useMemo(()=>({all:e.length,active:e.filter(Me=>Vm.active.includes(Me.status)).length,completed:e.filter(Me=>Vm.completed.includes(Me.status)).length,cancelled:e.filter(Me=>Vm.cancelled.includes(Me.status)).length}),[e]),oe=x.useMemo(()=>{const Me=Vm[H];return Me?e.filter($e=>Me.includes($e.status)):e},[e,H]),fe=(()=>{const Me=[...oe].sort((Je,At)=>Je.priority-At.priority);if(H!=="all"||ee)return Me.map(Je=>({todo:Je,depth:0}));const $e=new Map,Qe=[];for(const Je of Me)if(Je.depends_on){const At=$e.get(Je.depends_on)||[];At.push(Je),$e.set(Je.depends_on,At)}else Qe.push(Je);const vt=[],st=new Set,Et=(Je,At)=>{if(st.has(Je.id))return;st.add(Je.id),vt.push({todo:Je,depth:At});const It=$e.get(Je.id);if(It)for(const hn of It)Et(hn,At+1)};for(const Je of Qe)Et(Je,0);for(const Je of Me)st.has(Je.id)||vt.push({todo:Je,depth:0});return vt})(),{completedChainRoots:Ce,completedChainMembers:Te}=x.useMemo(()=>{const Me=new Map;for(const st of e)if(st.depends_on){const Et=Me.get(st.depends_on)||[];Et.push(st.id),Me.set(st.depends_on,Et)}const $e=e.filter(st=>!st.depends_on&&Me.has(st.id)),Qe=new Map,vt=new Set;for(const st of $e){const Et=[],Je=At=>{if(!e.find(ne=>ne.id===At))return;Et.push(At);const hn=Me.get(At)||[];for(const ne of hn)Je(ne)};if(Je(st.id),Et.length>=2&&Et.every(At=>{const It=e.find(hn=>hn.id===At);return(It==null?void 0:It.status)==="completed"||(It==null?void 0:It.status)==="merged"})){Qe.set(st.id,Et.length);for(const At of Et)vt.add(At)}}return{completedChainRoots:Qe,completedChainMembers:vt}},[e]),[pe,De]=x.useState(null),[Xe,We]=x.useState(null),at=x.useCallback(async Me=>{if(m){De(Me),We(null);try{await m(Me)}catch($e){We($e instanceof Error?$e.message:"Merge failed")}finally{De(null)}}},[m]),Ne=x.useRef(!1),Fe=x.useCallback(Me=>{Ne.current=!1,R(Me)},[]),ye=x.useCallback(async()=>{if(!Ne.current&&F&&k){const Me=e.find($e=>$e.id===F);Me!=null&&Me.depends_on&&await k(F,null)}R(null),L(null),W(null)},[F,e,k]),le=x.useCallback(Me=>{L(Me),W(null)},[]),me=x.useCallback(Me=>{L($e=>$e===Me?null:$e)},[]),Oe=x.useCallback(async Me=>{!F||!k||F!==Me&&(Pz(e,F,Me)||(Ne.current=!0,await k(F,Me),R(null),L(null),W(null)))},[F,e,k]),Pe=x.useCallback(async Me=>{k&&await k(Me,null)},[k]),be=x.useCallback(Me=>!F||F===Me?!1:!Pz(e,F,Me),[F,e]),nt=x.useCallback(Me=>{W(Me),L(null)},[]),ot=x.useCallback(Me=>{W($e=>$e===Me?null:$e)},[]),gt=x.useCallback(async(Me,$e)=>{if(!F||!T)return;const Qe=$e.indexOf(F);if(Qe<0)return;const vt=$e.filter(Je=>Je!==F),st=Me>Qe?Me-1:Me;if(st===Qe){W(null);return}const Et=[...vt.slice(0,st),F,...vt.slice(st)];Ne.current=!0,await T(Et),R(null),W(null),L(null)},[F,T]);return Y==="graph"?f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center justify-between mb-5",children:[f.jsx("h2",{className:"text-sm font-semibold text-warm-600 uppercase tracking-wider",children:re("todos.title")}),f.jsx("div",{className:"flex items-center gap-2",children:f.jsxs("div",{className:"flex items-center bg-warm-100 rounded-lg p-0.5",children:[f.jsx("button",{onClick:()=>ue("list"),className:"p-1.5 rounded-md transition-colors text-warm-400 hover:text-warm-600",title:re("graph.listView"),children:f.jsx(JP,{size:14})}),f.jsx("button",{onClick:()=>ue("graph"),className:"p-1.5 rounded-md transition-colors bg-theme-card shadow-sm text-accent",title:re("graph.graphView"),children:f.jsx(dC,{size:14})})]})})]}),f.jsx(M0e,{todos:e,projectCliTool:t,projectCliModel:n,projectIsGitRepo:r,projectUseWorktree:a,onAddTodo:i,onStartTodo:s,onStopTodo:l,onDeleteTodo:c,onEditTodo:d,onMergeTodo:h,onCleanupTodo:g,onRetryTodo:v,onContinueTodo:b,onFixTodo:w,onUpdateDependency:k,onUpdatePosition:E,onEvent:A,onSendInput:O,interactiveTodos:I,debugLogging:P,showTokenUsage:D})]}):f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center justify-between mb-5",children:[f.jsx("h2",{className:"text-sm font-semibold text-warm-600 uppercase tracking-wider",children:re("todos.title")}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsxs("div",{className:"flex items-center bg-warm-100 rounded-lg p-0.5",children:[f.jsx("button",{onClick:()=>ue("list"),className:"p-1.5 rounded-md transition-colors bg-theme-card shadow-sm text-accent",title:re("graph.listView"),children:f.jsx(JP,{size:14})}),f.jsx("button",{onClick:()=>ue("graph"),className:"p-1.5 rounded-md transition-colors text-warm-400 hover:text-warm-600",title:re("graph.graphView"),children:f.jsx(dC,{size:14})})]}),f.jsx("button",{onClick:se,className:`p-1.5 rounded-md transition-colors ${U?"bg-accent/10 text-accent":"text-warm-400 hover:text-warm-600 hover:bg-warm-100"}`,title:re(U?"todos.stackModeOn":"todos.stackModeOff"),children:f.jsx(dte,{size:14})}),U&&!J&&Y==="list"&&fe.length>0&&f.jsx("button",{onClick:ce,className:"p-1.5 rounded-md transition-colors text-warm-400 hover:text-warm-600 hover:bg-warm-100",title:re("todos.collapseStack"),children:f.jsx(Eee,{size:14})}),!q&&f.jsxs("button",{onClick:()=>z(!0),className:"btn-primary text-xs py-2",children:[f.jsx(sc,{size:14}),re("todos.add")]})]})]}),q&&f.jsx("div",{className:"mb-5 animate-slide-up",children:f.jsx(Zg,{projectCliTool:t,projectCliModel:n,projectIsGitRepo:r,projectUseWorktree:a,availableTodos:e,onSave:async(Me,$e,Qe,vt,st,Et,Je,At)=>{await i(Me,$e,Qe,vt,st,Et,Je,At),z(!1)},onCancel:()=>z(!1)})}),f.jsx("div",{className:"flex items-center gap-1 mb-4 bg-warm-100 rounded-lg p-0.5 w-fit",children:["all","active","completed","cancelled"].map(Me=>{const $e=H===Me,Qe=Me==="all"?"todos.filterAll":Me==="active"?"todos.filterActive":Me==="completed"?"todos.filterCompleted":"todos.filterCancelled";return f.jsxs("button",{onClick:()=>Z(Me),className:`inline-flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-medium transition-colors ${$e?"bg-theme-card shadow-sm text-accent":"text-warm-500 hover:text-warm-700"}`,children:[f.jsx("span",{children:re(Qe)}),f.jsx("span",{className:`text-2xs font-mono ${$e?"text-accent/70":"text-warm-400"}`,children:ae[Me]})]},Me)})}),f.jsx("div",{className:ee?"relative cursor-pointer":"space-y-3",onClick:ee?ce:void 0,title:ee?re("todos.expandStack"):void 0,style:ee?{height:76+Math.max(fe.length-1,0)*6}:void 0,children:fe.length===0?f.jsx("div",{className:"card",children:f.jsx(xl,{icon:qee,title:re(H==="all"?"todos.empty":"todos.filterEmpty"),description:H==="all"?re("todos.emptyHint"):void 0})}):(()=>{const Me=fe.map(({todo:Qe})=>Qe.id),$e=Qe=>{if(ee||!T)return null;const vt=F!==null&&G===Qe;return f.jsx("div",{onDragEnter:st=>{st.preventDefault(),nt(Qe)},onDragOver:st=>{st.preventDefault(),st.stopPropagation(),st.dataTransfer.dropEffect="link",nt(Qe)},onDragLeave:()=>ot(Qe),onDrop:st=>{st.preventDefault(),st.stopPropagation(),gt(Qe,Me)},className:"relative",style:{height:16,marginTop:-8,marginBottom:-8},children:vt&&f.jsx("div",{className:"absolute inset-x-0 top-1/2 -translate-y-1/2 h-0.5 bg-accent rounded-full shadow-[0_0_6px_rgba(0,0,0,0.15)]"})},`gap-${Qe}`)};return f.jsxs(f.Fragment,{children:[$e(0),fe.map(({todo:Qe,depth:vt},st)=>{const Et=Ce.has(Qe.id),Je=Te.has(Qe.id),At=6,It="top 400ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 300ms ease",hn=ee?{position:"absolute",top:st*At,left:0,right:0,zIndex:fe.length+10-st,opacity:st===0?1:.9,pointerEvents:st===0?"auto":"none",transition:It}:{transition:It};return f.jsxs("div",{className:ee?"":"animate-fade-in",style:ee?hn:{animationDelay:`${st*30}ms`,...hn},children:[!ee&&Et&&f.jsxs("div",{className:"flex items-center gap-2 mb-2 px-3 py-2 rounded-lg bg-status-merged/5 border border-status-merged/20 animate-slide-up",style:{animationDelay:`${st*30}ms`},children:[f.jsx(tf,{size:16,className:"text-status-merged flex-shrink-0"}),f.jsx("span",{className:"text-xs font-semibold text-status-merged",children:re("todo.chainComplete")}),f.jsx("span",{className:"text-2xs font-mono text-warm-400",children:re("todo.chainTasks").replace("{count}",String(Ce.get(Qe.id)))}),f.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[Xe&&pe===null&&f.jsx("span",{className:"text-2xs text-status-error",children:Xe}),f.jsxs("button",{onClick:()=>at(Qe.id),disabled:pe===Qe.id,className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium bg-status-merged/15 text-status-merged hover:bg-status-merged/25 border border-status-merged/30 transition-colors disabled:opacity-50",title:re("todo.mergeChainDesc"),children:[f.jsx(ree,{size:14}),pe===Qe.id?"...":re("todo.mergeChain")]})]})]}),f.jsxs("div",{className:"relative animate-fade-in",style:{animationDelay:`${st*30}ms`,marginLeft:vt>0?`${vt*24}px`:void 0},children:[vt>0&&f.jsx("div",{className:"absolute top-0 bottom-0 w-px",style:{left:"-13px",backgroundColor:"var(--color-border)"}}),f.jsx(rce,{todo:Qe,allTodos:e,projectCliTool:t,projectIsGitRepo:r,projectUseWorktree:a,onStart:s,onStop:l,onDelete:c,onEdit:d,onMerge:h,onCleanup:g,onRetry:v,onContinue:b,onFix:w,onSchedule:S,onScheduleOnReset:j,resetsAt:_,onEvent:A,isInteractive:I.has(Qe.id),onSendInput:O,isDragSource:F===Qe.id,isDragging:F!==null,isDragOver:M===Qe.id,isValidDropTarget:be(Qe.id),onDragStart:Fe,onDragEnd:ye,onDragOverTarget:le,onDragLeaveTarget:me,onDropTarget:Oe,onRemoveDependency:k?Pe:void 0,debugLogging:P,showTokenUsage:D,isChainMember:Je})]}),$e(st+1)]},Qe.id)})]})})()}),!ee&&F&&((lt=e.find(Me=>Me.id===F))==null?void 0:lt.depends_on)&&f.jsxs("div",{className:"mt-3 border-2 border-dashed border-red-300 rounded-lg p-4 text-center text-sm text-red-400 transition-colors hover:border-red-400 hover:text-red-500 hover:bg-red-50",onDragOver:Me=>{Me.preventDefault(),Me.dataTransfer.dropEffect="move"},onDrop:Me=>{Me.preventDefault(),F&&k&&(Ne.current=!0,k(F,null))},children:[f.jsx(Yte,{size:20,className:"mx-auto mb-1"}),re("dnd.dropToRemoveDep")]})]})}const D0e=[{value:1,labelKey:"cron.mon"},{value:2,labelKey:"cron.tue"},{value:3,labelKey:"cron.wed"},{value:4,labelKey:"cron.thu"},{value:5,labelKey:"cron.fri"},{value:6,labelKey:"cron.sat"},{value:0,labelKey:"cron.sun"}];function R0e(e){const t={mode:"daily",everyMinutes:30,hourlyMinute:0,dailyHour:9,dailyMinute:0,weeklyDays:[1,2,3,4,5],weeklyHour:9,weeklyMinute:0,monthlyDay:1,monthlyHour:9,monthlyMinute:0};if(!e)return t;const n=e.trim().split(/\s+/);if(n.length!==5)return{...t,mode:"custom"};const[r,a,i,,s]=n,l=r.match(/^\*\/(\d+)$/);if(l&&a==="*"&&i==="*"&&s==="*")return{...t,mode:"minutes",everyMinutes:parseInt(l[1])};if(/^\d+$/.test(r)&&a==="*"&&i==="*"&&s==="*")return{...t,mode:"hourly",hourlyMinute:parseInt(r)};const c=/^\d+$/.test(r)?parseInt(r):-1,d=/^\d+$/.test(a)?parseInt(a):-1;if(c<0||d<0)return{...t,mode:"custom"};if(i==="*"&&s!=="*"){const h=s.split(",").map(m=>{const g=parseInt(m);return isNaN(g)?-1:g}).filter(m=>m>=0);if(h.length>0)return{...t,mode:"weekly",weeklyDays:h,weeklyHour:d,weeklyMinute:c}}return/^\d+$/.test(i)&&s==="*"?{...t,mode:"monthly",monthlyDay:parseInt(i),monthlyHour:d,monthlyMinute:c}:i==="*"&&s==="*"?{...t,mode:"daily",dailyHour:d,dailyMinute:c}:{...t,mode:"custom"}}function Dz(e){switch(e.mode){case"minutes":return`*/${e.everyMinutes} * * * *`;case"hourly":return`${e.hourlyMinute} * * * *`;case"daily":return`${e.dailyMinute} ${e.dailyHour} * * *`;case"weekly":return`${e.weeklyMinute} ${e.weeklyHour} * * ${e.weeklyDays.sort((t,n)=>t-n).join(",")}`;case"monthly":return`${e.monthlyMinute} ${e.monthlyHour} ${e.monthlyDay} * *`;default:return""}}function I0e({value:e,onChange:t}){const{t:n}=Ze(),[r,a]=x.useState(()=>R0e(e)),[i,s]=x.useState(e);x.useEffect(()=>{if(r.mode==="custom")t(i);else{const v=Dz(r);t(v)}},[r,i]);const l=v=>{a(b=>({...b,...v}))},c=v=>{a(b=>{const w=b.weeklyDays.includes(v)?b.weeklyDays.filter(S=>S!==v):[...b.weeklyDays,v];return{...b,weeklyDays:w.length>0?w:b.weeklyDays}})},d=[{value:"minutes",labelKey:"cron.everyMinutes"},{value:"hourly",labelKey:"cron.hourly"},{value:"daily",labelKey:"cron.daily"},{value:"weekly",labelKey:"cron.weekly"},{value:"monthly",labelKey:"cron.monthly"},{value:"custom",labelKey:"cron.custom"}],h="bg-warm-50 border border-warm-300 rounded-lg px-2 py-1.5 text-sm text-warm-800 font-mono text-center transition-all duration-200 focus:border-accent focus:outline-none focus:ring-2 focus:ring-accent/20",m=(v,b,w,S)=>f.jsxs("div",{className:"flex items-center gap-1.5",children:[f.jsx("select",{value:v,onChange:j=>w(parseInt(j.target.value)),className:`${h} w-16`,children:Array.from({length:24},(j,_)=>f.jsx("option",{value:_,children:String(_).padStart(2,"0")},_))}),f.jsx("span",{className:"text-warm-500 font-mono",children:":"}),f.jsx("select",{value:b,onChange:j=>S(parseInt(j.target.value)),className:`${h} w-16`,children:Array.from({length:12},(j,_)=>_*5).map(j=>f.jsx("option",{value:j,children:String(j).padStart(2,"0")},j))})]}),g=r.mode==="custom"?i:Dz(r);return f.jsxs("div",{className:"space-y-3",children:[f.jsx("div",{className:"flex flex-wrap gap-1.5",children:d.map(v=>f.jsx("button",{type:"button",onClick:()=>l({mode:v.value}),className:`px-2.5 py-1 rounded-md text-xs font-medium transition-colors ${r.mode===v.value?"bg-amber-500 text-white":"bg-warm-100 text-warm-500 hover:bg-warm-200"}`,children:n(v.labelKey)},v.value))}),f.jsxs("div",{className:"bg-warm-50 rounded-lg p-3",children:[r.mode==="minutes"&&f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"text-sm text-warm-600",children:n("cron.every")}),f.jsx("select",{value:r.everyMinutes,onChange:v=>l({everyMinutes:parseInt(v.target.value)}),className:`${h} w-20`,children:[5,10,15,20,30].map(v=>f.jsx("option",{value:v,children:v},v))}),f.jsx("span",{className:"text-sm text-warm-600",children:n("cron.minutesLabel")})]}),r.mode==="hourly"&&f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"text-sm text-warm-600",children:n("cron.everyHourAt")}),f.jsx("select",{value:r.hourlyMinute,onChange:v=>l({hourlyMinute:parseInt(v.target.value)}),className:`${h} w-16`,children:Array.from({length:12},(v,b)=>b*5).map(v=>f.jsx("option",{value:v,children:String(v).padStart(2,"0")},v))}),f.jsx("span",{className:"text-sm text-warm-600",children:n("cron.minutesPast")})]}),r.mode==="daily"&&f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"text-sm text-warm-600",children:n("cron.everyDayAt")}),m(r.dailyHour,r.dailyMinute,v=>l({dailyHour:v}),v=>l({dailyMinute:v}))]}),r.mode==="weekly"&&f.jsxs("div",{className:"space-y-3",children:[f.jsx("div",{className:"flex flex-wrap gap-1.5",children:D0e.map(v=>f.jsx("button",{type:"button",onClick:()=>c(v.value),className:`w-9 h-9 rounded-lg text-xs font-medium transition-colors ${r.weeklyDays.includes(v.value)?"bg-amber-500 text-white":"bg-theme-card text-warm-500 border border-warm-200 hover:border-amber-300"}`,children:n(v.labelKey)},v.value))}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"text-sm text-warm-600",children:n("cron.at")}),m(r.weeklyHour,r.weeklyMinute,v=>l({weeklyHour:v}),v=>l({weeklyMinute:v}))]})]}),r.mode==="monthly"&&f.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[f.jsx("span",{className:"text-sm text-warm-600",children:n("cron.everyMonthOn")}),f.jsx("select",{value:r.monthlyDay,onChange:v=>l({monthlyDay:parseInt(v.target.value)}),className:`${h} w-16`,children:Array.from({length:28},(v,b)=>b+1).map(v=>f.jsx("option",{value:v,children:v},v))}),f.jsx("span",{className:"text-sm text-warm-600",children:n("cron.dayAt")}),m(r.monthlyHour,r.monthlyMinute,v=>l({monthlyHour:v}),v=>l({monthlyMinute:v}))]}),r.mode==="custom"&&f.jsxs("div",{children:[f.jsx("input",{type:"text",placeholder:"*/30 * * * *",value:i,onChange:v=>s(v.target.value),className:"bg-warm-50 border border-warm-300 rounded-lg px-3 py-1.5 w-full text-sm text-warm-800 font-mono transition-all duration-200 focus:border-accent focus:outline-none focus:ring-2 focus:ring-accent/20"}),f.jsx("p",{className:"text-2xs text-warm-400 mt-1",children:n("schedule.cronHint")})]})]}),r.mode!=="custom"&&g&&f.jsxs("div",{className:"flex items-center gap-2 text-[11px]",children:[f.jsxs("span",{className:"text-warm-400",children:[n("cron.expression"),":"]}),f.jsx("code",{className:"px-2 py-0.5 rounded bg-warm-100 text-warm-600 font-mono",children:g})]})]})}function L0e(){const e=new Date;e.setHours(e.getHours()+1),e.setMinutes(0,0,0);const t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0"),a=String(e.getHours()).padStart(2,"0"),i=String(e.getMinutes()).padStart(2,"0");return`${t}-${n}-${r}T${a}:${i}`}function z0e(e){const t=new Date(e),n=t.getFullYear(),r=String(t.getMonth()+1).padStart(2,"0"),a=String(t.getDate()).padStart(2,"0"),i=String(t.getHours()).padStart(2,"0"),s=String(t.getMinutes()).padStart(2,"0");return`${n}-${r}-${a}T${i}:${s}`}function k7({onSave:e,onCancel:t,initialTitle:n="",initialDescription:r="",initialCronExpression:a="",initialCliTool:i,initialCliModel:s,initialSkipIfRunning:l=!0,initialScheduleType:c="recurring",initialRunAt:d,projectCliTool:h="claude",projectCliModel:m=""}){const[g,v]=x.useState(n),[b,w]=x.useState(r),[S,j]=x.useState(a),[_,k]=x.useState(i||h||"claude"),[E,T]=x.useState(s??m??""),[A,O]=x.useState(l),[I,P]=x.useState(c),[D,q]=x.useState(d?z0e(d):L0e()),{t:z}=Ze(),{getToolConfig:F}=oc(),R=F(_),M=Y=>{k(Y),T("")},L=I==="once",G=g.trim()&&(L?!!D:!!S.trim()),W=Y=>{Y.preventDefault(),G&&e({title:g.trim(),description:b.trim(),cronExpression:L?"":S.trim(),cliTool:_,cliModel:E||void 0,skipIfRunning:A,scheduleType:I,runAt:L?new Date(D).toISOString():void 0})};return f.jsxs("form",{onSubmit:W,className:"card p-5 border-amber-500/30",children:[f.jsx("div",{className:"mb-3",children:f.jsx("input",{type:"text",placeholder:z("scheduleForm.titlePlaceholder"),value:g,onChange:Y=>v(Y.target.value),className:"input-field",autoFocus:!0})}),f.jsx("div",{className:"mb-3",children:f.jsx("textarea",{placeholder:z("scheduleForm.descPlaceholder"),value:b,onChange:Y=>w(Y.target.value),rows:3,className:"input-field resize-none"})}),f.jsxs("div",{className:"mb-3",children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-1.5",children:z("schedule.type")}),f.jsxs("div",{className:"flex gap-1.5",children:[f.jsx("button",{type:"button",onClick:()=>P("recurring"),className:`px-3 py-1.5 rounded-md text-xs font-medium transition-colors ${I==="recurring"?"bg-amber-500 text-white":"bg-warm-100 text-warm-500 hover:bg-warm-200"}`,children:z("schedule.recurring")}),f.jsx("button",{type:"button",onClick:()=>P("once"),className:`px-3 py-1.5 rounded-md text-xs font-medium transition-colors ${I==="once"?"bg-amber-500 text-white":"bg-warm-100 text-warm-500 hover:bg-warm-200"}`,children:z("schedule.once")})]})]}),L?f.jsxs("div",{className:"mb-3",children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-1.5",children:z("schedule.runAtLabel")}),f.jsx("input",{type:"datetime-local",value:D,onChange:Y=>q(Y.target.value),className:"input-field text-sm font-mono",min:new Date().toISOString().slice(0,16)})]}):f.jsxs("div",{className:"mb-3",children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-1.5",children:z("schedule.cronExpression")}),f.jsx(I0e,{value:S,onChange:j})]}),f.jsxs("div",{className:"mb-3 grid grid-cols-2 gap-3",children:[f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-1.5",children:z("scheduleForm.cliTool")}),f.jsx("select",{value:_,onChange:Y=>M(Y.target.value),className:"input-field text-sm !py-2",children:ii.map(Y=>f.jsx("option",{value:Y.value,children:Y.label},Y.value))})]}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-1.5",children:z("scheduleForm.aiModel")}),f.jsx("select",{value:E,onChange:Y=>T(Y.target.value),className:"input-field text-sm !py-2",children:R.models.map(Y=>f.jsx("option",{value:Y.value,children:Y.label},Y.value))})]})]}),!L&&f.jsx("div",{className:"mb-4",children:f.jsxs("label",{className:"flex items-center gap-2 text-sm text-warm-600 cursor-pointer",children:[f.jsx("input",{type:"checkbox",checked:A,onChange:Y=>O(Y.target.checked),className:"rounded border-warm-300 text-amber-500 focus:ring-amber-500"}),z("schedule.skipIfRunning")]})}),f.jsxs("div",{className:"flex gap-3 justify-end",children:[f.jsx("button",{type:"button",onClick:t,className:"btn-ghost text-sm",children:z("scheduleForm.cancel")}),f.jsx("button",{type:"submit",disabled:!G,className:"btn-primary text-sm",children:z("scheduleForm.save")})]})]})}function $0e({schedule:e,onToggle:t,onDelete:n,onEdit:r,onTrigger:a,onMergeRun:i,onCleanupRun:s}){const[l,c]=x.useState(!1),[d,h]=x.useState(!1),[m,g]=x.useState([]),[v,b]=x.useState(!1),[w,S]=x.useState(!1),[j,_]=x.useState(null),{t:k}=Ze(),E=async()=>{try{const M=await D0(e.id);g(M)}catch{}},T=async M=>{if(!(!M.todo_id||!i)){_(M.id);try{await i(M.todo_id),await E()}finally{_(null)}}},A=async M=>{if(!(!M.todo_id||!s)){_(M.id);try{await s(M.todo_id),await E()}finally{_(null)}}},O=e.schedule_type==="once",I=async()=>{if(!v)try{const M=await D0(e.id);g(M),b(!0)}catch{}},P=()=>{const M=!l;c(M),M&&I()},D=async()=>{S(!0);try{await a(e.id);const M=await D0(e.id);g(M),b(!0)}finally{S(!1)}};if(d)return f.jsx(k7,{initialTitle:e.title,initialDescription:e.description??"",initialCronExpression:O?"":e.cron_expression,initialCliTool:e.cli_tool??void 0,initialCliModel:e.cli_model??void 0,initialSkipIfRunning:!!e.skip_if_running,initialScheduleType:e.schedule_type,initialRunAt:e.run_at??void 0,onSave:async M=>{await r(e.id,{title:M.title,description:M.description,cron_expression:M.cronExpression||void 0,cli_tool:M.cliTool,cli_model:M.cliModel,skip_if_running:M.skipIfRunning,schedule_type:M.scheduleType,run_at:M.runAt}),h(!1)},onCancel:()=>h(!1)});const q=e.is_active?"border-l-amber-500":"border-l-warm-300",z={triggered:"text-status-running",skipped:"text-status-warning",completed:"text-status-success",failed:"text-status-error"},F={triggered:k("schedule.runTriggered"),skipped:k("schedule.runSkipped"),completed:k("schedule.runCompleted"),failed:k("schedule.runFailed")},R=M=>M?new Date(M).toLocaleString():"";return f.jsxs("div",{className:`card border-l-4 ${q} overflow-hidden`,children:[f.jsxs("div",{className:"flex items-center gap-3 px-4 py-3.5 cursor-pointer hover:bg-warm-50 transition-colors",onClick:P,children:[f.jsx("button",{className:"text-warm-400 hover:text-amber-500 flex-shrink-0 transition-colors",children:f.jsx(zu,{size:14,className:`transition-transform duration-200 ${l?"rotate-90":""}`})}),f.jsx("span",{className:"flex-1 text-sm text-warm-800 font-medium truncate",children:e.title}),O?f.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-2xs font-mono font-medium bg-blue-500/10 text-blue-600 flex-shrink-0",children:[f.jsx(Jd,{size:12}),R(e.run_at)]}):f.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded-full text-2xs font-mono font-medium bg-amber-500/10 text-amber-600 flex-shrink-0",children:e.cron_expression}),f.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded-full text-2xs font-semibold ${O?"bg-blue-500/10 text-blue-600":"bg-amber-500/10 text-amber-600"}`,children:k(O?"schedule.once":"schedule.recurring")}),f.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded-full text-2xs font-semibold ${e.is_active?"bg-status-success/10 text-status-success":"bg-warm-200 text-warm-500"}`,children:e.is_active?k("schedule.active"):k("schedule.paused")}),f.jsxs("div",{className:"flex items-center gap-0.5 ml-2",onClick:M=>M.stopPropagation(),children:[f.jsx("button",{onClick:D,disabled:w,className:"p-1.5 text-amber-500/60 hover:text-amber-500 hover:bg-amber-500/10 rounded-lg transition-colors disabled:opacity-30",title:k("schedule.trigger"),children:f.jsx(yl,{size:14})}),f.jsx("button",{onClick:()=>t(e.id,!e.is_active),className:`p-1.5 rounded-lg transition-colors ${e.is_active?"text-status-warning/60 hover:text-status-warning hover:bg-status-warning/10":"text-status-success/60 hover:text-status-success hover:bg-status-success/10"}`,title:e.is_active?k("schedule.pause"):k("schedule.activate"),children:e.is_active?f.jsx(W2,{size:14}):f.jsx(wee,{size:14})}),f.jsx("button",{onClick:()=>h(!0),className:"p-1.5 text-warm-400 hover:text-accent hover:bg-accent/10 rounded-lg transition-colors",title:k("schedule.edit"),children:f.jsx(Df,{size:14})}),f.jsx("button",{onClick:()=>n(e.id),className:"p-1.5 text-warm-400 hover:text-status-error hover:bg-status-error/10 rounded-lg transition-colors",title:k("schedule.delete"),children:f.jsx(es,{size:14})})]})]}),l&&f.jsxs("div",{className:"border-t border-warm-200 px-5 py-5 space-y-4 animate-fade-in bg-warm-50/50",children:[e.description&&f.jsx("div",{children:f.jsx("p",{className:"text-sm text-warm-600 whitespace-pre-wrap leading-relaxed",children:e.description})}),f.jsxs("div",{className:"flex flex-wrap gap-2 text-xs",children:[O?f.jsxs("span",{className:"badge bg-blue-500/10 text-blue-600 font-mono",children:[k("schedule.runAtLabel"),": ",R(e.run_at)]}):f.jsx("span",{className:"badge bg-amber-500/10 text-amber-600 font-mono",children:e.cron_expression}),!O&&e.skip_if_running?f.jsx("span",{className:"badge bg-status-info/10 text-status-info",children:k("schedule.skipIfRunning")}):null,f.jsxs("span",{className:"badge bg-warm-200 text-warm-600",children:[k("schedule.lastRun"),": ",e.last_run_at?new Date(e.last_run_at).toLocaleString():k("schedule.never")]})]}),f.jsxs("div",{children:[f.jsx("h4",{className:"text-xs font-semibold text-warm-500 uppercase tracking-wider mb-2",children:k("schedule.runs")}),m.length===0?f.jsx("p",{className:"text-xs text-warm-400 italic",children:k("schedule.noRuns")}):f.jsx("div",{className:"max-h-48 overflow-auto space-y-1",children:m.map(M=>{const L=M.todo_id&&M.todo_status==="completed"&&!!M.todo_branch_name,G=M.todo_id&&M.todo_status!=="running"&&M.todo_status!=="pending"&&(M.todo_worktree_path||M.todo_branch_name),W=j===M.id;return f.jsxs("div",{className:"flex items-center gap-3 text-xs py-1.5 px-3 rounded-lg bg-theme-hover",children:[f.jsx("span",{className:`font-medium ${z[M.status]||"text-warm-500"}`,children:F[M.status]||M.status}),M.skipped_reason&&f.jsxs("span",{className:"text-warm-400",children:["(",M.skipped_reason,")"]}),f.jsxs("div",{className:"flex items-center gap-0.5 ml-auto",children:[L&&i&&f.jsx("button",{onClick:()=>T(M),disabled:W,className:"p-1 text-status-merged/60 hover:text-status-merged hover:bg-status-merged/10 rounded transition-colors disabled:opacity-30",title:k("todo.merge"),children:f.jsx(Pf,{size:12})}),G&&s&&f.jsx("button",{onClick:()=>A(M),disabled:W,className:"p-1 text-status-warning/60 hover:text-status-warning hover:bg-status-warning/10 rounded transition-colors disabled:opacity-30",title:k("todo.cleanup"),children:f.jsx(es,{size:12})})]}),f.jsx("span",{className:"text-warm-400 font-mono flex-shrink-0",children:new Date(M.started_at).toLocaleString()})]},M.id)})})]})]})]})}function q0e({schedules:e,projectCliTool:t,projectCliModel:n,onAddSchedule:r,onToggleSchedule:a,onDeleteSchedule:i,onEditSchedule:s,onTriggerSchedule:l,onMergeRun:c,onCleanupRun:d}){const[h,m]=x.useState(!1),{t:g}=Ze();return f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center justify-between mb-5",children:[f.jsx("h2",{className:"text-sm font-semibold text-warm-600 uppercase tracking-wider",children:g("schedules.title")}),!h&&f.jsxs("button",{onClick:()=>m(!0),className:"btn-primary btn-sm",children:[f.jsx(sc,{size:14}),g("schedules.add")]})]}),h&&f.jsx("div",{className:"mb-5 animate-slide-up",children:f.jsx(k7,{projectCliTool:t,projectCliModel:n,onSave:async v=>{await r(v),m(!1)},onCancel:()=>m(!1)})}),f.jsx("div",{className:"space-y-3",children:e.length===0?f.jsx("div",{className:"card",children:f.jsx(xl,{icon:pee,title:g("schedules.empty"),description:g("schedules.emptyHint")})}):e.map((v,b)=>f.jsx("div",{className:"animate-slide-up",style:{animationDelay:`${b*30}ms`},children:f.jsx($0e,{schedule:v,onToggle:a,onDelete:i,onEdit:s,onTrigger:l,onMergeRun:c,onCleanupRun:d})},v.id))})]})}const yu=["#D4A843","#2196F3","#4CAF50","#E53935","#9C27B0","#FF9800","#00BCD4","#795548"];function B0e(e){const t=new Map;e.forEach((a,i)=>t.set(a.hash,i));const n=[],r=[];for(let a=0;a<e.length;a++){const i=e[a];let s=n.indexOf(i.hash);s===-1&&(s=n.indexOf(null),s===-1&&(s=n.length,n.push(null))),n[s]=null;const l=yu[s%yu.length],c=[];for(let d=0;d<i.parentHashes.length;d++){const h=i.parentHashes[d],m=t.get(h);if(m===void 0)continue;let g=n.indexOf(h);if(g!==-1)c.push({fromLane:s,toLane:g,toRow:m,color:yu[g%yu.length]});else if(d===0)n[s]=h,c.push({fromLane:s,toLane:s,toRow:m,color:l});else{let v=n.indexOf(null);v===-1&&(v=n.length,n.push(null)),n[v]=h,c.push({fromLane:s,toLane:v,toRow:m,color:yu[v%yu.length]})}}r.push({lane:s,color:l,connections:c})}return r}function F0e({refStr:e}){const t=e.startsWith("HEAD"),n=e.startsWith("origin/")||e.includes("remotes/"),r=e.startsWith("tag: ");let a=e,i="";return r?(a=e.replace("tag: ",""),i="bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-300"):t?(a=e.replace("HEAD -> ",""),i="bg-status-success/15 text-status-success font-semibold"):n?i="bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-300":i="bg-accent/15 text-accent",f.jsx("span",{className:`inline-flex items-center px-1.5 py-0.5 rounded text-2xs font-medium whitespace-nowrap ${i}`,children:a})}const Ws=32,zo=16,H0e=4,U0e=10;function G0e({graphNodes:e,totalRows:t}){const r=(Math.min(U0e,e.reduce((a,i)=>{const s=i.connections.reduce((l,c)=>Math.max(l,c.fromLane,c.toLane),0);return Math.max(a,i.lane,s)},0)+1)+1)*zo+8;return f.jsxs("svg",{width:r,height:t*Ws,className:"shrink-0",style:{minWidth:r},children:[e.map((a,i)=>a.connections.map((s,l)=>{const c=s.fromLane*zo+zo/2+4,d=i*Ws+Ws/2,h=s.toLane*zo+zo/2+4,m=s.toRow*Ws+Ws/2;if(c===h)return f.jsx("line",{x1:c,y1:d,x2:h,y2:m,stroke:s.color,strokeWidth:2,strokeOpacity:.7},`${i}-${l}`);{const g=(d+m)/2;return f.jsx("path",{d:`M${c},${d} C${c},${g} ${h},${g} ${h},${m}`,fill:"none",stroke:s.color,strokeWidth:2,strokeOpacity:.7},`${i}-${l}`)}})),e.map((a,i)=>{const s=a.lane*zo+zo/2+4,l=i*Ws+Ws/2;return f.jsx("circle",{cx:s,cy:l,r:H0e,fill:a.color,stroke:"white",strokeWidth:1.5},`dot-${i}`)})]})}function V0e(e){switch(e){case"A":return{label:"A",color:"text-status-success"};case"D":return{label:"D",color:"text-status-error"};case"R":return{label:"R",color:"text-purple-500"};case"C":return{label:"C",color:"text-blue-500"};default:return{label:"M",color:"text-accent"}}}function K0e({files:e,loading:t,selectedFile:n,onFileClick:r,commitHash:a}){const{t:i}=Ze();return f.jsxs("div",{className:"h-full flex flex-col",children:[f.jsxs("div",{className:"px-3 py-2 border-b border-warm-100 flex items-center justify-between shrink-0",children:[f.jsx("span",{className:"text-[11px] font-semibold text-warm-500 uppercase tracking-wider",children:i("git.changedFiles")}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsxs("span",{className:"text-2xs text-warm-400",children:[e.length," ",i("git.files")]}),f.jsx("span",{className:"text-2xs font-mono text-warm-400",children:a.substring(0,7)})]})]}),t?f.jsx("div",{className:"flex-1 flex items-center justify-center",children:f.jsx("span",{className:"text-xs text-warm-400",children:i("git.loadingFiles")})}):e.length===0?f.jsx("div",{className:"flex-1 flex items-center justify-center",children:f.jsx("span",{className:"text-xs text-warm-400",children:i("git.noFilesChanged")})}):f.jsx("div",{className:"flex-1 overflow-y-auto",children:e.map(s=>{const l=V0e(s.status),c=n===s.path;return f.jsxs("div",{onClick:()=>r(s.path),className:`flex items-center gap-2 px-3 py-1.5 cursor-pointer text-xs hover:bg-warm-50/50 transition-colors ${c?"bg-accent/10 border-l-2 border-accent":""}`,children:[f.jsx("span",{className:`font-mono font-bold text-2xs w-3 shrink-0 ${l.color}`,children:l.label}),f.jsxs("span",{className:"truncate flex-1 text-warm-600",title:s.path,children:[s.path.split("/").pop(),f.jsx("span",{className:"text-warm-400 ml-1 text-2xs",children:s.path.includes("/")?s.path.substring(0,s.path.lastIndexOf("/")):""})]}),f.jsxs("span",{className:"shrink-0 text-2xs text-status-success",children:["+",s.additions]}),f.jsxs("span",{className:"shrink-0 text-2xs text-status-error",children:["-",s.deletions]})]},s.path)})})]})}function W0e({diff:e,loading:t,selectedFile:n}){const{t:r}=Ze();return n?t?f.jsx("div",{className:"h-full flex items-center justify-center",children:f.jsx("span",{className:"text-xs text-warm-400",children:r("git.loadingDiff")})}):f.jsxs("div",{className:"h-full flex flex-col",children:[f.jsx("div",{className:"px-3 py-2 border-b border-warm-100 shrink-0",children:f.jsx("span",{className:"text-xs font-mono text-warm-600",children:n})}),f.jsx("div",{className:"flex-1 overflow-auto",children:f.jsx("pre",{className:"p-3 font-mono text-xs leading-relaxed",children:e?e.split(`
|
|
509
|
+
`).map((a,i)=>{let s="text-warm-100";return a.startsWith("+")&&!a.startsWith("+++")?s="text-warm-100 bg-green-500/20":a.startsWith("-")&&!a.startsWith("---")?s="text-warm-100 bg-red-500/20":a.startsWith("@@")?s="text-blue-400":a.startsWith("diff ")&&(s="text-amber-300 font-bold"),f.jsx("div",{className:s,children:a||" "},i)}):f.jsx("span",{className:"text-warm-500 italic",children:"No changes"})})})]}):f.jsx("div",{className:"h-full flex items-center justify-center",children:f.jsx("span",{className:"text-sm text-warm-400",children:r("git.selectFileToViewDiff")})})}function Y0e({projectId:e,onRefresh:t,busy:n,setBusy:r,branches:a,statusFiles:i}){const{t:s}=Ze(),[l,c]=x.useState(null),[d,h]=x.useState(""),[m,g]=x.useState(""),[v,b]=x.useState(null),w=()=>{c(null),h(""),g(""),b(null)},S=async T=>{r(!0),b(null);try{await T(),w(),t()}catch(A){b(A instanceof Error?A.message:"Error")}finally{r(!1)}},j=i.some(T=>T.index!==" "&&T.index!=="?"),_=({label:T,onClick:A,icon:O,badge:I})=>f.jsxs("button",{onClick:A,disabled:n,className:"flex flex-col items-center gap-0.5 px-2.5 py-1.5 rounded hover:bg-warm-50 transition-colors disabled:opacity-50 relative",title:T,children:[f.jsx("div",{className:"h-5 w-5 flex items-center justify-center text-warm-500",children:O}),f.jsx("span",{className:"text-2xs text-warm-600 whitespace-nowrap",children:T}),I!==void 0&&I>0&&f.jsx("span",{className:"absolute -top-0.5 -right-0.5 bg-accent text-white text-[9px] font-bold rounded-full h-3.5 min-w-[14px] flex items-center justify-center px-0.5",children:I})]}),k=({title:T,children:A})=>f.jsx(ts,{open:!0,onClose:w,size:"sm",children:f.jsxs("div",{className:"bg-theme-card rounded-lg shadow-xl w-80 max-w-[90vw]",children:[f.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-warm-100",children:[f.jsx("span",{className:"text-sm font-semibold text-warm-700",children:T}),f.jsx("button",{onClick:w,className:"text-warm-400 hover:text-warm-600",children:f.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),f.jsxs("div",{className:"p-4 space-y-3",children:[v&&f.jsx("p",{className:"text-status-error text-xs",children:v}),A]})]})}),E=a.filter(T=>!T.remote);return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"flex items-center gap-0.5 px-2 py-1 border-b border-warm-100 overflow-x-auto",children:[f.jsx(_,{label:s("git.commit"),onClick:()=>c("commit"),icon:f.jsx("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,className:"h-5 w-5",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v6m3-3H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"})})}),f.jsx(_,{label:s("git.pull"),onClick:()=>S(()=>c8(e)),icon:f.jsx("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,className:"h-5 w-5",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"})})}),f.jsx(_,{label:s("git.push"),onClick:()=>S(()=>Y2(e)),icon:f.jsx("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,className:"h-5 w-5",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5m-13.5-9L12 3m0 0l4.5 4.5M12 3v13.5"})})}),f.jsx(_,{label:s("git.fetch"),onClick:()=>S(()=>d8(e)),icon:f.jsx("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,className:"h-5 w-5",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 7.5h-.75A2.25 2.25 0 004.5 9.75v7.5a2.25 2.25 0 002.25 2.25h7.5a2.25 2.25 0 002.25-2.25v-7.5a2.25 2.25 0 00-2.25-2.25h-.75m-6 3.75l3 3m0 0l3-3m-3 3V1.5"})})}),f.jsx("div",{className:"w-px h-8 bg-warm-200 mx-1"}),f.jsx(_,{label:s("git.branch"),onClick:()=>c("branch"),icon:f.jsx("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,className:"h-5 w-5",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 3v12m0 0a3 3 0 103 3H15a3 3 0 100-3m-9 0h9m-9 0a3 3 0 01-3-3V6a3 3 0 013-3h0"})})}),f.jsx(_,{label:s("git.merge"),onClick:()=>c("merge"),icon:f.jsx("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,className:"h-5 w-5",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 21L3 16.5m0 0L7.5 12M3 16.5h13.5m0-13.5L21 7.5m0 0L16.5 12M21 7.5H7.5"})})}),f.jsx(_,{label:s("git.stash"),onClick:()=>c("stash"),icon:f.jsx("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,className:"h-5 w-5",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 7.5l-.625 10.632a2.25 2.25 0 01-2.247 2.118H6.622a2.25 2.25 0 01-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125z"})})}),f.jsx(_,{label:s("git.discard"),onClick:()=>{i.length!==0&&confirm(s("git.confirmDiscard"))&&S(()=>gne(e,void 0,!0))},icon:f.jsx("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,className:"h-5 w-5",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182"})})}),f.jsx(_,{label:s("git.tag"),onClick:()=>c("tag"),icon:f.jsxs("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,className:"h-5 w-5",children:[f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.568 3H5.25A2.25 2.25 0 003 5.25v4.318c0 .597.237 1.17.659 1.591l9.581 9.581c.699.699 1.78.872 2.607.33a18.095 18.095 0 005.223-5.223c.542-.827.369-1.908-.33-2.607L11.16 3.66A2.25 2.25 0 009.568 3z"}),f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 6h.008v.008H6V6z"})]})})]}),l==="commit"&&f.jsxs(k,{title:s("git.commit"),children:[f.jsx("textarea",{className:"w-full border border-warm-200 rounded px-3 py-2 text-sm resize-none focus:outline-none focus:ring-1 focus:ring-accent",rows:3,placeholder:s("git.commitMessage"),value:d,onChange:T=>h(T.target.value),autoFocus:!0}),f.jsxs("button",{className:"w-full btn-primary text-sm py-2",disabled:n||!d.trim()||!j,onClick:()=>S(()=>u8(e,d.trim())),children:[s("git.commit")," ",!j&&f.jsxs("span",{className:"text-xs opacity-70 ml-1",children:["(",s("git.staged"),": 0)"]})]})]}),l==="branch"&&f.jsxs(k,{title:s("git.newBranch"),children:[f.jsx("input",{className:"w-full border border-warm-200 rounded px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-accent",placeholder:s("git.branchName"),value:d,onChange:T=>h(T.target.value),autoFocus:!0}),f.jsx("div",{className:"flex gap-2",children:f.jsx("button",{className:"flex-1 btn-primary text-sm py-2",disabled:n||!d.trim(),onClick:()=>S(()=>fne(e,d.trim())),children:s("git.create")})}),E.length>0&&f.jsxs("div",{className:"border-t border-warm-100 pt-2 mt-1",children:[f.jsx("p",{className:"text-2xs text-warm-400 uppercase tracking-wider mb-1",children:s("git.selectBranch")}),f.jsx("div",{className:"max-h-32 overflow-y-auto space-y-px",children:E.filter(T=>!T.current).map(T=>f.jsxs("div",{className:"flex items-center justify-between px-2 py-1 text-xs hover:bg-warm-50 rounded group",children:[f.jsx("button",{className:"truncate text-warm-600 hover:text-accent",onClick:()=>S(()=>hC(e,T.name)),children:T.name}),f.jsx("button",{className:"text-warm-300 hover:text-status-error opacity-0 group-hover:opacity-100 transition-opacity text-2xs",onClick:()=>{confirm(`Delete branch ${T.name}?`)&&S(()=>fC(e,T.name))},children:s("git.delete")})]},T.name))})]})]}),l==="merge"&&f.jsxs(k,{title:s("git.merge"),children:[f.jsx("p",{className:"text-xs text-warm-500",children:s("git.selectBranch")}),f.jsx("div",{className:"max-h-48 overflow-y-auto space-y-px",children:E.filter(T=>!T.current).map(T=>f.jsx("button",{className:"w-full text-left px-3 py-2 text-sm hover:bg-warm-50 rounded text-warm-600 truncate",disabled:n,onClick:()=>S(()=>f8(e,T.name)),children:T.name},T.name))})]}),l==="stash"&&f.jsx(X0e,{projectId:e,busy:n,exec:S,inputValue:d,setInputValue:h}),l==="tag"&&f.jsxs(k,{title:s("git.tag"),children:[f.jsx("input",{className:"w-full border border-warm-200 rounded px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-accent",placeholder:s("git.tagName"),value:d,onChange:T=>h(T.target.value),autoFocus:!0}),f.jsx("input",{className:"w-full border border-warm-200 rounded px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-accent",placeholder:s("git.tagMessage"),value:m,onChange:T=>g(T.target.value)}),f.jsx("button",{className:"w-full btn-primary text-sm py-2",disabled:n||!d.trim(),onClick:()=>S(()=>vne(e,d.trim(),m.trim()||void 0)),children:s("git.create")})]})]})}function X0e({projectId:e,busy:t,exec:n,inputValue:r,setInputValue:a}){const{t:i}=Ze(),[s,l]=x.useState([]);return x.useEffect(()=>{pne(e).then(l).catch(()=>{})},[e]),f.jsx(ts,{open:!0,onClose:()=>a(""),size:"sm",children:f.jsxs("div",{className:"bg-theme-card rounded-lg shadow-xl w-80 max-w-[90vw]",children:[f.jsx("div",{className:"flex items-center justify-between px-4 py-3 border-b border-warm-100",children:f.jsx("span",{className:"text-sm font-semibold text-warm-700",children:i("git.stash")})}),f.jsxs("div",{className:"p-4 space-y-3",children:[f.jsxs("div",{className:"flex gap-2",children:[f.jsx("input",{className:"flex-1 border border-warm-200 rounded px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-accent",placeholder:i("git.stashMessage"),value:r,onChange:c=>a(c.target.value),autoFocus:!0}),f.jsx("button",{className:"btn-primary text-sm px-3 py-2",disabled:t,onClick:()=>n(()=>hne(e,r.trim()||void 0)),children:i("git.stash")})]}),s.length>0?f.jsx("div",{className:"space-y-px max-h-40 overflow-y-auto",children:s.map(c=>f.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 text-xs hover:bg-warm-50 rounded",children:[f.jsx("span",{className:"text-warm-600 truncate flex-1",children:c.message||`stash@{${c.index}}`}),f.jsx("button",{className:"text-accent hover:underline text-[11px] ml-2 shrink-0",disabled:t,onClick:()=>n(()=>mne(e,c.index)),children:i("git.stashPop")})]},c.index))}):f.jsx("p",{className:"text-xs text-warm-400 text-center",children:i("git.noStashes")})]})]})})}function Rz(e,t){if(e==="?"&&t==="?")return{label:"U",color:"text-warm-400",type:"untracked"};const r=e!==" "&&e!=="?",a=r?e:t;let i="text-accent",s=a;return a==="A"?i="text-status-success":a==="D"?i="text-status-error":a==="R"?i="text-purple-500":a==="C"?i="text-blue-500":(i="text-accent",s="M"),{label:s,color:i,type:r?"staged":"unstaged"}}function Iz({file:e,pane:t,selected:n,checked:r,onClick:a,onToggleCheck:i}){const s=t==="staged"?Rz(e.index," "):Rz(" ",e.working_dir==="?"?"?":e.working_dir),l=t==="unstaged"&&e.index==="?"&&e.working_dir==="?"?{label:"U",color:"text-warm-400"}:s;return f.jsxs("div",{onClick:a,className:`flex items-center gap-2 px-3 py-1 cursor-pointer text-xs select-none transition-colors ${n?"bg-accent/15 text-accent":"hover:bg-warm-50 text-warm-700"}`,children:[f.jsx("input",{type:"checkbox",checked:r,onChange:i,onClick:c=>c.stopPropagation(),className:"h-3 w-3 shrink-0 cursor-pointer","aria-label":e.path}),f.jsx("span",{className:`shrink-0 w-4 h-4 flex items-center justify-center rounded text-[10px] font-mono font-bold ${t==="staged"?"bg-status-success/15":"bg-warm-200"} ${l.color}`,children:t==="staged"||l.label==="U"?"+":"−"}),f.jsx("span",{className:"truncate flex-1",title:e.path,children:e.path})]})}function Z0e({diff:e,loading:t,file:n}){const{t:r}=Ze();if(!n)return f.jsx("div",{className:"h-full flex items-center justify-center bg-[#1A1A1A] text-gray-400",children:f.jsx("span",{className:"text-sm",children:r("git.selectFileForDiff")})});if(t)return f.jsx("div",{className:"h-full flex items-center justify-center bg-[#1A1A1A] text-gray-400",children:f.jsx("span",{className:"text-xs",children:r("git.loadingDiff")})});const a=n.index==="?"&&n.working_dir==="?";return f.jsxs("div",{className:"h-full flex flex-col bg-[#1A1A1A]",children:[f.jsxs("div",{className:"px-3 py-2 border-b border-gray-700 shrink-0 flex items-center gap-2",children:[f.jsx("span",{className:"text-xs font-mono text-gray-100 truncate",title:n.path,children:n.path}),a&&f.jsx("span",{className:"text-2xs text-gray-400 italic",children:r("git.untrackedNewFile")})]}),f.jsx("div",{className:"flex-1 overflow-auto",children:e?f.jsx("pre",{className:"p-3 font-mono text-xs leading-relaxed",children:e.split(`
|
|
510
|
+
`).map((i,s)=>{let l="text-gray-200";return i.startsWith("+")&&!i.startsWith("+++")?l="text-gray-100 bg-green-500/20":i.startsWith("-")&&!i.startsWith("---")?l="text-gray-100 bg-red-500/20":i.startsWith("@@")?l="text-blue-400":i.startsWith("diff ")&&(l="text-amber-300 font-bold"),f.jsx("div",{className:l,children:i||" "},s)})}):f.jsx("div",{className:"p-6 text-center text-xs text-gray-400 italic",children:r(a?"git.untrackedNewFile":"git.noFilesChanged")})})]})}function Q0e({projectId:e,branchName:t,files:n,busy:r,setBusy:a,onRefresh:i,onError:s}){const{t:l}=Ze(),c=x.useMemo(()=>n.filter(B=>B.index!==" "&&B.index!=="?"),[n]),d=x.useMemo(()=>n.filter(B=>B.working_dir!==" "&&B.working_dir!=="?"||B.index==="?"&&B.working_dir==="?").filter(B=>!(B.index!==" "&&B.index!=="?"&&B.working_dir===" ")),[n]),[h,m]=x.useState(null),[g,v]=x.useState(()=>new Set),[b,w]=x.useState(()=>new Set),[S,j]=x.useState(""),[_,k]=x.useState(!1),[E,T]=x.useState(""),[A,O]=x.useState(!1),[I,P]=x.useState(!1);x.useEffect(()=>{v(B=>{const H=new Set(c.map(X=>X.path));let K=!1;const U=new Set;return B.forEach(X=>{H.has(X)?U.add(X):K=!0}),K?U:B})},[c]),x.useEffect(()=>{w(B=>{const H=new Set(d.map(X=>X.path));let K=!1;const U=new Set;return B.forEach(X=>{H.has(X)?U.add(X):K=!0}),K?U:B})},[d]);const D=x.useCallback(B=>{v(H=>{const K=new Set(H);return K.has(B)?K.delete(B):K.add(B),K})},[]),q=x.useCallback(B=>{w(H=>{const K=new Set(H);return K.has(B)?K.delete(B):K.add(B),K})},[]),z=x.useRef(null),[F,R]=x.useState(()=>{if(typeof window>"u")return .55;const B=window.localStorage.getItem("clitrigger:git:working-pct"),H=B?parseFloat(B):NaN;return isNaN(H)?.55:Math.max(.3,Math.min(.8,H))});x.useEffect(()=>{localStorage.setItem("clitrigger:git:working-pct",String(F))},[F]);const M=x.useCallback(B=>{if(!z.current)return;const H=z.current.getBoundingClientRect(),K=(B-H.left)/H.width;R(Math.max(.3,Math.min(.8,K)))},[]),L=x.useMemo(()=>{if(!h)return null;const[B,H]=h.split("::");return B==="staged"?c.find(K=>K.path===H)||null:d.find(K=>K.path===H)||null},[h,c,d]),G=h?h.split("::")[0]:null;x.useEffect(()=>{h||(c.length>0?m(`staged::${c[0].path}`):d.length>0&&m(`unstaged::${d[0].path}`))},[h,c,d]),x.useEffect(()=>{if(!h)return;const[B,H]=h.split("::");(B==="staged"?c:d).some(U=>U.path===H)||m(null)},[h,c,d]),x.useEffect(()=>{if(!L||!G){j("");return}let B=!1;return k(!0),xne(e,L.path,G==="staged").then(H=>{B||j(H.diff)}).catch(()=>{B||j("")}).finally(()=>{B||k(!1)}),()=>{B=!0}},[e,L,G]);const W=async B=>{a(!0),s(null);try{await B(),i()}catch(H){s(H instanceof Error?H.message:"Operation failed")}finally{a(!1)}},Y=async()=>{if(!(!E.trim()||c.length===0)){P(!0),a(!0),s(null);try{if(await u8(e,E.trim()),A)try{await Y2(e)}catch(B){s(B instanceof Error?`Commit OK, push failed: ${B.message}`:"Push failed")}T(""),i()}catch(B){s(B instanceof Error?B.message:"Commit failed")}finally{P(!1),a(!1)}}};return n.length===0?f.jsx("div",{className:"h-full flex items-center justify-center bg-theme-bg",children:f.jsx("span",{className:"text-sm text-warm-400",children:l("git.workingTreeClean")})}):f.jsxs("div",{ref:z,className:"h-full flex min-h-0",children:[f.jsxs("div",{style:{width:`${F*100}%`,minWidth:360},className:"shrink-0 flex flex-col min-h-0",children:[f.jsxs("div",{className:"flex flex-col min-h-0",style:{flex:"1 1 0"},children:[f.jsxs("div",{className:"px-3 py-2 border-b border-warm-200 flex items-center justify-between shrink-0 bg-warm-50",children:[f.jsxs("span",{className:"text-xs font-semibold text-warm-700",children:[l("git.stagedFiles")," ",f.jsxs("span",{className:"text-warm-400 font-normal",children:["(",c.length,")"]})]}),f.jsx("button",{className:"text-2xs text-warm-500 hover:text-warm-700 disabled:opacity-40",disabled:r||c.length===0,onClick:()=>{const B=g.size>0?c.filter(H=>g.has(H.path)).map(H=>H.path):c.map(H=>H.path);B.length!==0&&W(()=>dne(e,B))},children:g.size>0?`${l("git.unstageSelectedShort")} (${g.size})`:l("git.unstageAllShort")})]}),f.jsx("div",{className:"flex-1 overflow-y-auto",children:c.length===0?f.jsx("div",{className:"p-3 text-2xs text-warm-400 italic",children:"—"}):c.map(B=>f.jsx(Iz,{file:B,pane:"staged",selected:h===`staged::${B.path}`,checked:g.has(B.path),onClick:()=>m(`staged::${B.path}`),onToggleCheck:()=>D(B.path)},`s-${B.path}`))})]}),f.jsxs("div",{className:"flex flex-col min-h-0 border-t border-warm-200",style:{flex:"1 1 0"},children:[f.jsxs("div",{className:"px-3 py-2 border-b border-warm-200 flex items-center justify-between shrink-0 bg-warm-50",children:[f.jsxs("span",{className:"text-xs font-semibold text-warm-700",children:[l("git.unstagedFiles")," ",f.jsxs("span",{className:"text-warm-400 font-normal",children:["(",d.length,")"]})]}),f.jsx("button",{className:"text-2xs text-warm-500 hover:text-warm-700 disabled:opacity-40",disabled:r||d.length===0,onClick:()=>{const B=b.size>0?d.filter(H=>b.has(H.path)).map(H=>H.path):d.map(H=>H.path);B.length!==0&&W(()=>cne(e,B))},children:b.size>0?`${l("git.stageSelectedShort")} (${b.size})`:l("git.stageAllShort")})]}),f.jsx("div",{className:"flex-1 overflow-y-auto",children:d.length===0?f.jsx("div",{className:"p-3 text-2xs text-warm-400 italic",children:"—"}):d.map(B=>f.jsx(Iz,{file:B,pane:"unstaged",selected:h===`unstaged::${B.path}`,checked:b.has(B.path),onClick:()=>m(`unstaged::${B.path}`),onToggleCheck:()=>q(B.path)},`u-${B.path}`))})]}),f.jsxs("div",{className:"border-t border-warm-200 shrink-0 bg-theme-bg",children:[f.jsx("textarea",{className:"w-full px-3 py-2 text-sm bg-transparent text-warm-800 border-0 focus:outline-none resize-none placeholder:text-warm-400",rows:3,placeholder:l("git.commitMessage"),value:E,onChange:B=>T(B.target.value),onKeyDown:B=>{(B.metaKey||B.ctrlKey)&&B.key==="Enter"&&Y()},disabled:I}),f.jsxs("div",{className:"px-3 py-2 border-t border-warm-200 flex items-center gap-3",children:[f.jsxs("label",{className:"flex items-center gap-1.5 text-2xs text-warm-600 cursor-pointer select-none",children:[f.jsx("input",{type:"checkbox",checked:A,onChange:B=>O(B.target.checked),className:"h-3 w-3",disabled:I}),l("git.pushImmediately").replace("{remote}",`origin/${t||"main"}`)]}),f.jsx("button",{className:"ml-auto btn-primary text-xs px-3 py-1.5 disabled:opacity-50",onClick:Y,disabled:I||r||!E.trim()||c.length===0,children:I?"...":l("git.commitButton")})]})]})]}),f.jsx(yp,{axis:"x",onResize:M}),f.jsx("div",{className:"flex-1 min-w-0",children:f.jsx(Z0e,{diff:S,loading:_,file:L})})]})}function J0e({branches:e,tags:t,stashCount:n,projectId:r,busy:a,setBusy:i,onRefresh:s,onError:l}){const{t:c}=Ze(),[d,h]=x.useState(new Set(["local","remote"])),[m,g]=x.useState(null),[v,b]=x.useState(null),[w,S]=x.useState(""),j=x.useRef(null),[_,k]=x.useState([]),[E,T]=x.useState(null);x.useEffect(()=>{aD(r).then(R=>k(R.worktrees)).catch(()=>{})},[r]);const A=x.useCallback(()=>{aD(r).then(R=>k(R.worktrees)).catch(()=>{})},[r]);x.useEffect(()=>{A()},[e,A]),x.useEffect(()=>{if(!m)return;const R=L=>{j.current&&!j.current.contains(L.target)&&g(null)},M=()=>g(null);return document.addEventListener("mousedown",R),document.addEventListener("scroll",M,!0),()=>{document.removeEventListener("mousedown",R),document.removeEventListener("scroll",M,!0)}},[m]),x.useEffect(()=>{if(!m||!j.current)return;const R=j.current.getBoundingClientRect();let{x:M,y:L}=m;M+R.width>window.innerWidth&&(M=window.innerWidth-R.width-8),L+R.height>window.innerHeight&&(L=window.innerHeight-R.height-8),(M!==m.x||L!==m.y)&&g({...m,x:M,y:L})},[m]);const O=async(R,M)=>{i(!0),l(null),g(null);try{await R(),s(),M&&M()}catch(L){l(L instanceof Error?L.message:"Error")}finally{i(!1)}},I=(R,M,L,G)=>{R.preventDefault(),R.stopPropagation(),g({branch:M,isRemote:L,isCurrent:G,x:R.clientX,y:R.clientY})},P=R=>{h(M=>{const L=new Set(M);return L.has(R)?L.delete(R):L.add(R),L})},D=e.filter(R=>!R.remote),q=e.filter(R=>R.remote),z=({id:R,label:M,count:L})=>f.jsxs("button",{onClick:()=>P(R),className:"w-full flex items-center gap-1.5 py-1.5 text-[11px] font-semibold text-warm-500 uppercase tracking-wider hover:text-warm-700 transition-colors",children:[f.jsx("svg",{className:`h-3 w-3 transition-transform ${d.has(R)?"rotate-90":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})}),M,f.jsx("span",{className:"text-warm-400 font-normal ml-auto",children:L})]}),F=({label:R,onClick:M,danger:L})=>f.jsx("button",{className:`w-full text-left px-3 py-1.5 hover:bg-theme-hover transition-colors ${L?"text-status-error":"text-theme-text"}`,disabled:a,onClick:M,children:R});return f.jsxs("div",{className:"space-y-1",children:[f.jsx(z,{id:"local",label:c("git.branches"),count:D.length}),d.has("local")&&f.jsx("div",{className:"pl-1 space-y-px",children:D.map(R=>f.jsxs("div",{className:`flex items-center gap-1.5 px-2 py-1 rounded text-xs truncate cursor-context-menu select-none ${R.current?"text-accent font-semibold bg-accent/10":"text-warm-600 hover:bg-warm-50"}`,onContextMenu:M=>I(M,R.name,!1,!!R.current),children:[R.current&&f.jsx("svg",{className:"h-3 w-3 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}),f.jsx("span",{className:"truncate",children:R.name})]},R.name))}),q.length>0&&f.jsxs(f.Fragment,{children:[f.jsx(z,{id:"remote",label:c("git.remotes"),count:q.length}),d.has("remote")&&f.jsx("div",{className:"pl-1 space-y-px",children:q.map(R=>f.jsx("div",{className:"px-2 py-1 text-xs text-warm-500 truncate hover:bg-warm-50 rounded cursor-context-menu select-none",onContextMenu:M=>I(M,R.name,!0,!1),children:R.name.replace("remotes/","")},R.name))})]}),t.length>0&&f.jsxs(f.Fragment,{children:[f.jsx(z,{id:"tags",label:c("git.tags"),count:t.length}),d.has("tags")&&f.jsx("div",{className:"pl-1 space-y-px",children:t.map(R=>f.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1 text-xs text-warm-500 truncate hover:bg-warm-50 rounded",children:[f.jsxs("svg",{className:"h-3 w-3 text-purple-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:[f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.568 3H5.25A2.25 2.25 0 003 5.25v4.318c0 .597.237 1.17.659 1.591l9.581 9.581c.699.699 1.78.872 2.607.33a18.095 18.095 0 005.223-5.223c.542-.827.369-1.908-.33-2.607L11.16 3.66A2.25 2.25 0 009.568 3z"}),f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 6h.008v.008H6V6z"})]}),R]},R))})]}),_.length>0&&f.jsxs(f.Fragment,{children:[f.jsx(z,{id:"worktrees",label:c("git.worktrees"),count:_.length}),d.has("worktrees")&&f.jsx("div",{className:"pl-1 space-y-px",children:_.map(R=>f.jsxs("div",{className:"group flex items-center gap-1.5 px-2 py-1 text-xs text-warm-600 hover:bg-warm-50 dark:hover:bg-warm-800/50 rounded",children:[f.jsx("svg",{className:"h-3 w-3 text-amber-500 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})}),f.jsx("span",{className:"truncate flex-1",title:R.path,children:R.branch}),f.jsx("button",{className:"opacity-0 group-hover:opacity-100 shrink-0 p-0.5 text-warm-400 hover:text-status-error transition-all",disabled:a||E===R.path,title:c("git.cleanupWorktree"),onClick:()=>{confirm(c("git.confirmCleanupWorktree").replace("{name}",R.branch))&&(T(R.path),i(!0),l(null),iD(r,R.path,R.branch).then(()=>{k(M=>M.filter(L=>L.path!==R.path)),s()}).catch(M=>l(M instanceof Error?M.message:"Error")).finally(()=>{T(null),i(!1)}))},children:E===R.path?f.jsx("svg",{className:"h-3 w-3 animate-spin",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}):f.jsx("svg",{className:"h-3 w-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})]},R.path))})]}),n>0&&f.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1.5 text-[11px] font-semibold text-warm-500 uppercase tracking-wider",children:[c("git.stashes"),f.jsx("span",{className:"text-warm-400 font-normal ml-auto",children:n})]}),m&&vl.createPortal(f.jsxs("div",{ref:j,className:"fixed z-sticky bg-theme-card border border-warm-200 dark:border-warm-700 rounded-lg shadow-xl py-1 min-w-[220px] text-xs",style:{left:m.x,top:m.y},children:[!m.isCurrent&&!m.isRemote&&f.jsx(F,{label:`${c("git.checkout")} ${m.branch}`,onClick:()=>O(()=>hC(r,m.branch))}),!m.isCurrent&&m.isRemote&&f.jsx(F,{label:`${c("git.checkoutRemote")} ${m.branch.replace(/^(remotes\/)?origin\//,"")}`,onClick:()=>{const R=m.branch.replace(/^(remotes\/)?origin\//,"");O(()=>hC(r,R))}}),!m.isCurrent&&f.jsx(F,{label:`${c("git.mergeInto")} ${m.branch}`,onClick:()=>O(()=>f8(r,m.branch))}),!m.isCurrent&&!m.isRemote&&f.jsx(F,{label:`${c("git.rebaseOnto")} ${m.branch}`,onClick:()=>O(()=>yne(r,m.branch))}),f.jsx("div",{className:"border-t border-warm-100 dark:border-warm-700 my-1"}),f.jsx(F,{label:`${c("git.fetch")}`,onClick:()=>O(()=>d8(r))}),!m.isRemote&&f.jsxs(f.Fragment,{children:[f.jsx(F,{label:`${c("git.pull")}`,onClick:()=>O(()=>c8(r))}),f.jsx(F,{label:`${c("git.push")}`,onClick:()=>O(()=>Y2(r))})]}),!m.isRemote&&f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"border-t border-warm-100 dark:border-warm-700 my-1"}),f.jsx(F,{label:`${c("git.renameBranch")} ${m.branch}...`,onClick:()=>{b(m.branch),S(m.branch),g(null)}}),!m.isCurrent&&(()=>{const R=_.find(L=>L.branch===m.branch);if(R)return f.jsx(F,{danger:!0,label:`${c("git.deleteWorktreeAndBranch")} ${m.branch}`,onClick:()=>{confirm(c("git.confirmDeleteWorktreeAndBranch").replace("{name}",m.branch))?O(()=>iD(r,R.path,m.branch)):g(null)}});const M=m.branch;return f.jsx(F,{danger:!0,label:`${c("git.delete")} ${M}`,onClick:()=>{if(!confirm(c("git.confirmDelete").replace("{name}",M))){g(null);return}O(async()=>{try{await fC(r,M)}catch(L){const G=L instanceof Error?L.message:"";if(/not fully merged/i.test(G)&&confirm(c("git.confirmForceDelete").replace("{name}",M))){await fC(r,M,!0);return}throw L}})}})})()]})]}),document.body),v&&f.jsx(ts,{open:!0,onClose:()=>b(null),size:"sm",children:f.jsxs("div",{className:"bg-theme-card rounded-lg shadow-xl w-80 max-w-[90vw]",children:[f.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-warm-100",children:[f.jsx("span",{className:"text-sm font-semibold text-warm-700",children:c("git.renameBranch")}),f.jsx("button",{onClick:()=>b(null),className:"text-warm-400 hover:text-warm-600",children:f.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),f.jsxs("div",{className:"p-4 space-y-3",children:[f.jsxs("p",{className:"text-xs text-warm-500",children:[v," →"]}),f.jsx("input",{className:"w-full border border-warm-200 rounded px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-accent bg-transparent",placeholder:c("git.newBranchName"),value:w,onChange:R=>S(R.target.value),onKeyDown:R=>{if(R.key==="Enter"&&w.trim()&&w.trim()!==v){const M=v;O(()=>nD(r,M,w.trim()),()=>b(null))}},autoFocus:!0}),f.jsx("button",{className:"w-full btn-primary text-sm py-2",disabled:a||!w.trim()||w.trim()===v,onClick:()=>{const R=v;O(()=>nD(r,R,w.trim()),()=>b(null))},children:c("git.rename")})]})]})})]})}function ebe(e){const t=Date.now(),n=new Date(e).getTime(),r=Math.floor((t-n)/1e3);if(r<60)return`${r}s`;const a=Math.floor(r/60);if(a<60)return`${a}m`;const i=Math.floor(a/60);if(i<24)return`${i}h`;const s=Math.floor(i/24);if(s<30)return`${s}d`;const l=Math.floor(s/30);return l<12?`${l}mo`:`${Math.floor(s/365)}y`}function tbe({view:e,onChange:t,fileChangeCount:n}){const{t:r}=Ze(),a=({id:i,label:s,badge:l})=>{const c=e===i;return f.jsxs("button",{onClick:()=>t(i),className:`w-full flex items-center gap-2 px-3 py-2 text-xs font-medium rounded transition-colors ${c?"bg-accent text-white":"text-warm-600 hover:bg-warm-200/60"}`,children:[f.jsx("span",{className:"flex-1 text-left truncate",children:s}),l!==void 0&&l>0&&f.jsx("span",{className:`text-[10px] px-1.5 py-0.5 rounded-full ${c?"bg-white/20 text-white":"bg-warm-200 text-warm-600"}`,children:l})]})};return f.jsxs("div",{className:"space-y-2",children:[f.jsxs("div",{className:"px-2 text-[10px] font-bold text-warm-400 uppercase tracking-widest flex items-center gap-2",children:[f.jsx("svg",{className:"h-3 w-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})}),r("git.workspace")]}),f.jsxs("div",{className:"space-y-0.5",children:[f.jsx(a,{id:"fileStatus",label:r("git.viewFileStatus"),badge:n}),f.jsx(a,{id:"history",label:r("git.viewHistory")})]})]})}function yp({axis:e,onResize:t}){return f.jsx("div",{onMouseDown:n=>{n.preventDefault(),document.body.style.cursor=e==="x"?"col-resize":"row-resize",document.body.style.userSelect="none";const r=i=>t(i.clientX,i.clientY),a=()=>{document.body.style.cursor="",document.body.style.userSelect="",window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",a)};window.addEventListener("mousemove",r),window.addEventListener("mouseup",a)},role:"separator","aria-orientation":e==="x"?"vertical":"horizontal",className:e==="x"?"w-1 mx-1 shrink-0 cursor-col-resize bg-warm-200/60 hover:bg-accent transition-colors rounded":"h-1 my-0.5 shrink-0 cursor-row-resize bg-warm-200/60 hover:bg-accent transition-colors"})}function xp(e,t,n){return Math.max(t,Math.min(n,e))}function Tk(e,t,n,r){if(typeof window>"u")return t;const a=window.localStorage.getItem(e);if(!a)return t;const i=parseFloat(a);return isNaN(i)?t:xp(i,n,r)}function nbe({project:e,refreshTrigger:t}){const{t:n}=Ze(),[r,a]=x.useState(()=>{if(typeof window>"u")return"history";const me=window.localStorage.getItem(`git-view:${e.id}`);return me==="fileStatus"||me==="history"?me:"history"});x.useEffect(()=>{typeof window<"u"&&window.localStorage.setItem(`git-view:${e.id}`,r)},[r,e.id]);const[i,s]=x.useState([]),[l,c]=x.useState(!0),[d,h]=x.useState(!1),[m,g]=x.useState(!0),[v,b]=x.useState(null),[w,S]=x.useState([]),[j,_]=x.useState([]),[k,E]=x.useState(0),[T,A]=x.useState([]),[O,I]=x.useState(""),[P,D]=x.useState(!1),[q,z]=x.useState(null),[F,R]=x.useState(null),[M,L]=x.useState([]),[G,W]=x.useState(!1),[Y,B]=x.useState(null),[H,K]=x.useState(""),[U,X]=x.useState(!1),J=x.useRef(null),Q=x.useRef(null),re=x.useRef(!1),ue=x.useRef(null),Z=x.useRef(null),se=x.useRef(null),[ce,ee]=x.useState(()=>Tk("clitrigger:git:sidebar-w",224,180,480)),[ae,oe]=x.useState(()=>Tk("clitrigger:git:detail-h-pct",.5,.2,.8)),[fe,Ce]=x.useState(()=>Tk("clitrigger:git:detail-fl-w",240,160,500));x.useEffect(()=>{localStorage.setItem("clitrigger:git:sidebar-w",String(ce))},[ce]),x.useEffect(()=>{localStorage.setItem("clitrigger:git:detail-h-pct",String(ae))},[ae]),x.useEffect(()=>{localStorage.setItem("clitrigger:git:detail-fl-w",String(fe))},[fe]);const Te=x.useCallback(me=>{if(!ue.current)return;const Oe=ue.current.getBoundingClientRect();ee(xp(me-Oe.left,180,480))},[]),pe=x.useCallback((me,Oe)=>{if(!Z.current)return;const Pe=Z.current.getBoundingClientRect();oe(xp((Pe.bottom-Oe)/Pe.height,.2,.8))},[]),De=x.useCallback(me=>{if(!se.current)return;const Oe=se.current.getBoundingClientRect();Ce(xp(me-Oe.left,160,500))},[]),Xe=x.useCallback(async()=>{try{const me=await une(e.id);S(me.branches),_(me.tags),E(me.stashCount)}catch{}},[e.id]),We=x.useCallback(async()=>{try{const me=await one(e.id);A(me.files),I(me.branch||"")}catch{}},[e.id]),at=x.useCallback(async(me,Oe=!1)=>{if(!re.current){re.current=!0,h(!0),b(null);try{const Pe=await lne(e.id,me,50);s(be=>Oe?Pe.commits:[...be,...Pe.commits]),c(Pe.hasMore)}catch(Pe){b(Pe instanceof Error?Pe.message:"Failed to fetch git log")}finally{h(!1),g(!1),re.current=!1}}},[e.id]),Ne=x.useCallback(()=>{s([]),c(!0),g(!0),R(null),L([]),B(null),K(""),at(0,!0),Xe(),We()},[at,Xe,We]),Fe=x.useCallback(async me=>{if((F==null?void 0:F.hash)===me.hash){R(null),L([]),B(null),K("");return}R(me),B(null),K(""),W(!0);try{const Oe=await bne(e.id,me.hash);if(L(Oe.files),Oe.files.length>0){const Pe=Oe.files[0].path;B(Pe),X(!0);try{const be=await rD(e.id,me.hash,Pe);K(be.diff)}catch{K("")}finally{X(!1)}}}catch{L([])}finally{W(!1)}},[e.id,F==null?void 0:F.hash]),ye=x.useCallback(async me=>{if(F){B(me),X(!0);try{const Oe=await rD(e.id,F.hash,me);K(Oe.diff)}catch{K("")}finally{X(!1)}}},[e.id,F]);x.useEffect(()=>{at(0,!0),Xe(),We()},[at,Xe,We]),x.useEffect(()=>{t&&t>0&&Ne()},[t]),x.useEffect(()=>{const me=J.current;if(!me)return;const Oe=new IntersectionObserver(Pe=>{Pe[0].isIntersecting&&l&&!re.current&&i.length>0&&at(i.length)},{rootMargin:"200px"});return Oe.observe(me),()=>Oe.disconnect()},[l,i.length,at]);const le=x.useMemo(()=>B0e(i),[i]);return f.jsxs("div",{className:"animate-fade-in flex flex-col",style:{height:"calc(100vh - 260px)",minHeight:"400px"},children:[f.jsx("div",{className:"card mb-2 overflow-hidden",children:f.jsx(Y0e,{projectId:e.id,onRefresh:Ne,busy:P,setBusy:D,branches:w,statusFiles:T})}),q&&f.jsxs("div",{className:"mb-2 px-3 py-2 bg-red-50 dark:bg-red-900/20 text-red-600 dark:text-red-400 text-xs flex items-center justify-between rounded border border-red-200 dark:border-red-800",children:[f.jsx("span",{children:q}),f.jsx("button",{onClick:()=>z(null),className:"ml-2 shrink-0 hover:text-red-800 dark:hover:text-red-300",children:"×"})]}),f.jsxs("div",{ref:ue,className:"flex flex-1 min-h-0",children:[f.jsxs("div",{style:{width:ce},className:"shrink-0 flex flex-col gap-2 min-h-0",children:[f.jsx("div",{className:"card p-3 shrink-0",children:f.jsx(tbe,{view:r,onChange:a,fileChangeCount:T.length})}),f.jsx("div",{className:"card overflow-y-auto p-3 flex-1 min-h-0",children:f.jsx(J0e,{branches:w,tags:j,stashCount:k,projectId:e.id,busy:P,setBusy:D,onRefresh:Ne,onError:z})})]}),f.jsx(yp,{axis:"x",onResize:Te}),f.jsx("div",{className:"card flex-1 overflow-hidden flex flex-col min-h-0",children:r==="fileStatus"?f.jsx(Q0e,{projectId:e.id,branchName:O,files:T,busy:P,setBusy:D,onRefresh:Ne,onError:z}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5 border-b border-warm-100",children:[f.jsx("span",{className:"text-sm font-semibold text-warm-700",children:n("git.commitHistory")}),f.jsxs("button",{onClick:Ne,disabled:d,className:"btn-ghost text-xs flex items-center gap-1.5",children:[f.jsx("svg",{className:`h-3.5 w-3.5 ${d?"animate-spin":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182"})}),n("git.refresh")]})]}),f.jsxs("div",{className:"flex items-center px-4 py-1.5 border-b border-warm-50 text-2xs text-warm-400 uppercase tracking-wider",children:[f.jsx("div",{className:"w-24 shrink-0",children:n("git.graph")}),f.jsx("div",{className:"flex-1 min-w-0",children:n("git.description")}),f.jsx("div",{className:"w-14 text-right shrink-0",children:n("git.date")}),f.jsx("div",{className:"shrink-0 ml-2",children:n("git.author")}),f.jsx("div",{className:"w-16 text-right shrink-0",children:n("git.hash")})]}),v&&f.jsx("div",{className:"p-6 text-center",children:f.jsx("p",{className:"text-status-error text-sm",children:v})}),m&&!v&&f.jsx("div",{className:"p-6 text-center",children:f.jsx("p",{className:"text-warm-500 text-sm",children:n("detail.loading")})}),!m&&!v&&i.length===0&&f.jsx("div",{className:"p-6 text-center",children:f.jsx("p",{className:"text-warm-500 text-sm",children:n("git.noCommits")})}),i.length>0&&f.jsxs("div",{ref:Z,className:"flex-1 flex flex-col min-h-0",children:[f.jsxs("div",{className:"overflow-y-auto",ref:Q,style:F?{flex:`${(1-ae)*100} 1 0`,minHeight:0}:{flex:"1 1 0",minHeight:0},children:[f.jsxs("div",{className:"relative flex",children:[f.jsx("div",{className:"shrink-0 sticky left-0",children:f.jsx(G0e,{graphNodes:le,totalRows:i.length})}),f.jsx("div",{className:"flex-1 min-w-0",children:i.map(me=>{const Oe=(F==null?void 0:F.hash)===me.hash;return f.jsxs("div",{onClick:()=>Fe(me),className:`flex items-center px-3 cursor-pointer transition-colors border-b border-warm-50/50 ${Oe?"bg-accent/10 border-l-2 border-l-accent":"hover:bg-warm-50/50"}`,style:{height:Ws},children:[f.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-1.5",children:[me.refs.length>0&&f.jsx("div",{className:"flex items-center gap-1 shrink-0",children:me.refs.map((Pe,be)=>f.jsx(F0e,{refStr:Pe},be))}),f.jsx("span",{className:"text-xs text-warm-700 truncate",title:me.message,children:me.message})]}),f.jsx("div",{className:"w-14 text-right shrink-0",children:f.jsx("span",{className:"text-[11px] text-warm-400",title:me.date,children:ebe(me.date)})}),f.jsx("div",{className:"shrink-0 ml-2",children:f.jsx("span",{className:"text-[11px] text-warm-500",children:me.author})}),f.jsx("div",{className:"w-16 text-right shrink-0",children:f.jsx("span",{className:"text-[11px] font-mono text-warm-400 cursor-pointer hover:text-accent transition-colors",title:me.hash,onClick:Pe=>{Pe.stopPropagation(),navigator.clipboard.writeText(me.hash)},children:me.hash.substring(0,7)})})]},me.hash)})})]}),f.jsx("div",{ref:J,className:"h-8 flex items-center justify-center",children:d&&f.jsx("span",{className:"text-xs text-warm-400",children:n("git.loadMore")})})]}),F&&f.jsxs(f.Fragment,{children:[f.jsx(yp,{axis:"y",onResize:pe}),f.jsxs("div",{ref:se,className:"flex min-h-0",style:{flex:`${ae*100} 1 0`,minHeight:0},children:[f.jsx("div",{style:{width:fe},className:"shrink-0 overflow-hidden",children:f.jsx(K0e,{files:M,loading:G,selectedFile:Y,onFileClick:ye,commitHash:F.hash})}),f.jsx(yp,{axis:"x",onResize:De}),f.jsx("div",{className:"flex-1 min-w-0 overflow-hidden bg-warm-900",children:f.jsx(W0e,{diff:H,loading:U,selectedFile:Y})})]})]})]})]})})]})]})}const rbe=["architect","developer","reviewer","pm","tester","custom"],$o=["#6366f1","#8b5cf6","#ec4899","#f43f5e","#f97316","#eab308","#22c55e","#14b8a6","#06b6d4","#3b82f6"],abe=[{name:"Architect",nameKo:"아키텍트",role:"architect",prompt:"You are a senior software architect. Focus on system design, scalability, maintainability, and separation of concerns. Evaluate proposals for architectural soundness and suggest patterns that work well."},{name:"Developer",nameKo:"개발자",role:"developer",prompt:"You are a senior full-stack developer. Focus on implementation feasibility, code quality, existing patterns in the codebase, and developer experience. Be pragmatic about what can realistically be built."},{name:"Reviewer",nameKo:"리뷰어",role:"reviewer",prompt:"You are a senior code reviewer and quality advocate. Focus on edge cases, error handling, security, performance, and testing strategy. Challenge assumptions and find potential issues."},{name:"Product Manager",nameKo:"PM",role:"pm",prompt:"You are a product manager. Focus on user experience, feature scope, priorities, and trade-offs. Ensure the discussion stays grounded in user needs and business value."},{name:"Tester",nameKo:"테스터",role:"tester",prompt:"You are a QA engineer and testing specialist. Focus on testability, test coverage strategy, edge cases, regression risks, and how to verify the feature works correctly."}];function ibe({projectId:e,agents:t,onAgentsChange:n}){const{t:r,lang:a}=Ze(),[i,s]=x.useState(!1),[l,c]=x.useState(null),[d,h]=x.useState(""),[m,g]=x.useState("developer"),[v,b]=x.useState(""),[w,S]=x.useState(""),[j,_]=x.useState(""),[k,E]=x.useState($o[0]),[T,A]=x.useState(!1),[O,I]=x.useState(!1),{getToolConfig:P}=oc(),D=()=>{h(""),g("developer"),b(""),S(""),_(""),E($o[Math.floor(Math.random()*$o.length)]),A(!1),s(!1),c(null)},q=async()=>{if(!(!d.trim()||!v.trim())){I(!0);try{if(l){const M=await Vne(l,{name:d,role:m,system_prompt:v,avatar_color:k,cli_tool:w||null,cli_model:j||null,can_implement:T});n(t.map(L=>L.id===l?M:L))}else{const M=await Gne(e,{name:d,role:m,system_prompt:v,avatar_color:k,...w?{cli_tool:w}:{},...j?{cli_model:j}:{},can_implement:T});n([...t,M])}D()}finally{I(!1)}}},z=M=>{c(M.id),h(M.name),g(M.role),b(M.system_prompt),S(M.cli_tool||""),_(M.cli_model||""),E(M.avatar_color||$o[0]),A(!!M.can_implement),s(!0)},F=async M=>{await Kne(M),n(t.filter(L=>L.id!==M))},R=M=>{h(a==="ko"?M.nameKo:M.name),g(M.role),b(M.prompt),E($o[Math.floor(Math.random()*$o.length)]),s(!0)};return f.jsxs("div",{className:"space-y-3",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("h3",{className:"text-sm font-semibold text-warm-700",children:r("agents.title")}),f.jsxs("button",{onClick:()=>{D(),s(!0)},className:"btn btn-sm text-xs",children:["+ ",r("agents.add")]})]}),t.length===0&&!i&&f.jsx(xl,{icon:Qte,title:r("agents.empty"),size:"sm"}),f.jsx("div",{className:"space-y-2",children:t.map(M=>{var L;return f.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-xl bg-warm-50 border border-warm-150 hover:border-warm-250 transition-colors group",children:[f.jsx("div",{className:"w-10 h-10 rounded-full flex items-center justify-center text-white text-sm font-bold flex-shrink-0 shadow-sm",style:{backgroundColor:M.avatar_color||"#6366f1"},children:M.name.charAt(0).toUpperCase()}),f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsxs("div",{className:"flex items-center gap-1.5",children:[f.jsx("span",{className:"text-sm font-semibold text-warm-700 truncate",children:M.name}),!!M.can_implement&&f.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-2xs font-medium bg-amber-50 text-amber-700 border border-amber-200",title:r("agents.canImplementHelp"),children:[f.jsx(QP,{size:10}),r("agents.canImplementBadge")]})]}),f.jsxs("div",{className:"text-xs text-warm-400 mt-0.5",children:[r(`agents.roles.${M.role}`)||M.role,M.cli_tool&&f.jsxs("span",{className:"ml-1.5 text-warm-300",children:["· ",((L=ii.find(G=>G.value===M.cli_tool))==null?void 0:L.label)||M.cli_tool,M.cli_model?` / ${M.cli_model}`:""]})]})]}),f.jsxs("div",{className:"flex gap-1.5 opacity-0 group-hover:opacity-100 transition-opacity",children:[f.jsx("button",{onClick:()=>z(M),className:"p-1.5 text-warm-400 hover:text-warm-600 hover:bg-warm-100 rounded-lg transition-colors",children:f.jsx(Df,{size:16})}),f.jsx("button",{onClick:()=>F(M.id),className:"p-1.5 text-warm-400 hover:text-status-error hover:bg-red-50 rounded-lg transition-colors",children:f.jsx(es,{size:16})})]})]},M.id)})}),i&&f.jsxs("div",{className:"space-y-5 p-5 rounded-xl border border-warm-200 bg-theme-card shadow-sm",children:[!l&&f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-2",children:r("agents.presets")}),f.jsx("div",{className:"flex flex-wrap gap-2",children:abe.map(M=>f.jsx("button",{onClick:()=>R(M),className:"px-3 py-1.5 text-xs rounded-lg bg-warm-50 text-warm-600 hover:bg-warm-100 border border-warm-150 hover:border-warm-300 transition-colors font-medium",children:a==="ko"?M.nameKo:M.name},M.role))})]}),f.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-2",children:r("agents.name")}),f.jsx("input",{type:"text",value:d,onChange:M=>h(M.target.value),className:"input-field",placeholder:a==="ko"?"에이전트 이름":"Agent name"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-2",children:r("agents.role")}),f.jsx("select",{value:m,onChange:M=>g(M.target.value),className:"input-field",children:rbe.map(M=>f.jsx("option",{value:M,children:r(`agents.roles.${M}`)},M))})]})]}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-2",children:r("agents.systemPrompt")}),f.jsx("textarea",{value:v,onChange:M=>b(M.target.value),rows:5,className:"input-field resize-y min-h-[100px]",placeholder:a==="ko"?"이 에이전트의 전문 분야와 관점을 설명하세요...":"Describe this agent's expertise and perspective..."}),f.jsx("p",{className:"text-2xs text-warm-400 mt-1.5",children:a==="ko"?"토론 시 이 에이전트가 어떤 관점에서 발언할지 결정합니다.":"Determines what perspective this agent brings to the discussion."})]}),f.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-2",children:r("agents.cliTool")}),f.jsxs("select",{value:w,onChange:M=>{S(M.target.value),_("")},className:"input-field text-sm",children:[f.jsx("option",{value:"",children:a==="ko"?"프로젝트 기본값 사용":"Use project default"}),ii.map(M=>f.jsx("option",{value:M.value,children:M.label},M.value))]})]}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-2",children:r("agents.cliModel")}),f.jsx("select",{value:j,onChange:M=>_(M.target.value),className:"input-field text-sm",disabled:!w,children:w?P(w).models.map(M=>f.jsx("option",{value:M.value,children:M.label},M.value)):f.jsx("option",{value:"",children:a==="ko"?"프로젝트 기본값 사용":"Use project default"})})]})]}),f.jsx("div",{children:f.jsxs("label",{className:"flex items-start gap-3 cursor-pointer",children:[f.jsx("input",{type:"checkbox",checked:T,onChange:M=>A(M.target.checked),className:"mt-0.5 w-4 h-4 rounded border-warm-300 text-warm-600 focus:ring-warm-400"}),f.jsxs("div",{className:"flex-1",children:[f.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-medium text-warm-700",children:[f.jsx(QP,{size:12}),r("agents.canImplement")]}),f.jsx("p",{className:"text-2xs text-warm-400 mt-0.5",children:r("agents.canImplementHelp")})]})]})}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-2",children:r("agents.color")}),f.jsxs("div",{className:"flex items-center gap-2.5",children:[f.jsx("div",{className:"w-10 h-10 rounded-full flex items-center justify-center text-white text-sm font-bold flex-shrink-0 shadow-sm",style:{backgroundColor:k},children:d?d.charAt(0).toUpperCase():"?"}),f.jsx("div",{className:"flex flex-wrap gap-2",children:$o.map(M=>f.jsx("button",{onClick:()=>E(M),className:`w-7 h-7 rounded-full transition-all ${k===M?"ring-2 ring-offset-2 ring-warm-400 scale-110":"hover:scale-105 opacity-70 hover:opacity-100"}`,style:{backgroundColor:M}},M))})]})]}),f.jsxs("div",{className:"flex justify-end gap-3 pt-2 border-t border-warm-100",children:[f.jsx("button",{onClick:D,className:"btn btn-sm text-xs text-warm-500",children:r("header.cancel")}),f.jsx("button",{onClick:q,disabled:!d.trim()||!v.trim()||O,className:"btn btn-sm btn-primary text-xs",children:r(O?"header.saving":"header.save")})]})]})]})}const Lz={title:"",description:"",agent_ids:[],max_rounds:3,auto_implement:!1,implement_agent_id:""};function _7({agents:e,initialValues:t,mode:n,allowAdvancedFields:r=!0,submitting:a=!1,onSubmit:i,onCancel:s}){const{t:l,lang:c}=Ze(),[d,h]=x.useState({...Lz,...t});x.useEffect(()=>{h({...Lz,...t})},[t]);const m=(_,k)=>{h(E=>({...E,[_]:k}))},g=_=>l(`agents.roles.${_.role}`)||_.role,v=d.agent_ids.map(_=>e.find(k=>k.id===_)).filter(_=>!!_),b=_=>{h(k=>{const E=k.agent_ids.includes(_)?k.agent_ids.filter(T=>T!==_):[...k.agent_ids,_];return{...k,agent_ids:E,implement_agent_id:k.implement_agent_id&&!E.includes(k.implement_agent_id)?"":k.implement_agent_id}})},w=(_,k)=>{h(E=>{const T=E.agent_ids.indexOf(_),A=T+k;if(T===-1||A<0||A>=E.agent_ids.length)return E;const O=[...E.agent_ids];return[O[T],O[A]]=[O[A],O[T]],{...E,agent_ids:O}})},S=async()=>{!d.title.trim()||!d.description.trim()||r&&d.agent_ids.length<2||r&&d.auto_implement&&!d.implement_agent_id||await i({title:d.title.trim(),description:d.description.trim(),agent_ids:d.agent_ids,max_rounds:d.max_rounds,auto_implement:r?d.auto_implement:!1,implement_agent_id:r&&d.auto_implement?d.implement_agent_id:void 0})},j=d.title.trim()&&d.description.trim()&&(!r||d.agent_ids.length>=2)&&(!r||!d.auto_implement||!!d.implement_agent_id);return f.jsxs("div",{className:"card p-5 space-y-5",children:[f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-2",children:c==="ko"?"제목":"Title"}),f.jsx("input",{type:"text",value:d.title,onChange:_=>m("title",_.target.value),className:"input-field",placeholder:c==="ko"?"토론 주제를 입력하세요":"Enter discussion topic"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-2",children:c==="ko"?"설명":"Description"}),f.jsx("textarea",{value:d.description,onChange:_=>m("description",_.target.value),rows:4,className:"input-field resize-y min-h-[80px]",placeholder:c==="ko"?"토론할 기능이나 의사결정 배경을 자세히 설명하세요":"Describe the feature to discuss in detail"})]}),r&&f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"space-y-3",children:[f.jsxs("div",{children:[f.jsxs("label",{className:"block text-xs font-medium text-warm-500 mb-1.5",children:[l("discussions.agents"),f.jsx("span",{className:"ml-2 text-warm-400 font-normal",children:c==="ko"?`(${d.agent_ids.length}명 선택됨 · 최소 2명)`:`(${d.agent_ids.length} selected · min 2)`})]}),f.jsx("p",{className:"text-[11px] text-warm-400",children:c==="ko"?"참여 에이전트를 고른 뒤, 아래 발언 순서에서 실제 토론 진행 순서를 조정합니다.":"Select participants first, then adjust the actual speaking order below."})]}),f.jsxs("div",{className:"rounded-2xl border border-accent/30 bg-accent/5 p-3 space-y-3",children:[f.jsxs("div",{className:"flex items-center justify-between gap-3",children:[f.jsxs("div",{children:[f.jsx("div",{className:"text-xs font-semibold text-warm-700",children:c==="ko"?"발언 순서":"Speaking Order"}),f.jsx("p",{className:"text-[11px] text-warm-500 mt-1",children:c==="ko"?"1라운드 기준이며, 이후 라운드에도 같은 순서로 반복됩니다.":"This order is used for round 1 and repeats in later rounds."})]}),v.length>=2&&f.jsx("div",{className:"text-2xs font-semibold text-accent-dark bg-white/70 border border-accent/30 rounded-full px-2.5 py-1",children:c==="ko"?"순서 조정 가능":"Reorder enabled"})]}),v.length===0?f.jsx("div",{className:"rounded-xl border border-dashed border-warm-200 bg-white/70 px-4 py-5 text-center text-xs text-warm-400",children:c==="ko"?"에이전트를 선택하면 여기서 발언 순서를 바로 조정할 수 있습니다.":"Select agents to adjust the speaking order here."}):f.jsx("div",{className:"space-y-2",children:v.map((_,k)=>{const E=k===0,T=k===v.length-1,A=E?c==="ko"?"첫 발언":"Opens the round":T?c==="ko"?"마지막 발언":"Closes the round":c==="ko"?`${k+1}번째 발언`:`Turn ${k+1}`;return f.jsxs("div",{className:"flex flex-col gap-3 rounded-xl border border-warm-200 bg-white/85 px-3 py-3 md:flex-row md:items-center md:justify-between",children:[f.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[f.jsx("div",{className:"inline-flex h-7 w-7 items-center justify-center rounded-full bg-accent text-[11px] font-bold text-white flex-shrink-0",children:k+1}),f.jsx("div",{className:"w-6 h-6 rounded-full flex-shrink-0 border border-white/80 shadow-sm",style:{backgroundColor:_.avatar_color||"#6366f1"}}),f.jsxs("div",{className:"min-w-0",children:[f.jsx("div",{className:"text-sm font-semibold text-warm-700 truncate",children:_.name}),f.jsxs("div",{className:"text-[11px] text-warm-500",children:[g(_)," · ",A]})]})]}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("button",{type:"button",onClick:()=>w(_.id,-1),disabled:E,className:"px-2.5 py-1.5 rounded-lg border border-warm-200 bg-warm-50 text-[11px] font-medium text-warm-600 hover:bg-warm-100 disabled:opacity-40 disabled:cursor-not-allowed",children:c==="ko"?"앞으로":"Earlier"}),f.jsx("button",{type:"button",onClick:()=>w(_.id,1),disabled:T,className:"px-2.5 py-1.5 rounded-lg border border-warm-200 bg-warm-50 text-[11px] font-medium text-warm-600 hover:bg-warm-100 disabled:opacity-40 disabled:cursor-not-allowed",children:c==="ko"?"뒤로":"Later"})]})]},_.id)})})]}),e.length===0?f.jsx("p",{className:"text-xs text-warm-400 py-3 px-4 bg-warm-50 rounded-xl border border-warm-150",children:l("agents.empty")}):f.jsx("div",{className:"grid gap-2 sm:grid-cols-2 xl:grid-cols-3",children:e.map(_=>{const k=d.agent_ids.includes(_.id),E=d.agent_ids.indexOf(_.id)+1;return f.jsxs("button",{type:"button",onClick:()=>b(_.id),className:`text-left rounded-2xl border px-3.5 py-3 transition-all ${k?"border-accent bg-accent/5 shadow-sm":"border-warm-200 bg-warm-50 hover:border-warm-300 hover:bg-warm-100"}`,children:[f.jsxs("div",{className:"flex items-start justify-between gap-3",children:[f.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[f.jsx("div",{className:"w-6 h-6 rounded-full flex-shrink-0 border border-white/80 shadow-sm",style:{backgroundColor:_.avatar_color||"#6366f1"}}),f.jsxs("div",{className:"min-w-0",children:[f.jsx("div",{className:`text-sm font-semibold truncate ${k?"text-warm-700":"text-warm-600"}`,children:_.name}),f.jsx("div",{className:"text-[11px] text-warm-400",children:g(_)})]})]}),k&&f.jsx("div",{className:"inline-flex items-center justify-center min-w-7 h-7 rounded-full bg-accent text-[11px] font-bold text-white flex-shrink-0",children:E})]}),f.jsx("div",{className:`mt-3 text-[11px] ${k?"text-accent-dark":"text-warm-400"}`,children:k?c==="ko"?`${E}번째 발언으로 참여 중`:`Included as turn ${E}`:c==="ko"?"클릭해서 참여 에이전트에 추가":"Click to add this participant"})]},_.id)})})]}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-2",children:l("discussions.maxRounds")}),f.jsx("input",{type:"number",min:1,max:10,value:d.max_rounds,onChange:_=>m("max_rounds",Number(_.target.value)),className:"input-field w-24 text-center"}),f.jsx("p",{className:"text-2xs text-warm-400 mt-1.5",children:l("discussions.roundExplain")})]}),f.jsxs("div",{children:[f.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[f.jsx("input",{type:"checkbox",checked:d.auto_implement,onChange:_=>{const k=_.target.checked;h(E=>({...E,auto_implement:k,implement_agent_id:k?E.implement_agent_id:""}))},className:"rounded border-warm-300 text-accent focus:ring-accent"}),f.jsx("span",{className:"text-xs font-medium text-warm-500",children:l("discussions.autoImplement")})]}),f.jsx("p",{className:"text-2xs text-warm-400 mt-1 ml-6",children:l("discussions.autoImplementHint")}),d.auto_implement&&f.jsxs("div",{className:"mt-2 ml-6",children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-1",children:l("discussions.selectAgent")}),f.jsxs("select",{value:d.implement_agent_id,onChange:_=>m("implement_agent_id",_.target.value),className:"input-field text-xs w-56",children:[f.jsx("option",{value:"",children:c==="ko"?"-- 에이전트 선택 --":"-- Select agent --"}),v.map(_=>f.jsxs("option",{value:_.id,children:[_.name," (",g(_),")"]},_.id))]})]})]})]}),f.jsxs("div",{className:"flex justify-end gap-3 pt-2 border-t border-warm-100",children:[f.jsx("button",{type:"button",onClick:s,className:"btn-secondary text-xs py-2",children:l("header.cancel")}),f.jsx("button",{type:"button",onClick:S,disabled:!j||a,className:"btn-primary text-xs py-2",children:l(a?"header.saving":n==="create"?"discussions.add":"header.save")})]})]})}const sbe={pending:"bg-warm-200 text-warm-600",running:"bg-status-success/10 text-status-success",paused:"bg-amber-100 text-amber-700",completed:"bg-accent/10 text-accent",failed:"bg-status-error/10 text-status-error",merged:"bg-accent/10 text-accent"};function obe({projectId:e,discussions:t,onAddDiscussion:n,onStartDiscussion:r,onStopDiscussion:a,onDeleteDiscussion:i}){const{t:s}=Ze(),l=zg(),[c,d]=x.useState([]),[h,m]=x.useState(!1),[g,v]=x.useState(!1),[b,w]=x.useState(!1);x.useEffect(()=>{_8(e).then(d).catch(()=>{})},[e]);const S=x.useCallback(async _=>{w(!0);try{const k=await Wne(e,_);n(k),m(!1)}finally{w(!1)}},[e,n]),j=_=>{try{return JSON.parse(_).map(E=>c.find(T=>T.id===E)).filter(E=>!!E)}catch{return[]}};return f.jsxs("div",{className:"space-y-4 animate-fade-in",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("h2",{className:"text-sm font-semibold text-warm-700 tracking-wide uppercase",children:s("discussions.title")}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx("button",{onClick:()=>v(!g),className:"btn-secondary text-xs py-2",children:s("agents.manage")}),f.jsxs("button",{onClick:()=>m(!h),className:"btn-primary text-xs py-2",children:["+ ",s("discussions.add")]})]})]}),g&&f.jsx("div",{className:"card p-4",children:f.jsx(ibe,{projectId:e,agents:c,onAgentsChange:d})}),h&&f.jsx(_7,{agents:c,mode:"create",submitting:b,onSubmit:S,onCancel:()=>m(!1)}),t.length===0&&!h?f.jsx("div",{className:"card",children:f.jsx(xl,{icon:_te,title:s("discussions.empty"),description:s("discussions.emptyHint")})}):f.jsx("div",{className:"space-y-3",children:t.map((_,k)=>{const E=j(_.agent_ids),T=_.status==="pending"||_.status==="paused"||_.status==="failed",A=_.status==="running";return f.jsx("div",{className:"card p-4 hover:shadow-md transition-all cursor-pointer animate-slide-up",onClick:()=>l(`/projects/${e}/discussions/${_.id}`),style:{animationDelay:`${k*50}ms`},children:f.jsxs("div",{className:"flex items-start justify-between gap-3",children:[f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("h3",{className:"text-sm font-semibold text-warm-700 truncate",children:_.title}),f.jsx("span",{className:`px-1.5 py-0.5 rounded text-2xs font-semibold uppercase ${sbe[_.status]||""}`,children:s(`status.${_.status}`)||_.status})]}),f.jsx("p",{className:"text-xs text-warm-400 mt-1 line-clamp-1",children:_.description}),f.jsxs("div",{className:"flex items-center gap-3 mt-2",children:[f.jsxs("span",{className:"text-2xs text-warm-400",children:[s("discussions.round")," ",_.current_round,"/",_.max_rounds]}),f.jsx("div",{className:"flex -space-x-1",children:E.slice(0,5).map(O=>f.jsx("div",{className:"w-5 h-5 rounded-full border-2 border-white text-[8px] text-white font-bold flex items-center justify-center",style:{backgroundColor:O.avatar_color||"#6366f1"},title:O.name,children:O.name.charAt(0)},O.id))})]})]}),f.jsxs("div",{className:"flex gap-1",onClick:O=>O.stopPropagation(),children:[T&&f.jsx("button",{onClick:()=>r(_.id),className:"p-1.5 text-status-success hover:bg-status-success/10 rounded transition-colors",title:s("header.runAll"),children:f.jsx(yl,{size:16})}),A&&f.jsx("button",{onClick:()=>a(_.id),className:"p-1.5 text-amber-600 hover:bg-amber-50 rounded transition-colors",title:s("discussions.pause"),children:f.jsx(W2,{size:16})}),f.jsx("button",{onClick:()=>i(_.id),className:"p-1.5 text-warm-400 hover:text-status-error rounded transition-colors",title:s("todo.delete"),children:f.jsx(es,{size:16})})]})]})},_.id)})})]})}function lbe({onSave:e,onCancel:t,projectCliTool:n,projectCliModel:r,isGitRepo:a}){const{t:i}=Ze(),[s,l]=x.useState(""),[c,d]=x.useState(""),[h,m]=x.useState(n||""),[g,v]=x.useState(r||""),[b,w]=x.useState(!1),S=ii.filter(E=>E.supportsInteractive),_=$u(h||n||"claude"),k=E=>{E.preventDefault(),s.trim()&&e(s.trim(),c.trim(),h||void 0,g||void 0,b)};return f.jsxs("form",{onSubmit:k,className:"card p-4 space-y-3 animate-scale-in",children:[f.jsx("input",{type:"text",value:s,onChange:E=>l(E.target.value),placeholder:i("session.title"),className:"input w-full text-sm",autoFocus:!0}),f.jsx("textarea",{value:c,onChange:E=>d(E.target.value),placeholder:i("session.description"),className:"input w-full text-sm min-h-[60px] resize-y",rows:2}),f.jsxs("div",{className:"flex gap-2",children:[f.jsxs("select",{value:h,onChange:E=>{m(E.target.value),v("")},className:"input text-xs flex-1",children:[f.jsxs("option",{value:"",children:[i("session.cliTool")," (Default)"]}),S.map(E=>f.jsx("option",{value:E.value,children:E.label},E.value))]}),f.jsxs("select",{value:g,onChange:E=>v(E.target.value),className:"input text-xs flex-1",children:[f.jsxs("option",{value:"",children:[i("session.model")," (Default)"]}),_.models.filter(E=>E.value).map(E=>f.jsx("option",{value:E.value,children:E.label},E.value))]})]}),a&&f.jsxs("label",{className:"flex items-center gap-2 text-xs text-warm-500 cursor-pointer select-none",children:[f.jsx("input",{type:"checkbox",checked:b,onChange:E=>w(E.target.checked),className:"rounded border-warm-300"}),f.jsx(Bg,{size:14}),i("session.worktree")]}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsx("button",{type:"button",onClick:t,className:"btn-secondary text-xs py-1.5 px-3",children:i("form.cancel")}),f.jsx("button",{type:"submit",disabled:!s.trim(),className:"btn-primary text-xs py-1.5 px-3",children:i("session.create")})]})]})}const ube={pending:"bg-warm-200 text-warm-600",running:"bg-status-success/10 text-status-success",completed:"bg-accent/10 text-accent",failed:"bg-status-error/10 text-status-error",stopped:"bg-amber-100 text-amber-700"};function cbe(e){return{id:e.id,todo_id:e.session_id,log_type:e.log_type,message:e.message,created_at:e.created_at}}function dbe({projectId:e,sessions:t,projectCliTool:n,projectCliModel:r,isGitRepo:a,onAddSession:i,onStartSession:s,onStopSession:l,onDeleteSession:c,onCleanupSession:d,onSendInput:h,onEvent:m}){const{t:g}=Ze(),[v,b]=x.useState(!1),[w,S]=x.useState(!1),[j,_]=x.useState(null),[k,E]=x.useState({}),T=x.useRef(k);T.current=k,x.useEffect(()=>{j&&lre(j).then(I=>{E(P=>({...P,[j]:I.map(cbe)}))}).catch(()=>{})},[j]),x.useEffect(()=>{const I=t.find(P=>P.status==="running");I&&!j&&_(I.id)},[t,j]),x.useEffect(()=>m(I=>{if(I.type==="session:log"&&I.sessionId&&I.message){const P={id:`ws-${Date.now()}-${Math.random()}`,todo_id:I.sessionId,log_type:I.logType||"output",message:I.message,created_at:new Date().toISOString()};E(D=>({...D,[I.sessionId]:[...D[I.sessionId]||[],P]}))}}),[m]);const A=x.useCallback(async(I,P,D,q,z)=>{S(!0);try{const F=await are(e,{title:I,description:P||void 0,cli_tool:D,cli_model:q,use_worktree:z});i(F),b(!1)}finally{S(!1)}},[e,i]),O=x.useCallback((I,P)=>{h(I,P)},[h]);return f.jsxs("div",{className:"space-y-4 animate-fade-in",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("h2",{className:"text-sm font-semibold text-warm-700 tracking-wide uppercase",children:g("tabs.sessions")}),f.jsxs("button",{onClick:()=>b(!v),className:"btn-primary text-xs py-2",children:["+ ",g("session.new")]})]}),v&&f.jsx(lbe,{onSave:A,onCancel:()=>b(!1),projectCliTool:n,projectCliModel:r,isGitRepo:a}),t.length===0&&!v?f.jsx("div",{className:"card",children:f.jsx(xl,{icon:r8,title:g("session.empty"),description:g("session.emptyHint")})}):f.jsx("div",{className:"space-y-3",children:t.map((I,P)=>{const D=j===I.id,q=["pending","failed","stopped","completed"].includes(I.status),z=I.status==="running",F=k[I.id]||[];return f.jsxs("div",{className:"card overflow-hidden animate-slide-up",style:{animationDelay:`${P*50}ms`},children:[f.jsx("div",{className:"p-4 cursor-pointer hover:bg-warm-50/50 transition-colors",onClick:()=>_(D?null:I.id),children:f.jsxs("div",{className:"flex items-start justify-between gap-3",children:[f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(zu,{size:12,className:`text-warm-400 transition-transform ${D?"rotate-90":""}`}),f.jsx("h3",{className:"text-sm font-semibold text-warm-700 truncate",children:I.title}),f.jsx("span",{className:`px-1.5 py-0.5 rounded text-2xs font-semibold uppercase ${ube[I.status]||""}`,children:g(`status.${I.status}`)||I.status})]}),I.description&&f.jsx("p",{className:"text-xs text-warm-400 mt-1 ml-5 line-clamp-1",children:I.description}),f.jsxs("div",{className:"flex items-center gap-2 mt-1 ml-5",children:[f.jsxs("span",{className:"text-2xs text-warm-300",children:[I.cli_tool||"claude",I.cli_model?` / ${I.cli_model}`:""]}),I.branch_name&&f.jsxs("span",{className:"text-2xs text-accent/70 flex items-center gap-0.5",children:[f.jsx(Bg,{size:12}),I.branch_name]})]})]}),f.jsxs("div",{className:"flex gap-1",onClick:R=>R.stopPropagation(),children:[q&&f.jsx("button",{onClick:()=>{s(I.id),_(I.id)},className:"p-1.5 text-status-success hover:bg-status-success/10 rounded transition-colors",title:g("session.start"),children:f.jsx(yl,{size:16})}),z&&f.jsx("button",{onClick:()=>l(I.id),className:"p-1.5 text-amber-600 hover:bg-amber-50 rounded transition-colors",title:g("session.stop"),children:f.jsx(Ug,{size:16})}),I.status!=="running"&&!!I.worktree_path&&f.jsx("button",{onClick:()=>{const R=I.branch_name?confirm(g("cleanup.confirmDeleteBranch").replace("{name}",I.branch_name)):!1;d(I.id,R)},className:"p-1.5 text-warm-400 hover:text-amber-600 rounded transition-colors",title:g("session.cleanup"),children:f.jsx(V2,{size:16})}),f.jsx("button",{onClick:()=>c(I.id),className:"p-1.5 text-warm-400 hover:text-status-error rounded transition-colors",title:g("session.delete"),children:f.jsx(es,{size:16})})]})]})}),D&&f.jsxs("div",{className:"overflow-hidden",style:{borderTop:`1px solid ${Wt.separator}`},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",background:Wt.titleBg,padding:"8px 12px",gap:8,userSelect:"none"},children:[f.jsxs("div",{style:{display:"flex",gap:6},children:[f.jsx("span",{style:{width:12,height:12,borderRadius:"50%",background:"#ff5f57",display:"inline-block"}}),f.jsx("span",{style:{width:12,height:12,borderRadius:"50%",background:"#febc2e",display:"inline-block"}}),f.jsx("span",{style:{width:12,height:12,borderRadius:"50%",background:"#28c840",display:"inline-block"}})]}),f.jsxs("span",{style:{flex:1,textAlign:"center",color:Wt.titleText,fontSize:12,fontFamily:Kd},children:[I.title,I.cli_tool?` — ${I.cli_tool}${I.cli_model?`/${I.cli_model}`:""}`:""]}),f.jsx("div",{style:{width:54}})]}),f.jsxs("div",{style:{background:Wt.bg,padding:"12px 16px",fontFamily:Kd,fontSize:12,lineHeight:"1.5",color:Wt.text},children:[I.branch_name&&f.jsxs("div",{style:{marginBottom:8},children:[f.jsx("span",{style:{color:Wt.prompt},children:"$"})," ",f.jsx("span",{style:{color:Wt.bright},children:"git"})," ",f.jsx("span",{style:{color:Wt.dim},children:"branch"}),f.jsxs("div",{children:[f.jsx("span",{style:{color:Wt.success},children:"*"})," ",f.jsx("span",{style:{color:Wt.info},children:I.branch_name})]})]}),f.jsx(Xg,{logs:F,interactive:I.status==="running",todoId:I.id,onSendInput:I.status==="running"?O:void 0,embedded:!0})]})]})]},I.id)})})]})}function fbe(e,t="all"){return ct(`/api/projects/${e}/analytics?period=${t}`)}function C7(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=C7(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function zt(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=C7(e))&&(r&&(r+=" "),r+=t);return r}var hbe=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function tE(e){if(typeof e!="string")return!1;var t=hbe;return t.includes(e)}var mbe=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],pbe=new Set(mbe);function N7(e){return typeof e!="string"?!1:pbe.has(e)}function E7(e){return typeof e=="string"&&e.startsWith("data-")}function Qr(e){if(typeof e!="object"||e===null)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(N7(n)||E7(n))&&(t[n]=e[n]);return t}function ol(e){if(e==null)return null;if(x.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return Qr(t)}return typeof e=="object"&&!Array.isArray(e)?Qr(e):null}function xr(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(N7(n)||E7(n)||tE(n))&&(t[n]=e[n]);return t}function gbe(e){return e==null?null:x.isValidElement(e)?xr(e.props):typeof e=="object"&&!Array.isArray(e)?xr(e):null}var vbe=["children","width","height","viewBox","className","style","title","desc"];function BC(){return BC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},BC.apply(null,arguments)}function ybe(e,t){if(e==null)return{};var n,r,a=xbe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function xbe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var A7=x.forwardRef((e,t)=>{var{children:n,width:r,height:a,viewBox:i,className:s,style:l,title:c,desc:d}=e,h=ybe(e,vbe),m=i||{width:r,height:a,x:0,y:0},g=zt("recharts-surface",s);return x.createElement("svg",BC({},xr(h),{className:g,width:r,height:a,style:l,viewBox:"".concat(m.x," ").concat(m.y," ").concat(m.width," ").concat(m.height),ref:t}),x.createElement("title",null,c),x.createElement("desc",null,d),n)}),bbe=["children","className"];function FC(){return FC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},FC.apply(null,arguments)}function wbe(e,t){if(e==null)return{};var n,r,a=Sbe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Sbe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Bn=x.forwardRef((e,t)=>{var{children:n,className:r}=e,a=wbe(e,bbe),i=zt("recharts-layer",r);return x.createElement("g",FC({className:i},xr(a),{ref:t}),n)}),jbe=x.createContext(null);function Qt(e){return function(){return e}}const T7=Math.cos,Gp=Math.sin,Fa=Math.sqrt,Vp=Math.PI,Nv=2*Vp,HC=Math.PI,UC=2*HC,Go=1e-6,kbe=UC-Go;function O7(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function _be(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return O7;const n=10**t;return function(r){this._+=r[0];for(let a=1,i=r.length;a<i;++a)this._+=Math.round(arguments[a]*n)/n+r[a]}}class Cbe{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?O7:_be(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,a){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+a}`}bezierCurveTo(t,n,r,a,i,s){this._append`C${+t},${+n},${+r},${+a},${this._x1=+i},${this._y1=+s}`}arcTo(t,n,r,a,i){if(t=+t,n=+n,r=+r,a=+a,i=+i,i<0)throw new Error(`negative radius: ${i}`);let s=this._x1,l=this._y1,c=r-t,d=a-n,h=s-t,m=l-n,g=h*h+m*m;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(g>Go)if(!(Math.abs(m*c-d*h)>Go)||!i)this._append`L${this._x1=t},${this._y1=n}`;else{let v=r-s,b=a-l,w=c*c+d*d,S=v*v+b*b,j=Math.sqrt(w),_=Math.sqrt(g),k=i*Math.tan((HC-Math.acos((w+g-S)/(2*j*_)))/2),E=k/_,T=k/j;Math.abs(E-1)>Go&&this._append`L${t+E*h},${n+E*m}`,this._append`A${i},${i},0,0,${+(m*v>h*b)},${this._x1=t+T*c},${this._y1=n+T*d}`}}arc(t,n,r,a,i,s){if(t=+t,n=+n,r=+r,s=!!s,r<0)throw new Error(`negative radius: ${r}`);let l=r*Math.cos(a),c=r*Math.sin(a),d=t+l,h=n+c,m=1^s,g=s?a-i:i-a;this._x1===null?this._append`M${d},${h}`:(Math.abs(this._x1-d)>Go||Math.abs(this._y1-h)>Go)&&this._append`L${d},${h}`,r&&(g<0&&(g=g%UC+UC),g>kbe?this._append`A${r},${r},0,1,${m},${t-l},${n-c}A${r},${r},0,1,${m},${this._x1=d},${this._y1=h}`:g>Go&&this._append`A${r},${r},0,${+(g>=HC)},${m},${this._x1=t+r*Math.cos(i)},${this._y1=n+r*Math.sin(i)}`)}rect(t,n,r,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+a}h${-r}Z`}toString(){return this._}}function nE(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new Cbe(t)}function rE(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function M7(e){this._context=e}M7.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Ev(e){return new M7(e)}function P7(e){return e[0]}function D7(e){return e[1]}function R7(e,t){var n=Qt(!0),r=null,a=Ev,i=null,s=nE(l);e=typeof e=="function"?e:e===void 0?P7:Qt(e),t=typeof t=="function"?t:t===void 0?D7:Qt(t);function l(c){var d,h=(c=rE(c)).length,m,g=!1,v;for(r==null&&(i=a(v=s())),d=0;d<=h;++d)!(d<h&&n(m=c[d],d,c))===g&&((g=!g)?i.lineStart():i.lineEnd()),g&&i.point(+e(m,d,c),+t(m,d,c));if(v)return i=null,v+""||null}return l.x=function(c){return arguments.length?(e=typeof c=="function"?c:Qt(+c),l):e},l.y=function(c){return arguments.length?(t=typeof c=="function"?c:Qt(+c),l):t},l.defined=function(c){return arguments.length?(n=typeof c=="function"?c:Qt(!!c),l):n},l.curve=function(c){return arguments.length?(a=c,r!=null&&(i=a(r)),l):a},l.context=function(c){return arguments.length?(c==null?r=i=null:i=a(r=c),l):r},l}function Km(e,t,n){var r=null,a=Qt(!0),i=null,s=Ev,l=null,c=nE(d);e=typeof e=="function"?e:e===void 0?P7:Qt(+e),t=typeof t=="function"?t:Qt(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?D7:Qt(+n);function d(m){var g,v,b,w=(m=rE(m)).length,S,j=!1,_,k=new Array(w),E=new Array(w);for(i==null&&(l=s(_=c())),g=0;g<=w;++g){if(!(g<w&&a(S=m[g],g,m))===j)if(j=!j)v=g,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),b=g-1;b>=v;--b)l.point(k[b],E[b]);l.lineEnd(),l.areaEnd()}j&&(k[g]=+e(S,g,m),E[g]=+t(S,g,m),l.point(r?+r(S,g,m):k[g],n?+n(S,g,m):E[g]))}if(_)return l=null,_+""||null}function h(){return R7().defined(a).curve(s).context(i)}return d.x=function(m){return arguments.length?(e=typeof m=="function"?m:Qt(+m),r=null,d):e},d.x0=function(m){return arguments.length?(e=typeof m=="function"?m:Qt(+m),d):e},d.x1=function(m){return arguments.length?(r=m==null?null:typeof m=="function"?m:Qt(+m),d):r},d.y=function(m){return arguments.length?(t=typeof m=="function"?m:Qt(+m),n=null,d):t},d.y0=function(m){return arguments.length?(t=typeof m=="function"?m:Qt(+m),d):t},d.y1=function(m){return arguments.length?(n=m==null?null:typeof m=="function"?m:Qt(+m),d):n},d.lineX0=d.lineY0=function(){return h().x(e).y(t)},d.lineY1=function(){return h().x(e).y(n)},d.lineX1=function(){return h().x(r).y(t)},d.defined=function(m){return arguments.length?(a=typeof m=="function"?m:Qt(!!m),d):a},d.curve=function(m){return arguments.length?(s=m,i!=null&&(l=s(i)),d):s},d.context=function(m){return arguments.length?(m==null?i=l=null:l=s(i=m),d):i},d}class I7{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function Nbe(e){return new I7(e,!0)}function Ebe(e){return new I7(e,!1)}const aE={draw(e,t){const n=Fa(t/Vp);e.moveTo(n,0),e.arc(0,0,n,0,Nv)}},Abe={draw(e,t){const n=Fa(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},L7=Fa(1/3),Tbe=L7*2,Obe={draw(e,t){const n=Fa(t/Tbe),r=n*L7;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Mbe={draw(e,t){const n=Fa(t),r=-n/2;e.rect(r,r,n,n)}},Pbe=.8908130915292852,z7=Gp(Vp/10)/Gp(7*Vp/10),Dbe=Gp(Nv/10)*z7,Rbe=-T7(Nv/10)*z7,Ibe={draw(e,t){const n=Fa(t*Pbe),r=Dbe*n,a=Rbe*n;e.moveTo(0,-n),e.lineTo(r,a);for(let i=1;i<5;++i){const s=Nv*i/5,l=T7(s),c=Gp(s);e.lineTo(c*n,-l*n),e.lineTo(l*r-c*a,c*r+l*a)}e.closePath()}},Ok=Fa(3),Lbe={draw(e,t){const n=-Fa(t/(Ok*3));e.moveTo(0,n*2),e.lineTo(-Ok*n,-n),e.lineTo(Ok*n,-n),e.closePath()}},da=-.5,fa=Fa(3)/2,GC=1/Fa(12),zbe=(GC/2+1)*3,$be={draw(e,t){const n=Fa(t/zbe),r=n/2,a=n*GC,i=r,s=n*GC+n,l=-i,c=s;e.moveTo(r,a),e.lineTo(i,s),e.lineTo(l,c),e.lineTo(da*r-fa*a,fa*r+da*a),e.lineTo(da*i-fa*s,fa*i+da*s),e.lineTo(da*l-fa*c,fa*l+da*c),e.lineTo(da*r+fa*a,da*a-fa*r),e.lineTo(da*i+fa*s,da*s-fa*i),e.lineTo(da*l+fa*c,da*c-fa*l),e.closePath()}};function qbe(e,t){let n=null,r=nE(a);e=typeof e=="function"?e:Qt(e||aE),t=typeof t=="function"?t:Qt(t===void 0?64:+t);function a(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return a.type=function(i){return arguments.length?(e=typeof i=="function"?i:Qt(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:Qt(+i),a):t},a.context=function(i){return arguments.length?(n=i??null,a):n},a}function Kp(){}function Wp(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function $7(e){this._context=e}$7.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Wp(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Wp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Bbe(e){return new $7(e)}function q7(e){this._context=e}q7.prototype={areaStart:Kp,areaEnd:Kp,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Wp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Fbe(e){return new q7(e)}function B7(e){this._context=e}B7.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Wp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Hbe(e){return new B7(e)}function F7(e){this._context=e}F7.prototype={areaStart:Kp,areaEnd:Kp,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Ube(e){return new F7(e)}function zz(e){return e<0?-1:1}function $z(e,t,n){var r=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(r||a<0&&-0),s=(n-e._y1)/(a||r<0&&-0),l=(i*a+s*r)/(r+a);return(zz(i)+zz(s))*Math.min(Math.abs(i),Math.abs(s),.5*Math.abs(l))||0}function qz(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Mk(e,t,n){var r=e._x0,a=e._y0,i=e._x1,s=e._y1,l=(i-r)/3;e._context.bezierCurveTo(r+l,a+l*t,i-l,s-l*n,i,s)}function Yp(e){this._context=e}Yp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Mk(this,this._t0,qz(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Mk(this,qz(this,n=$z(this,e,t)),n);break;default:Mk(this,this._t0,n=$z(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function H7(e){this._context=new U7(e)}(H7.prototype=Object.create(Yp.prototype)).point=function(e,t){Yp.prototype.point.call(this,t,e)};function U7(e){this._context=e}U7.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,a,i){this._context.bezierCurveTo(t,e,r,n,i,a)}};function Gbe(e){return new Yp(e)}function Vbe(e){return new H7(e)}function G7(e){this._context=e}G7.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=Bz(e),a=Bz(t),i=0,s=1;s<n;++i,++s)this._context.bezierCurveTo(r[0][i],a[0][i],r[1][i],a[1][i],e[s],t[s]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Bz(e){var t,n=e.length-1,r,a=new Array(n),i=new Array(n),s=new Array(n);for(a[0]=0,i[0]=2,s[0]=e[0]+2*e[1],t=1;t<n-1;++t)a[t]=1,i[t]=4,s[t]=4*e[t]+2*e[t+1];for(a[n-1]=2,i[n-1]=7,s[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=a[t]/i[t-1],i[t]-=r,s[t]-=r*s[t-1];for(a[n-1]=s[n-1]/i[n-1],t=n-2;t>=0;--t)a[t]=(s[t]-a[t+1])/i[t];for(i[n-1]=(e[n]+a[n-1])/2,t=0;t<n-1;++t)i[t]=2*e[t+1]-a[t+1];return[a,i]}function Kbe(e){return new G7(e)}function Av(e,t){this._context=e,this._t=t}Av.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function Wbe(e){return new Av(e,.5)}function Ybe(e){return new Av(e,0)}function Xbe(e){return new Av(e,1)}function ll(e,t){if((s=e.length)>1)for(var n=1,r,a,i=e[t[0]],s,l=i.length;n<s;++n)for(a=i,i=e[t[n]],r=0;r<l;++r)i[r][1]+=i[r][0]=isNaN(a[r][1])?a[r][0]:a[r][1]}function VC(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function Zbe(e,t){return e[t]}function Qbe(e){const t=[];return t.key=e,t}function Jbe(){var e=Qt([]),t=VC,n=ll,r=Zbe;function a(i){var s=Array.from(e.apply(this,arguments),Qbe),l,c=s.length,d=-1,h;for(const m of i)for(l=0,++d;l<c;++l)(s[l][d]=[0,+r(m,s[l].key,d,i)]).data=m;for(l=0,h=rE(t(s));l<c;++l)s[h[l]].index=l;return n(s,h),s}return a.keys=function(i){return arguments.length?(e=typeof i=="function"?i:Qt(Array.from(i)),a):e},a.value=function(i){return arguments.length?(r=typeof i=="function"?i:Qt(+i),a):r},a.order=function(i){return arguments.length?(t=i==null?VC:typeof i=="function"?i:Qt(Array.from(i)),a):t},a.offset=function(i){return arguments.length?(n=i??ll,a):n},a}function e1e(e,t){if((r=e.length)>0){for(var n,r,a=0,i=e[0].length,s;a<i;++a){for(s=n=0;n<r;++n)s+=e[n][a][1]||0;if(s)for(n=0;n<r;++n)e[n][a][1]/=s}ll(e,t)}}function t1e(e,t){if((a=e.length)>0){for(var n=0,r=e[t[0]],a,i=r.length;n<i;++n){for(var s=0,l=0;s<a;++s)l+=e[s][n][1]||0;r[n][1]+=r[n][0]=-l/2}ll(e,t)}}function n1e(e,t){if(!(!((s=e.length)>0)||!((i=(a=e[t[0]]).length)>0))){for(var n=0,r=1,a,i,s;r<i;++r){for(var l=0,c=0,d=0;l<s;++l){for(var h=e[t[l]],m=h[r][1]||0,g=h[r-1][1]||0,v=(m-g)/2,b=0;b<l;++b){var w=e[t[b]],S=w[r][1]||0,j=w[r-1][1]||0;v+=S-j}c+=m,d+=v*m}a[r-1][1]+=a[r-1][0]=n,c&&(n-=d/c)}a[r-1][1]+=a[r-1][0]=n,ll(e,t)}}var Pk={},Dk={},Fz;function r1e(){return Fz||(Fz=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==="__proto__"}e.isUnsafeProperty=t})(Dk)),Dk}var Rk={},Hz;function V7(){return Hz||(Hz=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){switch(typeof n){case"number":case"symbol":return!1;case"string":return n.includes(".")||n.includes("[")||n.includes("]")}}e.isDeepKey=t})(Rk)),Rk}var Ik={},Uz;function iE(){return Uz||(Uz=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){var r;return typeof n=="string"||typeof n=="symbol"?n:Object.is((r=n==null?void 0:n.valueOf)==null?void 0:r.call(n),-0)?"-0":String(n)}e.toKey=t})(Ik)),Ik}var Lk={},zk={},Gz;function a1e(){return Gz||(Gz=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){if(n==null)return"";if(typeof n=="string")return n;if(Array.isArray(n))return n.map(t).join(",");const r=String(n);return r==="0"&&Object.is(Number(n),-0)?"-0":r}e.toString=t})(zk)),zk}var Vz;function sE(){return Vz||(Vz=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=a1e(),n=iE();function r(a){if(Array.isArray(a))return a.map(n.toKey);if(typeof a=="symbol")return[a];a=t.toString(a);const i=[],s=a.length;if(s===0)return i;let l=0,c="",d="",h=!1;for(a.charCodeAt(0)===46&&(i.push(""),l++);l<s;){const m=a[l];d?m==="\\"&&l+1<s?(l++,c+=a[l]):m===d?d="":c+=m:h?m==='"'||m==="'"?d=m:m==="]"?(h=!1,i.push(c),c=""):c+=m:m==="["?(h=!0,c&&(i.push(c),c="")):m==="."?c&&(i.push(c),c=""):c+=m,l++}return c&&i.push(c),i}e.toPath=r})(Lk)),Lk}var Kz;function oE(){return Kz||(Kz=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=r1e(),n=V7(),r=iE(),a=sE();function i(l,c,d){if(l==null)return d;switch(typeof c){case"string":{if(t.isUnsafeProperty(c))return d;const h=l[c];return h===void 0?n.isDeepKey(c)?i(l,a.toPath(c),d):d:h}case"number":case"symbol":{typeof c=="number"&&(c=r.toKey(c));const h=l[c];return h===void 0?d:h}default:{if(Array.isArray(c))return s(l,c,d);if(Object.is(c==null?void 0:c.valueOf(),-0)?c="-0":c=String(c),t.isUnsafeProperty(c))return d;const h=l[c];return h===void 0?d:h}}}function s(l,c,d){if(c.length===0)return d;let h=l;for(let m=0;m<c.length;m++){if(h==null||t.isUnsafeProperty(c[m]))return d;h=h[c[m]]}return h===void 0?d:h}e.get=i})(Pk)),Pk}var $k,Wz;function i1e(){return Wz||(Wz=1,$k=oE().get),$k}var s1e=i1e();const ul=ta(s1e);var o1e=4;function Js(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:o1e,n=10**t,r=Math.round(e*n)/n;return Object.is(r,-0)?0:r}function wn(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.reduce((a,i,s)=>{var l=n[s-1];return typeof l=="string"?a+l+i:l!==void 0?a+Js(l)+i:a+i},"")}var Yn=e=>e===0?0:e>0?1:-1,fi=e=>typeof e=="number"&&e!=+e,cl=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,He=e=>(typeof e=="number"||e instanceof Number)&&!fi(e),hi=e=>He(e)||typeof e=="string",l1e=0,vf=e=>{var t=++l1e;return"".concat(e||"").concat(t)},dr=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!He(t)&&typeof t!="string")return r;var i;if(cl(t)){if(n==null)return r;var s=t.indexOf("%");i=n*parseFloat(t.slice(0,s))/100}else i=+t;return fi(i)&&(i=r),a&&n!=null&&i>n&&(i=n),i},K7=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[String(e[r])])n[String(e[r])]=!0;else return!0;return!1};function sn(e,t,n){return He(e)&&He(t)?Js(e+n*(t-e)):t}function W7(e,t,n){if(!(!e||!e.length))return e.find(r=>r&&(typeof t=="function"?t(r):ul(r,t))===n)}var cn=e=>e===null||typeof e>"u",Yf=e=>cn(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function Tr(e){return e!=null}function _l(){}var u1e=["type","size","sizeType"];function KC(){return KC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},KC.apply(null,arguments)}function Yz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Xz(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Yz(Object(n),!0).forEach(function(r){c1e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function c1e(e,t,n){return(t=d1e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d1e(e){var t=f1e(e,"string");return typeof t=="symbol"?t:t+""}function f1e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function h1e(e,t){if(e==null)return{};var n,r,a=m1e(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function m1e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Y7={symbolCircle:aE,symbolCross:Abe,symbolDiamond:Obe,symbolSquare:Mbe,symbolStar:Ibe,symbolTriangle:Lbe,symbolWye:$be},p1e=Math.PI/180,g1e=e=>{var t="symbol".concat(Yf(e));return Y7[t]||aE},v1e=(e,t,n)=>{if(t==="area")return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var r=18*p1e;return 1.25*e*e*(Math.tan(r)-Math.tan(r*2)*Math.tan(r)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},y1e=(e,t)=>{Y7["symbol".concat(Yf(e))]=t},X7=e=>{var{type:t="circle",size:n=64,sizeType:r="area"}=e,a=h1e(e,u1e),i=Xz(Xz({},a),{},{type:t,size:n,sizeType:r}),s="circle";typeof t=="string"&&(s=t);var l=()=>{var g=g1e(s),v=qbe().type(g).size(v1e(n,r,s)),b=v();if(b!==null)return b},{className:c,cx:d,cy:h}=i,m=xr(i);return He(d)&&He(h)&&He(n)?x.createElement("path",KC({},m,{className:zt("recharts-symbols",c),transform:"translate(".concat(d,", ").concat(h,")"),d:l()})):null};X7.registerSymbol=y1e;var Z7=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,lE=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(x.isValidElement(e)&&(n=e.props),typeof n!="object"&&typeof n!="function")return null;var r={};return Object.keys(n).forEach(a=>{tE(a)&&typeof n[a]=="function"&&(r[a]=(i=>n[a](n,i)))}),r},x1e=(e,t,n)=>r=>(e(t,n,r),null),Tv=(e,t,n)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var r=null;return Object.keys(e).forEach(a=>{var i=e[a];tE(a)&&typeof i=="function"&&(r||(r={}),r[a]=x1e(i,t,n))}),r};function Zz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function b1e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Zz(Object(n),!0).forEach(function(r){w1e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function w1e(e,t,n){return(t=S1e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S1e(e){var t=j1e(e,"string");return typeof t=="symbol"?t:t+""}function j1e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Xn(e,t){var n=b1e({},e),r=t,a=Object.keys(t),i=a.reduce((s,l)=>(s[l]===void 0&&r[l]!==void 0&&(s[l]=r[l]),s),n);return i}var qk={},Bk={},Qz;function k1e(){return Qz||(Qz=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){const a=new Map;for(let i=0;i<n.length;i++){const s=n[i],l=r(s,i,n);a.has(l)||a.set(l,s)}return Array.from(a.values())}e.uniqBy=t})(Bk)),Bk}var Fk={},Jz;function _1e(){return Jz||(Jz=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){return function(...a){return n.apply(this,a.slice(0,r))}}e.ary=t})(Fk)),Fk}var Hk={},e6;function Q7(){return e6||(e6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n}e.identity=t})(Hk)),Hk}var Uk={},Gk={},Vk={},t6;function C1e(){return t6||(t6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Number.isSafeInteger(n)&&n>=0}e.isLength=t})(Vk)),Vk}var n6;function J7(){return n6||(n6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=C1e();function n(r){return r!=null&&typeof r!="function"&&t.isLength(r.length)}e.isArrayLike=n})(Gk)),Gk}var Kk={},r6;function N1e(){return r6||(r6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="object"&&n!==null}e.isObjectLike=t})(Kk)),Kk}var a6;function E1e(){return a6||(a6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=J7(),n=N1e();function r(a){return n.isObjectLike(a)&&t.isArrayLike(a)}e.isArrayLikeObject=r})(Uk)),Uk}var Wk={},Yk={},i6;function A1e(){return i6||(i6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=oE();function n(r){return function(a){return t.get(a,r)}}e.property=n})(Yk)),Yk}var Xk={},Zk={},Qk={},Jk={},s6;function eG(){return s6||(s6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n!==null&&(typeof n=="object"||typeof n=="function")}e.isObject=t})(Jk)),Jk}var e_={},o6;function tG(){return o6||(o6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null||typeof n!="object"&&typeof n!="function"}e.isPrimitive=t})(e_)),e_}var t_={},l6;function nG(){return l6||(l6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){return n===r||Number.isNaN(n)&&Number.isNaN(r)}e.isEqualsSameValueZero=t})(t_)),t_}var u6;function T1e(){return u6||(u6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=eG(),n=tG(),r=nG();function a(h,m,g){return typeof g!="function"?a(h,m,()=>{}):i(h,m,function v(b,w,S,j,_,k){const E=g(b,w,S,j,_,k);return E!==void 0?!!E:i(b,w,v,k)},new Map)}function i(h,m,g,v){if(m===h)return!0;switch(typeof m){case"object":return s(h,m,g,v);case"function":return Object.keys(m).length>0?i(h,{...m},g,v):r.isEqualsSameValueZero(h,m);default:return t.isObject(h)?typeof m=="string"?m==="":!0:r.isEqualsSameValueZero(h,m)}}function s(h,m,g,v){if(m==null)return!0;if(Array.isArray(m))return c(h,m,g,v);if(m instanceof Map)return l(h,m,g,v);if(m instanceof Set)return d(h,m,g,v);const b=Object.keys(m);if(h==null||n.isPrimitive(h))return b.length===0;if(b.length===0)return!0;if(v!=null&&v.has(m))return v.get(m)===h;v==null||v.set(m,h);try{for(let w=0;w<b.length;w++){const S=b[w];if(!n.isPrimitive(h)&&!(S in h)||m[S]===void 0&&h[S]!==void 0||m[S]===null&&h[S]!==null||!g(h[S],m[S],S,h,m,v))return!1}return!0}finally{v==null||v.delete(m)}}function l(h,m,g,v){if(m.size===0)return!0;if(!(h instanceof Map))return!1;for(const[b,w]of m.entries()){const S=h.get(b);if(g(S,w,b,h,m,v)===!1)return!1}return!0}function c(h,m,g,v){if(m.length===0)return!0;if(!Array.isArray(h))return!1;const b=new Set;for(let w=0;w<m.length;w++){const S=m[w];let j=!1;for(let _=0;_<h.length;_++){if(b.has(_))continue;const k=h[_];let E=!1;if(g(k,S,w,h,m,v)&&(E=!0),E){b.add(_),j=!0;break}}if(!j)return!1}return!0}function d(h,m,g,v){return m.size===0?!0:h instanceof Set?c([...h],[...m],g,v):!1}e.isMatchWith=a,e.isSetMatch=d})(Qk)),Qk}var c6;function rG(){return c6||(c6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=T1e();function n(r,a){return t.isMatchWith(r,a,()=>{})}e.isMatch=n})(Zk)),Zk}var n_={},r_={},a_={},d6;function O1e(){return d6||(d6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Object.getOwnPropertySymbols(n).filter(r=>Object.prototype.propertyIsEnumerable.call(n,r))}e.getSymbols=t})(a_)),a_}var i_={},f6;function uE(){return f6||(f6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}e.getTag=t})(i_)),i_}var s_={},h6;function aG(){return h6||(h6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",n="[object String]",r="[object Number]",a="[object Boolean]",i="[object Arguments]",s="[object Symbol]",l="[object Date]",c="[object Map]",d="[object Set]",h="[object Array]",m="[object Function]",g="[object ArrayBuffer]",v="[object Object]",b="[object Error]",w="[object DataView]",S="[object Uint8Array]",j="[object Uint8ClampedArray]",_="[object Uint16Array]",k="[object Uint32Array]",E="[object BigUint64Array]",T="[object Int8Array]",A="[object Int16Array]",O="[object Int32Array]",I="[object BigInt64Array]",P="[object Float32Array]",D="[object Float64Array]";e.argumentsTag=i,e.arrayBufferTag=g,e.arrayTag=h,e.bigInt64ArrayTag=I,e.bigUint64ArrayTag=E,e.booleanTag=a,e.dataViewTag=w,e.dateTag=l,e.errorTag=b,e.float32ArrayTag=P,e.float64ArrayTag=D,e.functionTag=m,e.int16ArrayTag=A,e.int32ArrayTag=O,e.int8ArrayTag=T,e.mapTag=c,e.numberTag=r,e.objectTag=v,e.regexpTag=t,e.setTag=d,e.stringTag=n,e.symbolTag=s,e.uint16ArrayTag=_,e.uint32ArrayTag=k,e.uint8ArrayTag=S,e.uint8ClampedArrayTag=j})(s_)),s_}var o_={},m6;function M1e(){return m6||(m6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}e.isTypedArray=t})(o_)),o_}var p6;function iG(){return p6||(p6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=O1e(),n=uE(),r=aG(),a=tG(),i=M1e();function s(h,m){return l(h,void 0,h,new Map,m)}function l(h,m,g,v=new Map,b=void 0){const w=b==null?void 0:b(h,m,g,v);if(w!==void 0)return w;if(a.isPrimitive(h))return h;if(v.has(h))return v.get(h);if(Array.isArray(h)){const S=new Array(h.length);v.set(h,S);for(let j=0;j<h.length;j++)S[j]=l(h[j],j,g,v,b);return Object.hasOwn(h,"index")&&(S.index=h.index),Object.hasOwn(h,"input")&&(S.input=h.input),S}if(h instanceof Date)return new Date(h.getTime());if(h instanceof RegExp){const S=new RegExp(h.source,h.flags);return S.lastIndex=h.lastIndex,S}if(h instanceof Map){const S=new Map;v.set(h,S);for(const[j,_]of h)S.set(j,l(_,j,g,v,b));return S}if(h instanceof Set){const S=new Set;v.set(h,S);for(const j of h)S.add(l(j,void 0,g,v,b));return S}if(typeof Buffer<"u"&&Buffer.isBuffer(h))return h.subarray();if(i.isTypedArray(h)){const S=new(Object.getPrototypeOf(h)).constructor(h.length);v.set(h,S);for(let j=0;j<h.length;j++)S[j]=l(h[j],j,g,v,b);return S}if(h instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&h instanceof SharedArrayBuffer)return h.slice(0);if(h instanceof DataView){const S=new DataView(h.buffer.slice(0),h.byteOffset,h.byteLength);return v.set(h,S),c(S,h,g,v,b),S}if(typeof File<"u"&&h instanceof File){const S=new File([h],h.name,{type:h.type});return v.set(h,S),c(S,h,g,v,b),S}if(typeof Blob<"u"&&h instanceof Blob){const S=new Blob([h],{type:h.type});return v.set(h,S),c(S,h,g,v,b),S}if(h instanceof Error){const S=structuredClone(h);return v.set(h,S),S.message=h.message,S.name=h.name,S.stack=h.stack,S.cause=h.cause,S.constructor=h.constructor,c(S,h,g,v,b),S}if(h instanceof Boolean){const S=new Boolean(h.valueOf());return v.set(h,S),c(S,h,g,v,b),S}if(h instanceof Number){const S=new Number(h.valueOf());return v.set(h,S),c(S,h,g,v,b),S}if(h instanceof String){const S=new String(h.valueOf());return v.set(h,S),c(S,h,g,v,b),S}if(typeof h=="object"&&d(h)){const S=Object.create(Object.getPrototypeOf(h));return v.set(h,S),c(S,h,g,v,b),S}return h}function c(h,m,g=h,v,b){const w=[...Object.keys(m),...t.getSymbols(m)];for(let S=0;S<w.length;S++){const j=w[S],_=Object.getOwnPropertyDescriptor(h,j);(_==null||_.writable)&&(h[j]=l(m[j],j,g,v,b))}}function d(h){switch(n.getTag(h)){case r.argumentsTag:case r.arrayTag:case r.arrayBufferTag:case r.dataViewTag:case r.booleanTag:case r.dateTag:case r.float32ArrayTag:case r.float64ArrayTag:case r.int8ArrayTag:case r.int16ArrayTag:case r.int32ArrayTag:case r.mapTag:case r.numberTag:case r.objectTag:case r.regexpTag:case r.setTag:case r.stringTag:case r.symbolTag:case r.uint8ArrayTag:case r.uint8ClampedArrayTag:case r.uint16ArrayTag:case r.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=s,e.cloneDeepWithImpl=l,e.copyProperties=c})(r_)),r_}var g6;function P1e(){return g6||(g6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=iG();function n(r){return t.cloneDeepWithImpl(r,void 0,r,new Map,void 0)}e.cloneDeep=n})(n_)),n_}var v6;function D1e(){return v6||(v6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=rG(),n=P1e();function r(a){return a=n.cloneDeep(a),i=>t.isMatch(i,a)}e.matches=r})(Xk)),Xk}var l_={},u_={},c_={},y6;function R1e(){return y6||(y6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=iG(),n=uE(),r=aG();function a(i,s){return t.cloneDeepWith(i,(l,c,d,h)=>{const m=s==null?void 0:s(l,c,d,h);if(m!==void 0)return m;if(typeof i=="object"){if(n.getTag(i)===r.objectTag&&typeof i.constructor!="function"){const g={};return h.set(i,g),t.copyProperties(g,i,d,h),g}switch(Object.prototype.toString.call(i)){case r.numberTag:case r.stringTag:case r.booleanTag:{const g=new i.constructor(i==null?void 0:i.valueOf());return t.copyProperties(g,i),g}case r.argumentsTag:{const g={};return t.copyProperties(g,i),g.length=i.length,g[Symbol.iterator]=i[Symbol.iterator],g}default:return}}})}e.cloneDeepWith=a})(c_)),c_}var x6;function I1e(){return x6||(x6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=R1e();function n(r){return t.cloneDeepWith(r)}e.cloneDeep=n})(u_)),u_}var d_={},f_={},b6;function sG(){return b6||(b6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function n(r,a=Number.MAX_SAFE_INTEGER){switch(typeof r){case"number":return Number.isInteger(r)&&r>=0&&r<a;case"symbol":return!1;case"string":return t.test(r)}}e.isIndex=n})(f_)),f_}var h_={},w6;function L1e(){return w6||(w6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=uE();function n(r){return r!==null&&typeof r=="object"&&t.getTag(r)==="[object Arguments]"}e.isArguments=n})(h_)),h_}var S6;function z1e(){return S6||(S6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=V7(),n=sG(),r=L1e(),a=sE();function i(s,l){let c;if(Array.isArray(l)?c=l:typeof l=="string"&&t.isDeepKey(l)&&(s==null?void 0:s[l])==null?c=a.toPath(l):c=[l],c.length===0)return!1;let d=s;for(let h=0;h<c.length;h++){const m=c[h];if((d==null||!Object.hasOwn(d,m))&&!((Array.isArray(d)||r.isArguments(d))&&n.isIndex(m)&&m<d.length))return!1;d=d[m]}return!0}e.has=i})(d_)),d_}var j6;function $1e(){return j6||(j6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=rG(),n=iE(),r=I1e(),a=oE(),i=z1e();function s(l,c){switch(typeof l){case"object":{Object.is(l==null?void 0:l.valueOf(),-0)&&(l="-0");break}case"number":{l=n.toKey(l);break}}return c=r.cloneDeep(c),function(d){const h=a.get(d,l);return h===void 0?i.has(d,l):c===void 0?h===void 0:t.isMatch(h,c)}}e.matchesProperty=s})(l_)),l_}var k6;function q1e(){return k6||(k6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Q7(),n=A1e(),r=D1e(),a=$1e();function i(s){if(s==null)return t.identity;switch(typeof s){case"function":return s;case"object":return Array.isArray(s)&&s.length===2?a.matchesProperty(s[0],s[1]):r.matches(s);case"string":case"symbol":case"number":return n.property(s)}}e.iteratee=i})(Wk)),Wk}var _6;function B1e(){return _6||(_6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=k1e(),n=_1e(),r=Q7(),a=E1e(),i=q1e();function s(l,c=r.identity){return a.isArrayLikeObject(l)?t.uniqBy(Array.from(l),n.ary(i.iteratee(c),1)):[]}e.uniqBy=s})(qk)),qk}var m_,C6;function F1e(){return C6||(C6=1,m_=B1e().uniqBy),m_}var H1e=F1e();const N6=ta(H1e);function U1e(e,t,n){return t===!0?N6(e,n):typeof t=="function"?N6(e,t):e}var cE=x.createContext(null),G1e=e=>e,Jt=()=>{var e=x.useContext(cE);return e?e.store.dispatch:G1e},bp=()=>{},V1e=()=>bp,K1e=(e,t)=>e===t;function Ke(e){var t=x.useContext(cE),n=x.useMemo(()=>t?r=>{if(r!=null)return e(r)}:bp,[t,e]);return H9.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:V1e,t?t.store.getState:bp,t?t.store.getState:bp,n,K1e)}function W1e(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Y1e(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function X1e(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var E6=e=>Array.isArray(e)?e:[e];function Z1e(e){const t=Array.isArray(e[0])?e[0]:e;return X1e(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Q1e(e,t){const n=[],{length:r}=e;for(let a=0;a<r;a++)n.push(e[a].apply(null,t));return n}var J1e=class{constructor(e){this.value=e}deref(){return this.value}},ewe=typeof WeakRef<"u"?WeakRef:J1e,twe=0,A6=1;function Wm(){return{s:twe,v:void 0,o:null,p:null}}function oG(e,t={}){let n=Wm();const{resultEqualityCheck:r}=t;let a,i=0;function s(){var m;let l=n;const{length:c}=arguments;for(let g=0,v=c;g<v;g++){const b=arguments[g];if(typeof b=="function"||typeof b=="object"&&b!==null){let w=l.o;w===null&&(l.o=w=new WeakMap);const S=w.get(b);S===void 0?(l=Wm(),w.set(b,l)):l=S}else{let w=l.p;w===null&&(l.p=w=new Map);const S=w.get(b);S===void 0?(l=Wm(),w.set(b,l)):l=S}}const d=l;let h;if(l.s===A6)h=l.v;else if(h=e.apply(null,arguments),i++,r){const g=((m=a==null?void 0:a.deref)==null?void 0:m.call(a))??a;g!=null&&r(g,h)&&(h=g,i!==0&&i--),a=typeof h=="object"&&h!==null||typeof h=="function"?new ewe(h):h}return d.s=A6,d.v=h,h}return s.clearCache=()=>{n=Wm(),s.resetResultsCount()},s.resultsCount=()=>i,s.resetResultsCount=()=>{i=0},s}function nwe(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...a)=>{let i=0,s=0,l,c={},d=a.pop();typeof d=="object"&&(c=d,d=a.pop()),W1e(d,`createSelector expects an output function after the inputs, but received: [${typeof d}]`);const h={...n,...c},{memoize:m,memoizeOptions:g=[],argsMemoize:v=oG,argsMemoizeOptions:b=[]}=h,w=E6(g),S=E6(b),j=Z1e(a),_=m(function(){return i++,d.apply(null,arguments)},...w),k=v(function(){s++;const T=Q1e(j,arguments);return l=_.apply(null,T),l},...S);return Object.assign(k,{resultFunc:d,memoizedResultFunc:_,dependencies:j,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>l,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:m,argsMemoize:v})};return Object.assign(r,{withTypes:()=>r}),r}var he=nwe(oG),rwe=Object.assign((e,t=he)=>{Y1e(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(i=>e[i]);return t(r,(...i)=>i.reduce((s,l,c)=>(s[n[c]]=l,s),{}))},{withTypes:()=>rwe}),p_={},g_={},v_={},T6;function awe(){return T6||(T6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"?1:r===null?2:r===void 0?3:r!==r?4:0}const n=(r,a,i)=>{if(r!==a){const s=t(r),l=t(a);if(s===l&&s===0){if(r<a)return i==="desc"?1:-1;if(r>a)return i==="desc"?-1:1}return i==="desc"?l-s:s-l}return 0};e.compareValues=n})(v_)),v_}var y_={},x_={},O6;function lG(){return O6||(O6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"||n instanceof Symbol}e.isSymbol=t})(x_)),x_}var M6;function iwe(){return M6||(M6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=lG(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function a(i,s){return Array.isArray(i)?!1:typeof i=="number"||typeof i=="boolean"||i==null||t.isSymbol(i)?!0:typeof i=="string"&&(r.test(i)||!n.test(i))||s!=null&&Object.hasOwn(s,i)}e.isKey=a})(y_)),y_}var P6;function swe(){return P6||(P6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=awe(),n=iwe(),r=sE();function a(i,s,l,c){if(i==null)return[];l=c?void 0:l,Array.isArray(i)||(i=Object.values(i)),Array.isArray(s)||(s=s==null?[null]:[s]),s.length===0&&(s=[null]),Array.isArray(l)||(l=l==null?[]:[l]),l=l.map(v=>String(v));const d=(v,b)=>{let w=v;for(let S=0;S<b.length&&w!=null;++S)w=w[b[S]];return w},h=(v,b)=>b==null||v==null?b:typeof v=="object"&&"key"in v?Object.hasOwn(b,v.key)?b[v.key]:d(b,v.path):typeof v=="function"?v(b):Array.isArray(v)?d(b,v):typeof b=="object"?b[v]:b,m=s.map(v=>(Array.isArray(v)&&v.length===1&&(v=v[0]),v==null||typeof v=="function"||Array.isArray(v)||n.isKey(v)?v:{key:v,path:r.toPath(v)}));return i.map(v=>({original:v,criteria:m.map(b=>h(b,v))})).slice().sort((v,b)=>{for(let w=0;w<m.length;w++){const S=t.compareValues(v.criteria[w],b.criteria[w],l[w]);if(S!==0)return S}return 0}).map(v=>v.original)}e.orderBy=a})(g_)),g_}var b_={},D6;function owe(){return D6||(D6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r=1){const a=[],i=Math.floor(r),s=(l,c)=>{for(let d=0;d<l.length;d++){const h=l[d];Array.isArray(h)&&c<i?s(h,c+1):a.push(h)}};return s(n,0),a}e.flatten=t})(b_)),b_}var w_={},R6;function uG(){return R6||(R6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=sG(),n=J7(),r=eG(),a=nG();function i(s,l,c){return r.isObject(c)&&(typeof l=="number"&&n.isArrayLike(c)&&t.isIndex(l)&&l<c.length||typeof l=="string"&&l in c)?a.isEqualsSameValueZero(c[l],s):!1}e.isIterateeCall=i})(w_)),w_}var I6;function lwe(){return I6||(I6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=swe(),n=owe(),r=uG();function a(i,...s){const l=s.length;return l>1&&r.isIterateeCall(i,s[0],s[1])?s=[]:l>2&&r.isIterateeCall(s[0],s[1],s[2])&&(s=[s[0]]),t.orderBy(i,n.flatten(s),["asc"])}e.sortBy=a})(p_)),p_}var S_,L6;function uwe(){return L6||(L6=1,S_=lwe().sortBy),S_}var cwe=uwe();const Ov=ta(cwe);var cG=e=>e.legend.settings,dwe=e=>e.legend.size,fwe=e=>e.legend.payload;he([fwe,cG],(e,t)=>{var{itemSorter:n}=t,r=e.flat(1);return n?Ov(r,n):r});var Ym=1;function hwe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,n]=x.useState({height:0,left:0,top:0,width:0}),r=x.useCallback(a=>{if(a!=null){var i=a.getBoundingClientRect(),s={height:i.height,left:i.left,top:i.top,width:i.width};(Math.abs(s.height-t.height)>Ym||Math.abs(s.left-t.left)>Ym||Math.abs(s.top-t.top)>Ym||Math.abs(s.width-t.width)>Ym)&&n({height:s.height,left:s.left,top:s.top,width:s.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,r]}function rr(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var mwe=typeof Symbol=="function"&&Symbol.observable||"@@observable",z6=mwe,j_=()=>Math.random().toString(36).substring(7).split("").join("."),pwe={INIT:`@@redux/INIT${j_()}`,REPLACE:`@@redux/REPLACE${j_()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${j_()}`},Xp=pwe;function dE(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function dG(e,t,n){if(typeof e!="function")throw new Error(rr(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(rr(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(rr(1));return n(dG)(e,t)}let r=e,a=t,i=new Map,s=i,l=0,c=!1;function d(){s===i&&(s=new Map,i.forEach((S,j)=>{s.set(j,S)}))}function h(){if(c)throw new Error(rr(3));return a}function m(S){if(typeof S!="function")throw new Error(rr(4));if(c)throw new Error(rr(5));let j=!0;d();const _=l++;return s.set(_,S),function(){if(j){if(c)throw new Error(rr(6));j=!1,d(),s.delete(_),i=null}}}function g(S){if(!dE(S))throw new Error(rr(7));if(typeof S.type>"u")throw new Error(rr(8));if(typeof S.type!="string")throw new Error(rr(17));if(c)throw new Error(rr(9));try{c=!0,a=r(a,S)}finally{c=!1}return(i=s).forEach(_=>{_()}),S}function v(S){if(typeof S!="function")throw new Error(rr(10));r=S,g({type:Xp.REPLACE})}function b(){const S=m;return{subscribe(j){if(typeof j!="object"||j===null)throw new Error(rr(11));function _(){const E=j;E.next&&E.next(h())}return _(),{unsubscribe:S(_)}},[z6](){return this}}}return g({type:Xp.INIT}),{dispatch:g,subscribe:m,getState:h,replaceReducer:v,[z6]:b}}function gwe(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Xp.INIT})>"u")throw new Error(rr(12));if(typeof n(void 0,{type:Xp.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(rr(13))})}function fG(e){const t=Object.keys(e),n={};for(let i=0;i<t.length;i++){const s=t[i];typeof e[s]=="function"&&(n[s]=e[s])}const r=Object.keys(n);let a;try{gwe(n)}catch(i){a=i}return function(s={},l){if(a)throw a;let c=!1;const d={};for(let h=0;h<r.length;h++){const m=r[h],g=n[m],v=s[m],b=g(v,l);if(typeof b>"u")throw l&&l.type,new Error(rr(14));d[m]=b,c=c||b!==v}return c=c||r.length!==Object.keys(s).length,c?d:s}}function Zp(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function vwe(...e){return t=>(n,r)=>{const a=t(n,r);let i=()=>{throw new Error(rr(15))};const s={getState:a.getState,dispatch:(c,...d)=>i(c,...d)},l=e.map(c=>c(s));return i=Zp(...l)(a.dispatch),{...a,dispatch:i}}}function hG(e){return dE(e)&&"type"in e&&typeof e.type=="string"}var mG=Symbol.for("immer-nothing"),$6=Symbol.for("immer-draftable"),br=Symbol.for("immer-state");function Oa(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Kr=Object,Yu=Kr.getPrototypeOf,Qp="constructor",Mv="prototype",WC="configurable",Jp="enumerable",wp="writable",yf="value",rs=e=>!!e&&!!e[br];function za(e){var t;return e?pG(e)||Dv(e)||!!e[$6]||!!((t=e[Qp])!=null&&t[$6])||Rv(e)||Iv(e):!1}var ywe=Kr[Mv][Qp].toString(),q6=new WeakMap;function pG(e){if(!e||!fE(e))return!1;const t=Yu(e);if(t===null||t===Kr[Mv])return!0;const n=Kr.hasOwnProperty.call(t,Qp)&&t[Qp];if(n===Object)return!0;if(!Nu(n))return!1;let r=q6.get(n);return r===void 0&&(r=Function.toString.call(n),q6.set(n,r)),r===ywe}function Pv(e,t,n=!0){Xf(e)===0?(n?Reflect.ownKeys(e):Kr.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((r,a)=>t(a,r,e))}function Xf(e){const t=e[br];return t?t.type_:Dv(e)?1:Rv(e)?2:Iv(e)?3:0}var B6=(e,t,n=Xf(e))=>n===2?e.has(t):Kr[Mv].hasOwnProperty.call(e,t),YC=(e,t,n=Xf(e))=>n===2?e.get(t):e[t],eg=(e,t,n,r=Xf(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function xwe(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Dv=Array.isArray,Rv=e=>e instanceof Map,Iv=e=>e instanceof Set,fE=e=>typeof e=="object",Nu=e=>typeof e=="function",k_=e=>typeof e=="boolean";function bwe(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var Hi=e=>e.copy_||e.base_,hE=e=>e.modified_?e.copy_:e.base_;function XC(e,t){if(Rv(e))return new Map(e);if(Iv(e))return new Set(e);if(Dv(e))return Array[Mv].slice.call(e);const n=pG(e);if(t===!0||t==="class_only"&&!n){const r=Kr.getOwnPropertyDescriptors(e);delete r[br];let a=Reflect.ownKeys(r);for(let i=0;i<a.length;i++){const s=a[i],l=r[s];l[wp]===!1&&(l[wp]=!0,l[WC]=!0),(l.get||l.set)&&(r[s]={[WC]:!0,[wp]:!0,[Jp]:l[Jp],[yf]:e[s]})}return Kr.create(Yu(e),r)}else{const r=Yu(e);if(r!==null&&n)return{...e};const a=Kr.create(r);return Kr.assign(a,e)}}function mE(e,t=!1){return Lv(e)||rs(e)||!za(e)||(Xf(e)>1&&Kr.defineProperties(e,{set:Xm,add:Xm,clear:Xm,delete:Xm}),Kr.freeze(e),t&&Pv(e,(n,r)=>{mE(r,!0)},!1)),e}function wwe(){Oa(2)}var Xm={[yf]:wwe};function Lv(e){return e===null||!fE(e)?!0:Kr.isFrozen(e)}var tg="MapSet",ZC="Patches",F6="ArrayMethods",gG={};function dl(e){const t=gG[e];return t||Oa(0,e),t}var H6=e=>!!gG[e],xf,vG=()=>xf,Swe=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:H6(tg)?dl(tg):void 0,arrayMethodsPlugin_:H6(F6)?dl(F6):void 0});function U6(e,t){t&&(e.patchPlugin_=dl(ZC),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function QC(e){JC(e),e.drafts_.forEach(jwe),e.drafts_=null}function JC(e){e===xf&&(xf=e.parent_)}var G6=e=>xf=Swe(xf,e);function jwe(e){const t=e[br];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function V6(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(e!==void 0&&e!==n){n[br].modified_&&(QC(t),Oa(4)),za(e)&&(e=K6(t,e));const{patchPlugin_:a}=t;a&&a.generateReplacementPatches_(n[br].base_,e,t)}else e=K6(t,n);return kwe(t,e,!0),QC(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==mG?e:void 0}function K6(e,t){if(Lv(t))return t;const n=t[br];if(!n)return ng(t,e.handledSet_,e);if(!zv(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:r}=n;if(r)for(;r.length>0;)r.pop()(e);bG(n,e)}return n.copy_}function kwe(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&mE(t,n)}function yG(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var zv=(e,t)=>e.scope_===t,_we=[];function xG(e,t,n,r){const a=Hi(e),i=e.type_;if(r!==void 0&&YC(a,r,i)===t){eg(a,r,n,i);return}if(!e.draftLocations_){const l=e.draftLocations_=new Map;Pv(a,(c,d)=>{if(rs(d)){const h=l.get(d)||[];h.push(c),l.set(d,h)}})}const s=e.draftLocations_.get(t)??_we;for(const l of s)eg(a,l,n,i)}function Cwe(e,t,n){e.callbacks_.push(function(a){var l;const i=t;if(!i||!zv(i,a))return;(l=a.mapSetPlugin_)==null||l.fixSetContents(i);const s=hE(i);xG(e,i.draft_??i,s,n),bG(i,a)})}function bG(e,t){var r;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(((r=e.assigned_)==null?void 0:r.size)??0)>0)){const{patchPlugin_:a}=t;if(a){const i=a.getPath(e);i&&a.generatePatches_(e,i,t)}yG(e)}}function Nwe(e,t,n){const{scope_:r}=e;if(rs(n)){const a=n[br];zv(a,r)&&a.callbacks_.push(function(){Sp(e);const s=hE(a);xG(e,n,s,t)})}else za(n)&&e.callbacks_.push(function(){const i=Hi(e);e.type_===3?i.has(n)&&ng(n,r.handledSet_,r):YC(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&ng(YC(e.copy_,t,e.type_),r.handledSet_,r)})}function ng(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||rs(e)||t.has(e)||!za(e)||Lv(e)||(t.add(e),Pv(e,(r,a)=>{if(rs(a)){const i=a[br];if(zv(i,n)){const s=hE(i);eg(e,r,s,e.type_),yG(i)}}else za(a)&&ng(a,t,n)})),e}function Ewe(e,t){const n=Dv(e),r={type_:n?1:0,scope_:t?t.scope_:vG(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let a=r,i=rg;n&&(a=[r],i=bf);const{revoke:s,proxy:l}=Proxy.revocable(a,i);return r.draft_=l,r.revoke_=s,[l,r]}var rg={get(e,t){if(t===br)return e;let n=e.scope_.arrayMethodsPlugin_;const r=e.type_===1&&typeof t=="string";if(r&&n!=null&&n.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const a=Hi(e);if(!B6(a,t,e.type_))return Awe(e,a,t);const i=a[t];if(e.finalized_||!za(i)||r&&e.operationMethod&&(n!=null&&n.isMutatingArrayMethod(e.operationMethod))&&bwe(t))return i;if(i===__(e.base_,t)){Sp(e);const s=e.type_===1?+t:t,l=t2(e.scope_,i,e,s);return e.copy_[s]=l}return i},has(e,t){return t in Hi(e)},ownKeys(e){return Reflect.ownKeys(Hi(e))},set(e,t,n){const r=wG(Hi(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const a=__(Hi(e),t),i=a==null?void 0:a[br];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(xwe(n,a)&&(n!==void 0||B6(e.base_,t,e.type_)))return!0;Sp(e),e2(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),Nwe(e,t,n)),!0},deleteProperty(e,t){return Sp(e),__(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),e2(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Hi(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[wp]:!0,[WC]:e.type_!==1||t!=="length",[Jp]:r[Jp],[yf]:n[t]}},defineProperty(){Oa(11)},getPrototypeOf(e){return Yu(e.base_)},setPrototypeOf(){Oa(12)}},bf={};for(let e in rg){let t=rg[e];bf[e]=function(){const n=arguments;return n[0]=n[0][0],t.apply(this,n)}}bf.deleteProperty=function(e,t){return bf.set.call(this,e,t,void 0)};bf.set=function(e,t,n){return rg.set.call(this,e[0],t,n,e[0])};function __(e,t){const n=e[br];return(n?Hi(n):e)[t]}function Awe(e,t,n){var a;const r=wG(t,n);return r?yf in r?r[yf]:(a=r.get)==null?void 0:a.call(e.draft_):void 0}function wG(e,t){if(!(t in e))return;let n=Yu(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Yu(n)}}function e2(e){e.modified_||(e.modified_=!0,e.parent_&&e2(e.parent_))}function Sp(e){e.copy_||(e.assigned_=new Map,e.copy_=XC(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Twe=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(n,r,a)=>{if(Nu(n)&&!Nu(r)){const s=r;r=n;const l=this;return function(d=s,...h){return l.produce(d,m=>r.call(this,m,...h))}}Nu(r)||Oa(6),a!==void 0&&!Nu(a)&&Oa(7);let i;if(za(n)){const s=G6(this),l=t2(s,n,void 0);let c=!0;try{i=r(l),c=!1}finally{c?QC(s):JC(s)}return U6(s,a),V6(i,s)}else if(!n||!fE(n)){if(i=r(n),i===void 0&&(i=n),i===mG&&(i=void 0),this.autoFreeze_&&mE(i,!0),a){const s=[],l=[];dl(ZC).generateReplacementPatches_(n,i,{patches_:s,inversePatches_:l}),a(s,l)}return i}else Oa(1,n)},this.produceWithPatches=(n,r)=>{if(Nu(n))return(l,...c)=>this.produceWithPatches(l,d=>n(d,...c));let a,i;return[this.produce(n,r,(l,c)=>{a=l,i=c}),a,i]},k_(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),k_(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),k_(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){za(t)||Oa(8),rs(t)&&(t=pa(t));const n=G6(this),r=t2(n,t,void 0);return r[br].isManual_=!0,JC(n),r}finishDraft(t,n){const r=t&&t[br];(!r||!r.isManual_)&&Oa(9);const{scope_:a}=r;return U6(a,n),V6(void 0,a)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,n){let r;for(r=n.length-1;r>=0;r--){const i=n[r];if(i.path.length===0&&i.op==="replace"){t=i.value;break}}r>-1&&(n=n.slice(r+1));const a=dl(ZC).applyPatches_;return rs(t)?a(t,n):this.produce(t,i=>a(i,n))}};function t2(e,t,n,r){const[a,i]=Rv(t)?dl(tg).proxyMap_(t,n):Iv(t)?dl(tg).proxySet_(t,n):Ewe(t,n);return((n==null?void 0:n.scope_)??vG()).drafts_.push(a),i.callbacks_=(n==null?void 0:n.callbacks_)??[],i.key_=r,n&&r!==void 0?Cwe(n,i,r):i.callbacks_.push(function(c){var h;(h=c.mapSetPlugin_)==null||h.fixSetContents(i);const{patchPlugin_:d}=c;i.modified_&&d&&d.generatePatches_(i,[],c)}),a}function pa(e){return rs(e)||Oa(10,e),SG(e)}function SG(e){if(!za(e)||Lv(e))return e;const t=e[br];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=XC(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=XC(e,!0);return Pv(n,(a,i)=>{eg(n,a,SG(i))},r),t&&(t.finalized_=!1),n}var Owe=new Twe,jG=Owe.produce;function kG(e){return({dispatch:n,getState:r})=>a=>i=>typeof i=="function"?i(n,r,e):a(i)}var Mwe=kG(),Pwe=kG,Dwe=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Zp:Zp.apply(null,arguments)};function Jr(e,t){function n(...r){if(t){let a=t(...r);if(!a)throw new Error(Xr(0));return{type:e,payload:a.payload,..."meta"in a&&{meta:a.meta},..."error"in a&&{error:a.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>hG(r)&&r.type===e,n}var _G=class qd extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,qd.prototype)}static get[Symbol.species](){return qd}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new qd(...t[0].concat(this)):new qd(...t.concat(this))}};function W6(e){return za(e)?jG(e,()=>{}):e}function Zm(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function Rwe(e){return typeof e=="boolean"}var Iwe=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:a=!0,actionCreatorCheck:i=!0}=t??{};let s=new _G;return n&&(Rwe(n)?s.push(Mwe):s.push(Pwe(n.extraArgument))),s},CG="RTK_autoBatch",nn=()=>e=>({payload:e,meta:{[CG]:!0}}),Y6=e=>t=>{setTimeout(t,e)},NG=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let a=!0,i=!1,s=!1;const l=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Y6(10):e.type==="callback"?e.queueNotification:Y6(e.timeout),d=()=>{s=!1,i&&(i=!1,l.forEach(h=>h()))};return Object.assign({},r,{subscribe(h){const m=()=>a&&h(),g=r.subscribe(m);return l.add(h),()=>{g(),l.delete(h)}},dispatch(h){var m;try{return a=!((m=h==null?void 0:h.meta)!=null&&m[CG]),i=!a,i&&(s||(s=!0,c(d))),r.dispatch(h)}finally{a=!0}}})},Lwe=e=>function(n){const{autoBatch:r=!0}=n??{};let a=new _G(e);return r&&a.push(NG(typeof r=="object"?r:void 0)),a};function zwe(e){const t=Iwe(),{reducer:n=void 0,middleware:r,devTools:a=!0,preloadedState:i=void 0,enhancers:s=void 0}=e||{};let l;if(typeof n=="function")l=n;else if(dE(n))l=fG(n);else throw new Error(Xr(1));let c;typeof r=="function"?c=r(t):c=t();let d=Zp;a&&(d=Dwe({trace:!1,...typeof a=="object"&&a}));const h=vwe(...c),m=Lwe(h);let g=typeof s=="function"?s(m):m();const v=d(...g);return dG(l,i,v)}function EG(e){const t={},n=[];let r;const a={addCase(i,s){const l=typeof i=="string"?i:i.type;if(!l)throw new Error(Xr(28));if(l in t)throw new Error(Xr(29));return t[l]=s,a},addAsyncThunk(i,s){return s.pending&&(t[i.pending.type]=s.pending),s.rejected&&(t[i.rejected.type]=s.rejected),s.fulfilled&&(t[i.fulfilled.type]=s.fulfilled),s.settled&&n.push({matcher:i.settled,reducer:s.settled}),a},addMatcher(i,s){return n.push({matcher:i,reducer:s}),a},addDefaultCase(i){return r=i,a}};return e(a),[t,n,r]}function $we(e){return typeof e=="function"}function qwe(e,t){let[n,r,a]=EG(t),i;if($we(e))i=()=>W6(e());else{const l=W6(e);i=()=>l}function s(l=i(),c){let d=[n[c.type],...r.filter(({matcher:h})=>h(c)).map(({reducer:h})=>h)];return d.filter(h=>!!h).length===0&&(d=[a]),d.reduce((h,m)=>{if(m)if(rs(h)){const v=m(h,c);return v===void 0?h:v}else{if(za(h))return jG(h,g=>m(g,c));{const g=m(h,c);if(g===void 0){if(h===null)return h;throw Error("A case reducer on a non-draftable value must not return undefined")}return g}}return h},l)}return s.getInitialState=i,s}var Bwe="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Fwe=(e=21)=>{let t="",n=e;for(;n--;)t+=Bwe[Math.random()*64|0];return t},Hwe=Symbol.for("rtk-slice-createasyncthunk");function Uwe(e,t){return`${e}/${t}`}function Gwe({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[Hwe];return function(a){const{name:i,reducerPath:s=i}=a;if(!i)throw new Error(Xr(11));const l=(typeof a.reducers=="function"?a.reducers(Kwe()):a.reducers)||{},c=Object.keys(l),d={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},h={addCase(E,T){const A=typeof E=="string"?E:E.type;if(!A)throw new Error(Xr(12));if(A in d.sliceCaseReducersByType)throw new Error(Xr(13));return d.sliceCaseReducersByType[A]=T,h},addMatcher(E,T){return d.sliceMatchers.push({matcher:E,reducer:T}),h},exposeAction(E,T){return d.actionCreators[E]=T,h},exposeCaseReducer(E,T){return d.sliceCaseReducersByName[E]=T,h}};c.forEach(E=>{const T=l[E],A={reducerName:E,type:Uwe(i,E),createNotation:typeof a.reducers=="function"};Ywe(T)?Zwe(A,T,h,t):Wwe(A,T,h)});function m(){const[E={},T=[],A=void 0]=typeof a.extraReducers=="function"?EG(a.extraReducers):[a.extraReducers],O={...E,...d.sliceCaseReducersByType};return qwe(a.initialState,I=>{for(let P in O)I.addCase(P,O[P]);for(let P of d.sliceMatchers)I.addMatcher(P.matcher,P.reducer);for(let P of T)I.addMatcher(P.matcher,P.reducer);A&&I.addDefaultCase(A)})}const g=E=>E,v=new Map,b=new WeakMap;let w;function S(E,T){return w||(w=m()),w(E,T)}function j(){return w||(w=m()),w.getInitialState()}function _(E,T=!1){function A(I){let P=I[E];return typeof P>"u"&&T&&(P=Zm(b,A,j)),P}function O(I=g){const P=Zm(v,T,()=>new WeakMap);return Zm(P,I,()=>{const D={};for(const[q,z]of Object.entries(a.selectors??{}))D[q]=Vwe(z,I,()=>Zm(b,I,j),T);return D})}return{reducerPath:E,getSelectors:O,get selectors(){return O(A)},selectSlice:A}}const k={name:i,reducer:S,actions:d.actionCreators,caseReducers:d.sliceCaseReducersByName,getInitialState:j,..._(s),injectInto(E,{reducerPath:T,...A}={}){const O=T??s;return E.inject({reducerPath:O,reducer:S},A),{...k,..._(O,!0)}}};return k}}function Vwe(e,t,n,r){function a(i,...s){let l=t(i);return typeof l>"u"&&r&&(l=n()),e(l,...s)}return a.unwrapped=e,a}var hr=Gwe();function Kwe(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function Wwe({type:e,reducerName:t,createNotation:n},r,a){let i,s;if("reducer"in r){if(n&&!Xwe(r))throw new Error(Xr(17));i=r.reducer,s=r.prepare}else i=r;a.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,s?Jr(e,s):Jr(e))}function Ywe(e){return e._reducerDefinitionType==="asyncThunk"}function Xwe(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Zwe({type:e,reducerName:t},n,r,a){if(!a)throw new Error(Xr(18));const{payloadCreator:i,fulfilled:s,pending:l,rejected:c,settled:d,options:h}=n,m=a(e,i,h);r.exposeAction(t,m),s&&r.addCase(m.fulfilled,s),l&&r.addCase(m.pending,l),c&&r.addCase(m.rejected,c),d&&r.addMatcher(m.settled,d),r.exposeCaseReducer(t,{fulfilled:s||Qm,pending:l||Qm,rejected:c||Qm,settled:d||Qm})}function Qm(){}var Qwe="task",AG="listener",TG="completed",pE="cancelled",Jwe=`task-${pE}`,eSe=`task-${TG}`,n2=`${AG}-${pE}`,tSe=`${AG}-${TG}`,$v=class{constructor(e){w0(this,"name","TaskAbortError");w0(this,"message");this.code=e,this.message=`${Qwe} ${pE} (reason: ${e})`}},gE=(e,t)=>{if(typeof e!="function")throw new TypeError(Xr(32))},ag=()=>{},OG=(e,t=ag)=>(e.catch(t),e),MG=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),el=e=>{if(e.aborted)throw new $v(e.reason)};function PG(e,t){let n=ag;return new Promise((r,a)=>{const i=()=>a(new $v(e.reason));if(e.aborted){i();return}n=MG(e,i),t.finally(()=>n()).then(r,a)}).finally(()=>{n=ag})}var nSe=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(n){return{status:n instanceof $v?"cancelled":"rejected",error:n}}finally{t==null||t()}},ig=e=>t=>OG(PG(e,t).then(n=>(el(e),n))),DG=e=>{const t=ig(e);return n=>t(new Promise(r=>setTimeout(r,n)))},{assign:Iu}=Object,X6={},qv="listenerMiddleware",rSe=(e,t)=>{const n=r=>MG(e,()=>r.abort(e.reason));return(r,a)=>{gE(r);const i=new AbortController;n(i);const s=nSe(async()=>{el(e),el(i.signal);const l=await r({pause:ig(i.signal),delay:DG(i.signal),signal:i.signal});return el(i.signal),l},()=>i.abort(eSe));return a!=null&&a.autoJoin&&t.push(s.catch(ag)),{result:ig(e)(s),cancel(){i.abort(Jwe)}}}},aSe=(e,t)=>{const n=async(r,a)=>{el(t);let i=()=>{};const l=[new Promise((c,d)=>{let h=e({predicate:r,effect:(m,g)=>{g.unsubscribe(),c([m,g.getState(),g.getOriginalState()])}});i=()=>{h(),d()}})];a!=null&&l.push(new Promise(c=>setTimeout(c,a,null)));try{const c=await PG(t,Promise.race(l));return el(t),c}finally{i()}};return(r,a)=>OG(n(r,a))},RG=e=>{let{type:t,actionCreator:n,matcher:r,predicate:a,effect:i}=e;if(t)a=Jr(t).match;else if(n)t=n.type,a=n.match;else if(r)a=r;else if(!a)throw new Error(Xr(21));return gE(i),{predicate:a,type:t,effect:i}},IG=Iu(e=>{const{type:t,predicate:n,effect:r}=RG(e);return{id:Fwe(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(Xr(22))}}},{withTypes:()=>IG}),Z6=(e,t)=>{const{type:n,effect:r,predicate:a}=RG(t);return Array.from(e.values()).find(i=>(typeof n=="string"?i.type===n:i.predicate===a)&&i.effect===r)},r2=e=>{e.pending.forEach(t=>{t.abort(n2)})},iSe=(e,t)=>()=>{for(const n of t.keys())r2(n);e.clear()},Q6=(e,t,n)=>{try{e(t,n)}catch(r){setTimeout(()=>{throw r},0)}},LG=Iu(Jr(`${qv}/add`),{withTypes:()=>LG}),sSe=Jr(`${qv}/removeAll`),zG=Iu(Jr(`${qv}/remove`),{withTypes:()=>zG}),oSe=(...e)=>{console.error(`${qv}/error`,...e)},Zf=(e={})=>{const t=new Map,n=new Map,r=v=>{const b=n.get(v)??0;n.set(v,b+1)},a=v=>{const b=n.get(v)??1;b===1?n.delete(v):n.set(v,b-1)},{extra:i,onError:s=oSe}=e;gE(s);const l=v=>(v.unsubscribe=()=>t.delete(v.id),t.set(v.id,v),b=>{v.unsubscribe(),b!=null&&b.cancelActive&&r2(v)}),c=v=>{const b=Z6(t,v)??IG(v);return l(b)};Iu(c,{withTypes:()=>c});const d=v=>{const b=Z6(t,v);return b&&(b.unsubscribe(),v.cancelActive&&r2(b)),!!b};Iu(d,{withTypes:()=>d});const h=async(v,b,w,S)=>{const j=new AbortController,_=aSe(c,j.signal),k=[];try{v.pending.add(j),r(v),await Promise.resolve(v.effect(b,Iu({},w,{getOriginalState:S,condition:(E,T)=>_(E,T).then(Boolean),take:_,delay:DG(j.signal),pause:ig(j.signal),extra:i,signal:j.signal,fork:rSe(j.signal,k),unsubscribe:v.unsubscribe,subscribe:()=>{t.set(v.id,v)},cancelActiveListeners:()=>{v.pending.forEach((E,T,A)=>{E!==j&&(E.abort(n2),A.delete(E))})},cancel:()=>{j.abort(n2),v.pending.delete(j)},throwIfCancelled:()=>{el(j.signal)}})))}catch(E){E instanceof $v||Q6(s,E,{raisedBy:"effect"})}finally{await Promise.all(k),j.abort(tSe),a(v),v.pending.delete(j)}},m=iSe(t,n);return{middleware:v=>b=>w=>{if(!hG(w))return b(w);if(LG.match(w))return c(w.payload);if(sSe.match(w)){m();return}if(zG.match(w))return d(w.payload);let S=v.getState();const j=()=>{if(S===X6)throw new Error(Xr(23));return S};let _;try{if(_=b(w),t.size>0){const k=v.getState(),E=Array.from(t.values());for(const T of E){let A=!1;try{A=T.predicate(w,k,S)}catch(O){A=!1,Q6(s,O,{raisedBy:"predicate"})}A&&h(T,w,v,j)}}}finally{S=X6}return _},startListening:c,stopListening:d,clearListeners:m}};function Xr(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var lSe={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},$G=hr({name:"chartLayout",initialState:lSe,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var n,r,a,i;e.margin.top=(n=t.payload.top)!==null&&n!==void 0?n:0,e.margin.right=(r=t.payload.right)!==null&&r!==void 0?r:0,e.margin.bottom=(a=t.payload.bottom)!==null&&a!==void 0?a:0,e.margin.left=(i=t.payload.left)!==null&&i!==void 0?i:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:uSe,setLayout:cSe,setChartSize:dSe,setScale:fSe}=$G.actions,hSe=$G.reducer;function qG(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function Nt(e){return Number.isFinite(e)}function mi(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function J6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ou(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?J6(Object(n),!0).forEach(function(r){mSe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mSe(e,t,n){return(t=pSe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pSe(e){var t=gSe(e,"string");return typeof t=="symbol"?t:t+""}function gSe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $t(e,t,n){return cn(e)||cn(t)?n:hi(t)?ul(e,t,n):typeof t=="function"?t(e):n}var vSe=(e,t,n)=>{if(t&&n){var{width:r,height:a}=n,{align:i,verticalAlign:s,layout:l}=t;if((l==="vertical"||l==="horizontal"&&s==="middle")&&i!=="center"&&He(e[i]))return Ou(Ou({},e),{},{[i]:e[i]+(r||0)});if((l==="horizontal"||l==="vertical"&&i==="center")&&s!=="middle"&&He(e[s]))return Ou(Ou({},e),{},{[s]:e[s]+(a||0)})}return e},ds=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",BG=(e,t,n,r)=>{if(r)return e.map(l=>l.coordinate);var a,i,s=e.map(l=>(l.coordinate===t&&(a=!0),l.coordinate===n&&(i=!0),l.coordinate));return a||s.push(t),i||s.push(n),s},FG=(e,t,n)=>{if(!e)return null;var{duplicateDomain:r,type:a,range:i,scale:s,realScaleType:l,isCategorical:c,categoricalDomain:d,tickCount:h,ticks:m,niceTicks:g,axisType:v}=e;if(!s)return null;var b=l==="scaleBand"&&s.bandwidth?s.bandwidth()/2:2,w=a==="category"&&s.bandwidth?s.bandwidth()/b:0;if(w=v==="angleAxis"&&i&&i.length>=2?Yn(i[0]-i[1])*2*w:w,m||g){var S=(m||g||[]).map((j,_)=>{var k=r?r.indexOf(j):j,E=s.map(k);return Nt(E)?{coordinate:E+w,value:j,offset:w,index:_}:null}).filter(Tr);return S}return c&&d?d.map((j,_)=>{var k=s.map(j);return Nt(k)?{coordinate:k+w,value:j,index:_,offset:w}:null}).filter(Tr):s.ticks&&h!=null?s.ticks(h).map((j,_)=>{var k=s.map(j);return Nt(k)?{coordinate:k+w,value:j,index:_,offset:w}:null}).filter(Tr):s.domain().map((j,_)=>{var k=s.map(j);return Nt(k)?{coordinate:k+w,value:r?r[j]:j,index:_,offset:w}:null}).filter(Tr)},ySe=(e,t)=>{if(!t||t.length!==2||!He(t[0])||!He(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),a=[e[0],e[1]];return(!He(e[0])||e[0]<n)&&(a[0]=n),(!He(e[1])||e[1]>r)&&(a[1]=r),a[0]>r&&(a[0]=r),a[1]<n&&(a[1]=n),a},xSe=e=>{var t,n=e.length;if(!(n<=0)){var r=(t=e[0])===null||t===void 0?void 0:t.length;if(!(r==null||r<=0))for(var a=0;a<r;++a)for(var i=0,s=0,l=0;l<n;++l){var c=e[l],d=c==null?void 0:c[a];if(d!=null){var h=d[1],m=d[0],g=fi(h)?m:h;g>=0?(d[0]=i,i+=g,d[1]=i):(d[0]=s,s+=g,d[1]=s)}}}},bSe=e=>{var t,n=e.length;if(!(n<=0)){var r=(t=e[0])===null||t===void 0?void 0:t.length;if(!(r==null||r<=0))for(var a=0;a<r;++a)for(var i=0,s=0;s<n;++s){var l=e[s],c=l==null?void 0:l[a];if(c!=null){var d=fi(c[1])?c[0]:c[1];d>=0?(c[0]=i,i+=d,c[1]=i):(c[0]=0,c[1]=0)}}}},wSe={sign:xSe,expand:e1e,none:ll,silhouette:t1e,wiggle:n1e,positive:bSe},SSe=(e,t,n)=>{var r,a=(r=wSe[n])!==null&&r!==void 0?r:ll,i=Jbe().keys(t).value((l,c)=>Number($t(l,c,0))).order(VC).offset(a),s=i(e);return s.forEach((l,c)=>{l.forEach((d,h)=>{var m=$t(e[h],t[c],0);Array.isArray(m)&&m.length===2&&He(m[0])&&He(m[1])&&(d[0]=m[0],d[1]=m[1])})}),s};function jSe(e){return e==null?void 0:String(e)}function e$(e){var{axis:t,ticks:n,bandSize:r,entry:a,index:i,dataKey:s}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!cn(a[t.dataKey])){var l=W7(n,"value",a[t.dataKey]);if(l)return l.coordinate+r/2}return n!=null&&n[i]?n[i].coordinate+r/2:null}var c=$t(a,cn(s)?t.dataKey:s),d=t.scale.map(c);return He(d)?d:null}var t$=e=>{var{axis:t,ticks:n,offset:r,bandSize:a,entry:i,index:s}=e;if(t.type==="category")return n[s]?n[s].coordinate+r:null;var l=$t(i,t.dataKey,t.scale.domain()[s]);if(cn(l))return null;var c=t.scale.map(l);return He(c)?c-a/2+r:null},kSe=e=>{var{numericAxis:t}=e,n=t.scale.domain();if(t.type==="number"){var r=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);return r<=0&&a>=0?0:a<0?a:r}return n[0]},_Se=e=>{var t=e.flat(2).filter(He);return[Math.min(...t),Math.max(...t)]},CSe=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],NSe=(e,t,n)=>{if(e!=null)return CSe(Object.keys(e).reduce((r,a)=>{var i=e[a];if(!i)return r;var{stackedData:s}=i,l=s.reduce((c,d)=>{var h=qG(d,t,n),m=_Se(h);return!Nt(m[0])||!Nt(m[1])?c:[Math.min(c[0],m[0]),Math.max(c[1],m[1])]},[1/0,-1/0]);return[Math.min(l[0],r[0]),Math.max(l[1],r[1])]},[1/0,-1/0]))},n$=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,r$=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Xu=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var a=Ov(t,h=>h.coordinate),i=1/0,s=1,l=a.length;s<l;s++){var c=a[s],d=a[s-1];i=Math.min(((c==null?void 0:c.coordinate)||0)-((d==null?void 0:d.coordinate)||0),i)}return i===1/0?0:i}return n?void 0:0};function a$(e){var{tooltipEntrySettings:t,dataKey:n,payload:r,value:a,name:i}=e;return Ou(Ou({},t),{},{dataKey:n,payload:r,value:a,name:i})}function pc(e,t){if(e)return String(e);if(typeof t=="string")return t}var ESe=(e,t)=>{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},ASe=(e,t)=>t==="centric"?e.angle:e.radius,fs=e=>e.layout.width,hs=e=>e.layout.height,TSe=e=>e.layout.scale,HG=e=>e.layout.margin,Bv=he(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Fv=he(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),UG="data-recharts-item-index",GG="data-recharts-item-id",Qf=60;function i$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Jm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?i$(Object(n),!0).forEach(function(r){OSe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function OSe(e,t,n){return(t=MSe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MSe(e){var t=PSe(e,"string");return typeof t=="symbol"?t:t+""}function PSe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var DSe=e=>e.brush.height;function RSe(e){var t=Fv(e);return t.reduce((n,r)=>{if(r.orientation==="left"&&!r.mirror&&!r.hide){var a=typeof r.width=="number"?r.width:Qf;return n+a}return n},0)}function ISe(e){var t=Fv(e);return t.reduce((n,r)=>{if(r.orientation==="right"&&!r.mirror&&!r.hide){var a=typeof r.width=="number"?r.width:Qf;return n+a}return n},0)}function LSe(e){var t=Bv(e);return t.reduce((n,r)=>r.orientation==="top"&&!r.mirror&&!r.hide?n+r.height:n,0)}function zSe(e){var t=Bv(e);return t.reduce((n,r)=>r.orientation==="bottom"&&!r.mirror&&!r.hide?n+r.height:n,0)}var Fn=he([fs,hs,HG,DSe,RSe,ISe,LSe,zSe,cG,dwe],(e,t,n,r,a,i,s,l,c,d)=>{var h={left:(n.left||0)+a,right:(n.right||0)+i},m={top:(n.top||0)+s,bottom:(n.bottom||0)+l},g=Jm(Jm({},m),h),v=g.bottom;g.bottom+=r,g=vSe(g,c,d);var b=e-g.left-g.right,w=t-g.top-g.bottom;return Jm(Jm({brushBottom:v},g),{},{width:Math.max(b,0),height:Math.max(w,0)})}),$Se=he(Fn,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),vE=he(fs,hs,(e,t)=>({x:0,y:0,width:e,height:t})),qSe=x.createContext(null),mr=()=>x.useContext(qSe)!=null,Hv=e=>e.brush,Uv=he([Hv,Fn,HG],(e,t,n)=>({height:e.height,x:He(e.x)?e.x:t.left,y:He(e.y)?e.y:t.top+t.height+t.brushBottom-((n==null?void 0:n.bottom)||0),width:He(e.width)?e.width:t.width})),C_={},N_={},E_={},s$;function BSe(){return s$||(s$=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r,{signal:a,edges:i}={}){let s,l=null;const c=i!=null&&i.includes("leading"),d=i==null||i.includes("trailing"),h=()=>{l!==null&&(n.apply(s,l),s=void 0,l=null)},m=()=>{d&&h(),w()};let g=null;const v=()=>{g!=null&&clearTimeout(g),g=setTimeout(()=>{g=null,m()},r)},b=()=>{g!==null&&(clearTimeout(g),g=null)},w=()=>{b(),s=void 0,l=null},S=()=>{h()},j=function(..._){if(a!=null&&a.aborted)return;s=this,l=_;const k=g==null;v(),c&&k&&h()};return j.schedule=v,j.cancel=w,j.flush=S,a==null||a.addEventListener("abort",w,{once:!0}),j}e.debounce=t})(E_)),E_}var o$;function FSe(){return o$||(o$=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=BSe();function n(r,a=0,i={}){typeof i!="object"&&(i={});const{leading:s=!1,trailing:l=!0,maxWait:c}=i,d=Array(2);s&&(d[0]="leading"),l&&(d[1]="trailing");let h,m=null;const g=t.debounce(function(...w){h=r.apply(this,w),m=null},a,{edges:d}),v=function(...w){return c!=null&&(m===null&&(m=Date.now()),Date.now()-m>=c)?(h=r.apply(this,w),m=Date.now(),g.cancel(),g.schedule(),h):(g.apply(this,w),h)},b=()=>(g.flush(),h);return v.cancel=g.cancel,v.flush=b,v}e.debounce=n})(N_)),N_}var l$;function HSe(){return l$||(l$=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=FSe();function n(r,a=0,i={}){const{leading:s=!0,trailing:l=!0}=i;return t.debounce(r,a,{leading:s,maxWait:a,trailing:l})}e.throttle=n})(C_)),C_}var A_,u$;function USe(){return u$||(u$=1,A_=HSe().throttle),A_}var GSe=USe();const VSe=ta(GSe);var sg=function(t,n){for(var r=arguments.length,a=new Array(r>2?r-2:0),i=2;i<r;i++)a[i-2]=arguments[i];if(typeof console<"u"&&console.warn&&(n===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(n===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=0;console.warn(n.replace(/%s/g,()=>a[s++]))}},si={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},VG=(e,t,n)=>{var{width:r=si.width,height:a=si.height,aspect:i,maxHeight:s}=n,l=cl(r)?e:Number(r),c=cl(a)?t:Number(a);return i&&i>0&&(l?c=l/i:c&&(l=c*i),s&&c!=null&&c>s&&(c=s)),{calculatedWidth:l,calculatedHeight:c}},KSe={width:0,height:0,overflow:"visible"},WSe={width:0,overflowX:"visible"},YSe={height:0,overflowY:"visible"},XSe={},ZSe=e=>{var{width:t,height:n}=e,r=cl(t),a=cl(n);return r&&a?KSe:r?WSe:a?YSe:XSe};function QSe(e){var{width:t,height:n,aspect:r}=e,a=t,i=n;return a===void 0&&i===void 0?(a=si.width,i=si.height):a===void 0?a=r&&r>0?void 0:si.width:i===void 0&&(i=r&&r>0?void 0:si.height),{width:a,height:i}}function a2(){return a2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a2.apply(null,arguments)}function c$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function d$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?c$(Object(n),!0).forEach(function(r){JSe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function JSe(e,t,n){return(t=eje(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eje(e){var t=tje(e,"string");return typeof t=="symbol"?t:t+""}function tje(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var KG=x.createContext(si.initialDimension);function nje(e){return mi(e.width)&&mi(e.height)}function WG(e){var{children:t,width:n,height:r}=e,a=x.useMemo(()=>({width:n,height:r}),[n,r]);return nje(a)?x.createElement(KG.Provider,{value:a},t):null}var yE=()=>x.useContext(KG),rje=x.forwardRef((e,t)=>{var{aspect:n,initialDimension:r=si.initialDimension,width:a,height:i,minWidth:s=si.minWidth,minHeight:l,maxHeight:c,children:d,debounce:h=si.debounce,id:m,className:g,onResize:v,style:b={}}=e,w=x.useRef(null),S=x.useRef();S.current=v,x.useImperativeHandle(t,()=>w.current);var[j,_]=x.useState({containerWidth:r.width,containerHeight:r.height}),k=x.useCallback((I,P)=>{_(D=>{var q=Math.round(I),z=Math.round(P);return D.containerWidth===q&&D.containerHeight===z?D:{containerWidth:q,containerHeight:z}})},[]);x.useEffect(()=>{if(w.current==null||typeof ResizeObserver>"u")return _l;var I=z=>{var F,R=z[0];if(R!=null){var{width:M,height:L}=R.contentRect;k(M,L),(F=S.current)===null||F===void 0||F.call(S,M,L)}};h>0&&(I=VSe(I,h,{trailing:!0,leading:!1}));var P=new ResizeObserver(I),{width:D,height:q}=w.current.getBoundingClientRect();return k(D,q),P.observe(w.current),()=>{P.disconnect()}},[k,h]);var{containerWidth:E,containerHeight:T}=j;sg(!n||n>0,"The aspect(%s) must be greater than zero.",n);var{calculatedWidth:A,calculatedHeight:O}=VG(E,T,{width:a,height:i,aspect:n,maxHeight:c});return sg(A!=null&&A>0||O!=null&&O>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
511
|
+
please check the style of container, or the props width(%s) and height(%s),
|
|
512
|
+
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
513
|
+
height and width.`,A,O,a,i,s,l,n),x.createElement("div",{id:m?"".concat(m):void 0,className:zt("recharts-responsive-container",g),style:d$(d$({},b),{},{width:a,height:i,minWidth:s,minHeight:l,maxHeight:c}),ref:w},x.createElement("div",{style:ZSe({width:a,height:i})},x.createElement(WG,{width:A,height:O},d)))}),T_=x.forwardRef((e,t)=>{var n=yE();if(mi(n.width)&&mi(n.height))return e.children;var{width:r,height:a}=QSe({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:i,calculatedHeight:s}=VG(void 0,void 0,{width:r,height:a,aspect:e.aspect,maxHeight:e.maxHeight});return He(i)&&He(s)?x.createElement(WG,{width:i,height:s},e.children):x.createElement(rje,a2({},e,{width:r,height:a,ref:t}))});function xE(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var Gv=()=>{var e,t=mr(),n=Ke($Se),r=Ke(Uv),a=(e=Ke(Hv))===null||e===void 0?void 0:e.padding;return!t||!r||!a?n:{width:r.width-a.left-a.right,height:r.height-a.top-a.bottom,x:a.left,y:a.top}},aje={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},YG=()=>{var e;return(e=Ke(Fn))!==null&&e!==void 0?e:aje},XG=()=>Ke(fs),ZG=()=>Ke(hs),Rt=e=>e.layout.layoutType,Cl=()=>Ke(Rt),QG=()=>{var e=Cl();if(e==="horizontal"||e==="vertical")return e},JG=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},ije=()=>{var e=Cl();return e!==void 0},Jf=e=>{var t=Jt(),n=mr(),{width:r,height:a}=e,i=yE(),s=r,l=a;return i&&(s=i.width>0?i.width:r,l=i.height>0?i.height:a),x.useEffect(()=>{!n&&mi(s)&&mi(l)&&t(dSe({width:s,height:l}))},[t,n,s,l]),null},eV=Symbol.for("immer-nothing"),f$=Symbol.for("immer-draftable"),ea=Symbol.for("immer-state");function Ma(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var wf=Object.getPrototypeOf;function Zu(e){return!!e&&!!e[ea]}function fl(e){var t;return e?tV(e)||Array.isArray(e)||!!e[f$]||!!((t=e.constructor)!=null&&t[f$])||eh(e)||Kv(e):!1}var sje=Object.prototype.constructor.toString(),h$=new WeakMap;function tV(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(n===Object)return!0;if(typeof n!="function")return!1;let r=h$.get(n);return r===void 0&&(r=Function.toString.call(n),h$.set(n,r)),r===sje}function og(e,t,n=!0){Vv(e)===0?(n?Reflect.ownKeys(e):Object.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((r,a)=>t(a,r,e))}function Vv(e){const t=e[ea];return t?t.type_:Array.isArray(e)?1:eh(e)?2:Kv(e)?3:0}function i2(e,t){return Vv(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function nV(e,t,n){const r=Vv(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function oje(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function eh(e){return e instanceof Map}function Kv(e){return e instanceof Set}function Vo(e){return e.copy_||e.base_}function s2(e,t){if(eh(e))return new Map(e);if(Kv(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=tV(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[ea];let a=Reflect.ownKeys(r);for(let i=0;i<a.length;i++){const s=a[i],l=r[s];l.writable===!1&&(l.writable=!0,l.configurable=!0),(l.get||l.set)&&(r[s]={configurable:!0,writable:!0,enumerable:l.enumerable,value:e[s]})}return Object.create(wf(e),r)}else{const r=wf(e);if(r!==null&&n)return{...e};const a=Object.create(r);return Object.assign(a,e)}}function bE(e,t=!1){return Wv(e)||Zu(e)||!fl(e)||(Vv(e)>1&&Object.defineProperties(e,{set:ep,add:ep,clear:ep,delete:ep}),Object.freeze(e),t&&Object.values(e).forEach(n=>bE(n,!0))),e}function lje(){Ma(2)}var ep={value:lje};function Wv(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var uje={};function hl(e){const t=uje[e];return t||Ma(0,e),t}var Sf;function rV(){return Sf}function cje(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function m$(e,t){t&&(hl("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function o2(e){l2(e),e.drafts_.forEach(dje),e.drafts_=null}function l2(e){e===Sf&&(Sf=e.parent_)}function p$(e){return Sf=cje(Sf,e)}function dje(e){const t=e[ea];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function g$(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[ea].modified_&&(o2(t),Ma(4)),fl(e)&&(e=lg(t,e),t.parent_||ug(t,e)),t.patches_&&hl("Patches").generateReplacementPatches_(n[ea].base_,e,t.patches_,t.inversePatches_)):e=lg(t,n,[]),o2(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==eV?e:void 0}function lg(e,t,n){if(Wv(t))return t;const r=e.immer_.shouldUseStrictIteration(),a=t[ea];if(!a)return og(t,(i,s)=>v$(e,a,t,i,s,n),r),t;if(a.scope_!==e)return t;if(!a.modified_)return ug(e,a.base_,!0),a.base_;if(!a.finalized_){a.finalized_=!0,a.scope_.unfinalizedDrafts_--;const i=a.copy_;let s=i,l=!1;a.type_===3&&(s=new Set(i),i.clear(),l=!0),og(s,(c,d)=>v$(e,a,i,c,d,n,l),r),ug(e,i,!1),n&&e.patches_&&hl("Patches").generatePatches_(a,n,e.patches_,e.inversePatches_)}return a.copy_}function v$(e,t,n,r,a,i,s){if(a==null||typeof a!="object"&&!s)return;const l=Wv(a);if(!(l&&!s)){if(Zu(a)){const c=i&&t&&t.type_!==3&&!i2(t.assigned_,r)?i.concat(r):void 0,d=lg(e,a,c);if(nV(n,r,d),Zu(d))e.canAutoFreeze_=!1;else return}else s&&n.add(a);if(fl(a)&&!l){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[r]===a&&l)return;lg(e,a),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(eh(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&ug(e,a)}}}function ug(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&bE(t,n)}function fje(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:rV(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=r,i=wE;n&&(a=[r],i=jf);const{revoke:s,proxy:l}=Proxy.revocable(a,i);return r.draft_=l,r.revoke_=s,l}var wE={get(e,t){if(t===ea)return e;const n=Vo(e);if(!i2(n,t))return hje(e,n,t);const r=n[t];return e.finalized_||!fl(r)?r:r===O_(e.base_,t)?(M_(e),e.copy_[t]=c2(r,e)):r},has(e,t){return t in Vo(e)},ownKeys(e){return Reflect.ownKeys(Vo(e))},set(e,t,n){const r=aV(Vo(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const a=O_(Vo(e),t),i=a==null?void 0:a[ea];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(oje(n,a)&&(n!==void 0||i2(e.base_,t)))return!0;M_(e),u2(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return O_(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,M_(e),u2(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Vo(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Ma(11)},getPrototypeOf(e){return wf(e.base_)},setPrototypeOf(){Ma(12)}},jf={};og(wE,(e,t)=>{jf[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});jf.deleteProperty=function(e,t){return jf.set.call(this,e,t,void 0)};jf.set=function(e,t,n){return wE.set.call(this,e[0],t,n,e[0])};function O_(e,t){const n=e[ea];return(n?Vo(n):e)[t]}function hje(e,t,n){var a;const r=aV(t,n);return r?"value"in r?r.value:(a=r.get)==null?void 0:a.call(e.draft_):void 0}function aV(e,t){if(!(t in e))return;let n=wf(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=wf(n)}}function u2(e){e.modified_||(e.modified_=!0,e.parent_&&u2(e.parent_))}function M_(e){e.copy_||(e.copy_=s2(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var mje=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const i=n;n=t;const s=this;return function(c=i,...d){return s.produce(c,h=>n.call(this,h,...d))}}typeof n!="function"&&Ma(6),r!==void 0&&typeof r!="function"&&Ma(7);let a;if(fl(t)){const i=p$(this),s=c2(t,void 0);let l=!0;try{a=n(s),l=!1}finally{l?o2(i):l2(i)}return m$(i,r),g$(a,i)}else if(!t||typeof t!="object"){if(a=n(t),a===void 0&&(a=t),a===eV&&(a=void 0),this.autoFreeze_&&bE(a,!0),r){const i=[],s=[];hl("Patches").generateReplacementPatches_(t,a,i,s),r(i,s)}return a}else Ma(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(s,...l)=>this.produceWithPatches(s,c=>t(c,...l));let r,a;return[this.produce(t,n,(s,l)=>{r=s,a=l}),r,a]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){fl(e)||Ma(8),Zu(e)&&(e=pje(e));const t=p$(this),n=c2(e,void 0);return n[ea].isManual_=!0,l2(t),n}finishDraft(e,t){const n=e&&e[ea];(!n||!n.isManual_)&&Ma(9);const{scope_:r}=n;return m$(r,t),g$(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const a=t[n];if(a.path.length===0&&a.op==="replace"){e=a.value;break}}n>-1&&(t=t.slice(n+1));const r=hl("Patches").applyPatches_;return Zu(e)?r(e,t):this.produce(e,a=>r(a,t))}};function c2(e,t){const n=eh(e)?hl("MapSet").proxyMap_(e,t):Kv(e)?hl("MapSet").proxySet_(e,t):fje(e,t);return(t?t.scope_:rV()).drafts_.push(n),n}function pje(e){return Zu(e)||Ma(10,e),iV(e)}function iV(e){if(!fl(e)||Wv(e))return e;const t=e[ea];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=s2(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=s2(e,!0);return og(n,(a,i)=>{nV(n,a,iV(i))},r),t&&(t.finalized_=!1),n}var gje=new mje;gje.produce;var vje={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},sV=hr({name:"legend",initialState:vje,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:nn()},replaceLegendPayload:{reducer(e,t){var{prev:n,next:r}=t.payload,a=pa(e).payload.indexOf(n);a>-1&&(e.payload[a]=r)},prepare:nn()},removeLegendPayload:{reducer(e,t){var n=pa(e).payload.indexOf(t.payload);n>-1&&e.payload.splice(n,1)},prepare:nn()}}}),{setLegendSize:LIe,setLegendSettings:zIe,addLegendPayload:oV,replaceLegendPayload:lV,removeLegendPayload:uV}=sV.actions,yje=sV.reducer,P_={exports:{}},D_={};/**
|
|
514
|
+
* @license React
|
|
515
|
+
* use-sync-external-store-with-selector.production.js
|
|
516
|
+
*
|
|
517
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
518
|
+
*
|
|
519
|
+
* This source code is licensed under the MIT license found in the
|
|
520
|
+
* LICENSE file in the root directory of this source tree.
|
|
521
|
+
*/var y$;function xje(){if(y$)return D_;y$=1;var e=rc();function t(c,d){return c===d&&(c!==0||1/c===1/d)||c!==c&&d!==d}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,a=e.useRef,i=e.useEffect,s=e.useMemo,l=e.useDebugValue;return D_.useSyncExternalStoreWithSelector=function(c,d,h,m,g){var v=a(null);if(v.current===null){var b={hasValue:!1,value:null};v.current=b}else b=v.current;v=s(function(){function S(T){if(!j){if(j=!0,_=T,T=m(T),g!==void 0&&b.hasValue){var A=b.value;if(g(A,T))return k=A}return k=T}if(A=k,n(_,T))return A;var O=m(T);return g!==void 0&&g(A,O)?(_=T,A):(_=T,k=O)}var j=!1,_,k,E=h===void 0?null:h;return[function(){return S(d())},E===null?void 0:function(){return S(E())}]},[d,h,m,g]);var w=r(c,v[0],v[1]);return i(function(){b.hasValue=!0,b.value=w},[w]),l(w),w},D_}var x$;function bje(){return x$||(x$=1,P_.exports=xje()),P_.exports}bje();function wje(e){e()}function Sje(){let e=null,t=null;return{clear(){e=null,t=null},notify(){wje(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const a=t={callback:n,next:null,prev:t};return a.prev?a.prev.next=a:e=a,function(){!r||e===null||(r=!1,a.next?a.next.prev=a.prev:t=a.prev,a.prev?a.prev.next=a.next:e=a.next)}}}}var b$={notify(){},get:()=>[]};function jje(e,t){let n,r=b$,a=0,i=!1;function s(w){h();const S=r.subscribe(w);let j=!1;return()=>{j||(j=!0,S(),m())}}function l(){r.notify()}function c(){b.onStateChange&&b.onStateChange()}function d(){return i}function h(){a++,n||(n=e.subscribe(c),r=Sje())}function m(){a--,n&&a===0&&(n(),n=void 0,r.clear(),r=b$)}function g(){i||(i=!0,h())}function v(){i&&(i=!1,m())}const b={addNestedSub:s,notifyNestedSubs:l,handleChangeWrapper:c,isSubscribed:d,trySubscribe:g,tryUnsubscribe:v,getListeners:()=>r};return b}var kje=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",_je=kje(),Cje=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Nje=Cje(),Eje=()=>_je||Nje?x.useLayoutEffect:x.useEffect,Aje=Eje();function w$(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Tje(e,t){if(w$(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let a=0;a<n.length;a++)if(!Object.prototype.hasOwnProperty.call(t,n[a])||!w$(e[n[a]],t[n[a]]))return!1;return!0}var R_=Symbol.for("react-redux-context"),I_=typeof globalThis<"u"?globalThis:{};function Oje(){if(!x.createContext)return{};const e=I_[R_]??(I_[R_]=new Map);let t=e.get(x.createContext);return t||(t=x.createContext(null),e.set(x.createContext,t)),t}var Mje=Oje();function Pje(e){const{children:t,context:n,serverState:r,store:a}=e,i=x.useMemo(()=>{const c=jje(a);return{store:a,subscription:c,getServerState:r?()=>r:void 0}},[a,r]),s=x.useMemo(()=>a.getState(),[a]);Aje(()=>{const{subscription:c}=i;return c.onStateChange=c.notifyNestedSubs,c.trySubscribe(),s!==a.getState()&&c.notifyNestedSubs(),()=>{c.tryUnsubscribe(),c.onStateChange=void 0}},[i,s]);const l=n||Mje;return x.createElement(l.Provider,{value:i},t)}var Dje=Pje,Rje=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function Ije(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function th(e,t){var n=new Set([...Object.keys(e),...Object.keys(t)]);for(var r of n)if(Rje.has(r)){if(e[r]==null&&t[r]==null)continue;if(!Tje(e[r],t[r]))return!1}else if(!Ije(e[r],t[r]))return!1;return!0}function d2(){return d2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d2.apply(null,arguments)}function S$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Sd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?S$(Object(n),!0).forEach(function(r){Lje(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lje(e,t,n){return(t=zje(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zje(e){var t=$je(e,"string");return typeof t=="symbol"?t:t+""}function $je(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qje(e){return Array.isArray(e)&&hi(e[0])&&hi(e[1])?e.join(" ~ "):e}var xu={separator:" : ",contentStyle:{margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},itemStyle:{display:"block",paddingTop:4,paddingBottom:4,color:"#000"},labelStyle:{},accessibilityLayer:!1};function Bje(e,t){return t==null?e:Ov(e,t)}var Fje=e=>{var{separator:t=xu.separator,contentStyle:n,itemStyle:r,labelStyle:a=xu.labelStyle,payload:i,formatter:s,itemSorter:l,wrapperClassName:c,labelClassName:d,label:h,labelFormatter:m,accessibilityLayer:g=xu.accessibilityLayer}=e,v=()=>{if(i&&i.length){var T={padding:0,margin:0},A=Bje(i,l),O=A.map((I,P)=>{if(!I||I.type==="none")return null;var D=I.formatter||s||qje,{value:q,name:z}=I,F=q,R=z;if(D){var M=D(q,z,I,P,i);if(Array.isArray(M))[F,R]=M;else if(M!=null)F=M;else return null}var L=Sd(Sd({},xu.itemStyle),{},{color:I.color||xu.itemStyle.color},r);return x.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(P),style:L},hi(R)?x.createElement("span",{className:"recharts-tooltip-item-name"},R):null,hi(R)?x.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,x.createElement("span",{className:"recharts-tooltip-item-value"},F),x.createElement("span",{className:"recharts-tooltip-item-unit"},I.unit||""))});return x.createElement("ul",{className:"recharts-tooltip-item-list",style:T},O)}return null},b=Sd(Sd({},xu.contentStyle),n),w=Sd({margin:0},a),S=!cn(h),j=S?h:"",_=zt("recharts-default-tooltip",c),k=zt("recharts-tooltip-label",d);S&&m&&i!==void 0&&i!==null&&(j=m(h,i));var E=g?{role:"status","aria-live":"assertive"}:{};return x.createElement("div",d2({className:_,style:b},E),x.createElement("p",{className:k,style:w},x.isValidElement(j)?j:"".concat(j)),v())},jd="recharts-tooltip-wrapper",Hje={visibility:"hidden"};function Uje(e){var{coordinate:t,translateX:n,translateY:r}=e;return zt(jd,{["".concat(jd,"-right")]:He(n)&&t&&He(t.x)&&n>=t.x,["".concat(jd,"-left")]:He(n)&&t&&He(t.x)&&n<t.x,["".concat(jd,"-bottom")]:He(r)&&t&&He(t.y)&&r>=t.y,["".concat(jd,"-top")]:He(r)&&t&&He(t.y)&&r<t.y})}function j$(e){var{allowEscapeViewBox:t,coordinate:n,key:r,offset:a,position:i,reverseDirection:s,tooltipDimension:l,viewBox:c,viewBoxDimension:d}=e;if(i&&He(i[r]))return i[r];var h=n[r]-l-(a>0?a:0),m=n[r]+a;if(t[r])return s[r]?h:m;var g=c[r];if(g==null)return 0;if(s[r]){var v=h,b=g;return v<b?Math.max(m,g):Math.max(h,g)}if(d==null)return 0;var w=m+l,S=g+d;return w>S?Math.max(h,g):Math.max(m,g)}function Gje(e){var{translateX:t,translateY:n,useTranslate3d:r}=e;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function Vje(e){var{allowEscapeViewBox:t,coordinate:n,offsetTop:r,offsetLeft:a,position:i,reverseDirection:s,tooltipBox:l,useTranslate3d:c,viewBox:d}=e,h,m,g;return l.height>0&&l.width>0&&n?(m=j$({allowEscapeViewBox:t,coordinate:n,key:"x",offset:a,position:i,reverseDirection:s,tooltipDimension:l.width,viewBox:d,viewBoxDimension:d.width}),g=j$({allowEscapeViewBox:t,coordinate:n,key:"y",offset:r,position:i,reverseDirection:s,tooltipDimension:l.height,viewBox:d,viewBoxDimension:d.height}),h=Gje({translateX:m,translateY:g,useTranslate3d:c})):h=Hje,{cssProperties:h,cssClasses:Uje({translateX:m,translateY:g,coordinate:n})}}var Kje=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),nh={isSsr:Kje()};function cV(){var[e,t]=x.useState(()=>nh.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return x.useEffect(()=>{if(window.matchMedia){var n=window.matchMedia("(prefers-reduced-motion: reduce)"),r=()=>{t(n.matches)};return n.addEventListener("change",r),()=>{n.removeEventListener("change",r)}}},[]),e}function k$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function bu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?k$(Object(n),!0).forEach(function(r){Wje(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Wje(e,t,n){return(t=Yje(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yje(e){var t=Xje(e,"string");return typeof t=="symbol"?t:t+""}function Xje(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Zje(e){if(!(e.prefersReducedMotion&&e.isAnimationActive==="auto")&&e.isAnimationActive&&e.active)return"transform ".concat(e.animationDuration,"ms ").concat(e.animationEasing)}function Qje(e){var t,n,r,a,i,s,l=cV(),[c,d]=x.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));x.useEffect(()=>{var b=w=>{if(w.key==="Escape"){var S,j,_,k;d({dismissed:!0,dismissedAtCoordinate:{x:(S=(j=e.coordinate)===null||j===void 0?void 0:j.x)!==null&&S!==void 0?S:0,y:(_=(k=e.coordinate)===null||k===void 0?void 0:k.y)!==null&&_!==void 0?_:0}})}};return document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(n=e.coordinate)===null||n===void 0?void 0:n.y]),c.dismissed&&(((r=(a=e.coordinate)===null||a===void 0?void 0:a.x)!==null&&r!==void 0?r:0)!==c.dismissedAtCoordinate.x||((i=(s=e.coordinate)===null||s===void 0?void 0:s.y)!==null&&i!==void 0?i:0)!==c.dismissedAtCoordinate.y)&&d(bu(bu({},c),{},{dismissed:!1}));var{cssClasses:h,cssProperties:m}=Vje({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset=="number"?e.offset:e.offset.x,offsetTop:typeof e.offset=="number"?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),g=e.hasPortalFromProps?{}:bu(bu({transition:Zje({prefersReducedMotion:l,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},m),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),v=bu(bu({},g),{},{visibility:!c.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return x.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:h,style:v,ref:e.innerRef},e.children)}var Jje=x.memo(Qje),dV=()=>{var e;return(e=Ke(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function f2(){return f2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f2.apply(null,arguments)}function _$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function C$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_$(Object(n),!0).forEach(function(r){eke(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function eke(e,t,n){return(t=tke(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tke(e){var t=nke(e,"string");return typeof t=="symbol"?t:t+""}function nke(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var N$={curveBasisClosed:Fbe,curveBasisOpen:Hbe,curveBasis:Bbe,curveBumpX:Nbe,curveBumpY:Ebe,curveLinearClosed:Ube,curveLinear:Ev,curveMonotoneX:Gbe,curveMonotoneY:Vbe,curveNatural:Kbe,curveStep:Wbe,curveStepAfter:Xbe,curveStepBefore:Ybe},cg=e=>Nt(e.x)&&Nt(e.y),E$=e=>e.base!=null&&cg(e.base)&&cg(e),kd=e=>e.x,_d=e=>e.y,rke=(e,t)=>{if(typeof e=="function")return e;var n="curve".concat(Yf(e));if((n==="curveMonotone"||n==="curveBump")&&t){var r=N$["".concat(n).concat(t==="vertical"?"Y":"X")];if(r)return r}return N$[n]||Ev},A$={connectNulls:!1,type:"linear"},ake=e=>{var{type:t=A$.type,points:n=[],baseLine:r,layout:a,connectNulls:i=A$.connectNulls}=e,s=rke(t,a),l=i?n.filter(cg):n;if(Array.isArray(r)){var c,d=n.map((b,w)=>C$(C$({},b),{},{base:r[w]}));a==="vertical"?c=Km().y(_d).x1(kd).x0(b=>b.base.x):c=Km().x(kd).y1(_d).y0(b=>b.base.y);var h=c.defined(E$).curve(s),m=i?d.filter(E$):d;return h(m)}var g;a==="vertical"&&He(r)?g=Km().y(_d).x1(kd).x0(r):He(r)?g=Km().x(kd).y1(_d).y0(r):g=R7().x(kd).y(_d);var v=g.defined(cg).curve(s);return v(l)},SE=e=>{var{className:t,points:n,path:r,pathRef:a}=e,i=Cl();if((!n||!n.length)&&!r)return null;var s={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||i,connectNulls:e.connectNulls},l=n&&n.length?ake(s):r;return x.createElement("path",f2({},Qr(e),lE(e),{className:zt("recharts-curve",t),d:l===null?void 0:l,ref:a}))},ike=["x","y","top","left","width","height","className"];function h2(){return h2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h2.apply(null,arguments)}function T$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ske(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?T$(Object(n),!0).forEach(function(r){oke(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function oke(e,t,n){return(t=lke(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lke(e){var t=uke(e,"string");return typeof t=="symbol"?t:t+""}function uke(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function cke(e,t){if(e==null)return{};var n,r,a=dke(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function dke(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var fke=(e,t,n,r,a,i)=>"M".concat(e,",").concat(a,"v").concat(r,"M").concat(i,",").concat(t,"h").concat(n),hke=e=>{var{x:t=0,y:n=0,top:r=0,left:a=0,width:i=0,height:s=0,className:l}=e,c=cke(e,ike),d=ske({x:t,y:n,top:r,left:a,width:i,height:s},c);return!He(t)||!He(n)||!He(i)||!He(s)||!He(r)||!He(a)?null:x.createElement("path",h2({},xr(d),{className:zt("recharts-cross",l),d:fke(t,n,i,s,r,a)}))};function mke(e,t,n,r){var a=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-a,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function O$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function M$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?O$(Object(n),!0).forEach(function(r){pke(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pke(e,t,n){return(t=gke(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gke(e){var t=vke(e,"string");return typeof t=="symbol"?t:t+""}function vke(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var yke=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),fV=(e,t,n)=>e.map(r=>"".concat(yke(r)," ").concat(t,"ms ").concat(n)).join(","),xke=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((n,r)=>n.filter(a=>r.includes(a))),kf=(e,t)=>Object.keys(t).reduce((n,r)=>M$(M$({},n),{},{[r]:e(r,t[r])}),{});function P$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function qn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?P$(Object(n),!0).forEach(function(r){bke(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bke(e,t,n){return(t=wke(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wke(e){var t=Ske(e,"string");return typeof t=="symbol"?t:t+""}function Ske(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var dg=(e,t,n)=>e+(t-e)*n,m2=e=>{var{from:t,to:n}=e;return t!==n},hV=(e,t,n)=>{var r=kf((a,i)=>{if(m2(i)){var[s,l]=e(i.from,i.to,i.velocity);return qn(qn({},i),{},{from:s,velocity:l})}return i},t);return n<1?kf((a,i)=>m2(i)&&r[a]!=null?qn(qn({},i),{},{velocity:dg(i.velocity,r[a].velocity,n),from:dg(i.from,r[a].from,n)}):i,t):hV(e,r,n-1)};function jke(e,t,n,r,a,i){var s,l=r.reduce((g,v)=>qn(qn({},g),{},{[v]:{from:e[v],velocity:0,to:t[v]}}),{}),c=()=>kf((g,v)=>v.from,l),d=()=>!Object.values(l).filter(m2).length,h=null,m=g=>{s||(s=g);var v=g-s,b=v/n.dt;l=hV(n,l,b),a(qn(qn(qn({},e),t),c())),s=g,d()||(h=i.setTimeout(m))};return()=>(h=i.setTimeout(m),()=>{var g;(g=h)===null||g===void 0||g()})}function kke(e,t,n,r,a,i,s){var l=null,c=a.reduce((m,g)=>{var v=e[g],b=t[g];return v==null||b==null?m:qn(qn({},m),{},{[g]:[v,b]})},{}),d,h=m=>{d||(d=m);var g=(m-d)/r,v=kf((w,S)=>dg(...S,n(g)),c);if(i(qn(qn(qn({},e),t),v)),g<1)l=s.setTimeout(h);else{var b=kf((w,S)=>dg(...S,n(1)),c);i(qn(qn(qn({},e),t),b))}};return()=>(l=s.setTimeout(h),()=>{var m;(m=l)===null||m===void 0||m()})}const _ke=(e,t,n,r,a,i)=>{var s=xke(e,t);return n==null?()=>(a(qn(qn({},e),t)),()=>{}):n.isStepper===!0?jke(e,t,n,s,a,i):kke(e,t,n,r,s,a,i)};var fg=1e-4,mV=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],pV=(e,t)=>e.map((n,r)=>n*t**r).reduce((n,r)=>n+r),D$=(e,t)=>n=>{var r=mV(e,t);return pV(r,n)},Cke=(e,t)=>n=>{var r=mV(e,t),a=[...r.map((i,s)=>i*s).slice(1),0];return pV(a,n)},Nke=e=>{var t,n=e.split("(");if(n.length!==2||n[0]!=="cubic-bezier")return null;var r=(t=n[1])===null||t===void 0||(t=t.split(")")[0])===null||t===void 0?void 0:t.split(",");if(r==null||r.length!==4)return null;var a=r.map(i=>parseFloat(i));return[a[0],a[1],a[2],a[3]]},Eke=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(n.length===1)switch(n[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:{var a=Nke(n[0]);if(a)return a}}return n.length===4?n:[0,0,1,1]},Ake=(e,t,n,r)=>{var a=D$(e,n),i=D$(t,r),s=Cke(e,n),l=d=>d>1?1:d<0?0:d,c=d=>{for(var h=d>1?1:d,m=h,g=0;g<8;++g){var v=a(m)-h,b=s(m);if(Math.abs(v-h)<fg||b<fg)return i(m);m=l(m-v/b)}return i(m)};return c.isStepper=!1,c},R$=function(){return Ake(...Eke(...arguments))},Tke=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:n=100,damping:r=8,dt:a=17}=t,i=(s,l,c)=>{var d=-(s-l)*n,h=c*r,m=c+(d-h)*a/1e3,g=c*a/1e3+s;return Math.abs(g-l)<fg&&Math.abs(m)<fg?[l,0]:[g,m]};return i.isStepper=!0,i.dt=a,i},Oke=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return R$(e);case"spring":return Tke();default:if(e.split("(")[0]==="cubic-bezier")return R$(e)}return typeof e=="function"?e:null};function Mke(e){var t,n=()=>null,r=!1,a=null,i=s=>{if(!r){if(Array.isArray(s)){if(!s.length)return;var l=s,[c,...d]=l;if(typeof c=="number"){a=e.setTimeout(i.bind(null,d),c);return}i(c),a=e.setTimeout(i.bind(null,d));return}typeof s=="string"&&(t=s,n(t)),typeof s=="object"&&(t=s,n(t)),typeof s=="function"&&s()}};return{stop:()=>{r=!0},start:s=>{r=!1,a&&(a(),a=null),i(s)},subscribe:s=>(n=s,()=>{n=()=>null}),getTimeoutController:()=>e}}class Pke{setTimeout(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=performance.now(),a=null,i=s=>{s-r>=n?t(s):typeof requestAnimationFrame=="function"&&(a=requestAnimationFrame(i))};return a=requestAnimationFrame(i),()=>{a!=null&&cancelAnimationFrame(a)}}}function Dke(){return Mke(new Pke)}var Rke=x.createContext(Dke);function Ike(e,t){var n=x.useContext(Rke);return x.useMemo(()=>t??n(e),[e,t,n])}var Lke={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},I$={t:0},L_={t:1};function rh(e){var t=Xn(e,Lke),{isActive:n,canBegin:r,duration:a,easing:i,begin:s,onAnimationEnd:l,onAnimationStart:c,children:d}=t,h=cV(),m=n==="auto"?!nh.isSsr&&!h:n,g=Ike(t.animationId,t.animationManager),[v,b]=x.useState(m?I$:L_),w=x.useRef(null);return x.useEffect(()=>{m||b(L_)},[m]),x.useEffect(()=>{if(!m||!r)return _l;var S=_ke(I$,L_,Oke(i),a,b,g.getTimeoutController()),j=()=>{w.current=S()};return g.start([c,s,j,a,l]),()=>{g.stop(),w.current&&w.current(),l()}},[m,r,a,i,s,c,l,g]),d(v.t)}function ah(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",n=x.useRef(vf(t)),r=x.useRef(e);return r.current!==e&&(n.current=vf(t),r.current=e),n.current}var zke=["radius"],$ke=["radius"],L$,z$,$$,q$,B$,F$,H$,U$,G$,V$;function K$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function W$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?K$(Object(n),!0).forEach(function(r){qke(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qke(e,t,n){return(t=Bke(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bke(e){var t=Fke(e,"string");return typeof t=="symbol"?t:t+""}function Fke(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hg(){return hg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hg.apply(null,arguments)}function Y$(e,t){if(e==null)return{};var n,r,a=Hke(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Hke(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Ja(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var X$=(e,t,n,r,a)=>{var i=Js(n),s=Js(r),l=Math.min(Math.abs(i)/2,Math.abs(s)/2),c=s>=0?1:-1,d=i>=0?1:-1,h=s>=0&&i>=0||s<0&&i<0?1:0,m;if(l>0&&Array.isArray(a)){for(var g=[0,0,0,0],v=0,b=4;v<b;v++){var w,S=(w=a[v])!==null&&w!==void 0?w:0;g[v]=S>l?l:S}m=wn(L$||(L$=Ja(["M",",",""])),e,t+c*g[0]),g[0]>0&&(m+=wn(z$||(z$=Ja(["A ",",",",0,0,",",",",",""])),g[0],g[0],h,e+d*g[0],t)),m+=wn($$||($$=Ja(["L ",",",""])),e+n-d*g[1],t),g[1]>0&&(m+=wn(q$||(q$=Ja(["A ",",",",0,0,",`,
|
|
522
|
+
`,",",""])),g[1],g[1],h,e+n,t+c*g[1])),m+=wn(B$||(B$=Ja(["L ",",",""])),e+n,t+r-c*g[2]),g[2]>0&&(m+=wn(F$||(F$=Ja(["A ",",",",0,0,",`,
|
|
523
|
+
`,",",""])),g[2],g[2],h,e+n-d*g[2],t+r)),m+=wn(H$||(H$=Ja(["L ",",",""])),e+d*g[3],t+r),g[3]>0&&(m+=wn(U$||(U$=Ja(["A ",",",",0,0,",`,
|
|
524
|
+
`,",",""])),g[3],g[3],h,e,t+r-c*g[3])),m+="Z"}else if(l>0&&a===+a&&a>0){var j=Math.min(l,a);m=wn(G$||(G$=Ja(["M ",",",`
|
|
525
|
+
A `,",",",0,0,",",",",",`
|
|
526
|
+
L `,",",`
|
|
527
|
+
A `,",",",0,0,",",",",",`
|
|
528
|
+
L `,",",`
|
|
529
|
+
A `,",",",0,0,",",",",",`
|
|
530
|
+
L `,",",`
|
|
531
|
+
A `,",",",0,0,",",",","," Z"])),e,t+c*j,j,j,h,e+d*j,t,e+n-d*j,t,j,j,h,e+n,t+c*j,e+n,t+r-c*j,j,j,h,e+n-d*j,t+r,e+d*j,t+r,j,j,h,e,t+r-c*j)}else m=wn(V$||(V$=Ja(["M ",","," h "," v "," h "," Z"])),e,t,n,r,-n);return m},Z$={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},gV=e=>{var t=Xn(e,Z$),n=x.useRef(null),[r,a]=x.useState(-1);x.useEffect(()=>{if(n.current&&n.current.getTotalLength)try{var G=n.current.getTotalLength();G&&a(G)}catch{}},[]);var{x:i,y:s,width:l,height:c,radius:d,className:h}=t,{animationEasing:m,animationDuration:g,animationBegin:v,isAnimationActive:b,isUpdateAnimationActive:w}=t,S=x.useRef(l),j=x.useRef(c),_=x.useRef(i),k=x.useRef(s),E=x.useMemo(()=>({x:i,y:s,width:l,height:c,radius:d}),[i,s,l,c,d]),T=ah(E,"rectangle-");if(i!==+i||s!==+s||l!==+l||c!==+c||l===0||c===0)return null;var A=zt("recharts-rectangle",h);if(!w){var O=xr(t),{radius:I}=O,P=Y$(O,zke);return x.createElement("path",hg({},P,{x:Js(i),y:Js(s),width:Js(l),height:Js(c),radius:typeof d=="number"?d:void 0,className:A,d:X$(i,s,l,c,d)}))}var D=S.current,q=j.current,z=_.current,F=k.current,R="0px ".concat(r===-1?1:r,"px"),M="".concat(r,"px ").concat(r,"px"),L=fV(["strokeDasharray"],g,typeof m=="string"?m:Z$.animationEasing);return x.createElement(rh,{animationId:T,key:T,canBegin:r>0,duration:g,easing:m,isActive:w,begin:v},G=>{var W=sn(D,l,G),Y=sn(q,c,G),B=sn(z,i,G),H=sn(F,s,G);n.current&&(S.current=W,j.current=Y,_.current=B,k.current=H);var K;b?G>0?K={transition:L,strokeDasharray:M}:K={strokeDasharray:R}:K={strokeDasharray:M};var U=xr(t),{radius:X}=U,J=Y$(U,$ke);return x.createElement("path",hg({},J,{radius:typeof d=="number"?d:void 0,className:A,d:X$(B,H,W,Y,d),ref:n,style:W$(W$({},K),t.style)}))})};function Q$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function J$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Q$(Object(n),!0).forEach(function(r){Uke(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Uke(e,t,n){return(t=Gke(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gke(e){var t=Vke(e,"string");return typeof t=="symbol"?t:t+""}function Vke(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var mg=Math.PI/180,Kke=e=>e*180/Math.PI,Mn=(e,t,n,r)=>({x:e+Math.cos(-mg*r)*n,y:t+Math.sin(-mg*r)*n}),vV=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},Wke=(e,t)=>{var{x:n,y:r}=e,{x:a,y:i}=t;return Math.sqrt((n-a)**2+(r-i)**2)},Yke=(e,t)=>{var{x:n,y:r}=e,{cx:a,cy:i}=t,s=Wke({x:n,y:r},{x:a,y:i});if(s<=0)return{radius:s,angle:0};var l=(n-a)/s,c=Math.acos(l);return r>i&&(c=2*Math.PI-c),{radius:s,angle:Kke(c),angleInRadian:c}},Xke=e=>{var{startAngle:t,endAngle:n}=e,r=Math.floor(t/360),a=Math.floor(n/360),i=Math.min(r,a);return{startAngle:t-i*360,endAngle:n-i*360}},Zke=(e,t)=>{var{startAngle:n,endAngle:r}=t,a=Math.floor(n/360),i=Math.floor(r/360),s=Math.min(a,i);return e+s*360},Qke=(e,t)=>{var{relativeX:n,relativeY:r}=e,{radius:a,angle:i}=Yke({x:n,y:r},t),{innerRadius:s,outerRadius:l}=t;if(a<s||a>l||a===0)return null;var{startAngle:c,endAngle:d}=Xke(t),h=i,m;if(c<=d){for(;h>d;)h-=360;for(;h<c;)h+=360;m=h>=c&&h<=d}else{for(;h>c;)h-=360;for(;h<d;)h+=360;m=h>=d&&h<=c}return m?J$(J$({},t),{},{radius:a,angle:Zke(h,t)}):null};function yV(e){var{cx:t,cy:n,radius:r,startAngle:a,endAngle:i}=e,s=Mn(t,n,r,a),l=Mn(t,n,r,i);return{points:[s,l],cx:t,cy:n,radius:r,startAngle:a,endAngle:i}}var eq,tq,nq,rq,aq,iq,sq;function p2(){return p2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p2.apply(null,arguments)}function Yo(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Jke=(e,t)=>{var n=Yn(t-e),r=Math.min(Math.abs(t-e),359.999);return n*r},tp=e=>{var{cx:t,cy:n,radius:r,angle:a,sign:i,isExternal:s,cornerRadius:l,cornerIsExternal:c}=e,d=l*(s?1:-1)+r,h=Math.asin(l/d)/mg,m=c?a:a+i*h,g=Mn(t,n,d,m),v=Mn(t,n,r,m),b=c?a-i*h:a,w=Mn(t,n,d*Math.cos(h*mg),b);return{center:g,circleTangency:v,lineTangency:w,theta:h}},xV=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:a,startAngle:i,endAngle:s}=e,l=Jke(i,s),c=i+l,d=Mn(t,n,a,i),h=Mn(t,n,a,c),m=wn(eq||(eq=Yo(["M ",",",`
|
|
532
|
+
A `,",",`,0,
|
|
533
|
+
`,",",`,
|
|
534
|
+
`,",",`
|
|
535
|
+
`])),d.x,d.y,a,a,+(Math.abs(l)>180),+(i>c),h.x,h.y);if(r>0){var g=Mn(t,n,r,i),v=Mn(t,n,r,c);m+=wn(tq||(tq=Yo(["L ",",",`
|
|
536
|
+
A `,",",`,0,
|
|
537
|
+
`,",",`,
|
|
538
|
+
`,","," Z"])),v.x,v.y,r,r,+(Math.abs(l)>180),+(i<=c),g.x,g.y)}else m+=wn(nq||(nq=Yo(["L ",","," Z"])),t,n);return m},e_e=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:a,cornerRadius:i,forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:d}=e,h=Yn(d-c),{circleTangency:m,lineTangency:g,theta:v}=tp({cx:t,cy:n,radius:a,angle:c,sign:h,cornerRadius:i,cornerIsExternal:l}),{circleTangency:b,lineTangency:w,theta:S}=tp({cx:t,cy:n,radius:a,angle:d,sign:-h,cornerRadius:i,cornerIsExternal:l}),j=l?Math.abs(c-d):Math.abs(c-d)-v-S;if(j<0)return s?wn(rq||(rq=Yo(["M ",",",`
|
|
539
|
+
a`,",",",0,0,1,",`,0
|
|
540
|
+
a`,",",",0,0,1,",`,0
|
|
541
|
+
`])),g.x,g.y,i,i,i*2,i,i,-i*2):xV({cx:t,cy:n,innerRadius:r,outerRadius:a,startAngle:c,endAngle:d});var _=wn(aq||(aq=Yo(["M ",",",`
|
|
542
|
+
A`,",",",0,0,",",",",",`
|
|
543
|
+
A`,",",",0,",",",",",",",`
|
|
544
|
+
A`,",",",0,0,",",",",",`
|
|
545
|
+
`])),g.x,g.y,i,i,+(h<0),m.x,m.y,a,a,+(j>180),+(h<0),b.x,b.y,i,i,+(h<0),w.x,w.y);if(r>0){var{circleTangency:k,lineTangency:E,theta:T}=tp({cx:t,cy:n,radius:r,angle:c,sign:h,isExternal:!0,cornerRadius:i,cornerIsExternal:l}),{circleTangency:A,lineTangency:O,theta:I}=tp({cx:t,cy:n,radius:r,angle:d,sign:-h,isExternal:!0,cornerRadius:i,cornerIsExternal:l}),P=l?Math.abs(c-d):Math.abs(c-d)-T-I;if(P<0&&i===0)return"".concat(_,"L").concat(t,",").concat(n,"Z");_+=wn(iq||(iq=Yo(["L",",",`
|
|
546
|
+
A`,",",",0,0,",",",",",`
|
|
547
|
+
A`,",",",0,",",",",",",",`
|
|
548
|
+
A`,",",",0,0,",",",",","Z"])),O.x,O.y,i,i,+(h<0),A.x,A.y,r,r,+(P>180),+(h>0),k.x,k.y,i,i,+(h<0),E.x,E.y)}else _+=wn(sq||(sq=Yo(["L",",","Z"])),t,n);return _},t_e={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},bV=e=>{var t=Xn(e,t_e),{cx:n,cy:r,innerRadius:a,outerRadius:i,cornerRadius:s,forceCornerRadius:l,cornerIsExternal:c,startAngle:d,endAngle:h,className:m}=t;if(i<a||d===h)return null;var g=zt("recharts-sector",m),v=i-a,b=dr(s,v,0,!0),w;return b>0&&Math.abs(d-h)<360?w=e_e({cx:n,cy:r,innerRadius:a,outerRadius:i,cornerRadius:Math.min(b,v/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:d,endAngle:h}):w=xV({cx:n,cy:r,innerRadius:a,outerRadius:i,startAngle:d,endAngle:h}),x.createElement("path",p2({},xr(t),{className:g,d:w}))};function n_e(e,t,n){if(e==="horizontal")return[{x:t.x,y:n.top},{x:t.x,y:n.top+n.height}];if(e==="vertical")return[{x:n.left,y:t.y},{x:n.left+n.width,y:t.y}];if(Z7(t)){if(e==="centric"){var{cx:r,cy:a,innerRadius:i,outerRadius:s,angle:l}=t,c=Mn(r,a,i,l),d=Mn(r,a,s,l);return[{x:c.x,y:c.y},{x:d.x,y:d.y}]}return yV(t)}}var z_={},$_={},q_={},oq;function r_e(){return oq||(oq=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=lG();function n(r){return t.isSymbol(r)?NaN:Number(r)}e.toNumber=n})(q_)),q_}var lq;function a_e(){return lq||(lq=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=r_e();function n(r){return r?(r=t.toNumber(r),r===1/0||r===-1/0?(r<0?-1:1)*Number.MAX_VALUE:r===r?r:0):r===0?r:0}e.toFinite=n})($_)),$_}var uq;function i_e(){return uq||(uq=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=uG(),n=a_e();function r(a,i,s){s&&typeof s!="number"&&t.isIterateeCall(a,i,s)&&(i=s=void 0),a=n.toFinite(a),i===void 0?(i=a,a=0):i=n.toFinite(i),s=s===void 0?a<i?1:-1:n.toFinite(s);const l=Math.max(Math.ceil((i-a)/(s||1)),0),c=new Array(l);for(let d=0;d<l;d++)c[d]=a,a+=s;return c}e.range=r})(z_)),z_}var B_,cq;function s_e(){return cq||(cq=1,B_=i_e().range),B_}var o_e=s_e();const wV=ta(o_e);var Ha=e=>e.chartData,ih=he([Ha],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),sh=(e,t,n,r)=>r?ih(e):Ha(e),l_e=(e,t,n)=>n?ih(e):Ha(e),u_e=he([sh],e=>{var{chartData:t,dataStartIndex:n,dataEndIndex:r}=e;return t!=null?t.slice(n,r+1):[]}),c_e=he([ih],e=>{var{chartData:t,dataStartIndex:n,dataEndIndex:r}=e;return t!=null?t.slice(n,r+1):[]}),d_e=he([Ha],e=>{var{chartData:t,dataStartIndex:n,dataEndIndex:r}=e;return t!=null?t.slice(n,r+1):[]});function ci(e){if(Array.isArray(e)&&e.length===2){var[t,n]=e;if(Nt(t)&&Nt(n))return!0}return!1}function dq(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function SV(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[n,r]=e,a,i;if(Nt(n))a=n;else if(typeof n=="function")return;if(Nt(r))i=r;else if(typeof r=="function")return;var s=[a,i];if(ci(s))return s}}function f_e(e,t,n){if(!(!n&&t==null)){if(typeof e=="function"&&t!=null)try{var r=e(t,n);if(ci(r))return dq(r,t,n)}catch{}if(Array.isArray(e)&&e.length===2){var[a,i]=e,s,l;if(a==="auto")t!=null&&(s=Math.min(...t));else if(He(a))s=a;else if(typeof a=="function")try{t!=null&&(s=a(t==null?void 0:t[0]))}catch{}else if(typeof a=="string"&&n$.test(a)){var c=n$.exec(a);if(c==null||c[1]==null||t==null)s=void 0;else{var d=+c[1];s=t[0]-d}}else s=t==null?void 0:t[0];if(i==="auto")t!=null&&(l=Math.max(...t));else if(He(i))l=i;else if(typeof i=="function")try{t!=null&&(l=i(t==null?void 0:t[1]))}catch{}else if(typeof i=="string"&&r$.test(i)){var h=r$.exec(i);if(h==null||h[1]==null||t==null)l=void 0;else{var m=+h[1];l=t[1]+m}}else l=t==null?void 0:t[1];var g=[s,l];if(ci(g))return t==null?g:dq(g,t,n)}}}var gc=1e9,h_e={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},kE,ln=!0,va="[DecimalError] ",tl=va+"Invalid argument: ",jE=va+"Exponent out of range: ",vc=Math.floor,Ko=Math.pow,m_e=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Vr,Wn=1e7,rn=7,jV=9007199254740991,pg=vc(jV/rn),Ge={};Ge.absoluteValue=Ge.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Ge.comparedTo=Ge.cmp=function(e){var t,n,r,a,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(r=i.d.length,a=e.d.length,t=0,n=r<a?r:a;t<n;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return r===a?0:r>a^i.s<0?1:-1};Ge.decimalPlaces=Ge.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*rn;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};Ge.dividedBy=Ge.div=function(e){return Zi(this,new this.constructor(e))};Ge.dividedToIntegerBy=Ge.idiv=function(e){var t=this,n=t.constructor;return Yt(Zi(t,new n(e),0,1),n.precision)};Ge.equals=Ge.eq=function(e){return!this.cmp(e)};Ge.exponent=function(){return Dn(this)};Ge.greaterThan=Ge.gt=function(e){return this.cmp(e)>0};Ge.greaterThanOrEqualTo=Ge.gte=function(e){return this.cmp(e)>=0};Ge.isInteger=Ge.isint=function(){return this.e>this.d.length-2};Ge.isNegative=Ge.isneg=function(){return this.s<0};Ge.isPositive=Ge.ispos=function(){return this.s>0};Ge.isZero=function(){return this.s===0};Ge.lessThan=Ge.lt=function(e){return this.cmp(e)<0};Ge.lessThanOrEqualTo=Ge.lte=function(e){return this.cmp(e)<1};Ge.logarithm=Ge.log=function(e){var t,n=this,r=n.constructor,a=r.precision,i=a+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Vr))throw Error(va+"NaN");if(n.s<1)throw Error(va+(n.s?"NaN":"-Infinity"));return n.eq(Vr)?new r(0):(ln=!1,t=Zi(_f(n,i),_f(e,i),i),ln=!0,Yt(t,a))};Ge.minus=Ge.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?CV(t,e):kV(t,(e.s=-e.s,e))};Ge.modulo=Ge.mod=function(e){var t,n=this,r=n.constructor,a=r.precision;if(e=new r(e),!e.s)throw Error(va+"NaN");return n.s?(ln=!1,t=Zi(n,e,0,1).times(e),ln=!0,n.minus(t)):Yt(new r(n),a)};Ge.naturalExponential=Ge.exp=function(){return _V(this)};Ge.naturalLogarithm=Ge.ln=function(){return _f(this)};Ge.negated=Ge.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Ge.plus=Ge.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?kV(t,e):CV(t,(e.s=-e.s,e))};Ge.precision=Ge.sd=function(e){var t,n,r,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(tl+e);if(t=Dn(a)+1,r=a.d.length-1,n=r*rn+1,r=a.d[r],r){for(;r%10==0;r/=10)n--;for(r=a.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};Ge.squareRoot=Ge.sqrt=function(){var e,t,n,r,a,i,s,l=this,c=l.constructor;if(l.s<1){if(!l.s)return new c(0);throw Error(va+"NaN")}for(e=Dn(l),ln=!1,a=Math.sqrt(+l),a==0||a==1/0?(t=oi(l.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=vc((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new c(t)):r=new c(a.toString()),n=c.precision,a=s=n+3;;)if(i=r,r=i.plus(Zi(l,i,s+2)).times(.5),oi(i.d).slice(0,s)===(t=oi(r.d)).slice(0,s)){if(t=t.slice(s-3,s+1),a==s&&t=="4999"){if(Yt(i,n+1,0),i.times(i).eq(l)){r=i;break}}else if(t!="9999")break;s+=4}return ln=!0,Yt(r,n)};Ge.times=Ge.mul=function(e){var t,n,r,a,i,s,l,c,d,h=this,m=h.constructor,g=h.d,v=(e=new m(e)).d;if(!h.s||!e.s)return new m(0);for(e.s*=h.s,n=h.e+e.e,c=g.length,d=v.length,c<d&&(i=g,g=v,v=i,s=c,c=d,d=s),i=[],s=c+d,r=s;r--;)i.push(0);for(r=d;--r>=0;){for(t=0,a=c+r;a>r;)l=i[a]+v[r]*g[a-r-1]+t,i[a--]=l%Wn|0,t=l/Wn|0;i[a]=(i[a]+t)%Wn|0}for(;!i[--s];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,ln?Yt(e,m.precision):e};Ge.toDecimalPlaces=Ge.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(pi(e,0,gc),t===void 0?t=r.rounding:pi(t,0,8),Yt(n,e+Dn(n)+1,t))};Ge.toExponential=function(e,t){var n,r=this,a=r.constructor;return e===void 0?n=ml(r,!0):(pi(e,0,gc),t===void 0?t=a.rounding:pi(t,0,8),r=Yt(new a(r),e+1,t),n=ml(r,!0,e+1)),n};Ge.toFixed=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?ml(a):(pi(e,0,gc),t===void 0?t=i.rounding:pi(t,0,8),r=Yt(new i(a),e+Dn(a)+1,t),n=ml(r.abs(),!1,e+Dn(r)+1),a.isneg()&&!a.isZero()?"-"+n:n)};Ge.toInteger=Ge.toint=function(){var e=this,t=e.constructor;return Yt(new t(e),Dn(e)+1,t.rounding)};Ge.toNumber=function(){return+this};Ge.toPower=Ge.pow=function(e){var t,n,r,a,i,s,l=this,c=l.constructor,d=12,h=+(e=new c(e));if(!e.s)return new c(Vr);if(l=new c(l),!l.s){if(e.s<1)throw Error(va+"Infinity");return l}if(l.eq(Vr))return l;if(r=c.precision,e.eq(Vr))return Yt(l,r);if(t=e.e,n=e.d.length-1,s=t>=n,i=l.s,s){if((n=h<0?-h:h)<=jV){for(a=new c(Vr),t=Math.ceil(r/rn+4),ln=!1;n%2&&(a=a.times(l),hq(a.d,t)),n=vc(n/2),n!==0;)l=l.times(l),hq(l.d,t);return ln=!0,e.s<0?new c(Vr).div(a):Yt(a,r)}}else if(i<0)throw Error(va+"NaN");return i=i<0&&e.d[Math.max(t,n)]&1?-1:1,l.s=1,ln=!1,a=e.times(_f(l,r+d)),ln=!0,a=_V(a),a.s=i,a};Ge.toPrecision=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?(n=Dn(a),r=ml(a,n<=i.toExpNeg||n>=i.toExpPos)):(pi(e,1,gc),t===void 0?t=i.rounding:pi(t,0,8),a=Yt(new i(a),e,t),n=Dn(a),r=ml(a,e<=n||n<=i.toExpNeg,e)),r};Ge.toSignificantDigits=Ge.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(pi(e,1,gc),t===void 0?t=r.rounding:pi(t,0,8)),Yt(new r(n),e,t)};Ge.toString=Ge.valueOf=Ge.val=Ge.toJSON=Ge[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Dn(e),n=e.constructor;return ml(e,t<=n.toExpNeg||t>=n.toExpPos)};function kV(e,t){var n,r,a,i,s,l,c,d,h=e.constructor,m=h.precision;if(!e.s||!t.s)return t.s||(t=new h(e)),ln?Yt(t,m):t;if(c=e.d,d=t.d,s=e.e,a=t.e,c=c.slice(),i=s-a,i){for(i<0?(r=c,i=-i,l=d.length):(r=d,a=s,l=c.length),s=Math.ceil(m/rn),l=s>l?s+1:l+1,i>l&&(i=l,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(l=c.length,i=d.length,l-i<0&&(i=l,r=d,d=c,c=r),n=0;i;)n=(c[--i]=c[i]+d[i]+n)/Wn|0,c[i]%=Wn;for(n&&(c.unshift(n),++a),l=c.length;c[--l]==0;)c.pop();return t.d=c,t.e=a,ln?Yt(t,m):t}function pi(e,t,n){if(e!==~~e||e<t||e>n)throw Error(tl+e)}function oi(e){var t,n,r,a=e.length-1,i="",s=e[0];if(a>0){for(i+=s,t=1;t<a;t++)r=e[t]+"",n=rn-r.length,n&&(i+=Ys(n)),i+=r;s=e[t],r=s+"",n=rn-r.length,n&&(i+=Ys(n))}else if(s===0)return"0";for(;s%10===0;)s/=10;return i+s}var Zi=(function(){function e(r,a){var i,s=0,l=r.length;for(r=r.slice();l--;)i=r[l]*a+s,r[l]=i%Wn|0,s=i/Wn|0;return s&&r.unshift(s),r}function t(r,a,i,s){var l,c;if(i!=s)c=i>s?1:-1;else for(l=c=0;l<i;l++)if(r[l]!=a[l]){c=r[l]>a[l]?1:-1;break}return c}function n(r,a,i){for(var s=0;i--;)r[i]-=s,s=r[i]<a[i]?1:0,r[i]=s*Wn+r[i]-a[i];for(;!r[0]&&r.length>1;)r.shift()}return function(r,a,i,s){var l,c,d,h,m,g,v,b,w,S,j,_,k,E,T,A,O,I,P=r.constructor,D=r.s==a.s?1:-1,q=r.d,z=a.d;if(!r.s)return new P(r);if(!a.s)throw Error(va+"Division by zero");for(c=r.e-a.e,O=z.length,T=q.length,v=new P(D),b=v.d=[],d=0;z[d]==(q[d]||0);)++d;if(z[d]>(q[d]||0)&&--c,i==null?_=i=P.precision:s?_=i+(Dn(r)-Dn(a))+1:_=i,_<0)return new P(0);if(_=_/rn+2|0,d=0,O==1)for(h=0,z=z[0],_++;(d<T||h)&&_--;d++)k=h*Wn+(q[d]||0),b[d]=k/z|0,h=k%z|0;else{for(h=Wn/(z[0]+1)|0,h>1&&(z=e(z,h),q=e(q,h),O=z.length,T=q.length),E=O,w=q.slice(0,O),S=w.length;S<O;)w[S++]=0;I=z.slice(),I.unshift(0),A=z[0],z[1]>=Wn/2&&++A;do h=0,l=t(z,w,O,S),l<0?(j=w[0],O!=S&&(j=j*Wn+(w[1]||0)),h=j/A|0,h>1?(h>=Wn&&(h=Wn-1),m=e(z,h),g=m.length,S=w.length,l=t(m,w,g,S),l==1&&(h--,n(m,O<g?I:z,g))):(h==0&&(l=h=1),m=z.slice()),g=m.length,g<S&&m.unshift(0),n(w,m,S),l==-1&&(S=w.length,l=t(z,w,O,S),l<1&&(h++,n(w,O<S?I:z,S))),S=w.length):l===0&&(h++,w=[0]),b[d++]=h,l&&w[0]?w[S++]=q[E]||0:(w=[q[E]],S=1);while((E++<T||w[0]!==void 0)&&_--)}return b[0]||b.shift(),v.e=c,Yt(v,s?i+Dn(v)+1:i)}})();function _V(e,t){var n,r,a,i,s,l,c=0,d=0,h=e.constructor,m=h.precision;if(Dn(e)>16)throw Error(jE+Dn(e));if(!e.s)return new h(Vr);for(ln=!1,l=m,s=new h(.03125);e.abs().gte(.1);)e=e.times(s),d+=5;for(r=Math.log(Ko(2,d))/Math.LN10*2+5|0,l+=r,n=a=i=new h(Vr),h.precision=l;;){if(a=Yt(a.times(e),l),n=n.times(++c),s=i.plus(Zi(a,n,l)),oi(s.d).slice(0,l)===oi(i.d).slice(0,l)){for(;d--;)i=Yt(i.times(i),l);return h.precision=m,t==null?(ln=!0,Yt(i,m)):i}i=s}}function Dn(e){for(var t=e.e*rn,n=e.d[0];n>=10;n/=10)t++;return t}function F_(e,t,n){if(t>e.LN10.sd())throw ln=!0,n&&(e.precision=n),Error(va+"LN10 precision limit exceeded");return Yt(new e(e.LN10),t)}function Ys(e){for(var t="";e--;)t+="0";return t}function _f(e,t){var n,r,a,i,s,l,c,d,h,m=1,g=10,v=e,b=v.d,w=v.constructor,S=w.precision;if(v.s<1)throw Error(va+(v.s?"NaN":"-Infinity"));if(v.eq(Vr))return new w(0);if(t==null?(ln=!1,d=S):d=t,v.eq(10))return t==null&&(ln=!0),F_(w,d);if(d+=g,w.precision=d,n=oi(b),r=n.charAt(0),i=Dn(v),Math.abs(i)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)v=v.times(e),n=oi(v.d),r=n.charAt(0),m++;i=Dn(v),r>1?(v=new w("0."+n),i++):v=new w(r+"."+n.slice(1))}else return c=F_(w,d+2,S).times(i+""),v=_f(new w(r+"."+n.slice(1)),d-g).plus(c),w.precision=S,t==null?(ln=!0,Yt(v,S)):v;for(l=s=v=Zi(v.minus(Vr),v.plus(Vr),d),h=Yt(v.times(v),d),a=3;;){if(s=Yt(s.times(h),d),c=l.plus(Zi(s,new w(a),d)),oi(c.d).slice(0,d)===oi(l.d).slice(0,d))return l=l.times(2),i!==0&&(l=l.plus(F_(w,d+2,S).times(i+""))),l=Zi(l,new w(m),d),w.precision=S,t==null?(ln=!0,Yt(l,S)):l;l=c,a+=2}}function fq(e,t){var n,r,a;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(r,a),t){if(a-=r,n=n-r-1,e.e=vc(n/rn),e.d=[],r=(n+1)%rn,n<0&&(r+=rn),r<a){for(r&&e.d.push(+t.slice(0,r)),a-=rn;r<a;)e.d.push(+t.slice(r,r+=rn));t=t.slice(r),r=rn-t.length}else r-=a;for(;r--;)t+="0";if(e.d.push(+t),ln&&(e.e>pg||e.e<-pg))throw Error(jE+n)}else e.s=0,e.e=0,e.d=[0];return e}function Yt(e,t,n){var r,a,i,s,l,c,d,h,m=e.d;for(s=1,i=m[0];i>=10;i/=10)s++;if(r=t-s,r<0)r+=rn,a=t,d=m[h=0];else{if(h=Math.ceil((r+1)/rn),i=m.length,h>=i)return e;for(d=i=m[h],s=1;i>=10;i/=10)s++;r%=rn,a=r-rn+s}if(n!==void 0&&(i=Ko(10,s-a-1),l=d/i%10|0,c=t<0||m[h+1]!==void 0||d%i,c=n<4?(l||c)&&(n==0||n==(e.s<0?3:2)):l>5||l==5&&(n==4||c||n==6&&(r>0?a>0?d/Ko(10,s-a):0:m[h-1])%10&1||n==(e.s<0?8:7))),t<1||!m[0])return c?(i=Dn(e),m.length=1,t=t-i-1,m[0]=Ko(10,(rn-t%rn)%rn),e.e=vc(-t/rn)||0):(m.length=1,m[0]=e.e=e.s=0),e;if(r==0?(m.length=h,i=1,h--):(m.length=h+1,i=Ko(10,rn-r),m[h]=a>0?(d/Ko(10,s-a)%Ko(10,a)|0)*i:0),c)for(;;)if(h==0){(m[0]+=i)==Wn&&(m[0]=1,++e.e);break}else{if(m[h]+=i,m[h]!=Wn)break;m[h--]=0,i=1}for(r=m.length;m[--r]===0;)m.pop();if(ln&&(e.e>pg||e.e<-pg))throw Error(jE+Dn(e));return e}function CV(e,t){var n,r,a,i,s,l,c,d,h,m,g=e.constructor,v=g.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new g(e),ln?Yt(t,v):t;if(c=e.d,m=t.d,r=t.e,d=e.e,c=c.slice(),s=d-r,s){for(h=s<0,h?(n=c,s=-s,l=m.length):(n=m,r=d,l=c.length),a=Math.max(Math.ceil(v/rn),l)+2,s>a&&(s=a,n.length=1),n.reverse(),a=s;a--;)n.push(0);n.reverse()}else{for(a=c.length,l=m.length,h=a<l,h&&(l=a),a=0;a<l;a++)if(c[a]!=m[a]){h=c[a]<m[a];break}s=0}for(h&&(n=c,c=m,m=n,t.s=-t.s),l=c.length,a=m.length-l;a>0;--a)c[l++]=0;for(a=m.length;a>s;){if(c[--a]<m[a]){for(i=a;i&&c[--i]===0;)c[i]=Wn-1;--c[i],c[a]+=Wn}c[a]-=m[a]}for(;c[--l]===0;)c.pop();for(;c[0]===0;c.shift())--r;return c[0]?(t.d=c,t.e=r,ln?Yt(t,v):t):new g(0)}function ml(e,t,n){var r,a=Dn(e),i=oi(e.d),s=i.length;return t?(n&&(r=n-s)>0?i=i.charAt(0)+"."+i.slice(1)+Ys(r):s>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+Ys(-a-1)+i,n&&(r=n-s)>0&&(i+=Ys(r))):a>=s?(i+=Ys(a+1-s),n&&(r=n-a-1)>0&&(i=i+"."+Ys(r))):((r=a+1)<s&&(i=i.slice(0,r)+"."+i.slice(r)),n&&(r=n-s)>0&&(a+1===s&&(i+="."),i+=Ys(r))),e.s<0?"-"+i:i}function hq(e,t){if(e.length>t)return e.length=t,!0}function NV(e){var t,n,r;function a(i){var s=this;if(!(s instanceof a))return new a(i);if(s.constructor=a,i instanceof a){s.s=i.s,s.e=i.e,s.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(tl+i);if(i>0)s.s=1;else if(i<0)i=-i,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(i===~~i&&i<1e7){s.e=0,s.d=[i];return}return fq(s,i.toString())}else if(typeof i!="string")throw Error(tl+i);if(i.charCodeAt(0)===45?(i=i.slice(1),s.s=-1):s.s=1,m_e.test(i))fq(s,i);else throw Error(tl+i)}if(a.prototype=Ge,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=NV,a.config=a.set=p_e,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return a.config(e),a}function p_e(e){if(!e||typeof e!="object")throw Error(va+"Object expected");var t,n,r,a=["precision",1,gc,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<a.length;t+=3)if((r=e[n=a[t]])!==void 0)if(vc(r)===r&&r>=a[t+1]&&r<=a[t+2])this[n]=r;else throw Error(tl+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(tl+n+": "+r);return this}var kE=NV(h_e);Vr=new kE(1);const Ct=kE;function EV(e){var t;return e===0?t=1:t=Math.floor(new Ct(e).abs().log(10).toNumber())+1,t}function AV(e,t,n){for(var r=new Ct(e),a=0,i=[];r.lt(t)&&a<1e5;)i.push(r.toNumber()),r=r.add(n),a++;return i}var TV=e=>{var[t,n]=e,[r,a]=[t,n];return t>n&&([r,a]=[n,t]),[r,a]},_E=(e,t,n)=>{if(e.lte(0))return new Ct(0);var r=EV(e.toNumber()),a=new Ct(10).pow(r),i=e.div(a),s=r!==1?.05:.1,l=new Ct(Math.ceil(i.div(s).toNumber())).add(n).mul(s),c=l.mul(a);return t?new Ct(c.toNumber()):new Ct(Math.ceil(c.toNumber()))},OV=(e,t,n)=>{var r;if(e.lte(0))return new Ct(0);var a=[1,2,2.5,5],i=e.toNumber(),s=Math.floor(new Ct(i).abs().log(10).toNumber()),l=new Ct(10).pow(s),c=e.div(l).toNumber(),d=a.findIndex(v=>v>=c-1e-10);if(d===-1&&(l=l.mul(10),d=0),d+=n,d>=a.length){var h=Math.floor(d/a.length);d%=a.length,l=l.mul(new Ct(10).pow(h))}var m=(r=a[d])!==null&&r!==void 0?r:1,g=new Ct(m).mul(l);return t?g:new Ct(Math.ceil(g.toNumber()))},g_e=(e,t,n)=>{var r=new Ct(1),a=new Ct(e);if(!a.isint()&&n){var i=Math.abs(e);i<1?(r=new Ct(10).pow(EV(e)-1),a=new Ct(Math.floor(a.div(r).toNumber())).mul(r)):i>1&&(a=new Ct(Math.floor(e)))}else e===0?a=new Ct(Math.floor((t-1)/2)):n||(a=new Ct(Math.floor(e)));for(var s=Math.floor((t-1)/2),l=[],c=0;c<t;c++)l.push(a.add(new Ct(c-s).mul(r)).toNumber());return l},MV=function(t,n,r,a){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:_E;if(!Number.isFinite((n-t)/(r-1)))return{step:new Ct(0),tickMin:new Ct(0),tickMax:new Ct(0)};var l=s(new Ct(n).sub(t).div(r-1),a,i),c;t<=0&&n>=0?c=new Ct(0):(c=new Ct(t).add(n).div(2),c=c.sub(new Ct(c).mod(l)));var d=Math.ceil(c.sub(t).div(l).toNumber()),h=Math.ceil(new Ct(n).sub(c).div(l).toNumber()),m=d+h+1;return m>r?MV(t,n,r,a,i+1,s):(m<r&&(h=n>0?h+(r-m):h,d=n>0?d:d+(r-m)),{step:l,tickMin:c.sub(new Ct(d).mul(l)),tickMax:c.add(new Ct(h).mul(l))})},mq=function(t){var[n,r]=t,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",l=Math.max(a,2),[c,d]=TV([n,r]);if(c===-1/0||d===1/0){var h=d===1/0?[c,...Array(a-1).fill(1/0)]:[...Array(a-1).fill(-1/0),d];return n>r?h.reverse():h}if(c===d)return g_e(c,a,i);var m=s==="snap125"?OV:_E,{step:g,tickMin:v,tickMax:b}=MV(c,d,l,i,0,m),w=AV(v,b.add(new Ct(.1).mul(g)),g);return n>r?w.reverse():w},pq=function(t,n){var[r,a]=t,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",[l,c]=TV([r,a]);if(l===-1/0||c===1/0)return[r,a];if(l===c)return[l];var d=s==="snap125"?OV:_E,h=Math.max(n,2),m=d(new Ct(c).sub(l).div(h-1),i,0),g=[...AV(new Ct(l),new Ct(c),m),c];return i===!1&&(g=g.map(v=>Math.round(v))),r>a?g.reverse():g},PV=e=>e.rootProps.maxBarSize,v_e=e=>e.rootProps.barGap,DV=e=>e.rootProps.barCategoryGap,y_e=e=>e.rootProps.barSize,oh=e=>e.rootProps.stackOffset,RV=e=>e.rootProps.reverseStackOrder,CE=e=>e.options.chartName,NE=e=>e.rootProps.syncId,IV=e=>e.rootProps.syncMethod,EE=e=>e.options.eventEmitter,Pn={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},qo={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},ei={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},Yv=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function Xv(e,t,n){if(n!=="auto")return n;if(e!=null)return ds(e,t)?"category":"number"}function gq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function gg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gq(Object(n),!0).forEach(function(r){x_e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gq(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function x_e(e,t,n){return(t=b_e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b_e(e){var t=w_e(e,"string");return typeof t=="symbol"?t:t+""}function w_e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var vq={allowDataOverflow:qo.allowDataOverflow,allowDecimals:qo.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:qo.angleAxisId,includeHidden:!1,name:void 0,reversed:qo.reversed,scale:qo.scale,tick:qo.tick,tickCount:void 0,ticks:void 0,type:qo.type,unit:void 0,niceTicks:"auto"},yq={allowDataOverflow:ei.allowDataOverflow,allowDecimals:ei.allowDecimals,allowDuplicatedCategory:ei.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:ei.radiusAxisId,includeHidden:ei.includeHidden,name:void 0,reversed:ei.reversed,scale:ei.scale,tick:ei.tick,tickCount:ei.tickCount,ticks:void 0,type:ei.type,unit:void 0,niceTicks:"auto"},S_e=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},AE=he([S_e,JG],(e,t)=>{var n;if(e!=null)return e;var r=(n=Xv(t,"angleAxis",vq.type))!==null&&n!==void 0?n:"category";return gg(gg({},vq),{},{type:r})}),j_e=(e,t)=>e.polarAxis.radiusAxis[t],TE=he([j_e,JG],(e,t)=>{var n;if(e!=null)return e;var r=(n=Xv(t,"radiusAxis",yq.type))!==null&&n!==void 0?n:"category";return gg(gg({},yq),{},{type:r})}),Zv=e=>e.polarOptions,OE=he([fs,hs,Fn],vV),LV=he([Zv,OE],(e,t)=>{if(e!=null)return dr(e.innerRadius,t,0)}),zV=he([Zv,OE],(e,t)=>{if(e!=null)return dr(e.outerRadius,t,t*.8)}),k_e=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:n}=e;return[t,n]},$V=he([Zv],k_e);he([AE,$V],Yv);var qV=he([OE,LV,zV],(e,t,n)=>{if(!(e==null||t==null||n==null))return[t,n]});he([TE,qV],Yv);var BV=he([Rt,Zv,LV,zV,fs,hs],(e,t,n,r,a,i)=>{if(!(e!=="centric"&&e!=="radial"||t==null||n==null||r==null)){var{cx:s,cy:l,startAngle:c,endAngle:d}=t;return{cx:dr(s,a,a/2),cy:dr(l,i,i/2),innerRadius:n,outerRadius:r,startAngle:c,endAngle:d,clockWise:!1}}}),pn=(e,t)=>t,lh=(e,t,n)=>n;function ME(e){return e==null?void 0:e.id}function FV(e,t,n){var{chartData:r=[]}=t,{allowDuplicatedCategory:a,dataKey:i}=n,s=new Map;return e.forEach(l=>{var c,d=(c=l.data)!==null&&c!==void 0?c:r;if(!(d==null||d.length===0)){var h=ME(l);d.forEach((m,g)=>{var v=i==null||a?g:String($t(m,i,null)),b=$t(m,l.dataKey,0),w;s.has(v)?w=s.get(v):w={},Object.assign(w,{[h]:b}),s.set(v,w)})}}),Array.from(s.values())}function Qv(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var Jv=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function ey(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function __e(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return!1}var Zn=e=>{var t=Rt(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},yc=e=>e.tooltip.settings.axisId;function PE(e){if(e!=null){var t=e.ticks,n=e.bandwidth,r=e.range(),a=[Math.min(...r),Math.max(...r)];return{domain:()=>e.domain(),range:(function(i){function s(){return i.apply(this,arguments)}return s.toString=function(){return i.toString()},s})(()=>a),rangeMin:()=>a[0],rangeMax:()=>a[1],isInRange(i){var s=a[0],l=a[1];return s<=l?i>=s&&i<=l:i>=l&&i<=s},bandwidth:n?()=>n.call(e):void 0,ticks:t?i=>t.call(e,i):void 0,map:(i,s)=>{var l=e(i);if(l!=null){if(e.bandwidth&&s!==null&&s!==void 0&&s.position){var c=e.bandwidth();switch(s.position){case"middle":l+=c/2;break;case"end":l+=c;break}}return l}}}}}var HV=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!ci(t)){for(var n,r,a=0;a<t.length;a++){var i=t[a];Nt(i)&&((n===void 0||i<n)&&(n=i),(r===void 0||i>r)&&(r=i))}return n!==void 0&&r!==void 0?[n,r]:void 0}return t}default:return t}};function eo(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function C_e(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function DE(e){let t,n,r;e.length!==2?(t=eo,n=(l,c)=>eo(e(l),c),r=(l,c)=>e(l)-c):(t=e===eo||e===C_e?e:N_e,n=e,r=e);function a(l,c,d=0,h=l.length){if(d<h){if(t(c,c)!==0)return h;do{const m=d+h>>>1;n(l[m],c)<0?d=m+1:h=m}while(d<h)}return d}function i(l,c,d=0,h=l.length){if(d<h){if(t(c,c)!==0)return h;do{const m=d+h>>>1;n(l[m],c)<=0?d=m+1:h=m}while(d<h)}return d}function s(l,c,d=0,h=l.length){const m=a(l,c,d,h-1);return m>d&&r(l[m-1],c)>-r(l[m],c)?m-1:m}return{left:a,center:s,right:i}}function N_e(){return 0}function UV(e){return e===null?NaN:+e}function*E_e(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const A_e=DE(eo),uh=A_e.right;DE(UV).center;class xq extends Map{constructor(t,n=M_e){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,a]of t)this.set(r,a)}get(t){return super.get(bq(this,t))}has(t){return super.has(bq(this,t))}set(t,n){return super.set(T_e(this,t),n)}delete(t){return super.delete(O_e(this,t))}}function bq({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function T_e({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function O_e({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function M_e(e){return e!==null&&typeof e=="object"?e.valueOf():e}function P_e(e=eo){if(e===eo)return GV;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function GV(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const D_e=Math.sqrt(50),R_e=Math.sqrt(10),I_e=Math.sqrt(2);function vg(e,t,n){const r=(t-e)/Math.max(0,n),a=Math.floor(Math.log10(r)),i=r/Math.pow(10,a),s=i>=D_e?10:i>=R_e?5:i>=I_e?2:1;let l,c,d;return a<0?(d=Math.pow(10,-a)/s,l=Math.round(e*d),c=Math.round(t*d),l/d<e&&++l,c/d>t&&--c,d=-d):(d=Math.pow(10,a)*s,l=Math.round(e/d),c=Math.round(t/d),l*d<e&&++l,c*d>t&&--c),c<l&&.5<=n&&n<2?vg(e,t,n*2):[l,c,d]}function g2(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[a,i,s]=r?vg(t,e,n):vg(e,t,n);if(!(i>=a))return[];const l=i-a+1,c=new Array(l);if(r)if(s<0)for(let d=0;d<l;++d)c[d]=(i-d)/-s;else for(let d=0;d<l;++d)c[d]=(i-d)*s;else if(s<0)for(let d=0;d<l;++d)c[d]=(a+d)/-s;else for(let d=0;d<l;++d)c[d]=(a+d)*s;return c}function v2(e,t,n){return t=+t,e=+e,n=+n,vg(e,t,n)[2]}function y2(e,t,n){t=+t,e=+e,n=+n;const r=t<e,a=r?v2(t,e,n):v2(e,t,n);return(r?-1:1)*(a<0?1/-a:a)}function wq(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function Sq(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function VV(e,t,n=0,r=1/0,a){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(a=a===void 0?GV:P_e(a);r>n;){if(r-n>600){const c=r-n+1,d=t-n+1,h=Math.log(c),m=.5*Math.exp(2*h/3),g=.5*Math.sqrt(h*m*(c-m)/c)*(d-c/2<0?-1:1),v=Math.max(n,Math.floor(t-d*m/c+g)),b=Math.min(r,Math.floor(t+(c-d)*m/c+g));VV(e,t,v,b,a)}const i=e[t];let s=n,l=r;for(Cd(e,n,t),a(e[r],i)>0&&Cd(e,n,r);s<l;){for(Cd(e,s,l),++s,--l;a(e[s],i)<0;)++s;for(;a(e[l],i)>0;)--l}a(e[n],i)===0?Cd(e,n,l):(++l,Cd(e,l,r)),l<=t&&(n=l+1),t<=l&&(r=l-1)}return e}function Cd(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function L_e(e,t,n){if(e=Float64Array.from(E_e(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return Sq(e);if(t>=1)return wq(e);var r,a=(r-1)*t,i=Math.floor(a),s=wq(VV(e,i).subarray(0,i+1)),l=Sq(e.subarray(i+1));return s+(l-s)*(a-i)}}function z_e(e,t,n=UV){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,a=(r-1)*t,i=Math.floor(a),s=+n(e[i],i,e),l=+n(e[i+1],i+1,e);return s+(l-s)*(a-i)}}function $_e(e,t,n){e=+e,t=+t,n=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+n;for(var r=-1,a=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(a);++r<a;)i[r]=e+r*n;return i}function wa(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function ms(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const x2=Symbol("implicit");function RE(){var e=new xq,t=[],n=[],r=x2;function a(i){let s=e.get(i);if(s===void 0){if(r!==x2)return r;e.set(i,s=t.push(i)-1)}return n[s%n.length]}return a.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new xq;for(const s of i)e.has(s)||e.set(s,t.push(s)-1);return a},a.range=function(i){return arguments.length?(n=Array.from(i),a):n.slice()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return RE(t,n).unknown(r)},wa.apply(a,arguments),a}function IE(){var e=RE().unknown(void 0),t=e.domain,n=e.range,r=0,a=1,i,s,l=!1,c=0,d=0,h=.5;delete e.unknown;function m(){var g=t().length,v=a<r,b=v?a:r,w=v?r:a;i=(w-b)/Math.max(1,g-c+d*2),l&&(i=Math.floor(i)),b+=(w-b-i*(g-c))*h,s=i*(1-c),l&&(b=Math.round(b),s=Math.round(s));var S=$_e(g).map(function(j){return b+i*j});return n(v?S.reverse():S)}return e.domain=function(g){return arguments.length?(t(g),m()):t()},e.range=function(g){return arguments.length?([r,a]=g,r=+r,a=+a,m()):[r,a]},e.rangeRound=function(g){return[r,a]=g,r=+r,a=+a,l=!0,m()},e.bandwidth=function(){return s},e.step=function(){return i},e.round=function(g){return arguments.length?(l=!!g,m()):l},e.padding=function(g){return arguments.length?(c=Math.min(1,d=+g),m()):c},e.paddingInner=function(g){return arguments.length?(c=Math.min(1,g),m()):c},e.paddingOuter=function(g){return arguments.length?(d=+g,m()):d},e.align=function(g){return arguments.length?(h=Math.max(0,Math.min(1,g)),m()):h},e.copy=function(){return IE(t(),[r,a]).round(l).paddingInner(c).paddingOuter(d).align(h)},wa.apply(m(),arguments)}function KV(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return KV(t())},e}function q_e(){return KV(IE.apply(null,arguments).paddingInner(1))}function B_e(e){return function(){return e}}function yg(e){return+e}var jq=[0,1];function yr(e){return e}function b2(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:B_e(isNaN(t)?NaN:.5)}function F_e(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function H_e(e,t,n){var r=e[0],a=e[1],i=t[0],s=t[1];return a<r?(r=b2(a,r),i=n(s,i)):(r=b2(r,a),i=n(i,s)),function(l){return i(r(l))}}function U_e(e,t,n){var r=Math.min(e.length,t.length)-1,a=new Array(r),i=new Array(r),s=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<r;)a[s]=b2(e[s],e[s+1]),i[s]=n(t[s],t[s+1]);return function(l){var c=uh(e,l,1,r)-1;return i[c](a[c](l))}}function ch(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function ty(){var e=jq,t=jq,n=Yi,r,a,i,s=yr,l,c,d;function h(){var g=Math.min(e.length,t.length);return s!==yr&&(s=F_e(e[0],e[g-1])),l=g>2?U_e:H_e,c=d=null,m}function m(g){return g==null||isNaN(g=+g)?i:(c||(c=l(e.map(r),t,n)))(r(s(g)))}return m.invert=function(g){return s(a((d||(d=l(t,e.map(r),Aa)))(g)))},m.domain=function(g){return arguments.length?(e=Array.from(g,yg),h()):e.slice()},m.range=function(g){return arguments.length?(t=Array.from(g),h()):t.slice()},m.rangeRound=function(g){return t=Array.from(g),n=SN,h()},m.clamp=function(g){return arguments.length?(s=g?!0:yr,h()):s!==yr},m.interpolate=function(g){return arguments.length?(n=g,h()):n},m.unknown=function(g){return arguments.length?(i=g,m):i},function(g,v){return r=g,a=v,h()}}function LE(){return ty()(yr,yr)}function G_e(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function xg(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Qu(e){return e=xg(Math.abs(e)),e?e[1]:NaN}function V_e(e,t){return function(n,r){for(var a=n.length,i=[],s=0,l=e[0],c=0;a>0&&l>0&&(c+l+1>r&&(l=Math.max(1,r-c)),i.push(n.substring(a-=l,a+l)),!((c+=l+1)>r));)l=e[s=(s+1)%e.length];return i.reverse().join(t)}}function K_e(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var W_e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Cf(e){if(!(t=W_e.exec(e)))throw new Error("invalid format: "+e);var t;return new zE({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Cf.prototype=zE.prototype;function zE(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}zE.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Y_e(e){e:for(var t=e.length,n=1,r=-1,a;n<t;++n)switch(e[n]){case".":r=a=n;break;case"0":r===0&&(r=n),a=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(a+1):e}var bg;function X_e(e,t){var n=xg(e,t);if(!n)return bg=void 0,e.toPrecision(t);var r=n[0],a=n[1],i=a-(bg=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,s=r.length;return i===s?r:i>s?r+new Array(i-s+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+xg(e,Math.max(0,t+i-1))[0]}function kq(e,t){var n=xg(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}const _q={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:G_e,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>kq(e*100,t),r:kq,s:X_e,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Cq(e){return e}var Nq=Array.prototype.map,Eq=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Z_e(e){var t=e.grouping===void 0||e.thousands===void 0?Cq:V_e(Nq.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?Cq:K_e(Nq.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function d(m,g){m=Cf(m);var v=m.fill,b=m.align,w=m.sign,S=m.symbol,j=m.zero,_=m.width,k=m.comma,E=m.precision,T=m.trim,A=m.type;A==="n"?(k=!0,A="g"):_q[A]||(E===void 0&&(E=12),T=!0,A="g"),(j||v==="0"&&b==="=")&&(j=!0,v="0",b="=");var O=(g&&g.prefix!==void 0?g.prefix:"")+(S==="$"?n:S==="#"&&/[boxX]/.test(A)?"0"+A.toLowerCase():""),I=(S==="$"?r:/[%p]/.test(A)?s:"")+(g&&g.suffix!==void 0?g.suffix:""),P=_q[A],D=/[defgprs%]/.test(A);E=E===void 0?6:/[gprs]/.test(A)?Math.max(1,Math.min(21,E)):Math.max(0,Math.min(20,E));function q(z){var F=O,R=I,M,L,G;if(A==="c")R=P(z)+R,z="";else{z=+z;var W=z<0||1/z<0;if(z=isNaN(z)?c:P(Math.abs(z),E),T&&(z=Y_e(z)),W&&+z==0&&w!=="+"&&(W=!1),F=(W?w==="("?w:l:w==="-"||w==="("?"":w)+F,R=(A==="s"&&!isNaN(z)&&bg!==void 0?Eq[8+bg/3]:"")+R+(W&&w==="("?")":""),D){for(M=-1,L=z.length;++M<L;)if(G=z.charCodeAt(M),48>G||G>57){R=(G===46?a+z.slice(M+1):z.slice(M))+R,z=z.slice(0,M);break}}}k&&!j&&(z=t(z,1/0));var Y=F.length+z.length+R.length,B=Y<_?new Array(_-Y+1).join(v):"";switch(k&&j&&(z=t(B+z,B.length?_-R.length:1/0),B=""),b){case"<":z=F+z+R+B;break;case"=":z=F+B+z+R;break;case"^":z=B.slice(0,Y=B.length>>1)+F+z+R+B.slice(Y);break;default:z=B+F+z+R;break}return i(z)}return q.toString=function(){return m+""},q}function h(m,g){var v=Math.max(-8,Math.min(8,Math.floor(Qu(g)/3)))*3,b=Math.pow(10,-v),w=d((m=Cf(m),m.type="f",m),{suffix:Eq[8+v/3]});return function(S){return w(b*S)}}return{format:d,formatPrefix:h}}var np,$E,WV;Q_e({thousands:",",grouping:[3],currency:["$",""]});function Q_e(e){return np=Z_e(e),$E=np.format,WV=np.formatPrefix,np}function J_e(e){return Math.max(0,-Qu(Math.abs(e)))}function eCe(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Qu(t)/3)))*3-Qu(Math.abs(e)))}function tCe(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Qu(t)-Qu(e))+1}function YV(e,t,n,r){var a=y2(e,t,n),i;switch(r=Cf(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=eCe(a,s))&&(r.precision=i),WV(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=tCe(a,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=J_e(a))&&(r.precision=i-(r.type==="%")*2);break}}return $E(r)}function co(e){var t=e.domain;return e.ticks=function(n){var r=t();return g2(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var a=t();return YV(a[0],a[a.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),a=0,i=r.length-1,s=r[a],l=r[i],c,d,h=10;for(l<s&&(d=s,s=l,l=d,d=a,a=i,i=d);h-- >0;){if(d=v2(s,l,n),d===c)return r[a]=s,r[i]=l,t(r);if(d>0)s=Math.floor(s/d)*d,l=Math.ceil(l/d)*d;else if(d<0)s=Math.ceil(s*d)/d,l=Math.floor(l*d)/d;else break;c=d}return e},e}function XV(){var e=LE();return e.copy=function(){return ch(e,XV())},wa.apply(e,arguments),co(e)}function ZV(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,yg),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return ZV(e).unknown(t)},e=arguments.length?Array.from(e,yg):[0,1],co(n)}function QV(e,t){e=e.slice();var n=0,r=e.length-1,a=e[n],i=e[r],s;return i<a&&(s=n,n=r,r=s,s=a,a=i,i=s),e[n]=t.floor(a),e[r]=t.ceil(i),e}function Aq(e){return Math.log(e)}function Tq(e){return Math.exp(e)}function nCe(e){return-Math.log(-e)}function rCe(e){return-Math.exp(-e)}function aCe(e){return isFinite(e)?+("1e"+e):e<0?0:e}function iCe(e){return e===10?aCe:e===Math.E?Math.exp:t=>Math.pow(e,t)}function sCe(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function Oq(e){return(t,n)=>-e(-t,n)}function qE(e){const t=e(Aq,Tq),n=t.domain;let r=10,a,i;function s(){return a=sCe(r),i=iCe(r),n()[0]<0?(a=Oq(a),i=Oq(i),e(nCe,rCe)):e(Aq,Tq),t}return t.base=function(l){return arguments.length?(r=+l,s()):r},t.domain=function(l){return arguments.length?(n(l),s()):n()},t.ticks=l=>{const c=n();let d=c[0],h=c[c.length-1];const m=h<d;m&&([d,h]=[h,d]);let g=a(d),v=a(h),b,w;const S=l==null?10:+l;let j=[];if(!(r%1)&&v-g<S){if(g=Math.floor(g),v=Math.ceil(v),d>0){for(;g<=v;++g)for(b=1;b<r;++b)if(w=g<0?b/i(-g):b*i(g),!(w<d)){if(w>h)break;j.push(w)}}else for(;g<=v;++g)for(b=r-1;b>=1;--b)if(w=g>0?b/i(-g):b*i(g),!(w<d)){if(w>h)break;j.push(w)}j.length*2<S&&(j=g2(d,h,S))}else j=g2(g,v,Math.min(v-g,S)).map(i);return m?j.reverse():j},t.tickFormat=(l,c)=>{if(l==null&&(l=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=Cf(c)).precision==null&&(c.trim=!0),c=$E(c)),l===1/0)return c;const d=Math.max(1,r*l/t.ticks().length);return h=>{let m=h/i(Math.round(a(h)));return m*r<r-.5&&(m*=r),m<=d?c(h):""}},t.nice=()=>n(QV(n(),{floor:l=>i(Math.floor(a(l))),ceil:l=>i(Math.ceil(a(l)))})),t}function JV(){const e=qE(ty()).domain([1,10]);return e.copy=()=>ch(e,JV()).base(e.base()),wa.apply(e,arguments),e}function Mq(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Pq(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function BE(e){var t=1,n=e(Mq(t),Pq(t));return n.constant=function(r){return arguments.length?e(Mq(t=+r),Pq(t)):t},co(n)}function eK(){var e=BE(ty());return e.copy=function(){return ch(e,eK()).constant(e.constant())},wa.apply(e,arguments)}function Dq(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function oCe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function lCe(e){return e<0?-e*e:e*e}function FE(e){var t=e(yr,yr),n=1;function r(){return n===1?e(yr,yr):n===.5?e(oCe,lCe):e(Dq(n),Dq(1/n))}return t.exponent=function(a){return arguments.length?(n=+a,r()):n},co(t)}function HE(){var e=FE(ty());return e.copy=function(){return ch(e,HE()).exponent(e.exponent())},wa.apply(e,arguments),e}function uCe(){return HE.apply(null,arguments).exponent(.5)}function Rq(e){return Math.sign(e)*e*e}function cCe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function tK(){var e=LE(),t=[0,1],n=!1,r;function a(i){var s=cCe(e(i));return isNaN(s)?r:n?Math.round(s):s}return a.invert=function(i){return e.invert(Rq(i))},a.domain=function(i){return arguments.length?(e.domain(i),a):e.domain()},a.range=function(i){return arguments.length?(e.range((t=Array.from(i,yg)).map(Rq)),a):t.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(n=!!i,a):n},a.clamp=function(i){return arguments.length?(e.clamp(i),a):e.clamp()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return tK(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},wa.apply(a,arguments),co(a)}function nK(){var e=[],t=[],n=[],r;function a(){var s=0,l=Math.max(1,t.length);for(n=new Array(l-1);++s<l;)n[s-1]=z_e(e,s/l);return i}function i(s){return s==null||isNaN(s=+s)?r:t[uh(n,s)]}return i.invertExtent=function(s){var l=t.indexOf(s);return l<0?[NaN,NaN]:[l>0?n[l-1]:e[0],l<n.length?n[l]:e[e.length-1]]},i.domain=function(s){if(!arguments.length)return e.slice();e=[];for(let l of s)l!=null&&!isNaN(l=+l)&&e.push(l);return e.sort(eo),a()},i.range=function(s){return arguments.length?(t=Array.from(s),a()):t.slice()},i.unknown=function(s){return arguments.length?(r=s,i):r},i.quantiles=function(){return n.slice()},i.copy=function(){return nK().domain(e).range(t).unknown(r)},wa.apply(i,arguments)}function rK(){var e=0,t=1,n=1,r=[.5],a=[0,1],i;function s(c){return c!=null&&c<=c?a[uh(r,c,0,n)]:i}function l(){var c=-1;for(r=new Array(n);++c<n;)r[c]=((c+1)*t-(c-n)*e)/(n+1);return s}return s.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,l()):[e,t]},s.range=function(c){return arguments.length?(n=(a=Array.from(c)).length-1,l()):a.slice()},s.invertExtent=function(c){var d=a.indexOf(c);return d<0?[NaN,NaN]:d<1?[e,r[0]]:d>=n?[r[n-1],t]:[r[d-1],r[d]]},s.unknown=function(c){return arguments.length&&(i=c),s},s.thresholds=function(){return r.slice()},s.copy=function(){return rK().domain([e,t]).range(a).unknown(i)},wa.apply(co(s),arguments)}function aK(){var e=[.5],t=[0,1],n,r=1;function a(i){return i!=null&&i<=i?t[uh(e,i,0,r)]:n}return a.domain=function(i){return arguments.length?(e=Array.from(i),r=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(i){return arguments.length?(t=Array.from(i),r=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(i){var s=t.indexOf(i);return[e[s-1],e[s]]},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return aK().domain(e).range(t).unknown(n)},wa.apply(a,arguments)}const H_=new Date,U_=new Date;function Hn(e,t,n,r){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const s=a(i),l=a.ceil(i);return i-s<l-i?s:l},a.offset=(i,s)=>(t(i=new Date(+i),s==null?1:Math.floor(s)),i),a.range=(i,s,l)=>{const c=[];if(i=a.ceil(i),l=l==null?1:Math.floor(l),!(i<s)||!(l>0))return c;let d;do c.push(d=new Date(+i)),t(i,l),e(i);while(d<i&&i<s);return c},a.filter=i=>Hn(s=>{if(s>=s)for(;e(s),!i(s);)s.setTime(s-1)},(s,l)=>{if(s>=s)if(l<0)for(;++l<=0;)for(;t(s,-1),!i(s););else for(;--l>=0;)for(;t(s,1),!i(s););}),n&&(a.count=(i,s)=>(H_.setTime(+i),U_.setTime(+s),e(H_),e(U_),Math.floor(n(H_,U_))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(r?s=>r(s)%i===0:s=>a.count(0,s)%i===0):a)),a}const wg=Hn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);wg.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Hn(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):wg);wg.range;const Vi=1e3,ga=Vi*60,Ki=ga*60,as=Ki*24,UE=as*7,Iq=as*30,G_=as*365,Xo=Hn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Vi)},(e,t)=>(t-e)/Vi,e=>e.getUTCSeconds());Xo.range;const GE=Hn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Vi)},(e,t)=>{e.setTime(+e+t*ga)},(e,t)=>(t-e)/ga,e=>e.getMinutes());GE.range;const VE=Hn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*ga)},(e,t)=>(t-e)/ga,e=>e.getUTCMinutes());VE.range;const KE=Hn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Vi-e.getMinutes()*ga)},(e,t)=>{e.setTime(+e+t*Ki)},(e,t)=>(t-e)/Ki,e=>e.getHours());KE.range;const WE=Hn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ki)},(e,t)=>(t-e)/Ki,e=>e.getUTCHours());WE.range;const dh=Hn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ga)/as,e=>e.getDate()-1);dh.range;const ny=Hn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/as,e=>e.getUTCDate()-1);ny.range;const iK=Hn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/as,e=>Math.floor(e/as));iK.range;function Nl(e){return Hn(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*ga)/UE)}const ry=Nl(0),Sg=Nl(1),dCe=Nl(2),fCe=Nl(3),Ju=Nl(4),hCe=Nl(5),mCe=Nl(6);ry.range;Sg.range;dCe.range;fCe.range;Ju.range;hCe.range;mCe.range;function El(e){return Hn(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/UE)}const ay=El(0),jg=El(1),pCe=El(2),gCe=El(3),ec=El(4),vCe=El(5),yCe=El(6);ay.range;jg.range;pCe.range;gCe.range;ec.range;vCe.range;yCe.range;const YE=Hn(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());YE.range;const XE=Hn(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());XE.range;const is=Hn(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());is.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Hn(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});is.range;const ss=Hn(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());ss.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Hn(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});ss.range;function sK(e,t,n,r,a,i){const s=[[Xo,1,Vi],[Xo,5,5*Vi],[Xo,15,15*Vi],[Xo,30,30*Vi],[i,1,ga],[i,5,5*ga],[i,15,15*ga],[i,30,30*ga],[a,1,Ki],[a,3,3*Ki],[a,6,6*Ki],[a,12,12*Ki],[r,1,as],[r,2,2*as],[n,1,UE],[t,1,Iq],[t,3,3*Iq],[e,1,G_]];function l(d,h,m){const g=h<d;g&&([d,h]=[h,d]);const v=m&&typeof m.range=="function"?m:c(d,h,m),b=v?v.range(d,+h+1):[];return g?b.reverse():b}function c(d,h,m){const g=Math.abs(h-d)/m,v=DE(([,,S])=>S).right(s,g);if(v===s.length)return e.every(y2(d/G_,h/G_,m));if(v===0)return wg.every(Math.max(y2(d,h,m),1));const[b,w]=s[g/s[v-1][2]<s[v][2]/g?v-1:v];return b.every(w)}return[l,c]}const[xCe,bCe]=sK(ss,XE,ay,iK,WE,VE),[wCe,SCe]=sK(is,YE,ry,dh,KE,GE);function V_(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function K_(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Nd(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function jCe(e){var t=e.dateTime,n=e.date,r=e.time,a=e.periods,i=e.days,s=e.shortDays,l=e.months,c=e.shortMonths,d=Ed(a),h=Ad(a),m=Ed(i),g=Ad(i),v=Ed(s),b=Ad(s),w=Ed(l),S=Ad(l),j=Ed(c),_=Ad(c),k={a:G,A:W,b:Y,B,c:null,d:Fq,e:Fq,f:VCe,g:n2e,G:a2e,H:HCe,I:UCe,j:GCe,L:oK,m:KCe,M:WCe,p:H,q:K,Q:Gq,s:Vq,S:YCe,u:XCe,U:ZCe,V:QCe,w:JCe,W:e2e,x:null,X:null,y:t2e,Y:r2e,Z:i2e,"%":Uq},E={a:U,A:X,b:J,B:Q,c:null,d:Hq,e:Hq,f:u2e,g:x2e,G:w2e,H:s2e,I:o2e,j:l2e,L:uK,m:c2e,M:d2e,p:re,q:ue,Q:Gq,s:Vq,S:f2e,u:h2e,U:m2e,V:p2e,w:g2e,W:v2e,x:null,X:null,y:y2e,Y:b2e,Z:S2e,"%":Uq},T={a:D,A:q,b:z,B:F,c:R,d:qq,e:qq,f:$Ce,g:$q,G:zq,H:Bq,I:Bq,j:RCe,L:zCe,m:DCe,M:ICe,p:P,q:PCe,Q:BCe,s:FCe,S:LCe,u:ECe,U:ACe,V:TCe,w:NCe,W:OCe,x:M,X:L,y:$q,Y:zq,Z:MCe,"%":qCe};k.x=A(n,k),k.X=A(r,k),k.c=A(t,k),E.x=A(n,E),E.X=A(r,E),E.c=A(t,E);function A(Z,se){return function(ce){var ee=[],ae=-1,oe=0,fe=Z.length,Ce,Te,pe;for(ce instanceof Date||(ce=new Date(+ce));++ae<fe;)Z.charCodeAt(ae)===37&&(ee.push(Z.slice(oe,ae)),(Te=Lq[Ce=Z.charAt(++ae)])!=null?Ce=Z.charAt(++ae):Te=Ce==="e"?" ":"0",(pe=se[Ce])&&(Ce=pe(ce,Te)),ee.push(Ce),oe=ae+1);return ee.push(Z.slice(oe,ae)),ee.join("")}}function O(Z,se){return function(ce){var ee=Nd(1900,void 0,1),ae=I(ee,Z,ce+="",0),oe,fe;if(ae!=ce.length)return null;if("Q"in ee)return new Date(ee.Q);if("s"in ee)return new Date(ee.s*1e3+("L"in ee?ee.L:0));if(se&&!("Z"in ee)&&(ee.Z=0),"p"in ee&&(ee.H=ee.H%12+ee.p*12),ee.m===void 0&&(ee.m="q"in ee?ee.q:0),"V"in ee){if(ee.V<1||ee.V>53)return null;"w"in ee||(ee.w=1),"Z"in ee?(oe=K_(Nd(ee.y,0,1)),fe=oe.getUTCDay(),oe=fe>4||fe===0?jg.ceil(oe):jg(oe),oe=ny.offset(oe,(ee.V-1)*7),ee.y=oe.getUTCFullYear(),ee.m=oe.getUTCMonth(),ee.d=oe.getUTCDate()+(ee.w+6)%7):(oe=V_(Nd(ee.y,0,1)),fe=oe.getDay(),oe=fe>4||fe===0?Sg.ceil(oe):Sg(oe),oe=dh.offset(oe,(ee.V-1)*7),ee.y=oe.getFullYear(),ee.m=oe.getMonth(),ee.d=oe.getDate()+(ee.w+6)%7)}else("W"in ee||"U"in ee)&&("w"in ee||(ee.w="u"in ee?ee.u%7:"W"in ee?1:0),fe="Z"in ee?K_(Nd(ee.y,0,1)).getUTCDay():V_(Nd(ee.y,0,1)).getDay(),ee.m=0,ee.d="W"in ee?(ee.w+6)%7+ee.W*7-(fe+5)%7:ee.w+ee.U*7-(fe+6)%7);return"Z"in ee?(ee.H+=ee.Z/100|0,ee.M+=ee.Z%100,K_(ee)):V_(ee)}}function I(Z,se,ce,ee){for(var ae=0,oe=se.length,fe=ce.length,Ce,Te;ae<oe;){if(ee>=fe)return-1;if(Ce=se.charCodeAt(ae++),Ce===37){if(Ce=se.charAt(ae++),Te=T[Ce in Lq?se.charAt(ae++):Ce],!Te||(ee=Te(Z,ce,ee))<0)return-1}else if(Ce!=ce.charCodeAt(ee++))return-1}return ee}function P(Z,se,ce){var ee=d.exec(se.slice(ce));return ee?(Z.p=h.get(ee[0].toLowerCase()),ce+ee[0].length):-1}function D(Z,se,ce){var ee=v.exec(se.slice(ce));return ee?(Z.w=b.get(ee[0].toLowerCase()),ce+ee[0].length):-1}function q(Z,se,ce){var ee=m.exec(se.slice(ce));return ee?(Z.w=g.get(ee[0].toLowerCase()),ce+ee[0].length):-1}function z(Z,se,ce){var ee=j.exec(se.slice(ce));return ee?(Z.m=_.get(ee[0].toLowerCase()),ce+ee[0].length):-1}function F(Z,se,ce){var ee=w.exec(se.slice(ce));return ee?(Z.m=S.get(ee[0].toLowerCase()),ce+ee[0].length):-1}function R(Z,se,ce){return I(Z,t,se,ce)}function M(Z,se,ce){return I(Z,n,se,ce)}function L(Z,se,ce){return I(Z,r,se,ce)}function G(Z){return s[Z.getDay()]}function W(Z){return i[Z.getDay()]}function Y(Z){return c[Z.getMonth()]}function B(Z){return l[Z.getMonth()]}function H(Z){return a[+(Z.getHours()>=12)]}function K(Z){return 1+~~(Z.getMonth()/3)}function U(Z){return s[Z.getUTCDay()]}function X(Z){return i[Z.getUTCDay()]}function J(Z){return c[Z.getUTCMonth()]}function Q(Z){return l[Z.getUTCMonth()]}function re(Z){return a[+(Z.getUTCHours()>=12)]}function ue(Z){return 1+~~(Z.getUTCMonth()/3)}return{format:function(Z){var se=A(Z+="",k);return se.toString=function(){return Z},se},parse:function(Z){var se=O(Z+="",!1);return se.toString=function(){return Z},se},utcFormat:function(Z){var se=A(Z+="",E);return se.toString=function(){return Z},se},utcParse:function(Z){var se=O(Z+="",!0);return se.toString=function(){return Z},se}}}var Lq={"-":"",_:" ",0:"0"},Qn=/^\s*\d+/,kCe=/^%/,_Ce=/[\\^$*+?|[\]().{}]/g;function Dt(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",i=a.length;return r+(i<n?new Array(n-i+1).join(t)+a:a)}function CCe(e){return e.replace(_Ce,"\\$&")}function Ed(e){return new RegExp("^(?:"+e.map(CCe).join("|")+")","i")}function Ad(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function NCe(e,t,n){var r=Qn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function ECe(e,t,n){var r=Qn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function ACe(e,t,n){var r=Qn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function TCe(e,t,n){var r=Qn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function OCe(e,t,n){var r=Qn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function zq(e,t,n){var r=Qn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function $q(e,t,n){var r=Qn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function MCe(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function PCe(e,t,n){var r=Qn.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function DCe(e,t,n){var r=Qn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function qq(e,t,n){var r=Qn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function RCe(e,t,n){var r=Qn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Bq(e,t,n){var r=Qn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function ICe(e,t,n){var r=Qn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function LCe(e,t,n){var r=Qn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function zCe(e,t,n){var r=Qn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function $Ce(e,t,n){var r=Qn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function qCe(e,t,n){var r=kCe.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function BCe(e,t,n){var r=Qn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function FCe(e,t,n){var r=Qn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Fq(e,t){return Dt(e.getDate(),t,2)}function HCe(e,t){return Dt(e.getHours(),t,2)}function UCe(e,t){return Dt(e.getHours()%12||12,t,2)}function GCe(e,t){return Dt(1+dh.count(is(e),e),t,3)}function oK(e,t){return Dt(e.getMilliseconds(),t,3)}function VCe(e,t){return oK(e,t)+"000"}function KCe(e,t){return Dt(e.getMonth()+1,t,2)}function WCe(e,t){return Dt(e.getMinutes(),t,2)}function YCe(e,t){return Dt(e.getSeconds(),t,2)}function XCe(e){var t=e.getDay();return t===0?7:t}function ZCe(e,t){return Dt(ry.count(is(e)-1,e),t,2)}function lK(e){var t=e.getDay();return t>=4||t===0?Ju(e):Ju.ceil(e)}function QCe(e,t){return e=lK(e),Dt(Ju.count(is(e),e)+(is(e).getDay()===4),t,2)}function JCe(e){return e.getDay()}function e2e(e,t){return Dt(Sg.count(is(e)-1,e),t,2)}function t2e(e,t){return Dt(e.getFullYear()%100,t,2)}function n2e(e,t){return e=lK(e),Dt(e.getFullYear()%100,t,2)}function r2e(e,t){return Dt(e.getFullYear()%1e4,t,4)}function a2e(e,t){var n=e.getDay();return e=n>=4||n===0?Ju(e):Ju.ceil(e),Dt(e.getFullYear()%1e4,t,4)}function i2e(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Dt(t/60|0,"0",2)+Dt(t%60,"0",2)}function Hq(e,t){return Dt(e.getUTCDate(),t,2)}function s2e(e,t){return Dt(e.getUTCHours(),t,2)}function o2e(e,t){return Dt(e.getUTCHours()%12||12,t,2)}function l2e(e,t){return Dt(1+ny.count(ss(e),e),t,3)}function uK(e,t){return Dt(e.getUTCMilliseconds(),t,3)}function u2e(e,t){return uK(e,t)+"000"}function c2e(e,t){return Dt(e.getUTCMonth()+1,t,2)}function d2e(e,t){return Dt(e.getUTCMinutes(),t,2)}function f2e(e,t){return Dt(e.getUTCSeconds(),t,2)}function h2e(e){var t=e.getUTCDay();return t===0?7:t}function m2e(e,t){return Dt(ay.count(ss(e)-1,e),t,2)}function cK(e){var t=e.getUTCDay();return t>=4||t===0?ec(e):ec.ceil(e)}function p2e(e,t){return e=cK(e),Dt(ec.count(ss(e),e)+(ss(e).getUTCDay()===4),t,2)}function g2e(e){return e.getUTCDay()}function v2e(e,t){return Dt(jg.count(ss(e)-1,e),t,2)}function y2e(e,t){return Dt(e.getUTCFullYear()%100,t,2)}function x2e(e,t){return e=cK(e),Dt(e.getUTCFullYear()%100,t,2)}function b2e(e,t){return Dt(e.getUTCFullYear()%1e4,t,4)}function w2e(e,t){var n=e.getUTCDay();return e=n>=4||n===0?ec(e):ec.ceil(e),Dt(e.getUTCFullYear()%1e4,t,4)}function S2e(){return"+0000"}function Uq(){return"%"}function Gq(e){return+e}function Vq(e){return Math.floor(+e/1e3)}var wu,dK,fK;j2e({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function j2e(e){return wu=jCe(e),dK=wu.format,wu.parse,fK=wu.utcFormat,wu.utcParse,wu}function k2e(e){return new Date(e)}function _2e(e){return e instanceof Date?+e:+new Date(+e)}function ZE(e,t,n,r,a,i,s,l,c,d){var h=LE(),m=h.invert,g=h.domain,v=d(".%L"),b=d(":%S"),w=d("%I:%M"),S=d("%I %p"),j=d("%a %d"),_=d("%b %d"),k=d("%B"),E=d("%Y");function T(A){return(c(A)<A?v:l(A)<A?b:s(A)<A?w:i(A)<A?S:r(A)<A?a(A)<A?j:_:n(A)<A?k:E)(A)}return h.invert=function(A){return new Date(m(A))},h.domain=function(A){return arguments.length?g(Array.from(A,_2e)):g().map(k2e)},h.ticks=function(A){var O=g();return e(O[0],O[O.length-1],A??10)},h.tickFormat=function(A,O){return O==null?T:d(O)},h.nice=function(A){var O=g();return(!A||typeof A.range!="function")&&(A=t(O[0],O[O.length-1],A??10)),A?g(QV(O,A)):h},h.copy=function(){return ch(h,ZE(e,t,n,r,a,i,s,l,c,d))},h}function C2e(){return wa.apply(ZE(wCe,SCe,is,YE,ry,dh,KE,GE,Xo,dK).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function N2e(){return wa.apply(ZE(xCe,bCe,ss,XE,ay,ny,WE,VE,Xo,fK).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function iy(){var e=0,t=1,n,r,a,i,s=yr,l=!1,c;function d(m){return m==null||isNaN(m=+m)?c:s(a===0?.5:(m=(i(m)-n)*a,l?Math.max(0,Math.min(1,m)):m))}d.domain=function(m){return arguments.length?([e,t]=m,n=i(e=+e),r=i(t=+t),a=n===r?0:1/(r-n),d):[e,t]},d.clamp=function(m){return arguments.length?(l=!!m,d):l},d.interpolator=function(m){return arguments.length?(s=m,d):s};function h(m){return function(g){var v,b;return arguments.length?([v,b]=g,s=m(v,b),d):[s(0),s(1)]}}return d.range=h(Yi),d.rangeRound=h(SN),d.unknown=function(m){return arguments.length?(c=m,d):c},function(m){return i=m,n=m(e),r=m(t),a=n===r?0:1/(r-n),d}}function fo(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function hK(){var e=co(iy()(yr));return e.copy=function(){return fo(e,hK())},ms.apply(e,arguments)}function mK(){var e=qE(iy()).domain([1,10]);return e.copy=function(){return fo(e,mK()).base(e.base())},ms.apply(e,arguments)}function pK(){var e=BE(iy());return e.copy=function(){return fo(e,pK()).constant(e.constant())},ms.apply(e,arguments)}function QE(){var e=FE(iy());return e.copy=function(){return fo(e,QE()).exponent(e.exponent())},ms.apply(e,arguments)}function E2e(){return QE.apply(null,arguments).exponent(.5)}function gK(){var e=[],t=yr;function n(r){if(r!=null&&!isNaN(r=+r))return t((uh(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let a of r)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(eo),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,a)=>t(a/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(a,i)=>L_e(e,i/r))},n.copy=function(){return gK(t).domain(e)},ms.apply(n,arguments)}function sy(){var e=0,t=.5,n=1,r=1,a,i,s,l,c,d=yr,h,m=!1,g;function v(w){return isNaN(w=+w)?g:(w=.5+((w=+h(w))-i)*(r*w<r*i?l:c),d(m?Math.max(0,Math.min(1,w)):w))}v.domain=function(w){return arguments.length?([e,t,n]=w,a=h(e=+e),i=h(t=+t),s=h(n=+n),l=a===i?0:.5/(i-a),c=i===s?0:.5/(s-i),r=i<a?-1:1,v):[e,t,n]},v.clamp=function(w){return arguments.length?(m=!!w,v):m},v.interpolator=function(w){return arguments.length?(d=w,v):d};function b(w){return function(S){var j,_,k;return arguments.length?([j,_,k]=S,d=bfe(w,[j,_,k]),v):[d(0),d(.5),d(1)]}}return v.range=b(Yi),v.rangeRound=b(SN),v.unknown=function(w){return arguments.length?(g=w,v):g},function(w){return h=w,a=w(e),i=w(t),s=w(n),l=a===i?0:.5/(i-a),c=i===s?0:.5/(s-i),r=i<a?-1:1,v}}function vK(){var e=co(sy()(yr));return e.copy=function(){return fo(e,vK())},ms.apply(e,arguments)}function yK(){var e=qE(sy()).domain([.1,1,10]);return e.copy=function(){return fo(e,yK()).base(e.base())},ms.apply(e,arguments)}function xK(){var e=BE(sy());return e.copy=function(){return fo(e,xK()).constant(e.constant())},ms.apply(e,arguments)}function JE(){var e=FE(sy());return e.copy=function(){return fo(e,JE()).exponent(e.exponent())},ms.apply(e,arguments)}function A2e(){return JE.apply(null,arguments).exponent(.5)}const bK=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:IE,scaleDiverging:vK,scaleDivergingLog:yK,scaleDivergingPow:JE,scaleDivergingSqrt:A2e,scaleDivergingSymlog:xK,scaleIdentity:ZV,scaleImplicit:x2,scaleLinear:XV,scaleLog:JV,scaleOrdinal:RE,scalePoint:q_e,scalePow:HE,scaleQuantile:nK,scaleQuantize:rK,scaleRadial:tK,scaleSequential:hK,scaleSequentialLog:mK,scaleSequentialPow:QE,scaleSequentialQuantile:gK,scaleSequentialSqrt:E2e,scaleSequentialSymlog:pK,scaleSqrt:uCe,scaleSymlog:eK,scaleThreshold:aK,scaleTime:C2e,scaleUtc:N2e,tickFormat:YV},Symbol.toStringTag,{value:"Module"}));function T2e(e){var t=bK;if(e in t&&typeof t[e]=="function")return t[e]();var n="scale".concat(Yf(e));if(n in t&&typeof t[n]=="function")return t[n]()}function Kq(e,t,n){if(typeof e=="function")return e.copy().domain(t).range(n);if(e!=null){var r=T2e(e);if(r!=null)return r.domain(t).range(n),r}}function eA(e,t,n,r){if(!(n==null||r==null))return typeof e.scale=="function"?Kq(e.scale,n,r):Kq(t,n,r)}function O2e(e){return"scale".concat(Yf(e))}function M2e(e){return O2e(e)in bK}var wK=(e,t,n)=>{if(e!=null){var{scale:r,type:a}=e;if(r==="auto")return a==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!t)?"point":a==="category"?"band":"linear";if(typeof r=="string")return M2e(r)?r:"point"}};function P2e(e,t){for(var n=0,r=e.length,a=e[0]<e[e.length-1];n<r;){var i=Math.floor((n+r)/2);(a?e[i]<t:e[i]>t)?n=i+1:r=i}return n}function SK(e,t){if(e){var n=t??e.domain(),r=n.map(i=>{var s;return(s=e(i))!==null&&s!==void 0?s:0}),a=e.range();if(!(n.length===0||a.length<2))return i=>{var s,l,c=P2e(r,i);if(c<=0)return n[0];if(c>=n.length)return n[n.length-1];var d=(s=r[c-1])!==null&&s!==void 0?s:0,h=(l=r[c])!==null&&l!==void 0?l:0;return Math.abs(i-d)<=Math.abs(i-h)?n[c-1]:n[c]}}}function D2e(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):SK(e,void 0)}function Wq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function kg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Wq(Object(n),!0).forEach(function(r){R2e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wq(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function R2e(e,t,n){return(t=I2e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I2e(e){var t=L2e(e,"string");return typeof t=="symbol"?t:t+""}function L2e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var w2=[0,"auto"],zn={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0,niceTicks:"auto"},jK=(e,t)=>e.cartesianAxis.xAxis[t],ps=(e,t)=>{var n=jK(e,t);return n??zn},$n={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:w2,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,niceTicks:"auto",width:Qf},kK=(e,t)=>e.cartesianAxis.yAxis[t],gs=(e,t)=>{var n=kK(e,t);return n??$n},z2e={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},tA=(e,t)=>{var n=e.cartesianAxis.zAxis[t];return n??z2e},Sn=(e,t,n)=>{switch(t){case"xAxis":return ps(e,n);case"yAxis":return gs(e,n);case"zAxis":return tA(e,n);case"angleAxis":return AE(e,n);case"radiusAxis":return TE(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},$2e=(e,t,n)=>{switch(t){case"xAxis":return ps(e,n);case"yAxis":return gs(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},xc=(e,t,n)=>{switch(t){case"xAxis":return ps(e,n);case"yAxis":return gs(e,n);case"angleAxis":return AE(e,n);case"radiusAxis":return TE(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},_K=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function nA(e,t){return n=>{switch(e){case"xAxis":return"xAxisId"in n&&n.xAxisId===t;case"yAxis":return"yAxisId"in n&&n.yAxisId===t;case"zAxis":return"zAxisId"in n&&n.zAxisId===t;case"angleAxis":return"angleAxisId"in n&&n.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in n&&n.radiusAxisId===t;default:return!1}}}var oy=e=>e.graphicalItems.cartesianItems,q2e=he([pn,lh],nA),rA=(e,t,n)=>e.filter(n).filter(r=>(t==null?void 0:t.includeHidden)===!0?!0:!r.hide),bc=he([oy,Sn,q2e],rA,{memoizeOptions:{resultEqualityCheck:ey}}),CK=he([bc],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(Qv)),NK=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),B2e=he([bc],NK),aA=e=>e.map(t=>t.data).filter(Boolean).flat(1),F2e=he([bc],e=>e.some(t=>!t.data)),EK=he([bc],aA,{memoizeOptions:{resultEqualityCheck:ey}}),iA=(e,t)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:a}=t;return e.length>0?e:n.slice(r,a+1)},sA=he([EK,sh],iA),AK=(e,t,n)=>(t==null?void 0:t.dataKey)!=null?e.map(r=>({value:$t(r,t.dataKey)})):n.length>0?n.map(r=>r.dataKey).flatMap(r=>e.map(a=>({value:$t(a,r)}))):e.map(r=>({value:r})),TK=(e,t,n,r,a,i)=>{var{chartData:s=[],dataStartIndex:l,dataEndIndex:c}=r,d=AK(e,t,n);if(a&&(t==null?void 0:t.dataKey)!=null&&i.length>0){var h=s.slice(l,c+1),m=h.map(g=>({value:$t(g,t.dataKey)})).filter(g=>g.value!=null);return[...m,...d]}return d},fh=he([sA,Sn,bc,sh,F2e,EK],TK);function Lu(e){if(hi(e)||e instanceof Date){var t=Number(e);if(Nt(t))return t}}function Yq(e){if(Array.isArray(e)){var t=[Lu(e[0]),Lu(e[1])];return ci(t)?t:void 0}var n=Lu(e);if(n!=null)return[n,n]}function gi(e){return e.map(Lu).filter(Tr)}function H2e(e,t){var n=Lu(e),r=Lu(t);return n==null&&r==null?0:n==null?-1:r==null?1:n-r}var U2e=he([fh],e=>e==null?void 0:e.map(t=>t.value).sort(H2e));function OK(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function G2e(e,t,n){if(!n)return[];if(!n.length)return[];var r;if(typeof t=="number"&&!fi(t))r=t;else if(Array.isArray(t)){var a=gi(t);a.length>0&&(r=Math.max(...a))}return r==null?[]:gi(n.flatMap(i=>{var s=$t(e,i.dataKey),l,c;if(Array.isArray(s)?[l,c]=s:l=c=s,!(!Nt(l)||!Nt(c)))return[r-l,r+c]}))}var Un=e=>{var t=Zn(e),n=yc(e);return xc(e,t,n)},tc=he([Un],e=>e==null?void 0:e.dataKey),V2e=he([CK,sh,Un],FV),MK=(e,t,n,r)=>{var a={},i=t.reduce((s,l)=>{if(l.stackId==null)return s;var c=s[l.stackId];return c==null&&(c=[]),c.push(l),s[l.stackId]=c,s},a);return Object.fromEntries(Object.entries(i).map(s=>{var[l,c]=s,d=r?[...c].reverse():c,h=d.map(ME);return[l,{stackedData:SSe(e,h,n),graphicalItems:d}]}))},S2=he([V2e,CK,oh,RV],MK),PK=(e,t,n,r)=>{var{dataStartIndex:a,dataEndIndex:i}=t;if(r==null&&n!=="zAxis"){var s=NSe(e,a,i);if(!(s!=null&&s[0]===0&&s[1]===0))return s}},K2e=he([Sn],e=>e.allowDataOverflow),oA=e=>{var t;if(e==null||!("domain"in e))return w2;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var n=gi(e.ticks);return[Math.min(...n),Math.max(...n)]}if(e.type==="category")return e.ticks.map(String)}return(t=e==null?void 0:e.domain)!==null&&t!==void 0?t:w2},lA=he([Sn],oA),uA=he([lA,K2e],SV),W2e=he([S2,Ha,pn,uA],PK,{memoizeOptions:{resultEqualityCheck:Jv}}),ly=e=>e.errorBars,Y2e=(e,t,n)=>e.flatMap(r=>t[r.id]).filter(Boolean).filter(r=>OK(n,r)),_g=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var a=n.filter(Boolean);if(a.length!==0){var i=a.flat(),s=Math.min(...i),l=Math.max(...i);return[s,l]}},cA=function(t,n,r,a,i){var s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],l,c;if(r.length>0&&r.forEach(d=>{var h,m=d.data!=null?[...d.data]:s,g=(h=a[d.id])===null||h===void 0?void 0:h.filter(v=>OK(i,v));m.forEach(v=>{var b,w=$t(v,(b=n.dataKey)!==null&&b!==void 0?b:d.dataKey),S=G2e(v,w,g);if(S.length>=2){var j=Math.min(...S),_=Math.max(...S);(l==null||j<l)&&(l=j),(c==null||_>c)&&(c=_)}var k=Yq(w);k!=null&&(l=l==null?k[0]:Math.min(l,k[0]),c=c==null?k[1]:Math.max(c,k[1]))})}),(n==null?void 0:n.dataKey)!=null&&r.length===0&&t.forEach(d=>{var h=Yq($t(d,n.dataKey));h!=null&&(l=l==null?h[0]:Math.min(l,h[0]),c=c==null?h[1]:Math.max(c,h[1]))}),Nt(l)&&Nt(c))return[l,c]},X2e=he([sA,Sn,B2e,ly,pn,u_e],cA,{memoizeOptions:{resultEqualityCheck:Jv}});function Z2e(e){var{value:t}=e;if(hi(t)||t instanceof Date)return t}var Q2e=(e,t,n)=>{var r=e.map(Z2e).filter(a=>a!=null);return n&&(t.dataKey==null||t.allowDuplicatedCategory&&K7(r))?wV(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))},DK=e=>e.referenceElements.dots,wc=(e,t,n)=>e.filter(r=>r.ifOverflow==="extendDomain").filter(r=>t==="xAxis"?r.xAxisId===n:r.yAxisId===n),J2e=he([DK,pn,lh],wc),RK=e=>e.referenceElements.areas,eNe=he([RK,pn,lh],wc),IK=e=>e.referenceElements.lines,tNe=he([IK,pn,lh],wc),LK=(e,t)=>{if(e!=null){var n=gi(e.map(r=>t==="xAxis"?r.x:r.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},nNe=he(J2e,pn,LK),zK=(e,t)=>{if(e!=null){var n=gi(e.flatMap(r=>[t==="xAxis"?r.x1:r.y1,t==="xAxis"?r.x2:r.y2]));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},rNe=he([eNe,pn],zK);function aNe(e){var t;if(e.x!=null)return gi([e.x]);var n=(t=e.segment)===null||t===void 0?void 0:t.map(r=>r.x);return n==null||n.length===0?[]:gi(n)}function iNe(e){var t;if(e.y!=null)return gi([e.y]);var n=(t=e.segment)===null||t===void 0?void 0:t.map(r=>r.y);return n==null||n.length===0?[]:gi(n)}var $K=(e,t)=>{if(e!=null){var n=e.flatMap(r=>t==="xAxis"?aNe(r):iNe(r));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},sNe=he([tNe,pn],$K),oNe=he(nNe,sNe,rNe,(e,t,n)=>_g(e,n,t)),dA=(e,t,n,r,a,i,s,l)=>{if(n!=null)return n;var c=s==="vertical"&&l==="xAxis"||s==="horizontal"&&l==="yAxis",d=c?_g(r,i,a):_g(i,a);return f_e(t,d,e.allowDataOverflow)},lNe=he([Sn,lA,uA,W2e,X2e,oNe,Rt,pn],dA,{memoizeOptions:{resultEqualityCheck:Jv}}),uNe=[0,1],fA=(e,t,n,r,a,i,s)=>{if(!((e==null||n==null||n.length===0)&&s===void 0)){var{dataKey:l,type:c}=e,d=ds(t,i);if(d&&l==null){var h;return wV(0,(h=n==null?void 0:n.length)!==null&&h!==void 0?h:0)}return c==="category"?Q2e(r,e,d):a==="expand"&&!d?uNe:s}},hA=he([Sn,Rt,sA,fh,oh,pn,lNe],fA),ho=he([Sn,_K,CE],wK),mA=(e,t,n)=>{var{niceTicks:r}=t;if(r!=="none"){var a=oA(t),i=Array.isArray(a)&&(a[0]==="auto"||a[1]==="auto");if((r==="snap125"||r==="adaptive")&&t!=null&&t.tickCount&&ci(e)){if(i)return mq(e,t.tickCount,t.allowDecimals,r);if(t.type==="number")return pq(e,t.tickCount,t.allowDecimals,r)}if(r==="auto"&&n==="linear"&&t!=null&&t.tickCount){if(i&&ci(e))return mq(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&ci(e))return pq(e,t.tickCount,t.allowDecimals,"adaptive")}}},pA=he([hA,xc,ho],mA),gA=(e,t,n,r)=>{if(r!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&ci(t)&&Array.isArray(n)&&n.length>0){var a,i,s=t[0],l=(a=n[0])!==null&&a!==void 0?a:0,c=t[1],d=(i=n[n.length-1])!==null&&i!==void 0?i:0;return[Math.min(s,l),Math.max(c,d)]}return t},cNe=he([Sn,hA,pA,pn],gA),dNe=he(fh,Sn,(e,t)=>{if(!(!t||t.type!=="number")){var n=1/0,r=Array.from(gi(e.map(m=>m.value))).sort((m,g)=>m-g),a=r[0],i=r[r.length-1];if(a==null||i==null)return 1/0;var s=i-a;if(s===0)return 1/0;for(var l=0;l<r.length-1;l++){var c=r[l],d=r[l+1];if(!(c==null||d==null)){var h=d-c;n=Math.min(n,h)}}return n/s}}),qK=he(dNe,Rt,DV,Fn,(e,t,n,r,a)=>a,(e,t,n,r,a)=>{if(!Nt(e))return 0;var i=t==="vertical"?r.height:r.width;if(a==="gap")return e*i/2;if(a==="no-gap"){var s=dr(n,e*i),l=e*i/2;return l-s-(l-s)/i*s}return 0}),fNe=(e,t,n)=>{var r=ps(e,t);return r==null||typeof r.padding!="string"?0:qK(e,"xAxis",t,n,r.padding)},hNe=(e,t,n)=>{var r=gs(e,t);return r==null||typeof r.padding!="string"?0:qK(e,"yAxis",t,n,r.padding)},mNe=he(ps,fNe,(e,t)=>{var n,r;if(e==null)return{left:0,right:0};var{padding:a}=e;return typeof a=="string"?{left:t,right:t}:{left:((n=a.left)!==null&&n!==void 0?n:0)+t,right:((r=a.right)!==null&&r!==void 0?r:0)+t}}),pNe=he(gs,hNe,(e,t)=>{var n,r;if(e==null)return{top:0,bottom:0};var{padding:a}=e;return typeof a=="string"?{top:t,bottom:t}:{top:((n=a.top)!==null&&n!==void 0?n:0)+t,bottom:((r=a.bottom)!==null&&r!==void 0?r:0)+t}}),gNe=he([Fn,mNe,Uv,Hv,(e,t,n)=>n],(e,t,n,r,a)=>{var{padding:i}=r;return a?[i.left,n.width-i.right]:[e.left+t.left,e.left+e.width-t.right]}),vNe=he([Fn,Rt,pNe,Uv,Hv,(e,t,n)=>n],(e,t,n,r,a,i)=>{var{padding:s}=a;return i?[r.height-s.bottom,s.top]:t==="horizontal"?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),hh=(e,t,n,r)=>{var a;switch(t){case"xAxis":return gNe(e,n,r);case"yAxis":return vNe(e,n,r);case"zAxis":return(a=tA(e,n))===null||a===void 0?void 0:a.range;case"angleAxis":return $V(e);case"radiusAxis":return qV(e,n);default:return}},BK=he([Sn,hh],Yv),yNe=he([ho,cNe],HV),vA=he([Sn,ho,yNe,BK],eA),FK=(e,t,n,r)=>{if(!(n==null||n.dataKey==null)){var{type:a,scale:i}=n,s=ds(e,r);if(s&&(a==="number"||i!=="auto"))return t.map(l=>l.value)}},yA=he([Rt,fh,xc,pn],FK),uy=he([vA],PE);he([vA],D2e);he([vA,U2e],SK);he([bc,ly,pn],Y2e);function HK(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var cy=(e,t)=>t,dy=(e,t,n)=>n,xNe=he(Bv,cy,dy,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(HK)),bNe=he(Fv,cy,dy,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(HK)),UK=(e,t)=>({width:e.width,height:t.height}),wNe=(e,t)=>{var n=typeof t.width=="number"?t.width:Qf;return{width:n,height:e.height}},GK=he(Fn,ps,UK),SNe=(e,t,n)=>{switch(t){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}},jNe=(e,t,n)=>{switch(t){case"left":return e.left;case"right":return n-e.right;default:return 0}},kNe=he(hs,Fn,xNe,cy,dy,(e,t,n,r,a)=>{var i={},s;return n.forEach(l=>{var c=UK(t,l);s==null&&(s=SNe(t,r,e));var d=r==="top"&&!a||r==="bottom"&&a;i[l.id]=s-Number(d)*c.height,s+=(d?-1:1)*c.height}),i}),_Ne=he(fs,Fn,bNe,cy,dy,(e,t,n,r,a)=>{var i={},s;return n.forEach(l=>{var c=wNe(t,l);s==null&&(s=jNe(t,r,e));var d=r==="left"&&!a||r==="right"&&a;i[l.id]=s-Number(d)*c.width,s+=(d?-1:1)*c.width}),i}),CNe=(e,t)=>{var n=ps(e,t);if(n!=null)return kNe(e,n.orientation,n.mirror)},NNe=he([Fn,ps,CNe,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var a=n==null?void 0:n[r];return a==null?{x:e.left,y:0}:{x:e.left,y:a}}}),ENe=(e,t)=>{var n=gs(e,t);if(n!=null)return _Ne(e,n.orientation,n.mirror)},ANe=he([Fn,gs,ENe,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var a=n==null?void 0:n[r];return a==null?{x:0,y:e.top}:{x:a,y:e.top}}}),VK=he(Fn,gs,(e,t)=>{var n=typeof t.width=="number"?t.width:Qf;return{width:n,height:e.height}}),Xq=(e,t,n)=>{switch(t){case"xAxis":return GK(e,n).width;case"yAxis":return VK(e,n).height;default:return}},KK=(e,t,n,r)=>{if(n!=null){var{allowDuplicatedCategory:a,type:i,dataKey:s}=n,l=ds(e,r),c=t.map(h=>h.value),d=c.filter(h=>h!=null);if(s&&l&&i==="category"&&a&&K7(d))return c}},xA=he([Rt,fh,Sn,pn],KK),Zq=he([Rt,$2e,ho,uy,xA,yA,hh,pA,pn],(e,t,n,r,a,i,s,l,c)=>{if(t!=null){var d=ds(e,c);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:c,categoricalDomain:i,duplicateDomain:a,isCategorical:d,niceTicks:l,range:s,realScaleType:n,scale:r}}}),TNe=(e,t,n,r,a,i,s,l,c)=>{if(!(t==null||r==null)){var d=ds(e,c),{type:h,ticks:m,tickCount:g}=t,v=n==="scaleBand"&&typeof r.bandwidth=="function"?r.bandwidth()/2:2,b=h==="category"&&r.bandwidth?r.bandwidth()/v:0;b=c==="angleAxis"&&i!=null&&i.length>=2?Yn(i[0]-i[1])*2*b:b;var w=m||a;return w?w.map((S,j)=>{var _=s?s.indexOf(S):S,k=r.map(_);return Nt(k)?{index:j,coordinate:k+b,value:S,offset:b}:null}).filter(Tr):d&&l?l.map((S,j)=>{var _=r.map(S);return Nt(_)?{coordinate:_+b,value:S,index:j,offset:b}:null}).filter(Tr):r.ticks?r.ticks(g).map((S,j)=>{var _=r.map(S);return Nt(_)?{coordinate:_+b,value:S,index:j,offset:b}:null}).filter(Tr):r.domain().map((S,j)=>{var _=r.map(S);return Nt(_)?{coordinate:_+b,value:s?s[S]:S,index:j,offset:b}:null}).filter(Tr)}},WK=he([Rt,xc,ho,uy,pA,hh,xA,yA,pn],TNe),ONe=(e,t,n,r,a,i,s)=>{if(!(t==null||n==null||r==null||r[0]===r[1])){var l=ds(e,s),{tickCount:c}=t,d=0;return d=s==="angleAxis"&&(r==null?void 0:r.length)>=2?Yn(r[0]-r[1])*2*d:d,l&&i?i.map((h,m)=>{var g=n.map(h);return Nt(g)?{coordinate:g+d,value:h,index:m,offset:d}:null}).filter(Tr):n.ticks?n.ticks(c).map((h,m)=>{var g=n.map(h);return Nt(g)?{coordinate:g+d,value:h,index:m,offset:d}:null}).filter(Tr):n.domain().map((h,m)=>{var g=n.map(h);return Nt(g)?{coordinate:g+d,value:a?a[h]:h,index:m,offset:d}:null}).filter(Tr)}},no=he([Rt,xc,uy,hh,xA,yA,pn],ONe),ro=he(Sn,uy,(e,t)=>{if(!(e==null||t==null))return kg(kg({},e),{},{scale:t})}),MNe=he([Sn,ho,hA,BK],eA),PNe=he([MNe],PE);he((e,t,n)=>tA(e,n),PNe,(e,t)=>{if(!(e==null||t==null))return kg(kg({},e),{},{scale:t})});var DNe=he([Rt,Bv,Fv],(e,t,n)=>{switch(e){case"horizontal":return t.some(r=>r.reversed)?"right-to-left":"left-to-right";case"vertical":return n.some(r=>r.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),RNe=(e,t,n)=>{var r;return(r=e.renderedTicks[t])===null||r===void 0?void 0:r[n]};he([RNe],e=>{if(!(!e||e.length===0))return t=>{var n,r=1/0,a=e[0];for(var i of e){var s=Math.abs(i.coordinate-t);s<r&&(r=s,a=i)}return(n=a)===null||n===void 0?void 0:n.value}});var YK=e=>e.options.defaultTooltipEventType,XK=e=>e.options.validateTooltipEventTypes;function ZK(e,t,n){if(e==null)return t;var r=e?"axis":"item";return n==null?t:n.includes(r)?r:t}function mh(e,t){var n=YK(e),r=XK(e);return ZK(t,n,r)}function INe(e){return Ke(t=>mh(t,e))}var QK=(e,t)=>{var n,r=Number(t);if(!(fi(r)||t==null))return r>=0?e==null||(n=e[r])===null||n===void 0?void 0:n.value:void 0},LNe=e=>e.tooltip.settings,Qs={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},zNe={itemInteraction:{click:Qs,hover:Qs},axisInteraction:{click:Qs,hover:Qs},keyboardInteraction:Qs,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},JK=hr({name:"tooltip",initialState:zNe,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:nn()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:n,next:r}=t.payload,a=pa(e).tooltipItemPayloads.indexOf(n);a>-1&&(e.tooltipItemPayloads[a]=r)},prepare:nn()},removeTooltipEntrySettings:{reducer(e,t){var n=pa(e).tooltipItemPayloads.indexOf(t.payload);n>-1&&e.tooltipItemPayloads.splice(n,1)},prepare:nn()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),{addTooltipEntrySettings:$Ne,replaceTooltipEntrySettings:qNe,removeTooltipEntrySettings:BNe,setTooltipSettingsState:FNe,setActiveMouseOverItemIndex:eW,mouseLeaveItem:HNe,mouseLeaveChart:tW,setActiveClickItemIndex:UNe,setMouseOverAxisIndex:nW,setMouseClickAxisIndex:GNe,setSyncInteraction:Bd,setKeyboardInteraction:Cg}=JK.actions,VNe=JK.reducer;function Qq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function rp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Qq(Object(n),!0).forEach(function(r){KNe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qq(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function KNe(e,t,n){return(t=WNe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WNe(e){var t=YNe(e,"string");return typeof t=="symbol"?t:t+""}function YNe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function XNe(e,t,n){return t==="axis"?n==="click"?e.axisInteraction.click:e.axisInteraction.hover:n==="click"?e.itemInteraction.click:e.itemInteraction.hover}function ZNe(e){return e.index!=null}var rW=(e,t,n,r)=>{if(t==null)return Qs;var a=XNe(e,t,n);if(a==null)return Qs;if(a.active)return a;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var i=e.settings.active===!0;if(ZNe(a)){if(i)return rp(rp({},a),{},{active:!0})}else if(r!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:r,graphicalItemId:void 0};return rp(rp({},Qs),{},{coordinate:a.coordinate})};function QNe(e){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var n=Number(e);return Number.isFinite(n)?n:void 0}function JNe(e,t){var n=QNe(e),r=t[0],a=t[1];if(n===void 0)return!1;var i=Math.min(r,a),s=Math.max(r,a);return n>=i&&n<=s}function eEe(e,t,n){if(n==null||t==null)return!0;var r=$t(e,t);return r==null||!ci(n)?!0:JNe(r,n)}var Yd=(e,t,n,r)=>{var a=e==null?void 0:e.index;if(a==null)return null;var i=Number(a);if(!Nt(i))return a;var s=0,l=1/0;t.length>0&&(l=t.length-1);var c=Math.max(s,Math.min(i,l)),d=t[c];return d==null||eEe(d,n,r)?String(c):null},aW=(e,t,n,r,a,i,s)=>{if(i!=null){var l=s[0],c=l==null?void 0:l.getPosition(i);if(c!=null)return c;var d=a==null?void 0:a[Number(i)];if(d)switch(n){case"horizontal":return{x:d.coordinate,y:(r.top+t)/2};default:return{x:(r.left+e)/2,y:d.coordinate}}}},iW=(e,t,n,r)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var a;if(n==="hover"?a=e.itemInteraction.hover.graphicalItemId:a=e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&a==null)return e.tooltipItemPayloads;if(a==null&&(r!=null||e.keyboardInteraction.active)){var i=e.tooltipItemPayloads[0];return i!=null?[i]:[]}return e.tooltipItemPayloads.filter(s=>{var l;return((l=s.settings)===null||l===void 0?void 0:l.graphicalItemId)===a})},sW=e=>e.options.tooltipPayloadSearcher,Sc=e=>e.tooltip;function Jq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function eB(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Jq(Object(n),!0).forEach(function(r){tEe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jq(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tEe(e,t,n){return(t=nEe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nEe(e){var t=rEe(e,"string");return typeof t=="symbol"?t:t+""}function rEe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function aEe(e){if(typeof e=="string"||typeof e=="number")return e}function iEe(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function sEe(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e=="function")return t=>e(t)}function tB(e){if(typeof e=="string")return e}function oEe(e){if(!(e==null||typeof e!="object")){var t="name"in e?aEe(e.name):void 0,n="unit"in e?iEe(e.unit):void 0,r="dataKey"in e?sEe(e.dataKey):void 0,a="payload"in e?e.payload:void 0,i="color"in e?tB(e.color):void 0,s="fill"in e?tB(e.fill):void 0;return{name:t,unit:n,dataKey:r,payload:a,color:i,fill:s}}}function lEe(e,t){return e??t}var oW=(e,t,n,r,a,i,s)=>{if(!(t==null||i==null)){var{chartData:l,computedData:c,dataStartIndex:d,dataEndIndex:h}=n,m=[];return e.reduce((g,v)=>{var b,{dataDefinedOnItem:w,settings:S}=v,j=lEe(w,l),_=Array.isArray(j)?qG(j,d,h):j,k=(b=S==null?void 0:S.dataKey)!==null&&b!==void 0?b:r,E=S==null?void 0:S.nameKey,T;if(r&&Array.isArray(_)&&!Array.isArray(_[0])&&s==="axis"?T=W7(_,r,a):T=i(_,t,c,E),Array.isArray(T))T.forEach(O=>{var I,P,D=oEe(O),q=D==null?void 0:D.name,z=D==null?void 0:D.dataKey,F=D==null?void 0:D.payload,R=eB(eB({},S),{},{name:q,unit:D==null?void 0:D.unit,color:(I=D==null?void 0:D.color)!==null&&I!==void 0?I:S==null?void 0:S.color,fill:(P=D==null?void 0:D.fill)!==null&&P!==void 0?P:S==null?void 0:S.fill});g.push(a$({tooltipEntrySettings:R,dataKey:z,payload:F,value:$t(F,z),name:q==null?void 0:String(q)}))});else{var A;g.push(a$({tooltipEntrySettings:S,dataKey:k,payload:T,value:$t(T,k),name:(A=$t(T,E))!==null&&A!==void 0?A:S==null?void 0:S.name}))}return g},m)}},bA=he([Un,_K,CE],wK),uEe=he([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),cEe=he([Zn,yc],nA),Al=he([uEe,Un,cEe],rA,{memoizeOptions:{resultEqualityCheck:ey}}),dEe=he([Al],e=>e.filter(Qv)),lW=he([Al],aA,{memoizeOptions:{resultEqualityCheck:ey}}),fEe=he([Al],e=>e.some(t=>!t.data)),pl=he([lW,Ha],iA),hEe=he([dEe,Ha,Un],FV),wA=he([pl,Un,Al,Ha,fEe,lW],TK),uW=he([Un],oA),mEe=he([Un],e=>e.allowDataOverflow),cW=he([uW,mEe],SV),pEe=he([Al],e=>e.filter(Qv)),gEe=he([hEe,pEe,oh,RV],MK),vEe=he([gEe,Ha,Zn,cW],PK),yEe=he([Al],NK),xEe=he([pl,Un,yEe,ly,Zn,d_e],cA,{memoizeOptions:{resultEqualityCheck:Jv}}),bEe=he([DK,Zn,yc],wc),wEe=he([bEe,Zn],LK),SEe=he([RK,Zn,yc],wc),jEe=he([SEe,Zn],zK),kEe=he([IK,Zn,yc],wc),_Ee=he([kEe,Zn],$K),CEe=he([wEe,_Ee,jEe],_g),NEe=he([Un,uW,cW,vEe,xEe,CEe,Rt,Zn],dA),nc=he([Un,Rt,pl,wA,oh,Zn,NEe],fA),EEe=he([nc,Un,bA],mA),AEe=he([Un,nc,EEe,Zn],gA),dW=e=>{var t=Zn(e),n=yc(e),r=!1;return hh(e,t,n,r)},fW=he([Un,dW],Yv),TEe=he([Un,bA,AEe,fW],eA),hW=he([TEe],PE),OEe=he([Rt,wA,Un,Zn],KK),MEe=he([Rt,wA,Un,Zn],FK),PEe=(e,t,n,r,a,i,s,l)=>{if(t){var{type:c}=t,d=ds(e,l);if(r){var h=n==="scaleBand"&&r.bandwidth?r.bandwidth()/2:2,m=c==="category"&&r.bandwidth?r.bandwidth()/h:0;return m=l==="angleAxis"&&a!=null&&(a==null?void 0:a.length)>=2?Yn(a[0]-a[1])*2*m:m,d&&s?s.map((g,v)=>{var b=r.map(g);return Nt(b)?{coordinate:b+m,value:g,index:v,offset:m}:null}).filter(Tr):r.domain().map((g,v)=>{var b=r.map(g);return Nt(b)?{coordinate:b+m,value:i?i[g]:g,index:v,offset:m}:null}).filter(Tr)}}},vs=he([Rt,Un,bA,hW,dW,OEe,MEe,Zn],PEe),SA=he([YK,XK,LNe],(e,t,n)=>ZK(n.shared,e,t)),mW=e=>e.tooltip.settings.trigger,jA=e=>e.tooltip.settings.defaultIndex,ph=he([Sc,SA,mW,jA],rW),ao=he([ph,pl,tc,nc],Yd),pW=he([vs,ao],QK),kA=he([ph],e=>{if(e)return e.dataKey}),gW=he([ph],e=>{if(e)return e.graphicalItemId}),vW=he([Sc,SA,mW,jA],iW),DEe=he([fs,hs,Rt,Fn,vs,jA,vW],aW),REe=he([ph,DEe],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),IEe=he([ph],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),LEe=he([vW,ao,Ha,tc,pW,sW,SA],oW),zEe=he([LEe],e=>{if(e!=null){var t=e.map(n=>n.payload).filter(n=>n!=null);return Array.from(new Set(t))}});function nB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function rB(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nB(Object(n),!0).forEach(function(r){$Ee(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $Ee(e,t,n){return(t=qEe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qEe(e){var t=BEe(e,"string");return typeof t=="symbol"?t:t+""}function BEe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var FEe=()=>Ke(Un),HEe=()=>{var e=FEe(),t=Ke(vs),n=Ke(hW);return Xu(!e||!n?void 0:rB(rB({},e),{},{scale:n}),t)};function aB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Su(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?aB(Object(n),!0).forEach(function(r){UEe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function UEe(e,t,n){return(t=GEe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GEe(e){var t=VEe(e,"string");return typeof t=="symbol"?t:t+""}function VEe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var KEe=(e,t,n,r)=>{var a=t.find(i=>i&&i.index===n);if(a){if(e==="horizontal")return{x:a.coordinate,y:r.relativeY};if(e==="vertical")return{x:r.relativeX,y:a.coordinate}}return{x:0,y:0}},WEe=(e,t,n,r)=>{var a=t.find(d=>d&&d.index===n);if(a){if(e==="centric"){var i=a.coordinate,{radius:s}=r;return Su(Su(Su({},r),Mn(r.cx,r.cy,s,i)),{},{angle:i,radius:s})}var l=a.coordinate,{angle:c}=r;return Su(Su(Su({},r),Mn(r.cx,r.cy,l,c)),{},{angle:c,radius:l})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function YEe(e,t){var{relativeX:n,relativeY:r}=e;return n>=t.left&&n<=t.left+t.width&&r>=t.top&&r<=t.top+t.height}var yW=(e,t,n,r,a)=>{var i,s=(i=t==null?void 0:t.length)!==null&&i!==void 0?i:0;if(s<=1||e==null)return 0;if(r==="angleAxis"&&a!=null&&Math.abs(Math.abs(a[1]-a[0])-360)<=1e-6)for(var l=0;l<s;l++){var c,d,h,m,g,v=l>0?(c=n[l-1])===null||c===void 0?void 0:c.coordinate:(d=n[s-1])===null||d===void 0?void 0:d.coordinate,b=(h=n[l])===null||h===void 0?void 0:h.coordinate,w=l>=s-1?(m=n[0])===null||m===void 0?void 0:m.coordinate:(g=n[l+1])===null||g===void 0?void 0:g.coordinate,S=void 0;if(!(v==null||b==null||w==null))if(Yn(b-v)!==Yn(w-b)){var j=[];if(Yn(w-b)===Yn(a[1]-a[0])){S=w;var _=b+a[1]-a[0];j[0]=Math.min(_,(_+v)/2),j[1]=Math.max(_,(_+v)/2)}else{S=v;var k=w+a[1]-a[0];j[0]=Math.min(b,(k+b)/2),j[1]=Math.max(b,(k+b)/2)}var E=[Math.min(b,(S+b)/2),Math.max(b,(S+b)/2)];if(e>E[0]&&e<=E[1]||e>=j[0]&&e<=j[1]){var T;return(T=n[l])===null||T===void 0?void 0:T.index}}else{var A=Math.min(v,w),O=Math.max(v,w);if(e>(A+b)/2&&e<=(O+b)/2){var I;return(I=n[l])===null||I===void 0?void 0:I.index}}}else if(t)for(var P=0;P<s;P++){var D=t[P];if(D!=null){var q=t[P+1],z=t[P-1];if(P===0&&q!=null&&e<=(D.coordinate+q.coordinate)/2||P===s-1&&z!=null&&e>(D.coordinate+z.coordinate)/2||P>0&&P<s-1&&z!=null&&q!=null&&e>(D.coordinate+z.coordinate)/2&&e<=(D.coordinate+q.coordinate)/2)return D.index}}return-1},XEe=()=>Ke(CE),_A=(e,t)=>t,xW=(e,t,n)=>n,CA=(e,t,n,r)=>r,ZEe=he(vs,e=>Ov(e,t=>t.coordinate)),NA=he([Sc,_A,xW,CA],rW),EA=he([NA,pl,tc,nc],Yd),QEe=(e,t,n)=>{if(t!=null){var r=Sc(e);return t==="axis"?n==="hover"?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:n==="hover"?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}},bW=he([Sc,_A,xW,CA],iW),Ng=he([fs,hs,Rt,Fn,vs,CA,bW],aW),JEe=he([NA,Ng],(e,t)=>{var n;return(n=e.coordinate)!==null&&n!==void 0?n:t}),wW=he([vs,EA],QK),eAe=he([bW,EA,Ha,tc,wW,sW,_A],oW),tAe=he([NA,EA],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),nAe=(e,t,n,r,a,i,s)=>{if(!(!e||!n||!r||!a)&&YEe(e,s)){var l=ESe(e,t),c=yW(l,i,a,n,r),d=KEe(t,a,c,e);return{activeIndex:String(c),activeCoordinate:d}}},rAe=(e,t,n,r,a,i,s)=>{if(!(!e||!r||!a||!i||!n)){var l=Qke(e,n);if(l){var c=ASe(l,t),d=yW(c,s,i,r,a),h=WEe(t,i,d,l);return{activeIndex:String(d),activeCoordinate:h}}}},aAe=(e,t,n,r,a,i,s,l)=>{if(!(!e||!t||!r||!a||!i))return t==="horizontal"||t==="vertical"?nAe(e,t,r,a,i,s,l):rAe(e,t,n,r,a,i,s)},iAe=he(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,n)=>n,(e,t,n)=>{if(t!=null){var r=e[t];if(r!=null)return n?r.panoramaElement:r.element}}),sAe=he(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(r=>parseInt(r,10)).concat(Object.values(Pn)),n=Array.from(new Set(t));return n.sort((r,a)=>r-a)},{memoizeOptions:{resultEqualityCheck:__e}});function iB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function sB(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iB(Object(n),!0).forEach(function(r){oAe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function oAe(e,t,n){return(t=lAe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lAe(e){var t=uAe(e,"string");return typeof t=="symbol"?t:t+""}function uAe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var cAe={},dAe={zIndexMap:Object.values(Pn).reduce((e,t)=>sB(sB({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),cAe)},fAe=new Set(Object.values(Pn));function hAe(e){return fAe.has(e)}var SW=hr({name:"zIndex",initialState:dAe,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]?e.zIndexMap[n].consumers+=1:e.zIndexMap[n]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:nn()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(e.zIndexMap[n].consumers-=1,e.zIndexMap[n].consumers<=0&&!hAe(n)&&delete e.zIndexMap[n])},prepare:nn()},registerZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:n,element:r,isPanorama:a}=t.payload;e.zIndexMap[n]?a?e.zIndexMap[n].panoramaElement=r:e.zIndexMap[n].element=r:e.zIndexMap[n]={consumers:0,element:a?void 0:r,panoramaElement:a?r:void 0}},prepare:nn()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(t.payload.isPanorama?e.zIndexMap[n].panoramaElement=void 0:e.zIndexMap[n].element=void 0)},prepare:nn()}}}),{registerZIndexPortal:mAe,unregisterZIndexPortal:W_,registerZIndexPortalElement:pAe,unregisterZIndexPortalElement:gAe}=SW.actions,vAe=SW.reducer;function Pr(e){var{zIndex:t,children:n}=e,r=ije(),a=r&&t!==void 0&&t!==0,i=mr(),s=x.useRef(void 0),l=x.useRef(new Set),c=Jt(),d=Ke(m=>iAe(m,t,i));if(x.useLayoutEffect(()=>{if(!a){var m=l.current;m.forEach(v=>{c(W_({zIndex:v}))}),m.clear(),s.current=void 0;return}if(l.current.has(t)||(c(mAe({zIndex:t})),l.current.add(t)),d){s.current=d;var g=l.current;g.forEach(v=>{v!==t&&(c(W_({zIndex:v})),g.delete(v))})}},[c,t,a,d]),x.useLayoutEffect(()=>{var m=l.current;return()=>{m.forEach(g=>{c(W_({zIndex:g}))}),m.clear()}},[c]),!a)return n;var h=d??s.current;return h?vl.createPortal(n,h):null}function j2(){return j2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},j2.apply(null,arguments)}function oB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ap(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oB(Object(n),!0).forEach(function(r){yAe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yAe(e,t,n){return(t=xAe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xAe(e){var t=bAe(e,"string");return typeof t=="symbol"?t:t+""}function bAe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wAe(e){var{cursor:t,cursorComp:n,cursorProps:r}=e;return x.isValidElement(t)?x.cloneElement(t,r):x.createElement(n,r)}function SAe(e){var t,{coordinate:n,payload:r,index:a,offset:i,tooltipAxisBandSize:s,layout:l,cursor:c,tooltipEventType:d,chartName:h}=e,m=n,g=r,v=a;if(!c||!m||h!=="ScatterChart"&&d!=="axis")return null;var b,w,S;if(h==="ScatterChart")b=m,w=hke,S=Pn.cursorLine;else if(h==="BarChart")b=mke(l,m,i,s),w=gV,S=Pn.cursorRectangle;else if(l==="radial"&&Z7(m)){var{cx:j,cy:_,radius:k,startAngle:E,endAngle:T}=yV(m);b={cx:j,cy:_,startAngle:E,endAngle:T,innerRadius:k,outerRadius:k},w=bV,S=Pn.cursorLine}else b={points:n_e(l,m,i)},w=SE,S=Pn.cursorLine;var A=typeof c=="object"&&"className"in c?c.className:void 0,O=ap(ap(ap(ap({stroke:"#ccc",pointerEvents:"none"},i),b),ol(c)),{},{payload:g,payloadIndex:v,className:zt("recharts-tooltip-cursor",A)});return x.createElement(Pr,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:S},x.createElement(wAe,{cursor:c,cursorComp:w,cursorProps:O}))}function jAe(e){var t=HEe(),n=YG(),r=Cl(),a=XEe();return t==null||n==null||r==null||a==null?null:x.createElement(SAe,j2({},e,{offset:n,layout:r,tooltipAxisBandSize:t,chartName:a}))}var jW=x.createContext(null),kAe=()=>x.useContext(jW),Y_={exports:{}},lB;function _Ae(){return lB||(lB=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function a(c,d,h){this.fn=c,this.context=d,this.once=h||!1}function i(c,d,h,m,g){if(typeof h!="function")throw new TypeError("The listener must be a function");var v=new a(h,m||c,g),b=n?n+d:d;return c._events[b]?c._events[b].fn?c._events[b]=[c._events[b],v]:c._events[b].push(v):(c._events[b]=v,c._eventsCount++),c}function s(c,d){--c._eventsCount===0?c._events=new r:delete c._events[d]}function l(){this._events=new r,this._eventsCount=0}l.prototype.eventNames=function(){var d=[],h,m;if(this._eventsCount===0)return d;for(m in h=this._events)t.call(h,m)&&d.push(n?m.slice(1):m);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(h)):d},l.prototype.listeners=function(d){var h=n?n+d:d,m=this._events[h];if(!m)return[];if(m.fn)return[m.fn];for(var g=0,v=m.length,b=new Array(v);g<v;g++)b[g]=m[g].fn;return b},l.prototype.listenerCount=function(d){var h=n?n+d:d,m=this._events[h];return m?m.fn?1:m.length:0},l.prototype.emit=function(d,h,m,g,v,b){var w=n?n+d:d;if(!this._events[w])return!1;var S=this._events[w],j=arguments.length,_,k;if(S.fn){switch(S.once&&this.removeListener(d,S.fn,void 0,!0),j){case 1:return S.fn.call(S.context),!0;case 2:return S.fn.call(S.context,h),!0;case 3:return S.fn.call(S.context,h,m),!0;case 4:return S.fn.call(S.context,h,m,g),!0;case 5:return S.fn.call(S.context,h,m,g,v),!0;case 6:return S.fn.call(S.context,h,m,g,v,b),!0}for(k=1,_=new Array(j-1);k<j;k++)_[k-1]=arguments[k];S.fn.apply(S.context,_)}else{var E=S.length,T;for(k=0;k<E;k++)switch(S[k].once&&this.removeListener(d,S[k].fn,void 0,!0),j){case 1:S[k].fn.call(S[k].context);break;case 2:S[k].fn.call(S[k].context,h);break;case 3:S[k].fn.call(S[k].context,h,m);break;case 4:S[k].fn.call(S[k].context,h,m,g);break;default:if(!_)for(T=1,_=new Array(j-1);T<j;T++)_[T-1]=arguments[T];S[k].fn.apply(S[k].context,_)}}return!0},l.prototype.on=function(d,h,m){return i(this,d,h,m,!1)},l.prototype.once=function(d,h,m){return i(this,d,h,m,!0)},l.prototype.removeListener=function(d,h,m,g){var v=n?n+d:d;if(!this._events[v])return this;if(!h)return s(this,v),this;var b=this._events[v];if(b.fn)b.fn===h&&(!g||b.once)&&(!m||b.context===m)&&s(this,v);else{for(var w=0,S=[],j=b.length;w<j;w++)(b[w].fn!==h||g&&!b[w].once||m&&b[w].context!==m)&&S.push(b[w]);S.length?this._events[v]=S.length===1?S[0]:S:s(this,v)}return this},l.prototype.removeAllListeners=function(d){var h;return d?(h=n?n+d:d,this._events[h]&&s(this,h)):(this._events=new r,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=n,l.EventEmitter=l,e.exports=l})(Y_)),Y_.exports}var CAe=_Ae();const NAe=ta(CAe);var Nf=new NAe,k2="recharts.syncEvent.tooltip",uB="recharts.syncEvent.brush",AA=(e,t)=>{if(t&&Array.isArray(e)){var n=Number.parseInt(t,10);if(!fi(n))return e[n]}},EAe={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},kW=hr({name:"options",initialState:EAe,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),AAe=kW.reducer,{createEventEmitter:TAe}=kW.actions;function OAe(e){return e.tooltip.syncInteraction}var MAe={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},_W=hr({name:"chartData",initialState:MAe,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:n,endIndex:r}=t.payload;n!=null&&(e.dataStartIndex=n),r!=null&&(e.dataEndIndex=r)}}}),{setChartData:cB,setDataStartEndIndexes:PAe,setComputedData:$Ie}=_W.actions,DAe=_W.reducer,RAe=["x","y"];function dB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ju(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dB(Object(n),!0).forEach(function(r){IAe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function IAe(e,t,n){return(t=LAe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LAe(e){var t=zAe(e,"string");return typeof t=="symbol"?t:t+""}function zAe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $Ae(e,t){if(e==null)return{};var n,r,a=qAe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function qAe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function BAe(){var e=Ke(NE),t=Ke(EE),n=Jt(),r=Ke(IV),a=Ke(vs),i=Cl(),s=Gv(),l=Ke(c=>c.rootProps.className);x.useEffect(()=>{if(e==null)return _l;var c=(d,h,m)=>{if(t!==m&&e===d){if(h.payload.active===!1){n(Bd({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(r==="index"){var g;if(s&&h!==null&&h!==void 0&&(g=h.payload)!==null&&g!==void 0&&g.coordinate&&h.payload.sourceViewBox){var v=h.payload.coordinate,{x:b,y:w}=v,S=$Ae(v,RAe),{x:j,y:_,width:k,height:E}=h.payload.sourceViewBox,T=ju(ju({},S),{},{x:s.x+(k?(b-j)/k:0)*s.width,y:s.y+(E?(w-_)/E:0)*s.height});n(ju(ju({},h),{},{payload:ju(ju({},h.payload),{},{coordinate:T})}))}else n(h);return}if(a!=null){var A;if(typeof r=="function"){var O={activeTooltipIndex:h.payload.index==null?void 0:Number(h.payload.index),isTooltipActive:h.payload.active,activeIndex:h.payload.index==null?void 0:Number(h.payload.index),activeLabel:h.payload.label,activeDataKey:h.payload.dataKey,activeCoordinate:h.payload.coordinate},I=r(a,O);A=a[I]}else r==="value"&&(A=a.find(L=>String(L.value)===h.payload.label));var{coordinate:P}=h.payload;if(P==null||s==null){n(Bd({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(A==null){n(Bd({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:h.payload.sourceViewBox,graphicalItemId:void 0}));return}var{x:D,y:q}=P,z=Math.min(D,s.x+s.width),F=Math.min(q,s.y+s.height),R={x:i==="horizontal"?A.coordinate:z,y:i==="horizontal"?F:A.coordinate},M=Bd({active:h.payload.active,coordinate:R,dataKey:h.payload.dataKey,index:String(A.index),label:h.payload.label,sourceViewBox:h.payload.sourceViewBox,graphicalItemId:h.payload.graphicalItemId});n(M)}}};return Nf.on(k2,c),()=>{Nf.off(k2,c)}},[l,n,t,e,r,a,i,s])}function FAe(){var e=Ke(NE),t=Ke(EE),n=Jt();x.useEffect(()=>{if(e==null)return _l;var r=(a,i,s)=>{t!==s&&e===a&&n(PAe(i))};return Nf.on(uB,r),()=>{Nf.off(uB,r)}},[n,t,e])}function HAe(){var e=Jt();x.useEffect(()=>{e(TAe())},[e]),BAe(),FAe()}function UAe(e,t,n,r,a,i){var s=Ke(b=>QEe(b,e,t)),l=Ke(gW),c=Ke(EE),d=Ke(NE),h=Ke(IV),m=Ke(OAe),g=(m==null?void 0:m.sourceViewBox)!=null,v=Gv();x.useEffect(()=>{if(!g&&d!=null&&c!=null){var b=Bd({active:i,coordinate:n,dataKey:s,index:a,label:typeof r=="number"?String(r):r,sourceViewBox:v,graphicalItemId:l});Nf.emit(k2,d,b,c)}},[g,n,s,l,a,r,c,d,h,i,v])}function fB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function hB(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fB(Object(n),!0).forEach(function(r){GAe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function GAe(e,t,n){return(t=VAe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VAe(e){var t=KAe(e,"string");return typeof t=="symbol"?t:t+""}function KAe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function WAe(e){return e.dataKey}function YAe(e,t){return x.isValidElement(e)?x.cloneElement(e,t):typeof e=="function"?x.createElement(e,t):x.createElement(Fje,t)}var mB=[],XAe={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function ip(e){var t,n,r=Xn(e,XAe),{active:a,allowEscapeViewBox:i,animationDuration:s,animationEasing:l,content:c,filterNull:d,isAnimationActive:h,offset:m,payloadUniqBy:g,position:v,reverseDirection:b,useTranslate3d:w,wrapperStyle:S,cursor:j,shared:_,trigger:k,defaultIndex:E,portal:T,axisId:A}=r,O=Jt(),I=typeof E=="number"?String(E):E;x.useEffect(()=>{O(FNe({shared:_,trigger:k,axisId:A,active:a,defaultIndex:I}))},[O,_,k,A,a,I]);var P=Gv(),D=dV(),q=INe(_),{activeIndex:z,isActive:F}=(t=Ke(ue=>tAe(ue,q,k,I)))!==null&&t!==void 0?t:{},R=Ke(ue=>eAe(ue,q,k,I)),M=Ke(ue=>wW(ue,q,k,I)),L=Ke(ue=>JEe(ue,q,k,I)),G=R,W=kAe(),Y=(n=a??F)!==null&&n!==void 0?n:!1,[B,H]=hwe([G,Y]),K=q==="axis"?M:void 0;UAe(q,k,L,K,z,Y);var U=T??W;if(U==null||P==null||q==null)return null;var X=G??mB;Y||(X=mB),d&&X.length&&(X=U1e(X.filter(ue=>ue.value!=null&&(ue.hide!==!0||r.includeHidden)),g,WAe));var J=X.length>0,Q=hB(hB({},r),{},{payload:X,label:K,active:Y,activeIndex:z,coordinate:L,accessibilityLayer:D}),re=x.createElement(Jje,{allowEscapeViewBox:i,animationDuration:s,animationEasing:l,isAnimationActive:h,active:Y,coordinate:L,hasPayload:J,offset:m,position:v,reverseDirection:b,useTranslate3d:w,viewBox:P,wrapperStyle:S,lastBoundingBox:B,innerRef:H,hasPortalFromProps:!!T},YAe(c,Q));return x.createElement(x.Fragment,null,vl.createPortal(re,U),Y&&x.createElement(jAe,{cursor:j,tooltipEventType:q,coordinate:L,payload:X,index:z}))}var gh=e=>null;gh.displayName="Cell";function ZAe(e,t,n){return(t=QAe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QAe(e){var t=JAe(e,"string");return typeof t=="symbol"?t:t+""}function JAe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class eTe{constructor(t){ZAe(this,"cache",new Map),this.maxSize=t}get(t){var n=this.cache.get(t);return n!==void 0&&(this.cache.delete(t),this.cache.set(t,n)),n}set(t,n){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var r=this.cache.keys().next().value;r!=null&&this.cache.delete(r)}this.cache.set(t,n)}clear(){this.cache.clear()}size(){return this.cache.size}}function pB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function tTe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pB(Object(n),!0).forEach(function(r){nTe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nTe(e,t,n){return(t=rTe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rTe(e){var t=aTe(e,"string");return typeof t=="symbol"?t:t+""}function aTe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var iTe={cacheSize:2e3,enableCache:!0},CW=tTe({},iTe),gB=new eTe(CW.cacheSize),sTe={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},vB="recharts_measurement_span";function oTe(e,t){var n=t.fontSize||"",r=t.fontFamily||"",a=t.fontWeight||"",i=t.fontStyle||"",s=t.letterSpacing||"",l=t.textTransform||"";return"".concat(e,"|").concat(n,"|").concat(r,"|").concat(a,"|").concat(i,"|").concat(s,"|").concat(l)}var yB=(e,t)=>{try{var n=document.getElementById(vB);n||(n=document.createElement("span"),n.setAttribute("id",vB),n.setAttribute("aria-hidden","true"),document.body.appendChild(n)),Object.assign(n.style,sTe,t),n.textContent="".concat(e);var r=n.getBoundingClientRect();return{width:r.width,height:r.height}}catch{return{width:0,height:0}}},Xd=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||nh.isSsr)return{width:0,height:0};if(!CW.enableCache)return yB(t,n);var r=oTe(t,n),a=gB.get(r);if(a)return a;var i=yB(t,n);return gB.set(r,i),i},NW;function lTe(e,t,n){return(t=uTe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uTe(e){var t=cTe(e,"string");return typeof t=="symbol"?t:t+""}function cTe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xB=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,bB=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,dTe=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,fTe=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,hTe={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},mTe=["cm","mm","pt","pc","in","Q","px"];function pTe(e){return mTe.includes(e)}var Mu="NaN";function gTe(e,t){return e*hTe[t]}class ar{static parse(t){var n,[,r,a]=(n=fTe.exec(t))!==null&&n!==void 0?n:[];return r==null?ar.NaN:new ar(parseFloat(r),a??"")}constructor(t,n){this.num=t,this.unit=n,this.num=t,this.unit=n,fi(t)&&(this.unit=""),n!==""&&!dTe.test(n)&&(this.num=NaN,this.unit=""),pTe(n)&&(this.num=gTe(t,n),this.unit="px")}add(t){return this.unit!==t.unit?new ar(NaN,""):new ar(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new ar(NaN,""):new ar(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new ar(NaN,""):new ar(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new ar(NaN,""):new ar(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return fi(this.num)}}NW=ar;lTe(ar,"NaN",new NW(NaN,""));function EW(e){if(e==null||e.includes(Mu))return Mu;for(var t=e;t.includes("*")||t.includes("/");){var n,[,r,a,i]=(n=xB.exec(t))!==null&&n!==void 0?n:[],s=ar.parse(r??""),l=ar.parse(i??""),c=a==="*"?s.multiply(l):s.divide(l);if(c.isNaN())return Mu;t=t.replace(xB,c.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var d,[,h,m,g]=(d=bB.exec(t))!==null&&d!==void 0?d:[],v=ar.parse(h??""),b=ar.parse(g??""),w=m==="+"?v.add(b):v.subtract(b);if(w.isNaN())return Mu;t=t.replace(bB,w.toString())}return t}var wB=/\(([^()]*)\)/;function vTe(e){for(var t=e,n;(n=wB.exec(t))!=null;){var[,r]=n;t=t.replace(wB,EW(r))}return t}function yTe(e){var t=e.replace(/\s+/g,"");return t=vTe(t),t=EW(t),t}function xTe(e){try{return yTe(e)}catch{return Mu}}function X_(e){var t=xTe(e.slice(5,-1));return t===Mu?"":t}var bTe=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],wTe=["dx","dy","angle","className","breakAll"];function _2(){return _2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_2.apply(null,arguments)}function SB(e,t){if(e==null)return{};var n,r,a=STe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function STe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var AW=/[ \f\n\r\t\v\u2028\u2029]+/,TW=e=>{var{children:t,breakAll:n,style:r}=e;try{var a=[];cn(t)||(n?a=t.toString().split(""):a=t.toString().split(AW));var i=a.map(l=>({word:l,width:Xd(l,r).width})),s=n?0:Xd(" ",r).width;return{wordsWithComputedWidth:i,spaceWidth:s}}catch{return null}};function OW(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function jTe(e){return cn(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var MW=(e,t,n,r)=>e.reduce((a,i)=>{var{word:s,width:l}=i,c=a[a.length-1];if(c&&l!=null&&(t==null||r||c.width+l+n<Number(t)))c.words.push(s),c.width+=l+n;else{var d={words:[s],width:l};a.push(d)}return a},[]),PW=e=>e.reduce((t,n)=>t.width>n.width?t:n),kTe="…",jB=(e,t,n,r,a,i,s,l)=>{var c=e.slice(0,t),d=TW({breakAll:n,style:r,children:c+kTe});if(!d)return[!1,[]];var h=MW(d.wordsWithComputedWidth,i,s,l),m=h.length>a||PW(h).width>Number(i);return[m,h]},_Te=(e,t,n,r,a)=>{var{maxLines:i,children:s,style:l,breakAll:c}=e,d=He(i),h=String(s),m=MW(t,r,n,a);if(!d||a)return m;var g=m.length>i||PW(m).width>Number(r);if(!g)return m;for(var v=0,b=h.length-1,w=0,S;v<=b&&w<=h.length-1;){var j=Math.floor((v+b)/2),_=j-1,[k,E]=jB(h,_,c,l,i,r,n,a),[T]=jB(h,j,c,l,i,r,n,a);if(!k&&!T&&(v=j+1),k&&T&&(b=j-1),!k&&T){S=E;break}w++}return S||m},kB=e=>{var t=cn(e)?[]:e.toString().split(AW);return[{words:t,width:void 0}]},CTe=e=>{var{width:t,scaleToFit:n,children:r,style:a,breakAll:i,maxLines:s}=e;if((t||n)&&!nh.isSsr){var l,c,d=TW({breakAll:i,children:r,style:a});if(d){var{wordsWithComputedWidth:h,spaceWidth:m}=d;l=h,c=m}else return kB(r);return _Te({breakAll:i,children:r,maxLines:s,style:a},l,c,t,!!n)}return kB(r)},DW="#808080",NTe={angle:0,breakAll:!1,capHeight:"0.71em",fill:DW,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},fy=x.forwardRef((e,t)=>{var n=Xn(e,NTe),{x:r,y:a,lineHeight:i,capHeight:s,fill:l,scaleToFit:c,textAnchor:d,verticalAnchor:h}=n,m=SB(n,bTe),g=x.useMemo(()=>CTe({breakAll:m.breakAll,children:m.children,maxLines:m.maxLines,scaleToFit:c,style:m.style,width:m.width}),[m.breakAll,m.children,m.maxLines,c,m.style,m.width]),{dx:v,dy:b,angle:w,className:S,breakAll:j}=m,_=SB(m,wTe);if(!hi(r)||!hi(a)||g.length===0)return null;var k=Number(r)+(He(v)?v:0),E=Number(a)+(He(b)?b:0);if(!Nt(k)||!Nt(E))return null;var T;switch(h){case"start":T=X_("calc(".concat(s,")"));break;case"middle":T=X_("calc(".concat((g.length-1)/2," * -").concat(i," + (").concat(s," / 2))"));break;default:T=X_("calc(".concat(g.length-1," * -").concat(i,")"));break}var A=[],O=g[0];if(c&&O!=null){var I=O.width,{width:P}=m;A.push("scale(".concat(He(P)&&He(I)?P/I:1,")"))}return w&&A.push("rotate(".concat(w,", ").concat(k,", ").concat(E,")")),A.length&&(_.transform=A.join(" ")),x.createElement("text",_2({},xr(_),{ref:t,x:k,y:E,className:zt("recharts-text",S),textAnchor:d,fill:l.includes("url")?DW:l}),g.map((D,q)=>{var z=D.words.join(j?"":" ");return x.createElement("tspan",{x:k,dy:q===0?T:i,key:"".concat(z,"-").concat(q)},z)}))});fy.displayName="Text";function _B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ti(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_B(Object(n),!0).forEach(function(r){ETe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_B(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ETe(e,t,n){return(t=ATe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ATe(e){var t=TTe(e,"string");return typeof t=="symbol"?t:t+""}function TTe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var OTe=e=>{var{viewBox:t,position:n,offset:r=0,parentViewBox:a}=e,{x:i,y:s,height:l,upperWidth:c,lowerWidth:d}=xE(t),h=i,m=i+(c-d)/2,g=(h+m)/2,v=(c+d)/2,b=h+c/2,w=l>=0?1:-1,S=w*r,j=w>0?"end":"start",_=w>0?"start":"end",k=c>=0?1:-1,E=k*r,T=k>0?"end":"start",A=k>0?"start":"end",O=a;if(n==="top"){var I={x:h+c/2,y:s-S,horizontalAnchor:"middle",verticalAnchor:j};return O&&(I.height=Math.max(s-O.y,0),I.width=c),I}if(n==="bottom"){var P={x:m+d/2,y:s+l+S,horizontalAnchor:"middle",verticalAnchor:_};return O&&(P.height=Math.max(O.y+O.height-(s+l),0),P.width=d),P}if(n==="left"){var D={x:g-E,y:s+l/2,horizontalAnchor:T,verticalAnchor:"middle"};return O&&(D.width=Math.max(D.x-O.x,0),D.height=l),D}if(n==="right"){var q={x:g+v+E,y:s+l/2,horizontalAnchor:A,verticalAnchor:"middle"};return O&&(q.width=Math.max(O.x+O.width-q.x,0),q.height=l),q}var z=O?{width:v,height:l}:{};return n==="insideLeft"?ti({x:g+E,y:s+l/2,horizontalAnchor:A,verticalAnchor:"middle"},z):n==="insideRight"?ti({x:g+v-E,y:s+l/2,horizontalAnchor:T,verticalAnchor:"middle"},z):n==="insideTop"?ti({x:h+c/2,y:s+S,horizontalAnchor:"middle",verticalAnchor:_},z):n==="insideBottom"?ti({x:m+d/2,y:s+l-S,horizontalAnchor:"middle",verticalAnchor:j},z):n==="insideTopLeft"?ti({x:h+E,y:s+S,horizontalAnchor:A,verticalAnchor:_},z):n==="insideTopRight"?ti({x:h+c-E,y:s+S,horizontalAnchor:T,verticalAnchor:_},z):n==="insideBottomLeft"?ti({x:m+E,y:s+l-S,horizontalAnchor:A,verticalAnchor:j},z):n==="insideBottomRight"?ti({x:m+d-E,y:s+l-S,horizontalAnchor:T,verticalAnchor:j},z):n&&typeof n=="object"&&(He(n.x)||cl(n.x))&&(He(n.y)||cl(n.y))?ti({x:i+dr(n.x,v),y:s+dr(n.y,l),horizontalAnchor:"end",verticalAnchor:"end"},z):ti({x:b,y:s+l/2,horizontalAnchor:"middle",verticalAnchor:"middle"},z)},MTe=["labelRef"],PTe=["content"];function CB(e,t){if(e==null)return{};var n,r,a=DTe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function DTe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function NB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Fd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?NB(Object(n),!0).forEach(function(r){RTe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function RTe(e,t,n){return(t=ITe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ITe(e){var t=LTe(e,"string");return typeof t=="symbol"?t:t+""}function LTe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ui(){return Ui=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ui.apply(null,arguments)}var RW=x.createContext(null),zTe=e=>{var{x:t,y:n,upperWidth:r,lowerWidth:a,width:i,height:s,children:l}=e,c=x.useMemo(()=>({x:t,y:n,upperWidth:r,lowerWidth:a,width:i,height:s}),[t,n,r,a,i,s]);return x.createElement(RW.Provider,{value:c},l)},IW=()=>{var e=x.useContext(RW),t=Gv();return e||(t?xE(t):void 0)},$Te=x.createContext(null),qTe=()=>{var e=x.useContext($Te),t=Ke(BV);return e||t},BTe=e=>{var{value:t,formatter:n}=e,r=cn(e.children)?t:e.children;return typeof n=="function"?n(r):r},TA=e=>e!=null&&typeof e=="function",FTe=(e,t)=>{var n=Yn(t-e),r=Math.min(Math.abs(t-e),360);return n*r},HTe=(e,t,n,r,a)=>{var{offset:i,className:s}=e,{cx:l,cy:c,innerRadius:d,outerRadius:h,startAngle:m,endAngle:g,clockWise:v}=a,b=(d+h)/2,w=FTe(m,g),S=w>=0?1:-1,j,_;switch(t){case"insideStart":j=m+S*i,_=v;break;case"insideEnd":j=g-S*i,_=!v;break;case"end":j=g+S*i,_=v;break;default:throw new Error("Unsupported position ".concat(t))}_=w<=0?_:!_;var k=Mn(l,c,b,j),E=Mn(l,c,b,j+(_?1:-1)*359),T="M".concat(k.x,",").concat(k.y,`
|
|
549
|
+
A`).concat(b,",").concat(b,",0,1,").concat(_?0:1,`,
|
|
550
|
+
`).concat(E.x,",").concat(E.y),A=cn(e.id)?vf("recharts-radial-line-"):e.id;return x.createElement("text",Ui({},r,{dominantBaseline:"central",className:zt("recharts-radial-bar-label",s)}),x.createElement("defs",null,x.createElement("path",{id:A,d:T})),x.createElement("textPath",{xlinkHref:"#".concat(A)},n))},UTe=(e,t,n)=>{var{cx:r,cy:a,innerRadius:i,outerRadius:s,startAngle:l,endAngle:c}=e,d=(l+c)/2;if(n==="outside"){var{x:h,y:m}=Mn(r,a,s+t,d);return{x:h,y:m,textAnchor:h>=r?"start":"end",verticalAnchor:"middle"}}if(n==="center")return{x:r,y:a,textAnchor:"middle",verticalAnchor:"middle"};if(n==="centerTop")return{x:r,y:a,textAnchor:"middle",verticalAnchor:"start"};if(n==="centerBottom")return{x:r,y:a,textAnchor:"middle",verticalAnchor:"end"};var g=(i+s)/2,{x:v,y:b}=Mn(r,a,g,d);return{x:v,y:b,textAnchor:"middle",verticalAnchor:"middle"}},jp=e=>e!=null&&"cx"in e&&He(e.cx),GTe={angle:0,offset:5,zIndex:Pn.label,position:"middle",textBreakAll:!1};function VTe(e){if(!jp(e))return e;var{cx:t,cy:n,outerRadius:r}=e,a=r*2;return{x:t-r,y:n-r,width:a,upperWidth:a,lowerWidth:a,height:a}}function Xs(e){var t=Xn(e,GTe),{viewBox:n,parentViewBox:r,position:a,value:i,children:s,content:l,className:c="",textBreakAll:d,labelRef:h}=t,m=qTe(),g=IW(),v=a==="center"?g:m??g,b,w,S;n==null?b=v:jp(n)?b=n:b=xE(n);var j=VTe(b);if(!b||cn(i)&&cn(s)&&!x.isValidElement(l)&&typeof l!="function")return null;var _=Fd(Fd({},t),{},{viewBox:b});if(x.isValidElement(l)){var{labelRef:k}=_,E=CB(_,MTe);return x.cloneElement(l,E)}if(typeof l=="function"){var{content:T}=_,A=CB(_,PTe);if(w=x.createElement(l,A),x.isValidElement(w))return w}else w=BTe(t);var O=xr(t);if(jp(b)){if(a==="insideStart"||a==="insideEnd"||a==="end")return HTe(t,a,w,O,b);S=UTe(b,t.offset,t.position)}else{if(!j)return null;var I=OTe({viewBox:j,position:a,offset:t.offset,parentViewBox:jp(r)?void 0:r});S=Fd(Fd({x:I.x,y:I.y,textAnchor:I.horizontalAnchor,verticalAnchor:I.verticalAnchor},I.width!==void 0?{width:I.width}:{}),I.height!==void 0?{height:I.height}:{})}return x.createElement(Pr,{zIndex:t.zIndex},x.createElement(fy,Ui({ref:h,className:zt("recharts-label",c)},O,S,{textAnchor:OW(O.textAnchor)?O.textAnchor:S.textAnchor,breakAll:d}),w))}Xs.displayName="Label";var KTe=(e,t,n)=>{if(!e)return null;var r={viewBox:t,labelRef:n};return e===!0?x.createElement(Xs,Ui({key:"label-implicit"},r)):hi(e)?x.createElement(Xs,Ui({key:"label-implicit",value:e},r)):x.isValidElement(e)?e.type===Xs?x.cloneElement(e,Fd({key:"label-implicit"},r)):x.createElement(Xs,Ui({key:"label-implicit",content:e},r)):TA(e)?x.createElement(Xs,Ui({key:"label-implicit",content:e},r)):e&&typeof e=="object"?x.createElement(Xs,Ui({},e,{key:"label-implicit"},r)):null};function WTe(e){var{label:t,labelRef:n}=e,r=IW();return KTe(t,r,n)||null}var YTe=["valueAccessor"],XTe=["dataKey","clockWise","id","textBreakAll","zIndex"];function Eg(){return Eg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Eg.apply(null,arguments)}function EB(e,t){if(e==null)return{};var n,r,a=ZTe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function ZTe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var QTe=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(jTe(t))return t},LW=x.createContext(void 0),zW=LW.Provider,$W=x.createContext(void 0),JTe=$W.Provider;function eOe(){return x.useContext(LW)}function tOe(){return x.useContext($W)}function kp(e){var{valueAccessor:t=QTe}=e,n=EB(e,YTe),{dataKey:r,clockWise:a,id:i,textBreakAll:s,zIndex:l}=n,c=EB(n,XTe),d=eOe(),h=tOe(),m=d||h;return!m||!m.length?null:x.createElement(Pr,{zIndex:l??Pn.label},x.createElement(Bn,{className:"recharts-label-list"},m.map((g,v)=>{var b,w=cn(r)?t(g,v):$t(g.payload,r),S=cn(i)?{}:{id:"".concat(i,"-").concat(v)};return x.createElement(Xs,Eg({key:"label-".concat(v)},xr(g),c,S,{fill:(b=n.fill)!==null&&b!==void 0?b:g.fill,parentViewBox:g.parentViewBox,value:w,textBreakAll:s,viewBox:g.viewBox,index:v,zIndex:0}))})))}kp.displayName="LabelList";function OA(e){var{label:t}=e;return t?t===!0?x.createElement(kp,{key:"labelList-implicit"}):x.isValidElement(t)||TA(t)?x.createElement(kp,{key:"labelList-implicit",content:t}):typeof t=="object"?x.createElement(kp,Eg({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function C2(){return C2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},C2.apply(null,arguments)}var qW=e=>{var{cx:t,cy:n,r,className:a}=e,i=zt("recharts-dot",a);return He(t)&&He(n)&&He(r)?x.createElement("circle",C2({},Qr(e),lE(e),{className:i,cx:t,cy:n,r})):null},BW=e=>e.graphicalItems.polarItems,nOe=he([pn,lh],nA),hy=he([BW,Sn,nOe],rA),rOe=he([hy],aA),my=he([rOe,ih],iA),aOe=he([my,Sn,hy],AK);he([my,Sn,hy],(e,t,n)=>n.length>0?e.flatMap(r=>n.flatMap(a=>{var i,s=$t(r,(i=t.dataKey)!==null&&i!==void 0?i:a.dataKey);return{value:s,errorDomain:[]}})).filter(Boolean):(t==null?void 0:t.dataKey)!=null?e.map(r=>({value:$t(r,t.dataKey),errorDomain:[]})):e.map(r=>({value:r,errorDomain:[]})));var AB=()=>{},iOe=he([my,Sn,hy,ly,pn,c_e],cA),sOe=he([Sn,lA,uA,AB,iOe,AB,Rt,pn],dA),FW=he([Sn,Rt,my,aOe,oh,pn,sOe],fA),oOe=he([FW,xc,ho],mA),lOe=he([Sn,FW,oOe,pn],gA);he([ho,lOe],HV);var uOe={radiusAxis:{},angleAxis:{}},HW=hr({name:"polarAxis",initialState:uOe,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),{addRadiusAxis:qIe,removeRadiusAxis:BIe,addAngleAxis:FIe,removeAngleAxis:HIe}=HW.actions,cOe=HW.reducer;function UW(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}function TB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function OB(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TB(Object(n),!0).forEach(function(r){dOe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dOe(e,t,n){return(t=fOe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fOe(e){var t=hOe(e,"string");return typeof t=="symbol"?t:t+""}function hOe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var mOe=(e,t)=>t,MA=he([BW,mOe],(e,t)=>e.filter(n=>n.type==="pie").find(n=>n.id===t)),pOe=[],PA=(e,t,n)=>(n==null?void 0:n.length)===0?pOe:n,GW=he([ih,MA,PA],(e,t,n)=>{var{chartData:r}=e;if(t!=null){var a;if((t==null?void 0:t.data)!=null&&t.data.length>0?a=t.data:a=r,(!a||!a.length)&&n!=null&&(a=n.map(i=>OB(OB({},t.presentationProps),i.props))),a!=null)return a}}),gOe=he([GW,MA,PA],(e,t,n)=>{if(!(e==null||t==null))return e.map((r,a)=>{var i,s=$t(r,t.nameKey,t.name),l;return n!=null&&(i=n[a])!==null&&i!==void 0&&(i=i.props)!==null&&i!==void 0&&i.fill?l=n[a].props.fill:typeof r=="object"&&r!=null&&"fill"in r?l=r.fill:l=t.fill,{value:pc(s,t.dataKey),color:l,payload:r,type:t.legendType}})}),vOe=he([GW,MA,PA,Fn],(e,t,n,r)=>{if(!(t==null||e==null))return wMe({offset:r,pieSettings:t,displayedData:e,cells:n})}),Z_={exports:{}},Gt={};/** @license React v17.0.2
|
|
551
|
+
* react-is.production.min.js
|
|
552
|
+
*
|
|
553
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
554
|
+
*
|
|
555
|
+
* This source code is licensed under the MIT license found in the
|
|
556
|
+
* LICENSE file in the root directory of this source tree.
|
|
557
|
+
*/var MB;function yOe(){if(MB)return Gt;MB=1;var e=60103,t=60106,n=60107,r=60108,a=60114,i=60109,s=60110,l=60112,c=60113,d=60120,h=60115,m=60116,g=60121,v=60122,b=60117,w=60129,S=60131;if(typeof Symbol=="function"&&Symbol.for){var j=Symbol.for;e=j("react.element"),t=j("react.portal"),n=j("react.fragment"),r=j("react.strict_mode"),a=j("react.profiler"),i=j("react.provider"),s=j("react.context"),l=j("react.forward_ref"),c=j("react.suspense"),d=j("react.suspense_list"),h=j("react.memo"),m=j("react.lazy"),g=j("react.block"),v=j("react.server.block"),b=j("react.fundamental"),w=j("react.debug_trace_mode"),S=j("react.legacy_hidden")}function _(F){if(typeof F=="object"&&F!==null){var R=F.$$typeof;switch(R){case e:switch(F=F.type,F){case n:case a:case r:case c:case d:return F;default:switch(F=F&&F.$$typeof,F){case s:case l:case m:case h:case i:return F;default:return R}}case t:return R}}}var k=i,E=e,T=l,A=n,O=m,I=h,P=t,D=a,q=r,z=c;return Gt.ContextConsumer=s,Gt.ContextProvider=k,Gt.Element=E,Gt.ForwardRef=T,Gt.Fragment=A,Gt.Lazy=O,Gt.Memo=I,Gt.Portal=P,Gt.Profiler=D,Gt.StrictMode=q,Gt.Suspense=z,Gt.isAsyncMode=function(){return!1},Gt.isConcurrentMode=function(){return!1},Gt.isContextConsumer=function(F){return _(F)===s},Gt.isContextProvider=function(F){return _(F)===i},Gt.isElement=function(F){return typeof F=="object"&&F!==null&&F.$$typeof===e},Gt.isForwardRef=function(F){return _(F)===l},Gt.isFragment=function(F){return _(F)===n},Gt.isLazy=function(F){return _(F)===m},Gt.isMemo=function(F){return _(F)===h},Gt.isPortal=function(F){return _(F)===t},Gt.isProfiler=function(F){return _(F)===a},Gt.isStrictMode=function(F){return _(F)===r},Gt.isSuspense=function(F){return _(F)===c},Gt.isValidElementType=function(F){return typeof F=="string"||typeof F=="function"||F===n||F===a||F===w||F===r||F===c||F===d||F===S||typeof F=="object"&&F!==null&&(F.$$typeof===m||F.$$typeof===h||F.$$typeof===i||F.$$typeof===s||F.$$typeof===l||F.$$typeof===b||F.$$typeof===g||F[0]===v)},Gt.typeOf=_,Gt}var PB;function xOe(){return PB||(PB=1,Z_.exports=yOe()),Z_.exports}var bOe=xOe(),DB=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",RB=null,Q_=null,VW=e=>{if(e===RB&&Array.isArray(Q_))return Q_;var t=[];return x.Children.forEach(e,n=>{cn(n)||(bOe.isFragment(n)?t=t.concat(VW(n.props.children)):t.push(n))}),Q_=t,RB=e,t};function DA(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(a=>DB(a)):r=[DB(t)],VW(e).forEach(a=>{var i=ul(a,"type.displayName")||ul(a,"type.name");i&&r.indexOf(i)!==-1&&n.push(a)}),n}var KW=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,J_={},IB;function wOe(){return IB||(IB=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){var a;if(typeof n!="object"||n==null)return!1;if(Object.getPrototypeOf(n)===null)return!0;if(Object.prototype.toString.call(n)!=="[object Object]"){const i=n[Symbol.toStringTag];return i==null||!((a=Object.getOwnPropertyDescriptor(n,Symbol.toStringTag))!=null&&a.writable)?!1:n.toString()===`[object ${i}]`}let r=n;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(n)===r}e.isPlainObject=t})(J_)),J_}var eC,LB;function SOe(){return LB||(LB=1,eC=wOe().isPlainObject),eC}var jOe=SOe();const kOe=ta(jOe);var zB,$B,qB,BB,FB;function HB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function UB(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?HB(Object(n),!0).forEach(function(r){_Oe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _Oe(e,t,n){return(t=COe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function COe(e){var t=NOe(e,"string");return typeof t=="symbol"?t:t+""}function NOe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ag(){return Ag=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ag.apply(null,arguments)}function Td(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var GB=(e,t,n,r,a)=>{var i=n-r,s;return s=wn(zB||(zB=Td(["M ",",",""])),e,t),s+=wn($B||($B=Td(["L ",",",""])),e+n,t),s+=wn(qB||(qB=Td(["L ",",",""])),e+n-i/2,t+a),s+=wn(BB||(BB=Td(["L ",",",""])),e+n-i/2-r,t+a),s+=wn(FB||(FB=Td(["L ",","," Z"])),e,t),s},EOe={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},AOe=e=>{var t=Xn(e,EOe),{x:n,y:r,upperWidth:a,lowerWidth:i,height:s,className:l}=t,{animationEasing:c,animationDuration:d,animationBegin:h,isUpdateAnimationActive:m}=t,g=x.useRef(null),[v,b]=x.useState(-1),w=x.useRef(a),S=x.useRef(i),j=x.useRef(s),_=x.useRef(n),k=x.useRef(r),E=ah(e,"trapezoid-");if(x.useEffect(()=>{if(g.current&&g.current.getTotalLength)try{var R=g.current.getTotalLength();R&&b(R)}catch{}},[]),n!==+n||r!==+r||a!==+a||i!==+i||s!==+s||a===0&&i===0||s===0)return null;var T=zt("recharts-trapezoid",l);if(!m)return x.createElement("g",null,x.createElement("path",Ag({},xr(t),{className:T,d:GB(n,r,a,i,s)})));var A=w.current,O=S.current,I=j.current,P=_.current,D=k.current,q="0px ".concat(v===-1?1:v,"px"),z="".concat(v,"px ").concat(v,"px"),F=fV(["strokeDasharray"],d,c);return x.createElement(rh,{animationId:E,key:E,canBegin:v>0,duration:d,easing:c,isActive:m,begin:h},R=>{var M=sn(A,a,R),L=sn(O,i,R),G=sn(I,s,R),W=sn(P,n,R),Y=sn(D,r,R);g.current&&(w.current=M,S.current=L,j.current=G,_.current=W,k.current=Y);var B=R>0?{transition:F,strokeDasharray:z}:{strokeDasharray:q};return x.createElement("path",Ag({},xr(t),{className:T,d:GB(W,Y,M,L,G),ref:g,style:UB(UB({},B),t.style)}))})},TOe=["option","shapeType","activeClassName","inActiveClassName"];function OOe(e,t){if(e==null)return{};var n,r,a=MOe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function MOe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function VB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Tg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?VB(Object(n),!0).forEach(function(r){POe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function POe(e,t,n){return(t=DOe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DOe(e){var t=ROe(e,"string");return typeof t=="symbol"?t:t+""}function ROe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function IOe(e,t){return Tg(Tg({},t),e)}function LOe(e,t){return e==="symbols"}function KB(e){var{shapeType:t,elementProps:n}=e;switch(t){case"rectangle":return x.createElement(gV,n);case"trapezoid":return x.createElement(AOe,n);case"sector":return x.createElement(bV,n);case"symbols":if(LOe(t))return x.createElement(X7,n);break;case"curve":return x.createElement(SE,n);default:return null}}function zOe(e){return x.isValidElement(e)?e.props:e}function RA(e){var{option:t,shapeType:n,activeClassName:r="recharts-active-shape",inActiveClassName:a="recharts-shape"}=e,i=OOe(e,TOe),s;if(x.isValidElement(t))s=x.cloneElement(t,Tg(Tg({},i),zOe(t)));else if(typeof t=="function")s=t(i,i.index);else if(kOe(t)&&typeof t!="boolean"){var l=IOe(t,i);s=x.createElement(KB,{shapeType:n,elementProps:l})}else{var c=i;s=x.createElement(KB,{shapeType:n,elementProps:c})}return i.isActive?x.createElement(Bn,{className:r},s):x.createElement(Bn,{className:a},s)}var IA=(e,t,n)=>{var r=Jt();return(a,i)=>s=>{e==null||e(a,i,s),r(eW({activeIndex:String(i),activeDataKey:t,activeCoordinate:a.tooltipPosition,activeGraphicalItemId:n}))}},LA=e=>{var t=Jt();return(n,r)=>a=>{e==null||e(n,r,a),t(HNe())}},zA=(e,t,n)=>{var r=Jt();return(a,i)=>s=>{e==null||e(a,i,s),r(UNe({activeIndex:String(i),activeDataKey:t,activeCoordinate:a.tooltipPosition,activeGraphicalItemId:n}))}};function $A(e){var{tooltipEntrySettings:t}=e,n=Jt(),r=mr(),a=x.useRef(null);return x.useLayoutEffect(()=>{r||(a.current===null?n($Ne(t)):a.current!==t&&n(qNe({prev:a.current,next:t})),a.current=t)},[t,n,r]),x.useLayoutEffect(()=>()=>{a.current&&(n(BNe(a.current)),a.current=null)},[n]),null}function WW(e){var{legendPayload:t}=e,n=Jt(),r=mr(),a=x.useRef(null);return x.useLayoutEffect(()=>{r||(a.current===null?n(oV(t)):a.current!==t&&n(lV({prev:a.current,next:t})),a.current=t)},[n,r,t]),x.useLayoutEffect(()=>()=>{a.current&&(n(uV(a.current)),a.current=null)},[n]),null}function $Oe(e){var{legendPayload:t}=e,n=Jt(),r=Ke(Rt),a=x.useRef(null);return x.useLayoutEffect(()=>{r!=="centric"&&r!=="radial"||(a.current===null?n(oV(t)):a.current!==t&&n(lV({prev:a.current,next:t})),a.current=t)},[n,r,t]),x.useLayoutEffect(()=>()=>{a.current&&(n(uV(a.current)),a.current=null)},[n]),null}var tC,qOe=()=>{var[e]=x.useState(()=>vf("uid-"));return e},BOe=(tC=JZ.useId)!==null&&tC!==void 0?tC:qOe;function FOe(e,t){var n=BOe();return t||(e?"".concat(e,"-").concat(n):n)}var HOe=x.createContext(void 0),qA=e=>{var{id:t,type:n,children:r}=e,a=FOe("recharts-".concat(n),t);return x.createElement(HOe.Provider,{value:a},r(a))},UOe={cartesianItems:[],polarItems:[]},YW=hr({name:"graphicalItems",initialState:UOe,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:nn()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,a=pa(e).cartesianItems.indexOf(n);a>-1&&(e.cartesianItems[a]=r)},prepare:nn()},removeCartesianGraphicalItem:{reducer(e,t){var n=pa(e).cartesianItems.indexOf(t.payload);n>-1&&e.cartesianItems.splice(n,1)},prepare:nn()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:nn()},removePolarGraphicalItem:{reducer(e,t){var n=pa(e).polarItems.indexOf(t.payload);n>-1&&e.polarItems.splice(n,1)},prepare:nn()},replacePolarGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,a=pa(e).polarItems.indexOf(n);a>-1&&(e.polarItems[a]=r)},prepare:nn()}}}),{addCartesianGraphicalItem:GOe,replaceCartesianGraphicalItem:VOe,removeCartesianGraphicalItem:KOe,addPolarGraphicalItem:WOe,removePolarGraphicalItem:YOe,replacePolarGraphicalItem:XOe}=YW.actions,ZOe=YW.reducer,QOe=e=>{var t=Jt(),n=x.useRef(null);return x.useLayoutEffect(()=>{n.current===null?t(GOe(e)):n.current!==e&&t(VOe({prev:n.current,next:e})),n.current=e},[t,e]),x.useLayoutEffect(()=>()=>{n.current&&(t(KOe(n.current)),n.current=null)},[t]),null},XW=x.memo(QOe),JOe=e=>{var t=Jt(),n=x.useRef(null);return x.useLayoutEffect(()=>{n.current===null?t(WOe(e)):n.current!==e&&t(XOe({prev:n.current,next:e})),n.current=e},[t,e]),x.useLayoutEffect(()=>()=>{n.current&&(t(YOe(n.current)),n.current=null)},[t]),null},eMe=x.memo(JOe),tMe=["key"],nMe=["onMouseEnter","onClick","onMouseLeave"],rMe=["id"],aMe=["id"];function io(){return io=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},io.apply(null,arguments)}function py(e,t){if(e==null)return{};var n,r,a=iMe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function iMe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function WB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function on(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WB(Object(n),!0).forEach(function(r){sMe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sMe(e,t,n){return(t=oMe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oMe(e){var t=lMe(e,"string");return typeof t=="symbol"?t:t+""}function lMe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function uMe(e){var t=x.useMemo(()=>DA(e.children,gh),[e.children]),n=Ke(r=>gOe(r,e.id,t));return n==null?null:x.createElement($Oe,{legendPayload:n})}function cMe(e){if(!(e==null||typeof e=="boolean"||typeof e=="function")){if(x.isValidElement(e)){var t,n=(t=e.props)===null||t===void 0?void 0:t.fill;return typeof n=="string"?n:void 0}var{fill:r}=e;return typeof r=="string"?r:void 0}}var dMe=x.memo(e=>{var{dataKey:t,nameKey:n,sectors:r,stroke:a,strokeWidth:i,fill:s,name:l,hide:c,tooltipType:d,id:h,activeShape:m}=e,g=cMe(m),v=r.map(w=>{var S=w.tooltipPayload;return g==null||S==null?S:S.map(j=>on(on({},j),{},{color:g,fill:g}))}),b={dataDefinedOnItem:v,getPosition:w=>{var S;return(S=r[Number(w)])===null||S===void 0?void 0:S.tooltipPosition},settings:{stroke:a,strokeWidth:i,fill:s,dataKey:t,nameKey:n,name:pc(l,t),hide:c,type:d,color:s,unit:"",graphicalItemId:h}};return x.createElement($A,{tooltipEntrySettings:b})}),fMe=(e,t)=>e>t?"start":e<t?"end":"middle",hMe=(e,t,n)=>dr(typeof t=="function"?t(e):t,n,n*.8),mMe=(e,t,n)=>{var{top:r,left:a,width:i,height:s}=t,l=vV(i,s),c=a+dr(e.cx,i,i/2),d=r+dr(e.cy,s,s/2),h=dr(e.innerRadius,l,0),m=hMe(n,e.outerRadius,l),g=e.maxRadius||Math.sqrt(i*i+s*s)/2;return{cx:c,cy:d,innerRadius:h,outerRadius:m,maxRadius:g}},pMe=(e,t)=>{var n=Yn(t-e),r=Math.min(Math.abs(t-e),360);return n*r},gMe=(e,t)=>{if(x.isValidElement(e))return x.cloneElement(e,t);if(typeof e=="function")return e(t);var n=zt("recharts-pie-label-line",typeof e!="boolean"?e.className:""),{key:r}=t,a=py(t,tMe);return x.createElement(SE,io({},a,{type:"linear",className:n}))},vMe=(e,t,n)=>{if(x.isValidElement(e))return x.cloneElement(e,t);var r=n;if(typeof e=="function"&&(r=e(t),x.isValidElement(r)))return r;var a=zt("recharts-pie-label-text",UW(e));return x.createElement(fy,io({},t,{alignmentBaseline:"middle",className:a}),r)};function yMe(e){var{sectors:t,props:n,showLabels:r}=e,{label:a,labelLine:i,dataKey:s}=n;if(!r||!a||!t)return null;var l=Qr(n),c=ol(a),d=ol(i),h=typeof a=="object"&&"offsetRadius"in a&&typeof a.offsetRadius=="number"&&a.offsetRadius||20,m=t.map((g,v)=>{var b=(g.startAngle+g.endAngle)/2,w=Mn(g.cx,g.cy,g.outerRadius+h,b),S=on(on(on(on({},l),g),{},{stroke:"none"},c),{},{index:v,textAnchor:fMe(w.x,g.cx)},w),j=on(on(on(on({},l),g),{},{fill:"none",stroke:g.fill},d),{},{index:v,points:[Mn(g.cx,g.cy,g.outerRadius,b),w],key:"line"});return x.createElement(Pr,{zIndex:Pn.label,key:"label-".concat(g.startAngle,"-").concat(g.endAngle,"-").concat(g.midAngle,"-").concat(v)},x.createElement(Bn,null,i&&gMe(i,j),vMe(a,S,$t(g,s))))});return x.createElement(Bn,{className:"recharts-pie-labels"},m)}function xMe(e){var{sectors:t,props:n,showLabels:r}=e,{label:a}=n;return typeof a=="object"&&a!=null&&"position"in a?x.createElement(OA,{label:a}):x.createElement(yMe,{sectors:t,props:n,showLabels:r})}function bMe(e){var{sectors:t,activeShape:n,inactiveShape:r,allOtherPieProps:a,shape:i,id:s}=e,l=Ke(ao),c=Ke(kA),d=Ke(gW),{onMouseEnter:h,onClick:m,onMouseLeave:g}=a,v=py(a,nMe),b=IA(h,a.dataKey,s),w=LA(g),S=zA(m,a.dataKey,s);return t==null||t.length===0?null:x.createElement(x.Fragment,null,t.map((j,_)=>{if((j==null?void 0:j.startAngle)===0&&(j==null?void 0:j.endAngle)===0&&t.length!==1)return null;var k=d==null||d===s,E=String(_)===l&&(c==null||a.dataKey===c)&&k,T=l?r:null,A=n&&E?n:T,O=on(on({},j),{},{stroke:j.stroke,tabIndex:-1,[UG]:_,[GG]:s});return x.createElement(Bn,io({key:"sector-".concat(j==null?void 0:j.startAngle,"-").concat(j==null?void 0:j.endAngle,"-").concat(j.midAngle,"-").concat(_),tabIndex:-1,className:"recharts-pie-sector"},Tv(v,j,_),{onMouseEnter:b(j,_),onMouseLeave:w(j,_),onClick:S(j,_)}),x.createElement(RA,io({option:i??A,index:_,shapeType:"sector",isActive:E},O)))}))}function wMe(e){var t,{pieSettings:n,displayedData:r,cells:a,offset:i}=e,{cornerRadius:s,startAngle:l,endAngle:c,dataKey:d,nameKey:h,tooltipType:m}=n,g=Math.abs(n.minAngle),v=pMe(l,c),b=Math.abs(v),w=r.length<=1?0:(t=n.paddingAngle)!==null&&t!==void 0?t:0,S=r.filter(I=>$t(I,d,0)!==0).length,j=(b>=360?S:S-1)*w,_=r.reduce((I,P)=>{var D=$t(P,d,0);return I+(He(D)?D:0)},0),k=g>0&&_>0&&r.some(I=>{var P=$t(I,d,0),D=(He(P)?P:0)/_;return P!==0&&D*b<g}),E=k?g:0,T=b-S*E-j,A;if(_>0){var O;A=r.map((I,P)=>{var D=$t(I,d,0),q=$t(I,h,P),z=mMe(n,i,I),F=(He(D)?D:0)/_,R,M=on(on({},I),a&&a[P]&&a[P].props),L=M!=null&&"fill"in M&&typeof M.fill=="string"?M.fill:n.fill;P?R=O.endAngle+Yn(v)*w*(D!==0?1:0):R=l;var G=R+Yn(v)*((D!==0?E:0)+F*T),W=(R+G)/2,Y=(z.innerRadius+z.outerRadius)/2,B=[{name:q,value:D,payload:M,dataKey:d,type:m,color:L,fill:L,graphicalItemId:n.id}],H=Mn(z.cx,z.cy,Y,W);return O=on(on(on(on({},n.presentationProps),{},{percent:F,cornerRadius:typeof s=="string"?parseFloat(s):s,name:q,tooltipPayload:B,midAngle:W,middleRadius:Y,tooltipPosition:H},M),z),{},{value:D,dataKey:d,startAngle:R,endAngle:G,payload:M,paddingAngle:D!==0?Yn(v)*w:0}),O})}return A}function SMe(e){var{showLabels:t,sectors:n,children:r}=e,a=x.useMemo(()=>!t||!n?[]:n.map(i=>({value:i.value,payload:i.payload,clockWise:!1,parentViewBox:void 0,viewBox:{cx:i.cx,cy:i.cy,innerRadius:i.innerRadius,outerRadius:i.outerRadius,startAngle:i.startAngle,endAngle:i.endAngle,clockWise:!1},fill:i.fill})),[n,t]);return x.createElement(JTe,{value:t?a:void 0},r)}function jMe(e){var{props:t,previousSectorsRef:n,id:r}=e,{sectors:a,isAnimationActive:i,animationBegin:s,animationDuration:l,animationEasing:c,activeShape:d,inactiveShape:h,onAnimationStart:m,onAnimationEnd:g}=t,v=ah(t,"recharts-pie-"),b=n.current,[w,S]=x.useState(!1),j=x.useCallback(()=>{typeof g=="function"&&g(),S(!1)},[g]),_=x.useCallback(()=>{typeof m=="function"&&m(),S(!0)},[m]);return x.createElement(SMe,{showLabels:!w,sectors:a},x.createElement(rh,{animationId:v,begin:s,duration:l,isActive:i,easing:c,onAnimationStart:_,onAnimationEnd:j,key:v},k=>{var E,T=[],A=a&&a[0],O=(E=A==null?void 0:A.startAngle)!==null&&E!==void 0?E:0;return a==null||a.forEach((I,P)=>{var D=b&&b[P],q=P>0?ul(I,"paddingAngle",0):0;if(D){var z=sn(D.endAngle-D.startAngle,I.endAngle-I.startAngle,k),F=on(on({},I),{},{startAngle:O+q,endAngle:O+z+q});T.push(F),O=F.endAngle}else{var{endAngle:R,startAngle:M}=I,L=sn(0,R-M,k),G=on(on({},I),{},{startAngle:O+q,endAngle:O+L+q});T.push(G),O=G.endAngle}}),n.current=T,x.createElement(Bn,null,x.createElement(bMe,{sectors:T,activeShape:d,inactiveShape:h,allOtherPieProps:t,shape:t.shape,id:r}))}),x.createElement(xMe,{showLabels:!w,sectors:a,props:t}),t.children)}var kMe={animationBegin:400,animationDuration:1500,animationEasing:"ease",cx:"50%",cy:"50%",dataKey:"value",endAngle:360,fill:"#808080",hide:!1,innerRadius:0,isAnimationActive:"auto",label:!1,labelLine:!0,legendType:"rect",minAngle:0,nameKey:"name",outerRadius:"80%",paddingAngle:0,rootTabIndex:0,startAngle:0,stroke:"#fff",zIndex:Pn.area};function _Me(e){var{id:t}=e,n=py(e,rMe),{hide:r,className:a,rootTabIndex:i}=e,s=x.useMemo(()=>DA(e.children,gh),[e.children]),l=Ke(h=>vOe(h,t,s)),c=x.useRef(null),d=zt("recharts-pie",a);return r||l==null?(c.current=null,x.createElement(Bn,{tabIndex:i,className:d})):x.createElement(Pr,{zIndex:e.zIndex},x.createElement(dMe,{dataKey:e.dataKey,nameKey:e.nameKey,sectors:l,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,tooltipType:e.tooltipType,id:t,activeShape:e.activeShape}),x.createElement(Bn,{tabIndex:i,className:d},x.createElement(jMe,{props:on(on({},n),{},{sectors:l}),previousSectorsRef:c,id:t})))}function CMe(e){var t=Xn(e,kMe),{id:n}=t,r=py(t,aMe),a=Qr(r);return x.createElement(qA,{id:n,type:"pie"},i=>x.createElement(x.Fragment,null,x.createElement(eMe,{type:"pie",id:i,data:r.data,dataKey:r.dataKey,hide:r.hide,angleAxisId:0,radiusAxisId:0,name:r.name,nameKey:r.nameKey,tooltipType:r.tooltipType,legendType:r.legendType,fill:r.fill,cx:r.cx,cy:r.cy,startAngle:r.startAngle,endAngle:r.endAngle,paddingAngle:r.paddingAngle,minAngle:r.minAngle,innerRadius:r.innerRadius,outerRadius:r.outerRadius,cornerRadius:r.cornerRadius,presentationProps:a,maxRadius:t.maxRadius}),x.createElement(uMe,io({},r,{id:i})),x.createElement(_Me,io({},r,{id:i}))))}var ZW=CMe;ZW.displayName="Pie";var NMe=["points"];function YB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function nC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?YB(Object(n),!0).forEach(function(r){EMe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function EMe(e,t,n){return(t=AMe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AMe(e){var t=TMe(e,"string");return typeof t=="symbol"?t:t+""}function TMe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Og(){return Og=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Og.apply(null,arguments)}function OMe(e,t){if(e==null)return{};var n,r,a=MMe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function MMe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function PMe(e){var{option:t,dotProps:n,className:r}=e;if(x.isValidElement(t))return x.cloneElement(t,n);if(typeof t=="function")return t(n);var a=zt(r,typeof t!="boolean"?t.className:""),i=n??{},{points:s}=i,l=OMe(i,NMe);return x.createElement(qW,Og({},l,{className:a}))}function DMe(e,t){return e==null?!1:t?!0:e.length===1}function RMe(e){var{points:t,dot:n,className:r,dotClassName:a,dataKey:i,baseProps:s,needClip:l,clipPathId:c,zIndex:d=Pn.scatter}=e;if(!DMe(t,n))return null;var h=KW(n),m=gbe(n),g=t.map((b,w)=>{var S,j,_=nC(nC(nC({r:3},s),m),{},{index:w,cx:(S=b.x)!==null&&S!==void 0?S:void 0,cy:(j=b.y)!==null&&j!==void 0?j:void 0,dataKey:i,value:b.value,payload:b.payload,points:t});return x.createElement(PMe,{key:"dot-".concat(w),option:n,dotProps:_,className:a})}),v={};return l&&c!=null&&(v.clipPath="url(#clipPath-".concat(h?"":"dots-").concat(c,")")),x.createElement(Pr,{zIndex:d},x.createElement(Bn,Og({className:r},v),g))}function XB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ZB(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XB(Object(n),!0).forEach(function(r){IMe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function IMe(e,t,n){return(t=LMe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LMe(e){var t=zMe(e,"string");return typeof t=="symbol"?t:t+""}function zMe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var QW=0,$Me={xAxis:{},yAxis:{},zAxis:{}},JW=hr({name:"cartesianAxis",initialState:$Me,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:nn()},replaceXAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;e.xAxis[n.id]!==void 0&&(n.id!==r.id&&delete e.xAxis[n.id],e.xAxis[r.id]=r)},prepare:nn()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:nn()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:nn()},replaceYAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;e.yAxis[n.id]!==void 0&&(n.id!==r.id&&delete e.yAxis[n.id],e.yAxis[r.id]=r)},prepare:nn()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:nn()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:nn()},replaceZAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;e.zAxis[n.id]!==void 0&&(n.id!==r.id&&delete e.zAxis[n.id],e.zAxis[r.id]=r)},prepare:nn()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:nn()},updateYAxisWidth(e,t){var{id:n,width:r}=t.payload,a=e.yAxis[n];if(a){var i,s=a.widthHistory||[];if(s.length===3&&s[0]===s[2]&&r===s[1]&&r!==a.width&&Math.abs(r-((i=s[0])!==null&&i!==void 0?i:0))<=1)return;var l=[...s,r].slice(-3);e.yAxis[n]=ZB(ZB({},a),{},{width:r,widthHistory:l})}}}}),{addXAxis:qMe,replaceXAxis:BMe,removeXAxis:FMe,addYAxis:HMe,replaceYAxis:UMe,removeYAxis:GMe,addZAxis:UIe,replaceZAxis:GIe,removeZAxis:VIe,updateYAxisWidth:VMe}=JW.actions,KMe=JW.reducer,WMe=he([Fn],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),YMe=he([WMe,fs,hs],(e,t,n)=>{if(!(!e||t==null||n==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,n-e.top-e.bottom)}}),BA=()=>Ke(YMe),XMe=()=>Ke(zEe);function QB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function rC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?QB(Object(n),!0).forEach(function(r){ZMe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ZMe(e,t,n){return(t=QMe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QMe(e){var t=JMe(e,"string");return typeof t=="symbol"?t:t+""}function JMe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ePe=e=>{var{point:t,childIndex:n,mainColor:r,activeDot:a,dataKey:i,clipPath:s}=e;if(a===!1||t.x==null||t.y==null)return null;var l={index:n,dataKey:i,cx:t.x,cy:t.y,r:4,fill:r??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},c=rC(rC(rC({},l),ol(a)),lE(a)),d;return x.isValidElement(a)?d=x.cloneElement(a,c):typeof a=="function"?d=a(c):d=x.createElement(qW,c),x.createElement(Bn,{className:"recharts-active-dot",clipPath:s},d)};function tPe(e){var{points:t,mainColor:n,activeDot:r,itemDataKey:a,clipPath:i,zIndex:s=Pn.activeDot}=e,l=Ke(ao),c=XMe();if(t==null||c==null)return null;var d=t.find(h=>c.includes(h.payload));return cn(d)?null:x.createElement(Pr,{zIndex:s},x.createElement(ePe,{point:d,childIndex:Number(l),mainColor:n,dataKey:a,activeDot:r,clipPath:i}))}var JB=(e,t,n)=>{var r=n??e;if(!cn(r))return dr(r,t,0)},nPe=(e,t,n)=>{var r={},a=e.filter(Qv),i=e.filter(d=>d.stackId==null),s=a.reduce((d,h)=>{var m=d[h.stackId];return m==null&&(m=[]),m.push(h),d[h.stackId]=m,d},r),l=Object.entries(s).map(d=>{var h,[m,g]=d,v=g.map(w=>w.dataKey),b=JB(t,n,(h=g[0])===null||h===void 0?void 0:h.barSize);return{stackId:m,dataKeys:v,barSize:b}}),c=i.map(d=>{var h=[d.dataKey].filter(g=>g!=null),m=JB(t,n,d.barSize);return{stackId:void 0,dataKeys:h,barSize:m}});return[...l,...c]};function eF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function sp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?eF(Object(n),!0).forEach(function(r){rPe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rPe(e,t,n){return(t=aPe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aPe(e){var t=iPe(e,"string");return typeof t=="symbol"?t:t+""}function iPe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function sPe(e,t,n,r,a){var i,s=r.length;if(!(s<1)){var l=dr(e,n,0,!0),c,d=[];if(Nt((i=r[0])===null||i===void 0?void 0:i.barSize)){var h=!1,m=n/s,g=r.reduce((_,k)=>_+(k.barSize||0),0);g+=(s-1)*l,g>=n&&(g-=(s-1)*l,l=0),g>=n&&m>0&&(h=!0,m*=.9,g=s*m);var v=(n-g)/2>>0,b={offset:v-l,size:0};c=r.reduce((_,k)=>{var E,T={stackId:k.stackId,dataKeys:k.dataKeys,position:{offset:b.offset+b.size+l,size:h?m:(E=k.barSize)!==null&&E!==void 0?E:0}},A=[..._,T];return b=T.position,A},d)}else{var w=dr(t,n,0,!0);n-2*w-(s-1)*l<=0&&(l=0);var S=(n-2*w-(s-1)*l)/s;S>1&&(S>>=0);var j=Nt(a)?Math.min(S,a):S;c=r.reduce((_,k,E)=>[..._,{stackId:k.stackId,dataKeys:k.dataKeys,position:{offset:w+(S+l)*E+(S-j)/2,size:j}}],d)}return c}}var oPe=(e,t,n,r,a,i,s)=>{var l=cn(s)?t:s,c=sPe(n,r,a!==i?a:i,e,l);return a!==i&&c!=null&&(c=c.map(d=>sp(sp({},d),{},{position:sp(sp({},d.position),{},{offset:d.position.offset-a/2})}))),c},lPe=(e,t)=>{var n=ME(t);if(!(!e||n==null||t==null)){var{stackId:r}=t;if(r!=null){var a=e[r];if(a){var{stackedData:i}=a;if(i)return i.find(s=>s.key===n)}}}},uPe=(e,t)=>{if(!(e==null||t==null)){var n=e.find(r=>r.stackId===t.stackId&&t.dataKey!=null&&r.dataKeys.includes(t.dataKey));if(n!=null)return n.position}};function cPe(e,t){return e&&typeof e=="object"&&"zIndex"in e&&typeof e.zIndex=="number"&&Nt(e.zIndex)?e.zIndex:t}var eY=e=>{var{chartData:t}=e,n=Jt(),r=mr();return x.useEffect(()=>r?()=>{}:(n(cB(t)),()=>{n(cB(void 0))}),[t,n,r]),null},tF={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},tY=hr({name:"brush",initialState:tF,reducers:{setBrushSettings(e,t){return t.payload==null?tF:t.payload}}}),{setBrushSettings:KIe}=tY.actions,dPe=tY.reducer;function fPe(e){return(e%180+180)%180}var hPe=function(t){var{width:n,height:r}=t,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=fPe(a),s=i*Math.PI/180,l=Math.atan(r/n),c=s>l&&s<Math.PI-l?r/Math.sin(s):n/Math.cos(s);return Math.abs(c)},mPe={dots:[],areas:[],lines:[]},nY=hr({name:"referenceElements",initialState:mPe,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var n=pa(e).dots.findIndex(r=>r===t.payload);n!==-1&&e.dots.splice(n,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var n=pa(e).areas.findIndex(r=>r===t.payload);n!==-1&&e.areas.splice(n,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var n=pa(e).lines.findIndex(r=>r===t.payload);n!==-1&&e.lines.splice(n,1)}}}),{addDot:WIe,removeDot:YIe,addArea:XIe,removeArea:ZIe,addLine:QIe,removeLine:JIe}=nY.actions,pPe=nY.reducer,gPe=x.createContext(void 0),vPe=e=>{var{children:t}=e,[n]=x.useState("".concat(vf("recharts"),"-clip")),r=BA();if(r==null)return null;var{x:a,y:i,width:s,height:l}=r;return x.createElement(gPe.Provider,{value:n},x.createElement("defs",null,x.createElement("clipPath",{id:n},x.createElement("rect",{x:a,y:i,height:l,width:s}))),t)};function rY(e,t){if(t<1)return[];if(t===1)return e;for(var n=[],r=0;r<e.length;r+=t){var a=e[r];a!==void 0&&n.push(a)}return n}function yPe(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return hPe(r,n)}function xPe(e,t,n){var r=n==="width",{x:a,y:i,width:s,height:l}=e;return t===1?{start:r?a:i,end:r?a+s:i+l}:{start:r?a+s:i+l,end:r?a:i}}function Ef(e,t,n,r,a){if(e*t<e*r||e*t>e*a)return!1;var i=n();return e*(t-e*i/2-r)>=0&&e*(t+e*i/2-a)<=0}function bPe(e,t){return rY(e,t+1)}function wPe(e,t,n,r,a){for(var i=(r||[]).slice(),{start:s,end:l}=t,c=0,d=1,h=s,m=function(){var b=r==null?void 0:r[c];if(b===void 0)return{v:rY(r,d)};var w=c,S,j=()=>(S===void 0&&(S=n(b,w)),S),_=b.coordinate,k=c===0||Ef(e,_,j,h,l);k||(c=0,h=s,d+=1),k&&(h=_+e*(j()/2+a),c+=d)},g;d<=i.length;)if(g=m(),g)return g.v;return[]}function SPe(e,t,n,r,a){var i=(r||[]).slice(),s=i.length;if(s===0)return[];for(var{start:l,end:c}=t,d=1;d<=s;d++){for(var h=(s-1)%d,m=l,g=!0,v=function(){var E=r[w];if(E==null)return 0;var T=w,A,O=()=>(A===void 0&&(A=n(E,T)),A),I=E.coordinate,P=w===h||Ef(e,I,O,m,c);if(!P)return g=!1,1;P&&(m=I+e*(O()/2+a))},b,w=h;w<s&&(b=v(),!(b!==0&&b===1));w+=d);if(g){for(var S=[],j=h;j<s;j+=d){var _=r[j];_!=null&&S.push(_)}return S}}return[]}function nF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function lr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nF(Object(n),!0).forEach(function(r){jPe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jPe(e,t,n){return(t=kPe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kPe(e){var t=_Pe(e,"string");return typeof t=="symbol"?t:t+""}function _Pe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function CPe(e,t,n,r,a){for(var i=(r||[]).slice(),s=i.length,{start:l}=t,{end:c}=t,d=function(g){var v=i[g];if(v==null)return 1;var b=v,w,S=()=>(w===void 0&&(w=n(v,g)),w);if(g===s-1){var j=e*(b.coordinate+e*S()/2-c);i[g]=b=lr(lr({},b),{},{tickCoord:j>0?b.coordinate-j*e:b.coordinate})}else i[g]=b=lr(lr({},b),{},{tickCoord:b.coordinate});if(b.tickCoord!=null){var _=Ef(e,b.tickCoord,S,l,c);_&&(c=b.tickCoord-e*(S()/2+a),i[g]=lr(lr({},b),{},{isShow:!0}))}},h=s-1;h>=0;h--)d(h);return i}function NPe(e,t,n,r,a,i){var s=(r||[]).slice(),l=s.length,{start:c,end:d}=t;if(i){var h=r[l-1];if(h!=null){var m=n(h,l-1),g=e*(h.coordinate+e*m/2-d);if(s[l-1]=h=lr(lr({},h),{},{tickCoord:g>0?h.coordinate-g*e:h.coordinate}),h.tickCoord!=null){var v=Ef(e,h.tickCoord,()=>m,c,d);v&&(d=h.tickCoord-e*(m/2+a),s[l-1]=lr(lr({},h),{},{isShow:!0}))}}}for(var b=i?l-1:l,w=function(_){var k=s[_];if(k==null)return 1;var E=k,T,A=()=>(T===void 0&&(T=n(k,_)),T);if(_===0){var O=e*(E.coordinate-e*A()/2-c);s[_]=E=lr(lr({},E),{},{tickCoord:O<0?E.coordinate-O*e:E.coordinate})}else s[_]=E=lr(lr({},E),{},{tickCoord:E.coordinate});if(E.tickCoord!=null){var I=Ef(e,E.tickCoord,A,c,d);I&&(c=E.tickCoord+e*(A()/2+a),s[_]=lr(lr({},E),{},{isShow:!0}))}},S=0;S<b;S++)w(S);return s}function FA(e,t,n){var{tick:r,ticks:a,viewBox:i,minTickGap:s,orientation:l,interval:c,tickFormatter:d,unit:h,angle:m}=e;if(!a||!a.length||!r)return[];if(He(c)||nh.isSsr){var g;return(g=bPe(a,He(c)?c:0))!==null&&g!==void 0?g:[]}var v=[],b=l==="top"||l==="bottom"?"width":"height",w=h&&b==="width"?Xd(h,{fontSize:t,letterSpacing:n}):{width:0,height:0},S=(T,A)=>{var O=typeof d=="function"?d(T.value,A):T.value;return b==="width"?yPe(Xd(O,{fontSize:t,letterSpacing:n}),w,m):Xd(O,{fontSize:t,letterSpacing:n})[b]},j=a[0],_=a[1],k=a.length>=2&&j!=null&&_!=null?Yn(_.coordinate-j.coordinate):1,E=xPe(i,k,b);return c==="equidistantPreserveStart"?wPe(k,E,S,a,s):c==="equidistantPreserveEnd"?SPe(k,E,S,a,s):(c==="preserveStart"||c==="preserveStartEnd"?v=NPe(k,E,S,a,s,c==="preserveStartEnd"):v=CPe(k,E,S,a,s),v.filter(T=>T.isShow))}var EPe=e=>{var{ticks:t,label:n,labelGapWithTick:r=5,tickSize:a=0,tickMargin:i=0}=e,s=0;if(t){Array.from(t).forEach(h=>{if(h){var m=h.getBoundingClientRect();m.width>s&&(s=m.width)}});var l=n?n.getBoundingClientRect().width:0,c=a+i,d=s+c+l+(n?r:0);return Math.round(d)}return 0},APe={xAxis:{},yAxis:{}},aY=hr({name:"renderedTicks",initialState:APe,reducers:{setRenderedTicks:(e,t)=>{var{axisType:n,axisId:r,ticks:a}=t.payload;e[n][r]=a},removeRenderedTicks:(e,t)=>{var{axisType:n,axisId:r}=t.payload;delete e[n][r]}}}),{setRenderedTicks:TPe,removeRenderedTicks:OPe}=aY.actions,MPe=aY.reducer,PPe=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function DPe(e,t){if(e==null)return{};var n,r,a=RPe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function RPe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function gl(){return gl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gl.apply(null,arguments)}function rF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function bn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rF(Object(n),!0).forEach(function(r){IPe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function IPe(e,t,n){return(t=LPe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LPe(e){var t=zPe(e,"string");return typeof t=="symbol"?t:t+""}function zPe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Qi={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd",zIndex:Pn.axis};function $Pe(e){var{x:t,y:n,width:r,height:a,orientation:i,mirror:s,axisLine:l,otherSvgProps:c}=e;if(!l)return null;var d=bn(bn(bn({},c),Qr(l)),{},{fill:"none"});if(i==="top"||i==="bottom"){var h=+(i==="top"&&!s||i==="bottom"&&s);d=bn(bn({},d),{},{x1:t,y1:n+h*a,x2:t+r,y2:n+h*a})}else{var m=+(i==="left"&&!s||i==="right"&&s);d=bn(bn({},d),{},{x1:t+m*r,y1:n,x2:t+m*r,y2:n+a})}return x.createElement("line",gl({},d,{className:zt("recharts-cartesian-axis-line",ul(l,"className"))}))}function qPe(e,t,n,r,a,i,s,l,c){var d,h,m,g,v,b,w=l?-1:1,S=e.tickSize||s,j=He(e.tickCoord)?e.tickCoord:e.coordinate;switch(i){case"top":d=h=e.coordinate,g=n+ +!l*a,m=g-w*S,b=m-w*c,v=j;break;case"left":m=g=e.coordinate,h=t+ +!l*r,d=h-w*S,v=d-w*c,b=j;break;case"right":m=g=e.coordinate,h=t+ +l*r,d=h+w*S,v=d+w*c,b=j;break;default:d=h=e.coordinate,g=n+ +l*a,m=g+w*S,b=m+w*c,v=j;break}return{line:{x1:d,y1:m,x2:h,y2:g},tick:{x:v,y:b}}}function BPe(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function FPe(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function HPe(e){var{option:t,tickProps:n,value:r}=e,a,i=zt(n.className,"recharts-cartesian-axis-tick-value");if(x.isValidElement(t))a=x.cloneElement(t,bn(bn({},n),{},{className:i}));else if(typeof t=="function")a=t(bn(bn({},n),{},{className:i}));else{var s="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(s=zt(s,UW(t))),a=x.createElement(fy,gl({},n,{className:s}),r)}return a}function UPe(e){var{ticks:t,axisType:n,axisId:r}=e,a=Jt();return x.useEffect(()=>{if(r==null||n==null)return _l;var i=t.map(s=>({value:s.value,coordinate:s.coordinate,offset:s.offset,index:s.index}));return a(TPe({ticks:i,axisId:r,axisType:n})),()=>{a(OPe({axisId:r,axisType:n}))}},[a,t,r,n]),null}var GPe=x.forwardRef((e,t)=>{var{ticks:n=[],tick:r,tickLine:a,stroke:i,tickFormatter:s,unit:l,padding:c,tickTextProps:d,orientation:h,mirror:m,x:g,y:v,width:b,height:w,tickSize:S,tickMargin:j,fontSize:_,letterSpacing:k,getTicksConfig:E,events:T,axisType:A,axisId:O}=e,I=FA(bn(bn({},E),{},{ticks:n}),_,k),P=Qr(E),D=ol(r),q=OW(P.textAnchor)?P.textAnchor:BPe(h,m),z=FPe(h,m),F={};typeof a=="object"&&(F=a);var R=bn(bn({},P),{},{fill:"none"},F),M=I.map(W=>bn({entry:W},qPe(W,g,v,b,w,h,S,m,j))),L=M.map(W=>{var{entry:Y,line:B}=W;return x.createElement(Bn,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(Y.value,"-").concat(Y.coordinate,"-").concat(Y.tickCoord)},a&&x.createElement("line",gl({},R,B,{className:zt("recharts-cartesian-axis-tick-line",ul(a,"className"))})))}),G=M.map((W,Y)=>{var B,H,{entry:K,tick:U}=W,X=bn(bn(bn(bn({verticalAnchor:z},P),{},{textAnchor:q,stroke:"none",fill:i},U),{},{index:Y,payload:K,visibleTicksCount:I.length,tickFormatter:s,padding:c},d),{},{angle:(B=(H=d==null?void 0:d.angle)!==null&&H!==void 0?H:P.angle)!==null&&B!==void 0?B:0}),J=bn(bn({},X),D);return x.createElement(Bn,gl({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(K.value,"-").concat(K.coordinate,"-").concat(K.tickCoord)},Tv(T,K,Y)),r&&x.createElement(HPe,{option:r,tickProps:J,value:"".concat(typeof s=="function"?s(K.value,Y):K.value).concat(l||"")}))});return x.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(A,"-ticks")},x.createElement(UPe,{ticks:I,axisId:O,axisType:A}),G.length>0&&x.createElement(Pr,{zIndex:Pn.label},x.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(A,"-tick-labels"),ref:t},G)),L.length>0&&x.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(A,"-tick-lines")},L))}),VPe=x.forwardRef((e,t)=>{var{axisLine:n,width:r,height:a,className:i,hide:s,ticks:l,axisType:c,axisId:d}=e,h=DPe(e,PPe),[m,g]=x.useState(""),[v,b]=x.useState(""),w=x.useRef(null);x.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var j;return EPe({ticks:w.current,label:(j=e.labelRef)===null||j===void 0?void 0:j.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var S=x.useCallback(j=>{if(j){var _=j.getElementsByClassName("recharts-cartesian-axis-tick-value");w.current=_;var k=_[0];if(k){var E=window.getComputedStyle(k),T=E.fontSize,A=E.letterSpacing;(T!==m||A!==v)&&(g(T),b(A))}}},[m,v]);return s||r!=null&&r<=0||a!=null&&a<=0?null:x.createElement(Pr,{zIndex:e.zIndex},x.createElement(Bn,{className:zt("recharts-cartesian-axis",i)},x.createElement($Pe,{x:e.x,y:e.y,width:r,height:a,orientation:e.orientation,mirror:e.mirror,axisLine:n,otherSvgProps:Qr(e)}),x.createElement(GPe,{ref:S,axisType:c,events:h,fontSize:m,getTicksConfig:e,height:e.height,letterSpacing:v,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:l,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:d}),x.createElement(zTe,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},x.createElement(WTe,{label:e.label,labelRef:e.labelRef}),e.children)))}),HA=x.forwardRef((e,t)=>{var n=Xn(e,Qi);return x.createElement(VPe,gl({},n,{ref:t}))});HA.displayName="CartesianAxis";var KPe=["x1","y1","x2","y2","key"],WPe=["offset"],YPe=["xAxisId","yAxisId"],XPe=["xAxisId","yAxisId"];function aF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ur(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?aF(Object(n),!0).forEach(function(r){ZPe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ZPe(e,t,n){return(t=QPe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QPe(e){var t=JPe(e,"string");return typeof t=="symbol"?t:t+""}function JPe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Zo(){return Zo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zo.apply(null,arguments)}function Mg(e,t){if(e==null)return{};var n,r,a=eDe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function eDe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var tDe=e=>{var{fill:t}=e;if(!t||t==="none")return null;var{fillOpacity:n,x:r,y:a,width:i,height:s,ry:l}=e;return x.createElement("rect",{x:r,y:a,ry:l,width:i,height:s,stroke:"none",fill:t,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function iY(e){var{option:t,lineItemProps:n}=e,r;if(x.isValidElement(t))r=x.cloneElement(t,n);else if(typeof t=="function")r=t(n);else{var a,{x1:i,y1:s,x2:l,y2:c,key:d}=n,h=Mg(n,KPe),m=(a=Qr(h))!==null&&a!==void 0?a:{},{offset:g}=m,v=Mg(m,WPe);r=x.createElement("line",Zo({},v,{x1:i,y1:s,x2:l,y2:c,fill:"none",key:d}))}return r}function nDe(e){var{x:t,width:n,horizontal:r=!0,horizontalPoints:a}=e;if(!r||!a||!a.length)return null;var{xAxisId:i,yAxisId:s}=e,l=Mg(e,YPe),c=a.map((d,h)=>{var m=ur(ur({},l),{},{x1:t,y1:d,x2:t+n,y2:d,key:"line-".concat(h),index:h});return x.createElement(iY,{key:"line-".concat(h),option:r,lineItemProps:m})});return x.createElement("g",{className:"recharts-cartesian-grid-horizontal"},c)}function rDe(e){var{y:t,height:n,vertical:r=!0,verticalPoints:a}=e;if(!r||!a||!a.length)return null;var{xAxisId:i,yAxisId:s}=e,l=Mg(e,XPe),c=a.map((d,h)=>{var m=ur(ur({},l),{},{x1:d,y1:t,x2:d,y2:t+n,key:"line-".concat(h),index:h});return x.createElement(iY,{option:r,lineItemProps:m,key:"line-".concat(h)})});return x.createElement("g",{className:"recharts-cartesian-grid-vertical"},c)}function aDe(e){var{horizontalFill:t,fillOpacity:n,x:r,y:a,width:i,height:s,horizontalPoints:l,horizontal:c=!0}=e;if(!c||!t||!t.length||l==null)return null;var d=l.map(m=>Math.round(m+a-a)).sort((m,g)=>m-g);a!==d[0]&&d.unshift(0);var h=d.map((m,g)=>{var v=d[g+1],b=v==null,w=b?a+s-m:v-m;if(w<=0)return null;var S=g%t.length;return x.createElement("rect",{key:"react-".concat(g),y:m,x:r,height:w,width:i,stroke:"none",fill:t[S],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return x.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},h)}function iDe(e){var{vertical:t=!0,verticalFill:n,fillOpacity:r,x:a,y:i,width:s,height:l,verticalPoints:c}=e;if(!t||!n||!n.length)return null;var d=c.map(m=>Math.round(m+a-a)).sort((m,g)=>m-g);a!==d[0]&&d.unshift(0);var h=d.map((m,g)=>{var v=d[g+1],b=v==null,w=b?a+s-m:v-m;if(w<=0)return null;var S=g%n.length;return x.createElement("rect",{key:"react-".concat(g),x:m,y:i,width:w,height:l,stroke:"none",fill:n[S],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return x.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},h)}var sDe=(e,t)=>{var{xAxis:n,width:r,height:a,offset:i}=e;return BG(FA(ur(ur(ur({},Qi),n),{},{ticks:FG(n),viewBox:{x:0,y:0,width:r,height:a}})),i.left,i.left+i.width,t)},oDe=(e,t)=>{var{yAxis:n,width:r,height:a,offset:i}=e;return BG(FA(ur(ur(ur({},Qi),n),{},{ticks:FG(n),viewBox:{x:0,y:0,width:r,height:a}})),i.top,i.top+i.height,t)},lDe={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:Pn.grid};function sY(e){var t=XG(),n=ZG(),r=YG(),a=ur(ur({},Xn(e,lDe)),{},{x:He(e.x)?e.x:r.left,y:He(e.y)?e.y:r.top,width:He(e.width)?e.width:r.width,height:He(e.height)?e.height:r.height}),{xAxisId:i,yAxisId:s,x:l,y:c,width:d,height:h,syncWithTicks:m,horizontalValues:g,verticalValues:v}=a,b=mr(),w=Ke(P=>Zq(P,"xAxis",i,b)),S=Ke(P=>Zq(P,"yAxis",s,b));if(!mi(d)||!mi(h)||!He(l)||!He(c))return null;var j=a.verticalCoordinatesGenerator||sDe,_=a.horizontalCoordinatesGenerator||oDe,{horizontalPoints:k,verticalPoints:E}=a;if((!k||!k.length)&&typeof _=="function"){var T=g&&g.length,A=_({yAxis:S?ur(ur({},S),{},{ticks:T?g:S.ticks}):void 0,width:t??d,height:n??h,offset:r},T?!0:m);sg(Array.isArray(A),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof A,"]")),Array.isArray(A)&&(k=A)}if((!E||!E.length)&&typeof j=="function"){var O=v&&v.length,I=j({xAxis:w?ur(ur({},w),{},{ticks:O?v:w.ticks}):void 0,width:t??d,height:n??h,offset:r},O?!0:m);sg(Array.isArray(I),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof I,"]")),Array.isArray(I)&&(E=I)}return x.createElement(Pr,{zIndex:a.zIndex},x.createElement("g",{className:"recharts-cartesian-grid"},x.createElement(tDe,{fill:a.fill,fillOpacity:a.fillOpacity,x:a.x,y:a.y,width:a.width,height:a.height,ry:a.ry}),x.createElement(aDe,Zo({},a,{horizontalPoints:k})),x.createElement(iDe,Zo({},a,{verticalPoints:E})),x.createElement(nDe,Zo({},a,{offset:r,horizontalPoints:k,xAxis:w,yAxis:S})),x.createElement(rDe,Zo({},a,{offset:r,verticalPoints:E,xAxis:w,yAxis:S}))))}sY.displayName="CartesianGrid";var uDe={},oY=hr({name:"errorBars",initialState:uDe,reducers:{addErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]||(e[n]=[]),e[n].push(r)},replaceErrorBar:(e,t)=>{var{itemId:n,prev:r,next:a}=t.payload;e[n]&&(e[n]=e[n].map(i=>i.dataKey===r.dataKey&&i.direction===r.direction?a:i))},removeErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]&&(e[n]=e[n].filter(a=>a.dataKey!==r.dataKey||a.direction!==r.direction))}}}),{addErrorBar:e4e,replaceErrorBar:t4e,removeErrorBar:n4e}=oY.actions,cDe=oY.reducer,dDe=["children"];function fDe(e,t){if(e==null)return{};var n,r,a=hDe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function hDe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var mDe={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},pDe=x.createContext(mDe);function lY(e){var{children:t}=e,n=fDe(e,dDe);return x.createElement(pDe.Provider,{value:n},t)}function UA(e,t){var n,r,a=Ke(d=>ps(d,e)),i=Ke(d=>gs(d,t)),s=(n=a==null?void 0:a.allowDataOverflow)!==null&&n!==void 0?n:zn.allowDataOverflow,l=(r=i==null?void 0:i.allowDataOverflow)!==null&&r!==void 0?r:$n.allowDataOverflow,c=s||l;return{needClip:c,needClipX:s,needClipY:l}}function uY(e){var{xAxisId:t,yAxisId:n,clipPathId:r}=e,a=BA(),{needClipX:i,needClipY:s,needClip:l}=UA(t,n);if(!l||!a)return null;var{x:c,y:d,width:h,height:m}=a;return x.createElement("clipPath",{id:"clipPath-".concat(r)},x.createElement("rect",{x:i?c:c-h/2,y:s?d:d-m/2,width:i?h:h*2,height:s?m:m*2}))}var cY=(e,t,n,r)=>ro(e,"xAxis",t,r),dY=(e,t,n,r)=>no(e,"xAxis",t,r),fY=(e,t,n,r)=>ro(e,"yAxis",n,r),hY=(e,t,n,r)=>no(e,"yAxis",n,r),gDe=he([Rt,cY,fY,dY,hY],(e,t,n,r,a)=>ds(e,"xAxis")?Xu(t,r,!1):Xu(n,a,!1)),vDe=(e,t,n,r,a)=>a;function yDe(e){return e.type==="line"}var xDe=he([oy,vDe],(e,t)=>e.filter(yDe).find(n=>n.id===t)),bDe=he([Rt,cY,fY,dY,hY,xDe,gDe,sh],(e,t,n,r,a,i,s,l)=>{var{chartData:c,dataStartIndex:d,dataEndIndex:h}=l;if(!(i==null||t==null||n==null||r==null||a==null||r.length===0||a.length===0||s==null||e!=="horizontal"&&e!=="vertical")){var{dataKey:m,data:g}=i,v;if(g!=null&&g.length>0?v=g:v=c==null?void 0:c.slice(d,h+1),v!=null)return BDe({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:a,dataKey:m,bandSize:s,displayedData:v})}});function wDe(e){var t=ol(e),n=3,r=2;if(t!=null){var{r:a,strokeWidth:i}=t,s=Number(a),l=Number(i);return(Number.isNaN(s)||s<0)&&(s=n),(Number.isNaN(l)||l<0)&&(l=r),{r:s,strokeWidth:l}}return{r:n,strokeWidth:r}}var SDe=["id"],jDe=["type","layout","connectNulls","needClip","shape"],kDe=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function Af(){return Af=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Af.apply(null,arguments)}function iF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ri(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iF(Object(n),!0).forEach(function(r){_De(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _De(e,t,n){return(t=CDe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CDe(e){var t=NDe(e,"string");return typeof t=="symbol"?t:t+""}function NDe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function GA(e,t){if(e==null)return{};var n,r,a=EDe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function EDe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var ADe=e=>{var{dataKey:t,name:n,stroke:r,legendType:a,hide:i}=e;return[{inactive:i,dataKey:t,type:a,color:r,value:pc(n,t),payload:e}]},TDe=x.memo(e=>{var{dataKey:t,data:n,stroke:r,strokeWidth:a,fill:i,name:s,hide:l,unit:c,tooltipType:d,id:h}=e,m={dataDefinedOnItem:n,getPosition:_l,settings:{stroke:r,strokeWidth:a,fill:i,dataKey:t,nameKey:void 0,name:pc(s,t),hide:l,type:d,color:r,unit:c,graphicalItemId:h}};return x.createElement($A,{tooltipEntrySettings:m})}),mY=(e,t)=>"".concat(t,"px ").concat(e,"px");function ODe(e,t){for(var n=e.length%2!==0?[...e,0]:e,r=[],a=0;a<t;++a)r.push(...n);return r}var MDe=(e,t,n)=>{var r=n.reduce((g,v)=>g+v,0);if(!r)return mY(t,e);for(var a=Math.floor(e/r),i=e%r,s=[],l=0,c=0;l<n.length;c+=(d=n[l])!==null&&d!==void 0?d:0,++l){var d,h=n[l];if(h!=null&&c+h>i){s=[...n.slice(0,l),i-c];break}}var m=s.length%2===0?[0,t]:[t];return[...ODe(n,a),...s,...m].map(g=>"".concat(g,"px")).join(", ")};function PDe(e){var{clipPathId:t,points:n,props:r}=e,{dot:a,dataKey:i,needClip:s}=r,{id:l}=r,c=GA(r,SDe),d=Qr(c);return x.createElement(RMe,{points:n,dot:a,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:i,baseProps:d,needClip:s,clipPathId:t})}function DDe(e){var{showLabels:t,children:n,points:r}=e,a=x.useMemo(()=>r==null?void 0:r.map(i=>{var s,l,c={x:(s=i.x)!==null&&s!==void 0?s:0,y:(l=i.y)!==null&&l!==void 0?l:0,width:0,lowerWidth:0,upperWidth:0,height:0};return ri(ri({},c),{},{value:i.value,payload:i.payload,viewBox:c,parentViewBox:void 0,fill:void 0})}),[r]);return x.createElement(zW,{value:t?a:void 0},n)}function sF(e){var{clipPathId:t,pathRef:n,points:r,strokeDasharray:a,props:i}=e,{type:s,layout:l,connectNulls:c,needClip:d,shape:h}=i,m=GA(i,jDe),g=ri(ri({},xr(m)),{},{fill:"none",className:"recharts-line-curve",clipPath:d?"url(#clipPath-".concat(t,")"):void 0,points:r,type:s,layout:l,connectNulls:c,strokeDasharray:a??i.strokeDasharray});return x.createElement(x.Fragment,null,(r==null?void 0:r.length)>1&&x.createElement(RA,Af({shapeType:"curve",option:h},g,{pathRef:n})),x.createElement(PDe,{points:r,clipPathId:t,props:i}))}function RDe(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function IDe(e){var{clipPathId:t,props:n,pathRef:r,previousPointsRef:a,longestAnimatedLengthRef:i}=e,{points:s,strokeDasharray:l,isAnimationActive:c,animationBegin:d,animationDuration:h,animationEasing:m,animateNewValues:g,width:v,height:b,onAnimationEnd:w,onAnimationStart:S}=n,j=a.current,_=ah(s,"recharts-line-"),k=x.useRef(_),[E,T]=x.useState(!1),A=!E,O=x.useCallback(()=>{typeof w=="function"&&w(),T(!1)},[w]),I=x.useCallback(()=>{typeof S=="function"&&S(),T(!0)},[S]),P=RDe(r.current),D=x.useRef(0);k.current!==_&&(D.current=i.current,k.current=_);var q=D.current;return x.createElement(DDe,{points:s,showLabels:A},n.children,x.createElement(rh,{animationId:_,begin:d,duration:h,isActive:c,easing:m,onAnimationEnd:O,onAnimationStart:I,key:_},z=>{var F=sn(q,P+q,z),R=Math.min(F,P),M;if(c)if(l){var L="".concat(l).split(/[,\s]+/gim).map(Y=>parseFloat(Y));M=MDe(R,P,L)}else M=mY(P,R);else M=l==null?void 0:String(l);if(z>0&&P>0&&(a.current=s,i.current=Math.max(i.current,R)),j){var G=j.length/s.length,W=z===1?s:s.map((Y,B)=>{var H=Math.floor(B*G);if(j[H]){var K=j[H];return ri(ri({},Y),{},{x:sn(K.x,Y.x,z),y:sn(K.y,Y.y,z)})}return g?ri(ri({},Y),{},{x:sn(v*2,Y.x,z),y:sn(b/2,Y.y,z)}):ri(ri({},Y),{},{x:Y.x,y:Y.y})});return a.current=W,x.createElement(sF,{props:n,points:W,clipPathId:t,pathRef:r,strokeDasharray:M})}return x.createElement(sF,{props:n,points:s,clipPathId:t,pathRef:r,strokeDasharray:M})}),x.createElement(OA,{label:n.label}))}function LDe(e){var{clipPathId:t,props:n}=e,r=x.useRef(null),a=x.useRef(0),i=x.useRef(null);return x.createElement(IDe,{props:n,clipPathId:t,previousPointsRef:r,longestAnimatedLengthRef:a,pathRef:i})}var zDe=(e,t)=>{var n,r;return{x:(n=e.x)!==null&&n!==void 0?n:void 0,y:(r=e.y)!==null&&r!==void 0?r:void 0,value:e.value,errorVal:$t(e.payload,t)}};class $De extends x.Component{render(){var{hide:t,dot:n,points:r,className:a,xAxisId:i,yAxisId:s,top:l,left:c,width:d,height:h,id:m,needClip:g,zIndex:v}=this.props;if(t)return null;var b=zt("recharts-line",a),w=m,{r:S,strokeWidth:j}=wDe(n),_=KW(n),k=S*2+j,E=g?"url(#clipPath-".concat(_?"":"dots-").concat(w,")"):void 0;return x.createElement(Pr,{zIndex:v},x.createElement(Bn,{className:b},g&&x.createElement("defs",null,x.createElement(uY,{clipPathId:w,xAxisId:i,yAxisId:s}),!_&&x.createElement("clipPath",{id:"clipPath-dots-".concat(w)},x.createElement("rect",{x:c-k/2,y:l-k/2,width:d+k,height:h+k}))),x.createElement(lY,{xAxisId:i,yAxisId:s,data:r,dataPointFormatter:zDe,errorBarOffset:0},x.createElement(LDe,{props:this.props,clipPathId:w}))),x.createElement(tPe,{activeDot:this.props.activeDot,points:r,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:E}))}}var pY={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:Pn.line,type:"linear"};function qDe(e){var t=Xn(e,pY),{activeDot:n,animateNewValues:r,animationBegin:a,animationDuration:i,animationEasing:s,connectNulls:l,dot:c,hide:d,isAnimationActive:h,label:m,legendType:g,xAxisId:v,yAxisId:b,id:w}=t,S=GA(t,kDe),{needClip:j}=UA(v,b),_=BA(),k=Cl(),E=mr(),T=Ke(D=>bDe(D,v,b,E,w));if(k!=="horizontal"&&k!=="vertical"||T==null||_==null)return null;var{height:A,width:O,x:I,y:P}=_;return x.createElement($De,Af({},S,{id:w,connectNulls:l,dot:c,activeDot:n,animateNewValues:r,animationBegin:a,animationDuration:i,animationEasing:s,isAnimationActive:h,hide:d,label:m,legendType:g,xAxisId:v,yAxisId:b,points:T,layout:k,height:A,width:O,left:I,top:P,needClip:j}))}function BDe(e){var{layout:t,xAxis:n,yAxis:r,xAxisTicks:a,yAxisTicks:i,dataKey:s,bandSize:l,displayedData:c}=e;return c.map((d,h)=>{var m=$t(d,s);if(t==="horizontal"){var g=e$({axis:n,ticks:a,bandSize:l,entry:d,index:h}),v=cn(m)?null:r.scale.map(m);return{x:g,y:v??null,value:m,payload:d}}var b=cn(m)?null:n.scale.map(m),w=e$({axis:r,ticks:i,bandSize:l,entry:d,index:h});return b==null||w==null?null:{x:b,y:w,value:m,payload:d}}).filter(Boolean)}function FDe(e){var t=Xn(e,pY),n=mr();return x.createElement(qA,{id:t.id,type:"line"},r=>x.createElement(x.Fragment,null,x.createElement(WW,{legendPayload:ADe(t)}),x.createElement(TDe,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:r}),x.createElement(XW,{type:"line",id:r,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:n}),x.createElement(qDe,Af({},t,{id:r}))))}var gY=x.memo(FDe,th);gY.displayName="Line";function Tl(e,t){var n,r;return(n=(r=e.graphicalItems.cartesianItems.find(a=>a.id===t))===null||r===void 0?void 0:r.xAxisId)!==null&&n!==void 0?n:QW}function Ol(e,t){var n,r;return(n=(r=e.graphicalItems.cartesianItems.find(a=>a.id===t))===null||r===void 0?void 0:r.yAxisId)!==null&&n!==void 0?n:QW}var HDe="Invariant failed";function UDe(e,t){throw new Error(HDe)}function N2(){return N2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},N2.apply(null,arguments)}function VA(e){return x.createElement(RA,N2({shapeType:"rectangle",activeClassName:"recharts-active-bar",inActiveClassName:"recharts-inactive-bar"},e))}var GDe=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(r,a)=>{if(He(t))return t;var i=He(r)||cn(r);return i?t(r,a):(i||UDe(),n)}},VDe=(e,t,n)=>n,KDe=(e,t)=>t,vh=he([oy,KDe],(e,t)=>e.filter(n=>n.type==="bar").find(n=>n.id===t)),WDe=he([vh],e=>e==null?void 0:e.maxBarSize),YDe=(e,t,n,r)=>r,XDe=he([Rt,oy,Tl,Ol,VDe],(e,t,n,r,a)=>t.filter(i=>e==="horizontal"?i.xAxisId===n:i.yAxisId===r).filter(i=>i.isPanorama===a).filter(i=>i.hide===!1).filter(i=>i.type==="bar")),ZDe=(e,t,n)=>{var r=Rt(e),a=Tl(e,t),i=Ol(e,t);if(!(a==null||i==null))return r==="horizontal"?S2(e,"yAxis",i,n):S2(e,"xAxis",a,n)},QDe=(e,t)=>{var n=Rt(e),r=Tl(e,t),a=Ol(e,t);if(!(r==null||a==null))return n==="horizontal"?Xq(e,"xAxis",r):Xq(e,"yAxis",a)},JDe=he([XDe,y_e,QDe],nPe),eRe=(e,t,n)=>{var r,a,i=vh(e,t);if(i==null)return 0;var s=Tl(e,t),l=Ol(e,t);if(s==null||l==null)return 0;var c=Rt(e),d=PV(e),{maxBarSize:h}=i,m=cn(h)?d:h,g,v;return c==="horizontal"?(g=ro(e,"xAxis",s,n),v=no(e,"xAxis",s,n)):(g=ro(e,"yAxis",l,n),v=no(e,"yAxis",l,n)),(r=(a=Xu(g,v,!0))!==null&&a!==void 0?a:m)!==null&&r!==void 0?r:0},vY=(e,t,n)=>{var r=Rt(e),a=Tl(e,t),i=Ol(e,t);if(!(a==null||i==null)){var s,l;return r==="horizontal"?(s=ro(e,"xAxis",a,n),l=no(e,"xAxis",a,n)):(s=ro(e,"yAxis",i,n),l=no(e,"yAxis",i,n)),Xu(s,l)}},tRe=he([JDe,PV,v_e,DV,eRe,vY,WDe],oPe),nRe=(e,t,n)=>{var r=Tl(e,t);if(r!=null)return ro(e,"xAxis",r,n)},rRe=(e,t,n)=>{var r=Ol(e,t);if(r!=null)return ro(e,"yAxis",r,n)},aRe=(e,t,n)=>{var r=Tl(e,t);if(r!=null)return no(e,"xAxis",r,n)},iRe=(e,t,n)=>{var r=Ol(e,t);if(r!=null)return no(e,"yAxis",r,n)},sRe=he([tRe,vh],uPe),oRe=he([ZDe,vh],lPe),lRe=he([Fn,vE,nRe,rRe,aRe,iRe,sRe,Rt,l_e,vY,oRe,vh,YDe],(e,t,n,r,a,i,s,l,c,d,h,m,g)=>{var{chartData:v,dataStartIndex:b,dataEndIndex:w}=c;if(!(m==null||s==null||t==null||l!=="horizontal"&&l!=="vertical"||n==null||r==null||a==null||i==null||d==null)){var{data:S}=m,j;if(S!=null&&S.length>0?j=S:j=v==null?void 0:v.slice(b,w+1),j!=null)return IRe({layout:l,barSettings:m,pos:s,parentViewBox:t,bandSize:d,xAxis:n,yAxis:r,xAxisTicks:a,yAxisTicks:i,stackedData:h,displayedData:j,offset:e,cells:g,dataStartIndex:b})}}),uRe=["index"];function E2(){return E2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},E2.apply(null,arguments)}function cRe(e,t){if(e==null)return{};var n,r,a=dRe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function dRe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var yY=x.createContext(void 0),fRe=e=>{var t=x.useContext(yY);if(t!=null)return t.stackId;if(e!=null)return jSe(e)},hRe=(e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t),mRe=e=>{var t=x.useContext(yY);if(t!=null){var{stackId:n}=t;return"url(#".concat(hRe(n,e),")")}},xY=e=>{var{index:t}=e,n=cRe(e,uRe),r=mRe(t);return x.createElement(Bn,E2({className:"recharts-bar-stack-layer",clipPath:r},n))},pRe=["onMouseEnter","onMouseLeave","onClick"],gRe=["value","background","tooltipPosition"],vRe=["id"],yRe=["onMouseEnter","onClick","onMouseLeave"];function so(){return so=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},so.apply(null,arguments)}function oF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function gr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oF(Object(n),!0).forEach(function(r){xRe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xRe(e,t,n){return(t=bRe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bRe(e){var t=wRe(e,"string");return typeof t=="symbol"?t:t+""}function wRe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Pg(e,t){if(e==null)return{};var n,r,a=SRe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function SRe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var jRe=e=>{var{dataKey:t,name:n,fill:r,legendType:a,hide:i}=e;return[{inactive:i,dataKey:t,type:a,color:r,value:pc(n,t),payload:e}]},kRe=x.memo(e=>{var{dataKey:t,stroke:n,strokeWidth:r,fill:a,name:i,hide:s,unit:l,tooltipType:c,id:d}=e,h={dataDefinedOnItem:void 0,getPosition:_l,settings:{stroke:n,strokeWidth:r,fill:a,dataKey:t,nameKey:void 0,name:pc(i,t),hide:s,type:c,color:a,unit:l,graphicalItemId:d}};return x.createElement($A,{tooltipEntrySettings:h})});function _Re(e){var t=Ke(ao),{data:n,dataKey:r,background:a,allOtherBarProps:i}=e,{onMouseEnter:s,onMouseLeave:l,onClick:c}=i,d=Pg(i,pRe),h=IA(s,r,i.id),m=LA(l),g=zA(c,r,i.id);if(!a||n==null)return null;var v=ol(a);return x.createElement(Pr,{zIndex:cPe(a,Pn.barBackground)},n.map((b,w)=>{var{value:S,background:j,tooltipPosition:_}=b,k=Pg(b,gRe);if(!j)return null;var E=h(b,w),T=m(b,w),A=g(b,w),O=gr(gr(gr(gr(gr({option:a,isActive:String(w)===t},k),{},{fill:"#eee"},j),v),Tv(d,b,w)),{},{onMouseEnter:E,onMouseLeave:T,onClick:A,dataKey:r,index:w,className:"recharts-bar-background-rectangle"});return x.createElement(VA,so({key:"background-bar-".concat(w)},O))}))}function CRe(e){var{showLabels:t,children:n,rects:r}=e,a=r==null?void 0:r.map(i=>{var s={x:i.x,y:i.y,width:i.width,lowerWidth:i.width,upperWidth:i.width,height:i.height};return gr(gr({},s),{},{value:i.value,payload:i.payload,parentViewBox:i.parentViewBox,viewBox:s,fill:i.fill})});return x.createElement(zW,{value:t?a:void 0},n)}function NRe(e){var{shape:t,activeBar:n,baseProps:r,entry:a,index:i,dataKey:s}=e,l=Ke(ao),c=Ke(kA),d=n&&String(a.originalDataIndex)===l&&(c==null||s===c),[h,m]=x.useState(!1),[g,v]=x.useState(!1);x.useEffect(()=>{var k;return d?(m(!0),k=requestAnimationFrame(()=>{v(!0)})):v(!1),()=>{cancelAnimationFrame(k)}},[d]);var b=x.useCallback(()=>{d||m(!1)},[d]),w=d&&g,S=d||h,j;d?n===!0?j=t:j=n:j=t;var _=x.createElement(VA,so({},r,{name:String(r.name)},a,{isActive:w,option:j,index:i,dataKey:s,onTransitionEnd:b}));return S?x.createElement(Pr,{zIndex:Pn.activeBar},x.createElement(xY,{index:a.originalDataIndex},_)):_}function ERe(e){var{shape:t,baseProps:n,entry:r,index:a,dataKey:i}=e;return x.createElement(VA,so({},n,{name:String(n.name)},r,{isActive:!1,option:t,index:a,dataKey:i}))}function ARe(e){var t,{data:n,props:r}=e,a=(t=Qr(r))!==null&&t!==void 0?t:{},{id:i}=a,s=Pg(a,vRe),{shape:l,dataKey:c,activeBar:d}=r,{onMouseEnter:h,onClick:m,onMouseLeave:g}=r,v=Pg(r,yRe),b=IA(h,c,i),w=LA(g),S=zA(m,c,i);return n?x.createElement(x.Fragment,null,n.map((j,_)=>x.createElement(xY,so({index:j.originalDataIndex,key:"rectangle-".concat(j==null?void 0:j.x,"-").concat(j==null?void 0:j.y,"-").concat(j==null?void 0:j.value,"-").concat(_),className:"recharts-bar-rectangle"},Tv(v,j,_),{onMouseEnter:b(j,_),onMouseLeave:w(j,_),onClick:S(j,_)}),d?x.createElement(NRe,{shape:l,activeBar:d,baseProps:s,entry:j,index:_,dataKey:c}):x.createElement(ERe,{shape:l,baseProps:s,entry:j,index:_,dataKey:c})))):null}function TRe(e){var{props:t,previousRectanglesRef:n}=e,{data:r,layout:a,isAnimationActive:i,animationBegin:s,animationDuration:l,animationEasing:c,onAnimationEnd:d,onAnimationStart:h}=t,m=n.current,g=ah(t,"recharts-bar-"),[v,b]=x.useState(!1),w=!v,S=x.useCallback(()=>{typeof d=="function"&&d(),b(!1)},[d]),j=x.useCallback(()=>{typeof h=="function"&&h(),b(!0)},[h]);return x.createElement(CRe,{showLabels:w,rects:r},x.createElement(rh,{animationId:g,begin:s,duration:l,isActive:i,easing:c,onAnimationEnd:S,onAnimationStart:j,key:g},_=>{var k=_===1?r:r==null?void 0:r.map((E,T)=>{var A=m&&m[T];if(A)return gr(gr({},E),{},{x:sn(A.x,E.x,_),y:sn(A.y,E.y,_),width:sn(A.width,E.width,_),height:sn(A.height,E.height,_)});if(a==="horizontal"){var O=sn(0,E.height,_),I=sn(E.stackedBarStart,E.y,_);return gr(gr({},E),{},{y:I,height:O})}var P=sn(0,E.width,_),D=sn(E.stackedBarStart,E.x,_);return gr(gr({},E),{},{width:P,x:D})});return _>0&&(n.current=k??null),k==null?null:x.createElement(Bn,null,x.createElement(ARe,{props:t,data:k}))}),x.createElement(OA,{label:t.label}),t.children)}function ORe(e){var t=x.useRef(null);return x.createElement(TRe,{previousRectanglesRef:t,props:e})}var bY=0,MRe=(e,t)=>{var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:$t(e,t)}};class PRe extends x.PureComponent{render(){var{hide:t,data:n,dataKey:r,className:a,xAxisId:i,yAxisId:s,needClip:l,background:c,id:d}=this.props;if(t||n==null)return null;var h=zt("recharts-bar",a),m=d;return x.createElement(Bn,{className:h,id:d},l&&x.createElement("defs",null,x.createElement(uY,{clipPathId:m,xAxisId:i,yAxisId:s})),x.createElement(Bn,{className:"recharts-bar-rectangles",clipPath:l?"url(#clipPath-".concat(m,")"):void 0},x.createElement(_Re,{data:n,dataKey:r,background:c,allOtherBarProps:this.props}),x.createElement(ORe,this.props)))}}var DRe={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:bY,xAxisId:0,yAxisId:0,zIndex:Pn.bar};function RRe(e){var{xAxisId:t,yAxisId:n,hide:r,legendType:a,minPointSize:i,activeBar:s,animationBegin:l,animationDuration:c,animationEasing:d,isAnimationActive:h}=e,{needClip:m}=UA(t,n),g=Cl(),v=mr(),b=DA(e.children,gh),w=Ke(_=>lRe(_,e.id,v,b));if(g!=="vertical"&&g!=="horizontal")return null;var S,j=w==null?void 0:w[0];return j==null||j.height==null||j.width==null?S=0:S=g==="vertical"?j.height/2:j.width/2,x.createElement(lY,{xAxisId:t,yAxisId:n,data:w,dataPointFormatter:MRe,errorBarOffset:S},x.createElement(PRe,so({},e,{layout:g,needClip:m,data:w,xAxisId:t,yAxisId:n,hide:r,legendType:a,minPointSize:i,activeBar:s,animationBegin:l,animationDuration:c,animationEasing:d,isAnimationActive:h})))}function IRe(e){var{layout:t,barSettings:{dataKey:n,minPointSize:r,hasCustomShape:a},pos:i,bandSize:s,xAxis:l,yAxis:c,xAxisTicks:d,yAxisTicks:h,stackedData:m,displayedData:g,offset:v,cells:b,parentViewBox:w,dataStartIndex:S}=e,j=t==="horizontal"?c:l,_=m?j.scale.domain():null,k=kSe({numericAxis:j}),E=j.scale.map(k);return g.map((T,A)=>{var O,I,P,D,q,z;if(m){var F=m[A+S];if(F==null)return null;O=ySe(F,_)}else O=$t(T,n),Array.isArray(O)||(O=[k,O]);var R=GDe(r,bY)(O[1],A);if(t==="horizontal"){var M,L=c.scale.map(O[0]),G=c.scale.map(O[1]);if(L==null||G==null)return null;I=t$({axis:l,ticks:d,bandSize:s,offset:i.offset,entry:T,index:A}),P=(M=G??L)!==null&&M!==void 0?M:void 0,D=i.size;var W=L-G;if(q=fi(W)?0:W,z={x:I,y:v.top,width:D,height:v.height},Math.abs(R)>0&&Math.abs(q)<Math.abs(R)){var Y=Yn(q||R)*(Math.abs(R)-Math.abs(q));P-=Y,q+=Y}}else{var B=l.scale.map(O[0]),H=l.scale.map(O[1]);if(B==null||H==null)return null;if(I=B,P=t$({axis:c,ticks:h,bandSize:s,offset:i.offset,entry:T,index:A}),D=H-B,q=i.size,z={x:v.left,y:P,width:v.width,height:q},Math.abs(R)>0&&Math.abs(D)<Math.abs(R)){var K=Yn(D||R)*(Math.abs(R)-Math.abs(D));D+=K}}if(I==null||P==null||D==null||q==null||!a&&(D===0||q===0))return null;var U=gr(gr({},T),{},{stackedBarStart:E,x:I,y:P,width:D,height:q,value:m?O:O[1],payload:T,background:z,tooltipPosition:{x:I+D/2,y:P+q/2},parentViewBox:w,originalDataIndex:A},b&&b[A]&&b[A].props);return U}).filter(Boolean)}function LRe(e){var t=Xn(e,DRe),n=fRe(t.stackId),r=mr();return x.createElement(qA,{id:t.id,type:"bar"},a=>x.createElement(x.Fragment,null,x.createElement(WW,{legendPayload:jRe(t)}),x.createElement(kRe,{dataKey:t.dataKey,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:a}),x.createElement(XW,{type:"bar",id:a,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:n,hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:r,hasCustomShape:t.shape!=null}),x.createElement(Pr,{zIndex:t.zIndex},x.createElement(RRe,so({},t,{id:a})))))}var _p=x.memo(LRe,th);_p.displayName="Bar";var zRe=["domain","range"],$Re=["domain","range"];function lF(e,t){if(e==null)return{};var n,r,a=qRe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function qRe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function uF(e,t){return e===t?!0:Array.isArray(e)&&e.length===2&&Array.isArray(t)&&t.length===2?e[0]===t[0]&&e[1]===t[1]:!1}function wY(e,t){if(e===t)return!0;var{domain:n,range:r}=e,a=lF(e,zRe),{domain:i,range:s}=t,l=lF(t,$Re);return!uF(n,i)||!uF(r,s)?!1:th(a,l)}var BRe=["type"],FRe=["dangerouslySetInnerHTML","ticks","scale"],HRe=["id","scale"];function A2(){return A2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},A2.apply(null,arguments)}function cF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function dF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cF(Object(n),!0).forEach(function(r){URe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function URe(e,t,n){return(t=GRe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GRe(e){var t=VRe(e,"string");return typeof t=="symbol"?t:t+""}function VRe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function T2(e,t){if(e==null)return{};var n,r,a=KRe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function KRe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function WRe(e){var t=Jt(),n=x.useRef(null),r=QG(),{type:a}=e,i=T2(e,BRe),s=Xv(r,"xAxis",a),l=x.useMemo(()=>{if(s!=null)return dF(dF({},i),{},{type:s})},[i,s]);return x.useLayoutEffect(()=>{l!=null&&(n.current===null?t(qMe(l)):n.current!==l&&t(BMe({prev:n.current,next:l})),n.current=l)},[l,t]),x.useLayoutEffect(()=>()=>{n.current&&(t(FMe(n.current)),n.current=null)},[t]),null}var YRe=e=>{var{xAxisId:t,className:n}=e,r=Ke(vE),a=mr(),i="xAxis",s=Ke(j=>WK(j,i,t,a)),l=Ke(j=>GK(j,t)),c=Ke(j=>NNe(j,t)),d=Ke(j=>jK(j,t));if(l==null||c==null||d==null)return null;var{dangerouslySetInnerHTML:h,ticks:m,scale:g}=e,v=T2(e,FRe),{id:b,scale:w}=d,S=T2(d,HRe);return x.createElement(HA,A2({},v,S,{x:c.x,y:c.y,width:l.width,height:l.height,className:zt("recharts-".concat(i," ").concat(i),n),viewBox:r,ticks:s,axisType:i,axisId:t}))},XRe={allowDataOverflow:zn.allowDataOverflow,allowDecimals:zn.allowDecimals,allowDuplicatedCategory:zn.allowDuplicatedCategory,angle:zn.angle,axisLine:Qi.axisLine,height:zn.height,hide:!1,includeHidden:zn.includeHidden,interval:zn.interval,label:!1,minTickGap:zn.minTickGap,mirror:zn.mirror,orientation:zn.orientation,padding:zn.padding,reversed:zn.reversed,scale:zn.scale,tick:zn.tick,tickCount:zn.tickCount,tickLine:Qi.tickLine,tickSize:Qi.tickSize,type:zn.type,niceTicks:zn.niceTicks,xAxisId:0},ZRe=e=>{var t=Xn(e,XRe);return x.createElement(x.Fragment,null,x.createElement(WRe,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,niceTicks:t.niceTicks}),x.createElement(YRe,t))},O2=x.memo(ZRe,wY);O2.displayName="XAxis";var QRe=["type"],JRe=["dangerouslySetInnerHTML","ticks","scale"],e5e=["id","scale"];function M2(){return M2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},M2.apply(null,arguments)}function fF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function hF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fF(Object(n),!0).forEach(function(r){t5e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function t5e(e,t,n){return(t=n5e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n5e(e){var t=r5e(e,"string");return typeof t=="symbol"?t:t+""}function r5e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function P2(e,t){if(e==null)return{};var n,r,a=a5e(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function a5e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function i5e(e){var t=Jt(),n=x.useRef(null),r=QG(),{type:a}=e,i=P2(e,QRe),s=Xv(r,"yAxis",a),l=x.useMemo(()=>{if(s!=null)return hF(hF({},i),{},{type:s})},[s,i]);return x.useLayoutEffect(()=>{l!=null&&(n.current===null?t(HMe(l)):n.current!==l&&t(UMe({prev:n.current,next:l})),n.current=l)},[l,t]),x.useLayoutEffect(()=>()=>{n.current&&(t(GMe(n.current)),n.current=null)},[t]),null}function s5e(e){var{yAxisId:t,className:n,width:r,label:a}=e,i=x.useRef(null),s=x.useRef(null),l=Ke(vE),c=mr(),d=Jt(),h="yAxis",m=Ke(A=>VK(A,t)),g=Ke(A=>ANe(A,t)),v=Ke(A=>WK(A,h,t,c)),b=Ke(A=>kK(A,t));if(x.useLayoutEffect(()=>{if(!(r!=="auto"||!m||TA(a)||x.isValidElement(a)||b==null)){var A=i.current;if(A){var O=A.getCalculatedWidth();Math.round(m.width)!==Math.round(O)&&d(VMe({id:t,width:O}))}}},[v,m,d,a,t,r,b]),m==null||g==null||b==null)return null;var{dangerouslySetInnerHTML:w,ticks:S,scale:j}=e,_=P2(e,JRe),{id:k,scale:E}=b,T=P2(b,e5e);return x.createElement(HA,M2({},_,T,{ref:i,labelRef:s,x:g.x,y:g.y,tickTextProps:r==="auto"?{width:void 0}:{width:r},width:m.width,height:m.height,className:zt("recharts-".concat(h," ").concat(h),n),viewBox:l,ticks:v,axisType:h,axisId:t}))}var o5e={allowDataOverflow:$n.allowDataOverflow,allowDecimals:$n.allowDecimals,allowDuplicatedCategory:$n.allowDuplicatedCategory,angle:$n.angle,axisLine:Qi.axisLine,hide:!1,includeHidden:$n.includeHidden,interval:$n.interval,label:!1,minTickGap:$n.minTickGap,mirror:$n.mirror,orientation:$n.orientation,padding:$n.padding,reversed:$n.reversed,scale:$n.scale,tick:$n.tick,tickCount:$n.tickCount,tickLine:Qi.tickLine,tickSize:Qi.tickSize,type:$n.type,niceTicks:$n.niceTicks,width:$n.width,yAxisId:0},l5e=e=>{var t=Xn(e,o5e);return x.createElement(x.Fragment,null,x.createElement(i5e,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter,niceTicks:t.niceTicks}),x.createElement(s5e,t))},D2=x.memo(l5e,wY);D2.displayName="YAxis";var u5e=(e,t)=>t,KA=he([u5e,Rt,BV,Zn,fW,vs,ZEe,Fn],aAe);function c5e(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function WA(e){var t=e.currentTarget.getBoundingClientRect(),n,r;if(c5e(e)){var a=e.currentTarget.getBBox();n=a.width>0?t.width/a.width:1,r=a.height>0?t.height/a.height:1}else{var i=e.currentTarget;n=i.offsetWidth>0?t.width/i.offsetWidth:1,r=i.offsetHeight>0?t.height/i.offsetHeight:1}var s=(l,c)=>({relativeX:Math.round((l-t.left)/n),relativeY:Math.round((c-t.top)/r)});return"touches"in e?Array.from(e.touches).map(l=>s(l.clientX,l.clientY)):s(e.clientX,e.clientY)}var SY=Jr("mouseClick"),jY=Zf();jY.startListening({actionCreator:SY,effect:(e,t)=>{var n=e.payload,r=KA(t.getState(),WA(n));(r==null?void 0:r.activeIndex)!=null&&t.dispatch(GNe({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var R2=Jr("mouseMove"),kY=Zf(),ku=null,Bo=null,aC=null;kY.startListening({actionCreator:R2,effect:(e,t)=>{var n=e.payload,r=t.getState(),{throttleDelay:a,throttledEvents:i}=r.eventSettings,s=i==="all"||(i==null?void 0:i.includes("mousemove"));ku!==null&&(cancelAnimationFrame(ku),ku=null),Bo!==null&&(typeof a!="number"||!s)&&(clearTimeout(Bo),Bo=null),aC=WA(n);var l=()=>{var c=t.getState(),d=mh(c,c.tooltip.settings.shared);if(!aC){ku=null,Bo=null;return}if(d==="axis"){var h=KA(c,aC);(h==null?void 0:h.activeIndex)!=null?t.dispatch(nW({activeIndex:h.activeIndex,activeDataKey:void 0,activeCoordinate:h.activeCoordinate})):t.dispatch(tW())}ku=null,Bo=null};if(!s){l();return}a==="raf"?ku=requestAnimationFrame(l):typeof a=="number"&&Bo===null&&(Bo=setTimeout(l,a))}});function d5e(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":e==="children"&&typeof t=="object"&&t!==null?"<<CHILDREN>>":t}var mF={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},_Y=hr({name:"rootProps",initialState:mF,reducers:{updateOptions:(e,t)=>{var n;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(n=t.payload.barGap)!==null&&n!==void 0?n:mF.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),f5e=_Y.reducer,{updateOptions:h5e}=_Y.actions,m5e=null,p5e={updatePolarOptions:(e,t)=>e===null?t.payload:(e.startAngle=t.payload.startAngle,e.endAngle=t.payload.endAngle,e.cx=t.payload.cx,e.cy=t.payload.cy,e.innerRadius=t.payload.innerRadius,e.outerRadius=t.payload.outerRadius,e)},CY=hr({name:"polarOptions",initialState:m5e,reducers:p5e}),{updatePolarOptions:g5e}=CY.actions,v5e=CY.reducer,NY=Jr("keyDown"),EY=Jr("focus"),AY=Jr("blur"),gy=Zf(),_u=null,Fo=null,op=null;gy.startListening({actionCreator:NY,effect:(e,t)=>{op=e.payload,_u!==null&&(cancelAnimationFrame(_u),_u=null);var n=t.getState(),{throttleDelay:r,throttledEvents:a}=n.eventSettings,i=a==="all"||a.includes("keydown");Fo!==null&&(typeof r!="number"||!i)&&(clearTimeout(Fo),Fo=null);var s=()=>{try{var l=t.getState(),c=l.rootProps.accessibilityLayer!==!1;if(!c)return;var{keyboardInteraction:d}=l.tooltip,h=op;if(h!=="ArrowRight"&&h!=="ArrowLeft"&&h!=="Enter")return;var m=Yd(d,pl(l),tc(l),nc(l)),g=m==null?-1:Number(m),v=!Number.isFinite(g)||g<0,b=vs(l),w=pl(l),S=mh(l,l.tooltip.settings.shared);if(h==="Enter"){if(v)return;var j=Ng(l,S,"hover",String(d.index));t.dispatch(Cg({active:!d.active,activeIndex:d.index,activeCoordinate:j}));return}var _=DNe(l),k=_==="left-to-right"?1:-1,E=h==="ArrowRight"?1:-1,T;if(v){var A=tc(l),O=nc(l),I=E*k,P=R=>({active:!1,index:String(R),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(T=-1,I>0){for(var D=0;D<w.length;D++)if(Yd(P(D),w,A,O)!=null){T=D;break}}else for(var q=w.length-1;q>=0;q--)if(Yd(P(q),w,A,O)!=null){T=q;break}if(T<0)return}else{T=g+E*k;var z=(b==null?void 0:b.length)||w.length;if(z===0||T>=z||T<0)return}var F=Ng(l,S,"hover",String(T));t.dispatch(Cg({active:!0,activeIndex:T.toString(),activeCoordinate:F}))}finally{_u=null,Fo=null}};if(!i){s();return}r==="raf"?_u=requestAnimationFrame(s):typeof r=="number"&&Fo===null&&(s(),op=null,Fo=setTimeout(()=>{op?s():(Fo=null,_u=null)},r))}});gy.startListening({actionCreator:EY,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:a}=n.tooltip;if(!a.active&&a.index==null){var i="0",s=mh(n,n.tooltip.settings.shared),l=Ng(n,s,"hover",String(i));t.dispatch(Cg({active:!0,activeIndex:i,activeCoordinate:l}))}}}});gy.startListening({actionCreator:AY,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:a}=n.tooltip;a.active&&t.dispatch(Cg({active:!1,activeIndex:a.index,activeCoordinate:a.coordinate}))}}});function TY(e){e.persist();var{currentTarget:t}=e;return new Proxy(e,{get:(n,r)=>{if(r==="currentTarget")return t;var a=Reflect.get(n,r);return typeof a=="function"?a.bind(n):a}})}var ha=Jr("externalEvent"),OY=Zf(),lp=new Map,Od=new Map,iC=new Map;OY.startListening({actionCreator:ha,effect:(e,t)=>{var{handler:n,reactEvent:r}=e.payload;if(n!=null){var a=r.type,i=TY(r);iC.set(a,{handler:n,reactEvent:i});var s=lp.get(a);s!==void 0&&(cancelAnimationFrame(s),lp.delete(a));var l=t.getState(),{throttleDelay:c,throttledEvents:d}=l.eventSettings,h=d,m=h==="all"||(h==null?void 0:h.includes(a)),g=Od.get(a);g!==void 0&&(typeof c!="number"||!m)&&(clearTimeout(g),Od.delete(a));var v=()=>{var S=iC.get(a);try{if(!S)return;var{handler:j,reactEvent:_}=S,k=t.getState(),E={activeCoordinate:REe(k),activeDataKey:kA(k),activeIndex:ao(k),activeLabel:pW(k),activeTooltipIndex:ao(k),isTooltipActive:IEe(k)};j&&j(E,_)}finally{lp.delete(a),Od.delete(a),iC.delete(a)}};if(!m){v();return}if(c==="raf"){var b=requestAnimationFrame(v);lp.set(a,b)}else if(typeof c=="number"){if(!Od.has(a)){v();var w=setTimeout(v,c);Od.set(a,w)}}else v()}}});var y5e=he([Sc],e=>e.tooltipItemPayloads),x5e=he([y5e,(e,t)=>t,(e,t,n)=>n],(e,t,n)=>{if(t!=null){var r=e.find(i=>i.settings.graphicalItemId===n);if(r!=null){var{getPosition:a}=r;if(a!=null)return a(t)}}}),MY=Jr("touchMove"),PY=Zf(),Ho=null,Ks=null,pF=null,Md=null;PY.startListening({actionCreator:MY,effect:(e,t)=>{var n=e.payload;if(!(n.touches==null||n.touches.length===0)){Md=TY(n);var r=t.getState(),{throttleDelay:a,throttledEvents:i}=r.eventSettings,s=i==="all"||i.includes("touchmove");Ho!==null&&(cancelAnimationFrame(Ho),Ho=null),Ks!==null&&(typeof a!="number"||!s)&&(clearTimeout(Ks),Ks=null),pF=Array.from(n.touches).map(c=>WA({clientX:c.clientX,clientY:c.clientY,currentTarget:n.currentTarget}));var l=()=>{if(Md!=null){var c=t.getState(),d=mh(c,c.tooltip.settings.shared);if(d==="axis"){var h,m=(h=pF)===null||h===void 0?void 0:h[0];if(m==null){Ho=null,Ks=null;return}var g=KA(c,m);(g==null?void 0:g.activeIndex)!=null&&t.dispatch(nW({activeIndex:g.activeIndex,activeDataKey:void 0,activeCoordinate:g.activeCoordinate}))}else if(d==="item"){var v,b=Md.touches[0];if(document.elementFromPoint==null||b==null)return;var w=document.elementFromPoint(b.clientX,b.clientY);if(!w||!w.getAttribute)return;var S=w.getAttribute(UG),j=(v=w.getAttribute(GG))!==null&&v!==void 0?v:void 0,_=Al(c).find(T=>T.id===j);if(S==null||_==null||j==null)return;var{dataKey:k}=_,E=x5e(c,S,j);t.dispatch(eW({activeDataKey:k,activeIndex:S,activeCoordinate:E,activeGraphicalItemId:j}))}Ho=null,Ks=null}};if(!s){l();return}a==="raf"?Ho=requestAnimationFrame(l):typeof a=="number"&&Ks===null&&(l(),Md=null,Ks=setTimeout(()=>{Md?l():(Ks=null,Ho=null)},a))}}});var YA={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},DY=hr({name:"eventSettings",initialState:YA,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),{setEventSettings:b5e}=DY.actions,w5e=DY.reducer,S5e=fG({brush:dPe,cartesianAxis:KMe,chartData:DAe,errorBars:cDe,eventSettings:w5e,graphicalItems:ZOe,layout:hSe,legend:yje,options:AAe,polarAxis:cOe,polarOptions:v5e,referenceElements:pPe,renderedTicks:MPe,rootProps:f5e,tooltip:VNe,zIndex:vAe}),j5e=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return zwe({reducer:S5e,preloadedState:t,middleware:r=>{var a;return r({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((a="es6")!==null&&a!==void 0?a:"")}).concat([jY.middleware,kY.middleware,gy.middleware,OY.middleware,PY.middleware])},enhancers:r=>{var a=r;return typeof r=="function"&&(a=r()),a.concat(NG({type:"raf"}))},devTools:{serialize:{replacer:d5e},name:"recharts-".concat(n)}})};function RY(e){var{preloadedState:t,children:n,reduxStoreName:r}=e,a=mr(),i=x.useRef(null);if(a)return n;i.current==null&&(i.current=j5e(t,r));var s=cE;return x.createElement(Dje,{context:s,store:i.current},n)}function k5e(e){var{layout:t,margin:n}=e,r=Jt(),a=mr();return x.useEffect(()=>{a||(r(cSe(t)),r(uSe(n)))},[r,a,t,n]),null}var IY=x.memo(k5e,th);function LY(e){var t=Jt();return x.useEffect(()=>{t(h5e(e))},[t,e]),null}var _5e=e=>{var t=Jt();return x.useEffect(()=>{t(b5e(e))},[t,e]),null},zY=x.memo(_5e,th);function gF(e){var{zIndex:t,isPanorama:n}=e,r=x.useRef(null),a=Jt();return x.useLayoutEffect(()=>(r.current&&a(pAe({zIndex:t,element:r.current,isPanorama:n})),()=>{a(gAe({zIndex:t,isPanorama:n}))}),[a,t,n]),x.createElement("g",{tabIndex:-1,ref:r,className:"recharts-zIndex-layer_".concat(t)})}function vF(e){var{children:t,isPanorama:n}=e,r=Ke(sAe);if(!r||r.length===0)return t;var a=r.filter(s=>s<0),i=r.filter(s=>s>0);return x.createElement(x.Fragment,null,a.map(s=>x.createElement(gF,{key:s,zIndex:s,isPanorama:n})),t,i.map(s=>x.createElement(gF,{key:s,zIndex:s,isPanorama:n})))}var C5e=["children"];function N5e(e,t){if(e==null)return{};var n,r,a=E5e(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function E5e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Dg(){return Dg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dg.apply(null,arguments)}var A5e={width:"100%",height:"100%",display:"block"},T5e=x.forwardRef((e,t)=>{var n=XG(),r=ZG(),a=dV();if(!mi(n)||!mi(r))return null;var{children:i,otherAttributes:s,title:l,desc:c}=e,d,h;return s!=null&&(typeof s.tabIndex=="number"?d=s.tabIndex:d=a?0:void 0,typeof s.role=="string"?h=s.role:h=a?"application":void 0),x.createElement(A7,Dg({},s,{title:l,desc:c,role:h,tabIndex:d,width:n,height:r,style:A5e,ref:t}),i)}),O5e=e=>{var{children:t}=e,n=Ke(Uv);if(!n)return null;var{width:r,height:a,y:i,x:s}=n;return x.createElement(A7,{width:r,height:a,x:s,y:i},t)},yF=x.forwardRef((e,t)=>{var{children:n}=e,r=N5e(e,C5e),a=mr();return a?x.createElement(O5e,null,x.createElement(vF,{isPanorama:!0},n)):x.createElement(T5e,Dg({ref:t},r),x.createElement(vF,{isPanorama:!1},n))});function M5e(){var e=Jt(),[t,n]=x.useState(null),r=Ke(TSe);return x.useEffect(()=>{if(t!=null){var a=t.getBoundingClientRect(),i=a.width/t.offsetWidth;Nt(i)&&i!==r&&e(fSe(i))}},[t,e,r]),n}function xF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function P5e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xF(Object(n),!0).forEach(function(r){D5e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function D5e(e,t,n){return(t=R5e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R5e(e){var t=I5e(e,"string");return typeof t=="symbol"?t:t+""}function I5e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function to(){return to=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},to.apply(null,arguments)}var L5e=()=>(HAe(),null);function Rg(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var z5e=x.forwardRef((e,t)=>{var n,r,a=x.useRef(null),[i,s]=x.useState({containerWidth:Rg((n=e.style)===null||n===void 0?void 0:n.width),containerHeight:Rg((r=e.style)===null||r===void 0?void 0:r.height)}),l=x.useCallback((d,h)=>{s(m=>{var g=Math.round(d),v=Math.round(h);return m.containerWidth===g&&m.containerHeight===v?m:{containerWidth:g,containerHeight:v}})},[]),c=x.useCallback(d=>{if(typeof t=="function"&&t(d),a.current!=null&&(a.current.disconnect(),a.current=null),d!=null&&typeof ResizeObserver<"u"){var{width:h,height:m}=d.getBoundingClientRect();l(h,m);var g=b=>{var w=b[0];if(w!=null){var{width:S,height:j}=w.contentRect;l(S,j)}},v=new ResizeObserver(g);v.observe(d),a.current=v}},[t,l]);return x.useEffect(()=>()=>{var d=a.current;d!=null&&d.disconnect()},[l]),x.createElement(x.Fragment,null,x.createElement(Jf,{width:i.containerWidth,height:i.containerHeight}),x.createElement("div",to({ref:c},e)))}),$5e=x.forwardRef((e,t)=>{var{width:n,height:r}=e,[a,i]=x.useState({containerWidth:Rg(n),containerHeight:Rg(r)}),s=x.useCallback((c,d)=>{i(h=>{var m=Math.round(c),g=Math.round(d);return h.containerWidth===m&&h.containerHeight===g?h:{containerWidth:m,containerHeight:g}})},[]),l=x.useCallback(c=>{if(typeof t=="function"&&t(c),c!=null){var{width:d,height:h}=c.getBoundingClientRect();s(d,h)}},[t,s]);return x.createElement(x.Fragment,null,x.createElement(Jf,{width:a.containerWidth,height:a.containerHeight}),x.createElement("div",to({ref:l},e)))}),q5e=x.forwardRef((e,t)=>{var{width:n,height:r}=e;return x.createElement(x.Fragment,null,x.createElement(Jf,{width:n,height:r}),x.createElement("div",to({ref:t},e)))}),B5e=x.forwardRef((e,t)=>{var{width:n,height:r}=e;return typeof n=="string"||typeof r=="string"?x.createElement($5e,to({},e,{ref:t})):typeof n=="number"&&typeof r=="number"?x.createElement(q5e,to({},e,{width:n,height:r,ref:t})):x.createElement(x.Fragment,null,x.createElement(Jf,{width:n,height:r}),x.createElement("div",to({ref:t},e)))});function F5e(e){return e?z5e:B5e}var H5e=x.forwardRef((e,t)=>{var{children:n,className:r,height:a,onClick:i,onContextMenu:s,onDoubleClick:l,onMouseDown:c,onMouseEnter:d,onMouseLeave:h,onMouseMove:m,onMouseUp:g,onTouchEnd:v,onTouchMove:b,onTouchStart:w,style:S,width:j,responsive:_,dispatchTouchEvents:k=!0}=e,E=x.useRef(null),T=Jt(),[A,O]=x.useState(null),[I,P]=x.useState(null),D=M5e(),q=yE(),z=(q==null?void 0:q.width)>0?q.width:j,F=(q==null?void 0:q.height)>0?q.height:a,R=x.useCallback(se=>{D(se),typeof t=="function"&&t(se),O(se),P(se),se!=null&&(E.current=se)},[D,t,O,P]),M=x.useCallback(se=>{T(SY(se)),T(ha({handler:i,reactEvent:se}))},[T,i]),L=x.useCallback(se=>{T(R2(se)),T(ha({handler:d,reactEvent:se}))},[T,d]),G=x.useCallback(se=>{T(tW()),T(ha({handler:h,reactEvent:se}))},[T,h]),W=x.useCallback(se=>{T(R2(se)),T(ha({handler:m,reactEvent:se}))},[T,m]),Y=x.useCallback(()=>{T(EY())},[T]),B=x.useCallback(()=>{T(AY())},[T]),H=x.useCallback(se=>{T(NY(se.key))},[T]),K=x.useCallback(se=>{T(ha({handler:s,reactEvent:se}))},[T,s]),U=x.useCallback(se=>{T(ha({handler:l,reactEvent:se}))},[T,l]),X=x.useCallback(se=>{T(ha({handler:c,reactEvent:se}))},[T,c]),J=x.useCallback(se=>{T(ha({handler:g,reactEvent:se}))},[T,g]),Q=x.useCallback(se=>{T(ha({handler:w,reactEvent:se}))},[T,w]),re=x.useCallback(se=>{k&&T(MY(se)),T(ha({handler:b,reactEvent:se}))},[T,k,b]),ue=x.useCallback(se=>{T(ha({handler:v,reactEvent:se}))},[T,v]),Z=F5e(_);return x.createElement(jW.Provider,{value:A},x.createElement(jbe.Provider,{value:I},x.createElement(Z,{width:z??(S==null?void 0:S.width),height:F??(S==null?void 0:S.height),className:zt("recharts-wrapper",r),style:P5e({position:"relative",cursor:"default",width:z,height:F},S),onClick:M,onContextMenu:K,onDoubleClick:U,onFocus:Y,onBlur:B,onKeyDown:H,onMouseDown:X,onMouseEnter:L,onMouseLeave:G,onMouseMove:W,onMouseUp:J,onTouchEnd:ue,onTouchMove:re,onTouchStart:Q,ref:R},x.createElement(L5e,null),n)))}),U5e=["width","height","responsive","children","className","style","compact","title","desc"];function G5e(e,t){if(e==null)return{};var n,r,a=V5e(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function V5e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var $Y=x.forwardRef((e,t)=>{var{width:n,height:r,responsive:a,children:i,className:s,style:l,compact:c,title:d,desc:h}=e,m=G5e(e,U5e),g=Qr(m);return c?x.createElement(x.Fragment,null,x.createElement(Jf,{width:n,height:r}),x.createElement(yF,{otherAttributes:g,title:d,desc:h},i)):x.createElement(H5e,{className:s,style:l,width:n,height:r,responsive:a??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},x.createElement(yF,{otherAttributes:g,title:d,desc:h,ref:t},x.createElement(vPe,null,i)))});function I2(){return I2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},I2.apply(null,arguments)}function bF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function K5e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bF(Object(n),!0).forEach(function(r){W5e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function W5e(e,t,n){return(t=Y5e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Y5e(e){var t=X5e(e,"string");return typeof t=="symbol"?t:t+""}function X5e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Z5e={top:5,right:5,bottom:5,left:5},Q5e=K5e({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:Z5e,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},YA),qY=x.forwardRef(function(t,n){var r,a=Xn(t.categoricalChartProps,Q5e),{chartName:i,defaultTooltipEventType:s,validateTooltipEventTypes:l,tooltipPayloadSearcher:c,categoricalChartProps:d}=t,h={chartName:i,defaultTooltipEventType:s,validateTooltipEventTypes:l,tooltipPayloadSearcher:c,eventEmitter:void 0};return x.createElement(RY,{preloadedState:{options:h},reduxStoreName:(r=d.id)!==null&&r!==void 0?r:i},x.createElement(eY,{chartData:d.data}),x.createElement(IY,{layout:a.layout,margin:a.margin}),x.createElement(zY,{throttleDelay:a.throttleDelay,throttledEvents:a.throttledEvents}),x.createElement(LY,{baseValue:a.baseValue,accessibilityLayer:a.accessibilityLayer,barCategoryGap:a.barCategoryGap,maxBarSize:a.maxBarSize,stackOffset:a.stackOffset,barGap:a.barGap,barSize:a.barSize,syncId:a.syncId,syncMethod:a.syncMethod,className:a.className,reverseStackOrder:a.reverseStackOrder}),x.createElement($Y,I2({},a,{ref:n})))}),J5e=["axis"],e3e=x.forwardRef((e,t)=>x.createElement(qY,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:J5e,tooltipPayloadSearcher:AA,categoricalChartProps:e,ref:t})),t3e=["axis","item"],n3e=x.forwardRef((e,t)=>x.createElement(qY,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:t3e,tooltipPayloadSearcher:AA,categoricalChartProps:e,ref:t}));function r3e(e){var t=Jt();return x.useEffect(()=>{t(g5e(e))},[t,e]),null}var a3e=["layout"];function L2(){return L2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},L2.apply(null,arguments)}function i3e(e,t){if(e==null)return{};var n,r,a=s3e(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function s3e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function wF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function o3e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wF(Object(n),!0).forEach(function(r){l3e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function l3e(e,t,n){return(t=u3e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u3e(e){var t=c3e(e,"string");return typeof t=="symbol"?t:t+""}function c3e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var d3e={top:5,right:5,bottom:5,left:5},BY=o3e({accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:d3e,reverseStackOrder:!1,syncMethod:"index",layout:"radial",responsive:!1,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},YA),f3e=x.forwardRef(function(t,n){var r,a=Xn(t.categoricalChartProps,BY),{layout:i}=a,s=i3e(a,a3e),{chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:d,tooltipPayloadSearcher:h}=t,m={chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:d,tooltipPayloadSearcher:h,eventEmitter:void 0};return x.createElement(RY,{preloadedState:{options:m},reduxStoreName:(r=a.id)!==null&&r!==void 0?r:l},x.createElement(eY,{chartData:a.data}),x.createElement(IY,{layout:i,margin:a.margin}),x.createElement(zY,{throttleDelay:a.throttleDelay,throttledEvents:a.throttledEvents}),x.createElement(LY,{baseValue:void 0,accessibilityLayer:a.accessibilityLayer,barCategoryGap:a.barCategoryGap,maxBarSize:a.maxBarSize,stackOffset:a.stackOffset,barGap:a.barGap,barSize:a.barSize,syncId:a.syncId,syncMethod:a.syncMethod,className:a.className,reverseStackOrder:a.reverseStackOrder}),x.createElement(r3e,{cx:a.cx,cy:a.cy,startAngle:a.startAngle,endAngle:a.endAngle,innerRadius:a.innerRadius,outerRadius:a.outerRadius}),x.createElement($Y,L2({},s,{ref:n})))});function SF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function jF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?SF(Object(n),!0).forEach(function(r){h3e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function h3e(e,t,n){return(t=m3e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m3e(e){var t=p3e(e,"string");return typeof t=="symbol"?t:t+""}function p3e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var g3e=["item"],v3e=jF(jF({},BY),{},{layout:"centric",startAngle:0,endAngle:360}),y3e=x.forwardRef((e,t)=>{var n=Xn(e,v3e);return x.createElement(f3e,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:g3e,tooltipPayloadSearcher:AA,categoricalChartProps:n,ref:t})});const x3e=["7d","30d","90d","all"];function Cp(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e)}function Hd(e){return e===0?"$0":e<.01?`$${e.toFixed(4)}`:`$${e.toFixed(2)}`}const b3e={completed:"#34C759",merged:"var(--color-accent)",failed:"#FF3B30",stopped:"#FF9500",running:"#007AFF"},kF=["#34C759","#4B8DFF","#FF3B30","#FF9500","#007AFF","#AF52DE"];function _F({active:e,payload:t,label:n}){return!e||!(t!=null&&t.length)?null:f.jsxs("div",{className:"card px-3 py-2 text-xs shadow-elevated border-theme-border",children:[n&&f.jsx("div",{className:"font-medium text-theme-text mb-1",children:n}),t.map((r,a)=>f.jsxs("div",{className:"flex items-center gap-2 text-theme-text-secondary",children:[r.color&&f.jsx("span",{className:"w-2 h-2 rounded-full inline-block flex-shrink-0",style:{backgroundColor:r.color}}),f.jsxs("span",{children:[r.name,": "]}),f.jsx("span",{className:"font-medium text-theme-text",children:r.value})]},a))]})}function w3e({active:e,payload:t,label:n}){return!e||!(t!=null&&t.length)?null:f.jsxs("div",{className:"card px-3 py-2 text-xs shadow-elevated border-theme-border",children:[n&&f.jsx("div",{className:"font-medium text-theme-text mb-1",children:n}),t.map((r,a)=>f.jsxs("div",{className:"flex items-center gap-2 text-theme-text-secondary",children:[r.color&&f.jsx("span",{className:"w-2 h-2 rounded-full inline-block flex-shrink-0",style:{backgroundColor:r.color}}),f.jsxs("span",{children:[r.name,": "]}),f.jsx("span",{className:"font-medium text-theme-text",children:typeof r.value=="number"?Hd(r.value):r.value})]},a))]})}function S3e({active:e,payload:t,label:n}){return!e||!(t!=null&&t.length)?null:f.jsxs("div",{className:"card px-3 py-2 text-xs shadow-elevated border-theme-border",children:[n&&f.jsx("div",{className:"font-medium text-theme-text mb-1",children:n}),t.map((r,a)=>f.jsxs("div",{className:"flex items-center gap-2 text-theme-text-secondary",children:[r.color&&f.jsx("span",{className:"w-2 h-2 rounded-full inline-block flex-shrink-0",style:{backgroundColor:r.color}}),f.jsxs("span",{children:[r.name,": "]}),f.jsx("span",{className:"font-medium text-theme-text",children:typeof r.value=="number"?Cp(r.value):r.value})]},a))]})}function j3e({projectId:e}){const{t}=Ze(),[n,r]=x.useState(null),[a,i]=x.useState("all"),[s,l]=x.useState(!0),[c,d]=x.useState(null),[h,m]=x.useState("cost");if(x.useEffect(()=>{l(!0),d(null),fbe(e,a).then(r).catch(k=>d(k.message||"Failed to load analytics")).finally(()=>l(!1))},[e,a]),s)return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex justify-between items-center",children:[f.jsx(Ue,{className:"h-4 w-32"}),f.jsx("div",{className:"flex gap-1",children:f.jsx(Ue,{className:"h-6 w-12",count:4})})]}),f.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:[...Array(4)].map((k,E)=>f.jsxs("div",{className:"card p-3 space-y-2",children:[f.jsx(Ue,{className:"h-6 w-16 mx-auto"}),f.jsx(Ue,{className:"h-3 w-12 mx-auto"})]},E))}),f.jsxs("div",{className:"card p-4 space-y-3",children:[f.jsx(Ue,{className:"h-3 w-24 mb-4"}),f.jsx(Ue,{className:"h-32 w-full"})]})]});if(c)return f.jsx("div",{className:"text-center py-12 text-status-error",children:c});if(!n)return null;const{summary:g,byCliTool:v,byDate:b,byStatus:w}=n,S=b.map(k=>({date:k.date.slice(5),completed:k.completed,failed:k.failed,other:Math.max(0,k.count-k.completed-k.failed),cost:k.costUsd,tokens:k.tokens})),j=w.map((k,E)=>({name:k.status,value:k.count,color:b3e[k.status]||kF[E%kF.length]})),_={fontSize:10,fill:"var(--color-text-muted)"};return f.jsxs("div",{className:"space-y-6 animate-fade-in",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("h3",{className:"text-sm font-semibold uppercase tracking-wider text-theme-muted",children:t("analytics.title")}),f.jsx("div",{className:"flex gap-1",children:x3e.map(k=>f.jsx("button",{onClick:()=>i(k),className:`px-3 py-1 text-xs rounded-md font-medium transition-colors ${a===k?"bg-accent text-white":"hover:bg-theme-hover text-theme-muted"}`,children:t(`analytics.period.${k}`)},k))})]}),f.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:[f.jsx(up,{label:t("analytics.totalTasks"),value:String(g.totalTasks)}),f.jsx(up,{label:t("analytics.successRate"),value:`${g.successRate}%`,color:g.successRate>=70?"#34C759":g.successRate>=40?"#FF9500":"#FF3B30"}),f.jsx(up,{label:t("analytics.totalCost"),value:Hd(g.totalCostUsd)}),f.jsx(up,{label:t("analytics.totalTokens"),value:Cp(g.totalTokens)})]}),f.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[f.jsxs("div",{className:"card p-4",children:[f.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider mb-3 text-theme-muted",children:t("analytics.byStatus")}),j.length===0?f.jsx("p",{className:"text-xs text-theme-muted",children:t("analytics.noData")}):f.jsxs("div",{className:"flex items-center gap-4",children:[f.jsx(T_,{width:100,height:100,children:f.jsxs(y3e,{children:[f.jsx(ZW,{data:j,cx:"50%",cy:"50%",innerRadius:28,outerRadius:45,dataKey:"value",strokeWidth:0,children:j.map((k,E)=>f.jsx(gh,{fill:k.color},E))}),f.jsx(ip,{content:f.jsx(_F,{})})]})}),f.jsx("div",{className:"space-y-1.5 flex-1",children:j.map(k=>f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("div",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:k.color}}),f.jsx("span",{className:"text-xs flex-1 capitalize",children:k.name}),f.jsx("span",{className:"text-xs font-mono font-medium",children:k.value})]},k.name))})]})]}),f.jsxs("div",{className:"card p-4",children:[f.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider mb-3 text-theme-muted",children:t("analytics.byCliTool")}),v.length===0?f.jsx("p",{className:"text-xs text-theme-muted",children:t("analytics.noData")}):f.jsx("div",{className:"space-y-3",children:v.map(k=>{const E=Math.max(...v.map(T=>T.count),1);return f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center justify-between mb-1",children:[f.jsx("span",{className:"text-xs font-medium capitalize",children:k.cli_tool}),f.jsxs("span",{className:"text-2xs font-mono text-theme-muted",children:[k.count," ",t("analytics.tasks")," · ",k.successRate,"% · ",Hd(k.totalCostUsd)]})]}),f.jsx("div",{className:"h-2 rounded-full overflow-hidden bg-theme-bg-tertiary",children:f.jsx("div",{className:"h-full rounded-full transition-all bg-accent",style:{width:`${k.count/E*100}%`}})})]},k.cli_tool)})})]})]}),S.length>0&&f.jsxs("div",{className:"card p-4",children:[f.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider mb-3 text-theme-muted",children:t("analytics.dailyActivity")}),f.jsx(T_,{width:"100%",height:128,children:f.jsxs(n3e,{data:S,barSize:6,barCategoryGap:"30%",children:[f.jsx(O2,{dataKey:"date",tick:_,tickLine:!1,axisLine:!1,interval:"preserveStartEnd"}),f.jsx(D2,{tick:_,tickLine:!1,axisLine:!1,width:28,allowDecimals:!1}),f.jsx(ip,{content:f.jsx(_F,{}),cursor:{fill:"var(--color-bg-hover)",radius:4}}),f.jsx(_p,{dataKey:"completed",stackId:"a",fill:"#34C759",name:t("analytics.completed")||"Completed",radius:[0,0,0,0]}),f.jsx(_p,{dataKey:"failed",stackId:"a",fill:"#FF3B30",name:t("analytics.failed")||"Failed"}),f.jsx(_p,{dataKey:"other",stackId:"a",fill:"var(--color-text-muted)",name:t("analytics.other")||"Other",radius:[2,2,0,0]})]})})]}),S.length>0&&(S.some(k=>k.cost>0)||S.some(k=>k.tokens>0))&&f.jsxs("div",{className:"card p-4",children:[f.jsxs("div",{className:"flex items-center justify-between mb-3",children:[f.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider text-theme-muted",children:h==="cost"?t("analytics.dailyCost"):t("analytics.tokenTrend")||"Token Trend"}),f.jsxs("div",{className:"flex gap-1",children:[f.jsx("button",{onClick:()=>m("cost"),className:`px-2 py-0.5 text-2xs rounded font-medium transition-colors ${h==="cost"?"bg-accent text-white":"text-theme-muted hover:bg-theme-hover"}`,children:t("analytics.cost")||"Cost"}),f.jsx("button",{onClick:()=>m("tokens"),className:`px-2 py-0.5 text-2xs rounded font-medium transition-colors ${h==="tokens"?"bg-accent text-white":"text-theme-muted hover:bg-theme-hover"}`,children:t("analytics.tokens")||"Tokens"})]})]}),f.jsx(T_,{width:"100%",height:96,children:f.jsxs(e3e,{data:S,children:[f.jsx(sY,{strokeDasharray:"3 3",stroke:"var(--color-border)",vertical:!1}),f.jsx(O2,{dataKey:"date",tick:_,tickLine:!1,axisLine:!1,interval:"preserveStartEnd"}),f.jsx(D2,{tick:_,tickLine:!1,axisLine:!1,width:40,tickFormatter:h==="tokens"?Cp:k=>`$${k.toFixed(2)}`}),h==="cost"?f.jsx(ip,{content:f.jsx(w3e,{})}):f.jsx(ip,{content:f.jsx(S3e,{})}),f.jsx(gY,{type:"monotone",dataKey:h,stroke:"var(--color-accent)",strokeWidth:2,dot:!1,activeDot:{r:4,fill:"var(--color-accent)"},name:h==="cost"?t("analytics.cost")||"Cost":t("analytics.tokens")||"Tokens"})]})})]}),g.totalTasks>0&&g.totalCostUsd>0&&f.jsxs("div",{className:"card p-4",children:[f.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider mb-3 text-theme-muted",children:t("analytics.costBreakdown")}),f.jsxs("div",{className:"grid grid-cols-3 gap-4 text-center",children:[f.jsxs("div",{children:[f.jsx("div",{className:"text-lg font-bold text-theme-accent",children:Hd(g.totalCostUsd)}),f.jsx("div",{className:"text-2xs uppercase tracking-wider text-theme-muted",children:t("analytics.totalCost")})]}),f.jsxs("div",{children:[f.jsx("div",{className:"text-lg font-bold",children:Hd(g.avgCostPerTask)}),f.jsx("div",{className:"text-2xs uppercase tracking-wider text-theme-muted",children:t("analytics.avgPerTask")})]}),f.jsxs("div",{children:[f.jsx("div",{className:"text-lg font-bold",children:Cp(g.totalTokens)}),f.jsx("div",{className:"text-2xs uppercase tracking-wider text-theme-muted",children:t("analytics.totalTokens")})]})]})]})]})}function up({label:e,value:t,color:n}){return f.jsxs("div",{className:"card p-3 text-center",children:[f.jsx("div",{className:"text-xl font-bold",style:n?{color:n}:void 0,children:t}),f.jsx("div",{className:"text-2xs uppercase tracking-wider mt-0.5 text-theme-muted",children:e})]})}const Ig={default:{bg:"bg-warm-200/50",text:"text-warm-500",swatch:"bg-warm-300"},gray:{bg:"bg-gray-500/20",text:"text-gray-400",swatch:"bg-gray-400"},brown:{bg:"bg-amber-800/20",text:"text-amber-600",swatch:"bg-amber-700"},orange:{bg:"bg-orange-500/20",text:"text-orange-400",swatch:"bg-orange-500"},yellow:{bg:"bg-yellow-500/20",text:"text-yellow-400",swatch:"bg-yellow-500"},green:{bg:"bg-emerald-500/20",text:"text-emerald-400",swatch:"bg-emerald-500"},blue:{bg:"bg-blue-500/20",text:"text-blue-400",swatch:"bg-blue-500"},purple:{bg:"bg-purple-500/20",text:"text-purple-400",swatch:"bg-purple-500"},pink:{bg:"bg-pink-500/20",text:"text-pink-400",swatch:"bg-pink-500"},red:{bg:"bg-red-500/20",text:"text-red-400",swatch:"bg-red-500"}},k3e=Object.keys(Ig);function Zd(e){const t=Ig[e]||Ig.default;return`${t.bg} ${t.text}`}const CF={pending:"bg-warm-200 text-warm-500",in_progress:"bg-blue-500/10 text-blue-600",done:"bg-emerald-500/10 text-emerald-600",moved:"bg-purple-500/10 text-purple-600"},NF={0:{label:"—",style:"text-warm-300"},1:{label:"●",style:"text-warm-500"},2:{label:"●●",style:"text-amber-500"},3:{label:"●●●",style:"text-red-500"}};function _3e({item:e,tagColors:t,existingTags:n,onSave:r,onDelete:a,onConvertToTodo:i,onConvertToSchedule:s,onUpdateTag:l}){var Ne,Fe;const{t:c}=Ze(),[d,h]=x.useState(!1),[m,g]=x.useState(!1),[v,b]=x.useState(!1),w=x.useRef(null),S=x.useRef(null),[j,_]=x.useState({top:0,left:0}),[k,E]=x.useState(e.title),[T,A]=x.useState(e.description??""),[O,I]=x.useState(e.priority),[P,D]=x.useState(e.due_date??""),[q,z]=x.useState(e.status),[F,R]=x.useState(()=>{try{return e.tags?JSON.parse(e.tags):[]}catch{return[]}}),[M,L]=x.useState(""),[G,W]=x.useState(!1),[Y,B]=x.useState(null),H=x.useRef(null),[K,U]=x.useState(()=>{try{return e.images?JSON.parse(e.images):[]}catch{return[]}}),X=x.useRef(null);x.useEffect(()=>{E(e.title),A(e.description??""),I(e.priority),D(e.due_date??""),z(e.status);try{R(e.tags?JSON.parse(e.tags):[])}catch{R([])}try{U(e.images?JSON.parse(e.images):[])}catch{U([])}},[e]);const J=F,Q=e.status==="moved",re=e.due_date&&new Date(e.due_date)<new Date&&!Q&&e.status!=="done",ue=x.useCallback(ye=>{r(e.id,ye)},[e.id,r]),Z=()=>{const ye=k.trim();ye&&ye!==e.title?ue({title:ye}):E(e.title)},se=()=>{const ye=T.trim();ye!==(e.description??"")&&ue({description:ye||void 0})},ce=ye=>{I(ye),ye!==e.priority&&ue({priority:ye})},ee=ye=>{D(ye),ye!==(e.due_date??"")&&ue({due_date:ye||void 0})},ae=ye=>{const le=ye;z(le),le!==e.status&&ue({status:le})},oe=ye=>{R(ye);const le=(()=>{try{return e.tags?JSON.parse(e.tags):[]}catch{return[]}})();JSON.stringify(ye)!==JSON.stringify(le)&&ue({tags:ye.length>0?JSON.stringify(ye):void 0})},fe=ye=>{var me;const le=ye.trim();if(le&&!F.includes(le)&&(oe([...F,le]),!t.has(le)&&l)){const Oe=["blue","green","orange","purple","pink","red","yellow","brown"],Pe=Oe[t.size%Oe.length];l(le,{color:Pe})}L(""),(me=H.current)==null||me.focus()},Ce=ye=>oe(F.filter(le=>le!==ye)),Te=n.filter(ye=>!F.includes(ye)&&(!M||ye.toLowerCase().includes(M.toLowerCase()))),pe=x.useCallback(ye=>{const le=Array.from(ye).filter(Pe=>Pe.type.startsWith("image/")),me=[];let Oe=0;for(const Pe of le){const be=new FileReader;be.onload=()=>{me.push({name:Pe.name,data:be.result}),Oe++,Oe===le.length&&E8(e.id,me).then(nt=>U(nt.images))},be.readAsDataURL(Pe)}},[e.id]),De=x.useCallback(ye=>{var Oe;const le=(Oe=ye.clipboardData)==null?void 0:Oe.items;if(!le)return;const me=[];for(let Pe=0;Pe<le.length;Pe++)if(le[Pe].type.startsWith("image/")){const be=le[Pe].getAsFile();be&&me.push(be)}me.length!==0&&(ye.preventDefault(),pe(me))},[pe]),Xe=x.useCallback(ye=>{var le;ye.preventDefault(),ye.stopPropagation(),(le=ye.dataTransfer)!=null&&le.files&&pe(ye.dataTransfer.files)},[pe]),We=x.useCallback(ye=>{A8(e.id,ye).then(()=>{U(le=>le.filter(me=>me.id!==ye))})},[e.id]),at=x.useCallback(()=>{if(!w.current)return;const ye=w.current.getBoundingClientRect(),le=window.innerWidth,me=window.innerHeight;let Oe=ye.bottom+4;const Pe=S.current;if(Pe){const be=Pe.offsetWidth,nt=Pe.offsetHeight;let ot=ye.right-be;ot<8&&(ot=8),ot+be>le-8&&(ot=le-8-be),Oe+nt>me-8&&(Oe=ye.top-nt-4),_({top:Oe,left:ot}),b(!0)}else _({top:Oe,left:Math.max(8,ye.right-180)})},[]);return x.useEffect(()=>{if(!d){b(!1);return}at();const ye=requestAnimationFrame(at),le=me=>{var Pe,be;const Oe=me.target;(Pe=w.current)!=null&&Pe.contains(Oe)||(be=S.current)!=null&&be.contains(Oe)||h(!1)};return document.addEventListener("mousedown",le),window.addEventListener("scroll",at,!0),window.addEventListener("resize",at),()=>{cancelAnimationFrame(ye),document.removeEventListener("mousedown",le),window.removeEventListener("scroll",at,!0),window.removeEventListener("resize",at)}},[d,at]),f.jsxs("div",{className:`${Q?"opacity-50":""}`,style:{borderBottom:"1px solid var(--color-border-muted)"},children:[f.jsxs("div",{className:"flex items-center gap-3 px-4 py-2.5 rounded-lg transition-colors hover:bg-warm-50 cursor-pointer",onDoubleClick:()=>g(!m),children:[f.jsx(zu,{size:14,className:`text-warm-400 transition-transform duration-200 flex-shrink-0 ${m?"rotate-90":""}`,onClick:ye=>{ye.stopPropagation(),g(!m)}}),f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsx("span",{className:"text-sm font-medium truncate block",style:{color:"var(--color-text-primary)"},children:e.title}),Q&&e.converted_type&&f.jsxs("span",{className:"text-2xs text-purple-500",children:["→ ",e.converted_type==="todo"?c("planner.movedToTodo"):c("planner.movedToSchedule")]})]}),f.jsxs("div",{className:"hidden sm:flex items-center gap-1 w-[160px] flex-shrink-0 overflow-hidden",children:[K.length>0&&f.jsxs("span",{className:"inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded text-[10px] font-medium bg-warm-100 text-warm-500 whitespace-nowrap",children:[f.jsx(ef,{size:10}),K.length]}),J.map(ye=>f.jsx("span",{className:`px-2 py-0.5 rounded text-2xs font-medium whitespace-nowrap ${Zd(t.get(ye)||"default")}`,children:ye},ye))]}),f.jsx("div",{className:"hidden sm:block w-12 text-center flex-shrink-0",children:f.jsx("span",{className:`text-xs font-medium ${((Ne=NF[e.priority])==null?void 0:Ne.style)??"text-warm-300"}`,children:((Fe=NF[e.priority])==null?void 0:Fe.label)??"—"})}),f.jsx("div",{className:"hidden md:block w-20 text-right flex-shrink-0",children:e.due_date?f.jsx("span",{className:`text-xs ${re?"text-red-500 font-medium":"text-warm-500"}`,children:new Date(e.due_date).toLocaleDateString(void 0,{month:"numeric",day:"numeric"})}):f.jsx("span",{className:"text-xs text-warm-300",children:c("planner.noDueDate")})}),f.jsx("div",{className:"w-16 flex-shrink-0",children:f.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded-full text-2xs font-semibold ${CF[e.status]||CF.pending}`,children:c(`plannerStatus.${e.status}`)})}),f.jsxs("div",{className:"w-8 flex-shrink-0",children:[f.jsx("button",{ref:w,onClick:ye=>{ye.stopPropagation(),h(!d)},className:"p-1.5 text-warm-400 hover:text-warm-600 hover:bg-warm-100/50 rounded-lg transition-colors",children:f.jsx(n8,{size:14})}),d&&vl.createPortal(f.jsxs("div",{ref:S,className:`fixed z-tooltip min-w-[160px] rounded-xl py-1 shadow-elevated${v?" animate-scale-in":""}`,style:{top:j.top,left:j.left,opacity:v?1:0,backgroundColor:"var(--color-bg-card)",border:"1px solid var(--color-border)"},onClick:()=>h(!1),children:[!Q&&f.jsxs(f.Fragment,{children:[f.jsxs("button",{onClick:i,className:"flex items-center gap-2 w-full px-3 py-1.5 text-xs hover:bg-warm-100 rounded-md transition-colors text-left",style:{color:"var(--color-text-primary)"},children:[f.jsx(iee,{size:12})," ",c("planner.convertToTask")]}),f.jsxs("button",{onClick:s,className:"flex items-center gap-2 w-full px-3 py-1.5 text-xs hover:bg-warm-100 rounded-md transition-colors text-left",style:{color:"var(--color-text-primary)"},children:[f.jsx(Jd,{size:12})," ",c("planner.convertToSchedule")]})]}),f.jsxs("button",{onClick:()=>{confirm(c("planner.deleteConfirm"))&&a()},className:"flex items-center gap-2 w-full px-3 py-1.5 text-xs text-red-500 hover:bg-red-50 rounded-md transition-colors text-left",children:[f.jsx(es,{size:12})," ",c("planner.delete")]})]}),document.body)]})]}),m&&f.jsx("div",{className:"px-4 pb-3 pt-1 ml-8 animate-fade-in",children:f.jsxs("div",{className:"rounded-lg px-4 py-3 space-y-3",style:{backgroundColor:"var(--color-bg-tertiary)"},children:[f.jsx("input",{className:"bg-transparent text-sm font-medium w-full outline-none border-b border-transparent focus:border-warm-300 pb-0.5 transition-colors",style:{color:"var(--color-text-primary)"},value:k,onChange:ye=>E(ye.target.value),onBlur:Z,onKeyDown:ye=>{ye.key==="Enter"&&(ye.preventDefault(),Z(),ye.target.blur())}}),f.jsx("textarea",{className:"bg-transparent text-sm w-full outline-none border border-transparent focus:border-warm-300 rounded-md p-1 transition-colors resize-none",style:{color:"var(--color-text-secondary)"},rows:3,placeholder:c("plannerForm.descPlaceholder"),value:T,onChange:ye=>A(ye.target.value),onPaste:De,onDrop:Xe,onDragOver:ye=>{ye.preventDefault(),ye.stopPropagation()},onBlur:se}),f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[f.jsxs("button",{type:"button",onClick:()=>{var ye;return(ye=X.current)==null?void 0:ye.click()},className:"inline-flex items-center gap-1 px-2 py-0.5 rounded text-[10px] font-medium text-warm-400 hover:text-warm-600 hover:bg-warm-100 transition-colors",children:[f.jsx(ef,{size:12}),c("plannerForm.addImage")]}),f.jsx("span",{className:"text-[10px] text-warm-300",children:c("plannerForm.pasteHint")})]}),f.jsx("input",{ref:X,type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:ye=>{ye.target.files&&pe(ye.target.files),ye.target.value=""}}),K.length>0&&f.jsx("div",{className:"flex flex-wrap gap-2",children:K.map(ye=>f.jsxs("div",{className:"relative group",children:[f.jsx("img",{src:T8(e.id,ye.id),alt:ye.originalName,className:"h-20 w-20 object-cover rounded-lg border border-warm-200"}),f.jsx("button",{type:"button",onClick:()=>We(ye.id),className:"absolute -top-1.5 -right-1.5 h-5 w-5 rounded-full bg-red-500 text-white flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",children:f.jsx(Wr,{size:12,strokeWidth:3})}),f.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-black/50 rounded-b-lg px-1 py-0.5",children:f.jsx("span",{className:"text-[8px] text-white truncate block",children:ye.originalName})})]},ye.id))})]}),f.jsxs("div",{children:[f.jsx("label",{className:"text-2xs text-warm-400 mb-1 block",children:c("plannerForm.tags")}),f.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[F.map(ye=>f.jsxs("div",{className:"relative",children:[f.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-2xs font-medium cursor-pointer hover:ring-1 hover:ring-warm-400 transition-all ${Zd(t.get(ye)||"default")}`,onClick:()=>B(Y===ye?null:ye),children:[ye,f.jsx("button",{onClick:le=>{le.stopPropagation(),Ce(ye)},className:"opacity-60 hover:opacity-100",children:f.jsx(Wr,{size:9})})]}),Y===ye&&f.jsxs("div",{className:"absolute top-full left-0 mt-1 p-2 rounded-lg shadow-elevated z-20 w-[180px]",style:{backgroundColor:"var(--color-bg-card)",border:"1px solid var(--color-border)"},children:[f.jsx("div",{className:"text-2xs text-warm-400 mb-1.5",children:c("plannerTag.color")}),f.jsx("div",{className:"grid grid-cols-5 gap-1.5",children:k3e.map(le=>f.jsx("button",{onClick:async()=>{l&&await l(ye,{color:le}),B(null)},className:`aspect-square rounded-md flex items-center justify-center transition-all ${t.get(ye)===le?"ring-2 ring-blue-400 ring-offset-1":"hover:scale-110"}`,title:c(`plannerTag.color.${le}`),children:f.jsx("div",{className:`w-5 h-5 rounded ${Ig[le].swatch}`})},le))})]})]},ye)),f.jsxs("div",{className:"relative",children:[f.jsx("input",{ref:H,className:"bg-transparent text-xs outline-none w-24",style:{color:"var(--color-text-primary)"},placeholder:"+",value:M,onChange:ye=>{L(ye.target.value),W(!0)},onKeyDown:ye=>{(ye.key==="Enter"||ye.key===",")&&M.trim()&&(ye.preventDefault(),fe(M.replace(",",""))),ye.key==="Backspace"&&!M&&F.length>0&&Ce(F[F.length-1])},onFocus:()=>W(!0),onBlur:()=>setTimeout(()=>W(!1),150)}),G&&Te.length>0&&f.jsx("div",{className:"absolute top-full left-0 mt-1 w-40 rounded-lg shadow-elevated z-10 py-1 max-h-32 overflow-y-auto",style:{backgroundColor:"var(--color-bg-card)",border:"1px solid var(--color-border)"},children:Te.slice(0,8).map(ye=>f.jsx("button",{className:"flex items-center w-full px-2 py-1 hover:bg-warm-100/50 transition-colors text-left",onMouseDown:()=>fe(ye),children:f.jsx("span",{className:`px-2 py-0.5 rounded text-2xs font-medium ${Zd(t.get(ye)||"default")}`,children:ye})},ye))})]})]})]}),f.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[f.jsxs("div",{children:[f.jsx("label",{className:"text-2xs text-warm-400 mb-1 block",children:c("plannerForm.priority")}),f.jsxs("select",{className:"input-field text-xs w-full py-1",value:O,onChange:ye=>ce(Number(ye.target.value)),children:[f.jsx("option",{value:0,children:c("plannerForm.priorityLow")}),f.jsx("option",{value:1,children:c("plannerForm.priorityNormal")}),f.jsx("option",{value:2,children:c("plannerForm.priorityHigh")}),f.jsx("option",{value:3,children:c("plannerForm.priorityCritical")})]})]}),f.jsxs("div",{children:[f.jsx("label",{className:"text-2xs text-warm-400 mb-1 block",children:c("plannerForm.dueDate")}),f.jsx("input",{type:"date",className:"input-field text-xs w-full py-1",value:P,onChange:ye=>ee(ye.target.value)})]}),f.jsxs("div",{children:[f.jsx("label",{className:"text-2xs text-warm-400 mb-1 block",children:c("plannerForm.status")}),f.jsxs("select",{className:"input-field text-xs w-full py-1",value:q,onChange:ye=>ae(ye.target.value),children:[f.jsx("option",{value:"pending",children:c("plannerStatus.pending")}),f.jsx("option",{value:"in_progress",children:c("plannerStatus.in_progress")}),f.jsx("option",{value:"done",children:c("plannerStatus.done")})]})]})]})]})})]})}let C3e=0;function N3e({existingTags:e,editItem:t,onSave:n,onCancel:r,onUpdateTag:a}){const{t:i}=Ze(),[s,l]=x.useState(""),[c,d]=x.useState(""),[h,m]=x.useState([]),[g,v]=x.useState(""),[b,w]=x.useState(""),[S,j]=x.useState(0),[_,k]=x.useState("pending"),[E,T]=x.useState(!1),[A,O]=x.useState(!1),[I,P]=x.useState([]),[D,q]=x.useState([]),z=x.useRef(null),F=x.useRef(null),R=x.useRef(null),[M,L]=x.useState(new Map),G=new Map([...e.map(Z=>[Z.name,Z.color]),...M]),W=["blue","green","orange","purple","pink","red","yellow","brown"];x.useEffect(()=>{var Z;if(t){l(t.title),d(t.description??""),m(t.tags?JSON.parse(t.tags):[]),w(t.due_date??""),j(t.priority),k(t.status);try{q(t.images?JSON.parse(t.images):[])}catch{q([])}}(Z=z.current)==null||Z.focus()},[t]);const Y=e.filter(Z=>!h.includes(Z.name)&&(!g||Z.name.toLowerCase().includes(g.toLowerCase()))),B=Z=>{var ce;const se=Z.trim();se&&!h.includes(se)&&m(ee=>{const ae=[...ee,se];if(!G.has(se)){const oe=W[G.size%W.length];L(fe=>new Map([...fe,[se,oe]]))}return ae}),v(""),O(!0),(ce=F.current)==null||ce.focus()},H=Z=>m(h.filter(se=>se!==Z)),K=x.useCallback(Z=>{const se=Array.from(Z).filter(ce=>ce.type.startsWith("image/"));for(const ce of se){const ee=new FileReader;ee.onload=()=>{const ae=ee.result,oe=`pending-${++C3e}`;P(fe=>[...fe,{id:oe,name:ce.name,data:ae,preview:ae}])},ee.readAsDataURL(ce)}},[]),U=x.useCallback(Z=>{var ee;const se=(ee=Z.clipboardData)==null?void 0:ee.items;if(!se)return;const ce=[];for(let ae=0;ae<se.length;ae++)if(se[ae].type.startsWith("image/")){const oe=se[ae].getAsFile();oe&&ce.push(oe)}ce.length!==0&&(Z.preventDefault(),K(ce))},[K]),X=x.useCallback(Z=>{var se;Z.preventDefault(),Z.stopPropagation(),(se=Z.dataTransfer)!=null&&se.files&&K(Z.dataTransfer.files)},[K]),J=Z=>P(se=>se.filter(ce=>ce.id!==Z)),Q=Z=>{t&&A8(t.id,Z),q(se=>se.filter(ce=>ce.id!==Z))},re=D.length+I.length,ue=async()=>{if(s.trim()){T(!0);try{const Z=await n({title:s.trim(),description:c.trim()||void 0,tags:h.length>0?JSON.stringify(h):void 0,due_date:b||void 0,priority:S,...t?{status:_}:{}});if(a&&M.size>0&&await Promise.all([...M.entries()].map(([se,ce])=>a(se,{color:ce}))),I.length>0){const se=(t==null?void 0:t.id)??(Z==null?void 0:Z.id);se&&await E8(se,I.map(ce=>({name:ce.name,data:ce.data})))}}finally{T(!1)}}};return f.jsxs("div",{className:"card p-5 animate-slide-up",style:{borderColor:"var(--color-accent)",borderWidth:"1px"},children:[f.jsx("input",{ref:z,className:"input-field text-sm w-full mb-3",placeholder:i("plannerForm.titlePlaceholder"),value:s,onChange:Z=>l(Z.target.value),onKeyDown:Z=>{Z.key==="Enter"&&Z.preventDefault()}}),f.jsx("textarea",{className:"input-field text-sm w-full mb-3",rows:3,placeholder:i("plannerForm.descPlaceholder"),value:c,onChange:Z=>d(Z.target.value),onPaste:U,onDrop:X,onDragOver:Z=>{Z.preventDefault(),Z.stopPropagation()}}),f.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[f.jsxs("button",{type:"button",onClick:()=>{var Z;return(Z=R.current)==null?void 0:Z.click()},className:"inline-flex items-center gap-1 px-2 py-1 rounded text-[10px] font-medium text-warm-400 hover:text-warm-600 hover:bg-warm-100 transition-colors",children:[f.jsx(ef,{size:14}),i("plannerForm.addImage")]}),f.jsx("span",{className:"text-[10px] text-warm-300",children:i("plannerForm.pasteHint")})]}),f.jsx("input",{ref:R,type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:Z=>{Z.target.files&&K(Z.target.files),Z.target.value=""}}),re>0&&f.jsxs("div",{className:"mb-4",children:[f.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[f.jsx("h4",{className:"text-xs font-semibold text-warm-500 uppercase tracking-wider",children:i("plannerForm.images")}),f.jsxs("span",{className:"text-[10px] text-warm-400",children:["(",re,")"]})]}),f.jsxs("div",{className:"flex flex-wrap gap-2",children:[D.map(Z=>f.jsxs("div",{className:"relative group",children:[f.jsx("img",{src:t?T8(t.id,Z.id):"",alt:Z.originalName,className:"h-20 w-20 object-cover rounded-lg border border-warm-200"}),f.jsx("button",{type:"button",onClick:()=>Q(Z.id),className:"absolute -top-1.5 -right-1.5 h-5 w-5 rounded-full bg-red-500 text-white flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",children:f.jsx(Wr,{size:12,strokeWidth:3})}),f.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-black/50 rounded-b-lg px-1 py-0.5",children:f.jsx("span",{className:"text-[8px] text-white truncate block",children:Z.originalName})})]},Z.id)),I.map(Z=>f.jsxs("div",{className:"relative group",children:[f.jsx("img",{src:Z.preview,alt:Z.name,className:"h-20 w-20 object-cover rounded-lg border border-blue-300/30"}),f.jsx("button",{type:"button",onClick:()=>J(Z.id),className:"absolute -top-1.5 -right-1.5 h-5 w-5 rounded-full bg-red-500 text-white flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",children:f.jsx(Wr,{size:12,strokeWidth:3})}),f.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-black/50 rounded-b-lg px-1 py-0.5",children:f.jsx("span",{className:"text-[8px] text-white truncate block",children:Z.name})})]},Z.id))]})]}),f.jsxs("div",{className:"mb-4",children:[f.jsx("label",{className:"text-xs font-medium text-warm-500 mb-1.5 block",children:i("plannerForm.tags")}),f.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 p-2 rounded-xl",style:{backgroundColor:"var(--color-bg-input)",border:"1px solid var(--color-border-strong)"},children:[h.map(Z=>f.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-[11px] font-medium ${Zd(G.get(Z)||"default")}`,children:[Z,f.jsx("button",{onClick:()=>H(Z),className:"opacity-60 hover:opacity-100",children:f.jsx(Wr,{size:10})})]},Z)),f.jsxs("div",{className:"relative flex-1 min-w-[120px]",children:[f.jsx("input",{ref:F,className:"bg-transparent text-sm outline-none w-full",style:{color:"var(--color-text-primary)"},placeholder:h.length===0?i("plannerForm.tagsPlaceholder"):"",value:g,onChange:Z=>{v(Z.target.value),O(!0)},onKeyDown:Z=>{(Z.key==="Enter"||Z.key===",")&&g.trim()&&(Z.preventDefault(),B(g.replace(",",""))),Z.key==="Backspace"&&!g&&h.length>0&&H(h[h.length-1])},onFocus:()=>O(!0),onBlur:()=>setTimeout(()=>O(!1),150)}),A&&(Y.length>0||g.trim())&&f.jsxs("div",{className:"absolute top-full left-0 mt-1 w-52 rounded-lg shadow-elevated z-10 py-1.5 max-h-48 overflow-y-auto",style:{backgroundColor:"var(--color-bg-card)",border:"1px solid var(--color-border)"},children:[Y.slice(0,10).map(Z=>f.jsx("button",{className:"flex items-center w-full px-2.5 py-1 hover:bg-warm-100/50 transition-colors text-left",onMouseDown:()=>B(Z.name),children:f.jsx("span",{className:`px-2 py-0.5 rounded text-[11px] font-medium ${Zd(Z.color)}`,children:Z.name})},Z.name)),g.trim()&&!e.some(Z=>Z.name===g.trim())&&f.jsx("button",{className:"flex items-center w-full px-2.5 py-1 hover:bg-warm-100/50 transition-colors text-left",onMouseDown:()=>B(g),children:f.jsxs("span",{className:"text-xs text-warm-500",children:['+ "',g.trim(),'"']})})]})]})]})]}),f.jsxs("div",{className:`grid gap-3 mb-4 ${t?"grid-cols-3":"grid-cols-2"}`,children:[f.jsxs("div",{children:[f.jsx("label",{className:"text-xs font-medium text-warm-500 mb-1.5 block",children:i("plannerForm.dueDate")}),f.jsx("input",{type:"date",className:"input-field text-xs w-full",value:b,onChange:Z=>w(Z.target.value)})]}),f.jsxs("div",{children:[f.jsx("label",{className:"text-xs font-medium text-warm-500 mb-1.5 block",children:i("plannerForm.priority")}),f.jsxs("select",{className:"input-field text-xs w-full",value:S,onChange:Z=>j(Number(Z.target.value)),children:[f.jsx("option",{value:0,children:i("plannerForm.priorityLow")}),f.jsx("option",{value:1,children:i("plannerForm.priorityNormal")}),f.jsx("option",{value:2,children:i("plannerForm.priorityHigh")}),f.jsx("option",{value:3,children:i("plannerForm.priorityCritical")})]})]}),t&&f.jsxs("div",{children:[f.jsx("label",{className:"text-xs font-medium text-warm-500 mb-1.5 block",children:i("plannerForm.status")}),f.jsxs("select",{className:"input-field text-xs w-full",value:_,onChange:Z=>k(Z.target.value),children:[f.jsx("option",{value:"pending",children:i("plannerStatus.pending")}),f.jsx("option",{value:"in_progress",children:i("plannerStatus.in_progress")}),f.jsx("option",{value:"done",children:i("plannerStatus.done")})]})]})]}),f.jsxs("div",{className:"flex justify-end gap-3",children:[f.jsx("button",{className:"btn-ghost text-xs",onClick:r,children:i("plannerForm.cancel")}),f.jsx("button",{className:"btn-primary text-xs py-2",onClick:ue,disabled:!s.trim()||E,children:i("plannerForm.save")})]})]})}function E3e({item:e,mode:t,projectCliTool:n,projectCliModel:r,onConvert:a,onClose:i}){const{t:s}=Ze(),{getToolConfig:l}=oc(),[c,d]=x.useState(n||"claude"),[h,m]=x.useState(r||""),[g,v]=x.useState(""),[b,w]=x.useState("once"),[S,j]=x.useState("0 0 * * *"),[_,k]=x.useState(""),[E,T]=x.useState(!1),A=l(c),O=(A==null?void 0:A.models)??[],I=async()=>{T(!0);try{t==="todo"?await a({cli_tool:c,cli_model:h||void 0,max_turns:g?Number(g):void 0}):await a({cli_tool:c,cli_model:h||void 0,schedule_type:b,cron_expression:b==="recurring"?S:void 0,run_at:b==="once"?_:void 0})}finally{T(!1)}};return f.jsx(ts,{open:!0,onClose:i,size:"md",position:"top",animation:"slide-up",children:f.jsxs("div",{className:"card p-6",children:[f.jsx("h3",{className:"text-sm font-semibold mb-4",style:{color:"var(--color-text-primary)"},children:s(t==="todo"?"plannerConvert.toTask":"plannerConvert.toSchedule")}),f.jsxs("p",{className:"text-xs text-warm-500 mb-4 truncate",children:['"',e.title,'"']}),f.jsxs("div",{className:"mb-3",children:[f.jsx("label",{className:"text-xs font-medium text-warm-500 mb-1.5 block",children:s("plannerConvert.cliTool")}),f.jsxs("select",{className:"input-field text-xs w-full",value:c,onChange:P=>{d(P.target.value),m("")},children:[f.jsx("option",{value:"claude",children:"Claude"}),f.jsx("option",{value:"gemini",children:"Gemini"}),f.jsx("option",{value:"codex",children:"Codex"})]})]}),f.jsxs("div",{className:"mb-3",children:[f.jsx("label",{className:"text-xs font-medium text-warm-500 mb-1.5 block",children:s("plannerConvert.model")}),f.jsxs("select",{className:"input-field text-xs w-full",value:h,onChange:P=>m(P.target.value),children:[f.jsx("option",{value:"",children:s("plannerConvert.projectDefault")}),O.map(P=>f.jsx("option",{value:P.value,children:P.label},P.value))]})]}),t==="todo"&&f.jsxs("div",{className:"mb-4",children:[f.jsx("label",{className:"text-xs font-medium text-warm-500 mb-1.5 block",children:s("plannerConvert.maxTurns")}),f.jsx("input",{type:"number",min:"1",className:"input-field text-xs w-full",placeholder:"—",value:g,onChange:P=>v(P.target.value)})]}),t==="schedule"&&f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"mb-3",children:[f.jsx("label",{className:"text-xs font-medium text-warm-500 mb-1.5 block",children:s("plannerConvert.scheduleType")}),f.jsxs("div",{className:"flex gap-1 p-0.5 rounded-lg",style:{backgroundColor:"var(--color-bg-tertiary)"},children:[f.jsx("button",{className:`flex-1 px-3 py-1.5 rounded-md text-xs font-medium transition-all ${b==="once"?"bg-amber-500 text-white":"text-warm-500"}`,onClick:()=>w("once"),children:s("plannerConvert.once")}),f.jsx("button",{className:`flex-1 px-3 py-1.5 rounded-md text-xs font-medium transition-all ${b==="recurring"?"bg-amber-500 text-white":"text-warm-500"}`,onClick:()=>w("recurring"),children:s("plannerConvert.recurring")})]})]}),b==="once"?f.jsxs("div",{className:"mb-4",children:[f.jsx("label",{className:"text-xs font-medium text-warm-500 mb-1.5 block",children:s("plannerConvert.runAt")}),f.jsx("input",{type:"datetime-local",className:"input-field text-xs w-full",value:_,onChange:P=>k(P.target.value)})]}):f.jsxs("div",{className:"mb-4",children:[f.jsx("label",{className:"text-xs font-medium text-warm-500 mb-1.5 block",children:s("plannerConvert.cronExpression")}),f.jsx("input",{className:"input-field text-xs w-full font-mono",value:S,onChange:P=>j(P.target.value),placeholder:"0 0 * * *"})]})]}),f.jsxs("div",{className:"flex justify-end gap-3",children:[f.jsx("button",{className:"btn-ghost text-xs",onClick:i,children:s("plannerConvert.cancel")}),f.jsx("button",{className:"btn-primary btn-sm",onClick:I,disabled:E||t==="schedule"&&b==="once"&&!_,children:s("plannerConvert.convert")})]})]})})}const EF={pending:0,in_progress:1,done:2,moved:3};function A3e({plannerItems:e,existingTags:t,projectCliTool:n,projectCliModel:r,onAddItem:a,onEditItem:i,onDeleteItem:s,onConvertToTodo:l,onConvertToSchedule:c,onUpdateTag:d,onDeleteTag:h,onExport:m,onImport:g}){const{t:v}=Ze(),[b,w]=x.useState(!1),[S,j]=x.useState(null),[_,k]=x.useState(""),[E,T]=x.useState(""),[A,O]=x.useState("created_at"),[I,P]=x.useState("desc"),[D,q]=x.useState(null),[z,F]=x.useState("todo"),[R,M]=x.useState(!1),[L,G]=x.useState(!1),W=x.useRef(null),Y=x.useRef(0),B=async()=>{if(!(!m||R)){M(!0);try{await m()}finally{M(!1)}}},H=()=>{var oe;!g||R||(oe=W.current)==null||oe.click()},K=async oe=>{var Ce;const fe=(Ce=oe.target.files)==null?void 0:Ce[0];if(oe.target.value="",!(!fe||!g)){M(!0);try{await g(fe)}finally{M(!1)}}},U=oe=>!!(/\.(md|markdown)$/i.test(oe.name)||oe.type==="text/markdown"),X=oe=>Array.from(oe.dataTransfer.types).includes("Files"),J=oe=>{!g||R||X(oe)&&(oe.preventDefault(),Y.current++,G(!0))},Q=oe=>{!g||R||X(oe)&&(oe.preventDefault(),oe.dataTransfer.dropEffect="copy")},re=oe=>{g&&(oe.preventDefault(),Y.current=Math.max(0,Y.current-1),Y.current===0&&G(!1))},ue=async oe=>{var Ce;if(!g||(oe.preventDefault(),Y.current=0,G(!1),R))return;const fe=(Ce=oe.dataTransfer.files)==null?void 0:Ce[0];if(fe){if(!U(fe)){window.alert(v("planner.dropInvalidFile"));return}M(!0);try{await g(fe)}finally{M(!1)}}},Z=x.useMemo(()=>t.map(oe=>oe.name),[t]),se=x.useMemo(()=>new Map(t.map(oe=>[oe.name,oe.color])),[t]),ce=x.useMemo(()=>{let oe=e.filter(fe=>!(E&&fe.status!==E||_&&!(fe.tags?(()=>{try{return JSON.parse(fe.tags)}catch{return[]}})():[]).includes(_)));return oe=[...oe].sort((fe,Ce)=>{let Te=0;switch(A){case"title":Te=fe.title.localeCompare(Ce.title);break;case"tags":{const pe=fe.tags?(()=>{try{return JSON.parse(fe.tags).join(",")}catch{return""}})():"",De=Ce.tags?(()=>{try{return JSON.parse(Ce.tags).join(",")}catch{return""}})():"";Te=(pe||"zzz").localeCompare(De||"zzz");break}case"priority":Te=fe.priority-Ce.priority;break;case"due_date":{const pe=fe.due_date||"9999",De=Ce.due_date||"9999";Te=pe.localeCompare(De);break}case"status":Te=(EF[fe.status]??9)-(EF[Ce.status]??9);break;case"created_at":Te=fe.created_at.localeCompare(Ce.created_at);break}return I==="asc"?Te:-Te}),oe},[e,_,E,A,I]),ee=oe=>{A===oe?P(fe=>fe==="asc"?"desc":"asc"):(O(oe),P(oe==="priority"?"desc":"asc"))},ae=({field:oe})=>A!==oe?null:I==="asc"?f.jsx(oee,{size:10,className:"inline ml-0.5"}):f.jsx(tee,{size:10,className:"inline ml-0.5"});return f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center justify-between mb-5 gap-3 flex-wrap",children:[f.jsxs("h2",{className:"text-sm font-semibold text-warm-600 uppercase tracking-wider",children:[v("planner.title"),f.jsx("span",{className:"ml-1 text-warm-400",children:e.length})]}),f.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[f.jsxs("select",{className:"input-field text-xs py-1.5 px-2 w-auto max-w-[10rem] shrink",value:_,onChange:oe=>k(oe.target.value),children:[f.jsx("option",{value:"",children:v("planner.filterTag")}),Z.map(oe=>f.jsx("option",{value:oe,children:oe},oe))]}),f.jsxs("select",{className:"input-field text-xs py-1.5 px-2 w-auto max-w-[10rem] shrink",value:E,onChange:oe=>T(oe.target.value),children:[f.jsx("option",{value:"",children:v("planner.filterStatus")}),f.jsx("option",{value:"pending",children:v("plannerStatus.pending")}),f.jsx("option",{value:"in_progress",children:v("plannerStatus.in_progress")}),f.jsx("option",{value:"done",children:v("plannerStatus.done")}),f.jsx("option",{value:"moved",children:v("plannerStatus.moved")})]}),m&&f.jsxs("button",{onClick:B,disabled:R||e.length===0,className:"btn-secondary text-xs py-2 whitespace-nowrap shrink-0 disabled:opacity-50",title:v("planner.exportTooltip"),children:[f.jsx(Gee,{size:14,className:"inline-block shrink-0"}),v("planner.export")]}),g&&f.jsxs(f.Fragment,{children:[f.jsxs("button",{onClick:H,disabled:R,className:"btn-secondary text-xs py-2 whitespace-nowrap shrink-0 disabled:opacity-50",title:v("planner.importTooltip"),children:[f.jsx(eD,{size:14,className:"inline-block shrink-0"}),v("planner.import")]}),f.jsx("input",{ref:W,type:"file",accept:".md,.markdown,text/markdown",className:"hidden",onChange:K})]}),!b&&!S&&f.jsxs("button",{onClick:()=>w(!0),className:"btn-primary text-xs py-2 whitespace-nowrap shrink-0",children:[f.jsx(sc,{size:14,className:"inline-block shrink-0"}),v("planner.add")]})]})]}),(b||S)&&f.jsx("div",{className:"mb-5",children:f.jsx(N3e,{existingTags:t,editItem:S,onSave:async oe=>{if(S){await i(S.id,oe),j(null);return}else{const fe=await a(oe);return w(!1),fe}},onCancel:()=>{w(!1),j(null)},onUpdateTag:d})}),f.jsxs("div",{className:"card relative",onDragEnter:g?J:void 0,onDragOver:g?Q:void 0,onDragLeave:g?re:void 0,onDrop:g?ue:void 0,children:[L&&f.jsx("div",{className:"absolute inset-0 z-20 flex items-center justify-center pointer-events-none rounded-xl border-2 border-dashed",style:{borderColor:"var(--color-accent, #3b82f6)",backgroundColor:"var(--color-bg-secondary, rgba(59, 130, 246, 0.08))",backdropFilter:"blur(2px)"},children:f.jsxs("div",{className:"text-center",children:[f.jsx(eD,{size:32,className:"inline-block mb-2",style:{color:"var(--color-accent, #3b82f6)"}}),f.jsx("div",{className:"text-sm font-semibold",children:v("planner.dropHint")}),f.jsx("div",{className:"text-xs text-warm-500 mt-1",children:v("planner.dropHintSub")})]})}),f.jsxs("div",{className:"hidden sm:flex items-center gap-3 px-4 py-2 rounded-t-xl select-none",style:{backgroundColor:"var(--color-bg-tertiary)",borderBottom:"1px solid var(--color-border-muted)"},children:[f.jsx("div",{className:"w-[14px] flex-shrink-0"}),f.jsxs("div",{className:"flex-1 text-2xs font-semibold text-warm-500 uppercase tracking-wider cursor-pointer hover:text-warm-700 transition-colors",onClick:()=>ee("title"),children:[v("planner.col.title"),f.jsx(ae,{field:"title"})]}),f.jsxs("div",{className:"w-[160px] text-2xs font-semibold text-warm-500 uppercase tracking-wider cursor-pointer hover:text-warm-700 transition-colors",onClick:()=>ee("tags"),children:[v("planner.col.tags"),f.jsx(ae,{field:"tags"})]}),f.jsxs("div",{className:"w-12 text-center text-2xs font-semibold text-warm-500 uppercase tracking-wider cursor-pointer hover:text-warm-700 transition-colors",onClick:()=>ee("priority"),children:[v("plannerForm.priority"),f.jsx(ae,{field:"priority"})]}),f.jsxs("div",{className:"hidden md:block w-20 text-right text-2xs font-semibold text-warm-500 uppercase tracking-wider cursor-pointer hover:text-warm-700 transition-colors",onClick:()=>ee("due_date"),children:[v("planner.col.dueDate"),f.jsx(ae,{field:"due_date"})]}),f.jsxs("div",{className:"w-16 text-2xs font-semibold text-warm-500 uppercase tracking-wider cursor-pointer hover:text-warm-700 transition-colors",onClick:()=>ee("status"),children:[v("planner.col.status"),f.jsx(ae,{field:"status"})]}),f.jsx("div",{className:"w-8"})]}),ce.length===0?f.jsx(xl,{icon:gte,title:v("planner.empty"),description:v("planner.emptyHint")}):ce.map((oe,fe)=>f.jsx("div",{className:"animate-slide-up",style:{animationDelay:`${fe*20}ms`},children:f.jsx(_3e,{item:oe,tagColors:se,existingTags:Z,onSave:async(Ce,Te)=>{await i(Ce,Te)},onDelete:()=>s(oe.id),onConvertToTodo:()=>{q(oe),F("todo")},onConvertToSchedule:()=>{q(oe),F("schedule")},onUpdateTag:d})},oe.id))]}),D&&f.jsx(E3e,{item:D,mode:z,projectCliTool:n,projectCliModel:r,onConvert:async oe=>{z==="todo"?await l(D.id,oe):await c(D.id,oe),q(null)},onClose:()=>q(null)})]})}function T3e({onEvent:e,connected:t,sendMessage:n}){const{id:r}=UF(),[a,i]=x.useState(null),[s,l]=x.useState([]),[c,d]=x.useState([]),[h,m]=x.useState(null),[g,v]=x.useState([]),[b,w]=x.useState([]),[S,j]=x.useState([]),[_,k]=x.useState([]),[E,T]=PJ(),[A,O]=x.useState(E.get("tab")||"tasks"),I=x.useCallback(ne=>{O(ne),T(ne==="tasks"?{}:{tab:ne},{replace:!0})},[T]),[P,D]=x.useState(!0),[q,z]=x.useState(!1),[F,R]=x.useState(new Set),[M,L]=x.useState(0),{t:G}=Ze(),{sendNotification:W}=X2(),Y=x.useRef([]);x.useEffect(()=>{Y.current=g},[g]),x.useEffect(()=>{r&&Promise.all([rne(r),M0(r),cD(r),dD(r),Hne(),rre(r),Om(r),Mm(r)]).then(([ne,we,Se,Ie,ze,ft,Vt,ir])=>{i(ne),l(we),d(Se),v(Ie),w(ft),j(Vt),k(ir),ze.resetsAt&&m(ze.resetsAt);const Le=we.filter(Cn=>Cn.status==="running"&&Cn.execution_mode==="interactive").map(Cn=>Cn.id);Le.length>0&&R(new Set(Le))}).catch(()=>z(!0)).finally(()=>D(!1))},[r]);const B=x.useRef(s);B.current=s,x.useEffect(()=>{if(!r)return;const ne=setInterval(()=>{B.current.some(Se=>Se.status==="running")&&M0(r).then(Se=>{l(Ie=>Ie.map(ze=>{const ft=Se.find(Vt=>Vt.id===ze.id);return ft&&ft.status!==ze.status?ft:ze}))}).catch(()=>{})},5e3);return()=>clearInterval(ne)},[r]);const H=x.useRef(t);x.useEffect(()=>{t&&!H.current&&r&&Promise.all([M0(r),cD(r),dD(r)]).then(([ne,we,Se])=>{l(ne),d(we),v(Se)}).catch(()=>{}),H.current=t},[t,r]),x.useEffect(()=>e(ne=>{if(ne.type==="todo:status-changed"&&ne.todoId&&ne.status){if(l(we=>we.map(Se=>{if(Se.id!==ne.todoId)return Se;const Ie={status:ne.status,updated_at:new Date().toISOString()};return ne.worktree_path!==void 0&&(Ie.worktree_path=ne.worktree_path??null),ne.branch_name!==void 0&&(Ie.branch_name=ne.branch_name??null),{...Se,...Ie}})),(ne.status==="completed"||ne.status==="merged"||ne.status==="failed")&&L(we=>we+1),ne.status==="completed"||ne.status==="failed"){const we=B.current.find(Se=>Se.id===ne.todoId);we&&W(ne.status==="completed"?G("notification.taskCompleted"):G("notification.taskFailed"),we.title)}ne.status==="running"&&ne.mode==="interactive"?R(we=>new Set(we).add(ne.todoId)):ne.status!=="running"&&R(we=>{const Se=new Set(we);return Se.delete(ne.todoId),Se})}if(ne.type==="schedule:status-changed"&&ne.scheduleId&&d(we=>we.map(Se=>Se.id===ne.scheduleId?{...Se,is_active:ne.isActive?1:0,updated_at:new Date().toISOString()}:Se)),ne.type==="rate-limit:updated"&&ne.resetsAt&&m(ne.resetsAt),ne.type==="discussion:status-changed"&&ne.discussionId&&(v(we=>we.map(Se=>Se.id===ne.discussionId?{...Se,status:ne.status,current_round:ne.currentRound??Se.current_round,updated_at:new Date().toISOString()}:Se)),ne.status==="completed"||ne.status==="failed")){const we=Y.current.find(Se=>Se.id===ne.discussionId);we&&W(ne.status==="completed"?G("notification.discussionCompleted"):G("notification.discussionFailed"),we.title)}ne.type==="session:status-changed"&&ne.sessionId&&w(we=>we.map(Se=>Se.id===ne.sessionId?{...Se,status:ne.status,updated_at:new Date().toISOString()}:Se))}),[e,W,G]);const K=x.useCallback(async(ne,we,Se,Ie,ze,ft,Vt,ir)=>{if(!r)return;const Le=await P0(r,{title:ne,description:we,cli_tool:Se,cli_model:Ie,depends_on:ft,max_turns:Vt??null,use_worktree:ir??null});if(ze&&ze.length>0){const Cn=await Q2(Le.id,ze.map(Dr=>({name:Dr.name,data:Dr.data})));Le.images=JSON.stringify(Cn.images)}l(Cn=>[...Cn,Le])},[r]),U=x.useCallback(async(ne,we)=>{const Se=we==="interactive";Se&&R(Ie=>new Set(Ie).add(ne));try{const Ie=await uD(ne,we);l(ze=>ze.map(ft=>ft.id===ne?Ie:ft))}catch(Ie){throw Se&&R(ze=>{const ft=new Set(ze);return ft.delete(ne),ft}),Ie}},[]),X=x.useCallback(async ne=>{const we=await Pne(ne);l(Se=>Se.map(Ie=>Ie.id===ne?we:Ie))},[]),J=x.useCallback(async ne=>{await Mne(ne),l(we=>we.filter(Se=>Se.id!==ne))},[]),Q=x.useCallback(async(ne,we,Se,Ie,ze,ft,Vt,ir)=>{const Le=await Tm(ne,{title:we,description:Se,cli_tool:Ie,cli_model:ze,depends_on:ft??null,max_turns:Vt??null,use_worktree:ir===void 0?null:ir});l(Cn=>Cn.map(Dr=>Dr.id===ne?Le:Dr))},[]),re=x.useCallback(async ne=>{await w8(ne),l(we=>we.map(Se=>Se.id===ne?{...Se,status:"merged",worktree_path:null,branch_name:null,updated_at:new Date().toISOString()}:Se))},[]),ue=x.useCallback(async ne=>{const we=await Dne(ne),Se=new Set(we.mergedIds);l(Ie=>Ie.map(ze=>Se.has(ze.id)?{...ze,status:"merged",worktree_path:null,branch_name:null,updated_at:new Date().toISOString()}:ze))},[]),Z=x.useCallback(async(ne,we=!1)=>{await S8(ne,we),l(Se=>Se.map(Ie=>Ie.id===ne?{...Ie,worktree_path:null,...we?{branch_name:null}:{},updated_at:new Date().toISOString()}:Ie))},[]),se=x.useCallback(async(ne,we)=>{const Se=we==="interactive";Se&&R(Ie=>new Set(Ie).add(ne));try{const Ie=await Rne(ne,we);l(ze=>ze.map(ft=>ft.id===ne?Ie:ft))}catch(Ie){throw Se&&R(ze=>{const ft=new Set(ze);return ft.delete(ne),ft}),Ie}},[]),ce=x.useCallback(async(ne,we,Se)=>{const Ie=Se==="interactive";Ie&&R(ze=>new Set(ze).add(ne));try{const ze=await j8(ne,we,Se);l(ft=>ft.map(Vt=>Vt.id===ne?ze:Vt))}catch(ze){throw Ie&&R(ft=>{const Vt=new Set(ft);return Vt.delete(ne),Vt}),ze}},[]),ee=x.useCallback(async(ne,we,Se)=>{const Ie=await zne(ne,we,Se);Ie.original_deleted&&l(ze=>ze.filter(ft=>ft.id!==ne)),d(ze=>[Ie.schedule,...ze])},[]),ae=x.useCallback(async(ne,we)=>{const Se=await Une(ne,we);d(Ie=>[Se.schedule,...Ie])},[]),oe=x.useCallback((ne,we)=>{n({type:"todo:stdin",todoId:ne,input:we})},[n]),fe=x.useCallback(async(ne,we)=>{const Se=await Tm(ne,{depends_on:we});l(Ie=>Ie.map(ze=>ze.id===ne?Se:ze))},[]),Ce=x.useCallback(async ne=>{const we=ne.map((Se,Ie)=>({id:Se,priority:Ie}));l(Se=>Se.map(Ie=>{const ze=we.find(ft=>ft.id===Ie.id);return ze?{...Ie,priority:ze.priority}:Ie})),await Promise.all(we.map(Se=>Tm(Se.id,{priority:Se.priority})))},[]),Te=x.useCallback(async(ne,we,Se)=>{await Tm(ne,{position_x:we,position_y:Se}),l(Ie=>Ie.map(ze=>ze.id===ne?{...ze,position_x:we,position_y:Se}:ze))},[]),pe=x.useCallback(async(ne,we)=>{if(!r)return;const Se=we.map(Vt=>Vt.message).join(`
|
|
558
|
+
`),Ie=`The previous task "${ne.title}" failed with the following errors:
|
|
559
|
+
|
|
560
|
+
---
|
|
561
|
+
${Se}
|
|
562
|
+
---
|
|
563
|
+
|
|
564
|
+
Please analyze the failure above and fix the issue. The original task description was:
|
|
565
|
+
${ne.description||"(no description)"}`,ze=`[Fix] ${ne.title}`,ft=await P0(r,{title:ze.slice(0,200),description:Ie,cli_tool:ne.cli_tool??void 0,cli_model:ne.cli_model??void 0});l(Vt=>[...Vt,ft]);try{const Vt=await uD(ft.id,"headless");l(ir=>ir.map(Le=>Le.id===ft.id?Vt:Le))}catch{}},[r]),De=x.useCallback(async ne=>{if(!r)return;const we=await Ine(r,{title:ne.title,description:ne.description,cron_expression:ne.cronExpression||void 0,cli_tool:ne.cliTool,cli_model:ne.cliModel,skip_if_running:ne.skipIfRunning,schedule_type:ne.scheduleType,run_at:ne.runAt});d(Se=>[we,...Se])},[r]),Xe=x.useCallback(async(ne,we)=>{const Se=we?await qne(ne):await Bne(ne);d(Ie=>Ie.map(ze=>ze.id===ne?Se:ze))},[]),We=x.useCallback(async ne=>{await $ne(ne),d(we=>we.filter(Se=>Se.id!==ne))},[]),at=x.useCallback(async(ne,we)=>{const Se=await Lne(ne,we);d(Ie=>Ie.map(ze=>ze.id===ne?Se:ze))},[]),Ne=x.useCallback(async ne=>{await Fne(ne)},[]),Fe=x.useCallback(async ne=>{if(!r)throw new Error("No project id");const we=await fre(r,ne);if(j(Se=>[we,...Se]),ne.tags){const Se=await Mm(r);k(Se)}return we},[r]),ye=x.useCallback(async(ne,we)=>{const Se=await hre(ne,we);j(Ie=>Ie.map(ze=>ze.id===ne?Se:ze))},[]),le=x.useCallback(async ne=>{await mre(ne),j(we=>we.filter(Se=>Se.id!==ne))},[]),me=x.useCallback(async(ne,we)=>{const Se=await pre(ne,we);j(Ie=>Ie.map(ze=>ze.id===ne?Se.plannerItem:ze)),l(Ie=>[...Ie,Se.todo])},[]),Oe=x.useCallback(async(ne,we)=>{const Se=await gre(ne,we);j(Ie=>Ie.map(ze=>ze.id===ne?Se.plannerItem:ze)),d(Ie=>[Se.schedule,...Ie])},[]),Pe=x.useCallback(async(ne,we)=>{if(!r)return;const Se=await cre(r,ne,we);if(k(Se),we.new_name&&we.new_name!==ne){const Ie=await Om(r);j(Ie)}},[r]),be=x.useCallback(async ne=>{if(!r)return;await dre(r,ne);const[we,Se]=await Promise.all([Mm(r),Om(r)]);k(we),j(Se)},[r]),nt=x.useCallback(async()=>{if(r)try{const{blob:ne,filename:we}=await vre(r),Se=URL.createObjectURL(ne),Ie=document.createElement("a");Ie.href=Se,Ie.download=we,document.body.appendChild(Ie),Ie.click(),document.body.removeChild(Ie),URL.revokeObjectURL(Se),S.some(ft=>ft.images)&&window.alert(G("planner.importNoImages"))}catch(ne){const we=ne instanceof Error?ne.message:String(ne);window.alert(`${G("planner.exportError")}: ${we}`)}},[r,S,G]),ot=x.useCallback(async ne=>{if(r)try{const we=await ne.text();if(!we.trim())throw new Error(G("planner.importInvalidMarkdown"));const Se=await yre(r,we),[Ie,ze]=await Promise.all([Mm(r),Om(r)]);k(Ie),j(ze),window.alert(G("planner.importSuccess").replace("{items}",String(Se.imported_items)).replace("{tags}",String(Se.imported_tags)))}catch(we){const Se=we instanceof Error?we.message:String(we);window.alert(`${G("planner.importError")}: ${Se}`)}},[r,G]),gt=x.useCallback(ne=>{v(we=>[ne,...we])},[]),lt=x.useCallback(async ne=>{await C8(ne),v(we=>we.map(Se=>Se.id===ne?{...Se,status:"running",updated_at:new Date().toISOString()}:Se))},[]),Me=x.useCallback(async ne=>{await N8(ne),v(we=>we.map(Se=>Se.id===ne?{...Se,status:"paused",updated_at:new Date().toISOString()}:Se))},[]),$e=x.useCallback(async ne=>{await Xne(ne),v(we=>we.filter(Se=>Se.id!==ne))},[]),Qe=x.useCallback(ne=>{w(we=>[ne,...we])},[]),vt=x.useCallback(async ne=>{await sre(ne),w(we=>we.map(Se=>Se.id===ne?{...Se,status:"running",updated_at:new Date().toISOString()}:Se))},[]),st=x.useCallback(async ne=>{await ore(ne),w(we=>we.map(Se=>Se.id===ne?{...Se,status:"stopped",updated_at:new Date().toISOString()}:Se))},[]),Et=x.useCallback(async ne=>{await ire(ne),w(we=>we.filter(Se=>Se.id!==ne))},[]),Je=x.useCallback(async(ne,we)=>{await ure(ne,we),w(Se=>Se.map(Ie=>Ie.id===ne?{...Ie,worktree_path:null,...we?{branch_name:null}:{}}:Ie))},[]),At=x.useCallback((ne,we)=>{n({type:"session:stdin",sessionId:ne,input:we})},[n]),It=x.useCallback(async()=>{r&&(await ane(r),l(ne=>ne.map(we=>we.status==="pending"||we.status==="failed"||we.status==="stopped"?{...we,status:"running",updated_at:new Date().toISOString()}:we)))},[r]),hn=x.useCallback(async()=>{r&&(await ine(r),l(ne=>ne.map(we=>we.status==="running"?{...we,status:"stopped",updated_at:new Date().toISOString()}:we)))},[r]);return P?f.jsxs("div",{className:"px-6 py-6 sm:px-8 sm:py-8 space-y-6",children:[f.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[f.jsxs("div",{className:"space-y-2",children:[f.jsx(Ue,{className:"h-8 w-48"}),f.jsx(Ue,{className:"h-4 w-32"})]}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx(Ue,{className:"h-10 w-24"}),f.jsx(Ue,{className:"h-10 w-24"})]})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsxs("div",{className:"flex justify-between",children:[f.jsx(Ue,{className:"h-4 w-16"}),f.jsx(Ue,{className:"h-4 w-12"})]}),f.jsx(Ue,{className:"h-3 w-full rounded-full"})]}),f.jsxs("div",{className:"flex gap-4 border-b border-theme-border pb-px",children:[f.jsx(Ue,{className:"h-10 w-20"}),f.jsx(Ue,{className:"h-10 w-24"}),f.jsx(Ue,{className:"h-10 w-24"})]}),f.jsx("div",{className:"space-y-4",children:[...Array(3)].map((ne,we)=>f.jsxs("div",{className:"card p-4 space-y-3",children:[f.jsxs("div",{className:"flex justify-between",children:[f.jsx(Ue,{className:"h-5 w-1/3"}),f.jsx(Ue,{className:"h-5 w-20"})]}),f.jsx(Ue,{className:"h-4 w-2/3"}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx(Ue,{className:"h-4 w-16"}),f.jsx(Ue,{className:"h-4 w-16"})]})]},we))})]}):q||!a?f.jsx("div",{className:"px-6 py-6 sm:px-8 sm:py-8",children:f.jsxs("div",{className:"card p-16 text-center animate-fade-in",children:[f.jsx("p",{className:"text-status-error font-medium text-lg",children:G("detail.notFound")}),f.jsx(ai,{to:"/",className:"mt-4 inline-block text-sm text-accent hover:text-accent-dark transition-colors",children:G("detail.backToProjects")})]})}):f.jsxs("div",{className:"px-6 py-6 sm:px-8 sm:py-8",children:[f.jsx(Are,{project:a,todos:s,onStartAll:It,onStopAll:hn,onProjectUpdate:ne=>i(ne)}),f.jsx("div",{className:"flex gap-0.5 mb-5 p-1 rounded-xl overflow-x-auto -mx-4 px-4 sm:mx-0 sm:px-1",style:{backgroundColor:"var(--color-bg-tertiary)"},children:[{key:"planner",label:G("tabs.planner"),count:S.length},{key:"tasks",label:G("tabs.tasks"),count:s.length},{key:"sessions",label:G("tabs.sessions"),count:b.length},{key:"discussions",label:G("tabs.discussions"),count:g.length},{key:"schedules",label:G("tabs.schedules"),count:c.length},...XP(a).map(ne=>({key:ne.id,label:G(`tabs.${ne.id}`)||ne.displayName})),{key:"analytics",label:G("tabs.analytics")},...a.is_git_repo?[{key:"git",label:G("tabs.git")}]:[]].map(ne=>f.jsxs("button",{onClick:()=>I(ne.key),className:`px-3 sm:px-4 py-1.5 sm:py-2 text-xs whitespace-nowrap rounded-lg transition-all duration-200 ${A===ne.key?"text-warm-800 font-semibold shadow-soft":"text-warm-500 font-normal hover:text-warm-600"}`,style:A===ne.key?{backgroundColor:"var(--color-bg-card)"}:void 0,children:[ne.label,"count"in ne&&typeof ne.count=="number"&&f.jsx("span",{className:`ml-1 ${A===ne.key?"text-warm-500":"text-warm-400"}`,children:ne.count})]},ne.key))}),A==="tasks"&&f.jsx(P0e,{todos:s,projectCliTool:a.cli_tool,projectCliModel:a.claude_model??void 0,projectIsGitRepo:!!a.is_git_repo,projectUseWorktree:a.use_worktree!==0,onAddTodo:K,onStartTodo:U,onStopTodo:X,onDeleteTodo:J,onEditTodo:Q,onMergeTodo:re,onMergeChain:ue,onCleanupTodo:Z,onRetryTodo:se,onContinueTodo:ce,onFixTodo:pe,onScheduleTodo:ee,onScheduleOnResetTodo:ae,resetsAt:h,onUpdateDependency:fe,onUpdatePosition:Te,onReorderTodos:Ce,onEvent:e,onSendInput:oe,interactiveTodos:F,debugLogging:!!a.debug_logging,showTokenUsage:!!a.show_token_usage}),A==="sessions"&&r&&f.jsx(dbe,{projectId:r,sessions:b,projectCliTool:a.cli_tool,projectCliModel:a.claude_model??void 0,isGitRepo:!!a.is_git_repo,onAddSession:Qe,onStartSession:vt,onStopSession:st,onDeleteSession:Et,onCleanupSession:Je,onSendInput:At,onEvent:e}),A==="discussions"&&r&&f.jsx(obe,{projectId:r,discussions:g,onAddDiscussion:gt,onStartDiscussion:lt,onStopDiscussion:Me,onDeleteDiscussion:$e}),XP(a).map(ne=>A===ne.id&&ne.PanelComponent?f.jsx(ne.PanelComponent,{project:a,onImportAsTask:async(we,Se)=>{if(!r)return;const Ie=await P0(r,{title:we,description:Se});l(ze=>[...ze,Ie])}},ne.id):null),A==="analytics"&&r&&f.jsx(j3e,{projectId:r}),A==="git"&&a.is_git_repo?f.jsx(nbe,{project:a,refreshTrigger:M}):null,A==="schedules"&&f.jsx(q0e,{schedules:c,projectCliTool:a.cli_tool,projectCliModel:a.claude_model??void 0,onAddSchedule:De,onToggleSchedule:Xe,onDeleteSchedule:We,onEditSchedule:at,onTriggerSchedule:Ne,onMergeRun:re,onCleanupRun:Z}),A==="planner"&&f.jsx(A3e,{plannerItems:S,existingTags:_,projectCliTool:a.cli_tool,projectCliModel:a.claude_model??void 0,onAddItem:Fe,onEditItem:ye,onDeleteItem:le,onConvertToTodo:me,onConvertToSchedule:Oe,onUpdateTag:Pe,onDeleteTag:be,onExport:nt,onImport:ot})]})}const O3e={pending:"bg-warm-200 text-warm-600",running:"bg-status-success/10 text-status-success",paused:"bg-amber-100 text-amber-700",completed:"bg-accent/10 text-accent",failed:"bg-status-error/10 text-status-error",merged:"bg-accent/10 text-accent"};function M3e(e){try{const t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}}function AF(e){return e==="pending"||e==="failed"?{canEdit:!0,allowAdvancedFields:!0}:e==="paused"||e==="completed"?{canEdit:!0,allowAdvancedFields:!1}:{canEdit:!1,allowAdvancedFields:!1}}function P3e({onEvent:e,connected:t}){const{id:n,discussionId:r}=UF(),{t:a,lang:i}=Ze(),{sendNotification:s}=X2(),[l,c]=x.useState(null),[d,h]=x.useState([]),[m,g]=x.useState(!0),[v,b]=x.useState(new Map),[w,S]=x.useState(""),[j,_]=x.useState(!1),[k,E]=x.useState(!1),[T,A]=x.useState(!1),[O,I]=x.useState(new Set),[P,D]=x.useState(""),[q,z]=x.useState([]),F=x.useRef(null),R=x.useCallback(pe=>{I(De=>{const Xe=new Set(De);return Xe.has(pe)?Xe.delete(pe):Xe.add(pe),Xe})},[]),M=x.useCallback(()=>{if(!l)return;const pe=new Set(l.messages.filter(De=>De.content&&De.status==="completed").map(De=>De.id));I(pe)},[l]),L=x.useCallback(()=>{I(new Set)},[]),G=pe=>{const De=pe.split(`
|
|
566
|
+
`).find(Xe=>Xe.trim())||"";return De.length>120?`${De.slice(0,120)}...`:De};x.useEffect(()=>{r&&Io(r).then(c).catch(()=>{}).finally(()=>g(!1))},[r]),x.useEffect(()=>{n&&_8(n).then(h).catch(()=>{})},[n]),x.useEffect(()=>e(pe=>{r&&(pe.type==="discussion:status-changed"&&pe.discussionId===r&&((pe.status==="completed"||pe.status==="failed")&&s(pe.status==="completed"?a("notification.discussionCompleted"):a("notification.discussionFailed"),(l==null?void 0:l.title)??""),c(De=>De&&{...De,status:pe.status,current_round:pe.currentRound??De.current_round,current_agent_id:pe.currentAgentId??De.current_agent_id})),pe.type==="discussion:message-changed"&&pe.discussionId===r&&(c(De=>De&&{...De,messages:De.messages.map(Xe=>Xe.id===pe.messageId?{...Xe,status:pe.status}:Xe)}),(pe.status==="completed"||pe.status==="failed")&&Io(r).then(c).catch(()=>{})),pe.type==="discussion:log"&&pe.discussionId===r&&pe.messageId&&b(De=>{const Xe=new Map(De),We=pe.messageId,at=Xe.get(We)||[];return Xe.set(We,[...at,pe.message||""]),Xe}))}),[e,r,s,a,l==null?void 0:l.title]),x.useEffect(()=>{var pe;(pe=F.current)==null||pe.scrollIntoView({behavior:"smooth"})},[l==null?void 0:l.messages,v]),x.useEffect(()=>{!r||!l||(l.status==="failed"?ere(r).then(pe=>z(pe.filter(De=>De.log_type==="error"))).catch(()=>{}):z([]))},[r,l==null?void 0:l.status]);const W=x.useCallback(async()=>{if(!r)return;const pe=await C8(r);c(pe),D("")},[r]),Y=x.useCallback(async()=>{if(!r)return;await N8(r);const pe=await Io(r);c(pe),D("")},[r]),B=x.useCallback(async()=>{if(!r||!w.trim())return;await Zne(r,w),S("");const pe=await Io(r);c(pe),D("")},[r,w]),H=x.useCallback(async()=>{if(!r)return;const pe=await Qne(r);c(pe),D("")},[r]),K=x.useCallback(async pe=>{if(!r)return;_(!1);const De=await Jne(r,pe);c(De),D("")},[r]),U=x.useCallback(async()=>{if(!r)return;await tre(r);const pe=await Io(r);c(pe),D("")},[r]),X=x.useCallback(async()=>{if(!r)return;await nre(r);const pe=await Io(r);c(pe),D("")},[r]),J=x.useCallback(async pe=>{if(!(!r||!l)){A(!0);try{const{allowAdvancedFields:De}=AF(l.status),Xe=De?{title:pe.title,description:pe.description,agent_ids:pe.agent_ids,max_rounds:pe.max_rounds,auto_implement:pe.auto_implement,implement_agent_id:pe.auto_implement?pe.implement_agent_id:null}:{title:pe.title,description:pe.description};await Yne(r,Xe);const We=await Io(r);c(We),E(!1),D("")}catch(De){D(De instanceof Error?De.message:i==="ko"?"토론 저장에 실패했습니다.":"Failed to save discussion.")}finally{A(!1)}}},[r,l,i]);if(m)return f.jsxs("div",{className:"mx-auto max-w-4xl px-4 sm:px-6 py-6 sm:py-8 space-y-6",children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(Ue,{className:"h-4 w-16"}),f.jsx(Ue,{className:"h-4 w-4"}),f.jsx(Ue,{className:"h-4 w-32"})]}),f.jsxs("div",{className:"card p-6 space-y-4",children:[f.jsx(Ue,{className:"h-7 w-1/3"}),f.jsx(Ue,{className:"h-4 w-full",count:2}),f.jsxs("div",{className:"flex gap-4 pt-2",children:[f.jsx(Ue,{className:"h-3 w-24"}),f.jsx(Ue,{className:"h-3 w-24"})]})]}),f.jsx("div",{className:"space-y-8",children:[...Array(3)].map((pe,De)=>f.jsxs("div",{className:"flex gap-3",children:[f.jsx(Ue,{variant:"circular",width:32,height:32}),f.jsxs("div",{className:"flex-1 space-y-2",children:[f.jsx(Ue,{className:"h-4 w-24"}),f.jsxs("div",{className:"card p-4 space-y-2",children:[f.jsx(Ue,{className:"h-3 w-full"}),f.jsx(Ue,{className:"h-3 w-5/6"}),f.jsx(Ue,{className:"h-3 w-4/6"})]})]})]},De))})]});if(!l)return f.jsxs("div",{className:"mx-auto max-w-4xl px-4 py-8 text-center",children:[f.jsx("p",{className:"text-status-error",children:a("discussions.notFound")}),f.jsx(ai,{to:`/projects/${n}?tab=discussions`,className:"text-sm text-accent mt-2 inline-block",children:a("discussions.back")})]});const Q=new Map(l.agents.map(pe=>[pe.id,pe])),re=l.status==="pending"||l.status==="paused"||l.status==="failed",ue=l.status==="running",Z=l.status==="completed"||l.status==="paused",se=l.status==="completed",ce=l.status==="paused"||l.status==="running",ee=!ue&&!!l.worktree_path,{canEdit:ae,allowAdvancedFields:oe}=AF(l.status),fe={title:l.title,description:l.description,agent_ids:M3e(l.agent_ids),max_rounds:l.max_rounds,auto_implement:l.auto_implement===1,implement_agent_id:l.implement_agent_id||""},Ce=new Map;for(const pe of l.messages){const De=Ce.get(pe.round_number)||[];De.push(pe),Ce.set(pe.round_number,De)}const Te=[...Ce.keys()].sort((pe,De)=>pe-De);return f.jsxs("div",{className:"mx-auto max-w-4xl px-4 sm:px-6 py-6 sm:py-8 flex flex-col",style:{height:"calc(100vh - 2rem)"},children:[f.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[f.jsxs(ai,{to:`/projects/${n}?tab=discussions`,className:"inline-flex items-center gap-1 text-sm text-warm-500 hover:text-accent transition-colors",children:[f.jsx(jee,{size:16}),a("discussions.back")]}),f.jsx("span",{className:"text-warm-300",children:"/"}),f.jsx("span",{className:"text-sm font-medium text-warm-700 truncate",children:l.title}),f.jsx("span",{className:`px-1.5 py-0.5 rounded text-2xs font-semibold uppercase ${O3e[l.status]}`,children:a(`status.${l.status}`)||l.status}),l.status==="running"&&f.jsxs("span",{className:"text-2xs text-status-success animate-pulse",children:[a("discussions.round")," ",l.current_round,"/",l.max_rounds]}),t&&f.jsx("span",{className:"ml-auto inline-flex items-center gap-1 text-xs text-status-success",children:f.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-status-success animate-pulse"})})]}),f.jsxs("div",{className:"mb-4 rounded-xl border border-warm-150 bg-warm-50/80 p-4",children:[f.jsxs("div",{className:"flex items-start justify-between gap-3",children:[f.jsxs("div",{className:"min-w-0",children:[f.jsx("h1",{className:"text-lg font-semibold text-warm-800",children:l.title}),f.jsx("p",{className:"mt-2 whitespace-pre-wrap text-sm leading-relaxed text-warm-500",children:l.description})]}),ae&&f.jsx("button",{onClick:()=>E(!0),className:"btn-secondary text-xs py-2 flex-shrink-0",children:a("todo.edit")})]}),f.jsxs("div",{className:"mt-3 flex flex-wrap gap-3 text-[11px] text-warm-400",children:[f.jsxs("span",{children:[a("discussions.maxRounds"),": ",l.max_rounds]}),f.jsxs("span",{children:[a("discussions.agents"),": ",l.agents.map(pe=>pe.name).join(", ")||"-"]}),f.jsxs("span",{children:[a("discussions.autoImplement"),": ",l.auto_implement?i==="ko"?"사용":"Enabled":i==="ko"?"사용 안 함":"Disabled"]})]}),P&&f.jsx("p",{className:"mt-3 text-xs text-status-error",children:P})]}),l.status==="failed"&&(()=>{const pe=l.messages.find(Xe=>Xe.status==="failed"),De=pe?Q.get(pe.agent_id):null;return f.jsxs("div",{className:"mb-4 rounded-xl border border-status-error/30 bg-status-error/5 overflow-hidden animate-slide-up",children:[f.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5 bg-status-error/10 border-b border-status-error/20",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(nf,{size:16,className:"text-status-error"}),f.jsx("h4",{className:"text-xs font-semibold text-status-error uppercase tracking-wider",children:a("discussions.failureTitle")}),De&&f.jsxs("span",{className:"inline-flex items-center gap-1 text-2xs font-mono px-1.5 py-0.5 rounded bg-status-error/15 text-status-error",children:[f.jsx("span",{className:"w-3 h-3 rounded-full inline-block",style:{backgroundColor:De.avatar_color||"#94a3b8"}}),De.name]}),pe&&f.jsxs("span",{className:"text-2xs font-mono px-1.5 py-0.5 rounded bg-status-error/15 text-status-error",children:[a("discussions.round")," ",pe.round_number]})]}),f.jsxs("button",{onClick:W,className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium bg-status-success/15 text-status-success hover:bg-status-success/25 border border-status-success/30 transition-colors",children:[f.jsx(Fg,{size:14}),a("discussions.retry")]})]}),f.jsx("div",{className:"px-4 py-3 space-y-1.5 max-h-48 overflow-y-auto",children:q.length>0?q.map(Xe=>f.jsxs("div",{className:"flex items-start gap-2 text-xs",children:[f.jsx("span",{className:"text-warm-500 font-mono flex-shrink-0",children:new Date(Xe.created_at).toLocaleTimeString()}),f.jsx("span",{className:"text-status-error font-mono whitespace-pre-wrap break-all",children:Xe.message})]},Xe.id)):f.jsx("span",{className:"text-xs text-warm-400 italic",children:a("discussions.noErrorLogs")})})]})})(),f.jsxs("div",{className:"flex items-center gap-2 mb-4 flex-wrap",children:[re&&f.jsxs("button",{onClick:W,className:"btn-primary text-sm",children:[f.jsx(yl,{size:16}),l.status==="pending"?a("header.runAll"):a("discussions.resume")]}),ue&&f.jsxs("button",{onClick:Y,className:"btn-danger text-sm",children:[f.jsx(W2,{size:16}),a("discussions.pause")]}),ue&&f.jsx("button",{onClick:H,className:"btn btn-sm text-xs text-warm-500",children:a("discussions.skipTurn")}),Z&&f.jsxs("button",{onClick:()=>_(!0),className:"btn-primary text-sm",children:[f.jsx(Hee,{size:16}),a("discussions.implement")]}),se&&l.branch_name&&f.jsxs("button",{onClick:U,className:"btn-primary text-sm",children:[f.jsx(Pf,{size:16}),a("todos.merge")]}),ee&&f.jsxs("button",{onClick:X,className:"btn-danger text-sm",children:[f.jsx(es,{size:16}),a("todo.cleanup")]}),l.messages.some(pe=>pe.content&&pe.status==="completed")&&f.jsx("button",{onClick:O.size>0?L:M,className:"btn btn-sm text-xs text-warm-500",children:O.size>0?a("discussions.expandAll"):a("discussions.collapseAll")}),f.jsx("div",{className:"ml-auto flex items-center gap-1",children:l.agents.map(pe=>f.jsx("div",{className:`w-7 h-7 rounded-full flex items-center justify-center text-white text-2xs font-bold transition-all ${l.current_agent_id===pe.id?"ring-2 ring-status-success ring-offset-1 scale-110":"opacity-60"}`,style:{backgroundColor:pe.avatar_color||"#6366f1"},title:`${pe.name} (${pe.role})`,children:pe.name.charAt(0)},pe.id))})]}),f.jsxs("div",{className:"flex-1 overflow-y-auto space-y-1 pb-4",children:[Te.map(pe=>{const De=Ce.get(pe),Xe=pe>l.max_rounds;return f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center gap-3 my-4",children:[f.jsx("div",{className:"flex-1 h-px bg-warm-200"}),f.jsx("span",{className:"text-2xs font-semibold text-warm-400 uppercase tracking-wider",children:Xe?a("discussions.implementation"):`${a("discussions.round")} ${pe}`}),f.jsx("div",{className:"flex-1 h-px bg-warm-200"})]}),De.map(We=>{const at=Q.get(We.agent_id),Ne=We.agent_id==="user",Fe=We.status==="running",ye=v.get(We.id)||[],le=O.has(We.id),me=!!We.content&&We.status==="completed"&&!Ne;return f.jsxs("div",{className:`flex gap-3 py-3 ${Ne?"justify-end":""}`,children:[!Ne&&f.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center text-white text-xs font-bold flex-shrink-0 ${Fe?"ring-2 ring-status-success ring-offset-1 animate-pulse":""}`,style:{backgroundColor:(at==null?void 0:at.avatar_color)||"#94a3b8"},children:We.agent_name.charAt(0)}),f.jsxs("div",{className:`flex-1 min-w-0 ${Ne?"max-w-[80%]":""}`,children:[!Ne&&f.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[f.jsx("span",{className:"text-xs font-semibold text-warm-700",children:We.agent_name}),f.jsx("span",{className:"text-2xs text-warm-400",children:a(`agents.roles.${We.role}`)||We.role}),We.status==="skipped"&&f.jsx("span",{className:"text-2xs text-warm-300 italic",children:a("status.skipped")}),me&&f.jsxs("button",{onClick:()=>R(We.id),className:"text-2xs text-warm-300 hover:text-accent transition-colors flex items-center gap-0.5",children:[f.jsx(zu,{size:12,className:`transition-transform ${le?"":"rotate-90"}`}),a(le?"discussions.expand":"discussions.collapse")]})]}),f.jsxs("div",{className:`rounded-xl p-3 text-sm ${Ne?"bg-accent/10 text-warm-700 ml-auto":We.status==="failed"?"bg-status-error/5 border border-status-error/20":"bg-warm-50 border border-warm-150"} ${me?"cursor-pointer":""}`,onClick:me?()=>{const Oe=window.getSelection();Oe&&Oe.toString().length>0||R(We.id)}:void 0,children:[le&&We.content&&f.jsx("div",{className:"text-xs text-warm-400 italic truncate",children:G(We.content)}),!le&&We.content&&f.jsx(LH,{content:We.content}),Fe&&ye.length>0&&f.jsx("div",{className:"text-xs text-warm-500 whitespace-pre-wrap leading-relaxed max-h-60 overflow-y-auto font-mono",children:ye.slice(-50).join(`
|
|
567
|
+
`)}),Fe&&ye.length===0&&f.jsxs("div",{className:"flex items-center gap-2 text-xs text-status-success",children:[f.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-status-success animate-pulse"}),a("discussions.speaking")]}),We.status==="pending"&&!We.content&&f.jsx("div",{className:"text-xs text-warm-300 italic",children:a("discussions.waiting")})]})]}),Ne&&f.jsx("div",{className:"w-8 h-8 rounded-full bg-warm-300 flex items-center justify-center text-white text-xs font-bold flex-shrink-0",children:"U"})]},We.id)})]},pe)}),f.jsx("div",{ref:F})]}),ce&&f.jsxs("div",{className:"border-t border-warm-200 pt-3 flex gap-2",children:[f.jsx("input",{type:"text",value:w,onChange:pe=>S(pe.target.value),onKeyDown:pe=>{pe.key==="Enter"&&!pe.shiftKey&&(pe.preventDefault(),B())},placeholder:a("discussions.userMessage"),className:"input flex-1 text-sm"}),f.jsx("button",{onClick:B,disabled:!w.trim(),className:"btn btn-primary btn-sm text-xs",children:a("discussions.inject")})]}),k&&f.jsx(ts,{open:!0,onClose:()=>E(!1),size:"xl",children:f.jsx("div",{className:"max-h-[90vh] overflow-y-auto",children:f.jsx(_7,{agents:oe?d:l.agents,initialValues:fe,mode:"edit",allowAdvancedFields:oe,submitting:T,onSubmit:J,onCancel:()=>E(!1)})})}),j&&f.jsx(ts,{open:!0,onClose:()=>_(!1),size:"sm",children:f.jsxs("div",{className:"glass-card rounded-2xl p-6 shadow-elevated space-y-4",children:[f.jsx("h3",{className:"text-sm font-semibold text-warm-700",children:a("discussions.selectAgent")}),f.jsx("p",{className:"text-xs text-warm-400",children:a("discussions.implementHint")}),f.jsx("div",{className:"space-y-2",children:l.agents.map(pe=>f.jsxs("button",{onClick:()=>K(pe.id),className:"w-full flex items-center gap-3 p-3 rounded-lg border border-warm-200 hover:border-accent hover:bg-accent/5 transition-colors",children:[f.jsx("div",{className:"w-8 h-8 rounded-full flex items-center justify-center text-white text-xs font-bold",style:{backgroundColor:pe.avatar_color||"#6366f1"},children:pe.name.charAt(0)}),f.jsxs("div",{className:"text-left",children:[f.jsx("div",{className:"text-sm font-medium text-warm-700",children:pe.name}),f.jsx("div",{className:"text-xs text-warm-400",children:a(`agents.roles.${pe.role}`)||pe.role})]})]},pe.id))}),f.jsx("button",{onClick:()=>_(!1),className:"btn btn-sm text-xs text-warm-500 w-full",children:a("header.cancel")})]})})]})}const D3e={low:{dot:"bg-status-success",label:"review.risk.low"},medium:{dot:"bg-status-warning",label:"review.risk.medium"},high:{dot:"bg-status-error",label:"review.risk.high"}};function R3e(e){return e?e<.01?"<$0.01":`$${e.toFixed(2)}`:"$0.00"}function I3e(e,t){const n=Date.now()-new Date(e).getTime();if(n<0)return t("review.justNow");const r=Math.floor(n/6e4);if(r<1)return t("review.justNow");if(r<60)return`${r}${t("review.minAgo")}`;const a=Math.floor(r/60);return a<24?`${a}${t("review.hourAgo")}`:`${Math.floor(a/24)}${t("review.dayAgo")}`}function L3e({status:e}){return e==="completed"?f.jsx(Tee,{size:14,className:"text-status-success"}):e==="failed"?f.jsx(t8,{size:14,className:"text-status-error"}):e==="stopped"?f.jsx(Ree,{size:14,className:"text-status-warning"}):f.jsx(nf,{size:14,className:"text-status-warning"})}function z3e({item:e,focused:t,onFocus:n,onOpen:r,onApprove:a,onContinue:i,onDiscard:s,busy:l}){const{t:c}=Ze(),[d,h]=x.useState(!1),[m,g]=x.useState(""),v=D3e[e.risk],b=e.status==="completed"&&!!e.branch_name&&!!e.worktree_path,w=e.status==="completed"&&!!e.worktree_path;return f.jsxs("div",{onClick:n,className:`card p-4 cursor-pointer transition-all ${t?"ring-2":""}`,style:{borderColor:t?"var(--color-accent)":void 0,boxShadow:t?"var(--shadow-soft)":void 0},children:[f.jsxs("div",{className:"flex items-start gap-3",children:[f.jsx("span",{className:`mt-1.5 w-2 h-2 rounded-full flex-shrink-0 ${v.dot}`,title:c(v.label)}),f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsxs("div",{className:"flex items-center gap-2 text-2xs uppercase tracking-wider mb-0.5",style:{color:"var(--color-text-muted)"},children:[f.jsx(Zee,{size:11}),f.jsx("span",{className:"truncate",children:e.project_name}),e.branch_name&&f.jsxs(f.Fragment,{children:[f.jsx("span",{children:"·"}),f.jsx(Bg,{size:11}),f.jsx("span",{className:"truncate font-mono",children:e.branch_name})]})]}),f.jsx("h3",{className:"font-medium truncate",style:{color:"var(--color-text-primary)"},children:e.title})]}),f.jsxs("div",{className:"flex-shrink-0 flex items-center gap-1.5 text-xs",style:{color:"var(--color-text-tertiary)"},children:[f.jsx(L3e,{status:e.status}),f.jsx("span",{children:I3e(e.updated_at,c)})]})]}),e.summary&&f.jsx("p",{className:"mt-2 text-sm line-clamp-2",style:{color:"var(--color-text-secondary)"},children:e.summary}),f.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-x-4 gap-y-1 text-xs",style:{color:"var(--color-text-tertiary)"},children:[f.jsx("span",{children:e.cli_tool||"claude"}),f.jsx("span",{children:"·"}),f.jsx("span",{children:R3e(e.total_cost_usd)}),(e.diff_files||0)>0&&f.jsxs(f.Fragment,{children:[f.jsx("span",{children:"·"}),f.jsxs("span",{children:[e.diff_files," ",c("review.files"),", +",Math.max(0,e.diff_lines??0)," ",c("review.lines")]})]}),e.round_count&&e.round_count>1&&f.jsxs(f.Fragment,{children:[f.jsx("span",{children:"·"}),f.jsxs("span",{children:[c("review.rounds")," ",e.round_count]})]})]}),f.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[f.jsx("button",{onClick:S=>{S.stopPropagation(),r()},className:"btn-ghost text-xs px-3 py-1.5",children:c("review.viewDetails")}),b&&f.jsx("button",{onClick:S=>{S.stopPropagation(),a()},disabled:l,className:"btn-primary text-xs px-3 py-1.5 disabled:opacity-50",children:l?f.jsx(Ap,{size:12,className:"animate-spin"}):c("review.approve")}),w&&f.jsx("button",{onClick:S=>{S.stopPropagation(),h(j=>!j)},className:"btn-ghost text-xs px-3 py-1.5",children:c("review.requestChanges")}),f.jsx("button",{onClick:S=>{S.stopPropagation(),s()},disabled:l,className:"btn-ghost text-xs px-3 py-1.5 ml-auto text-status-error hover:text-status-error",children:c("review.discard")})]}),d&&w&&f.jsxs("div",{className:"mt-3 space-y-2",onClick:S=>S.stopPropagation(),children:[f.jsx("textarea",{value:m,onChange:S=>g(S.target.value),placeholder:c("review.continuePlaceholder"),rows:3,className:"w-full text-sm rounded-lg p-2 resize-y",style:{backgroundColor:"var(--color-bg-secondary)",color:"var(--color-text-primary)",border:"1px solid var(--color-border)"}}),f.jsxs("div",{className:"flex gap-2 justify-end",children:[f.jsx("button",{onClick:()=>{h(!1),g("")},className:"btn-ghost text-xs px-3 py-1.5",children:c("review.cancel")}),f.jsx("button",{onClick:async()=>{const S=m.trim();S&&(await i(S),g(""),h(!1))},disabled:l||!m.trim(),className:"btn-primary text-xs px-3 py-1.5 disabled:opacity-50",children:l?f.jsx(Ap,{size:12,className:"animate-spin"}):c("review.send")})]})]})]})}const $3e=[{hours:12,key:"review.window.12h"},{hours:24,key:"review.window.24h"},{hours:168,key:"review.window.7d"}],q3e=[{id:"all",key:"review.filter.all"},{id:"risky",key:"review.filter.risky"},{id:"quickWins",key:"review.filter.quickWins"},{id:"failed",key:"review.filter.failed"}];function TF(e){return e?e<1e3?String(e):e<1e6?`${(e/1e3).toFixed(e<1e4?1:0)}K`:`${(e/1e6).toFixed(e<1e7?1:0)}M`:"0"}function B3e(e,t){switch(t){case"all":return e;case"risky":return e.filter(n=>n.risk==="high"||n.status==="failed");case"quickWins":return e.filter(n=>n.risk==="low"&&n.status==="completed"&&(n.total_cost_usd??0)<1);case"failed":return e.filter(n=>n.status==="failed"||n.status==="stopped")}}function F3e({onEvent:e}){const{t}=Ze(),[n,r]=x.useState(24),[a,i]=x.useState("all"),[s,l]=x.useState([]),[c,d]=x.useState(null),[h,m]=x.useState(!0),[g,v]=x.useState(0),[b,w]=x.useState({}),[S,j]=x.useState(null),[_,k]=x.useState([]),[E,T]=x.useState(!1),A=x.useMemo(()=>B3e(s,a),[s,a]),O=M=>{M&&M.scrollIntoView({block:"nearest",behavior:"smooth"})},I=x.useCallback(async()=>{m(!0);try{const[M,L]=await Promise.all([wne({hours:n}),m8({hours:n})]);l(M.items),d(L)}catch{}finally{m(!1)}},[n]);x.useEffect(()=>{I()},[I]),x.useEffect(()=>{g>=A.length&&v(Math.max(0,A.length-1))},[A.length,g]),x.useEffect(()=>e(M=>{M.type==="todo:status-changed"&&I()}),[e,I]);const P=(M,L)=>{w(G=>({...G,[M]:L}))},D=M=>{l(L=>L.filter(G=>G.id!==M))},q=x.useCallback(async M=>{P(M.id,!0);try{await w8(M.id),D(M.id)}catch(L){const G=L instanceof Error?L.message:String(L);alert(`${t("review.mergeFailed")}: ${G}`)}finally{P(M.id,!1)}},[t]),z=x.useCallback(async(M,L)=>{P(M.id,!0);try{await j8(M.id,L)}catch(G){const W=G instanceof Error?G.message:String(G);alert(`${t("review.continueFailed")}: ${W}`)}finally{P(M.id,!1)}},[t]),F=x.useCallback(async M=>{if(confirm(t("review.discardConfirm"))){P(M.id,!0);try{await S8(M.id,!0),D(M.id)}catch(L){const G=L instanceof Error?L.message:String(L);alert(`${t("review.discardFailed")}: ${G}`)}finally{P(M.id,!1)}}},[t]),R=x.useCallback(async M=>{j(M),k([]),T(!0);try{const L=await Z2(M.id);k(L)}catch{}finally{T(!1)}},[]);return x.useEffect(()=>{function M(L){const G=L.target;if(!(G&&(G.tagName==="INPUT"||G.tagName==="TEXTAREA"||G.isContentEditable))){if(L.key==="j"||L.key==="ArrowDown")L.preventDefault(),v(W=>Math.min(A.length-1,W+1));else if(L.key==="k"||L.key==="ArrowUp")L.preventDefault(),v(W=>Math.max(0,W-1));else if(L.key==="Enter"){const W=A[g];W&&R(W)}else if(L.key==="Escape")S&&j(null);else if(L.key==="m"){const W=A[g];W&&W.status==="completed"&&W.branch_name&&q(W)}else if(L.key==="d"){const W=A[g];W&&F(W)}}}return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[A,g,S,q,F,R]),f.jsxs("div",{className:"flex h-full overflow-hidden",children:[f.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[f.jsxs("div",{className:"px-6 pt-6 pb-3 flex items-center justify-between flex-wrap gap-3",children:[f.jsxs("div",{children:[f.jsxs("h1",{className:"text-xl font-semibold flex items-center gap-2",style:{color:"var(--color-text-primary)"},children:[f.jsx(cC,{size:20}),t("review.title")]}),f.jsx("p",{className:"text-xs mt-0.5",style:{color:"var(--color-text-muted)"},children:t("review.subtitle")})]}),f.jsxs("button",{onClick:I,className:"btn-ghost text-xs px-3 py-1.5 flex items-center gap-1.5",disabled:h,children:[f.jsx(Pte,{size:12,className:h?"animate-spin":""}),t("review.refresh")]})]}),f.jsxs("div",{className:"mx-6 mb-3 rounded-xl px-4 py-3 flex items-center flex-wrap gap-x-6 gap-y-2",style:{backgroundColor:"var(--color-bg-secondary)",border:"1px solid var(--color-border)"},children:[f.jsxs("div",{children:[f.jsx("div",{className:"text-2xs uppercase tracking-wider",style:{color:"var(--color-text-muted)"},children:t("review.tokens.total")}),f.jsx("div",{className:"text-lg font-semibold",style:{color:"var(--color-text-primary)"},children:c?TF(c.total_tokens):"—"})]}),f.jsxs("div",{children:[f.jsx("div",{className:"text-2xs uppercase tracking-wider",style:{color:"var(--color-text-muted)"},children:t("review.tokens.todos")}),f.jsx("div",{className:"text-lg font-semibold",style:{color:"var(--color-text-primary)"},children:(c==null?void 0:c.total_todos)??"—"})]}),c&&c.by_cli.length>0&&f.jsxs("div",{className:"flex-1 min-w-[200px]",children:[f.jsx("div",{className:"text-2xs uppercase tracking-wider mb-1",style:{color:"var(--color-text-muted)"},children:t("review.tokens.byCli")}),f.jsx("div",{className:"flex gap-3 text-xs flex-wrap",children:c.by_cli.map(M=>f.jsxs("span",{style:{color:"var(--color-text-secondary)"},children:[M.cli_tool,": ",f.jsx("strong",{children:TF(M.total_tokens)})," (",M.count,")"]},M.cli_tool))})]})]}),f.jsxs("div",{className:"px-6 pb-3 flex items-center justify-between flex-wrap gap-3",children:[f.jsx("div",{className:"flex gap-1",children:$3e.map(M=>f.jsx("button",{onClick:()=>r(M.hours),className:`text-xs px-3 py-1.5 rounded-lg transition-colors ${n===M.hours?"font-medium":""}`,style:n===M.hours?{backgroundColor:"var(--color-bg-hover)",color:"var(--color-text-primary)"}:{color:"var(--color-text-tertiary)"},children:t(M.key)},M.hours))}),f.jsx("div",{className:"flex gap-1",children:q3e.map(M=>f.jsx("button",{onClick:()=>i(M.id),className:`text-xs px-3 py-1.5 rounded-lg transition-colors ${a===M.id?"font-medium":""}`,style:a===M.id?{backgroundColor:"var(--color-bg-hover)",color:"var(--color-text-primary)"}:{color:"var(--color-text-tertiary)"},children:t(M.key)},M.id))})]}),f.jsx("div",{className:"flex-1 overflow-y-auto px-6 pb-6",id:"review-queue-stack",children:h&&s.length===0?f.jsx("div",{className:"space-y-3",children:[...Array(4)].map((M,L)=>f.jsx(Ue,{className:"h-24 w-full rounded-xl"},L))}):A.length===0?f.jsxs("div",{className:"flex flex-col items-center justify-center py-20 text-center",children:[f.jsx(cC,{size:48,style:{color:"var(--color-text-faint)"}}),f.jsx("p",{className:"mt-3 text-sm",style:{color:"var(--color-text-muted)"},children:t("review.empty")})]}):f.jsx("div",{className:"space-y-3",children:A.map((M,L)=>f.jsx("div",{"data-focus-idx":L,ref:L===g?O:null,children:f.jsx(z3e,{item:M,focused:L===g,onFocus:()=>v(L),onOpen:()=>R(M),onApprove:()=>q(M),onContinue:G=>z(M,G),onDiscard:()=>F(M),busy:!!b[M.id]})},M.id))})})]}),S&&f.jsxs("div",{className:"w-[480px] flex-shrink-0 flex flex-col border-l overflow-hidden animate-slide-in-right",style:{borderColor:"var(--color-border)",backgroundColor:"var(--color-bg-primary)"},children:[f.jsxs("div",{className:"px-4 py-3 border-b flex items-center justify-between",style:{borderColor:"var(--color-border)"},children:[f.jsxs("div",{className:"min-w-0",children:[f.jsx("div",{className:"text-2xs uppercase tracking-wider",style:{color:"var(--color-text-muted)"},children:S.project_name}),f.jsx("div",{className:"font-medium truncate",style:{color:"var(--color-text-primary)"},children:S.title})]}),f.jsx("button",{onClick:()=>j(null),className:"btn-ghost p-1.5",title:t("review.closeDetails"),children:f.jsx(Wr,{size:16})})]}),f.jsx("div",{className:"flex-1 overflow-hidden",children:E?f.jsxs("div",{className:"p-4 space-y-2",children:[f.jsx(Ue,{className:"h-4 w-full"}),f.jsx(Ue,{className:"h-4 w-5/6"}),f.jsx(Ue,{className:"h-4 w-4/6"})]}):f.jsx(Xg,{logs:_,embedded:!0})})]})]})}function H3e(){const{authenticated:e,authRequired:t,loading:n,login:r,logout:a}=FJ(),{connected:i,onEvent:s,sendMessage:l}=HJ(e),{t:c}=Ze();return n?f.jsxs("div",{className:"flex h-screen overflow-hidden",style:{backgroundColor:"var(--color-bg-primary)"},children:[f.jsxs("div",{className:"hidden md:flex flex-col w-64 border-r border-theme-border p-4 space-y-6",children:[f.jsx(Ue,{className:"h-8 w-32 mb-4"}),f.jsxs("div",{className:"space-y-3",children:[f.jsx(Ue,{className:"h-4 w-full"}),f.jsx(Ue,{className:"h-4 w-5/6"}),f.jsx(Ue,{className:"h-4 w-4/6"})]}),f.jsxs("div",{className:"mt-auto space-y-3 pt-4 border-t border-theme-border",children:[f.jsx(Ue,{className:"h-4 w-1/2"}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx(Ue,{className:"h-8 w-8"}),f.jsx(Ue,{className:"h-8 w-8"}),f.jsx(Ue,{className:"h-8 w-8"})]})]})]}),f.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[f.jsx("div",{className:"md:hidden h-14 border-b border-theme-border flex items-center px-4",children:f.jsx(Ue,{className:"h-6 w-32"})}),f.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-8",children:[f.jsxs("div",{className:"flex justify-between items-center",children:[f.jsxs("div",{className:"space-y-2",children:[f.jsx(Ue,{className:"h-8 w-48"}),f.jsx(Ue,{className:"h-4 w-32"})]}),f.jsx(Ue,{className:"h-10 w-24 rounded-xl"})]}),f.jsx(Ue,{className:"h-12 w-full rounded-xl"}),f.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[...Array(6)].map((d,h)=>f.jsxs("div",{className:"card p-5 space-y-4",children:[f.jsx(Ue,{className:"h-5 w-2/3"}),f.jsx(Ue,{className:"h-3 w-full"}),f.jsxs("div",{className:"flex gap-2 pt-2",children:[f.jsx(Ue,{className:"h-6 w-16"}),f.jsx(Ue,{className:"h-6 w-16"})]})]},h))})]})]})]}):e?f.jsx(EJ,{children:f.jsx(Ane,{onLogout:a,authRequired:t,connected:i,onEvent:s,children:f.jsxs(rJ,{children:[f.jsx(Pd,{path:"/",element:f.jsx(One,{onEvent:s})}),f.jsx(Pd,{path:"/review",element:f.jsx(F3e,{onEvent:s})}),f.jsx(Pd,{path:"/projects/:id",element:f.jsx(T3e,{onEvent:s,connected:i,sendMessage:l})}),f.jsx(Pd,{path:"/projects/:id/discussions/:discussionId",element:f.jsx(P3e,{onEvent:s,connected:i})})]})})}):f.jsx(ene,{onLogin:r})}function U3e(e){return ct(`/api/jira/${e}/test`)}function G3e(e,t){const n=new URLSearchParams;t!=null&&t.status&&n.set("status",t.status),t!=null&&t.search&&n.set("search",t.search),n.set("maxResults",String(t.maxResults)),t!=null&&t.startAt&&n.set("startAt",String(t.startAt));const r=n.toString();return ct(`/api/jira/${e}/issues${r?`?${r}`:""}`)}function OF(e,t){return ct(`/api/jira/${e}/issue/${t}/transitions`)}function V3e(e,t,n){return Be(`/api/jira/${e}/issue/${t}/transition`,{transitionId:n})}function K3e(e,t,n){return Be(`/api/jira/${e}/issue/${t}/comment`,{body:n})}function W3e(e,t){return Be(`/api/jira/${e}/issues`,t)}function Y3e(e,t){return Be(`/api/jira/${e}/import/${t}`)}function X3e(e){return ct(`/api/jira/${e}/statuses`)}function Z3e({project:e,onImportAsTask:t}){const{t:n}=Ze(),[r,a]=x.useState([]),[i,s]=x.useState(!1),[l,c]=x.useState(0),[d,h]=x.useState(0),[m,g]=x.useState(""),[v,b]=x.useState("all"),[w,S]=x.useState([]),[j,_]=x.useState(null),[k,E]=x.useState(null),[T,A]=x.useState(null),[O,I]=x.useState(!1),P=e.jira_enabled&&e.jira_base_url&&e.jira_email&&e.jira_api_token,D=x.useCallback(async(F=!1)=>{if(P){s(!0);try{const R=F?0:d,M=await G3e(e.id,{status:v!=="all"?v:void 0,search:m||void 0,maxResults:20,startAt:R});F?(a(M.issues),h(M.issues.length)):(a(L=>[...L,...M.issues]),h(R+M.issues.length)),c(M.total)}catch{}finally{s(!1)}}},[e.id,P,v,m,d]);x.useEffect(()=>{D(!0)},[e.id,P,v]),x.useEffect(()=>{P&&X3e(e.id).then(S).catch(()=>{})},[e.id,P]);const q=()=>{D(!0)},z=async F=>{_(F);try{const R=await Y3e(e.id,F);t(R.title,R.description),E(F),setTimeout(()=>E(null),2e3)}catch{}finally{_(null)}};return P?f.jsxs("div",{className:"animate-fade-in",children:[f.jsxs("div",{className:"flex items-center justify-between mb-4",children:[f.jsx("h2",{className:"text-sm font-semibold text-warm-700",children:n("jira.title")}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx("button",{onClick:()=>I(!O),className:"btn-primary text-xs",children:n("jira.createIssue")}),f.jsx("button",{onClick:()=>D(!0),disabled:i,className:"btn-ghost text-xs",children:n("jira.refresh")})]})]}),O&&f.jsx(eIe,{projectId:e.id,onCreated:()=>{I(!1),D(!0)},onCancel:()=>I(!1)}),f.jsxs("div",{className:"flex gap-2 mb-4",children:[f.jsxs("div",{className:"flex-1 relative",children:[f.jsx("input",{type:"text",value:m,onChange:F=>g(F.target.value),onKeyDown:F=>F.key==="Enter"&&q(),placeholder:n("jira.search"),className:"input-field text-xs pr-8"}),f.jsx("button",{onClick:q,className:"absolute right-2 top-1/2 -translate-y-1/2 text-warm-400 hover:text-warm-600",children:f.jsx(Hg,{size:14})})]}),f.jsxs("select",{value:v,onChange:F=>b(F.target.value),className:"input-field text-xs w-36",children:[f.jsx("option",{value:"all",children:n("jira.allStatuses")}),w.map(F=>f.jsx("option",{value:F,children:F},F))]})]}),l>0&&f.jsxs("p",{className:"text-xs text-warm-400 mb-3",children:[l," ",n("jira.total")]}),r.length===0&&!i&&f.jsxs("div",{className:"card p-10 text-center",children:[f.jsx("p",{className:"text-warm-400 text-sm",children:n("jira.noIssues")}),f.jsx("p",{className:"text-warm-300 text-xs mt-1",children:n("jira.noIssuesHint")})]}),f.jsx("div",{className:"space-y-2",children:r.map(F=>f.jsx(Q3e,{issue:F,projectId:e.id,expanded:T===F.key,onToggle:()=>A(T===F.key?null:F.key),importing:j===F.key,imported:k===F.key,onImport:()=>z(F.key)},F.key))}),r.length<l&&f.jsx("div",{className:"mt-4 text-center",children:f.jsx("button",{onClick:()=>D(!1),disabled:i,className:"btn-ghost text-xs",children:i?"...":n("jira.loadMore")})})]}):f.jsxs("div",{className:"card p-16 text-center animate-fade-in",children:[f.jsx("div",{className:"text-warm-300 mb-3",children:f.jsx(tf,{size:48,className:"mx-auto",strokeWidth:1})}),f.jsx("p",{className:"text-warm-400 text-sm",children:n("jira.notConfigured")})]})}function Q3e({issue:e,projectId:t,expanded:n,onToggle:r,importing:a,imported:i,onImport:s}){var d,h;const{t:l}=Ze(),c=tIe((d=e.fields.status.statusCategory)==null?void 0:d.colorName);return f.jsxs("div",{className:"card p-3 hover:shadow-md transition-shadow",children:[f.jsxs("div",{className:"flex items-start gap-3",children:[e.fields.issuetype.iconUrl&&f.jsx("img",{src:e.fields.issuetype.iconUrl,alt:e.fields.issuetype.name,className:"w-4 h-4 mt-0.5 flex-shrink-0"}),f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("button",{onClick:r,className:"text-xs font-mono text-blue-600 hover:text-blue-800 font-medium flex-shrink-0",children:e.key}),f.jsx("span",{className:"text-xs text-warm-700 truncate",children:e.fields.summary})]}),f.jsxs("div",{className:"flex flex-wrap items-center gap-2 mt-1.5",children:[f.jsx("span",{className:`inline-flex items-center px-1.5 py-0.5 rounded text-2xs font-medium ${c}`,children:e.fields.status.name}),e.fields.priority&&f.jsxs("span",{className:"text-2xs text-warm-400 flex items-center gap-1",children:[e.fields.priority.iconUrl&&f.jsx("img",{src:e.fields.priority.iconUrl,alt:"",className:"w-3 h-3"}),e.fields.priority.name]}),f.jsx("span",{className:"text-2xs text-warm-300",children:((h=e.fields.assignee)==null?void 0:h.displayName)||l("jira.unassigned")}),e.fields.labels.length>0&&f.jsx("span",{className:"text-2xs text-warm-300",children:e.fields.labels.join(", ")}),f.jsx("span",{className:"text-2xs text-warm-300 ml-auto",children:new Date(e.fields.updated).toLocaleDateString()})]})]}),f.jsx("button",{onClick:s,disabled:a||i,className:`flex-shrink-0 text-xs px-2 py-1 rounded-lg font-medium transition-colors ${i?"bg-status-success/10 text-status-success":"bg-blue-50 text-blue-600 hover:bg-blue-100"}`,title:l("jira.import"),children:l(a?"jira.importing":i?"jira.imported":"jira.import")})]}),n&&f.jsx(J3e,{issueKey:e.key,projectId:t})]})}function J3e({issueKey:e,projectId:t}){const{t:n}=Ze(),[r,a]=x.useState([]),[i,s]=x.useState(!1),[l,c]=x.useState(""),[d,h]=x.useState(!1);x.useEffect(()=>{OF(t,e).then(v=>a(v.transitions)).catch(()=>{})},[t,e]);const m=async v=>{s(!0);try{await V3e(t,e,v);const b=await OF(t,e);a(b.transitions)}catch{}finally{s(!1)}},g=async()=>{if(l.trim()){h(!0);try{await K3e(t,e,l),c("")}catch{}finally{h(!1)}}};return f.jsxs("div",{className:"mt-3 pt-3 border-t border-warm-100 space-y-3 animate-slide-up",children:[r.length>0&&f.jsxs("div",{children:[f.jsx("p",{className:"text-2xs font-medium text-warm-500 mb-1.5",children:n("jira.transition")}),f.jsx("div",{className:"flex flex-wrap gap-1.5",children:r.map(v=>f.jsx("button",{onClick:()=>m(v.id),disabled:i,className:"text-2xs px-2 py-1 rounded-md bg-warm-50 text-warm-600 hover:bg-warm-100 transition-colors font-medium",children:v.name},v.id))})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-2xs font-medium text-warm-500 mb-1.5",children:n("jira.comment")}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx("input",{type:"text",value:l,onChange:v=>c(v.target.value),onKeyDown:v=>v.key==="Enter"&&g(),placeholder:n("jira.commentPlaceholder"),className:"input-field text-xs flex-1"}),f.jsx("button",{onClick:g,disabled:d||!l.trim(),className:"btn-primary text-xs",children:d?"...":n("jira.commentSend")})]})]})]})}function eIe({projectId:e,onCreated:t,onCancel:n}){const{t:r}=Ze(),[a,i]=x.useState(""),[s,l]=x.useState(""),[c,d]=x.useState("Task"),[h,m]=x.useState(!1),g=async()=>{if(a.trim()){m(!0);try{await W3e(e,{summary:a,description:s||void 0,issueType:c}),t()}catch{}finally{m(!1)}}};return f.jsx("div",{className:"card p-4 mb-4 animate-slide-up",children:f.jsxs("div",{className:"space-y-3",children:[f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-1",children:r("jira.createSummary")}),f.jsx("input",{type:"text",value:a,onChange:v=>i(v.target.value),className:"input-field text-xs",autoFocus:!0})]}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-1",children:r("jira.createDesc")}),f.jsx("textarea",{value:s,onChange:v=>l(v.target.value),className:"input-field text-xs",rows:3})]}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-1",children:r("jira.createType")}),f.jsxs("select",{value:c,onChange:v=>d(v.target.value),className:"input-field text-xs w-40",children:[f.jsx("option",{value:"Task",children:"Task"}),f.jsx("option",{value:"Bug",children:"Bug"}),f.jsx("option",{value:"Story",children:"Story"}),f.jsx("option",{value:"Epic",children:"Epic"})]})]}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsx("button",{onClick:n,className:"btn-ghost text-xs",children:r("header.cancel")}),f.jsx("button",{onClick:g,disabled:h||!a.trim(),className:"btn-primary text-xs",children:r(h?"jira.creating":"jira.createIssue")})]})]})})}function tIe(e){switch(e){case"blue-gray":case"default":return"bg-warm-100 text-warm-600";case"blue":return"bg-blue-100 text-blue-700";case"green":return"bg-status-success/10 text-status-success";case"yellow":return"bg-amber-100 text-amber-700";default:return"bg-warm-100 text-warm-600"}}function nIe({project:e,config:t,onConfigChange:n}){const{t:r}=Ze(),[a,i]=x.useState(!1),[s,l]=x.useState(null),[c,d]=x.useState(!1),h=t.enabled==="1"||t.enabled===!0,m=async()=>{i(!0),l(null);try{const g=await U3e(e.id);l(g.ok?"ok":"fail")}catch{l("fail")}finally{i(!1)}};return f.jsxs("div",{className:"p-4 border border-warm-200 rounded-xl",children:[f.jsxs("div",{className:"flex items-center justify-between mb-1",children:[f.jsx("h4",{className:"text-sm font-semibold text-warm-700",children:r("header.jiraTitle")}),f.jsxs("label",{className:"relative inline-flex items-center cursor-pointer",children:[f.jsx("input",{type:"checkbox",checked:h,onChange:g=>n({enabled:g.target.checked?"1":"0"}),className:"sr-only peer"}),f.jsx("div",{className:"w-9 h-5 bg-warm-200 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-warm-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-status-success"})]})]}),f.jsx("p",{className:"text-xs text-warm-400 mb-3",children:r("header.jiraDesc")}),h&&f.jsxs("div",{className:"space-y-3",children:[f.jsxs("button",{type:"button",onClick:()=>d(!c),className:"flex items-center gap-1 text-xs text-accent-dark hover:text-accent transition-colors",children:[f.jsx("span",{className:`inline-block transition-transform ${c?"rotate-90":""}`,children:"▶"}),r("header.jiraGuideToggle")]}),c&&f.jsxs("div",{className:"p-3 bg-warm-50 border border-warm-150 rounded-lg text-xs text-warm-600 space-y-2",children:[f.jsxs("div",{children:[f.jsx("p",{className:"font-semibold text-warm-700 mb-1",children:r("header.jiraGuidePrep")}),f.jsxs("ol",{className:"list-decimal list-inside space-y-0.5 ml-1",children:[f.jsx("li",{children:r("header.jiraGuideStep1")}),f.jsx("li",{children:r("header.jiraGuideStep2")})]})]}),f.jsxs("div",{children:[f.jsx("p",{className:"font-semibold text-warm-700 mb-1",children:r("header.jiraGuideSetup")}),f.jsxs("ol",{className:"list-decimal list-inside space-y-0.5 ml-1",children:[f.jsx("li",{children:r("header.jiraGuideSetup1")}),f.jsx("li",{children:r("header.jiraGuideSetup2")}),f.jsx("li",{children:r("header.jiraGuideSetup3")})]})]}),f.jsxs("div",{children:[f.jsx("p",{className:"font-semibold text-warm-700 mb-1",children:r("header.jiraGuideUsage")}),f.jsxs("ol",{className:"list-decimal list-inside space-y-0.5 ml-1",children:[f.jsx("li",{children:r("header.jiraGuideUsage1")}),f.jsx("li",{children:r("header.jiraGuideUsage2")}),f.jsx("li",{children:r("header.jiraGuideUsage3")})]})]})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[f.jsxs("div",{children:[f.jsx("label",{className:"text-xs text-warm-500 block mb-1",children:r("header.jiraBaseUrl")}),f.jsx("input",{type:"text",value:t.base_url??"",onChange:g=>n({base_url:g.target.value||null}),placeholder:r("header.jiraBaseUrlPlaceholder"),className:"w-full px-3 py-1.5 text-xs border border-warm-200 rounded-lg bg-warm-50 text-warm-700 focus:ring-1 focus:ring-accent focus:border-accent"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"text-xs text-warm-500 block mb-1",children:r("header.jiraProjectKey")}),f.jsx("input",{type:"text",value:t.project_key??"",onChange:g=>n({project_key:g.target.value||null}),placeholder:r("header.jiraProjectKeyPlaceholder"),className:"w-full px-3 py-1.5 text-xs border border-warm-200 rounded-lg bg-warm-50 text-warm-700 focus:ring-1 focus:ring-accent focus:border-accent"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"text-xs text-warm-500 block mb-1",children:r("header.jiraEmail")}),f.jsx("input",{type:"text",value:t.email??"",onChange:g=>n({email:g.target.value||null}),placeholder:r("header.jiraEmailPlaceholder"),className:"w-full px-3 py-1.5 text-xs border border-warm-200 rounded-lg bg-warm-50 text-warm-700 focus:ring-1 focus:ring-accent focus:border-accent"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"text-xs text-warm-500 block mb-1",children:r("header.jiraApiToken")}),f.jsx("input",{type:"password",value:t.api_token??"",onChange:g=>n({api_token:g.target.value||null}),placeholder:r("header.jiraApiTokenPlaceholder"),className:"w-full px-3 py-1.5 text-xs border border-warm-200 rounded-lg bg-warm-50 text-warm-700 focus:ring-1 focus:ring-accent focus:border-accent"})]})]}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("button",{onClick:m,disabled:a,className:"px-3 py-1 text-xs rounded-lg bg-warm-100 text-warm-600 hover:bg-warm-200 disabled:opacity-50 transition-colors",children:r(a?"header.jiraTesting":"header.jiraTestConnection")}),s==="ok"&&f.jsx("span",{className:"text-xs text-status-success font-medium",children:r("header.jiraConnected")}),s==="fail"&&f.jsx("span",{className:"text-xs text-status-error font-medium",children:r("header.jiraFailed")})]}),f.jsx("p",{className:"text-xs text-warm-300",children:r("header.jiraTokenHint")})]})]})}const rIe={id:"jira",displayName:"Jira",displayNameKo:"Jira",PanelComponent:Z3e,SettingsComponent:nIe,hasTab:!0,isEnabled:e=>!!e.jira_enabled,translations:{en:{"tabs.jira":"Jira","jira.title":"Jira Issues","jira.search":"Search issues...","jira.allStatuses":"All Statuses","jira.refresh":"Refresh","jira.import":"Import as Task","jira.importing":"Importing...","jira.imported":"Imported!","jira.noIssues":"No issues found","jira.noIssuesHint":"Try changing the filter or search query.","jira.loadMore":"Load More","jira.total":"total","jira.transition":"Change Status","jira.comment":"Comment","jira.commentPlaceholder":"Add a comment...","jira.commentSend":"Send","jira.createIssue":"Create Issue","jira.createSummary":"Summary","jira.createDesc":"Description","jira.createType":"Issue Type","jira.creating":"Creating...","jira.notConfigured":"Jira is not configured. Enable it in project settings.","jira.assignee":"Assignee","jira.unassigned":"Unassigned","jira.updated":"Updated","header.jiraTitle":"Jira Integration","header.jiraBaseUrl":"Jira URL","header.jiraBaseUrlPlaceholder":"https://your-domain.atlassian.net","header.jiraProjectKey":"Project Key","header.jiraProjectKeyPlaceholder":"e.g. PROJ","header.jiraEmail":"Email","header.jiraEmailPlaceholder":"your@email.com","header.jiraApiToken":"API Token","header.jiraApiTokenPlaceholder":"Jira API token","header.jiraTestConnection":"Test Connection","header.jiraTesting":"Testing...","header.jiraConnected":"Connected!","header.jiraFailed":"Connection failed","header.jiraTokenHint":"Create a token at id.atlassian.com/manage-profile/security/api-tokens","header.jiraDesc":"Browse Jira issues and import them as AI tasks.","header.jiraGuideToggle":"Setup Guide","header.jiraGuidePrep":"Prerequisites","header.jiraGuideStep1":"Go to id.atlassian.com/manage-profile/security/api-tokens and create an API token","header.jiraGuideStep2":"Note your Jira URL (e.g. https://your-domain.atlassian.net) and project key (e.g. PROJ)","header.jiraGuideSetup":"Configuration","header.jiraGuideSetup1":"Enter Jira URL, project key, email, and API token above","header.jiraGuideSetup2":'Click "Test Connection" to verify',"header.jiraGuideSetup3":"Save settings","header.jiraGuideUsage":"Usage","header.jiraGuideUsage1":"Open the Jira tab in the project detail page","header.jiraGuideUsage2":"Browse, search, or filter issues by status","header.jiraGuideUsage3":'Click "Import as Task" to create an AI task from a Jira issue'},ko:{"tabs.jira":"Jira","jira.title":"Jira 이슈","jira.search":"이슈 검색...","jira.allStatuses":"모든 상태","jira.refresh":"새로고침","jira.import":"작업으로 가져오기","jira.importing":"가져오는 중...","jira.imported":"가져옴!","jira.noIssues":"이슈가 없습니다","jira.noIssuesHint":"필터나 검색어를 변경해보세요.","jira.loadMore":"더 보기","jira.total":"건","jira.transition":"상태 변경","jira.comment":"댓글","jira.commentPlaceholder":"댓글 입력...","jira.commentSend":"전송","jira.createIssue":"이슈 생성","jira.createSummary":"제목","jira.createDesc":"설명","jira.createType":"이슈 유형","jira.creating":"생성 중...","jira.notConfigured":"Jira가 설정되지 않았습니다. 프로젝트 설정에서 활성화하세요.","jira.assignee":"담당자","jira.unassigned":"미배정","jira.updated":"업데이트","header.jiraTitle":"Jira 연동","header.jiraBaseUrl":"Jira URL","header.jiraBaseUrlPlaceholder":"https://your-domain.atlassian.net","header.jiraProjectKey":"프로젝트 키","header.jiraProjectKeyPlaceholder":"예: PROJ","header.jiraEmail":"이메일","header.jiraEmailPlaceholder":"your@email.com","header.jiraApiToken":"API 토큰","header.jiraApiTokenPlaceholder":"Jira API 토큰","header.jiraTestConnection":"연결 테스트","header.jiraTesting":"테스트 중...","header.jiraConnected":"연결 성공!","header.jiraFailed":"연결 실패","header.jiraTokenHint":"id.atlassian.com/manage-profile/security/api-tokens에서 토큰을 생성하세요","header.jiraDesc":"Jira 이슈를 조회하고 AI 태스크로 가져옵니다.","header.jiraGuideToggle":"설정 가이드","header.jiraGuidePrep":"사전 준비","header.jiraGuideStep1":"id.atlassian.com/manage-profile/security/api-tokens에서 API 토큰 생성","header.jiraGuideStep2":"Jira URL (예: https://your-domain.atlassian.net)과 프로젝트 키 (예: PROJ) 확인","header.jiraGuideSetup":"설정 방법","header.jiraGuideSetup1":"위 입력란에 Jira URL, 프로젝트 키, 이메일, API 토큰 입력","header.jiraGuideSetup2":'"연결 테스트" 클릭하여 연결 확인',"header.jiraGuideSetup3":"설정 저장","header.jiraGuideUsage":"사용법","header.jiraGuideUsage1":"프로젝트 상세 페이지에서 Jira 탭 진입","header.jiraGuideUsage2":"이슈 검색, 상태 필터링","header.jiraGuideUsage3":'"작업으로 가져오기" 클릭하여 AI 태스크 생성'}}};function aIe(e){return ct(`/api/github/${e}/test`)}function iIe(e,t){const n=new URLSearchParams;t!=null&&t.state&&n.set("state",t.state),t!=null&&t.page&&n.set("page",String(t.page)),n.set("per_page",String(t.per_page)),t!=null&&t.labels&&n.set("labels",t.labels),t!=null&&t.search&&n.set("search",t.search);const r=n.toString();return ct(`/api/github/${e}/issues${r?`?${r}`:""}`)}function sIe(e,t){return ct(`/api/github/${e}/issue/${t}/comments`)}function oIe(e,t){return Be(`/api/github/${e}/issues`,t)}function lIe(e,t){return Be(`/api/github/${e}/import/${t}`)}function uIe({project:e,onImportAsTask:t}){const{t:n}=Ze(),[r,a]=x.useState([]),[i,s]=x.useState(!1),[l,c]=x.useState(1),[d,h]=x.useState(!1),[m,g]=x.useState(""),[v,b]=x.useState("open"),[w,S]=x.useState(null),[j,_]=x.useState(null),[k,E]=x.useState(null),[T,A]=x.useState(!1),O=e.github_enabled&&e.github_token&&e.github_owner&&e.github_repo,I=x.useCallback(async(z=!1)=>{if(O){s(!0);try{const F=z?1:l,R=await iIe(e.id,{state:v,page:F,per_page:20,search:m||void 0});z?(a(R.items),c(1)):a(M=>[...M,...R.items]),h(R.items.length>=20)}catch{}finally{s(!1)}}},[e.id,O,m,v,l]);x.useEffect(()=>{I(!0)},[e.id,O,v]);const P=()=>{I(!0)},D=()=>{c(z=>z+1),setTimeout(()=>I(!1),0)},q=async z=>{S(z);try{const F=await lIe(e.id,z);t(F.title,F.description),_(z),setTimeout(()=>_(null),2e3)}catch{}finally{S(null)}};return O?f.jsxs("div",{className:"animate-fade-in",children:[f.jsxs("div",{className:"flex items-center justify-between mb-4",children:[f.jsx("h2",{className:"text-sm font-semibold text-warm-700",children:n("github.title")}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx("button",{onClick:()=>A(!T),className:"btn-primary text-xs",children:n("github.createIssue")}),f.jsx("button",{onClick:()=>I(!0),disabled:i,className:"btn-ghost text-xs",children:n("github.refresh")})]})]}),T&&f.jsx(fIe,{projectId:e.id,onCreated:()=>{A(!1),I(!0)},onCancel:()=>A(!1)}),f.jsxs("div",{className:"flex gap-2 mb-4",children:[f.jsxs("select",{value:v,onChange:z=>b(z.target.value),className:"input-field text-xs w-24",children:[f.jsx("option",{value:"open",children:n("github.open")}),f.jsx("option",{value:"closed",children:n("github.closed")}),f.jsx("option",{value:"all",children:n("github.all")})]}),f.jsxs("div",{className:"flex-1 relative",children:[f.jsx("input",{type:"text",value:m,onChange:z=>g(z.target.value),onKeyDown:z=>z.key==="Enter"&&P(),placeholder:n("github.search"),className:"input-field text-xs pr-8"}),f.jsx("button",{onClick:P,className:"absolute right-2 top-1/2 -translate-y-1/2 text-warm-400 hover:text-warm-600",children:f.jsx(Hg,{size:14})})]})]}),r.length===0&&!i&&f.jsxs("div",{className:"card p-10 text-center",children:[f.jsx("p",{className:"text-warm-400 text-sm",children:n("github.noIssues")}),f.jsx("p",{className:"text-warm-300 text-xs mt-1",children:n("github.noIssuesHint")})]}),f.jsx("div",{className:"space-y-2",children:r.map(z=>f.jsx(cIe,{issue:z,projectId:e.id,expanded:k===z.number,onToggle:()=>E(k===z.number?null:z.number),importing:w===z.number,imported:j===z.number,onImport:()=>q(z.number)},z.number))}),d&&f.jsx("div",{className:"mt-4 text-center",children:f.jsx("button",{onClick:D,disabled:i,className:"btn-ghost text-xs",children:i?"...":n("github.loadMore")})})]}):f.jsxs("div",{className:"card p-16 text-center animate-fade-in",children:[f.jsx("div",{className:"text-warm-300 mb-3",children:f.jsx(rte,{size:48,className:"mx-auto",strokeWidth:1})}),f.jsx("p",{className:"text-warm-400 text-sm",children:n("github.notConfigured")})]})}function cIe({issue:e,projectId:t,expanded:n,onToggle:r,importing:a,imported:i,onImport:s}){const{t:l}=Ze(),c=new Date(e.updated_at).toLocaleDateString();return f.jsxs("div",{className:"card p-3 hover:shadow-md transition-shadow",children:[f.jsxs("div",{className:"flex items-start gap-3",children:[f.jsx("div",{className:`mt-0.5 flex-shrink-0 ${e.state==="open"?"text-status-success":"text-purple-500"}`,children:e.state==="open"?f.jsx(Pee,{size:16}):f.jsx(e8,{size:16})}),f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsx("div",{className:"flex items-center gap-2",children:f.jsxs("button",{onClick:r,className:"text-xs font-medium text-blue-600 hover:text-blue-800 truncate text-left",children:["#",e.number," ",e.title]})}),f.jsxs("div",{className:"flex flex-wrap items-center gap-2 mt-1.5",children:[e.labels.map(d=>f.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-2xs font-medium",style:{backgroundColor:`#${d.color}20`,color:`#${d.color}`},children:d.name},d.name)),e.user&&f.jsx("span",{className:"text-2xs text-warm-400",children:e.user.login}),e.comments>0&&f.jsxs("span",{className:"text-2xs text-warm-400",children:[e.comments," comments"]}),f.jsx("span",{className:"text-2xs text-warm-300 ml-auto",children:c})]})]}),f.jsx("button",{onClick:s,disabled:a||i,className:`flex-shrink-0 text-xs px-2 py-1 rounded-lg font-medium transition-colors ${i?"bg-status-success/10 text-status-success":"bg-blue-50 text-blue-600 hover:bg-blue-100"}`,title:l("github.import"),children:l(a?"github.importing":i?"github.imported":"github.import")})]}),n&&f.jsx(dIe,{issueNumber:e.number,projectId:t,body:e.body})]})}function dIe({issueNumber:e,projectId:t,body:n}){const{t:r}=Ze(),[a,i]=x.useState([]),[s,l]=x.useState(!0);return x.useEffect(()=>{l(!0),sIe(t,e).then(c=>i(c||[])).catch(()=>{}).finally(()=>l(!1))},[t,e]),f.jsxs("div",{className:"mt-3 pt-3 border-t border-warm-100 space-y-2 animate-slide-up max-h-64 overflow-y-auto",children:[n?f.jsx("div",{className:"text-xs text-warm-500 whitespace-pre-wrap break-words",children:n}):f.jsx("p",{className:"text-xs text-warm-400 italic",children:r("github.noBody")}),s?f.jsx("p",{className:"text-xs text-warm-400",children:r("github.loadingComments")}):a.length>0?f.jsxs("div",{className:"space-y-2 mt-2",children:[f.jsx("p",{className:"text-2xs font-semibold text-warm-500 uppercase",children:r("github.comments")}),a.map(c=>{var d;return f.jsxs("div",{className:"pl-3 border-l-2 border-warm-100",children:[f.jsx("p",{className:"text-2xs text-warm-400 font-medium",children:(d=c.user)==null?void 0:d.login}),f.jsx("p",{className:"text-xs text-warm-500 whitespace-pre-wrap break-words",children:c.body})]},c.id)})]}):null]})}function fIe({projectId:e,onCreated:t,onCancel:n}){const{t:r}=Ze(),[a,i]=x.useState(""),[s,l]=x.useState(""),[c,d]=x.useState(!1),h=async()=>{if(a.trim()){d(!0);try{await oIe(e,{title:a,body:s||void 0}),t()}catch{}finally{d(!1)}}};return f.jsx("div",{className:"card p-4 mb-4 animate-slide-up",children:f.jsxs("div",{className:"space-y-3",children:[f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-1",children:r("github.issueTitle")}),f.jsx("input",{type:"text",value:a,onChange:m=>i(m.target.value),onKeyDown:m=>m.key==="Enter"&&h(),className:"input-field text-xs",autoFocus:!0})]}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-1",children:r("github.issueBody")}),f.jsx("textarea",{value:s,onChange:m=>l(m.target.value),className:"input-field text-xs",rows:3})]}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsx("button",{onClick:n,className:"btn-ghost text-xs",children:r("header.cancel")}),f.jsx("button",{onClick:h,disabled:c||!a.trim(),className:"btn-primary text-xs",children:r(c?"github.creating":"github.createIssue")})]})]})})}function hIe({project:e,config:t,onConfigChange:n}){const{t:r}=Ze(),[a,i]=x.useState(!1),[s,l]=x.useState(null),[c,d]=x.useState(!1),h=t.enabled==="1"||t.enabled===!0,m=async()=>{i(!0),l(null);try{const g=await aIe(e.id);l(g.ok?"ok":"fail")}catch{l("fail")}finally{i(!1)}};return f.jsxs("div",{className:"p-4 border border-warm-200 rounded-xl",children:[f.jsxs("div",{className:"flex items-center justify-between mb-1",children:[f.jsx("h4",{className:"text-sm font-semibold text-warm-700",children:r("header.githubTitle")}),f.jsxs("label",{className:"relative inline-flex items-center cursor-pointer",children:[f.jsx("input",{type:"checkbox",checked:h,onChange:g=>n({enabled:g.target.checked?"1":"0"}),className:"sr-only peer"}),f.jsx("div",{className:"w-9 h-5 bg-warm-200 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-warm-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-status-success"})]})]}),f.jsx("p",{className:"text-xs text-warm-400 mb-3",children:r("header.githubDesc")}),h&&f.jsxs("div",{className:"space-y-3",children:[f.jsxs("button",{type:"button",onClick:()=>d(!c),className:"flex items-center gap-1 text-xs text-accent-dark hover:text-accent transition-colors",children:[f.jsx("span",{className:`inline-block transition-transform ${c?"rotate-90":""}`,children:"▶"}),r("header.githubGuideToggle")]}),c&&f.jsxs("div",{className:"p-3 bg-warm-50 border border-warm-150 rounded-lg text-xs text-warm-600 space-y-2",children:[f.jsxs("div",{children:[f.jsx("p",{className:"font-semibold text-warm-700 mb-1",children:r("header.githubGuidePrep")}),f.jsxs("ol",{className:"list-decimal list-inside space-y-0.5 ml-1",children:[f.jsx("li",{children:r("header.githubGuideStep1")}),f.jsx("li",{children:r("header.githubGuideStep2")})]})]}),f.jsxs("div",{children:[f.jsx("p",{className:"font-semibold text-warm-700 mb-1",children:r("header.githubGuideSetup")}),f.jsxs("ol",{className:"list-decimal list-inside space-y-0.5 ml-1",children:[f.jsx("li",{children:r("header.githubGuideSetup1")}),f.jsx("li",{children:r("header.githubGuideSetup2")}),f.jsx("li",{children:r("header.githubGuideSetup3")})]})]}),f.jsxs("div",{children:[f.jsx("p",{className:"font-semibold text-warm-700 mb-1",children:r("header.githubGuideUsage")}),f.jsxs("ol",{className:"list-decimal list-inside space-y-0.5 ml-1",children:[f.jsx("li",{children:r("header.githubGuideUsage1")}),f.jsx("li",{children:r("header.githubGuideUsage2")}),f.jsx("li",{children:r("header.githubGuideUsage3")})]})]})]}),f.jsxs("div",{className:"grid grid-cols-1 gap-3",children:[f.jsxs("div",{children:[f.jsx("label",{className:"text-xs text-warm-500 block mb-1",children:r("header.githubToken")}),f.jsx("input",{type:"password",value:t.token??"",onChange:g=>n({token:g.target.value||null}),placeholder:r("header.githubTokenPlaceholder"),className:"w-full px-3 py-1.5 text-xs border border-warm-200 rounded-lg bg-warm-50 text-warm-700 focus:ring-1 focus:ring-accent focus:border-accent"})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[f.jsxs("div",{children:[f.jsx("label",{className:"text-xs text-warm-500 block mb-1",children:r("header.githubOwner")}),f.jsx("input",{type:"text",value:t.owner??"",onChange:g=>n({owner:g.target.value||null}),placeholder:r("header.githubOwnerPlaceholder"),className:"w-full px-3 py-1.5 text-xs border border-warm-200 rounded-lg bg-warm-50 text-warm-700 focus:ring-1 focus:ring-accent focus:border-accent"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"text-xs text-warm-500 block mb-1",children:r("header.githubRepo")}),f.jsx("input",{type:"text",value:t.repo??"",onChange:g=>n({repo:g.target.value||null}),placeholder:r("header.githubRepoPlaceholder"),className:"w-full px-3 py-1.5 text-xs border border-warm-200 rounded-lg bg-warm-50 text-warm-700 focus:ring-1 focus:ring-accent focus:border-accent"})]})]})]}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("button",{onClick:m,disabled:a,className:"px-3 py-1 text-xs rounded-lg bg-warm-100 text-warm-600 hover:bg-warm-200 disabled:opacity-50 transition-colors",children:r(a?"header.githubTesting":"header.githubTestConnection")}),s==="ok"&&f.jsx("span",{className:"text-xs text-status-success font-medium",children:r("header.githubConnected")}),s==="fail"&&f.jsx("span",{className:"text-xs text-status-error font-medium",children:r("header.githubFailed")})]}),f.jsx("p",{className:"text-xs text-warm-300",children:r("header.githubTokenHint")})]})]})}const mIe={id:"github",displayName:"GitHub",displayNameKo:"GitHub",PanelComponent:uIe,SettingsComponent:hIe,hasTab:!0,isEnabled:e=>!!e.github_enabled,translations:{en:{"tabs.github":"GitHub","github.title":"GitHub Issues","github.search":"Search issues...","github.refresh":"Refresh","github.import":"Import as Task","github.importing":"Importing...","github.imported":"Imported!","github.noIssues":"No issues found","github.noIssuesHint":"Try changing the filter or search query.","github.loadMore":"Load More","github.createIssue":"Create Issue","github.issueTitle":"Title","github.issueBody":"Description","github.creating":"Creating...","github.notConfigured":"GitHub is not configured. Enable it in project settings.","github.loadingComments":"Loading comments...","github.comments":"Comments","github.noBody":"No description provided.","github.open":"Open","github.closed":"Closed","github.all":"All","header.githubTitle":"GitHub Integration","header.githubToken":"Personal Access Token","header.githubTokenPlaceholder":"ghp_...","header.githubOwner":"Owner","header.githubOwnerPlaceholder":"e.g. octocat","header.githubRepo":"Repository","header.githubRepoPlaceholder":"e.g. my-repo","header.githubTestConnection":"Test Connection","header.githubTesting":"Testing...","header.githubConnected":"Connected!","header.githubFailed":"Connection failed","header.githubTokenHint":"Create a token at github.com/settings/tokens with repo scope","header.githubDesc":"Browse GitHub issues and import them as AI tasks.","header.githubGuideToggle":"Setup Guide","header.githubGuidePrep":"Prerequisites","header.githubGuideStep1":'Go to github.com/settings/tokens and create a Personal Access Token with "repo" scope',"header.githubGuideStep2":"Note the repository owner (e.g. octocat) and name (e.g. my-repo)","header.githubGuideSetup":"Configuration","header.githubGuideSetup1":"Enter the token, owner, and repository name above","header.githubGuideSetup2":'Click "Test Connection" to verify',"header.githubGuideSetup3":"Save settings","header.githubGuideUsage":"Usage","header.githubGuideUsage1":"Open the GitHub tab in the project detail page","header.githubGuideUsage2":"Browse issues, filter by state (open/closed), or search","header.githubGuideUsage3":'Click "Import as Task" to create an AI task from an issue'},ko:{"tabs.github":"GitHub","github.title":"GitHub 이슈","github.search":"이슈 검색...","github.refresh":"새로고침","github.import":"작업으로 가져오기","github.importing":"가져오는 중...","github.imported":"가져옴!","github.noIssues":"이슈가 없습니다","github.noIssuesHint":"필터나 검색어를 변경해보세요.","github.loadMore":"더 보기","github.createIssue":"이슈 생성","github.issueTitle":"제목","github.issueBody":"설명","github.creating":"생성 중...","github.notConfigured":"GitHub이 설정되지 않았습니다. 프로젝트 설정에서 활성화하세요.","github.loadingComments":"댓글 로딩 중...","github.comments":"댓글","github.noBody":"설명이 없습니다.","github.open":"열림","github.closed":"닫힘","github.all":"전체","header.githubTitle":"GitHub 연동","header.githubToken":"개인 액세스 토큰","header.githubTokenPlaceholder":"ghp_...","header.githubOwner":"소유자","header.githubOwnerPlaceholder":"예: octocat","header.githubRepo":"저장소","header.githubRepoPlaceholder":"예: my-repo","header.githubTestConnection":"연결 테스트","header.githubTesting":"테스트 중...","header.githubConnected":"연결 성공!","header.githubFailed":"연결 실패","header.githubTokenHint":"github.com/settings/tokens에서 repo 권한으로 토큰을 생성하세요","header.githubDesc":"GitHub 이슈를 조회하고 AI 태스크로 가져옵니다.","header.githubGuideToggle":"설정 가이드","header.githubGuidePrep":"사전 준비","header.githubGuideStep1":'github.com/settings/tokens에서 "repo" 권한의 Personal Access Token 생성',"header.githubGuideStep2":"레포지토리 소유자 (예: octocat)와 이름 (예: my-repo) 확인","header.githubGuideSetup":"설정 방법","header.githubGuideSetup1":"위 입력란에 토큰, 소유자, 저장소 이름 입력","header.githubGuideSetup2":'"연결 테스트" 클릭하여 연결 확인',"header.githubGuideSetup3":"설정 저장","header.githubGuideUsage":"사용법","header.githubGuideUsage1":"프로젝트 상세 페이지에서 GitHub 탭 진입","header.githubGuideUsage2":"이슈 검색, open/closed 필터링","header.githubGuideUsage3":'"작업으로 가져오기" 클릭하여 AI 태스크 생성'}}};function pIe(e){return ct(`/api/notion/${e}/test`)}function gIe(e,t){return Be(`/api/notion/${e}/pages`,t||{})}function vIe(e,t){return ct(`/api/notion/${e}/page/${t}/blocks`)}function yIe(e,t){return Be(`/api/notion/${e}/create`,t)}function xIe(e,t){return Be(`/api/notion/${e}/import/${t}`)}function bIe({project:e,onImportAsTask:t}){const{t:n}=Ze(),[r,a]=x.useState([]),[i,s]=x.useState(!1),[l,c]=x.useState(!1),[d,h]=x.useState(null),[m,g]=x.useState(""),[v,b]=x.useState(null),[w,S]=x.useState(null),[j,_]=x.useState(null),[k,E]=x.useState(!1),T=e.notion_enabled&&e.notion_api_key&&e.notion_database_id,A=x.useCallback(async(P=!1)=>{if(T){s(!0);try{const D=await gIe(e.id,{startCursor:P?void 0:d||void 0,search:m||void 0});a(P?D.results:q=>[...q,...D.results]),c(D.has_more),h(D.next_cursor)}catch{}finally{s(!1)}}},[e.id,T,m,d]);x.useEffect(()=>{A(!0)},[e.id,T]);const O=()=>{A(!0)},I=async P=>{b(P);try{const D=await xIe(e.id,P);t(D.title,D.description),S(P),setTimeout(()=>S(null),2e3)}catch{}finally{b(null)}};return T?f.jsxs("div",{className:"animate-fade-in",children:[f.jsxs("div",{className:"flex items-center justify-between mb-4",children:[f.jsx("h2",{className:"text-sm font-semibold text-warm-700",children:n("notion.title")}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx("button",{onClick:()=>E(!k),className:"btn-primary text-xs",children:n("notion.createPage")}),f.jsx("button",{onClick:()=>A(!0),disabled:i,className:"btn-ghost text-xs",children:n("notion.refresh")})]})]}),k&&f.jsx(kIe,{projectId:e.id,onCreated:()=>{E(!1),A(!0)},onCancel:()=>E(!1)}),f.jsx("div",{className:"flex gap-2 mb-4",children:f.jsxs("div",{className:"flex-1 relative",children:[f.jsx("input",{type:"text",value:m,onChange:P=>g(P.target.value),onKeyDown:P=>P.key==="Enter"&&O(),placeholder:n("notion.search"),className:"input-field text-xs pr-8"}),f.jsx("button",{onClick:O,className:"absolute right-2 top-1/2 -translate-y-1/2 text-warm-400 hover:text-warm-600",children:f.jsx(Hg,{size:14})})]})}),r.length===0&&i&&f.jsx("div",{className:"space-y-2",children:[...Array(5)].map((P,D)=>f.jsxs("div",{className:"card p-3 space-y-2",children:[f.jsx(Ue,{className:"h-4 w-1/3"}),f.jsxs("div",{className:"flex justify-between",children:[f.jsx(Ue,{className:"h-3 w-1/4"}),f.jsx(Ue,{className:"h-3 w-16"})]})]},D))}),r.length===0&&!i&&f.jsxs("div",{className:"card p-10 text-center",children:[f.jsx("p",{className:"text-warm-400 text-sm",children:n("notion.noPages")}),f.jsx("p",{className:"text-warm-300 text-xs mt-1",children:n("notion.noPagesHint")})]}),f.jsx("div",{className:"space-y-2",children:r.map(P=>f.jsx(wIe,{page:P,projectId:e.id,expanded:j===P.id,onToggle:()=>_(j===P.id?null:P.id),importing:v===P.id,imported:w===P.id,onImport:()=>I(P.id)},P.id))}),l&&f.jsx("div",{className:"mt-4 text-center",children:f.jsx("button",{onClick:()=>A(!1),disabled:i,className:"btn-ghost text-xs",children:i?"...":n("notion.loadMore")})})]}):f.jsxs("div",{className:"card p-16 text-center animate-fade-in",children:[f.jsx("div",{className:"text-warm-300 mb-3",children:f.jsx(Ep,{size:48,className:"mx-auto",strokeWidth:1})}),f.jsx("p",{className:"text-warm-400 text-sm",children:n("notion.notConfigured")})]})}function wIe({page:e,projectId:t,expanded:n,onToggle:r,importing:a,imported:i,onImport:s}){const{t:l}=Ze(),c=_Ie(e),d=CIe(e),h=new Date(e.last_edited_time).toLocaleDateString();return f.jsxs("div",{className:"card p-3 hover:shadow-md transition-shadow",children:[f.jsxs("div",{className:"flex items-start gap-3",children:[f.jsx("div",{className:"mt-0.5 flex-shrink-0 text-warm-400",children:f.jsx(Ep,{size:16})}),f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsx("div",{className:"flex items-center gap-2",children:f.jsx("button",{onClick:r,className:"text-xs font-medium text-blue-600 hover:text-blue-800 truncate text-left",children:c||"Untitled"})}),f.jsxs("div",{className:"flex flex-wrap items-center gap-2 mt-1.5",children:[d&&f.jsx("span",{className:`inline-flex items-center px-1.5 py-0.5 rounded text-2xs font-medium ${NIe(d)}`,children:d}),f.jsx("span",{className:"text-2xs text-warm-300 ml-auto",children:h})]})]}),f.jsx("button",{onClick:s,disabled:a||i,className:`flex-shrink-0 text-xs px-2 py-1 rounded-lg font-medium transition-colors ${i?"bg-status-success/10 text-status-success":"bg-blue-50 text-blue-600 hover:bg-blue-100"}`,title:l("notion.import"),children:l(a?"notion.importing":i?"notion.imported":"notion.import")})]}),n&&f.jsx(SIe,{pageId:e.id,projectId:t})]})}function SIe({pageId:e,projectId:t}){const{t:n}=Ze(),[r,a]=x.useState([]),[i,s]=x.useState(!0);return x.useEffect(()=>{s(!0),vIe(t,e).then(l=>a(l.results||[])).catch(()=>{}).finally(()=>s(!1))},[t,e]),i?f.jsxs("div",{className:"mt-3 pt-3 border-t border-warm-100 space-y-2 animate-slide-up",children:[f.jsx(Ue,{className:"h-3 w-3/4"}),f.jsx(Ue,{className:"h-3 w-1/2"}),f.jsx(Ue,{className:"h-3 w-2/3"})]}):r.length===0?f.jsx("div",{className:"mt-3 pt-3 border-t border-warm-100 animate-slide-up",children:f.jsx("p",{className:"text-xs text-warm-400",children:n("notion.noContent")})}):f.jsx("div",{className:"mt-3 pt-3 border-t border-warm-100 space-y-1 animate-slide-up max-h-64 overflow-y-auto",children:r.map(l=>f.jsx(jIe,{block:l},l.id))})}function jIe({block:e}){const t=e.type;if(!t||!e[t])return null;const n=e[t],r=n.rich_text?n.rich_text.map(a=>a.plain_text||"").join(""):"";if(!r&&t!=="divider")return null;switch(t){case"heading_1":return f.jsx("p",{className:"text-xs font-bold text-warm-700",children:r});case"heading_2":return f.jsx("p",{className:"text-xs font-semibold text-warm-600",children:r});case"heading_3":return f.jsx("p",{className:"text-xs font-medium text-warm-600",children:r});case"bulleted_list_item":return f.jsxs("p",{className:"text-xs text-warm-500 pl-3",children:["• ",r]});case"numbered_list_item":return f.jsx("p",{className:"text-xs text-warm-500 pl-3",children:r});case"to_do":return f.jsxs("p",{className:"text-xs text-warm-500 pl-3",children:[n.checked?"☑":"☐"," ",r]});case"code":return f.jsx("pre",{className:"text-2xs bg-warm-50 p-2 rounded text-warm-600 overflow-x-auto",children:r});case"divider":return f.jsx("hr",{className:"border-warm-100"});default:return f.jsx("p",{className:"text-xs text-warm-500",children:r})}}function kIe({projectId:e,onCreated:t,onCancel:n}){const{t:r}=Ze(),[a,i]=x.useState(""),[s,l]=x.useState(!1),c=async()=>{if(a.trim()){l(!0);try{await yIe(e,{title:a}),t()}catch{}finally{l(!1)}}};return f.jsx("div",{className:"card p-4 mb-4 animate-slide-up",children:f.jsxs("div",{className:"space-y-3",children:[f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-1",children:r("notion.pageTitle")}),f.jsx("input",{type:"text",value:a,onChange:d=>i(d.target.value),onKeyDown:d=>d.key==="Enter"&&c(),className:"input-field text-xs",autoFocus:!0})]}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsx("button",{onClick:n,className:"btn-ghost text-xs",children:r("header.cancel")}),f.jsx("button",{onClick:c,disabled:s||!a.trim(),className:"btn-primary text-xs",children:r(s?"notion.creating":"notion.createPage")})]})]})})}function _Ie(e){var t;if(!e.properties)return"Untitled";for(const n of Object.values(e.properties))if(n.type==="title"&&((t=n.title)==null?void 0:t.length)>0)return n.title.map(r=>r.plain_text||"").join("");return"Untitled"}function CIe(e){if(!e.properties)return null;for(const t of Object.values(e.properties)){if(t.type==="status"&&t.status)return t.status.name;if(t.type==="select"&&t.select)return t.select.name}return null}function NIe(e){const t=e.toLowerCase();return t.includes("done")||t.includes("complete")||t.includes("완료")?"bg-status-success/10 text-status-success":t.includes("progress")||t.includes("진행")||t.includes("doing")?"bg-blue-100 text-blue-700":(t.includes("todo")||t.includes("not started")||t.includes("대기"),"bg-warm-100 text-warm-600")}function EIe({project:e,config:t,onConfigChange:n}){const{t:r}=Ze(),[a,i]=x.useState(!1),[s,l]=x.useState(null),[c,d]=x.useState(!1),h=t.enabled==="1"||t.enabled===!0,m=async()=>{i(!0),l(null);try{const g=await pIe(e.id);l(g.ok?"ok":"fail")}catch{l("fail")}finally{i(!1)}};return f.jsxs("div",{className:"p-4 border border-warm-200 rounded-xl",children:[f.jsxs("div",{className:"flex items-center justify-between mb-1",children:[f.jsx("h4",{className:"text-sm font-semibold text-warm-700",children:r("header.notionTitle")}),f.jsxs("label",{className:"relative inline-flex items-center cursor-pointer",children:[f.jsx("input",{type:"checkbox",checked:h,onChange:g=>n({enabled:g.target.checked?"1":"0"}),className:"sr-only peer"}),f.jsx("div",{className:"w-9 h-5 bg-warm-200 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-warm-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-status-success"})]})]}),f.jsx("p",{className:"text-xs text-warm-400 mb-3",children:r("header.notionDesc")}),h&&f.jsxs("div",{className:"space-y-3",children:[f.jsxs("button",{type:"button",onClick:()=>d(!c),className:"flex items-center gap-1 text-xs text-accent-dark hover:text-accent transition-colors",children:[f.jsx("span",{className:`inline-block transition-transform ${c?"rotate-90":""}`,children:"▶"}),r("header.notionGuideToggle")]}),c&&f.jsxs("div",{className:"p-3 bg-warm-50 border border-warm-150 rounded-lg text-xs text-warm-600 space-y-2",children:[f.jsxs("div",{children:[f.jsx("p",{className:"font-semibold text-warm-700 mb-1",children:r("header.notionGuidePrep")}),f.jsxs("ol",{className:"list-decimal list-inside space-y-0.5 ml-1",children:[f.jsx("li",{children:r("header.notionGuideStep1")}),f.jsx("li",{children:r("header.notionGuideStep2")}),f.jsx("li",{children:r("header.notionGuideStep3")})]})]}),f.jsxs("div",{children:[f.jsx("p",{className:"font-semibold text-warm-700 mb-1",children:r("header.notionGuideSetup")}),f.jsxs("ol",{className:"list-decimal list-inside space-y-0.5 ml-1",children:[f.jsx("li",{children:r("header.notionGuideSetup1")}),f.jsx("li",{children:r("header.notionGuideSetup2")}),f.jsx("li",{children:r("header.notionGuideSetup3")})]})]}),f.jsxs("div",{children:[f.jsx("p",{className:"font-semibold text-warm-700 mb-1",children:r("header.notionGuideUsage")}),f.jsxs("ol",{className:"list-decimal list-inside space-y-0.5 ml-1",children:[f.jsx("li",{children:r("header.notionGuideUsage1")}),f.jsx("li",{children:r("header.notionGuideUsage2")}),f.jsx("li",{children:r("header.notionGuideUsage3")})]})]})]}),f.jsxs("div",{className:"grid grid-cols-1 gap-3",children:[f.jsxs("div",{children:[f.jsx("label",{className:"text-xs text-warm-500 block mb-1",children:r("header.notionApiKey")}),f.jsx("input",{type:"password",value:t.api_key??"",onChange:g=>n({api_key:g.target.value||null}),placeholder:r("header.notionApiKeyPlaceholder"),className:"w-full px-3 py-1.5 text-xs border border-warm-200 rounded-lg bg-warm-50 text-warm-700 focus:ring-1 focus:ring-accent focus:border-accent"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"text-xs text-warm-500 block mb-1",children:r("header.notionDatabaseId")}),f.jsx("input",{type:"text",value:t.database_id??"",onChange:g=>n({database_id:g.target.value||null}),placeholder:r("header.notionDatabaseIdPlaceholder"),className:"w-full px-3 py-1.5 text-xs border border-warm-200 rounded-lg bg-warm-50 text-warm-700 focus:ring-1 focus:ring-accent focus:border-accent"})]})]}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("button",{onClick:m,disabled:a,className:"px-3 py-1 text-xs rounded-lg bg-warm-100 text-warm-600 hover:bg-warm-200 disabled:opacity-50 transition-colors",children:r(a?"header.notionTesting":"header.notionTestConnection")}),s==="ok"&&f.jsx("span",{className:"text-xs text-status-success font-medium",children:r("header.notionConnected")}),s==="fail"&&f.jsx("span",{className:"text-xs text-status-error font-medium",children:r("header.notionFailed")})]}),f.jsx("p",{className:"text-xs text-warm-300",children:r("header.notionTokenHint")})]})]})}const AIe={id:"notion",displayName:"Notion",displayNameKo:"Notion",PanelComponent:bIe,SettingsComponent:EIe,hasTab:!0,isEnabled:e=>!!e.notion_enabled,translations:{en:{"tabs.notion":"Notion","notion.title":"Notion Pages","notion.search":"Search pages...","notion.refresh":"Refresh","notion.import":"Import as Task","notion.importing":"Importing...","notion.imported":"Imported!","notion.noPages":"No pages found","notion.noPagesHint":"Try changing the search query.","notion.loadMore":"Load More","notion.createPage":"Create Page","notion.pageTitle":"Title","notion.creating":"Creating...","notion.notConfigured":"Notion is not configured. Enable it in project settings.","notion.loadingContent":"Loading content...","notion.noContent":"No content","header.notionTitle":"Notion Integration","header.notionApiKey":"Integration Token","header.notionApiKeyPlaceholder":"secret_...","header.notionDatabaseId":"Database ID","header.notionDatabaseIdPlaceholder":"32-char hex ID from database URL","header.notionTestConnection":"Test Connection","header.notionTesting":"Testing...","header.notionConnected":"Connected!","header.notionFailed":"Connection failed","header.notionTokenHint":"Create an integration at notion.so/my-integrations and share the database with it","header.notionDesc":"Browse Notion pages and import them as AI tasks.","header.notionGuideToggle":"Setup Guide","header.notionGuidePrep":"Prerequisites","header.notionGuideStep1":"Go to notion.so/my-integrations and create an Integration — copy the API key","header.notionGuideStep2":'Open your Notion database page, click "..." > Connections > select the Integration',"header.notionGuideStep3":'Copy the Database ID from the URL (32-char hex string before "?v=")',"header.notionGuideSetup":"Configuration","header.notionGuideSetup1":"Enter the API key and Database ID above","header.notionGuideSetup2":'Click "Test Connection" to verify',"header.notionGuideSetup3":"Save settings","header.notionGuideUsage":"Usage","header.notionGuideUsage1":"Open the Notion tab in the project detail page","header.notionGuideUsage2":"Browse pages, search by title, view block content","header.notionGuideUsage3":'Click "Import as Task" to create an AI task from a page'},ko:{"tabs.notion":"Notion","notion.title":"Notion 페이지","notion.search":"페이지 검색...","notion.refresh":"새로고침","notion.import":"작업으로 가져오기","notion.importing":"가져오는 중...","notion.imported":"가져옴!","notion.noPages":"페이지가 없습니다","notion.noPagesHint":"검색어를 변경해보세요.","notion.loadMore":"더 보기","notion.createPage":"페이지 생성","notion.pageTitle":"제목","notion.creating":"생성 중...","notion.notConfigured":"Notion이 설정되지 않았습니다. 프로젝트 설정에서 활성화하세요.","notion.loadingContent":"콘텐츠 로딩 중...","notion.noContent":"콘텐츠 없음","header.notionTitle":"Notion 연동","header.notionApiKey":"통합 토큰","header.notionApiKeyPlaceholder":"secret_...","header.notionDatabaseId":"데이터베이스 ID","header.notionDatabaseIdPlaceholder":"데이터베이스 URL의 32자 hex ID","header.notionTestConnection":"연결 테스트","header.notionTesting":"테스트 중...","header.notionConnected":"연결 성공!","header.notionFailed":"연결 실패","header.notionTokenHint":"notion.so/my-integrations에서 통합을 생성하고 데이터베이스를 공유하세요","header.notionDesc":"Notion 페이지를 조회하고 AI 태스크로 가져옵니다.","header.notionGuideToggle":"설정 가이드","header.notionGuidePrep":"사전 준비","header.notionGuideStep1":"notion.so/my-integrations에서 Integration 생성 → API 키 복사","header.notionGuideStep2":'Notion 데이터베이스 페이지 → "..." → 연결 → 생성한 Integration 선택',"header.notionGuideStep3":'데이터베이스 URL에서 Database ID 복사 ("?v=" 앞의 32자리 hex)',"header.notionGuideSetup":"설정 방법","header.notionGuideSetup1":"위 입력란에 API 키와 Database ID 입력","header.notionGuideSetup2":'"연결 테스트" 클릭하여 연결 확인',"header.notionGuideSetup3":"설정 저장","header.notionGuideUsage":"사용법","header.notionGuideUsage1":"프로젝트 상세 페이지에서 Notion 탭 진입","header.notionGuideUsage2":"페이지 검색, 블록 콘텐츠 확인","header.notionGuideUsage3":'"작업으로 가져오기" 클릭하여 AI 태스크 생성'}}};function TIe(){return ct("/api/gstack/skills")}function OIe({project:e,config:t,onConfigChange:n}){const{t:r,lang:a}=Ze(),[i,s]=x.useState([]),[l,c]=x.useState(!1);x.useEffect(()=>{TIe().then(s).catch(()=>{})},[]);const d=t.enabled==="1"||t.enabled===!0,h=e.cli_tool==="claude",m=(()=>{try{const v=t.skills;if(!v)return[];const b=typeof v=="string"?JSON.parse(v):v;return Array.isArray(b)?b:[]}catch{return[]}})(),g=v=>{const b=m.includes(v)?m.filter(w=>w!==v):[...m,v];n({skills:b.length>0?JSON.stringify(b):null})};return f.jsxs("div",{className:"p-4 border border-warm-200 rounded-xl",children:[f.jsxs("div",{className:"flex items-center justify-between mb-1",children:[f.jsx("h4",{className:"text-sm font-semibold text-warm-700",children:r("header.gstackTitle")}),f.jsxs("label",{className:"relative inline-flex items-center cursor-pointer",children:[f.jsx("input",{type:"checkbox",checked:d,onChange:v=>n({enabled:v.target.checked?"1":"0"}),disabled:!h,className:"sr-only peer"}),f.jsx("div",{className:"w-9 h-5 bg-warm-200 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-warm-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-status-success peer-disabled:opacity-50"})]})]}),f.jsx("p",{className:"text-xs text-warm-400 mb-3",children:r("header.gstackDesc")}),!h&&f.jsx("p",{className:"text-xs text-warm-400 mb-3",children:r("header.gstackClaudeOnly")}),h&&d&&f.jsxs("div",{className:"space-y-3",children:[f.jsxs("button",{type:"button",onClick:()=>c(!l),className:"flex items-center gap-1 text-xs text-accent-dark hover:text-accent transition-colors",children:[f.jsx("span",{className:`inline-block transition-transform ${l?"rotate-90":""}`,children:"▶"}),r("header.gstackGuideToggle")]}),l&&f.jsxs("div",{className:"p-3 bg-warm-50 border border-warm-150 rounded-lg text-xs text-warm-600 space-y-2",children:[f.jsxs("div",{children:[f.jsx("p",{className:"font-semibold text-warm-700 mb-1",children:r("header.gstackGuideHow")}),f.jsxs("ol",{className:"list-decimal list-inside space-y-0.5 ml-1",children:[f.jsx("li",{children:r("header.gstackGuideStep1")}),f.jsx("li",{children:r("header.gstackGuideStep2")}),f.jsx("li",{children:r("header.gstackGuideStep3")}),f.jsx("li",{children:r("header.gstackGuideStep4")})]})]}),f.jsx("p",{className:"text-warm-400",children:r("header.gstackGuideNote")})]}),i.length>0&&f.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:i.map(v=>f.jsxs("label",{className:"flex items-start gap-2 p-2 rounded-lg hover:bg-warm-50 cursor-pointer transition-colors",children:[f.jsx("input",{type:"checkbox",checked:m.includes(v.id),onChange:()=>g(v.id),className:"mt-0.5 rounded border-warm-300 text-status-success focus:ring-status-success"}),f.jsxs("div",{className:"min-w-0",children:[f.jsx("span",{className:"text-xs font-medium text-warm-700",children:v.name}),f.jsx("p",{className:"text-xs text-warm-400 truncate",children:a==="ko"?v.descriptionKo:v.description})]})]},v.id))})]}),f.jsx("p",{className:"text-xs text-warm-300 mt-3",children:r("header.gstackCredit")})]})}const MIe={id:"gstack",displayName:"Gstack Skills",displayNameKo:"Gstack 스킬",SettingsComponent:OIe,hasTab:!1,isEnabled:e=>!!e.gstack_enabled,translations:{en:{"header.gstackTitle":"gstack Skills","header.gstackEnabled":"Enable gstack skill injection","header.gstackCredit":"Powered by gstack (MIT License, Garry Tan)","header.gstackClaudeOnly":"gstack skills are only available with Claude CLI.","header.gstackDesc":"Inject AI skill files into worktrees to improve Claude CLI task quality.","header.gstackGuideToggle":"How it works","header.gstackGuideHow":"How gstack skills work","header.gstackGuideStep1":"Select the skills you want to use below","header.gstackGuideStep2":"When a task starts, selected skill files are copied to the worktree's .claude/skills/ directory","header.gstackGuideStep3":"Claude CLI automatically recognizes and applies these skills during execution","header.gstackGuideStep4":"Skills are isolated in gstack-* prefixed directories and don't conflict with existing skills","header.gstackGuideNote":"Only works with Claude CLI. Gemini and Codex do not support skill files."},ko:{"header.gstackTitle":"gstack 스킬","header.gstackEnabled":"gstack 스킬 주입 활성화","header.gstackCredit":"gstack 기반 (MIT 라이선스, Garry Tan)","header.gstackClaudeOnly":"gstack 스킬은 Claude CLI에서만 사용 가능합니다.","header.gstackDesc":"AI 스킬 파일을 worktree에 주입하여 Claude CLI 작업 품질을 높입니다.","header.gstackGuideToggle":"동작 방식","header.gstackGuideHow":"gstack 스킬 동작 원리","header.gstackGuideStep1":"아래에서 사용할 스킬을 선택합니다","header.gstackGuideStep2":"태스크 실행 시 선택된 스킬 파일이 worktree의 .claude/skills/ 디렉토리에 복사됩니다","header.gstackGuideStep3":"Claude CLI가 스킬을 자동 인식하여 실행에 적용합니다","header.gstackGuideStep4":"스킬은 gstack-* 접두사 디렉토리에 격리되어 기존 스킬과 충돌하지 않습니다","header.gstackGuideNote":"Claude CLI 전용 기능입니다. Gemini, Codex에서는 지원되지 않습니다."}}};function PIe(){Am(rIe),Am(mIe),Am(AIe),Am(MIe)}PIe();function DIe(){const e=Sne(),t=jne();return f.jsx(p8.Provider,{value:e,children:f.jsx(v8.Provider,{value:t,children:f.jsx(VJ,{children:f.jsx(H3e,{})})})})}sQ.createRoot(document.getElementById("root")).render(f.jsx(z2.StrictMode,{children:f.jsx(DIe,{})}));
|