agent-framework-devui 0.0.1a0__py3-none-any.whl → 1.0.0b251001__py3-none-any.whl
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.
Potentially problematic release.
This version of agent-framework-devui might be problematic. Click here for more details.
- agent_framework_devui/__init__.py +151 -0
- agent_framework_devui/_cli.py +143 -0
- agent_framework_devui/_discovery.py +724 -0
- agent_framework_devui/_executor.py +770 -0
- agent_framework_devui/_mapper.py +582 -0
- agent_framework_devui/_server.py +530 -0
- agent_framework_devui/_session.py +191 -0
- agent_framework_devui/_tracing.py +168 -0
- agent_framework_devui/models/__init__.py +72 -0
- agent_framework_devui/models/_discovery_models.py +51 -0
- agent_framework_devui/models/_openai_custom.py +209 -0
- agent_framework_devui/ui/assets/index-D1AmQWga.css +1 -0
- agent_framework_devui/ui/assets/index-DPEaaIdK.js +435 -0
- agent_framework_devui/ui/index.html +14 -0
- agent_framework_devui/ui/vite.svg +1 -0
- agent_framework_devui-1.0.0b251001.dist-info/METADATA +172 -0
- agent_framework_devui-1.0.0b251001.dist-info/RECORD +20 -0
- {agent_framework_devui-0.0.1a0.dist-info → agent_framework_devui-1.0.0b251001.dist-info}/WHEEL +1 -2
- agent_framework_devui-1.0.0b251001.dist-info/entry_points.txt +3 -0
- agent_framework_devui-1.0.0b251001.dist-info/licenses/LICENSE +21 -0
- agent_framework_devui-0.0.1a0.dist-info/METADATA +0 -18
- agent_framework_devui-0.0.1a0.dist-info/RECORD +0 -5
- agent_framework_devui-0.0.1a0.dist-info/licenses/LICENSE +0 -9
- agent_framework_devui-0.0.1a0.dist-info/top_level.txt +0 -1
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
function p_(e,r){for(var o=0;o<r.length;o++){const s=r[o];if(typeof s!="string"&&!Array.isArray(s)){for(const i in s)if(i!=="default"&&!(i in e)){const c=Object.getOwnPropertyDescriptor(s,i);c&&Object.defineProperty(e,i,c.get?c:{enumerable:!0,get:()=>s[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const c of i)if(c.type==="childList")for(const d of c.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&s(d)}).observe(document,{childList:!0,subtree:!0});function o(i){const c={};return i.integrity&&(c.integrity=i.integrity),i.referrerPolicy&&(c.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?c.credentials="include":i.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function s(i){if(i.ep)return;i.ep=!0;const c=o(i);fetch(i.href,c)}})();function Nm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ih={exports:{}},ii={};/**
|
|
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 ry;function g_(){if(ry)return ii;ry=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(s,i,c){var d=null;if(c!==void 0&&(d=""+c),i.key!==void 0&&(d=""+i.key),"key"in i){c={};for(var f in i)f!=="key"&&(c[f]=i[f])}else c=i;return i=c.ref,{$$typeof:e,type:s,key:d,ref:i!==void 0?i:null,props:c}}return ii.Fragment=r,ii.jsx=o,ii.jsxs=o,ii}var oy;function x_(){return oy||(oy=1,ih.exports=g_()),ih.exports}var u=x_(),lh={exports:{}},ke={};/**
|
|
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 ay;function y_(){if(ay)return ke;ay=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),d=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),v=Symbol.iterator;function y(M){return M===null||typeof M!="object"?null:(M=v&&M[v]||M["@@iterator"],typeof M=="function"?M:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,S={};function C(M,I,W){this.props=M,this.context=I,this.refs=S,this.updater=W||b}C.prototype.isReactComponent={},C.prototype.setState=function(M,I){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,I,"setState")},C.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function j(){}j.prototype=C.prototype;function R(M,I,W){this.props=M,this.context=I,this.refs=S,this.updater=W||b}var E=R.prototype=new j;E.constructor=R,N(E,C.prototype),E.isPureReactComponent=!0;var A=Array.isArray,D={H:null,A:null,T:null,S:null,V:null},L=Object.prototype.hasOwnProperty;function B(M,I,W,K,ne,fe){return W=fe.ref,{$$typeof:e,type:M,key:I,ref:W!==void 0?W:null,props:fe}}function U(M,I){return B(M.type,I,void 0,void 0,void 0,M.props)}function G(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function re(M){var I={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(W){return I[W]})}var Z=/\/+/g;function Y(M,I){return typeof M=="object"&&M!==null&&M.key!=null?re(""+M.key):I.toString(36)}function ee(){}function O(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(ee,ee):(M.status="pending",M.then(function(I){M.status==="pending"&&(M.status="fulfilled",M.value=I)},function(I){M.status==="pending"&&(M.status="rejected",M.reason=I)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function P(M,I,W,K,ne){var fe=typeof M;(fe==="undefined"||fe==="boolean")&&(M=null);var ue=!1;if(M===null)ue=!0;else switch(fe){case"bigint":case"string":case"number":ue=!0;break;case"object":switch(M.$$typeof){case e:case r:ue=!0;break;case g:return ue=M._init,P(ue(M._payload),I,W,K,ne)}}if(ue)return ne=ne(M),ue=K===""?"."+Y(M,0):K,A(ne)?(W="",ue!=null&&(W=ue.replace(Z,"$&/")+"/"),P(ne,I,W,"",function(se){return se})):ne!=null&&(G(ne)&&(ne=U(ne,W+(ne.key==null||M&&M.key===ne.key?"":(""+ne.key).replace(Z,"$&/")+"/")+ue)),I.push(ne)),1;ue=0;var q=K===""?".":K+":";if(A(M))for(var Q=0;Q<M.length;Q++)K=M[Q],fe=q+Y(K,Q),ue+=P(K,I,W,fe,ne);else if(Q=y(M),typeof Q=="function")for(M=Q.call(M),Q=0;!(K=M.next()).done;)K=K.value,fe=q+Y(K,Q++),ue+=P(K,I,W,fe,ne);else if(fe==="object"){if(typeof M.then=="function")return P(O(M),I,W,K,ne);throw I=String(M),Error("Objects are not valid as a React child (found: "+(I==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":I)+"). If you meant to render a collection of children, use an array instead.")}return ue}function T(M,I,W){if(M==null)return M;var K=[],ne=0;return P(M,K,"","",function(fe){return I.call(W,fe,ne++)}),K}function z(M){if(M._status===-1){var I=M._result;I=I(),I.then(function(W){(M._status===0||M._status===-1)&&(M._status=1,M._result=W)},function(W){(M._status===0||M._status===-1)&&(M._status=2,M._result=W)}),M._status===-1&&(M._status=0,M._result=I)}if(M._status===1)return M._result.default;throw M._result}var H=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var I=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(I))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)};function V(){}return ke.Children={map:T,forEach:function(M,I,W){T(M,function(){I.apply(this,arguments)},W)},count:function(M){var I=0;return T(M,function(){I++}),I},toArray:function(M){return T(M,function(I){return I})||[]},only:function(M){if(!G(M))throw Error("React.Children.only expected to receive a single React element child.");return M}},ke.Component=C,ke.Fragment=o,ke.Profiler=i,ke.PureComponent=R,ke.StrictMode=s,ke.Suspense=m,ke.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,ke.__COMPILER_RUNTIME={__proto__:null,c:function(M){return D.H.useMemoCache(M)}},ke.cache=function(M){return function(){return M.apply(null,arguments)}},ke.cloneElement=function(M,I,W){if(M==null)throw Error("The argument must be a React element, but you passed "+M+".");var K=N({},M.props),ne=M.key,fe=void 0;if(I!=null)for(ue in I.ref!==void 0&&(fe=void 0),I.key!==void 0&&(ne=""+I.key),I)!L.call(I,ue)||ue==="key"||ue==="__self"||ue==="__source"||ue==="ref"&&I.ref===void 0||(K[ue]=I[ue]);var ue=arguments.length-2;if(ue===1)K.children=W;else if(1<ue){for(var q=Array(ue),Q=0;Q<ue;Q++)q[Q]=arguments[Q+2];K.children=q}return B(M.type,ne,void 0,void 0,fe,K)},ke.createContext=function(M){return M={$$typeof:d,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:c,_context:M},M},ke.createElement=function(M,I,W){var K,ne={},fe=null;if(I!=null)for(K in I.key!==void 0&&(fe=""+I.key),I)L.call(I,K)&&K!=="key"&&K!=="__self"&&K!=="__source"&&(ne[K]=I[K]);var ue=arguments.length-2;if(ue===1)ne.children=W;else if(1<ue){for(var q=Array(ue),Q=0;Q<ue;Q++)q[Q]=arguments[Q+2];ne.children=q}if(M&&M.defaultProps)for(K in ue=M.defaultProps,ue)ne[K]===void 0&&(ne[K]=ue[K]);return B(M,fe,void 0,void 0,null,ne)},ke.createRef=function(){return{current:null}},ke.forwardRef=function(M){return{$$typeof:f,render:M}},ke.isValidElement=G,ke.lazy=function(M){return{$$typeof:g,_payload:{_status:-1,_result:M},_init:z}},ke.memo=function(M,I){return{$$typeof:p,type:M,compare:I===void 0?null:I}},ke.startTransition=function(M){var I=D.T,W={};D.T=W;try{var K=M(),ne=D.S;ne!==null&&ne(W,K),typeof K=="object"&&K!==null&&typeof K.then=="function"&&K.then(V,H)}catch(fe){H(fe)}finally{D.T=I}},ke.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},ke.use=function(M){return D.H.use(M)},ke.useActionState=function(M,I,W){return D.H.useActionState(M,I,W)},ke.useCallback=function(M,I){return D.H.useCallback(M,I)},ke.useContext=function(M){return D.H.useContext(M)},ke.useDebugValue=function(){},ke.useDeferredValue=function(M,I){return D.H.useDeferredValue(M,I)},ke.useEffect=function(M,I,W){var K=D.H;if(typeof W=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return K.useEffect(M,I)},ke.useId=function(){return D.H.useId()},ke.useImperativeHandle=function(M,I,W){return D.H.useImperativeHandle(M,I,W)},ke.useInsertionEffect=function(M,I){return D.H.useInsertionEffect(M,I)},ke.useLayoutEffect=function(M,I){return D.H.useLayoutEffect(M,I)},ke.useMemo=function(M,I){return D.H.useMemo(M,I)},ke.useOptimistic=function(M,I){return D.H.useOptimistic(M,I)},ke.useReducer=function(M,I,W){return D.H.useReducer(M,I,W)},ke.useRef=function(M){return D.H.useRef(M)},ke.useState=function(M){return D.H.useState(M)},ke.useSyncExternalStore=function(M,I,W){return D.H.useSyncExternalStore(M,I,W)},ke.useTransition=function(){return D.H.useTransition()},ke.version="19.1.1",ke}var sy;function zi(){return sy||(sy=1,lh.exports=y_()),lh.exports}var w=zi();const cr=Nm(w),ab=p_({__proto__:null,default:cr},[w]);var ch={exports:{}},li={},uh={exports:{}},dh={};/**
|
|
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 iy;function v_(){return iy||(iy=1,(function(e){function r(T,z){var H=T.length;T.push(z);e:for(;0<H;){var V=H-1>>>1,M=T[V];if(0<i(M,z))T[V]=z,T[H]=M,H=V;else break e}}function o(T){return T.length===0?null:T[0]}function s(T){if(T.length===0)return null;var z=T[0],H=T.pop();if(H!==z){T[0]=H;e:for(var V=0,M=T.length,I=M>>>1;V<I;){var W=2*(V+1)-1,K=T[W],ne=W+1,fe=T[ne];if(0>i(K,H))ne<M&&0>i(fe,K)?(T[V]=fe,T[ne]=H,V=ne):(T[V]=K,T[W]=H,V=W);else if(ne<M&&0>i(fe,H))T[V]=fe,T[ne]=H,V=ne;else break e}}return z}function i(T,z){var H=T.sortIndex-z.sortIndex;return H!==0?H:T.id-z.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var d=Date,f=d.now();e.unstable_now=function(){return d.now()-f}}var m=[],p=[],g=1,v=null,y=3,b=!1,N=!1,S=!1,C=!1,j=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function A(T){for(var z=o(p);z!==null;){if(z.callback===null)s(p);else if(z.startTime<=T)s(p),z.sortIndex=z.expirationTime,r(m,z);else break;z=o(p)}}function D(T){if(S=!1,A(T),!N)if(o(m)!==null)N=!0,L||(L=!0,Y());else{var z=o(p);z!==null&&P(D,z.startTime-T)}}var L=!1,B=-1,U=5,G=-1;function re(){return C?!0:!(e.unstable_now()-G<U)}function Z(){if(C=!1,L){var T=e.unstable_now();G=T;var z=!0;try{e:{N=!1,S&&(S=!1,R(B),B=-1),b=!0;var H=y;try{t:{for(A(T),v=o(m);v!==null&&!(v.expirationTime>T&&re());){var V=v.callback;if(typeof V=="function"){v.callback=null,y=v.priorityLevel;var M=V(v.expirationTime<=T);if(T=e.unstable_now(),typeof M=="function"){v.callback=M,A(T),z=!0;break t}v===o(m)&&s(m),A(T)}else s(m);v=o(m)}if(v!==null)z=!0;else{var I=o(p);I!==null&&P(D,I.startTime-T),z=!1}}break e}finally{v=null,y=H,b=!1}z=void 0}}finally{z?Y():L=!1}}}var Y;if(typeof E=="function")Y=function(){E(Z)};else if(typeof MessageChannel<"u"){var ee=new MessageChannel,O=ee.port2;ee.port1.onmessage=Z,Y=function(){O.postMessage(null)}}else Y=function(){j(Z,0)};function P(T,z){B=j(function(){T(e.unstable_now())},z)}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(T){T.callback=null},e.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):U=0<T?Math.floor(1e3/T):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_next=function(T){switch(y){case 1:case 2:case 3:var z=3;break;default:z=y}var H=y;y=z;try{return T()}finally{y=H}},e.unstable_requestPaint=function(){C=!0},e.unstable_runWithPriority=function(T,z){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var H=y;y=T;try{return z()}finally{y=H}},e.unstable_scheduleCallback=function(T,z,H){var V=e.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?V+H:V):H=V,T){case 1:var M=-1;break;case 2:M=250;break;case 5:M=1073741823;break;case 4:M=1e4;break;default:M=5e3}return M=H+M,T={id:g++,callback:z,priorityLevel:T,startTime:H,expirationTime:M,sortIndex:-1},H>V?(T.sortIndex=H,r(p,T),o(m)===null&&T===o(p)&&(S?(R(B),B=-1):S=!0,P(D,H-V))):(T.sortIndex=M,r(m,T),N||b||(N=!0,L||(L=!0,Y()))),T},e.unstable_shouldYield=re,e.unstable_wrapCallback=function(T){var z=y;return function(){var H=y;y=z;try{return T.apply(this,arguments)}finally{y=H}}}})(dh)),dh}var ly;function b_(){return ly||(ly=1,uh.exports=v_()),uh.exports}var fh={exports:{}},_t={};/**
|
|
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 cy;function w_(){if(cy)return _t;cy=1;var e=zi();function r(m){var p="https://react.dev/errors/"+m;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)p+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+m+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var s={d:{f:o,r:function(){throw Error(r(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},i=Symbol.for("react.portal");function c(m,p,g){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:v==null?null:""+v,children:m,containerInfo:p,implementation:g}}var d=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(m,p){if(m==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return _t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,_t.createPortal=function(m,p){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(r(299));return c(m,p,null,g)},_t.flushSync=function(m){var p=d.T,g=s.p;try{if(d.T=null,s.p=2,m)return m()}finally{d.T=p,s.p=g,s.d.f()}},_t.preconnect=function(m,p){typeof m=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,s.d.C(m,p))},_t.prefetchDNS=function(m){typeof m=="string"&&s.d.D(m)},_t.preinit=function(m,p){if(typeof m=="string"&&p&&typeof p.as=="string"){var g=p.as,v=f(g,p.crossOrigin),y=typeof p.integrity=="string"?p.integrity:void 0,b=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;g==="style"?s.d.S(m,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:v,integrity:y,fetchPriority:b}):g==="script"&&s.d.X(m,{crossOrigin:v,integrity:y,fetchPriority:b,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},_t.preinitModule=function(m,p){if(typeof m=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var g=f(p.as,p.crossOrigin);s.d.M(m,{crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&s.d.M(m)},_t.preload=function(m,p){if(typeof m=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var g=p.as,v=f(g,p.crossOrigin);s.d.L(m,g,{crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},_t.preloadModule=function(m,p){if(typeof m=="string")if(p){var g=f(p.as,p.crossOrigin);s.d.m(m,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else s.d.m(m)},_t.requestFormReset=function(m){s.d.r(m)},_t.unstable_batchedUpdates=function(m,p){return m(p)},_t.useFormState=function(m,p,g){return d.H.useFormState(m,p,g)},_t.useFormStatus=function(){return d.H.useHostTransitionStatus()},_t.version="19.1.1",_t}var uy;function sb(){if(uy)return fh.exports;uy=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(r){console.error(r)}}return e(),fh.exports=w_(),fh.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 dy;function S_(){if(dy)return li;dy=1;var e=b_(),r=zi(),o=sb();function s(t){var n="https://react.dev/errors/"+t;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)n+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+t+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function c(t){var n=t,a=t;if(t.alternate)for(;n.return;)n=n.return;else{t=n;do n=t,(n.flags&4098)!==0&&(a=n.return),t=n.return;while(t)}return n.tag===3?a:null}function d(t){if(t.tag===13){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function f(t){if(c(t)!==t)throw Error(s(188))}function m(t){var n=t.alternate;if(!n){if(n=c(t),n===null)throw Error(s(188));return n!==t?null:t}for(var a=t,l=n;;){var h=a.return;if(h===null)break;var x=h.alternate;if(x===null){if(l=h.return,l!==null){a=l;continue}break}if(h.child===x.child){for(x=h.child;x;){if(x===a)return f(h),t;if(x===l)return f(h),n;x=x.sibling}throw Error(s(188))}if(a.return!==l.return)a=h,l=x;else{for(var _=!1,k=h.child;k;){if(k===a){_=!0,a=h,l=x;break}if(k===l){_=!0,l=h,a=x;break}k=k.sibling}if(!_){for(k=x.child;k;){if(k===a){_=!0,a=x,l=h;break}if(k===l){_=!0,l=x,a=h;break}k=k.sibling}if(!_)throw Error(s(189))}}if(a.alternate!==l)throw Error(s(190))}if(a.tag!==3)throw Error(s(188));return a.stateNode.current===a?t:n}function p(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t;for(t=t.child;t!==null;){if(n=p(t),n!==null)return n;t=t.sibling}return null}var g=Object.assign,v=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),j=Symbol.for("react.provider"),R=Symbol.for("react.consumer"),E=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),G=Symbol.for("react.activity"),re=Symbol.for("react.memo_cache_sentinel"),Z=Symbol.iterator;function Y(t){return t===null||typeof t!="object"?null:(t=Z&&t[Z]||t["@@iterator"],typeof t=="function"?t:null)}var ee=Symbol.for("react.client.reference");function O(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===ee?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case N:return"Fragment";case C:return"Profiler";case S:return"StrictMode";case D:return"Suspense";case L:return"SuspenseList";case G:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case b:return"Portal";case E:return(t.displayName||"Context")+".Provider";case R:return(t._context.displayName||"Context")+".Consumer";case A:var n=t.render;return t=t.displayName,t||(t=n.displayName||n.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case B:return n=t.displayName||null,n!==null?n:O(t.type)||"Memo";case U:n=t._payload,t=t._init;try{return O(t(n))}catch{}}return null}var P=Array.isArray,T=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H={pending:!1,data:null,method:null,action:null},V=[],M=-1;function I(t){return{current:t}}function W(t){0>M||(t.current=V[M],V[M]=null,M--)}function K(t,n){M++,V[M]=t.current,t.current=n}var ne=I(null),fe=I(null),ue=I(null),q=I(null);function Q(t,n){switch(K(ue,n),K(fe,t),K(ne,null),n.nodeType){case 9:case 11:t=(t=n.documentElement)&&(t=t.namespaceURI)?k0(t):0;break;default:if(t=n.tagName,n=n.namespaceURI)n=k0(n),t=R0(n,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}W(ne),K(ne,t)}function se(){W(ne),W(fe),W(ue)}function me(t){t.memoizedState!==null&&K(q,t);var n=ne.current,a=R0(n,t.type);n!==a&&(K(fe,t),K(ne,a))}function pe(t){fe.current===t&&(W(ne),W(fe)),q.current===t&&(W(q),ni._currentValue=H)}var de=Object.prototype.hasOwnProperty,he=e.unstable_scheduleCallback,ge=e.unstable_cancelCallback,Te=e.unstable_shouldYield,Ae=e.unstable_requestPaint,Ne=e.unstable_now,ct=e.unstable_getCurrentPriorityLevel,Tt=e.unstable_ImmediatePriority,kt=e.unstable_UserBlockingPriority,cn=e.unstable_NormalPriority,ro=e.unstable_LowPriority,xr=e.unstable_IdlePriority,ts=e.log,Io=e.unstable_setDisableYieldValue,Qt=null,ut=null;function un(t){if(typeof ts=="function"&&Io(t),ut&&typeof ut.setStrictMode=="function")try{ut.setStrictMode(Qt,t)}catch{}}var Ct=Math.clz32?Math.clz32:Fu,ns=Math.log,Xu=Math.LN2;function Fu(t){return t>>>=0,t===0?32:31-(ns(t)/Xu|0)|0}var Uo=256,Po=4194304;function Pn(t){var n=t&42;if(n!==0)return n;switch(t&-t){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:case 262144:case 524288:case 1048576:case 2097152:return t&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function $o(t,n,a){var l=t.pendingLanes;if(l===0)return 0;var h=0,x=t.suspendedLanes,_=t.pingedLanes;t=t.warmLanes;var k=l&134217727;return k!==0?(l=k&~x,l!==0?h=Pn(l):(_&=k,_!==0?h=Pn(_):a||(a=k&~t,a!==0&&(h=Pn(a))))):(k=l&~x,k!==0?h=Pn(k):_!==0?h=Pn(_):a||(a=l&~t,a!==0&&(h=Pn(a)))),h===0?0:n!==0&&n!==h&&(n&x)===0&&(x=h&-h,a=n&-n,x>=a||x===32&&(a&4194048)!==0)?n:h}function oo(t,n){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&n)===0}function Zu(t,n){switch(t){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ki(){var t=Uo;return Uo<<=1,(Uo&4194048)===0&&(Uo=256),t}function Qi(){var t=Po;return Po<<=1,(Po&62914560)===0&&(Po=4194304),t}function rs(t){for(var n=[],a=0;31>a;a++)n.push(t);return n}function ao(t,n){t.pendingLanes|=n,n!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Ku(t,n,a,l,h,x){var _=t.pendingLanes;t.pendingLanes=a,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=a,t.entangledLanes&=a,t.errorRecoveryDisabledLanes&=a,t.shellSuspendCounter=0;var k=t.entanglements,$=t.expirationTimes,te=t.hiddenUpdates;for(a=_&~a;0<a;){var ie=31-Ct(a),ce=1<<ie;k[ie]=0,$[ie]=-1;var oe=te[ie];if(oe!==null)for(te[ie]=null,ie=0;ie<oe.length;ie++){var ae=oe[ie];ae!==null&&(ae.lane&=-536870913)}a&=~ce}l!==0&&Wi(t,l,0),x!==0&&h===0&&t.tag!==0&&(t.suspendedLanes|=x&~(_&~n))}function Wi(t,n,a){t.pendingLanes|=n,t.suspendedLanes&=~n;var l=31-Ct(n);t.entangledLanes|=n,t.entanglements[l]=t.entanglements[l]|1073741824|a&4194090}function os(t,n){var a=t.entangledLanes|=n;for(t=t.entanglements;a;){var l=31-Ct(a),h=1<<l;h&n|t[l]&n&&(t[l]|=n),a&=~h}}function as(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function ss(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Ji(){var t=z.p;return t!==0?t:(t=window.event,t===void 0?32:Q0(t.type))}function Qu(t,n){var a=z.p;try{return z.p=t,n()}finally{z.p=a}}var En=Math.random().toString(36).slice(2),mt="__reactFiber$"+En,Nt="__reactProps$"+En,yr="__reactContainer$"+En,is="__reactEvents$"+En,Wu="__reactListeners$"+En,Ju="__reactHandles$"+En,el="__reactResources$"+En,so="__reactMarker$"+En;function ls(t){delete t[mt],delete t[Nt],delete t[is],delete t[Wu],delete t[Ju]}function vr(t){var n=t[mt];if(n)return n;for(var a=t.parentNode;a;){if(n=a[yr]||a[mt]){if(a=n.alternate,n.child!==null||a!==null&&a.child!==null)for(t=L0(t);t!==null;){if(a=t[mt])return a;t=L0(t)}return n}t=a,a=t.parentNode}return null}function $n(t){if(t=t[mt]||t[yr]){var n=t.tag;if(n===5||n===6||n===13||n===26||n===27||n===3)return t}return null}function br(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t.stateNode;throw Error(s(33))}function Vn(t){var n=t[el];return n||(n=t[el]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function at(t){t[so]=!0}var tl=new Set,nl={};function Yn(t,n){wr(t,n),wr(t+"Capture",n)}function wr(t,n){for(nl[t]=n,t=0;t<n.length;t++)tl.add(n[t])}var ed=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]*$"),cs={},rl={};function td(t){return de.call(rl,t)?!0:de.call(cs,t)?!1:ed.test(t)?rl[t]=!0:(cs[t]=!0,!1)}function Vo(t,n,a){if(td(n))if(a===null)t.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":t.removeAttribute(n);return;case"boolean":var l=n.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){t.removeAttribute(n);return}}t.setAttribute(n,""+a)}}function Yo(t,n,a){if(a===null)t.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttribute(n,""+a)}}function dn(t,n,a,l){if(l===null)t.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttributeNS(n,a,""+l)}}var us,ol;function qn(t){if(us===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);us=n&&n[1]||"",ol=-1<a.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+us+t+ol}var ds=!1;function fs(t,n){if(!t||ds)return"";ds=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(n){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(ae){var oe=ae}Reflect.construct(t,[],ce)}else{try{ce.call()}catch(ae){oe=ae}t.call(ce.prototype)}}else{try{throw Error()}catch(ae){oe=ae}(ce=t())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(ae){if(ae&&oe&&typeof ae.stack=="string")return[ae.stack,oe.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var x=l.DetermineComponentFrameRoot(),_=x[0],k=x[1];if(_&&k){var $=_.split(`
|
|
44
|
+
`),te=k.split(`
|
|
45
|
+
`);for(h=l=0;l<$.length&&!$[l].includes("DetermineComponentFrameRoot");)l++;for(;h<te.length&&!te[h].includes("DetermineComponentFrameRoot");)h++;if(l===$.length||h===te.length)for(l=$.length-1,h=te.length-1;1<=l&&0<=h&&$[l]!==te[h];)h--;for(;1<=l&&0<=h;l--,h--)if($[l]!==te[h]){if(l!==1||h!==1)do if(l--,h--,0>h||$[l]!==te[h]){var ie=`
|
|
46
|
+
`+$[l].replace(" at new "," at ");return t.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",t.displayName)),ie}while(1<=l&&0<=h);break}}}finally{ds=!1,Error.prepareStackTrace=a}return(a=t?t.displayName||t.name:"")?qn(a):""}function nd(t){switch(t.tag){case 26:case 27:case 5:return qn(t.type);case 16:return qn("Lazy");case 13:return qn("Suspense");case 19:return qn("SuspenseList");case 0:case 15:return fs(t.type,!1);case 11:return fs(t.type.render,!1);case 1:return fs(t.type,!0);case 31:return qn("Activity");default:return""}}function al(t){try{var n="";do n+=nd(t),t=t.return;while(t);return n}catch(a){return`
|
|
47
|
+
Error generating stack: `+a.message+`
|
|
48
|
+
`+a.stack}}function Rt(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function sl(t){var n=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function rd(t){var n=sl(t)?"checked":"value",a=Object.getOwnPropertyDescriptor(t.constructor.prototype,n),l=""+t[n];if(!t.hasOwnProperty(n)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var h=a.get,x=a.set;return Object.defineProperty(t,n,{configurable:!0,get:function(){return h.call(this)},set:function(_){l=""+_,x.call(this,_)}}),Object.defineProperty(t,n,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(_){l=""+_},stopTracking:function(){t._valueTracker=null,delete t[n]}}}}function qo(t){t._valueTracker||(t._valueTracker=rd(t))}function hs(t){if(!t)return!1;var n=t._valueTracker;if(!n)return!0;var a=n.getValue(),l="";return t&&(l=sl(t)?t.checked?"true":"false":t.value),t=l,t!==a?(n.setValue(t),!0):!1}function Go(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var od=/[\n"\\]/g;function Dt(t){return t.replace(od,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function io(t,n,a,l,h,x,_,k){t.name="",_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?t.type=_:t.removeAttribute("type"),n!=null?_==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+Rt(n)):t.value!==""+Rt(n)&&(t.value=""+Rt(n)):_!=="submit"&&_!=="reset"||t.removeAttribute("value"),n!=null?ms(t,_,Rt(n)):a!=null?ms(t,_,Rt(a)):l!=null&&t.removeAttribute("value"),h==null&&x!=null&&(t.defaultChecked=!!x),h!=null&&(t.checked=h&&typeof h!="function"&&typeof h!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?t.name=""+Rt(k):t.removeAttribute("name")}function il(t,n,a,l,h,x,_,k){if(x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(t.type=x),n!=null||a!=null){if(!(x!=="submit"&&x!=="reset"||n!=null))return;a=a!=null?""+Rt(a):"",n=n!=null?""+Rt(n):a,k||n===t.value||(t.value=n),t.defaultValue=n}l=l??h,l=typeof l!="function"&&typeof l!="symbol"&&!!l,t.checked=k?t.checked:!!l,t.defaultChecked=!!l,_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(t.name=_)}function ms(t,n,a){n==="number"&&Go(t.ownerDocument)===t||t.defaultValue===""+a||(t.defaultValue=""+a)}function Gn(t,n,a,l){if(t=t.options,n){n={};for(var h=0;h<a.length;h++)n["$"+a[h]]=!0;for(a=0;a<t.length;a++)h=n.hasOwnProperty("$"+t[a].value),t[a].selected!==h&&(t[a].selected=h),h&&l&&(t[a].defaultSelected=!0)}else{for(a=""+Rt(a),n=null,h=0;h<t.length;h++){if(t[h].value===a){t[h].selected=!0,l&&(t[h].defaultSelected=!0);return}n!==null||t[h].disabled||(n=t[h])}n!==null&&(n.selected=!0)}}function Mp(t,n,a){if(n!=null&&(n=""+Rt(n),n!==t.value&&(t.value=n),a==null)){t.defaultValue!==n&&(t.defaultValue=n);return}t.defaultValue=a!=null?""+Rt(a):""}function Tp(t,n,a,l){if(n==null){if(l!=null){if(a!=null)throw Error(s(92));if(P(l)){if(1<l.length)throw Error(s(93));l=l[0]}a=l}a==null&&(a=""),n=a}a=Rt(n),t.defaultValue=a,l=t.textContent,l===a&&l!==""&&l!==null&&(t.value=l)}function Xo(t,n){if(n){var a=t.firstChild;if(a&&a===t.lastChild&&a.nodeType===3){a.nodeValue=n;return}}t.textContent=n}var fN=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 kp(t,n,a){var l=n.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?t.setProperty(n,""):n==="float"?t.cssFloat="":t[n]="":l?t.setProperty(n,a):typeof a!="number"||a===0||fN.has(n)?n==="float"?t.cssFloat=a:t[n]=(""+a).trim():t[n]=a+"px"}function Rp(t,n,a){if(n!=null&&typeof n!="object")throw Error(s(62));if(t=t.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||n!=null&&n.hasOwnProperty(l)||(l.indexOf("--")===0?t.setProperty(l,""):l==="float"?t.cssFloat="":t[l]="");for(var h in n)l=n[h],n.hasOwnProperty(h)&&a[h]!==l&&kp(t,h,l)}else for(var x in n)n.hasOwnProperty(x)&&kp(t,x,n[x])}function ad(t){if(t.indexOf("-")===-1)return!1;switch(t){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 hN=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"]]),mN=/^[\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 ll(t){return mN.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}var sd=null;function id(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Fo=null,Zo=null;function Dp(t){var n=$n(t);if(n&&(t=n.stateNode)){var a=t[Nt]||null;e:switch(t=n.stateNode,n.type){case"input":if(io(t,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),n=a.name,a.type==="radio"&&n!=null){for(a=t;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Dt(""+n)+'"][type="radio"]'),n=0;n<a.length;n++){var l=a[n];if(l!==t&&l.form===t.form){var h=l[Nt]||null;if(!h)throw Error(s(90));io(l,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(n=0;n<a.length;n++)l=a[n],l.form===t.form&&hs(l)}break e;case"textarea":Mp(t,a.value,a.defaultValue);break e;case"select":n=a.value,n!=null&&Gn(t,!!a.multiple,n,!1)}}}var ld=!1;function Op(t,n,a){if(ld)return t(n,a);ld=!0;try{var l=t(n);return l}finally{if(ld=!1,(Fo!==null||Zo!==null)&&(Xl(),Fo&&(n=Fo,t=Zo,Zo=Fo=null,Dp(n),t)))for(n=0;n<t.length;n++)Dp(t[n])}}function ps(t,n){var a=t.stateNode;if(a===null)return null;var l=a[Nt]||null;if(l===null)return null;a=l[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(t=t.type,l=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!l;break e;default:t=!1}if(t)return null;if(a&&typeof a!="function")throw Error(s(231,n,typeof a));return a}var Xn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),cd=!1;if(Xn)try{var gs={};Object.defineProperty(gs,"passive",{get:function(){cd=!0}}),window.addEventListener("test",gs,gs),window.removeEventListener("test",gs,gs)}catch{cd=!1}var Sr=null,ud=null,cl=null;function zp(){if(cl)return cl;var t,n=ud,a=n.length,l,h="value"in Sr?Sr.value:Sr.textContent,x=h.length;for(t=0;t<a&&n[t]===h[t];t++);var _=a-t;for(l=1;l<=_&&n[a-l]===h[x-l];l++);return cl=h.slice(t,1<l?1-l:void 0)}function ul(t){var n=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&n===13&&(t=13)):t=n,t===10&&(t=13),32<=t||t===13?t:0}function dl(){return!0}function Lp(){return!1}function Ot(t){function n(a,l,h,x,_){this._reactName=a,this._targetInst=h,this.type=l,this.nativeEvent=x,this.target=_,this.currentTarget=null;for(var k in t)t.hasOwnProperty(k)&&(a=t[k],this[k]=a?a(x):x[k]);return this.isDefaultPrevented=(x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1)?dl:Lp,this.isPropagationStopped=Lp,this}return g(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=dl)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=dl)},persist:function(){},isPersistent:dl}),n}var lo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fl=Ot(lo),xs=g({},lo,{view:0,detail:0}),pN=Ot(xs),dd,fd,ys,hl=g({},xs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:md,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==ys&&(ys&&t.type==="mousemove"?(dd=t.screenX-ys.screenX,fd=t.screenY-ys.screenY):fd=dd=0,ys=t),dd)},movementY:function(t){return"movementY"in t?t.movementY:fd}}),Hp=Ot(hl),gN=g({},hl,{dataTransfer:0}),xN=Ot(gN),yN=g({},xs,{relatedTarget:0}),hd=Ot(yN),vN=g({},lo,{animationName:0,elapsedTime:0,pseudoElement:0}),bN=Ot(vN),wN=g({},lo,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),SN=Ot(wN),NN=g({},lo,{data:0}),Bp=Ot(NN),EN={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_N={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"},CN={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function jN(t){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(t):(t=CN[t])?!!n[t]:!1}function md(){return jN}var AN=g({},xs,{key:function(t){if(t.key){var n=EN[t.key]||t.key;if(n!=="Unidentified")return n}return t.type==="keypress"?(t=ul(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?_N[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:md,charCode:function(t){return t.type==="keypress"?ul(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?ul(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),MN=Ot(AN),TN=g({},hl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ip=Ot(TN),kN=g({},xs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:md}),RN=Ot(kN),DN=g({},lo,{propertyName:0,elapsedTime:0,pseudoElement:0}),ON=Ot(DN),zN=g({},hl,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),LN=Ot(zN),HN=g({},lo,{newState:0,oldState:0}),BN=Ot(HN),IN=[9,13,27,32],pd=Xn&&"CompositionEvent"in window,vs=null;Xn&&"documentMode"in document&&(vs=document.documentMode);var UN=Xn&&"TextEvent"in window&&!vs,Up=Xn&&(!pd||vs&&8<vs&&11>=vs),Pp=" ",$p=!1;function Vp(t,n){switch(t){case"keyup":return IN.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Yp(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ko=!1;function PN(t,n){switch(t){case"compositionend":return Yp(n);case"keypress":return n.which!==32?null:($p=!0,Pp);case"textInput":return t=n.data,t===Pp&&$p?null:t;default:return null}}function $N(t,n){if(Ko)return t==="compositionend"||!pd&&Vp(t,n)?(t=zp(),cl=ud=Sr=null,Ko=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return Up&&n.locale!=="ko"?null:n.data;default:return null}}var VN={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 qp(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n==="input"?!!VN[t.type]:n==="textarea"}function Gp(t,n,a,l){Fo?Zo?Zo.push(l):Zo=[l]:Fo=l,n=Jl(n,"onChange"),0<n.length&&(a=new fl("onChange","change",null,a,l),t.push({event:a,listeners:n}))}var bs=null,ws=null;function YN(t){C0(t,0)}function ml(t){var n=br(t);if(hs(n))return t}function Xp(t,n){if(t==="change")return n}var Fp=!1;if(Xn){var gd;if(Xn){var xd="oninput"in document;if(!xd){var Zp=document.createElement("div");Zp.setAttribute("oninput","return;"),xd=typeof Zp.oninput=="function"}gd=xd}else gd=!1;Fp=gd&&(!document.documentMode||9<document.documentMode)}function Kp(){bs&&(bs.detachEvent("onpropertychange",Qp),ws=bs=null)}function Qp(t){if(t.propertyName==="value"&&ml(ws)){var n=[];Gp(n,ws,t,id(t)),Op(YN,n)}}function qN(t,n,a){t==="focusin"?(Kp(),bs=n,ws=a,bs.attachEvent("onpropertychange",Qp)):t==="focusout"&&Kp()}function GN(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return ml(ws)}function XN(t,n){if(t==="click")return ml(n)}function FN(t,n){if(t==="input"||t==="change")return ml(n)}function ZN(t,n){return t===n&&(t!==0||1/t===1/n)||t!==t&&n!==n}var Ut=typeof Object.is=="function"?Object.is:ZN;function Ss(t,n){if(Ut(t,n))return!0;if(typeof t!="object"||t===null||typeof n!="object"||n===null)return!1;var a=Object.keys(t),l=Object.keys(n);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var h=a[l];if(!de.call(n,h)||!Ut(t[h],n[h]))return!1}return!0}function Wp(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Jp(t,n){var a=Wp(t);t=0;for(var l;a;){if(a.nodeType===3){if(l=t+a.textContent.length,t<=n&&l>=n)return{node:a,offset:n-t};t=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Wp(a)}}function eg(t,n){return t&&n?t===n?!0:t&&t.nodeType===3?!1:n&&n.nodeType===3?eg(t,n.parentNode):"contains"in t?t.contains(n):t.compareDocumentPosition?!!(t.compareDocumentPosition(n)&16):!1:!1}function tg(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var n=Go(t.document);n instanceof t.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)t=n.contentWindow;else break;n=Go(t.document)}return n}function yd(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n&&(n==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||n==="textarea"||t.contentEditable==="true")}var KN=Xn&&"documentMode"in document&&11>=document.documentMode,Qo=null,vd=null,Ns=null,bd=!1;function ng(t,n,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;bd||Qo==null||Qo!==Go(l)||(l=Qo,"selectionStart"in l&&yd(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Ns&&Ss(Ns,l)||(Ns=l,l=Jl(vd,"onSelect"),0<l.length&&(n=new fl("onSelect","select",null,n,a),t.push({event:n,listeners:l}),n.target=Qo)))}function co(t,n){var a={};return a[t.toLowerCase()]=n.toLowerCase(),a["Webkit"+t]="webkit"+n,a["Moz"+t]="moz"+n,a}var Wo={animationend:co("Animation","AnimationEnd"),animationiteration:co("Animation","AnimationIteration"),animationstart:co("Animation","AnimationStart"),transitionrun:co("Transition","TransitionRun"),transitionstart:co("Transition","TransitionStart"),transitioncancel:co("Transition","TransitionCancel"),transitionend:co("Transition","TransitionEnd")},wd={},rg={};Xn&&(rg=document.createElement("div").style,"AnimationEvent"in window||(delete Wo.animationend.animation,delete Wo.animationiteration.animation,delete Wo.animationstart.animation),"TransitionEvent"in window||delete Wo.transitionend.transition);function uo(t){if(wd[t])return wd[t];if(!Wo[t])return t;var n=Wo[t],a;for(a in n)if(n.hasOwnProperty(a)&&a in rg)return wd[t]=n[a];return t}var og=uo("animationend"),ag=uo("animationiteration"),sg=uo("animationstart"),QN=uo("transitionrun"),WN=uo("transitionstart"),JN=uo("transitioncancel"),ig=uo("transitionend"),lg=new Map,Sd="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(" ");Sd.push("scrollEnd");function fn(t,n){lg.set(t,n),Yn(n,[t])}var cg=new WeakMap;function Wt(t,n){if(typeof t=="object"&&t!==null){var a=cg.get(t);return a!==void 0?a:(n={value:t,source:n,stack:al(n)},cg.set(t,n),n)}return{value:t,source:n,stack:al(n)}}var Jt=[],Jo=0,Nd=0;function pl(){for(var t=Jo,n=Nd=Jo=0;n<t;){var a=Jt[n];Jt[n++]=null;var l=Jt[n];Jt[n++]=null;var h=Jt[n];Jt[n++]=null;var x=Jt[n];if(Jt[n++]=null,l!==null&&h!==null){var _=l.pending;_===null?h.next=h:(h.next=_.next,_.next=h),l.pending=h}x!==0&&ug(a,h,x)}}function gl(t,n,a,l){Jt[Jo++]=t,Jt[Jo++]=n,Jt[Jo++]=a,Jt[Jo++]=l,Nd|=l,t.lanes|=l,t=t.alternate,t!==null&&(t.lanes|=l)}function Ed(t,n,a,l){return gl(t,n,a,l),xl(t)}function ea(t,n){return gl(t,null,null,n),xl(t)}function ug(t,n,a){t.lanes|=a;var l=t.alternate;l!==null&&(l.lanes|=a);for(var h=!1,x=t.return;x!==null;)x.childLanes|=a,l=x.alternate,l!==null&&(l.childLanes|=a),x.tag===22&&(t=x.stateNode,t===null||t._visibility&1||(h=!0)),t=x,x=x.return;return t.tag===3?(x=t.stateNode,h&&n!==null&&(h=31-Ct(a),t=x.hiddenUpdates,l=t[h],l===null?t[h]=[n]:l.push(n),n.lane=a|536870912),x):null}function xl(t){if(50<Fs)throw Fs=0,kf=null,Error(s(185));for(var n=t.return;n!==null;)t=n,n=t.return;return t.tag===3?t.stateNode:null}var ta={};function eE(t,n,a,l){this.tag=t,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pt(t,n,a,l){return new eE(t,n,a,l)}function _d(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Fn(t,n){var a=t.alternate;return a===null?(a=Pt(t.tag,n,t.key,t.mode),a.elementType=t.elementType,a.type=t.type,a.stateNode=t.stateNode,a.alternate=t,t.alternate=a):(a.pendingProps=n,a.type=t.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=t.flags&65011712,a.childLanes=t.childLanes,a.lanes=t.lanes,a.child=t.child,a.memoizedProps=t.memoizedProps,a.memoizedState=t.memoizedState,a.updateQueue=t.updateQueue,n=t.dependencies,a.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},a.sibling=t.sibling,a.index=t.index,a.ref=t.ref,a.refCleanup=t.refCleanup,a}function dg(t,n){t.flags&=65011714;var a=t.alternate;return a===null?(t.childLanes=0,t.lanes=n,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=a.childLanes,t.lanes=a.lanes,t.child=a.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=a.memoizedProps,t.memoizedState=a.memoizedState,t.updateQueue=a.updateQueue,t.type=a.type,n=a.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),t}function yl(t,n,a,l,h,x){var _=0;if(l=t,typeof t=="function")_d(t)&&(_=1);else if(typeof t=="string")_=n_(t,a,ne.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case G:return t=Pt(31,a,n,h),t.elementType=G,t.lanes=x,t;case N:return fo(a.children,h,x,n);case S:_=8,h|=24;break;case C:return t=Pt(12,a,n,h|2),t.elementType=C,t.lanes=x,t;case D:return t=Pt(13,a,n,h),t.elementType=D,t.lanes=x,t;case L:return t=Pt(19,a,n,h),t.elementType=L,t.lanes=x,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case j:case E:_=10;break e;case R:_=9;break e;case A:_=11;break e;case B:_=14;break e;case U:_=16,l=null;break e}_=29,a=Error(s(130,t===null?"null":typeof t,"")),l=null}return n=Pt(_,a,n,h),n.elementType=t,n.type=l,n.lanes=x,n}function fo(t,n,a,l){return t=Pt(7,t,l,n),t.lanes=a,t}function Cd(t,n,a){return t=Pt(6,t,null,n),t.lanes=a,t}function jd(t,n,a){return n=Pt(4,t.children!==null?t.children:[],t.key,n),n.lanes=a,n.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},n}var na=[],ra=0,vl=null,bl=0,en=[],tn=0,ho=null,Zn=1,Kn="";function mo(t,n){na[ra++]=bl,na[ra++]=vl,vl=t,bl=n}function fg(t,n,a){en[tn++]=Zn,en[tn++]=Kn,en[tn++]=ho,ho=t;var l=Zn;t=Kn;var h=32-Ct(l)-1;l&=~(1<<h),a+=1;var x=32-Ct(n)+h;if(30<x){var _=h-h%5;x=(l&(1<<_)-1).toString(32),l>>=_,h-=_,Zn=1<<32-Ct(n)+h|a<<h|l,Kn=x+t}else Zn=1<<x|a<<h|l,Kn=t}function Ad(t){t.return!==null&&(mo(t,1),fg(t,1,0))}function Md(t){for(;t===vl;)vl=na[--ra],na[ra]=null,bl=na[--ra],na[ra]=null;for(;t===ho;)ho=en[--tn],en[tn]=null,Kn=en[--tn],en[tn]=null,Zn=en[--tn],en[tn]=null}var jt=null,tt=null,$e=!1,po=null,_n=!1,Td=Error(s(519));function go(t){var n=Error(s(418,""));throw Cs(Wt(n,t)),Td}function hg(t){var n=t.stateNode,a=t.type,l=t.memoizedProps;switch(n[mt]=t,n[Nt]=l,a){case"dialog":Le("cancel",n),Le("close",n);break;case"iframe":case"object":case"embed":Le("load",n);break;case"video":case"audio":for(a=0;a<Ks.length;a++)Le(Ks[a],n);break;case"source":Le("error",n);break;case"img":case"image":case"link":Le("error",n),Le("load",n);break;case"details":Le("toggle",n);break;case"input":Le("invalid",n),il(n,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0),qo(n);break;case"select":Le("invalid",n);break;case"textarea":Le("invalid",n),Tp(n,l.value,l.defaultValue,l.children),qo(n)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||n.textContent===""+a||l.suppressHydrationWarning===!0||T0(n.textContent,a)?(l.popover!=null&&(Le("beforetoggle",n),Le("toggle",n)),l.onScroll!=null&&Le("scroll",n),l.onScrollEnd!=null&&Le("scrollend",n),l.onClick!=null&&(n.onclick=ec),n=!0):n=!1,n||go(t)}function mg(t){for(jt=t.return;jt;)switch(jt.tag){case 5:case 13:_n=!1;return;case 27:case 3:_n=!0;return;default:jt=jt.return}}function Es(t){if(t!==jt)return!1;if(!$e)return mg(t),$e=!0,!1;var n=t.tag,a;if((a=n!==3&&n!==27)&&((a=n===5)&&(a=t.type,a=!(a!=="form"&&a!=="button")||Xf(t.type,t.memoizedProps)),a=!a),a&&tt&&go(t),mg(t),n===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(s(317));e:{for(t=t.nextSibling,n=0;t;){if(t.nodeType===8)if(a=t.data,a==="/$"){if(n===0){tt=mn(t.nextSibling);break e}n--}else a!=="$"&&a!=="$!"&&a!=="$?"||n++;t=t.nextSibling}tt=null}}else n===27?(n=tt,Br(t.type)?(t=Qf,Qf=null,tt=t):tt=n):tt=jt?mn(t.stateNode.nextSibling):null;return!0}function _s(){tt=jt=null,$e=!1}function pg(){var t=po;return t!==null&&(Ht===null?Ht=t:Ht.push.apply(Ht,t),po=null),t}function Cs(t){po===null?po=[t]:po.push(t)}var kd=I(null),xo=null,Qn=null;function Nr(t,n,a){K(kd,n._currentValue),n._currentValue=a}function Wn(t){t._currentValue=kd.current,W(kd)}function Rd(t,n,a){for(;t!==null;){var l=t.alternate;if((t.childLanes&n)!==n?(t.childLanes|=n,l!==null&&(l.childLanes|=n)):l!==null&&(l.childLanes&n)!==n&&(l.childLanes|=n),t===a)break;t=t.return}}function Dd(t,n,a,l){var h=t.child;for(h!==null&&(h.return=t);h!==null;){var x=h.dependencies;if(x!==null){var _=h.child;x=x.firstContext;e:for(;x!==null;){var k=x;x=h;for(var $=0;$<n.length;$++)if(k.context===n[$]){x.lanes|=a,k=x.alternate,k!==null&&(k.lanes|=a),Rd(x.return,a,t),l||(_=null);break e}x=k.next}}else if(h.tag===18){if(_=h.return,_===null)throw Error(s(341));_.lanes|=a,x=_.alternate,x!==null&&(x.lanes|=a),Rd(_,a,t),_=null}else _=h.child;if(_!==null)_.return=h;else for(_=h;_!==null;){if(_===t){_=null;break}if(h=_.sibling,h!==null){h.return=_.return,_=h;break}_=_.return}h=_}}function js(t,n,a,l){t=null;for(var h=n,x=!1;h!==null;){if(!x){if((h.flags&524288)!==0)x=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var _=h.alternate;if(_===null)throw Error(s(387));if(_=_.memoizedProps,_!==null){var k=h.type;Ut(h.pendingProps.value,_.value)||(t!==null?t.push(k):t=[k])}}else if(h===q.current){if(_=h.alternate,_===null)throw Error(s(387));_.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(t!==null?t.push(ni):t=[ni])}h=h.return}t!==null&&Dd(n,t,a,l),n.flags|=262144}function wl(t){for(t=t.firstContext;t!==null;){if(!Ut(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function yo(t){xo=t,Qn=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Et(t){return gg(xo,t)}function Sl(t,n){return xo===null&&yo(t),gg(t,n)}function gg(t,n){var a=n._currentValue;if(n={context:n,memoizedValue:a,next:null},Qn===null){if(t===null)throw Error(s(308));Qn=n,t.dependencies={lanes:0,firstContext:n},t.flags|=524288}else Qn=Qn.next=n;return a}var tE=typeof AbortController<"u"?AbortController:function(){var t=[],n=this.signal={aborted:!1,addEventListener:function(a,l){t.push(l)}};this.abort=function(){n.aborted=!0,t.forEach(function(a){return a()})}},nE=e.unstable_scheduleCallback,rE=e.unstable_NormalPriority,dt={$$typeof:E,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Od(){return{controller:new tE,data:new Map,refCount:0}}function As(t){t.refCount--,t.refCount===0&&nE(rE,function(){t.controller.abort()})}var Ms=null,zd=0,oa=0,aa=null;function oE(t,n){if(Ms===null){var a=Ms=[];zd=0,oa=Bf(),aa={status:"pending",value:void 0,then:function(l){a.push(l)}}}return zd++,n.then(xg,xg),n}function xg(){if(--zd===0&&Ms!==null){aa!==null&&(aa.status="fulfilled");var t=Ms;Ms=null,oa=0,aa=null;for(var n=0;n<t.length;n++)(0,t[n])()}}function aE(t,n){var a=[],l={status:"pending",value:null,reason:null,then:function(h){a.push(h)}};return t.then(function(){l.status="fulfilled",l.value=n;for(var h=0;h<a.length;h++)(0,a[h])(n)},function(h){for(l.status="rejected",l.reason=h,h=0;h<a.length;h++)(0,a[h])(void 0)}),l}var yg=T.S;T.S=function(t,n){typeof n=="object"&&n!==null&&typeof n.then=="function"&&oE(t,n),yg!==null&&yg(t,n)};var vo=I(null);function Ld(){var t=vo.current;return t!==null?t:Ke.pooledCache}function Nl(t,n){n===null?K(vo,vo.current):K(vo,n.pool)}function vg(){var t=Ld();return t===null?null:{parent:dt._currentValue,pool:t}}var Ts=Error(s(460)),bg=Error(s(474)),El=Error(s(542)),Hd={then:function(){}};function wg(t){return t=t.status,t==="fulfilled"||t==="rejected"}function _l(){}function Sg(t,n,a){switch(a=t[a],a===void 0?t.push(n):a!==n&&(n.then(_l,_l),n=a),n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,Eg(t),t;default:if(typeof n.status=="string")n.then(_l,_l);else{if(t=Ke,t!==null&&100<t.shellSuspendCounter)throw Error(s(482));t=n,t.status="pending",t.then(function(l){if(n.status==="pending"){var h=n;h.status="fulfilled",h.value=l}},function(l){if(n.status==="pending"){var h=n;h.status="rejected",h.reason=l}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,Eg(t),t}throw ks=n,Ts}}var ks=null;function Ng(){if(ks===null)throw Error(s(459));var t=ks;return ks=null,t}function Eg(t){if(t===Ts||t===El)throw Error(s(483))}var Er=!1;function Bd(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Id(t,n){t=t.updateQueue,n.updateQueue===t&&(n.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function _r(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Cr(t,n,a){var l=t.updateQueue;if(l===null)return null;if(l=l.shared,(Ve&2)!==0){var h=l.pending;return h===null?n.next=n:(n.next=h.next,h.next=n),l.pending=n,n=xl(t),ug(t,null,a),n}return gl(t,l,n,a),xl(t)}function Rs(t,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var l=n.lanes;l&=t.pendingLanes,a|=l,n.lanes=a,os(t,a)}}function Ud(t,n){var a=t.updateQueue,l=t.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var h=null,x=null;if(a=a.firstBaseUpdate,a!==null){do{var _={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};x===null?h=x=_:x=x.next=_,a=a.next}while(a!==null);x===null?h=x=n:x=x.next=n}else h=x=n;a={baseState:l.baseState,firstBaseUpdate:h,lastBaseUpdate:x,shared:l.shared,callbacks:l.callbacks},t.updateQueue=a;return}t=a.lastBaseUpdate,t===null?a.firstBaseUpdate=n:t.next=n,a.lastBaseUpdate=n}var Pd=!1;function Ds(){if(Pd){var t=aa;if(t!==null)throw t}}function Os(t,n,a,l){Pd=!1;var h=t.updateQueue;Er=!1;var x=h.firstBaseUpdate,_=h.lastBaseUpdate,k=h.shared.pending;if(k!==null){h.shared.pending=null;var $=k,te=$.next;$.next=null,_===null?x=te:_.next=te,_=$;var ie=t.alternate;ie!==null&&(ie=ie.updateQueue,k=ie.lastBaseUpdate,k!==_&&(k===null?ie.firstBaseUpdate=te:k.next=te,ie.lastBaseUpdate=$))}if(x!==null){var ce=h.baseState;_=0,ie=te=$=null,k=x;do{var oe=k.lane&-536870913,ae=oe!==k.lane;if(ae?(Be&oe)===oe:(l&oe)===oe){oe!==0&&oe===oa&&(Pd=!0),ie!==null&&(ie=ie.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var je=t,_e=k;oe=n;var Xe=a;switch(_e.tag){case 1:if(je=_e.payload,typeof je=="function"){ce=je.call(Xe,ce,oe);break e}ce=je;break e;case 3:je.flags=je.flags&-65537|128;case 0:if(je=_e.payload,oe=typeof je=="function"?je.call(Xe,ce,oe):je,oe==null)break e;ce=g({},ce,oe);break e;case 2:Er=!0}}oe=k.callback,oe!==null&&(t.flags|=64,ae&&(t.flags|=8192),ae=h.callbacks,ae===null?h.callbacks=[oe]:ae.push(oe))}else ae={lane:oe,tag:k.tag,payload:k.payload,callback:k.callback,next:null},ie===null?(te=ie=ae,$=ce):ie=ie.next=ae,_|=oe;if(k=k.next,k===null){if(k=h.shared.pending,k===null)break;ae=k,k=ae.next,ae.next=null,h.lastBaseUpdate=ae,h.shared.pending=null}}while(!0);ie===null&&($=ce),h.baseState=$,h.firstBaseUpdate=te,h.lastBaseUpdate=ie,x===null&&(h.shared.lanes=0),Or|=_,t.lanes=_,t.memoizedState=ce}}function _g(t,n){if(typeof t!="function")throw Error(s(191,t));t.call(n)}function Cg(t,n){var a=t.callbacks;if(a!==null)for(t.callbacks=null,t=0;t<a.length;t++)_g(a[t],n)}var sa=I(null),Cl=I(0);function jg(t,n){t=ar,K(Cl,t),K(sa,n),ar=t|n.baseLanes}function $d(){K(Cl,ar),K(sa,sa.current)}function Vd(){ar=Cl.current,W(sa),W(Cl)}var jr=0,Re=null,qe=null,st=null,jl=!1,ia=!1,bo=!1,Al=0,zs=0,la=null,sE=0;function rt(){throw Error(s(321))}function Yd(t,n){if(n===null)return!1;for(var a=0;a<n.length&&a<t.length;a++)if(!Ut(t[a],n[a]))return!1;return!0}function qd(t,n,a,l,h,x){return jr=x,Re=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,T.H=t===null||t.memoizedState===null?ux:dx,bo=!1,x=a(l,h),bo=!1,ia&&(x=Mg(n,a,l,h)),Ag(t),x}function Ag(t){T.H=Ol;var n=qe!==null&&qe.next!==null;if(jr=0,st=qe=Re=null,jl=!1,zs=0,la=null,n)throw Error(s(300));t===null||pt||(t=t.dependencies,t!==null&&wl(t)&&(pt=!0))}function Mg(t,n,a,l){Re=t;var h=0;do{if(ia&&(la=null),zs=0,ia=!1,25<=h)throw Error(s(301));if(h+=1,st=qe=null,t.updateQueue!=null){var x=t.updateQueue;x.lastEffect=null,x.events=null,x.stores=null,x.memoCache!=null&&(x.memoCache.index=0)}T.H=hE,x=n(a,l)}while(ia);return x}function iE(){var t=T.H,n=t.useState()[0];return n=typeof n.then=="function"?Ls(n):n,t=t.useState()[0],(qe!==null?qe.memoizedState:null)!==t&&(Re.flags|=1024),n}function Gd(){var t=Al!==0;return Al=0,t}function Xd(t,n,a){n.updateQueue=t.updateQueue,n.flags&=-2053,t.lanes&=~a}function Fd(t){if(jl){for(t=t.memoizedState;t!==null;){var n=t.queue;n!==null&&(n.pending=null),t=t.next}jl=!1}jr=0,st=qe=Re=null,ia=!1,zs=Al=0,la=null}function zt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return st===null?Re.memoizedState=st=t:st=st.next=t,st}function it(){if(qe===null){var t=Re.alternate;t=t!==null?t.memoizedState:null}else t=qe.next;var n=st===null?Re.memoizedState:st.next;if(n!==null)st=n,qe=t;else{if(t===null)throw Re.alternate===null?Error(s(467)):Error(s(310));qe=t,t={memoizedState:qe.memoizedState,baseState:qe.baseState,baseQueue:qe.baseQueue,queue:qe.queue,next:null},st===null?Re.memoizedState=st=t:st=st.next=t}return st}function Zd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ls(t){var n=zs;return zs+=1,la===null&&(la=[]),t=Sg(la,t,n),n=Re,(st===null?n.memoizedState:st.next)===null&&(n=n.alternate,T.H=n===null||n.memoizedState===null?ux:dx),t}function Ml(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Ls(t);if(t.$$typeof===E)return Et(t)}throw Error(s(438,String(t)))}function Kd(t){var n=null,a=Re.updateQueue;if(a!==null&&(n=a.memoCache),n==null){var l=Re.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(n={data:l.data.map(function(h){return h.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),a===null&&(a=Zd(),Re.updateQueue=a),a.memoCache=n,a=n.data[n.index],a===void 0)for(a=n.data[n.index]=Array(t),l=0;l<t;l++)a[l]=re;return n.index++,a}function Jn(t,n){return typeof n=="function"?n(t):n}function Tl(t){var n=it();return Qd(n,qe,t)}function Qd(t,n,a){var l=t.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=a;var h=t.baseQueue,x=l.pending;if(x!==null){if(h!==null){var _=h.next;h.next=x.next,x.next=_}n.baseQueue=h=x,l.pending=null}if(x=t.baseState,h===null)t.memoizedState=x;else{n=h.next;var k=_=null,$=null,te=n,ie=!1;do{var ce=te.lane&-536870913;if(ce!==te.lane?(Be&ce)===ce:(jr&ce)===ce){var oe=te.revertLane;if(oe===0)$!==null&&($=$.next={lane:0,revertLane:0,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null}),ce===oa&&(ie=!0);else if((jr&oe)===oe){te=te.next,oe===oa&&(ie=!0);continue}else ce={lane:0,revertLane:te.revertLane,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},$===null?(k=$=ce,_=x):$=$.next=ce,Re.lanes|=oe,Or|=oe;ce=te.action,bo&&a(x,ce),x=te.hasEagerState?te.eagerState:a(x,ce)}else oe={lane:ce,revertLane:te.revertLane,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},$===null?(k=$=oe,_=x):$=$.next=oe,Re.lanes|=ce,Or|=ce;te=te.next}while(te!==null&&te!==n);if($===null?_=x:$.next=k,!Ut(x,t.memoizedState)&&(pt=!0,ie&&(a=aa,a!==null)))throw a;t.memoizedState=x,t.baseState=_,t.baseQueue=$,l.lastRenderedState=x}return h===null&&(l.lanes=0),[t.memoizedState,l.dispatch]}function Wd(t){var n=it(),a=n.queue;if(a===null)throw Error(s(311));a.lastRenderedReducer=t;var l=a.dispatch,h=a.pending,x=n.memoizedState;if(h!==null){a.pending=null;var _=h=h.next;do x=t(x,_.action),_=_.next;while(_!==h);Ut(x,n.memoizedState)||(pt=!0),n.memoizedState=x,n.baseQueue===null&&(n.baseState=x),a.lastRenderedState=x}return[x,l]}function Tg(t,n,a){var l=Re,h=it(),x=$e;if(x){if(a===void 0)throw Error(s(407));a=a()}else a=n();var _=!Ut((qe||h).memoizedState,a);_&&(h.memoizedState=a,pt=!0),h=h.queue;var k=Dg.bind(null,l,h,t);if(Hs(2048,8,k,[t]),h.getSnapshot!==n||_||st!==null&&st.memoizedState.tag&1){if(l.flags|=2048,ca(9,kl(),Rg.bind(null,l,h,a,n),null),Ke===null)throw Error(s(349));x||(jr&124)!==0||kg(l,n,a)}return a}function kg(t,n,a){t.flags|=16384,t={getSnapshot:n,value:a},n=Re.updateQueue,n===null?(n=Zd(),Re.updateQueue=n,n.stores=[t]):(a=n.stores,a===null?n.stores=[t]:a.push(t))}function Rg(t,n,a,l){n.value=a,n.getSnapshot=l,Og(n)&&zg(t)}function Dg(t,n,a){return a(function(){Og(n)&&zg(t)})}function Og(t){var n=t.getSnapshot;t=t.value;try{var a=n();return!Ut(t,a)}catch{return!0}}function zg(t){var n=ea(t,2);n!==null&&Gt(n,t,2)}function Jd(t){var n=zt();if(typeof t=="function"){var a=t;if(t=a(),bo){un(!0);try{a()}finally{un(!1)}}}return n.memoizedState=n.baseState=t,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jn,lastRenderedState:t},n}function Lg(t,n,a,l){return t.baseState=a,Qd(t,qe,typeof l=="function"?l:Jn)}function lE(t,n,a,l,h){if(Dl(t))throw Error(s(485));if(t=n.action,t!==null){var x={payload:h,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(_){x.listeners.push(_)}};T.T!==null?a(!0):x.isTransition=!1,l(x),a=n.pending,a===null?(x.next=n.pending=x,Hg(n,x)):(x.next=a.next,n.pending=a.next=x)}}function Hg(t,n){var a=n.action,l=n.payload,h=t.state;if(n.isTransition){var x=T.T,_={};T.T=_;try{var k=a(h,l),$=T.S;$!==null&&$(_,k),Bg(t,n,k)}catch(te){ef(t,n,te)}finally{T.T=x}}else try{x=a(h,l),Bg(t,n,x)}catch(te){ef(t,n,te)}}function Bg(t,n,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){Ig(t,n,l)},function(l){return ef(t,n,l)}):Ig(t,n,a)}function Ig(t,n,a){n.status="fulfilled",n.value=a,Ug(n),t.state=a,n=t.pending,n!==null&&(a=n.next,a===n?t.pending=null:(a=a.next,n.next=a,Hg(t,a)))}function ef(t,n,a){var l=t.pending;if(t.pending=null,l!==null){l=l.next;do n.status="rejected",n.reason=a,Ug(n),n=n.next;while(n!==l)}t.action=null}function Ug(t){t=t.listeners;for(var n=0;n<t.length;n++)(0,t[n])()}function Pg(t,n){return n}function $g(t,n){if($e){var a=Ke.formState;if(a!==null){e:{var l=Re;if($e){if(tt){t:{for(var h=tt,x=_n;h.nodeType!==8;){if(!x){h=null;break t}if(h=mn(h.nextSibling),h===null){h=null;break t}}x=h.data,h=x==="F!"||x==="F"?h:null}if(h){tt=mn(h.nextSibling),l=h.data==="F!";break e}}go(l)}l=!1}l&&(n=a[0])}}return a=zt(),a.memoizedState=a.baseState=n,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pg,lastRenderedState:n},a.queue=l,a=ix.bind(null,Re,l),l.dispatch=a,l=Jd(!1),x=af.bind(null,Re,!1,l.queue),l=zt(),h={state:n,dispatch:null,action:t,pending:null},l.queue=h,a=lE.bind(null,Re,h,x,a),h.dispatch=a,l.memoizedState=t,[n,a,!1]}function Vg(t){var n=it();return Yg(n,qe,t)}function Yg(t,n,a){if(n=Qd(t,n,Pg)[0],t=Tl(Jn)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var l=Ls(n)}catch(_){throw _===Ts?El:_}else l=n;n=it();var h=n.queue,x=h.dispatch;return a!==n.memoizedState&&(Re.flags|=2048,ca(9,kl(),cE.bind(null,h,a),null)),[l,x,t]}function cE(t,n){t.action=n}function qg(t){var n=it(),a=qe;if(a!==null)return Yg(n,a,t);it(),n=n.memoizedState,a=it();var l=a.queue.dispatch;return a.memoizedState=t,[n,l,!1]}function ca(t,n,a,l){return t={tag:t,create:a,deps:l,inst:n,next:null},n=Re.updateQueue,n===null&&(n=Zd(),Re.updateQueue=n),a=n.lastEffect,a===null?n.lastEffect=t.next=t:(l=a.next,a.next=t,t.next=l,n.lastEffect=t),t}function kl(){return{destroy:void 0,resource:void 0}}function Gg(){return it().memoizedState}function Rl(t,n,a,l){var h=zt();l=l===void 0?null:l,Re.flags|=t,h.memoizedState=ca(1|n,kl(),a,l)}function Hs(t,n,a,l){var h=it();l=l===void 0?null:l;var x=h.memoizedState.inst;qe!==null&&l!==null&&Yd(l,qe.memoizedState.deps)?h.memoizedState=ca(n,x,a,l):(Re.flags|=t,h.memoizedState=ca(1|n,x,a,l))}function Xg(t,n){Rl(8390656,8,t,n)}function Fg(t,n){Hs(2048,8,t,n)}function Zg(t,n){return Hs(4,2,t,n)}function Kg(t,n){return Hs(4,4,t,n)}function Qg(t,n){if(typeof n=="function"){t=t();var a=n(t);return function(){typeof a=="function"?a():n(null)}}if(n!=null)return t=t(),n.current=t,function(){n.current=null}}function Wg(t,n,a){a=a!=null?a.concat([t]):null,Hs(4,4,Qg.bind(null,n,t),a)}function tf(){}function Jg(t,n){var a=it();n=n===void 0?null:n;var l=a.memoizedState;return n!==null&&Yd(n,l[1])?l[0]:(a.memoizedState=[t,n],t)}function ex(t,n){var a=it();n=n===void 0?null:n;var l=a.memoizedState;if(n!==null&&Yd(n,l[1]))return l[0];if(l=t(),bo){un(!0);try{t()}finally{un(!1)}}return a.memoizedState=[l,n],l}function nf(t,n,a){return a===void 0||(jr&1073741824)!==0?t.memoizedState=n:(t.memoizedState=a,t=r0(),Re.lanes|=t,Or|=t,a)}function tx(t,n,a,l){return Ut(a,n)?a:sa.current!==null?(t=nf(t,a,l),Ut(t,n)||(pt=!0),t):(jr&42)===0?(pt=!0,t.memoizedState=a):(t=r0(),Re.lanes|=t,Or|=t,n)}function nx(t,n,a,l,h){var x=z.p;z.p=x!==0&&8>x?x:8;var _=T.T,k={};T.T=k,af(t,!1,n,a);try{var $=h(),te=T.S;if(te!==null&&te(k,$),$!==null&&typeof $=="object"&&typeof $.then=="function"){var ie=aE($,l);Bs(t,n,ie,qt(t))}else Bs(t,n,l,qt(t))}catch(ce){Bs(t,n,{then:function(){},status:"rejected",reason:ce},qt())}finally{z.p=x,T.T=_}}function uE(){}function rf(t,n,a,l){if(t.tag!==5)throw Error(s(476));var h=rx(t).queue;nx(t,h,n,H,a===null?uE:function(){return ox(t),a(l)})}function rx(t){var n=t.memoizedState;if(n!==null)return n;n={memoizedState:H,baseState:H,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jn,lastRenderedState:H},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jn,lastRenderedState:a},next:null},t.memoizedState=n,t=t.alternate,t!==null&&(t.memoizedState=n),n}function ox(t){var n=rx(t).next.queue;Bs(t,n,{},qt())}function of(){return Et(ni)}function ax(){return it().memoizedState}function sx(){return it().memoizedState}function dE(t){for(var n=t.return;n!==null;){switch(n.tag){case 24:case 3:var a=qt();t=_r(a);var l=Cr(n,t,a);l!==null&&(Gt(l,n,a),Rs(l,n,a)),n={cache:Od()},t.payload=n;return}n=n.return}}function fE(t,n,a){var l=qt();a={lane:l,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null},Dl(t)?lx(n,a):(a=Ed(t,n,a,l),a!==null&&(Gt(a,t,l),cx(a,n,l)))}function ix(t,n,a){var l=qt();Bs(t,n,a,l)}function Bs(t,n,a,l){var h={lane:l,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(Dl(t))lx(n,h);else{var x=t.alternate;if(t.lanes===0&&(x===null||x.lanes===0)&&(x=n.lastRenderedReducer,x!==null))try{var _=n.lastRenderedState,k=x(_,a);if(h.hasEagerState=!0,h.eagerState=k,Ut(k,_))return gl(t,n,h,0),Ke===null&&pl(),!1}catch{}finally{}if(a=Ed(t,n,h,l),a!==null)return Gt(a,t,l),cx(a,n,l),!0}return!1}function af(t,n,a,l){if(l={lane:2,revertLane:Bf(),action:l,hasEagerState:!1,eagerState:null,next:null},Dl(t)){if(n)throw Error(s(479))}else n=Ed(t,a,l,2),n!==null&&Gt(n,t,2)}function Dl(t){var n=t.alternate;return t===Re||n!==null&&n===Re}function lx(t,n){ia=jl=!0;var a=t.pending;a===null?n.next=n:(n.next=a.next,a.next=n),t.pending=n}function cx(t,n,a){if((a&4194048)!==0){var l=n.lanes;l&=t.pendingLanes,a|=l,n.lanes=a,os(t,a)}}var Ol={readContext:Et,use:Ml,useCallback:rt,useContext:rt,useEffect:rt,useImperativeHandle:rt,useLayoutEffect:rt,useInsertionEffect:rt,useMemo:rt,useReducer:rt,useRef:rt,useState:rt,useDebugValue:rt,useDeferredValue:rt,useTransition:rt,useSyncExternalStore:rt,useId:rt,useHostTransitionStatus:rt,useFormState:rt,useActionState:rt,useOptimistic:rt,useMemoCache:rt,useCacheRefresh:rt},ux={readContext:Et,use:Ml,useCallback:function(t,n){return zt().memoizedState=[t,n===void 0?null:n],t},useContext:Et,useEffect:Xg,useImperativeHandle:function(t,n,a){a=a!=null?a.concat([t]):null,Rl(4194308,4,Qg.bind(null,n,t),a)},useLayoutEffect:function(t,n){return Rl(4194308,4,t,n)},useInsertionEffect:function(t,n){Rl(4,2,t,n)},useMemo:function(t,n){var a=zt();n=n===void 0?null:n;var l=t();if(bo){un(!0);try{t()}finally{un(!1)}}return a.memoizedState=[l,n],l},useReducer:function(t,n,a){var l=zt();if(a!==void 0){var h=a(n);if(bo){un(!0);try{a(n)}finally{un(!1)}}}else h=n;return l.memoizedState=l.baseState=h,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:h},l.queue=t,t=t.dispatch=fE.bind(null,Re,t),[l.memoizedState,t]},useRef:function(t){var n=zt();return t={current:t},n.memoizedState=t},useState:function(t){t=Jd(t);var n=t.queue,a=ix.bind(null,Re,n);return n.dispatch=a,[t.memoizedState,a]},useDebugValue:tf,useDeferredValue:function(t,n){var a=zt();return nf(a,t,n)},useTransition:function(){var t=Jd(!1);return t=nx.bind(null,Re,t.queue,!0,!1),zt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,n,a){var l=Re,h=zt();if($e){if(a===void 0)throw Error(s(407));a=a()}else{if(a=n(),Ke===null)throw Error(s(349));(Be&124)!==0||kg(l,n,a)}h.memoizedState=a;var x={value:a,getSnapshot:n};return h.queue=x,Xg(Dg.bind(null,l,x,t),[t]),l.flags|=2048,ca(9,kl(),Rg.bind(null,l,x,a,n),null),a},useId:function(){var t=zt(),n=Ke.identifierPrefix;if($e){var a=Kn,l=Zn;a=(l&~(1<<32-Ct(l)-1)).toString(32)+a,n="«"+n+"R"+a,a=Al++,0<a&&(n+="H"+a.toString(32)),n+="»"}else a=sE++,n="«"+n+"r"+a.toString(32)+"»";return t.memoizedState=n},useHostTransitionStatus:of,useFormState:$g,useActionState:$g,useOptimistic:function(t){var n=zt();n.memoizedState=n.baseState=t;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=a,n=af.bind(null,Re,!0,a),a.dispatch=n,[t,n]},useMemoCache:Kd,useCacheRefresh:function(){return zt().memoizedState=dE.bind(null,Re)}},dx={readContext:Et,use:Ml,useCallback:Jg,useContext:Et,useEffect:Fg,useImperativeHandle:Wg,useInsertionEffect:Zg,useLayoutEffect:Kg,useMemo:ex,useReducer:Tl,useRef:Gg,useState:function(){return Tl(Jn)},useDebugValue:tf,useDeferredValue:function(t,n){var a=it();return tx(a,qe.memoizedState,t,n)},useTransition:function(){var t=Tl(Jn)[0],n=it().memoizedState;return[typeof t=="boolean"?t:Ls(t),n]},useSyncExternalStore:Tg,useId:ax,useHostTransitionStatus:of,useFormState:Vg,useActionState:Vg,useOptimistic:function(t,n){var a=it();return Lg(a,qe,t,n)},useMemoCache:Kd,useCacheRefresh:sx},hE={readContext:Et,use:Ml,useCallback:Jg,useContext:Et,useEffect:Fg,useImperativeHandle:Wg,useInsertionEffect:Zg,useLayoutEffect:Kg,useMemo:ex,useReducer:Wd,useRef:Gg,useState:function(){return Wd(Jn)},useDebugValue:tf,useDeferredValue:function(t,n){var a=it();return qe===null?nf(a,t,n):tx(a,qe.memoizedState,t,n)},useTransition:function(){var t=Wd(Jn)[0],n=it().memoizedState;return[typeof t=="boolean"?t:Ls(t),n]},useSyncExternalStore:Tg,useId:ax,useHostTransitionStatus:of,useFormState:qg,useActionState:qg,useOptimistic:function(t,n){var a=it();return qe!==null?Lg(a,qe,t,n):(a.baseState=t,[t,a.queue.dispatch])},useMemoCache:Kd,useCacheRefresh:sx},ua=null,Is=0;function zl(t){var n=Is;return Is+=1,ua===null&&(ua=[]),Sg(ua,t,n)}function Us(t,n){n=n.props.ref,t.ref=n!==void 0?n:null}function Ll(t,n){throw n.$$typeof===v?Error(s(525)):(t=Object.prototype.toString.call(n),Error(s(31,t==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":t)))}function fx(t){var n=t._init;return n(t._payload)}function hx(t){function n(F,X){if(t){var J=F.deletions;J===null?(F.deletions=[X],F.flags|=16):J.push(X)}}function a(F,X){if(!t)return null;for(;X!==null;)n(F,X),X=X.sibling;return null}function l(F){for(var X=new Map;F!==null;)F.key!==null?X.set(F.key,F):X.set(F.index,F),F=F.sibling;return X}function h(F,X){return F=Fn(F,X),F.index=0,F.sibling=null,F}function x(F,X,J){return F.index=J,t?(J=F.alternate,J!==null?(J=J.index,J<X?(F.flags|=67108866,X):J):(F.flags|=67108866,X)):(F.flags|=1048576,X)}function _(F){return t&&F.alternate===null&&(F.flags|=67108866),F}function k(F,X,J,le){return X===null||X.tag!==6?(X=Cd(J,F.mode,le),X.return=F,X):(X=h(X,J),X.return=F,X)}function $(F,X,J,le){var xe=J.type;return xe===N?ie(F,X,J.props.children,le,J.key):X!==null&&(X.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===U&&fx(xe)===X.type)?(X=h(X,J.props),Us(X,J),X.return=F,X):(X=yl(J.type,J.key,J.props,null,F.mode,le),Us(X,J),X.return=F,X)}function te(F,X,J,le){return X===null||X.tag!==4||X.stateNode.containerInfo!==J.containerInfo||X.stateNode.implementation!==J.implementation?(X=jd(J,F.mode,le),X.return=F,X):(X=h(X,J.children||[]),X.return=F,X)}function ie(F,X,J,le,xe){return X===null||X.tag!==7?(X=fo(J,F.mode,le,xe),X.return=F,X):(X=h(X,J),X.return=F,X)}function ce(F,X,J){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return X=Cd(""+X,F.mode,J),X.return=F,X;if(typeof X=="object"&&X!==null){switch(X.$$typeof){case y:return J=yl(X.type,X.key,X.props,null,F.mode,J),Us(J,X),J.return=F,J;case b:return X=jd(X,F.mode,J),X.return=F,X;case U:var le=X._init;return X=le(X._payload),ce(F,X,J)}if(P(X)||Y(X))return X=fo(X,F.mode,J,null),X.return=F,X;if(typeof X.then=="function")return ce(F,zl(X),J);if(X.$$typeof===E)return ce(F,Sl(F,X),J);Ll(F,X)}return null}function oe(F,X,J,le){var xe=X!==null?X.key:null;if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return xe!==null?null:k(F,X,""+J,le);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case y:return J.key===xe?$(F,X,J,le):null;case b:return J.key===xe?te(F,X,J,le):null;case U:return xe=J._init,J=xe(J._payload),oe(F,X,J,le)}if(P(J)||Y(J))return xe!==null?null:ie(F,X,J,le,null);if(typeof J.then=="function")return oe(F,X,zl(J),le);if(J.$$typeof===E)return oe(F,X,Sl(F,J),le);Ll(F,J)}return null}function ae(F,X,J,le,xe){if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return F=F.get(J)||null,k(X,F,""+le,xe);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case y:return F=F.get(le.key===null?J:le.key)||null,$(X,F,le,xe);case b:return F=F.get(le.key===null?J:le.key)||null,te(X,F,le,xe);case U:var Oe=le._init;return le=Oe(le._payload),ae(F,X,J,le,xe)}if(P(le)||Y(le))return F=F.get(J)||null,ie(X,F,le,xe,null);if(typeof le.then=="function")return ae(F,X,J,zl(le),xe);if(le.$$typeof===E)return ae(F,X,J,Sl(X,le),xe);Ll(X,le)}return null}function je(F,X,J,le){for(var xe=null,Oe=null,we=X,Ce=X=0,xt=null;we!==null&&Ce<J.length;Ce++){we.index>Ce?(xt=we,we=null):xt=we.sibling;var Ue=oe(F,we,J[Ce],le);if(Ue===null){we===null&&(we=xt);break}t&&we&&Ue.alternate===null&&n(F,we),X=x(Ue,X,Ce),Oe===null?xe=Ue:Oe.sibling=Ue,Oe=Ue,we=xt}if(Ce===J.length)return a(F,we),$e&&mo(F,Ce),xe;if(we===null){for(;Ce<J.length;Ce++)we=ce(F,J[Ce],le),we!==null&&(X=x(we,X,Ce),Oe===null?xe=we:Oe.sibling=we,Oe=we);return $e&&mo(F,Ce),xe}for(we=l(we);Ce<J.length;Ce++)xt=ae(we,F,Ce,J[Ce],le),xt!==null&&(t&&xt.alternate!==null&&we.delete(xt.key===null?Ce:xt.key),X=x(xt,X,Ce),Oe===null?xe=xt:Oe.sibling=xt,Oe=xt);return t&&we.forEach(function(Vr){return n(F,Vr)}),$e&&mo(F,Ce),xe}function _e(F,X,J,le){if(J==null)throw Error(s(151));for(var xe=null,Oe=null,we=X,Ce=X=0,xt=null,Ue=J.next();we!==null&&!Ue.done;Ce++,Ue=J.next()){we.index>Ce?(xt=we,we=null):xt=we.sibling;var Vr=oe(F,we,Ue.value,le);if(Vr===null){we===null&&(we=xt);break}t&&we&&Vr.alternate===null&&n(F,we),X=x(Vr,X,Ce),Oe===null?xe=Vr:Oe.sibling=Vr,Oe=Vr,we=xt}if(Ue.done)return a(F,we),$e&&mo(F,Ce),xe;if(we===null){for(;!Ue.done;Ce++,Ue=J.next())Ue=ce(F,Ue.value,le),Ue!==null&&(X=x(Ue,X,Ce),Oe===null?xe=Ue:Oe.sibling=Ue,Oe=Ue);return $e&&mo(F,Ce),xe}for(we=l(we);!Ue.done;Ce++,Ue=J.next())Ue=ae(we,F,Ce,Ue.value,le),Ue!==null&&(t&&Ue.alternate!==null&&we.delete(Ue.key===null?Ce:Ue.key),X=x(Ue,X,Ce),Oe===null?xe=Ue:Oe.sibling=Ue,Oe=Ue);return t&&we.forEach(function(m_){return n(F,m_)}),$e&&mo(F,Ce),xe}function Xe(F,X,J,le){if(typeof J=="object"&&J!==null&&J.type===N&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case y:e:{for(var xe=J.key;X!==null;){if(X.key===xe){if(xe=J.type,xe===N){if(X.tag===7){a(F,X.sibling),le=h(X,J.props.children),le.return=F,F=le;break e}}else if(X.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===U&&fx(xe)===X.type){a(F,X.sibling),le=h(X,J.props),Us(le,J),le.return=F,F=le;break e}a(F,X);break}else n(F,X);X=X.sibling}J.type===N?(le=fo(J.props.children,F.mode,le,J.key),le.return=F,F=le):(le=yl(J.type,J.key,J.props,null,F.mode,le),Us(le,J),le.return=F,F=le)}return _(F);case b:e:{for(xe=J.key;X!==null;){if(X.key===xe)if(X.tag===4&&X.stateNode.containerInfo===J.containerInfo&&X.stateNode.implementation===J.implementation){a(F,X.sibling),le=h(X,J.children||[]),le.return=F,F=le;break e}else{a(F,X);break}else n(F,X);X=X.sibling}le=jd(J,F.mode,le),le.return=F,F=le}return _(F);case U:return xe=J._init,J=xe(J._payload),Xe(F,X,J,le)}if(P(J))return je(F,X,J,le);if(Y(J)){if(xe=Y(J),typeof xe!="function")throw Error(s(150));return J=xe.call(J),_e(F,X,J,le)}if(typeof J.then=="function")return Xe(F,X,zl(J),le);if(J.$$typeof===E)return Xe(F,X,Sl(F,J),le);Ll(F,J)}return typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint"?(J=""+J,X!==null&&X.tag===6?(a(F,X.sibling),le=h(X,J),le.return=F,F=le):(a(F,X),le=Cd(J,F.mode,le),le.return=F,F=le),_(F)):a(F,X)}return function(F,X,J,le){try{Is=0;var xe=Xe(F,X,J,le);return ua=null,xe}catch(we){if(we===Ts||we===El)throw we;var Oe=Pt(29,we,null,F.mode);return Oe.lanes=le,Oe.return=F,Oe}finally{}}}var da=hx(!0),mx=hx(!1),nn=I(null),Cn=null;function Ar(t){var n=t.alternate;K(ft,ft.current&1),K(nn,t),Cn===null&&(n===null||sa.current!==null||n.memoizedState!==null)&&(Cn=t)}function px(t){if(t.tag===22){if(K(ft,ft.current),K(nn,t),Cn===null){var n=t.alternate;n!==null&&n.memoizedState!==null&&(Cn=t)}}else Mr()}function Mr(){K(ft,ft.current),K(nn,nn.current)}function er(t){W(nn),Cn===t&&(Cn=null),W(ft)}var ft=I(0);function Hl(t){for(var n=t;n!==null;){if(n.tag===13){var a=n.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||Kf(a)))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}function sf(t,n,a,l){n=t.memoizedState,a=a(l,n),a=a==null?n:g({},n,a),t.memoizedState=a,t.lanes===0&&(t.updateQueue.baseState=a)}var lf={enqueueSetState:function(t,n,a){t=t._reactInternals;var l=qt(),h=_r(l);h.payload=n,a!=null&&(h.callback=a),n=Cr(t,h,l),n!==null&&(Gt(n,t,l),Rs(n,t,l))},enqueueReplaceState:function(t,n,a){t=t._reactInternals;var l=qt(),h=_r(l);h.tag=1,h.payload=n,a!=null&&(h.callback=a),n=Cr(t,h,l),n!==null&&(Gt(n,t,l),Rs(n,t,l))},enqueueForceUpdate:function(t,n){t=t._reactInternals;var a=qt(),l=_r(a);l.tag=2,n!=null&&(l.callback=n),n=Cr(t,l,a),n!==null&&(Gt(n,t,a),Rs(n,t,a))}};function gx(t,n,a,l,h,x,_){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(l,x,_):n.prototype&&n.prototype.isPureReactComponent?!Ss(a,l)||!Ss(h,x):!0}function xx(t,n,a,l){t=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(a,l),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(a,l),n.state!==t&&lf.enqueueReplaceState(n,n.state,null)}function wo(t,n){var a=n;if("ref"in n){a={};for(var l in n)l!=="ref"&&(a[l]=n[l])}if(t=t.defaultProps){a===n&&(a=g({},a));for(var h in t)a[h]===void 0&&(a[h]=t[h])}return a}var Bl=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)};function yx(t){Bl(t)}function vx(t){console.error(t)}function bx(t){Bl(t)}function Il(t,n){try{var a=t.onUncaughtError;a(n.value,{componentStack:n.stack})}catch(l){setTimeout(function(){throw l})}}function wx(t,n,a){try{var l=t.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function cf(t,n,a){return a=_r(a),a.tag=3,a.payload={element:null},a.callback=function(){Il(t,n)},a}function Sx(t){return t=_r(t),t.tag=3,t}function Nx(t,n,a,l){var h=a.type.getDerivedStateFromError;if(typeof h=="function"){var x=l.value;t.payload=function(){return h(x)},t.callback=function(){wx(n,a,l)}}var _=a.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(t.callback=function(){wx(n,a,l),typeof h!="function"&&(zr===null?zr=new Set([this]):zr.add(this));var k=l.stack;this.componentDidCatch(l.value,{componentStack:k!==null?k:""})})}function mE(t,n,a,l,h){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(n=a.alternate,n!==null&&js(n,a,h,!0),a=nn.current,a!==null){switch(a.tag){case 13:return Cn===null?Df():a.alternate===null&&nt===0&&(nt=3),a.flags&=-257,a.flags|=65536,a.lanes=h,l===Hd?a.flags|=16384:(n=a.updateQueue,n===null?a.updateQueue=new Set([l]):n.add(l),zf(t,l,h)),!1;case 22:return a.flags|=65536,l===Hd?a.flags|=16384:(n=a.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=n):(a=n.retryQueue,a===null?n.retryQueue=new Set([l]):a.add(l)),zf(t,l,h)),!1}throw Error(s(435,a.tag))}return zf(t,l,h),Df(),!1}if($e)return n=nn.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=h,l!==Td&&(t=Error(s(422),{cause:l}),Cs(Wt(t,a)))):(l!==Td&&(n=Error(s(423),{cause:l}),Cs(Wt(n,a))),t=t.current.alternate,t.flags|=65536,h&=-h,t.lanes|=h,l=Wt(l,a),h=cf(t.stateNode,l,h),Ud(t,h),nt!==4&&(nt=2)),!1;var x=Error(s(520),{cause:l});if(x=Wt(x,a),Xs===null?Xs=[x]:Xs.push(x),nt!==4&&(nt=2),n===null)return!0;l=Wt(l,a),a=n;do{switch(a.tag){case 3:return a.flags|=65536,t=h&-h,a.lanes|=t,t=cf(a.stateNode,l,t),Ud(a,t),!1;case 1:if(n=a.type,x=a.stateNode,(a.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(zr===null||!zr.has(x))))return a.flags|=65536,h&=-h,a.lanes|=h,h=Sx(h),Nx(h,t,a,l),Ud(a,h),!1}a=a.return}while(a!==null);return!1}var Ex=Error(s(461)),pt=!1;function yt(t,n,a,l){n.child=t===null?mx(n,null,a,l):da(n,t.child,a,l)}function _x(t,n,a,l,h){a=a.render;var x=n.ref;if("ref"in l){var _={};for(var k in l)k!=="ref"&&(_[k]=l[k])}else _=l;return yo(n),l=qd(t,n,a,_,x,h),k=Gd(),t!==null&&!pt?(Xd(t,n,h),tr(t,n,h)):($e&&k&&Ad(n),n.flags|=1,yt(t,n,l,h),n.child)}function Cx(t,n,a,l,h){if(t===null){var x=a.type;return typeof x=="function"&&!_d(x)&&x.defaultProps===void 0&&a.compare===null?(n.tag=15,n.type=x,jx(t,n,x,l,h)):(t=yl(a.type,null,l,n,n.mode,h),t.ref=n.ref,t.return=n,n.child=t)}if(x=t.child,!xf(t,h)){var _=x.memoizedProps;if(a=a.compare,a=a!==null?a:Ss,a(_,l)&&t.ref===n.ref)return tr(t,n,h)}return n.flags|=1,t=Fn(x,l),t.ref=n.ref,t.return=n,n.child=t}function jx(t,n,a,l,h){if(t!==null){var x=t.memoizedProps;if(Ss(x,l)&&t.ref===n.ref)if(pt=!1,n.pendingProps=l=x,xf(t,h))(t.flags&131072)!==0&&(pt=!0);else return n.lanes=t.lanes,tr(t,n,h)}return uf(t,n,a,l,h)}function Ax(t,n,a){var l=n.pendingProps,h=l.children,x=t!==null?t.memoizedState:null;if(l.mode==="hidden"){if((n.flags&128)!==0){if(l=x!==null?x.baseLanes|a:a,t!==null){for(h=n.child=t.child,x=0;h!==null;)x=x|h.lanes|h.childLanes,h=h.sibling;n.childLanes=x&~l}else n.childLanes=0,n.child=null;return Mx(t,n,l,a)}if((a&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},t!==null&&Nl(n,x!==null?x.cachePool:null),x!==null?jg(n,x):$d(),px(n);else return n.lanes=n.childLanes=536870912,Mx(t,n,x!==null?x.baseLanes|a:a,a)}else x!==null?(Nl(n,x.cachePool),jg(n,x),Mr(),n.memoizedState=null):(t!==null&&Nl(n,null),$d(),Mr());return yt(t,n,h,a),n.child}function Mx(t,n,a,l){var h=Ld();return h=h===null?null:{parent:dt._currentValue,pool:h},n.memoizedState={baseLanes:a,cachePool:h},t!==null&&Nl(n,null),$d(),px(n),t!==null&&js(t,n,l,!0),null}function Ul(t,n){var a=n.ref;if(a===null)t!==null&&t.ref!==null&&(n.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(s(284));(t===null||t.ref!==a)&&(n.flags|=4194816)}}function uf(t,n,a,l,h){return yo(n),a=qd(t,n,a,l,void 0,h),l=Gd(),t!==null&&!pt?(Xd(t,n,h),tr(t,n,h)):($e&&l&&Ad(n),n.flags|=1,yt(t,n,a,h),n.child)}function Tx(t,n,a,l,h,x){return yo(n),n.updateQueue=null,a=Mg(n,l,a,h),Ag(t),l=Gd(),t!==null&&!pt?(Xd(t,n,x),tr(t,n,x)):($e&&l&&Ad(n),n.flags|=1,yt(t,n,a,x),n.child)}function kx(t,n,a,l,h){if(yo(n),n.stateNode===null){var x=ta,_=a.contextType;typeof _=="object"&&_!==null&&(x=Et(_)),x=new a(l,x),n.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,x.updater=lf,n.stateNode=x,x._reactInternals=n,x=n.stateNode,x.props=l,x.state=n.memoizedState,x.refs={},Bd(n),_=a.contextType,x.context=typeof _=="object"&&_!==null?Et(_):ta,x.state=n.memoizedState,_=a.getDerivedStateFromProps,typeof _=="function"&&(sf(n,a,_,l),x.state=n.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof x.getSnapshotBeforeUpdate=="function"||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(_=x.state,typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount(),_!==x.state&&lf.enqueueReplaceState(x,x.state,null),Os(n,l,x,h),Ds(),x.state=n.memoizedState),typeof x.componentDidMount=="function"&&(n.flags|=4194308),l=!0}else if(t===null){x=n.stateNode;var k=n.memoizedProps,$=wo(a,k);x.props=$;var te=x.context,ie=a.contextType;_=ta,typeof ie=="object"&&ie!==null&&(_=Et(ie));var ce=a.getDerivedStateFromProps;ie=typeof ce=="function"||typeof x.getSnapshotBeforeUpdate=="function",k=n.pendingProps!==k,ie||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(k||te!==_)&&xx(n,x,l,_),Er=!1;var oe=n.memoizedState;x.state=oe,Os(n,l,x,h),Ds(),te=n.memoizedState,k||oe!==te||Er?(typeof ce=="function"&&(sf(n,a,ce,l),te=n.memoizedState),($=Er||gx(n,a,$,l,oe,te,_))?(ie||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(n.flags|=4194308)):(typeof x.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=l,n.memoizedState=te),x.props=l,x.state=te,x.context=_,l=$):(typeof x.componentDidMount=="function"&&(n.flags|=4194308),l=!1)}else{x=n.stateNode,Id(t,n),_=n.memoizedProps,ie=wo(a,_),x.props=ie,ce=n.pendingProps,oe=x.context,te=a.contextType,$=ta,typeof te=="object"&&te!==null&&($=Et(te)),k=a.getDerivedStateFromProps,(te=typeof k=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(_!==ce||oe!==$)&&xx(n,x,l,$),Er=!1,oe=n.memoizedState,x.state=oe,Os(n,l,x,h),Ds();var ae=n.memoizedState;_!==ce||oe!==ae||Er||t!==null&&t.dependencies!==null&&wl(t.dependencies)?(typeof k=="function"&&(sf(n,a,k,l),ae=n.memoizedState),(ie=Er||gx(n,a,ie,l,oe,ae,$)||t!==null&&t.dependencies!==null&&wl(t.dependencies))?(te||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(l,ae,$),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(l,ae,$)),typeof x.componentDidUpdate=="function"&&(n.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof x.componentDidUpdate!="function"||_===t.memoizedProps&&oe===t.memoizedState||(n.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||_===t.memoizedProps&&oe===t.memoizedState||(n.flags|=1024),n.memoizedProps=l,n.memoizedState=ae),x.props=l,x.state=ae,x.context=$,l=ie):(typeof x.componentDidUpdate!="function"||_===t.memoizedProps&&oe===t.memoizedState||(n.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||_===t.memoizedProps&&oe===t.memoizedState||(n.flags|=1024),l=!1)}return x=l,Ul(t,n),l=(n.flags&128)!==0,x||l?(x=n.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:x.render(),n.flags|=1,t!==null&&l?(n.child=da(n,t.child,null,h),n.child=da(n,null,a,h)):yt(t,n,a,h),n.memoizedState=x.state,t=n.child):t=tr(t,n,h),t}function Rx(t,n,a,l){return _s(),n.flags|=256,yt(t,n,a,l),n.child}var df={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ff(t){return{baseLanes:t,cachePool:vg()}}function hf(t,n,a){return t=t!==null?t.childLanes&~a:0,n&&(t|=rn),t}function Dx(t,n,a){var l=n.pendingProps,h=!1,x=(n.flags&128)!==0,_;if((_=x)||(_=t!==null&&t.memoizedState===null?!1:(ft.current&2)!==0),_&&(h=!0,n.flags&=-129),_=(n.flags&32)!==0,n.flags&=-33,t===null){if($e){if(h?Ar(n):Mr(),$e){var k=tt,$;if($=k){e:{for($=k,k=_n;$.nodeType!==8;){if(!k){k=null;break e}if($=mn($.nextSibling),$===null){k=null;break e}}k=$}k!==null?(n.memoizedState={dehydrated:k,treeContext:ho!==null?{id:Zn,overflow:Kn}:null,retryLane:536870912,hydrationErrors:null},$=Pt(18,null,null,0),$.stateNode=k,$.return=n,n.child=$,jt=n,tt=null,$=!0):$=!1}$||go(n)}if(k=n.memoizedState,k!==null&&(k=k.dehydrated,k!==null))return Kf(k)?n.lanes=32:n.lanes=536870912,null;er(n)}return k=l.children,l=l.fallback,h?(Mr(),h=n.mode,k=Pl({mode:"hidden",children:k},h),l=fo(l,h,a,null),k.return=n,l.return=n,k.sibling=l,n.child=k,h=n.child,h.memoizedState=ff(a),h.childLanes=hf(t,_,a),n.memoizedState=df,l):(Ar(n),mf(n,k))}if($=t.memoizedState,$!==null&&(k=$.dehydrated,k!==null)){if(x)n.flags&256?(Ar(n),n.flags&=-257,n=pf(t,n,a)):n.memoizedState!==null?(Mr(),n.child=t.child,n.flags|=128,n=null):(Mr(),h=l.fallback,k=n.mode,l=Pl({mode:"visible",children:l.children},k),h=fo(h,k,a,null),h.flags|=2,l.return=n,h.return=n,l.sibling=h,n.child=l,da(n,t.child,null,a),l=n.child,l.memoizedState=ff(a),l.childLanes=hf(t,_,a),n.memoizedState=df,n=h);else if(Ar(n),Kf(k)){if(_=k.nextSibling&&k.nextSibling.dataset,_)var te=_.dgst;_=te,l=Error(s(419)),l.stack="",l.digest=_,Cs({value:l,source:null,stack:null}),n=pf(t,n,a)}else if(pt||js(t,n,a,!1),_=(a&t.childLanes)!==0,pt||_){if(_=Ke,_!==null&&(l=a&-a,l=(l&42)!==0?1:as(l),l=(l&(_.suspendedLanes|a))!==0?0:l,l!==0&&l!==$.retryLane))throw $.retryLane=l,ea(t,l),Gt(_,t,l),Ex;k.data==="$?"||Df(),n=pf(t,n,a)}else k.data==="$?"?(n.flags|=192,n.child=t.child,n=null):(t=$.treeContext,tt=mn(k.nextSibling),jt=n,$e=!0,po=null,_n=!1,t!==null&&(en[tn++]=Zn,en[tn++]=Kn,en[tn++]=ho,Zn=t.id,Kn=t.overflow,ho=n),n=mf(n,l.children),n.flags|=4096);return n}return h?(Mr(),h=l.fallback,k=n.mode,$=t.child,te=$.sibling,l=Fn($,{mode:"hidden",children:l.children}),l.subtreeFlags=$.subtreeFlags&65011712,te!==null?h=Fn(te,h):(h=fo(h,k,a,null),h.flags|=2),h.return=n,l.return=n,l.sibling=h,n.child=l,l=h,h=n.child,k=t.child.memoizedState,k===null?k=ff(a):($=k.cachePool,$!==null?(te=dt._currentValue,$=$.parent!==te?{parent:te,pool:te}:$):$=vg(),k={baseLanes:k.baseLanes|a,cachePool:$}),h.memoizedState=k,h.childLanes=hf(t,_,a),n.memoizedState=df,l):(Ar(n),a=t.child,t=a.sibling,a=Fn(a,{mode:"visible",children:l.children}),a.return=n,a.sibling=null,t!==null&&(_=n.deletions,_===null?(n.deletions=[t],n.flags|=16):_.push(t)),n.child=a,n.memoizedState=null,a)}function mf(t,n){return n=Pl({mode:"visible",children:n},t.mode),n.return=t,t.child=n}function Pl(t,n){return t=Pt(22,t,null,n),t.lanes=0,t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},t}function pf(t,n,a){return da(n,t.child,null,a),t=mf(n,n.pendingProps.children),t.flags|=2,n.memoizedState=null,t}function Ox(t,n,a){t.lanes|=n;var l=t.alternate;l!==null&&(l.lanes|=n),Rd(t.return,n,a)}function gf(t,n,a,l,h){var x=t.memoizedState;x===null?t.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:h}:(x.isBackwards=n,x.rendering=null,x.renderingStartTime=0,x.last=l,x.tail=a,x.tailMode=h)}function zx(t,n,a){var l=n.pendingProps,h=l.revealOrder,x=l.tail;if(yt(t,n,l.children,a),l=ft.current,(l&2)!==0)l=l&1|2,n.flags|=128;else{if(t!==null&&(t.flags&128)!==0)e:for(t=n.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Ox(t,a,n);else if(t.tag===19)Ox(t,a,n);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===n)break e;for(;t.sibling===null;){if(t.return===null||t.return===n)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}l&=1}switch(K(ft,l),h){case"forwards":for(a=n.child,h=null;a!==null;)t=a.alternate,t!==null&&Hl(t)===null&&(h=a),a=a.sibling;a=h,a===null?(h=n.child,n.child=null):(h=a.sibling,a.sibling=null),gf(n,!1,h,a,x);break;case"backwards":for(a=null,h=n.child,n.child=null;h!==null;){if(t=h.alternate,t!==null&&Hl(t)===null){n.child=h;break}t=h.sibling,h.sibling=a,a=h,h=t}gf(n,!0,a,null,x);break;case"together":gf(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function tr(t,n,a){if(t!==null&&(n.dependencies=t.dependencies),Or|=n.lanes,(a&n.childLanes)===0)if(t!==null){if(js(t,n,a,!1),(a&n.childLanes)===0)return null}else return null;if(t!==null&&n.child!==t.child)throw Error(s(153));if(n.child!==null){for(t=n.child,a=Fn(t,t.pendingProps),n.child=a,a.return=n;t.sibling!==null;)t=t.sibling,a=a.sibling=Fn(t,t.pendingProps),a.return=n;a.sibling=null}return n.child}function xf(t,n){return(t.lanes&n)!==0?!0:(t=t.dependencies,!!(t!==null&&wl(t)))}function pE(t,n,a){switch(n.tag){case 3:Q(n,n.stateNode.containerInfo),Nr(n,dt,t.memoizedState.cache),_s();break;case 27:case 5:me(n);break;case 4:Q(n,n.stateNode.containerInfo);break;case 10:Nr(n,n.type,n.memoizedProps.value);break;case 13:var l=n.memoizedState;if(l!==null)return l.dehydrated!==null?(Ar(n),n.flags|=128,null):(a&n.child.childLanes)!==0?Dx(t,n,a):(Ar(n),t=tr(t,n,a),t!==null?t.sibling:null);Ar(n);break;case 19:var h=(t.flags&128)!==0;if(l=(a&n.childLanes)!==0,l||(js(t,n,a,!1),l=(a&n.childLanes)!==0),h){if(l)return zx(t,n,a);n.flags|=128}if(h=n.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),K(ft,ft.current),l)break;return null;case 22:case 23:return n.lanes=0,Ax(t,n,a);case 24:Nr(n,dt,t.memoizedState.cache)}return tr(t,n,a)}function Lx(t,n,a){if(t!==null)if(t.memoizedProps!==n.pendingProps)pt=!0;else{if(!xf(t,a)&&(n.flags&128)===0)return pt=!1,pE(t,n,a);pt=(t.flags&131072)!==0}else pt=!1,$e&&(n.flags&1048576)!==0&&fg(n,bl,n.index);switch(n.lanes=0,n.tag){case 16:e:{t=n.pendingProps;var l=n.elementType,h=l._init;if(l=h(l._payload),n.type=l,typeof l=="function")_d(l)?(t=wo(l,t),n.tag=1,n=kx(null,n,l,t,a)):(n.tag=0,n=uf(null,n,l,t,a));else{if(l!=null){if(h=l.$$typeof,h===A){n.tag=11,n=_x(null,n,l,t,a);break e}else if(h===B){n.tag=14,n=Cx(null,n,l,t,a);break e}}throw n=O(l)||l,Error(s(306,n,""))}}return n;case 0:return uf(t,n,n.type,n.pendingProps,a);case 1:return l=n.type,h=wo(l,n.pendingProps),kx(t,n,l,h,a);case 3:e:{if(Q(n,n.stateNode.containerInfo),t===null)throw Error(s(387));l=n.pendingProps;var x=n.memoizedState;h=x.element,Id(t,n),Os(n,l,null,a);var _=n.memoizedState;if(l=_.cache,Nr(n,dt,l),l!==x.cache&&Dd(n,[dt],a,!0),Ds(),l=_.element,x.isDehydrated)if(x={element:l,isDehydrated:!1,cache:_.cache},n.updateQueue.baseState=x,n.memoizedState=x,n.flags&256){n=Rx(t,n,l,a);break e}else if(l!==h){h=Wt(Error(s(424)),n),Cs(h),n=Rx(t,n,l,a);break e}else{switch(t=n.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(tt=mn(t.firstChild),jt=n,$e=!0,po=null,_n=!0,a=mx(n,null,l,a),n.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(_s(),l===h){n=tr(t,n,a);break e}yt(t,n,l,a)}n=n.child}return n;case 26:return Ul(t,n),t===null?(a=U0(n.type,null,n.pendingProps,null))?n.memoizedState=a:$e||(a=n.type,t=n.pendingProps,l=tc(ue.current).createElement(a),l[mt]=n,l[Nt]=t,bt(l,a,t),at(l),n.stateNode=l):n.memoizedState=U0(n.type,t.memoizedProps,n.pendingProps,t.memoizedState),null;case 27:return me(n),t===null&&$e&&(l=n.stateNode=H0(n.type,n.pendingProps,ue.current),jt=n,_n=!0,h=tt,Br(n.type)?(Qf=h,tt=mn(l.firstChild)):tt=h),yt(t,n,n.pendingProps.children,a),Ul(t,n),t===null&&(n.flags|=4194304),n.child;case 5:return t===null&&$e&&((h=l=tt)&&(l=VE(l,n.type,n.pendingProps,_n),l!==null?(n.stateNode=l,jt=n,tt=mn(l.firstChild),_n=!1,h=!0):h=!1),h||go(n)),me(n),h=n.type,x=n.pendingProps,_=t!==null?t.memoizedProps:null,l=x.children,Xf(h,x)?l=null:_!==null&&Xf(h,_)&&(n.flags|=32),n.memoizedState!==null&&(h=qd(t,n,iE,null,null,a),ni._currentValue=h),Ul(t,n),yt(t,n,l,a),n.child;case 6:return t===null&&$e&&((t=a=tt)&&(a=YE(a,n.pendingProps,_n),a!==null?(n.stateNode=a,jt=n,tt=null,t=!0):t=!1),t||go(n)),null;case 13:return Dx(t,n,a);case 4:return Q(n,n.stateNode.containerInfo),l=n.pendingProps,t===null?n.child=da(n,null,l,a):yt(t,n,l,a),n.child;case 11:return _x(t,n,n.type,n.pendingProps,a);case 7:return yt(t,n,n.pendingProps,a),n.child;case 8:return yt(t,n,n.pendingProps.children,a),n.child;case 12:return yt(t,n,n.pendingProps.children,a),n.child;case 10:return l=n.pendingProps,Nr(n,n.type,l.value),yt(t,n,l.children,a),n.child;case 9:return h=n.type._context,l=n.pendingProps.children,yo(n),h=Et(h),l=l(h),n.flags|=1,yt(t,n,l,a),n.child;case 14:return Cx(t,n,n.type,n.pendingProps,a);case 15:return jx(t,n,n.type,n.pendingProps,a);case 19:return zx(t,n,a);case 31:return l=n.pendingProps,a=n.mode,l={mode:l.mode,children:l.children},t===null?(a=Pl(l,a),a.ref=n.ref,n.child=a,a.return=n,n=a):(a=Fn(t.child,l),a.ref=n.ref,n.child=a,a.return=n,n=a),n;case 22:return Ax(t,n,a);case 24:return yo(n),l=Et(dt),t===null?(h=Ld(),h===null&&(h=Ke,x=Od(),h.pooledCache=x,x.refCount++,x!==null&&(h.pooledCacheLanes|=a),h=x),n.memoizedState={parent:l,cache:h},Bd(n),Nr(n,dt,h)):((t.lanes&a)!==0&&(Id(t,n),Os(n,null,null,a),Ds()),h=t.memoizedState,x=n.memoizedState,h.parent!==l?(h={parent:l,cache:l},n.memoizedState=h,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=h),Nr(n,dt,l)):(l=x.cache,Nr(n,dt,l),l!==h.cache&&Dd(n,[dt],a,!0))),yt(t,n,n.pendingProps.children,a),n.child;case 29:throw n.pendingProps}throw Error(s(156,n.tag))}function nr(t){t.flags|=4}function Hx(t,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!q0(n)){if(n=nn.current,n!==null&&((Be&4194048)===Be?Cn!==null:(Be&62914560)!==Be&&(Be&536870912)===0||n!==Cn))throw ks=Hd,bg;t.flags|=8192}}function $l(t,n){n!==null&&(t.flags|=4),t.flags&16384&&(n=t.tag!==22?Qi():536870912,t.lanes|=n,pa|=n)}function Ps(t,n){if(!$e)switch(t.tailMode){case"hidden":n=t.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t.tail=null:a.sibling=null;break;case"collapsed":a=t.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?n||t.tail===null?t.tail=null:t.tail.sibling=null:l.sibling=null}}function Je(t){var n=t.alternate!==null&&t.alternate.child===t.child,a=0,l=0;if(n)for(var h=t.child;h!==null;)a|=h.lanes|h.childLanes,l|=h.subtreeFlags&65011712,l|=h.flags&65011712,h.return=t,h=h.sibling;else for(h=t.child;h!==null;)a|=h.lanes|h.childLanes,l|=h.subtreeFlags,l|=h.flags,h.return=t,h=h.sibling;return t.subtreeFlags|=l,t.childLanes=a,n}function gE(t,n,a){var l=n.pendingProps;switch(Md(n),n.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Je(n),null;case 1:return Je(n),null;case 3:return a=n.stateNode,l=null,t!==null&&(l=t.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),Wn(dt),se(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(t===null||t.child===null)&&(Es(n)?nr(n):t===null||t.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,pg())),Je(n),null;case 26:return a=n.memoizedState,t===null?(nr(n),a!==null?(Je(n),Hx(n,a)):(Je(n),n.flags&=-16777217)):a?a!==t.memoizedState?(nr(n),Je(n),Hx(n,a)):(Je(n),n.flags&=-16777217):(t.memoizedProps!==l&&nr(n),Je(n),n.flags&=-16777217),null;case 27:pe(n),a=ue.current;var h=n.type;if(t!==null&&n.stateNode!=null)t.memoizedProps!==l&&nr(n);else{if(!l){if(n.stateNode===null)throw Error(s(166));return Je(n),null}t=ne.current,Es(n)?hg(n):(t=H0(h,l,a),n.stateNode=t,nr(n))}return Je(n),null;case 5:if(pe(n),a=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==l&&nr(n);else{if(!l){if(n.stateNode===null)throw Error(s(166));return Je(n),null}if(t=ne.current,Es(n))hg(n);else{switch(h=tc(ue.current),t){case 1:t=h.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:t=h.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":t=h.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":t=h.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":t=h.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild);break;case"select":t=typeof l.is=="string"?h.createElement("select",{is:l.is}):h.createElement("select"),l.multiple?t.multiple=!0:l.size&&(t.size=l.size);break;default:t=typeof l.is=="string"?h.createElement(a,{is:l.is}):h.createElement(a)}}t[mt]=n,t[Nt]=l;e:for(h=n.child;h!==null;){if(h.tag===5||h.tag===6)t.appendChild(h.stateNode);else if(h.tag!==4&&h.tag!==27&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===n)break e;for(;h.sibling===null;){if(h.return===null||h.return===n)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}n.stateNode=t;e:switch(bt(t,a,l),a){case"button":case"input":case"select":case"textarea":t=!!l.autoFocus;break e;case"img":t=!0;break e;default:t=!1}t&&nr(n)}}return Je(n),n.flags&=-16777217,null;case 6:if(t&&n.stateNode!=null)t.memoizedProps!==l&&nr(n);else{if(typeof l!="string"&&n.stateNode===null)throw Error(s(166));if(t=ue.current,Es(n)){if(t=n.stateNode,a=n.memoizedProps,l=null,h=jt,h!==null)switch(h.tag){case 27:case 5:l=h.memoizedProps}t[mt]=n,t=!!(t.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||T0(t.nodeValue,a)),t||go(n)}else t=tc(t).createTextNode(l),t[mt]=n,n.stateNode=t}return Je(n),null;case 13:if(l=n.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(h=Es(n),l!==null&&l.dehydrated!==null){if(t===null){if(!h)throw Error(s(318));if(h=n.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(s(317));h[mt]=n}else _s(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Je(n),h=!1}else h=pg(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=h),h=!0;if(!h)return n.flags&256?(er(n),n):(er(n),null)}if(er(n),(n.flags&128)!==0)return n.lanes=a,n;if(a=l!==null,t=t!==null&&t.memoizedState!==null,a){l=n.child,h=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(h=l.alternate.memoizedState.cachePool.pool);var x=null;l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(x=l.memoizedState.cachePool.pool),x!==h&&(l.flags|=2048)}return a!==t&&a&&(n.child.flags|=8192),$l(n,n.updateQueue),Je(n),null;case 4:return se(),t===null&&$f(n.stateNode.containerInfo),Je(n),null;case 10:return Wn(n.type),Je(n),null;case 19:if(W(ft),h=n.memoizedState,h===null)return Je(n),null;if(l=(n.flags&128)!==0,x=h.rendering,x===null)if(l)Ps(h,!1);else{if(nt!==0||t!==null&&(t.flags&128)!==0)for(t=n.child;t!==null;){if(x=Hl(t),x!==null){for(n.flags|=128,Ps(h,!1),t=x.updateQueue,n.updateQueue=t,$l(n,t),n.subtreeFlags=0,t=a,a=n.child;a!==null;)dg(a,t),a=a.sibling;return K(ft,ft.current&1|2),n.child}t=t.sibling}h.tail!==null&&Ne()>ql&&(n.flags|=128,l=!0,Ps(h,!1),n.lanes=4194304)}else{if(!l)if(t=Hl(x),t!==null){if(n.flags|=128,l=!0,t=t.updateQueue,n.updateQueue=t,$l(n,t),Ps(h,!0),h.tail===null&&h.tailMode==="hidden"&&!x.alternate&&!$e)return Je(n),null}else 2*Ne()-h.renderingStartTime>ql&&a!==536870912&&(n.flags|=128,l=!0,Ps(h,!1),n.lanes=4194304);h.isBackwards?(x.sibling=n.child,n.child=x):(t=h.last,t!==null?t.sibling=x:n.child=x,h.last=x)}return h.tail!==null?(n=h.tail,h.rendering=n,h.tail=n.sibling,h.renderingStartTime=Ne(),n.sibling=null,t=ft.current,K(ft,l?t&1|2:t&1),n):(Je(n),null);case 22:case 23:return er(n),Vd(),l=n.memoizedState!==null,t!==null?t.memoizedState!==null!==l&&(n.flags|=8192):l&&(n.flags|=8192),l?(a&536870912)!==0&&(n.flags&128)===0&&(Je(n),n.subtreeFlags&6&&(n.flags|=8192)):Je(n),a=n.updateQueue,a!==null&&$l(n,a.retryQueue),a=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),l=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),l!==a&&(n.flags|=2048),t!==null&&W(vo),null;case 24:return a=null,t!==null&&(a=t.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),Wn(dt),Je(n),null;case 25:return null;case 30:return null}throw Error(s(156,n.tag))}function xE(t,n){switch(Md(n),n.tag){case 1:return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 3:return Wn(dt),se(),t=n.flags,(t&65536)!==0&&(t&128)===0?(n.flags=t&-65537|128,n):null;case 26:case 27:case 5:return pe(n),null;case 13:if(er(n),t=n.memoizedState,t!==null&&t.dehydrated!==null){if(n.alternate===null)throw Error(s(340));_s()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 19:return W(ft),null;case 4:return se(),null;case 10:return Wn(n.type),null;case 22:case 23:return er(n),Vd(),t!==null&&W(vo),t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 24:return Wn(dt),null;case 25:return null;default:return null}}function Bx(t,n){switch(Md(n),n.tag){case 3:Wn(dt),se();break;case 26:case 27:case 5:pe(n);break;case 4:se();break;case 13:er(n);break;case 19:W(ft);break;case 10:Wn(n.type);break;case 22:case 23:er(n),Vd(),t!==null&&W(vo);break;case 24:Wn(dt)}}function $s(t,n){try{var a=n.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var h=l.next;a=h;do{if((a.tag&t)===t){l=void 0;var x=a.create,_=a.inst;l=x(),_.destroy=l}a=a.next}while(a!==h)}}catch(k){Fe(n,n.return,k)}}function Tr(t,n,a){try{var l=n.updateQueue,h=l!==null?l.lastEffect:null;if(h!==null){var x=h.next;l=x;do{if((l.tag&t)===t){var _=l.inst,k=_.destroy;if(k!==void 0){_.destroy=void 0,h=n;var $=a,te=k;try{te()}catch(ie){Fe(h,$,ie)}}}l=l.next}while(l!==x)}}catch(ie){Fe(n,n.return,ie)}}function Ix(t){var n=t.updateQueue;if(n!==null){var a=t.stateNode;try{Cg(n,a)}catch(l){Fe(t,t.return,l)}}}function Ux(t,n,a){a.props=wo(t.type,t.memoizedProps),a.state=t.memoizedState;try{a.componentWillUnmount()}catch(l){Fe(t,n,l)}}function Vs(t,n){try{var a=t.ref;if(a!==null){switch(t.tag){case 26:case 27:case 5:var l=t.stateNode;break;case 30:l=t.stateNode;break;default:l=t.stateNode}typeof a=="function"?t.refCleanup=a(l):a.current=l}}catch(h){Fe(t,n,h)}}function jn(t,n){var a=t.ref,l=t.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(h){Fe(t,n,h)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(h){Fe(t,n,h)}else a.current=null}function Px(t){var n=t.type,a=t.memoizedProps,l=t.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(h){Fe(t,t.return,h)}}function yf(t,n,a){try{var l=t.stateNode;BE(l,t.type,a,n),l[Nt]=n}catch(h){Fe(t,t.return,h)}}function $x(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Br(t.type)||t.tag===4}function vf(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||$x(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Br(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function bf(t,n,a){var l=t.tag;if(l===5||l===6)t=t.stateNode,n?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(t,n):(n=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,n.appendChild(t),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=ec));else if(l!==4&&(l===27&&Br(t.type)&&(a=t.stateNode,n=null),t=t.child,t!==null))for(bf(t,n,a),t=t.sibling;t!==null;)bf(t,n,a),t=t.sibling}function Vl(t,n,a){var l=t.tag;if(l===5||l===6)t=t.stateNode,n?a.insertBefore(t,n):a.appendChild(t);else if(l!==4&&(l===27&&Br(t.type)&&(a=t.stateNode),t=t.child,t!==null))for(Vl(t,n,a),t=t.sibling;t!==null;)Vl(t,n,a),t=t.sibling}function Vx(t){var n=t.stateNode,a=t.memoizedProps;try{for(var l=t.type,h=n.attributes;h.length;)n.removeAttributeNode(h[0]);bt(n,l,a),n[mt]=t,n[Nt]=a}catch(x){Fe(t,t.return,x)}}var rr=!1,ot=!1,wf=!1,Yx=typeof WeakSet=="function"?WeakSet:Set,gt=null;function yE(t,n){if(t=t.containerInfo,qf=ic,t=tg(t),yd(t)){if("selectionStart"in t)var a={start:t.selectionStart,end:t.selectionEnd};else e:{a=(a=t.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var h=l.anchorOffset,x=l.focusNode;l=l.focusOffset;try{a.nodeType,x.nodeType}catch{a=null;break e}var _=0,k=-1,$=-1,te=0,ie=0,ce=t,oe=null;t:for(;;){for(var ae;ce!==a||h!==0&&ce.nodeType!==3||(k=_+h),ce!==x||l!==0&&ce.nodeType!==3||($=_+l),ce.nodeType===3&&(_+=ce.nodeValue.length),(ae=ce.firstChild)!==null;)oe=ce,ce=ae;for(;;){if(ce===t)break t;if(oe===a&&++te===h&&(k=_),oe===x&&++ie===l&&($=_),(ae=ce.nextSibling)!==null)break;ce=oe,oe=ce.parentNode}ce=ae}a=k===-1||$===-1?null:{start:k,end:$}}else a=null}a=a||{start:0,end:0}}else a=null;for(Gf={focusedElem:t,selectionRange:a},ic=!1,gt=n;gt!==null;)if(n=gt,t=n.child,(n.subtreeFlags&1024)!==0&&t!==null)t.return=n,gt=t;else for(;gt!==null;){switch(n=gt,x=n.alternate,t=n.flags,n.tag){case 0:break;case 11:case 15:break;case 1:if((t&1024)!==0&&x!==null){t=void 0,a=n,h=x.memoizedProps,x=x.memoizedState,l=a.stateNode;try{var je=wo(a.type,h,a.elementType===a.type);t=l.getSnapshotBeforeUpdate(je,x),l.__reactInternalSnapshotBeforeUpdate=t}catch(_e){Fe(a,a.return,_e)}}break;case 3:if((t&1024)!==0){if(t=n.stateNode.containerInfo,a=t.nodeType,a===9)Zf(t);else if(a===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Zf(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(s(163))}if(t=n.sibling,t!==null){t.return=n.return,gt=t;break}gt=n.return}}function qx(t,n,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:kr(t,a),l&4&&$s(5,a);break;case 1:if(kr(t,a),l&4)if(t=a.stateNode,n===null)try{t.componentDidMount()}catch(_){Fe(a,a.return,_)}else{var h=wo(a.type,n.memoizedProps);n=n.memoizedState;try{t.componentDidUpdate(h,n,t.__reactInternalSnapshotBeforeUpdate)}catch(_){Fe(a,a.return,_)}}l&64&&Ix(a),l&512&&Vs(a,a.return);break;case 3:if(kr(t,a),l&64&&(t=a.updateQueue,t!==null)){if(n=null,a.child!==null)switch(a.child.tag){case 27:case 5:n=a.child.stateNode;break;case 1:n=a.child.stateNode}try{Cg(t,n)}catch(_){Fe(a,a.return,_)}}break;case 27:n===null&&l&4&&Vx(a);case 26:case 5:kr(t,a),n===null&&l&4&&Px(a),l&512&&Vs(a,a.return);break;case 12:kr(t,a);break;case 13:kr(t,a),l&4&&Fx(t,a),l&64&&(t=a.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(a=jE.bind(null,a),qE(t,a))));break;case 22:if(l=a.memoizedState!==null||rr,!l){n=n!==null&&n.memoizedState!==null||ot,h=rr;var x=ot;rr=l,(ot=n)&&!x?Rr(t,a,(a.subtreeFlags&8772)!==0):kr(t,a),rr=h,ot=x}break;case 30:break;default:kr(t,a)}}function Gx(t){var n=t.alternate;n!==null&&(t.alternate=null,Gx(n)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(n=t.stateNode,n!==null&&ls(n)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var Qe=null,Lt=!1;function or(t,n,a){for(a=a.child;a!==null;)Xx(t,n,a),a=a.sibling}function Xx(t,n,a){if(ut&&typeof ut.onCommitFiberUnmount=="function")try{ut.onCommitFiberUnmount(Qt,a)}catch{}switch(a.tag){case 26:ot||jn(a,n),or(t,n,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:ot||jn(a,n);var l=Qe,h=Lt;Br(a.type)&&(Qe=a.stateNode,Lt=!1),or(t,n,a),Ws(a.stateNode),Qe=l,Lt=h;break;case 5:ot||jn(a,n);case 6:if(l=Qe,h=Lt,Qe=null,or(t,n,a),Qe=l,Lt=h,Qe!==null)if(Lt)try{(Qe.nodeType===9?Qe.body:Qe.nodeName==="HTML"?Qe.ownerDocument.body:Qe).removeChild(a.stateNode)}catch(x){Fe(a,n,x)}else try{Qe.removeChild(a.stateNode)}catch(x){Fe(a,n,x)}break;case 18:Qe!==null&&(Lt?(t=Qe,z0(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,a.stateNode),si(t)):z0(Qe,a.stateNode));break;case 4:l=Qe,h=Lt,Qe=a.stateNode.containerInfo,Lt=!0,or(t,n,a),Qe=l,Lt=h;break;case 0:case 11:case 14:case 15:ot||Tr(2,a,n),ot||Tr(4,a,n),or(t,n,a);break;case 1:ot||(jn(a,n),l=a.stateNode,typeof l.componentWillUnmount=="function"&&Ux(a,n,l)),or(t,n,a);break;case 21:or(t,n,a);break;case 22:ot=(l=ot)||a.memoizedState!==null,or(t,n,a),ot=l;break;default:or(t,n,a)}}function Fx(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{si(t)}catch(a){Fe(n,n.return,a)}}function vE(t){switch(t.tag){case 13:case 19:var n=t.stateNode;return n===null&&(n=t.stateNode=new Yx),n;case 22:return t=t.stateNode,n=t._retryCache,n===null&&(n=t._retryCache=new Yx),n;default:throw Error(s(435,t.tag))}}function Sf(t,n){var a=vE(t);n.forEach(function(l){var h=AE.bind(null,t,l);a.has(l)||(a.add(l),l.then(h,h))})}function $t(t,n){var a=n.deletions;if(a!==null)for(var l=0;l<a.length;l++){var h=a[l],x=t,_=n,k=_;e:for(;k!==null;){switch(k.tag){case 27:if(Br(k.type)){Qe=k.stateNode,Lt=!1;break e}break;case 5:Qe=k.stateNode,Lt=!1;break e;case 3:case 4:Qe=k.stateNode.containerInfo,Lt=!0;break e}k=k.return}if(Qe===null)throw Error(s(160));Xx(x,_,h),Qe=null,Lt=!1,x=h.alternate,x!==null&&(x.return=null),h.return=null}if(n.subtreeFlags&13878)for(n=n.child;n!==null;)Zx(n,t),n=n.sibling}var hn=null;function Zx(t,n){var a=t.alternate,l=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:$t(n,t),Vt(t),l&4&&(Tr(3,t,t.return),$s(3,t),Tr(5,t,t.return));break;case 1:$t(n,t),Vt(t),l&512&&(ot||a===null||jn(a,a.return)),l&64&&rr&&(t=t.updateQueue,t!==null&&(l=t.callbacks,l!==null&&(a=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var h=hn;if($t(n,t),Vt(t),l&512&&(ot||a===null||jn(a,a.return)),l&4){var x=a!==null?a.memoizedState:null;if(l=t.memoizedState,a===null)if(l===null)if(t.stateNode===null){e:{l=t.type,a=t.memoizedProps,h=h.ownerDocument||h;t:switch(l){case"title":x=h.getElementsByTagName("title")[0],(!x||x[so]||x[mt]||x.namespaceURI==="http://www.w3.org/2000/svg"||x.hasAttribute("itemprop"))&&(x=h.createElement(l),h.head.insertBefore(x,h.querySelector("head > title"))),bt(x,l,a),x[mt]=t,at(x),l=x;break e;case"link":var _=V0("link","href",h).get(l+(a.href||""));if(_){for(var k=0;k<_.length;k++)if(x=_[k],x.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&x.getAttribute("rel")===(a.rel==null?null:a.rel)&&x.getAttribute("title")===(a.title==null?null:a.title)&&x.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){_.splice(k,1);break t}}x=h.createElement(l),bt(x,l,a),h.head.appendChild(x);break;case"meta":if(_=V0("meta","content",h).get(l+(a.content||""))){for(k=0;k<_.length;k++)if(x=_[k],x.getAttribute("content")===(a.content==null?null:""+a.content)&&x.getAttribute("name")===(a.name==null?null:a.name)&&x.getAttribute("property")===(a.property==null?null:a.property)&&x.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&x.getAttribute("charset")===(a.charSet==null?null:a.charSet)){_.splice(k,1);break t}}x=h.createElement(l),bt(x,l,a),h.head.appendChild(x);break;default:throw Error(s(468,l))}x[mt]=t,at(x),l=x}t.stateNode=l}else Y0(h,t.type,t.stateNode);else t.stateNode=$0(h,l,t.memoizedProps);else x!==l?(x===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):x.count--,l===null?Y0(h,t.type,t.stateNode):$0(h,l,t.memoizedProps)):l===null&&t.stateNode!==null&&yf(t,t.memoizedProps,a.memoizedProps)}break;case 27:$t(n,t),Vt(t),l&512&&(ot||a===null||jn(a,a.return)),a!==null&&l&4&&yf(t,t.memoizedProps,a.memoizedProps);break;case 5:if($t(n,t),Vt(t),l&512&&(ot||a===null||jn(a,a.return)),t.flags&32){h=t.stateNode;try{Xo(h,"")}catch(ae){Fe(t,t.return,ae)}}l&4&&t.stateNode!=null&&(h=t.memoizedProps,yf(t,h,a!==null?a.memoizedProps:h)),l&1024&&(wf=!0);break;case 6:if($t(n,t),Vt(t),l&4){if(t.stateNode===null)throw Error(s(162));l=t.memoizedProps,a=t.stateNode;try{a.nodeValue=l}catch(ae){Fe(t,t.return,ae)}}break;case 3:if(oc=null,h=hn,hn=nc(n.containerInfo),$t(n,t),hn=h,Vt(t),l&4&&a!==null&&a.memoizedState.isDehydrated)try{si(n.containerInfo)}catch(ae){Fe(t,t.return,ae)}wf&&(wf=!1,Kx(t));break;case 4:l=hn,hn=nc(t.stateNode.containerInfo),$t(n,t),Vt(t),hn=l;break;case 12:$t(n,t),Vt(t);break;case 13:$t(n,t),Vt(t),t.child.flags&8192&&t.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Af=Ne()),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,Sf(t,l)));break;case 22:h=t.memoizedState!==null;var $=a!==null&&a.memoizedState!==null,te=rr,ie=ot;if(rr=te||h,ot=ie||$,$t(n,t),ot=ie,rr=te,Vt(t),l&8192)e:for(n=t.stateNode,n._visibility=h?n._visibility&-2:n._visibility|1,h&&(a===null||$||rr||ot||So(t)),a=null,n=t;;){if(n.tag===5||n.tag===26){if(a===null){$=a=n;try{if(x=$.stateNode,h)_=x.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{k=$.stateNode;var ce=$.memoizedProps.style,oe=ce!=null&&ce.hasOwnProperty("display")?ce.display:null;k.style.display=oe==null||typeof oe=="boolean"?"":(""+oe).trim()}}catch(ae){Fe($,$.return,ae)}}}else if(n.tag===6){if(a===null){$=n;try{$.stateNode.nodeValue=h?"":$.memoizedProps}catch(ae){Fe($,$.return,ae)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===t)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break e;for(;n.sibling===null;){if(n.return===null||n.return===t)break e;a===n&&(a=null),n=n.return}a===n&&(a=null),n.sibling.return=n.return,n=n.sibling}l&4&&(l=t.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,Sf(t,a))));break;case 19:$t(n,t),Vt(t),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,Sf(t,l)));break;case 30:break;case 21:break;default:$t(n,t),Vt(t)}}function Vt(t){var n=t.flags;if(n&2){try{for(var a,l=t.return;l!==null;){if($x(l)){a=l;break}l=l.return}if(a==null)throw Error(s(160));switch(a.tag){case 27:var h=a.stateNode,x=vf(t);Vl(t,x,h);break;case 5:var _=a.stateNode;a.flags&32&&(Xo(_,""),a.flags&=-33);var k=vf(t);Vl(t,k,_);break;case 3:case 4:var $=a.stateNode.containerInfo,te=vf(t);bf(t,te,$);break;default:throw Error(s(161))}}catch(ie){Fe(t,t.return,ie)}t.flags&=-3}n&4096&&(t.flags&=-4097)}function Kx(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var n=t;Kx(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),t=t.sibling}}function kr(t,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)qx(t,n.alternate,n),n=n.sibling}function So(t){for(t=t.child;t!==null;){var n=t;switch(n.tag){case 0:case 11:case 14:case 15:Tr(4,n,n.return),So(n);break;case 1:jn(n,n.return);var a=n.stateNode;typeof a.componentWillUnmount=="function"&&Ux(n,n.return,a),So(n);break;case 27:Ws(n.stateNode);case 26:case 5:jn(n,n.return),So(n);break;case 22:n.memoizedState===null&&So(n);break;case 30:So(n);break;default:So(n)}t=t.sibling}}function Rr(t,n,a){for(a=a&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var l=n.alternate,h=t,x=n,_=x.flags;switch(x.tag){case 0:case 11:case 15:Rr(h,x,a),$s(4,x);break;case 1:if(Rr(h,x,a),l=x,h=l.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(te){Fe(l,l.return,te)}if(l=x,h=l.updateQueue,h!==null){var k=l.stateNode;try{var $=h.shared.hiddenCallbacks;if($!==null)for(h.shared.hiddenCallbacks=null,h=0;h<$.length;h++)_g($[h],k)}catch(te){Fe(l,l.return,te)}}a&&_&64&&Ix(x),Vs(x,x.return);break;case 27:Vx(x);case 26:case 5:Rr(h,x,a),a&&l===null&&_&4&&Px(x),Vs(x,x.return);break;case 12:Rr(h,x,a);break;case 13:Rr(h,x,a),a&&_&4&&Fx(h,x);break;case 22:x.memoizedState===null&&Rr(h,x,a),Vs(x,x.return);break;case 30:break;default:Rr(h,x,a)}n=n.sibling}}function Nf(t,n){var a=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),t=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(t=n.memoizedState.cachePool.pool),t!==a&&(t!=null&&t.refCount++,a!=null&&As(a))}function Ef(t,n){t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&As(t))}function An(t,n,a,l){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Qx(t,n,a,l),n=n.sibling}function Qx(t,n,a,l){var h=n.flags;switch(n.tag){case 0:case 11:case 15:An(t,n,a,l),h&2048&&$s(9,n);break;case 1:An(t,n,a,l);break;case 3:An(t,n,a,l),h&2048&&(t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&As(t)));break;case 12:if(h&2048){An(t,n,a,l),t=n.stateNode;try{var x=n.memoizedProps,_=x.id,k=x.onPostCommit;typeof k=="function"&&k(_,n.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch($){Fe(n,n.return,$)}}else An(t,n,a,l);break;case 13:An(t,n,a,l);break;case 23:break;case 22:x=n.stateNode,_=n.alternate,n.memoizedState!==null?x._visibility&2?An(t,n,a,l):Ys(t,n):x._visibility&2?An(t,n,a,l):(x._visibility|=2,fa(t,n,a,l,(n.subtreeFlags&10256)!==0)),h&2048&&Nf(_,n);break;case 24:An(t,n,a,l),h&2048&&Ef(n.alternate,n);break;default:An(t,n,a,l)}}function fa(t,n,a,l,h){for(h=h&&(n.subtreeFlags&10256)!==0,n=n.child;n!==null;){var x=t,_=n,k=a,$=l,te=_.flags;switch(_.tag){case 0:case 11:case 15:fa(x,_,k,$,h),$s(8,_);break;case 23:break;case 22:var ie=_.stateNode;_.memoizedState!==null?ie._visibility&2?fa(x,_,k,$,h):Ys(x,_):(ie._visibility|=2,fa(x,_,k,$,h)),h&&te&2048&&Nf(_.alternate,_);break;case 24:fa(x,_,k,$,h),h&&te&2048&&Ef(_.alternate,_);break;default:fa(x,_,k,$,h)}n=n.sibling}}function Ys(t,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var a=t,l=n,h=l.flags;switch(l.tag){case 22:Ys(a,l),h&2048&&Nf(l.alternate,l);break;case 24:Ys(a,l),h&2048&&Ef(l.alternate,l);break;default:Ys(a,l)}n=n.sibling}}var qs=8192;function ha(t){if(t.subtreeFlags&qs)for(t=t.child;t!==null;)Wx(t),t=t.sibling}function Wx(t){switch(t.tag){case 26:ha(t),t.flags&qs&&t.memoizedState!==null&&o_(hn,t.memoizedState,t.memoizedProps);break;case 5:ha(t);break;case 3:case 4:var n=hn;hn=nc(t.stateNode.containerInfo),ha(t),hn=n;break;case 22:t.memoizedState===null&&(n=t.alternate,n!==null&&n.memoizedState!==null?(n=qs,qs=16777216,ha(t),qs=n):ha(t));break;default:ha(t)}}function Jx(t){var n=t.alternate;if(n!==null&&(t=n.child,t!==null)){n.child=null;do n=t.sibling,t.sibling=null,t=n;while(t!==null)}}function Gs(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var l=n[a];gt=l,t0(l,t)}Jx(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)e0(t),t=t.sibling}function e0(t){switch(t.tag){case 0:case 11:case 15:Gs(t),t.flags&2048&&Tr(9,t,t.return);break;case 3:Gs(t);break;case 12:Gs(t);break;case 22:var n=t.stateNode;t.memoizedState!==null&&n._visibility&2&&(t.return===null||t.return.tag!==13)?(n._visibility&=-3,Yl(t)):Gs(t);break;default:Gs(t)}}function Yl(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var l=n[a];gt=l,t0(l,t)}Jx(t)}for(t=t.child;t!==null;){switch(n=t,n.tag){case 0:case 11:case 15:Tr(8,n,n.return),Yl(n);break;case 22:a=n.stateNode,a._visibility&2&&(a._visibility&=-3,Yl(n));break;default:Yl(n)}t=t.sibling}}function t0(t,n){for(;gt!==null;){var a=gt;switch(a.tag){case 0:case 11:case 15:Tr(8,a,n);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:As(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,gt=l;else e:for(a=t;gt!==null;){l=gt;var h=l.sibling,x=l.return;if(Gx(l),l===a){gt=null;break e}if(h!==null){h.return=x,gt=h;break e}gt=x}}}var bE={getCacheForType:function(t){var n=Et(dt),a=n.data.get(t);return a===void 0&&(a=t(),n.data.set(t,a)),a}},wE=typeof WeakMap=="function"?WeakMap:Map,Ve=0,Ke=null,ze=null,Be=0,Ye=0,Yt=null,Dr=!1,ma=!1,_f=!1,ar=0,nt=0,Or=0,No=0,Cf=0,rn=0,pa=0,Xs=null,Ht=null,jf=!1,Af=0,ql=1/0,Gl=null,zr=null,vt=0,Lr=null,ga=null,xa=0,Mf=0,Tf=null,n0=null,Fs=0,kf=null;function qt(){if((Ve&2)!==0&&Be!==0)return Be&-Be;if(T.T!==null){var t=oa;return t!==0?t:Bf()}return Ji()}function r0(){rn===0&&(rn=(Be&536870912)===0||$e?Ki():536870912);var t=nn.current;return t!==null&&(t.flags|=32),rn}function Gt(t,n,a){(t===Ke&&(Ye===2||Ye===9)||t.cancelPendingCommit!==null)&&(ya(t,0),Hr(t,Be,rn,!1)),ao(t,a),((Ve&2)===0||t!==Ke)&&(t===Ke&&((Ve&2)===0&&(No|=a),nt===4&&Hr(t,Be,rn,!1)),Mn(t))}function o0(t,n,a){if((Ve&6)!==0)throw Error(s(327));var l=!a&&(n&124)===0&&(n&t.expiredLanes)===0||oo(t,n),h=l?EE(t,n):Of(t,n,!0),x=l;do{if(h===0){ma&&!l&&Hr(t,n,0,!1);break}else{if(a=t.current.alternate,x&&!SE(a)){h=Of(t,n,!1),x=!1;continue}if(h===2){if(x=n,t.errorRecoveryDisabledLanes&x)var _=0;else _=t.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){n=_;e:{var k=t;h=Xs;var $=k.current.memoizedState.isDehydrated;if($&&(ya(k,_).flags|=256),_=Of(k,_,!1),_!==2){if(_f&&!$){k.errorRecoveryDisabledLanes|=x,No|=x,h=4;break e}x=Ht,Ht=h,x!==null&&(Ht===null?Ht=x:Ht.push.apply(Ht,x))}h=_}if(x=!1,h!==2)continue}}if(h===1){ya(t,0),Hr(t,n,0,!0);break}e:{switch(l=t,x=h,x){case 0:case 1:throw Error(s(345));case 4:if((n&4194048)!==n)break;case 6:Hr(l,n,rn,!Dr);break e;case 2:Ht=null;break;case 3:case 5:break;default:throw Error(s(329))}if((n&62914560)===n&&(h=Af+300-Ne(),10<h)){if(Hr(l,n,rn,!Dr),$o(l,0,!0)!==0)break e;l.timeoutHandle=D0(a0.bind(null,l,a,Ht,Gl,jf,n,rn,No,pa,Dr,x,2,-0,0),h);break e}a0(l,a,Ht,Gl,jf,n,rn,No,pa,Dr,x,0,-0,0)}}break}while(!0);Mn(t)}function a0(t,n,a,l,h,x,_,k,$,te,ie,ce,oe,ae){if(t.timeoutHandle=-1,ce=n.subtreeFlags,(ce&8192||(ce&16785408)===16785408)&&(ti={stylesheets:null,count:0,unsuspend:r_},Wx(n),ce=a_(),ce!==null)){t.cancelPendingCommit=ce(f0.bind(null,t,n,x,a,l,h,_,k,$,ie,1,oe,ae)),Hr(t,x,_,!te);return}f0(t,n,x,a,l,h,_,k,$)}function SE(t){for(var n=t;;){var a=n.tag;if((a===0||a===11||a===15)&&n.flags&16384&&(a=n.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var h=a[l],x=h.getSnapshot;h=h.value;try{if(!Ut(x(),h))return!1}catch{return!1}}if(a=n.child,n.subtreeFlags&16384&&a!==null)a.return=n,n=a;else{if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Hr(t,n,a,l){n&=~Cf,n&=~No,t.suspendedLanes|=n,t.pingedLanes&=~n,l&&(t.warmLanes|=n),l=t.expirationTimes;for(var h=n;0<h;){var x=31-Ct(h),_=1<<x;l[x]=-1,h&=~_}a!==0&&Wi(t,a,n)}function Xl(){return(Ve&6)===0?(Zs(0),!1):!0}function Rf(){if(ze!==null){if(Ye===0)var t=ze.return;else t=ze,Qn=xo=null,Fd(t),ua=null,Is=0,t=ze;for(;t!==null;)Bx(t.alternate,t),t=t.return;ze=null}}function ya(t,n){var a=t.timeoutHandle;a!==-1&&(t.timeoutHandle=-1,UE(a)),a=t.cancelPendingCommit,a!==null&&(t.cancelPendingCommit=null,a()),Rf(),Ke=t,ze=a=Fn(t.current,null),Be=n,Ye=0,Yt=null,Dr=!1,ma=oo(t,n),_f=!1,pa=rn=Cf=No=Or=nt=0,Ht=Xs=null,jf=!1,(n&8)!==0&&(n|=n&32);var l=t.entangledLanes;if(l!==0)for(t=t.entanglements,l&=n;0<l;){var h=31-Ct(l),x=1<<h;n|=t[h],l&=~x}return ar=n,pl(),a}function s0(t,n){Re=null,T.H=Ol,n===Ts||n===El?(n=Ng(),Ye=3):n===bg?(n=Ng(),Ye=4):Ye=n===Ex?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,Yt=n,ze===null&&(nt=1,Il(t,Wt(n,t.current)))}function i0(){var t=T.H;return T.H=Ol,t===null?Ol:t}function l0(){var t=T.A;return T.A=bE,t}function Df(){nt=4,Dr||(Be&4194048)!==Be&&nn.current!==null||(ma=!0),(Or&134217727)===0&&(No&134217727)===0||Ke===null||Hr(Ke,Be,rn,!1)}function Of(t,n,a){var l=Ve;Ve|=2;var h=i0(),x=l0();(Ke!==t||Be!==n)&&(Gl=null,ya(t,n)),n=!1;var _=nt;e:do try{if(Ye!==0&&ze!==null){var k=ze,$=Yt;switch(Ye){case 8:Rf(),_=6;break e;case 3:case 2:case 9:case 6:nn.current===null&&(n=!0);var te=Ye;if(Ye=0,Yt=null,va(t,k,$,te),a&&ma){_=0;break e}break;default:te=Ye,Ye=0,Yt=null,va(t,k,$,te)}}NE(),_=nt;break}catch(ie){s0(t,ie)}while(!0);return n&&t.shellSuspendCounter++,Qn=xo=null,Ve=l,T.H=h,T.A=x,ze===null&&(Ke=null,Be=0,pl()),_}function NE(){for(;ze!==null;)c0(ze)}function EE(t,n){var a=Ve;Ve|=2;var l=i0(),h=l0();Ke!==t||Be!==n?(Gl=null,ql=Ne()+500,ya(t,n)):ma=oo(t,n);e:do try{if(Ye!==0&&ze!==null){n=ze;var x=Yt;t:switch(Ye){case 1:Ye=0,Yt=null,va(t,n,x,1);break;case 2:case 9:if(wg(x)){Ye=0,Yt=null,u0(n);break}n=function(){Ye!==2&&Ye!==9||Ke!==t||(Ye=7),Mn(t)},x.then(n,n);break e;case 3:Ye=7;break e;case 4:Ye=5;break e;case 7:wg(x)?(Ye=0,Yt=null,u0(n)):(Ye=0,Yt=null,va(t,n,x,7));break;case 5:var _=null;switch(ze.tag){case 26:_=ze.memoizedState;case 5:case 27:var k=ze;if(!_||q0(_)){Ye=0,Yt=null;var $=k.sibling;if($!==null)ze=$;else{var te=k.return;te!==null?(ze=te,Fl(te)):ze=null}break t}}Ye=0,Yt=null,va(t,n,x,5);break;case 6:Ye=0,Yt=null,va(t,n,x,6);break;case 8:Rf(),nt=6;break e;default:throw Error(s(462))}}_E();break}catch(ie){s0(t,ie)}while(!0);return Qn=xo=null,T.H=l,T.A=h,Ve=a,ze!==null?0:(Ke=null,Be=0,pl(),nt)}function _E(){for(;ze!==null&&!Te();)c0(ze)}function c0(t){var n=Lx(t.alternate,t,ar);t.memoizedProps=t.pendingProps,n===null?Fl(t):ze=n}function u0(t){var n=t,a=n.alternate;switch(n.tag){case 15:case 0:n=Tx(a,n,n.pendingProps,n.type,void 0,Be);break;case 11:n=Tx(a,n,n.pendingProps,n.type.render,n.ref,Be);break;case 5:Fd(n);default:Bx(a,n),n=ze=dg(n,ar),n=Lx(a,n,ar)}t.memoizedProps=t.pendingProps,n===null?Fl(t):ze=n}function va(t,n,a,l){Qn=xo=null,Fd(n),ua=null,Is=0;var h=n.return;try{if(mE(t,h,n,a,Be)){nt=1,Il(t,Wt(a,t.current)),ze=null;return}}catch(x){if(h!==null)throw ze=h,x;nt=1,Il(t,Wt(a,t.current)),ze=null;return}n.flags&32768?($e||l===1?t=!0:ma||(Be&536870912)!==0?t=!1:(Dr=t=!0,(l===2||l===9||l===3||l===6)&&(l=nn.current,l!==null&&l.tag===13&&(l.flags|=16384))),d0(n,t)):Fl(n)}function Fl(t){var n=t;do{if((n.flags&32768)!==0){d0(n,Dr);return}t=n.return;var a=gE(n.alternate,n,ar);if(a!==null){ze=a;return}if(n=n.sibling,n!==null){ze=n;return}ze=n=t}while(n!==null);nt===0&&(nt=5)}function d0(t,n){do{var a=xE(t.alternate,t);if(a!==null){a.flags&=32767,ze=a;return}if(a=t.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!n&&(t=t.sibling,t!==null)){ze=t;return}ze=t=a}while(t!==null);nt=6,ze=null}function f0(t,n,a,l,h,x,_,k,$){t.cancelPendingCommit=null;do Zl();while(vt!==0);if((Ve&6)!==0)throw Error(s(327));if(n!==null){if(n===t.current)throw Error(s(177));if(x=n.lanes|n.childLanes,x|=Nd,Ku(t,a,x,_,k,$),t===Ke&&(ze=Ke=null,Be=0),ga=n,Lr=t,xa=a,Mf=x,Tf=h,n0=l,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,ME(cn,function(){return x0(),null})):(t.callbackNode=null,t.callbackPriority=0),l=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||l){l=T.T,T.T=null,h=z.p,z.p=2,_=Ve,Ve|=4;try{yE(t,n,a)}finally{Ve=_,z.p=h,T.T=l}}vt=1,h0(),m0(),p0()}}function h0(){if(vt===1){vt=0;var t=Lr,n=ga,a=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||a){a=T.T,T.T=null;var l=z.p;z.p=2;var h=Ve;Ve|=4;try{Zx(n,t);var x=Gf,_=tg(t.containerInfo),k=x.focusedElem,$=x.selectionRange;if(_!==k&&k&&k.ownerDocument&&eg(k.ownerDocument.documentElement,k)){if($!==null&&yd(k)){var te=$.start,ie=$.end;if(ie===void 0&&(ie=te),"selectionStart"in k)k.selectionStart=te,k.selectionEnd=Math.min(ie,k.value.length);else{var ce=k.ownerDocument||document,oe=ce&&ce.defaultView||window;if(oe.getSelection){var ae=oe.getSelection(),je=k.textContent.length,_e=Math.min($.start,je),Xe=$.end===void 0?_e:Math.min($.end,je);!ae.extend&&_e>Xe&&(_=Xe,Xe=_e,_e=_);var F=Jp(k,_e),X=Jp(k,Xe);if(F&&X&&(ae.rangeCount!==1||ae.anchorNode!==F.node||ae.anchorOffset!==F.offset||ae.focusNode!==X.node||ae.focusOffset!==X.offset)){var J=ce.createRange();J.setStart(F.node,F.offset),ae.removeAllRanges(),_e>Xe?(ae.addRange(J),ae.extend(X.node,X.offset)):(J.setEnd(X.node,X.offset),ae.addRange(J))}}}}for(ce=[],ae=k;ae=ae.parentNode;)ae.nodeType===1&&ce.push({element:ae,left:ae.scrollLeft,top:ae.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;k<ce.length;k++){var le=ce[k];le.element.scrollLeft=le.left,le.element.scrollTop=le.top}}ic=!!qf,Gf=qf=null}finally{Ve=h,z.p=l,T.T=a}}t.current=n,vt=2}}function m0(){if(vt===2){vt=0;var t=Lr,n=ga,a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=T.T,T.T=null;var l=z.p;z.p=2;var h=Ve;Ve|=4;try{qx(t,n.alternate,n)}finally{Ve=h,z.p=l,T.T=a}}vt=3}}function p0(){if(vt===4||vt===3){vt=0,Ae();var t=Lr,n=ga,a=xa,l=n0;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?vt=5:(vt=0,ga=Lr=null,g0(t,t.pendingLanes));var h=t.pendingLanes;if(h===0&&(zr=null),ss(a),n=n.stateNode,ut&&typeof ut.onCommitFiberRoot=="function")try{ut.onCommitFiberRoot(Qt,n,void 0,(n.current.flags&128)===128)}catch{}if(l!==null){n=T.T,h=z.p,z.p=2,T.T=null;try{for(var x=t.onRecoverableError,_=0;_<l.length;_++){var k=l[_];x(k.value,{componentStack:k.stack})}}finally{T.T=n,z.p=h}}(xa&3)!==0&&Zl(),Mn(t),h=t.pendingLanes,(a&4194090)!==0&&(h&42)!==0?t===kf?Fs++:(Fs=0,kf=t):Fs=0,Zs(0)}}function g0(t,n){(t.pooledCacheLanes&=n)===0&&(n=t.pooledCache,n!=null&&(t.pooledCache=null,As(n)))}function Zl(t){return h0(),m0(),p0(),x0()}function x0(){if(vt!==5)return!1;var t=Lr,n=Mf;Mf=0;var a=ss(xa),l=T.T,h=z.p;try{z.p=32>a?32:a,T.T=null,a=Tf,Tf=null;var x=Lr,_=xa;if(vt=0,ga=Lr=null,xa=0,(Ve&6)!==0)throw Error(s(331));var k=Ve;if(Ve|=4,e0(x.current),Qx(x,x.current,_,a),Ve=k,Zs(0,!1),ut&&typeof ut.onPostCommitFiberRoot=="function")try{ut.onPostCommitFiberRoot(Qt,x)}catch{}return!0}finally{z.p=h,T.T=l,g0(t,n)}}function y0(t,n,a){n=Wt(a,n),n=cf(t.stateNode,n,2),t=Cr(t,n,2),t!==null&&(ao(t,2),Mn(t))}function Fe(t,n,a){if(t.tag===3)y0(t,t,a);else for(;n!==null;){if(n.tag===3){y0(n,t,a);break}else if(n.tag===1){var l=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(zr===null||!zr.has(l))){t=Wt(a,t),a=Sx(2),l=Cr(n,a,2),l!==null&&(Nx(a,l,n,t),ao(l,2),Mn(l));break}}n=n.return}}function zf(t,n,a){var l=t.pingCache;if(l===null){l=t.pingCache=new wE;var h=new Set;l.set(n,h)}else h=l.get(n),h===void 0&&(h=new Set,l.set(n,h));h.has(a)||(_f=!0,h.add(a),t=CE.bind(null,t,n,a),n.then(t,t))}function CE(t,n,a){var l=t.pingCache;l!==null&&l.delete(n),t.pingedLanes|=t.suspendedLanes&a,t.warmLanes&=~a,Ke===t&&(Be&a)===a&&(nt===4||nt===3&&(Be&62914560)===Be&&300>Ne()-Af?(Ve&2)===0&&ya(t,0):Cf|=a,pa===Be&&(pa=0)),Mn(t)}function v0(t,n){n===0&&(n=Qi()),t=ea(t,n),t!==null&&(ao(t,n),Mn(t))}function jE(t){var n=t.memoizedState,a=0;n!==null&&(a=n.retryLane),v0(t,a)}function AE(t,n){var a=0;switch(t.tag){case 13:var l=t.stateNode,h=t.memoizedState;h!==null&&(a=h.retryLane);break;case 19:l=t.stateNode;break;case 22:l=t.stateNode._retryCache;break;default:throw Error(s(314))}l!==null&&l.delete(n),v0(t,a)}function ME(t,n){return he(t,n)}var Kl=null,ba=null,Lf=!1,Ql=!1,Hf=!1,Eo=0;function Mn(t){t!==ba&&t.next===null&&(ba===null?Kl=ba=t:ba=ba.next=t),Ql=!0,Lf||(Lf=!0,kE())}function Zs(t,n){if(!Hf&&Ql){Hf=!0;do for(var a=!1,l=Kl;l!==null;){if(t!==0){var h=l.pendingLanes;if(h===0)var x=0;else{var _=l.suspendedLanes,k=l.pingedLanes;x=(1<<31-Ct(42|t)+1)-1,x&=h&~(_&~k),x=x&201326741?x&201326741|1:x?x|2:0}x!==0&&(a=!0,N0(l,x))}else x=Be,x=$o(l,l===Ke?x:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(x&3)===0||oo(l,x)||(a=!0,N0(l,x));l=l.next}while(a);Hf=!1}}function TE(){b0()}function b0(){Ql=Lf=!1;var t=0;Eo!==0&&(IE()&&(t=Eo),Eo=0);for(var n=Ne(),a=null,l=Kl;l!==null;){var h=l.next,x=w0(l,n);x===0?(l.next=null,a===null?Kl=h:a.next=h,h===null&&(ba=a)):(a=l,(t!==0||(x&3)!==0)&&(Ql=!0)),l=h}Zs(t)}function w0(t,n){for(var a=t.suspendedLanes,l=t.pingedLanes,h=t.expirationTimes,x=t.pendingLanes&-62914561;0<x;){var _=31-Ct(x),k=1<<_,$=h[_];$===-1?((k&a)===0||(k&l)!==0)&&(h[_]=Zu(k,n)):$<=n&&(t.expiredLanes|=k),x&=~k}if(n=Ke,a=Be,a=$o(t,t===n?a:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),l=t.callbackNode,a===0||t===n&&(Ye===2||Ye===9)||t.cancelPendingCommit!==null)return l!==null&&l!==null&&ge(l),t.callbackNode=null,t.callbackPriority=0;if((a&3)===0||oo(t,a)){if(n=a&-a,n===t.callbackPriority)return n;switch(l!==null&&ge(l),ss(a)){case 2:case 8:a=kt;break;case 32:a=cn;break;case 268435456:a=xr;break;default:a=cn}return l=S0.bind(null,t),a=he(a,l),t.callbackPriority=n,t.callbackNode=a,n}return l!==null&&l!==null&&ge(l),t.callbackPriority=2,t.callbackNode=null,2}function S0(t,n){if(vt!==0&&vt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var a=t.callbackNode;if(Zl()&&t.callbackNode!==a)return null;var l=Be;return l=$o(t,t===Ke?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),l===0?null:(o0(t,l,n),w0(t,Ne()),t.callbackNode!=null&&t.callbackNode===a?S0.bind(null,t):null)}function N0(t,n){if(Zl())return null;o0(t,n,!0)}function kE(){PE(function(){(Ve&6)!==0?he(Tt,TE):b0()})}function Bf(){return Eo===0&&(Eo=Ki()),Eo}function E0(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:ll(""+t)}function _0(t,n){var a=n.ownerDocument.createElement("input");return a.name=n.name,a.value=n.value,t.id&&a.setAttribute("form",t.id),n.parentNode.insertBefore(a,n),t=new FormData(t),a.parentNode.removeChild(a),t}function RE(t,n,a,l,h){if(n==="submit"&&a&&a.stateNode===h){var x=E0((h[Nt]||null).action),_=l.submitter;_&&(n=(n=_[Nt]||null)?E0(n.formAction):_.getAttribute("formAction"),n!==null&&(x=n,_=null));var k=new fl("action","action",null,l,h);t.push({event:k,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Eo!==0){var $=_?_0(h,_):new FormData(h);rf(a,{pending:!0,data:$,method:h.method,action:x},null,$)}}else typeof x=="function"&&(k.preventDefault(),$=_?_0(h,_):new FormData(h),rf(a,{pending:!0,data:$,method:h.method,action:x},x,$))},currentTarget:h}]})}}for(var If=0;If<Sd.length;If++){var Uf=Sd[If],DE=Uf.toLowerCase(),OE=Uf[0].toUpperCase()+Uf.slice(1);fn(DE,"on"+OE)}fn(og,"onAnimationEnd"),fn(ag,"onAnimationIteration"),fn(sg,"onAnimationStart"),fn("dblclick","onDoubleClick"),fn("focusin","onFocus"),fn("focusout","onBlur"),fn(QN,"onTransitionRun"),fn(WN,"onTransitionStart"),fn(JN,"onTransitionCancel"),fn(ig,"onTransitionEnd"),wr("onMouseEnter",["mouseout","mouseover"]),wr("onMouseLeave",["mouseout","mouseover"]),wr("onPointerEnter",["pointerout","pointerover"]),wr("onPointerLeave",["pointerout","pointerover"]),Yn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Yn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Yn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Yn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Yn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Yn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ks="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(" "),zE=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ks));function C0(t,n){n=(n&4)!==0;for(var a=0;a<t.length;a++){var l=t[a],h=l.event;l=l.listeners;e:{var x=void 0;if(n)for(var _=l.length-1;0<=_;_--){var k=l[_],$=k.instance,te=k.currentTarget;if(k=k.listener,$!==x&&h.isPropagationStopped())break e;x=k,h.currentTarget=te;try{x(h)}catch(ie){Bl(ie)}h.currentTarget=null,x=$}else for(_=0;_<l.length;_++){if(k=l[_],$=k.instance,te=k.currentTarget,k=k.listener,$!==x&&h.isPropagationStopped())break e;x=k,h.currentTarget=te;try{x(h)}catch(ie){Bl(ie)}h.currentTarget=null,x=$}}}}function Le(t,n){var a=n[is];a===void 0&&(a=n[is]=new Set);var l=t+"__bubble";a.has(l)||(j0(n,t,2,!1),a.add(l))}function Pf(t,n,a){var l=0;n&&(l|=4),j0(a,t,l,n)}var Wl="_reactListening"+Math.random().toString(36).slice(2);function $f(t){if(!t[Wl]){t[Wl]=!0,tl.forEach(function(a){a!=="selectionchange"&&(zE.has(a)||Pf(a,!1,t),Pf(a,!0,t))});var n=t.nodeType===9?t:t.ownerDocument;n===null||n[Wl]||(n[Wl]=!0,Pf("selectionchange",!1,n))}}function j0(t,n,a,l){switch(Q0(n)){case 2:var h=l_;break;case 8:h=c_;break;default:h=nh}a=h.bind(null,n,a,t),h=void 0,!cd||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(h=!0),l?h!==void 0?t.addEventListener(n,a,{capture:!0,passive:h}):t.addEventListener(n,a,!0):h!==void 0?t.addEventListener(n,a,{passive:h}):t.addEventListener(n,a,!1)}function Vf(t,n,a,l,h){var x=l;if((n&1)===0&&(n&2)===0&&l!==null)e:for(;;){if(l===null)return;var _=l.tag;if(_===3||_===4){var k=l.stateNode.containerInfo;if(k===h)break;if(_===4)for(_=l.return;_!==null;){var $=_.tag;if(($===3||$===4)&&_.stateNode.containerInfo===h)return;_=_.return}for(;k!==null;){if(_=vr(k),_===null)return;if($=_.tag,$===5||$===6||$===26||$===27){l=x=_;continue e}k=k.parentNode}}l=l.return}Op(function(){var te=x,ie=id(a),ce=[];e:{var oe=lg.get(t);if(oe!==void 0){var ae=fl,je=t;switch(t){case"keypress":if(ul(a)===0)break e;case"keydown":case"keyup":ae=MN;break;case"focusin":je="focus",ae=hd;break;case"focusout":je="blur",ae=hd;break;case"beforeblur":case"afterblur":ae=hd;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ae=Hp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ae=xN;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ae=RN;break;case og:case ag:case sg:ae=bN;break;case ig:ae=ON;break;case"scroll":case"scrollend":ae=pN;break;case"wheel":ae=LN;break;case"copy":case"cut":case"paste":ae=SN;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ae=Ip;break;case"toggle":case"beforetoggle":ae=BN}var _e=(n&4)!==0,Xe=!_e&&(t==="scroll"||t==="scrollend"),F=_e?oe!==null?oe+"Capture":null:oe;_e=[];for(var X=te,J;X!==null;){var le=X;if(J=le.stateNode,le=le.tag,le!==5&&le!==26&&le!==27||J===null||F===null||(le=ps(X,F),le!=null&&_e.push(Qs(X,le,J))),Xe)break;X=X.return}0<_e.length&&(oe=new ae(oe,je,null,a,ie),ce.push({event:oe,listeners:_e}))}}if((n&7)===0){e:{if(oe=t==="mouseover"||t==="pointerover",ae=t==="mouseout"||t==="pointerout",oe&&a!==sd&&(je=a.relatedTarget||a.fromElement)&&(vr(je)||je[yr]))break e;if((ae||oe)&&(oe=ie.window===ie?ie:(oe=ie.ownerDocument)?oe.defaultView||oe.parentWindow:window,ae?(je=a.relatedTarget||a.toElement,ae=te,je=je?vr(je):null,je!==null&&(Xe=c(je),_e=je.tag,je!==Xe||_e!==5&&_e!==27&&_e!==6)&&(je=null)):(ae=null,je=te),ae!==je)){if(_e=Hp,le="onMouseLeave",F="onMouseEnter",X="mouse",(t==="pointerout"||t==="pointerover")&&(_e=Ip,le="onPointerLeave",F="onPointerEnter",X="pointer"),Xe=ae==null?oe:br(ae),J=je==null?oe:br(je),oe=new _e(le,X+"leave",ae,a,ie),oe.target=Xe,oe.relatedTarget=J,le=null,vr(ie)===te&&(_e=new _e(F,X+"enter",je,a,ie),_e.target=J,_e.relatedTarget=Xe,le=_e),Xe=le,ae&&je)t:{for(_e=ae,F=je,X=0,J=_e;J;J=wa(J))X++;for(J=0,le=F;le;le=wa(le))J++;for(;0<X-J;)_e=wa(_e),X--;for(;0<J-X;)F=wa(F),J--;for(;X--;){if(_e===F||F!==null&&_e===F.alternate)break t;_e=wa(_e),F=wa(F)}_e=null}else _e=null;ae!==null&&A0(ce,oe,ae,_e,!1),je!==null&&Xe!==null&&A0(ce,Xe,je,_e,!0)}}e:{if(oe=te?br(te):window,ae=oe.nodeName&&oe.nodeName.toLowerCase(),ae==="select"||ae==="input"&&oe.type==="file")var xe=Xp;else if(qp(oe))if(Fp)xe=FN;else{xe=GN;var Oe=qN}else ae=oe.nodeName,!ae||ae.toLowerCase()!=="input"||oe.type!=="checkbox"&&oe.type!=="radio"?te&&ad(te.elementType)&&(xe=Xp):xe=XN;if(xe&&(xe=xe(t,te))){Gp(ce,xe,a,ie);break e}Oe&&Oe(t,oe,te),t==="focusout"&&te&&oe.type==="number"&&te.memoizedProps.value!=null&&ms(oe,"number",oe.value)}switch(Oe=te?br(te):window,t){case"focusin":(qp(Oe)||Oe.contentEditable==="true")&&(Qo=Oe,vd=te,Ns=null);break;case"focusout":Ns=vd=Qo=null;break;case"mousedown":bd=!0;break;case"contextmenu":case"mouseup":case"dragend":bd=!1,ng(ce,a,ie);break;case"selectionchange":if(KN)break;case"keydown":case"keyup":ng(ce,a,ie)}var we;if(pd)e:{switch(t){case"compositionstart":var Ce="onCompositionStart";break e;case"compositionend":Ce="onCompositionEnd";break e;case"compositionupdate":Ce="onCompositionUpdate";break e}Ce=void 0}else Ko?Vp(t,a)&&(Ce="onCompositionEnd"):t==="keydown"&&a.keyCode===229&&(Ce="onCompositionStart");Ce&&(Up&&a.locale!=="ko"&&(Ko||Ce!=="onCompositionStart"?Ce==="onCompositionEnd"&&Ko&&(we=zp()):(Sr=ie,ud="value"in Sr?Sr.value:Sr.textContent,Ko=!0)),Oe=Jl(te,Ce),0<Oe.length&&(Ce=new Bp(Ce,t,null,a,ie),ce.push({event:Ce,listeners:Oe}),we?Ce.data=we:(we=Yp(a),we!==null&&(Ce.data=we)))),(we=UN?PN(t,a):$N(t,a))&&(Ce=Jl(te,"onBeforeInput"),0<Ce.length&&(Oe=new Bp("onBeforeInput","beforeinput",null,a,ie),ce.push({event:Oe,listeners:Ce}),Oe.data=we)),RE(ce,t,te,a,ie)}C0(ce,n)})}function Qs(t,n,a){return{instance:t,listener:n,currentTarget:a}}function Jl(t,n){for(var a=n+"Capture",l=[];t!==null;){var h=t,x=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||x===null||(h=ps(t,a),h!=null&&l.unshift(Qs(t,h,x)),h=ps(t,n),h!=null&&l.push(Qs(t,h,x))),t.tag===3)return l;t=t.return}return[]}function wa(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function A0(t,n,a,l,h){for(var x=n._reactName,_=[];a!==null&&a!==l;){var k=a,$=k.alternate,te=k.stateNode;if(k=k.tag,$!==null&&$===l)break;k!==5&&k!==26&&k!==27||te===null||($=te,h?(te=ps(a,x),te!=null&&_.unshift(Qs(a,te,$))):h||(te=ps(a,x),te!=null&&_.push(Qs(a,te,$)))),a=a.return}_.length!==0&&t.push({event:n,listeners:_})}var LE=/\r\n?/g,HE=/\u0000|\uFFFD/g;function M0(t){return(typeof t=="string"?t:""+t).replace(LE,`
|
|
49
|
+
`).replace(HE,"")}function T0(t,n){return n=M0(n),M0(t)===n}function ec(){}function Ge(t,n,a,l,h,x){switch(a){case"children":typeof l=="string"?n==="body"||n==="textarea"&&l===""||Xo(t,l):(typeof l=="number"||typeof l=="bigint")&&n!=="body"&&Xo(t,""+l);break;case"className":Yo(t,"class",l);break;case"tabIndex":Yo(t,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Yo(t,a,l);break;case"style":Rp(t,l,x);break;case"data":if(n!=="object"){Yo(t,"data",l);break}case"src":case"href":if(l===""&&(n!=="a"||a!=="href")){t.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(a);break}l=ll(""+l),t.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){t.setAttribute(a,"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 x=="function"&&(a==="formAction"?(n!=="input"&&Ge(t,n,"name",h.name,h,null),Ge(t,n,"formEncType",h.formEncType,h,null),Ge(t,n,"formMethod",h.formMethod,h,null),Ge(t,n,"formTarget",h.formTarget,h,null)):(Ge(t,n,"encType",h.encType,h,null),Ge(t,n,"method",h.method,h,null),Ge(t,n,"target",h.target,h,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(a);break}l=ll(""+l),t.setAttribute(a,l);break;case"onClick":l!=null&&(t.onclick=ec);break;case"onScroll":l!=null&&Le("scroll",t);break;case"onScrollEnd":l!=null&&Le("scrollend",t);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(a=l.__html,a!=null){if(h.children!=null)throw Error(s(60));t.innerHTML=a}}break;case"multiple":t.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":t.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){t.removeAttribute("xlink:href");break}a=ll(""+l),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(a,""+l):t.removeAttribute(a);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":l&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(a,""):t.removeAttribute(a);break;case"capture":case"download":l===!0?t.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(a,l):t.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?t.setAttribute(a,l):t.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?t.removeAttribute(a):t.setAttribute(a,l);break;case"popover":Le("beforetoggle",t),Le("toggle",t),Vo(t,"popover",l);break;case"xlinkActuate":dn(t,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":dn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":dn(t,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":dn(t,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":dn(t,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":dn(t,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":dn(t,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":dn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":dn(t,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Vo(t,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=hN.get(a)||a,Vo(t,a,l))}}function Yf(t,n,a,l,h,x){switch(a){case"style":Rp(t,l,x);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(a=l.__html,a!=null){if(h.children!=null)throw Error(s(60));t.innerHTML=a}}break;case"children":typeof l=="string"?Xo(t,l):(typeof l=="number"||typeof l=="bigint")&&Xo(t,""+l);break;case"onScroll":l!=null&&Le("scroll",t);break;case"onScrollEnd":l!=null&&Le("scrollend",t);break;case"onClick":l!=null&&(t.onclick=ec);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!nl.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(h=a.endsWith("Capture"),n=a.slice(2,h?a.length-7:void 0),x=t[Nt]||null,x=x!=null?x[a]:null,typeof x=="function"&&t.removeEventListener(n,x,h),typeof l=="function")){typeof x!="function"&&x!==null&&(a in t?t[a]=null:t.hasAttribute(a)&&t.removeAttribute(a)),t.addEventListener(n,l,h);break e}a in t?t[a]=l:l===!0?t.setAttribute(a,""):Vo(t,a,l)}}}function bt(t,n,a){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Le("error",t),Le("load",t);var l=!1,h=!1,x;for(x in a)if(a.hasOwnProperty(x)){var _=a[x];if(_!=null)switch(x){case"src":l=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,n));default:Ge(t,n,x,_,a,null)}}h&&Ge(t,n,"srcSet",a.srcSet,a,null),l&&Ge(t,n,"src",a.src,a,null);return;case"input":Le("invalid",t);var k=x=_=h=null,$=null,te=null;for(l in a)if(a.hasOwnProperty(l)){var ie=a[l];if(ie!=null)switch(l){case"name":h=ie;break;case"type":_=ie;break;case"checked":$=ie;break;case"defaultChecked":te=ie;break;case"value":x=ie;break;case"defaultValue":k=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(s(137,n));break;default:Ge(t,n,l,ie,a,null)}}il(t,x,k,$,te,_,h,!1),qo(t);return;case"select":Le("invalid",t),l=_=x=null;for(h in a)if(a.hasOwnProperty(h)&&(k=a[h],k!=null))switch(h){case"value":x=k;break;case"defaultValue":_=k;break;case"multiple":l=k;default:Ge(t,n,h,k,a,null)}n=x,a=_,t.multiple=!!l,n!=null?Gn(t,!!l,n,!1):a!=null&&Gn(t,!!l,a,!0);return;case"textarea":Le("invalid",t),x=h=l=null;for(_ in a)if(a.hasOwnProperty(_)&&(k=a[_],k!=null))switch(_){case"value":l=k;break;case"defaultValue":h=k;break;case"children":x=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(s(91));break;default:Ge(t,n,_,k,a,null)}Tp(t,l,h,x),qo(t);return;case"option":for($ in a)if(a.hasOwnProperty($)&&(l=a[$],l!=null))switch($){case"selected":t.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Ge(t,n,$,l,a,null)}return;case"dialog":Le("beforetoggle",t),Le("toggle",t),Le("cancel",t),Le("close",t);break;case"iframe":case"object":Le("load",t);break;case"video":case"audio":for(l=0;l<Ks.length;l++)Le(Ks[l],t);break;case"image":Le("error",t),Le("load",t);break;case"details":Le("toggle",t);break;case"embed":case"source":case"link":Le("error",t),Le("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(te in a)if(a.hasOwnProperty(te)&&(l=a[te],l!=null))switch(te){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,n));default:Ge(t,n,te,l,a,null)}return;default:if(ad(n)){for(ie in a)a.hasOwnProperty(ie)&&(l=a[ie],l!==void 0&&Yf(t,n,ie,l,a,void 0));return}}for(k in a)a.hasOwnProperty(k)&&(l=a[k],l!=null&&Ge(t,n,k,l,a,null))}function BE(t,n,a,l){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,x=null,_=null,k=null,$=null,te=null,ie=null;for(ae in a){var ce=a[ae];if(a.hasOwnProperty(ae)&&ce!=null)switch(ae){case"checked":break;case"value":break;case"defaultValue":$=ce;default:l.hasOwnProperty(ae)||Ge(t,n,ae,null,l,ce)}}for(var oe in l){var ae=l[oe];if(ce=a[oe],l.hasOwnProperty(oe)&&(ae!=null||ce!=null))switch(oe){case"type":x=ae;break;case"name":h=ae;break;case"checked":te=ae;break;case"defaultChecked":ie=ae;break;case"value":_=ae;break;case"defaultValue":k=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(s(137,n));break;default:ae!==ce&&Ge(t,n,oe,ae,l,ce)}}io(t,_,k,$,te,ie,x,h);return;case"select":ae=_=k=oe=null;for(x in a)if($=a[x],a.hasOwnProperty(x)&&$!=null)switch(x){case"value":break;case"multiple":ae=$;default:l.hasOwnProperty(x)||Ge(t,n,x,null,l,$)}for(h in l)if(x=l[h],$=a[h],l.hasOwnProperty(h)&&(x!=null||$!=null))switch(h){case"value":oe=x;break;case"defaultValue":k=x;break;case"multiple":_=x;default:x!==$&&Ge(t,n,h,x,l,$)}n=k,a=_,l=ae,oe!=null?Gn(t,!!a,oe,!1):!!l!=!!a&&(n!=null?Gn(t,!!a,n,!0):Gn(t,!!a,a?[]:"",!1));return;case"textarea":ae=oe=null;for(k in a)if(h=a[k],a.hasOwnProperty(k)&&h!=null&&!l.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:Ge(t,n,k,null,l,h)}for(_ in l)if(h=l[_],x=a[_],l.hasOwnProperty(_)&&(h!=null||x!=null))switch(_){case"value":oe=h;break;case"defaultValue":ae=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(s(91));break;default:h!==x&&Ge(t,n,_,h,l,x)}Mp(t,oe,ae);return;case"option":for(var je in a)if(oe=a[je],a.hasOwnProperty(je)&&oe!=null&&!l.hasOwnProperty(je))switch(je){case"selected":t.selected=!1;break;default:Ge(t,n,je,null,l,oe)}for($ in l)if(oe=l[$],ae=a[$],l.hasOwnProperty($)&&oe!==ae&&(oe!=null||ae!=null))switch($){case"selected":t.selected=oe&&typeof oe!="function"&&typeof oe!="symbol";break;default:Ge(t,n,$,oe,l,ae)}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 _e in a)oe=a[_e],a.hasOwnProperty(_e)&&oe!=null&&!l.hasOwnProperty(_e)&&Ge(t,n,_e,null,l,oe);for(te in l)if(oe=l[te],ae=a[te],l.hasOwnProperty(te)&&oe!==ae&&(oe!=null||ae!=null))switch(te){case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(s(137,n));break;default:Ge(t,n,te,oe,l,ae)}return;default:if(ad(n)){for(var Xe in a)oe=a[Xe],a.hasOwnProperty(Xe)&&oe!==void 0&&!l.hasOwnProperty(Xe)&&Yf(t,n,Xe,void 0,l,oe);for(ie in l)oe=l[ie],ae=a[ie],!l.hasOwnProperty(ie)||oe===ae||oe===void 0&&ae===void 0||Yf(t,n,ie,oe,l,ae);return}}for(var F in a)oe=a[F],a.hasOwnProperty(F)&&oe!=null&&!l.hasOwnProperty(F)&&Ge(t,n,F,null,l,oe);for(ce in l)oe=l[ce],ae=a[ce],!l.hasOwnProperty(ce)||oe===ae||oe==null&&ae==null||Ge(t,n,ce,oe,l,ae)}var qf=null,Gf=null;function tc(t){return t.nodeType===9?t:t.ownerDocument}function k0(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function R0(t,n){if(t===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&n==="foreignObject"?0:t}function Xf(t,n){return t==="textarea"||t==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Ff=null;function IE(){var t=window.event;return t&&t.type==="popstate"?t===Ff?!1:(Ff=t,!0):(Ff=null,!1)}var D0=typeof setTimeout=="function"?setTimeout:void 0,UE=typeof clearTimeout=="function"?clearTimeout:void 0,O0=typeof Promise=="function"?Promise:void 0,PE=typeof queueMicrotask=="function"?queueMicrotask:typeof O0<"u"?function(t){return O0.resolve(null).then(t).catch($E)}:D0;function $E(t){setTimeout(function(){throw t})}function Br(t){return t==="head"}function z0(t,n){var a=n,l=0,h=0;do{var x=a.nextSibling;if(t.removeChild(a),x&&x.nodeType===8)if(a=x.data,a==="/$"){if(0<l&&8>l){a=l;var _=t.ownerDocument;if(a&1&&Ws(_.documentElement),a&2&&Ws(_.body),a&4)for(a=_.head,Ws(a),_=a.firstChild;_;){var k=_.nextSibling,$=_.nodeName;_[so]||$==="SCRIPT"||$==="STYLE"||$==="LINK"&&_.rel.toLowerCase()==="stylesheet"||a.removeChild(_),_=k}}if(h===0){t.removeChild(x),si(n);return}h--}else a==="$"||a==="$?"||a==="$!"?h++:l=a.charCodeAt(0)-48;else l=0;a=x}while(a);si(n)}function Zf(t){var n=t.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var a=n;switch(n=n.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Zf(a),ls(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}t.removeChild(a)}}function VE(t,n,a,l){for(;t.nodeType===1;){var h=a;if(t.nodeName.toLowerCase()!==n.toLowerCase()){if(!l&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(l){if(!t[so])switch(n){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(x=t.getAttribute("rel"),x==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(x!==h.rel||t.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||t.getAttribute("title")!==(h.title==null?null:h.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(x=t.getAttribute("src"),(x!==(h.src==null?null:h.src)||t.getAttribute("type")!==(h.type==null?null:h.type)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&x&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(n==="input"&&t.type==="hidden"){var x=h.name==null?null:""+h.name;if(h.type==="hidden"&&t.getAttribute("name")===x)return t}else return t;if(t=mn(t.nextSibling),t===null)break}return null}function YE(t,n,a){if(n==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=mn(t.nextSibling),t===null))return null;return t}function Kf(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState==="complete"}function qE(t,n){var a=t.ownerDocument;if(t.data!=="$?"||a.readyState==="complete")n();else{var l=function(){n(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),t._reactRetry=l}}function mn(t){for(;t!=null;t=t.nextSibling){var n=t.nodeType;if(n===1||n===3)break;if(n===8){if(n=t.data,n==="$"||n==="$!"||n==="$?"||n==="F!"||n==="F")break;if(n==="/$")return null}}return t}var Qf=null;function L0(t){t=t.previousSibling;for(var n=0;t;){if(t.nodeType===8){var a=t.data;if(a==="$"||a==="$!"||a==="$?"){if(n===0)return t;n--}else a==="/$"&&n++}t=t.previousSibling}return null}function H0(t,n,a){switch(n=tc(a),t){case"html":if(t=n.documentElement,!t)throw Error(s(452));return t;case"head":if(t=n.head,!t)throw Error(s(453));return t;case"body":if(t=n.body,!t)throw Error(s(454));return t;default:throw Error(s(451))}}function Ws(t){for(var n=t.attributes;n.length;)t.removeAttributeNode(n[0]);ls(t)}var on=new Map,B0=new Set;function nc(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var sr=z.d;z.d={f:GE,r:XE,D:FE,C:ZE,L:KE,m:QE,X:JE,S:WE,M:e_};function GE(){var t=sr.f(),n=Xl();return t||n}function XE(t){var n=$n(t);n!==null&&n.tag===5&&n.type==="form"?ox(n):sr.r(t)}var Sa=typeof document>"u"?null:document;function I0(t,n,a){var l=Sa;if(l&&typeof n=="string"&&n){var h=Dt(n);h='link[rel="'+t+'"][href="'+h+'"]',typeof a=="string"&&(h+='[crossorigin="'+a+'"]'),B0.has(h)||(B0.add(h),t={rel:t,crossOrigin:a,href:n},l.querySelector(h)===null&&(n=l.createElement("link"),bt(n,"link",t),at(n),l.head.appendChild(n)))}}function FE(t){sr.D(t),I0("dns-prefetch",t,null)}function ZE(t,n){sr.C(t,n),I0("preconnect",t,n)}function KE(t,n,a){sr.L(t,n,a);var l=Sa;if(l&&t&&n){var h='link[rel="preload"][as="'+Dt(n)+'"]';n==="image"&&a&&a.imageSrcSet?(h+='[imagesrcset="'+Dt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(h+='[imagesizes="'+Dt(a.imageSizes)+'"]')):h+='[href="'+Dt(t)+'"]';var x=h;switch(n){case"style":x=Na(t);break;case"script":x=Ea(t)}on.has(x)||(t=g({rel:"preload",href:n==="image"&&a&&a.imageSrcSet?void 0:t,as:n},a),on.set(x,t),l.querySelector(h)!==null||n==="style"&&l.querySelector(Js(x))||n==="script"&&l.querySelector(ei(x))||(n=l.createElement("link"),bt(n,"link",t),at(n),l.head.appendChild(n)))}}function QE(t,n){sr.m(t,n);var a=Sa;if(a&&t){var l=n&&typeof n.as=="string"?n.as:"script",h='link[rel="modulepreload"][as="'+Dt(l)+'"][href="'+Dt(t)+'"]',x=h;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":x=Ea(t)}if(!on.has(x)&&(t=g({rel:"modulepreload",href:t},n),on.set(x,t),a.querySelector(h)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(ei(x)))return}l=a.createElement("link"),bt(l,"link",t),at(l),a.head.appendChild(l)}}}function WE(t,n,a){sr.S(t,n,a);var l=Sa;if(l&&t){var h=Vn(l).hoistableStyles,x=Na(t);n=n||"default";var _=h.get(x);if(!_){var k={loading:0,preload:null};if(_=l.querySelector(Js(x)))k.loading=5;else{t=g({rel:"stylesheet",href:t,"data-precedence":n},a),(a=on.get(x))&&Wf(t,a);var $=_=l.createElement("link");at($),bt($,"link",t),$._p=new Promise(function(te,ie){$.onload=te,$.onerror=ie}),$.addEventListener("load",function(){k.loading|=1}),$.addEventListener("error",function(){k.loading|=2}),k.loading|=4,rc(_,n,l)}_={type:"stylesheet",instance:_,count:1,state:k},h.set(x,_)}}}function JE(t,n){sr.X(t,n);var a=Sa;if(a&&t){var l=Vn(a).hoistableScripts,h=Ea(t),x=l.get(h);x||(x=a.querySelector(ei(h)),x||(t=g({src:t,async:!0},n),(n=on.get(h))&&Jf(t,n),x=a.createElement("script"),at(x),bt(x,"link",t),a.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},l.set(h,x))}}function e_(t,n){sr.M(t,n);var a=Sa;if(a&&t){var l=Vn(a).hoistableScripts,h=Ea(t),x=l.get(h);x||(x=a.querySelector(ei(h)),x||(t=g({src:t,async:!0,type:"module"},n),(n=on.get(h))&&Jf(t,n),x=a.createElement("script"),at(x),bt(x,"link",t),a.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},l.set(h,x))}}function U0(t,n,a,l){var h=(h=ue.current)?nc(h):null;if(!h)throw Error(s(446));switch(t){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(n=Na(a.href),a=Vn(h).hoistableStyles,l=a.get(n),l||(l={type:"style",instance:null,count:0,state:null},a.set(n,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){t=Na(a.href);var x=Vn(h).hoistableStyles,_=x.get(t);if(_||(h=h.ownerDocument||h,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},x.set(t,_),(x=h.querySelector(Js(t)))&&!x._p&&(_.instance=x,_.state.loading=5),on.has(t)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},on.set(t,a),x||t_(h,t,a,_.state))),n&&l===null)throw Error(s(528,""));return _}if(n&&l!==null)throw Error(s(529,""));return null;case"script":return n=a.async,a=a.src,typeof a=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=Ea(a),a=Vn(h).hoistableScripts,l=a.get(n),l||(l={type:"script",instance:null,count:0,state:null},a.set(n,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,t))}}function Na(t){return'href="'+Dt(t)+'"'}function Js(t){return'link[rel="stylesheet"]['+t+"]"}function P0(t){return g({},t,{"data-precedence":t.precedence,precedence:null})}function t_(t,n,a,l){t.querySelector('link[rel="preload"][as="style"]['+n+"]")?l.loading=1:(n=t.createElement("link"),l.preload=n,n.addEventListener("load",function(){return l.loading|=1}),n.addEventListener("error",function(){return l.loading|=2}),bt(n,"link",a),at(n),t.head.appendChild(n))}function Ea(t){return'[src="'+Dt(t)+'"]'}function ei(t){return"script[async]"+t}function $0(t,n,a){if(n.count++,n.instance===null)switch(n.type){case"style":var l=t.querySelector('style[data-href~="'+Dt(a.href)+'"]');if(l)return n.instance=l,at(l),l;var h=g({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(t.ownerDocument||t).createElement("style"),at(l),bt(l,"style",h),rc(l,a.precedence,t),n.instance=l;case"stylesheet":h=Na(a.href);var x=t.querySelector(Js(h));if(x)return n.state.loading|=4,n.instance=x,at(x),x;l=P0(a),(h=on.get(h))&&Wf(l,h),x=(t.ownerDocument||t).createElement("link"),at(x);var _=x;return _._p=new Promise(function(k,$){_.onload=k,_.onerror=$}),bt(x,"link",l),n.state.loading|=4,rc(x,a.precedence,t),n.instance=x;case"script":return x=Ea(a.src),(h=t.querySelector(ei(x)))?(n.instance=h,at(h),h):(l=a,(h=on.get(x))&&(l=g({},a),Jf(l,h)),t=t.ownerDocument||t,h=t.createElement("script"),at(h),bt(h,"link",l),t.head.appendChild(h),n.instance=h);case"void":return null;default:throw Error(s(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(l=n.instance,n.state.loading|=4,rc(l,a.precedence,t));return n.instance}function rc(t,n,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=l.length?l[l.length-1]:null,x=h,_=0;_<l.length;_++){var k=l[_];if(k.dataset.precedence===n)x=k;else if(x!==h)break}x?x.parentNode.insertBefore(t,x.nextSibling):(n=a.nodeType===9?a.head:a,n.insertBefore(t,n.firstChild))}function Wf(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.title==null&&(t.title=n.title)}function Jf(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.integrity==null&&(t.integrity=n.integrity)}var oc=null;function V0(t,n,a){if(oc===null){var l=new Map,h=oc=new Map;h.set(a,l)}else h=oc,l=h.get(a),l||(l=new Map,h.set(a,l));if(l.has(t))return l;for(l.set(t,null),a=a.getElementsByTagName(t),h=0;h<a.length;h++){var x=a[h];if(!(x[so]||x[mt]||t==="link"&&x.getAttribute("rel")==="stylesheet")&&x.namespaceURI!=="http://www.w3.org/2000/svg"){var _=x.getAttribute(n)||"";_=t+_;var k=l.get(_);k?k.push(x):l.set(_,[x])}}return l}function Y0(t,n,a){t=t.ownerDocument||t,t.head.insertBefore(a,n==="title"?t.querySelector("head > title"):null)}function n_(t,n,a){if(a===1||n.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;switch(n.rel){case"stylesheet":return t=n.disabled,typeof n.precedence=="string"&&t==null;default:return!0}case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function q0(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}var ti=null;function r_(){}function o_(t,n,a){if(ti===null)throw Error(s(475));var l=ti;if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var h=Na(a.href),x=t.querySelector(Js(h));if(x){t=x._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(l.count++,l=ac.bind(l),t.then(l,l)),n.state.loading|=4,n.instance=x,at(x);return}x=t.ownerDocument||t,a=P0(a),(h=on.get(h))&&Wf(a,h),x=x.createElement("link"),at(x);var _=x;_._p=new Promise(function(k,$){_.onload=k,_.onerror=$}),bt(x,"link",a),n.instance=x}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(l.count++,n=ac.bind(l),t.addEventListener("load",n),t.addEventListener("error",n))}}function a_(){if(ti===null)throw Error(s(475));var t=ti;return t.stylesheets&&t.count===0&&eh(t,t.stylesheets),0<t.count?function(n){var a=setTimeout(function(){if(t.stylesheets&&eh(t,t.stylesheets),t.unsuspend){var l=t.unsuspend;t.unsuspend=null,l()}},6e4);return t.unsuspend=n,function(){t.unsuspend=null,clearTimeout(a)}}:null}function ac(){if(this.count--,this.count===0){if(this.stylesheets)eh(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var sc=null;function eh(t,n){t.stylesheets=null,t.unsuspend!==null&&(t.count++,sc=new Map,n.forEach(s_,t),sc=null,ac.call(t))}function s_(t,n){if(!(n.state.loading&4)){var a=sc.get(t);if(a)var l=a.get(null);else{a=new Map,sc.set(t,a);for(var h=t.querySelectorAll("link[data-precedence],style[data-precedence]"),x=0;x<h.length;x++){var _=h[x];(_.nodeName==="LINK"||_.getAttribute("media")!=="not all")&&(a.set(_.dataset.precedence,_),l=_)}l&&a.set(null,l)}h=n.instance,_=h.getAttribute("data-precedence"),x=a.get(_)||l,x===l&&a.set(null,h),a.set(_,h),this.count++,l=ac.bind(this),h.addEventListener("load",l),h.addEventListener("error",l),x?x.parentNode.insertBefore(h,x.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(h,t.firstChild)),n.state.loading|=4}}var ni={$$typeof:E,Provider:null,Consumer:null,_currentValue:H,_currentValue2:H,_threadCount:0};function i_(t,n,a,l,h,x,_,k){this.tag=1,this.containerInfo=t,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=rs(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rs(0),this.hiddenUpdates=rs(null),this.identifierPrefix=l,this.onUncaughtError=h,this.onCaughtError=x,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=k,this.incompleteTransitions=new Map}function G0(t,n,a,l,h,x,_,k,$,te,ie,ce){return t=new i_(t,n,a,_,k,$,te,ce),n=1,x===!0&&(n|=24),x=Pt(3,null,null,n),t.current=x,x.stateNode=t,n=Od(),n.refCount++,t.pooledCache=n,n.refCount++,x.memoizedState={element:l,isDehydrated:a,cache:n},Bd(x),t}function X0(t){return t?(t=ta,t):ta}function F0(t,n,a,l,h,x){h=X0(h),l.context===null?l.context=h:l.pendingContext=h,l=_r(n),l.payload={element:a},x=x===void 0?null:x,x!==null&&(l.callback=x),a=Cr(t,l,n),a!==null&&(Gt(a,t,n),Rs(a,t,n))}function Z0(t,n){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var a=t.retryLane;t.retryLane=a!==0&&a<n?a:n}}function th(t,n){Z0(t,n),(t=t.alternate)&&Z0(t,n)}function K0(t){if(t.tag===13){var n=ea(t,67108864);n!==null&&Gt(n,t,67108864),th(t,67108864)}}var ic=!0;function l_(t,n,a,l){var h=T.T;T.T=null;var x=z.p;try{z.p=2,nh(t,n,a,l)}finally{z.p=x,T.T=h}}function c_(t,n,a,l){var h=T.T;T.T=null;var x=z.p;try{z.p=8,nh(t,n,a,l)}finally{z.p=x,T.T=h}}function nh(t,n,a,l){if(ic){var h=rh(l);if(h===null)Vf(t,n,l,lc,a),W0(t,l);else if(d_(h,t,n,a,l))l.stopPropagation();else if(W0(t,l),n&4&&-1<u_.indexOf(t)){for(;h!==null;){var x=$n(h);if(x!==null)switch(x.tag){case 3:if(x=x.stateNode,x.current.memoizedState.isDehydrated){var _=Pn(x.pendingLanes);if(_!==0){var k=x;for(k.pendingLanes|=2,k.entangledLanes|=2;_;){var $=1<<31-Ct(_);k.entanglements[1]|=$,_&=~$}Mn(x),(Ve&6)===0&&(ql=Ne()+500,Zs(0))}}break;case 13:k=ea(x,2),k!==null&&Gt(k,x,2),Xl(),th(x,2)}if(x=rh(l),x===null&&Vf(t,n,l,lc,a),x===h)break;h=x}h!==null&&l.stopPropagation()}else Vf(t,n,l,null,a)}}function rh(t){return t=id(t),oh(t)}var lc=null;function oh(t){if(lc=null,t=vr(t),t!==null){var n=c(t);if(n===null)t=null;else{var a=n.tag;if(a===13){if(t=d(n),t!==null)return t;t=null}else if(a===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;t=null}else n!==t&&(t=null)}}return lc=t,null}function Q0(t){switch(t){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(ct()){case Tt:return 2;case kt:return 8;case cn:case ro:return 32;case xr:return 268435456;default:return 32}default:return 32}}var ah=!1,Ir=null,Ur=null,Pr=null,ri=new Map,oi=new Map,$r=[],u_="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 W0(t,n){switch(t){case"focusin":case"focusout":Ir=null;break;case"dragenter":case"dragleave":Ur=null;break;case"mouseover":case"mouseout":Pr=null;break;case"pointerover":case"pointerout":ri.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":oi.delete(n.pointerId)}}function ai(t,n,a,l,h,x){return t===null||t.nativeEvent!==x?(t={blockedOn:n,domEventName:a,eventSystemFlags:l,nativeEvent:x,targetContainers:[h]},n!==null&&(n=$n(n),n!==null&&K0(n)),t):(t.eventSystemFlags|=l,n=t.targetContainers,h!==null&&n.indexOf(h)===-1&&n.push(h),t)}function d_(t,n,a,l,h){switch(n){case"focusin":return Ir=ai(Ir,t,n,a,l,h),!0;case"dragenter":return Ur=ai(Ur,t,n,a,l,h),!0;case"mouseover":return Pr=ai(Pr,t,n,a,l,h),!0;case"pointerover":var x=h.pointerId;return ri.set(x,ai(ri.get(x)||null,t,n,a,l,h)),!0;case"gotpointercapture":return x=h.pointerId,oi.set(x,ai(oi.get(x)||null,t,n,a,l,h)),!0}return!1}function J0(t){var n=vr(t.target);if(n!==null){var a=c(n);if(a!==null){if(n=a.tag,n===13){if(n=d(a),n!==null){t.blockedOn=n,Qu(t.priority,function(){if(a.tag===13){var l=qt();l=as(l);var h=ea(a,l);h!==null&&Gt(h,a,l),th(a,l)}});return}}else if(n===3&&a.stateNode.current.memoizedState.isDehydrated){t.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}t.blockedOn=null}function cc(t){if(t.blockedOn!==null)return!1;for(var n=t.targetContainers;0<n.length;){var a=rh(t.nativeEvent);if(a===null){a=t.nativeEvent;var l=new a.constructor(a.type,a);sd=l,a.target.dispatchEvent(l),sd=null}else return n=$n(a),n!==null&&K0(n),t.blockedOn=a,!1;n.shift()}return!0}function ey(t,n,a){cc(t)&&a.delete(n)}function f_(){ah=!1,Ir!==null&&cc(Ir)&&(Ir=null),Ur!==null&&cc(Ur)&&(Ur=null),Pr!==null&&cc(Pr)&&(Pr=null),ri.forEach(ey),oi.forEach(ey)}function uc(t,n){t.blockedOn===n&&(t.blockedOn=null,ah||(ah=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,f_)))}var dc=null;function ty(t){dc!==t&&(dc=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){dc===t&&(dc=null);for(var n=0;n<t.length;n+=3){var a=t[n],l=t[n+1],h=t[n+2];if(typeof l!="function"){if(oh(l||a)===null)continue;break}var x=$n(a);x!==null&&(t.splice(n,3),n-=3,rf(x,{pending:!0,data:h,method:a.method,action:l},l,h))}}))}function si(t){function n($){return uc($,t)}Ir!==null&&uc(Ir,t),Ur!==null&&uc(Ur,t),Pr!==null&&uc(Pr,t),ri.forEach(n),oi.forEach(n);for(var a=0;a<$r.length;a++){var l=$r[a];l.blockedOn===t&&(l.blockedOn=null)}for(;0<$r.length&&(a=$r[0],a.blockedOn===null);)J0(a),a.blockedOn===null&&$r.shift();if(a=(t.ownerDocument||t).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var h=a[l],x=a[l+1],_=h[Nt]||null;if(typeof x=="function")_||ty(a);else if(_){var k=null;if(x&&x.hasAttribute("formAction")){if(h=x,_=x[Nt]||null)k=_.formAction;else if(oh(h)!==null)continue}else k=_.action;typeof k=="function"?a[l+1]=k:(a.splice(l,3),l-=3),ty(a)}}}function sh(t){this._internalRoot=t}fc.prototype.render=sh.prototype.render=function(t){var n=this._internalRoot;if(n===null)throw Error(s(409));var a=n.current,l=qt();F0(a,l,t,n,null,null)},fc.prototype.unmount=sh.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var n=t.containerInfo;F0(t.current,2,null,t,null,null),Xl(),n[yr]=null}};function fc(t){this._internalRoot=t}fc.prototype.unstable_scheduleHydration=function(t){if(t){var n=Ji();t={blockedOn:null,target:t,priority:n};for(var a=0;a<$r.length&&n!==0&&n<$r[a].priority;a++);$r.splice(a,0,t),a===0&&J0(t)}};var ny=r.version;if(ny!=="19.1.1")throw Error(s(527,ny,"19.1.1"));z.findDOMNode=function(t){var n=t._reactInternals;if(n===void 0)throw typeof t.render=="function"?Error(s(188)):(t=Object.keys(t).join(","),Error(s(268,t)));return t=m(n),t=t!==null?p(t):null,t=t===null?null:t.stateNode,t};var h_={bundleType:0,version:"19.1.1",rendererPackageName:"react-dom",currentDispatcherRef:T,reconcilerVersion:"19.1.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var hc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!hc.isDisabled&&hc.supportsFiber)try{Qt=hc.inject(h_),ut=hc}catch{}}return li.createRoot=function(t,n){if(!i(t))throw Error(s(299));var a=!1,l="",h=yx,x=vx,_=bx,k=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onUncaughtError!==void 0&&(h=n.onUncaughtError),n.onCaughtError!==void 0&&(x=n.onCaughtError),n.onRecoverableError!==void 0&&(_=n.onRecoverableError),n.unstable_transitionCallbacks!==void 0&&(k=n.unstable_transitionCallbacks)),n=G0(t,1,!1,null,null,a,l,h,x,_,k,null),t[yr]=n.current,$f(t),new sh(n)},li.hydrateRoot=function(t,n,a){if(!i(t))throw Error(s(299));var l=!1,h="",x=yx,_=vx,k=bx,$=null,te=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(h=a.identifierPrefix),a.onUncaughtError!==void 0&&(x=a.onUncaughtError),a.onCaughtError!==void 0&&(_=a.onCaughtError),a.onRecoverableError!==void 0&&(k=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&($=a.unstable_transitionCallbacks),a.formState!==void 0&&(te=a.formState)),n=G0(t,1,!0,n,a??null,l,h,x,_,k,$,te),n.context=X0(null),a=n.current,l=qt(),l=as(l),h=_r(l),h.callback=null,Cr(a,h,l),a=l,n.current.lanes=a,ao(n,a),Mn(n),t[yr]=n.current,$f(t),new fc(n)},li.version="19.1.1",li}var fy;function N_(){if(fy)return ch.exports;fy=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(r){console.error(r)}}return e(),ch.exports=S_(),ch.exports}var E_=N_();function hy(e,r){if(typeof e=="function")return e(r);e!=null&&(e.current=r)}function pu(...e){return r=>{let o=!1;const s=e.map(i=>{const c=hy(i,r);return!o&&typeof c=="function"&&(o=!0),c});if(o)return()=>{for(let i=0;i<s.length;i++){const c=s[i];typeof c=="function"?c():hy(e[i],null)}}}}function Pe(...e){return w.useCallback(pu(...e),e)}function La(e){const r=C_(e),o=w.forwardRef((s,i)=>{const{children:c,...d}=s,f=w.Children.toArray(c),m=f.find(A_);if(m){const p=m.props.children,g=f.map(v=>v===m?w.Children.count(p)>1?w.Children.only(null):w.isValidElement(p)?p.props.children:null:v);return u.jsx(r,{...d,ref:i,children:w.isValidElement(p)?w.cloneElement(p,void 0,g):null})}return u.jsx(r,{...d,ref:i,children:c})});return o.displayName=`${e}.Slot`,o}var __=La("Slot");function C_(e){const r=w.forwardRef((o,s)=>{const{children:i,...c}=o;if(w.isValidElement(i)){const d=T_(i),f=M_(c,i.props);return i.type!==w.Fragment&&(f.ref=s?pu(s,d):d),w.cloneElement(i,f)}return w.Children.count(i)>1?w.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var j_=Symbol("radix.slottable");function A_(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===j_}function M_(e,r){const o={...r};for(const s in r){const i=e[s],c=r[s];/^on[A-Z]/.test(s)?i&&c?o[s]=(...f)=>{const m=c(...f);return i(...f),m}:i&&(o[s]=i):s==="style"?o[s]={...i,...c}:s==="className"&&(o[s]=[i,c].filter(Boolean).join(" "))}return{...e,...o}}function T_(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}function ib(e){var r,o,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(r=0;r<i;r++)e[r]&&(o=ib(e[r]))&&(s&&(s+=" "),s+=o)}else for(o in e)e[o]&&(s&&(s+=" "),s+=o);return s}function lb(){for(var e,r,o=0,s="",i=arguments.length;o<i;o++)(e=arguments[o])&&(r=ib(e))&&(s&&(s+=" "),s+=r);return s}const my=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,py=lb,cb=(e,r)=>o=>{var s;if(r?.variants==null)return py(e,o?.class,o?.className);const{variants:i,defaultVariants:c}=r,d=Object.keys(i).map(p=>{const g=o?.[p],v=c?.[p];if(g===null)return null;const y=my(g)||my(v);return i[p][y]}),f=o&&Object.entries(o).reduce((p,g)=>{let[v,y]=g;return y===void 0||(p[v]=y),p},{}),m=r==null||(s=r.compoundVariants)===null||s===void 0?void 0:s.reduce((p,g)=>{let{class:v,className:y,...b}=g;return Object.entries(b).every(N=>{let[S,C]=N;return Array.isArray(C)?C.includes({...c,...f}[S]):{...c,...f}[S]===C})?[...p,v,y]:p},[]);return py(e,d,m,o?.class,o?.className)},Em="-",k_=e=>{const r=D_(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:d=>{const f=d.split(Em);return f[0]===""&&f.length!==1&&f.shift(),ub(f,r)||R_(d)},getConflictingClassGroupIds:(d,f)=>{const m=o[d]||[];return f&&s[d]?[...m,...s[d]]:m}}},ub=(e,r)=>{if(e.length===0)return r.classGroupId;const o=e[0],s=r.nextPart.get(o),i=s?ub(e.slice(1),s):void 0;if(i)return i;if(r.validators.length===0)return;const c=e.join(Em);return r.validators.find(({validator:d})=>d(c))?.classGroupId},gy=/^\[(.+)\]$/,R_=e=>{if(gy.test(e)){const r=gy.exec(e)[1],o=r?.substring(0,r.indexOf(":"));if(o)return"arbitrary.."+o}},D_=e=>{const{theme:r,classGroups:o}=e,s={nextPart:new Map,validators:[]};for(const i in o)Ph(o[i],s,i,r);return s},Ph=(e,r,o,s)=>{e.forEach(i=>{if(typeof i=="string"){const c=i===""?r:xy(r,i);c.classGroupId=o;return}if(typeof i=="function"){if(O_(i)){Ph(i(s),r,o,s);return}r.validators.push({validator:i,classGroupId:o});return}Object.entries(i).forEach(([c,d])=>{Ph(d,xy(r,c),o,s)})})},xy=(e,r)=>{let o=e;return r.split(Em).forEach(s=>{o.nextPart.has(s)||o.nextPart.set(s,{nextPart:new Map,validators:[]}),o=o.nextPart.get(s)}),o},O_=e=>e.isThemeGetter,z_=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,o=new Map,s=new Map;const i=(c,d)=>{o.set(c,d),r++,r>e&&(r=0,s=o,o=new Map)};return{get(c){let d=o.get(c);if(d!==void 0)return d;if((d=s.get(c))!==void 0)return i(c,d),d},set(c,d){o.has(c)?o.set(c,d):i(c,d)}}},$h="!",Vh=":",L_=Vh.length,H_=e=>{const{prefix:r,experimentalParseClassName:o}=e;let s=i=>{const c=[];let d=0,f=0,m=0,p;for(let N=0;N<i.length;N++){let S=i[N];if(d===0&&f===0){if(S===Vh){c.push(i.slice(m,N)),m=N+L_;continue}if(S==="/"){p=N;continue}}S==="["?d++:S==="]"?d--:S==="("?f++:S===")"&&f--}const g=c.length===0?i:i.substring(m),v=B_(g),y=v!==g,b=p&&p>m?p-m:void 0;return{modifiers:c,hasImportantModifier:y,baseClassName:v,maybePostfixModifierPosition:b}};if(r){const i=r+Vh,c=s;s=d=>d.startsWith(i)?c(d.substring(i.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:d,maybePostfixModifierPosition:void 0}}if(o){const i=s;s=c=>o({className:c,parseClassName:i})}return s},B_=e=>e.endsWith($h)?e.substring(0,e.length-1):e.startsWith($h)?e.substring(1):e,I_=e=>{const r=Object.fromEntries(e.orderSensitiveModifiers.map(s=>[s,!0]));return s=>{if(s.length<=1)return s;const i=[];let c=[];return s.forEach(d=>{d[0]==="["||r[d]?(i.push(...c.sort(),d),c=[]):c.push(d)}),i.push(...c.sort()),i}},U_=e=>({cache:z_(e.cacheSize),parseClassName:H_(e),sortModifiers:I_(e),...k_(e)}),P_=/\s+/,$_=(e,r)=>{const{parseClassName:o,getClassGroupId:s,getConflictingClassGroupIds:i,sortModifiers:c}=r,d=[],f=e.trim().split(P_);let m="";for(let p=f.length-1;p>=0;p-=1){const g=f[p],{isExternal:v,modifiers:y,hasImportantModifier:b,baseClassName:N,maybePostfixModifierPosition:S}=o(g);if(v){m=g+(m.length>0?" "+m:m);continue}let C=!!S,j=s(C?N.substring(0,S):N);if(!j){if(!C){m=g+(m.length>0?" "+m:m);continue}if(j=s(N),!j){m=g+(m.length>0?" "+m:m);continue}C=!1}const R=c(y).join(":"),E=b?R+$h:R,A=E+j;if(d.includes(A))continue;d.push(A);const D=i(j,C);for(let L=0;L<D.length;++L){const B=D[L];d.push(E+B)}m=g+(m.length>0?" "+m:m)}return m};function V_(){let e=0,r,o,s="";for(;e<arguments.length;)(r=arguments[e++])&&(o=db(r))&&(s&&(s+=" "),s+=o);return s}const db=e=>{if(typeof e=="string")return e;let r,o="";for(let s=0;s<e.length;s++)e[s]&&(r=db(e[s]))&&(o&&(o+=" "),o+=r);return o};function Y_(e,...r){let o,s,i,c=d;function d(m){const p=r.reduce((g,v)=>v(g),e());return o=U_(p),s=o.cache.get,i=o.cache.set,c=f,f(m)}function f(m){const p=s(m);if(p)return p;const g=$_(m,o);return i(m,g),g}return function(){return c(V_.apply(null,arguments))}}const ht=e=>{const r=o=>o[e]||[];return r.isThemeGetter=!0,r},fb=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,hb=/^\((?:(\w[\w-]*):)?(.+)\)$/i,q_=/^\d+\/\d+$/,G_=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,X_=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,F_=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Z_=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,K_=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_a=e=>q_.test(e),De=e=>!!e&&!Number.isNaN(Number(e)),Yr=e=>!!e&&Number.isInteger(Number(e)),hh=e=>e.endsWith("%")&&De(e.slice(0,-1)),ir=e=>G_.test(e),Q_=()=>!0,W_=e=>X_.test(e)&&!F_.test(e),mb=()=>!1,J_=e=>Z_.test(e),eC=e=>K_.test(e),tC=e=>!ye(e)&&!ve(e),nC=e=>Ka(e,xb,mb),ye=e=>fb.test(e),_o=e=>Ka(e,yb,W_),mh=e=>Ka(e,iC,De),yy=e=>Ka(e,pb,mb),rC=e=>Ka(e,gb,eC),mc=e=>Ka(e,vb,J_),ve=e=>hb.test(e),ci=e=>Qa(e,yb),oC=e=>Qa(e,lC),vy=e=>Qa(e,pb),aC=e=>Qa(e,xb),sC=e=>Qa(e,gb),pc=e=>Qa(e,vb,!0),Ka=(e,r,o)=>{const s=fb.exec(e);return s?s[1]?r(s[1]):o(s[2]):!1},Qa=(e,r,o=!1)=>{const s=hb.exec(e);return s?s[1]?r(s[1]):o:!1},pb=e=>e==="position"||e==="percentage",gb=e=>e==="image"||e==="url",xb=e=>e==="length"||e==="size"||e==="bg-size",yb=e=>e==="length",iC=e=>e==="number",lC=e=>e==="family-name",vb=e=>e==="shadow",cC=()=>{const e=ht("color"),r=ht("font"),o=ht("text"),s=ht("font-weight"),i=ht("tracking"),c=ht("leading"),d=ht("breakpoint"),f=ht("container"),m=ht("spacing"),p=ht("radius"),g=ht("shadow"),v=ht("inset-shadow"),y=ht("text-shadow"),b=ht("drop-shadow"),N=ht("blur"),S=ht("perspective"),C=ht("aspect"),j=ht("ease"),R=ht("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],D=()=>[...A(),ve,ye],L=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto","contain","none"],U=()=>[ve,ye,m],G=()=>[_a,"full","auto",...U()],re=()=>[Yr,"none","subgrid",ve,ye],Z=()=>["auto",{span:["full",Yr,ve,ye]},Yr,ve,ye],Y=()=>[Yr,"auto",ve,ye],ee=()=>["auto","min","max","fr",ve,ye],O=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],P=()=>["start","end","center","stretch","center-safe","end-safe"],T=()=>["auto",...U()],z=()=>[_a,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...U()],H=()=>[e,ve,ye],V=()=>[...A(),vy,yy,{position:[ve,ye]}],M=()=>["no-repeat",{repeat:["","x","y","space","round"]}],I=()=>["auto","cover","contain",aC,nC,{size:[ve,ye]}],W=()=>[hh,ci,_o],K=()=>["","none","full",p,ve,ye],ne=()=>["",De,ci,_o],fe=()=>["solid","dashed","dotted","double"],ue=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],q=()=>[De,hh,vy,yy],Q=()=>["","none",N,ve,ye],se=()=>["none",De,ve,ye],me=()=>["none",De,ve,ye],pe=()=>[De,ve,ye],de=()=>[_a,"full",...U()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ir],breakpoint:[ir],color:[Q_],container:[ir],"drop-shadow":[ir],ease:["in","out","in-out"],font:[tC],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ir],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ir],shadow:[ir],spacing:["px",De],text:[ir],"text-shadow":[ir],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",_a,ye,ve,C]}],container:["container"],columns:[{columns:[De,ye,ve,f]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:D()}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:G()}],"inset-x":[{"inset-x":G()}],"inset-y":[{"inset-y":G()}],start:[{start:G()}],end:[{end:G()}],top:[{top:G()}],right:[{right:G()}],bottom:[{bottom:G()}],left:[{left:G()}],visibility:["visible","invisible","collapse"],z:[{z:[Yr,"auto",ve,ye]}],basis:[{basis:[_a,"full","auto",f,...U()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[De,_a,"auto","initial","none",ye]}],grow:[{grow:["",De,ve,ye]}],shrink:[{shrink:["",De,ve,ye]}],order:[{order:[Yr,"first","last","none",ve,ye]}],"grid-cols":[{"grid-cols":re()}],"col-start-end":[{col:Z()}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":re()}],"row-start-end":[{row:Z()}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ee()}],"auto-rows":[{"auto-rows":ee()}],gap:[{gap:U()}],"gap-x":[{"gap-x":U()}],"gap-y":[{"gap-y":U()}],"justify-content":[{justify:[...O(),"normal"]}],"justify-items":[{"justify-items":[...P(),"normal"]}],"justify-self":[{"justify-self":["auto",...P()]}],"align-content":[{content:["normal",...O()]}],"align-items":[{items:[...P(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...P(),{baseline:["","last"]}]}],"place-content":[{"place-content":O()}],"place-items":[{"place-items":[...P(),"baseline"]}],"place-self":[{"place-self":["auto",...P()]}],p:[{p:U()}],px:[{px:U()}],py:[{py:U()}],ps:[{ps:U()}],pe:[{pe:U()}],pt:[{pt:U()}],pr:[{pr:U()}],pb:[{pb:U()}],pl:[{pl:U()}],m:[{m:T()}],mx:[{mx:T()}],my:[{my:T()}],ms:[{ms:T()}],me:[{me:T()}],mt:[{mt:T()}],mr:[{mr:T()}],mb:[{mb:T()}],ml:[{ml:T()}],"space-x":[{"space-x":U()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":U()}],"space-y-reverse":["space-y-reverse"],size:[{size:z()}],w:[{w:[f,"screen",...z()]}],"min-w":[{"min-w":[f,"screen","none",...z()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[d]},...z()]}],h:[{h:["screen","lh",...z()]}],"min-h":[{"min-h":["screen","lh","none",...z()]}],"max-h":[{"max-h":["screen","lh",...z()]}],"font-size":[{text:["base",o,ci,_o]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,ve,mh]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",hh,ye]}],"font-family":[{font:[oC,ye,r]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,ve,ye]}],"line-clamp":[{"line-clamp":[De,"none",ve,mh]}],leading:[{leading:[c,...U()]}],"list-image":[{"list-image":["none",ve,ye]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ve,ye]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:H()}],"text-color":[{text:H()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...fe(),"wavy"]}],"text-decoration-thickness":[{decoration:[De,"from-font","auto",ve,_o]}],"text-decoration-color":[{decoration:H()}],"underline-offset":[{"underline-offset":[De,"auto",ve,ye]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:U()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ve,ye]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ve,ye]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:V()}],"bg-repeat":[{bg:M()}],"bg-size":[{bg:I()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Yr,ve,ye],radial:["",ve,ye],conic:[Yr,ve,ye]},sC,rC]}],"bg-color":[{bg:H()}],"gradient-from-pos":[{from:W()}],"gradient-via-pos":[{via:W()}],"gradient-to-pos":[{to:W()}],"gradient-from":[{from:H()}],"gradient-via":[{via:H()}],"gradient-to":[{to:H()}],rounded:[{rounded:K()}],"rounded-s":[{"rounded-s":K()}],"rounded-e":[{"rounded-e":K()}],"rounded-t":[{"rounded-t":K()}],"rounded-r":[{"rounded-r":K()}],"rounded-b":[{"rounded-b":K()}],"rounded-l":[{"rounded-l":K()}],"rounded-ss":[{"rounded-ss":K()}],"rounded-se":[{"rounded-se":K()}],"rounded-ee":[{"rounded-ee":K()}],"rounded-es":[{"rounded-es":K()}],"rounded-tl":[{"rounded-tl":K()}],"rounded-tr":[{"rounded-tr":K()}],"rounded-br":[{"rounded-br":K()}],"rounded-bl":[{"rounded-bl":K()}],"border-w":[{border:ne()}],"border-w-x":[{"border-x":ne()}],"border-w-y":[{"border-y":ne()}],"border-w-s":[{"border-s":ne()}],"border-w-e":[{"border-e":ne()}],"border-w-t":[{"border-t":ne()}],"border-w-r":[{"border-r":ne()}],"border-w-b":[{"border-b":ne()}],"border-w-l":[{"border-l":ne()}],"divide-x":[{"divide-x":ne()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ne()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...fe(),"hidden","none"]}],"divide-style":[{divide:[...fe(),"hidden","none"]}],"border-color":[{border:H()}],"border-color-x":[{"border-x":H()}],"border-color-y":[{"border-y":H()}],"border-color-s":[{"border-s":H()}],"border-color-e":[{"border-e":H()}],"border-color-t":[{"border-t":H()}],"border-color-r":[{"border-r":H()}],"border-color-b":[{"border-b":H()}],"border-color-l":[{"border-l":H()}],"divide-color":[{divide:H()}],"outline-style":[{outline:[...fe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[De,ve,ye]}],"outline-w":[{outline:["",De,ci,_o]}],"outline-color":[{outline:H()}],shadow:[{shadow:["","none",g,pc,mc]}],"shadow-color":[{shadow:H()}],"inset-shadow":[{"inset-shadow":["none",v,pc,mc]}],"inset-shadow-color":[{"inset-shadow":H()}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:H()}],"ring-offset-w":[{"ring-offset":[De,_o]}],"ring-offset-color":[{"ring-offset":H()}],"inset-ring-w":[{"inset-ring":ne()}],"inset-ring-color":[{"inset-ring":H()}],"text-shadow":[{"text-shadow":["none",y,pc,mc]}],"text-shadow-color":[{"text-shadow":H()}],opacity:[{opacity:[De,ve,ye]}],"mix-blend":[{"mix-blend":[...ue(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ue()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[De]}],"mask-image-linear-from-pos":[{"mask-linear-from":q()}],"mask-image-linear-to-pos":[{"mask-linear-to":q()}],"mask-image-linear-from-color":[{"mask-linear-from":H()}],"mask-image-linear-to-color":[{"mask-linear-to":H()}],"mask-image-t-from-pos":[{"mask-t-from":q()}],"mask-image-t-to-pos":[{"mask-t-to":q()}],"mask-image-t-from-color":[{"mask-t-from":H()}],"mask-image-t-to-color":[{"mask-t-to":H()}],"mask-image-r-from-pos":[{"mask-r-from":q()}],"mask-image-r-to-pos":[{"mask-r-to":q()}],"mask-image-r-from-color":[{"mask-r-from":H()}],"mask-image-r-to-color":[{"mask-r-to":H()}],"mask-image-b-from-pos":[{"mask-b-from":q()}],"mask-image-b-to-pos":[{"mask-b-to":q()}],"mask-image-b-from-color":[{"mask-b-from":H()}],"mask-image-b-to-color":[{"mask-b-to":H()}],"mask-image-l-from-pos":[{"mask-l-from":q()}],"mask-image-l-to-pos":[{"mask-l-to":q()}],"mask-image-l-from-color":[{"mask-l-from":H()}],"mask-image-l-to-color":[{"mask-l-to":H()}],"mask-image-x-from-pos":[{"mask-x-from":q()}],"mask-image-x-to-pos":[{"mask-x-to":q()}],"mask-image-x-from-color":[{"mask-x-from":H()}],"mask-image-x-to-color":[{"mask-x-to":H()}],"mask-image-y-from-pos":[{"mask-y-from":q()}],"mask-image-y-to-pos":[{"mask-y-to":q()}],"mask-image-y-from-color":[{"mask-y-from":H()}],"mask-image-y-to-color":[{"mask-y-to":H()}],"mask-image-radial":[{"mask-radial":[ve,ye]}],"mask-image-radial-from-pos":[{"mask-radial-from":q()}],"mask-image-radial-to-pos":[{"mask-radial-to":q()}],"mask-image-radial-from-color":[{"mask-radial-from":H()}],"mask-image-radial-to-color":[{"mask-radial-to":H()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":A()}],"mask-image-conic-pos":[{"mask-conic":[De]}],"mask-image-conic-from-pos":[{"mask-conic-from":q()}],"mask-image-conic-to-pos":[{"mask-conic-to":q()}],"mask-image-conic-from-color":[{"mask-conic-from":H()}],"mask-image-conic-to-color":[{"mask-conic-to":H()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:V()}],"mask-repeat":[{mask:M()}],"mask-size":[{mask:I()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ve,ye]}],filter:[{filter:["","none",ve,ye]}],blur:[{blur:Q()}],brightness:[{brightness:[De,ve,ye]}],contrast:[{contrast:[De,ve,ye]}],"drop-shadow":[{"drop-shadow":["","none",b,pc,mc]}],"drop-shadow-color":[{"drop-shadow":H()}],grayscale:[{grayscale:["",De,ve,ye]}],"hue-rotate":[{"hue-rotate":[De,ve,ye]}],invert:[{invert:["",De,ve,ye]}],saturate:[{saturate:[De,ve,ye]}],sepia:[{sepia:["",De,ve,ye]}],"backdrop-filter":[{"backdrop-filter":["","none",ve,ye]}],"backdrop-blur":[{"backdrop-blur":Q()}],"backdrop-brightness":[{"backdrop-brightness":[De,ve,ye]}],"backdrop-contrast":[{"backdrop-contrast":[De,ve,ye]}],"backdrop-grayscale":[{"backdrop-grayscale":["",De,ve,ye]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[De,ve,ye]}],"backdrop-invert":[{"backdrop-invert":["",De,ve,ye]}],"backdrop-opacity":[{"backdrop-opacity":[De,ve,ye]}],"backdrop-saturate":[{"backdrop-saturate":[De,ve,ye]}],"backdrop-sepia":[{"backdrop-sepia":["",De,ve,ye]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":U()}],"border-spacing-x":[{"border-spacing-x":U()}],"border-spacing-y":[{"border-spacing-y":U()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ve,ye]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[De,"initial",ve,ye]}],ease:[{ease:["linear","initial",j,ve,ye]}],delay:[{delay:[De,ve,ye]}],animate:[{animate:["none",R,ve,ye]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,ve,ye]}],"perspective-origin":[{"perspective-origin":D()}],rotate:[{rotate:se()}],"rotate-x":[{"rotate-x":se()}],"rotate-y":[{"rotate-y":se()}],"rotate-z":[{"rotate-z":se()}],scale:[{scale:me()}],"scale-x":[{"scale-x":me()}],"scale-y":[{"scale-y":me()}],"scale-z":[{"scale-z":me()}],"scale-3d":["scale-3d"],skew:[{skew:pe()}],"skew-x":[{"skew-x":pe()}],"skew-y":[{"skew-y":pe()}],transform:[{transform:[ve,ye,"","none","gpu","cpu"]}],"transform-origin":[{origin:D()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:de()}],"translate-x":[{"translate-x":de()}],"translate-y":[{"translate-y":de()}],"translate-z":[{"translate-z":de()}],"translate-none":["translate-none"],accent:[{accent:H()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:H()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ve,ye]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-pe":[{"scroll-pe":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ve,ye]}],fill:[{fill:["none",...H()]}],"stroke-w":[{stroke:[De,ci,_o,mh]}],stroke:[{stroke:["none",...H()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},uC=Y_(cC);function He(...e){return uC(lb(e))}const dC=cb("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function Ze({className:e,variant:r,size:o,asChild:s=!1,...i}){const c=s?__:"button";return u.jsx(c,{"data-slot":"button",className:He(dC({variant:r,size:o,className:e})),...i})}function be(e,r,{checkForDefaultPrevented:o=!0}={}){return function(i){if(e?.(i),o===!1||!i.defaultPrevented)return r?.(i)}}function pr(e,r=[]){let o=[];function s(c,d){const f=w.createContext(d),m=o.length;o=[...o,d];const p=v=>{const{scope:y,children:b,...N}=v,S=y?.[e]?.[m]||f,C=w.useMemo(()=>N,Object.values(N));return u.jsx(S.Provider,{value:C,children:b})};p.displayName=c+"Provider";function g(v,y){const b=y?.[e]?.[m]||f,N=w.useContext(b);if(N)return N;if(d!==void 0)return d;throw new Error(`\`${v}\` must be used within \`${c}\``)}return[p,g]}const i=()=>{const c=o.map(d=>w.createContext(d));return function(f){const m=f?.[e]||c;return w.useMemo(()=>({[`__scope${e}`]:{...f,[e]:m}}),[f,m])}};return i.scopeName=e,[s,fC(i,...r)]}function fC(...e){const r=e[0];if(e.length===1)return r;const o=()=>{const s=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(c){const d=s.reduce((f,{useScope:m,scopeName:p})=>{const v=m(c)[`__scope${p}`];return{...f,...v}},{});return w.useMemo(()=>({[`__scope${r.scopeName}`]:d}),[d])}};return o.scopeName=r.scopeName,o}var St=globalThis?.document?w.useLayoutEffect:()=>{},hC=ab[" useInsertionEffect ".trim().toString()]||St;function Ha({prop:e,defaultProp:r,onChange:o=()=>{},caller:s}){const[i,c,d]=mC({defaultProp:r,onChange:o}),f=e!==void 0,m=f?e:i;{const g=w.useRef(e!==void 0);w.useEffect(()=>{const v=g.current;v!==f&&console.warn(`${s} is changing from ${v?"controlled":"uncontrolled"} to ${f?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),g.current=f},[f,s])}const p=w.useCallback(g=>{if(f){const v=pC(g)?g(e):g;v!==e&&d.current?.(v)}else c(g)},[f,e,c,d]);return[m,p]}function mC({defaultProp:e,onChange:r}){const[o,s]=w.useState(e),i=w.useRef(o),c=w.useRef(r);return hC(()=>{c.current=r},[r]),w.useEffect(()=>{i.current!==o&&(c.current?.(o),i.current=o)},[o,i]),[o,s,c]}function pC(e){return typeof e=="function"}var Li=sb();const gC=Nm(Li);var xC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Me=xC.reduce((e,r)=>{const o=La(`Primitive.${r}`),s=w.forwardRef((i,c)=>{const{asChild:d,...f}=i,m=d?o:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(m,{...f,ref:c})});return s.displayName=`Primitive.${r}`,{...e,[r]:s}},{});function bb(e,r){e&&Li.flushSync(()=>e.dispatchEvent(r))}function _m(e){const r=e+"CollectionProvider",[o,s]=pr(r),[i,c]=o(r,{collectionRef:{current:null},itemMap:new Map}),d=S=>{const{scope:C,children:j}=S,R=cr.useRef(null),E=cr.useRef(new Map).current;return u.jsx(i,{scope:C,itemMap:E,collectionRef:R,children:j})};d.displayName=r;const f=e+"CollectionSlot",m=La(f),p=cr.forwardRef((S,C)=>{const{scope:j,children:R}=S,E=c(f,j),A=Pe(C,E.collectionRef);return u.jsx(m,{ref:A,children:R})});p.displayName=f;const g=e+"CollectionItemSlot",v="data-radix-collection-item",y=La(g),b=cr.forwardRef((S,C)=>{const{scope:j,children:R,...E}=S,A=cr.useRef(null),D=Pe(C,A),L=c(g,j);return cr.useEffect(()=>(L.itemMap.set(A,{ref:A,...E}),()=>void L.itemMap.delete(A))),u.jsx(y,{[v]:"",ref:D,children:R})});b.displayName=g;function N(S){const C=c(e+"CollectionConsumer",S);return cr.useCallback(()=>{const R=C.collectionRef.current;if(!R)return[];const E=Array.from(R.querySelectorAll(`[${v}]`));return Array.from(C.itemMap.values()).sort((L,B)=>E.indexOf(L.ref.current)-E.indexOf(B.ref.current))},[C.collectionRef,C.itemMap])}return[{Provider:d,Slot:p,ItemSlot:b},N,s]}var yC=w.createContext(void 0);function Hi(e){const r=w.useContext(yC);return e||r||"ltr"}function wt(e){const r=w.useRef(e);return w.useEffect(()=>{r.current=e}),w.useMemo(()=>(...o)=>r.current?.(...o),[])}function vC(e,r=globalThis?.document){const o=wt(e);w.useEffect(()=>{const s=i=>{i.key==="Escape"&&o(i)};return r.addEventListener("keydown",s,{capture:!0}),()=>r.removeEventListener("keydown",s,{capture:!0})},[o,r])}var bC="DismissableLayer",Yh="dismissableLayer.update",wC="dismissableLayer.pointerDownOutside",SC="dismissableLayer.focusOutside",by,wb=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Cm=w.forwardRef((e,r)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:c,onInteractOutside:d,onDismiss:f,...m}=e,p=w.useContext(wb),[g,v]=w.useState(null),y=g?.ownerDocument??globalThis?.document,[,b]=w.useState({}),N=Pe(r,B=>v(B)),S=Array.from(p.layers),[C]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),j=S.indexOf(C),R=g?S.indexOf(g):-1,E=p.layersWithOutsidePointerEventsDisabled.size>0,A=R>=j,D=_C(B=>{const U=B.target,G=[...p.branches].some(re=>re.contains(U));!A||G||(i?.(B),d?.(B),B.defaultPrevented||f?.())},y),L=CC(B=>{const U=B.target;[...p.branches].some(re=>re.contains(U))||(c?.(B),d?.(B),B.defaultPrevented||f?.())},y);return vC(B=>{R===p.layers.size-1&&(s?.(B),!B.defaultPrevented&&f&&(B.preventDefault(),f()))},y),w.useEffect(()=>{if(g)return o&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(by=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(g)),p.layers.add(g),wy(),()=>{o&&p.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=by)}},[g,y,o,p]),w.useEffect(()=>()=>{g&&(p.layers.delete(g),p.layersWithOutsidePointerEventsDisabled.delete(g),wy())},[g,p]),w.useEffect(()=>{const B=()=>b({});return document.addEventListener(Yh,B),()=>document.removeEventListener(Yh,B)},[]),u.jsx(Me.div,{...m,ref:N,style:{pointerEvents:E?A?"auto":"none":void 0,...e.style},onFocusCapture:be(e.onFocusCapture,L.onFocusCapture),onBlurCapture:be(e.onBlurCapture,L.onBlurCapture),onPointerDownCapture:be(e.onPointerDownCapture,D.onPointerDownCapture)})});Cm.displayName=bC;var NC="DismissableLayerBranch",EC=w.forwardRef((e,r)=>{const o=w.useContext(wb),s=w.useRef(null),i=Pe(r,s);return w.useEffect(()=>{const c=s.current;if(c)return o.branches.add(c),()=>{o.branches.delete(c)}},[o.branches]),u.jsx(Me.div,{...e,ref:i})});EC.displayName=NC;function _C(e,r=globalThis?.document){const o=wt(e),s=w.useRef(!1),i=w.useRef(()=>{});return w.useEffect(()=>{const c=f=>{if(f.target&&!s.current){let m=function(){Sb(wC,o,p,{discrete:!0})};const p={originalEvent:f};f.pointerType==="touch"?(r.removeEventListener("click",i.current),i.current=m,r.addEventListener("click",i.current,{once:!0})):m()}else r.removeEventListener("click",i.current);s.current=!1},d=window.setTimeout(()=>{r.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(d),r.removeEventListener("pointerdown",c),r.removeEventListener("click",i.current)}},[r,o]),{onPointerDownCapture:()=>s.current=!0}}function CC(e,r=globalThis?.document){const o=wt(e),s=w.useRef(!1);return w.useEffect(()=>{const i=c=>{c.target&&!s.current&&Sb(SC,o,{originalEvent:c},{discrete:!1})};return r.addEventListener("focusin",i),()=>r.removeEventListener("focusin",i)},[r,o]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function wy(){const e=new CustomEvent(Yh);document.dispatchEvent(e)}function Sb(e,r,o,{discrete:s}){const i=o.originalEvent.target,c=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:o});r&&i.addEventListener(e,r,{once:!0}),s?bb(i,c):i.dispatchEvent(c)}var ph=0;function Nb(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Sy()),document.body.insertAdjacentElement("beforeend",e[1]??Sy()),ph++,()=>{ph===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),ph--}},[])}function Sy(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var gh="focusScope.autoFocusOnMount",xh="focusScope.autoFocusOnUnmount",Ny={bubbles:!1,cancelable:!0},jC="FocusScope",jm=w.forwardRef((e,r)=>{const{loop:o=!1,trapped:s=!1,onMountAutoFocus:i,onUnmountAutoFocus:c,...d}=e,[f,m]=w.useState(null),p=wt(i),g=wt(c),v=w.useRef(null),y=Pe(r,S=>m(S)),b=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(s){let S=function(E){if(b.paused||!f)return;const A=E.target;f.contains(A)?v.current=A:Xr(v.current,{select:!0})},C=function(E){if(b.paused||!f)return;const A=E.relatedTarget;A!==null&&(f.contains(A)||Xr(v.current,{select:!0}))},j=function(E){if(document.activeElement===document.body)for(const D of E)D.removedNodes.length>0&&Xr(f)};document.addEventListener("focusin",S),document.addEventListener("focusout",C);const R=new MutationObserver(j);return f&&R.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",C),R.disconnect()}}},[s,f,b.paused]),w.useEffect(()=>{if(f){_y.add(b);const S=document.activeElement;if(!f.contains(S)){const j=new CustomEvent(gh,Ny);f.addEventListener(gh,p),f.dispatchEvent(j),j.defaultPrevented||(AC(DC(Eb(f)),{select:!0}),document.activeElement===S&&Xr(f))}return()=>{f.removeEventListener(gh,p),setTimeout(()=>{const j=new CustomEvent(xh,Ny);f.addEventListener(xh,g),f.dispatchEvent(j),j.defaultPrevented||Xr(S??document.body,{select:!0}),f.removeEventListener(xh,g),_y.remove(b)},0)}}},[f,p,g,b]);const N=w.useCallback(S=>{if(!o&&!s||b.paused)return;const C=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,j=document.activeElement;if(C&&j){const R=S.currentTarget,[E,A]=MC(R);E&&A?!S.shiftKey&&j===A?(S.preventDefault(),o&&Xr(E,{select:!0})):S.shiftKey&&j===E&&(S.preventDefault(),o&&Xr(A,{select:!0})):j===R&&S.preventDefault()}},[o,s,b.paused]);return u.jsx(Me.div,{tabIndex:-1,...d,ref:y,onKeyDown:N})});jm.displayName=jC;function AC(e,{select:r=!1}={}){const o=document.activeElement;for(const s of e)if(Xr(s,{select:r}),document.activeElement!==o)return}function MC(e){const r=Eb(e),o=Ey(r,e),s=Ey(r.reverse(),e);return[o,s]}function Eb(e){const r=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const i=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||i?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)r.push(o.currentNode);return r}function Ey(e,r){for(const o of e)if(!TC(o,{upTo:r}))return o}function TC(e,{upTo:r}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(r!==void 0&&e===r)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function kC(e){return e instanceof HTMLInputElement&&"select"in e}function Xr(e,{select:r=!1}={}){if(e&&e.focus){const o=document.activeElement;e.focus({preventScroll:!0}),e!==o&&kC(e)&&r&&e.select()}}var _y=RC();function RC(){let e=[];return{add(r){const o=e[0];r!==o&&o?.pause(),e=Cy(e,r),e.unshift(r)},remove(r){e=Cy(e,r),e[0]?.resume()}}}function Cy(e,r){const o=[...e],s=o.indexOf(r);return s!==-1&&o.splice(s,1),o}function DC(e){return e.filter(r=>r.tagName!=="A")}var OC=ab[" useId ".trim().toString()]||(()=>{}),zC=0;function To(e){const[r,o]=w.useState(OC());return St(()=>{o(s=>s??String(zC++))},[e]),r?`radix-${r}`:""}const LC=["top","right","bottom","left"],Jr=Math.min,Xt=Math.max,Yc=Math.round,gc=Math.floor,On=e=>({x:e,y:e}),HC={left:"right",right:"left",bottom:"top",top:"bottom"},BC={start:"end",end:"start"};function qh(e,r,o){return Xt(e,Jr(r,o))}function fr(e,r){return typeof e=="function"?e(r):e}function hr(e){return e.split("-")[0]}function Wa(e){return e.split("-")[1]}function Am(e){return e==="x"?"y":"x"}function Mm(e){return e==="y"?"height":"width"}const IC=new Set(["top","bottom"]);function Rn(e){return IC.has(hr(e))?"y":"x"}function Tm(e){return Am(Rn(e))}function UC(e,r,o){o===void 0&&(o=!1);const s=Wa(e),i=Tm(e),c=Mm(i);let d=i==="x"?s===(o?"end":"start")?"right":"left":s==="start"?"bottom":"top";return r.reference[c]>r.floating[c]&&(d=qc(d)),[d,qc(d)]}function PC(e){const r=qc(e);return[Gh(e),r,Gh(r)]}function Gh(e){return e.replace(/start|end/g,r=>BC[r])}const jy=["left","right"],Ay=["right","left"],$C=["top","bottom"],VC=["bottom","top"];function YC(e,r,o){switch(e){case"top":case"bottom":return o?r?Ay:jy:r?jy:Ay;case"left":case"right":return r?$C:VC;default:return[]}}function qC(e,r,o,s){const i=Wa(e);let c=YC(hr(e),o==="start",s);return i&&(c=c.map(d=>d+"-"+i),r&&(c=c.concat(c.map(Gh)))),c}function qc(e){return e.replace(/left|right|bottom|top/g,r=>HC[r])}function GC(e){return{top:0,right:0,bottom:0,left:0,...e}}function _b(e){return typeof e!="number"?GC(e):{top:e,right:e,bottom:e,left:e}}function Gc(e){const{x:r,y:o,width:s,height:i}=e;return{width:s,height:i,top:o,left:r,right:r+s,bottom:o+i,x:r,y:o}}function My(e,r,o){let{reference:s,floating:i}=e;const c=Rn(r),d=Tm(r),f=Mm(d),m=hr(r),p=c==="y",g=s.x+s.width/2-i.width/2,v=s.y+s.height/2-i.height/2,y=s[f]/2-i[f]/2;let b;switch(m){case"top":b={x:g,y:s.y-i.height};break;case"bottom":b={x:g,y:s.y+s.height};break;case"right":b={x:s.x+s.width,y:v};break;case"left":b={x:s.x-i.width,y:v};break;default:b={x:s.x,y:s.y}}switch(Wa(r)){case"start":b[d]-=y*(o&&p?-1:1);break;case"end":b[d]+=y*(o&&p?-1:1);break}return b}const XC=async(e,r,o)=>{const{placement:s="bottom",strategy:i="absolute",middleware:c=[],platform:d}=o,f=c.filter(Boolean),m=await(d.isRTL==null?void 0:d.isRTL(r));let p=await d.getElementRects({reference:e,floating:r,strategy:i}),{x:g,y:v}=My(p,s,m),y=s,b={},N=0;for(let S=0;S<f.length;S++){const{name:C,fn:j}=f[S],{x:R,y:E,data:A,reset:D}=await j({x:g,y:v,initialPlacement:s,placement:y,strategy:i,middlewareData:b,rects:p,platform:d,elements:{reference:e,floating:r}});g=R??g,v=E??v,b={...b,[C]:{...b[C],...A}},D&&N<=50&&(N++,typeof D=="object"&&(D.placement&&(y=D.placement),D.rects&&(p=D.rects===!0?await d.getElementRects({reference:e,floating:r,strategy:i}):D.rects),{x:g,y:v}=My(p,y,m)),S=-1)}return{x:g,y:v,placement:y,strategy:i,middlewareData:b}};async function vi(e,r){var o;r===void 0&&(r={});const{x:s,y:i,platform:c,rects:d,elements:f,strategy:m}=e,{boundary:p="clippingAncestors",rootBoundary:g="viewport",elementContext:v="floating",altBoundary:y=!1,padding:b=0}=fr(r,e),N=_b(b),C=f[y?v==="floating"?"reference":"floating":v],j=Gc(await c.getClippingRect({element:(o=await(c.isElement==null?void 0:c.isElement(C)))==null||o?C:C.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(f.floating)),boundary:p,rootBoundary:g,strategy:m})),R=v==="floating"?{x:s,y:i,width:d.floating.width,height:d.floating.height}:d.reference,E=await(c.getOffsetParent==null?void 0:c.getOffsetParent(f.floating)),A=await(c.isElement==null?void 0:c.isElement(E))?await(c.getScale==null?void 0:c.getScale(E))||{x:1,y:1}:{x:1,y:1},D=Gc(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:R,offsetParent:E,strategy:m}):R);return{top:(j.top-D.top+N.top)/A.y,bottom:(D.bottom-j.bottom+N.bottom)/A.y,left:(j.left-D.left+N.left)/A.x,right:(D.right-j.right+N.right)/A.x}}const FC=e=>({name:"arrow",options:e,async fn(r){const{x:o,y:s,placement:i,rects:c,platform:d,elements:f,middlewareData:m}=r,{element:p,padding:g=0}=fr(e,r)||{};if(p==null)return{};const v=_b(g),y={x:o,y:s},b=Tm(i),N=Mm(b),S=await d.getDimensions(p),C=b==="y",j=C?"top":"left",R=C?"bottom":"right",E=C?"clientHeight":"clientWidth",A=c.reference[N]+c.reference[b]-y[b]-c.floating[N],D=y[b]-c.reference[b],L=await(d.getOffsetParent==null?void 0:d.getOffsetParent(p));let B=L?L[E]:0;(!B||!await(d.isElement==null?void 0:d.isElement(L)))&&(B=f.floating[E]||c.floating[N]);const U=A/2-D/2,G=B/2-S[N]/2-1,re=Jr(v[j],G),Z=Jr(v[R],G),Y=re,ee=B-S[N]-Z,O=B/2-S[N]/2+U,P=qh(Y,O,ee),T=!m.arrow&&Wa(i)!=null&&O!==P&&c.reference[N]/2-(O<Y?re:Z)-S[N]/2<0,z=T?O<Y?O-Y:O-ee:0;return{[b]:y[b]+z,data:{[b]:P,centerOffset:O-P-z,...T&&{alignmentOffset:z}},reset:T}}}),ZC=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(r){var o,s;const{placement:i,middlewareData:c,rects:d,initialPlacement:f,platform:m,elements:p}=r,{mainAxis:g=!0,crossAxis:v=!0,fallbackPlacements:y,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:N="none",flipAlignment:S=!0,...C}=fr(e,r);if((o=c.arrow)!=null&&o.alignmentOffset)return{};const j=hr(i),R=Rn(f),E=hr(f)===f,A=await(m.isRTL==null?void 0:m.isRTL(p.floating)),D=y||(E||!S?[qc(f)]:PC(f)),L=N!=="none";!y&&L&&D.push(...qC(f,S,N,A));const B=[f,...D],U=await vi(r,C),G=[];let re=((s=c.flip)==null?void 0:s.overflows)||[];if(g&&G.push(U[j]),v){const O=UC(i,d,A);G.push(U[O[0]],U[O[1]])}if(re=[...re,{placement:i,overflows:G}],!G.every(O=>O<=0)){var Z,Y;const O=(((Z=c.flip)==null?void 0:Z.index)||0)+1,P=B[O];if(P&&(!(v==="alignment"?R!==Rn(P):!1)||re.every(H=>Rn(H.placement)===R?H.overflows[0]>0:!0)))return{data:{index:O,overflows:re},reset:{placement:P}};let T=(Y=re.filter(z=>z.overflows[0]<=0).sort((z,H)=>z.overflows[1]-H.overflows[1])[0])==null?void 0:Y.placement;if(!T)switch(b){case"bestFit":{var ee;const z=(ee=re.filter(H=>{if(L){const V=Rn(H.placement);return V===R||V==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(V=>V>0).reduce((V,M)=>V+M,0)]).sort((H,V)=>H[1]-V[1])[0])==null?void 0:ee[0];z&&(T=z);break}case"initialPlacement":T=f;break}if(i!==T)return{reset:{placement:T}}}return{}}}};function Ty(e,r){return{top:e.top-r.height,right:e.right-r.width,bottom:e.bottom-r.height,left:e.left-r.width}}function ky(e){return LC.some(r=>e[r]>=0)}const KC=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(r){const{rects:o}=r,{strategy:s="referenceHidden",...i}=fr(e,r);switch(s){case"referenceHidden":{const c=await vi(r,{...i,elementContext:"reference"}),d=Ty(c,o.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:ky(d)}}}case"escaped":{const c=await vi(r,{...i,altBoundary:!0}),d=Ty(c,o.floating);return{data:{escapedOffsets:d,escaped:ky(d)}}}default:return{}}}}},Cb=new Set(["left","top"]);async function QC(e,r){const{placement:o,platform:s,elements:i}=e,c=await(s.isRTL==null?void 0:s.isRTL(i.floating)),d=hr(o),f=Wa(o),m=Rn(o)==="y",p=Cb.has(d)?-1:1,g=c&&m?-1:1,v=fr(r,e);let{mainAxis:y,crossAxis:b,alignmentAxis:N}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:v.mainAxis||0,crossAxis:v.crossAxis||0,alignmentAxis:v.alignmentAxis};return f&&typeof N=="number"&&(b=f==="end"?N*-1:N),m?{x:b*g,y:y*p}:{x:y*p,y:b*g}}const WC=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(r){var o,s;const{x:i,y:c,placement:d,middlewareData:f}=r,m=await QC(r,e);return d===((o=f.offset)==null?void 0:o.placement)&&(s=f.arrow)!=null&&s.alignmentOffset?{}:{x:i+m.x,y:c+m.y,data:{...m,placement:d}}}}},JC=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(r){const{x:o,y:s,placement:i}=r,{mainAxis:c=!0,crossAxis:d=!1,limiter:f={fn:C=>{let{x:j,y:R}=C;return{x:j,y:R}}},...m}=fr(e,r),p={x:o,y:s},g=await vi(r,m),v=Rn(hr(i)),y=Am(v);let b=p[y],N=p[v];if(c){const C=y==="y"?"top":"left",j=y==="y"?"bottom":"right",R=b+g[C],E=b-g[j];b=qh(R,b,E)}if(d){const C=v==="y"?"top":"left",j=v==="y"?"bottom":"right",R=N+g[C],E=N-g[j];N=qh(R,N,E)}const S=f.fn({...r,[y]:b,[v]:N});return{...S,data:{x:S.x-o,y:S.y-s,enabled:{[y]:c,[v]:d}}}}}},ej=function(e){return e===void 0&&(e={}),{options:e,fn(r){const{x:o,y:s,placement:i,rects:c,middlewareData:d}=r,{offset:f=0,mainAxis:m=!0,crossAxis:p=!0}=fr(e,r),g={x:o,y:s},v=Rn(i),y=Am(v);let b=g[y],N=g[v];const S=fr(f,r),C=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(m){const E=y==="y"?"height":"width",A=c.reference[y]-c.floating[E]+C.mainAxis,D=c.reference[y]+c.reference[E]-C.mainAxis;b<A?b=A:b>D&&(b=D)}if(p){var j,R;const E=y==="y"?"width":"height",A=Cb.has(hr(i)),D=c.reference[v]-c.floating[E]+(A&&((j=d.offset)==null?void 0:j[v])||0)+(A?0:C.crossAxis),L=c.reference[v]+c.reference[E]+(A?0:((R=d.offset)==null?void 0:R[v])||0)-(A?C.crossAxis:0);N<D?N=D:N>L&&(N=L)}return{[y]:b,[v]:N}}}},tj=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(r){var o,s;const{placement:i,rects:c,platform:d,elements:f}=r,{apply:m=()=>{},...p}=fr(e,r),g=await vi(r,p),v=hr(i),y=Wa(i),b=Rn(i)==="y",{width:N,height:S}=c.floating;let C,j;v==="top"||v==="bottom"?(C=v,j=y===(await(d.isRTL==null?void 0:d.isRTL(f.floating))?"start":"end")?"left":"right"):(j=v,C=y==="end"?"top":"bottom");const R=S-g.top-g.bottom,E=N-g.left-g.right,A=Jr(S-g[C],R),D=Jr(N-g[j],E),L=!r.middlewareData.shift;let B=A,U=D;if((o=r.middlewareData.shift)!=null&&o.enabled.x&&(U=E),(s=r.middlewareData.shift)!=null&&s.enabled.y&&(B=R),L&&!y){const re=Xt(g.left,0),Z=Xt(g.right,0),Y=Xt(g.top,0),ee=Xt(g.bottom,0);b?U=N-2*(re!==0||Z!==0?re+Z:Xt(g.left,g.right)):B=S-2*(Y!==0||ee!==0?Y+ee:Xt(g.top,g.bottom))}await m({...r,availableWidth:U,availableHeight:B});const G=await d.getDimensions(f.floating);return N!==G.width||S!==G.height?{reset:{rects:!0}}:{}}}};function gu(){return typeof window<"u"}function Ja(e){return jb(e)?(e.nodeName||"").toLowerCase():"#document"}function Zt(e){var r;return(e==null||(r=e.ownerDocument)==null?void 0:r.defaultView)||window}function Bn(e){var r;return(r=(jb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:r.documentElement}function jb(e){return gu()?e instanceof Node||e instanceof Zt(e).Node:!1}function vn(e){return gu()?e instanceof Element||e instanceof Zt(e).Element:!1}function Ln(e){return gu()?e instanceof HTMLElement||e instanceof Zt(e).HTMLElement:!1}function Ry(e){return!gu()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Zt(e).ShadowRoot}const nj=new Set(["inline","contents"]);function Bi(e){const{overflow:r,overflowX:o,overflowY:s,display:i}=bn(e);return/auto|scroll|overlay|hidden|clip/.test(r+s+o)&&!nj.has(i)}const rj=new Set(["table","td","th"]);function oj(e){return rj.has(Ja(e))}const aj=[":popover-open",":modal"];function xu(e){return aj.some(r=>{try{return e.matches(r)}catch{return!1}})}const sj=["transform","translate","scale","rotate","perspective"],ij=["transform","translate","scale","rotate","perspective","filter"],lj=["paint","layout","strict","content"];function km(e){const r=Rm(),o=vn(e)?bn(e):e;return sj.some(s=>o[s]?o[s]!=="none":!1)||(o.containerType?o.containerType!=="normal":!1)||!r&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!r&&(o.filter?o.filter!=="none":!1)||ij.some(s=>(o.willChange||"").includes(s))||lj.some(s=>(o.contain||"").includes(s))}function cj(e){let r=eo(e);for(;Ln(r)&&!Ba(r);){if(km(r))return r;if(xu(r))return null;r=eo(r)}return null}function Rm(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const uj=new Set(["html","body","#document"]);function Ba(e){return uj.has(Ja(e))}function bn(e){return Zt(e).getComputedStyle(e)}function yu(e){return vn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function eo(e){if(Ja(e)==="html")return e;const r=e.assignedSlot||e.parentNode||Ry(e)&&e.host||Bn(e);return Ry(r)?r.host:r}function Ab(e){const r=eo(e);return Ba(r)?e.ownerDocument?e.ownerDocument.body:e.body:Ln(r)&&Bi(r)?r:Ab(r)}function bi(e,r,o){var s;r===void 0&&(r=[]),o===void 0&&(o=!0);const i=Ab(e),c=i===((s=e.ownerDocument)==null?void 0:s.body),d=Zt(i);if(c){const f=Xh(d);return r.concat(d,d.visualViewport||[],Bi(i)?i:[],f&&o?bi(f):[])}return r.concat(i,bi(i,[],o))}function Xh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Mb(e){const r=bn(e);let o=parseFloat(r.width)||0,s=parseFloat(r.height)||0;const i=Ln(e),c=i?e.offsetWidth:o,d=i?e.offsetHeight:s,f=Yc(o)!==c||Yc(s)!==d;return f&&(o=c,s=d),{width:o,height:s,$:f}}function Dm(e){return vn(e)?e:e.contextElement}function Ra(e){const r=Dm(e);if(!Ln(r))return On(1);const o=r.getBoundingClientRect(),{width:s,height:i,$:c}=Mb(r);let d=(c?Yc(o.width):o.width)/s,f=(c?Yc(o.height):o.height)/i;return(!d||!Number.isFinite(d))&&(d=1),(!f||!Number.isFinite(f))&&(f=1),{x:d,y:f}}const dj=On(0);function Tb(e){const r=Zt(e);return!Rm()||!r.visualViewport?dj:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function fj(e,r,o){return r===void 0&&(r=!1),!o||r&&o!==Zt(e)?!1:r}function ko(e,r,o,s){r===void 0&&(r=!1),o===void 0&&(o=!1);const i=e.getBoundingClientRect(),c=Dm(e);let d=On(1);r&&(s?vn(s)&&(d=Ra(s)):d=Ra(e));const f=fj(c,o,s)?Tb(c):On(0);let m=(i.left+f.x)/d.x,p=(i.top+f.y)/d.y,g=i.width/d.x,v=i.height/d.y;if(c){const y=Zt(c),b=s&&vn(s)?Zt(s):s;let N=y,S=Xh(N);for(;S&&s&&b!==N;){const C=Ra(S),j=S.getBoundingClientRect(),R=bn(S),E=j.left+(S.clientLeft+parseFloat(R.paddingLeft))*C.x,A=j.top+(S.clientTop+parseFloat(R.paddingTop))*C.y;m*=C.x,p*=C.y,g*=C.x,v*=C.y,m+=E,p+=A,N=Zt(S),S=Xh(N)}}return Gc({width:g,height:v,x:m,y:p})}function vu(e,r){const o=yu(e).scrollLeft;return r?r.left+o:ko(Bn(e)).left+o}function kb(e,r){const o=e.getBoundingClientRect(),s=o.left+r.scrollLeft-vu(e,o),i=o.top+r.scrollTop;return{x:s,y:i}}function hj(e){let{elements:r,rect:o,offsetParent:s,strategy:i}=e;const c=i==="fixed",d=Bn(s),f=r?xu(r.floating):!1;if(s===d||f&&c)return o;let m={scrollLeft:0,scrollTop:0},p=On(1);const g=On(0),v=Ln(s);if((v||!v&&!c)&&((Ja(s)!=="body"||Bi(d))&&(m=yu(s)),Ln(s))){const b=ko(s);p=Ra(s),g.x=b.x+s.clientLeft,g.y=b.y+s.clientTop}const y=d&&!v&&!c?kb(d,m):On(0);return{width:o.width*p.x,height:o.height*p.y,x:o.x*p.x-m.scrollLeft*p.x+g.x+y.x,y:o.y*p.y-m.scrollTop*p.y+g.y+y.y}}function mj(e){return Array.from(e.getClientRects())}function pj(e){const r=Bn(e),o=yu(e),s=e.ownerDocument.body,i=Xt(r.scrollWidth,r.clientWidth,s.scrollWidth,s.clientWidth),c=Xt(r.scrollHeight,r.clientHeight,s.scrollHeight,s.clientHeight);let d=-o.scrollLeft+vu(e);const f=-o.scrollTop;return bn(s).direction==="rtl"&&(d+=Xt(r.clientWidth,s.clientWidth)-i),{width:i,height:c,x:d,y:f}}const Dy=25;function gj(e,r){const o=Zt(e),s=Bn(e),i=o.visualViewport;let c=s.clientWidth,d=s.clientHeight,f=0,m=0;if(i){c=i.width,d=i.height;const g=Rm();(!g||g&&r==="fixed")&&(f=i.offsetLeft,m=i.offsetTop)}const p=vu(s);if(p<=0){const g=s.ownerDocument,v=g.body,y=getComputedStyle(v),b=g.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,N=Math.abs(s.clientWidth-v.clientWidth-b);N<=Dy&&(c-=N)}else p<=Dy&&(c+=p);return{width:c,height:d,x:f,y:m}}const xj=new Set(["absolute","fixed"]);function yj(e,r){const o=ko(e,!0,r==="fixed"),s=o.top+e.clientTop,i=o.left+e.clientLeft,c=Ln(e)?Ra(e):On(1),d=e.clientWidth*c.x,f=e.clientHeight*c.y,m=i*c.x,p=s*c.y;return{width:d,height:f,x:m,y:p}}function Oy(e,r,o){let s;if(r==="viewport")s=gj(e,o);else if(r==="document")s=pj(Bn(e));else if(vn(r))s=yj(r,o);else{const i=Tb(e);s={x:r.x-i.x,y:r.y-i.y,width:r.width,height:r.height}}return Gc(s)}function Rb(e,r){const o=eo(e);return o===r||!vn(o)||Ba(o)?!1:bn(o).position==="fixed"||Rb(o,r)}function vj(e,r){const o=r.get(e);if(o)return o;let s=bi(e,[],!1).filter(f=>vn(f)&&Ja(f)!=="body"),i=null;const c=bn(e).position==="fixed";let d=c?eo(e):e;for(;vn(d)&&!Ba(d);){const f=bn(d),m=km(d);!m&&f.position==="fixed"&&(i=null),(c?!m&&!i:!m&&f.position==="static"&&!!i&&xj.has(i.position)||Bi(d)&&!m&&Rb(e,d))?s=s.filter(g=>g!==d):i=f,d=eo(d)}return r.set(e,s),s}function bj(e){let{element:r,boundary:o,rootBoundary:s,strategy:i}=e;const d=[...o==="clippingAncestors"?xu(r)?[]:vj(r,this._c):[].concat(o),s],f=d[0],m=d.reduce((p,g)=>{const v=Oy(r,g,i);return p.top=Xt(v.top,p.top),p.right=Jr(v.right,p.right),p.bottom=Jr(v.bottom,p.bottom),p.left=Xt(v.left,p.left),p},Oy(r,f,i));return{width:m.right-m.left,height:m.bottom-m.top,x:m.left,y:m.top}}function wj(e){const{width:r,height:o}=Mb(e);return{width:r,height:o}}function Sj(e,r,o){const s=Ln(r),i=Bn(r),c=o==="fixed",d=ko(e,!0,c,r);let f={scrollLeft:0,scrollTop:0};const m=On(0);function p(){m.x=vu(i)}if(s||!s&&!c)if((Ja(r)!=="body"||Bi(i))&&(f=yu(r)),s){const b=ko(r,!0,c,r);m.x=b.x+r.clientLeft,m.y=b.y+r.clientTop}else i&&p();c&&!s&&i&&p();const g=i&&!s&&!c?kb(i,f):On(0),v=d.left+f.scrollLeft-m.x-g.x,y=d.top+f.scrollTop-m.y-g.y;return{x:v,y,width:d.width,height:d.height}}function yh(e){return bn(e).position==="static"}function zy(e,r){if(!Ln(e)||bn(e).position==="fixed")return null;if(r)return r(e);let o=e.offsetParent;return Bn(e)===o&&(o=o.ownerDocument.body),o}function Db(e,r){const o=Zt(e);if(xu(e))return o;if(!Ln(e)){let i=eo(e);for(;i&&!Ba(i);){if(vn(i)&&!yh(i))return i;i=eo(i)}return o}let s=zy(e,r);for(;s&&oj(s)&&yh(s);)s=zy(s,r);return s&&Ba(s)&&yh(s)&&!km(s)?o:s||cj(e)||o}const Nj=async function(e){const r=this.getOffsetParent||Db,o=this.getDimensions,s=await o(e.floating);return{reference:Sj(e.reference,await r(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function Ej(e){return bn(e).direction==="rtl"}const _j={convertOffsetParentRelativeRectToViewportRelativeRect:hj,getDocumentElement:Bn,getClippingRect:bj,getOffsetParent:Db,getElementRects:Nj,getClientRects:mj,getDimensions:wj,getScale:Ra,isElement:vn,isRTL:Ej};function Ob(e,r){return e.x===r.x&&e.y===r.y&&e.width===r.width&&e.height===r.height}function Cj(e,r){let o=null,s;const i=Bn(e);function c(){var f;clearTimeout(s),(f=o)==null||f.disconnect(),o=null}function d(f,m){f===void 0&&(f=!1),m===void 0&&(m=1),c();const p=e.getBoundingClientRect(),{left:g,top:v,width:y,height:b}=p;if(f||r(),!y||!b)return;const N=gc(v),S=gc(i.clientWidth-(g+y)),C=gc(i.clientHeight-(v+b)),j=gc(g),E={rootMargin:-N+"px "+-S+"px "+-C+"px "+-j+"px",threshold:Xt(0,Jr(1,m))||1};let A=!0;function D(L){const B=L[0].intersectionRatio;if(B!==m){if(!A)return d();B?d(!1,B):s=setTimeout(()=>{d(!1,1e-7)},1e3)}B===1&&!Ob(p,e.getBoundingClientRect())&&d(),A=!1}try{o=new IntersectionObserver(D,{...E,root:i.ownerDocument})}catch{o=new IntersectionObserver(D,E)}o.observe(e)}return d(!0),c}function jj(e,r,o,s){s===void 0&&(s={});const{ancestorScroll:i=!0,ancestorResize:c=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:m=!1}=s,p=Dm(e),g=i||c?[...p?bi(p):[],...bi(r)]:[];g.forEach(j=>{i&&j.addEventListener("scroll",o,{passive:!0}),c&&j.addEventListener("resize",o)});const v=p&&f?Cj(p,o):null;let y=-1,b=null;d&&(b=new ResizeObserver(j=>{let[R]=j;R&&R.target===p&&b&&(b.unobserve(r),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var E;(E=b)==null||E.observe(r)})),o()}),p&&!m&&b.observe(p),b.observe(r));let N,S=m?ko(e):null;m&&C();function C(){const j=ko(e);S&&!Ob(S,j)&&o(),S=j,N=requestAnimationFrame(C)}return o(),()=>{var j;g.forEach(R=>{i&&R.removeEventListener("scroll",o),c&&R.removeEventListener("resize",o)}),v?.(),(j=b)==null||j.disconnect(),b=null,m&&cancelAnimationFrame(N)}}const Aj=WC,Mj=JC,Tj=ZC,kj=tj,Rj=KC,Ly=FC,Dj=ej,Oj=(e,r,o)=>{const s=new Map,i={platform:_j,...o},c={...i.platform,_c:s};return XC(e,r,{...i,platform:c})};var zj=typeof document<"u",Lj=function(){},Rc=zj?w.useLayoutEffect:Lj;function Xc(e,r){if(e===r)return!0;if(typeof e!=typeof r)return!1;if(typeof e=="function"&&e.toString()===r.toString())return!0;let o,s,i;if(e&&r&&typeof e=="object"){if(Array.isArray(e)){if(o=e.length,o!==r.length)return!1;for(s=o;s--!==0;)if(!Xc(e[s],r[s]))return!1;return!0}if(i=Object.keys(e),o=i.length,o!==Object.keys(r).length)return!1;for(s=o;s--!==0;)if(!{}.hasOwnProperty.call(r,i[s]))return!1;for(s=o;s--!==0;){const c=i[s];if(!(c==="_owner"&&e.$$typeof)&&!Xc(e[c],r[c]))return!1}return!0}return e!==e&&r!==r}function zb(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Hy(e,r){const o=zb(e);return Math.round(r*o)/o}function vh(e){const r=w.useRef(e);return Rc(()=>{r.current=e}),r}function Hj(e){e===void 0&&(e={});const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i,elements:{reference:c,floating:d}={},transform:f=!0,whileElementsMounted:m,open:p}=e,[g,v]=w.useState({x:0,y:0,strategy:o,placement:r,middlewareData:{},isPositioned:!1}),[y,b]=w.useState(s);Xc(y,s)||b(s);const[N,S]=w.useState(null),[C,j]=w.useState(null),R=w.useCallback(H=>{H!==L.current&&(L.current=H,S(H))},[]),E=w.useCallback(H=>{H!==B.current&&(B.current=H,j(H))},[]),A=c||N,D=d||C,L=w.useRef(null),B=w.useRef(null),U=w.useRef(g),G=m!=null,re=vh(m),Z=vh(i),Y=vh(p),ee=w.useCallback(()=>{if(!L.current||!B.current)return;const H={placement:r,strategy:o,middleware:y};Z.current&&(H.platform=Z.current),Oj(L.current,B.current,H).then(V=>{const M={...V,isPositioned:Y.current!==!1};O.current&&!Xc(U.current,M)&&(U.current=M,Li.flushSync(()=>{v(M)}))})},[y,r,o,Z,Y]);Rc(()=>{p===!1&&U.current.isPositioned&&(U.current.isPositioned=!1,v(H=>({...H,isPositioned:!1})))},[p]);const O=w.useRef(!1);Rc(()=>(O.current=!0,()=>{O.current=!1}),[]),Rc(()=>{if(A&&(L.current=A),D&&(B.current=D),A&&D){if(re.current)return re.current(A,D,ee);ee()}},[A,D,ee,re,G]);const P=w.useMemo(()=>({reference:L,floating:B,setReference:R,setFloating:E}),[R,E]),T=w.useMemo(()=>({reference:A,floating:D}),[A,D]),z=w.useMemo(()=>{const H={position:o,left:0,top:0};if(!T.floating)return H;const V=Hy(T.floating,g.x),M=Hy(T.floating,g.y);return f?{...H,transform:"translate("+V+"px, "+M+"px)",...zb(T.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:V,top:M}},[o,f,T.floating,g.x,g.y]);return w.useMemo(()=>({...g,update:ee,refs:P,elements:T,floatingStyles:z}),[g,ee,P,T,z])}const Bj=e=>{function r(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){const{element:s,padding:i}=typeof e=="function"?e(o):e;return s&&r(s)?s.current!=null?Ly({element:s.current,padding:i}).fn(o):{}:s?Ly({element:s,padding:i}).fn(o):{}}}},Ij=(e,r)=>({...Aj(e),options:[e,r]}),Uj=(e,r)=>({...Mj(e),options:[e,r]}),Pj=(e,r)=>({...Dj(e),options:[e,r]}),$j=(e,r)=>({...Tj(e),options:[e,r]}),Vj=(e,r)=>({...kj(e),options:[e,r]}),Yj=(e,r)=>({...Rj(e),options:[e,r]}),qj=(e,r)=>({...Bj(e),options:[e,r]});var Gj="Arrow",Lb=w.forwardRef((e,r)=>{const{children:o,width:s=10,height:i=5,...c}=e;return u.jsx(Me.svg,{...c,ref:r,width:s,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?o:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});Lb.displayName=Gj;var Xj=Lb;function Hb(e){const[r,o]=w.useState(void 0);return St(()=>{if(e){o({width:e.offsetWidth,height:e.offsetHeight});const s=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const c=i[0];let d,f;if("borderBoxSize"in c){const m=c.borderBoxSize,p=Array.isArray(m)?m[0]:m;d=p.inlineSize,f=p.blockSize}else d=e.offsetWidth,f=e.offsetHeight;o({width:d,height:f})});return s.observe(e,{box:"border-box"}),()=>s.unobserve(e)}else o(void 0)},[e]),r}var Om="Popper",[Bb,bu]=pr(Om),[Fj,Ib]=Bb(Om),Ub=e=>{const{__scopePopper:r,children:o}=e,[s,i]=w.useState(null);return u.jsx(Fj,{scope:r,anchor:s,onAnchorChange:i,children:o})};Ub.displayName=Om;var Pb="PopperAnchor",$b=w.forwardRef((e,r)=>{const{__scopePopper:o,virtualRef:s,...i}=e,c=Ib(Pb,o),d=w.useRef(null),f=Pe(r,d),m=w.useRef(null);return w.useEffect(()=>{const p=m.current;m.current=s?.current||d.current,p!==m.current&&c.onAnchorChange(m.current)}),s?null:u.jsx(Me.div,{...i,ref:f})});$b.displayName=Pb;var zm="PopperContent",[Zj,Kj]=Bb(zm),Vb=w.forwardRef((e,r)=>{const{__scopePopper:o,side:s="bottom",sideOffset:i=0,align:c="center",alignOffset:d=0,arrowPadding:f=0,avoidCollisions:m=!0,collisionBoundary:p=[],collisionPadding:g=0,sticky:v="partial",hideWhenDetached:y=!1,updatePositionStrategy:b="optimized",onPlaced:N,...S}=e,C=Ib(zm,o),[j,R]=w.useState(null),E=Pe(r,q=>R(q)),[A,D]=w.useState(null),L=Hb(A),B=L?.width??0,U=L?.height??0,G=s+(c!=="center"?"-"+c:""),re=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},Z=Array.isArray(p)?p:[p],Y=Z.length>0,ee={padding:re,boundary:Z.filter(Wj),altBoundary:Y},{refs:O,floatingStyles:P,placement:T,isPositioned:z,middlewareData:H}=Hj({strategy:"fixed",placement:G,whileElementsMounted:(...q)=>jj(...q,{animationFrame:b==="always"}),elements:{reference:C.anchor},middleware:[Ij({mainAxis:i+U,alignmentAxis:d}),m&&Uj({mainAxis:!0,crossAxis:!1,limiter:v==="partial"?Pj():void 0,...ee}),m&&$j({...ee}),Vj({...ee,apply:({elements:q,rects:Q,availableWidth:se,availableHeight:me})=>{const{width:pe,height:de}=Q.reference,he=q.floating.style;he.setProperty("--radix-popper-available-width",`${se}px`),he.setProperty("--radix-popper-available-height",`${me}px`),he.setProperty("--radix-popper-anchor-width",`${pe}px`),he.setProperty("--radix-popper-anchor-height",`${de}px`)}}),A&&qj({element:A,padding:f}),Jj({arrowWidth:B,arrowHeight:U}),y&&Yj({strategy:"referenceHidden",...ee})]}),[V,M]=Gb(T),I=wt(N);St(()=>{z&&I?.()},[z,I]);const W=H.arrow?.x,K=H.arrow?.y,ne=H.arrow?.centerOffset!==0,[fe,ue]=w.useState();return St(()=>{j&&ue(window.getComputedStyle(j).zIndex)},[j]),u.jsx("div",{ref:O.setFloating,"data-radix-popper-content-wrapper":"",style:{...P,transform:z?P.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:fe,"--radix-popper-transform-origin":[H.transformOrigin?.x,H.transformOrigin?.y].join(" "),...H.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(Zj,{scope:o,placedSide:V,onArrowChange:D,arrowX:W,arrowY:K,shouldHideArrow:ne,children:u.jsx(Me.div,{"data-side":V,"data-align":M,...S,ref:E,style:{...S.style,animation:z?void 0:"none"}})})})});Vb.displayName=zm;var Yb="PopperArrow",Qj={top:"bottom",right:"left",bottom:"top",left:"right"},qb=w.forwardRef(function(r,o){const{__scopePopper:s,...i}=r,c=Kj(Yb,s),d=Qj[c.placedSide];return u.jsx("span",{ref:c.onArrowChange,style:{position:"absolute",left:c.arrowX,top:c.arrowY,[d]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[c.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[c.placedSide],visibility:c.shouldHideArrow?"hidden":void 0},children:u.jsx(Xj,{...i,ref:o,style:{...i.style,display:"block"}})})});qb.displayName=Yb;function Wj(e){return e!==null}var Jj=e=>({name:"transformOrigin",options:e,fn(r){const{placement:o,rects:s,middlewareData:i}=r,d=i.arrow?.centerOffset!==0,f=d?0:e.arrowWidth,m=d?0:e.arrowHeight,[p,g]=Gb(o),v={start:"0%",center:"50%",end:"100%"}[g],y=(i.arrow?.x??0)+f/2,b=(i.arrow?.y??0)+m/2;let N="",S="";return p==="bottom"?(N=d?v:`${y}px`,S=`${-m}px`):p==="top"?(N=d?v:`${y}px`,S=`${s.floating.height+m}px`):p==="right"?(N=`${-m}px`,S=d?v:`${b}px`):p==="left"&&(N=`${s.floating.width+m}px`,S=d?v:`${b}px`),{data:{x:N,y:S}}}});function Gb(e){const[r,o="center"]=e.split("-");return[r,o]}var Xb=Ub,Fb=$b,Zb=Vb,Kb=qb,eA="Portal",Lm=w.forwardRef((e,r)=>{const{container:o,...s}=e,[i,c]=w.useState(!1);St(()=>c(!0),[]);const d=o||i&&globalThis?.document?.body;return d?gC.createPortal(u.jsx(Me.div,{...s,ref:r}),d):null});Lm.displayName=eA;function tA(e,r){return w.useReducer((o,s)=>r[o][s]??o,e)}var wn=e=>{const{present:r,children:o}=e,s=nA(r),i=typeof o=="function"?o({present:s.isPresent}):w.Children.only(o),c=Pe(s.ref,rA(i));return typeof o=="function"||s.isPresent?w.cloneElement(i,{ref:c}):null};wn.displayName="Presence";function nA(e){const[r,o]=w.useState(),s=w.useRef(null),i=w.useRef(e),c=w.useRef("none"),d=e?"mounted":"unmounted",[f,m]=tA(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const p=xc(s.current);c.current=f==="mounted"?p:"none"},[f]),St(()=>{const p=s.current,g=i.current;if(g!==e){const y=c.current,b=xc(p);e?m("MOUNT"):b==="none"||p?.display==="none"?m("UNMOUNT"):m(g&&y!==b?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,m]),St(()=>{if(r){let p;const g=r.ownerDocument.defaultView??window,v=b=>{const S=xc(s.current).includes(CSS.escape(b.animationName));if(b.target===r&&S&&(m("ANIMATION_END"),!i.current)){const C=r.style.animationFillMode;r.style.animationFillMode="forwards",p=g.setTimeout(()=>{r.style.animationFillMode==="forwards"&&(r.style.animationFillMode=C)})}},y=b=>{b.target===r&&(c.current=xc(s.current))};return r.addEventListener("animationstart",y),r.addEventListener("animationcancel",v),r.addEventListener("animationend",v),()=>{g.clearTimeout(p),r.removeEventListener("animationstart",y),r.removeEventListener("animationcancel",v),r.removeEventListener("animationend",v)}}else m("ANIMATION_END")},[r,m]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:w.useCallback(p=>{s.current=p?getComputedStyle(p):null,o(p)},[])}}function xc(e){return e?.animationName||"none"}function rA(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var bh="rovingFocusGroup.onEntryFocus",oA={bubbles:!1,cancelable:!0},Ii="RovingFocusGroup",[Fh,Qb,aA]=_m(Ii),[sA,wu]=pr(Ii,[aA]),[iA,lA]=sA(Ii),Wb=w.forwardRef((e,r)=>u.jsx(Fh.Provider,{scope:e.__scopeRovingFocusGroup,children:u.jsx(Fh.Slot,{scope:e.__scopeRovingFocusGroup,children:u.jsx(cA,{...e,ref:r})})}));Wb.displayName=Ii;var cA=w.forwardRef((e,r)=>{const{__scopeRovingFocusGroup:o,orientation:s,loop:i=!1,dir:c,currentTabStopId:d,defaultCurrentTabStopId:f,onCurrentTabStopIdChange:m,onEntryFocus:p,preventScrollOnEntryFocus:g=!1,...v}=e,y=w.useRef(null),b=Pe(r,y),N=Hi(c),[S,C]=Ha({prop:d,defaultProp:f??null,onChange:m,caller:Ii}),[j,R]=w.useState(!1),E=wt(p),A=Qb(o),D=w.useRef(!1),[L,B]=w.useState(0);return w.useEffect(()=>{const U=y.current;if(U)return U.addEventListener(bh,E),()=>U.removeEventListener(bh,E)},[E]),u.jsx(iA,{scope:o,orientation:s,dir:N,loop:i,currentTabStopId:S,onItemFocus:w.useCallback(U=>C(U),[C]),onItemShiftTab:w.useCallback(()=>R(!0),[]),onFocusableItemAdd:w.useCallback(()=>B(U=>U+1),[]),onFocusableItemRemove:w.useCallback(()=>B(U=>U-1),[]),children:u.jsx(Me.div,{tabIndex:j||L===0?-1:0,"data-orientation":s,...v,ref:b,style:{outline:"none",...e.style},onMouseDown:be(e.onMouseDown,()=>{D.current=!0}),onFocus:be(e.onFocus,U=>{const G=!D.current;if(U.target===U.currentTarget&&G&&!j){const re=new CustomEvent(bh,oA);if(U.currentTarget.dispatchEvent(re),!re.defaultPrevented){const Z=A().filter(T=>T.focusable),Y=Z.find(T=>T.active),ee=Z.find(T=>T.id===S),P=[Y,ee,...Z].filter(Boolean).map(T=>T.ref.current);tw(P,g)}}D.current=!1}),onBlur:be(e.onBlur,()=>R(!1))})})}),Jb="RovingFocusGroupItem",ew=w.forwardRef((e,r)=>{const{__scopeRovingFocusGroup:o,focusable:s=!0,active:i=!1,tabStopId:c,children:d,...f}=e,m=To(),p=c||m,g=lA(Jb,o),v=g.currentTabStopId===p,y=Qb(o),{onFocusableItemAdd:b,onFocusableItemRemove:N,currentTabStopId:S}=g;return w.useEffect(()=>{if(s)return b(),()=>N()},[s,b,N]),u.jsx(Fh.ItemSlot,{scope:o,id:p,focusable:s,active:i,children:u.jsx(Me.span,{tabIndex:v?0:-1,"data-orientation":g.orientation,...f,ref:r,onMouseDown:be(e.onMouseDown,C=>{s?g.onItemFocus(p):C.preventDefault()}),onFocus:be(e.onFocus,()=>g.onItemFocus(p)),onKeyDown:be(e.onKeyDown,C=>{if(C.key==="Tab"&&C.shiftKey){g.onItemShiftTab();return}if(C.target!==C.currentTarget)return;const j=fA(C,g.orientation,g.dir);if(j!==void 0){if(C.metaKey||C.ctrlKey||C.altKey||C.shiftKey)return;C.preventDefault();let E=y().filter(A=>A.focusable).map(A=>A.ref.current);if(j==="last")E.reverse();else if(j==="prev"||j==="next"){j==="prev"&&E.reverse();const A=E.indexOf(C.currentTarget);E=g.loop?hA(E,A+1):E.slice(A+1)}setTimeout(()=>tw(E))}}),children:typeof d=="function"?d({isCurrentTabStop:v,hasTabStop:S!=null}):d})})});ew.displayName=Jb;var uA={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function dA(e,r){return r!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function fA(e,r,o){const s=dA(e.key,o);if(!(r==="vertical"&&["ArrowLeft","ArrowRight"].includes(s))&&!(r==="horizontal"&&["ArrowUp","ArrowDown"].includes(s)))return uA[s]}function tw(e,r=!1){const o=document.activeElement;for(const s of e)if(s===o||(s.focus({preventScroll:r}),document.activeElement!==o))return}function hA(e,r){return e.map((o,s)=>e[(r+s)%e.length])}var nw=Wb,rw=ew,mA=function(e){if(typeof document>"u")return null;var r=Array.isArray(e)?e[0]:e;return r.ownerDocument.body},Ca=new WeakMap,yc=new WeakMap,vc={},wh=0,ow=function(e){return e&&(e.host||ow(e.parentNode))},pA=function(e,r){return r.map(function(o){if(e.contains(o))return o;var s=ow(o);return s&&e.contains(s)?s:(console.error("aria-hidden",o,"in not contained inside",e,". Doing nothing"),null)}).filter(function(o){return!!o})},gA=function(e,r,o,s){var i=pA(r,Array.isArray(e)?e:[e]);vc[o]||(vc[o]=new WeakMap);var c=vc[o],d=[],f=new Set,m=new Set(i),p=function(v){!v||f.has(v)||(f.add(v),p(v.parentNode))};i.forEach(p);var g=function(v){!v||m.has(v)||Array.prototype.forEach.call(v.children,function(y){if(f.has(y))g(y);else try{var b=y.getAttribute(s),N=b!==null&&b!=="false",S=(Ca.get(y)||0)+1,C=(c.get(y)||0)+1;Ca.set(y,S),c.set(y,C),d.push(y),S===1&&N&&yc.set(y,!0),C===1&&y.setAttribute(o,"true"),N||y.setAttribute(s,"true")}catch(j){console.error("aria-hidden: cannot operate on ",y,j)}})};return g(r),f.clear(),wh++,function(){d.forEach(function(v){var y=Ca.get(v)-1,b=c.get(v)-1;Ca.set(v,y),c.set(v,b),y||(yc.has(v)||v.removeAttribute(s),yc.delete(v)),b||v.removeAttribute(o)}),wh--,wh||(Ca=new WeakMap,Ca=new WeakMap,yc=new WeakMap,vc={})}},aw=function(e,r,o){o===void 0&&(o="data-aria-hidden");var s=Array.from(Array.isArray(e)?e:[e]),i=mA(e);return i?(s.push.apply(s,Array.from(i.querySelectorAll("[aria-live], script"))),gA(s,i,o,"aria-hidden")):function(){return null}},kn=function(){return kn=Object.assign||function(r){for(var o,s=1,i=arguments.length;s<i;s++){o=arguments[s];for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&(r[c]=o[c])}return r},kn.apply(this,arguments)};function sw(e,r){var o={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&r.indexOf(s)<0&&(o[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,s=Object.getOwnPropertySymbols(e);i<s.length;i++)r.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(e,s[i])&&(o[s[i]]=e[s[i]]);return o}function xA(e,r,o){if(o||arguments.length===2)for(var s=0,i=r.length,c;s<i;s++)(c||!(s in r))&&(c||(c=Array.prototype.slice.call(r,0,s)),c[s]=r[s]);return e.concat(c||Array.prototype.slice.call(r))}var Dc="right-scroll-bar-position",Oc="width-before-scroll-bar",yA="with-scroll-bars-hidden",vA="--removed-body-scroll-bar-size";function Sh(e,r){return typeof e=="function"?e(r):e&&(e.current=r),e}function bA(e,r){var o=w.useState(function(){return{value:e,callback:r,facade:{get current(){return o.value},set current(s){var i=o.value;i!==s&&(o.value=s,o.callback(s,i))}}}})[0];return o.callback=r,o.facade}var wA=typeof window<"u"?w.useLayoutEffect:w.useEffect,By=new WeakMap;function SA(e,r){var o=bA(null,function(s){return e.forEach(function(i){return Sh(i,s)})});return wA(function(){var s=By.get(o);if(s){var i=new Set(s),c=new Set(e),d=o.current;i.forEach(function(f){c.has(f)||Sh(f,null)}),c.forEach(function(f){i.has(f)||Sh(f,d)})}By.set(o,e)},[e]),o}function NA(e){return e}function EA(e,r){r===void 0&&(r=NA);var o=[],s=!1,i={read:function(){if(s)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:e},useMedium:function(c){var d=r(c,s);return o.push(d),function(){o=o.filter(function(f){return f!==d})}},assignSyncMedium:function(c){for(s=!0;o.length;){var d=o;o=[],d.forEach(c)}o={push:function(f){return c(f)},filter:function(){return o}}},assignMedium:function(c){s=!0;var d=[];if(o.length){var f=o;o=[],f.forEach(c),d=o}var m=function(){var g=d;d=[],g.forEach(c)},p=function(){return Promise.resolve().then(m)};p(),o={push:function(g){d.push(g),p()},filter:function(g){return d=d.filter(g),o}}}};return i}function _A(e){e===void 0&&(e={});var r=EA(null);return r.options=kn({async:!0,ssr:!1},e),r}var iw=function(e){var r=e.sideCar,o=sw(e,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var s=r.read();if(!s)throw new Error("Sidecar medium not found");return w.createElement(s,kn({},o))};iw.isSideCarExport=!0;function CA(e,r){return e.useMedium(r),iw}var lw=_A(),Nh=function(){},Su=w.forwardRef(function(e,r){var o=w.useRef(null),s=w.useState({onScrollCapture:Nh,onWheelCapture:Nh,onTouchMoveCapture:Nh}),i=s[0],c=s[1],d=e.forwardProps,f=e.children,m=e.className,p=e.removeScrollBar,g=e.enabled,v=e.shards,y=e.sideCar,b=e.noRelative,N=e.noIsolation,S=e.inert,C=e.allowPinchZoom,j=e.as,R=j===void 0?"div":j,E=e.gapMode,A=sw(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),D=y,L=SA([o,r]),B=kn(kn({},A),i);return w.createElement(w.Fragment,null,g&&w.createElement(D,{sideCar:lw,removeScrollBar:p,shards:v,noRelative:b,noIsolation:N,inert:S,setCallbacks:c,allowPinchZoom:!!C,lockRef:o,gapMode:E}),d?w.cloneElement(w.Children.only(f),kn(kn({},B),{ref:L})):w.createElement(R,kn({},B,{className:m,ref:L}),f))});Su.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Su.classNames={fullWidth:Oc,zeroRight:Dc};var jA=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function AA(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var r=jA();return r&&e.setAttribute("nonce",r),e}function MA(e,r){e.styleSheet?e.styleSheet.cssText=r:e.appendChild(document.createTextNode(r))}function TA(e){var r=document.head||document.getElementsByTagName("head")[0];r.appendChild(e)}var kA=function(){var e=0,r=null;return{add:function(o){e==0&&(r=AA())&&(MA(r,o),TA(r)),e++},remove:function(){e--,!e&&r&&(r.parentNode&&r.parentNode.removeChild(r),r=null)}}},RA=function(){var e=kA();return function(r,o){w.useEffect(function(){return e.add(r),function(){e.remove()}},[r&&o])}},cw=function(){var e=RA(),r=function(o){var s=o.styles,i=o.dynamic;return e(s,i),null};return r},DA={left:0,top:0,right:0,gap:0},Eh=function(e){return parseInt(e||"",10)||0},OA=function(e){var r=window.getComputedStyle(document.body),o=r[e==="padding"?"paddingLeft":"marginLeft"],s=r[e==="padding"?"paddingTop":"marginTop"],i=r[e==="padding"?"paddingRight":"marginRight"];return[Eh(o),Eh(s),Eh(i)]},zA=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return DA;var r=OA(e),o=document.documentElement.clientWidth,s=window.innerWidth;return{left:r[0],top:r[1],right:r[2],gap:Math.max(0,s-o+r[2]-r[0])}},LA=cw(),Da="data-scroll-locked",HA=function(e,r,o,s){var i=e.left,c=e.top,d=e.right,f=e.gap;return o===void 0&&(o="margin"),`
|
|
50
|
+
.`.concat(yA,` {
|
|
51
|
+
overflow: hidden `).concat(s,`;
|
|
52
|
+
padding-right: `).concat(f,"px ").concat(s,`;
|
|
53
|
+
}
|
|
54
|
+
body[`).concat(Da,`] {
|
|
55
|
+
overflow: hidden `).concat(s,`;
|
|
56
|
+
overscroll-behavior: contain;
|
|
57
|
+
`).concat([r&&"position: relative ".concat(s,";"),o==="margin"&&`
|
|
58
|
+
padding-left: `.concat(i,`px;
|
|
59
|
+
padding-top: `).concat(c,`px;
|
|
60
|
+
padding-right: `).concat(d,`px;
|
|
61
|
+
margin-left:0;
|
|
62
|
+
margin-top:0;
|
|
63
|
+
margin-right: `).concat(f,"px ").concat(s,`;
|
|
64
|
+
`),o==="padding"&&"padding-right: ".concat(f,"px ").concat(s,";")].filter(Boolean).join(""),`
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.`).concat(Dc,` {
|
|
68
|
+
right: `).concat(f,"px ").concat(s,`;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.`).concat(Oc,` {
|
|
72
|
+
margin-right: `).concat(f,"px ").concat(s,`;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.`).concat(Dc," .").concat(Dc,` {
|
|
76
|
+
right: 0 `).concat(s,`;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.`).concat(Oc," .").concat(Oc,` {
|
|
80
|
+
margin-right: 0 `).concat(s,`;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
body[`).concat(Da,`] {
|
|
84
|
+
`).concat(vA,": ").concat(f,`px;
|
|
85
|
+
}
|
|
86
|
+
`)},Iy=function(){var e=parseInt(document.body.getAttribute(Da)||"0",10);return isFinite(e)?e:0},BA=function(){w.useEffect(function(){return document.body.setAttribute(Da,(Iy()+1).toString()),function(){var e=Iy()-1;e<=0?document.body.removeAttribute(Da):document.body.setAttribute(Da,e.toString())}},[])},IA=function(e){var r=e.noRelative,o=e.noImportant,s=e.gapMode,i=s===void 0?"margin":s;BA();var c=w.useMemo(function(){return zA(i)},[i]);return w.createElement(LA,{styles:HA(c,!r,i,o?"":"!important")})},Zh=!1;if(typeof window<"u")try{var bc=Object.defineProperty({},"passive",{get:function(){return Zh=!0,!0}});window.addEventListener("test",bc,bc),window.removeEventListener("test",bc,bc)}catch{Zh=!1}var ja=Zh?{passive:!1}:!1,UA=function(e){return e.tagName==="TEXTAREA"},uw=function(e,r){if(!(e instanceof Element))return!1;var o=window.getComputedStyle(e);return o[r]!=="hidden"&&!(o.overflowY===o.overflowX&&!UA(e)&&o[r]==="visible")},PA=function(e){return uw(e,"overflowY")},$A=function(e){return uw(e,"overflowX")},Uy=function(e,r){var o=r.ownerDocument,s=r;do{typeof ShadowRoot<"u"&&s instanceof ShadowRoot&&(s=s.host);var i=dw(e,s);if(i){var c=fw(e,s),d=c[1],f=c[2];if(d>f)return!0}s=s.parentNode}while(s&&s!==o.body);return!1},VA=function(e){var r=e.scrollTop,o=e.scrollHeight,s=e.clientHeight;return[r,o,s]},YA=function(e){var r=e.scrollLeft,o=e.scrollWidth,s=e.clientWidth;return[r,o,s]},dw=function(e,r){return e==="v"?PA(r):$A(r)},fw=function(e,r){return e==="v"?VA(r):YA(r)},qA=function(e,r){return e==="h"&&r==="rtl"?-1:1},GA=function(e,r,o,s,i){var c=qA(e,window.getComputedStyle(r).direction),d=c*s,f=o.target,m=r.contains(f),p=!1,g=d>0,v=0,y=0;do{if(!f)break;var b=fw(e,f),N=b[0],S=b[1],C=b[2],j=S-C-c*N;(N||j)&&dw(e,f)&&(v+=j,y+=N);var R=f.parentNode;f=R&&R.nodeType===Node.DOCUMENT_FRAGMENT_NODE?R.host:R}while(!m&&f!==document.body||m&&(r.contains(f)||r===f));return(g&&Math.abs(v)<1||!g&&Math.abs(y)<1)&&(p=!0),p},wc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Py=function(e){return[e.deltaX,e.deltaY]},$y=function(e){return e&&"current"in e?e.current:e},XA=function(e,r){return e[0]===r[0]&&e[1]===r[1]},FA=function(e){return`
|
|
87
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
88
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
89
|
+
`)},ZA=0,Aa=[];function KA(e){var r=w.useRef([]),o=w.useRef([0,0]),s=w.useRef(),i=w.useState(ZA++)[0],c=w.useState(cw)[0],d=w.useRef(e);w.useEffect(function(){d.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var S=xA([e.lockRef.current],(e.shards||[]).map($y),!0).filter(Boolean);return S.forEach(function(C){return C.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),S.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var f=w.useCallback(function(S,C){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!d.current.allowPinchZoom;var j=wc(S),R=o.current,E="deltaX"in S?S.deltaX:R[0]-j[0],A="deltaY"in S?S.deltaY:R[1]-j[1],D,L=S.target,B=Math.abs(E)>Math.abs(A)?"h":"v";if("touches"in S&&B==="h"&&L.type==="range")return!1;var U=Uy(B,L);if(!U)return!0;if(U?D=B:(D=B==="v"?"h":"v",U=Uy(B,L)),!U)return!1;if(!s.current&&"changedTouches"in S&&(E||A)&&(s.current=D),!D)return!0;var G=s.current||D;return GA(G,C,S,G==="h"?E:A)},[]),m=w.useCallback(function(S){var C=S;if(!(!Aa.length||Aa[Aa.length-1]!==c)){var j="deltaY"in C?Py(C):wc(C),R=r.current.filter(function(D){return D.name===C.type&&(D.target===C.target||C.target===D.shadowParent)&&XA(D.delta,j)})[0];if(R&&R.should){C.cancelable&&C.preventDefault();return}if(!R){var E=(d.current.shards||[]).map($y).filter(Boolean).filter(function(D){return D.contains(C.target)}),A=E.length>0?f(C,E[0]):!d.current.noIsolation;A&&C.cancelable&&C.preventDefault()}}},[]),p=w.useCallback(function(S,C,j,R){var E={name:S,delta:C,target:j,should:R,shadowParent:QA(j)};r.current.push(E),setTimeout(function(){r.current=r.current.filter(function(A){return A!==E})},1)},[]),g=w.useCallback(function(S){o.current=wc(S),s.current=void 0},[]),v=w.useCallback(function(S){p(S.type,Py(S),S.target,f(S,e.lockRef.current))},[]),y=w.useCallback(function(S){p(S.type,wc(S),S.target,f(S,e.lockRef.current))},[]);w.useEffect(function(){return Aa.push(c),e.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:y}),document.addEventListener("wheel",m,ja),document.addEventListener("touchmove",m,ja),document.addEventListener("touchstart",g,ja),function(){Aa=Aa.filter(function(S){return S!==c}),document.removeEventListener("wheel",m,ja),document.removeEventListener("touchmove",m,ja),document.removeEventListener("touchstart",g,ja)}},[]);var b=e.removeScrollBar,N=e.inert;return w.createElement(w.Fragment,null,N?w.createElement(c,{styles:FA(i)}):null,b?w.createElement(IA,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function QA(e){for(var r=null;e!==null;)e instanceof ShadowRoot&&(r=e.host,e=e.host),e=e.parentNode;return r}const WA=CA(lw,KA);var Hm=w.forwardRef(function(e,r){return w.createElement(Su,kn({},e,{ref:r,sideCar:WA}))});Hm.classNames=Su.classNames;var Kh=["Enter"," "],JA=["ArrowDown","PageUp","Home"],hw=["ArrowUp","PageDown","End"],eM=[...JA,...hw],tM={ltr:[...Kh,"ArrowRight"],rtl:[...Kh,"ArrowLeft"]},nM={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ui="Menu",[wi,rM,oM]=_m(Ui),[Ho,mw]=pr(Ui,[oM,bu,wu]),Nu=bu(),pw=wu(),[aM,Bo]=Ho(Ui),[sM,Pi]=Ho(Ui),gw=e=>{const{__scopeMenu:r,open:o=!1,children:s,dir:i,onOpenChange:c,modal:d=!0}=e,f=Nu(r),[m,p]=w.useState(null),g=w.useRef(!1),v=wt(c),y=Hi(i);return w.useEffect(()=>{const b=()=>{g.current=!0,document.addEventListener("pointerdown",N,{capture:!0,once:!0}),document.addEventListener("pointermove",N,{capture:!0,once:!0})},N=()=>g.current=!1;return document.addEventListener("keydown",b,{capture:!0}),()=>{document.removeEventListener("keydown",b,{capture:!0}),document.removeEventListener("pointerdown",N,{capture:!0}),document.removeEventListener("pointermove",N,{capture:!0})}},[]),u.jsx(Xb,{...f,children:u.jsx(aM,{scope:r,open:o,onOpenChange:v,content:m,onContentChange:p,children:u.jsx(sM,{scope:r,onClose:w.useCallback(()=>v(!1),[v]),isUsingKeyboardRef:g,dir:y,modal:d,children:s})})})};gw.displayName=Ui;var iM="MenuAnchor",Bm=w.forwardRef((e,r)=>{const{__scopeMenu:o,...s}=e,i=Nu(o);return u.jsx(Fb,{...i,...s,ref:r})});Bm.displayName=iM;var Im="MenuPortal",[lM,xw]=Ho(Im,{forceMount:void 0}),yw=e=>{const{__scopeMenu:r,forceMount:o,children:s,container:i}=e,c=Bo(Im,r);return u.jsx(lM,{scope:r,forceMount:o,children:u.jsx(wn,{present:o||c.open,children:u.jsx(Lm,{asChild:!0,container:i,children:s})})})};yw.displayName=Im;var sn="MenuContent",[cM,Um]=Ho(sn),vw=w.forwardRef((e,r)=>{const o=xw(sn,e.__scopeMenu),{forceMount:s=o.forceMount,...i}=e,c=Bo(sn,e.__scopeMenu),d=Pi(sn,e.__scopeMenu);return u.jsx(wi.Provider,{scope:e.__scopeMenu,children:u.jsx(wn,{present:s||c.open,children:u.jsx(wi.Slot,{scope:e.__scopeMenu,children:d.modal?u.jsx(uM,{...i,ref:r}):u.jsx(dM,{...i,ref:r})})})})}),uM=w.forwardRef((e,r)=>{const o=Bo(sn,e.__scopeMenu),s=w.useRef(null),i=Pe(r,s);return w.useEffect(()=>{const c=s.current;if(c)return aw(c)},[]),u.jsx(Pm,{...e,ref:i,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:be(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>o.onOpenChange(!1)})}),dM=w.forwardRef((e,r)=>{const o=Bo(sn,e.__scopeMenu);return u.jsx(Pm,{...e,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>o.onOpenChange(!1)})}),fM=La("MenuContent.ScrollLock"),Pm=w.forwardRef((e,r)=>{const{__scopeMenu:o,loop:s=!1,trapFocus:i,onOpenAutoFocus:c,onCloseAutoFocus:d,disableOutsidePointerEvents:f,onEntryFocus:m,onEscapeKeyDown:p,onPointerDownOutside:g,onFocusOutside:v,onInteractOutside:y,onDismiss:b,disableOutsideScroll:N,...S}=e,C=Bo(sn,o),j=Pi(sn,o),R=Nu(o),E=pw(o),A=rM(o),[D,L]=w.useState(null),B=w.useRef(null),U=Pe(r,B,C.onContentChange),G=w.useRef(0),re=w.useRef(""),Z=w.useRef(0),Y=w.useRef(null),ee=w.useRef("right"),O=w.useRef(0),P=N?Hm:w.Fragment,T=N?{as:fM,allowPinchZoom:!0}:void 0,z=V=>{const M=re.current+V,I=A().filter(q=>!q.disabled),W=document.activeElement,K=I.find(q=>q.ref.current===W)?.textValue,ne=I.map(q=>q.textValue),fe=EM(ne,M,K),ue=I.find(q=>q.textValue===fe)?.ref.current;(function q(Q){re.current=Q,window.clearTimeout(G.current),Q!==""&&(G.current=window.setTimeout(()=>q(""),1e3))})(M),ue&&setTimeout(()=>ue.focus())};w.useEffect(()=>()=>window.clearTimeout(G.current),[]),Nb();const H=w.useCallback(V=>ee.current===Y.current?.side&&CM(V,Y.current?.area),[]);return u.jsx(cM,{scope:o,searchRef:re,onItemEnter:w.useCallback(V=>{H(V)&&V.preventDefault()},[H]),onItemLeave:w.useCallback(V=>{H(V)||(B.current?.focus(),L(null))},[H]),onTriggerLeave:w.useCallback(V=>{H(V)&&V.preventDefault()},[H]),pointerGraceTimerRef:Z,onPointerGraceIntentChange:w.useCallback(V=>{Y.current=V},[]),children:u.jsx(P,{...T,children:u.jsx(jm,{asChild:!0,trapped:i,onMountAutoFocus:be(c,V=>{V.preventDefault(),B.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:d,children:u.jsx(Cm,{asChild:!0,disableOutsidePointerEvents:f,onEscapeKeyDown:p,onPointerDownOutside:g,onFocusOutside:v,onInteractOutside:y,onDismiss:b,children:u.jsx(nw,{asChild:!0,...E,dir:j.dir,orientation:"vertical",loop:s,currentTabStopId:D,onCurrentTabStopIdChange:L,onEntryFocus:be(m,V=>{j.isUsingKeyboardRef.current||V.preventDefault()}),preventScrollOnEntryFocus:!0,children:u.jsx(Zb,{role:"menu","aria-orientation":"vertical","data-state":zw(C.open),"data-radix-menu-content":"",dir:j.dir,...R,...S,ref:U,style:{outline:"none",...S.style},onKeyDown:be(S.onKeyDown,V=>{const I=V.target.closest("[data-radix-menu-content]")===V.currentTarget,W=V.ctrlKey||V.altKey||V.metaKey,K=V.key.length===1;I&&(V.key==="Tab"&&V.preventDefault(),!W&&K&&z(V.key));const ne=B.current;if(V.target!==ne||!eM.includes(V.key))return;V.preventDefault();const ue=A().filter(q=>!q.disabled).map(q=>q.ref.current);hw.includes(V.key)&&ue.reverse(),SM(ue)}),onBlur:be(e.onBlur,V=>{V.currentTarget.contains(V.target)||(window.clearTimeout(G.current),re.current="")}),onPointerMove:be(e.onPointerMove,Si(V=>{const M=V.target,I=O.current!==V.clientX;if(V.currentTarget.contains(M)&&I){const W=V.clientX>O.current?"right":"left";ee.current=W,O.current=V.clientX}}))})})})})})})});vw.displayName=sn;var hM="MenuGroup",$m=w.forwardRef((e,r)=>{const{__scopeMenu:o,...s}=e;return u.jsx(Me.div,{role:"group",...s,ref:r})});$m.displayName=hM;var mM="MenuLabel",bw=w.forwardRef((e,r)=>{const{__scopeMenu:o,...s}=e;return u.jsx(Me.div,{...s,ref:r})});bw.displayName=mM;var Fc="MenuItem",Vy="menu.itemSelect",Eu=w.forwardRef((e,r)=>{const{disabled:o=!1,onSelect:s,...i}=e,c=w.useRef(null),d=Pi(Fc,e.__scopeMenu),f=Um(Fc,e.__scopeMenu),m=Pe(r,c),p=w.useRef(!1),g=()=>{const v=c.current;if(!o&&v){const y=new CustomEvent(Vy,{bubbles:!0,cancelable:!0});v.addEventListener(Vy,b=>s?.(b),{once:!0}),bb(v,y),y.defaultPrevented?p.current=!1:d.onClose()}};return u.jsx(ww,{...i,ref:m,disabled:o,onClick:be(e.onClick,g),onPointerDown:v=>{e.onPointerDown?.(v),p.current=!0},onPointerUp:be(e.onPointerUp,v=>{p.current||v.currentTarget?.click()}),onKeyDown:be(e.onKeyDown,v=>{const y=f.searchRef.current!=="";o||y&&v.key===" "||Kh.includes(v.key)&&(v.currentTarget.click(),v.preventDefault())})})});Eu.displayName=Fc;var ww=w.forwardRef((e,r)=>{const{__scopeMenu:o,disabled:s=!1,textValue:i,...c}=e,d=Um(Fc,o),f=pw(o),m=w.useRef(null),p=Pe(r,m),[g,v]=w.useState(!1),[y,b]=w.useState("");return w.useEffect(()=>{const N=m.current;N&&b((N.textContent??"").trim())},[c.children]),u.jsx(wi.ItemSlot,{scope:o,disabled:s,textValue:i??y,children:u.jsx(rw,{asChild:!0,...f,focusable:!s,children:u.jsx(Me.div,{role:"menuitem","data-highlighted":g?"":void 0,"aria-disabled":s||void 0,"data-disabled":s?"":void 0,...c,ref:p,onPointerMove:be(e.onPointerMove,Si(N=>{s?d.onItemLeave(N):(d.onItemEnter(N),N.defaultPrevented||N.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:be(e.onPointerLeave,Si(N=>d.onItemLeave(N))),onFocus:be(e.onFocus,()=>v(!0)),onBlur:be(e.onBlur,()=>v(!1))})})})}),pM="MenuCheckboxItem",Sw=w.forwardRef((e,r)=>{const{checked:o=!1,onCheckedChange:s,...i}=e;return u.jsx(jw,{scope:e.__scopeMenu,checked:o,children:u.jsx(Eu,{role:"menuitemcheckbox","aria-checked":Zc(o)?"mixed":o,...i,ref:r,"data-state":Ym(o),onSelect:be(i.onSelect,()=>s?.(Zc(o)?!0:!o),{checkForDefaultPrevented:!1})})})});Sw.displayName=pM;var Nw="MenuRadioGroup",[gM,xM]=Ho(Nw,{value:void 0,onValueChange:()=>{}}),Ew=w.forwardRef((e,r)=>{const{value:o,onValueChange:s,...i}=e,c=wt(s);return u.jsx(gM,{scope:e.__scopeMenu,value:o,onValueChange:c,children:u.jsx($m,{...i,ref:r})})});Ew.displayName=Nw;var _w="MenuRadioItem",Cw=w.forwardRef((e,r)=>{const{value:o,...s}=e,i=xM(_w,e.__scopeMenu),c=o===i.value;return u.jsx(jw,{scope:e.__scopeMenu,checked:c,children:u.jsx(Eu,{role:"menuitemradio","aria-checked":c,...s,ref:r,"data-state":Ym(c),onSelect:be(s.onSelect,()=>i.onValueChange?.(o),{checkForDefaultPrevented:!1})})})});Cw.displayName=_w;var Vm="MenuItemIndicator",[jw,yM]=Ho(Vm,{checked:!1}),Aw=w.forwardRef((e,r)=>{const{__scopeMenu:o,forceMount:s,...i}=e,c=yM(Vm,o);return u.jsx(wn,{present:s||Zc(c.checked)||c.checked===!0,children:u.jsx(Me.span,{...i,ref:r,"data-state":Ym(c.checked)})})});Aw.displayName=Vm;var vM="MenuSeparator",Mw=w.forwardRef((e,r)=>{const{__scopeMenu:o,...s}=e;return u.jsx(Me.div,{role:"separator","aria-orientation":"horizontal",...s,ref:r})});Mw.displayName=vM;var bM="MenuArrow",Tw=w.forwardRef((e,r)=>{const{__scopeMenu:o,...s}=e,i=Nu(o);return u.jsx(Kb,{...i,...s,ref:r})});Tw.displayName=bM;var wM="MenuSub",[yL,kw]=Ho(wM),fi="MenuSubTrigger",Rw=w.forwardRef((e,r)=>{const o=Bo(fi,e.__scopeMenu),s=Pi(fi,e.__scopeMenu),i=kw(fi,e.__scopeMenu),c=Um(fi,e.__scopeMenu),d=w.useRef(null),{pointerGraceTimerRef:f,onPointerGraceIntentChange:m}=c,p={__scopeMenu:e.__scopeMenu},g=w.useCallback(()=>{d.current&&window.clearTimeout(d.current),d.current=null},[]);return w.useEffect(()=>g,[g]),w.useEffect(()=>{const v=f.current;return()=>{window.clearTimeout(v),m(null)}},[f,m]),u.jsx(Bm,{asChild:!0,...p,children:u.jsx(ww,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":i.contentId,"data-state":zw(o.open),...e,ref:pu(r,i.onTriggerChange),onClick:v=>{e.onClick?.(v),!(e.disabled||v.defaultPrevented)&&(v.currentTarget.focus(),o.open||o.onOpenChange(!0))},onPointerMove:be(e.onPointerMove,Si(v=>{c.onItemEnter(v),!v.defaultPrevented&&!e.disabled&&!o.open&&!d.current&&(c.onPointerGraceIntentChange(null),d.current=window.setTimeout(()=>{o.onOpenChange(!0),g()},100))})),onPointerLeave:be(e.onPointerLeave,Si(v=>{g();const y=o.content?.getBoundingClientRect();if(y){const b=o.content?.dataset.side,N=b==="right",S=N?-5:5,C=y[N?"left":"right"],j=y[N?"right":"left"];c.onPointerGraceIntentChange({area:[{x:v.clientX+S,y:v.clientY},{x:C,y:y.top},{x:j,y:y.top},{x:j,y:y.bottom},{x:C,y:y.bottom}],side:b}),window.clearTimeout(f.current),f.current=window.setTimeout(()=>c.onPointerGraceIntentChange(null),300)}else{if(c.onTriggerLeave(v),v.defaultPrevented)return;c.onPointerGraceIntentChange(null)}})),onKeyDown:be(e.onKeyDown,v=>{const y=c.searchRef.current!=="";e.disabled||y&&v.key===" "||tM[s.dir].includes(v.key)&&(o.onOpenChange(!0),o.content?.focus(),v.preventDefault())})})})});Rw.displayName=fi;var Dw="MenuSubContent",Ow=w.forwardRef((e,r)=>{const o=xw(sn,e.__scopeMenu),{forceMount:s=o.forceMount,...i}=e,c=Bo(sn,e.__scopeMenu),d=Pi(sn,e.__scopeMenu),f=kw(Dw,e.__scopeMenu),m=w.useRef(null),p=Pe(r,m);return u.jsx(wi.Provider,{scope:e.__scopeMenu,children:u.jsx(wn,{present:s||c.open,children:u.jsx(wi.Slot,{scope:e.__scopeMenu,children:u.jsx(Pm,{id:f.contentId,"aria-labelledby":f.triggerId,...i,ref:p,align:"start",side:d.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:g=>{d.isUsingKeyboardRef.current&&m.current?.focus(),g.preventDefault()},onCloseAutoFocus:g=>g.preventDefault(),onFocusOutside:be(e.onFocusOutside,g=>{g.target!==f.trigger&&c.onOpenChange(!1)}),onEscapeKeyDown:be(e.onEscapeKeyDown,g=>{d.onClose(),g.preventDefault()}),onKeyDown:be(e.onKeyDown,g=>{const v=g.currentTarget.contains(g.target),y=nM[d.dir].includes(g.key);v&&y&&(c.onOpenChange(!1),f.trigger?.focus(),g.preventDefault())})})})})})});Ow.displayName=Dw;function zw(e){return e?"open":"closed"}function Zc(e){return e==="indeterminate"}function Ym(e){return Zc(e)?"indeterminate":e?"checked":"unchecked"}function SM(e){const r=document.activeElement;for(const o of e)if(o===r||(o.focus(),document.activeElement!==r))return}function NM(e,r){return e.map((o,s)=>e[(r+s)%e.length])}function EM(e,r,o){const i=r.length>1&&Array.from(r).every(p=>p===r[0])?r[0]:r,c=o?e.indexOf(o):-1;let d=NM(e,Math.max(c,0));i.length===1&&(d=d.filter(p=>p!==o));const m=d.find(p=>p.toLowerCase().startsWith(i.toLowerCase()));return m!==o?m:void 0}function _M(e,r){const{x:o,y:s}=e;let i=!1;for(let c=0,d=r.length-1;c<r.length;d=c++){const f=r[c],m=r[d],p=f.x,g=f.y,v=m.x,y=m.y;g>s!=y>s&&o<(v-p)*(s-g)/(y-g)+p&&(i=!i)}return i}function CM(e,r){if(!r)return!1;const o={x:e.clientX,y:e.clientY};return _M(o,r)}function Si(e){return r=>r.pointerType==="mouse"?e(r):void 0}var jM=gw,AM=Bm,MM=yw,TM=vw,kM=$m,RM=bw,DM=Eu,OM=Sw,zM=Ew,LM=Cw,HM=Aw,BM=Mw,IM=Tw,UM=Rw,PM=Ow,_u="DropdownMenu",[$M,vL]=pr(_u,[mw]),Mt=mw(),[VM,Lw]=$M(_u),Hw=e=>{const{__scopeDropdownMenu:r,children:o,dir:s,open:i,defaultOpen:c,onOpenChange:d,modal:f=!0}=e,m=Mt(r),p=w.useRef(null),[g,v]=Ha({prop:i,defaultProp:c??!1,onChange:d,caller:_u});return u.jsx(VM,{scope:r,triggerId:To(),triggerRef:p,contentId:To(),open:g,onOpenChange:v,onOpenToggle:w.useCallback(()=>v(y=>!y),[v]),modal:f,children:u.jsx(jM,{...m,open:g,onOpenChange:v,dir:s,modal:f,children:o})})};Hw.displayName=_u;var Bw="DropdownMenuTrigger",Iw=w.forwardRef((e,r)=>{const{__scopeDropdownMenu:o,disabled:s=!1,...i}=e,c=Lw(Bw,o),d=Mt(o);return u.jsx(AM,{asChild:!0,...d,children:u.jsx(Me.button,{type:"button",id:c.triggerId,"aria-haspopup":"menu","aria-expanded":c.open,"aria-controls":c.open?c.contentId:void 0,"data-state":c.open?"open":"closed","data-disabled":s?"":void 0,disabled:s,...i,ref:pu(r,c.triggerRef),onPointerDown:be(e.onPointerDown,f=>{!s&&f.button===0&&f.ctrlKey===!1&&(c.onOpenToggle(),c.open||f.preventDefault())}),onKeyDown:be(e.onKeyDown,f=>{s||(["Enter"," "].includes(f.key)&&c.onOpenToggle(),f.key==="ArrowDown"&&c.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(f.key)&&f.preventDefault())})})})});Iw.displayName=Bw;var YM="DropdownMenuPortal",Uw=e=>{const{__scopeDropdownMenu:r,...o}=e,s=Mt(r);return u.jsx(MM,{...s,...o})};Uw.displayName=YM;var Pw="DropdownMenuContent",$w=w.forwardRef((e,r)=>{const{__scopeDropdownMenu:o,...s}=e,i=Lw(Pw,o),c=Mt(o),d=w.useRef(!1);return u.jsx(TM,{id:i.contentId,"aria-labelledby":i.triggerId,...c,...s,ref:r,onCloseAutoFocus:be(e.onCloseAutoFocus,f=>{d.current||i.triggerRef.current?.focus(),d.current=!1,f.preventDefault()}),onInteractOutside:be(e.onInteractOutside,f=>{const m=f.detail.originalEvent,p=m.button===0&&m.ctrlKey===!0,g=m.button===2||p;(!i.modal||g)&&(d.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});$w.displayName=Pw;var qM="DropdownMenuGroup",GM=w.forwardRef((e,r)=>{const{__scopeDropdownMenu:o,...s}=e,i=Mt(o);return u.jsx(kM,{...i,...s,ref:r})});GM.displayName=qM;var XM="DropdownMenuLabel",Vw=w.forwardRef((e,r)=>{const{__scopeDropdownMenu:o,...s}=e,i=Mt(o);return u.jsx(RM,{...i,...s,ref:r})});Vw.displayName=XM;var FM="DropdownMenuItem",Yw=w.forwardRef((e,r)=>{const{__scopeDropdownMenu:o,...s}=e,i=Mt(o);return u.jsx(DM,{...i,...s,ref:r})});Yw.displayName=FM;var ZM="DropdownMenuCheckboxItem",KM=w.forwardRef((e,r)=>{const{__scopeDropdownMenu:o,...s}=e,i=Mt(o);return u.jsx(OM,{...i,...s,ref:r})});KM.displayName=ZM;var QM="DropdownMenuRadioGroup",WM=w.forwardRef((e,r)=>{const{__scopeDropdownMenu:o,...s}=e,i=Mt(o);return u.jsx(zM,{...i,...s,ref:r})});WM.displayName=QM;var JM="DropdownMenuRadioItem",eT=w.forwardRef((e,r)=>{const{__scopeDropdownMenu:o,...s}=e,i=Mt(o);return u.jsx(LM,{...i,...s,ref:r})});eT.displayName=JM;var tT="DropdownMenuItemIndicator",nT=w.forwardRef((e,r)=>{const{__scopeDropdownMenu:o,...s}=e,i=Mt(o);return u.jsx(HM,{...i,...s,ref:r})});nT.displayName=tT;var rT="DropdownMenuSeparator",qw=w.forwardRef((e,r)=>{const{__scopeDropdownMenu:o,...s}=e,i=Mt(o);return u.jsx(BM,{...i,...s,ref:r})});qw.displayName=rT;var oT="DropdownMenuArrow",aT=w.forwardRef((e,r)=>{const{__scopeDropdownMenu:o,...s}=e,i=Mt(o);return u.jsx(IM,{...i,...s,ref:r})});aT.displayName=oT;var sT="DropdownMenuSubTrigger",iT=w.forwardRef((e,r)=>{const{__scopeDropdownMenu:o,...s}=e,i=Mt(o);return u.jsx(UM,{...i,...s,ref:r})});iT.displayName=sT;var lT="DropdownMenuSubContent",cT=w.forwardRef((e,r)=>{const{__scopeDropdownMenu:o,...s}=e,i=Mt(o);return u.jsx(PM,{...i,...s,ref:r,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});cT.displayName=lT;var uT=Hw,dT=Iw,fT=Uw,hT=$w,mT=Vw,pT=Yw,gT=qw;/**
|
|
90
|
+
* @license lucide-react v0.540.0 - ISC
|
|
91
|
+
*
|
|
92
|
+
* This source code is licensed under the ISC license.
|
|
93
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
94
|
+
*/const xT=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),yT=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,o,s)=>s?s.toUpperCase():o.toLowerCase()),Yy=e=>{const r=yT(e);return r.charAt(0).toUpperCase()+r.slice(1)},Gw=(...e)=>e.filter((r,o,s)=>!!r&&r.trim()!==""&&s.indexOf(r)===o).join(" ").trim(),vT=e=>{for(const r in e)if(r.startsWith("aria-")||r==="role"||r==="title")return!0};/**
|
|
95
|
+
* @license lucide-react v0.540.0 - ISC
|
|
96
|
+
*
|
|
97
|
+
* This source code is licensed under the ISC license.
|
|
98
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
99
|
+
*/var bT={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"};/**
|
|
100
|
+
* @license lucide-react v0.540.0 - ISC
|
|
101
|
+
*
|
|
102
|
+
* This source code is licensed under the ISC license.
|
|
103
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
104
|
+
*/const wT=w.forwardRef(({color:e="currentColor",size:r=24,strokeWidth:o=2,absoluteStrokeWidth:s,className:i="",children:c,iconNode:d,...f},m)=>w.createElement("svg",{ref:m,...bT,width:r,height:r,stroke:e,strokeWidth:s?Number(o)*24/Number(r):o,className:Gw("lucide",i),...!c&&!vT(f)&&{"aria-hidden":"true"},...f},[...d.map(([p,g])=>w.createElement(p,g)),...Array.isArray(c)?c:[c]]));/**
|
|
105
|
+
* @license lucide-react v0.540.0 - ISC
|
|
106
|
+
*
|
|
107
|
+
* This source code is licensed under the ISC license.
|
|
108
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
109
|
+
*/const Ee=(e,r)=>{const o=w.forwardRef(({className:s,...i},c)=>w.createElement(wT,{ref:c,iconNode:r,className:Gw(`lucide-${xT(Yy(e))}`,`lucide-${e}`,s),...i}));return o.displayName=Yy(e),o};/**
|
|
110
|
+
* @license lucide-react v0.540.0 - ISC
|
|
111
|
+
*
|
|
112
|
+
* This source code is licensed under the ISC license.
|
|
113
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
114
|
+
*/const ST=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],qm=Ee("activity",ST);/**
|
|
115
|
+
* @license lucide-react v0.540.0 - ISC
|
|
116
|
+
*
|
|
117
|
+
* This source code is licensed under the ISC license.
|
|
118
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
119
|
+
*/const NT=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],ET=Ee("arrow-down",NT);/**
|
|
120
|
+
* @license lucide-react v0.540.0 - ISC
|
|
121
|
+
*
|
|
122
|
+
* This source code is licensed under the ISC license.
|
|
123
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
124
|
+
*/const _T=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],CT=Ee("arrow-left",_T);/**
|
|
125
|
+
* @license lucide-react v0.540.0 - ISC
|
|
126
|
+
*
|
|
127
|
+
* This source code is licensed under the ISC license.
|
|
128
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
129
|
+
*/const jT=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],Qr=Ee("bot",jT);/**
|
|
130
|
+
* @license lucide-react v0.540.0 - ISC
|
|
131
|
+
*
|
|
132
|
+
* This source code is licensed under the ISC license.
|
|
133
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
134
|
+
*/const AT=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Xw=Ee("check",AT);/**
|
|
135
|
+
* @license lucide-react v0.540.0 - ISC
|
|
136
|
+
*
|
|
137
|
+
* This source code is licensed under the ISC license.
|
|
138
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
139
|
+
*/const MT=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Sn=Ee("chevron-down",MT);/**
|
|
140
|
+
* @license lucide-react v0.540.0 - ISC
|
|
141
|
+
*
|
|
142
|
+
* This source code is licensed under the ISC license.
|
|
143
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
144
|
+
*/const TT=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],kT=Ee("chevron-left",TT);/**
|
|
145
|
+
* @license lucide-react v0.540.0 - ISC
|
|
146
|
+
*
|
|
147
|
+
* This source code is licensed under the ISC license.
|
|
148
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
149
|
+
*/const RT=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Fw=Ee("chevron-right",RT);/**
|
|
150
|
+
* @license lucide-react v0.540.0 - ISC
|
|
151
|
+
*
|
|
152
|
+
* This source code is licensed under the ISC license.
|
|
153
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
154
|
+
*/const DT=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Zw=Ee("chevron-up",DT);/**
|
|
155
|
+
* @license lucide-react v0.540.0 - ISC
|
|
156
|
+
*
|
|
157
|
+
* This source code is licensed under the ISC license.
|
|
158
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
159
|
+
*/const OT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Ia=Ee("circle-alert",OT);/**
|
|
160
|
+
* @license lucide-react v0.540.0 - ISC
|
|
161
|
+
*
|
|
162
|
+
* This source code is licensed under the ISC license.
|
|
163
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
164
|
+
*/const zT=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Qh=Ee("circle-check-big",zT);/**
|
|
165
|
+
* @license lucide-react v0.540.0 - ISC
|
|
166
|
+
*
|
|
167
|
+
* This source code is licensed under the ISC license.
|
|
168
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
169
|
+
*/const LT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Kc=Ee("circle-check",LT);/**
|
|
170
|
+
* @license lucide-react v0.540.0 - ISC
|
|
171
|
+
*
|
|
172
|
+
* This source code is licensed under the ISC license.
|
|
173
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
174
|
+
*/const HT=[["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"}]],Cu=Ee("circle-x",HT);/**
|
|
175
|
+
* @license lucide-react v0.540.0 - ISC
|
|
176
|
+
*
|
|
177
|
+
* This source code is licensed under the ISC license.
|
|
178
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
179
|
+
*/const BT=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],Kw=Ee("code",BT);/**
|
|
180
|
+
* @license lucide-react v0.540.0 - ISC
|
|
181
|
+
*
|
|
182
|
+
* This source code is licensed under the ISC license.
|
|
183
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
184
|
+
*/const IT=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],Qc=Ee("database",IT);/**
|
|
185
|
+
* @license lucide-react v0.540.0 - ISC
|
|
186
|
+
*
|
|
187
|
+
* This source code is licensed under the ISC license.
|
|
188
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
189
|
+
*/const UT=[["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"}]],qy=Ee("download",UT);/**
|
|
190
|
+
* @license lucide-react v0.540.0 - ISC
|
|
191
|
+
*
|
|
192
|
+
* This source code is licensed under the ISC license.
|
|
193
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
194
|
+
*/const PT=[["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"}]],$T=Ee("ellipsis-vertical",PT);/**
|
|
195
|
+
* @license lucide-react v0.540.0 - ISC
|
|
196
|
+
*
|
|
197
|
+
* This source code is licensed under the ISC license.
|
|
198
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
199
|
+
*/const VT=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],YT=Ee("external-link",VT);/**
|
|
200
|
+
* @license lucide-react v0.540.0 - ISC
|
|
201
|
+
*
|
|
202
|
+
* This source code is licensed under the ISC license.
|
|
203
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
204
|
+
*/const qT=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Ni=Ee("file-text",qT);/**
|
|
205
|
+
* @license lucide-react v0.540.0 - ISC
|
|
206
|
+
*
|
|
207
|
+
* This source code is licensed under the ISC license.
|
|
208
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
209
|
+
*/const GT=[["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"}]],Gm=Ee("folder-open",GT);/**
|
|
210
|
+
* @license lucide-react v0.540.0 - ISC
|
|
211
|
+
*
|
|
212
|
+
* This source code is licensed under the ISC license.
|
|
213
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
214
|
+
*/const XT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Xm=Ee("globe",XT);/**
|
|
215
|
+
* @license lucide-react v0.540.0 - ISC
|
|
216
|
+
*
|
|
217
|
+
* This source code is licensed under the ISC license.
|
|
218
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
219
|
+
*/const FT=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],ZT=Ee("grid-3x3",FT);/**
|
|
220
|
+
* @license lucide-react v0.540.0 - ISC
|
|
221
|
+
*
|
|
222
|
+
* This source code is licensed under the ISC license.
|
|
223
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
224
|
+
*/const KT=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]],QT=Ee("house",KT);/**
|
|
225
|
+
* @license lucide-react v0.540.0 - ISC
|
|
226
|
+
*
|
|
227
|
+
* This source code is licensed under the ISC license.
|
|
228
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
229
|
+
*/const WT=[["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"}]],JT=Ee("image",WT);/**
|
|
230
|
+
* @license lucide-react v0.540.0 - ISC
|
|
231
|
+
*
|
|
232
|
+
* This source code is licensed under the ISC license.
|
|
233
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
234
|
+
*/const ek=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],tk=Ee("info",ek);/**
|
|
235
|
+
* @license lucide-react v0.540.0 - ISC
|
|
236
|
+
*
|
|
237
|
+
* This source code is licensed under the ISC license.
|
|
238
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
239
|
+
*/const nk=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],rk=Ee("key",nk);/**
|
|
240
|
+
* @license lucide-react v0.540.0 - ISC
|
|
241
|
+
*
|
|
242
|
+
* This source code is licensed under the ISC license.
|
|
243
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
244
|
+
*/const ok=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Fm=Ee("loader-circle",ok);/**
|
|
245
|
+
* @license lucide-react v0.540.0 - ISC
|
|
246
|
+
*
|
|
247
|
+
* This source code is licensed under the ISC license.
|
|
248
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
249
|
+
*/const ak=[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]],sk=Ee("map",ak);/**
|
|
250
|
+
* @license lucide-react v0.540.0 - ISC
|
|
251
|
+
*
|
|
252
|
+
* This source code is licensed under the ISC license.
|
|
253
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
254
|
+
*/const ik=[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]],lk=Ee("maximize",ik);/**
|
|
255
|
+
* @license lucide-react v0.540.0 - ISC
|
|
256
|
+
*
|
|
257
|
+
* This source code is licensed under the ISC license.
|
|
258
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
259
|
+
*/const ck=[["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"}]],Qw=Ee("message-square",ck);/**
|
|
260
|
+
* @license lucide-react v0.540.0 - ISC
|
|
261
|
+
*
|
|
262
|
+
* This source code is licensed under the ISC license.
|
|
263
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
264
|
+
*/const uk=[["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"}]],dk=Ee("moon",uk);/**
|
|
265
|
+
* @license lucide-react v0.540.0 - ISC
|
|
266
|
+
*
|
|
267
|
+
* This source code is licensed under the ISC license.
|
|
268
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
269
|
+
*/const fk=[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]],Ww=Ee("music",fk);/**
|
|
270
|
+
* @license lucide-react v0.540.0 - ISC
|
|
271
|
+
*
|
|
272
|
+
* This source code is licensed under the ISC license.
|
|
273
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
274
|
+
*/const hk=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],Jw=Ee("package",hk);/**
|
|
275
|
+
* @license lucide-react v0.540.0 - ISC
|
|
276
|
+
*
|
|
277
|
+
* This source code is licensed under the ISC license.
|
|
278
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
279
|
+
*/const mk=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],pk=Ee("paperclip",mk);/**
|
|
280
|
+
* @license lucide-react v0.540.0 - ISC
|
|
281
|
+
*
|
|
282
|
+
* This source code is licensed under the ISC license.
|
|
283
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
284
|
+
*/const gk=[["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"}]],xk=Ee("play",gk);/**
|
|
285
|
+
* @license lucide-react v0.540.0 - ISC
|
|
286
|
+
*
|
|
287
|
+
* This source code is licensed under the ISC license.
|
|
288
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
289
|
+
*/const yk=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Wc=Ee("plus",yk);/**
|
|
290
|
+
* @license lucide-react v0.540.0 - ISC
|
|
291
|
+
*
|
|
292
|
+
* This source code is licensed under the ISC license.
|
|
293
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
294
|
+
*/const vk=[["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"}]],Zm=Ee("rotate-ccw",vk);/**
|
|
295
|
+
* @license lucide-react v0.540.0 - ISC
|
|
296
|
+
*
|
|
297
|
+
* This source code is licensed under the ISC license.
|
|
298
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
299
|
+
*/const bk=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Ei=Ee("search",bk);/**
|
|
300
|
+
* @license lucide-react v0.540.0 - ISC
|
|
301
|
+
*
|
|
302
|
+
* This source code is licensed under the ISC license.
|
|
303
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
304
|
+
*/const wk=[["path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",key:"117uat"}],["path",{d:"M6 12h16",key:"s4cdu5"}]],Sk=Ee("send-horizontal",wk);/**
|
|
305
|
+
* @license lucide-react v0.540.0 - ISC
|
|
306
|
+
*
|
|
307
|
+
* This source code is licensed under the ISC license.
|
|
308
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
309
|
+
*/const Nk=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],_h=Ee("send",Nk);/**
|
|
310
|
+
* @license lucide-react v0.540.0 - ISC
|
|
311
|
+
*
|
|
312
|
+
* This source code is licensed under the ISC license.
|
|
313
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
314
|
+
*/const Ek=[["path",{d:"M7 2h13a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-5",key:"bt2siv"}],["path",{d:"M10 10 2.5 2.5C2 2 2 2.5 2 5v3a2 2 0 0 0 2 2h6z",key:"1hjrv1"}],["path",{d:"M22 17v-1a2 2 0 0 0-2-2h-1",key:"1iynyr"}],["path",{d:"M4 14a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16.5l1-.5.5.5-8-8H4z",key:"161ggg"}],["path",{d:"M6 18h.01",key:"uhywen"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],_k=Ee("server-off",Ek);/**
|
|
315
|
+
* @license lucide-react v0.540.0 - ISC
|
|
316
|
+
*
|
|
317
|
+
* This source code is licensed under the ISC license.
|
|
318
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
319
|
+
*/const Ck=[["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"}]],e1=Ee("settings",Ck);/**
|
|
320
|
+
* @license lucide-react v0.540.0 - ISC
|
|
321
|
+
*
|
|
322
|
+
* This source code is licensed under the ISC license.
|
|
323
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
324
|
+
*/const jk=[["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22",key:"1ailkh"}],["path",{d:"M2 6h1.972a4 4 0 0 1 3.6 2.2",key:"km57vx"}],["path",{d:"M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45",key:"os18l9"}]],Ak=Ee("shuffle",jk);/**
|
|
325
|
+
* @license lucide-react v0.540.0 - ISC
|
|
326
|
+
*
|
|
327
|
+
* This source code is licensed under the ISC license.
|
|
328
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
329
|
+
*/const Mk=[["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"}]],Tk=Ee("sun",Mk);/**
|
|
330
|
+
* @license lucide-react v0.540.0 - ISC
|
|
331
|
+
*
|
|
332
|
+
* This source code is licensed under the ISC license.
|
|
333
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
334
|
+
*/const kk=[["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"}]],Rk=Ee("trash-2",kk);/**
|
|
335
|
+
* @license lucide-react v0.540.0 - ISC
|
|
336
|
+
*
|
|
337
|
+
* This source code is licensed under the ISC license.
|
|
338
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
339
|
+
*/const Dk=[["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"}]],Ok=Ee("triangle-alert",Dk);/**
|
|
340
|
+
* @license lucide-react v0.540.0 - ISC
|
|
341
|
+
*
|
|
342
|
+
* This source code is licensed under the ISC license.
|
|
343
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
344
|
+
*/const zk=[["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"}]],Lk=Ee("upload",zk);/**
|
|
345
|
+
* @license lucide-react v0.540.0 - ISC
|
|
346
|
+
*
|
|
347
|
+
* This source code is licensed under the ISC license.
|
|
348
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
349
|
+
*/const Hk=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],t1=Ee("user",Hk);/**
|
|
350
|
+
* @license lucide-react v0.540.0 - ISC
|
|
351
|
+
*
|
|
352
|
+
* This source code is licensed under the ISC license.
|
|
353
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
354
|
+
*/const Bk=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],Ua=Ee("workflow",Bk);/**
|
|
355
|
+
* @license lucide-react v0.540.0 - ISC
|
|
356
|
+
*
|
|
357
|
+
* This source code is licensed under the ISC license.
|
|
358
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
359
|
+
*/const Ik=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],ju=Ee("wrench",Ik);/**
|
|
360
|
+
* @license lucide-react v0.540.0 - ISC
|
|
361
|
+
*
|
|
362
|
+
* This source code is licensed under the ISC license.
|
|
363
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
364
|
+
*/const Uk=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Jc=Ee("x",Uk);/**
|
|
365
|
+
* @license lucide-react v0.540.0 - ISC
|
|
366
|
+
*
|
|
367
|
+
* This source code is licensed under the ISC license.
|
|
368
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
369
|
+
*/const Pk=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],n1=Ee("zap",Pk);function Km({...e}){return u.jsx(uT,{"data-slot":"dropdown-menu",...e})}function Qm({...e}){return u.jsx(dT,{"data-slot":"dropdown-menu-trigger",...e})}function Wm({className:e,sideOffset:r=4,...o}){return u.jsx(fT,{children:u.jsx(hT,{"data-slot":"dropdown-menu-content",sideOffset:r,className:He("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...o})})}function Bt({className:e,inset:r,variant:o="default",...s}){return u.jsx(pT,{"data-slot":"dropdown-menu-item","data-inset":r,"data-variant":o,className:He("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...s})}function Gy({className:e,inset:r,...o}){return u.jsx(mT,{"data-slot":"dropdown-menu-label","data-inset":r,className:He("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...o})}function eu({className:e,...r}){return u.jsx(gT,{"data-slot":"dropdown-menu-separator",className:He("bg-border -mx-1 my-1 h-px",e),...r})}const $k=cb("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function At({className:e,variant:r,...o}){return u.jsx("div",{className:He($k({variant:r}),e),...o})}function Jm({size:e="md",className:r}){return u.jsx(Fm,{className:He("animate-spin",{"h-4 w-4":e==="sm","h-6 w-6":e==="md","h-8 w-8":e==="lg"},r)})}const Vk=e=>e==="workflow"?Ua:Qr,Xy=e=>{switch(e){case"directory":return Gm;case"in_memory":return Qc;case"remote_gallery":return Xm;default:return Qc}},Fy=e=>{switch(e){case"directory":return"Local";case"in_memory":return"Memory";case"remote_gallery":return"Gallery";default:return"Unknown"}};function Yk({agents:e,workflows:r,selectedItem:o,onSelect:s,onRemove:i,onBrowseGallery:c,isLoading:d=!1}){const[f,m]=w.useState(!1),p=[...e,...r].sort((S,C)=>S.name?.localeCompare(C.name||S.id)||S.id.localeCompare(C.id)),g=S=>{s(S),m(!1)},v=o?Vk(o.type):Qr,y=o?.name||o?.id||"Select Agent or Workflow",b=o?.type==="workflow"?o.executors?.length||0:o?.tools?.length||0,N=o?.type==="workflow"?"executors":"tools";return u.jsxs(Km,{open:f,onOpenChange:m,children:[u.jsx(Qm,{asChild:!0,children:u.jsx(Ze,{variant:"outline",className:"w-64 justify-between font-mono text-sm",disabled:d,children:d?u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Jm,{size:"sm"}),u.jsx("span",{className:"text-muted-foreground",children:"Loading..."})]}):u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[u.jsx(v,{className:"h-4 w-4 flex-shrink-0"}),u.jsx("span",{className:"truncate",children:y}),o&&u.jsxs(At,{variant:"secondary",className:"ml-auto flex-shrink-0",children:[b," ",N]})]}),u.jsx(Sn,{className:"h-4 w-4 opacity-50"})]})})}),u.jsxs(Wm,{className:"w-80 font-mono",children:[e.length>0&&u.jsxs(u.Fragment,{children:[u.jsxs(Gy,{className:"flex items-center gap-2",children:[u.jsx(Qr,{className:"h-4 w-4"}),"Agents (",e.length,")"]}),e.map(S=>{const C=Xy(S.source);return u.jsx(Bt,{className:"cursor-pointer group",children:u.jsxs("div",{className:"flex items-center justify-between w-full",children:[u.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",onClick:()=>g(S),children:[u.jsx(Qr,{className:"h-4 w-4 flex-shrink-0"}),u.jsxs("div",{className:"min-w-0",children:[u.jsx("div",{className:"truncate font-medium",children:S.name||S.id}),S.description&&u.jsx("div",{className:"text-xs text-muted-foreground truncate",children:S.description})]})]}),u.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[u.jsx(C,{className:"h-3 w-3 opacity-60"}),u.jsx(At,{variant:"outline",className:"text-xs",children:Fy(S.source)}),u.jsx(At,{variant:"outline",className:"text-xs ml-1",children:S.tools.length}),S.source==="remote_gallery"&&i&&u.jsx(Ze,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0 opacity-0 group-hover:opacity-100 ml-1",onClick:j=>{j.stopPropagation(),i(S.id)},children:u.jsx(Jc,{className:"h-3 w-3 text-destructive"})})]})]})},S.id)})]}),r.length>0&&u.jsxs(u.Fragment,{children:[e.length>0&&u.jsx(eu,{}),u.jsxs(Gy,{className:"flex items-center gap-2",children:[u.jsx(Ua,{className:"h-4 w-4"}),"Workflows (",r.length,")"]}),r.map(S=>{const C=Xy(S.source);return u.jsx(Bt,{className:"cursor-pointer group",children:u.jsxs("div",{className:"flex items-center justify-between w-full",children:[u.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",onClick:()=>g(S),children:[u.jsx(Ua,{className:"h-4 w-4 flex-shrink-0"}),u.jsxs("div",{className:"min-w-0",children:[u.jsx("div",{className:"truncate font-medium",children:S.name||S.id}),S.description&&u.jsx("div",{className:"text-xs text-muted-foreground truncate",children:S.description})]})]}),u.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[u.jsx(C,{className:"h-3 w-3 opacity-60"}),u.jsx(At,{variant:"outline",className:"text-xs",children:Fy(S.source)}),u.jsx(At,{variant:"outline",className:"text-xs ml-1",children:S.executors.length}),S.source==="remote_gallery"&&i&&u.jsx(Ze,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0 opacity-0 group-hover:opacity-100 ml-1",onClick:j=>{j.stopPropagation(),i(S.id)},children:u.jsx(Jc,{className:"h-3 w-3 text-destructive"})})]})]})},S.id)})]}),p.length===0&&u.jsx(Bt,{disabled:!0,children:u.jsx("div",{className:"text-center text-muted-foreground py-2",children:d?"Loading agents and workflows...":"No agents or workflows found"})}),u.jsx(eu,{}),u.jsxs(Bt,{className:"cursor-pointer text-primary",onClick:()=>{c?.(),m(!1)},children:[u.jsx(Wc,{className:"h-4 w-4 mr-2"}),"Browse Gallery"]})]})]})}var qk=(e,r,o,s,i,c,d,f)=>{let m=document.documentElement,p=["light","dark"];function g(b){(Array.isArray(e)?e:[e]).forEach(N=>{let S=N==="class",C=S&&c?i.map(j=>c[j]||j):i;S?(m.classList.remove(...C),m.classList.add(c&&c[b]?c[b]:b)):m.setAttribute(N,b)}),v(b)}function v(b){f&&p.includes(b)&&(m.style.colorScheme=b)}function y(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)g(s);else try{let b=localStorage.getItem(r)||o,N=d&&b==="system"?y():b;g(N)}catch{}},Zy=["light","dark"],r1="(prefers-color-scheme: dark)",Gk=typeof window>"u",ep=w.createContext(void 0),Xk={setTheme:e=>{},themes:[]},Fk=()=>{var e;return(e=w.useContext(ep))!=null?e:Xk},Zk=e=>w.useContext(ep)?w.createElement(w.Fragment,null,e.children):w.createElement(Qk,{...e}),Kk=["light","dark"],Qk=({forcedTheme:e,disableTransitionOnChange:r=!1,enableSystem:o=!0,enableColorScheme:s=!0,storageKey:i="theme",themes:c=Kk,defaultTheme:d=o?"system":"light",attribute:f="data-theme",value:m,children:p,nonce:g,scriptProps:v})=>{let[y,b]=w.useState(()=>Jk(i,d)),[N,S]=w.useState(()=>y==="system"?Ch():y),C=m?Object.values(m):c,j=w.useCallback(D=>{let L=D;if(!L)return;D==="system"&&o&&(L=Ch());let B=m?m[L]:L,U=r?e3(g):null,G=document.documentElement,re=Z=>{Z==="class"?(G.classList.remove(...C),B&&G.classList.add(B)):Z.startsWith("data-")&&(B?G.setAttribute(Z,B):G.removeAttribute(Z))};if(Array.isArray(f)?f.forEach(re):re(f),s){let Z=Zy.includes(d)?d:null,Y=Zy.includes(L)?L:Z;G.style.colorScheme=Y}U?.()},[g]),R=w.useCallback(D=>{let L=typeof D=="function"?D(y):D;b(L);try{localStorage.setItem(i,L)}catch{}},[y]),E=w.useCallback(D=>{let L=Ch(D);S(L),y==="system"&&o&&!e&&j("system")},[y,e]);w.useEffect(()=>{let D=window.matchMedia(r1);return D.addListener(E),E(D),()=>D.removeListener(E)},[E]),w.useEffect(()=>{let D=L=>{L.key===i&&(L.newValue?b(L.newValue):R(d))};return window.addEventListener("storage",D),()=>window.removeEventListener("storage",D)},[R]),w.useEffect(()=>{j(e??y)},[e,y]);let A=w.useMemo(()=>({theme:y,setTheme:R,forcedTheme:e,resolvedTheme:y==="system"?N:y,themes:o?[...c,"system"]:c,systemTheme:o?N:void 0}),[y,R,e,N,o,c]);return w.createElement(ep.Provider,{value:A},w.createElement(Wk,{forcedTheme:e,storageKey:i,attribute:f,enableSystem:o,enableColorScheme:s,defaultTheme:d,value:m,themes:c,nonce:g,scriptProps:v}),p)},Wk=w.memo(({forcedTheme:e,storageKey:r,attribute:o,enableSystem:s,enableColorScheme:i,defaultTheme:c,value:d,themes:f,nonce:m,scriptProps:p})=>{let g=JSON.stringify([o,r,c,e,f,d,s,i]).slice(1,-1);return w.createElement("script",{...p,suppressHydrationWarning:!0,nonce:typeof window>"u"?m:"",dangerouslySetInnerHTML:{__html:`(${qk.toString()})(${g})`}})}),Jk=(e,r)=>{if(Gk)return;let o;try{o=localStorage.getItem(e)||void 0}catch{}return o||r},e3=e=>{let r=document.createElement("style");return e&&r.setAttribute("nonce",e),r.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(r)},1)}},Ch=e=>(e||(e=window.matchMedia(r1)),e.matches?"dark":"light");function t3(){const{setTheme:e}=Fk();return u.jsxs(Km,{children:[u.jsx(Qm,{asChild:!0,children:u.jsxs(Ze,{variant:"ghost",size:"sm",children:[u.jsx(Tk,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),u.jsx(dk,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),u.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),u.jsxs(Wm,{align:"end",children:[u.jsx(Bt,{onClick:()=>e("light"),children:"Light"}),u.jsx(Bt,{onClick:()=>e("dark"),children:"Dark"}),u.jsx(Bt,{onClick:()=>e("system"),children:"System"})]})]})}function Ky({agents:e,workflows:r,selectedItem:o,onSelect:s,onRemove:i,onBrowseGallery:c,isLoading:d=!1,onSettingsClick:f}){return u.jsxs("header",{className:"flex h-14 items-center gap-4 border-b px-4",children:[u.jsx("div",{className:"font-semibold",children:"Dev UI"}),u.jsx(Yk,{agents:e,workflows:r,selectedItem:o,onSelect:s,onRemove:i,onBrowseGallery:c,isLoading:d}),u.jsxs("div",{className:"flex items-center gap-2 ml-auto",children:[u.jsx(t3,{}),u.jsx(Ze,{variant:"ghost",size:"sm",onClick:f,children:u.jsx(e1,{className:"h-4 w-4"})})]})]})}function Wh(e,[r,o]){return Math.min(o,Math.max(r,e))}function n3(e,r){return w.useReducer((o,s)=>r[o][s]??o,e)}var tp="ScrollArea",[o1,bL]=pr(tp),[r3,ln]=o1(tp),a1=w.forwardRef((e,r)=>{const{__scopeScrollArea:o,type:s="hover",dir:i,scrollHideDelay:c=600,...d}=e,[f,m]=w.useState(null),[p,g]=w.useState(null),[v,y]=w.useState(null),[b,N]=w.useState(null),[S,C]=w.useState(null),[j,R]=w.useState(0),[E,A]=w.useState(0),[D,L]=w.useState(!1),[B,U]=w.useState(!1),G=Pe(r,Z=>m(Z)),re=Hi(i);return u.jsx(r3,{scope:o,type:s,dir:re,scrollHideDelay:c,scrollArea:f,viewport:p,onViewportChange:g,content:v,onContentChange:y,scrollbarX:b,onScrollbarXChange:N,scrollbarXEnabled:D,onScrollbarXEnabledChange:L,scrollbarY:S,onScrollbarYChange:C,scrollbarYEnabled:B,onScrollbarYEnabledChange:U,onCornerWidthChange:R,onCornerHeightChange:A,children:u.jsx(Me.div,{dir:re,...d,ref:G,style:{position:"relative","--radix-scroll-area-corner-width":j+"px","--radix-scroll-area-corner-height":E+"px",...e.style}})})});a1.displayName=tp;var s1="ScrollAreaViewport",i1=w.forwardRef((e,r)=>{const{__scopeScrollArea:o,children:s,nonce:i,...c}=e,d=ln(s1,o),f=w.useRef(null),m=Pe(r,f,d.onViewportChange);return u.jsxs(u.Fragment,{children:[u.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),u.jsx(Me.div,{"data-radix-scroll-area-viewport":"",...c,ref:m,style:{overflowX:d.scrollbarXEnabled?"scroll":"hidden",overflowY:d.scrollbarYEnabled?"scroll":"hidden",...e.style},children:u.jsx("div",{ref:d.onContentChange,style:{minWidth:"100%",display:"table"},children:s})})]})});i1.displayName=s1;var In="ScrollAreaScrollbar",np=w.forwardRef((e,r)=>{const{forceMount:o,...s}=e,i=ln(In,e.__scopeScrollArea),{onScrollbarXEnabledChange:c,onScrollbarYEnabledChange:d}=i,f=e.orientation==="horizontal";return w.useEffect(()=>(f?c(!0):d(!0),()=>{f?c(!1):d(!1)}),[f,c,d]),i.type==="hover"?u.jsx(o3,{...s,ref:r,forceMount:o}):i.type==="scroll"?u.jsx(a3,{...s,ref:r,forceMount:o}):i.type==="auto"?u.jsx(l1,{...s,ref:r,forceMount:o}):i.type==="always"?u.jsx(rp,{...s,ref:r}):null});np.displayName=In;var o3=w.forwardRef((e,r)=>{const{forceMount:o,...s}=e,i=ln(In,e.__scopeScrollArea),[c,d]=w.useState(!1);return w.useEffect(()=>{const f=i.scrollArea;let m=0;if(f){const p=()=>{window.clearTimeout(m),d(!0)},g=()=>{m=window.setTimeout(()=>d(!1),i.scrollHideDelay)};return f.addEventListener("pointerenter",p),f.addEventListener("pointerleave",g),()=>{window.clearTimeout(m),f.removeEventListener("pointerenter",p),f.removeEventListener("pointerleave",g)}}},[i.scrollArea,i.scrollHideDelay]),u.jsx(wn,{present:o||c,children:u.jsx(l1,{"data-state":c?"visible":"hidden",...s,ref:r})})}),a3=w.forwardRef((e,r)=>{const{forceMount:o,...s}=e,i=ln(In,e.__scopeScrollArea),c=e.orientation==="horizontal",d=Mu(()=>m("SCROLL_END"),100),[f,m]=n3("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return w.useEffect(()=>{if(f==="idle"){const p=window.setTimeout(()=>m("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(p)}},[f,i.scrollHideDelay,m]),w.useEffect(()=>{const p=i.viewport,g=c?"scrollLeft":"scrollTop";if(p){let v=p[g];const y=()=>{const b=p[g];v!==b&&(m("SCROLL"),d()),v=b};return p.addEventListener("scroll",y),()=>p.removeEventListener("scroll",y)}},[i.viewport,c,m,d]),u.jsx(wn,{present:o||f!=="hidden",children:u.jsx(rp,{"data-state":f==="hidden"?"hidden":"visible",...s,ref:r,onPointerEnter:be(e.onPointerEnter,()=>m("POINTER_ENTER")),onPointerLeave:be(e.onPointerLeave,()=>m("POINTER_LEAVE"))})})}),l1=w.forwardRef((e,r)=>{const o=ln(In,e.__scopeScrollArea),{forceMount:s,...i}=e,[c,d]=w.useState(!1),f=e.orientation==="horizontal",m=Mu(()=>{if(o.viewport){const p=o.viewport.offsetWidth<o.viewport.scrollWidth,g=o.viewport.offsetHeight<o.viewport.scrollHeight;d(f?p:g)}},10);return Pa(o.viewport,m),Pa(o.content,m),u.jsx(wn,{present:s||c,children:u.jsx(rp,{"data-state":c?"visible":"hidden",...i,ref:r})})}),rp=w.forwardRef((e,r)=>{const{orientation:o="vertical",...s}=e,i=ln(In,e.__scopeScrollArea),c=w.useRef(null),d=w.useRef(0),[f,m]=w.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),p=h1(f.viewport,f.content),g={...s,sizes:f,onSizesChange:m,hasThumb:p>0&&p<1,onThumbChange:y=>c.current=y,onThumbPointerUp:()=>d.current=0,onThumbPointerDown:y=>d.current=y};function v(y,b){return d3(y,d.current,f,b)}return o==="horizontal"?u.jsx(s3,{...g,ref:r,onThumbPositionChange:()=>{if(i.viewport&&c.current){const y=i.viewport.scrollLeft,b=Qy(y,f,i.dir);c.current.style.transform=`translate3d(${b}px, 0, 0)`}},onWheelScroll:y=>{i.viewport&&(i.viewport.scrollLeft=y)},onDragScroll:y=>{i.viewport&&(i.viewport.scrollLeft=v(y,i.dir))}}):o==="vertical"?u.jsx(i3,{...g,ref:r,onThumbPositionChange:()=>{if(i.viewport&&c.current){const y=i.viewport.scrollTop,b=Qy(y,f);c.current.style.transform=`translate3d(0, ${b}px, 0)`}},onWheelScroll:y=>{i.viewport&&(i.viewport.scrollTop=y)},onDragScroll:y=>{i.viewport&&(i.viewport.scrollTop=v(y))}}):null}),s3=w.forwardRef((e,r)=>{const{sizes:o,onSizesChange:s,...i}=e,c=ln(In,e.__scopeScrollArea),[d,f]=w.useState(),m=w.useRef(null),p=Pe(r,m,c.onScrollbarXChange);return w.useEffect(()=>{m.current&&f(getComputedStyle(m.current))},[m]),u.jsx(u1,{"data-orientation":"horizontal",...i,ref:p,sizes:o,style:{bottom:0,left:c.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:c.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Au(o)+"px",...e.style},onThumbPointerDown:g=>e.onThumbPointerDown(g.x),onDragScroll:g=>e.onDragScroll(g.x),onWheelScroll:(g,v)=>{if(c.viewport){const y=c.viewport.scrollLeft+g.deltaX;e.onWheelScroll(y),p1(y,v)&&g.preventDefault()}},onResize:()=>{m.current&&c.viewport&&d&&s({content:c.viewport.scrollWidth,viewport:c.viewport.offsetWidth,scrollbar:{size:m.current.clientWidth,paddingStart:nu(d.paddingLeft),paddingEnd:nu(d.paddingRight)}})}})}),i3=w.forwardRef((e,r)=>{const{sizes:o,onSizesChange:s,...i}=e,c=ln(In,e.__scopeScrollArea),[d,f]=w.useState(),m=w.useRef(null),p=Pe(r,m,c.onScrollbarYChange);return w.useEffect(()=>{m.current&&f(getComputedStyle(m.current))},[m]),u.jsx(u1,{"data-orientation":"vertical",...i,ref:p,sizes:o,style:{top:0,right:c.dir==="ltr"?0:void 0,left:c.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Au(o)+"px",...e.style},onThumbPointerDown:g=>e.onThumbPointerDown(g.y),onDragScroll:g=>e.onDragScroll(g.y),onWheelScroll:(g,v)=>{if(c.viewport){const y=c.viewport.scrollTop+g.deltaY;e.onWheelScroll(y),p1(y,v)&&g.preventDefault()}},onResize:()=>{m.current&&c.viewport&&d&&s({content:c.viewport.scrollHeight,viewport:c.viewport.offsetHeight,scrollbar:{size:m.current.clientHeight,paddingStart:nu(d.paddingTop),paddingEnd:nu(d.paddingBottom)}})}})}),[l3,c1]=o1(In),u1=w.forwardRef((e,r)=>{const{__scopeScrollArea:o,sizes:s,hasThumb:i,onThumbChange:c,onThumbPointerUp:d,onThumbPointerDown:f,onThumbPositionChange:m,onDragScroll:p,onWheelScroll:g,onResize:v,...y}=e,b=ln(In,o),[N,S]=w.useState(null),C=Pe(r,G=>S(G)),j=w.useRef(null),R=w.useRef(""),E=b.viewport,A=s.content-s.viewport,D=wt(g),L=wt(m),B=Mu(v,10);function U(G){if(j.current){const re=G.clientX-j.current.left,Z=G.clientY-j.current.top;p({x:re,y:Z})}}return w.useEffect(()=>{const G=re=>{const Z=re.target;N?.contains(Z)&&D(re,A)};return document.addEventListener("wheel",G,{passive:!1}),()=>document.removeEventListener("wheel",G,{passive:!1})},[E,N,A,D]),w.useEffect(L,[s,L]),Pa(N,B),Pa(b.content,B),u.jsx(l3,{scope:o,scrollbar:N,hasThumb:i,onThumbChange:wt(c),onThumbPointerUp:wt(d),onThumbPositionChange:L,onThumbPointerDown:wt(f),children:u.jsx(Me.div,{...y,ref:C,style:{position:"absolute",...y.style},onPointerDown:be(e.onPointerDown,G=>{G.button===0&&(G.target.setPointerCapture(G.pointerId),j.current=N.getBoundingClientRect(),R.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",b.viewport&&(b.viewport.style.scrollBehavior="auto"),U(G))}),onPointerMove:be(e.onPointerMove,U),onPointerUp:be(e.onPointerUp,G=>{const re=G.target;re.hasPointerCapture(G.pointerId)&&re.releasePointerCapture(G.pointerId),document.body.style.webkitUserSelect=R.current,b.viewport&&(b.viewport.style.scrollBehavior=""),j.current=null})})})}),tu="ScrollAreaThumb",d1=w.forwardRef((e,r)=>{const{forceMount:o,...s}=e,i=c1(tu,e.__scopeScrollArea);return u.jsx(wn,{present:o||i.hasThumb,children:u.jsx(c3,{ref:r,...s})})}),c3=w.forwardRef((e,r)=>{const{__scopeScrollArea:o,style:s,...i}=e,c=ln(tu,o),d=c1(tu,o),{onThumbPositionChange:f}=d,m=Pe(r,v=>d.onThumbChange(v)),p=w.useRef(void 0),g=Mu(()=>{p.current&&(p.current(),p.current=void 0)},100);return w.useEffect(()=>{const v=c.viewport;if(v){const y=()=>{if(g(),!p.current){const b=f3(v,f);p.current=b,f()}};return f(),v.addEventListener("scroll",y),()=>v.removeEventListener("scroll",y)}},[c.viewport,g,f]),u.jsx(Me.div,{"data-state":d.hasThumb?"visible":"hidden",...i,ref:m,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...s},onPointerDownCapture:be(e.onPointerDownCapture,v=>{const b=v.target.getBoundingClientRect(),N=v.clientX-b.left,S=v.clientY-b.top;d.onThumbPointerDown({x:N,y:S})}),onPointerUp:be(e.onPointerUp,d.onThumbPointerUp)})});d1.displayName=tu;var op="ScrollAreaCorner",f1=w.forwardRef((e,r)=>{const o=ln(op,e.__scopeScrollArea),s=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&s?u.jsx(u3,{...e,ref:r}):null});f1.displayName=op;var u3=w.forwardRef((e,r)=>{const{__scopeScrollArea:o,...s}=e,i=ln(op,o),[c,d]=w.useState(0),[f,m]=w.useState(0),p=!!(c&&f);return Pa(i.scrollbarX,()=>{const g=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(g),m(g)}),Pa(i.scrollbarY,()=>{const g=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(g),d(g)}),p?u.jsx(Me.div,{...s,ref:r,style:{width:c,height:f,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function nu(e){return e?parseInt(e,10):0}function h1(e,r){const o=e/r;return isNaN(o)?0:o}function Au(e){const r=h1(e.viewport,e.content),o=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,s=(e.scrollbar.size-o)*r;return Math.max(s,18)}function d3(e,r,o,s="ltr"){const i=Au(o),c=i/2,d=r||c,f=i-d,m=o.scrollbar.paddingStart+d,p=o.scrollbar.size-o.scrollbar.paddingEnd-f,g=o.content-o.viewport,v=s==="ltr"?[0,g]:[g*-1,0];return m1([m,p],v)(e)}function Qy(e,r,o="ltr"){const s=Au(r),i=r.scrollbar.paddingStart+r.scrollbar.paddingEnd,c=r.scrollbar.size-i,d=r.content-r.viewport,f=c-s,m=o==="ltr"?[0,d]:[d*-1,0],p=Wh(e,m);return m1([0,d],[0,f])(p)}function m1(e,r){return o=>{if(e[0]===e[1]||r[0]===r[1])return r[0];const s=(r[1]-r[0])/(e[1]-e[0]);return r[0]+s*(o-e[0])}}function p1(e,r){return e>0&&e<r}var f3=(e,r=()=>{})=>{let o={left:e.scrollLeft,top:e.scrollTop},s=0;return(function i(){const c={left:e.scrollLeft,top:e.scrollTop},d=o.left!==c.left,f=o.top!==c.top;(d||f)&&r(),o=c,s=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(s)};function Mu(e,r){const o=wt(e),s=w.useRef(0);return w.useEffect(()=>()=>window.clearTimeout(s.current),[]),w.useCallback(()=>{window.clearTimeout(s.current),s.current=window.setTimeout(o,r)},[o,r])}function Pa(e,r){const o=wt(r);St(()=>{let s=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(s),s=window.requestAnimationFrame(o)});return i.observe(e),()=>{window.cancelAnimationFrame(s),i.unobserve(e)}}},[e,o])}var g1=a1,h3=i1,m3=f1;const $i=w.forwardRef(({className:e,children:r,...o},s)=>u.jsxs(g1,{ref:s,className:He("relative overflow-hidden",e),...o,children:[u.jsx(h3,{className:"h-full w-full rounded-[inherit]",children:r}),u.jsx(x1,{}),u.jsx(m3,{})]}));$i.displayName=g1.displayName;const x1=w.forwardRef(({className:e,orientation:r="vertical",...o},s)=>u.jsx(np,{ref:s,orientation:r,className:He("flex touch-none select-none transition-colors",r==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",r==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...o,children:u.jsx(d1,{className:"relative flex-1 rounded-full bg-border"})}));x1.displayName=np.displayName;var Tu="Tabs",[p3,wL]=pr(Tu,[wu]),y1=wu(),[g3,ap]=p3(Tu),v1=w.forwardRef((e,r)=>{const{__scopeTabs:o,value:s,onValueChange:i,defaultValue:c,orientation:d="horizontal",dir:f,activationMode:m="automatic",...p}=e,g=Hi(f),[v,y]=Ha({prop:s,onChange:i,defaultProp:c??"",caller:Tu});return u.jsx(g3,{scope:o,baseId:To(),value:v,onValueChange:y,orientation:d,dir:g,activationMode:m,children:u.jsx(Me.div,{dir:g,"data-orientation":d,...p,ref:r})})});v1.displayName=Tu;var b1="TabsList",w1=w.forwardRef((e,r)=>{const{__scopeTabs:o,loop:s=!0,...i}=e,c=ap(b1,o),d=y1(o);return u.jsx(nw,{asChild:!0,...d,orientation:c.orientation,dir:c.dir,loop:s,children:u.jsx(Me.div,{role:"tablist","aria-orientation":c.orientation,...i,ref:r})})});w1.displayName=b1;var S1="TabsTrigger",N1=w.forwardRef((e,r)=>{const{__scopeTabs:o,value:s,disabled:i=!1,...c}=e,d=ap(S1,o),f=y1(o),m=C1(d.baseId,s),p=j1(d.baseId,s),g=s===d.value;return u.jsx(rw,{asChild:!0,...f,focusable:!i,active:g,children:u.jsx(Me.button,{type:"button",role:"tab","aria-selected":g,"aria-controls":p,"data-state":g?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:m,...c,ref:r,onMouseDown:be(e.onMouseDown,v=>{!i&&v.button===0&&v.ctrlKey===!1?d.onValueChange(s):v.preventDefault()}),onKeyDown:be(e.onKeyDown,v=>{[" ","Enter"].includes(v.key)&&d.onValueChange(s)}),onFocus:be(e.onFocus,()=>{const v=d.activationMode!=="manual";!g&&!i&&v&&d.onValueChange(s)})})})});N1.displayName=S1;var E1="TabsContent",_1=w.forwardRef((e,r)=>{const{__scopeTabs:o,value:s,forceMount:i,children:c,...d}=e,f=ap(E1,o),m=C1(f.baseId,s),p=j1(f.baseId,s),g=s===f.value,v=w.useRef(g);return w.useEffect(()=>{const y=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(y)},[]),u.jsx(wn,{present:i||g,children:({present:y})=>u.jsx(Me.div,{"data-state":g?"active":"inactive","data-orientation":f.orientation,role:"tabpanel","aria-labelledby":m,hidden:!y,id:p,tabIndex:0,...d,ref:r,style:{...e.style,animationDuration:v.current?"0s":void 0},children:y&&c})})});_1.displayName=E1;function C1(e,r){return`${e}-trigger-${r}`}function j1(e,r){return`${e}-content-${r}`}var x3=v1,A1=w1,M1=N1,T1=_1;const y3=x3,k1=w.forwardRef(({className:e,...r},o)=>u.jsx(A1,{ref:o,className:He("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...r}));k1.displayName=A1.displayName;const zc=w.forwardRef(({className:e,...r},o)=>u.jsx(M1,{ref:o,className:He("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...r}));zc.displayName=M1.displayName;const Lc=w.forwardRef(({className:e,...r},o)=>u.jsx(T1,{ref:o,className:He("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...r}));Lc.displayName=T1.displayName;function R1(e){const r=[],o=new Map,s=new Map;let i="";for(const c of e){if(c.type==="response.done"||c.type==="error"||c.type==="response.workflow_event.complete"||c.type==="response.trace_event.complete"||c.type==="response.trace.complete"||c.type==="response.function_result.complete"){if(i.trim()&&(r.push({type:"response.output_text.delta",delta:i.trim()}),i=""),(c.type==="response.trace_event.complete"||c.type==="response.trace.complete")&&"data"in c){const d=c.data;if(d.attributes&&d.attributes["gen_ai.output.messages"]&&typeof d.attributes["gen_ai.output.messages"]=="string")try{const f=JSON.parse(d.attributes["gen_ai.output.messages"]);for(const m of f)if(m.parts)for(const p of m.parts)p.type==="tool_call"&&p.name&&p.id&&s.set(p.id,p.name)}catch{}}if(c.type==="response.function_result.complete"&&"data"in c){const f=c.data.call_id;if(f&&o.has(f)){const m=o.get(f),p=s.get(f)||m.name||"unknown";r.push({type:"response.function_call.complete",data:{name:p,arguments:m.arguments,call_id:m.callId}}),o.delete(f)}}r.push(c);continue}if(c.type==="response.function_call.delta"&&"data"in c){const d=c.data,f=d.call_id||`call_${Date.now()}`;o.has(f)||o.set(f,{name:d.name||void 0,arguments:"",callId:f,timestamp:new Date().toISOString()}),d.name&&d.name.trim()&&(o.get(f).name=d.name.trim());continue}if(c.type==="response.function_call.complete"&&"data"in c){r.push(c);continue}if(c.type==="response.function_call_arguments.delta"){let d="",f;if("delta"in c&&typeof c.delta=="string"&&(d=c.delta),"data"in c&&c.data&&c.data.call_id?f=String(c.data.call_id):f=`call_${Date.now()}`,d&&f){o.has(f)||o.set(f,{name:"unknown",arguments:"",callId:f,timestamp:new Date().toISOString()});const m=o.get(f);if(d==="{}"&&m.arguments==="")continue;let p=d;try{p=d.replace(/^"|"$/g,"").replace(/\\"/g,'"')}catch{p=d}m.arguments+=p}continue}if(c.type==="response.output_text.delta"&&"delta"in c){i+=c.delta||"",i.length>100&&(i.includes(`
|
|
370
|
+
|
|
371
|
+
`)||i.trim().match(/[.!?]\s*$/))&&(r.push({type:"response.output_text.delta",delta:i.trim()}),i="");continue}c.type!=="response.usage.complete"&&r.push(c)}for(const[,c]of o)if(c.arguments.trim()&&c.arguments.trim().length>2){const d=s.get(c.callId)||c.name||"unknown";r.push({type:"response.function_call.complete",data:{name:d,arguments:c.arguments,call_id:c.callId}})}return i.trim()&&r.push({type:"response.output_text.delta",delta:i.trim()}),r}function v3(e){switch(e.type){case"response.output_text.delta":if("delta"in e){const r=e.delta||"";return r.length>60?`${r.slice(0,60)}...`:r}return"Text output";case"response.function_call.complete":if("data"in e&&e.data){const r=e.data;let o=r.name||"unknown";(!o||o==="unknown")&&(o="function_call");const s=r.arguments?typeof r.arguments=="string"?r.arguments.slice(0,30):JSON.stringify(r.arguments).slice(0,30):"";return`Calling ${o}(${s}${s.length>=30?"...":""})`}return"Function call";case"response.function_call_arguments.delta":return"delta"in e&&e.delta?`Function arg delta: ${e.delta.slice(0,30)}${e.delta.length>30?"...":""}`:"Function arguments...";case"response.function_result.complete":if("data"in e&&e.data){const r=e.data,s=(r.result?typeof r.result=="string"?r.result:JSON.stringify(r.result):"no result").slice(0,40);return`Tool result: ${s}${s.length>=40?"...":""}`}return"Function result";case"response.workflow_event.complete":return"data"in e&&e.data?`Executor: ${e.data.executor_id||"unknown"}`:"Workflow event";case"response.trace_event.complete":case"response.trace.complete":return"data"in e&&e.data?`Trace: ${e.data.operation_name||"unknown"}`:"Trace event";case"response.done":return"Response complete";case"error":return"message"in e&&typeof e.message=="string"?e.message:"Error occurred";default:return`${e.type}`}}function b3(e){switch(e){case"response.output_text.delta":return Qw;case"response.function_call.complete":case"response.function_call.delta":case"response.function_call_arguments.delta":return ju;case"response.function_result.complete":return Kc;case"response.workflow_event.complete":return qm;case"response.trace_event.complete":case"response.trace.complete":return Ei;case"response.done":return Kc;case"error":return Cu;default:return Ia}}function w3(e){switch(e){case"response.output_text.delta":return"text-gray-600 dark:text-gray-400";case"response.function_call.complete":case"response.function_call.delta":case"response.function_call_arguments.delta":return"text-blue-600 dark:text-blue-400";case"response.function_result.complete":return"text-green-600 dark:text-green-400";case"response.workflow_event.complete":return"text-purple-600 dark:text-purple-400";case"response.trace_event.complete":case"response.trace.complete":return"text-orange-600 dark:text-orange-400";case"response.done":return"text-green-600 dark:text-green-400";case"error":return"text-red-600 dark:text-red-400";default:return"text-gray-600 dark:text-gray-400"}}function S3({event:e}){const[r,o]=w.useState(!1),s=b3(e.type),i=w3(e.type),c=new Date().toLocaleTimeString(),d=v3(e),f=e.type==="response.function_call.complete"&&"data"in e&&e.data||e.type==="response.function_result.complete"&&"data"in e&&e.data||e.type==="response.workflow_event.complete"&&"data"in e&&e.data||e.type==="response.trace_event.complete"&&"data"in e&&e.data||e.type==="response.trace.complete"&&"data"in e&&e.data||e.type==="response.output_text.delta"&&"delta"in e&&e.delta&&e.delta.length>100||e.type==="error";return u.jsxs("div",{className:"border-l-2 border-muted pl-3 py-2 hover:bg-muted/50 transition-colors",children:[u.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground mb-1",children:[u.jsx(s,{className:`h-3 w-3 ${i}`}),u.jsx("span",{className:"font-mono",children:c}),u.jsx(At,{variant:"outline",className:"text-xs py-0",children:e.type.replace("response.","")})]}),u.jsxs("div",{className:"text-sm",children:[u.jsxs("div",{className:`flex items-center gap-2 ${f?"cursor-pointer":""}`,onClick:()=>f&&o(!r),children:[f&&u.jsx("div",{className:"text-muted-foreground",children:r?u.jsx(Sn,{className:"h-3 w-3"}):u.jsx(Fw,{className:"h-3 w-3"})}),u.jsx("div",{className:"text-muted-foreground flex-1",children:f&&d.length>80?`${d.slice(0,80)}...`:d})]}),r&&f&&u.jsx("div",{className:"mt-2 ml-5 p-3 bg-muted/30 rounded border",children:u.jsx(N3,{event:e})})]})]})}function N3({event:e}){if(e.type==="error"){const r=e;return u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Cu,{className:"h-4 w-4 text-red-500"}),u.jsx("span",{className:"font-semibold text-sm",children:"Error Details"})]}),u.jsxs("div",{className:"text-xs",children:[r.message&&u.jsxs("div",{className:"mb-2",children:[u.jsx("span",{className:"font-medium text-muted-foreground",children:"Message:"}),u.jsx("div",{className:"mt-1",children:u.jsx("pre",{className:"text-xs bg-destructive/10 border border-destructive/30 rounded p-2 text-destructive whitespace-pre-wrap break-all",children:r.message})})]}),r.code&&u.jsxs("div",{className:"mb-2",children:[u.jsx("span",{className:"font-medium text-muted-foreground",children:"Code:"}),u.jsx("span",{className:"ml-2 font-mono text-xs",children:r.code})]}),r.param&&u.jsxs("div",{className:"mb-2",children:[u.jsx("span",{className:"font-medium text-muted-foreground",children:"Parameter:"}),u.jsx("span",{className:"ml-2 font-mono text-xs",children:r.param})]}),u.jsxs("div",{children:[u.jsx("span",{className:"font-medium text-muted-foreground",children:"Raw Event:"}),u.jsx("div",{className:"mt-1",children:u.jsx("pre",{className:"text-xs bg-background border rounded p-2 whitespace-pre-wrap break-all max-h-32 overflow-auto",children:JSON.stringify(e,null,2)})})]})]})]})}switch(e.type){case"response.function_call.complete":if("data"in e&&e.data){const r=e.data;return u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(ju,{className:"h-4 w-4 text-blue-500"}),u.jsx("span",{className:"font-semibold text-sm",children:"Function Call"})]}),u.jsxs("div",{className:"grid grid-cols-1 gap-2 text-xs",children:[u.jsxs("div",{children:[u.jsx("span",{className:"font-medium text-muted-foreground",children:"Function:"}),u.jsx("span",{className:"ml-2 font-mono bg-blue-100 dark:bg-blue-900 px-2 py-1 rounded",children:r.name||"unknown"})]}),r.call_id&&u.jsxs("div",{children:[u.jsx("span",{className:"font-medium text-muted-foreground",children:"Call ID:"}),u.jsx("span",{className:"ml-2 font-mono text-xs",children:r.call_id})]}),r.arguments&&u.jsxs("div",{children:[u.jsx("span",{className:"font-medium text-muted-foreground",children:"Arguments:"}),u.jsx("div",{className:"mt-1 max-h-32 overflow-auto",children:u.jsx("pre",{className:"text-xs bg-background border rounded p-2 whitespace-pre-wrap max-w-full break-all",children:typeof r.arguments=="string"?r.arguments:JSON.stringify(r.arguments,null,1)})})]})]})]})}break;case"response.function_result.complete":if("data"in e&&e.data){const r=e.data;return u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Kc,{className:"h-4 w-4 text-green-500"}),u.jsx("span",{className:"font-semibold text-sm",children:"Function Result"})]}),u.jsxs("div",{className:"grid grid-cols-1 gap-2 text-xs",children:[r.call_id&&u.jsxs("div",{children:[u.jsx("span",{className:"font-medium text-muted-foreground",children:"Call ID:"}),u.jsx("span",{className:"ml-2 font-mono text-xs",children:r.call_id})]}),u.jsxs("div",{children:[u.jsx("span",{className:"font-medium text-muted-foreground",children:"Status:"}),u.jsx("span",{className:`ml-2 px-2 py-1 rounded text-xs font-medium ${r.status==="completed"?"bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200":"bg-red-100 dark:bg-red-900 text-red-800 dark:text-red-200"}`,children:r.status||"unknown"})]}),r.result!==void 0&&u.jsxs("div",{children:[u.jsx("span",{className:"font-medium text-muted-foreground",children:"Result:"}),u.jsx("div",{className:"mt-1 max-h-32 overflow-auto",children:u.jsx("pre",{className:"text-xs bg-background border rounded p-2 whitespace-pre-wrap max-w-full break-all",children:typeof r.result=="string"?r.result:JSON.stringify(r.result,null,1)})})]}),r.exception!==null&&r.exception!==void 0&&u.jsxs("div",{children:[u.jsx("span",{className:"font-medium text-destructive",children:"Error:"}),u.jsx("div",{className:"mt-1",children:u.jsx("pre",{className:"text-xs bg-destructive/10 border border-destructive/30 rounded p-2 text-destructive whitespace-pre-wrap break-all",children:r.exception})})]})]})]})}break;case"response.workflow_event.complete":if("data"in e&&e.data){const r=e.data;return u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(qm,{className:"h-4 w-4 text-purple-500"}),u.jsx("span",{className:"font-semibold text-sm",children:"Workflow Event"})]}),u.jsxs("div",{className:"grid grid-cols-1 gap-2 text-xs",children:[u.jsxs("div",{children:[u.jsx("span",{className:"font-medium text-muted-foreground",children:"Event Type:"}),u.jsx("span",{className:"ml-2 font-mono bg-purple-100 dark:bg-purple-900 px-2 py-1 rounded",children:r.event_type||"unknown"})]}),r.executor_id&&u.jsxs("div",{children:[u.jsx("span",{className:"font-medium text-muted-foreground",children:"Executor:"}),u.jsx("span",{className:"ml-2 font-mono",children:r.executor_id})]}),r.timestamp&&u.jsxs("div",{children:[u.jsx("span",{className:"font-medium text-muted-foreground",children:"Timestamp:"}),u.jsx("span",{className:"ml-2 font-mono text-xs",children:r.timestamp})]}),r.data&&u.jsxs("div",{children:[u.jsx("span",{className:"font-medium text-muted-foreground",children:"Data:"}),u.jsx("div",{className:"mt-1 max-h-32 overflow-auto",children:u.jsx("pre",{className:"text-xs bg-background border rounded p-2 whitespace-pre-wrap max-w-full break-all",children:typeof r.data=="string"?r.data:JSON.stringify(r.data,null,1)})})]})]})]})}break;case"response.trace_event.complete":case"response.trace.complete":if("data"in e&&e.data){const r=e.data;return u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Ei,{className:"h-4 w-4 text-orange-500"}),u.jsx("span",{className:"font-semibold text-sm",children:"Trace Event"})]}),u.jsxs("div",{className:"grid grid-cols-1 gap-2 text-xs",children:[u.jsxs("div",{children:[u.jsx("span",{className:"font-medium text-muted-foreground",children:"Operation:"}),u.jsx("span",{className:"ml-2 font-mono bg-orange-100 dark:bg-orange-900 px-2 py-1 rounded",children:r.operation_name||"unknown"})]}),r.span_id&&u.jsxs("div",{children:[u.jsx("span",{className:"font-medium text-muted-foreground",children:"Span ID:"}),u.jsx("span",{className:"ml-2 font-mono text-xs",children:r.span_id})]}),r.trace_id&&u.jsxs("div",{children:[u.jsx("span",{className:"font-medium text-muted-foreground",children:"Trace ID:"}),u.jsx("span",{className:"ml-2 font-mono text-xs",children:r.trace_id})]}),r.duration_ms&&u.jsxs("div",{children:[u.jsx("span",{className:"font-medium text-muted-foreground",children:"Duration:"}),u.jsxs("span",{className:"ml-2 font-mono text-xs",children:[Number(r.duration_ms).toFixed(2),"ms"]})]}),r.status&&u.jsxs("div",{children:[u.jsx("span",{className:"font-medium text-muted-foreground",children:"Status:"}),u.jsx("span",{className:`ml-2 px-2 py-1 rounded text-xs font-medium ${r.status==="StatusCode.UNSET"||r.status==="OK"?"bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200":"bg-red-100 dark:bg-red-900 text-red-800 dark:text-red-200"}`,children:r.status||"unknown"})]}),r.entity_id&&u.jsxs("div",{children:[u.jsx("span",{className:"font-medium text-muted-foreground",children:"Entity:"}),u.jsx("span",{className:"ml-2 font-mono text-xs",children:r.entity_id})]}),r.attributes&&Object.keys(r.attributes).length>0&&u.jsxs("div",{children:[u.jsx("span",{className:"font-medium text-muted-foreground",children:"Attributes:"}),u.jsx("div",{className:"mt-1 max-h-32 overflow-auto",children:u.jsx("pre",{className:"text-xs bg-background border rounded p-2 whitespace-pre-wrap break-all",children:(()=>{try{const o={...r.attributes};return Object.keys(o).forEach(s=>{if(typeof o[s]=="string"&&o[s].startsWith("["))try{o[s]=JSON.parse(o[s])}catch{}}),JSON.stringify(o,null,2)}catch{return JSON.stringify(r.attributes,null,2)}})()})})]})]})]})}break;case"response.output_text.delta":if("delta"in e&&e.delta)return u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Qw,{className:"h-4 w-4 text-gray-500"}),u.jsx("span",{className:"font-semibold text-sm",children:"Text Output"})]}),u.jsx("div",{className:"max-h-32 overflow-auto",children:u.jsx("pre",{className:"text-xs bg-background border rounded p-2 whitespace-pre-wrap max-w-full break-all",children:e.delta})})]});break;default:return u.jsx("div",{className:"text-xs text-muted-foreground",children:u.jsx("pre",{className:"bg-background border rounded p-2 overflow-auto max-h-32",children:JSON.stringify(e,null,2)})})}return null}function E3({events:e,isStreaming:r}){const o=w.useRef(null),s=R1(e),i=[...s].reverse();return u.jsxs("div",{className:"h-full",children:[u.jsxs("div",{className:"flex items-center justify-between p-3 border-b",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(qm,{className:"h-4 w-4"}),u.jsx("span",{className:"font-medium",children:"Events"}),u.jsxs(At,{variant:"outline",children:[s.length,e.length>s.length?` (${e.length} raw)`:""]})]}),r&&u.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[u.jsx("div",{className:"h-2 w-2 animate-pulse rounded-full bg-green-500 dark:bg-green-400"}),"Streaming"]})]}),u.jsx($i,{ref:o,children:u.jsx("div",{className:"p-3",children:s.length===0?u.jsx("div",{className:"text-center text-muted-foreground text-sm py-8",children:e.length===0?"No events yet. Start a conversation to see real-time events.":"Processing events... Accumulated events will appear here."}):u.jsx("div",{className:"space-y-2",children:i.map((c,d)=>u.jsx(S3,{event:c},`${c.type}-${d}`))})})})]})}function _3({events:e}){const r=e.filter(s=>s.type==="response.trace_event.complete"||s.type==="response.trace.complete"),o=[...r].reverse();return u.jsxs("div",{className:"h-full",children:[u.jsxs("div",{className:"flex items-center gap-2 p-3 border-b",children:[u.jsx(Ei,{className:"h-4 w-4"}),u.jsx("span",{className:"font-medium",children:"Traces"}),u.jsx(At,{variant:"outline",children:r.length})]}),u.jsx($i,{className:"",children:u.jsx("div",{className:"p-3",children:r.length===0?u.jsxs("div",{className:"text-center text-muted-foreground text-sm py-8",children:["No trace data available.",u.jsx("br",{}),e&&e.length>0&&u.jsxs("div",{className:"mt-3 text-xs border rounded p-2",children:[" ",u.jsx(tk,{className:"inline h-4 w-4 mr-1 "}),"You may have to set the environment variable"," ",u.jsx("span",{className:"font-mono bg-accent/10 px-1 rounded",children:"ENABLE_OTEL=true"})," ","or restart devui with the tracing flag"," ",u.jsx("div",{className:"font-mono bg-accent/10 px-1 rounded",children:"devui --enable-tracing"}),"to enable tracing."]})]}):u.jsx("div",{className:"space-y-3",children:o.map((s,i)=>u.jsx(C3,{event:s},i))})})})]})}function C3({event:e}){const[r,o]=w.useState(!1);if(e.type!=="response.trace_event.complete"&&e.type!=="response.trace.complete"||!("data"in e))return u.jsxs("div",{className:"border rounded p-3 text-red-600 dark:text-red-400 text-xs",children:["Error: Expected trace event but got ",e.type]});const s=e.data;let i=new Date().toLocaleTimeString();s.end_time?i=new Date(s.end_time*1e3).toLocaleTimeString():s.start_time?i=new Date(s.start_time*1e3).toLocaleTimeString():s.timestamp&&(i=new Date(s.timestamp).toLocaleTimeString());const c=s.operation_name||"Unknown Operation",d=s.duration_ms?`${Number(s.duration_ms).toFixed(1)}ms`:"",f=s.entity_id||"";return u.jsxs("div",{className:"border-l-2 border-muted pl-3 py-2 hover:bg-muted/50 transition-colors",children:[u.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground mb-1",children:[u.jsx(Ei,{className:"h-3 w-3 text-orange-600 dark:text-orange-400"}),u.jsx("span",{className:"font-mono",children:i}),u.jsx(At,{variant:"outline",className:"text-xs py-0",children:"trace"}),d&&u.jsx(At,{variant:"secondary",className:"text-xs py-0",children:d})]}),u.jsxs("div",{className:"text-sm",children:[u.jsxs("div",{className:"flex items-center gap-2 cursor-pointer",onClick:()=>o(!r),children:[u.jsx("div",{className:"text-muted-foreground",children:r?u.jsx(Sn,{className:"h-3 w-3"}):u.jsx(Fw,{className:"h-3 w-3"})}),u.jsxs("div",{className:"text-muted-foreground flex-1",children:[u.jsx("span",{className:"font-medium",children:c}),f&&u.jsxs("span",{className:"ml-2 text-xs",children:["(",f,")"]})]})]}),r&&u.jsx("div",{className:"mt-2 ml-5 p-3 bg-muted/30 rounded border",children:u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Ei,{className:"h-4 w-4 text-orange-500"}),u.jsx("span",{className:"font-semibold text-sm",children:"Trace Details"})]}),u.jsxs("div",{className:"grid grid-cols-1 gap-2 text-xs",children:[u.jsxs("div",{children:[u.jsx("span",{className:"font-medium text-muted-foreground",children:"Operation:"}),u.jsx("span",{className:"ml-2 font-mono bg-orange-100 dark:bg-orange-900 px-2 py-1 rounded",children:c})]}),s.span_id&&u.jsxs("div",{children:[u.jsx("span",{className:"font-medium text-muted-foreground",children:"Span ID:"}),u.jsx("span",{className:"ml-2 font-mono text-xs",children:s.span_id})]}),s.trace_id&&u.jsxs("div",{children:[u.jsx("span",{className:"font-medium text-muted-foreground",children:"Trace ID:"}),u.jsx("span",{className:"ml-2 font-mono text-xs",children:s.trace_id})]}),s.parent_span_id&&u.jsxs("div",{children:[u.jsx("span",{className:"font-medium text-muted-foreground",children:"Parent Span:"}),u.jsx("span",{className:"ml-2 font-mono text-xs",children:s.parent_span_id})]}),s.duration_ms&&u.jsxs("div",{children:[u.jsx("span",{className:"font-medium text-muted-foreground",children:"Duration:"}),u.jsxs("span",{className:"ml-2 font-mono text-xs",children:[Number(s.duration_ms).toFixed(2),"ms"]})]}),s.status&&u.jsxs("div",{children:[u.jsx("span",{className:"font-medium text-muted-foreground",children:"Status:"}),u.jsx("span",{className:`ml-2 px-2 py-1 rounded text-xs font-medium ${s.status==="StatusCode.UNSET"||s.status==="OK"?"bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200":"bg-red-100 dark:bg-red-900 text-red-800 dark:text-red-200"}`,children:s.status||"unknown"})]}),s.entity_id&&u.jsxs("div",{children:[u.jsx("span",{className:"font-medium text-muted-foreground",children:"Entity:"}),u.jsx("span",{className:"ml-2 font-mono text-xs",children:s.entity_id})]}),s.attributes&&Object.keys(s.attributes).length>0&&u.jsxs("div",{children:[u.jsx("span",{className:"font-medium text-muted-foreground",children:"Attributes:"}),u.jsx("div",{className:"mt-1 max-h-32 overflow-auto",children:u.jsx("pre",{className:"text-xs bg-background border rounded p-2 whitespace-pre-wrap max-w-full break-all",children:(()=>{try{const m={...s.attributes};return Object.keys(m).forEach(p=>{if(typeof m[p]=="string"&&m[p].startsWith("["))try{m[p]=JSON.parse(m[p])}catch{}}),JSON.stringify(m,null,2)}catch{return JSON.stringify(s.attributes,null,2)}})()})})]})]})]})})]})]})}function j3({events:e}){const r=R1(e),o=[],s=r.filter(f=>f.type==="response.function_call.complete"),i=e.filter(f=>f.type==="response.function_result.complete"),c=new Map;i.forEach(f=>{"data"in f&&f.data&&f.data.call_id&&c.set(String(f.data.call_id),f)}),s.forEach(f=>{if(o.push(f),"data"in f&&f.data&&f.data.call_id){const m=String(f.data.call_id),p=c.get(m);p&&(o.push(p),c.delete(m))}}),c.forEach(f=>{o.push(f)});const d=[...o].reverse();return u.jsxs("div",{className:"h-full",children:[u.jsxs("div",{className:"flex items-center gap-2 p-3 border-b",children:[u.jsx(ju,{className:"h-4 w-4"}),u.jsx("span",{className:"font-medium",children:"Tools"}),u.jsx(At,{variant:"outline",children:o.length})]}),u.jsx($i,{children:u.jsx("div",{className:"p-3",children:o.length===0?u.jsx("div",{className:"text-center text-muted-foreground text-sm py-8",children:"No tool executions yet. Tool calls will appear here during conversations."}):u.jsx("div",{className:"space-y-3",children:d.map((f,m)=>u.jsx(A3,{event:f},m))})})})]})}function A3({event:e}){if(!("data"in e))return null;const r=e.data,o=new Date().toLocaleTimeString(),s=e.type==="response.function_call.complete",i=e.type==="response.function_result.complete";return!s&&!i?null:u.jsxs("div",{className:"border rounded p-3",children:[u.jsxs("div",{className:"flex items-center justify-between mb-2",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(n1,{className:"h-4 w-4 text-yellow-600 dark:text-yellow-400"}),u.jsx("span",{className:"font-medium text-sm",children:s?"Tool Call":"Tool Result"}),s&&r.name!==void 0&&u.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",String(r.name),")"]})]}),u.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:o})]}),s&&u.jsxs("div",{className:"p-2 bg-blue-50 dark:bg-blue-950/50 border border-blue-200 dark:border-blue-800 rounded",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[u.jsx(ju,{className:"h-3 w-3 text-blue-600 dark:text-blue-400"}),u.jsx("span",{className:"text-xs font-mono bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 px-2 py-1 rounded",children:"CALL"}),u.jsx("span",{className:"font-medium text-sm",children:String(r.name||"unknown")})]}),r.arguments!==void 0&&u.jsxs("div",{className:"text-xs",children:[u.jsx("span",{className:"text-muted-foreground mb-1 block",children:"Arguments:"}),u.jsx("pre",{className:"p-2 bg-background border rounded text-xs overflow-auto max-h-32 max-w-full break-all whitespace-pre-wrap",children:typeof r.arguments=="string"?r.arguments:JSON.stringify(r.arguments,null,1)})]})]}),i&&u.jsxs("div",{className:"p-2 bg-green-50 dark:bg-green-950/50 border border-green-200 dark:border-green-800 rounded",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[u.jsx(Kc,{className:"h-3 w-3 text-green-600 dark:text-green-400"}),u.jsx("span",{className:"text-xs font-mono bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200 px-2 py-1 rounded",children:"RESULT"})]}),u.jsxs("div",{className:"text-xs",children:[u.jsx("span",{className:"text-muted-foreground mb-1 block",children:"Result:"}),u.jsx("pre",{className:"p-2 bg-background border rounded text-xs overflow-auto max-h-32 max-w-full break-all whitespace-pre-wrap",children:typeof r.result=="string"?r.result:JSON.stringify(r.result,null,1)})]}),r.exception!==null&&r.exception!==void 0&&u.jsx("div",{className:"mt-2 p-2 bg-red-50 dark:bg-red-950/50 border border-red-200 dark:border-red-800 rounded",children:u.jsxs("span",{className:"text-xs text-red-600 dark:text-red-400",children:["Error: ",String(r.exception)]})})]})]})}function M3({events:e,isStreaming:r=!1}){return u.jsx("div",{className:" overflow-auto h-[calc(100vh-3.7rem)] border-l",children:u.jsxs(y3,{defaultValue:"events",className:"h-full flex flex-col",children:[u.jsx("div",{className:"px-3 pt-3",children:u.jsxs(k1,{className:"w-full",children:[u.jsx(zc,{value:"events",className:"flex-1",children:"Events"}),u.jsx(zc,{value:"traces",className:"flex-1",children:"Traces"}),u.jsx(zc,{value:"tools",className:"flex-1",children:"Tools"})]})}),u.jsx(Lc,{value:"events",className:"flex-1 mt-0",children:u.jsx(E3,{events:e,isStreaming:r})}),u.jsx(Lc,{value:"traces",className:"flex-1 mt-0",children:u.jsx(_3,{events:e})}),u.jsx(Lc,{value:"tools",className:"flex-1 mt-0",children:u.jsx(j3,{events:e})})]})})}function sp({open:e,onOpenChange:r,children:o}){return e?u.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",onClick:()=>r(!1),children:[u.jsx("div",{className:"absolute inset-0 bg-black/50"}),u.jsx("div",{onClick:s=>s.stopPropagation(),children:o})]}):null}function ip({children:e,className:r=""}){const s=r.includes("w-[")||r.includes("w-full")||r.includes("max-w-")?"":"max-w-lg w-full";return u.jsx("div",{className:`relative bg-background border rounded-lg shadow-lg max-h-[90vh] overflow-hidden ${s} ${r}`,children:e})}function lp({children:e,className:r=""}){return u.jsx("div",{className:`space-y-2 ${r}`,children:e})}function cp({children:e,className:r=""}){return u.jsx("h2",{className:`text-lg font-semibold ${r}`,children:e})}function up({onClose:e}){return u.jsx(Ze,{variant:"ghost",size:"sm",onClick:e,className:"absolute top-4 right-4 h-8 w-8 p-0 rounded-sm opacity-70 hover:opacity-100",children:u.jsx(Jc,{className:"h-4 w-4"})})}function T3({children:e}){return u.jsx("div",{className:"flex justify-end gap-2 p-4 border-t bg-muted/50",children:e})}function Jh({className:e,type:r,...o}){return u.jsx("input",{type:r,"data-slot":"input",className:He("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...o})}var k3="Label",D1=w.forwardRef((e,r)=>u.jsx(Me.label,{...e,ref:r,onMouseDown:o=>{o.target.closest("button, input, select, textarea")||(e.onMouseDown?.(o),!o.defaultPrevented&&o.detail>1&&o.preventDefault())}}));D1.displayName=k3;var R3=D1;function Fr({className:e,...r}){return u.jsx(R3,{"data-slot":"label",className:He("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...r})}function Wy({open:e,onOpenChange:r,onBackendUrlChange:o}){const[s,i]=w.useState("about"),c="http://localhost:8080",[d,f]=w.useState(()=>localStorage.getItem("devui_backend_url")||c),[m,p]=w.useState(d),g=()=>{try{new URL(m),localStorage.setItem("devui_backend_url",m),f(m),o?.(m),r(!1),window.location.reload()}catch{alert("Please enter a valid URL (e.g., http://localhost:8080)")}},v=()=>{localStorage.removeItem("devui_backend_url"),p(c),f(c),o?.(c),window.location.reload()},y=m!==d,b=!localStorage.getItem("devui_backend_url");return u.jsx(sp,{open:e,onOpenChange:r,children:u.jsxs(ip,{className:"w-[600px] max-w-[90vw]",children:[u.jsx(lp,{className:"p-6 pb-2",children:u.jsx(cp,{children:"Settings"})}),u.jsx(up,{onClose:()=>r(!1)}),u.jsxs("div",{className:"flex border-b px-6",children:[u.jsxs("button",{onClick:()=>i("about"),className:`px-4 py-2 text-sm font-medium transition-colors relative ${s==="about"?"text-foreground":"text-muted-foreground hover:text-foreground"}`,children:["About",s==="about"&&u.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-primary"})]}),u.jsxs("button",{onClick:()=>i("settings"),className:`px-4 py-2 text-sm font-medium transition-colors relative ${s==="settings"?"text-foreground":"text-muted-foreground hover:text-foreground"}`,children:["Settings",s==="settings"&&u.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-primary"})]})]}),u.jsxs("div",{className:"px-6 pb-6 min-h-[240px]",children:[s==="about"&&u.jsxs("div",{className:"space-y-4 pt-4",children:[u.jsx("p",{className:"text-sm text-muted-foreground",children:"DevUI is a sample app for getting started with Agent Framework."}),u.jsx("div",{className:"flex justify-center pt-2",children:u.jsxs(Ze,{variant:"outline",size:"sm",onClick:()=>window.open("https://github.com/microsoft/agent-framework","_blank"),className:"text-xs",children:[u.jsx(YT,{className:"h-3 w-3 mr-1"}),"Learn More about Agent Framework"]})})]}),s==="settings"&&u.jsx("div",{className:"space-y-6 pt-4",children:u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx(Fr,{htmlFor:"backend-url",className:"text-sm font-medium",children:"Backend URL"}),!b&&u.jsxs(Ze,{variant:"ghost",size:"sm",onClick:v,className:"h-7 text-xs",title:"Reset to default",children:[u.jsx(Zm,{className:"h-3 w-3 mr-1"}),"Reset"]})]}),u.jsx(Jh,{id:"backend-url",type:"url",value:m,onChange:N=>p(N.target.value),placeholder:"http://localhost:8080",className:"font-mono text-sm"}),u.jsxs("p",{className:"text-xs text-muted-foreground",children:["Default: ",u.jsx("span",{className:"font-mono",children:c})]}),u.jsx("div",{className:"flex gap-2 pt-2 min-h-[36px]",children:y&&u.jsxs(u.Fragment,{children:[u.jsx(Ze,{onClick:g,size:"sm",className:"flex-1",children:"Apply & Reload"}),u.jsx(Ze,{onClick:()=>p(d),variant:"outline",size:"sm",className:"flex-1",children:"Cancel"})]})})]})})]})]})})}function D3({className:e,...r}){return u.jsx("div",{"data-slot":"card",className:He("bg-card text-card-foreground flex flex-col gap-6 rounded border py-6 shadow-sm",e),...r})}function O3({className:e,...r}){return u.jsx("div",{"data-slot":"card-header",className:He("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...r})}function O1({className:e,...r}){return u.jsx("div",{"data-slot":"card-title",className:He("leading-none font-semibold",e),...r})}function z3({className:e,...r}){return u.jsx("div",{"data-slot":"card-description",className:He("text-muted-foreground text-sm",e),...r})}function L3({className:e,...r}){return u.jsx("div",{"data-slot":"card-content",className:He("px-6",e),...r})}function H3({className:e,...r}){return u.jsx("div",{"data-slot":"card-footer",className:He("flex items-center px-6 [.border-t]:pt-6",e),...r})}const Zr=[{id:"weather-agent",name:"Weather Agent",description:"Simple weather agent with mock data demonstrating basic tool usage",type:"agent",url:"https://raw.githubusercontent.com/microsoft/agent-framework/main/python/packages/devui/samples/weather_agent/agent.py",tags:["openai","tools","basic"],author:"Microsoft",difficulty:"beginner",features:["Function calling","Mock weather data","Simple tool integration"],requiredEnvVars:[{name:"OPENAI_API_KEY",description:"OpenAI API key for chat completions",required:!0},{name:"OPENAI_CHAT_MODEL_ID",description:"OpenAI model ID (e.g., gpt-4o)",required:!1,example:"gpt-4o"}]},{id:"foundry-weather-agent",name:"Azure AI Weather Agent",description:"Weather agent using Azure AI Agent (Foundry) with Azure CLI authentication",type:"agent",url:"https://raw.githubusercontent.com/microsoft/agent-framework/main/python/packages/devui/samples/foundry_agent/agent.py",tags:["azure-ai","foundry","tools"],author:"Microsoft",difficulty:"beginner",features:["Azure AI Agent integration","Azure CLI authentication","Mock weather tools"],requiredEnvVars:[{name:"AZURE_AI_PROJECT_ENDPOINT",description:"Azure AI Foundry project endpoint URL",required:!0,example:"https://your-project.api.azureml.ms"},{name:"FOUNDRY_MODEL_DEPLOYMENT_NAME",description:"Name of the deployed model in Azure AI Foundry",required:!0,example:"gpt-4o"}]},{id:"weather-agent-azure",name:"Azure OpenAI Weather Agent",description:"Weather agent using Azure OpenAI with API key authentication",type:"agent",url:"https://raw.githubusercontent.com/microsoft/agent-framework/main/python/packages/devui/samples/weather_agent_azure/agent.py",tags:["azure","openai","tools"],author:"Microsoft",difficulty:"beginner",features:["Azure OpenAI integration","API key authentication","Function calling","Mock weather tools"],requiredEnvVars:[{name:"AZURE_OPENAI_API_KEY",description:"Azure OpenAI API key",required:!0},{name:"AZURE_OPENAI_CHAT_DEPLOYMENT_NAME",description:"Name of the deployed model in Azure OpenAI",required:!0,example:"gpt-4o"},{name:"AZURE_OPENAI_ENDPOINT",description:"Azure OpenAI endpoint URL",required:!0,example:"https://your-resource.openai.azure.com"}]},{id:"spam-workflow",name:"Spam Detection Workflow",description:"5-step workflow demonstrating email spam detection with branching logic",type:"workflow",url:"https://raw.githubusercontent.com/microsoft/agent-framework/main/python/packages/devui/samples/spam_workflow/workflow.py",tags:["workflow","branching","multi-step"],author:"Microsoft",difficulty:"beginner",features:["Sequential execution","Conditional branching","Mock spam detection"]},{id:"fanout-workflow",name:"Complex Fan-In/Fan-Out Workflow",description:"Advanced data processing workflow with parallel validation, transformation, and quality assurance stages",type:"workflow",url:"https://raw.githubusercontent.com/microsoft/agent-framework/main/python/packages/devui/samples/fanout_workflow/workflow.py",tags:["workflow","fan-out","fan-in","parallel"],author:"Microsoft",difficulty:"advanced",features:["Fan-out pattern","Parallel execution","Complex state management","Multi-stage processing"]}];Zr.filter(e=>e.type==="agent"),Zr.filter(e=>e.type==="workflow"),Zr.filter(e=>e.difficulty==="beginner"),Zr.filter(e=>e.difficulty==="intermediate"),Zr.filter(e=>e.difficulty==="advanced");const B3=e=>{switch(e){case"beginner":return"bg-green-100 text-green-700 border-green-200";case"intermediate":return"bg-yellow-100 text-yellow-700 border-yellow-200";case"advanced":return"bg-red-100 text-red-700 border-red-200";default:return"bg-gray-100 text-gray-700 border-gray-200"}};function I3({sample:e,onAdd:r,isAdding:o=!1,hasError:s=!1,errorMessage:i,onClearError:c}){const[d,f]=w.useState(!1),m=async()=>{if(!(d||o)){f(!0);try{await r(e)}finally{f(!1)}}},p=e.type==="workflow"?Ua:Qr,g=d||o;return u.jsxs(D3,{className:He("hover:shadow-md transition-shadow duration-200 h-full flex flex-col overflow-hidden w-full",s&&"border-destructive"),children:[u.jsxs(O3,{className:"pb-3 min-w-0",children:[u.jsxs("div",{className:"flex items-start justify-between mb-2",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(p,{className:"h-5 w-5"}),u.jsx(At,{variant:"secondary",className:"text-xs",children:e.type})]}),u.jsx(At,{variant:"outline",className:He("text-xs border",B3(e.difficulty)),children:e.difficulty})]}),u.jsx(O1,{className:"text-lg leading-tight",children:e.name}),u.jsx(z3,{className:"text-sm line-clamp-3",children:e.description})]}),u.jsxs(L3,{className:"pt-0 flex-1 min-w-0 overflow-hidden",children:[s&&i&&u.jsx("div",{className:"mb-3 p-3 bg-destructive/10 border border-destructive/20 rounded-md",children:u.jsxs("div",{className:"flex items-start gap-2",children:[u.jsx(Ia,{className:"h-4 w-4 text-destructive flex-shrink-0 mt-0.5"}),u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsx("p",{className:"text-xs text-destructive font-medium mb-1",children:"Failed to add"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:i})]}),c&&u.jsx("button",{onClick:()=>c(e.id),className:"text-muted-foreground hover:text-foreground","aria-label":"Dismiss error",children:u.jsx(Jc,{className:"h-3 w-3"})})]})}),u.jsxs("div",{className:"space-y-3 min-w-0",children:[u.jsxs("div",{className:"flex flex-wrap gap-1",children:[e.tags.slice(0,3).map(v=>u.jsx(At,{variant:"outline",className:"text-xs",children:v},v)),e.tags.length>3&&u.jsxs(At,{variant:"outline",className:"text-xs",children:["+",e.tags.length-3]})]}),e.requiredEnvVars&&e.requiredEnvVars.length>0&&u.jsxs("details",{className:"group min-w-0 max-w-full overflow-hidden",children:[u.jsxs("summary",{className:"cursor-pointer list-none p-2 bg-amber-50 dark:bg-amber-950/20 border border-amber-200 dark:border-amber-800 rounded-md hover:bg-amber-100 dark:hover:bg-amber-950/30 transition-colors flex items-center justify-between gap-2",children:[u.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[u.jsx(rk,{className:"h-3.5 w-3.5 text-amber-600 dark:text-amber-500 flex-shrink-0"}),u.jsxs("span",{className:"text-xs font-medium text-amber-900 dark:text-amber-100 truncate",children:["Requires ",e.requiredEnvVars.length," env var",e.requiredEnvVars.length>1?"s":""]})]}),u.jsx(Sn,{className:"h-3 w-3 text-amber-600 dark:text-amber-500 flex-shrink-0 group-open:rotate-180 transition-transform"})]}),u.jsx("div",{className:"mt-2 p-2 bg-amber-50 dark:bg-amber-950/20 border border-amber-200 dark:border-amber-800 rounded-md space-y-2 min-w-0 max-w-full overflow-hidden",children:e.requiredEnvVars.map(v=>u.jsxs("div",{className:"text-xs min-w-0 max-w-full overflow-hidden",children:[u.jsx("div",{className:"font-mono font-medium text-amber-900 dark:text-amber-100 break-words",children:v.name}),u.jsx("div",{className:"text-amber-700 dark:text-amber-300 mt-0.5 break-words",children:v.description}),v.example&&u.jsx("div",{className:"font-mono text-amber-600 dark:text-amber-400 mt-0.5 break-all",children:v.example})]},v.name))})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("div",{className:"text-xs font-medium text-muted-foreground",children:"Key Features:"}),u.jsx("ul",{className:"text-xs space-y-1",children:e.features.slice(0,3).map(v=>u.jsxs("li",{className:"flex items-center gap-1",children:[u.jsx("div",{className:"w-1 h-1 rounded-full bg-current opacity-50"}),u.jsx("span",{children:v})]},v))})]})]})]}),u.jsxs(H3,{className:"pt-3 flex-col gap-3",children:[u.jsx("div",{className:"w-full flex items-center justify-between text-xs text-muted-foreground",children:u.jsxs("div",{className:"flex items-center gap-1",children:[u.jsx(t1,{className:"h-3 w-3"}),u.jsx("span",{children:e.author})]})}),u.jsx(Ze,{onClick:m,disabled:g,className:"w-full",size:"sm",variant:s?"outline":"default",children:g?u.jsxs(u.Fragment,{children:[u.jsx(Fm,{className:"h-4 w-4 mr-2 animate-spin"}),"Adding..."]}):s?u.jsxs(u.Fragment,{children:[u.jsx(Wc,{className:"h-4 w-4 mr-2"}),"Retry"]}):u.jsxs(u.Fragment,{children:[u.jsx(Wc,{className:"h-4 w-4 mr-2"}),"Add Sample"]})})]})]})}function jh({samples:e,onAdd:r,addingEntityId:o,errorEntityId:s,errorMessage:i,onClearError:c}){return u.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:e.map(d=>u.jsx("div",{className:"min-w-0",children:u.jsx(I3,{sample:d,onAdd:r,isAdding:o===d.id,hasError:s===d.id,errorMessage:i,onClearError:c})},d.id))})}function Jy({onAdd:e,addingEntityId:r,errorEntityId:o,errorMessage:s,onClearError:i,onClose:c,variant:d="inline",hasExistingEntities:f=!1}){return d==="inline"?u.jsx("div",{className:"flex-1 overflow-auto",children:u.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-8",children:[u.jsx("div",{className:"mb-8 p-4 bg-muted/50 border border-border rounded-lg",children:u.jsxs("div",{className:"flex items-start gap-3",children:[u.jsx(Ok,{className:"h-5 w-5 text-amber-500 flex-shrink-0 mt-0.5"}),u.jsxs("div",{className:"flex-1",children:[u.jsx("h3",{className:"font-semibold mb-1",children:"No agents or workflows configured yet!"}),u.jsxs("p",{className:"text-sm text-muted-foreground mb-2",children:["You can configure agents or workflows by running"," ",u.jsx("code",{className:"px-1.5 py-0.5 bg-background rounded text-xs",children:"devui"})," ","in a directory containing them."]}),u.jsx("p",{className:"text-sm text-muted-foreground",children:"You can also import any of the sample agents and workflows below to get started quickly."})]})]})}),u.jsxs("div",{className:"mb-6",children:[u.jsx("h3",{className:"text-lg font-semibold mb-4",children:"Sample Gallery"}),u.jsx(jh,{samples:Zr,onAdd:e,addingEntityId:r,errorEntityId:o,errorMessage:s,onClearError:i})]}),u.jsx("div",{className:"text-center mt-12 pt-8 border-t",children:u.jsxs("p",{className:"text-sm text-muted-foreground",children:["Want to create your own agents or workflows? Check out the"," ",u.jsx("a",{href:"https://github.com/microsoft/agent-framework",className:"text-primary hover:underline",target:"_blank",rel:"noopener noreferrer",children:"documentation"})]})})]})}):d==="route"?u.jsx("div",{className:"h-full overflow-auto",children:u.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-8",children:[u.jsxs("div",{className:"mb-8",children:[f&&u.jsx("div",{className:"mb-4",children:u.jsxs(Ze,{variant:"ghost",onClick:c,className:"gap-2",children:[u.jsx(CT,{className:"h-4 w-4"}),"Back"]})}),u.jsxs("div",{className:"text-center",children:[u.jsx("h2",{className:"text-2xl font-semibold mb-2",children:"Sample Gallery"}),u.jsx("p",{className:"text-muted-foreground max-w-2xl mx-auto",children:"Browse and add sample agents and workflows to learn the Agent Framework. These are curated examples ranging from beginner to advanced."})]})]}),u.jsx(jh,{samples:Zr,onAdd:e,addingEntityId:r,errorEntityId:o,errorMessage:s,onClearError:i}),u.jsx("div",{className:"text-center mt-12 pt-8 border-t",children:u.jsxs("p",{className:"text-sm text-muted-foreground",children:["Want to create your own agents or workflows? Check out the"," ",u.jsx("a",{href:"https://github.com/microsoft/agent-framework",className:"text-primary hover:underline",target:"_blank",rel:"noopener noreferrer",children:"documentation"})]})})]})}):u.jsx(jh,{samples:Zr,onAdd:e,addingEntityId:r,errorEntityId:o,errorMessage:s,onClearError:i})}function Hc({className:e,...r}){return u.jsx("textarea",{"data-slot":"textarea",className:He("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...r})}function U3({onFilesSelected:e,accept:r="image/*,.pdf,audio/*,.wav,.mp3,.m4a,.ogg",multiple:o=!0,maxSize:s=50*1024*1024,disabled:i=!1,className:c=""}){const d=w.useRef(null),f=y=>{if(!y||y.length===0)return;const b=[],N=[];Array.from(y).forEach(S=>{if(S.size>s){N.push(`${S.name} is too large (max ${P3(s)})`);return}if(r&&!$3(S,r)){N.push(`${S.name} is not an accepted file type`);return}b.push(S)}),N.length>0&&console.warn("File upload errors:",N),b.length>0&&e(b)},m=()=>{d.current&&d.current.click()},p=y=>{f(y.target.files),y.target.value=""},g=y=>{if(y.preventDefault(),y.stopPropagation(),i)return;const b=y.dataTransfer.files;f(b)},v=y=>{y.preventDefault(),y.stopPropagation()};return u.jsxs("div",{className:c,children:[u.jsx("input",{ref:d,type:"file",accept:r,multiple:o,onChange:p,className:"hidden",disabled:i}),u.jsx(Ze,{type:"button",variant:"outline",size:"icon",onClick:m,disabled:i,onDrop:g,onDragOver:v,className:"shrink-0 transition-colors hover:bg-muted",title:"Upload files (images, PDFs, audio)",children:u.jsx(Lk,{className:"h-4 w-4"})})]})}function P3(e){if(e===0)return"0 Bytes";const r=1024,o=["Bytes","KB","MB","GB"],s=Math.floor(Math.log(e)/Math.log(r));return parseFloat((e/Math.pow(r,s)).toFixed(2))+" "+o[s]}function $3(e,r){return r.split(",").map(s=>s.trim()).some(s=>{if(s.startsWith("."))return e.name.toLowerCase().endsWith(s.toLowerCase());if(s.includes("/*")){const[i]=s.split("/");return e.type.startsWith(i+"/")}else return e.type===s})}function V3({attachments:e,onRemoveAttachment:r,className:o=""}){return e.length===0?null:u.jsx("div",{className:`flex flex-wrap gap-2 p-2 bg-muted rounded-lg ${o}`,children:e.map(s=>u.jsx(Y3,{attachment:s,onRemove:()=>r(s.id)},s.id))})}function Y3({attachment:e,onRemove:r}){const[o,s]=w.useState(!1),i=()=>{switch(e.type){case"image":return e.preview?u.jsx("img",{src:e.preview,alt:e.file.name,className:"w-full h-full object-cover"}):u.jsx("div",{className:"flex items-center justify-center w-full h-full bg-gray-200",children:u.jsx(JT,{className:"h-6 w-6 text-gray-400"})});case"pdf":return u.jsxs("div",{className:"flex flex-col items-center justify-center w-full h-full bg-red-50",children:[u.jsx(Ni,{className:"h-6 w-6 text-red-500 mb-1"}),u.jsx("span",{className:"text-xs text-red-600",children:"PDF"})]});case"audio":return u.jsxs("div",{className:"flex flex-col items-center justify-center w-full h-full bg-purple-50",children:[u.jsx(Ww,{className:"h-6 w-6 text-purple-500 mb-1"}),u.jsx("span",{className:"text-xs text-purple-600",children:"AUDIO"})]});default:return u.jsxs("div",{className:"flex flex-col items-center justify-center w-full h-full bg-gray-100",children:[u.jsx(Ni,{className:"h-6 w-6 text-gray-500 mb-1"}),u.jsx("span",{className:"text-xs text-gray-600",children:"FILE"})]})}};return u.jsxs("div",{className:"relative w-16 h-16 rounded border overflow-hidden group cursor-pointer",onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),title:e.file.name,children:[i(),u.jsx("div",{className:`absolute inset-0 bg-black/60 flex items-center justify-center transition-all duration-200 ease-in-out ${o?"opacity-100 backdrop-blur-sm":"opacity-0 pointer-events-none"}`,onClick:r,children:u.jsx("div",{className:`transition-all duration-200 ease-in-out ${o?"scale-100 opacity-100":"scale-75 opacity-0"}`,children:u.jsx(Rk,{className:"h-5 w-5 text-white drop-shadow-lg"})})}),u.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-black bg-opacity-75 text-white text-xs p-1 truncate opacity-0 group-hover:opacity-100 transition-opacity duration-200",children:e.file.name})]})}function z1(e){return e.type==="text"}function q3(e){return e.type==="function_call"}function G3(e){return e.type==="function_result"}function X3({content:e,isStreaming:r,className:o}){const[s,i]=w.useState(!1);if(!z1(e))return null;const c=e.text,d=1600,f=c.length>d&&!r,m=f&&!s?c.slice(0,d)+"...":c;return u.jsxs("div",{className:`whitespace-pre-wrap break-words ${o||""}`,children:[u.jsx("div",{className:s&&f?"max-h-96 overflow-y-auto":"",children:m}),r&&u.jsx("span",{className:"ml-1 inline-block h-2 w-2 animate-pulse rounded-full bg-current"}),f&&u.jsx("div",{className:"flex justify-end mt-1",children:u.jsx("button",{onClick:()=>i(!s),className:`inline-flex items-center gap-1 text-xs
|
|
372
|
+
bg-background/80 hover:bg-background border border-border/50 hover:border-border
|
|
373
|
+
text-muted-foreground hover:text-foreground
|
|
374
|
+
transition-colors cursor-pointer px-2 py-1 rounded`,children:s?u.jsxs(u.Fragment,{children:["less ",u.jsx(Zw,{className:"h-3 w-3"})]}):u.jsxs(u.Fragment,{children:[(c.length-d).toLocaleString()," more"," ",u.jsx(Sn,{className:"h-3 w-3"})]})})})]})}function F3({content:e,className:r}){const[o,s]=w.useState(!1),[i,c]=w.useState(!1);if(e.type!=="data")return null;const d=typeof e.uri=="string"?e.uri:"",f=d.match(/^data:([^;]+)/),m=e.media_type||f?.[1]||"unknown",p=m.startsWith("image/"),g=m==="application/pdf",v=m.startsWith("audio/");return p&&!o?u.jsxs("div",{className:`my-2 ${r||""}`,children:[u.jsx("img",{src:d,alt:"Uploaded image",className:`rounded-lg border max-w-full transition-all cursor-pointer ${i?"max-h-none":"max-h-64"}`,onClick:()=>c(!i),onError:()=>s(!0)}),u.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:[m," • Click to ",i?"collapse":"expand"]})]}):v?u.jsxs("div",{className:`my-2 p-3 border rounded-lg bg-purple-50 dark:bg-purple-950/20 ${r||""}`,children:[u.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[u.jsx(Ww,{className:"h-4 w-4 text-purple-500"}),u.jsx("span",{className:"text-sm font-medium text-purple-800 dark:text-purple-300",children:"Audio File"}),u.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",m,")"]})]}),u.jsxs("audio",{controls:!0,className:"w-full max-w-md",children:[u.jsx("source",{src:d,type:m}),"Your browser does not support the audio element."]})]}):u.jsxs("div",{className:`my-2 p-3 border rounded-lg bg-muted ${r||""}`,children:[u.jsxs("div",{className:"flex items-center gap-2",children:[g?u.jsx(Ni,{className:"h-4 w-4 text-red-500"}):u.jsx(qy,{className:"h-4 w-4"}),u.jsx("span",{className:"text-sm font-medium",children:g?"PDF Document":"File Attachment"}),u.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",m,")"]})]}),u.jsxs(Ze,{variant:"outline",size:"sm",className:"mt-2",onClick:()=>{const y=document.createElement("a");y.href=d,y.download=`attachment.${m.split("/")[1]||"bin"}`,y.click()},children:[u.jsx(qy,{className:"h-3 w-3 mr-1"}),"Download"]})]})}function Z3({content:e,className:r}){const[o,s]=w.useState(!1);if(!q3(e))return null;let i;try{i=typeof e.arguments=="string"?JSON.parse(e.arguments):e.arguments}catch{i=e.arguments}return u.jsxs("div",{className:`my-2 p-3 border rounded-lg bg-blue-50 ${r||""}`,children:[u.jsxs("div",{className:"flex items-center gap-2 cursor-pointer",onClick:()=>s(!o),children:[u.jsx(Kw,{className:"h-4 w-4 text-blue-600"}),u.jsxs("span",{className:"text-sm font-medium text-blue-800",children:["Function Call: ",e.name]}),u.jsx("span",{className:"text-xs text-blue-600",children:o?"▼":"▶"})]}),o&&u.jsxs("div",{className:"mt-2 text-xs font-mono bg-white p-2 rounded border",children:[u.jsx("div",{className:"text-blue-600 mb-1",children:"Arguments:"}),u.jsx("pre",{className:"whitespace-pre-wrap",children:JSON.stringify(i,null,2)})]})]})}function K3({content:e,className:r}){const[o,s]=w.useState(!1);return G3(e)?u.jsxs("div",{className:`my-2 p-3 border rounded-lg bg-green-50 ${r||""}`,children:[u.jsxs("div",{className:"flex items-center gap-2 cursor-pointer",onClick:()=>s(!o),children:[u.jsx(Kw,{className:"h-4 w-4 text-green-600"}),u.jsx("span",{className:"text-sm font-medium text-green-800",children:"Function Result"}),u.jsx("span",{className:"text-xs text-green-600",children:o?"▼":"▶"})]}),o&&u.jsx("div",{className:"mt-2 text-xs font-mono bg-white p-2 rounded border",children:u.jsx("pre",{className:"whitespace-pre-wrap",children:typeof e.result=="string"?e.result:JSON.stringify(e.result,null,2)})})]}):null}function Q3({content:e,className:r}){return e.type!=="error"?null:u.jsxs("div",{className:`my-2 p-3 border rounded-lg bg-red-50 ${r||""}`,children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Ia,{className:"h-4 w-4 text-red-500"}),u.jsx("span",{className:"text-sm font-medium text-red-800",children:"Error"}),e.error_code&&u.jsxs("span",{className:"text-xs text-red-600",children:["(",e.error_code,")"]})]}),u.jsx("div",{className:"mt-1 text-sm text-red-700",children:e.error})]})}function W3({content:e,className:r}){const[o,s]=w.useState(!1);return e.type!=="uri"?null:e.media_type?.startsWith("image/")&&!o?u.jsxs("div",{className:`my-2 ${r||""}`,children:[u.jsx("img",{src:e.uri,alt:"Referenced image",className:"rounded-lg border max-w-full max-h-64",onError:()=>s(!0)}),u.jsx("div",{className:"text-xs text-muted-foreground mt-1",children:u.jsx("a",{href:e.uri,target:"_blank",rel:"noopener noreferrer",className:"hover:underline",children:e.uri})})]}):u.jsxs("div",{className:`my-2 p-3 border rounded-lg bg-muted ${r||""}`,children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Ni,{className:"h-4 w-4"}),u.jsx("a",{href:e.uri,target:"_blank",rel:"noopener noreferrer",className:"text-sm font-medium hover:underline",children:e.media_type||"External Link"})]}),u.jsx("div",{className:"text-xs text-muted-foreground mt-1 break-all",children:e.uri})]})}function Bc({content:e,isStreaming:r,className:o}){switch(e.type){case"text":return u.jsx(X3,{content:e,isStreaming:r,className:o});case"data":return u.jsx(F3,{content:e,className:o});case"uri":return u.jsx(W3,{content:e,className:o});case"function_call":return u.jsx(Z3,{content:e,className:o});case"function_result":return u.jsx(K3,{content:e,className:o});case"error":return u.jsx(Q3,{content:e,className:o});default:return u.jsxs("div",{className:`my-2 p-2 bg-gray-100 rounded text-xs ${o||""}`,children:[u.jsxs("div",{children:["Unsupported content type: ",e.type]}),u.jsx("pre",{className:"mt-1 text-xs whitespace-pre-wrap",children:JSON.stringify(e,null,2)})]})}}function J3({contents:e,isStreaming:r=!1,className:o}){const[s,i]=w.useState({textAccumulator:"",dataContentItems:[],functionCalls:[],errors:[],isComplete:!r});w.useEffect(()=>{let f="";const m=[],p=[],g=[];e.forEach(v=>{z1(v)?f+=v.text:v.type==="data"?r||m.push(v):v.type==="function_call"?p.push(v):v.type==="error"?g.push(v):m.push(v)}),i({textAccumulator:f,dataContentItems:m,functionCalls:p,errors:g,isComplete:!r})},[e,r]);const c=s.textAccumulator.length>0,d=s.dataContentItems.length>0||s.functionCalls.length>0||s.errors.length>0;return u.jsxs("div",{className:o,children:[c&&u.jsxs("div",{className:"whitespace-pre-wrap break-words",children:[s.textAccumulator,r&&c&&u.jsx("span",{className:"ml-1 inline-block h-2 w-2 animate-pulse rounded-full bg-current"})]}),d&&u.jsxs("div",{className:"mt-2 space-y-2",children:[s.errors.map((f,m)=>u.jsx(Bc,{content:f},`error-${m}`)),s.functionCalls.map((f,m)=>u.jsx(Bc,{content:f},`function-${m}`)),s.dataContentItems.map((f,m)=>u.jsx(Bc,{content:f,isStreaming:r},`data-${m}`))]}),r&&!c&&!d&&u.jsx("div",{className:"flex items-center space-x-1",children:u.jsxs("div",{className:"flex space-x-1",children:[u.jsx("div",{className:"h-2 w-2 animate-bounce rounded-full bg-current [animation-delay:-0.3s]"}),u.jsx("div",{className:"h-2 w-2 animate-bounce rounded-full bg-current [animation-delay:-0.15s]"}),u.jsx("div",{className:"h-2 w-2 animate-bounce rounded-full bg-current"})]})})]})}function eR({contents:e,isStreaming:r=!1,className:o}){return r?u.jsx(J3,{contents:e,isStreaming:r,className:o}):u.jsx("div",{className:o,children:e.map((s,i)=>u.jsx(Bc,{content:s,isStreaming:!1,className:i>0?"mt-2":""},i))})}function L1(e){const r=w.useRef({value:e,previous:e});return w.useMemo(()=>(r.current.value!==e&&(r.current.previous=r.current.value,r.current.value=e),r.current.previous),[e])}var H1=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),tR="VisuallyHidden",nR=w.forwardRef((e,r)=>u.jsx(Me.span,{...e,ref:r,style:{...H1,...e.style}}));nR.displayName=tR;var rR=[" ","Enter","ArrowUp","ArrowDown"],oR=[" ","Enter"],Ro="Select",[ku,Ru,aR]=_m(Ro),[es,SL]=pr(Ro,[aR,bu]),Du=bu(),[sR,to]=es(Ro),[iR,lR]=es(Ro),B1=e=>{const{__scopeSelect:r,children:o,open:s,defaultOpen:i,onOpenChange:c,value:d,defaultValue:f,onValueChange:m,dir:p,name:g,autoComplete:v,disabled:y,required:b,form:N}=e,S=Du(r),[C,j]=w.useState(null),[R,E]=w.useState(null),[A,D]=w.useState(!1),L=Hi(p),[B,U]=Ha({prop:s,defaultProp:i??!1,onChange:c,caller:Ro}),[G,re]=Ha({prop:d,defaultProp:f,onChange:m,caller:Ro}),Z=w.useRef(null),Y=C?N||!!C.closest("form"):!0,[ee,O]=w.useState(new Set),P=Array.from(ee).map(T=>T.props.value).join(";");return u.jsx(Xb,{...S,children:u.jsxs(sR,{required:b,scope:r,trigger:C,onTriggerChange:j,valueNode:R,onValueNodeChange:E,valueNodeHasChildren:A,onValueNodeHasChildrenChange:D,contentId:To(),value:G,onValueChange:re,open:B,onOpenChange:U,dir:L,triggerPointerDownPosRef:Z,disabled:y,children:[u.jsx(ku.Provider,{scope:r,children:u.jsx(iR,{scope:e.__scopeSelect,onNativeOptionAdd:w.useCallback(T=>{O(z=>new Set(z).add(T))},[]),onNativeOptionRemove:w.useCallback(T=>{O(z=>{const H=new Set(z);return H.delete(T),H})},[]),children:o})}),Y?u.jsxs(sS,{"aria-hidden":!0,required:b,tabIndex:-1,name:g,autoComplete:v,value:G,onChange:T=>re(T.target.value),disabled:y,form:N,children:[G===void 0?u.jsx("option",{value:""}):null,Array.from(ee)]},P):null]})})};B1.displayName=Ro;var I1="SelectTrigger",U1=w.forwardRef((e,r)=>{const{__scopeSelect:o,disabled:s=!1,...i}=e,c=Du(o),d=to(I1,o),f=d.disabled||s,m=Pe(r,d.onTriggerChange),p=Ru(o),g=w.useRef("touch"),[v,y,b]=lS(S=>{const C=p().filter(E=>!E.disabled),j=C.find(E=>E.value===d.value),R=cS(C,S,j);R!==void 0&&d.onValueChange(R.value)}),N=S=>{f||(d.onOpenChange(!0),b()),S&&(d.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return u.jsx(Fb,{asChild:!0,...c,children:u.jsx(Me.button,{type:"button",role:"combobox","aria-controls":d.contentId,"aria-expanded":d.open,"aria-required":d.required,"aria-autocomplete":"none",dir:d.dir,"data-state":d.open?"open":"closed",disabled:f,"data-disabled":f?"":void 0,"data-placeholder":iS(d.value)?"":void 0,...i,ref:m,onClick:be(i.onClick,S=>{S.currentTarget.focus(),g.current!=="mouse"&&N(S)}),onPointerDown:be(i.onPointerDown,S=>{g.current=S.pointerType;const C=S.target;C.hasPointerCapture(S.pointerId)&&C.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(N(S),S.preventDefault())}),onKeyDown:be(i.onKeyDown,S=>{const C=v.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&y(S.key),!(C&&S.key===" ")&&rR.includes(S.key)&&(N(),S.preventDefault())})})})});U1.displayName=I1;var P1="SelectValue",$1=w.forwardRef((e,r)=>{const{__scopeSelect:o,className:s,style:i,children:c,placeholder:d="",...f}=e,m=to(P1,o),{onValueNodeHasChildrenChange:p}=m,g=c!==void 0,v=Pe(r,m.onValueNodeChange);return St(()=>{p(g)},[p,g]),u.jsx(Me.span,{...f,ref:v,style:{pointerEvents:"none"},children:iS(m.value)?u.jsx(u.Fragment,{children:d}):c})});$1.displayName=P1;var cR="SelectIcon",V1=w.forwardRef((e,r)=>{const{__scopeSelect:o,children:s,...i}=e;return u.jsx(Me.span,{"aria-hidden":!0,...i,ref:r,children:s||"▼"})});V1.displayName=cR;var uR="SelectPortal",Y1=e=>u.jsx(Lm,{asChild:!0,...e});Y1.displayName=uR;var Do="SelectContent",q1=w.forwardRef((e,r)=>{const o=to(Do,e.__scopeSelect),[s,i]=w.useState();if(St(()=>{i(new DocumentFragment)},[]),!o.open){const c=s;return c?Li.createPortal(u.jsx(G1,{scope:e.__scopeSelect,children:u.jsx(ku.Slot,{scope:e.__scopeSelect,children:u.jsx("div",{children:e.children})})}),c):null}return u.jsx(X1,{...e,ref:r})});q1.displayName=Do;var pn=10,[G1,no]=es(Do),dR="SelectContentImpl",fR=La("SelectContent.RemoveScroll"),X1=w.forwardRef((e,r)=>{const{__scopeSelect:o,position:s="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:c,onPointerDownOutside:d,side:f,sideOffset:m,align:p,alignOffset:g,arrowPadding:v,collisionBoundary:y,collisionPadding:b,sticky:N,hideWhenDetached:S,avoidCollisions:C,...j}=e,R=to(Do,o),[E,A]=w.useState(null),[D,L]=w.useState(null),B=Pe(r,q=>A(q)),[U,G]=w.useState(null),[re,Z]=w.useState(null),Y=Ru(o),[ee,O]=w.useState(!1),P=w.useRef(!1);w.useEffect(()=>{if(E)return aw(E)},[E]),Nb();const T=w.useCallback(q=>{const[Q,...se]=Y().map(de=>de.ref.current),[me]=se.slice(-1),pe=document.activeElement;for(const de of q)if(de===pe||(de?.scrollIntoView({block:"nearest"}),de===Q&&D&&(D.scrollTop=0),de===me&&D&&(D.scrollTop=D.scrollHeight),de?.focus(),document.activeElement!==pe))return},[Y,D]),z=w.useCallback(()=>T([U,E]),[T,U,E]);w.useEffect(()=>{ee&&z()},[ee,z]);const{onOpenChange:H,triggerPointerDownPosRef:V}=R;w.useEffect(()=>{if(E){let q={x:0,y:0};const Q=me=>{q={x:Math.abs(Math.round(me.pageX)-(V.current?.x??0)),y:Math.abs(Math.round(me.pageY)-(V.current?.y??0))}},se=me=>{q.x<=10&&q.y<=10?me.preventDefault():E.contains(me.target)||H(!1),document.removeEventListener("pointermove",Q),V.current=null};return V.current!==null&&(document.addEventListener("pointermove",Q),document.addEventListener("pointerup",se,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Q),document.removeEventListener("pointerup",se,{capture:!0})}}},[E,H,V]),w.useEffect(()=>{const q=()=>H(!1);return window.addEventListener("blur",q),window.addEventListener("resize",q),()=>{window.removeEventListener("blur",q),window.removeEventListener("resize",q)}},[H]);const[M,I]=lS(q=>{const Q=Y().filter(pe=>!pe.disabled),se=Q.find(pe=>pe.ref.current===document.activeElement),me=cS(Q,q,se);me&&setTimeout(()=>me.ref.current.focus())}),W=w.useCallback((q,Q,se)=>{const me=!P.current&&!se;(R.value!==void 0&&R.value===Q||me)&&(G(q),me&&(P.current=!0))},[R.value]),K=w.useCallback(()=>E?.focus(),[E]),ne=w.useCallback((q,Q,se)=>{const me=!P.current&&!se;(R.value!==void 0&&R.value===Q||me)&&Z(q)},[R.value]),fe=s==="popper"?em:F1,ue=fe===em?{side:f,sideOffset:m,align:p,alignOffset:g,arrowPadding:v,collisionBoundary:y,collisionPadding:b,sticky:N,hideWhenDetached:S,avoidCollisions:C}:{};return u.jsx(G1,{scope:o,content:E,viewport:D,onViewportChange:L,itemRefCallback:W,selectedItem:U,onItemLeave:K,itemTextRefCallback:ne,focusSelectedItem:z,selectedItemText:re,position:s,isPositioned:ee,searchRef:M,children:u.jsx(Hm,{as:fR,allowPinchZoom:!0,children:u.jsx(jm,{asChild:!0,trapped:R.open,onMountAutoFocus:q=>{q.preventDefault()},onUnmountAutoFocus:be(i,q=>{R.trigger?.focus({preventScroll:!0}),q.preventDefault()}),children:u.jsx(Cm,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:q=>q.preventDefault(),onDismiss:()=>R.onOpenChange(!1),children:u.jsx(fe,{role:"listbox",id:R.contentId,"data-state":R.open?"open":"closed",dir:R.dir,onContextMenu:q=>q.preventDefault(),...j,...ue,onPlaced:()=>O(!0),ref:B,style:{display:"flex",flexDirection:"column",outline:"none",...j.style},onKeyDown:be(j.onKeyDown,q=>{const Q=q.ctrlKey||q.altKey||q.metaKey;if(q.key==="Tab"&&q.preventDefault(),!Q&&q.key.length===1&&I(q.key),["ArrowUp","ArrowDown","Home","End"].includes(q.key)){let me=Y().filter(pe=>!pe.disabled).map(pe=>pe.ref.current);if(["ArrowUp","End"].includes(q.key)&&(me=me.slice().reverse()),["ArrowUp","ArrowDown"].includes(q.key)){const pe=q.target,de=me.indexOf(pe);me=me.slice(de+1)}setTimeout(()=>T(me)),q.preventDefault()}})})})})})})});X1.displayName=dR;var hR="SelectItemAlignedPosition",F1=w.forwardRef((e,r)=>{const{__scopeSelect:o,onPlaced:s,...i}=e,c=to(Do,o),d=no(Do,o),[f,m]=w.useState(null),[p,g]=w.useState(null),v=Pe(r,B=>g(B)),y=Ru(o),b=w.useRef(!1),N=w.useRef(!0),{viewport:S,selectedItem:C,selectedItemText:j,focusSelectedItem:R}=d,E=w.useCallback(()=>{if(c.trigger&&c.valueNode&&f&&p&&S&&C&&j){const B=c.trigger.getBoundingClientRect(),U=p.getBoundingClientRect(),G=c.valueNode.getBoundingClientRect(),re=j.getBoundingClientRect();if(c.dir!=="rtl"){const pe=re.left-U.left,de=G.left-pe,he=B.left-de,ge=B.width+he,Te=Math.max(ge,U.width),Ae=window.innerWidth-pn,Ne=Wh(de,[pn,Math.max(pn,Ae-Te)]);f.style.minWidth=ge+"px",f.style.left=Ne+"px"}else{const pe=U.right-re.right,de=window.innerWidth-G.right-pe,he=window.innerWidth-B.right-de,ge=B.width+he,Te=Math.max(ge,U.width),Ae=window.innerWidth-pn,Ne=Wh(de,[pn,Math.max(pn,Ae-Te)]);f.style.minWidth=ge+"px",f.style.right=Ne+"px"}const Z=y(),Y=window.innerHeight-pn*2,ee=S.scrollHeight,O=window.getComputedStyle(p),P=parseInt(O.borderTopWidth,10),T=parseInt(O.paddingTop,10),z=parseInt(O.borderBottomWidth,10),H=parseInt(O.paddingBottom,10),V=P+T+ee+H+z,M=Math.min(C.offsetHeight*5,V),I=window.getComputedStyle(S),W=parseInt(I.paddingTop,10),K=parseInt(I.paddingBottom,10),ne=B.top+B.height/2-pn,fe=Y-ne,ue=C.offsetHeight/2,q=C.offsetTop+ue,Q=P+T+q,se=V-Q;if(Q<=ne){const pe=Z.length>0&&C===Z[Z.length-1].ref.current;f.style.bottom="0px";const de=p.clientHeight-S.offsetTop-S.offsetHeight,he=Math.max(fe,ue+(pe?K:0)+de+z),ge=Q+he;f.style.height=ge+"px"}else{const pe=Z.length>0&&C===Z[0].ref.current;f.style.top="0px";const he=Math.max(ne,P+S.offsetTop+(pe?W:0)+ue)+se;f.style.height=he+"px",S.scrollTop=Q-ne+S.offsetTop}f.style.margin=`${pn}px 0`,f.style.minHeight=M+"px",f.style.maxHeight=Y+"px",s?.(),requestAnimationFrame(()=>b.current=!0)}},[y,c.trigger,c.valueNode,f,p,S,C,j,c.dir,s]);St(()=>E(),[E]);const[A,D]=w.useState();St(()=>{p&&D(window.getComputedStyle(p).zIndex)},[p]);const L=w.useCallback(B=>{B&&N.current===!0&&(E(),R?.(),N.current=!1)},[E,R]);return u.jsx(pR,{scope:o,contentWrapper:f,shouldExpandOnScrollRef:b,onScrollButtonChange:L,children:u.jsx("div",{ref:m,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:A},children:u.jsx(Me.div,{...i,ref:v,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});F1.displayName=hR;var mR="SelectPopperPosition",em=w.forwardRef((e,r)=>{const{__scopeSelect:o,align:s="start",collisionPadding:i=pn,...c}=e,d=Du(o);return u.jsx(Zb,{...d,...c,ref:r,align:s,collisionPadding:i,style:{boxSizing:"border-box",...c.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});em.displayName=mR;var[pR,dp]=es(Do,{}),tm="SelectViewport",Z1=w.forwardRef((e,r)=>{const{__scopeSelect:o,nonce:s,...i}=e,c=no(tm,o),d=dp(tm,o),f=Pe(r,c.onViewportChange),m=w.useRef(0);return u.jsxs(u.Fragment,{children:[u.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),u.jsx(ku.Slot,{scope:o,children:u.jsx(Me.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:f,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:be(i.onScroll,p=>{const g=p.currentTarget,{contentWrapper:v,shouldExpandOnScrollRef:y}=d;if(y?.current&&v){const b=Math.abs(m.current-g.scrollTop);if(b>0){const N=window.innerHeight-pn*2,S=parseFloat(v.style.minHeight),C=parseFloat(v.style.height),j=Math.max(S,C);if(j<N){const R=j+b,E=Math.min(N,R),A=R-E;v.style.height=E+"px",v.style.bottom==="0px"&&(g.scrollTop=A>0?A:0,v.style.justifyContent="flex-end")}}}m.current=g.scrollTop})})})]})});Z1.displayName=tm;var K1="SelectGroup",[gR,xR]=es(K1),yR=w.forwardRef((e,r)=>{const{__scopeSelect:o,...s}=e,i=To();return u.jsx(gR,{scope:o,id:i,children:u.jsx(Me.div,{role:"group","aria-labelledby":i,...s,ref:r})})});yR.displayName=K1;var Q1="SelectLabel",vR=w.forwardRef((e,r)=>{const{__scopeSelect:o,...s}=e,i=xR(Q1,o);return u.jsx(Me.div,{id:i.id,...s,ref:r})});vR.displayName=Q1;var ru="SelectItem",[bR,W1]=es(ru),J1=w.forwardRef((e,r)=>{const{__scopeSelect:o,value:s,disabled:i=!1,textValue:c,...d}=e,f=to(ru,o),m=no(ru,o),p=f.value===s,[g,v]=w.useState(c??""),[y,b]=w.useState(!1),N=Pe(r,R=>m.itemRefCallback?.(R,s,i)),S=To(),C=w.useRef("touch"),j=()=>{i||(f.onValueChange(s),f.onOpenChange(!1))};if(s==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return u.jsx(bR,{scope:o,value:s,disabled:i,textId:S,isSelected:p,onItemTextChange:w.useCallback(R=>{v(E=>E||(R?.textContent??"").trim())},[]),children:u.jsx(ku.ItemSlot,{scope:o,value:s,disabled:i,textValue:g,children:u.jsx(Me.div,{role:"option","aria-labelledby":S,"data-highlighted":y?"":void 0,"aria-selected":p&&y,"data-state":p?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...d,ref:N,onFocus:be(d.onFocus,()=>b(!0)),onBlur:be(d.onBlur,()=>b(!1)),onClick:be(d.onClick,()=>{C.current!=="mouse"&&j()}),onPointerUp:be(d.onPointerUp,()=>{C.current==="mouse"&&j()}),onPointerDown:be(d.onPointerDown,R=>{C.current=R.pointerType}),onPointerMove:be(d.onPointerMove,R=>{C.current=R.pointerType,i?m.onItemLeave?.():C.current==="mouse"&&R.currentTarget.focus({preventScroll:!0})}),onPointerLeave:be(d.onPointerLeave,R=>{R.currentTarget===document.activeElement&&m.onItemLeave?.()}),onKeyDown:be(d.onKeyDown,R=>{m.searchRef?.current!==""&&R.key===" "||(oR.includes(R.key)&&j(),R.key===" "&&R.preventDefault())})})})})});J1.displayName=ru;var hi="SelectItemText",eS=w.forwardRef((e,r)=>{const{__scopeSelect:o,className:s,style:i,...c}=e,d=to(hi,o),f=no(hi,o),m=W1(hi,o),p=lR(hi,o),[g,v]=w.useState(null),y=Pe(r,j=>v(j),m.onItemTextChange,j=>f.itemTextRefCallback?.(j,m.value,m.disabled)),b=g?.textContent,N=w.useMemo(()=>u.jsx("option",{value:m.value,disabled:m.disabled,children:b},m.value),[m.disabled,m.value,b]),{onNativeOptionAdd:S,onNativeOptionRemove:C}=p;return St(()=>(S(N),()=>C(N)),[S,C,N]),u.jsxs(u.Fragment,{children:[u.jsx(Me.span,{id:m.textId,...c,ref:y}),m.isSelected&&d.valueNode&&!d.valueNodeHasChildren?Li.createPortal(c.children,d.valueNode):null]})});eS.displayName=hi;var tS="SelectItemIndicator",nS=w.forwardRef((e,r)=>{const{__scopeSelect:o,...s}=e;return W1(tS,o).isSelected?u.jsx(Me.span,{"aria-hidden":!0,...s,ref:r}):null});nS.displayName=tS;var nm="SelectScrollUpButton",rS=w.forwardRef((e,r)=>{const o=no(nm,e.__scopeSelect),s=dp(nm,e.__scopeSelect),[i,c]=w.useState(!1),d=Pe(r,s.onScrollButtonChange);return St(()=>{if(o.viewport&&o.isPositioned){let f=function(){const p=m.scrollTop>0;c(p)};const m=o.viewport;return f(),m.addEventListener("scroll",f),()=>m.removeEventListener("scroll",f)}},[o.viewport,o.isPositioned]),i?u.jsx(aS,{...e,ref:d,onAutoScroll:()=>{const{viewport:f,selectedItem:m}=o;f&&m&&(f.scrollTop=f.scrollTop-m.offsetHeight)}}):null});rS.displayName=nm;var rm="SelectScrollDownButton",oS=w.forwardRef((e,r)=>{const o=no(rm,e.__scopeSelect),s=dp(rm,e.__scopeSelect),[i,c]=w.useState(!1),d=Pe(r,s.onScrollButtonChange);return St(()=>{if(o.viewport&&o.isPositioned){let f=function(){const p=m.scrollHeight-m.clientHeight,g=Math.ceil(m.scrollTop)<p;c(g)};const m=o.viewport;return f(),m.addEventListener("scroll",f),()=>m.removeEventListener("scroll",f)}},[o.viewport,o.isPositioned]),i?u.jsx(aS,{...e,ref:d,onAutoScroll:()=>{const{viewport:f,selectedItem:m}=o;f&&m&&(f.scrollTop=f.scrollTop+m.offsetHeight)}}):null});oS.displayName=rm;var aS=w.forwardRef((e,r)=>{const{__scopeSelect:o,onAutoScroll:s,...i}=e,c=no("SelectScrollButton",o),d=w.useRef(null),f=Ru(o),m=w.useCallback(()=>{d.current!==null&&(window.clearInterval(d.current),d.current=null)},[]);return w.useEffect(()=>()=>m(),[m]),St(()=>{f().find(g=>g.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[f]),u.jsx(Me.div,{"aria-hidden":!0,...i,ref:r,style:{flexShrink:0,...i.style},onPointerDown:be(i.onPointerDown,()=>{d.current===null&&(d.current=window.setInterval(s,50))}),onPointerMove:be(i.onPointerMove,()=>{c.onItemLeave?.(),d.current===null&&(d.current=window.setInterval(s,50))}),onPointerLeave:be(i.onPointerLeave,()=>{m()})})}),wR="SelectSeparator",SR=w.forwardRef((e,r)=>{const{__scopeSelect:o,...s}=e;return u.jsx(Me.div,{"aria-hidden":!0,...s,ref:r})});SR.displayName=wR;var om="SelectArrow",NR=w.forwardRef((e,r)=>{const{__scopeSelect:o,...s}=e,i=Du(o),c=to(om,o),d=no(om,o);return c.open&&d.position==="popper"?u.jsx(Kb,{...i,...s,ref:r}):null});NR.displayName=om;var ER="SelectBubbleInput",sS=w.forwardRef(({__scopeSelect:e,value:r,...o},s)=>{const i=w.useRef(null),c=Pe(s,i),d=L1(r);return w.useEffect(()=>{const f=i.current;if(!f)return;const m=window.HTMLSelectElement.prototype,g=Object.getOwnPropertyDescriptor(m,"value").set;if(d!==r&&g){const v=new Event("change",{bubbles:!0});g.call(f,r),f.dispatchEvent(v)}},[d,r]),u.jsx(Me.select,{...o,style:{...H1,...o.style},ref:c,defaultValue:r})});sS.displayName=ER;function iS(e){return e===""||e===void 0}function lS(e){const r=wt(e),o=w.useRef(""),s=w.useRef(0),i=w.useCallback(d=>{const f=o.current+d;r(f),(function m(p){o.current=p,window.clearTimeout(s.current),p!==""&&(s.current=window.setTimeout(()=>m(""),1e3))})(f)},[r]),c=w.useCallback(()=>{o.current="",window.clearTimeout(s.current)},[]);return w.useEffect(()=>()=>window.clearTimeout(s.current),[]),[o,i,c]}function cS(e,r,o){const i=r.length>1&&Array.from(r).every(p=>p===r[0])?r[0]:r,c=o?e.indexOf(o):-1;let d=_R(e,Math.max(c,0));i.length===1&&(d=d.filter(p=>p!==o));const m=d.find(p=>p.textValue.toLowerCase().startsWith(i.toLowerCase()));return m!==o?m:void 0}function _R(e,r){return e.map((o,s)=>e[(r+s)%e.length])}var CR=B1,jR=U1,AR=$1,MR=V1,TR=Y1,kR=q1,RR=Z1,DR=J1,OR=eS,zR=nS,LR=rS,HR=oS;function uS({...e}){return u.jsx(CR,{"data-slot":"select",...e})}function dS({...e}){return u.jsx(AR,{"data-slot":"select-value",...e})}function fS({className:e,size:r="default",children:o,...s}){return u.jsxs(jR,{"data-slot":"select-trigger","data-size":r,className:He("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...s,children:[o,u.jsx(MR,{asChild:!0,children:u.jsx(Sn,{className:"size-4 opacity-50"})})]})}function hS({className:e,children:r,position:o="popper",...s}){return u.jsx(TR,{children:u.jsxs(kR,{"data-slot":"select-content",className:He("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:o,...s,children:[u.jsx(BR,{}),u.jsx(RR,{className:He("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:r}),u.jsx(IR,{})]})})}function mS({className:e,children:r,...o}){return u.jsxs(DR,{"data-slot":"select-item",className:He("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...o,children:[u.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:u.jsx(zR,{children:u.jsx(Xw,{className:"size-4"})})}),u.jsx(OR,{children:r})]})}function BR({className:e,...r}){return u.jsx(LR,{"data-slot":"select-scroll-up-button",className:He("flex cursor-default items-center justify-center py-1",e),...r,children:u.jsx(Zw,{className:"size-4"})})}function IR({className:e,...r}){return u.jsx(HR,{"data-slot":"select-scroll-down-button",className:He("flex cursor-default items-center justify-center py-1",e),...r,children:u.jsx(Sn,{className:"size-4"})})}const UR="";function PR(){return localStorage.getItem("devui_backend_url")||UR}class $R{baseUrl;constructor(r){this.baseUrl=r||PR()}setBaseUrl(r){this.baseUrl=r}getBaseUrl(){return this.baseUrl}async request(r,o={}){const s=`${this.baseUrl}${r}`,i=await fetch(s,{headers:{"Content-Type":"application/json",...o.headers},...o});if(!i.ok){let c=`API request failed: ${i.status} ${i.statusText}`;try{const d=await i.json();d.detail&&(c=d.detail)}catch{}throw new Error(c)}return i.json()}async getHealth(){return this.request("/health")}async getEntities(){const r=await this.request("/v1/entities"),o=[],s=[];return r.entities.forEach(i=>{if(i.type==="agent")o.push({id:i.id,name:i.name,description:i.description,type:"agent",source:i.source||"directory",tools:(i.tools||[]).map(c=>typeof c=="string"?c:JSON.stringify(c)),has_env:!1,module_path:typeof i.metadata?.module_path=="string"?i.metadata.module_path:void 0});else if(i.type==="workflow"){const c=i.tools?.[0],d=typeof c=="string"?c:"";s.push({id:i.id,name:i.name,description:i.description,type:"workflow",source:i.source||"directory",executors:(i.tools||[]).map(f=>typeof f=="string"?f:JSON.stringify(f)),has_env:!1,module_path:typeof i.metadata?.module_path=="string"?i.metadata.module_path:void 0,input_schema:i.input_schema||{type:"string"},input_type_name:i.input_type_name||"Input",start_executor_id:d})}}),{entities:[...o,...s],agents:o,workflows:s}}async getAgents(){const{agents:r}=await this.getEntities();return r}async getWorkflows(){const{workflows:r}=await this.getEntities();return r}async getAgentInfo(r){return this.request(`/v1/entities/${r}/info`)}async getWorkflowInfo(r){return this.request(`/v1/entities/${r}/info`)}async createThread(r){const o=await this.request("/v1/threads",{method:"POST",body:JSON.stringify({agent_id:r})});return{id:o.id,agent_id:r,created_at:new Date(o.created_at*1e3).toISOString(),message_count:0}}async getThreads(r){return(await this.request(`/v1/threads?agent_id=${r}`)).data.map(s=>({id:s.id,agent_id:s.agent_id,created_at:s.created_at||new Date().toISOString(),message_count:0}))}async deleteThread(r){try{return await this.request(`/v1/threads/${r}`,{method:"DELETE"}),!0}catch{return!1}}async getThreadMessages(r){try{return(await this.request(`/v1/threads/${r}/messages`)).data.map((s,i)=>{const c=s,d=c.role;return{id:c.message_id||`restored-${i}`,role:d==="user"||d==="assistant"||d==="system"||d==="tool"?d:"user",contents:c.contents||[],timestamp:c.timestamp||new Date().toISOString(),author_name:c.author_name,message_id:c.message_id}})}catch(o){return console.error("Failed to get thread messages:",o),[]}}async*streamAgentExecutionOpenAI(r,o){const s={model:"agent-framework",input:o.input,stream:!0,extra_body:{entity_id:r,thread_id:o.thread_id}};return yield*this.streamAgentExecutionOpenAIDirect(r,s)}async*streamAgentExecutionOpenAIDirect(r,o){const s=await fetch(`${this.baseUrl}/v1/responses`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify(o)});if(!s.ok)throw new Error(`OpenAI streaming request failed: ${s.status}`);const i=s.body?.getReader();if(!i)throw new Error("Response body is not readable");const c=new TextDecoder;let d="";try{for(;;){const{done:f,value:m}=await i.read();if(f)break;d+=c.decode(m,{stream:!0});const p=d.split(`
|
|
375
|
+
`);d=p.pop()||"";for(const g of p)if(g.startsWith("data: ")){const v=g.slice(6);if(v==="[DONE]")return;try{yield JSON.parse(v)}catch(y){console.error("Failed to parse OpenAI SSE event:",y)}}}}finally{i.releaseLock()}}async*streamWorkflowExecutionOpenAI(r,o){const s={model:"agent-framework",input:"",stream:!0,extra_body:{entity_id:r,input_data:o.input_data}},i=await fetch(`${this.baseUrl}/v1/responses`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify(s)});if(!i.ok)throw new Error(`OpenAI streaming request failed: ${i.status}`);const c=i.body?.getReader();if(!c)throw new Error("Response body is not readable");const d=new TextDecoder;let f="";try{for(;;){const{done:m,value:p}=await c.read();if(m)break;f+=d.decode(p,{stream:!0});const g=f.split(`
|
|
376
|
+
`);f=g.pop()||"";for(const v of g)if(v.startsWith("data: ")){const y=v.slice(6);if(y==="[DONE]")return;try{yield JSON.parse(y)}catch(b){console.error("Failed to parse OpenAI SSE event:",b)}}}}finally{c.releaseLock()}}async runAgent(r,o){return this.request(`/agents/${r}/run`,{method:"POST",body:JSON.stringify(o)})}async runWorkflow(r,o){return this.request(`/workflows/${r}/run`,{method:"POST",body:JSON.stringify(o)})}async addEntity(r,o){const s=await this.request("/v1/entities/add",{method:"POST",body:JSON.stringify({url:r,metadata:o})});if(!s.success||!s.entity)throw new Error("Failed to add entity");return s.entity}async removeEntity(r){if(!(await this.request(`/v1/entities/${r}`,{method:"DELETE"})).success)throw new Error("Failed to remove entity")}}const an=new $R;function VR({message:e}){const r=e.role==="user",o=e.error,s=r?t1:o?Ia:Qr;return u.jsxs("div",{className:`flex gap-3 ${r?"flex-row-reverse":""}`,children:[u.jsx("div",{className:`flex h-8 w-8 shrink-0 select-none items-center justify-center rounded-md border ${r?"bg-primary text-primary-foreground":o?"bg-orange-100 dark:bg-orange-900 text-orange-600 dark:text-orange-400 border-orange-200 dark:border-orange-800":"bg-muted"}`,children:u.jsx(s,{className:"h-4 w-4"})}),u.jsxs("div",{className:`flex flex-col space-y-1 ${r?"items-end":"items-start"} max-w-[80%]`,children:[u.jsxs("div",{className:`rounded px-3 py-2 text-sm break-all ${r?"bg-primary text-primary-foreground":o?"bg-orange-50 dark:bg-orange-950/50 text-orange-800 dark:text-orange-200 border border-orange-200 dark:border-orange-800":"bg-muted"}`,children:[o&&u.jsxs("div",{className:"flex items-start gap-2 mb-2",children:[u.jsx(Ia,{className:"h-4 w-4 text-orange-500 mt-0.5 flex-shrink-0"}),u.jsx("span",{className:"font-medium text-sm",children:"Unable to process request"})]}),u.jsx("div",{className:o?"text-xs leading-relaxed break-all":"",children:u.jsx(eR,{contents:e.contents,isStreaming:e.streaming})})]}),u.jsx("div",{className:"text-xs text-muted-foreground font-mono",children:new Date(e.timestamp).toLocaleTimeString()})]})]})}function YR(){return u.jsxs("div",{className:"flex gap-3",children:[u.jsx("div",{className:"flex h-8 w-8 shrink-0 select-none items-center justify-center rounded-md border bg-muted",children:u.jsx(Qr,{className:"h-4 w-4"})}),u.jsx("div",{className:"flex items-center space-x-1 rounded bg-muted px-3 py-2",children:u.jsxs("div",{className:"flex space-x-1",children:[u.jsx("div",{className:"h-2 w-2 animate-bounce rounded-full bg-current [animation-delay:-0.3s]"}),u.jsx("div",{className:"h-2 w-2 animate-bounce rounded-full bg-current [animation-delay:-0.15s]"}),u.jsx("div",{className:"h-2 w-2 animate-bounce rounded-full bg-current"})]})})]})}function qR({selectedAgent:e,onDebugEvent:r}){const[o,s]=w.useState({messages:[],isStreaming:!1}),[i,c]=w.useState(void 0),[d,f]=w.useState([]),[m,p]=w.useState(""),[g,v]=w.useState(!1),[y,b]=w.useState([]),[N,S]=w.useState(!1),[C,j]=w.useState(!1),[R,E]=w.useState(0),[A,D]=w.useState(null),[L,B]=w.useState(!1),U=w.useRef(null),G=w.useRef(null),re=w.useRef(""),Z=w.useRef(null);w.useEffect(()=>{G.current?.scrollIntoView({behavior:"smooth"})},[o.messages,o.isStreaming]),w.useEffect(()=>{const q=async()=>{if(e){S(!0);try{const Q=await an.getThreads(e.id);if(f(Q),Q.length>0){const se=Q[0];c(se);try{const me=await an.getThreadMessages(se.id);s({messages:me,isStreaming:!1})}catch(me){console.error("Failed to load thread messages:",me),s({messages:[],isStreaming:!1})}}}catch(Q){console.error("Failed to load threads:",Q),f([])}finally{S(!1)}}};s({messages:[],isStreaming:!1}),c(void 0),re.current="",q()},[e]);const Y=async q=>{const Q=[];for(const se of q){const me=`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,pe=M(se);let de;pe==="image"&&(de=await I(se)),Q.push({id:me,file:se,preview:de,type:pe})}b(se=>[...se,...Q])},ee=q=>{b(Q=>Q.filter(se=>se.id!==q))},O=q=>{q.preventDefault(),q.stopPropagation(),E(Q=>Q+1),q.dataTransfer.items&&q.dataTransfer.items.length>0&&j(!0)},P=q=>{q.preventDefault(),q.stopPropagation();const Q=R-1;E(Q),Q===0&&j(!1)},T=q=>{q.preventDefault(),q.stopPropagation()},z=async q=>{if(q.preventDefault(),q.stopPropagation(),j(!1),E(0),g||o.isStreaming)return;const Q=Array.from(q.dataTransfer.files);Q.length>0&&await Y(Q)},H=async q=>{const Q=Array.from(q.clipboardData.items),se=[];let me=!1;const pe=8e3;for(const de of Q)if(de.type.startsWith("image/")){q.preventDefault();const he=de.getAsFile();if(he){const ge=Date.now();se.push(new File([he],`screenshot-${ge}.png`,{type:he.type}))}}else de.type==="text/plain"&&!me&&(me=!0,q.preventDefault(),await new Promise(he=>{de.getAsString(ge=>{const Te=(ge.match(/\n/g)||[]).length;if(ge.length>pe||Te>50||/^\s*[{[][\s\S]*[}\]]\s*$/.test(ge)||/^<\?xml|^<html|^<!DOCTYPE/i.test(ge)){const Ne=V(ge),ct=Date.now(),Tt=new Blob([ge],{type:"text/plain"});se.push(new File([Tt],`pasted-text-${ct}${Ne}`,{type:"text/plain"}))}else{const Ne=Z.current;if(Ne){const ct=Ne.selectionStart,Tt=Ne.selectionEnd,kt=Ne.value,cn=kt.slice(0,ct)+ge+kt.slice(Tt);p(cn),setTimeout(()=>{Ne.selectionStart=Ne.selectionEnd=ct+ge.length,Ne.focus()},0)}}he()})}));if(se.length>0){await Y(se);const de=se.length===1?se[0].name.includes("screenshot")?"Screenshot added as attachment":"Large text converted to file":`${se.length} files added`;D(de),setTimeout(()=>D(null),3e3)}},V=q=>{const Q=q.trim(),se=Q.split(`
|
|
377
|
+
`);if(/^{[\s\S]*}$|^\[[\s\S]*\]$/.test(Q))return".json";if(/^<\?xml|^<html|^<!DOCTYPE/i.test(Q))return".html";if(/^```/.test(Q))return".md";if(/\t/.test(q)&&se.length>1)return".tsv";if(se.length>2){const me=se.filter(de=>de.includes(",")),pe=se.filter(de=>de.includes(";"));if(me.length>se.length*.5&&me.reduce((he,ge)=>he+(ge.match(/,/g)||[]).length,0)/me.length>=2||pe.length>se.length*.5&&pe.reduce((he,ge)=>he+(ge.match(/;/g)||[]).length,0)/pe.length>=2)return".csv"}return".txt"},M=q=>q.type.startsWith("image/")?"image":q.type==="application/pdf"?"pdf":q.type.startsWith("audio/")?"audio":"other",I=q=>new Promise((Q,se)=>{const me=new FileReader;me.onload=()=>Q(me.result),me.onerror=se,me.readAsDataURL(q)}),W=w.useCallback(async()=>{if(e)try{const q=await an.createThread(e.id);c(q),f(Q=>[q,...Q]),s({messages:[],isStreaming:!1}),re.current=""}catch(q){console.error("Failed to create thread:",q)}},[e]),K=w.useCallback(async q=>{const Q=d.find(se=>se.id===q);if(Q){c(Q),r("clear");try{const se=await an.getThreadMessages(q);s({messages:se,isStreaming:!1}),console.log(`Restored ${se.length} messages for thread ${q}`)}catch(se){console.error("Failed to load thread messages:",se),s({messages:[],isStreaming:!1})}re.current=""}},[d]),ne=w.useCallback(async q=>{if(!e)return;let Q="";const se=[];for(const he of q.input)if(he.type==="message"&&Array.isArray(he.content)){for(const ge of he.content)if(ge.type==="input_text")Q+=ge.text+" ";else if(ge.type==="input_image")se.push({type:"data",uri:ge.image_url||"",media_type:"image/png"});else if(ge.type==="input_file"){const Te=`data:application/octet-stream;base64,${ge.file_data}`,Ae=ge.filename||"";let Ne="application/octet-stream";Ae.endsWith(".pdf")?Ne="application/pdf":Ae.endsWith(".txt")?Ne="text/plain":Ae.endsWith(".json")?Ne="application/json":Ae.endsWith(".csv")?Ne="text/csv":Ae.endsWith(".html")?Ne="text/html":Ae.endsWith(".md")&&(Ne="text/markdown"),se.push({type:"data",uri:Te,media_type:Ne})}}const me=[...Q.trim()?[{type:"text",text:Q.trim()}]:[],...se],pe={id:`user-${Date.now()}`,role:"user",contents:me,timestamp:new Date().toISOString()};s(he=>({...he,messages:[...he.messages,pe],isStreaming:!0}));const de={id:`assistant-${Date.now()}`,role:"assistant",contents:[],timestamp:new Date().toISOString(),streaming:!0};s(he=>({...he,messages:[...he.messages,de]}));try{let he=i;if(!he)try{he=await an.createThread(e.id),c(he),f(Ae=>[he,...Ae])}catch(Ae){console.error("Failed to create thread:",Ae)}const ge={input:q.input,thread_id:he?.id};re.current="",r("clear");const Te=an.streamAgentExecutionOpenAI(e.id,ge);for await(const Ae of Te){if(r(Ae),Ae.type==="error"){const ct=Ae.message||"An error occurred";s(Tt=>({...Tt,isStreaming:!1,messages:Tt.messages.map(kt=>kt.id===de.id?{...kt,contents:[{type:"text",text:ct}],streaming:!1,error:!0}:kt)}));return}Ae.type==="response.output_text.delta"&&"delta"in Ae&&Ae.delta&&(re.current+=Ae.delta,s(Ne=>({...Ne,messages:Ne.messages.map(ct=>ct.id===de.id?{...ct,contents:[{type:"text",text:re.current}]}:ct)})))}s(Ae=>({...Ae,isStreaming:!1,messages:Ae.messages.map(Ne=>Ne.id===de.id?{...Ne,streaming:!1}:Ne)}))}catch(he){console.error("Streaming error:",he),s(ge=>({...ge,isStreaming:!1,messages:ge.messages.map(Te=>Te.id===de.id?{...Te,contents:[{type:"text",text:`Error: ${he instanceof Error?he.message:"Failed to get response"}`}],streaming:!1}:Te)}))}},[e,i,r]),fe=async q=>{if(q.preventDefault(),!m.trim()&&y.length===0||g||!e)return;v(!0);const Q=m.trim();p("");try{if(y.length>0||Q){const se=[];Q&&se.push({text:Q,type:"input_text"});for(const pe of y){const de=await I(pe.file);if(pe.file.type.startsWith("image/"))se.push({detail:"auto",type:"input_image",image_url:de});else if(pe.file.type==="text/plain"&&(pe.file.name.includes("pasted-text-")||pe.file.name.endsWith(".txt")||pe.file.name.endsWith(".csv")||pe.file.name.endsWith(".json")||pe.file.name.endsWith(".html")||pe.file.name.endsWith(".md")||pe.file.name.endsWith(".tsv"))){const he=await pe.file.text();se.push({text:he,type:"input_text"})}else{const he=de.split(",")[1];se.push({type:"input_file",file_data:he,file_url:de,filename:pe.file.name})}}await ne({input:[{type:"message",role:"user",content:se}],thread_id:i?.id})}else await ne({input:[{type:"message",role:"user",content:[{text:Q,type:"input_text"}]}],thread_id:i?.id});b([])}finally{v(!1)}},ue=e&&!g&&!o.isStreaming&&(m.trim()||y.length>0);return u.jsxs("div",{className:"flex h-[calc(100vh-3.5rem)] flex-col",children:[u.jsxs("div",{className:"border-b pb-2 p-4 flex-shrink-0",children:[u.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center lg:justify-between gap-3 mb-3",children:[u.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[u.jsx("h2",{className:"font-semibold text-sm truncate",children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Qr,{className:"h-4 w-4 flex-shrink-0"}),u.jsxs("span",{className:"truncate",children:["Chat with ",e.name||e.id]})]})}),u.jsx(Ze,{variant:"ghost",size:"sm",onClick:()=>B(!L),className:"h-6 w-6 p-0 flex-shrink-0",children:u.jsx(Sn,{className:`h-4 w-4 transition-transform duration-200 ${L?"rotate-180":""}`})})]}),u.jsxs("div",{className:"flex flex-col sm:flex-row items-stretch sm:items-center gap-2 flex-shrink-0",children:[u.jsxs(uS,{value:i?.id||"",onValueChange:K,disabled:N||g,children:[u.jsx(fS,{className:"w-full sm:w-48",children:u.jsx(dS,{placeholder:N?"Loading...":d.length===0?"No threads":i?`Thread ${i.id.slice(-8)}`:"Select thread"})}),u.jsx(hS,{children:d.map(q=>u.jsx(mS,{value:q.id,children:u.jsxs("div",{className:"flex items-center justify-between w-full",children:[u.jsxs("span",{children:["Thread ",q.id.slice(-8)]}),q.created_at&&u.jsx("span",{className:"text-xs text-muted-foreground ml-3",children:new Date(q.created_at).toLocaleDateString()})]})},q.id))})]}),u.jsxs(Ze,{variant:"outline",size:"lg",onClick:W,disabled:!e||g,className:"whitespace-nowrap",children:[u.jsx(Wc,{className:"h-4 w-4 mr-2"}),"New Thread"]})]})]}),e.description&&u.jsx("p",{className:"text-sm text-muted-foreground",children:e.description}),u.jsx("div",{className:`overflow-hidden transition-all duration-200 ease-in-out ${L?"max-h-40 mt-3":"max-h-0"}`,children:u.jsxs("div",{className:"space-y-2 text-xs",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Jw,{className:"h-3.5 w-3.5 text-muted-foreground"}),u.jsx("span",{className:"text-muted-foreground",children:"Tools:"}),u.jsx("span",{className:"font-mono",children:e.tools.length>0?e.tools.join(", "):"No tools"}),u.jsxs("span",{className:"text-muted-foreground",children:["(",e.tools.length,")"]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[e.source==="directory"?u.jsx(Gm,{className:"h-3.5 w-3.5 text-muted-foreground"}):e.source==="in_memory"?u.jsx(Qc,{className:"h-3.5 w-3.5 text-muted-foreground"}):u.jsx(Xm,{className:"h-3.5 w-3.5 text-muted-foreground"}),u.jsx("span",{className:"text-muted-foreground",children:"Source:"}),u.jsx("span",{children:e.source==="directory"?"Local":e.source==="in_memory"?"In-Memory":"Gallery"}),e.module_path&&u.jsxs("span",{className:"text-muted-foreground font-mono text-[11px]",children:["(",e.module_path,")"]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[e.has_env?u.jsx(Cu,{className:"h-3.5 w-3.5 text-orange-500"}):u.jsx(Qh,{className:"h-3.5 w-3.5 text-green-500"}),u.jsx("span",{className:"text-muted-foreground",children:"Environment:"}),u.jsx("span",{children:e.has_env?"Requires environment variables":"No environment variables required"})]})]})})]}),u.jsx($i,{className:"flex-1 p-4 h-0",ref:U,children:u.jsxs("div",{className:"space-y-4",children:[o.messages.length===0?u.jsxs("div",{className:"flex flex-col items-center justify-center h-32 text-center",children:[u.jsxs("div",{className:"text-muted-foreground text-sm",children:["Start a conversation with"," ",e.name||e.id]}),u.jsx("div",{className:"text-xs text-muted-foreground mt-1",children:"Type a message below to begin"})]}):o.messages.map(q=>u.jsx(VR,{message:q},q.id)),o.isStreaming&&!g&&u.jsx(YR,{}),u.jsx("div",{ref:G})]})}),u.jsx("div",{className:"border-t flex-shrink-0",children:u.jsxs("div",{className:`p-4 relative transition-all duration-300 ease-in-out ${C?"bg-blue-50 dark:bg-blue-950/20":""}`,onDragEnter:O,onDragLeave:P,onDragOver:T,onDrop:z,children:[C&&u.jsx("div",{className:"absolute inset-2 border-2 border-dashed border-blue-400 dark:border-blue-500 rounded-lg bg-blue-50/80 dark:bg-blue-950/40 backdrop-blur-sm flex items-center justify-center transition-all duration-200 ease-in-out z-10",children:u.jsxs("div",{className:"text-center",children:[u.jsx("div",{className:"text-blue-600 dark:text-blue-400 text-sm font-medium mb-1",children:"Drop files here"}),u.jsx("div",{className:"text-blue-500 dark:text-blue-500 text-xs",children:"Images, PDFs, and other files"})]})}),y.length>0&&u.jsx("div",{className:"mb-3",children:u.jsx(V3,{attachments:y,onRemoveAttachment:ee})}),A&&u.jsxs("div",{className:`absolute bottom-24 left-1/2 -translate-x-1/2 z-20
|
|
378
|
+
bg-blue-500 text-white px-4 py-2 rounded-full text-sm
|
|
379
|
+
animate-in slide-in-from-bottom-2 fade-in duration-200
|
|
380
|
+
flex items-center gap-2 shadow-lg`,children:[A.includes("screenshot")?u.jsx(pk,{className:"h-3 w-3"}):u.jsx(Ni,{className:"h-3 w-3"}),A]}),u.jsxs("form",{onSubmit:fe,className:"flex gap-2 items-end",children:[u.jsx(Hc,{ref:Z,value:m,onChange:q=>p(q.target.value),onPaste:H,onKeyDown:q=>{q.key==="Enter"&&!q.shiftKey&&(q.preventDefault(),fe(q))},placeholder:`Message ${e.name||e.id}... (Shift+Enter for new line)`,disabled:g||o.isStreaming,className:"flex-1 min-h-[40px] max-h-[200px] resize-none",style:{fieldSizing:"content"}}),u.jsx(U3,{onFilesSelected:Y,disabled:g||o.isStreaming}),u.jsx(Ze,{type:"submit",size:"icon",disabled:!ue,className:"shrink-0 h-10",children:g?u.jsx(Jm,{size:"sm"}):u.jsx(Sk,{className:"h-4 w-4"})})]})]})})]})}function am({message:e="Loading...",description:r,size:o="md",className:s,fullPage:i=!1}){const c=u.jsxs("div",{className:He("flex flex-col items-center justify-center gap-3",i?"min-h-[50vh]":"py-8",s),children:[u.jsx(Jm,{size:o,className:"text-muted-foreground"}),u.jsxs("div",{className:"text-center space-y-1",children:[u.jsx("p",{className:He("font-medium text-muted-foreground",o==="sm"&&"text-sm",o==="lg"&&"text-lg"),children:e}),r&&u.jsx("p",{className:"text-sm text-muted-foreground/80",children:r})]})]});return i?u.jsx("div",{className:"flex items-center justify-center min-h-screen bg-background",children:c}):c}var Ou="Checkbox",[GR,NL]=pr(Ou),[XR,fp]=GR(Ou);function FR(e){const{__scopeCheckbox:r,checked:o,children:s,defaultChecked:i,disabled:c,form:d,name:f,onCheckedChange:m,required:p,value:g="on",internal_do_not_use_render:v}=e,[y,b]=Ha({prop:o,defaultProp:i??!1,onChange:m,caller:Ou}),[N,S]=w.useState(null),[C,j]=w.useState(null),R=w.useRef(!1),E=N?!!d||!!N.closest("form"):!0,A={checked:y,disabled:c,setChecked:b,control:N,setControl:S,name:f,form:d,value:g,hasConsumerStoppedPropagationRef:R,required:p,defaultChecked:Wr(i)?!1:i,isFormControl:E,bubbleInput:C,setBubbleInput:j};return u.jsx(XR,{scope:r,...A,children:ZR(v)?v(A):s})}var pS="CheckboxTrigger",gS=w.forwardRef(({__scopeCheckbox:e,onKeyDown:r,onClick:o,...s},i)=>{const{control:c,value:d,disabled:f,checked:m,required:p,setControl:g,setChecked:v,hasConsumerStoppedPropagationRef:y,isFormControl:b,bubbleInput:N}=fp(pS,e),S=Pe(i,g),C=w.useRef(m);return w.useEffect(()=>{const j=c?.form;if(j){const R=()=>v(C.current);return j.addEventListener("reset",R),()=>j.removeEventListener("reset",R)}},[c,v]),u.jsx(Me.button,{type:"button",role:"checkbox","aria-checked":Wr(m)?"mixed":m,"aria-required":p,"data-state":SS(m),"data-disabled":f?"":void 0,disabled:f,value:d,...s,ref:S,onKeyDown:be(r,j=>{j.key==="Enter"&&j.preventDefault()}),onClick:be(o,j=>{v(R=>Wr(R)?!0:!R),N&&b&&(y.current=j.isPropagationStopped(),y.current||j.stopPropagation())})})});gS.displayName=pS;var xS=w.forwardRef((e,r)=>{const{__scopeCheckbox:o,name:s,checked:i,defaultChecked:c,required:d,disabled:f,value:m,onCheckedChange:p,form:g,...v}=e;return u.jsx(FR,{__scopeCheckbox:o,checked:i,defaultChecked:c,disabled:f,required:d,onCheckedChange:p,name:s,form:g,value:m,internal_do_not_use_render:({isFormControl:y})=>u.jsxs(u.Fragment,{children:[u.jsx(gS,{...v,ref:r,__scopeCheckbox:o}),y&&u.jsx(wS,{__scopeCheckbox:o})]})})});xS.displayName=Ou;var yS="CheckboxIndicator",vS=w.forwardRef((e,r)=>{const{__scopeCheckbox:o,forceMount:s,...i}=e,c=fp(yS,o);return u.jsx(wn,{present:s||Wr(c.checked)||c.checked===!0,children:u.jsx(Me.span,{"data-state":SS(c.checked),"data-disabled":c.disabled?"":void 0,...i,ref:r,style:{pointerEvents:"none",...e.style}})})});vS.displayName=yS;var bS="CheckboxBubbleInput",wS=w.forwardRef(({__scopeCheckbox:e,...r},o)=>{const{control:s,hasConsumerStoppedPropagationRef:i,checked:c,defaultChecked:d,required:f,disabled:m,name:p,value:g,form:v,bubbleInput:y,setBubbleInput:b}=fp(bS,e),N=Pe(o,b),S=L1(c),C=Hb(s);w.useEffect(()=>{const R=y;if(!R)return;const E=window.HTMLInputElement.prototype,D=Object.getOwnPropertyDescriptor(E,"checked").set,L=!i.current;if(S!==c&&D){const B=new Event("click",{bubbles:L});R.indeterminate=Wr(c),D.call(R,Wr(c)?!1:c),R.dispatchEvent(B)}},[y,S,c,i]);const j=w.useRef(Wr(c)?!1:c);return u.jsx(Me.input,{type:"checkbox","aria-hidden":!0,defaultChecked:d??j.current,required:f,disabled:m,name:p,value:g,form:v,...r,tabIndex:-1,ref:N,style:{...r.style,...C,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});wS.displayName=bS;function ZR(e){return typeof e=="function"}function Wr(e){return e==="indeterminate"}function SS(e){return Wr(e)?"indeterminate":e?"checked":"unchecked"}function mi({className:e,...r}){return u.jsx(xS,{"data-slot":"checkbox",className:He("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...r,children:u.jsx(vS,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:u.jsx(Xw,{className:"size-3.5"})})})}function Sc({name:e,schema:r,value:o,onChange:s}){const{type:i,description:c,enum:d,default:f}=r,m=r.format==="textarea"||c&&c.length>100||i==="object"||i==="array",p=i==="object"||r.format==="textarea"||c&&c.length>50,g=(()=>{switch(i){case"string":return d?u.jsxs("div",{className:"space-y-2",children:[u.jsx(Fr,{htmlFor:e,children:e}),u.jsxs(uS,{value:typeof o=="string"&&o?o:typeof f=="string"?f:d[0],onValueChange:y=>s(y),children:[u.jsx(fS,{children:u.jsx(dS,{placeholder:`Select ${e}`})}),u.jsx(hS,{children:d.map(y=>u.jsx(mS,{value:y,children:y},y))})]}),c&&u.jsx("p",{className:"text-sm text-muted-foreground",children:c})]}):r.format==="textarea"||c&&c.length>100?u.jsxs("div",{className:"space-y-2",children:[u.jsx(Fr,{htmlFor:e,children:e}),u.jsx(Hc,{id:e,value:typeof o=="string"?o:"",onChange:y=>s(y.target.value),placeholder:typeof f=="string"?f:`Enter ${e}`,rows:2}),c&&u.jsx("p",{className:"text-sm text-muted-foreground",children:c})]}):u.jsxs("div",{className:"space-y-2",children:[u.jsx(Fr,{htmlFor:e,children:e}),u.jsx(Jh,{id:e,type:"text",value:typeof o=="string"?o:"",onChange:y=>s(y.target.value),placeholder:typeof f=="string"?f:`Enter ${e}`}),c&&u.jsx("p",{className:"text-sm text-muted-foreground",children:c})]});case"number":return u.jsxs("div",{className:"space-y-2",children:[u.jsx(Fr,{htmlFor:e,children:e}),u.jsx(Jh,{id:e,type:"number",value:typeof o=="number"?o:"",onChange:y=>{const b=parseFloat(y.target.value);s(isNaN(b)?"":b)},placeholder:typeof f=="number"?f.toString():`Enter ${e}`}),c&&u.jsx("p",{className:"text-sm text-muted-foreground",children:c})]});case"boolean":return u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx(mi,{id:e,checked:!!o,onCheckedChange:y=>s(y)}),u.jsx(Fr,{htmlFor:e,children:e})]}),c&&u.jsx("p",{className:"text-sm text-muted-foreground",children:c})]});case"array":return u.jsxs("div",{className:"space-y-2",children:[u.jsx(Fr,{htmlFor:e,children:e}),u.jsx(Hc,{id:e,value:Array.isArray(o)?o.join(", "):typeof o=="string"?o:"",onChange:y=>{const b=y.target.value.split(",").map(N=>N.trim()).filter(N=>N.length>0);s(b)},placeholder:"Enter items separated by commas",rows:2}),c&&u.jsx("p",{className:"text-sm text-muted-foreground",children:c})]});case"object":default:return u.jsxs("div",{className:"space-y-2",children:[u.jsx(Fr,{htmlFor:e,children:e}),u.jsx(Hc,{id:e,value:typeof o=="object"&&o!==null?JSON.stringify(o,null,2):typeof o=="string"?o:"",onChange:y=>{try{const b=JSON.parse(y.target.value);s(b)}catch{s(y.target.value)}},placeholder:'{"key": "value"}',rows:3}),c&&u.jsx("p",{className:"text-sm text-muted-foreground",children:c})]})}})(),v=()=>m?"md:col-span-3 xl:col-span-4":p?"xl:col-span-2":"";return u.jsx("div",{className:v(),children:g})}function KR({inputSchema:e,inputTypeName:r,onSubmit:o,isSubmitting:s=!1,className:i}){const[c,d]=w.useState(!1),f=i?.includes("embedded"),[m,p]=w.useState({}),[g,v]=w.useState(!1),y=e.properties||{},b=Object.keys(y),N=e.type==="string"&&!e.enum,S=N?"value":b[0],C=S?m[S]!==void 0&&m[S]!=="":Object.keys(m).length>0;w.useEffect(()=>{if(e.type==="string")p({value:e.default||""});else if(e.type==="object"&&e.properties){const E={};Object.entries(e.properties).forEach(([A,D])=>{D.default!==void 0?E[A]=D.default:D.enum&&D.enum.length>0&&(E[A]=D.enum[0])}),p(E)}},[e]);const j=E=>{if(E.preventDefault(),v(!0),e.type==="string")o({input:m.value||""});else if(e.type==="object"){const A=e.properties||{},D=Object.keys(A);if(D.length===1){const L=D[0];o({[L]:m[L]||""})}else o(m)}else o(m);f||d(!1),v(!1)},R=(E,A)=>{p(D=>({...D,[E]:A}))};return f?u.jsxs("form",{onSubmit:j,className:i,children:[u.jsxs("div",{className:"grid grid-cols-1 gap-4",children:[N&&S&&u.jsx(Sc,{name:"Input",schema:e,value:m.value,onChange:E=>R("value",E)}),!N&&u.jsx(u.Fragment,{children:b.map(E=>u.jsx(Sc,{name:E,schema:y[E],value:m[E],onChange:A=>R(E,A)},E))})]}),u.jsx("div",{className:"flex gap-2 mt-4 justify-end",children:u.jsxs(Ze,{type:"submit",disabled:g||!C,size:"default",children:[u.jsx(_h,{className:"h-4 w-4"}),g?"Running...":"Run Workflow"]})})]}):u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:He("flex flex-col",i),children:[u.jsxs("div",{className:"border-b border-border px-4 py-3 bg-muted",children:[u.jsx(O1,{className:"text-sm mb-3",children:"Run Workflow"}),u.jsxs(Ze,{onClick:()=>d(!0),disabled:s,className:"w-full",size:"default",children:[u.jsx(_h,{className:"h-4 w-4 mr-2"}),s?"Running...":"Run Workflow"]})]}),u.jsxs("div",{className:"px-4 py-3",children:[u.jsxs("div",{className:"text-sm text-muted-foreground",children:[u.jsx("strong",{children:"Input Type:"})," ",u.jsx("code",{className:"bg-muted px-1 py-0.5 rounded",children:r}),e.type==="object"&&e.properties&&u.jsxs("span",{className:"ml-2",children:["(",Object.keys(e.properties).length," field",Object.keys(e.properties).length!==1?"s":"",")"]})]}),u.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:'Click "Run Workflow" to configure inputs and execute'})]})]}),u.jsx(sp,{open:c,onOpenChange:d,children:u.jsxs(ip,{className:"w-full max-w-md sm:max-w-lg md:max-w-2xl lg:max-w-4xl xl:max-w-5xl max-h-[90vh] flex flex-col",children:[u.jsxs(lp,{children:[u.jsx(cp,{children:"Run Workflow"}),u.jsx(up,{onClose:()=>d(!1)})]}),u.jsx("div",{className:"px-8 py-4 border-b flex-shrink-0",children:u.jsx("div",{className:"text-sm text-muted-foreground",children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("span",{className:"font-medium",children:"Input Type:"}),u.jsx("code",{className:"bg-muted px-3 py-1 text-xs font-mono",children:r}),e.type==="object"&&u.jsxs("span",{className:"text-xs text-muted-foreground",children:[b.length," field",b.length!==1?"s":""]})]})})}),u.jsx("div",{className:"px-8 py-6 overflow-y-auto flex-1 min-h-0",children:u.jsx("form",{id:"workflow-modal-form",onSubmit:j,children:u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 xl:grid-cols-4 gap-8 max-w-none",children:[N&&S&&u.jsxs("div",{className:"md:col-span-3 xl:col-span-4",children:[u.jsx(Sc,{name:"Input",schema:e,value:m.value,onChange:E=>R("value",E)}),e.description&&u.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:e.description})]}),!N&&u.jsx(u.Fragment,{children:b.map(E=>u.jsx(Sc,{name:E,schema:y[E],value:m[E],onChange:A=>R(E,A)},E))})]})})}),u.jsx("div",{className:"px-8 py-4 border-t flex-shrink-0",children:u.jsxs(T3,{children:[u.jsx(Ze,{variant:"outline",onClick:()=>d(!1),disabled:g,children:"Cancel"}),u.jsxs(Ze,{type:"submit",form:"workflow-modal-form",disabled:g||!C,children:[u.jsx(_h,{className:"h-4 w-4 mr-2"}),g?"Running...":"Run Workflow"]})]})})]})})]})}function lt(e){if(typeof e=="string"||typeof e=="number")return""+e;let r="";if(Array.isArray(e))for(let o=0,s;o<e.length;o++)(s=lt(e[o]))!==""&&(r+=(r&&" ")+s);else for(let o in e)e[o]&&(r+=(r&&" ")+o);return r}var QR={value:()=>{}};function zu(){for(var e=0,r=arguments.length,o={},s;e<r;++e){if(!(s=arguments[e]+"")||s in o||/[\s.]/.test(s))throw new Error("illegal type: "+s);o[s]=[]}return new Ic(o)}function Ic(e){this._=e}function WR(e,r){return e.trim().split(/^|\s+/).map(function(o){var s="",i=o.indexOf(".");if(i>=0&&(s=o.slice(i+1),o=o.slice(0,i)),o&&!r.hasOwnProperty(o))throw new Error("unknown type: "+o);return{type:o,name:s}})}Ic.prototype=zu.prototype={constructor:Ic,on:function(e,r){var o=this._,s=WR(e+"",o),i,c=-1,d=s.length;if(arguments.length<2){for(;++c<d;)if((i=(e=s[c]).type)&&(i=JR(o[i],e.name)))return i;return}if(r!=null&&typeof r!="function")throw new Error("invalid callback: "+r);for(;++c<d;)if(i=(e=s[c]).type)o[i]=ev(o[i],e.name,r);else if(r==null)for(i in o)o[i]=ev(o[i],e.name,null);return this},copy:function(){var e={},r=this._;for(var o in r)e[o]=r[o].slice();return new Ic(e)},call:function(e,r){if((i=arguments.length-2)>0)for(var o=new Array(i),s=0,i,c;s<i;++s)o[s]=arguments[s+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(c=this._[e],s=0,i=c.length;s<i;++s)c[s].value.apply(r,o)},apply:function(e,r,o){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var s=this._[e],i=0,c=s.length;i<c;++i)s[i].value.apply(r,o)}};function JR(e,r){for(var o=0,s=e.length,i;o<s;++o)if((i=e[o]).name===r)return i.value}function ev(e,r,o){for(var s=0,i=e.length;s<i;++s)if(e[s].name===r){e[s]=QR,e=e.slice(0,s).concat(e.slice(s+1));break}return o!=null&&e.push({name:r,value:o}),e}var sm="http://www.w3.org/1999/xhtml";const tv={svg:"http://www.w3.org/2000/svg",xhtml:sm,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Lu(e){var r=e+="",o=r.indexOf(":");return o>=0&&(r=e.slice(0,o))!=="xmlns"&&(e=e.slice(o+1)),tv.hasOwnProperty(r)?{space:tv[r],local:e}:e}function e4(e){return function(){var r=this.ownerDocument,o=this.namespaceURI;return o===sm&&r.documentElement.namespaceURI===sm?r.createElement(e):r.createElementNS(o,e)}}function t4(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function NS(e){var r=Lu(e);return(r.local?t4:e4)(r)}function n4(){}function hp(e){return e==null?n4:function(){return this.querySelector(e)}}function r4(e){typeof e!="function"&&(e=hp(e));for(var r=this._groups,o=r.length,s=new Array(o),i=0;i<o;++i)for(var c=r[i],d=c.length,f=s[i]=new Array(d),m,p,g=0;g<d;++g)(m=c[g])&&(p=e.call(m,m.__data__,g,c))&&("__data__"in m&&(p.__data__=m.__data__),f[g]=p);return new Kt(s,this._parents)}function o4(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function a4(){return[]}function ES(e){return e==null?a4:function(){return this.querySelectorAll(e)}}function s4(e){return function(){return o4(e.apply(this,arguments))}}function i4(e){typeof e=="function"?e=s4(e):e=ES(e);for(var r=this._groups,o=r.length,s=[],i=[],c=0;c<o;++c)for(var d=r[c],f=d.length,m,p=0;p<f;++p)(m=d[p])&&(s.push(e.call(m,m.__data__,p,d)),i.push(m));return new Kt(s,i)}function _S(e){return function(){return this.matches(e)}}function CS(e){return function(r){return r.matches(e)}}var l4=Array.prototype.find;function c4(e){return function(){return l4.call(this.children,e)}}function u4(){return this.firstElementChild}function d4(e){return this.select(e==null?u4:c4(typeof e=="function"?e:CS(e)))}var f4=Array.prototype.filter;function h4(){return Array.from(this.children)}function m4(e){return function(){return f4.call(this.children,e)}}function p4(e){return this.selectAll(e==null?h4:m4(typeof e=="function"?e:CS(e)))}function g4(e){typeof e!="function"&&(e=_S(e));for(var r=this._groups,o=r.length,s=new Array(o),i=0;i<o;++i)for(var c=r[i],d=c.length,f=s[i]=[],m,p=0;p<d;++p)(m=c[p])&&e.call(m,m.__data__,p,c)&&f.push(m);return new Kt(s,this._parents)}function jS(e){return new Array(e.length)}function x4(){return new Kt(this._enter||this._groups.map(jS),this._parents)}function ou(e,r){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=r}ou.prototype={constructor:ou,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,r){return this._parent.insertBefore(e,r)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function y4(e){return function(){return e}}function v4(e,r,o,s,i,c){for(var d=0,f,m=r.length,p=c.length;d<p;++d)(f=r[d])?(f.__data__=c[d],s[d]=f):o[d]=new ou(e,c[d]);for(;d<m;++d)(f=r[d])&&(i[d]=f)}function b4(e,r,o,s,i,c,d){var f,m,p=new Map,g=r.length,v=c.length,y=new Array(g),b;for(f=0;f<g;++f)(m=r[f])&&(y[f]=b=d.call(m,m.__data__,f,r)+"",p.has(b)?i[f]=m:p.set(b,m));for(f=0;f<v;++f)b=d.call(e,c[f],f,c)+"",(m=p.get(b))?(s[f]=m,m.__data__=c[f],p.delete(b)):o[f]=new ou(e,c[f]);for(f=0;f<g;++f)(m=r[f])&&p.get(y[f])===m&&(i[f]=m)}function w4(e){return e.__data__}function S4(e,r){if(!arguments.length)return Array.from(this,w4);var o=r?b4:v4,s=this._parents,i=this._groups;typeof e!="function"&&(e=y4(e));for(var c=i.length,d=new Array(c),f=new Array(c),m=new Array(c),p=0;p<c;++p){var g=s[p],v=i[p],y=v.length,b=N4(e.call(g,g&&g.__data__,p,s)),N=b.length,S=f[p]=new Array(N),C=d[p]=new Array(N),j=m[p]=new Array(y);o(g,v,S,C,j,b,r);for(var R=0,E=0,A,D;R<N;++R)if(A=S[R]){for(R>=E&&(E=R+1);!(D=C[E])&&++E<N;);A._next=D||null}}return d=new Kt(d,s),d._enter=f,d._exit=m,d}function N4(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function E4(){return new Kt(this._exit||this._groups.map(jS),this._parents)}function _4(e,r,o){var s=this.enter(),i=this,c=this.exit();return typeof e=="function"?(s=e(s),s&&(s=s.selection())):s=s.append(e+""),r!=null&&(i=r(i),i&&(i=i.selection())),o==null?c.remove():o(c),s&&i?s.merge(i).order():i}function C4(e){for(var r=e.selection?e.selection():e,o=this._groups,s=r._groups,i=o.length,c=s.length,d=Math.min(i,c),f=new Array(i),m=0;m<d;++m)for(var p=o[m],g=s[m],v=p.length,y=f[m]=new Array(v),b,N=0;N<v;++N)(b=p[N]||g[N])&&(y[N]=b);for(;m<i;++m)f[m]=o[m];return new Kt(f,this._parents)}function j4(){for(var e=this._groups,r=-1,o=e.length;++r<o;)for(var s=e[r],i=s.length-1,c=s[i],d;--i>=0;)(d=s[i])&&(c&&d.compareDocumentPosition(c)^4&&c.parentNode.insertBefore(d,c),c=d);return this}function A4(e){e||(e=M4);function r(v,y){return v&&y?e(v.__data__,y.__data__):!v-!y}for(var o=this._groups,s=o.length,i=new Array(s),c=0;c<s;++c){for(var d=o[c],f=d.length,m=i[c]=new Array(f),p,g=0;g<f;++g)(p=d[g])&&(m[g]=p);m.sort(r)}return new Kt(i,this._parents).order()}function M4(e,r){return e<r?-1:e>r?1:e>=r?0:NaN}function T4(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function k4(){return Array.from(this)}function R4(){for(var e=this._groups,r=0,o=e.length;r<o;++r)for(var s=e[r],i=0,c=s.length;i<c;++i){var d=s[i];if(d)return d}return null}function D4(){let e=0;for(const r of this)++e;return e}function O4(){return!this.node()}function z4(e){for(var r=this._groups,o=0,s=r.length;o<s;++o)for(var i=r[o],c=0,d=i.length,f;c<d;++c)(f=i[c])&&e.call(f,f.__data__,c,i);return this}function L4(e){return function(){this.removeAttribute(e)}}function H4(e){return function(){this.removeAttributeNS(e.space,e.local)}}function B4(e,r){return function(){this.setAttribute(e,r)}}function I4(e,r){return function(){this.setAttributeNS(e.space,e.local,r)}}function U4(e,r){return function(){var o=r.apply(this,arguments);o==null?this.removeAttribute(e):this.setAttribute(e,o)}}function P4(e,r){return function(){var o=r.apply(this,arguments);o==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,o)}}function $4(e,r){var o=Lu(e);if(arguments.length<2){var s=this.node();return o.local?s.getAttributeNS(o.space,o.local):s.getAttribute(o)}return this.each((r==null?o.local?H4:L4:typeof r=="function"?o.local?P4:U4:o.local?I4:B4)(o,r))}function AS(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function V4(e){return function(){this.style.removeProperty(e)}}function Y4(e,r,o){return function(){this.style.setProperty(e,r,o)}}function q4(e,r,o){return function(){var s=r.apply(this,arguments);s==null?this.style.removeProperty(e):this.style.setProperty(e,s,o)}}function G4(e,r,o){return arguments.length>1?this.each((r==null?V4:typeof r=="function"?q4:Y4)(e,r,o??"")):$a(this.node(),e)}function $a(e,r){return e.style.getPropertyValue(r)||AS(e).getComputedStyle(e,null).getPropertyValue(r)}function X4(e){return function(){delete this[e]}}function F4(e,r){return function(){this[e]=r}}function Z4(e,r){return function(){var o=r.apply(this,arguments);o==null?delete this[e]:this[e]=o}}function K4(e,r){return arguments.length>1?this.each((r==null?X4:typeof r=="function"?Z4:F4)(e,r)):this.node()[e]}function MS(e){return e.trim().split(/^|\s+/)}function mp(e){return e.classList||new TS(e)}function TS(e){this._node=e,this._names=MS(e.getAttribute("class")||"")}TS.prototype={add:function(e){var r=this._names.indexOf(e);r<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var r=this._names.indexOf(e);r>=0&&(this._names.splice(r,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function kS(e,r){for(var o=mp(e),s=-1,i=r.length;++s<i;)o.add(r[s])}function RS(e,r){for(var o=mp(e),s=-1,i=r.length;++s<i;)o.remove(r[s])}function Q4(e){return function(){kS(this,e)}}function W4(e){return function(){RS(this,e)}}function J4(e,r){return function(){(r.apply(this,arguments)?kS:RS)(this,e)}}function eD(e,r){var o=MS(e+"");if(arguments.length<2){for(var s=mp(this.node()),i=-1,c=o.length;++i<c;)if(!s.contains(o[i]))return!1;return!0}return this.each((typeof r=="function"?J4:r?Q4:W4)(o,r))}function tD(){this.textContent=""}function nD(e){return function(){this.textContent=e}}function rD(e){return function(){var r=e.apply(this,arguments);this.textContent=r??""}}function oD(e){return arguments.length?this.each(e==null?tD:(typeof e=="function"?rD:nD)(e)):this.node().textContent}function aD(){this.innerHTML=""}function sD(e){return function(){this.innerHTML=e}}function iD(e){return function(){var r=e.apply(this,arguments);this.innerHTML=r??""}}function lD(e){return arguments.length?this.each(e==null?aD:(typeof e=="function"?iD:sD)(e)):this.node().innerHTML}function cD(){this.nextSibling&&this.parentNode.appendChild(this)}function uD(){return this.each(cD)}function dD(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function fD(){return this.each(dD)}function hD(e){var r=typeof e=="function"?e:NS(e);return this.select(function(){return this.appendChild(r.apply(this,arguments))})}function mD(){return null}function pD(e,r){var o=typeof e=="function"?e:NS(e),s=r==null?mD:typeof r=="function"?r:hp(r);return this.select(function(){return this.insertBefore(o.apply(this,arguments),s.apply(this,arguments)||null)})}function gD(){var e=this.parentNode;e&&e.removeChild(this)}function xD(){return this.each(gD)}function yD(){var e=this.cloneNode(!1),r=this.parentNode;return r?r.insertBefore(e,this.nextSibling):e}function vD(){var e=this.cloneNode(!0),r=this.parentNode;return r?r.insertBefore(e,this.nextSibling):e}function bD(e){return this.select(e?vD:yD)}function wD(e){return arguments.length?this.property("__data__",e):this.node().__data__}function SD(e){return function(r){e.call(this,r,this.__data__)}}function ND(e){return e.trim().split(/^|\s+/).map(function(r){var o="",s=r.indexOf(".");return s>=0&&(o=r.slice(s+1),r=r.slice(0,s)),{type:r,name:o}})}function ED(e){return function(){var r=this.__on;if(r){for(var o=0,s=-1,i=r.length,c;o<i;++o)c=r[o],(!e.type||c.type===e.type)&&c.name===e.name?this.removeEventListener(c.type,c.listener,c.options):r[++s]=c;++s?r.length=s:delete this.__on}}}function _D(e,r,o){return function(){var s=this.__on,i,c=SD(r);if(s){for(var d=0,f=s.length;d<f;++d)if((i=s[d]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=c,i.options=o),i.value=r;return}}this.addEventListener(e.type,c,o),i={type:e.type,name:e.name,value:r,listener:c,options:o},s?s.push(i):this.__on=[i]}}function CD(e,r,o){var s=ND(e+""),i,c=s.length,d;if(arguments.length<2){var f=this.node().__on;if(f){for(var m=0,p=f.length,g;m<p;++m)for(i=0,g=f[m];i<c;++i)if((d=s[i]).type===g.type&&d.name===g.name)return g.value}return}for(f=r?_D:ED,i=0;i<c;++i)this.each(f(s[i],r,o));return this}function DS(e,r,o){var s=AS(e),i=s.CustomEvent;typeof i=="function"?i=new i(r,o):(i=s.document.createEvent("Event"),o?(i.initEvent(r,o.bubbles,o.cancelable),i.detail=o.detail):i.initEvent(r,!1,!1)),e.dispatchEvent(i)}function jD(e,r){return function(){return DS(this,e,r)}}function AD(e,r){return function(){return DS(this,e,r.apply(this,arguments))}}function MD(e,r){return this.each((typeof r=="function"?AD:jD)(e,r))}function*TD(){for(var e=this._groups,r=0,o=e.length;r<o;++r)for(var s=e[r],i=0,c=s.length,d;i<c;++i)(d=s[i])&&(yield d)}var OS=[null];function Kt(e,r){this._groups=e,this._parents=r}function Vi(){return new Kt([[document.documentElement]],OS)}function kD(){return this}Kt.prototype=Vi.prototype={constructor:Kt,select:r4,selectAll:i4,selectChild:d4,selectChildren:p4,filter:g4,data:S4,enter:x4,exit:E4,join:_4,merge:C4,selection:kD,order:j4,sort:A4,call:T4,nodes:k4,node:R4,size:D4,empty:O4,each:z4,attr:$4,style:G4,property:K4,classed:eD,text:oD,html:lD,raise:uD,lower:fD,append:hD,insert:pD,remove:xD,clone:bD,datum:wD,on:CD,dispatch:MD,[Symbol.iterator]:TD};function Ft(e){return typeof e=="string"?new Kt([[document.querySelector(e)]],[document.documentElement]):new Kt([[e]],OS)}function RD(e){let r;for(;r=e.sourceEvent;)e=r;return e}function gn(e,r){if(e=RD(e),r===void 0&&(r=e.currentTarget),r){var o=r.ownerSVGElement||r;if(o.createSVGPoint){var s=o.createSVGPoint();return s.x=e.clientX,s.y=e.clientY,s=s.matrixTransform(r.getScreenCTM().inverse()),[s.x,s.y]}if(r.getBoundingClientRect){var i=r.getBoundingClientRect();return[e.clientX-i.left-r.clientLeft,e.clientY-i.top-r.clientTop]}}return[e.pageX,e.pageY]}const DD={passive:!1},_i={capture:!0,passive:!1};function Ah(e){e.stopImmediatePropagation()}function Oa(e){e.preventDefault(),e.stopImmediatePropagation()}function zS(e){var r=e.document.documentElement,o=Ft(e).on("dragstart.drag",Oa,_i);"onselectstart"in r?o.on("selectstart.drag",Oa,_i):(r.__noselect=r.style.MozUserSelect,r.style.MozUserSelect="none")}function LS(e,r){var o=e.document.documentElement,s=Ft(e).on("dragstart.drag",null);r&&(s.on("click.drag",Oa,_i),setTimeout(function(){s.on("click.drag",null)},0)),"onselectstart"in o?s.on("selectstart.drag",null):(o.style.MozUserSelect=o.__noselect,delete o.__noselect)}const Nc=e=>()=>e;function im(e,{sourceEvent:r,subject:o,target:s,identifier:i,active:c,x:d,y:f,dx:m,dy:p,dispatch:g}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:r,enumerable:!0,configurable:!0},subject:{value:o,enumerable:!0,configurable:!0},target:{value:s,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:c,enumerable:!0,configurable:!0},x:{value:d,enumerable:!0,configurable:!0},y:{value:f,enumerable:!0,configurable:!0},dx:{value:m,enumerable:!0,configurable:!0},dy:{value:p,enumerable:!0,configurable:!0},_:{value:g}})}im.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function OD(e){return!e.ctrlKey&&!e.button}function zD(){return this.parentNode}function LD(e,r){return r??{x:e.x,y:e.y}}function HD(){return navigator.maxTouchPoints||"ontouchstart"in this}function HS(){var e=OD,r=zD,o=LD,s=HD,i={},c=zu("start","drag","end"),d=0,f,m,p,g,v=0;function y(A){A.on("mousedown.drag",b).filter(s).on("touchstart.drag",C).on("touchmove.drag",j,DD).on("touchend.drag touchcancel.drag",R).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function b(A,D){if(!(g||!e.call(this,A,D))){var L=E(this,r.call(this,A,D),A,D,"mouse");L&&(Ft(A.view).on("mousemove.drag",N,_i).on("mouseup.drag",S,_i),zS(A.view),Ah(A),p=!1,f=A.clientX,m=A.clientY,L("start",A))}}function N(A){if(Oa(A),!p){var D=A.clientX-f,L=A.clientY-m;p=D*D+L*L>v}i.mouse("drag",A)}function S(A){Ft(A.view).on("mousemove.drag mouseup.drag",null),LS(A.view,p),Oa(A),i.mouse("end",A)}function C(A,D){if(e.call(this,A,D)){var L=A.changedTouches,B=r.call(this,A,D),U=L.length,G,re;for(G=0;G<U;++G)(re=E(this,B,A,D,L[G].identifier,L[G]))&&(Ah(A),re("start",A,L[G]))}}function j(A){var D=A.changedTouches,L=D.length,B,U;for(B=0;B<L;++B)(U=i[D[B].identifier])&&(Oa(A),U("drag",A,D[B]))}function R(A){var D=A.changedTouches,L=D.length,B,U;for(g&&clearTimeout(g),g=setTimeout(function(){g=null},500),B=0;B<L;++B)(U=i[D[B].identifier])&&(Ah(A),U("end",A,D[B]))}function E(A,D,L,B,U,G){var re=c.copy(),Z=gn(G||L,D),Y,ee,O;if((O=o.call(A,new im("beforestart",{sourceEvent:L,target:y,identifier:U,active:d,x:Z[0],y:Z[1],dx:0,dy:0,dispatch:re}),B))!=null)return Y=O.x-Z[0]||0,ee=O.y-Z[1]||0,function P(T,z,H){var V=Z,M;switch(T){case"start":i[U]=P,M=d++;break;case"end":delete i[U],--d;case"drag":Z=gn(H||z,D),M=d;break}re.call(T,A,new im(T,{sourceEvent:z,subject:O,target:y,identifier:U,active:M,x:Z[0]+Y,y:Z[1]+ee,dx:Z[0]-V[0],dy:Z[1]-V[1],dispatch:re}),B)}}return y.filter=function(A){return arguments.length?(e=typeof A=="function"?A:Nc(!!A),y):e},y.container=function(A){return arguments.length?(r=typeof A=="function"?A:Nc(A),y):r},y.subject=function(A){return arguments.length?(o=typeof A=="function"?A:Nc(A),y):o},y.touchable=function(A){return arguments.length?(s=typeof A=="function"?A:Nc(!!A),y):s},y.on=function(){var A=c.on.apply(c,arguments);return A===c?y:A},y.clickDistance=function(A){return arguments.length?(v=(A=+A)*A,y):Math.sqrt(v)},y}function pp(e,r,o){e.prototype=r.prototype=o,o.constructor=e}function BS(e,r){var o=Object.create(e.prototype);for(var s in r)o[s]=r[s];return o}function Yi(){}var Ci=.7,au=1/Ci,za="\\s*([+-]?\\d+)\\s*",ji="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",zn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",BD=/^#([0-9a-f]{3,8})$/,ID=new RegExp(`^rgb\\(${za},${za},${za}\\)$`),UD=new RegExp(`^rgb\\(${zn},${zn},${zn}\\)$`),PD=new RegExp(`^rgba\\(${za},${za},${za},${ji}\\)$`),$D=new RegExp(`^rgba\\(${zn},${zn},${zn},${ji}\\)$`),VD=new RegExp(`^hsl\\(${ji},${zn},${zn}\\)$`),YD=new RegExp(`^hsla\\(${ji},${zn},${zn},${ji}\\)$`),nv={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};pp(Yi,Oo,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:rv,formatHex:rv,formatHex8:qD,formatHsl:GD,formatRgb:ov,toString:ov});function rv(){return this.rgb().formatHex()}function qD(){return this.rgb().formatHex8()}function GD(){return IS(this).formatHsl()}function ov(){return this.rgb().formatRgb()}function Oo(e){var r,o;return e=(e+"").trim().toLowerCase(),(r=BD.exec(e))?(o=r[1].length,r=parseInt(r[1],16),o===6?av(r):o===3?new It(r>>8&15|r>>4&240,r>>4&15|r&240,(r&15)<<4|r&15,1):o===8?Ec(r>>24&255,r>>16&255,r>>8&255,(r&255)/255):o===4?Ec(r>>12&15|r>>8&240,r>>8&15|r>>4&240,r>>4&15|r&240,((r&15)<<4|r&15)/255):null):(r=ID.exec(e))?new It(r[1],r[2],r[3],1):(r=UD.exec(e))?new It(r[1]*255/100,r[2]*255/100,r[3]*255/100,1):(r=PD.exec(e))?Ec(r[1],r[2],r[3],r[4]):(r=$D.exec(e))?Ec(r[1]*255/100,r[2]*255/100,r[3]*255/100,r[4]):(r=VD.exec(e))?lv(r[1],r[2]/100,r[3]/100,1):(r=YD.exec(e))?lv(r[1],r[2]/100,r[3]/100,r[4]):nv.hasOwnProperty(e)?av(nv[e]):e==="transparent"?new It(NaN,NaN,NaN,0):null}function av(e){return new It(e>>16&255,e>>8&255,e&255,1)}function Ec(e,r,o,s){return s<=0&&(e=r=o=NaN),new It(e,r,o,s)}function XD(e){return e instanceof Yi||(e=Oo(e)),e?(e=e.rgb(),new It(e.r,e.g,e.b,e.opacity)):new It}function lm(e,r,o,s){return arguments.length===1?XD(e):new It(e,r,o,s??1)}function It(e,r,o,s){this.r=+e,this.g=+r,this.b=+o,this.opacity=+s}pp(It,lm,BS(Yi,{brighter(e){return e=e==null?au:Math.pow(au,e),new It(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ci:Math.pow(Ci,e),new It(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new It(Ao(this.r),Ao(this.g),Ao(this.b),su(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:sv,formatHex:sv,formatHex8:FD,formatRgb:iv,toString:iv}));function sv(){return`#${jo(this.r)}${jo(this.g)}${jo(this.b)}`}function FD(){return`#${jo(this.r)}${jo(this.g)}${jo(this.b)}${jo((isNaN(this.opacity)?1:this.opacity)*255)}`}function iv(){const e=su(this.opacity);return`${e===1?"rgb(":"rgba("}${Ao(this.r)}, ${Ao(this.g)}, ${Ao(this.b)}${e===1?")":`, ${e})`}`}function su(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ao(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function jo(e){return e=Ao(e),(e<16?"0":"")+e.toString(16)}function lv(e,r,o,s){return s<=0?e=r=o=NaN:o<=0||o>=1?e=r=NaN:r<=0&&(e=NaN),new xn(e,r,o,s)}function IS(e){if(e instanceof xn)return new xn(e.h,e.s,e.l,e.opacity);if(e instanceof Yi||(e=Oo(e)),!e)return new xn;if(e instanceof xn)return e;e=e.rgb();var r=e.r/255,o=e.g/255,s=e.b/255,i=Math.min(r,o,s),c=Math.max(r,o,s),d=NaN,f=c-i,m=(c+i)/2;return f?(r===c?d=(o-s)/f+(o<s)*6:o===c?d=(s-r)/f+2:d=(r-o)/f+4,f/=m<.5?c+i:2-c-i,d*=60):f=m>0&&m<1?0:d,new xn(d,f,m,e.opacity)}function ZD(e,r,o,s){return arguments.length===1?IS(e):new xn(e,r,o,s??1)}function xn(e,r,o,s){this.h=+e,this.s=+r,this.l=+o,this.opacity=+s}pp(xn,ZD,BS(Yi,{brighter(e){return e=e==null?au:Math.pow(au,e),new xn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ci:Math.pow(Ci,e),new xn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,r=isNaN(e)||isNaN(this.s)?0:this.s,o=this.l,s=o+(o<.5?o:1-o)*r,i=2*o-s;return new It(Mh(e>=240?e-240:e+120,i,s),Mh(e,i,s),Mh(e<120?e+240:e-120,i,s),this.opacity)},clamp(){return new xn(cv(this.h),_c(this.s),_c(this.l),su(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=su(this.opacity);return`${e===1?"hsl(":"hsla("}${cv(this.h)}, ${_c(this.s)*100}%, ${_c(this.l)*100}%${e===1?")":`, ${e})`}`}}));function cv(e){return e=(e||0)%360,e<0?e+360:e}function _c(e){return Math.max(0,Math.min(1,e||0))}function Mh(e,r,o){return(e<60?r+(o-r)*e/60:e<180?o:e<240?r+(o-r)*(240-e)/60:r)*255}const gp=e=>()=>e;function KD(e,r){return function(o){return e+o*r}}function QD(e,r,o){return e=Math.pow(e,o),r=Math.pow(r,o)-e,o=1/o,function(s){return Math.pow(e+s*r,o)}}function WD(e){return(e=+e)==1?US:function(r,o){return o-r?QD(r,o,e):gp(isNaN(r)?o:r)}}function US(e,r){var o=r-e;return o?KD(e,o):gp(isNaN(e)?r:e)}const iu=(function e(r){var o=WD(r);function s(i,c){var d=o((i=lm(i)).r,(c=lm(c)).r),f=o(i.g,c.g),m=o(i.b,c.b),p=US(i.opacity,c.opacity);return function(g){return i.r=d(g),i.g=f(g),i.b=m(g),i.opacity=p(g),i+""}}return s.gamma=e,s})(1);function JD(e,r){r||(r=[]);var o=e?Math.min(r.length,e.length):0,s=r.slice(),i;return function(c){for(i=0;i<o;++i)s[i]=e[i]*(1-c)+r[i]*c;return s}}function eO(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function tO(e,r){var o=r?r.length:0,s=e?Math.min(o,e.length):0,i=new Array(s),c=new Array(o),d;for(d=0;d<s;++d)i[d]=xi(e[d],r[d]);for(;d<o;++d)c[d]=r[d];return function(f){for(d=0;d<s;++d)c[d]=i[d](f);return c}}function nO(e,r){var o=new Date;return e=+e,r=+r,function(s){return o.setTime(e*(1-s)+r*s),o}}function Tn(e,r){return e=+e,r=+r,function(o){return e*(1-o)+r*o}}function rO(e,r){var o={},s={},i;(e===null||typeof e!="object")&&(e={}),(r===null||typeof r!="object")&&(r={});for(i in r)i in e?o[i]=xi(e[i],r[i]):s[i]=r[i];return function(c){for(i in o)s[i]=o[i](c);return s}}var cm=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Th=new RegExp(cm.source,"g");function oO(e){return function(){return e}}function aO(e){return function(r){return e(r)+""}}function PS(e,r){var o=cm.lastIndex=Th.lastIndex=0,s,i,c,d=-1,f=[],m=[];for(e=e+"",r=r+"";(s=cm.exec(e))&&(i=Th.exec(r));)(c=i.index)>o&&(c=r.slice(o,c),f[d]?f[d]+=c:f[++d]=c),(s=s[0])===(i=i[0])?f[d]?f[d]+=i:f[++d]=i:(f[++d]=null,m.push({i:d,x:Tn(s,i)})),o=Th.lastIndex;return o<r.length&&(c=r.slice(o),f[d]?f[d]+=c:f[++d]=c),f.length<2?m[0]?aO(m[0].x):oO(r):(r=m.length,function(p){for(var g=0,v;g<r;++g)f[(v=m[g]).i]=v.x(p);return f.join("")})}function xi(e,r){var o=typeof r,s;return r==null||o==="boolean"?gp(r):(o==="number"?Tn:o==="string"?(s=Oo(r))?(r=s,iu):PS:r instanceof Oo?iu:r instanceof Date?nO:eO(r)?JD:Array.isArray(r)?tO:typeof r.valueOf!="function"&&typeof r.toString!="function"||isNaN(r)?rO:Tn)(e,r)}var uv=180/Math.PI,um={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function $S(e,r,o,s,i,c){var d,f,m;return(d=Math.sqrt(e*e+r*r))&&(e/=d,r/=d),(m=e*o+r*s)&&(o-=e*m,s-=r*m),(f=Math.sqrt(o*o+s*s))&&(o/=f,s/=f,m/=f),e*s<r*o&&(e=-e,r=-r,m=-m,d=-d),{translateX:i,translateY:c,rotate:Math.atan2(r,e)*uv,skewX:Math.atan(m)*uv,scaleX:d,scaleY:f}}var Cc;function sO(e){const r=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return r.isIdentity?um:$S(r.a,r.b,r.c,r.d,r.e,r.f)}function iO(e){return e==null||(Cc||(Cc=document.createElementNS("http://www.w3.org/2000/svg","g")),Cc.setAttribute("transform",e),!(e=Cc.transform.baseVal.consolidate()))?um:(e=e.matrix,$S(e.a,e.b,e.c,e.d,e.e,e.f))}function VS(e,r,o,s){function i(p){return p.length?p.pop()+" ":""}function c(p,g,v,y,b,N){if(p!==v||g!==y){var S=b.push("translate(",null,r,null,o);N.push({i:S-4,x:Tn(p,v)},{i:S-2,x:Tn(g,y)})}else(v||y)&&b.push("translate("+v+r+y+o)}function d(p,g,v,y){p!==g?(p-g>180?g+=360:g-p>180&&(p+=360),y.push({i:v.push(i(v)+"rotate(",null,s)-2,x:Tn(p,g)})):g&&v.push(i(v)+"rotate("+g+s)}function f(p,g,v,y){p!==g?y.push({i:v.push(i(v)+"skewX(",null,s)-2,x:Tn(p,g)}):g&&v.push(i(v)+"skewX("+g+s)}function m(p,g,v,y,b,N){if(p!==v||g!==y){var S=b.push(i(b)+"scale(",null,",",null,")");N.push({i:S-4,x:Tn(p,v)},{i:S-2,x:Tn(g,y)})}else(v!==1||y!==1)&&b.push(i(b)+"scale("+v+","+y+")")}return function(p,g){var v=[],y=[];return p=e(p),g=e(g),c(p.translateX,p.translateY,g.translateX,g.translateY,v,y),d(p.rotate,g.rotate,v,y),f(p.skewX,g.skewX,v,y),m(p.scaleX,p.scaleY,g.scaleX,g.scaleY,v,y),p=g=null,function(b){for(var N=-1,S=y.length,C;++N<S;)v[(C=y[N]).i]=C.x(b);return v.join("")}}}var lO=VS(sO,"px, ","px)","deg)"),cO=VS(iO,", ",")",")"),uO=1e-12;function dv(e){return((e=Math.exp(e))+1/e)/2}function dO(e){return((e=Math.exp(e))-1/e)/2}function fO(e){return((e=Math.exp(2*e))-1)/(e+1)}const Uc=(function e(r,o,s){function i(c,d){var f=c[0],m=c[1],p=c[2],g=d[0],v=d[1],y=d[2],b=g-f,N=v-m,S=b*b+N*N,C,j;if(S<uO)j=Math.log(y/p)/r,C=function(B){return[f+B*b,m+B*N,p*Math.exp(r*B*j)]};else{var R=Math.sqrt(S),E=(y*y-p*p+s*S)/(2*p*o*R),A=(y*y-p*p-s*S)/(2*y*o*R),D=Math.log(Math.sqrt(E*E+1)-E),L=Math.log(Math.sqrt(A*A+1)-A);j=(L-D)/r,C=function(B){var U=B*j,G=dv(D),re=p/(o*R)*(G*fO(r*U+D)-dO(D));return[f+re*b,m+re*N,p*G/dv(r*U+D)]}}return C.duration=j*1e3*r/Math.SQRT2,C}return i.rho=function(c){var d=Math.max(.001,+c),f=d*d,m=f*f;return e(d,f,m)},i})(Math.SQRT2,2,4);var Va=0,pi=0,ui=0,YS=1e3,lu,gi,cu=0,zo=0,Hu=0,Ai=typeof performance=="object"&&performance.now?performance:Date,qS=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function xp(){return zo||(qS(hO),zo=Ai.now()+Hu)}function hO(){zo=0}function uu(){this._call=this._time=this._next=null}uu.prototype=GS.prototype={constructor:uu,restart:function(e,r,o){if(typeof e!="function")throw new TypeError("callback is not a function");o=(o==null?xp():+o)+(r==null?0:+r),!this._next&&gi!==this&&(gi?gi._next=this:lu=this,gi=this),this._call=e,this._time=o,dm()},stop:function(){this._call&&(this._call=null,this._time=1/0,dm())}};function GS(e,r,o){var s=new uu;return s.restart(e,r,o),s}function mO(){xp(),++Va;for(var e=lu,r;e;)(r=zo-e._time)>=0&&e._call.call(void 0,r),e=e._next;--Va}function fv(){zo=(cu=Ai.now())+Hu,Va=pi=0;try{mO()}finally{Va=0,gO(),zo=0}}function pO(){var e=Ai.now(),r=e-cu;r>YS&&(Hu-=r,cu=e)}function gO(){for(var e,r=lu,o,s=1/0;r;)r._call?(s>r._time&&(s=r._time),e=r,r=r._next):(o=r._next,r._next=null,r=e?e._next=o:lu=o);gi=e,dm(s)}function dm(e){if(!Va){pi&&(pi=clearTimeout(pi));var r=e-zo;r>24?(e<1/0&&(pi=setTimeout(fv,e-Ai.now()-Hu)),ui&&(ui=clearInterval(ui))):(ui||(cu=Ai.now(),ui=setInterval(pO,YS)),Va=1,qS(fv))}}function hv(e,r,o){var s=new uu;return r=r==null?0:+r,s.restart(i=>{s.stop(),e(i+r)},r,o),s}var xO=zu("start","end","cancel","interrupt"),yO=[],XS=0,mv=1,fm=2,Pc=3,pv=4,hm=5,$c=6;function Bu(e,r,o,s,i,c){var d=e.__transition;if(!d)e.__transition={};else if(o in d)return;vO(e,o,{name:r,index:s,group:i,on:xO,tween:yO,time:c.time,delay:c.delay,duration:c.duration,ease:c.ease,timer:null,state:XS})}function yp(e,r){var o=Nn(e,r);if(o.state>XS)throw new Error("too late; already scheduled");return o}function Un(e,r){var o=Nn(e,r);if(o.state>Pc)throw new Error("too late; already running");return o}function Nn(e,r){var o=e.__transition;if(!o||!(o=o[r]))throw new Error("transition not found");return o}function vO(e,r,o){var s=e.__transition,i;s[r]=o,o.timer=GS(c,0,o.time);function c(p){o.state=mv,o.timer.restart(d,o.delay,o.time),o.delay<=p&&d(p-o.delay)}function d(p){var g,v,y,b;if(o.state!==mv)return m();for(g in s)if(b=s[g],b.name===o.name){if(b.state===Pc)return hv(d);b.state===pv?(b.state=$c,b.timer.stop(),b.on.call("interrupt",e,e.__data__,b.index,b.group),delete s[g]):+g<r&&(b.state=$c,b.timer.stop(),b.on.call("cancel",e,e.__data__,b.index,b.group),delete s[g])}if(hv(function(){o.state===Pc&&(o.state=pv,o.timer.restart(f,o.delay,o.time),f(p))}),o.state=fm,o.on.call("start",e,e.__data__,o.index,o.group),o.state===fm){for(o.state=Pc,i=new Array(y=o.tween.length),g=0,v=-1;g<y;++g)(b=o.tween[g].value.call(e,e.__data__,o.index,o.group))&&(i[++v]=b);i.length=v+1}}function f(p){for(var g=p<o.duration?o.ease.call(null,p/o.duration):(o.timer.restart(m),o.state=hm,1),v=-1,y=i.length;++v<y;)i[v].call(e,g);o.state===hm&&(o.on.call("end",e,e.__data__,o.index,o.group),m())}function m(){o.state=$c,o.timer.stop(),delete s[r];for(var p in s)return;delete e.__transition}}function Vc(e,r){var o=e.__transition,s,i,c=!0,d;if(o){r=r==null?null:r+"";for(d in o){if((s=o[d]).name!==r){c=!1;continue}i=s.state>fm&&s.state<hm,s.state=$c,s.timer.stop(),s.on.call(i?"interrupt":"cancel",e,e.__data__,s.index,s.group),delete o[d]}c&&delete e.__transition}}function bO(e){return this.each(function(){Vc(this,e)})}function wO(e,r){var o,s;return function(){var i=Un(this,e),c=i.tween;if(c!==o){s=o=c;for(var d=0,f=s.length;d<f;++d)if(s[d].name===r){s=s.slice(),s.splice(d,1);break}}i.tween=s}}function SO(e,r,o){var s,i;if(typeof o!="function")throw new Error;return function(){var c=Un(this,e),d=c.tween;if(d!==s){i=(s=d).slice();for(var f={name:r,value:o},m=0,p=i.length;m<p;++m)if(i[m].name===r){i[m]=f;break}m===p&&i.push(f)}c.tween=i}}function NO(e,r){var o=this._id;if(e+="",arguments.length<2){for(var s=Nn(this.node(),o).tween,i=0,c=s.length,d;i<c;++i)if((d=s[i]).name===e)return d.value;return null}return this.each((r==null?wO:SO)(o,e,r))}function vp(e,r,o){var s=e._id;return e.each(function(){var i=Un(this,s);(i.value||(i.value={}))[r]=o.apply(this,arguments)}),function(i){return Nn(i,s).value[r]}}function FS(e,r){var o;return(typeof r=="number"?Tn:r instanceof Oo?iu:(o=Oo(r))?(r=o,iu):PS)(e,r)}function EO(e){return function(){this.removeAttribute(e)}}function _O(e){return function(){this.removeAttributeNS(e.space,e.local)}}function CO(e,r,o){var s,i=o+"",c;return function(){var d=this.getAttribute(e);return d===i?null:d===s?c:c=r(s=d,o)}}function jO(e,r,o){var s,i=o+"",c;return function(){var d=this.getAttributeNS(e.space,e.local);return d===i?null:d===s?c:c=r(s=d,o)}}function AO(e,r,o){var s,i,c;return function(){var d,f=o(this),m;return f==null?void this.removeAttribute(e):(d=this.getAttribute(e),m=f+"",d===m?null:d===s&&m===i?c:(i=m,c=r(s=d,f)))}}function MO(e,r,o){var s,i,c;return function(){var d,f=o(this),m;return f==null?void this.removeAttributeNS(e.space,e.local):(d=this.getAttributeNS(e.space,e.local),m=f+"",d===m?null:d===s&&m===i?c:(i=m,c=r(s=d,f)))}}function TO(e,r){var o=Lu(e),s=o==="transform"?cO:FS;return this.attrTween(e,typeof r=="function"?(o.local?MO:AO)(o,s,vp(this,"attr."+e,r)):r==null?(o.local?_O:EO)(o):(o.local?jO:CO)(o,s,r))}function kO(e,r){return function(o){this.setAttribute(e,r.call(this,o))}}function RO(e,r){return function(o){this.setAttributeNS(e.space,e.local,r.call(this,o))}}function DO(e,r){var o,s;function i(){var c=r.apply(this,arguments);return c!==s&&(o=(s=c)&&RO(e,c)),o}return i._value=r,i}function OO(e,r){var o,s;function i(){var c=r.apply(this,arguments);return c!==s&&(o=(s=c)&&kO(e,c)),o}return i._value=r,i}function zO(e,r){var o="attr."+e;if(arguments.length<2)return(o=this.tween(o))&&o._value;if(r==null)return this.tween(o,null);if(typeof r!="function")throw new Error;var s=Lu(e);return this.tween(o,(s.local?DO:OO)(s,r))}function LO(e,r){return function(){yp(this,e).delay=+r.apply(this,arguments)}}function HO(e,r){return r=+r,function(){yp(this,e).delay=r}}function BO(e){var r=this._id;return arguments.length?this.each((typeof e=="function"?LO:HO)(r,e)):Nn(this.node(),r).delay}function IO(e,r){return function(){Un(this,e).duration=+r.apply(this,arguments)}}function UO(e,r){return r=+r,function(){Un(this,e).duration=r}}function PO(e){var r=this._id;return arguments.length?this.each((typeof e=="function"?IO:UO)(r,e)):Nn(this.node(),r).duration}function $O(e,r){if(typeof r!="function")throw new Error;return function(){Un(this,e).ease=r}}function VO(e){var r=this._id;return arguments.length?this.each($O(r,e)):Nn(this.node(),r).ease}function YO(e,r){return function(){var o=r.apply(this,arguments);if(typeof o!="function")throw new Error;Un(this,e).ease=o}}function qO(e){if(typeof e!="function")throw new Error;return this.each(YO(this._id,e))}function GO(e){typeof e!="function"&&(e=_S(e));for(var r=this._groups,o=r.length,s=new Array(o),i=0;i<o;++i)for(var c=r[i],d=c.length,f=s[i]=[],m,p=0;p<d;++p)(m=c[p])&&e.call(m,m.__data__,p,c)&&f.push(m);return new mr(s,this._parents,this._name,this._id)}function XO(e){if(e._id!==this._id)throw new Error;for(var r=this._groups,o=e._groups,s=r.length,i=o.length,c=Math.min(s,i),d=new Array(s),f=0;f<c;++f)for(var m=r[f],p=o[f],g=m.length,v=d[f]=new Array(g),y,b=0;b<g;++b)(y=m[b]||p[b])&&(v[b]=y);for(;f<s;++f)d[f]=r[f];return new mr(d,this._parents,this._name,this._id)}function FO(e){return(e+"").trim().split(/^|\s+/).every(function(r){var o=r.indexOf(".");return o>=0&&(r=r.slice(0,o)),!r||r==="start"})}function ZO(e,r,o){var s,i,c=FO(r)?yp:Un;return function(){var d=c(this,e),f=d.on;f!==s&&(i=(s=f).copy()).on(r,o),d.on=i}}function KO(e,r){var o=this._id;return arguments.length<2?Nn(this.node(),o).on.on(e):this.each(ZO(o,e,r))}function QO(e){return function(){var r=this.parentNode;for(var o in this.__transition)if(+o!==e)return;r&&r.removeChild(this)}}function WO(){return this.on("end.remove",QO(this._id))}function JO(e){var r=this._name,o=this._id;typeof e!="function"&&(e=hp(e));for(var s=this._groups,i=s.length,c=new Array(i),d=0;d<i;++d)for(var f=s[d],m=f.length,p=c[d]=new Array(m),g,v,y=0;y<m;++y)(g=f[y])&&(v=e.call(g,g.__data__,y,f))&&("__data__"in g&&(v.__data__=g.__data__),p[y]=v,Bu(p[y],r,o,y,p,Nn(g,o)));return new mr(c,this._parents,r,o)}function e5(e){var r=this._name,o=this._id;typeof e!="function"&&(e=ES(e));for(var s=this._groups,i=s.length,c=[],d=[],f=0;f<i;++f)for(var m=s[f],p=m.length,g,v=0;v<p;++v)if(g=m[v]){for(var y=e.call(g,g.__data__,v,m),b,N=Nn(g,o),S=0,C=y.length;S<C;++S)(b=y[S])&&Bu(b,r,o,S,y,N);c.push(y),d.push(g)}return new mr(c,d,r,o)}var t5=Vi.prototype.constructor;function n5(){return new t5(this._groups,this._parents)}function r5(e,r){var o,s,i;return function(){var c=$a(this,e),d=(this.style.removeProperty(e),$a(this,e));return c===d?null:c===o&&d===s?i:i=r(o=c,s=d)}}function ZS(e){return function(){this.style.removeProperty(e)}}function o5(e,r,o){var s,i=o+"",c;return function(){var d=$a(this,e);return d===i?null:d===s?c:c=r(s=d,o)}}function a5(e,r,o){var s,i,c;return function(){var d=$a(this,e),f=o(this),m=f+"";return f==null&&(m=f=(this.style.removeProperty(e),$a(this,e))),d===m?null:d===s&&m===i?c:(i=m,c=r(s=d,f))}}function s5(e,r){var o,s,i,c="style."+r,d="end."+c,f;return function(){var m=Un(this,e),p=m.on,g=m.value[c]==null?f||(f=ZS(r)):void 0;(p!==o||i!==g)&&(s=(o=p).copy()).on(d,i=g),m.on=s}}function i5(e,r,o){var s=(e+="")=="transform"?lO:FS;return r==null?this.styleTween(e,r5(e,s)).on("end.style."+e,ZS(e)):typeof r=="function"?this.styleTween(e,a5(e,s,vp(this,"style."+e,r))).each(s5(this._id,e)):this.styleTween(e,o5(e,s,r),o).on("end.style."+e,null)}function l5(e,r,o){return function(s){this.style.setProperty(e,r.call(this,s),o)}}function c5(e,r,o){var s,i;function c(){var d=r.apply(this,arguments);return d!==i&&(s=(i=d)&&l5(e,d,o)),s}return c._value=r,c}function u5(e,r,o){var s="style."+(e+="");if(arguments.length<2)return(s=this.tween(s))&&s._value;if(r==null)return this.tween(s,null);if(typeof r!="function")throw new Error;return this.tween(s,c5(e,r,o??""))}function d5(e){return function(){this.textContent=e}}function f5(e){return function(){var r=e(this);this.textContent=r??""}}function h5(e){return this.tween("text",typeof e=="function"?f5(vp(this,"text",e)):d5(e==null?"":e+""))}function m5(e){return function(r){this.textContent=e.call(this,r)}}function p5(e){var r,o;function s(){var i=e.apply(this,arguments);return i!==o&&(r=(o=i)&&m5(i)),r}return s._value=e,s}function g5(e){var r="text";if(arguments.length<1)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,p5(e))}function x5(){for(var e=this._name,r=this._id,o=KS(),s=this._groups,i=s.length,c=0;c<i;++c)for(var d=s[c],f=d.length,m,p=0;p<f;++p)if(m=d[p]){var g=Nn(m,r);Bu(m,e,o,p,d,{time:g.time+g.delay+g.duration,delay:0,duration:g.duration,ease:g.ease})}return new mr(s,this._parents,e,o)}function y5(){var e,r,o=this,s=o._id,i=o.size();return new Promise(function(c,d){var f={value:d},m={value:function(){--i===0&&c()}};o.each(function(){var p=Un(this,s),g=p.on;g!==e&&(r=(e=g).copy(),r._.cancel.push(f),r._.interrupt.push(f),r._.end.push(m)),p.on=r}),i===0&&c()})}var v5=0;function mr(e,r,o,s){this._groups=e,this._parents=r,this._name=o,this._id=s}function KS(){return++v5}var lr=Vi.prototype;mr.prototype={constructor:mr,select:JO,selectAll:e5,selectChild:lr.selectChild,selectChildren:lr.selectChildren,filter:GO,merge:XO,selection:n5,transition:x5,call:lr.call,nodes:lr.nodes,node:lr.node,size:lr.size,empty:lr.empty,each:lr.each,on:KO,attr:TO,attrTween:zO,style:i5,styleTween:u5,text:h5,textTween:g5,remove:WO,tween:NO,delay:BO,duration:PO,ease:VO,easeVarying:qO,end:y5,[Symbol.iterator]:lr[Symbol.iterator]};function b5(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var w5={time:null,delay:0,duration:250,ease:b5};function S5(e,r){for(var o;!(o=e.__transition)||!(o=o[r]);)if(!(e=e.parentNode))throw new Error(`transition ${r} not found`);return o}function N5(e){var r,o;e instanceof mr?(r=e._id,e=e._name):(r=KS(),(o=w5).time=xp(),e=e==null?null:e+"");for(var s=this._groups,i=s.length,c=0;c<i;++c)for(var d=s[c],f=d.length,m,p=0;p<f;++p)(m=d[p])&&Bu(m,e,r,p,d,o||S5(m,r));return new mr(s,this._parents,e,r)}Vi.prototype.interrupt=bO;Vi.prototype.transition=N5;const jc=e=>()=>e;function E5(e,{sourceEvent:r,target:o,transform:s,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:r,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},transform:{value:s,enumerable:!0,configurable:!0},_:{value:i}})}function ur(e,r,o){this.k=e,this.x=r,this.y=o}ur.prototype={constructor:ur,scale:function(e){return e===1?this:new ur(this.k*e,this.x,this.y)},translate:function(e,r){return e===0&r===0?this:new ur(this.k,this.x+this.k*e,this.y+this.k*r)},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 Iu=new ur(1,0,0);QS.prototype=ur.prototype;function QS(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Iu;return e.__zoom}function kh(e){e.stopImmediatePropagation()}function di(e){e.preventDefault(),e.stopImmediatePropagation()}function _5(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function C5(){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 gv(){return this.__zoom||Iu}function j5(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function A5(){return navigator.maxTouchPoints||"ontouchstart"in this}function M5(e,r,o){var s=e.invertX(r[0][0])-o[0][0],i=e.invertX(r[1][0])-o[1][0],c=e.invertY(r[0][1])-o[0][1],d=e.invertY(r[1][1])-o[1][1];return e.translate(i>s?(s+i)/2:Math.min(0,s)||Math.max(0,i),d>c?(c+d)/2:Math.min(0,c)||Math.max(0,d))}function WS(){var e=_5,r=C5,o=M5,s=j5,i=A5,c=[0,1/0],d=[[-1/0,-1/0],[1/0,1/0]],f=250,m=Uc,p=zu("start","zoom","end"),g,v,y,b=500,N=150,S=0,C=10;function j(O){O.property("__zoom",gv).on("wheel.zoom",U,{passive:!1}).on("mousedown.zoom",G).on("dblclick.zoom",re).filter(i).on("touchstart.zoom",Z).on("touchmove.zoom",Y).on("touchend.zoom touchcancel.zoom",ee).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}j.transform=function(O,P,T,z){var H=O.selection?O.selection():O;H.property("__zoom",gv),O!==H?D(O,P,T,z):H.interrupt().each(function(){L(this,arguments).event(z).start().zoom(null,typeof P=="function"?P.apply(this,arguments):P).end()})},j.scaleBy=function(O,P,T,z){j.scaleTo(O,function(){var H=this.__zoom.k,V=typeof P=="function"?P.apply(this,arguments):P;return H*V},T,z)},j.scaleTo=function(O,P,T,z){j.transform(O,function(){var H=r.apply(this,arguments),V=this.__zoom,M=T==null?A(H):typeof T=="function"?T.apply(this,arguments):T,I=V.invert(M),W=typeof P=="function"?P.apply(this,arguments):P;return o(E(R(V,W),M,I),H,d)},T,z)},j.translateBy=function(O,P,T,z){j.transform(O,function(){return o(this.__zoom.translate(typeof P=="function"?P.apply(this,arguments):P,typeof T=="function"?T.apply(this,arguments):T),r.apply(this,arguments),d)},null,z)},j.translateTo=function(O,P,T,z,H){j.transform(O,function(){var V=r.apply(this,arguments),M=this.__zoom,I=z==null?A(V):typeof z=="function"?z.apply(this,arguments):z;return o(Iu.translate(I[0],I[1]).scale(M.k).translate(typeof P=="function"?-P.apply(this,arguments):-P,typeof T=="function"?-T.apply(this,arguments):-T),V,d)},z,H)};function R(O,P){return P=Math.max(c[0],Math.min(c[1],P)),P===O.k?O:new ur(P,O.x,O.y)}function E(O,P,T){var z=P[0]-T[0]*O.k,H=P[1]-T[1]*O.k;return z===O.x&&H===O.y?O:new ur(O.k,z,H)}function A(O){return[(+O[0][0]+ +O[1][0])/2,(+O[0][1]+ +O[1][1])/2]}function D(O,P,T,z){O.on("start.zoom",function(){L(this,arguments).event(z).start()}).on("interrupt.zoom end.zoom",function(){L(this,arguments).event(z).end()}).tween("zoom",function(){var H=this,V=arguments,M=L(H,V).event(z),I=r.apply(H,V),W=T==null?A(I):typeof T=="function"?T.apply(H,V):T,K=Math.max(I[1][0]-I[0][0],I[1][1]-I[0][1]),ne=H.__zoom,fe=typeof P=="function"?P.apply(H,V):P,ue=m(ne.invert(W).concat(K/ne.k),fe.invert(W).concat(K/fe.k));return function(q){if(q===1)q=fe;else{var Q=ue(q),se=K/Q[2];q=new ur(se,W[0]-Q[0]*se,W[1]-Q[1]*se)}M.zoom(null,q)}})}function L(O,P,T){return!T&&O.__zooming||new B(O,P)}function B(O,P){this.that=O,this.args=P,this.active=0,this.sourceEvent=null,this.extent=r.apply(O,P),this.taps=0}B.prototype={event:function(O){return O&&(this.sourceEvent=O),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(O,P){return this.mouse&&O!=="mouse"&&(this.mouse[1]=P.invert(this.mouse[0])),this.touch0&&O!=="touch"&&(this.touch0[1]=P.invert(this.touch0[0])),this.touch1&&O!=="touch"&&(this.touch1[1]=P.invert(this.touch1[0])),this.that.__zoom=P,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(O){var P=Ft(this.that).datum();p.call(O,this.that,new E5(O,{sourceEvent:this.sourceEvent,target:j,transform:this.that.__zoom,dispatch:p}),P)}};function U(O,...P){if(!e.apply(this,arguments))return;var T=L(this,P).event(O),z=this.__zoom,H=Math.max(c[0],Math.min(c[1],z.k*Math.pow(2,s.apply(this,arguments)))),V=gn(O);if(T.wheel)(T.mouse[0][0]!==V[0]||T.mouse[0][1]!==V[1])&&(T.mouse[1]=z.invert(T.mouse[0]=V)),clearTimeout(T.wheel);else{if(z.k===H)return;T.mouse=[V,z.invert(V)],Vc(this),T.start()}di(O),T.wheel=setTimeout(M,N),T.zoom("mouse",o(E(R(z,H),T.mouse[0],T.mouse[1]),T.extent,d));function M(){T.wheel=null,T.end()}}function G(O,...P){if(y||!e.apply(this,arguments))return;var T=O.currentTarget,z=L(this,P,!0).event(O),H=Ft(O.view).on("mousemove.zoom",W,!0).on("mouseup.zoom",K,!0),V=gn(O,T),M=O.clientX,I=O.clientY;zS(O.view),kh(O),z.mouse=[V,this.__zoom.invert(V)],Vc(this),z.start();function W(ne){if(di(ne),!z.moved){var fe=ne.clientX-M,ue=ne.clientY-I;z.moved=fe*fe+ue*ue>S}z.event(ne).zoom("mouse",o(E(z.that.__zoom,z.mouse[0]=gn(ne,T),z.mouse[1]),z.extent,d))}function K(ne){H.on("mousemove.zoom mouseup.zoom",null),LS(ne.view,z.moved),di(ne),z.event(ne).end()}}function re(O,...P){if(e.apply(this,arguments)){var T=this.__zoom,z=gn(O.changedTouches?O.changedTouches[0]:O,this),H=T.invert(z),V=T.k*(O.shiftKey?.5:2),M=o(E(R(T,V),z,H),r.apply(this,P),d);di(O),f>0?Ft(this).transition().duration(f).call(D,M,z,O):Ft(this).call(j.transform,M,z,O)}}function Z(O,...P){if(e.apply(this,arguments)){var T=O.touches,z=T.length,H=L(this,P,O.changedTouches.length===z).event(O),V,M,I,W;for(kh(O),M=0;M<z;++M)I=T[M],W=gn(I,this),W=[W,this.__zoom.invert(W),I.identifier],H.touch0?!H.touch1&&H.touch0[2]!==W[2]&&(H.touch1=W,H.taps=0):(H.touch0=W,V=!0,H.taps=1+!!g);g&&(g=clearTimeout(g)),V&&(H.taps<2&&(v=W[0],g=setTimeout(function(){g=null},b)),Vc(this),H.start())}}function Y(O,...P){if(this.__zooming){var T=L(this,P).event(O),z=O.changedTouches,H=z.length,V,M,I,W;for(di(O),V=0;V<H;++V)M=z[V],I=gn(M,this),T.touch0&&T.touch0[2]===M.identifier?T.touch0[0]=I:T.touch1&&T.touch1[2]===M.identifier&&(T.touch1[0]=I);if(M=T.that.__zoom,T.touch1){var K=T.touch0[0],ne=T.touch0[1],fe=T.touch1[0],ue=T.touch1[1],q=(q=fe[0]-K[0])*q+(q=fe[1]-K[1])*q,Q=(Q=ue[0]-ne[0])*Q+(Q=ue[1]-ne[1])*Q;M=R(M,Math.sqrt(q/Q)),I=[(K[0]+fe[0])/2,(K[1]+fe[1])/2],W=[(ne[0]+ue[0])/2,(ne[1]+ue[1])/2]}else if(T.touch0)I=T.touch0[0],W=T.touch0[1];else return;T.zoom("touch",o(E(M,I,W),T.extent,d))}}function ee(O,...P){if(this.__zooming){var T=L(this,P).event(O),z=O.changedTouches,H=z.length,V,M;for(kh(O),y&&clearTimeout(y),y=setTimeout(function(){y=null},b),V=0;V<H;++V)M=z[V],T.touch0&&T.touch0[2]===M.identifier?delete T.touch0:T.touch1&&T.touch1[2]===M.identifier&&delete T.touch1;if(T.touch1&&!T.touch0&&(T.touch0=T.touch1,delete T.touch1),T.touch0)T.touch0[1]=this.__zoom.invert(T.touch0[0]);else if(T.end(),T.taps===2&&(M=gn(M,this),Math.hypot(v[0]-M[0],v[1]-M[1])<C)){var I=Ft(this).on("dblclick.zoom");I&&I.apply(this,arguments)}}}return j.wheelDelta=function(O){return arguments.length?(s=typeof O=="function"?O:jc(+O),j):s},j.filter=function(O){return arguments.length?(e=typeof O=="function"?O:jc(!!O),j):e},j.touchable=function(O){return arguments.length?(i=typeof O=="function"?O:jc(!!O),j):i},j.extent=function(O){return arguments.length?(r=typeof O=="function"?O:jc([[+O[0][0],+O[0][1]],[+O[1][0],+O[1][1]]]),j):r},j.scaleExtent=function(O){return arguments.length?(c[0]=+O[0],c[1]=+O[1],j):[c[0],c[1]]},j.translateExtent=function(O){return arguments.length?(d[0][0]=+O[0][0],d[1][0]=+O[1][0],d[0][1]=+O[0][1],d[1][1]=+O[1][1],j):[[d[0][0],d[0][1]],[d[1][0],d[1][1]]]},j.constrain=function(O){return arguments.length?(o=O,j):o},j.duration=function(O){return arguments.length?(f=+O,j):f},j.interpolate=function(O){return arguments.length?(m=O,j):m},j.on=function(){var O=p.on.apply(p,arguments);return O===p?j:O},j.clickDistance=function(O){return arguments.length?(S=(O=+O)*O,j):Math.sqrt(S)},j.tapDistance=function(O){return arguments.length?(C=+O,j):C},j}const Hn={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:r,sourceHandle:o,targetHandle:s})=>`Couldn't create edge for ${e} handle id: "${e==="source"?o:s}", edge id: ${r}.`,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."},Mi=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],JS=["Enter"," ","Escape"],e2={"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:r,y:o})=>`Moved selected node ${e}. New position, x: ${r}, y: ${o}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Ya;(function(e){e.Strict="strict",e.Loose="loose"})(Ya||(Ya={}));var Mo;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Mo||(Mo={}));var Ti;(function(e){e.Partial="partial",e.Full="full"})(Ti||(Ti={}));const t2={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null};var Kr;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Kr||(Kr={}));var du;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(du||(du={}));var Se;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Se||(Se={}));const xv={[Se.Left]:Se.Right,[Se.Right]:Se.Left,[Se.Top]:Se.Bottom,[Se.Bottom]:Se.Top};function n2(e){return e===null?null:e?"valid":"invalid"}const r2=e=>"id"in e&&"source"in e&&"target"in e,T5=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),bp=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),qi=(e,r=[0,0])=>{const{width:o,height:s}=gr(e),i=e.origin??r,c=o*i[0],d=s*i[1];return{x:e.position.x-c,y:e.position.y-d}},k5=(e,r={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const o=e.reduce((s,i)=>{const c=typeof i=="string";let d=!r.nodeLookup&&!c?i:void 0;r.nodeLookup&&(d=c?r.nodeLookup.get(i):bp(i)?i:r.nodeLookup.get(i.id));const f=d?fu(d,r.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Uu(s,f)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Pu(o)},Gi=(e,r={})=>{if(e.size===0)return{x:0,y:0,width:0,height:0};let o={x:1/0,y:1/0,x2:-1/0,y2:-1/0};return e.forEach(s=>{if(r.filter===void 0||r.filter(s)){const i=fu(s);o=Uu(o,i)}}),Pu(o)},wp=(e,r,[o,s,i]=[0,0,1],c=!1,d=!1)=>{const f={...Fi(r,[o,s,i]),width:r.width/i,height:r.height/i},m=[];for(const p of e.values()){const{measured:g,selectable:v=!0,hidden:y=!1}=p;if(d&&!v||y)continue;const b=g.width??p.width??p.initialWidth??null,N=g.height??p.height??p.initialHeight??null,S=ki(f,Ga(p)),C=(b??0)*(N??0),j=c&&S>0;(!p.internals.handleBounds||j||S>=C||p.dragging)&&m.push(p)}return m},R5=(e,r)=>{const o=new Set;return e.forEach(s=>{o.add(s.id)}),r.filter(s=>o.has(s.source)||o.has(s.target))};function D5(e,r){const o=new Map,s=r?.nodes?new Set(r.nodes.map(i=>i.id)):null;return e.forEach(i=>{i.measured.width&&i.measured.height&&(r?.includeHiddenNodes||!i.hidden)&&(!s||s.has(i.id))&&o.set(i.id,i)}),o}async function O5({nodes:e,width:r,height:o,panZoom:s,minZoom:i,maxZoom:c},d){if(e.size===0)return Promise.resolve(!0);const f=D5(e,d),m=Gi(f),p=Sp(m,r,o,d?.minZoom??i,d?.maxZoom??c,d?.padding??.1);return await s.setViewport(p,{duration:d?.duration,ease:d?.ease,interpolate:d?.interpolate}),Promise.resolve(!0)}function o2({nodeId:e,nextPosition:r,nodeLookup:o,nodeOrigin:s=[0,0],nodeExtent:i,onError:c}){const d=o.get(e),f=d.parentId?o.get(d.parentId):void 0,{x:m,y:p}=f?f.internals.positionAbsolute:{x:0,y:0},g=d.origin??s;let v=d.extent||i;if(d.extent==="parent"&&!d.expandParent)if(!f)c?.("005",Hn.error005());else{const b=f.measured.width,N=f.measured.height;b&&N&&(v=[[m,p],[m+b,p+N]])}else f&&Xa(d.extent)&&(v=[[d.extent[0][0]+m,d.extent[0][1]+p],[d.extent[1][0]+m,d.extent[1][1]+p]]);const y=Xa(v)?Lo(r,v,d.measured):r;return(d.measured.width===void 0||d.measured.height===void 0)&&c?.("015",Hn.error015()),{position:{x:y.x-m+(d.measured.width??0)*g[0],y:y.y-p+(d.measured.height??0)*g[1]},positionAbsolute:y}}async function z5({nodesToRemove:e=[],edgesToRemove:r=[],nodes:o,edges:s,onBeforeDelete:i}){const c=new Set(e.map(y=>y.id)),d=[];for(const y of o){if(y.deletable===!1)continue;const b=c.has(y.id),N=!b&&y.parentId&&d.find(S=>S.id===y.parentId);(b||N)&&d.push(y)}const f=new Set(r.map(y=>y.id)),m=s.filter(y=>y.deletable!==!1),g=R5(d,m);for(const y of m)f.has(y.id)&&!g.find(N=>N.id===y.id)&&g.push(y);if(!i)return{edges:g,nodes:d};const v=await i({nodes:d,edges:g});return typeof v=="boolean"?v?{edges:g,nodes:d}:{edges:[],nodes:[]}:v}const qa=(e,r=0,o=1)=>Math.min(Math.max(e,r),o),Lo=(e={x:0,y:0},r,o)=>({x:qa(e.x,r[0][0],r[1][0]-(o?.width??0)),y:qa(e.y,r[0][1],r[1][1]-(o?.height??0))});function a2(e,r,o){const{width:s,height:i}=gr(o),{x:c,y:d}=o.internals.positionAbsolute;return Lo(e,[[c,d],[c+s,d+i]],r)}const yv=(e,r,o)=>e<r?qa(Math.abs(e-r),1,r)/r:e>o?-qa(Math.abs(e-o),1,r)/r:0,s2=(e,r,o=15,s=40)=>{const i=yv(e.x,s,r.width-s)*o,c=yv(e.y,s,r.height-s)*o;return[i,c]},Uu=(e,r)=>({x:Math.min(e.x,r.x),y:Math.min(e.y,r.y),x2:Math.max(e.x2,r.x2),y2:Math.max(e.y2,r.y2)}),mm=({x:e,y:r,width:o,height:s})=>({x:e,y:r,x2:e+o,y2:r+s}),Pu=({x:e,y:r,x2:o,y2:s})=>({x:e,y:r,width:o-e,height:s-r}),Ga=(e,r=[0,0])=>{const{x:o,y:s}=bp(e)?e.internals.positionAbsolute:qi(e,r);return{x:o,y:s,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},fu=(e,r=[0,0])=>{const{x:o,y:s}=bp(e)?e.internals.positionAbsolute:qi(e,r);return{x:o,y:s,x2:o+(e.measured?.width??e.width??e.initialWidth??0),y2:s+(e.measured?.height??e.height??e.initialHeight??0)}},i2=(e,r)=>Pu(Uu(mm(e),mm(r))),ki=(e,r)=>{const o=Math.max(0,Math.min(e.x+e.width,r.x+r.width)-Math.max(e.x,r.x)),s=Math.max(0,Math.min(e.y+e.height,r.y+r.height)-Math.max(e.y,r.y));return Math.ceil(o*s)},vv=e=>yn(e.width)&&yn(e.height)&&yn(e.x)&&yn(e.y),yn=e=>!isNaN(e)&&isFinite(e),L5=(e,r)=>{},Xi=(e,r=[1,1])=>({x:r[0]*Math.round(e.x/r[0]),y:r[1]*Math.round(e.y/r[1])}),Fi=({x:e,y:r},[o,s,i],c=!1,d=[1,1])=>{const f={x:(e-o)/i,y:(r-s)/i};return c?Xi(f,d):f},hu=({x:e,y:r},[o,s,i])=>({x:e*i+o,y:r*i+s});function Ma(e,r){if(typeof e=="number")return Math.floor((r-r/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const o=parseFloat(e);if(!Number.isNaN(o))return Math.floor(o)}if(typeof e=="string"&&e.endsWith("%")){const o=parseFloat(e);if(!Number.isNaN(o))return Math.floor(r*o*.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 H5(e,r,o){if(typeof e=="string"||typeof e=="number"){const s=Ma(e,o),i=Ma(e,r);return{top:s,right:i,bottom:s,left:i,x:i*2,y:s*2}}if(typeof e=="object"){const s=Ma(e.top??e.y??0,o),i=Ma(e.bottom??e.y??0,o),c=Ma(e.left??e.x??0,r),d=Ma(e.right??e.x??0,r);return{top:s,right:d,bottom:i,left:c,x:c+d,y:s+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function B5(e,r,o,s,i,c){const{x:d,y:f}=hu(e,[r,o,s]),{x:m,y:p}=hu({x:e.x+e.width,y:e.y+e.height},[r,o,s]),g=i-m,v=c-p;return{left:Math.floor(d),top:Math.floor(f),right:Math.floor(g),bottom:Math.floor(v)}}const Sp=(e,r,o,s,i,c)=>{const d=H5(c,r,o),f=(r-d.x)/e.width,m=(o-d.y)/e.height,p=Math.min(f,m),g=qa(p,s,i),v=e.x+e.width/2,y=e.y+e.height/2,b=r/2-v*g,N=o/2-y*g,S=B5(e,b,N,g,r,o),C={left:Math.min(S.left-d.left,0),top:Math.min(S.top-d.top,0),right:Math.min(S.right-d.right,0),bottom:Math.min(S.bottom-d.bottom,0)};return{x:b-C.left+C.right,y:N-C.top+C.bottom,zoom:g}},Ri=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function Xa(e){return e!=null&&e!=="parent"}function gr(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function l2(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function c2(e,r={width:0,height:0},o,s,i){const c={...e},d=s.get(o);if(d){const f=d.origin||i;c.x+=d.internals.positionAbsolute.x-(r.width??0)*f[0],c.y+=d.internals.positionAbsolute.y-(r.height??0)*f[1]}return c}function bv(e,r){if(e.size!==r.size)return!1;for(const o of e)if(!r.has(o))return!1;return!0}function I5(){let e,r;return{promise:new Promise((s,i)=>{e=s,r=i}),resolve:e,reject:r}}function U5(e){return{...e2,...e||{}}}function yi(e,{snapGrid:r=[0,0],snapToGrid:o=!1,transform:s,containerBounds:i}){const{x:c,y:d}=Dn(e),f=Fi({x:c-(i?.left??0),y:d-(i?.top??0)},s),{x:m,y:p}=o?Xi(f,r):f;return{xSnapped:m,ySnapped:p,...f}}const Np=e=>({width:e.offsetWidth,height:e.offsetHeight}),u2=e=>e?.getRootNode?.()||window?.document,P5=["INPUT","SELECT","TEXTAREA"];function d2(e){const r=e.composedPath?.()?.[0]||e.target;return r?.nodeType!==1?!1:P5.includes(r.nodeName)||r.hasAttribute("contenteditable")||!!r.closest(".nokey")}const f2=e=>"clientX"in e,Dn=(e,r)=>{const o=f2(e),s=o?e.clientX:e.touches?.[0].clientX,i=o?e.clientY:e.touches?.[0].clientY;return{x:s-(r?.left??0),y:i-(r?.top??0)}},wv=(e,r,o,s,i)=>{const c=r.querySelectorAll(`.${e}`);return!c||!c.length?null:Array.from(c).map(d=>{const f=d.getBoundingClientRect();return{id:d.getAttribute("data-handleid"),type:e,nodeId:i,position:d.getAttribute("data-handlepos"),x:(f.left-o.left)/s,y:(f.top-o.top)/s,...Np(d)}})};function h2({sourceX:e,sourceY:r,targetX:o,targetY:s,sourceControlX:i,sourceControlY:c,targetControlX:d,targetControlY:f}){const m=e*.125+i*.375+d*.375+o*.125,p=r*.125+c*.375+f*.375+s*.125,g=Math.abs(m-e),v=Math.abs(p-r);return[m,p,g,v]}function Ac(e,r){return e>=0?.5*e:r*25*Math.sqrt(-e)}function Sv({pos:e,x1:r,y1:o,x2:s,y2:i,c}){switch(e){case Se.Left:return[r-Ac(r-s,c),o];case Se.Right:return[r+Ac(s-r,c),o];case Se.Top:return[r,o-Ac(o-i,c)];case Se.Bottom:return[r,o+Ac(i-o,c)]}}function m2({sourceX:e,sourceY:r,sourcePosition:o=Se.Bottom,targetX:s,targetY:i,targetPosition:c=Se.Top,curvature:d=.25}){const[f,m]=Sv({pos:o,x1:e,y1:r,x2:s,y2:i,c:d}),[p,g]=Sv({pos:c,x1:s,y1:i,x2:e,y2:r,c:d}),[v,y,b,N]=h2({sourceX:e,sourceY:r,targetX:s,targetY:i,sourceControlX:f,sourceControlY:m,targetControlX:p,targetControlY:g});return[`M${e},${r} C${f},${m} ${p},${g} ${s},${i}`,v,y,b,N]}function p2({sourceX:e,sourceY:r,targetX:o,targetY:s}){const i=Math.abs(o-e)/2,c=o<e?o+i:o-i,d=Math.abs(s-r)/2,f=s<r?s+d:s-d;return[c,f,i,d]}function $5({sourceNode:e,targetNode:r,selected:o=!1,zIndex:s,elevateOnSelect:i=!1}){if(s!==void 0)return s;const c=i&&o?1e3:0,d=Math.max(e.parentId?e.internals.z:0,r.parentId?r.internals.z:0);return c+d}function V5({sourceNode:e,targetNode:r,width:o,height:s,transform:i}){const c=Uu(fu(e),fu(r));c.x===c.x2&&(c.x2+=1),c.y===c.y2&&(c.y2+=1);const d={x:-i[0]/i[2],y:-i[1]/i[2],width:o/i[2],height:s/i[2]};return ki(d,Pu(c))>0}const Y5=({source:e,sourceHandle:r,target:o,targetHandle:s})=>`xy-edge__${e}${r||""}-${o}${s||""}`,q5=(e,r)=>r.some(o=>o.source===e.source&&o.target===e.target&&(o.sourceHandle===e.sourceHandle||!o.sourceHandle&&!e.sourceHandle)&&(o.targetHandle===e.targetHandle||!o.targetHandle&&!e.targetHandle)),G5=(e,r)=>{if(!e.source||!e.target)return r;let o;return r2(e)?o={...e}:o={...e,id:Y5(e)},q5(o,r)?r:(o.sourceHandle===null&&delete o.sourceHandle,o.targetHandle===null&&delete o.targetHandle,r.concat(o))};function g2({sourceX:e,sourceY:r,targetX:o,targetY:s}){const[i,c,d,f]=p2({sourceX:e,sourceY:r,targetX:o,targetY:s});return[`M ${e},${r}L ${o},${s}`,i,c,d,f]}const Nv={[Se.Left]:{x:-1,y:0},[Se.Right]:{x:1,y:0},[Se.Top]:{x:0,y:-1},[Se.Bottom]:{x:0,y:1}},X5=({source:e,sourcePosition:r=Se.Bottom,target:o})=>r===Se.Left||r===Se.Right?e.x<o.x?{x:1,y:0}:{x:-1,y:0}:e.y<o.y?{x:0,y:1}:{x:0,y:-1},Ev=(e,r)=>Math.sqrt(Math.pow(r.x-e.x,2)+Math.pow(r.y-e.y,2));function F5({source:e,sourcePosition:r=Se.Bottom,target:o,targetPosition:s=Se.Top,center:i,offset:c,stepPosition:d}){const f=Nv[r],m=Nv[s],p={x:e.x+f.x*c,y:e.y+f.y*c},g={x:o.x+m.x*c,y:o.y+m.y*c},v=X5({source:p,sourcePosition:r,target:g}),y=v.x!==0?"x":"y",b=v[y];let N=[],S,C;const j={x:0,y:0},R={x:0,y:0},[,,E,A]=p2({sourceX:e.x,sourceY:e.y,targetX:o.x,targetY:o.y});if(f[y]*m[y]===-1){y==="x"?(S=i.x??p.x+(g.x-p.x)*d,C=i.y??(p.y+g.y)/2):(S=i.x??(p.x+g.x)/2,C=i.y??p.y+(g.y-p.y)*d);const L=[{x:S,y:p.y},{x:S,y:g.y}],B=[{x:p.x,y:C},{x:g.x,y:C}];f[y]===b?N=y==="x"?L:B:N=y==="x"?B:L}else{const L=[{x:p.x,y:g.y}],B=[{x:g.x,y:p.y}];if(y==="x"?N=f.x===b?B:L:N=f.y===b?L:B,r===s){const Y=Math.abs(e[y]-o[y]);if(Y<=c){const ee=Math.min(c-1,c-Y);f[y]===b?j[y]=(p[y]>e[y]?-1:1)*ee:R[y]=(g[y]>o[y]?-1:1)*ee}}if(r!==s){const Y=y==="x"?"y":"x",ee=f[y]===m[Y],O=p[Y]>g[Y],P=p[Y]<g[Y];(f[y]===1&&(!ee&&O||ee&&P)||f[y]!==1&&(!ee&&P||ee&&O))&&(N=y==="x"?L:B)}const U={x:p.x+j.x,y:p.y+j.y},G={x:g.x+R.x,y:g.y+R.y},re=Math.max(Math.abs(U.x-N[0].x),Math.abs(G.x-N[0].x)),Z=Math.max(Math.abs(U.y-N[0].y),Math.abs(G.y-N[0].y));re>=Z?(S=(U.x+G.x)/2,C=N[0].y):(S=N[0].x,C=(U.y+G.y)/2)}return[[e,{x:p.x+j.x,y:p.y+j.y},...N,{x:g.x+R.x,y:g.y+R.y},o],S,C,E,A]}function Z5(e,r,o,s){const i=Math.min(Ev(e,r)/2,Ev(r,o)/2,s),{x:c,y:d}=r;if(e.x===c&&c===o.x||e.y===d&&d===o.y)return`L${c} ${d}`;if(e.y===d){const p=e.x<o.x?-1:1,g=e.y<o.y?1:-1;return`L ${c+i*p},${d}Q ${c},${d} ${c},${d+i*g}`}const f=e.x<o.x?1:-1,m=e.y<o.y?-1:1;return`L ${c},${d+i*m}Q ${c},${d} ${c+i*f},${d}`}function pm({sourceX:e,sourceY:r,sourcePosition:o=Se.Bottom,targetX:s,targetY:i,targetPosition:c=Se.Top,borderRadius:d=5,centerX:f,centerY:m,offset:p=20,stepPosition:g=.5}){const[v,y,b,N,S]=F5({source:{x:e,y:r},sourcePosition:o,target:{x:s,y:i},targetPosition:c,center:{x:f,y:m},offset:p,stepPosition:g});return[v.reduce((j,R,E)=>{let A="";return E>0&&E<v.length-1?A=Z5(v[E-1],R,v[E+1],d):A=`${E===0?"M":"L"}${R.x} ${R.y}`,j+=A,j},""),y,b,N,S]}function _v(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function K5(e){const{sourceNode:r,targetNode:o}=e;if(!_v(r)||!_v(o))return null;const s=r.internals.handleBounds||Cv(r.handles),i=o.internals.handleBounds||Cv(o.handles),c=jv(s?.source??[],e.sourceHandle),d=jv(e.connectionMode===Ya.Strict?i?.target??[]:(i?.target??[]).concat(i?.source??[]),e.targetHandle);if(!c||!d)return e.onError?.("008",Hn.error008(c?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const f=c?.position||Se.Bottom,m=d?.position||Se.Top,p=Di(r,c,f),g=Di(o,d,m);return{sourceX:p.x,sourceY:p.y,targetX:g.x,targetY:g.y,sourcePosition:f,targetPosition:m}}function Cv(e){if(!e)return null;const r=[],o=[];for(const s of e)s.width=s.width??1,s.height=s.height??1,s.type==="source"?r.push(s):s.type==="target"&&o.push(s);return{source:r,target:o}}function Di(e,r,o=Se.Left,s=!1){const i=(r?.x??0)+e.internals.positionAbsolute.x,c=(r?.y??0)+e.internals.positionAbsolute.y,{width:d,height:f}=r??gr(e);if(s)return{x:i+d/2,y:c+f/2};switch(r?.position??o){case Se.Top:return{x:i+d/2,y:c};case Se.Right:return{x:i+d,y:c+f/2};case Se.Bottom:return{x:i+d/2,y:c+f};case Se.Left:return{x:i,y:c+f/2}}}function jv(e,r){return e&&(r?e.find(o=>o.id===r):e[0])||null}function gm(e,r){return e?typeof e=="string"?e:`${r?`${r}__`:""}${Object.keys(e).sort().map(s=>`${s}=${e[s]}`).join("&")}`:""}function Q5(e,{id:r,defaultColor:o,defaultMarkerStart:s,defaultMarkerEnd:i}){const c=new Set;return e.reduce((d,f)=>([f.markerStart||s,f.markerEnd||i].forEach(m=>{if(m&&typeof m=="object"){const p=gm(m,r);c.has(p)||(d.push({id:p,color:m.color||o,...m}),c.add(p))}}),d),[]).sort((d,f)=>d.id.localeCompare(f.id))}const Ep={nodeOrigin:[0,0],nodeExtent:Mi,elevateNodesOnSelect:!0,defaults:{}},W5={...Ep,checkEquality:!0};function _p(e,r){const o={...e};for(const s in r)r[s]!==void 0&&(o[s]=r[s]);return o}function J5(e,r,o){const s=_p(Ep,o);for(const i of e.values())if(i.parentId)Cp(i,e,r,s);else{const c=qi(i,s.nodeOrigin),d=Xa(i.extent)?i.extent:s.nodeExtent,f=Lo(c,d,gr(i));i.internals.positionAbsolute=f}}function xm(e,r,o,s){const i=_p(W5,s);let c=e.length>0;const d=new Map(r),f=i?.elevateNodesOnSelect?1e3:0;r.clear(),o.clear();for(const m of e){let p=d.get(m.id);if(i.checkEquality&&m===p?.internals.userNode)r.set(m.id,p);else{const g=qi(m,i.nodeOrigin),v=Xa(m.extent)?m.extent:i.nodeExtent,y=Lo(g,v,gr(m));p={...i.defaults,...m,measured:{width:m.measured?.width,height:m.measured?.height},internals:{positionAbsolute:y,handleBounds:m.measured?p?.internals.handleBounds:void 0,z:x2(m,f),userNode:m}},r.set(m.id,p)}(p.measured===void 0||p.measured.width===void 0||p.measured.height===void 0)&&!p.hidden&&(c=!1),m.parentId&&Cp(p,r,o,s)}return c}function e6(e,r){if(!e.parentId)return;const o=r.get(e.parentId);o?o.set(e.id,e):r.set(e.parentId,new Map([[e.id,e]]))}function Cp(e,r,o,s){const{elevateNodesOnSelect:i,nodeOrigin:c,nodeExtent:d}=_p(Ep,s),f=e.parentId,m=r.get(f);if(!m){console.warn(`Parent node ${f} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}e6(e,o);const p=i?1e3:0,{x:g,y:v,z:y}=t6(e,m,c,d,p),{positionAbsolute:b}=e.internals,N=g!==b.x||v!==b.y;(N||y!==e.internals.z)&&r.set(e.id,{...e,internals:{...e.internals,positionAbsolute:N?{x:g,y:v}:b,z:y}})}function x2(e,r){return(yn(e.zIndex)?e.zIndex:0)+(e.selected?r:0)}function t6(e,r,o,s,i){const{x:c,y:d}=r.internals.positionAbsolute,f=gr(e),m=qi(e,o),p=Xa(e.extent)?Lo(m,e.extent,f):m;let g=Lo({x:c+p.x,y:d+p.y},s,f);e.extent==="parent"&&(g=a2(g,f,r));const v=x2(e,i),y=r.internals.z??0;return{x:g.x,y:g.y,z:y>=v?y+1:v}}function jp(e,r,o,s=[0,0]){const i=[],c=new Map;for(const d of e){const f=r.get(d.parentId);if(!f)continue;const m=c.get(d.parentId)?.expandedRect??Ga(f),p=i2(m,d.rect);c.set(d.parentId,{expandedRect:p,parent:f})}return c.size>0&&c.forEach(({expandedRect:d,parent:f},m)=>{const p=f.internals.positionAbsolute,g=gr(f),v=f.origin??s,y=d.x<p.x?Math.round(Math.abs(p.x-d.x)):0,b=d.y<p.y?Math.round(Math.abs(p.y-d.y)):0,N=Math.max(g.width,Math.round(d.width)),S=Math.max(g.height,Math.round(d.height)),C=(N-g.width)*v[0],j=(S-g.height)*v[1];(y>0||b>0||C||j)&&(i.push({id:m,type:"position",position:{x:f.position.x-y+C,y:f.position.y-b+j}}),o.get(m)?.forEach(R=>{e.some(E=>E.id===R.id)||i.push({id:R.id,type:"position",position:{x:R.position.x+y,y:R.position.y+b}})})),(g.width<d.width||g.height<d.height||y||b)&&i.push({id:m,type:"dimensions",setAttributes:!0,dimensions:{width:N+(y?v[0]*y-C:0),height:S+(b?v[1]*b-j:0)}})}),i}function n6(e,r,o,s,i,c){const d=s?.querySelector(".xyflow__viewport");let f=!1;if(!d)return{changes:[],updatedInternals:f};const m=[],p=window.getComputedStyle(d),{m22:g}=new window.DOMMatrixReadOnly(p.transform),v=[];for(const y of e.values()){const b=r.get(y.id);if(!b)continue;if(b.hidden){r.set(b.id,{...b,internals:{...b.internals,handleBounds:void 0}}),f=!0;continue}const N=Np(y.nodeElement),S=b.measured.width!==N.width||b.measured.height!==N.height;if(!!(N.width&&N.height&&(S||!b.internals.handleBounds||y.force))){const j=y.nodeElement.getBoundingClientRect(),R=Xa(b.extent)?b.extent:c;let{positionAbsolute:E}=b.internals;b.parentId&&b.extent==="parent"?E=a2(E,N,r.get(b.parentId)):R&&(E=Lo(E,R,N));const A={...b,measured:N,internals:{...b.internals,positionAbsolute:E,handleBounds:{source:wv("source",y.nodeElement,j,g,b.id),target:wv("target",y.nodeElement,j,g,b.id)}}};r.set(b.id,A),b.parentId&&Cp(A,r,o,{nodeOrigin:i}),f=!0,S&&(m.push({id:b.id,type:"dimensions",dimensions:N}),b.expandParent&&b.parentId&&v.push({id:b.id,parentId:b.parentId,rect:Ga(A,i)}))}}if(v.length>0){const y=jp(v,r,o,i);m.push(...y)}return{changes:m,updatedInternals:f}}async function r6({delta:e,panZoom:r,transform:o,translateExtent:s,width:i,height:c}){if(!r||!e.x&&!e.y)return Promise.resolve(!1);const d=await r.setViewportConstrained({x:o[0]+e.x,y:o[1]+e.y,zoom:o[2]},[[0,0],[i,c]],s),f=!!d&&(d.x!==o[0]||d.y!==o[1]||d.k!==o[2]);return Promise.resolve(f)}function Av(e,r,o,s,i,c){let d=i;const f=s.get(d)||new Map;s.set(d,f.set(o,r)),d=`${i}-${e}`;const m=s.get(d)||new Map;if(s.set(d,m.set(o,r)),c){d=`${i}-${e}-${c}`;const p=s.get(d)||new Map;s.set(d,p.set(o,r))}}function y2(e,r,o){e.clear(),r.clear();for(const s of o){const{source:i,target:c,sourceHandle:d=null,targetHandle:f=null}=s,m={edgeId:s.id,source:i,target:c,sourceHandle:d,targetHandle:f},p=`${i}-${d}--${c}-${f}`,g=`${c}-${f}--${i}-${d}`;Av("source",m,g,e,i,d),Av("target",m,p,e,c,f),r.set(s.id,s)}}function v2(e,r){if(!e.parentId)return!1;const o=r.get(e.parentId);return o?o.selected?!0:v2(o,r):!1}function Mv(e,r,o){let s=e;do{if(s?.matches?.(r))return!0;if(s===o)return!1;s=s?.parentElement}while(s);return!1}function o6(e,r,o,s){const i=new Map;for(const[c,d]of e)if((d.selected||d.id===s)&&(!d.parentId||!v2(d,e))&&(d.draggable||r&&typeof d.draggable>"u")){const f=e.get(c);f&&i.set(c,{id:c,position:f.position||{x:0,y:0},distance:{x:o.x-f.internals.positionAbsolute.x,y:o.y-f.internals.positionAbsolute.y},extent:f.extent,parentId:f.parentId,origin:f.origin,expandParent:f.expandParent,internals:{positionAbsolute:f.internals.positionAbsolute||{x:0,y:0}},measured:{width:f.measured.width??0,height:f.measured.height??0}})}return i}function Rh({nodeId:e,dragItems:r,nodeLookup:o,dragging:s=!0}){const i=[];for(const[d,f]of r){const m=o.get(d)?.internals.userNode;m&&i.push({...m,position:f.position,dragging:s})}if(!e)return[i[0],i];const c=o.get(e)?.internals.userNode;return[c?{...c,position:r.get(e)?.position||c.position,dragging:s}:i[0],i]}function a6({dragItems:e,snapGrid:r,x:o,y:s}){const i=e.values().next().value;if(!i)return null;const c={x:o-i.distance.x,y:s-i.distance.y},d=Xi(c,r);return{x:d.x-c.x,y:d.y-c.y}}function s6({onNodeMouseDown:e,getStoreItems:r,onDragStart:o,onDrag:s,onDragStop:i}){let c={x:null,y:null},d=0,f=new Map,m=!1,p={x:0,y:0},g=null,v=!1,y=null,b=!1,N=!1,S=null;function C({noDragClassName:R,handleSelector:E,domNode:A,isSelectable:D,nodeId:L,nodeClickDistance:B=0}){y=Ft(A);function U({x:Y,y:ee}){const{nodeLookup:O,nodeExtent:P,snapGrid:T,snapToGrid:z,nodeOrigin:H,onNodeDrag:V,onSelectionDrag:M,onError:I,updateNodePositions:W}=r();c={x:Y,y:ee};let K=!1;const ne=f.size>1,fe=ne&&P?mm(Gi(f)):null,ue=ne&&z?a6({dragItems:f,snapGrid:T,x:Y,y:ee}):null;for(const[q,Q]of f){if(!O.has(q))continue;let se={x:Y-Q.distance.x,y:ee-Q.distance.y};z&&(se=ue?{x:Math.round(se.x+ue.x),y:Math.round(se.y+ue.y)}:Xi(se,T));let me=null;if(ne&&P&&!Q.extent&&fe){const{positionAbsolute:he}=Q.internals,ge=he.x-fe.x+P[0][0],Te=he.x+Q.measured.width-fe.x2+P[1][0],Ae=he.y-fe.y+P[0][1],Ne=he.y+Q.measured.height-fe.y2+P[1][1];me=[[ge,Ae],[Te,Ne]]}const{position:pe,positionAbsolute:de}=o2({nodeId:q,nextPosition:se,nodeLookup:O,nodeExtent:me||P,nodeOrigin:H,onError:I});K=K||Q.position.x!==pe.x||Q.position.y!==pe.y,Q.position=pe,Q.internals.positionAbsolute=de}if(N=N||K,!!K&&(W(f,!0),S&&(s||V||!L&&M))){const[q,Q]=Rh({nodeId:L,dragItems:f,nodeLookup:O});s?.(S,f,q,Q),V?.(S,q,Q),L||M?.(S,Q)}}async function G(){if(!g)return;const{transform:Y,panBy:ee,autoPanSpeed:O,autoPanOnNodeDrag:P}=r();if(!P){m=!1,cancelAnimationFrame(d);return}const[T,z]=s2(p,g,O);(T!==0||z!==0)&&(c.x=(c.x??0)-T/Y[2],c.y=(c.y??0)-z/Y[2],await ee({x:T,y:z})&&U(c)),d=requestAnimationFrame(G)}function re(Y){const{nodeLookup:ee,multiSelectionActive:O,nodesDraggable:P,transform:T,snapGrid:z,snapToGrid:H,selectNodesOnDrag:V,onNodeDragStart:M,onSelectionDragStart:I,unselectNodesAndEdges:W}=r();v=!0,(!V||!D)&&!O&&L&&(ee.get(L)?.selected||W()),D&&V&&L&&e?.(L);const K=yi(Y.sourceEvent,{transform:T,snapGrid:z,snapToGrid:H,containerBounds:g});if(c=K,f=o6(ee,P,K,L),f.size>0&&(o||M||!L&&I)){const[ne,fe]=Rh({nodeId:L,dragItems:f,nodeLookup:ee});o?.(Y.sourceEvent,f,ne,fe),M?.(Y.sourceEvent,ne,fe),L||I?.(Y.sourceEvent,fe)}}const Z=HS().clickDistance(B).on("start",Y=>{const{domNode:ee,nodeDragThreshold:O,transform:P,snapGrid:T,snapToGrid:z}=r();g=ee?.getBoundingClientRect()||null,b=!1,N=!1,S=Y.sourceEvent,O===0&&re(Y),c=yi(Y.sourceEvent,{transform:P,snapGrid:T,snapToGrid:z,containerBounds:g}),p=Dn(Y.sourceEvent,g)}).on("drag",Y=>{const{autoPanOnNodeDrag:ee,transform:O,snapGrid:P,snapToGrid:T,nodeDragThreshold:z,nodeLookup:H}=r(),V=yi(Y.sourceEvent,{transform:O,snapGrid:P,snapToGrid:T,containerBounds:g});if(S=Y.sourceEvent,(Y.sourceEvent.type==="touchmove"&&Y.sourceEvent.touches.length>1||L&&!H.has(L))&&(b=!0),!b){if(!m&&ee&&v&&(m=!0,G()),!v){const M=V.xSnapped-(c.x??0),I=V.ySnapped-(c.y??0);Math.sqrt(M*M+I*I)>z&&re(Y)}(c.x!==V.xSnapped||c.y!==V.ySnapped)&&f&&v&&(p=Dn(Y.sourceEvent,g),U(V))}}).on("end",Y=>{if(!(!v||b)&&(m=!1,v=!1,cancelAnimationFrame(d),f.size>0)){const{nodeLookup:ee,updateNodePositions:O,onNodeDragStop:P,onSelectionDragStop:T}=r();if(N&&(O(f,!1),N=!1),i||P||!L&&T){const[z,H]=Rh({nodeId:L,dragItems:f,nodeLookup:ee,dragging:!1});i?.(Y.sourceEvent,f,z,H),P?.(Y.sourceEvent,z,H),L||T?.(Y.sourceEvent,H)}}}).filter(Y=>{const ee=Y.target;return!Y.button&&(!R||!Mv(ee,`.${R}`,A))&&(!E||Mv(ee,E,A))});y.call(Z)}function j(){y?.on(".drag",null)}return{update:C,destroy:j}}function i6(e,r,o){const s=[],i={x:e.x-o,y:e.y-o,width:o*2,height:o*2};for(const c of r.values())ki(i,Ga(c))>0&&s.push(c);return s}const l6=250;function c6(e,r,o,s){let i=[],c=1/0;const d=i6(e,o,r+l6);for(const f of d){const m=[...f.internals.handleBounds?.source??[],...f.internals.handleBounds?.target??[]];for(const p of m){if(s.nodeId===p.nodeId&&s.type===p.type&&s.id===p.id)continue;const{x:g,y:v}=Di(f,p,p.position,!0),y=Math.sqrt(Math.pow(g-e.x,2)+Math.pow(v-e.y,2));y>r||(y<c?(i=[{...p,x:g,y:v}],c=y):y===c&&i.push({...p,x:g,y:v}))}}if(!i.length)return null;if(i.length>1){const f=s.type==="source"?"target":"source";return i.find(m=>m.type===f)??i[0]}return i[0]}function b2(e,r,o,s,i,c=!1){const d=s.get(e);if(!d)return null;const f=i==="strict"?d.internals.handleBounds?.[r]:[...d.internals.handleBounds?.source??[],...d.internals.handleBounds?.target??[]],m=(o?f?.find(p=>p.id===o):f?.[0])??null;return m&&c?{...m,...Di(d,m,m.position,!0)}:m}function w2(e,r){return e||(r?.classList.contains("target")?"target":r?.classList.contains("source")?"source":null)}function u6(e,r){let o=null;return r?o=!0:e&&!r&&(o=!1),o}const S2=()=>!0;function d6(e,{connectionMode:r,connectionRadius:o,handleId:s,nodeId:i,edgeUpdaterType:c,isTarget:d,domNode:f,nodeLookup:m,lib:p,autoPanOnConnect:g,flowId:v,panBy:y,cancelConnection:b,onConnectStart:N,onConnect:S,onConnectEnd:C,isValidConnection:j=S2,onReconnectEnd:R,updateConnection:E,getTransform:A,getFromHandle:D,autoPanSpeed:L,dragThreshold:B=1,handleDomNode:U}){const G=u2(e.target);let re=0,Z;const{x:Y,y:ee}=Dn(e),O=w2(c,U),P=f?.getBoundingClientRect();let T=!1;if(!P||!O)return;const z=b2(i,O,s,m,r);if(!z)return;let H=Dn(e,P),V=!1,M=null,I=!1,W=null;function K(){if(!g||!P)return;const[pe,de]=s2(H,P,L);y({x:pe,y:de}),re=requestAnimationFrame(K)}const ne={...z,nodeId:i,type:O,position:z.position},fe=m.get(i);let q={inProgress:!0,isValid:null,from:Di(fe,ne,Se.Left,!0),fromHandle:ne,fromPosition:ne.position,fromNode:fe,to:H,toHandle:null,toPosition:xv[ne.position],toNode:null};function Q(){T=!0,E(q),N?.(e,{nodeId:i,handleId:s,handleType:O})}B===0&&Q();function se(pe){if(!T){const{x:Te,y:Ae}=Dn(pe),Ne=Te-Y,ct=Ae-ee;if(!(Ne*Ne+ct*ct>B*B))return;Q()}if(!D()||!ne){me(pe);return}const de=A();H=Dn(pe,P),Z=c6(Fi(H,de,!1,[1,1]),o,m,ne),V||(K(),V=!0);const he=N2(pe,{handle:Z,connectionMode:r,fromNodeId:i,fromHandleId:s,fromType:d?"target":"source",isValidConnection:j,doc:G,lib:p,flowId:v,nodeLookup:m});W=he.handleDomNode,M=he.connection,I=u6(!!Z,he.isValid);const ge={...q,isValid:I,to:he.toHandle&&I?hu({x:he.toHandle.x,y:he.toHandle.y},de):H,toHandle:he.toHandle,toPosition:I&&he.toHandle?he.toHandle.position:xv[ne.position],toNode:he.toHandle?m.get(he.toHandle.nodeId):null};I&&Z&&q.toHandle&&ge.toHandle&&q.toHandle.type===ge.toHandle.type&&q.toHandle.nodeId===ge.toHandle.nodeId&&q.toHandle.id===ge.toHandle.id&&q.to.x===ge.to.x&&q.to.y===ge.to.y||(E(ge),q=ge)}function me(pe){if(T){(Z||W)&&M&&I&&S?.(M);const{inProgress:de,...he}=q,ge={...he,toPosition:q.toHandle?q.toPosition:null};C?.(pe,ge),c&&R?.(pe,ge)}b(),cancelAnimationFrame(re),V=!1,I=!1,M=null,W=null,G.removeEventListener("mousemove",se),G.removeEventListener("mouseup",me),G.removeEventListener("touchmove",se),G.removeEventListener("touchend",me)}G.addEventListener("mousemove",se),G.addEventListener("mouseup",me),G.addEventListener("touchmove",se),G.addEventListener("touchend",me)}function N2(e,{handle:r,connectionMode:o,fromNodeId:s,fromHandleId:i,fromType:c,doc:d,lib:f,flowId:m,isValidConnection:p=S2,nodeLookup:g}){const v=c==="target",y=r?d.querySelector(`.${f}-flow__handle[data-id="${m}-${r?.nodeId}-${r?.id}-${r?.type}"]`):null,{x:b,y:N}=Dn(e),S=d.elementFromPoint(b,N),C=S?.classList.contains(`${f}-flow__handle`)?S:y,j={handleDomNode:C,isValid:!1,connection:null,toHandle:null};if(C){const R=w2(void 0,C),E=C.getAttribute("data-nodeid"),A=C.getAttribute("data-handleid"),D=C.classList.contains("connectable"),L=C.classList.contains("connectableend");if(!E||!R)return j;const B={source:v?E:s,sourceHandle:v?A:i,target:v?s:E,targetHandle:v?i:A};j.connection=B;const G=D&&L&&(o===Ya.Strict?v&&R==="source"||!v&&R==="target":E!==s||A!==i);j.isValid=G&&p(B),j.toHandle=b2(E,R,A,g,o,!0)}return j}const ym={onPointerDown:d6,isValid:N2};function f6({domNode:e,panZoom:r,getTransform:o,getViewScale:s}){const i=Ft(e);function c({translateExtent:f,width:m,height:p,zoomStep:g=1,pannable:v=!0,zoomable:y=!0,inversePan:b=!1}){const N=E=>{if(E.sourceEvent.type!=="wheel"||!r)return;const A=o(),D=E.sourceEvent.ctrlKey&&Ri()?10:1,L=-E.sourceEvent.deltaY*(E.sourceEvent.deltaMode===1?.05:E.sourceEvent.deltaMode?1:.002)*g,B=A[2]*Math.pow(2,L*D);r.scaleTo(B)};let S=[0,0];const C=E=>{(E.sourceEvent.type==="mousedown"||E.sourceEvent.type==="touchstart")&&(S=[E.sourceEvent.clientX??E.sourceEvent.touches[0].clientX,E.sourceEvent.clientY??E.sourceEvent.touches[0].clientY])},j=E=>{const A=o();if(E.sourceEvent.type!=="mousemove"&&E.sourceEvent.type!=="touchmove"||!r)return;const D=[E.sourceEvent.clientX??E.sourceEvent.touches[0].clientX,E.sourceEvent.clientY??E.sourceEvent.touches[0].clientY],L=[D[0]-S[0],D[1]-S[1]];S=D;const B=s()*Math.max(A[2],Math.log(A[2]))*(b?-1:1),U={x:A[0]-L[0]*B,y:A[1]-L[1]*B},G=[[0,0],[m,p]];r.setViewportConstrained({x:U.x,y:U.y,zoom:A[2]},G,f)},R=WS().on("start",C).on("zoom",v?j:null).on("zoom.wheel",y?N:null);i.call(R,{})}function d(){i.on("zoom",null)}return{update:c,destroy:d,pointer:gn}}const h6=(e,r)=>e.x!==r.x||e.y!==r.y||e.zoom!==r.k,$u=e=>({x:e.x,y:e.y,zoom:e.k}),Dh=({x:e,y:r,zoom:o})=>Iu.translate(e,r).scale(o),Ta=(e,r)=>e.target.closest(`.${r}`),E2=(e,r)=>r===2&&Array.isArray(e)&&e.includes(2),m6=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Oh=(e,r=0,o=m6,s=()=>{})=>{const i=typeof r=="number"&&r>0;return i||s(),i?e.transition().duration(r).ease(o).on("end",s):e},_2=e=>{const r=e.ctrlKey&&Ri()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*r};function p6({zoomPanValues:e,noWheelClassName:r,d3Selection:o,d3Zoom:s,panOnScrollMode:i,panOnScrollSpeed:c,zoomOnPinch:d,onPanZoomStart:f,onPanZoom:m,onPanZoomEnd:p}){return g=>{if(Ta(g,r))return!1;g.preventDefault(),g.stopImmediatePropagation();const v=o.property("__zoom").k||1;if(g.ctrlKey&&d){const C=gn(g),j=_2(g),R=v*Math.pow(2,j);s.scaleTo(o,R,C,g);return}const y=g.deltaMode===1?20:1;let b=i===Mo.Vertical?0:g.deltaX*y,N=i===Mo.Horizontal?0:g.deltaY*y;!Ri()&&g.shiftKey&&i!==Mo.Vertical&&(b=g.deltaY*y,N=0),s.translateBy(o,-(b/v)*c,-(N/v)*c,{internal:!0});const S=$u(o.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling||(e.isPanScrolling=!0,f?.(g,S)),e.isPanScrolling&&(m?.(g,S),e.panScrollTimeout=setTimeout(()=>{p?.(g,S),e.isPanScrolling=!1},150))}}function g6({noWheelClassName:e,preventScrolling:r,d3ZoomHandler:o}){return function(s,i){const c=s.type==="wheel",d=!r&&c&&!s.ctrlKey,f=Ta(s,e);if(s.ctrlKey&&c&&f&&s.preventDefault(),d||f)return null;s.preventDefault(),o.call(this,s,i)}}function x6({zoomPanValues:e,onDraggingChange:r,onPanZoomStart:o}){return s=>{if(s.sourceEvent?.internal)return;const i=$u(s.transform);e.mouseButton=s.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=i,s.sourceEvent?.type==="mousedown"&&r(!0),o&&o?.(s.sourceEvent,i)}}function y6({zoomPanValues:e,panOnDrag:r,onPaneContextMenu:o,onTransformChange:s,onPanZoom:i}){return c=>{e.usedRightMouseButton=!!(o&&E2(r,e.mouseButton??0)),c.sourceEvent?.sync||s([c.transform.x,c.transform.y,c.transform.k]),i&&!c.sourceEvent?.internal&&i?.(c.sourceEvent,$u(c.transform))}}function v6({zoomPanValues:e,panOnDrag:r,panOnScroll:o,onDraggingChange:s,onPanZoomEnd:i,onPaneContextMenu:c}){return d=>{if(!d.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,c&&E2(r,e.mouseButton??0)&&!e.usedRightMouseButton&&d.sourceEvent&&c(d.sourceEvent),e.usedRightMouseButton=!1,s(!1),i&&h6(e.prevViewport,d.transform))){const f=$u(d.transform);e.prevViewport=f,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i?.(d.sourceEvent,f)},o?150:0)}}}function b6({zoomActivationKeyPressed:e,zoomOnScroll:r,zoomOnPinch:o,panOnDrag:s,panOnScroll:i,zoomOnDoubleClick:c,userSelectionActive:d,noWheelClassName:f,noPanClassName:m,lib:p}){return g=>{const v=e||r,y=o&&g.ctrlKey;if(g.button===1&&g.type==="mousedown"&&(Ta(g,`${p}-flow__node`)||Ta(g,`${p}-flow__edge`)))return!0;if(!s&&!v&&!i&&!c&&!o||d||Ta(g,f)&&g.type==="wheel"||Ta(g,m)&&(g.type!=="wheel"||i&&g.type==="wheel"&&!e)||!o&&g.ctrlKey&&g.type==="wheel")return!1;if(!o&&g.type==="touchstart"&&g.touches?.length>1)return g.preventDefault(),!1;if(!v&&!i&&!y&&g.type==="wheel"||!s&&(g.type==="mousedown"||g.type==="touchstart")||Array.isArray(s)&&!s.includes(g.button)&&g.type==="mousedown")return!1;const b=Array.isArray(s)&&s.includes(g.button)||!g.button||g.button<=1;return(!g.ctrlKey||g.type==="wheel")&&b}}function w6({domNode:e,minZoom:r,maxZoom:o,paneClickDistance:s,translateExtent:i,viewport:c,onPanZoom:d,onPanZoomStart:f,onPanZoomEnd:m,onDraggingChange:p}){const g={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{x:0,y:0,zoom:0},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},v=e.getBoundingClientRect(),y=WS().clickDistance(!yn(s)||s<0?0:s).scaleExtent([r,o]).translateExtent(i),b=Ft(e).call(y);E({x:c.x,y:c.y,zoom:qa(c.zoom,r,o)},[[0,0],[v.width,v.height]],i);const N=b.on("wheel.zoom"),S=b.on("dblclick.zoom");y.wheelDelta(_2);function C(Y,ee){return b?new Promise(O=>{y?.interpolate(ee?.interpolate==="linear"?xi:Uc).transform(Oh(b,ee?.duration,ee?.ease,()=>O(!0)),Y)}):Promise.resolve(!1)}function j({noWheelClassName:Y,noPanClassName:ee,onPaneContextMenu:O,userSelectionActive:P,panOnScroll:T,panOnDrag:z,panOnScrollMode:H,panOnScrollSpeed:V,preventScrolling:M,zoomOnPinch:I,zoomOnScroll:W,zoomOnDoubleClick:K,zoomActivationKeyPressed:ne,lib:fe,onTransformChange:ue}){P&&!g.isZoomingOrPanning&&R();const Q=T&&!ne&&!P?p6({zoomPanValues:g,noWheelClassName:Y,d3Selection:b,d3Zoom:y,panOnScrollMode:H,panOnScrollSpeed:V,zoomOnPinch:I,onPanZoomStart:f,onPanZoom:d,onPanZoomEnd:m}):g6({noWheelClassName:Y,preventScrolling:M,d3ZoomHandler:N});if(b.on("wheel.zoom",Q,{passive:!1}),!P){const me=x6({zoomPanValues:g,onDraggingChange:p,onPanZoomStart:f});y.on("start",me);const pe=y6({zoomPanValues:g,panOnDrag:z,onPaneContextMenu:!!O,onPanZoom:d,onTransformChange:ue});y.on("zoom",pe);const de=v6({zoomPanValues:g,panOnDrag:z,panOnScroll:T,onPaneContextMenu:O,onPanZoomEnd:m,onDraggingChange:p});y.on("end",de)}const se=b6({zoomActivationKeyPressed:ne,panOnDrag:z,zoomOnScroll:W,panOnScroll:T,zoomOnDoubleClick:K,zoomOnPinch:I,userSelectionActive:P,noPanClassName:ee,noWheelClassName:Y,lib:fe});y.filter(se),K?b.on("dblclick.zoom",S):b.on("dblclick.zoom",null)}function R(){y.on("zoom",null)}async function E(Y,ee,O){const P=Dh(Y),T=y?.constrain()(P,ee,O);return T&&await C(T),new Promise(z=>z(T))}async function A(Y,ee){const O=Dh(Y);return await C(O,ee),new Promise(P=>P(O))}function D(Y){if(b){const ee=Dh(Y),O=b.property("__zoom");(O.k!==Y.zoom||O.x!==Y.x||O.y!==Y.y)&&y?.transform(b,ee,null,{sync:!0})}}function L(){const Y=b?QS(b.node()):{x:0,y:0,k:1};return{x:Y.x,y:Y.y,zoom:Y.k}}function B(Y,ee){return b?new Promise(O=>{y?.interpolate(ee?.interpolate==="linear"?xi:Uc).scaleTo(Oh(b,ee?.duration,ee?.ease,()=>O(!0)),Y)}):Promise.resolve(!1)}function U(Y,ee){return b?new Promise(O=>{y?.interpolate(ee?.interpolate==="linear"?xi:Uc).scaleBy(Oh(b,ee?.duration,ee?.ease,()=>O(!0)),Y)}):Promise.resolve(!1)}function G(Y){y?.scaleExtent(Y)}function re(Y){y?.translateExtent(Y)}function Z(Y){const ee=!yn(Y)||Y<0?0:Y;y?.clickDistance(ee)}return{update:j,destroy:R,setViewport:A,setViewportConstrained:E,getViewport:L,scaleTo:B,scaleBy:U,setScaleExtent:G,setTranslateExtent:re,syncViewport:D,setClickDistance:Z}}var Fa;(function(e){e.Line="line",e.Handle="handle"})(Fa||(Fa={}));function S6({width:e,prevWidth:r,height:o,prevHeight:s,affectsX:i,affectsY:c}){const d=e-r,f=o-s,m=[d>0?1:d<0?-1:0,f>0?1:f<0?-1:0];return d&&i&&(m[0]=m[0]*-1),f&&c&&(m[1]=m[1]*-1),m}function N6(e){const r=e.includes("right")||e.includes("left"),o=e.includes("bottom")||e.includes("top"),s=e.includes("left"),i=e.includes("top");return{isHorizontal:r,isVertical:o,affectsX:s,affectsY:i}}function qr(e,r){return Math.max(0,r-e)}function Gr(e,r){return Math.max(0,e-r)}function Mc(e,r,o){return Math.max(0,r-e,e-o)}function Tv(e,r){return e?!r:r}function E6(e,r,o,s,i,c,d,f){let{affectsX:m,affectsY:p}=r;const{isHorizontal:g,isVertical:v}=r,y=g&&v,{xSnapped:b,ySnapped:N}=o,{minWidth:S,maxWidth:C,minHeight:j,maxHeight:R}=s,{x:E,y:A,width:D,height:L,aspectRatio:B}=e;let U=Math.floor(g?b-e.pointerX:0),G=Math.floor(v?N-e.pointerY:0);const re=D+(m?-U:U),Z=L+(p?-G:G),Y=-c[0]*D,ee=-c[1]*L;let O=Mc(re,S,C),P=Mc(Z,j,R);if(d){let H=0,V=0;m&&U<0?H=qr(E+U+Y,d[0][0]):!m&&U>0&&(H=Gr(E+re+Y,d[1][0])),p&&G<0?V=qr(A+G+ee,d[0][1]):!p&&G>0&&(V=Gr(A+Z+ee,d[1][1])),O=Math.max(O,H),P=Math.max(P,V)}if(f){let H=0,V=0;m&&U>0?H=Gr(E+U,f[0][0]):!m&&U<0&&(H=qr(E+re,f[1][0])),p&&G>0?V=Gr(A+G,f[0][1]):!p&&G<0&&(V=qr(A+Z,f[1][1])),O=Math.max(O,H),P=Math.max(P,V)}if(i){if(g){const H=Mc(re/B,j,R)*B;if(O=Math.max(O,H),d){let V=0;!m&&!p||m&&!p&&y?V=Gr(A+ee+re/B,d[1][1])*B:V=qr(A+ee+(m?U:-U)/B,d[0][1])*B,O=Math.max(O,V)}if(f){let V=0;!m&&!p||m&&!p&&y?V=qr(A+re/B,f[1][1])*B:V=Gr(A+(m?U:-U)/B,f[0][1])*B,O=Math.max(O,V)}}if(v){const H=Mc(Z*B,S,C)/B;if(P=Math.max(P,H),d){let V=0;!m&&!p||p&&!m&&y?V=Gr(E+Z*B+Y,d[1][0])/B:V=qr(E+(p?G:-G)*B+Y,d[0][0])/B,P=Math.max(P,V)}if(f){let V=0;!m&&!p||p&&!m&&y?V=qr(E+Z*B,f[1][0])/B:V=Gr(E+(p?G:-G)*B,f[0][0])/B,P=Math.max(P,V)}}}G=G+(G<0?P:-P),U=U+(U<0?O:-O),i&&(y?re>Z*B?G=(Tv(m,p)?-U:U)/B:U=(Tv(m,p)?-G:G)*B:g?(G=U/B,p=m):(U=G*B,m=p));const T=m?E+U:E,z=p?A+G:A;return{width:D+(m?-U:U),height:L+(p?-G:G),x:c[0]*U*(m?-1:1)+T,y:c[1]*G*(p?-1:1)+z}}const C2={width:0,height:0,x:0,y:0},_6={...C2,pointerX:0,pointerY:0,aspectRatio:1};function C6(e){return[[0,0],[e.measured.width,e.measured.height]]}function j6(e,r,o){const s=r.position.x+e.position.x,i=r.position.y+e.position.y,c=e.measured.width??0,d=e.measured.height??0,f=o[0]*c,m=o[1]*d;return[[s-f,i-m],[s+c-f,i+d-m]]}function A6({domNode:e,nodeId:r,getStoreItems:o,onChange:s,onEnd:i}){const c=Ft(e);function d({controlPosition:m,boundaries:p,keepAspectRatio:g,resizeDirection:v,onResizeStart:y,onResize:b,onResizeEnd:N,shouldResize:S}){let C={...C2},j={..._6};const R=N6(m);let E,A=null,D=[],L,B,U;const G=HS().on("start",re=>{const{nodeLookup:Z,transform:Y,snapGrid:ee,snapToGrid:O,nodeOrigin:P,paneDomNode:T}=o();if(E=Z.get(r),!E)return;A=T?.getBoundingClientRect()??null;const{xSnapped:z,ySnapped:H}=yi(re.sourceEvent,{transform:Y,snapGrid:ee,snapToGrid:O,containerBounds:A});C={width:E.measured.width??0,height:E.measured.height??0,x:E.position.x??0,y:E.position.y??0},j={...C,pointerX:z,pointerY:H,aspectRatio:C.width/C.height},L=void 0,E.parentId&&(E.extent==="parent"||E.expandParent)&&(L=Z.get(E.parentId),B=L&&E.extent==="parent"?C6(L):void 0),D=[],U=void 0;for(const[V,M]of Z)if(M.parentId===r&&(D.push({id:V,position:{...M.position},extent:M.extent}),M.extent==="parent"||M.expandParent)){const I=j6(M,E,M.origin??P);U?U=[[Math.min(I[0][0],U[0][0]),Math.min(I[0][1],U[0][1])],[Math.max(I[1][0],U[1][0]),Math.max(I[1][1],U[1][1])]]:U=I}y?.(re,{...C})}).on("drag",re=>{const{transform:Z,snapGrid:Y,snapToGrid:ee,nodeOrigin:O}=o(),P=yi(re.sourceEvent,{transform:Z,snapGrid:Y,snapToGrid:ee,containerBounds:A}),T=[];if(!E)return;const{x:z,y:H,width:V,height:M}=C,I={},W=E.origin??O,{width:K,height:ne,x:fe,y:ue}=E6(j,R,P,p,g,W,B,U),q=K!==V,Q=ne!==M,se=fe!==z&&q,me=ue!==H&&Q;if(!se&&!me&&!q&&!Q)return;if((se||me||W[0]===1||W[1]===1)&&(I.x=se?fe:C.x,I.y=me?ue:C.y,C.x=I.x,C.y=I.y,D.length>0)){const ge=fe-z,Te=ue-H;for(const Ae of D)Ae.position={x:Ae.position.x-ge+W[0]*(K-V),y:Ae.position.y-Te+W[1]*(ne-M)},T.push(Ae)}if((q||Q)&&(I.width=q&&(!v||v==="horizontal")?K:C.width,I.height=Q&&(!v||v==="vertical")?ne:C.height,C.width=I.width,C.height=I.height),L&&E.expandParent){const ge=W[0]*(I.width??0);I.x&&I.x<ge&&(C.x=ge,j.x=j.x-(I.x-ge));const Te=W[1]*(I.height??0);I.y&&I.y<Te&&(C.y=Te,j.y=j.y-(I.y-Te))}const pe=S6({width:C.width,prevWidth:V,height:C.height,prevHeight:M,affectsX:R.affectsX,affectsY:R.affectsY}),de={...C,direction:pe};S?.(re,de)!==!1&&(b?.(re,de),s(I,T))}).on("end",re=>{N?.(re,{...C}),i?.({...C})});c.call(G)}function f(){c.on(".drag",null)}return{update:d,destroy:f}}var zh={exports:{}},Lh={},Hh={exports:{}},Bh={};/**
|
|
381
|
+
* @license React
|
|
382
|
+
* use-sync-external-store-shim.production.js
|
|
383
|
+
*
|
|
384
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
385
|
+
*
|
|
386
|
+
* This source code is licensed under the MIT license found in the
|
|
387
|
+
* LICENSE file in the root directory of this source tree.
|
|
388
|
+
*/var kv;function M6(){if(kv)return Bh;kv=1;var e=zi();function r(v,y){return v===y&&(v!==0||1/v===1/y)||v!==v&&y!==y}var o=typeof Object.is=="function"?Object.is:r,s=e.useState,i=e.useEffect,c=e.useLayoutEffect,d=e.useDebugValue;function f(v,y){var b=y(),N=s({inst:{value:b,getSnapshot:y}}),S=N[0].inst,C=N[1];return c(function(){S.value=b,S.getSnapshot=y,m(S)&&C({inst:S})},[v,b,y]),i(function(){return m(S)&&C({inst:S}),v(function(){m(S)&&C({inst:S})})},[v]),d(b),b}function m(v){var y=v.getSnapshot;v=v.value;try{var b=y();return!o(v,b)}catch{return!0}}function p(v,y){return y()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:f;return Bh.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:g,Bh}var Rv;function T6(){return Rv||(Rv=1,Hh.exports=M6()),Hh.exports}/**
|
|
389
|
+
* @license React
|
|
390
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
391
|
+
*
|
|
392
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
393
|
+
*
|
|
394
|
+
* This source code is licensed under the MIT license found in the
|
|
395
|
+
* LICENSE file in the root directory of this source tree.
|
|
396
|
+
*/var Dv;function k6(){if(Dv)return Lh;Dv=1;var e=zi(),r=T6();function o(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}var s=typeof Object.is=="function"?Object.is:o,i=r.useSyncExternalStore,c=e.useRef,d=e.useEffect,f=e.useMemo,m=e.useDebugValue;return Lh.useSyncExternalStoreWithSelector=function(p,g,v,y,b){var N=c(null);if(N.current===null){var S={hasValue:!1,value:null};N.current=S}else S=N.current;N=f(function(){function j(L){if(!R){if(R=!0,E=L,L=y(L),b!==void 0&&S.hasValue){var B=S.value;if(b(B,L))return A=B}return A=L}if(B=A,s(E,L))return B;var U=y(L);return b!==void 0&&b(B,U)?(E=L,B):(E=L,A=U)}var R=!1,E,A,D=v===void 0?null:v;return[function(){return j(g())},D===null?void 0:function(){return j(D())}]},[g,v,y,b]);var C=i(p,N[0],N[1]);return d(function(){S.hasValue=!0,S.value=C},[C]),m(C),C},Lh}var Ov;function R6(){return Ov||(Ov=1,zh.exports=k6()),zh.exports}var D6=R6();const O6=Nm(D6),z6={},zv=e=>{let r;const o=new Set,s=(g,v)=>{const y=typeof g=="function"?g(r):g;if(!Object.is(y,r)){const b=r;r=v??(typeof y!="object"||y===null)?y:Object.assign({},r,y),o.forEach(N=>N(r,b))}},i=()=>r,m={setState:s,getState:i,getInitialState:()=>p,subscribe:g=>(o.add(g),()=>o.delete(g)),destroy:()=>{(z6?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),o.clear()}},p=r=e(s,i,m);return m},L6=e=>e?zv(e):zv,{useDebugValue:H6}=cr,{useSyncExternalStoreWithSelector:B6}=O6,I6=e=>e;function j2(e,r=I6,o){const s=B6(e.subscribe,e.getState,e.getServerState||e.getInitialState,r,o);return H6(s),s}const Lv=(e,r)=>{const o=L6(e),s=(i,c=r)=>j2(o,i,c);return Object.assign(s,o),s},U6=(e,r)=>e?Lv(e,r):Lv;function et(e,r){if(Object.is(e,r))return!0;if(typeof e!="object"||e===null||typeof r!="object"||r===null)return!1;if(e instanceof Map&&r instanceof Map){if(e.size!==r.size)return!1;for(const[s,i]of e)if(!Object.is(i,r.get(s)))return!1;return!0}if(e instanceof Set&&r instanceof Set){if(e.size!==r.size)return!1;for(const s of e)if(!r.has(s))return!1;return!0}const o=Object.keys(e);if(o.length!==Object.keys(r).length)return!1;for(const s of o)if(!Object.prototype.hasOwnProperty.call(r,s)||!Object.is(e[s],r[s]))return!1;return!0}const Vu=w.createContext(null),P6=Vu.Provider,A2=Hn.error001();function Ie(e,r){const o=w.useContext(Vu);if(o===null)throw new Error(A2);return j2(o,e,r)}function We(){const e=w.useContext(Vu);if(e===null)throw new Error(A2);return w.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const Hv={display:"none"},$6={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},M2="react-flow__node-desc",T2="react-flow__edge-desc",V6="react-flow__aria-live",Y6=e=>e.ariaLiveMessage,q6=e=>e.ariaLabelConfig;function G6({rfId:e}){const r=Ie(Y6);return u.jsx("div",{id:`${V6}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:$6,children:r})}function X6({rfId:e,disableKeyboardA11y:r}){const o=Ie(q6);return u.jsxs(u.Fragment,{children:[u.jsx("div",{id:`${M2}-${e}`,style:Hv,children:r?o["node.a11yDescription.default"]:o["node.a11yDescription.keyboardDisabled"]}),u.jsx("div",{id:`${T2}-${e}`,style:Hv,children:o["edge.a11yDescription.default"]}),!r&&u.jsx(G6,{rfId:e})]})}const Yu=w.forwardRef(({position:e="top-left",children:r,className:o,style:s,...i},c)=>{const d=`${e}`.split("-");return u.jsx("div",{className:lt(["react-flow__panel",o,...d]),style:s,ref:c,...i,children:r})});Yu.displayName="Panel";function F6({proOptions:e,position:r="bottom-right"}){return e?.hideAttribution?null:u.jsx(Yu,{position:r,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:u.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const Z6=e=>{const r=[],o=[];for(const[,s]of e.nodeLookup)s.selected&&r.push(s.internals.userNode);for(const[,s]of e.edgeLookup)s.selected&&o.push(s);return{selectedNodes:r,selectedEdges:o}},Tc=e=>e.id;function K6(e,r){return et(e.selectedNodes.map(Tc),r.selectedNodes.map(Tc))&&et(e.selectedEdges.map(Tc),r.selectedEdges.map(Tc))}function Q6({onSelectionChange:e}){const r=We(),{selectedNodes:o,selectedEdges:s}=Ie(Z6,K6);return w.useEffect(()=>{const i={nodes:o,edges:s};e?.(i),r.getState().onSelectionChangeHandlers.forEach(c=>c(i))},[o,s,e]),null}const W6=e=>!!e.onSelectionChangeHandlers;function J6({onSelectionChange:e}){const r=Ie(W6);return e||r?u.jsx(Q6,{onSelectionChange:e}):null}const k2=[0,0],ez={x:0,y:0,zoom:1},tz=["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","paneClickDistance","ariaLabelConfig"],Bv=[...tz,"rfId"],nz=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,setPaneClickDistance:e.setPaneClickDistance}),Iv={translateExtent:Mi,nodeOrigin:k2,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1",paneClickDistance:0};function rz(e){const{setNodes:r,setEdges:o,setMinZoom:s,setMaxZoom:i,setTranslateExtent:c,setNodeExtent:d,reset:f,setDefaultNodesAndEdges:m,setPaneClickDistance:p}=Ie(nz,et),g=We();w.useEffect(()=>(m(e.defaultNodes,e.defaultEdges),()=>{v.current=Iv,f()}),[]);const v=w.useRef(Iv);return w.useEffect(()=>{for(const y of Bv){const b=e[y],N=v.current[y];b!==N&&(typeof e[y]>"u"||(y==="nodes"?r(b):y==="edges"?o(b):y==="minZoom"?s(b):y==="maxZoom"?i(b):y==="translateExtent"?c(b):y==="nodeExtent"?d(b):y==="paneClickDistance"?p(b):y==="ariaLabelConfig"?g.setState({ariaLabelConfig:U5(b)}):y==="fitView"?g.setState({fitViewQueued:b}):y==="fitViewOptions"?g.setState({fitViewOptions:b}):g.setState({[y]:b})))}v.current=e},Bv.map(y=>e[y])),null}function Uv(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function oz(e){const[r,o]=w.useState(e==="system"?null:e);return w.useEffect(()=>{if(e!=="system"){o(e);return}const s=Uv(),i=()=>o(s?.matches?"dark":"light");return i(),s?.addEventListener("change",i),()=>{s?.removeEventListener("change",i)}},[e]),r!==null?r:Uv()?.matches?"dark":"light"}const Pv=typeof document<"u"?document:null;function Oi(e=null,r={target:Pv,actInsideInputWithModifier:!0}){const[o,s]=w.useState(!1),i=w.useRef(!1),c=w.useRef(new Set([])),[d,f]=w.useMemo(()=>{if(e!==null){const p=(Array.isArray(e)?e:[e]).filter(v=>typeof v=="string").map(v=>v.replace("+",`
|
|
397
|
+
`).replace(`
|
|
398
|
+
|
|
399
|
+
`,`
|
|
400
|
+
+`).split(`
|
|
401
|
+
`)),g=p.reduce((v,y)=>v.concat(...y),[]);return[p,g]}return[[],[]]},[e]);return w.useEffect(()=>{const m=r?.target??Pv,p=r?.actInsideInputWithModifier??!0;if(e!==null){const g=b=>{if(i.current=b.ctrlKey||b.metaKey||b.shiftKey||b.altKey,(!i.current||i.current&&!p)&&d2(b))return!1;const S=Vv(b.code,f);if(c.current.add(b[S]),$v(d,c.current,!1)){const C=b.composedPath?.()?.[0]||b.target,j=C?.nodeName==="BUTTON"||C?.nodeName==="A";r.preventDefault!==!1&&(i.current||!j)&&b.preventDefault(),s(!0)}},v=b=>{const N=Vv(b.code,f);$v(d,c.current,!0)?(s(!1),c.current.clear()):c.current.delete(b[N]),b.key==="Meta"&&c.current.clear(),i.current=!1},y=()=>{c.current.clear(),s(!1)};return m?.addEventListener("keydown",g),m?.addEventListener("keyup",v),window.addEventListener("blur",y),window.addEventListener("contextmenu",y),()=>{m?.removeEventListener("keydown",g),m?.removeEventListener("keyup",v),window.removeEventListener("blur",y),window.removeEventListener("contextmenu",y)}}},[e,s]),o}function $v(e,r,o){return e.filter(s=>o||s.length===r.size).some(s=>s.every(i=>r.has(i)))}function Vv(e,r){return r.includes(e)?"code":"key"}const az=()=>{const e=We();return w.useMemo(()=>({zoomIn:r=>{const{panZoom:o}=e.getState();return o?o.scaleBy(1.2,{duration:r?.duration}):Promise.resolve(!1)},zoomOut:r=>{const{panZoom:o}=e.getState();return o?o.scaleBy(1/1.2,{duration:r?.duration}):Promise.resolve(!1)},zoomTo:(r,o)=>{const{panZoom:s}=e.getState();return s?s.scaleTo(r,{duration:o?.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(r,o)=>{const{transform:[s,i,c],panZoom:d}=e.getState();return d?(await d.setViewport({x:r.x??s,y:r.y??i,zoom:r.zoom??c},o),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[r,o,s]=e.getState().transform;return{x:r,y:o,zoom:s}},setCenter:async(r,o,s)=>e.getState().setCenter(r,o,s),fitBounds:async(r,o)=>{const{width:s,height:i,minZoom:c,maxZoom:d,panZoom:f}=e.getState(),m=Sp(r,s,i,c,d,o?.padding??.1);return f?(await f.setViewport(m,{duration:o?.duration,ease:o?.ease,interpolate:o?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(r,o={})=>{const{transform:s,snapGrid:i,snapToGrid:c,domNode:d}=e.getState();if(!d)return r;const{x:f,y:m}=d.getBoundingClientRect(),p={x:r.x-f,y:r.y-m},g=o.snapGrid??i,v=o.snapToGrid??c;return Fi(p,s,v,g)},flowToScreenPosition:r=>{const{transform:o,domNode:s}=e.getState();if(!s)return r;const{x:i,y:c}=s.getBoundingClientRect(),d=hu(r,o);return{x:d.x+i,y:d.y+c}}}),[])};function R2(e,r){const o=[],s=new Map,i=[];for(const c of e)if(c.type==="add"){i.push(c);continue}else if(c.type==="remove"||c.type==="replace")s.set(c.id,[c]);else{const d=s.get(c.id);d?d.push(c):s.set(c.id,[c])}for(const c of r){const d=s.get(c.id);if(!d){o.push(c);continue}if(d[0].type==="remove")continue;if(d[0].type==="replace"){o.push({...d[0].item});continue}const f={...c};for(const m of d)sz(m,f);o.push(f)}return i.length&&i.forEach(c=>{c.index!==void 0?o.splice(c.index,0,{...c.item}):o.push({...c.item})}),o}function sz(e,r){switch(e.type){case"select":{r.selected=e.selected;break}case"position":{typeof e.position<"u"&&(r.position=e.position),typeof e.dragging<"u"&&(r.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(r.measured??={},r.measured.width=e.dimensions.width,r.measured.height=e.dimensions.height,e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(r.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(r.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(r.resizing=e.resizing);break}}}function D2(e,r){return R2(e,r)}function O2(e,r){return R2(e,r)}function Co(e,r){return{id:e,type:"select",selected:r}}function ka(e,r=new Set,o=!1){const s=[];for(const[i,c]of e){const d=r.has(i);!(c.selected===void 0&&!d)&&c.selected!==d&&(o&&(c.selected=d),s.push(Co(c.id,d)))}return s}function Yv({items:e=[],lookup:r}){const o=[],s=new Map(e.map(i=>[i.id,i]));for(const[i,c]of e.entries()){const d=r.get(c.id),f=d?.internals?.userNode??d;f!==void 0&&f!==c&&o.push({id:c.id,item:c,type:"replace"}),f===void 0&&o.push({item:c,type:"add",index:i})}for(const[i]of r)s.get(i)===void 0&&o.push({id:i,type:"remove"});return o}function qv(e){return{id:e.id,type:"remove"}}const Gv=e=>T5(e),iz=e=>r2(e);function z2(e){return w.forwardRef(e)}const lz=typeof window<"u"?w.useLayoutEffect:w.useEffect;function Xv(e){const[r,o]=w.useState(BigInt(0)),[s]=w.useState(()=>cz(()=>o(i=>i+BigInt(1))));return lz(()=>{const i=s.get();i.length&&(e(i),s.reset())},[r]),s}function cz(e){let r=[];return{get:()=>r,reset:()=>{r=[]},push:o=>{r.push(o),e()}}}const L2=w.createContext(null);function uz({children:e}){const r=We(),o=w.useCallback(f=>{const{nodes:m=[],setNodes:p,hasDefaultNodes:g,onNodesChange:v,nodeLookup:y,fitViewQueued:b}=r.getState();let N=m;for(const C of f)N=typeof C=="function"?C(N):C;const S=Yv({items:N,lookup:y});g&&p(N),S.length>0?v?.(S):b&&window.requestAnimationFrame(()=>{const{fitViewQueued:C,nodes:j,setNodes:R}=r.getState();C&&R(j)})},[]),s=Xv(o),i=w.useCallback(f=>{const{edges:m=[],setEdges:p,hasDefaultEdges:g,onEdgesChange:v,edgeLookup:y}=r.getState();let b=m;for(const N of f)b=typeof N=="function"?N(b):N;g?p(b):v&&v(Yv({items:b,lookup:y}))},[]),c=Xv(i),d=w.useMemo(()=>({nodeQueue:s,edgeQueue:c}),[]);return u.jsx(L2.Provider,{value:d,children:e})}function dz(){const e=w.useContext(L2);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const fz=e=>!!e.panZoom;function Zi(){const e=az(),r=We(),o=dz(),s=Ie(fz),i=w.useMemo(()=>{const c=v=>r.getState().nodeLookup.get(v),d=v=>{o.nodeQueue.push(v)},f=v=>{o.edgeQueue.push(v)},m=v=>{const{nodeLookup:y,nodeOrigin:b}=r.getState(),N=Gv(v)?v:y.get(v.id),S=N.parentId?c2(N.position,N.measured,N.parentId,y,b):N.position,C={...N,position:S,width:N.measured?.width??N.width,height:N.measured?.height??N.height};return Ga(C)},p=(v,y,b={replace:!1})=>{d(N=>N.map(S=>{if(S.id===v){const C=typeof y=="function"?y(S):y;return b.replace&&Gv(C)?C:{...S,...C}}return S}))},g=(v,y,b={replace:!1})=>{f(N=>N.map(S=>{if(S.id===v){const C=typeof y=="function"?y(S):y;return b.replace&&iz(C)?C:{...S,...C}}return S}))};return{getNodes:()=>r.getState().nodes.map(v=>({...v})),getNode:v=>c(v)?.internals.userNode,getInternalNode:c,getEdges:()=>{const{edges:v=[]}=r.getState();return v.map(y=>({...y}))},getEdge:v=>r.getState().edgeLookup.get(v),setNodes:d,setEdges:f,addNodes:v=>{const y=Array.isArray(v)?v:[v];o.nodeQueue.push(b=>[...b,...y])},addEdges:v=>{const y=Array.isArray(v)?v:[v];o.edgeQueue.push(b=>[...b,...y])},toObject:()=>{const{nodes:v=[],edges:y=[],transform:b}=r.getState(),[N,S,C]=b;return{nodes:v.map(j=>({...j})),edges:y.map(j=>({...j})),viewport:{x:N,y:S,zoom:C}}},deleteElements:async({nodes:v=[],edges:y=[]})=>{const{nodes:b,edges:N,onNodesDelete:S,onEdgesDelete:C,triggerNodeChanges:j,triggerEdgeChanges:R,onDelete:E,onBeforeDelete:A}=r.getState(),{nodes:D,edges:L}=await z5({nodesToRemove:v,edgesToRemove:y,nodes:b,edges:N,onBeforeDelete:A}),B=L.length>0,U=D.length>0;if(B){const G=L.map(qv);C?.(L),R(G)}if(U){const G=D.map(qv);S?.(D),j(G)}return(U||B)&&E?.({nodes:D,edges:L}),{deletedNodes:D,deletedEdges:L}},getIntersectingNodes:(v,y=!0,b)=>{const N=vv(v),S=N?v:m(v),C=b!==void 0;return S?(b||r.getState().nodes).filter(j=>{const R=r.getState().nodeLookup.get(j.id);if(R&&!N&&(j.id===v.id||!R.internals.positionAbsolute))return!1;const E=Ga(C?j:R),A=ki(E,S);return y&&A>0||A>=E.width*E.height||A>=S.width*S.height}):[]},isNodeIntersecting:(v,y,b=!0)=>{const S=vv(v)?v:m(v);if(!S)return!1;const C=ki(S,y);return b&&C>0||C>=S.width*S.height},updateNode:p,updateNodeData:(v,y,b={replace:!1})=>{p(v,N=>{const S=typeof y=="function"?y(N):y;return b.replace?{...N,data:S}:{...N,data:{...N.data,...S}}},b)},updateEdge:g,updateEdgeData:(v,y,b={replace:!1})=>{g(v,N=>{const S=typeof y=="function"?y(N):y;return b.replace?{...N,data:S}:{...N,data:{...N.data,...S}}},b)},getNodesBounds:v=>{const{nodeLookup:y,nodeOrigin:b}=r.getState();return k5(v,{nodeLookup:y,nodeOrigin:b})},getHandleConnections:({type:v,id:y,nodeId:b})=>Array.from(r.getState().connectionLookup.get(`${b}-${v}${y?`-${y}`:""}`)?.values()??[]),getNodeConnections:({type:v,handleId:y,nodeId:b})=>Array.from(r.getState().connectionLookup.get(`${b}${v?y?`-${v}-${y}`:`-${v}`:""}`)?.values()??[]),fitView:async v=>{const y=r.getState().fitViewResolver??I5();return r.setState({fitViewQueued:!0,fitViewOptions:v,fitViewResolver:y}),o.nodeQueue.push(b=>[...b]),y.promise}}},[]);return w.useMemo(()=>({...i,...e,viewportInitialized:s}),[s])}const Fv=e=>e.selected,hz=typeof window<"u"?window:void 0;function mz({deleteKeyCode:e,multiSelectionKeyCode:r}){const o=We(),{deleteElements:s}=Zi(),i=Oi(e,{actInsideInputWithModifier:!1}),c=Oi(r,{target:hz});w.useEffect(()=>{if(i){const{edges:d,nodes:f}=o.getState();s({nodes:f.filter(Fv),edges:d.filter(Fv)}),o.setState({nodesSelectionActive:!1})}},[i]),w.useEffect(()=>{o.setState({multiSelectionActive:c})},[c])}function pz(e){const r=We();w.useEffect(()=>{const o=()=>{if(!e.current)return!1;const s=Np(e.current);(s.height===0||s.width===0)&&r.getState().onError?.("004",Hn.error004()),r.setState({width:s.width||500,height:s.height||500})};if(e.current){o(),window.addEventListener("resize",o);const s=new ResizeObserver(()=>o());return s.observe(e.current),()=>{window.removeEventListener("resize",o),s&&e.current&&s.unobserve(e.current)}}},[])}const qu={position:"absolute",width:"100%",height:"100%",top:0,left:0},gz=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib});function xz({onPaneContextMenu:e,zoomOnScroll:r=!0,zoomOnPinch:o=!0,panOnScroll:s=!1,panOnScrollSpeed:i=.5,panOnScrollMode:c=Mo.Free,zoomOnDoubleClick:d=!0,panOnDrag:f=!0,defaultViewport:m,translateExtent:p,minZoom:g,maxZoom:v,zoomActivationKeyCode:y,preventScrolling:b=!0,children:N,noWheelClassName:S,noPanClassName:C,onViewportChange:j,isControlledViewport:R,paneClickDistance:E}){const A=We(),D=w.useRef(null),{userSelectionActive:L,lib:B}=Ie(gz,et),U=Oi(y),G=w.useRef();pz(D);const re=w.useCallback(Z=>{j?.({x:Z[0],y:Z[1],zoom:Z[2]}),R||A.setState({transform:Z})},[j,R]);return w.useEffect(()=>{if(D.current){G.current=w6({domNode:D.current,minZoom:g,maxZoom:v,translateExtent:p,viewport:m,paneClickDistance:E,onDraggingChange:O=>A.setState({paneDragging:O}),onPanZoomStart:(O,P)=>{const{onViewportChangeStart:T,onMoveStart:z}=A.getState();z?.(O,P),T?.(P)},onPanZoom:(O,P)=>{const{onViewportChange:T,onMove:z}=A.getState();z?.(O,P),T?.(P)},onPanZoomEnd:(O,P)=>{const{onViewportChangeEnd:T,onMoveEnd:z}=A.getState();z?.(O,P),T?.(P)}});const{x:Z,y:Y,zoom:ee}=G.current.getViewport();return A.setState({panZoom:G.current,transform:[Z,Y,ee],domNode:D.current.closest(".react-flow")}),()=>{G.current?.destroy()}}},[]),w.useEffect(()=>{G.current?.update({onPaneContextMenu:e,zoomOnScroll:r,zoomOnPinch:o,panOnScroll:s,panOnScrollSpeed:i,panOnScrollMode:c,zoomOnDoubleClick:d,panOnDrag:f,zoomActivationKeyPressed:U,preventScrolling:b,noPanClassName:C,userSelectionActive:L,noWheelClassName:S,lib:B,onTransformChange:re})},[e,r,o,s,i,c,d,f,U,b,C,L,S,B,re]),u.jsx("div",{className:"react-flow__renderer",ref:D,style:qu,children:N})}const yz=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function vz(){const{userSelectionActive:e,userSelectionRect:r}=Ie(yz,et);return e&&r?u.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:r.width,height:r.height,transform:`translate(${r.x}px, ${r.y}px)`}}):null}const Ih=(e,r)=>o=>{o.target===r.current&&e?.(o)},bz=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function wz({isSelecting:e,selectionKeyPressed:r,selectionMode:o=Ti.Full,panOnDrag:s,selectionOnDrag:i,onSelectionStart:c,onSelectionEnd:d,onPaneClick:f,onPaneContextMenu:m,onPaneScroll:p,onPaneMouseEnter:g,onPaneMouseMove:v,onPaneMouseLeave:y,children:b}){const N=We(),{userSelectionActive:S,elementsSelectable:C,dragging:j,connectionInProgress:R}=Ie(bz,et),E=C&&(e||S),A=w.useRef(null),D=w.useRef(),L=w.useRef(new Set),B=w.useRef(new Set),U=w.useRef(!1),G=w.useRef(!1),re=z=>{if(U.current||R){U.current=!1;return}f?.(z),N.getState().resetSelectedElements(),N.setState({nodesSelectionActive:!1})},Z=z=>{if(Array.isArray(s)&&s?.includes(2)){z.preventDefault();return}m?.(z)},Y=p?z=>p(z):void 0,ee=z=>{const{resetSelectedElements:H,domNode:V}=N.getState();if(D.current=V?.getBoundingClientRect(),!C||!e||z.button!==0||z.target!==A.current||!D.current)return;z.target?.setPointerCapture?.(z.pointerId),G.current=!0,U.current=!1;const{x:M,y:I}=Dn(z.nativeEvent,D.current);H(),N.setState({userSelectionRect:{width:0,height:0,startX:M,startY:I,x:M,y:I}}),c?.(z)},O=z=>{const{userSelectionRect:H,transform:V,nodeLookup:M,edgeLookup:I,connectionLookup:W,triggerNodeChanges:K,triggerEdgeChanges:ne,defaultEdgeOptions:fe}=N.getState();if(!D.current||!H)return;U.current=!0;const{x:ue,y:q}=Dn(z.nativeEvent,D.current),{startX:Q,startY:se}=H,me={startX:Q,startY:se,x:ue<Q?ue:Q,y:q<se?q:se,width:Math.abs(ue-Q),height:Math.abs(q-se)},pe=L.current,de=B.current;L.current=new Set(wp(M,me,V,o===Ti.Partial,!0).map(ge=>ge.id)),B.current=new Set;const he=fe?.selectable??!0;for(const ge of L.current){const Te=W.get(ge);if(Te)for(const{edgeId:Ae}of Te.values()){const Ne=I.get(Ae);Ne&&(Ne.selectable??he)&&B.current.add(Ae)}}if(!bv(pe,L.current)){const ge=ka(M,L.current,!0);K(ge)}if(!bv(de,B.current)){const ge=ka(I,B.current);ne(ge)}N.setState({userSelectionRect:me,userSelectionActive:!0,nodesSelectionActive:!1})},P=z=>{if(z.button!==0||!G.current)return;z.target?.releasePointerCapture?.(z.pointerId);const{userSelectionRect:H}=N.getState();!S&&H&&z.target===A.current&&re?.(z),N.setState({userSelectionActive:!1,userSelectionRect:null,nodesSelectionActive:L.current.size>0}),d?.(z),(r||i)&&(U.current=!1),G.current=!1},T=s===!0||Array.isArray(s)&&s.includes(0);return u.jsxs("div",{className:lt(["react-flow__pane",{draggable:T,dragging:j,selection:e}]),onClick:E?void 0:Ih(re,A),onContextMenu:Ih(Z,A),onWheel:Ih(Y,A),onPointerEnter:E?void 0:g,onPointerDown:E?ee:v,onPointerMove:E?O:v,onPointerUp:E?P:void 0,onPointerLeave:y,ref:A,style:qu,children:[b,u.jsx(vz,{})]})}function vm({id:e,store:r,unselect:o=!1,nodeRef:s}){const{addSelectedNodes:i,unselectNodesAndEdges:c,multiSelectionActive:d,nodeLookup:f,onError:m}=r.getState(),p=f.get(e);if(!p){m?.("012",Hn.error012(e));return}r.setState({nodesSelectionActive:!1}),p.selected?(o||p.selected&&d)&&(c({nodes:[p],edges:[]}),requestAnimationFrame(()=>s?.current?.blur())):i([e])}function H2({nodeRef:e,disabled:r=!1,noDragClassName:o,handleSelector:s,nodeId:i,isSelectable:c,nodeClickDistance:d}){const f=We(),[m,p]=w.useState(!1),g=w.useRef();return w.useEffect(()=>{g.current=s6({getStoreItems:()=>f.getState(),onNodeMouseDown:v=>{vm({id:v,store:f,nodeRef:e})},onDragStart:()=>{p(!0)},onDragStop:()=>{p(!1)}})},[]),w.useEffect(()=>{if(r)g.current?.destroy();else if(e.current)return g.current?.update({noDragClassName:o,handleSelector:s,domNode:e.current,isSelectable:c,nodeId:i,nodeClickDistance:d}),()=>{g.current?.destroy()}},[o,s,r,c,e,i]),m}const Sz=e=>r=>r.selected&&(r.draggable||e&&typeof r.draggable>"u");function B2(){const e=We();return w.useCallback(o=>{const{nodeExtent:s,snapToGrid:i,snapGrid:c,nodesDraggable:d,onError:f,updateNodePositions:m,nodeLookup:p,nodeOrigin:g}=e.getState(),v=new Map,y=Sz(d),b=i?c[0]:5,N=i?c[1]:5,S=o.direction.x*b*o.factor,C=o.direction.y*N*o.factor;for(const[,j]of p){if(!y(j))continue;let R={x:j.internals.positionAbsolute.x+S,y:j.internals.positionAbsolute.y+C};i&&(R=Xi(R,c));const{position:E,positionAbsolute:A}=o2({nodeId:j.id,nextPosition:R,nodeLookup:p,nodeExtent:s,nodeOrigin:g,onError:f});j.position=E,j.internals.positionAbsolute=A,v.set(j.id,j)}m(v)},[])}const Ap=w.createContext(null),Nz=Ap.Provider;Ap.Consumer;const I2=()=>w.useContext(Ap),Ez=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),_z=(e,r,o)=>s=>{const{connectionClickStartHandle:i,connectionMode:c,connection:d}=s,{fromHandle:f,toHandle:m,isValid:p}=d,g=m?.nodeId===e&&m?.id===r&&m?.type===o;return{connectingFrom:f?.nodeId===e&&f?.id===r&&f?.type===o,connectingTo:g,clickConnecting:i?.nodeId===e&&i?.id===r&&i?.type===o,isPossibleEndHandle:c===Ya.Strict?f?.type!==o:e!==f?.nodeId||r!==f?.id,connectionInProcess:!!f,clickConnectionInProcess:!!i,valid:g&&p}};function Cz({type:e="source",position:r=Se.Top,isValidConnection:o,isConnectable:s=!0,isConnectableStart:i=!0,isConnectableEnd:c=!0,id:d,onConnect:f,children:m,className:p,onMouseDown:g,onTouchStart:v,...y},b){const N=d||null,S=e==="target",C=We(),j=I2(),{connectOnClick:R,noPanClassName:E,rfId:A}=Ie(Ez,et),{connectingFrom:D,connectingTo:L,clickConnecting:B,isPossibleEndHandle:U,connectionInProcess:G,clickConnectionInProcess:re,valid:Z}=Ie(_z(j,N,e),et);j||C.getState().onError?.("010",Hn.error010());const Y=P=>{const{defaultEdgeOptions:T,onConnect:z,hasDefaultEdges:H}=C.getState(),V={...T,...P};if(H){const{edges:M,setEdges:I}=C.getState();I(G5(V,M))}z?.(V),f?.(V)},ee=P=>{if(!j)return;const T=f2(P.nativeEvent);if(i&&(T&&P.button===0||!T)){const z=C.getState();ym.onPointerDown(P.nativeEvent,{handleDomNode:P.currentTarget,autoPanOnConnect:z.autoPanOnConnect,connectionMode:z.connectionMode,connectionRadius:z.connectionRadius,domNode:z.domNode,nodeLookup:z.nodeLookup,lib:z.lib,isTarget:S,handleId:N,nodeId:j,flowId:z.rfId,panBy:z.panBy,cancelConnection:z.cancelConnection,onConnectStart:z.onConnectStart,onConnectEnd:z.onConnectEnd,updateConnection:z.updateConnection,onConnect:Y,isValidConnection:o||z.isValidConnection,getTransform:()=>C.getState().transform,getFromHandle:()=>C.getState().connection.fromHandle,autoPanSpeed:z.autoPanSpeed,dragThreshold:z.connectionDragThreshold})}T?g?.(P):v?.(P)},O=P=>{const{onClickConnectStart:T,onClickConnectEnd:z,connectionClickStartHandle:H,connectionMode:V,isValidConnection:M,lib:I,rfId:W,nodeLookup:K,connection:ne}=C.getState();if(!j||!H&&!i)return;if(!H){T?.(P.nativeEvent,{nodeId:j,handleId:N,handleType:e}),C.setState({connectionClickStartHandle:{nodeId:j,type:e,id:N}});return}const fe=u2(P.target),ue=o||M,{connection:q,isValid:Q}=ym.isValid(P.nativeEvent,{handle:{nodeId:j,id:N,type:e},connectionMode:V,fromNodeId:H.nodeId,fromHandleId:H.id||null,fromType:H.type,isValidConnection:ue,flowId:W,doc:fe,lib:I,nodeLookup:K});Q&&q&&Y(q);const se=structuredClone(ne);delete se.inProgress,se.toPosition=se.toHandle?se.toHandle.position:null,z?.(P,se),C.setState({connectionClickStartHandle:null})};return u.jsx("div",{"data-handleid":N,"data-nodeid":j,"data-handlepos":r,"data-id":`${A}-${j}-${N}-${e}`,className:lt(["react-flow__handle",`react-flow__handle-${r}`,"nodrag",E,p,{source:!S,target:S,connectable:s,connectablestart:i,connectableend:c,clickconnecting:B,connectingfrom:D,connectingto:L,valid:Z,connectionindicator:s&&(!G||U)&&(G||re?c:i)}]),onMouseDown:ee,onTouchStart:ee,onClick:R?O:void 0,ref:b,...y,children:m})}const Za=w.memo(z2(Cz));function jz({data:e,isConnectable:r,sourcePosition:o=Se.Bottom}){return u.jsxs(u.Fragment,{children:[e?.label,u.jsx(Za,{type:"source",position:o,isConnectable:r})]})}function Az({data:e,isConnectable:r,targetPosition:o=Se.Top,sourcePosition:s=Se.Bottom}){return u.jsxs(u.Fragment,{children:[u.jsx(Za,{type:"target",position:o,isConnectable:r}),e?.label,u.jsx(Za,{type:"source",position:s,isConnectable:r})]})}function Mz(){return null}function Tz({data:e,isConnectable:r,targetPosition:o=Se.Top}){return u.jsxs(u.Fragment,{children:[u.jsx(Za,{type:"target",position:o,isConnectable:r}),e?.label]})}const mu={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},Zv={input:jz,default:Az,output:Tz,group:Mz};function kz(e){return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??e.style?.width,height:e.height??e.initialHeight??e.style?.height}:{width:e.width??e.style?.width,height:e.height??e.style?.height}}const Rz=e=>{const{width:r,height:o,x:s,y:i}=Gi(e.nodeLookup,{filter:c=>!!c.selected});return{width:yn(r)?r:null,height:yn(o)?o:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${s}px,${i}px)`}};function Dz({onSelectionContextMenu:e,noPanClassName:r,disableKeyboardA11y:o}){const s=We(),{width:i,height:c,transformString:d,userSelectionActive:f}=Ie(Rz,et),m=B2(),p=w.useRef(null);if(w.useEffect(()=>{o||p.current?.focus({preventScroll:!0})},[o]),H2({nodeRef:p}),f||!i||!c)return null;const g=e?y=>{const b=s.getState().nodes.filter(N=>N.selected);e(y,b)}:void 0,v=y=>{Object.prototype.hasOwnProperty.call(mu,y.key)&&(y.preventDefault(),m({direction:mu[y.key],factor:y.shiftKey?4:1}))};return u.jsx("div",{className:lt(["react-flow__nodesselection","react-flow__container",r]),style:{transform:d},children:u.jsx("div",{ref:p,className:"react-flow__nodesselection-rect",onContextMenu:g,tabIndex:o?void 0:-1,onKeyDown:o?void 0:v,style:{width:i,height:c}})})}const Kv=typeof window<"u"?window:void 0,Oz=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function U2({children:e,onPaneClick:r,onPaneMouseEnter:o,onPaneMouseMove:s,onPaneMouseLeave:i,onPaneContextMenu:c,onPaneScroll:d,paneClickDistance:f,deleteKeyCode:m,selectionKeyCode:p,selectionOnDrag:g,selectionMode:v,onSelectionStart:y,onSelectionEnd:b,multiSelectionKeyCode:N,panActivationKeyCode:S,zoomActivationKeyCode:C,elementsSelectable:j,zoomOnScroll:R,zoomOnPinch:E,panOnScroll:A,panOnScrollSpeed:D,panOnScrollMode:L,zoomOnDoubleClick:B,panOnDrag:U,defaultViewport:G,translateExtent:re,minZoom:Z,maxZoom:Y,preventScrolling:ee,onSelectionContextMenu:O,noWheelClassName:P,noPanClassName:T,disableKeyboardA11y:z,onViewportChange:H,isControlledViewport:V}){const{nodesSelectionActive:M,userSelectionActive:I}=Ie(Oz),W=Oi(p,{target:Kv}),K=Oi(S,{target:Kv}),ne=K||U,fe=K||A,ue=g&&ne!==!0,q=W||I||ue;return mz({deleteKeyCode:m,multiSelectionKeyCode:N}),u.jsx(xz,{onPaneContextMenu:c,elementsSelectable:j,zoomOnScroll:R,zoomOnPinch:E,panOnScroll:fe,panOnScrollSpeed:D,panOnScrollMode:L,zoomOnDoubleClick:B,panOnDrag:!W&&ne,defaultViewport:G,translateExtent:re,minZoom:Z,maxZoom:Y,zoomActivationKeyCode:C,preventScrolling:ee,noWheelClassName:P,noPanClassName:T,onViewportChange:H,isControlledViewport:V,paneClickDistance:f,children:u.jsxs(wz,{onSelectionStart:y,onSelectionEnd:b,onPaneClick:r,onPaneMouseEnter:o,onPaneMouseMove:s,onPaneMouseLeave:i,onPaneContextMenu:c,onPaneScroll:d,panOnDrag:ne,isSelecting:!!q,selectionMode:v,selectionKeyPressed:W,selectionOnDrag:ue,children:[e,M&&u.jsx(Dz,{onSelectionContextMenu:O,noPanClassName:T,disableKeyboardA11y:z})]})})}U2.displayName="FlowRenderer";const zz=w.memo(U2),Lz=e=>r=>e?wp(r.nodeLookup,{x:0,y:0,width:r.width,height:r.height},r.transform,!0).map(o=>o.id):Array.from(r.nodeLookup.keys());function Hz(e){return Ie(w.useCallback(Lz(e),[e]),et)}const Bz=e=>e.updateNodeInternals;function Iz(){const e=Ie(Bz),[r]=w.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(o=>{const s=new Map;o.forEach(i=>{const c=i.target.getAttribute("data-id");s.set(c,{id:c,nodeElement:i.target,force:!0})}),e(s)}));return w.useEffect(()=>()=>{r?.disconnect()},[r]),r}function Uz({node:e,nodeType:r,hasDimensions:o,resizeObserver:s}){const i=We(),c=w.useRef(null),d=w.useRef(null),f=w.useRef(e.sourcePosition),m=w.useRef(e.targetPosition),p=w.useRef(r),g=o&&!!e.internals.handleBounds;return w.useEffect(()=>{c.current&&!e.hidden&&(!g||d.current!==c.current)&&(d.current&&s?.unobserve(d.current),s?.observe(c.current),d.current=c.current)},[g,e.hidden]),w.useEffect(()=>()=>{d.current&&(s?.unobserve(d.current),d.current=null)},[]),w.useEffect(()=>{if(c.current){const v=p.current!==r,y=f.current!==e.sourcePosition,b=m.current!==e.targetPosition;(v||y||b)&&(p.current=r,f.current=e.sourcePosition,m.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:c.current,force:!0}]])))}},[e.id,r,e.sourcePosition,e.targetPosition]),c}function Pz({id:e,onClick:r,onMouseEnter:o,onMouseMove:s,onMouseLeave:i,onContextMenu:c,onDoubleClick:d,nodesDraggable:f,elementsSelectable:m,nodesConnectable:p,nodesFocusable:g,resizeObserver:v,noDragClassName:y,noPanClassName:b,disableKeyboardA11y:N,rfId:S,nodeTypes:C,nodeClickDistance:j,onError:R}){const{node:E,internals:A,isParent:D}=Ie(Q=>{const se=Q.nodeLookup.get(e),me=Q.parentLookup.has(e);return{node:se,internals:se.internals,isParent:me}},et);let L=E.type||"default",B=C?.[L]||Zv[L];B===void 0&&(R?.("003",Hn.error003(L)),L="default",B=C?.default||Zv.default);const U=!!(E.draggable||f&&typeof E.draggable>"u"),G=!!(E.selectable||m&&typeof E.selectable>"u"),re=!!(E.connectable||p&&typeof E.connectable>"u"),Z=!!(E.focusable||g&&typeof E.focusable>"u"),Y=We(),ee=l2(E),O=Uz({node:E,nodeType:L,hasDimensions:ee,resizeObserver:v}),P=H2({nodeRef:O,disabled:E.hidden||!U,noDragClassName:y,handleSelector:E.dragHandle,nodeId:e,isSelectable:G,nodeClickDistance:j}),T=B2();if(E.hidden)return null;const z=gr(E),H=kz(E),V=G||U||r||o||s||i,M=o?Q=>o(Q,{...A.userNode}):void 0,I=s?Q=>s(Q,{...A.userNode}):void 0,W=i?Q=>i(Q,{...A.userNode}):void 0,K=c?Q=>c(Q,{...A.userNode}):void 0,ne=d?Q=>d(Q,{...A.userNode}):void 0,fe=Q=>{const{selectNodesOnDrag:se,nodeDragThreshold:me}=Y.getState();G&&(!se||!U||me>0)&&vm({id:e,store:Y,nodeRef:O}),r&&r(Q,{...A.userNode})},ue=Q=>{if(!(d2(Q.nativeEvent)||N)){if(JS.includes(Q.key)&&G){const se=Q.key==="Escape";vm({id:e,store:Y,unselect:se,nodeRef:O})}else if(U&&E.selected&&Object.prototype.hasOwnProperty.call(mu,Q.key)){Q.preventDefault();const{ariaLabelConfig:se}=Y.getState();Y.setState({ariaLiveMessage:se["node.a11yDescription.ariaLiveMessage"]({direction:Q.key.replace("Arrow","").toLowerCase(),x:~~A.positionAbsolute.x,y:~~A.positionAbsolute.y})}),T({direction:mu[Q.key],factor:Q.shiftKey?4:1})}}},q=()=>{if(N||!O.current?.matches(":focus-visible"))return;const{transform:Q,width:se,height:me,autoPanOnNodeFocus:pe,setCenter:de}=Y.getState();if(!pe)return;wp(new Map([[e,E]]),{x:0,y:0,width:se,height:me},Q,!0).length>0||de(E.position.x+z.width/2,E.position.y+z.height/2,{zoom:Q[2]})};return u.jsx("div",{className:lt(["react-flow__node",`react-flow__node-${L}`,{[b]:U},E.className,{selected:E.selected,selectable:G,parent:D,draggable:U,dragging:P}]),ref:O,style:{zIndex:A.z,transform:`translate(${A.positionAbsolute.x}px,${A.positionAbsolute.y}px)`,pointerEvents:V?"all":"none",visibility:ee?"visible":"hidden",...E.style,...H},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:M,onMouseMove:I,onMouseLeave:W,onContextMenu:K,onClick:fe,onDoubleClick:ne,onKeyDown:Z?ue:void 0,tabIndex:Z?0:void 0,onFocus:Z?q:void 0,role:E.ariaRole??(Z?"group":void 0),"aria-roledescription":"node","aria-describedby":N?void 0:`${M2}-${S}`,"aria-label":E.ariaLabel,...E.domAttributes,children:u.jsx(Nz,{value:e,children:u.jsx(B,{id:e,data:E.data,type:L,positionAbsoluteX:A.positionAbsolute.x,positionAbsoluteY:A.positionAbsolute.y,selected:E.selected??!1,selectable:G,draggable:U,deletable:E.deletable??!0,isConnectable:re,sourcePosition:E.sourcePosition,targetPosition:E.targetPosition,dragging:P,dragHandle:E.dragHandle,zIndex:A.z,parentId:E.parentId,...z})})})}const $z=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function P2(e){const{nodesDraggable:r,nodesConnectable:o,nodesFocusable:s,elementsSelectable:i,onError:c}=Ie($z,et),d=Hz(e.onlyRenderVisibleElements),f=Iz();return u.jsx("div",{className:"react-flow__nodes",style:qu,children:d.map(m=>u.jsx(Pz,{id:m,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:f,nodesDraggable:r,nodesConnectable:o,nodesFocusable:s,elementsSelectable:i,nodeClickDistance:e.nodeClickDistance,onError:c},m))})}P2.displayName="NodeRenderer";const Vz=w.memo(P2);function Yz(e){return Ie(w.useCallback(o=>{if(!e)return o.edges.map(i=>i.id);const s=[];if(o.width&&o.height)for(const i of o.edges){const c=o.nodeLookup.get(i.source),d=o.nodeLookup.get(i.target);c&&d&&V5({sourceNode:c,targetNode:d,width:o.width,height:o.height,transform:o.transform})&&s.push(i.id)}return s},[e]),et)}const qz=({color:e="none",strokeWidth:r=1})=>{const o={strokeWidth:r,...e&&{stroke:e}};return u.jsx("polyline",{className:"arrow",style:o,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},Gz=({color:e="none",strokeWidth:r=1})=>{const o={strokeWidth:r,...e&&{stroke:e,fill:e}};return u.jsx("polyline",{className:"arrowclosed",style:o,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},Qv={[du.Arrow]:qz,[du.ArrowClosed]:Gz};function Xz(e){const r=We();return w.useMemo(()=>Object.prototype.hasOwnProperty.call(Qv,e)?Qv[e]:(r.getState().onError?.("009",Hn.error009(e)),null),[e])}const Fz=({id:e,type:r,color:o,width:s=12.5,height:i=12.5,markerUnits:c="strokeWidth",strokeWidth:d,orient:f="auto-start-reverse"})=>{const m=Xz(r);return m?u.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${s}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:c,orient:f,refX:"0",refY:"0",children:u.jsx(m,{color:o,strokeWidth:d})}):null},$2=({defaultColor:e,rfId:r})=>{const o=Ie(c=>c.edges),s=Ie(c=>c.defaultEdgeOptions),i=w.useMemo(()=>Q5(o,{id:r,defaultColor:e,defaultMarkerStart:s?.markerStart,defaultMarkerEnd:s?.markerEnd}),[o,s,r,e]);return i.length?u.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:u.jsx("defs",{children:i.map(c=>u.jsx(Fz,{id:c.id,type:c.type,color:c.color,width:c.width,height:c.height,markerUnits:c.markerUnits,strokeWidth:c.strokeWidth,orient:c.orient},c.id))})}):null};$2.displayName="MarkerDefinitions";var Zz=w.memo($2);function V2({x:e,y:r,label:o,labelStyle:s,labelShowBg:i=!0,labelBgStyle:c,labelBgPadding:d=[2,4],labelBgBorderRadius:f=2,children:m,className:p,...g}){const[v,y]=w.useState({x:1,y:0,width:0,height:0}),b=lt(["react-flow__edge-textwrapper",p]),N=w.useRef(null);return w.useEffect(()=>{if(N.current){const S=N.current.getBBox();y({x:S.x,y:S.y,width:S.width,height:S.height})}},[o]),o?u.jsxs("g",{transform:`translate(${e-v.width/2} ${r-v.height/2})`,className:b,visibility:v.width?"visible":"hidden",...g,children:[i&&u.jsx("rect",{width:v.width+2*d[0],x:-d[0],y:-d[1],height:v.height+2*d[1],className:"react-flow__edge-textbg",style:c,rx:f,ry:f}),u.jsx("text",{className:"react-flow__edge-text",y:v.height/2,dy:"0.3em",ref:N,style:s,children:o}),m]}):null}V2.displayName="EdgeText";const Kz=w.memo(V2);function Gu({path:e,labelX:r,labelY:o,label:s,labelStyle:i,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:m,interactionWidth:p=20,...g}){return u.jsxs(u.Fragment,{children:[u.jsx("path",{...g,d:e,fill:"none",className:lt(["react-flow__edge-path",g.className])}),p?u.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:p,className:"react-flow__edge-interaction"}):null,s&&yn(r)&&yn(o)?u.jsx(Kz,{x:r,y:o,label:s,labelStyle:i,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:m}):null]})}function Wv({pos:e,x1:r,y1:o,x2:s,y2:i}){return e===Se.Left||e===Se.Right?[.5*(r+s),o]:[r,.5*(o+i)]}function Y2({sourceX:e,sourceY:r,sourcePosition:o=Se.Bottom,targetX:s,targetY:i,targetPosition:c=Se.Top}){const[d,f]=Wv({pos:o,x1:e,y1:r,x2:s,y2:i}),[m,p]=Wv({pos:c,x1:s,y1:i,x2:e,y2:r}),[g,v,y,b]=h2({sourceX:e,sourceY:r,targetX:s,targetY:i,sourceControlX:d,sourceControlY:f,targetControlX:m,targetControlY:p});return[`M${e},${r} C${d},${f} ${m},${p} ${s},${i}`,g,v,y,b]}function q2(e){return w.memo(({id:r,sourceX:o,sourceY:s,targetX:i,targetY:c,sourcePosition:d,targetPosition:f,label:m,labelStyle:p,labelShowBg:g,labelBgStyle:v,labelBgPadding:y,labelBgBorderRadius:b,style:N,markerEnd:S,markerStart:C,interactionWidth:j})=>{const[R,E,A]=Y2({sourceX:o,sourceY:s,sourcePosition:d,targetX:i,targetY:c,targetPosition:f}),D=e.isInternal?void 0:r;return u.jsx(Gu,{id:D,path:R,labelX:E,labelY:A,label:m,labelStyle:p,labelShowBg:g,labelBgStyle:v,labelBgPadding:y,labelBgBorderRadius:b,style:N,markerEnd:S,markerStart:C,interactionWidth:j})})}const Qz=q2({isInternal:!1}),G2=q2({isInternal:!0});Qz.displayName="SimpleBezierEdge";G2.displayName="SimpleBezierEdgeInternal";function X2(e){return w.memo(({id:r,sourceX:o,sourceY:s,targetX:i,targetY:c,label:d,labelStyle:f,labelShowBg:m,labelBgStyle:p,labelBgPadding:g,labelBgBorderRadius:v,style:y,sourcePosition:b=Se.Bottom,targetPosition:N=Se.Top,markerEnd:S,markerStart:C,pathOptions:j,interactionWidth:R})=>{const[E,A,D]=pm({sourceX:o,sourceY:s,sourcePosition:b,targetX:i,targetY:c,targetPosition:N,borderRadius:j?.borderRadius,offset:j?.offset,stepPosition:j?.stepPosition}),L=e.isInternal?void 0:r;return u.jsx(Gu,{id:L,path:E,labelX:A,labelY:D,label:d,labelStyle:f,labelShowBg:m,labelBgStyle:p,labelBgPadding:g,labelBgBorderRadius:v,style:y,markerEnd:S,markerStart:C,interactionWidth:R})})}const F2=X2({isInternal:!1}),Z2=X2({isInternal:!0});F2.displayName="SmoothStepEdge";Z2.displayName="SmoothStepEdgeInternal";function K2(e){return w.memo(({id:r,...o})=>{const s=e.isInternal?void 0:r;return u.jsx(F2,{...o,id:s,pathOptions:w.useMemo(()=>({borderRadius:0,offset:o.pathOptions?.offset}),[o.pathOptions?.offset])})})}const Wz=K2({isInternal:!1}),Q2=K2({isInternal:!0});Wz.displayName="StepEdge";Q2.displayName="StepEdgeInternal";function W2(e){return w.memo(({id:r,sourceX:o,sourceY:s,targetX:i,targetY:c,label:d,labelStyle:f,labelShowBg:m,labelBgStyle:p,labelBgPadding:g,labelBgBorderRadius:v,style:y,markerEnd:b,markerStart:N,interactionWidth:S})=>{const[C,j,R]=g2({sourceX:o,sourceY:s,targetX:i,targetY:c}),E=e.isInternal?void 0:r;return u.jsx(Gu,{id:E,path:C,labelX:j,labelY:R,label:d,labelStyle:f,labelShowBg:m,labelBgStyle:p,labelBgPadding:g,labelBgBorderRadius:v,style:y,markerEnd:b,markerStart:N,interactionWidth:S})})}const Jz=W2({isInternal:!1}),J2=W2({isInternal:!0});Jz.displayName="StraightEdge";J2.displayName="StraightEdgeInternal";function eN(e){return w.memo(({id:r,sourceX:o,sourceY:s,targetX:i,targetY:c,sourcePosition:d=Se.Bottom,targetPosition:f=Se.Top,label:m,labelStyle:p,labelShowBg:g,labelBgStyle:v,labelBgPadding:y,labelBgBorderRadius:b,style:N,markerEnd:S,markerStart:C,pathOptions:j,interactionWidth:R})=>{const[E,A,D]=m2({sourceX:o,sourceY:s,sourcePosition:d,targetX:i,targetY:c,targetPosition:f,curvature:j?.curvature}),L=e.isInternal?void 0:r;return u.jsx(Gu,{id:L,path:E,labelX:A,labelY:D,label:m,labelStyle:p,labelShowBg:g,labelBgStyle:v,labelBgPadding:y,labelBgBorderRadius:b,style:N,markerEnd:S,markerStart:C,interactionWidth:R})})}const e8=eN({isInternal:!1}),tN=eN({isInternal:!0});e8.displayName="BezierEdge";tN.displayName="BezierEdgeInternal";const Jv={default:tN,straight:J2,step:Q2,smoothstep:Z2,simplebezier:G2},eb={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},t8=(e,r,o)=>o===Se.Left?e-r:o===Se.Right?e+r:e,n8=(e,r,o)=>o===Se.Top?e-r:o===Se.Bottom?e+r:e,tb="react-flow__edgeupdater";function nb({position:e,centerX:r,centerY:o,radius:s=10,onMouseDown:i,onMouseEnter:c,onMouseOut:d,type:f}){return u.jsx("circle",{onMouseDown:i,onMouseEnter:c,onMouseOut:d,className:lt([tb,`${tb}-${f}`]),cx:t8(r,s,e),cy:n8(o,s,e),r:s,stroke:"transparent",fill:"transparent"})}function r8({isReconnectable:e,reconnectRadius:r,edge:o,sourceX:s,sourceY:i,targetX:c,targetY:d,sourcePosition:f,targetPosition:m,onReconnect:p,onReconnectStart:g,onReconnectEnd:v,setReconnecting:y,setUpdateHover:b}){const N=We(),S=(A,D)=>{if(A.button!==0)return;const{autoPanOnConnect:L,domNode:B,isValidConnection:U,connectionMode:G,connectionRadius:re,lib:Z,onConnectStart:Y,onConnectEnd:ee,cancelConnection:O,nodeLookup:P,rfId:T,panBy:z,updateConnection:H}=N.getState(),V=D.type==="target",M=(K,ne)=>{y(!1),v?.(K,o,D.type,ne)},I=K=>p?.(o,K),W=(K,ne)=>{y(!0),g?.(A,o,D.type),Y?.(K,ne)};ym.onPointerDown(A.nativeEvent,{autoPanOnConnect:L,connectionMode:G,connectionRadius:re,domNode:B,handleId:D.id,nodeId:D.nodeId,nodeLookup:P,isTarget:V,edgeUpdaterType:D.type,lib:Z,flowId:T,cancelConnection:O,panBy:z,isValidConnection:U,onConnect:I,onConnectStart:W,onConnectEnd:ee,onReconnectEnd:M,updateConnection:H,getTransform:()=>N.getState().transform,getFromHandle:()=>N.getState().connection.fromHandle,dragThreshold:N.getState().connectionDragThreshold,handleDomNode:A.currentTarget})},C=A=>S(A,{nodeId:o.target,id:o.targetHandle??null,type:"target"}),j=A=>S(A,{nodeId:o.source,id:o.sourceHandle??null,type:"source"}),R=()=>b(!0),E=()=>b(!1);return u.jsxs(u.Fragment,{children:[(e===!0||e==="source")&&u.jsx(nb,{position:f,centerX:s,centerY:i,radius:r,onMouseDown:C,onMouseEnter:R,onMouseOut:E,type:"source"}),(e===!0||e==="target")&&u.jsx(nb,{position:m,centerX:c,centerY:d,radius:r,onMouseDown:j,onMouseEnter:R,onMouseOut:E,type:"target"})]})}function o8({id:e,edgesFocusable:r,edgesReconnectable:o,elementsSelectable:s,onClick:i,onDoubleClick:c,onContextMenu:d,onMouseEnter:f,onMouseMove:m,onMouseLeave:p,reconnectRadius:g,onReconnect:v,onReconnectStart:y,onReconnectEnd:b,rfId:N,edgeTypes:S,noPanClassName:C,onError:j,disableKeyboardA11y:R}){let E=Ie(de=>de.edgeLookup.get(e));const A=Ie(de=>de.defaultEdgeOptions);E=A?{...A,...E}:E;let D=E.type||"default",L=S?.[D]||Jv[D];L===void 0&&(j?.("011",Hn.error011(D)),D="default",L=S?.default||Jv.default);const B=!!(E.focusable||r&&typeof E.focusable>"u"),U=typeof v<"u"&&(E.reconnectable||o&&typeof E.reconnectable>"u"),G=!!(E.selectable||s&&typeof E.selectable>"u"),re=w.useRef(null),[Z,Y]=w.useState(!1),[ee,O]=w.useState(!1),P=We(),{zIndex:T,sourceX:z,sourceY:H,targetX:V,targetY:M,sourcePosition:I,targetPosition:W}=Ie(w.useCallback(de=>{const he=de.nodeLookup.get(E.source),ge=de.nodeLookup.get(E.target);if(!he||!ge)return{zIndex:E.zIndex,...eb};const Te=K5({id:e,sourceNode:he,targetNode:ge,sourceHandle:E.sourceHandle||null,targetHandle:E.targetHandle||null,connectionMode:de.connectionMode,onError:j});return{zIndex:$5({selected:E.selected,zIndex:E.zIndex,sourceNode:he,targetNode:ge,elevateOnSelect:de.elevateEdgesOnSelect}),...Te||eb}},[E.source,E.target,E.sourceHandle,E.targetHandle,E.selected,E.zIndex]),et),K=w.useMemo(()=>E.markerStart?`url('#${gm(E.markerStart,N)}')`:void 0,[E.markerStart,N]),ne=w.useMemo(()=>E.markerEnd?`url('#${gm(E.markerEnd,N)}')`:void 0,[E.markerEnd,N]);if(E.hidden||z===null||H===null||V===null||M===null)return null;const fe=de=>{const{addSelectedEdges:he,unselectNodesAndEdges:ge,multiSelectionActive:Te}=P.getState();G&&(P.setState({nodesSelectionActive:!1}),E.selected&&Te?(ge({nodes:[],edges:[E]}),re.current?.blur()):he([e])),i&&i(de,E)},ue=c?de=>{c(de,{...E})}:void 0,q=d?de=>{d(de,{...E})}:void 0,Q=f?de=>{f(de,{...E})}:void 0,se=m?de=>{m(de,{...E})}:void 0,me=p?de=>{p(de,{...E})}:void 0,pe=de=>{if(!R&&JS.includes(de.key)&&G){const{unselectNodesAndEdges:he,addSelectedEdges:ge}=P.getState();de.key==="Escape"?(re.current?.blur(),he({edges:[E]})):ge([e])}};return u.jsx("svg",{style:{zIndex:T},children:u.jsxs("g",{className:lt(["react-flow__edge",`react-flow__edge-${D}`,E.className,C,{selected:E.selected,animated:E.animated,inactive:!G&&!i,updating:Z,selectable:G}]),onClick:fe,onDoubleClick:ue,onContextMenu:q,onMouseEnter:Q,onMouseMove:se,onMouseLeave:me,onKeyDown:B?pe:void 0,tabIndex:B?0:void 0,role:E.ariaRole??(B?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":E.ariaLabel===null?void 0:E.ariaLabel||`Edge from ${E.source} to ${E.target}`,"aria-describedby":B?`${T2}-${N}`:void 0,ref:re,...E.domAttributes,children:[!ee&&u.jsx(L,{id:e,source:E.source,target:E.target,type:E.type,selected:E.selected,animated:E.animated,selectable:G,deletable:E.deletable??!0,label:E.label,labelStyle:E.labelStyle,labelShowBg:E.labelShowBg,labelBgStyle:E.labelBgStyle,labelBgPadding:E.labelBgPadding,labelBgBorderRadius:E.labelBgBorderRadius,sourceX:z,sourceY:H,targetX:V,targetY:M,sourcePosition:I,targetPosition:W,data:E.data,style:E.style,sourceHandleId:E.sourceHandle,targetHandleId:E.targetHandle,markerStart:K,markerEnd:ne,pathOptions:"pathOptions"in E?E.pathOptions:void 0,interactionWidth:E.interactionWidth}),U&&u.jsx(r8,{edge:E,isReconnectable:U,reconnectRadius:g,onReconnect:v,onReconnectStart:y,onReconnectEnd:b,sourceX:z,sourceY:H,targetX:V,targetY:M,sourcePosition:I,targetPosition:W,setUpdateHover:Y,setReconnecting:O})]})})}const a8=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function nN({defaultMarkerColor:e,onlyRenderVisibleElements:r,rfId:o,edgeTypes:s,noPanClassName:i,onReconnect:c,onEdgeContextMenu:d,onEdgeMouseEnter:f,onEdgeMouseMove:m,onEdgeMouseLeave:p,onEdgeClick:g,reconnectRadius:v,onEdgeDoubleClick:y,onReconnectStart:b,onReconnectEnd:N,disableKeyboardA11y:S}){const{edgesFocusable:C,edgesReconnectable:j,elementsSelectable:R,onError:E}=Ie(a8,et),A=Yz(r);return u.jsxs("div",{className:"react-flow__edges",children:[u.jsx(Zz,{defaultColor:e,rfId:o}),A.map(D=>u.jsx(o8,{id:D,edgesFocusable:C,edgesReconnectable:j,elementsSelectable:R,noPanClassName:i,onReconnect:c,onContextMenu:d,onMouseEnter:f,onMouseMove:m,onMouseLeave:p,onClick:g,reconnectRadius:v,onDoubleClick:y,onReconnectStart:b,onReconnectEnd:N,rfId:o,onError:E,edgeTypes:s,disableKeyboardA11y:S},D))]})}nN.displayName="EdgeRenderer";const s8=w.memo(nN),i8=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function l8({children:e}){const r=Ie(i8);return u.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:r},children:e})}function c8(e){const r=Zi(),o=w.useRef(!1);w.useEffect(()=>{!o.current&&r.viewportInitialized&&e&&(setTimeout(()=>e(r),1),o.current=!0)},[e,r.viewportInitialized])}const u8=e=>e.panZoom?.syncViewport;function d8(e){const r=Ie(u8),o=We();return w.useEffect(()=>{e&&(r?.(e),o.setState({transform:[e.x,e.y,e.zoom]}))},[e,r]),null}function f8(e){return e.connection.inProgress?{...e.connection,to:Fi(e.connection.to,e.transform)}:{...e.connection}}function h8(e){return f8}function m8(e){const r=h8();return Ie(r,et)}const p8=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function g8({containerStyle:e,style:r,type:o,component:s}){const{nodesConnectable:i,width:c,height:d,isValid:f,inProgress:m}=Ie(p8,et);return!(c&&i&&m)?null:u.jsx("svg",{style:e,width:c,height:d,className:"react-flow__connectionline react-flow__container",children:u.jsx("g",{className:lt(["react-flow__connection",n2(f)]),children:u.jsx(rN,{style:r,type:o,CustomComponent:s,isValid:f})})})}const rN=({style:e,type:r=Kr.Bezier,CustomComponent:o,isValid:s})=>{const{inProgress:i,from:c,fromNode:d,fromHandle:f,fromPosition:m,to:p,toNode:g,toHandle:v,toPosition:y}=m8();if(!i)return;if(o)return u.jsx(o,{connectionLineType:r,connectionLineStyle:e,fromNode:d,fromHandle:f,fromX:c.x,fromY:c.y,toX:p.x,toY:p.y,fromPosition:m,toPosition:y,connectionStatus:n2(s),toNode:g,toHandle:v});let b="";const N={sourceX:c.x,sourceY:c.y,sourcePosition:m,targetX:p.x,targetY:p.y,targetPosition:y};switch(r){case Kr.Bezier:[b]=m2(N);break;case Kr.SimpleBezier:[b]=Y2(N);break;case Kr.Step:[b]=pm({...N,borderRadius:0});break;case Kr.SmoothStep:[b]=pm(N);break;default:[b]=g2(N)}return u.jsx("path",{d:b,fill:"none",className:"react-flow__connection-path",style:e})};rN.displayName="ConnectionLine";const x8={};function rb(e=x8){w.useRef(e),We(),w.useEffect(()=>{},[e])}function y8(){We(),w.useRef(!1),w.useEffect(()=>{},[])}function oN({nodeTypes:e,edgeTypes:r,onInit:o,onNodeClick:s,onEdgeClick:i,onNodeDoubleClick:c,onEdgeDoubleClick:d,onNodeMouseEnter:f,onNodeMouseMove:m,onNodeMouseLeave:p,onNodeContextMenu:g,onSelectionContextMenu:v,onSelectionStart:y,onSelectionEnd:b,connectionLineType:N,connectionLineStyle:S,connectionLineComponent:C,connectionLineContainerStyle:j,selectionKeyCode:R,selectionOnDrag:E,selectionMode:A,multiSelectionKeyCode:D,panActivationKeyCode:L,zoomActivationKeyCode:B,deleteKeyCode:U,onlyRenderVisibleElements:G,elementsSelectable:re,defaultViewport:Z,translateExtent:Y,minZoom:ee,maxZoom:O,preventScrolling:P,defaultMarkerColor:T,zoomOnScroll:z,zoomOnPinch:H,panOnScroll:V,panOnScrollSpeed:M,panOnScrollMode:I,zoomOnDoubleClick:W,panOnDrag:K,onPaneClick:ne,onPaneMouseEnter:fe,onPaneMouseMove:ue,onPaneMouseLeave:q,onPaneScroll:Q,onPaneContextMenu:se,paneClickDistance:me,nodeClickDistance:pe,onEdgeContextMenu:de,onEdgeMouseEnter:he,onEdgeMouseMove:ge,onEdgeMouseLeave:Te,reconnectRadius:Ae,onReconnect:Ne,onReconnectStart:ct,onReconnectEnd:Tt,noDragClassName:kt,noWheelClassName:cn,noPanClassName:ro,disableKeyboardA11y:xr,nodeExtent:ts,rfId:Io,viewport:Qt,onViewportChange:ut}){return rb(e),rb(r),y8(),c8(o),d8(Qt),u.jsx(zz,{onPaneClick:ne,onPaneMouseEnter:fe,onPaneMouseMove:ue,onPaneMouseLeave:q,onPaneContextMenu:se,onPaneScroll:Q,paneClickDistance:me,deleteKeyCode:U,selectionKeyCode:R,selectionOnDrag:E,selectionMode:A,onSelectionStart:y,onSelectionEnd:b,multiSelectionKeyCode:D,panActivationKeyCode:L,zoomActivationKeyCode:B,elementsSelectable:re,zoomOnScroll:z,zoomOnPinch:H,zoomOnDoubleClick:W,panOnScroll:V,panOnScrollSpeed:M,panOnScrollMode:I,panOnDrag:K,defaultViewport:Z,translateExtent:Y,minZoom:ee,maxZoom:O,onSelectionContextMenu:v,preventScrolling:P,noDragClassName:kt,noWheelClassName:cn,noPanClassName:ro,disableKeyboardA11y:xr,onViewportChange:ut,isControlledViewport:!!Qt,children:u.jsxs(l8,{children:[u.jsx(s8,{edgeTypes:r,onEdgeClick:i,onEdgeDoubleClick:d,onReconnect:Ne,onReconnectStart:ct,onReconnectEnd:Tt,onlyRenderVisibleElements:G,onEdgeContextMenu:de,onEdgeMouseEnter:he,onEdgeMouseMove:ge,onEdgeMouseLeave:Te,reconnectRadius:Ae,defaultMarkerColor:T,noPanClassName:ro,disableKeyboardA11y:xr,rfId:Io}),u.jsx(g8,{style:S,type:N,component:C,containerStyle:j}),u.jsx("div",{className:"react-flow__edgelabel-renderer"}),u.jsx(Vz,{nodeTypes:e,onNodeClick:s,onNodeDoubleClick:c,onNodeMouseEnter:f,onNodeMouseMove:m,onNodeMouseLeave:p,onNodeContextMenu:g,nodeClickDistance:pe,onlyRenderVisibleElements:G,noPanClassName:ro,noDragClassName:kt,disableKeyboardA11y:xr,nodeExtent:ts,rfId:Io}),u.jsx("div",{className:"react-flow__viewport-portal"})]})})}oN.displayName="GraphView";const v8=w.memo(oN),ob=({nodes:e,edges:r,defaultNodes:o,defaultEdges:s,width:i,height:c,fitView:d,fitViewOptions:f,minZoom:m=.5,maxZoom:p=2,nodeOrigin:g,nodeExtent:v}={})=>{const y=new Map,b=new Map,N=new Map,S=new Map,C=s??r??[],j=o??e??[],R=g??[0,0],E=v??Mi;y2(N,S,C);const A=xm(j,y,b,{nodeOrigin:R,nodeExtent:E,elevateNodesOnSelect:!1});let D=[0,0,1];if(d&&i&&c){const L=Gi(y,{filter:re=>!!((re.width||re.initialWidth)&&(re.height||re.initialHeight))}),{x:B,y:U,zoom:G}=Sp(L,i,c,m,p,f?.padding??.1);D=[B,U,G]}return{rfId:"1",width:0,height:0,transform:D,nodes:j,nodesInitialized:A,nodeLookup:y,parentLookup:b,edges:C,edgeLookup:S,connectionLookup:N,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:o!==void 0,hasDefaultEdges:s!==void 0,panZoom:null,minZoom:m,maxZoom:p,translateExtent:Mi,nodeExtent:E,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Ya.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:R,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!1,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:d??!1,fitViewOptions:f,fitViewResolver:null,connection:{...t2},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:L5,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:e2}},b8=({nodes:e,edges:r,defaultNodes:o,defaultEdges:s,width:i,height:c,fitView:d,fitViewOptions:f,minZoom:m,maxZoom:p,nodeOrigin:g,nodeExtent:v})=>U6((y,b)=>{async function N(){const{nodeLookup:S,panZoom:C,fitViewOptions:j,fitViewResolver:R,width:E,height:A,minZoom:D,maxZoom:L}=b();C&&(await O5({nodes:S,width:E,height:A,panZoom:C,minZoom:D,maxZoom:L},j),R?.resolve(!0),y({fitViewResolver:null}))}return{...ob({nodes:e,edges:r,width:i,height:c,fitView:d,fitViewOptions:f,minZoom:m,maxZoom:p,nodeOrigin:g,nodeExtent:v,defaultNodes:o,defaultEdges:s}),setNodes:S=>{const{nodeLookup:C,parentLookup:j,nodeOrigin:R,elevateNodesOnSelect:E,fitViewQueued:A}=b(),D=xm(S,C,j,{nodeOrigin:R,nodeExtent:v,elevateNodesOnSelect:E,checkEquality:!0});A&&D?(N(),y({nodes:S,nodesInitialized:D,fitViewQueued:!1,fitViewOptions:void 0})):y({nodes:S,nodesInitialized:D})},setEdges:S=>{const{connectionLookup:C,edgeLookup:j}=b();y2(C,j,S),y({edges:S})},setDefaultNodesAndEdges:(S,C)=>{if(S){const{setNodes:j}=b();j(S),y({hasDefaultNodes:!0})}if(C){const{setEdges:j}=b();j(C),y({hasDefaultEdges:!0})}},updateNodeInternals:S=>{const{triggerNodeChanges:C,nodeLookup:j,parentLookup:R,domNode:E,nodeOrigin:A,nodeExtent:D,debug:L,fitViewQueued:B}=b(),{changes:U,updatedInternals:G}=n6(S,j,R,E,A,D);G&&(J5(j,R,{nodeOrigin:A,nodeExtent:D}),B?(N(),y({fitViewQueued:!1,fitViewOptions:void 0})):y({}),U?.length>0&&(L&&console.log("React Flow: trigger node changes",U),C?.(U)))},updateNodePositions:(S,C=!1)=>{const j=[],R=[],{nodeLookup:E,triggerNodeChanges:A}=b();for(const[D,L]of S){const B=E.get(D),U=!!(B?.expandParent&&B?.parentId&&L?.position),G={id:D,type:"position",position:U?{x:Math.max(0,L.position.x),y:Math.max(0,L.position.y)}:L.position,dragging:C};U&&B.parentId&&j.push({id:D,parentId:B.parentId,rect:{...L.internals.positionAbsolute,width:L.measured.width??0,height:L.measured.height??0}}),R.push(G)}if(j.length>0){const{parentLookup:D,nodeOrigin:L}=b(),B=jp(j,E,D,L);R.push(...B)}A(R)},triggerNodeChanges:S=>{const{onNodesChange:C,setNodes:j,nodes:R,hasDefaultNodes:E,debug:A}=b();if(S?.length){if(E){const D=D2(S,R);j(D)}A&&console.log("React Flow: trigger node changes",S),C?.(S)}},triggerEdgeChanges:S=>{const{onEdgesChange:C,setEdges:j,edges:R,hasDefaultEdges:E,debug:A}=b();if(S?.length){if(E){const D=O2(S,R);j(D)}A&&console.log("React Flow: trigger edge changes",S),C?.(S)}},addSelectedNodes:S=>{const{multiSelectionActive:C,edgeLookup:j,nodeLookup:R,triggerNodeChanges:E,triggerEdgeChanges:A}=b();if(C){const D=S.map(L=>Co(L,!0));E(D);return}E(ka(R,new Set([...S]),!0)),A(ka(j))},addSelectedEdges:S=>{const{multiSelectionActive:C,edgeLookup:j,nodeLookup:R,triggerNodeChanges:E,triggerEdgeChanges:A}=b();if(C){const D=S.map(L=>Co(L,!0));A(D);return}A(ka(j,new Set([...S]))),E(ka(R,new Set,!0))},unselectNodesAndEdges:({nodes:S,edges:C}={})=>{const{edges:j,nodes:R,nodeLookup:E,triggerNodeChanges:A,triggerEdgeChanges:D}=b(),L=S||R,B=C||j,U=L.map(re=>{const Z=E.get(re.id);return Z&&(Z.selected=!1),Co(re.id,!1)}),G=B.map(re=>Co(re.id,!1));A(U),D(G)},setMinZoom:S=>{const{panZoom:C,maxZoom:j}=b();C?.setScaleExtent([S,j]),y({minZoom:S})},setMaxZoom:S=>{const{panZoom:C,minZoom:j}=b();C?.setScaleExtent([j,S]),y({maxZoom:S})},setTranslateExtent:S=>{b().panZoom?.setTranslateExtent(S),y({translateExtent:S})},setPaneClickDistance:S=>{b().panZoom?.setClickDistance(S)},resetSelectedElements:()=>{const{edges:S,nodes:C,triggerNodeChanges:j,triggerEdgeChanges:R,elementsSelectable:E}=b();if(!E)return;const A=C.reduce((L,B)=>B.selected?[...L,Co(B.id,!1)]:L,[]),D=S.reduce((L,B)=>B.selected?[...L,Co(B.id,!1)]:L,[]);j(A),R(D)},setNodeExtent:S=>{const{nodes:C,nodeLookup:j,parentLookup:R,nodeOrigin:E,elevateNodesOnSelect:A,nodeExtent:D}=b();S[0][0]===D[0][0]&&S[0][1]===D[0][1]&&S[1][0]===D[1][0]&&S[1][1]===D[1][1]||(xm(C,j,R,{nodeOrigin:E,nodeExtent:S,elevateNodesOnSelect:A,checkEquality:!1}),y({nodeExtent:S}))},panBy:S=>{const{transform:C,width:j,height:R,panZoom:E,translateExtent:A}=b();return r6({delta:S,panZoom:E,transform:C,translateExtent:A,width:j,height:R})},setCenter:async(S,C,j)=>{const{width:R,height:E,maxZoom:A,panZoom:D}=b();if(!D)return Promise.resolve(!1);const L=typeof j?.zoom<"u"?j.zoom:A;return await D.setViewport({x:R/2-S*L,y:E/2-C*L,zoom:L},{duration:j?.duration,ease:j?.ease,interpolate:j?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{y({connection:{...t2}})},updateConnection:S=>{y({connection:S})},reset:()=>y({...ob()})}},Object.is);function w8({initialNodes:e,initialEdges:r,defaultNodes:o,defaultEdges:s,initialWidth:i,initialHeight:c,initialMinZoom:d,initialMaxZoom:f,initialFitViewOptions:m,fitView:p,nodeOrigin:g,nodeExtent:v,children:y}){const[b]=w.useState(()=>b8({nodes:e,edges:r,defaultNodes:o,defaultEdges:s,width:i,height:c,fitView:p,minZoom:d,maxZoom:f,fitViewOptions:m,nodeOrigin:g,nodeExtent:v}));return u.jsx(P6,{value:b,children:u.jsx(uz,{children:y})})}function S8({children:e,nodes:r,edges:o,defaultNodes:s,defaultEdges:i,width:c,height:d,fitView:f,fitViewOptions:m,minZoom:p,maxZoom:g,nodeOrigin:v,nodeExtent:y}){return w.useContext(Vu)?u.jsx(u.Fragment,{children:e}):u.jsx(w8,{initialNodes:r,initialEdges:o,defaultNodes:s,defaultEdges:i,initialWidth:c,initialHeight:d,fitView:f,initialFitViewOptions:m,initialMinZoom:p,initialMaxZoom:g,nodeOrigin:v,nodeExtent:y,children:e})}const N8={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function E8({nodes:e,edges:r,defaultNodes:o,defaultEdges:s,className:i,nodeTypes:c,edgeTypes:d,onNodeClick:f,onEdgeClick:m,onInit:p,onMove:g,onMoveStart:v,onMoveEnd:y,onConnect:b,onConnectStart:N,onConnectEnd:S,onClickConnectStart:C,onClickConnectEnd:j,onNodeMouseEnter:R,onNodeMouseMove:E,onNodeMouseLeave:A,onNodeContextMenu:D,onNodeDoubleClick:L,onNodeDragStart:B,onNodeDrag:U,onNodeDragStop:G,onNodesDelete:re,onEdgesDelete:Z,onDelete:Y,onSelectionChange:ee,onSelectionDragStart:O,onSelectionDrag:P,onSelectionDragStop:T,onSelectionContextMenu:z,onSelectionStart:H,onSelectionEnd:V,onBeforeDelete:M,connectionMode:I,connectionLineType:W=Kr.Bezier,connectionLineStyle:K,connectionLineComponent:ne,connectionLineContainerStyle:fe,deleteKeyCode:ue="Backspace",selectionKeyCode:q="Shift",selectionOnDrag:Q=!1,selectionMode:se=Ti.Full,panActivationKeyCode:me="Space",multiSelectionKeyCode:pe=Ri()?"Meta":"Control",zoomActivationKeyCode:de=Ri()?"Meta":"Control",snapToGrid:he,snapGrid:ge,onlyRenderVisibleElements:Te=!1,selectNodesOnDrag:Ae,nodesDraggable:Ne,autoPanOnNodeFocus:ct,nodesConnectable:Tt,nodesFocusable:kt,nodeOrigin:cn=k2,edgesFocusable:ro,edgesReconnectable:xr,elementsSelectable:ts=!0,defaultViewport:Io=ez,minZoom:Qt=.5,maxZoom:ut=2,translateExtent:un=Mi,preventScrolling:Ct=!0,nodeExtent:ns,defaultMarkerColor:Xu="#b1b1b7",zoomOnScroll:Fu=!0,zoomOnPinch:Uo=!0,panOnScroll:Po=!1,panOnScrollSpeed:Pn=.5,panOnScrollMode:$o=Mo.Free,zoomOnDoubleClick:oo=!0,panOnDrag:Zu=!0,onPaneClick:Ki,onPaneMouseEnter:Qi,onPaneMouseMove:rs,onPaneMouseLeave:ao,onPaneScroll:Ku,onPaneContextMenu:Wi,paneClickDistance:os=0,nodeClickDistance:as=0,children:ss,onReconnect:Ji,onReconnectStart:Qu,onReconnectEnd:En,onEdgeContextMenu:mt,onEdgeDoubleClick:Nt,onEdgeMouseEnter:yr,onEdgeMouseMove:is,onEdgeMouseLeave:Wu,reconnectRadius:Ju=10,onNodesChange:el,onEdgesChange:so,noDragClassName:ls="nodrag",noWheelClassName:vr="nowheel",noPanClassName:$n="nopan",fitView:br,fitViewOptions:Vn,connectOnClick:at,attributionPosition:tl,proOptions:nl,defaultEdgeOptions:Yn,elevateNodesOnSelect:wr,elevateEdgesOnSelect:ed,disableKeyboardA11y:cs=!1,autoPanOnConnect:rl,autoPanOnNodeDrag:td,autoPanSpeed:Vo,connectionRadius:Yo,isValidConnection:dn,onError:us,style:ol,id:qn,nodeDragThreshold:ds,connectionDragThreshold:fs,viewport:nd,onViewportChange:al,width:Rt,height:sl,colorMode:rd="light",debug:qo,onScroll:hs,ariaLabelConfig:Go,...od},Dt){const io=qn||"1",il=oz(rd),ms=w.useCallback(Gn=>{Gn.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),hs?.(Gn)},[hs]);return u.jsx("div",{"data-testid":"rf__wrapper",...od,onScroll:ms,style:{...ol,...N8},ref:Dt,className:lt(["react-flow",i,il]),id:qn,role:"application",children:u.jsxs(S8,{nodes:e,edges:r,width:Rt,height:sl,fitView:br,fitViewOptions:Vn,minZoom:Qt,maxZoom:ut,nodeOrigin:cn,nodeExtent:ns,children:[u.jsx(v8,{onInit:p,onNodeClick:f,onEdgeClick:m,onNodeMouseEnter:R,onNodeMouseMove:E,onNodeMouseLeave:A,onNodeContextMenu:D,onNodeDoubleClick:L,nodeTypes:c,edgeTypes:d,connectionLineType:W,connectionLineStyle:K,connectionLineComponent:ne,connectionLineContainerStyle:fe,selectionKeyCode:q,selectionOnDrag:Q,selectionMode:se,deleteKeyCode:ue,multiSelectionKeyCode:pe,panActivationKeyCode:me,zoomActivationKeyCode:de,onlyRenderVisibleElements:Te,defaultViewport:Io,translateExtent:un,minZoom:Qt,maxZoom:ut,preventScrolling:Ct,zoomOnScroll:Fu,zoomOnPinch:Uo,zoomOnDoubleClick:oo,panOnScroll:Po,panOnScrollSpeed:Pn,panOnScrollMode:$o,panOnDrag:Zu,onPaneClick:Ki,onPaneMouseEnter:Qi,onPaneMouseMove:rs,onPaneMouseLeave:ao,onPaneScroll:Ku,onPaneContextMenu:Wi,paneClickDistance:os,nodeClickDistance:as,onSelectionContextMenu:z,onSelectionStart:H,onSelectionEnd:V,onReconnect:Ji,onReconnectStart:Qu,onReconnectEnd:En,onEdgeContextMenu:mt,onEdgeDoubleClick:Nt,onEdgeMouseEnter:yr,onEdgeMouseMove:is,onEdgeMouseLeave:Wu,reconnectRadius:Ju,defaultMarkerColor:Xu,noDragClassName:ls,noWheelClassName:vr,noPanClassName:$n,rfId:io,disableKeyboardA11y:cs,nodeExtent:ns,viewport:nd,onViewportChange:al}),u.jsx(rz,{nodes:e,edges:r,defaultNodes:o,defaultEdges:s,onConnect:b,onConnectStart:N,onConnectEnd:S,onClickConnectStart:C,onClickConnectEnd:j,nodesDraggable:Ne,autoPanOnNodeFocus:ct,nodesConnectable:Tt,nodesFocusable:kt,edgesFocusable:ro,edgesReconnectable:xr,elementsSelectable:ts,elevateNodesOnSelect:wr,elevateEdgesOnSelect:ed,minZoom:Qt,maxZoom:ut,nodeExtent:ns,onNodesChange:el,onEdgesChange:so,snapToGrid:he,snapGrid:ge,connectionMode:I,translateExtent:un,connectOnClick:at,defaultEdgeOptions:Yn,fitView:br,fitViewOptions:Vn,onNodesDelete:re,onEdgesDelete:Z,onDelete:Y,onNodeDragStart:B,onNodeDrag:U,onNodeDragStop:G,onSelectionDrag:P,onSelectionDragStart:O,onSelectionDragStop:T,onMove:g,onMoveStart:v,onMoveEnd:y,noPanClassName:$n,nodeOrigin:cn,rfId:io,autoPanOnConnect:rl,autoPanOnNodeDrag:td,autoPanSpeed:Vo,onError:us,connectionRadius:Yo,isValidConnection:dn,selectNodesOnDrag:Ae,nodeDragThreshold:ds,connectionDragThreshold:fs,onBeforeDelete:M,paneClickDistance:os,debug:qo,ariaLabelConfig:Go}),u.jsx(J6,{onSelectionChange:ee}),ss,u.jsx(F6,{proOptions:nl,position:tl}),u.jsx(X6,{rfId:io,disableKeyboardA11y:cs})]})})}var _8=z2(E8);function C8(e){const[r,o]=w.useState(e),s=w.useCallback(i=>o(c=>D2(i,c)),[]);return[r,o,s]}function j8(e){const[r,o]=w.useState(e),s=w.useCallback(i=>o(c=>O2(i,c)),[]);return[r,o,s]}function A8({dimensions:e,lineWidth:r,variant:o,className:s}){return u.jsx("path",{strokeWidth:r,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:lt(["react-flow__background-pattern",o,s])})}function M8({radius:e,className:r}){return u.jsx("circle",{cx:e,cy:e,r:e,className:lt(["react-flow__background-pattern","dots",r])})}var dr;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(dr||(dr={}));const T8={[dr.Dots]:1,[dr.Lines]:1,[dr.Cross]:6},k8=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function aN({id:e,variant:r=dr.Dots,gap:o=20,size:s,lineWidth:i=1,offset:c=0,color:d,bgColor:f,style:m,className:p,patternClassName:g}){const v=w.useRef(null),{transform:y,patternId:b}=Ie(k8,et),N=s||T8[r],S=r===dr.Dots,C=r===dr.Cross,j=Array.isArray(o)?o:[o,o],R=[j[0]*y[2]||1,j[1]*y[2]||1],E=N*y[2],A=Array.isArray(c)?c:[c,c],D=C?[E,E]:R,L=[A[0]*y[2]||1+D[0]/2,A[1]*y[2]||1+D[1]/2],B=`${b}${e||""}`;return u.jsxs("svg",{className:lt(["react-flow__background",p]),style:{...m,...qu,"--xy-background-color-props":f,"--xy-background-pattern-color-props":d},ref:v,"data-testid":"rf__background",children:[u.jsx("pattern",{id:B,x:y[0]%R[0],y:y[1]%R[1],width:R[0],height:R[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${L[0]},-${L[1]})`,children:S?u.jsx(M8,{radius:E/2,className:g}):u.jsx(A8,{dimensions:D,lineWidth:i,variant:r,className:g})}),u.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${B})`})]})}aN.displayName="Background";const R8=w.memo(aN);function D8(){return u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:u.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function O8(){return u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:u.jsx("path",{d:"M0 0h32v4.2H0z"})})}function z8(){return u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:u.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 L8(){return u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:u.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 H8(){return u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:u.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 kc({children:e,className:r,...o}){return u.jsx("button",{type:"button",className:lt(["react-flow__controls-button",r]),...o,children:e})}const B8=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function sN({style:e,showZoom:r=!0,showFitView:o=!0,showInteractive:s=!0,fitViewOptions:i,onZoomIn:c,onZoomOut:d,onFitView:f,onInteractiveChange:m,className:p,children:g,position:v="bottom-left",orientation:y="vertical","aria-label":b}){const N=We(),{isInteractive:S,minZoomReached:C,maxZoomReached:j,ariaLabelConfig:R}=Ie(B8,et),{zoomIn:E,zoomOut:A,fitView:D}=Zi(),L=()=>{E(),c?.()},B=()=>{A(),d?.()},U=()=>{D(i),f?.()},G=()=>{N.setState({nodesDraggable:!S,nodesConnectable:!S,elementsSelectable:!S}),m?.(!S)},re=y==="horizontal"?"horizontal":"vertical";return u.jsxs(Yu,{className:lt(["react-flow__controls",re,p]),position:v,style:e,"data-testid":"rf__controls","aria-label":b??R["controls.ariaLabel"],children:[r&&u.jsxs(u.Fragment,{children:[u.jsx(kc,{onClick:L,className:"react-flow__controls-zoomin",title:R["controls.zoomIn.ariaLabel"],"aria-label":R["controls.zoomIn.ariaLabel"],disabled:j,children:u.jsx(D8,{})}),u.jsx(kc,{onClick:B,className:"react-flow__controls-zoomout",title:R["controls.zoomOut.ariaLabel"],"aria-label":R["controls.zoomOut.ariaLabel"],disabled:C,children:u.jsx(O8,{})})]}),o&&u.jsx(kc,{className:"react-flow__controls-fitview",onClick:U,title:R["controls.fitView.ariaLabel"],"aria-label":R["controls.fitView.ariaLabel"],children:u.jsx(z8,{})}),s&&u.jsx(kc,{className:"react-flow__controls-interactive",onClick:G,title:R["controls.interactive.ariaLabel"],"aria-label":R["controls.interactive.ariaLabel"],children:S?u.jsx(H8,{}):u.jsx(L8,{})}),g]})}sN.displayName="Controls";const I8=w.memo(sN);function U8({id:e,x:r,y:o,width:s,height:i,style:c,color:d,strokeColor:f,strokeWidth:m,className:p,borderRadius:g,shapeRendering:v,selected:y,onClick:b}){const{background:N,backgroundColor:S}=c||{},C=d||N||S;return u.jsx("rect",{className:lt(["react-flow__minimap-node",{selected:y},p]),x:r,y:o,rx:g,ry:g,width:s,height:i,style:{fill:C,stroke:f,strokeWidth:m},shapeRendering:v,onClick:b?j=>b(j,e):void 0})}const P8=w.memo(U8),$8=e=>e.nodes.map(r=>r.id),Uh=e=>e instanceof Function?e:()=>e;function V8({nodeStrokeColor:e,nodeColor:r,nodeClassName:o="",nodeBorderRadius:s=5,nodeStrokeWidth:i,nodeComponent:c=P8,onClick:d}){const f=Ie($8,et),m=Uh(r),p=Uh(e),g=Uh(o),v=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return u.jsx(u.Fragment,{children:f.map(y=>u.jsx(q8,{id:y,nodeColorFunc:m,nodeStrokeColorFunc:p,nodeClassNameFunc:g,nodeBorderRadius:s,nodeStrokeWidth:i,NodeComponent:c,onClick:d,shapeRendering:v},y))})}function Y8({id:e,nodeColorFunc:r,nodeStrokeColorFunc:o,nodeClassNameFunc:s,nodeBorderRadius:i,nodeStrokeWidth:c,shapeRendering:d,NodeComponent:f,onClick:m}){const{node:p,x:g,y:v,width:y,height:b}=Ie(N=>{const{internals:S}=N.nodeLookup.get(e),C=S.userNode,{x:j,y:R}=S.positionAbsolute,{width:E,height:A}=gr(C);return{node:C,x:j,y:R,width:E,height:A}},et);return!p||p.hidden||!l2(p)?null:u.jsx(f,{x:g,y:v,width:y,height:b,style:p.style,selected:!!p.selected,className:s(p),color:r(p),borderRadius:i,strokeColor:o(p),strokeWidth:c,shapeRendering:d,onClick:m,id:p.id})}const q8=w.memo(Y8);var G8=w.memo(V8);const X8=200,F8=150,Z8=e=>!e.hidden,K8=e=>{const r={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:r,boundingRect:e.nodeLookup.size>0?i2(Gi(e.nodeLookup,{filter:Z8}),r):r,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},Q8="react-flow__minimap-desc";function iN({style:e,className:r,nodeStrokeColor:o,nodeColor:s,nodeClassName:i="",nodeBorderRadius:c=5,nodeStrokeWidth:d,nodeComponent:f,bgColor:m,maskColor:p,maskStrokeColor:g,maskStrokeWidth:v,position:y="bottom-right",onClick:b,onNodeClick:N,pannable:S=!1,zoomable:C=!1,ariaLabel:j,inversePan:R,zoomStep:E=1,offsetScale:A=5}){const D=We(),L=w.useRef(null),{boundingRect:B,viewBB:U,rfId:G,panZoom:re,translateExtent:Z,flowWidth:Y,flowHeight:ee,ariaLabelConfig:O}=Ie(K8,et),P=e?.width??X8,T=e?.height??F8,z=B.width/P,H=B.height/T,V=Math.max(z,H),M=V*P,I=V*T,W=A*V,K=B.x-(M-B.width)/2-W,ne=B.y-(I-B.height)/2-W,fe=M+W*2,ue=I+W*2,q=`${Q8}-${G}`,Q=w.useRef(0),se=w.useRef();Q.current=V,w.useEffect(()=>{if(L.current&&re)return se.current=f6({domNode:L.current,panZoom:re,getTransform:()=>D.getState().transform,getViewScale:()=>Q.current}),()=>{se.current?.destroy()}},[re]),w.useEffect(()=>{se.current?.update({translateExtent:Z,width:Y,height:ee,inversePan:R,pannable:S,zoomStep:E,zoomable:C})},[S,C,R,E,Z,Y,ee]);const me=b?he=>{const[ge,Te]=se.current?.pointer(he)||[0,0];b(he,{x:ge,y:Te})}:void 0,pe=N?w.useCallback((he,ge)=>{const Te=D.getState().nodeLookup.get(ge).internals.userNode;N(he,Te)},[]):void 0,de=j??O["minimap.ariaLabel"];return u.jsx(Yu,{position:y,style:{...e,"--xy-minimap-background-color-props":typeof m=="string"?m:void 0,"--xy-minimap-mask-background-color-props":typeof p=="string"?p:void 0,"--xy-minimap-mask-stroke-color-props":typeof g=="string"?g:void 0,"--xy-minimap-mask-stroke-width-props":typeof v=="number"?v*V:void 0,"--xy-minimap-node-background-color-props":typeof s=="string"?s:void 0,"--xy-minimap-node-stroke-color-props":typeof o=="string"?o:void 0,"--xy-minimap-node-stroke-width-props":typeof d=="number"?d:void 0},className:lt(["react-flow__minimap",r]),"data-testid":"rf__minimap",children:u.jsxs("svg",{width:P,height:T,viewBox:`${K} ${ne} ${fe} ${ue}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":q,ref:L,onClick:me,children:[de&&u.jsx("title",{id:q,children:de}),u.jsx(G8,{onClick:pe,nodeColor:s,nodeStrokeColor:o,nodeBorderRadius:c,nodeClassName:i,nodeStrokeWidth:d,nodeComponent:f}),u.jsx("path",{className:"react-flow__minimap-mask",d:`M${K-W},${ne-W}h${fe+W*2}v${ue+W*2}h${-fe-W*2}z
|
|
402
|
+
M${U.x},${U.y}h${U.width}v${U.height}h${-U.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}iN.displayName="MiniMap";const W8=w.memo(iN),J8=e=>r=>e?`${Math.max(1/r.transform[2],1)}`:void 0,eL={[Fa.Line]:"right",[Fa.Handle]:"bottom-right"};function tL({nodeId:e,position:r,variant:o=Fa.Handle,className:s,style:i=void 0,children:c,color:d,minWidth:f=10,minHeight:m=10,maxWidth:p=Number.MAX_VALUE,maxHeight:g=Number.MAX_VALUE,keepAspectRatio:v=!1,resizeDirection:y,autoScale:b=!0,shouldResize:N,onResizeStart:S,onResize:C,onResizeEnd:j}){const R=I2(),E=typeof e=="string"?e:R,A=We(),D=w.useRef(null),L=o===Fa.Handle,B=Ie(w.useCallback(J8(L&&b),[L,b]),et),U=w.useRef(null),G=r??eL[o];w.useEffect(()=>{if(!(!D.current||!E))return U.current||(U.current=A6({domNode:D.current,nodeId:E,getStoreItems:()=>{const{nodeLookup:Z,transform:Y,snapGrid:ee,snapToGrid:O,nodeOrigin:P,domNode:T}=A.getState();return{nodeLookup:Z,transform:Y,snapGrid:ee,snapToGrid:O,nodeOrigin:P,paneDomNode:T}},onChange:(Z,Y)=>{const{triggerNodeChanges:ee,nodeLookup:O,parentLookup:P,nodeOrigin:T}=A.getState(),z=[],H={x:Z.x,y:Z.y},V=O.get(E);if(V&&V.expandParent&&V.parentId){const M=V.origin??T,I=Z.width??V.measured.width??0,W=Z.height??V.measured.height??0,K={id:V.id,parentId:V.parentId,rect:{width:I,height:W,...c2({x:Z.x??V.position.x,y:Z.y??V.position.y},{width:I,height:W},V.parentId,O,M)}},ne=jp([K],O,P,T);z.push(...ne),H.x=Z.x?Math.max(M[0]*I,Z.x):void 0,H.y=Z.y?Math.max(M[1]*W,Z.y):void 0}if(H.x!==void 0&&H.y!==void 0){const M={id:E,type:"position",position:{...H}};z.push(M)}if(Z.width!==void 0&&Z.height!==void 0){const I={id:E,type:"dimensions",resizing:!0,setAttributes:y?y==="horizontal"?"width":"height":!0,dimensions:{width:Z.width,height:Z.height}};z.push(I)}for(const M of Y){const I={...M,type:"position"};z.push(I)}ee(z)},onEnd:({width:Z,height:Y})=>{const ee={id:E,type:"dimensions",resizing:!1,dimensions:{width:Z,height:Y}};A.getState().triggerNodeChanges([ee])}})),U.current.update({controlPosition:G,boundaries:{minWidth:f,minHeight:m,maxWidth:p,maxHeight:g},keepAspectRatio:v,resizeDirection:y,onResizeStart:S,onResize:C,onResizeEnd:j,shouldResize:N}),()=>{U.current?.destroy()}},[G,f,m,p,g,v,S,C,j,N]);const re=G.split("-");return u.jsx("div",{className:lt(["react-flow__resize-control","nodrag",...re,o,s]),ref:D,style:{...i,scale:B,...d&&{[L?"backgroundColor":"borderColor"]:d}},children:c})}w.memo(tL);const nL=e=>{switch(e){case"running":return{borderColor:"border-[#643FB2] dark:border-[#8B5CF6]",glow:"shadow-lg shadow-[#643FB2]/20",badgeColor:"bg-[#643FB2] dark:bg-[#8B5CF6]"};case"completed":return{borderColor:"border-green-500 dark:border-green-400",glow:"shadow-lg shadow-green-500/20",badgeColor:"bg-green-500 dark:bg-green-400"};case"failed":return{borderColor:"border-red-500 dark:border-red-400",glow:"shadow-lg shadow-red-500/20",badgeColor:"bg-red-500 dark:bg-red-400"};case"cancelled":return{borderColor:"border-orange-500 dark:border-orange-400",glow:"shadow-lg shadow-orange-500/20",badgeColor:"bg-orange-500 dark:bg-orange-400"};case"pending":default:return{borderColor:"border-gray-300 dark:border-gray-600",glow:"",badgeColor:"bg-gray-400 dark:bg-gray-500"}}},lN=w.memo(({data:e,selected:r})=>{const o=e,s=nL(o.state),i=o.inputData||o.outputData||o.error,c=o.state==="running",d=o.layoutDirection==="TB",f=d?Se.Top:Se.Left,m=d?Se.Bottom:Se.Right,p=()=>{const g=[];if(o.error&&typeof o.error=="string"&&g.push(u.jsxs("div",{className:"mb-2",children:[u.jsx("div",{className:"text-xs font-medium text-red-600 dark:text-red-400 mb-1",children:"Error:"}),u.jsx("div",{className:"text-xs text-red-600 dark:text-red-400 bg-red-50 dark:bg-red-950/20 p-2 rounded border border-red-200 dark:border-red-800",children:o.error})]},"error")),o.outputData)try{const v=typeof o.outputData=="string"?o.outputData:JSON.stringify(o.outputData,null,2);g.push(u.jsxs("div",{className:"mb-2",children:[u.jsx("div",{className:"text-xs font-medium text-green-600 dark:text-green-400 mb-1",children:"Output:"}),u.jsx("div",{className:"text-xs text-gray-700 dark:text-gray-300 bg-green-50 dark:bg-green-950/20 p-2 rounded border border-green-200 dark:border-green-800 max-h-20 overflow-auto",children:u.jsx("pre",{className:"whitespace-pre-wrap font-mono",children:v})})]},"output"))}catch{g.push(u.jsxs("div",{className:"mb-2",children:[u.jsx("div",{className:"text-xs font-medium text-green-600 dark:text-green-400 mb-1",children:"Output:"}),u.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400 bg-green-50 dark:bg-green-950/20 p-2 rounded border border-green-200 dark:border-green-800",children:"[Unable to display output data]"})]},"output"))}if(o.inputData)try{const v=typeof o.inputData=="string"?o.inputData:JSON.stringify(o.inputData,null,2);g.push(u.jsxs("div",{className:"mb-2",children:[u.jsx("div",{className:"text-xs font-medium text-blue-600 dark:text-blue-400 mb-1",children:"Input:"}),u.jsx("div",{className:"text-xs text-gray-700 dark:text-gray-300 bg-blue-50 dark:bg-blue-950/20 p-2 rounded border border-blue-200 dark:border-blue-800 max-h-20 overflow-auto",children:u.jsx("pre",{className:"whitespace-pre-wrap font-mono",children:v})})]},"input"))}catch{g.push(u.jsxs("div",{className:"mb-2",children:[u.jsx("div",{className:"text-xs font-medium text-blue-600 dark:text-blue-400 mb-1",children:"Input:"}),u.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400 bg-blue-50 dark:bg-blue-950/20 p-2 rounded border border-blue-200 dark:border-blue-800",children:"[Unable to display input data]"})]},"input"))}return g.length>0?g:null};return u.jsxs("div",{className:He("group relative w-64 bg-card dark:bg-card rounded border-2 transition-all duration-200",s.borderColor,r?"ring-2 ring-blue-500 ring-offset-2":"",c?s.glow:"shadow-sm"),children:[!o.isStartNode&&u.jsx(Za,{type:"target",position:f,className:"!w-2 !h-2 !rounded-full !border !border-gray-600 dark:!border-gray-500 transition-colors !min-w-0 !min-h-0",style:{backgroundColor:o.state==="running"?"#643FB2":o.state==="completed"?"#10b981":o.state==="failed"?"#ef4444":o.state==="cancelled"?"#f97316":"#4b5563"}}),!o.isEndNode&&u.jsx(Za,{type:"source",position:m,className:"!w-2 !h-2 !rounded-full !border !border-gray-600 dark:!border-gray-500 transition-colors !min-w-0 !min-h-0",style:{backgroundColor:o.state==="running"?"#643FB2":o.state==="completed"?"#10b981":o.state==="failed"?"#ef4444":o.state==="cancelled"?"#f97316":"#4b5563"}}),u.jsxs("div",{className:"p-3",children:[u.jsxs("div",{className:"flex items-start gap-3",children:[u.jsxs("div",{className:"flex-shrink-0 relative",children:[u.jsx("div",{className:"w-10 h-10 rounded-lg bg-gray-900/90 dark:bg-gray-800/90 flex items-center justify-center",children:o.isStartNode?u.jsx(QT,{className:"w-5 h-5 text-[#643FB2] dark:text-[#8B5CF6]"}):u.jsx(Ua,{className:"w-5 h-5 text-gray-300 dark:text-gray-400"})}),c&&u.jsx("div",{className:He("absolute -top-1 -right-1 w-3 h-3 rounded-full animate-pulse",s.badgeColor)})]}),u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsx("h3",{className:"font-medium text-sm text-gray-900 dark:text-gray-100 truncate",children:o.name||o.executorId}),o.executorType&&u.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 truncate mt-0.5",children:o.executorType})]})]}),i&&u.jsx("div",{className:"mt-3",children:p()}),c&&u.jsx("div",{className:"absolute inset-0 rounded border-2 border-[#643FB2]/30 dark:border-[#8B5CF6]/30 animate-pulse pointer-events-none"})]})]})});lN.displayName="ExecutorNode";function rL(e,r,o="LR"){if(e.length===0)return e;if(e.length===1)return e.map(N=>({...N,position:{x:0,y:0}}));const s=new Map,i=new Map;e.forEach(N=>{s.set(N.id,[]),i.set(N.id,[])}),r.forEach(N=>{s.get(N.source)?.push(N.target),i.get(N.target)?.push(N.source)});const c=e.filter(N=>(i.get(N.id)||[]).length===0);c.length===0&&c.push(e[0]);const d=220,f=120,m=o==="LR"?350:280,p=o==="TB"?250:180,g=new Map,v=new Map,y=[],b=new Set;for(c.forEach(N=>{y.push({nodeId:N.id,level:0})});y.length>0;){const{nodeId:N,level:S}=y.shift();if(b.has(N))continue;b.add(N),v.has(S)||v.set(S,[]),v.get(S).push(N),(s.get(N)||[]).forEach(j=>{b.has(j)||y.push({nodeId:j,level:S+1})})}return e.forEach(N=>{if(!b.has(N.id)){const C=Math.max(...Array.from(v.keys()),-1)+1;v.has(C)||v.set(C,[]),v.get(C).push(N.id)}}),v.forEach((N,S)=>{const C=N.length;N.forEach((j,R)=>{let E,A;o==="LR"?(E=S*m,A=-((C-1)*p)/2+R*p):(A=S*p,E=-((C-1)*m)/2+R*m),g.set(j,{x:E,y:A,level:S})})}),e.map(N=>{const S=g.get(N.id)||{x:0,y:0};return{...N,position:{x:S.x-d/2,y:S.y-f/2}}})}function oL(e){return typeof e=="object"&&e!==null&&"id"in e&&"edge_groups"in e&&"executors"in e&&"start_executor_id"in e&&"max_iterations"in e&&typeof e.id=="string"&&Array.isArray(e.edge_groups)&&typeof e.executors=="object"&&typeof e.start_executor_id=="string"&&typeof e.max_iterations=="number"}function cN(e){return oL(e)?e:null}function bm(e,r,o){if(!e)return console.warn("convertWorkflowDumpToNodes: workflowDump is undefined"),[];const s=cN(e);let i,c;return s?(i=Object.values(s.executors).map(f=>({id:f.id,type:f.type,name:f.name||f.id,description:f.description,config:f.config})),c=s.start_executor_id):(i=uN(e),c=e?.start_executor_id),!i||!Array.isArray(i)||i.length===0?(console.warn("No executors found in workflow dump. Available keys:",Object.keys(e)),[]):i.map(f=>({id:f.id,type:"executor",position:{x:0,y:0},data:{executorId:f.id,executorType:f.type,name:f.name||f.id,state:"pending",isStartNode:f.id===c,layoutDirection:o||"LR",onNodeClick:r}}))}function wm(e){if(!e)return console.warn("convertWorkflowDumpToEdges: workflowDump is undefined"),[];const r=cN(e);let o;return r?(o=[],r.edge_groups.forEach(i=>{i.edges.forEach(c=>{o.push({source:c.source_id,target:c.target_id,condition:c.condition_name})})})):o=dN(e),!o||!Array.isArray(o)||o.length===0?(console.warn("No connections found in workflow dump. Available keys:",Object.keys(e)),[]):o.map(i=>({id:`${i.source}-${i.target}`,source:i.source,target:i.target,type:"default",animated:!1,style:{stroke:"#6b7280",strokeWidth:2}}))}function uN(e){if(e.executors&&typeof e.executors=="object"&&!Array.isArray(e.executors)){const s=e.executors;return Object.entries(s).map(([i,c])=>({id:i,type:c.type_||c.type||"executor",name:c.name||i,description:c.description,config:c.config}))}const r=["executors","agents","steps","nodes"];for(const s of r)if(e[s]&&Array.isArray(e[s]))return e[s];if(e.config&&typeof e.config=="object")return uN(e.config);const o=[];return Object.entries(e).forEach(([s,i])=>{if(typeof i=="object"&&i!==null&&("type"in i||"type_"in i)){const c=i;o.push({id:s,type:c.type_||c.type||"executor",name:c.name||s,description:c.description,config:c.config})}}),o}function dN(e){if(e.edge_groups&&Array.isArray(e.edge_groups)){const o=[];return e.edge_groups.forEach(s=>{if(typeof s=="object"&&s!==null&&"edges"in s){const i=s.edges;Array.isArray(i)&&i.forEach(c=>{if(typeof c=="object"&&c!==null&&"source_id"in c&&"target_id"in c){const d=c;o.push({source:d.source_id,target:d.target_id,condition:d.condition_name||void 0})}})}}),o}const r=["connections","edges","transitions","links"];for(const o of r)if(e[o]&&Array.isArray(e[o]))return e[o];return e.config&&typeof e.config=="object"?dN(e.config):[]}function Sm(e,r,o="LR"){return rL(e,r,o)}function aL(e){const r={};return e.forEach(o=>{if(o.type==="response.workflow_event.complete"&&"data"in o&&o.data){const i=o.data,c=i.executor_id,d=i.event_type,f=i.data;let m="pending",p;d==="ExecutorInvokedEvent"?m="running":d==="ExecutorCompletedEvent"?m="completed":d?.includes("Error")||d?.includes("Failed")?(m="failed",p=typeof f=="string"?f:"Execution failed"):d?.includes("Cancel")?m="cancelled":(d==="WorkflowCompletedEvent"||d==="WorkflowOutputEvent")&&(m="completed"),c&&(r[c]={nodeId:c,state:m,data:f,error:p,timestamp:new Date().toISOString()})}}),r}function sL(e,r){return e.map(o=>{const s=r[o.id];return s?{...o,data:{...o.data,state:s.state,outputData:s.data,error:s.error,layoutDirection:o.data.layoutDirection}}:o})}function iL(e){const r={};return e.forEach(s=>{if(s.type==="response.workflow_event.complete"&&"data"in s&&s.data){const c=s.data,d=c.executor_id,f=c.event_type;d&&(f==="ExecutorInvokedEvent"||f==="ExecutorCompletedEvent")&&(r[d]={lastEvent:f,timestamp:new Date().toISOString()})}}),Object.entries(r).filter(([,s])=>s.lastEvent==="ExecutorInvokedEvent").map(([s])=>s)}function lL(e,r){const o=iL(r),s={};return r.forEach(i=>{if(i.type==="response.workflow_event.complete"&&"data"in i&&i.data){const d=i.data,f=d.executor_id,m=d.event_type;f&&m&&(s[f]||(s[f]={completed:!1,invoked:!1}),m==="ExecutorInvokedEvent"?s[f].invoked=!0:m==="ExecutorCompletedEvent"&&(s[f].completed=!0))}}),e.map(i=>{const c=s[i.source],d=s[i.target],f=o.includes(i.target);let m={...i.style},p=!1;return c?.completed&&f?(m={stroke:"#643FB2",strokeWidth:3,strokeDasharray:"5,5"},p=!0):c?.completed&&d?.completed?m={stroke:"#10b981",strokeWidth:2}:c?.completed&&d?.invoked?m={stroke:"#f59e0b",strokeWidth:2}:m={stroke:"#6b7280",strokeWidth:2},{...i,style:m,animated:p}})}const cL={executor:lN};function uL({workflowDump:e,onNodeSelect:r,viewOptions:o,onToggleViewOption:s,layoutDirection:i,onLayoutDirectionChange:c}){const{fitView:d,setViewport:f,setNodes:m}=Zi(),p=()=>{f({x:0,y:0,zoom:1})},g=()=>{d({padding:.2})},v=()=>{if(!e)return;const y=bm(e,r,i),b=wm(e),N=Sm(y,b,i);m(N)};return u.jsx("div",{className:"absolute top-4 right-4 z-10",children:u.jsxs(Km,{children:[u.jsx(Qm,{asChild:!0,children:u.jsxs(Ze,{variant:"outline",size:"sm",className:"h-8 w-8 p-0 bg-white/90 backdrop-blur-sm border-gray-200 shadow-sm hover:bg-white dark:bg-gray-800/90 dark:border-gray-600 dark:hover:bg-gray-800",children:[u.jsx($T,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"View options"})]})}),u.jsxs(Wm,{align:"end",className:"w-56",children:[u.jsxs(Bt,{className:"flex items-center justify-between",onClick:()=>s?.("showMinimap"),children:[u.jsxs("div",{className:"flex items-center",children:[u.jsx(sk,{className:"mr-2 h-4 w-4"}),"Show Minimap"]}),u.jsx(mi,{checked:o.showMinimap,onChange:()=>{}})]}),u.jsxs(Bt,{className:"flex items-center justify-between",onClick:()=>s?.("showGrid"),children:[u.jsxs("div",{className:"flex items-center",children:[u.jsx(ZT,{className:"mr-2 h-4 w-4"}),"Show Grid"]}),u.jsx(mi,{checked:o.showGrid,onChange:()=>{}})]}),u.jsxs(Bt,{className:"flex items-center justify-between",onClick:()=>s?.("animateRun"),children:[u.jsxs("div",{className:"flex items-center",children:[u.jsx(n1,{className:"mr-2 h-4 w-4"}),"Animate Run"]}),u.jsx(mi,{checked:o.animateRun,onChange:()=>{}})]}),u.jsx(eu,{}),u.jsxs(Bt,{className:"flex items-center justify-between",onClick:()=>{const y=i==="LR"?"TB":"LR";if(c?.(y),e){const b=bm(e,r,y),N=wm(e),S=Sm(b,N,y);m(S)}},children:[u.jsxs("div",{className:"flex items-center",children:[u.jsx(ET,{className:"mr-2 h-4 w-4"}),"Vertical Layout"]}),u.jsx(mi,{checked:i==="TB",onChange:()=>{}})]}),u.jsx(eu,{}),u.jsxs(Bt,{onClick:p,children:[u.jsx(Zm,{className:"mr-2 h-4 w-4"}),"Reset Zoom"]}),u.jsxs(Bt,{onClick:g,children:[u.jsx(lk,{className:"mr-2 h-4 w-4"}),"Fit to Screen"]}),u.jsxs(Bt,{onClick:v,children:[u.jsx(Ak,{className:"mr-2 h-4 w-4"}),"Auto-arrange"]})]})]})})}function dL({nodes:e,nodeUpdates:r,isStreaming:o,animateRun:s}){const{fitView:i}=Zi();return w.useEffect(()=>{if(s)if(o){const c=e.filter(d=>d.data.state==="running");if(c.length>0){const d=c[0];i({nodes:[d],duration:800,padding:.3,minZoom:.8,maxZoom:1.5})}}else e.length>0&&i({duration:1e3,padding:.2})},[r,o,s,e]),null}function fL({workflowDump:e,events:r,isStreaming:o,onNodeSelect:s,className:i="",viewOptions:c={showMinimap:!1,showGrid:!0,animateRun:!0},onToggleViewOption:d,layoutDirection:f="LR",onLayoutDirectionChange:m}){const{initialNodes:p,initialEdges:g}=w.useMemo(()=>{if(!e)return{initialNodes:[],initialEdges:[]};const E=bm(e,s,f),A=wm(e);return{initialNodes:E.length>0?Sm(E,A,f):E,initialEdges:A}},[e,s,f]),[v,y,b]=C8(p),[N,S,C]=j8(g),j=w.useMemo(()=>aL(r),[r]);w.useMemo(()=>{Object.keys(j).length>0?y(E=>sL(E,j)):r.length===0&&y(E=>E.map(A=>({...A,data:{...A.data,state:"pending",outputData:void 0,error:void 0}})))},[j,y,r.length]),w.useMemo(()=>{r.length>0?S(E=>lL(E,r)):S(E=>E.map(A=>({...A,animated:!1,style:{stroke:"#6b7280",strokeWidth:2}})))},[r,S]),w.useEffect(()=>{p.length>0&&(y(p),S(g))},[e]);const R=w.useCallback((E,A)=>{E.stopPropagation(),s?.(A.data.executorId,A.data)},[s]);return e?p.length===0?u.jsx("div",{className:`flex items-center justify-center h-full bg-gray-50 dark:bg-gray-900 rounded border border-gray-200 dark:border-gray-700 ${i}`,children:u.jsxs("div",{className:"text-center text-gray-500 dark:text-gray-400",children:[u.jsx("div",{className:"text-lg font-medium mb-2",children:"No Executors Found"}),u.jsx("div",{className:"text-sm",children:"Could not extract executors from workflow dump."}),u.jsxs("details",{className:"mt-2 text-xs",children:[u.jsx("summary",{className:"cursor-pointer",children:"Debug Info"}),u.jsx("pre",{className:"mt-1 p-2 bg-gray-100 dark:bg-gray-800 rounded text-left overflow-auto",children:JSON.stringify(e,null,2)})]})]})}):u.jsxs("div",{className:`h-full w-full ${i}`,children:[u.jsxs(_8,{nodes:v,edges:N,onNodesChange:b,onEdgesChange:C,onNodeClick:R,nodeTypes:cL,fitView:!0,fitViewOptions:{padding:.2},minZoom:.1,maxZoom:1.5,defaultEdgeOptions:{type:"default",animated:!1,style:{stroke:"#6b7280",strokeWidth:2}},nodesDraggable:!o,nodesConnectable:!1,elementsSelectable:!0,proOptions:{hideAttribution:!0},children:[c.showGrid&&u.jsx(R8,{variant:dr.Dots,gap:20,size:1,color:"#e5e7eb",className:"dark:opacity-30"}),u.jsx(I8,{position:"bottom-left",showInteractive:!1,style:{backgroundColor:"rgba(255, 255, 255, 0.9)",border:"1px solid #e5e7eb",borderRadius:"3px"},className:"dark:!bg-gray-800/90 dark:!border-gray-600"}),c.showMinimap&&u.jsx(W8,{nodeColor:E=>{switch(E.data?.state){case"running":return"#643FB2";case"completed":return"#10b981";case"failed":return"#ef4444";case"cancelled":return"#f97316";default:return"#6b7280"}},maskColor:"rgba(0, 0, 0, 0.1)",position:"bottom-right",style:{backgroundColor:"rgba(255, 255, 255, 0.9)",border:"1px solid #e5e7eb",borderRadius:"8px"},className:"dark:!bg-gray-800/90 dark:!border-gray-600"}),u.jsx(dL,{nodes:v,nodeUpdates:j,isStreaming:o,animateRun:c.animateRun}),u.jsx(uL,{workflowDump:e,onNodeSelect:s,viewOptions:c,onToggleViewOption:d,layoutDirection:f,onLayoutDirectionChange:m})]}),u.jsx("style",{children:`
|
|
403
|
+
.react-flow__edge-path {
|
|
404
|
+
transition: stroke 0.3s ease, stroke-width 0.3s ease;
|
|
405
|
+
}
|
|
406
|
+
.react-flow__edge.animated .react-flow__edge-path {
|
|
407
|
+
stroke-dasharray: 5 5;
|
|
408
|
+
animation: dash 1s linear infinite;
|
|
409
|
+
}
|
|
410
|
+
@keyframes dash {
|
|
411
|
+
0% { stroke-dashoffset: 0; }
|
|
412
|
+
100% { stroke-dashoffset: -10; }
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
/* Dark theme styles for React Flow controls */
|
|
416
|
+
.dark .react-flow__controls {
|
|
417
|
+
background-color: rgba(31, 41, 55, 0.9) !important;
|
|
418
|
+
border-color: rgb(75, 85, 99) !important;
|
|
419
|
+
}
|
|
420
|
+
.dark .react-flow__controls-button {
|
|
421
|
+
background-color: rgba(31, 41, 55, 0.9) !important;
|
|
422
|
+
border-color: rgb(75, 85, 99) !important;
|
|
423
|
+
color: rgb(229, 231, 235) !important;
|
|
424
|
+
}
|
|
425
|
+
.dark .react-flow__controls-button:hover {
|
|
426
|
+
background-color: rgba(55, 65, 81, 0.9) !important;
|
|
427
|
+
color: rgb(255, 255, 255) !important;
|
|
428
|
+
}
|
|
429
|
+
.dark .react-flow__controls-button svg {
|
|
430
|
+
fill: rgb(229, 231, 235) !important;
|
|
431
|
+
}
|
|
432
|
+
.dark .react-flow__controls-button:hover svg {
|
|
433
|
+
fill: rgb(255, 255, 255) !important;
|
|
434
|
+
}
|
|
435
|
+
`})]}):u.jsx("div",{className:`flex items-center justify-center h-full bg-gray-50 dark:bg-gray-900 rounded border border-gray-200 dark:border-gray-700 ${i}`,children:u.jsxs("div",{className:"text-center text-gray-500 dark:text-gray-400",children:[u.jsx("div",{className:"text-lg font-medium mb-2",children:"No Workflow Data"}),u.jsx("div",{className:"text-sm",children:"Workflow dump is not available."})]})})}function hL(e,r){const[o,s]=w.useState(null),{executors:i,recentlyActive:c,isWorkflowRunning:d}=w.useMemo(()=>{const g={},v=[];let y=r;return e.forEach(b=>{if(b.type==="response.workflow_event.complete"&&"data"in b&&b.data){const N=b.data,S=N.executor_id;if(!S)return;g[S]||(g[S]={executorId:S,state:"pending",timestamp:new Date().toISOString()});const C=g[S],j=N.event_type;j==="ExecutorInvokedEvent"?(C.state="running",C.inputData=N.data,v.includes(S)||v.push(S)):j==="ExecutorCompletedEvent"?(C.state="completed",C.outputData=N.data):j?.includes("Error")||j?.includes("Failed")?(C.state="failed",C.error=typeof N.data=="string"?N.data:"Execution failed"):j?.includes("Cancel")&&(C.state="cancelled"),C.timestamp=new Date().toISOString()}}),{executors:g,recentlyActive:v.slice(-3),isWorkflowRunning:y}},[e,r]),f=w.useCallback(g=>{s(g)},[]),m=w.useCallback(g=>i[g]||null,[i]),p=w.useCallback(g=>e.filter(v=>v.type==="response.workflow_event.complete"&&"data"in v&&v.data?v.data.executor_id===g:!1),[e]);return{isWorkflowRunning:d,selectedExecutorId:o,recentlyActive:c,selectExecutor:f,getExecutorData:m,getExecutorEvents:p}}function mL({inputSchema:e,onRun:r,isSubmitting:o,workflowState:s}){const[i,c]=w.useState(!1);w.useEffect(()=>{const y=b=>{b.key==="Escape"&&i&&c(!1)};if(i)return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[i]);const d=w.useMemo(()=>{if(!e)return{needsInput:!1,hasDefaults:!1,fieldCount:0};if(e.type==="string")return{needsInput:!e.default,hasDefaults:!!e.default,fieldCount:1,canRunDirectly:!!e.default};if(e.type==="object"&&e.properties){const y=e.properties,b=Object.entries(y),N=b.filter(([,S])=>S.default!==void 0||S.enum&&S.enum.length>0);return{needsInput:b.length>0,hasDefaults:N.length>0,fieldCount:b.length,canRunDirectly:N.length===b.length}}return{needsInput:!1,hasDefaults:!1,fieldCount:0,canRunDirectly:!0}},[e]),f=()=>{if(d.canRunDirectly){const y={};e.type==="string"&&e.default?y.input=e.default:e.type==="object"&&e.properties&&Object.entries(e.properties).forEach(([b,N])=>{N.default!==void 0?y[b]=N.default:N.enum&&N.enum.length>0&&(y[b]=N.enum[0])}),r(y)}else c(!0)},m=()=>s==="running"?"Running...":s==="completed"?"Run Again":s==="error"?"Retry":d.fieldCount===0||d.canRunDirectly?"Run Workflow":"Configure & Run",p=()=>s==="running"?u.jsx(Fm,{className:"w-4 h-4 animate-spin"}):s==="error"?u.jsx(Zm,{className:"w-4 h-4"}):d.needsInput&&!d.canRunDirectly?u.jsx(e1,{className:"w-4 h-4"}):u.jsx(xk,{className:"w-4 h-4"}),g=s==="running",v=s==="error"?"destructive":"primary";return u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"flex items-center",children:u.jsxs("div",{className:"flex",children:[u.jsxs(Ze,{onClick:f,disabled:g,variant:v==="destructive"?"destructive":"default",size:"default",className:d.needsInput?"rounded-r-none":"",children:[p(),m()]}),d.needsInput&&u.jsx(Ze,{onClick:()=>c(!0),disabled:g,variant:v==="destructive"?"destructive":"default",size:"icon",className:"rounded-l-none border-l-0 w-9",title:"Configure inputs",children:u.jsx(Sn,{className:"w-4 h-4"})})]})}),u.jsx(sp,{open:i,onOpenChange:c,children:u.jsxs(ip,{className:"w-full max-w-md sm:max-w-lg md:max-w-2xl lg:max-w-4xl xl:max-w-5xl max-h-[90vh] flex flex-col",children:[u.jsxs(lp,{className:"px-8 pt-6",children:[u.jsx(cp,{children:"Configure Workflow Inputs"}),u.jsx(up,{onClose:()=>c(!1)})]}),u.jsx("div",{className:"px-8 py-4 border-b flex-shrink-0",children:u.jsx("div",{className:"text-sm text-muted-foreground",children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("span",{className:"font-medium",children:"Input Type:"}),u.jsx("code",{className:"bg-muted px-3 py-1 text-xs font-mono",children:d.fieldCount===0?"No Input":e.type==="string"?"String":"Object"}),e.type==="object"&&e.properties&&u.jsxs("span",{className:"text-xs text-muted-foreground",children:[Object.keys(e.properties).length," field",Object.keys(e.properties).length!==1?"s":""]})]})})}),u.jsx("div",{className:"px-8 py-6 overflow-y-auto flex-1 min-h-0",children:u.jsx(KR,{inputSchema:e,inputTypeName:"Input",onSubmit:y=>{r(y),c(!1)},isSubmitting:o,className:"embedded"})})]})})]})}function pL({selectedWorkflow:e,onDebugEvent:r}){const[o,s]=w.useState(null),[i,c]=w.useState(!1),[d,f]=w.useState([]),[m,p]=w.useState(!1),[g,v]=w.useState(null),[y,b]=w.useState(""),[N,S]=w.useState(""),C=w.useRef(""),[j,R]=w.useState(!1),[E,A]=w.useState(()=>{const M=localStorage.getItem("workflowBottomPanelHeight");return M?parseInt(M,10):300}),[D,L]=w.useState(!1),[B,U]=w.useState(()=>{const M=localStorage.getItem("workflowViewOptions");return M?JSON.parse(M):{showMinimap:!1,showGrid:!0,animateRun:!1}}),[G,re]=w.useState(()=>localStorage.getItem("workflowLayoutDirection")||"LR"),{selectExecutor:Z,getExecutorData:Y}=hL(d,m);w.useEffect(()=>{localStorage.setItem("workflowViewOptions",JSON.stringify(B))},[B]),w.useEffect(()=>{localStorage.setItem("workflowLayoutDirection",G)},[G]);const ee=M=>{U(I=>({...I,[M]:!I[M]}))};w.useEffect(()=>{const M=async()=>{if(e.type==="workflow"){c(!0);try{const I=await an.getWorkflowInfo(e.id);s(I)}catch(I){console.error("Failed to load workflow info:",I),s(null)}finally{c(!1)}}};f([]),p(!1),v(null),b(""),S(""),C.current="",M()},[e.id,e.type]);const O=(M,I)=>{v(I),Z(M)},P=w.useMemo(()=>d.filter(M=>M.type==="response.workflow_event.complete"),[d]),T=w.useMemo(()=>P.map(M=>{if("data"in M&&M.data&&typeof M.data=="object"){const I=M.data;return{executorId:String(I.executor_id||"unknown"),message:String(I.event_type||"Processing"),timestamp:String(I.timestamp||new Date().toISOString()),status:String(I.event_type||"").includes("Completed")?"completed":String(I.event_type||"").includes("Error")?"error":"running"}}return{executorId:"unknown",message:"Processing",timestamp:new Date().toISOString(),status:"running"}}),[P]),z=w.useMemo(()=>m?T.filter(I=>I.status==="running").slice(-2).map(I=>I.executorId):[],[T,m]);w.useEffect(()=>{localStorage.setItem("workflowBottomPanelHeight",E.toString())},[E]);const H=w.useCallback(M=>{M.preventDefault(),L(!0);const I=M.clientY,W=E,K=fe=>{const ue=I-fe.clientY,q=Math.max(200,Math.min(window.innerHeight*.6,W+ue));A(q)},ne=()=>{L(!1),document.removeEventListener("mousemove",K),document.removeEventListener("mouseup",ne)};document.addEventListener("mousemove",K),document.addEventListener("mouseup",ne)},[E]),V=w.useCallback(async M=>{if(!(!e||e.type!=="workflow")){p(!0),f([]),b(""),S(""),C.current="",r("clear");try{const I={input_data:M},W=an.streamWorkflowExecutionOpenAI(e.id,I);for await(const K of W){if(f(ne=>[...ne,K]),r(K),K.type==="response.output_text.delta"&&"delta"in K&&K.delta&&(C.current+=K.delta,b(C.current)),K.type==="response.workflow_event.complete"&&"data"in K&&K.data){const ne=K.data;(ne.event_type==="WorkflowCompletedEvent"||ne.event_type==="WorkflowOutputEvent")&&ne.data&&b(String(ne.data))}if(K.type==="error"){S("error"in K?String(K.error):"Unknown error");break}}p(!1)}catch(I){console.error("Workflow execution failed:",I),S(I instanceof Error?I.message:"Unknown error"),p(!1)}}},[e,r]);return i?u.jsx(am,{message:"Loading workflow...",description:"Fetching workflow structure and configuration"}):!o?.workflow_dump&&!T.length?u.jsx(am,{message:"Initializing workflow...",description:"Setting up workflow execution environment"}):u.jsxs("div",{className:"workflow-view flex flex-col h-full",children:[u.jsx("div",{className:"flex-1 min-h-0 p-4",children:o?.workflow_dump&&u.jsxs("div",{className:"border border-border rounded bg-card shadow-sm h-full flex flex-col",children:[u.jsxs("div",{className:"border-b border-border px-4 py-3 bg-muted rounded-t flex-shrink-0",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("h3",{className:"text-sm font-medium text-foreground",children:e.name||e.id}),u.jsx(Ze,{variant:"ghost",size:"sm",onClick:()=>R(!j),className:"h-6 w-6 p-0",children:u.jsx(Sn,{className:`h-4 w-4 transition-transform duration-200 ${j?"rotate-180":""}`})})]}),o&&u.jsx("div",{className:"flex items-center gap-3",children:u.jsx(mL,{inputSchema:o.input_schema,onRun:V,isSubmitting:m,workflowState:m?"running":N?"error":T.length>0?"completed":"ready",executorHistory:T,workflowError:N})})]}),e.description&&u.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:e.description}),u.jsx("div",{className:`overflow-hidden transition-all duration-200 ease-in-out ${j?"max-h-40 mt-3":"max-h-0"}`,children:u.jsxs("div",{className:"space-y-2 text-xs",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Jw,{className:"h-3.5 w-3.5 text-muted-foreground"}),u.jsx("span",{className:"text-muted-foreground",children:"Executors:"}),u.jsxs("span",{className:"font-mono",children:[e.executors.length>0?e.executors.slice(0,3).join(", "):"No executors",e.executors.length>3&&"..."]}),u.jsxs("span",{className:"text-muted-foreground",children:["(",e.executors.length,")"]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Ua,{className:"h-3.5 w-3.5 text-muted-foreground"}),u.jsx("span",{className:"text-muted-foreground",children:"Start:"}),u.jsx("span",{className:"font-mono",children:e.start_executor_id})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[e.source==="directory"?u.jsx(Gm,{className:"h-3.5 w-3.5 text-muted-foreground"}):e.source==="in_memory"?u.jsx(Qc,{className:"h-3.5 w-3.5 text-muted-foreground"}):u.jsx(Xm,{className:"h-3.5 w-3.5 text-muted-foreground"}),u.jsx("span",{className:"text-muted-foreground",children:"Source:"}),u.jsx("span",{children:e.source==="directory"?"Local":e.source==="in_memory"?"In-Memory":"Gallery"}),e.module_path&&u.jsxs("span",{className:"text-muted-foreground font-mono text-[11px]",children:["(",e.module_path,")"]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[e.has_env?u.jsx(Cu,{className:"h-3.5 w-3.5 text-orange-500"}):u.jsx(Qh,{className:"h-3.5 w-3.5 text-green-500"}),u.jsx("span",{className:"text-muted-foreground",children:"Environment:"}),u.jsx("span",{children:e.has_env?"Requires environment variables":"No environment variables required"})]})]})})]}),u.jsx("div",{className:"flex-1 min-h-0",children:u.jsx(fL,{workflowDump:o.workflow_dump,events:d,isStreaming:m,onNodeSelect:O,className:"h-full",viewOptions:B,onToggleViewOption:ee,layoutDirection:G,onLayoutDirectionChange:re})})]})}),u.jsx("div",{className:`h-1 cursor-row-resize flex-shrink-0 relative group transition-colors duration-200 ease-in-out ${D?"bg-primary/40":"bg-border hover:bg-primary/20"}`,onMouseDown:H,children:u.jsx("div",{className:"absolute inset-x-0 -top-2 -bottom-2 flex items-center justify-center",children:u.jsx("div",{className:`w-12 h-1 rounded-full transition-all duration-200 ease-in-out ${D?"bg-primary shadow-lg shadow-primary/25":"bg-primary/30 group-hover:bg-primary group-hover:shadow-md group-hover:shadow-primary/20"}`})})}),u.jsx("div",{className:"flex-shrink-0 border-t",style:{height:`${E}px`},children:u.jsx("div",{className:"flex-1 min-w-0 p-4 overflow-auto",children:g||z.length>0||T.length>0||y||N?u.jsxs("div",{className:"h-full flex gap-4",children:[(g||z.length>0||T.length>0)&&u.jsxs("div",{className:`border border-border rounded bg-card shadow-sm flex flex-col ${y||N?"flex-1":"w-full"}`,children:[u.jsx("div",{className:"border-b border-border px-4 py-3 bg-muted rounded-t flex-shrink-0",children:u.jsx("h4",{className:"text-sm font-medium text-foreground",children:g?`Executor: ${g.name||g.executorId}`:m&&z.length>0?"Current Executor":"Last Executor"})}),u.jsx("div",{className:"p-4 overflow-auto flex-1",children:g?u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("div",{className:`w-3 h-3 rounded-full ${g.state==="running"?"bg-[#643FB2] dark:bg-[#8B5CF6] animate-pulse":g.state==="completed"?"bg-green-500 dark:bg-green-400":g.state==="failed"?"bg-red-500 dark:bg-red-400":g.state==="cancelled"?"bg-orange-500 dark:bg-orange-400":"bg-gray-400 dark:bg-gray-500"}`}),u.jsx("span",{className:"text-sm font-medium capitalize text-foreground",children:g.state}),g.executorType&&u.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",g.executorType,")"]})]}),g.inputData!==void 0&&g.inputData!==null&&u.jsxs("div",{children:[u.jsx("h5",{className:"text-xs font-medium text-foreground mb-1",children:"Input Data:"}),u.jsx("pre",{className:"text-xs bg-muted p-2 rounded overflow-x-auto max-h-24",children:String(typeof g.inputData=="string"?g.inputData:(()=>{try{return JSON.stringify(g.inputData,null,2)}catch{return"[Unable to display data]"}})())})]}),g.outputData!==void 0&&g.outputData!==null&&u.jsxs("div",{children:[u.jsx("h5",{className:"text-xs font-medium text-foreground mb-1",children:"Output Data:"}),u.jsx("pre",{className:"text-xs bg-muted p-2 rounded overflow-x-auto max-h-24",children:String(typeof g.outputData=="string"?g.outputData:(()=>{try{return JSON.stringify(g.outputData,null,2)}catch{return"[Unable to display data]"}})())})]}),g.error&&u.jsxs("div",{children:[u.jsx("h5",{className:"text-xs font-medium text-destructive mb-1",children:"Error:"}),u.jsx("pre",{className:"text-xs bg-destructive/10 text-destructive p-2 rounded overflow-x-auto",children:g.error})]}),u.jsx("button",{onClick:()=>v(null),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:"← Back to current executor"})]}):(()=>{const M=m&&z.length>0?z[z.length-1]:T.length>0?T[T.length-1].executorId:null;if(!M)return null;const I=Y(M),W=T.find(K=>K.executorId===M);return u.jsxs("div",{className:"space-y-3 cursor-pointer hover:bg-muted/30 p-2 rounded transition-colors",onClick:()=>{I&&v({executorId:I.executorId,state:I.state,inputData:I.inputData,outputData:I.outputData,error:I.error,name:void 0,executorType:void 0,isSelected:!0,isStartNode:!1,onNodeClick:void 0})},children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("div",{className:`w-3 h-3 rounded-full ${m?"bg-[#643FB2] dark:bg-[#8B5CF6] animate-pulse":W?.status==="completed"?"bg-green-500 dark:bg-green-400":W?.status==="error"?"bg-red-500 dark:bg-red-400":"bg-gray-400 dark:bg-gray-500"}`}),u.jsx("span",{className:"text-sm font-medium text-foreground",children:M}),W&&u.jsx("span",{className:"text-xs text-muted-foreground",children:new Date(W.timestamp).toLocaleTimeString()})]}),W&&u.jsx("p",{className:"text-sm text-muted-foreground",children:m?"Processing...":W.message})]})})()})]}),y&&u.jsxs("div",{className:"border-2 border-emerald-300 dark:border-emerald-600 rounded bg-emerald-50 dark:bg-emerald-950/50 shadow flex-1 flex flex-col",children:[u.jsx("div",{className:"border-b border-emerald-300 dark:border-emerald-600 px-4 py-3 bg-emerald-100 dark:bg-emerald-900/50 rounded-t flex-shrink-0",children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(Qh,{className:"w-4 h-4 text-emerald-600 dark:text-emerald-400"}),u.jsx("h4",{className:"text-sm font-semibold text-emerald-800 dark:text-emerald-200",children:"Workflow Complete"})]})}),u.jsx("div",{className:"p-4 overflow-auto flex-1",children:u.jsx("div",{className:"text-emerald-700 dark:text-emerald-300 whitespace-pre-wrap break-words text-sm",children:y})})]}),N&&u.jsxs("div",{className:"border-2 border-destructive/70 rounded bg-destructive/5 shadow flex-1 flex flex-col",children:[u.jsx("div",{className:"border-b border-destructive/70 px-4 py-3 bg-destructive/10 rounded-t flex-shrink-0",children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(Ia,{className:"w-4 h-4 text-destructive"}),u.jsx("h4",{className:"text-sm font-semibold text-destructive",children:"Workflow Failed"})]})}),u.jsx("div",{className:"p-4 overflow-auto flex-1",children:u.jsx("div",{className:"text-destructive whitespace-pre-wrap break-words text-sm",children:N})})]})]}):u.jsx("div",{className:"h-full flex items-center justify-center text-muted-foreground",children:u.jsx("p",{children:"Select a workflow to see execution details"})})})})]})}function gL(){const[e,r]=w.useState({agents:[],workflows:[],isLoading:!0}),[o,s]=w.useState([]),[i,c]=w.useState(!0),[d,f]=w.useState(()=>{const Z=localStorage.getItem("debugPanelWidth");return Z?parseInt(Z,10):320}),[m,p]=w.useState(!1),[g,v]=w.useState(!1),[y,b]=w.useState(!1),[N,S]=w.useState(null),[C,j]=w.useState(null),[R,E]=w.useState(null);w.useEffect(()=>{(async()=>{try{const[Y,ee]=await Promise.all([an.getAgents(),an.getWorkflows()]);r(O=>({...O,agents:Y,workflows:ee,selectedAgent:Y.length>0?Y[0]:ee.length>0?ee[0]:void 0,isLoading:!1}))}catch(Y){console.error("Failed to load agents/workflows:",Y),r(ee=>({...ee,error:Y instanceof Error?Y.message:"Failed to load data",isLoading:!1}))}})()},[]),w.useEffect(()=>{localStorage.setItem("debugPanelWidth",d.toString())},[d]);const A=w.useCallback(Z=>{Z.preventDefault(),p(!0);const Y=Z.clientX,ee=d,O=T=>{const z=Y-T.clientX,H=Math.max(200,Math.min(window.innerWidth*.5,ee+z));f(H)},P=()=>{p(!1),document.removeEventListener("mousemove",O),document.removeEventListener("mouseup",P)};document.addEventListener("mousemove",O),document.addEventListener("mouseup",P)},[d]),D=w.useCallback(()=>{c(!1)},[]),L=w.useCallback(Z=>{r(Y=>({...Y,selectedAgent:Z,currentThread:void 0})),s([])},[]),B=w.useCallback(Z=>{s(Z==="clear"?[]:Y=>[...Y,Z])},[]),U=w.useCallback(async Z=>{S(Z.id),j(null),E(null);try{const Y=await an.addEntity(Z.url,{source:"remote_gallery",originalUrl:Z.url,sampleId:Z.id}),ee={id:Y.id,name:Y.name,description:Y.description,type:Y.type,source:Y.source||"remote_gallery",has_env:!1,module_path:void 0};if(Y.type==="agent"){const O={...ee,tools:(Y.tools||[]).map(P=>typeof P=="string"?P:JSON.stringify(P))};r(P=>({...P,agents:[...P.agents,O],selectedAgent:O}))}else{const O={...ee,executors:(Y.tools||[]).map(P=>typeof P=="string"?P:JSON.stringify(P)),input_schema:{type:"string"},input_type_name:"Input",start_executor_id:Y.tools&&Y.tools.length>0?typeof Y.tools[0]=="string"?Y.tools[0]:JSON.stringify(Y.tools[0]):"unknown"};r(P=>({...P,workflows:[...P.workflows,O],selectedAgent:O}))}b(!1),s([])}catch(Y){const ee=Y instanceof Error?Y.message:"Failed to add sample entity";console.error("Failed to add sample entity:",ee),j(Z.id),E(ee)}finally{S(null)}},[]),G=w.useCallback(()=>{j(null),E(null)},[]),re=w.useCallback(async Z=>{try{await an.removeEntity(Z),r(Y=>({...Y,agents:Y.agents.filter(ee=>ee.id!==Z),workflows:Y.workflows.filter(ee=>ee.id!==Z),selectedAgent:Y.selectedAgent?.id===Z?void 0:Y.selectedAgent})),e.selectedAgent?.id===Z&&s([])}catch(Y){console.error("Failed to remove entity:",Y)}},[e.selectedAgent?.id]);return e.isLoading?u.jsxs("div",{className:"h-screen flex flex-col bg-background",children:[u.jsxs("header",{className:"flex h-14 items-center gap-4 border-b px-4",children:[u.jsx("div",{className:"w-64 h-9 bg-muted animate-pulse rounded-md"}),u.jsxs("div",{className:"flex items-center gap-2 ml-auto",children:[u.jsx("div",{className:"w-8 h-8 bg-muted animate-pulse rounded-md"}),u.jsx("div",{className:"w-8 h-8 bg-muted animate-pulse rounded-md"})]})]}),u.jsx(am,{message:"Initializing DevUI...",description:"Loading agents and workflows from your configuration",fullPage:!0})]}):e.error?u.jsxs("div",{className:"h-screen flex flex-col bg-background",children:[u.jsx(Ky,{agents:[],workflows:[],selectedItem:void 0,onSelect:()=>{},onRemove:re,isLoading:!1,onSettingsClick:()=>v(!0)}),u.jsx("div",{className:"flex-1 flex items-center justify-center p-8",children:u.jsxs("div",{className:"text-center space-y-6 max-w-2xl",children:[u.jsx("div",{className:"flex justify-center",children:u.jsx("div",{className:"rounded-full bg-muted p-4 animate-pulse",children:u.jsx(_k,{className:"h-12 w-12 text-muted-foreground"})})}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("h2",{className:"text-2xl font-semibold text-foreground",children:"Can't Connect to Backend"}),u.jsx("p",{className:"text-muted-foreground text-base",children:"No worries! Just start the DevUI backend server and you'll be good to go."})]}),u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"text-left bg-muted/50 rounded-lg p-4 space-y-3",children:[u.jsx("p",{className:"text-sm font-medium text-foreground",children:"Start the backend:"}),u.jsx("code",{className:"block bg-background px-3 py-2 rounded border text-sm font-mono text-foreground",children:"devui ./agents --port 8080"}),u.jsxs("p",{className:"text-xs text-muted-foreground",children:["Or launch programmatically with ",u.jsx("code",{className:"text-xs",children:"serve(entities=[agent])"})]})]}),u.jsxs("p",{className:"text-xs text-muted-foreground",children:["Default: ",u.jsx("span",{className:"font-mono",children:"http://localhost:8080"})]})]}),e.error&&u.jsxs("details",{className:"text-left group",children:[u.jsxs("summary",{className:"text-sm text-muted-foreground cursor-pointer hover:text-foreground flex items-center gap-2",children:[u.jsx(Sn,{className:"h-4 w-4 transition-transform group-open:rotate-180"}),"Error details"]}),u.jsx("p",{className:"mt-2 text-xs text-muted-foreground font-mono bg-muted/30 p-3 rounded border",children:e.error})]}),u.jsx(Ze,{onClick:()=>window.location.reload(),variant:"default",className:"mt-2",children:"Retry Connection"})]})}),u.jsx(Wy,{open:g,onOpenChange:v})]}):u.jsxs("div",{className:"h-screen flex flex-col bg-background max-h-screen",children:[u.jsx(Ky,{agents:e.agents,workflows:e.workflows,selectedItem:e.selectedAgent,onSelect:L,onRemove:re,onBrowseGallery:()=>b(!0),isLoading:e.isLoading,onSettingsClick:()=>v(!0)}),u.jsx("div",{className:"flex flex-1 overflow-hidden",children:y?u.jsx("div",{className:"flex-1 w-full",children:u.jsx(Jy,{variant:"route",onAdd:U,addingEntityId:N,errorEntityId:C,errorMessage:R,onClearError:G,onClose:()=>b(!1),hasExistingEntities:e.agents.length>0||e.workflows.length>0})}):e.agents.length===0&&e.workflows.length===0?u.jsx(Jy,{variant:"inline",onAdd:U,addingEntityId:N,errorEntityId:C,errorMessage:R,onClearError:G}):u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"flex-1 min-w-0",children:e.selectedAgent?e.selectedAgent.type==="agent"?u.jsx(qR,{selectedAgent:e.selectedAgent,onDebugEvent:B}):u.jsx(pL,{selectedWorkflow:e.selectedAgent,onDebugEvent:B}):u.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Select an agent or workflow to get started."})}),i&&u.jsx("div",{className:`w-1 cursor-col-resize flex-shrink-0 relative group transition-colors duration-200 ease-in-out ${m?"bg-primary/40":"bg-border hover:bg-primary/20"}`,onMouseDown:A,onDoubleClick:D,children:u.jsx("div",{className:"absolute inset-y-0 -left-2 -right-2 flex items-center justify-center",children:u.jsx("div",{className:`h-12 w-1 rounded-full transition-all duration-200 ease-in-out ${m?"bg-primary shadow-lg shadow-primary/25":"bg-primary/30 group-hover:bg-primary group-hover:shadow-md group-hover:shadow-primary/20"}`})})}),!i&&u.jsx("div",{className:"flex-shrink-0",children:u.jsx(Ze,{variant:"ghost",size:"sm",onClick:()=>c(!0),className:"h-full w-8 rounded-none border-l",children:u.jsx(kT,{className:"h-4 w-4"})})}),i&&u.jsx("div",{className:"flex-shrink-0",style:{width:`${d}px`},children:u.jsx(M3,{events:o,isStreaming:!1})})]})}),u.jsx(Wy,{open:g,onOpenChange:v})]})}function xL({children:e,attribute:r="class",defaultTheme:o="dark",enableSystem:s=!0,disableTransitionOnChange:i=!0,...c}){return u.jsx(Zk,{attribute:r,defaultTheme:o,enableSystem:s,disableTransitionOnChange:i,...c,children:e})}E_.createRoot(document.getElementById("root")).render(u.jsx(w.StrictMode,{children:u.jsx(xL,{attribute:"class",defaultTheme:"dark",enableSystem:!0,disableTransitionOnChange:!0,children:u.jsx(gL,{})})}));
|