furu 0.0.6__py3-none-any.whl → 0.0.7__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.
- furu/__init__.py +3 -15
- furu/aliases.py +53 -0
- furu/core/furu.py +153 -5
- furu/dashboard/api/models.py +18 -4
- furu/dashboard/api/routes.py +8 -0
- furu/dashboard/frontend/dist/assets/{index-BjyrY-Zz.js → index-NiDdQnqO.js} +15 -15
- furu/dashboard/frontend/dist/index.html +1 -1
- furu/dashboard/scanner.py +173 -147
- furu/migration.py +491 -763
- furu/schema.py +46 -0
- furu/storage/metadata.py +17 -1
- {furu-0.0.6.dist-info → furu-0.0.7.dist-info}/METADATA +1 -1
- {furu-0.0.6.dist-info → furu-0.0.7.dist-info}/RECORD +15 -14
- furu/migrate.py +0 -48
- {furu-0.0.6.dist-info → furu-0.0.7.dist-info}/WHEEL +0 -0
- {furu-0.0.6.dist-info → furu-0.0.7.dist-info}/entry_points.txt +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var vp=e=>{throw TypeError(e)};var sc=(e,t,n)=>t.has(e)||vp("Cannot "+n);var
|
|
1
|
+
var vp=e=>{throw TypeError(e)};var sc=(e,t,n)=>t.has(e)||vp("Cannot "+n);var O=(e,t,n)=>(sc(e,t,"read from private field"),n?n.call(e):t.get(e)),ne=(e,t,n)=>t.has(e)?vp("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),q=(e,t,n,r)=>(sc(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),le=(e,t,n)=>(sc(e,t,"access private method"),n);var Na=(e,t,n,r)=>({set _(s){q(e,t,s,n)},get _(){return O(e,t,r)}});function n_(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const o=Object.getOwnPropertyDescriptor(r,s);o&&Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();function Ay(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Oy={exports:{}},vu={},Fy={exports:{}},ae={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@ var vp=e=>{throw TypeError(e)};var sc=(e,t,n)=>t.has(e)||vp("Cannot "+n);var A=(
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var aa=Symbol.for("react.element"),r_=Symbol.for("react.portal"),s_=Symbol.for("react.fragment"),o_=Symbol.for("react.strict_mode"),i_=Symbol.for("react.profiler"),a_=Symbol.for("react.provider"),l_=Symbol.for("react.context"),u_=Symbol.for("react.forward_ref"),c_=Symbol.for("react.suspense"),d_=Symbol.for("react.memo"),f_=Symbol.for("react.lazy"),wp=Symbol.iterator;function h_(e){return e===null||typeof e!="object"?null:(e=wp&&e[wp]||e["@@iterator"],typeof e=="function"?e:null)}var Dy={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},zy=Object.assign,$y={};function To(e,t,n){this.props=e,this.context=t,this.refs=$y,this.updater=n||Dy}To.prototype.isReactComponent={};To.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};To.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function By(){}By.prototype=To.prototype;function jf(e,t,n){this.props=e,this.context=t,this.refs=$y,this.updater=n||Dy}var Mf=jf.prototype=new By;Mf.constructor=jf;zy(Mf,To.prototype);Mf.isPureReactComponent=!0;var Sp=Array.isArray,Hy=Object.prototype.hasOwnProperty,Tf={current:null},Uy={key:!0,ref:!0,__self:!0,__source:!0};function Vy(e,t,n){var r,s={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)Hy.call(t,r)&&!Uy.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];s.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:aa,type:e,key:o,ref:i,props:s,_owner:Tf.current}}function p_(e,t){return{$$typeof:aa,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Lf(e){return typeof e=="object"&&e!==null&&e.$$typeof===aa}function m_(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var _p=/\/+/g;function oc(e,t){return typeof e=="object"&&e!==null&&e.key!=null?m_(""+e.key):t.toString(36)}function ol(e,t,n,r,s){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case aa:case r_:i=!0}}if(i)return i=e,s=s(i),e=r===""?"."+oc(i,0):r,Sp(s)?(n="",e!=null&&(n=e.replace(_p,"$&/")+"/"),ol(s,t,n,"",function(u){return u})):s!=null&&(Lf(s)&&(s=p_(s,n+(!s.key||i&&i.key===s.key?"":(""+s.key).replace(_p,"$&/")+"/")+e)),t.push(s)),1;if(i=0,r=r===""?".":r+":",Sp(e))for(var a=0;a<e.length;a++){o=e[a];var l=r+oc(o,a);i+=ol(o,t,n,l,s)}else if(l=h_(e),typeof l=="function")for(e=l.call(e),a=0;!(o=e.next()).done;)o=o.value,l=r+oc(o,a++),i+=ol(o,t,n,l,s);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function ka(e,t,n){if(e==null)return e;var r=[],s=0;return ol(e,r,"","",function(o){return t.call(n,o,s++)}),r}function g_(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ut={current:null},il={transition:null},y_={ReactCurrentDispatcher:ut,ReactCurrentBatchConfig:il,ReactCurrentOwner:Tf};function Wy(){throw Error("act(...) is not supported in production builds of React.")}ae.Children={map:ka,forEach:function(e,t,n){ka(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ka(e,function(){t++}),t},toArray:function(e){return ka(e,function(t){return t})||[]},only:function(e){if(!Lf(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ae.Component=To;ae.Fragment=s_;ae.Profiler=i_;ae.PureComponent=jf;ae.StrictMode=o_;ae.Suspense=c_;ae.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=y_;ae.act=Wy;ae.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=zy({},e.props),s=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=Tf.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Hy.call(t,l)&&!Uy.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:aa,type:e.type,key:s,ref:o,props:r,_owner:i}};ae.createContext=function(e){return e={$$typeof:l_,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:a_,_context:e},e.Consumer=e};ae.createElement=Vy;ae.createFactory=function(e){var t=Vy.bind(null,e);return t.type=e,t};ae.createRef=function(){return{current:null}};ae.forwardRef=function(e){return{$$typeof:u_,render:e}};ae.isValidElement=Lf;ae.lazy=function(e){return{$$typeof:f_,_payload:{_status:-1,_result:e},_init:g_}};ae.memo=function(e,t){return{$$typeof:d_,type:e,compare:t===void 0?null:t}};ae.startTransition=function(e){var t=il.transition;il.transition={};try{e()}finally{il.transition=t}};ae.unstable_act=Wy;ae.useCallback=function(e,t){return ut.current.useCallback(e,t)};ae.useContext=function(e){return ut.current.useContext(e)};ae.useDebugValue=function(){};ae.useDeferredValue=function(e){return ut.current.useDeferredValue(e)};ae.useEffect=function(e,t){return ut.current.useEffect(e,t)};ae.useId=function(){return ut.current.useId()};ae.useImperativeHandle=function(e,t,n){return ut.current.useImperativeHandle(e,t,n)};ae.useInsertionEffect=function(e,t){return ut.current.useInsertionEffect(e,t)};ae.useLayoutEffect=function(e,t){return ut.current.useLayoutEffect(e,t)};ae.useMemo=function(e,t){return ut.current.useMemo(e,t)};ae.useReducer=function(e,t,n){return ut.current.useReducer(e,t,n)};ae.useRef=function(e){return ut.current.useRef(e)};ae.useState=function(e){return ut.current.useState(e)};ae.useSyncExternalStore=function(e,t,n){return ut.current.useSyncExternalStore(e,t,n)};ae.useTransition=function(){return ut.current.useTransition()};ae.version="18.3.1";Fy.exports=ae;var
|
|
9
|
+
*/var aa=Symbol.for("react.element"),r_=Symbol.for("react.portal"),s_=Symbol.for("react.fragment"),o_=Symbol.for("react.strict_mode"),i_=Symbol.for("react.profiler"),a_=Symbol.for("react.provider"),l_=Symbol.for("react.context"),u_=Symbol.for("react.forward_ref"),c_=Symbol.for("react.suspense"),d_=Symbol.for("react.memo"),f_=Symbol.for("react.lazy"),wp=Symbol.iterator;function h_(e){return e===null||typeof e!="object"?null:(e=wp&&e[wp]||e["@@iterator"],typeof e=="function"?e:null)}var Dy={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},zy=Object.assign,$y={};function To(e,t,n){this.props=e,this.context=t,this.refs=$y,this.updater=n||Dy}To.prototype.isReactComponent={};To.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};To.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function By(){}By.prototype=To.prototype;function jf(e,t,n){this.props=e,this.context=t,this.refs=$y,this.updater=n||Dy}var Mf=jf.prototype=new By;Mf.constructor=jf;zy(Mf,To.prototype);Mf.isPureReactComponent=!0;var Sp=Array.isArray,Hy=Object.prototype.hasOwnProperty,Tf={current:null},Uy={key:!0,ref:!0,__self:!0,__source:!0};function Vy(e,t,n){var r,s={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)Hy.call(t,r)&&!Uy.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];s.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:aa,type:e,key:o,ref:i,props:s,_owner:Tf.current}}function p_(e,t){return{$$typeof:aa,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Lf(e){return typeof e=="object"&&e!==null&&e.$$typeof===aa}function m_(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var _p=/\/+/g;function oc(e,t){return typeof e=="object"&&e!==null&&e.key!=null?m_(""+e.key):t.toString(36)}function ol(e,t,n,r,s){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case aa:case r_:i=!0}}if(i)return i=e,s=s(i),e=r===""?"."+oc(i,0):r,Sp(s)?(n="",e!=null&&(n=e.replace(_p,"$&/")+"/"),ol(s,t,n,"",function(u){return u})):s!=null&&(Lf(s)&&(s=p_(s,n+(!s.key||i&&i.key===s.key?"":(""+s.key).replace(_p,"$&/")+"/")+e)),t.push(s)),1;if(i=0,r=r===""?".":r+":",Sp(e))for(var a=0;a<e.length;a++){o=e[a];var l=r+oc(o,a);i+=ol(o,t,n,l,s)}else if(l=h_(e),typeof l=="function")for(e=l.call(e),a=0;!(o=e.next()).done;)o=o.value,l=r+oc(o,a++),i+=ol(o,t,n,l,s);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function ka(e,t,n){if(e==null)return e;var r=[],s=0;return ol(e,r,"","",function(o){return t.call(n,o,s++)}),r}function g_(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ut={current:null},il={transition:null},y_={ReactCurrentDispatcher:ut,ReactCurrentBatchConfig:il,ReactCurrentOwner:Tf};function Wy(){throw Error("act(...) is not supported in production builds of React.")}ae.Children={map:ka,forEach:function(e,t,n){ka(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ka(e,function(){t++}),t},toArray:function(e){return ka(e,function(t){return t})||[]},only:function(e){if(!Lf(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ae.Component=To;ae.Fragment=s_;ae.Profiler=i_;ae.PureComponent=jf;ae.StrictMode=o_;ae.Suspense=c_;ae.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=y_;ae.act=Wy;ae.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=zy({},e.props),s=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=Tf.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Hy.call(t,l)&&!Uy.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:aa,type:e.type,key:s,ref:o,props:r,_owner:i}};ae.createContext=function(e){return e={$$typeof:l_,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:a_,_context:e},e.Consumer=e};ae.createElement=Vy;ae.createFactory=function(e){var t=Vy.bind(null,e);return t.type=e,t};ae.createRef=function(){return{current:null}};ae.forwardRef=function(e){return{$$typeof:u_,render:e}};ae.isValidElement=Lf;ae.lazy=function(e){return{$$typeof:f_,_payload:{_status:-1,_result:e},_init:g_}};ae.memo=function(e,t){return{$$typeof:d_,type:e,compare:t===void 0?null:t}};ae.startTransition=function(e){var t=il.transition;il.transition={};try{e()}finally{il.transition=t}};ae.unstable_act=Wy;ae.useCallback=function(e,t){return ut.current.useCallback(e,t)};ae.useContext=function(e){return ut.current.useContext(e)};ae.useDebugValue=function(){};ae.useDeferredValue=function(e){return ut.current.useDeferredValue(e)};ae.useEffect=function(e,t){return ut.current.useEffect(e,t)};ae.useId=function(){return ut.current.useId()};ae.useImperativeHandle=function(e,t,n){return ut.current.useImperativeHandle(e,t,n)};ae.useInsertionEffect=function(e,t){return ut.current.useInsertionEffect(e,t)};ae.useLayoutEffect=function(e,t){return ut.current.useLayoutEffect(e,t)};ae.useMemo=function(e,t){return ut.current.useMemo(e,t)};ae.useReducer=function(e,t,n){return ut.current.useReducer(e,t,n)};ae.useRef=function(e){return ut.current.useRef(e)};ae.useState=function(e){return ut.current.useState(e)};ae.useSyncExternalStore=function(e,t,n){return ut.current.useSyncExternalStore(e,t,n)};ae.useTransition=function(){return ut.current.useTransition()};ae.version="18.3.1";Fy.exports=ae;var j=Fy.exports;const ls=Ay(j),x_=n_({__proto__:null,default:ls},[j]);/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.production.min.js
|
|
12
12
|
*
|
|
@@ -14,7 +14,7 @@ var vp=e=>{throw TypeError(e)};var sc=(e,t,n)=>t.has(e)||vp("Cannot "+n);var A=(
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var v_=
|
|
17
|
+
*/var v_=j,w_=Symbol.for("react.element"),S_=Symbol.for("react.fragment"),__=Object.prototype.hasOwnProperty,b_=v_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,E_={key:!0,ref:!0,__self:!0,__source:!0};function Ky(e,t,n){var r,s={},o=null,i=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)__.call(t,r)&&!E_.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:w_,type:e,key:o,ref:i,props:s,_owner:b_.current}}vu.Fragment=S_;vu.jsx=Ky;vu.jsxs=Ky;Oy.exports=vu;var h=Oy.exports,qy={exports:{}},Tt={},Qy={exports:{}},Gy={};/**
|
|
18
18
|
* @license React
|
|
19
19
|
* scheduler.production.min.js
|
|
20
20
|
*
|
|
@@ -22,7 +22,7 @@ var vp=e=>{throw TypeError(e)};var sc=(e,t,n)=>t.has(e)||vp("Cannot "+n);var A=(
|
|
|
22
22
|
*
|
|
23
23
|
* This source code is licensed under the MIT license found in the
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/(function(e){function t(N,T){var
|
|
25
|
+
*/(function(e){function t(N,T){var D=N.length;N.push(T);e:for(;0<D;){var B=D-1>>>1,H=N[B];if(0<s(H,T))N[B]=T,N[D]=H,D=B;else break e}}function n(N){return N.length===0?null:N[0]}function r(N){if(N.length===0)return null;var T=N[0],D=N.pop();if(D!==T){N[0]=D;e:for(var B=0,H=N.length,K=H>>>1;B<K;){var V=2*(B+1)-1,X=N[V],Q=V+1,Y=N[Q];if(0>s(X,D))Q<H&&0>s(Y,X)?(N[B]=Y,N[Q]=D,B=Q):(N[B]=X,N[V]=D,B=V);else if(Q<H&&0>s(Y,D))N[B]=Y,N[Q]=D,B=Q;else break e}}return T}function s(N,T){var D=N.sortIndex-T.sortIndex;return D!==0?D:N.id-T.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,a=i.now();e.unstable_now=function(){return i.now()-a}}var l=[],u=[],d=1,c=null,f=3,m=!1,p=!1,x=!1,w=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(N){for(var T=n(u);T!==null;){if(T.callback===null)r(u);else if(T.startTime<=N)r(u),T.sortIndex=T.expirationTime,t(l,T);else break;T=n(u)}}function S(N){if(x=!1,y(N),!p)if(n(l)!==null)p=!0,A(E);else{var T=n(u);T!==null&&F(S,T.startTime-N)}}function E(N,T){p=!1,x&&(x=!1,g(C),C=-1),m=!0;var D=f;try{for(y(T),c=n(l);c!==null&&(!(c.expirationTime>T)||N&&!P());){var B=c.callback;if(typeof B=="function"){c.callback=null,f=c.priorityLevel;var H=B(c.expirationTime<=T);T=e.unstable_now(),typeof H=="function"?c.callback=H:c===n(l)&&r(l),y(T)}else r(l);c=n(l)}if(c!==null)var K=!0;else{var V=n(u);V!==null&&F(S,V.startTime-T),K=!1}return K}finally{c=null,f=D,m=!1}}var b=!1,_=null,C=-1,M=5,L=-1;function P(){return!(e.unstable_now()-L<M)}function R(){if(_!==null){var N=e.unstable_now();L=N;var T=!0;try{T=_(!0,N)}finally{T?$():(b=!1,_=null)}}else b=!1}var $;if(typeof v=="function")$=function(){v(R)};else if(typeof MessageChannel<"u"){var k=new MessageChannel,I=k.port2;k.port1.onmessage=R,$=function(){I.postMessage(null)}}else $=function(){w(R,0)};function A(N){_=N,b||(b=!0,$())}function F(N,T){C=w(function(){N(e.unstable_now())},T)}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(N){N.callback=null},e.unstable_continueExecution=function(){p||m||(p=!0,A(E))},e.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<N?Math.floor(1e3/N):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(N){switch(f){case 1:case 2:case 3:var T=3;break;default:T=f}var D=f;f=T;try{return N()}finally{f=D}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(N,T){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var D=f;f=N;try{return T()}finally{f=D}},e.unstable_scheduleCallback=function(N,T,D){var B=e.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?B+D:B):D=B,N){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=D+H,N={id:d++,callback:T,priorityLevel:N,startTime:D,expirationTime:H,sortIndex:-1},D>B?(N.sortIndex=D,t(u,N),n(l)===null&&N===n(u)&&(x?(g(C),C=-1):x=!0,F(S,D-B))):(N.sortIndex=H,t(l,N),p||m||(p=!0,A(E))),N},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(N){var T=f;return function(){var D=f;f=T;try{return N.apply(this,arguments)}finally{f=D}}}})(Gy);Qy.exports=Gy;var C_=Qy.exports;/**
|
|
26
26
|
* @license React
|
|
27
27
|
* react-dom.production.min.js
|
|
28
28
|
*
|
|
@@ -30,14 +30,14 @@ var vp=e=>{throw TypeError(e)};var sc=(e,t,n)=>t.has(e)||vp("Cannot "+n);var A=(
|
|
|
30
30
|
*
|
|
31
31
|
* This source code is licensed under the MIT license found in the
|
|
32
32
|
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var N_=
|
|
33
|
+
*/var N_=j,jt=C_;function U(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Xy=new Set,Ci={};function bs(e,t){fo(e,t),fo(e+"Capture",t)}function fo(e,t){for(Ci[e]=t,e=0;e<t.length;e++)Xy.add(t[e])}var Fn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ed=Object.prototype.hasOwnProperty,k_=/^[: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]*$/,bp={},Ep={};function P_(e){return ed.call(Ep,e)?!0:ed.call(bp,e)?!1:k_.test(e)?Ep[e]=!0:(bp[e]=!0,!1)}function R_(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function j_(e,t,n,r){if(t===null||typeof t>"u"||R_(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ct(e,t,n,r,s,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var Xe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Xe[e]=new ct(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Xe[t]=new ct(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Xe[e]=new ct(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Xe[e]=new ct(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Xe[e]=new ct(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Xe[e]=new ct(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Xe[e]=new ct(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Xe[e]=new ct(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Xe[e]=new ct(e,5,!1,e.toLowerCase(),null,!1,!1)});var If=/[\-:]([a-z])/g;function Af(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(If,Af);Xe[t]=new ct(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(If,Af);Xe[t]=new ct(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(If,Af);Xe[t]=new ct(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Xe[e]=new ct(e,1,!1,e.toLowerCase(),null,!1,!1)});Xe.xlinkHref=new ct("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Xe[e]=new ct(e,1,!1,e.toLowerCase(),null,!0,!0)});function Of(e,t,n,r){var s=Xe.hasOwnProperty(t)?Xe[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(j_(t,n,s,r)&&(n=null),r||s===null?P_(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Un=N_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Pa=Symbol.for("react.element"),Ps=Symbol.for("react.portal"),Rs=Symbol.for("react.fragment"),Ff=Symbol.for("react.strict_mode"),td=Symbol.for("react.profiler"),Yy=Symbol.for("react.provider"),Zy=Symbol.for("react.context"),Df=Symbol.for("react.forward_ref"),nd=Symbol.for("react.suspense"),rd=Symbol.for("react.suspense_list"),zf=Symbol.for("react.memo"),Jn=Symbol.for("react.lazy"),Jy=Symbol.for("react.offscreen"),Cp=Symbol.iterator;function Bo(e){return e===null||typeof e!="object"?null:(e=Cp&&e[Cp]||e["@@iterator"],typeof e=="function"?e:null)}var Re=Object.assign,ic;function si(e){if(ic===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ic=t&&t[1]||""}return`
|
|
34
34
|
`+ic+e}var ac=!1;function lc(e,t){if(!e||ac)return"";ac=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var s=u.stack.split(`
|
|
35
35
|
`),o=r.stack.split(`
|
|
36
36
|
`),i=s.length-1,a=o.length-1;1<=i&&0<=a&&s[i]!==o[a];)a--;for(;1<=i&&0<=a;i--,a--)if(s[i]!==o[a]){if(i!==1||a!==1)do if(i--,a--,0>a||s[i]!==o[a]){var l=`
|
|
37
|
-
`+s[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=i&&0<=a);break}}}finally{ac=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?si(e):""}function M_(e){switch(e.tag){case 5:return si(e.type);case 16:return si("Lazy");case 13:return si("Suspense");case 19:return si("SuspenseList");case 0:case 2:case 15:return e=lc(e.type,!1),e;case 11:return e=lc(e.type.render,!1),e;case 1:return e=lc(e.type,!0),e;default:return""}}function sd(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Rs:return"Fragment";case Ps:return"Portal";case td:return"Profiler";case Ff:return"StrictMode";case nd:return"Suspense";case rd:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Zy:return(e.displayName||"Context")+".Consumer";case Yy:return(e._context.displayName||"Context")+".Provider";case Df:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case zf:return t=e.displayName||null,t!==null?t:sd(e.type)||"Memo";case Jn:t=e._payload,e=e._init;try{return sd(e(t))}catch{}}return null}function T_(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return sd(t);case 8:return t===Ff?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Pr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function e0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function L_(e){var t=e0(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ra(e){e._valueTracker||(e._valueTracker=L_(e))}function t0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=e0(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function kl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function od(e,t){var n=t.checked;return Re({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Np(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Pr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function n0(e,t){t=t.checked,t!=null&&Of(e,"checked",t,!1)}function id(e,t){n0(e,t);var n=Pr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ad(e,t.type,n):t.hasOwnProperty("defaultValue")&&ad(e,t.type,Pr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function kp(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ad(e,t,n){(t!=="number"||kl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var oi=Array.isArray;function Us(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Pr(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function ld(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(U(91));return Re({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Pp(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(U(92));if(oi(n)){if(1<n.length)throw Error(U(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Pr(n)}}function r0(e,t){var n=Pr(t.value),r=Pr(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Rp(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function s0(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ud(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?s0(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ja,o0=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(ja=ja||document.createElement("div"),ja.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ja.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ni(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var fi={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},I_=["Webkit","ms","Moz","O"];Object.keys(fi).forEach(function(e){I_.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fi[t]=fi[e]})});function i0(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||fi.hasOwnProperty(e)&&fi[e]?(""+t).trim():t+"px"}function a0(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=i0(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var A_=Re({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function cd(e,t){if(t){if(A_[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(U(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(U(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(U(61))}if(t.style!=null&&typeof t.style!="object")throw Error(U(62))}}function dd(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var fd=null;function $f(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var hd=null,Vs=null,Ws=null;function jp(e){if(e=ca(e)){if(typeof hd!="function")throw Error(U(280));var t=e.stateNode;t&&(t=Eu(t),hd(e.stateNode,e.type,t))}}function l0(e){Vs?Ws?Ws.push(e):Ws=[e]:Vs=e}function u0(){if(Vs){var e=Vs,t=Ws;if(Ws=Vs=null,jp(e),t)for(e=0;e<t.length;e++)jp(t[e])}}function c0(e,t){return e(t)}function d0(){}var uc=!1;function f0(e,t,n){if(uc)return e(t,n);uc=!0;try{return c0(e,t,n)}finally{uc=!1,(Vs!==null||Ws!==null)&&(d0(),u0())}}function ki(e,t){var n=e.stateNode;if(n===null)return null;var r=Eu(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(U(231,t,typeof n));return n}var pd=!1;if(Fn)try{var Ho={};Object.defineProperty(Ho,"passive",{get:function(){pd=!0}}),window.addEventListener("test",Ho,Ho),window.removeEventListener("test",Ho,Ho)}catch{pd=!1}function O_(e,t,n,r,s,o,i,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var hi=!1,Pl=null,Rl=!1,md=null,F_={onError:function(e){hi=!0,Pl=e}};function D_(e,t,n,r,s,o,i,a,l){hi=!1,Pl=null,O_.apply(F_,arguments)}function z_(e,t,n,r,s,o,i,a,l){if(D_.apply(this,arguments),hi){if(hi){var u=Pl;hi=!1,Pl=null}else throw Error(U(198));Rl||(Rl=!0,md=u)}}function Es(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function h0(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Mp(e){if(Es(e)!==e)throw Error(U(188))}function $_(e){var t=e.alternate;if(!t){if(t=Es(e),t===null)throw Error(U(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var o=s.alternate;if(o===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===o.child){for(o=s.child;o;){if(o===n)return Mp(s),e;if(o===r)return Mp(s),t;o=o.sibling}throw Error(U(188))}if(n.return!==r.return)n=s,r=o;else{for(var i=!1,a=s.child;a;){if(a===n){i=!0,n=s,r=o;break}if(a===r){i=!0,r=s,n=o;break}a=a.sibling}if(!i){for(a=o.child;a;){if(a===n){i=!0,n=o,r=s;break}if(a===r){i=!0,r=o,n=s;break}a=a.sibling}if(!i)throw Error(U(189))}}if(n.alternate!==r)throw Error(U(190))}if(n.tag!==3)throw Error(U(188));return n.stateNode.current===n?e:t}function p0(e){return e=$_(e),e!==null?m0(e):null}function m0(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=m0(e);if(t!==null)return t;e=e.sibling}return null}var g0=jt.unstable_scheduleCallback,Tp=jt.unstable_cancelCallback,B_=jt.unstable_shouldYield,H_=jt.unstable_requestPaint,Ie=jt.unstable_now,U_=jt.unstable_getCurrentPriorityLevel,Bf=jt.unstable_ImmediatePriority,y0=jt.unstable_UserBlockingPriority,jl=jt.unstable_NormalPriority,V_=jt.unstable_LowPriority,x0=jt.unstable_IdlePriority,wu=null,xn=null;function W_(e){if(xn&&typeof xn.onCommitFiberRoot=="function")try{xn.onCommitFiberRoot(wu,e,void 0,(e.current.flags&128)===128)}catch{}}var nn=Math.clz32?Math.clz32:Q_,K_=Math.log,q_=Math.LN2;function Q_(e){return e>>>=0,e===0?32:31-(K_(e)/q_|0)|0}var Ma=64,Ta=4194304;function ii(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ml(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~s;a!==0?r=ii(a):(o&=i,o!==0&&(r=ii(o)))}else i=n&~s,i!==0?r=ii(i):o!==0&&(r=ii(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,o=t&-t,s>=o||s===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-nn(t),s=1<<n,r|=e[n],t&=~s;return r}function G_(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function X_(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-nn(o),a=1<<i,l=s[i];l===-1?(!(a&n)||a&r)&&(s[i]=G_(a,t)):l<=t&&(e.expiredLanes|=a),o&=~a}}function gd(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function v0(){var e=Ma;return Ma<<=1,!(Ma&4194240)&&(Ma=64),e}function cc(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function la(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-nn(t),e[t]=n}function Y_(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-nn(n),o=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~o}}function Hf(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-nn(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var ge=0;function w0(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var S0,Uf,_0,b0,E0,yd=!1,La=[],gr=null,yr=null,xr=null,Pi=new Map,Ri=new Map,tr=[],Z_="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Lp(e,t){switch(e){case"focusin":case"focusout":gr=null;break;case"dragenter":case"dragleave":yr=null;break;case"mouseover":case"mouseout":xr=null;break;case"pointerover":case"pointerout":Pi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ri.delete(t.pointerId)}}function Uo(e,t,n,r,s,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[s]},t!==null&&(t=ca(t),t!==null&&Uf(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function J_(e,t,n,r,s){switch(t){case"focusin":return gr=Uo(gr,e,t,n,r,s),!0;case"dragenter":return yr=Uo(yr,e,t,n,r,s),!0;case"mouseover":return xr=Uo(xr,e,t,n,r,s),!0;case"pointerover":var o=s.pointerId;return Pi.set(o,Uo(Pi.get(o)||null,e,t,n,r,s)),!0;case"gotpointercapture":return o=s.pointerId,Ri.set(o,Uo(Ri.get(o)||null,e,t,n,r,s)),!0}return!1}function C0(e){var t=Dr(e.target);if(t!==null){var n=Es(t);if(n!==null){if(t=n.tag,t===13){if(t=h0(n),t!==null){e.blockedOn=t,E0(e.priority,function(){_0(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function al(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=xd(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);fd=r,n.target.dispatchEvent(r),fd=null}else return t=ca(n),t!==null&&Uf(t),e.blockedOn=n,!1;t.shift()}return!0}function Ip(e,t,n){al(e)&&n.delete(t)}function eb(){yd=!1,gr!==null&&al(gr)&&(gr=null),yr!==null&&al(yr)&&(yr=null),xr!==null&&al(xr)&&(xr=null),Pi.forEach(Ip),Ri.forEach(Ip)}function Vo(e,t){e.blockedOn===t&&(e.blockedOn=null,yd||(yd=!0,jt.unstable_scheduleCallback(jt.unstable_NormalPriority,eb)))}function ji(e){function t(s){return Vo(s,e)}if(0<La.length){Vo(La[0],e);for(var n=1;n<La.length;n++){var r=La[n];r.blockedOn===e&&(r.blockedOn=null)}}for(gr!==null&&Vo(gr,e),yr!==null&&Vo(yr,e),xr!==null&&Vo(xr,e),Pi.forEach(t),Ri.forEach(t),n=0;n<tr.length;n++)r=tr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<tr.length&&(n=tr[0],n.blockedOn===null);)C0(n),n.blockedOn===null&&tr.shift()}var Ks=Un.ReactCurrentBatchConfig,Tl=!0;function tb(e,t,n,r){var s=ge,o=Ks.transition;Ks.transition=null;try{ge=1,Vf(e,t,n,r)}finally{ge=s,Ks.transition=o}}function nb(e,t,n,r){var s=ge,o=Ks.transition;Ks.transition=null;try{ge=4,Vf(e,t,n,r)}finally{ge=s,Ks.transition=o}}function Vf(e,t,n,r){if(Tl){var s=xd(e,t,n,r);if(s===null)wc(e,t,r,Ll,n),Lp(e,r);else if(J_(s,e,t,n,r))r.stopPropagation();else if(Lp(e,r),t&4&&-1<Z_.indexOf(e)){for(;s!==null;){var o=ca(s);if(o!==null&&S0(o),o=xd(e,t,n,r),o===null&&wc(e,t,r,Ll,n),o===s)break;s=o}s!==null&&r.stopPropagation()}else wc(e,t,r,null,n)}}var Ll=null;function xd(e,t,n,r){if(Ll=null,e=$f(r),e=Dr(e),e!==null)if(t=Es(e),t===null)e=null;else if(n=t.tag,n===13){if(e=h0(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ll=e,null}function N0(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(U_()){case Bf:return 1;case y0:return 4;case jl:case V_:return 16;case x0:return 536870912;default:return 16}default:return 16}}var fr=null,Wf=null,ll=null;function k0(){if(ll)return ll;var e,t=Wf,n=t.length,r,s="value"in fr?fr.value:fr.textContent,o=s.length;for(e=0;e<n&&t[e]===s[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===s[o-r];r++);return ll=s.slice(e,1<r?1-r:void 0)}function ul(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ia(){return!0}function Ap(){return!1}function Lt(e){function t(n,r,s,o,i){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=o,this.target=i,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(o):o[a]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Ia:Ap,this.isPropagationStopped=Ap,this}return Re(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ia)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ia)},persist:function(){},isPersistent:Ia}),t}var Lo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Kf=Lt(Lo),ua=Re({},Lo,{view:0,detail:0}),rb=Lt(ua),dc,fc,Wo,Su=Re({},ua,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:qf,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Wo&&(Wo&&e.type==="mousemove"?(dc=e.screenX-Wo.screenX,fc=e.screenY-Wo.screenY):fc=dc=0,Wo=e),dc)},movementY:function(e){return"movementY"in e?e.movementY:fc}}),Op=Lt(Su),sb=Re({},Su,{dataTransfer:0}),ob=Lt(sb),ib=Re({},ua,{relatedTarget:0}),hc=Lt(ib),ab=Re({},Lo,{animationName:0,elapsedTime:0,pseudoElement:0}),lb=Lt(ab),ub=Re({},Lo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),cb=Lt(ub),db=Re({},Lo,{data:0}),Fp=Lt(db),fb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},hb={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"},pb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function mb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=pb[e])?!!t[e]:!1}function qf(){return mb}var gb=Re({},ua,{key:function(e){if(e.key){var t=fb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ul(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?hb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:qf,charCode:function(e){return e.type==="keypress"?ul(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ul(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),yb=Lt(gb),xb=Re({},Su,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Dp=Lt(xb),vb=Re({},ua,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:qf}),wb=Lt(vb),Sb=Re({},Lo,{propertyName:0,elapsedTime:0,pseudoElement:0}),_b=Lt(Sb),bb=Re({},Su,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Eb=Lt(bb),Cb=[9,13,27,32],Qf=Fn&&"CompositionEvent"in window,pi=null;Fn&&"documentMode"in document&&(pi=document.documentMode);var Nb=Fn&&"TextEvent"in window&&!pi,P0=Fn&&(!Qf||pi&&8<pi&&11>=pi),zp=" ",$p=!1;function R0(e,t){switch(e){case"keyup":return Cb.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function j0(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var js=!1;function kb(e,t){switch(e){case"compositionend":return j0(t);case"keypress":return t.which!==32?null:($p=!0,zp);case"textInput":return e=t.data,e===zp&&$p?null:e;default:return null}}function Pb(e,t){if(js)return e==="compositionend"||!Qf&&R0(e,t)?(e=k0(),ll=Wf=fr=null,js=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return P0&&t.locale!=="ko"?null:t.data;default:return null}}var Rb={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 Bp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Rb[e.type]:t==="textarea"}function M0(e,t,n,r){l0(r),t=Il(t,"onChange"),0<t.length&&(n=new Kf("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var mi=null,Mi=null;function jb(e){H0(e,0)}function _u(e){var t=Ls(e);if(t0(t))return e}function Mb(e,t){if(e==="change")return t}var T0=!1;if(Fn){var pc;if(Fn){var mc="oninput"in document;if(!mc){var Hp=document.createElement("div");Hp.setAttribute("oninput","return;"),mc=typeof Hp.oninput=="function"}pc=mc}else pc=!1;T0=pc&&(!document.documentMode||9<document.documentMode)}function Up(){mi&&(mi.detachEvent("onpropertychange",L0),Mi=mi=null)}function L0(e){if(e.propertyName==="value"&&_u(Mi)){var t=[];M0(t,Mi,e,$f(e)),f0(jb,t)}}function Tb(e,t,n){e==="focusin"?(Up(),mi=t,Mi=n,mi.attachEvent("onpropertychange",L0)):e==="focusout"&&Up()}function Lb(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return _u(Mi)}function Ib(e,t){if(e==="click")return _u(t)}function Ab(e,t){if(e==="input"||e==="change")return _u(t)}function Ob(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var on=typeof Object.is=="function"?Object.is:Ob;function Ti(e,t){if(on(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!ed.call(t,s)||!on(e[s],t[s]))return!1}return!0}function Vp(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Wp(e,t){var n=Vp(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Vp(n)}}function I0(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?I0(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function A0(){for(var e=window,t=kl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=kl(e.document)}return t}function Gf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Fb(e){var t=A0(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&I0(n.ownerDocument.documentElement,n)){if(r!==null&&Gf(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,o=Math.min(r.start,s);r=r.end===void 0?o:Math.min(r.end,s),!e.extend&&o>r&&(s=r,r=o,o=s),s=Wp(n,o);var i=Wp(n,r);s&&i&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Db=Fn&&"documentMode"in document&&11>=document.documentMode,Ms=null,vd=null,gi=null,wd=!1;function Kp(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;wd||Ms==null||Ms!==kl(r)||(r=Ms,"selectionStart"in r&&Gf(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),gi&&Ti(gi,r)||(gi=r,r=Il(vd,"onSelect"),0<r.length&&(t=new Kf("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Ms)))}function Aa(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ts={animationend:Aa("Animation","AnimationEnd"),animationiteration:Aa("Animation","AnimationIteration"),animationstart:Aa("Animation","AnimationStart"),transitionend:Aa("Transition","TransitionEnd")},gc={},O0={};Fn&&(O0=document.createElement("div").style,"AnimationEvent"in window||(delete Ts.animationend.animation,delete Ts.animationiteration.animation,delete Ts.animationstart.animation),"TransitionEvent"in window||delete Ts.transitionend.transition);function bu(e){if(gc[e])return gc[e];if(!Ts[e])return e;var t=Ts[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in O0)return gc[e]=t[n];return e}var F0=bu("animationend"),D0=bu("animationiteration"),z0=bu("animationstart"),$0=bu("transitionend"),B0=new Map,qp="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function jr(e,t){B0.set(e,t),bs(t,[e])}for(var yc=0;yc<qp.length;yc++){var xc=qp[yc],zb=xc.toLowerCase(),$b=xc[0].toUpperCase()+xc.slice(1);jr(zb,"on"+$b)}jr(F0,"onAnimationEnd");jr(D0,"onAnimationIteration");jr(z0,"onAnimationStart");jr("dblclick","onDoubleClick");jr("focusin","onFocus");jr("focusout","onBlur");jr($0,"onTransitionEnd");fo("onMouseEnter",["mouseout","mouseover"]);fo("onMouseLeave",["mouseout","mouseover"]);fo("onPointerEnter",["pointerout","pointerover"]);fo("onPointerLeave",["pointerout","pointerover"]);bs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));bs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));bs("onBeforeInput",["compositionend","keypress","textInput","paste"]);bs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));bs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));bs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ai="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(" "),Bb=new Set("cancel close invalid load scroll toggle".split(" ").concat(ai));function Qp(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,z_(r,t,void 0,e),e.currentTarget=null}function H0(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var i=r.length-1;0<=i;i--){var a=r[i],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==o&&s.isPropagationStopped())break e;Qp(s,a,u),o=l}else for(i=0;i<r.length;i++){if(a=r[i],l=a.instance,u=a.currentTarget,a=a.listener,l!==o&&s.isPropagationStopped())break e;Qp(s,a,u),o=l}}}if(Rl)throw e=md,Rl=!1,md=null,e}function we(e,t){var n=t[Cd];n===void 0&&(n=t[Cd]=new Set);var r=e+"__bubble";n.has(r)||(U0(t,e,2,!1),n.add(r))}function vc(e,t,n){var r=0;t&&(r|=4),U0(n,e,r,t)}var Oa="_reactListening"+Math.random().toString(36).slice(2);function Li(e){if(!e[Oa]){e[Oa]=!0,Xy.forEach(function(n){n!=="selectionchange"&&(Bb.has(n)||vc(n,!1,e),vc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Oa]||(t[Oa]=!0,vc("selectionchange",!1,t))}}function U0(e,t,n,r){switch(N0(t)){case 1:var s=tb;break;case 4:s=nb;break;default:s=Vf}n=s.bind(null,t,n,e),s=void 0,!pd||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function wc(e,t,n,r,s){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var a=r.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(i===4)for(i=r.return;i!==null;){var l=i.tag;if((l===3||l===4)&&(l=i.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;i=i.return}for(;a!==null;){if(i=Dr(a),i===null)return;if(l=i.tag,l===5||l===6){r=o=i;continue e}a=a.parentNode}}r=r.return}f0(function(){var u=o,d=$f(n),c=[];e:{var f=B0.get(e);if(f!==void 0){var m=Kf,p=e;switch(e){case"keypress":if(ul(n)===0)break e;case"keydown":case"keyup":m=yb;break;case"focusin":p="focus",m=hc;break;case"focusout":p="blur",m=hc;break;case"beforeblur":case"afterblur":m=hc;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=Op;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=ob;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=wb;break;case F0:case D0:case z0:m=lb;break;case $0:m=_b;break;case"scroll":m=rb;break;case"wheel":m=Eb;break;case"copy":case"cut":case"paste":m=cb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=Dp}var x=(t&4)!==0,w=!x&&e==="scroll",g=x?f!==null?f+"Capture":null:f;x=[];for(var v=u,y;v!==null;){y=v;var S=y.stateNode;if(y.tag===5&&S!==null&&(y=S,g!==null&&(S=ki(v,g),S!=null&&x.push(Ii(v,S,y)))),w)break;v=v.return}0<x.length&&(f=new m(f,p,null,n,d),c.push({event:f,listeners:x}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",f&&n!==fd&&(p=n.relatedTarget||n.fromElement)&&(Dr(p)||p[Dn]))break e;if((m||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,m?(p=n.relatedTarget||n.toElement,m=u,p=p?Dr(p):null,p!==null&&(w=Es(p),p!==w||p.tag!==5&&p.tag!==6)&&(p=null)):(m=null,p=u),m!==p)){if(x=Op,S="onMouseLeave",g="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(x=Dp,S="onPointerLeave",g="onPointerEnter",v="pointer"),w=m==null?f:Ls(m),y=p==null?f:Ls(p),f=new x(S,v+"leave",m,n,d),f.target=w,f.relatedTarget=y,S=null,Dr(d)===u&&(x=new x(g,v+"enter",p,n,d),x.target=y,x.relatedTarget=w,S=x),w=S,m&&p)t:{for(x=m,g=p,v=0,y=x;y;y=Cs(y))v++;for(y=0,S=g;S;S=Cs(S))y++;for(;0<v-y;)x=Cs(x),v--;for(;0<y-v;)g=Cs(g),y--;for(;v--;){if(x===g||g!==null&&x===g.alternate)break t;x=Cs(x),g=Cs(g)}x=null}else x=null;m!==null&&Gp(c,f,m,x,!1),p!==null&&w!==null&&Gp(c,w,p,x,!0)}}e:{if(f=u?Ls(u):window,m=f.nodeName&&f.nodeName.toLowerCase(),m==="select"||m==="input"&&f.type==="file")var E=Mb;else if(Bp(f))if(T0)E=Ab;else{E=Lb;var _=Tb}else(m=f.nodeName)&&m.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(E=Ib);if(E&&(E=E(e,u))){M0(c,E,n,d);break e}_&&_(e,f,u),e==="focusout"&&(_=f._wrapperState)&&_.controlled&&f.type==="number"&&ad(f,"number",f.value)}switch(_=u?Ls(u):window,e){case"focusin":(Bp(_)||_.contentEditable==="true")&&(Ms=_,vd=u,gi=null);break;case"focusout":gi=vd=Ms=null;break;case"mousedown":wd=!0;break;case"contextmenu":case"mouseup":case"dragend":wd=!1,Kp(c,n,d);break;case"selectionchange":if(Db)break;case"keydown":case"keyup":Kp(c,n,d)}var b;if(Qf)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else js?R0(e,n)&&(C="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(C="onCompositionStart");C&&(P0&&n.locale!=="ko"&&(js||C!=="onCompositionStart"?C==="onCompositionEnd"&&js&&(b=k0()):(fr=d,Wf="value"in fr?fr.value:fr.textContent,js=!0)),_=Il(u,C),0<_.length&&(C=new Fp(C,e,null,n,d),c.push({event:C,listeners:_}),b?C.data=b:(b=j0(n),b!==null&&(C.data=b)))),(b=Nb?kb(e,n):Pb(e,n))&&(u=Il(u,"onBeforeInput"),0<u.length&&(d=new Fp("onBeforeInput","beforeinput",null,n,d),c.push({event:d,listeners:u}),d.data=b))}H0(c,t)})}function Ii(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Il(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=ki(e,n),o!=null&&r.unshift(Ii(e,o,s)),o=ki(e,t),o!=null&&r.push(Ii(e,o,s))),e=e.return}return r}function Cs(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Gp(e,t,n,r,s){for(var o=t._reactName,i=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,s?(l=ki(n,o),l!=null&&i.unshift(Ii(n,l,a))):s||(l=ki(n,o),l!=null&&i.push(Ii(n,l,a)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var Hb=/\r\n?/g,Ub=/\u0000|\uFFFD/g;function Xp(e){return(typeof e=="string"?e:""+e).replace(Hb,`
|
|
38
|
-
`).replace(Ub,"")}function Fa(e,t,n){if(t=Xp(t),Xp(e)!==t&&n)throw Error(U(425))}function Al(){}var Sd=null,_d=null;function bd(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ed=typeof setTimeout=="function"?setTimeout:void 0,Vb=typeof clearTimeout=="function"?clearTimeout:void 0,Yp=typeof Promise=="function"?Promise:void 0,Wb=typeof queueMicrotask=="function"?queueMicrotask:typeof Yp<"u"?function(e){return Yp.resolve(null).then(e).catch(Kb)}:Ed;function Kb(e){setTimeout(function(){throw e})}function Sc(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),ji(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);ji(t)}function vr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Zp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Io=Math.random().toString(36).slice(2),yn="__reactFiber$"+Io,Ai="__reactProps$"+Io,Dn="__reactContainer$"+Io,Cd="__reactEvents$"+Io,qb="__reactListeners$"+Io,Qb="__reactHandles$"+Io;function Dr(e){var t=e[yn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Dn]||n[yn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Zp(e);e!==null;){if(n=e[yn])return n;e=Zp(e)}return t}e=n,n=e.parentNode}return null}function ca(e){return e=e[yn]||e[Dn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ls(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(U(33))}function Eu(e){return e[Ai]||null}var Nd=[],Is=-1;function Mr(e){return{current:e}}function Se(e){0>Is||(e.current=Nd[Is],Nd[Is]=null,Is--)}function xe(e,t){Is++,Nd[Is]=e.current,e.current=t}var Rr={},rt=Mr(Rr),xt=Mr(!1),us=Rr;function ho(e,t){var n=e.type.contextTypes;if(!n)return Rr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in n)s[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function vt(e){return e=e.childContextTypes,e!=null}function Ol(){Se(xt),Se(rt)}function Jp(e,t,n){if(rt.current!==Rr)throw Error(U(168));xe(rt,t),xe(xt,n)}function V0(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(U(108,T_(e)||"Unknown",s));return Re({},n,r)}function Fl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Rr,us=rt.current,xe(rt,e),xe(xt,xt.current),!0}function em(e,t,n){var r=e.stateNode;if(!r)throw Error(U(169));n?(e=V0(e,t,us),r.__reactInternalMemoizedMergedChildContext=e,Se(xt),Se(rt),xe(rt,e)):Se(xt),xe(xt,n)}var jn=null,Cu=!1,_c=!1;function W0(e){jn===null?jn=[e]:jn.push(e)}function Gb(e){Cu=!0,W0(e)}function Tr(){if(!_c&&jn!==null){_c=!0;var e=0,t=ge;try{var n=jn;for(ge=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}jn=null,Cu=!1}catch(s){throw jn!==null&&(jn=jn.slice(e+1)),g0(Bf,Tr),s}finally{ge=t,_c=!1}}return null}var As=[],Os=0,Dl=null,zl=0,zt=[],$t=0,cs=null,Ln=1,In="";function Lr(e,t){As[Os++]=zl,As[Os++]=Dl,Dl=e,zl=t}function K0(e,t,n){zt[$t++]=Ln,zt[$t++]=In,zt[$t++]=cs,cs=e;var r=Ln;e=In;var s=32-nn(r)-1;r&=~(1<<s),n+=1;var o=32-nn(t)+s;if(30<o){var i=s-s%5;o=(r&(1<<i)-1).toString(32),r>>=i,s-=i,Ln=1<<32-nn(t)+s|n<<s|r,In=o+e}else Ln=1<<o|n<<s|r,In=e}function Xf(e){e.return!==null&&(Lr(e,1),K0(e,1,0))}function Yf(e){for(;e===Dl;)Dl=As[--Os],As[Os]=null,zl=As[--Os],As[Os]=null;for(;e===cs;)cs=zt[--$t],zt[$t]=null,In=zt[--$t],zt[$t]=null,Ln=zt[--$t],zt[$t]=null}var Pt=null,kt=null,_e=!1,Zt=null;function q0(e,t){var n=Bt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function tm(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Pt=e,kt=vr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Pt=e,kt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=cs!==null?{id:Ln,overflow:In}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Bt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Pt=e,kt=null,!0):!1;default:return!1}}function kd(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Pd(e){if(_e){var t=kt;if(t){var n=t;if(!tm(e,t)){if(kd(e))throw Error(U(418));t=vr(n.nextSibling);var r=Pt;t&&tm(e,t)?q0(r,n):(e.flags=e.flags&-4097|2,_e=!1,Pt=e)}}else{if(kd(e))throw Error(U(418));e.flags=e.flags&-4097|2,_e=!1,Pt=e}}}function nm(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Pt=e}function Da(e){if(e!==Pt)return!1;if(!_e)return nm(e),_e=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!bd(e.type,e.memoizedProps)),t&&(t=kt)){if(kd(e))throw Q0(),Error(U(418));for(;t;)q0(e,t),t=vr(t.nextSibling)}if(nm(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){kt=vr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}kt=null}}else kt=Pt?vr(e.stateNode.nextSibling):null;return!0}function Q0(){for(var e=kt;e;)e=vr(e.nextSibling)}function po(){kt=Pt=null,_e=!1}function Zf(e){Zt===null?Zt=[e]:Zt.push(e)}var Xb=Un.ReactCurrentBatchConfig;function Ko(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(U(309));var r=n.stateNode}if(!r)throw Error(U(147,e));var s=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(i){var a=s.refs;i===null?delete a[o]:a[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(U(284));if(!n._owner)throw Error(U(290,e))}return e}function za(e,t){throw e=Object.prototype.toString.call(t),Error(U(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function rm(e){var t=e._init;return t(e._payload)}function G0(e){function t(g,v){if(e){var y=g.deletions;y===null?(g.deletions=[v],g.flags|=16):y.push(v)}}function n(g,v){if(!e)return null;for(;v!==null;)t(g,v),v=v.sibling;return null}function r(g,v){for(g=new Map;v!==null;)v.key!==null?g.set(v.key,v):g.set(v.index,v),v=v.sibling;return g}function s(g,v){return g=br(g,v),g.index=0,g.sibling=null,g}function o(g,v,y){return g.index=y,e?(y=g.alternate,y!==null?(y=y.index,y<v?(g.flags|=2,v):y):(g.flags|=2,v)):(g.flags|=1048576,v)}function i(g){return e&&g.alternate===null&&(g.flags|=2),g}function a(g,v,y,S){return v===null||v.tag!==6?(v=Rc(y,g.mode,S),v.return=g,v):(v=s(v,y),v.return=g,v)}function l(g,v,y,S){var E=y.type;return E===Rs?d(g,v,y.props.children,S,y.key):v!==null&&(v.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Jn&&rm(E)===v.type)?(S=s(v,y.props),S.ref=Ko(g,v,y),S.return=g,S):(S=gl(y.type,y.key,y.props,null,g.mode,S),S.ref=Ko(g,v,y),S.return=g,S)}function u(g,v,y,S){return v===null||v.tag!==4||v.stateNode.containerInfo!==y.containerInfo||v.stateNode.implementation!==y.implementation?(v=jc(y,g.mode,S),v.return=g,v):(v=s(v,y.children||[]),v.return=g,v)}function d(g,v,y,S,E){return v===null||v.tag!==7?(v=ts(y,g.mode,S,E),v.return=g,v):(v=s(v,y),v.return=g,v)}function c(g,v,y){if(typeof v=="string"&&v!==""||typeof v=="number")return v=Rc(""+v,g.mode,y),v.return=g,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Pa:return y=gl(v.type,v.key,v.props,null,g.mode,y),y.ref=Ko(g,null,v),y.return=g,y;case Ps:return v=jc(v,g.mode,y),v.return=g,v;case Jn:var S=v._init;return c(g,S(v._payload),y)}if(oi(v)||Bo(v))return v=ts(v,g.mode,y,null),v.return=g,v;za(g,v)}return null}function f(g,v,y,S){var E=v!==null?v.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return E!==null?null:a(g,v,""+y,S);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Pa:return y.key===E?l(g,v,y,S):null;case Ps:return y.key===E?u(g,v,y,S):null;case Jn:return E=y._init,f(g,v,E(y._payload),S)}if(oi(y)||Bo(y))return E!==null?null:d(g,v,y,S,null);za(g,y)}return null}function m(g,v,y,S,E){if(typeof S=="string"&&S!==""||typeof S=="number")return g=g.get(y)||null,a(v,g,""+S,E);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Pa:return g=g.get(S.key===null?y:S.key)||null,l(v,g,S,E);case Ps:return g=g.get(S.key===null?y:S.key)||null,u(v,g,S,E);case Jn:var _=S._init;return m(g,v,y,_(S._payload),E)}if(oi(S)||Bo(S))return g=g.get(y)||null,d(v,g,S,E,null);za(v,S)}return null}function p(g,v,y,S){for(var E=null,_=null,b=v,C=v=0,L=null;b!==null&&C<y.length;C++){b.index>C?(L=b,b=null):L=b.sibling;var M=f(g,b,y[C],S);if(M===null){b===null&&(b=L);break}e&&b&&M.alternate===null&&t(g,b),v=o(M,v,C),_===null?E=M:_.sibling=M,_=M,b=L}if(C===y.length)return n(g,b),_e&&Lr(g,C),E;if(b===null){for(;C<y.length;C++)b=c(g,y[C],S),b!==null&&(v=o(b,v,C),_===null?E=b:_.sibling=b,_=b);return _e&&Lr(g,C),E}for(b=r(g,b);C<y.length;C++)L=m(b,g,C,y[C],S),L!==null&&(e&&L.alternate!==null&&b.delete(L.key===null?C:L.key),v=o(L,v,C),_===null?E=L:_.sibling=L,_=L);return e&&b.forEach(function(P){return t(g,P)}),_e&&Lr(g,C),E}function x(g,v,y,S){var E=Bo(y);if(typeof E!="function")throw Error(U(150));if(y=E.call(y),y==null)throw Error(U(151));for(var _=E=null,b=v,C=v=0,L=null,M=y.next();b!==null&&!M.done;C++,M=y.next()){b.index>C?(L=b,b=null):L=b.sibling;var P=f(g,b,M.value,S);if(P===null){b===null&&(b=L);break}e&&b&&P.alternate===null&&t(g,b),v=o(P,v,C),_===null?E=P:_.sibling=P,_=P,b=L}if(M.done)return n(g,b),_e&&Lr(g,C),E;if(b===null){for(;!M.done;C++,M=y.next())M=c(g,M.value,S),M!==null&&(v=o(M,v,C),_===null?E=M:_.sibling=M,_=M);return _e&&Lr(g,C),E}for(b=r(g,b);!M.done;C++,M=y.next())M=m(b,g,C,M.value,S),M!==null&&(e&&M.alternate!==null&&b.delete(M.key===null?C:M.key),v=o(M,v,C),_===null?E=M:_.sibling=M,_=M);return e&&b.forEach(function(j){return t(g,j)}),_e&&Lr(g,C),E}function w(g,v,y,S){if(typeof y=="object"&&y!==null&&y.type===Rs&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Pa:e:{for(var E=y.key,_=v;_!==null;){if(_.key===E){if(E=y.type,E===Rs){if(_.tag===7){n(g,_.sibling),v=s(_,y.props.children),v.return=g,g=v;break e}}else if(_.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Jn&&rm(E)===_.type){n(g,_.sibling),v=s(_,y.props),v.ref=Ko(g,_,y),v.return=g,g=v;break e}n(g,_);break}else t(g,_);_=_.sibling}y.type===Rs?(v=ts(y.props.children,g.mode,S,y.key),v.return=g,g=v):(S=gl(y.type,y.key,y.props,null,g.mode,S),S.ref=Ko(g,v,y),S.return=g,g=S)}return i(g);case Ps:e:{for(_=y.key;v!==null;){if(v.key===_)if(v.tag===4&&v.stateNode.containerInfo===y.containerInfo&&v.stateNode.implementation===y.implementation){n(g,v.sibling),v=s(v,y.children||[]),v.return=g,g=v;break e}else{n(g,v);break}else t(g,v);v=v.sibling}v=jc(y,g.mode,S),v.return=g,g=v}return i(g);case Jn:return _=y._init,w(g,v,_(y._payload),S)}if(oi(y))return p(g,v,y,S);if(Bo(y))return x(g,v,y,S);za(g,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,v!==null&&v.tag===6?(n(g,v.sibling),v=s(v,y),v.return=g,g=v):(n(g,v),v=Rc(y,g.mode,S),v.return=g,g=v),i(g)):n(g,v)}return w}var mo=G0(!0),X0=G0(!1),$l=Mr(null),Bl=null,Fs=null,Jf=null;function eh(){Jf=Fs=Bl=null}function th(e){var t=$l.current;Se($l),e._currentValue=t}function Rd(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function qs(e,t){Bl=e,Jf=Fs=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(gt=!0),e.firstContext=null)}function Vt(e){var t=e._currentValue;if(Jf!==e)if(e={context:e,memoizedValue:t,next:null},Fs===null){if(Bl===null)throw Error(U(308));Fs=e,Bl.dependencies={lanes:0,firstContext:e}}else Fs=Fs.next=e;return t}var zr=null;function nh(e){zr===null?zr=[e]:zr.push(e)}function Y0(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,nh(t)):(n.next=s.next,s.next=n),t.interleaved=n,zn(e,r)}function zn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var er=!1;function rh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Z0(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function On(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function wr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,pe&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,zn(e,n)}return s=r.interleaved,s===null?(t.next=t,nh(r)):(t.next=s.next,s.next=t),r.interleaved=t,zn(e,n)}function cl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Hf(e,n)}}function sm(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?s=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?s=o=t:o=o.next=t}else s=o=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Hl(e,t,n,r){var s=e.updateQueue;er=!1;var o=s.firstBaseUpdate,i=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,i===null?o=u:i.next=u,i=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==i&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=l))}if(o!==null){var c=s.baseState;i=0,d=u=l=null,a=o;do{var f=a.lane,m=a.eventTime;if((r&f)===f){d!==null&&(d=d.next={eventTime:m,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=e,x=a;switch(f=t,m=n,x.tag){case 1:if(p=x.payload,typeof p=="function"){c=p.call(m,c,f);break e}c=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=x.payload,f=typeof p=="function"?p.call(m,c,f):p,f==null)break e;c=Re({},c,f);break e;case 2:er=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=s.effects,f===null?s.effects=[a]:f.push(a))}else m={eventTime:m,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=m,l=c):d=d.next=m,i|=f;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;f=a,a=f.next,f.next=null,s.lastBaseUpdate=f,s.shared.pending=null}}while(!0);if(d===null&&(l=c),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do i|=s.lane,s=s.next;while(s!==t)}else o===null&&(s.shared.lanes=0);fs|=i,e.lanes=i,e.memoizedState=c}}function om(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(U(191,s));s.call(r)}}}var da={},vn=Mr(da),Oi=Mr(da),Fi=Mr(da);function $r(e){if(e===da)throw Error(U(174));return e}function sh(e,t){switch(xe(Fi,t),xe(Oi,e),xe(vn,da),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ud(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ud(t,e)}Se(vn),xe(vn,t)}function go(){Se(vn),Se(Oi),Se(Fi)}function J0(e){$r(Fi.current);var t=$r(vn.current),n=ud(t,e.type);t!==n&&(xe(Oi,e),xe(vn,n))}function oh(e){Oi.current===e&&(Se(vn),Se(Oi))}var Ne=Mr(0);function Ul(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var bc=[];function ih(){for(var e=0;e<bc.length;e++)bc[e]._workInProgressVersionPrimary=null;bc.length=0}var dl=Un.ReactCurrentDispatcher,Ec=Un.ReactCurrentBatchConfig,ds=0,Pe=null,Fe=null,He=null,Vl=!1,yi=!1,Di=0,Yb=0;function Ze(){throw Error(U(321))}function ah(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!on(e[n],t[n]))return!1;return!0}function lh(e,t,n,r,s,o){if(ds=o,Pe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,dl.current=e===null||e.memoizedState===null?tE:nE,e=n(r,s),yi){o=0;do{if(yi=!1,Di=0,25<=o)throw Error(U(301));o+=1,He=Fe=null,t.updateQueue=null,dl.current=rE,e=n(r,s)}while(yi)}if(dl.current=Wl,t=Fe!==null&&Fe.next!==null,ds=0,He=Fe=Pe=null,Vl=!1,t)throw Error(U(300));return e}function uh(){var e=Di!==0;return Di=0,e}function fn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return He===null?Pe.memoizedState=He=e:He=He.next=e,He}function Wt(){if(Fe===null){var e=Pe.alternate;e=e!==null?e.memoizedState:null}else e=Fe.next;var t=He===null?Pe.memoizedState:He.next;if(t!==null)He=t,Fe=e;else{if(e===null)throw Error(U(310));Fe=e,e={memoizedState:Fe.memoizedState,baseState:Fe.baseState,baseQueue:Fe.baseQueue,queue:Fe.queue,next:null},He===null?Pe.memoizedState=He=e:He=He.next=e}return He}function zi(e,t){return typeof t=="function"?t(e):t}function Cc(e){var t=Wt(),n=t.queue;if(n===null)throw Error(U(311));n.lastRenderedReducer=e;var r=Fe,s=r.baseQueue,o=n.pending;if(o!==null){if(s!==null){var i=s.next;s.next=o.next,o.next=i}r.baseQueue=s=o,n.pending=null}if(s!==null){o=s.next,r=r.baseState;var a=i=null,l=null,u=o;do{var d=u.lane;if((ds&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var c={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=c,i=r):l=l.next=c,Pe.lanes|=d,fs|=d}u=u.next}while(u!==null&&u!==o);l===null?i=r:l.next=a,on(r,t.memoizedState)||(gt=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do o=s.lane,Pe.lanes|=o,fs|=o,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Nc(e){var t=Wt(),n=t.queue;if(n===null)throw Error(U(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,o=t.memoizedState;if(s!==null){n.pending=null;var i=s=s.next;do o=e(o,i.action),i=i.next;while(i!==s);on(o,t.memoizedState)||(gt=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ex(){}function tx(e,t){var n=Pe,r=Wt(),s=t(),o=!on(r.memoizedState,s);if(o&&(r.memoizedState=s,gt=!0),r=r.queue,ch(sx.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||He!==null&&He.memoizedState.tag&1){if(n.flags|=2048,$i(9,rx.bind(null,n,r,s,t),void 0,null),Ve===null)throw Error(U(349));ds&30||nx(n,t,s)}return s}function nx(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Pe.updateQueue,t===null?(t={lastEffect:null,stores:null},Pe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function rx(e,t,n,r){t.value=n,t.getSnapshot=r,ox(t)&&ix(e)}function sx(e,t,n){return n(function(){ox(t)&&ix(e)})}function ox(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!on(e,n)}catch{return!0}}function ix(e){var t=zn(e,1);t!==null&&rn(t,e,1,-1)}function im(e){var t=fn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:zi,lastRenderedState:e},t.queue=e,e=e.dispatch=eE.bind(null,Pe,e),[t.memoizedState,e]}function $i(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Pe.updateQueue,t===null?(t={lastEffect:null,stores:null},Pe.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function ax(){return Wt().memoizedState}function fl(e,t,n,r){var s=fn();Pe.flags|=e,s.memoizedState=$i(1|t,n,void 0,r===void 0?null:r)}function Nu(e,t,n,r){var s=Wt();r=r===void 0?null:r;var o=void 0;if(Fe!==null){var i=Fe.memoizedState;if(o=i.destroy,r!==null&&ah(r,i.deps)){s.memoizedState=$i(t,n,o,r);return}}Pe.flags|=e,s.memoizedState=$i(1|t,n,o,r)}function am(e,t){return fl(8390656,8,e,t)}function ch(e,t){return Nu(2048,8,e,t)}function lx(e,t){return Nu(4,2,e,t)}function ux(e,t){return Nu(4,4,e,t)}function cx(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function dx(e,t,n){return n=n!=null?n.concat([e]):null,Nu(4,4,cx.bind(null,t,e),n)}function dh(){}function fx(e,t){var n=Wt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ah(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function hx(e,t){var n=Wt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ah(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function px(e,t,n){return ds&21?(on(n,t)||(n=v0(),Pe.lanes|=n,fs|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,gt=!0),e.memoizedState=n)}function Zb(e,t){var n=ge;ge=n!==0&&4>n?n:4,e(!0);var r=Ec.transition;Ec.transition={};try{e(!1),t()}finally{ge=n,Ec.transition=r}}function mx(){return Wt().memoizedState}function Jb(e,t,n){var r=_r(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},gx(e))yx(t,n);else if(n=Y0(e,t,n,r),n!==null){var s=at();rn(n,e,r,s),xx(n,t,r)}}function eE(e,t,n){var r=_r(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(gx(e))yx(t,s);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,a=o(i,n);if(s.hasEagerState=!0,s.eagerState=a,on(a,i)){var l=t.interleaved;l===null?(s.next=s,nh(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=Y0(e,t,s,r),n!==null&&(s=at(),rn(n,e,r,s),xx(n,t,r))}}function gx(e){var t=e.alternate;return e===Pe||t!==null&&t===Pe}function yx(e,t){yi=Vl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function xx(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Hf(e,n)}}var Wl={readContext:Vt,useCallback:Ze,useContext:Ze,useEffect:Ze,useImperativeHandle:Ze,useInsertionEffect:Ze,useLayoutEffect:Ze,useMemo:Ze,useReducer:Ze,useRef:Ze,useState:Ze,useDebugValue:Ze,useDeferredValue:Ze,useTransition:Ze,useMutableSource:Ze,useSyncExternalStore:Ze,useId:Ze,unstable_isNewReconciler:!1},tE={readContext:Vt,useCallback:function(e,t){return fn().memoizedState=[e,t===void 0?null:t],e},useContext:Vt,useEffect:am,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,fl(4194308,4,cx.bind(null,t,e),n)},useLayoutEffect:function(e,t){return fl(4194308,4,e,t)},useInsertionEffect:function(e,t){return fl(4,2,e,t)},useMemo:function(e,t){var n=fn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=fn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Jb.bind(null,Pe,e),[r.memoizedState,e]},useRef:function(e){var t=fn();return e={current:e},t.memoizedState=e},useState:im,useDebugValue:dh,useDeferredValue:function(e){return fn().memoizedState=e},useTransition:function(){var e=im(!1),t=e[0];return e=Zb.bind(null,e[1]),fn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Pe,s=fn();if(_e){if(n===void 0)throw Error(U(407));n=n()}else{if(n=t(),Ve===null)throw Error(U(349));ds&30||nx(r,t,n)}s.memoizedState=n;var o={value:n,getSnapshot:t};return s.queue=o,am(sx.bind(null,r,o,e),[e]),r.flags|=2048,$i(9,rx.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=fn(),t=Ve.identifierPrefix;if(_e){var n=In,r=Ln;n=(r&~(1<<32-nn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Di++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Yb++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},nE={readContext:Vt,useCallback:fx,useContext:Vt,useEffect:ch,useImperativeHandle:dx,useInsertionEffect:lx,useLayoutEffect:ux,useMemo:hx,useReducer:Cc,useRef:ax,useState:function(){return Cc(zi)},useDebugValue:dh,useDeferredValue:function(e){var t=Wt();return px(t,Fe.memoizedState,e)},useTransition:function(){var e=Cc(zi)[0],t=Wt().memoizedState;return[e,t]},useMutableSource:ex,useSyncExternalStore:tx,useId:mx,unstable_isNewReconciler:!1},rE={readContext:Vt,useCallback:fx,useContext:Vt,useEffect:ch,useImperativeHandle:dx,useInsertionEffect:lx,useLayoutEffect:ux,useMemo:hx,useReducer:Nc,useRef:ax,useState:function(){return Nc(zi)},useDebugValue:dh,useDeferredValue:function(e){var t=Wt();return Fe===null?t.memoizedState=e:px(t,Fe.memoizedState,e)},useTransition:function(){var e=Nc(zi)[0],t=Wt().memoizedState;return[e,t]},useMutableSource:ex,useSyncExternalStore:tx,useId:mx,unstable_isNewReconciler:!1};function qt(e,t){if(e&&e.defaultProps){t=Re({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function jd(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Re({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ku={isMounted:function(e){return(e=e._reactInternals)?Es(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=at(),s=_r(e),o=On(r,s);o.payload=t,n!=null&&(o.callback=n),t=wr(e,o,s),t!==null&&(rn(t,e,s,r),cl(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=at(),s=_r(e),o=On(r,s);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=wr(e,o,s),t!==null&&(rn(t,e,s,r),cl(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=at(),r=_r(e),s=On(n,r);s.tag=2,t!=null&&(s.callback=t),t=wr(e,s,r),t!==null&&(rn(t,e,r,n),cl(t,e,r))}};function lm(e,t,n,r,s,o,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,i):t.prototype&&t.prototype.isPureReactComponent?!Ti(n,r)||!Ti(s,o):!0}function vx(e,t,n){var r=!1,s=Rr,o=t.contextType;return typeof o=="object"&&o!==null?o=Vt(o):(s=vt(t)?us:rt.current,r=t.contextTypes,o=(r=r!=null)?ho(e,s):Rr),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ku,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=o),t}function um(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ku.enqueueReplaceState(t,t.state,null)}function Md(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},rh(e);var o=t.contextType;typeof o=="object"&&o!==null?s.context=Vt(o):(o=vt(t)?us:rt.current,s.context=ho(e,o)),s.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(jd(e,t,o,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&ku.enqueueReplaceState(s,s.state,null),Hl(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function yo(e,t){try{var n="",r=t;do n+=M_(r),r=r.return;while(r);var s=n}catch(o){s=`
|
|
37
|
+
`+s[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=i&&0<=a);break}}}finally{ac=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?si(e):""}function M_(e){switch(e.tag){case 5:return si(e.type);case 16:return si("Lazy");case 13:return si("Suspense");case 19:return si("SuspenseList");case 0:case 2:case 15:return e=lc(e.type,!1),e;case 11:return e=lc(e.type.render,!1),e;case 1:return e=lc(e.type,!0),e;default:return""}}function sd(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Rs:return"Fragment";case Ps:return"Portal";case td:return"Profiler";case Ff:return"StrictMode";case nd:return"Suspense";case rd:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Zy:return(e.displayName||"Context")+".Consumer";case Yy:return(e._context.displayName||"Context")+".Provider";case Df:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case zf:return t=e.displayName||null,t!==null?t:sd(e.type)||"Memo";case Jn:t=e._payload,e=e._init;try{return sd(e(t))}catch{}}return null}function T_(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return sd(t);case 8:return t===Ff?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Pr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function e0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function L_(e){var t=e0(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ra(e){e._valueTracker||(e._valueTracker=L_(e))}function t0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=e0(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function kl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function od(e,t){var n=t.checked;return Re({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Np(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Pr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function n0(e,t){t=t.checked,t!=null&&Of(e,"checked",t,!1)}function id(e,t){n0(e,t);var n=Pr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ad(e,t.type,n):t.hasOwnProperty("defaultValue")&&ad(e,t.type,Pr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function kp(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ad(e,t,n){(t!=="number"||kl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var oi=Array.isArray;function Us(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Pr(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function ld(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(U(91));return Re({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Pp(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(U(92));if(oi(n)){if(1<n.length)throw Error(U(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Pr(n)}}function r0(e,t){var n=Pr(t.value),r=Pr(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Rp(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function s0(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ud(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?s0(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ja,o0=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(ja=ja||document.createElement("div"),ja.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ja.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ni(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var fi={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},I_=["Webkit","ms","Moz","O"];Object.keys(fi).forEach(function(e){I_.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fi[t]=fi[e]})});function i0(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||fi.hasOwnProperty(e)&&fi[e]?(""+t).trim():t+"px"}function a0(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=i0(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var A_=Re({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function cd(e,t){if(t){if(A_[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(U(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(U(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(U(61))}if(t.style!=null&&typeof t.style!="object")throw Error(U(62))}}function dd(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var fd=null;function $f(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var hd=null,Vs=null,Ws=null;function jp(e){if(e=ca(e)){if(typeof hd!="function")throw Error(U(280));var t=e.stateNode;t&&(t=Eu(t),hd(e.stateNode,e.type,t))}}function l0(e){Vs?Ws?Ws.push(e):Ws=[e]:Vs=e}function u0(){if(Vs){var e=Vs,t=Ws;if(Ws=Vs=null,jp(e),t)for(e=0;e<t.length;e++)jp(t[e])}}function c0(e,t){return e(t)}function d0(){}var uc=!1;function f0(e,t,n){if(uc)return e(t,n);uc=!0;try{return c0(e,t,n)}finally{uc=!1,(Vs!==null||Ws!==null)&&(d0(),u0())}}function ki(e,t){var n=e.stateNode;if(n===null)return null;var r=Eu(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(U(231,t,typeof n));return n}var pd=!1;if(Fn)try{var Ho={};Object.defineProperty(Ho,"passive",{get:function(){pd=!0}}),window.addEventListener("test",Ho,Ho),window.removeEventListener("test",Ho,Ho)}catch{pd=!1}function O_(e,t,n,r,s,o,i,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var hi=!1,Pl=null,Rl=!1,md=null,F_={onError:function(e){hi=!0,Pl=e}};function D_(e,t,n,r,s,o,i,a,l){hi=!1,Pl=null,O_.apply(F_,arguments)}function z_(e,t,n,r,s,o,i,a,l){if(D_.apply(this,arguments),hi){if(hi){var u=Pl;hi=!1,Pl=null}else throw Error(U(198));Rl||(Rl=!0,md=u)}}function Es(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function h0(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Mp(e){if(Es(e)!==e)throw Error(U(188))}function $_(e){var t=e.alternate;if(!t){if(t=Es(e),t===null)throw Error(U(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var o=s.alternate;if(o===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===o.child){for(o=s.child;o;){if(o===n)return Mp(s),e;if(o===r)return Mp(s),t;o=o.sibling}throw Error(U(188))}if(n.return!==r.return)n=s,r=o;else{for(var i=!1,a=s.child;a;){if(a===n){i=!0,n=s,r=o;break}if(a===r){i=!0,r=s,n=o;break}a=a.sibling}if(!i){for(a=o.child;a;){if(a===n){i=!0,n=o,r=s;break}if(a===r){i=!0,r=o,n=s;break}a=a.sibling}if(!i)throw Error(U(189))}}if(n.alternate!==r)throw Error(U(190))}if(n.tag!==3)throw Error(U(188));return n.stateNode.current===n?e:t}function p0(e){return e=$_(e),e!==null?m0(e):null}function m0(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=m0(e);if(t!==null)return t;e=e.sibling}return null}var g0=jt.unstable_scheduleCallback,Tp=jt.unstable_cancelCallback,B_=jt.unstable_shouldYield,H_=jt.unstable_requestPaint,Ie=jt.unstable_now,U_=jt.unstable_getCurrentPriorityLevel,Bf=jt.unstable_ImmediatePriority,y0=jt.unstable_UserBlockingPriority,jl=jt.unstable_NormalPriority,V_=jt.unstable_LowPriority,x0=jt.unstable_IdlePriority,wu=null,xn=null;function W_(e){if(xn&&typeof xn.onCommitFiberRoot=="function")try{xn.onCommitFiberRoot(wu,e,void 0,(e.current.flags&128)===128)}catch{}}var nn=Math.clz32?Math.clz32:Q_,K_=Math.log,q_=Math.LN2;function Q_(e){return e>>>=0,e===0?32:31-(K_(e)/q_|0)|0}var Ma=64,Ta=4194304;function ii(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ml(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~s;a!==0?r=ii(a):(o&=i,o!==0&&(r=ii(o)))}else i=n&~s,i!==0?r=ii(i):o!==0&&(r=ii(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,o=t&-t,s>=o||s===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-nn(t),s=1<<n,r|=e[n],t&=~s;return r}function G_(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function X_(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-nn(o),a=1<<i,l=s[i];l===-1?(!(a&n)||a&r)&&(s[i]=G_(a,t)):l<=t&&(e.expiredLanes|=a),o&=~a}}function gd(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function v0(){var e=Ma;return Ma<<=1,!(Ma&4194240)&&(Ma=64),e}function cc(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function la(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-nn(t),e[t]=n}function Y_(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-nn(n),o=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~o}}function Hf(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-nn(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var ge=0;function w0(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var S0,Uf,_0,b0,E0,yd=!1,La=[],gr=null,yr=null,xr=null,Pi=new Map,Ri=new Map,tr=[],Z_="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Lp(e,t){switch(e){case"focusin":case"focusout":gr=null;break;case"dragenter":case"dragleave":yr=null;break;case"mouseover":case"mouseout":xr=null;break;case"pointerover":case"pointerout":Pi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ri.delete(t.pointerId)}}function Uo(e,t,n,r,s,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[s]},t!==null&&(t=ca(t),t!==null&&Uf(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function J_(e,t,n,r,s){switch(t){case"focusin":return gr=Uo(gr,e,t,n,r,s),!0;case"dragenter":return yr=Uo(yr,e,t,n,r,s),!0;case"mouseover":return xr=Uo(xr,e,t,n,r,s),!0;case"pointerover":var o=s.pointerId;return Pi.set(o,Uo(Pi.get(o)||null,e,t,n,r,s)),!0;case"gotpointercapture":return o=s.pointerId,Ri.set(o,Uo(Ri.get(o)||null,e,t,n,r,s)),!0}return!1}function C0(e){var t=Dr(e.target);if(t!==null){var n=Es(t);if(n!==null){if(t=n.tag,t===13){if(t=h0(n),t!==null){e.blockedOn=t,E0(e.priority,function(){_0(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function al(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=xd(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);fd=r,n.target.dispatchEvent(r),fd=null}else return t=ca(n),t!==null&&Uf(t),e.blockedOn=n,!1;t.shift()}return!0}function Ip(e,t,n){al(e)&&n.delete(t)}function eb(){yd=!1,gr!==null&&al(gr)&&(gr=null),yr!==null&&al(yr)&&(yr=null),xr!==null&&al(xr)&&(xr=null),Pi.forEach(Ip),Ri.forEach(Ip)}function Vo(e,t){e.blockedOn===t&&(e.blockedOn=null,yd||(yd=!0,jt.unstable_scheduleCallback(jt.unstable_NormalPriority,eb)))}function ji(e){function t(s){return Vo(s,e)}if(0<La.length){Vo(La[0],e);for(var n=1;n<La.length;n++){var r=La[n];r.blockedOn===e&&(r.blockedOn=null)}}for(gr!==null&&Vo(gr,e),yr!==null&&Vo(yr,e),xr!==null&&Vo(xr,e),Pi.forEach(t),Ri.forEach(t),n=0;n<tr.length;n++)r=tr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<tr.length&&(n=tr[0],n.blockedOn===null);)C0(n),n.blockedOn===null&&tr.shift()}var Ks=Un.ReactCurrentBatchConfig,Tl=!0;function tb(e,t,n,r){var s=ge,o=Ks.transition;Ks.transition=null;try{ge=1,Vf(e,t,n,r)}finally{ge=s,Ks.transition=o}}function nb(e,t,n,r){var s=ge,o=Ks.transition;Ks.transition=null;try{ge=4,Vf(e,t,n,r)}finally{ge=s,Ks.transition=o}}function Vf(e,t,n,r){if(Tl){var s=xd(e,t,n,r);if(s===null)wc(e,t,r,Ll,n),Lp(e,r);else if(J_(s,e,t,n,r))r.stopPropagation();else if(Lp(e,r),t&4&&-1<Z_.indexOf(e)){for(;s!==null;){var o=ca(s);if(o!==null&&S0(o),o=xd(e,t,n,r),o===null&&wc(e,t,r,Ll,n),o===s)break;s=o}s!==null&&r.stopPropagation()}else wc(e,t,r,null,n)}}var Ll=null;function xd(e,t,n,r){if(Ll=null,e=$f(r),e=Dr(e),e!==null)if(t=Es(e),t===null)e=null;else if(n=t.tag,n===13){if(e=h0(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ll=e,null}function N0(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(U_()){case Bf:return 1;case y0:return 4;case jl:case V_:return 16;case x0:return 536870912;default:return 16}default:return 16}}var fr=null,Wf=null,ll=null;function k0(){if(ll)return ll;var e,t=Wf,n=t.length,r,s="value"in fr?fr.value:fr.textContent,o=s.length;for(e=0;e<n&&t[e]===s[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===s[o-r];r++);return ll=s.slice(e,1<r?1-r:void 0)}function ul(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ia(){return!0}function Ap(){return!1}function Lt(e){function t(n,r,s,o,i){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=o,this.target=i,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(o):o[a]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Ia:Ap,this.isPropagationStopped=Ap,this}return Re(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ia)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ia)},persist:function(){},isPersistent:Ia}),t}var Lo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Kf=Lt(Lo),ua=Re({},Lo,{view:0,detail:0}),rb=Lt(ua),dc,fc,Wo,Su=Re({},ua,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:qf,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Wo&&(Wo&&e.type==="mousemove"?(dc=e.screenX-Wo.screenX,fc=e.screenY-Wo.screenY):fc=dc=0,Wo=e),dc)},movementY:function(e){return"movementY"in e?e.movementY:fc}}),Op=Lt(Su),sb=Re({},Su,{dataTransfer:0}),ob=Lt(sb),ib=Re({},ua,{relatedTarget:0}),hc=Lt(ib),ab=Re({},Lo,{animationName:0,elapsedTime:0,pseudoElement:0}),lb=Lt(ab),ub=Re({},Lo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),cb=Lt(ub),db=Re({},Lo,{data:0}),Fp=Lt(db),fb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},hb={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"},pb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function mb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=pb[e])?!!t[e]:!1}function qf(){return mb}var gb=Re({},ua,{key:function(e){if(e.key){var t=fb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ul(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?hb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:qf,charCode:function(e){return e.type==="keypress"?ul(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ul(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),yb=Lt(gb),xb=Re({},Su,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Dp=Lt(xb),vb=Re({},ua,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:qf}),wb=Lt(vb),Sb=Re({},Lo,{propertyName:0,elapsedTime:0,pseudoElement:0}),_b=Lt(Sb),bb=Re({},Su,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Eb=Lt(bb),Cb=[9,13,27,32],Qf=Fn&&"CompositionEvent"in window,pi=null;Fn&&"documentMode"in document&&(pi=document.documentMode);var Nb=Fn&&"TextEvent"in window&&!pi,P0=Fn&&(!Qf||pi&&8<pi&&11>=pi),zp=" ",$p=!1;function R0(e,t){switch(e){case"keyup":return Cb.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function j0(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var js=!1;function kb(e,t){switch(e){case"compositionend":return j0(t);case"keypress":return t.which!==32?null:($p=!0,zp);case"textInput":return e=t.data,e===zp&&$p?null:e;default:return null}}function Pb(e,t){if(js)return e==="compositionend"||!Qf&&R0(e,t)?(e=k0(),ll=Wf=fr=null,js=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return P0&&t.locale!=="ko"?null:t.data;default:return null}}var Rb={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 Bp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Rb[e.type]:t==="textarea"}function M0(e,t,n,r){l0(r),t=Il(t,"onChange"),0<t.length&&(n=new Kf("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var mi=null,Mi=null;function jb(e){H0(e,0)}function _u(e){var t=Ls(e);if(t0(t))return e}function Mb(e,t){if(e==="change")return t}var T0=!1;if(Fn){var pc;if(Fn){var mc="oninput"in document;if(!mc){var Hp=document.createElement("div");Hp.setAttribute("oninput","return;"),mc=typeof Hp.oninput=="function"}pc=mc}else pc=!1;T0=pc&&(!document.documentMode||9<document.documentMode)}function Up(){mi&&(mi.detachEvent("onpropertychange",L0),Mi=mi=null)}function L0(e){if(e.propertyName==="value"&&_u(Mi)){var t=[];M0(t,Mi,e,$f(e)),f0(jb,t)}}function Tb(e,t,n){e==="focusin"?(Up(),mi=t,Mi=n,mi.attachEvent("onpropertychange",L0)):e==="focusout"&&Up()}function Lb(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return _u(Mi)}function Ib(e,t){if(e==="click")return _u(t)}function Ab(e,t){if(e==="input"||e==="change")return _u(t)}function Ob(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var on=typeof Object.is=="function"?Object.is:Ob;function Ti(e,t){if(on(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!ed.call(t,s)||!on(e[s],t[s]))return!1}return!0}function Vp(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Wp(e,t){var n=Vp(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Vp(n)}}function I0(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?I0(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function A0(){for(var e=window,t=kl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=kl(e.document)}return t}function Gf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Fb(e){var t=A0(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&I0(n.ownerDocument.documentElement,n)){if(r!==null&&Gf(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,o=Math.min(r.start,s);r=r.end===void 0?o:Math.min(r.end,s),!e.extend&&o>r&&(s=r,r=o,o=s),s=Wp(n,o);var i=Wp(n,r);s&&i&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Db=Fn&&"documentMode"in document&&11>=document.documentMode,Ms=null,vd=null,gi=null,wd=!1;function Kp(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;wd||Ms==null||Ms!==kl(r)||(r=Ms,"selectionStart"in r&&Gf(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),gi&&Ti(gi,r)||(gi=r,r=Il(vd,"onSelect"),0<r.length&&(t=new Kf("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Ms)))}function Aa(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ts={animationend:Aa("Animation","AnimationEnd"),animationiteration:Aa("Animation","AnimationIteration"),animationstart:Aa("Animation","AnimationStart"),transitionend:Aa("Transition","TransitionEnd")},gc={},O0={};Fn&&(O0=document.createElement("div").style,"AnimationEvent"in window||(delete Ts.animationend.animation,delete Ts.animationiteration.animation,delete Ts.animationstart.animation),"TransitionEvent"in window||delete Ts.transitionend.transition);function bu(e){if(gc[e])return gc[e];if(!Ts[e])return e;var t=Ts[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in O0)return gc[e]=t[n];return e}var F0=bu("animationend"),D0=bu("animationiteration"),z0=bu("animationstart"),$0=bu("transitionend"),B0=new Map,qp="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function jr(e,t){B0.set(e,t),bs(t,[e])}for(var yc=0;yc<qp.length;yc++){var xc=qp[yc],zb=xc.toLowerCase(),$b=xc[0].toUpperCase()+xc.slice(1);jr(zb,"on"+$b)}jr(F0,"onAnimationEnd");jr(D0,"onAnimationIteration");jr(z0,"onAnimationStart");jr("dblclick","onDoubleClick");jr("focusin","onFocus");jr("focusout","onBlur");jr($0,"onTransitionEnd");fo("onMouseEnter",["mouseout","mouseover"]);fo("onMouseLeave",["mouseout","mouseover"]);fo("onPointerEnter",["pointerout","pointerover"]);fo("onPointerLeave",["pointerout","pointerover"]);bs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));bs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));bs("onBeforeInput",["compositionend","keypress","textInput","paste"]);bs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));bs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));bs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ai="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(" "),Bb=new Set("cancel close invalid load scroll toggle".split(" ").concat(ai));function Qp(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,z_(r,t,void 0,e),e.currentTarget=null}function H0(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var i=r.length-1;0<=i;i--){var a=r[i],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==o&&s.isPropagationStopped())break e;Qp(s,a,u),o=l}else for(i=0;i<r.length;i++){if(a=r[i],l=a.instance,u=a.currentTarget,a=a.listener,l!==o&&s.isPropagationStopped())break e;Qp(s,a,u),o=l}}}if(Rl)throw e=md,Rl=!1,md=null,e}function we(e,t){var n=t[Cd];n===void 0&&(n=t[Cd]=new Set);var r=e+"__bubble";n.has(r)||(U0(t,e,2,!1),n.add(r))}function vc(e,t,n){var r=0;t&&(r|=4),U0(n,e,r,t)}var Oa="_reactListening"+Math.random().toString(36).slice(2);function Li(e){if(!e[Oa]){e[Oa]=!0,Xy.forEach(function(n){n!=="selectionchange"&&(Bb.has(n)||vc(n,!1,e),vc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Oa]||(t[Oa]=!0,vc("selectionchange",!1,t))}}function U0(e,t,n,r){switch(N0(t)){case 1:var s=tb;break;case 4:s=nb;break;default:s=Vf}n=s.bind(null,t,n,e),s=void 0,!pd||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function wc(e,t,n,r,s){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var a=r.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(i===4)for(i=r.return;i!==null;){var l=i.tag;if((l===3||l===4)&&(l=i.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;i=i.return}for(;a!==null;){if(i=Dr(a),i===null)return;if(l=i.tag,l===5||l===6){r=o=i;continue e}a=a.parentNode}}r=r.return}f0(function(){var u=o,d=$f(n),c=[];e:{var f=B0.get(e);if(f!==void 0){var m=Kf,p=e;switch(e){case"keypress":if(ul(n)===0)break e;case"keydown":case"keyup":m=yb;break;case"focusin":p="focus",m=hc;break;case"focusout":p="blur",m=hc;break;case"beforeblur":case"afterblur":m=hc;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=Op;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=ob;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=wb;break;case F0:case D0:case z0:m=lb;break;case $0:m=_b;break;case"scroll":m=rb;break;case"wheel":m=Eb;break;case"copy":case"cut":case"paste":m=cb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=Dp}var x=(t&4)!==0,w=!x&&e==="scroll",g=x?f!==null?f+"Capture":null:f;x=[];for(var v=u,y;v!==null;){y=v;var S=y.stateNode;if(y.tag===5&&S!==null&&(y=S,g!==null&&(S=ki(v,g),S!=null&&x.push(Ii(v,S,y)))),w)break;v=v.return}0<x.length&&(f=new m(f,p,null,n,d),c.push({event:f,listeners:x}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",f&&n!==fd&&(p=n.relatedTarget||n.fromElement)&&(Dr(p)||p[Dn]))break e;if((m||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,m?(p=n.relatedTarget||n.toElement,m=u,p=p?Dr(p):null,p!==null&&(w=Es(p),p!==w||p.tag!==5&&p.tag!==6)&&(p=null)):(m=null,p=u),m!==p)){if(x=Op,S="onMouseLeave",g="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(x=Dp,S="onPointerLeave",g="onPointerEnter",v="pointer"),w=m==null?f:Ls(m),y=p==null?f:Ls(p),f=new x(S,v+"leave",m,n,d),f.target=w,f.relatedTarget=y,S=null,Dr(d)===u&&(x=new x(g,v+"enter",p,n,d),x.target=y,x.relatedTarget=w,S=x),w=S,m&&p)t:{for(x=m,g=p,v=0,y=x;y;y=Cs(y))v++;for(y=0,S=g;S;S=Cs(S))y++;for(;0<v-y;)x=Cs(x),v--;for(;0<y-v;)g=Cs(g),y--;for(;v--;){if(x===g||g!==null&&x===g.alternate)break t;x=Cs(x),g=Cs(g)}x=null}else x=null;m!==null&&Gp(c,f,m,x,!1),p!==null&&w!==null&&Gp(c,w,p,x,!0)}}e:{if(f=u?Ls(u):window,m=f.nodeName&&f.nodeName.toLowerCase(),m==="select"||m==="input"&&f.type==="file")var E=Mb;else if(Bp(f))if(T0)E=Ab;else{E=Lb;var b=Tb}else(m=f.nodeName)&&m.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(E=Ib);if(E&&(E=E(e,u))){M0(c,E,n,d);break e}b&&b(e,f,u),e==="focusout"&&(b=f._wrapperState)&&b.controlled&&f.type==="number"&&ad(f,"number",f.value)}switch(b=u?Ls(u):window,e){case"focusin":(Bp(b)||b.contentEditable==="true")&&(Ms=b,vd=u,gi=null);break;case"focusout":gi=vd=Ms=null;break;case"mousedown":wd=!0;break;case"contextmenu":case"mouseup":case"dragend":wd=!1,Kp(c,n,d);break;case"selectionchange":if(Db)break;case"keydown":case"keyup":Kp(c,n,d)}var _;if(Qf)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else js?R0(e,n)&&(C="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(C="onCompositionStart");C&&(P0&&n.locale!=="ko"&&(js||C!=="onCompositionStart"?C==="onCompositionEnd"&&js&&(_=k0()):(fr=d,Wf="value"in fr?fr.value:fr.textContent,js=!0)),b=Il(u,C),0<b.length&&(C=new Fp(C,e,null,n,d),c.push({event:C,listeners:b}),_?C.data=_:(_=j0(n),_!==null&&(C.data=_)))),(_=Nb?kb(e,n):Pb(e,n))&&(u=Il(u,"onBeforeInput"),0<u.length&&(d=new Fp("onBeforeInput","beforeinput",null,n,d),c.push({event:d,listeners:u}),d.data=_))}H0(c,t)})}function Ii(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Il(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=ki(e,n),o!=null&&r.unshift(Ii(e,o,s)),o=ki(e,t),o!=null&&r.push(Ii(e,o,s))),e=e.return}return r}function Cs(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Gp(e,t,n,r,s){for(var o=t._reactName,i=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,s?(l=ki(n,o),l!=null&&i.unshift(Ii(n,l,a))):s||(l=ki(n,o),l!=null&&i.push(Ii(n,l,a)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var Hb=/\r\n?/g,Ub=/\u0000|\uFFFD/g;function Xp(e){return(typeof e=="string"?e:""+e).replace(Hb,`
|
|
38
|
+
`).replace(Ub,"")}function Fa(e,t,n){if(t=Xp(t),Xp(e)!==t&&n)throw Error(U(425))}function Al(){}var Sd=null,_d=null;function bd(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ed=typeof setTimeout=="function"?setTimeout:void 0,Vb=typeof clearTimeout=="function"?clearTimeout:void 0,Yp=typeof Promise=="function"?Promise:void 0,Wb=typeof queueMicrotask=="function"?queueMicrotask:typeof Yp<"u"?function(e){return Yp.resolve(null).then(e).catch(Kb)}:Ed;function Kb(e){setTimeout(function(){throw e})}function Sc(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),ji(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);ji(t)}function vr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Zp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Io=Math.random().toString(36).slice(2),yn="__reactFiber$"+Io,Ai="__reactProps$"+Io,Dn="__reactContainer$"+Io,Cd="__reactEvents$"+Io,qb="__reactListeners$"+Io,Qb="__reactHandles$"+Io;function Dr(e){var t=e[yn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Dn]||n[yn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Zp(e);e!==null;){if(n=e[yn])return n;e=Zp(e)}return t}e=n,n=e.parentNode}return null}function ca(e){return e=e[yn]||e[Dn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ls(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(U(33))}function Eu(e){return e[Ai]||null}var Nd=[],Is=-1;function Mr(e){return{current:e}}function Se(e){0>Is||(e.current=Nd[Is],Nd[Is]=null,Is--)}function xe(e,t){Is++,Nd[Is]=e.current,e.current=t}var Rr={},rt=Mr(Rr),xt=Mr(!1),us=Rr;function ho(e,t){var n=e.type.contextTypes;if(!n)return Rr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in n)s[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function vt(e){return e=e.childContextTypes,e!=null}function Ol(){Se(xt),Se(rt)}function Jp(e,t,n){if(rt.current!==Rr)throw Error(U(168));xe(rt,t),xe(xt,n)}function V0(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(U(108,T_(e)||"Unknown",s));return Re({},n,r)}function Fl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Rr,us=rt.current,xe(rt,e),xe(xt,xt.current),!0}function em(e,t,n){var r=e.stateNode;if(!r)throw Error(U(169));n?(e=V0(e,t,us),r.__reactInternalMemoizedMergedChildContext=e,Se(xt),Se(rt),xe(rt,e)):Se(xt),xe(xt,n)}var jn=null,Cu=!1,_c=!1;function W0(e){jn===null?jn=[e]:jn.push(e)}function Gb(e){Cu=!0,W0(e)}function Tr(){if(!_c&&jn!==null){_c=!0;var e=0,t=ge;try{var n=jn;for(ge=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}jn=null,Cu=!1}catch(s){throw jn!==null&&(jn=jn.slice(e+1)),g0(Bf,Tr),s}finally{ge=t,_c=!1}}return null}var As=[],Os=0,Dl=null,zl=0,zt=[],$t=0,cs=null,Ln=1,In="";function Lr(e,t){As[Os++]=zl,As[Os++]=Dl,Dl=e,zl=t}function K0(e,t,n){zt[$t++]=Ln,zt[$t++]=In,zt[$t++]=cs,cs=e;var r=Ln;e=In;var s=32-nn(r)-1;r&=~(1<<s),n+=1;var o=32-nn(t)+s;if(30<o){var i=s-s%5;o=(r&(1<<i)-1).toString(32),r>>=i,s-=i,Ln=1<<32-nn(t)+s|n<<s|r,In=o+e}else Ln=1<<o|n<<s|r,In=e}function Xf(e){e.return!==null&&(Lr(e,1),K0(e,1,0))}function Yf(e){for(;e===Dl;)Dl=As[--Os],As[Os]=null,zl=As[--Os],As[Os]=null;for(;e===cs;)cs=zt[--$t],zt[$t]=null,In=zt[--$t],zt[$t]=null,Ln=zt[--$t],zt[$t]=null}var Pt=null,kt=null,_e=!1,Zt=null;function q0(e,t){var n=Bt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function tm(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Pt=e,kt=vr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Pt=e,kt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=cs!==null?{id:Ln,overflow:In}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Bt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Pt=e,kt=null,!0):!1;default:return!1}}function kd(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Pd(e){if(_e){var t=kt;if(t){var n=t;if(!tm(e,t)){if(kd(e))throw Error(U(418));t=vr(n.nextSibling);var r=Pt;t&&tm(e,t)?q0(r,n):(e.flags=e.flags&-4097|2,_e=!1,Pt=e)}}else{if(kd(e))throw Error(U(418));e.flags=e.flags&-4097|2,_e=!1,Pt=e}}}function nm(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Pt=e}function Da(e){if(e!==Pt)return!1;if(!_e)return nm(e),_e=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!bd(e.type,e.memoizedProps)),t&&(t=kt)){if(kd(e))throw Q0(),Error(U(418));for(;t;)q0(e,t),t=vr(t.nextSibling)}if(nm(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){kt=vr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}kt=null}}else kt=Pt?vr(e.stateNode.nextSibling):null;return!0}function Q0(){for(var e=kt;e;)e=vr(e.nextSibling)}function po(){kt=Pt=null,_e=!1}function Zf(e){Zt===null?Zt=[e]:Zt.push(e)}var Xb=Un.ReactCurrentBatchConfig;function Ko(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(U(309));var r=n.stateNode}if(!r)throw Error(U(147,e));var s=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(i){var a=s.refs;i===null?delete a[o]:a[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(U(284));if(!n._owner)throw Error(U(290,e))}return e}function za(e,t){throw e=Object.prototype.toString.call(t),Error(U(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function rm(e){var t=e._init;return t(e._payload)}function G0(e){function t(g,v){if(e){var y=g.deletions;y===null?(g.deletions=[v],g.flags|=16):y.push(v)}}function n(g,v){if(!e)return null;for(;v!==null;)t(g,v),v=v.sibling;return null}function r(g,v){for(g=new Map;v!==null;)v.key!==null?g.set(v.key,v):g.set(v.index,v),v=v.sibling;return g}function s(g,v){return g=br(g,v),g.index=0,g.sibling=null,g}function o(g,v,y){return g.index=y,e?(y=g.alternate,y!==null?(y=y.index,y<v?(g.flags|=2,v):y):(g.flags|=2,v)):(g.flags|=1048576,v)}function i(g){return e&&g.alternate===null&&(g.flags|=2),g}function a(g,v,y,S){return v===null||v.tag!==6?(v=Rc(y,g.mode,S),v.return=g,v):(v=s(v,y),v.return=g,v)}function l(g,v,y,S){var E=y.type;return E===Rs?d(g,v,y.props.children,S,y.key):v!==null&&(v.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Jn&&rm(E)===v.type)?(S=s(v,y.props),S.ref=Ko(g,v,y),S.return=g,S):(S=gl(y.type,y.key,y.props,null,g.mode,S),S.ref=Ko(g,v,y),S.return=g,S)}function u(g,v,y,S){return v===null||v.tag!==4||v.stateNode.containerInfo!==y.containerInfo||v.stateNode.implementation!==y.implementation?(v=jc(y,g.mode,S),v.return=g,v):(v=s(v,y.children||[]),v.return=g,v)}function d(g,v,y,S,E){return v===null||v.tag!==7?(v=ts(y,g.mode,S,E),v.return=g,v):(v=s(v,y),v.return=g,v)}function c(g,v,y){if(typeof v=="string"&&v!==""||typeof v=="number")return v=Rc(""+v,g.mode,y),v.return=g,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Pa:return y=gl(v.type,v.key,v.props,null,g.mode,y),y.ref=Ko(g,null,v),y.return=g,y;case Ps:return v=jc(v,g.mode,y),v.return=g,v;case Jn:var S=v._init;return c(g,S(v._payload),y)}if(oi(v)||Bo(v))return v=ts(v,g.mode,y,null),v.return=g,v;za(g,v)}return null}function f(g,v,y,S){var E=v!==null?v.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return E!==null?null:a(g,v,""+y,S);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Pa:return y.key===E?l(g,v,y,S):null;case Ps:return y.key===E?u(g,v,y,S):null;case Jn:return E=y._init,f(g,v,E(y._payload),S)}if(oi(y)||Bo(y))return E!==null?null:d(g,v,y,S,null);za(g,y)}return null}function m(g,v,y,S,E){if(typeof S=="string"&&S!==""||typeof S=="number")return g=g.get(y)||null,a(v,g,""+S,E);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Pa:return g=g.get(S.key===null?y:S.key)||null,l(v,g,S,E);case Ps:return g=g.get(S.key===null?y:S.key)||null,u(v,g,S,E);case Jn:var b=S._init;return m(g,v,y,b(S._payload),E)}if(oi(S)||Bo(S))return g=g.get(y)||null,d(v,g,S,E,null);za(v,S)}return null}function p(g,v,y,S){for(var E=null,b=null,_=v,C=v=0,M=null;_!==null&&C<y.length;C++){_.index>C?(M=_,_=null):M=_.sibling;var L=f(g,_,y[C],S);if(L===null){_===null&&(_=M);break}e&&_&&L.alternate===null&&t(g,_),v=o(L,v,C),b===null?E=L:b.sibling=L,b=L,_=M}if(C===y.length)return n(g,_),_e&&Lr(g,C),E;if(_===null){for(;C<y.length;C++)_=c(g,y[C],S),_!==null&&(v=o(_,v,C),b===null?E=_:b.sibling=_,b=_);return _e&&Lr(g,C),E}for(_=r(g,_);C<y.length;C++)M=m(_,g,C,y[C],S),M!==null&&(e&&M.alternate!==null&&_.delete(M.key===null?C:M.key),v=o(M,v,C),b===null?E=M:b.sibling=M,b=M);return e&&_.forEach(function(P){return t(g,P)}),_e&&Lr(g,C),E}function x(g,v,y,S){var E=Bo(y);if(typeof E!="function")throw Error(U(150));if(y=E.call(y),y==null)throw Error(U(151));for(var b=E=null,_=v,C=v=0,M=null,L=y.next();_!==null&&!L.done;C++,L=y.next()){_.index>C?(M=_,_=null):M=_.sibling;var P=f(g,_,L.value,S);if(P===null){_===null&&(_=M);break}e&&_&&P.alternate===null&&t(g,_),v=o(P,v,C),b===null?E=P:b.sibling=P,b=P,_=M}if(L.done)return n(g,_),_e&&Lr(g,C),E;if(_===null){for(;!L.done;C++,L=y.next())L=c(g,L.value,S),L!==null&&(v=o(L,v,C),b===null?E=L:b.sibling=L,b=L);return _e&&Lr(g,C),E}for(_=r(g,_);!L.done;C++,L=y.next())L=m(_,g,C,L.value,S),L!==null&&(e&&L.alternate!==null&&_.delete(L.key===null?C:L.key),v=o(L,v,C),b===null?E=L:b.sibling=L,b=L);return e&&_.forEach(function(R){return t(g,R)}),_e&&Lr(g,C),E}function w(g,v,y,S){if(typeof y=="object"&&y!==null&&y.type===Rs&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Pa:e:{for(var E=y.key,b=v;b!==null;){if(b.key===E){if(E=y.type,E===Rs){if(b.tag===7){n(g,b.sibling),v=s(b,y.props.children),v.return=g,g=v;break e}}else if(b.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Jn&&rm(E)===b.type){n(g,b.sibling),v=s(b,y.props),v.ref=Ko(g,b,y),v.return=g,g=v;break e}n(g,b);break}else t(g,b);b=b.sibling}y.type===Rs?(v=ts(y.props.children,g.mode,S,y.key),v.return=g,g=v):(S=gl(y.type,y.key,y.props,null,g.mode,S),S.ref=Ko(g,v,y),S.return=g,g=S)}return i(g);case Ps:e:{for(b=y.key;v!==null;){if(v.key===b)if(v.tag===4&&v.stateNode.containerInfo===y.containerInfo&&v.stateNode.implementation===y.implementation){n(g,v.sibling),v=s(v,y.children||[]),v.return=g,g=v;break e}else{n(g,v);break}else t(g,v);v=v.sibling}v=jc(y,g.mode,S),v.return=g,g=v}return i(g);case Jn:return b=y._init,w(g,v,b(y._payload),S)}if(oi(y))return p(g,v,y,S);if(Bo(y))return x(g,v,y,S);za(g,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,v!==null&&v.tag===6?(n(g,v.sibling),v=s(v,y),v.return=g,g=v):(n(g,v),v=Rc(y,g.mode,S),v.return=g,g=v),i(g)):n(g,v)}return w}var mo=G0(!0),X0=G0(!1),$l=Mr(null),Bl=null,Fs=null,Jf=null;function eh(){Jf=Fs=Bl=null}function th(e){var t=$l.current;Se($l),e._currentValue=t}function Rd(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function qs(e,t){Bl=e,Jf=Fs=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(gt=!0),e.firstContext=null)}function Vt(e){var t=e._currentValue;if(Jf!==e)if(e={context:e,memoizedValue:t,next:null},Fs===null){if(Bl===null)throw Error(U(308));Fs=e,Bl.dependencies={lanes:0,firstContext:e}}else Fs=Fs.next=e;return t}var zr=null;function nh(e){zr===null?zr=[e]:zr.push(e)}function Y0(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,nh(t)):(n.next=s.next,s.next=n),t.interleaved=n,zn(e,r)}function zn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var er=!1;function rh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Z0(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function On(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function wr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,pe&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,zn(e,n)}return s=r.interleaved,s===null?(t.next=t,nh(r)):(t.next=s.next,s.next=t),r.interleaved=t,zn(e,n)}function cl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Hf(e,n)}}function sm(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?s=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?s=o=t:o=o.next=t}else s=o=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Hl(e,t,n,r){var s=e.updateQueue;er=!1;var o=s.firstBaseUpdate,i=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,i===null?o=u:i.next=u,i=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==i&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=l))}if(o!==null){var c=s.baseState;i=0,d=u=l=null,a=o;do{var f=a.lane,m=a.eventTime;if((r&f)===f){d!==null&&(d=d.next={eventTime:m,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=e,x=a;switch(f=t,m=n,x.tag){case 1:if(p=x.payload,typeof p=="function"){c=p.call(m,c,f);break e}c=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=x.payload,f=typeof p=="function"?p.call(m,c,f):p,f==null)break e;c=Re({},c,f);break e;case 2:er=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=s.effects,f===null?s.effects=[a]:f.push(a))}else m={eventTime:m,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=m,l=c):d=d.next=m,i|=f;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;f=a,a=f.next,f.next=null,s.lastBaseUpdate=f,s.shared.pending=null}}while(!0);if(d===null&&(l=c),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do i|=s.lane,s=s.next;while(s!==t)}else o===null&&(s.shared.lanes=0);fs|=i,e.lanes=i,e.memoizedState=c}}function om(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(U(191,s));s.call(r)}}}var da={},vn=Mr(da),Oi=Mr(da),Fi=Mr(da);function $r(e){if(e===da)throw Error(U(174));return e}function sh(e,t){switch(xe(Fi,t),xe(Oi,e),xe(vn,da),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ud(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ud(t,e)}Se(vn),xe(vn,t)}function go(){Se(vn),Se(Oi),Se(Fi)}function J0(e){$r(Fi.current);var t=$r(vn.current),n=ud(t,e.type);t!==n&&(xe(Oi,e),xe(vn,n))}function oh(e){Oi.current===e&&(Se(vn),Se(Oi))}var Ne=Mr(0);function Ul(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var bc=[];function ih(){for(var e=0;e<bc.length;e++)bc[e]._workInProgressVersionPrimary=null;bc.length=0}var dl=Un.ReactCurrentDispatcher,Ec=Un.ReactCurrentBatchConfig,ds=0,Pe=null,Fe=null,He=null,Vl=!1,yi=!1,Di=0,Yb=0;function Ze(){throw Error(U(321))}function ah(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!on(e[n],t[n]))return!1;return!0}function lh(e,t,n,r,s,o){if(ds=o,Pe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,dl.current=e===null||e.memoizedState===null?tE:nE,e=n(r,s),yi){o=0;do{if(yi=!1,Di=0,25<=o)throw Error(U(301));o+=1,He=Fe=null,t.updateQueue=null,dl.current=rE,e=n(r,s)}while(yi)}if(dl.current=Wl,t=Fe!==null&&Fe.next!==null,ds=0,He=Fe=Pe=null,Vl=!1,t)throw Error(U(300));return e}function uh(){var e=Di!==0;return Di=0,e}function fn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return He===null?Pe.memoizedState=He=e:He=He.next=e,He}function Wt(){if(Fe===null){var e=Pe.alternate;e=e!==null?e.memoizedState:null}else e=Fe.next;var t=He===null?Pe.memoizedState:He.next;if(t!==null)He=t,Fe=e;else{if(e===null)throw Error(U(310));Fe=e,e={memoizedState:Fe.memoizedState,baseState:Fe.baseState,baseQueue:Fe.baseQueue,queue:Fe.queue,next:null},He===null?Pe.memoizedState=He=e:He=He.next=e}return He}function zi(e,t){return typeof t=="function"?t(e):t}function Cc(e){var t=Wt(),n=t.queue;if(n===null)throw Error(U(311));n.lastRenderedReducer=e;var r=Fe,s=r.baseQueue,o=n.pending;if(o!==null){if(s!==null){var i=s.next;s.next=o.next,o.next=i}r.baseQueue=s=o,n.pending=null}if(s!==null){o=s.next,r=r.baseState;var a=i=null,l=null,u=o;do{var d=u.lane;if((ds&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var c={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=c,i=r):l=l.next=c,Pe.lanes|=d,fs|=d}u=u.next}while(u!==null&&u!==o);l===null?i=r:l.next=a,on(r,t.memoizedState)||(gt=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do o=s.lane,Pe.lanes|=o,fs|=o,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Nc(e){var t=Wt(),n=t.queue;if(n===null)throw Error(U(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,o=t.memoizedState;if(s!==null){n.pending=null;var i=s=s.next;do o=e(o,i.action),i=i.next;while(i!==s);on(o,t.memoizedState)||(gt=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ex(){}function tx(e,t){var n=Pe,r=Wt(),s=t(),o=!on(r.memoizedState,s);if(o&&(r.memoizedState=s,gt=!0),r=r.queue,ch(sx.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||He!==null&&He.memoizedState.tag&1){if(n.flags|=2048,$i(9,rx.bind(null,n,r,s,t),void 0,null),Ve===null)throw Error(U(349));ds&30||nx(n,t,s)}return s}function nx(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Pe.updateQueue,t===null?(t={lastEffect:null,stores:null},Pe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function rx(e,t,n,r){t.value=n,t.getSnapshot=r,ox(t)&&ix(e)}function sx(e,t,n){return n(function(){ox(t)&&ix(e)})}function ox(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!on(e,n)}catch{return!0}}function ix(e){var t=zn(e,1);t!==null&&rn(t,e,1,-1)}function im(e){var t=fn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:zi,lastRenderedState:e},t.queue=e,e=e.dispatch=eE.bind(null,Pe,e),[t.memoizedState,e]}function $i(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Pe.updateQueue,t===null?(t={lastEffect:null,stores:null},Pe.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function ax(){return Wt().memoizedState}function fl(e,t,n,r){var s=fn();Pe.flags|=e,s.memoizedState=$i(1|t,n,void 0,r===void 0?null:r)}function Nu(e,t,n,r){var s=Wt();r=r===void 0?null:r;var o=void 0;if(Fe!==null){var i=Fe.memoizedState;if(o=i.destroy,r!==null&&ah(r,i.deps)){s.memoizedState=$i(t,n,o,r);return}}Pe.flags|=e,s.memoizedState=$i(1|t,n,o,r)}function am(e,t){return fl(8390656,8,e,t)}function ch(e,t){return Nu(2048,8,e,t)}function lx(e,t){return Nu(4,2,e,t)}function ux(e,t){return Nu(4,4,e,t)}function cx(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function dx(e,t,n){return n=n!=null?n.concat([e]):null,Nu(4,4,cx.bind(null,t,e),n)}function dh(){}function fx(e,t){var n=Wt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ah(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function hx(e,t){var n=Wt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ah(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function px(e,t,n){return ds&21?(on(n,t)||(n=v0(),Pe.lanes|=n,fs|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,gt=!0),e.memoizedState=n)}function Zb(e,t){var n=ge;ge=n!==0&&4>n?n:4,e(!0);var r=Ec.transition;Ec.transition={};try{e(!1),t()}finally{ge=n,Ec.transition=r}}function mx(){return Wt().memoizedState}function Jb(e,t,n){var r=_r(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},gx(e))yx(t,n);else if(n=Y0(e,t,n,r),n!==null){var s=at();rn(n,e,r,s),xx(n,t,r)}}function eE(e,t,n){var r=_r(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(gx(e))yx(t,s);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,a=o(i,n);if(s.hasEagerState=!0,s.eagerState=a,on(a,i)){var l=t.interleaved;l===null?(s.next=s,nh(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=Y0(e,t,s,r),n!==null&&(s=at(),rn(n,e,r,s),xx(n,t,r))}}function gx(e){var t=e.alternate;return e===Pe||t!==null&&t===Pe}function yx(e,t){yi=Vl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function xx(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Hf(e,n)}}var Wl={readContext:Vt,useCallback:Ze,useContext:Ze,useEffect:Ze,useImperativeHandle:Ze,useInsertionEffect:Ze,useLayoutEffect:Ze,useMemo:Ze,useReducer:Ze,useRef:Ze,useState:Ze,useDebugValue:Ze,useDeferredValue:Ze,useTransition:Ze,useMutableSource:Ze,useSyncExternalStore:Ze,useId:Ze,unstable_isNewReconciler:!1},tE={readContext:Vt,useCallback:function(e,t){return fn().memoizedState=[e,t===void 0?null:t],e},useContext:Vt,useEffect:am,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,fl(4194308,4,cx.bind(null,t,e),n)},useLayoutEffect:function(e,t){return fl(4194308,4,e,t)},useInsertionEffect:function(e,t){return fl(4,2,e,t)},useMemo:function(e,t){var n=fn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=fn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Jb.bind(null,Pe,e),[r.memoizedState,e]},useRef:function(e){var t=fn();return e={current:e},t.memoizedState=e},useState:im,useDebugValue:dh,useDeferredValue:function(e){return fn().memoizedState=e},useTransition:function(){var e=im(!1),t=e[0];return e=Zb.bind(null,e[1]),fn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Pe,s=fn();if(_e){if(n===void 0)throw Error(U(407));n=n()}else{if(n=t(),Ve===null)throw Error(U(349));ds&30||nx(r,t,n)}s.memoizedState=n;var o={value:n,getSnapshot:t};return s.queue=o,am(sx.bind(null,r,o,e),[e]),r.flags|=2048,$i(9,rx.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=fn(),t=Ve.identifierPrefix;if(_e){var n=In,r=Ln;n=(r&~(1<<32-nn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Di++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Yb++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},nE={readContext:Vt,useCallback:fx,useContext:Vt,useEffect:ch,useImperativeHandle:dx,useInsertionEffect:lx,useLayoutEffect:ux,useMemo:hx,useReducer:Cc,useRef:ax,useState:function(){return Cc(zi)},useDebugValue:dh,useDeferredValue:function(e){var t=Wt();return px(t,Fe.memoizedState,e)},useTransition:function(){var e=Cc(zi)[0],t=Wt().memoizedState;return[e,t]},useMutableSource:ex,useSyncExternalStore:tx,useId:mx,unstable_isNewReconciler:!1},rE={readContext:Vt,useCallback:fx,useContext:Vt,useEffect:ch,useImperativeHandle:dx,useInsertionEffect:lx,useLayoutEffect:ux,useMemo:hx,useReducer:Nc,useRef:ax,useState:function(){return Nc(zi)},useDebugValue:dh,useDeferredValue:function(e){var t=Wt();return Fe===null?t.memoizedState=e:px(t,Fe.memoizedState,e)},useTransition:function(){var e=Nc(zi)[0],t=Wt().memoizedState;return[e,t]},useMutableSource:ex,useSyncExternalStore:tx,useId:mx,unstable_isNewReconciler:!1};function qt(e,t){if(e&&e.defaultProps){t=Re({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function jd(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Re({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ku={isMounted:function(e){return(e=e._reactInternals)?Es(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=at(),s=_r(e),o=On(r,s);o.payload=t,n!=null&&(o.callback=n),t=wr(e,o,s),t!==null&&(rn(t,e,s,r),cl(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=at(),s=_r(e),o=On(r,s);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=wr(e,o,s),t!==null&&(rn(t,e,s,r),cl(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=at(),r=_r(e),s=On(n,r);s.tag=2,t!=null&&(s.callback=t),t=wr(e,s,r),t!==null&&(rn(t,e,r,n),cl(t,e,r))}};function lm(e,t,n,r,s,o,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,i):t.prototype&&t.prototype.isPureReactComponent?!Ti(n,r)||!Ti(s,o):!0}function vx(e,t,n){var r=!1,s=Rr,o=t.contextType;return typeof o=="object"&&o!==null?o=Vt(o):(s=vt(t)?us:rt.current,r=t.contextTypes,o=(r=r!=null)?ho(e,s):Rr),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ku,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=o),t}function um(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ku.enqueueReplaceState(t,t.state,null)}function Md(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},rh(e);var o=t.contextType;typeof o=="object"&&o!==null?s.context=Vt(o):(o=vt(t)?us:rt.current,s.context=ho(e,o)),s.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(jd(e,t,o,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&ku.enqueueReplaceState(s,s.state,null),Hl(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function yo(e,t){try{var n="",r=t;do n+=M_(r),r=r.return;while(r);var s=n}catch(o){s=`
|
|
39
39
|
Error generating stack: `+o.message+`
|
|
40
|
-
`+o.stack}return{value:e,source:t,stack:s,digest:null}}function kc(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Td(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var sE=typeof WeakMap=="function"?WeakMap:Map;function wx(e,t,n){n=On(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ql||(ql=!0,Hd=r),Td(e,t)},n}function Sx(e,t,n){n=On(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){Td(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Td(e,t),typeof r!="function"&&(Sr===null?Sr=new Set([this]):Sr.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function cm(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new sE;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=xE.bind(null,e,t,n),t.then(e,e))}function dm(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function fm(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=On(-1,1),t.tag=2,wr(n,t,1))),n.lanes|=1),e)}var oE=Un.ReactCurrentOwner,gt=!1;function it(e,t,n,r){t.child=e===null?X0(t,null,n,r):mo(t,e.child,n,r)}function hm(e,t,n,r,s){n=n.render;var o=t.ref;return qs(t,s),r=lh(e,t,n,r,o,s),n=uh(),e!==null&&!gt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,$n(e,t,s)):(_e&&n&&Xf(t),t.flags|=1,it(e,t,r,s),t.child)}function pm(e,t,n,r,s){if(e===null){var o=n.type;return typeof o=="function"&&!vh(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,_x(e,t,o,r,s)):(e=gl(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&s)){var i=o.memoizedProps;if(n=n.compare,n=n!==null?n:Ti,n(i,r)&&e.ref===t.ref)return $n(e,t,s)}return t.flags|=1,e=br(o,r),e.ref=t.ref,e.return=t,t.child=e}function _x(e,t,n,r,s){if(e!==null){var o=e.memoizedProps;if(Ti(o,r)&&e.ref===t.ref)if(gt=!1,t.pendingProps=r=o,(e.lanes&s)!==0)e.flags&131072&&(gt=!0);else return t.lanes=e.lanes,$n(e,t,s)}return Ld(e,t,n,r,s)}function bx(e,t,n){var r=t.pendingProps,s=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},xe(zs,Et),Et|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,xe(zs,Et),Et|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,xe(zs,Et),Et|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,xe(zs,Et),Et|=r;return it(e,t,s,n),t.child}function Ex(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ld(e,t,n,r,s){var o=vt(n)?us:rt.current;return o=ho(t,o),qs(t,s),n=lh(e,t,n,r,o,s),r=uh(),e!==null&&!gt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,$n(e,t,s)):(_e&&r&&Xf(t),t.flags|=1,it(e,t,n,s),t.child)}function mm(e,t,n,r,s){if(vt(n)){var o=!0;Fl(t)}else o=!1;if(qs(t,s),t.stateNode===null)hl(e,t),vx(t,n,r),Md(t,n,r,s),r=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var l=i.context,u=n.contextType;typeof u=="object"&&u!==null?u=Vt(u):(u=vt(n)?us:rt.current,u=ho(t,u));var d=n.getDerivedStateFromProps,c=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function";c||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==r||l!==u)&&um(t,i,r,u),er=!1;var f=t.memoizedState;i.state=f,Hl(t,r,i,s),l=t.memoizedState,a!==r||f!==l||xt.current||er?(typeof d=="function"&&(jd(t,n,d,r),l=t.memoizedState),(a=er||lm(t,n,a,r,f,l,u))?(c||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),i.props=r,i.state=l,i.context=u,r=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Z0(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:qt(t.type,a),i.props=u,c=t.pendingProps,f=i.context,l=n.contextType,typeof l=="object"&&l!==null?l=Vt(l):(l=vt(n)?us:rt.current,l=ho(t,l));var m=n.getDerivedStateFromProps;(d=typeof m=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==c||f!==l)&&um(t,i,r,l),er=!1,f=t.memoizedState,i.state=f,Hl(t,r,i,s);var p=t.memoizedState;a!==c||f!==p||xt.current||er?(typeof m=="function"&&(jd(t,n,m,r),p=t.memoizedState),(u=er||lm(t,n,u,r,f,p,l)||!1)?(d||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,p,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,p,l)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),i.props=r,i.state=p,i.context=l,r=u):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Id(e,t,n,r,o,s)}function Id(e,t,n,r,s,o){Ex(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return s&&em(t,n,!1),$n(e,t,o);r=t.stateNode,oE.current=t;var a=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=mo(t,e.child,null,o),t.child=mo(t,null,a,o)):it(e,t,a,o),t.memoizedState=r.state,s&&em(t,n,!0),t.child}function Cx(e){var t=e.stateNode;t.pendingContext?Jp(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Jp(e,t.context,!1),sh(e,t.containerInfo)}function gm(e,t,n,r,s){return po(),Zf(s),t.flags|=256,it(e,t,n,r),t.child}var Ad={dehydrated:null,treeContext:null,retryLane:0};function Od(e){return{baseLanes:e,cachePool:null,transitions:null}}function Nx(e,t,n){var r=t.pendingProps,s=Ne.current,o=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),xe(Ne,s&1),e===null)return Pd(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=r.children,e=r.fallback,o?(r=t.mode,o=t.child,i={mode:"hidden",children:i},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=ju(i,r,0,null),e=ts(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Od(n),t.memoizedState=Ad,e):fh(t,i));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return iE(e,t,i,r,a,s,n);if(o){o=r.fallback,i=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:r.children};return!(i&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=br(s,l),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?o=br(a,o):(o=ts(o,i,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,i=e.child.memoizedState,i=i===null?Od(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~n,t.memoizedState=Ad,r}return o=e.child,e=o.sibling,r=br(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function fh(e,t){return t=ju({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function $a(e,t,n,r){return r!==null&&Zf(r),mo(t,e.child,null,n),e=fh(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function iE(e,t,n,r,s,o,i){if(n)return t.flags&256?(t.flags&=-257,r=kc(Error(U(422))),$a(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,s=t.mode,r=ju({mode:"visible",children:r.children},s,0,null),o=ts(o,s,i,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&mo(t,e.child,null,i),t.child.memoizedState=Od(i),t.memoizedState=Ad,o);if(!(t.mode&1))return $a(e,t,i,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error(U(419)),r=kc(o,r,void 0),$a(e,t,i,r)}if(a=(i&e.childLanes)!==0,gt||a){if(r=Ve,r!==null){switch(i&-i){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|i)?0:s,s!==0&&s!==o.retryLane&&(o.retryLane=s,zn(e,s),rn(r,e,s,-1))}return xh(),r=kc(Error(U(421))),$a(e,t,i,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=vE.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,kt=vr(s.nextSibling),Pt=t,_e=!0,Zt=null,e!==null&&(zt[$t++]=Ln,zt[$t++]=In,zt[$t++]=cs,Ln=e.id,In=e.overflow,cs=t),t=fh(t,r.children),t.flags|=4096,t)}function ym(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Rd(e.return,t,n)}function Pc(e,t,n,r,s){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=s)}function kx(e,t,n){var r=t.pendingProps,s=r.revealOrder,o=r.tail;if(it(e,t,r.children,n),r=Ne.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ym(e,n,t);else if(e.tag===19)ym(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(xe(Ne,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Ul(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Pc(t,!1,s,n,o);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Ul(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Pc(t,!0,n,null,o);break;case"together":Pc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function hl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function $n(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),fs|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(U(153));if(t.child!==null){for(e=t.child,n=br(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=br(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function aE(e,t,n){switch(t.tag){case 3:Cx(t),po();break;case 5:J0(t);break;case 1:vt(t.type)&&Fl(t);break;case 4:sh(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;xe($l,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(xe(Ne,Ne.current&1),t.flags|=128,null):n&t.child.childLanes?Nx(e,t,n):(xe(Ne,Ne.current&1),e=$n(e,t,n),e!==null?e.sibling:null);xe(Ne,Ne.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return kx(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),xe(Ne,Ne.current),r)break;return null;case 22:case 23:return t.lanes=0,bx(e,t,n)}return $n(e,t,n)}var Px,Fd,Rx,jx;Px=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&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;n=n.return}n.sibling.return=n.return,n=n.sibling}};Fd=function(){};Rx=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,$r(vn.current);var o=null;switch(n){case"input":s=od(e,s),r=od(e,r),o=[];break;case"select":s=Re({},s,{value:void 0}),r=Re({},r,{value:void 0}),o=[];break;case"textarea":s=ld(e,s),r=ld(e,r),o=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Al)}cd(n,r);var i;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(i in a)a.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Ci.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var l=r[u];if(a=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(i in a)!a.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in l)l.hasOwnProperty(i)&&a[i]!==l[i]&&(n||(n={}),n[i]=l[i])}else n||(o||(o=[]),o.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(o=o||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Ci.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&we("scroll",e),o||a===l||(o=[])):(o=o||[]).push(u,l))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};jx=function(e,t,n,r){n!==r&&(t.flags|=4)};function qo(e,t){if(!_e)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Je(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function lE(e,t,n){var r=t.pendingProps;switch(Yf(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Je(t),null;case 1:return vt(t.type)&&Ol(),Je(t),null;case 3:return r=t.stateNode,go(),Se(xt),Se(rt),ih(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Da(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Zt!==null&&(Wd(Zt),Zt=null))),Fd(e,t),Je(t),null;case 5:oh(t);var s=$r(Fi.current);if(n=t.type,e!==null&&t.stateNode!=null)Rx(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(U(166));return Je(t),null}if(e=$r(vn.current),Da(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[yn]=t,r[Ai]=o,e=(t.mode&1)!==0,n){case"dialog":we("cancel",r),we("close",r);break;case"iframe":case"object":case"embed":we("load",r);break;case"video":case"audio":for(s=0;s<ai.length;s++)we(ai[s],r);break;case"source":we("error",r);break;case"img":case"image":case"link":we("error",r),we("load",r);break;case"details":we("toggle",r);break;case"input":Np(r,o),we("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},we("invalid",r);break;case"textarea":Pp(r,o),we("invalid",r)}cd(n,o),s=null;for(var i in o)if(o.hasOwnProperty(i)){var a=o[i];i==="children"?typeof a=="string"?r.textContent!==a&&(o.suppressHydrationWarning!==!0&&Fa(r.textContent,a,e),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&Fa(r.textContent,a,e),s=["children",""+a]):Ci.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&we("scroll",r)}switch(n){case"input":Ra(r),kp(r,o,!0);break;case"textarea":Ra(r),Rp(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=Al)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=s0(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[yn]=t,e[Ai]=r,Px(e,t,!1,!1),t.stateNode=e;e:{switch(i=dd(n,r),n){case"dialog":we("cancel",e),we("close",e),s=r;break;case"iframe":case"object":case"embed":we("load",e),s=r;break;case"video":case"audio":for(s=0;s<ai.length;s++)we(ai[s],e);s=r;break;case"source":we("error",e),s=r;break;case"img":case"image":case"link":we("error",e),we("load",e),s=r;break;case"details":we("toggle",e),s=r;break;case"input":Np(e,r),s=od(e,r),we("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=Re({},r,{value:void 0}),we("invalid",e);break;case"textarea":Pp(e,r),s=ld(e,r),we("invalid",e);break;default:s=r}cd(n,s),a=s;for(o in a)if(a.hasOwnProperty(o)){var l=a[o];o==="style"?a0(e,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&o0(e,l)):o==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Ni(e,l):typeof l=="number"&&Ni(e,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Ci.hasOwnProperty(o)?l!=null&&o==="onScroll"&&we("scroll",e):l!=null&&Of(e,o,l,i))}switch(n){case"input":Ra(e),kp(e,r,!1);break;case"textarea":Ra(e),Rp(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Pr(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?Us(e,!!r.multiple,o,!1):r.defaultValue!=null&&Us(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Al)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Je(t),null;case 6:if(e&&t.stateNode!=null)jx(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(U(166));if(n=$r(Fi.current),$r(vn.current),Da(t)){if(r=t.stateNode,n=t.memoizedProps,r[yn]=t,(o=r.nodeValue!==n)&&(e=Pt,e!==null))switch(e.tag){case 3:Fa(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Fa(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[yn]=t,t.stateNode=r}return Je(t),null;case 13:if(Se(Ne),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(_e&&kt!==null&&t.mode&1&&!(t.flags&128))Q0(),po(),t.flags|=98560,o=!1;else if(o=Da(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(U(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(U(317));o[yn]=t}else po(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Je(t),o=!1}else Zt!==null&&(Wd(Zt),Zt=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Ne.current&1?De===0&&(De=3):xh())),t.updateQueue!==null&&(t.flags|=4),Je(t),null);case 4:return go(),Fd(e,t),e===null&&Li(t.stateNode.containerInfo),Je(t),null;case 10:return th(t.type._context),Je(t),null;case 17:return vt(t.type)&&Ol(),Je(t),null;case 19:if(Se(Ne),o=t.memoizedState,o===null)return Je(t),null;if(r=(t.flags&128)!==0,i=o.rendering,i===null)if(r)qo(o,!1);else{if(De!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Ul(e),i!==null){for(t.flags|=128,qo(o,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,i=o.alternate,i===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,o.type=i.type,e=i.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return xe(Ne,Ne.current&1|2),t.child}e=e.sibling}o.tail!==null&&Ie()>xo&&(t.flags|=128,r=!0,qo(o,!1),t.lanes=4194304)}else{if(!r)if(e=Ul(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),qo(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!_e)return Je(t),null}else 2*Ie()-o.renderingStartTime>xo&&n!==1073741824&&(t.flags|=128,r=!0,qo(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ie(),t.sibling=null,n=Ne.current,xe(Ne,r?n&1|2:n&1),t):(Je(t),null);case 22:case 23:return yh(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Et&1073741824&&(Je(t),t.subtreeFlags&6&&(t.flags|=8192)):Je(t),null;case 24:return null;case 25:return null}throw Error(U(156,t.tag))}function uE(e,t){switch(Yf(t),t.tag){case 1:return vt(t.type)&&Ol(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return go(),Se(xt),Se(rt),ih(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return oh(t),null;case 13:if(Se(Ne),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(U(340));po()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Se(Ne),null;case 4:return go(),null;case 10:return th(t.type._context),null;case 22:case 23:return yh(),null;case 24:return null;default:return null}}var Ba=!1,et=!1,cE=typeof WeakSet=="function"?WeakSet:Set,G=null;function Ds(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Me(e,t,r)}else n.current=null}function Dd(e,t,n){try{n()}catch(r){Me(e,t,r)}}var xm=!1;function dE(e,t){if(Sd=Tl,e=A0(),Gf(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,a=-1,l=-1,u=0,d=0,c=e,f=null;t:for(;;){for(var m;c!==n||s!==0&&c.nodeType!==3||(a=i+s),c!==o||r!==0&&c.nodeType!==3||(l=i+r),c.nodeType===3&&(i+=c.nodeValue.length),(m=c.firstChild)!==null;)f=c,c=m;for(;;){if(c===e)break t;if(f===n&&++u===s&&(a=i),f===o&&++d===r&&(l=i),(m=c.nextSibling)!==null)break;c=f,f=c.parentNode}c=m}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(_d={focusedElem:e,selectionRange:n},Tl=!1,G=t;G!==null;)if(t=G,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,G=e;else for(;G!==null;){t=G;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var x=p.memoizedProps,w=p.memoizedState,g=t.stateNode,v=g.getSnapshotBeforeUpdate(t.elementType===t.type?x:qt(t.type,x),w);g.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(U(163))}}catch(S){Me(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,G=e;break}G=t.return}return p=xm,xm=!1,p}function xi(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var o=s.destroy;s.destroy=void 0,o!==void 0&&Dd(t,n,o)}s=s.next}while(s!==r)}}function Pu(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function zd(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Mx(e){var t=e.alternate;t!==null&&(e.alternate=null,Mx(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[yn],delete t[Ai],delete t[Cd],delete t[qb],delete t[Qb])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Tx(e){return e.tag===5||e.tag===3||e.tag===4}function vm(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Tx(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function $d(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Al));else if(r!==4&&(e=e.child,e!==null))for($d(e,t,n),e=e.sibling;e!==null;)$d(e,t,n),e=e.sibling}function Bd(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Bd(e,t,n),e=e.sibling;e!==null;)Bd(e,t,n),e=e.sibling}var We=null,Xt=!1;function qn(e,t,n){for(n=n.child;n!==null;)Lx(e,t,n),n=n.sibling}function Lx(e,t,n){if(xn&&typeof xn.onCommitFiberUnmount=="function")try{xn.onCommitFiberUnmount(wu,n)}catch{}switch(n.tag){case 5:et||Ds(n,t);case 6:var r=We,s=Xt;We=null,qn(e,t,n),We=r,Xt=s,We!==null&&(Xt?(e=We,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):We.removeChild(n.stateNode));break;case 18:We!==null&&(Xt?(e=We,n=n.stateNode,e.nodeType===8?Sc(e.parentNode,n):e.nodeType===1&&Sc(e,n),ji(e)):Sc(We,n.stateNode));break;case 4:r=We,s=Xt,We=n.stateNode.containerInfo,Xt=!0,qn(e,t,n),We=r,Xt=s;break;case 0:case 11:case 14:case 15:if(!et&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var o=s,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&Dd(n,t,i),s=s.next}while(s!==r)}qn(e,t,n);break;case 1:if(!et&&(Ds(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Me(n,t,a)}qn(e,t,n);break;case 21:qn(e,t,n);break;case 22:n.mode&1?(et=(r=et)||n.memoizedState!==null,qn(e,t,n),et=r):qn(e,t,n);break;default:qn(e,t,n)}}function wm(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new cE),t.forEach(function(r){var s=wE.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Kt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var o=e,i=t,a=i;e:for(;a!==null;){switch(a.tag){case 5:We=a.stateNode,Xt=!1;break e;case 3:We=a.stateNode.containerInfo,Xt=!0;break e;case 4:We=a.stateNode.containerInfo,Xt=!0;break e}a=a.return}if(We===null)throw Error(U(160));Lx(o,i,s),We=null,Xt=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(u){Me(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Ix(t,e),t=t.sibling}function Ix(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Kt(t,e),cn(e),r&4){try{xi(3,e,e.return),Pu(3,e)}catch(x){Me(e,e.return,x)}try{xi(5,e,e.return)}catch(x){Me(e,e.return,x)}}break;case 1:Kt(t,e),cn(e),r&512&&n!==null&&Ds(n,n.return);break;case 5:if(Kt(t,e),cn(e),r&512&&n!==null&&Ds(n,n.return),e.flags&32){var s=e.stateNode;try{Ni(s,"")}catch(x){Me(e,e.return,x)}}if(r&4&&(s=e.stateNode,s!=null)){var o=e.memoizedProps,i=n!==null?n.memoizedProps:o,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&o.type==="radio"&&o.name!=null&&n0(s,o),dd(a,i);var u=dd(a,o);for(i=0;i<l.length;i+=2){var d=l[i],c=l[i+1];d==="style"?a0(s,c):d==="dangerouslySetInnerHTML"?o0(s,c):d==="children"?Ni(s,c):Of(s,d,c,u)}switch(a){case"input":id(s,o);break;case"textarea":r0(s,o);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var m=o.value;m!=null?Us(s,!!o.multiple,m,!1):f!==!!o.multiple&&(o.defaultValue!=null?Us(s,!!o.multiple,o.defaultValue,!0):Us(s,!!o.multiple,o.multiple?[]:"",!1))}s[Ai]=o}catch(x){Me(e,e.return,x)}}break;case 6:if(Kt(t,e),cn(e),r&4){if(e.stateNode===null)throw Error(U(162));s=e.stateNode,o=e.memoizedProps;try{s.nodeValue=o}catch(x){Me(e,e.return,x)}}break;case 3:if(Kt(t,e),cn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ji(t.containerInfo)}catch(x){Me(e,e.return,x)}break;case 4:Kt(t,e),cn(e);break;case 13:Kt(t,e),cn(e),s=e.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||(mh=Ie())),r&4&&wm(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(et=(u=et)||d,Kt(t,e),et=u):Kt(t,e),cn(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(G=e,d=e.child;d!==null;){for(c=G=d;G!==null;){switch(f=G,m=f.child,f.tag){case 0:case 11:case 14:case 15:xi(4,f,f.return);break;case 1:Ds(f,f.return);var p=f.stateNode;if(typeof p.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,p.props=t.memoizedProps,p.state=t.memoizedState,p.componentWillUnmount()}catch(x){Me(r,n,x)}}break;case 5:Ds(f,f.return);break;case 22:if(f.memoizedState!==null){_m(c);continue}}m!==null?(m.return=f,G=m):_m(c)}d=d.sibling}e:for(d=null,c=e;;){if(c.tag===5){if(d===null){d=c;try{s=c.stateNode,u?(o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(a=c.stateNode,l=c.memoizedProps.style,i=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=i0("display",i))}catch(x){Me(e,e.return,x)}}}else if(c.tag===6){if(d===null)try{c.stateNode.nodeValue=u?"":c.memoizedProps}catch(x){Me(e,e.return,x)}}else if((c.tag!==22&&c.tag!==23||c.memoizedState===null||c===e)&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===e)break e;for(;c.sibling===null;){if(c.return===null||c.return===e)break e;d===c&&(d=null),c=c.return}d===c&&(d=null),c.sibling.return=c.return,c=c.sibling}}break;case 19:Kt(t,e),cn(e),r&4&&wm(e);break;case 21:break;default:Kt(t,e),cn(e)}}function cn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Tx(n)){var r=n;break e}n=n.return}throw Error(U(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Ni(s,""),r.flags&=-33);var o=vm(e);Bd(e,o,s);break;case 3:case 4:var i=r.stateNode.containerInfo,a=vm(e);$d(e,a,i);break;default:throw Error(U(161))}}catch(l){Me(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function fE(e,t,n){G=e,Ax(e)}function Ax(e,t,n){for(var r=(e.mode&1)!==0;G!==null;){var s=G,o=s.child;if(s.tag===22&&r){var i=s.memoizedState!==null||Ba;if(!i){var a=s.alternate,l=a!==null&&a.memoizedState!==null||et;a=Ba;var u=et;if(Ba=i,(et=l)&&!u)for(G=s;G!==null;)i=G,l=i.child,i.tag===22&&i.memoizedState!==null?bm(s):l!==null?(l.return=i,G=l):bm(s);for(;o!==null;)G=o,Ax(o),o=o.sibling;G=s,Ba=a,et=u}Sm(e)}else s.subtreeFlags&8772&&o!==null?(o.return=s,G=o):Sm(e)}}function Sm(e){for(;G!==null;){var t=G;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:et||Pu(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!et)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:qt(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&om(t,o,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}om(t,i,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var c=d.dehydrated;c!==null&&ji(c)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(U(163))}et||t.flags&512&&zd(t)}catch(f){Me(t,t.return,f)}}if(t===e){G=null;break}if(n=t.sibling,n!==null){n.return=t.return,G=n;break}G=t.return}}function _m(e){for(;G!==null;){var t=G;if(t===e){G=null;break}var n=t.sibling;if(n!==null){n.return=t.return,G=n;break}G=t.return}}function bm(e){for(;G!==null;){var t=G;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Pu(4,t)}catch(l){Me(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(l){Me(t,s,l)}}var o=t.return;try{zd(t)}catch(l){Me(t,o,l)}break;case 5:var i=t.return;try{zd(t)}catch(l){Me(t,i,l)}}}catch(l){Me(t,t.return,l)}if(t===e){G=null;break}var a=t.sibling;if(a!==null){a.return=t.return,G=a;break}G=t.return}}var hE=Math.ceil,Kl=Un.ReactCurrentDispatcher,hh=Un.ReactCurrentOwner,Ut=Un.ReactCurrentBatchConfig,pe=0,Ve=null,Ae=null,Ge=0,Et=0,zs=Mr(0),De=0,Bi=null,fs=0,Ru=0,ph=0,vi=null,pt=null,mh=0,xo=1/0,Rn=null,ql=!1,Hd=null,Sr=null,Ha=!1,hr=null,Ql=0,wi=0,Ud=null,pl=-1,ml=0;function at(){return pe&6?Ie():pl!==-1?pl:pl=Ie()}function _r(e){return e.mode&1?pe&2&&Ge!==0?Ge&-Ge:Xb.transition!==null?(ml===0&&(ml=v0()),ml):(e=ge,e!==0||(e=window.event,e=e===void 0?16:N0(e.type)),e):1}function rn(e,t,n,r){if(50<wi)throw wi=0,Ud=null,Error(U(185));la(e,n,r),(!(pe&2)||e!==Ve)&&(e===Ve&&(!(pe&2)&&(Ru|=n),De===4&&nr(e,Ge)),wt(e,r),n===1&&pe===0&&!(t.mode&1)&&(xo=Ie()+500,Cu&&Tr()))}function wt(e,t){var n=e.callbackNode;X_(e,t);var r=Ml(e,e===Ve?Ge:0);if(r===0)n!==null&&Tp(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Tp(n),t===1)e.tag===0?Gb(Em.bind(null,e)):W0(Em.bind(null,e)),Wb(function(){!(pe&6)&&Tr()}),n=null;else{switch(w0(r)){case 1:n=Bf;break;case 4:n=y0;break;case 16:n=jl;break;case 536870912:n=x0;break;default:n=jl}n=Ux(n,Ox.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Ox(e,t){if(pl=-1,ml=0,pe&6)throw Error(U(327));var n=e.callbackNode;if(Qs()&&e.callbackNode!==n)return null;var r=Ml(e,e===Ve?Ge:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Gl(e,r);else{t=r;var s=pe;pe|=2;var o=Dx();(Ve!==e||Ge!==t)&&(Rn=null,xo=Ie()+500,es(e,t));do try{gE();break}catch(a){Fx(e,a)}while(!0);eh(),Kl.current=o,pe=s,Ae!==null?t=0:(Ve=null,Ge=0,t=De)}if(t!==0){if(t===2&&(s=gd(e),s!==0&&(r=s,t=Vd(e,s))),t===1)throw n=Bi,es(e,0),nr(e,r),wt(e,Ie()),n;if(t===6)nr(e,r);else{if(s=e.current.alternate,!(r&30)&&!pE(s)&&(t=Gl(e,r),t===2&&(o=gd(e),o!==0&&(r=o,t=Vd(e,o))),t===1))throw n=Bi,es(e,0),nr(e,r),wt(e,Ie()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(U(345));case 2:Ir(e,pt,Rn);break;case 3:if(nr(e,r),(r&130023424)===r&&(t=mh+500-Ie(),10<t)){if(Ml(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){at(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Ed(Ir.bind(null,e,pt,Rn),t);break}Ir(e,pt,Rn);break;case 4:if(nr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var i=31-nn(r);o=1<<i,i=t[i],i>s&&(s=i),r&=~o}if(r=s,r=Ie()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*hE(r/1960))-r,10<r){e.timeoutHandle=Ed(Ir.bind(null,e,pt,Rn),r);break}Ir(e,pt,Rn);break;case 5:Ir(e,pt,Rn);break;default:throw Error(U(329))}}}return wt(e,Ie()),e.callbackNode===n?Ox.bind(null,e):null}function Vd(e,t){var n=vi;return e.current.memoizedState.isDehydrated&&(es(e,t).flags|=256),e=Gl(e,t),e!==2&&(t=pt,pt=n,t!==null&&Wd(t)),e}function Wd(e){pt===null?pt=e:pt.push.apply(pt,e)}function pE(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],o=s.getSnapshot;s=s.value;try{if(!on(o(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function nr(e,t){for(t&=~ph,t&=~Ru,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-nn(t),r=1<<n;e[n]=-1,t&=~r}}function Em(e){if(pe&6)throw Error(U(327));Qs();var t=Ml(e,0);if(!(t&1))return wt(e,Ie()),null;var n=Gl(e,t);if(e.tag!==0&&n===2){var r=gd(e);r!==0&&(t=r,n=Vd(e,r))}if(n===1)throw n=Bi,es(e,0),nr(e,t),wt(e,Ie()),n;if(n===6)throw Error(U(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ir(e,pt,Rn),wt(e,Ie()),null}function gh(e,t){var n=pe;pe|=1;try{return e(t)}finally{pe=n,pe===0&&(xo=Ie()+500,Cu&&Tr())}}function hs(e){hr!==null&&hr.tag===0&&!(pe&6)&&Qs();var t=pe;pe|=1;var n=Ut.transition,r=ge;try{if(Ut.transition=null,ge=1,e)return e()}finally{ge=r,Ut.transition=n,pe=t,!(pe&6)&&Tr()}}function yh(){Et=zs.current,Se(zs)}function es(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Vb(n)),Ae!==null)for(n=Ae.return;n!==null;){var r=n;switch(Yf(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Ol();break;case 3:go(),Se(xt),Se(rt),ih();break;case 5:oh(r);break;case 4:go();break;case 13:Se(Ne);break;case 19:Se(Ne);break;case 10:th(r.type._context);break;case 22:case 23:yh()}n=n.return}if(Ve=e,Ae=e=br(e.current,null),Ge=Et=t,De=0,Bi=null,ph=Ru=fs=0,pt=vi=null,zr!==null){for(t=0;t<zr.length;t++)if(n=zr[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,o=n.pending;if(o!==null){var i=o.next;o.next=s,r.next=i}n.pending=r}zr=null}return e}function Fx(e,t){do{var n=Ae;try{if(eh(),dl.current=Wl,Vl){for(var r=Pe.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Vl=!1}if(ds=0,He=Fe=Pe=null,yi=!1,Di=0,hh.current=null,n===null||n.return===null){De=1,Bi=t,Ae=null;break}e:{var o=e,i=n.return,a=n,l=t;if(t=Ge,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,d=a,c=d.tag;if(!(d.mode&1)&&(c===0||c===11||c===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=dm(i);if(m!==null){m.flags&=-257,fm(m,i,a,o,t),m.mode&1&&cm(o,u,t),t=m,l=u;var p=t.updateQueue;if(p===null){var x=new Set;x.add(l),t.updateQueue=x}else p.add(l);break e}else{if(!(t&1)){cm(o,u,t),xh();break e}l=Error(U(426))}}else if(_e&&a.mode&1){var w=dm(i);if(w!==null){!(w.flags&65536)&&(w.flags|=256),fm(w,i,a,o,t),Zf(yo(l,a));break e}}o=l=yo(l,a),De!==4&&(De=2),vi===null?vi=[o]:vi.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var g=wx(o,l,t);sm(o,g);break e;case 1:a=l;var v=o.type,y=o.stateNode;if(!(o.flags&128)&&(typeof v.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Sr===null||!Sr.has(y)))){o.flags|=65536,t&=-t,o.lanes|=t;var S=Sx(o,a,t);sm(o,S);break e}}o=o.return}while(o!==null)}$x(n)}catch(E){t=E,Ae===n&&n!==null&&(Ae=n=n.return);continue}break}while(!0)}function Dx(){var e=Kl.current;return Kl.current=Wl,e===null?Wl:e}function xh(){(De===0||De===3||De===2)&&(De=4),Ve===null||!(fs&268435455)&&!(Ru&268435455)||nr(Ve,Ge)}function Gl(e,t){var n=pe;pe|=2;var r=Dx();(Ve!==e||Ge!==t)&&(Rn=null,es(e,t));do try{mE();break}catch(s){Fx(e,s)}while(!0);if(eh(),pe=n,Kl.current=r,Ae!==null)throw Error(U(261));return Ve=null,Ge=0,De}function mE(){for(;Ae!==null;)zx(Ae)}function gE(){for(;Ae!==null&&!B_();)zx(Ae)}function zx(e){var t=Hx(e.alternate,e,Et);e.memoizedProps=e.pendingProps,t===null?$x(e):Ae=t,hh.current=null}function $x(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=uE(n,t),n!==null){n.flags&=32767,Ae=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{De=6,Ae=null;return}}else if(n=lE(n,t,Et),n!==null){Ae=n;return}if(t=t.sibling,t!==null){Ae=t;return}Ae=t=e}while(t!==null);De===0&&(De=5)}function Ir(e,t,n){var r=ge,s=Ut.transition;try{Ut.transition=null,ge=1,yE(e,t,n,r)}finally{Ut.transition=s,ge=r}return null}function yE(e,t,n,r){do Qs();while(hr!==null);if(pe&6)throw Error(U(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(U(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(Y_(e,o),e===Ve&&(Ae=Ve=null,Ge=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ha||(Ha=!0,Ux(jl,function(){return Qs(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=Ut.transition,Ut.transition=null;var i=ge;ge=1;var a=pe;pe|=4,hh.current=null,dE(e,n),Ix(n,e),Fb(_d),Tl=!!Sd,_d=Sd=null,e.current=n,fE(n),H_(),pe=a,ge=i,Ut.transition=o}else e.current=n;if(Ha&&(Ha=!1,hr=e,Ql=s),o=e.pendingLanes,o===0&&(Sr=null),W_(n.stateNode),wt(e,Ie()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(ql)throw ql=!1,e=Hd,Hd=null,e;return Ql&1&&e.tag!==0&&Qs(),o=e.pendingLanes,o&1?e===Ud?wi++:(wi=0,Ud=e):wi=0,Tr(),null}function Qs(){if(hr!==null){var e=w0(Ql),t=Ut.transition,n=ge;try{if(Ut.transition=null,ge=16>e?16:e,hr===null)var r=!1;else{if(e=hr,hr=null,Ql=0,pe&6)throw Error(U(331));var s=pe;for(pe|=4,G=e.current;G!==null;){var o=G,i=o.child;if(G.flags&16){var a=o.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(G=u;G!==null;){var d=G;switch(d.tag){case 0:case 11:case 15:xi(8,d,o)}var c=d.child;if(c!==null)c.return=d,G=c;else for(;G!==null;){d=G;var f=d.sibling,m=d.return;if(Mx(d),d===u){G=null;break}if(f!==null){f.return=m,G=f;break}G=m}}}var p=o.alternate;if(p!==null){var x=p.child;if(x!==null){p.child=null;do{var w=x.sibling;x.sibling=null,x=w}while(x!==null)}}G=o}}if(o.subtreeFlags&2064&&i!==null)i.return=o,G=i;else e:for(;G!==null;){if(o=G,o.flags&2048)switch(o.tag){case 0:case 11:case 15:xi(9,o,o.return)}var g=o.sibling;if(g!==null){g.return=o.return,G=g;break e}G=o.return}}var v=e.current;for(G=v;G!==null;){i=G;var y=i.child;if(i.subtreeFlags&2064&&y!==null)y.return=i,G=y;else e:for(i=v;G!==null;){if(a=G,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Pu(9,a)}}catch(E){Me(a,a.return,E)}if(a===i){G=null;break e}var S=a.sibling;if(S!==null){S.return=a.return,G=S;break e}G=a.return}}if(pe=s,Tr(),xn&&typeof xn.onPostCommitFiberRoot=="function")try{xn.onPostCommitFiberRoot(wu,e)}catch{}r=!0}return r}finally{ge=n,Ut.transition=t}}return!1}function Cm(e,t,n){t=yo(n,t),t=wx(e,t,1),e=wr(e,t,1),t=at(),e!==null&&(la(e,1,t),wt(e,t))}function Me(e,t,n){if(e.tag===3)Cm(e,e,n);else for(;t!==null;){if(t.tag===3){Cm(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Sr===null||!Sr.has(r))){e=yo(n,e),e=Sx(t,e,1),t=wr(t,e,1),e=at(),t!==null&&(la(t,1,e),wt(t,e));break}}t=t.return}}function xE(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=at(),e.pingedLanes|=e.suspendedLanes&n,Ve===e&&(Ge&n)===n&&(De===4||De===3&&(Ge&130023424)===Ge&&500>Ie()-mh?es(e,0):ph|=n),wt(e,t)}function Bx(e,t){t===0&&(e.mode&1?(t=Ta,Ta<<=1,!(Ta&130023424)&&(Ta=4194304)):t=1);var n=at();e=zn(e,t),e!==null&&(la(e,t,n),wt(e,n))}function vE(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Bx(e,n)}function wE(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(U(314))}r!==null&&r.delete(t),Bx(e,n)}var Hx;Hx=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||xt.current)gt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return gt=!1,aE(e,t,n);gt=!!(e.flags&131072)}else gt=!1,_e&&t.flags&1048576&&K0(t,zl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;hl(e,t),e=t.pendingProps;var s=ho(t,rt.current);qs(t,n),s=lh(null,t,r,e,s,n);var o=uh();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,vt(r)?(o=!0,Fl(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,rh(t),s.updater=ku,t.stateNode=s,s._reactInternals=t,Md(t,r,e,n),t=Id(null,t,r,!0,o,n)):(t.tag=0,_e&&o&&Xf(t),it(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(hl(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=_E(r),e=qt(r,e),s){case 0:t=Ld(null,t,r,e,n);break e;case 1:t=mm(null,t,r,e,n);break e;case 11:t=hm(null,t,r,e,n);break e;case 14:t=pm(null,t,r,qt(r.type,e),n);break e}throw Error(U(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:qt(r,s),Ld(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:qt(r,s),mm(e,t,r,s,n);case 3:e:{if(Cx(t),e===null)throw Error(U(387));r=t.pendingProps,o=t.memoizedState,s=o.element,Z0(e,t),Hl(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=yo(Error(U(423)),t),t=gm(e,t,r,n,s);break e}else if(r!==s){s=yo(Error(U(424)),t),t=gm(e,t,r,n,s);break e}else for(kt=vr(t.stateNode.containerInfo.firstChild),Pt=t,_e=!0,Zt=null,n=X0(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(po(),r===s){t=$n(e,t,n);break e}it(e,t,r,n)}t=t.child}return t;case 5:return J0(t),e===null&&Pd(t),r=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,bd(r,s)?i=null:o!==null&&bd(r,o)&&(t.flags|=32),Ex(e,t),it(e,t,i,n),t.child;case 6:return e===null&&Pd(t),null;case 13:return Nx(e,t,n);case 4:return sh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=mo(t,null,r,n):it(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:qt(r,s),hm(e,t,r,s,n);case 7:return it(e,t,t.pendingProps,n),t.child;case 8:return it(e,t,t.pendingProps.children,n),t.child;case 12:return it(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,o=t.memoizedProps,i=s.value,xe($l,r._currentValue),r._currentValue=i,o!==null)if(on(o.value,i)){if(o.children===s.children&&!xt.current){t=$n(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){i=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=On(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Rd(o.return,n,t),a.lanes|=n;break}l=l.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(U(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Rd(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}it(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,qs(t,n),s=Vt(s),r=r(s),t.flags|=1,it(e,t,r,n),t.child;case 14:return r=t.type,s=qt(r,t.pendingProps),s=qt(r.type,s),pm(e,t,r,s,n);case 15:return _x(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:qt(r,s),hl(e,t),t.tag=1,vt(r)?(e=!0,Fl(t)):e=!1,qs(t,n),vx(t,r,s),Md(t,r,s,n),Id(null,t,r,!0,e,n);case 19:return kx(e,t,n);case 22:return bx(e,t,n)}throw Error(U(156,t.tag))};function Ux(e,t){return g0(e,t)}function SE(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bt(e,t,n,r){return new SE(e,t,n,r)}function vh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _E(e){if(typeof e=="function")return vh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Df)return 11;if(e===zf)return 14}return 2}function br(e,t){var n=e.alternate;return n===null?(n=Bt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function gl(e,t,n,r,s,o){var i=2;if(r=e,typeof e=="function")vh(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Rs:return ts(n.children,s,o,t);case Ff:i=8,s|=8;break;case td:return e=Bt(12,n,t,s|2),e.elementType=td,e.lanes=o,e;case nd:return e=Bt(13,n,t,s),e.elementType=nd,e.lanes=o,e;case rd:return e=Bt(19,n,t,s),e.elementType=rd,e.lanes=o,e;case Jy:return ju(n,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Yy:i=10;break e;case Zy:i=9;break e;case Df:i=11;break e;case zf:i=14;break e;case Jn:i=16,r=null;break e}throw Error(U(130,e==null?e:typeof e,""))}return t=Bt(i,n,t,s),t.elementType=e,t.type=r,t.lanes=o,t}function ts(e,t,n,r){return e=Bt(7,e,r,t),e.lanes=n,e}function ju(e,t,n,r){return e=Bt(22,e,r,t),e.elementType=Jy,e.lanes=n,e.stateNode={isHidden:!1},e}function Rc(e,t,n){return e=Bt(6,e,null,t),e.lanes=n,e}function jc(e,t,n){return t=Bt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function bE(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=cc(0),this.expirationTimes=cc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=cc(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function wh(e,t,n,r,s,o,i,a,l){return e=new bE(e,t,n,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Bt(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},rh(o),e}function EE(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ps,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Vx(e){if(!e)return Rr;e=e._reactInternals;e:{if(Es(e)!==e||e.tag!==1)throw Error(U(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(vt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(U(171))}if(e.tag===1){var n=e.type;if(vt(n))return V0(e,n,t)}return t}function Wx(e,t,n,r,s,o,i,a,l){return e=wh(n,r,!0,e,s,o,i,a,l),e.context=Vx(null),n=e.current,r=at(),s=_r(n),o=On(r,s),o.callback=t??null,wr(n,o,s),e.current.lanes=s,la(e,s,r),wt(e,r),e}function Mu(e,t,n,r){var s=t.current,o=at(),i=_r(s);return n=Vx(n),t.context===null?t.context=n:t.pendingContext=n,t=On(o,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=wr(s,t,i),e!==null&&(rn(e,s,i,o),cl(e,s,i)),i}function Xl(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Nm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Sh(e,t){Nm(e,t),(e=e.alternate)&&Nm(e,t)}function CE(){return null}var Kx=typeof reportError=="function"?reportError:function(e){console.error(e)};function _h(e){this._internalRoot=e}Tu.prototype.render=_h.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(U(409));Mu(e,t,null,null)};Tu.prototype.unmount=_h.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;hs(function(){Mu(null,e,null,null)}),t[Dn]=null}};function Tu(e){this._internalRoot=e}Tu.prototype.unstable_scheduleHydration=function(e){if(e){var t=b0();e={blockedOn:null,target:e,priority:t};for(var n=0;n<tr.length&&t!==0&&t<tr[n].priority;n++);tr.splice(n,0,e),n===0&&C0(e)}};function bh(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Lu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function km(){}function NE(e,t,n,r,s){if(s){if(typeof r=="function"){var o=r;r=function(){var u=Xl(i);o.call(u)}}var i=Wx(t,r,e,0,null,!1,!1,"",km);return e._reactRootContainer=i,e[Dn]=i.current,Li(e.nodeType===8?e.parentNode:e),hs(),i}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var u=Xl(l);a.call(u)}}var l=wh(e,0,!1,null,null,!1,!1,"",km);return e._reactRootContainer=l,e[Dn]=l.current,Li(e.nodeType===8?e.parentNode:e),hs(function(){Mu(t,l,n,r)}),l}function Iu(e,t,n,r,s){var o=n._reactRootContainer;if(o){var i=o;if(typeof s=="function"){var a=s;s=function(){var l=Xl(i);a.call(l)}}Mu(t,i,e,s)}else i=NE(n,t,e,s,r);return Xl(i)}S0=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ii(t.pendingLanes);n!==0&&(Hf(t,n|1),wt(t,Ie()),!(pe&6)&&(xo=Ie()+500,Tr()))}break;case 13:hs(function(){var r=zn(e,1);if(r!==null){var s=at();rn(r,e,1,s)}}),Sh(e,1)}};Uf=function(e){if(e.tag===13){var t=zn(e,134217728);if(t!==null){var n=at();rn(t,e,134217728,n)}Sh(e,134217728)}};_0=function(e){if(e.tag===13){var t=_r(e),n=zn(e,t);if(n!==null){var r=at();rn(n,e,t,r)}Sh(e,t)}};b0=function(){return ge};E0=function(e,t){var n=ge;try{return ge=e,t()}finally{ge=n}};hd=function(e,t,n){switch(t){case"input":if(id(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=Eu(r);if(!s)throw Error(U(90));t0(r),id(r,s)}}}break;case"textarea":r0(e,n);break;case"select":t=n.value,t!=null&&Us(e,!!n.multiple,t,!1)}};c0=gh;d0=hs;var kE={usingClientEntryPoint:!1,Events:[ca,Ls,Eu,l0,u0,gh]},Qo={findFiberByHostInstance:Dr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},PE={bundleType:Qo.bundleType,version:Qo.version,rendererPackageName:Qo.rendererPackageName,rendererConfig:Qo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Un.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=p0(e),e===null?null:e.stateNode},findFiberByHostInstance:Qo.findFiberByHostInstance||CE,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ua=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ua.isDisabled&&Ua.supportsFiber)try{wu=Ua.inject(PE),xn=Ua}catch{}}Tt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=kE;Tt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!bh(t))throw Error(U(200));return EE(e,t,null,n)};Tt.createRoot=function(e,t){if(!bh(e))throw Error(U(299));var n=!1,r="",s=Kx;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=wh(e,1,!1,null,null,n,!1,r,s),e[Dn]=t.current,Li(e.nodeType===8?e.parentNode:e),new _h(t)};Tt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(U(188)):(e=Object.keys(e).join(","),Error(U(268,e)));return e=p0(t),e=e===null?null:e.stateNode,e};Tt.flushSync=function(e){return hs(e)};Tt.hydrate=function(e,t,n){if(!Lu(t))throw Error(U(200));return Iu(null,e,t,!0,n)};Tt.hydrateRoot=function(e,t,n){if(!bh(e))throw Error(U(405));var r=n!=null&&n.hydratedSources||null,s=!1,o="",i=Kx;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=Wx(t,null,e,1,n??null,s,!1,o,i),e[Dn]=t.current,Li(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new Tu(t)};Tt.render=function(e,t,n){if(!Lu(t))throw Error(U(200));return Iu(null,e,t,!1,n)};Tt.unmountComponentAtNode=function(e){if(!Lu(e))throw Error(U(40));return e._reactRootContainer?(hs(function(){Iu(null,null,e,!1,function(){e._reactRootContainer=null,e[Dn]=null})}),!0):!1};Tt.unstable_batchedUpdates=gh;Tt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Lu(n))throw Error(U(200));if(e==null||e._reactInternals===void 0)throw Error(U(38));return Iu(e,t,n,!1,r)};Tt.version="18.3.1-next-f1338f8080-20240426";function qx(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(qx)}catch(e){console.error(e)}}qx(),qy.exports=Tt;var Qx=qy.exports,Gx,Pm=Qx;Gx=Pm.createRoot,Pm.hydrateRoot;var fa=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},RE={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},sr,Rf,Cy,jE=(Cy=class{constructor(){ne(this,sr,RE);ne(this,Rf,!1)}setTimeoutProvider(e){q(this,sr,e)}setTimeout(e,t){return A(this,sr).setTimeout(e,t)}clearTimeout(e){A(this,sr).clearTimeout(e)}setInterval(e,t){return A(this,sr).setInterval(e,t)}clearInterval(e){A(this,sr).clearInterval(e)}},sr=new WeakMap,Rf=new WeakMap,Cy),Br=new jE;function ME(e){setTimeout(e,0)}var ps=typeof window>"u"||"Deno"in globalThis;function ht(){}function TE(e,t){return typeof e=="function"?e(t):e}function Kd(e){return typeof e=="number"&&e>=0&&e!==1/0}function Xx(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Er(e,t){return typeof e=="function"?e(t):e}function Dt(e,t){return typeof e=="function"?e(t):e}function Rm(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:o,queryKey:i,stale:a}=e;if(i){if(r){if(t.queryHash!==Eh(i,t.options))return!1}else if(!Ui(t.queryKey,i))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||o&&!o(t))}function jm(e,t){const{exact:n,status:r,predicate:s,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Hi(t.options.mutationKey)!==Hi(o))return!1}else if(!Ui(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function Eh(e,t){return((t==null?void 0:t.queryKeyHashFn)||Hi)(e)}function Hi(e){return JSON.stringify(e,(t,n)=>Qd(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Ui(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Ui(e[n],t[n])):!1}var LE=Object.prototype.hasOwnProperty;function Yx(e,t){if(e===t)return e;const n=Mm(e)&&Mm(t);if(!n&&!(Qd(e)&&Qd(t)))return t;const s=(n?e:Object.keys(e)).length,o=n?t:Object.keys(t),i=o.length,a=n?new Array(i):{};let l=0;for(let u=0;u<i;u++){const d=n?u:o[u],c=e[d],f=t[d];if(c===f){a[d]=c,(n?u<s:LE.call(e,d))&&l++;continue}if(c===null||f===null||typeof c!="object"||typeof f!="object"){a[d]=f;continue}const m=Yx(c,f);a[d]=m,m===c&&l++}return s===i&&l===s?e:a}function qd(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Mm(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Qd(e){if(!Tm(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Tm(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Tm(e){return Object.prototype.toString.call(e)==="[object Object]"}function IE(e){return new Promise(t=>{Br.setTimeout(t,e)})}function Gd(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Yx(e,t):t}function AE(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function OE(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Ch=Symbol();function Zx(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Ch?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Jx(e,t){return typeof e=="function"?e(...t):!!e}function FE(e,t,n){let r=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??(s=t()),r||(r=!0,s.aborted?n():s.addEventListener("abort",n,{once:!0})),s)}),e}var Wr,or,Js,Ny,DE=(Ny=class extends fa{constructor(){super();ne(this,Wr);ne(this,or);ne(this,Js);q(this,Js,t=>{if(!ps&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){A(this,or)||this.setEventListener(A(this,Js))}onUnsubscribe(){var t;this.hasListeners()||((t=A(this,or))==null||t.call(this),q(this,or,void 0))}setEventListener(t){var n;q(this,Js,t),(n=A(this,or))==null||n.call(this),q(this,or,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){A(this,Wr)!==t&&(q(this,Wr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof A(this,Wr)=="boolean"?A(this,Wr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Wr=new WeakMap,or=new WeakMap,Js=new WeakMap,Ny),Nh=new DE;function Xd(){let e,t;const n=new Promise((s,o)=>{e=s,t=o});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}var zE=ME;function $E(){let e=[],t=0,n=a=>{a()},r=a=>{a()},s=zE;const o=a=>{t?e.push(a):s(()=>{n(a)})},i=()=>{const a=e;e=[],a.length&&s(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||i()}return l},batchCalls:a=>(...l)=>{o(()=>{a(...l)})},schedule:o,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{s=a}}}var Qe=$E(),eo,ir,to,ky,BE=(ky=class extends fa{constructor(){super();ne(this,eo,!0);ne(this,ir);ne(this,to);q(this,to,t=>{if(!ps&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){A(this,ir)||this.setEventListener(A(this,to))}onUnsubscribe(){var t;this.hasListeners()||((t=A(this,ir))==null||t.call(this),q(this,ir,void 0))}setEventListener(t){var n;q(this,to,t),(n=A(this,ir))==null||n.call(this),q(this,ir,t(this.setOnline.bind(this)))}setOnline(t){A(this,eo)!==t&&(q(this,eo,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return A(this,eo)}},eo=new WeakMap,ir=new WeakMap,to=new WeakMap,ky),Yl=new BE;function HE(e){return Math.min(1e3*2**e,3e4)}function ev(e){return(e??"online")==="online"?Yl.isOnline():!0}var Yd=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function tv(e){let t=!1,n=0,r;const s=Xd(),o=()=>s.status!=="pending",i=x=>{var w;if(!o()){const g=new Yd(x);f(g),(w=e.onCancel)==null||w.call(e,g)}},a=()=>{t=!0},l=()=>{t=!1},u=()=>Nh.isFocused()&&(e.networkMode==="always"||Yl.isOnline())&&e.canRun(),d=()=>ev(e.networkMode)&&e.canRun(),c=x=>{o()||(r==null||r(),s.resolve(x))},f=x=>{o()||(r==null||r(),s.reject(x))},m=()=>new Promise(x=>{var w;r=g=>{(o()||u())&&x(g)},(w=e.onPause)==null||w.call(e)}).then(()=>{var x;r=void 0,o()||(x=e.onContinue)==null||x.call(e)}),p=()=>{if(o())return;let x;const w=n===0?e.initialPromise:void 0;try{x=w??e.fn()}catch(g){x=Promise.reject(g)}Promise.resolve(x).then(c).catch(g=>{var _;if(o())return;const v=e.retry??(ps?0:3),y=e.retryDelay??HE,S=typeof y=="function"?y(n,g):y,E=v===!0||typeof v=="number"&&n<v||typeof v=="function"&&v(n,g);if(t||!E){f(g);return}n++,(_=e.onFail)==null||_.call(e,n,g),IE(S).then(()=>u()?void 0:m()).then(()=>{t?f(g):p()})})};return{promise:s,status:()=>s.status,cancel:i,continue:()=>(r==null||r(),s),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?p():m().then(p),s)}}var Kr,Py,nv=(Py=class{constructor(){ne(this,Kr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Kd(this.gcTime)&&q(this,Kr,Br.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ps?1/0:5*60*1e3))}clearGcTimeout(){A(this,Kr)&&(Br.clearTimeout(A(this,Kr)),q(this,Kr,void 0))}},Kr=new WeakMap,Py),qr,no,Ft,Qr,Be,na,Gr,Qt,Pn,Ry,UE=(Ry=class extends nv{constructor(t){super();ne(this,Qt);ne(this,qr);ne(this,no);ne(this,Ft);ne(this,Qr);ne(this,Be);ne(this,na);ne(this,Gr);q(this,Gr,!1),q(this,na,t.defaultOptions),this.setOptions(t.options),this.observers=[],q(this,Qr,t.client),q(this,Ft,A(this,Qr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,q(this,qr,Im(this.options)),this.state=t.state??A(this,qr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=A(this,Be))==null?void 0:t.promise}setOptions(t){if(this.options={...A(this,na),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=Im(this.options);n.data!==void 0&&(this.setState(Lm(n.data,n.dataUpdatedAt)),q(this,qr,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&A(this,Ft).remove(this)}setData(t,n){const r=Gd(this.state.data,t,this.options);return le(this,Qt,Pn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){le(this,Qt,Pn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=A(this,Be))==null?void 0:r.promise;return(s=A(this,Be))==null||s.cancel(t),n?n.then(ht).catch(ht):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(A(this,qr))}isActive(){return this.observers.some(t=>Dt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ch||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Er(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Xx(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=A(this,Be))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=A(this,Be))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),A(this,Ft).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(A(this,Be)&&(A(this,Gr)?A(this,Be).cancel({revert:!0}):A(this,Be).cancelRetry()),this.scheduleGc()),A(this,Ft).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||le(this,Qt,Pn).call(this,{type:"invalidate"})}async fetch(t,n){var l,u,d,c,f,m,p,x,w,g,v,y;if(this.state.fetchStatus!=="idle"&&((l=A(this,Be))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(A(this,Be))return A(this,Be).continueRetry(),A(this,Be).promise}if(t&&this.setOptions(t),!this.options.queryFn){const S=this.observers.find(E=>E.options.queryFn);S&&this.setOptions(S.options)}const r=new AbortController,s=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(q(this,Gr,!0),r.signal)})},o=()=>{const S=Zx(this.options,n),_=(()=>{const b={client:A(this,Qr),queryKey:this.queryKey,meta:this.meta};return s(b),b})();return q(this,Gr,!1),this.options.persister?this.options.persister(S,_,this):S(_)},a=(()=>{const S={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:A(this,Qr),state:this.state,fetchFn:o};return s(S),S})();(u=this.options.behavior)==null||u.onFetch(a,this),q(this,no,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=a.fetchOptions)==null?void 0:d.meta))&&le(this,Qt,Pn).call(this,{type:"fetch",meta:(c=a.fetchOptions)==null?void 0:c.meta}),q(this,Be,tv({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,onCancel:S=>{S instanceof Yd&&S.revert&&this.setState({...A(this,no),fetchStatus:"idle"}),r.abort()},onFail:(S,E)=>{le(this,Qt,Pn).call(this,{type:"failed",failureCount:S,error:E})},onPause:()=>{le(this,Qt,Pn).call(this,{type:"pause"})},onContinue:()=>{le(this,Qt,Pn).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}));try{const S=await A(this,Be).start();if(S===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(S),(m=(f=A(this,Ft).config).onSuccess)==null||m.call(f,S,this),(x=(p=A(this,Ft).config).onSettled)==null||x.call(p,S,this.state.error,this),S}catch(S){if(S instanceof Yd){if(S.silent)return A(this,Be).promise;if(S.revert){if(this.state.data===void 0)throw S;return this.state.data}}throw le(this,Qt,Pn).call(this,{type:"error",error:S}),(g=(w=A(this,Ft).config).onError)==null||g.call(w,S,this),(y=(v=A(this,Ft).config).onSettled)==null||y.call(v,this.state.data,S,this),S}finally{this.scheduleGc()}}},qr=new WeakMap,no=new WeakMap,Ft=new WeakMap,Qr=new WeakMap,Be=new WeakMap,na=new WeakMap,Gr=new WeakMap,Qt=new WeakSet,Pn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...rv(r.data,this.options),fetchMeta:t.meta??null};case"success":const s={...r,...Lm(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return q(this,no,t.manual?s:void 0),s;case"error":const o=t.error;return{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Qe.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),A(this,Ft).notify({query:this,type:"updated",action:t})})},Ry);function rv(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ev(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Lm(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Im(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var ft,ue,ra,st,Xr,ro,Mn,ar,sa,so,oo,Yr,Zr,lr,io,me,li,Zd,Jd,ef,tf,nf,rf,sf,sv,jy,VE=(jy=class extends fa{constructor(t,n){super();ne(this,me);ne(this,ft);ne(this,ue);ne(this,ra);ne(this,st);ne(this,Xr);ne(this,ro);ne(this,Mn);ne(this,ar);ne(this,sa);ne(this,so);ne(this,oo);ne(this,Yr);ne(this,Zr);ne(this,lr);ne(this,io,new Set);this.options=n,q(this,ft,t),q(this,ar,null),q(this,Mn,Xd()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(A(this,ue).addObserver(this),Am(A(this,ue),this.options)?le(this,me,li).call(this):this.updateResult(),le(this,me,tf).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return of(A(this,ue),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return of(A(this,ue),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,le(this,me,nf).call(this),le(this,me,rf).call(this),A(this,ue).removeObserver(this)}setOptions(t){const n=this.options,r=A(this,ue);if(this.options=A(this,ft).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Dt(this.options.enabled,A(this,ue))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");le(this,me,sf).call(this),A(this,ue).setOptions(this.options),n._defaulted&&!qd(this.options,n)&&A(this,ft).getQueryCache().notify({type:"observerOptionsUpdated",query:A(this,ue),observer:this});const s=this.hasListeners();s&&Om(A(this,ue),r,this.options,n)&&le(this,me,li).call(this),this.updateResult(),s&&(A(this,ue)!==r||Dt(this.options.enabled,A(this,ue))!==Dt(n.enabled,A(this,ue))||Er(this.options.staleTime,A(this,ue))!==Er(n.staleTime,A(this,ue)))&&le(this,me,Zd).call(this);const o=le(this,me,Jd).call(this);s&&(A(this,ue)!==r||Dt(this.options.enabled,A(this,ue))!==Dt(n.enabled,A(this,ue))||o!==A(this,lr))&&le(this,me,ef).call(this,o)}getOptimisticResult(t){const n=A(this,ft).getQueryCache().build(A(this,ft),t),r=this.createResult(n,t);return KE(this,r)&&(q(this,st,r),q(this,ro,this.options),q(this,Xr,A(this,ue).state)),r}getCurrentResult(){return A(this,st)}trackResult(t,n){return new Proxy(t,{get:(r,s)=>(this.trackProp(s),n==null||n(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&A(this,Mn).status==="pending"&&A(this,Mn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,s))})}trackProp(t){A(this,io).add(t)}getCurrentQuery(){return A(this,ue)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=A(this,ft).defaultQueryOptions(t),r=A(this,ft).getQueryCache().build(A(this,ft),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return le(this,me,li).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),A(this,st)))}createResult(t,n){var L;const r=A(this,ue),s=this.options,o=A(this,st),i=A(this,Xr),a=A(this,ro),u=t!==r?t.state:A(this,ra),{state:d}=t;let c={...d},f=!1,m;if(n._optimisticResults){const M=this.hasListeners(),P=!M&&Am(t,n),j=M&&Om(t,r,n,s);(P||j)&&(c={...c,...rv(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:p,errorUpdatedAt:x,status:w}=c;m=c.data;let g=!1;if(n.placeholderData!==void 0&&m===void 0&&w==="pending"){let M;o!=null&&o.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(M=o.data,g=!0):M=typeof n.placeholderData=="function"?n.placeholderData((L=A(this,oo))==null?void 0:L.state.data,A(this,oo)):n.placeholderData,M!==void 0&&(w="success",m=Gd(o==null?void 0:o.data,M,n),f=!0)}if(n.select&&m!==void 0&&!g)if(o&&m===(i==null?void 0:i.data)&&n.select===A(this,sa))m=A(this,so);else try{q(this,sa,n.select),m=n.select(m),m=Gd(o==null?void 0:o.data,m,n),q(this,so,m),q(this,ar,null)}catch(M){q(this,ar,M)}A(this,ar)&&(p=A(this,ar),m=A(this,so),x=Date.now(),w="error");const v=c.fetchStatus==="fetching",y=w==="pending",S=w==="error",E=y&&v,_=m!==void 0,C={status:w,fetchStatus:c.fetchStatus,isPending:y,isSuccess:w==="success",isError:S,isInitialLoading:E,isLoading:E,data:m,dataUpdatedAt:c.dataUpdatedAt,error:p,errorUpdatedAt:x,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>u.dataUpdateCount||c.errorUpdateCount>u.errorUpdateCount,isFetching:v,isRefetching:v&&!y,isLoadingError:S&&!_,isPaused:c.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:S&&_,isStale:kh(t,n),refetch:this.refetch,promise:A(this,Mn),isEnabled:Dt(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const M=O=>{C.status==="error"?O.reject(C.error):C.data!==void 0&&O.resolve(C.data)},P=()=>{const O=q(this,Mn,C.promise=Xd());M(O)},j=A(this,Mn);switch(j.status){case"pending":t.queryHash===r.queryHash&&M(j);break;case"fulfilled":(C.status==="error"||C.data!==j.value)&&P();break;case"rejected":(C.status!=="error"||C.error!==j.reason)&&P();break}}return C}updateResult(){const t=A(this,st),n=this.createResult(A(this,ue),this.options);if(q(this,Xr,A(this,ue).state),q(this,ro,this.options),A(this,Xr).data!==void 0&&q(this,oo,A(this,ue)),qd(n,t))return;q(this,st,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,o=typeof s=="function"?s():s;if(o==="all"||!o&&!A(this,io).size)return!0;const i=new Set(o??A(this,io));return this.options.throwOnError&&i.add("error"),Object.keys(A(this,st)).some(a=>{const l=a;return A(this,st)[l]!==t[l]&&i.has(l)})};le(this,me,sv).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&le(this,me,tf).call(this)}},ft=new WeakMap,ue=new WeakMap,ra=new WeakMap,st=new WeakMap,Xr=new WeakMap,ro=new WeakMap,Mn=new WeakMap,ar=new WeakMap,sa=new WeakMap,so=new WeakMap,oo=new WeakMap,Yr=new WeakMap,Zr=new WeakMap,lr=new WeakMap,io=new WeakMap,me=new WeakSet,li=function(t){le(this,me,sf).call(this);let n=A(this,ue).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(ht)),n},Zd=function(){le(this,me,nf).call(this);const t=Er(this.options.staleTime,A(this,ue));if(ps||A(this,st).isStale||!Kd(t))return;const r=Xx(A(this,st).dataUpdatedAt,t)+1;q(this,Yr,Br.setTimeout(()=>{A(this,st).isStale||this.updateResult()},r))},Jd=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(A(this,ue)):this.options.refetchInterval)??!1},ef=function(t){le(this,me,rf).call(this),q(this,lr,t),!(ps||Dt(this.options.enabled,A(this,ue))===!1||!Kd(A(this,lr))||A(this,lr)===0)&&q(this,Zr,Br.setInterval(()=>{(this.options.refetchIntervalInBackground||Nh.isFocused())&&le(this,me,li).call(this)},A(this,lr)))},tf=function(){le(this,me,Zd).call(this),le(this,me,ef).call(this,le(this,me,Jd).call(this))},nf=function(){A(this,Yr)&&(Br.clearTimeout(A(this,Yr)),q(this,Yr,void 0))},rf=function(){A(this,Zr)&&(Br.clearInterval(A(this,Zr)),q(this,Zr,void 0))},sf=function(){const t=A(this,ft).getQueryCache().build(A(this,ft),this.options);if(t===A(this,ue))return;const n=A(this,ue);q(this,ue,t),q(this,ra,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},sv=function(t){Qe.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(A(this,st))}),A(this,ft).getQueryCache().notify({query:A(this,ue),type:"observerResultsUpdated"})})},jy);function WE(e,t){return Dt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Am(e,t){return WE(e,t)||e.state.data!==void 0&&of(e,t,t.refetchOnMount)}function of(e,t,n){if(Dt(t.enabled,e)!==!1&&Er(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&kh(e,t)}return!1}function Om(e,t,n,r){return(e!==t||Dt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&kh(e,n)}function kh(e,t){return Dt(t.enabled,e)!==!1&&e.isStaleByTime(Er(t.staleTime,e))}function KE(e,t){return!qd(e.getCurrentResult(),t)}function Fm(e){return{onFetch:(t,n)=>{var d,c,f,m,p;const r=t.options,s=(f=(c=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:c.fetchMore)==null?void 0:f.direction,o=((m=t.state.data)==null?void 0:m.pages)||[],i=((p=t.state.data)==null?void 0:p.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let x=!1;const w=y=>{FE(y,()=>t.signal,()=>x=!0)},g=Zx(t.options,t.fetchOptions),v=async(y,S,E)=>{if(x)return Promise.reject();if(S==null&&y.pages.length)return Promise.resolve(y);const b=(()=>{const P={client:t.client,queryKey:t.queryKey,pageParam:S,direction:E?"backward":"forward",meta:t.options.meta};return w(P),P})(),C=await g(b),{maxPages:L}=t.options,M=E?OE:AE;return{pages:M(y.pages,C,L),pageParams:M(y.pageParams,S,L)}};if(s&&o.length){const y=s==="backward",S=y?qE:Dm,E={pages:o,pageParams:i},_=S(r,E);a=await v(E,_,y)}else{const y=e??o.length;do{const S=l===0?i[0]??r.initialPageParam:Dm(r,a);if(l>0&&S==null)break;a=await v(a,S),l++}while(l<y)}return a};t.options.persister?t.fetchFn=()=>{var x,w;return(w=(x=t.options).persister)==null?void 0:w.call(x,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Dm(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function qE(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var oa,hn,ot,Jr,pn,Zn,My,QE=(My=class extends nv{constructor(t){super();ne(this,pn);ne(this,oa);ne(this,hn);ne(this,ot);ne(this,Jr);q(this,oa,t.client),this.mutationId=t.mutationId,q(this,ot,t.mutationCache),q(this,hn,[]),this.state=t.state||GE(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){A(this,hn).includes(t)||(A(this,hn).push(t),this.clearGcTimeout(),A(this,ot).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){q(this,hn,A(this,hn).filter(n=>n!==t)),this.scheduleGc(),A(this,ot).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){A(this,hn).length||(this.state.status==="pending"?this.scheduleGc():A(this,ot).remove(this))}continue(){var t;return((t=A(this,Jr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,a,l,u,d,c,f,m,p,x,w,g,v,y,S,E,_,b,C,L;const n=()=>{le(this,pn,Zn).call(this,{type:"continue"})},r={client:A(this,oa),meta:this.options.meta,mutationKey:this.options.mutationKey};q(this,Jr,tv({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(M,P)=>{le(this,pn,Zn).call(this,{type:"failed",failureCount:M,error:P})},onPause:()=>{le(this,pn,Zn).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>A(this,ot).canRun(this)}));const s=this.state.status==="pending",o=!A(this,Jr).canStart();try{if(s)n();else{le(this,pn,Zn).call(this,{type:"pending",variables:t,isPaused:o}),await((a=(i=A(this,ot).config).onMutate)==null?void 0:a.call(i,t,this,r));const P=await((u=(l=this.options).onMutate)==null?void 0:u.call(l,t,r));P!==this.state.context&&le(this,pn,Zn).call(this,{type:"pending",context:P,variables:t,isPaused:o})}const M=await A(this,Jr).start();return await((c=(d=A(this,ot).config).onSuccess)==null?void 0:c.call(d,M,t,this.state.context,this,r)),await((m=(f=this.options).onSuccess)==null?void 0:m.call(f,M,t,this.state.context,r)),await((x=(p=A(this,ot).config).onSettled)==null?void 0:x.call(p,M,null,this.state.variables,this.state.context,this,r)),await((g=(w=this.options).onSettled)==null?void 0:g.call(w,M,null,t,this.state.context,r)),le(this,pn,Zn).call(this,{type:"success",data:M}),M}catch(M){try{await((y=(v=A(this,ot).config).onError)==null?void 0:y.call(v,M,t,this.state.context,this,r))}catch(P){Promise.reject(P)}try{await((E=(S=this.options).onError)==null?void 0:E.call(S,M,t,this.state.context,r))}catch(P){Promise.reject(P)}try{await((b=(_=A(this,ot).config).onSettled)==null?void 0:b.call(_,void 0,M,this.state.variables,this.state.context,this,r))}catch(P){Promise.reject(P)}try{await((L=(C=this.options).onSettled)==null?void 0:L.call(C,void 0,M,t,this.state.context,r))}catch(P){Promise.reject(P)}throw le(this,pn,Zn).call(this,{type:"error",error:M}),M}finally{A(this,ot).runNext(this)}}},oa=new WeakMap,hn=new WeakMap,ot=new WeakMap,Jr=new WeakMap,pn=new WeakSet,Zn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Qe.batch(()=>{A(this,hn).forEach(r=>{r.onMutationUpdate(t)}),A(this,ot).notify({mutation:this,type:"updated",action:t})})},My);function GE(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Tn,Gt,ia,Ty,XE=(Ty=class extends fa{constructor(t={}){super();ne(this,Tn);ne(this,Gt);ne(this,ia);this.config=t,q(this,Tn,new Set),q(this,Gt,new Map),q(this,ia,0)}build(t,n,r){const s=new QE({client:t,mutationCache:this,mutationId:++Na(this,ia)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){A(this,Tn).add(t);const n=Va(t);if(typeof n=="string"){const r=A(this,Gt).get(n);r?r.push(t):A(this,Gt).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(A(this,Tn).delete(t)){const n=Va(t);if(typeof n=="string"){const r=A(this,Gt).get(n);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&A(this,Gt).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Va(t);if(typeof n=="string"){const r=A(this,Gt).get(n),s=r==null?void 0:r.find(o=>o.state.status==="pending");return!s||s===t}else return!0}runNext(t){var r;const n=Va(t);if(typeof n=="string"){const s=(r=A(this,Gt).get(n))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Qe.batch(()=>{A(this,Tn).forEach(t=>{this.notify({type:"removed",mutation:t})}),A(this,Tn).clear(),A(this,Gt).clear()})}getAll(){return Array.from(A(this,Tn))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>jm(n,r))}findAll(t={}){return this.getAll().filter(n=>jm(t,n))}notify(t){Qe.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Qe.batch(()=>Promise.all(t.map(n=>n.continue().catch(ht))))}},Tn=new WeakMap,Gt=new WeakMap,ia=new WeakMap,Ty);function Va(e){var t;return(t=e.options.scope)==null?void 0:t.id}var mn,Ly,YE=(Ly=class extends fa{constructor(t={}){super();ne(this,mn);this.config=t,q(this,mn,new Map)}build(t,n,r){const s=n.queryKey,o=n.queryHash??Eh(s,n);let i=this.get(o);return i||(i=new UE({client:t,queryKey:s,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(i)),i}add(t){A(this,mn).has(t.queryHash)||(A(this,mn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=A(this,mn).get(t.queryHash);n&&(t.destroy(),n===t&&A(this,mn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Qe.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return A(this,mn).get(t)}getAll(){return[...A(this,mn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Rm(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Rm(t,r)):n}notify(t){Qe.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Qe.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Qe.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},mn=new WeakMap,Ly),je,ur,cr,ao,lo,dr,uo,co,Iy,ZE=(Iy=class{constructor(e={}){ne(this,je);ne(this,ur);ne(this,cr);ne(this,ao);ne(this,lo);ne(this,dr);ne(this,uo);ne(this,co);q(this,je,e.queryCache||new YE),q(this,ur,e.mutationCache||new XE),q(this,cr,e.defaultOptions||{}),q(this,ao,new Map),q(this,lo,new Map),q(this,dr,0)}mount(){Na(this,dr)._++,A(this,dr)===1&&(q(this,uo,Nh.subscribe(async e=>{e&&(await this.resumePausedMutations(),A(this,je).onFocus())})),q(this,co,Yl.subscribe(async e=>{e&&(await this.resumePausedMutations(),A(this,je).onOnline())})))}unmount(){var e,t;Na(this,dr)._--,A(this,dr)===0&&((e=A(this,uo))==null||e.call(this),q(this,uo,void 0),(t=A(this,co))==null||t.call(this),q(this,co,void 0))}isFetching(e){return A(this,je).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return A(this,ur).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=A(this,je).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=A(this,je).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Er(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return A(this,je).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=A(this,je).get(r.queryHash),o=s==null?void 0:s.state.data,i=TE(t,o);if(i!==void 0)return A(this,je).build(this,r).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return Qe.batch(()=>A(this,je).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=A(this,je).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=A(this,je);Qe.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=A(this,je);return Qe.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Qe.batch(()=>A(this,je).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(ht).catch(ht)}invalidateQueries(e,t={}){return Qe.batch(()=>(A(this,je).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Qe.batch(()=>A(this,je).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,n);return n.throwOnError||(o=o.catch(ht)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(ht)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=A(this,je).build(this,t);return n.isStaleByTime(Er(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ht).catch(ht)}fetchInfiniteQuery(e){return e.behavior=Fm(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ht).catch(ht)}ensureInfiniteQueryData(e){return e.behavior=Fm(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Yl.isOnline()?A(this,ur).resumePausedMutations():Promise.resolve()}getQueryCache(){return A(this,je)}getMutationCache(){return A(this,ur)}getDefaultOptions(){return A(this,cr)}setDefaultOptions(e){q(this,cr,e)}setQueryDefaults(e,t){A(this,ao).set(Hi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...A(this,ao).values()],n={};return t.forEach(r=>{Ui(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){A(this,lo).set(Hi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...A(this,lo).values()],n={};return t.forEach(r=>{Ui(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...A(this,cr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Eh(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Ch&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...A(this,cr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){A(this,je).clear(),A(this,ur).clear()}},je=new WeakMap,ur=new WeakMap,cr=new WeakMap,ao=new WeakMap,lo=new WeakMap,dr=new WeakMap,uo=new WeakMap,co=new WeakMap,Iy),ov=R.createContext(void 0),JE=e=>{const t=R.useContext(ov);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},eC=({client:e,children:t})=>(R.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),h.jsx(ov.Provider,{value:e,children:t})),iv=R.createContext(!1),tC=()=>R.useContext(iv);iv.Provider;function nC(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var rC=R.createContext(nC()),sC=()=>R.useContext(rC),oC=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?Jx(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},iC=e=>{R.useEffect(()=>{e.clearReset()},[e])},aC=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||Jx(n,[e.error,r])),lC=e=>{if(e.suspense){const n=s=>s==="static"?s:Math.max(s??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...s)=>n(r(...s)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},uC=(e,t)=>e.isLoading&&e.isFetching&&!t,cC=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,zm=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function dC(e,t,n){var f,m,p,x;const r=tC(),s=sC(),o=JE(),i=o.defaultQueryOptions(e);(m=(f=o.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||m.call(f,i);const a=o.getQueryCache().get(i.queryHash);i._optimisticResults=r?"isRestoring":"optimistic",lC(i),oC(i,s,a),iC(s);const l=!o.getQueryCache().get(i.queryHash),[u]=R.useState(()=>new t(o,i)),d=u.getOptimisticResult(i),c=!r&&e.subscribed!==!1;if(R.useSyncExternalStore(R.useCallback(w=>{const g=c?u.subscribe(Qe.batchCalls(w)):ht;return u.updateResult(),g},[u,c]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),R.useEffect(()=>{u.setOptions(i)},[i,u]),cC(i,d))throw zm(i,u,s);if(aC({result:d,errorResetBoundary:s,throwOnError:i.throwOnError,query:a,suspense:i.suspense}))throw d.error;if((x=(p=o.getDefaultOptions().queries)==null?void 0:p._experimental_afterQuery)==null||x.call(p,i,d),i.experimental_prefetchInRender&&!ps&&uC(d,r)){const w=l?zm(i,u,s):a==null?void 0:a.promise;w==null||w.catch(ht).finally(()=>{u.updateResult()})}return i.notifyOnChangeProps?d:u.trackResult(d)}function Ao(e,t){return dC(e,VE)}const af=new WeakMap,fC=new WeakMap,Zl={current:[]};let Mc=!1,Si=0;const ui=new Set,Wa=new Map;function av(e){for(const t of e){if(Zl.current.includes(t))continue;Zl.current.push(t),t.recompute();const n=fC.get(t);if(n)for(const r of n){const s=af.get(r);s!=null&&s.length&&av(s)}}}function hC(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function pC(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function lv(e){if(Si>0&&!Wa.has(e)&&Wa.set(e,e.prevState),ui.add(e),!(Si>0)&&!Mc)try{for(Mc=!0;ui.size>0;){const t=Array.from(ui);ui.clear();for(const n of t){const r=Wa.get(n)??n.prevState;n.prevState=r,hC(n)}for(const n of t){const r=af.get(n);r&&(Zl.current.push(n),av(r))}for(const n of t){const r=af.get(n);if(r)for(const s of r)pC(s)}}}finally{Mc=!1,Zl.current=[],Wa.clear()}}function _i(e){Si++;try{e()}finally{if(Si--,Si===0){const t=ui.values().next().value;t&&lv(t)}}}function mC(e){return typeof e=="function"}class gC{constructor(t,n){this.listeners=new Set,this.subscribe=r=>{var s,o;this.listeners.add(r);const i=(o=(s=this.options)==null?void 0:s.onSubscribe)==null?void 0:o.call(s,r,this);return()=>{this.listeners.delete(r),i==null||i()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,r,s;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):mC(t)?this.state=t(this.prevState):this.state=t,(s=(r=this.options)==null?void 0:r.onUpdate)==null||s.call(r),lv(this)}}const Cr="__TSR_index",$m="popstate",Bm="beforeunload";function yC(e){let t=e.getLocation();const n=new Set,r=i=>{t=e.getLocation(),n.forEach(a=>a({location:t,action:i}))},s=i=>{e.notifyOnIndexChange??!0?r(i):t=e.getLocation()},o=async({task:i,navigateOpts:a,...l})=>{var f,m;if((a==null?void 0:a.ignoreBlocker)??!1){i();return}const d=((f=e.getBlockers)==null?void 0:f.call(e))??[],c=l.type==="PUSH"||l.type==="REPLACE";if(typeof document<"u"&&d.length&&c)for(const p of d){const x=Jl(l.path,l.state);if(await p.blockerFn({currentLocation:t,nextLocation:x,action:l.type})){(m=e.onBlocked)==null||m.call(e);return}}i()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:i=>(n.add(i),()=>{n.delete(i)}),push:(i,a,l)=>{const u=t.state[Cr];a=Hm(u+1,a),o({task:()=>{e.pushState(i,a),r({type:"PUSH"})},navigateOpts:l,type:"PUSH",path:i,state:a})},replace:(i,a,l)=>{const u=t.state[Cr];a=Hm(u,a),o({task:()=>{e.replaceState(i,a),r({type:"REPLACE"})},navigateOpts:l,type:"REPLACE",path:i,state:a})},go:(i,a)=>{o({task:()=>{e.go(i),s({type:"GO",index:i})},navigateOpts:a,type:"GO"})},back:i=>{o({task:()=>{e.back((i==null?void 0:i.ignoreBlocker)??!1),s({type:"BACK"})},navigateOpts:i,type:"BACK"})},forward:i=>{o({task:()=>{e.forward((i==null?void 0:i.ignoreBlocker)??!1),s({type:"FORWARD"})},navigateOpts:i,type:"FORWARD"})},canGoBack:()=>t.state[Cr]!==0,createHref:i=>e.createHref(i),block:i=>{var l;if(!e.setBlockers)return()=>{};const a=((l=e.getBlockers)==null?void 0:l.call(e))??[];return e.setBlockers([...a,i]),()=>{var d,c;const u=((d=e.getBlockers)==null?void 0:d.call(e))??[];(c=e.setBlockers)==null||c.call(e,u.filter(f=>f!==i))}},flush:()=>{var i;return(i=e.flush)==null?void 0:i.call(e)},destroy:()=>{var i;return(i=e.destroy)==null?void 0:i.call(e)},notify:r}}function Hm(e,t){t||(t={});const n=Ph();return{...t,key:n,__TSR_key:n,[Cr]:e}}function xC(e){var C,L;const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let s=[];const o=()=>s,i=M=>s=M,a=M=>M,l=()=>Jl(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state);if(!((C=t.history.state)!=null&&C.__TSR_key)&&!((L=t.history.state)!=null&&L.key)){const M=Ph();t.history.replaceState({[Cr]:0,key:M,__TSR_key:M},"")}let u=l(),d,c=!1,f=!1,m=!1,p=!1;const x=()=>u;let w,g;const v=()=>{w&&(b._ignoreSubscribers=!0,(w.isPush?t.history.pushState:t.history.replaceState)(w.state,"",w.href),b._ignoreSubscribers=!1,w=void 0,g=void 0,d=void 0)},y=(M,P,j)=>{const O=a(P);g||(d=u),u=Jl(P,j),w={href:O,state:j,isPush:(w==null?void 0:w.isPush)||M==="push"},g||(g=Promise.resolve().then(()=>v()))},S=M=>{u=l(),b.notify({type:M})},E=async()=>{if(f){f=!1;return}const M=l(),P=M.state[Cr]-u.state[Cr],j=P===1,O=P===-1,k=!j&&!O||c;c=!1;const D=k?"GO":O?"BACK":"FORWARD",I=k?{type:"GO",index:P}:{type:O?"BACK":"FORWARD"};if(m)m=!1;else{const F=o();if(typeof document<"u"&&F.length){for(const N of F)if(await N.blockerFn({currentLocation:u,nextLocation:M,action:D})){f=!0,t.history.go(1),b.notify(I);return}}}u=l(),b.notify(I)},_=M=>{if(p){p=!1;return}let P=!1;const j=o();if(typeof document<"u"&&j.length)for(const O of j){const k=O.enableBeforeUnload??!0;if(k===!0){P=!0;break}if(typeof k=="function"&&k()===!0){P=!0;break}}if(P)return M.preventDefault(),M.returnValue=""},b=yC({getLocation:x,getLength:()=>t.history.length,pushState:(M,P)=>y("push",M,P),replaceState:(M,P)=>y("replace",M,P),back:M=>(M&&(m=!0),p=!0,t.history.back()),forward:M=>{M&&(m=!0),p=!0,t.history.forward()},go:M=>{c=!0,t.history.go(M)},createHref:M=>a(M),flush:v,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(Bm,_,{capture:!0}),t.removeEventListener($m,E)},onBlocked:()=>{d&&u!==d&&(u=d)},getBlockers:o,setBlockers:i,notifyOnIndexChange:!1});return t.addEventListener(Bm,_,{capture:!0}),t.addEventListener($m,E),t.history.pushState=function(...M){const P=n.apply(t.history,M);return b._ignoreSubscribers||S("PUSH"),P},t.history.replaceState=function(...M){const P=r.apply(t.history,M);return b._ignoreSubscribers||S("REPLACE"),P},b}function Jl(e,t){const n=e.indexOf("#"),r=e.indexOf("?"),s=Ph();return{href:e,pathname:e.substring(0,n>0?r>0?Math.min(n,r):n:r>0?r:e.length),hash:n>-1?e.substring(n):"",search:r>-1?e.slice(r,n===-1?void 0:n):"",state:t||{[Cr]:0,key:s,__TSR_key:s}}}function Ph(){return(Math.random()+1).toString(36).substring(7)}function eu(e){return e[e.length-1]}function vC(e){return typeof e=="function"}function pr(e,t){return vC(e)?e(t):e}const wC=Object.prototype.hasOwnProperty;function Ot(e,t){if(e===t)return e;const n=t,r=Wm(e)&&Wm(n);if(!r&&!(tu(e)&&tu(n)))return n;const s=r?e:Um(e);if(!s)return n;const o=r?n:Um(n);if(!o)return n;const i=s.length,a=o.length,l=r?new Array(a):{};let u=0;for(let d=0;d<a;d++){const c=r?d:o[d],f=e[c],m=n[c];if(f===m){l[c]=f,(r?d<i:wC.call(e,c))&&u++;continue}if(f===null||m===null||typeof f!="object"||typeof m!="object"){l[c]=m;continue}const p=Ot(f,m);l[c]=p,p===f&&u++}return i===a&&u===i?e:l}function Um(e){const t=[],n=Object.getOwnPropertyNames(e);for(const s of n){if(!Object.prototype.propertyIsEnumerable.call(e,s))return!1;t.push(s)}const r=Object.getOwnPropertySymbols(e);for(const s of r){if(!Object.prototype.propertyIsEnumerable.call(e,s))return!1;t.push(s)}return t}function tu(e){if(!Vm(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!Vm(n)||!n.hasOwnProperty("isPrototypeOf"))}function Vm(e){return Object.prototype.toString.call(e)==="[object Object]"}function Wm(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ns(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,s=e.length;r<s;r++)if(!ns(e[r],t[r],n))return!1;return!0}if(tu(e)&&tu(t)){const r=(n==null?void 0:n.ignoreUndefined)??!0;if(n!=null&&n.partial){for(const i in t)if((!r||t[i]!==void 0)&&!ns(e[i],t[i],n))return!1;return!0}let s=0;if(!r)s=Object.keys(e).length;else for(const i in e)e[i]!==void 0&&s++;let o=0;for(const i in t)if((!r||t[i]!==void 0)&&(o++,o>s||!ns(e[i],t[i],n)))return!1;return s===o}return!1}function vo(e){let t,n;const r=new Promise((s,o)=>{t=s,n=o});return r.status="pending",r.resolve=s=>{r.status="resolved",r.value=s,t(s),e==null||e(s)},r.reject=s=>{r.status="rejected",n(s)},r}function Nr(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function Km(e){try{return decodeURI(e)}catch{return e.replaceAll(/%[0-9A-F]{2}/gi,t=>{try{return decodeURI(t)}catch{return t}})}}function qm(e,t){if(!e)return e;const n=/%25|%5C/gi;let r=0,s="",o;for(;(o=n.exec(e))!==null;)s+=Km(e.slice(r,o.index))+o[0],r=n.lastIndex;return s+Km(r?e.slice(r):e)}var SC="Invariant failed";function Bn(e,t){if(!e)throw new Error(SC)}function nu(e){const t=new Map;let n,r;const s=o=>{o.next&&(o.prev?(o.prev.next=o.next,o.next.prev=o.prev,o.next=void 0,r&&(r.next=o,o.prev=r)):(o.next.prev=void 0,n=o.next,o.next=void 0,r&&(o.prev=r,r.next=o)),r=o)};return{get(o){const i=t.get(o);if(i)return s(i),i.value},set(o,i){if(t.size>=e&&n){const l=n;t.delete(l.key),l.next&&(n=l.next,l.next.prev=void 0),l===r&&(r=void 0)}const a=t.get(o);if(a)a.value=i,s(a);else{const l={key:o,value:i,prev:r};r&&(r.next=l),r=l,n||(n=l),t.set(o,l)}},clear(){t.clear(),n=void 0,r=void 0}}}const wo=0,ms=1,gs=2,Vi=3,$s=4,_C=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,bC=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,EC=/^([^{]*)\{\$\}([^}]*)$/;function Rh(e,t,n=new Uint16Array(6)){const r=e.indexOf("/",t),s=r===-1?e.length:r,o=e.substring(t,s);if(!o||!o.includes("$"))return n[0]=wo,n[1]=t,n[2]=t,n[3]=s,n[4]=s,n[5]=s,n;if(o==="$"){const u=e.length;return n[0]=gs,n[1]=t,n[2]=t,n[3]=u,n[4]=u,n[5]=u,n}if(o.charCodeAt(0)===36)return n[0]=ms,n[1]=t,n[2]=t+1,n[3]=s,n[4]=s,n[5]=s,n;const i=o.match(EC);if(i){const d=i[1].length;return n[0]=gs,n[1]=t+d,n[2]=t+d+1,n[3]=t+d+2,n[4]=t+d+3,n[5]=e.length,n}const a=o.match(bC);if(a){const u=a[1],d=a[2],c=a[3],f=u.length;return n[0]=Vi,n[1]=t+f,n[2]=t+f+3,n[3]=t+f+3+d.length,n[4]=s-c.length,n[5]=s,n}const l=o.match(_C);if(l){const u=l[1],d=l[2],c=l[3],f=u.length;return n[0]=ms,n[1]=t+f,n[2]=t+f+2,n[3]=t+f+2+d.length,n[4]=s-c.length,n[5]=s,n}return n[0]=wo,n[1]=t,n[2]=t,n[3]=s,n[4]=s,n[5]=s,n}function Au(e,t,n,r,s,o,i){var l,u,d,c,f;i==null||i(n);let a=r;{const m=n.fullPath??n.from,p=m.length,x=((l=n.options)==null?void 0:l.caseSensitive)??e;for(;a<p;){const g=Rh(m,a,t);let v;const y=a,S=g[5];switch(a=S+1,o++,g[0]){case wo:{const _=m.substring(g[2],g[3]);if(x){const b=(u=s.static)==null?void 0:u.get(_);if(b)v=b;else{s.static??(s.static=new Map);const C=Gs(n.fullPath??n.from);C.parent=s,C.depth=o,v=C,s.static.set(_,C)}}else{const b=_.toLowerCase(),C=(d=s.staticInsensitive)==null?void 0:d.get(b);if(C)v=C;else{s.staticInsensitive??(s.staticInsensitive=new Map);const L=Gs(n.fullPath??n.from);L.parent=s,L.depth=o,v=L,s.staticInsensitive.set(b,L)}}break}case ms:{const _=m.substring(y,g[1]),b=m.substring(g[4],S),C=x&&!!(_||b),L=_?C?_:_.toLowerCase():void 0,M=b?C?b:b.toLowerCase():void 0,P=(c=s.dynamic)==null?void 0:c.find(j=>j.caseSensitive===C&&j.prefix===L&&j.suffix===M);if(P)v=P;else{const j=Lc(ms,n.fullPath??n.from,C,L,M);v=j,j.depth=o,j.parent=s,s.dynamic??(s.dynamic=[]),s.dynamic.push(j)}break}case Vi:{const _=m.substring(y,g[1]),b=m.substring(g[4],S),C=x&&!!(_||b),L=_?C?_:_.toLowerCase():void 0,M=b?C?b:b.toLowerCase():void 0,P=(f=s.optional)==null?void 0:f.find(j=>j.caseSensitive===C&&j.prefix===L&&j.suffix===M);if(P)v=P;else{const j=Lc(Vi,n.fullPath??n.from,C,L,M);v=j,j.parent=s,j.depth=o,s.optional??(s.optional=[]),s.optional.push(j)}break}case gs:{const _=m.substring(y,g[1]),b=m.substring(g[4],S),C=x&&!!(_||b),L=_?C?_:_.toLowerCase():void 0,M=b?C?b:b.toLowerCase():void 0,P=Lc(gs,n.fullPath??n.from,C,L,M);v=P,P.parent=s,P.depth=o,s.wildcard??(s.wildcard=[]),s.wildcard.push(P)}}s=v}const w=(n.path||!n.children)&&!n.isRoot;if(w&&m.endsWith("/")){const g=Gs(n.fullPath??n.from);g.kind=$s,g.parent=s,o++,g.depth=o,s.index=g,s=g}w&&!s.route&&(s.route=n,s.fullPath=n.fullPath??n.from)}if(n.children)for(const m of n.children)Au(e,t,m,a,s,o,i)}function Tc(e,t){if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Fr(e){var t,n,r;if(e.static)for(const s of e.static.values())Fr(s);if(e.staticInsensitive)for(const s of e.staticInsensitive.values())Fr(s);if((t=e.dynamic)!=null&&t.length){e.dynamic.sort(Tc);for(const s of e.dynamic)Fr(s)}if((n=e.optional)!=null&&n.length){e.optional.sort(Tc);for(const s of e.optional)Fr(s)}if((r=e.wildcard)!=null&&r.length){e.wildcard.sort(Tc);for(const s of e.wildcard)Fr(s)}}function Gs(e){return{kind:wo,depth:0,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null}}function Lc(e,t,n,r,s){return{kind:e,depth:0,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,caseSensitive:n,prefix:r,suffix:s}}function CC(e,t){const n=Gs("/"),r=new Uint16Array(6);for(const s of e)Au(!1,r,s,1,n,0);Fr(n),t.masksTree=n,t.flatCache=nu(1e3)}function NC(e,t){e||(e="/");const n=t.flatCache.get(e);if(n)return n;const r=jh(e,t.masksTree);return t.flatCache.set(e,r),r}function kC(e,t,n,r,s){e||(e="/"),r||(r="/");const o=t?`case\0${e}`:e;let i=s.singleCache.get(o);if(!i){i=Gs("/");const a=new Uint16Array(6);Au(t,a,{from:e},1,i,0),s.singleCache.set(o,i)}return jh(r,i,n)}function PC(e,t,n=!1){const r=n?e:`nofuzz\0${e}`,s=t.matchCache.get(r);if(s!==void 0)return s;e||(e="/");const o=jh(e,t.segmentTree,n);return o&&(o.branch=TC(o.route)),t.matchCache.set(r,o),o}function RC(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function jC(e,t=!1,n){const r=Gs(e.fullPath),s=new Uint16Array(6),o={},i={};let a=0;return Au(t,s,e,1,r,0,u=>{if(n==null||n(u,a),Bn(!(u.id in o),`Duplicate routes found with id: ${String(u.id)}`),o[u.id]=u,a!==0&&u.path){const d=RC(u.fullPath);(!i[d]||u.fullPath.endsWith("/"))&&(i[d]=u)}a++}),Fr(r),{processedTree:{segmentTree:r,singleCache:nu(1e3),matchCache:nu(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:i}}function jh(e,t,n=!1){const r=e.split("/"),s=IC(e,r,t,n);if(!s)return null;const o=MC(e,r,s);return"**"in s&&(o["**"]=s["**"]),{route:s.node.route,params:o}}function MC(e,t,n){var i,a,l,u,d,c;const r=LC(n.node);let s=null;const o={};for(let f=0,m=0,p=0;m<r.length;f++,m++,p++){const x=r[m],w=t[f],g=p;if(w&&(p+=w.length),x.kind===ms){s??(s=n.node.fullPath.split("/"));const v=s[m],y=((i=x.prefix)==null?void 0:i.length)??0;if(v.charCodeAt(y)===123){const E=((a=x.suffix)==null?void 0:a.length)??0,_=v.substring(y+2,v.length-E-1),b=w.substring(y,w.length-E);o[_]=decodeURIComponent(b)}else{const E=v.substring(1);o[E]=decodeURIComponent(w)}}else if(x.kind===Vi){if(n.skipped&1<<m){f--;continue}s??(s=n.node.fullPath.split("/"));const v=s[m],y=((l=x.prefix)==null?void 0:l.length)??0,S=((u=x.suffix)==null?void 0:u.length)??0,E=v.substring(y+3,v.length-S-1),_=x.suffix||x.prefix?w.substring(y,w.length-S):w;_&&(o[E]=decodeURIComponent(_))}else if(x.kind===gs){const v=x,y=e.substring(g+(((d=v.prefix)==null?void 0:d.length)??0),e.length-(((c=v.suffix)==null?void 0:c.length)??0)),S=decodeURIComponent(y);o["*"]=S,o._splat=S;break}}return o}function TC(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function LC(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function IC(e,t,n,r){if(e==="/"&&n.index)return{node:n.index,skipped:0};const s=!eu(t),o=s&&e!=="/",i=t.length-(s?1:0),a=[{node:n,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let l=null,u=null,d=null;for(;a.length;){const c=a.pop();let{node:f,index:m,skipped:p,depth:x,statics:w,dynamics:g,optionals:v}=c;r&&f.route&&f.kind!==$s&&Go(u,c)&&(u=c);const y=m===i;if(y&&(f.route&&!o&&Go(d,c)&&(d=c),!f.optional&&!f.wildcard&&!f.index))continue;const S=y?void 0:t[m];let E;if(y&&f.index){const _={node:f.index,index:m,skipped:p,depth:x+1,statics:w,dynamics:g,optionals:v};if(w===i&&!g&&!v&&!p)return _;Go(d,_)&&(d=_)}if(f.wildcard&&Go(l,c))for(const _ of f.wildcard){const{prefix:b,suffix:C}=_;if(!(b&&(y||!(_.caseSensitive?S:E??(E=S.toLowerCase())).startsWith(b)))){if(C){if(y)continue;const L=t.slice(m).join("/").slice(-C.length);if((_.caseSensitive?L:L.toLowerCase())!==C)continue}l={node:_,index:i,skipped:p,depth:x,statics:w,dynamics:g,optionals:v};break}}if(f.optional){const _=p|1<<x,b=x+1;for(let C=f.optional.length-1;C>=0;C--){const L=f.optional[C];a.push({node:L,index:m,skipped:_,depth:b,statics:w,dynamics:g,optionals:v})}if(!y)for(let C=f.optional.length-1;C>=0;C--){const L=f.optional[C],{prefix:M,suffix:P}=L;if(M||P){const j=L.caseSensitive?S:E??(E=S.toLowerCase());if(M&&!j.startsWith(M)||P&&!j.endsWith(P))continue}a.push({node:L,index:m+1,skipped:p,depth:b,statics:w,dynamics:g,optionals:v+1})}}if(!y&&f.dynamic&&S)for(let _=f.dynamic.length-1;_>=0;_--){const b=f.dynamic[_],{prefix:C,suffix:L}=b;if(C||L){const M=b.caseSensitive?S:E??(E=S.toLowerCase());if(C&&!M.startsWith(C)||L&&!M.endsWith(L))continue}a.push({node:b,index:m+1,skipped:p,depth:x+1,statics:w,dynamics:g+1,optionals:v})}if(!y&&f.staticInsensitive){const _=f.staticInsensitive.get(E??(E=S.toLowerCase()));_&&a.push({node:_,index:m+1,skipped:p,depth:x+1,statics:w+1,dynamics:g,optionals:v})}if(!y&&f.static){const _=f.static.get(S);_&&a.push({node:_,index:m+1,skipped:p,depth:x+1,statics:w+1,dynamics:g,optionals:v})}}if(d&&l)return Go(l,d)?d:l;if(d)return d;if(l)return l;if(r&&u){let c=u.index;for(let m=0;m<u.index;m++)c+=t[m].length;const f=c===e.length?"/":e.slice(c);return{node:u.node,skipped:u.skipped,"**":decodeURIComponent(f)}}return null}function Go(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===$s)>(e.node.kind===$s)||t.node.kind===$s==(e.node.kind===$s)&&t.depth>e.depth))):!0}function yl(e){return Mh(e.filter(t=>t!==void 0).join("/"))}function Mh(e){return e.replace(/\/{2,}/g,"/")}function uv(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function rs(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function cv(e){return rs(uv(e))}function ru(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function AC(e,t,n){return ru(e,n)===ru(t,n)}function OC({base:e,to:t,trailingSlash:n="never",cache:r}){const s=t.startsWith("/"),o=!s&&t===".";let i;if(r){i=s?t:o?e:e+"\0"+t;const c=r.get(i);if(c)return c}let a;if(o)a=e.split("/");else if(s)a=t.split("/");else{for(a=e.split("/");a.length>1&&eu(a)==="";)a.pop();const c=t.split("/");for(let f=0,m=c.length;f<m;f++){const p=c[f];p===""?f?f===m-1&&a.push(p):a=[p]:p===".."?a.pop():p==="."||a.push(p)}}a.length>1&&(eu(a)===""?n==="never"&&a.pop():n==="always"&&a.push(""));let l,u="";for(let c=0;c<a.length;c++){c>0&&(u+="/");const f=a[c];if(!f)continue;l=Rh(f,0,l);const m=l[0];if(m===wo){u+=f;continue}const p=l[5],x=f.substring(0,l[1]),w=f.substring(l[4],p),g=f.substring(l[2],l[3]);m===ms?u+=x||w?`${x}{$${g}}${w}`:`$${g}`:m===gs?u+=x||w?`${x}{$}${w}`:"$":u+=`${x}{-$${g}}${w}`}u=Mh(u);const d=u||"/";return i&&r&&r.set(i,d),d}function Ic(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?encodeURI(r):FC(r,n)}function Ac({path:e,params:t,decodeCharMap:n}){let r=!1;const s={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:s,isMissingParams:r};if(!e.includes("$"))return{interpolatedPath:e,usedParams:s,isMissingParams:r};const o=e.length;let i=0,a,l="";for(;i<o;){const d=i;a=Rh(e,d,a);const c=a[5];if(i=c+1,d===c)continue;const f=a[0];if(f===wo){l+="/"+e.substring(d,c);continue}if(f===gs){const m=t._splat;s._splat=m,s["*"]=m;const p=e.substring(d,a[1]),x=e.substring(a[4],c);if(!m){r=!0,(p||x)&&(l+="/"+p+x);continue}const w=Ic("_splat",t,n);l+="/"+p+w+x;continue}if(f===ms){const m=e.substring(a[2],a[3]);!r&&!(m in t)&&(r=!0),s[m]=t[m];const p=e.substring(d,a[1]),x=e.substring(a[4],c),w=Ic(m,t,n)??"undefined";l+="/"+p+w+x;continue}if(f===Vi){const m=e.substring(a[2],a[3]),p=t[m];if(p==null)continue;s[m]=p;const x=e.substring(d,a[1]),w=e.substring(a[4],c),g=Ic(m,t,n)??"";l+="/"+x+g+w;continue}}return e.endsWith("/")&&(l+="/"),{usedParams:s,interpolatedPath:l||"/",isMissingParams:r}}function FC(e,t){let n=encodeURIComponent(e);if(t)for(const[r,s]of t)n=n.replaceAll(r,s);return n}function Rt(e){return!!(e!=null&&e.isNotFound)}function DC(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const su="tsr-scroll-restoration-v1_3",zC=(e,t)=>{let n;return(...r)=>{n||(n=setTimeout(()=>{e(...r),n=null},t))}};function $C(){const e=DC();if(!e)return null;const t=e.getItem(su);let n=t?JSON.parse(t):{};return{state:n,set:r=>(n=pr(r,n)||n,e.setItem(su,JSON.stringify(n)))}}const Ka=$C(),lf=e=>e.state.__TSR_key||e.href;function BC(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let ou=!1;function dv({storageKey:e,key:t,behavior:n,shouldScrollRestoration:r,scrollToTopSelectors:s,location:o}){var u,d;let i;try{i=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(c){console.error(c);return}const a=t||((u=window.history.state)==null?void 0:u.__TSR_key),l=i[a];ou=!0;e:{if(r&&l&&Object.keys(l).length>0){for(const m in l){const p=l[m];if(m==="window")window.scrollTo({top:p.scrollY,left:p.scrollX,behavior:n});else if(m){const x=document.querySelector(m);x&&(x.scrollLeft=p.scrollX,x.scrollTop=p.scrollY)}}break e}const c=(o??window.location).hash.split("#",2)[1];if(c){const m=((d=window.history.state)==null?void 0:d.__hashScrollIntoViewOptions)??!0;if(m){const p=document.getElementById(c);p&&p.scrollIntoView(m)}break e}const f={top:0,left:0,behavior:n};if(window.scrollTo(f),s)for(const m of s){if(m==="window")continue;const p=typeof m=="function"?m():document.querySelector(m);p&&p.scrollTo(f)}}ou=!1}function HC(e,t){if(!Ka&&!e.isServer||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!Ka))return;e.isScrollRestorationSetup=!0,ou=!1;const r=e.options.getScrollRestorationKey||lf;window.history.scrollRestoration="manual";const s=o=>{if(ou||!e.isScrollRestoring)return;let i="";if(o.target===document||o.target===window)i="window";else{const l=o.target.getAttribute("data-scroll-restoration-id");l?i=`[data-scroll-restoration-id="${l}"]`:i=BC(o.target)}const a=r(e.state.location);Ka.set(l=>{const u=l[a]||(l[a]={}),d=u[i]||(u[i]={});if(i==="window")d.scrollX=window.scrollX||0,d.scrollY=window.scrollY||0;else if(i){const c=document.querySelector(i);c&&(d.scrollX=c.scrollLeft||0,d.scrollY=c.scrollTop||0)}return l})};typeof document<"u"&&document.addEventListener("scroll",zC(s,100),!0),e.subscribe("onRendered",o=>{const i=r(o.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(dv({storageKey:su,key:i,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&Ka.set(a=>(a[i]||(a[i]={}),a)))})}function UC(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function VC(e,t=String){const n=new URLSearchParams;for(const r in e){const s=e[r];s!==void 0&&n.set(r,t(s))}return n.toString()}function Oc(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function WC(e){const t=new URLSearchParams(e),n={};for(const[r,s]of t.entries()){const o=n[r];o==null?n[r]=Oc(s):Array.isArray(o)?o.push(Oc(s)):n[r]=[o,Oc(s)]}return n}const KC=QC(JSON.parse),qC=GC(JSON.stringify,JSON.parse);function QC(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=WC(t);for(const r in n){const s=n[r];if(typeof s=="string")try{n[r]=e(s)}catch{}}return n}}function GC(e,t){const n=typeof t=="function";function r(s){if(typeof s=="object"&&s!==null)try{return e(s)}catch{}else if(n&&typeof s=="string")try{return t(s),e(s)}catch{}return s}return s=>{const o=VC(s,r);return o?`?${o}`:""}}const Ct="__root__";function XC(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function Ht(e){return e instanceof Response&&!!e.options}const xl=e=>{var t;if(!e.rendered)return e.rendered=!0,(t=e.onReady)==null?void 0:t.call(e)},Ou=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),Th=(e,t,n=!0)=>{const r={...e.router.options.context??{}},s=n?t:t-1;for(let o=0;o<=s;o++){const i=e.matches[o];if(!i)continue;const a=e.router.getMatch(i.id);a&&Object.assign(r,a.__routeContext,a.__beforeLoadContext)}return r},fv=(e,t)=>{var s;const n=e.router.routesById[t.routeId??""]??e.router.routeTree;!n.options.notFoundComponent&&((s=e.router.options)!=null&&s.defaultNotFoundComponent)&&(n.options.notFoundComponent=e.router.options.defaultNotFoundComponent),Bn(n.options.notFoundComponent);const r=e.matches.find(o=>o.routeId===n.id);Bn(r,"Could not find match for route: "+n.id),e.updateMatch(r.id,o=>({...o,status:"notFound",error:t,isFetching:!1})),t.routerCode==="BEFORE_LOAD"&&n.parentRoute&&(t.routeId=n.parentRoute.id,fv(e,t))},mr=(e,t,n)=>{var r,s,o;if(!(!Ht(n)&&!Rt(n))){if(Ht(n)&&n.redirectHandled&&!n.options.reloadDocument)throw n;if(t){(r=t._nonReactive.beforeLoadPromise)==null||r.resolve(),(s=t._nonReactive.loaderPromise)==null||s.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;const i=Ht(n)?"redirected":"notFound";t._nonReactive.error=n,e.updateMatch(t.id,a=>({...a,status:i,isFetching:!1,error:n})),Rt(n)&&!n.routeId&&(n.routeId=t.routeId),(o=t._nonReactive.loadPromise)==null||o.resolve()}throw Ht(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(fv(e,n),n)}},hv=(e,t)=>{const n=e.router.getMatch(t);return!!(!e.router.isServer&&n._nonReactive.dehydrated||e.router.isServer&&n.ssr===!1)},Xo=(e,t,n,r)=>{var a,l;const{id:s,routeId:o}=e.matches[t],i=e.router.looseRoutesById[o];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??(e.firstBadMatchIndex=t),mr(e,e.router.getMatch(s),n);try{(l=(a=i.options).onError)==null||l.call(a,n)}catch(u){n=u,mr(e,e.router.getMatch(s),n)}e.updateMatch(s,u=>{var d,c;return(d=u._nonReactive.beforeLoadPromise)==null||d.resolve(),u._nonReactive.beforeLoadPromise=void 0,(c=u._nonReactive.loadPromise)==null||c.resolve(),{...u,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}})},YC=(e,t,n,r)=>{var m;const s=e.router.getMatch(t),o=(m=e.matches[n-1])==null?void 0:m.id,i=o?e.router.getMatch(o):void 0;if(e.router.isShell()){s.ssr=r.id===Ct;return}if((i==null?void 0:i.ssr)===!1){s.ssr=!1;return}const a=p=>p===!0&&(i==null?void 0:i.ssr)==="data-only"?"data-only":p,l=e.router.options.defaultSsr??!0;if(r.options.ssr===void 0){s.ssr=a(l);return}if(typeof r.options.ssr!="function"){s.ssr=a(r.options.ssr);return}const{search:u,params:d}=s,c={search:qa(u,s.searchError),params:qa(d,s.paramsError),location:e.location,matches:e.matches.map(p=>({index:p.index,pathname:p.pathname,fullPath:p.fullPath,staticData:p.staticData,id:p.id,routeId:p.routeId,search:qa(p.search,p.searchError),params:qa(p.params,p.paramsError),ssr:p.ssr}))},f=r.options.ssr(c);if(Nr(f))return f.then(p=>{s.ssr=a(p??l)});s.ssr=a(f??l)},pv=(e,t,n,r)=>{var i;if(r._nonReactive.pendingTimeout!==void 0)return;const s=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!e.router.isServer&&!Ou(e,t)&&(n.options.loader||n.options.beforeLoad||yv(n))&&typeof s=="number"&&s!==1/0&&(n.options.pendingComponent??((i=e.router.options)==null?void 0:i.defaultPendingComponent)))){const a=setTimeout(()=>{xl(e)},s);r._nonReactive.pendingTimeout=a}},ZC=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;pv(e,t,n,r);const s=()=>{const o=e.router.getMatch(t);o.preload&&(o.status==="redirected"||o.status==="notFound")&&mr(e,o,o.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(s):s()},JC=(e,t,n,r)=>{var _;const s=e.router.getMatch(t),o=s._nonReactive.loadPromise;s._nonReactive.loadPromise=vo(()=>{o==null||o.resolve()});const{paramsError:i,searchError:a}=s;i&&Xo(e,n,i,"PARSE_PARAMS"),a&&Xo(e,n,a,"VALIDATE_SEARCH"),pv(e,t,r,s);const l=new AbortController,u=(_=e.matches[n-1])==null?void 0:_.id,d=u?e.router.getMatch(u):void 0;(d==null?void 0:d.context)??e.router.options.context;let c=!1;const f=()=>{c||(c=!0,e.updateMatch(t,b=>({...b,isFetching:"beforeLoad",fetchCount:b.fetchCount+1,abortController:l})))},m=()=>{var b;(b=s._nonReactive.beforeLoadPromise)==null||b.resolve(),s._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,C=>({...C,isFetching:!1}))};if(!r.options.beforeLoad){_i(()=>{f(),m()});return}s._nonReactive.beforeLoadPromise=vo();const p={...Th(e,n,!1),...s.__routeContext},{search:x,params:w,cause:g}=s,v=Ou(e,t),y={search:x,abortController:l,params:w,preload:v,context:p,location:e.location,navigate:b=>e.router.navigate({...b,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:v?"preload":g,matches:e.matches,...e.router.options.additionalContext},S=b=>{if(b===void 0){_i(()=>{f(),m()});return}(Ht(b)||Rt(b))&&(f(),Xo(e,n,b,"BEFORE_LOAD")),_i(()=>{f(),e.updateMatch(t,C=>({...C,__beforeLoadContext:b})),m()})};let E;try{if(E=r.options.beforeLoad(y),Nr(E))return f(),E.catch(b=>{Xo(e,n,b,"BEFORE_LOAD")}).then(S)}catch(b){f(),Xo(e,n,b,"BEFORE_LOAD")}S(E)},eN=(e,t)=>{const{id:n,routeId:r}=e.matches[t],s=e.router.looseRoutesById[r],o=()=>{if(e.router.isServer){const l=YC(e,n,t,s);if(Nr(l))return l.then(a)}return a()},i=()=>JC(e,n,t,s),a=()=>{if(hv(e,n))return;const l=ZC(e,n,s);return Nr(l)?l.then(i):i()};return o()},tN=(e,t,n)=>{var o,i,a,l,u,d;const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const s={matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([(i=(o=n.options).head)==null?void 0:i.call(o,s),(l=(a=n.options).scripts)==null?void 0:l.call(a,s),(d=(u=n.options).headers)==null?void 0:d.call(u,s)]).then(([c,f,m])=>{const p=c==null?void 0:c.meta,x=c==null?void 0:c.links,w=c==null?void 0:c.scripts,g=c==null?void 0:c.styles;return{meta:p,links:x,headScripts:w,headers:m,scripts:f,styles:g}})},mv=(e,t,n,r)=>{const s=e.matchPromises[n-1],{params:o,loaderDeps:i,abortController:a,cause:l}=e.router.getMatch(t),u=Th(e,n),d=Ou(e,t);return{params:o,deps:i,preload:!!d,parentMatchPromise:s,abortController:a,context:u,location:e.location,navigate:c=>e.router.navigate({...c,_fromLocation:e.location}),cause:d?"preload":l,route:r,...e.router.options.additionalContext}},Qm=async(e,t,n,r)=>{var s,o,i,a,l,u;try{const d=e.router.getMatch(t);try{(!e.router.isServer||d.ssr===!0)&&gv(r);const c=(o=(s=r.options).loader)==null?void 0:o.call(s,mv(e,t,n,r)),f=r.options.loader&&Nr(c);if(!!(f||r._lazyPromise||r._componentsPromise||r.options.head||r.options.scripts||r.options.headers||d._nonReactive.minPendingPromise)&&e.updateMatch(t,x=>({...x,isFetching:"loader"})),r.options.loader){const x=f?await c:c;mr(e,e.router.getMatch(t),x),x!==void 0&&e.updateMatch(t,w=>({...w,loaderData:x}))}r._lazyPromise&&await r._lazyPromise;const p=d._nonReactive.minPendingPromise;p&&await p,r._componentsPromise&&await r._componentsPromise,e.updateMatch(t,x=>({...x,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(c){let f=c;const m=d._nonReactive.minPendingPromise;m&&await m,Rt(c)&&await((a=(i=r.options.notFoundComponent)==null?void 0:i.preload)==null?void 0:a.call(i)),mr(e,e.router.getMatch(t),c);try{(u=(l=r.options).onError)==null||u.call(l,c)}catch(p){f=p,mr(e,e.router.getMatch(t),p)}e.updateMatch(t,p=>({...p,error:f,status:"error",isFetching:!1}))}}catch(d){const c=e.router.getMatch(t);c&&(c._nonReactive.loaderPromise=void 0),mr(e,c,d)}},nN=async(e,t)=>{var d,c;const{id:n,routeId:r}=e.matches[t];let s=!1,o=!1;const i=e.router.looseRoutesById[r],a=()=>{e.updateMatch(n,f=>({...f,context:Th(e,t)}))};if(hv(e,n)){if(e.router.isServer)return e.router.getMatch(n)}else{const f=e.router.getMatch(n);if(f._nonReactive.loaderPromise){if(f.status==="success"&&!e.sync&&!f.preload)return f;await f._nonReactive.loaderPromise;const m=e.router.getMatch(n),p=m._nonReactive.error||m.error;p&&mr(e,m,p)}else{const m=Date.now()-f.updatedAt,p=Ou(e,n),x=p?i.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:i.options.staleTime??e.router.options.defaultStaleTime??0,w=i.options.shouldReload,g=typeof w=="function"?w(mv(e,n,t,i)):w,v=!!p&&!e.router.state.matches.some(_=>_.id===n),y=e.router.getMatch(n);y._nonReactive.loaderPromise=vo(),v!==y.preload&&e.updateMatch(n,_=>({..._,preload:v}));const{status:S,invalid:E}=y;s=S==="success"&&(E||(g??m>x)),p&&i.options.preload===!1||(s&&!e.sync?(o=!0,(async()=>{var _,b;try{await Qm(e,n,t,i),a();const C=e.router.getMatch(n);(_=C._nonReactive.loaderPromise)==null||_.resolve(),(b=C._nonReactive.loadPromise)==null||b.resolve(),C._nonReactive.loaderPromise=void 0}catch(C){Ht(C)&&await e.router.navigate(C.options)}})()):(S!=="success"||s&&e.sync)&&await Qm(e,n,t,i))}}const l=e.router.getMatch(n);o||((d=l._nonReactive.loaderPromise)==null||d.resolve(),(c=l._nonReactive.loadPromise)==null||c.resolve()),clearTimeout(l._nonReactive.pendingTimeout),l._nonReactive.pendingTimeout=void 0,o||(l._nonReactive.loaderPromise=void 0),l._nonReactive.dehydrated=void 0,o||a();const u=o?l.isFetching:!1;return u!==l.isFetching||l.invalid!==!1?(e.updateMatch(n,f=>({...f,isFetching:u,invalid:!1})),e.router.getMatch(n)):l};async function Gm(e){const t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(n=>n._forcePending)&&xl(t);try{for(let a=0;a<t.matches.length;a++){const l=eN(t,a);Nr(l)&&await l}const n=t.firstBadMatchIndex??t.matches.length;for(let a=0;a<n;a++)t.matchPromises.push(nN(t,a));const s=(await Promise.allSettled(t.matchPromises)).filter(a=>a.status==="rejected").map(a=>a.reason);let o;for(const a of s){if(Ht(a))throw a;!o&&Rt(a)&&(o=a)}for(const a of t.matches){const{id:l,routeId:u}=a,d=t.router.looseRoutesById[u];try{const c=tN(t,l,d);if(c){const f=await c;t.updateMatch(l,m=>({...m,...f}))}}catch(c){console.error(`Error executing head for route ${u}:`,c)}}if(o)throw o;const i=xl(t);Nr(i)&&await i}catch(n){if(Rt(n)&&!t.preload){const r=xl(t);throw Nr(r)&&await r,n}if(Ht(n))throw n}return t.matches}async function gv(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{var r;const n=[];for(const s of xv){const o=(r=e.options[s])==null?void 0:r.preload;o&&n.push(o())}if(n.length)return Promise.all(n).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function qa(e,t){return t?{status:"error",error:t}:{status:"success",value:e}}function yv(e){var t;for(const n of xv)if((t=e.options[n])!=null&&t.preload)return!0;return!1}const xv=["component","errorComponent","pendingComponent","notFoundComponent"];function rN(e){return{input:({url:t})=>{for(const n of e)t=vv(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=wv(e[n],t);return t}}}function sN(e){const t=cv(e.basepath),n=`/${t}`,r=`${n}/`,s=e.caseSensitive?n:n.toLowerCase(),o=e.caseSensitive?r:r.toLowerCase();return{input:({url:i})=>{const a=e.caseSensitive?i.pathname:i.pathname.toLowerCase();return a===s?i.pathname="/":a.startsWith(o)&&(i.pathname=i.pathname.slice(n.length)),i},output:({url:i})=>(i.pathname=yl(["/",t,i.pathname]),i)}}function vv(e,t){var r;const n=(r=e==null?void 0:e.input)==null?void 0:r.call(e,{url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function wv(e,t){var r;const n=(r=e==null?void 0:e.output)==null?void 0:r.call(e,{url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function ss(e){const t=e.resolvedLocation,n=e.location,r=(t==null?void 0:t.pathname)!==n.pathname,s=(t==null?void 0:t.href)!==n.href,o=(t==null?void 0:t.hash)!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:r,hrefChanged:s,hashChanged:o}}class oN{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{var f;n.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const r=this.options,s=this.basepath??(r==null?void 0:r.basepath)??"/",o=this.basepath===void 0,i=r==null?void 0:r.rewrite;this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(m=>[encodeURIComponent(m),m])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=xC())),this.origin=this.options.origin,this.origin||(!this.isServer&&(window!=null&&window.origin)&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),!this.__store&&this.latestLocation&&(this.__store=new gC(aN(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(m=>!["redirected"].includes(m.status))}}}),HC(this));let a=!1;const l=this.options.basepath??"/",u=this.options.rewrite;if(o||s!==l||i!==u){this.basepath=l;const m=[];cv(l)!==""&&m.push(sN({basepath:l})),u&&m.push(u),this.rewrite=m.length===0?void 0:m.length===1?m[0]:rN(m),this.history&&this.updateLatestLocation(),a=!0}a&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<"u"&&"CSS"in window&&typeof((f=window.CSS)==null?void 0:f.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const{routesById:n,routesByPath:r,processedTree:s}=jC(this.routeTree,this.options.caseSensitive,(i,a)=>{i.init({originalIndex:a})});this.options.routeMasks&&CC(this.options.routeMasks,s),this.routesById=n,this.routesByPath=r,this.processedTree=s;const o=this.options.notFoundRoute;o&&(o.init({originalIndex:99999999999}),this.routesById[o.id]=o)},this.subscribe=(n,r)=>{const s={eventType:n,fn:r};return this.subscribers.add(s),()=>{this.subscribers.delete(s)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const s=({href:l,state:u})=>{const d=new URL(l,this.origin),c=vv(this.rewrite,d),f=this.options.parseSearch(c.search),m=this.options.stringifySearch(f);return c.search=m,{href:c.href.replace(c.origin,""),publicHref:l,url:c,pathname:qm(c.pathname),searchStr:m,search:Ot(r==null?void 0:r.search,f),hash:c.hash.split("#").reverse()[0]??"",state:Ot(r==null?void 0:r.state,u)}},o=s(n),{__tempLocation:i,__tempKey:a}=o.state;if(i&&(!a||a===this.tempLocationKey)){const l=s(i);return l.state.key=o.state.key,l.state.__TSR_key=o.state.__TSR_key,delete l.state.__tempLocation,{...l,maskedLocation:o}}return o},this.resolvePathCache=nu(1e3),this.resolvePathWithBase=(n,r)=>OC({base:n,to:Mh(r),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,s)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},s):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>lN({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const n=this.state.matches.filter(o=>o.status==="pending"),r=this.state.matches.filter(o=>o.isFetching==="loader");new Set([...this.state.pendingMatches??[],...n,...r]).forEach(o=>{this.cancelMatch(o.id)})},this.buildLocation=n=>{const r=(o={})=>{var M,P;const i=o._fromLocation||this.pendingBuiltLocation||this.latestLocation,a=this.matchRoutes(i,{_buildLocation:!0}),l=eu(a);o.from;const u=o.unsafeRelative==="path"?i.pathname:o.from??l.fullPath,d=this.resolvePathWithBase(u,"."),c=l.search,f={...l.params},m=o.to?this.resolvePathWithBase(d,`${o.to}`):this.resolvePathWithBase(d,"."),p=o.params===!1||o.params===null?{}:(o.params??!0)===!0?f:Object.assign(f,pr(o.params,f)),x=Ac({path:m,params:p}).interpolatedPath,w=this.matchRoutes(x,void 0,{_buildLocation:!0}).map(j=>this.looseRoutesById[j.routeId]);if(Object.keys(p).length>0)for(const j of w){const O=((M=j.options.params)==null?void 0:M.stringify)??j.options.stringifyParams;O&&Object.assign(p,O(p))}const g=n.leaveParams?m:qm(Ac({path:m,params:p,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath);let v=c;if(n._includeValidateSearch&&((P=this.options.search)!=null&&P.strict)){const j={};w.forEach(O=>{if(O.options.validateSearch)try{Object.assign(j,uf(O.options.validateSearch,{...j,...v}))}catch{}}),v=j}v=uN({search:v,dest:o,destRoutes:w,_includeValidateSearch:n._includeValidateSearch}),v=Ot(c,v);const y=this.options.stringifySearch(v),S=o.hash===!0?i.hash:o.hash?pr(o.hash,i.hash):void 0,E=S?`#${S}`:"";let _=o.state===!0?i.state:o.state?pr(o.state,i.state):{};_=Ot(i.state,_);const b=`${g}${y}${E}`,C=new URL(b,this.origin),L=wv(this.rewrite,C);return{publicHref:L.pathname+L.search+L.hash,href:b,url:L,pathname:g,search:v,searchStr:y,state:_,hash:S??"",unmaskOnReload:o.unmaskOnReload}},s=(o={},i)=>{const a=r(o);let l=i?r(i):void 0;if(!l){const u={};if(this.options.routeMasks){const d=NC(a.pathname,this.processedTree);if(d){Object.assign(u,d.params);const{from:c,params:f,...m}=d.route,p=f===!1||f===null?{}:(f??!0)===!0?u:Object.assign(u,pr(f,u));i={from:n.from,...m,params:p},l=r(i)}}}return l&&(a.maskedLocation=l),a};return n.mask?s(n,{from:n.from,...n.mask}):s(n)},this.commitLocation=({viewTransition:n,ignoreBlocker:r,...s})=>{const o=()=>{const l=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];l.forEach(d=>{s.state[d]=this.latestLocation.state[d]});const u=ns(s.state,this.latestLocation.state);return l.forEach(d=>{delete s.state[d]}),u},i=rs(this.latestLocation.href)===rs(s.href),a=this.commitLocationPromise;if(this.commitLocationPromise=vo(()=>{a==null||a.resolve()}),i&&o())this.load();else{let{maskedLocation:l,hashScrollIntoView:u,url:d,...c}=s;l&&(c={...l,state:{...l.state,__tempKey:void 0,__tempLocation:{...c,search:c.searchStr,state:{...c.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(c.unmaskOnReload??this.options.unmaskOnReload??!1)&&(c.state.__tempKey=this.tempLocationKey)),c.state.__hashScrollIntoViewOptions=u??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[s.replace?"replace":"push"](c.publicHref,c.state,{ignoreBlocker:r})}return this.resetNextScroll=s.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:s,viewTransition:o,ignoreBlocker:i,href:a,...l}={})=>{if(a){const c=this.history.location.state.__TSR_index,f=Jl(a,{__TSR_index:n?c:c+1});l.to=f.pathname,l.search=this.options.parseSearch(f.search),l.hash=f.hash.slice(1)}const u=this.buildLocation({...l,_includeValidateSearch:!0});this.pendingBuiltLocation=u;const d=this.commitLocation({...u,viewTransition:o,replace:n,resetScroll:r,hashScrollIntoView:s,ignoreBlocker:i});return Promise.resolve().then(()=>{this.pendingBuiltLocation===u&&(this.pendingBuiltLocation=void 0)}),d},this.navigate=async({to:n,reloadDocument:r,href:s,publicHref:o,...i})=>{var l;let a=!1;if(s)try{new URL(`${s}`),a=!0}catch{}if(a&&!r&&(r=!0),r){if(!s||!o&&!a){const d=this.buildLocation({to:n,...i});s=s??d.url.href,o=o??d.url.href}const u=!a&&o?o:s;if(!i.ignoreBlocker){const d=this.history,c=((l=d.getBlockers)==null?void 0:l.call(d))??[];for(const f of c)if(f!=null&&f.blockerFn&&await f.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return i.replace?window.location.replace(u):window.location.href=u,Promise.resolve()}return this.buildAndCommitLocation({...i,href:s,to:n,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){const r=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(this.latestLocation.publicHref!==r.publicHref||r.url.origin!==this.origin){const s=this.getParsedLocationHref(r);throw XC({href:s})}}const n=this.matchRoutes(this.latestLocation);this.__store.setState(r=>({...r,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:r.cachedMatches.filter(s=>!n.some(o=>o.id===s.id))}))},this.load=async n=>{let r,s,o;for(o=new Promise(a=>{this.startTransition(async()=>{var l;try{this.beforeLoad();const u=this.latestLocation,d=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...ss({resolvedLocation:d,location:u})}),this.emit({type:"onBeforeLoad",...ss({resolvedLocation:d,location:u})}),await Gm({router:this,sync:n==null?void 0:n.sync,matches:this.state.pendingMatches,location:u,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let c=[],f=[],m=[];_i(()=>{this.__store.setState(p=>{const x=p.matches,w=p.pendingMatches||p.matches;return c=x.filter(g=>!w.some(v=>v.id===g.id)),f=w.filter(g=>!x.some(v=>v.id===g.id)),m=w.filter(g=>x.some(v=>v.id===g.id)),{...p,isLoading:!1,loadedAt:Date.now(),matches:w,pendingMatches:void 0,cachedMatches:[...p.cachedMatches,...c.filter(g=>g.status!=="error"&&g.status!=="notFound")]}}),this.clearExpiredCache()}),[[c,"onLeave"],[f,"onEnter"],[m,"onStay"]].forEach(([p,x])=>{p.forEach(w=>{var g,v;(v=(g=this.looseRoutesById[w.routeId].options)[x])==null||v.call(g,w)})})})})}})}catch(u){Ht(u)?(r=u,this.isServer||this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):Rt(u)&&(s=u),this.__store.setState(d=>({...d,statusCode:r?r.status:s?404:d.matches.some(c=>c.status==="error")?500:200,redirect:r}))}this.latestLoadPromise===o&&((l=this.commitLocationPromise)==null||l.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),a()})}),this.latestLoadPromise=o,await o;this.latestLoadPromise&&o!==this.latestLoadPromise;)await this.latestLoadPromise;let i;this.hasNotFoundMatch()?i=404:this.__store.state.matches.some(a=>a.status==="error")&&(i=500),i!==void 0&&this.__store.setState(a=>({...a,statusCode:i}))},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let s;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const o=this.latestLocation,i=this.state.resolvedLocation,a=typeof r.types=="function"?r.types(ss({resolvedLocation:i,location:o})):r.types;if(a===!1){n();return}s={update:n,types:a}}else s=n;document.startViewTransition(s)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{var o;const s=(o=this.state.pendingMatches)!=null&&o.some(i=>i.id===n)?"pendingMatches":this.state.matches.some(i=>i.id===n)?"matches":this.state.cachedMatches.some(i=>i.id===n)?"cachedMatches":"";s&&this.__store.setState(i=>{var a;return{...i,[s]:(a=i[s])==null?void 0:a.map(l=>l.id===n?r(l):l)}})})},this.getMatch=n=>{var s;const r=o=>o.id===n;return this.state.cachedMatches.find(r)??((s=this.state.pendingMatches)==null?void 0:s.find(r))??this.state.matches.find(r)},this.invalidate=n=>{const r=s=>{var o;return((o=n==null?void 0:n.filter)==null?void 0:o.call(n,s))??!0?{...s,invalid:!0,...n!=null&&n.forcePending||s.status==="error"||s.status==="notFound"?{status:"pending",error:void 0}:void 0}:s};return this.__store.setState(s=>{var o;return{...s,matches:s.matches.map(r),cachedMatches:s.cachedMatches.map(r),pendingMatches:(o=s.pendingMatches)==null?void 0:o.map(r)}}),this.shouldViewTransition=!1,this.load({sync:n==null?void 0:n.sync})},this.getParsedLocationHref=n=>{let r=n.url.href;return this.origin&&n.url.origin===this.origin&&(r=r.replace(this.origin,"")||"/"),r},this.resolveRedirect=n=>{if(!n.options.href){const r=this.buildLocation(n.options),s=this.getParsedLocationHref(r);n.options.href=r.href,n.headers.set("Location",s)}return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n==null?void 0:n.filter;r!==void 0?this.__store.setState(s=>({...s,cachedMatches:s.cachedMatches.filter(o=>!r(o))})):this.__store.setState(s=>({...s,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=r=>{const s=this.looseRoutesById[r.routeId];if(!s.options.loader)return!0;const o=(r.preload?s.options.preloadGcTime??this.options.defaultPreloadGcTime:s.options.gcTime??this.options.defaultGcTime)??5*60*1e3;return r.status==="error"?!0:Date.now()-r.updatedAt>=o};this.clearCache({filter:n})},this.loadRouteChunk=gv,this.preloadRoute=async n=>{const r=this.buildLocation(n);let s=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const o=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(a=>a.id)),i=new Set([...o,...this.state.cachedMatches.map(a=>a.id)]);_i(()=>{s.forEach(a=>{i.has(a.id)||this.__store.setState(l=>({...l,cachedMatches:[...l.cachedMatches,a]}))})});try{return s=await Gm({router:this,matches:s,location:r,preload:!0,updateMatch:(a,l)=>{o.has(a)?s=s.map(u=>u.id===a?l(u):u):this.updateMatch(a,l)}}),s}catch(a){if(Ht(a))return a.options.reloadDocument?void 0:await this.preloadRoute({...a.options,_fromLocation:r});Rt(a)||console.error(a);return}},this.matchRoute=(n,r)=>{const s={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},o=this.buildLocation(s);if(r!=null&&r.pending&&this.state.status!=="pending")return!1;const a=((r==null?void 0:r.pending)===void 0?!this.state.isLoading:r.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,l=kC(o.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,a.pathname,this.processedTree);return!l||n.params&&!ns(l.params,n.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?ns(a.search,o.search,{partial:!0})?l.params:!1:l.params},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??qC,parseSearch:t.parseSearch??KC}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(t,n){const r=this.getMatchedRoutes(t.pathname),{foundRoute:s,routeParams:o}=r;let{matchedRoutes:i}=r,a=!1;(s?s.path!=="/"&&o["**"]:rs(t.pathname))&&(this.options.notFoundRoute?i=[...i,this.options.notFoundRoute]:a=!0);const l=(()=>{if(a){if(this.options.notFoundMode!=="root")for(let c=i.length-1;c>=0;c--){const f=i[c];if(f.children)return f.id}return Ct}})(),u=[],d=c=>(c==null?void 0:c.id)?c.context??this.options.context??void 0:this.options.context??void 0;return i.forEach((c,f)=>{var O,k,D;const m=u[f-1],[p,x,w]=(()=>{const I=(m==null?void 0:m.search)??t.search,F=(m==null?void 0:m._strictSearch)??void 0;try{const N=uf(c.options.validateSearch,{...I})??void 0;return[{...I,...N},{...F,...N},void 0]}catch(N){let T=N;if(N instanceof iu||(T=new iu(N.message,{cause:N})),n!=null&&n.throwOnError)throw T;return[I,{},T]}})(),g=((k=(O=c.options).loaderDeps)==null?void 0:k.call(O,{search:p}))??"",v=g?JSON.stringify(g):"",{interpolatedPath:y,usedParams:S}=Ac({path:c.fullPath,params:o,decodeCharMap:this.pathParamsDecodeCharMap}),E=c.id+y+v,_=this.getMatch(E),b=this.state.matches.find(I=>I.routeId===c.id),C=(_==null?void 0:_._strictParams)??S;let L;if(!_){const I=((D=c.options.params)==null?void 0:D.parse)??c.options.parseParams;if(I)try{Object.assign(C,I(C))}catch(F){if(Rt(F)||Ht(F)?L=F:L=new iN(F.message,{cause:F}),n!=null&&n.throwOnError)throw L}}Object.assign(o,C);const M=b?"stay":"enter";let P;if(_)P={..._,cause:M,params:b?Ot(b.params,o):o,_strictParams:C,search:Ot(b?b.search:_.search,p),_strictSearch:x};else{const I=c.options.loader||c.options.beforeLoad||c.lazyFn||yv(c)?"pending":"success";P={id:E,ssr:this.isServer?void 0:c.options.ssr,index:f,routeId:c.id,params:b?Ot(b.params,o):o,_strictParams:C,pathname:y,updatedAt:Date.now(),search:b?Ot(b.search,p):p,_strictSearch:x,searchError:void 0,status:I,isFetching:!1,error:void 0,paramsError:L,__routeContext:void 0,_nonReactive:{loadPromise:vo()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:M,loaderDeps:b?Ot(b.loaderDeps,g):g,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:c.options.staticData||{},fullPath:c.fullPath}}n!=null&&n.preload||(P.globalNotFound=l===c.id),P.searchError=w;const j=d(m);P.context={...j,...P.__routeContext,...P.__beforeLoadContext},u.push(P)}),u.forEach((c,f)=>{const m=this.looseRoutesById[c.routeId];if(!this.getMatch(c.id)&&(n==null?void 0:n._buildLocation)!==!0){const x=u[f-1],w=d(x);if(m.options.context){const g={deps:c.loaderDeps,params:c.params,context:w??{},location:t,navigate:v=>this.navigate({...v,_fromLocation:t}),buildLocation:this.buildLocation,cause:c.cause,abortController:c.abortController,preload:!!c.preload,matches:u};c.__routeContext=m.options.context(g)??void 0}c.context={...w,...c.__routeContext,...c.__beforeLoadContext}}}),u}}class iu extends Error{}class iN extends Error{}function aN(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function uf(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new iu("Async validation not supported");if(n.issues)throw new iu(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function lN({pathname:e,routesById:t,processedTree:n}){const r={},s=rs(e);let o;const i=PC(s,n,!0);return i&&(o=i.route,Object.assign(r,i.params)),{matchedRoutes:(i==null?void 0:i.branch)||[t[Ct]],routeParams:r,foundRoute:o}}function uN({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){const s=n.reduce((a,l)=>{var d;const u=[];if("search"in l.options)(d=l.options.search)!=null&&d.middlewares&&u.push(...l.options.search.middlewares);else if(l.options.preSearchFilters||l.options.postSearchFilters){const c=({search:f,next:m})=>{let p=f;"preSearchFilters"in l.options&&l.options.preSearchFilters&&(p=l.options.preSearchFilters.reduce((w,g)=>g(w),f));const x=m(p);return"postSearchFilters"in l.options&&l.options.postSearchFilters?l.options.postSearchFilters.reduce((w,g)=>g(w),x):x};u.push(c)}if(r&&l.options.validateSearch){const c=({search:f,next:m})=>{const p=m(f);try{return{...p,...uf(l.options.validateSearch,p)??void 0}}catch{return p}};u.push(c)}return a.concat(u)},[])??[],o=({search:a})=>t.search?t.search===!0?a:pr(t.search,a):{};s.push(o);const i=(a,l)=>{if(a>=s.length)return l;const u=s[a];return u({search:l,next:c=>i(a+1,c)})};return i(0,e)}const cN="Error preloading route! ☝️";class Sv{constructor(t){if(this.init=n=>{var u,d;this.originalIndex=n.originalIndex;const r=this.options,s=!(r!=null&&r.path)&&!(r!=null&&r.id);this.parentRoute=(d=(u=this.options).getParentRoute)==null?void 0:d.call(u),s?this._path=Ct:this.parentRoute||Bn(!1);let o=s?Ct:r==null?void 0:r.path;o&&o!=="/"&&(o=uv(o));const i=(r==null?void 0:r.id)||o;let a=s?Ct:yl([this.parentRoute.id===Ct?"":this.parentRoute.id,i]);o===Ct&&(o="/"),a!==Ct&&(a=yl(["/",a]));const l=a===Ct?"/":yl([this.parentRoute.fullPath,o]);this._path=o,this._id=a,this._fullPath=l,this._to=l},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.options=t||{},this.isRoot=!(t!=null&&t.getParentRoute),t!=null&&t.id&&(t!=null&&t.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class dN extends Sv{constructor(t){super(t)}}function Lh(e){const t=e.errorComponent??Fu;return h.jsx(fN,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?R.createElement(t,{error:n,reset:r}):e.children})}class fN extends R.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function Fu({error:e}){const[t,n]=R.useState(!1);return h.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[h.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[h.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),h.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),h.jsx("div",{style:{height:".25rem"}}),t?h.jsx("div",{children:h.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?h.jsx("code",{children:e.message}):null})}):null]})}function hN({children:e,fallback:t=null}){return pN()?h.jsx(ls.Fragment,{children:e}):h.jsx(ls.Fragment,{children:t})}function pN(){return ls.useSyncExternalStore(mN,()=>!0,()=>!1)}function mN(){return()=>{}}var _v={exports:{}},bv={},Ev={exports:{}},Cv={};/**
|
|
40
|
+
`+o.stack}return{value:e,source:t,stack:s,digest:null}}function kc(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Td(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var sE=typeof WeakMap=="function"?WeakMap:Map;function wx(e,t,n){n=On(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ql||(ql=!0,Hd=r),Td(e,t)},n}function Sx(e,t,n){n=On(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){Td(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Td(e,t),typeof r!="function"&&(Sr===null?Sr=new Set([this]):Sr.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function cm(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new sE;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=xE.bind(null,e,t,n),t.then(e,e))}function dm(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function fm(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=On(-1,1),t.tag=2,wr(n,t,1))),n.lanes|=1),e)}var oE=Un.ReactCurrentOwner,gt=!1;function it(e,t,n,r){t.child=e===null?X0(t,null,n,r):mo(t,e.child,n,r)}function hm(e,t,n,r,s){n=n.render;var o=t.ref;return qs(t,s),r=lh(e,t,n,r,o,s),n=uh(),e!==null&&!gt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,$n(e,t,s)):(_e&&n&&Xf(t),t.flags|=1,it(e,t,r,s),t.child)}function pm(e,t,n,r,s){if(e===null){var o=n.type;return typeof o=="function"&&!vh(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,_x(e,t,o,r,s)):(e=gl(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&s)){var i=o.memoizedProps;if(n=n.compare,n=n!==null?n:Ti,n(i,r)&&e.ref===t.ref)return $n(e,t,s)}return t.flags|=1,e=br(o,r),e.ref=t.ref,e.return=t,t.child=e}function _x(e,t,n,r,s){if(e!==null){var o=e.memoizedProps;if(Ti(o,r)&&e.ref===t.ref)if(gt=!1,t.pendingProps=r=o,(e.lanes&s)!==0)e.flags&131072&&(gt=!0);else return t.lanes=e.lanes,$n(e,t,s)}return Ld(e,t,n,r,s)}function bx(e,t,n){var r=t.pendingProps,s=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},xe(zs,Et),Et|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,xe(zs,Et),Et|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,xe(zs,Et),Et|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,xe(zs,Et),Et|=r;return it(e,t,s,n),t.child}function Ex(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ld(e,t,n,r,s){var o=vt(n)?us:rt.current;return o=ho(t,o),qs(t,s),n=lh(e,t,n,r,o,s),r=uh(),e!==null&&!gt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,$n(e,t,s)):(_e&&r&&Xf(t),t.flags|=1,it(e,t,n,s),t.child)}function mm(e,t,n,r,s){if(vt(n)){var o=!0;Fl(t)}else o=!1;if(qs(t,s),t.stateNode===null)hl(e,t),vx(t,n,r),Md(t,n,r,s),r=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var l=i.context,u=n.contextType;typeof u=="object"&&u!==null?u=Vt(u):(u=vt(n)?us:rt.current,u=ho(t,u));var d=n.getDerivedStateFromProps,c=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function";c||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==r||l!==u)&&um(t,i,r,u),er=!1;var f=t.memoizedState;i.state=f,Hl(t,r,i,s),l=t.memoizedState,a!==r||f!==l||xt.current||er?(typeof d=="function"&&(jd(t,n,d,r),l=t.memoizedState),(a=er||lm(t,n,a,r,f,l,u))?(c||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),i.props=r,i.state=l,i.context=u,r=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Z0(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:qt(t.type,a),i.props=u,c=t.pendingProps,f=i.context,l=n.contextType,typeof l=="object"&&l!==null?l=Vt(l):(l=vt(n)?us:rt.current,l=ho(t,l));var m=n.getDerivedStateFromProps;(d=typeof m=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==c||f!==l)&&um(t,i,r,l),er=!1,f=t.memoizedState,i.state=f,Hl(t,r,i,s);var p=t.memoizedState;a!==c||f!==p||xt.current||er?(typeof m=="function"&&(jd(t,n,m,r),p=t.memoizedState),(u=er||lm(t,n,u,r,f,p,l)||!1)?(d||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,p,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,p,l)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),i.props=r,i.state=p,i.context=l,r=u):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Id(e,t,n,r,o,s)}function Id(e,t,n,r,s,o){Ex(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return s&&em(t,n,!1),$n(e,t,o);r=t.stateNode,oE.current=t;var a=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=mo(t,e.child,null,o),t.child=mo(t,null,a,o)):it(e,t,a,o),t.memoizedState=r.state,s&&em(t,n,!0),t.child}function Cx(e){var t=e.stateNode;t.pendingContext?Jp(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Jp(e,t.context,!1),sh(e,t.containerInfo)}function gm(e,t,n,r,s){return po(),Zf(s),t.flags|=256,it(e,t,n,r),t.child}var Ad={dehydrated:null,treeContext:null,retryLane:0};function Od(e){return{baseLanes:e,cachePool:null,transitions:null}}function Nx(e,t,n){var r=t.pendingProps,s=Ne.current,o=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),xe(Ne,s&1),e===null)return Pd(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=r.children,e=r.fallback,o?(r=t.mode,o=t.child,i={mode:"hidden",children:i},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=ju(i,r,0,null),e=ts(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Od(n),t.memoizedState=Ad,e):fh(t,i));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return iE(e,t,i,r,a,s,n);if(o){o=r.fallback,i=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:r.children};return!(i&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=br(s,l),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?o=br(a,o):(o=ts(o,i,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,i=e.child.memoizedState,i=i===null?Od(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~n,t.memoizedState=Ad,r}return o=e.child,e=o.sibling,r=br(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function fh(e,t){return t=ju({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function $a(e,t,n,r){return r!==null&&Zf(r),mo(t,e.child,null,n),e=fh(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function iE(e,t,n,r,s,o,i){if(n)return t.flags&256?(t.flags&=-257,r=kc(Error(U(422))),$a(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,s=t.mode,r=ju({mode:"visible",children:r.children},s,0,null),o=ts(o,s,i,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&mo(t,e.child,null,i),t.child.memoizedState=Od(i),t.memoizedState=Ad,o);if(!(t.mode&1))return $a(e,t,i,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error(U(419)),r=kc(o,r,void 0),$a(e,t,i,r)}if(a=(i&e.childLanes)!==0,gt||a){if(r=Ve,r!==null){switch(i&-i){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|i)?0:s,s!==0&&s!==o.retryLane&&(o.retryLane=s,zn(e,s),rn(r,e,s,-1))}return xh(),r=kc(Error(U(421))),$a(e,t,i,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=vE.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,kt=vr(s.nextSibling),Pt=t,_e=!0,Zt=null,e!==null&&(zt[$t++]=Ln,zt[$t++]=In,zt[$t++]=cs,Ln=e.id,In=e.overflow,cs=t),t=fh(t,r.children),t.flags|=4096,t)}function ym(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Rd(e.return,t,n)}function Pc(e,t,n,r,s){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=s)}function kx(e,t,n){var r=t.pendingProps,s=r.revealOrder,o=r.tail;if(it(e,t,r.children,n),r=Ne.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ym(e,n,t);else if(e.tag===19)ym(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(xe(Ne,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Ul(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Pc(t,!1,s,n,o);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Ul(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Pc(t,!0,n,null,o);break;case"together":Pc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function hl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function $n(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),fs|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(U(153));if(t.child!==null){for(e=t.child,n=br(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=br(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function aE(e,t,n){switch(t.tag){case 3:Cx(t),po();break;case 5:J0(t);break;case 1:vt(t.type)&&Fl(t);break;case 4:sh(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;xe($l,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(xe(Ne,Ne.current&1),t.flags|=128,null):n&t.child.childLanes?Nx(e,t,n):(xe(Ne,Ne.current&1),e=$n(e,t,n),e!==null?e.sibling:null);xe(Ne,Ne.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return kx(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),xe(Ne,Ne.current),r)break;return null;case 22:case 23:return t.lanes=0,bx(e,t,n)}return $n(e,t,n)}var Px,Fd,Rx,jx;Px=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&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;n=n.return}n.sibling.return=n.return,n=n.sibling}};Fd=function(){};Rx=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,$r(vn.current);var o=null;switch(n){case"input":s=od(e,s),r=od(e,r),o=[];break;case"select":s=Re({},s,{value:void 0}),r=Re({},r,{value:void 0}),o=[];break;case"textarea":s=ld(e,s),r=ld(e,r),o=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Al)}cd(n,r);var i;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(i in a)a.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Ci.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var l=r[u];if(a=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(i in a)!a.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in l)l.hasOwnProperty(i)&&a[i]!==l[i]&&(n||(n={}),n[i]=l[i])}else n||(o||(o=[]),o.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(o=o||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Ci.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&we("scroll",e),o||a===l||(o=[])):(o=o||[]).push(u,l))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};jx=function(e,t,n,r){n!==r&&(t.flags|=4)};function qo(e,t){if(!_e)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Je(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function lE(e,t,n){var r=t.pendingProps;switch(Yf(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Je(t),null;case 1:return vt(t.type)&&Ol(),Je(t),null;case 3:return r=t.stateNode,go(),Se(xt),Se(rt),ih(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Da(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Zt!==null&&(Wd(Zt),Zt=null))),Fd(e,t),Je(t),null;case 5:oh(t);var s=$r(Fi.current);if(n=t.type,e!==null&&t.stateNode!=null)Rx(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(U(166));return Je(t),null}if(e=$r(vn.current),Da(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[yn]=t,r[Ai]=o,e=(t.mode&1)!==0,n){case"dialog":we("cancel",r),we("close",r);break;case"iframe":case"object":case"embed":we("load",r);break;case"video":case"audio":for(s=0;s<ai.length;s++)we(ai[s],r);break;case"source":we("error",r);break;case"img":case"image":case"link":we("error",r),we("load",r);break;case"details":we("toggle",r);break;case"input":Np(r,o),we("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},we("invalid",r);break;case"textarea":Pp(r,o),we("invalid",r)}cd(n,o),s=null;for(var i in o)if(o.hasOwnProperty(i)){var a=o[i];i==="children"?typeof a=="string"?r.textContent!==a&&(o.suppressHydrationWarning!==!0&&Fa(r.textContent,a,e),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&Fa(r.textContent,a,e),s=["children",""+a]):Ci.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&we("scroll",r)}switch(n){case"input":Ra(r),kp(r,o,!0);break;case"textarea":Ra(r),Rp(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=Al)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=s0(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[yn]=t,e[Ai]=r,Px(e,t,!1,!1),t.stateNode=e;e:{switch(i=dd(n,r),n){case"dialog":we("cancel",e),we("close",e),s=r;break;case"iframe":case"object":case"embed":we("load",e),s=r;break;case"video":case"audio":for(s=0;s<ai.length;s++)we(ai[s],e);s=r;break;case"source":we("error",e),s=r;break;case"img":case"image":case"link":we("error",e),we("load",e),s=r;break;case"details":we("toggle",e),s=r;break;case"input":Np(e,r),s=od(e,r),we("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=Re({},r,{value:void 0}),we("invalid",e);break;case"textarea":Pp(e,r),s=ld(e,r),we("invalid",e);break;default:s=r}cd(n,s),a=s;for(o in a)if(a.hasOwnProperty(o)){var l=a[o];o==="style"?a0(e,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&o0(e,l)):o==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Ni(e,l):typeof l=="number"&&Ni(e,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Ci.hasOwnProperty(o)?l!=null&&o==="onScroll"&&we("scroll",e):l!=null&&Of(e,o,l,i))}switch(n){case"input":Ra(e),kp(e,r,!1);break;case"textarea":Ra(e),Rp(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Pr(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?Us(e,!!r.multiple,o,!1):r.defaultValue!=null&&Us(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Al)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Je(t),null;case 6:if(e&&t.stateNode!=null)jx(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(U(166));if(n=$r(Fi.current),$r(vn.current),Da(t)){if(r=t.stateNode,n=t.memoizedProps,r[yn]=t,(o=r.nodeValue!==n)&&(e=Pt,e!==null))switch(e.tag){case 3:Fa(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Fa(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[yn]=t,t.stateNode=r}return Je(t),null;case 13:if(Se(Ne),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(_e&&kt!==null&&t.mode&1&&!(t.flags&128))Q0(),po(),t.flags|=98560,o=!1;else if(o=Da(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(U(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(U(317));o[yn]=t}else po(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Je(t),o=!1}else Zt!==null&&(Wd(Zt),Zt=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Ne.current&1?De===0&&(De=3):xh())),t.updateQueue!==null&&(t.flags|=4),Je(t),null);case 4:return go(),Fd(e,t),e===null&&Li(t.stateNode.containerInfo),Je(t),null;case 10:return th(t.type._context),Je(t),null;case 17:return vt(t.type)&&Ol(),Je(t),null;case 19:if(Se(Ne),o=t.memoizedState,o===null)return Je(t),null;if(r=(t.flags&128)!==0,i=o.rendering,i===null)if(r)qo(o,!1);else{if(De!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Ul(e),i!==null){for(t.flags|=128,qo(o,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,i=o.alternate,i===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,o.type=i.type,e=i.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return xe(Ne,Ne.current&1|2),t.child}e=e.sibling}o.tail!==null&&Ie()>xo&&(t.flags|=128,r=!0,qo(o,!1),t.lanes=4194304)}else{if(!r)if(e=Ul(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),qo(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!_e)return Je(t),null}else 2*Ie()-o.renderingStartTime>xo&&n!==1073741824&&(t.flags|=128,r=!0,qo(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ie(),t.sibling=null,n=Ne.current,xe(Ne,r?n&1|2:n&1),t):(Je(t),null);case 22:case 23:return yh(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Et&1073741824&&(Je(t),t.subtreeFlags&6&&(t.flags|=8192)):Je(t),null;case 24:return null;case 25:return null}throw Error(U(156,t.tag))}function uE(e,t){switch(Yf(t),t.tag){case 1:return vt(t.type)&&Ol(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return go(),Se(xt),Se(rt),ih(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return oh(t),null;case 13:if(Se(Ne),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(U(340));po()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Se(Ne),null;case 4:return go(),null;case 10:return th(t.type._context),null;case 22:case 23:return yh(),null;case 24:return null;default:return null}}var Ba=!1,et=!1,cE=typeof WeakSet=="function"?WeakSet:Set,G=null;function Ds(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Me(e,t,r)}else n.current=null}function Dd(e,t,n){try{n()}catch(r){Me(e,t,r)}}var xm=!1;function dE(e,t){if(Sd=Tl,e=A0(),Gf(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,a=-1,l=-1,u=0,d=0,c=e,f=null;t:for(;;){for(var m;c!==n||s!==0&&c.nodeType!==3||(a=i+s),c!==o||r!==0&&c.nodeType!==3||(l=i+r),c.nodeType===3&&(i+=c.nodeValue.length),(m=c.firstChild)!==null;)f=c,c=m;for(;;){if(c===e)break t;if(f===n&&++u===s&&(a=i),f===o&&++d===r&&(l=i),(m=c.nextSibling)!==null)break;c=f,f=c.parentNode}c=m}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(_d={focusedElem:e,selectionRange:n},Tl=!1,G=t;G!==null;)if(t=G,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,G=e;else for(;G!==null;){t=G;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var x=p.memoizedProps,w=p.memoizedState,g=t.stateNode,v=g.getSnapshotBeforeUpdate(t.elementType===t.type?x:qt(t.type,x),w);g.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(U(163))}}catch(S){Me(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,G=e;break}G=t.return}return p=xm,xm=!1,p}function xi(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var o=s.destroy;s.destroy=void 0,o!==void 0&&Dd(t,n,o)}s=s.next}while(s!==r)}}function Pu(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function zd(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Mx(e){var t=e.alternate;t!==null&&(e.alternate=null,Mx(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[yn],delete t[Ai],delete t[Cd],delete t[qb],delete t[Qb])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Tx(e){return e.tag===5||e.tag===3||e.tag===4}function vm(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Tx(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function $d(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Al));else if(r!==4&&(e=e.child,e!==null))for($d(e,t,n),e=e.sibling;e!==null;)$d(e,t,n),e=e.sibling}function Bd(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Bd(e,t,n),e=e.sibling;e!==null;)Bd(e,t,n),e=e.sibling}var We=null,Xt=!1;function qn(e,t,n){for(n=n.child;n!==null;)Lx(e,t,n),n=n.sibling}function Lx(e,t,n){if(xn&&typeof xn.onCommitFiberUnmount=="function")try{xn.onCommitFiberUnmount(wu,n)}catch{}switch(n.tag){case 5:et||Ds(n,t);case 6:var r=We,s=Xt;We=null,qn(e,t,n),We=r,Xt=s,We!==null&&(Xt?(e=We,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):We.removeChild(n.stateNode));break;case 18:We!==null&&(Xt?(e=We,n=n.stateNode,e.nodeType===8?Sc(e.parentNode,n):e.nodeType===1&&Sc(e,n),ji(e)):Sc(We,n.stateNode));break;case 4:r=We,s=Xt,We=n.stateNode.containerInfo,Xt=!0,qn(e,t,n),We=r,Xt=s;break;case 0:case 11:case 14:case 15:if(!et&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var o=s,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&Dd(n,t,i),s=s.next}while(s!==r)}qn(e,t,n);break;case 1:if(!et&&(Ds(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Me(n,t,a)}qn(e,t,n);break;case 21:qn(e,t,n);break;case 22:n.mode&1?(et=(r=et)||n.memoizedState!==null,qn(e,t,n),et=r):qn(e,t,n);break;default:qn(e,t,n)}}function wm(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new cE),t.forEach(function(r){var s=wE.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Kt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var o=e,i=t,a=i;e:for(;a!==null;){switch(a.tag){case 5:We=a.stateNode,Xt=!1;break e;case 3:We=a.stateNode.containerInfo,Xt=!0;break e;case 4:We=a.stateNode.containerInfo,Xt=!0;break e}a=a.return}if(We===null)throw Error(U(160));Lx(o,i,s),We=null,Xt=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(u){Me(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Ix(t,e),t=t.sibling}function Ix(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Kt(t,e),cn(e),r&4){try{xi(3,e,e.return),Pu(3,e)}catch(x){Me(e,e.return,x)}try{xi(5,e,e.return)}catch(x){Me(e,e.return,x)}}break;case 1:Kt(t,e),cn(e),r&512&&n!==null&&Ds(n,n.return);break;case 5:if(Kt(t,e),cn(e),r&512&&n!==null&&Ds(n,n.return),e.flags&32){var s=e.stateNode;try{Ni(s,"")}catch(x){Me(e,e.return,x)}}if(r&4&&(s=e.stateNode,s!=null)){var o=e.memoizedProps,i=n!==null?n.memoizedProps:o,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&o.type==="radio"&&o.name!=null&&n0(s,o),dd(a,i);var u=dd(a,o);for(i=0;i<l.length;i+=2){var d=l[i],c=l[i+1];d==="style"?a0(s,c):d==="dangerouslySetInnerHTML"?o0(s,c):d==="children"?Ni(s,c):Of(s,d,c,u)}switch(a){case"input":id(s,o);break;case"textarea":r0(s,o);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var m=o.value;m!=null?Us(s,!!o.multiple,m,!1):f!==!!o.multiple&&(o.defaultValue!=null?Us(s,!!o.multiple,o.defaultValue,!0):Us(s,!!o.multiple,o.multiple?[]:"",!1))}s[Ai]=o}catch(x){Me(e,e.return,x)}}break;case 6:if(Kt(t,e),cn(e),r&4){if(e.stateNode===null)throw Error(U(162));s=e.stateNode,o=e.memoizedProps;try{s.nodeValue=o}catch(x){Me(e,e.return,x)}}break;case 3:if(Kt(t,e),cn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ji(t.containerInfo)}catch(x){Me(e,e.return,x)}break;case 4:Kt(t,e),cn(e);break;case 13:Kt(t,e),cn(e),s=e.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||(mh=Ie())),r&4&&wm(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(et=(u=et)||d,Kt(t,e),et=u):Kt(t,e),cn(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(G=e,d=e.child;d!==null;){for(c=G=d;G!==null;){switch(f=G,m=f.child,f.tag){case 0:case 11:case 14:case 15:xi(4,f,f.return);break;case 1:Ds(f,f.return);var p=f.stateNode;if(typeof p.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,p.props=t.memoizedProps,p.state=t.memoizedState,p.componentWillUnmount()}catch(x){Me(r,n,x)}}break;case 5:Ds(f,f.return);break;case 22:if(f.memoizedState!==null){_m(c);continue}}m!==null?(m.return=f,G=m):_m(c)}d=d.sibling}e:for(d=null,c=e;;){if(c.tag===5){if(d===null){d=c;try{s=c.stateNode,u?(o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(a=c.stateNode,l=c.memoizedProps.style,i=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=i0("display",i))}catch(x){Me(e,e.return,x)}}}else if(c.tag===6){if(d===null)try{c.stateNode.nodeValue=u?"":c.memoizedProps}catch(x){Me(e,e.return,x)}}else if((c.tag!==22&&c.tag!==23||c.memoizedState===null||c===e)&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===e)break e;for(;c.sibling===null;){if(c.return===null||c.return===e)break e;d===c&&(d=null),c=c.return}d===c&&(d=null),c.sibling.return=c.return,c=c.sibling}}break;case 19:Kt(t,e),cn(e),r&4&&wm(e);break;case 21:break;default:Kt(t,e),cn(e)}}function cn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Tx(n)){var r=n;break e}n=n.return}throw Error(U(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Ni(s,""),r.flags&=-33);var o=vm(e);Bd(e,o,s);break;case 3:case 4:var i=r.stateNode.containerInfo,a=vm(e);$d(e,a,i);break;default:throw Error(U(161))}}catch(l){Me(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function fE(e,t,n){G=e,Ax(e)}function Ax(e,t,n){for(var r=(e.mode&1)!==0;G!==null;){var s=G,o=s.child;if(s.tag===22&&r){var i=s.memoizedState!==null||Ba;if(!i){var a=s.alternate,l=a!==null&&a.memoizedState!==null||et;a=Ba;var u=et;if(Ba=i,(et=l)&&!u)for(G=s;G!==null;)i=G,l=i.child,i.tag===22&&i.memoizedState!==null?bm(s):l!==null?(l.return=i,G=l):bm(s);for(;o!==null;)G=o,Ax(o),o=o.sibling;G=s,Ba=a,et=u}Sm(e)}else s.subtreeFlags&8772&&o!==null?(o.return=s,G=o):Sm(e)}}function Sm(e){for(;G!==null;){var t=G;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:et||Pu(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!et)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:qt(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&om(t,o,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}om(t,i,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var c=d.dehydrated;c!==null&&ji(c)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(U(163))}et||t.flags&512&&zd(t)}catch(f){Me(t,t.return,f)}}if(t===e){G=null;break}if(n=t.sibling,n!==null){n.return=t.return,G=n;break}G=t.return}}function _m(e){for(;G!==null;){var t=G;if(t===e){G=null;break}var n=t.sibling;if(n!==null){n.return=t.return,G=n;break}G=t.return}}function bm(e){for(;G!==null;){var t=G;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Pu(4,t)}catch(l){Me(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(l){Me(t,s,l)}}var o=t.return;try{zd(t)}catch(l){Me(t,o,l)}break;case 5:var i=t.return;try{zd(t)}catch(l){Me(t,i,l)}}}catch(l){Me(t,t.return,l)}if(t===e){G=null;break}var a=t.sibling;if(a!==null){a.return=t.return,G=a;break}G=t.return}}var hE=Math.ceil,Kl=Un.ReactCurrentDispatcher,hh=Un.ReactCurrentOwner,Ut=Un.ReactCurrentBatchConfig,pe=0,Ve=null,Ae=null,Ge=0,Et=0,zs=Mr(0),De=0,Bi=null,fs=0,Ru=0,ph=0,vi=null,pt=null,mh=0,xo=1/0,Rn=null,ql=!1,Hd=null,Sr=null,Ha=!1,hr=null,Ql=0,wi=0,Ud=null,pl=-1,ml=0;function at(){return pe&6?Ie():pl!==-1?pl:pl=Ie()}function _r(e){return e.mode&1?pe&2&&Ge!==0?Ge&-Ge:Xb.transition!==null?(ml===0&&(ml=v0()),ml):(e=ge,e!==0||(e=window.event,e=e===void 0?16:N0(e.type)),e):1}function rn(e,t,n,r){if(50<wi)throw wi=0,Ud=null,Error(U(185));la(e,n,r),(!(pe&2)||e!==Ve)&&(e===Ve&&(!(pe&2)&&(Ru|=n),De===4&&nr(e,Ge)),wt(e,r),n===1&&pe===0&&!(t.mode&1)&&(xo=Ie()+500,Cu&&Tr()))}function wt(e,t){var n=e.callbackNode;X_(e,t);var r=Ml(e,e===Ve?Ge:0);if(r===0)n!==null&&Tp(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Tp(n),t===1)e.tag===0?Gb(Em.bind(null,e)):W0(Em.bind(null,e)),Wb(function(){!(pe&6)&&Tr()}),n=null;else{switch(w0(r)){case 1:n=Bf;break;case 4:n=y0;break;case 16:n=jl;break;case 536870912:n=x0;break;default:n=jl}n=Ux(n,Ox.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Ox(e,t){if(pl=-1,ml=0,pe&6)throw Error(U(327));var n=e.callbackNode;if(Qs()&&e.callbackNode!==n)return null;var r=Ml(e,e===Ve?Ge:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Gl(e,r);else{t=r;var s=pe;pe|=2;var o=Dx();(Ve!==e||Ge!==t)&&(Rn=null,xo=Ie()+500,es(e,t));do try{gE();break}catch(a){Fx(e,a)}while(!0);eh(),Kl.current=o,pe=s,Ae!==null?t=0:(Ve=null,Ge=0,t=De)}if(t!==0){if(t===2&&(s=gd(e),s!==0&&(r=s,t=Vd(e,s))),t===1)throw n=Bi,es(e,0),nr(e,r),wt(e,Ie()),n;if(t===6)nr(e,r);else{if(s=e.current.alternate,!(r&30)&&!pE(s)&&(t=Gl(e,r),t===2&&(o=gd(e),o!==0&&(r=o,t=Vd(e,o))),t===1))throw n=Bi,es(e,0),nr(e,r),wt(e,Ie()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(U(345));case 2:Ir(e,pt,Rn);break;case 3:if(nr(e,r),(r&130023424)===r&&(t=mh+500-Ie(),10<t)){if(Ml(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){at(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Ed(Ir.bind(null,e,pt,Rn),t);break}Ir(e,pt,Rn);break;case 4:if(nr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var i=31-nn(r);o=1<<i,i=t[i],i>s&&(s=i),r&=~o}if(r=s,r=Ie()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*hE(r/1960))-r,10<r){e.timeoutHandle=Ed(Ir.bind(null,e,pt,Rn),r);break}Ir(e,pt,Rn);break;case 5:Ir(e,pt,Rn);break;default:throw Error(U(329))}}}return wt(e,Ie()),e.callbackNode===n?Ox.bind(null,e):null}function Vd(e,t){var n=vi;return e.current.memoizedState.isDehydrated&&(es(e,t).flags|=256),e=Gl(e,t),e!==2&&(t=pt,pt=n,t!==null&&Wd(t)),e}function Wd(e){pt===null?pt=e:pt.push.apply(pt,e)}function pE(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],o=s.getSnapshot;s=s.value;try{if(!on(o(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function nr(e,t){for(t&=~ph,t&=~Ru,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-nn(t),r=1<<n;e[n]=-1,t&=~r}}function Em(e){if(pe&6)throw Error(U(327));Qs();var t=Ml(e,0);if(!(t&1))return wt(e,Ie()),null;var n=Gl(e,t);if(e.tag!==0&&n===2){var r=gd(e);r!==0&&(t=r,n=Vd(e,r))}if(n===1)throw n=Bi,es(e,0),nr(e,t),wt(e,Ie()),n;if(n===6)throw Error(U(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ir(e,pt,Rn),wt(e,Ie()),null}function gh(e,t){var n=pe;pe|=1;try{return e(t)}finally{pe=n,pe===0&&(xo=Ie()+500,Cu&&Tr())}}function hs(e){hr!==null&&hr.tag===0&&!(pe&6)&&Qs();var t=pe;pe|=1;var n=Ut.transition,r=ge;try{if(Ut.transition=null,ge=1,e)return e()}finally{ge=r,Ut.transition=n,pe=t,!(pe&6)&&Tr()}}function yh(){Et=zs.current,Se(zs)}function es(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Vb(n)),Ae!==null)for(n=Ae.return;n!==null;){var r=n;switch(Yf(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Ol();break;case 3:go(),Se(xt),Se(rt),ih();break;case 5:oh(r);break;case 4:go();break;case 13:Se(Ne);break;case 19:Se(Ne);break;case 10:th(r.type._context);break;case 22:case 23:yh()}n=n.return}if(Ve=e,Ae=e=br(e.current,null),Ge=Et=t,De=0,Bi=null,ph=Ru=fs=0,pt=vi=null,zr!==null){for(t=0;t<zr.length;t++)if(n=zr[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,o=n.pending;if(o!==null){var i=o.next;o.next=s,r.next=i}n.pending=r}zr=null}return e}function Fx(e,t){do{var n=Ae;try{if(eh(),dl.current=Wl,Vl){for(var r=Pe.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Vl=!1}if(ds=0,He=Fe=Pe=null,yi=!1,Di=0,hh.current=null,n===null||n.return===null){De=1,Bi=t,Ae=null;break}e:{var o=e,i=n.return,a=n,l=t;if(t=Ge,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,d=a,c=d.tag;if(!(d.mode&1)&&(c===0||c===11||c===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=dm(i);if(m!==null){m.flags&=-257,fm(m,i,a,o,t),m.mode&1&&cm(o,u,t),t=m,l=u;var p=t.updateQueue;if(p===null){var x=new Set;x.add(l),t.updateQueue=x}else p.add(l);break e}else{if(!(t&1)){cm(o,u,t),xh();break e}l=Error(U(426))}}else if(_e&&a.mode&1){var w=dm(i);if(w!==null){!(w.flags&65536)&&(w.flags|=256),fm(w,i,a,o,t),Zf(yo(l,a));break e}}o=l=yo(l,a),De!==4&&(De=2),vi===null?vi=[o]:vi.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var g=wx(o,l,t);sm(o,g);break e;case 1:a=l;var v=o.type,y=o.stateNode;if(!(o.flags&128)&&(typeof v.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Sr===null||!Sr.has(y)))){o.flags|=65536,t&=-t,o.lanes|=t;var S=Sx(o,a,t);sm(o,S);break e}}o=o.return}while(o!==null)}$x(n)}catch(E){t=E,Ae===n&&n!==null&&(Ae=n=n.return);continue}break}while(!0)}function Dx(){var e=Kl.current;return Kl.current=Wl,e===null?Wl:e}function xh(){(De===0||De===3||De===2)&&(De=4),Ve===null||!(fs&268435455)&&!(Ru&268435455)||nr(Ve,Ge)}function Gl(e,t){var n=pe;pe|=2;var r=Dx();(Ve!==e||Ge!==t)&&(Rn=null,es(e,t));do try{mE();break}catch(s){Fx(e,s)}while(!0);if(eh(),pe=n,Kl.current=r,Ae!==null)throw Error(U(261));return Ve=null,Ge=0,De}function mE(){for(;Ae!==null;)zx(Ae)}function gE(){for(;Ae!==null&&!B_();)zx(Ae)}function zx(e){var t=Hx(e.alternate,e,Et);e.memoizedProps=e.pendingProps,t===null?$x(e):Ae=t,hh.current=null}function $x(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=uE(n,t),n!==null){n.flags&=32767,Ae=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{De=6,Ae=null;return}}else if(n=lE(n,t,Et),n!==null){Ae=n;return}if(t=t.sibling,t!==null){Ae=t;return}Ae=t=e}while(t!==null);De===0&&(De=5)}function Ir(e,t,n){var r=ge,s=Ut.transition;try{Ut.transition=null,ge=1,yE(e,t,n,r)}finally{Ut.transition=s,ge=r}return null}function yE(e,t,n,r){do Qs();while(hr!==null);if(pe&6)throw Error(U(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(U(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(Y_(e,o),e===Ve&&(Ae=Ve=null,Ge=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ha||(Ha=!0,Ux(jl,function(){return Qs(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=Ut.transition,Ut.transition=null;var i=ge;ge=1;var a=pe;pe|=4,hh.current=null,dE(e,n),Ix(n,e),Fb(_d),Tl=!!Sd,_d=Sd=null,e.current=n,fE(n),H_(),pe=a,ge=i,Ut.transition=o}else e.current=n;if(Ha&&(Ha=!1,hr=e,Ql=s),o=e.pendingLanes,o===0&&(Sr=null),W_(n.stateNode),wt(e,Ie()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(ql)throw ql=!1,e=Hd,Hd=null,e;return Ql&1&&e.tag!==0&&Qs(),o=e.pendingLanes,o&1?e===Ud?wi++:(wi=0,Ud=e):wi=0,Tr(),null}function Qs(){if(hr!==null){var e=w0(Ql),t=Ut.transition,n=ge;try{if(Ut.transition=null,ge=16>e?16:e,hr===null)var r=!1;else{if(e=hr,hr=null,Ql=0,pe&6)throw Error(U(331));var s=pe;for(pe|=4,G=e.current;G!==null;){var o=G,i=o.child;if(G.flags&16){var a=o.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(G=u;G!==null;){var d=G;switch(d.tag){case 0:case 11:case 15:xi(8,d,o)}var c=d.child;if(c!==null)c.return=d,G=c;else for(;G!==null;){d=G;var f=d.sibling,m=d.return;if(Mx(d),d===u){G=null;break}if(f!==null){f.return=m,G=f;break}G=m}}}var p=o.alternate;if(p!==null){var x=p.child;if(x!==null){p.child=null;do{var w=x.sibling;x.sibling=null,x=w}while(x!==null)}}G=o}}if(o.subtreeFlags&2064&&i!==null)i.return=o,G=i;else e:for(;G!==null;){if(o=G,o.flags&2048)switch(o.tag){case 0:case 11:case 15:xi(9,o,o.return)}var g=o.sibling;if(g!==null){g.return=o.return,G=g;break e}G=o.return}}var v=e.current;for(G=v;G!==null;){i=G;var y=i.child;if(i.subtreeFlags&2064&&y!==null)y.return=i,G=y;else e:for(i=v;G!==null;){if(a=G,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Pu(9,a)}}catch(E){Me(a,a.return,E)}if(a===i){G=null;break e}var S=a.sibling;if(S!==null){S.return=a.return,G=S;break e}G=a.return}}if(pe=s,Tr(),xn&&typeof xn.onPostCommitFiberRoot=="function")try{xn.onPostCommitFiberRoot(wu,e)}catch{}r=!0}return r}finally{ge=n,Ut.transition=t}}return!1}function Cm(e,t,n){t=yo(n,t),t=wx(e,t,1),e=wr(e,t,1),t=at(),e!==null&&(la(e,1,t),wt(e,t))}function Me(e,t,n){if(e.tag===3)Cm(e,e,n);else for(;t!==null;){if(t.tag===3){Cm(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Sr===null||!Sr.has(r))){e=yo(n,e),e=Sx(t,e,1),t=wr(t,e,1),e=at(),t!==null&&(la(t,1,e),wt(t,e));break}}t=t.return}}function xE(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=at(),e.pingedLanes|=e.suspendedLanes&n,Ve===e&&(Ge&n)===n&&(De===4||De===3&&(Ge&130023424)===Ge&&500>Ie()-mh?es(e,0):ph|=n),wt(e,t)}function Bx(e,t){t===0&&(e.mode&1?(t=Ta,Ta<<=1,!(Ta&130023424)&&(Ta=4194304)):t=1);var n=at();e=zn(e,t),e!==null&&(la(e,t,n),wt(e,n))}function vE(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Bx(e,n)}function wE(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(U(314))}r!==null&&r.delete(t),Bx(e,n)}var Hx;Hx=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||xt.current)gt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return gt=!1,aE(e,t,n);gt=!!(e.flags&131072)}else gt=!1,_e&&t.flags&1048576&&K0(t,zl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;hl(e,t),e=t.pendingProps;var s=ho(t,rt.current);qs(t,n),s=lh(null,t,r,e,s,n);var o=uh();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,vt(r)?(o=!0,Fl(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,rh(t),s.updater=ku,t.stateNode=s,s._reactInternals=t,Md(t,r,e,n),t=Id(null,t,r,!0,o,n)):(t.tag=0,_e&&o&&Xf(t),it(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(hl(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=_E(r),e=qt(r,e),s){case 0:t=Ld(null,t,r,e,n);break e;case 1:t=mm(null,t,r,e,n);break e;case 11:t=hm(null,t,r,e,n);break e;case 14:t=pm(null,t,r,qt(r.type,e),n);break e}throw Error(U(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:qt(r,s),Ld(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:qt(r,s),mm(e,t,r,s,n);case 3:e:{if(Cx(t),e===null)throw Error(U(387));r=t.pendingProps,o=t.memoizedState,s=o.element,Z0(e,t),Hl(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=yo(Error(U(423)),t),t=gm(e,t,r,n,s);break e}else if(r!==s){s=yo(Error(U(424)),t),t=gm(e,t,r,n,s);break e}else for(kt=vr(t.stateNode.containerInfo.firstChild),Pt=t,_e=!0,Zt=null,n=X0(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(po(),r===s){t=$n(e,t,n);break e}it(e,t,r,n)}t=t.child}return t;case 5:return J0(t),e===null&&Pd(t),r=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,bd(r,s)?i=null:o!==null&&bd(r,o)&&(t.flags|=32),Ex(e,t),it(e,t,i,n),t.child;case 6:return e===null&&Pd(t),null;case 13:return Nx(e,t,n);case 4:return sh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=mo(t,null,r,n):it(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:qt(r,s),hm(e,t,r,s,n);case 7:return it(e,t,t.pendingProps,n),t.child;case 8:return it(e,t,t.pendingProps.children,n),t.child;case 12:return it(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,o=t.memoizedProps,i=s.value,xe($l,r._currentValue),r._currentValue=i,o!==null)if(on(o.value,i)){if(o.children===s.children&&!xt.current){t=$n(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){i=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=On(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Rd(o.return,n,t),a.lanes|=n;break}l=l.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(U(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Rd(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}it(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,qs(t,n),s=Vt(s),r=r(s),t.flags|=1,it(e,t,r,n),t.child;case 14:return r=t.type,s=qt(r,t.pendingProps),s=qt(r.type,s),pm(e,t,r,s,n);case 15:return _x(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:qt(r,s),hl(e,t),t.tag=1,vt(r)?(e=!0,Fl(t)):e=!1,qs(t,n),vx(t,r,s),Md(t,r,s,n),Id(null,t,r,!0,e,n);case 19:return kx(e,t,n);case 22:return bx(e,t,n)}throw Error(U(156,t.tag))};function Ux(e,t){return g0(e,t)}function SE(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bt(e,t,n,r){return new SE(e,t,n,r)}function vh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _E(e){if(typeof e=="function")return vh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Df)return 11;if(e===zf)return 14}return 2}function br(e,t){var n=e.alternate;return n===null?(n=Bt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function gl(e,t,n,r,s,o){var i=2;if(r=e,typeof e=="function")vh(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Rs:return ts(n.children,s,o,t);case Ff:i=8,s|=8;break;case td:return e=Bt(12,n,t,s|2),e.elementType=td,e.lanes=o,e;case nd:return e=Bt(13,n,t,s),e.elementType=nd,e.lanes=o,e;case rd:return e=Bt(19,n,t,s),e.elementType=rd,e.lanes=o,e;case Jy:return ju(n,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Yy:i=10;break e;case Zy:i=9;break e;case Df:i=11;break e;case zf:i=14;break e;case Jn:i=16,r=null;break e}throw Error(U(130,e==null?e:typeof e,""))}return t=Bt(i,n,t,s),t.elementType=e,t.type=r,t.lanes=o,t}function ts(e,t,n,r){return e=Bt(7,e,r,t),e.lanes=n,e}function ju(e,t,n,r){return e=Bt(22,e,r,t),e.elementType=Jy,e.lanes=n,e.stateNode={isHidden:!1},e}function Rc(e,t,n){return e=Bt(6,e,null,t),e.lanes=n,e}function jc(e,t,n){return t=Bt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function bE(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=cc(0),this.expirationTimes=cc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=cc(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function wh(e,t,n,r,s,o,i,a,l){return e=new bE(e,t,n,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Bt(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},rh(o),e}function EE(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ps,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Vx(e){if(!e)return Rr;e=e._reactInternals;e:{if(Es(e)!==e||e.tag!==1)throw Error(U(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(vt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(U(171))}if(e.tag===1){var n=e.type;if(vt(n))return V0(e,n,t)}return t}function Wx(e,t,n,r,s,o,i,a,l){return e=wh(n,r,!0,e,s,o,i,a,l),e.context=Vx(null),n=e.current,r=at(),s=_r(n),o=On(r,s),o.callback=t??null,wr(n,o,s),e.current.lanes=s,la(e,s,r),wt(e,r),e}function Mu(e,t,n,r){var s=t.current,o=at(),i=_r(s);return n=Vx(n),t.context===null?t.context=n:t.pendingContext=n,t=On(o,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=wr(s,t,i),e!==null&&(rn(e,s,i,o),cl(e,s,i)),i}function Xl(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Nm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Sh(e,t){Nm(e,t),(e=e.alternate)&&Nm(e,t)}function CE(){return null}var Kx=typeof reportError=="function"?reportError:function(e){console.error(e)};function _h(e){this._internalRoot=e}Tu.prototype.render=_h.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(U(409));Mu(e,t,null,null)};Tu.prototype.unmount=_h.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;hs(function(){Mu(null,e,null,null)}),t[Dn]=null}};function Tu(e){this._internalRoot=e}Tu.prototype.unstable_scheduleHydration=function(e){if(e){var t=b0();e={blockedOn:null,target:e,priority:t};for(var n=0;n<tr.length&&t!==0&&t<tr[n].priority;n++);tr.splice(n,0,e),n===0&&C0(e)}};function bh(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Lu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function km(){}function NE(e,t,n,r,s){if(s){if(typeof r=="function"){var o=r;r=function(){var u=Xl(i);o.call(u)}}var i=Wx(t,r,e,0,null,!1,!1,"",km);return e._reactRootContainer=i,e[Dn]=i.current,Li(e.nodeType===8?e.parentNode:e),hs(),i}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var u=Xl(l);a.call(u)}}var l=wh(e,0,!1,null,null,!1,!1,"",km);return e._reactRootContainer=l,e[Dn]=l.current,Li(e.nodeType===8?e.parentNode:e),hs(function(){Mu(t,l,n,r)}),l}function Iu(e,t,n,r,s){var o=n._reactRootContainer;if(o){var i=o;if(typeof s=="function"){var a=s;s=function(){var l=Xl(i);a.call(l)}}Mu(t,i,e,s)}else i=NE(n,t,e,s,r);return Xl(i)}S0=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ii(t.pendingLanes);n!==0&&(Hf(t,n|1),wt(t,Ie()),!(pe&6)&&(xo=Ie()+500,Tr()))}break;case 13:hs(function(){var r=zn(e,1);if(r!==null){var s=at();rn(r,e,1,s)}}),Sh(e,1)}};Uf=function(e){if(e.tag===13){var t=zn(e,134217728);if(t!==null){var n=at();rn(t,e,134217728,n)}Sh(e,134217728)}};_0=function(e){if(e.tag===13){var t=_r(e),n=zn(e,t);if(n!==null){var r=at();rn(n,e,t,r)}Sh(e,t)}};b0=function(){return ge};E0=function(e,t){var n=ge;try{return ge=e,t()}finally{ge=n}};hd=function(e,t,n){switch(t){case"input":if(id(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=Eu(r);if(!s)throw Error(U(90));t0(r),id(r,s)}}}break;case"textarea":r0(e,n);break;case"select":t=n.value,t!=null&&Us(e,!!n.multiple,t,!1)}};c0=gh;d0=hs;var kE={usingClientEntryPoint:!1,Events:[ca,Ls,Eu,l0,u0,gh]},Qo={findFiberByHostInstance:Dr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},PE={bundleType:Qo.bundleType,version:Qo.version,rendererPackageName:Qo.rendererPackageName,rendererConfig:Qo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Un.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=p0(e),e===null?null:e.stateNode},findFiberByHostInstance:Qo.findFiberByHostInstance||CE,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ua=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ua.isDisabled&&Ua.supportsFiber)try{wu=Ua.inject(PE),xn=Ua}catch{}}Tt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=kE;Tt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!bh(t))throw Error(U(200));return EE(e,t,null,n)};Tt.createRoot=function(e,t){if(!bh(e))throw Error(U(299));var n=!1,r="",s=Kx;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=wh(e,1,!1,null,null,n,!1,r,s),e[Dn]=t.current,Li(e.nodeType===8?e.parentNode:e),new _h(t)};Tt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(U(188)):(e=Object.keys(e).join(","),Error(U(268,e)));return e=p0(t),e=e===null?null:e.stateNode,e};Tt.flushSync=function(e){return hs(e)};Tt.hydrate=function(e,t,n){if(!Lu(t))throw Error(U(200));return Iu(null,e,t,!0,n)};Tt.hydrateRoot=function(e,t,n){if(!bh(e))throw Error(U(405));var r=n!=null&&n.hydratedSources||null,s=!1,o="",i=Kx;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=Wx(t,null,e,1,n??null,s,!1,o,i),e[Dn]=t.current,Li(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new Tu(t)};Tt.render=function(e,t,n){if(!Lu(t))throw Error(U(200));return Iu(null,e,t,!1,n)};Tt.unmountComponentAtNode=function(e){if(!Lu(e))throw Error(U(40));return e._reactRootContainer?(hs(function(){Iu(null,null,e,!1,function(){e._reactRootContainer=null,e[Dn]=null})}),!0):!1};Tt.unstable_batchedUpdates=gh;Tt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Lu(n))throw Error(U(200));if(e==null||e._reactInternals===void 0)throw Error(U(38));return Iu(e,t,n,!1,r)};Tt.version="18.3.1-next-f1338f8080-20240426";function qx(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(qx)}catch(e){console.error(e)}}qx(),qy.exports=Tt;var Qx=qy.exports,Gx,Pm=Qx;Gx=Pm.createRoot,Pm.hydrateRoot;var fa=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},RE={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},sr,Rf,Cy,jE=(Cy=class{constructor(){ne(this,sr,RE);ne(this,Rf,!1)}setTimeoutProvider(e){q(this,sr,e)}setTimeout(e,t){return O(this,sr).setTimeout(e,t)}clearTimeout(e){O(this,sr).clearTimeout(e)}setInterval(e,t){return O(this,sr).setInterval(e,t)}clearInterval(e){O(this,sr).clearInterval(e)}},sr=new WeakMap,Rf=new WeakMap,Cy),Br=new jE;function ME(e){setTimeout(e,0)}var ps=typeof window>"u"||"Deno"in globalThis;function ht(){}function TE(e,t){return typeof e=="function"?e(t):e}function Kd(e){return typeof e=="number"&&e>=0&&e!==1/0}function Xx(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Er(e,t){return typeof e=="function"?e(t):e}function Dt(e,t){return typeof e=="function"?e(t):e}function Rm(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:o,queryKey:i,stale:a}=e;if(i){if(r){if(t.queryHash!==Eh(i,t.options))return!1}else if(!Ui(t.queryKey,i))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||o&&!o(t))}function jm(e,t){const{exact:n,status:r,predicate:s,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Hi(t.options.mutationKey)!==Hi(o))return!1}else if(!Ui(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function Eh(e,t){return((t==null?void 0:t.queryKeyHashFn)||Hi)(e)}function Hi(e){return JSON.stringify(e,(t,n)=>Qd(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Ui(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Ui(e[n],t[n])):!1}var LE=Object.prototype.hasOwnProperty;function Yx(e,t){if(e===t)return e;const n=Mm(e)&&Mm(t);if(!n&&!(Qd(e)&&Qd(t)))return t;const s=(n?e:Object.keys(e)).length,o=n?t:Object.keys(t),i=o.length,a=n?new Array(i):{};let l=0;for(let u=0;u<i;u++){const d=n?u:o[u],c=e[d],f=t[d];if(c===f){a[d]=c,(n?u<s:LE.call(e,d))&&l++;continue}if(c===null||f===null||typeof c!="object"||typeof f!="object"){a[d]=f;continue}const m=Yx(c,f);a[d]=m,m===c&&l++}return s===i&&l===s?e:a}function qd(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Mm(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Qd(e){if(!Tm(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Tm(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Tm(e){return Object.prototype.toString.call(e)==="[object Object]"}function IE(e){return new Promise(t=>{Br.setTimeout(t,e)})}function Gd(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Yx(e,t):t}function AE(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function OE(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Ch=Symbol();function Zx(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Ch?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Jx(e,t){return typeof e=="function"?e(...t):!!e}function FE(e,t,n){let r=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??(s=t()),r||(r=!0,s.aborted?n():s.addEventListener("abort",n,{once:!0})),s)}),e}var Wr,or,Js,Ny,DE=(Ny=class extends fa{constructor(){super();ne(this,Wr);ne(this,or);ne(this,Js);q(this,Js,t=>{if(!ps&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){O(this,or)||this.setEventListener(O(this,Js))}onUnsubscribe(){var t;this.hasListeners()||((t=O(this,or))==null||t.call(this),q(this,or,void 0))}setEventListener(t){var n;q(this,Js,t),(n=O(this,or))==null||n.call(this),q(this,or,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){O(this,Wr)!==t&&(q(this,Wr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof O(this,Wr)=="boolean"?O(this,Wr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Wr=new WeakMap,or=new WeakMap,Js=new WeakMap,Ny),Nh=new DE;function Xd(){let e,t;const n=new Promise((s,o)=>{e=s,t=o});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}var zE=ME;function $E(){let e=[],t=0,n=a=>{a()},r=a=>{a()},s=zE;const o=a=>{t?e.push(a):s(()=>{n(a)})},i=()=>{const a=e;e=[],a.length&&s(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||i()}return l},batchCalls:a=>(...l)=>{o(()=>{a(...l)})},schedule:o,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{s=a}}}var Qe=$E(),eo,ir,to,ky,BE=(ky=class extends fa{constructor(){super();ne(this,eo,!0);ne(this,ir);ne(this,to);q(this,to,t=>{if(!ps&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){O(this,ir)||this.setEventListener(O(this,to))}onUnsubscribe(){var t;this.hasListeners()||((t=O(this,ir))==null||t.call(this),q(this,ir,void 0))}setEventListener(t){var n;q(this,to,t),(n=O(this,ir))==null||n.call(this),q(this,ir,t(this.setOnline.bind(this)))}setOnline(t){O(this,eo)!==t&&(q(this,eo,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return O(this,eo)}},eo=new WeakMap,ir=new WeakMap,to=new WeakMap,ky),Yl=new BE;function HE(e){return Math.min(1e3*2**e,3e4)}function ev(e){return(e??"online")==="online"?Yl.isOnline():!0}var Yd=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function tv(e){let t=!1,n=0,r;const s=Xd(),o=()=>s.status!=="pending",i=x=>{var w;if(!o()){const g=new Yd(x);f(g),(w=e.onCancel)==null||w.call(e,g)}},a=()=>{t=!0},l=()=>{t=!1},u=()=>Nh.isFocused()&&(e.networkMode==="always"||Yl.isOnline())&&e.canRun(),d=()=>ev(e.networkMode)&&e.canRun(),c=x=>{o()||(r==null||r(),s.resolve(x))},f=x=>{o()||(r==null||r(),s.reject(x))},m=()=>new Promise(x=>{var w;r=g=>{(o()||u())&&x(g)},(w=e.onPause)==null||w.call(e)}).then(()=>{var x;r=void 0,o()||(x=e.onContinue)==null||x.call(e)}),p=()=>{if(o())return;let x;const w=n===0?e.initialPromise:void 0;try{x=w??e.fn()}catch(g){x=Promise.reject(g)}Promise.resolve(x).then(c).catch(g=>{var b;if(o())return;const v=e.retry??(ps?0:3),y=e.retryDelay??HE,S=typeof y=="function"?y(n,g):y,E=v===!0||typeof v=="number"&&n<v||typeof v=="function"&&v(n,g);if(t||!E){f(g);return}n++,(b=e.onFail)==null||b.call(e,n,g),IE(S).then(()=>u()?void 0:m()).then(()=>{t?f(g):p()})})};return{promise:s,status:()=>s.status,cancel:i,continue:()=>(r==null||r(),s),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?p():m().then(p),s)}}var Kr,Py,nv=(Py=class{constructor(){ne(this,Kr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Kd(this.gcTime)&&q(this,Kr,Br.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ps?1/0:5*60*1e3))}clearGcTimeout(){O(this,Kr)&&(Br.clearTimeout(O(this,Kr)),q(this,Kr,void 0))}},Kr=new WeakMap,Py),qr,no,Ft,Qr,Be,na,Gr,Qt,Pn,Ry,UE=(Ry=class extends nv{constructor(t){super();ne(this,Qt);ne(this,qr);ne(this,no);ne(this,Ft);ne(this,Qr);ne(this,Be);ne(this,na);ne(this,Gr);q(this,Gr,!1),q(this,na,t.defaultOptions),this.setOptions(t.options),this.observers=[],q(this,Qr,t.client),q(this,Ft,O(this,Qr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,q(this,qr,Im(this.options)),this.state=t.state??O(this,qr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=O(this,Be))==null?void 0:t.promise}setOptions(t){if(this.options={...O(this,na),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=Im(this.options);n.data!==void 0&&(this.setState(Lm(n.data,n.dataUpdatedAt)),q(this,qr,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&O(this,Ft).remove(this)}setData(t,n){const r=Gd(this.state.data,t,this.options);return le(this,Qt,Pn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){le(this,Qt,Pn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=O(this,Be))==null?void 0:r.promise;return(s=O(this,Be))==null||s.cancel(t),n?n.then(ht).catch(ht):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(O(this,qr))}isActive(){return this.observers.some(t=>Dt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ch||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Er(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Xx(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=O(this,Be))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=O(this,Be))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),O(this,Ft).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(O(this,Be)&&(O(this,Gr)?O(this,Be).cancel({revert:!0}):O(this,Be).cancelRetry()),this.scheduleGc()),O(this,Ft).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||le(this,Qt,Pn).call(this,{type:"invalidate"})}async fetch(t,n){var l,u,d,c,f,m,p,x,w,g,v,y;if(this.state.fetchStatus!=="idle"&&((l=O(this,Be))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(O(this,Be))return O(this,Be).continueRetry(),O(this,Be).promise}if(t&&this.setOptions(t),!this.options.queryFn){const S=this.observers.find(E=>E.options.queryFn);S&&this.setOptions(S.options)}const r=new AbortController,s=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(q(this,Gr,!0),r.signal)})},o=()=>{const S=Zx(this.options,n),b=(()=>{const _={client:O(this,Qr),queryKey:this.queryKey,meta:this.meta};return s(_),_})();return q(this,Gr,!1),this.options.persister?this.options.persister(S,b,this):S(b)},a=(()=>{const S={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:O(this,Qr),state:this.state,fetchFn:o};return s(S),S})();(u=this.options.behavior)==null||u.onFetch(a,this),q(this,no,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=a.fetchOptions)==null?void 0:d.meta))&&le(this,Qt,Pn).call(this,{type:"fetch",meta:(c=a.fetchOptions)==null?void 0:c.meta}),q(this,Be,tv({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,onCancel:S=>{S instanceof Yd&&S.revert&&this.setState({...O(this,no),fetchStatus:"idle"}),r.abort()},onFail:(S,E)=>{le(this,Qt,Pn).call(this,{type:"failed",failureCount:S,error:E})},onPause:()=>{le(this,Qt,Pn).call(this,{type:"pause"})},onContinue:()=>{le(this,Qt,Pn).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}));try{const S=await O(this,Be).start();if(S===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(S),(m=(f=O(this,Ft).config).onSuccess)==null||m.call(f,S,this),(x=(p=O(this,Ft).config).onSettled)==null||x.call(p,S,this.state.error,this),S}catch(S){if(S instanceof Yd){if(S.silent)return O(this,Be).promise;if(S.revert){if(this.state.data===void 0)throw S;return this.state.data}}throw le(this,Qt,Pn).call(this,{type:"error",error:S}),(g=(w=O(this,Ft).config).onError)==null||g.call(w,S,this),(y=(v=O(this,Ft).config).onSettled)==null||y.call(v,this.state.data,S,this),S}finally{this.scheduleGc()}}},qr=new WeakMap,no=new WeakMap,Ft=new WeakMap,Qr=new WeakMap,Be=new WeakMap,na=new WeakMap,Gr=new WeakMap,Qt=new WeakSet,Pn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...rv(r.data,this.options),fetchMeta:t.meta??null};case"success":const s={...r,...Lm(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return q(this,no,t.manual?s:void 0),s;case"error":const o=t.error;return{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Qe.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),O(this,Ft).notify({query:this,type:"updated",action:t})})},Ry);function rv(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ev(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Lm(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Im(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var ft,ue,ra,st,Xr,ro,Mn,ar,sa,so,oo,Yr,Zr,lr,io,me,li,Zd,Jd,ef,tf,nf,rf,sf,sv,jy,VE=(jy=class extends fa{constructor(t,n){super();ne(this,me);ne(this,ft);ne(this,ue);ne(this,ra);ne(this,st);ne(this,Xr);ne(this,ro);ne(this,Mn);ne(this,ar);ne(this,sa);ne(this,so);ne(this,oo);ne(this,Yr);ne(this,Zr);ne(this,lr);ne(this,io,new Set);this.options=n,q(this,ft,t),q(this,ar,null),q(this,Mn,Xd()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(O(this,ue).addObserver(this),Am(O(this,ue),this.options)?le(this,me,li).call(this):this.updateResult(),le(this,me,tf).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return of(O(this,ue),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return of(O(this,ue),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,le(this,me,nf).call(this),le(this,me,rf).call(this),O(this,ue).removeObserver(this)}setOptions(t){const n=this.options,r=O(this,ue);if(this.options=O(this,ft).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Dt(this.options.enabled,O(this,ue))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");le(this,me,sf).call(this),O(this,ue).setOptions(this.options),n._defaulted&&!qd(this.options,n)&&O(this,ft).getQueryCache().notify({type:"observerOptionsUpdated",query:O(this,ue),observer:this});const s=this.hasListeners();s&&Om(O(this,ue),r,this.options,n)&&le(this,me,li).call(this),this.updateResult(),s&&(O(this,ue)!==r||Dt(this.options.enabled,O(this,ue))!==Dt(n.enabled,O(this,ue))||Er(this.options.staleTime,O(this,ue))!==Er(n.staleTime,O(this,ue)))&&le(this,me,Zd).call(this);const o=le(this,me,Jd).call(this);s&&(O(this,ue)!==r||Dt(this.options.enabled,O(this,ue))!==Dt(n.enabled,O(this,ue))||o!==O(this,lr))&&le(this,me,ef).call(this,o)}getOptimisticResult(t){const n=O(this,ft).getQueryCache().build(O(this,ft),t),r=this.createResult(n,t);return KE(this,r)&&(q(this,st,r),q(this,ro,this.options),q(this,Xr,O(this,ue).state)),r}getCurrentResult(){return O(this,st)}trackResult(t,n){return new Proxy(t,{get:(r,s)=>(this.trackProp(s),n==null||n(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&O(this,Mn).status==="pending"&&O(this,Mn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,s))})}trackProp(t){O(this,io).add(t)}getCurrentQuery(){return O(this,ue)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=O(this,ft).defaultQueryOptions(t),r=O(this,ft).getQueryCache().build(O(this,ft),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return le(this,me,li).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),O(this,st)))}createResult(t,n){var M;const r=O(this,ue),s=this.options,o=O(this,st),i=O(this,Xr),a=O(this,ro),u=t!==r?t.state:O(this,ra),{state:d}=t;let c={...d},f=!1,m;if(n._optimisticResults){const L=this.hasListeners(),P=!L&&Am(t,n),R=L&&Om(t,r,n,s);(P||R)&&(c={...c,...rv(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:p,errorUpdatedAt:x,status:w}=c;m=c.data;let g=!1;if(n.placeholderData!==void 0&&m===void 0&&w==="pending"){let L;o!=null&&o.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(L=o.data,g=!0):L=typeof n.placeholderData=="function"?n.placeholderData((M=O(this,oo))==null?void 0:M.state.data,O(this,oo)):n.placeholderData,L!==void 0&&(w="success",m=Gd(o==null?void 0:o.data,L,n),f=!0)}if(n.select&&m!==void 0&&!g)if(o&&m===(i==null?void 0:i.data)&&n.select===O(this,sa))m=O(this,so);else try{q(this,sa,n.select),m=n.select(m),m=Gd(o==null?void 0:o.data,m,n),q(this,so,m),q(this,ar,null)}catch(L){q(this,ar,L)}O(this,ar)&&(p=O(this,ar),m=O(this,so),x=Date.now(),w="error");const v=c.fetchStatus==="fetching",y=w==="pending",S=w==="error",E=y&&v,b=m!==void 0,C={status:w,fetchStatus:c.fetchStatus,isPending:y,isSuccess:w==="success",isError:S,isInitialLoading:E,isLoading:E,data:m,dataUpdatedAt:c.dataUpdatedAt,error:p,errorUpdatedAt:x,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>u.dataUpdateCount||c.errorUpdateCount>u.errorUpdateCount,isFetching:v,isRefetching:v&&!y,isLoadingError:S&&!b,isPaused:c.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:S&&b,isStale:kh(t,n),refetch:this.refetch,promise:O(this,Mn),isEnabled:Dt(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const L=$=>{C.status==="error"?$.reject(C.error):C.data!==void 0&&$.resolve(C.data)},P=()=>{const $=q(this,Mn,C.promise=Xd());L($)},R=O(this,Mn);switch(R.status){case"pending":t.queryHash===r.queryHash&&L(R);break;case"fulfilled":(C.status==="error"||C.data!==R.value)&&P();break;case"rejected":(C.status!=="error"||C.error!==R.reason)&&P();break}}return C}updateResult(){const t=O(this,st),n=this.createResult(O(this,ue),this.options);if(q(this,Xr,O(this,ue).state),q(this,ro,this.options),O(this,Xr).data!==void 0&&q(this,oo,O(this,ue)),qd(n,t))return;q(this,st,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,o=typeof s=="function"?s():s;if(o==="all"||!o&&!O(this,io).size)return!0;const i=new Set(o??O(this,io));return this.options.throwOnError&&i.add("error"),Object.keys(O(this,st)).some(a=>{const l=a;return O(this,st)[l]!==t[l]&&i.has(l)})};le(this,me,sv).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&le(this,me,tf).call(this)}},ft=new WeakMap,ue=new WeakMap,ra=new WeakMap,st=new WeakMap,Xr=new WeakMap,ro=new WeakMap,Mn=new WeakMap,ar=new WeakMap,sa=new WeakMap,so=new WeakMap,oo=new WeakMap,Yr=new WeakMap,Zr=new WeakMap,lr=new WeakMap,io=new WeakMap,me=new WeakSet,li=function(t){le(this,me,sf).call(this);let n=O(this,ue).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(ht)),n},Zd=function(){le(this,me,nf).call(this);const t=Er(this.options.staleTime,O(this,ue));if(ps||O(this,st).isStale||!Kd(t))return;const r=Xx(O(this,st).dataUpdatedAt,t)+1;q(this,Yr,Br.setTimeout(()=>{O(this,st).isStale||this.updateResult()},r))},Jd=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(O(this,ue)):this.options.refetchInterval)??!1},ef=function(t){le(this,me,rf).call(this),q(this,lr,t),!(ps||Dt(this.options.enabled,O(this,ue))===!1||!Kd(O(this,lr))||O(this,lr)===0)&&q(this,Zr,Br.setInterval(()=>{(this.options.refetchIntervalInBackground||Nh.isFocused())&&le(this,me,li).call(this)},O(this,lr)))},tf=function(){le(this,me,Zd).call(this),le(this,me,ef).call(this,le(this,me,Jd).call(this))},nf=function(){O(this,Yr)&&(Br.clearTimeout(O(this,Yr)),q(this,Yr,void 0))},rf=function(){O(this,Zr)&&(Br.clearInterval(O(this,Zr)),q(this,Zr,void 0))},sf=function(){const t=O(this,ft).getQueryCache().build(O(this,ft),this.options);if(t===O(this,ue))return;const n=O(this,ue);q(this,ue,t),q(this,ra,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},sv=function(t){Qe.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(O(this,st))}),O(this,ft).getQueryCache().notify({query:O(this,ue),type:"observerResultsUpdated"})})},jy);function WE(e,t){return Dt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Am(e,t){return WE(e,t)||e.state.data!==void 0&&of(e,t,t.refetchOnMount)}function of(e,t,n){if(Dt(t.enabled,e)!==!1&&Er(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&kh(e,t)}return!1}function Om(e,t,n,r){return(e!==t||Dt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&kh(e,n)}function kh(e,t){return Dt(t.enabled,e)!==!1&&e.isStaleByTime(Er(t.staleTime,e))}function KE(e,t){return!qd(e.getCurrentResult(),t)}function Fm(e){return{onFetch:(t,n)=>{var d,c,f,m,p;const r=t.options,s=(f=(c=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:c.fetchMore)==null?void 0:f.direction,o=((m=t.state.data)==null?void 0:m.pages)||[],i=((p=t.state.data)==null?void 0:p.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let x=!1;const w=y=>{FE(y,()=>t.signal,()=>x=!0)},g=Zx(t.options,t.fetchOptions),v=async(y,S,E)=>{if(x)return Promise.reject();if(S==null&&y.pages.length)return Promise.resolve(y);const _=(()=>{const P={client:t.client,queryKey:t.queryKey,pageParam:S,direction:E?"backward":"forward",meta:t.options.meta};return w(P),P})(),C=await g(_),{maxPages:M}=t.options,L=E?OE:AE;return{pages:L(y.pages,C,M),pageParams:L(y.pageParams,S,M)}};if(s&&o.length){const y=s==="backward",S=y?qE:Dm,E={pages:o,pageParams:i},b=S(r,E);a=await v(E,b,y)}else{const y=e??o.length;do{const S=l===0?i[0]??r.initialPageParam:Dm(r,a);if(l>0&&S==null)break;a=await v(a,S),l++}while(l<y)}return a};t.options.persister?t.fetchFn=()=>{var x,w;return(w=(x=t.options).persister)==null?void 0:w.call(x,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Dm(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function qE(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var oa,hn,ot,Jr,pn,Zn,My,QE=(My=class extends nv{constructor(t){super();ne(this,pn);ne(this,oa);ne(this,hn);ne(this,ot);ne(this,Jr);q(this,oa,t.client),this.mutationId=t.mutationId,q(this,ot,t.mutationCache),q(this,hn,[]),this.state=t.state||GE(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){O(this,hn).includes(t)||(O(this,hn).push(t),this.clearGcTimeout(),O(this,ot).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){q(this,hn,O(this,hn).filter(n=>n!==t)),this.scheduleGc(),O(this,ot).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){O(this,hn).length||(this.state.status==="pending"?this.scheduleGc():O(this,ot).remove(this))}continue(){var t;return((t=O(this,Jr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,a,l,u,d,c,f,m,p,x,w,g,v,y,S,E,b,_,C,M;const n=()=>{le(this,pn,Zn).call(this,{type:"continue"})},r={client:O(this,oa),meta:this.options.meta,mutationKey:this.options.mutationKey};q(this,Jr,tv({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(L,P)=>{le(this,pn,Zn).call(this,{type:"failed",failureCount:L,error:P})},onPause:()=>{le(this,pn,Zn).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>O(this,ot).canRun(this)}));const s=this.state.status==="pending",o=!O(this,Jr).canStart();try{if(s)n();else{le(this,pn,Zn).call(this,{type:"pending",variables:t,isPaused:o}),await((a=(i=O(this,ot).config).onMutate)==null?void 0:a.call(i,t,this,r));const P=await((u=(l=this.options).onMutate)==null?void 0:u.call(l,t,r));P!==this.state.context&&le(this,pn,Zn).call(this,{type:"pending",context:P,variables:t,isPaused:o})}const L=await O(this,Jr).start();return await((c=(d=O(this,ot).config).onSuccess)==null?void 0:c.call(d,L,t,this.state.context,this,r)),await((m=(f=this.options).onSuccess)==null?void 0:m.call(f,L,t,this.state.context,r)),await((x=(p=O(this,ot).config).onSettled)==null?void 0:x.call(p,L,null,this.state.variables,this.state.context,this,r)),await((g=(w=this.options).onSettled)==null?void 0:g.call(w,L,null,t,this.state.context,r)),le(this,pn,Zn).call(this,{type:"success",data:L}),L}catch(L){try{await((y=(v=O(this,ot).config).onError)==null?void 0:y.call(v,L,t,this.state.context,this,r))}catch(P){Promise.reject(P)}try{await((E=(S=this.options).onError)==null?void 0:E.call(S,L,t,this.state.context,r))}catch(P){Promise.reject(P)}try{await((_=(b=O(this,ot).config).onSettled)==null?void 0:_.call(b,void 0,L,this.state.variables,this.state.context,this,r))}catch(P){Promise.reject(P)}try{await((M=(C=this.options).onSettled)==null?void 0:M.call(C,void 0,L,t,this.state.context,r))}catch(P){Promise.reject(P)}throw le(this,pn,Zn).call(this,{type:"error",error:L}),L}finally{O(this,ot).runNext(this)}}},oa=new WeakMap,hn=new WeakMap,ot=new WeakMap,Jr=new WeakMap,pn=new WeakSet,Zn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Qe.batch(()=>{O(this,hn).forEach(r=>{r.onMutationUpdate(t)}),O(this,ot).notify({mutation:this,type:"updated",action:t})})},My);function GE(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Tn,Gt,ia,Ty,XE=(Ty=class extends fa{constructor(t={}){super();ne(this,Tn);ne(this,Gt);ne(this,ia);this.config=t,q(this,Tn,new Set),q(this,Gt,new Map),q(this,ia,0)}build(t,n,r){const s=new QE({client:t,mutationCache:this,mutationId:++Na(this,ia)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){O(this,Tn).add(t);const n=Va(t);if(typeof n=="string"){const r=O(this,Gt).get(n);r?r.push(t):O(this,Gt).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(O(this,Tn).delete(t)){const n=Va(t);if(typeof n=="string"){const r=O(this,Gt).get(n);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&O(this,Gt).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Va(t);if(typeof n=="string"){const r=O(this,Gt).get(n),s=r==null?void 0:r.find(o=>o.state.status==="pending");return!s||s===t}else return!0}runNext(t){var r;const n=Va(t);if(typeof n=="string"){const s=(r=O(this,Gt).get(n))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Qe.batch(()=>{O(this,Tn).forEach(t=>{this.notify({type:"removed",mutation:t})}),O(this,Tn).clear(),O(this,Gt).clear()})}getAll(){return Array.from(O(this,Tn))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>jm(n,r))}findAll(t={}){return this.getAll().filter(n=>jm(t,n))}notify(t){Qe.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Qe.batch(()=>Promise.all(t.map(n=>n.continue().catch(ht))))}},Tn=new WeakMap,Gt=new WeakMap,ia=new WeakMap,Ty);function Va(e){var t;return(t=e.options.scope)==null?void 0:t.id}var mn,Ly,YE=(Ly=class extends fa{constructor(t={}){super();ne(this,mn);this.config=t,q(this,mn,new Map)}build(t,n,r){const s=n.queryKey,o=n.queryHash??Eh(s,n);let i=this.get(o);return i||(i=new UE({client:t,queryKey:s,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(i)),i}add(t){O(this,mn).has(t.queryHash)||(O(this,mn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=O(this,mn).get(t.queryHash);n&&(t.destroy(),n===t&&O(this,mn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Qe.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return O(this,mn).get(t)}getAll(){return[...O(this,mn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Rm(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Rm(t,r)):n}notify(t){Qe.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Qe.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Qe.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},mn=new WeakMap,Ly),je,ur,cr,ao,lo,dr,uo,co,Iy,ZE=(Iy=class{constructor(e={}){ne(this,je);ne(this,ur);ne(this,cr);ne(this,ao);ne(this,lo);ne(this,dr);ne(this,uo);ne(this,co);q(this,je,e.queryCache||new YE),q(this,ur,e.mutationCache||new XE),q(this,cr,e.defaultOptions||{}),q(this,ao,new Map),q(this,lo,new Map),q(this,dr,0)}mount(){Na(this,dr)._++,O(this,dr)===1&&(q(this,uo,Nh.subscribe(async e=>{e&&(await this.resumePausedMutations(),O(this,je).onFocus())})),q(this,co,Yl.subscribe(async e=>{e&&(await this.resumePausedMutations(),O(this,je).onOnline())})))}unmount(){var e,t;Na(this,dr)._--,O(this,dr)===0&&((e=O(this,uo))==null||e.call(this),q(this,uo,void 0),(t=O(this,co))==null||t.call(this),q(this,co,void 0))}isFetching(e){return O(this,je).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return O(this,ur).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=O(this,je).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=O(this,je).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Er(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return O(this,je).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=O(this,je).get(r.queryHash),o=s==null?void 0:s.state.data,i=TE(t,o);if(i!==void 0)return O(this,je).build(this,r).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return Qe.batch(()=>O(this,je).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=O(this,je).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=O(this,je);Qe.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=O(this,je);return Qe.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Qe.batch(()=>O(this,je).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(ht).catch(ht)}invalidateQueries(e,t={}){return Qe.batch(()=>(O(this,je).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Qe.batch(()=>O(this,je).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,n);return n.throwOnError||(o=o.catch(ht)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(ht)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=O(this,je).build(this,t);return n.isStaleByTime(Er(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ht).catch(ht)}fetchInfiniteQuery(e){return e.behavior=Fm(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ht).catch(ht)}ensureInfiniteQueryData(e){return e.behavior=Fm(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Yl.isOnline()?O(this,ur).resumePausedMutations():Promise.resolve()}getQueryCache(){return O(this,je)}getMutationCache(){return O(this,ur)}getDefaultOptions(){return O(this,cr)}setDefaultOptions(e){q(this,cr,e)}setQueryDefaults(e,t){O(this,ao).set(Hi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...O(this,ao).values()],n={};return t.forEach(r=>{Ui(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){O(this,lo).set(Hi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...O(this,lo).values()],n={};return t.forEach(r=>{Ui(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...O(this,cr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Eh(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Ch&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...O(this,cr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){O(this,je).clear(),O(this,ur).clear()}},je=new WeakMap,ur=new WeakMap,cr=new WeakMap,ao=new WeakMap,lo=new WeakMap,dr=new WeakMap,uo=new WeakMap,co=new WeakMap,Iy),ov=j.createContext(void 0),JE=e=>{const t=j.useContext(ov);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},eC=({client:e,children:t})=>(j.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),h.jsx(ov.Provider,{value:e,children:t})),iv=j.createContext(!1),tC=()=>j.useContext(iv);iv.Provider;function nC(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var rC=j.createContext(nC()),sC=()=>j.useContext(rC),oC=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?Jx(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},iC=e=>{j.useEffect(()=>{e.clearReset()},[e])},aC=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||Jx(n,[e.error,r])),lC=e=>{if(e.suspense){const n=s=>s==="static"?s:Math.max(s??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...s)=>n(r(...s)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},uC=(e,t)=>e.isLoading&&e.isFetching&&!t,cC=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,zm=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function dC(e,t,n){var f,m,p,x;const r=tC(),s=sC(),o=JE(),i=o.defaultQueryOptions(e);(m=(f=o.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||m.call(f,i);const a=o.getQueryCache().get(i.queryHash);i._optimisticResults=r?"isRestoring":"optimistic",lC(i),oC(i,s,a),iC(s);const l=!o.getQueryCache().get(i.queryHash),[u]=j.useState(()=>new t(o,i)),d=u.getOptimisticResult(i),c=!r&&e.subscribed!==!1;if(j.useSyncExternalStore(j.useCallback(w=>{const g=c?u.subscribe(Qe.batchCalls(w)):ht;return u.updateResult(),g},[u,c]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),j.useEffect(()=>{u.setOptions(i)},[i,u]),cC(i,d))throw zm(i,u,s);if(aC({result:d,errorResetBoundary:s,throwOnError:i.throwOnError,query:a,suspense:i.suspense}))throw d.error;if((x=(p=o.getDefaultOptions().queries)==null?void 0:p._experimental_afterQuery)==null||x.call(p,i,d),i.experimental_prefetchInRender&&!ps&&uC(d,r)){const w=l?zm(i,u,s):a==null?void 0:a.promise;w==null||w.catch(ht).finally(()=>{u.updateResult()})}return i.notifyOnChangeProps?d:u.trackResult(d)}function Ao(e,t){return dC(e,VE)}const af=new WeakMap,fC=new WeakMap,Zl={current:[]};let Mc=!1,Si=0;const ui=new Set,Wa=new Map;function av(e){for(const t of e){if(Zl.current.includes(t))continue;Zl.current.push(t),t.recompute();const n=fC.get(t);if(n)for(const r of n){const s=af.get(r);s!=null&&s.length&&av(s)}}}function hC(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function pC(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function lv(e){if(Si>0&&!Wa.has(e)&&Wa.set(e,e.prevState),ui.add(e),!(Si>0)&&!Mc)try{for(Mc=!0;ui.size>0;){const t=Array.from(ui);ui.clear();for(const n of t){const r=Wa.get(n)??n.prevState;n.prevState=r,hC(n)}for(const n of t){const r=af.get(n);r&&(Zl.current.push(n),av(r))}for(const n of t){const r=af.get(n);if(r)for(const s of r)pC(s)}}}finally{Mc=!1,Zl.current=[],Wa.clear()}}function _i(e){Si++;try{e()}finally{if(Si--,Si===0){const t=ui.values().next().value;t&&lv(t)}}}function mC(e){return typeof e=="function"}class gC{constructor(t,n){this.listeners=new Set,this.subscribe=r=>{var s,o;this.listeners.add(r);const i=(o=(s=this.options)==null?void 0:s.onSubscribe)==null?void 0:o.call(s,r,this);return()=>{this.listeners.delete(r),i==null||i()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,r,s;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):mC(t)?this.state=t(this.prevState):this.state=t,(s=(r=this.options)==null?void 0:r.onUpdate)==null||s.call(r),lv(this)}}const Cr="__TSR_index",$m="popstate",Bm="beforeunload";function yC(e){let t=e.getLocation();const n=new Set,r=i=>{t=e.getLocation(),n.forEach(a=>a({location:t,action:i}))},s=i=>{e.notifyOnIndexChange??!0?r(i):t=e.getLocation()},o=async({task:i,navigateOpts:a,...l})=>{var f,m;if((a==null?void 0:a.ignoreBlocker)??!1){i();return}const d=((f=e.getBlockers)==null?void 0:f.call(e))??[],c=l.type==="PUSH"||l.type==="REPLACE";if(typeof document<"u"&&d.length&&c)for(const p of d){const x=Jl(l.path,l.state);if(await p.blockerFn({currentLocation:t,nextLocation:x,action:l.type})){(m=e.onBlocked)==null||m.call(e);return}}i()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:i=>(n.add(i),()=>{n.delete(i)}),push:(i,a,l)=>{const u=t.state[Cr];a=Hm(u+1,a),o({task:()=>{e.pushState(i,a),r({type:"PUSH"})},navigateOpts:l,type:"PUSH",path:i,state:a})},replace:(i,a,l)=>{const u=t.state[Cr];a=Hm(u,a),o({task:()=>{e.replaceState(i,a),r({type:"REPLACE"})},navigateOpts:l,type:"REPLACE",path:i,state:a})},go:(i,a)=>{o({task:()=>{e.go(i),s({type:"GO",index:i})},navigateOpts:a,type:"GO"})},back:i=>{o({task:()=>{e.back((i==null?void 0:i.ignoreBlocker)??!1),s({type:"BACK"})},navigateOpts:i,type:"BACK"})},forward:i=>{o({task:()=>{e.forward((i==null?void 0:i.ignoreBlocker)??!1),s({type:"FORWARD"})},navigateOpts:i,type:"FORWARD"})},canGoBack:()=>t.state[Cr]!==0,createHref:i=>e.createHref(i),block:i=>{var l;if(!e.setBlockers)return()=>{};const a=((l=e.getBlockers)==null?void 0:l.call(e))??[];return e.setBlockers([...a,i]),()=>{var d,c;const u=((d=e.getBlockers)==null?void 0:d.call(e))??[];(c=e.setBlockers)==null||c.call(e,u.filter(f=>f!==i))}},flush:()=>{var i;return(i=e.flush)==null?void 0:i.call(e)},destroy:()=>{var i;return(i=e.destroy)==null?void 0:i.call(e)},notify:r}}function Hm(e,t){t||(t={});const n=Ph();return{...t,key:n,__TSR_key:n,[Cr]:e}}function xC(e){var C,M;const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let s=[];const o=()=>s,i=L=>s=L,a=L=>L,l=()=>Jl(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state);if(!((C=t.history.state)!=null&&C.__TSR_key)&&!((M=t.history.state)!=null&&M.key)){const L=Ph();t.history.replaceState({[Cr]:0,key:L,__TSR_key:L},"")}let u=l(),d,c=!1,f=!1,m=!1,p=!1;const x=()=>u;let w,g;const v=()=>{w&&(_._ignoreSubscribers=!0,(w.isPush?t.history.pushState:t.history.replaceState)(w.state,"",w.href),_._ignoreSubscribers=!1,w=void 0,g=void 0,d=void 0)},y=(L,P,R)=>{const $=a(P);g||(d=u),u=Jl(P,R),w={href:$,state:R,isPush:(w==null?void 0:w.isPush)||L==="push"},g||(g=Promise.resolve().then(()=>v()))},S=L=>{u=l(),_.notify({type:L})},E=async()=>{if(f){f=!1;return}const L=l(),P=L.state[Cr]-u.state[Cr],R=P===1,$=P===-1,k=!R&&!$||c;c=!1;const I=k?"GO":$?"BACK":"FORWARD",A=k?{type:"GO",index:P}:{type:$?"BACK":"FORWARD"};if(m)m=!1;else{const F=o();if(typeof document<"u"&&F.length){for(const N of F)if(await N.blockerFn({currentLocation:u,nextLocation:L,action:I})){f=!0,t.history.go(1),_.notify(A);return}}}u=l(),_.notify(A)},b=L=>{if(p){p=!1;return}let P=!1;const R=o();if(typeof document<"u"&&R.length)for(const $ of R){const k=$.enableBeforeUnload??!0;if(k===!0){P=!0;break}if(typeof k=="function"&&k()===!0){P=!0;break}}if(P)return L.preventDefault(),L.returnValue=""},_=yC({getLocation:x,getLength:()=>t.history.length,pushState:(L,P)=>y("push",L,P),replaceState:(L,P)=>y("replace",L,P),back:L=>(L&&(m=!0),p=!0,t.history.back()),forward:L=>{L&&(m=!0),p=!0,t.history.forward()},go:L=>{c=!0,t.history.go(L)},createHref:L=>a(L),flush:v,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(Bm,b,{capture:!0}),t.removeEventListener($m,E)},onBlocked:()=>{d&&u!==d&&(u=d)},getBlockers:o,setBlockers:i,notifyOnIndexChange:!1});return t.addEventListener(Bm,b,{capture:!0}),t.addEventListener($m,E),t.history.pushState=function(...L){const P=n.apply(t.history,L);return _._ignoreSubscribers||S("PUSH"),P},t.history.replaceState=function(...L){const P=r.apply(t.history,L);return _._ignoreSubscribers||S("REPLACE"),P},_}function Jl(e,t){const n=e.indexOf("#"),r=e.indexOf("?"),s=Ph();return{href:e,pathname:e.substring(0,n>0?r>0?Math.min(n,r):n:r>0?r:e.length),hash:n>-1?e.substring(n):"",search:r>-1?e.slice(r,n===-1?void 0:n):"",state:t||{[Cr]:0,key:s,__TSR_key:s}}}function Ph(){return(Math.random()+1).toString(36).substring(7)}function eu(e){return e[e.length-1]}function vC(e){return typeof e=="function"}function pr(e,t){return vC(e)?e(t):e}const wC=Object.prototype.hasOwnProperty;function Ot(e,t){if(e===t)return e;const n=t,r=Wm(e)&&Wm(n);if(!r&&!(tu(e)&&tu(n)))return n;const s=r?e:Um(e);if(!s)return n;const o=r?n:Um(n);if(!o)return n;const i=s.length,a=o.length,l=r?new Array(a):{};let u=0;for(let d=0;d<a;d++){const c=r?d:o[d],f=e[c],m=n[c];if(f===m){l[c]=f,(r?d<i:wC.call(e,c))&&u++;continue}if(f===null||m===null||typeof f!="object"||typeof m!="object"){l[c]=m;continue}const p=Ot(f,m);l[c]=p,p===f&&u++}return i===a&&u===i?e:l}function Um(e){const t=[],n=Object.getOwnPropertyNames(e);for(const s of n){if(!Object.prototype.propertyIsEnumerable.call(e,s))return!1;t.push(s)}const r=Object.getOwnPropertySymbols(e);for(const s of r){if(!Object.prototype.propertyIsEnumerable.call(e,s))return!1;t.push(s)}return t}function tu(e){if(!Vm(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!Vm(n)||!n.hasOwnProperty("isPrototypeOf"))}function Vm(e){return Object.prototype.toString.call(e)==="[object Object]"}function Wm(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ns(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,s=e.length;r<s;r++)if(!ns(e[r],t[r],n))return!1;return!0}if(tu(e)&&tu(t)){const r=(n==null?void 0:n.ignoreUndefined)??!0;if(n!=null&&n.partial){for(const i in t)if((!r||t[i]!==void 0)&&!ns(e[i],t[i],n))return!1;return!0}let s=0;if(!r)s=Object.keys(e).length;else for(const i in e)e[i]!==void 0&&s++;let o=0;for(const i in t)if((!r||t[i]!==void 0)&&(o++,o>s||!ns(e[i],t[i],n)))return!1;return s===o}return!1}function vo(e){let t,n;const r=new Promise((s,o)=>{t=s,n=o});return r.status="pending",r.resolve=s=>{r.status="resolved",r.value=s,t(s),e==null||e(s)},r.reject=s=>{r.status="rejected",n(s)},r}function Nr(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function Km(e){try{return decodeURI(e)}catch{return e.replaceAll(/%[0-9A-F]{2}/gi,t=>{try{return decodeURI(t)}catch{return t}})}}function qm(e,t){if(!e)return e;const n=/%25|%5C/gi;let r=0,s="",o;for(;(o=n.exec(e))!==null;)s+=Km(e.slice(r,o.index))+o[0],r=n.lastIndex;return s+Km(r?e.slice(r):e)}var SC="Invariant failed";function Bn(e,t){if(!e)throw new Error(SC)}function nu(e){const t=new Map;let n,r;const s=o=>{o.next&&(o.prev?(o.prev.next=o.next,o.next.prev=o.prev,o.next=void 0,r&&(r.next=o,o.prev=r)):(o.next.prev=void 0,n=o.next,o.next=void 0,r&&(o.prev=r,r.next=o)),r=o)};return{get(o){const i=t.get(o);if(i)return s(i),i.value},set(o,i){if(t.size>=e&&n){const l=n;t.delete(l.key),l.next&&(n=l.next,l.next.prev=void 0),l===r&&(r=void 0)}const a=t.get(o);if(a)a.value=i,s(a);else{const l={key:o,value:i,prev:r};r&&(r.next=l),r=l,n||(n=l),t.set(o,l)}},clear(){t.clear(),n=void 0,r=void 0}}}const wo=0,ms=1,gs=2,Vi=3,$s=4,_C=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,bC=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,EC=/^([^{]*)\{\$\}([^}]*)$/;function Rh(e,t,n=new Uint16Array(6)){const r=e.indexOf("/",t),s=r===-1?e.length:r,o=e.substring(t,s);if(!o||!o.includes("$"))return n[0]=wo,n[1]=t,n[2]=t,n[3]=s,n[4]=s,n[5]=s,n;if(o==="$"){const u=e.length;return n[0]=gs,n[1]=t,n[2]=t,n[3]=u,n[4]=u,n[5]=u,n}if(o.charCodeAt(0)===36)return n[0]=ms,n[1]=t,n[2]=t+1,n[3]=s,n[4]=s,n[5]=s,n;const i=o.match(EC);if(i){const d=i[1].length;return n[0]=gs,n[1]=t+d,n[2]=t+d+1,n[3]=t+d+2,n[4]=t+d+3,n[5]=e.length,n}const a=o.match(bC);if(a){const u=a[1],d=a[2],c=a[3],f=u.length;return n[0]=Vi,n[1]=t+f,n[2]=t+f+3,n[3]=t+f+3+d.length,n[4]=s-c.length,n[5]=s,n}const l=o.match(_C);if(l){const u=l[1],d=l[2],c=l[3],f=u.length;return n[0]=ms,n[1]=t+f,n[2]=t+f+2,n[3]=t+f+2+d.length,n[4]=s-c.length,n[5]=s,n}return n[0]=wo,n[1]=t,n[2]=t,n[3]=s,n[4]=s,n[5]=s,n}function Au(e,t,n,r,s,o,i){var l,u,d,c,f;i==null||i(n);let a=r;{const m=n.fullPath??n.from,p=m.length,x=((l=n.options)==null?void 0:l.caseSensitive)??e;for(;a<p;){const g=Rh(m,a,t);let v;const y=a,S=g[5];switch(a=S+1,o++,g[0]){case wo:{const b=m.substring(g[2],g[3]);if(x){const _=(u=s.static)==null?void 0:u.get(b);if(_)v=_;else{s.static??(s.static=new Map);const C=Gs(n.fullPath??n.from);C.parent=s,C.depth=o,v=C,s.static.set(b,C)}}else{const _=b.toLowerCase(),C=(d=s.staticInsensitive)==null?void 0:d.get(_);if(C)v=C;else{s.staticInsensitive??(s.staticInsensitive=new Map);const M=Gs(n.fullPath??n.from);M.parent=s,M.depth=o,v=M,s.staticInsensitive.set(_,M)}}break}case ms:{const b=m.substring(y,g[1]),_=m.substring(g[4],S),C=x&&!!(b||_),M=b?C?b:b.toLowerCase():void 0,L=_?C?_:_.toLowerCase():void 0,P=(c=s.dynamic)==null?void 0:c.find(R=>R.caseSensitive===C&&R.prefix===M&&R.suffix===L);if(P)v=P;else{const R=Lc(ms,n.fullPath??n.from,C,M,L);v=R,R.depth=o,R.parent=s,s.dynamic??(s.dynamic=[]),s.dynamic.push(R)}break}case Vi:{const b=m.substring(y,g[1]),_=m.substring(g[4],S),C=x&&!!(b||_),M=b?C?b:b.toLowerCase():void 0,L=_?C?_:_.toLowerCase():void 0,P=(f=s.optional)==null?void 0:f.find(R=>R.caseSensitive===C&&R.prefix===M&&R.suffix===L);if(P)v=P;else{const R=Lc(Vi,n.fullPath??n.from,C,M,L);v=R,R.parent=s,R.depth=o,s.optional??(s.optional=[]),s.optional.push(R)}break}case gs:{const b=m.substring(y,g[1]),_=m.substring(g[4],S),C=x&&!!(b||_),M=b?C?b:b.toLowerCase():void 0,L=_?C?_:_.toLowerCase():void 0,P=Lc(gs,n.fullPath??n.from,C,M,L);v=P,P.parent=s,P.depth=o,s.wildcard??(s.wildcard=[]),s.wildcard.push(P)}}s=v}const w=(n.path||!n.children)&&!n.isRoot;if(w&&m.endsWith("/")){const g=Gs(n.fullPath??n.from);g.kind=$s,g.parent=s,o++,g.depth=o,s.index=g,s=g}w&&!s.route&&(s.route=n,s.fullPath=n.fullPath??n.from)}if(n.children)for(const m of n.children)Au(e,t,m,a,s,o,i)}function Tc(e,t){if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Fr(e){var t,n,r;if(e.static)for(const s of e.static.values())Fr(s);if(e.staticInsensitive)for(const s of e.staticInsensitive.values())Fr(s);if((t=e.dynamic)!=null&&t.length){e.dynamic.sort(Tc);for(const s of e.dynamic)Fr(s)}if((n=e.optional)!=null&&n.length){e.optional.sort(Tc);for(const s of e.optional)Fr(s)}if((r=e.wildcard)!=null&&r.length){e.wildcard.sort(Tc);for(const s of e.wildcard)Fr(s)}}function Gs(e){return{kind:wo,depth:0,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null}}function Lc(e,t,n,r,s){return{kind:e,depth:0,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,caseSensitive:n,prefix:r,suffix:s}}function CC(e,t){const n=Gs("/"),r=new Uint16Array(6);for(const s of e)Au(!1,r,s,1,n,0);Fr(n),t.masksTree=n,t.flatCache=nu(1e3)}function NC(e,t){e||(e="/");const n=t.flatCache.get(e);if(n)return n;const r=jh(e,t.masksTree);return t.flatCache.set(e,r),r}function kC(e,t,n,r,s){e||(e="/"),r||(r="/");const o=t?`case\0${e}`:e;let i=s.singleCache.get(o);if(!i){i=Gs("/");const a=new Uint16Array(6);Au(t,a,{from:e},1,i,0),s.singleCache.set(o,i)}return jh(r,i,n)}function PC(e,t,n=!1){const r=n?e:`nofuzz\0${e}`,s=t.matchCache.get(r);if(s!==void 0)return s;e||(e="/");const o=jh(e,t.segmentTree,n);return o&&(o.branch=TC(o.route)),t.matchCache.set(r,o),o}function RC(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function jC(e,t=!1,n){const r=Gs(e.fullPath),s=new Uint16Array(6),o={},i={};let a=0;return Au(t,s,e,1,r,0,u=>{if(n==null||n(u,a),Bn(!(u.id in o),`Duplicate routes found with id: ${String(u.id)}`),o[u.id]=u,a!==0&&u.path){const d=RC(u.fullPath);(!i[d]||u.fullPath.endsWith("/"))&&(i[d]=u)}a++}),Fr(r),{processedTree:{segmentTree:r,singleCache:nu(1e3),matchCache:nu(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:i}}function jh(e,t,n=!1){const r=e.split("/"),s=IC(e,r,t,n);if(!s)return null;const o=MC(e,r,s);return"**"in s&&(o["**"]=s["**"]),{route:s.node.route,params:o}}function MC(e,t,n){var i,a,l,u,d,c;const r=LC(n.node);let s=null;const o={};for(let f=0,m=0,p=0;m<r.length;f++,m++,p++){const x=r[m],w=t[f],g=p;if(w&&(p+=w.length),x.kind===ms){s??(s=n.node.fullPath.split("/"));const v=s[m],y=((i=x.prefix)==null?void 0:i.length)??0;if(v.charCodeAt(y)===123){const E=((a=x.suffix)==null?void 0:a.length)??0,b=v.substring(y+2,v.length-E-1),_=w.substring(y,w.length-E);o[b]=decodeURIComponent(_)}else{const E=v.substring(1);o[E]=decodeURIComponent(w)}}else if(x.kind===Vi){if(n.skipped&1<<m){f--;continue}s??(s=n.node.fullPath.split("/"));const v=s[m],y=((l=x.prefix)==null?void 0:l.length)??0,S=((u=x.suffix)==null?void 0:u.length)??0,E=v.substring(y+3,v.length-S-1),b=x.suffix||x.prefix?w.substring(y,w.length-S):w;b&&(o[E]=decodeURIComponent(b))}else if(x.kind===gs){const v=x,y=e.substring(g+(((d=v.prefix)==null?void 0:d.length)??0),e.length-(((c=v.suffix)==null?void 0:c.length)??0)),S=decodeURIComponent(y);o["*"]=S,o._splat=S;break}}return o}function TC(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function LC(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function IC(e,t,n,r){if(e==="/"&&n.index)return{node:n.index,skipped:0};const s=!eu(t),o=s&&e!=="/",i=t.length-(s?1:0),a=[{node:n,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let l=null,u=null,d=null;for(;a.length;){const c=a.pop();let{node:f,index:m,skipped:p,depth:x,statics:w,dynamics:g,optionals:v}=c;r&&f.route&&f.kind!==$s&&Go(u,c)&&(u=c);const y=m===i;if(y&&(f.route&&!o&&Go(d,c)&&(d=c),!f.optional&&!f.wildcard&&!f.index))continue;const S=y?void 0:t[m];let E;if(y&&f.index){const b={node:f.index,index:m,skipped:p,depth:x+1,statics:w,dynamics:g,optionals:v};if(w===i&&!g&&!v&&!p)return b;Go(d,b)&&(d=b)}if(f.wildcard&&Go(l,c))for(const b of f.wildcard){const{prefix:_,suffix:C}=b;if(!(_&&(y||!(b.caseSensitive?S:E??(E=S.toLowerCase())).startsWith(_)))){if(C){if(y)continue;const M=t.slice(m).join("/").slice(-C.length);if((b.caseSensitive?M:M.toLowerCase())!==C)continue}l={node:b,index:i,skipped:p,depth:x,statics:w,dynamics:g,optionals:v};break}}if(f.optional){const b=p|1<<x,_=x+1;for(let C=f.optional.length-1;C>=0;C--){const M=f.optional[C];a.push({node:M,index:m,skipped:b,depth:_,statics:w,dynamics:g,optionals:v})}if(!y)for(let C=f.optional.length-1;C>=0;C--){const M=f.optional[C],{prefix:L,suffix:P}=M;if(L||P){const R=M.caseSensitive?S:E??(E=S.toLowerCase());if(L&&!R.startsWith(L)||P&&!R.endsWith(P))continue}a.push({node:M,index:m+1,skipped:p,depth:_,statics:w,dynamics:g,optionals:v+1})}}if(!y&&f.dynamic&&S)for(let b=f.dynamic.length-1;b>=0;b--){const _=f.dynamic[b],{prefix:C,suffix:M}=_;if(C||M){const L=_.caseSensitive?S:E??(E=S.toLowerCase());if(C&&!L.startsWith(C)||M&&!L.endsWith(M))continue}a.push({node:_,index:m+1,skipped:p,depth:x+1,statics:w,dynamics:g+1,optionals:v})}if(!y&&f.staticInsensitive){const b=f.staticInsensitive.get(E??(E=S.toLowerCase()));b&&a.push({node:b,index:m+1,skipped:p,depth:x+1,statics:w+1,dynamics:g,optionals:v})}if(!y&&f.static){const b=f.static.get(S);b&&a.push({node:b,index:m+1,skipped:p,depth:x+1,statics:w+1,dynamics:g,optionals:v})}}if(d&&l)return Go(l,d)?d:l;if(d)return d;if(l)return l;if(r&&u){let c=u.index;for(let m=0;m<u.index;m++)c+=t[m].length;const f=c===e.length?"/":e.slice(c);return{node:u.node,skipped:u.skipped,"**":decodeURIComponent(f)}}return null}function Go(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===$s)>(e.node.kind===$s)||t.node.kind===$s==(e.node.kind===$s)&&t.depth>e.depth))):!0}function yl(e){return Mh(e.filter(t=>t!==void 0).join("/"))}function Mh(e){return e.replace(/\/{2,}/g,"/")}function uv(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function rs(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function cv(e){return rs(uv(e))}function ru(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function AC(e,t,n){return ru(e,n)===ru(t,n)}function OC({base:e,to:t,trailingSlash:n="never",cache:r}){const s=t.startsWith("/"),o=!s&&t===".";let i;if(r){i=s?t:o?e:e+"\0"+t;const c=r.get(i);if(c)return c}let a;if(o)a=e.split("/");else if(s)a=t.split("/");else{for(a=e.split("/");a.length>1&&eu(a)==="";)a.pop();const c=t.split("/");for(let f=0,m=c.length;f<m;f++){const p=c[f];p===""?f?f===m-1&&a.push(p):a=[p]:p===".."?a.pop():p==="."||a.push(p)}}a.length>1&&(eu(a)===""?n==="never"&&a.pop():n==="always"&&a.push(""));let l,u="";for(let c=0;c<a.length;c++){c>0&&(u+="/");const f=a[c];if(!f)continue;l=Rh(f,0,l);const m=l[0];if(m===wo){u+=f;continue}const p=l[5],x=f.substring(0,l[1]),w=f.substring(l[4],p),g=f.substring(l[2],l[3]);m===ms?u+=x||w?`${x}{$${g}}${w}`:`$${g}`:m===gs?u+=x||w?`${x}{$}${w}`:"$":u+=`${x}{-$${g}}${w}`}u=Mh(u);const d=u||"/";return i&&r&&r.set(i,d),d}function Ic(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?encodeURI(r):FC(r,n)}function Ac({path:e,params:t,decodeCharMap:n}){let r=!1;const s={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:s,isMissingParams:r};if(!e.includes("$"))return{interpolatedPath:e,usedParams:s,isMissingParams:r};const o=e.length;let i=0,a,l="";for(;i<o;){const d=i;a=Rh(e,d,a);const c=a[5];if(i=c+1,d===c)continue;const f=a[0];if(f===wo){l+="/"+e.substring(d,c);continue}if(f===gs){const m=t._splat;s._splat=m,s["*"]=m;const p=e.substring(d,a[1]),x=e.substring(a[4],c);if(!m){r=!0,(p||x)&&(l+="/"+p+x);continue}const w=Ic("_splat",t,n);l+="/"+p+w+x;continue}if(f===ms){const m=e.substring(a[2],a[3]);!r&&!(m in t)&&(r=!0),s[m]=t[m];const p=e.substring(d,a[1]),x=e.substring(a[4],c),w=Ic(m,t,n)??"undefined";l+="/"+p+w+x;continue}if(f===Vi){const m=e.substring(a[2],a[3]),p=t[m];if(p==null)continue;s[m]=p;const x=e.substring(d,a[1]),w=e.substring(a[4],c),g=Ic(m,t,n)??"";l+="/"+x+g+w;continue}}return e.endsWith("/")&&(l+="/"),{usedParams:s,interpolatedPath:l||"/",isMissingParams:r}}function FC(e,t){let n=encodeURIComponent(e);if(t)for(const[r,s]of t)n=n.replaceAll(r,s);return n}function Rt(e){return!!(e!=null&&e.isNotFound)}function DC(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const su="tsr-scroll-restoration-v1_3",zC=(e,t)=>{let n;return(...r)=>{n||(n=setTimeout(()=>{e(...r),n=null},t))}};function $C(){const e=DC();if(!e)return null;const t=e.getItem(su);let n=t?JSON.parse(t):{};return{state:n,set:r=>(n=pr(r,n)||n,e.setItem(su,JSON.stringify(n)))}}const Ka=$C(),lf=e=>e.state.__TSR_key||e.href;function BC(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let ou=!1;function dv({storageKey:e,key:t,behavior:n,shouldScrollRestoration:r,scrollToTopSelectors:s,location:o}){var u,d;let i;try{i=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(c){console.error(c);return}const a=t||((u=window.history.state)==null?void 0:u.__TSR_key),l=i[a];ou=!0;e:{if(r&&l&&Object.keys(l).length>0){for(const m in l){const p=l[m];if(m==="window")window.scrollTo({top:p.scrollY,left:p.scrollX,behavior:n});else if(m){const x=document.querySelector(m);x&&(x.scrollLeft=p.scrollX,x.scrollTop=p.scrollY)}}break e}const c=(o??window.location).hash.split("#",2)[1];if(c){const m=((d=window.history.state)==null?void 0:d.__hashScrollIntoViewOptions)??!0;if(m){const p=document.getElementById(c);p&&p.scrollIntoView(m)}break e}const f={top:0,left:0,behavior:n};if(window.scrollTo(f),s)for(const m of s){if(m==="window")continue;const p=typeof m=="function"?m():document.querySelector(m);p&&p.scrollTo(f)}}ou=!1}function HC(e,t){if(!Ka&&!e.isServer||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!Ka))return;e.isScrollRestorationSetup=!0,ou=!1;const r=e.options.getScrollRestorationKey||lf;window.history.scrollRestoration="manual";const s=o=>{if(ou||!e.isScrollRestoring)return;let i="";if(o.target===document||o.target===window)i="window";else{const l=o.target.getAttribute("data-scroll-restoration-id");l?i=`[data-scroll-restoration-id="${l}"]`:i=BC(o.target)}const a=r(e.state.location);Ka.set(l=>{const u=l[a]||(l[a]={}),d=u[i]||(u[i]={});if(i==="window")d.scrollX=window.scrollX||0,d.scrollY=window.scrollY||0;else if(i){const c=document.querySelector(i);c&&(d.scrollX=c.scrollLeft||0,d.scrollY=c.scrollTop||0)}return l})};typeof document<"u"&&document.addEventListener("scroll",zC(s,100),!0),e.subscribe("onRendered",o=>{const i=r(o.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(dv({storageKey:su,key:i,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&Ka.set(a=>(a[i]||(a[i]={}),a)))})}function UC(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function VC(e,t=String){const n=new URLSearchParams;for(const r in e){const s=e[r];s!==void 0&&n.set(r,t(s))}return n.toString()}function Oc(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function WC(e){const t=new URLSearchParams(e),n={};for(const[r,s]of t.entries()){const o=n[r];o==null?n[r]=Oc(s):Array.isArray(o)?o.push(Oc(s)):n[r]=[o,Oc(s)]}return n}const KC=QC(JSON.parse),qC=GC(JSON.stringify,JSON.parse);function QC(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=WC(t);for(const r in n){const s=n[r];if(typeof s=="string")try{n[r]=e(s)}catch{}}return n}}function GC(e,t){const n=typeof t=="function";function r(s){if(typeof s=="object"&&s!==null)try{return e(s)}catch{}else if(n&&typeof s=="string")try{return t(s),e(s)}catch{}return s}return s=>{const o=VC(s,r);return o?`?${o}`:""}}const Ct="__root__";function XC(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function Ht(e){return e instanceof Response&&!!e.options}const xl=e=>{var t;if(!e.rendered)return e.rendered=!0,(t=e.onReady)==null?void 0:t.call(e)},Ou=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),Th=(e,t,n=!0)=>{const r={...e.router.options.context??{}},s=n?t:t-1;for(let o=0;o<=s;o++){const i=e.matches[o];if(!i)continue;const a=e.router.getMatch(i.id);a&&Object.assign(r,a.__routeContext,a.__beforeLoadContext)}return r},fv=(e,t)=>{var s;const n=e.router.routesById[t.routeId??""]??e.router.routeTree;!n.options.notFoundComponent&&((s=e.router.options)!=null&&s.defaultNotFoundComponent)&&(n.options.notFoundComponent=e.router.options.defaultNotFoundComponent),Bn(n.options.notFoundComponent);const r=e.matches.find(o=>o.routeId===n.id);Bn(r,"Could not find match for route: "+n.id),e.updateMatch(r.id,o=>({...o,status:"notFound",error:t,isFetching:!1})),t.routerCode==="BEFORE_LOAD"&&n.parentRoute&&(t.routeId=n.parentRoute.id,fv(e,t))},mr=(e,t,n)=>{var r,s,o;if(!(!Ht(n)&&!Rt(n))){if(Ht(n)&&n.redirectHandled&&!n.options.reloadDocument)throw n;if(t){(r=t._nonReactive.beforeLoadPromise)==null||r.resolve(),(s=t._nonReactive.loaderPromise)==null||s.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;const i=Ht(n)?"redirected":"notFound";t._nonReactive.error=n,e.updateMatch(t.id,a=>({...a,status:i,isFetching:!1,error:n})),Rt(n)&&!n.routeId&&(n.routeId=t.routeId),(o=t._nonReactive.loadPromise)==null||o.resolve()}throw Ht(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(fv(e,n),n)}},hv=(e,t)=>{const n=e.router.getMatch(t);return!!(!e.router.isServer&&n._nonReactive.dehydrated||e.router.isServer&&n.ssr===!1)},Xo=(e,t,n,r)=>{var a,l;const{id:s,routeId:o}=e.matches[t],i=e.router.looseRoutesById[o];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??(e.firstBadMatchIndex=t),mr(e,e.router.getMatch(s),n);try{(l=(a=i.options).onError)==null||l.call(a,n)}catch(u){n=u,mr(e,e.router.getMatch(s),n)}e.updateMatch(s,u=>{var d,c;return(d=u._nonReactive.beforeLoadPromise)==null||d.resolve(),u._nonReactive.beforeLoadPromise=void 0,(c=u._nonReactive.loadPromise)==null||c.resolve(),{...u,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}})},YC=(e,t,n,r)=>{var m;const s=e.router.getMatch(t),o=(m=e.matches[n-1])==null?void 0:m.id,i=o?e.router.getMatch(o):void 0;if(e.router.isShell()){s.ssr=r.id===Ct;return}if((i==null?void 0:i.ssr)===!1){s.ssr=!1;return}const a=p=>p===!0&&(i==null?void 0:i.ssr)==="data-only"?"data-only":p,l=e.router.options.defaultSsr??!0;if(r.options.ssr===void 0){s.ssr=a(l);return}if(typeof r.options.ssr!="function"){s.ssr=a(r.options.ssr);return}const{search:u,params:d}=s,c={search:qa(u,s.searchError),params:qa(d,s.paramsError),location:e.location,matches:e.matches.map(p=>({index:p.index,pathname:p.pathname,fullPath:p.fullPath,staticData:p.staticData,id:p.id,routeId:p.routeId,search:qa(p.search,p.searchError),params:qa(p.params,p.paramsError),ssr:p.ssr}))},f=r.options.ssr(c);if(Nr(f))return f.then(p=>{s.ssr=a(p??l)});s.ssr=a(f??l)},pv=(e,t,n,r)=>{var i;if(r._nonReactive.pendingTimeout!==void 0)return;const s=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!e.router.isServer&&!Ou(e,t)&&(n.options.loader||n.options.beforeLoad||yv(n))&&typeof s=="number"&&s!==1/0&&(n.options.pendingComponent??((i=e.router.options)==null?void 0:i.defaultPendingComponent)))){const a=setTimeout(()=>{xl(e)},s);r._nonReactive.pendingTimeout=a}},ZC=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;pv(e,t,n,r);const s=()=>{const o=e.router.getMatch(t);o.preload&&(o.status==="redirected"||o.status==="notFound")&&mr(e,o,o.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(s):s()},JC=(e,t,n,r)=>{var b;const s=e.router.getMatch(t),o=s._nonReactive.loadPromise;s._nonReactive.loadPromise=vo(()=>{o==null||o.resolve()});const{paramsError:i,searchError:a}=s;i&&Xo(e,n,i,"PARSE_PARAMS"),a&&Xo(e,n,a,"VALIDATE_SEARCH"),pv(e,t,r,s);const l=new AbortController,u=(b=e.matches[n-1])==null?void 0:b.id,d=u?e.router.getMatch(u):void 0;(d==null?void 0:d.context)??e.router.options.context;let c=!1;const f=()=>{c||(c=!0,e.updateMatch(t,_=>({..._,isFetching:"beforeLoad",fetchCount:_.fetchCount+1,abortController:l})))},m=()=>{var _;(_=s._nonReactive.beforeLoadPromise)==null||_.resolve(),s._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,C=>({...C,isFetching:!1}))};if(!r.options.beforeLoad){_i(()=>{f(),m()});return}s._nonReactive.beforeLoadPromise=vo();const p={...Th(e,n,!1),...s.__routeContext},{search:x,params:w,cause:g}=s,v=Ou(e,t),y={search:x,abortController:l,params:w,preload:v,context:p,location:e.location,navigate:_=>e.router.navigate({..._,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:v?"preload":g,matches:e.matches,...e.router.options.additionalContext},S=_=>{if(_===void 0){_i(()=>{f(),m()});return}(Ht(_)||Rt(_))&&(f(),Xo(e,n,_,"BEFORE_LOAD")),_i(()=>{f(),e.updateMatch(t,C=>({...C,__beforeLoadContext:_})),m()})};let E;try{if(E=r.options.beforeLoad(y),Nr(E))return f(),E.catch(_=>{Xo(e,n,_,"BEFORE_LOAD")}).then(S)}catch(_){f(),Xo(e,n,_,"BEFORE_LOAD")}S(E)},eN=(e,t)=>{const{id:n,routeId:r}=e.matches[t],s=e.router.looseRoutesById[r],o=()=>{if(e.router.isServer){const l=YC(e,n,t,s);if(Nr(l))return l.then(a)}return a()},i=()=>JC(e,n,t,s),a=()=>{if(hv(e,n))return;const l=ZC(e,n,s);return Nr(l)?l.then(i):i()};return o()},tN=(e,t,n)=>{var o,i,a,l,u,d;const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const s={matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([(i=(o=n.options).head)==null?void 0:i.call(o,s),(l=(a=n.options).scripts)==null?void 0:l.call(a,s),(d=(u=n.options).headers)==null?void 0:d.call(u,s)]).then(([c,f,m])=>{const p=c==null?void 0:c.meta,x=c==null?void 0:c.links,w=c==null?void 0:c.scripts,g=c==null?void 0:c.styles;return{meta:p,links:x,headScripts:w,headers:m,scripts:f,styles:g}})},mv=(e,t,n,r)=>{const s=e.matchPromises[n-1],{params:o,loaderDeps:i,abortController:a,cause:l}=e.router.getMatch(t),u=Th(e,n),d=Ou(e,t);return{params:o,deps:i,preload:!!d,parentMatchPromise:s,abortController:a,context:u,location:e.location,navigate:c=>e.router.navigate({...c,_fromLocation:e.location}),cause:d?"preload":l,route:r,...e.router.options.additionalContext}},Qm=async(e,t,n,r)=>{var s,o,i,a,l,u;try{const d=e.router.getMatch(t);try{(!e.router.isServer||d.ssr===!0)&&gv(r);const c=(o=(s=r.options).loader)==null?void 0:o.call(s,mv(e,t,n,r)),f=r.options.loader&&Nr(c);if(!!(f||r._lazyPromise||r._componentsPromise||r.options.head||r.options.scripts||r.options.headers||d._nonReactive.minPendingPromise)&&e.updateMatch(t,x=>({...x,isFetching:"loader"})),r.options.loader){const x=f?await c:c;mr(e,e.router.getMatch(t),x),x!==void 0&&e.updateMatch(t,w=>({...w,loaderData:x}))}r._lazyPromise&&await r._lazyPromise;const p=d._nonReactive.minPendingPromise;p&&await p,r._componentsPromise&&await r._componentsPromise,e.updateMatch(t,x=>({...x,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(c){let f=c;const m=d._nonReactive.minPendingPromise;m&&await m,Rt(c)&&await((a=(i=r.options.notFoundComponent)==null?void 0:i.preload)==null?void 0:a.call(i)),mr(e,e.router.getMatch(t),c);try{(u=(l=r.options).onError)==null||u.call(l,c)}catch(p){f=p,mr(e,e.router.getMatch(t),p)}e.updateMatch(t,p=>({...p,error:f,status:"error",isFetching:!1}))}}catch(d){const c=e.router.getMatch(t);c&&(c._nonReactive.loaderPromise=void 0),mr(e,c,d)}},nN=async(e,t)=>{var d,c;const{id:n,routeId:r}=e.matches[t];let s=!1,o=!1;const i=e.router.looseRoutesById[r],a=()=>{e.updateMatch(n,f=>({...f,context:Th(e,t)}))};if(hv(e,n)){if(e.router.isServer)return e.router.getMatch(n)}else{const f=e.router.getMatch(n);if(f._nonReactive.loaderPromise){if(f.status==="success"&&!e.sync&&!f.preload)return f;await f._nonReactive.loaderPromise;const m=e.router.getMatch(n),p=m._nonReactive.error||m.error;p&&mr(e,m,p)}else{const m=Date.now()-f.updatedAt,p=Ou(e,n),x=p?i.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:i.options.staleTime??e.router.options.defaultStaleTime??0,w=i.options.shouldReload,g=typeof w=="function"?w(mv(e,n,t,i)):w,v=!!p&&!e.router.state.matches.some(b=>b.id===n),y=e.router.getMatch(n);y._nonReactive.loaderPromise=vo(),v!==y.preload&&e.updateMatch(n,b=>({...b,preload:v}));const{status:S,invalid:E}=y;s=S==="success"&&(E||(g??m>x)),p&&i.options.preload===!1||(s&&!e.sync?(o=!0,(async()=>{var b,_;try{await Qm(e,n,t,i),a();const C=e.router.getMatch(n);(b=C._nonReactive.loaderPromise)==null||b.resolve(),(_=C._nonReactive.loadPromise)==null||_.resolve(),C._nonReactive.loaderPromise=void 0}catch(C){Ht(C)&&await e.router.navigate(C.options)}})()):(S!=="success"||s&&e.sync)&&await Qm(e,n,t,i))}}const l=e.router.getMatch(n);o||((d=l._nonReactive.loaderPromise)==null||d.resolve(),(c=l._nonReactive.loadPromise)==null||c.resolve()),clearTimeout(l._nonReactive.pendingTimeout),l._nonReactive.pendingTimeout=void 0,o||(l._nonReactive.loaderPromise=void 0),l._nonReactive.dehydrated=void 0,o||a();const u=o?l.isFetching:!1;return u!==l.isFetching||l.invalid!==!1?(e.updateMatch(n,f=>({...f,isFetching:u,invalid:!1})),e.router.getMatch(n)):l};async function Gm(e){const t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(n=>n._forcePending)&&xl(t);try{for(let a=0;a<t.matches.length;a++){const l=eN(t,a);Nr(l)&&await l}const n=t.firstBadMatchIndex??t.matches.length;for(let a=0;a<n;a++)t.matchPromises.push(nN(t,a));const s=(await Promise.allSettled(t.matchPromises)).filter(a=>a.status==="rejected").map(a=>a.reason);let o;for(const a of s){if(Ht(a))throw a;!o&&Rt(a)&&(o=a)}for(const a of t.matches){const{id:l,routeId:u}=a,d=t.router.looseRoutesById[u];try{const c=tN(t,l,d);if(c){const f=await c;t.updateMatch(l,m=>({...m,...f}))}}catch(c){console.error(`Error executing head for route ${u}:`,c)}}if(o)throw o;const i=xl(t);Nr(i)&&await i}catch(n){if(Rt(n)&&!t.preload){const r=xl(t);throw Nr(r)&&await r,n}if(Ht(n))throw n}return t.matches}async function gv(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{var r;const n=[];for(const s of xv){const o=(r=e.options[s])==null?void 0:r.preload;o&&n.push(o())}if(n.length)return Promise.all(n).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function qa(e,t){return t?{status:"error",error:t}:{status:"success",value:e}}function yv(e){var t;for(const n of xv)if((t=e.options[n])!=null&&t.preload)return!0;return!1}const xv=["component","errorComponent","pendingComponent","notFoundComponent"];function rN(e){return{input:({url:t})=>{for(const n of e)t=vv(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=wv(e[n],t);return t}}}function sN(e){const t=cv(e.basepath),n=`/${t}`,r=`${n}/`,s=e.caseSensitive?n:n.toLowerCase(),o=e.caseSensitive?r:r.toLowerCase();return{input:({url:i})=>{const a=e.caseSensitive?i.pathname:i.pathname.toLowerCase();return a===s?i.pathname="/":a.startsWith(o)&&(i.pathname=i.pathname.slice(n.length)),i},output:({url:i})=>(i.pathname=yl(["/",t,i.pathname]),i)}}function vv(e,t){var r;const n=(r=e==null?void 0:e.input)==null?void 0:r.call(e,{url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function wv(e,t){var r;const n=(r=e==null?void 0:e.output)==null?void 0:r.call(e,{url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function ss(e){const t=e.resolvedLocation,n=e.location,r=(t==null?void 0:t.pathname)!==n.pathname,s=(t==null?void 0:t.href)!==n.href,o=(t==null?void 0:t.hash)!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:r,hrefChanged:s,hashChanged:o}}class oN{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{var f;n.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const r=this.options,s=this.basepath??(r==null?void 0:r.basepath)??"/",o=this.basepath===void 0,i=r==null?void 0:r.rewrite;this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(m=>[encodeURIComponent(m),m])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=xC())),this.origin=this.options.origin,this.origin||(!this.isServer&&(window!=null&&window.origin)&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),!this.__store&&this.latestLocation&&(this.__store=new gC(aN(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(m=>!["redirected"].includes(m.status))}}}),HC(this));let a=!1;const l=this.options.basepath??"/",u=this.options.rewrite;if(o||s!==l||i!==u){this.basepath=l;const m=[];cv(l)!==""&&m.push(sN({basepath:l})),u&&m.push(u),this.rewrite=m.length===0?void 0:m.length===1?m[0]:rN(m),this.history&&this.updateLatestLocation(),a=!0}a&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<"u"&&"CSS"in window&&typeof((f=window.CSS)==null?void 0:f.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const{routesById:n,routesByPath:r,processedTree:s}=jC(this.routeTree,this.options.caseSensitive,(i,a)=>{i.init({originalIndex:a})});this.options.routeMasks&&CC(this.options.routeMasks,s),this.routesById=n,this.routesByPath=r,this.processedTree=s;const o=this.options.notFoundRoute;o&&(o.init({originalIndex:99999999999}),this.routesById[o.id]=o)},this.subscribe=(n,r)=>{const s={eventType:n,fn:r};return this.subscribers.add(s),()=>{this.subscribers.delete(s)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const s=({href:l,state:u})=>{const d=new URL(l,this.origin),c=vv(this.rewrite,d),f=this.options.parseSearch(c.search),m=this.options.stringifySearch(f);return c.search=m,{href:c.href.replace(c.origin,""),publicHref:l,url:c,pathname:qm(c.pathname),searchStr:m,search:Ot(r==null?void 0:r.search,f),hash:c.hash.split("#").reverse()[0]??"",state:Ot(r==null?void 0:r.state,u)}},o=s(n),{__tempLocation:i,__tempKey:a}=o.state;if(i&&(!a||a===this.tempLocationKey)){const l=s(i);return l.state.key=o.state.key,l.state.__TSR_key=o.state.__TSR_key,delete l.state.__tempLocation,{...l,maskedLocation:o}}return o},this.resolvePathCache=nu(1e3),this.resolvePathWithBase=(n,r)=>OC({base:n,to:Mh(r),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,s)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},s):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>lN({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const n=this.state.matches.filter(o=>o.status==="pending"),r=this.state.matches.filter(o=>o.isFetching==="loader");new Set([...this.state.pendingMatches??[],...n,...r]).forEach(o=>{this.cancelMatch(o.id)})},this.buildLocation=n=>{const r=(o={})=>{var L,P;const i=o._fromLocation||this.pendingBuiltLocation||this.latestLocation,a=this.matchRoutes(i,{_buildLocation:!0}),l=eu(a);o.from;const u=o.unsafeRelative==="path"?i.pathname:o.from??l.fullPath,d=this.resolvePathWithBase(u,"."),c=l.search,f={...l.params},m=o.to?this.resolvePathWithBase(d,`${o.to}`):this.resolvePathWithBase(d,"."),p=o.params===!1||o.params===null?{}:(o.params??!0)===!0?f:Object.assign(f,pr(o.params,f)),x=Ac({path:m,params:p}).interpolatedPath,w=this.matchRoutes(x,void 0,{_buildLocation:!0}).map(R=>this.looseRoutesById[R.routeId]);if(Object.keys(p).length>0)for(const R of w){const $=((L=R.options.params)==null?void 0:L.stringify)??R.options.stringifyParams;$&&Object.assign(p,$(p))}const g=n.leaveParams?m:qm(Ac({path:m,params:p,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath);let v=c;if(n._includeValidateSearch&&((P=this.options.search)!=null&&P.strict)){const R={};w.forEach($=>{if($.options.validateSearch)try{Object.assign(R,uf($.options.validateSearch,{...R,...v}))}catch{}}),v=R}v=uN({search:v,dest:o,destRoutes:w,_includeValidateSearch:n._includeValidateSearch}),v=Ot(c,v);const y=this.options.stringifySearch(v),S=o.hash===!0?i.hash:o.hash?pr(o.hash,i.hash):void 0,E=S?`#${S}`:"";let b=o.state===!0?i.state:o.state?pr(o.state,i.state):{};b=Ot(i.state,b);const _=`${g}${y}${E}`,C=new URL(_,this.origin),M=wv(this.rewrite,C);return{publicHref:M.pathname+M.search+M.hash,href:_,url:M,pathname:g,search:v,searchStr:y,state:b,hash:S??"",unmaskOnReload:o.unmaskOnReload}},s=(o={},i)=>{const a=r(o);let l=i?r(i):void 0;if(!l){const u={};if(this.options.routeMasks){const d=NC(a.pathname,this.processedTree);if(d){Object.assign(u,d.params);const{from:c,params:f,...m}=d.route,p=f===!1||f===null?{}:(f??!0)===!0?u:Object.assign(u,pr(f,u));i={from:n.from,...m,params:p},l=r(i)}}}return l&&(a.maskedLocation=l),a};return n.mask?s(n,{from:n.from,...n.mask}):s(n)},this.commitLocation=({viewTransition:n,ignoreBlocker:r,...s})=>{const o=()=>{const l=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];l.forEach(d=>{s.state[d]=this.latestLocation.state[d]});const u=ns(s.state,this.latestLocation.state);return l.forEach(d=>{delete s.state[d]}),u},i=rs(this.latestLocation.href)===rs(s.href),a=this.commitLocationPromise;if(this.commitLocationPromise=vo(()=>{a==null||a.resolve()}),i&&o())this.load();else{let{maskedLocation:l,hashScrollIntoView:u,url:d,...c}=s;l&&(c={...l,state:{...l.state,__tempKey:void 0,__tempLocation:{...c,search:c.searchStr,state:{...c.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(c.unmaskOnReload??this.options.unmaskOnReload??!1)&&(c.state.__tempKey=this.tempLocationKey)),c.state.__hashScrollIntoViewOptions=u??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[s.replace?"replace":"push"](c.publicHref,c.state,{ignoreBlocker:r})}return this.resetNextScroll=s.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:s,viewTransition:o,ignoreBlocker:i,href:a,...l}={})=>{if(a){const c=this.history.location.state.__TSR_index,f=Jl(a,{__TSR_index:n?c:c+1});l.to=f.pathname,l.search=this.options.parseSearch(f.search),l.hash=f.hash.slice(1)}const u=this.buildLocation({...l,_includeValidateSearch:!0});this.pendingBuiltLocation=u;const d=this.commitLocation({...u,viewTransition:o,replace:n,resetScroll:r,hashScrollIntoView:s,ignoreBlocker:i});return Promise.resolve().then(()=>{this.pendingBuiltLocation===u&&(this.pendingBuiltLocation=void 0)}),d},this.navigate=async({to:n,reloadDocument:r,href:s,publicHref:o,...i})=>{var l;let a=!1;if(s)try{new URL(`${s}`),a=!0}catch{}if(a&&!r&&(r=!0),r){if(!s||!o&&!a){const d=this.buildLocation({to:n,...i});s=s??d.url.href,o=o??d.url.href}const u=!a&&o?o:s;if(!i.ignoreBlocker){const d=this.history,c=((l=d.getBlockers)==null?void 0:l.call(d))??[];for(const f of c)if(f!=null&&f.blockerFn&&await f.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return i.replace?window.location.replace(u):window.location.href=u,Promise.resolve()}return this.buildAndCommitLocation({...i,href:s,to:n,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){const r=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(this.latestLocation.publicHref!==r.publicHref||r.url.origin!==this.origin){const s=this.getParsedLocationHref(r);throw XC({href:s})}}const n=this.matchRoutes(this.latestLocation);this.__store.setState(r=>({...r,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:r.cachedMatches.filter(s=>!n.some(o=>o.id===s.id))}))},this.load=async n=>{let r,s,o;for(o=new Promise(a=>{this.startTransition(async()=>{var l;try{this.beforeLoad();const u=this.latestLocation,d=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...ss({resolvedLocation:d,location:u})}),this.emit({type:"onBeforeLoad",...ss({resolvedLocation:d,location:u})}),await Gm({router:this,sync:n==null?void 0:n.sync,matches:this.state.pendingMatches,location:u,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let c=[],f=[],m=[];_i(()=>{this.__store.setState(p=>{const x=p.matches,w=p.pendingMatches||p.matches;return c=x.filter(g=>!w.some(v=>v.id===g.id)),f=w.filter(g=>!x.some(v=>v.id===g.id)),m=w.filter(g=>x.some(v=>v.id===g.id)),{...p,isLoading:!1,loadedAt:Date.now(),matches:w,pendingMatches:void 0,cachedMatches:[...p.cachedMatches,...c.filter(g=>g.status!=="error"&&g.status!=="notFound")]}}),this.clearExpiredCache()}),[[c,"onLeave"],[f,"onEnter"],[m,"onStay"]].forEach(([p,x])=>{p.forEach(w=>{var g,v;(v=(g=this.looseRoutesById[w.routeId].options)[x])==null||v.call(g,w)})})})})}})}catch(u){Ht(u)?(r=u,this.isServer||this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):Rt(u)&&(s=u),this.__store.setState(d=>({...d,statusCode:r?r.status:s?404:d.matches.some(c=>c.status==="error")?500:200,redirect:r}))}this.latestLoadPromise===o&&((l=this.commitLocationPromise)==null||l.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),a()})}),this.latestLoadPromise=o,await o;this.latestLoadPromise&&o!==this.latestLoadPromise;)await this.latestLoadPromise;let i;this.hasNotFoundMatch()?i=404:this.__store.state.matches.some(a=>a.status==="error")&&(i=500),i!==void 0&&this.__store.setState(a=>({...a,statusCode:i}))},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let s;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const o=this.latestLocation,i=this.state.resolvedLocation,a=typeof r.types=="function"?r.types(ss({resolvedLocation:i,location:o})):r.types;if(a===!1){n();return}s={update:n,types:a}}else s=n;document.startViewTransition(s)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{var o;const s=(o=this.state.pendingMatches)!=null&&o.some(i=>i.id===n)?"pendingMatches":this.state.matches.some(i=>i.id===n)?"matches":this.state.cachedMatches.some(i=>i.id===n)?"cachedMatches":"";s&&this.__store.setState(i=>{var a;return{...i,[s]:(a=i[s])==null?void 0:a.map(l=>l.id===n?r(l):l)}})})},this.getMatch=n=>{var s;const r=o=>o.id===n;return this.state.cachedMatches.find(r)??((s=this.state.pendingMatches)==null?void 0:s.find(r))??this.state.matches.find(r)},this.invalidate=n=>{const r=s=>{var o;return((o=n==null?void 0:n.filter)==null?void 0:o.call(n,s))??!0?{...s,invalid:!0,...n!=null&&n.forcePending||s.status==="error"||s.status==="notFound"?{status:"pending",error:void 0}:void 0}:s};return this.__store.setState(s=>{var o;return{...s,matches:s.matches.map(r),cachedMatches:s.cachedMatches.map(r),pendingMatches:(o=s.pendingMatches)==null?void 0:o.map(r)}}),this.shouldViewTransition=!1,this.load({sync:n==null?void 0:n.sync})},this.getParsedLocationHref=n=>{let r=n.url.href;return this.origin&&n.url.origin===this.origin&&(r=r.replace(this.origin,"")||"/"),r},this.resolveRedirect=n=>{if(!n.options.href){const r=this.buildLocation(n.options),s=this.getParsedLocationHref(r);n.options.href=r.href,n.headers.set("Location",s)}return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n==null?void 0:n.filter;r!==void 0?this.__store.setState(s=>({...s,cachedMatches:s.cachedMatches.filter(o=>!r(o))})):this.__store.setState(s=>({...s,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=r=>{const s=this.looseRoutesById[r.routeId];if(!s.options.loader)return!0;const o=(r.preload?s.options.preloadGcTime??this.options.defaultPreloadGcTime:s.options.gcTime??this.options.defaultGcTime)??5*60*1e3;return r.status==="error"?!0:Date.now()-r.updatedAt>=o};this.clearCache({filter:n})},this.loadRouteChunk=gv,this.preloadRoute=async n=>{const r=this.buildLocation(n);let s=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const o=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(a=>a.id)),i=new Set([...o,...this.state.cachedMatches.map(a=>a.id)]);_i(()=>{s.forEach(a=>{i.has(a.id)||this.__store.setState(l=>({...l,cachedMatches:[...l.cachedMatches,a]}))})});try{return s=await Gm({router:this,matches:s,location:r,preload:!0,updateMatch:(a,l)=>{o.has(a)?s=s.map(u=>u.id===a?l(u):u):this.updateMatch(a,l)}}),s}catch(a){if(Ht(a))return a.options.reloadDocument?void 0:await this.preloadRoute({...a.options,_fromLocation:r});Rt(a)||console.error(a);return}},this.matchRoute=(n,r)=>{const s={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},o=this.buildLocation(s);if(r!=null&&r.pending&&this.state.status!=="pending")return!1;const a=((r==null?void 0:r.pending)===void 0?!this.state.isLoading:r.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,l=kC(o.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,a.pathname,this.processedTree);return!l||n.params&&!ns(l.params,n.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?ns(a.search,o.search,{partial:!0})?l.params:!1:l.params},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??qC,parseSearch:t.parseSearch??KC}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(t,n){const r=this.getMatchedRoutes(t.pathname),{foundRoute:s,routeParams:o}=r;let{matchedRoutes:i}=r,a=!1;(s?s.path!=="/"&&o["**"]:rs(t.pathname))&&(this.options.notFoundRoute?i=[...i,this.options.notFoundRoute]:a=!0);const l=(()=>{if(a){if(this.options.notFoundMode!=="root")for(let c=i.length-1;c>=0;c--){const f=i[c];if(f.children)return f.id}return Ct}})(),u=[],d=c=>(c==null?void 0:c.id)?c.context??this.options.context??void 0:this.options.context??void 0;return i.forEach((c,f)=>{var $,k,I;const m=u[f-1],[p,x,w]=(()=>{const A=(m==null?void 0:m.search)??t.search,F=(m==null?void 0:m._strictSearch)??void 0;try{const N=uf(c.options.validateSearch,{...A})??void 0;return[{...A,...N},{...F,...N},void 0]}catch(N){let T=N;if(N instanceof iu||(T=new iu(N.message,{cause:N})),n!=null&&n.throwOnError)throw T;return[A,{},T]}})(),g=((k=($=c.options).loaderDeps)==null?void 0:k.call($,{search:p}))??"",v=g?JSON.stringify(g):"",{interpolatedPath:y,usedParams:S}=Ac({path:c.fullPath,params:o,decodeCharMap:this.pathParamsDecodeCharMap}),E=c.id+y+v,b=this.getMatch(E),_=this.state.matches.find(A=>A.routeId===c.id),C=(b==null?void 0:b._strictParams)??S;let M;if(!b){const A=((I=c.options.params)==null?void 0:I.parse)??c.options.parseParams;if(A)try{Object.assign(C,A(C))}catch(F){if(Rt(F)||Ht(F)?M=F:M=new iN(F.message,{cause:F}),n!=null&&n.throwOnError)throw M}}Object.assign(o,C);const L=_?"stay":"enter";let P;if(b)P={...b,cause:L,params:_?Ot(_.params,o):o,_strictParams:C,search:Ot(_?_.search:b.search,p),_strictSearch:x};else{const A=c.options.loader||c.options.beforeLoad||c.lazyFn||yv(c)?"pending":"success";P={id:E,ssr:this.isServer?void 0:c.options.ssr,index:f,routeId:c.id,params:_?Ot(_.params,o):o,_strictParams:C,pathname:y,updatedAt:Date.now(),search:_?Ot(_.search,p):p,_strictSearch:x,searchError:void 0,status:A,isFetching:!1,error:void 0,paramsError:M,__routeContext:void 0,_nonReactive:{loadPromise:vo()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:L,loaderDeps:_?Ot(_.loaderDeps,g):g,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:c.options.staticData||{},fullPath:c.fullPath}}n!=null&&n.preload||(P.globalNotFound=l===c.id),P.searchError=w;const R=d(m);P.context={...R,...P.__routeContext,...P.__beforeLoadContext},u.push(P)}),u.forEach((c,f)=>{const m=this.looseRoutesById[c.routeId];if(!this.getMatch(c.id)&&(n==null?void 0:n._buildLocation)!==!0){const x=u[f-1],w=d(x);if(m.options.context){const g={deps:c.loaderDeps,params:c.params,context:w??{},location:t,navigate:v=>this.navigate({...v,_fromLocation:t}),buildLocation:this.buildLocation,cause:c.cause,abortController:c.abortController,preload:!!c.preload,matches:u};c.__routeContext=m.options.context(g)??void 0}c.context={...w,...c.__routeContext,...c.__beforeLoadContext}}}),u}}class iu extends Error{}class iN extends Error{}function aN(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function uf(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new iu("Async validation not supported");if(n.issues)throw new iu(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function lN({pathname:e,routesById:t,processedTree:n}){const r={},s=rs(e);let o;const i=PC(s,n,!0);return i&&(o=i.route,Object.assign(r,i.params)),{matchedRoutes:(i==null?void 0:i.branch)||[t[Ct]],routeParams:r,foundRoute:o}}function uN({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){const s=n.reduce((a,l)=>{var d;const u=[];if("search"in l.options)(d=l.options.search)!=null&&d.middlewares&&u.push(...l.options.search.middlewares);else if(l.options.preSearchFilters||l.options.postSearchFilters){const c=({search:f,next:m})=>{let p=f;"preSearchFilters"in l.options&&l.options.preSearchFilters&&(p=l.options.preSearchFilters.reduce((w,g)=>g(w),f));const x=m(p);return"postSearchFilters"in l.options&&l.options.postSearchFilters?l.options.postSearchFilters.reduce((w,g)=>g(w),x):x};u.push(c)}if(r&&l.options.validateSearch){const c=({search:f,next:m})=>{const p=m(f);try{return{...p,...uf(l.options.validateSearch,p)??void 0}}catch{return p}};u.push(c)}return a.concat(u)},[])??[],o=({search:a})=>t.search?t.search===!0?a:pr(t.search,a):{};s.push(o);const i=(a,l)=>{if(a>=s.length)return l;const u=s[a];return u({search:l,next:c=>i(a+1,c)})};return i(0,e)}const cN="Error preloading route! ☝️";class Sv{constructor(t){if(this.init=n=>{var u,d;this.originalIndex=n.originalIndex;const r=this.options,s=!(r!=null&&r.path)&&!(r!=null&&r.id);this.parentRoute=(d=(u=this.options).getParentRoute)==null?void 0:d.call(u),s?this._path=Ct:this.parentRoute||Bn(!1);let o=s?Ct:r==null?void 0:r.path;o&&o!=="/"&&(o=uv(o));const i=(r==null?void 0:r.id)||o;let a=s?Ct:yl([this.parentRoute.id===Ct?"":this.parentRoute.id,i]);o===Ct&&(o="/"),a!==Ct&&(a=yl(["/",a]));const l=a===Ct?"/":yl([this.parentRoute.fullPath,o]);this._path=o,this._id=a,this._fullPath=l,this._to=l},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.options=t||{},this.isRoot=!(t!=null&&t.getParentRoute),t!=null&&t.id&&(t!=null&&t.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class dN extends Sv{constructor(t){super(t)}}function Lh(e){const t=e.errorComponent??Fu;return h.jsx(fN,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?j.createElement(t,{error:n,reset:r}):e.children})}class fN extends j.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function Fu({error:e}){const[t,n]=j.useState(!1);return h.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[h.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[h.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),h.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),h.jsx("div",{style:{height:".25rem"}}),t?h.jsx("div",{children:h.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?h.jsx("code",{children:e.message}):null})}):null]})}function hN({children:e,fallback:t=null}){return pN()?h.jsx(ls.Fragment,{children:e}):h.jsx(ls.Fragment,{children:t})}function pN(){return ls.useSyncExternalStore(mN,()=>!0,()=>!1)}function mN(){return()=>{}}var _v={exports:{}},bv={},Ev={exports:{}},Cv={};/**
|
|
41
41
|
* @license React
|
|
42
42
|
* use-sync-external-store-shim.production.js
|
|
43
43
|
*
|
|
@@ -45,7 +45,7 @@ Error generating stack: `+o.message+`
|
|
|
45
45
|
*
|
|
46
46
|
* This source code is licensed under the MIT license found in the
|
|
47
47
|
* LICENSE file in the root directory of this source tree.
|
|
48
|
-
*/var So=
|
|
48
|
+
*/var So=j;function gN(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yN=typeof Object.is=="function"?Object.is:gN,xN=So.useState,vN=So.useEffect,wN=So.useLayoutEffect,SN=So.useDebugValue;function _N(e,t){var n=t(),r=xN({inst:{value:n,getSnapshot:t}}),s=r[0].inst,o=r[1];return wN(function(){s.value=n,s.getSnapshot=t,Fc(s)&&o({inst:s})},[e,n,t]),vN(function(){return Fc(s)&&o({inst:s}),e(function(){Fc(s)&&o({inst:s})})},[e]),SN(n),n}function Fc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!yN(e,n)}catch{return!0}}function bN(e,t){return t()}var EN=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?bN:_N;Cv.useSyncExternalStore=So.useSyncExternalStore!==void 0?So.useSyncExternalStore:EN;Ev.exports=Cv;var CN=Ev.exports;/**
|
|
49
49
|
* @license React
|
|
50
50
|
* use-sync-external-store-shim/with-selector.production.js
|
|
51
51
|
*
|
|
@@ -53,15 +53,15 @@ Error generating stack: `+o.message+`
|
|
|
53
53
|
*
|
|
54
54
|
* This source code is licensed under the MIT license found in the
|
|
55
55
|
* LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/var Du=R,NN=CN;function kN(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var PN=typeof Object.is=="function"?Object.is:kN,RN=NN.useSyncExternalStore,jN=Du.useRef,MN=Du.useEffect,TN=Du.useMemo,LN=Du.useDebugValue;bv.useSyncExternalStoreWithSelector=function(e,t,n,r,s){var o=jN(null);if(o.current===null){var i={hasValue:!1,value:null};o.current=i}else i=o.current;o=TN(function(){function l(m){if(!u){if(u=!0,d=m,m=r(m),s!==void 0&&i.hasValue){var p=i.value;if(s(p,m))return c=p}return c=m}if(p=c,PN(d,m))return p;var x=r(m);return s!==void 0&&s(p,x)?(d=m,p):(d=m,c=x)}var u=!1,d,c,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,s]);var a=RN(e,o[0],o[1]);return MN(function(){i.hasValue=!0,i.value=a},[a]),LN(a),a};_v.exports=bv;var Nv=_v.exports;const IN=Ay(Nv);function AN(e,t=r=>r,n={}){const r=n.equal??ON;return Nv.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,r)}function ON(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,s]of e)if(!t.has(r)||!Object.is(s,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=Xm(e);if(n.length!==Xm(t).length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}function Xm(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const Dc=R.createContext(null);function kv(){return typeof document>"u"?Dc:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Dc,Dc)}function It(e){const t=R.useContext(kv());return e==null||e.warn,t}function St(e){const t=It({warn:(e==null?void 0:e.router)===void 0}),n=(e==null?void 0:e.router)||t,r=R.useRef(void 0);return AN(n.__store,s=>{if(e!=null&&e.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const o=Ot(r.current,e.select(s));return r.current=o,o}return e.select(s)}return s})}const zu=R.createContext(void 0),FN=R.createContext(void 0);function _n(e){const t=R.useContext(e.from?FN:zu);return St({select:r=>{const s=r.matches.find(o=>e.from?e.from===o.routeId:o.id===t);if(Bn(!((e.shouldThrow??!0)&&!s),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),s!==void 0)return e.select?e.select(s):s},structuralSharing:e.structuralSharing})}function Ih(e){return _n({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Ah(e){const{select:t,...n}=e;return _n({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function Oh(e){return _n({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function Fh(e){return _n({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}const Qa=typeof window<"u"?R.useLayoutEffect:R.useEffect;function zc(e){const t=R.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function DN(e,t,n={},r={}){R.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const s=new IntersectionObserver(([o])=>{t(o)},n);return s.observe(e.current),()=>{s.disconnect()}},[t,n,r.disabled,e])}function zN(e){const t=R.useRef(null);return R.useImperativeHandle(e,()=>t.current,[]),t}function Dh(e){const t=It();return R.useCallback(n=>t.navigate({...n,from:n.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,t])}function $N(e,t){const n=It(),[r,s]=R.useState(!1),o=R.useRef(!1),i=zN(t),{activeProps:a,inactiveProps:l,activeOptions:u,to:d,preload:c,preloadDelay:f,hashScrollIntoView:m,replace:p,startTransition:x,resetScroll:w,viewTransition:g,children:v,target:y,disabled:S,style:E,className:_,onClick:b,onFocus:C,onMouseEnter:L,onMouseLeave:M,onTouchStart:P,ignoreBlocker:j,params:O,search:k,hash:D,state:I,mask:F,reloadDocument:N,unsafeRelative:T,from:z,_fromLocation:B,...H}=e,K=St({select:de=>de.location.search,structuralSharing:!0}),V=e.from,X=R.useMemo(()=>({...e,from:V}),[n,K,V,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),Q=R.useMemo(()=>n.buildLocation({...X}),[n,X]),Y=R.useMemo(()=>{if(S)return;let de=Q.maskedLocation?Q.maskedLocation.url.href:Q.url.href,Le=!1;return n.origin&&(de.startsWith(n.origin)?de=n.history.createHref(de.replace(n.origin,""))||"/":Le=!0),{href:de,external:Le}},[S,Q.maskedLocation,Q.url,n.origin,n.history]),W=R.useMemo(()=>{if(Y!=null&&Y.external)return Y.href;try{return new URL(d),d}catch{}},[d,Y]),Z=e.reloadDocument||W?!1:c??n.options.defaultPreload,oe=f??n.options.defaultPreloadDelay??0,re=St({select:de=>{if(W)return!1;if(u!=null&&u.exact){if(!AC(de.location.pathname,Q.pathname,n.basepath))return!1}else{const Le=ru(de.location.pathname,n.basepath),Ye=ru(Q.pathname,n.basepath);if(!(Le.startsWith(Ye)&&(Le.length===Ye.length||Le[Ye.length]==="/")))return!1}return((u==null?void 0:u.includeSearch)??!0)&&!ns(de.location.search,Q.search,{partial:!(u!=null&&u.exact),ignoreUndefined:!(u!=null&&u.explicitUndefined)})?!1:u!=null&&u.includeHash?de.location.hash===Q.hash:!0}}),J=R.useCallback(()=>{n.preloadRoute({...X}).catch(de=>{console.warn(de),console.warn(cN)})},[n,X]),te=R.useCallback(de=>{de!=null&&de.isIntersecting&&J()},[J]);DN(i,te,WN,{disabled:!!S||Z!=="viewport"}),R.useEffect(()=>{o.current||!S&&Z==="render"&&(J(),o.current=!0)},[S,J,Z]);const he=de=>{const Le=de.currentTarget.getAttribute("target"),Ye=y!==void 0?y:Le;if(!S&&!KN(de)&&!de.defaultPrevented&&(!Ye||Ye==="_self")&&de.button===0){de.preventDefault(),Qx.flushSync(()=>{s(!0)});const Cn=n.subscribe("onResolved",()=>{Cn(),s(!1)});n.navigate({...X,replace:p,resetScroll:w,hashScrollIntoView:m,startTransition:x,viewTransition:g,ignoreBlocker:j})}};if(W)return{...H,ref:i,href:W,...v&&{children:v},...y&&{target:y},...S&&{disabled:S},...E&&{style:E},..._&&{className:_},...b&&{onClick:b},...C&&{onFocus:C},...L&&{onMouseEnter:L},...M&&{onMouseLeave:M},...P&&{onTouchStart:P}};const ye=de=>{S||Z&&J()},ce=ye,$e=de=>{if(!(S||!Z))if(!oe)J();else{const Le=de.target;if(Yo.has(Le))return;const Ye=setTimeout(()=>{Yo.delete(Le),J()},oe);Yo.set(Le,Ye)}},un=de=>{if(S||!Z||!oe)return;const Le=de.target,Ye=Yo.get(Le);Ye&&(clearTimeout(Ye),Yo.delete(Le))},dt=re?pr(a,{})??BN:$c,At=re?$c:pr(l,{})??$c,Wn=[_,dt.className,At.className].filter(Boolean).join(" "),Kn=(E||dt.style||At.style)&&{...E,...dt.style,...At.style};return{...H,...dt,...At,href:Y==null?void 0:Y.href,ref:i,onClick:Zo([b,he]),onFocus:Zo([C,ye]),onMouseEnter:Zo([L,$e]),onMouseLeave:Zo([M,un]),onTouchStart:Zo([P,ce]),disabled:!!S,target:y,...Kn&&{style:Kn},...Wn&&{className:Wn},...S&&HN,...re&&UN,...r&&VN}}const $c={},BN={className:"active"},HN={role:"link","aria-disabled":!0},UN={"data-status":"active","aria-current":"page"},VN={"data-transitioning":"transitioning"},Yo=new WeakMap,WN={rootMargin:"100px"},Zo=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}},Ue=R.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:s,ref:o,...i}=$N(r,t),a=typeof r.children=="function"?r.children({isActive:i["data-status"]==="active"}):r.children;return n===void 0&&delete i.disabled,R.createElement(n||"a",{...i,ref:o},a)});function KN(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}let qN=class extends Sv{constructor(t){super(t),this.useMatch=n=>_n({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>_n({...n,from:this.id,select:r=>n!=null&&n.select?n.select(r.context):r.context}),this.useSearch=n=>Fh({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>Oh({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Ah({...n,from:this.id}),this.useLoaderData=n=>Ih({...n,from:this.id}),this.useNavigate=()=>Dh({from:this.fullPath}),this.Link=ls.forwardRef((n,r)=>h.jsx(Ue,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}};function QN(e){return new qN(e)}class GN extends dN{constructor(t){super(t),this.useMatch=n=>_n({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>_n({...n,from:this.id,select:r=>n!=null&&n.select?n.select(r.context):r.context}),this.useSearch=n=>Fh({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>Oh({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Ah({...n,from:this.id}),this.useLoaderData=n=>Ih({...n,from:this.id}),this.useNavigate=()=>Dh({from:this.fullPath}),this.Link=ls.forwardRef((n,r)=>h.jsx(Ue,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function XN(e){return new GN(e)}function _o(e){return typeof e=="object"?new Ym(e,{silent:!0}).createRoute(e):new Ym(e,{silent:!0}).createRoute}class Ym{constructor(t,n){this.path=t,this.createRoute=r=>{this.silent;const s=QN(r);return s.isRoot=!1,s},this.silent=n==null?void 0:n.silent}}class Zm{constructor(t){this.useMatch=n=>_n({select:n==null?void 0:n.select,from:this.options.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>_n({from:this.options.id,select:r=>n!=null&&n.select?n.select(r.context):r.context}),this.useSearch=n=>Fh({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.options.id}),this.useParams=n=>Oh({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>Ah({...n,from:this.options.id}),this.useLoaderData=n=>Ih({...n,from:this.options.id}),this.useNavigate=()=>{const n=It();return Dh({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function Jm(e){return typeof e=="object"?new Zm(e):t=>new Zm({id:e,...t})}function YN(){const e=It(),t=R.useRef({router:e,mounted:!1}),[n,r]=R.useState(!1),{hasPendingMatches:s,isLoading:o}=St({select:c=>({isLoading:c.isLoading,hasPendingMatches:c.matches.some(f=>f.status==="pending")}),structuralSharing:!0}),i=zc(o),a=o||n||s,l=zc(a),u=o||s,d=zc(u);return e.startTransition=c=>{r(!0),R.startTransition(()=>{c(),r(!1)})},R.useEffect(()=>{const c=e.history.subscribe(e.load),f=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return rs(e.latestLocation.publicHref)!==rs(f.publicHref)&&e.commitLocation({...f,replace:!0}),()=>{c()}},[e,e.history]),Qa(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(f){console.error(f)}})()},[e]),Qa(()=>{i&&!o&&e.emit({type:"onLoad",...ss(e.state)})},[i,e,o]),Qa(()=>{d&&!u&&e.emit({type:"onBeforeRouteMount",...ss(e.state)})},[u,d,e]),Qa(()=>{if(l&&!a){const c=ss(e.state);e.emit({type:"onResolved",...c}),e.__store.setState(f=>({...f,status:"idle",resolvedLocation:f.location})),c.hrefChanged&&UC(e)}},[a,l,e]),null}function ZN(e){const t=St({select:n=>`not-found-${n.location.pathname}-${n.status}`});return h.jsx(Lh,{getResetKey:()=>t,onCatch:(n,r)=>{var s;if(Rt(n))(s=e.onCatch)==null||s.call(e,n,r);else throw n},errorComponent:({error:n})=>{var r;if(Rt(n))return(r=e.fallback)==null?void 0:r.call(e,n);throw n},children:e.children})}function JN(){return h.jsx("p",{children:"Not Found"})}function ks(e){return h.jsx(h.Fragment,{children:e.children})}function Pv(e,t,n){return t.options.notFoundComponent?h.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?h.jsx(e.options.defaultNotFoundComponent,{...n}):h.jsx(JN,{})}function ek({children:e}){var n;const t=It();return t.isServer?h.jsx("script",{nonce:(n=t.options.ssr)==null?void 0:n.nonce,dangerouslySetInnerHTML:{__html:e+";document.currentScript.remove()"}}):null}function tk(){const e=It();if(!e.isScrollRestoring||!e.isServer||typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return null;const n=(e.options.getScrollRestorationKey||lf)(e.latestLocation),r=n!==lf(e.latestLocation)?n:void 0,s={storageKey:su,shouldScrollRestoration:!0};return r&&(s.key=r),h.jsx(ek,{children:`(${dv.toString()})(${JSON.stringify(s)})`})}const Rv=R.memo(function({matchId:t}){var g,v;const n=It(),r=St({select:y=>{const S=y.matches.find(E=>E.id===t);return Bn(S),{routeId:S.routeId,ssr:S.ssr,_displayPending:S._displayPending}},structuralSharing:!0}),s=n.routesById[r.routeId],o=s.options.pendingComponent??n.options.defaultPendingComponent,i=o?h.jsx(o,{}):null,a=s.options.errorComponent??n.options.defaultErrorComponent,l=s.options.onCatch??n.options.defaultOnCatch,u=s.isRoot?s.options.notFoundComponent??((g=n.options.notFoundRoute)==null?void 0:g.options.component):s.options.notFoundComponent,d=r.ssr===!1||r.ssr==="data-only",c=(!s.isRoot||s.options.wrapInSuspense||d)&&(s.options.wrapInSuspense??o??(((v=s.options.errorComponent)==null?void 0:v.preload)||d))?R.Suspense:ks,f=a?Lh:ks,m=u?ZN:ks,p=St({select:y=>y.loadedAt}),x=St({select:y=>{var E;const S=y.matches.findIndex(_=>_.id===t);return(E=y.matches[S-1])==null?void 0:E.routeId}}),w=s.isRoot?s.options.shellComponent??ks:ks;return h.jsxs(w,{children:[h.jsx(zu.Provider,{value:t,children:h.jsx(c,{fallback:i,children:h.jsx(f,{getResetKey:()=>p,errorComponent:a||Fu,onCatch:(y,S)=>{if(Rt(y))throw y;l==null||l(y,S)},children:h.jsx(m,{fallback:y=>{if(!u||y.routeId&&y.routeId!==r.routeId||!y.routeId&&!s.isRoot)throw y;return R.createElement(u,y)},children:d||r._displayPending?h.jsx(hN,{fallback:i,children:h.jsx(eg,{matchId:t})}):h.jsx(eg,{matchId:t})})})})}),x===Ct&&n.options.scrollRestoration?h.jsxs(h.Fragment,{children:[h.jsx(nk,{}),h.jsx(tk,{})]}):null]})});function nk(){const e=It(),t=R.useRef(void 0);return h.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...ss(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const eg=R.memo(function({matchId:t}){var l,u,d,c;const n=It(),{match:r,key:s,routeId:o}=St({select:f=>{const m=f.matches.find(v=>v.id===t),p=m.routeId,x=n.routesById[p].options.remountDeps??n.options.defaultRemountDeps,w=x==null?void 0:x({routeId:p,loaderDeps:m.loaderDeps,params:m._strictParams,search:m._strictSearch});return{key:w?JSON.stringify(w):void 0,routeId:p,match:{id:m.id,status:m.status,error:m.error,invalid:m.invalid,_forcePending:m._forcePending,_displayPending:m._displayPending}}},structuralSharing:!0}),i=n.routesById[o],a=R.useMemo(()=>{const f=i.options.component??n.options.defaultComponent;return f?h.jsx(f,{},s):h.jsx(jv,{})},[s,i.options.component,n.options.defaultComponent]);if(r._displayPending)throw(l=n.getMatch(r.id))==null?void 0:l._nonReactive.displayPendingPromise;if(r._forcePending)throw(u=n.getMatch(r.id))==null?void 0:u._nonReactive.minPendingPromise;if(r.status==="pending"){const f=i.options.pendingMinMs??n.options.defaultPendingMinMs;if(f){const m=n.getMatch(r.id);if(m&&!m._nonReactive.minPendingPromise&&!n.isServer){const p=vo();m._nonReactive.minPendingPromise=p,setTimeout(()=>{p.resolve(),m._nonReactive.minPendingPromise=void 0},f)}}throw(d=n.getMatch(r.id))==null?void 0:d._nonReactive.loadPromise}if(r.status==="notFound")return Bn(Rt(r.error)),Pv(n,i,r.error);if(r.status==="redirected")throw Bn(Ht(r.error)),(c=n.getMatch(r.id))==null?void 0:c._nonReactive.loadPromise;if(r.status==="error"){if(n.isServer){const f=(i.options.errorComponent??n.options.defaultErrorComponent)||Fu;return h.jsx(f,{error:r.error,reset:void 0,info:{componentStack:""}})}throw r.error}return a}),jv=R.memo(function(){const t=It(),n=R.useContext(zu),r=St({select:u=>{var d;return(d=u.matches.find(c=>c.id===n))==null?void 0:d.routeId}}),s=t.routesById[r],o=St({select:u=>{const c=u.matches.find(f=>f.id===n);return Bn(c),c.globalNotFound}}),i=St({select:u=>{var f;const d=u.matches,c=d.findIndex(m=>m.id===n);return(f=d[c+1])==null?void 0:f.id}}),a=t.options.defaultPendingComponent?h.jsx(t.options.defaultPendingComponent,{}):null;if(o)return Pv(t,s,void 0);if(!i)return null;const l=h.jsx(Rv,{matchId:i});return r===Ct?h.jsx(R.Suspense,{fallback:a,children:l}):l});function rk(){const e=It(),n=e.routesById[Ct].options.pendingComponent??e.options.defaultPendingComponent,r=n?h.jsx(n,{}):null,s=e.isServer||typeof document<"u"&&e.ssr?ks:R.Suspense,o=h.jsxs(s,{fallback:r,children:[!e.isServer&&h.jsx(YN,{}),h.jsx(sk,{})]});return e.options.InnerWrap?h.jsx(e.options.InnerWrap,{children:o}):o}function sk(){const e=It(),t=St({select:s=>{var o;return(o=s.matches[0])==null?void 0:o.id}}),n=St({select:s=>s.loadedAt}),r=t?h.jsx(Rv,{matchId:t}):null;return h.jsx(zu.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:h.jsx(Lh,{getResetKey:()=>n,errorComponent:Fu,onCatch:s=>{s.message||s.toString()},children:r})})}const ok=e=>new ik(e);class ik extends oN{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=_o,globalThis.createLazyFileRoute=Jm):typeof window<"u"&&(window.createFileRoute=_o,window.createLazyFileRoute=Jm);function ak({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=kv(),s=h.jsx(r.Provider,{value:e,children:t});return e.options.Wrap?h.jsx(e.options.Wrap,{children:s}):s}function lk({router:e,...t}){return h.jsx(ak,{router:e,...t,children:h.jsx(rk,{})})}function Mv(e,t){return function(){return e.apply(t,arguments)}}const{toString:uk}=Object.prototype,{getPrototypeOf:zh}=Object,{iterator:$u,toStringTag:Tv}=Symbol,Bu=(e=>t=>{const n=uk.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),an=e=>(e=e.toLowerCase(),t=>Bu(t)===e),Hu=e=>t=>typeof t===e,{isArray:Oo}=Array,bo=Hu("undefined");function ha(e){return e!==null&&!bo(e)&&e.constructor!==null&&!bo(e.constructor)&&_t(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Lv=an("ArrayBuffer");function ck(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Lv(e.buffer),t}const dk=Hu("string"),_t=Hu("function"),Iv=Hu("number"),pa=e=>e!==null&&typeof e=="object",fk=e=>e===!0||e===!1,vl=e=>{if(Bu(e)!=="object")return!1;const t=zh(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Tv in e)&&!($u in e)},hk=e=>{if(!pa(e)||ha(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},pk=an("Date"),mk=an("File"),gk=an("Blob"),yk=an("FileList"),xk=e=>pa(e)&&_t(e.pipe),vk=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||_t(e.append)&&((t=Bu(e))==="formdata"||t==="object"&&_t(e.toString)&&e.toString()==="[object FormData]"))},wk=an("URLSearchParams"),[Sk,_k,bk,Ek]=["ReadableStream","Request","Response","Headers"].map(an),Ck=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ma(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),Oo(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(ha(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(r=0;r<i;r++)a=o[r],t.call(null,e[a],a,e)}}function Av(e,t){if(ha(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const Hr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ov=e=>!bo(e)&&e!==Hr;function cf(){const{caseless:e,skipUndefined:t}=Ov(this)&&this||{},n={},r=(s,o)=>{const i=e&&Av(n,o)||o;vl(n[i])&&vl(s)?n[i]=cf(n[i],s):vl(s)?n[i]=cf({},s):Oo(s)?n[i]=s.slice():(!t||!bo(s))&&(n[i]=s)};for(let s=0,o=arguments.length;s<o;s++)arguments[s]&&ma(arguments[s],r);return n}const Nk=(e,t,n,{allOwnKeys:r}={})=>(ma(t,(s,o)=>{n&&_t(s)?e[o]=Mv(s,n):e[o]=s},{allOwnKeys:r}),e),kk=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Pk=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Rk=(e,t,n,r)=>{let s,o,i;const a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!r||r(i,e,t))&&!a[i]&&(t[i]=e[i],a[i]=!0);e=n!==!1&&zh(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},jk=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Mk=e=>{if(!e)return null;if(Oo(e))return e;let t=e.length;if(!Iv(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Tk=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&zh(Uint8Array)),Lk=(e,t)=>{const r=(e&&e[$u]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},Ik=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Ak=an("HTMLFormElement"),Ok=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),tg=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Fk=an("RegExp"),Fv=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ma(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},Dk=e=>{Fv(e,(t,n)=>{if(_t(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(_t(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},zk=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return Oo(e)?r(e):r(String(e).split(t)),n},$k=()=>{},Bk=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Hk(e){return!!(e&&_t(e.append)&&e[Tv]==="FormData"&&e[$u])}const Uk=e=>{const t=new Array(10),n=(r,s)=>{if(pa(r)){if(t.indexOf(r)>=0)return;if(ha(r))return r;if(!("toJSON"in r)){t[s]=r;const o=Oo(r)?[]:{};return ma(r,(i,a)=>{const l=n(i,s+1);!bo(l)&&(o[a]=l)}),t[s]=void 0,o}}return r};return n(e,0)},Vk=an("AsyncFunction"),Wk=e=>e&&(pa(e)||_t(e))&&_t(e.then)&&_t(e.catch),Dv=((e,t)=>e?setImmediate:t?((n,r)=>(Hr.addEventListener("message",({source:s,data:o})=>{s===Hr&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),Hr.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",_t(Hr.postMessage)),Kk=typeof queueMicrotask<"u"?queueMicrotask.bind(Hr):typeof process<"u"&&process.nextTick||Dv,qk=e=>e!=null&&_t(e[$u]),$={isArray:Oo,isArrayBuffer:Lv,isBuffer:ha,isFormData:vk,isArrayBufferView:ck,isString:dk,isNumber:Iv,isBoolean:fk,isObject:pa,isPlainObject:vl,isEmptyObject:hk,isReadableStream:Sk,isRequest:_k,isResponse:bk,isHeaders:Ek,isUndefined:bo,isDate:pk,isFile:mk,isBlob:gk,isRegExp:Fk,isFunction:_t,isStream:xk,isURLSearchParams:wk,isTypedArray:Tk,isFileList:yk,forEach:ma,merge:cf,extend:Nk,trim:Ck,stripBOM:kk,inherits:Pk,toFlatObject:Rk,kindOf:Bu,kindOfTest:an,endsWith:jk,toArray:Mk,forEachEntry:Lk,matchAll:Ik,isHTMLForm:Ak,hasOwnProperty:tg,hasOwnProp:tg,reduceDescriptors:Fv,freezeMethods:Dk,toObjectSet:zk,toCamelCase:Ok,noop:$k,toFiniteNumber:Bk,findKey:Av,global:Hr,isContextDefined:Ov,isSpecCompliantForm:Hk,toJSONObject:Uk,isAsyncFn:Vk,isThenable:Wk,setImmediate:Dv,asap:Kk,isIterable:qk};function se(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}$.inherits(se,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:$.toJSONObject(this.config),code:this.code,status:this.status}}});const zv=se.prototype,$v={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{$v[e]={value:e}});Object.defineProperties(se,$v);Object.defineProperty(zv,"isAxiosError",{value:!0});se.from=(e,t,n,r,s,o)=>{const i=Object.create(zv);$.toFlatObject(e,i,function(d){return d!==Error.prototype},u=>u!=="isAxiosError");const a=e&&e.message?e.message:"Error",l=t==null&&e?e.code:t;return se.call(i,a,l,n,r,s),e&&i.cause==null&&Object.defineProperty(i,"cause",{value:e,configurable:!0}),i.name=e&&e.name||"Error",o&&Object.assign(i,o),i};const Qk=null;function df(e){return $.isPlainObject(e)||$.isArray(e)}function Bv(e){return $.endsWith(e,"[]")?e.slice(0,-2):e}function ng(e,t,n){return e?e.concat(t).map(function(s,o){return s=Bv(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function Gk(e){return $.isArray(e)&&!e.some(df)}const Xk=$.toFlatObject($,{},null,function(t){return/^is[A-Z]/.test(t)});function Uu(e,t,n){if(!$.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=$.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,w){return!$.isUndefined(w[x])});const r=n.metaTokens,s=n.visitor||d,o=n.dots,i=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&$.isSpecCompliantForm(t);if(!$.isFunction(s))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if($.isDate(p))return p.toISOString();if($.isBoolean(p))return p.toString();if(!l&&$.isBlob(p))throw new se("Blob is not supported. Use a Buffer instead.");return $.isArrayBuffer(p)||$.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function d(p,x,w){let g=p;if(p&&!w&&typeof p=="object"){if($.endsWith(x,"{}"))x=r?x:x.slice(0,-2),p=JSON.stringify(p);else if($.isArray(p)&&Gk(p)||($.isFileList(p)||$.endsWith(x,"[]"))&&(g=$.toArray(p)))return x=Bv(x),g.forEach(function(y,S){!($.isUndefined(y)||y===null)&&t.append(i===!0?ng([x],S,o):i===null?x:x+"[]",u(y))}),!1}return df(p)?!0:(t.append(ng(w,x,o),u(p)),!1)}const c=[],f=Object.assign(Xk,{defaultVisitor:d,convertValue:u,isVisitable:df});function m(p,x){if(!$.isUndefined(p)){if(c.indexOf(p)!==-1)throw Error("Circular reference detected in "+x.join("."));c.push(p),$.forEach(p,function(g,v){(!($.isUndefined(g)||g===null)&&s.call(t,g,$.isString(v)?v.trim():v,x,f))===!0&&m(g,x?x.concat(v):[v])}),c.pop()}}if(!$.isObject(e))throw new TypeError("data must be an object");return m(e),t}function rg(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function $h(e,t){this._pairs=[],e&&Uu(e,this,t)}const Hv=$h.prototype;Hv.append=function(t,n){this._pairs.push([t,n])};Hv.toString=function(t){const n=t?function(r){return t.call(this,r,rg)}:rg;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Yk(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Uv(e,t,n){if(!t)return e;const r=n&&n.encode||Yk;$.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let o;if(s?o=s(t,n):o=$.isURLSearchParams(t)?t.toString():new $h(t,n).toString(r),o){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class sg{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){$.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Vv={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Zk=typeof URLSearchParams<"u"?URLSearchParams:$h,Jk=typeof FormData<"u"?FormData:null,eP=typeof Blob<"u"?Blob:null,tP={isBrowser:!0,classes:{URLSearchParams:Zk,FormData:Jk,Blob:eP},protocols:["http","https","file","blob","url","data"]},Bh=typeof window<"u"&&typeof document<"u",ff=typeof navigator=="object"&&navigator||void 0,nP=Bh&&(!ff||["ReactNative","NativeScript","NS"].indexOf(ff.product)<0),rP=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",sP=Bh&&window.location.href||"http://localhost",oP=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Bh,hasStandardBrowserEnv:nP,hasStandardBrowserWebWorkerEnv:rP,navigator:ff,origin:sP},Symbol.toStringTag,{value:"Module"})),tt={...oP,...tP};function iP(e,t){return Uu(e,new tt.classes.URLSearchParams,{visitor:function(n,r,s,o){return tt.isNode&&$.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function aP(e){return $.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function lP(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r<s;r++)o=n[r],t[o]=e[o];return t}function Wv(e){function t(n,r,s,o){let i=n[o++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),l=o>=n.length;return i=!i&&$.isArray(s)?s.length:i,l?($.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!a):((!s[i]||!$.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],o)&&$.isArray(s[i])&&(s[i]=lP(s[i])),!a)}if($.isFormData(e)&&$.isFunction(e.entries)){const n={};return $.forEachEntry(e,(r,s)=>{t(aP(r),s,n,0)}),n}return null}function uP(e,t,n){if($.isString(e))try{return(t||JSON.parse)(e),$.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ga={transitional:Vv,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=$.isObject(t);if(o&&$.isHTMLForm(t)&&(t=new FormData(t)),$.isFormData(t))return s?JSON.stringify(Wv(t)):t;if($.isArrayBuffer(t)||$.isBuffer(t)||$.isStream(t)||$.isFile(t)||$.isBlob(t)||$.isReadableStream(t))return t;if($.isArrayBufferView(t))return t.buffer;if($.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return iP(t,this.formSerializer).toString();if((a=$.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Uu(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),uP(t)):t}],transformResponse:[function(t){const n=this.transitional||ga.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if($.isResponse(t)||$.isReadableStream(t))return t;if(t&&$.isString(t)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(a){if(i)throw a.name==="SyntaxError"?se.from(a,se.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:tt.classes.FormData,Blob:tt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};$.forEach(["delete","get","head","post","put","patch"],e=>{ga.headers[e]={}});const cP=$.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),dP=e=>{const t={};let n,r,s;return e&&e.split(`
|
|
57
|
-
`).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||t[n]&&cP[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},og=Symbol("internals");function Jo(e){return e&&String(e).trim().toLowerCase()}function wl(e){return e===!1||e==null?e
|
|
58
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[og]=this[og]={accessors:{}}).accessors,s=this.prototype;function o(i){const a=Jo(i);r[a]||(mP(s,i),r[a]=!0)}return $.isArray(t)?t.forEach(o):o(t),this}};bt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);$.reduceDescriptors(bt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});$.freezeMethods(bt);function Hc(e,t){const n=this||ga,r=t||n,s=bt.from(r.headers);let o=r.data;return $.forEach(e,function(a){o=a.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function Kv(e){return!!(e&&e.__CANCEL__)}function Fo(e,t,n){se.call(this,e??"canceled",se.ERR_CANCELED,t,n),this.name="CanceledError"}$.inherits(Fo,se,{__CANCEL__:!0});function qv(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new se("Request failed with status code "+n.status,[se.ERR_BAD_REQUEST,se.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function gP(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function yP(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),d=r[o];i||(i=u),n[s]=l,r[s]=u;let c=o,f=0;for(;c!==s;)f+=n[c++],c=c%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),u-i<t)return;const m=d&&u-d;return m?Math.round(f*1e3/m):void 0}}function xP(e,t){let n=0,r=1e3/t,s,o;const i=(u,d=Date.now())=>{n=d,s=null,o&&(clearTimeout(o),o=null),e(...u)};return[(...u)=>{const d=Date.now(),c=d-n;c>=r?i(u,d):(s=u,o||(o=setTimeout(()=>{o=null,i(s)},r-c)))},()=>s&&i(s)]}const au=(e,t,n=3)=>{let r=0;const s=yP(50,250);return xP(o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,l=i-r,u=s(l),d=i<=a;r=i;const c={loaded:i,total:a,progress:a?i/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&d?(a-i)/u:void 0,event:o,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(c)},n)},ig=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},ag=e=>(...t)=>$.asap(()=>e(...t)),vP=tt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,tt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(tt.origin),tt.navigator&&/(msie|trident)/i.test(tt.navigator.userAgent)):()=>!0,wP=tt.hasStandardBrowserEnv?{write(e,t,n,r,s,o,i){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];$.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),$.isString(r)&&a.push(`path=${r}`),$.isString(s)&&a.push(`domain=${s}`),o===!0&&a.push("secure"),$.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function SP(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function _P(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Qv(e,t,n){let r=!SP(t);return e&&(r||n==!1)?_P(e,t):t}const lg=e=>e instanceof bt?{...e}:e;function ys(e,t){t=t||{};const n={};function r(u,d,c,f){return $.isPlainObject(u)&&$.isPlainObject(d)?$.merge.call({caseless:f},u,d):$.isPlainObject(d)?$.merge({},d):$.isArray(d)?d.slice():d}function s(u,d,c,f){if($.isUndefined(d)){if(!$.isUndefined(u))return r(void 0,u,c,f)}else return r(u,d,c,f)}function o(u,d){if(!$.isUndefined(d))return r(void 0,d)}function i(u,d){if($.isUndefined(d)){if(!$.isUndefined(u))return r(void 0,u)}else return r(void 0,d)}function a(u,d,c){if(c in t)return r(u,d);if(c in e)return r(void 0,u)}const l={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(u,d,c)=>s(lg(u),lg(d),c,!0)};return $.forEach(Object.keys({...e,...t}),function(d){const c=l[d]||s,f=c(e[d],t[d],d);$.isUndefined(f)&&c!==a||(n[d]=f)}),n}const Gv=e=>{const t=ys({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:a}=t;if(t.headers=i=bt.from(i),t.url=Uv(Qv(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),$.isFormData(n)){if(tt.hasStandardBrowserEnv||tt.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if($.isFunction(n.getHeaders)){const l=n.getHeaders(),u=["content-type","content-length"];Object.entries(l).forEach(([d,c])=>{u.includes(d.toLowerCase())&&i.set(d,c)})}}if(tt.hasStandardBrowserEnv&&(r&&$.isFunction(r)&&(r=r(t)),r||r!==!1&&vP(t.url))){const l=s&&o&&wP.read(o);l&&i.set(s,l)}return t},bP=typeof XMLHttpRequest<"u",EP=bP&&function(e){return new Promise(function(n,r){const s=Gv(e);let o=s.data;const i=bt.from(s.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=s,d,c,f,m,p;function x(){m&&m(),p&&p(),s.cancelToken&&s.cancelToken.unsubscribe(d),s.signal&&s.signal.removeEventListener("abort",d)}let w=new XMLHttpRequest;w.open(s.method.toUpperCase(),s.url,!0),w.timeout=s.timeout;function g(){if(!w)return;const y=bt.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),E={data:!a||a==="text"||a==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:y,config:e,request:w};qv(function(b){n(b),x()},function(b){r(b),x()},E),w=null}"onloadend"in w?w.onloadend=g:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(g)},w.onabort=function(){w&&(r(new se("Request aborted",se.ECONNABORTED,e,w)),w=null)},w.onerror=function(S){const E=S&&S.message?S.message:"Network Error",_=new se(E,se.ERR_NETWORK,e,w);_.event=S||null,r(_),w=null},w.ontimeout=function(){let S=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const E=s.transitional||Vv;s.timeoutErrorMessage&&(S=s.timeoutErrorMessage),r(new se(S,E.clarifyTimeoutError?se.ETIMEDOUT:se.ECONNABORTED,e,w)),w=null},o===void 0&&i.setContentType(null),"setRequestHeader"in w&&$.forEach(i.toJSON(),function(S,E){w.setRequestHeader(E,S)}),$.isUndefined(s.withCredentials)||(w.withCredentials=!!s.withCredentials),a&&a!=="json"&&(w.responseType=s.responseType),u&&([f,p]=au(u,!0),w.addEventListener("progress",f)),l&&w.upload&&([c,m]=au(l),w.upload.addEventListener("progress",c),w.upload.addEventListener("loadend",m)),(s.cancelToken||s.signal)&&(d=y=>{w&&(r(!y||y.type?new Fo(null,e,w):y),w.abort(),w=null)},s.cancelToken&&s.cancelToken.subscribe(d),s.signal&&(s.signal.aborted?d():s.signal.addEventListener("abort",d)));const v=gP(s.url);if(v&&tt.protocols.indexOf(v)===-1){r(new se("Unsupported protocol "+v+":",se.ERR_BAD_REQUEST,e));return}w.send(o||null)})},CP=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const o=function(u){if(!s){s=!0,a();const d=u instanceof Error?u:this.reason;r.abort(d instanceof se?d:new Fo(d instanceof Error?d.message:d))}};let i=t&&setTimeout(()=>{i=null,o(new se(`timeout ${t} of ms exceeded`,se.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),e=null)};e.forEach(u=>u.addEventListener("abort",o));const{signal:l}=r;return l.unsubscribe=()=>$.asap(a),l}},NP=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},kP=async function*(e,t){for await(const n of PP(e))yield*NP(n,t)},PP=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},ug=(e,t,n,r)=>{const s=kP(e,t);let o=0,i,a=l=>{i||(i=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:d}=await s.next();if(u){a(),l.close();return}let c=d.byteLength;if(n){let f=o+=c;n(f)}l.enqueue(new Uint8Array(d))}catch(u){throw a(u),u}},cancel(l){return a(l),s.return()}},{highWaterMark:2})},cg=64*1024,{isFunction:Ga}=$,RP=(({Request:e,Response:t})=>({Request:e,Response:t}))($.global),{ReadableStream:dg,TextEncoder:fg}=$.global,hg=(e,...t)=>{try{return!!e(...t)}catch{return!1}},jP=e=>{e=$.merge.call({skipUndefined:!0},RP,e);const{fetch:t,Request:n,Response:r}=e,s=t?Ga(t):typeof fetch=="function",o=Ga(n),i=Ga(r);if(!s)return!1;const a=s&&Ga(dg),l=s&&(typeof fg=="function"?(p=>x=>p.encode(x))(new fg):async p=>new Uint8Array(await new n(p).arrayBuffer())),u=o&&a&&hg(()=>{let p=!1;const x=new n(tt.origin,{body:new dg,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!x}),d=i&&a&&hg(()=>$.isReadableStream(new r("").body)),c={stream:d&&(p=>p.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!c[p]&&(c[p]=(x,w)=>{let g=x&&x[p];if(g)return g.call(x);throw new se(`Response type '${p}' is not supported`,se.ERR_NOT_SUPPORT,w)})});const f=async p=>{if(p==null)return 0;if($.isBlob(p))return p.size;if($.isSpecCompliantForm(p))return(await new n(tt.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if($.isArrayBufferView(p)||$.isArrayBuffer(p))return p.byteLength;if($.isURLSearchParams(p)&&(p=p+""),$.isString(p))return(await l(p)).byteLength},m=async(p,x)=>{const w=$.toFiniteNumber(p.getContentLength());return w??f(x)};return async p=>{let{url:x,method:w,data:g,signal:v,cancelToken:y,timeout:S,onDownloadProgress:E,onUploadProgress:_,responseType:b,headers:C,withCredentials:L="same-origin",fetchOptions:M}=Gv(p),P=t||fetch;b=b?(b+"").toLowerCase():"text";let j=CP([v,y&&y.toAbortSignal()],S),O=null;const k=j&&j.unsubscribe&&(()=>{j.unsubscribe()});let D;try{if(_&&u&&w!=="get"&&w!=="head"&&(D=await m(C,g))!==0){let B=new n(x,{method:"POST",body:g,duplex:"half"}),H;if($.isFormData(g)&&(H=B.headers.get("content-type"))&&C.setContentType(H),B.body){const[K,V]=ig(D,au(ag(_)));g=ug(B.body,cg,K,V)}}$.isString(L)||(L=L?"include":"omit");const I=o&&"credentials"in n.prototype,F={...M,signal:j,method:w.toUpperCase(),headers:C.normalize().toJSON(),body:g,duplex:"half",credentials:I?L:void 0};O=o&&new n(x,F);let N=await(o?P(O,M):P(x,F));const T=d&&(b==="stream"||b==="response");if(d&&(E||T&&k)){const B={};["status","statusText","headers"].forEach(X=>{B[X]=N[X]});const H=$.toFiniteNumber(N.headers.get("content-length")),[K,V]=E&&ig(H,au(ag(E),!0))||[];N=new r(ug(N.body,cg,K,()=>{V&&V(),k&&k()}),B)}b=b||"text";let z=await c[$.findKey(c,b)||"text"](N,p);return!T&&k&&k(),await new Promise((B,H)=>{qv(B,H,{data:z,headers:bt.from(N.headers),status:N.status,statusText:N.statusText,config:p,request:O})})}catch(I){throw k&&k(),I&&I.name==="TypeError"&&/Load failed|fetch/i.test(I.message)?Object.assign(new se("Network Error",se.ERR_NETWORK,p,O),{cause:I.cause||I}):se.from(I,I&&I.code,p,O)}}},MP=new Map,Xv=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,o=[r,s,n];let i=o.length,a=i,l,u,d=MP;for(;a--;)l=o[a],u=d.get(l),u===void 0&&d.set(l,u=a?new Map:jP(t)),d=u;return u};Xv();const Hh={http:Qk,xhr:EP,fetch:{get:Xv}};$.forEach(Hh,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const pg=e=>`- ${e}`,TP=e=>$.isFunction(e)||e===null||e===!1;function LP(e,t){e=$.isArray(e)?e:[e];const{length:n}=e;let r,s;const o={};for(let i=0;i<n;i++){r=e[i];let a;if(s=r,!TP(r)&&(s=Hh[(a=String(r)).toLowerCase()],s===void 0))throw new se(`Unknown adapter '${a}'`);if(s&&($.isFunction(s)||(s=s.get(t))))break;o[a||"#"+i]=s}if(!s){const i=Object.entries(o).map(([l,u])=>`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=n?i.length>1?`since :
|
|
56
|
+
*/var Du=j,NN=CN;function kN(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var PN=typeof Object.is=="function"?Object.is:kN,RN=NN.useSyncExternalStore,jN=Du.useRef,MN=Du.useEffect,TN=Du.useMemo,LN=Du.useDebugValue;bv.useSyncExternalStoreWithSelector=function(e,t,n,r,s){var o=jN(null);if(o.current===null){var i={hasValue:!1,value:null};o.current=i}else i=o.current;o=TN(function(){function l(m){if(!u){if(u=!0,d=m,m=r(m),s!==void 0&&i.hasValue){var p=i.value;if(s(p,m))return c=p}return c=m}if(p=c,PN(d,m))return p;var x=r(m);return s!==void 0&&s(p,x)?(d=m,p):(d=m,c=x)}var u=!1,d,c,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,s]);var a=RN(e,o[0],o[1]);return MN(function(){i.hasValue=!0,i.value=a},[a]),LN(a),a};_v.exports=bv;var Nv=_v.exports;const IN=Ay(Nv);function AN(e,t=r=>r,n={}){const r=n.equal??ON;return Nv.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,r)}function ON(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,s]of e)if(!t.has(r)||!Object.is(s,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=Xm(e);if(n.length!==Xm(t).length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}function Xm(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const Dc=j.createContext(null);function kv(){return typeof document>"u"?Dc:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Dc,Dc)}function It(e){const t=j.useContext(kv());return e==null||e.warn,t}function St(e){const t=It({warn:(e==null?void 0:e.router)===void 0}),n=(e==null?void 0:e.router)||t,r=j.useRef(void 0);return AN(n.__store,s=>{if(e!=null&&e.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const o=Ot(r.current,e.select(s));return r.current=o,o}return e.select(s)}return s})}const zu=j.createContext(void 0),FN=j.createContext(void 0);function _n(e){const t=j.useContext(e.from?FN:zu);return St({select:r=>{const s=r.matches.find(o=>e.from?e.from===o.routeId:o.id===t);if(Bn(!((e.shouldThrow??!0)&&!s),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),s!==void 0)return e.select?e.select(s):s},structuralSharing:e.structuralSharing})}function Ih(e){return _n({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Ah(e){const{select:t,...n}=e;return _n({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function Oh(e){return _n({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function Fh(e){return _n({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}const Qa=typeof window<"u"?j.useLayoutEffect:j.useEffect;function zc(e){const t=j.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function DN(e,t,n={},r={}){j.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const s=new IntersectionObserver(([o])=>{t(o)},n);return s.observe(e.current),()=>{s.disconnect()}},[t,n,r.disabled,e])}function zN(e){const t=j.useRef(null);return j.useImperativeHandle(e,()=>t.current,[]),t}function Dh(e){const t=It();return j.useCallback(n=>t.navigate({...n,from:n.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,t])}function $N(e,t){const n=It(),[r,s]=j.useState(!1),o=j.useRef(!1),i=zN(t),{activeProps:a,inactiveProps:l,activeOptions:u,to:d,preload:c,preloadDelay:f,hashScrollIntoView:m,replace:p,startTransition:x,resetScroll:w,viewTransition:g,children:v,target:y,disabled:S,style:E,className:b,onClick:_,onFocus:C,onMouseEnter:M,onMouseLeave:L,onTouchStart:P,ignoreBlocker:R,params:$,search:k,hash:I,state:A,mask:F,reloadDocument:N,unsafeRelative:T,from:D,_fromLocation:B,...H}=e,K=St({select:de=>de.location.search,structuralSharing:!0}),V=e.from,X=j.useMemo(()=>({...e,from:V}),[n,K,V,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),Q=j.useMemo(()=>n.buildLocation({...X}),[n,X]),Y=j.useMemo(()=>{if(S)return;let de=Q.maskedLocation?Q.maskedLocation.url.href:Q.url.href,Le=!1;return n.origin&&(de.startsWith(n.origin)?de=n.history.createHref(de.replace(n.origin,""))||"/":Le=!0),{href:de,external:Le}},[S,Q.maskedLocation,Q.url,n.origin,n.history]),W=j.useMemo(()=>{if(Y!=null&&Y.external)return Y.href;try{return new URL(d),d}catch{}},[d,Y]),Z=e.reloadDocument||W?!1:c??n.options.defaultPreload,oe=f??n.options.defaultPreloadDelay??0,re=St({select:de=>{if(W)return!1;if(u!=null&&u.exact){if(!AC(de.location.pathname,Q.pathname,n.basepath))return!1}else{const Le=ru(de.location.pathname,n.basepath),Ye=ru(Q.pathname,n.basepath);if(!(Le.startsWith(Ye)&&(Le.length===Ye.length||Le[Ye.length]==="/")))return!1}return((u==null?void 0:u.includeSearch)??!0)&&!ns(de.location.search,Q.search,{partial:!(u!=null&&u.exact),ignoreUndefined:!(u!=null&&u.explicitUndefined)})?!1:u!=null&&u.includeHash?de.location.hash===Q.hash:!0}}),J=j.useCallback(()=>{n.preloadRoute({...X}).catch(de=>{console.warn(de),console.warn(cN)})},[n,X]),te=j.useCallback(de=>{de!=null&&de.isIntersecting&&J()},[J]);DN(i,te,WN,{disabled:!!S||Z!=="viewport"}),j.useEffect(()=>{o.current||!S&&Z==="render"&&(J(),o.current=!0)},[S,J,Z]);const he=de=>{const Le=de.currentTarget.getAttribute("target"),Ye=y!==void 0?y:Le;if(!S&&!KN(de)&&!de.defaultPrevented&&(!Ye||Ye==="_self")&&de.button===0){de.preventDefault(),Qx.flushSync(()=>{s(!0)});const Cn=n.subscribe("onResolved",()=>{Cn(),s(!1)});n.navigate({...X,replace:p,resetScroll:w,hashScrollIntoView:m,startTransition:x,viewTransition:g,ignoreBlocker:R})}};if(W)return{...H,ref:i,href:W,...v&&{children:v},...y&&{target:y},...S&&{disabled:S},...E&&{style:E},...b&&{className:b},..._&&{onClick:_},...C&&{onFocus:C},...M&&{onMouseEnter:M},...L&&{onMouseLeave:L},...P&&{onTouchStart:P}};const ye=de=>{S||Z&&J()},ce=ye,$e=de=>{if(!(S||!Z))if(!oe)J();else{const Le=de.target;if(Yo.has(Le))return;const Ye=setTimeout(()=>{Yo.delete(Le),J()},oe);Yo.set(Le,Ye)}},un=de=>{if(S||!Z||!oe)return;const Le=de.target,Ye=Yo.get(Le);Ye&&(clearTimeout(Ye),Yo.delete(Le))},dt=re?pr(a,{})??BN:$c,At=re?$c:pr(l,{})??$c,Wn=[b,dt.className,At.className].filter(Boolean).join(" "),Kn=(E||dt.style||At.style)&&{...E,...dt.style,...At.style};return{...H,...dt,...At,href:Y==null?void 0:Y.href,ref:i,onClick:Zo([_,he]),onFocus:Zo([C,ye]),onMouseEnter:Zo([M,$e]),onMouseLeave:Zo([L,un]),onTouchStart:Zo([P,ce]),disabled:!!S,target:y,...Kn&&{style:Kn},...Wn&&{className:Wn},...S&&HN,...re&&UN,...r&&VN}}const $c={},BN={className:"active"},HN={role:"link","aria-disabled":!0},UN={"data-status":"active","aria-current":"page"},VN={"data-transitioning":"transitioning"},Yo=new WeakMap,WN={rootMargin:"100px"},Zo=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}},Ue=j.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:s,ref:o,...i}=$N(r,t),a=typeof r.children=="function"?r.children({isActive:i["data-status"]==="active"}):r.children;return n===void 0&&delete i.disabled,j.createElement(n||"a",{...i,ref:o},a)});function KN(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}let qN=class extends Sv{constructor(t){super(t),this.useMatch=n=>_n({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>_n({...n,from:this.id,select:r=>n!=null&&n.select?n.select(r.context):r.context}),this.useSearch=n=>Fh({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>Oh({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Ah({...n,from:this.id}),this.useLoaderData=n=>Ih({...n,from:this.id}),this.useNavigate=()=>Dh({from:this.fullPath}),this.Link=ls.forwardRef((n,r)=>h.jsx(Ue,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}};function QN(e){return new qN(e)}class GN extends dN{constructor(t){super(t),this.useMatch=n=>_n({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>_n({...n,from:this.id,select:r=>n!=null&&n.select?n.select(r.context):r.context}),this.useSearch=n=>Fh({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>Oh({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Ah({...n,from:this.id}),this.useLoaderData=n=>Ih({...n,from:this.id}),this.useNavigate=()=>Dh({from:this.fullPath}),this.Link=ls.forwardRef((n,r)=>h.jsx(Ue,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function XN(e){return new GN(e)}function _o(e){return typeof e=="object"?new Ym(e,{silent:!0}).createRoute(e):new Ym(e,{silent:!0}).createRoute}class Ym{constructor(t,n){this.path=t,this.createRoute=r=>{this.silent;const s=QN(r);return s.isRoot=!1,s},this.silent=n==null?void 0:n.silent}}class Zm{constructor(t){this.useMatch=n=>_n({select:n==null?void 0:n.select,from:this.options.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>_n({from:this.options.id,select:r=>n!=null&&n.select?n.select(r.context):r.context}),this.useSearch=n=>Fh({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.options.id}),this.useParams=n=>Oh({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>Ah({...n,from:this.options.id}),this.useLoaderData=n=>Ih({...n,from:this.options.id}),this.useNavigate=()=>{const n=It();return Dh({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function Jm(e){return typeof e=="object"?new Zm(e):t=>new Zm({id:e,...t})}function YN(){const e=It(),t=j.useRef({router:e,mounted:!1}),[n,r]=j.useState(!1),{hasPendingMatches:s,isLoading:o}=St({select:c=>({isLoading:c.isLoading,hasPendingMatches:c.matches.some(f=>f.status==="pending")}),structuralSharing:!0}),i=zc(o),a=o||n||s,l=zc(a),u=o||s,d=zc(u);return e.startTransition=c=>{r(!0),j.startTransition(()=>{c(),r(!1)})},j.useEffect(()=>{const c=e.history.subscribe(e.load),f=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return rs(e.latestLocation.publicHref)!==rs(f.publicHref)&&e.commitLocation({...f,replace:!0}),()=>{c()}},[e,e.history]),Qa(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(f){console.error(f)}})()},[e]),Qa(()=>{i&&!o&&e.emit({type:"onLoad",...ss(e.state)})},[i,e,o]),Qa(()=>{d&&!u&&e.emit({type:"onBeforeRouteMount",...ss(e.state)})},[u,d,e]),Qa(()=>{if(l&&!a){const c=ss(e.state);e.emit({type:"onResolved",...c}),e.__store.setState(f=>({...f,status:"idle",resolvedLocation:f.location})),c.hrefChanged&&UC(e)}},[a,l,e]),null}function ZN(e){const t=St({select:n=>`not-found-${n.location.pathname}-${n.status}`});return h.jsx(Lh,{getResetKey:()=>t,onCatch:(n,r)=>{var s;if(Rt(n))(s=e.onCatch)==null||s.call(e,n,r);else throw n},errorComponent:({error:n})=>{var r;if(Rt(n))return(r=e.fallback)==null?void 0:r.call(e,n);throw n},children:e.children})}function JN(){return h.jsx("p",{children:"Not Found"})}function ks(e){return h.jsx(h.Fragment,{children:e.children})}function Pv(e,t,n){return t.options.notFoundComponent?h.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?h.jsx(e.options.defaultNotFoundComponent,{...n}):h.jsx(JN,{})}function ek({children:e}){var n;const t=It();return t.isServer?h.jsx("script",{nonce:(n=t.options.ssr)==null?void 0:n.nonce,dangerouslySetInnerHTML:{__html:e+";document.currentScript.remove()"}}):null}function tk(){const e=It();if(!e.isScrollRestoring||!e.isServer||typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return null;const n=(e.options.getScrollRestorationKey||lf)(e.latestLocation),r=n!==lf(e.latestLocation)?n:void 0,s={storageKey:su,shouldScrollRestoration:!0};return r&&(s.key=r),h.jsx(ek,{children:`(${dv.toString()})(${JSON.stringify(s)})`})}const Rv=j.memo(function({matchId:t}){var g,v;const n=It(),r=St({select:y=>{const S=y.matches.find(E=>E.id===t);return Bn(S),{routeId:S.routeId,ssr:S.ssr,_displayPending:S._displayPending}},structuralSharing:!0}),s=n.routesById[r.routeId],o=s.options.pendingComponent??n.options.defaultPendingComponent,i=o?h.jsx(o,{}):null,a=s.options.errorComponent??n.options.defaultErrorComponent,l=s.options.onCatch??n.options.defaultOnCatch,u=s.isRoot?s.options.notFoundComponent??((g=n.options.notFoundRoute)==null?void 0:g.options.component):s.options.notFoundComponent,d=r.ssr===!1||r.ssr==="data-only",c=(!s.isRoot||s.options.wrapInSuspense||d)&&(s.options.wrapInSuspense??o??(((v=s.options.errorComponent)==null?void 0:v.preload)||d))?j.Suspense:ks,f=a?Lh:ks,m=u?ZN:ks,p=St({select:y=>y.loadedAt}),x=St({select:y=>{var E;const S=y.matches.findIndex(b=>b.id===t);return(E=y.matches[S-1])==null?void 0:E.routeId}}),w=s.isRoot?s.options.shellComponent??ks:ks;return h.jsxs(w,{children:[h.jsx(zu.Provider,{value:t,children:h.jsx(c,{fallback:i,children:h.jsx(f,{getResetKey:()=>p,errorComponent:a||Fu,onCatch:(y,S)=>{if(Rt(y))throw y;l==null||l(y,S)},children:h.jsx(m,{fallback:y=>{if(!u||y.routeId&&y.routeId!==r.routeId||!y.routeId&&!s.isRoot)throw y;return j.createElement(u,y)},children:d||r._displayPending?h.jsx(hN,{fallback:i,children:h.jsx(eg,{matchId:t})}):h.jsx(eg,{matchId:t})})})})}),x===Ct&&n.options.scrollRestoration?h.jsxs(h.Fragment,{children:[h.jsx(nk,{}),h.jsx(tk,{})]}):null]})});function nk(){const e=It(),t=j.useRef(void 0);return h.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...ss(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const eg=j.memo(function({matchId:t}){var l,u,d,c;const n=It(),{match:r,key:s,routeId:o}=St({select:f=>{const m=f.matches.find(v=>v.id===t),p=m.routeId,x=n.routesById[p].options.remountDeps??n.options.defaultRemountDeps,w=x==null?void 0:x({routeId:p,loaderDeps:m.loaderDeps,params:m._strictParams,search:m._strictSearch});return{key:w?JSON.stringify(w):void 0,routeId:p,match:{id:m.id,status:m.status,error:m.error,invalid:m.invalid,_forcePending:m._forcePending,_displayPending:m._displayPending}}},structuralSharing:!0}),i=n.routesById[o],a=j.useMemo(()=>{const f=i.options.component??n.options.defaultComponent;return f?h.jsx(f,{},s):h.jsx(jv,{})},[s,i.options.component,n.options.defaultComponent]);if(r._displayPending)throw(l=n.getMatch(r.id))==null?void 0:l._nonReactive.displayPendingPromise;if(r._forcePending)throw(u=n.getMatch(r.id))==null?void 0:u._nonReactive.minPendingPromise;if(r.status==="pending"){const f=i.options.pendingMinMs??n.options.defaultPendingMinMs;if(f){const m=n.getMatch(r.id);if(m&&!m._nonReactive.minPendingPromise&&!n.isServer){const p=vo();m._nonReactive.minPendingPromise=p,setTimeout(()=>{p.resolve(),m._nonReactive.minPendingPromise=void 0},f)}}throw(d=n.getMatch(r.id))==null?void 0:d._nonReactive.loadPromise}if(r.status==="notFound")return Bn(Rt(r.error)),Pv(n,i,r.error);if(r.status==="redirected")throw Bn(Ht(r.error)),(c=n.getMatch(r.id))==null?void 0:c._nonReactive.loadPromise;if(r.status==="error"){if(n.isServer){const f=(i.options.errorComponent??n.options.defaultErrorComponent)||Fu;return h.jsx(f,{error:r.error,reset:void 0,info:{componentStack:""}})}throw r.error}return a}),jv=j.memo(function(){const t=It(),n=j.useContext(zu),r=St({select:u=>{var d;return(d=u.matches.find(c=>c.id===n))==null?void 0:d.routeId}}),s=t.routesById[r],o=St({select:u=>{const c=u.matches.find(f=>f.id===n);return Bn(c),c.globalNotFound}}),i=St({select:u=>{var f;const d=u.matches,c=d.findIndex(m=>m.id===n);return(f=d[c+1])==null?void 0:f.id}}),a=t.options.defaultPendingComponent?h.jsx(t.options.defaultPendingComponent,{}):null;if(o)return Pv(t,s,void 0);if(!i)return null;const l=h.jsx(Rv,{matchId:i});return r===Ct?h.jsx(j.Suspense,{fallback:a,children:l}):l});function rk(){const e=It(),n=e.routesById[Ct].options.pendingComponent??e.options.defaultPendingComponent,r=n?h.jsx(n,{}):null,s=e.isServer||typeof document<"u"&&e.ssr?ks:j.Suspense,o=h.jsxs(s,{fallback:r,children:[!e.isServer&&h.jsx(YN,{}),h.jsx(sk,{})]});return e.options.InnerWrap?h.jsx(e.options.InnerWrap,{children:o}):o}function sk(){const e=It(),t=St({select:s=>{var o;return(o=s.matches[0])==null?void 0:o.id}}),n=St({select:s=>s.loadedAt}),r=t?h.jsx(Rv,{matchId:t}):null;return h.jsx(zu.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:h.jsx(Lh,{getResetKey:()=>n,errorComponent:Fu,onCatch:s=>{s.message||s.toString()},children:r})})}const ok=e=>new ik(e);class ik extends oN{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=_o,globalThis.createLazyFileRoute=Jm):typeof window<"u"&&(window.createFileRoute=_o,window.createLazyFileRoute=Jm);function ak({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=kv(),s=h.jsx(r.Provider,{value:e,children:t});return e.options.Wrap?h.jsx(e.options.Wrap,{children:s}):s}function lk({router:e,...t}){return h.jsx(ak,{router:e,...t,children:h.jsx(rk,{})})}function Mv(e,t){return function(){return e.apply(t,arguments)}}const{toString:uk}=Object.prototype,{getPrototypeOf:zh}=Object,{iterator:$u,toStringTag:Tv}=Symbol,Bu=(e=>t=>{const n=uk.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),an=e=>(e=e.toLowerCase(),t=>Bu(t)===e),Hu=e=>t=>typeof t===e,{isArray:Oo}=Array,bo=Hu("undefined");function ha(e){return e!==null&&!bo(e)&&e.constructor!==null&&!bo(e.constructor)&&_t(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Lv=an("ArrayBuffer");function ck(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Lv(e.buffer),t}const dk=Hu("string"),_t=Hu("function"),Iv=Hu("number"),pa=e=>e!==null&&typeof e=="object",fk=e=>e===!0||e===!1,vl=e=>{if(Bu(e)!=="object")return!1;const t=zh(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Tv in e)&&!($u in e)},hk=e=>{if(!pa(e)||ha(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},pk=an("Date"),mk=an("File"),gk=an("Blob"),yk=an("FileList"),xk=e=>pa(e)&&_t(e.pipe),vk=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||_t(e.append)&&((t=Bu(e))==="formdata"||t==="object"&&_t(e.toString)&&e.toString()==="[object FormData]"))},wk=an("URLSearchParams"),[Sk,_k,bk,Ek]=["ReadableStream","Request","Response","Headers"].map(an),Ck=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ma(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),Oo(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(ha(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(r=0;r<i;r++)a=o[r],t.call(null,e[a],a,e)}}function Av(e,t){if(ha(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const Hr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ov=e=>!bo(e)&&e!==Hr;function cf(){const{caseless:e,skipUndefined:t}=Ov(this)&&this||{},n={},r=(s,o)=>{const i=e&&Av(n,o)||o;vl(n[i])&&vl(s)?n[i]=cf(n[i],s):vl(s)?n[i]=cf({},s):Oo(s)?n[i]=s.slice():(!t||!bo(s))&&(n[i]=s)};for(let s=0,o=arguments.length;s<o;s++)arguments[s]&&ma(arguments[s],r);return n}const Nk=(e,t,n,{allOwnKeys:r}={})=>(ma(t,(s,o)=>{n&&_t(s)?e[o]=Mv(s,n):e[o]=s},{allOwnKeys:r}),e),kk=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Pk=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Rk=(e,t,n,r)=>{let s,o,i;const a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!r||r(i,e,t))&&!a[i]&&(t[i]=e[i],a[i]=!0);e=n!==!1&&zh(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},jk=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Mk=e=>{if(!e)return null;if(Oo(e))return e;let t=e.length;if(!Iv(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Tk=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&zh(Uint8Array)),Lk=(e,t)=>{const r=(e&&e[$u]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},Ik=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Ak=an("HTMLFormElement"),Ok=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),tg=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Fk=an("RegExp"),Fv=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ma(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},Dk=e=>{Fv(e,(t,n)=>{if(_t(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(_t(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},zk=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return Oo(e)?r(e):r(String(e).split(t)),n},$k=()=>{},Bk=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Hk(e){return!!(e&&_t(e.append)&&e[Tv]==="FormData"&&e[$u])}const Uk=e=>{const t=new Array(10),n=(r,s)=>{if(pa(r)){if(t.indexOf(r)>=0)return;if(ha(r))return r;if(!("toJSON"in r)){t[s]=r;const o=Oo(r)?[]:{};return ma(r,(i,a)=>{const l=n(i,s+1);!bo(l)&&(o[a]=l)}),t[s]=void 0,o}}return r};return n(e,0)},Vk=an("AsyncFunction"),Wk=e=>e&&(pa(e)||_t(e))&&_t(e.then)&&_t(e.catch),Dv=((e,t)=>e?setImmediate:t?((n,r)=>(Hr.addEventListener("message",({source:s,data:o})=>{s===Hr&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),Hr.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",_t(Hr.postMessage)),Kk=typeof queueMicrotask<"u"?queueMicrotask.bind(Hr):typeof process<"u"&&process.nextTick||Dv,qk=e=>e!=null&&_t(e[$u]),z={isArray:Oo,isArrayBuffer:Lv,isBuffer:ha,isFormData:vk,isArrayBufferView:ck,isString:dk,isNumber:Iv,isBoolean:fk,isObject:pa,isPlainObject:vl,isEmptyObject:hk,isReadableStream:Sk,isRequest:_k,isResponse:bk,isHeaders:Ek,isUndefined:bo,isDate:pk,isFile:mk,isBlob:gk,isRegExp:Fk,isFunction:_t,isStream:xk,isURLSearchParams:wk,isTypedArray:Tk,isFileList:yk,forEach:ma,merge:cf,extend:Nk,trim:Ck,stripBOM:kk,inherits:Pk,toFlatObject:Rk,kindOf:Bu,kindOfTest:an,endsWith:jk,toArray:Mk,forEachEntry:Lk,matchAll:Ik,isHTMLForm:Ak,hasOwnProperty:tg,hasOwnProp:tg,reduceDescriptors:Fv,freezeMethods:Dk,toObjectSet:zk,toCamelCase:Ok,noop:$k,toFiniteNumber:Bk,findKey:Av,global:Hr,isContextDefined:Ov,isSpecCompliantForm:Hk,toJSONObject:Uk,isAsyncFn:Vk,isThenable:Wk,setImmediate:Dv,asap:Kk,isIterable:qk};function se(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}z.inherits(se,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:z.toJSONObject(this.config),code:this.code,status:this.status}}});const zv=se.prototype,$v={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{$v[e]={value:e}});Object.defineProperties(se,$v);Object.defineProperty(zv,"isAxiosError",{value:!0});se.from=(e,t,n,r,s,o)=>{const i=Object.create(zv);z.toFlatObject(e,i,function(d){return d!==Error.prototype},u=>u!=="isAxiosError");const a=e&&e.message?e.message:"Error",l=t==null&&e?e.code:t;return se.call(i,a,l,n,r,s),e&&i.cause==null&&Object.defineProperty(i,"cause",{value:e,configurable:!0}),i.name=e&&e.name||"Error",o&&Object.assign(i,o),i};const Qk=null;function df(e){return z.isPlainObject(e)||z.isArray(e)}function Bv(e){return z.endsWith(e,"[]")?e.slice(0,-2):e}function ng(e,t,n){return e?e.concat(t).map(function(s,o){return s=Bv(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function Gk(e){return z.isArray(e)&&!e.some(df)}const Xk=z.toFlatObject(z,{},null,function(t){return/^is[A-Z]/.test(t)});function Uu(e,t,n){if(!z.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=z.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,w){return!z.isUndefined(w[x])});const r=n.metaTokens,s=n.visitor||d,o=n.dots,i=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&z.isSpecCompliantForm(t);if(!z.isFunction(s))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(z.isDate(p))return p.toISOString();if(z.isBoolean(p))return p.toString();if(!l&&z.isBlob(p))throw new se("Blob is not supported. Use a Buffer instead.");return z.isArrayBuffer(p)||z.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function d(p,x,w){let g=p;if(p&&!w&&typeof p=="object"){if(z.endsWith(x,"{}"))x=r?x:x.slice(0,-2),p=JSON.stringify(p);else if(z.isArray(p)&&Gk(p)||(z.isFileList(p)||z.endsWith(x,"[]"))&&(g=z.toArray(p)))return x=Bv(x),g.forEach(function(y,S){!(z.isUndefined(y)||y===null)&&t.append(i===!0?ng([x],S,o):i===null?x:x+"[]",u(y))}),!1}return df(p)?!0:(t.append(ng(w,x,o),u(p)),!1)}const c=[],f=Object.assign(Xk,{defaultVisitor:d,convertValue:u,isVisitable:df});function m(p,x){if(!z.isUndefined(p)){if(c.indexOf(p)!==-1)throw Error("Circular reference detected in "+x.join("."));c.push(p),z.forEach(p,function(g,v){(!(z.isUndefined(g)||g===null)&&s.call(t,g,z.isString(v)?v.trim():v,x,f))===!0&&m(g,x?x.concat(v):[v])}),c.pop()}}if(!z.isObject(e))throw new TypeError("data must be an object");return m(e),t}function rg(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function $h(e,t){this._pairs=[],e&&Uu(e,this,t)}const Hv=$h.prototype;Hv.append=function(t,n){this._pairs.push([t,n])};Hv.toString=function(t){const n=t?function(r){return t.call(this,r,rg)}:rg;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Yk(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Uv(e,t,n){if(!t)return e;const r=n&&n.encode||Yk;z.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let o;if(s?o=s(t,n):o=z.isURLSearchParams(t)?t.toString():new $h(t,n).toString(r),o){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class sg{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){z.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Vv={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Zk=typeof URLSearchParams<"u"?URLSearchParams:$h,Jk=typeof FormData<"u"?FormData:null,eP=typeof Blob<"u"?Blob:null,tP={isBrowser:!0,classes:{URLSearchParams:Zk,FormData:Jk,Blob:eP},protocols:["http","https","file","blob","url","data"]},Bh=typeof window<"u"&&typeof document<"u",ff=typeof navigator=="object"&&navigator||void 0,nP=Bh&&(!ff||["ReactNative","NativeScript","NS"].indexOf(ff.product)<0),rP=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",sP=Bh&&window.location.href||"http://localhost",oP=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Bh,hasStandardBrowserEnv:nP,hasStandardBrowserWebWorkerEnv:rP,navigator:ff,origin:sP},Symbol.toStringTag,{value:"Module"})),tt={...oP,...tP};function iP(e,t){return Uu(e,new tt.classes.URLSearchParams,{visitor:function(n,r,s,o){return tt.isNode&&z.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function aP(e){return z.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function lP(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r<s;r++)o=n[r],t[o]=e[o];return t}function Wv(e){function t(n,r,s,o){let i=n[o++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),l=o>=n.length;return i=!i&&z.isArray(s)?s.length:i,l?(z.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!a):((!s[i]||!z.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],o)&&z.isArray(s[i])&&(s[i]=lP(s[i])),!a)}if(z.isFormData(e)&&z.isFunction(e.entries)){const n={};return z.forEachEntry(e,(r,s)=>{t(aP(r),s,n,0)}),n}return null}function uP(e,t,n){if(z.isString(e))try{return(t||JSON.parse)(e),z.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ga={transitional:Vv,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=z.isObject(t);if(o&&z.isHTMLForm(t)&&(t=new FormData(t)),z.isFormData(t))return s?JSON.stringify(Wv(t)):t;if(z.isArrayBuffer(t)||z.isBuffer(t)||z.isStream(t)||z.isFile(t)||z.isBlob(t)||z.isReadableStream(t))return t;if(z.isArrayBufferView(t))return t.buffer;if(z.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return iP(t,this.formSerializer).toString();if((a=z.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Uu(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),uP(t)):t}],transformResponse:[function(t){const n=this.transitional||ga.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(z.isResponse(t)||z.isReadableStream(t))return t;if(t&&z.isString(t)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(a){if(i)throw a.name==="SyntaxError"?se.from(a,se.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:tt.classes.FormData,Blob:tt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};z.forEach(["delete","get","head","post","put","patch"],e=>{ga.headers[e]={}});const cP=z.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),dP=e=>{const t={};let n,r,s;return e&&e.split(`
|
|
57
|
+
`).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||t[n]&&cP[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},og=Symbol("internals");function Jo(e){return e&&String(e).trim().toLowerCase()}function wl(e){return e===!1||e==null?e:z.isArray(e)?e.map(wl):String(e)}function fP(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const hP=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Bc(e,t,n,r,s){if(z.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!z.isString(t)){if(z.isString(r))return t.indexOf(r)!==-1;if(z.isRegExp(r))return r.test(t)}}function pP(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function mP(e,t){const n=z.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,o,i){return this[r].call(this,t,s,o,i)},configurable:!0})})}let bt=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(a,l,u){const d=Jo(l);if(!d)throw new Error("header name must be a non-empty string");const c=z.findKey(s,d);(!c||s[c]===void 0||u===!0||u===void 0&&s[c]!==!1)&&(s[c||l]=wl(a))}const i=(a,l)=>z.forEach(a,(u,d)=>o(u,d,l));if(z.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(z.isString(t)&&(t=t.trim())&&!hP(t))i(dP(t),n);else if(z.isObject(t)&&z.isIterable(t)){let a={},l,u;for(const d of t){if(!z.isArray(d))throw TypeError("Object iterator must return a key-value pair");a[u=d[0]]=(l=a[u])?z.isArray(l)?[...l,d[1]]:[l,d[1]]:d[1]}i(a,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=Jo(t),t){const r=z.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return fP(s);if(z.isFunction(n))return n.call(this,s,r);if(z.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Jo(t),t){const r=z.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Bc(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(i){if(i=Jo(i),i){const a=z.findKey(r,i);a&&(!n||Bc(r,r[a],a,n))&&(delete r[a],s=!0)}}return z.isArray(t)?t.forEach(o):o(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!t||Bc(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,r={};return z.forEach(this,(s,o)=>{const i=z.findKey(r,o);if(i){n[i]=wl(s),delete n[o];return}const a=t?pP(o):String(o).trim();a!==o&&delete n[o],n[a]=wl(s),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return z.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&z.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
58
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[og]=this[og]={accessors:{}}).accessors,s=this.prototype;function o(i){const a=Jo(i);r[a]||(mP(s,i),r[a]=!0)}return z.isArray(t)?t.forEach(o):o(t),this}};bt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);z.reduceDescriptors(bt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});z.freezeMethods(bt);function Hc(e,t){const n=this||ga,r=t||n,s=bt.from(r.headers);let o=r.data;return z.forEach(e,function(a){o=a.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function Kv(e){return!!(e&&e.__CANCEL__)}function Fo(e,t,n){se.call(this,e??"canceled",se.ERR_CANCELED,t,n),this.name="CanceledError"}z.inherits(Fo,se,{__CANCEL__:!0});function qv(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new se("Request failed with status code "+n.status,[se.ERR_BAD_REQUEST,se.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function gP(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function yP(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),d=r[o];i||(i=u),n[s]=l,r[s]=u;let c=o,f=0;for(;c!==s;)f+=n[c++],c=c%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),u-i<t)return;const m=d&&u-d;return m?Math.round(f*1e3/m):void 0}}function xP(e,t){let n=0,r=1e3/t,s,o;const i=(u,d=Date.now())=>{n=d,s=null,o&&(clearTimeout(o),o=null),e(...u)};return[(...u)=>{const d=Date.now(),c=d-n;c>=r?i(u,d):(s=u,o||(o=setTimeout(()=>{o=null,i(s)},r-c)))},()=>s&&i(s)]}const au=(e,t,n=3)=>{let r=0;const s=yP(50,250);return xP(o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,l=i-r,u=s(l),d=i<=a;r=i;const c={loaded:i,total:a,progress:a?i/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&d?(a-i)/u:void 0,event:o,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(c)},n)},ig=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},ag=e=>(...t)=>z.asap(()=>e(...t)),vP=tt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,tt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(tt.origin),tt.navigator&&/(msie|trident)/i.test(tt.navigator.userAgent)):()=>!0,wP=tt.hasStandardBrowserEnv?{write(e,t,n,r,s,o,i){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];z.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),z.isString(r)&&a.push(`path=${r}`),z.isString(s)&&a.push(`domain=${s}`),o===!0&&a.push("secure"),z.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function SP(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function _P(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Qv(e,t,n){let r=!SP(t);return e&&(r||n==!1)?_P(e,t):t}const lg=e=>e instanceof bt?{...e}:e;function ys(e,t){t=t||{};const n={};function r(u,d,c,f){return z.isPlainObject(u)&&z.isPlainObject(d)?z.merge.call({caseless:f},u,d):z.isPlainObject(d)?z.merge({},d):z.isArray(d)?d.slice():d}function s(u,d,c,f){if(z.isUndefined(d)){if(!z.isUndefined(u))return r(void 0,u,c,f)}else return r(u,d,c,f)}function o(u,d){if(!z.isUndefined(d))return r(void 0,d)}function i(u,d){if(z.isUndefined(d)){if(!z.isUndefined(u))return r(void 0,u)}else return r(void 0,d)}function a(u,d,c){if(c in t)return r(u,d);if(c in e)return r(void 0,u)}const l={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(u,d,c)=>s(lg(u),lg(d),c,!0)};return z.forEach(Object.keys({...e,...t}),function(d){const c=l[d]||s,f=c(e[d],t[d],d);z.isUndefined(f)&&c!==a||(n[d]=f)}),n}const Gv=e=>{const t=ys({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:a}=t;if(t.headers=i=bt.from(i),t.url=Uv(Qv(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),z.isFormData(n)){if(tt.hasStandardBrowserEnv||tt.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(z.isFunction(n.getHeaders)){const l=n.getHeaders(),u=["content-type","content-length"];Object.entries(l).forEach(([d,c])=>{u.includes(d.toLowerCase())&&i.set(d,c)})}}if(tt.hasStandardBrowserEnv&&(r&&z.isFunction(r)&&(r=r(t)),r||r!==!1&&vP(t.url))){const l=s&&o&&wP.read(o);l&&i.set(s,l)}return t},bP=typeof XMLHttpRequest<"u",EP=bP&&function(e){return new Promise(function(n,r){const s=Gv(e);let o=s.data;const i=bt.from(s.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=s,d,c,f,m,p;function x(){m&&m(),p&&p(),s.cancelToken&&s.cancelToken.unsubscribe(d),s.signal&&s.signal.removeEventListener("abort",d)}let w=new XMLHttpRequest;w.open(s.method.toUpperCase(),s.url,!0),w.timeout=s.timeout;function g(){if(!w)return;const y=bt.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),E={data:!a||a==="text"||a==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:y,config:e,request:w};qv(function(_){n(_),x()},function(_){r(_),x()},E),w=null}"onloadend"in w?w.onloadend=g:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(g)},w.onabort=function(){w&&(r(new se("Request aborted",se.ECONNABORTED,e,w)),w=null)},w.onerror=function(S){const E=S&&S.message?S.message:"Network Error",b=new se(E,se.ERR_NETWORK,e,w);b.event=S||null,r(b),w=null},w.ontimeout=function(){let S=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const E=s.transitional||Vv;s.timeoutErrorMessage&&(S=s.timeoutErrorMessage),r(new se(S,E.clarifyTimeoutError?se.ETIMEDOUT:se.ECONNABORTED,e,w)),w=null},o===void 0&&i.setContentType(null),"setRequestHeader"in w&&z.forEach(i.toJSON(),function(S,E){w.setRequestHeader(E,S)}),z.isUndefined(s.withCredentials)||(w.withCredentials=!!s.withCredentials),a&&a!=="json"&&(w.responseType=s.responseType),u&&([f,p]=au(u,!0),w.addEventListener("progress",f)),l&&w.upload&&([c,m]=au(l),w.upload.addEventListener("progress",c),w.upload.addEventListener("loadend",m)),(s.cancelToken||s.signal)&&(d=y=>{w&&(r(!y||y.type?new Fo(null,e,w):y),w.abort(),w=null)},s.cancelToken&&s.cancelToken.subscribe(d),s.signal&&(s.signal.aborted?d():s.signal.addEventListener("abort",d)));const v=gP(s.url);if(v&&tt.protocols.indexOf(v)===-1){r(new se("Unsupported protocol "+v+":",se.ERR_BAD_REQUEST,e));return}w.send(o||null)})},CP=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const o=function(u){if(!s){s=!0,a();const d=u instanceof Error?u:this.reason;r.abort(d instanceof se?d:new Fo(d instanceof Error?d.message:d))}};let i=t&&setTimeout(()=>{i=null,o(new se(`timeout ${t} of ms exceeded`,se.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),e=null)};e.forEach(u=>u.addEventListener("abort",o));const{signal:l}=r;return l.unsubscribe=()=>z.asap(a),l}},NP=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},kP=async function*(e,t){for await(const n of PP(e))yield*NP(n,t)},PP=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},ug=(e,t,n,r)=>{const s=kP(e,t);let o=0,i,a=l=>{i||(i=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:d}=await s.next();if(u){a(),l.close();return}let c=d.byteLength;if(n){let f=o+=c;n(f)}l.enqueue(new Uint8Array(d))}catch(u){throw a(u),u}},cancel(l){return a(l),s.return()}},{highWaterMark:2})},cg=64*1024,{isFunction:Ga}=z,RP=(({Request:e,Response:t})=>({Request:e,Response:t}))(z.global),{ReadableStream:dg,TextEncoder:fg}=z.global,hg=(e,...t)=>{try{return!!e(...t)}catch{return!1}},jP=e=>{e=z.merge.call({skipUndefined:!0},RP,e);const{fetch:t,Request:n,Response:r}=e,s=t?Ga(t):typeof fetch=="function",o=Ga(n),i=Ga(r);if(!s)return!1;const a=s&&Ga(dg),l=s&&(typeof fg=="function"?(p=>x=>p.encode(x))(new fg):async p=>new Uint8Array(await new n(p).arrayBuffer())),u=o&&a&&hg(()=>{let p=!1;const x=new n(tt.origin,{body:new dg,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!x}),d=i&&a&&hg(()=>z.isReadableStream(new r("").body)),c={stream:d&&(p=>p.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!c[p]&&(c[p]=(x,w)=>{let g=x&&x[p];if(g)return g.call(x);throw new se(`Response type '${p}' is not supported`,se.ERR_NOT_SUPPORT,w)})});const f=async p=>{if(p==null)return 0;if(z.isBlob(p))return p.size;if(z.isSpecCompliantForm(p))return(await new n(tt.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(z.isArrayBufferView(p)||z.isArrayBuffer(p))return p.byteLength;if(z.isURLSearchParams(p)&&(p=p+""),z.isString(p))return(await l(p)).byteLength},m=async(p,x)=>{const w=z.toFiniteNumber(p.getContentLength());return w??f(x)};return async p=>{let{url:x,method:w,data:g,signal:v,cancelToken:y,timeout:S,onDownloadProgress:E,onUploadProgress:b,responseType:_,headers:C,withCredentials:M="same-origin",fetchOptions:L}=Gv(p),P=t||fetch;_=_?(_+"").toLowerCase():"text";let R=CP([v,y&&y.toAbortSignal()],S),$=null;const k=R&&R.unsubscribe&&(()=>{R.unsubscribe()});let I;try{if(b&&u&&w!=="get"&&w!=="head"&&(I=await m(C,g))!==0){let B=new n(x,{method:"POST",body:g,duplex:"half"}),H;if(z.isFormData(g)&&(H=B.headers.get("content-type"))&&C.setContentType(H),B.body){const[K,V]=ig(I,au(ag(b)));g=ug(B.body,cg,K,V)}}z.isString(M)||(M=M?"include":"omit");const A=o&&"credentials"in n.prototype,F={...L,signal:R,method:w.toUpperCase(),headers:C.normalize().toJSON(),body:g,duplex:"half",credentials:A?M:void 0};$=o&&new n(x,F);let N=await(o?P($,L):P(x,F));const T=d&&(_==="stream"||_==="response");if(d&&(E||T&&k)){const B={};["status","statusText","headers"].forEach(X=>{B[X]=N[X]});const H=z.toFiniteNumber(N.headers.get("content-length")),[K,V]=E&&ig(H,au(ag(E),!0))||[];N=new r(ug(N.body,cg,K,()=>{V&&V(),k&&k()}),B)}_=_||"text";let D=await c[z.findKey(c,_)||"text"](N,p);return!T&&k&&k(),await new Promise((B,H)=>{qv(B,H,{data:D,headers:bt.from(N.headers),status:N.status,statusText:N.statusText,config:p,request:$})})}catch(A){throw k&&k(),A&&A.name==="TypeError"&&/Load failed|fetch/i.test(A.message)?Object.assign(new se("Network Error",se.ERR_NETWORK,p,$),{cause:A.cause||A}):se.from(A,A&&A.code,p,$)}}},MP=new Map,Xv=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,o=[r,s,n];let i=o.length,a=i,l,u,d=MP;for(;a--;)l=o[a],u=d.get(l),u===void 0&&d.set(l,u=a?new Map:jP(t)),d=u;return u};Xv();const Hh={http:Qk,xhr:EP,fetch:{get:Xv}};z.forEach(Hh,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const pg=e=>`- ${e}`,TP=e=>z.isFunction(e)||e===null||e===!1;function LP(e,t){e=z.isArray(e)?e:[e];const{length:n}=e;let r,s;const o={};for(let i=0;i<n;i++){r=e[i];let a;if(s=r,!TP(r)&&(s=Hh[(a=String(r)).toLowerCase()],s===void 0))throw new se(`Unknown adapter '${a}'`);if(s&&(z.isFunction(s)||(s=s.get(t))))break;o[a||"#"+i]=s}if(!s){const i=Object.entries(o).map(([l,u])=>`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=n?i.length>1?`since :
|
|
59
59
|
`+i.map(pg).join(`
|
|
60
60
|
`):" "+pg(i[0]):"as no adapter specified";throw new se("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return s}const Yv={getAdapter:LP,adapters:Hh};function Uc(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Fo(null,e)}function mg(e){return Uc(e),e.headers=bt.from(e.headers),e.data=Hc.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Yv.getAdapter(e.adapter||ga.adapter,e)(e).then(function(r){return Uc(e),r.data=Hc.call(e,e.transformResponse,r),r.headers=bt.from(r.headers),r},function(r){return Kv(r)||(Uc(e),r&&r.response&&(r.response.data=Hc.call(e,e.transformResponse,r.response),r.response.headers=bt.from(r.response.headers))),Promise.reject(r)})}const Zv="1.13.2",Vu={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Vu[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const gg={};Vu.transitional=function(t,n,r){function s(o,i){return"[Axios v"+Zv+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,a)=>{if(t===!1)throw new se(s(i," has been removed"+(n?" in "+n:"")),se.ERR_DEPRECATED);return n&&!gg[i]&&(gg[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,a):!0}};Vu.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function IP(e,t,n){if(typeof e!="object")throw new se("options must be an object",se.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=t[o];if(i){const a=e[o],l=a===void 0||i(a,o,e);if(l!==!0)throw new se("option "+o+" must be "+l,se.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new se("Unknown option "+o,se.ERR_BAD_OPTION)}}const Sl={assertOptions:IP,validators:Vu},dn=Sl.validators;let os=class{constructor(t){this.defaults=t||{},this.interceptors={request:new sg,response:new sg}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
61
|
-
`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ys(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&Sl.assertOptions(r,{silentJSONParsing:dn.transitional(dn.boolean),forcedJSONParsing:dn.transitional(dn.boolean),clarifyTimeoutError:dn.transitional(dn.boolean)},!1),s!=null&&($.isFunction(s)?n.paramsSerializer={serialize:s}:Sl.assertOptions(s,{encode:dn.function,serialize:dn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Sl.assertOptions(n,{baseUrl:dn.spelling("baseURL"),withXsrfToken:dn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&$.merge(o.common,o[n.method]);o&&$.forEach(["delete","get","head","post","put","patch","common"],p=>{delete o[p]}),n.headers=bt.concat(i,o);const a=[];let l=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(n)===!1||(l=l&&x.synchronous,a.unshift(x.fulfilled,x.rejected))});const u=[];this.interceptors.response.forEach(function(x){u.push(x.fulfilled,x.rejected)});let d,c=0,f;if(!l){const p=[mg.bind(this),void 0];for(p.unshift(...a),p.push(...u),f=p.length,d=Promise.resolve(n);c<f;)d=d.then(p[c++],p[c++]);return d}f=a.length;let m=n;for(;c<f;){const p=a[c++],x=a[c++];try{m=p(m)}catch(w){x.call(this,w);break}}try{d=mg.call(this,m)}catch(p){return Promise.reject(p)}for(c=0,f=u.length;c<f;)d=d.then(u[c++],u[c++]);return d}getUri(t){t=ys(this.defaults,t);const n=Qv(t.baseURL,t.url,t.allowAbsoluteUrls);return Uv(n,t.params,t.paramsSerializer)}};$.forEach(["delete","get","head","options"],function(t){os.prototype[t]=function(n,r){return this.request(ys(r||{},{method:t,url:n,data:(r||{}).data}))}});$.forEach(["post","put","patch"],function(t){function n(r){return function(o,i,a){return this.request(ys(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}os.prototype[t]=n(),os.prototype[t+"Form"]=n(!0)});let AP=class Jv{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(s=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(a=>{r.subscribe(a),o=a}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,a){r.reason||(r.reason=new Fo(o,i,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Jv(function(s){t=s}),cancel:t}}};function OP(e){return function(n){return e.apply(null,n)}}function FP(e){return $.isObject(e)&&e.isAxiosError===!0}const hf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(hf).forEach(([e,t])=>{hf[t]=e});function ew(e){const t=new os(e),n=Mv(os.prototype.request,t);return $.extend(n,os.prototype,t,{allOwnKeys:!0}),$.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return ew(ys(e,s))},n}const Te=ew(ga);Te.Axios=os;Te.CanceledError=Fo;Te.CancelToken=AP;Te.isCancel=Kv;Te.VERSION=Zv;Te.toFormData=Uu;Te.AxiosError=se;Te.Cancel=Te.CanceledError;Te.all=function(t){return Promise.all(t)};Te.spread=OP;Te.isAxiosError=FP;Te.mergeConfig=ys;Te.AxiosHeaders=bt;Te.formToJSON=e=>Wv($.isHTMLForm(e)?new FormData(e):e);Te.getAdapter=Yv.getAdapter;Te.HttpStatusCode=hf;Te.default=Te;const{Axios:z3,AxiosError:DP,CanceledError:$3,isCancel:B3,CancelToken:H3,VERSION:U3,all:V3,Cancel:W3,isAxiosError:K3,spread:q3,toFormData:Q3,AxiosHeaders:G3,HttpStatusCode:X3,formToJSON:Y3,getAdapter:Z3,mergeConfig:J3}=Te;function yg(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function zP(...e){return t=>{let n=!1;const r=e.map(s=>{const o=yg(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<r.length;s++){const o=r[s];typeof o=="function"?o():yg(e[s],null)}}}}var $P=Symbol.for("react.lazy"),lu=x_[" use ".trim().toString()];function BP(e){return typeof e=="object"&&e!==null&&"then"in e}function tw(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===$P&&"_payload"in e&&BP(e._payload)}function HP(e){const t=VP(e),n=R.forwardRef((r,s)=>{let{children:o,...i}=r;tw(o)&&typeof lu=="function"&&(o=lu(o._payload));const a=R.Children.toArray(o),l=a.find(KP);if(l){const u=l.props.children,d=a.map(c=>c===l?R.Children.count(u)>1?R.Children.only(null):R.isValidElement(u)?u.props.children:null:c);return h.jsx(t,{...i,ref:s,children:R.isValidElement(u)?R.cloneElement(u,void 0,d):null})}return h.jsx(t,{...i,ref:s,children:o})});return n.displayName=`${e}.Slot`,n}var UP=HP("Slot");function VP(e){const t=R.forwardRef((n,r)=>{let{children:s,...o}=n;if(tw(s)&&typeof lu=="function"&&(s=lu(s._payload)),R.isValidElement(s)){const i=QP(s),a=qP(o,s.props);return s.type!==R.Fragment&&(a.ref=r?zP(r,i):i),R.cloneElement(s,a)}return R.Children.count(s)>1?R.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var WP=Symbol("radix.slottable");function KP(e){return R.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===WP}function qP(e,t){const n={...t};for(const r in t){const s=e[r],o=t[r];/^on[A-Z]/.test(r)?s&&o?n[r]=(...a)=>{const l=o(...a);return s(...a),l}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function QP(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function nw(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=nw(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function rw(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=nw(e))&&(r&&(r+=" "),r+=t);return r}const xg=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,vg=rw,sw=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return vg(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:o}=t,i=Object.keys(s).map(u=>{const d=n==null?void 0:n[u],c=o==null?void 0:o[u];if(d===null)return null;const f=xg(d)||xg(c);return s[u][f]}),a=n&&Object.entries(n).reduce((u,d)=>{let[c,f]=d;return f===void 0||(u[c]=f),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:c,className:f,...m}=d;return Object.entries(m).every(p=>{let[x,w]=p;return Array.isArray(w)?w.includes({...o,...a}[x]):{...o,...a}[x]===w})?[...u,c,f]:u},[]);return vg(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)},Uh="-",GP=e=>{const t=YP(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(Uh);return a[0]===""&&a.length!==1&&a.shift(),ow(a,t)||XP(i)},getConflictingClassGroupIds:(i,a)=>{const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}}},ow=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?ow(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(Uh);return(i=t.validators.find(({validator:a})=>a(o)))==null?void 0:i.classGroupId},wg=/^\[(.+)\]$/,XP=e=>{if(wg.test(e)){const t=wg.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},YP=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return JP(Object.entries(e.classGroups),n).forEach(([o,i])=>{pf(i,r,o,t)}),r},pf=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:Sg(t,s);o.classGroupId=n;return}if(typeof s=="function"){if(ZP(s)){pf(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([o,i])=>{pf(i,Sg(t,o),n,r)})})},Sg=(e,t)=>{let n=e;return t.split(Uh).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},ZP=e=>e.isThemeGetter,JP=(e,t)=>t?e.map(([n,r])=>{const s=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,a])=>[t+i,a])):o);return[n,s]}):e,eR=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(o,i)=>{n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let i=n.get(o);if(i!==void 0)return i;if((i=r.get(o))!==void 0)return s(o,i),i},set(o,i){n.has(o)?n.set(o,i):s(o,i)}}},iw="!",tR=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],o=t.length,i=a=>{const l=[];let u=0,d=0,c;for(let w=0;w<a.length;w++){let g=a[w];if(u===0){if(g===s&&(r||a.slice(w,w+o)===t)){l.push(a.slice(d,w)),d=w+o;continue}if(g==="/"){c=w;continue}}g==="["?u++:g==="]"&&u--}const f=l.length===0?a:a.substring(d),m=f.startsWith(iw),p=m?f.substring(1):f,x=c&&c>d?c-d:void 0;return{modifiers:l,hasImportantModifier:m,baseClassName:p,maybePostfixModifierPosition:x}};return n?a=>n({className:a,parseClassName:i}):i},nR=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},rR=e=>({cache:eR(e.cacheSize),parseClassName:tR(e),...GP(e)}),sR=/\s+/,oR=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,o=[],i=e.trim().split(sR);let a="";for(let l=i.length-1;l>=0;l-=1){const u=i[l],{modifiers:d,hasImportantModifier:c,baseClassName:f,maybePostfixModifierPosition:m}=n(u);let p=!!m,x=r(p?f.substring(0,m):f);if(!x){if(!p){a=u+(a.length>0?" "+a:a);continue}if(x=r(f),!x){a=u+(a.length>0?" "+a:a);continue}p=!1}const w=nR(d).join(":"),g=c?w+iw:w,v=g+x;if(o.includes(v))continue;o.push(v);const y=s(x,p);for(let S=0;S<y.length;++S){const E=y[S];o.push(g+E)}a=u+(a.length>0?" "+a:a)}return a};function iR(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=aw(t))&&(r&&(r+=" "),r+=n);return r}const aw=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=aw(e[r]))&&(n&&(n+=" "),n+=t);return n};function aR(e,...t){let n,r,s,o=i;function i(l){const u=t.reduce((d,c)=>c(d),e());return n=rR(u),r=n.cache.get,s=n.cache.set,o=a,a(l)}function a(l){const u=r(l);if(u)return u;const d=oR(l,n);return s(l,d),d}return function(){return o(iR.apply(null,arguments))}}const ve=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},lw=/^\[(?:([a-z-]+):)?(.+)\]$/i,lR=/^\d+\/\d+$/,uR=new Set(["px","full","screen"]),cR=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,dR=/\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$/,fR=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,hR=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,pR=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Nn=e=>Xs(e)||uR.has(e)||lR.test(e),Qn=e=>Do(e,"length",_R),Xs=e=>!!e&&!Number.isNaN(Number(e)),Vc=e=>Do(e,"number",Xs),ei=e=>!!e&&Number.isInteger(Number(e)),mR=e=>e.endsWith("%")&&Xs(e.slice(0,-1)),ie=e=>lw.test(e),Gn=e=>cR.test(e),gR=new Set(["length","size","percentage"]),yR=e=>Do(e,gR,uw),xR=e=>Do(e,"position",uw),vR=new Set(["image","url"]),wR=e=>Do(e,vR,ER),SR=e=>Do(e,"",bR),ti=()=>!0,Do=(e,t,n)=>{const r=lw.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},_R=e=>dR.test(e)&&!fR.test(e),uw=()=>!1,bR=e=>hR.test(e),ER=e=>pR.test(e),CR=()=>{const e=ve("colors"),t=ve("spacing"),n=ve("blur"),r=ve("brightness"),s=ve("borderColor"),o=ve("borderRadius"),i=ve("borderSpacing"),a=ve("borderWidth"),l=ve("contrast"),u=ve("grayscale"),d=ve("hueRotate"),c=ve("invert"),f=ve("gap"),m=ve("gradientColorStops"),p=ve("gradientColorStopPositions"),x=ve("inset"),w=ve("margin"),g=ve("opacity"),v=ve("padding"),y=ve("saturate"),S=ve("scale"),E=ve("sepia"),_=ve("skew"),b=ve("space"),C=ve("translate"),L=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto",ie,t],j=()=>[ie,t],O=()=>["",Nn,Qn],k=()=>["auto",Xs,ie],D=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],I=()=>["solid","dashed","dotted","double","none"],F=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],N=()=>["start","end","center","between","around","evenly","stretch"],T=()=>["","0",ie],z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[Xs,ie];return{cacheSize:500,separator:":",theme:{colors:[ti],spacing:[Nn,Qn],blur:["none","",Gn,ie],brightness:B(),borderColor:[e],borderRadius:["none","","full",Gn,ie],borderSpacing:j(),borderWidth:O(),contrast:B(),grayscale:T(),hueRotate:B(),invert:T(),gap:j(),gradientColorStops:[e],gradientColorStopPositions:[mR,Qn],inset:P(),margin:P(),opacity:B(),padding:j(),saturate:B(),scale:B(),sepia:T(),skew:B(),space:j(),translate:j()},classGroups:{aspect:[{aspect:["auto","square","video",ie]}],container:["container"],columns:[{columns:[Gn]}],"break-after":[{"break-after":z()}],"break-before":[{"break-before":z()}],"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"],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(),ie]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[x]}],"inset-x":[{"inset-x":[x]}],"inset-y":[{"inset-y":[x]}],start:[{start:[x]}],end:[{end:[x]}],top:[{top:[x]}],right:[{right:[x]}],bottom:[{bottom:[x]}],left:[{left:[x]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ei,ie]}],basis:[{basis:P()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ie]}],grow:[{grow:T()}],shrink:[{shrink:T()}],order:[{order:["first","last","none",ei,ie]}],"grid-cols":[{"grid-cols":[ti]}],"col-start-end":[{col:["auto",{span:["full",ei,ie]},ie]}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":[ti]}],"row-start-end":[{row:["auto",{span:[ei,ie]},ie]}],"row-start":[{"row-start":k()}],"row-end":[{"row-end":k()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ie]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ie]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...N()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...N(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...N(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[b]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[b]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ie,t]}],"min-w":[{"min-w":[ie,t,"min","max","fit"]}],"max-w":[{"max-w":[ie,t,"none","full","min","max","fit","prose",{screen:[Gn]},Gn]}],h:[{h:[ie,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ie,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ie,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ie,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Gn,Qn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Vc]}],"font-family":[{font:[ti]}],"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:["tighter","tight","normal","wide","wider","widest",ie]}],"line-clamp":[{"line-clamp":["none",Xs,Vc]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Nn,ie]}],"list-image":[{"list-image":["none",ie]}],"list-style-type":[{list:["none","disc","decimal",ie]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...I(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Nn,Qn]}],"underline-offset":[{"underline-offset":["auto",Nn,ie]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ie]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ie]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...D(),xR]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",yR]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},wR]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...I(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:I()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...I()]}],"outline-offset":[{"outline-offset":[Nn,ie]}],"outline-w":[{outline:[Nn,Qn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:O()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[Nn,Qn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Gn,SR]}],"shadow-color":[{shadow:[ti]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...F(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":F()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Gn,ie]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[c]}],saturate:[{saturate:[y]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[c]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ie]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",ie]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",ie]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[ei,ie]}],"translate-x":[{"translate-x":[C]}],"translate-y":[{"translate-y":[C]}],"skew-x":[{"skew-x":[_]}],"skew-y":[{"skew-y":[_]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ie]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ie]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ie]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Nn,Qn,Vc]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"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-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-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"],"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"]}}},NR=aR(CR);function ze(...e){return NR(rw(e))}const kR=sw("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 ring-offset-background",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}});function wn({className:e,variant:t,size:n,asChild:r=!1,...s}){const o=r?UP:"button";return h.jsx(o,{className:ze(kR({variant:t,size:n}),e),...s})}const ya=XN({component:PR});function PR(){return h.jsxs("div",{className:"min-h-screen flex flex-col bg-background",children:[h.jsxs("nav",{className:"px-8 py-4 border-b bg-card flex gap-6 items-center",children:[h.jsxs(Ue,{to:"/",className:"font-bold text-xl text-primary no-underline flex items-center gap-2",children:[h.jsxs("svg",{className:"w-7 h-7",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("rect",{width:"32",height:"32",rx:"6",fill:"#166534"}),h.jsx("path",{d:"M8 10h4v12H8V10zm6 0h4v12h-4V10zm6 0h4v12h-4V10z",fill:"#86efac"}),h.jsx("circle",{cx:"10",cy:"13",r:"1.5",fill:"#22c55e"}),h.jsx("circle",{cx:"16",cy:"16",r:"1.5",fill:"#22c55e"}),h.jsx("circle",{cx:"22",cy:"19",r:"1.5",fill:"#22c55e"})]}),"Furu"]}),h.jsxs("div",{className:"flex gap-2",children:[h.jsx(wn,{asChild:!0,variant:"ghost",size:"sm",children:h.jsx(Ue,{to:"/",activeOptions:{exact:!0},className:"[&.active]:text-primary [&.active]:bg-accent",children:"Dashboard"})}),h.jsx(wn,{asChild:!0,variant:"ghost",size:"sm",children:h.jsx(Ue,{to:"/experiments",className:"[&.active]:text-primary [&.active]:bg-accent",children:"Experiments"})}),h.jsx(wn,{asChild:!0,variant:"ghost",size:"sm",children:h.jsx(Ue,{to:"/dag",className:"[&.active]:text-primary [&.active]:bg-accent",children:"DAG"})})]})]}),h.jsx("main",{className:"flex-1 p-8",children:h.jsx(jv,{})})]})}const RR=Te.create({baseURL:""}),zo=e=>{const t=Te.CancelToken.source(),n=RR({...e,cancelToken:t.token}).then(({data:r})=>r);return n.cancel=()=>{t.cancel("Query was cancelled")},n},jR=e=>zo({url:"/api/health",method:"GET",signal:e}),MR=()=>["/api/health"],TR=e=>{const{query:t}={};return{queryKey:(t==null?void 0:t.queryKey)??MR(),queryFn:({signal:s})=>jR(s),...t}};function LR(e,t){const n=TR(),r=Ao(n);return r.queryKey=n.queryKey,r}const IR=(e,t)=>zo({url:"/api/experiments",method:"GET",params:e,signal:t}),AR=e=>["/api/experiments",...e?[e]:[]],OR=(e,t)=>{const{query:n}={};return{queryKey:(n==null?void 0:n.queryKey)??AR(e),queryFn:({signal:o})=>IR(e,o),...n}};function cw(e,t,n){const r=OR(e),s=Ao(r);return s.queryKey=r.queryKey,s}const FR=(e,t,n,r)=>zo({url:`/api/experiments/${e}/${t}/relationships`,method:"GET",params:n,signal:r}),DR=(e,t,n)=>[`/api/experiments/${e}/${t}/relationships`,...n?[n]:[]],zR=(e,t,n,r)=>{const{query:s}={};return{queryKey:(s==null?void 0:s.queryKey)??DR(e,t,n),queryFn:({signal:a})=>FR(e,t,n,a),enabled:!!(e&&t),...s}};function $R(e,t,n,r,s){const o=zR(e,t,n),i=Ao(o);return i.queryKey=o.queryKey,i}const BR=(e,t,n,r)=>zo({url:`/api/experiments/${e}/${t}`,method:"GET",params:n,signal:r}),HR=(e,t,n)=>[`/api/experiments/${e}/${t}`,...n?[n]:[]],UR=(e,t,n,r)=>{const{query:s}={};return{queryKey:(s==null?void 0:s.queryKey)??HR(e,t,n),queryFn:({signal:a})=>BR(e,t,n,a),enabled:!!(e&&t),...s}};function VR(e,t,n,r,s){const o=UR(e,t,n),i=Ao(o);return i.queryKey=o.queryKey,i}const WR=e=>zo({url:"/api/stats",method:"GET",signal:e}),KR=()=>["/api/stats"],qR=e=>{const{query:t}={};return{queryKey:(t==null?void 0:t.queryKey)??KR(),queryFn:({signal:s})=>WR(s),...t}};function QR(e,t){const n=qR(),r=Ao(n);return r.queryKey=n.queryKey,r}const GR=e=>zo({url:"/api/dag",method:"GET",signal:e}),XR=()=>["/api/dag"],YR=e=>{const{query:t}={};return{queryKey:(t==null?void 0:t.queryKey)??XR(),queryFn:({signal:s})=>GR(s),...t}};function ZR(e,t){const n=YR(),r=Ao(n);return r.queryKey=n.queryKey,r}const JR=sw("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-medium transition-colors",{variants:{variant:{default:"bg-primary text-primary-foreground border-transparent",secondary:"bg-secondary text-secondary-foreground border-transparent",outline:"text-foreground",success:"bg-emerald-500/15 text-emerald-300 border-emerald-500/30",warning:"bg-amber-500/15 text-amber-300 border-amber-500/30",info:"bg-blue-500/15 text-blue-300 border-blue-500/30",destructive:"bg-red-500/15 text-red-300 border-red-500/30",muted:"bg-muted text-muted-foreground border-border"}},defaultVariants:{variant:"default"}});function mt({className:e,variant:t,...n}){return h.jsx("div",{className:ze(JR({variant:t}),e),...n})}const ej={success:"success",failed:"destructive",incomplete:"warning",absent:"muted"},tj={success:"success",running:"info",queued:"secondary",failed:"destructive",crashed:"warning",cancelled:"muted",preempted:"warning"};function sn({status:e,type:t}){const r=(t==="result"?ej:tj)[e]??"muted";return h.jsxs(mt,{variant:r,className:"gap-1.5 px-2.5 py-1",children:[t==="attempt"&&e==="running"&&h.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-blue-300 animate-pulse"}),e]})}const be=R.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:ze("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));be.displayName="Card";const nt=R.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:ze("flex flex-col gap-1.5 p-6",e),...t}));nt.displayName="CardHeader";const lt=R.forwardRef(({className:e,...t},n)=>h.jsx("h3",{ref:n,className:ze("text-lg font-semibold leading-none tracking-tight",e),...t}));lt.displayName="CardTitle";const nj=R.forwardRef(({className:e,...t},n)=>h.jsx("p",{ref:n,className:ze("text-sm text-muted-foreground",e),...t}));nj.displayName="CardDescription";const ke=R.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:ze("p-6 pt-0",e),...t}));ke.displayName="CardContent";const rj=R.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:ze("flex items-center p-6 pt-0",e),...t}));rj.displayName="CardFooter";function dw({title:e,description:t,icon:n="📭"}){return h.jsx(be,{className:"border-dashed",children:h.jsxs(ke,{className:"flex flex-col items-center justify-center py-16 text-center",children:[h.jsx("span",{className:"mb-4 text-5xl",children:n}),h.jsx("h3",{className:"mb-2 text-lg font-medium",children:e}),t?h.jsx("p",{className:"max-w-md text-muted-foreground",children:t}):null]})})}const Ar=R.forwardRef(({className:e,type:t,...n},r)=>h.jsx("input",{type:t,className:ze("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));Ar.displayName="Input";const Vh=R.forwardRef(({className:e,...t},n)=>h.jsx("div",{className:"w-full overflow-auto",children:h.jsx("table",{ref:n,className:ze("w-full caption-bottom text-sm",e),...t})}));Vh.displayName="Table";const Wh=R.forwardRef(({className:e,...t},n)=>h.jsx("thead",{ref:n,className:ze("[&_tr]:border-b",e),...t}));Wh.displayName="TableHeader";const Kh=R.forwardRef(({className:e,...t},n)=>h.jsx("tbody",{ref:n,className:ze("[&_tr:last-child]:border-0",e),...t}));Kh.displayName="TableBody";const sj=R.forwardRef(({className:e,...t},n)=>h.jsx("tfoot",{ref:n,className:ze("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));sj.displayName="TableFooter";const Wi=R.forwardRef(({className:e,...t},n)=>h.jsx("tr",{ref:n,className:ze("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Wi.displayName="TableRow";const Ke=R.forwardRef(({className:e,...t},n)=>h.jsx("th",{ref:n,className:ze("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));Ke.displayName="TableHead";const qe=R.forwardRef(({className:e,...t},n)=>h.jsx("td",{ref:n,className:ze("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));qe.displayName="TableCell";const oj=R.forwardRef(({className:e,...t},n)=>h.jsx("caption",{ref:n,className:ze("mt-4 text-sm text-muted-foreground",e),...t}));oj.displayName="TableCaption";const ij=_o("/experiments")({component:cj}),aj=["","success","failed","incomplete","absent"],lj=["","running","queued","success","failed","crashed","cancelled","preempted"],uj=["","local","submitit"];function cj(){const[e,t]=R.useState(""),[n,r]=R.useState(""),[s,o]=R.useState(""),[i,a]=R.useState(""),[l,u]=R.useState(""),[d,c]=R.useState(""),[f,m]=R.useState(""),[p,x]=R.useState(""),[w,g]=R.useState(""),[v,y]=R.useState("resolved"),[S,E]=R.useState(0),_=20,{data:b,isLoading:C,error:L}=cw({result_status:e||void 0,attempt_status:n||void 0,namespace:s||void 0,backend:i||void 0,hostname:l||void 0,user:d||void 0,started_after:f||void 0,started_before:p||void 0,config_filter:w||void 0,view:v,limit:_,offset:S*_}),M=b?Math.ceil(b.total/_):0,P=()=>{t(""),r(""),o(""),a(""),u(""),c(""),m(""),x(""),g(""),E(0)},j=e||n||s||i||l||d||f||p||w;return h.jsxs("div",{className:"max-w-7xl mx-auto",children:[h.jsxs("div",{className:"mb-8",children:[h.jsx("h1",{className:"text-3xl font-bold mb-2",children:"Experiments"}),h.jsx("p",{className:"text-muted-foreground",children:"Browse and filter all Furu experiments"})]}),h.jsxs(be,{className:"mb-6",children:[h.jsxs(nt,{className:"flex flex-row items-center justify-between",children:[h.jsx(lt,{children:"Filters"}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsxs("div",{className:"flex rounded-full border border-muted overflow-hidden text-xs",children:[h.jsx("button",{className:`px-3 py-1 ${v==="resolved"?"bg-primary text-primary-foreground":"text-muted-foreground"}`,onClick:()=>{y("resolved"),E(0)},children:"Aliased"}),h.jsx("button",{className:`px-3 py-1 ${v==="original"?"bg-primary text-primary-foreground":"text-muted-foreground"}`,onClick:()=>{y("original"),E(0)},children:"Original"})]}),j&&h.jsx(wn,{variant:"ghost",size:"sm",onClick:P,children:"Clear filters"})]})]}),h.jsx(ke,{children:h.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:[h.jsxs("div",{children:[h.jsx("label",{className:"mb-1 block text-sm text-muted-foreground",children:"Namespace"}),h.jsx(Ar,{type:"text",placeholder:"Filter by namespace...",value:s,onChange:O=>{o(O.target.value),E(0)}})]}),h.jsxs("div",{children:[h.jsx("label",{className:"mb-1 block text-sm text-muted-foreground",children:"Result Status"}),h.jsx("select",{value:e,onChange:O=>{t(O.target.value),E(0)},className:"h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",children:aj.map(O=>h.jsx("option",{value:O,children:O||"All Results"},O))})]}),h.jsxs("div",{children:[h.jsx("label",{className:"mb-1 block text-sm text-muted-foreground",children:"Attempt Status"}),h.jsx("select",{value:n,onChange:O=>{r(O.target.value),E(0)},className:"h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",children:lj.map(O=>h.jsx("option",{value:O,children:O||"All Attempts"},O))})]}),h.jsxs("div",{children:[h.jsx("label",{className:"mb-1 block text-sm text-muted-foreground",children:"Backend"}),h.jsx("select",{value:i,onChange:O=>{a(O.target.value),E(0)},className:"h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",children:uj.map(O=>h.jsx("option",{value:O,children:O||"All Backends"},O))})]}),h.jsxs("div",{children:[h.jsx("label",{className:"mb-1 block text-sm text-muted-foreground",children:"Hostname"}),h.jsx(Ar,{type:"text",placeholder:"Filter by hostname...",value:l,onChange:O=>{u(O.target.value),E(0)}})]}),h.jsxs("div",{children:[h.jsx("label",{className:"mb-1 block text-sm text-muted-foreground",children:"User"}),h.jsx(Ar,{type:"text",placeholder:"Filter by user...",value:d,onChange:O=>{c(O.target.value),E(0)}})]}),h.jsxs("div",{children:[h.jsx("label",{className:"mb-1 block text-sm text-muted-foreground",children:"Started After"}),h.jsx(Ar,{type:"datetime-local",value:f,onChange:O=>{m(O.target.value?O.target.value+":00":""),E(0)}})]}),h.jsxs("div",{children:[h.jsx("label",{className:"mb-1 block text-sm text-muted-foreground",children:"Started Before"}),h.jsx(Ar,{type:"datetime-local",value:p,onChange:O=>{x(O.target.value?O.target.value+":00":""),E(0)}})]}),h.jsxs("div",{className:"md:col-span-2",children:[h.jsx("label",{className:"mb-1 block text-sm text-muted-foreground",children:"Config Filter"}),h.jsx(Ar,{type:"text",placeholder:"field.path=value (e.g., model.name=gpt-4)",value:w,onChange:O=>{g(O.target.value),E(0)}})]})]})})]}),h.jsx("div",{className:"mb-4 text-sm text-muted-foreground",children:b?h.jsxs(h.Fragment,{children:["Showing ",b.experiments.length," of ",b.total," experiments"]}):"Loading..."}),C?h.jsx(be,{children:h.jsx(ke,{className:"p-8 text-center text-muted-foreground",children:"Loading experiments..."})}):L?h.jsx(be,{children:h.jsx(ke,{className:"p-8 text-center text-destructive",children:"Error loading experiments. Is the API running?"})}):(b==null?void 0:b.experiments.length)===0?h.jsx(dw,{title:"No experiments found",description:"Try adjusting your filters or create some experiments first.",icon:"🔬"}):h.jsxs(be,{className:"overflow-hidden",children:[h.jsxs(Vh,{children:[h.jsx(Wh,{children:h.jsxs(Wi,{children:[h.jsx(Ke,{className:"pl-6",children:"Class"}),h.jsx(Ke,{children:"Namespace"}),h.jsx(Ke,{children:"Hash"}),h.jsx(Ke,{children:"Result"}),h.jsx(Ke,{children:"Migration"}),h.jsx(Ke,{children:"Attempt"}),h.jsx(Ke,{children:"Backend"}),h.jsx(Ke,{children:"Host"}),h.jsx(Ke,{children:"User"}),h.jsx(Ke,{children:"Updated"})]})}),h.jsx(Kh,{children:b==null?void 0:b.experiments.map(O=>h.jsxs(Wi,{children:[h.jsx(qe,{className:"pl-6",children:h.jsx(Ue,{to:"/experiments/$namespace/$furu_hash",params:{namespace:O.namespace,furu_hash:O.furu_hash},className:"font-medium hover:text-primary",children:O.class_name})}),h.jsx(qe,{className:"max-w-xs truncate font-mono text-sm text-muted-foreground",children:O.namespace}),h.jsx(qe,{children:h.jsxs("code",{className:"rounded bg-muted px-2 py-1 font-mono text-xs text-muted-foreground",children:[O.furu_hash.slice(0,8),"..."]})}),h.jsx(qe,{children:h.jsx(sn,{status:O.result_status,type:"result"})}),h.jsx(qe,{children:O.migration_kind?h.jsx("span",{className:"text-xs rounded-full border border-amber-500/40 bg-amber-500/10 px-2 py-0.5 text-amber-300",children:O.migration_kind}):h.jsx("span",{className:"text-muted-foreground",children:"-"})}),h.jsx(qe,{children:O.attempt_status?h.jsx(sn,{status:O.attempt_status,type:"attempt"}):h.jsx("span",{className:"text-muted-foreground",children:"-"})}),h.jsx(qe,{className:"text-sm text-muted-foreground",children:O.backend||"-"}),h.jsx(qe,{className:"text-sm text-muted-foreground max-w-[150px] truncate",title:O.hostname||void 0,children:O.hostname||"-"}),h.jsx(qe,{className:"text-sm text-muted-foreground",children:O.user||"-"}),h.jsx(qe,{className:"whitespace-nowrap text-sm text-muted-foreground",children:O.updated_at?new Date(O.updated_at).toLocaleString():"-"})]},`${O.namespace}-${O.furu_hash}`))})]}),M>1&&h.jsxs(ke,{className:"flex items-center justify-between border-t py-4",children:[h.jsx(wn,{variant:"secondary",onClick:()=>E(O=>Math.max(0,O-1)),disabled:S===0,children:"Previous"}),h.jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",S+1," of ",M]}),h.jsx(wn,{variant:"secondary",onClick:()=>E(O=>Math.min(M-1,O+1)),disabled:S>=M-1,children:"Next"})]})]})]})}function Oe(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=Oe(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var dj={value:()=>{}};function Wu(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new _l(n)}function _l(e){this._=e}function fj(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",s=n.indexOf(".");if(s>=0&&(r=n.slice(s+1),n=n.slice(0,s)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}_l.prototype=Wu.prototype={constructor:_l,on:function(e,t){var n=this._,r=fj(e+"",n),s,o=-1,i=r.length;if(arguments.length<2){for(;++o<i;)if((s=(e=r[o]).type)&&(s=hj(n[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<i;)if(s=(e=r[o]).type)n[s]=_g(n[s],e.name,t);else if(t==null)for(s in n)n[s]=_g(n[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new _l(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var n=new Array(s),r=0,s,o;r<s;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],r=0,s=o.length;r<s;++r)o[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],s=0,o=r.length;s<o;++s)r[s].value.apply(t,n)}};function hj(e,t){for(var n=0,r=e.length,s;n<r;++n)if((s=e[n]).name===t)return s.value}function _g(e,t,n){for(var r=0,s=e.length;r<s;++r)if(e[r].name===t){e[r]=dj,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var mf="http://www.w3.org/1999/xhtml";const bg={svg:"http://www.w3.org/2000/svg",xhtml:mf,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ku(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),bg.hasOwnProperty(t)?{space:bg[t],local:e}:e}function pj(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===mf&&t.documentElement.namespaceURI===mf?t.createElement(e):t.createElementNS(n,e)}}function mj(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function fw(e){var t=Ku(e);return(t.local?mj:pj)(t)}function gj(){}function qh(e){return e==null?gj:function(){return this.querySelector(e)}}function yj(e){typeof e!="function"&&(e=qh(e));for(var t=this._groups,n=t.length,r=new Array(n),s=0;s<n;++s)for(var o=t[s],i=o.length,a=r[s]=new Array(i),l,u,d=0;d<i;++d)(l=o[d])&&(u=e.call(l,l.__data__,d,o))&&("__data__"in l&&(u.__data__=l.__data__),a[d]=u);return new Mt(r,this._parents)}function xj(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function vj(){return[]}function hw(e){return e==null?vj:function(){return this.querySelectorAll(e)}}function wj(e){return function(){return xj(e.apply(this,arguments))}}function Sj(e){typeof e=="function"?e=wj(e):e=hw(e);for(var t=this._groups,n=t.length,r=[],s=[],o=0;o<n;++o)for(var i=t[o],a=i.length,l,u=0;u<a;++u)(l=i[u])&&(r.push(e.call(l,l.__data__,u,i)),s.push(l));return new Mt(r,s)}function pw(e){return function(){return this.matches(e)}}function mw(e){return function(t){return t.matches(e)}}var _j=Array.prototype.find;function bj(e){return function(){return _j.call(this.children,e)}}function Ej(){return this.firstElementChild}function Cj(e){return this.select(e==null?Ej:bj(typeof e=="function"?e:mw(e)))}var Nj=Array.prototype.filter;function kj(){return Array.from(this.children)}function Pj(e){return function(){return Nj.call(this.children,e)}}function Rj(e){return this.selectAll(e==null?kj:Pj(typeof e=="function"?e:mw(e)))}function jj(e){typeof e!="function"&&(e=pw(e));for(var t=this._groups,n=t.length,r=new Array(n),s=0;s<n;++s)for(var o=t[s],i=o.length,a=r[s]=[],l,u=0;u<i;++u)(l=o[u])&&e.call(l,l.__data__,u,o)&&a.push(l);return new Mt(r,this._parents)}function gw(e){return new Array(e.length)}function Mj(){return new Mt(this._enter||this._groups.map(gw),this._parents)}function uu(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}uu.prototype={constructor:uu,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Tj(e){return function(){return e}}function Lj(e,t,n,r,s,o){for(var i=0,a,l=t.length,u=o.length;i<u;++i)(a=t[i])?(a.__data__=o[i],r[i]=a):n[i]=new uu(e,o[i]);for(;i<l;++i)(a=t[i])&&(s[i]=a)}function Ij(e,t,n,r,s,o,i){var a,l,u=new Map,d=t.length,c=o.length,f=new Array(d),m;for(a=0;a<d;++a)(l=t[a])&&(f[a]=m=i.call(l,l.__data__,a,t)+"",u.has(m)?s[a]=l:u.set(m,l));for(a=0;a<c;++a)m=i.call(e,o[a],a,o)+"",(l=u.get(m))?(r[a]=l,l.__data__=o[a],u.delete(m)):n[a]=new uu(e,o[a]);for(a=0;a<d;++a)(l=t[a])&&u.get(f[a])===l&&(s[a]=l)}function Aj(e){return e.__data__}function Oj(e,t){if(!arguments.length)return Array.from(this,Aj);var n=t?Ij:Lj,r=this._parents,s=this._groups;typeof e!="function"&&(e=Tj(e));for(var o=s.length,i=new Array(o),a=new Array(o),l=new Array(o),u=0;u<o;++u){var d=r[u],c=s[u],f=c.length,m=Fj(e.call(d,d&&d.__data__,u,r)),p=m.length,x=a[u]=new Array(p),w=i[u]=new Array(p),g=l[u]=new Array(f);n(d,c,x,w,g,m,t);for(var v=0,y=0,S,E;v<p;++v)if(S=x[v]){for(v>=y&&(y=v+1);!(E=w[y])&&++y<p;);S._next=E||null}}return i=new Mt(i,r),i._enter=a,i._exit=l,i}function Fj(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Dj(){return new Mt(this._exit||this._groups.map(gw),this._parents)}function zj(e,t,n){var r=this.enter(),s=this,o=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),n==null?o.remove():n(o),r&&s?r.merge(s).order():s}function $j(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,s=n.length,o=r.length,i=Math.min(s,o),a=new Array(s),l=0;l<i;++l)for(var u=n[l],d=r[l],c=u.length,f=a[l]=new Array(c),m,p=0;p<c;++p)(m=u[p]||d[p])&&(f[p]=m);for(;l<s;++l)a[l]=n[l];return new Mt(a,this._parents)}function Bj(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],s=r.length-1,o=r[s],i;--s>=0;)(i=r[s])&&(o&&i.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(i,o),o=i);return this}function Hj(e){e||(e=Uj);function t(c,f){return c&&f?e(c.__data__,f.__data__):!c-!f}for(var n=this._groups,r=n.length,s=new Array(r),o=0;o<r;++o){for(var i=n[o],a=i.length,l=s[o]=new Array(a),u,d=0;d<a;++d)(u=i[d])&&(l[d]=u);l.sort(t)}return new Mt(s,this._parents).order()}function Uj(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Vj(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Wj(){return Array.from(this)}function Kj(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],s=0,o=r.length;s<o;++s){var i=r[s];if(i)return i}return null}function qj(){let e=0;for(const t of this)++e;return e}function Qj(){return!this.node()}function Gj(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var s=t[n],o=0,i=s.length,a;o<i;++o)(a=s[o])&&e.call(a,a.__data__,o,s);return this}function Xj(e){return function(){this.removeAttribute(e)}}function Yj(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Zj(e,t){return function(){this.setAttribute(e,t)}}function Jj(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function e2(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function t2(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function n2(e,t){var n=Ku(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?Yj:Xj:typeof t=="function"?n.local?t2:e2:n.local?Jj:Zj)(n,t))}function yw(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function r2(e){return function(){this.style.removeProperty(e)}}function s2(e,t,n){return function(){this.style.setProperty(e,t,n)}}function o2(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function i2(e,t,n){return arguments.length>1?this.each((t==null?r2:typeof t=="function"?o2:s2)(e,t,n??"")):Eo(this.node(),e)}function Eo(e,t){return e.style.getPropertyValue(t)||yw(e).getComputedStyle(e,null).getPropertyValue(t)}function a2(e){return function(){delete this[e]}}function l2(e,t){return function(){this[e]=t}}function u2(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function c2(e,t){return arguments.length>1?this.each((t==null?a2:typeof t=="function"?u2:l2)(e,t)):this.node()[e]}function xw(e){return e.trim().split(/^|\s+/)}function Qh(e){return e.classList||new vw(e)}function vw(e){this._node=e,this._names=xw(e.getAttribute("class")||"")}vw.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function ww(e,t){for(var n=Qh(e),r=-1,s=t.length;++r<s;)n.add(t[r])}function Sw(e,t){for(var n=Qh(e),r=-1,s=t.length;++r<s;)n.remove(t[r])}function d2(e){return function(){ww(this,e)}}function f2(e){return function(){Sw(this,e)}}function h2(e,t){return function(){(t.apply(this,arguments)?ww:Sw)(this,e)}}function p2(e,t){var n=xw(e+"");if(arguments.length<2){for(var r=Qh(this.node()),s=-1,o=n.length;++s<o;)if(!r.contains(n[s]))return!1;return!0}return this.each((typeof t=="function"?h2:t?d2:f2)(n,t))}function m2(){this.textContent=""}function g2(e){return function(){this.textContent=e}}function y2(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function x2(e){return arguments.length?this.each(e==null?m2:(typeof e=="function"?y2:g2)(e)):this.node().textContent}function v2(){this.innerHTML=""}function w2(e){return function(){this.innerHTML=e}}function S2(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function _2(e){return arguments.length?this.each(e==null?v2:(typeof e=="function"?S2:w2)(e)):this.node().innerHTML}function b2(){this.nextSibling&&this.parentNode.appendChild(this)}function E2(){return this.each(b2)}function C2(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function N2(){return this.each(C2)}function k2(e){var t=typeof e=="function"?e:fw(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function P2(){return null}function R2(e,t){var n=typeof e=="function"?e:fw(e),r=t==null?P2:typeof t=="function"?t:qh(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function j2(){var e=this.parentNode;e&&e.removeChild(this)}function M2(){return this.each(j2)}function T2(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function L2(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function I2(e){return this.select(e?L2:T2)}function A2(e){return arguments.length?this.property("__data__",e):this.node().__data__}function O2(e){return function(t){e.call(this,t,this.__data__)}}function F2(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function D2(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,s=t.length,o;n<s;++n)o=t[n],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++r]=o;++r?t.length=r:delete this.__on}}}function z2(e,t,n){return function(){var r=this.__on,s,o=O2(t);if(r){for(var i=0,a=r.length;i<a;++i)if((s=r[i]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=o,s.options=n),s.value=t;return}}this.addEventListener(e.type,o,n),s={type:e.type,name:e.name,value:t,listener:o,options:n},r?r.push(s):this.__on=[s]}}function $2(e,t,n){var r=F2(e+""),s,o=r.length,i;if(arguments.length<2){var a=this.node().__on;if(a){for(var l=0,u=a.length,d;l<u;++l)for(s=0,d=a[l];s<o;++s)if((i=r[s]).type===d.type&&i.name===d.name)return d.value}return}for(a=t?z2:D2,s=0;s<o;++s)this.each(a(r[s],t,n));return this}function _w(e,t,n){var r=yw(e),s=r.CustomEvent;typeof s=="function"?s=new s(t,n):(s=r.document.createEvent("Event"),n?(s.initEvent(t,n.bubbles,n.cancelable),s.detail=n.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function B2(e,t){return function(){return _w(this,e,t)}}function H2(e,t){return function(){return _w(this,e,t.apply(this,arguments))}}function U2(e,t){return this.each((typeof t=="function"?H2:B2)(e,t))}function*V2(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],s=0,o=r.length,i;s<o;++s)(i=r[s])&&(yield i)}var bw=[null];function Mt(e,t){this._groups=e,this._parents=t}function xa(){return new Mt([[document.documentElement]],bw)}function W2(){return this}Mt.prototype=xa.prototype={constructor:Mt,select:yj,selectAll:Sj,selectChild:Cj,selectChildren:Rj,filter:jj,data:Oj,enter:Mj,exit:Dj,join:zj,merge:$j,selection:W2,order:Bj,sort:Hj,call:Vj,nodes:Wj,node:Kj,size:qj,empty:Qj,each:Gj,attr:n2,style:i2,property:c2,classed:p2,text:x2,html:_2,raise:E2,lower:N2,append:k2,insert:R2,remove:M2,clone:I2,datum:A2,on:$2,dispatch:U2,[Symbol.iterator]:V2};function Nt(e){return typeof e=="string"?new Mt([[document.querySelector(e)]],[document.documentElement]):new Mt([[e]],bw)}function K2(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Yt(e,t){if(e=K2(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var s=t.getBoundingClientRect();return[e.clientX-s.left-t.clientLeft,e.clientY-s.top-t.clientTop]}}return[e.pageX,e.pageY]}const q2={passive:!1},Ki={capture:!0,passive:!1};function Wc(e){e.stopImmediatePropagation()}function Ys(e){e.preventDefault(),e.stopImmediatePropagation()}function Ew(e){var t=e.document.documentElement,n=Nt(e).on("dragstart.drag",Ys,Ki);"onselectstart"in t?n.on("selectstart.drag",Ys,Ki):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Cw(e,t){var n=e.document.documentElement,r=Nt(e).on("dragstart.drag",null);t&&(r.on("click.drag",Ys,Ki),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Xa=e=>()=>e;function gf(e,{sourceEvent:t,subject:n,target:r,identifier:s,active:o,x:i,y:a,dx:l,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:s,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:i,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}gf.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Q2(e){return!e.ctrlKey&&!e.button}function G2(){return this.parentNode}function X2(e,t){return t??{x:e.x,y:e.y}}function Y2(){return navigator.maxTouchPoints||"ontouchstart"in this}function Nw(){var e=Q2,t=G2,n=X2,r=Y2,s={},o=Wu("start","drag","end"),i=0,a,l,u,d,c=0;function f(S){S.on("mousedown.drag",m).filter(r).on("touchstart.drag",w).on("touchmove.drag",g,q2).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(S,E){if(!(d||!e.call(this,S,E))){var _=y(this,t.call(this,S,E),S,E,"mouse");_&&(Nt(S.view).on("mousemove.drag",p,Ki).on("mouseup.drag",x,Ki),Ew(S.view),Wc(S),u=!1,a=S.clientX,l=S.clientY,_("start",S))}}function p(S){if(Ys(S),!u){var E=S.clientX-a,_=S.clientY-l;u=E*E+_*_>c}s.mouse("drag",S)}function x(S){Nt(S.view).on("mousemove.drag mouseup.drag",null),Cw(S.view,u),Ys(S),s.mouse("end",S)}function w(S,E){if(e.call(this,S,E)){var _=S.changedTouches,b=t.call(this,S,E),C=_.length,L,M;for(L=0;L<C;++L)(M=y(this,b,S,E,_[L].identifier,_[L]))&&(Wc(S),M("start",S,_[L]))}}function g(S){var E=S.changedTouches,_=E.length,b,C;for(b=0;b<_;++b)(C=s[E[b].identifier])&&(Ys(S),C("drag",S,E[b]))}function v(S){var E=S.changedTouches,_=E.length,b,C;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),b=0;b<_;++b)(C=s[E[b].identifier])&&(Wc(S),C("end",S,E[b]))}function y(S,E,_,b,C,L){var M=o.copy(),P=Yt(L||_,E),j,O,k;if((k=n.call(S,new gf("beforestart",{sourceEvent:_,target:f,identifier:C,active:i,x:P[0],y:P[1],dx:0,dy:0,dispatch:M}),b))!=null)return j=k.x-P[0]||0,O=k.y-P[1]||0,function D(I,F,N){var T=P,z;switch(I){case"start":s[C]=D,z=i++;break;case"end":delete s[C],--i;case"drag":P=Yt(N||F,E),z=i;break}M.call(I,S,new gf(I,{sourceEvent:F,subject:k,target:f,identifier:C,active:z,x:P[0]+j,y:P[1]+O,dx:P[0]-T[0],dy:P[1]-T[1],dispatch:M}),b)}}return f.filter=function(S){return arguments.length?(e=typeof S=="function"?S:Xa(!!S),f):e},f.container=function(S){return arguments.length?(t=typeof S=="function"?S:Xa(S),f):t},f.subject=function(S){return arguments.length?(n=typeof S=="function"?S:Xa(S),f):n},f.touchable=function(S){return arguments.length?(r=typeof S=="function"?S:Xa(!!S),f):r},f.on=function(){var S=o.on.apply(o,arguments);return S===o?f:S},f.clickDistance=function(S){return arguments.length?(c=(S=+S)*S,f):Math.sqrt(c)},f}function Gh(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function kw(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function va(){}var qi=.7,cu=1/qi,Zs="\\s*([+-]?\\d+)\\s*",Qi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Sn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Z2=/^#([0-9a-f]{3,8})$/,J2=new RegExp(`^rgb\\(${Zs},${Zs},${Zs}\\)$`),eM=new RegExp(`^rgb\\(${Sn},${Sn},${Sn}\\)$`),tM=new RegExp(`^rgba\\(${Zs},${Zs},${Zs},${Qi}\\)$`),nM=new RegExp(`^rgba\\(${Sn},${Sn},${Sn},${Qi}\\)$`),rM=new RegExp(`^hsl\\(${Qi},${Sn},${Sn}\\)$`),sM=new RegExp(`^hsla\\(${Qi},${Sn},${Sn},${Qi}\\)$`),Eg={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};Gh(va,xs,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Cg,formatHex:Cg,formatHex8:oM,formatHsl:iM,formatRgb:Ng,toString:Ng});function Cg(){return this.rgb().formatHex()}function oM(){return this.rgb().formatHex8()}function iM(){return Pw(this).formatHsl()}function Ng(){return this.rgb().formatRgb()}function xs(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Z2.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?kg(t):n===3?new yt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Ya(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Ya(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=J2.exec(e))?new yt(t[1],t[2],t[3],1):(t=eM.exec(e))?new yt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=tM.exec(e))?Ya(t[1],t[2],t[3],t[4]):(t=nM.exec(e))?Ya(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=rM.exec(e))?jg(t[1],t[2]/100,t[3]/100,1):(t=sM.exec(e))?jg(t[1],t[2]/100,t[3]/100,t[4]):Eg.hasOwnProperty(e)?kg(Eg[e]):e==="transparent"?new yt(NaN,NaN,NaN,0):null}function kg(e){return new yt(e>>16&255,e>>8&255,e&255,1)}function Ya(e,t,n,r){return r<=0&&(e=t=n=NaN),new yt(e,t,n,r)}function aM(e){return e instanceof va||(e=xs(e)),e?(e=e.rgb(),new yt(e.r,e.g,e.b,e.opacity)):new yt}function yf(e,t,n,r){return arguments.length===1?aM(e):new yt(e,t,n,r??1)}function yt(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Gh(yt,yf,kw(va,{brighter(e){return e=e==null?cu:Math.pow(cu,e),new yt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?qi:Math.pow(qi,e),new yt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new yt(is(this.r),is(this.g),is(this.b),du(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:Pg,formatHex:Pg,formatHex8:lM,formatRgb:Rg,toString:Rg}));function Pg(){return`#${Ur(this.r)}${Ur(this.g)}${Ur(this.b)}`}function lM(){return`#${Ur(this.r)}${Ur(this.g)}${Ur(this.b)}${Ur((isNaN(this.opacity)?1:this.opacity)*255)}`}function Rg(){const e=du(this.opacity);return`${e===1?"rgb(":"rgba("}${is(this.r)}, ${is(this.g)}, ${is(this.b)}${e===1?")":`, ${e})`}`}function du(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function is(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ur(e){return e=is(e),(e<16?"0":"")+e.toString(16)}function jg(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Jt(e,t,n,r)}function Pw(e){if(e instanceof Jt)return new Jt(e.h,e.s,e.l,e.opacity);if(e instanceof va||(e=xs(e)),!e)return new Jt;if(e instanceof Jt)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,s=Math.min(t,n,r),o=Math.max(t,n,r),i=NaN,a=o-s,l=(o+s)/2;return a?(t===o?i=(n-r)/a+(n<r)*6:n===o?i=(r-t)/a+2:i=(t-n)/a+4,a/=l<.5?o+s:2-o-s,i*=60):a=l>0&&l<1?0:i,new Jt(i,a,l,e.opacity)}function uM(e,t,n,r){return arguments.length===1?Pw(e):new Jt(e,t,n,r??1)}function Jt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Gh(Jt,uM,kw(va,{brighter(e){return e=e==null?cu:Math.pow(cu,e),new Jt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?qi:Math.pow(qi,e),new Jt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,s=2*n-r;return new yt(Kc(e>=240?e-240:e+120,s,r),Kc(e,s,r),Kc(e<120?e+240:e-120,s,r),this.opacity)},clamp(){return new Jt(Mg(this.h),Za(this.s),Za(this.l),du(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=du(this.opacity);return`${e===1?"hsl(":"hsla("}${Mg(this.h)}, ${Za(this.s)*100}%, ${Za(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Mg(e){return e=(e||0)%360,e<0?e+360:e}function Za(e){return Math.max(0,Math.min(1,e||0))}function Kc(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Xh=e=>()=>e;function cM(e,t){return function(n){return e+n*t}}function dM(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function fM(e){return(e=+e)==1?Rw:function(t,n){return n-t?dM(t,n,e):Xh(isNaN(t)?n:t)}}function Rw(e,t){var n=t-e;return n?cM(e,n):Xh(isNaN(e)?t:e)}const fu=function e(t){var n=fM(t);function r(s,o){var i=n((s=yf(s)).r,(o=yf(o)).r),a=n(s.g,o.g),l=n(s.b,o.b),u=Rw(s.opacity,o.opacity);return function(d){return s.r=i(d),s.g=a(d),s.b=l(d),s.opacity=u(d),s+""}}return r.gamma=e,r}(1);function hM(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),s;return function(o){for(s=0;s<n;++s)r[s]=e[s]*(1-o)+t[s]*o;return r}}function pM(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function mM(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,s=new Array(r),o=new Array(n),i;for(i=0;i<r;++i)s[i]=bi(e[i],t[i]);for(;i<n;++i)o[i]=t[i];return function(a){for(i=0;i<r;++i)o[i]=s[i](a);return o}}function gM(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function gn(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function yM(e,t){var n={},r={},s;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(s in t)s in e?n[s]=bi(e[s],t[s]):r[s]=t[s];return function(o){for(s in n)r[s]=n[s](o);return r}}var xf=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,qc=new RegExp(xf.source,"g");function xM(e){return function(){return e}}function vM(e){return function(t){return e(t)+""}}function jw(e,t){var n=xf.lastIndex=qc.lastIndex=0,r,s,o,i=-1,a=[],l=[];for(e=e+"",t=t+"";(r=xf.exec(e))&&(s=qc.exec(t));)(o=s.index)>n&&(o=t.slice(n,o),a[i]?a[i]+=o:a[++i]=o),(r=r[0])===(s=s[0])?a[i]?a[i]+=s:a[++i]=s:(a[++i]=null,l.push({i,x:gn(r,s)})),n=qc.lastIndex;return n<t.length&&(o=t.slice(n),a[i]?a[i]+=o:a[++i]=o),a.length<2?l[0]?vM(l[0].x):xM(t):(t=l.length,function(u){for(var d=0,c;d<t;++d)a[(c=l[d]).i]=c.x(u);return a.join("")})}function bi(e,t){var n=typeof t,r;return t==null||n==="boolean"?Xh(t):(n==="number"?gn:n==="string"?(r=xs(t))?(t=r,fu):jw:t instanceof xs?fu:t instanceof Date?gM:pM(t)?hM:Array.isArray(t)?mM:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?yM:gn)(e,t)}var Tg=180/Math.PI,vf={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Mw(e,t,n,r,s,o){var i,a,l;return(i=Math.sqrt(e*e+t*t))&&(e/=i,t/=i),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,l/=a),e*r<t*n&&(e=-e,t=-t,l=-l,i=-i),{translateX:s,translateY:o,rotate:Math.atan2(t,e)*Tg,skewX:Math.atan(l)*Tg,scaleX:i,scaleY:a}}var Ja;function wM(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?vf:Mw(t.a,t.b,t.c,t.d,t.e,t.f)}function SM(e){return e==null||(Ja||(Ja=document.createElementNS("http://www.w3.org/2000/svg","g")),Ja.setAttribute("transform",e),!(e=Ja.transform.baseVal.consolidate()))?vf:(e=e.matrix,Mw(e.a,e.b,e.c,e.d,e.e,e.f))}function Tw(e,t,n,r){function s(u){return u.length?u.pop()+" ":""}function o(u,d,c,f,m,p){if(u!==c||d!==f){var x=m.push("translate(",null,t,null,n);p.push({i:x-4,x:gn(u,c)},{i:x-2,x:gn(d,f)})}else(c||f)&&m.push("translate("+c+t+f+n)}function i(u,d,c,f){u!==d?(u-d>180?d+=360:d-u>180&&(u+=360),f.push({i:c.push(s(c)+"rotate(",null,r)-2,x:gn(u,d)})):d&&c.push(s(c)+"rotate("+d+r)}function a(u,d,c,f){u!==d?f.push({i:c.push(s(c)+"skewX(",null,r)-2,x:gn(u,d)}):d&&c.push(s(c)+"skewX("+d+r)}function l(u,d,c,f,m,p){if(u!==c||d!==f){var x=m.push(s(m)+"scale(",null,",",null,")");p.push({i:x-4,x:gn(u,c)},{i:x-2,x:gn(d,f)})}else(c!==1||f!==1)&&m.push(s(m)+"scale("+c+","+f+")")}return function(u,d){var c=[],f=[];return u=e(u),d=e(d),o(u.translateX,u.translateY,d.translateX,d.translateY,c,f),i(u.rotate,d.rotate,c,f),a(u.skewX,d.skewX,c,f),l(u.scaleX,u.scaleY,d.scaleX,d.scaleY,c,f),u=d=null,function(m){for(var p=-1,x=f.length,w;++p<x;)c[(w=f[p]).i]=w.x(m);return c.join("")}}}var _M=Tw(wM,"px, ","px)","deg)"),bM=Tw(SM,", ",")",")"),EM=1e-12;function Lg(e){return((e=Math.exp(e))+1/e)/2}function CM(e){return((e=Math.exp(e))-1/e)/2}function NM(e){return((e=Math.exp(2*e))-1)/(e+1)}const bl=function e(t,n,r){function s(o,i){var a=o[0],l=o[1],u=o[2],d=i[0],c=i[1],f=i[2],m=d-a,p=c-l,x=m*m+p*p,w,g;if(x<EM)g=Math.log(f/u)/t,w=function(b){return[a+b*m,l+b*p,u*Math.exp(t*b*g)]};else{var v=Math.sqrt(x),y=(f*f-u*u+r*x)/(2*u*n*v),S=(f*f-u*u-r*x)/(2*f*n*v),E=Math.log(Math.sqrt(y*y+1)-y),_=Math.log(Math.sqrt(S*S+1)-S);g=(_-E)/t,w=function(b){var C=b*g,L=Lg(E),M=u/(n*v)*(L*NM(t*C+E)-CM(E));return[a+M*m,l+M*p,u*L/Lg(t*C+E)]}}return w.duration=g*1e3*t/Math.SQRT2,w}return s.rho=function(o){var i=Math.max(.001,+o),a=i*i,l=a*a;return e(i,a,l)},s}(Math.SQRT2,2,4);var Co=0,ci=0,ni=0,Lw=1e3,hu,di,pu=0,vs=0,qu=0,Gi=typeof performance=="object"&&performance.now?performance:Date,Iw=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Yh(){return vs||(Iw(kM),vs=Gi.now()+qu)}function kM(){vs=0}function mu(){this._call=this._time=this._next=null}mu.prototype=Aw.prototype={constructor:mu,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Yh():+n)+(t==null?0:+t),!this._next&&di!==this&&(di?di._next=this:hu=this,di=this),this._call=e,this._time=n,wf()},stop:function(){this._call&&(this._call=null,this._time=1/0,wf())}};function Aw(e,t,n){var r=new mu;return r.restart(e,t,n),r}function PM(){Yh(),++Co;for(var e=hu,t;e;)(t=vs-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Co}function Ig(){vs=(pu=Gi.now())+qu,Co=ci=0;try{PM()}finally{Co=0,jM(),vs=0}}function RM(){var e=Gi.now(),t=e-pu;t>Lw&&(qu-=t,pu=e)}function jM(){for(var e,t=hu,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:hu=n);di=e,wf(r)}function wf(e){if(!Co){ci&&(ci=clearTimeout(ci));var t=e-vs;t>24?(e<1/0&&(ci=setTimeout(Ig,e-Gi.now()-qu)),ni&&(ni=clearInterval(ni))):(ni||(pu=Gi.now(),ni=setInterval(RM,Lw)),Co=1,Iw(Ig))}}function Ag(e,t,n){var r=new mu;return t=t==null?0:+t,r.restart(s=>{r.stop(),e(s+t)},t,n),r}var MM=Wu("start","end","cancel","interrupt"),TM=[],Ow=0,Og=1,Sf=2,El=3,Fg=4,_f=5,Cl=6;function Qu(e,t,n,r,s,o){var i=e.__transition;if(!i)e.__transition={};else if(n in i)return;LM(e,n,{name:t,index:r,group:s,on:MM,tween:TM,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Ow})}function Zh(e,t){var n=ln(e,t);if(n.state>Ow)throw new Error("too late; already scheduled");return n}function En(e,t){var n=ln(e,t);if(n.state>El)throw new Error("too late; already running");return n}function ln(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function LM(e,t,n){var r=e.__transition,s;r[t]=n,n.timer=Aw(o,0,n.time);function o(u){n.state=Og,n.timer.restart(i,n.delay,n.time),n.delay<=u&&i(u-n.delay)}function i(u){var d,c,f,m;if(n.state!==Og)return l();for(d in r)if(m=r[d],m.name===n.name){if(m.state===El)return Ag(i);m.state===Fg?(m.state=Cl,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete r[d]):+d<t&&(m.state=Cl,m.timer.stop(),m.on.call("cancel",e,e.__data__,m.index,m.group),delete r[d])}if(Ag(function(){n.state===El&&(n.state=Fg,n.timer.restart(a,n.delay,n.time),a(u))}),n.state=Sf,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Sf){for(n.state=El,s=new Array(f=n.tween.length),d=0,c=-1;d<f;++d)(m=n.tween[d].value.call(e,e.__data__,n.index,n.group))&&(s[++c]=m);s.length=c+1}}function a(u){for(var d=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(l),n.state=_f,1),c=-1,f=s.length;++c<f;)s[c].call(e,d);n.state===_f&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=Cl,n.timer.stop(),delete r[t];for(var u in r)return;delete e.__transition}}function Nl(e,t){var n=e.__transition,r,s,o=!0,i;if(n){t=t==null?null:t+"";for(i in n){if((r=n[i]).name!==t){o=!1;continue}s=r.state>Sf&&r.state<_f,r.state=Cl,r.timer.stop(),r.on.call(s?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[i]}o&&delete e.__transition}}function IM(e){return this.each(function(){Nl(this,e)})}function AM(e,t){var n,r;return function(){var s=En(this,e),o=s.tween;if(o!==n){r=n=o;for(var i=0,a=r.length;i<a;++i)if(r[i].name===t){r=r.slice(),r.splice(i,1);break}}s.tween=r}}function OM(e,t,n){var r,s;if(typeof n!="function")throw new Error;return function(){var o=En(this,e),i=o.tween;if(i!==r){s=(r=i).slice();for(var a={name:t,value:n},l=0,u=s.length;l<u;++l)if(s[l].name===t){s[l]=a;break}l===u&&s.push(a)}o.tween=s}}function FM(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=ln(this.node(),n).tween,s=0,o=r.length,i;s<o;++s)if((i=r[s]).name===e)return i.value;return null}return this.each((t==null?AM:OM)(n,e,t))}function Jh(e,t,n){var r=e._id;return e.each(function(){var s=En(this,r);(s.value||(s.value={}))[t]=n.apply(this,arguments)}),function(s){return ln(s,r).value[t]}}function Fw(e,t){var n;return(typeof t=="number"?gn:t instanceof xs?fu:(n=xs(t))?(t=n,fu):jw)(e,t)}function DM(e){return function(){this.removeAttribute(e)}}function zM(e){return function(){this.removeAttributeNS(e.space,e.local)}}function $M(e,t,n){var r,s=n+"",o;return function(){var i=this.getAttribute(e);return i===s?null:i===r?o:o=t(r=i,n)}}function BM(e,t,n){var r,s=n+"",o;return function(){var i=this.getAttributeNS(e.space,e.local);return i===s?null:i===r?o:o=t(r=i,n)}}function HM(e,t,n){var r,s,o;return function(){var i,a=n(this),l;return a==null?void this.removeAttribute(e):(i=this.getAttribute(e),l=a+"",i===l?null:i===r&&l===s?o:(s=l,o=t(r=i,a)))}}function UM(e,t,n){var r,s,o;return function(){var i,a=n(this),l;return a==null?void this.removeAttributeNS(e.space,e.local):(i=this.getAttributeNS(e.space,e.local),l=a+"",i===l?null:i===r&&l===s?o:(s=l,o=t(r=i,a)))}}function VM(e,t){var n=Ku(e),r=n==="transform"?bM:Fw;return this.attrTween(e,typeof t=="function"?(n.local?UM:HM)(n,r,Jh(this,"attr."+e,t)):t==null?(n.local?zM:DM)(n):(n.local?BM:$M)(n,r,t))}function WM(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function KM(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function qM(e,t){var n,r;function s(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&KM(e,o)),n}return s._value=t,s}function QM(e,t){var n,r;function s(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&WM(e,o)),n}return s._value=t,s}function GM(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=Ku(e);return this.tween(n,(r.local?qM:QM)(r,t))}function XM(e,t){return function(){Zh(this,e).delay=+t.apply(this,arguments)}}function YM(e,t){return t=+t,function(){Zh(this,e).delay=t}}function ZM(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?XM:YM)(t,e)):ln(this.node(),t).delay}function JM(e,t){return function(){En(this,e).duration=+t.apply(this,arguments)}}function eT(e,t){return t=+t,function(){En(this,e).duration=t}}function tT(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?JM:eT)(t,e)):ln(this.node(),t).duration}function nT(e,t){if(typeof t!="function")throw new Error;return function(){En(this,e).ease=t}}function rT(e){var t=this._id;return arguments.length?this.each(nT(t,e)):ln(this.node(),t).ease}function sT(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;En(this,e).ease=n}}function oT(e){if(typeof e!="function")throw new Error;return this.each(sT(this._id,e))}function iT(e){typeof e!="function"&&(e=pw(e));for(var t=this._groups,n=t.length,r=new Array(n),s=0;s<n;++s)for(var o=t[s],i=o.length,a=r[s]=[],l,u=0;u<i;++u)(l=o[u])&&e.call(l,l.__data__,u,o)&&a.push(l);return new Hn(r,this._parents,this._name,this._id)}function aT(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,s=n.length,o=Math.min(r,s),i=new Array(r),a=0;a<o;++a)for(var l=t[a],u=n[a],d=l.length,c=i[a]=new Array(d),f,m=0;m<d;++m)(f=l[m]||u[m])&&(c[m]=f);for(;a<r;++a)i[a]=t[a];return new Hn(i,this._parents,this._name,this._id)}function lT(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function uT(e,t,n){var r,s,o=lT(t)?Zh:En;return function(){var i=o(this,e),a=i.on;a!==r&&(s=(r=a).copy()).on(t,n),i.on=s}}function cT(e,t){var n=this._id;return arguments.length<2?ln(this.node(),n).on.on(e):this.each(uT(n,e,t))}function dT(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function fT(){return this.on("end.remove",dT(this._id))}function hT(e){var t=this._name,n=this._id;typeof e!="function"&&(e=qh(e));for(var r=this._groups,s=r.length,o=new Array(s),i=0;i<s;++i)for(var a=r[i],l=a.length,u=o[i]=new Array(l),d,c,f=0;f<l;++f)(d=a[f])&&(c=e.call(d,d.__data__,f,a))&&("__data__"in d&&(c.__data__=d.__data__),u[f]=c,Qu(u[f],t,n,f,u,ln(d,n)));return new Hn(o,this._parents,t,n)}function pT(e){var t=this._name,n=this._id;typeof e!="function"&&(e=hw(e));for(var r=this._groups,s=r.length,o=[],i=[],a=0;a<s;++a)for(var l=r[a],u=l.length,d,c=0;c<u;++c)if(d=l[c]){for(var f=e.call(d,d.__data__,c,l),m,p=ln(d,n),x=0,w=f.length;x<w;++x)(m=f[x])&&Qu(m,t,n,x,f,p);o.push(f),i.push(d)}return new Hn(o,i,t,n)}var mT=xa.prototype.constructor;function gT(){return new mT(this._groups,this._parents)}function yT(e,t){var n,r,s;return function(){var o=Eo(this,e),i=(this.style.removeProperty(e),Eo(this,e));return o===i?null:o===n&&i===r?s:s=t(n=o,r=i)}}function Dw(e){return function(){this.style.removeProperty(e)}}function xT(e,t,n){var r,s=n+"",o;return function(){var i=Eo(this,e);return i===s?null:i===r?o:o=t(r=i,n)}}function vT(e,t,n){var r,s,o;return function(){var i=Eo(this,e),a=n(this),l=a+"";return a==null&&(l=a=(this.style.removeProperty(e),Eo(this,e))),i===l?null:i===r&&l===s?o:(s=l,o=t(r=i,a))}}function wT(e,t){var n,r,s,o="style."+t,i="end."+o,a;return function(){var l=En(this,e),u=l.on,d=l.value[o]==null?a||(a=Dw(t)):void 0;(u!==n||s!==d)&&(r=(n=u).copy()).on(i,s=d),l.on=r}}function ST(e,t,n){var r=(e+="")=="transform"?_M:Fw;return t==null?this.styleTween(e,yT(e,r)).on("end.style."+e,Dw(e)):typeof t=="function"?this.styleTween(e,vT(e,r,Jh(this,"style."+e,t))).each(wT(this._id,e)):this.styleTween(e,xT(e,r,t),n).on("end.style."+e,null)}function _T(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function bT(e,t,n){var r,s;function o(){var i=t.apply(this,arguments);return i!==s&&(r=(s=i)&&_T(e,i,n)),r}return o._value=t,o}function ET(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,bT(e,t,n??""))}function CT(e){return function(){this.textContent=e}}function NT(e){return function(){var t=e(this);this.textContent=t??""}}function kT(e){return this.tween("text",typeof e=="function"?NT(Jh(this,"text",e)):CT(e==null?"":e+""))}function PT(e){return function(t){this.textContent=e.call(this,t)}}function RT(e){var t,n;function r(){var s=e.apply(this,arguments);return s!==n&&(t=(n=s)&&PT(s)),t}return r._value=e,r}function jT(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,RT(e))}function MT(){for(var e=this._name,t=this._id,n=zw(),r=this._groups,s=r.length,o=0;o<s;++o)for(var i=r[o],a=i.length,l,u=0;u<a;++u)if(l=i[u]){var d=ln(l,t);Qu(l,e,n,u,i,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new Hn(r,this._parents,e,n)}function TT(){var e,t,n=this,r=n._id,s=n.size();return new Promise(function(o,i){var a={value:i},l={value:function(){--s===0&&o()}};n.each(function(){var u=En(this,r),d=u.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(a),t._.interrupt.push(a),t._.end.push(l)),u.on=t}),s===0&&o()})}var LT=0;function Hn(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function zw(){return++LT}var kn=xa.prototype;Hn.prototype={constructor:Hn,select:hT,selectAll:pT,selectChild:kn.selectChild,selectChildren:kn.selectChildren,filter:iT,merge:aT,selection:gT,transition:MT,call:kn.call,nodes:kn.nodes,node:kn.node,size:kn.size,empty:kn.empty,each:kn.each,on:cT,attr:VM,attrTween:GM,style:ST,styleTween:ET,text:kT,textTween:jT,remove:fT,tween:FM,delay:ZM,duration:tT,ease:rT,easeVarying:oT,end:TT,[Symbol.iterator]:kn[Symbol.iterator]};function IT(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var AT={time:null,delay:0,duration:250,ease:IT};function OT(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function FT(e){var t,n;e instanceof Hn?(t=e._id,e=e._name):(t=zw(),(n=AT).time=Yh(),e=e==null?null:e+"");for(var r=this._groups,s=r.length,o=0;o<s;++o)for(var i=r[o],a=i.length,l,u=0;u<a;++u)(l=i[u])&&Qu(l,e,t,u,i,n||OT(l,t));return new Hn(r,this._parents,e,t)}xa.prototype.interrupt=IM;xa.prototype.transition=FT;const el=e=>()=>e;function DT(e,{sourceEvent:t,target:n,transform:r,dispatch:s}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:s}})}function An(e,t,n){this.k=e,this.x=t,this.y=n}An.prototype={constructor:An,scale:function(e){return e===1?this:new An(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new An(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Gu=new An(1,0,0);$w.prototype=An.prototype;function $w(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Gu;return e.__zoom}function Qc(e){e.stopImmediatePropagation()}function ri(e){e.preventDefault(),e.stopImmediatePropagation()}function zT(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function $T(){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 Dg(){return this.__zoom||Gu}function BT(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function HT(){return navigator.maxTouchPoints||"ontouchstart"in this}function UT(e,t,n){var r=e.invertX(t[0][0])-n[0][0],s=e.invertX(t[1][0])-n[1][0],o=e.invertY(t[0][1])-n[0][1],i=e.invertY(t[1][1])-n[1][1];return e.translate(s>r?(r+s)/2:Math.min(0,r)||Math.max(0,s),i>o?(o+i)/2:Math.min(0,o)||Math.max(0,i))}function Bw(){var e=zT,t=$T,n=UT,r=BT,s=HT,o=[0,1/0],i=[[-1/0,-1/0],[1/0,1/0]],a=250,l=bl,u=Wu("start","zoom","end"),d,c,f,m=500,p=150,x=0,w=10;function g(k){k.property("__zoom",Dg).on("wheel.zoom",C,{passive:!1}).on("mousedown.zoom",L).on("dblclick.zoom",M).filter(s).on("touchstart.zoom",P).on("touchmove.zoom",j).on("touchend.zoom touchcancel.zoom",O).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}g.transform=function(k,D,I,F){var N=k.selection?k.selection():k;N.property("__zoom",Dg),k!==N?E(k,D,I,F):N.interrupt().each(function(){_(this,arguments).event(F).start().zoom(null,typeof D=="function"?D.apply(this,arguments):D).end()})},g.scaleBy=function(k,D,I,F){g.scaleTo(k,function(){var N=this.__zoom.k,T=typeof D=="function"?D.apply(this,arguments):D;return N*T},I,F)},g.scaleTo=function(k,D,I,F){g.transform(k,function(){var N=t.apply(this,arguments),T=this.__zoom,z=I==null?S(N):typeof I=="function"?I.apply(this,arguments):I,B=T.invert(z),H=typeof D=="function"?D.apply(this,arguments):D;return n(y(v(T,H),z,B),N,i)},I,F)},g.translateBy=function(k,D,I,F){g.transform(k,function(){return n(this.__zoom.translate(typeof D=="function"?D.apply(this,arguments):D,typeof I=="function"?I.apply(this,arguments):I),t.apply(this,arguments),i)},null,F)},g.translateTo=function(k,D,I,F,N){g.transform(k,function(){var T=t.apply(this,arguments),z=this.__zoom,B=F==null?S(T):typeof F=="function"?F.apply(this,arguments):F;return n(Gu.translate(B[0],B[1]).scale(z.k).translate(typeof D=="function"?-D.apply(this,arguments):-D,typeof I=="function"?-I.apply(this,arguments):-I),T,i)},F,N)};function v(k,D){return D=Math.max(o[0],Math.min(o[1],D)),D===k.k?k:new An(D,k.x,k.y)}function y(k,D,I){var F=D[0]-I[0]*k.k,N=D[1]-I[1]*k.k;return F===k.x&&N===k.y?k:new An(k.k,F,N)}function S(k){return[(+k[0][0]+ +k[1][0])/2,(+k[0][1]+ +k[1][1])/2]}function E(k,D,I,F){k.on("start.zoom",function(){_(this,arguments).event(F).start()}).on("interrupt.zoom end.zoom",function(){_(this,arguments).event(F).end()}).tween("zoom",function(){var N=this,T=arguments,z=_(N,T).event(F),B=t.apply(N,T),H=I==null?S(B):typeof I=="function"?I.apply(N,T):I,K=Math.max(B[1][0]-B[0][0],B[1][1]-B[0][1]),V=N.__zoom,X=typeof D=="function"?D.apply(N,T):D,Q=l(V.invert(H).concat(K/V.k),X.invert(H).concat(K/X.k));return function(Y){if(Y===1)Y=X;else{var W=Q(Y),Z=K/W[2];Y=new An(Z,H[0]-W[0]*Z,H[1]-W[1]*Z)}z.zoom(null,Y)}})}function _(k,D,I){return!I&&k.__zooming||new b(k,D)}function b(k,D){this.that=k,this.args=D,this.active=0,this.sourceEvent=null,this.extent=t.apply(k,D),this.taps=0}b.prototype={event:function(k){return k&&(this.sourceEvent=k),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(k,D){return this.mouse&&k!=="mouse"&&(this.mouse[1]=D.invert(this.mouse[0])),this.touch0&&k!=="touch"&&(this.touch0[1]=D.invert(this.touch0[0])),this.touch1&&k!=="touch"&&(this.touch1[1]=D.invert(this.touch1[0])),this.that.__zoom=D,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(k){var D=Nt(this.that).datum();u.call(k,this.that,new DT(k,{sourceEvent:this.sourceEvent,target:g,transform:this.that.__zoom,dispatch:u}),D)}};function C(k,...D){if(!e.apply(this,arguments))return;var I=_(this,D).event(k),F=this.__zoom,N=Math.max(o[0],Math.min(o[1],F.k*Math.pow(2,r.apply(this,arguments)))),T=Yt(k);if(I.wheel)(I.mouse[0][0]!==T[0]||I.mouse[0][1]!==T[1])&&(I.mouse[1]=F.invert(I.mouse[0]=T)),clearTimeout(I.wheel);else{if(F.k===N)return;I.mouse=[T,F.invert(T)],Nl(this),I.start()}ri(k),I.wheel=setTimeout(z,p),I.zoom("mouse",n(y(v(F,N),I.mouse[0],I.mouse[1]),I.extent,i));function z(){I.wheel=null,I.end()}}function L(k,...D){if(f||!e.apply(this,arguments))return;var I=k.currentTarget,F=_(this,D,!0).event(k),N=Nt(k.view).on("mousemove.zoom",H,!0).on("mouseup.zoom",K,!0),T=Yt(k,I),z=k.clientX,B=k.clientY;Ew(k.view),Qc(k),F.mouse=[T,this.__zoom.invert(T)],Nl(this),F.start();function H(V){if(ri(V),!F.moved){var X=V.clientX-z,Q=V.clientY-B;F.moved=X*X+Q*Q>x}F.event(V).zoom("mouse",n(y(F.that.__zoom,F.mouse[0]=Yt(V,I),F.mouse[1]),F.extent,i))}function K(V){N.on("mousemove.zoom mouseup.zoom",null),Cw(V.view,F.moved),ri(V),F.event(V).end()}}function M(k,...D){if(e.apply(this,arguments)){var I=this.__zoom,F=Yt(k.changedTouches?k.changedTouches[0]:k,this),N=I.invert(F),T=I.k*(k.shiftKey?.5:2),z=n(y(v(I,T),F,N),t.apply(this,D),i);ri(k),a>0?Nt(this).transition().duration(a).call(E,z,F,k):Nt(this).call(g.transform,z,F,k)}}function P(k,...D){if(e.apply(this,arguments)){var I=k.touches,F=I.length,N=_(this,D,k.changedTouches.length===F).event(k),T,z,B,H;for(Qc(k),z=0;z<F;++z)B=I[z],H=Yt(B,this),H=[H,this.__zoom.invert(H),B.identifier],N.touch0?!N.touch1&&N.touch0[2]!==H[2]&&(N.touch1=H,N.taps=0):(N.touch0=H,T=!0,N.taps=1+!!d);d&&(d=clearTimeout(d)),T&&(N.taps<2&&(c=H[0],d=setTimeout(function(){d=null},m)),Nl(this),N.start())}}function j(k,...D){if(this.__zooming){var I=_(this,D).event(k),F=k.changedTouches,N=F.length,T,z,B,H;for(ri(k),T=0;T<N;++T)z=F[T],B=Yt(z,this),I.touch0&&I.touch0[2]===z.identifier?I.touch0[0]=B:I.touch1&&I.touch1[2]===z.identifier&&(I.touch1[0]=B);if(z=I.that.__zoom,I.touch1){var K=I.touch0[0],V=I.touch0[1],X=I.touch1[0],Q=I.touch1[1],Y=(Y=X[0]-K[0])*Y+(Y=X[1]-K[1])*Y,W=(W=Q[0]-V[0])*W+(W=Q[1]-V[1])*W;z=v(z,Math.sqrt(Y/W)),B=[(K[0]+X[0])/2,(K[1]+X[1])/2],H=[(V[0]+Q[0])/2,(V[1]+Q[1])/2]}else if(I.touch0)B=I.touch0[0],H=I.touch0[1];else return;I.zoom("touch",n(y(z,B,H),I.extent,i))}}function O(k,...D){if(this.__zooming){var I=_(this,D).event(k),F=k.changedTouches,N=F.length,T,z;for(Qc(k),f&&clearTimeout(f),f=setTimeout(function(){f=null},m),T=0;T<N;++T)z=F[T],I.touch0&&I.touch0[2]===z.identifier?delete I.touch0:I.touch1&&I.touch1[2]===z.identifier&&delete I.touch1;if(I.touch1&&!I.touch0&&(I.touch0=I.touch1,delete I.touch1),I.touch0)I.touch0[1]=this.__zoom.invert(I.touch0[0]);else if(I.end(),I.taps===2&&(z=Yt(z,this),Math.hypot(c[0]-z[0],c[1]-z[1])<w)){var B=Nt(this).on("dblclick.zoom");B&&B.apply(this,arguments)}}}return g.wheelDelta=function(k){return arguments.length?(r=typeof k=="function"?k:el(+k),g):r},g.filter=function(k){return arguments.length?(e=typeof k=="function"?k:el(!!k),g):e},g.touchable=function(k){return arguments.length?(s=typeof k=="function"?k:el(!!k),g):s},g.extent=function(k){return arguments.length?(t=typeof k=="function"?k:el([[+k[0][0],+k[0][1]],[+k[1][0],+k[1][1]]]),g):t},g.scaleExtent=function(k){return arguments.length?(o[0]=+k[0],o[1]=+k[1],g):[o[0],o[1]]},g.translateExtent=function(k){return arguments.length?(i[0][0]=+k[0][0],i[1][0]=+k[1][0],i[0][1]=+k[0][1],i[1][1]=+k[1][1],g):[[i[0][0],i[0][1]],[i[1][0],i[1][1]]]},g.constrain=function(k){return arguments.length?(n=k,g):n},g.duration=function(k){return arguments.length?(a=+k,g):a},g.interpolate=function(k){return arguments.length?(l=k,g):l},g.on=function(){var k=u.on.apply(u,arguments);return k===u?g:k},g.clickDistance=function(k){return arguments.length?(x=(k=+k)*k,g):Math.sqrt(x)},g.tapDistance=function(k){return arguments.length?(w=+k,g):w},g}const bn={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:r}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},Xi=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Hw=["Enter"," ","Escape"],Uw={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var No;(function(e){e.Strict="strict",e.Loose="loose"})(No||(No={}));var as;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(as||(as={}));var Yi;(function(e){e.Partial="partial",e.Full="full"})(Yi||(Yi={}));const Vw={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var rr;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(rr||(rr={}));var ws;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(ws||(ws={}));var ee;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(ee||(ee={}));const zg={[ee.Left]:ee.Right,[ee.Right]:ee.Left,[ee.Top]:ee.Bottom,[ee.Bottom]:ee.Top};function Ww(e){return e===null?null:e?"valid":"invalid"}const Kw=e=>"id"in e&&"source"in e&&"target"in e,VT=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),ep=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),wa=(e,t=[0,0])=>{const{width:n,height:r}=Vn(e),s=e.origin??t,o=n*s[0],i=r*s[1];return{x:e.position.x-o,y:e.position.y-i}},WT=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,s)=>{const o=typeof s=="string";let i=!t.nodeLookup&&!o?s:void 0;t.nodeLookup&&(i=o?t.nodeLookup.get(s):ep(s)?s:t.nodeLookup.get(s.id));const a=i?gu(i,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Xu(r,a)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Yu(n)},Sa=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(s=>{(t.filter===void 0||t.filter(s))&&(n=Xu(n,gu(s)),r=!0)}),r?Yu(n):{x:0,y:0,width:0,height:0}},tp=(e,t,[n,r,s]=[0,0,1],o=!1,i=!1)=>{const a={...ba(t,[n,r,s]),width:t.width/s,height:t.height/s},l=[];for(const u of e.values()){const{measured:d,selectable:c=!0,hidden:f=!1}=u;if(i&&!c||f)continue;const m=d.width??u.width??u.initialWidth??null,p=d.height??u.height??u.initialHeight??null,x=Zi(a,Po(u)),w=(m??0)*(p??0),g=o&&x>0;(!u.internals.handleBounds||g||x>=w||u.dragging)&&l.push(u)}return l},KT=(e,t)=>{const n=new Set;return e.forEach(r=>{n.add(r.id)}),t.filter(r=>n.has(r.source)||n.has(r.target))};function qT(e,t){const n=new Map,r=t!=null&&t.nodes?new Set(t.nodes.map(s=>s.id)):null;return e.forEach(s=>{s.measured.width&&s.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!s.hidden)&&(!r||r.has(s.id))&&n.set(s.id,s)}),n}async function QT({nodes:e,width:t,height:n,panZoom:r,minZoom:s,maxZoom:o},i){if(e.size===0)return Promise.resolve(!0);const a=qT(e,i),l=Sa(a),u=np(l,t,n,(i==null?void 0:i.minZoom)??s,(i==null?void 0:i.maxZoom)??o,(i==null?void 0:i.padding)??.1);return await r.setViewport(u,{duration:i==null?void 0:i.duration,ease:i==null?void 0:i.ease,interpolate:i==null?void 0:i.interpolate}),Promise.resolve(!0)}function qw({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:s,onError:o}){const i=n.get(e),a=i.parentId?n.get(i.parentId):void 0,{x:l,y:u}=a?a.internals.positionAbsolute:{x:0,y:0},d=i.origin??r;let c=i.extent||s;if(i.extent==="parent"&&!i.expandParent)if(!a)o==null||o("005",bn.error005());else{const m=a.measured.width,p=a.measured.height;m&&p&&(c=[[l,u],[l+m,u+p]])}else a&&Ro(i.extent)&&(c=[[i.extent[0][0]+l,i.extent[0][1]+u],[i.extent[1][0]+l,i.extent[1][1]+u]]);const f=Ro(c)?Ss(t,c,i.measured):t;return(i.measured.width===void 0||i.measured.height===void 0)&&(o==null||o("015",bn.error015())),{position:{x:f.x-l+(i.measured.width??0)*d[0],y:f.y-u+(i.measured.height??0)*d[1]},positionAbsolute:f}}async function GT({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:s}){const o=new Set(e.map(f=>f.id)),i=[];for(const f of n){if(f.deletable===!1)continue;const m=o.has(f.id),p=!m&&f.parentId&&i.find(x=>x.id===f.parentId);(m||p)&&i.push(f)}const a=new Set(t.map(f=>f.id)),l=r.filter(f=>f.deletable!==!1),d=KT(i,l);for(const f of l)a.has(f.id)&&!d.find(p=>p.id===f.id)&&d.push(f);if(!s)return{edges:d,nodes:i};const c=await s({nodes:i,edges:d});return typeof c=="boolean"?c?{edges:d,nodes:i}:{edges:[],nodes:[]}:c}const ko=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Ss=(e={x:0,y:0},t,n)=>({x:ko(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:ko(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function Qw(e,t,n){const{width:r,height:s}=Vn(n),{x:o,y:i}=n.internals.positionAbsolute;return Ss(e,[[o,i],[o+r,i+s]],t)}const $g=(e,t,n)=>e<t?ko(Math.abs(e-t),1,t)/t:e>n?-ko(Math.abs(e-n),1,t)/t:0,Gw=(e,t,n=15,r=40)=>{const s=$g(e.x,r,t.width-r)*n,o=$g(e.y,r,t.height-r)*n;return[s,o]},Xu=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),bf=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),Yu=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),Po=(e,t=[0,0])=>{var s,o;const{x:n,y:r}=ep(e)?e.internals.positionAbsolute:wa(e,t);return{x:n,y:r,width:((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0,height:((o=e.measured)==null?void 0:o.height)??e.height??e.initialHeight??0}},gu=(e,t=[0,0])=>{var s,o;const{x:n,y:r}=ep(e)?e.internals.positionAbsolute:wa(e,t);return{x:n,y:r,x2:n+(((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0),y2:r+(((o=e.measured)==null?void 0:o.height)??e.height??e.initialHeight??0)}},Xw=(e,t)=>Yu(Xu(bf(e),bf(t))),Zi=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},Bg=e=>en(e.width)&&en(e.height)&&en(e.x)&&en(e.y),en=e=>!isNaN(e)&&isFinite(e),XT=(e,t)=>{},_a=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),ba=({x:e,y:t},[n,r,s],o=!1,i=[1,1])=>{const a={x:(e-n)/s,y:(t-r)/s};return o?_a(a,i):a},yu=({x:e,y:t},[n,r,s])=>({x:e*s+n,y:t*s+r});function Ns(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function YT(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=Ns(e,n),s=Ns(e,t);return{top:r,right:s,bottom:r,left:s,x:s*2,y:r*2}}if(typeof e=="object"){const r=Ns(e.top??e.y??0,n),s=Ns(e.bottom??e.y??0,n),o=Ns(e.left??e.x??0,t),i=Ns(e.right??e.x??0,t);return{top:r,right:i,bottom:s,left:o,x:o+i,y:r+s}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function ZT(e,t,n,r,s,o){const{x:i,y:a}=yu(e,[t,n,r]),{x:l,y:u}=yu({x:e.x+e.width,y:e.y+e.height},[t,n,r]),d=s-l,c=o-u;return{left:Math.floor(i),top:Math.floor(a),right:Math.floor(d),bottom:Math.floor(c)}}const np=(e,t,n,r,s,o)=>{const i=YT(o,t,n),a=(t-i.x)/e.width,l=(n-i.y)/e.height,u=Math.min(a,l),d=ko(u,r,s),c=e.x+e.width/2,f=e.y+e.height/2,m=t/2-c*d,p=n/2-f*d,x=ZT(e,m,p,d,t,n),w={left:Math.min(x.left-i.left,0),top:Math.min(x.top-i.top,0),right:Math.min(x.right-i.right,0),bottom:Math.min(x.bottom-i.bottom,0)};return{x:m-w.left+w.right,y:p-w.top+w.bottom,zoom:d}},Ji=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Ro(e){return e!=null&&e!=="parent"}function Vn(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function Yw(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function Zw(e,t={width:0,height:0},n,r,s){const o={...e},i=r.get(n);if(i){const a=i.origin||s;o.x+=i.internals.positionAbsolute.x-(t.width??0)*a[0],o.y+=i.internals.positionAbsolute.y-(t.height??0)*a[1]}return o}function Hg(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function JT(){let e,t;return{promise:new Promise((r,s)=>{e=r,t=s}),resolve:e,reject:t}}function eL(e){return{...Uw,...e||{}}}function Ei(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:s}){const{x:o,y:i}=tn(e),a=ba({x:o-((s==null?void 0:s.left)??0),y:i-((s==null?void 0:s.top)??0)},r),{x:l,y:u}=n?_a(a,t):a;return{xSnapped:l,ySnapped:u,...a}}const rp=e=>({width:e.offsetWidth,height:e.offsetHeight}),Jw=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},tL=["INPUT","SELECT","TEXTAREA"];function e1(e){var r,s;const t=((s=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:s[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:tL.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const t1=e=>"clientX"in e,tn=(e,t)=>{var o,i;const n=t1(e),r=n?e.clientX:(o=e.touches)==null?void 0:o[0].clientX,s=n?e.clientY:(i=e.touches)==null?void 0:i[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:s-((t==null?void 0:t.top)??0)}},Ug=(e,t,n,r,s)=>{const o=t.querySelectorAll(`.${e}`);return!o||!o.length?null:Array.from(o).map(i=>{const a=i.getBoundingClientRect();return{id:i.getAttribute("data-handleid"),type:e,nodeId:s,position:i.getAttribute("data-handlepos"),x:(a.left-n.left)/r,y:(a.top-n.top)/r,...rp(i)}})};function n1({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:s,sourceControlY:o,targetControlX:i,targetControlY:a}){const l=e*.125+s*.375+i*.375+n*.125,u=t*.125+o*.375+a*.375+r*.125,d=Math.abs(l-e),c=Math.abs(u-t);return[l,u,d,c]}function tl(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Vg({pos:e,x1:t,y1:n,x2:r,y2:s,c:o}){switch(e){case ee.Left:return[t-tl(t-r,o),n];case ee.Right:return[t+tl(r-t,o),n];case ee.Top:return[t,n-tl(n-s,o)];case ee.Bottom:return[t,n+tl(s-n,o)]}}function r1({sourceX:e,sourceY:t,sourcePosition:n=ee.Bottom,targetX:r,targetY:s,targetPosition:o=ee.Top,curvature:i=.25}){const[a,l]=Vg({pos:n,x1:e,y1:t,x2:r,y2:s,c:i}),[u,d]=Vg({pos:o,x1:r,y1:s,x2:e,y2:t,c:i}),[c,f,m,p]=n1({sourceX:e,sourceY:t,targetX:r,targetY:s,sourceControlX:a,sourceControlY:l,targetControlX:u,targetControlY:d});return[`M${e},${t} C${a},${l} ${u},${d} ${r},${s}`,c,f,m,p]}function s1({sourceX:e,sourceY:t,targetX:n,targetY:r}){const s=Math.abs(n-e)/2,o=n<e?n+s:n-s,i=Math.abs(r-t)/2,a=r<t?r+i:r-i;return[o,a,s,i]}function nL({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:s=!1,zIndexMode:o="basic"}){if(o==="manual")return r;const i=s&&n?r+1e3:r,a=Math.max(e.parentId||s&&e.selected?e.internals.z:0,t.parentId||s&&t.selected?t.internals.z:0);return i+a}function rL({sourceNode:e,targetNode:t,width:n,height:r,transform:s}){const o=Xu(gu(e),gu(t));o.x===o.x2&&(o.x2+=1),o.y===o.y2&&(o.y2+=1);const i={x:-s[0]/s[2],y:-s[1]/s[2],width:n/s[2],height:r/s[2]};return Zi(i,Yu(o))>0}const sL=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,oL=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),iL=(e,t,n={})=>{if(!e.source||!e.target)return t;const r=n.getEdgeId||sL;let s;return Kw(e)?s={...e}:s={...e,id:r(e)},oL(s,t)?t:(s.sourceHandle===null&&delete s.sourceHandle,s.targetHandle===null&&delete s.targetHandle,t.concat(s))};function o1({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[s,o,i,a]=s1({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,s,o,i,a]}const Wg={[ee.Left]:{x:-1,y:0},[ee.Right]:{x:1,y:0},[ee.Top]:{x:0,y:-1},[ee.Bottom]:{x:0,y:1}},aL=({source:e,sourcePosition:t=ee.Bottom,target:n})=>t===ee.Left||t===ee.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},Kg=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function lL({source:e,sourcePosition:t=ee.Bottom,target:n,targetPosition:r=ee.Top,center:s,offset:o,stepPosition:i}){const a=Wg[t],l=Wg[r],u={x:e.x+a.x*o,y:e.y+a.y*o},d={x:n.x+l.x*o,y:n.y+l.y*o},c=aL({source:u,sourcePosition:t,target:d}),f=c.x!==0?"x":"y",m=c[f];let p=[],x,w;const g={x:0,y:0},v={x:0,y:0},[,,y,S]=s1({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(a[f]*l[f]===-1){f==="x"?(x=s.x??u.x+(d.x-u.x)*i,w=s.y??(u.y+d.y)/2):(x=s.x??(u.x+d.x)/2,w=s.y??u.y+(d.y-u.y)*i);const _=[{x,y:u.y},{x,y:d.y}],b=[{x:u.x,y:w},{x:d.x,y:w}];a[f]===m?p=f==="x"?_:b:p=f==="x"?b:_}else{const _=[{x:u.x,y:d.y}],b=[{x:d.x,y:u.y}];if(f==="x"?p=a.x===m?b:_:p=a.y===m?_:b,t===r){const j=Math.abs(e[f]-n[f]);if(j<=o){const O=Math.min(o-1,o-j);a[f]===m?g[f]=(u[f]>e[f]?-1:1)*O:v[f]=(d[f]>n[f]?-1:1)*O}}if(t!==r){const j=f==="x"?"y":"x",O=a[f]===l[j],k=u[j]>d[j],D=u[j]<d[j];(a[f]===1&&(!O&&k||O&&D)||a[f]!==1&&(!O&&D||O&&k))&&(p=f==="x"?_:b)}const C={x:u.x+g.x,y:u.y+g.y},L={x:d.x+v.x,y:d.y+v.y},M=Math.max(Math.abs(C.x-p[0].x),Math.abs(L.x-p[0].x)),P=Math.max(Math.abs(C.y-p[0].y),Math.abs(L.y-p[0].y));M>=P?(x=(C.x+L.x)/2,w=p[0].y):(x=p[0].x,w=(C.y+L.y)/2)}return[[e,{x:u.x+g.x,y:u.y+g.y},...p,{x:d.x+v.x,y:d.y+v.y},n],x,w,y,S]}function uL(e,t,n,r){const s=Math.min(Kg(e,t)/2,Kg(t,n)/2,r),{x:o,y:i}=t;if(e.x===o&&o===n.x||e.y===i&&i===n.y)return`L${o} ${i}`;if(e.y===i){const u=e.x<n.x?-1:1,d=e.y<n.y?1:-1;return`L ${o+s*u},${i}Q ${o},${i} ${o},${i+s*d}`}const a=e.x<n.x?1:-1,l=e.y<n.y?-1:1;return`L ${o},${i+s*l}Q ${o},${i} ${o+s*a},${i}`}function Ef({sourceX:e,sourceY:t,sourcePosition:n=ee.Bottom,targetX:r,targetY:s,targetPosition:o=ee.Top,borderRadius:i=5,centerX:a,centerY:l,offset:u=20,stepPosition:d=.5}){const[c,f,m,p,x]=lL({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:s},targetPosition:o,center:{x:a,y:l},offset:u,stepPosition:d});return[c.reduce((g,v,y)=>{let S="";return y>0&&y<c.length-1?S=uL(c[y-1],v,c[y+1],i):S=`${y===0?"M":"L"}${v.x} ${v.y}`,g+=S,g},""),f,m,p,x]}function qg(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function cL(e){var c;const{sourceNode:t,targetNode:n}=e;if(!qg(t)||!qg(n))return null;const r=t.internals.handleBounds||Qg(t.handles),s=n.internals.handleBounds||Qg(n.handles),o=Gg((r==null?void 0:r.source)??[],e.sourceHandle),i=Gg(e.connectionMode===No.Strict?(s==null?void 0:s.target)??[]:((s==null?void 0:s.target)??[]).concat((s==null?void 0:s.source)??[]),e.targetHandle);if(!o||!i)return(c=e.onError)==null||c.call(e,"008",bn.error008(o?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const a=(o==null?void 0:o.position)||ee.Bottom,l=(i==null?void 0:i.position)||ee.Top,u=_s(t,o,a),d=_s(n,i,l);return{sourceX:u.x,sourceY:u.y,targetX:d.x,targetY:d.y,sourcePosition:a,targetPosition:l}}function Qg(e){if(!e)return null;const t=[],n=[];for(const r of e)r.width=r.width??1,r.height=r.height??1,r.type==="source"?t.push(r):r.type==="target"&&n.push(r);return{source:t,target:n}}function _s(e,t,n=ee.Left,r=!1){const s=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,o=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:i,height:a}=t??Vn(e);if(r)return{x:s+i/2,y:o+a/2};switch((t==null?void 0:t.position)??n){case ee.Top:return{x:s+i/2,y:o};case ee.Right:return{x:s+i,y:o+a/2};case ee.Bottom:return{x:s+i/2,y:o+a};case ee.Left:return{x:s,y:o+a/2}}}function Gg(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function Cf(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function dL(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:s}){const o=new Set;return e.reduce((i,a)=>([a.markerStart||r,a.markerEnd||s].forEach(l=>{if(l&&typeof l=="object"){const u=Cf(l,t);o.has(u)||(i.push({id:u,color:l.color||n,...l}),o.add(u))}}),i),[]).sort((i,a)=>i.id.localeCompare(a.id))}const i1=1e3,fL=10,sp={nodeOrigin:[0,0],nodeExtent:Xi,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},hL={...sp,checkEquality:!0};function op(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function pL(e,t,n){const r=op(sp,n);for(const s of e.values())if(s.parentId)ap(s,e,t,r);else{const o=wa(s,r.nodeOrigin),i=Ro(s.extent)?s.extent:r.nodeExtent,a=Ss(o,i,Vn(s));s.internals.positionAbsolute=a}}function mL(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const n=[],r=[];for(const s of e.handles){const o={id:s.id,width:s.width??1,height:s.height??1,nodeId:e.id,x:s.x,y:s.y,position:s.position,type:s.type};s.type==="source"?n.push(o):s.type==="target"&&r.push(o)}return{source:n,target:r}}function ip(e){return e==="manual"}function Nf(e,t,n,r={}){var u,d;const s=op(hL,r),o={i:0},i=new Map(t),a=s!=null&&s.elevateNodesOnSelect&&!ip(s.zIndexMode)?i1:0;let l=e.length>0;t.clear(),n.clear();for(const c of e){let f=i.get(c.id);if(s.checkEquality&&c===(f==null?void 0:f.internals.userNode))t.set(c.id,f);else{const m=wa(c,s.nodeOrigin),p=Ro(c.extent)?c.extent:s.nodeExtent,x=Ss(m,p,Vn(c));f={...s.defaults,...c,measured:{width:(u=c.measured)==null?void 0:u.width,height:(d=c.measured)==null?void 0:d.height},internals:{positionAbsolute:x,handleBounds:mL(c,f),z:a1(c,a,s.zIndexMode),userNode:c}},t.set(c.id,f)}(f.measured===void 0||f.measured.width===void 0||f.measured.height===void 0)&&!f.hidden&&(l=!1),c.parentId&&ap(f,t,n,r,o)}return l}function gL(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function ap(e,t,n,r,s){const{elevateNodesOnSelect:o,nodeOrigin:i,nodeExtent:a,zIndexMode:l}=op(sp,r),u=e.parentId,d=t.get(u);if(!d){console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}gL(e,n),s&&!d.parentId&&d.internals.rootParentIndex===void 0&&l==="auto"&&(d.internals.rootParentIndex=++s.i,d.internals.z=d.internals.z+s.i*fL),s&&d.internals.rootParentIndex!==void 0&&(s.i=d.internals.rootParentIndex);const c=o&&!ip(l)?i1:0,{x:f,y:m,z:p}=yL(e,d,i,a,c,l),{positionAbsolute:x}=e.internals,w=f!==x.x||m!==x.y;(w||p!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:w?{x:f,y:m}:x,z:p}})}function a1(e,t,n){const r=en(e.zIndex)?e.zIndex:0;return ip(n)?r:r+(e.selected?t:0)}function yL(e,t,n,r,s,o){const{x:i,y:a}=t.internals.positionAbsolute,l=Vn(e),u=wa(e,n),d=Ro(e.extent)?Ss(u,e.extent,l):u;let c=Ss({x:i+d.x,y:a+d.y},r,l);e.extent==="parent"&&(c=Qw(c,l,t));const f=a1(e,s,o),m=t.internals.z??0;return{x:c.x,y:c.y,z:m>=f?m+1:f}}function lp(e,t,n,r=[0,0]){var i;const s=[],o=new Map;for(const a of e){const l=t.get(a.parentId);if(!l)continue;const u=((i=o.get(a.parentId))==null?void 0:i.expandedRect)??Po(l),d=Xw(u,a.rect);o.set(a.parentId,{expandedRect:d,parent:l})}return o.size>0&&o.forEach(({expandedRect:a,parent:l},u)=>{var y;const d=l.internals.positionAbsolute,c=Vn(l),f=l.origin??r,m=a.x<d.x?Math.round(Math.abs(d.x-a.x)):0,p=a.y<d.y?Math.round(Math.abs(d.y-a.y)):0,x=Math.max(c.width,Math.round(a.width)),w=Math.max(c.height,Math.round(a.height)),g=(x-c.width)*f[0],v=(w-c.height)*f[1];(m>0||p>0||g||v)&&(s.push({id:u,type:"position",position:{x:l.position.x-m+g,y:l.position.y-p+v}}),(y=n.get(u))==null||y.forEach(S=>{e.some(E=>E.id===S.id)||s.push({id:S.id,type:"position",position:{x:S.position.x+m,y:S.position.y+p}})})),(c.width<a.width||c.height<a.height||m||p)&&s.push({id:u,type:"dimensions",setAttributes:!0,dimensions:{width:x+(m?f[0]*m-g:0),height:w+(p?f[1]*p-v:0)}})}),s}function xL(e,t,n,r,s,o,i){const a=r==null?void 0:r.querySelector(".xyflow__viewport");let l=!1;if(!a)return{changes:[],updatedInternals:l};const u=[],d=window.getComputedStyle(a),{m22:c}=new window.DOMMatrixReadOnly(d.transform),f=[];for(const m of e.values()){const p=t.get(m.id);if(!p)continue;if(p.hidden){t.set(p.id,{...p,internals:{...p.internals,handleBounds:void 0}}),l=!0;continue}const x=rp(m.nodeElement),w=p.measured.width!==x.width||p.measured.height!==x.height;if(!!(x.width&&x.height&&(w||!p.internals.handleBounds||m.force))){const v=m.nodeElement.getBoundingClientRect(),y=Ro(p.extent)?p.extent:o;let{positionAbsolute:S}=p.internals;p.parentId&&p.extent==="parent"?S=Qw(S,x,t.get(p.parentId)):y&&(S=Ss(S,y,x));const E={...p,measured:x,internals:{...p.internals,positionAbsolute:S,handleBounds:{source:Ug("source",m.nodeElement,v,c,p.id),target:Ug("target",m.nodeElement,v,c,p.id)}}};t.set(p.id,E),p.parentId&&ap(E,t,n,{nodeOrigin:s,zIndexMode:i}),l=!0,w&&(u.push({id:p.id,type:"dimensions",dimensions:x}),p.expandParent&&p.parentId&&f.push({id:p.id,parentId:p.parentId,rect:Po(E,s)}))}}if(f.length>0){const m=lp(f,t,n,s);u.push(...m)}return{changes:u,updatedInternals:l}}async function vL({delta:e,panZoom:t,transform:n,translateExtent:r,width:s,height:o}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const i=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[s,o]],r),a=!!i&&(i.x!==n[0]||i.y!==n[1]||i.k!==n[2]);return Promise.resolve(a)}function Xg(e,t,n,r,s,o){let i=s;const a=r.get(i)||new Map;r.set(i,a.set(n,t)),i=`${s}-${e}`;const l=r.get(i)||new Map;if(r.set(i,l.set(n,t)),o){i=`${s}-${e}-${o}`;const u=r.get(i)||new Map;r.set(i,u.set(n,t))}}function l1(e,t,n){e.clear(),t.clear();for(const r of n){const{source:s,target:o,sourceHandle:i=null,targetHandle:a=null}=r,l={edgeId:r.id,source:s,target:o,sourceHandle:i,targetHandle:a},u=`${s}-${i}--${o}-${a}`,d=`${o}-${a}--${s}-${i}`;Xg("source",l,d,e,s,i),Xg("target",l,u,e,o,a),t.set(r.id,r)}}function u1(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:u1(n,t):!1}function Yg(e,t,n){var s;let r=e;do{if((s=r==null?void 0:r.matches)!=null&&s.call(r,t))return!0;if(r===n)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function wL(e,t,n,r){const s=new Map;for(const[o,i]of e)if((i.selected||i.id===r)&&(!i.parentId||!u1(i,e))&&(i.draggable||t&&typeof i.draggable>"u")){const a=e.get(o);a&&s.set(o,{id:o,position:a.position||{x:0,y:0},distance:{x:n.x-a.internals.positionAbsolute.x,y:n.y-a.internals.positionAbsolute.y},extent:a.extent,parentId:a.parentId,origin:a.origin,expandParent:a.expandParent,internals:{positionAbsolute:a.internals.positionAbsolute||{x:0,y:0}},measured:{width:a.measured.width??0,height:a.measured.height??0}})}return s}function Gc({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){var i,a,l;const s=[];for(const[u,d]of t){const c=(i=n.get(u))==null?void 0:i.internals.userNode;c&&s.push({...c,position:d.position,dragging:r})}if(!e)return[s[0],s];const o=(a=n.get(e))==null?void 0:a.internals.userNode;return[o?{...o,position:((l=t.get(e))==null?void 0:l.position)||o.position,dragging:r}:s[0],s]}function SL({dragItems:e,snapGrid:t,x:n,y:r}){const s=e.values().next().value;if(!s)return null;const o={x:n-s.distance.x,y:r-s.distance.y},i=_a(o,t);return{x:i.x-o.x,y:i.y-o.y}}function _L({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:s}){let o={x:null,y:null},i=0,a=new Map,l=!1,u={x:0,y:0},d=null,c=!1,f=null,m=!1,p=!1,x=null;function w({noDragClassName:v,handleSelector:y,domNode:S,isSelectable:E,nodeId:_,nodeClickDistance:b=0}){f=Nt(S);function C({x:j,y:O}){const{nodeLookup:k,nodeExtent:D,snapGrid:I,snapToGrid:F,nodeOrigin:N,onNodeDrag:T,onSelectionDrag:z,onError:B,updateNodePositions:H}=t();o={x:j,y:O};let K=!1;const V=a.size>1,X=V&&D?bf(Sa(a)):null,Q=V&&F?SL({dragItems:a,snapGrid:I,x:j,y:O}):null;for(const[Y,W]of a){if(!k.has(Y))continue;let Z={x:j-W.distance.x,y:O-W.distance.y};F&&(Z=Q?{x:Math.round(Z.x+Q.x),y:Math.round(Z.y+Q.y)}:_a(Z,I));let oe=null;if(V&&D&&!W.extent&&X){const{positionAbsolute:te}=W.internals,he=te.x-X.x+D[0][0],ye=te.x+W.measured.width-X.x2+D[1][0],ce=te.y-X.y+D[0][1],$e=te.y+W.measured.height-X.y2+D[1][1];oe=[[he,ce],[ye,$e]]}const{position:re,positionAbsolute:J}=qw({nodeId:Y,nextPosition:Z,nodeLookup:k,nodeExtent:oe||D,nodeOrigin:N,onError:B});K=K||W.position.x!==re.x||W.position.y!==re.y,W.position=re,W.internals.positionAbsolute=J}if(p=p||K,!!K&&(H(a,!0),x&&(r||T||!_&&z))){const[Y,W]=Gc({nodeId:_,dragItems:a,nodeLookup:k});r==null||r(x,a,Y,W),T==null||T(x,Y,W),_||z==null||z(x,W)}}async function L(){if(!d)return;const{transform:j,panBy:O,autoPanSpeed:k,autoPanOnNodeDrag:D}=t();if(!D){l=!1,cancelAnimationFrame(i);return}const[I,F]=Gw(u,d,k);(I!==0||F!==0)&&(o.x=(o.x??0)-I/j[2],o.y=(o.y??0)-F/j[2],await O({x:I,y:F})&&C(o)),i=requestAnimationFrame(L)}function M(j){var V;const{nodeLookup:O,multiSelectionActive:k,nodesDraggable:D,transform:I,snapGrid:F,snapToGrid:N,selectNodesOnDrag:T,onNodeDragStart:z,onSelectionDragStart:B,unselectNodesAndEdges:H}=t();c=!0,(!T||!E)&&!k&&_&&((V=O.get(_))!=null&&V.selected||H()),E&&T&&_&&(e==null||e(_));const K=Ei(j.sourceEvent,{transform:I,snapGrid:F,snapToGrid:N,containerBounds:d});if(o=K,a=wL(O,D,K,_),a.size>0&&(n||z||!_&&B)){const[X,Q]=Gc({nodeId:_,dragItems:a,nodeLookup:O});n==null||n(j.sourceEvent,a,X,Q),z==null||z(j.sourceEvent,X,Q),_||B==null||B(j.sourceEvent,Q)}}const P=Nw().clickDistance(b).on("start",j=>{const{domNode:O,nodeDragThreshold:k,transform:D,snapGrid:I,snapToGrid:F}=t();d=(O==null?void 0:O.getBoundingClientRect())||null,m=!1,p=!1,x=j.sourceEvent,k===0&&M(j),o=Ei(j.sourceEvent,{transform:D,snapGrid:I,snapToGrid:F,containerBounds:d}),u=tn(j.sourceEvent,d)}).on("drag",j=>{const{autoPanOnNodeDrag:O,transform:k,snapGrid:D,snapToGrid:I,nodeDragThreshold:F,nodeLookup:N}=t(),T=Ei(j.sourceEvent,{transform:k,snapGrid:D,snapToGrid:I,containerBounds:d});if(x=j.sourceEvent,(j.sourceEvent.type==="touchmove"&&j.sourceEvent.touches.length>1||_&&!N.has(_))&&(m=!0),!m){if(!l&&O&&c&&(l=!0,L()),!c){const z=tn(j.sourceEvent,d),B=z.x-u.x,H=z.y-u.y;Math.sqrt(B*B+H*H)>F&&M(j)}(o.x!==T.xSnapped||o.y!==T.ySnapped)&&a&&c&&(u=tn(j.sourceEvent,d),C(T))}}).on("end",j=>{if(!(!c||m)&&(l=!1,c=!1,cancelAnimationFrame(i),a.size>0)){const{nodeLookup:O,updateNodePositions:k,onNodeDragStop:D,onSelectionDragStop:I}=t();if(p&&(k(a,!1),p=!1),s||D||!_&&I){const[F,N]=Gc({nodeId:_,dragItems:a,nodeLookup:O,dragging:!1});s==null||s(j.sourceEvent,a,F,N),D==null||D(j.sourceEvent,F,N),_||I==null||I(j.sourceEvent,N)}}}).filter(j=>{const O=j.target;return!j.button&&(!v||!Yg(O,`.${v}`,S))&&(!y||Yg(O,y,S))});f.call(P)}function g(){f==null||f.on(".drag",null)}return{update:w,destroy:g}}function bL(e,t,n){const r=[],s={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const o of t.values())Zi(s,Po(o))>0&&r.push(o);return r}const EL=250;function CL(e,t,n,r){var a,l;let s=[],o=1/0;const i=bL(e,n,t+EL);for(const u of i){const d=[...((a=u.internals.handleBounds)==null?void 0:a.source)??[],...((l=u.internals.handleBounds)==null?void 0:l.target)??[]];for(const c of d){if(r.nodeId===c.nodeId&&r.type===c.type&&r.id===c.id)continue;const{x:f,y:m}=_s(u,c,c.position,!0),p=Math.sqrt(Math.pow(f-e.x,2)+Math.pow(m-e.y,2));p>t||(p<o?(s=[{...c,x:f,y:m}],o=p):p===o&&s.push({...c,x:f,y:m}))}}if(!s.length)return null;if(s.length>1){const u=r.type==="source"?"target":"source";return s.find(d=>d.type===u)??s[0]}return s[0]}function c1(e,t,n,r,s,o=!1){var u,d,c;const i=r.get(e);if(!i)return null;const a=s==="strict"?(u=i.internals.handleBounds)==null?void 0:u[t]:[...((d=i.internals.handleBounds)==null?void 0:d.source)??[],...((c=i.internals.handleBounds)==null?void 0:c.target)??[]],l=(n?a==null?void 0:a.find(f=>f.id===n):a==null?void 0:a[0])??null;return l&&o?{...l,..._s(i,l,l.position,!0)}:l}function d1(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function NL(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const f1=()=>!0;function kL(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:s,edgeUpdaterType:o,isTarget:i,domNode:a,nodeLookup:l,lib:u,autoPanOnConnect:d,flowId:c,panBy:f,cancelConnection:m,onConnectStart:p,onConnect:x,onConnectEnd:w,isValidConnection:g=f1,onReconnectEnd:v,updateConnection:y,getTransform:S,getFromHandle:E,autoPanSpeed:_,dragThreshold:b=1,handleDomNode:C}){const L=Jw(e.target);let M=0,P;const{x:j,y:O}=tn(e),k=d1(o,C),D=a==null?void 0:a.getBoundingClientRect();let I=!1;if(!D||!k)return;const F=c1(s,k,r,l,t);if(!F)return;let N=tn(e,D),T=!1,z=null,B=!1,H=null;function K(){if(!d||!D)return;const[re,J]=Gw(N,D,_);f({x:re,y:J}),M=requestAnimationFrame(K)}const V={...F,nodeId:s,type:k,position:F.position},X=l.get(s);let Y={inProgress:!0,isValid:null,from:_s(X,V,ee.Left,!0),fromHandle:V,fromPosition:V.position,fromNode:X,to:N,toHandle:null,toPosition:zg[V.position],toNode:null,pointer:N};function W(){I=!0,y(Y),p==null||p(e,{nodeId:s,handleId:r,handleType:k})}b===0&&W();function Z(re){if(!I){const{x:$e,y:un}=tn(re),dt=$e-j,At=un-O;if(!(dt*dt+At*At>b*b))return;W()}if(!E()||!V){oe(re);return}const J=S();N=tn(re,D),P=CL(ba(N,J,!1,[1,1]),n,l,V),T||(K(),T=!0);const te=h1(re,{handle:P,connectionMode:t,fromNodeId:s,fromHandleId:r,fromType:i?"target":"source",isValidConnection:g,doc:L,lib:u,flowId:c,nodeLookup:l});H=te.handleDomNode,z=te.connection,B=NL(!!P,te.isValid);const he=l.get(s),ye=he?_s(he,V,ee.Left,!0):Y.from,ce={...Y,from:ye,isValid:B,to:te.toHandle&&B?yu({x:te.toHandle.x,y:te.toHandle.y},J):N,toHandle:te.toHandle,toPosition:B&&te.toHandle?te.toHandle.position:zg[V.position],toNode:te.toHandle?l.get(te.toHandle.nodeId):null,pointer:N};y(ce),Y=ce}function oe(re){if(!("touches"in re&&re.touches.length>0)){if(I){(P||H)&&z&&B&&(x==null||x(z));const{inProgress:J,...te}=Y,he={...te,toPosition:Y.toHandle?Y.toPosition:null};w==null||w(re,he),o&&(v==null||v(re,he))}m(),cancelAnimationFrame(M),T=!1,B=!1,z=null,H=null,L.removeEventListener("mousemove",Z),L.removeEventListener("mouseup",oe),L.removeEventListener("touchmove",Z),L.removeEventListener("touchend",oe)}}L.addEventListener("mousemove",Z),L.addEventListener("mouseup",oe),L.addEventListener("touchmove",Z),L.addEventListener("touchend",oe)}function h1(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:s,fromType:o,doc:i,lib:a,flowId:l,isValidConnection:u=f1,nodeLookup:d}){const c=o==="target",f=t?i.querySelector(`.${a}-flow__handle[data-id="${l}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:m,y:p}=tn(e),x=i.elementFromPoint(m,p),w=x!=null&&x.classList.contains(`${a}-flow__handle`)?x:f,g={handleDomNode:w,isValid:!1,connection:null,toHandle:null};if(w){const v=d1(void 0,w),y=w.getAttribute("data-nodeid"),S=w.getAttribute("data-handleid"),E=w.classList.contains("connectable"),_=w.classList.contains("connectableend");if(!y||!v)return g;const b={source:c?y:r,sourceHandle:c?S:s,target:c?r:y,targetHandle:c?s:S};g.connection=b;const L=E&&_&&(n===No.Strict?c&&v==="source"||!c&&v==="target":y!==r||S!==s);g.isValid=L&&u(b),g.toHandle=c1(y,v,S,d,n,!0)}return g}const kf={onPointerDown:kL,isValid:h1};function PL({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const s=Nt(e);function o({translateExtent:a,width:l,height:u,zoomStep:d=1,pannable:c=!0,zoomable:f=!0,inversePan:m=!1}){const p=y=>{if(y.sourceEvent.type!=="wheel"||!t)return;const S=n(),E=y.sourceEvent.ctrlKey&&Ji()?10:1,_=-y.sourceEvent.deltaY*(y.sourceEvent.deltaMode===1?.05:y.sourceEvent.deltaMode?1:.002)*d,b=S[2]*Math.pow(2,_*E);t.scaleTo(b)};let x=[0,0];const w=y=>{(y.sourceEvent.type==="mousedown"||y.sourceEvent.type==="touchstart")&&(x=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY])},g=y=>{const S=n();if(y.sourceEvent.type!=="mousemove"&&y.sourceEvent.type!=="touchmove"||!t)return;const E=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY],_=[E[0]-x[0],E[1]-x[1]];x=E;const b=r()*Math.max(S[2],Math.log(S[2]))*(m?-1:1),C={x:S[0]-_[0]*b,y:S[1]-_[1]*b},L=[[0,0],[l,u]];t.setViewportConstrained({x:C.x,y:C.y,zoom:S[2]},L,a)},v=Bw().on("start",w).on("zoom",c?g:null).on("zoom.wheel",f?p:null);s.call(v,{})}function i(){s.on("zoom",null)}return{update:o,destroy:i,pointer:Yt}}const Zu=e=>({x:e.x,y:e.y,zoom:e.k}),Xc=({x:e,y:t,zoom:n})=>Gu.translate(e,t).scale(n),Bs=(e,t)=>e.target.closest(`.${t}`),p1=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),RL=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Yc=(e,t=0,n=RL,r=()=>{})=>{const s=typeof t=="number"&&t>0;return s||r(),s?e.transition().duration(t).ease(n).on("end",r):e},m1=e=>{const t=e.ctrlKey&&Ji()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function jL({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:s,panOnScrollSpeed:o,zoomOnPinch:i,onPanZoomStart:a,onPanZoom:l,onPanZoomEnd:u}){return d=>{if(Bs(d,t))return d.ctrlKey&&d.preventDefault(),!1;d.preventDefault(),d.stopImmediatePropagation();const c=n.property("__zoom").k||1;if(d.ctrlKey&&i){const w=Yt(d),g=m1(d),v=c*Math.pow(2,g);r.scaleTo(n,v,w,d);return}const f=d.deltaMode===1?20:1;let m=s===as.Vertical?0:d.deltaX*f,p=s===as.Horizontal?0:d.deltaY*f;!Ji()&&d.shiftKey&&s!==as.Vertical&&(m=d.deltaY*f,p=0),r.translateBy(n,-(m/c)*o,-(p/c)*o,{internal:!0});const x=Zu(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(l==null||l(d,x),e.panScrollTimeout=setTimeout(()=>{u==null||u(d,x),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,a==null||a(d,x))}}function ML({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,s){const o=r.type==="wheel",i=!t&&o&&!r.ctrlKey,a=Bs(r,e);if(r.ctrlKey&&o&&a&&r.preventDefault(),i||a)return null;r.preventDefault(),n.call(this,r,s)}}function TL({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var o,i,a;if((o=r.sourceEvent)!=null&&o.internal)return;const s=Zu(r.transform);e.mouseButton=((i=r.sourceEvent)==null?void 0:i.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=s,((a=r.sourceEvent)==null?void 0:a.type)==="mousedown"&&t(!0),n&&(n==null||n(r.sourceEvent,s))}}function LL({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:s}){return o=>{var i,a;e.usedRightMouseButton=!!(n&&p1(t,e.mouseButton??0)),(i=o.sourceEvent)!=null&&i.sync||r([o.transform.x,o.transform.y,o.transform.k]),s&&!((a=o.sourceEvent)!=null&&a.internal)&&(s==null||s(o.sourceEvent,Zu(o.transform)))}}function IL({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:s,onPaneContextMenu:o}){return i=>{var a;if(!((a=i.sourceEvent)!=null&&a.internal)&&(e.isZoomingOrPanning=!1,o&&p1(t,e.mouseButton??0)&&!e.usedRightMouseButton&&i.sourceEvent&&o(i.sourceEvent),e.usedRightMouseButton=!1,r(!1),s)){const l=Zu(i.transform);e.prevViewport=l,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{s==null||s(i.sourceEvent,l)},n?150:0)}}}function AL({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:s,zoomOnDoubleClick:o,userSelectionActive:i,noWheelClassName:a,noPanClassName:l,lib:u,connectionInProgress:d}){return c=>{var w;const f=e||t,m=n&&c.ctrlKey,p=c.type==="wheel";if(c.button===1&&c.type==="mousedown"&&(Bs(c,`${u}-flow__node`)||Bs(c,`${u}-flow__edge`)))return!0;if(!r&&!f&&!s&&!o&&!n||i||d&&!p||Bs(c,a)&&p||Bs(c,l)&&(!p||s&&p&&!e)||!n&&c.ctrlKey&&p)return!1;if(!n&&c.type==="touchstart"&&((w=c.touches)==null?void 0:w.length)>1)return c.preventDefault(),!1;if(!f&&!s&&!m&&p||!r&&(c.type==="mousedown"||c.type==="touchstart")||Array.isArray(r)&&!r.includes(c.button)&&c.type==="mousedown")return!1;const x=Array.isArray(r)&&r.includes(c.button)||!c.button||c.button<=1;return(!c.ctrlKey||p)&&x}}function OL({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:s,onPanZoom:o,onPanZoomStart:i,onPanZoomEnd:a,onDraggingChange:l}){const u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},d=e.getBoundingClientRect(),c=Bw().scaleExtent([t,n]).translateExtent(r),f=Nt(e).call(c);v({x:s.x,y:s.y,zoom:ko(s.zoom,t,n)},[[0,0],[d.width,d.height]],r);const m=f.on("wheel.zoom"),p=f.on("dblclick.zoom");c.wheelDelta(m1);function x(P,j){return f?new Promise(O=>{c==null||c.interpolate((j==null?void 0:j.interpolate)==="linear"?bi:bl).transform(Yc(f,j==null?void 0:j.duration,j==null?void 0:j.ease,()=>O(!0)),P)}):Promise.resolve(!1)}function w({noWheelClassName:P,noPanClassName:j,onPaneContextMenu:O,userSelectionActive:k,panOnScroll:D,panOnDrag:I,panOnScrollMode:F,panOnScrollSpeed:N,preventScrolling:T,zoomOnPinch:z,zoomOnScroll:B,zoomOnDoubleClick:H,zoomActivationKeyPressed:K,lib:V,onTransformChange:X,connectionInProgress:Q,paneClickDistance:Y,selectionOnDrag:W}){k&&!u.isZoomingOrPanning&&g();const Z=D&&!K&&!k;c.clickDistance(W?1/0:!en(Y)||Y<0?0:Y);const oe=Z?jL({zoomPanValues:u,noWheelClassName:P,d3Selection:f,d3Zoom:c,panOnScrollMode:F,panOnScrollSpeed:N,zoomOnPinch:z,onPanZoomStart:i,onPanZoom:o,onPanZoomEnd:a}):ML({noWheelClassName:P,preventScrolling:T,d3ZoomHandler:m});if(f.on("wheel.zoom",oe,{passive:!1}),!k){const J=TL({zoomPanValues:u,onDraggingChange:l,onPanZoomStart:i});c.on("start",J);const te=LL({zoomPanValues:u,panOnDrag:I,onPaneContextMenu:!!O,onPanZoom:o,onTransformChange:X});c.on("zoom",te);const he=IL({zoomPanValues:u,panOnDrag:I,panOnScroll:D,onPaneContextMenu:O,onPanZoomEnd:a,onDraggingChange:l});c.on("end",he)}const re=AL({zoomActivationKeyPressed:K,panOnDrag:I,zoomOnScroll:B,panOnScroll:D,zoomOnDoubleClick:H,zoomOnPinch:z,userSelectionActive:k,noPanClassName:j,noWheelClassName:P,lib:V,connectionInProgress:Q});c.filter(re),H?f.on("dblclick.zoom",p):f.on("dblclick.zoom",null)}function g(){c.on("zoom",null)}async function v(P,j,O){const k=Xc(P),D=c==null?void 0:c.constrain()(k,j,O);return D&&await x(D),new Promise(I=>I(D))}async function y(P,j){const O=Xc(P);return await x(O,j),new Promise(k=>k(O))}function S(P){if(f){const j=Xc(P),O=f.property("__zoom");(O.k!==P.zoom||O.x!==P.x||O.y!==P.y)&&(c==null||c.transform(f,j,null,{sync:!0}))}}function E(){const P=f?$w(f.node()):{x:0,y:0,k:1};return{x:P.x,y:P.y,zoom:P.k}}function _(P,j){return f?new Promise(O=>{c==null||c.interpolate((j==null?void 0:j.interpolate)==="linear"?bi:bl).scaleTo(Yc(f,j==null?void 0:j.duration,j==null?void 0:j.ease,()=>O(!0)),P)}):Promise.resolve(!1)}function b(P,j){return f?new Promise(O=>{c==null||c.interpolate((j==null?void 0:j.interpolate)==="linear"?bi:bl).scaleBy(Yc(f,j==null?void 0:j.duration,j==null?void 0:j.ease,()=>O(!0)),P)}):Promise.resolve(!1)}function C(P){c==null||c.scaleExtent(P)}function L(P){c==null||c.translateExtent(P)}function M(P){const j=!en(P)||P<0?0:P;c==null||c.clickDistance(j)}return{update:w,destroy:g,setViewport:y,setViewportConstrained:v,getViewport:E,scaleTo:_,scaleBy:b,setScaleExtent:C,setTranslateExtent:L,syncViewport:S,setClickDistance:M}}var jo;(function(e){e.Line="line",e.Handle="handle"})(jo||(jo={}));function FL({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:s,affectsY:o}){const i=e-t,a=n-r,l=[i>0?1:i<0?-1:0,a>0?1:a<0?-1:0];return i&&s&&(l[0]=l[0]*-1),a&&o&&(l[1]=l[1]*-1),l}function Zg(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),r=e.includes("left"),s=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:r,affectsY:s}}function Xn(e,t){return Math.max(0,t-e)}function Yn(e,t){return Math.max(0,e-t)}function nl(e,t,n){return Math.max(0,t-e,e-n)}function Jg(e,t){return e?!t:t}function DL(e,t,n,r,s,o,i,a){let{affectsX:l,affectsY:u}=t;const{isHorizontal:d,isVertical:c}=t,f=d&&c,{xSnapped:m,ySnapped:p}=n,{minWidth:x,maxWidth:w,minHeight:g,maxHeight:v}=r,{x:y,y:S,width:E,height:_,aspectRatio:b}=e;let C=Math.floor(d?m-e.pointerX:0),L=Math.floor(c?p-e.pointerY:0);const M=E+(l?-C:C),P=_+(u?-L:L),j=-o[0]*E,O=-o[1]*_;let k=nl(M,x,w),D=nl(P,g,v);if(i){let N=0,T=0;l&&C<0?N=Xn(y+C+j,i[0][0]):!l&&C>0&&(N=Yn(y+M+j,i[1][0])),u&&L<0?T=Xn(S+L+O,i[0][1]):!u&&L>0&&(T=Yn(S+P+O,i[1][1])),k=Math.max(k,N),D=Math.max(D,T)}if(a){let N=0,T=0;l&&C>0?N=Yn(y+C,a[0][0]):!l&&C<0&&(N=Xn(y+M,a[1][0])),u&&L>0?T=Yn(S+L,a[0][1]):!u&&L<0&&(T=Xn(S+P,a[1][1])),k=Math.max(k,N),D=Math.max(D,T)}if(s){if(d){const N=nl(M/b,g,v)*b;if(k=Math.max(k,N),i){let T=0;!l&&!u||l&&!u&&f?T=Yn(S+O+M/b,i[1][1])*b:T=Xn(S+O+(l?C:-C)/b,i[0][1])*b,k=Math.max(k,T)}if(a){let T=0;!l&&!u||l&&!u&&f?T=Xn(S+M/b,a[1][1])*b:T=Yn(S+(l?C:-C)/b,a[0][1])*b,k=Math.max(k,T)}}if(c){const N=nl(P*b,x,w)/b;if(D=Math.max(D,N),i){let T=0;!l&&!u||u&&!l&&f?T=Yn(y+P*b+j,i[1][0])/b:T=Xn(y+(u?L:-L)*b+j,i[0][0])/b,D=Math.max(D,T)}if(a){let T=0;!l&&!u||u&&!l&&f?T=Xn(y+P*b,a[1][0])/b:T=Yn(y+(u?L:-L)*b,a[0][0])/b,D=Math.max(D,T)}}}L=L+(L<0?D:-D),C=C+(C<0?k:-k),s&&(f?M>P*b?L=(Jg(l,u)?-C:C)/b:C=(Jg(l,u)?-L:L)*b:d?(L=C/b,u=l):(C=L*b,l=u));const I=l?y+C:y,F=u?S+L:S;return{width:E+(l?-C:C),height:_+(u?-L:L),x:o[0]*C*(l?-1:1)+I,y:o[1]*L*(u?-1:1)+F}}const g1={width:0,height:0,x:0,y:0},zL={...g1,pointerX:0,pointerY:0,aspectRatio:1};function $L(e){return[[0,0],[e.measured.width,e.measured.height]]}function BL(e,t,n){const r=t.position.x+e.position.x,s=t.position.y+e.position.y,o=e.measured.width??0,i=e.measured.height??0,a=n[0]*o,l=n[1]*i;return[[r-a,s-l],[r+o-a,s+i-l]]}function HL({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:s}){const o=Nt(e);let i={controlDirection:Zg("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function a({controlPosition:u,boundaries:d,keepAspectRatio:c,resizeDirection:f,onResizeStart:m,onResize:p,onResizeEnd:x,shouldResize:w}){let g={...g1},v={...zL};i={boundaries:d,resizeDirection:f,keepAspectRatio:c,controlDirection:Zg(u)};let y,S=null,E=[],_,b,C,L=!1;const M=Nw().on("start",P=>{const{nodeLookup:j,transform:O,snapGrid:k,snapToGrid:D,nodeOrigin:I,paneDomNode:F}=n();if(y=j.get(t),!y)return;S=(F==null?void 0:F.getBoundingClientRect())??null;const{xSnapped:N,ySnapped:T}=Ei(P.sourceEvent,{transform:O,snapGrid:k,snapToGrid:D,containerBounds:S});g={width:y.measured.width??0,height:y.measured.height??0,x:y.position.x??0,y:y.position.y??0},v={...g,pointerX:N,pointerY:T,aspectRatio:g.width/g.height},_=void 0,y.parentId&&(y.extent==="parent"||y.expandParent)&&(_=j.get(y.parentId),b=_&&y.extent==="parent"?$L(_):void 0),E=[],C=void 0;for(const[z,B]of j)if(B.parentId===t&&(E.push({id:z,position:{...B.position},extent:B.extent}),B.extent==="parent"||B.expandParent)){const H=BL(B,y,B.origin??I);C?C=[[Math.min(H[0][0],C[0][0]),Math.min(H[0][1],C[0][1])],[Math.max(H[1][0],C[1][0]),Math.max(H[1][1],C[1][1])]]:C=H}m==null||m(P,{...g})}).on("drag",P=>{const{transform:j,snapGrid:O,snapToGrid:k,nodeOrigin:D}=n(),I=Ei(P.sourceEvent,{transform:j,snapGrid:O,snapToGrid:k,containerBounds:S}),F=[];if(!y)return;const{x:N,y:T,width:z,height:B}=g,H={},K=y.origin??D,{width:V,height:X,x:Q,y:Y}=DL(v,i.controlDirection,I,i.boundaries,i.keepAspectRatio,K,b,C),W=V!==z,Z=X!==B,oe=Q!==N&&W,re=Y!==T&&Z;if(!oe&&!re&&!W&&!Z)return;if((oe||re||K[0]===1||K[1]===1)&&(H.x=oe?Q:g.x,H.y=re?Y:g.y,g.x=H.x,g.y=H.y,E.length>0)){const ye=Q-N,ce=Y-T;for(const $e of E)$e.position={x:$e.position.x-ye+K[0]*(V-z),y:$e.position.y-ce+K[1]*(X-B)},F.push($e)}if((W||Z)&&(H.width=W&&(!i.resizeDirection||i.resizeDirection==="horizontal")?V:g.width,H.height=Z&&(!i.resizeDirection||i.resizeDirection==="vertical")?X:g.height,g.width=H.width,g.height=H.height),_&&y.expandParent){const ye=K[0]*(H.width??0);H.x&&H.x<ye&&(g.x=ye,v.x=v.x-(H.x-ye));const ce=K[1]*(H.height??0);H.y&&H.y<ce&&(g.y=ce,v.y=v.y-(H.y-ce))}const J=FL({width:g.width,prevWidth:z,height:g.height,prevHeight:B,affectsX:i.controlDirection.affectsX,affectsY:i.controlDirection.affectsY}),te={...g,direction:J};(w==null?void 0:w(P,te))!==!1&&(L=!0,p==null||p(P,te),r(H,F))}).on("end",P=>{L&&(x==null||x(P,{...g}),s==null||s({...g}),L=!1)});o.call(M)}function l(){o.on(".drag",null)}return{update:a,destroy:l}}const UL={},ey=e=>{let t;const n=new Set,r=(d,c)=>{const f=typeof d=="function"?d(t):d;if(!Object.is(f,t)){const m=t;t=c??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(p=>p(t,m))}},s=()=>t,l={setState:r,getState:s,getInitialState:()=>u,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{(UL?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(r,s,l);return l},VL=e=>e?ey(e):ey,{useDebugValue:WL}=ls,{useSyncExternalStoreWithSelector:KL}=IN,qL=e=>e;function y1(e,t=qL,n){const r=KL(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return WL(r),r}const ty=(e,t)=>{const n=VL(e),r=(s,o=t)=>y1(n,s,o);return Object.assign(r,n),r},QL=(e,t)=>e?ty(e,t):ty;function Ee(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,s]of e)if(!Object.is(s,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}const Ju=R.createContext(null),GL=Ju.Provider,x1=bn.error001();function fe(e,t){const n=R.useContext(Ju);if(n===null)throw new Error(x1);return y1(n,e,t)}function Ce(){const e=R.useContext(Ju);if(e===null)throw new Error(x1);return R.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const ny={display:"none"},XL={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},v1="react-flow__node-desc",w1="react-flow__edge-desc",YL="react-flow__aria-live",ZL=e=>e.ariaLiveMessage,JL=e=>e.ariaLabelConfig;function eI({rfId:e}){const t=fe(ZL);return h.jsx("div",{id:`${YL}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:XL,children:t})}function tI({rfId:e,disableKeyboardA11y:t}){const n=fe(JL);return h.jsxs(h.Fragment,{children:[h.jsx("div",{id:`${v1}-${e}`,style:ny,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),h.jsx("div",{id:`${w1}-${e}`,style:ny,children:n["edge.a11yDescription.default"]}),!t&&h.jsx(eI,{rfId:e})]})}const Ea=R.forwardRef(({position:e="top-left",children:t,className:n,style:r,...s},o)=>{const i=`${e}`.split("-");return h.jsx("div",{className:Oe(["react-flow__panel",n,...i]),style:r,ref:o,...s,children:t})});Ea.displayName="Panel";function nI({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:h.jsx(Ea,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:h.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const rI=e=>{const t=[],n=[];for(const[,r]of e.nodeLookup)r.selected&&t.push(r.internals.userNode);for(const[,r]of e.edgeLookup)r.selected&&n.push(r);return{selectedNodes:t,selectedEdges:n}},rl=e=>e.id;function sI(e,t){return Ee(e.selectedNodes.map(rl),t.selectedNodes.map(rl))&&Ee(e.selectedEdges.map(rl),t.selectedEdges.map(rl))}function oI({onSelectionChange:e}){const t=Ce(),{selectedNodes:n,selectedEdges:r}=fe(rI,sI);return R.useEffect(()=>{const s={nodes:n,edges:r};e==null||e(s),t.getState().onSelectionChangeHandlers.forEach(o=>o(s))},[n,r,e]),null}const iI=e=>!!e.onSelectionChangeHandlers;function aI({onSelectionChange:e}){const t=fe(iI);return e||t?h.jsx(oI,{onSelectionChange:e}):null}const S1=[0,0],lI={x:0,y:0,zoom:1},uI=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],ry=[...uI,"rfId"],cI=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}),sy={translateExtent:Xi,nodeOrigin:S1,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function dI(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:s,setTranslateExtent:o,setNodeExtent:i,reset:a,setDefaultNodesAndEdges:l}=fe(cI,Ee),u=Ce();R.useEffect(()=>(l(e.defaultNodes,e.defaultEdges),()=>{d.current=sy,a()}),[]);const d=R.useRef(sy);return R.useEffect(()=>{for(const c of ry){const f=e[c],m=d.current[c];f!==m&&(typeof e[c]>"u"||(c==="nodes"?t(f):c==="edges"?n(f):c==="minZoom"?r(f):c==="maxZoom"?s(f):c==="translateExtent"?o(f):c==="nodeExtent"?i(f):c==="ariaLabelConfig"?u.setState({ariaLabelConfig:eL(f)}):c==="fitView"?u.setState({fitViewQueued:f}):c==="fitViewOptions"?u.setState({fitViewOptions:f}):u.setState({[c]:f})))}d.current=e},ry.map(c=>e[c])),null}function oy(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function fI(e){var r;const[t,n]=R.useState(e==="system"?null:e);return R.useEffect(()=>{if(e!=="system"){n(e);return}const s=oy(),o=()=>n(s!=null&&s.matches?"dark":"light");return o(),s==null||s.addEventListener("change",o),()=>{s==null||s.removeEventListener("change",o)}},[e]),t!==null?t:(r=oy())!=null&&r.matches?"dark":"light"}const iy=typeof document<"u"?document:null;function ea(e=null,t={target:iy,actInsideInputWithModifier:!0}){const[n,r]=R.useState(!1),s=R.useRef(!1),o=R.useRef(new Set([])),[i,a]=R.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(c=>typeof c=="string").map(c=>c.replace("+",`
|
|
61
|
+
`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ys(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&Sl.assertOptions(r,{silentJSONParsing:dn.transitional(dn.boolean),forcedJSONParsing:dn.transitional(dn.boolean),clarifyTimeoutError:dn.transitional(dn.boolean)},!1),s!=null&&(z.isFunction(s)?n.paramsSerializer={serialize:s}:Sl.assertOptions(s,{encode:dn.function,serialize:dn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Sl.assertOptions(n,{baseUrl:dn.spelling("baseURL"),withXsrfToken:dn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&z.merge(o.common,o[n.method]);o&&z.forEach(["delete","get","head","post","put","patch","common"],p=>{delete o[p]}),n.headers=bt.concat(i,o);const a=[];let l=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(n)===!1||(l=l&&x.synchronous,a.unshift(x.fulfilled,x.rejected))});const u=[];this.interceptors.response.forEach(function(x){u.push(x.fulfilled,x.rejected)});let d,c=0,f;if(!l){const p=[mg.bind(this),void 0];for(p.unshift(...a),p.push(...u),f=p.length,d=Promise.resolve(n);c<f;)d=d.then(p[c++],p[c++]);return d}f=a.length;let m=n;for(;c<f;){const p=a[c++],x=a[c++];try{m=p(m)}catch(w){x.call(this,w);break}}try{d=mg.call(this,m)}catch(p){return Promise.reject(p)}for(c=0,f=u.length;c<f;)d=d.then(u[c++],u[c++]);return d}getUri(t){t=ys(this.defaults,t);const n=Qv(t.baseURL,t.url,t.allowAbsoluteUrls);return Uv(n,t.params,t.paramsSerializer)}};z.forEach(["delete","get","head","options"],function(t){os.prototype[t]=function(n,r){return this.request(ys(r||{},{method:t,url:n,data:(r||{}).data}))}});z.forEach(["post","put","patch"],function(t){function n(r){return function(o,i,a){return this.request(ys(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}os.prototype[t]=n(),os.prototype[t+"Form"]=n(!0)});let AP=class Jv{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(s=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(a=>{r.subscribe(a),o=a}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,a){r.reason||(r.reason=new Fo(o,i,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Jv(function(s){t=s}),cancel:t}}};function OP(e){return function(n){return e.apply(null,n)}}function FP(e){return z.isObject(e)&&e.isAxiosError===!0}const hf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(hf).forEach(([e,t])=>{hf[t]=e});function ew(e){const t=new os(e),n=Mv(os.prototype.request,t);return z.extend(n,os.prototype,t,{allOwnKeys:!0}),z.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return ew(ys(e,s))},n}const Te=ew(ga);Te.Axios=os;Te.CanceledError=Fo;Te.CancelToken=AP;Te.isCancel=Kv;Te.VERSION=Zv;Te.toFormData=Uu;Te.AxiosError=se;Te.Cancel=Te.CanceledError;Te.all=function(t){return Promise.all(t)};Te.spread=OP;Te.isAxiosError=FP;Te.mergeConfig=ys;Te.AxiosHeaders=bt;Te.formToJSON=e=>Wv(z.isHTMLForm(e)?new FormData(e):e);Te.getAdapter=Yv.getAdapter;Te.HttpStatusCode=hf;Te.default=Te;const{Axios:$3,AxiosError:DP,CanceledError:B3,isCancel:H3,CancelToken:U3,VERSION:V3,all:W3,Cancel:K3,isAxiosError:q3,spread:Q3,toFormData:G3,AxiosHeaders:X3,HttpStatusCode:Y3,formToJSON:Z3,getAdapter:J3,mergeConfig:eO}=Te;function yg(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function zP(...e){return t=>{let n=!1;const r=e.map(s=>{const o=yg(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<r.length;s++){const o=r[s];typeof o=="function"?o():yg(e[s],null)}}}}var $P=Symbol.for("react.lazy"),lu=x_[" use ".trim().toString()];function BP(e){return typeof e=="object"&&e!==null&&"then"in e}function tw(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===$P&&"_payload"in e&&BP(e._payload)}function HP(e){const t=VP(e),n=j.forwardRef((r,s)=>{let{children:o,...i}=r;tw(o)&&typeof lu=="function"&&(o=lu(o._payload));const a=j.Children.toArray(o),l=a.find(KP);if(l){const u=l.props.children,d=a.map(c=>c===l?j.Children.count(u)>1?j.Children.only(null):j.isValidElement(u)?u.props.children:null:c);return h.jsx(t,{...i,ref:s,children:j.isValidElement(u)?j.cloneElement(u,void 0,d):null})}return h.jsx(t,{...i,ref:s,children:o})});return n.displayName=`${e}.Slot`,n}var UP=HP("Slot");function VP(e){const t=j.forwardRef((n,r)=>{let{children:s,...o}=n;if(tw(s)&&typeof lu=="function"&&(s=lu(s._payload)),j.isValidElement(s)){const i=QP(s),a=qP(o,s.props);return s.type!==j.Fragment&&(a.ref=r?zP(r,i):i),j.cloneElement(s,a)}return j.Children.count(s)>1?j.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var WP=Symbol("radix.slottable");function KP(e){return j.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===WP}function qP(e,t){const n={...t};for(const r in t){const s=e[r],o=t[r];/^on[A-Z]/.test(r)?s&&o?n[r]=(...a)=>{const l=o(...a);return s(...a),l}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function QP(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function nw(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=nw(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function rw(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=nw(e))&&(r&&(r+=" "),r+=t);return r}const xg=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,vg=rw,sw=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return vg(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:o}=t,i=Object.keys(s).map(u=>{const d=n==null?void 0:n[u],c=o==null?void 0:o[u];if(d===null)return null;const f=xg(d)||xg(c);return s[u][f]}),a=n&&Object.entries(n).reduce((u,d)=>{let[c,f]=d;return f===void 0||(u[c]=f),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:c,className:f,...m}=d;return Object.entries(m).every(p=>{let[x,w]=p;return Array.isArray(w)?w.includes({...o,...a}[x]):{...o,...a}[x]===w})?[...u,c,f]:u},[]);return vg(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)},Uh="-",GP=e=>{const t=YP(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(Uh);return a[0]===""&&a.length!==1&&a.shift(),ow(a,t)||XP(i)},getConflictingClassGroupIds:(i,a)=>{const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}}},ow=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?ow(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(Uh);return(i=t.validators.find(({validator:a})=>a(o)))==null?void 0:i.classGroupId},wg=/^\[(.+)\]$/,XP=e=>{if(wg.test(e)){const t=wg.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},YP=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return JP(Object.entries(e.classGroups),n).forEach(([o,i])=>{pf(i,r,o,t)}),r},pf=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:Sg(t,s);o.classGroupId=n;return}if(typeof s=="function"){if(ZP(s)){pf(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([o,i])=>{pf(i,Sg(t,o),n,r)})})},Sg=(e,t)=>{let n=e;return t.split(Uh).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},ZP=e=>e.isThemeGetter,JP=(e,t)=>t?e.map(([n,r])=>{const s=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,a])=>[t+i,a])):o);return[n,s]}):e,eR=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(o,i)=>{n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let i=n.get(o);if(i!==void 0)return i;if((i=r.get(o))!==void 0)return s(o,i),i},set(o,i){n.has(o)?n.set(o,i):s(o,i)}}},iw="!",tR=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],o=t.length,i=a=>{const l=[];let u=0,d=0,c;for(let w=0;w<a.length;w++){let g=a[w];if(u===0){if(g===s&&(r||a.slice(w,w+o)===t)){l.push(a.slice(d,w)),d=w+o;continue}if(g==="/"){c=w;continue}}g==="["?u++:g==="]"&&u--}const f=l.length===0?a:a.substring(d),m=f.startsWith(iw),p=m?f.substring(1):f,x=c&&c>d?c-d:void 0;return{modifiers:l,hasImportantModifier:m,baseClassName:p,maybePostfixModifierPosition:x}};return n?a=>n({className:a,parseClassName:i}):i},nR=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},rR=e=>({cache:eR(e.cacheSize),parseClassName:tR(e),...GP(e)}),sR=/\s+/,oR=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,o=[],i=e.trim().split(sR);let a="";for(let l=i.length-1;l>=0;l-=1){const u=i[l],{modifiers:d,hasImportantModifier:c,baseClassName:f,maybePostfixModifierPosition:m}=n(u);let p=!!m,x=r(p?f.substring(0,m):f);if(!x){if(!p){a=u+(a.length>0?" "+a:a);continue}if(x=r(f),!x){a=u+(a.length>0?" "+a:a);continue}p=!1}const w=nR(d).join(":"),g=c?w+iw:w,v=g+x;if(o.includes(v))continue;o.push(v);const y=s(x,p);for(let S=0;S<y.length;++S){const E=y[S];o.push(g+E)}a=u+(a.length>0?" "+a:a)}return a};function iR(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=aw(t))&&(r&&(r+=" "),r+=n);return r}const aw=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=aw(e[r]))&&(n&&(n+=" "),n+=t);return n};function aR(e,...t){let n,r,s,o=i;function i(l){const u=t.reduce((d,c)=>c(d),e());return n=rR(u),r=n.cache.get,s=n.cache.set,o=a,a(l)}function a(l){const u=r(l);if(u)return u;const d=oR(l,n);return s(l,d),d}return function(){return o(iR.apply(null,arguments))}}const ve=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},lw=/^\[(?:([a-z-]+):)?(.+)\]$/i,lR=/^\d+\/\d+$/,uR=new Set(["px","full","screen"]),cR=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,dR=/\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$/,fR=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,hR=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,pR=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Nn=e=>Xs(e)||uR.has(e)||lR.test(e),Qn=e=>Do(e,"length",_R),Xs=e=>!!e&&!Number.isNaN(Number(e)),Vc=e=>Do(e,"number",Xs),ei=e=>!!e&&Number.isInteger(Number(e)),mR=e=>e.endsWith("%")&&Xs(e.slice(0,-1)),ie=e=>lw.test(e),Gn=e=>cR.test(e),gR=new Set(["length","size","percentage"]),yR=e=>Do(e,gR,uw),xR=e=>Do(e,"position",uw),vR=new Set(["image","url"]),wR=e=>Do(e,vR,ER),SR=e=>Do(e,"",bR),ti=()=>!0,Do=(e,t,n)=>{const r=lw.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},_R=e=>dR.test(e)&&!fR.test(e),uw=()=>!1,bR=e=>hR.test(e),ER=e=>pR.test(e),CR=()=>{const e=ve("colors"),t=ve("spacing"),n=ve("blur"),r=ve("brightness"),s=ve("borderColor"),o=ve("borderRadius"),i=ve("borderSpacing"),a=ve("borderWidth"),l=ve("contrast"),u=ve("grayscale"),d=ve("hueRotate"),c=ve("invert"),f=ve("gap"),m=ve("gradientColorStops"),p=ve("gradientColorStopPositions"),x=ve("inset"),w=ve("margin"),g=ve("opacity"),v=ve("padding"),y=ve("saturate"),S=ve("scale"),E=ve("sepia"),b=ve("skew"),_=ve("space"),C=ve("translate"),M=()=>["auto","contain","none"],L=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto",ie,t],R=()=>[ie,t],$=()=>["",Nn,Qn],k=()=>["auto",Xs,ie],I=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],A=()=>["solid","dashed","dotted","double","none"],F=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],N=()=>["start","end","center","between","around","evenly","stretch"],T=()=>["","0",ie],D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[Xs,ie];return{cacheSize:500,separator:":",theme:{colors:[ti],spacing:[Nn,Qn],blur:["none","",Gn,ie],brightness:B(),borderColor:[e],borderRadius:["none","","full",Gn,ie],borderSpacing:R(),borderWidth:$(),contrast:B(),grayscale:T(),hueRotate:B(),invert:T(),gap:R(),gradientColorStops:[e],gradientColorStopPositions:[mR,Qn],inset:P(),margin:P(),opacity:B(),padding:R(),saturate:B(),scale:B(),sepia:T(),skew:B(),space:R(),translate:R()},classGroups:{aspect:[{aspect:["auto","square","video",ie]}],container:["container"],columns:[{columns:[Gn]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"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"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...I(),ie]}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[x]}],"inset-x":[{"inset-x":[x]}],"inset-y":[{"inset-y":[x]}],start:[{start:[x]}],end:[{end:[x]}],top:[{top:[x]}],right:[{right:[x]}],bottom:[{bottom:[x]}],left:[{left:[x]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ei,ie]}],basis:[{basis:P()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ie]}],grow:[{grow:T()}],shrink:[{shrink:T()}],order:[{order:["first","last","none",ei,ie]}],"grid-cols":[{"grid-cols":[ti]}],"col-start-end":[{col:["auto",{span:["full",ei,ie]},ie]}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":[ti]}],"row-start-end":[{row:["auto",{span:[ei,ie]},ie]}],"row-start":[{"row-start":k()}],"row-end":[{"row-end":k()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ie]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ie]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...N()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...N(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...N(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[_]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[_]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ie,t]}],"min-w":[{"min-w":[ie,t,"min","max","fit"]}],"max-w":[{"max-w":[ie,t,"none","full","min","max","fit","prose",{screen:[Gn]},Gn]}],h:[{h:[ie,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ie,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ie,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ie,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Gn,Qn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Vc]}],"font-family":[{font:[ti]}],"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:["tighter","tight","normal","wide","wider","widest",ie]}],"line-clamp":[{"line-clamp":["none",Xs,Vc]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Nn,ie]}],"list-image":[{"list-image":["none",ie]}],"list-style-type":[{list:["none","disc","decimal",ie]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...A(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Nn,Qn]}],"underline-offset":[{"underline-offset":["auto",Nn,ie]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ie]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ie]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...I(),xR]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",yR]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},wR]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...A(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:A()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...A()]}],"outline-offset":[{"outline-offset":[Nn,ie]}],"outline-w":[{outline:[Nn,Qn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:$()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[Nn,Qn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Gn,SR]}],"shadow-color":[{shadow:[ti]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...F(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":F()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Gn,ie]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[c]}],saturate:[{saturate:[y]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[c]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ie]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",ie]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",ie]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[ei,ie]}],"translate-x":[{"translate-x":[C]}],"translate-y":[{"translate-y":[C]}],"skew-x":[{"skew-x":[b]}],"skew-y":[{"skew-y":[b]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ie]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ie]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ie]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Nn,Qn,Vc]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"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-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-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"],"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"]}}},NR=aR(CR);function ze(...e){return NR(rw(e))}const kR=sw("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 ring-offset-background",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}});function wn({className:e,variant:t,size:n,asChild:r=!1,...s}){const o=r?UP:"button";return h.jsx(o,{className:ze(kR({variant:t,size:n}),e),...s})}const ya=XN({component:PR});function PR(){return h.jsxs("div",{className:"min-h-screen flex flex-col bg-background",children:[h.jsxs("nav",{className:"px-8 py-4 border-b bg-card flex gap-6 items-center",children:[h.jsxs(Ue,{to:"/",className:"font-bold text-xl text-primary no-underline flex items-center gap-2",children:[h.jsxs("svg",{className:"w-7 h-7",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("rect",{width:"32",height:"32",rx:"6",fill:"#166534"}),h.jsx("path",{d:"M8 10h4v12H8V10zm6 0h4v12h-4V10zm6 0h4v12h-4V10z",fill:"#86efac"}),h.jsx("circle",{cx:"10",cy:"13",r:"1.5",fill:"#22c55e"}),h.jsx("circle",{cx:"16",cy:"16",r:"1.5",fill:"#22c55e"}),h.jsx("circle",{cx:"22",cy:"19",r:"1.5",fill:"#22c55e"})]}),"Furu"]}),h.jsxs("div",{className:"flex gap-2",children:[h.jsx(wn,{asChild:!0,variant:"ghost",size:"sm",children:h.jsx(Ue,{to:"/",activeOptions:{exact:!0},className:"[&.active]:text-primary [&.active]:bg-accent",children:"Dashboard"})}),h.jsx(wn,{asChild:!0,variant:"ghost",size:"sm",children:h.jsx(Ue,{to:"/experiments",className:"[&.active]:text-primary [&.active]:bg-accent",children:"Experiments"})}),h.jsx(wn,{asChild:!0,variant:"ghost",size:"sm",children:h.jsx(Ue,{to:"/dag",className:"[&.active]:text-primary [&.active]:bg-accent",children:"DAG"})})]})]}),h.jsx("main",{className:"flex-1 p-8",children:h.jsx(jv,{})})]})}const RR=Te.create({baseURL:""}),zo=e=>{const t=Te.CancelToken.source(),n=RR({...e,cancelToken:t.token}).then(({data:r})=>r);return n.cancel=()=>{t.cancel("Query was cancelled")},n},jR=e=>zo({url:"/api/health",method:"GET",signal:e}),MR=()=>["/api/health"],TR=e=>{const{query:t}={};return{queryKey:(t==null?void 0:t.queryKey)??MR(),queryFn:({signal:s})=>jR(s),...t}};function LR(e,t){const n=TR(),r=Ao(n);return r.queryKey=n.queryKey,r}const IR=(e,t)=>zo({url:"/api/experiments",method:"GET",params:e,signal:t}),AR=e=>["/api/experiments",...e?[e]:[]],OR=(e,t)=>{const{query:n}={};return{queryKey:(n==null?void 0:n.queryKey)??AR(e),queryFn:({signal:o})=>IR(e,o),...n}};function cw(e,t,n){const r=OR(e),s=Ao(r);return s.queryKey=r.queryKey,s}const FR=(e,t,n,r)=>zo({url:`/api/experiments/${e}/${t}/relationships`,method:"GET",params:n,signal:r}),DR=(e,t,n)=>[`/api/experiments/${e}/${t}/relationships`,...n?[n]:[]],zR=(e,t,n,r)=>{const{query:s}={};return{queryKey:(s==null?void 0:s.queryKey)??DR(e,t,n),queryFn:({signal:a})=>FR(e,t,n,a),enabled:!!(e&&t),...s}};function $R(e,t,n,r,s){const o=zR(e,t,n),i=Ao(o);return i.queryKey=o.queryKey,i}const BR=(e,t,n,r)=>zo({url:`/api/experiments/${e}/${t}`,method:"GET",params:n,signal:r}),HR=(e,t,n)=>[`/api/experiments/${e}/${t}`,...n?[n]:[]],UR=(e,t,n,r)=>{const{query:s}={};return{queryKey:(s==null?void 0:s.queryKey)??HR(e,t,n),queryFn:({signal:a})=>BR(e,t,n,a),enabled:!!(e&&t),...s}};function VR(e,t,n,r,s){const o=UR(e,t,n),i=Ao(o);return i.queryKey=o.queryKey,i}const WR=e=>zo({url:"/api/stats",method:"GET",signal:e}),KR=()=>["/api/stats"],qR=e=>{const{query:t}={};return{queryKey:(t==null?void 0:t.queryKey)??KR(),queryFn:({signal:s})=>WR(s),...t}};function QR(e,t){const n=qR(),r=Ao(n);return r.queryKey=n.queryKey,r}const GR=e=>zo({url:"/api/dag",method:"GET",signal:e}),XR=()=>["/api/dag"],YR=e=>{const{query:t}={};return{queryKey:(t==null?void 0:t.queryKey)??XR(),queryFn:({signal:s})=>GR(s),...t}};function ZR(e,t){const n=YR(),r=Ao(n);return r.queryKey=n.queryKey,r}const JR=sw("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-medium transition-colors",{variants:{variant:{default:"bg-primary text-primary-foreground border-transparent",secondary:"bg-secondary text-secondary-foreground border-transparent",outline:"text-foreground",success:"bg-emerald-500/15 text-emerald-300 border-emerald-500/30",warning:"bg-amber-500/15 text-amber-300 border-amber-500/30",info:"bg-blue-500/15 text-blue-300 border-blue-500/30",destructive:"bg-red-500/15 text-red-300 border-red-500/30",muted:"bg-muted text-muted-foreground border-border"}},defaultVariants:{variant:"default"}});function mt({className:e,variant:t,...n}){return h.jsx("div",{className:ze(JR({variant:t}),e),...n})}const ej={success:"success",failed:"destructive",incomplete:"warning",absent:"muted"},tj={success:"success",running:"info",queued:"secondary",failed:"destructive",crashed:"warning",cancelled:"muted",preempted:"warning"};function sn({status:e,type:t}){const r=(t==="result"?ej:tj)[e]??"muted";return h.jsxs(mt,{variant:r,className:"gap-1.5 px-2.5 py-1",children:[t==="attempt"&&e==="running"&&h.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-blue-300 animate-pulse"}),e]})}const be=j.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:ze("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));be.displayName="Card";const nt=j.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:ze("flex flex-col gap-1.5 p-6",e),...t}));nt.displayName="CardHeader";const lt=j.forwardRef(({className:e,...t},n)=>h.jsx("h3",{ref:n,className:ze("text-lg font-semibold leading-none tracking-tight",e),...t}));lt.displayName="CardTitle";const nj=j.forwardRef(({className:e,...t},n)=>h.jsx("p",{ref:n,className:ze("text-sm text-muted-foreground",e),...t}));nj.displayName="CardDescription";const ke=j.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:ze("p-6 pt-0",e),...t}));ke.displayName="CardContent";const rj=j.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:ze("flex items-center p-6 pt-0",e),...t}));rj.displayName="CardFooter";function dw({title:e,description:t,icon:n="📭"}){return h.jsx(be,{className:"border-dashed",children:h.jsxs(ke,{className:"flex flex-col items-center justify-center py-16 text-center",children:[h.jsx("span",{className:"mb-4 text-5xl",children:n}),h.jsx("h3",{className:"mb-2 text-lg font-medium",children:e}),t?h.jsx("p",{className:"max-w-md text-muted-foreground",children:t}):null]})})}const Ar=j.forwardRef(({className:e,type:t,...n},r)=>h.jsx("input",{type:t,className:ze("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));Ar.displayName="Input";const Vh=j.forwardRef(({className:e,...t},n)=>h.jsx("div",{className:"w-full overflow-auto",children:h.jsx("table",{ref:n,className:ze("w-full caption-bottom text-sm",e),...t})}));Vh.displayName="Table";const Wh=j.forwardRef(({className:e,...t},n)=>h.jsx("thead",{ref:n,className:ze("[&_tr]:border-b",e),...t}));Wh.displayName="TableHeader";const Kh=j.forwardRef(({className:e,...t},n)=>h.jsx("tbody",{ref:n,className:ze("[&_tr:last-child]:border-0",e),...t}));Kh.displayName="TableBody";const sj=j.forwardRef(({className:e,...t},n)=>h.jsx("tfoot",{ref:n,className:ze("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));sj.displayName="TableFooter";const Wi=j.forwardRef(({className:e,...t},n)=>h.jsx("tr",{ref:n,className:ze("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Wi.displayName="TableRow";const Ke=j.forwardRef(({className:e,...t},n)=>h.jsx("th",{ref:n,className:ze("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));Ke.displayName="TableHead";const qe=j.forwardRef(({className:e,...t},n)=>h.jsx("td",{ref:n,className:ze("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));qe.displayName="TableCell";const oj=j.forwardRef(({className:e,...t},n)=>h.jsx("caption",{ref:n,className:ze("mt-4 text-sm text-muted-foreground",e),...t}));oj.displayName="TableCaption";const ij=_o("/experiments")({component:dj}),aj=["","success","failed","incomplete","absent"],lj=["","running","queued","success","failed","crashed","cancelled","preempted"],uj=["","local","submitit"],cj=["current","stale","any"];function dj(){const[e,t]=j.useState(""),[n,r]=j.useState(""),[s,o]=j.useState(""),[i,a]=j.useState(""),[l,u]=j.useState(""),[d,c]=j.useState(""),[f,m]=j.useState("current"),[p,x]=j.useState(""),[w,g]=j.useState(""),[v,y]=j.useState(""),[S,E]=j.useState("resolved"),[b,_]=j.useState(0),C=20,{data:M,isLoading:L,error:P}=cw({result_status:e||void 0,attempt_status:n||void 0,namespace:s||void 0,backend:i||void 0,hostname:l||void 0,user:d||void 0,schema:f,started_after:p||void 0,started_before:w||void 0,config_filter:v||void 0,view:S,limit:C,offset:b*C}),R=M?Math.ceil(M.total/C):0,$=()=>{t(""),r(""),o(""),a(""),u(""),c(""),m("current"),x(""),g(""),y(""),_(0)},k=e||n||s||i||l||d||f!=="current"||p||w||v;return h.jsxs("div",{className:"max-w-7xl mx-auto",children:[h.jsxs("div",{className:"mb-8",children:[h.jsx("h1",{className:"text-3xl font-bold mb-2",children:"Experiments"}),h.jsx("p",{className:"text-muted-foreground",children:"Browse and filter all Furu experiments"})]}),h.jsxs(be,{className:"mb-6",children:[h.jsxs(nt,{className:"flex flex-row items-center justify-between",children:[h.jsx(lt,{children:"Filters"}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsxs("div",{className:"flex rounded-full border border-muted overflow-hidden text-xs",children:[h.jsx("button",{className:`px-3 py-1 ${S==="resolved"?"bg-primary text-primary-foreground":"text-muted-foreground"}`,onClick:()=>{E("resolved"),_(0)},children:"Aliased"}),h.jsx("button",{className:`px-3 py-1 ${S==="original"?"bg-primary text-primary-foreground":"text-muted-foreground"}`,onClick:()=>{E("original"),_(0)},children:"Original"})]}),k&&h.jsx(wn,{variant:"ghost",size:"sm",onClick:$,children:"Clear filters"})]})]}),h.jsx(ke,{children:h.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:[h.jsxs("div",{children:[h.jsx("label",{className:"mb-1 block text-sm text-muted-foreground",children:"Namespace"}),h.jsx(Ar,{type:"text",placeholder:"Filter by namespace...",value:s,onChange:I=>{o(I.target.value),_(0)}})]}),h.jsxs("div",{children:[h.jsx("label",{className:"mb-1 block text-sm text-muted-foreground",children:"Result Status"}),h.jsx("select",{value:e,onChange:I=>{t(I.target.value),_(0)},className:"h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",children:aj.map(I=>h.jsx("option",{value:I,children:I||"All Results"},I))})]}),h.jsxs("div",{children:[h.jsx("label",{className:"mb-1 block text-sm text-muted-foreground",children:"Attempt Status"}),h.jsx("select",{value:n,onChange:I=>{r(I.target.value),_(0)},className:"h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",children:lj.map(I=>h.jsx("option",{value:I,children:I||"All Attempts"},I))})]}),h.jsxs("div",{children:[h.jsx("label",{className:"mb-1 block text-sm text-muted-foreground",children:"Backend"}),h.jsx("select",{value:i,onChange:I=>{a(I.target.value),_(0)},className:"h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",children:uj.map(I=>h.jsx("option",{value:I,children:I||"All Backends"},I))})]}),h.jsxs("div",{children:[h.jsx("label",{className:"mb-1 block text-sm text-muted-foreground",children:"Hostname"}),h.jsx(Ar,{type:"text",placeholder:"Filter by hostname...",value:l,onChange:I=>{u(I.target.value),_(0)}})]}),h.jsxs("div",{children:[h.jsx("label",{className:"mb-1 block text-sm text-muted-foreground",children:"User"}),h.jsx(Ar,{type:"text",placeholder:"Filter by user...",value:d,onChange:I=>{c(I.target.value),_(0)}})]}),h.jsxs("div",{children:[h.jsx("label",{htmlFor:"schema-filter",className:"mb-1 block text-sm text-muted-foreground",children:"Schema"}),h.jsx("select",{id:"schema-filter",value:f,onChange:I=>{m(I.target.value),_(0)},className:"h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",children:cj.map(I=>h.jsx("option",{value:I,children:I==="current"?"Current":I==="stale"?"Stale":"Any"},I))})]}),h.jsxs("div",{children:[h.jsx("label",{className:"mb-1 block text-sm text-muted-foreground",children:"Started After"}),h.jsx(Ar,{type:"datetime-local",value:p,onChange:I=>{x(I.target.value?I.target.value+":00":""),_(0)}})]}),h.jsxs("div",{children:[h.jsx("label",{className:"mb-1 block text-sm text-muted-foreground",children:"Started Before"}),h.jsx(Ar,{type:"datetime-local",value:w,onChange:I=>{g(I.target.value?I.target.value+":00":""),_(0)}})]}),h.jsxs("div",{className:"md:col-span-2",children:[h.jsx("label",{className:"mb-1 block text-sm text-muted-foreground",children:"Config Filter"}),h.jsx(Ar,{type:"text",placeholder:"field.path=value (e.g., model.name=gpt-4)",value:v,onChange:I=>{y(I.target.value),_(0)}})]})]})})]}),h.jsx("div",{className:"mb-4 text-sm text-muted-foreground",children:M?h.jsxs(h.Fragment,{children:["Showing ",M.experiments.length," of ",M.total," experiments"]}):"Loading..."}),L?h.jsx(be,{children:h.jsx(ke,{className:"p-8 text-center text-muted-foreground",children:"Loading experiments..."})}):P?h.jsx(be,{children:h.jsx(ke,{className:"p-8 text-center text-destructive",children:"Error loading experiments. Is the API running?"})}):(M==null?void 0:M.experiments.length)===0?h.jsx(dw,{title:"No experiments found",description:"Try adjusting your filters or create some experiments first.",icon:"🔬"}):h.jsxs(be,{className:"overflow-hidden",children:[h.jsxs(Vh,{children:[h.jsx(Wh,{children:h.jsxs(Wi,{children:[h.jsx(Ke,{className:"pl-6",children:"Class"}),h.jsx(Ke,{children:"Namespace"}),h.jsx(Ke,{children:"Hash"}),h.jsx(Ke,{children:"Result"}),h.jsx(Ke,{children:"Migration"}),h.jsx(Ke,{children:"Attempt"}),h.jsx(Ke,{children:"Backend"}),h.jsx(Ke,{children:"Host"}),h.jsx(Ke,{children:"User"}),h.jsx(Ke,{children:"Updated"})]})}),h.jsx(Kh,{children:M==null?void 0:M.experiments.map(I=>h.jsxs(Wi,{children:[h.jsx(qe,{className:"pl-6",children:h.jsx(Ue,{to:"/experiments/$namespace/$furu_hash",params:{namespace:I.namespace,furu_hash:I.furu_hash},className:"font-medium hover:text-primary",children:I.class_name})}),h.jsx(qe,{className:"max-w-xs truncate font-mono text-sm text-muted-foreground",children:I.namespace}),h.jsx(qe,{children:h.jsxs("code",{className:"rounded bg-muted px-2 py-1 font-mono text-xs text-muted-foreground",children:[I.furu_hash.slice(0,8),"..."]})}),h.jsx(qe,{children:h.jsx(sn,{status:I.result_status,type:"result"})}),h.jsx(qe,{children:I.migration_kind?h.jsx("span",{className:"text-xs rounded-full border border-amber-500/40 bg-amber-500/10 px-2 py-0.5 text-amber-300",children:I.migration_kind}):h.jsx("span",{className:"text-muted-foreground",children:"-"})}),h.jsx(qe,{children:I.attempt_status?h.jsx(sn,{status:I.attempt_status,type:"attempt"}):h.jsx("span",{className:"text-muted-foreground",children:"-"})}),h.jsx(qe,{className:"text-sm text-muted-foreground",children:I.backend||"-"}),h.jsx(qe,{className:"text-sm text-muted-foreground max-w-[150px] truncate",title:I.hostname||void 0,children:I.hostname||"-"}),h.jsx(qe,{className:"text-sm text-muted-foreground",children:I.user||"-"}),h.jsx(qe,{className:"whitespace-nowrap text-sm text-muted-foreground",children:I.updated_at?new Date(I.updated_at).toLocaleString():"-"})]},`${I.namespace}-${I.furu_hash}`))})]}),R>1&&h.jsxs(ke,{className:"flex items-center justify-between border-t py-4",children:[h.jsx(wn,{variant:"secondary",onClick:()=>_(I=>Math.max(0,I-1)),disabled:b===0,children:"Previous"}),h.jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",b+1," of ",R]}),h.jsx(wn,{variant:"secondary",onClick:()=>_(I=>Math.min(R-1,I+1)),disabled:b>=R-1,children:"Next"})]})]})]})}function Oe(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=Oe(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var fj={value:()=>{}};function Wu(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new _l(n)}function _l(e){this._=e}function hj(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",s=n.indexOf(".");if(s>=0&&(r=n.slice(s+1),n=n.slice(0,s)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}_l.prototype=Wu.prototype={constructor:_l,on:function(e,t){var n=this._,r=hj(e+"",n),s,o=-1,i=r.length;if(arguments.length<2){for(;++o<i;)if((s=(e=r[o]).type)&&(s=pj(n[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<i;)if(s=(e=r[o]).type)n[s]=_g(n[s],e.name,t);else if(t==null)for(s in n)n[s]=_g(n[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new _l(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var n=new Array(s),r=0,s,o;r<s;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],r=0,s=o.length;r<s;++r)o[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],s=0,o=r.length;s<o;++s)r[s].value.apply(t,n)}};function pj(e,t){for(var n=0,r=e.length,s;n<r;++n)if((s=e[n]).name===t)return s.value}function _g(e,t,n){for(var r=0,s=e.length;r<s;++r)if(e[r].name===t){e[r]=fj,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var mf="http://www.w3.org/1999/xhtml";const bg={svg:"http://www.w3.org/2000/svg",xhtml:mf,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ku(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),bg.hasOwnProperty(t)?{space:bg[t],local:e}:e}function mj(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===mf&&t.documentElement.namespaceURI===mf?t.createElement(e):t.createElementNS(n,e)}}function gj(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function fw(e){var t=Ku(e);return(t.local?gj:mj)(t)}function yj(){}function qh(e){return e==null?yj:function(){return this.querySelector(e)}}function xj(e){typeof e!="function"&&(e=qh(e));for(var t=this._groups,n=t.length,r=new Array(n),s=0;s<n;++s)for(var o=t[s],i=o.length,a=r[s]=new Array(i),l,u,d=0;d<i;++d)(l=o[d])&&(u=e.call(l,l.__data__,d,o))&&("__data__"in l&&(u.__data__=l.__data__),a[d]=u);return new Mt(r,this._parents)}function vj(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function wj(){return[]}function hw(e){return e==null?wj:function(){return this.querySelectorAll(e)}}function Sj(e){return function(){return vj(e.apply(this,arguments))}}function _j(e){typeof e=="function"?e=Sj(e):e=hw(e);for(var t=this._groups,n=t.length,r=[],s=[],o=0;o<n;++o)for(var i=t[o],a=i.length,l,u=0;u<a;++u)(l=i[u])&&(r.push(e.call(l,l.__data__,u,i)),s.push(l));return new Mt(r,s)}function pw(e){return function(){return this.matches(e)}}function mw(e){return function(t){return t.matches(e)}}var bj=Array.prototype.find;function Ej(e){return function(){return bj.call(this.children,e)}}function Cj(){return this.firstElementChild}function Nj(e){return this.select(e==null?Cj:Ej(typeof e=="function"?e:mw(e)))}var kj=Array.prototype.filter;function Pj(){return Array.from(this.children)}function Rj(e){return function(){return kj.call(this.children,e)}}function jj(e){return this.selectAll(e==null?Pj:Rj(typeof e=="function"?e:mw(e)))}function Mj(e){typeof e!="function"&&(e=pw(e));for(var t=this._groups,n=t.length,r=new Array(n),s=0;s<n;++s)for(var o=t[s],i=o.length,a=r[s]=[],l,u=0;u<i;++u)(l=o[u])&&e.call(l,l.__data__,u,o)&&a.push(l);return new Mt(r,this._parents)}function gw(e){return new Array(e.length)}function Tj(){return new Mt(this._enter||this._groups.map(gw),this._parents)}function uu(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}uu.prototype={constructor:uu,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Lj(e){return function(){return e}}function Ij(e,t,n,r,s,o){for(var i=0,a,l=t.length,u=o.length;i<u;++i)(a=t[i])?(a.__data__=o[i],r[i]=a):n[i]=new uu(e,o[i]);for(;i<l;++i)(a=t[i])&&(s[i]=a)}function Aj(e,t,n,r,s,o,i){var a,l,u=new Map,d=t.length,c=o.length,f=new Array(d),m;for(a=0;a<d;++a)(l=t[a])&&(f[a]=m=i.call(l,l.__data__,a,t)+"",u.has(m)?s[a]=l:u.set(m,l));for(a=0;a<c;++a)m=i.call(e,o[a],a,o)+"",(l=u.get(m))?(r[a]=l,l.__data__=o[a],u.delete(m)):n[a]=new uu(e,o[a]);for(a=0;a<d;++a)(l=t[a])&&u.get(f[a])===l&&(s[a]=l)}function Oj(e){return e.__data__}function Fj(e,t){if(!arguments.length)return Array.from(this,Oj);var n=t?Aj:Ij,r=this._parents,s=this._groups;typeof e!="function"&&(e=Lj(e));for(var o=s.length,i=new Array(o),a=new Array(o),l=new Array(o),u=0;u<o;++u){var d=r[u],c=s[u],f=c.length,m=Dj(e.call(d,d&&d.__data__,u,r)),p=m.length,x=a[u]=new Array(p),w=i[u]=new Array(p),g=l[u]=new Array(f);n(d,c,x,w,g,m,t);for(var v=0,y=0,S,E;v<p;++v)if(S=x[v]){for(v>=y&&(y=v+1);!(E=w[y])&&++y<p;);S._next=E||null}}return i=new Mt(i,r),i._enter=a,i._exit=l,i}function Dj(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function zj(){return new Mt(this._exit||this._groups.map(gw),this._parents)}function $j(e,t,n){var r=this.enter(),s=this,o=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),n==null?o.remove():n(o),r&&s?r.merge(s).order():s}function Bj(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,s=n.length,o=r.length,i=Math.min(s,o),a=new Array(s),l=0;l<i;++l)for(var u=n[l],d=r[l],c=u.length,f=a[l]=new Array(c),m,p=0;p<c;++p)(m=u[p]||d[p])&&(f[p]=m);for(;l<s;++l)a[l]=n[l];return new Mt(a,this._parents)}function Hj(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],s=r.length-1,o=r[s],i;--s>=0;)(i=r[s])&&(o&&i.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(i,o),o=i);return this}function Uj(e){e||(e=Vj);function t(c,f){return c&&f?e(c.__data__,f.__data__):!c-!f}for(var n=this._groups,r=n.length,s=new Array(r),o=0;o<r;++o){for(var i=n[o],a=i.length,l=s[o]=new Array(a),u,d=0;d<a;++d)(u=i[d])&&(l[d]=u);l.sort(t)}return new Mt(s,this._parents).order()}function Vj(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Wj(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Kj(){return Array.from(this)}function qj(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],s=0,o=r.length;s<o;++s){var i=r[s];if(i)return i}return null}function Qj(){let e=0;for(const t of this)++e;return e}function Gj(){return!this.node()}function Xj(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var s=t[n],o=0,i=s.length,a;o<i;++o)(a=s[o])&&e.call(a,a.__data__,o,s);return this}function Yj(e){return function(){this.removeAttribute(e)}}function Zj(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Jj(e,t){return function(){this.setAttribute(e,t)}}function e2(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function t2(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function n2(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function r2(e,t){var n=Ku(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?Zj:Yj:typeof t=="function"?n.local?n2:t2:n.local?e2:Jj)(n,t))}function yw(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function s2(e){return function(){this.style.removeProperty(e)}}function o2(e,t,n){return function(){this.style.setProperty(e,t,n)}}function i2(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function a2(e,t,n){return arguments.length>1?this.each((t==null?s2:typeof t=="function"?i2:o2)(e,t,n??"")):Eo(this.node(),e)}function Eo(e,t){return e.style.getPropertyValue(t)||yw(e).getComputedStyle(e,null).getPropertyValue(t)}function l2(e){return function(){delete this[e]}}function u2(e,t){return function(){this[e]=t}}function c2(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function d2(e,t){return arguments.length>1?this.each((t==null?l2:typeof t=="function"?c2:u2)(e,t)):this.node()[e]}function xw(e){return e.trim().split(/^|\s+/)}function Qh(e){return e.classList||new vw(e)}function vw(e){this._node=e,this._names=xw(e.getAttribute("class")||"")}vw.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function ww(e,t){for(var n=Qh(e),r=-1,s=t.length;++r<s;)n.add(t[r])}function Sw(e,t){for(var n=Qh(e),r=-1,s=t.length;++r<s;)n.remove(t[r])}function f2(e){return function(){ww(this,e)}}function h2(e){return function(){Sw(this,e)}}function p2(e,t){return function(){(t.apply(this,arguments)?ww:Sw)(this,e)}}function m2(e,t){var n=xw(e+"");if(arguments.length<2){for(var r=Qh(this.node()),s=-1,o=n.length;++s<o;)if(!r.contains(n[s]))return!1;return!0}return this.each((typeof t=="function"?p2:t?f2:h2)(n,t))}function g2(){this.textContent=""}function y2(e){return function(){this.textContent=e}}function x2(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function v2(e){return arguments.length?this.each(e==null?g2:(typeof e=="function"?x2:y2)(e)):this.node().textContent}function w2(){this.innerHTML=""}function S2(e){return function(){this.innerHTML=e}}function _2(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function b2(e){return arguments.length?this.each(e==null?w2:(typeof e=="function"?_2:S2)(e)):this.node().innerHTML}function E2(){this.nextSibling&&this.parentNode.appendChild(this)}function C2(){return this.each(E2)}function N2(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function k2(){return this.each(N2)}function P2(e){var t=typeof e=="function"?e:fw(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function R2(){return null}function j2(e,t){var n=typeof e=="function"?e:fw(e),r=t==null?R2:typeof t=="function"?t:qh(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function M2(){var e=this.parentNode;e&&e.removeChild(this)}function T2(){return this.each(M2)}function L2(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function I2(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function A2(e){return this.select(e?I2:L2)}function O2(e){return arguments.length?this.property("__data__",e):this.node().__data__}function F2(e){return function(t){e.call(this,t,this.__data__)}}function D2(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function z2(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,s=t.length,o;n<s;++n)o=t[n],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++r]=o;++r?t.length=r:delete this.__on}}}function $2(e,t,n){return function(){var r=this.__on,s,o=F2(t);if(r){for(var i=0,a=r.length;i<a;++i)if((s=r[i]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=o,s.options=n),s.value=t;return}}this.addEventListener(e.type,o,n),s={type:e.type,name:e.name,value:t,listener:o,options:n},r?r.push(s):this.__on=[s]}}function B2(e,t,n){var r=D2(e+""),s,o=r.length,i;if(arguments.length<2){var a=this.node().__on;if(a){for(var l=0,u=a.length,d;l<u;++l)for(s=0,d=a[l];s<o;++s)if((i=r[s]).type===d.type&&i.name===d.name)return d.value}return}for(a=t?$2:z2,s=0;s<o;++s)this.each(a(r[s],t,n));return this}function _w(e,t,n){var r=yw(e),s=r.CustomEvent;typeof s=="function"?s=new s(t,n):(s=r.document.createEvent("Event"),n?(s.initEvent(t,n.bubbles,n.cancelable),s.detail=n.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function H2(e,t){return function(){return _w(this,e,t)}}function U2(e,t){return function(){return _w(this,e,t.apply(this,arguments))}}function V2(e,t){return this.each((typeof t=="function"?U2:H2)(e,t))}function*W2(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],s=0,o=r.length,i;s<o;++s)(i=r[s])&&(yield i)}var bw=[null];function Mt(e,t){this._groups=e,this._parents=t}function xa(){return new Mt([[document.documentElement]],bw)}function K2(){return this}Mt.prototype=xa.prototype={constructor:Mt,select:xj,selectAll:_j,selectChild:Nj,selectChildren:jj,filter:Mj,data:Fj,enter:Tj,exit:zj,join:$j,merge:Bj,selection:K2,order:Hj,sort:Uj,call:Wj,nodes:Kj,node:qj,size:Qj,empty:Gj,each:Xj,attr:r2,style:a2,property:d2,classed:m2,text:v2,html:b2,raise:C2,lower:k2,append:P2,insert:j2,remove:T2,clone:A2,datum:O2,on:B2,dispatch:V2,[Symbol.iterator]:W2};function Nt(e){return typeof e=="string"?new Mt([[document.querySelector(e)]],[document.documentElement]):new Mt([[e]],bw)}function q2(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Yt(e,t){if(e=q2(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var s=t.getBoundingClientRect();return[e.clientX-s.left-t.clientLeft,e.clientY-s.top-t.clientTop]}}return[e.pageX,e.pageY]}const Q2={passive:!1},Ki={capture:!0,passive:!1};function Wc(e){e.stopImmediatePropagation()}function Ys(e){e.preventDefault(),e.stopImmediatePropagation()}function Ew(e){var t=e.document.documentElement,n=Nt(e).on("dragstart.drag",Ys,Ki);"onselectstart"in t?n.on("selectstart.drag",Ys,Ki):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Cw(e,t){var n=e.document.documentElement,r=Nt(e).on("dragstart.drag",null);t&&(r.on("click.drag",Ys,Ki),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Xa=e=>()=>e;function gf(e,{sourceEvent:t,subject:n,target:r,identifier:s,active:o,x:i,y:a,dx:l,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:s,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:i,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}gf.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function G2(e){return!e.ctrlKey&&!e.button}function X2(){return this.parentNode}function Y2(e,t){return t??{x:e.x,y:e.y}}function Z2(){return navigator.maxTouchPoints||"ontouchstart"in this}function Nw(){var e=G2,t=X2,n=Y2,r=Z2,s={},o=Wu("start","drag","end"),i=0,a,l,u,d,c=0;function f(S){S.on("mousedown.drag",m).filter(r).on("touchstart.drag",w).on("touchmove.drag",g,Q2).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(S,E){if(!(d||!e.call(this,S,E))){var b=y(this,t.call(this,S,E),S,E,"mouse");b&&(Nt(S.view).on("mousemove.drag",p,Ki).on("mouseup.drag",x,Ki),Ew(S.view),Wc(S),u=!1,a=S.clientX,l=S.clientY,b("start",S))}}function p(S){if(Ys(S),!u){var E=S.clientX-a,b=S.clientY-l;u=E*E+b*b>c}s.mouse("drag",S)}function x(S){Nt(S.view).on("mousemove.drag mouseup.drag",null),Cw(S.view,u),Ys(S),s.mouse("end",S)}function w(S,E){if(e.call(this,S,E)){var b=S.changedTouches,_=t.call(this,S,E),C=b.length,M,L;for(M=0;M<C;++M)(L=y(this,_,S,E,b[M].identifier,b[M]))&&(Wc(S),L("start",S,b[M]))}}function g(S){var E=S.changedTouches,b=E.length,_,C;for(_=0;_<b;++_)(C=s[E[_].identifier])&&(Ys(S),C("drag",S,E[_]))}function v(S){var E=S.changedTouches,b=E.length,_,C;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),_=0;_<b;++_)(C=s[E[_].identifier])&&(Wc(S),C("end",S,E[_]))}function y(S,E,b,_,C,M){var L=o.copy(),P=Yt(M||b,E),R,$,k;if((k=n.call(S,new gf("beforestart",{sourceEvent:b,target:f,identifier:C,active:i,x:P[0],y:P[1],dx:0,dy:0,dispatch:L}),_))!=null)return R=k.x-P[0]||0,$=k.y-P[1]||0,function I(A,F,N){var T=P,D;switch(A){case"start":s[C]=I,D=i++;break;case"end":delete s[C],--i;case"drag":P=Yt(N||F,E),D=i;break}L.call(A,S,new gf(A,{sourceEvent:F,subject:k,target:f,identifier:C,active:D,x:P[0]+R,y:P[1]+$,dx:P[0]-T[0],dy:P[1]-T[1],dispatch:L}),_)}}return f.filter=function(S){return arguments.length?(e=typeof S=="function"?S:Xa(!!S),f):e},f.container=function(S){return arguments.length?(t=typeof S=="function"?S:Xa(S),f):t},f.subject=function(S){return arguments.length?(n=typeof S=="function"?S:Xa(S),f):n},f.touchable=function(S){return arguments.length?(r=typeof S=="function"?S:Xa(!!S),f):r},f.on=function(){var S=o.on.apply(o,arguments);return S===o?f:S},f.clickDistance=function(S){return arguments.length?(c=(S=+S)*S,f):Math.sqrt(c)},f}function Gh(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function kw(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function va(){}var qi=.7,cu=1/qi,Zs="\\s*([+-]?\\d+)\\s*",Qi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Sn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",J2=/^#([0-9a-f]{3,8})$/,eM=new RegExp(`^rgb\\(${Zs},${Zs},${Zs}\\)$`),tM=new RegExp(`^rgb\\(${Sn},${Sn},${Sn}\\)$`),nM=new RegExp(`^rgba\\(${Zs},${Zs},${Zs},${Qi}\\)$`),rM=new RegExp(`^rgba\\(${Sn},${Sn},${Sn},${Qi}\\)$`),sM=new RegExp(`^hsl\\(${Qi},${Sn},${Sn}\\)$`),oM=new RegExp(`^hsla\\(${Qi},${Sn},${Sn},${Qi}\\)$`),Eg={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};Gh(va,xs,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Cg,formatHex:Cg,formatHex8:iM,formatHsl:aM,formatRgb:Ng,toString:Ng});function Cg(){return this.rgb().formatHex()}function iM(){return this.rgb().formatHex8()}function aM(){return Pw(this).formatHsl()}function Ng(){return this.rgb().formatRgb()}function xs(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=J2.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?kg(t):n===3?new yt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Ya(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Ya(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=eM.exec(e))?new yt(t[1],t[2],t[3],1):(t=tM.exec(e))?new yt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=nM.exec(e))?Ya(t[1],t[2],t[3],t[4]):(t=rM.exec(e))?Ya(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=sM.exec(e))?jg(t[1],t[2]/100,t[3]/100,1):(t=oM.exec(e))?jg(t[1],t[2]/100,t[3]/100,t[4]):Eg.hasOwnProperty(e)?kg(Eg[e]):e==="transparent"?new yt(NaN,NaN,NaN,0):null}function kg(e){return new yt(e>>16&255,e>>8&255,e&255,1)}function Ya(e,t,n,r){return r<=0&&(e=t=n=NaN),new yt(e,t,n,r)}function lM(e){return e instanceof va||(e=xs(e)),e?(e=e.rgb(),new yt(e.r,e.g,e.b,e.opacity)):new yt}function yf(e,t,n,r){return arguments.length===1?lM(e):new yt(e,t,n,r??1)}function yt(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Gh(yt,yf,kw(va,{brighter(e){return e=e==null?cu:Math.pow(cu,e),new yt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?qi:Math.pow(qi,e),new yt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new yt(is(this.r),is(this.g),is(this.b),du(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:Pg,formatHex:Pg,formatHex8:uM,formatRgb:Rg,toString:Rg}));function Pg(){return`#${Ur(this.r)}${Ur(this.g)}${Ur(this.b)}`}function uM(){return`#${Ur(this.r)}${Ur(this.g)}${Ur(this.b)}${Ur((isNaN(this.opacity)?1:this.opacity)*255)}`}function Rg(){const e=du(this.opacity);return`${e===1?"rgb(":"rgba("}${is(this.r)}, ${is(this.g)}, ${is(this.b)}${e===1?")":`, ${e})`}`}function du(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function is(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ur(e){return e=is(e),(e<16?"0":"")+e.toString(16)}function jg(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Jt(e,t,n,r)}function Pw(e){if(e instanceof Jt)return new Jt(e.h,e.s,e.l,e.opacity);if(e instanceof va||(e=xs(e)),!e)return new Jt;if(e instanceof Jt)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,s=Math.min(t,n,r),o=Math.max(t,n,r),i=NaN,a=o-s,l=(o+s)/2;return a?(t===o?i=(n-r)/a+(n<r)*6:n===o?i=(r-t)/a+2:i=(t-n)/a+4,a/=l<.5?o+s:2-o-s,i*=60):a=l>0&&l<1?0:i,new Jt(i,a,l,e.opacity)}function cM(e,t,n,r){return arguments.length===1?Pw(e):new Jt(e,t,n,r??1)}function Jt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Gh(Jt,cM,kw(va,{brighter(e){return e=e==null?cu:Math.pow(cu,e),new Jt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?qi:Math.pow(qi,e),new Jt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,s=2*n-r;return new yt(Kc(e>=240?e-240:e+120,s,r),Kc(e,s,r),Kc(e<120?e+240:e-120,s,r),this.opacity)},clamp(){return new Jt(Mg(this.h),Za(this.s),Za(this.l),du(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=du(this.opacity);return`${e===1?"hsl(":"hsla("}${Mg(this.h)}, ${Za(this.s)*100}%, ${Za(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Mg(e){return e=(e||0)%360,e<0?e+360:e}function Za(e){return Math.max(0,Math.min(1,e||0))}function Kc(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Xh=e=>()=>e;function dM(e,t){return function(n){return e+n*t}}function fM(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function hM(e){return(e=+e)==1?Rw:function(t,n){return n-t?fM(t,n,e):Xh(isNaN(t)?n:t)}}function Rw(e,t){var n=t-e;return n?dM(e,n):Xh(isNaN(e)?t:e)}const fu=function e(t){var n=hM(t);function r(s,o){var i=n((s=yf(s)).r,(o=yf(o)).r),a=n(s.g,o.g),l=n(s.b,o.b),u=Rw(s.opacity,o.opacity);return function(d){return s.r=i(d),s.g=a(d),s.b=l(d),s.opacity=u(d),s+""}}return r.gamma=e,r}(1);function pM(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),s;return function(o){for(s=0;s<n;++s)r[s]=e[s]*(1-o)+t[s]*o;return r}}function mM(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function gM(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,s=new Array(r),o=new Array(n),i;for(i=0;i<r;++i)s[i]=bi(e[i],t[i]);for(;i<n;++i)o[i]=t[i];return function(a){for(i=0;i<r;++i)o[i]=s[i](a);return o}}function yM(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function gn(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function xM(e,t){var n={},r={},s;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(s in t)s in e?n[s]=bi(e[s],t[s]):r[s]=t[s];return function(o){for(s in n)r[s]=n[s](o);return r}}var xf=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,qc=new RegExp(xf.source,"g");function vM(e){return function(){return e}}function wM(e){return function(t){return e(t)+""}}function jw(e,t){var n=xf.lastIndex=qc.lastIndex=0,r,s,o,i=-1,a=[],l=[];for(e=e+"",t=t+"";(r=xf.exec(e))&&(s=qc.exec(t));)(o=s.index)>n&&(o=t.slice(n,o),a[i]?a[i]+=o:a[++i]=o),(r=r[0])===(s=s[0])?a[i]?a[i]+=s:a[++i]=s:(a[++i]=null,l.push({i,x:gn(r,s)})),n=qc.lastIndex;return n<t.length&&(o=t.slice(n),a[i]?a[i]+=o:a[++i]=o),a.length<2?l[0]?wM(l[0].x):vM(t):(t=l.length,function(u){for(var d=0,c;d<t;++d)a[(c=l[d]).i]=c.x(u);return a.join("")})}function bi(e,t){var n=typeof t,r;return t==null||n==="boolean"?Xh(t):(n==="number"?gn:n==="string"?(r=xs(t))?(t=r,fu):jw:t instanceof xs?fu:t instanceof Date?yM:mM(t)?pM:Array.isArray(t)?gM:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?xM:gn)(e,t)}var Tg=180/Math.PI,vf={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Mw(e,t,n,r,s,o){var i,a,l;return(i=Math.sqrt(e*e+t*t))&&(e/=i,t/=i),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,l/=a),e*r<t*n&&(e=-e,t=-t,l=-l,i=-i),{translateX:s,translateY:o,rotate:Math.atan2(t,e)*Tg,skewX:Math.atan(l)*Tg,scaleX:i,scaleY:a}}var Ja;function SM(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?vf:Mw(t.a,t.b,t.c,t.d,t.e,t.f)}function _M(e){return e==null||(Ja||(Ja=document.createElementNS("http://www.w3.org/2000/svg","g")),Ja.setAttribute("transform",e),!(e=Ja.transform.baseVal.consolidate()))?vf:(e=e.matrix,Mw(e.a,e.b,e.c,e.d,e.e,e.f))}function Tw(e,t,n,r){function s(u){return u.length?u.pop()+" ":""}function o(u,d,c,f,m,p){if(u!==c||d!==f){var x=m.push("translate(",null,t,null,n);p.push({i:x-4,x:gn(u,c)},{i:x-2,x:gn(d,f)})}else(c||f)&&m.push("translate("+c+t+f+n)}function i(u,d,c,f){u!==d?(u-d>180?d+=360:d-u>180&&(u+=360),f.push({i:c.push(s(c)+"rotate(",null,r)-2,x:gn(u,d)})):d&&c.push(s(c)+"rotate("+d+r)}function a(u,d,c,f){u!==d?f.push({i:c.push(s(c)+"skewX(",null,r)-2,x:gn(u,d)}):d&&c.push(s(c)+"skewX("+d+r)}function l(u,d,c,f,m,p){if(u!==c||d!==f){var x=m.push(s(m)+"scale(",null,",",null,")");p.push({i:x-4,x:gn(u,c)},{i:x-2,x:gn(d,f)})}else(c!==1||f!==1)&&m.push(s(m)+"scale("+c+","+f+")")}return function(u,d){var c=[],f=[];return u=e(u),d=e(d),o(u.translateX,u.translateY,d.translateX,d.translateY,c,f),i(u.rotate,d.rotate,c,f),a(u.skewX,d.skewX,c,f),l(u.scaleX,u.scaleY,d.scaleX,d.scaleY,c,f),u=d=null,function(m){for(var p=-1,x=f.length,w;++p<x;)c[(w=f[p]).i]=w.x(m);return c.join("")}}}var bM=Tw(SM,"px, ","px)","deg)"),EM=Tw(_M,", ",")",")"),CM=1e-12;function Lg(e){return((e=Math.exp(e))+1/e)/2}function NM(e){return((e=Math.exp(e))-1/e)/2}function kM(e){return((e=Math.exp(2*e))-1)/(e+1)}const bl=function e(t,n,r){function s(o,i){var a=o[0],l=o[1],u=o[2],d=i[0],c=i[1],f=i[2],m=d-a,p=c-l,x=m*m+p*p,w,g;if(x<CM)g=Math.log(f/u)/t,w=function(_){return[a+_*m,l+_*p,u*Math.exp(t*_*g)]};else{var v=Math.sqrt(x),y=(f*f-u*u+r*x)/(2*u*n*v),S=(f*f-u*u-r*x)/(2*f*n*v),E=Math.log(Math.sqrt(y*y+1)-y),b=Math.log(Math.sqrt(S*S+1)-S);g=(b-E)/t,w=function(_){var C=_*g,M=Lg(E),L=u/(n*v)*(M*kM(t*C+E)-NM(E));return[a+L*m,l+L*p,u*M/Lg(t*C+E)]}}return w.duration=g*1e3*t/Math.SQRT2,w}return s.rho=function(o){var i=Math.max(.001,+o),a=i*i,l=a*a;return e(i,a,l)},s}(Math.SQRT2,2,4);var Co=0,ci=0,ni=0,Lw=1e3,hu,di,pu=0,vs=0,qu=0,Gi=typeof performance=="object"&&performance.now?performance:Date,Iw=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Yh(){return vs||(Iw(PM),vs=Gi.now()+qu)}function PM(){vs=0}function mu(){this._call=this._time=this._next=null}mu.prototype=Aw.prototype={constructor:mu,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Yh():+n)+(t==null?0:+t),!this._next&&di!==this&&(di?di._next=this:hu=this,di=this),this._call=e,this._time=n,wf()},stop:function(){this._call&&(this._call=null,this._time=1/0,wf())}};function Aw(e,t,n){var r=new mu;return r.restart(e,t,n),r}function RM(){Yh(),++Co;for(var e=hu,t;e;)(t=vs-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Co}function Ig(){vs=(pu=Gi.now())+qu,Co=ci=0;try{RM()}finally{Co=0,MM(),vs=0}}function jM(){var e=Gi.now(),t=e-pu;t>Lw&&(qu-=t,pu=e)}function MM(){for(var e,t=hu,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:hu=n);di=e,wf(r)}function wf(e){if(!Co){ci&&(ci=clearTimeout(ci));var t=e-vs;t>24?(e<1/0&&(ci=setTimeout(Ig,e-Gi.now()-qu)),ni&&(ni=clearInterval(ni))):(ni||(pu=Gi.now(),ni=setInterval(jM,Lw)),Co=1,Iw(Ig))}}function Ag(e,t,n){var r=new mu;return t=t==null?0:+t,r.restart(s=>{r.stop(),e(s+t)},t,n),r}var TM=Wu("start","end","cancel","interrupt"),LM=[],Ow=0,Og=1,Sf=2,El=3,Fg=4,_f=5,Cl=6;function Qu(e,t,n,r,s,o){var i=e.__transition;if(!i)e.__transition={};else if(n in i)return;IM(e,n,{name:t,index:r,group:s,on:TM,tween:LM,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Ow})}function Zh(e,t){var n=ln(e,t);if(n.state>Ow)throw new Error("too late; already scheduled");return n}function En(e,t){var n=ln(e,t);if(n.state>El)throw new Error("too late; already running");return n}function ln(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function IM(e,t,n){var r=e.__transition,s;r[t]=n,n.timer=Aw(o,0,n.time);function o(u){n.state=Og,n.timer.restart(i,n.delay,n.time),n.delay<=u&&i(u-n.delay)}function i(u){var d,c,f,m;if(n.state!==Og)return l();for(d in r)if(m=r[d],m.name===n.name){if(m.state===El)return Ag(i);m.state===Fg?(m.state=Cl,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete r[d]):+d<t&&(m.state=Cl,m.timer.stop(),m.on.call("cancel",e,e.__data__,m.index,m.group),delete r[d])}if(Ag(function(){n.state===El&&(n.state=Fg,n.timer.restart(a,n.delay,n.time),a(u))}),n.state=Sf,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Sf){for(n.state=El,s=new Array(f=n.tween.length),d=0,c=-1;d<f;++d)(m=n.tween[d].value.call(e,e.__data__,n.index,n.group))&&(s[++c]=m);s.length=c+1}}function a(u){for(var d=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(l),n.state=_f,1),c=-1,f=s.length;++c<f;)s[c].call(e,d);n.state===_f&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=Cl,n.timer.stop(),delete r[t];for(var u in r)return;delete e.__transition}}function Nl(e,t){var n=e.__transition,r,s,o=!0,i;if(n){t=t==null?null:t+"";for(i in n){if((r=n[i]).name!==t){o=!1;continue}s=r.state>Sf&&r.state<_f,r.state=Cl,r.timer.stop(),r.on.call(s?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[i]}o&&delete e.__transition}}function AM(e){return this.each(function(){Nl(this,e)})}function OM(e,t){var n,r;return function(){var s=En(this,e),o=s.tween;if(o!==n){r=n=o;for(var i=0,a=r.length;i<a;++i)if(r[i].name===t){r=r.slice(),r.splice(i,1);break}}s.tween=r}}function FM(e,t,n){var r,s;if(typeof n!="function")throw new Error;return function(){var o=En(this,e),i=o.tween;if(i!==r){s=(r=i).slice();for(var a={name:t,value:n},l=0,u=s.length;l<u;++l)if(s[l].name===t){s[l]=a;break}l===u&&s.push(a)}o.tween=s}}function DM(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=ln(this.node(),n).tween,s=0,o=r.length,i;s<o;++s)if((i=r[s]).name===e)return i.value;return null}return this.each((t==null?OM:FM)(n,e,t))}function Jh(e,t,n){var r=e._id;return e.each(function(){var s=En(this,r);(s.value||(s.value={}))[t]=n.apply(this,arguments)}),function(s){return ln(s,r).value[t]}}function Fw(e,t){var n;return(typeof t=="number"?gn:t instanceof xs?fu:(n=xs(t))?(t=n,fu):jw)(e,t)}function zM(e){return function(){this.removeAttribute(e)}}function $M(e){return function(){this.removeAttributeNS(e.space,e.local)}}function BM(e,t,n){var r,s=n+"",o;return function(){var i=this.getAttribute(e);return i===s?null:i===r?o:o=t(r=i,n)}}function HM(e,t,n){var r,s=n+"",o;return function(){var i=this.getAttributeNS(e.space,e.local);return i===s?null:i===r?o:o=t(r=i,n)}}function UM(e,t,n){var r,s,o;return function(){var i,a=n(this),l;return a==null?void this.removeAttribute(e):(i=this.getAttribute(e),l=a+"",i===l?null:i===r&&l===s?o:(s=l,o=t(r=i,a)))}}function VM(e,t,n){var r,s,o;return function(){var i,a=n(this),l;return a==null?void this.removeAttributeNS(e.space,e.local):(i=this.getAttributeNS(e.space,e.local),l=a+"",i===l?null:i===r&&l===s?o:(s=l,o=t(r=i,a)))}}function WM(e,t){var n=Ku(e),r=n==="transform"?EM:Fw;return this.attrTween(e,typeof t=="function"?(n.local?VM:UM)(n,r,Jh(this,"attr."+e,t)):t==null?(n.local?$M:zM)(n):(n.local?HM:BM)(n,r,t))}function KM(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function qM(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function QM(e,t){var n,r;function s(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&qM(e,o)),n}return s._value=t,s}function GM(e,t){var n,r;function s(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&KM(e,o)),n}return s._value=t,s}function XM(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=Ku(e);return this.tween(n,(r.local?QM:GM)(r,t))}function YM(e,t){return function(){Zh(this,e).delay=+t.apply(this,arguments)}}function ZM(e,t){return t=+t,function(){Zh(this,e).delay=t}}function JM(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?YM:ZM)(t,e)):ln(this.node(),t).delay}function eT(e,t){return function(){En(this,e).duration=+t.apply(this,arguments)}}function tT(e,t){return t=+t,function(){En(this,e).duration=t}}function nT(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?eT:tT)(t,e)):ln(this.node(),t).duration}function rT(e,t){if(typeof t!="function")throw new Error;return function(){En(this,e).ease=t}}function sT(e){var t=this._id;return arguments.length?this.each(rT(t,e)):ln(this.node(),t).ease}function oT(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;En(this,e).ease=n}}function iT(e){if(typeof e!="function")throw new Error;return this.each(oT(this._id,e))}function aT(e){typeof e!="function"&&(e=pw(e));for(var t=this._groups,n=t.length,r=new Array(n),s=0;s<n;++s)for(var o=t[s],i=o.length,a=r[s]=[],l,u=0;u<i;++u)(l=o[u])&&e.call(l,l.__data__,u,o)&&a.push(l);return new Hn(r,this._parents,this._name,this._id)}function lT(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,s=n.length,o=Math.min(r,s),i=new Array(r),a=0;a<o;++a)for(var l=t[a],u=n[a],d=l.length,c=i[a]=new Array(d),f,m=0;m<d;++m)(f=l[m]||u[m])&&(c[m]=f);for(;a<r;++a)i[a]=t[a];return new Hn(i,this._parents,this._name,this._id)}function uT(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function cT(e,t,n){var r,s,o=uT(t)?Zh:En;return function(){var i=o(this,e),a=i.on;a!==r&&(s=(r=a).copy()).on(t,n),i.on=s}}function dT(e,t){var n=this._id;return arguments.length<2?ln(this.node(),n).on.on(e):this.each(cT(n,e,t))}function fT(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function hT(){return this.on("end.remove",fT(this._id))}function pT(e){var t=this._name,n=this._id;typeof e!="function"&&(e=qh(e));for(var r=this._groups,s=r.length,o=new Array(s),i=0;i<s;++i)for(var a=r[i],l=a.length,u=o[i]=new Array(l),d,c,f=0;f<l;++f)(d=a[f])&&(c=e.call(d,d.__data__,f,a))&&("__data__"in d&&(c.__data__=d.__data__),u[f]=c,Qu(u[f],t,n,f,u,ln(d,n)));return new Hn(o,this._parents,t,n)}function mT(e){var t=this._name,n=this._id;typeof e!="function"&&(e=hw(e));for(var r=this._groups,s=r.length,o=[],i=[],a=0;a<s;++a)for(var l=r[a],u=l.length,d,c=0;c<u;++c)if(d=l[c]){for(var f=e.call(d,d.__data__,c,l),m,p=ln(d,n),x=0,w=f.length;x<w;++x)(m=f[x])&&Qu(m,t,n,x,f,p);o.push(f),i.push(d)}return new Hn(o,i,t,n)}var gT=xa.prototype.constructor;function yT(){return new gT(this._groups,this._parents)}function xT(e,t){var n,r,s;return function(){var o=Eo(this,e),i=(this.style.removeProperty(e),Eo(this,e));return o===i?null:o===n&&i===r?s:s=t(n=o,r=i)}}function Dw(e){return function(){this.style.removeProperty(e)}}function vT(e,t,n){var r,s=n+"",o;return function(){var i=Eo(this,e);return i===s?null:i===r?o:o=t(r=i,n)}}function wT(e,t,n){var r,s,o;return function(){var i=Eo(this,e),a=n(this),l=a+"";return a==null&&(l=a=(this.style.removeProperty(e),Eo(this,e))),i===l?null:i===r&&l===s?o:(s=l,o=t(r=i,a))}}function ST(e,t){var n,r,s,o="style."+t,i="end."+o,a;return function(){var l=En(this,e),u=l.on,d=l.value[o]==null?a||(a=Dw(t)):void 0;(u!==n||s!==d)&&(r=(n=u).copy()).on(i,s=d),l.on=r}}function _T(e,t,n){var r=(e+="")=="transform"?bM:Fw;return t==null?this.styleTween(e,xT(e,r)).on("end.style."+e,Dw(e)):typeof t=="function"?this.styleTween(e,wT(e,r,Jh(this,"style."+e,t))).each(ST(this._id,e)):this.styleTween(e,vT(e,r,t),n).on("end.style."+e,null)}function bT(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function ET(e,t,n){var r,s;function o(){var i=t.apply(this,arguments);return i!==s&&(r=(s=i)&&bT(e,i,n)),r}return o._value=t,o}function CT(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,ET(e,t,n??""))}function NT(e){return function(){this.textContent=e}}function kT(e){return function(){var t=e(this);this.textContent=t??""}}function PT(e){return this.tween("text",typeof e=="function"?kT(Jh(this,"text",e)):NT(e==null?"":e+""))}function RT(e){return function(t){this.textContent=e.call(this,t)}}function jT(e){var t,n;function r(){var s=e.apply(this,arguments);return s!==n&&(t=(n=s)&&RT(s)),t}return r._value=e,r}function MT(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,jT(e))}function TT(){for(var e=this._name,t=this._id,n=zw(),r=this._groups,s=r.length,o=0;o<s;++o)for(var i=r[o],a=i.length,l,u=0;u<a;++u)if(l=i[u]){var d=ln(l,t);Qu(l,e,n,u,i,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new Hn(r,this._parents,e,n)}function LT(){var e,t,n=this,r=n._id,s=n.size();return new Promise(function(o,i){var a={value:i},l={value:function(){--s===0&&o()}};n.each(function(){var u=En(this,r),d=u.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(a),t._.interrupt.push(a),t._.end.push(l)),u.on=t}),s===0&&o()})}var IT=0;function Hn(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function zw(){return++IT}var kn=xa.prototype;Hn.prototype={constructor:Hn,select:pT,selectAll:mT,selectChild:kn.selectChild,selectChildren:kn.selectChildren,filter:aT,merge:lT,selection:yT,transition:TT,call:kn.call,nodes:kn.nodes,node:kn.node,size:kn.size,empty:kn.empty,each:kn.each,on:dT,attr:WM,attrTween:XM,style:_T,styleTween:CT,text:PT,textTween:MT,remove:hT,tween:DM,delay:JM,duration:nT,ease:sT,easeVarying:iT,end:LT,[Symbol.iterator]:kn[Symbol.iterator]};function AT(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var OT={time:null,delay:0,duration:250,ease:AT};function FT(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function DT(e){var t,n;e instanceof Hn?(t=e._id,e=e._name):(t=zw(),(n=OT).time=Yh(),e=e==null?null:e+"");for(var r=this._groups,s=r.length,o=0;o<s;++o)for(var i=r[o],a=i.length,l,u=0;u<a;++u)(l=i[u])&&Qu(l,e,t,u,i,n||FT(l,t));return new Hn(r,this._parents,e,t)}xa.prototype.interrupt=AM;xa.prototype.transition=DT;const el=e=>()=>e;function zT(e,{sourceEvent:t,target:n,transform:r,dispatch:s}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:s}})}function An(e,t,n){this.k=e,this.x=t,this.y=n}An.prototype={constructor:An,scale:function(e){return e===1?this:new An(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new An(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Gu=new An(1,0,0);$w.prototype=An.prototype;function $w(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Gu;return e.__zoom}function Qc(e){e.stopImmediatePropagation()}function ri(e){e.preventDefault(),e.stopImmediatePropagation()}function $T(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function BT(){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 Dg(){return this.__zoom||Gu}function HT(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function UT(){return navigator.maxTouchPoints||"ontouchstart"in this}function VT(e,t,n){var r=e.invertX(t[0][0])-n[0][0],s=e.invertX(t[1][0])-n[1][0],o=e.invertY(t[0][1])-n[0][1],i=e.invertY(t[1][1])-n[1][1];return e.translate(s>r?(r+s)/2:Math.min(0,r)||Math.max(0,s),i>o?(o+i)/2:Math.min(0,o)||Math.max(0,i))}function Bw(){var e=$T,t=BT,n=VT,r=HT,s=UT,o=[0,1/0],i=[[-1/0,-1/0],[1/0,1/0]],a=250,l=bl,u=Wu("start","zoom","end"),d,c,f,m=500,p=150,x=0,w=10;function g(k){k.property("__zoom",Dg).on("wheel.zoom",C,{passive:!1}).on("mousedown.zoom",M).on("dblclick.zoom",L).filter(s).on("touchstart.zoom",P).on("touchmove.zoom",R).on("touchend.zoom touchcancel.zoom",$).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}g.transform=function(k,I,A,F){var N=k.selection?k.selection():k;N.property("__zoom",Dg),k!==N?E(k,I,A,F):N.interrupt().each(function(){b(this,arguments).event(F).start().zoom(null,typeof I=="function"?I.apply(this,arguments):I).end()})},g.scaleBy=function(k,I,A,F){g.scaleTo(k,function(){var N=this.__zoom.k,T=typeof I=="function"?I.apply(this,arguments):I;return N*T},A,F)},g.scaleTo=function(k,I,A,F){g.transform(k,function(){var N=t.apply(this,arguments),T=this.__zoom,D=A==null?S(N):typeof A=="function"?A.apply(this,arguments):A,B=T.invert(D),H=typeof I=="function"?I.apply(this,arguments):I;return n(y(v(T,H),D,B),N,i)},A,F)},g.translateBy=function(k,I,A,F){g.transform(k,function(){return n(this.__zoom.translate(typeof I=="function"?I.apply(this,arguments):I,typeof A=="function"?A.apply(this,arguments):A),t.apply(this,arguments),i)},null,F)},g.translateTo=function(k,I,A,F,N){g.transform(k,function(){var T=t.apply(this,arguments),D=this.__zoom,B=F==null?S(T):typeof F=="function"?F.apply(this,arguments):F;return n(Gu.translate(B[0],B[1]).scale(D.k).translate(typeof I=="function"?-I.apply(this,arguments):-I,typeof A=="function"?-A.apply(this,arguments):-A),T,i)},F,N)};function v(k,I){return I=Math.max(o[0],Math.min(o[1],I)),I===k.k?k:new An(I,k.x,k.y)}function y(k,I,A){var F=I[0]-A[0]*k.k,N=I[1]-A[1]*k.k;return F===k.x&&N===k.y?k:new An(k.k,F,N)}function S(k){return[(+k[0][0]+ +k[1][0])/2,(+k[0][1]+ +k[1][1])/2]}function E(k,I,A,F){k.on("start.zoom",function(){b(this,arguments).event(F).start()}).on("interrupt.zoom end.zoom",function(){b(this,arguments).event(F).end()}).tween("zoom",function(){var N=this,T=arguments,D=b(N,T).event(F),B=t.apply(N,T),H=A==null?S(B):typeof A=="function"?A.apply(N,T):A,K=Math.max(B[1][0]-B[0][0],B[1][1]-B[0][1]),V=N.__zoom,X=typeof I=="function"?I.apply(N,T):I,Q=l(V.invert(H).concat(K/V.k),X.invert(H).concat(K/X.k));return function(Y){if(Y===1)Y=X;else{var W=Q(Y),Z=K/W[2];Y=new An(Z,H[0]-W[0]*Z,H[1]-W[1]*Z)}D.zoom(null,Y)}})}function b(k,I,A){return!A&&k.__zooming||new _(k,I)}function _(k,I){this.that=k,this.args=I,this.active=0,this.sourceEvent=null,this.extent=t.apply(k,I),this.taps=0}_.prototype={event:function(k){return k&&(this.sourceEvent=k),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(k,I){return this.mouse&&k!=="mouse"&&(this.mouse[1]=I.invert(this.mouse[0])),this.touch0&&k!=="touch"&&(this.touch0[1]=I.invert(this.touch0[0])),this.touch1&&k!=="touch"&&(this.touch1[1]=I.invert(this.touch1[0])),this.that.__zoom=I,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(k){var I=Nt(this.that).datum();u.call(k,this.that,new zT(k,{sourceEvent:this.sourceEvent,target:g,transform:this.that.__zoom,dispatch:u}),I)}};function C(k,...I){if(!e.apply(this,arguments))return;var A=b(this,I).event(k),F=this.__zoom,N=Math.max(o[0],Math.min(o[1],F.k*Math.pow(2,r.apply(this,arguments)))),T=Yt(k);if(A.wheel)(A.mouse[0][0]!==T[0]||A.mouse[0][1]!==T[1])&&(A.mouse[1]=F.invert(A.mouse[0]=T)),clearTimeout(A.wheel);else{if(F.k===N)return;A.mouse=[T,F.invert(T)],Nl(this),A.start()}ri(k),A.wheel=setTimeout(D,p),A.zoom("mouse",n(y(v(F,N),A.mouse[0],A.mouse[1]),A.extent,i));function D(){A.wheel=null,A.end()}}function M(k,...I){if(f||!e.apply(this,arguments))return;var A=k.currentTarget,F=b(this,I,!0).event(k),N=Nt(k.view).on("mousemove.zoom",H,!0).on("mouseup.zoom",K,!0),T=Yt(k,A),D=k.clientX,B=k.clientY;Ew(k.view),Qc(k),F.mouse=[T,this.__zoom.invert(T)],Nl(this),F.start();function H(V){if(ri(V),!F.moved){var X=V.clientX-D,Q=V.clientY-B;F.moved=X*X+Q*Q>x}F.event(V).zoom("mouse",n(y(F.that.__zoom,F.mouse[0]=Yt(V,A),F.mouse[1]),F.extent,i))}function K(V){N.on("mousemove.zoom mouseup.zoom",null),Cw(V.view,F.moved),ri(V),F.event(V).end()}}function L(k,...I){if(e.apply(this,arguments)){var A=this.__zoom,F=Yt(k.changedTouches?k.changedTouches[0]:k,this),N=A.invert(F),T=A.k*(k.shiftKey?.5:2),D=n(y(v(A,T),F,N),t.apply(this,I),i);ri(k),a>0?Nt(this).transition().duration(a).call(E,D,F,k):Nt(this).call(g.transform,D,F,k)}}function P(k,...I){if(e.apply(this,arguments)){var A=k.touches,F=A.length,N=b(this,I,k.changedTouches.length===F).event(k),T,D,B,H;for(Qc(k),D=0;D<F;++D)B=A[D],H=Yt(B,this),H=[H,this.__zoom.invert(H),B.identifier],N.touch0?!N.touch1&&N.touch0[2]!==H[2]&&(N.touch1=H,N.taps=0):(N.touch0=H,T=!0,N.taps=1+!!d);d&&(d=clearTimeout(d)),T&&(N.taps<2&&(c=H[0],d=setTimeout(function(){d=null},m)),Nl(this),N.start())}}function R(k,...I){if(this.__zooming){var A=b(this,I).event(k),F=k.changedTouches,N=F.length,T,D,B,H;for(ri(k),T=0;T<N;++T)D=F[T],B=Yt(D,this),A.touch0&&A.touch0[2]===D.identifier?A.touch0[0]=B:A.touch1&&A.touch1[2]===D.identifier&&(A.touch1[0]=B);if(D=A.that.__zoom,A.touch1){var K=A.touch0[0],V=A.touch0[1],X=A.touch1[0],Q=A.touch1[1],Y=(Y=X[0]-K[0])*Y+(Y=X[1]-K[1])*Y,W=(W=Q[0]-V[0])*W+(W=Q[1]-V[1])*W;D=v(D,Math.sqrt(Y/W)),B=[(K[0]+X[0])/2,(K[1]+X[1])/2],H=[(V[0]+Q[0])/2,(V[1]+Q[1])/2]}else if(A.touch0)B=A.touch0[0],H=A.touch0[1];else return;A.zoom("touch",n(y(D,B,H),A.extent,i))}}function $(k,...I){if(this.__zooming){var A=b(this,I).event(k),F=k.changedTouches,N=F.length,T,D;for(Qc(k),f&&clearTimeout(f),f=setTimeout(function(){f=null},m),T=0;T<N;++T)D=F[T],A.touch0&&A.touch0[2]===D.identifier?delete A.touch0:A.touch1&&A.touch1[2]===D.identifier&&delete A.touch1;if(A.touch1&&!A.touch0&&(A.touch0=A.touch1,delete A.touch1),A.touch0)A.touch0[1]=this.__zoom.invert(A.touch0[0]);else if(A.end(),A.taps===2&&(D=Yt(D,this),Math.hypot(c[0]-D[0],c[1]-D[1])<w)){var B=Nt(this).on("dblclick.zoom");B&&B.apply(this,arguments)}}}return g.wheelDelta=function(k){return arguments.length?(r=typeof k=="function"?k:el(+k),g):r},g.filter=function(k){return arguments.length?(e=typeof k=="function"?k:el(!!k),g):e},g.touchable=function(k){return arguments.length?(s=typeof k=="function"?k:el(!!k),g):s},g.extent=function(k){return arguments.length?(t=typeof k=="function"?k:el([[+k[0][0],+k[0][1]],[+k[1][0],+k[1][1]]]),g):t},g.scaleExtent=function(k){return arguments.length?(o[0]=+k[0],o[1]=+k[1],g):[o[0],o[1]]},g.translateExtent=function(k){return arguments.length?(i[0][0]=+k[0][0],i[1][0]=+k[1][0],i[0][1]=+k[0][1],i[1][1]=+k[1][1],g):[[i[0][0],i[0][1]],[i[1][0],i[1][1]]]},g.constrain=function(k){return arguments.length?(n=k,g):n},g.duration=function(k){return arguments.length?(a=+k,g):a},g.interpolate=function(k){return arguments.length?(l=k,g):l},g.on=function(){var k=u.on.apply(u,arguments);return k===u?g:k},g.clickDistance=function(k){return arguments.length?(x=(k=+k)*k,g):Math.sqrt(x)},g.tapDistance=function(k){return arguments.length?(w=+k,g):w},g}const bn={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:r}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},Xi=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Hw=["Enter"," ","Escape"],Uw={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var No;(function(e){e.Strict="strict",e.Loose="loose"})(No||(No={}));var as;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(as||(as={}));var Yi;(function(e){e.Partial="partial",e.Full="full"})(Yi||(Yi={}));const Vw={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var rr;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(rr||(rr={}));var ws;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(ws||(ws={}));var ee;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(ee||(ee={}));const zg={[ee.Left]:ee.Right,[ee.Right]:ee.Left,[ee.Top]:ee.Bottom,[ee.Bottom]:ee.Top};function Ww(e){return e===null?null:e?"valid":"invalid"}const Kw=e=>"id"in e&&"source"in e&&"target"in e,WT=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),ep=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),wa=(e,t=[0,0])=>{const{width:n,height:r}=Vn(e),s=e.origin??t,o=n*s[0],i=r*s[1];return{x:e.position.x-o,y:e.position.y-i}},KT=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,s)=>{const o=typeof s=="string";let i=!t.nodeLookup&&!o?s:void 0;t.nodeLookup&&(i=o?t.nodeLookup.get(s):ep(s)?s:t.nodeLookup.get(s.id));const a=i?gu(i,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Xu(r,a)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Yu(n)},Sa=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(s=>{(t.filter===void 0||t.filter(s))&&(n=Xu(n,gu(s)),r=!0)}),r?Yu(n):{x:0,y:0,width:0,height:0}},tp=(e,t,[n,r,s]=[0,0,1],o=!1,i=!1)=>{const a={...ba(t,[n,r,s]),width:t.width/s,height:t.height/s},l=[];for(const u of e.values()){const{measured:d,selectable:c=!0,hidden:f=!1}=u;if(i&&!c||f)continue;const m=d.width??u.width??u.initialWidth??null,p=d.height??u.height??u.initialHeight??null,x=Zi(a,Po(u)),w=(m??0)*(p??0),g=o&&x>0;(!u.internals.handleBounds||g||x>=w||u.dragging)&&l.push(u)}return l},qT=(e,t)=>{const n=new Set;return e.forEach(r=>{n.add(r.id)}),t.filter(r=>n.has(r.source)||n.has(r.target))};function QT(e,t){const n=new Map,r=t!=null&&t.nodes?new Set(t.nodes.map(s=>s.id)):null;return e.forEach(s=>{s.measured.width&&s.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!s.hidden)&&(!r||r.has(s.id))&&n.set(s.id,s)}),n}async function GT({nodes:e,width:t,height:n,panZoom:r,minZoom:s,maxZoom:o},i){if(e.size===0)return Promise.resolve(!0);const a=QT(e,i),l=Sa(a),u=np(l,t,n,(i==null?void 0:i.minZoom)??s,(i==null?void 0:i.maxZoom)??o,(i==null?void 0:i.padding)??.1);return await r.setViewport(u,{duration:i==null?void 0:i.duration,ease:i==null?void 0:i.ease,interpolate:i==null?void 0:i.interpolate}),Promise.resolve(!0)}function qw({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:s,onError:o}){const i=n.get(e),a=i.parentId?n.get(i.parentId):void 0,{x:l,y:u}=a?a.internals.positionAbsolute:{x:0,y:0},d=i.origin??r;let c=i.extent||s;if(i.extent==="parent"&&!i.expandParent)if(!a)o==null||o("005",bn.error005());else{const m=a.measured.width,p=a.measured.height;m&&p&&(c=[[l,u],[l+m,u+p]])}else a&&Ro(i.extent)&&(c=[[i.extent[0][0]+l,i.extent[0][1]+u],[i.extent[1][0]+l,i.extent[1][1]+u]]);const f=Ro(c)?Ss(t,c,i.measured):t;return(i.measured.width===void 0||i.measured.height===void 0)&&(o==null||o("015",bn.error015())),{position:{x:f.x-l+(i.measured.width??0)*d[0],y:f.y-u+(i.measured.height??0)*d[1]},positionAbsolute:f}}async function XT({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:s}){const o=new Set(e.map(f=>f.id)),i=[];for(const f of n){if(f.deletable===!1)continue;const m=o.has(f.id),p=!m&&f.parentId&&i.find(x=>x.id===f.parentId);(m||p)&&i.push(f)}const a=new Set(t.map(f=>f.id)),l=r.filter(f=>f.deletable!==!1),d=qT(i,l);for(const f of l)a.has(f.id)&&!d.find(p=>p.id===f.id)&&d.push(f);if(!s)return{edges:d,nodes:i};const c=await s({nodes:i,edges:d});return typeof c=="boolean"?c?{edges:d,nodes:i}:{edges:[],nodes:[]}:c}const ko=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Ss=(e={x:0,y:0},t,n)=>({x:ko(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:ko(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function Qw(e,t,n){const{width:r,height:s}=Vn(n),{x:o,y:i}=n.internals.positionAbsolute;return Ss(e,[[o,i],[o+r,i+s]],t)}const $g=(e,t,n)=>e<t?ko(Math.abs(e-t),1,t)/t:e>n?-ko(Math.abs(e-n),1,t)/t:0,Gw=(e,t,n=15,r=40)=>{const s=$g(e.x,r,t.width-r)*n,o=$g(e.y,r,t.height-r)*n;return[s,o]},Xu=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),bf=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),Yu=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),Po=(e,t=[0,0])=>{var s,o;const{x:n,y:r}=ep(e)?e.internals.positionAbsolute:wa(e,t);return{x:n,y:r,width:((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0,height:((o=e.measured)==null?void 0:o.height)??e.height??e.initialHeight??0}},gu=(e,t=[0,0])=>{var s,o;const{x:n,y:r}=ep(e)?e.internals.positionAbsolute:wa(e,t);return{x:n,y:r,x2:n+(((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0),y2:r+(((o=e.measured)==null?void 0:o.height)??e.height??e.initialHeight??0)}},Xw=(e,t)=>Yu(Xu(bf(e),bf(t))),Zi=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},Bg=e=>en(e.width)&&en(e.height)&&en(e.x)&&en(e.y),en=e=>!isNaN(e)&&isFinite(e),YT=(e,t)=>{},_a=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),ba=({x:e,y:t},[n,r,s],o=!1,i=[1,1])=>{const a={x:(e-n)/s,y:(t-r)/s};return o?_a(a,i):a},yu=({x:e,y:t},[n,r,s])=>({x:e*s+n,y:t*s+r});function Ns(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function ZT(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=Ns(e,n),s=Ns(e,t);return{top:r,right:s,bottom:r,left:s,x:s*2,y:r*2}}if(typeof e=="object"){const r=Ns(e.top??e.y??0,n),s=Ns(e.bottom??e.y??0,n),o=Ns(e.left??e.x??0,t),i=Ns(e.right??e.x??0,t);return{top:r,right:i,bottom:s,left:o,x:o+i,y:r+s}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function JT(e,t,n,r,s,o){const{x:i,y:a}=yu(e,[t,n,r]),{x:l,y:u}=yu({x:e.x+e.width,y:e.y+e.height},[t,n,r]),d=s-l,c=o-u;return{left:Math.floor(i),top:Math.floor(a),right:Math.floor(d),bottom:Math.floor(c)}}const np=(e,t,n,r,s,o)=>{const i=ZT(o,t,n),a=(t-i.x)/e.width,l=(n-i.y)/e.height,u=Math.min(a,l),d=ko(u,r,s),c=e.x+e.width/2,f=e.y+e.height/2,m=t/2-c*d,p=n/2-f*d,x=JT(e,m,p,d,t,n),w={left:Math.min(x.left-i.left,0),top:Math.min(x.top-i.top,0),right:Math.min(x.right-i.right,0),bottom:Math.min(x.bottom-i.bottom,0)};return{x:m-w.left+w.right,y:p-w.top+w.bottom,zoom:d}},Ji=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Ro(e){return e!=null&&e!=="parent"}function Vn(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function Yw(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function Zw(e,t={width:0,height:0},n,r,s){const o={...e},i=r.get(n);if(i){const a=i.origin||s;o.x+=i.internals.positionAbsolute.x-(t.width??0)*a[0],o.y+=i.internals.positionAbsolute.y-(t.height??0)*a[1]}return o}function Hg(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function eL(){let e,t;return{promise:new Promise((r,s)=>{e=r,t=s}),resolve:e,reject:t}}function tL(e){return{...Uw,...e||{}}}function Ei(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:s}){const{x:o,y:i}=tn(e),a=ba({x:o-((s==null?void 0:s.left)??0),y:i-((s==null?void 0:s.top)??0)},r),{x:l,y:u}=n?_a(a,t):a;return{xSnapped:l,ySnapped:u,...a}}const rp=e=>({width:e.offsetWidth,height:e.offsetHeight}),Jw=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},nL=["INPUT","SELECT","TEXTAREA"];function e1(e){var r,s;const t=((s=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:s[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:nL.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const t1=e=>"clientX"in e,tn=(e,t)=>{var o,i;const n=t1(e),r=n?e.clientX:(o=e.touches)==null?void 0:o[0].clientX,s=n?e.clientY:(i=e.touches)==null?void 0:i[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:s-((t==null?void 0:t.top)??0)}},Ug=(e,t,n,r,s)=>{const o=t.querySelectorAll(`.${e}`);return!o||!o.length?null:Array.from(o).map(i=>{const a=i.getBoundingClientRect();return{id:i.getAttribute("data-handleid"),type:e,nodeId:s,position:i.getAttribute("data-handlepos"),x:(a.left-n.left)/r,y:(a.top-n.top)/r,...rp(i)}})};function n1({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:s,sourceControlY:o,targetControlX:i,targetControlY:a}){const l=e*.125+s*.375+i*.375+n*.125,u=t*.125+o*.375+a*.375+r*.125,d=Math.abs(l-e),c=Math.abs(u-t);return[l,u,d,c]}function tl(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Vg({pos:e,x1:t,y1:n,x2:r,y2:s,c:o}){switch(e){case ee.Left:return[t-tl(t-r,o),n];case ee.Right:return[t+tl(r-t,o),n];case ee.Top:return[t,n-tl(n-s,o)];case ee.Bottom:return[t,n+tl(s-n,o)]}}function r1({sourceX:e,sourceY:t,sourcePosition:n=ee.Bottom,targetX:r,targetY:s,targetPosition:o=ee.Top,curvature:i=.25}){const[a,l]=Vg({pos:n,x1:e,y1:t,x2:r,y2:s,c:i}),[u,d]=Vg({pos:o,x1:r,y1:s,x2:e,y2:t,c:i}),[c,f,m,p]=n1({sourceX:e,sourceY:t,targetX:r,targetY:s,sourceControlX:a,sourceControlY:l,targetControlX:u,targetControlY:d});return[`M${e},${t} C${a},${l} ${u},${d} ${r},${s}`,c,f,m,p]}function s1({sourceX:e,sourceY:t,targetX:n,targetY:r}){const s=Math.abs(n-e)/2,o=n<e?n+s:n-s,i=Math.abs(r-t)/2,a=r<t?r+i:r-i;return[o,a,s,i]}function rL({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:s=!1,zIndexMode:o="basic"}){if(o==="manual")return r;const i=s&&n?r+1e3:r,a=Math.max(e.parentId||s&&e.selected?e.internals.z:0,t.parentId||s&&t.selected?t.internals.z:0);return i+a}function sL({sourceNode:e,targetNode:t,width:n,height:r,transform:s}){const o=Xu(gu(e),gu(t));o.x===o.x2&&(o.x2+=1),o.y===o.y2&&(o.y2+=1);const i={x:-s[0]/s[2],y:-s[1]/s[2],width:n/s[2],height:r/s[2]};return Zi(i,Yu(o))>0}const oL=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,iL=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),aL=(e,t,n={})=>{if(!e.source||!e.target)return t;const r=n.getEdgeId||oL;let s;return Kw(e)?s={...e}:s={...e,id:r(e)},iL(s,t)?t:(s.sourceHandle===null&&delete s.sourceHandle,s.targetHandle===null&&delete s.targetHandle,t.concat(s))};function o1({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[s,o,i,a]=s1({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,s,o,i,a]}const Wg={[ee.Left]:{x:-1,y:0},[ee.Right]:{x:1,y:0},[ee.Top]:{x:0,y:-1},[ee.Bottom]:{x:0,y:1}},lL=({source:e,sourcePosition:t=ee.Bottom,target:n})=>t===ee.Left||t===ee.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},Kg=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function uL({source:e,sourcePosition:t=ee.Bottom,target:n,targetPosition:r=ee.Top,center:s,offset:o,stepPosition:i}){const a=Wg[t],l=Wg[r],u={x:e.x+a.x*o,y:e.y+a.y*o},d={x:n.x+l.x*o,y:n.y+l.y*o},c=lL({source:u,sourcePosition:t,target:d}),f=c.x!==0?"x":"y",m=c[f];let p=[],x,w;const g={x:0,y:0},v={x:0,y:0},[,,y,S]=s1({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(a[f]*l[f]===-1){f==="x"?(x=s.x??u.x+(d.x-u.x)*i,w=s.y??(u.y+d.y)/2):(x=s.x??(u.x+d.x)/2,w=s.y??u.y+(d.y-u.y)*i);const b=[{x,y:u.y},{x,y:d.y}],_=[{x:u.x,y:w},{x:d.x,y:w}];a[f]===m?p=f==="x"?b:_:p=f==="x"?_:b}else{const b=[{x:u.x,y:d.y}],_=[{x:d.x,y:u.y}];if(f==="x"?p=a.x===m?_:b:p=a.y===m?b:_,t===r){const R=Math.abs(e[f]-n[f]);if(R<=o){const $=Math.min(o-1,o-R);a[f]===m?g[f]=(u[f]>e[f]?-1:1)*$:v[f]=(d[f]>n[f]?-1:1)*$}}if(t!==r){const R=f==="x"?"y":"x",$=a[f]===l[R],k=u[R]>d[R],I=u[R]<d[R];(a[f]===1&&(!$&&k||$&&I)||a[f]!==1&&(!$&&I||$&&k))&&(p=f==="x"?b:_)}const C={x:u.x+g.x,y:u.y+g.y},M={x:d.x+v.x,y:d.y+v.y},L=Math.max(Math.abs(C.x-p[0].x),Math.abs(M.x-p[0].x)),P=Math.max(Math.abs(C.y-p[0].y),Math.abs(M.y-p[0].y));L>=P?(x=(C.x+M.x)/2,w=p[0].y):(x=p[0].x,w=(C.y+M.y)/2)}return[[e,{x:u.x+g.x,y:u.y+g.y},...p,{x:d.x+v.x,y:d.y+v.y},n],x,w,y,S]}function cL(e,t,n,r){const s=Math.min(Kg(e,t)/2,Kg(t,n)/2,r),{x:o,y:i}=t;if(e.x===o&&o===n.x||e.y===i&&i===n.y)return`L${o} ${i}`;if(e.y===i){const u=e.x<n.x?-1:1,d=e.y<n.y?1:-1;return`L ${o+s*u},${i}Q ${o},${i} ${o},${i+s*d}`}const a=e.x<n.x?1:-1,l=e.y<n.y?-1:1;return`L ${o},${i+s*l}Q ${o},${i} ${o+s*a},${i}`}function Ef({sourceX:e,sourceY:t,sourcePosition:n=ee.Bottom,targetX:r,targetY:s,targetPosition:o=ee.Top,borderRadius:i=5,centerX:a,centerY:l,offset:u=20,stepPosition:d=.5}){const[c,f,m,p,x]=uL({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:s},targetPosition:o,center:{x:a,y:l},offset:u,stepPosition:d});return[c.reduce((g,v,y)=>{let S="";return y>0&&y<c.length-1?S=cL(c[y-1],v,c[y+1],i):S=`${y===0?"M":"L"}${v.x} ${v.y}`,g+=S,g},""),f,m,p,x]}function qg(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function dL(e){var c;const{sourceNode:t,targetNode:n}=e;if(!qg(t)||!qg(n))return null;const r=t.internals.handleBounds||Qg(t.handles),s=n.internals.handleBounds||Qg(n.handles),o=Gg((r==null?void 0:r.source)??[],e.sourceHandle),i=Gg(e.connectionMode===No.Strict?(s==null?void 0:s.target)??[]:((s==null?void 0:s.target)??[]).concat((s==null?void 0:s.source)??[]),e.targetHandle);if(!o||!i)return(c=e.onError)==null||c.call(e,"008",bn.error008(o?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const a=(o==null?void 0:o.position)||ee.Bottom,l=(i==null?void 0:i.position)||ee.Top,u=_s(t,o,a),d=_s(n,i,l);return{sourceX:u.x,sourceY:u.y,targetX:d.x,targetY:d.y,sourcePosition:a,targetPosition:l}}function Qg(e){if(!e)return null;const t=[],n=[];for(const r of e)r.width=r.width??1,r.height=r.height??1,r.type==="source"?t.push(r):r.type==="target"&&n.push(r);return{source:t,target:n}}function _s(e,t,n=ee.Left,r=!1){const s=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,o=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:i,height:a}=t??Vn(e);if(r)return{x:s+i/2,y:o+a/2};switch((t==null?void 0:t.position)??n){case ee.Top:return{x:s+i/2,y:o};case ee.Right:return{x:s+i,y:o+a/2};case ee.Bottom:return{x:s+i/2,y:o+a};case ee.Left:return{x:s,y:o+a/2}}}function Gg(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function Cf(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function fL(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:s}){const o=new Set;return e.reduce((i,a)=>([a.markerStart||r,a.markerEnd||s].forEach(l=>{if(l&&typeof l=="object"){const u=Cf(l,t);o.has(u)||(i.push({id:u,color:l.color||n,...l}),o.add(u))}}),i),[]).sort((i,a)=>i.id.localeCompare(a.id))}const i1=1e3,hL=10,sp={nodeOrigin:[0,0],nodeExtent:Xi,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},pL={...sp,checkEquality:!0};function op(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function mL(e,t,n){const r=op(sp,n);for(const s of e.values())if(s.parentId)ap(s,e,t,r);else{const o=wa(s,r.nodeOrigin),i=Ro(s.extent)?s.extent:r.nodeExtent,a=Ss(o,i,Vn(s));s.internals.positionAbsolute=a}}function gL(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const n=[],r=[];for(const s of e.handles){const o={id:s.id,width:s.width??1,height:s.height??1,nodeId:e.id,x:s.x,y:s.y,position:s.position,type:s.type};s.type==="source"?n.push(o):s.type==="target"&&r.push(o)}return{source:n,target:r}}function ip(e){return e==="manual"}function Nf(e,t,n,r={}){var u,d;const s=op(pL,r),o={i:0},i=new Map(t),a=s!=null&&s.elevateNodesOnSelect&&!ip(s.zIndexMode)?i1:0;let l=e.length>0;t.clear(),n.clear();for(const c of e){let f=i.get(c.id);if(s.checkEquality&&c===(f==null?void 0:f.internals.userNode))t.set(c.id,f);else{const m=wa(c,s.nodeOrigin),p=Ro(c.extent)?c.extent:s.nodeExtent,x=Ss(m,p,Vn(c));f={...s.defaults,...c,measured:{width:(u=c.measured)==null?void 0:u.width,height:(d=c.measured)==null?void 0:d.height},internals:{positionAbsolute:x,handleBounds:gL(c,f),z:a1(c,a,s.zIndexMode),userNode:c}},t.set(c.id,f)}(f.measured===void 0||f.measured.width===void 0||f.measured.height===void 0)&&!f.hidden&&(l=!1),c.parentId&&ap(f,t,n,r,o)}return l}function yL(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function ap(e,t,n,r,s){const{elevateNodesOnSelect:o,nodeOrigin:i,nodeExtent:a,zIndexMode:l}=op(sp,r),u=e.parentId,d=t.get(u);if(!d){console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}yL(e,n),s&&!d.parentId&&d.internals.rootParentIndex===void 0&&l==="auto"&&(d.internals.rootParentIndex=++s.i,d.internals.z=d.internals.z+s.i*hL),s&&d.internals.rootParentIndex!==void 0&&(s.i=d.internals.rootParentIndex);const c=o&&!ip(l)?i1:0,{x:f,y:m,z:p}=xL(e,d,i,a,c,l),{positionAbsolute:x}=e.internals,w=f!==x.x||m!==x.y;(w||p!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:w?{x:f,y:m}:x,z:p}})}function a1(e,t,n){const r=en(e.zIndex)?e.zIndex:0;return ip(n)?r:r+(e.selected?t:0)}function xL(e,t,n,r,s,o){const{x:i,y:a}=t.internals.positionAbsolute,l=Vn(e),u=wa(e,n),d=Ro(e.extent)?Ss(u,e.extent,l):u;let c=Ss({x:i+d.x,y:a+d.y},r,l);e.extent==="parent"&&(c=Qw(c,l,t));const f=a1(e,s,o),m=t.internals.z??0;return{x:c.x,y:c.y,z:m>=f?m+1:f}}function lp(e,t,n,r=[0,0]){var i;const s=[],o=new Map;for(const a of e){const l=t.get(a.parentId);if(!l)continue;const u=((i=o.get(a.parentId))==null?void 0:i.expandedRect)??Po(l),d=Xw(u,a.rect);o.set(a.parentId,{expandedRect:d,parent:l})}return o.size>0&&o.forEach(({expandedRect:a,parent:l},u)=>{var y;const d=l.internals.positionAbsolute,c=Vn(l),f=l.origin??r,m=a.x<d.x?Math.round(Math.abs(d.x-a.x)):0,p=a.y<d.y?Math.round(Math.abs(d.y-a.y)):0,x=Math.max(c.width,Math.round(a.width)),w=Math.max(c.height,Math.round(a.height)),g=(x-c.width)*f[0],v=(w-c.height)*f[1];(m>0||p>0||g||v)&&(s.push({id:u,type:"position",position:{x:l.position.x-m+g,y:l.position.y-p+v}}),(y=n.get(u))==null||y.forEach(S=>{e.some(E=>E.id===S.id)||s.push({id:S.id,type:"position",position:{x:S.position.x+m,y:S.position.y+p}})})),(c.width<a.width||c.height<a.height||m||p)&&s.push({id:u,type:"dimensions",setAttributes:!0,dimensions:{width:x+(m?f[0]*m-g:0),height:w+(p?f[1]*p-v:0)}})}),s}function vL(e,t,n,r,s,o,i){const a=r==null?void 0:r.querySelector(".xyflow__viewport");let l=!1;if(!a)return{changes:[],updatedInternals:l};const u=[],d=window.getComputedStyle(a),{m22:c}=new window.DOMMatrixReadOnly(d.transform),f=[];for(const m of e.values()){const p=t.get(m.id);if(!p)continue;if(p.hidden){t.set(p.id,{...p,internals:{...p.internals,handleBounds:void 0}}),l=!0;continue}const x=rp(m.nodeElement),w=p.measured.width!==x.width||p.measured.height!==x.height;if(!!(x.width&&x.height&&(w||!p.internals.handleBounds||m.force))){const v=m.nodeElement.getBoundingClientRect(),y=Ro(p.extent)?p.extent:o;let{positionAbsolute:S}=p.internals;p.parentId&&p.extent==="parent"?S=Qw(S,x,t.get(p.parentId)):y&&(S=Ss(S,y,x));const E={...p,measured:x,internals:{...p.internals,positionAbsolute:S,handleBounds:{source:Ug("source",m.nodeElement,v,c,p.id),target:Ug("target",m.nodeElement,v,c,p.id)}}};t.set(p.id,E),p.parentId&&ap(E,t,n,{nodeOrigin:s,zIndexMode:i}),l=!0,w&&(u.push({id:p.id,type:"dimensions",dimensions:x}),p.expandParent&&p.parentId&&f.push({id:p.id,parentId:p.parentId,rect:Po(E,s)}))}}if(f.length>0){const m=lp(f,t,n,s);u.push(...m)}return{changes:u,updatedInternals:l}}async function wL({delta:e,panZoom:t,transform:n,translateExtent:r,width:s,height:o}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const i=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[s,o]],r),a=!!i&&(i.x!==n[0]||i.y!==n[1]||i.k!==n[2]);return Promise.resolve(a)}function Xg(e,t,n,r,s,o){let i=s;const a=r.get(i)||new Map;r.set(i,a.set(n,t)),i=`${s}-${e}`;const l=r.get(i)||new Map;if(r.set(i,l.set(n,t)),o){i=`${s}-${e}-${o}`;const u=r.get(i)||new Map;r.set(i,u.set(n,t))}}function l1(e,t,n){e.clear(),t.clear();for(const r of n){const{source:s,target:o,sourceHandle:i=null,targetHandle:a=null}=r,l={edgeId:r.id,source:s,target:o,sourceHandle:i,targetHandle:a},u=`${s}-${i}--${o}-${a}`,d=`${o}-${a}--${s}-${i}`;Xg("source",l,d,e,s,i),Xg("target",l,u,e,o,a),t.set(r.id,r)}}function u1(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:u1(n,t):!1}function Yg(e,t,n){var s;let r=e;do{if((s=r==null?void 0:r.matches)!=null&&s.call(r,t))return!0;if(r===n)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function SL(e,t,n,r){const s=new Map;for(const[o,i]of e)if((i.selected||i.id===r)&&(!i.parentId||!u1(i,e))&&(i.draggable||t&&typeof i.draggable>"u")){const a=e.get(o);a&&s.set(o,{id:o,position:a.position||{x:0,y:0},distance:{x:n.x-a.internals.positionAbsolute.x,y:n.y-a.internals.positionAbsolute.y},extent:a.extent,parentId:a.parentId,origin:a.origin,expandParent:a.expandParent,internals:{positionAbsolute:a.internals.positionAbsolute||{x:0,y:0}},measured:{width:a.measured.width??0,height:a.measured.height??0}})}return s}function Gc({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){var i,a,l;const s=[];for(const[u,d]of t){const c=(i=n.get(u))==null?void 0:i.internals.userNode;c&&s.push({...c,position:d.position,dragging:r})}if(!e)return[s[0],s];const o=(a=n.get(e))==null?void 0:a.internals.userNode;return[o?{...o,position:((l=t.get(e))==null?void 0:l.position)||o.position,dragging:r}:s[0],s]}function _L({dragItems:e,snapGrid:t,x:n,y:r}){const s=e.values().next().value;if(!s)return null;const o={x:n-s.distance.x,y:r-s.distance.y},i=_a(o,t);return{x:i.x-o.x,y:i.y-o.y}}function bL({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:s}){let o={x:null,y:null},i=0,a=new Map,l=!1,u={x:0,y:0},d=null,c=!1,f=null,m=!1,p=!1,x=null;function w({noDragClassName:v,handleSelector:y,domNode:S,isSelectable:E,nodeId:b,nodeClickDistance:_=0}){f=Nt(S);function C({x:R,y:$}){const{nodeLookup:k,nodeExtent:I,snapGrid:A,snapToGrid:F,nodeOrigin:N,onNodeDrag:T,onSelectionDrag:D,onError:B,updateNodePositions:H}=t();o={x:R,y:$};let K=!1;const V=a.size>1,X=V&&I?bf(Sa(a)):null,Q=V&&F?_L({dragItems:a,snapGrid:A,x:R,y:$}):null;for(const[Y,W]of a){if(!k.has(Y))continue;let Z={x:R-W.distance.x,y:$-W.distance.y};F&&(Z=Q?{x:Math.round(Z.x+Q.x),y:Math.round(Z.y+Q.y)}:_a(Z,A));let oe=null;if(V&&I&&!W.extent&&X){const{positionAbsolute:te}=W.internals,he=te.x-X.x+I[0][0],ye=te.x+W.measured.width-X.x2+I[1][0],ce=te.y-X.y+I[0][1],$e=te.y+W.measured.height-X.y2+I[1][1];oe=[[he,ce],[ye,$e]]}const{position:re,positionAbsolute:J}=qw({nodeId:Y,nextPosition:Z,nodeLookup:k,nodeExtent:oe||I,nodeOrigin:N,onError:B});K=K||W.position.x!==re.x||W.position.y!==re.y,W.position=re,W.internals.positionAbsolute=J}if(p=p||K,!!K&&(H(a,!0),x&&(r||T||!b&&D))){const[Y,W]=Gc({nodeId:b,dragItems:a,nodeLookup:k});r==null||r(x,a,Y,W),T==null||T(x,Y,W),b||D==null||D(x,W)}}async function M(){if(!d)return;const{transform:R,panBy:$,autoPanSpeed:k,autoPanOnNodeDrag:I}=t();if(!I){l=!1,cancelAnimationFrame(i);return}const[A,F]=Gw(u,d,k);(A!==0||F!==0)&&(o.x=(o.x??0)-A/R[2],o.y=(o.y??0)-F/R[2],await $({x:A,y:F})&&C(o)),i=requestAnimationFrame(M)}function L(R){var V;const{nodeLookup:$,multiSelectionActive:k,nodesDraggable:I,transform:A,snapGrid:F,snapToGrid:N,selectNodesOnDrag:T,onNodeDragStart:D,onSelectionDragStart:B,unselectNodesAndEdges:H}=t();c=!0,(!T||!E)&&!k&&b&&((V=$.get(b))!=null&&V.selected||H()),E&&T&&b&&(e==null||e(b));const K=Ei(R.sourceEvent,{transform:A,snapGrid:F,snapToGrid:N,containerBounds:d});if(o=K,a=SL($,I,K,b),a.size>0&&(n||D||!b&&B)){const[X,Q]=Gc({nodeId:b,dragItems:a,nodeLookup:$});n==null||n(R.sourceEvent,a,X,Q),D==null||D(R.sourceEvent,X,Q),b||B==null||B(R.sourceEvent,Q)}}const P=Nw().clickDistance(_).on("start",R=>{const{domNode:$,nodeDragThreshold:k,transform:I,snapGrid:A,snapToGrid:F}=t();d=($==null?void 0:$.getBoundingClientRect())||null,m=!1,p=!1,x=R.sourceEvent,k===0&&L(R),o=Ei(R.sourceEvent,{transform:I,snapGrid:A,snapToGrid:F,containerBounds:d}),u=tn(R.sourceEvent,d)}).on("drag",R=>{const{autoPanOnNodeDrag:$,transform:k,snapGrid:I,snapToGrid:A,nodeDragThreshold:F,nodeLookup:N}=t(),T=Ei(R.sourceEvent,{transform:k,snapGrid:I,snapToGrid:A,containerBounds:d});if(x=R.sourceEvent,(R.sourceEvent.type==="touchmove"&&R.sourceEvent.touches.length>1||b&&!N.has(b))&&(m=!0),!m){if(!l&&$&&c&&(l=!0,M()),!c){const D=tn(R.sourceEvent,d),B=D.x-u.x,H=D.y-u.y;Math.sqrt(B*B+H*H)>F&&L(R)}(o.x!==T.xSnapped||o.y!==T.ySnapped)&&a&&c&&(u=tn(R.sourceEvent,d),C(T))}}).on("end",R=>{if(!(!c||m)&&(l=!1,c=!1,cancelAnimationFrame(i),a.size>0)){const{nodeLookup:$,updateNodePositions:k,onNodeDragStop:I,onSelectionDragStop:A}=t();if(p&&(k(a,!1),p=!1),s||I||!b&&A){const[F,N]=Gc({nodeId:b,dragItems:a,nodeLookup:$,dragging:!1});s==null||s(R.sourceEvent,a,F,N),I==null||I(R.sourceEvent,F,N),b||A==null||A(R.sourceEvent,N)}}}).filter(R=>{const $=R.target;return!R.button&&(!v||!Yg($,`.${v}`,S))&&(!y||Yg($,y,S))});f.call(P)}function g(){f==null||f.on(".drag",null)}return{update:w,destroy:g}}function EL(e,t,n){const r=[],s={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const o of t.values())Zi(s,Po(o))>0&&r.push(o);return r}const CL=250;function NL(e,t,n,r){var a,l;let s=[],o=1/0;const i=EL(e,n,t+CL);for(const u of i){const d=[...((a=u.internals.handleBounds)==null?void 0:a.source)??[],...((l=u.internals.handleBounds)==null?void 0:l.target)??[]];for(const c of d){if(r.nodeId===c.nodeId&&r.type===c.type&&r.id===c.id)continue;const{x:f,y:m}=_s(u,c,c.position,!0),p=Math.sqrt(Math.pow(f-e.x,2)+Math.pow(m-e.y,2));p>t||(p<o?(s=[{...c,x:f,y:m}],o=p):p===o&&s.push({...c,x:f,y:m}))}}if(!s.length)return null;if(s.length>1){const u=r.type==="source"?"target":"source";return s.find(d=>d.type===u)??s[0]}return s[0]}function c1(e,t,n,r,s,o=!1){var u,d,c;const i=r.get(e);if(!i)return null;const a=s==="strict"?(u=i.internals.handleBounds)==null?void 0:u[t]:[...((d=i.internals.handleBounds)==null?void 0:d.source)??[],...((c=i.internals.handleBounds)==null?void 0:c.target)??[]],l=(n?a==null?void 0:a.find(f=>f.id===n):a==null?void 0:a[0])??null;return l&&o?{...l,..._s(i,l,l.position,!0)}:l}function d1(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function kL(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const f1=()=>!0;function PL(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:s,edgeUpdaterType:o,isTarget:i,domNode:a,nodeLookup:l,lib:u,autoPanOnConnect:d,flowId:c,panBy:f,cancelConnection:m,onConnectStart:p,onConnect:x,onConnectEnd:w,isValidConnection:g=f1,onReconnectEnd:v,updateConnection:y,getTransform:S,getFromHandle:E,autoPanSpeed:b,dragThreshold:_=1,handleDomNode:C}){const M=Jw(e.target);let L=0,P;const{x:R,y:$}=tn(e),k=d1(o,C),I=a==null?void 0:a.getBoundingClientRect();let A=!1;if(!I||!k)return;const F=c1(s,k,r,l,t);if(!F)return;let N=tn(e,I),T=!1,D=null,B=!1,H=null;function K(){if(!d||!I)return;const[re,J]=Gw(N,I,b);f({x:re,y:J}),L=requestAnimationFrame(K)}const V={...F,nodeId:s,type:k,position:F.position},X=l.get(s);let Y={inProgress:!0,isValid:null,from:_s(X,V,ee.Left,!0),fromHandle:V,fromPosition:V.position,fromNode:X,to:N,toHandle:null,toPosition:zg[V.position],toNode:null,pointer:N};function W(){A=!0,y(Y),p==null||p(e,{nodeId:s,handleId:r,handleType:k})}_===0&&W();function Z(re){if(!A){const{x:$e,y:un}=tn(re),dt=$e-R,At=un-$;if(!(dt*dt+At*At>_*_))return;W()}if(!E()||!V){oe(re);return}const J=S();N=tn(re,I),P=NL(ba(N,J,!1,[1,1]),n,l,V),T||(K(),T=!0);const te=h1(re,{handle:P,connectionMode:t,fromNodeId:s,fromHandleId:r,fromType:i?"target":"source",isValidConnection:g,doc:M,lib:u,flowId:c,nodeLookup:l});H=te.handleDomNode,D=te.connection,B=kL(!!P,te.isValid);const he=l.get(s),ye=he?_s(he,V,ee.Left,!0):Y.from,ce={...Y,from:ye,isValid:B,to:te.toHandle&&B?yu({x:te.toHandle.x,y:te.toHandle.y},J):N,toHandle:te.toHandle,toPosition:B&&te.toHandle?te.toHandle.position:zg[V.position],toNode:te.toHandle?l.get(te.toHandle.nodeId):null,pointer:N};y(ce),Y=ce}function oe(re){if(!("touches"in re&&re.touches.length>0)){if(A){(P||H)&&D&&B&&(x==null||x(D));const{inProgress:J,...te}=Y,he={...te,toPosition:Y.toHandle?Y.toPosition:null};w==null||w(re,he),o&&(v==null||v(re,he))}m(),cancelAnimationFrame(L),T=!1,B=!1,D=null,H=null,M.removeEventListener("mousemove",Z),M.removeEventListener("mouseup",oe),M.removeEventListener("touchmove",Z),M.removeEventListener("touchend",oe)}}M.addEventListener("mousemove",Z),M.addEventListener("mouseup",oe),M.addEventListener("touchmove",Z),M.addEventListener("touchend",oe)}function h1(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:s,fromType:o,doc:i,lib:a,flowId:l,isValidConnection:u=f1,nodeLookup:d}){const c=o==="target",f=t?i.querySelector(`.${a}-flow__handle[data-id="${l}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:m,y:p}=tn(e),x=i.elementFromPoint(m,p),w=x!=null&&x.classList.contains(`${a}-flow__handle`)?x:f,g={handleDomNode:w,isValid:!1,connection:null,toHandle:null};if(w){const v=d1(void 0,w),y=w.getAttribute("data-nodeid"),S=w.getAttribute("data-handleid"),E=w.classList.contains("connectable"),b=w.classList.contains("connectableend");if(!y||!v)return g;const _={source:c?y:r,sourceHandle:c?S:s,target:c?r:y,targetHandle:c?s:S};g.connection=_;const M=E&&b&&(n===No.Strict?c&&v==="source"||!c&&v==="target":y!==r||S!==s);g.isValid=M&&u(_),g.toHandle=c1(y,v,S,d,n,!0)}return g}const kf={onPointerDown:PL,isValid:h1};function RL({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const s=Nt(e);function o({translateExtent:a,width:l,height:u,zoomStep:d=1,pannable:c=!0,zoomable:f=!0,inversePan:m=!1}){const p=y=>{if(y.sourceEvent.type!=="wheel"||!t)return;const S=n(),E=y.sourceEvent.ctrlKey&&Ji()?10:1,b=-y.sourceEvent.deltaY*(y.sourceEvent.deltaMode===1?.05:y.sourceEvent.deltaMode?1:.002)*d,_=S[2]*Math.pow(2,b*E);t.scaleTo(_)};let x=[0,0];const w=y=>{(y.sourceEvent.type==="mousedown"||y.sourceEvent.type==="touchstart")&&(x=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY])},g=y=>{const S=n();if(y.sourceEvent.type!=="mousemove"&&y.sourceEvent.type!=="touchmove"||!t)return;const E=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY],b=[E[0]-x[0],E[1]-x[1]];x=E;const _=r()*Math.max(S[2],Math.log(S[2]))*(m?-1:1),C={x:S[0]-b[0]*_,y:S[1]-b[1]*_},M=[[0,0],[l,u]];t.setViewportConstrained({x:C.x,y:C.y,zoom:S[2]},M,a)},v=Bw().on("start",w).on("zoom",c?g:null).on("zoom.wheel",f?p:null);s.call(v,{})}function i(){s.on("zoom",null)}return{update:o,destroy:i,pointer:Yt}}const Zu=e=>({x:e.x,y:e.y,zoom:e.k}),Xc=({x:e,y:t,zoom:n})=>Gu.translate(e,t).scale(n),Bs=(e,t)=>e.target.closest(`.${t}`),p1=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),jL=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Yc=(e,t=0,n=jL,r=()=>{})=>{const s=typeof t=="number"&&t>0;return s||r(),s?e.transition().duration(t).ease(n).on("end",r):e},m1=e=>{const t=e.ctrlKey&&Ji()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function ML({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:s,panOnScrollSpeed:o,zoomOnPinch:i,onPanZoomStart:a,onPanZoom:l,onPanZoomEnd:u}){return d=>{if(Bs(d,t))return d.ctrlKey&&d.preventDefault(),!1;d.preventDefault(),d.stopImmediatePropagation();const c=n.property("__zoom").k||1;if(d.ctrlKey&&i){const w=Yt(d),g=m1(d),v=c*Math.pow(2,g);r.scaleTo(n,v,w,d);return}const f=d.deltaMode===1?20:1;let m=s===as.Vertical?0:d.deltaX*f,p=s===as.Horizontal?0:d.deltaY*f;!Ji()&&d.shiftKey&&s!==as.Vertical&&(m=d.deltaY*f,p=0),r.translateBy(n,-(m/c)*o,-(p/c)*o,{internal:!0});const x=Zu(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(l==null||l(d,x),e.panScrollTimeout=setTimeout(()=>{u==null||u(d,x),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,a==null||a(d,x))}}function TL({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,s){const o=r.type==="wheel",i=!t&&o&&!r.ctrlKey,a=Bs(r,e);if(r.ctrlKey&&o&&a&&r.preventDefault(),i||a)return null;r.preventDefault(),n.call(this,r,s)}}function LL({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var o,i,a;if((o=r.sourceEvent)!=null&&o.internal)return;const s=Zu(r.transform);e.mouseButton=((i=r.sourceEvent)==null?void 0:i.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=s,((a=r.sourceEvent)==null?void 0:a.type)==="mousedown"&&t(!0),n&&(n==null||n(r.sourceEvent,s))}}function IL({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:s}){return o=>{var i,a;e.usedRightMouseButton=!!(n&&p1(t,e.mouseButton??0)),(i=o.sourceEvent)!=null&&i.sync||r([o.transform.x,o.transform.y,o.transform.k]),s&&!((a=o.sourceEvent)!=null&&a.internal)&&(s==null||s(o.sourceEvent,Zu(o.transform)))}}function AL({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:s,onPaneContextMenu:o}){return i=>{var a;if(!((a=i.sourceEvent)!=null&&a.internal)&&(e.isZoomingOrPanning=!1,o&&p1(t,e.mouseButton??0)&&!e.usedRightMouseButton&&i.sourceEvent&&o(i.sourceEvent),e.usedRightMouseButton=!1,r(!1),s)){const l=Zu(i.transform);e.prevViewport=l,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{s==null||s(i.sourceEvent,l)},n?150:0)}}}function OL({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:s,zoomOnDoubleClick:o,userSelectionActive:i,noWheelClassName:a,noPanClassName:l,lib:u,connectionInProgress:d}){return c=>{var w;const f=e||t,m=n&&c.ctrlKey,p=c.type==="wheel";if(c.button===1&&c.type==="mousedown"&&(Bs(c,`${u}-flow__node`)||Bs(c,`${u}-flow__edge`)))return!0;if(!r&&!f&&!s&&!o&&!n||i||d&&!p||Bs(c,a)&&p||Bs(c,l)&&(!p||s&&p&&!e)||!n&&c.ctrlKey&&p)return!1;if(!n&&c.type==="touchstart"&&((w=c.touches)==null?void 0:w.length)>1)return c.preventDefault(),!1;if(!f&&!s&&!m&&p||!r&&(c.type==="mousedown"||c.type==="touchstart")||Array.isArray(r)&&!r.includes(c.button)&&c.type==="mousedown")return!1;const x=Array.isArray(r)&&r.includes(c.button)||!c.button||c.button<=1;return(!c.ctrlKey||p)&&x}}function FL({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:s,onPanZoom:o,onPanZoomStart:i,onPanZoomEnd:a,onDraggingChange:l}){const u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},d=e.getBoundingClientRect(),c=Bw().scaleExtent([t,n]).translateExtent(r),f=Nt(e).call(c);v({x:s.x,y:s.y,zoom:ko(s.zoom,t,n)},[[0,0],[d.width,d.height]],r);const m=f.on("wheel.zoom"),p=f.on("dblclick.zoom");c.wheelDelta(m1);function x(P,R){return f?new Promise($=>{c==null||c.interpolate((R==null?void 0:R.interpolate)==="linear"?bi:bl).transform(Yc(f,R==null?void 0:R.duration,R==null?void 0:R.ease,()=>$(!0)),P)}):Promise.resolve(!1)}function w({noWheelClassName:P,noPanClassName:R,onPaneContextMenu:$,userSelectionActive:k,panOnScroll:I,panOnDrag:A,panOnScrollMode:F,panOnScrollSpeed:N,preventScrolling:T,zoomOnPinch:D,zoomOnScroll:B,zoomOnDoubleClick:H,zoomActivationKeyPressed:K,lib:V,onTransformChange:X,connectionInProgress:Q,paneClickDistance:Y,selectionOnDrag:W}){k&&!u.isZoomingOrPanning&&g();const Z=I&&!K&&!k;c.clickDistance(W?1/0:!en(Y)||Y<0?0:Y);const oe=Z?ML({zoomPanValues:u,noWheelClassName:P,d3Selection:f,d3Zoom:c,panOnScrollMode:F,panOnScrollSpeed:N,zoomOnPinch:D,onPanZoomStart:i,onPanZoom:o,onPanZoomEnd:a}):TL({noWheelClassName:P,preventScrolling:T,d3ZoomHandler:m});if(f.on("wheel.zoom",oe,{passive:!1}),!k){const J=LL({zoomPanValues:u,onDraggingChange:l,onPanZoomStart:i});c.on("start",J);const te=IL({zoomPanValues:u,panOnDrag:A,onPaneContextMenu:!!$,onPanZoom:o,onTransformChange:X});c.on("zoom",te);const he=AL({zoomPanValues:u,panOnDrag:A,panOnScroll:I,onPaneContextMenu:$,onPanZoomEnd:a,onDraggingChange:l});c.on("end",he)}const re=OL({zoomActivationKeyPressed:K,panOnDrag:A,zoomOnScroll:B,panOnScroll:I,zoomOnDoubleClick:H,zoomOnPinch:D,userSelectionActive:k,noPanClassName:R,noWheelClassName:P,lib:V,connectionInProgress:Q});c.filter(re),H?f.on("dblclick.zoom",p):f.on("dblclick.zoom",null)}function g(){c.on("zoom",null)}async function v(P,R,$){const k=Xc(P),I=c==null?void 0:c.constrain()(k,R,$);return I&&await x(I),new Promise(A=>A(I))}async function y(P,R){const $=Xc(P);return await x($,R),new Promise(k=>k($))}function S(P){if(f){const R=Xc(P),$=f.property("__zoom");($.k!==P.zoom||$.x!==P.x||$.y!==P.y)&&(c==null||c.transform(f,R,null,{sync:!0}))}}function E(){const P=f?$w(f.node()):{x:0,y:0,k:1};return{x:P.x,y:P.y,zoom:P.k}}function b(P,R){return f?new Promise($=>{c==null||c.interpolate((R==null?void 0:R.interpolate)==="linear"?bi:bl).scaleTo(Yc(f,R==null?void 0:R.duration,R==null?void 0:R.ease,()=>$(!0)),P)}):Promise.resolve(!1)}function _(P,R){return f?new Promise($=>{c==null||c.interpolate((R==null?void 0:R.interpolate)==="linear"?bi:bl).scaleBy(Yc(f,R==null?void 0:R.duration,R==null?void 0:R.ease,()=>$(!0)),P)}):Promise.resolve(!1)}function C(P){c==null||c.scaleExtent(P)}function M(P){c==null||c.translateExtent(P)}function L(P){const R=!en(P)||P<0?0:P;c==null||c.clickDistance(R)}return{update:w,destroy:g,setViewport:y,setViewportConstrained:v,getViewport:E,scaleTo:b,scaleBy:_,setScaleExtent:C,setTranslateExtent:M,syncViewport:S,setClickDistance:L}}var jo;(function(e){e.Line="line",e.Handle="handle"})(jo||(jo={}));function DL({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:s,affectsY:o}){const i=e-t,a=n-r,l=[i>0?1:i<0?-1:0,a>0?1:a<0?-1:0];return i&&s&&(l[0]=l[0]*-1),a&&o&&(l[1]=l[1]*-1),l}function Zg(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),r=e.includes("left"),s=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:r,affectsY:s}}function Xn(e,t){return Math.max(0,t-e)}function Yn(e,t){return Math.max(0,e-t)}function nl(e,t,n){return Math.max(0,t-e,e-n)}function Jg(e,t){return e?!t:t}function zL(e,t,n,r,s,o,i,a){let{affectsX:l,affectsY:u}=t;const{isHorizontal:d,isVertical:c}=t,f=d&&c,{xSnapped:m,ySnapped:p}=n,{minWidth:x,maxWidth:w,minHeight:g,maxHeight:v}=r,{x:y,y:S,width:E,height:b,aspectRatio:_}=e;let C=Math.floor(d?m-e.pointerX:0),M=Math.floor(c?p-e.pointerY:0);const L=E+(l?-C:C),P=b+(u?-M:M),R=-o[0]*E,$=-o[1]*b;let k=nl(L,x,w),I=nl(P,g,v);if(i){let N=0,T=0;l&&C<0?N=Xn(y+C+R,i[0][0]):!l&&C>0&&(N=Yn(y+L+R,i[1][0])),u&&M<0?T=Xn(S+M+$,i[0][1]):!u&&M>0&&(T=Yn(S+P+$,i[1][1])),k=Math.max(k,N),I=Math.max(I,T)}if(a){let N=0,T=0;l&&C>0?N=Yn(y+C,a[0][0]):!l&&C<0&&(N=Xn(y+L,a[1][0])),u&&M>0?T=Yn(S+M,a[0][1]):!u&&M<0&&(T=Xn(S+P,a[1][1])),k=Math.max(k,N),I=Math.max(I,T)}if(s){if(d){const N=nl(L/_,g,v)*_;if(k=Math.max(k,N),i){let T=0;!l&&!u||l&&!u&&f?T=Yn(S+$+L/_,i[1][1])*_:T=Xn(S+$+(l?C:-C)/_,i[0][1])*_,k=Math.max(k,T)}if(a){let T=0;!l&&!u||l&&!u&&f?T=Xn(S+L/_,a[1][1])*_:T=Yn(S+(l?C:-C)/_,a[0][1])*_,k=Math.max(k,T)}}if(c){const N=nl(P*_,x,w)/_;if(I=Math.max(I,N),i){let T=0;!l&&!u||u&&!l&&f?T=Yn(y+P*_+R,i[1][0])/_:T=Xn(y+(u?M:-M)*_+R,i[0][0])/_,I=Math.max(I,T)}if(a){let T=0;!l&&!u||u&&!l&&f?T=Xn(y+P*_,a[1][0])/_:T=Yn(y+(u?M:-M)*_,a[0][0])/_,I=Math.max(I,T)}}}M=M+(M<0?I:-I),C=C+(C<0?k:-k),s&&(f?L>P*_?M=(Jg(l,u)?-C:C)/_:C=(Jg(l,u)?-M:M)*_:d?(M=C/_,u=l):(C=M*_,l=u));const A=l?y+C:y,F=u?S+M:S;return{width:E+(l?-C:C),height:b+(u?-M:M),x:o[0]*C*(l?-1:1)+A,y:o[1]*M*(u?-1:1)+F}}const g1={width:0,height:0,x:0,y:0},$L={...g1,pointerX:0,pointerY:0,aspectRatio:1};function BL(e){return[[0,0],[e.measured.width,e.measured.height]]}function HL(e,t,n){const r=t.position.x+e.position.x,s=t.position.y+e.position.y,o=e.measured.width??0,i=e.measured.height??0,a=n[0]*o,l=n[1]*i;return[[r-a,s-l],[r+o-a,s+i-l]]}function UL({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:s}){const o=Nt(e);let i={controlDirection:Zg("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function a({controlPosition:u,boundaries:d,keepAspectRatio:c,resizeDirection:f,onResizeStart:m,onResize:p,onResizeEnd:x,shouldResize:w}){let g={...g1},v={...$L};i={boundaries:d,resizeDirection:f,keepAspectRatio:c,controlDirection:Zg(u)};let y,S=null,E=[],b,_,C,M=!1;const L=Nw().on("start",P=>{const{nodeLookup:R,transform:$,snapGrid:k,snapToGrid:I,nodeOrigin:A,paneDomNode:F}=n();if(y=R.get(t),!y)return;S=(F==null?void 0:F.getBoundingClientRect())??null;const{xSnapped:N,ySnapped:T}=Ei(P.sourceEvent,{transform:$,snapGrid:k,snapToGrid:I,containerBounds:S});g={width:y.measured.width??0,height:y.measured.height??0,x:y.position.x??0,y:y.position.y??0},v={...g,pointerX:N,pointerY:T,aspectRatio:g.width/g.height},b=void 0,y.parentId&&(y.extent==="parent"||y.expandParent)&&(b=R.get(y.parentId),_=b&&y.extent==="parent"?BL(b):void 0),E=[],C=void 0;for(const[D,B]of R)if(B.parentId===t&&(E.push({id:D,position:{...B.position},extent:B.extent}),B.extent==="parent"||B.expandParent)){const H=HL(B,y,B.origin??A);C?C=[[Math.min(H[0][0],C[0][0]),Math.min(H[0][1],C[0][1])],[Math.max(H[1][0],C[1][0]),Math.max(H[1][1],C[1][1])]]:C=H}m==null||m(P,{...g})}).on("drag",P=>{const{transform:R,snapGrid:$,snapToGrid:k,nodeOrigin:I}=n(),A=Ei(P.sourceEvent,{transform:R,snapGrid:$,snapToGrid:k,containerBounds:S}),F=[];if(!y)return;const{x:N,y:T,width:D,height:B}=g,H={},K=y.origin??I,{width:V,height:X,x:Q,y:Y}=zL(v,i.controlDirection,A,i.boundaries,i.keepAspectRatio,K,_,C),W=V!==D,Z=X!==B,oe=Q!==N&&W,re=Y!==T&&Z;if(!oe&&!re&&!W&&!Z)return;if((oe||re||K[0]===1||K[1]===1)&&(H.x=oe?Q:g.x,H.y=re?Y:g.y,g.x=H.x,g.y=H.y,E.length>0)){const ye=Q-N,ce=Y-T;for(const $e of E)$e.position={x:$e.position.x-ye+K[0]*(V-D),y:$e.position.y-ce+K[1]*(X-B)},F.push($e)}if((W||Z)&&(H.width=W&&(!i.resizeDirection||i.resizeDirection==="horizontal")?V:g.width,H.height=Z&&(!i.resizeDirection||i.resizeDirection==="vertical")?X:g.height,g.width=H.width,g.height=H.height),b&&y.expandParent){const ye=K[0]*(H.width??0);H.x&&H.x<ye&&(g.x=ye,v.x=v.x-(H.x-ye));const ce=K[1]*(H.height??0);H.y&&H.y<ce&&(g.y=ce,v.y=v.y-(H.y-ce))}const J=DL({width:g.width,prevWidth:D,height:g.height,prevHeight:B,affectsX:i.controlDirection.affectsX,affectsY:i.controlDirection.affectsY}),te={...g,direction:J};(w==null?void 0:w(P,te))!==!1&&(M=!0,p==null||p(P,te),r(H,F))}).on("end",P=>{M&&(x==null||x(P,{...g}),s==null||s({...g}),M=!1)});o.call(L)}function l(){o.on(".drag",null)}return{update:a,destroy:l}}const VL={},ey=e=>{let t;const n=new Set,r=(d,c)=>{const f=typeof d=="function"?d(t):d;if(!Object.is(f,t)){const m=t;t=c??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(p=>p(t,m))}},s=()=>t,l={setState:r,getState:s,getInitialState:()=>u,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{(VL?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(r,s,l);return l},WL=e=>e?ey(e):ey,{useDebugValue:KL}=ls,{useSyncExternalStoreWithSelector:qL}=IN,QL=e=>e;function y1(e,t=QL,n){const r=qL(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return KL(r),r}const ty=(e,t)=>{const n=WL(e),r=(s,o=t)=>y1(n,s,o);return Object.assign(r,n),r},GL=(e,t)=>e?ty(e,t):ty;function Ee(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,s]of e)if(!Object.is(s,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}const Ju=j.createContext(null),XL=Ju.Provider,x1=bn.error001();function fe(e,t){const n=j.useContext(Ju);if(n===null)throw new Error(x1);return y1(n,e,t)}function Ce(){const e=j.useContext(Ju);if(e===null)throw new Error(x1);return j.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const ny={display:"none"},YL={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},v1="react-flow__node-desc",w1="react-flow__edge-desc",ZL="react-flow__aria-live",JL=e=>e.ariaLiveMessage,eI=e=>e.ariaLabelConfig;function tI({rfId:e}){const t=fe(JL);return h.jsx("div",{id:`${ZL}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:YL,children:t})}function nI({rfId:e,disableKeyboardA11y:t}){const n=fe(eI);return h.jsxs(h.Fragment,{children:[h.jsx("div",{id:`${v1}-${e}`,style:ny,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),h.jsx("div",{id:`${w1}-${e}`,style:ny,children:n["edge.a11yDescription.default"]}),!t&&h.jsx(tI,{rfId:e})]})}const Ea=j.forwardRef(({position:e="top-left",children:t,className:n,style:r,...s},o)=>{const i=`${e}`.split("-");return h.jsx("div",{className:Oe(["react-flow__panel",n,...i]),style:r,ref:o,...s,children:t})});Ea.displayName="Panel";function rI({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:h.jsx(Ea,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:h.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const sI=e=>{const t=[],n=[];for(const[,r]of e.nodeLookup)r.selected&&t.push(r.internals.userNode);for(const[,r]of e.edgeLookup)r.selected&&n.push(r);return{selectedNodes:t,selectedEdges:n}},rl=e=>e.id;function oI(e,t){return Ee(e.selectedNodes.map(rl),t.selectedNodes.map(rl))&&Ee(e.selectedEdges.map(rl),t.selectedEdges.map(rl))}function iI({onSelectionChange:e}){const t=Ce(),{selectedNodes:n,selectedEdges:r}=fe(sI,oI);return j.useEffect(()=>{const s={nodes:n,edges:r};e==null||e(s),t.getState().onSelectionChangeHandlers.forEach(o=>o(s))},[n,r,e]),null}const aI=e=>!!e.onSelectionChangeHandlers;function lI({onSelectionChange:e}){const t=fe(aI);return e||t?h.jsx(iI,{onSelectionChange:e}):null}const S1=[0,0],uI={x:0,y:0,zoom:1},cI=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],ry=[...cI,"rfId"],dI=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}),sy={translateExtent:Xi,nodeOrigin:S1,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function fI(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:s,setTranslateExtent:o,setNodeExtent:i,reset:a,setDefaultNodesAndEdges:l}=fe(dI,Ee),u=Ce();j.useEffect(()=>(l(e.defaultNodes,e.defaultEdges),()=>{d.current=sy,a()}),[]);const d=j.useRef(sy);return j.useEffect(()=>{for(const c of ry){const f=e[c],m=d.current[c];f!==m&&(typeof e[c]>"u"||(c==="nodes"?t(f):c==="edges"?n(f):c==="minZoom"?r(f):c==="maxZoom"?s(f):c==="translateExtent"?o(f):c==="nodeExtent"?i(f):c==="ariaLabelConfig"?u.setState({ariaLabelConfig:tL(f)}):c==="fitView"?u.setState({fitViewQueued:f}):c==="fitViewOptions"?u.setState({fitViewOptions:f}):u.setState({[c]:f})))}d.current=e},ry.map(c=>e[c])),null}function oy(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function hI(e){var r;const[t,n]=j.useState(e==="system"?null:e);return j.useEffect(()=>{if(e!=="system"){n(e);return}const s=oy(),o=()=>n(s!=null&&s.matches?"dark":"light");return o(),s==null||s.addEventListener("change",o),()=>{s==null||s.removeEventListener("change",o)}},[e]),t!==null?t:(r=oy())!=null&&r.matches?"dark":"light"}const iy=typeof document<"u"?document:null;function ea(e=null,t={target:iy,actInsideInputWithModifier:!0}){const[n,r]=j.useState(!1),s=j.useRef(!1),o=j.useRef(new Set([])),[i,a]=j.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(c=>typeof c=="string").map(c=>c.replace("+",`
|
|
62
62
|
`).replace(`
|
|
63
63
|
|
|
64
64
|
`,`
|
|
65
65
|
+`).split(`
|
|
66
|
-
`)),d=u.reduce((c,f)=>c.concat(...f),[]);return[u,d]}return[[],[]]},[e]);return R.useEffect(()=>{const l=(t==null?void 0:t.target)??iy,u=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const d=m=>{var w,g;if(s.current=m.ctrlKey||m.metaKey||m.shiftKey||m.altKey,(!s.current||s.current&&!u)&&e1(m))return!1;const x=ly(m.code,a);if(o.current.add(m[x]),ay(i,o.current,!1)){const v=((g=(w=m.composedPath)==null?void 0:w.call(m))==null?void 0:g[0])||m.target,y=(v==null?void 0:v.nodeName)==="BUTTON"||(v==null?void 0:v.nodeName)==="A";t.preventDefault!==!1&&(s.current||!y)&&m.preventDefault(),r(!0)}},c=m=>{const p=ly(m.code,a);ay(i,o.current,!0)?(r(!1),o.current.clear()):o.current.delete(m[p]),m.key==="Meta"&&o.current.clear(),s.current=!1},f=()=>{o.current.clear(),r(!1)};return l==null||l.addEventListener("keydown",d),l==null||l.addEventListener("keyup",c),window.addEventListener("blur",f),window.addEventListener("contextmenu",f),()=>{l==null||l.removeEventListener("keydown",d),l==null||l.removeEventListener("keyup",c),window.removeEventListener("blur",f),window.removeEventListener("contextmenu",f)}}},[e,r]),n}function ay(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(s=>t.has(s)))}function ly(e,t){return t.includes(e)?"code":"key"}const hI=()=>{const e=Ce();return R.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(t,{duration:n==null?void 0:n.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[r,s,o],panZoom:i}=e.getState();return i?(await i.setViewport({x:t.x??r,y:t.y??s,zoom:t.zoom??o},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{const{width:r,height:s,minZoom:o,maxZoom:i,panZoom:a}=e.getState(),l=np(t,r,s,o,i,(n==null?void 0:n.padding)??.1);return a?(await a.setViewport(l,{duration:n==null?void 0:n.duration,ease:n==null?void 0:n.ease,interpolate:n==null?void 0:n.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:r,snapGrid:s,snapToGrid:o,domNode:i}=e.getState();if(!i)return t;const{x:a,y:l}=i.getBoundingClientRect(),u={x:t.x-a,y:t.y-l},d=n.snapGrid??s,c=n.snapToGrid??o;return ba(u,r,c,d)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:s,y:o}=r.getBoundingClientRect(),i=yu(t,n);return{x:i.x+s,y:i.y+o}}}),[])};function _1(e,t){const n=[],r=new Map,s=[];for(const o of e)if(o.type==="add"){s.push(o);continue}else if(o.type==="remove"||o.type==="replace")r.set(o.id,[o]);else{const i=r.get(o.id);i?i.push(o):r.set(o.id,[o])}for(const o of t){const i=r.get(o.id);if(!i){n.push(o);continue}if(i[0].type==="remove")continue;if(i[0].type==="replace"){n.push({...i[0].item});continue}const a={...o};for(const l of i)pI(l,a);n.push(a)}return s.length&&s.forEach(o=>{o.index!==void 0?n.splice(o.index,0,{...o.item}):n.push({...o.item})}),n}function pI(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function b1(e,t){return _1(e,t)}function E1(e,t){return _1(e,t)}function Or(e,t){return{id:e,type:"select",selected:t}}function Hs(e,t=new Set,n=!1){const r=[];for(const[s,o]of e){const i=t.has(s);!(o.selected===void 0&&!i)&&o.selected!==i&&(n&&(o.selected=i),r.push(Or(o.id,i)))}return r}function uy({items:e=[],lookup:t}){var s;const n=[],r=new Map(e.map(o=>[o.id,o]));for(const[o,i]of e.entries()){const a=t.get(i.id),l=((s=a==null?void 0:a.internals)==null?void 0:s.userNode)??a;l!==void 0&&l!==i&&n.push({id:i.id,item:i,type:"replace"}),l===void 0&&n.push({item:i,type:"add",index:o})}for(const[o]of t)r.get(o)===void 0&&n.push({id:o,type:"remove"});return n}function cy(e){return{id:e.id,type:"remove"}}const dy=e=>VT(e),mI=e=>Kw(e);function C1(e){return R.forwardRef(e)}const gI=typeof window<"u"?R.useLayoutEffect:R.useEffect;function fy(e){const[t,n]=R.useState(BigInt(0)),[r]=R.useState(()=>yI(()=>n(s=>s+BigInt(1))));return gI(()=>{const s=r.get();s.length&&(e(s),r.reset())},[t]),r}function yI(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const N1=R.createContext(null);function xI({children:e}){const t=Ce(),n=R.useCallback(a=>{const{nodes:l=[],setNodes:u,hasDefaultNodes:d,onNodesChange:c,nodeLookup:f,fitViewQueued:m,onNodesChangeMiddlewareMap:p}=t.getState();let x=l;for(const g of a)x=typeof g=="function"?g(x):g;let w=uy({items:x,lookup:f});for(const g of p.values())w=g(w);d&&u(x),w.length>0?c==null||c(w):m&&window.requestAnimationFrame(()=>{const{fitViewQueued:g,nodes:v,setNodes:y}=t.getState();g&&y(v)})},[]),r=fy(n),s=R.useCallback(a=>{const{edges:l=[],setEdges:u,hasDefaultEdges:d,onEdgesChange:c,edgeLookup:f}=t.getState();let m=l;for(const p of a)m=typeof p=="function"?p(m):p;d?u(m):c&&c(uy({items:m,lookup:f}))},[]),o=fy(s),i=R.useMemo(()=>({nodeQueue:r,edgeQueue:o}),[]);return h.jsx(N1.Provider,{value:i,children:e})}function vI(){const e=R.useContext(N1);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const wI=e=>!!e.panZoom;function up(){const e=hI(),t=Ce(),n=vI(),r=fe(wI),s=R.useMemo(()=>{const o=c=>t.getState().nodeLookup.get(c),i=c=>{n.nodeQueue.push(c)},a=c=>{n.edgeQueue.push(c)},l=c=>{var g,v;const{nodeLookup:f,nodeOrigin:m}=t.getState(),p=dy(c)?c:f.get(c.id),x=p.parentId?Zw(p.position,p.measured,p.parentId,f,m):p.position,w={...p,position:x,width:((g=p.measured)==null?void 0:g.width)??p.width,height:((v=p.measured)==null?void 0:v.height)??p.height};return Po(w)},u=(c,f,m={replace:!1})=>{i(p=>p.map(x=>{if(x.id===c){const w=typeof f=="function"?f(x):f;return m.replace&&dy(w)?w:{...x,...w}}return x}))},d=(c,f,m={replace:!1})=>{a(p=>p.map(x=>{if(x.id===c){const w=typeof f=="function"?f(x):f;return m.replace&&mI(w)?w:{...x,...w}}return x}))};return{getNodes:()=>t.getState().nodes.map(c=>({...c})),getNode:c=>{var f;return(f=o(c))==null?void 0:f.internals.userNode},getInternalNode:o,getEdges:()=>{const{edges:c=[]}=t.getState();return c.map(f=>({...f}))},getEdge:c=>t.getState().edgeLookup.get(c),setNodes:i,setEdges:a,addNodes:c=>{const f=Array.isArray(c)?c:[c];n.nodeQueue.push(m=>[...m,...f])},addEdges:c=>{const f=Array.isArray(c)?c:[c];n.edgeQueue.push(m=>[...m,...f])},toObject:()=>{const{nodes:c=[],edges:f=[],transform:m}=t.getState(),[p,x,w]=m;return{nodes:c.map(g=>({...g})),edges:f.map(g=>({...g})),viewport:{x:p,y:x,zoom:w}}},deleteElements:async({nodes:c=[],edges:f=[]})=>{const{nodes:m,edges:p,onNodesDelete:x,onEdgesDelete:w,triggerNodeChanges:g,triggerEdgeChanges:v,onDelete:y,onBeforeDelete:S}=t.getState(),{nodes:E,edges:_}=await GT({nodesToRemove:c,edgesToRemove:f,nodes:m,edges:p,onBeforeDelete:S}),b=_.length>0,C=E.length>0;if(b){const L=_.map(cy);w==null||w(_),v(L)}if(C){const L=E.map(cy);x==null||x(E),g(L)}return(C||b)&&(y==null||y({nodes:E,edges:_})),{deletedNodes:E,deletedEdges:_}},getIntersectingNodes:(c,f=!0,m)=>{const p=Bg(c),x=p?c:l(c),w=m!==void 0;return x?(m||t.getState().nodes).filter(g=>{const v=t.getState().nodeLookup.get(g.id);if(v&&!p&&(g.id===c.id||!v.internals.positionAbsolute))return!1;const y=Po(w?g:v),S=Zi(y,x);return f&&S>0||S>=y.width*y.height||S>=x.width*x.height}):[]},isNodeIntersecting:(c,f,m=!0)=>{const x=Bg(c)?c:l(c);if(!x)return!1;const w=Zi(x,f);return m&&w>0||w>=f.width*f.height||w>=x.width*x.height},updateNode:u,updateNodeData:(c,f,m={replace:!1})=>{u(c,p=>{const x=typeof f=="function"?f(p):f;return m.replace?{...p,data:x}:{...p,data:{...p.data,...x}}},m)},updateEdge:d,updateEdgeData:(c,f,m={replace:!1})=>{d(c,p=>{const x=typeof f=="function"?f(p):f;return m.replace?{...p,data:x}:{...p,data:{...p.data,...x}}},m)},getNodesBounds:c=>{const{nodeLookup:f,nodeOrigin:m}=t.getState();return WT(c,{nodeLookup:f,nodeOrigin:m})},getHandleConnections:({type:c,id:f,nodeId:m})=>{var p;return Array.from(((p=t.getState().connectionLookup.get(`${m}-${c}${f?`-${f}`:""}`))==null?void 0:p.values())??[])},getNodeConnections:({type:c,handleId:f,nodeId:m})=>{var p;return Array.from(((p=t.getState().connectionLookup.get(`${m}${c?f?`-${c}-${f}`:`-${c}`:""}`))==null?void 0:p.values())??[])},fitView:async c=>{const f=t.getState().fitViewResolver??JT();return t.setState({fitViewQueued:!0,fitViewOptions:c,fitViewResolver:f}),n.nodeQueue.push(m=>[...m]),f.promise}}},[]);return R.useMemo(()=>({...s,...e,viewportInitialized:r}),[r])}const hy=e=>e.selected,SI=typeof window<"u"?window:void 0;function _I({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=Ce(),{deleteElements:r}=up(),s=ea(e,{actInsideInputWithModifier:!1}),o=ea(t,{target:SI});R.useEffect(()=>{if(s){const{edges:i,nodes:a}=n.getState();r({nodes:a.filter(hy),edges:i.filter(hy)}),n.setState({nodesSelectionActive:!1})}},[s]),R.useEffect(()=>{n.setState({multiSelectionActive:o})},[o])}function bI(e){const t=Ce();R.useEffect(()=>{const n=()=>{var s,o,i,a;if(!e.current||!(((o=(s=e.current).checkVisibility)==null?void 0:o.call(s))??!0))return!1;const r=rp(e.current);(r.height===0||r.width===0)&&((a=(i=t.getState()).onError)==null||a.call(i,"004",bn.error004())),t.setState({width:r.width||500,height:r.height||500})};if(e.current){n(),window.addEventListener("resize",n);const r=new ResizeObserver(()=>n());return r.observe(e.current),()=>{window.removeEventListener("resize",n),r&&e.current&&r.unobserve(e.current)}}},[])}const ec={position:"absolute",width:"100%",height:"100%",top:0,left:0},EI=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function CI({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:s=.5,panOnScrollMode:o=as.Free,zoomOnDoubleClick:i=!0,panOnDrag:a=!0,defaultViewport:l,translateExtent:u,minZoom:d,maxZoom:c,zoomActivationKeyCode:f,preventScrolling:m=!0,children:p,noWheelClassName:x,noPanClassName:w,onViewportChange:g,isControlledViewport:v,paneClickDistance:y,selectionOnDrag:S}){const E=Ce(),_=R.useRef(null),{userSelectionActive:b,lib:C,connectionInProgress:L}=fe(EI,Ee),M=ea(f),P=R.useRef();bI(_);const j=R.useCallback(O=>{g==null||g({x:O[0],y:O[1],zoom:O[2]}),v||E.setState({transform:O})},[g,v]);return R.useEffect(()=>{if(_.current){P.current=OL({domNode:_.current,minZoom:d,maxZoom:c,translateExtent:u,viewport:l,onDraggingChange:I=>E.setState({paneDragging:I}),onPanZoomStart:(I,F)=>{const{onViewportChangeStart:N,onMoveStart:T}=E.getState();T==null||T(I,F),N==null||N(F)},onPanZoom:(I,F)=>{const{onViewportChange:N,onMove:T}=E.getState();T==null||T(I,F),N==null||N(F)},onPanZoomEnd:(I,F)=>{const{onViewportChangeEnd:N,onMoveEnd:T}=E.getState();T==null||T(I,F),N==null||N(F)}});const{x:O,y:k,zoom:D}=P.current.getViewport();return E.setState({panZoom:P.current,transform:[O,k,D],domNode:_.current.closest(".react-flow")}),()=>{var I;(I=P.current)==null||I.destroy()}}},[]),R.useEffect(()=>{var O;(O=P.current)==null||O.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:s,panOnScrollMode:o,zoomOnDoubleClick:i,panOnDrag:a,zoomActivationKeyPressed:M,preventScrolling:m,noPanClassName:w,userSelectionActive:b,noWheelClassName:x,lib:C,onTransformChange:j,connectionInProgress:L,selectionOnDrag:S,paneClickDistance:y})},[e,t,n,r,s,o,i,a,M,m,w,b,x,C,j,L,S,y]),h.jsx("div",{className:"react-flow__renderer",ref:_,style:ec,children:p})}const NI=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function kI(){const{userSelectionActive:e,userSelectionRect:t}=fe(NI,Ee);return e&&t?h.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const Zc=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},PI=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function RI({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Yi.Full,panOnDrag:r,paneClickDistance:s,selectionOnDrag:o,onSelectionStart:i,onSelectionEnd:a,onPaneClick:l,onPaneContextMenu:u,onPaneScroll:d,onPaneMouseEnter:c,onPaneMouseMove:f,onPaneMouseLeave:m,children:p}){const x=Ce(),{userSelectionActive:w,elementsSelectable:g,dragging:v,connectionInProgress:y}=fe(PI,Ee),S=g&&(e||w),E=R.useRef(null),_=R.useRef(),b=R.useRef(new Set),C=R.useRef(new Set),L=R.useRef(!1),M=N=>{if(L.current||y){L.current=!1;return}l==null||l(N),x.getState().resetSelectedElements(),x.setState({nodesSelectionActive:!1})},P=N=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){N.preventDefault();return}u==null||u(N)},j=d?N=>d(N):void 0,O=N=>{L.current&&(N.stopPropagation(),L.current=!1)},k=N=>{var X,Q;const{domNode:T}=x.getState();if(_.current=T==null?void 0:T.getBoundingClientRect(),!_.current)return;const z=N.target===E.current;if(!z&&!!N.target.closest(".nokey")||!e||!(o&&z||t)||N.button!==0||!N.isPrimary)return;(Q=(X=N.target)==null?void 0:X.setPointerCapture)==null||Q.call(X,N.pointerId),L.current=!1;const{x:K,y:V}=tn(N.nativeEvent,_.current);x.setState({userSelectionRect:{width:0,height:0,startX:K,startY:V,x:K,y:V}}),z||(N.stopPropagation(),N.preventDefault())},D=N=>{const{userSelectionRect:T,transform:z,nodeLookup:B,edgeLookup:H,connectionLookup:K,triggerNodeChanges:V,triggerEdgeChanges:X,defaultEdgeOptions:Q,resetSelectedElements:Y}=x.getState();if(!_.current||!T)return;const{x:W,y:Z}=tn(N.nativeEvent,_.current),{startX:oe,startY:re}=T;if(!L.current){const ce=t?0:s;if(Math.hypot(W-oe,Z-re)<=ce)return;Y(),i==null||i(N)}L.current=!0;const J={startX:oe,startY:re,x:W<oe?W:oe,y:Z<re?Z:re,width:Math.abs(W-oe),height:Math.abs(Z-re)},te=b.current,he=C.current;b.current=new Set(tp(B,J,z,n===Yi.Partial,!0).map(ce=>ce.id)),C.current=new Set;const ye=(Q==null?void 0:Q.selectable)??!0;for(const ce of b.current){const $e=K.get(ce);if($e)for(const{edgeId:un}of $e.values()){const dt=H.get(un);dt&&(dt.selectable??ye)&&C.current.add(un)}}if(!Hg(te,b.current)){const ce=Hs(B,b.current,!0);V(ce)}if(!Hg(he,C.current)){const ce=Hs(H,C.current);X(ce)}x.setState({userSelectionRect:J,userSelectionActive:!0,nodesSelectionActive:!1})},I=N=>{var T,z;N.button===0&&((z=(T=N.target)==null?void 0:T.releasePointerCapture)==null||z.call(T,N.pointerId),!w&&N.target===E.current&&x.getState().userSelectionRect&&(M==null||M(N)),x.setState({userSelectionActive:!1,userSelectionRect:null}),L.current&&(a==null||a(N),x.setState({nodesSelectionActive:b.current.size>0})))},F=r===!0||Array.isArray(r)&&r.includes(0);return h.jsxs("div",{className:Oe(["react-flow__pane",{draggable:F,dragging:v,selection:e}]),onClick:S?void 0:Zc(M,E),onContextMenu:Zc(P,E),onWheel:Zc(j,E),onPointerEnter:S?void 0:c,onPointerMove:S?D:f,onPointerUp:S?I:void 0,onPointerDownCapture:S?k:void 0,onClickCapture:S?O:void 0,onPointerLeave:m,ref:E,style:ec,children:[p,h.jsx(kI,{})]})}function Pf({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:s,unselectNodesAndEdges:o,multiSelectionActive:i,nodeLookup:a,onError:l}=t.getState(),u=a.get(e);if(!u){l==null||l("012",bn.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&i)&&(o({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var d;return(d=r==null?void 0:r.current)==null?void 0:d.blur()})):s([e])}function k1({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:s,isSelectable:o,nodeClickDistance:i}){const a=Ce(),[l,u]=R.useState(!1),d=R.useRef();return R.useEffect(()=>{d.current=_L({getStoreItems:()=>a.getState(),onNodeMouseDown:c=>{Pf({id:c,store:a,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),R.useEffect(()=>{var c,f;if(t)(c=d.current)==null||c.destroy();else if(e.current)return(f=d.current)==null||f.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:o,nodeId:s,nodeClickDistance:i}),()=>{var m;(m=d.current)==null||m.destroy()}},[n,r,t,o,e,s]),l}const jI=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function P1(){const e=Ce();return R.useCallback(n=>{const{nodeExtent:r,snapToGrid:s,snapGrid:o,nodesDraggable:i,onError:a,updateNodePositions:l,nodeLookup:u,nodeOrigin:d}=e.getState(),c=new Map,f=jI(i),m=s?o[0]:5,p=s?o[1]:5,x=n.direction.x*m*n.factor,w=n.direction.y*p*n.factor;for(const[,g]of u){if(!f(g))continue;let v={x:g.internals.positionAbsolute.x+x,y:g.internals.positionAbsolute.y+w};s&&(v=_a(v,o));const{position:y,positionAbsolute:S}=qw({nodeId:g.id,nextPosition:v,nodeLookup:u,nodeExtent:r,nodeOrigin:d,onError:a});g.position=y,g.internals.positionAbsolute=S,c.set(g.id,g)}l(c)},[])}const cp=R.createContext(null),MI=cp.Provider;cp.Consumer;const R1=()=>R.useContext(cp),TI=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),LI=(e,t,n)=>r=>{const{connectionClickStartHandle:s,connectionMode:o,connection:i}=r,{fromHandle:a,toHandle:l,isValid:u}=i,d=(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.id)===t&&(l==null?void 0:l.type)===n;return{connectingFrom:(a==null?void 0:a.nodeId)===e&&(a==null?void 0:a.id)===t&&(a==null?void 0:a.type)===n,connectingTo:d,clickConnecting:(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.id)===t&&(s==null?void 0:s.type)===n,isPossibleEndHandle:o===No.Strict?(a==null?void 0:a.type)!==n:e!==(a==null?void 0:a.nodeId)||t!==(a==null?void 0:a.id),connectionInProcess:!!a,clickConnectionInProcess:!!s,valid:d&&u}};function II({type:e="source",position:t=ee.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:s=!0,isConnectableEnd:o=!0,id:i,onConnect:a,children:l,className:u,onMouseDown:d,onTouchStart:c,...f},m){var D,I;const p=i||null,x=e==="target",w=Ce(),g=R1(),{connectOnClick:v,noPanClassName:y,rfId:S}=fe(TI,Ee),{connectingFrom:E,connectingTo:_,clickConnecting:b,isPossibleEndHandle:C,connectionInProcess:L,clickConnectionInProcess:M,valid:P}=fe(LI(g,p,e),Ee);g||(I=(D=w.getState()).onError)==null||I.call(D,"010",bn.error010());const j=F=>{const{defaultEdgeOptions:N,onConnect:T,hasDefaultEdges:z}=w.getState(),B={...N,...F};if(z){const{edges:H,setEdges:K}=w.getState();K(iL(B,H))}T==null||T(B),a==null||a(B)},O=F=>{if(!g)return;const N=t1(F.nativeEvent);if(s&&(N&&F.button===0||!N)){const T=w.getState();kf.onPointerDown(F.nativeEvent,{handleDomNode:F.currentTarget,autoPanOnConnect:T.autoPanOnConnect,connectionMode:T.connectionMode,connectionRadius:T.connectionRadius,domNode:T.domNode,nodeLookup:T.nodeLookup,lib:T.lib,isTarget:x,handleId:p,nodeId:g,flowId:T.rfId,panBy:T.panBy,cancelConnection:T.cancelConnection,onConnectStart:T.onConnectStart,onConnectEnd:T.onConnectEnd,updateConnection:T.updateConnection,onConnect:j,isValidConnection:n||T.isValidConnection,getTransform:()=>w.getState().transform,getFromHandle:()=>w.getState().connection.fromHandle,autoPanSpeed:T.autoPanSpeed,dragThreshold:T.connectionDragThreshold})}N?d==null||d(F):c==null||c(F)},k=F=>{const{onClickConnectStart:N,onClickConnectEnd:T,connectionClickStartHandle:z,connectionMode:B,isValidConnection:H,lib:K,rfId:V,nodeLookup:X,connection:Q}=w.getState();if(!g||!z&&!s)return;if(!z){N==null||N(F.nativeEvent,{nodeId:g,handleId:p,handleType:e}),w.setState({connectionClickStartHandle:{nodeId:g,type:e,id:p}});return}const Y=Jw(F.target),W=n||H,{connection:Z,isValid:oe}=kf.isValid(F.nativeEvent,{handle:{nodeId:g,id:p,type:e},connectionMode:B,fromNodeId:z.nodeId,fromHandleId:z.id||null,fromType:z.type,isValidConnection:W,flowId:V,doc:Y,lib:K,nodeLookup:X});oe&&Z&&j(Z);const re=structuredClone(Q);delete re.inProgress,re.toPosition=re.toHandle?re.toHandle.position:null,T==null||T(F,re),w.setState({connectionClickStartHandle:null})};return h.jsx("div",{"data-handleid":p,"data-nodeid":g,"data-handlepos":t,"data-id":`${S}-${g}-${p}-${e}`,className:Oe(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",y,u,{source:!x,target:x,connectable:r,connectablestart:s,connectableend:o,clickconnecting:b,connectingfrom:E,connectingto:_,valid:P,connectionindicator:r&&(!L||C)&&(L||M?o:s)}]),onMouseDown:O,onTouchStart:O,onClick:v?k:void 0,ref:m,...f,children:l})}const Mo=R.memo(C1(II));function AI({data:e,isConnectable:t,sourcePosition:n=ee.Bottom}){return h.jsxs(h.Fragment,{children:[e==null?void 0:e.label,h.jsx(Mo,{type:"source",position:n,isConnectable:t})]})}function OI({data:e,isConnectable:t,targetPosition:n=ee.Top,sourcePosition:r=ee.Bottom}){return h.jsxs(h.Fragment,{children:[h.jsx(Mo,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,h.jsx(Mo,{type:"source",position:r,isConnectable:t})]})}function FI(){return null}function DI({data:e,isConnectable:t,targetPosition:n=ee.Top}){return h.jsxs(h.Fragment,{children:[h.jsx(Mo,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const xu={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},py={input:AI,default:OI,output:DI,group:FI};function zI(e){var t,n,r,s;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((r=e.style)==null?void 0:r.width),height:e.height??((s=e.style)==null?void 0:s.height)}}const $I=e=>{const{width:t,height:n,x:r,y:s}=Sa(e.nodeLookup,{filter:o=>!!o.selected});return{width:en(t)?t:null,height:en(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${s}px)`}};function BI({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=Ce(),{width:s,height:o,transformString:i,userSelectionActive:a}=fe($I,Ee),l=P1(),u=R.useRef(null);if(R.useEffect(()=>{var f;n||(f=u.current)==null||f.focus({preventScroll:!0})},[n]),k1({nodeRef:u}),a||!s||!o)return null;const d=e?f=>{const m=r.getState().nodes.filter(p=>p.selected);e(f,m)}:void 0,c=f=>{Object.prototype.hasOwnProperty.call(xu,f.key)&&(f.preventDefault(),l({direction:xu[f.key],factor:f.shiftKey?4:1}))};return h.jsx("div",{className:Oe(["react-flow__nodesselection","react-flow__container",t]),style:{transform:i},children:h.jsx("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:d,tabIndex:n?void 0:-1,onKeyDown:n?void 0:c,style:{width:s,height:o}})})}const my=typeof window<"u"?window:void 0,HI=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function j1({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:o,onPaneScroll:i,paneClickDistance:a,deleteKeyCode:l,selectionKeyCode:u,selectionOnDrag:d,selectionMode:c,onSelectionStart:f,onSelectionEnd:m,multiSelectionKeyCode:p,panActivationKeyCode:x,zoomActivationKeyCode:w,elementsSelectable:g,zoomOnScroll:v,zoomOnPinch:y,panOnScroll:S,panOnScrollSpeed:E,panOnScrollMode:_,zoomOnDoubleClick:b,panOnDrag:C,defaultViewport:L,translateExtent:M,minZoom:P,maxZoom:j,preventScrolling:O,onSelectionContextMenu:k,noWheelClassName:D,noPanClassName:I,disableKeyboardA11y:F,onViewportChange:N,isControlledViewport:T}){const{nodesSelectionActive:z,userSelectionActive:B}=fe(HI,Ee),H=ea(u,{target:my}),K=ea(x,{target:my}),V=K||C,X=K||S,Q=d&&V!==!0,Y=H||B||Q;return _I({deleteKeyCode:l,multiSelectionKeyCode:p}),h.jsx(CI,{onPaneContextMenu:o,elementsSelectable:g,zoomOnScroll:v,zoomOnPinch:y,panOnScroll:X,panOnScrollSpeed:E,panOnScrollMode:_,zoomOnDoubleClick:b,panOnDrag:!H&&V,defaultViewport:L,translateExtent:M,minZoom:P,maxZoom:j,zoomActivationKeyCode:w,preventScrolling:O,noWheelClassName:D,noPanClassName:I,onViewportChange:N,isControlledViewport:T,paneClickDistance:a,selectionOnDrag:Q,children:h.jsxs(RI,{onSelectionStart:f,onSelectionEnd:m,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:o,onPaneScroll:i,panOnDrag:V,isSelecting:!!Y,selectionMode:c,selectionKeyPressed:H,paneClickDistance:a,selectionOnDrag:Q,children:[e,z&&h.jsx(BI,{onSelectionContextMenu:k,noPanClassName:I,disableKeyboardA11y:F})]})})}j1.displayName="FlowRenderer";const UI=R.memo(j1),VI=e=>t=>e?tp(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function WI(e){return fe(R.useCallback(VI(e),[e]),Ee)}const KI=e=>e.updateNodeInternals;function qI(){const e=fe(KI),[t]=R.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const r=new Map;n.forEach(s=>{const o=s.target.getAttribute("data-id");r.set(o,{id:o,nodeElement:s.target,force:!0})}),e(r)}));return R.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function QI({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const s=Ce(),o=R.useRef(null),i=R.useRef(null),a=R.useRef(e.sourcePosition),l=R.useRef(e.targetPosition),u=R.useRef(t),d=n&&!!e.internals.handleBounds;return R.useEffect(()=>{o.current&&!e.hidden&&(!d||i.current!==o.current)&&(i.current&&(r==null||r.unobserve(i.current)),r==null||r.observe(o.current),i.current=o.current)},[d,e.hidden]),R.useEffect(()=>()=>{i.current&&(r==null||r.unobserve(i.current),i.current=null)},[]),R.useEffect(()=>{if(o.current){const c=u.current!==t,f=a.current!==e.sourcePosition,m=l.current!==e.targetPosition;(c||f||m)&&(u.current=t,a.current=e.sourcePosition,l.current=e.targetPosition,s.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:o.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),o}function GI({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:s,onContextMenu:o,onDoubleClick:i,nodesDraggable:a,elementsSelectable:l,nodesConnectable:u,nodesFocusable:d,resizeObserver:c,noDragClassName:f,noPanClassName:m,disableKeyboardA11y:p,rfId:x,nodeTypes:w,nodeClickDistance:g,onError:v}){const{node:y,internals:S,isParent:E}=fe(W=>{const Z=W.nodeLookup.get(e),oe=W.parentLookup.has(e);return{node:Z,internals:Z.internals,isParent:oe}},Ee);let _=y.type||"default",b=(w==null?void 0:w[_])||py[_];b===void 0&&(v==null||v("003",bn.error003(_)),_="default",b=(w==null?void 0:w.default)||py.default);const C=!!(y.draggable||a&&typeof y.draggable>"u"),L=!!(y.selectable||l&&typeof y.selectable>"u"),M=!!(y.connectable||u&&typeof y.connectable>"u"),P=!!(y.focusable||d&&typeof y.focusable>"u"),j=Ce(),O=Yw(y),k=QI({node:y,nodeType:_,hasDimensions:O,resizeObserver:c}),D=k1({nodeRef:k,disabled:y.hidden||!C,noDragClassName:f,handleSelector:y.dragHandle,nodeId:e,isSelectable:L,nodeClickDistance:g}),I=P1();if(y.hidden)return null;const F=Vn(y),N=zI(y),T=L||C||t||n||r||s,z=n?W=>n(W,{...S.userNode}):void 0,B=r?W=>r(W,{...S.userNode}):void 0,H=s?W=>s(W,{...S.userNode}):void 0,K=o?W=>o(W,{...S.userNode}):void 0,V=i?W=>i(W,{...S.userNode}):void 0,X=W=>{const{selectNodesOnDrag:Z,nodeDragThreshold:oe}=j.getState();L&&(!Z||!C||oe>0)&&Pf({id:e,store:j,nodeRef:k}),t&&t(W,{...S.userNode})},Q=W=>{if(!(e1(W.nativeEvent)||p)){if(Hw.includes(W.key)&&L){const Z=W.key==="Escape";Pf({id:e,store:j,unselect:Z,nodeRef:k})}else if(C&&y.selected&&Object.prototype.hasOwnProperty.call(xu,W.key)){W.preventDefault();const{ariaLabelConfig:Z}=j.getState();j.setState({ariaLiveMessage:Z["node.a11yDescription.ariaLiveMessage"]({direction:W.key.replace("Arrow","").toLowerCase(),x:~~S.positionAbsolute.x,y:~~S.positionAbsolute.y})}),I({direction:xu[W.key],factor:W.shiftKey?4:1})}}},Y=()=>{var he;if(p||!((he=k.current)!=null&&he.matches(":focus-visible")))return;const{transform:W,width:Z,height:oe,autoPanOnNodeFocus:re,setCenter:J}=j.getState();if(!re)return;tp(new Map([[e,y]]),{x:0,y:0,width:Z,height:oe},W,!0).length>0||J(y.position.x+F.width/2,y.position.y+F.height/2,{zoom:W[2]})};return h.jsx("div",{className:Oe(["react-flow__node",`react-flow__node-${_}`,{[m]:C},y.className,{selected:y.selected,selectable:L,parent:E,draggable:C,dragging:D}]),ref:k,style:{zIndex:S.z,transform:`translate(${S.positionAbsolute.x}px,${S.positionAbsolute.y}px)`,pointerEvents:T?"all":"none",visibility:O?"visible":"hidden",...y.style,...N},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:z,onMouseMove:B,onMouseLeave:H,onContextMenu:K,onClick:X,onDoubleClick:V,onKeyDown:P?Q:void 0,tabIndex:P?0:void 0,onFocus:P?Y:void 0,role:y.ariaRole??(P?"group":void 0),"aria-roledescription":"node","aria-describedby":p?void 0:`${v1}-${x}`,"aria-label":y.ariaLabel,...y.domAttributes,children:h.jsx(MI,{value:e,children:h.jsx(b,{id:e,data:y.data,type:_,positionAbsoluteX:S.positionAbsolute.x,positionAbsoluteY:S.positionAbsolute.y,selected:y.selected??!1,selectable:L,draggable:C,deletable:y.deletable??!0,isConnectable:M,sourcePosition:y.sourcePosition,targetPosition:y.targetPosition,dragging:D,dragHandle:y.dragHandle,zIndex:S.z,parentId:y.parentId,...F})})})}var XI=R.memo(GI);const YI=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function M1(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:s,onError:o}=fe(YI,Ee),i=WI(e.onlyRenderVisibleElements),a=qI();return h.jsx("div",{className:"react-flow__nodes",style:ec,children:i.map(l=>h.jsx(XI,{id:l,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:a,nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:s,nodeClickDistance:e.nodeClickDistance,onError:o},l))})}M1.displayName="NodeRenderer";const ZI=R.memo(M1);function JI(e){return fe(R.useCallback(n=>{if(!e)return n.edges.map(s=>s.id);const r=[];if(n.width&&n.height)for(const s of n.edges){const o=n.nodeLookup.get(s.source),i=n.nodeLookup.get(s.target);o&&i&&rL({sourceNode:o,targetNode:i,width:n.width,height:n.height,transform:n.transform})&&r.push(s.id)}return r},[e]),Ee)}const eA=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return h.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},tA=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return h.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},gy={[ws.Arrow]:eA,[ws.ArrowClosed]:tA};function nA(e){const t=Ce();return R.useMemo(()=>{var s,o;return Object.prototype.hasOwnProperty.call(gy,e)?gy[e]:((o=(s=t.getState()).onError)==null||o.call(s,"009",bn.error009(e)),null)},[e])}const rA=({id:e,type:t,color:n,width:r=12.5,height:s=12.5,markerUnits:o="strokeWidth",strokeWidth:i,orient:a="auto-start-reverse"})=>{const l=nA(t);return l?h.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${s}`,viewBox:"-10 -10 20 20",markerUnits:o,orient:a,refX:"0",refY:"0",children:h.jsx(l,{color:n,strokeWidth:i})}):null},T1=({defaultColor:e,rfId:t})=>{const n=fe(o=>o.edges),r=fe(o=>o.defaultEdgeOptions),s=R.useMemo(()=>dL(n,{id:t,defaultColor:e,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[n,r,t,e]);return s.length?h.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:h.jsx("defs",{children:s.map(o=>h.jsx(rA,{id:o.id,type:o.type,color:o.color,width:o.width,height:o.height,markerUnits:o.markerUnits,strokeWidth:o.strokeWidth,orient:o.orient},o.id))})}):null};T1.displayName="MarkerDefinitions";var sA=R.memo(T1);function L1({x:e,y:t,label:n,labelStyle:r,labelShowBg:s=!0,labelBgStyle:o,labelBgPadding:i=[2,4],labelBgBorderRadius:a=2,children:l,className:u,...d}){const[c,f]=R.useState({x:1,y:0,width:0,height:0}),m=Oe(["react-flow__edge-textwrapper",u]),p=R.useRef(null);return R.useEffect(()=>{if(p.current){const x=p.current.getBBox();f({x:x.x,y:x.y,width:x.width,height:x.height})}},[n]),n?h.jsxs("g",{transform:`translate(${e-c.width/2} ${t-c.height/2})`,className:m,visibility:c.width?"visible":"hidden",...d,children:[s&&h.jsx("rect",{width:c.width+2*i[0],x:-i[0],y:-i[1],height:c.height+2*i[1],className:"react-flow__edge-textbg",style:o,rx:a,ry:a}),h.jsx("text",{className:"react-flow__edge-text",y:c.height/2,dy:"0.3em",ref:p,style:r,children:n}),l]}):null}L1.displayName="EdgeText";const oA=R.memo(L1);function tc({path:e,labelX:t,labelY:n,label:r,labelStyle:s,labelShowBg:o,labelBgStyle:i,labelBgPadding:a,labelBgBorderRadius:l,interactionWidth:u=20,...d}){return h.jsxs(h.Fragment,{children:[h.jsx("path",{...d,d:e,fill:"none",className:Oe(["react-flow__edge-path",d.className])}),u?h.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,r&&en(t)&&en(n)?h.jsx(oA,{x:t,y:n,label:r,labelStyle:s,labelShowBg:o,labelBgStyle:i,labelBgPadding:a,labelBgBorderRadius:l}):null]})}function yy({pos:e,x1:t,y1:n,x2:r,y2:s}){return e===ee.Left||e===ee.Right?[.5*(t+r),n]:[t,.5*(n+s)]}function I1({sourceX:e,sourceY:t,sourcePosition:n=ee.Bottom,targetX:r,targetY:s,targetPosition:o=ee.Top}){const[i,a]=yy({pos:n,x1:e,y1:t,x2:r,y2:s}),[l,u]=yy({pos:o,x1:r,y1:s,x2:e,y2:t}),[d,c,f,m]=n1({sourceX:e,sourceY:t,targetX:r,targetY:s,sourceControlX:i,sourceControlY:a,targetControlX:l,targetControlY:u});return[`M${e},${t} C${i},${a} ${l},${u} ${r},${s}`,d,c,f,m]}function A1(e){return R.memo(({id:t,sourceX:n,sourceY:r,targetX:s,targetY:o,sourcePosition:i,targetPosition:a,label:l,labelStyle:u,labelShowBg:d,labelBgStyle:c,labelBgPadding:f,labelBgBorderRadius:m,style:p,markerEnd:x,markerStart:w,interactionWidth:g})=>{const[v,y,S]=I1({sourceX:n,sourceY:r,sourcePosition:i,targetX:s,targetY:o,targetPosition:a}),E=e.isInternal?void 0:t;return h.jsx(tc,{id:E,path:v,labelX:y,labelY:S,label:l,labelStyle:u,labelShowBg:d,labelBgStyle:c,labelBgPadding:f,labelBgBorderRadius:m,style:p,markerEnd:x,markerStart:w,interactionWidth:g})})}const iA=A1({isInternal:!1}),O1=A1({isInternal:!0});iA.displayName="SimpleBezierEdge";O1.displayName="SimpleBezierEdgeInternal";function F1(e){return R.memo(({id:t,sourceX:n,sourceY:r,targetX:s,targetY:o,label:i,labelStyle:a,labelShowBg:l,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:c,style:f,sourcePosition:m=ee.Bottom,targetPosition:p=ee.Top,markerEnd:x,markerStart:w,pathOptions:g,interactionWidth:v})=>{const[y,S,E]=Ef({sourceX:n,sourceY:r,sourcePosition:m,targetX:s,targetY:o,targetPosition:p,borderRadius:g==null?void 0:g.borderRadius,offset:g==null?void 0:g.offset,stepPosition:g==null?void 0:g.stepPosition}),_=e.isInternal?void 0:t;return h.jsx(tc,{id:_,path:y,labelX:S,labelY:E,label:i,labelStyle:a,labelShowBg:l,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:c,style:f,markerEnd:x,markerStart:w,interactionWidth:v})})}const D1=F1({isInternal:!1}),z1=F1({isInternal:!0});D1.displayName="SmoothStepEdge";z1.displayName="SmoothStepEdgeInternal";function $1(e){return R.memo(({id:t,...n})=>{var s;const r=e.isInternal?void 0:t;return h.jsx(D1,{...n,id:r,pathOptions:R.useMemo(()=>{var o;return{borderRadius:0,offset:(o=n.pathOptions)==null?void 0:o.offset}},[(s=n.pathOptions)==null?void 0:s.offset])})})}const aA=$1({isInternal:!1}),B1=$1({isInternal:!0});aA.displayName="StepEdge";B1.displayName="StepEdgeInternal";function H1(e){return R.memo(({id:t,sourceX:n,sourceY:r,targetX:s,targetY:o,label:i,labelStyle:a,labelShowBg:l,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:c,style:f,markerEnd:m,markerStart:p,interactionWidth:x})=>{const[w,g,v]=o1({sourceX:n,sourceY:r,targetX:s,targetY:o}),y=e.isInternal?void 0:t;return h.jsx(tc,{id:y,path:w,labelX:g,labelY:v,label:i,labelStyle:a,labelShowBg:l,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:c,style:f,markerEnd:m,markerStart:p,interactionWidth:x})})}const lA=H1({isInternal:!1}),U1=H1({isInternal:!0});lA.displayName="StraightEdge";U1.displayName="StraightEdgeInternal";function V1(e){return R.memo(({id:t,sourceX:n,sourceY:r,targetX:s,targetY:o,sourcePosition:i=ee.Bottom,targetPosition:a=ee.Top,label:l,labelStyle:u,labelShowBg:d,labelBgStyle:c,labelBgPadding:f,labelBgBorderRadius:m,style:p,markerEnd:x,markerStart:w,pathOptions:g,interactionWidth:v})=>{const[y,S,E]=r1({sourceX:n,sourceY:r,sourcePosition:i,targetX:s,targetY:o,targetPosition:a,curvature:g==null?void 0:g.curvature}),_=e.isInternal?void 0:t;return h.jsx(tc,{id:_,path:y,labelX:S,labelY:E,label:l,labelStyle:u,labelShowBg:d,labelBgStyle:c,labelBgPadding:f,labelBgBorderRadius:m,style:p,markerEnd:x,markerStart:w,interactionWidth:v})})}const uA=V1({isInternal:!1}),W1=V1({isInternal:!0});uA.displayName="BezierEdge";W1.displayName="BezierEdgeInternal";const xy={default:W1,straight:U1,step:B1,smoothstep:z1,simplebezier:O1},vy={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},cA=(e,t,n)=>n===ee.Left?e-t:n===ee.Right?e+t:e,dA=(e,t,n)=>n===ee.Top?e-t:n===ee.Bottom?e+t:e,wy="react-flow__edgeupdater";function Sy({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:s,onMouseEnter:o,onMouseOut:i,type:a}){return h.jsx("circle",{onMouseDown:s,onMouseEnter:o,onMouseOut:i,className:Oe([wy,`${wy}-${a}`]),cx:cA(t,r,e),cy:dA(n,r,e),r,stroke:"transparent",fill:"transparent"})}function fA({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:s,targetX:o,targetY:i,sourcePosition:a,targetPosition:l,onReconnect:u,onReconnectStart:d,onReconnectEnd:c,setReconnecting:f,setUpdateHover:m}){const p=Ce(),x=(S,E)=>{if(S.button!==0)return;const{autoPanOnConnect:_,domNode:b,isValidConnection:C,connectionMode:L,connectionRadius:M,lib:P,onConnectStart:j,onConnectEnd:O,cancelConnection:k,nodeLookup:D,rfId:I,panBy:F,updateConnection:N}=p.getState(),T=E.type==="target",z=(K,V)=>{f(!1),c==null||c(K,n,E.type,V)},B=K=>u==null?void 0:u(n,K),H=(K,V)=>{f(!0),d==null||d(S,n,E.type),j==null||j(K,V)};kf.onPointerDown(S.nativeEvent,{autoPanOnConnect:_,connectionMode:L,connectionRadius:M,domNode:b,handleId:E.id,nodeId:E.nodeId,nodeLookup:D,isTarget:T,edgeUpdaterType:E.type,lib:P,flowId:I,cancelConnection:k,panBy:F,isValidConnection:C,onConnect:B,onConnectStart:H,onConnectEnd:O,onReconnectEnd:z,updateConnection:N,getTransform:()=>p.getState().transform,getFromHandle:()=>p.getState().connection.fromHandle,dragThreshold:p.getState().connectionDragThreshold,handleDomNode:S.currentTarget})},w=S=>x(S,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),g=S=>x(S,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),v=()=>m(!0),y=()=>m(!1);return h.jsxs(h.Fragment,{children:[(e===!0||e==="source")&&h.jsx(Sy,{position:a,centerX:r,centerY:s,radius:t,onMouseDown:w,onMouseEnter:v,onMouseOut:y,type:"source"}),(e===!0||e==="target")&&h.jsx(Sy,{position:l,centerX:o,centerY:i,radius:t,onMouseDown:g,onMouseEnter:v,onMouseOut:y,type:"target"})]})}function hA({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:s,onDoubleClick:o,onContextMenu:i,onMouseEnter:a,onMouseMove:l,onMouseLeave:u,reconnectRadius:d,onReconnect:c,onReconnectStart:f,onReconnectEnd:m,rfId:p,edgeTypes:x,noPanClassName:w,onError:g,disableKeyboardA11y:v}){let y=fe(J=>J.edgeLookup.get(e));const S=fe(J=>J.defaultEdgeOptions);y=S?{...S,...y}:y;let E=y.type||"default",_=(x==null?void 0:x[E])||xy[E];_===void 0&&(g==null||g("011",bn.error011(E)),E="default",_=(x==null?void 0:x.default)||xy.default);const b=!!(y.focusable||t&&typeof y.focusable>"u"),C=typeof c<"u"&&(y.reconnectable||n&&typeof y.reconnectable>"u"),L=!!(y.selectable||r&&typeof y.selectable>"u"),M=R.useRef(null),[P,j]=R.useState(!1),[O,k]=R.useState(!1),D=Ce(),{zIndex:I,sourceX:F,sourceY:N,targetX:T,targetY:z,sourcePosition:B,targetPosition:H}=fe(R.useCallback(J=>{const te=J.nodeLookup.get(y.source),he=J.nodeLookup.get(y.target);if(!te||!he)return{zIndex:y.zIndex,...vy};const ye=cL({id:e,sourceNode:te,targetNode:he,sourceHandle:y.sourceHandle||null,targetHandle:y.targetHandle||null,connectionMode:J.connectionMode,onError:g});return{zIndex:nL({selected:y.selected,zIndex:y.zIndex,sourceNode:te,targetNode:he,elevateOnSelect:J.elevateEdgesOnSelect,zIndexMode:J.zIndexMode}),...ye||vy}},[y.source,y.target,y.sourceHandle,y.targetHandle,y.selected,y.zIndex]),Ee),K=R.useMemo(()=>y.markerStart?`url('#${Cf(y.markerStart,p)}')`:void 0,[y.markerStart,p]),V=R.useMemo(()=>y.markerEnd?`url('#${Cf(y.markerEnd,p)}')`:void 0,[y.markerEnd,p]);if(y.hidden||F===null||N===null||T===null||z===null)return null;const X=J=>{var ce;const{addSelectedEdges:te,unselectNodesAndEdges:he,multiSelectionActive:ye}=D.getState();L&&(D.setState({nodesSelectionActive:!1}),y.selected&&ye?(he({nodes:[],edges:[y]}),(ce=M.current)==null||ce.blur()):te([e])),s&&s(J,y)},Q=o?J=>{o(J,{...y})}:void 0,Y=i?J=>{i(J,{...y})}:void 0,W=a?J=>{a(J,{...y})}:void 0,Z=l?J=>{l(J,{...y})}:void 0,oe=u?J=>{u(J,{...y})}:void 0,re=J=>{var te;if(!v&&Hw.includes(J.key)&&L){const{unselectNodesAndEdges:he,addSelectedEdges:ye}=D.getState();J.key==="Escape"?((te=M.current)==null||te.blur(),he({edges:[y]})):ye([e])}};return h.jsx("svg",{style:{zIndex:I},children:h.jsxs("g",{className:Oe(["react-flow__edge",`react-flow__edge-${E}`,y.className,w,{selected:y.selected,animated:y.animated,inactive:!L&&!s,updating:P,selectable:L}]),onClick:X,onDoubleClick:Q,onContextMenu:Y,onMouseEnter:W,onMouseMove:Z,onMouseLeave:oe,onKeyDown:b?re:void 0,tabIndex:b?0:void 0,role:y.ariaRole??(b?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":y.ariaLabel===null?void 0:y.ariaLabel||`Edge from ${y.source} to ${y.target}`,"aria-describedby":b?`${w1}-${p}`:void 0,ref:M,...y.domAttributes,children:[!O&&h.jsx(_,{id:e,source:y.source,target:y.target,type:y.type,selected:y.selected,animated:y.animated,selectable:L,deletable:y.deletable??!0,label:y.label,labelStyle:y.labelStyle,labelShowBg:y.labelShowBg,labelBgStyle:y.labelBgStyle,labelBgPadding:y.labelBgPadding,labelBgBorderRadius:y.labelBgBorderRadius,sourceX:F,sourceY:N,targetX:T,targetY:z,sourcePosition:B,targetPosition:H,data:y.data,style:y.style,sourceHandleId:y.sourceHandle,targetHandleId:y.targetHandle,markerStart:K,markerEnd:V,pathOptions:"pathOptions"in y?y.pathOptions:void 0,interactionWidth:y.interactionWidth}),C&&h.jsx(fA,{edge:y,isReconnectable:C,reconnectRadius:d,onReconnect:c,onReconnectStart:f,onReconnectEnd:m,sourceX:F,sourceY:N,targetX:T,targetY:z,sourcePosition:B,targetPosition:H,setUpdateHover:j,setReconnecting:k})]})})}var pA=R.memo(hA);const mA=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function K1({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:s,onReconnect:o,onEdgeContextMenu:i,onEdgeMouseEnter:a,onEdgeMouseMove:l,onEdgeMouseLeave:u,onEdgeClick:d,reconnectRadius:c,onEdgeDoubleClick:f,onReconnectStart:m,onReconnectEnd:p,disableKeyboardA11y:x}){const{edgesFocusable:w,edgesReconnectable:g,elementsSelectable:v,onError:y}=fe(mA,Ee),S=JI(t);return h.jsxs("div",{className:"react-flow__edges",children:[h.jsx(sA,{defaultColor:e,rfId:n}),S.map(E=>h.jsx(pA,{id:E,edgesFocusable:w,edgesReconnectable:g,elementsSelectable:v,noPanClassName:s,onReconnect:o,onContextMenu:i,onMouseEnter:a,onMouseMove:l,onMouseLeave:u,onClick:d,reconnectRadius:c,onDoubleClick:f,onReconnectStart:m,onReconnectEnd:p,rfId:n,onError:y,edgeTypes:r,disableKeyboardA11y:x},E))]})}K1.displayName="EdgeRenderer";const gA=R.memo(K1),yA=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function xA({children:e}){const t=fe(yA);return h.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function vA(e){const t=up(),n=R.useRef(!1);R.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const wA=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function SA(e){const t=fe(wA),n=Ce();return R.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function _A(e){return e.connection.inProgress?{...e.connection,to:ba(e.connection.to,e.transform)}:{...e.connection}}function bA(e){return _A}function EA(e){const t=bA();return fe(t,Ee)}const CA=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function NA({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:s,width:o,height:i,isValid:a,inProgress:l}=fe(CA,Ee);return!(o&&s&&l)?null:h.jsx("svg",{style:e,width:o,height:i,className:"react-flow__connectionline react-flow__container",children:h.jsx("g",{className:Oe(["react-flow__connection",Ww(a)]),children:h.jsx(q1,{style:t,type:n,CustomComponent:r,isValid:a})})})}const q1=({style:e,type:t=rr.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:s,from:o,fromNode:i,fromHandle:a,fromPosition:l,to:u,toNode:d,toHandle:c,toPosition:f,pointer:m}=EA();if(!s)return;if(n)return h.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:i,fromHandle:a,fromX:o.x,fromY:o.y,toX:u.x,toY:u.y,fromPosition:l,toPosition:f,connectionStatus:Ww(r),toNode:d,toHandle:c,pointer:m});let p="";const x={sourceX:o.x,sourceY:o.y,sourcePosition:l,targetX:u.x,targetY:u.y,targetPosition:f};switch(t){case rr.Bezier:[p]=r1(x);break;case rr.SimpleBezier:[p]=I1(x);break;case rr.Step:[p]=Ef({...x,borderRadius:0});break;case rr.SmoothStep:[p]=Ef(x);break;default:[p]=o1(x)}return h.jsx("path",{d:p,fill:"none",className:"react-flow__connection-path",style:e})};q1.displayName="ConnectionLine";const kA={};function _y(e=kA){R.useRef(e),Ce(),R.useEffect(()=>{},[e])}function PA(){Ce(),R.useRef(!1),R.useEffect(()=>{},[])}function Q1({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:s,onNodeDoubleClick:o,onEdgeDoubleClick:i,onNodeMouseEnter:a,onNodeMouseMove:l,onNodeMouseLeave:u,onNodeContextMenu:d,onSelectionContextMenu:c,onSelectionStart:f,onSelectionEnd:m,connectionLineType:p,connectionLineStyle:x,connectionLineComponent:w,connectionLineContainerStyle:g,selectionKeyCode:v,selectionOnDrag:y,selectionMode:S,multiSelectionKeyCode:E,panActivationKeyCode:_,zoomActivationKeyCode:b,deleteKeyCode:C,onlyRenderVisibleElements:L,elementsSelectable:M,defaultViewport:P,translateExtent:j,minZoom:O,maxZoom:k,preventScrolling:D,defaultMarkerColor:I,zoomOnScroll:F,zoomOnPinch:N,panOnScroll:T,panOnScrollSpeed:z,panOnScrollMode:B,zoomOnDoubleClick:H,panOnDrag:K,onPaneClick:V,onPaneMouseEnter:X,onPaneMouseMove:Q,onPaneMouseLeave:Y,onPaneScroll:W,onPaneContextMenu:Z,paneClickDistance:oe,nodeClickDistance:re,onEdgeContextMenu:J,onEdgeMouseEnter:te,onEdgeMouseMove:he,onEdgeMouseLeave:ye,reconnectRadius:ce,onReconnect:$e,onReconnectStart:un,onReconnectEnd:dt,noDragClassName:At,noWheelClassName:Wn,noPanClassName:Kn,disableKeyboardA11y:de,nodeExtent:Le,rfId:Ye,viewport:Cn,onViewportChange:$o}){return _y(e),_y(t),PA(),vA(n),SA(Cn),h.jsx(UI,{onPaneClick:V,onPaneMouseEnter:X,onPaneMouseMove:Q,onPaneMouseLeave:Y,onPaneContextMenu:Z,onPaneScroll:W,paneClickDistance:oe,deleteKeyCode:C,selectionKeyCode:v,selectionOnDrag:y,selectionMode:S,onSelectionStart:f,onSelectionEnd:m,multiSelectionKeyCode:E,panActivationKeyCode:_,zoomActivationKeyCode:b,elementsSelectable:M,zoomOnScroll:F,zoomOnPinch:N,zoomOnDoubleClick:H,panOnScroll:T,panOnScrollSpeed:z,panOnScrollMode:B,panOnDrag:K,defaultViewport:P,translateExtent:j,minZoom:O,maxZoom:k,onSelectionContextMenu:c,preventScrolling:D,noDragClassName:At,noWheelClassName:Wn,noPanClassName:Kn,disableKeyboardA11y:de,onViewportChange:$o,isControlledViewport:!!Cn,children:h.jsxs(xA,{children:[h.jsx(gA,{edgeTypes:t,onEdgeClick:s,onEdgeDoubleClick:i,onReconnect:$e,onReconnectStart:un,onReconnectEnd:dt,onlyRenderVisibleElements:L,onEdgeContextMenu:J,onEdgeMouseEnter:te,onEdgeMouseMove:he,onEdgeMouseLeave:ye,reconnectRadius:ce,defaultMarkerColor:I,noPanClassName:Kn,disableKeyboardA11y:de,rfId:Ye}),h.jsx(NA,{style:x,type:p,component:w,containerStyle:g}),h.jsx("div",{className:"react-flow__edgelabel-renderer"}),h.jsx(ZI,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:o,onNodeMouseEnter:a,onNodeMouseMove:l,onNodeMouseLeave:u,onNodeContextMenu:d,nodeClickDistance:re,onlyRenderVisibleElements:L,noPanClassName:Kn,noDragClassName:At,disableKeyboardA11y:de,nodeExtent:Le,rfId:Ye}),h.jsx("div",{className:"react-flow__viewport-portal"})]})})}Q1.displayName="GraphView";const RA=R.memo(Q1),by=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:s,height:o,fitView:i,fitViewOptions:a,minZoom:l=.5,maxZoom:u=2,nodeOrigin:d,nodeExtent:c,zIndexMode:f="basic"}={})=>{const m=new Map,p=new Map,x=new Map,w=new Map,g=r??t??[],v=n??e??[],y=d??[0,0],S=c??Xi;l1(x,w,g);const E=Nf(v,m,p,{nodeOrigin:y,nodeExtent:S,zIndexMode:f});let _=[0,0,1];if(i&&s&&o){const b=Sa(m,{filter:P=>!!((P.width||P.initialWidth)&&(P.height||P.initialHeight))}),{x:C,y:L,zoom:M}=np(b,s,o,l,u,(a==null?void 0:a.padding)??.1);_=[C,L,M]}return{rfId:"1",width:s??0,height:o??0,transform:_,nodes:v,nodesInitialized:E,nodeLookup:m,parentLookup:p,edges:g,edgeLookup:w,connectionLookup:x,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:l,maxZoom:u,translateExtent:Xi,nodeExtent:S,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:No.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:y,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:i??!1,fitViewOptions:a,fitViewResolver:null,connection:{...Vw},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:XT,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:Uw,zIndexMode:f,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},jA=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:s,height:o,fitView:i,fitViewOptions:a,minZoom:l,maxZoom:u,nodeOrigin:d,nodeExtent:c,zIndexMode:f})=>QL((m,p)=>{async function x(){const{nodeLookup:w,panZoom:g,fitViewOptions:v,fitViewResolver:y,width:S,height:E,minZoom:_,maxZoom:b}=p();g&&(await QT({nodes:w,width:S,height:E,panZoom:g,minZoom:_,maxZoom:b},v),y==null||y.resolve(!0),m({fitViewResolver:null}))}return{...by({nodes:e,edges:t,width:s,height:o,fitView:i,fitViewOptions:a,minZoom:l,maxZoom:u,nodeOrigin:d,nodeExtent:c,defaultNodes:n,defaultEdges:r,zIndexMode:f}),setNodes:w=>{const{nodeLookup:g,parentLookup:v,nodeOrigin:y,elevateNodesOnSelect:S,fitViewQueued:E,zIndexMode:_}=p(),b=Nf(w,g,v,{nodeOrigin:y,nodeExtent:c,elevateNodesOnSelect:S,checkEquality:!0,zIndexMode:_});E&&b?(x(),m({nodes:w,nodesInitialized:b,fitViewQueued:!1,fitViewOptions:void 0})):m({nodes:w,nodesInitialized:b})},setEdges:w=>{const{connectionLookup:g,edgeLookup:v}=p();l1(g,v,w),m({edges:w})},setDefaultNodesAndEdges:(w,g)=>{if(w){const{setNodes:v}=p();v(w),m({hasDefaultNodes:!0})}if(g){const{setEdges:v}=p();v(g),m({hasDefaultEdges:!0})}},updateNodeInternals:w=>{const{triggerNodeChanges:g,nodeLookup:v,parentLookup:y,domNode:S,nodeOrigin:E,nodeExtent:_,debug:b,fitViewQueued:C,zIndexMode:L}=p(),{changes:M,updatedInternals:P}=xL(w,v,y,S,E,_,L);P&&(pL(v,y,{nodeOrigin:E,nodeExtent:_,zIndexMode:L}),C?(x(),m({fitViewQueued:!1,fitViewOptions:void 0})):m({}),(M==null?void 0:M.length)>0&&(b&&console.log("React Flow: trigger node changes",M),g==null||g(M)))},updateNodePositions:(w,g=!1)=>{const v=[];let y=[];const{nodeLookup:S,triggerNodeChanges:E,connection:_,updateConnection:b,onNodesChangeMiddlewareMap:C}=p();for(const[L,M]of w){const P=S.get(L),j=!!(P!=null&&P.expandParent&&(P!=null&&P.parentId)&&(M!=null&&M.position)),O={id:L,type:"position",position:j?{x:Math.max(0,M.position.x),y:Math.max(0,M.position.y)}:M.position,dragging:g};if(P&&_.inProgress&&_.fromNode.id===P.id){const k=_s(P,_.fromHandle,ee.Left,!0);b({..._,from:k})}j&&P.parentId&&v.push({id:L,parentId:P.parentId,rect:{...M.internals.positionAbsolute,width:M.measured.width??0,height:M.measured.height??0}}),y.push(O)}if(v.length>0){const{parentLookup:L,nodeOrigin:M}=p(),P=lp(v,S,L,M);y.push(...P)}for(const L of C.values())y=L(y);E(y)},triggerNodeChanges:w=>{const{onNodesChange:g,setNodes:v,nodes:y,hasDefaultNodes:S,debug:E}=p();if(w!=null&&w.length){if(S){const _=b1(w,y);v(_)}E&&console.log("React Flow: trigger node changes",w),g==null||g(w)}},triggerEdgeChanges:w=>{const{onEdgesChange:g,setEdges:v,edges:y,hasDefaultEdges:S,debug:E}=p();if(w!=null&&w.length){if(S){const _=E1(w,y);v(_)}E&&console.log("React Flow: trigger edge changes",w),g==null||g(w)}},addSelectedNodes:w=>{const{multiSelectionActive:g,edgeLookup:v,nodeLookup:y,triggerNodeChanges:S,triggerEdgeChanges:E}=p();if(g){const _=w.map(b=>Or(b,!0));S(_);return}S(Hs(y,new Set([...w]),!0)),E(Hs(v))},addSelectedEdges:w=>{const{multiSelectionActive:g,edgeLookup:v,nodeLookup:y,triggerNodeChanges:S,triggerEdgeChanges:E}=p();if(g){const _=w.map(b=>Or(b,!0));E(_);return}E(Hs(v,new Set([...w]))),S(Hs(y,new Set,!0))},unselectNodesAndEdges:({nodes:w,edges:g}={})=>{const{edges:v,nodes:y,nodeLookup:S,triggerNodeChanges:E,triggerEdgeChanges:_}=p(),b=w||y,C=g||v,L=b.map(P=>{const j=S.get(P.id);return j&&(j.selected=!1),Or(P.id,!1)}),M=C.map(P=>Or(P.id,!1));E(L),_(M)},setMinZoom:w=>{const{panZoom:g,maxZoom:v}=p();g==null||g.setScaleExtent([w,v]),m({minZoom:w})},setMaxZoom:w=>{const{panZoom:g,minZoom:v}=p();g==null||g.setScaleExtent([v,w]),m({maxZoom:w})},setTranslateExtent:w=>{var g;(g=p().panZoom)==null||g.setTranslateExtent(w),m({translateExtent:w})},resetSelectedElements:()=>{const{edges:w,nodes:g,triggerNodeChanges:v,triggerEdgeChanges:y,elementsSelectable:S}=p();if(!S)return;const E=g.reduce((b,C)=>C.selected?[...b,Or(C.id,!1)]:b,[]),_=w.reduce((b,C)=>C.selected?[...b,Or(C.id,!1)]:b,[]);v(E),y(_)},setNodeExtent:w=>{const{nodes:g,nodeLookup:v,parentLookup:y,nodeOrigin:S,elevateNodesOnSelect:E,nodeExtent:_,zIndexMode:b}=p();w[0][0]===_[0][0]&&w[0][1]===_[0][1]&&w[1][0]===_[1][0]&&w[1][1]===_[1][1]||(Nf(g,v,y,{nodeOrigin:S,nodeExtent:w,elevateNodesOnSelect:E,checkEquality:!1,zIndexMode:b}),m({nodeExtent:w}))},panBy:w=>{const{transform:g,width:v,height:y,panZoom:S,translateExtent:E}=p();return vL({delta:w,panZoom:S,transform:g,translateExtent:E,width:v,height:y})},setCenter:async(w,g,v)=>{const{width:y,height:S,maxZoom:E,panZoom:_}=p();if(!_)return Promise.resolve(!1);const b=typeof(v==null?void 0:v.zoom)<"u"?v.zoom:E;return await _.setViewport({x:y/2-w*b,y:S/2-g*b,zoom:b},{duration:v==null?void 0:v.duration,ease:v==null?void 0:v.ease,interpolate:v==null?void 0:v.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{m({connection:{...Vw}})},updateConnection:w=>{m({connection:w})},reset:()=>m({...by()})}},Object.is);function MA({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:s,initialHeight:o,initialMinZoom:i,initialMaxZoom:a,initialFitViewOptions:l,fitView:u,nodeOrigin:d,nodeExtent:c,zIndexMode:f,children:m}){const[p]=R.useState(()=>jA({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:s,height:o,fitView:u,minZoom:i,maxZoom:a,fitViewOptions:l,nodeOrigin:d,nodeExtent:c,zIndexMode:f}));return h.jsx(GL,{value:p,children:h.jsx(xI,{children:m})})}function TA({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:s,width:o,height:i,fitView:a,fitViewOptions:l,minZoom:u,maxZoom:d,nodeOrigin:c,nodeExtent:f,zIndexMode:m}){return R.useContext(Ju)?h.jsx(h.Fragment,{children:e}):h.jsx(MA,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:s,initialWidth:o,initialHeight:i,fitView:a,initialFitViewOptions:l,initialMinZoom:u,initialMaxZoom:d,nodeOrigin:c,nodeExtent:f,zIndexMode:m,children:e})}const LA={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function IA({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:s,nodeTypes:o,edgeTypes:i,onNodeClick:a,onEdgeClick:l,onInit:u,onMove:d,onMoveStart:c,onMoveEnd:f,onConnect:m,onConnectStart:p,onConnectEnd:x,onClickConnectStart:w,onClickConnectEnd:g,onNodeMouseEnter:v,onNodeMouseMove:y,onNodeMouseLeave:S,onNodeContextMenu:E,onNodeDoubleClick:_,onNodeDragStart:b,onNodeDrag:C,onNodeDragStop:L,onNodesDelete:M,onEdgesDelete:P,onDelete:j,onSelectionChange:O,onSelectionDragStart:k,onSelectionDrag:D,onSelectionDragStop:I,onSelectionContextMenu:F,onSelectionStart:N,onSelectionEnd:T,onBeforeDelete:z,connectionMode:B,connectionLineType:H=rr.Bezier,connectionLineStyle:K,connectionLineComponent:V,connectionLineContainerStyle:X,deleteKeyCode:Q="Backspace",selectionKeyCode:Y="Shift",selectionOnDrag:W=!1,selectionMode:Z=Yi.Full,panActivationKeyCode:oe="Space",multiSelectionKeyCode:re=Ji()?"Meta":"Control",zoomActivationKeyCode:J=Ji()?"Meta":"Control",snapToGrid:te,snapGrid:he,onlyRenderVisibleElements:ye=!1,selectNodesOnDrag:ce,nodesDraggable:$e,autoPanOnNodeFocus:un,nodesConnectable:dt,nodesFocusable:At,nodeOrigin:Wn=S1,edgesFocusable:Kn,edgesReconnectable:de,elementsSelectable:Le=!0,defaultViewport:Ye=lI,minZoom:Cn=.5,maxZoom:$o=2,translateExtent:dp=Xi,preventScrolling:J1=!0,nodeExtent:nc,defaultMarkerColor:eS="#b1b1b7",zoomOnScroll:tS=!0,zoomOnPinch:nS=!0,panOnScroll:rS=!1,panOnScrollSpeed:sS=.5,panOnScrollMode:oS=as.Free,zoomOnDoubleClick:iS=!0,panOnDrag:aS=!0,onPaneClick:lS,onPaneMouseEnter:uS,onPaneMouseMove:cS,onPaneMouseLeave:dS,onPaneScroll:fS,onPaneContextMenu:hS,paneClickDistance:pS=1,nodeClickDistance:mS=0,children:gS,onReconnect:yS,onReconnectStart:xS,onReconnectEnd:vS,onEdgeContextMenu:wS,onEdgeDoubleClick:SS,onEdgeMouseEnter:_S,onEdgeMouseMove:bS,onEdgeMouseLeave:ES,reconnectRadius:CS=10,onNodesChange:NS,onEdgesChange:kS,noDragClassName:PS="nodrag",noWheelClassName:RS="nowheel",noPanClassName:fp="nopan",fitView:hp,fitViewOptions:pp,connectOnClick:jS,attributionPosition:MS,proOptions:TS,defaultEdgeOptions:LS,elevateNodesOnSelect:IS=!0,elevateEdgesOnSelect:AS=!1,disableKeyboardA11y:mp=!1,autoPanOnConnect:OS,autoPanOnNodeDrag:FS,autoPanSpeed:DS,connectionRadius:zS,isValidConnection:$S,onError:BS,style:HS,id:gp,nodeDragThreshold:US,connectionDragThreshold:VS,viewport:WS,onViewportChange:KS,width:qS,height:QS,colorMode:GS="light",debug:XS,onScroll:Ca,ariaLabelConfig:YS,zIndexMode:yp="basic",...ZS},JS){const rc=gp||"1",e_=fI(GS),t_=R.useCallback(xp=>{xp.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Ca==null||Ca(xp)},[Ca]);return h.jsx("div",{"data-testid":"rf__wrapper",...ZS,onScroll:t_,style:{...HS,...LA},ref:JS,className:Oe(["react-flow",s,e_]),id:gp,role:"application",children:h.jsxs(TA,{nodes:e,edges:t,width:qS,height:QS,fitView:hp,fitViewOptions:pp,minZoom:Cn,maxZoom:$o,nodeOrigin:Wn,nodeExtent:nc,zIndexMode:yp,children:[h.jsx(RA,{onInit:u,onNodeClick:a,onEdgeClick:l,onNodeMouseEnter:v,onNodeMouseMove:y,onNodeMouseLeave:S,onNodeContextMenu:E,onNodeDoubleClick:_,nodeTypes:o,edgeTypes:i,connectionLineType:H,connectionLineStyle:K,connectionLineComponent:V,connectionLineContainerStyle:X,selectionKeyCode:Y,selectionOnDrag:W,selectionMode:Z,deleteKeyCode:Q,multiSelectionKeyCode:re,panActivationKeyCode:oe,zoomActivationKeyCode:J,onlyRenderVisibleElements:ye,defaultViewport:Ye,translateExtent:dp,minZoom:Cn,maxZoom:$o,preventScrolling:J1,zoomOnScroll:tS,zoomOnPinch:nS,zoomOnDoubleClick:iS,panOnScroll:rS,panOnScrollSpeed:sS,panOnScrollMode:oS,panOnDrag:aS,onPaneClick:lS,onPaneMouseEnter:uS,onPaneMouseMove:cS,onPaneMouseLeave:dS,onPaneScroll:fS,onPaneContextMenu:hS,paneClickDistance:pS,nodeClickDistance:mS,onSelectionContextMenu:F,onSelectionStart:N,onSelectionEnd:T,onReconnect:yS,onReconnectStart:xS,onReconnectEnd:vS,onEdgeContextMenu:wS,onEdgeDoubleClick:SS,onEdgeMouseEnter:_S,onEdgeMouseMove:bS,onEdgeMouseLeave:ES,reconnectRadius:CS,defaultMarkerColor:eS,noDragClassName:PS,noWheelClassName:RS,noPanClassName:fp,rfId:rc,disableKeyboardA11y:mp,nodeExtent:nc,viewport:WS,onViewportChange:KS}),h.jsx(dI,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:m,onConnectStart:p,onConnectEnd:x,onClickConnectStart:w,onClickConnectEnd:g,nodesDraggable:$e,autoPanOnNodeFocus:un,nodesConnectable:dt,nodesFocusable:At,edgesFocusable:Kn,edgesReconnectable:de,elementsSelectable:Le,elevateNodesOnSelect:IS,elevateEdgesOnSelect:AS,minZoom:Cn,maxZoom:$o,nodeExtent:nc,onNodesChange:NS,onEdgesChange:kS,snapToGrid:te,snapGrid:he,connectionMode:B,translateExtent:dp,connectOnClick:jS,defaultEdgeOptions:LS,fitView:hp,fitViewOptions:pp,onNodesDelete:M,onEdgesDelete:P,onDelete:j,onNodeDragStart:b,onNodeDrag:C,onNodeDragStop:L,onSelectionDrag:D,onSelectionDragStart:k,onSelectionDragStop:I,onMove:d,onMoveStart:c,onMoveEnd:f,noPanClassName:fp,nodeOrigin:Wn,rfId:rc,autoPanOnConnect:OS,autoPanOnNodeDrag:FS,autoPanSpeed:DS,onError:BS,connectionRadius:zS,isValidConnection:$S,selectNodesOnDrag:ce,nodeDragThreshold:US,connectionDragThreshold:VS,onBeforeDelete:z,debug:XS,ariaLabelConfig:YS,zIndexMode:yp}),h.jsx(aI,{onSelectionChange:O}),gS,h.jsx(nI,{proOptions:TS,position:MS}),h.jsx(tI,{rfId:rc,disableKeyboardA11y:mp})]})})}var AA=C1(IA);function OA(e){const[t,n]=R.useState(e),r=R.useCallback(s=>n(o=>b1(s,o)),[]);return[t,n,r]}function FA(e){const[t,n]=R.useState(e),r=R.useCallback(s=>n(o=>E1(s,o)),[]);return[t,n,r]}function DA({dimensions:e,lineWidth:t,variant:n,className:r}){return h.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Oe(["react-flow__background-pattern",n,r])})}function zA({radius:e,className:t}){return h.jsx("circle",{cx:e,cy:e,r:e,className:Oe(["react-flow__background-pattern","dots",t])})}var kr;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(kr||(kr={}));const $A={[kr.Dots]:1,[kr.Lines]:1,[kr.Cross]:6},BA=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function G1({id:e,variant:t=kr.Dots,gap:n=20,size:r,lineWidth:s=1,offset:o=0,color:i,bgColor:a,style:l,className:u,patternClassName:d}){const c=R.useRef(null),{transform:f,patternId:m}=fe(BA,Ee),p=r||$A[t],x=t===kr.Dots,w=t===kr.Cross,g=Array.isArray(n)?n:[n,n],v=[g[0]*f[2]||1,g[1]*f[2]||1],y=p*f[2],S=Array.isArray(o)?o:[o,o],E=w?[y,y]:v,_=[S[0]*f[2]||1+E[0]/2,S[1]*f[2]||1+E[1]/2],b=`${m}${e||""}`;return h.jsxs("svg",{className:Oe(["react-flow__background",u]),style:{...l,...ec,"--xy-background-color-props":a,"--xy-background-pattern-color-props":i},ref:c,"data-testid":"rf__background",children:[h.jsx("pattern",{id:b,x:f[0]%v[0],y:f[1]%v[1],width:v[0],height:v[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${_[0]},-${_[1]})`,children:x?h.jsx(zA,{radius:y/2,className:d}):h.jsx(DA,{dimensions:E,lineWidth:s,variant:t,className:d})}),h.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${b})`})]})}G1.displayName="Background";const HA=R.memo(G1);function UA(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:h.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function VA(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:h.jsx("path",{d:"M0 0h32v4.2H0z"})})}function WA(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:h.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 KA(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:h.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 qA(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:h.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 sl({children:e,className:t,...n}){return h.jsx("button",{type:"button",className:Oe(["react-flow__controls-button",t]),...n,children:e})}const QA=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function X1({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:s,onZoomIn:o,onZoomOut:i,onFitView:a,onInteractiveChange:l,className:u,children:d,position:c="bottom-left",orientation:f="vertical","aria-label":m}){const p=Ce(),{isInteractive:x,minZoomReached:w,maxZoomReached:g,ariaLabelConfig:v}=fe(QA,Ee),{zoomIn:y,zoomOut:S,fitView:E}=up(),_=()=>{y(),o==null||o()},b=()=>{S(),i==null||i()},C=()=>{E(s),a==null||a()},L=()=>{p.setState({nodesDraggable:!x,nodesConnectable:!x,elementsSelectable:!x}),l==null||l(!x)},M=f==="horizontal"?"horizontal":"vertical";return h.jsxs(Ea,{className:Oe(["react-flow__controls",M,u]),position:c,style:e,"data-testid":"rf__controls","aria-label":m??v["controls.ariaLabel"],children:[t&&h.jsxs(h.Fragment,{children:[h.jsx(sl,{onClick:_,className:"react-flow__controls-zoomin",title:v["controls.zoomIn.ariaLabel"],"aria-label":v["controls.zoomIn.ariaLabel"],disabled:g,children:h.jsx(UA,{})}),h.jsx(sl,{onClick:b,className:"react-flow__controls-zoomout",title:v["controls.zoomOut.ariaLabel"],"aria-label":v["controls.zoomOut.ariaLabel"],disabled:w,children:h.jsx(VA,{})})]}),n&&h.jsx(sl,{className:"react-flow__controls-fitview",onClick:C,title:v["controls.fitView.ariaLabel"],"aria-label":v["controls.fitView.ariaLabel"],children:h.jsx(WA,{})}),r&&h.jsx(sl,{className:"react-flow__controls-interactive",onClick:L,title:v["controls.interactive.ariaLabel"],"aria-label":v["controls.interactive.ariaLabel"],children:x?h.jsx(qA,{}):h.jsx(KA,{})}),d]})}X1.displayName="Controls";const GA=R.memo(X1);function XA({id:e,x:t,y:n,width:r,height:s,style:o,color:i,strokeColor:a,strokeWidth:l,className:u,borderRadius:d,shapeRendering:c,selected:f,onClick:m}){const{background:p,backgroundColor:x}=o||{},w=i||p||x;return h.jsx("rect",{className:Oe(["react-flow__minimap-node",{selected:f},u]),x:t,y:n,rx:d,ry:d,width:r,height:s,style:{fill:w,stroke:a,strokeWidth:l},shapeRendering:c,onClick:m?g=>m(g,e):void 0})}const YA=R.memo(XA),ZA=e=>e.nodes.map(t=>t.id),Jc=e=>e instanceof Function?e:()=>e;function JA({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:s,nodeComponent:o=YA,onClick:i}){const a=fe(ZA,Ee),l=Jc(t),u=Jc(e),d=Jc(n),c=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return h.jsx(h.Fragment,{children:a.map(f=>h.jsx(t3,{id:f,nodeColorFunc:l,nodeStrokeColorFunc:u,nodeClassNameFunc:d,nodeBorderRadius:r,nodeStrokeWidth:s,NodeComponent:o,onClick:i,shapeRendering:c},f))})}function e3({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:s,nodeStrokeWidth:o,shapeRendering:i,NodeComponent:a,onClick:l}){const{node:u,x:d,y:c,width:f,height:m}=fe(p=>{const{internals:x}=p.nodeLookup.get(e),w=x.userNode,{x:g,y:v}=x.positionAbsolute,{width:y,height:S}=Vn(w);return{node:w,x:g,y:v,width:y,height:S}},Ee);return!u||u.hidden||!Yw(u)?null:h.jsx(a,{x:d,y:c,width:f,height:m,style:u.style,selected:!!u.selected,className:r(u),color:t(u),borderRadius:s,strokeColor:n(u),strokeWidth:o,shapeRendering:i,onClick:l,id:u.id})}const t3=R.memo(e3);var n3=R.memo(JA);const r3=200,s3=150,o3=e=>!e.hidden,i3=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?Xw(Sa(e.nodeLookup,{filter:o3}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},a3="react-flow__minimap-desc";function Y1({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:s="",nodeBorderRadius:o=5,nodeStrokeWidth:i,nodeComponent:a,bgColor:l,maskColor:u,maskStrokeColor:d,maskStrokeWidth:c,position:f="bottom-right",onClick:m,onNodeClick:p,pannable:x=!1,zoomable:w=!1,ariaLabel:g,inversePan:v,zoomStep:y=1,offsetScale:S=5}){const E=Ce(),_=R.useRef(null),{boundingRect:b,viewBB:C,rfId:L,panZoom:M,translateExtent:P,flowWidth:j,flowHeight:O,ariaLabelConfig:k}=fe(i3,Ee),D=(e==null?void 0:e.width)??r3,I=(e==null?void 0:e.height)??s3,F=b.width/D,N=b.height/I,T=Math.max(F,N),z=T*D,B=T*I,H=S*T,K=b.x-(z-b.width)/2-H,V=b.y-(B-b.height)/2-H,X=z+H*2,Q=B+H*2,Y=`${a3}-${L}`,W=R.useRef(0),Z=R.useRef();W.current=T,R.useEffect(()=>{if(_.current&&M)return Z.current=PL({domNode:_.current,panZoom:M,getTransform:()=>E.getState().transform,getViewScale:()=>W.current}),()=>{var te;(te=Z.current)==null||te.destroy()}},[M]),R.useEffect(()=>{var te;(te=Z.current)==null||te.update({translateExtent:P,width:j,height:O,inversePan:v,pannable:x,zoomStep:y,zoomable:w})},[x,w,v,y,P,j,O]);const oe=m?te=>{var ce;const[he,ye]=((ce=Z.current)==null?void 0:ce.pointer(te))||[0,0];m(te,{x:he,y:ye})}:void 0,re=p?R.useCallback((te,he)=>{const ye=E.getState().nodeLookup.get(he).internals.userNode;p(te,ye)},[]):void 0,J=g??k["minimap.ariaLabel"];return h.jsx(Ea,{position:f,style:{...e,"--xy-minimap-background-color-props":typeof l=="string"?l:void 0,"--xy-minimap-mask-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-width-props":typeof c=="number"?c*T:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof i=="number"?i:void 0},className:Oe(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:h.jsxs("svg",{width:D,height:I,viewBox:`${K} ${V} ${X} ${Q}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":Y,ref:_,onClick:oe,children:[J&&h.jsx("title",{id:Y,children:J}),h.jsx(n3,{onClick:re,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:o,nodeClassName:s,nodeStrokeWidth:i,nodeComponent:a}),h.jsx("path",{className:"react-flow__minimap-mask",d:`M${K-H},${V-H}h${X+H*2}v${Q+H*2}h${-X-H*2}z
|
|
67
|
-
M${C.x},${C.y}h${C.width}v${C.height}h${-C.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}Y1.displayName="MiniMap";const l3=R.memo(Y1),u3=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,c3={[jo.Line]:"right",[jo.Handle]:"bottom-right"};function d3({nodeId:e,position:t,variant:n=jo.Handle,className:r,style:s=void 0,children:o,color:i,minWidth:a=10,minHeight:l=10,maxWidth:u=Number.MAX_VALUE,maxHeight:d=Number.MAX_VALUE,keepAspectRatio:c=!1,resizeDirection:f,autoScale:m=!0,shouldResize:p,onResizeStart:x,onResize:w,onResizeEnd:g}){const v=R1(),y=typeof e=="string"?e:v,S=Ce(),E=R.useRef(null),_=n===jo.Handle,b=fe(R.useCallback(u3(_&&m),[_,m]),Ee),C=R.useRef(null),L=t??c3[n];R.useEffect(()=>{if(!(!E.current||!y))return C.current||(C.current=HL({domNode:E.current,nodeId:y,getStoreItems:()=>{const{nodeLookup:P,transform:j,snapGrid:O,snapToGrid:k,nodeOrigin:D,domNode:I}=S.getState();return{nodeLookup:P,transform:j,snapGrid:O,snapToGrid:k,nodeOrigin:D,paneDomNode:I}},onChange:(P,j)=>{const{triggerNodeChanges:O,nodeLookup:k,parentLookup:D,nodeOrigin:I}=S.getState(),F=[],N={x:P.x,y:P.y},T=k.get(y);if(T&&T.expandParent&&T.parentId){const z=T.origin??I,B=P.width??T.measured.width??0,H=P.height??T.measured.height??0,K={id:T.id,parentId:T.parentId,rect:{width:B,height:H,...Zw({x:P.x??T.position.x,y:P.y??T.position.y},{width:B,height:H},T.parentId,k,z)}},V=lp([K],k,D,I);F.push(...V),N.x=P.x?Math.max(z[0]*B,P.x):void 0,N.y=P.y?Math.max(z[1]*H,P.y):void 0}if(N.x!==void 0&&N.y!==void 0){const z={id:y,type:"position",position:{...N}};F.push(z)}if(P.width!==void 0&&P.height!==void 0){const B={id:y,type:"dimensions",resizing:!0,setAttributes:f?f==="horizontal"?"width":"height":!0,dimensions:{width:P.width,height:P.height}};F.push(B)}for(const z of j){const B={...z,type:"position"};F.push(B)}O(F)},onEnd:({width:P,height:j})=>{const O={id:y,type:"dimensions",resizing:!1,dimensions:{width:P,height:j}};S.getState().triggerNodeChanges([O])}})),C.current.update({controlPosition:L,boundaries:{minWidth:a,minHeight:l,maxWidth:u,maxHeight:d},keepAspectRatio:c,resizeDirection:f,onResizeStart:x,onResize:w,onResizeEnd:g,shouldResize:p}),()=>{var P;(P=C.current)==null||P.destroy()}},[L,a,l,u,d,c,x,w,g,p]);const M=L.split("-");return h.jsx("div",{className:Oe(["react-flow__resize-control","nodrag",...M,n,r]),ref:E,style:{...s,scale:b,...i&&{[_?"backgroundColor":"borderColor"]:i}},children:o})}R.memo(d3);function f3({data:e,selected:t}){const n=e,r=n.failed_count>0,s=n.running_count>0,o=n.success_count===n.total_count&&n.total_count>0;let i="border-border";return t?i="border-primary ring-2 ring-primary/20":r?i="border-red-500":s?i="border-blue-500":o&&(i="border-green-500"),h.jsxs("div",{className:`bg-card rounded-lg border-2 ${i} shadow-md min-w-[180px] transition-all`,children:[h.jsx(Mo,{type:"target",position:ee.Top,className:"!bg-muted-foreground !w-3 !h-3"}),h.jsxs("div",{className:"px-4 py-3",children:[h.jsx("div",{className:"font-semibold text-sm mb-2",children:n.class_name}),h.jsxs("div",{className:"flex flex-wrap gap-1.5 mb-2",children:[h.jsxs(mt,{variant:"muted",className:"text-xs px-1.5 py-0.5",children:[n.total_count," total"]}),n.success_count>0&&h.jsx(mt,{variant:"success",className:"text-xs px-1.5 py-0.5",children:n.success_count}),n.running_count>0&&h.jsx(mt,{variant:"info",className:"text-xs px-1.5 py-0.5",children:n.running_count}),n.failed_count>0&&h.jsx(mt,{variant:"destructive",className:"text-xs px-1.5 py-0.5",children:n.failed_count})]}),h.jsxs("div",{className:"space-y-1",children:[n.experiments.slice(0,3).map(a=>h.jsxs(Ue,{to:"/experiments/$namespace/$furu_hash",params:{namespace:a.namespace,furu_hash:a.furu_hash},className:"block text-xs text-muted-foreground hover:text-primary truncate",title:a.furu_hash,children:[a.furu_hash.slice(0,8),"..."]},a.furu_hash)),n.experiments.length>3&&h.jsxs("div",{className:"text-xs text-muted-foreground",children:["+",n.experiments.length-3," more"]})]})]}),h.jsx(Mo,{type:"source",position:ee.Bottom,className:"!bg-muted-foreground !w-3 !h-3"})]})}const h3={classNode:f3};function p3(e,t){var p;const n=new Map,r=new Map,s=new Map;for(const x of e)n.set(x.id,0),r.set(x.id,[]),s.set(x.id,x);for(const x of t)s.has(x.source)&&s.has(x.target)&&(n.set(x.target,(n.get(x.target)??0)+1),(p=r.get(x.source))==null||p.push(x.target));const o=[],i=new Set,a=new Set(e.map(x=>x.id));for(;a.size>0;){const x=[];for(const w of a)(n.get(w)??0)===0&&x.push(w);if(x.length===0){const w=a.values().next().value;w&&x.push(w)}o.push(x);for(const w of x){a.delete(w),i.add(w);for(const g of r.get(w)??[])i.has(g)||n.set(g,(n.get(g)??1)-1)}}const l=200,u=180,d=40,c=new Map;for(let x=0;x<o.length;x++){const w=o[x],v=-(w.length*l+(w.length-1)*d)/2;for(let y=0;y<w.length;y++){const S=w[y];c.set(S,{x:v+y*(l+d),y:x*u})}}const f=e.map(x=>{const w=c.get(x.id)??{x:0,y:0};return{id:x.id,type:"classNode",position:w,data:x}}),m=t.filter(x=>s.has(x.source)&&s.has(x.target)).map(x=>({id:`${x.source}-${x.target}`,source:x.source,target:x.target,label:x.field_name,labelStyle:{fontSize:10,fill:"hsl(var(--muted-foreground))"},labelBgStyle:{fill:"hsl(var(--background))"},labelBgPadding:[4,2],style:{stroke:"hsl(var(--border))",strokeWidth:2},markerEnd:{type:ws.ArrowClosed,color:"hsl(var(--border))"},animated:!1}));return{nodes:f,edges:m}}function m3({nodes:e,edges:t}){const[n,r]=R.useState(null),{nodes:s,edges:o}=R.useMemo(()=>p3(e,t),[e,t]),[i,,a]=OA(s),[l,u,d]=FA(o),c=R.useCallback((m,p)=>{const x=p.data;r(x);const w=new Set([p.id]);for(const g of t)g.target===p.id&&w.add(g.source),g.source===p.id&&w.add(g.target);u(g=>g.map(v=>{const y=v.source===p.id||v.target===p.id;return{...v,animated:y,style:{...v.style,stroke:y?"hsl(var(--primary))":"hsl(var(--border))",strokeWidth:y?3:2},markerEnd:{type:ws.ArrowClosed,color:y?"hsl(var(--primary))":"hsl(var(--border))"}}}))},[t,u]),f=R.useCallback(()=>{r(null),u(m=>m.map(p=>({...p,animated:!1,style:{...p.style,stroke:"hsl(var(--border))",strokeWidth:2},markerEnd:{type:ws.ArrowClosed,color:"hsl(var(--border))"}})))},[u]);return h.jsx("div",{className:"h-[600px] border rounded-lg bg-background relative",children:h.jsxs(AA,{nodes:i,edges:l,onNodesChange:a,onEdgesChange:d,onNodeClick:c,onPaneClick:f,nodeTypes:h3,fitView:!0,fitViewOptions:{padding:.2},minZoom:.1,maxZoom:2,defaultEdgeOptions:{type:"smoothstep"},children:[h.jsx(HA,{}),h.jsx(GA,{}),h.jsx(l3,{nodeStrokeColor:"hsl(var(--border))",nodeColor:"hsl(var(--card))",nodeBorderRadius:4}),n&&h.jsx(Ea,{position:"top-right",className:"m-4",children:h.jsxs(be,{className:"w-80",children:[h.jsxs(nt,{className:"pb-2",children:[h.jsx(lt,{className:"text-base",children:n.class_name}),h.jsx("code",{className:"text-xs text-muted-foreground break-all",children:n.full_class_name})]}),h.jsxs(ke,{className:"space-y-3",children:[h.jsxs("div",{className:"flex gap-2 flex-wrap",children:[h.jsxs(mt,{variant:"muted",children:[n.total_count," experiments"]}),n.success_count>0&&h.jsxs(mt,{variant:"success",children:[n.success_count," success"]}),n.running_count>0&&h.jsxs(mt,{variant:"info",children:[n.running_count," running"]}),n.failed_count>0&&h.jsxs(mt,{variant:"destructive",children:[n.failed_count," failed"]})]}),h.jsx("div",{className:"max-h-40 overflow-y-auto space-y-1",children:n.experiments.map(m=>h.jsxs(Ue,{to:"/experiments/$namespace/$furu_hash",params:{namespace:m.namespace,furu_hash:m.furu_hash},className:"flex items-center justify-between p-2 rounded hover:bg-muted text-sm",children:[h.jsxs("code",{className:"text-xs",children:[m.furu_hash.slice(0,12),"..."]}),h.jsx(mt,{variant:m.result_status==="success"?"success":m.result_status==="failed"?"destructive":m.attempt_status==="running"?"info":"muted",className:"text-xs",children:m.attempt_status??m.result_status})]},m.furu_hash))})]})]})})]})})}const g3={default:"border-border",success:"border-emerald-500/40",failed:"border-red-500/40",running:"border-blue-500/40"},y3={default:"text-foreground",success:"text-emerald-300",failed:"text-red-300",running:"text-blue-300"};function Vr({title:e,value:t,loading:n,variant:r="default",icon:s,testId:o}){return h.jsxs(be,{className:ze("p-5",g3[r]),"data-testid":o,children:[h.jsx(nt,{className:"p-0 pb-4",children:h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("span",{className:"text-sm text-muted-foreground",children:e}),s?h.jsx(mt,{variant:"secondary",className:"text-base px-2 py-1",children:s}):null]})}),h.jsx(ke,{className:"p-0",children:h.jsx("div",{className:ze("text-3xl font-bold font-mono",y3[r]),"data-testid":o?`${o}-value`:void 0,children:n?"...":t.toLocaleString()})})]})}const x3=_o("/dag")({component:v3});function v3(){const{data:e,isLoading:t,error:n}=ZR();return h.jsxs("div",{className:"max-w-7xl mx-auto",children:[h.jsxs("div",{className:"mb-8",children:[h.jsx("h1",{className:"text-3xl font-bold mb-2",children:"Experiment DAG"}),h.jsx("p",{className:"text-muted-foreground",children:"Visualize the dependency graph of your experiments. Nodes represent experiment classes, edges show dependencies."})]}),e&&h.jsxs("div",{className:"grid grid-cols-3 gap-4 mb-6",children:[h.jsx(Vr,{title:"Classes",value:e.total_nodes,loading:t,icon:"N"}),h.jsx(Vr,{title:"Dependencies",value:e.total_edges,loading:t,icon:"E"}),h.jsx(Vr,{title:"Experiments",value:e.total_experiments,loading:t,icon:"#"})]}),t?h.jsx(be,{children:h.jsx(ke,{className:"p-8 text-center text-muted-foreground",children:"Loading experiment graph..."})}):n?h.jsx(be,{children:h.jsx(ke,{className:"p-8 text-center text-destructive",children:"Error loading DAG. Is the API running?"})}):(e==null?void 0:e.nodes.length)===0?h.jsx(dw,{title:"No experiments found",description:"Create some experiments to see the dependency graph.",icon:"G"}):e?h.jsxs(be,{children:[h.jsxs(nt,{children:[h.jsx(lt,{children:"Dependency Graph"}),h.jsx("p",{className:"text-sm text-muted-foreground",children:"Click on a node to see details and highlight connected edges. Scroll to zoom, drag to pan."})]}),h.jsx(ke,{className:"p-0",children:h.jsx(m3,{nodes:e.nodes,edges:e.edges})})]}):null,e&&e.nodes.length>0&&h.jsxs(be,{className:"mt-6",children:[h.jsx(nt,{className:"pb-2",children:h.jsx(lt,{className:"text-sm",children:"Legend"})}),h.jsx(ke,{children:h.jsxs("div",{className:"flex flex-wrap gap-6 text-sm",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"w-4 h-4 border-2 border-green-500 rounded"}),h.jsx("span",{children:"All successful"})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"w-4 h-4 border-2 border-blue-500 rounded"}),h.jsx("span",{children:"Running experiments"})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"w-4 h-4 border-2 border-red-500 rounded"}),h.jsx("span",{children:"Has failures"})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"w-4 h-4 border-2 border-border rounded"}),h.jsx("span",{children:"Default"})]})]})})]})]})}const w3=_o("/")({component:S3});function S3(){const{data:e,isLoading:t}=LR(),{data:n,isLoading:r}=QR(),{data:s,isLoading:o}=cw({limit:5});return h.jsxs("div",{className:"max-w-6xl mx-auto",children:[h.jsxs("div",{className:"mb-8",children:[h.jsx("h1",{className:"text-3xl font-bold mb-2",children:"Dashboard"}),h.jsx("p",{className:"text-muted-foreground",children:"Monitor your Furu experiments in real-time"})]}),h.jsx(be,{className:"mb-8",children:h.jsxs(ke,{className:"flex items-center justify-between p-4",children:[h.jsxs("div",{className:"flex items-center gap-4",children:[h.jsx("span",{className:"text-muted-foreground",children:"API Status:"}),t?h.jsx(mt,{variant:"muted",children:"Checking..."}):(e==null?void 0:e.status)==="healthy"?h.jsxs(mt,{variant:"success",className:"gap-2",children:[h.jsx("span",{className:"h-2 w-2 rounded-full bg-emerald-300 animate-pulse"}),"Healthy"]}):h.jsx(mt,{variant:"destructive",children:"Disconnected"})]}),h.jsxs("span",{className:"text-muted-foreground text-sm font-mono",children:["v",(e==null?void 0:e.version)||"..."]})]})}),h.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-8",children:[h.jsx(Vr,{title:"Total Experiments",value:(n==null?void 0:n.total)??0,loading:r,icon:"📊",testId:"stats-total"}),h.jsx(Vr,{title:"Running",value:(n==null?void 0:n.running_count)??0,loading:r,variant:"running",icon:"🔄",testId:"stats-running"}),h.jsx(Vr,{title:"Successful",value:(n==null?void 0:n.success_count)??0,loading:r,variant:"success",icon:"✓",testId:"stats-success"}),h.jsx(Vr,{title:"Failed",value:(n==null?void 0:n.failed_count)??0,loading:r,variant:"failed",icon:"✗",testId:"stats-failed"})]}),n&&n.by_result_status&&n.by_result_status.length>0&&h.jsxs(be,{className:"mb-8",children:[h.jsx(nt,{className:"pb-3",children:h.jsx(lt,{children:"Result Status Distribution"})}),h.jsx(ke,{children:h.jsx("div",{className:"flex flex-wrap gap-3",children:n.by_result_status.map(i=>h.jsxs("div",{className:"flex items-center gap-2 rounded-lg border bg-muted/40 px-3 py-2",children:[h.jsx(sn,{status:i.status,type:"result"}),h.jsx("span",{className:"font-mono text-sm",children:i.count})]},i.status))})})]}),h.jsxs(be,{className:"overflow-hidden",children:[h.jsxs(nt,{className:"flex-row items-center justify-between space-y-0 border-b",children:[h.jsx(lt,{children:"Recent Experiments"}),h.jsx(wn,{asChild:!0,variant:"ghost",size:"sm",children:h.jsx(Ue,{to:"/experiments",children:"View all →"})})]}),o?h.jsx("div",{className:"p-6 text-muted-foreground",children:"Loading..."}):(s==null?void 0:s.experiments.length)===0?h.jsx("div",{className:"p-6 text-muted-foreground",children:"No experiments yet"}):h.jsxs(Vh,{children:[h.jsx(Wh,{children:h.jsxs(Wi,{children:[h.jsx(Ke,{className:"pl-6",children:"Class"}),h.jsx(Ke,{children:"Namespace"}),h.jsx(Ke,{children:"Result"}),h.jsx(Ke,{children:"Migration"}),h.jsx(Ke,{children:"Attempt"}),h.jsx(Ke,{children:"Updated"})]})}),h.jsx(Kh,{children:s==null?void 0:s.experiments.map(i=>h.jsxs(Wi,{children:[h.jsx(qe,{className:"pl-6",children:h.jsx(Ue,{to:"/experiments/$namespace/$furu_hash",params:{namespace:i.namespace,furu_hash:i.furu_hash},className:"font-medium hover:text-primary",children:i.class_name})}),h.jsx(qe,{className:"font-mono text-sm text-muted-foreground",children:i.namespace}),h.jsx(qe,{children:h.jsx(sn,{status:i.result_status,type:"result"})}),h.jsx(qe,{children:i.migration_kind?h.jsx("span",{className:"text-xs rounded-full border border-amber-500/40 bg-amber-500/10 px-2 py-0.5 text-amber-300",children:i.migration_kind}):h.jsx("span",{className:"text-muted-foreground",children:"—"})}),h.jsx(qe,{children:i.attempt_status?h.jsx(sn,{status:i.attempt_status,type:"attempt"}):h.jsx("span",{className:"text-muted-foreground",children:"—"})}),h.jsx(qe,{className:"text-sm text-muted-foreground",children:i.updated_at?new Date(i.updated_at).toLocaleString():"—"})]},`${i.namespace}-${i.furu_hash}`))})]})]})]})}function _3({metadata:e}){const t=a=>{const l=e[a];return typeof l=="string"?l:null},n=t("git_commit"),r=t("git_branch"),s=t("hostname"),o=t("user"),i=t("furu_python_def");return h.jsxs(be,{className:"mb-6",children:[h.jsx(nt,{children:h.jsx(lt,{children:"Metadata"})}),h.jsxs(ke,{children:[h.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 text-sm",children:[n?h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground block",children:"Git Commit"}),h.jsx("code",{className:"font-mono text-xs",children:n})]}):null,r?h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground block",children:"Git Branch"}),h.jsx("span",{children:r})]}):null,s?h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground block",children:"Hostname"}),h.jsx("span",{children:s})]}):null,o?h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground block",children:"User"}),h.jsx("span",{children:o})]}):null]}),i?h.jsxs("div",{className:"mt-4 border-t pt-4",children:[h.jsx("span",{className:"mb-2 block text-sm text-muted-foreground",children:"Python Definition"}),h.jsx("pre",{className:"rounded-lg bg-muted p-4 text-sm overflow-x-auto",children:h.jsx("code",{className:"text-emerald-300",children:i})})]}):null]})]})}function ta({value:e,depth:t=0}){if(e===null)return h.jsx("span",{className:"text-muted-foreground italic",children:"null"});if(typeof e=="boolean")return h.jsx("span",{className:e?"text-green-400":"text-red-400",children:String(e)});if(typeof e=="number")return h.jsx("span",{className:"text-blue-400",children:e});if(typeof e=="string")return h.jsxs("span",{className:"text-amber-300",children:['"',e,'"']});if(Array.isArray(e))return e.length===0?h.jsx("span",{className:"text-muted-foreground",children:"[]"}):h.jsxs("div",{className:"ml-4",children:[h.jsx("span",{className:"text-muted-foreground",children:"["}),e.map((n,r)=>h.jsxs("div",{className:"ml-4",children:[h.jsx(ta,{value:n,depth:t+1}),r<e.length-1&&h.jsx("span",{className:"text-muted-foreground",children:","})]},r)),h.jsx("span",{className:"text-muted-foreground",children:"]"})]});if(typeof e=="object"){const n=Object.entries(e);return n.length===0?h.jsx("span",{className:"text-muted-foreground",children:"{}"}):h.jsx("div",{className:t>0?"ml-4":"",children:n.map(([r,s],o)=>h.jsxs("div",{className:"flex",children:[h.jsxs("span",{className:"text-purple-400 mr-1",children:[r,":"]}),h.jsx(ta,{value:s,depth:t+1}),o<n.length-1&&h.jsx("span",{className:"text-muted-foreground",children:","})]},r))})}return h.jsx("span",{children:String(e)})}function Ey({title:e,children:t,defaultOpen:n=!1}){const[r,s]=R.useState(n);return h.jsxs("div",{className:"border rounded-lg mb-2",children:[h.jsxs("button",{onClick:()=>s(!r),className:"w-full px-4 py-2 text-left flex items-center justify-between hover:bg-muted/50 rounded-lg",children:[h.jsx("span",{className:"font-medium text-sm",children:e}),h.jsx("span",{className:"text-muted-foreground",children:r?"−":"+"})]}),r&&h.jsx("div",{className:"px-4 pb-4 pt-2",children:t})]})}function b3({furuObj:e,parents:t}){const n=[],r=[];for(const[a,l]of Object.entries(e))a!=="__class__"&&(l&&typeof l=="object"&&!Array.isArray(l)&&"__class__"in l?r.push([a,l]):n.push([a,l]));const s=new Map((t==null?void 0:t.map(a=>[a.field_name,a]))??[]),o=n.length>0,i=r.length>0;return!o&&!i?h.jsxs(be,{className:"mb-6",children:[h.jsx(nt,{children:h.jsx(lt,{children:"Configuration"})}),h.jsx(ke,{children:h.jsx("p",{className:"text-muted-foreground text-sm",children:"No configuration parameters"})})]}):h.jsxs(be,{className:"mb-6",children:[h.jsx(nt,{children:h.jsx(lt,{children:"Configuration"})}),h.jsxs(ke,{children:[o&&h.jsx(Ey,{title:"Parameters",defaultOpen:!0,children:h.jsx("div",{className:"font-mono text-sm space-y-1",children:n.map(([a,l])=>h.jsxs("div",{className:"flex",children:[h.jsxs("span",{className:"text-purple-400 mr-2 min-w-fit",children:[a,":"]}),h.jsx(ta,{value:l})]},a))})}),i&&h.jsx(Ey,{title:"Dependencies (Embedded Config)",children:h.jsx("div",{className:"space-y-3",children:r.map(([a,l])=>{const u=s.get(a),d=(u==null?void 0:u.namespace)&&(u==null?void 0:u.furu_hash);return h.jsxs("div",{className:"border-l-2 border-muted pl-3",children:[h.jsxs("div",{className:"text-sm mb-1 flex items-center justify-between",children:[h.jsxs("div",{className:"flex items-center",children:[h.jsx("span",{className:"text-purple-400 font-medium",children:a}),h.jsx("span",{className:"text-muted-foreground mx-1",children:":"}),d?h.jsx(Ue,{to:"/experiments/$namespace/$furu_hash",params:{namespace:u.namespace,furu_hash:u.furu_hash},className:"text-cyan-400 hover:underline",children:l.__class__}):h.jsx("span",{className:"text-cyan-400",children:l.__class__})]}),(u==null?void 0:u.result_status)&&h.jsx(sn,{status:u.result_status,type:"result"})]}),h.jsx("div",{className:"font-mono text-xs space-y-0.5 text-muted-foreground",children:Object.entries(l).filter(([c])=>c!=="__class__").map(([c,f])=>h.jsxs("div",{className:"flex",children:[h.jsxs("span",{className:"mr-1",children:[c,":"]}),h.jsx(ta,{value:f,depth:1})]},c))})]},a)})})})]})]})}function E3({parents:e}){return e.length===0?null:h.jsxs(be,{className:"mb-6",children:[h.jsx(nt,{children:h.jsx(lt,{children:"Parent Experiments"})}),h.jsx(ke,{children:h.jsx("div",{className:"space-y-3",children:e.map((t,n)=>h.jsxs("div",{className:"border rounded-lg p-3",children:[h.jsxs("div",{className:"flex items-center justify-between mb-2",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("span",{className:"text-purple-400 font-medium text-sm",children:t.field_name}),h.jsx("span",{className:"text-muted-foreground",children:":"}),h.jsx("span",{className:"text-cyan-400 text-sm",children:t.class_name})]}),t.result_status&&h.jsx(sn,{status:t.result_status,type:"result"})]}),t.namespace&&t.furu_hash?h.jsxs(Ue,{to:"/experiments/$namespace/$furu_hash",params:{namespace:t.namespace,furu_hash:t.furu_hash},className:"text-sm text-primary hover:underline flex items-center gap-1",children:[h.jsx("span",{children:"View experiment"}),h.jsxs("span",{className:"text-muted-foreground font-mono text-xs",children:["(",t.furu_hash.slice(0,8),"...)"]})]}):h.jsx("span",{className:"text-sm text-muted-foreground italic",children:"Experiment not found in storage"}),t.config&&Object.keys(t.config).length>0&&h.jsxs("details",{className:"mt-2",children:[h.jsx("summary",{className:"text-xs text-muted-foreground cursor-pointer hover:text-foreground",children:"Show config"}),h.jsx("div",{className:"mt-1 font-mono text-xs pl-2 border-l border-muted",children:Object.entries(t.config).map(([r,s])=>h.jsxs("div",{className:"flex",children:[h.jsxs("span",{className:"text-muted-foreground mr-1",children:[r,":"]}),h.jsx(ta,{value:s,depth:1})]},r))})]})]},`${t.field_name}-${n}`))})})]})}function C3({children:e}){return e.length===0?null:h.jsxs(be,{className:"mb-6",children:[h.jsx(nt,{children:h.jsxs(lt,{children:["Child Experiments (",e.length,")"]})}),h.jsx(ke,{children:h.jsx("div",{className:"space-y-2",children:e.map((t,n)=>h.jsxs("div",{className:"border rounded-lg p-3 flex items-center justify-between",children:[h.jsx("div",{className:"flex items-center gap-3",children:h.jsxs("div",{children:[h.jsx(Ue,{to:"/experiments/$namespace/$furu_hash",params:{namespace:t.namespace,furu_hash:t.furu_hash},className:"text-primary hover:underline font-medium",children:t.class_name}),h.jsxs("div",{className:"text-xs text-muted-foreground",children:["via"," ",h.jsx("span",{className:"text-purple-400",children:t.field_name})]})]})}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsxs("code",{className:"text-xs text-muted-foreground font-mono",children:[t.furu_hash.slice(0,8),"..."]}),h.jsx(sn,{status:t.result_status,type:"result"})]})]},`${t.namespace}-${t.furu_hash}-${n}`))})})]})}const Z1=_o("/experiments_/$namespace/$furu_hash")({component:N3});function N3(){var f,m,p;const{namespace:e,furu_hash:t}=Z1.useParams(),[n,r]=R.useState("resolved"),{data:s,isLoading:o,error:i}=VR(e,t,{view:n}),{data:a}=$R(e,t,{view:n}),l=!!(s!=null&&s.migration_kind),u=R.useMemo(()=>s!=null&&s.original_namespace&&(s!=null&&s.original_hash)?{namespace:s.original_namespace,furu_hash:s.original_hash}:s!=null&&s.from_namespace&&(s!=null&&s.from_hash)?{namespace:s.from_namespace,furu_hash:s.from_hash}:null,[s==null?void 0:s.original_namespace,s==null?void 0:s.original_hash,s==null?void 0:s.from_namespace,s==null?void 0:s.from_hash]),d=R.useMemo(()=>!(s!=null&&s.alias_namespaces)||!(s!=null&&s.alias_hashes)?[]:s.alias_namespaces.map((x,w)=>{var g;return{namespace:x,furu_hash:((g=s.alias_hashes)==null?void 0:g[w])??""}}),[s==null?void 0:s.alias_namespaces,s==null?void 0:s.alias_hashes]);if(o)return h.jsx("div",{className:"max-w-5xl mx-auto",children:h.jsx("div",{className:"text-muted-foreground",children:"Loading experiment..."})});if(i||!s)return h.jsx("div",{className:"max-w-5xl mx-auto",children:h.jsx(be,{className:"border-destructive/40",children:h.jsxs(ke,{className:"p-6 text-center",children:[h.jsx("h2",{className:"mb-2 text-xl font-bold text-destructive",children:"Experiment Not Found"}),h.jsx("p",{className:"mb-4 text-muted-foreground",children:"The experiment you're looking for doesn't exist or has been removed."}),h.jsx(wn,{asChild:!0,variant:"ghost",children:h.jsx(Ue,{to:"/experiments",children:"Back to experiments"})})]})})});const c=s.metadata&&typeof s.metadata=="object"&&"furu_obj"in s.metadata?s.metadata.furu_obj:null;return h.jsxs("div",{className:"max-w-5xl mx-auto",children:[h.jsxs("div",{className:"mb-6 text-sm",children:[h.jsx(Ue,{to:"/experiments",className:"text-muted-foreground hover:text-primary",children:"Experiments"}),h.jsx("span",{className:"mx-2 text-muted-foreground",children:"/"}),h.jsx("span",{className:"text-foreground",children:s.class_name})]}),h.jsxs(be,{className:"mb-6",children:[h.jsx(nt,{className:"pb-4",children:h.jsxs("div",{className:"flex items-start justify-between",children:[h.jsxs("div",{children:[h.jsx(lt,{className:"text-2xl",children:s.class_name}),h.jsx("p",{className:"text-sm font-mono text-muted-foreground",children:s.namespace})]}),h.jsxs("div",{className:"flex flex-col items-end gap-2",children:[h.jsxs("div",{className:"flex gap-2",children:[h.jsx(sn,{status:s.result_status,type:"result"}),s.attempt_status?h.jsx(sn,{status:s.attempt_status,type:"attempt"}):null]}),l?h.jsx("span",{className:"rounded-full border border-amber-500/40 bg-amber-500/10 px-2 py-0.5 text-xs text-amber-300",children:s.migration_kind}):null]})]})}),h.jsxs(ke,{className:"space-y-4",children:[l&&h.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-xs",children:[h.jsxs("div",{className:"rounded-full border border-muted px-3 py-1 text-muted-foreground",children:["View: ",n]}),h.jsxs("div",{className:"flex rounded-full border border-muted overflow-hidden",children:[h.jsx("button",{className:`px-3 py-1 text-xs ${n==="resolved"?"bg-primary text-primary-foreground":"text-muted-foreground"}`,onClick:()=>r("resolved"),children:"Aliased"}),h.jsx("button",{className:`px-3 py-1 text-xs ${n==="original"?"bg-primary text-primary-foreground":"text-muted-foreground"}`,onClick:()=>r("original"),disabled:!u,children:"Original"})]}),u?h.jsx(wn,{asChild:!0,size:"sm",variant:"ghost",children:h.jsx(Ue,{to:"/experiments/$namespace/$furu_hash",params:u,children:"View original"})}):null,s.original_result_status?h.jsxs("span",{className:"text-muted-foreground",children:["Original status: ",s.original_result_status]}):null]}),d.length>0&&h.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-xs",children:[h.jsxs("div",{className:"rounded-full border border-muted px-3 py-1 text-muted-foreground",children:["Aliases: ",d.length]}),h.jsx("div",{className:"flex flex-wrap gap-2",children:d.map(x=>h.jsx(wn,{asChild:!0,size:"sm",variant:"ghost",children:h.jsx(Ue,{to:"/experiments/$namespace/$furu_hash",params:x,"aria-label":"View alias",children:"View alias"})},x.furu_hash))})]}),h.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-sm",children:[h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground block",children:"Hash"}),h.jsx("code",{className:"font-mono",children:s.furu_hash})]}),h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground block",children:"Attempt #"}),h.jsx("span",{children:s.attempt_number??"—"})]}),h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground block",children:"Started"}),h.jsx("span",{children:s.started_at?new Date(s.started_at).toLocaleString():"—"})]}),h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground block",children:"Updated"}),h.jsx("span",{children:s.updated_at?new Date(s.updated_at).toLocaleString():"—"})]})]})]})]}),c&&h.jsx(b3,{furuObj:c,parents:a==null?void 0:a.parents}),(a==null?void 0:a.parents)&&a.parents.length>0&&h.jsx(E3,{parents:a.parents}),(a==null?void 0:a.children)&&a.children.length>0&&h.jsx(C3,{children:a.children}),s.attempt&&h.jsxs(be,{className:"mb-6",children:[h.jsx(nt,{children:h.jsx(lt,{children:"Current Attempt"})}),h.jsxs(ke,{children:[h.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 text-sm",children:[h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground block",children:"ID"}),h.jsx("code",{className:"font-mono text-xs",children:s.attempt.id})]}),h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground block",children:"Backend"}),h.jsx("span",{children:s.attempt.backend})]}),h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground block",children:"Status"}),h.jsx(sn,{status:s.attempt.status,type:"attempt"})]}),h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground block",children:"Host"}),h.jsx("span",{children:((f=s.attempt.owner)==null?void 0:f.host)??"—"})]}),h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground block",children:"PID"}),h.jsx("span",{className:"font-mono",children:((m=s.attempt.owner)==null?void 0:m.pid)??"—"})]}),h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground block",children:"User"}),h.jsx("span",{children:((p=s.attempt.owner)==null?void 0:p.user)??"—"})]}),h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground block",children:"Started At"}),h.jsx("span",{children:new Date(s.attempt.started_at).toLocaleString()})]}),h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground block",children:"Lease Expires"}),h.jsx("span",{children:new Date(s.attempt.lease_expires_at).toLocaleString()})]})]}),s.attempt.reason?h.jsxs("div",{className:"mt-4 border-t pt-4",children:[h.jsx("span",{className:"block text-sm text-muted-foreground",children:"Reason"}),h.jsx("span",{className:"text-amber-300",children:s.attempt.reason})]}):null,s.attempt.error?h.jsxs("div",{className:"mt-4 border-t pt-4",children:[h.jsx("span",{className:"block text-sm text-muted-foreground",children:"Error"}),h.jsxs("div",{className:"mt-2 rounded-lg border border-destructive/30 bg-destructive/10 p-3",children:[h.jsxs("div",{className:"font-mono text-sm text-destructive",children:[s.attempt.error.type,": ",s.attempt.error.message]}),s.attempt.error.traceback?h.jsxs("details",{className:"mt-3",children:[h.jsx("summary",{className:"cursor-pointer text-xs text-muted-foreground hover:text-foreground",children:"View traceback"}),h.jsx("pre",{className:"mt-2 max-h-96 overflow-auto rounded bg-muted p-3 text-xs",children:h.jsx("code",{className:"text-muted-foreground",children:s.attempt.error.traceback})})]}):null]})]}):null]})]}),s.metadata&&h.jsx(_3,{metadata:s.metadata}),h.jsxs(be,{className:"mb-6",children:[h.jsx(nt,{children:h.jsx(lt,{children:"Directory"})}),h.jsx(ke,{children:h.jsx("code",{className:"break-all font-mono text-sm text-muted-foreground",children:s.directory})})]}),h.jsxs("details",{className:"rounded-lg border bg-card",children:[h.jsx("summary",{className:"cursor-pointer px-6 py-4 text-muted-foreground hover:text-foreground",children:"View Raw State JSON"}),h.jsx("div",{className:"px-6 pb-6",children:h.jsx("pre",{className:"max-h-96 overflow-x-auto rounded-lg bg-muted p-4 text-sm",children:h.jsx("code",{className:"text-muted-foreground",children:JSON.stringify(s.state,null,2)})})})]})]})}const k3=ij.update({id:"/experiments",path:"/experiments",getParentRoute:()=>ya}),P3=x3.update({id:"/dag",path:"/dag",getParentRoute:()=>ya}),R3=w3.update({id:"/",path:"/",getParentRoute:()=>ya}),j3=Z1.update({id:"/experiments_/$namespace/$furu_hash",path:"/experiments/$namespace/$furu_hash",getParentRoute:()=>ya}),M3={IndexRoute:R3,DagRoute:P3,ExperimentsRoute:k3,ExperimentsNamespaceFuru_hashRoute:j3},T3=ya._addFileChildren(M3)._addFileTypes(),L3=new ZE({defaultOptions:{queries:{refetchInterval:5e3,staleTime:2e3,retry:(e,t)=>{var n;if(t instanceof DP&&((n=t.response)!=null&&n.status)){const r=t.response.status;if(r>=400&&r<500)return!1}return e<3}}}}),I3=ok({routeTree:T3});Gx(document.getElementById("root")).render(h.jsx(R.StrictMode,{children:h.jsx(eC,{client:L3,children:h.jsx(lk,{router:I3})})}));
|
|
66
|
+
`)),d=u.reduce((c,f)=>c.concat(...f),[]);return[u,d]}return[[],[]]},[e]);return j.useEffect(()=>{const l=(t==null?void 0:t.target)??iy,u=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const d=m=>{var w,g;if(s.current=m.ctrlKey||m.metaKey||m.shiftKey||m.altKey,(!s.current||s.current&&!u)&&e1(m))return!1;const x=ly(m.code,a);if(o.current.add(m[x]),ay(i,o.current,!1)){const v=((g=(w=m.composedPath)==null?void 0:w.call(m))==null?void 0:g[0])||m.target,y=(v==null?void 0:v.nodeName)==="BUTTON"||(v==null?void 0:v.nodeName)==="A";t.preventDefault!==!1&&(s.current||!y)&&m.preventDefault(),r(!0)}},c=m=>{const p=ly(m.code,a);ay(i,o.current,!0)?(r(!1),o.current.clear()):o.current.delete(m[p]),m.key==="Meta"&&o.current.clear(),s.current=!1},f=()=>{o.current.clear(),r(!1)};return l==null||l.addEventListener("keydown",d),l==null||l.addEventListener("keyup",c),window.addEventListener("blur",f),window.addEventListener("contextmenu",f),()=>{l==null||l.removeEventListener("keydown",d),l==null||l.removeEventListener("keyup",c),window.removeEventListener("blur",f),window.removeEventListener("contextmenu",f)}}},[e,r]),n}function ay(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(s=>t.has(s)))}function ly(e,t){return t.includes(e)?"code":"key"}const pI=()=>{const e=Ce();return j.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(t,{duration:n==null?void 0:n.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[r,s,o],panZoom:i}=e.getState();return i?(await i.setViewport({x:t.x??r,y:t.y??s,zoom:t.zoom??o},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{const{width:r,height:s,minZoom:o,maxZoom:i,panZoom:a}=e.getState(),l=np(t,r,s,o,i,(n==null?void 0:n.padding)??.1);return a?(await a.setViewport(l,{duration:n==null?void 0:n.duration,ease:n==null?void 0:n.ease,interpolate:n==null?void 0:n.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:r,snapGrid:s,snapToGrid:o,domNode:i}=e.getState();if(!i)return t;const{x:a,y:l}=i.getBoundingClientRect(),u={x:t.x-a,y:t.y-l},d=n.snapGrid??s,c=n.snapToGrid??o;return ba(u,r,c,d)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:s,y:o}=r.getBoundingClientRect(),i=yu(t,n);return{x:i.x+s,y:i.y+o}}}),[])};function _1(e,t){const n=[],r=new Map,s=[];for(const o of e)if(o.type==="add"){s.push(o);continue}else if(o.type==="remove"||o.type==="replace")r.set(o.id,[o]);else{const i=r.get(o.id);i?i.push(o):r.set(o.id,[o])}for(const o of t){const i=r.get(o.id);if(!i){n.push(o);continue}if(i[0].type==="remove")continue;if(i[0].type==="replace"){n.push({...i[0].item});continue}const a={...o};for(const l of i)mI(l,a);n.push(a)}return s.length&&s.forEach(o=>{o.index!==void 0?n.splice(o.index,0,{...o.item}):n.push({...o.item})}),n}function mI(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function b1(e,t){return _1(e,t)}function E1(e,t){return _1(e,t)}function Or(e,t){return{id:e,type:"select",selected:t}}function Hs(e,t=new Set,n=!1){const r=[];for(const[s,o]of e){const i=t.has(s);!(o.selected===void 0&&!i)&&o.selected!==i&&(n&&(o.selected=i),r.push(Or(o.id,i)))}return r}function uy({items:e=[],lookup:t}){var s;const n=[],r=new Map(e.map(o=>[o.id,o]));for(const[o,i]of e.entries()){const a=t.get(i.id),l=((s=a==null?void 0:a.internals)==null?void 0:s.userNode)??a;l!==void 0&&l!==i&&n.push({id:i.id,item:i,type:"replace"}),l===void 0&&n.push({item:i,type:"add",index:o})}for(const[o]of t)r.get(o)===void 0&&n.push({id:o,type:"remove"});return n}function cy(e){return{id:e.id,type:"remove"}}const dy=e=>WT(e),gI=e=>Kw(e);function C1(e){return j.forwardRef(e)}const yI=typeof window<"u"?j.useLayoutEffect:j.useEffect;function fy(e){const[t,n]=j.useState(BigInt(0)),[r]=j.useState(()=>xI(()=>n(s=>s+BigInt(1))));return yI(()=>{const s=r.get();s.length&&(e(s),r.reset())},[t]),r}function xI(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const N1=j.createContext(null);function vI({children:e}){const t=Ce(),n=j.useCallback(a=>{const{nodes:l=[],setNodes:u,hasDefaultNodes:d,onNodesChange:c,nodeLookup:f,fitViewQueued:m,onNodesChangeMiddlewareMap:p}=t.getState();let x=l;for(const g of a)x=typeof g=="function"?g(x):g;let w=uy({items:x,lookup:f});for(const g of p.values())w=g(w);d&&u(x),w.length>0?c==null||c(w):m&&window.requestAnimationFrame(()=>{const{fitViewQueued:g,nodes:v,setNodes:y}=t.getState();g&&y(v)})},[]),r=fy(n),s=j.useCallback(a=>{const{edges:l=[],setEdges:u,hasDefaultEdges:d,onEdgesChange:c,edgeLookup:f}=t.getState();let m=l;for(const p of a)m=typeof p=="function"?p(m):p;d?u(m):c&&c(uy({items:m,lookup:f}))},[]),o=fy(s),i=j.useMemo(()=>({nodeQueue:r,edgeQueue:o}),[]);return h.jsx(N1.Provider,{value:i,children:e})}function wI(){const e=j.useContext(N1);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const SI=e=>!!e.panZoom;function up(){const e=pI(),t=Ce(),n=wI(),r=fe(SI),s=j.useMemo(()=>{const o=c=>t.getState().nodeLookup.get(c),i=c=>{n.nodeQueue.push(c)},a=c=>{n.edgeQueue.push(c)},l=c=>{var g,v;const{nodeLookup:f,nodeOrigin:m}=t.getState(),p=dy(c)?c:f.get(c.id),x=p.parentId?Zw(p.position,p.measured,p.parentId,f,m):p.position,w={...p,position:x,width:((g=p.measured)==null?void 0:g.width)??p.width,height:((v=p.measured)==null?void 0:v.height)??p.height};return Po(w)},u=(c,f,m={replace:!1})=>{i(p=>p.map(x=>{if(x.id===c){const w=typeof f=="function"?f(x):f;return m.replace&&dy(w)?w:{...x,...w}}return x}))},d=(c,f,m={replace:!1})=>{a(p=>p.map(x=>{if(x.id===c){const w=typeof f=="function"?f(x):f;return m.replace&&gI(w)?w:{...x,...w}}return x}))};return{getNodes:()=>t.getState().nodes.map(c=>({...c})),getNode:c=>{var f;return(f=o(c))==null?void 0:f.internals.userNode},getInternalNode:o,getEdges:()=>{const{edges:c=[]}=t.getState();return c.map(f=>({...f}))},getEdge:c=>t.getState().edgeLookup.get(c),setNodes:i,setEdges:a,addNodes:c=>{const f=Array.isArray(c)?c:[c];n.nodeQueue.push(m=>[...m,...f])},addEdges:c=>{const f=Array.isArray(c)?c:[c];n.edgeQueue.push(m=>[...m,...f])},toObject:()=>{const{nodes:c=[],edges:f=[],transform:m}=t.getState(),[p,x,w]=m;return{nodes:c.map(g=>({...g})),edges:f.map(g=>({...g})),viewport:{x:p,y:x,zoom:w}}},deleteElements:async({nodes:c=[],edges:f=[]})=>{const{nodes:m,edges:p,onNodesDelete:x,onEdgesDelete:w,triggerNodeChanges:g,triggerEdgeChanges:v,onDelete:y,onBeforeDelete:S}=t.getState(),{nodes:E,edges:b}=await XT({nodesToRemove:c,edgesToRemove:f,nodes:m,edges:p,onBeforeDelete:S}),_=b.length>0,C=E.length>0;if(_){const M=b.map(cy);w==null||w(b),v(M)}if(C){const M=E.map(cy);x==null||x(E),g(M)}return(C||_)&&(y==null||y({nodes:E,edges:b})),{deletedNodes:E,deletedEdges:b}},getIntersectingNodes:(c,f=!0,m)=>{const p=Bg(c),x=p?c:l(c),w=m!==void 0;return x?(m||t.getState().nodes).filter(g=>{const v=t.getState().nodeLookup.get(g.id);if(v&&!p&&(g.id===c.id||!v.internals.positionAbsolute))return!1;const y=Po(w?g:v),S=Zi(y,x);return f&&S>0||S>=y.width*y.height||S>=x.width*x.height}):[]},isNodeIntersecting:(c,f,m=!0)=>{const x=Bg(c)?c:l(c);if(!x)return!1;const w=Zi(x,f);return m&&w>0||w>=f.width*f.height||w>=x.width*x.height},updateNode:u,updateNodeData:(c,f,m={replace:!1})=>{u(c,p=>{const x=typeof f=="function"?f(p):f;return m.replace?{...p,data:x}:{...p,data:{...p.data,...x}}},m)},updateEdge:d,updateEdgeData:(c,f,m={replace:!1})=>{d(c,p=>{const x=typeof f=="function"?f(p):f;return m.replace?{...p,data:x}:{...p,data:{...p.data,...x}}},m)},getNodesBounds:c=>{const{nodeLookup:f,nodeOrigin:m}=t.getState();return KT(c,{nodeLookup:f,nodeOrigin:m})},getHandleConnections:({type:c,id:f,nodeId:m})=>{var p;return Array.from(((p=t.getState().connectionLookup.get(`${m}-${c}${f?`-${f}`:""}`))==null?void 0:p.values())??[])},getNodeConnections:({type:c,handleId:f,nodeId:m})=>{var p;return Array.from(((p=t.getState().connectionLookup.get(`${m}${c?f?`-${c}-${f}`:`-${c}`:""}`))==null?void 0:p.values())??[])},fitView:async c=>{const f=t.getState().fitViewResolver??eL();return t.setState({fitViewQueued:!0,fitViewOptions:c,fitViewResolver:f}),n.nodeQueue.push(m=>[...m]),f.promise}}},[]);return j.useMemo(()=>({...s,...e,viewportInitialized:r}),[r])}const hy=e=>e.selected,_I=typeof window<"u"?window:void 0;function bI({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=Ce(),{deleteElements:r}=up(),s=ea(e,{actInsideInputWithModifier:!1}),o=ea(t,{target:_I});j.useEffect(()=>{if(s){const{edges:i,nodes:a}=n.getState();r({nodes:a.filter(hy),edges:i.filter(hy)}),n.setState({nodesSelectionActive:!1})}},[s]),j.useEffect(()=>{n.setState({multiSelectionActive:o})},[o])}function EI(e){const t=Ce();j.useEffect(()=>{const n=()=>{var s,o,i,a;if(!e.current||!(((o=(s=e.current).checkVisibility)==null?void 0:o.call(s))??!0))return!1;const r=rp(e.current);(r.height===0||r.width===0)&&((a=(i=t.getState()).onError)==null||a.call(i,"004",bn.error004())),t.setState({width:r.width||500,height:r.height||500})};if(e.current){n(),window.addEventListener("resize",n);const r=new ResizeObserver(()=>n());return r.observe(e.current),()=>{window.removeEventListener("resize",n),r&&e.current&&r.unobserve(e.current)}}},[])}const ec={position:"absolute",width:"100%",height:"100%",top:0,left:0},CI=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function NI({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:s=.5,panOnScrollMode:o=as.Free,zoomOnDoubleClick:i=!0,panOnDrag:a=!0,defaultViewport:l,translateExtent:u,minZoom:d,maxZoom:c,zoomActivationKeyCode:f,preventScrolling:m=!0,children:p,noWheelClassName:x,noPanClassName:w,onViewportChange:g,isControlledViewport:v,paneClickDistance:y,selectionOnDrag:S}){const E=Ce(),b=j.useRef(null),{userSelectionActive:_,lib:C,connectionInProgress:M}=fe(CI,Ee),L=ea(f),P=j.useRef();EI(b);const R=j.useCallback($=>{g==null||g({x:$[0],y:$[1],zoom:$[2]}),v||E.setState({transform:$})},[g,v]);return j.useEffect(()=>{if(b.current){P.current=FL({domNode:b.current,minZoom:d,maxZoom:c,translateExtent:u,viewport:l,onDraggingChange:A=>E.setState({paneDragging:A}),onPanZoomStart:(A,F)=>{const{onViewportChangeStart:N,onMoveStart:T}=E.getState();T==null||T(A,F),N==null||N(F)},onPanZoom:(A,F)=>{const{onViewportChange:N,onMove:T}=E.getState();T==null||T(A,F),N==null||N(F)},onPanZoomEnd:(A,F)=>{const{onViewportChangeEnd:N,onMoveEnd:T}=E.getState();T==null||T(A,F),N==null||N(F)}});const{x:$,y:k,zoom:I}=P.current.getViewport();return E.setState({panZoom:P.current,transform:[$,k,I],domNode:b.current.closest(".react-flow")}),()=>{var A;(A=P.current)==null||A.destroy()}}},[]),j.useEffect(()=>{var $;($=P.current)==null||$.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:s,panOnScrollMode:o,zoomOnDoubleClick:i,panOnDrag:a,zoomActivationKeyPressed:L,preventScrolling:m,noPanClassName:w,userSelectionActive:_,noWheelClassName:x,lib:C,onTransformChange:R,connectionInProgress:M,selectionOnDrag:S,paneClickDistance:y})},[e,t,n,r,s,o,i,a,L,m,w,_,x,C,R,M,S,y]),h.jsx("div",{className:"react-flow__renderer",ref:b,style:ec,children:p})}const kI=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function PI(){const{userSelectionActive:e,userSelectionRect:t}=fe(kI,Ee);return e&&t?h.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const Zc=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},RI=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function jI({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Yi.Full,panOnDrag:r,paneClickDistance:s,selectionOnDrag:o,onSelectionStart:i,onSelectionEnd:a,onPaneClick:l,onPaneContextMenu:u,onPaneScroll:d,onPaneMouseEnter:c,onPaneMouseMove:f,onPaneMouseLeave:m,children:p}){const x=Ce(),{userSelectionActive:w,elementsSelectable:g,dragging:v,connectionInProgress:y}=fe(RI,Ee),S=g&&(e||w),E=j.useRef(null),b=j.useRef(),_=j.useRef(new Set),C=j.useRef(new Set),M=j.useRef(!1),L=N=>{if(M.current||y){M.current=!1;return}l==null||l(N),x.getState().resetSelectedElements(),x.setState({nodesSelectionActive:!1})},P=N=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){N.preventDefault();return}u==null||u(N)},R=d?N=>d(N):void 0,$=N=>{M.current&&(N.stopPropagation(),M.current=!1)},k=N=>{var X,Q;const{domNode:T}=x.getState();if(b.current=T==null?void 0:T.getBoundingClientRect(),!b.current)return;const D=N.target===E.current;if(!D&&!!N.target.closest(".nokey")||!e||!(o&&D||t)||N.button!==0||!N.isPrimary)return;(Q=(X=N.target)==null?void 0:X.setPointerCapture)==null||Q.call(X,N.pointerId),M.current=!1;const{x:K,y:V}=tn(N.nativeEvent,b.current);x.setState({userSelectionRect:{width:0,height:0,startX:K,startY:V,x:K,y:V}}),D||(N.stopPropagation(),N.preventDefault())},I=N=>{const{userSelectionRect:T,transform:D,nodeLookup:B,edgeLookup:H,connectionLookup:K,triggerNodeChanges:V,triggerEdgeChanges:X,defaultEdgeOptions:Q,resetSelectedElements:Y}=x.getState();if(!b.current||!T)return;const{x:W,y:Z}=tn(N.nativeEvent,b.current),{startX:oe,startY:re}=T;if(!M.current){const ce=t?0:s;if(Math.hypot(W-oe,Z-re)<=ce)return;Y(),i==null||i(N)}M.current=!0;const J={startX:oe,startY:re,x:W<oe?W:oe,y:Z<re?Z:re,width:Math.abs(W-oe),height:Math.abs(Z-re)},te=_.current,he=C.current;_.current=new Set(tp(B,J,D,n===Yi.Partial,!0).map(ce=>ce.id)),C.current=new Set;const ye=(Q==null?void 0:Q.selectable)??!0;for(const ce of _.current){const $e=K.get(ce);if($e)for(const{edgeId:un}of $e.values()){const dt=H.get(un);dt&&(dt.selectable??ye)&&C.current.add(un)}}if(!Hg(te,_.current)){const ce=Hs(B,_.current,!0);V(ce)}if(!Hg(he,C.current)){const ce=Hs(H,C.current);X(ce)}x.setState({userSelectionRect:J,userSelectionActive:!0,nodesSelectionActive:!1})},A=N=>{var T,D;N.button===0&&((D=(T=N.target)==null?void 0:T.releasePointerCapture)==null||D.call(T,N.pointerId),!w&&N.target===E.current&&x.getState().userSelectionRect&&(L==null||L(N)),x.setState({userSelectionActive:!1,userSelectionRect:null}),M.current&&(a==null||a(N),x.setState({nodesSelectionActive:_.current.size>0})))},F=r===!0||Array.isArray(r)&&r.includes(0);return h.jsxs("div",{className:Oe(["react-flow__pane",{draggable:F,dragging:v,selection:e}]),onClick:S?void 0:Zc(L,E),onContextMenu:Zc(P,E),onWheel:Zc(R,E),onPointerEnter:S?void 0:c,onPointerMove:S?I:f,onPointerUp:S?A:void 0,onPointerDownCapture:S?k:void 0,onClickCapture:S?$:void 0,onPointerLeave:m,ref:E,style:ec,children:[p,h.jsx(PI,{})]})}function Pf({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:s,unselectNodesAndEdges:o,multiSelectionActive:i,nodeLookup:a,onError:l}=t.getState(),u=a.get(e);if(!u){l==null||l("012",bn.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&i)&&(o({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var d;return(d=r==null?void 0:r.current)==null?void 0:d.blur()})):s([e])}function k1({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:s,isSelectable:o,nodeClickDistance:i}){const a=Ce(),[l,u]=j.useState(!1),d=j.useRef();return j.useEffect(()=>{d.current=bL({getStoreItems:()=>a.getState(),onNodeMouseDown:c=>{Pf({id:c,store:a,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),j.useEffect(()=>{var c,f;if(t)(c=d.current)==null||c.destroy();else if(e.current)return(f=d.current)==null||f.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:o,nodeId:s,nodeClickDistance:i}),()=>{var m;(m=d.current)==null||m.destroy()}},[n,r,t,o,e,s]),l}const MI=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function P1(){const e=Ce();return j.useCallback(n=>{const{nodeExtent:r,snapToGrid:s,snapGrid:o,nodesDraggable:i,onError:a,updateNodePositions:l,nodeLookup:u,nodeOrigin:d}=e.getState(),c=new Map,f=MI(i),m=s?o[0]:5,p=s?o[1]:5,x=n.direction.x*m*n.factor,w=n.direction.y*p*n.factor;for(const[,g]of u){if(!f(g))continue;let v={x:g.internals.positionAbsolute.x+x,y:g.internals.positionAbsolute.y+w};s&&(v=_a(v,o));const{position:y,positionAbsolute:S}=qw({nodeId:g.id,nextPosition:v,nodeLookup:u,nodeExtent:r,nodeOrigin:d,onError:a});g.position=y,g.internals.positionAbsolute=S,c.set(g.id,g)}l(c)},[])}const cp=j.createContext(null),TI=cp.Provider;cp.Consumer;const R1=()=>j.useContext(cp),LI=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),II=(e,t,n)=>r=>{const{connectionClickStartHandle:s,connectionMode:o,connection:i}=r,{fromHandle:a,toHandle:l,isValid:u}=i,d=(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.id)===t&&(l==null?void 0:l.type)===n;return{connectingFrom:(a==null?void 0:a.nodeId)===e&&(a==null?void 0:a.id)===t&&(a==null?void 0:a.type)===n,connectingTo:d,clickConnecting:(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.id)===t&&(s==null?void 0:s.type)===n,isPossibleEndHandle:o===No.Strict?(a==null?void 0:a.type)!==n:e!==(a==null?void 0:a.nodeId)||t!==(a==null?void 0:a.id),connectionInProcess:!!a,clickConnectionInProcess:!!s,valid:d&&u}};function AI({type:e="source",position:t=ee.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:s=!0,isConnectableEnd:o=!0,id:i,onConnect:a,children:l,className:u,onMouseDown:d,onTouchStart:c,...f},m){var I,A;const p=i||null,x=e==="target",w=Ce(),g=R1(),{connectOnClick:v,noPanClassName:y,rfId:S}=fe(LI,Ee),{connectingFrom:E,connectingTo:b,clickConnecting:_,isPossibleEndHandle:C,connectionInProcess:M,clickConnectionInProcess:L,valid:P}=fe(II(g,p,e),Ee);g||(A=(I=w.getState()).onError)==null||A.call(I,"010",bn.error010());const R=F=>{const{defaultEdgeOptions:N,onConnect:T,hasDefaultEdges:D}=w.getState(),B={...N,...F};if(D){const{edges:H,setEdges:K}=w.getState();K(aL(B,H))}T==null||T(B),a==null||a(B)},$=F=>{if(!g)return;const N=t1(F.nativeEvent);if(s&&(N&&F.button===0||!N)){const T=w.getState();kf.onPointerDown(F.nativeEvent,{handleDomNode:F.currentTarget,autoPanOnConnect:T.autoPanOnConnect,connectionMode:T.connectionMode,connectionRadius:T.connectionRadius,domNode:T.domNode,nodeLookup:T.nodeLookup,lib:T.lib,isTarget:x,handleId:p,nodeId:g,flowId:T.rfId,panBy:T.panBy,cancelConnection:T.cancelConnection,onConnectStart:T.onConnectStart,onConnectEnd:T.onConnectEnd,updateConnection:T.updateConnection,onConnect:R,isValidConnection:n||T.isValidConnection,getTransform:()=>w.getState().transform,getFromHandle:()=>w.getState().connection.fromHandle,autoPanSpeed:T.autoPanSpeed,dragThreshold:T.connectionDragThreshold})}N?d==null||d(F):c==null||c(F)},k=F=>{const{onClickConnectStart:N,onClickConnectEnd:T,connectionClickStartHandle:D,connectionMode:B,isValidConnection:H,lib:K,rfId:V,nodeLookup:X,connection:Q}=w.getState();if(!g||!D&&!s)return;if(!D){N==null||N(F.nativeEvent,{nodeId:g,handleId:p,handleType:e}),w.setState({connectionClickStartHandle:{nodeId:g,type:e,id:p}});return}const Y=Jw(F.target),W=n||H,{connection:Z,isValid:oe}=kf.isValid(F.nativeEvent,{handle:{nodeId:g,id:p,type:e},connectionMode:B,fromNodeId:D.nodeId,fromHandleId:D.id||null,fromType:D.type,isValidConnection:W,flowId:V,doc:Y,lib:K,nodeLookup:X});oe&&Z&&R(Z);const re=structuredClone(Q);delete re.inProgress,re.toPosition=re.toHandle?re.toHandle.position:null,T==null||T(F,re),w.setState({connectionClickStartHandle:null})};return h.jsx("div",{"data-handleid":p,"data-nodeid":g,"data-handlepos":t,"data-id":`${S}-${g}-${p}-${e}`,className:Oe(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",y,u,{source:!x,target:x,connectable:r,connectablestart:s,connectableend:o,clickconnecting:_,connectingfrom:E,connectingto:b,valid:P,connectionindicator:r&&(!M||C)&&(M||L?o:s)}]),onMouseDown:$,onTouchStart:$,onClick:v?k:void 0,ref:m,...f,children:l})}const Mo=j.memo(C1(AI));function OI({data:e,isConnectable:t,sourcePosition:n=ee.Bottom}){return h.jsxs(h.Fragment,{children:[e==null?void 0:e.label,h.jsx(Mo,{type:"source",position:n,isConnectable:t})]})}function FI({data:e,isConnectable:t,targetPosition:n=ee.Top,sourcePosition:r=ee.Bottom}){return h.jsxs(h.Fragment,{children:[h.jsx(Mo,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,h.jsx(Mo,{type:"source",position:r,isConnectable:t})]})}function DI(){return null}function zI({data:e,isConnectable:t,targetPosition:n=ee.Top}){return h.jsxs(h.Fragment,{children:[h.jsx(Mo,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const xu={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},py={input:OI,default:FI,output:zI,group:DI};function $I(e){var t,n,r,s;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((r=e.style)==null?void 0:r.width),height:e.height??((s=e.style)==null?void 0:s.height)}}const BI=e=>{const{width:t,height:n,x:r,y:s}=Sa(e.nodeLookup,{filter:o=>!!o.selected});return{width:en(t)?t:null,height:en(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${s}px)`}};function HI({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=Ce(),{width:s,height:o,transformString:i,userSelectionActive:a}=fe(BI,Ee),l=P1(),u=j.useRef(null);if(j.useEffect(()=>{var f;n||(f=u.current)==null||f.focus({preventScroll:!0})},[n]),k1({nodeRef:u}),a||!s||!o)return null;const d=e?f=>{const m=r.getState().nodes.filter(p=>p.selected);e(f,m)}:void 0,c=f=>{Object.prototype.hasOwnProperty.call(xu,f.key)&&(f.preventDefault(),l({direction:xu[f.key],factor:f.shiftKey?4:1}))};return h.jsx("div",{className:Oe(["react-flow__nodesselection","react-flow__container",t]),style:{transform:i},children:h.jsx("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:d,tabIndex:n?void 0:-1,onKeyDown:n?void 0:c,style:{width:s,height:o}})})}const my=typeof window<"u"?window:void 0,UI=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function j1({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:o,onPaneScroll:i,paneClickDistance:a,deleteKeyCode:l,selectionKeyCode:u,selectionOnDrag:d,selectionMode:c,onSelectionStart:f,onSelectionEnd:m,multiSelectionKeyCode:p,panActivationKeyCode:x,zoomActivationKeyCode:w,elementsSelectable:g,zoomOnScroll:v,zoomOnPinch:y,panOnScroll:S,panOnScrollSpeed:E,panOnScrollMode:b,zoomOnDoubleClick:_,panOnDrag:C,defaultViewport:M,translateExtent:L,minZoom:P,maxZoom:R,preventScrolling:$,onSelectionContextMenu:k,noWheelClassName:I,noPanClassName:A,disableKeyboardA11y:F,onViewportChange:N,isControlledViewport:T}){const{nodesSelectionActive:D,userSelectionActive:B}=fe(UI,Ee),H=ea(u,{target:my}),K=ea(x,{target:my}),V=K||C,X=K||S,Q=d&&V!==!0,Y=H||B||Q;return bI({deleteKeyCode:l,multiSelectionKeyCode:p}),h.jsx(NI,{onPaneContextMenu:o,elementsSelectable:g,zoomOnScroll:v,zoomOnPinch:y,panOnScroll:X,panOnScrollSpeed:E,panOnScrollMode:b,zoomOnDoubleClick:_,panOnDrag:!H&&V,defaultViewport:M,translateExtent:L,minZoom:P,maxZoom:R,zoomActivationKeyCode:w,preventScrolling:$,noWheelClassName:I,noPanClassName:A,onViewportChange:N,isControlledViewport:T,paneClickDistance:a,selectionOnDrag:Q,children:h.jsxs(jI,{onSelectionStart:f,onSelectionEnd:m,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:o,onPaneScroll:i,panOnDrag:V,isSelecting:!!Y,selectionMode:c,selectionKeyPressed:H,paneClickDistance:a,selectionOnDrag:Q,children:[e,D&&h.jsx(HI,{onSelectionContextMenu:k,noPanClassName:A,disableKeyboardA11y:F})]})})}j1.displayName="FlowRenderer";const VI=j.memo(j1),WI=e=>t=>e?tp(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function KI(e){return fe(j.useCallback(WI(e),[e]),Ee)}const qI=e=>e.updateNodeInternals;function QI(){const e=fe(qI),[t]=j.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const r=new Map;n.forEach(s=>{const o=s.target.getAttribute("data-id");r.set(o,{id:o,nodeElement:s.target,force:!0})}),e(r)}));return j.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function GI({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const s=Ce(),o=j.useRef(null),i=j.useRef(null),a=j.useRef(e.sourcePosition),l=j.useRef(e.targetPosition),u=j.useRef(t),d=n&&!!e.internals.handleBounds;return j.useEffect(()=>{o.current&&!e.hidden&&(!d||i.current!==o.current)&&(i.current&&(r==null||r.unobserve(i.current)),r==null||r.observe(o.current),i.current=o.current)},[d,e.hidden]),j.useEffect(()=>()=>{i.current&&(r==null||r.unobserve(i.current),i.current=null)},[]),j.useEffect(()=>{if(o.current){const c=u.current!==t,f=a.current!==e.sourcePosition,m=l.current!==e.targetPosition;(c||f||m)&&(u.current=t,a.current=e.sourcePosition,l.current=e.targetPosition,s.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:o.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),o}function XI({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:s,onContextMenu:o,onDoubleClick:i,nodesDraggable:a,elementsSelectable:l,nodesConnectable:u,nodesFocusable:d,resizeObserver:c,noDragClassName:f,noPanClassName:m,disableKeyboardA11y:p,rfId:x,nodeTypes:w,nodeClickDistance:g,onError:v}){const{node:y,internals:S,isParent:E}=fe(W=>{const Z=W.nodeLookup.get(e),oe=W.parentLookup.has(e);return{node:Z,internals:Z.internals,isParent:oe}},Ee);let b=y.type||"default",_=(w==null?void 0:w[b])||py[b];_===void 0&&(v==null||v("003",bn.error003(b)),b="default",_=(w==null?void 0:w.default)||py.default);const C=!!(y.draggable||a&&typeof y.draggable>"u"),M=!!(y.selectable||l&&typeof y.selectable>"u"),L=!!(y.connectable||u&&typeof y.connectable>"u"),P=!!(y.focusable||d&&typeof y.focusable>"u"),R=Ce(),$=Yw(y),k=GI({node:y,nodeType:b,hasDimensions:$,resizeObserver:c}),I=k1({nodeRef:k,disabled:y.hidden||!C,noDragClassName:f,handleSelector:y.dragHandle,nodeId:e,isSelectable:M,nodeClickDistance:g}),A=P1();if(y.hidden)return null;const F=Vn(y),N=$I(y),T=M||C||t||n||r||s,D=n?W=>n(W,{...S.userNode}):void 0,B=r?W=>r(W,{...S.userNode}):void 0,H=s?W=>s(W,{...S.userNode}):void 0,K=o?W=>o(W,{...S.userNode}):void 0,V=i?W=>i(W,{...S.userNode}):void 0,X=W=>{const{selectNodesOnDrag:Z,nodeDragThreshold:oe}=R.getState();M&&(!Z||!C||oe>0)&&Pf({id:e,store:R,nodeRef:k}),t&&t(W,{...S.userNode})},Q=W=>{if(!(e1(W.nativeEvent)||p)){if(Hw.includes(W.key)&&M){const Z=W.key==="Escape";Pf({id:e,store:R,unselect:Z,nodeRef:k})}else if(C&&y.selected&&Object.prototype.hasOwnProperty.call(xu,W.key)){W.preventDefault();const{ariaLabelConfig:Z}=R.getState();R.setState({ariaLiveMessage:Z["node.a11yDescription.ariaLiveMessage"]({direction:W.key.replace("Arrow","").toLowerCase(),x:~~S.positionAbsolute.x,y:~~S.positionAbsolute.y})}),A({direction:xu[W.key],factor:W.shiftKey?4:1})}}},Y=()=>{var he;if(p||!((he=k.current)!=null&&he.matches(":focus-visible")))return;const{transform:W,width:Z,height:oe,autoPanOnNodeFocus:re,setCenter:J}=R.getState();if(!re)return;tp(new Map([[e,y]]),{x:0,y:0,width:Z,height:oe},W,!0).length>0||J(y.position.x+F.width/2,y.position.y+F.height/2,{zoom:W[2]})};return h.jsx("div",{className:Oe(["react-flow__node",`react-flow__node-${b}`,{[m]:C},y.className,{selected:y.selected,selectable:M,parent:E,draggable:C,dragging:I}]),ref:k,style:{zIndex:S.z,transform:`translate(${S.positionAbsolute.x}px,${S.positionAbsolute.y}px)`,pointerEvents:T?"all":"none",visibility:$?"visible":"hidden",...y.style,...N},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:D,onMouseMove:B,onMouseLeave:H,onContextMenu:K,onClick:X,onDoubleClick:V,onKeyDown:P?Q:void 0,tabIndex:P?0:void 0,onFocus:P?Y:void 0,role:y.ariaRole??(P?"group":void 0),"aria-roledescription":"node","aria-describedby":p?void 0:`${v1}-${x}`,"aria-label":y.ariaLabel,...y.domAttributes,children:h.jsx(TI,{value:e,children:h.jsx(_,{id:e,data:y.data,type:b,positionAbsoluteX:S.positionAbsolute.x,positionAbsoluteY:S.positionAbsolute.y,selected:y.selected??!1,selectable:M,draggable:C,deletable:y.deletable??!0,isConnectable:L,sourcePosition:y.sourcePosition,targetPosition:y.targetPosition,dragging:I,dragHandle:y.dragHandle,zIndex:S.z,parentId:y.parentId,...F})})})}var YI=j.memo(XI);const ZI=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function M1(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:s,onError:o}=fe(ZI,Ee),i=KI(e.onlyRenderVisibleElements),a=QI();return h.jsx("div",{className:"react-flow__nodes",style:ec,children:i.map(l=>h.jsx(YI,{id:l,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:a,nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:s,nodeClickDistance:e.nodeClickDistance,onError:o},l))})}M1.displayName="NodeRenderer";const JI=j.memo(M1);function eA(e){return fe(j.useCallback(n=>{if(!e)return n.edges.map(s=>s.id);const r=[];if(n.width&&n.height)for(const s of n.edges){const o=n.nodeLookup.get(s.source),i=n.nodeLookup.get(s.target);o&&i&&sL({sourceNode:o,targetNode:i,width:n.width,height:n.height,transform:n.transform})&&r.push(s.id)}return r},[e]),Ee)}const tA=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return h.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},nA=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return h.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},gy={[ws.Arrow]:tA,[ws.ArrowClosed]:nA};function rA(e){const t=Ce();return j.useMemo(()=>{var s,o;return Object.prototype.hasOwnProperty.call(gy,e)?gy[e]:((o=(s=t.getState()).onError)==null||o.call(s,"009",bn.error009(e)),null)},[e])}const sA=({id:e,type:t,color:n,width:r=12.5,height:s=12.5,markerUnits:o="strokeWidth",strokeWidth:i,orient:a="auto-start-reverse"})=>{const l=rA(t);return l?h.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${s}`,viewBox:"-10 -10 20 20",markerUnits:o,orient:a,refX:"0",refY:"0",children:h.jsx(l,{color:n,strokeWidth:i})}):null},T1=({defaultColor:e,rfId:t})=>{const n=fe(o=>o.edges),r=fe(o=>o.defaultEdgeOptions),s=j.useMemo(()=>fL(n,{id:t,defaultColor:e,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[n,r,t,e]);return s.length?h.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:h.jsx("defs",{children:s.map(o=>h.jsx(sA,{id:o.id,type:o.type,color:o.color,width:o.width,height:o.height,markerUnits:o.markerUnits,strokeWidth:o.strokeWidth,orient:o.orient},o.id))})}):null};T1.displayName="MarkerDefinitions";var oA=j.memo(T1);function L1({x:e,y:t,label:n,labelStyle:r,labelShowBg:s=!0,labelBgStyle:o,labelBgPadding:i=[2,4],labelBgBorderRadius:a=2,children:l,className:u,...d}){const[c,f]=j.useState({x:1,y:0,width:0,height:0}),m=Oe(["react-flow__edge-textwrapper",u]),p=j.useRef(null);return j.useEffect(()=>{if(p.current){const x=p.current.getBBox();f({x:x.x,y:x.y,width:x.width,height:x.height})}},[n]),n?h.jsxs("g",{transform:`translate(${e-c.width/2} ${t-c.height/2})`,className:m,visibility:c.width?"visible":"hidden",...d,children:[s&&h.jsx("rect",{width:c.width+2*i[0],x:-i[0],y:-i[1],height:c.height+2*i[1],className:"react-flow__edge-textbg",style:o,rx:a,ry:a}),h.jsx("text",{className:"react-flow__edge-text",y:c.height/2,dy:"0.3em",ref:p,style:r,children:n}),l]}):null}L1.displayName="EdgeText";const iA=j.memo(L1);function tc({path:e,labelX:t,labelY:n,label:r,labelStyle:s,labelShowBg:o,labelBgStyle:i,labelBgPadding:a,labelBgBorderRadius:l,interactionWidth:u=20,...d}){return h.jsxs(h.Fragment,{children:[h.jsx("path",{...d,d:e,fill:"none",className:Oe(["react-flow__edge-path",d.className])}),u?h.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,r&&en(t)&&en(n)?h.jsx(iA,{x:t,y:n,label:r,labelStyle:s,labelShowBg:o,labelBgStyle:i,labelBgPadding:a,labelBgBorderRadius:l}):null]})}function yy({pos:e,x1:t,y1:n,x2:r,y2:s}){return e===ee.Left||e===ee.Right?[.5*(t+r),n]:[t,.5*(n+s)]}function I1({sourceX:e,sourceY:t,sourcePosition:n=ee.Bottom,targetX:r,targetY:s,targetPosition:o=ee.Top}){const[i,a]=yy({pos:n,x1:e,y1:t,x2:r,y2:s}),[l,u]=yy({pos:o,x1:r,y1:s,x2:e,y2:t}),[d,c,f,m]=n1({sourceX:e,sourceY:t,targetX:r,targetY:s,sourceControlX:i,sourceControlY:a,targetControlX:l,targetControlY:u});return[`M${e},${t} C${i},${a} ${l},${u} ${r},${s}`,d,c,f,m]}function A1(e){return j.memo(({id:t,sourceX:n,sourceY:r,targetX:s,targetY:o,sourcePosition:i,targetPosition:a,label:l,labelStyle:u,labelShowBg:d,labelBgStyle:c,labelBgPadding:f,labelBgBorderRadius:m,style:p,markerEnd:x,markerStart:w,interactionWidth:g})=>{const[v,y,S]=I1({sourceX:n,sourceY:r,sourcePosition:i,targetX:s,targetY:o,targetPosition:a}),E=e.isInternal?void 0:t;return h.jsx(tc,{id:E,path:v,labelX:y,labelY:S,label:l,labelStyle:u,labelShowBg:d,labelBgStyle:c,labelBgPadding:f,labelBgBorderRadius:m,style:p,markerEnd:x,markerStart:w,interactionWidth:g})})}const aA=A1({isInternal:!1}),O1=A1({isInternal:!0});aA.displayName="SimpleBezierEdge";O1.displayName="SimpleBezierEdgeInternal";function F1(e){return j.memo(({id:t,sourceX:n,sourceY:r,targetX:s,targetY:o,label:i,labelStyle:a,labelShowBg:l,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:c,style:f,sourcePosition:m=ee.Bottom,targetPosition:p=ee.Top,markerEnd:x,markerStart:w,pathOptions:g,interactionWidth:v})=>{const[y,S,E]=Ef({sourceX:n,sourceY:r,sourcePosition:m,targetX:s,targetY:o,targetPosition:p,borderRadius:g==null?void 0:g.borderRadius,offset:g==null?void 0:g.offset,stepPosition:g==null?void 0:g.stepPosition}),b=e.isInternal?void 0:t;return h.jsx(tc,{id:b,path:y,labelX:S,labelY:E,label:i,labelStyle:a,labelShowBg:l,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:c,style:f,markerEnd:x,markerStart:w,interactionWidth:v})})}const D1=F1({isInternal:!1}),z1=F1({isInternal:!0});D1.displayName="SmoothStepEdge";z1.displayName="SmoothStepEdgeInternal";function $1(e){return j.memo(({id:t,...n})=>{var s;const r=e.isInternal?void 0:t;return h.jsx(D1,{...n,id:r,pathOptions:j.useMemo(()=>{var o;return{borderRadius:0,offset:(o=n.pathOptions)==null?void 0:o.offset}},[(s=n.pathOptions)==null?void 0:s.offset])})})}const lA=$1({isInternal:!1}),B1=$1({isInternal:!0});lA.displayName="StepEdge";B1.displayName="StepEdgeInternal";function H1(e){return j.memo(({id:t,sourceX:n,sourceY:r,targetX:s,targetY:o,label:i,labelStyle:a,labelShowBg:l,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:c,style:f,markerEnd:m,markerStart:p,interactionWidth:x})=>{const[w,g,v]=o1({sourceX:n,sourceY:r,targetX:s,targetY:o}),y=e.isInternal?void 0:t;return h.jsx(tc,{id:y,path:w,labelX:g,labelY:v,label:i,labelStyle:a,labelShowBg:l,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:c,style:f,markerEnd:m,markerStart:p,interactionWidth:x})})}const uA=H1({isInternal:!1}),U1=H1({isInternal:!0});uA.displayName="StraightEdge";U1.displayName="StraightEdgeInternal";function V1(e){return j.memo(({id:t,sourceX:n,sourceY:r,targetX:s,targetY:o,sourcePosition:i=ee.Bottom,targetPosition:a=ee.Top,label:l,labelStyle:u,labelShowBg:d,labelBgStyle:c,labelBgPadding:f,labelBgBorderRadius:m,style:p,markerEnd:x,markerStart:w,pathOptions:g,interactionWidth:v})=>{const[y,S,E]=r1({sourceX:n,sourceY:r,sourcePosition:i,targetX:s,targetY:o,targetPosition:a,curvature:g==null?void 0:g.curvature}),b=e.isInternal?void 0:t;return h.jsx(tc,{id:b,path:y,labelX:S,labelY:E,label:l,labelStyle:u,labelShowBg:d,labelBgStyle:c,labelBgPadding:f,labelBgBorderRadius:m,style:p,markerEnd:x,markerStart:w,interactionWidth:v})})}const cA=V1({isInternal:!1}),W1=V1({isInternal:!0});cA.displayName="BezierEdge";W1.displayName="BezierEdgeInternal";const xy={default:W1,straight:U1,step:B1,smoothstep:z1,simplebezier:O1},vy={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},dA=(e,t,n)=>n===ee.Left?e-t:n===ee.Right?e+t:e,fA=(e,t,n)=>n===ee.Top?e-t:n===ee.Bottom?e+t:e,wy="react-flow__edgeupdater";function Sy({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:s,onMouseEnter:o,onMouseOut:i,type:a}){return h.jsx("circle",{onMouseDown:s,onMouseEnter:o,onMouseOut:i,className:Oe([wy,`${wy}-${a}`]),cx:dA(t,r,e),cy:fA(n,r,e),r,stroke:"transparent",fill:"transparent"})}function hA({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:s,targetX:o,targetY:i,sourcePosition:a,targetPosition:l,onReconnect:u,onReconnectStart:d,onReconnectEnd:c,setReconnecting:f,setUpdateHover:m}){const p=Ce(),x=(S,E)=>{if(S.button!==0)return;const{autoPanOnConnect:b,domNode:_,isValidConnection:C,connectionMode:M,connectionRadius:L,lib:P,onConnectStart:R,onConnectEnd:$,cancelConnection:k,nodeLookup:I,rfId:A,panBy:F,updateConnection:N}=p.getState(),T=E.type==="target",D=(K,V)=>{f(!1),c==null||c(K,n,E.type,V)},B=K=>u==null?void 0:u(n,K),H=(K,V)=>{f(!0),d==null||d(S,n,E.type),R==null||R(K,V)};kf.onPointerDown(S.nativeEvent,{autoPanOnConnect:b,connectionMode:M,connectionRadius:L,domNode:_,handleId:E.id,nodeId:E.nodeId,nodeLookup:I,isTarget:T,edgeUpdaterType:E.type,lib:P,flowId:A,cancelConnection:k,panBy:F,isValidConnection:C,onConnect:B,onConnectStart:H,onConnectEnd:$,onReconnectEnd:D,updateConnection:N,getTransform:()=>p.getState().transform,getFromHandle:()=>p.getState().connection.fromHandle,dragThreshold:p.getState().connectionDragThreshold,handleDomNode:S.currentTarget})},w=S=>x(S,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),g=S=>x(S,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),v=()=>m(!0),y=()=>m(!1);return h.jsxs(h.Fragment,{children:[(e===!0||e==="source")&&h.jsx(Sy,{position:a,centerX:r,centerY:s,radius:t,onMouseDown:w,onMouseEnter:v,onMouseOut:y,type:"source"}),(e===!0||e==="target")&&h.jsx(Sy,{position:l,centerX:o,centerY:i,radius:t,onMouseDown:g,onMouseEnter:v,onMouseOut:y,type:"target"})]})}function pA({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:s,onDoubleClick:o,onContextMenu:i,onMouseEnter:a,onMouseMove:l,onMouseLeave:u,reconnectRadius:d,onReconnect:c,onReconnectStart:f,onReconnectEnd:m,rfId:p,edgeTypes:x,noPanClassName:w,onError:g,disableKeyboardA11y:v}){let y=fe(J=>J.edgeLookup.get(e));const S=fe(J=>J.defaultEdgeOptions);y=S?{...S,...y}:y;let E=y.type||"default",b=(x==null?void 0:x[E])||xy[E];b===void 0&&(g==null||g("011",bn.error011(E)),E="default",b=(x==null?void 0:x.default)||xy.default);const _=!!(y.focusable||t&&typeof y.focusable>"u"),C=typeof c<"u"&&(y.reconnectable||n&&typeof y.reconnectable>"u"),M=!!(y.selectable||r&&typeof y.selectable>"u"),L=j.useRef(null),[P,R]=j.useState(!1),[$,k]=j.useState(!1),I=Ce(),{zIndex:A,sourceX:F,sourceY:N,targetX:T,targetY:D,sourcePosition:B,targetPosition:H}=fe(j.useCallback(J=>{const te=J.nodeLookup.get(y.source),he=J.nodeLookup.get(y.target);if(!te||!he)return{zIndex:y.zIndex,...vy};const ye=dL({id:e,sourceNode:te,targetNode:he,sourceHandle:y.sourceHandle||null,targetHandle:y.targetHandle||null,connectionMode:J.connectionMode,onError:g});return{zIndex:rL({selected:y.selected,zIndex:y.zIndex,sourceNode:te,targetNode:he,elevateOnSelect:J.elevateEdgesOnSelect,zIndexMode:J.zIndexMode}),...ye||vy}},[y.source,y.target,y.sourceHandle,y.targetHandle,y.selected,y.zIndex]),Ee),K=j.useMemo(()=>y.markerStart?`url('#${Cf(y.markerStart,p)}')`:void 0,[y.markerStart,p]),V=j.useMemo(()=>y.markerEnd?`url('#${Cf(y.markerEnd,p)}')`:void 0,[y.markerEnd,p]);if(y.hidden||F===null||N===null||T===null||D===null)return null;const X=J=>{var ce;const{addSelectedEdges:te,unselectNodesAndEdges:he,multiSelectionActive:ye}=I.getState();M&&(I.setState({nodesSelectionActive:!1}),y.selected&&ye?(he({nodes:[],edges:[y]}),(ce=L.current)==null||ce.blur()):te([e])),s&&s(J,y)},Q=o?J=>{o(J,{...y})}:void 0,Y=i?J=>{i(J,{...y})}:void 0,W=a?J=>{a(J,{...y})}:void 0,Z=l?J=>{l(J,{...y})}:void 0,oe=u?J=>{u(J,{...y})}:void 0,re=J=>{var te;if(!v&&Hw.includes(J.key)&&M){const{unselectNodesAndEdges:he,addSelectedEdges:ye}=I.getState();J.key==="Escape"?((te=L.current)==null||te.blur(),he({edges:[y]})):ye([e])}};return h.jsx("svg",{style:{zIndex:A},children:h.jsxs("g",{className:Oe(["react-flow__edge",`react-flow__edge-${E}`,y.className,w,{selected:y.selected,animated:y.animated,inactive:!M&&!s,updating:P,selectable:M}]),onClick:X,onDoubleClick:Q,onContextMenu:Y,onMouseEnter:W,onMouseMove:Z,onMouseLeave:oe,onKeyDown:_?re:void 0,tabIndex:_?0:void 0,role:y.ariaRole??(_?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":y.ariaLabel===null?void 0:y.ariaLabel||`Edge from ${y.source} to ${y.target}`,"aria-describedby":_?`${w1}-${p}`:void 0,ref:L,...y.domAttributes,children:[!$&&h.jsx(b,{id:e,source:y.source,target:y.target,type:y.type,selected:y.selected,animated:y.animated,selectable:M,deletable:y.deletable??!0,label:y.label,labelStyle:y.labelStyle,labelShowBg:y.labelShowBg,labelBgStyle:y.labelBgStyle,labelBgPadding:y.labelBgPadding,labelBgBorderRadius:y.labelBgBorderRadius,sourceX:F,sourceY:N,targetX:T,targetY:D,sourcePosition:B,targetPosition:H,data:y.data,style:y.style,sourceHandleId:y.sourceHandle,targetHandleId:y.targetHandle,markerStart:K,markerEnd:V,pathOptions:"pathOptions"in y?y.pathOptions:void 0,interactionWidth:y.interactionWidth}),C&&h.jsx(hA,{edge:y,isReconnectable:C,reconnectRadius:d,onReconnect:c,onReconnectStart:f,onReconnectEnd:m,sourceX:F,sourceY:N,targetX:T,targetY:D,sourcePosition:B,targetPosition:H,setUpdateHover:R,setReconnecting:k})]})})}var mA=j.memo(pA);const gA=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function K1({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:s,onReconnect:o,onEdgeContextMenu:i,onEdgeMouseEnter:a,onEdgeMouseMove:l,onEdgeMouseLeave:u,onEdgeClick:d,reconnectRadius:c,onEdgeDoubleClick:f,onReconnectStart:m,onReconnectEnd:p,disableKeyboardA11y:x}){const{edgesFocusable:w,edgesReconnectable:g,elementsSelectable:v,onError:y}=fe(gA,Ee),S=eA(t);return h.jsxs("div",{className:"react-flow__edges",children:[h.jsx(oA,{defaultColor:e,rfId:n}),S.map(E=>h.jsx(mA,{id:E,edgesFocusable:w,edgesReconnectable:g,elementsSelectable:v,noPanClassName:s,onReconnect:o,onContextMenu:i,onMouseEnter:a,onMouseMove:l,onMouseLeave:u,onClick:d,reconnectRadius:c,onDoubleClick:f,onReconnectStart:m,onReconnectEnd:p,rfId:n,onError:y,edgeTypes:r,disableKeyboardA11y:x},E))]})}K1.displayName="EdgeRenderer";const yA=j.memo(K1),xA=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function vA({children:e}){const t=fe(xA);return h.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function wA(e){const t=up(),n=j.useRef(!1);j.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const SA=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function _A(e){const t=fe(SA),n=Ce();return j.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function bA(e){return e.connection.inProgress?{...e.connection,to:ba(e.connection.to,e.transform)}:{...e.connection}}function EA(e){return bA}function CA(e){const t=EA();return fe(t,Ee)}const NA=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function kA({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:s,width:o,height:i,isValid:a,inProgress:l}=fe(NA,Ee);return!(o&&s&&l)?null:h.jsx("svg",{style:e,width:o,height:i,className:"react-flow__connectionline react-flow__container",children:h.jsx("g",{className:Oe(["react-flow__connection",Ww(a)]),children:h.jsx(q1,{style:t,type:n,CustomComponent:r,isValid:a})})})}const q1=({style:e,type:t=rr.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:s,from:o,fromNode:i,fromHandle:a,fromPosition:l,to:u,toNode:d,toHandle:c,toPosition:f,pointer:m}=CA();if(!s)return;if(n)return h.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:i,fromHandle:a,fromX:o.x,fromY:o.y,toX:u.x,toY:u.y,fromPosition:l,toPosition:f,connectionStatus:Ww(r),toNode:d,toHandle:c,pointer:m});let p="";const x={sourceX:o.x,sourceY:o.y,sourcePosition:l,targetX:u.x,targetY:u.y,targetPosition:f};switch(t){case rr.Bezier:[p]=r1(x);break;case rr.SimpleBezier:[p]=I1(x);break;case rr.Step:[p]=Ef({...x,borderRadius:0});break;case rr.SmoothStep:[p]=Ef(x);break;default:[p]=o1(x)}return h.jsx("path",{d:p,fill:"none",className:"react-flow__connection-path",style:e})};q1.displayName="ConnectionLine";const PA={};function _y(e=PA){j.useRef(e),Ce(),j.useEffect(()=>{},[e])}function RA(){Ce(),j.useRef(!1),j.useEffect(()=>{},[])}function Q1({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:s,onNodeDoubleClick:o,onEdgeDoubleClick:i,onNodeMouseEnter:a,onNodeMouseMove:l,onNodeMouseLeave:u,onNodeContextMenu:d,onSelectionContextMenu:c,onSelectionStart:f,onSelectionEnd:m,connectionLineType:p,connectionLineStyle:x,connectionLineComponent:w,connectionLineContainerStyle:g,selectionKeyCode:v,selectionOnDrag:y,selectionMode:S,multiSelectionKeyCode:E,panActivationKeyCode:b,zoomActivationKeyCode:_,deleteKeyCode:C,onlyRenderVisibleElements:M,elementsSelectable:L,defaultViewport:P,translateExtent:R,minZoom:$,maxZoom:k,preventScrolling:I,defaultMarkerColor:A,zoomOnScroll:F,zoomOnPinch:N,panOnScroll:T,panOnScrollSpeed:D,panOnScrollMode:B,zoomOnDoubleClick:H,panOnDrag:K,onPaneClick:V,onPaneMouseEnter:X,onPaneMouseMove:Q,onPaneMouseLeave:Y,onPaneScroll:W,onPaneContextMenu:Z,paneClickDistance:oe,nodeClickDistance:re,onEdgeContextMenu:J,onEdgeMouseEnter:te,onEdgeMouseMove:he,onEdgeMouseLeave:ye,reconnectRadius:ce,onReconnect:$e,onReconnectStart:un,onReconnectEnd:dt,noDragClassName:At,noWheelClassName:Wn,noPanClassName:Kn,disableKeyboardA11y:de,nodeExtent:Le,rfId:Ye,viewport:Cn,onViewportChange:$o}){return _y(e),_y(t),RA(),wA(n),_A(Cn),h.jsx(VI,{onPaneClick:V,onPaneMouseEnter:X,onPaneMouseMove:Q,onPaneMouseLeave:Y,onPaneContextMenu:Z,onPaneScroll:W,paneClickDistance:oe,deleteKeyCode:C,selectionKeyCode:v,selectionOnDrag:y,selectionMode:S,onSelectionStart:f,onSelectionEnd:m,multiSelectionKeyCode:E,panActivationKeyCode:b,zoomActivationKeyCode:_,elementsSelectable:L,zoomOnScroll:F,zoomOnPinch:N,zoomOnDoubleClick:H,panOnScroll:T,panOnScrollSpeed:D,panOnScrollMode:B,panOnDrag:K,defaultViewport:P,translateExtent:R,minZoom:$,maxZoom:k,onSelectionContextMenu:c,preventScrolling:I,noDragClassName:At,noWheelClassName:Wn,noPanClassName:Kn,disableKeyboardA11y:de,onViewportChange:$o,isControlledViewport:!!Cn,children:h.jsxs(vA,{children:[h.jsx(yA,{edgeTypes:t,onEdgeClick:s,onEdgeDoubleClick:i,onReconnect:$e,onReconnectStart:un,onReconnectEnd:dt,onlyRenderVisibleElements:M,onEdgeContextMenu:J,onEdgeMouseEnter:te,onEdgeMouseMove:he,onEdgeMouseLeave:ye,reconnectRadius:ce,defaultMarkerColor:A,noPanClassName:Kn,disableKeyboardA11y:de,rfId:Ye}),h.jsx(kA,{style:x,type:p,component:w,containerStyle:g}),h.jsx("div",{className:"react-flow__edgelabel-renderer"}),h.jsx(JI,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:o,onNodeMouseEnter:a,onNodeMouseMove:l,onNodeMouseLeave:u,onNodeContextMenu:d,nodeClickDistance:re,onlyRenderVisibleElements:M,noPanClassName:Kn,noDragClassName:At,disableKeyboardA11y:de,nodeExtent:Le,rfId:Ye}),h.jsx("div",{className:"react-flow__viewport-portal"})]})})}Q1.displayName="GraphView";const jA=j.memo(Q1),by=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:s,height:o,fitView:i,fitViewOptions:a,minZoom:l=.5,maxZoom:u=2,nodeOrigin:d,nodeExtent:c,zIndexMode:f="basic"}={})=>{const m=new Map,p=new Map,x=new Map,w=new Map,g=r??t??[],v=n??e??[],y=d??[0,0],S=c??Xi;l1(x,w,g);const E=Nf(v,m,p,{nodeOrigin:y,nodeExtent:S,zIndexMode:f});let b=[0,0,1];if(i&&s&&o){const _=Sa(m,{filter:P=>!!((P.width||P.initialWidth)&&(P.height||P.initialHeight))}),{x:C,y:M,zoom:L}=np(_,s,o,l,u,(a==null?void 0:a.padding)??.1);b=[C,M,L]}return{rfId:"1",width:s??0,height:o??0,transform:b,nodes:v,nodesInitialized:E,nodeLookup:m,parentLookup:p,edges:g,edgeLookup:w,connectionLookup:x,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:l,maxZoom:u,translateExtent:Xi,nodeExtent:S,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:No.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:y,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:i??!1,fitViewOptions:a,fitViewResolver:null,connection:{...Vw},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:YT,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:Uw,zIndexMode:f,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},MA=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:s,height:o,fitView:i,fitViewOptions:a,minZoom:l,maxZoom:u,nodeOrigin:d,nodeExtent:c,zIndexMode:f})=>GL((m,p)=>{async function x(){const{nodeLookup:w,panZoom:g,fitViewOptions:v,fitViewResolver:y,width:S,height:E,minZoom:b,maxZoom:_}=p();g&&(await GT({nodes:w,width:S,height:E,panZoom:g,minZoom:b,maxZoom:_},v),y==null||y.resolve(!0),m({fitViewResolver:null}))}return{...by({nodes:e,edges:t,width:s,height:o,fitView:i,fitViewOptions:a,minZoom:l,maxZoom:u,nodeOrigin:d,nodeExtent:c,defaultNodes:n,defaultEdges:r,zIndexMode:f}),setNodes:w=>{const{nodeLookup:g,parentLookup:v,nodeOrigin:y,elevateNodesOnSelect:S,fitViewQueued:E,zIndexMode:b}=p(),_=Nf(w,g,v,{nodeOrigin:y,nodeExtent:c,elevateNodesOnSelect:S,checkEquality:!0,zIndexMode:b});E&&_?(x(),m({nodes:w,nodesInitialized:_,fitViewQueued:!1,fitViewOptions:void 0})):m({nodes:w,nodesInitialized:_})},setEdges:w=>{const{connectionLookup:g,edgeLookup:v}=p();l1(g,v,w),m({edges:w})},setDefaultNodesAndEdges:(w,g)=>{if(w){const{setNodes:v}=p();v(w),m({hasDefaultNodes:!0})}if(g){const{setEdges:v}=p();v(g),m({hasDefaultEdges:!0})}},updateNodeInternals:w=>{const{triggerNodeChanges:g,nodeLookup:v,parentLookup:y,domNode:S,nodeOrigin:E,nodeExtent:b,debug:_,fitViewQueued:C,zIndexMode:M}=p(),{changes:L,updatedInternals:P}=vL(w,v,y,S,E,b,M);P&&(mL(v,y,{nodeOrigin:E,nodeExtent:b,zIndexMode:M}),C?(x(),m({fitViewQueued:!1,fitViewOptions:void 0})):m({}),(L==null?void 0:L.length)>0&&(_&&console.log("React Flow: trigger node changes",L),g==null||g(L)))},updateNodePositions:(w,g=!1)=>{const v=[];let y=[];const{nodeLookup:S,triggerNodeChanges:E,connection:b,updateConnection:_,onNodesChangeMiddlewareMap:C}=p();for(const[M,L]of w){const P=S.get(M),R=!!(P!=null&&P.expandParent&&(P!=null&&P.parentId)&&(L!=null&&L.position)),$={id:M,type:"position",position:R?{x:Math.max(0,L.position.x),y:Math.max(0,L.position.y)}:L.position,dragging:g};if(P&&b.inProgress&&b.fromNode.id===P.id){const k=_s(P,b.fromHandle,ee.Left,!0);_({...b,from:k})}R&&P.parentId&&v.push({id:M,parentId:P.parentId,rect:{...L.internals.positionAbsolute,width:L.measured.width??0,height:L.measured.height??0}}),y.push($)}if(v.length>0){const{parentLookup:M,nodeOrigin:L}=p(),P=lp(v,S,M,L);y.push(...P)}for(const M of C.values())y=M(y);E(y)},triggerNodeChanges:w=>{const{onNodesChange:g,setNodes:v,nodes:y,hasDefaultNodes:S,debug:E}=p();if(w!=null&&w.length){if(S){const b=b1(w,y);v(b)}E&&console.log("React Flow: trigger node changes",w),g==null||g(w)}},triggerEdgeChanges:w=>{const{onEdgesChange:g,setEdges:v,edges:y,hasDefaultEdges:S,debug:E}=p();if(w!=null&&w.length){if(S){const b=E1(w,y);v(b)}E&&console.log("React Flow: trigger edge changes",w),g==null||g(w)}},addSelectedNodes:w=>{const{multiSelectionActive:g,edgeLookup:v,nodeLookup:y,triggerNodeChanges:S,triggerEdgeChanges:E}=p();if(g){const b=w.map(_=>Or(_,!0));S(b);return}S(Hs(y,new Set([...w]),!0)),E(Hs(v))},addSelectedEdges:w=>{const{multiSelectionActive:g,edgeLookup:v,nodeLookup:y,triggerNodeChanges:S,triggerEdgeChanges:E}=p();if(g){const b=w.map(_=>Or(_,!0));E(b);return}E(Hs(v,new Set([...w]))),S(Hs(y,new Set,!0))},unselectNodesAndEdges:({nodes:w,edges:g}={})=>{const{edges:v,nodes:y,nodeLookup:S,triggerNodeChanges:E,triggerEdgeChanges:b}=p(),_=w||y,C=g||v,M=_.map(P=>{const R=S.get(P.id);return R&&(R.selected=!1),Or(P.id,!1)}),L=C.map(P=>Or(P.id,!1));E(M),b(L)},setMinZoom:w=>{const{panZoom:g,maxZoom:v}=p();g==null||g.setScaleExtent([w,v]),m({minZoom:w})},setMaxZoom:w=>{const{panZoom:g,minZoom:v}=p();g==null||g.setScaleExtent([v,w]),m({maxZoom:w})},setTranslateExtent:w=>{var g;(g=p().panZoom)==null||g.setTranslateExtent(w),m({translateExtent:w})},resetSelectedElements:()=>{const{edges:w,nodes:g,triggerNodeChanges:v,triggerEdgeChanges:y,elementsSelectable:S}=p();if(!S)return;const E=g.reduce((_,C)=>C.selected?[..._,Or(C.id,!1)]:_,[]),b=w.reduce((_,C)=>C.selected?[..._,Or(C.id,!1)]:_,[]);v(E),y(b)},setNodeExtent:w=>{const{nodes:g,nodeLookup:v,parentLookup:y,nodeOrigin:S,elevateNodesOnSelect:E,nodeExtent:b,zIndexMode:_}=p();w[0][0]===b[0][0]&&w[0][1]===b[0][1]&&w[1][0]===b[1][0]&&w[1][1]===b[1][1]||(Nf(g,v,y,{nodeOrigin:S,nodeExtent:w,elevateNodesOnSelect:E,checkEquality:!1,zIndexMode:_}),m({nodeExtent:w}))},panBy:w=>{const{transform:g,width:v,height:y,panZoom:S,translateExtent:E}=p();return wL({delta:w,panZoom:S,transform:g,translateExtent:E,width:v,height:y})},setCenter:async(w,g,v)=>{const{width:y,height:S,maxZoom:E,panZoom:b}=p();if(!b)return Promise.resolve(!1);const _=typeof(v==null?void 0:v.zoom)<"u"?v.zoom:E;return await b.setViewport({x:y/2-w*_,y:S/2-g*_,zoom:_},{duration:v==null?void 0:v.duration,ease:v==null?void 0:v.ease,interpolate:v==null?void 0:v.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{m({connection:{...Vw}})},updateConnection:w=>{m({connection:w})},reset:()=>m({...by()})}},Object.is);function TA({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:s,initialHeight:o,initialMinZoom:i,initialMaxZoom:a,initialFitViewOptions:l,fitView:u,nodeOrigin:d,nodeExtent:c,zIndexMode:f,children:m}){const[p]=j.useState(()=>MA({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:s,height:o,fitView:u,minZoom:i,maxZoom:a,fitViewOptions:l,nodeOrigin:d,nodeExtent:c,zIndexMode:f}));return h.jsx(XL,{value:p,children:h.jsx(vI,{children:m})})}function LA({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:s,width:o,height:i,fitView:a,fitViewOptions:l,minZoom:u,maxZoom:d,nodeOrigin:c,nodeExtent:f,zIndexMode:m}){return j.useContext(Ju)?h.jsx(h.Fragment,{children:e}):h.jsx(TA,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:s,initialWidth:o,initialHeight:i,fitView:a,initialFitViewOptions:l,initialMinZoom:u,initialMaxZoom:d,nodeOrigin:c,nodeExtent:f,zIndexMode:m,children:e})}const IA={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function AA({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:s,nodeTypes:o,edgeTypes:i,onNodeClick:a,onEdgeClick:l,onInit:u,onMove:d,onMoveStart:c,onMoveEnd:f,onConnect:m,onConnectStart:p,onConnectEnd:x,onClickConnectStart:w,onClickConnectEnd:g,onNodeMouseEnter:v,onNodeMouseMove:y,onNodeMouseLeave:S,onNodeContextMenu:E,onNodeDoubleClick:b,onNodeDragStart:_,onNodeDrag:C,onNodeDragStop:M,onNodesDelete:L,onEdgesDelete:P,onDelete:R,onSelectionChange:$,onSelectionDragStart:k,onSelectionDrag:I,onSelectionDragStop:A,onSelectionContextMenu:F,onSelectionStart:N,onSelectionEnd:T,onBeforeDelete:D,connectionMode:B,connectionLineType:H=rr.Bezier,connectionLineStyle:K,connectionLineComponent:V,connectionLineContainerStyle:X,deleteKeyCode:Q="Backspace",selectionKeyCode:Y="Shift",selectionOnDrag:W=!1,selectionMode:Z=Yi.Full,panActivationKeyCode:oe="Space",multiSelectionKeyCode:re=Ji()?"Meta":"Control",zoomActivationKeyCode:J=Ji()?"Meta":"Control",snapToGrid:te,snapGrid:he,onlyRenderVisibleElements:ye=!1,selectNodesOnDrag:ce,nodesDraggable:$e,autoPanOnNodeFocus:un,nodesConnectable:dt,nodesFocusable:At,nodeOrigin:Wn=S1,edgesFocusable:Kn,edgesReconnectable:de,elementsSelectable:Le=!0,defaultViewport:Ye=uI,minZoom:Cn=.5,maxZoom:$o=2,translateExtent:dp=Xi,preventScrolling:J1=!0,nodeExtent:nc,defaultMarkerColor:eS="#b1b1b7",zoomOnScroll:tS=!0,zoomOnPinch:nS=!0,panOnScroll:rS=!1,panOnScrollSpeed:sS=.5,panOnScrollMode:oS=as.Free,zoomOnDoubleClick:iS=!0,panOnDrag:aS=!0,onPaneClick:lS,onPaneMouseEnter:uS,onPaneMouseMove:cS,onPaneMouseLeave:dS,onPaneScroll:fS,onPaneContextMenu:hS,paneClickDistance:pS=1,nodeClickDistance:mS=0,children:gS,onReconnect:yS,onReconnectStart:xS,onReconnectEnd:vS,onEdgeContextMenu:wS,onEdgeDoubleClick:SS,onEdgeMouseEnter:_S,onEdgeMouseMove:bS,onEdgeMouseLeave:ES,reconnectRadius:CS=10,onNodesChange:NS,onEdgesChange:kS,noDragClassName:PS="nodrag",noWheelClassName:RS="nowheel",noPanClassName:fp="nopan",fitView:hp,fitViewOptions:pp,connectOnClick:jS,attributionPosition:MS,proOptions:TS,defaultEdgeOptions:LS,elevateNodesOnSelect:IS=!0,elevateEdgesOnSelect:AS=!1,disableKeyboardA11y:mp=!1,autoPanOnConnect:OS,autoPanOnNodeDrag:FS,autoPanSpeed:DS,connectionRadius:zS,isValidConnection:$S,onError:BS,style:HS,id:gp,nodeDragThreshold:US,connectionDragThreshold:VS,viewport:WS,onViewportChange:KS,width:qS,height:QS,colorMode:GS="light",debug:XS,onScroll:Ca,ariaLabelConfig:YS,zIndexMode:yp="basic",...ZS},JS){const rc=gp||"1",e_=hI(GS),t_=j.useCallback(xp=>{xp.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Ca==null||Ca(xp)},[Ca]);return h.jsx("div",{"data-testid":"rf__wrapper",...ZS,onScroll:t_,style:{...HS,...IA},ref:JS,className:Oe(["react-flow",s,e_]),id:gp,role:"application",children:h.jsxs(LA,{nodes:e,edges:t,width:qS,height:QS,fitView:hp,fitViewOptions:pp,minZoom:Cn,maxZoom:$o,nodeOrigin:Wn,nodeExtent:nc,zIndexMode:yp,children:[h.jsx(jA,{onInit:u,onNodeClick:a,onEdgeClick:l,onNodeMouseEnter:v,onNodeMouseMove:y,onNodeMouseLeave:S,onNodeContextMenu:E,onNodeDoubleClick:b,nodeTypes:o,edgeTypes:i,connectionLineType:H,connectionLineStyle:K,connectionLineComponent:V,connectionLineContainerStyle:X,selectionKeyCode:Y,selectionOnDrag:W,selectionMode:Z,deleteKeyCode:Q,multiSelectionKeyCode:re,panActivationKeyCode:oe,zoomActivationKeyCode:J,onlyRenderVisibleElements:ye,defaultViewport:Ye,translateExtent:dp,minZoom:Cn,maxZoom:$o,preventScrolling:J1,zoomOnScroll:tS,zoomOnPinch:nS,zoomOnDoubleClick:iS,panOnScroll:rS,panOnScrollSpeed:sS,panOnScrollMode:oS,panOnDrag:aS,onPaneClick:lS,onPaneMouseEnter:uS,onPaneMouseMove:cS,onPaneMouseLeave:dS,onPaneScroll:fS,onPaneContextMenu:hS,paneClickDistance:pS,nodeClickDistance:mS,onSelectionContextMenu:F,onSelectionStart:N,onSelectionEnd:T,onReconnect:yS,onReconnectStart:xS,onReconnectEnd:vS,onEdgeContextMenu:wS,onEdgeDoubleClick:SS,onEdgeMouseEnter:_S,onEdgeMouseMove:bS,onEdgeMouseLeave:ES,reconnectRadius:CS,defaultMarkerColor:eS,noDragClassName:PS,noWheelClassName:RS,noPanClassName:fp,rfId:rc,disableKeyboardA11y:mp,nodeExtent:nc,viewport:WS,onViewportChange:KS}),h.jsx(fI,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:m,onConnectStart:p,onConnectEnd:x,onClickConnectStart:w,onClickConnectEnd:g,nodesDraggable:$e,autoPanOnNodeFocus:un,nodesConnectable:dt,nodesFocusable:At,edgesFocusable:Kn,edgesReconnectable:de,elementsSelectable:Le,elevateNodesOnSelect:IS,elevateEdgesOnSelect:AS,minZoom:Cn,maxZoom:$o,nodeExtent:nc,onNodesChange:NS,onEdgesChange:kS,snapToGrid:te,snapGrid:he,connectionMode:B,translateExtent:dp,connectOnClick:jS,defaultEdgeOptions:LS,fitView:hp,fitViewOptions:pp,onNodesDelete:L,onEdgesDelete:P,onDelete:R,onNodeDragStart:_,onNodeDrag:C,onNodeDragStop:M,onSelectionDrag:I,onSelectionDragStart:k,onSelectionDragStop:A,onMove:d,onMoveStart:c,onMoveEnd:f,noPanClassName:fp,nodeOrigin:Wn,rfId:rc,autoPanOnConnect:OS,autoPanOnNodeDrag:FS,autoPanSpeed:DS,onError:BS,connectionRadius:zS,isValidConnection:$S,selectNodesOnDrag:ce,nodeDragThreshold:US,connectionDragThreshold:VS,onBeforeDelete:D,debug:XS,ariaLabelConfig:YS,zIndexMode:yp}),h.jsx(lI,{onSelectionChange:$}),gS,h.jsx(rI,{proOptions:TS,position:MS}),h.jsx(nI,{rfId:rc,disableKeyboardA11y:mp})]})})}var OA=C1(AA);function FA(e){const[t,n]=j.useState(e),r=j.useCallback(s=>n(o=>b1(s,o)),[]);return[t,n,r]}function DA(e){const[t,n]=j.useState(e),r=j.useCallback(s=>n(o=>E1(s,o)),[]);return[t,n,r]}function zA({dimensions:e,lineWidth:t,variant:n,className:r}){return h.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Oe(["react-flow__background-pattern",n,r])})}function $A({radius:e,className:t}){return h.jsx("circle",{cx:e,cy:e,r:e,className:Oe(["react-flow__background-pattern","dots",t])})}var kr;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(kr||(kr={}));const BA={[kr.Dots]:1,[kr.Lines]:1,[kr.Cross]:6},HA=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function G1({id:e,variant:t=kr.Dots,gap:n=20,size:r,lineWidth:s=1,offset:o=0,color:i,bgColor:a,style:l,className:u,patternClassName:d}){const c=j.useRef(null),{transform:f,patternId:m}=fe(HA,Ee),p=r||BA[t],x=t===kr.Dots,w=t===kr.Cross,g=Array.isArray(n)?n:[n,n],v=[g[0]*f[2]||1,g[1]*f[2]||1],y=p*f[2],S=Array.isArray(o)?o:[o,o],E=w?[y,y]:v,b=[S[0]*f[2]||1+E[0]/2,S[1]*f[2]||1+E[1]/2],_=`${m}${e||""}`;return h.jsxs("svg",{className:Oe(["react-flow__background",u]),style:{...l,...ec,"--xy-background-color-props":a,"--xy-background-pattern-color-props":i},ref:c,"data-testid":"rf__background",children:[h.jsx("pattern",{id:_,x:f[0]%v[0],y:f[1]%v[1],width:v[0],height:v[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${b[0]},-${b[1]})`,children:x?h.jsx($A,{radius:y/2,className:d}):h.jsx(zA,{dimensions:E,lineWidth:s,variant:t,className:d})}),h.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${_})`})]})}G1.displayName="Background";const UA=j.memo(G1);function VA(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:h.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function WA(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:h.jsx("path",{d:"M0 0h32v4.2H0z"})})}function KA(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:h.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 qA(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:h.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 QA(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:h.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 sl({children:e,className:t,...n}){return h.jsx("button",{type:"button",className:Oe(["react-flow__controls-button",t]),...n,children:e})}const GA=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function X1({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:s,onZoomIn:o,onZoomOut:i,onFitView:a,onInteractiveChange:l,className:u,children:d,position:c="bottom-left",orientation:f="vertical","aria-label":m}){const p=Ce(),{isInteractive:x,minZoomReached:w,maxZoomReached:g,ariaLabelConfig:v}=fe(GA,Ee),{zoomIn:y,zoomOut:S,fitView:E}=up(),b=()=>{y(),o==null||o()},_=()=>{S(),i==null||i()},C=()=>{E(s),a==null||a()},M=()=>{p.setState({nodesDraggable:!x,nodesConnectable:!x,elementsSelectable:!x}),l==null||l(!x)},L=f==="horizontal"?"horizontal":"vertical";return h.jsxs(Ea,{className:Oe(["react-flow__controls",L,u]),position:c,style:e,"data-testid":"rf__controls","aria-label":m??v["controls.ariaLabel"],children:[t&&h.jsxs(h.Fragment,{children:[h.jsx(sl,{onClick:b,className:"react-flow__controls-zoomin",title:v["controls.zoomIn.ariaLabel"],"aria-label":v["controls.zoomIn.ariaLabel"],disabled:g,children:h.jsx(VA,{})}),h.jsx(sl,{onClick:_,className:"react-flow__controls-zoomout",title:v["controls.zoomOut.ariaLabel"],"aria-label":v["controls.zoomOut.ariaLabel"],disabled:w,children:h.jsx(WA,{})})]}),n&&h.jsx(sl,{className:"react-flow__controls-fitview",onClick:C,title:v["controls.fitView.ariaLabel"],"aria-label":v["controls.fitView.ariaLabel"],children:h.jsx(KA,{})}),r&&h.jsx(sl,{className:"react-flow__controls-interactive",onClick:M,title:v["controls.interactive.ariaLabel"],"aria-label":v["controls.interactive.ariaLabel"],children:x?h.jsx(QA,{}):h.jsx(qA,{})}),d]})}X1.displayName="Controls";const XA=j.memo(X1);function YA({id:e,x:t,y:n,width:r,height:s,style:o,color:i,strokeColor:a,strokeWidth:l,className:u,borderRadius:d,shapeRendering:c,selected:f,onClick:m}){const{background:p,backgroundColor:x}=o||{},w=i||p||x;return h.jsx("rect",{className:Oe(["react-flow__minimap-node",{selected:f},u]),x:t,y:n,rx:d,ry:d,width:r,height:s,style:{fill:w,stroke:a,strokeWidth:l},shapeRendering:c,onClick:m?g=>m(g,e):void 0})}const ZA=j.memo(YA),JA=e=>e.nodes.map(t=>t.id),Jc=e=>e instanceof Function?e:()=>e;function e3({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:s,nodeComponent:o=ZA,onClick:i}){const a=fe(JA,Ee),l=Jc(t),u=Jc(e),d=Jc(n),c=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return h.jsx(h.Fragment,{children:a.map(f=>h.jsx(n3,{id:f,nodeColorFunc:l,nodeStrokeColorFunc:u,nodeClassNameFunc:d,nodeBorderRadius:r,nodeStrokeWidth:s,NodeComponent:o,onClick:i,shapeRendering:c},f))})}function t3({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:s,nodeStrokeWidth:o,shapeRendering:i,NodeComponent:a,onClick:l}){const{node:u,x:d,y:c,width:f,height:m}=fe(p=>{const{internals:x}=p.nodeLookup.get(e),w=x.userNode,{x:g,y:v}=x.positionAbsolute,{width:y,height:S}=Vn(w);return{node:w,x:g,y:v,width:y,height:S}},Ee);return!u||u.hidden||!Yw(u)?null:h.jsx(a,{x:d,y:c,width:f,height:m,style:u.style,selected:!!u.selected,className:r(u),color:t(u),borderRadius:s,strokeColor:n(u),strokeWidth:o,shapeRendering:i,onClick:l,id:u.id})}const n3=j.memo(t3);var r3=j.memo(e3);const s3=200,o3=150,i3=e=>!e.hidden,a3=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?Xw(Sa(e.nodeLookup,{filter:i3}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},l3="react-flow__minimap-desc";function Y1({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:s="",nodeBorderRadius:o=5,nodeStrokeWidth:i,nodeComponent:a,bgColor:l,maskColor:u,maskStrokeColor:d,maskStrokeWidth:c,position:f="bottom-right",onClick:m,onNodeClick:p,pannable:x=!1,zoomable:w=!1,ariaLabel:g,inversePan:v,zoomStep:y=1,offsetScale:S=5}){const E=Ce(),b=j.useRef(null),{boundingRect:_,viewBB:C,rfId:M,panZoom:L,translateExtent:P,flowWidth:R,flowHeight:$,ariaLabelConfig:k}=fe(a3,Ee),I=(e==null?void 0:e.width)??s3,A=(e==null?void 0:e.height)??o3,F=_.width/I,N=_.height/A,T=Math.max(F,N),D=T*I,B=T*A,H=S*T,K=_.x-(D-_.width)/2-H,V=_.y-(B-_.height)/2-H,X=D+H*2,Q=B+H*2,Y=`${l3}-${M}`,W=j.useRef(0),Z=j.useRef();W.current=T,j.useEffect(()=>{if(b.current&&L)return Z.current=RL({domNode:b.current,panZoom:L,getTransform:()=>E.getState().transform,getViewScale:()=>W.current}),()=>{var te;(te=Z.current)==null||te.destroy()}},[L]),j.useEffect(()=>{var te;(te=Z.current)==null||te.update({translateExtent:P,width:R,height:$,inversePan:v,pannable:x,zoomStep:y,zoomable:w})},[x,w,v,y,P,R,$]);const oe=m?te=>{var ce;const[he,ye]=((ce=Z.current)==null?void 0:ce.pointer(te))||[0,0];m(te,{x:he,y:ye})}:void 0,re=p?j.useCallback((te,he)=>{const ye=E.getState().nodeLookup.get(he).internals.userNode;p(te,ye)},[]):void 0,J=g??k["minimap.ariaLabel"];return h.jsx(Ea,{position:f,style:{...e,"--xy-minimap-background-color-props":typeof l=="string"?l:void 0,"--xy-minimap-mask-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-width-props":typeof c=="number"?c*T:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof i=="number"?i:void 0},className:Oe(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:h.jsxs("svg",{width:I,height:A,viewBox:`${K} ${V} ${X} ${Q}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":Y,ref:b,onClick:oe,children:[J&&h.jsx("title",{id:Y,children:J}),h.jsx(r3,{onClick:re,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:o,nodeClassName:s,nodeStrokeWidth:i,nodeComponent:a}),h.jsx("path",{className:"react-flow__minimap-mask",d:`M${K-H},${V-H}h${X+H*2}v${Q+H*2}h${-X-H*2}z
|
|
67
|
+
M${C.x},${C.y}h${C.width}v${C.height}h${-C.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}Y1.displayName="MiniMap";const u3=j.memo(Y1),c3=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,d3={[jo.Line]:"right",[jo.Handle]:"bottom-right"};function f3({nodeId:e,position:t,variant:n=jo.Handle,className:r,style:s=void 0,children:o,color:i,minWidth:a=10,minHeight:l=10,maxWidth:u=Number.MAX_VALUE,maxHeight:d=Number.MAX_VALUE,keepAspectRatio:c=!1,resizeDirection:f,autoScale:m=!0,shouldResize:p,onResizeStart:x,onResize:w,onResizeEnd:g}){const v=R1(),y=typeof e=="string"?e:v,S=Ce(),E=j.useRef(null),b=n===jo.Handle,_=fe(j.useCallback(c3(b&&m),[b,m]),Ee),C=j.useRef(null),M=t??d3[n];j.useEffect(()=>{if(!(!E.current||!y))return C.current||(C.current=UL({domNode:E.current,nodeId:y,getStoreItems:()=>{const{nodeLookup:P,transform:R,snapGrid:$,snapToGrid:k,nodeOrigin:I,domNode:A}=S.getState();return{nodeLookup:P,transform:R,snapGrid:$,snapToGrid:k,nodeOrigin:I,paneDomNode:A}},onChange:(P,R)=>{const{triggerNodeChanges:$,nodeLookup:k,parentLookup:I,nodeOrigin:A}=S.getState(),F=[],N={x:P.x,y:P.y},T=k.get(y);if(T&&T.expandParent&&T.parentId){const D=T.origin??A,B=P.width??T.measured.width??0,H=P.height??T.measured.height??0,K={id:T.id,parentId:T.parentId,rect:{width:B,height:H,...Zw({x:P.x??T.position.x,y:P.y??T.position.y},{width:B,height:H},T.parentId,k,D)}},V=lp([K],k,I,A);F.push(...V),N.x=P.x?Math.max(D[0]*B,P.x):void 0,N.y=P.y?Math.max(D[1]*H,P.y):void 0}if(N.x!==void 0&&N.y!==void 0){const D={id:y,type:"position",position:{...N}};F.push(D)}if(P.width!==void 0&&P.height!==void 0){const B={id:y,type:"dimensions",resizing:!0,setAttributes:f?f==="horizontal"?"width":"height":!0,dimensions:{width:P.width,height:P.height}};F.push(B)}for(const D of R){const B={...D,type:"position"};F.push(B)}$(F)},onEnd:({width:P,height:R})=>{const $={id:y,type:"dimensions",resizing:!1,dimensions:{width:P,height:R}};S.getState().triggerNodeChanges([$])}})),C.current.update({controlPosition:M,boundaries:{minWidth:a,minHeight:l,maxWidth:u,maxHeight:d},keepAspectRatio:c,resizeDirection:f,onResizeStart:x,onResize:w,onResizeEnd:g,shouldResize:p}),()=>{var P;(P=C.current)==null||P.destroy()}},[M,a,l,u,d,c,x,w,g,p]);const L=M.split("-");return h.jsx("div",{className:Oe(["react-flow__resize-control","nodrag",...L,n,r]),ref:E,style:{...s,scale:_,...i&&{[b?"backgroundColor":"borderColor"]:i}},children:o})}j.memo(f3);function h3({data:e,selected:t}){const n=e,r=n.failed_count>0,s=n.running_count>0,o=n.success_count===n.total_count&&n.total_count>0;let i="border-border";return t?i="border-primary ring-2 ring-primary/20":r?i="border-red-500":s?i="border-blue-500":o&&(i="border-green-500"),h.jsxs("div",{className:`bg-card rounded-lg border-2 ${i} shadow-md min-w-[180px] transition-all`,children:[h.jsx(Mo,{type:"target",position:ee.Top,className:"!bg-muted-foreground !w-3 !h-3"}),h.jsxs("div",{className:"px-4 py-3",children:[h.jsx("div",{className:"font-semibold text-sm mb-2",children:n.class_name}),h.jsxs("div",{className:"flex flex-wrap gap-1.5 mb-2",children:[h.jsxs(mt,{variant:"muted",className:"text-xs px-1.5 py-0.5",children:[n.total_count," total"]}),n.success_count>0&&h.jsx(mt,{variant:"success",className:"text-xs px-1.5 py-0.5",children:n.success_count}),n.running_count>0&&h.jsx(mt,{variant:"info",className:"text-xs px-1.5 py-0.5",children:n.running_count}),n.failed_count>0&&h.jsx(mt,{variant:"destructive",className:"text-xs px-1.5 py-0.5",children:n.failed_count})]}),h.jsxs("div",{className:"space-y-1",children:[n.experiments.slice(0,3).map(a=>h.jsxs(Ue,{to:"/experiments/$namespace/$furu_hash",params:{namespace:a.namespace,furu_hash:a.furu_hash},className:"block text-xs text-muted-foreground hover:text-primary truncate",title:a.furu_hash,children:[a.furu_hash.slice(0,8),"..."]},a.furu_hash)),n.experiments.length>3&&h.jsxs("div",{className:"text-xs text-muted-foreground",children:["+",n.experiments.length-3," more"]})]})]}),h.jsx(Mo,{type:"source",position:ee.Bottom,className:"!bg-muted-foreground !w-3 !h-3"})]})}const p3={classNode:h3};function m3(e,t){var p;const n=new Map,r=new Map,s=new Map;for(const x of e)n.set(x.id,0),r.set(x.id,[]),s.set(x.id,x);for(const x of t)s.has(x.source)&&s.has(x.target)&&(n.set(x.target,(n.get(x.target)??0)+1),(p=r.get(x.source))==null||p.push(x.target));const o=[],i=new Set,a=new Set(e.map(x=>x.id));for(;a.size>0;){const x=[];for(const w of a)(n.get(w)??0)===0&&x.push(w);if(x.length===0){const w=a.values().next().value;w&&x.push(w)}o.push(x);for(const w of x){a.delete(w),i.add(w);for(const g of r.get(w)??[])i.has(g)||n.set(g,(n.get(g)??1)-1)}}const l=200,u=180,d=40,c=new Map;for(let x=0;x<o.length;x++){const w=o[x],v=-(w.length*l+(w.length-1)*d)/2;for(let y=0;y<w.length;y++){const S=w[y];c.set(S,{x:v+y*(l+d),y:x*u})}}const f=e.map(x=>{const w=c.get(x.id)??{x:0,y:0};return{id:x.id,type:"classNode",position:w,data:x}}),m=t.filter(x=>s.has(x.source)&&s.has(x.target)).map(x=>({id:`${x.source}-${x.target}`,source:x.source,target:x.target,label:x.field_name,labelStyle:{fontSize:10,fill:"hsl(var(--muted-foreground))"},labelBgStyle:{fill:"hsl(var(--background))"},labelBgPadding:[4,2],style:{stroke:"hsl(var(--border))",strokeWidth:2},markerEnd:{type:ws.ArrowClosed,color:"hsl(var(--border))"},animated:!1}));return{nodes:f,edges:m}}function g3({nodes:e,edges:t}){const[n,r]=j.useState(null),{nodes:s,edges:o}=j.useMemo(()=>m3(e,t),[e,t]),[i,,a]=FA(s),[l,u,d]=DA(o),c=j.useCallback((m,p)=>{const x=p.data;r(x);const w=new Set([p.id]);for(const g of t)g.target===p.id&&w.add(g.source),g.source===p.id&&w.add(g.target);u(g=>g.map(v=>{const y=v.source===p.id||v.target===p.id;return{...v,animated:y,style:{...v.style,stroke:y?"hsl(var(--primary))":"hsl(var(--border))",strokeWidth:y?3:2},markerEnd:{type:ws.ArrowClosed,color:y?"hsl(var(--primary))":"hsl(var(--border))"}}}))},[t,u]),f=j.useCallback(()=>{r(null),u(m=>m.map(p=>({...p,animated:!1,style:{...p.style,stroke:"hsl(var(--border))",strokeWidth:2},markerEnd:{type:ws.ArrowClosed,color:"hsl(var(--border))"}})))},[u]);return h.jsx("div",{className:"h-[600px] border rounded-lg bg-background relative",children:h.jsxs(OA,{nodes:i,edges:l,onNodesChange:a,onEdgesChange:d,onNodeClick:c,onPaneClick:f,nodeTypes:p3,fitView:!0,fitViewOptions:{padding:.2},minZoom:.1,maxZoom:2,defaultEdgeOptions:{type:"smoothstep"},children:[h.jsx(UA,{}),h.jsx(XA,{}),h.jsx(u3,{nodeStrokeColor:"hsl(var(--border))",nodeColor:"hsl(var(--card))",nodeBorderRadius:4}),n&&h.jsx(Ea,{position:"top-right",className:"m-4",children:h.jsxs(be,{className:"w-80",children:[h.jsxs(nt,{className:"pb-2",children:[h.jsx(lt,{className:"text-base",children:n.class_name}),h.jsx("code",{className:"text-xs text-muted-foreground break-all",children:n.full_class_name})]}),h.jsxs(ke,{className:"space-y-3",children:[h.jsxs("div",{className:"flex gap-2 flex-wrap",children:[h.jsxs(mt,{variant:"muted",children:[n.total_count," experiments"]}),n.success_count>0&&h.jsxs(mt,{variant:"success",children:[n.success_count," success"]}),n.running_count>0&&h.jsxs(mt,{variant:"info",children:[n.running_count," running"]}),n.failed_count>0&&h.jsxs(mt,{variant:"destructive",children:[n.failed_count," failed"]})]}),h.jsx("div",{className:"max-h-40 overflow-y-auto space-y-1",children:n.experiments.map(m=>h.jsxs(Ue,{to:"/experiments/$namespace/$furu_hash",params:{namespace:m.namespace,furu_hash:m.furu_hash},className:"flex items-center justify-between p-2 rounded hover:bg-muted text-sm",children:[h.jsxs("code",{className:"text-xs",children:[m.furu_hash.slice(0,12),"..."]}),h.jsx(mt,{variant:m.result_status==="success"?"success":m.result_status==="failed"?"destructive":m.attempt_status==="running"?"info":"muted",className:"text-xs",children:m.attempt_status??m.result_status})]},m.furu_hash))})]})]})})]})})}const y3={default:"border-border",success:"border-emerald-500/40",failed:"border-red-500/40",running:"border-blue-500/40"},x3={default:"text-foreground",success:"text-emerald-300",failed:"text-red-300",running:"text-blue-300"};function Vr({title:e,value:t,loading:n,variant:r="default",icon:s,testId:o}){return h.jsxs(be,{className:ze("p-5",y3[r]),"data-testid":o,children:[h.jsx(nt,{className:"p-0 pb-4",children:h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("span",{className:"text-sm text-muted-foreground",children:e}),s?h.jsx(mt,{variant:"secondary",className:"text-base px-2 py-1",children:s}):null]})}),h.jsx(ke,{className:"p-0",children:h.jsx("div",{className:ze("text-3xl font-bold font-mono",x3[r]),"data-testid":o?`${o}-value`:void 0,children:n?"...":t.toLocaleString()})})]})}const v3=_o("/dag")({component:w3});function w3(){const{data:e,isLoading:t,error:n}=ZR();return h.jsxs("div",{className:"max-w-7xl mx-auto",children:[h.jsxs("div",{className:"mb-8",children:[h.jsx("h1",{className:"text-3xl font-bold mb-2",children:"Experiment DAG"}),h.jsx("p",{className:"text-muted-foreground",children:"Visualize the dependency graph of your experiments. Nodes represent experiment classes, edges show dependencies."})]}),e&&h.jsxs("div",{className:"grid grid-cols-3 gap-4 mb-6",children:[h.jsx(Vr,{title:"Classes",value:e.total_nodes,loading:t,icon:"N"}),h.jsx(Vr,{title:"Dependencies",value:e.total_edges,loading:t,icon:"E"}),h.jsx(Vr,{title:"Experiments",value:e.total_experiments,loading:t,icon:"#"})]}),t?h.jsx(be,{children:h.jsx(ke,{className:"p-8 text-center text-muted-foreground",children:"Loading experiment graph..."})}):n?h.jsx(be,{children:h.jsx(ke,{className:"p-8 text-center text-destructive",children:"Error loading DAG. Is the API running?"})}):(e==null?void 0:e.nodes.length)===0?h.jsx(dw,{title:"No experiments found",description:"Create some experiments to see the dependency graph.",icon:"G"}):e?h.jsxs(be,{children:[h.jsxs(nt,{children:[h.jsx(lt,{children:"Dependency Graph"}),h.jsx("p",{className:"text-sm text-muted-foreground",children:"Click on a node to see details and highlight connected edges. Scroll to zoom, drag to pan."})]}),h.jsx(ke,{className:"p-0",children:h.jsx(g3,{nodes:e.nodes,edges:e.edges})})]}):null,e&&e.nodes.length>0&&h.jsxs(be,{className:"mt-6",children:[h.jsx(nt,{className:"pb-2",children:h.jsx(lt,{className:"text-sm",children:"Legend"})}),h.jsx(ke,{children:h.jsxs("div",{className:"flex flex-wrap gap-6 text-sm",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"w-4 h-4 border-2 border-green-500 rounded"}),h.jsx("span",{children:"All successful"})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"w-4 h-4 border-2 border-blue-500 rounded"}),h.jsx("span",{children:"Running experiments"})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"w-4 h-4 border-2 border-red-500 rounded"}),h.jsx("span",{children:"Has failures"})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"w-4 h-4 border-2 border-border rounded"}),h.jsx("span",{children:"Default"})]})]})})]})]})}const S3=_o("/")({component:_3});function _3(){const{data:e,isLoading:t}=LR(),{data:n,isLoading:r}=QR(),{data:s,isLoading:o}=cw({limit:5});return h.jsxs("div",{className:"max-w-6xl mx-auto",children:[h.jsxs("div",{className:"mb-8",children:[h.jsx("h1",{className:"text-3xl font-bold mb-2",children:"Dashboard"}),h.jsx("p",{className:"text-muted-foreground",children:"Monitor your Furu experiments in real-time"})]}),h.jsx(be,{className:"mb-8",children:h.jsxs(ke,{className:"flex items-center justify-between p-4",children:[h.jsxs("div",{className:"flex items-center gap-4",children:[h.jsx("span",{className:"text-muted-foreground",children:"API Status:"}),t?h.jsx(mt,{variant:"muted",children:"Checking..."}):(e==null?void 0:e.status)==="healthy"?h.jsxs(mt,{variant:"success",className:"gap-2",children:[h.jsx("span",{className:"h-2 w-2 rounded-full bg-emerald-300 animate-pulse"}),"Healthy"]}):h.jsx(mt,{variant:"destructive",children:"Disconnected"})]}),h.jsxs("span",{className:"text-muted-foreground text-sm font-mono",children:["v",(e==null?void 0:e.version)||"..."]})]})}),h.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-8",children:[h.jsx(Vr,{title:"Total Experiments",value:(n==null?void 0:n.total)??0,loading:r,icon:"📊",testId:"stats-total"}),h.jsx(Vr,{title:"Running",value:(n==null?void 0:n.running_count)??0,loading:r,variant:"running",icon:"🔄",testId:"stats-running"}),h.jsx(Vr,{title:"Successful",value:(n==null?void 0:n.success_count)??0,loading:r,variant:"success",icon:"✓",testId:"stats-success"}),h.jsx(Vr,{title:"Failed",value:(n==null?void 0:n.failed_count)??0,loading:r,variant:"failed",icon:"✗",testId:"stats-failed"})]}),n&&n.by_result_status&&n.by_result_status.length>0&&h.jsxs(be,{className:"mb-8",children:[h.jsx(nt,{className:"pb-3",children:h.jsx(lt,{children:"Result Status Distribution"})}),h.jsx(ke,{children:h.jsx("div",{className:"flex flex-wrap gap-3",children:n.by_result_status.map(i=>h.jsxs("div",{className:"flex items-center gap-2 rounded-lg border bg-muted/40 px-3 py-2",children:[h.jsx(sn,{status:i.status,type:"result"}),h.jsx("span",{className:"font-mono text-sm",children:i.count})]},i.status))})})]}),h.jsxs(be,{className:"overflow-hidden",children:[h.jsxs(nt,{className:"flex-row items-center justify-between space-y-0 border-b",children:[h.jsx(lt,{children:"Recent Experiments"}),h.jsx(wn,{asChild:!0,variant:"ghost",size:"sm",children:h.jsx(Ue,{to:"/experiments",children:"View all →"})})]}),o?h.jsx("div",{className:"p-6 text-muted-foreground",children:"Loading..."}):(s==null?void 0:s.experiments.length)===0?h.jsx("div",{className:"p-6 text-muted-foreground",children:"No experiments yet"}):h.jsxs(Vh,{children:[h.jsx(Wh,{children:h.jsxs(Wi,{children:[h.jsx(Ke,{className:"pl-6",children:"Class"}),h.jsx(Ke,{children:"Namespace"}),h.jsx(Ke,{children:"Result"}),h.jsx(Ke,{children:"Migration"}),h.jsx(Ke,{children:"Attempt"}),h.jsx(Ke,{children:"Updated"})]})}),h.jsx(Kh,{children:s==null?void 0:s.experiments.map(i=>h.jsxs(Wi,{children:[h.jsx(qe,{className:"pl-6",children:h.jsx(Ue,{to:"/experiments/$namespace/$furu_hash",params:{namespace:i.namespace,furu_hash:i.furu_hash},className:"font-medium hover:text-primary",children:i.class_name})}),h.jsx(qe,{className:"font-mono text-sm text-muted-foreground",children:i.namespace}),h.jsx(qe,{children:h.jsx(sn,{status:i.result_status,type:"result"})}),h.jsx(qe,{children:i.migration_kind?h.jsx("span",{className:"text-xs rounded-full border border-amber-500/40 bg-amber-500/10 px-2 py-0.5 text-amber-300",children:i.migration_kind}):h.jsx("span",{className:"text-muted-foreground",children:"—"})}),h.jsx(qe,{children:i.attempt_status?h.jsx(sn,{status:i.attempt_status,type:"attempt"}):h.jsx("span",{className:"text-muted-foreground",children:"—"})}),h.jsx(qe,{className:"text-sm text-muted-foreground",children:i.updated_at?new Date(i.updated_at).toLocaleString():"—"})]},`${i.namespace}-${i.furu_hash}`))})]})]})]})}function b3({metadata:e}){const t=a=>{const l=e[a];return typeof l=="string"?l:null},n=t("git_commit"),r=t("git_branch"),s=t("hostname"),o=t("user"),i=t("furu_python_def");return h.jsxs(be,{className:"mb-6",children:[h.jsx(nt,{children:h.jsx(lt,{children:"Metadata"})}),h.jsxs(ke,{children:[h.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 text-sm",children:[n?h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground block",children:"Git Commit"}),h.jsx("code",{className:"font-mono text-xs",children:n})]}):null,r?h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground block",children:"Git Branch"}),h.jsx("span",{children:r})]}):null,s?h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground block",children:"Hostname"}),h.jsx("span",{children:s})]}):null,o?h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground block",children:"User"}),h.jsx("span",{children:o})]}):null]}),i?h.jsxs("div",{className:"mt-4 border-t pt-4",children:[h.jsx("span",{className:"mb-2 block text-sm text-muted-foreground",children:"Python Definition"}),h.jsx("pre",{className:"rounded-lg bg-muted p-4 text-sm overflow-x-auto",children:h.jsx("code",{className:"text-emerald-300",children:i})})]}):null]})]})}function ta({value:e,depth:t=0}){if(e===null)return h.jsx("span",{className:"text-muted-foreground italic",children:"null"});if(typeof e=="boolean")return h.jsx("span",{className:e?"text-green-400":"text-red-400",children:String(e)});if(typeof e=="number")return h.jsx("span",{className:"text-blue-400",children:e});if(typeof e=="string")return h.jsxs("span",{className:"text-amber-300",children:['"',e,'"']});if(Array.isArray(e))return e.length===0?h.jsx("span",{className:"text-muted-foreground",children:"[]"}):h.jsxs("div",{className:"ml-4",children:[h.jsx("span",{className:"text-muted-foreground",children:"["}),e.map((n,r)=>h.jsxs("div",{className:"ml-4",children:[h.jsx(ta,{value:n,depth:t+1}),r<e.length-1&&h.jsx("span",{className:"text-muted-foreground",children:","})]},r)),h.jsx("span",{className:"text-muted-foreground",children:"]"})]});if(typeof e=="object"){const n=Object.entries(e);return n.length===0?h.jsx("span",{className:"text-muted-foreground",children:"{}"}):h.jsx("div",{className:t>0?"ml-4":"",children:n.map(([r,s],o)=>h.jsxs("div",{className:"flex",children:[h.jsxs("span",{className:"text-purple-400 mr-1",children:[r,":"]}),h.jsx(ta,{value:s,depth:t+1}),o<n.length-1&&h.jsx("span",{className:"text-muted-foreground",children:","})]},r))})}return h.jsx("span",{children:String(e)})}function Ey({title:e,children:t,defaultOpen:n=!1}){const[r,s]=j.useState(n);return h.jsxs("div",{className:"border rounded-lg mb-2",children:[h.jsxs("button",{onClick:()=>s(!r),className:"w-full px-4 py-2 text-left flex items-center justify-between hover:bg-muted/50 rounded-lg",children:[h.jsx("span",{className:"font-medium text-sm",children:e}),h.jsx("span",{className:"text-muted-foreground",children:r?"−":"+"})]}),r&&h.jsx("div",{className:"px-4 pb-4 pt-2",children:t})]})}function E3({furuObj:e,parents:t}){const n=[],r=[];for(const[a,l]of Object.entries(e))a!=="__class__"&&(l&&typeof l=="object"&&!Array.isArray(l)&&"__class__"in l?r.push([a,l]):n.push([a,l]));const s=new Map((t==null?void 0:t.map(a=>[a.field_name,a]))??[]),o=n.length>0,i=r.length>0;return!o&&!i?h.jsxs(be,{className:"mb-6",children:[h.jsx(nt,{children:h.jsx(lt,{children:"Configuration"})}),h.jsx(ke,{children:h.jsx("p",{className:"text-muted-foreground text-sm",children:"No configuration parameters"})})]}):h.jsxs(be,{className:"mb-6",children:[h.jsx(nt,{children:h.jsx(lt,{children:"Configuration"})}),h.jsxs(ke,{children:[o&&h.jsx(Ey,{title:"Parameters",defaultOpen:!0,children:h.jsx("div",{className:"font-mono text-sm space-y-1",children:n.map(([a,l])=>h.jsxs("div",{className:"flex",children:[h.jsxs("span",{className:"text-purple-400 mr-2 min-w-fit",children:[a,":"]}),h.jsx(ta,{value:l})]},a))})}),i&&h.jsx(Ey,{title:"Dependencies (Embedded Config)",children:h.jsx("div",{className:"space-y-3",children:r.map(([a,l])=>{const u=s.get(a),d=(u==null?void 0:u.namespace)&&(u==null?void 0:u.furu_hash);return h.jsxs("div",{className:"border-l-2 border-muted pl-3",children:[h.jsxs("div",{className:"text-sm mb-1 flex items-center justify-between",children:[h.jsxs("div",{className:"flex items-center",children:[h.jsx("span",{className:"text-purple-400 font-medium",children:a}),h.jsx("span",{className:"text-muted-foreground mx-1",children:":"}),d?h.jsx(Ue,{to:"/experiments/$namespace/$furu_hash",params:{namespace:u.namespace,furu_hash:u.furu_hash},className:"text-cyan-400 hover:underline",children:l.__class__}):h.jsx("span",{className:"text-cyan-400",children:l.__class__})]}),(u==null?void 0:u.result_status)&&h.jsx(sn,{status:u.result_status,type:"result"})]}),h.jsx("div",{className:"font-mono text-xs space-y-0.5 text-muted-foreground",children:Object.entries(l).filter(([c])=>c!=="__class__").map(([c,f])=>h.jsxs("div",{className:"flex",children:[h.jsxs("span",{className:"mr-1",children:[c,":"]}),h.jsx(ta,{value:f,depth:1})]},c))})]},a)})})})]})]})}function C3({parents:e}){return e.length===0?null:h.jsxs(be,{className:"mb-6",children:[h.jsx(nt,{children:h.jsx(lt,{children:"Parent Experiments"})}),h.jsx(ke,{children:h.jsx("div",{className:"space-y-3",children:e.map((t,n)=>h.jsxs("div",{className:"border rounded-lg p-3",children:[h.jsxs("div",{className:"flex items-center justify-between mb-2",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("span",{className:"text-purple-400 font-medium text-sm",children:t.field_name}),h.jsx("span",{className:"text-muted-foreground",children:":"}),h.jsx("span",{className:"text-cyan-400 text-sm",children:t.class_name})]}),t.result_status&&h.jsx(sn,{status:t.result_status,type:"result"})]}),t.namespace&&t.furu_hash?h.jsxs(Ue,{to:"/experiments/$namespace/$furu_hash",params:{namespace:t.namespace,furu_hash:t.furu_hash},className:"text-sm text-primary hover:underline flex items-center gap-1",children:[h.jsx("span",{children:"View experiment"}),h.jsxs("span",{className:"text-muted-foreground font-mono text-xs",children:["(",t.furu_hash.slice(0,8),"...)"]})]}):h.jsx("span",{className:"text-sm text-muted-foreground italic",children:"Experiment not found in storage"}),t.config&&Object.keys(t.config).length>0&&h.jsxs("details",{className:"mt-2",children:[h.jsx("summary",{className:"text-xs text-muted-foreground cursor-pointer hover:text-foreground",children:"Show config"}),h.jsx("div",{className:"mt-1 font-mono text-xs pl-2 border-l border-muted",children:Object.entries(t.config).map(([r,s])=>h.jsxs("div",{className:"flex",children:[h.jsxs("span",{className:"text-muted-foreground mr-1",children:[r,":"]}),h.jsx(ta,{value:s,depth:1})]},r))})]})]},`${t.field_name}-${n}`))})})]})}function N3({children:e}){return e.length===0?null:h.jsxs(be,{className:"mb-6",children:[h.jsx(nt,{children:h.jsxs(lt,{children:["Child Experiments (",e.length,")"]})}),h.jsx(ke,{children:h.jsx("div",{className:"space-y-2",children:e.map((t,n)=>h.jsxs("div",{className:"border rounded-lg p-3 flex items-center justify-between",children:[h.jsx("div",{className:"flex items-center gap-3",children:h.jsxs("div",{children:[h.jsx(Ue,{to:"/experiments/$namespace/$furu_hash",params:{namespace:t.namespace,furu_hash:t.furu_hash},className:"text-primary hover:underline font-medium",children:t.class_name}),h.jsxs("div",{className:"text-xs text-muted-foreground",children:["via"," ",h.jsx("span",{className:"text-purple-400",children:t.field_name})]})]})}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsxs("code",{className:"text-xs text-muted-foreground font-mono",children:[t.furu_hash.slice(0,8),"..."]}),h.jsx(sn,{status:t.result_status,type:"result"})]})]},`${t.namespace}-${t.furu_hash}-${n}`))})})]})}const Z1=_o("/experiments_/$namespace/$furu_hash")({component:k3});function k3(){var f,m,p;const{namespace:e,furu_hash:t}=Z1.useParams(),[n,r]=j.useState("resolved"),{data:s,isLoading:o,error:i}=VR(e,t,{view:n}),{data:a}=$R(e,t,{view:n}),l=!!(s!=null&&s.migration_kind),u=j.useMemo(()=>s!=null&&s.original_namespace&&(s!=null&&s.original_hash)?{namespace:s.original_namespace,furu_hash:s.original_hash}:s!=null&&s.from_namespace&&(s!=null&&s.from_hash)?{namespace:s.from_namespace,furu_hash:s.from_hash}:null,[s==null?void 0:s.original_namespace,s==null?void 0:s.original_hash,s==null?void 0:s.from_namespace,s==null?void 0:s.from_hash]),d=j.useMemo(()=>!(s!=null&&s.aliases)||s.aliases.length===0?[]:s.aliases.map(x=>({namespace:x.namespace,furu_hash:x.furu_hash,overwritten_at:x.overwritten_at??null})),[s==null?void 0:s.aliases]);if(o)return h.jsx("div",{className:"max-w-5xl mx-auto",children:h.jsx("div",{className:"text-muted-foreground",children:"Loading experiment..."})});if(i||!s)return h.jsx("div",{className:"max-w-5xl mx-auto",children:h.jsx(be,{className:"border-destructive/40",children:h.jsxs(ke,{className:"p-6 text-center",children:[h.jsx("h2",{className:"mb-2 text-xl font-bold text-destructive",children:"Experiment Not Found"}),h.jsx("p",{className:"mb-4 text-muted-foreground",children:"The experiment you're looking for doesn't exist or has been removed."}),h.jsx(wn,{asChild:!0,variant:"ghost",children:h.jsx(Ue,{to:"/experiments",children:"Back to experiments"})})]})})});const c=s.metadata&&typeof s.metadata=="object"&&"furu_obj"in s.metadata?s.metadata.furu_obj:null;return h.jsxs("div",{className:"max-w-5xl mx-auto",children:[h.jsxs("div",{className:"mb-6 text-sm",children:[h.jsx(Ue,{to:"/experiments",className:"text-muted-foreground hover:text-primary",children:"Experiments"}),h.jsx("span",{className:"mx-2 text-muted-foreground",children:"/"}),h.jsx("span",{className:"text-foreground",children:s.class_name})]}),h.jsxs(be,{className:"mb-6",children:[h.jsx(nt,{className:"pb-4",children:h.jsxs("div",{className:"flex items-start justify-between",children:[h.jsxs("div",{children:[h.jsx(lt,{className:"text-2xl",children:s.class_name}),h.jsx("p",{className:"text-sm font-mono text-muted-foreground",children:s.namespace})]}),h.jsxs("div",{className:"flex flex-col items-end gap-2",children:[h.jsxs("div",{className:"flex gap-2",children:[h.jsx(sn,{status:s.result_status,type:"result"}),s.attempt_status?h.jsx(sn,{status:s.attempt_status,type:"attempt"}):null]}),l?h.jsx("span",{className:"rounded-full border border-amber-500/40 bg-amber-500/10 px-2 py-0.5 text-xs text-amber-300",children:s.migration_kind}):null]})]})}),h.jsxs(ke,{className:"space-y-4",children:[l&&h.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-xs",children:[h.jsxs("div",{className:"rounded-full border border-muted px-3 py-1 text-muted-foreground",children:["View: ",n]}),h.jsxs("div",{className:"flex rounded-full border border-muted overflow-hidden",children:[h.jsx("button",{className:`px-3 py-1 text-xs ${n==="resolved"?"bg-primary text-primary-foreground":"text-muted-foreground"}`,onClick:()=>r("resolved"),children:"Aliased"}),h.jsx("button",{className:`px-3 py-1 text-xs ${n==="original"?"bg-primary text-primary-foreground":"text-muted-foreground"}`,onClick:()=>r("original"),disabled:!u,children:"Original"})]}),u?h.jsx(wn,{asChild:!0,size:"sm",variant:"ghost",children:h.jsx(Ue,{to:"/experiments/$namespace/$furu_hash",params:u,children:"View original"})}):null,s.original_result_status?h.jsxs("span",{className:"text-muted-foreground",children:["Original status: ",s.original_result_status]}):null]}),d.length>0&&h.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-xs",children:[h.jsxs("div",{className:"rounded-full border border-muted px-3 py-1 text-muted-foreground",children:["Aliases: ",d.length]}),h.jsx("div",{className:"flex flex-wrap gap-2",children:d.map(x=>h.jsx(wn,{asChild:!0,size:"sm",variant:"ghost",children:h.jsx(Ue,{to:"/experiments/$namespace/$furu_hash",params:x,"aria-label":"View alias",children:x.overwritten_at?"View alias (inactive)":"View alias"})},x.furu_hash))})]}),h.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-sm",children:[h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground block",children:"Hash"}),h.jsx("code",{className:"font-mono",children:s.furu_hash})]}),h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground block",children:"Attempt #"}),h.jsx("span",{children:s.attempt_number??"—"})]}),h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground block",children:"Started"}),h.jsx("span",{children:s.started_at?new Date(s.started_at).toLocaleString():"—"})]}),h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground block",children:"Updated"}),h.jsx("span",{children:s.updated_at?new Date(s.updated_at).toLocaleString():"—"})]})]})]})]}),c&&h.jsx(E3,{furuObj:c,parents:a==null?void 0:a.parents}),(a==null?void 0:a.parents)&&a.parents.length>0&&h.jsx(C3,{parents:a.parents}),(a==null?void 0:a.children)&&a.children.length>0&&h.jsx(N3,{children:a.children}),s.attempt&&h.jsxs(be,{className:"mb-6",children:[h.jsx(nt,{children:h.jsx(lt,{children:"Current Attempt"})}),h.jsxs(ke,{children:[h.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 text-sm",children:[h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground block",children:"ID"}),h.jsx("code",{className:"font-mono text-xs",children:s.attempt.id})]}),h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground block",children:"Backend"}),h.jsx("span",{children:s.attempt.backend})]}),h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground block",children:"Status"}),h.jsx(sn,{status:s.attempt.status,type:"attempt"})]}),h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground block",children:"Host"}),h.jsx("span",{children:((f=s.attempt.owner)==null?void 0:f.host)??"—"})]}),h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground block",children:"PID"}),h.jsx("span",{className:"font-mono",children:((m=s.attempt.owner)==null?void 0:m.pid)??"—"})]}),h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground block",children:"User"}),h.jsx("span",{children:((p=s.attempt.owner)==null?void 0:p.user)??"—"})]}),h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground block",children:"Started At"}),h.jsx("span",{children:new Date(s.attempt.started_at).toLocaleString()})]}),h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground block",children:"Lease Expires"}),h.jsx("span",{children:new Date(s.attempt.lease_expires_at).toLocaleString()})]})]}),s.attempt.reason?h.jsxs("div",{className:"mt-4 border-t pt-4",children:[h.jsx("span",{className:"block text-sm text-muted-foreground",children:"Reason"}),h.jsx("span",{className:"text-amber-300",children:s.attempt.reason})]}):null,s.attempt.error?h.jsxs("div",{className:"mt-4 border-t pt-4",children:[h.jsx("span",{className:"block text-sm text-muted-foreground",children:"Error"}),h.jsxs("div",{className:"mt-2 rounded-lg border border-destructive/30 bg-destructive/10 p-3",children:[h.jsxs("div",{className:"font-mono text-sm text-destructive",children:[s.attempt.error.type,": ",s.attempt.error.message]}),s.attempt.error.traceback?h.jsxs("details",{className:"mt-3",children:[h.jsx("summary",{className:"cursor-pointer text-xs text-muted-foreground hover:text-foreground",children:"View traceback"}),h.jsx("pre",{className:"mt-2 max-h-96 overflow-auto rounded bg-muted p-3 text-xs",children:h.jsx("code",{className:"text-muted-foreground",children:s.attempt.error.traceback})})]}):null]})]}):null]})]}),s.metadata&&h.jsx(b3,{metadata:s.metadata}),h.jsxs(be,{className:"mb-6",children:[h.jsx(nt,{children:h.jsx(lt,{children:"Directory"})}),h.jsx(ke,{children:h.jsx("code",{className:"break-all font-mono text-sm text-muted-foreground",children:s.directory})})]}),h.jsxs("details",{className:"rounded-lg border bg-card",children:[h.jsx("summary",{className:"cursor-pointer px-6 py-4 text-muted-foreground hover:text-foreground",children:"View Raw State JSON"}),h.jsx("div",{className:"px-6 pb-6",children:h.jsx("pre",{className:"max-h-96 overflow-x-auto rounded-lg bg-muted p-4 text-sm",children:h.jsx("code",{className:"text-muted-foreground",children:JSON.stringify(s.state,null,2)})})})]})]})}const P3=ij.update({id:"/experiments",path:"/experiments",getParentRoute:()=>ya}),R3=v3.update({id:"/dag",path:"/dag",getParentRoute:()=>ya}),j3=S3.update({id:"/",path:"/",getParentRoute:()=>ya}),M3=Z1.update({id:"/experiments_/$namespace/$furu_hash",path:"/experiments/$namespace/$furu_hash",getParentRoute:()=>ya}),T3={IndexRoute:j3,DagRoute:R3,ExperimentsRoute:P3,ExperimentsNamespaceFuru_hashRoute:M3},L3=ya._addFileChildren(T3)._addFileTypes(),I3=new ZE({defaultOptions:{queries:{refetchInterval:5e3,staleTime:2e3,retry:(e,t)=>{var n;if(t instanceof DP&&((n=t.response)!=null&&n.status)){const r=t.response.status;if(r>=400&&r<500)return!1}return e<3}}}}),A3=ok({routeTree:L3});Gx(document.getElementById("root")).render(h.jsx(j.StrictMode,{children:h.jsx(eC,{client:I3,children:h.jsx(lk,{router:A3})})}));
|