@linkdlab/funcnodes_react_flow 0.3.13 → 0.3.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.esm.mjs +146 -0
- package/dist/esm/index.esm.mjs.map +1 -0
- package/dist/esm/style.css +219 -219
- package/dist/index.d.ts +5 -5
- package/dist/style.css +219 -219
- package/dist/umd/index.umd.js +22 -22
- package/dist/umd/index.umd.js.map +1 -1
- package/dist/umd/style.css +219 -219
- package/package.json +2 -2
- package/dist/esm/index.esm.js +0 -146
- package/dist/esm/index.esm.js.map +0 -1
package/dist/esm/index.esm.js
DELETED
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
import*as e from"react";import t,{forwardRef as n,memo as r,useContext as o,createContext as i,useMemo as a,useEffect as s,useCallback as l,useState as c,useRef as u,isValidElement as d,cloneElement as p,Children as f,useLayoutEffect as h,Component as m,Fragment as g,createElement as y,useId as b,useReducer as v}from"react";import*as w from"react-dom";import x,{createPortal as C}from"react-dom";const k=e=>{let t;const n=new Set,r=(e,r)=>{const o="function"==typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!=typeof o||null===o)?o:Object.assign({},t,o),n.forEach((n=>n(t,e)))}},o=()=>t,i={setState:r,getState:o,getInitialState:()=>a,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{"production"!==(import.meta.env?import.meta.env.MODE:void 0)&&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()}},a=t=e(r,o,i);return i},E=e=>e?k(e):k;function S(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var I,_={exports:{}},A={},N={exports:{}},O={};var R,T,M,P={};
|
|
2
|
-
/**
|
|
3
|
-
* @license React
|
|
4
|
-
* use-sync-external-store-shim.development.js
|
|
5
|
-
*
|
|
6
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
7
|
-
*
|
|
8
|
-
* This source code is licensed under the MIT license found in the
|
|
9
|
-
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/function D(){return T||(T=1,"production"===process.env.NODE_ENV?N.exports=function(){if(I)return O;I=1;var e=t,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!n(e,r)}catch(e){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),l=r({inst:{value:n,getSnapshot:t}}),c=l[0].inst,u=l[1];return i((function(){c.value=n,c.getSnapshot=t,s(c)&&u({inst:c})}),[e,n,t]),o((function(){return s(c)&&u({inst:c}),e((function(){s(c)&&u({inst:c})}))}),[e]),a(n),n};return O.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:l,O}():N.exports=(R||(R=1,"production"!==process.env.NODE_ENV&&function(){function e(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch(e){return!0}}"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var n=t,r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useState,i=n.useEffect,a=n.useLayoutEffect,s=n.useDebugValue,l=!1,c=!1,u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(t,u){l||void 0===n.startTransition||(l=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var d=u();if(!c){var p=u();r(d,p)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),c=!0)}var f=(p=o({inst:{value:d,getSnapshot:u}}))[0].inst,h=p[1];return a((function(){f.value=d,f.getSnapshot=u,e(f)&&h({inst:f})}),[t,d,u]),i((function(){return e(f)&&h({inst:f}),t((function(){e(f)&&h({inst:f})}))}),[t]),s(d),d};P.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:u,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),P)),N.exports}
|
|
11
|
-
/**
|
|
12
|
-
* @license React
|
|
13
|
-
* use-sync-external-store-shim/with-selector.production.js
|
|
14
|
-
*
|
|
15
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
16
|
-
*
|
|
17
|
-
* This source code is licensed under the MIT license found in the
|
|
18
|
-
* LICENSE file in the root directory of this source tree.
|
|
19
|
-
*/var B,j,L={};
|
|
20
|
-
/**
|
|
21
|
-
* @license React
|
|
22
|
-
* use-sync-external-store-shim/with-selector.development.js
|
|
23
|
-
*
|
|
24
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
25
|
-
*
|
|
26
|
-
* This source code is licensed under the MIT license found in the
|
|
27
|
-
* LICENSE file in the root directory of this source tree.
|
|
28
|
-
*/var F=(j||(j=1,"production"===process.env.NODE_ENV?_.exports=function(){if(M)return A;M=1;var e=t,n=D(),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return A.useSyncExternalStoreWithSelector=function(e,t,n,c,u){var d=i(null);if(null===d.current){var p={hasValue:!1,value:null};d.current=p}else p=d.current;d=s((function(){function e(e){if(!a){if(a=!0,o=e,e=c(e),void 0!==u&&p.hasValue){var t=p.value;if(u(t,e))return i=t}return i=e}if(t=i,r(o,e))return t;var n=c(e);return void 0!==u&&u(t,n)?(o=e,t):(o=e,i=n)}var o,i,a=!1,s=void 0===n?null:n;return[function(){return e(t())},null===s?void 0:function(){return e(s())}]}),[t,n,c,u]);var f=o(e,d[0],d[1]);return a((function(){p.hasValue=!0,p.value=f}),[f]),l(f),f},A}():_.exports=(B||(B=1,"production"!==process.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var e=t,n=D(),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;L.useSyncExternalStoreWithSelector=function(e,t,n,c,u){var d=i(null);if(null===d.current){var p={hasValue:!1,value:null};d.current=p}else p=d.current;d=s((function(){function e(e){if(!a){if(a=!0,o=e,e=c(e),void 0!==u&&p.hasValue){var t=p.value;if(u(t,e))return i=t}return i=e}if(t=i,r(o,e))return t;var n=c(e);return void 0!==u&&u(t,n)?(o=e,t):(o=e,i=n)}var o,i,a=!1,s=void 0===n?null:n;return[function(){return e(t())},null===s?void 0:function(){return e(s())}]}),[t,n,c,u]);var f=o(e,d[0],d[1]);return a((function(){p.hasValue=!0,p.value=f}),[f]),l(f),f},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),L)),_.exports),V=S(F);const{useDebugValue:z}=t,{useSyncExternalStoreWithSelector:G}=V;let H=!1;const W=e=>e;const X=e=>{"production"!==(import.meta.env?import.meta.env.MODE:void 0)&&"function"!=typeof e&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t="function"==typeof e?E(e):e,n=(e,n)=>function(e,t=W,n){"production"!==(import.meta.env?import.meta.env.MODE:void 0)&&n&&!H&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),H=!0);const r=G(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return z(r),r}(t,e,n);return Object.assign(n,t),n},Z=e=>e?X(e):X;function $(e){return"[object Object]"===Object.prototype.toString.call(e)}function Y(e,t){if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e.constructor!==t.constructor)return!1;if(e.constructor===Object||e.constructor===Array){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n){if(!r.includes(o))return!1;if(!Y(e[o],t[o]))return!1}}return!(e instanceof Date&&t instanceof Date)||e.getTime()===t.getTime()}const U=(e,t)=>{let n=!1;if(!$(e))throw new Error("Target must be a plain object");if(!$(t))throw new Error("Source must be a plain object");const r={...e};return Object.keys(t).forEach((o=>{const i=t[o],a=e[o];if($(i)&&$(a)){const{new_obj:e,change:t}=U(a,i);t&&(n=!0,r[o]=e)}else Y(a,i)||(n=!0,r[o]=i)})),{new_obj:r,change:n}},J=(e,t)=>{let n=!1;if(!$(e))throw new Error("Target must be a plain object");if(!$(t))throw new Error("Source must be a plain object");const r={...e};return Object.keys(t).forEach((o=>{const i=t[o],a=e[o];if(void 0!==a||void 0!==i){if(void 0===a)return n=!0,void(r[o]=i);if($(i)&&$(a)){const{new_obj:e,change:t}=J(a,i);t&&(n=!0,r[o]=e)}}})),{new_obj:r,change:n}},K={id:"dummy",name:"dummy",node:"dummy",full_id:"dummy",type:"any",value:void 0,is_input:!1,connected:!1,does_trigger:!0,fullvalue:void 0,try_get_full_value:void 0,render_options:{set_default:!0,type:"any"},set_hidden:void 0,hidden:!1},Q=e=>{if(!e.id)throw new Error("IO must have an id but is missing for "+JSON.stringify(e));void 0===e.name&&(e.name=e.id);const{new_obj:t}=J(e,K);return"any"!==t.render_options.type&&void 0!==t.render_options.type||(t.render_options.type=t.type),t},q={id:"dummy",node_name:"dummy",frontend:{pos:[NaN,NaN],size:[200,100],collapsed:!1},io:{},name:"dummy",in_trigger:!1,io_order:[],progress:{ascii:!1,elapsed:0,initial:0,n:0,prefix:"idle",unit:"it",unit_divisor:1e3,unit_scale:!1}},ee=JSON.stringify(q),te=e=>{if(!e.id)throw new Error("Node must have an id");const t=JSON.parse(ee),{new_obj:n}=J(e,t);for(const e in n.io){if(void 0===n.io[e])continue;const t=Q(n.io[e]);n.io[e]=t}return n},ne=e=>{if(void 0===e.io&&(e.io={}),void 0===e.io_order)if(Array.isArray(e.io)){e.io_order=e.io.map((e=>e.id));const t={};for(const n of e.io)t[n.id]=n;e.io=t}else e.io_order=Object.keys(e.io);else if(Array.isArray(e.io)){const t={};for(const n of e.io)t[n.id]=n,e.io_order.includes(n.id)||e.io_order.push(n.id);e.io=t}else for(const t in e.io)e.io_order.includes(t)||e.io_order.push(t);return e};function re(e){if("string"==typeof e||"number"==typeof e)return""+e;let t="";if(Array.isArray(e))for(let n,r=0;r<e.length;r++)""!==(n=re(e[r]))&&(t+=(t&&" ")+n);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}const{useDebugValue:oe}=t,{useSyncExternalStoreWithSelector:ie}=V,ae=e=>e;function se(e,t=ae,n){const r=ie(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return oe(r),r}const le=(e,t)=>{const n=E(e),r=(e,r=t)=>se(n,e,r);return Object.assign(r,n),r};function ce(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[n,r]of e)if(!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))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}var ue={value:()=>{}};function de(){for(var e,t=0,n=arguments.length,r={};t<n;++t){if(!(e=arguments[t]+"")||e in r||/[\s.]/.test(e))throw new Error("illegal type: "+e);r[e]=[]}return new pe(r)}function pe(e){this._=e}function fe(e,t){for(var n,r=0,o=e.length;r<o;++r)if((n=e[r]).name===t)return n.value}function he(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=ue,e=e.slice(0,r).concat(e.slice(r+1));break}return null!=n&&e.push({name:t,value:n}),e}pe.prototype=de.prototype={constructor:pe,on:function(e,t){var n,r=this._,o=function(e,t){return e.trim().split(/^|\s+/).map((function(e){var n="",r=e.indexOf(".");if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}}))}(e+"",r),i=-1,a=o.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++i<a;)if(n=(e=o[i]).type)r[n]=he(r[n],e.name,t);else if(null==t)for(n in r)r[n]=he(r[n],e.name,null);return this}for(;++i<a;)if((n=(e=o[i]).type)&&(n=fe(r[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new pe(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,o=new Array(n),i=0;i<n;++i)o[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=0,n=(r=this._[e]).length;i<n;++i)r[i].value.apply(t,o)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],o=0,i=r.length;o<i;++o)r[o].value.apply(t,n)}};var me="http://www.w3.org/1999/xhtml",ge={svg:"http://www.w3.org/2000/svg",xhtml:me,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ye(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),ge.hasOwnProperty(t)?{space:ge[t],local:e}:e}function be(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===me&&t.documentElement.namespaceURI===me?t.createElement(e):t.createElementNS(n,e)}}function ve(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function we(e){var t=ye(e);return(t.local?ve:be)(t)}function xe(){}function Ce(e){return null==e?xe:function(){return this.querySelector(e)}}function ke(){return[]}function Ee(e){return null==e?ke:function(){return this.querySelectorAll(e)}}function Se(e){return function(){return null==(t=e.apply(this,arguments))?[]:Array.isArray(t)?t:Array.from(t);var t}}function Ie(e){return function(){return this.matches(e)}}function _e(e){return function(t){return t.matches(e)}}var Ae=Array.prototype.find;function Ne(){return this.firstElementChild}var Oe=Array.prototype.filter;function Re(){return Array.from(this.children)}function Te(e){return new Array(e.length)}function Me(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function Pe(e,t,n,r,o,i){for(var a,s=0,l=t.length,c=i.length;s<c;++s)(a=t[s])?(a.__data__=i[s],r[s]=a):n[s]=new Me(e,i[s]);for(;s<l;++s)(a=t[s])&&(o[s]=a)}function De(e,t,n,r,o,i,a){var s,l,c,u=new Map,d=t.length,p=i.length,f=new Array(d);for(s=0;s<d;++s)(l=t[s])&&(f[s]=c=a.call(l,l.__data__,s,t)+"",u.has(c)?o[s]=l:u.set(c,l));for(s=0;s<p;++s)c=a.call(e,i[s],s,i)+"",(l=u.get(c))?(r[s]=l,l.__data__=i[s],u.delete(c)):n[s]=new Me(e,i[s]);for(s=0;s<d;++s)(l=t[s])&&u.get(f[s])===l&&(o[s]=l)}function Be(e){return e.__data__}function je(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function Le(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Fe(e){return function(){this.removeAttribute(e)}}function Ve(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ze(e,t){return function(){this.setAttribute(e,t)}}function Ge(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function He(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function We(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Xe(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Ze(e){return function(){this.style.removeProperty(e)}}function $e(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Ye(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Ue(e,t){return e.style.getPropertyValue(t)||Xe(e).getComputedStyle(e,null).getPropertyValue(t)}function Je(e){return function(){delete this[e]}}function Ke(e,t){return function(){this[e]=t}}function Qe(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function qe(e){return e.trim().split(/^|\s+/)}function et(e){return e.classList||new tt(e)}function tt(e){this._node=e,this._names=qe(e.getAttribute("class")||"")}function nt(e,t){for(var n=et(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function rt(e,t){for(var n=et(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function ot(e){return function(){nt(this,e)}}function it(e){return function(){rt(this,e)}}function at(e,t){return function(){(t.apply(this,arguments)?nt:rt)(this,e)}}function st(){this.textContent=""}function lt(e){return function(){this.textContent=e}}function ct(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function ut(){this.innerHTML=""}function dt(e){return function(){this.innerHTML=e}}function pt(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function ft(){this.nextSibling&&this.parentNode.appendChild(this)}function ht(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function mt(){return null}function gt(){var e=this.parentNode;e&&e.removeChild(this)}function yt(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function bt(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function vt(e){return function(){var t=this.__on;if(t){for(var n,r=0,o=-1,i=t.length;r<i;++r)n=t[r],e.type&&n.type!==e.type||n.name!==e.name?t[++o]=n:this.removeEventListener(n.type,n.listener,n.options);++o?t.length=o:delete this.__on}}}function wt(e,t,n){return function(){var r,o=this.__on,i=function(e){return function(t){e.call(this,t,this.__data__)}}(t);if(o)for(var a=0,s=o.length;a<s;++a)if((r=o[a]).type===e.type&&r.name===e.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=i,r.options=n),void(r.value=t);this.addEventListener(e.type,i,n),r={type:e.type,name:e.name,value:t,listener:i,options:n},o?o.push(r):this.__on=[r]}}function xt(e,t,n){var r=Xe(e),o=r.CustomEvent;"function"==typeof o?o=new o(t,n):(o=r.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function Ct(e,t){return function(){return xt(this,e,t)}}function kt(e,t){return function(){return xt(this,e,t.apply(this,arguments))}}Me.prototype={constructor:Me,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)}},tt.prototype={add:function(e){this._names.indexOf(e)<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}};var Et=[null];function St(e,t){this._groups=e,this._parents=t}function It(){return new St([[document.documentElement]],Et)}function _t(e){return"string"==typeof e?new St([[document.querySelector(e)]],[document.documentElement]):new St([[e]],Et)}function At(e,t){if(e=function(e){let t;for(;t=e.sourceEvent;)e=t;return e}(e),void 0===t&&(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())).x,r.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}St.prototype=It.prototype={constructor:St,select:function(e){"function"!=typeof e&&(e=Ce(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i,a,s=t[o],l=s.length,c=r[o]=new Array(l),u=0;u<l;++u)(i=s[u])&&(a=e.call(i,i.__data__,u,s))&&("__data__"in i&&(a.__data__=i.__data__),c[u]=a);return new St(r,this._parents)},selectAll:function(e){e="function"==typeof e?Se(e):Ee(e);for(var t=this._groups,n=t.length,r=[],o=[],i=0;i<n;++i)for(var a,s=t[i],l=s.length,c=0;c<l;++c)(a=s[c])&&(r.push(e.call(a,a.__data__,c,s)),o.push(a));return new St(r,o)},selectChild:function(e){return this.select(null==e?Ne:function(e){return function(){return Ae.call(this.children,e)}}("function"==typeof e?e:_e(e)))},selectChildren:function(e){return this.selectAll(null==e?Re:function(e){return function(){return Oe.call(this.children,e)}}("function"==typeof e?e:_e(e)))},filter:function(e){"function"!=typeof e&&(e=Ie(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i,a=t[o],s=a.length,l=r[o]=[],c=0;c<s;++c)(i=a[c])&&e.call(i,i.__data__,c,a)&&l.push(i);return new St(r,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,Be);var n,r=t?De:Pe,o=this._parents,i=this._groups;"function"!=typeof e&&(n=e,e=function(){return n});for(var a=i.length,s=new Array(a),l=new Array(a),c=new Array(a),u=0;u<a;++u){var d=o[u],p=i[u],f=p.length,h=je(e.call(d,d&&d.__data__,u,o)),m=h.length,g=l[u]=new Array(m),y=s[u]=new Array(m);r(d,p,g,y,c[u]=new Array(f),h,t);for(var b,v,w=0,x=0;w<m;++w)if(b=g[w]){for(w>=x&&(x=w+1);!(v=y[x])&&++x<m;);b._next=v||null}}return(s=new St(s,o))._enter=l,s._exit=c,s},enter:function(){return new St(this._enter||this._groups.map(Te),this._parents)},exit:function(){return new St(this._exit||this._groups.map(Te),this._parents)},join:function(e,t,n){var r=this.enter(),o=this,i=this.exit();return"function"==typeof e?(r=e(r))&&(r=r.selection()):r=r.append(e+""),null!=t&&(o=t(o))&&(o=o.selection()),null==n?i.remove():n(i),r&&o?r.merge(o).order():o},merge:function(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,o=n.length,i=r.length,a=Math.min(o,i),s=new Array(o),l=0;l<a;++l)for(var c,u=n[l],d=r[l],p=u.length,f=s[l]=new Array(p),h=0;h<p;++h)(c=u[h]||d[h])&&(f[h]=c);for(;l<o;++l)s[l]=n[l];return new St(s,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r,o=e[t],i=o.length-1,a=o[i];--i>=0;)(r=o[i])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=Le);for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var a,s=n[i],l=s.length,c=o[i]=new Array(l),u=0;u<l;++u)(a=s[u])&&(c[u]=a);c.sort(t)}return new St(o,this._parents).order()},call:function(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,i=r.length;o<i;++o){var a=r[o];if(a)return a}return null},size:function(){let e=0;for(const t of this)++e;return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o,i=t[n],a=0,s=i.length;a<s;++a)(o=i[a])&&e.call(o,o.__data__,a,i);return this},attr:function(e,t){var n=ye(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==t?n.local?Ve:Fe:"function"==typeof t?n.local?We:He:n.local?Ge:ze)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?Ze:"function"==typeof t?Ye:$e)(e,t,null==n?"":n)):Ue(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?Je:"function"==typeof t?Qe:Ke)(e,t)):this.node()[e]},classed:function(e,t){var n=qe(e+"");if(arguments.length<2){for(var r=et(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each(("function"==typeof t?at:t?ot:it)(n,t))},text:function(e){return arguments.length?this.each(null==e?st:("function"==typeof e?ct:lt)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?ut:("function"==typeof e?pt:dt)(e)):this.node().innerHTML},raise:function(){return this.each(ft)},lower:function(){return this.each(ht)},append:function(e){var t="function"==typeof e?e:we(e);return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var n="function"==typeof e?e:we(e),r=null==t?mt:"function"==typeof t?t:Ce(t);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(gt)},clone:function(e){return this.select(e?bt:yt)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var r,o,i=function(e){return e.trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}))}(e+""),a=i.length;if(!(arguments.length<2)){for(s=t?wt:vt,r=0;r<a;++r)this.each(s(i[r],t,n));return this}var s=this.node().__on;if(s)for(var l,c=0,u=s.length;c<u;++c)for(r=0,l=s[c];r<a;++r)if((o=i[r]).type===l.type&&o.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"==typeof t?kt:Ct)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r,o=e[t],i=0,a=o.length;i<a;++i)(r=o[i])&&(yield r)}};const Nt={passive:!1},Ot={capture:!0,passive:!1};function Rt(e){e.stopImmediatePropagation()}function Tt(e){e.preventDefault(),e.stopImmediatePropagation()}function Mt(e){var t=e.document.documentElement,n=_t(e).on("dragstart.drag",Tt,Ot);"onselectstart"in t?n.on("selectstart.drag",Tt,Ot):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Pt(e,t){var n=e.document.documentElement,r=_t(e).on("dragstart.drag",null);t&&(r.on("click.drag",Tt,Ot),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var Dt=e=>()=>e;function Bt(e,{sourceEvent:t,subject:n,target:r,identifier:o,active:i,x:a,y:s,dx:l,dy:c,dispatch:u}){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:o,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:u}})}function jt(e){return!e.ctrlKey&&!e.button}function Lt(){return this.parentNode}function Ft(e,t){return null==t?{x:e.x,y:e.y}:t}function Vt(){return navigator.maxTouchPoints||"ontouchstart"in this}function zt(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Gt(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Ht(){}Bt.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};var Wt=.7,Xt=1/Wt,Zt="\\s*([+-]?\\d+)\\s*",$t="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Yt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ut=/^#([0-9a-f]{3,8})$/,Jt=new RegExp(`^rgb\\(${Zt},${Zt},${Zt}\\)$`),Kt=new RegExp(`^rgb\\(${Yt},${Yt},${Yt}\\)$`),Qt=new RegExp(`^rgba\\(${Zt},${Zt},${Zt},${$t}\\)$`),qt=new RegExp(`^rgba\\(${Yt},${Yt},${Yt},${$t}\\)$`),en=new RegExp(`^hsl\\(${$t},${Yt},${Yt}\\)$`),tn=new RegExp(`^hsla\\(${$t},${Yt},${Yt},${$t}\\)$`),nn={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};function rn(){return this.rgb().formatHex()}function on(){return this.rgb().formatRgb()}function an(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Ut.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?sn(t):3===n?new un(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?ln(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?ln(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Jt.exec(e))?new un(t[1],t[2],t[3],1):(t=Kt.exec(e))?new un(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Qt.exec(e))?ln(t[1],t[2],t[3],t[4]):(t=qt.exec(e))?ln(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=en.exec(e))?gn(t[1],t[2]/100,t[3]/100,1):(t=tn.exec(e))?gn(t[1],t[2]/100,t[3]/100,t[4]):nn.hasOwnProperty(e)?sn(nn[e]):"transparent"===e?new un(NaN,NaN,NaN,0):null}function sn(e){return new un(e>>16&255,e>>8&255,255&e,1)}function ln(e,t,n,r){return r<=0&&(e=t=n=NaN),new un(e,t,n,r)}function cn(e,t,n,r){return 1===arguments.length?((o=e)instanceof Ht||(o=an(o)),o?new un((o=o.rgb()).r,o.g,o.b,o.opacity):new un):new un(e,t,n,null==r?1:r);var o}function un(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function dn(){return`#${mn(this.r)}${mn(this.g)}${mn(this.b)}`}function pn(){const e=fn(this.opacity);return`${1===e?"rgb(":"rgba("}${hn(this.r)}, ${hn(this.g)}, ${hn(this.b)}${1===e?")":`, ${e})`}`}function fn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function hn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function mn(e){return((e=hn(e))<16?"0":"")+e.toString(16)}function gn(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new bn(e,t,n,r)}function yn(e){if(e instanceof bn)return new bn(e.h,e.s,e.l,e.opacity);if(e instanceof Ht||(e=an(e)),!e)return new bn;if(e instanceof bn)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new bn(a,s,l,e.opacity)}function bn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function vn(e){return(e=(e||0)%360)<0?e+360:e}function wn(e){return Math.max(0,Math.min(1,e||0))}function xn(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}zt(Ht,an,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:rn,formatHex:rn,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return yn(this).formatHsl()},formatRgb:on,toString:on}),zt(un,cn,Gt(Ht,{brighter(e){return e=null==e?Xt:Math.pow(Xt,e),new un(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Wt:Math.pow(Wt,e),new un(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new un(hn(this.r),hn(this.g),hn(this.b),fn(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:dn,formatHex:dn,formatHex8:function(){return`#${mn(this.r)}${mn(this.g)}${mn(this.b)}${mn(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:pn,toString:pn})),zt(bn,(function(e,t,n,r){return 1===arguments.length?yn(e):new bn(e,t,n,null==r?1:r)}),Gt(Ht,{brighter(e){return e=null==e?Xt:Math.pow(Xt,e),new bn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Wt:Math.pow(Wt,e),new bn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new un(xn(e>=240?e-240:e+120,o,r),xn(e,o,r),xn(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new bn(vn(this.h),wn(this.s),wn(this.l),fn(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=fn(this.opacity);return`${1===e?"hsl(":"hsla("}${vn(this.h)}, ${100*wn(this.s)}%, ${100*wn(this.l)}%${1===e?")":`, ${e})`}`}}));var Cn=e=>()=>e;function kn(e){return 1==(e=+e)?En:function(t,n){return n-t?function(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)}}(t,n,e):Cn(isNaN(t)?n:t)}}function En(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Cn(isNaN(e)?t:e)}var Sn=function e(t){var n=kn(t);function r(e,t){var r=n((e=cn(e)).r,(t=cn(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=En(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function In(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var _n=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,An=new RegExp(_n.source,"g");function Nn(e,t){var n,r,o,i=_n.lastIndex=An.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=_n.exec(e))&&(r=An.exec(t));)(o=r.index)>i&&(o=t.slice(i,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:In(n,r)})),i=An.lastIndex;return i<t.length&&(o=t.slice(i),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}var On,Rn=180/Math.PI,Tn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Mn(e,t,n,r,o,i){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),e*r<t*n&&(e=-e,t=-t,l=-l,a=-a),{translateX:o,translateY:i,rotate:Math.atan2(t,e)*Rn,skewX:Math.atan(l)*Rn,scaleX:a,scaleY:s}}function Pn(e,t,n,r){function o(e){return e.length?e.pop()+" ":""}return function(i,a){var s=[],l=[];return i=e(i),a=e(a),function(e,r,o,i,a,s){if(e!==o||r!==i){var l=a.push("translate(",null,t,null,n);s.push({i:l-4,x:In(e,o)},{i:l-2,x:In(r,i)})}else(o||i)&&a.push("translate("+o+t+i+n)}(i.translateX,i.translateY,a.translateX,a.translateY,s,l),function(e,t,n,i){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),i.push({i:n.push(o(n)+"rotate(",null,r)-2,x:In(e,t)})):t&&n.push(o(n)+"rotate("+t+r)}(i.rotate,a.rotate,s,l),function(e,t,n,i){e!==t?i.push({i:n.push(o(n)+"skewX(",null,r)-2,x:In(e,t)}):t&&n.push(o(n)+"skewX("+t+r)}(i.skewX,a.skewX,s,l),function(e,t,n,r,i,a){if(e!==n||t!==r){var s=i.push(o(i)+"scale(",null,",",null,")");a.push({i:s-4,x:In(e,n)},{i:s-2,x:In(t,r)})}else 1===n&&1===r||i.push(o(i)+"scale("+n+","+r+")")}(i.scaleX,i.scaleY,a.scaleX,a.scaleY,s,l),i=a=null,function(e){for(var t,n=-1,r=l.length;++n<r;)s[(t=l[n]).i]=t.x(e);return s.join("")}}}var Dn=Pn((function(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Tn:Mn(t.a,t.b,t.c,t.d,t.e,t.f)}),"px, ","px)","deg)"),Bn=Pn((function(e){return null==e?Tn:(On||(On=document.createElementNS("http://www.w3.org/2000/svg","g")),On.setAttribute("transform",e),(e=On.transform.baseVal.consolidate())?Mn((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):Tn)}),", ",")",")");function jn(e){return((e=Math.exp(e))+1/e)/2}var Ln,Fn,Vn=function e(t,n,r){function o(e,o){var i,a,s=e[0],l=e[1],c=e[2],u=o[0],d=o[1],p=o[2],f=u-s,h=d-l,m=f*f+h*h;if(m<1e-12)a=Math.log(p/c)/t,i=function(e){return[s+e*f,l+e*h,c*Math.exp(t*e*a)]};else{var g=Math.sqrt(m),y=(p*p-c*c+r*m)/(2*c*n*g),b=(p*p-c*c-r*m)/(2*p*n*g),v=Math.log(Math.sqrt(y*y+1)-y),w=Math.log(Math.sqrt(b*b+1)-b);a=(w-v)/t,i=function(e){var r,o=e*a,i=jn(v),u=c/(n*g)*(i*(r=t*o+v,((r=Math.exp(2*r))-1)/(r+1))-function(e){return((e=Math.exp(e))-1/e)/2}(v));return[s+u*f,l+u*h,c*i/jn(t*o+v)]}}return i.duration=1e3*a*t/Math.SQRT2,i}return o.rho=function(t){var n=Math.max(.001,+t),r=n*n;return e(n,r,r*r)},o}(Math.SQRT2,2,4),zn=0,Gn=0,Hn=0,Wn=0,Xn=0,Zn=0,$n="object"==typeof performance&&performance.now?performance:Date,Yn="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Un(){return Xn||(Yn(Jn),Xn=$n.now()+Zn)}function Jn(){Xn=0}function Kn(){this._call=this._time=this._next=null}function Qn(e,t,n){var r=new Kn;return r.restart(e,t,n),r}function qn(){Xn=(Wn=$n.now())+Zn,zn=Gn=0;try{!function(){Un(),++zn;for(var e,t=Ln;t;)(e=Xn-t._time)>=0&&t._call.call(void 0,e),t=t._next;--zn}()}finally{zn=0,function(){var e,t,n=Ln,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:Ln=t);Fn=e,tr(r)}(),Xn=0}}function er(){var e=$n.now(),t=e-Wn;t>1e3&&(Zn-=t,Wn=e)}function tr(e){zn||(Gn&&(Gn=clearTimeout(Gn)),e-Xn>24?(e<1/0&&(Gn=setTimeout(qn,e-$n.now()-Zn)),Hn&&(Hn=clearInterval(Hn))):(Hn||(Wn=$n.now(),Hn=setInterval(er,1e3)),zn=1,Yn(qn)))}function nr(e,t,n){var r=new Kn;return t=null==t?0:+t,r.restart((n=>{r.stop(),e(n+t)}),t,n),r}Kn.prototype=Qn.prototype={constructor:Kn,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?Un():+n)+(null==t?0:+t),this._next||Fn===this||(Fn?Fn._next=this:Ln=this,Fn=this),this._call=e,this._time=n,tr()},stop:function(){this._call&&(this._call=null,this._time=1/0,tr())}};var rr=de("start","end","cancel","interrupt"),or=[];function ir(e,t,n,r,o,i){var a=e.__transition;if(a){if(n in a)return}else e.__transition={};!function(e,t,n){var r,o=e.__transition;function i(e){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=e&&a(e-n.delay)}function a(i){var c,u,d,p;if(1!==n.state)return l();for(c in o)if((p=o[c]).name===n.name){if(3===p.state)return nr(a);4===p.state?(p.state=6,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete o[c]):+c<t&&(p.state=6,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete o[c])}if(nr((function(){3===n.state&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(i))})),n.state=2,n.on.call("start",e,e.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(d=n.tween.length),c=0,u=-1;c<d;++c)(p=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(r[++u]=p);r.length=u+1}}function s(t){for(var o=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(l),n.state=5,1),i=-1,a=r.length;++i<a;)r[i].call(e,o);5===n.state&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){for(var r in n.state=6,n.timer.stop(),delete o[t],o)return;delete e.__transition}o[t]=n,n.timer=Qn(i,0,n.time)}(e,n,{name:t,index:r,group:o,on:rr,tween:or,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:0})}function ar(e,t){var n=lr(e,t);if(n.state>0)throw new Error("too late; already scheduled");return n}function sr(e,t){var n=lr(e,t);if(n.state>3)throw new Error("too late; already running");return n}function lr(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function cr(e,t){var n,r,o,i=e.__transition,a=!0;if(i){for(o in t=null==t?null:t+"",i)(n=i[o]).name===t?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete i[o]):a=!1;a&&delete e.__transition}}function ur(e,t){var n,r;return function(){var o=sr(this,e),i=o.tween;if(i!==n)for(var a=0,s=(r=n=i).length;a<s;++a)if(r[a].name===t){(r=r.slice()).splice(a,1);break}o.tween=r}}function dr(e,t,n){var r,o;if("function"!=typeof n)throw new Error;return function(){var i=sr(this,e),a=i.tween;if(a!==r){o=(r=a).slice();for(var s={name:t,value:n},l=0,c=o.length;l<c;++l)if(o[l].name===t){o[l]=s;break}l===c&&o.push(s)}i.tween=o}}function pr(e,t,n){var r=e._id;return e.each((function(){var e=sr(this,r);(e.value||(e.value={}))[t]=n.apply(this,arguments)})),function(e){return lr(e,r).value[t]}}function fr(e,t){var n;return("number"==typeof t?In:t instanceof an?Sn:(n=an(t))?(t=n,Sn):Nn)(e,t)}function hr(e){return function(){this.removeAttribute(e)}}function mr(e){return function(){this.removeAttributeNS(e.space,e.local)}}function gr(e,t,n){var r,o,i=n+"";return function(){var a=this.getAttribute(e);return a===i?null:a===r?o:o=t(r=a,n)}}function yr(e,t,n){var r,o,i=n+"";return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===r?o:o=t(r=a,n)}}function br(e,t,n){var r,o,i;return function(){var a,s,l=n(this);if(null!=l)return(a=this.getAttribute(e))===(s=l+"")?null:a===r&&s===o?i:(o=s,i=t(r=a,l));this.removeAttribute(e)}}function vr(e,t,n){var r,o,i;return function(){var a,s,l=n(this);if(null!=l)return(a=this.getAttributeNS(e.space,e.local))===(s=l+"")?null:a===r&&s===o?i:(o=s,i=t(r=a,l));this.removeAttributeNS(e.space,e.local)}}function wr(e,t){var n,r;function o(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&function(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}(e,o)),n}return o._value=t,o}function xr(e,t){var n,r;function o(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&function(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}(e,o)),n}return o._value=t,o}function Cr(e,t){return function(){ar(this,e).delay=+t.apply(this,arguments)}}function kr(e,t){return t=+t,function(){ar(this,e).delay=t}}function Er(e,t){return function(){sr(this,e).duration=+t.apply(this,arguments)}}function Sr(e,t){return t=+t,function(){sr(this,e).duration=t}}var Ir=It.prototype.constructor;function _r(e){return function(){this.style.removeProperty(e)}}var Ar=0;function Nr(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Or(){return++Ar}var Rr=It.prototype;Nr.prototype={constructor:Nr,select:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=Ce(e));for(var r=this._groups,o=r.length,i=new Array(o),a=0;a<o;++a)for(var s,l,c=r[a],u=c.length,d=i[a]=new Array(u),p=0;p<u;++p)(s=c[p])&&(l=e.call(s,s.__data__,p,c))&&("__data__"in s&&(l.__data__=s.__data__),d[p]=l,ir(d[p],t,n,p,d,lr(s,n)));return new Nr(i,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=Ee(e));for(var r=this._groups,o=r.length,i=[],a=[],s=0;s<o;++s)for(var l,c=r[s],u=c.length,d=0;d<u;++d)if(l=c[d]){for(var p,f=e.call(l,l.__data__,d,c),h=lr(l,n),m=0,g=f.length;m<g;++m)(p=f[m])&&ir(p,t,n,m,f,h);i.push(f),a.push(l)}return new Nr(i,a,t,n)},selectChild:Rr.selectChild,selectChildren:Rr.selectChildren,filter:function(e){"function"!=typeof e&&(e=Ie(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i,a=t[o],s=a.length,l=r[o]=[],c=0;c<s;++c)(i=a[c])&&e.call(i,i.__data__,c,a)&&l.push(i);return new Nr(r,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,o=n.length,i=Math.min(r,o),a=new Array(r),s=0;s<i;++s)for(var l,c=t[s],u=n[s],d=c.length,p=a[s]=new Array(d),f=0;f<d;++f)(l=c[f]||u[f])&&(p[f]=l);for(;s<r;++s)a[s]=t[s];return new Nr(a,this._parents,this._name,this._id)},selection:function(){return new Ir(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=Or(),r=this._groups,o=r.length,i=0;i<o;++i)for(var a,s=r[i],l=s.length,c=0;c<l;++c)if(a=s[c]){var u=lr(a,t);ir(a,e,n,c,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Nr(r,this._parents,e,n)},call:Rr.call,nodes:Rr.nodes,node:Rr.node,size:Rr.size,empty:Rr.empty,each:Rr.each,on:function(e,t){var n=this._id;return arguments.length<2?lr(this.node(),n).on.on(e):this.each(function(e,t,n){var r,o,i=function(e){return(e+"").trim().split(/^|\s+/).every((function(e){var t=e.indexOf(".");return t>=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?ar:sr;return function(){var a=i(this,e),s=a.on;s!==r&&(o=(r=s).copy()).on(t,n),a.on=o}}(n,e,t))},attr:function(e,t){var n=ye(e),r="transform"===n?Bn:fr;return this.attrTween(e,"function"==typeof t?(n.local?vr:br)(n,r,pr(this,"attr."+e,t)):null==t?(n.local?mr:hr)(n):(n.local?yr:gr)(n,r,t))},attrTween:function(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;var r=ye(e);return this.tween(n,(r.local?wr:xr)(r,t))},style:function(e,t,n){var r="transform"==(e+="")?Dn:fr;return null==t?this.styleTween(e,function(e,t){var n,r,o;return function(){var i=Ue(this,e),a=(this.style.removeProperty(e),Ue(this,e));return i===a?null:i===n&&a===r?o:o=t(n=i,r=a)}}(e,r)).on("end.style."+e,_r(e)):"function"==typeof t?this.styleTween(e,function(e,t,n){var r,o,i;return function(){var a=Ue(this,e),s=n(this),l=s+"";return null==s&&(this.style.removeProperty(e),l=s=Ue(this,e)),a===l?null:a===r&&l===o?i:(o=l,i=t(r=a,s))}}(e,r,pr(this,"style."+e,t))).each(function(e,t){var n,r,o,i,a="style."+t,s="end."+a;return function(){var l=sr(this,e),c=l.on,u=null==l.value[a]?i||(i=_r(t)):void 0;c===n&&o===u||(r=(n=c).copy()).on(s,o=u),l.on=r}}(this._id,e)):this.styleTween(e,function(e,t,n){var r,o,i=n+"";return function(){var a=Ue(this,e);return a===i?null:a===r?o:o=t(r=a,n)}}(e,r,t),n).on("end.style."+e,null)},styleTween:function(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!=typeof t)throw new Error;return this.tween(r,function(e,t,n){var r,o;function i(){var i=t.apply(this,arguments);return i!==o&&(r=(o=i)&&function(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}(e,i,n)),r}return i._value=t,i}(e,t,null==n?"":n))},text:function(e){return this.tween("text","function"==typeof e?function(e){return function(){var t=e(this);this.textContent=null==t?"":t}}(pr(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!=typeof e)throw new Error;return this.tween(t,function(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&function(e){return function(t){this.textContent=e.call(this,t)}}(r)),t}return r._value=e,r}(e))},remove:function(){return this.on("end.remove",function(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}(this._id))},tween:function(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r,o=lr(this.node(),n).tween,i=0,a=o.length;i<a;++i)if((r=o[i]).name===e)return r.value;return null}return this.each((null==t?ur:dr)(n,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?Cr:kr)(t,e)):lr(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?Er:Sr)(t,e)):lr(this.node(),t).duration},ease:function(e){var t=this._id;return arguments.length?this.each(function(e,t){if("function"!=typeof t)throw new Error;return function(){sr(this,e).ease=t}}(t,e)):lr(this.node(),t).ease},easeVarying:function(e){if("function"!=typeof e)throw new Error;return this.each(function(e,t){return function(){var n=t.apply(this,arguments);if("function"!=typeof n)throw new Error;sr(this,e).ease=n}}(this._id,e))},end:function(){var e,t,n=this,r=n._id,o=n.size();return new Promise((function(i,a){var s={value:a},l={value:function(){0==--o&&i()}};n.each((function(){var n=sr(this,r),o=n.on;o!==e&&((t=(e=o).copy())._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),n.on=t})),0===o&&i()}))},[Symbol.iterator]:Rr[Symbol.iterator]};var Tr={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}};function Mr(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}It.prototype.interrupt=function(e){return this.each((function(){cr(this,e)}))},It.prototype.transition=function(e){var t,n;e instanceof Nr?(t=e._id,e=e._name):(t=Or(),(n=Tr).time=Un(),e=null==e?null:e+"");for(var r=this._groups,o=r.length,i=0;i<o;++i)for(var a,s=r[i],l=s.length,c=0;c<l;++c)(a=s[c])&&ir(a,e,t,c,s,n||Mr(a,t));return new Nr(r,this._parents,e,t)};var Pr=e=>()=>e;function Dr(e,{sourceEvent:t,target:n,transform:r,dispatch:o}){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:o}})}function Br(e,t,n){this.k=e,this.x=t,this.y=n}Br.prototype={constructor:Br,scale:function(e){return 1===e?this:new Br(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new Br(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 jr=new Br(1,0,0);function Lr(e){e.stopImmediatePropagation()}function Fr(e){e.preventDefault(),e.stopImmediatePropagation()}function Vr(e){return!(e.ctrlKey&&"wheel"!==e.type||e.button)}function zr(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e).hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).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 Gr(){return this.__zoom||jr}function Hr(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Wr(){return navigator.maxTouchPoints||"ontouchstart"in this}function Xr(e,t,n){var r=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a))}function Zr(){var e,t,n,r=Vr,o=zr,i=Xr,a=Hr,s=Wr,l=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],u=250,d=Vn,p=de("start","zoom","end"),f=0,h=10;function m(e){e.property("__zoom",Gr).on("wheel.zoom",C,{passive:!1}).on("mousedown.zoom",k).on("dblclick.zoom",E).filter(s).on("touchstart.zoom",S).on("touchmove.zoom",I).on("touchend.zoom touchcancel.zoom",_).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(e,t){return(t=Math.max(l[0],Math.min(l[1],t)))===e.k?e:new Br(t,e.x,e.y)}function y(e,t,n){var r=t[0]-n[0]*e.k,o=t[1]-n[1]*e.k;return r===e.x&&o===e.y?e:new Br(e.k,r,o)}function b(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function v(e,t,n,r){e.on("start.zoom",(function(){w(this,arguments).event(r).start()})).on("interrupt.zoom end.zoom",(function(){w(this,arguments).event(r).end()})).tween("zoom",(function(){var e=this,i=arguments,a=w(e,i).event(r),s=o.apply(e,i),l=null==n?b(s):"function"==typeof n?n.apply(e,i):n,c=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),u=e.__zoom,p="function"==typeof t?t.apply(e,i):t,f=d(u.invert(l).concat(c/u.k),p.invert(l).concat(c/p.k));return function(e){if(1===e)e=p;else{var t=f(e),n=c/t[2];e=new Br(n,l[0]-t[0]*n,l[1]-t[1]*n)}a.zoom(null,e)}}))}function w(e,t,n){return!n&&e.__zooming||new x(e,t)}function x(e,t){this.that=e,this.args=t,this.active=0,this.sourceEvent=null,this.extent=o.apply(e,t),this.taps=0}function C(e,...t){if(r.apply(this,arguments)){var n=w(this,t).event(e),o=this.__zoom,s=Math.max(l[0],Math.min(l[1],o.k*Math.pow(2,a.apply(this,arguments)))),u=At(e);if(n.wheel)n.mouse[0][0]===u[0]&&n.mouse[0][1]===u[1]||(n.mouse[1]=o.invert(n.mouse[0]=u)),clearTimeout(n.wheel);else{if(o.k===s)return;n.mouse=[u,o.invert(u)],cr(this),n.start()}Fr(e),n.wheel=setTimeout((function(){n.wheel=null,n.end()}),150),n.zoom("mouse",i(y(g(o,s),n.mouse[0],n.mouse[1]),n.extent,c))}}function k(e,...t){if(!n&&r.apply(this,arguments)){var o=e.currentTarget,a=w(this,t,!0).event(e),s=_t(e.view).on("mousemove.zoom",(function(e){if(Fr(e),!a.moved){var t=e.clientX-u,n=e.clientY-d;a.moved=t*t+n*n>f}a.event(e).zoom("mouse",i(y(a.that.__zoom,a.mouse[0]=At(e,o),a.mouse[1]),a.extent,c))}),!0).on("mouseup.zoom",(function(e){s.on("mousemove.zoom mouseup.zoom",null),Pt(e.view,a.moved),Fr(e),a.event(e).end()}),!0),l=At(e,o),u=e.clientX,d=e.clientY;Mt(e.view),Lr(e),a.mouse=[l,this.__zoom.invert(l)],cr(this),a.start()}}function E(e,...t){if(r.apply(this,arguments)){var n=this.__zoom,a=At(e.changedTouches?e.changedTouches[0]:e,this),s=n.invert(a),l=n.k*(e.shiftKey?.5:2),d=i(y(g(n,l),a,s),o.apply(this,t),c);Fr(e),u>0?_t(this).transition().duration(u).call(v,d,a,e):_t(this).call(m.transform,d,a,e)}}function S(n,...o){if(r.apply(this,arguments)){var i,a,s,l,c=n.touches,u=c.length,d=w(this,o,n.changedTouches.length===u).event(n);for(Lr(n),a=0;a<u;++a)l=[l=At(s=c[a],this),this.__zoom.invert(l),s.identifier],d.touch0?d.touch1||d.touch0[2]===l[2]||(d.touch1=l,d.taps=0):(d.touch0=l,i=!0,d.taps=1+!!e);e&&(e=clearTimeout(e)),i&&(d.taps<2&&(t=l[0],e=setTimeout((function(){e=null}),500)),cr(this),d.start())}}function I(e,...t){if(this.__zooming){var n,r,o,a,s=w(this,t).event(e),l=e.changedTouches,u=l.length;for(Fr(e),n=0;n<u;++n)o=At(r=l[n],this),s.touch0&&s.touch0[2]===r.identifier?s.touch0[0]=o:s.touch1&&s.touch1[2]===r.identifier&&(s.touch1[0]=o);if(r=s.that.__zoom,s.touch1){var d=s.touch0[0],p=s.touch0[1],f=s.touch1[0],h=s.touch1[1],m=(m=f[0]-d[0])*m+(m=f[1]-d[1])*m,b=(b=h[0]-p[0])*b+(b=h[1]-p[1])*b;r=g(r,Math.sqrt(m/b)),o=[(d[0]+f[0])/2,(d[1]+f[1])/2],a=[(p[0]+h[0])/2,(p[1]+h[1])/2]}else{if(!s.touch0)return;o=s.touch0[0],a=s.touch0[1]}s.zoom("touch",i(y(r,o,a),s.extent,c))}}function _(e,...r){if(this.__zooming){var o,i,a=w(this,r).event(e),s=e.changedTouches,l=s.length;for(Lr(e),n&&clearTimeout(n),n=setTimeout((function(){n=null}),500),o=0;o<l;++o)i=s[o],a.touch0&&a.touch0[2]===i.identifier?delete a.touch0:a.touch1&&a.touch1[2]===i.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(),2===a.taps&&(i=At(i,this),Math.hypot(t[0]-i[0],t[1]-i[1])<h)){var c=_t(this).on("dblclick.zoom");c&&c.apply(this,arguments)}}}return m.transform=function(e,t,n,r){var o=e.selection?e.selection():e;o.property("__zoom",Gr),e!==o?v(e,t,n,r):o.interrupt().each((function(){w(this,arguments).event(r).start().zoom(null,"function"==typeof t?t.apply(this,arguments):t).end()}))},m.scaleBy=function(e,t,n,r){m.scaleTo(e,(function(){return this.__zoom.k*("function"==typeof t?t.apply(this,arguments):t)}),n,r)},m.scaleTo=function(e,t,n,r){m.transform(e,(function(){var e=o.apply(this,arguments),r=this.__zoom,a=null==n?b(e):"function"==typeof n?n.apply(this,arguments):n,s=r.invert(a),l="function"==typeof t?t.apply(this,arguments):t;return i(y(g(r,l),a,s),e,c)}),n,r)},m.translateBy=function(e,t,n,r){m.transform(e,(function(){return i(this.__zoom.translate("function"==typeof t?t.apply(this,arguments):t,"function"==typeof n?n.apply(this,arguments):n),o.apply(this,arguments),c)}),null,r)},m.translateTo=function(e,t,n,r,a){m.transform(e,(function(){var e=o.apply(this,arguments),a=this.__zoom,s=null==r?b(e):"function"==typeof r?r.apply(this,arguments):r;return i(jr.translate(s[0],s[1]).scale(a.k).translate("function"==typeof t?-t.apply(this,arguments):-t,"function"==typeof n?-n.apply(this,arguments):-n),e,c)}),r,a)},x.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(e,t){return this.mouse&&"mouse"!==e&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&"touch"!==e&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&"touch"!==e&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(e){var t=_t(this.that).datum();p.call(e,this.that,new Dr(e,{sourceEvent:this.sourceEvent,target:m,transform:this.that.__zoom,dispatch:p}),t)}},m.wheelDelta=function(e){return arguments.length?(a="function"==typeof e?e:Pr(+e),m):a},m.filter=function(e){return arguments.length?(r="function"==typeof e?e:Pr(!!e),m):r},m.touchable=function(e){return arguments.length?(s="function"==typeof e?e:Pr(!!e),m):s},m.extent=function(e){return arguments.length?(o="function"==typeof e?e:Pr([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),m):o},m.scaleExtent=function(e){return arguments.length?(l[0]=+e[0],l[1]=+e[1],m):[l[0],l[1]]},m.translateExtent=function(e){return arguments.length?(c[0][0]=+e[0][0],c[1][0]=+e[1][0],c[0][1]=+e[0][1],c[1][1]=+e[1][1],m):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},m.constrain=function(e){return arguments.length?(i=e,m):i},m.duration=function(e){return arguments.length?(u=+e,m):u},m.interpolate=function(e){return arguments.length?(d=e,m):d},m.on=function(){var e=p.on.apply(p,arguments);return e===p?m:e},m.clickDistance=function(e){return arguments.length?(f=(e=+e)*e,m):Math.sqrt(f)},m.tapDistance=function(e){return arguments.length?(h=+e,m):h},m}Br.prototype;const $r=i(null),Yr=$r.Provider,Ur=()=>"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.",Jr=e=>`Node type "${e}" not found. Using fallback type "default".`,Kr=()=>"The React Flow parent container needs a width and a height to render the graph.",Qr=()=>"Only child nodes can use a parent extent.",qr=()=>"Can't create edge. An edge needs a source and a target.",eo=e=>`Marker type "${e}" doesn't exist.`,to=(e,t)=>`Couldn't create edge for ${e?"target":"source"} handle id: "${e?t.targetHandle:t.sourceHandle}", edge id: ${t.id}.`,no=()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",ro=e=>`Edge type "${e}" not found. Using fallback type "default".`,oo=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.`,io=(()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001")();function ao(e,t){const n=o($r);if(null===n)throw new Error(io);return se(n,e,t)}const so=()=>{const e=o($r);if(null===e)throw new Error(io);return a((()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe,destroy:e.destroy})),[e])},lo=e=>e.userSelectionActive?"none":"all";function co({position:e,children:n,className:r,style:o,...i}){const a=ao(lo),s=`${e}`.split("-");return t.createElement("div",{className:re(["react-flow__panel",r,...s]),style:{...o,pointerEvents:a},...i},n)}function uo({proOptions:e,position:n="bottom-right"}){return e?.hideAttribution?null:t.createElement(co,{position:n,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://reactflow.dev/pro"},t.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution"},"React Flow"))}var po=r((({x:e,y:n,label:r,labelStyle:o={},labelShowBg:i=!0,labelBgStyle:a={},labelBgPadding:l=[2,4],labelBgBorderRadius:d=2,children:p,className:f,...h})=>{const m=u(null),[g,y]=c({x:0,y:0,width:0,height:0}),b=re(["react-flow__edge-textwrapper",f]);return s((()=>{if(m.current){const e=m.current.getBBox();y({x:e.x,y:e.y,width:e.width,height:e.height})}}),[r]),void 0!==r&&r?t.createElement("g",{transform:`translate(${e-g.width/2} ${n-g.height/2})`,className:b,visibility:g.width?"visible":"hidden",...h},i&&t.createElement("rect",{width:g.width+2*l[0],x:-l[0],y:-l[1],height:g.height+2*l[1],className:"react-flow__edge-textbg",style:a,rx:d,ry:d}),t.createElement("text",{className:"react-flow__edge-text",y:g.height/2,dy:"0.3em",ref:m,style:o},r),p):null}));const fo=e=>({width:e.offsetWidth,height:e.offsetHeight}),ho=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),mo=(e={x:0,y:0},t)=>({x:ho(e.x,t[0][0],t[1][0]),y:ho(e.y,t[0][1],t[1][1])}),go=(e,t,n)=>e<t?ho(Math.abs(e-t),1,50)/50:e>n?-ho(Math.abs(e-n),1,50)/50:0,yo=(e,t)=>[20*go(e.x,35,t.width-35),20*go(e.y,35,t.height-35)],bo=e=>e.getRootNode?.()||window?.document,vo=(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)}),wo=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),xo=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),Co=e=>({...e.positionAbsolute||{x:0,y:0},width:e.width||0,height:e.height||0}),ko=(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)},Eo=e=>!isNaN(e)&&isFinite(e),So=Symbol.for("internals"),Io=["Enter"," ","Escape"],_o=(e,t)=>{"development"===process.env.NODE_ENV&&console.warn(`[React Flow]: ${t} Help: https://reactflow.dev/error#${e}`)};function Ao(e){const t=(e=>"nativeEvent"in e)(e)?e.nativeEvent:e,n=t.composedPath?.()?.[0]||e.target;return["INPUT","SELECT","TEXTAREA"].includes(n?.nodeName)||n?.hasAttribute("contenteditable")||!!n?.closest(".nokey")}const No=e=>"clientX"in e,Oo=(e,t)=>{const n=No(e),r=n?e.clientX:e.touches?.[0].clientX,o=n?e.clientY:e.touches?.[0].clientY;return{x:r-(t?.left??0),y:o-(t?.top??0)}},Ro=()=>"undefined"!=typeof navigator&&navigator?.userAgent?.indexOf("Mac")>=0,To=({id:e,path:n,labelX:r,labelY:o,label:i,labelStyle:a,labelShowBg:s,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:u,style:d,markerEnd:p,markerStart:f,interactionWidth:h=20})=>t.createElement(t.Fragment,null,t.createElement("path",{id:e,style:d,d:n,fill:"none",className:"react-flow__edge-path",markerEnd:p,markerStart:f}),h&&t.createElement("path",{d:n,fill:"none",strokeOpacity:0,strokeWidth:h,className:"react-flow__edge-interaction"}),i&&Eo(r)&&Eo(o)?t.createElement(po,{x:r,y:o,label:i,labelStyle:a,labelShowBg:s,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:u}):null);function Mo(e,t,n){return void 0===n?n:r=>{const o=t().edges.find((t=>t.id===e));o&&n(r,{...o})}}function Po({sourceX:e,sourceY:t,targetX:n,targetY:r}){const o=Math.abs(n-e)/2,i=n<e?n+o:n-o,a=Math.abs(r-t)/2;return[i,r<t?r+a:r-a,o,a]}function Do({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:o,sourceControlY:i,targetControlX:a,targetControlY:s}){const l=.125*e+.375*o+.375*a+.125*n,c=.125*t+.375*i+.375*s+.125*r;return[l,c,Math.abs(l-e),Math.abs(c-t)]}var Bo,jo,Lo,Fo,Vo,zo;function Go({pos:e,x1:t,y1:n,x2:r,y2:o}){return e===zo.Left||e===zo.Right?[.5*(t+r),n]:[t,.5*(n+o)]}function Ho({sourceX:e,sourceY:t,sourcePosition:n=zo.Bottom,targetX:r,targetY:o,targetPosition:i=zo.Top}){const[a,s]=Go({pos:n,x1:e,y1:t,x2:r,y2:o}),[l,c]=Go({pos:i,x1:r,y1:o,x2:e,y2:t}),[u,d,p,f]=Do({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:a,sourceControlY:s,targetControlX:l,targetControlY:c});return[`M${e},${t} C${a},${s} ${l},${c} ${r},${o}`,u,d,p,f]}To.displayName="BaseEdge",function(e){e.Strict="strict",e.Loose="loose"}(Bo||(Bo={})),function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"}(jo||(jo={})),function(e){e.Partial="partial",e.Full="full"}(Lo||(Lo={})),function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"}(Fo||(Fo={})),function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"}(Vo||(Vo={})),function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"}(zo||(zo={}));const Wo=r((({sourceX:e,sourceY:n,targetX:r,targetY:o,sourcePosition:i=zo.Bottom,targetPosition:a=zo.Top,label:s,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:p,style:f,markerEnd:h,markerStart:m,interactionWidth:g})=>{const[y,b,v]=Ho({sourceX:e,sourceY:n,sourcePosition:i,targetX:r,targetY:o,targetPosition:a});return t.createElement(To,{path:y,labelX:b,labelY:v,label:s,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:p,style:f,markerEnd:h,markerStart:m,interactionWidth:g})}));Wo.displayName="SimpleBezierEdge";const Xo={[zo.Left]:{x:-1,y:0},[zo.Right]:{x:1,y:0},[zo.Top]:{x:0,y:-1},[zo.Bottom]:{x:0,y:1}},Zo=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function $o({source:e,sourcePosition:t=zo.Bottom,target:n,targetPosition:r=zo.Top,center:o,offset:i}){const a=Xo[t],s=Xo[r],l={x:e.x+a.x*i,y:e.y+a.y*i},c={x:n.x+s.x*i,y:n.y+s.y*i},u=(({source:e,sourcePosition:t=zo.Bottom,target:n})=>t===zo.Left||t===zo.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})({source:l,sourcePosition:t,target:c}),d=0!==u.x?"x":"y",p=u[d];let f,h,m=[];const g={x:0,y:0},y={x:0,y:0},[b,v,w,x]=Po({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(a[d]*s[d]==-1){f=o.x??b,h=o.y??v;const e=[{x:f,y:l.y},{x:f,y:c.y}],t=[{x:l.x,y:h},{x:c.x,y:h}];m=a[d]===p?"x"===d?e:t:"x"===d?t:e}else{const o=[{x:l.x,y:c.y}],u=[{x:c.x,y:l.y}];if(m="x"===d?a.x===p?u:o:a.y===p?o:u,t===r){const t=Math.abs(e[d]-n[d]);if(t<=i){const r=Math.min(i-1,i-t);a[d]===p?g[d]=(l[d]>e[d]?-1:1)*r:y[d]=(c[d]>n[d]?-1:1)*r}}if(t!==r){const e="x"===d?"y":"x",t=a[d]===s[e],n=l[e]>c[e],r=l[e]<c[e];(1===a[d]&&(!t&&n||t&&r)||1!==a[d]&&(!t&&r||t&&n))&&(m="x"===d?o:u)}const b={x:l.x+g.x,y:l.y+g.y},v={x:c.x+y.x,y:c.y+y.y};Math.max(Math.abs(b.x-m[0].x),Math.abs(v.x-m[0].x))>=Math.max(Math.abs(b.y-m[0].y),Math.abs(v.y-m[0].y))?(f=(b.x+v.x)/2,h=m[0].y):(f=m[0].x,h=(b.y+v.y)/2)}return[[e,{x:l.x+g.x,y:l.y+g.y},...m,{x:c.x+y.x,y:c.y+y.y},n],f,h,w,x]}function Yo({sourceX:e,sourceY:t,sourcePosition:n=zo.Bottom,targetX:r,targetY:o,targetPosition:i=zo.Top,borderRadius:a=5,centerX:s,centerY:l,offset:c=20}){const[u,d,p,f,h]=$o({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:o},targetPosition:i,center:{x:s,y:l},offset:c}),m=u.reduce(((e,t,n)=>{let r="";return r=n>0&&n<u.length-1?function(e,t,n,r){const o=Math.min(Zo(e,t)/2,Zo(t,n)/2,r),{x:i,y:a}=t;if(e.x===i&&i===n.x||e.y===a&&a===n.y)return`L${i} ${a}`;if(e.y===a)return`L ${i+o*(e.x<n.x?-1:1)},${a}Q ${i},${a} ${i},${a+o*(e.y<n.y?1:-1)}`;const s=e.x<n.x?1:-1;return`L ${i},${a+o*(e.y<n.y?-1:1)}Q ${i},${a} ${i+o*s},${a}`}(u[n-1],t,u[n+1],a):`${0===n?"M":"L"}${t.x} ${t.y}`,e+=r}),"");return[m,d,p,f,h]}const Uo=r((({sourceX:e,sourceY:n,targetX:r,targetY:o,label:i,labelStyle:a,labelShowBg:s,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:u,style:d,sourcePosition:p=zo.Bottom,targetPosition:f=zo.Top,markerEnd:h,markerStart:m,pathOptions:g,interactionWidth:y})=>{const[b,v,w]=Yo({sourceX:e,sourceY:n,sourcePosition:p,targetX:r,targetY:o,targetPosition:f,borderRadius:g?.borderRadius,offset:g?.offset});return t.createElement(To,{path:b,labelX:v,labelY:w,label:i,labelStyle:a,labelShowBg:s,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:u,style:d,markerEnd:h,markerStart:m,interactionWidth:y})}));Uo.displayName="SmoothStepEdge";const Jo=r((e=>t.createElement(Uo,{...e,pathOptions:a((()=>({borderRadius:0,offset:e.pathOptions?.offset})),[e.pathOptions?.offset])})));Jo.displayName="StepEdge";const Ko=r((({sourceX:e,sourceY:n,targetX:r,targetY:o,label:i,labelStyle:a,labelShowBg:s,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:u,style:d,markerEnd:p,markerStart:f,interactionWidth:h})=>{const[m,g,y]=function({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[o,i,a,s]=Po({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,o,i,a,s]}({sourceX:e,sourceY:n,targetX:r,targetY:o});return t.createElement(To,{path:m,labelX:g,labelY:y,label:i,labelStyle:a,labelShowBg:s,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:u,style:d,markerEnd:p,markerStart:f,interactionWidth:h})}));function Qo(e,t){return e>=0?.5*e:25*t*Math.sqrt(-e)}function qo({pos:e,x1:t,y1:n,x2:r,y2:o,c:i}){switch(e){case zo.Left:return[t-Qo(t-r,i),n];case zo.Right:return[t+Qo(r-t,i),n];case zo.Top:return[t,n-Qo(n-o,i)];case zo.Bottom:return[t,n+Qo(o-n,i)]}}function ei({sourceX:e,sourceY:t,sourcePosition:n=zo.Bottom,targetX:r,targetY:o,targetPosition:i=zo.Top,curvature:a=.25}){const[s,l]=qo({pos:n,x1:e,y1:t,x2:r,y2:o,c:a}),[c,u]=qo({pos:i,x1:r,y1:o,x2:e,y2:t,c:a}),[d,p,f,h]=Do({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:s,sourceControlY:l,targetControlX:c,targetControlY:u});return[`M${e},${t} C${s},${l} ${c},${u} ${r},${o}`,d,p,f,h]}Ko.displayName="StraightEdge";const ti=r((({sourceX:e,sourceY:n,targetX:r,targetY:o,sourcePosition:i=zo.Bottom,targetPosition:a=zo.Top,label:s,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:p,style:f,markerEnd:h,markerStart:m,pathOptions:g,interactionWidth:y})=>{const[b,v,w]=ei({sourceX:e,sourceY:n,sourcePosition:i,targetX:r,targetY:o,targetPosition:a,curvature:g?.curvature});return t.createElement(To,{path:b,labelX:v,labelY:w,label:s,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:p,style:f,markerEnd:h,markerStart:m,interactionWidth:y})}));ti.displayName="BezierEdge";const ni=i(null),ri=ni.Provider;ni.Consumer;const oi=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`reactflow__edge-${e}${t||""}-${n}${r||""}`,ii=(e,t)=>{if(void 0===e)return"";if("string"==typeof e)return e;return`${t?`${t}__`:""}${Object.keys(e).sort().map((t=>`${t}=${e[t]}`)).join("&")}`},ai=({x:e,y:t},[n,r,o],i,[a,s])=>{const l={x:(e-n)/o,y:(t-r)/o};return i?{x:a*Math.round(l.x/a),y:s*Math.round(l.y/s)}:l},si=({x:e,y:t},[n,r,o])=>({x:e*o+n,y:t*o+r}),li=(e,t=[0,0])=>{if(!e)return{x:0,y:0,positionAbsolute:{x:0,y:0}};const n=(e.width??0)*t[0],r=(e.height??0)*t[1],o={x:e.position.x-n,y:e.position.y-r};return{...o,positionAbsolute:e.positionAbsolute?{x:e.positionAbsolute.x-n,y:e.positionAbsolute.y-r}:o}},ci=(e,t=[0,0])=>{if(0===e.length)return{x:0,y:0,width:0,height:0};const n=e.reduce(((e,n)=>{const{x:r,y:o}=li(n,t).positionAbsolute;return vo(e,wo({x:r,y:o,width:n.width||0,height:n.height||0}))}),{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return xo(n)},ui=(e,t,[n,r,o]=[0,0,1],i=!1,a=!1,s=[0,0])=>{const l={x:(t.x-n)/o,y:(t.y-r)/o,width:t.width/o,height:t.height/o},c=[];return e.forEach((e=>{const{width:t,height:n,selectable:r=!0,hidden:o=!1}=e;if(a&&!r||o)return!1;const{positionAbsolute:u}=li(e,s),d={x:u.x,y:u.y,width:t||0,height:n||0},p=ko(l,d);(void 0===t||void 0===n||null===t||null===n||i&&p>0||p>=(t||0)*(n||0)||e.dragging)&&c.push(e)})),c},di=(e,t)=>{const n=e.map((e=>e.id));return t.filter((e=>n.includes(e.source)||n.includes(e.target)))},pi=(e,t,n,r,o,i=.1)=>{const a=t/(e.width*(1+i)),s=n/(e.height*(1+i)),l=Math.min(a,s),c=ho(l,r,o);return{x:t/2-(e.x+e.width/2)*c,y:n/2-(e.y+e.height/2)*c,zoom:c}},fi=(e,t=0)=>e.transition().duration(t);function hi(e,t,n,r){return(t[n]||[]).reduce(((t,o)=>(`${e.id}-${o.id}-${n}`!==r&&t.push({id:o.id||null,type:n,nodeId:e.id,x:(e.positionAbsolute?.x??0)+o.x+o.width/2,y:(e.positionAbsolute?.y??0)+o.y+o.height/2}),t)),[])}const mi={source:null,target:null,sourceHandle:null,targetHandle:null},gi=()=>({handleDomNode:null,isValid:!1,connection:mi,endHandle:null});function yi(e,t,n,r,o,i,a){const s="target"===o,l=a.querySelector(`.react-flow__handle[data-id="${e?.nodeId}-${e?.id}-${e?.type}"]`),c={...gi(),handleDomNode:l};if(l){const e=bi(void 0,l),o=l.getAttribute("data-nodeid"),a=l.getAttribute("data-handleid"),u=l.classList.contains("connectable"),d=l.classList.contains("connectableend"),p={source:s?o:n,sourceHandle:s?a:r,target:s?n:o,targetHandle:s?r:a};c.connection=p;u&&d&&(t===Bo.Strict?s&&"source"===e||!s&&"target"===e:o!==n||a!==r)&&(c.endHandle={nodeId:o,handleId:a,type:e},c.isValid=i(p))}return c}function bi(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function vi(e){e?.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function wi(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}function xi({event:e,handleId:t,nodeId:n,onConnect:r,isTarget:o,getState:i,setState:a,isValidConnection:s,edgeUpdaterType:l,onReconnectEnd:c}){const u=bo(e.target),{connectionMode:d,domNode:p,autoPanOnConnect:f,connectionRadius:h,onConnectStart:m,panBy:g,getNodes:y,cancelConnection:b}=i();let v,w=0;const{x:x,y:C}=Oo(e),k=u?.elementFromPoint(x,C),E=bi(l,k),S=p?.getBoundingClientRect();if(!S||!E)return;let I,_=Oo(e,S),A=!1,N=null,O=!1,R=null;const T=function({nodes:e,nodeId:t,handleId:n,handleType:r}){return e.reduce(((e,o)=>{if(o[So]){const{handleBounds:i}=o[So];let a=[],s=[];i&&(a=hi(o,i,"source",`${t}-${n}-${r}`),s=hi(o,i,"target",`${t}-${n}-${r}`)),e.push(...a,...s)}return e}),[])}({nodes:y(),nodeId:n,handleId:t,handleType:E}),M=()=>{if(!f)return;const[e,t]=yo(_,S);g({x:e,y:t}),w=requestAnimationFrame(M)};function P(e){const{transform:r}=i();_=Oo(e,S);const{handle:l,validHandleResult:c}=function(e,t,n,r,o,i){const{x:a,y:s}=Oo(e),l=t.elementsFromPoint(a,s).find((e=>e.classList.contains("react-flow__handle")));if(l){const e=l.getAttribute("data-nodeid");if(e){const t=bi(void 0,l),r=l.getAttribute("data-handleid"),a=i({nodeId:e,id:r,type:t});if(a){const i=o.find((n=>n.nodeId===e&&n.type===t&&n.id===r));return{handle:{id:r,type:t,nodeId:e,x:i?.x||n.x,y:i?.y||n.y},validHandleResult:a}}}}let c=[],u=1/0;if(o.forEach((e=>{const t=Math.sqrt((e.x-n.x)**2+(e.y-n.y)**2);if(t<=r){const n=i(e);t<=u&&(t<u?c=[{handle:e,validHandleResult:n}]:t===u&&c.push({handle:e,validHandleResult:n}),u=t)}})),!c.length)return{handle:null,validHandleResult:gi()};if(1===c.length)return c[0];const d=c.some((({validHandleResult:e})=>e.isValid)),p=c.some((({handle:e})=>"target"===e.type));return c.find((({handle:e,validHandleResult:t})=>p?"target"===e.type:!d||t.isValid))||c[0]}(e,u,ai(_,r,!1,[1,1]),h,T,(e=>yi(e,d,n,t,o?"target":"source",s,u)));if(v=l,A||(M(),A=!0),R=c.handleDomNode,N=c.connection,O=c.isValid,a({connectionPosition:v&&O?si({x:v.x,y:v.y},r):_,connectionStatus:wi(!!v,O),connectionEndHandle:c.endHandle}),!v&&!O&&!R)return vi(I);N.source!==N.target&&R&&(vi(I),I=R,R.classList.add("connecting","react-flow__handle-connecting"),R.classList.toggle("valid",O),R.classList.toggle("react-flow__handle-valid",O))}function D(e){(v||R)&&N&&O&&r?.(N),i().onConnectEnd?.(e),l&&c?.(e),vi(I),b(),cancelAnimationFrame(w),A=!1,O=!1,N=null,R=null,u.removeEventListener("mousemove",P),u.removeEventListener("mouseup",D),u.removeEventListener("touchmove",P),u.removeEventListener("touchend",D)}a({connectionPosition:_,connectionStatus:null,connectionNodeId:n,connectionHandleId:t,connectionHandleType:E,connectionStartHandle:{nodeId:n,handleId:t,type:E},connectionEndHandle:null}),m?.(e,{nodeId:n,handleId:t,handleType:E}),u.addEventListener("mousemove",P),u.addEventListener("mouseup",D),u.addEventListener("touchmove",P),u.addEventListener("touchend",D)}const Ci=()=>!0,ki=e=>({connectionStartHandle:e.connectionStartHandle,connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName}),Ei=n((({type:e="source",position:n=zo.Top,isValidConnection:r,isConnectable:i=!0,isConnectableStart:a=!0,isConnectableEnd:s=!0,id:l,onConnect:c,children:u,className:d,onMouseDown:p,onTouchStart:f,...h},m)=>{const g=l||null,y="target"===e,b=so(),v=o(ni),{connectOnClick:w,noPanClassName:x}=ao(ki,ce),{connecting:C,clickConnecting:k}=ao(((e,t,n)=>r=>{const{connectionStartHandle:o,connectionEndHandle:i,connectionClickStartHandle:a}=r;return{connecting:o?.nodeId===e&&o?.handleId===t&&o?.type===n||i?.nodeId===e&&i?.handleId===t&&i?.type===n,clickConnecting:a?.nodeId===e&&a?.handleId===t&&a?.type===n}})(v,g,e),ce);v||b.getState().onError?.("010",no());const E=e=>{const{defaultEdgeOptions:t,onConnect:n,hasDefaultEdges:r}=b.getState(),o={...t,...e};if(r){const{edges:e,setEdges:t}=b.getState();t(((e,t)=>{if(!e.source||!e.target)return _o("006",qr()),t;let n;return n=(e=>"id"in e&&"source"in e&&"target"in e)(e)?{...e}:{...e,id:oi(e)},((e,t)=>t.some((t=>!(t.source!==e.source||t.target!==e.target||t.sourceHandle!==e.sourceHandle&&(t.sourceHandle||e.sourceHandle)||t.targetHandle!==e.targetHandle&&(t.targetHandle||e.targetHandle)))))(n,t)?t:t.concat(n)})(o,e))}n?.(o),c?.(o)},S=e=>{if(!v)return;const t=No(e);a&&(t&&0===e.button||!t)&&xi({event:e,handleId:g,nodeId:v,onConnect:E,isTarget:y,getState:b.getState,setState:b.setState,isValidConnection:r||b.getState().isValidConnection||Ci}),t?p?.(e):f?.(e)};return t.createElement("div",{"data-handleid":g,"data-nodeid":v,"data-handlepos":n,"data-id":`${v}-${g}-${e}`,className:re(["react-flow__handle",`react-flow__handle-${n}`,"nodrag",x,d,{source:!y,target:y,connectable:i,connectablestart:a,connectableend:s,connecting:k,connectionindicator:i&&(a&&!C||s&&C)}]),onMouseDown:S,onTouchStart:S,onClick:w?t=>{const{onClickConnectStart:n,onClickConnectEnd:o,connectionClickStartHandle:i,connectionMode:s,isValidConnection:l}=b.getState();if(!v||!i&&!a)return;if(!i)return n?.(t,{nodeId:v,handleId:g,handleType:e}),void b.setState({connectionClickStartHandle:{nodeId:v,type:e,handleId:g}});const c=bo(t.target),u=r||l||Ci,{connection:d,isValid:p}=yi({nodeId:v,id:g,type:e},s,i.nodeId,i.handleId||null,i.type,u,c);p&&E(d),o?.(t),b.setState({connectionClickStartHandle:null})}:void 0,ref:m,...h},u)}));Ei.displayName="Handle";var Si=r(Ei);const Ii=({data:e,isConnectable:n,targetPosition:r=zo.Top,sourcePosition:o=zo.Bottom})=>t.createElement(t.Fragment,null,t.createElement(Si,{type:"target",position:r,isConnectable:n}),e?.label,t.createElement(Si,{type:"source",position:o,isConnectable:n}));Ii.displayName="DefaultNode";var _i=r(Ii);const Ai=({data:e,isConnectable:n,sourcePosition:r=zo.Bottom})=>t.createElement(t.Fragment,null,e?.label,t.createElement(Si,{type:"source",position:r,isConnectable:n}));Ai.displayName="InputNode";var Ni=r(Ai);const Oi=({data:e,isConnectable:n,targetPosition:r=zo.Top})=>t.createElement(t.Fragment,null,t.createElement(Si,{type:"target",position:r,isConnectable:n}),e?.label);Oi.displayName="OutputNode";var Ri=r(Oi);const Ti=()=>null;Ti.displayName="GroupNode";const Mi=e=>({selectedNodes:e.getNodes().filter((e=>e.selected)),selectedEdges:e.edges.filter((e=>e.selected)).map((e=>({...e})))}),Pi=e=>e.id;function Di(e,t){return ce(e.selectedNodes.map(Pi),t.selectedNodes.map(Pi))&&ce(e.selectedEdges.map(Pi),t.selectedEdges.map(Pi))}const Bi=r((({onSelectionChange:e})=>{const t=so(),{selectedNodes:n,selectedEdges:r}=ao(Mi,Di);return s((()=>{const o={nodes:n,edges:r};e?.(o),t.getState().onSelectionChange.forEach((e=>e(o)))}),[n,r,e]),null}));Bi.displayName="SelectionListener";const ji=e=>!!e.onSelectionChange;function Li({onSelectionChange:e}){const n=ao(ji);return e||n?t.createElement(Bi,{onSelectionChange:e}):null}const Fi=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset});function Vi(e,t){s((()=>{void 0!==e&&t(e)}),[e])}function zi(e,t,n){s((()=>{void 0!==t&&n({[e]:t})}),[t])}const Gi=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:o,onConnectStart:i,onConnectEnd:a,onClickConnectStart:l,onClickConnectEnd:c,nodesDraggable:u,nodesConnectable:d,nodesFocusable:p,edgesFocusable:f,edgesUpdatable:h,elevateNodesOnSelect:m,minZoom:g,maxZoom:y,nodeExtent:b,onNodesChange:v,onEdgesChange:w,elementsSelectable:x,connectionMode:C,snapGrid:k,snapToGrid:E,translateExtent:S,connectOnClick:I,defaultEdgeOptions:_,fitView:A,fitViewOptions:N,onNodesDelete:O,onEdgesDelete:R,onNodeDrag:T,onNodeDragStart:M,onNodeDragStop:P,onSelectionDrag:D,onSelectionDragStart:B,onSelectionDragStop:j,noPanClassName:L,nodeOrigin:F,rfId:V,autoPanOnConnect:z,autoPanOnNodeDrag:G,onError:H,connectionRadius:W,isValidConnection:X,nodeDragThreshold:Z})=>{const{setNodes:$,setEdges:Y,setDefaultNodesAndEdges:U,setMinZoom:J,setMaxZoom:K,setTranslateExtent:Q,setNodeExtent:q,reset:ee}=ao(Fi,ce),te=so();return s((()=>{const e=r?.map((e=>({...e,..._})));return U(n,e),()=>{ee()}}),[]),zi("defaultEdgeOptions",_,te.setState),zi("connectionMode",C,te.setState),zi("onConnect",o,te.setState),zi("onConnectStart",i,te.setState),zi("onConnectEnd",a,te.setState),zi("onClickConnectStart",l,te.setState),zi("onClickConnectEnd",c,te.setState),zi("nodesDraggable",u,te.setState),zi("nodesConnectable",d,te.setState),zi("nodesFocusable",p,te.setState),zi("edgesFocusable",f,te.setState),zi("edgesUpdatable",h,te.setState),zi("elementsSelectable",x,te.setState),zi("elevateNodesOnSelect",m,te.setState),zi("snapToGrid",E,te.setState),zi("snapGrid",k,te.setState),zi("onNodesChange",v,te.setState),zi("onEdgesChange",w,te.setState),zi("connectOnClick",I,te.setState),zi("fitViewOnInit",A,te.setState),zi("fitViewOnInitOptions",N,te.setState),zi("onNodesDelete",O,te.setState),zi("onEdgesDelete",R,te.setState),zi("onNodeDrag",T,te.setState),zi("onNodeDragStart",M,te.setState),zi("onNodeDragStop",P,te.setState),zi("onSelectionDrag",D,te.setState),zi("onSelectionDragStart",B,te.setState),zi("onSelectionDragStop",j,te.setState),zi("noPanClassName",L,te.setState),zi("nodeOrigin",F,te.setState),zi("rfId",V,te.setState),zi("autoPanOnConnect",z,te.setState),zi("autoPanOnNodeDrag",G,te.setState),zi("onError",H,te.setState),zi("connectionRadius",W,te.setState),zi("isValidConnection",X,te.setState),zi("nodeDragThreshold",Z,te.setState),Vi(e,$),Vi(t,Y),Vi(g,J),Vi(y,K),Vi(S,Q),Vi(b,q),null},Hi={display:"none"},Wi={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Xi="react-flow__node-desc",Zi="react-flow__edge-desc",$i=e=>e.ariaLiveMessage;function Yi({rfId:e}){const n=ao($i);return t.createElement("div",{id:`react-flow__aria-live-${e}`,"aria-live":"assertive","aria-atomic":"true",style:Wi},n)}function Ui({rfId:e,disableKeyboardA11y:n}){return t.createElement(t.Fragment,null,t.createElement("div",{id:`${Xi}-${e}`,style:Hi},"Press enter or space to select a node.",!n&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "),t.createElement("div",{id:`${Zi}-${e}`,style:Hi},"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."),!n&&t.createElement(Yi,{rfId:e}))}var Ji=(e=null,t={actInsideInputWithModifier:!0})=>{const[n,r]=c(!1),o=u(!1),i=u(new Set([])),[l,d]=a((()=>{if(null!==e){const t=(Array.isArray(e)?e:[e]).filter((e=>"string"==typeof e)).map((e=>e.split("+"))),n=t.reduce(((e,t)=>e.concat(...t)),[]);return[t,n]}return[[],[]]}),[e]);return s((()=>{const n="undefined"!=typeof document?document:null,a=t?.target||n;if(null!==e){const e=e=>{o.current=e.ctrlKey||e.metaKey||e.shiftKey;if((!o.current||o.current&&!t.actInsideInputWithModifier)&&Ao(e))return!1;const n=Qi(e.code,d);i.current.add(e[n]),Ki(l,i.current,!1)&&(e.preventDefault(),r(!0))},n=e=>{if((!o.current||o.current&&!t.actInsideInputWithModifier)&&Ao(e))return!1;const n=Qi(e.code,d);Ki(l,i.current,!0)?(r(!1),i.current.clear()):i.current.delete(e[n]),"Meta"===e.key&&i.current.clear(),o.current=!1},s=()=>{i.current.clear(),r(!1)};return a?.addEventListener("keydown",e),a?.addEventListener("keyup",n),window.addEventListener("blur",s),()=>{a?.removeEventListener("keydown",e),a?.removeEventListener("keyup",n),window.removeEventListener("blur",s)}}}),[e,r]),n};function Ki(e,t,n){return e.filter((e=>n||e.length===t.size)).some((e=>e.every((e=>t.has(e)))))}function Qi(e,t){return t.includes(e)?"code":"key"}function qi(e,t,n,r){const o=e.parentNode||e.parentId;if(!o)return n;const i=t.get(o),a=li(i,r);return qi(i,t,{x:(n.x??0)+a.x,y:(n.y??0)+a.y,z:(i[So]?.z??0)>(n.z??0)?i[So]?.z??0:n.z??0},r)}function ea(e,t,n){e.forEach((r=>{const o=r.parentNode||r.parentId;if(o&&!e.has(o))throw new Error(`Parent node ${o} not found`);if(o||n?.[r.id]){const{x:o,y:i,z:a}=qi(r,e,{...r.position,z:r[So]?.z??0},t);r.positionAbsolute={x:o,y:i},r[So].z=a,n?.[r.id]&&(r[So].isParent=!0)}}))}function ta(e,t,n,r){const o=new Map,i={},a=r?1e3:0;return e.forEach((e=>{const n=(Eo(e.zIndex)?e.zIndex:0)+(e.selected?a:0),r=t.get(e.id),s={...e,positionAbsolute:{x:e.position.x,y:e.position.y}},l=e.parentNode||e.parentId;l&&(i[l]=!0);const c=r?.type&&r?.type!==e.type;Object.defineProperty(s,So,{enumerable:!1,value:{handleBounds:c?void 0:r?.[So]?.handleBounds,z:n}}),o.set(e.id,s)})),ea(o,n,i),o}function na(e,t={}){const{getNodes:n,width:r,height:o,minZoom:i,maxZoom:a,d3Zoom:s,d3Selection:l,fitViewOnInitDone:c,fitViewOnInit:u,nodeOrigin:d}=e(),p=t.initial&&!c&&u;if(s&&l&&(p||!t.initial)){const e=n().filter((e=>{const n=t.includeHiddenNodes?e.width&&e.height:!e.hidden;return t.nodes?.length?n&&t.nodes.some((t=>t.id===e.id)):n})),c=e.every((e=>e.width&&e.height));if(e.length>0&&c){const n=ci(e,d),{x:c,y:u,zoom:p}=pi(n,r,o,t.minZoom??i,t.maxZoom??a,t.padding??.1),f=jr.translate(c,u).scale(p);return"number"==typeof t.duration&&t.duration>0?s.transform(fi(l,t.duration),f):s.transform(l,f),!0}}return!1}function ra(e,t){return e.forEach((e=>{const n=t.get(e.id);n&&t.set(n.id,{...n,[So]:n[So],selected:e.selected})})),new Map(t)}function oa(e,t){return t.map((t=>{const n=e.find((e=>e.id===t.id));return n&&(t.selected=n.selected),t}))}function ia({changedNodes:e,changedEdges:t,get:n,set:r}){const{nodeInternals:o,edges:i,onNodesChange:a,onEdgesChange:s,hasDefaultNodes:l,hasDefaultEdges:c}=n();e?.length&&(l&&r({nodeInternals:ra(e,o)}),a?.(e)),t?.length&&(c&&r({edges:oa(t,i)}),s?.(t))}const aa=()=>{},sa={zoomIn:aa,zoomOut:aa,zoomTo:aa,getZoom:()=>1,setViewport:aa,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:aa,fitBounds:aa,project:e=>e,screenToFlowPosition:e=>e,flowToScreenPosition:e=>e,viewportInitialized:!1},la=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection});function ca(){const e=(()=>{const e=so(),{d3Zoom:t,d3Selection:n}=ao(la,ce),r=a((()=>n&&t?{zoomIn:e=>t.scaleBy(fi(n,e?.duration),1.2),zoomOut:e=>t.scaleBy(fi(n,e?.duration),1/1.2),zoomTo:(e,r)=>t.scaleTo(fi(n,r?.duration),e),getZoom:()=>e.getState().transform[2],setViewport:(r,o)=>{const[i,a,s]=e.getState().transform,l=jr.translate(r.x??i,r.y??a).scale(r.zoom??s);t.transform(fi(n,o?.duration),l)},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},fitView:t=>na(e.getState,t),setCenter:(r,o,i)=>{const{width:a,height:s,maxZoom:l}=e.getState(),c=void 0!==i?.zoom?i.zoom:l,u=a/2-r*c,d=s/2-o*c,p=jr.translate(u,d).scale(c);t.transform(fi(n,i?.duration),p)},fitBounds:(r,o)=>{const{width:i,height:a,minZoom:s,maxZoom:l}=e.getState(),{x:c,y:u,zoom:d}=pi(r,i,a,s,l,o?.padding??.1),p=jr.translate(c,u).scale(d);t.transform(fi(n,o?.duration),p)},project:t=>{const{transform:n,snapToGrid:r,snapGrid:o}=e.getState();return console.warn("[DEPRECATED] `project` is deprecated. Instead use `screenToFlowPosition`. There is no need to subtract the react flow bounds anymore! https://reactflow.dev/api-reference/types/react-flow-instance#screen-to-flow-position"),ai(t,n,r,o)},screenToFlowPosition:t=>{const{transform:n,snapToGrid:r,snapGrid:o,domNode:i}=e.getState();if(!i)return t;const{x:a,y:s}=i.getBoundingClientRect(),l={x:t.x-a,y:t.y-s};return ai(l,n,r,o)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:o,y:i}=r.getBoundingClientRect(),a=si(t,n);return{x:a.x+o,y:a.y+i}},viewportInitialized:!0}:sa),[t,n]);return r})(),t=so(),n=l((()=>t.getState().getNodes().map((e=>({...e})))),[]),r=l((e=>t.getState().nodeInternals.get(e)),[]),o=l((()=>{const{edges:e=[]}=t.getState();return e.map((e=>({...e})))}),[]),i=l((e=>{const{edges:n=[]}=t.getState();return n.find((t=>t.id===e))}),[]),s=l((e=>{const{getNodes:n,setNodes:r,hasDefaultNodes:o,onNodesChange:i}=t.getState(),a=n(),s="function"==typeof e?e(a):e;if(o)r(s);else if(i){const e=0===s.length?a.map((e=>({type:"remove",id:e.id}))):s.map((e=>({item:e,type:"reset"})));i(e)}}),[]),c=l((e=>{const{edges:n=[],setEdges:r,hasDefaultEdges:o,onEdgesChange:i}=t.getState(),a="function"==typeof e?e(n):e;if(o)r(a);else if(i){i(0===a.length?n.map((e=>({type:"remove",id:e.id}))):a.map((e=>({item:e,type:"reset"}))))}}),[]),u=l((e=>{const n=Array.isArray(e)?e:[e],{getNodes:r,setNodes:o,hasDefaultNodes:i,onNodesChange:a}=t.getState();if(i){o([...r(),...n])}else if(a){const e=n.map((e=>({item:e,type:"add"})));a(e)}}),[]),d=l((e=>{const n=Array.isArray(e)?e:[e],{edges:r=[],setEdges:o,hasDefaultEdges:i,onEdgesChange:a}=t.getState();if(i)o([...r,...n]);else if(a){a(n.map((e=>({item:e,type:"add"}))))}}),[]),p=l((()=>{const{getNodes:e,edges:n=[],transform:r}=t.getState(),[o,i,a]=r;return{nodes:e().map((e=>({...e}))),edges:n.map((e=>({...e}))),viewport:{x:o,y:i,zoom:a}}}),[]),f=l((({nodes:e,edges:n})=>{const{nodeInternals:r,getNodes:o,edges:i,hasDefaultNodes:a,hasDefaultEdges:s,onNodesDelete:l,onEdgesDelete:c,onNodesChange:u,onEdgesChange:d}=t.getState(),p=(e||[]).map((e=>e.id)),f=(n||[]).map((e=>e.id)),h=o().reduce(((e,t)=>{const n=t.parentNode||t.parentId,r=!p.includes(t.id)&&n&&e.find((e=>e.id===n));return("boolean"!=typeof t.deletable||t.deletable)&&(p.includes(t.id)||r)&&e.push(t),e}),[]),m=i.filter((e=>"boolean"!=typeof e.deletable||e.deletable)),g=m.filter((e=>f.includes(e.id)));if(h||g){const e=di(h,m),n=[...g,...e],o=n.reduce(((e,t)=>(e.includes(t.id)||e.push(t.id),e)),[]);if((s||a)&&(s&&t.setState({edges:i.filter((e=>!o.includes(e.id)))}),a&&(h.forEach((e=>{r.delete(e.id)})),t.setState({nodeInternals:new Map(r)}))),o.length>0&&(c?.(n),d&&d(o.map((e=>({id:e,type:"remove"}))))),h.length>0&&(l?.(h),u)){u(h.map((e=>({id:e.id,type:"remove"}))))}}}),[]),h=l((e=>{const n=Eo((r=e).width)&&Eo(r.height)&&Eo(r.x)&&Eo(r.y);var r;const o=n?null:t.getState().nodeInternals.get(e.id);if(!n&&!o)return[null,null,n];return[n?e:Co(o),o,n]}),[]),m=l(((e,n=!0,r)=>{const[o,i,a]=h(e);return o?(r||t.getState().getNodes()).filter((e=>{if(!(a||e.id!==i.id&&e.positionAbsolute))return!1;const t=Co(e),r=ko(t,o);return n&&r>0||r>=o.width*o.height})):[]}),[]),g=l(((e,t,n=!0)=>{const[r]=h(e);if(!r)return!1;const o=ko(r,t);return n&&o>0||o>=r.width*r.height}),[]);return a((()=>({...e,getNodes:n,getNode:r,getEdges:o,getEdge:i,setNodes:s,setEdges:c,addNodes:u,addEdges:d,toObject:p,deleteElements:f,getIntersectingNodes:m,isNodeIntersecting:g})),[e,n,r,o,i,s,c,u,d,p,f,m,g])}const ua={actInsideInputWithModifier:!1};const da={position:"absolute",width:"100%",height:"100%",top:0,left:0},pa=e=>({x:e.x,y:e.y,zoom:e.k}),fa=(e,t)=>e.target.closest(`.${t}`),ha=(e,t)=>2===t&&Array.isArray(e)&&e.includes(2),ma=e=>{const t=e.ctrlKey&&Ro()?10:1;return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*t},ga=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection,d3ZoomHandler:e.d3ZoomHandler,userSelectionActive:e.userSelectionActive}),ya=({onMove:e,onMoveStart:n,onMoveEnd:r,onPaneContextMenu:o,zoomOnScroll:i=!0,zoomOnPinch:a=!0,panOnScroll:l=!1,panOnScrollSpeed:c=.5,panOnScrollMode:d=jo.Free,zoomOnDoubleClick:p=!0,elementsSelectable:f,panOnDrag:h=!0,defaultViewport:m,translateExtent:g,minZoom:y,maxZoom:b,zoomActivationKeyCode:v,preventScrolling:w=!0,children:x,noWheelClassName:C,noPanClassName:k})=>{const E=u(),S=so(),I=u(!1),_=u(!1),A=u(null),N=u({x:0,y:0,zoom:0}),{d3Zoom:O,d3Selection:R,d3ZoomHandler:T,userSelectionActive:M}=ao(ga,ce),P=Ji(v),D=u(0),B=u(!1),j=u();return function(e){const t=so();s((()=>{let n;const r=()=>{if(!e.current)return;const n=fo(e.current);0!==n.height&&0!==n.width||t.getState().onError?.("004",Kr()),t.setState({width:n.width||500,height:n.height||500})};return r(),window.addEventListener("resize",r),e.current&&(n=new ResizeObserver((()=>r())),n.observe(e.current)),()=>{window.removeEventListener("resize",r),n&&e.current&&n.unobserve(e.current)}}),[])}(A),s((()=>{if(A.current){const e=A.current.getBoundingClientRect(),t=Zr().scaleExtent([y,b]).translateExtent(g),n=_t(A.current).call(t),r=jr.translate(m.x,m.y).scale(ho(m.zoom,y,b)),o=[[0,0],[e.width,e.height]],i=t.constrain()(r,o,g);t.transform(n,i),t.wheelDelta(ma),S.setState({d3Zoom:t,d3Selection:n,d3ZoomHandler:n.on("wheel.zoom"),transform:[i.x,i.y,i.k],domNode:A.current.closest(".react-flow")})}}),[]),s((()=>{R&&O&&(!l||P||M?void 0!==T&&R.on("wheel.zoom",(function(e,t){if(!w&&"wheel"===e.type&&!e.ctrlKey||fa(e,C))return null;e.preventDefault(),T.call(this,e,t)}),{passive:!1}):R.on("wheel.zoom",(t=>{if(fa(t,C))return!1;t.preventDefault(),t.stopImmediatePropagation();const o=R.property("__zoom").k||1;if(t.ctrlKey&&a){const e=At(t),n=ma(t),r=o*Math.pow(2,n);return void O.scaleTo(R,r,e,t)}const i=1===t.deltaMode?20:1;let s=d===jo.Vertical?0:t.deltaX*i,l=d===jo.Horizontal?0:t.deltaY*i;!Ro()&&t.shiftKey&&d!==jo.Vertical&&(s=t.deltaY*i,l=0),O.translateBy(R,-s/o*c,-l/o*c,{internal:!0});const u=pa(R.property("__zoom")),{onViewportChangeStart:p,onViewportChange:f,onViewportChangeEnd:h}=S.getState();clearTimeout(j.current),B.current||(B.current=!0,n?.(t,u),p?.(u)),B.current&&(e?.(t,u),f?.(u),j.current=setTimeout((()=>{r?.(t,u),h?.(u),B.current=!1}),150))}),{passive:!1}))}),[M,l,d,R,O,T,P,a,w,C,n,e,r]),s((()=>{O&&O.on("start",(e=>{if(!e.sourceEvent||e.sourceEvent.internal)return null;D.current=e.sourceEvent?.button;const{onViewportChangeStart:t}=S.getState(),r=pa(e.transform);I.current=!0,N.current=r,"mousedown"===e.sourceEvent?.type&&S.setState({paneDragging:!0}),t?.(r),n?.(e.sourceEvent,r)}))}),[O,n]),s((()=>{O&&(M&&!I.current?O.on("zoom",null):M||O.on("zoom",(t=>{const{onViewportChange:n}=S.getState();if(S.setState({transform:[t.transform.x,t.transform.y,t.transform.k]}),_.current=!(!o||!ha(h,D.current??0)),(e||n)&&!t.sourceEvent?.internal){const r=pa(t.transform);n?.(r),e?.(t.sourceEvent,r)}})))}),[M,O,e,h,o]),s((()=>{O&&O.on("end",(e=>{if(!e.sourceEvent||e.sourceEvent.internal)return null;const{onViewportChangeEnd:t}=S.getState();if(I.current=!1,S.setState({paneDragging:!1}),o&&ha(h,D.current??0)&&!_.current&&o(e.sourceEvent),_.current=!1,(r||t)&&(n=N.current,i=e.transform,n.x!==i.x||n.y!==i.y||n.zoom!==i.k)){const n=pa(e.transform);N.current=n,clearTimeout(E.current),E.current=setTimeout((()=>{t?.(n),r?.(e.sourceEvent,n)}),l?150:0)}var n,i}))}),[O,l,h,r,o]),s((()=>{O&&O.filter((e=>{const t=P||i,n=a&&e.ctrlKey;if((!0===h||Array.isArray(h)&&h.includes(1))&&1===e.button&&"mousedown"===e.type&&(fa(e,"react-flow__node")||fa(e,"react-flow__edge")))return!0;if(!(h||t||l||p||a))return!1;if(M)return!1;if(!p&&"dblclick"===e.type)return!1;if(fa(e,C)&&"wheel"===e.type)return!1;if(fa(e,k)&&("wheel"!==e.type||l&&"wheel"===e.type&&!P))return!1;if(!a&&e.ctrlKey&&"wheel"===e.type)return!1;if(!t&&!l&&!n&&"wheel"===e.type)return!1;if(!h&&("mousedown"===e.type||"touchstart"===e.type))return!1;if(Array.isArray(h)&&!h.includes(e.button)&&"mousedown"===e.type)return!1;const r=Array.isArray(h)&&h.includes(e.button)||!e.button||e.button<=1;return(!e.ctrlKey||"wheel"===e.type)&&r}))}),[M,O,i,a,l,p,h,f,P]),t.createElement("div",{className:"react-flow__renderer",ref:A,style:da},x)},ba=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function va(){const{userSelectionActive:e,userSelectionRect:n}=ao(ba,ce);return e&&n?t.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:n.width,height:n.height,transform:`translate(${n.x}px, ${n.y}px)`}}):null}function wa(e,t){const n=t.parentNode||t.parentId,r=e.find((e=>e.id===n));if(r){const e=t.position.x+t.width-r.width,n=t.position.y+t.height-r.height;if(e>0||n>0||t.position.x<0||t.position.y<0){if(r.style={...r.style}||{},r.style.width=r.style.width??r.width,r.style.height=r.style.height??r.height,e>0&&(r.style.width+=e),n>0&&(r.style.height+=n),t.position.x<0){const e=Math.abs(t.position.x);r.position.x=r.position.x-e,r.style.width+=e,t.position.x=0}if(t.position.y<0){const e=Math.abs(t.position.y);r.position.y=r.position.y-e,r.style.height+=e,t.position.y=0}r.width=r.style.width,r.height=r.style.height}}}function xa(e,t){if(e.some((e=>"reset"===e.type)))return e.filter((e=>"reset"===e.type)).map((e=>e.item));const n=e.filter((e=>"add"===e.type)).map((e=>e.item));return t.reduce(((t,n)=>{const r=e.filter((e=>e.id===n.id));if(0===r.length)return t.push(n),t;const o={...n};for(const e of r)if(e)switch(e.type){case"select":o.selected=e.selected;break;case"position":void 0!==e.position&&(o.position=e.position),void 0!==e.positionAbsolute&&(o.positionAbsolute=e.positionAbsolute),void 0!==e.dragging&&(o.dragging=e.dragging),o.expandParent&&wa(t,o);break;case"dimensions":void 0!==e.dimensions&&(o.width=e.dimensions.width,o.height=e.dimensions.height),void 0!==e.updateStyle&&(o.style={...o.style||{},...e.dimensions}),"boolean"==typeof e.resizing&&(o.resizing=e.resizing),o.expandParent&&wa(t,o);break;case"remove":return t}return t.push(o),t}),n)}function Ca(e,t){return xa(e,t)}function ka(e,t){return xa(e,t)}const Ea=(e,t)=>({id:e,type:"select",selected:t});function Sa(e,t){return e.reduce(((e,n)=>{const r=t.includes(n.id);return!n.selected&&r?(n.selected=!0,e.push(Ea(n.id,!0))):n.selected&&!r&&(n.selected=!1,e.push(Ea(n.id,!1))),e}),[])}const Ia=(e,t)=>n=>{n.target===t.current&&e?.(n)},_a=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging}),Aa=r((({isSelecting:e,selectionMode:n=Lo.Full,panOnDrag:r,onSelectionStart:o,onSelectionEnd:i,onPaneClick:a,onPaneContextMenu:s,onPaneScroll:l,onPaneMouseEnter:c,onPaneMouseMove:d,onPaneMouseLeave:p,children:f})=>{const h=u(null),m=so(),g=u(0),y=u(0),b=u(),{userSelectionActive:v,elementsSelectable:w,dragging:x}=ao(_a,ce),C=()=>{m.setState({userSelectionActive:!1,userSelectionRect:null}),g.current=0,y.current=0},k=e=>{a?.(e),m.getState().resetSelectedElements(),m.setState({nodesSelectionActive:!1})},E=l?e=>l(e):void 0,S=w&&(e||v);return t.createElement("div",{className:re(["react-flow__pane",{dragging:x,selection:e}]),onClick:S?void 0:Ia(k,h),onContextMenu:Ia((e=>{Array.isArray(r)&&r?.includes(2)?e.preventDefault():s?.(e)}),h),onWheel:Ia(E,h),onMouseEnter:S?void 0:c,onMouseDown:S?t=>{const{resetSelectedElements:n,domNode:r}=m.getState();if(b.current=r?.getBoundingClientRect(),!w||!e||0!==t.button||t.target!==h.current||!b.current)return;const{x:i,y:a}=Oo(t,b.current);n(),m.setState({userSelectionRect:{width:0,height:0,startX:i,startY:a,x:i,y:a}}),o?.(t)}:void 0,onMouseMove:S?t=>{const{userSelectionRect:r,nodeInternals:o,edges:i,transform:a,onNodesChange:s,onEdgesChange:l,nodeOrigin:c,getNodes:u}=m.getState();if(!e||!b.current||!r)return;m.setState({userSelectionActive:!0,nodesSelectionActive:!1});const d=Oo(t,b.current),p=r.startX??0,f=r.startY??0,h={...r,x:d.x<p?d.x:p,y:d.y<f?d.y:f,width:Math.abs(d.x-p),height:Math.abs(d.y-f)},v=u(),w=ui(o,h,a,n===Lo.Partial,!0,c),x=di(w,i).map((e=>e.id)),C=w.map((e=>e.id));if(g.current!==C.length){g.current=C.length;const e=Sa(v,C);e.length&&s?.(e)}if(y.current!==x.length){y.current=x.length;const e=Sa(i,x);e.length&&l?.(e)}m.setState({userSelectionRect:h})}:d,onMouseUp:S?e=>{if(0!==e.button)return;const{userSelectionRect:t}=m.getState();!v&&t&&e.target===h.current&&k?.(e),m.setState({nodesSelectionActive:g.current>0}),C(),i?.(e)}:void 0,onMouseLeave:S?e=>{v&&(m.setState({nodesSelectionActive:g.current>0}),i?.(e)),C()}:p,ref:h,style:da},f,t.createElement(va,null))}));function Na(e,t){const n=e.parentNode||e.parentId;if(!n)return!1;const r=t.get(n);return!!r&&(!!r.selected||Na(r,t))}function Oa(e,t,n){let r=e;do{if(r?.matches(t))return!0;if(r===n.current)return!1;r=r.parentElement}while(r);return!1}function Ra(e,t,n,r){return Array.from(e.values()).filter((n=>(n.selected||n.id===r)&&(!n.parentNode||n.parentId||!Na(n,e))&&(n.draggable||t&&void 0===n.draggable))).map((e=>({id:e.id,position:e.position||{x:0,y:0},positionAbsolute:e.positionAbsolute||{x:0,y:0},distance:{x:n.x-(e.positionAbsolute?.x??0),y:n.y-(e.positionAbsolute?.y??0)},delta:{x:0,y:0},extent:e.extent,parentNode:e.parentNode||e.parentId,parentId:e.parentNode||e.parentId,width:e.width,height:e.height,expandParent:e.expandParent})))}function Ta(e,t,n,r,o=[0,0],i){const a=function(e,t){return t&&"parent"!==t?[t[0],[t[1][0]-(e.width||0),t[1][1]-(e.height||0)]]:t}(e,e.extent||r);let s=a;const l=e.parentNode||e.parentId;if("parent"!==e.extent||e.expandParent){if(e.extent&&l&&"parent"!==e.extent){const t=n.get(l),{x:r,y:i}=li(t,o).positionAbsolute;s=[[e.extent[0][0]+r,e.extent[0][1]+i],[e.extent[1][0]+r,e.extent[1][1]+i]]}}else if(l&&e.width&&e.height){const t=n.get(l),{x:r,y:i}=li(t,o).positionAbsolute;s=t&&Eo(r)&&Eo(i)&&Eo(t.width)&&Eo(t.height)?[[r+e.width*o[0],i+e.height*o[1]],[r+t.width-e.width+e.width*o[0],i+t.height-e.height+e.height*o[1]]]:s}else i?.("005",Qr()),s=a;let c={x:0,y:0};if(l){const e=n.get(l);c=li(e,o).positionAbsolute}const u=s&&"parent"!==s?mo(t,s):t;return{position:{x:u.x-c.x,y:u.y-c.y},positionAbsolute:u}}function Ma({nodeId:e,dragItems:t,nodeInternals:n}){const r=t.map((e=>({...n.get(e.id),position:e.position,positionAbsolute:e.positionAbsolute})));return[e?r.find((t=>t.id===e)):r[0],r]}Aa.displayName="Pane";const Pa=(e,t,n,r)=>{const o=t.querySelectorAll(e);if(!o||!o.length)return null;const i=Array.from(o),a=t.getBoundingClientRect(),s=a.width*r[0],l=a.height*r[1];return i.map((e=>{const t=e.getBoundingClientRect();return{id:e.getAttribute("data-handleid"),position:e.getAttribute("data-handlepos"),x:(t.left-a.left-s)/n,y:(t.top-a.top-l)/n,...fo(e)}}))};function Da(e,t,n){return void 0===n?n:r=>{const o=t().nodeInternals.get(e);o&&n(r,{...o})}}function Ba({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:o,unselectNodesAndEdges:i,multiSelectionActive:a,nodeInternals:s,onError:l}=t.getState(),c=s.get(e);c?(t.setState({nodesSelectionActive:!1}),c.selected?(n||c.selected&&a)&&(i({nodes:[c],edges:[]}),requestAnimationFrame((()=>r?.current?.blur()))):o([e])):l?.("012",oo(e))}function ja(e){return(t,n,r)=>e?.(t,r)}function La({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:o,isSelectable:i,selectNodesOnDrag:a}){const d=so(),[p,f]=c(!1),h=u([]),m=u({x:null,y:null}),g=u(0),y=u(null),b=u({x:0,y:0}),v=u(null),w=u(!1),x=u(!1),C=u(!1),k=function(){const e=so(),t=l((({sourceEvent:t})=>{const{transform:n,snapGrid:r,snapToGrid:o}=e.getState(),i=t.touches?t.touches[0].clientX:t.clientX,a=t.touches?t.touches[0].clientY:t.clientY,s={x:(i-n[0])/n[2],y:(a-n[1])/n[2]};return{xSnapped:o?r[0]*Math.round(s.x/r[0]):s.x,ySnapped:o?r[1]*Math.round(s.y/r[1]):s.y,...s}}),[]);return t}();return s((()=>{if(e?.current){const s=_t(e.current),l=({x:e,y:t})=>{const{nodeInternals:n,onNodeDrag:r,onSelectionDrag:i,updateNodePositions:a,nodeExtent:s,snapGrid:l,snapToGrid:c,nodeOrigin:u,onError:p}=d.getState();m.current={x:e,y:t};let g=!1,y={x:0,y:0,x2:0,y2:0};if(h.current.length>1&&s){const e=ci(h.current,u);y=wo(e)}if(h.current=h.current.map((r=>{const o={x:e-r.distance.x,y:t-r.distance.y};c&&(o.x=l[0]*Math.round(o.x/l[0]),o.y=l[1]*Math.round(o.y/l[1]));const i=[[s[0][0],s[0][1]],[s[1][0],s[1][1]]];h.current.length>1&&s&&!r.extent&&(i[0][0]=r.positionAbsolute.x-y.x+s[0][0],i[1][0]=r.positionAbsolute.x+(r.width??0)-y.x2+s[1][0],i[0][1]=r.positionAbsolute.y-y.y+s[0][1],i[1][1]=r.positionAbsolute.y+(r.height??0)-y.y2+s[1][1]);const a=Ta(r,o,n,i,u,p);return g=g||r.position.x!==a.position.x||r.position.y!==a.position.y,r.position=a.position,r.positionAbsolute=a.positionAbsolute,r})),!g)return;a(h.current,!0,!0),f(!0);const b=o?r:ja(i);if(b&&v.current){const[e,t]=Ma({nodeId:o,dragItems:h.current,nodeInternals:n});b(v.current,e,t)}},c=()=>{if(!y.current)return;const[e,t]=yo(b.current,y.current);if(0!==e||0!==t){const{transform:n,panBy:r}=d.getState();m.current.x=(m.current.x??0)-e/n[2],m.current.y=(m.current.y??0)-t/n[2],r({x:e,y:t})&&l(m.current)}g.current=requestAnimationFrame(c)},u=t=>{const{nodeInternals:n,multiSelectionActive:r,nodesDraggable:s,unselectNodesAndEdges:l,onNodeDragStart:c,onSelectionDragStart:u}=d.getState();x.current=!0;const p=o?c:ja(u);a&&i||r||!o||n.get(o)?.selected||l(),o&&i&&a&&Ba({id:o,store:d,nodeRef:e});const f=k(t);if(m.current=f,h.current=Ra(n,s,f,o),p&&h.current){const[e,r]=Ma({nodeId:o,dragItems:h.current,nodeInternals:n});p(t.sourceEvent,e,r)}};if(!t){const t=function(){var e,t,n,r,o=jt,i=Lt,a=Ft,s=Vt,l={},c=de("start","drag","end"),u=0,d=0;function p(e){e.on("mousedown.drag",f).filter(s).on("touchstart.drag",g).on("touchmove.drag",y,Nt).on("touchend.drag touchcancel.drag",b).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(a,s){if(!r&&o.call(this,a,s)){var l=v(this,i.call(this,a,s),a,s,"mouse");l&&(_t(a.view).on("mousemove.drag",h,Ot).on("mouseup.drag",m,Ot),Mt(a.view),Rt(a),n=!1,e=a.clientX,t=a.clientY,l("start",a))}}function h(r){if(Tt(r),!n){var o=r.clientX-e,i=r.clientY-t;n=o*o+i*i>d}l.mouse("drag",r)}function m(e){_t(e.view).on("mousemove.drag mouseup.drag",null),Pt(e.view,n),Tt(e),l.mouse("end",e)}function g(e,t){if(o.call(this,e,t)){var n,r,a=e.changedTouches,s=i.call(this,e,t),l=a.length;for(n=0;n<l;++n)(r=v(this,s,e,t,a[n].identifier,a[n]))&&(Rt(e),r("start",e,a[n]))}}function y(e){var t,n,r=e.changedTouches,o=r.length;for(t=0;t<o;++t)(n=l[r[t].identifier])&&(Tt(e),n("drag",e,r[t]))}function b(e){var t,n,o=e.changedTouches,i=o.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null}),500),t=0;t<i;++t)(n=l[o[t].identifier])&&(Rt(e),n("end",e,o[t]))}function v(e,t,n,r,o,i){var s,d,f,h=c.copy(),m=At(i||n,t);if(null!=(f=a.call(e,new Bt("beforestart",{sourceEvent:n,target:p,identifier:o,active:u,x:m[0],y:m[1],dx:0,dy:0,dispatch:h}),r)))return s=f.x-m[0]||0,d=f.y-m[1]||0,function n(i,a,c){var g,y=m;switch(i){case"start":l[o]=n,g=u++;break;case"end":delete l[o],--u;case"drag":m=At(c||a,t),g=u}h.call(i,e,new Bt(i,{sourceEvent:a,subject:f,target:p,identifier:o,active:g,x:m[0]+s,y:m[1]+d,dx:m[0]-y[0],dy:m[1]-y[1],dispatch:h}),r)}}return p.filter=function(e){return arguments.length?(o="function"==typeof e?e:Dt(!!e),p):o},p.container=function(e){return arguments.length?(i="function"==typeof e?e:Dt(e),p):i},p.subject=function(e){return arguments.length?(a="function"==typeof e?e:Dt(e),p):a},p.touchable=function(e){return arguments.length?(s="function"==typeof e?e:Dt(!!e),p):s},p.on=function(){var e=c.on.apply(c,arguments);return e===c?p:e},p.clickDistance=function(e){return arguments.length?(d=(e=+e)*e,p):Math.sqrt(d)},p}().on("start",(e=>{const{domNode:t,nodeDragThreshold:n}=d.getState();0===n&&u(e),C.current=!1;const r=k(e);m.current=r,y.current=t?.getBoundingClientRect()||null,b.current=Oo(e.sourceEvent,y.current)})).on("drag",(e=>{const t=k(e),{autoPanOnNodeDrag:n,nodeDragThreshold:r}=d.getState();if("touchmove"===e.sourceEvent.type&&e.sourceEvent.touches.length>1&&(C.current=!0),!C.current){if(!w.current&&x.current&&n&&(w.current=!0,c()),!x.current){const n=t.xSnapped-(m?.current?.x??0),o=t.ySnapped-(m?.current?.y??0);Math.sqrt(n*n+o*o)>r&&u(e)}(m.current.x!==t.xSnapped||m.current.y!==t.ySnapped)&&h.current&&x.current&&(v.current=e.sourceEvent,b.current=Oo(e.sourceEvent,y.current),l(t))}})).on("end",(e=>{if(x.current&&!C.current&&(f(!1),w.current=!1,x.current=!1,cancelAnimationFrame(g.current),h.current)){const{updateNodePositions:t,nodeInternals:n,onNodeDragStop:r,onSelectionDragStop:i}=d.getState(),a=o?r:ja(i);if(t(h.current,!1,!1),a){const[t,r]=Ma({nodeId:o,dragItems:h.current,nodeInternals:n});a(e.sourceEvent,t,r)}}})).filter((t=>{const o=t.target;return!t.button&&(!n||!Oa(o,`.${n}`,e))&&(!r||Oa(o,r,e))}));return s.call(t),()=>{s.on(".drag",null)}}s.on(".drag",null)}}),[e,t,n,r,i,d,o,a,k]),p}function Fa(){const e=so(),t=l((t=>{const{nodeInternals:n,nodeExtent:r,updateNodePositions:o,getNodes:i,snapToGrid:a,snapGrid:s,onError:l,nodesDraggable:c}=e.getState(),u=i().filter((e=>e.selected&&(e.draggable||c&&void 0===e.draggable))),d=a?s[0]:5,p=a?s[1]:5,f=t.isShiftPressed?4:1,h=t.x*d*f,m=t.y*p*f,g=u.map((e=>{if(e.positionAbsolute){const t={x:e.positionAbsolute.x+h,y:e.positionAbsolute.y+m};a&&(t.x=s[0]*Math.round(t.x/s[0]),t.y=s[1]*Math.round(t.y/s[1]));const{positionAbsolute:o,position:i}=Ta(e,t,n,r,void 0,l);e.position=i,e.positionAbsolute=o}return e}));o(g,!0,!1)}),[]);return t}const Va={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var za=e=>{const n=({id:n,type:r,data:o,xPos:i,yPos:a,xPosOrigin:l,yPosOrigin:c,selected:d,onClick:p,onMouseEnter:f,onMouseMove:h,onMouseLeave:m,onContextMenu:g,onDoubleClick:y,style:b,className:v,isDraggable:w,isSelectable:x,isConnectable:C,isFocusable:k,selectNodesOnDrag:E,sourcePosition:S,targetPosition:I,hidden:_,resizeObserver:A,dragHandle:N,zIndex:O,isParent:R,noDragClassName:T,noPanClassName:M,initialized:P,disableKeyboardA11y:D,ariaLabel:B,rfId:j,hasHandleBounds:L})=>{const F=so(),V=u(null),z=u(null),G=u(S),H=u(I),W=u(r),X=x||w||p||f||h||m,Z=Fa(),$=Da(n,F.getState,f),Y=Da(n,F.getState,h),U=Da(n,F.getState,m),J=Da(n,F.getState,g),K=Da(n,F.getState,y);s((()=>()=>{z.current&&(A?.unobserve(z.current),z.current=null)}),[]),s((()=>{if(V.current&&!_){const e=V.current;P&&L&&z.current===e||(z.current&&A?.unobserve(z.current),A?.observe(e),z.current=e)}}),[_,P,L]),s((()=>{const e=W.current!==r,t=G.current!==S,o=H.current!==I;V.current&&(e||t||o)&&(e&&(W.current=r),t&&(G.current=S),o&&(H.current=I),F.getState().updateNodeDimensions([{id:n,nodeElement:V.current,forceUpdate:!0}]))}),[n,r,S,I]);const Q=La({nodeRef:V,disabled:_||!w,noDragClassName:T,handleSelector:N,nodeId:n,isSelectable:x,selectNodesOnDrag:E});return _?null:t.createElement("div",{className:re(["react-flow__node",`react-flow__node-${r}`,{[M]:w},v,{selected:d,selectable:x,parent:R,dragging:Q}]),ref:V,style:{zIndex:O,transform:`translate(${l}px,${c}px)`,pointerEvents:X?"all":"none",visibility:P?"visible":"hidden",...b},"data-id":n,"data-testid":`rf__node-${n}`,onMouseEnter:$,onMouseMove:Y,onMouseLeave:U,onContextMenu:J,onClick:e=>{const{nodeDragThreshold:t}=F.getState();if(x&&(!E||!w||t>0)&&Ba({id:n,store:F,nodeRef:V}),p){const t=F.getState().nodeInternals.get(n);t&&p(e,{...t})}},onDoubleClick:K,onKeyDown:k?e=>{if(!Ao(e)&&!D)if(Io.includes(e.key)&&x){const t="Escape"===e.key;Ba({id:n,store:F,unselect:t,nodeRef:V})}else w&&d&&Object.prototype.hasOwnProperty.call(Va,e.key)&&(F.setState({ariaLiveMessage:`Moved selected node ${e.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~i}, y: ${~~a}`}),Z({x:Va[e.key].x,y:Va[e.key].y,isShiftPressed:e.shiftKey}))}:void 0,tabIndex:k?0:void 0,role:k?"button":void 0,"aria-describedby":D?void 0:`${Xi}-${j}`,"aria-label":B},t.createElement(ri,{value:n},t.createElement(e,{id:n,data:o,type:r,xPos:i,yPos:a,selected:d,isConnectable:C,sourcePosition:S,targetPosition:I,dragging:Q,dragHandle:N,zIndex:O})))};return n.displayName="NodeWrapper",r(n)};const Ga=e=>{const t=e.getNodes().filter((e=>e.selected));return{...ci(t,e.nodeOrigin),transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`,userSelectionActive:e.userSelectionActive}};var Ha=r((function({onSelectionContextMenu:e,noPanClassName:n,disableKeyboardA11y:r}){const o=so(),{width:i,height:a,x:l,y:c,transformString:d,userSelectionActive:p}=ao(Ga,ce),f=Fa(),h=u(null);if(s((()=>{r||h.current?.focus({preventScroll:!0})}),[r]),La({nodeRef:h}),p||!i||!a)return null;const m=e?t=>{const n=o.getState().getNodes().filter((e=>e.selected));e(t,n)}:void 0;return t.createElement("div",{className:re(["react-flow__nodesselection","react-flow__container",n]),style:{transform:d}},t.createElement("div",{ref:h,className:"react-flow__nodesselection-rect",onContextMenu:m,tabIndex:r?void 0:-1,onKeyDown:r?void 0:e=>{Object.prototype.hasOwnProperty.call(Va,e.key)&&f({x:Va[e.key].x,y:Va[e.key].y,isShiftPressed:e.shiftKey})},style:{width:i,height:a,top:c,left:l}}))}));const Wa=e=>e.nodesSelectionActive,Xa=({children:e,onPaneClick:n,onPaneMouseEnter:r,onPaneMouseMove:o,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:l,deleteKeyCode:c,onMove:u,onMoveStart:d,onMoveEnd:p,selectionKeyCode:f,selectionOnDrag:h,selectionMode:m,onSelectionStart:g,onSelectionEnd:y,multiSelectionKeyCode:b,panActivationKeyCode:v,zoomActivationKeyCode:w,elementsSelectable:x,zoomOnScroll:C,zoomOnPinch:k,panOnScroll:E,panOnScrollSpeed:S,panOnScrollMode:I,zoomOnDoubleClick:_,panOnDrag:A,defaultViewport:N,translateExtent:O,minZoom:R,maxZoom:T,preventScrolling:M,onSelectionContextMenu:P,noWheelClassName:D,noPanClassName:B,disableKeyboardA11y:j})=>{const L=ao(Wa),F=Ji(f),V=Ji(v),z=V||A,G=V||E,H=F||h&&!0!==z;return(({deleteKeyCode:e,multiSelectionKeyCode:t})=>{const n=so(),{deleteElements:r}=ca(),o=Ji(e,ua),i=Ji(t);s((()=>{if(o){const{edges:e,getNodes:t}=n.getState(),o=t().filter((e=>e.selected)),i=e.filter((e=>e.selected));r({nodes:o,edges:i}),n.setState({nodesSelectionActive:!1})}}),[o]),s((()=>{n.setState({multiSelectionActive:i})}),[i])})({deleteKeyCode:c,multiSelectionKeyCode:b}),t.createElement(ya,{onMove:u,onMoveStart:d,onMoveEnd:p,onPaneContextMenu:a,elementsSelectable:x,zoomOnScroll:C,zoomOnPinch:k,panOnScroll:G,panOnScrollSpeed:S,panOnScrollMode:I,zoomOnDoubleClick:_,panOnDrag:!F&&z,defaultViewport:N,translateExtent:O,minZoom:R,maxZoom:T,zoomActivationKeyCode:w,preventScrolling:M,noWheelClassName:D,noPanClassName:B},t.createElement(Aa,{onSelectionStart:g,onSelectionEnd:y,onPaneClick:n,onPaneMouseEnter:r,onPaneMouseMove:o,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:l,panOnDrag:z,isSelecting:!!H,selectionMode:m},e,L&&t.createElement(Ha,{onSelectionContextMenu:P,noPanClassName:B,disableKeyboardA11y:j})))};Xa.displayName="FlowRenderer";var Za=r(Xa);function $a(e){return{...{input:za(e.input||Ni),default:za(e.default||_i),output:za(e.output||Ri),group:za(e.group||Ti)},...Object.keys(e).filter((e=>!["input","default","output","group"].includes(e))).reduce(((t,n)=>(t[n]=za(e[n]||_i),t)),{})}}const Ya=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,updateNodeDimensions:e.updateNodeDimensions,onError:e.onError}),Ua=e=>{const{nodesDraggable:n,nodesConnectable:r,nodesFocusable:o,elementsSelectable:i,updateNodeDimensions:c,onError:d}=ao(Ya,ce),p=(f=e.onlyRenderVisibleElements,ao(l((e=>f?ui(e.nodeInternals,{x:0,y:0,width:e.width,height:e.height},e.transform,!0):e.getNodes()),[f])));var f;const h=u(),m=a((()=>{if("undefined"==typeof ResizeObserver)return null;const e=new ResizeObserver((e=>{const t=e.map((e=>({id:e.target.getAttribute("data-id"),nodeElement:e.target,forceUpdate:!0})));c(t)}));return h.current=e,e}),[]);return s((()=>()=>{h?.current?.disconnect()}),[]),t.createElement("div",{className:"react-flow__nodes",style:da},p.map((a=>{let s=a.type||"default";e.nodeTypes[s]||(d?.("003",Jr(s)),s="default");const l=e.nodeTypes[s]||e.nodeTypes.default,c=!!(a.draggable||n&&void 0===a.draggable),u=!!(a.selectable||i&&void 0===a.selectable),p=!!(a.connectable||r&&void 0===a.connectable),f=!!(a.focusable||o&&void 0===a.focusable),h=e.nodeExtent?mo(a.positionAbsolute,e.nodeExtent):a.positionAbsolute,g=h?.x??0,y=h?.y??0,b=(({x:e,y:t,width:n,height:r,origin:o})=>n&&r?o[0]<0||o[1]<0||o[0]>1||o[1]>1?{x:e,y:t}:{x:e-n*o[0],y:t-r*o[1]}:{x:e,y:t})({x:g,y:y,width:a.width??0,height:a.height??0,origin:e.nodeOrigin});return t.createElement(l,{key:a.id,id:a.id,className:a.className,style:a.style,type:s,data:a.data,sourcePosition:a.sourcePosition||zo.Bottom,targetPosition:a.targetPosition||zo.Top,hidden:a.hidden,xPos:g,yPos:y,xPosOrigin:b.x,yPosOrigin:b.y,selectNodesOnDrag:e.selectNodesOnDrag,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,selected:!!a.selected,isDraggable:c,isSelectable:u,isConnectable:p,isFocusable:f,resizeObserver:m,dragHandle:a.dragHandle,zIndex:a[So]?.z??0,isParent:!!a[So]?.isParent,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,initialized:!!a.width&&!!a.height,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,ariaLabel:a.ariaLabel,hasHandleBounds:!!a[So]?.handleBounds})})))};Ua.displayName="NodeRenderer";var Ja=r(Ua);const Ka=(e,t,n)=>n===zo.Left?e-t:n===zo.Right?e+t:e,Qa=(e,t,n)=>n===zo.Top?e-t:n===zo.Bottom?e+t:e,qa="react-flow__edgeupdater",es=({position:e,centerX:n,centerY:r,radius:o=10,onMouseDown:i,onMouseEnter:a,onMouseOut:s,type:l})=>t.createElement("circle",{onMouseDown:i,onMouseEnter:a,onMouseOut:s,className:re([qa,`${qa}-${l}`]),cx:Ka(n,o,e),cy:Qa(r,o,e),r:o,stroke:"transparent",fill:"transparent"}),ts=()=>!0;var ns=e=>{const n=({id:n,className:r,type:o,data:i,onClick:s,onEdgeDoubleClick:l,selected:d,animated:p,label:f,labelStyle:h,labelShowBg:m,labelBgStyle:g,labelBgPadding:y,labelBgBorderRadius:b,style:v,source:w,target:x,sourceX:C,sourceY:k,targetX:E,targetY:S,sourcePosition:I,targetPosition:_,elementsSelectable:A,hidden:N,sourceHandleId:O,targetHandleId:R,onContextMenu:T,onMouseEnter:M,onMouseMove:P,onMouseLeave:D,reconnectRadius:B,onReconnect:j,onReconnectStart:L,onReconnectEnd:F,markerEnd:V,markerStart:z,rfId:G,ariaLabel:H,isFocusable:W,isReconnectable:X,pathOptions:Z,interactionWidth:$,disableKeyboardA11y:Y})=>{const U=u(null),[J,K]=c(!1),[Q,q]=c(!1),ee=so(),te=a((()=>`url('#${ii(z,G)}')`),[z,G]),ne=a((()=>`url('#${ii(V,G)}')`),[V,G]);if(N)return null;const oe=Mo(n,ee.getState,l),ie=Mo(n,ee.getState,T),ae=Mo(n,ee.getState,M),se=Mo(n,ee.getState,P),le=Mo(n,ee.getState,D),ce=(e,t)=>{if(0!==e.button)return;const{edges:r,isValidConnection:o}=ee.getState(),i=t?x:w,a=(t?R:O)||null,s=t?"target":"source",l=o||ts,c=t,u=r.find((e=>e.id===n));q(!0),L?.(e,u,s);xi({event:e,handleId:a,nodeId:i,onConnect:e=>j?.(u,e),isTarget:c,getState:ee.getState,setState:ee.setState,isValidConnection:l,edgeUpdaterType:s,onReconnectEnd:e=>{q(!1),F?.(e,u,s)}})},ue=()=>K(!0),de=()=>K(!1),pe=!A&&!s;return t.createElement("g",{className:re(["react-flow__edge",`react-flow__edge-${o}`,r,{selected:d,animated:p,inactive:pe,updating:J}]),onClick:e=>{const{edges:t,addSelectedEdges:r,unselectNodesAndEdges:o,multiSelectionActive:i}=ee.getState(),a=t.find((e=>e.id===n));a&&(A&&(ee.setState({nodesSelectionActive:!1}),a.selected&&i?(o({nodes:[],edges:[a]}),U.current?.blur()):r([n])),s&&s(e,a))},onDoubleClick:oe,onContextMenu:ie,onMouseEnter:ae,onMouseMove:se,onMouseLeave:le,onKeyDown:W?e=>{if(!Y&&Io.includes(e.key)&&A){const{unselectNodesAndEdges:t,addSelectedEdges:r,edges:o}=ee.getState();"Escape"===e.key?(U.current?.blur(),t({edges:[o.find((e=>e.id===n))]})):r([n])}}:void 0,tabIndex:W?0:void 0,role:W?"button":"img","data-testid":`rf__edge-${n}`,"aria-label":null===H?void 0:H||`Edge from ${w} to ${x}`,"aria-describedby":W?`${Zi}-${G}`:void 0,ref:U},!Q&&t.createElement(e,{id:n,source:w,target:x,selected:d,animated:p,label:f,labelStyle:h,labelShowBg:m,labelBgStyle:g,labelBgPadding:y,labelBgBorderRadius:b,data:i,style:v,sourceX:C,sourceY:k,targetX:E,targetY:S,sourcePosition:I,targetPosition:_,sourceHandleId:O,targetHandleId:R,markerStart:te,markerEnd:ne,pathOptions:Z,interactionWidth:$}),X&&t.createElement(t.Fragment,null,("source"===X||!0===X)&&t.createElement(es,{position:I,centerX:C,centerY:k,radius:B,onMouseDown:e=>ce(e,!0),onMouseEnter:ue,onMouseOut:de,type:"source"}),("target"===X||!0===X)&&t.createElement(es,{position:_,centerX:E,centerY:S,radius:B,onMouseDown:e=>ce(e,!1),onMouseEnter:ue,onMouseOut:de,type:"target"})))};return n.displayName="EdgeWrapper",r(n)};function rs(e){return{...{default:ns(e.default||ti),straight:ns(e.bezier||Ko),step:ns(e.step||Jo),smoothstep:ns(e.step||Uo),simplebezier:ns(e.simplebezier||Wo)},...Object.keys(e).filter((e=>!["default","bezier"].includes(e))).reduce(((t,n)=>(t[n]=ns(e[n]||ti),t)),{})}}function os(e,t,n=null){const r=(n?.x||0)+t.x,o=(n?.y||0)+t.y,i=n?.width||t.width,a=n?.height||t.height;switch(e){case zo.Top:return{x:r+i/2,y:o};case zo.Right:return{x:r+i,y:o+a/2};case zo.Bottom:return{x:r+i/2,y:o+a};case zo.Left:return{x:r,y:o+a/2}}}function is(e,t){return e?1!==e.length&&t?t&&e.find((e=>e.id===t))||null:e[0]:null}function as(e){const t=e?.[So]?.handleBounds||null,n=t&&e?.width&&e?.height&&void 0!==e?.positionAbsolute?.x&&void 0!==e?.positionAbsolute?.y;return[{x:e?.positionAbsolute?.x||0,y:e?.positionAbsolute?.y||0,width:e?.width||0,height:e?.height||0},t,!!n]}const ss=[{level:0,isMaxLevel:!0,edges:[]}];function ls(e,t,n){const r=ao(l((n=>e?n.edges.filter((e=>{const r=t.get(e.source),o=t.get(e.target);return r?.width&&r?.height&&o?.width&&o?.height&&function({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:r,targetWidth:o,targetHeight:i,width:a,height:s,transform:l}){const c={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+n,t.x+o),y2:Math.max(e.y+r,t.y+i)};c.x===c.x2&&(c.x2+=1),c.y===c.y2&&(c.y2+=1);const u=wo({x:(0-l[0])/l[2],y:(0-l[1])/l[2],width:a/l[2],height:s/l[2]}),d=Math.max(0,Math.min(u.x2,c.x2)-Math.max(u.x,c.x)),p=Math.max(0,Math.min(u.y2,c.y2)-Math.max(u.y,c.y));return Math.ceil(d*p)>0}({sourcePos:r.positionAbsolute||{x:0,y:0},targetPos:o.positionAbsolute||{x:0,y:0},sourceWidth:r.width,sourceHeight:r.height,targetWidth:o.width,targetHeight:o.height,width:n.width,height:n.height,transform:n.transform})})):n.edges),[e,t]));return function(e,t,n=!1){let r=-1;const o=e.reduce(((e,o)=>{const i=Eo(o.zIndex);let a=i?o.zIndex:0;if(n){const e=t.get(o.target),n=t.get(o.source),r=o.selected||e?.selected||n?.selected,s=Math.max(n?.[So]?.z||0,e?.[So]?.z||0,1e3);a=(i?o.zIndex:0)+(r?s:0)}return e[a]?e[a].push(o):e[a]=[o],r=a>r?a:r,e}),{}),i=Object.entries(o).map((([e,t])=>{const n=+e;return{edges:t,level:n,isMaxLevel:n===r}}));return 0===i.length?ss:i}(r,t,n)}const cs={[Vo.Arrow]:({color:e="none",strokeWidth:n=1})=>t.createElement("polyline",{style:{stroke:e,strokeWidth:n},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),[Vo.ArrowClosed]:({color:e="none",strokeWidth:n=1})=>t.createElement("polyline",{style:{stroke:e,fill:e,strokeWidth:n},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})};const us=({id:e,type:n,color:r,width:o=12.5,height:i=12.5,markerUnits:s="strokeWidth",strokeWidth:l,orient:c="auto-start-reverse"})=>{const u=function(e){const t=so();return a((()=>Object.prototype.hasOwnProperty.call(cs,e)?cs[e]:(t.getState().onError?.("009",eo(e)),null)),[e])}(n);return u?t.createElement("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${o}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:s,orient:c,refX:"0",refY:"0"},t.createElement(u,{color:r,strokeWidth:l})):null},ds=({defaultColor:e,rfId:n})=>{const r=ao(l((({defaultColor:e,rfId:t})=>n=>{const r=[];return n.edges.reduce(((n,o)=>([o.markerStart,o.markerEnd].forEach((o=>{if(o&&"object"==typeof o){const i=ii(o,t);r.includes(i)||(n.push({id:i,color:o.color||e,...o}),r.push(i))}})),n)),[]).sort(((e,t)=>e.id.localeCompare(t.id)))})({defaultColor:e,rfId:n}),[e,n]),((e,t)=>!(e.length!==t.length||e.some(((e,n)=>e.id!==t[n].id)))));return t.createElement("defs",null,r.map((e=>t.createElement(us,{id:e.id,key:e.id,type:e.type,color:e.color,width:e.width,height:e.height,markerUnits:e.markerUnits,strokeWidth:e.strokeWidth,orient:e.orient}))))};ds.displayName="MarkerDefinitions";var ps=r(ds);const fs=e=>({nodesConnectable:e.nodesConnectable,edgesFocusable:e.edgesFocusable,edgesUpdatable:e.edgesUpdatable,elementsSelectable:e.elementsSelectable,width:e.width,height:e.height,connectionMode:e.connectionMode,nodeInternals:e.nodeInternals,onError:e.onError}),hs=({defaultMarkerColor:e,onlyRenderVisibleElements:n,elevateEdgesOnSelect:r,rfId:o,edgeTypes:i,noPanClassName:a,onEdgeContextMenu:s,onEdgeMouseEnter:l,onEdgeMouseMove:c,onEdgeMouseLeave:u,onEdgeClick:d,onEdgeDoubleClick:p,onReconnect:f,onReconnectStart:h,onReconnectEnd:m,reconnectRadius:g,children:y,disableKeyboardA11y:b})=>{const{edgesFocusable:v,edgesUpdatable:w,elementsSelectable:x,width:C,height:k,connectionMode:E,nodeInternals:S,onError:I}=ao(fs,ce),_=ls(n,S,r);return C?t.createElement(t.Fragment,null,_.map((({level:n,edges:r,isMaxLevel:y})=>t.createElement("svg",{key:n,style:{zIndex:n},width:C,height:k,className:"react-flow__edges react-flow__container"},y&&t.createElement(ps,{defaultColor:e,rfId:o}),t.createElement("g",null,r.map((e=>{const[n,r,y]=as(S.get(e.source)),[C,k,_]=as(S.get(e.target));if(!y||!_)return null;let A=e.type||"default";i[A]||(I?.("011",ro(A)),A="default");const N=i[A]||i.default,O=E===Bo.Strict?k.target:(k.target??[]).concat(k.source??[]),R=is(r.source,e.sourceHandle),T=is(O,e.targetHandle),M=R?.position||zo.Bottom,P=T?.position||zo.Top,D=!!(e.focusable||v&&void 0===e.focusable),B=e.reconnectable||e.updatable,j=void 0!==f&&(B||w&&void 0===B);if(!R||!T)return I?.("008",to(R,e)),null;const{sourceX:L,sourceY:F,targetX:V,targetY:z}=((e,t,n,r,o,i)=>{const a=os(n,e,t),s=os(i,r,o);return{sourceX:a.x,sourceY:a.y,targetX:s.x,targetY:s.y}})(n,R,M,C,T,P);return t.createElement(N,{key:e.id,id:e.id,className:re([e.className,a]),type:A,data:e.data,selected:!!e.selected,animated:!!e.animated,hidden:!!e.hidden,label:e.label,labelStyle:e.labelStyle,labelShowBg:e.labelShowBg,labelBgStyle:e.labelBgStyle,labelBgPadding:e.labelBgPadding,labelBgBorderRadius:e.labelBgBorderRadius,style:e.style,source:e.source,target:e.target,sourceHandleId:e.sourceHandle,targetHandleId:e.targetHandle,markerEnd:e.markerEnd,markerStart:e.markerStart,sourceX:L,sourceY:F,targetX:V,targetY:z,sourcePosition:M,targetPosition:P,elementsSelectable:x,onContextMenu:s,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,onClick:d,onEdgeDoubleClick:p,onReconnect:f,onReconnectStart:h,onReconnectEnd:m,reconnectRadius:g,rfId:o,ariaLabel:e.ariaLabel,isFocusable:D,isReconnectable:j,pathOptions:"pathOptions"in e?e.pathOptions:void 0,interactionWidth:e.interactionWidth,disableKeyboardA11y:b})})))))),y):null};hs.displayName="EdgeRenderer";var ms=r(hs);const gs=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function ys({children:e}){const n=ao(gs);return t.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:n}},e)}const bs={[zo.Left]:zo.Right,[zo.Right]:zo.Left,[zo.Top]:zo.Bottom,[zo.Bottom]:zo.Top},vs=({nodeId:e,handleType:n,style:r,type:o=Fo.Bezier,CustomComponent:i,connectionStatus:a})=>{const{fromNode:s,handleId:c,toX:u,toY:d,connectionMode:p}=ao(l((t=>({fromNode:t.nodeInternals.get(e),handleId:t.connectionHandleId,toX:(t.connectionPosition.x-t.transform[0])/t.transform[2],toY:(t.connectionPosition.y-t.transform[1])/t.transform[2],connectionMode:t.connectionMode})),[e]),ce),f=s?.[So]?.handleBounds;let h=f?.[n];if(p===Bo.Loose&&(h=h||f?.["source"===n?"target":"source"]),!s||!h)return null;const m=c?h.find((e=>e.id===c)):h[0],g=m?m.x+m.width/2:(s.width??0)/2,y=m?m.y+m.height/2:s.height??0,b=(s.positionAbsolute?.x??0)+g,v=(s.positionAbsolute?.y??0)+y,w=m?.position,x=w?bs[w]:null;if(!w||!x)return null;if(i)return t.createElement(i,{connectionLineType:o,connectionLineStyle:r,fromNode:s,fromHandle:m,fromX:b,fromY:v,toX:u,toY:d,fromPosition:w,toPosition:x,connectionStatus:a});let C="";const k={sourceX:b,sourceY:v,sourcePosition:w,targetX:u,targetY:d,targetPosition:x};return o===Fo.Bezier?[C]=ei(k):o===Fo.Step?[C]=Yo({...k,borderRadius:0}):o===Fo.SmoothStep?[C]=Yo(k):o===Fo.SimpleBezier?[C]=Ho(k):C=`M${b},${v} ${u},${d}`,t.createElement("path",{d:C,fill:"none",className:"react-flow__connection-path",style:r})};vs.displayName="ConnectionLine";const ws=e=>({nodeId:e.connectionNodeId,handleType:e.connectionHandleType,nodesConnectable:e.nodesConnectable,connectionStatus:e.connectionStatus,width:e.width,height:e.height});function xs({containerStyle:e,style:n,type:r,component:o}){const{nodeId:i,handleType:a,nodesConnectable:s,width:l,height:c,connectionStatus:u}=ao(ws,ce);return!!(i&&a&&l&&s)?t.createElement("svg",{style:e,width:l,height:c,className:"react-flow__edges react-flow__connectionline react-flow__container"},t.createElement("g",{className:re(["react-flow__connection",u])},t.createElement(vs,{nodeId:i,handleType:a,style:n,type:r,CustomComponent:o,connectionStatus:u}))):null}function Cs(e,t){const n=u(null),r=so();return a((()=>{if("development"===process.env.NODE_ENV){const t=Object.keys(e);ce(n.current,t)&&r.getState().onError?.("002",Ur()),n.current=t}return t(e)}),[e])}const ks=({nodeTypes:e,edgeTypes:n,onMove:r,onMoveStart:o,onMoveEnd:i,onInit:a,onNodeClick:l,onEdgeClick:c,onNodeDoubleClick:d,onEdgeDoubleClick:p,onNodeMouseEnter:f,onNodeMouseMove:h,onNodeMouseLeave:m,onNodeContextMenu:g,onSelectionContextMenu:y,onSelectionStart:b,onSelectionEnd:v,connectionLineType:w,connectionLineStyle:x,connectionLineComponent:C,connectionLineContainerStyle:k,selectionKeyCode:E,selectionOnDrag:S,selectionMode:I,multiSelectionKeyCode:_,panActivationKeyCode:A,zoomActivationKeyCode:N,deleteKeyCode:O,onlyRenderVisibleElements:R,elementsSelectable:T,selectNodesOnDrag:M,defaultViewport:P,translateExtent:D,minZoom:B,maxZoom:j,preventScrolling:L,defaultMarkerColor:F,zoomOnScroll:V,zoomOnPinch:z,panOnScroll:G,panOnScrollSpeed:H,panOnScrollMode:W,zoomOnDoubleClick:X,panOnDrag:Z,onPaneClick:$,onPaneMouseEnter:Y,onPaneMouseMove:U,onPaneMouseLeave:J,onPaneScroll:K,onPaneContextMenu:Q,onEdgeContextMenu:q,onEdgeMouseEnter:ee,onEdgeMouseMove:te,onEdgeMouseLeave:ne,onReconnect:re,onReconnectStart:oe,onReconnectEnd:ie,reconnectRadius:ae,noDragClassName:se,noWheelClassName:le,noPanClassName:ce,elevateEdgesOnSelect:ue,disableKeyboardA11y:de,nodeOrigin:pe,nodeExtent:fe,rfId:he})=>{const me=Cs(e,$a),ge=Cs(n,rs);return function(e){const t=ca(),n=u(!1);s((()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout((()=>e(t)),1),n.current=!0)}),[e,t.viewportInitialized])}(a),t.createElement(Za,{onPaneClick:$,onPaneMouseEnter:Y,onPaneMouseMove:U,onPaneMouseLeave:J,onPaneContextMenu:Q,onPaneScroll:K,deleteKeyCode:O,selectionKeyCode:E,selectionOnDrag:S,selectionMode:I,onSelectionStart:b,onSelectionEnd:v,multiSelectionKeyCode:_,panActivationKeyCode:A,zoomActivationKeyCode:N,elementsSelectable:T,onMove:r,onMoveStart:o,onMoveEnd:i,zoomOnScroll:V,zoomOnPinch:z,zoomOnDoubleClick:X,panOnScroll:G,panOnScrollSpeed:H,panOnScrollMode:W,panOnDrag:Z,defaultViewport:P,translateExtent:D,minZoom:B,maxZoom:j,onSelectionContextMenu:y,preventScrolling:L,noDragClassName:se,noWheelClassName:le,noPanClassName:ce,disableKeyboardA11y:de},t.createElement(ys,null,t.createElement(ms,{edgeTypes:ge,onEdgeClick:c,onEdgeDoubleClick:p,onlyRenderVisibleElements:R,onEdgeContextMenu:q,onEdgeMouseEnter:ee,onEdgeMouseMove:te,onEdgeMouseLeave:ne,onReconnect:re,onReconnectStart:oe,onReconnectEnd:ie,reconnectRadius:ae,defaultMarkerColor:F,noPanClassName:ce,elevateEdgesOnSelect:!!ue,disableKeyboardA11y:de,rfId:he},t.createElement(xs,{style:x,type:w,component:C,containerStyle:k})),t.createElement("div",{className:"react-flow__edgelabel-renderer"}),t.createElement(Ja,{nodeTypes:me,onNodeClick:l,onNodeDoubleClick:d,onNodeMouseEnter:f,onNodeMouseMove:h,onNodeMouseLeave:m,onNodeContextMenu:g,selectNodesOnDrag:M,onlyRenderVisibleElements:R,noPanClassName:ce,noDragClassName:se,disableKeyboardA11y:de,nodeOrigin:pe,nodeExtent:fe,rfId:he})))};ks.displayName="GraphView";var Es=r(ks);const Ss=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Is={rfId:"1",width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:Ss,nodeExtent:Ss,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:Bo.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:[0,0],nodeDragThreshold:0,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesUpdatable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,onSelectionChange:[],multiSelectionActive:!1,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,connectionRadius:20,onError:_o,isValidConnection:void 0},_s=()=>((e,t)=>e?le(e,t):le)(((e,t)=>({...Is,setNodes:n=>{const{nodeInternals:r,nodeOrigin:o,elevateNodesOnSelect:i}=t();e({nodeInternals:ta(n,r,o,i)})},getNodes:()=>Array.from(t().nodeInternals.values()),setEdges:n=>{const{defaultEdgeOptions:r={}}=t();e({edges:n.map((e=>({...r,...e})))})},setDefaultNodesAndEdges:(n,r)=>{const o=void 0!==n,i=void 0!==r,a=o?ta(n,new Map,t().nodeOrigin,t().elevateNodesOnSelect):new Map;e({nodeInternals:a,edges:i?r:[],hasDefaultNodes:o,hasDefaultEdges:i})},updateNodeDimensions:n=>{const{onNodesChange:r,nodeInternals:o,fitViewOnInit:i,fitViewOnInitDone:a,fitViewOnInitOptions:s,domNode:l,nodeOrigin:c}=t(),u=l?.querySelector(".react-flow__viewport");if(!u)return;const d=window.getComputedStyle(u),{m22:p}=new window.DOMMatrixReadOnly(d.transform),f=n.reduce(((e,t)=>{const n=o.get(t.id);if(n?.hidden)o.set(n.id,{...n,[So]:{...n[So],handleBounds:void 0}});else if(n){const r=fo(t.nodeElement);!(!r.width||!r.height||n.width===r.width&&n.height===r.height&&!t.forceUpdate)&&(o.set(n.id,{...n,[So]:{...n[So],handleBounds:{source:Pa(".source",t.nodeElement,p,c),target:Pa(".target",t.nodeElement,p,c)}},...r}),e.push({id:n.id,type:"dimensions",dimensions:r}))}return e}),[]);ea(o,c);const h=a||i&&!a&&na(t,{initial:!0,...s});e({nodeInternals:new Map(o),fitViewOnInitDone:h}),f?.length>0&&r?.(f)},updateNodePositions:(e,n=!0,r=!1)=>{const{triggerNodeChanges:o}=t(),i=e.map((e=>{const t={id:e.id,type:"position",dragging:r};return n&&(t.positionAbsolute=e.positionAbsolute,t.position=e.position),t}));o(i)},triggerNodeChanges:n=>{const{onNodesChange:r,nodeInternals:o,hasDefaultNodes:i,nodeOrigin:a,getNodes:s,elevateNodesOnSelect:l}=t();if(n?.length){if(i){const t=ta(Ca(n,s()),o,a,l);e({nodeInternals:t})}r?.(n)}},addSelectedNodes:n=>{const{multiSelectionActive:r,edges:o,getNodes:i}=t();let a,s=null;r?a=n.map((e=>Ea(e,!0))):(a=Sa(i(),n),s=Sa(o,[])),ia({changedNodes:a,changedEdges:s,get:t,set:e})},addSelectedEdges:n=>{const{multiSelectionActive:r,edges:o,getNodes:i}=t();let a,s=null;r?a=n.map((e=>Ea(e,!0))):(a=Sa(o,n),s=Sa(i(),[])),ia({changedNodes:s,changedEdges:a,get:t,set:e})},unselectNodesAndEdges:({nodes:n,edges:r}={})=>{const{edges:o,getNodes:i}=t(),a=r||o;ia({changedNodes:(n||i()).map((e=>(e.selected=!1,Ea(e.id,!1)))),changedEdges:a.map((e=>Ea(e.id,!1))),get:t,set:e})},setMinZoom:n=>{const{d3Zoom:r,maxZoom:o}=t();r?.scaleExtent([n,o]),e({minZoom:n})},setMaxZoom:n=>{const{d3Zoom:r,minZoom:o}=t();r?.scaleExtent([o,n]),e({maxZoom:n})},setTranslateExtent:n=>{t().d3Zoom?.translateExtent(n),e({translateExtent:n})},resetSelectedElements:()=>{const{edges:n,getNodes:r}=t();ia({changedNodes:r().filter((e=>e.selected)).map((e=>Ea(e.id,!1))),changedEdges:n.filter((e=>e.selected)).map((e=>Ea(e.id,!1))),get:t,set:e})},setNodeExtent:n=>{const{nodeInternals:r}=t();r.forEach((e=>{e.positionAbsolute=mo(e.position,n)})),e({nodeExtent:n,nodeInternals:new Map(r)})},panBy:e=>{const{transform:n,width:r,height:o,d3Zoom:i,d3Selection:a,translateExtent:s}=t();if(!i||!a||!e.x&&!e.y)return!1;const l=jr.translate(n[0]+e.x,n[1]+e.y).scale(n[2]),c=[[0,0],[r,o]],u=i?.constrain()(l,c,s);i.transform(a,u);return n[0]!==u.x||n[1]!==u.y||n[2]!==u.k},cancelConnection:()=>e({connectionNodeId:Is.connectionNodeId,connectionHandleId:Is.connectionHandleId,connectionHandleType:Is.connectionHandleType,connectionStatus:Is.connectionStatus,connectionStartHandle:Is.connectionStartHandle,connectionEndHandle:Is.connectionEndHandle}),reset:()=>e({...Is})})),Object.is),As=({children:e})=>{const n=u(null);return n.current||(n.current=_s()),t.createElement(Yr,{value:n.current},e)};As.displayName="ReactFlowProvider";const Ns=({children:e})=>o($r)?t.createElement(t.Fragment,null,e):t.createElement(As,null,e);Ns.displayName="ReactFlowWrapper";const Os={input:Ni,default:_i,output:Ri,group:Ti},Rs={default:ti,straight:Ko,step:Jo,smoothstep:Uo,simplebezier:Wo},Ts=[0,0],Ms=[15,15],Ps={x:0,y:0,zoom:1},Ds={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},Bs=n((({nodes:e,edges:n,defaultNodes:r,defaultEdges:o,className:i,nodeTypes:a=Os,edgeTypes:s=Rs,onNodeClick:l,onEdgeClick:c,onInit:u,onMove:d,onMoveStart:p,onMoveEnd:f,onConnect:h,onConnectStart:m,onConnectEnd:g,onClickConnectStart:y,onClickConnectEnd:b,onNodeMouseEnter:v,onNodeMouseMove:w,onNodeMouseLeave:x,onNodeContextMenu:C,onNodeDoubleClick:k,onNodeDragStart:E,onNodeDrag:S,onNodeDragStop:I,onNodesDelete:_,onEdgesDelete:A,onSelectionChange:N,onSelectionDragStart:O,onSelectionDrag:R,onSelectionDragStop:T,onSelectionContextMenu:M,onSelectionStart:P,onSelectionEnd:D,connectionMode:B=Bo.Strict,connectionLineType:j=Fo.Bezier,connectionLineStyle:L,connectionLineComponent:F,connectionLineContainerStyle:V,deleteKeyCode:z="Backspace",selectionKeyCode:G="Shift",selectionOnDrag:H=!1,selectionMode:W=Lo.Full,panActivationKeyCode:X="Space",multiSelectionKeyCode:Z=(Ro()?"Meta":"Control"),zoomActivationKeyCode:$=(Ro()?"Meta":"Control"),snapToGrid:Y=!1,snapGrid:U=Ms,onlyRenderVisibleElements:J=!1,selectNodesOnDrag:K=!0,nodesDraggable:Q,nodesConnectable:q,nodesFocusable:ee,nodeOrigin:te=Ts,edgesFocusable:ne,edgesUpdatable:oe,elementsSelectable:ie,defaultViewport:ae=Ps,minZoom:se=.5,maxZoom:le=2,translateExtent:ce=Ss,preventScrolling:ue=!0,nodeExtent:de,defaultMarkerColor:pe="#b1b1b7",zoomOnScroll:fe=!0,zoomOnPinch:he=!0,panOnScroll:me=!1,panOnScrollSpeed:ge=.5,panOnScrollMode:ye=jo.Free,zoomOnDoubleClick:be=!0,panOnDrag:ve=!0,onPaneClick:we,onPaneMouseEnter:xe,onPaneMouseMove:Ce,onPaneMouseLeave:ke,onPaneScroll:Ee,onPaneContextMenu:Se,children:Ie,onEdgeContextMenu:_e,onEdgeDoubleClick:Ae,onEdgeMouseEnter:Ne,onEdgeMouseMove:Oe,onEdgeMouseLeave:Re,onEdgeUpdate:Te,onEdgeUpdateStart:Me,onEdgeUpdateEnd:Pe,onReconnect:De,onReconnectStart:Be,onReconnectEnd:je,reconnectRadius:Le=10,edgeUpdaterRadius:Fe=10,onNodesChange:Ve,onEdgesChange:ze,noDragClassName:Ge="nodrag",noWheelClassName:He="nowheel",noPanClassName:We="nopan",fitView:Xe=!1,fitViewOptions:Ze,connectOnClick:$e=!0,attributionPosition:Ye,proOptions:Ue,defaultEdgeOptions:Je,elevateNodesOnSelect:Ke=!0,elevateEdgesOnSelect:Qe=!1,disableKeyboardA11y:qe=!1,autoPanOnConnect:et=!0,autoPanOnNodeDrag:tt=!0,connectionRadius:nt=20,isValidConnection:rt,onError:ot,style:it,id:at,nodeDragThreshold:st,...lt},ct)=>{const ut=at||"1";return t.createElement("div",{...lt,style:{...it,...Ds},ref:ct,className:re(["react-flow",i]),"data-testid":"rf__wrapper",id:at},t.createElement(Ns,null,t.createElement(Es,{onInit:u,onMove:d,onMoveStart:p,onMoveEnd:f,onNodeClick:l,onEdgeClick:c,onNodeMouseEnter:v,onNodeMouseMove:w,onNodeMouseLeave:x,onNodeContextMenu:C,onNodeDoubleClick:k,nodeTypes:a,edgeTypes:s,connectionLineType:j,connectionLineStyle:L,connectionLineComponent:F,connectionLineContainerStyle:V,selectionKeyCode:G,selectionOnDrag:H,selectionMode:W,deleteKeyCode:z,multiSelectionKeyCode:Z,panActivationKeyCode:X,zoomActivationKeyCode:$,onlyRenderVisibleElements:J,selectNodesOnDrag:K,defaultViewport:ae,translateExtent:ce,minZoom:se,maxZoom:le,preventScrolling:ue,zoomOnScroll:fe,zoomOnPinch:he,zoomOnDoubleClick:be,panOnScroll:me,panOnScrollSpeed:ge,panOnScrollMode:ye,panOnDrag:ve,onPaneClick:we,onPaneMouseEnter:xe,onPaneMouseMove:Ce,onPaneMouseLeave:ke,onPaneScroll:Ee,onPaneContextMenu:Se,onSelectionContextMenu:M,onSelectionStart:P,onSelectionEnd:D,onEdgeContextMenu:_e,onEdgeDoubleClick:Ae,onEdgeMouseEnter:Ne,onEdgeMouseMove:Oe,onEdgeMouseLeave:Re,onReconnect:De??Te,onReconnectStart:Be??Me,onReconnectEnd:je??Pe,reconnectRadius:Le??Fe,defaultMarkerColor:pe,noDragClassName:Ge,noWheelClassName:He,noPanClassName:We,elevateEdgesOnSelect:Qe,rfId:ut,disableKeyboardA11y:qe,nodeOrigin:te,nodeExtent:de}),t.createElement(Gi,{nodes:e,edges:n,defaultNodes:r,defaultEdges:o,onConnect:h,onConnectStart:m,onConnectEnd:g,onClickConnectStart:y,onClickConnectEnd:b,nodesDraggable:Q,nodesConnectable:q,nodesFocusable:ee,edgesFocusable:ne,edgesUpdatable:oe,elementsSelectable:ie,elevateNodesOnSelect:Ke,minZoom:se,maxZoom:le,nodeExtent:de,onNodesChange:Ve,onEdgesChange:ze,snapToGrid:Y,snapGrid:U,connectionMode:B,translateExtent:ce,connectOnClick:$e,defaultEdgeOptions:Je,fitView:Xe,fitViewOptions:Ze,onNodesDelete:_,onEdgesDelete:A,onNodeDragStart:E,onNodeDrag:S,onNodeDragStop:I,onSelectionDrag:R,onSelectionDragStart:O,onSelectionDragStop:T,noPanClassName:We,nodeOrigin:te,rfId:ut,autoPanOnConnect:et,autoPanOnNodeDrag:tt,onError:ot,connectionRadius:nt,isValidConnection:rt,nodeDragThreshold:st}),t.createElement(Li,{onSelectionChange:N}),Ie,t.createElement(uo,{proOptions:Ue,position:Ye}),t.createElement(Ui,{rfId:ut,disableKeyboardA11y:qe})))}));Bs.displayName="ReactFlow";const js=e=>e.getNodes();const Ls=e=>e.edges;const Fs=({id:e,x:n,y:r,width:o,height:i,style:a,color:s,strokeColor:l,strokeWidth:c,className:u,borderRadius:d,shapeRendering:p,onClick:f,selected:h})=>{const{background:m,backgroundColor:g}=a||{},y=s||m||g;return t.createElement("rect",{className:re(["react-flow__minimap-node",{selected:h},u]),x:n,y:r,rx:d,ry:d,width:o,height:i,fill:y,stroke:l,strokeWidth:c,shapeRendering:p,onClick:f?t=>f(t,e):void 0})};Fs.displayName="MiniMapNode";var Vs=r(Fs);const zs=e=>e.nodeOrigin,Gs=e=>e.getNodes().filter((e=>!e.hidden&&e.width&&e.height)),Hs=e=>e instanceof Function?e:()=>e;var Ws=r((function({nodeStrokeColor:e="transparent",nodeColor:n="#e2e2e2",nodeClassName:r="",nodeBorderRadius:o=5,nodeStrokeWidth:i=2,nodeComponent:a=Vs,onClick:s}){const l=ao(Gs,ce),c=ao(zs),u=Hs(n),d=Hs(e),p=Hs(r),f="undefined"==typeof window||window.chrome?"crispEdges":"geometricPrecision";return t.createElement(t.Fragment,null,l.map((e=>{const{x:n,y:r}=li(e,c).positionAbsolute;return t.createElement(a,{key:e.id,x:n,y:r,width:e.width,height:e.height,style:e.style,selected:e.selected,className:p(e),color:u(e),borderRadius:o,strokeColor:d(e),strokeWidth:i,shapeRendering:f,onClick:s,id:e.id})})))}));const Xs=e=>{const t=e.getNodes(),n={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:n,boundingRect:t.length>0?(r=ci(t,e.nodeOrigin),o=n,xo(vo(wo(r),wo(o)))):n,rfId:e.rfId};var r,o};function Zs({style:e,className:n,nodeStrokeColor:r="transparent",nodeColor:o="#e2e2e2",nodeClassName:i="",nodeBorderRadius:a=5,nodeStrokeWidth:l=2,nodeComponent:c,maskColor:d="rgb(240, 240, 240, 0.6)",maskStrokeColor:p="none",maskStrokeWidth:f=1,position:h="bottom-right",onClick:m,onNodeClick:g,pannable:y=!1,zoomable:b=!1,ariaLabel:v="React Flow mini map",inversePan:w=!1,zoomStep:x=10,offsetScale:C=5}){const k=so(),E=u(null),{boundingRect:S,viewBB:I,rfId:_}=ao(Xs,ce),A=e?.width??200,N=e?.height??150,O=S.width/A,R=S.height/N,T=Math.max(O,R),M=T*A,P=T*N,D=C*T,B=S.x-(M-S.width)/2-D,j=S.y-(P-S.height)/2-D,L=M+2*D,F=P+2*D,V=`react-flow__minimap-desc-${_}`,z=u(0);z.current=T,s((()=>{if(E.current){const e=_t(E.current),t=e=>{const{transform:t,d3Selection:n,d3Zoom:r}=k.getState();if("wheel"!==e.sourceEvent.type||!n||!r)return;const o=-e.sourceEvent.deltaY*(1===e.sourceEvent.deltaMode?.05:e.sourceEvent.deltaMode?1:.002)*x,i=t[2]*Math.pow(2,o);r.scaleTo(n,i)},n=e=>{const{transform:t,d3Selection:n,d3Zoom:r,translateExtent:o,width:i,height:a}=k.getState();if("mousemove"!==e.sourceEvent.type||!n||!r)return;const s=z.current*Math.max(1,t[2])*(w?-1:1),l={x:t[0]-e.sourceEvent.movementX*s,y:t[1]-e.sourceEvent.movementY*s},c=[[0,0],[i,a]],u=jr.translate(l.x,l.y).scale(t[2]),d=r.constrain()(u,c,o);r.transform(n,d)},r=Zr().on("zoom",y?n:null).on("zoom.wheel",b?t:null);return e.call(r),()=>{e.on("zoom",null)}}}),[y,b,w,x]);const G=m?e=>{const t=At(e);m(e,{x:t[0],y:t[1]})}:void 0,H=g?(e,t)=>{const n=k.getState().nodeInternals.get(t);g(e,n)}:void 0;return t.createElement(co,{position:h,style:e,className:re(["react-flow__minimap",n]),"data-testid":"rf__minimap"},t.createElement("svg",{width:A,height:N,viewBox:`${B} ${j} ${L} ${F}`,role:"img","aria-labelledby":V,ref:E,onClick:G},v&&t.createElement("title",{id:V},v),t.createElement(Ws,{onClick:H,nodeColor:o,nodeStrokeColor:r,nodeBorderRadius:a,nodeClassName:i,nodeStrokeWidth:l,nodeComponent:c}),t.createElement("path",{className:"react-flow__minimap-mask",d:`M${B-D},${j-D}h${L+2*D}v${F+2*D}h${-L-2*D}z\n M${I.x},${I.y}h${I.width}v${I.height}h${-I.width}z`,fill:d,fillRule:"evenodd",stroke:p,strokeWidth:f,pointerEvents:"none"})))}Zs.displayName="MiniMap";var $s,Ys=r(Zs);function Us({color:e,dimensions:n,lineWidth:r}){return t.createElement("path",{stroke:e,strokeWidth:r,d:`M${n[0]/2} 0 V${n[1]} M0 ${n[1]/2} H${n[0]}`})}function Js({color:e,radius:n}){return t.createElement("circle",{cx:n,cy:n,r:n,fill:e})}!function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"}($s||($s={}));const Ks={[$s.Dots]:"#91919a",[$s.Lines]:"#eee",[$s.Cross]:"#e2e2e2"},Qs={[$s.Dots]:1,[$s.Lines]:1,[$s.Cross]:6},qs=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function el({id:e,variant:n=$s.Dots,gap:r=20,size:o,lineWidth:i=1,offset:a=2,color:s,style:l,className:c}){const d=u(null),{transform:p,patternId:f}=ao(qs,ce),h=s||Ks[n],m=o||Qs[n],g=n===$s.Dots,y=n===$s.Cross,b=Array.isArray(r)?r:[r,r],v=[b[0]*p[2]||1,b[1]*p[2]||1],w=m*p[2],x=y?[w,w]:v,C=g?[w/a,w/a]:[x[0]/a,x[1]/a];return t.createElement("svg",{className:re(["react-flow__background",c]),style:{...l,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:d,"data-testid":"rf__background"},t.createElement("pattern",{id:f+e,x:p[0]%v[0],y:p[1]%v[1],width:v[0],height:v[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${C[0]},-${C[1]})`},g?t.createElement(Js,{color:h,radius:w/a}):t.createElement(Us,{dimensions:x,color:h,lineWidth:i})),t.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${f+e})`}))}el.displayName="Background";var tl=r(el);const nl=({src_nid:e,src_ioid:t,trg_nid:n,trg_ioid:r})=>[`${e}:${t}`,`${n}:${r}`].sort().join("--"),rl=0,ol=10,il=20,al=30,sl=ol,ll=e=>"string"==typeof e?e:e===rl?"DEBUG":e===ol?"INFO":e===il?"WARN":e===al?"ERROR":"UNKNOWN";class cl{constructor(e,t=ol){this.name=e,this.level=(e=>{if("number"==typeof e)return e;const t=e.toLowerCase();if("debug"===t)return rl;if("info"===t)return ol;if("warn"===t||"warning"===t)return il;if("error"===t)return al;throw new Error(`Unknown log level: ${e}`)})(t),this._level_name=ll(t)}set_level(e){this.level=e,this._level_name=ll(e)}_fomat_message(e,...t){return`[${this.name}] ${this._level_name}: ${e} ${t.map((e=>JSON.stringify(e,function(){const e=[];return function(t,n){if("object"!=typeof n||null===n)return n;for(;e.length>0&&e.at(-1)!==this;)e.pop();return e.includes(n)?"[Circular]":(e.push(n),n)}}()))).join(" ")}`}debug(e,...t){this.level<=rl&&console.debug(this._fomat_message(e,...t))}info(e,...t){this.level<=ol&&console.info(this._fomat_message(e,...t))}warn(e,...t){this.level<=il&&console.warn(this._fomat_message(e,...t))}error(e,...t){this.level<=al&&console.error(this._fomat_message(e,...t))}}const ul=(e,t)=>("<NoValue>"===e.value&&(e.value=void 0),"<NoValue>"===e.fullvalue&&(e.fullvalue=void 0),void 0===e.try_get_full_value&&(e.try_get_full_value=()=>{t&&void 0!==e.node&&void 0!==e.id&&t.worker?.get_io_full_value({nid:e.node,ioid:e.id})}),void 0===e.hidden&&(e.hidden=!1),void 0===e.set_hidden&&(e.set_hidden=n=>{t&&void 0!==e.node&&void 0!==e.id&&t.worker?.update_io_options({nid:e.node,ioid:e.id,options:{hidden:n}})}),e),dl=(e,t,n)=>{if(((e,t)=>{const n=e.frontend||{};if(n.size||(n.size=[200,100]),!n.pos||2!==n.pos.length||isNaN(n.pos[0])||null===n.pos[0]||isNaN(n.pos[1])||null===n.pos[1])if(t&&t.rf_instance&&null!==t.reactflowRef){const e=t.reactflowRef.getBoundingClientRect(),r=e.left+e.width/2,o=e.top+e.height/2,i=t.rf_instance.screenToFlowPosition({x:r,y:o});n.pos=[i.x-n.size[0]/2,i.y-n.size[1]/2]}else n.pos=[0,0];n.collapsed||(n.collapsed=!1),e.frontend=n})(e,n),void 0===(e=te(e)).id)throw new Error("Node must have an id");for(const t in e.io)e.io[t].node=e.id,ul(e.io[t],n);return{position:{x:e.frontend.pos[0],y:e.frontend.pos[1]},data:{UseNodeStore:t},type:"default",...e}},pl=e=>{const t={...e},n=e=>{const t=o.getState();if(e.from_remote){let n=i.get_node(e.node.id,!1);if(!n)try{n=(e=>Z(((t,n)=>te(ne(e)))))(e.node),i.nodesstates.set(e.node.id,n)}catch(e){return}const r=n.getState(),a=[...t.nodes,dl(r,n,s)];o.setState({nodes:a});for(const t in e.node.io){const n=e.node.io[t].id;void 0!==n&&s.worker?.get_io_value({nid:e.node.id,ioid:n})}}},r=e=>{switch(e.type){case"add":n(e);break;case"update":(e=>{if(e.node.in_trigger&&(e.node.error=void 0),e.from_remote){const t=i.get_node(e.id,!1);if(!t)return;ne(e.node);const n=t.getState(),{new_obj:r,change:o}=U(n,e.node);if(o){if(e.node.io)for(const t in e.node.io){r.io[t].fullvalue=e.node.io[t]?.fullvalue;for(const t in e.node.io){const n=e.node.io[t],o=r.io[t];n.hasOwnProperty("value")&&(void 0===n.value?o.value=null:"<NoValue>"===n.value?o.value=void 0:o.value=n.value)}}dl(r,t,s),s.logger.debug("update_action",r),t.setState(te(r))}}else s.worker&&s.worker.locally_update_node(e)})(e);break;case"delete":(e=>{e.from_remote?o.getState().onNodesChange([{type:"remove",id:e.id}]):s.worker?.remove_node(e.id)})(e);break;case"error":(e=>{s.logger.error("Error",e),r({type:"update",id:e.id,node:{in_trigger:!1,error:e.error},from_remote:!0})})(e);break;case"trigger":(e=>{e.from_remote?r({type:"update",id:e.id,node:{in_trigger:!0,error:void 0},from_remote:!0}):s.worker?.trigger_node(e.id)})(e);break;default:s.logger.error("Unknown node action",e)}},o=(({on_node_change:e,on_edge_change:t,on_connect:n})=>{const r=e||(e=>{}),o=n||(e=>{}),i=Z(((e,t)=>({nodes:[],edges:[],onNodesChange:n=>{e({nodes:Ca(n,t().nodes)}),r(n)},onEdgesChange:n=>{e({edges:ka(n,t().edges)})},onConnect:e=>{null!=e.source&&null!=e.target&&o(e)}})));return i})({on_node_change:e=>{for(const t of e)switch(t.type){case"position":t.position&&r({type:"update",id:t.id,node:{frontend:{pos:[t.position.x,t.position.y]}},from_remote:!1});break;case"dimensions":t.dimensions&&r({type:"update",id:t.id,node:{frontend:{size:[t.dimensions.width,t.dimensions.height]}},from_remote:!1})}},on_edge_change:e=>{},on_connect:e=>{null!==e.source&&null!==e.target&&null!==e.sourceHandle&&null!==e.targetHandle&&s.worker&&s.worker.add_edge({src_nid:e.source,src_ioid:e.sourceHandle,trg_nid:e.target,trg_ioid:e.targetHandle,replace:!0})}}),i=(({})=>{const e=new Map;return{nodesstates:e,get_node:(t,n=!0)=>{const r=e.get(t);if(!r&&n){const n=e.keys();throw new Error(`Node ${t} not found, available nodes: ${Array.from(n)}`)}return r}}})({}),a={libstate:Z(((e,t)=>({lib:{shelves:[]},external_worker:[],set:t=>e((e=>({...e,...t}))),get_lib:()=>t().lib,get_external_worker:()=>t().external_worker})))},s={local_settings:Z(((e,t)=>({view_settings:{expand_node_props:!1},update_view_settings:e=>{const t=s.local_settings.getState().view_settings,{new_obj:n,change:r}=U(t,e);r&&s.local_settings.setState((e=>({...e,view_settings:n})))}}))),local_state:Z(((e,t)=>({selected_nodes:[],selected_edges:[]}))),options:t,lib:a,workermanager:void 0,workers:Z(((e,t)=>({}))),workerstate:Z(((e,t)=>({is_open:!1}))),render_options:Z(((e,t)=>({}))),progress_state:Z(((e,t)=>({message:"please select worker",status:"info",progress:0,blocking:!1}))),update_render_options:e=>{const t=s.render_options.getState(),{new_obj:n,change:r}=U(t,e);r&&s.render_options.setState(n)},worker:void 0,_unsubscribeFromWorker:void 0,set_worker:e=>{e!==s.worker&&(s._unsubscribeFromWorker&&(s._unsubscribeFromWorker(),s._unsubscribeFromWorker=void 0),e&&(s._unsubscribeFromWorker=e.state.subscribe((e=>{s.workerstate.setState(e)})),s.workerstate.setState(e.state.getState())),s.worker=e,e?.set_zustand(s))},nodespace:i,useReactFlowStore:o,on_node_action:r,on_edge_action:e=>{const t=o.getState();switch(e.type){case"add":if(e.from_remote){const n=t.edges,r=nl(e);if(n.some((e=>e.id===r)))return;const i={id:r,source:e.src_nid,target:e.trg_nid,sourceHandle:e.src_ioid,targetHandle:e.trg_ioid,className:"funcnodes-edge animated"};s.logger.info("Adding edge",i),o.setState({edges:[...n,i]}),s.worker?.get_remote_node_state(e.src_nid),s.worker?.get_remote_node_state(e.trg_nid)}break;case"delete":if(e.from_remote){const n=t.edges,r=nl(e),i=n.filter((e=>e.id!==r));o.setState({edges:i}),s.worker?.get_remote_node_state(e.src_nid),s.worker?.get_remote_node_state(e.trg_nid)}break;default:s.logger.error("Unknown edge action",e)}},reactflowRef:null,clear_all:()=>{s.worker?.disconnect(),s.set_worker(void 0),s.workermanager?.setWorker(void 0),s.lib.libstate.getState().set({lib:{shelves:[]},external_worker:[]}),s.nodespace.nodesstates.clear(),s.useReactFlowStore.setState({nodes:[],edges:[]}),s.auto_progress()},set_progress:e=>{if(""===e.message)return s.auto_progress();const t=s.progress_state.getState(),{new_obj:n,change:r}=U(t,e);r&&s.progress_state.setState(n)},auto_progress:()=>void 0===s.workermanager||s.workermanager.open?void 0===s.worker?s.set_progress({progress:0,message:"please select worker",status:"error",blocking:!1}):s.worker.is_open?void s.set_progress({progress:1,message:"running",status:"info",blocking:!1}):s.set_progress({progress:0,message:"connecting to worker",status:"info",blocking:!0}):s.set_progress({progress:0,message:"connecting to worker manager",status:"error",blocking:!1}),plugins:Z(((e,t)=>({}))),add_plugin:(e,t)=>{void 0!==t&&s.plugins.setState((n=>({...n,[e]:t})))},dev_settings:{debug:!0},logger:new cl("fn",sl)};return s};function fl(e,t){return function(){return e.apply(t,arguments)}}const{toString:hl}=Object.prototype,{getPrototypeOf:ml}=Object,gl=(e=>t=>{const n=hl.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),yl=e=>(e=e.toLowerCase(),t=>gl(t)===e),bl=e=>t=>typeof t===e,{isArray:vl}=Array,wl=bl("undefined");const xl=yl("ArrayBuffer");const Cl=bl("string"),kl=bl("function"),El=bl("number"),Sl=e=>null!==e&&"object"==typeof e,Il=e=>{if("object"!==gl(e))return!1;const t=ml(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},_l=yl("Date"),Al=yl("File"),Nl=yl("Blob"),Ol=yl("FileList"),Rl=yl("URLSearchParams"),[Tl,Ml,Pl,Dl]=["ReadableStream","Request","Response","Headers"].map(yl);function Bl(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),vl(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{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 jl(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const Ll="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Fl=e=>!wl(e)&&e!==Ll;const Vl=(zl="undefined"!=typeof Uint8Array&&ml(Uint8Array),e=>zl&&e instanceof zl);var zl;const Gl=yl("HTMLFormElement"),Hl=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Wl=yl("RegExp"),Xl=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Bl(n,((n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)})),Object.defineProperties(e,r)},Zl="abcdefghijklmnopqrstuvwxyz",$l="0123456789",Yl={DIGIT:$l,ALPHA:Zl,ALPHA_DIGIT:Zl+Zl.toUpperCase()+$l};const Ul=yl("AsyncFunction"),Jl=(Kl="function"==typeof setImmediate,Ql=kl(Ll.postMessage),Kl?setImmediate:Ql?((e,t)=>(Ll.addEventListener("message",(({source:n,data:r})=>{n===Ll&&r===e&&t.length&&t.shift()()}),!1),n=>{t.push(n),Ll.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e));var Kl,Ql;const ql="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Ll):"undefined"!=typeof process&&process.nextTick||Jl;var ec={isArray:vl,isArrayBuffer:xl,isBuffer:function(e){return null!==e&&!wl(e)&&null!==e.constructor&&!wl(e.constructor)&&kl(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||kl(e.append)&&("formdata"===(t=gl(e))||"object"===t&&kl(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&xl(e.buffer),t},isString:Cl,isNumber:El,isBoolean:e=>!0===e||!1===e,isObject:Sl,isPlainObject:Il,isReadableStream:Tl,isRequest:Ml,isResponse:Pl,isHeaders:Dl,isUndefined:wl,isDate:_l,isFile:Al,isBlob:Nl,isRegExp:Wl,isFunction:kl,isStream:e=>Sl(e)&&kl(e.pipe),isURLSearchParams:Rl,isTypedArray:Vl,isFileList:Ol,forEach:Bl,merge:function e(){const{caseless:t}=Fl(this)&&this||{},n={},r=(r,o)=>{const i=t&&jl(n,o)||o;Il(n[i])&&Il(r)?n[i]=e(n[i],r):Il(r)?n[i]=e({},r):vl(r)?n[i]=r.slice():n[i]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&Bl(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(Bl(t,((t,r)=>{n&&kl(t)?e[r]=fl(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(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)},toFlatObject:(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],r&&!r(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&ml(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:gl,kindOfTest:yl,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(vl(e))return e;let t=e.length;if(!El(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:Gl,hasOwnProperty:Hl,hasOwnProp:Hl,reduceDescriptors:Xl,freezeMethods:e=>{Xl(e,((t,n)=>{if(kl(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];kl(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return vl(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:jl,global:Ll,isContextDefined:Fl,ALPHABET:Yl,generateString:(e=16,t=Yl.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&kl(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(Sl(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=vl(e)?[]:{};return Bl(e,((e,t)=>{const i=n(e,r+1);!wl(i)&&(o[t]=i)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:Ul,isThenable:e=>e&&(Sl(e)||kl(e))&&kl(e.then)&&kl(e.catch),setImmediate:Jl,asap:ql};function tc(e,t,n,r,o){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),o&&(this.response=o,this.status=o.status?o.status:null)}ec.inherits(tc,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:ec.toJSONObject(this.config),code:this.code,status:this.status}}});const nc=tc.prototype,rc={};["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=>{rc[e]={value:e}})),Object.defineProperties(tc,rc),Object.defineProperty(nc,"isAxiosError",{value:!0}),tc.from=(e,t,n,r,o,i)=>{const a=Object.create(nc);return ec.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),tc.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};function oc(e){return ec.isPlainObject(e)||ec.isArray(e)}function ic(e){return ec.endsWith(e,"[]")?e.slice(0,-2):e}function ac(e,t,n){return e?e.concat(t).map((function(e,t){return e=ic(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const sc=ec.toFlatObject(ec,{},null,(function(e){return/^is[A-Z]/.test(e)}));function lc(e,t,n){if(!ec.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=ec.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!ec.isUndefined(t[e])}))).metaTokens,o=n.visitor||c,i=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&ec.isSpecCompliantForm(t);if(!ec.isFunction(o))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(ec.isDate(e))return e.toISOString();if(!s&&ec.isBlob(e))throw new tc("Blob is not supported. Use a Buffer instead.");return ec.isArrayBuffer(e)||ec.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,o){let s=e;if(e&&!o&&"object"==typeof e)if(ec.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(ec.isArray(e)&&function(e){return ec.isArray(e)&&!e.some(oc)}(e)||(ec.isFileList(e)||ec.endsWith(n,"[]"))&&(s=ec.toArray(e)))return n=ic(n),s.forEach((function(e,r){!ec.isUndefined(e)&&null!==e&&t.append(!0===a?ac([n],r,i):null===a?n:n+"[]",l(e))})),!1;return!!oc(e)||(t.append(ac(o,n,i),l(e)),!1)}const u=[],d=Object.assign(sc,{defaultVisitor:c,convertValue:l,isVisitable:oc});if(!ec.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!ec.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),ec.forEach(n,(function(n,i){!0===(!(ec.isUndefined(n)||null===n)&&o.call(t,n,ec.isString(i)?i.trim():i,r,d))&&e(n,r?r.concat(i):[i])})),u.pop()}}(e),t}function cc(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function uc(e,t){this._pairs=[],e&&lc(e,this,t)}const dc=uc.prototype;function pc(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function fc(e,t,n){if(!t)return e;const r=n&&n.encode||pc;ec.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(i=o?o(t,n):ec.isURLSearchParams(t)?t.toString():new uc(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}dc.append=function(e,t){this._pairs.push([e,t])},dc.toString=function(e){const t=e?function(t){return e.call(this,t,cc)}:cc;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};class hc{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ec.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}var mc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},gc={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:uc,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const yc="undefined"!=typeof window&&"undefined"!=typeof document,bc="object"==typeof navigator&&navigator||void 0,vc=yc&&(!bc||["ReactNative","NativeScript","NS"].indexOf(bc.product)<0),wc="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,xc=yc&&window.location.href||"http://localhost";var Cc={...Object.freeze({__proto__:null,hasBrowserEnv:yc,hasStandardBrowserEnv:vc,hasStandardBrowserWebWorkerEnv:wc,navigator:bc,origin:xc}),...gc};function kc(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;if(i=!i&&ec.isArray(r)?r.length:i,s)return ec.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a;r[i]&&ec.isObject(r[i])||(r[i]=[]);return t(e,n,r[i],o)&&ec.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!a}if(ec.isFormData(e)&&ec.isFunction(e.entries)){const n={};return ec.forEachEntry(e,((e,r)=>{t(function(e){return ec.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null}const Ec={transitional:mc,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=ec.isObject(e);o&&ec.isHTMLForm(e)&&(e=new FormData(e));if(ec.isFormData(e))return r?JSON.stringify(kc(e)):e;if(ec.isArrayBuffer(e)||ec.isBuffer(e)||ec.isStream(e)||ec.isFile(e)||ec.isBlob(e)||ec.isReadableStream(e))return e;if(ec.isArrayBufferView(e))return e.buffer;if(ec.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return lc(e,new Cc.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return Cc.isNode&&ec.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=ec.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return lc(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(ec.isString(e))try{return(t||JSON.parse)(e),ec.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Ec.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(ec.isResponse(e)||ec.isReadableStream(e))return e;if(e&&ec.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw tc.from(e,tc.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Cc.classes.FormData,Blob:Cc.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ec.forEach(["delete","get","head","post","put","patch"],(e=>{Ec.headers[e]={}}));const Sc=ec.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"]);const Ic=Symbol("internals");function _c(e){return e&&String(e).trim().toLowerCase()}function Ac(e){return!1===e||null==e?e:ec.isArray(e)?e.map(Ac):String(e)}function Nc(e,t,n,r,o){return ec.isFunction(r)?r.call(this,t,n):(o&&(t=n),ec.isString(t)?ec.isString(r)?-1!==t.indexOf(r):ec.isRegExp(r)?r.test(t):void 0:void 0)}let Oc=class{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=_c(t);if(!o)throw new Error("header name must be a non-empty string");const i=ec.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=Ac(e))}const i=(e,t)=>ec.forEach(e,((e,n)=>o(e,n,t)));if(ec.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(ec.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&Sc[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(ec.isHeaders(e))for(const[t,r]of e.entries())o(r,t,n);else null!=e&&o(t,e,n);return this}get(e,t){if(e=_c(e)){const n=ec.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(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}(e);if(ec.isFunction(t))return t.call(this,e,n);if(ec.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=_c(e)){const n=ec.findKey(this,e);return!(!n||void 0===this[n]||t&&!Nc(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=_c(e)){const o=ec.findKey(n,e);!o||t&&!Nc(0,n[o],o,t)||(delete n[o],r=!0)}}return ec.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!Nc(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return ec.forEach(this,((r,o)=>{const i=ec.findKey(n,o);if(i)return t[i]=Ac(r),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();a!==o&&delete t[o],t[a]=Ac(r),n[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return ec.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&ec.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[Ic]=this[Ic]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=_c(e);t[r]||(!function(e,t){const n=ec.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return ec.isArray(e)?e.forEach(r):r(e),this}};function Rc(e,t){const n=this||Ec,r=t||n,o=Oc.from(r.headers);let i=r.data;return ec.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function Tc(e){return!(!e||!e.__CANCEL__)}function Mc(e,t,n){tc.call(this,null==e?"canceled":e,tc.ERR_CANCELED,t,n),this.name="CanceledError"}function Pc(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new tc("Request failed with status code "+n.status,[tc.ERR_BAD_REQUEST,tc.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}Oc.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ec.reduceDescriptors(Oc.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),ec.freezeMethods(Oc),ec.inherits(Mc,tc,{__CANCEL__:!0});const Dc=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),c=r[a];o||(o=l),n[i]=s,r[i]=l;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),l-o<t)return;const p=c&&l-c;return p?Math.round(1e3*d/p):void 0}}(50,250);return function(e,t){let n,r,o=0,i=1e3/t;const a=(t,i=Date.now())=>{o=i,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),s=t-o;s>=i?a(e,t):(n=e,r||(r=setTimeout((()=>{r=null,a(n)}),i-s)))},()=>n&&a(n)]}((n=>{const i=n.loaded,a=n.lengthComputable?n.total:void 0,s=i-r,l=o(s);r=i;e({loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:l||void 0,estimated:l&&a&&i<=a?(a-i)/l:void 0,event:n,lengthComputable:null!=a,[t?"download":"upload"]:!0})}),n)},Bc=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},jc=e=>(...t)=>ec.asap((()=>e(...t)));var Lc=Cc.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Cc.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Cc.origin),Cc.navigator&&/(msie|trident)/i.test(Cc.navigator.userAgent)):()=>!0,Fc=Cc.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const a=[e+"="+encodeURIComponent(t)];ec.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),ec.isString(r)&&a.push("path="+r),ec.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Vc(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const zc=e=>e instanceof Oc?{...e}:e;function Gc(e,t){t=t||{};const n={};function r(e,t,n,r){return ec.isPlainObject(e)&&ec.isPlainObject(t)?ec.merge.call({caseless:r},e,t):ec.isPlainObject(t)?ec.merge({},t):ec.isArray(t)?t.slice():t}function o(e,t,n,o){return ec.isUndefined(t)?ec.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function i(e,t){if(!ec.isUndefined(t))return r(void 0,t)}function a(e,t){return ec.isUndefined(t)?ec.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t,n)=>o(zc(e),zc(t),0,!0)};return ec.forEach(Object.keys(Object.assign({},e,t)),(function(r){const i=l[r]||o,a=i(e[r],t[r],r);ec.isUndefined(a)&&i!==s||(n[r]=a)})),n}var Hc=e=>{const t=Gc({},e);let n,{data:r,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:a,headers:s,auth:l}=t;if(t.headers=s=Oc.from(s),t.url=fc(Vc(t.baseURL,t.url),e.params,e.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),ec.isFormData(r))if(Cc.hasStandardBrowserEnv||Cc.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(!1!==(n=s.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];s.setContentType([e||"multipart/form-data",...t].join("; "))}if(Cc.hasStandardBrowserEnv&&(o&&ec.isFunction(o)&&(o=o(t)),o||!1!==o&&Lc(t.url))){const e=i&&a&&Fc.read(a);e&&s.set(i,e)}return t};var Wc="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=Hc(e);let o=r.data;const i=Oc.from(r.headers).normalize();let a,s,l,c,u,{responseType:d,onUploadProgress:p,onDownloadProgress:f}=r;function h(){c&&c(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let m=new XMLHttpRequest;function g(){if(!m)return;const r=Oc.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());Pc((function(e){t(e),h()}),(function(e){n(e),h()}),{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(g)},m.onabort=function(){m&&(n(new tc("Request aborted",tc.ECONNABORTED,e,m)),m=null)},m.onerror=function(){n(new tc("Network Error",tc.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||mc;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new tc(t,o.clarifyTimeoutError?tc.ETIMEDOUT:tc.ECONNABORTED,e,m)),m=null},void 0===o&&i.setContentType(null),"setRequestHeader"in m&&ec.forEach(i.toJSON(),(function(e,t){m.setRequestHeader(t,e)})),ec.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),d&&"json"!==d&&(m.responseType=r.responseType),f&&([l,u]=Dc(f,!0),m.addEventListener("progress",l)),p&&m.upload&&([s,c]=Dc(p),m.upload.addEventListener("progress",s),m.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(a=t=>{m&&(n(!t||t.type?new Mc(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const y=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);y&&-1===Cc.protocols.indexOf(y)?n(new tc("Unsupported protocol "+y+":",tc.ERR_BAD_REQUEST,e)):m.send(o||null)}))};const Xc=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,a();const t=e instanceof Error?e:this.reason;r.abort(t instanceof tc?t:new Mc(t instanceof Error?t.message:t))}};let i=t&&setTimeout((()=>{i=null,o(new tc(`timeout ${t} of ms exceeded`,tc.ETIMEDOUT))}),t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)})),e=null)};e.forEach((e=>e.addEventListener("abort",o)));const{signal:s}=r;return s.unsubscribe=()=>ec.asap(a),s}},Zc=function*(e,t){let n=e.byteLength;if(n<t)return void(yield e);let r,o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},$c=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},Yc=(e,t,n,r)=>{const o=async function*(e,t){for await(const n of $c(e))yield*Zc(n,t)}(e,t);let i,a=0,s=e=>{i||(i=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return s(),void e.close();let i=r.byteLength;if(n){let e=a+=i;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},Uc="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Jc=Uc&&"function"==typeof ReadableStream,Kc=Uc&&("function"==typeof TextEncoder?(Qc=new TextEncoder,e=>Qc.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var Qc;const qc=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},eu=Jc&&qc((()=>{let e=!1;const t=new Request(Cc.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),tu=Jc&&qc((()=>ec.isReadableStream(new Response("").body))),nu={stream:tu&&(e=>e.body)};var ru;Uc&&(ru=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!nu[e]&&(nu[e]=ec.isFunction(ru[e])?t=>t[e]():(t,n)=>{throw new tc(`Response type '${e}' is not supported`,tc.ERR_NOT_SUPPORT,n)})})));const ou=async(e,t)=>{const n=ec.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(ec.isBlob(e))return e.size;if(ec.isSpecCompliantForm(e)){const t=new Request(Cc.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return ec.isArrayBufferView(e)||ec.isArrayBuffer(e)?e.byteLength:(ec.isURLSearchParams(e)&&(e+=""),ec.isString(e)?(await Kc(e)).byteLength:void 0)})(t):n};var iu=Uc&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:p}=Hc(e);c=c?(c+"").toLowerCase():"text";let f,h=Xc([o,i&&i.toAbortSignal()],a);const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let g;try{if(l&&eu&&"get"!==n&&"head"!==n&&0!==(g=await ou(u,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(ec.isFormData(r)&&(e=n.headers.get("content-type"))&&u.setContentType(e),n.body){const[e,t]=Bc(g,Dc(jc(l)));r=Yc(n.body,65536,e,t)}}ec.isString(d)||(d=d?"include":"omit");const o="credentials"in Request.prototype;f=new Request(t,{...p,signal:h,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:o?d:void 0});let i=await fetch(f);const a=tu&&("stream"===c||"response"===c);if(tu&&(s||a&&m)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=i[t]}));const t=ec.toFiniteNumber(i.headers.get("content-length")),[n,r]=s&&Bc(t,Dc(jc(s),!0))||[];i=new Response(Yc(i.body,65536,n,(()=>{r&&r(),m&&m()})),e)}c=c||"text";let y=await nu[ec.findKey(nu,c)||"text"](i,e);return!a&&m&&m(),await new Promise(((t,n)=>{Pc(t,n,{data:y,headers:Oc.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:f})}))}catch(t){if(m&&m(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new tc("Network Error",tc.ERR_NETWORK,e,f),{cause:t.cause||t});throw tc.from(t,t&&t.code,e,f)}});const au={http:null,xhr:Wc,fetch:iu};ec.forEach(au,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const su=e=>`- ${e}`,lu=e=>ec.isFunction(e)||null===e||!1===e;var cu=e=>{e=ec.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){let t;if(n=e[i],r=n,!lu(n)&&(r=au[(t=String(n)).toLowerCase()],void 0===r))throw new tc(`Unknown adapter '${t}'`);if(r)break;o[t||"#"+i]=r}if(!r){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new tc("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(su).join("\n"):" "+su(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function uu(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Mc(null,e)}function du(e){uu(e),e.headers=Oc.from(e.headers),e.data=Rc.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return cu(e.adapter||Ec.adapter)(e).then((function(t){return uu(e),t.data=Rc.call(e,e.transformResponse,t),t.headers=Oc.from(t.headers),t}),(function(t){return Tc(t)||(uu(e),t&&t.response&&(t.response.data=Rc.call(e,e.transformResponse,t.response),t.response.headers=Oc.from(t.response.headers))),Promise.reject(t)}))}const pu="1.7.9",fu={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{fu[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const hu={};fu.transitional=function(e,t,n){function r(e,t){return"[Axios v1.7.9] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new tc(r(o," has been removed"+(t?" in "+t:"")),tc.ERR_DEPRECATED);return t&&!hu[o]&&(hu[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}},fu.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};var mu={assertOptions:function(e,t,n){if("object"!=typeof e)throw new tc("options must be an object",tc.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const t=e[i],n=void 0===t||a(t,i,e);if(!0!==n)throw new tc("option "+i+" must be "+n,tc.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new tc("Unknown option "+i,tc.ERR_BAD_OPTION)}},validators:fu};const gu=mu.validators;let yu=class{constructor(e){this.defaults=e,this.interceptors={request:new hc,response:new hc}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Gc(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&mu.assertOptions(n,{silentJSONParsing:gu.transitional(gu.boolean),forcedJSONParsing:gu.transitional(gu.boolean),clarifyTimeoutError:gu.transitional(gu.boolean)},!1),null!=r&&(ec.isFunction(r)?t.paramsSerializer={serialize:r}:mu.assertOptions(r,{encode:gu.function,serialize:gu.function},!0)),mu.assertOptions(t,{baseUrl:gu.spelling("baseURL"),withXsrfToken:gu.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&ec.merge(o.common,o[t.method]);o&&ec.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=Oc.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let u,d=0;if(!s){const e=[du.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,l),u=e.length,c=Promise.resolve(t);d<u;)c=c.then(e[d++],e[d++]);return c}u=a.length;let p=t;for(d=0;d<u;){const e=a[d++],t=a[d++];try{p=e(p)}catch(e){t.call(this,e);break}}try{c=du.call(this,p)}catch(e){return Promise.reject(e)}for(d=0,u=l.length;d<u;)c=c.then(l[d++],l[d++]);return c}getUri(e){return fc(Vc((e=Gc(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}};ec.forEach(["delete","get","head","options"],(function(e){yu.prototype[e]=function(t,n){return this.request(Gc(n||{},{method:e,url:t,data:(n||{}).data}))}})),ec.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(Gc(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}yu.prototype[e]=t(),yu.prototype[e+"Form"]=t(!0)}));const bu={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};Object.entries(bu).forEach((([e,t])=>{bu[t]=e}));const vu=function e(t){const n=new yu(t),r=fl(yu.prototype.request,n);return ec.extend(r,yu.prototype,n,{allOwnKeys:!0}),ec.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Gc(t,n))},r}(Ec);vu.Axios=yu,vu.CanceledError=Mc,vu.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new Mc(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e((function(e){t=e})),cancel:t}}},vu.isCancel=Tc,vu.VERSION=pu,vu.toFormData=lc,vu.AxiosError=tc,vu.Cancel=vu.CanceledError,vu.all=function(e){return Promise.all(e)},vu.spread=function(e){return function(t){return e.apply(null,t)}},vu.isAxiosError=function(e){return ec.isObject(e)&&!0===e.isAxiosError},vu.mergeConfig=Gc,vu.AxiosHeaders=Oc,vu.formToJSON=e=>kc(ec.isHTMLForm(e)?new FormData(e):e),vu.getAdapter=cu,vu.HttpStatusCode=bu,vu.default=vu;const{Axios:wu,AxiosError:xu,CanceledError:Cu,isCancel:ku,CancelToken:Eu,VERSION:Su,all:Iu,Cancel:_u,isAxiosError:Au,spread:Nu,toFormData:Ou,AxiosHeaders:Ru,HttpStatusCode:Tu,formToJSON:Mu,getAdapter:Pu,mergeConfig:Du}=vu;let Bu;const ju=new Uint8Array(16);function Lu(){if(!Bu&&(Bu="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Bu))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Bu(ju)}const Fu=[];for(let e=0;e<256;++e)Fu.push((e+256).toString(16).slice(1));var Vu={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function zu(e,t,n){if(Vu.randomUUID&&!e)return Vu.randomUUID();const r=(e=e||{}).random||(e.rng||Lu)();return r[6]=15&r[6]|64,r[8]=63&r[8]|128,function(e,t=0){return Fu[e[t+0]]+Fu[e[t+1]]+Fu[e[t+2]]+Fu[e[t+3]]+"-"+Fu[e[t+4]]+Fu[e[t+5]]+"-"+Fu[e[t+6]]+Fu[e[t+7]]+"-"+Fu[e[t+8]]+Fu[e[t+9]]+"-"+Fu[e[t+10]]+Fu[e[t+11]]+Fu[e[t+12]]+Fu[e[t+13]]+Fu[e[t+14]]+Fu[e[t+15]]}(r)}class Gu{constructor(e){this.uuid=e.uuid,this.on_error=e.on_error||(e=>{this._zustand?.logger.error(e)}),this.messagePromises=new Map,this._local_nodeupdates=new Map,this._nodeupdatetimer=setTimeout((()=>{this.sync_local_node_updates()}),5e3),this.state=Z(((e,t)=>({is_open:!1}))),e.zustand&&this.set_zustand(e.zustand),e.on_sync_complete?this.on_sync_complete=e.on_sync_complete:this.on_sync_complete=async()=>{}}set_zustand(e){e!==this._zustand&&(this._zustand=e,e.set_worker(this),this._zustand.auto_progress(),this.stepwise_fullsync())}get is_open(){return this.state.getState().is_open}set is_open(e){this.state.setState({is_open:e})}async stepwise_fullsync(){this._zustand&&this.is_open&&(await this.sync_lib(),await this.sync_external_worker(),await this.sync_funcnodes_plugins(),await this.sync_nodespace(),await this.sync_view_state(),await this.on_sync_complete(this))}async sync_lib(){if(!this._zustand)return;if(!this.is_open)return;const e=await this._send_cmd({cmd:"get_library",wait_for_response:!0,retries:2});this._zustand.lib.libstate.getState().set({lib:e})}async sync_external_worker(){if(!this._zustand)return;if(!this.is_open)return;const e=await this._send_cmd({cmd:"get_worker_dependencies",wait_for_response:!0});this._zustand.lib.libstate.getState().set({external_worker:e})}async sync_funcnodes_plugins(){if(!this._zustand)return;if(!this.is_open)return;const e=await this._send_cmd({cmd:"get_plugin_keys",wait_for_response:!0,kwargs:{type:"react"}});for(const t of e){const e=await this._send_cmd({cmd:"get_plugin",wait_for_response:!0,kwargs:{key:t,type:"react"}});if(e.js)for(const t of e.js){const e=document.createElement("script");e.text=atob(t),document.body.appendChild(e)}if(e.css)for(const t of e.css){const e=document.createElement("style");e.innerHTML=atob(t),document.head.appendChild(e)}if(void 0!==e.module){const n=atob(e.module),r=n.length,o=new Uint8Array(r);for(let e=0;e<r;e++)o[e]=n.charCodeAt(e);const i=new Blob([o],{type:"application/javascript"}),a=URL.createObjectURL(i),s=await import(a);URL.revokeObjectURL(a),this._zustand.add_plugin(t,s.default)}}}async sync_view_state(){if(!this._zustand)return;if(!this.is_open)return;const e=await this._send_cmd({cmd:"view_state",wait_for_response:!0});e.renderoptions&&this._zustand.update_render_options(e.renderoptions);const t=e.nodes;if(t)for(const e in t){const n=t[e];this._zustand.on_node_action({type:"update",node:{frontend:n},id:e,from_remote:!0})}}async sync_nodespace(){if(!this._zustand)return;if(!this.is_open)return;const e=await this._send_cmd({cmd:"get_nodes",kwargs:{with_frontend:!0},wait_for_response:!0});for(const t of e)this._receive_node_added(t);const t=await this._send_cmd({cmd:"get_edges",wait_for_response:!0});for(const e of t)this._receive_edge_added(...e)}async fullsync(){if(!this._zustand)return;if(!this.is_open)return;let e;for(;;)try{e=await this._send_cmd({cmd:"full_state"});break}catch(e){this._zustand.logger.error("Error in fullsync",e)}this._zustand.logger.debug("Full state",e),this._zustand.lib.libstate.getState().set({lib:e.backend.lib,external_worker:e.worker_dependencies}),e.view.renderoptions&&this._zustand.update_render_options(e.view.renderoptions);const t=e.view.nodes;for(const n of e.backend.nodes)void 0!==t[n.id]&&(n.frontend=t[n.id]),this._receive_node_added(n);for(const t of e.backend.edges)this._receive_edge_added(...t)}async _receive_edge_added(e,t,n,r){this._zustand&&this._zustand.on_edge_action({type:"add",from_remote:!0,src_nid:e,src_ioid:t,trg_nid:n,trg_ioid:r})}async trigger_node(e){await this._send_cmd({cmd:"trigger_node",kwargs:{nid:e},wait_for_response:!1})}async add_node(e){const t=await this._send_cmd({cmd:"add_node",kwargs:{id:e}});this._receive_node_added(t)}async remove_node(e){await this._send_cmd({cmd:"remove_node",kwargs:{id:e}})}async _receive_node_added(e){this._zustand&&this._zustand.on_node_action({type:"add",node:e,id:e.id,from_remote:!0})}add_edge({src_nid:e,src_ioid:t,trg_nid:n,trg_ioid:r,replace:o=!1}){return this._send_cmd({cmd:"add_edge",kwargs:{src_nid:e,src_ioid:t,trg_nid:n,trg_ioid:r,replace:o}})}remove_edge({src_nid:e,src_ioid:t,trg_nid:n,trg_ioid:r}){return this._send_cmd({cmd:"remove_edge",kwargs:{src_nid:e,src_ioid:t,trg_nid:n,trg_ioid:r}})}async add_external_worker({module:e,cls_module:t,cls_name:n}){return await this._send_cmd({cmd:"add_external_worker",kwargs:{module:e,cls_module:t,cls_name:n}})}sync_local_node_updates(){clearTimeout(this._nodeupdatetimer),this._local_nodeupdates.forEach((async(e,t)=>{const n=await this._send_cmd({cmd:"update_node",kwargs:{nid:t,data:e},wait_for_response:!0});this._zustand&&this._zustand.on_node_action({type:"update",node:n,id:t,from_remote:!0})})),this._local_nodeupdates.clear(),this._nodeupdatetimer=setTimeout((()=>{this.sync_local_node_updates()}),200)}locally_update_node(e){const t=this._local_nodeupdates.get(e.id);if(t){const{new_obj:n,change:r}=U(t,e.node);r&&this._local_nodeupdates.set(e.id,n)}else this._local_nodeupdates.set(e.id,e.node);e.immediate&&this.sync_local_node_updates()}async get_remote_node_state(e){const t=await this._send_cmd({cmd:"get_node_state",kwargs:{nid:e},wait_for_response:!0});this._zustand&&this._zustand.on_node_action({type:"update",node:t,id:t.id,from_remote:!0})}set_io_value({nid:e,ioid:t,value:n,set_default:r=!1}){return this._send_cmd({cmd:"set_io_value",kwargs:{nid:e,ioid:t,value:n,set_default:r},wait_for_response:!0})}clear(){return this._send_cmd({cmd:"clear"})}save(){return this._send_cmd({cmd:"save",wait_for_response:!0})}load(e){return this._send_cmd({cmd:"load_data",kwargs:{data:e},wait_for_response:!0}).then((()=>{this.stepwise_fullsync()}))}async get_io_value({nid:e,ioid:t}){const n=await this._send_cmd({cmd:"get_io_value",kwargs:{nid:e,ioid:t},wait_for_response:!0});return this._zustand?(this._zustand.on_node_action({type:"update",node:{io:{[t]:{value:n}}},id:e,from_remote:!0}),n):n}async get_ios_values({nid:e}){const t=await this._send_cmd({cmd:"get_ios_values",kwargs:{nid:e},wait_for_response:!0});if(!this._zustand)return t;const n={};for(const e in t)n[e]={value:t[e]};return this._zustand.on_node_action({type:"update",node:{io:n},id:e,from_remote:!0}),t}async _send_cmd({cmd:e,kwargs:t,wait_for_response:n=!0,response_timeout:r=5e3,retries:o=2}){const i={type:"cmd",cmd:e,kwargs:t||{}};if(n){o<0&&(o=0);const t=async()=>{let t;for(;o>=0;){const n=i.id||zu();i.id=n;const a=new Promise(((t,o)=>{const i=setTimeout((()=>{o("Timeout@wait_for_response for "+e)}),r);this.messagePromises.set(n,{resolve:e=>{clearTimeout(i),t(e),this.messagePromises.delete(n)},reject:e=>{clearTimeout(i),o(e),this.messagePromises.delete(n)}})}));await this.send(i);try{t=await a;break}catch(e){if(0===o)throw e;o-=1;continue}}return t};return t()}return this.send(i)}async send(e){throw new Error("async send(data: any) not implemented")}async upload_file({files:e,onProgressCallback:t,root:n}){throw new Error("upload_file not implemented ")}async handle_large_message_hint({}){throw new Error("async handle_large_message_hint({}: LargeMessageHint) not implemented ")}async receive_workerevent({event:e,data:t}){switch(e){case"worker_error":if(!this._zustand)return;return this._zustand.logger.error(t.error);case"update_worker_dependencies":if(!this._zustand)return;return this._zustand.lib.libstate.getState().set({external_worker:t.worker_dependencies});case"lib_update":return void await this.sync_lib();case"fullsync":return void await this.stepwise_fullsync();case"external_worker_update":return await this.sync_lib(),void await this.sync_external_worker();default:console.warn("Unhandled worker event",e,t)}}async receive_nodespace_event({event:e,data:t}){switch(e){case"after_set_value":if(!this._zustand)return;return this._zustand.on_node_action({type:"update",node:{id:t.node,io:{[t.io]:{value:t.result}}},id:t.node,from_remote:!0});case"after_update_value_options":if(!this._zustand)return;return this._zustand.on_node_action({type:"update",node:{id:t.node,io:{[t.io]:{value_options:t.result}}},id:t.node,from_remote:!0});case"triggerstart":if(!this._zustand)return;return this._zustand.on_node_action({type:"update",node:{id:t.node,in_trigger:!0},id:t.node,from_remote:!0});case"triggerdone":if(!this._zustand)return;return this._zustand.on_node_action({type:"update",node:{id:t.node,in_trigger:!1},id:t.node,from_remote:!0});case"node_trigger_error":if(!this._zustand)return;return this._zustand.on_node_action({type:"error",errortype:"trigger",error:t.error,id:t.node,tb:t.tb,from_remote:!0});case"node_removed":if(!this._zustand)return;return this._zustand.on_node_action({type:"delete",id:t.node,from_remote:!0});case"node_added":return this._receive_node_added(t.node);case"after_disconnect":case"after_unforward":if(!t.result)return;if(!Array.isArray(t.result))return;if(4!==t.result.length)return;if(!this._zustand)return;return this._zustand.on_edge_action({type:"delete",from_remote:!0,src_nid:t.result[0],src_ioid:t.result[1],trg_nid:t.result[2],trg_ioid:t.result[3]});case"after_connect":case"after_forward":if(!t.result)return;if(!Array.isArray(t.result))return;if(4!==t.result.length)return;return this._receive_edge_added(...t.result);case"after_add_shelf":case"after_remove_shelf":if(!t.result)return;if(!this._zustand)return;return this._zustand.lib.libstate.getState().set({lib:t.result});case"progress":if(!this._zustand)return;if(t.node)return this._zustand.on_node_action({type:"update",node:{id:t.node,progress:t.info},id:t.node,from_remote:!0});console.warn("Unhandled nodepsace event",e,t);break;default:console.warn("Unhandled nodepsace event",e,t)}}async add_lib(e,t){return await this._send_cmd({cmd:"add_package_dependency",kwargs:{name:e,version:t},wait_for_response:!1})}async remove_lib(e){return await this._send_cmd({cmd:"remove_package_dependency",kwargs:{name:e},wait_for_response:!1})}async receive(e){let t;switch(e.type){case"nsevent":return await this.receive_nodespace_event(e);case"result":if(t=e.id&&this.messagePromises.get(e.id),t)return t.resolve(e.result);break;case"error":if(this.on_error(e.tb+"\n"+e.error),t=e.id&&this.messagePromises.get(e.id),t)return t.reject(e.error);break;case"progress":if(!this._zustand)return;this._zustand.set_progress(e);break;case"workerevent":return await this.receive_workerevent(e);case"large_message":return await this.handle_large_message_hint(e);default:console.warn("Unhandled message",e)}}disconnect(){}onclose(){this.is_open=!1,this._zustand&&this._zustand.auto_progress()}async reconnect(){}async stop(){await this._send_cmd({cmd:"stop_worker",wait_for_response:!1});const e=this.onclose.bind(this);this.onclose=()=>{e(),this._zustand&&(this._zustand.worker===this&&this._zustand.clear_all(),this.onclose=e)}}async get_io_full_value({nid:e,ioid:t}){const n=await this._send_cmd({cmd:"get_io_full_value",kwargs:{nid:e,ioid:t},wait_for_response:!0});return this._zustand?(this._zustand.on_node_action({type:"update",node:{io:{[t]:{fullvalue:n}}},id:e,from_remote:!0}),n):n}async update_io_options({nid:e,ioid:t,options:n}){const r=await this._send_cmd({cmd:"update_io_options",kwargs:{nid:e,ioid:t,...n},wait_for_response:!0});if(!this._zustand)return r;this._zustand.on_node_action({type:"update",node:{io:{[t]:{...n}}},id:e,from_remote:!0})}async get_node_status(e){return await this._send_cmd({cmd:"get_node_state",kwargs:{nid:e},wait_for_response:!0})}async get_available_modules(){return await this._send_cmd({cmd:"get_available_modules",wait_for_response:!0})}async update_external_worker(e,t,n){return await this._send_cmd({cmd:"update_external_worker",kwargs:{worker_id:e,class_id:t,...n},wait_for_response:!0})}async remove_external_worker(e,t){return await this._send_cmd({cmd:"remove_external_worker",kwargs:{worker_id:e,class_id:t},wait_for_response:!0})}async export({withFiles:e=!1}){return await this._send_cmd({cmd:"export_worker",wait_for_response:!0,kwargs:{with_files:e}})}async update_from_export(e){const t=await this._send_cmd({cmd:"update_from_export",kwargs:{data:e},wait_for_response:!0});return this.stepwise_fullsync(),t}}class Hu extends Gu{constructor(e){super(e),this._websocket=null,this.reconnectAttempts=0,this.maxReconnectAttempts=999,this.initialTimeout=200,this.maxTimeout=5e3,this._reconnect=!0,this._url=e.url,new Promise((e=>{this.connect(),e(null)})),this._zustand&&this._zustand.auto_progress()}connect(){this._zustand?.logger.info("Connecting to websocket"),this.is_open=!1,this._websocket=new WebSocket(this._url),this._websocket.onopen=()=>{this.onopen()},this._websocket.onclose=()=>{this.onclose()},this._websocket.onerror=()=>{this.on_ws_error()},this._websocket.onmessage=e=>{this.onmessage(e.data)}}calculateReconnectTimeout(){return Math.min(this.initialTimeout*Math.pow(2,this.reconnectAttempts),this.maxTimeout)}auto_reconnect(){if(this.reconnectAttempts<this.maxReconnectAttempts){let e=this.calculateReconnectTimeout();this._zustand?.logger.info(`Attempting to reconnect in ${e} ms`),setTimeout((()=>{this._websocket&&this._websocket.readyState===WebSocket.OPEN||(this.reconnectAttempts++,this.connect())}),e)}else this._zustand?.logger.warn("Maximum reconnect attempts reached. Giving up.")}async onmessage(e){const t=JSON.parse(e);this._zustand?.logger.debug(`Recieved data of length: ${e.length} and data"`,t),await this.receive(t)}get http_protocol(){return this.secure_url?"https":"http"}get secure_url(){return this._url.startsWith("wss")}get url_wo_protocol(){return this._url.substring(this.secure_url?6:5)}get http_url(){var e=this.http_protocol+"://"+this.url_wo_protocol;return"/"!==e[e.length-1]&&(e+="/"),e}async upload_file({files:e,onProgressCallback:t,root:n}){const r=`${this.http_url}upload/`,o=new FormData,i=Array.isArray(e)?e:Array.from(e);for(const e of i){const t=e.webkitRelativePath||e.name,r=n?`${n}/${t}`:t;o.append("file",e,r)}try{return(await vu.post(r,o,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:e=>{t&&t(e.loaded,e.total)}})).data.file}catch(e){throw new Error("Failed to upload file")}}async handle_large_message_hint({msg_id:e}){const t=this.http_url+"message/"+e,n=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*"}}),r=await n.json();this.receive(r)}onopen(){this._zustand?.logger.info("Websocket opened"),this.is_open=!0,this._zustand&&this._zustand.auto_progress(),this.reconnectAttempts=0,this.stepwise_fullsync()}onclose(){this._zustand?.logger.info("Websocket closed"),super.onclose(),this._reconnect&&(this._zustand?.logger.info("Websocket closed,reconnecting"),this.auto_reconnect())}on_ws_error(){this._zustand?.logger.warn("Websocket error"),this._websocket?this._websocket.close():this.auto_reconnect()}async send_large_message(e){const t=`${this.http_url}message/`;await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:e})}async send(e){if(!this._websocket||this._websocket.readyState!==WebSocket.OPEN)return void this._zustand?.logger.warn("Websocket not connected");const t=JSON.stringify(e);if(new Blob([t]).size>1e6)return this._zustand?.logger.info("Data too large, sending via http"),await this.send_large_message(t);this._zustand?.logger.debug("Sending data",e),this._websocket.send(t)}async stop(){await super.stop(),this._reconnect=!1}close(){this._websocket&&this._websocket.close()}disconnect(){super.disconnect(),this._reconnect=!1,this.close()}async reconnect(){await super.reconnect(),this._reconnect=!0,!this._websocket||(this._zustand?.logger.info("Reconnecting"),this._websocket.readyState!==WebSocket.OPEN&&this._websocket.readyState!==WebSocket.CONNECTING||(this._websocket.readyState===WebSocket.CONNECTING&&await new Promise(((e,t)=>{if(null===this._websocket)return;let n=setTimeout((()=>{t("Timeout@reconnect")}),2e3);this._websocket.addEventListener("open",(()=>{clearTimeout(n),e(null)}),{once:!0}),this._websocket.readyState===WebSocket.OPEN&&(clearTimeout(n),e(null))})),this._websocket.readyState!==WebSocket.OPEN))?this.connect():this.stepwise_fullsync()}}class Wu{constructor(e,t){this.ws=null,this.reconnectAttempts=0,this.maxReconnectAttempts=999,this.initialTimeout=200,this.maxTimeout=2e3,this.wsuri=e,this.zustand=t,this.workers={},this.on_setWorker=e=>{this.zustand.set_worker(e)},this.connect()}get open(){return this.ws?.readyState===WebSocket.OPEN}connect(){this.zustand.set_progress({progress:0,message:"connecting to worker manager",status:"info",blocking:!0}),this.zustand.logger.info("Connecting to websocket:",this.wsuri),this.ws=new WebSocket(this.wsuri),this.ws.onopen=()=>{this.onopen()},this.ws.onclose=()=>{this.onclose()},this.ws.onerror=()=>{this.on_ws_error()},this.ws.onmessage=e=>{this.onmessage(e.data)},this.connectionTimeout=setTimeout((()=>{this.ws?.readyState!==WebSocket.OPEN&&this.on_ws_error()}),5e3)}on_ws_error(){console.warn("Websocket error"),this.ws?this.ws.close():this.reconnect()}onopen(){this.connectionTimeout&&(clearTimeout(this.connectionTimeout),this.connectionTimeout=void 0),this.zustand.auto_progress(),this.ws&&this.ws.send("worker_status");const e=window.localStorage.getItem("funcnodes__active_worker");e&&this.set_active(e)}onmessage(e){let t=JSON.parse(e);if("worker_status"!==t.type)if("set_worker"!==t.type)"progress"!==t.type?this.zustand.logger.error("WorkerManager: unknown message",t):this.zustand.set_progress(t);else if("WSWorker"===t.data.type){let e="ws"+(t.data.ssl?"s":"")+"://"+t.data.host+":"+t.data.port;this.setWorker(this.workers[t.data.uuid]||new Hu({url:e,zustand:this.zustand,uuid:t.data.uuid,on_sync_complete:this.zustand.options.on_sync_complete}))}else this.zustand.logger.error("WorkerManager: unknown worker type",t);else{const e={};for(let n of t.active)n.active=!0,e[n.uuid]=n;for(let n of t.inactive)n.active=!1,e[n.uuid]=n;this.zustand.workers.setState(e)}}setWorker(e){for(let t in this.workers)t!==e?.uuid&&this.workers[t].disconnect();void 0!==e&&(this.workers[e.uuid]=e,e.reconnect()),window.localStorage.setItem("funcnodes__active_worker",e?.uuid||""),void 0!==this.zustand.worker&&this.zustand.clear_all(),this.zustand.set_worker(e),this.on_setWorker(e)}async restart_worker(e){this.ws?.send(JSON.stringify({type:"restart_worker",workerid:e}))}calculateReconnectTimeout(){return Math.min(this.initialTimeout*Math.pow(2,this.reconnectAttempts),this.maxTimeout)}reconnect(){if(this.reconnectAttempts<this.maxReconnectAttempts){let e=this.calculateReconnectTimeout();this.zustand.logger.info(`Attempting to reconnect in ${e} ms`),setTimeout((()=>{this.ws&&this.ws.readyState===WebSocket.OPEN||(this.reconnectAttempts++,this.connect())}),e)}else this.zustand.logger.warn("Maximum reconnect attempts reached. Giving up.")}onclose(){this.zustand.logger.warn("WorkerManager: onclose"),this.reconnect()}set_active(e){this.ws&&this.ws.send(JSON.stringify({type:"set_active",workerid:e}))}new_worker({name:e,reference:t,copyLib:n,copyNS:r}){e||(e=void 0),n||(n=!1),r||(r=!1),t||(t=void 0,n=!1,r=!1),this.ws&&this.ws.send(JSON.stringify({type:"new_worker",kwargs:{name:e,reference:t,copyLib:n,copyNS:r}}))}}function Xu(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function Zu(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function $u(...e){return t=>{let n=!1;const r=e.map((e=>{const r=Zu(e,t);return n||"function"!=typeof r||(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():Zu(e[t],null)}}}}function Yu(...t){return e.useCallback($u(...t),t)}var Uu,Ju={exports:{}},Ku={};var Qu,qu,ed={};
|
|
29
|
-
/**
|
|
30
|
-
* @license React
|
|
31
|
-
* react-jsx-runtime.development.js
|
|
32
|
-
*
|
|
33
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
34
|
-
*
|
|
35
|
-
* This source code is licensed under the MIT license found in the
|
|
36
|
-
* LICENSE file in the root directory of this source tree.
|
|
37
|
-
*/function td(){return Qu||(Qu=1,"production"!==process.env.NODE_ENV&&function(){function e(t){if(null==t)return null;if("function"==typeof t)return t.$$typeof===B?null:t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case E:return"Fragment";case k:return"Portal";case I:return"Profiler";case S:return"StrictMode";case O:return"Suspense";case R:return"SuspenseList"}if("object"==typeof t)switch("number"==typeof t.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),t.$$typeof){case A:return(t.displayName||"Context")+".Provider";case _:return(t._context.displayName||"Context")+".Consumer";case N:var n=t.render;return(t=t.displayName)||(t=""!==(t=n.displayName||n.name||"")?"ForwardRef("+t+")":"ForwardRef"),t;case T:return null!==(n=t.displayName||null)?n:e(t.type)||"Memo";case M:n=t._payload,t=t._init;try{return e(t(n))}catch(e){}}return null}function n(e){return""+e}function r(e){try{n(e);var t=!1}catch(e){t=!0}if(t){var r=(t=console).error,o="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return r.call(t,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",o),n(e)}}function o(){}function i(e){if(void 0===H)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);H=t&&t[1]||"",W=-1<e.stack.indexOf("\n at")?" (<anonymous>)":-1<e.stack.indexOf("@")?"@unknown:0:0":""}return"\n"+H+e+W}function a(e,t){if(!e||Z)return"";var n=$.get(e);if(void 0!==n)return n;Z=!0,n=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var r;r=j.H,j.H=null,function(){if(0===G){h=console.log,m=console.info,g=console.warn,y=console.error,b=console.group,v=console.groupCollapsed,w=console.groupEnd;var e={configurable:!0,enumerable:!0,value:o,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}G++}();try{var a={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&"function"==typeof n.catch&&n.catch((function(){}))}}catch(e){if(e&&r&&"string"==typeof e.stack)return[e.stack,r.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var l=a.DetermineComponentFrameRoot(),c=l[0],u=l[1];if(c&&u){var d=c.split("\n"),p=u.split("\n");for(l=s=0;s<d.length&&!d[s].includes("DetermineComponentFrameRoot");)s++;for(;l<p.length&&!p[l].includes("DetermineComponentFrameRoot");)l++;if(s===d.length||l===p.length)for(s=d.length-1,l=p.length-1;1<=s&&0<=l&&d[s]!==p[l];)l--;for(;1<=s&&0<=l;s--,l--)if(d[s]!==p[l]){if(1!==s||1!==l)do{if(s--,0>--l||d[s]!==p[l]){var f="\n"+d[s].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),"function"==typeof e&&$.set(e,f),f}}while(1<=s&&0<=l);break}}}finally{Z=!1,j.H=r,function(){if(0==--G){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:F({},e,{value:h}),info:F({},e,{value:m}),warn:F({},e,{value:g}),error:F({},e,{value:y}),group:F({},e,{value:b}),groupCollapsed:F({},e,{value:v}),groupEnd:F({},e,{value:w})})}0>G&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=n}return d=(d=e?e.displayName||e.name:"")?i(d):"","function"==typeof e&&$.set(e,d),d}function s(e){if(null==e)return"";if("function"==typeof e){var t=e.prototype;return a(e,!(!t||!t.isReactComponent))}if("string"==typeof e)return i(e);switch(e){case O:return i("Suspense");case R:return i("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case N:return e=a(e.render,!1);case T:return s(e.type);case M:t=e._payload,e=e._init;try{return s(e(t))}catch(e){}}return""}function l(){var e=j.A;return null===e?null:e.getOwner()}function c(){var t=e(this.type);return U[t]||(U[t]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(t=this.props.ref)?t:null}function u(t,n,o,i,a,s){if("string"==typeof t||"function"==typeof t||t===E||t===I||t===S||t===O||t===R||t===P||"object"==typeof t&&null!==t&&(t.$$typeof===M||t.$$typeof===T||t.$$typeof===A||t.$$typeof===_||t.$$typeof===N||t.$$typeof===V||void 0!==t.getModuleId)){var u=n.children;if(void 0!==u)if(i)if(z(u)){for(i=0;i<u.length;i++)d(u[i],t);Object.freeze&&Object.freeze(u)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else d(u,t)}else u="",(void 0===t||"object"==typeof t&&null!==t&&0===Object.keys(t).length)&&(u+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),null===t?i="null":z(t)?i="array":void 0!==t&&t.$$typeof===C?(i="<"+(e(t.type)||"Unknown")+" />",u=" Did you accidentally export a JSX literal instead of a component?"):i=typeof t,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",i,u);if(L.call(n,"key")){u=e(t);var p=Object.keys(n).filter((function(e){return"key"!==e}));i=0<p.length?"{key: someKey, "+p.join(": ..., ")+": ...}":"{key: someKey}",J[u+i]||(p=0<p.length?"{"+p.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',i,u,p,u),J[u+i]=!0)}if(u=null,void 0!==o&&(r(o),u=""+o),function(e){if(L.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(n)&&(r(n.key),u=""+n.key),"key"in n)for(var f in o={},n)"key"!==f&&(o[f]=n[f]);else o=n;return u&&function(e,t){function n(){X||(X=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",t))}n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(o,"function"==typeof t?t.displayName||t.name||"Unknown":t),function(e,t,n,r,o,i){return n=i.ref,e={$$typeof:C,type:e,key:t,props:i,_owner:o},null!==(void 0!==n?n:null)?Object.defineProperty(e,"ref",{enumerable:!1,get:c}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(t,u,s,0,l(),o)}function d(e,t){if("object"==typeof e&&e&&e.$$typeof!==Y)if(z(e))for(var n=0;n<e.length;n++){var r=e[n];p(r)&&f(r,t)}else if(p(e))e._store&&(e._store.validated=1);else if(null===e||"object"!=typeof e?n=null:n="function"==typeof(n=D&&e[D]||e["@@iterator"])?n:null,"function"==typeof n&&n!==e.entries&&(n=n.call(e))!==e)for(;!(e=n.next()).done;)p(e.value)&&f(e.value,t)}function p(e){return"object"==typeof e&&null!==e&&e.$$typeof===C}function f(t,n){if(t._store&&!t._store.validated&&null==t.key&&(t._store.validated=1,n=function(t){var n="",r=l();return r&&(r=e(r.type))&&(n="\n\nCheck the render method of `"+r+"`."),n||(t=e(t))&&(n="\n\nCheck the top-level render call using <"+t+">."),n}(n),!K[n])){K[n]=!0;var r="";t&&null!=t._owner&&t._owner!==l()&&(r=null,"number"==typeof t._owner.tag?r=e(t._owner.type):"string"==typeof t._owner.name&&(r=t._owner.name),r=" It was passed a child from "+r+".");var o=j.getCurrentStack;j.getCurrentStack=function(){var e=s(t.type);return o&&(e+=o()||""),e},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',n,r),j.getCurrentStack=o}}var h,m,g,y,b,v,w,x=t,C=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),I=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),A=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),P=Symbol.for("react.offscreen"),D=Symbol.iterator,B=Symbol.for("react.client.reference"),j=x.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=Object.prototype.hasOwnProperty,F=Object.assign,V=Symbol.for("react.client.reference"),z=Array.isArray,G=0;o.__reactDisabledLog=!0;var H,W,X,Z=!1,$=new("function"==typeof WeakMap?WeakMap:Map),Y=Symbol.for("react.client.reference"),U={},J={},K={};ed.Fragment=E,ed.jsx=function(e,t,n,r,o){return u(e,t,n,!1,0,o)},ed.jsxs=function(e,t,n,r,o){return u(e,t,n,!0,0,o)}}()),ed}var nd=(qu||(qu=1,"production"===process.env.NODE_ENV?Ju.exports=function(){if(Uu)return Ku;Uu=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(t,n,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==n.key&&(o=""+n.key),"key"in n)for(var i in r={},n)"key"!==i&&(r[i]=n[i]);else r=n;return n=r.ref,{$$typeof:e,type:t,key:o,ref:void 0!==n?n:null,props:r}}return Ku.Fragment=t,Ku.jsx=n,Ku.jsxs=n,Ku}():Ju.exports=td()),Ju.exports);function rd(t,n=[]){let r=[];const o=()=>{const n=r.map((t=>e.createContext(t)));return function(r){const o=r?.[t]||n;return e.useMemo((()=>({[`__scope${t}`]:{...r,[t]:o}})),[r,o])}};return o.scopeName=t,[function(n,o){const i=e.createContext(o),a=r.length;r=[...r,o];const s=n=>{const{scope:r,children:o,...s}=n,l=r?.[t]?.[a]||i,c=e.useMemo((()=>s),Object.values(s));return nd.jsx(l.Provider,{value:c,children:o})};return s.displayName=n+"Provider",[s,function(r,s){const l=s?.[t]?.[a]||i,c=e.useContext(l);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${r}\` must be used within \`${n}\``)}]},od(o,...n)]}function od(...t){const n=t[0];if(1===t.length)return n;const r=()=>{const r=t.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(t){const o=r.reduce(((e,{useScope:n,scopeName:r})=>({...e,...n(t)[`__scope${r}`]})),{});return e.useMemo((()=>({[`__scope${n.scopeName}`]:o})),[o])}};return r.scopeName=n.scopeName,r}var id=Boolean(globalThis?.document)?e.useLayoutEffect:()=>{},ad=e["useId".toString()]||(()=>{}),sd=0;function ld(t){const[n,r]=e.useState(ad());return id((()=>{r((e=>e??String(sd++)))}),[t]),t||(n?`radix-${n}`:"")}function cd(t){const n=e.useRef(t);return e.useEffect((()=>{n.current=t})),e.useMemo((()=>(...e)=>n.current?.(...e)),[])}function ud({prop:t,defaultProp:n,onChange:r=()=>{}}){const[o,i]=function({defaultProp:t,onChange:n}){const r=e.useState(t),[o]=r,i=e.useRef(o),a=cd(n);return e.useEffect((()=>{i.current!==o&&(a(o),i.current=o)}),[o,i,a]),r}({defaultProp:n,onChange:r}),a=void 0!==t,s=a?t:o,l=cd(r);return[s,e.useCallback((e=>{if(a){const n="function"==typeof e?e(t):e;n!==t&&l(n)}else i(e)}),[a,t,i,l])]}var dd=e.forwardRef(((t,n)=>{const{children:r,...o}=t,i=e.Children.toArray(r),a=i.find(hd);if(a){const t=a.props.children,r=i.map((n=>n===a?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:n));return nd.jsx(pd,{...o,ref:n,children:e.isValidElement(t)?e.cloneElement(t,void 0,r):null})}return nd.jsx(pd,{...o,ref:n,children:r})}));dd.displayName="Slot";var pd=e.forwardRef(((t,n)=>{const{children:r,...o}=t;if(e.isValidElement(r)){const t=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(r),i=function(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(o,r.props);return r.type!==e.Fragment&&(i.ref=n?$u(n,t):t),e.cloneElement(r,i)}return e.Children.count(r)>1?e.Children.only(null):null}));pd.displayName="SlotClone";var fd=({children:e})=>nd.jsx(nd.Fragment,{children:e});function hd(t){return e.isValidElement(t)&&t.type===fd}var md=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((t,n)=>{const r=e.forwardRef(((e,t)=>{const{asChild:r,...o}=e,i=r?dd:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),nd.jsx(i,{...o,ref:t})}));return r.displayName=`Primitive.${n}`,{...t,[n]:r}}),{});function gd(e,t){e&&w.flushSync((()=>e.dispatchEvent(t)))}var yd,bd="dismissableLayer.update",vd="dismissableLayer.pointerDownOutside",wd="dismissableLayer.focusOutside",xd=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Cd=e.forwardRef(((t,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...c}=t,u=e.useContext(xd),[d,p]=e.useState(null),f=d?.ownerDocument??globalThis?.document,[,h]=e.useState({}),m=Yu(n,(e=>p(e))),g=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(y),v=d?g.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,x=v>=b,C=function(t,n=globalThis?.document){const r=cd(t),o=e.useRef(!1),i=e.useRef((()=>{}));return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){let t=function(){Sd(vd,r,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(n.removeEventListener("click",i.current),i.current=t,n.addEventListener("click",i.current,{once:!0})):t()}else n.removeEventListener("click",i.current);o.current=!1},t=window.setTimeout((()=>{n.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(t),n.removeEventListener("pointerdown",e),n.removeEventListener("click",i.current)}}),[n,r]),{onPointerDownCapture:()=>o.current=!0}}((e=>{const t=e.target,n=[...u.branches].some((e=>e.contains(t)));x&&!n&&(i?.(e),s?.(e),e.defaultPrevented||l?.())}),f),k=function(t,n=globalThis?.document){const r=cd(t),o=e.useRef(!1);return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){Sd(wd,r,{originalEvent:e},{discrete:!1})}};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)}),[n,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}((e=>{const t=e.target;[...u.branches].some((e=>e.contains(t)))||(a?.(e),s?.(e),e.defaultPrevented||l?.())}),f);return function(t,n=globalThis?.document){const r=cd(t);e.useEffect((()=>{const e=e=>{"Escape"===e.key&&r(e)};return n.addEventListener("keydown",e,{capture:!0}),()=>n.removeEventListener("keydown",e,{capture:!0})}),[r,n])}((e=>{v===u.layers.size-1&&(o?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))}),f),e.useEffect((()=>{if(d)return r&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(yd=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Ed(),()=>{r&&1===u.layersWithOutsidePointerEventsDisabled.size&&(f.body.style.pointerEvents=yd)}}),[d,f,r,u]),e.useEffect((()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Ed())}),[d,u]),e.useEffect((()=>{const e=()=>h({});return document.addEventListener(bd,e),()=>document.removeEventListener(bd,e)}),[]),nd.jsx(md.div,{...c,ref:m,style:{pointerEvents:w?x?"auto":"none":void 0,...t.style},onFocusCapture:Xu(t.onFocusCapture,k.onFocusCapture),onBlurCapture:Xu(t.onBlurCapture,k.onBlurCapture),onPointerDownCapture:Xu(t.onPointerDownCapture,C.onPointerDownCapture)})}));Cd.displayName="DismissableLayer";var kd=e.forwardRef(((t,n)=>{const r=e.useContext(xd),o=e.useRef(null),i=Yu(n,o);return e.useEffect((()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}}),[r.branches]),nd.jsx(md.div,{...t,ref:i})}));function Ed(){const e=new CustomEvent(bd);document.dispatchEvent(e)}function Sd(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?gd(o,i):o.dispatchEvent(i)}kd.displayName="DismissableLayerBranch";var Id="focusScope.autoFocusOnMount",_d="focusScope.autoFocusOnUnmount",Ad={bubbles:!1,cancelable:!0},Nd=e.forwardRef(((t,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...s}=t,[l,c]=e.useState(null),u=cd(i),d=cd(a),p=e.useRef(null),f=Yu(n,(e=>c(e))),h=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect((()=>{if(o){let e=function(e){if(h.paused||!l)return;const t=e.target;l.contains(t)?p.current=t:Md(p.current,{select:!0})},t=function(e){if(h.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||Md(p.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Md(l)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[o,l,h.paused]),e.useEffect((()=>{if(l){Pd.add(h);const t=document.activeElement;if(!l.contains(t)){const n=new CustomEvent(Id,Ad);l.addEventListener(Id,u),l.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Md(r,{select:t}),document.activeElement!==n)return}((e=Od(l),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&Md(l))}return()=>{l.removeEventListener(Id,u),setTimeout((()=>{const e=new CustomEvent(_d,Ad);l.addEventListener(_d,d),l.dispatchEvent(e),e.defaultPrevented||Md(t??document.body,{select:!0}),l.removeEventListener(_d,d),Pd.remove(h)}),0)}}var e}),[l,u,d,h]);const m=e.useCallback((e=>{if(!r&&!o)return;if(h.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[o,i]=function(e){const t=Od(e),n=Rd(t,e),r=Rd(t.reverse(),e);return[n,r]}(t);o&&i?e.shiftKey||n!==i?e.shiftKey&&n===o&&(e.preventDefault(),r&&Md(i,{select:!0})):(e.preventDefault(),r&&Md(o,{select:!0})):n===t&&e.preventDefault()}}),[r,o,h.paused]);return nd.jsx(md.div,{tabIndex:-1,...s,ref:f,onKeyDown:m})}));function Od(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Rd(e,t){for(const n of e)if(!Td(n,{upTo:t}))return n}function Td(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function Md(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}Nd.displayName="FocusScope";var Pd=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Dd(e,t),e.unshift(t)},remove(t){e=Dd(e,t),e[0]?.resume()}}}();function Dd(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var Bd=e.forwardRef(((t,n)=>{const{container:r,...o}=t,[i,a]=e.useState(!1);id((()=>a(!0)),[]);const s=r||i&&globalThis?.document?.body;return s?x.createPortal(nd.jsx(md.div,{...o,ref:n}),s):null}));Bd.displayName="Portal";var jd=t=>{const{present:n,children:r}=t,o=function(t){const[n,r]=e.useState(),o=e.useRef({}),i=e.useRef(t),a=e.useRef("none"),s=t?"mounted":"unmounted",[l,c]=function(t,n){return e.useReducer(((e,t)=>n[e][t]??e),t)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect((()=>{const e=Ld(o.current);a.current="mounted"===l?e:"none"}),[l]),id((()=>{const e=o.current,n=i.current;if(n!==t){const r=a.current,o=Ld(e);if(t)c("MOUNT");else if("none"===o||"none"===e?.display)c("UNMOUNT");else{c(n&&r!==o?"ANIMATION_OUT":"UNMOUNT")}i.current=t}}),[t,c]),id((()=>{if(n){let e;const t=n.ownerDocument.defaultView??window,r=r=>{const a=Ld(o.current).includes(r.animationName);if(r.target===n&&a&&(c("ANIMATION_END"),!i.current)){const r=n.style.animationFillMode;n.style.animationFillMode="forwards",e=t.setTimeout((()=>{"forwards"===n.style.animationFillMode&&(n.style.animationFillMode=r)}))}},s=e=>{e.target===n&&(a.current=Ld(o.current))};return n.addEventListener("animationstart",s),n.addEventListener("animationcancel",r),n.addEventListener("animationend",r),()=>{t.clearTimeout(e),n.removeEventListener("animationstart",s),n.removeEventListener("animationcancel",r),n.removeEventListener("animationend",r)}}c("ANIMATION_END")}),[n,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:e.useCallback((e=>{e&&(o.current=getComputedStyle(e)),r(e)}),[])}}(n),i="function"==typeof r?r({present:o.isPresent}):e.Children.only(r),a=Yu(o.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(i));return"function"==typeof r||o.isPresent?e.cloneElement(i,{ref:a}):null};function Ld(e){return e?.animationName||"none"}jd.displayName="Presence";var Fd=0;function Vd(){e.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??zd()),document.body.insertAdjacentElement("beforeend",e[1]??zd()),Fd++,()=>{1===Fd&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),Fd--}}),[])}function zd(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Gd=function(){return Gd=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Gd.apply(this,arguments)};function Hd(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function Wd(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var Xd="right-scroll-bar-position",Zd="width-before-scroll-bar";function $d(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var Yd="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,Ud=new WeakMap;function Jd(e,t){var n,r,o,i=(n=null,r=function(t){return e.forEach((function(e){return $d(e,t)}))},(o=c((function(){return{value:n,callback:r,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}}))[0]).callback=r,o.facade);return Yd((function(){var t=Ud.get(i);if(t){var n=new Set(t),r=new Set(e),o=i.current;n.forEach((function(e){r.has(e)||$d(e,null)})),r.forEach((function(e){n.has(e)||$d(e,o)}))}Ud.set(i,e)}),[e]),i}function Kd(e){return e}var Qd=function(t){var n=t.sideCar,r=Hd(t,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=n.read();if(!o)throw new Error("Sidecar medium not found");return e.createElement(o,Gd({},r))};Qd.isSideCarExport=!0;var qd=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=Kd);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var i=function(){var n=t;t=[],n.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),n={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),n}}}};return o}(null);return t.options=Gd({async:!0,ssr:!1},e),t}(),ep=function(){},tp=e.forwardRef((function(t,n){var r=e.useRef(null),o=e.useState({onScrollCapture:ep,onWheelCapture:ep,onTouchMoveCapture:ep}),i=o[0],a=o[1],s=t.forwardProps,l=t.children,c=t.className,u=t.removeScrollBar,d=t.enabled,p=t.shards,f=t.sideCar,h=t.noIsolation,m=t.inert,g=t.allowPinchZoom,y=t.as,b=void 0===y?"div":y,v=t.gapMode,w=Hd(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=f,C=Jd([r,n]),k=Gd(Gd({},w),i);return e.createElement(e.Fragment,null,d&&e.createElement(x,{sideCar:qd,removeScrollBar:u,shards:p,noIsolation:h,inert:m,setCallbacks:a,allowPinchZoom:!!g,lockRef:r,gapMode:v}),s?e.cloneElement(e.Children.only(l),Gd(Gd({},k),{ref:C})):e.createElement(b,Gd({},k,{className:c,ref:C}),l))}));tp.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},tp.classNames={fullWidth:Zd,zeroRight:Xd};function np(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var rp=function(){var e=0,t=null;return{add:function(n){var r;0==e&&(t=np())&&(!function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}(t,n),r=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(r)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},op=function(){var t,n=(t=rp(),function(n,r){e.useEffect((function(){return t.add(n),function(){t.remove()}}),[n&&r])});return function(e){var t=e.styles,r=e.dynamic;return n(t,r),null}},ip={left:0,top:0,right:0,gap:0},ap=function(e){return parseInt(e||"",10)||0},sp=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return ip;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[ap(n),ap(r),ap(o)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},lp=op(),cp="data-scroll-locked",up=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body[").concat(cp,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Xd," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(Zd," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(Xd," .").concat(Xd," {\n right: 0 ").concat(r,";\n }\n \n .").concat(Zd," .").concat(Zd," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(cp,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},dp=function(){var e=parseInt(document.body.getAttribute(cp)||"0",10);return isFinite(e)?e:0},pp=function(t){var n=t.noRelative,r=t.noImportant,o=t.gapMode,i=void 0===o?"margin":o;e.useEffect((function(){return document.body.setAttribute(cp,(dp()+1).toString()),function(){var e=dp()-1;e<=0?document.body.removeAttribute(cp):document.body.setAttribute(cp,e.toString())}}),[]);var a=e.useMemo((function(){return sp(i)}),[i]);return e.createElement(lp,{styles:up(a,!n,i,r?"":"!important")})},fp=!1;if("undefined"!=typeof window)try{var hp=Object.defineProperty({},"passive",{get:function(){return fp=!0,!0}});window.addEventListener("test",hp,hp),window.removeEventListener("test",hp,hp)}catch(e){fp=!1}var mp=!!fp&&{passive:!1},gp=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},yp=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),bp(e,r)){var o=vp(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},bp=function(e,t){return"v"===e?function(e){return gp(e,"overflowY")}(t):function(e){return gp(e,"overflowX")}(t)},vp=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},wp=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},xp=function(e){return[e.deltaX,e.deltaY]},Cp=function(e){return e&&"current"in e?e.current:e},kp=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Ep=0,Sp=[];function Ip(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var _p,Ap=(_p=function(t){var n=e.useRef([]),r=e.useRef([0,0]),o=e.useRef(),i=e.useState(Ep++)[0],a=e.useState(op)[0],s=e.useRef(t);e.useEffect((function(){s.current=t}),[t]),e.useEffect((function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var e=Wd([t.lockRef.current],(t.shards||[]).map(Cp),!0).filter(Boolean);return e.forEach((function(e){return e.classList.add("allow-interactivity-".concat(i))})),function(){document.body.classList.remove("block-interactivity-".concat(i)),e.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(i))}))}}}),[t.inert,t.lockRef.current,t.shards]);var l=e.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!s.current.allowPinchZoom;var n,i=wp(e),a=r.current,l="deltaX"in e?e.deltaX:a[0]-i[0],c="deltaY"in e?e.deltaY:a[1]-i[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var p=yp(d,u);if(!p)return!0;if(p?n=d:(n="v"===d?"h":"v",p=yp(d,u)),!p)return!1;if(!o.current&&"changedTouches"in e&&(l||c)&&(o.current=n),!n)return!0;var f=o.current||n;return function(e,t,n,r){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),i=o*r,a=n.target,s=t.contains(a),l=!1,c=i>0,u=0,d=0;do{var p=vp(e,a),f=p[0],h=p[1]-p[2]-o*f;(f||h)&&bp(e,a)&&(u+=h,d+=f),a=a instanceof ShadowRoot?a.host:a.parentNode}while(!s&&a!==document.body||s&&(t.contains(a)||t===a));return(c&&Math.abs(u)<1||!c&&Math.abs(d)<1)&&(l=!0),l}(f,t,e,"h"===f?l:c)}),[]),c=e.useCallback((function(e){var t=e;if(Sp.length&&Sp[Sp.length-1]===a){var r="deltaY"in t?xp(t):wp(t),o=n.current.filter((function(e){return e.name===t.type&&(e.target===t.target||t.target===e.shadowParent)&&(n=e.delta,o=r,n[0]===o[0]&&n[1]===o[1]);var n,o}))[0];if(o&&o.should)t.cancelable&&t.preventDefault();else if(!o){var i=(s.current.shards||[]).map(Cp).filter(Boolean).filter((function(e){return e.contains(t.target)}));(i.length>0?l(t,i[0]):!s.current.noIsolation)&&t.cancelable&&t.preventDefault()}}}),[]),u=e.useCallback((function(e,t,r,o){var i={name:e,delta:t,target:r,should:o,shadowParent:Ip(r)};n.current.push(i),setTimeout((function(){n.current=n.current.filter((function(e){return e!==i}))}),1)}),[]),d=e.useCallback((function(e){r.current=wp(e),o.current=void 0}),[]),p=e.useCallback((function(e){u(e.type,xp(e),e.target,l(e,t.lockRef.current))}),[]),f=e.useCallback((function(e){u(e.type,wp(e),e.target,l(e,t.lockRef.current))}),[]);e.useEffect((function(){return Sp.push(a),t.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:f}),document.addEventListener("wheel",c,mp),document.addEventListener("touchmove",c,mp),document.addEventListener("touchstart",d,mp),function(){Sp=Sp.filter((function(e){return e!==a})),document.removeEventListener("wheel",c,mp),document.removeEventListener("touchmove",c,mp),document.removeEventListener("touchstart",d,mp)}}),[]);var h=t.removeScrollBar,m=t.inert;return e.createElement(e.Fragment,null,m?e.createElement(a,{styles:kp(i)}):null,h?e.createElement(pp,{gapMode:t.gapMode}):null)},qd.useMedium(_p),Qd),Np=e.forwardRef((function(t,n){return e.createElement(tp,Gd({},t,{ref:n,sideCar:Ap}))}));Np.classNames=tp.classNames;var Op=new WeakMap,Rp=new WeakMap,Tp={},Mp=0,Pp=function(e){return e&&(e.host||Pp(e.parentNode))},Dp=function(e,t,n,r){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=Pp(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);Tp[n]||(Tp[n]=new WeakMap);var i=Tp[n],a=[],s=new Set,l=new Set(o),c=function(e){e&&!s.has(e)&&(s.add(e),c(e.parentNode))};o.forEach(c);var u=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,l=(Op.get(e)||0)+1,c=(i.get(e)||0)+1;Op.set(e,l),i.set(e,c),a.push(e),1===l&&o&&Rp.set(e,!0),1===c&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}}))};return u(t),s.clear(),Mp++,function(){a.forEach((function(e){var t=Op.get(e)-1,o=i.get(e)-1;Op.set(e,t),i.set(e,o),t||(Rp.has(e)||e.removeAttribute(r),Rp.delete(e)),o||e.removeAttribute(n)})),--Mp||(Op=new WeakMap,Op=new WeakMap,Rp=new WeakMap,Tp={})}},Bp=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Dp(r,o,n,"aria-hidden")):function(){return null}},jp="Dialog",[Lp,Fp]=rd(jp),[Vp,zp]=Lp(jp),Gp=t=>{const{__scopeDialog:n,children:r,open:o,defaultOpen:i,onOpenChange:a,modal:s=!0}=t,l=e.useRef(null),c=e.useRef(null),[u=!1,d]=ud({prop:o,defaultProp:i,onChange:a});return nd.jsx(Vp,{scope:n,triggerRef:l,contentRef:c,contentId:ld(),titleId:ld(),descriptionId:ld(),open:u,onOpenChange:d,onOpenToggle:e.useCallback((()=>d((e=>!e))),[d]),modal:s,children:r})};Gp.displayName=jp;var Hp="DialogTrigger",Wp=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=zp(Hp,n),i=Yu(t,o.triggerRef);return nd.jsx(md.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":uf(o.open),...r,ref:i,onClick:Xu(e.onClick,o.onOpenToggle)})}));Wp.displayName=Hp;var Xp="DialogPortal",[Zp,$p]=Lp(Xp,{forceMount:void 0}),Yp=t=>{const{__scopeDialog:n,forceMount:r,children:o,container:i}=t,a=zp(Xp,n);return nd.jsx(Zp,{scope:n,forceMount:r,children:e.Children.map(o,(e=>nd.jsx(jd,{present:r||a.open,children:nd.jsx(Bd,{asChild:!0,container:i,children:e})})))})};Yp.displayName=Xp;var Up="DialogOverlay",Jp=e.forwardRef(((e,t)=>{const n=$p(Up,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=zp(Up,e.__scopeDialog);return i.modal?nd.jsx(jd,{present:r||i.open,children:nd.jsx(Kp,{...o,ref:t})}):null}));Jp.displayName=Up;var Kp=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=zp(Up,n);return nd.jsx(Np,{as:dd,allowPinchZoom:!0,shards:[o.contentRef],children:nd.jsx(md.div,{"data-state":uf(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})})),Qp="DialogContent",qp=e.forwardRef(((e,t)=>{const n=$p(Qp,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=zp(Qp,e.__scopeDialog);return nd.jsx(jd,{present:r||i.open,children:i.modal?nd.jsx(ef,{...o,ref:t}):nd.jsx(tf,{...o,ref:t})})}));qp.displayName=Qp;var ef=e.forwardRef(((t,n)=>{const r=zp(Qp,t.__scopeDialog),o=e.useRef(null),i=Yu(n,r.contentRef,o);return e.useEffect((()=>{const e=o.current;if(e)return Bp(e)}),[]),nd.jsx(nf,{...t,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Xu(t.onCloseAutoFocus,(e=>{e.preventDefault(),r.triggerRef.current?.focus()})),onPointerDownOutside:Xu(t.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:Xu(t.onFocusOutside,(e=>e.preventDefault()))})})),tf=e.forwardRef(((t,n)=>{const r=zp(Qp,t.__scopeDialog),o=e.useRef(!1),i=e.useRef(!1);return nd.jsx(nf,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||r.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(i.current=!0));const n=e.target,a=r.triggerRef.current?.contains(n);a&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}})})),nf=e.forwardRef(((t,n)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,...s}=t,l=zp(Qp,r),c=e.useRef(null),u=Yu(n,c);return Vd(),nd.jsxs(nd.Fragment,{children:[nd.jsx(Nd,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a,children:nd.jsx(Cd,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":uf(l.open),...s,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),nd.jsxs(nd.Fragment,{children:[nd.jsx(hf,{titleId:l.titleId}),nd.jsx(mf,{contentRef:c,descriptionId:l.descriptionId})]})]})})),rf="DialogTitle",of=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=zp(rf,n);return nd.jsx(md.h2,{id:o.titleId,...r,ref:t})}));of.displayName=rf;var af="DialogDescription",sf=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=zp(af,n);return nd.jsx(md.p,{id:o.descriptionId,...r,ref:t})}));sf.displayName=af;var lf="DialogClose",cf=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=zp(lf,n);return nd.jsx(md.button,{type:"button",...r,ref:t,onClick:Xu(e.onClick,(()=>o.onOpenChange(!1)))})}));function uf(e){return e?"open":"closed"}cf.displayName=lf;var df="DialogTitleWarning",[pf,ff]=function(t,n){const r=e.createContext(n),o=t=>{const{children:n,...o}=t,i=e.useMemo((()=>o),Object.values(o));return nd.jsx(r.Provider,{value:i,children:n})};return o.displayName=t+"Provider",[o,function(o){const i=e.useContext(r);if(i)return i;if(void 0!==n)return n;throw new Error(`\`${o}\` must be used within \`${t}\``)}]}(df,{contentName:Qp,titleName:rf,docsSlug:"dialog"}),hf=({titleId:t})=>{const n=ff(df),r=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return e.useEffect((()=>{if(t){document.getElementById(t)||console.error(r)}}),[r,t]),null},mf=({contentRef:t,descriptionId:n})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ff("DialogDescriptionWarning").contentName}}.`;return e.useEffect((()=>{const e=t.current?.getAttribute("aria-describedby");if(n&&e){document.getElementById(n)||console.warn(r)}}),[r,t,n]),null},gf=Gp,yf=Wp,bf=Yp,vf=Jp,wf=qp,xf=of,Cf=sf,kf=cf;var Ef,Sf={exports:{}},If={};function _f(){if(Ef)return If;Ef=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),f=Symbol.for("react.client.reference");function h(p){if("object"==typeof p&&null!==p){var f=p.$$typeof;switch(f){case e:switch(p=p.type){case n:case o:case r:case l:case c:return p;default:switch(p=p&&p.$$typeof){case a:case s:case d:case u:case i:return p;default:return f}}case t:return f}}}return If.ContextConsumer=i,If.ContextProvider=a,If.Element=e,If.ForwardRef=s,If.Fragment=n,If.Lazy=d,If.Memo=u,If.Portal=t,If.Profiler=o,If.StrictMode=r,If.Suspense=l,If.SuspenseList=c,If.isContextConsumer=function(e){return h(e)===i},If.isContextProvider=function(e){return h(e)===a},If.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},If.isForwardRef=function(e){return h(e)===s},If.isFragment=function(e){return h(e)===n},If.isLazy=function(e){return h(e)===d},If.isMemo=function(e){return h(e)===u},If.isPortal=function(e){return h(e)===t},If.isProfiler=function(e){return h(e)===o},If.isStrictMode=function(e){return h(e)===r},If.isSuspense=function(e){return h(e)===l},If.isSuspenseList=function(e){return h(e)===c},If.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===o||e===r||e===l||e===c||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===u||e.$$typeof===a||e.$$typeof===i||e.$$typeof===s||e.$$typeof===f||void 0!==e.getModuleId)},If.typeOf=h,If}var Af,Nf,Of={};
|
|
38
|
-
/**
|
|
39
|
-
* @license React
|
|
40
|
-
* react-is.development.js
|
|
41
|
-
*
|
|
42
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
43
|
-
*
|
|
44
|
-
* This source code is licensed under the MIT license found in the
|
|
45
|
-
* LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/function Rf(){return Af||(Af=1,"production"!==process.env.NODE_ENV&&function(){function e(e){if("object"==typeof e&&null!==e){var f=e.$$typeof;switch(f){case t:switch(e=e.type){case r:case i:case o:case c:case u:return e;default:switch(e=e&&e.$$typeof){case s:case l:case p:case d:case a:return e;default:return f}}case n:return f}}}var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen"),h=Symbol.for("react.client.reference");Of.ContextConsumer=a,Of.ContextProvider=s,Of.Element=t,Of.ForwardRef=l,Of.Fragment=r,Of.Lazy=p,Of.Memo=d,Of.Portal=n,Of.Profiler=i,Of.StrictMode=o,Of.Suspense=c,Of.SuspenseList=u,Of.isContextConsumer=function(t){return e(t)===a},Of.isContextProvider=function(t){return e(t)===s},Of.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Of.isForwardRef=function(t){return e(t)===l},Of.isFragment=function(t){return e(t)===r},Of.isLazy=function(t){return e(t)===p},Of.isMemo=function(t){return e(t)===d},Of.isPortal=function(t){return e(t)===n},Of.isProfiler=function(t){return e(t)===i},Of.isStrictMode=function(t){return e(t)===o},Of.isSuspense=function(t){return e(t)===c},Of.isSuspenseList=function(t){return e(t)===u},Of.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===i||e===o||e===c||e===u||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===d||e.$$typeof===s||e.$$typeof===a||e.$$typeof===l||e.$$typeof===h||void 0!==e.getModuleId)},Of.typeOf=e}()),Of}function Tf(){return Nf||(Nf=1,"production"===process.env.NODE_ENV?Sf.exports=_f():Sf.exports=Rf()),Sf.exports}var Mf=Tf();function Pf(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function Df(t){if(e.isValidElement(t)||Mf.isValidElementType(t)||!Pf(t))return t;const n={};return Object.keys(t).forEach((e=>{n[e]=Df(t[e])})),n}function Bf(t,n,r={clone:!0}){const o=r.clone?{...t}:t;return Pf(t)&&Pf(n)&&Object.keys(n).forEach((i=>{e.isValidElement(n[i])||Mf.isValidElementType(n[i])?o[i]=n[i]:Pf(n[i])&&Object.prototype.hasOwnProperty.call(t,i)&&Pf(t[i])?o[i]=Bf(t[i],n[i],r):r.clone?o[i]=Pf(n[i])?Df(n[i]):n[i]:o[i]=n[i]})),o}var jf,Lf={exports:{}},Ff={exports:{}},Vf={};var zf,Gf,Hf,Wf,Xf,Zf,$f,Yf,Uf,Jf,Kf,Qf,qf,eh,th,nh={};
|
|
47
|
-
/** @license React v16.13.1
|
|
48
|
-
* react-is.development.js
|
|
49
|
-
*
|
|
50
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
51
|
-
*
|
|
52
|
-
* This source code is licensed under the MIT license found in the
|
|
53
|
-
* LICENSE file in the root directory of this source tree.
|
|
54
|
-
*/function rh(){return Gf||(Gf=1,"production"===process.env.NODE_ENV?Ff.exports=function(){if(jf)return Vf;jf=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function v(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case l:case c:case r:case i:case o:case d:return e;default:switch(e=e&&e.$$typeof){case s:case u:case h:case f:case a:return e;default:return p}}case n:return p}}}function w(e){return v(e)===c}return Vf.AsyncMode=l,Vf.ConcurrentMode=c,Vf.ContextConsumer=s,Vf.ContextProvider=a,Vf.Element=t,Vf.ForwardRef=u,Vf.Fragment=r,Vf.Lazy=h,Vf.Memo=f,Vf.Portal=n,Vf.Profiler=i,Vf.StrictMode=o,Vf.Suspense=d,Vf.isAsyncMode=function(e){return w(e)||v(e)===l},Vf.isConcurrentMode=w,Vf.isContextConsumer=function(e){return v(e)===s},Vf.isContextProvider=function(e){return v(e)===a},Vf.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Vf.isForwardRef=function(e){return v(e)===u},Vf.isFragment=function(e){return v(e)===r},Vf.isLazy=function(e){return v(e)===h},Vf.isMemo=function(e){return v(e)===f},Vf.isPortal=function(e){return v(e)===n},Vf.isProfiler=function(e){return v(e)===i},Vf.isStrictMode=function(e){return v(e)===o},Vf.isSuspense=function(e){return v(e)===d},Vf.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===f||e.$$typeof===a||e.$$typeof===s||e.$$typeof===u||e.$$typeof===g||e.$$typeof===y||e.$$typeof===b||e.$$typeof===m)},Vf.typeOf=v,Vf}():Ff.exports=(zf||(zf=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function v(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:var m=e.type;switch(m){case l:case c:case r:case i:case o:case d:return m;default:var g=m&&m.$$typeof;switch(g){case s:case u:case h:case f:case a:return g;default:return p}}case n:return p}}}var w=l,x=c,C=s,k=a,E=t,S=u,I=r,_=h,A=f,N=n,O=i,R=o,T=d,M=!1;function P(e){return v(e)===c}nh.AsyncMode=w,nh.ConcurrentMode=x,nh.ContextConsumer=C,nh.ContextProvider=k,nh.Element=E,nh.ForwardRef=S,nh.Fragment=I,nh.Lazy=_,nh.Memo=A,nh.Portal=N,nh.Profiler=O,nh.StrictMode=R,nh.Suspense=T,nh.isAsyncMode=function(e){return M||(M=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),P(e)||v(e)===l},nh.isConcurrentMode=P,nh.isContextConsumer=function(e){return v(e)===s},nh.isContextProvider=function(e){return v(e)===a},nh.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},nh.isForwardRef=function(e){return v(e)===u},nh.isFragment=function(e){return v(e)===r},nh.isLazy=function(e){return v(e)===h},nh.isMemo=function(e){return v(e)===f},nh.isPortal=function(e){return v(e)===n},nh.isProfiler=function(e){return v(e)===i},nh.isStrictMode=function(e){return v(e)===o},nh.isSuspense=function(e){return v(e)===d},nh.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===f||e.$$typeof===a||e.$$typeof===s||e.$$typeof===u||e.$$typeof===g||e.$$typeof===y||e.$$typeof===b||e.$$typeof===m)},nh.typeOf=v}()),nh)),Ff.exports}
|
|
55
|
-
/*
|
|
56
|
-
object-assign
|
|
57
|
-
(c) Sindre Sorhus
|
|
58
|
-
@license MIT
|
|
59
|
-
*/function oh(){if(Wf)return Hf;Wf=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;return Hf=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(r,o){for(var i,a,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(r),l=1;l<arguments.length;l++){for(var c in i=Object(arguments[l]))t.call(i,c)&&(s[c]=i[c]);if(e){a=e(i);for(var u=0;u<a.length;u++)n.call(i,a[u])&&(s[a[u]]=i[a[u]])}}return s},Hf}function ih(){if(Zf)return Xf;Zf=1;return Xf="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function ah(){return Yf?$f:(Yf=1,$f=Function.call.bind(Object.prototype.hasOwnProperty))}function sh(){if(Jf)return Uf;Jf=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=ih(),n={},r=ah();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function o(o,i,a,s,l){if("production"!==process.env.NODE_ENV)for(var c in o)if(r(o,c)){var u;try{if("function"!=typeof o[c]){var d=Error((s||"React class")+": "+a+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}u=o[c](i,c,s,a,null,t)}catch(e){u=e}if(!u||u instanceof Error||e((s||"React class")+": type specification of "+a+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in n)){n[u.message]=!0;var p=l?l():"";e("Failed "+a+" type: "+u.message+(null!=p?p:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},Uf=o}function lh(){if(Qf)return Kf;Qf=1;var e=rh(),t=oh(),n=ih(),r=ah(),o=sh(),i=function(){};function a(){return null}return"production"!==process.env.NODE_ENV&&(i=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),Kf=function(s,l){var c="function"==typeof Symbol&&Symbol.iterator;var u="<<anonymous>>",d={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:h(a),arrayOf:function(e){return h((function(t,r,o,i,a){if("function"!=typeof e)return new f("Property `"+a+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var s=t[r];if(!Array.isArray(s))return new f("Invalid "+i+" `"+a+"` of type `"+b(s)+"` supplied to `"+o+"`, expected an array.");for(var l=0;l<s.length;l++){var c=e(s,l,o,i,a+"["+l+"]",n);if(c instanceof Error)return c}return null}))},element:h((function(e,t,n,r,o){var i=e[t];return s(i)?null:new f("Invalid "+r+" `"+o+"` of type `"+b(i)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:h((function(t,n,r,o,i){var a=t[n];return e.isValidElementType(a)?null:new f("Invalid "+o+" `"+i+"` of type `"+b(a)+"` supplied to `"+r+"`, expected a single ReactElement type.")})),instanceOf:function(e){return h((function(t,n,r,o,i){if(!(t[n]instanceof e)){var a=e.name||u;return new f("Invalid "+o+" `"+i+"` of type `"+(((s=t[n]).constructor&&s.constructor.name?s.constructor.name:u)+"` supplied to `")+r+"`, expected instance of `"+a+"`.")}var s;return null}))},node:h((function(e,t,n,r,o){return y(e[t])?null:new f("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return h((function(t,o,i,a,s){if("function"!=typeof e)return new f("Property `"+s+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var l=t[o],c=b(l);if("object"!==c)return new f("Invalid "+a+" `"+s+"` of type `"+c+"` supplied to `"+i+"`, expected an object.");for(var u in l)if(r(l,u)){var d=e(l,u,i,a,s+"."+u,n);if(d instanceof Error)return d}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),a;return h((function(t,n,r,o,i){for(var a=t[n],s=0;s<e.length;s++)if(p(a,e[s]))return null;var l=JSON.stringify(e,(function(e,t){return"symbol"===v(t)?String(t):t}));return new f("Invalid "+o+" `"+i+"` of value `"+String(a)+"` supplied to `"+r+"`, expected one of "+l+".")}))},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var t=0;t<e.length;t++){var o=e[t];if("function"!=typeof o)return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+w(o)+" at index "+t+"."),a}return h((function(t,o,i,a,s){for(var l=[],c=0;c<e.length;c++){var u=(0,e[c])(t,o,i,a,s,n);if(null==u)return null;u.data&&r(u.data,"expectedType")&&l.push(u.data.expectedType)}return new f("Invalid "+a+" `"+s+"` supplied to `"+i+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")}))},shape:function(e){return h((function(t,r,o,i,a){var s=t[r],l=b(s);if("object"!==l)return new f("Invalid "+i+" `"+a+"` of type `"+l+"` supplied to `"+o+"`, expected `object`.");for(var c in e){var u=e[c];if("function"!=typeof u)return g(o,i,a,c,v(u));var d=u(s,c,o,i,a+"."+c,n);if(d)return d}return null}))},exact:function(e){return h((function(o,i,a,s,l){var c=o[i],u=b(c);if("object"!==u)return new f("Invalid "+s+" `"+l+"` of type `"+u+"` supplied to `"+a+"`, expected `object`.");var d=t({},o[i],e);for(var p in d){var h=e[p];if(r(e,p)&&"function"!=typeof h)return g(a,s,l,p,v(h));if(!h)return new f("Invalid "+s+" `"+l+"` key `"+p+"` supplied to `"+a+"`.\nBad object: "+JSON.stringify(o[i],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=h(c,p,a,s,l+"."+p,n);if(m)return m}return null}))}};function p(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function f(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function h(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function o(o,a,s,c,d,p,h){if(c=c||u,p=p||s,h!==n){if(l){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var g=c+":"+s;!t[g]&&r<3&&(i("You are manually calling a React.PropTypes validation function for the `"+p+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[g]=!0,r++)}}return null==a[s]?o?null===a[s]?new f("The "+d+" `"+p+"` is marked as required in `"+c+"`, but its value is `null`."):new f("The "+d+" `"+p+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(a,s,c,d,p)}var a=o.bind(null,!1);return a.isRequired=o.bind(null,!0),a}function m(e){return h((function(t,n,r,o,i,a){var s=t[n];return b(s)!==e?new f("Invalid "+o+" `"+i+"` of type `"+v(s)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function g(e,t,n,r,o){return new f((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function y(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(y);if(null===e||s(e))return!0;var t=function(e){var t=e&&(c&&e[c]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!y(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!y(o[1]))return!1}return!0;default:return!1}}function b(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function v(e){if(null==e)return""+e;var t=b(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function w(e){var t=v(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return f.prototype=Error.prototype,d.checkPropTypes=o,d.resetWarningCache=o.resetWarningCache,d.PropTypes=d,d},Kf}function ch(){if(eh)return qf;eh=1;var e=ih();function t(){}function n(){}return n.resetWarningCache=t,qf=function(){function r(t,n,r,o,i,a){if(a!==e){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function o(){return r}r.isRequired=r;var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},qf}function uh(){if(th)return Lf.exports;if(th=1,"production"!==process.env.NODE_ENV){var e=rh();Lf.exports=lh()(e.isElement,true)}else Lf.exports=ch()();return Lf.exports}var dh=uh(),ph=S(dh);var fh,hh,mh=(fh=ph.elementType,hh=function(e,t,n,r,o){const i=e[t],a=o||t;if(null==i||"undefined"==typeof window)return null;let s;return"function"!=typeof i||function(e){const{prototype:t={}}=e;return Boolean(t.isReactComponent)}(i)||(s="Did you accidentally provide a plain function component instead?"),void 0!==s?new Error(`Invalid ${r} \`${a}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${s} For more information see https://mui.com/r/caveat-with-refs-guide`):null},"production"===process.env.NODE_ENV?()=>null:function(...e){return fh(...e)||hh(...e)});function gh(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach((e=>n.searchParams.append("args[]",e))),`Minified MUI error #${e}; visit ${n} for the full message.`}function yh(e,t=""){return e.displayName||e.name||t}function bh(e,t,n){const r=yh(t);return e.displayName||(""!==r?`${n}(${r})`:n)}const vh=ph.oneOfType([ph.func,ph.object]);function wh(e){if("string"!=typeof e)throw new Error("production"!==process.env.NODE_ENV?"MUI: `capitalize(string)` expects a string argument.":gh(7));return e.charAt(0).toUpperCase()+e.slice(1)}const xh="undefined"!=typeof window?e.useLayoutEffect:e.useEffect;function Ch(t){const n=e.useRef(t);return xh((()=>{n.current=t})),e.useRef(((...e)=>(0,n.current)(...e))).current}function kh(...t){return e.useMemo((()=>t.every((e=>null==e))?null:e=>{t.forEach((t=>{!function(e,t){"function"==typeof e?e(t):e&&(e.current=t)}(t,e)}))}),t)}const Eh={};function Sh(t,n){const r=e.useRef(Eh);return r.current===Eh&&(r.current=t(n)),r}const Ih=[];class _h{static create(){return new _h}currentId=null;start(e,t){this.clear(),this.currentId=setTimeout((()=>{this.currentId=null,t()}),e)}clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function Ah(){const t=Sh(_h.create).current;var n;return n=t.disposeEffect,e.useEffect(n,Ih),t}function Nh(e){try{return e.matches(":focus-visible")}catch(e){"production"===process.env.NODE_ENV||/jsdom/.test(window.navigator.userAgent)||console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join("\n"))}return!1}function Oh(e,t){const n={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const o=r;if("components"===o||"slots"===o)n[o]={...e[o],...n[o]};else if("componentsProps"===o||"slotProps"===o){const r=e[o],i=t[o];if(i)if(r){n[o]={...i};for(const e in r)if(Object.prototype.hasOwnProperty.call(r,e)){const t=e;n[o][t]=Oh(r[t],i[t])}}else n[o]=i;else n[o]=r||{}}else void 0===n[o]&&(n[o]=e[o])}return n}function Rh(e,t,n=void 0){const r={};for(const o in e){const i=e[o];let a="",s=!0;for(let e=0;e<i.length;e+=1){const r=i[e];r&&(a+=(!0===s?"":" ")+t(r),s=!1,n&&n[r]&&(a+=" "+n[r]))}r[o]=a}return r}const Th=e=>e,Mh=(()=>{let e=Th;return{configure(t){e=t},generate:t=>e(t),reset(){e=Th}}})(),Ph={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Dh(e,t,n="Mui"){const r=Ph[t];return r?`${n}-${r}`:`${Mh.generate(e)}-${t}`}function Bh(e,t,n="Mui"){const r={};return t.forEach((t=>{r[t]=Dh(e,t,n)})),r}function jh(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=jh(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Lh(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=jh(e))&&(r&&(r+=" "),r+=t);return r}function Fh(e){if(void 0===e)return{};const t={};return Object.keys(e).filter((t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t]))).forEach((n=>{t[n]=e[n]})),t}function Vh(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const e=Lh(n?.className,i,o?.className,r?.className),t={...n?.style,...o?.style,...r?.style},a={...n,...o,...r};return e.length>0&&(a.className=e),Object.keys(t).length>0&&(a.style=t),{props:a,internalRef:void 0}}const a=function(e,t=[]){if(void 0===e)return{};const n={};return Object.keys(e).filter((n=>n.match(/^on[A-Z]/)&&"function"==typeof e[n]&&!t.includes(n))).forEach((t=>{n[t]=e[t]})),n}({...o,...r}),s=Fh(r),l=Fh(o),c=t(a),u=Lh(c?.className,n?.className,i,o?.className,r?.className),d={...c?.style,...n?.style,...o?.style,...r?.style},p={...c,...n,...l,...s};return u.length>0&&(p.className=u),Object.keys(d).length>0&&(p.style=d),{props:p,internalRef:c.ref}}function zh(e,t){return t?Bf(e,t,{clone:!1}):e}const Gh="production"!==process.env.NODE_ENV?ph.oneOfType([ph.number,ph.string,ph.object,ph.array]):{};const Hh={xs:0,sm:600,md:900,lg:1200,xl:1536},Wh={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Hh[e]}px)`},Xh={containerQueries:e=>({up:t=>{let n="number"==typeof t?t:Hh[t]||t;return"number"==typeof n&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Zh(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||Wh;return t.reduce(((r,o,i)=>(r[e.up(e.keys[i])]=n(t[i]),r)),{})}if("object"==typeof t){const e=r.breakpoints||Wh;return Object.keys(t).reduce(((o,i)=>{if(a=e.keys,"@"===(s=i)||s.startsWith("@")&&(a.some((e=>s.startsWith(`@${e}`)))||s.match(/^@\d/))){const e=function(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n){if("production"!==process.env.NODE_ENV)throw new Error("production"!==process.env.NODE_ENV?`MUI: The provided shorthand (${t}) is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.\nFor example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:gh(18,`(${t})`));return null}const[,r,o]=n,i=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(i)}(r.containerQueries?r:Xh,i);e&&(o[e]=n(t[i],i))}else if(Object.keys(e.values||Hh).includes(i)){o[e.up(i)]=n(t[i],i)}else{const e=i;o[e]=t[e]}var a,s;return o}),{})}return n(t)}function $h(e={}){const t=e.keys?.reduce(((t,n)=>(t[e.up(n)]={},t)),{});return t||{}}function Yh(e,t){return e.reduce(((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}function Uh({values:e,breakpoints:t,base:n}){const r=n||function(e,t){if("object"!=typeof e)return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach(((t,r)=>{r<e.length&&(n[t]=!0)})):r.forEach((t=>{null!=e[t]&&(n[t]=!0)})),n}(e,t),o=Object.keys(r);if(0===o.length)return e;let i;return o.reduce(((t,n,r)=>(Array.isArray(e)?(t[n]=null!=e[r]?e[r]:e[i],i=r):"object"==typeof e?(t[n]=null!=e[n]?e[n]:e[i],i=n):t[n]=e,t)),{})}function Jh(e,t,n=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=n)return n}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function Kh(e,t,n,r=n){let o;return o="function"==typeof e?e(n):Array.isArray(e)?e[n]||r:Jh(e,n)||r,t&&(o=t(o,r,e)),o}function Qh(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,i=e=>{if(null==e[t])return null;const i=e[t],a=Jh(e.theme,r)||{};return Zh(e,i,(e=>{let r=Kh(a,o,e);return e===r&&"string"==typeof e&&(r=Kh(a,o,`${t}${"default"===e?"":wh(e)}`,e)),!1===n?r:{[n]:r}}))};return i.propTypes="production"!==process.env.NODE_ENV?{[t]:Gh}:{},i.filterProps=[t],i}const qh={m:"margin",p:"padding"},em={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},tm={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},nm=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}((e=>{if(e.length>2){if(!tm[e])return[e];e=tm[e]}const[t,n]=e.split(""),r=qh[t],o=em[n]||"";return Array.isArray(o)?o.map((e=>r+e)):[r+o]})),rm=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],om=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],im=[...rm,...om];function am(e,t,n,r){const o=Jh(e,t,!0)??n;return"number"==typeof o||"string"==typeof o?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&"number"!=typeof e&&console.error(`MUI: Expected ${r} argument to be a number or a string, got ${e}.`),"string"==typeof o?`calc(${e} * ${o})`:o*e):Array.isArray(o)?e=>{if("string"==typeof e)return e;const n=Math.abs(e);"production"!==process.env.NODE_ENV&&(Number.isInteger(n)?n>o.length-1&&console.error([`MUI: The value provided (${n}) overflows.`,`The supported values are: ${JSON.stringify(o)}.`,`${n} > ${o.length-1}, you need to add the missing values.`].join("\n")):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join("\n")));const r=o[n];return e>=0?r:"number"==typeof r?-r:`-${r}`}:"function"==typeof o?o:("production"!==process.env.NODE_ENV&&console.error([`MUI: The \`theme.${t}\` value (${o}) is invalid.`,"It should be a number, an array or a function."].join("\n")),()=>{})}function sm(e){return am(e,"spacing",8,"spacing")}function lm(e,t){return"string"==typeof t||null==t?t:e(t)}function cm(e,t,n,r){if(!t.includes(n))return null;const o=function(e,t){return n=>e.reduce(((e,r)=>(e[r]=lm(t,n),e)),{})}(nm(n),r);return Zh(e,e[n],o)}function um(e,t){const n=sm(e.theme);return Object.keys(e).map((r=>cm(e,t,r,n))).reduce(zh,{})}function dm(e){return um(e,rm)}function pm(e){return um(e,om)}function fm(...e){const t=e.reduce(((e,t)=>(t.filterProps.forEach((n=>{e[n]=t})),e)),{}),n=e=>Object.keys(e).reduce(((n,r)=>t[r]?zh(n,t[r](e)):n),{});return n.propTypes="production"!==process.env.NODE_ENV?e.reduce(((e,t)=>Object.assign(e,t.propTypes)),{}):{},n.filterProps=e.reduce(((e,t)=>e.concat(t.filterProps)),[]),n}function hm(e){return"number"!=typeof e?e:`${e}px solid`}function mm(e,t){return Qh({prop:e,themeKey:"borders",transform:t})}dm.propTypes="production"!==process.env.NODE_ENV?rm.reduce(((e,t)=>(e[t]=Gh,e)),{}):{},dm.filterProps=rm,pm.propTypes="production"!==process.env.NODE_ENV?om.reduce(((e,t)=>(e[t]=Gh,e)),{}):{},pm.filterProps=om,"production"===process.env.NODE_ENV||im.reduce(((e,t)=>(e[t]=Gh,e)),{});const gm=mm("border",hm),ym=mm("borderTop",hm),bm=mm("borderRight",hm),vm=mm("borderBottom",hm),wm=mm("borderLeft",hm),xm=mm("borderColor"),Cm=mm("borderTopColor"),km=mm("borderRightColor"),Em=mm("borderBottomColor"),Sm=mm("borderLeftColor"),Im=mm("outline",hm),_m=mm("outlineColor"),Am=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=am(e.theme,"shape.borderRadius",4,"borderRadius"),n=e=>({borderRadius:lm(t,e)});return Zh(e,e.borderRadius,n)}return null};Am.propTypes="production"!==process.env.NODE_ENV?{borderRadius:Gh}:{},Am.filterProps=["borderRadius"],fm(gm,ym,bm,vm,wm,xm,Cm,km,Em,Sm,Am,Im,_m);const Nm=e=>{if(void 0!==e.gap&&null!==e.gap){const t=am(e.theme,"spacing",8,"gap"),n=e=>({gap:lm(t,e)});return Zh(e,e.gap,n)}return null};Nm.propTypes="production"!==process.env.NODE_ENV?{gap:Gh}:{},Nm.filterProps=["gap"];const Om=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=am(e.theme,"spacing",8,"columnGap"),n=e=>({columnGap:lm(t,e)});return Zh(e,e.columnGap,n)}return null};Om.propTypes="production"!==process.env.NODE_ENV?{columnGap:Gh}:{},Om.filterProps=["columnGap"];const Rm=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=am(e.theme,"spacing",8,"rowGap"),n=e=>({rowGap:lm(t,e)});return Zh(e,e.rowGap,n)}return null};Rm.propTypes="production"!==process.env.NODE_ENV?{rowGap:Gh}:{},Rm.filterProps=["rowGap"];function Tm(e,t){return"grey"===t?t:e}fm(Nm,Om,Rm,Qh({prop:"gridColumn"}),Qh({prop:"gridRow"}),Qh({prop:"gridAutoFlow"}),Qh({prop:"gridAutoColumns"}),Qh({prop:"gridAutoRows"}),Qh({prop:"gridTemplateColumns"}),Qh({prop:"gridTemplateRows"}),Qh({prop:"gridTemplateAreas"}),Qh({prop:"gridArea"}));function Mm(e){return e<=1&&0!==e?100*e+"%":e}fm(Qh({prop:"color",themeKey:"palette",transform:Tm}),Qh({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Tm}),Qh({prop:"backgroundColor",themeKey:"palette",transform:Tm}));const Pm=Qh({prop:"width",transform:Mm}),Dm=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{const n=e.theme?.breakpoints?.values?.[t]||Hh[t];return n?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:Mm(t)}};return Zh(e,e.maxWidth,t)}return null};Dm.filterProps=["maxWidth"];const Bm=Qh({prop:"minWidth",transform:Mm}),jm=Qh({prop:"height",transform:Mm}),Lm=Qh({prop:"maxHeight",transform:Mm}),Fm=Qh({prop:"minHeight",transform:Mm});Qh({prop:"size",cssProperty:"width",transform:Mm}),Qh({prop:"size",cssProperty:"height",transform:Mm});fm(Pm,Dm,Bm,jm,Lm,Fm,Qh({prop:"boxSizing"}));const Vm={border:{themeKey:"borders",transform:hm},borderTop:{themeKey:"borders",transform:hm},borderRight:{themeKey:"borders",transform:hm},borderBottom:{themeKey:"borders",transform:hm},borderLeft:{themeKey:"borders",transform:hm},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:hm},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Am},color:{themeKey:"palette",transform:Tm},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Tm},backgroundColor:{themeKey:"palette",transform:Tm},p:{style:pm},pt:{style:pm},pr:{style:pm},pb:{style:pm},pl:{style:pm},px:{style:pm},py:{style:pm},padding:{style:pm},paddingTop:{style:pm},paddingRight:{style:pm},paddingBottom:{style:pm},paddingLeft:{style:pm},paddingX:{style:pm},paddingY:{style:pm},paddingInline:{style:pm},paddingInlineStart:{style:pm},paddingInlineEnd:{style:pm},paddingBlock:{style:pm},paddingBlockStart:{style:pm},paddingBlockEnd:{style:pm},m:{style:dm},mt:{style:dm},mr:{style:dm},mb:{style:dm},ml:{style:dm},mx:{style:dm},my:{style:dm},margin:{style:dm},marginTop:{style:dm},marginRight:{style:dm},marginBottom:{style:dm},marginLeft:{style:dm},marginX:{style:dm},marginY:{style:dm},marginInline:{style:dm},marginInlineStart:{style:dm},marginInlineEnd:{style:dm},marginBlock:{style:dm},marginBlockStart:{style:dm},marginBlockEnd:{style:dm},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Nm},rowGap:{style:Rm},columnGap:{style:Om},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Mm},maxWidth:{style:Dm},minWidth:{transform:Mm},height:{transform:Mm},maxHeight:{transform:Mm},minHeight:{transform:Mm},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};const zm=function(){function e(e,t,n,r){const o={[e]:t,theme:n},i=r[e];if(!i)return{[e]:t};const{cssProperty:a=e,themeKey:s,transform:l,style:c}=i;if(null==t)return null;if("typography"===s&&"inherit"===t)return{[e]:t};const u=Jh(n,s)||{};if(c)return c(o);return Zh(o,t,(t=>{let n=Kh(u,l,t);return t===n&&"string"==typeof t&&(n=Kh(u,l,`${e}${"default"===t?"":wh(t)}`,t)),!1===a?n:{[a]:n}}))}return function t(n){const{sx:r,theme:o={}}=n||{};if(!r)return null;const i=o.unstable_sxConfig??Vm;function a(n){let r=n;if("function"==typeof n)r=n(o);else if("object"!=typeof n)return n;if(!r)return null;const a=$h(o.breakpoints),s=Object.keys(a);let l=a;return Object.keys(r).forEach((n=>{const a=function(e,t){return"function"==typeof e?e(t):e}(r[n],o);if(null!=a)if("object"==typeof a)if(i[n])l=zh(l,e(n,a,o,i));else{const e=Zh({theme:o},a,(e=>({[n]:e})));!function(...e){const t=e.reduce(((e,t)=>e.concat(Object.keys(t))),[]),n=new Set(t);return e.every((e=>n.size===Object.keys(e).length))}(e,a)?l=zh(l,e):l[n]=t({sx:a,theme:o})}else l=zh(l,e(n,a,o,i))})),function(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter((e=>e.startsWith("@container"))).sort(((e,t)=>{const n=/min-width:\s*([0-9.]+)/;return+(e.match(n)?.[1]||0)-+(t.match(n)?.[1]||0)}));return n.length?n.reduce(((e,n)=>{const r=t[n];return delete e[n],e[n]=r,e}),{...t}):t}(o,Yh(s,l))}return Array.isArray(r)?r.map(a):a(r)}}();zm.filterProps=["sx"];function Gm(e){const{sx:t,...n}=e,{systemProps:r,otherProps:o}=(e=>{const t={systemProps:{},otherProps:{}},n=e?.theme?.unstable_sxConfig??Vm;return Object.keys(e).forEach((r=>{n[r]?t.systemProps[r]=e[r]:t.otherProps[r]=e[r]})),t})(n);let i;return i=Array.isArray(t)?[r,...t]:"function"==typeof t?(...e)=>{const n=t(...e);return Pf(n)?{...r,...n}:r}:{...r,...t},{...o,sx:i}}function Hm(){return Hm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hm.apply(null,arguments)}var Wm=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)})),this.tags=[],this.ctr=0},e}(),Xm="-ms-",Zm="-moz-",$m="-webkit-",Ym="comm",Um="rule",Jm="decl",Km="@keyframes",Qm=Math.abs,qm=String.fromCharCode,eg=Object.assign;function tg(e){return e.trim()}function ng(e,t,n){return e.replace(t,n)}function rg(e,t){return e.indexOf(t)}function og(e,t){return 0|e.charCodeAt(t)}function ig(e,t,n){return e.slice(t,n)}function ag(e){return e.length}function sg(e){return e.length}function lg(e,t){return t.push(e),e}var cg=1,ug=1,dg=0,pg=0,fg=0,hg="";function mg(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:cg,column:ug,length:a,return:""}}function gg(e,t){return eg(mg("",null,null,"",null,null,0),e,{length:-e.length},t)}function yg(){return fg=pg>0?og(hg,--pg):0,ug--,10===fg&&(ug=1,cg--),fg}function bg(){return fg=pg<dg?og(hg,pg++):0,ug++,10===fg&&(ug=1,cg++),fg}function vg(){return og(hg,pg)}function wg(){return pg}function xg(e,t){return ig(hg,e,t)}function Cg(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function kg(e){return cg=ug=1,dg=ag(hg=e),pg=0,[]}function Eg(e){return hg="",e}function Sg(e){return tg(xg(pg-1,Ag(91===e?e+2:40===e?e+1:e)))}function Ig(e){for(;(fg=vg())&&fg<33;)bg();return Cg(e)>2||Cg(fg)>3?"":" "}function _g(e,t){for(;--t&&bg()&&!(fg<48||fg>102||fg>57&&fg<65||fg>70&&fg<97););return xg(e,wg()+(t<6&&32==vg()&&32==bg()))}function Ag(e){for(;bg();)switch(fg){case e:return pg;case 34:case 39:34!==e&&39!==e&&Ag(fg);break;case 40:41===e&&Ag(e);break;case 92:bg()}return pg}function Ng(e,t){for(;bg()&&e+fg!==57&&(e+fg!==84||47!==vg()););return"/*"+xg(t,pg-1)+"*"+qm(47===e?e:bg())}function Og(e){for(;!Cg(vg());)bg();return xg(e,pg)}function Rg(e){return Eg(Tg("",null,null,null,[""],e=kg(e),0,[0],e))}function Tg(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,d=a,p=0,f=0,h=0,m=1,g=1,y=1,b=0,v="",w=o,x=i,C=r,k=v;g;)switch(h=b,b=bg()){case 40:if(108!=h&&58==og(k,d-1)){-1!=rg(k+=ng(Sg(b),"&","&\f"),"&\f")&&(y=-1);break}case 34:case 39:case 91:k+=Sg(b);break;case 9:case 10:case 13:case 32:k+=Ig(h);break;case 92:k+=_g(wg()-1,7);continue;case 47:switch(vg()){case 42:case 47:lg(Pg(Ng(bg(),wg()),t,n),l);break;default:k+="/"}break;case 123*m:s[c++]=ag(k)*y;case 125*m:case 59:case 0:switch(b){case 0:case 125:g=0;case 59+u:-1==y&&(k=ng(k,/\f/g,"")),f>0&&ag(k)-d&&lg(f>32?Dg(k+";",r,n,d-1):Dg(ng(k," ","")+";",r,n,d-2),l);break;case 59:k+=";";default:if(lg(C=Mg(k,t,n,c,u,o,s,v,w=[],x=[],d),i),123===b)if(0===u)Tg(k,t,C,C,w,i,d,s,x);else switch(99===p&&110===og(k,3)?100:p){case 100:case 108:case 109:case 115:Tg(e,C,C,r&&lg(Mg(e,C,C,0,0,o,s,v,o,w=[],d),x),o,x,d,s,r?w:x);break;default:Tg(k,C,C,C,[""],x,0,s,x)}}c=u=f=0,m=y=1,v=k="",d=a;break;case 58:d=1+ag(k),f=h;default:if(m<1)if(123==b)--m;else if(125==b&&0==m++&&125==yg())continue;switch(k+=qm(b),b*m){case 38:y=u>0?1:(k+="\f",-1);break;case 44:s[c++]=(ag(k)-1)*y,y=1;break;case 64:45===vg()&&(k+=Sg(bg())),p=vg(),u=d=ag(v=k+=Og(wg())),b++;break;case 45:45===h&&2==ag(k)&&(m=0)}}return i}function Mg(e,t,n,r,o,i,a,s,l,c,u){for(var d=o-1,p=0===o?i:[""],f=sg(p),h=0,m=0,g=0;h<r;++h)for(var y=0,b=ig(e,d+1,d=Qm(m=a[h])),v=e;y<f;++y)(v=tg(m>0?p[y]+" "+b:ng(b,/&\f/g,p[y])))&&(l[g++]=v);return mg(e,t,n,0===o?Um:s,l,c,u)}function Pg(e,t,n){return mg(e,t,n,Ym,qm(fg),ig(e,2,-2),0)}function Dg(e,t,n,r){return mg(e,t,n,Jm,ig(e,0,r),ig(e,r+1,-1),r)}function Bg(e,t){for(var n="",r=sg(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function jg(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case Jm:return e.return=e.return||e.value;case Ym:return"";case Km:return e.return=e.value+"{"+Bg(e.children,r)+"}";case Um:e.value=e.props.join(",")}return ag(n=Bg(e.children,r))?e.return=e.value+"{"+n+"}":""}function Lg(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var Fg=function(e,t,n){for(var r=0,o=0;r=o,o=vg(),38===r&&12===o&&(t[n]=1),!Cg(o);)bg();return xg(e,pg)},Vg=function(e,t){return Eg(function(e,t){var n=-1,r=44;do{switch(Cg(r)){case 0:38===r&&12===vg()&&(t[n]=1),e[n]+=Fg(pg-1,t,n);break;case 2:e[n]+=Sg(r);break;case 4:if(44===r){e[++n]=58===vg()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=qm(r)}}while(r=bg());return e}(kg(e),t))},zg=new WeakMap,Gg=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||zg.get(n))&&!r){zg.set(e,!0);for(var o=[],i=Vg(t,o),a=n.props,s=0,l=0;s<i.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=o[s]?i[s].replace(/&\f/g,a[c]):a[c]+" "+i[s]}}},Hg=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function Wg(e,t){switch(function(e,t){return 45^og(e,0)?(((t<<2^og(e,0))<<2^og(e,1))<<2^og(e,2))<<2^og(e,3):0}(e,t)){case 5103:return $m+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return $m+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return $m+e+Zm+e+Xm+e+e;case 6828:case 4268:return $m+e+Xm+e+e;case 6165:return $m+e+Xm+"flex-"+e+e;case 5187:return $m+e+ng(e,/(\w+).+(:[^]+)/,$m+"box-$1$2"+Xm+"flex-$1$2")+e;case 5443:return $m+e+Xm+"flex-item-"+ng(e,/flex-|-self/,"")+e;case 4675:return $m+e+Xm+"flex-line-pack"+ng(e,/align-content|flex-|-self/,"")+e;case 5548:return $m+e+Xm+ng(e,"shrink","negative")+e;case 5292:return $m+e+Xm+ng(e,"basis","preferred-size")+e;case 6060:return $m+"box-"+ng(e,"-grow","")+$m+e+Xm+ng(e,"grow","positive")+e;case 4554:return $m+ng(e,/([^-])(transform)/g,"$1"+$m+"$2")+e;case 6187:return ng(ng(ng(e,/(zoom-|grab)/,$m+"$1"),/(image-set)/,$m+"$1"),e,"")+e;case 5495:case 3959:return ng(e,/(image-set\([^]*)/,$m+"$1$`$1");case 4968:return ng(ng(e,/(.+:)(flex-)?(.*)/,$m+"box-pack:$3"+Xm+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+$m+e+e;case 4095:case 3583:case 4068:case 2532:return ng(e,/(.+)-inline(.+)/,$m+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ag(e)-1-t>6)switch(og(e,t+1)){case 109:if(45!==og(e,t+4))break;case 102:return ng(e,/(.+:)(.+)-([^]+)/,"$1"+$m+"$2-$3$1"+Zm+(108==og(e,t+3)?"$3":"$2-$3"))+e;case 115:return~rg(e,"stretch")?Wg(ng(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==og(e,t+1))break;case 6444:switch(og(e,ag(e)-3-(~rg(e,"!important")&&10))){case 107:return ng(e,":",":"+$m)+e;case 101:return ng(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+$m+(45===og(e,14)?"inline-":"")+"box$3$1"+$m+"$2$3$1"+Xm+"$2box$3")+e}break;case 5936:switch(og(e,t+11)){case 114:return $m+e+Xm+ng(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return $m+e+Xm+ng(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return $m+e+Xm+ng(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return $m+e+Xm+e+e}return e}var Xg,Zg,$g=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Jm:e.return=Wg(e.value,e.length);break;case Km:return Bg([gg(e,{value:ng(e.value,"@","@"+$m)})],r);case Um:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Bg([gg(e,{props:[ng(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Bg([gg(e,{props:[ng(t,/:(plac\w+)/,":"+$m+"input-$1")]}),gg(e,{props:[ng(t,/:(plac\w+)/,":-moz-$1")]}),gg(e,{props:[ng(t,/:(plac\w+)/,Xm+"input-$1")]})],r)}return""}))}}],Yg=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,o,i=e.stylisPlugins||$g,a={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)}));var l,c,u=[jg,(c=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&c(e)})],d=function(e){var t=sg(e);return function(n,r,o,i){for(var a="",s=0;s<t;s++)a+=e[s](n,r,o,i)||"";return a}}([Gg,Hg].concat(i,u));o=function(e,t,n,r){l=n,function(e){Bg(Rg(e),d)}(e?e+"{"+t.styles+"}":t.styles),r&&(p.inserted[t.name]=!0)};var p={key:t,sheet:new Wm({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:o};return p.sheet.hydrate(s),p};!function(){if(Zg)return Xg;Zg=1;var e=rh(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};function i(n){return e.isMemo(n)?r:o[n.$$typeof]||t}o[e.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o[e.Memo]=r;var a=Object.defineProperty,s=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,u=Object.getPrototypeOf,d=Object.prototype;Xg=function e(t,r,o){if("string"!=typeof r){if(d){var p=u(r);p&&p!==d&&e(t,p,o)}var f=s(r);l&&(f=f.concat(l(r)));for(var h=i(t),m=i(r),g=0;g<f.length;++g){var y=f[g];if(!(n[y]||o&&o[y]||m&&m[y]||h&&h[y])){var b=c(r,y);try{a(t,y,b)}catch(e){}}}}return t}}();function Ug(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")})),r}var Jg=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Kg=function(e,t,n){Jg(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}};var Qg={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},qg=/[A-Z]|^ms/g,ey=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ty=function(e){return 45===e.charCodeAt(1)},ny=function(e){return null!=e&&"boolean"!=typeof e},ry=Lg((function(e){return ty(e)?e:e.replace(qg,"-$&").toLowerCase()})),oy=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(ey,(function(e,t,n){return ay={name:t,styles:n,next:ay},t}))}return 1===Qg[e]||ty(e)||"number"!=typeof t||0===t?t:t+"px"};function iy(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var o=n;if(1===o.anim)return ay={name:o.name,styles:o.styles,next:ay},o.name;var i=n;if(void 0!==i.styles){var a=i.next;if(void 0!==a)for(;void 0!==a;)ay={name:a.name,styles:a.styles,next:ay},a=a.next;return i.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=iy(e,t,n[o])+";";else for(var i in n){var a=n[i];if("object"!=typeof a){var s=a;null!=t&&void 0!==t[s]?r+=i+"{"+t[s]+"}":ny(s)&&(r+=ry(i)+":"+oy(i,s)+";")}else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var l=iy(e,t,a);switch(i){case"animation":case"animationName":r+=ry(i)+":"+l+";";break;default:r+=i+"{"+l+"}"}}else for(var c=0;c<a.length;c++)ny(a[c])&&(r+=ry(i)+":"+oy(i,a[c])+";")}return r}(e,t,n);case"function":if(void 0!==e){var s=ay,l=n(e);return ay=s,iy(e,t,l)}}var c=n;if(null==t)return c;var u=t[c];return void 0!==u?u:c}var ay,sy=/label:\s*([^\s;{]+)\s*(;|$)/g;function ly(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";ay=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=iy(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++){if(o+=iy(n,t,e[a]),r)o+=i[a]}sy.lastIndex=0;for(var s,l="";null!==(s=sy.exec(o));)l+="-"+s[1];var c=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:c,styles:o,next:ay}}var cy=!!e.useInsertionEffect&&e.useInsertionEffect||function(e){return e()},uy=e.createContext("undefined"!=typeof HTMLElement?Yg({key:"css"}):null);uy.Provider;var dy,py,fy=function(e){return n((function(t,n){var r=o(uy);return e(t,r,n)}))},hy=e.createContext({}),my={}.hasOwnProperty,gy="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",yy=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Jg(t,n,r),cy((function(){return Kg(t,n,r)})),null},by=fy((function(t,n,r){var o=t.css;"string"==typeof o&&void 0!==n.registered[o]&&(o=n.registered[o]);var i=t[gy],a=[o],s="";"string"==typeof t.className?s=Ug(n.registered,a,t.className):null!=t.className&&(s=t.className+" ");var l=ly(a,void 0,e.useContext(hy));s+=n.key+"-"+l.name;var c={};for(var u in t)my.call(t,u)&&"css"!==u&&u!==gy&&(c[u]=t[u]);return c.className=s,r&&(c.ref=r),e.createElement(e.Fragment,null,e.createElement(yy,{cache:n,serialized:l,isStringTag:"string"==typeof i}),e.createElement(i,c))})),vy=by,wy=function(t,n){var r=arguments;if(null==n||!my.call(n,"css"))return e.createElement.apply(void 0,r);var o=r.length,i=new Array(o);i[0]=vy,i[1]=function(e,t){var n={};for(var r in t)my.call(t,r)&&(n[r]=t[r]);return n[gy]=e,n}(t,n);for(var a=2;a<o;a++)i[a]=r[a];return e.createElement.apply(null,i)};function xy(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ly(t)}function Cy(){var e=xy.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}dy=wy||(wy={}),py||(py=dy.JSX||(dy.JSX={}));var ky=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Ey=Lg((function(e){return ky.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),Sy=function(e){return"theme"!==e},Iy=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?Ey:Sy},_y=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},Ay=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Jg(t,n,r),cy((function(){return Kg(t,n,r)})),null},Ny=function t(n,r){var o,i,a=n.__emotion_real===n,s=a&&n.__emotion_base||n;void 0!==r&&(o=r.label,i=r.target);var l=_y(n,r,a),c=l||Iy(s),u=!c("as");return function(){var d=arguments,p=a&&void 0!==n.__emotion_styles?n.__emotion_styles.slice(0):[];if(void 0!==o&&p.push("label:"+o+";"),null==d[0]||void 0===d[0].raw)p.push.apply(p,d);else{var f=d[0];p.push(f[0]);for(var h=d.length,m=1;m<h;m++)p.push(d[m],f[m])}var g=fy((function(t,n,r){var o=u&&t.as||s,a="",d=[],f=t;if(null==t.theme){for(var h in f={},t)f[h]=t[h];f.theme=e.useContext(hy)}"string"==typeof t.className?a=Ug(n.registered,d,t.className):null!=t.className&&(a=t.className+" ");var m=ly(p.concat(d),n.registered,f);a+=n.key+"-"+m.name,void 0!==i&&(a+=" "+i);var g=u&&void 0===l?Iy(o):c,y={};for(var b in t)u&&"as"===b||g(b)&&(y[b]=t[b]);return y.className=a,r&&(y.ref=r),e.createElement(e.Fragment,null,e.createElement(Ay,{cache:n,serialized:m,isStringTag:"string"==typeof o}),e.createElement(o,y))}));return g.displayName=void 0!==o?o:"Styled("+("string"==typeof s?s:s.displayName||s.name||"Component")+")",g.defaultProps=n.defaultProps,g.__emotion_real=g,g.__emotion_base=s,g.__emotion_styles=p,g.__emotion_forwardProp=l,Object.defineProperty(g,"toString",{value:function(){return"."+i}}),g.withComponent=function(e,n){return t(e,Hm({},r,n,{shouldForwardProp:_y(g,n,!0)})).apply(void 0,p)},g}}.bind(null);["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){Ny[e]=Ny(e)}));const Oy=[];function Ry(e){return Oy[0]=e,ly(Oy)}function Ty(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,i=(e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>({...e,[t.key]:t.val})),{})})(t),a=Object.keys(i);function s(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function l(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-r/100}${n})`}function c(e,o){const i=a.indexOf(o);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==i&&"number"==typeof t[a[i]]?t[a[i]]:o)-r/100}${n})`}return{keys:a,values:i,up:s,down:l,between:c,only:function(e){return a.indexOf(e)+1<a.length?c(e,a[a.indexOf(e)+1]):s(e)},not:function(e){const t=a.indexOf(e);return 0===t?s(a[1]):t===a.length-1?l(a[t]):c(e,a[a.indexOf(e)+1]).replace("@media","@media not all and")},unit:n,...o}}const My={borderRadius:4};function Py(e=8,t=sm({spacing:e})){if(e.mui)return e;const n=(...e)=>{"production"!==process.env.NODE_ENV&&(e.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`));return(0===e.length?[1]:e).map((e=>{const n=t(e);return"number"==typeof n?`${n}px`:n})).join(" ")};return n.mui=!0,n}function Dy(e,t){const n=this;if(n.vars){if(!n.colorSchemes?.[e]||"function"!=typeof n.getColorSchemeSelector)return{};let r=n.getColorSchemeSelector(e);return"&"===r?t:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:t})}return n.palette.mode===e?t:{}}function By(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:i={},...a}=e;let s=Bf({breakpoints:Ty(n),direction:"ltr",components:{},palette:{mode:"light",...r},spacing:Py(o),shape:{...My,...i}},a);return s=function(e){const t=(e,t)=>e.replace("@media",t?`@container ${t}`:"@container");function n(n,r){n.up=(...n)=>t(e.breakpoints.up(...n),r),n.down=(...n)=>t(e.breakpoints.down(...n),r),n.between=(...n)=>t(e.breakpoints.between(...n),r),n.only=(...n)=>t(e.breakpoints.only(...n),r),n.not=(...n)=>{const o=t(e.breakpoints.not(...n),r);return o.includes("not all and")?o.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):o}}const r={},o=e=>(n(r,e),r);return n(o),{...e,containerQueries:o}}(s),s.applyStyles=Dy,s=t.reduce(((e,t)=>Bf(e,t)),s),s.unstable_sxConfig={...Vm,...a?.unstable_sxConfig},s.unstable_sx=function(e){return zm({sx:e,theme:this})},s}function jy(t=null){const n=e.useContext(hy);return n&&(r=n,0!==Object.keys(r).length)?n:t;var r}const Ly=By();function Fy(e){const{variants:t,...n}=e,r={variants:t,style:Ry(n),isProcessed:!0};return r.style===n||t&&t.forEach((e=>{"function"!=typeof e.style&&(e.style=Ry(e.style))})),r}const Vy=By();function zy(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function Gy(e){return e?(t,n)=>n[e]:null}function Hy(e,t){const n="function"==typeof t?t(e):t;if(Array.isArray(n))return n.flatMap((t=>Hy(e,t)));if(Array.isArray(n?.variants)){let t;if(n.isProcessed)t=n.style;else{const{variants:e,...r}=n;t=r}return Wy(e,n.variants,[t])}return n?.isProcessed?n.style:n}function Wy(e,t,n=[]){let r;e:for(let o=0;o<t.length;o+=1){const i=t[o];if("function"==typeof i.props){if(r??={...e,...e.ownerState,ownerState:e.ownerState},!i.props(r))continue}else for(const t in i.props)if(e[t]!==i.props[t]&&e.ownerState?.[t]!==i.props[t])continue e;"function"==typeof i.style?(r??={...e,...e.ownerState,ownerState:e.ownerState},n.push(i.style(r))):n.push(i.style)}return n}function Xy(e={}){const{themeId:t,defaultTheme:n=Vy,rootShouldForwardProp:r=zy,slotShouldForwardProp:o=zy}=e;function i(e){!function(e,t,n){e.theme=function(e){for(const t in e)return!1;return!0}(e.theme)?n:e.theme[t]||e.theme}(e,t,n)}return(e,t={})=>{!function(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}(e,(e=>e.filter((e=>e!==zm))));const{name:n,slot:a,skipVariantsResolver:s,skipSx:l,overridesResolver:c=Gy($y(a)),...u}=t,d=void 0!==s?s:a&&"Root"!==a&&"root"!==a||!1,p=l||!1;let f=zy;"Root"===a||"root"===a?f=r:a?f=o:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(f=void 0);const h=
|
|
60
|
-
/**
|
|
61
|
-
* @mui/styled-engine v6.4.3
|
|
62
|
-
*
|
|
63
|
-
* @license MIT
|
|
64
|
-
* This source code is licensed under the MIT license found in the
|
|
65
|
-
* LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/
|
|
67
|
-
function(e,t){const n=Ny(e,t);return"production"!==process.env.NODE_ENV?(...t)=>{const r="string"==typeof e?`"${e}"`:"component";return 0===t.length?console.error([`MUI: Seems like you called \`styled(${r})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join("\n")):t.some((e=>void 0===e))&&console.error(`MUI: the styled(${r})(...args) API requires all its args to be defined.`),n(...t)}:n}(e,{shouldForwardProp:f,label:Zy(n,a),...u}),m=e=>{if("function"==typeof e&&e.__emotion_real!==e)return function(t){return Hy(t,e)};if(Pf(e)){const t=Fy(e);return t.variants?function(e){return Hy(e,t)}:t.style}return e},g=(...t)=>{const r=[],o=t.map(m),s=[];if(r.push(i),n&&c&&s.push((function(e){const t=e.theme,r=t.components?.[n]?.styleOverrides;if(!r)return null;const o={};for(const t in r)o[t]=Hy(e,r[t]);return c(e,o)})),n&&!d&&s.push((function(e){const t=e.theme,r=t?.components?.[n]?.variants;return r?Wy(e,r):null})),p||s.push(zm),Array.isArray(o[0])){const e=o.shift(),t=new Array(r.length).fill(""),n=new Array(s.length).fill("");let i;i=[...t,...e,...n],i.raw=[...t,...e.raw,...n],r.unshift(i)}const l=[...r,...o,...s],u=h(...l);return e.muiName&&(u.muiName=e.muiName),"production"!==process.env.NODE_ENV&&(u.displayName=function(e,t,n){if(e)return`${e}${wh(t||"")}`;return`Styled(${function(e){if(null!=e){if("string"==typeof e)return e;if("function"==typeof e)return yh(e,"Component");if("object"==typeof e)switch(e.$$typeof){case Mf.ForwardRef:return bh(e,e.render,"ForwardRef");case Mf.Memo:return bh(e,e.type,"memo");default:return}}}(n)})`}(n,a,e)),u};return h.withConfig&&(g.withConfig=h.withConfig),g}}function Zy(e,t){let n;return"production"!==process.env.NODE_ENV&&e&&(n=`${e}-${$y(t||"Root")}`),n}function $y(e){return e?e.charAt(0).toLowerCase()+e.slice(1):e}const Yy=Xy();function Uy({props:e,name:t,defaultTheme:n,themeId:r}){let o=function(e=Ly){return jy(e)}(n);return r&&(o=o[r]||o),function(e){const{theme:t,name:n,props:r}=e;return t&&t.components&&t.components[n]&&t.components[n].defaultProps?Oh(t.components[n].defaultProps,r):r}({theme:o,name:t,props:e})}function Jy(e,t=0,n=1){return"production"!==process.env.NODE_ENV&&(e<t||e>n)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),function(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}(e,t,n)}function Ky(e){if(e.type)return e;if("#"===e.charAt(0))return Ky(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map((e=>e+e))),"production"!==process.env.NODE_ENV&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),n?`rgb${4===n.length?"a":""}(${n.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error("production"!==process.env.NODE_ENV?`MUI: Unsupported \`${e}\` color.\nThe following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:gh(9,e));let r,o=e.substring(t+1,e.length-1);if("color"===n){if(o=o.split(" "),r=o.shift(),4===o.length&&"/"===o[3].charAt(0)&&(o[3]=o[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(r))throw new Error("production"!==process.env.NODE_ENV?`MUI: unsupported \`${r}\` color space.\nThe following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:gh(10,r))}else o=o.split(",");return o=o.map((e=>parseFloat(e))),{type:n,values:o,colorSpace:r}}const Qy=(e,t)=>{try{return(e=>{const t=Ky(e);return t.values.slice(0,3).map(((e,n)=>t.type.includes("hsl")&&0!==n?`${e}%`:e)).join(" ")})(e)}catch(n){return t&&"production"!==process.env.NODE_ENV&&console.warn(t),e}};function qy(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map(((e,t)=>t<3?parseInt(e,10):e)):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=t.includes("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}function eb(e){e=Ky(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=(e,t=(e+n/30)%12)=>o-i*Math.max(Math.min(t-3,9-t,1),-1);let s="rgb";const l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),qy({type:s,values:l})}function tb(e){let t="hsl"===(e=Ky(e)).type||"hsla"===e.type?Ky(eb(e)).values:e.values;return t=t.map((t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function nb(e,t){const n=tb(e),r=tb(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function rb(e,t){return e=Ky(e),t=Jy(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,qy(e)}function ob(e,t,n){try{return rb(e,t)}catch(t){return e}}function ib(e,t){if(e=Ky(e),t=Jy(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return qy(e)}function ab(e,t,n){try{return ib(e,t)}catch(t){return e}}function sb(e,t){if(e=Ky(e),t=Jy(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return qy(e)}function lb(e,t,n){try{return sb(e,t)}catch(t){return e}}function cb(e,t,n){try{return function(e,t=.15){return tb(e)>.5?ib(e,t):sb(e,t)}(e,t)}catch(t){return e}}const ub=e.createContext(void 0);function db({props:t,name:n}){return function(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const o=t.components[n];return o.defaultProps?Oh(o.defaultProps,r):o.styleOverrides||o.variants?r:Oh(o,r)}({props:t,name:n,theme:{components:e.useContext(ub)}})}"production"!==process.env.NODE_ENV&&(ph.node,ph.object);const pb={theme:void 0};function fb(e=""){function t(...n){if(!n.length)return"";const r=n[0];return"string"!=typeof r||r.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, ${r}`:`, var(--${e?`${e}-`:""}${r}${t(...n.slice(1))})`}return(n,...r)=>`var(--${e?`${e}-`:""}${n}${t(...r)})`}const hb=(e,t,n,r=[])=>{let o=e;t.forEach(((e,i)=>{i===t.length-1?Array.isArray(o)?o[Number(e)]=n:o&&"object"==typeof o&&(o[e]=n):o&&"object"==typeof o&&(o[e]||(o[e]=r.includes(e)?[]:{}),o=o[e])}))};function mb(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},o={},i={},a={};var s,l;return s=(e,t,s)=>{if(!("string"!=typeof t&&"number"!=typeof t||r&&r(e,t))){const r=`--${n?`${n}-`:""}${e.join("-")}`,l=((e,t)=>"number"==typeof t?["lineHeight","fontWeight","opacity","zIndex"].some((t=>e.includes(t)))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t)(e,t);Object.assign(o,{[r]:l}),hb(i,e,`var(${r})`,s),hb(a,e,`var(${r}, ${l})`,s)}},l=e=>"vars"===e[0],function e(t,n=[],r=[]){Object.entries(t).forEach((([t,o])=>{(!l||l&&!l([...n,t]))&&null!=o&&("object"==typeof o&&Object.keys(o).length>0?e(o,[...n,t],Array.isArray(o)?[...r,t]:r):s([...n,t],o,r))}))}(e),{css:o,vars:i,varsWithDefaults:a}}const gb=By(),yb=Yy("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function bb(e){return Uy({props:e,name:"MuiStack",defaultTheme:gb})}function vb(t,n){const r=e.Children.toArray(t).filter(Boolean);return r.reduce(((t,o,i)=>(t.push(o),i<r.length-1&&t.push(e.cloneElement(n,{key:`separator-${i}`})),t)),[])}const wb=({ownerState:e,theme:t})=>{let n={display:"flex",flexDirection:"column",...Zh({theme:t},Uh({values:e.direction,breakpoints:t.breakpoints.values}),(e=>({flexDirection:e})))};if(e.spacing){const r=sm(t),o=Object.keys(t.breakpoints.values).reduce(((t,n)=>(("object"==typeof e.spacing&&null!=e.spacing[n]||"object"==typeof e.direction&&null!=e.direction[n])&&(t[n]=!0),t)),{}),i=Uh({values:e.direction,base:o}),a=Uh({values:e.spacing,base:o});"object"==typeof i&&Object.keys(i).forEach(((e,t,n)=>{if(!i[e]){const r=t>0?i[n[t-1]]:"column";i[e]=r}}));n=Bf(n,Zh({theme:t},a,((t,n)=>{return e.useFlexGap?{gap:lm(r,t)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${o=n?i[n]:e.direction,{row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"}[o]}`]:lm(r,t)}};var o})))}return n=function(e,...t){const n=$h(e),r=[n,...t].reduce(((e,t)=>Bf(e,t)),{});return Yh(Object.keys(n),r)}(t.breakpoints,n),n};const xb={black:"#000",white:"#fff"},Cb={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},kb="#f3e5f5",Eb="#ce93d8",Sb="#ba68c8",Ib="#ab47bc",_b="#9c27b0",Ab="#7b1fa2",Nb="#e57373",Ob="#ef5350",Rb="#f44336",Tb="#d32f2f",Mb="#c62828",Pb="#ffb74d",Db="#ffa726",Bb="#ff9800",jb="#f57c00",Lb="#e65100",Fb="#e3f2fd",Vb="#90caf9",zb="#42a5f5",Gb="#1976d2",Hb="#1565c0",Wb="#4fc3f7",Xb="#29b6f6",Zb="#03a9f4",$b="#0288d1",Yb="#01579b",Ub="#81c784",Jb="#66bb6a",Kb="#4caf50",Qb="#388e3c",qb="#2e7d32",ev="#1b5e20";function tv(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:xb.white,default:xb.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const nv=tv();function rv(){return{text:{primary:xb.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:xb.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const ov=rv();function iv(e,t,n,r){const o=r.light||r,i=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=sb(e.main,o):"dark"===t&&(e.dark=ib(e.main,i)))}function av(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,...o}=e,i=e.primary||function(e="light"){return"dark"===e?{main:Vb,light:Fb,dark:zb}:{main:Gb,light:zb,dark:Hb}}(t),a=e.secondary||function(e="light"){return"dark"===e?{main:Eb,light:kb,dark:Ib}:{main:_b,light:Sb,dark:Ab}}(t),s=e.error||function(e="light"){return"dark"===e?{main:Rb,light:Nb,dark:Tb}:{main:Tb,light:Ob,dark:Mb}}(t),l=e.info||function(e="light"){return"dark"===e?{main:Xb,light:Wb,dark:$b}:{main:$b,light:Zb,dark:Yb}}(t),c=e.success||function(e="light"){return"dark"===e?{main:Jb,light:Ub,dark:Qb}:{main:qb,light:Kb,dark:ev}}(t),u=e.warning||function(e="light"){return"dark"===e?{main:Db,light:Pb,dark:jb}:{main:"#ed6c02",light:Bb,dark:Lb}}(t);function d(e){const t=nb(e,ov.text.primary)>=n?ov.text.primary:nv.text.primary;if("production"!==process.env.NODE_ENV){const n=nb(e,t);n<3&&console.error([`MUI: The contrast ratio of ${n}:1 for ${t} on ${e}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join("\n"))}return t}const p=({color:e,name:t,mainShade:n=500,lightShade:o=300,darkShade:i=700})=>{if(!(e={...e}).main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty("main"))throw new Error("production"!==process.env.NODE_ENV?`MUI: The color${t?` (${t})`:""} provided to augmentColor(color) is invalid.\nThe color object needs to have a \`main\` property or a \`${n}\` property.`:gh(11,t?` (${t})`:"",n));if("string"!=typeof e.main)throw new Error("production"!==process.env.NODE_ENV?`MUI: The color${t?` (${t})`:""} provided to augmentColor(color) is invalid.\n\`color.main\` should be a string, but \`${JSON.stringify(e.main)}\` was provided instead.\n\nDid you intend to use one of the following approaches?\n\nimport { green } from "@mui/material/colors";\n\nconst theme1 = createTheme({ palette: {\n primary: green,\n} });\n\nconst theme2 = createTheme({ palette: {\n primary: { main: green[500] },\n} });`:gh(12,t?` (${t})`:"",JSON.stringify(e.main)));return iv(e,"light",o,r),iv(e,"dark",i,r),e.contrastText||(e.contrastText=d(e.main)),e};let f;"light"===t?f=tv():"dark"===t&&(f=rv()),"production"!==process.env.NODE_ENV&&(f||console.error(`MUI: The palette mode \`${t}\` is not supported.`));return Bf({common:{...xb},mode:t,primary:p({color:i,name:"primary"}),secondary:p({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:s,name:"error"}),warning:p({color:u,name:"warning"}),info:p({color:l,name:"info"}),success:p({color:c,name:"success"}),grey:Cb,contrastThreshold:n,getContrastText:d,augmentColor:p,tonalOffset:r,...f},o)}function sv(e){const t={};return Object.entries(e).forEach((e=>{const[n,r]=e;"object"==typeof r&&(t[n]=`${r.fontStyle?`${r.fontStyle} `:""}${r.fontVariant?`${r.fontVariant} `:""}${r.fontWeight?`${r.fontWeight} `:""}${r.fontStretch?`${r.fontStretch} `:""}${r.fontSize||""}${r.lineHeight?`/${r.lineHeight} `:""}${r.fontFamily||""}`)})),t}const lv={textTransform:"uppercase"},cv='"Roboto", "Helvetica", "Arial", sans-serif';function uv(e,t){const{fontFamily:n=cv,fontSize:r=14,fontWeightLight:o=300,fontWeightRegular:i=400,fontWeightMedium:a=500,fontWeightBold:s=700,htmlFontSize:l=16,allVariants:c,pxToRem:u,...d}="function"==typeof t?t(e):t;"production"!==process.env.NODE_ENV&&("number"!=typeof r&&console.error("MUI: `fontSize` is required to be a number."),"number"!=typeof l&&console.error("MUI: `htmlFontSize` is required to be a number."));const p=r/14,f=u||(e=>e/l*p+"rem"),h=(e,t,r,o,i)=>{return{fontFamily:n,fontWeight:e,fontSize:f(t),lineHeight:r,...n===cv?{letterSpacing:(a=o/t,Math.round(1e5*a)/1e5)+"em"}:{},...i,...c};var a},m={h1:h(o,96,1.167,-1.5),h2:h(o,60,1.2,-.5),h3:h(i,48,1.167,0),h4:h(i,34,1.235,.25),h5:h(i,24,1.334,0),h6:h(a,20,1.6,.15),subtitle1:h(i,16,1.75,.15),subtitle2:h(a,14,1.57,.1),body1:h(i,16,1.5,.15),body2:h(i,14,1.43,.15),button:h(a,14,1.75,.4,lv),caption:h(i,12,1.66,.4),overline:h(i,12,2.66,1,lv),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Bf({htmlFontSize:l,pxToRem:f,fontFamily:n,fontSize:r,fontWeightLight:o,fontWeightRegular:i,fontWeightMedium:a,fontWeightBold:s,...m},d,{clone:!1})}function dv(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2)`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14)`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`].join(",")}const pv=["none",dv(0,2,1,-1,0,1,1,0,0,1,3,0),dv(0,3,1,-2,0,2,2,0,0,1,5,0),dv(0,3,3,-2,0,3,4,0,0,1,8,0),dv(0,2,4,-1,0,4,5,0,0,1,10,0),dv(0,3,5,-1,0,5,8,0,0,1,14,0),dv(0,3,5,-1,0,6,10,0,0,1,18,0),dv(0,4,5,-2,0,7,10,1,0,2,16,1),dv(0,5,5,-3,0,8,10,1,0,3,14,2),dv(0,5,6,-3,0,9,12,1,0,3,16,2),dv(0,6,6,-3,0,10,14,1,0,4,18,3),dv(0,6,7,-4,0,11,15,1,0,4,20,3),dv(0,7,8,-4,0,12,17,2,0,5,22,4),dv(0,7,8,-4,0,13,19,2,0,5,24,4),dv(0,7,9,-4,0,14,21,2,0,5,26,4),dv(0,8,9,-5,0,15,22,2,0,6,28,5),dv(0,8,10,-5,0,16,24,2,0,6,30,5),dv(0,8,11,-5,0,17,26,2,0,6,32,5),dv(0,9,11,-5,0,18,28,2,0,7,34,6),dv(0,9,12,-6,0,19,29,2,0,7,36,6),dv(0,10,13,-6,0,20,31,3,0,8,38,7),dv(0,10,13,-6,0,21,33,3,0,8,40,7),dv(0,10,14,-6,0,22,35,3,0,8,42,7),dv(0,11,14,-7,0,23,36,3,0,9,44,8),dv(0,11,15,-7,0,24,38,3,0,9,46,8)],fv={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},hv={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function mv(e){return`${Math.round(e)}ms`}function gv(e){if(!e)return 0;const t=e/36;return Math.min(Math.round(10*(4+15*t**.25+t/5)),3e3)}function yv(e){const t={...fv,...e.easing},n={...hv,...e.duration};return{getAutoHeightDuration:gv,create:(e=["all"],r={})=>{const{duration:o=n.standard,easing:i=t.easeInOut,delay:a=0,...s}=r;if("production"!==process.env.NODE_ENV){const t=e=>"string"==typeof e,n=e=>!Number.isNaN(parseFloat(e));t(e)||Array.isArray(e)||console.error('MUI: Argument "props" must be a string or Array.'),n(o)||t(o)||console.error(`MUI: Argument "duration" must be a number or a string but found ${o}.`),t(i)||console.error('MUI: Argument "easing" must be a string.'),n(a)||t(a)||console.error('MUI: Argument "delay" must be a number or a string.'),"object"!=typeof r&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join("\n")),0!==Object.keys(s).length&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(s).join(",")}].`)}return(Array.isArray(e)?e:[e]).map((e=>`${e} ${"string"==typeof o?o:mv(o)} ${i} ${"string"==typeof a?a:mv(a)}`)).join(",")},...e,easing:t,duration:n}}const bv={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function vv(e={}){const t={...e};return function e(t){const n=Object.entries(t);for(let o=0;o<n.length;o++){const[i,a]=n[o];!Pf(r=a)&&void 0!==r&&"string"!=typeof r&&"boolean"!=typeof r&&"number"!=typeof r&&!Array.isArray(r)||i.startsWith("unstable_")?delete t[i]:Pf(a)&&(t[i]={...a},e(t[i]))}var r}(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';\n\nconst theme = ${JSON.stringify(t,null,2)};\n\ntheme.breakpoints = createBreakpoints(theme.breakpoints || {});\ntheme.transitions = createTransitions(theme.transitions || {});\n\nexport default theme;`}function wv(e={},...t){const{breakpoints:n,mixins:r={},spacing:o,palette:i={},transitions:a={},typography:s={},shape:l,...c}=e;if(e.vars)throw new Error("production"!==process.env.NODE_ENV?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name.":gh(20));const u=av(i),d=By(e);let p=Bf(d,{mixins:(f=d.breakpoints,h=r,{toolbar:{minHeight:56,[f.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[f.up("sm")]:{minHeight:64}},...h}),palette:u,shadows:pv.slice(),typography:uv(u,s),transitions:yv(a),zIndex:{...bv}});var f,h;if(p=Bf(p,c),p=t.reduce(((e,t)=>Bf(e,t)),p),"production"!==process.env.NODE_ENV){const e=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],t=(t,n)=>{let r;for(r in t){const o=t[r];if(e.includes(r)&&Object.keys(o).length>0){if("production"!==process.env.NODE_ENV){const e=Dh("",r);console.error([`MUI: The \`${n}\` component increases the CSS specificity of the \`${r}\` internal state.`,"You can not override it like this: ",JSON.stringify(t,null,2),"",`Instead, you need to use the '&.${e}' syntax:`,JSON.stringify({root:{[`&.${e}`]:o}},null,2),"","https://mui.com/r/state-classes-guide"].join("\n"))}t[r]={}}}};Object.keys(p.components).forEach((e=>{const n=p.components[e].styleOverrides;n&&e.startsWith("Mui")&&t(n,e)}))}return p.unstable_sxConfig={...Vm,...c?.unstable_sxConfig},p.unstable_sx=function(e){return zm({sx:e,theme:this})},p.toRuntimeSource=vv,p}const xv=[...Array(25)].map(((e,t)=>{if(0===t)return"none";const n=function(e){let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,Math.round(10*t)/1e3}(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`}));function Cv(e){return{inputPlaceholder:"dark"===e?.5:.42,inputUnderline:"dark"===e?.7:.42,switchTrackDisabled:"dark"===e?.2:.12,switchTrack:"dark"===e?.3:.38}}function kv(e){return"dark"===e?xv:[]}function Ev(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||"palette"===e[0]&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}var Sv=e=>(t,n)=>{const r=e.rootSelector||":root",o=e.colorSchemeSelector;let i=o;if("class"===o&&(i=".%s"),"data"===o&&(i="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(i=`[${o}="%s"]`),e.defaultColorScheme===t){if("dark"===t){const o={};return(a=e.cssVarPrefix,[...[...Array(25)].map(((e,t)=>`--${a?`${a}-`:""}overlays-${t}`)),`--${a?`${a}-`:""}palette-AppBar-darkBg`,`--${a?`${a}-`:""}palette-AppBar-darkColor`]).forEach((e=>{o[e]=n[e],delete n[e]})),"media"===i?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:o}}:i?{[i.replace("%s",t)]:o,[`${r}, ${i.replace("%s",t)}`]:n}:{[r]:{...n,...o}}}if(i&&"media"!==i)return`${r}, ${i.replace("%s",String(t))}`}else if(t){if("media"===i)return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(i)return i.replace("%s",String(t))}var a;return r};function Iv(e,t,n){!e[t]&&n&&(e[t]=n)}function _v(e){return"string"==typeof e&&e.startsWith("hsl")?eb(e):e}function Av(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Qy(_v(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().\nTo suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}const Nv=e=>{try{return e()}catch(e){}};function Ov(e,t,n,r){if(!t)return;t=!0===t?{}:t;const o="dark"===r?"dark":"light";if(!n)return void(e[r]=function(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...o}=e,i=av(t);return{palette:i,opacity:{...Cv(i.mode),...n},overlays:r||kv(i.mode),...o}}({...t,palette:{mode:o,...t?.palette}}));const{palette:i,...a}=wv({...n,palette:{mode:o,...t?.palette}});return e[r]={...t,palette:i,opacity:{...Cv(o),...t?.opacity},overlays:t?.overlays||kv(o)},a}function Rv(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",shouldSkipGeneratingVar:a=Ev,colorSchemeSelector:s=(n.light&&n.dark?"media":void 0),rootSelector:l=":root",...c}=e,u=Object.keys(n)[0],d=r||(n.light&&"light"!==u?"light":u),p=((e="mui")=>fb(e))(i),{[d]:f,light:h,dark:m,...g}=n,y={...g};let b=f;if(("dark"===d&&!("dark"in n)||"light"===d&&!("light"in n))&&(b=!0),!b)throw new Error("production"!==process.env.NODE_ENV?`MUI: The \`colorSchemes.${d}\` option is either missing or invalid.`:gh(21,d));const v=Ov(y,b,c,d);h&&!y.light&&Ov(y,h,void 0,"light"),m&&!y.dark&&Ov(y,m,void 0,"dark");let w={defaultColorScheme:d,...v,cssVarPrefix:i,colorSchemeSelector:s,rootSelector:l,getCssVar:p,colorSchemes:y,font:{...sv(v.typography),...v.font},spacing:(x=c.spacing,"number"==typeof x?`${x}px`:"string"==typeof x||"function"==typeof x||Array.isArray(x)?x:"8px")};var x;Object.keys(w.colorSchemes).forEach((e=>{const t=w.colorSchemes[e].palette,n=e=>{const n=e.split("-"),r=n[1],o=n[2];return p(e,t[r][o])};if("light"===t.mode&&(Iv(t.common,"background","#fff"),Iv(t.common,"onBackground","#000")),"dark"===t.mode&&(Iv(t.common,"background","#000"),Iv(t.common,"onBackground","#fff")),function(e,t){t.forEach((t=>{e[t]||(e[t]={})}))}(t,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),"light"===t.mode){Iv(t.Alert,"errorColor",ab(t.error.light,.6)),Iv(t.Alert,"infoColor",ab(t.info.light,.6)),Iv(t.Alert,"successColor",ab(t.success.light,.6)),Iv(t.Alert,"warningColor",ab(t.warning.light,.6)),Iv(t.Alert,"errorFilledBg",n("palette-error-main")),Iv(t.Alert,"infoFilledBg",n("palette-info-main")),Iv(t.Alert,"successFilledBg",n("palette-success-main")),Iv(t.Alert,"warningFilledBg",n("palette-warning-main")),Iv(t.Alert,"errorFilledColor",Nv((()=>t.getContrastText(t.error.main)))),Iv(t.Alert,"infoFilledColor",Nv((()=>t.getContrastText(t.info.main)))),Iv(t.Alert,"successFilledColor",Nv((()=>t.getContrastText(t.success.main)))),Iv(t.Alert,"warningFilledColor",Nv((()=>t.getContrastText(t.warning.main)))),Iv(t.Alert,"errorStandardBg",lb(t.error.light,.9)),Iv(t.Alert,"infoStandardBg",lb(t.info.light,.9)),Iv(t.Alert,"successStandardBg",lb(t.success.light,.9)),Iv(t.Alert,"warningStandardBg",lb(t.warning.light,.9)),Iv(t.Alert,"errorIconColor",n("palette-error-main")),Iv(t.Alert,"infoIconColor",n("palette-info-main")),Iv(t.Alert,"successIconColor",n("palette-success-main")),Iv(t.Alert,"warningIconColor",n("palette-warning-main")),Iv(t.AppBar,"defaultBg",n("palette-grey-100")),Iv(t.Avatar,"defaultBg",n("palette-grey-400")),Iv(t.Button,"inheritContainedBg",n("palette-grey-300")),Iv(t.Button,"inheritContainedHoverBg",n("palette-grey-A100")),Iv(t.Chip,"defaultBorder",n("palette-grey-400")),Iv(t.Chip,"defaultAvatarColor",n("palette-grey-700")),Iv(t.Chip,"defaultIconColor",n("palette-grey-700")),Iv(t.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),Iv(t.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),Iv(t.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),Iv(t.LinearProgress,"primaryBg",lb(t.primary.main,.62)),Iv(t.LinearProgress,"secondaryBg",lb(t.secondary.main,.62)),Iv(t.LinearProgress,"errorBg",lb(t.error.main,.62)),Iv(t.LinearProgress,"infoBg",lb(t.info.main,.62)),Iv(t.LinearProgress,"successBg",lb(t.success.main,.62)),Iv(t.LinearProgress,"warningBg",lb(t.warning.main,.62)),Iv(t.Skeleton,"bg",`rgba(${n("palette-text-primaryChannel")} / 0.11)`),Iv(t.Slider,"primaryTrack",lb(t.primary.main,.62)),Iv(t.Slider,"secondaryTrack",lb(t.secondary.main,.62)),Iv(t.Slider,"errorTrack",lb(t.error.main,.62)),Iv(t.Slider,"infoTrack",lb(t.info.main,.62)),Iv(t.Slider,"successTrack",lb(t.success.main,.62)),Iv(t.Slider,"warningTrack",lb(t.warning.main,.62));const e=cb(t.background.default,.8);Iv(t.SnackbarContent,"bg",e),Iv(t.SnackbarContent,"color",Nv((()=>t.getContrastText(e)))),Iv(t.SpeedDialAction,"fabHoverBg",cb(t.background.paper,.15)),Iv(t.StepConnector,"border",n("palette-grey-400")),Iv(t.StepContent,"border",n("palette-grey-400")),Iv(t.Switch,"defaultColor",n("palette-common-white")),Iv(t.Switch,"defaultDisabledColor",n("palette-grey-100")),Iv(t.Switch,"primaryDisabledColor",lb(t.primary.main,.62)),Iv(t.Switch,"secondaryDisabledColor",lb(t.secondary.main,.62)),Iv(t.Switch,"errorDisabledColor",lb(t.error.main,.62)),Iv(t.Switch,"infoDisabledColor",lb(t.info.main,.62)),Iv(t.Switch,"successDisabledColor",lb(t.success.main,.62)),Iv(t.Switch,"warningDisabledColor",lb(t.warning.main,.62)),Iv(t.TableCell,"border",lb(ob(t.divider,1),.88)),Iv(t.Tooltip,"bg",ob(t.grey[700],.92))}if("dark"===t.mode){Iv(t.Alert,"errorColor",lb(t.error.light,.6)),Iv(t.Alert,"infoColor",lb(t.info.light,.6)),Iv(t.Alert,"successColor",lb(t.success.light,.6)),Iv(t.Alert,"warningColor",lb(t.warning.light,.6)),Iv(t.Alert,"errorFilledBg",n("palette-error-dark")),Iv(t.Alert,"infoFilledBg",n("palette-info-dark")),Iv(t.Alert,"successFilledBg",n("palette-success-dark")),Iv(t.Alert,"warningFilledBg",n("palette-warning-dark")),Iv(t.Alert,"errorFilledColor",Nv((()=>t.getContrastText(t.error.dark)))),Iv(t.Alert,"infoFilledColor",Nv((()=>t.getContrastText(t.info.dark)))),Iv(t.Alert,"successFilledColor",Nv((()=>t.getContrastText(t.success.dark)))),Iv(t.Alert,"warningFilledColor",Nv((()=>t.getContrastText(t.warning.dark)))),Iv(t.Alert,"errorStandardBg",ab(t.error.light,.9)),Iv(t.Alert,"infoStandardBg",ab(t.info.light,.9)),Iv(t.Alert,"successStandardBg",ab(t.success.light,.9)),Iv(t.Alert,"warningStandardBg",ab(t.warning.light,.9)),Iv(t.Alert,"errorIconColor",n("palette-error-main")),Iv(t.Alert,"infoIconColor",n("palette-info-main")),Iv(t.Alert,"successIconColor",n("palette-success-main")),Iv(t.Alert,"warningIconColor",n("palette-warning-main")),Iv(t.AppBar,"defaultBg",n("palette-grey-900")),Iv(t.AppBar,"darkBg",n("palette-background-paper")),Iv(t.AppBar,"darkColor",n("palette-text-primary")),Iv(t.Avatar,"defaultBg",n("palette-grey-600")),Iv(t.Button,"inheritContainedBg",n("palette-grey-800")),Iv(t.Button,"inheritContainedHoverBg",n("palette-grey-700")),Iv(t.Chip,"defaultBorder",n("palette-grey-700")),Iv(t.Chip,"defaultAvatarColor",n("palette-grey-300")),Iv(t.Chip,"defaultIconColor",n("palette-grey-300")),Iv(t.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),Iv(t.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),Iv(t.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),Iv(t.LinearProgress,"primaryBg",ab(t.primary.main,.5)),Iv(t.LinearProgress,"secondaryBg",ab(t.secondary.main,.5)),Iv(t.LinearProgress,"errorBg",ab(t.error.main,.5)),Iv(t.LinearProgress,"infoBg",ab(t.info.main,.5)),Iv(t.LinearProgress,"successBg",ab(t.success.main,.5)),Iv(t.LinearProgress,"warningBg",ab(t.warning.main,.5)),Iv(t.Skeleton,"bg",`rgba(${n("palette-text-primaryChannel")} / 0.13)`),Iv(t.Slider,"primaryTrack",ab(t.primary.main,.5)),Iv(t.Slider,"secondaryTrack",ab(t.secondary.main,.5)),Iv(t.Slider,"errorTrack",ab(t.error.main,.5)),Iv(t.Slider,"infoTrack",ab(t.info.main,.5)),Iv(t.Slider,"successTrack",ab(t.success.main,.5)),Iv(t.Slider,"warningTrack",ab(t.warning.main,.5));const e=cb(t.background.default,.98);Iv(t.SnackbarContent,"bg",e),Iv(t.SnackbarContent,"color",Nv((()=>t.getContrastText(e)))),Iv(t.SpeedDialAction,"fabHoverBg",cb(t.background.paper,.15)),Iv(t.StepConnector,"border",n("palette-grey-600")),Iv(t.StepContent,"border",n("palette-grey-600")),Iv(t.Switch,"defaultColor",n("palette-grey-300")),Iv(t.Switch,"defaultDisabledColor",n("palette-grey-600")),Iv(t.Switch,"primaryDisabledColor",ab(t.primary.main,.55)),Iv(t.Switch,"secondaryDisabledColor",ab(t.secondary.main,.55)),Iv(t.Switch,"errorDisabledColor",ab(t.error.main,.55)),Iv(t.Switch,"infoDisabledColor",ab(t.info.main,.55)),Iv(t.Switch,"successDisabledColor",ab(t.success.main,.55)),Iv(t.Switch,"warningDisabledColor",ab(t.warning.main,.55)),Iv(t.TableCell,"border",ab(ob(t.divider,1),.68)),Iv(t.Tooltip,"bg",ob(t.grey[700],.92))}Av(t.background,"default"),Av(t.background,"paper"),Av(t.common,"background"),Av(t.common,"onBackground"),Av(t,"divider"),Object.keys(t).forEach((e=>{const n=t[e];"tonalOffset"!==e&&n&&"object"==typeof n&&(n.main&&Iv(t[e],"mainChannel",Qy(_v(n.main))),n.light&&Iv(t[e],"lightChannel",Qy(_v(n.light))),n.dark&&Iv(t[e],"darkChannel",Qy(_v(n.dark))),n.contrastText&&Iv(t[e],"contrastTextChannel",Qy(_v(n.contrastText))),"text"===e&&(Av(t[e],"primary"),Av(t[e],"secondary")),"action"===e&&(n.active&&Av(t[e],"active"),n.selected&&Av(t[e],"selected")))}))})),w=t.reduce(((e,t)=>Bf(e,t)),w);const C={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:a,getSelector:Sv(w)},{vars:k,generateThemeVars:E,generateStyleSheets:S}=function(e,t={}){const{getSelector:n=g,disableCssColorScheme:r,colorSchemeSelector:o}=t,{colorSchemes:i={},components:a,defaultColorScheme:s="light",...l}=e,{vars:c,css:u,varsWithDefaults:d}=mb(l,t);let p=d;const f={},{[s]:h,...m}=i;if(Object.entries(m||{}).forEach((([e,n])=>{const{vars:r,css:o,varsWithDefaults:i}=mb(n,t);p=Bf(p,i),f[e]={css:o,vars:r}})),h){const{css:e,vars:n,varsWithDefaults:r}=mb(h,t);p=Bf(p,r),f[s]={css:e,vars:n}}function g(t,n){let r=o;if("class"===o&&(r=".%s"),"data"===o&&(r="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(r=`[${o}="%s"]`),t){if("media"===r){if(e.defaultColorScheme===t)return":root";const r=i[t]?.palette?.mode||t;return{[`@media (prefers-color-scheme: ${r})`]:{":root":n}}}if(r)return e.defaultColorScheme===t?`:root, ${r.replace("%s",String(t))}`:r.replace("%s",String(t))}return":root"}return{vars:p,generateThemeVars:()=>{let e={...c};return Object.entries(f).forEach((([,{vars:t}])=>{e=Bf(e,t)})),e},generateStyleSheets:()=>{const t=[],o=e.defaultColorScheme||"light";function a(e,n){Object.keys(n).length&&t.push("string"==typeof e?{[e]:{...n}}:e)}a(n(void 0,{...u}),u);const{[o]:s,...l}=f;if(s){const{css:e}=s,t=i[o]?.palette?.mode,l=!r&&t?{colorScheme:t,...e}:{...e};a(n(o,{...l}),l)}return Object.entries(l).forEach((([e,{css:t}])=>{const o=i[e]?.palette?.mode,s=!r&&o?{colorScheme:o,...t}:{...t};a(n(e,{...s}),s)})),t}}}(w,C);return w.vars=k,Object.entries(w.colorSchemes[w.defaultColorScheme]).forEach((([e,t])=>{w[e]=t})),w.generateThemeVars=E,w.generateStyleSheets=S,w.generateSpacing=function(){return Py(c.spacing,sm(this))},w.getColorSchemeSelector=function(e){return function(t){return"media"===e?("production"!==process.env.NODE_ENV&&"light"!==t&&"dark"!==t&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${t}'.`),`@media (prefers-color-scheme: ${t})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${t}"] &`:"class"===e?`.${t} &`:"data"===e?`[data-${t}] &`:`${e.replace("%s",t)} &`:"&"}}(s),w.spacing=w.generateSpacing(),w.shouldSkipGeneratingVar=a,w.unstable_sxConfig={...Vm,...c?.unstable_sxConfig},w.unstable_sx=function(e){return zm({sx:e,theme:this})},w.toRuntimeSource=vv,w}function Tv(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...!0!==n&&n,palette:av({...!0===n?{}:n.palette,mode:t})})}const Mv=function(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:o=(n?void 0:{light:!0}),defaultColorScheme:i=n?.mode,...a}=e,s=i||"light",l=o?.[s],c={...o,...n?{[s]:{..."boolean"!=typeof l&&l,palette:n}}:void 0};if(!1===r){if(!("colorSchemes"in e))return wv(e,...t);let r=n;"palette"in e||c[s]&&(!0!==c[s]?r=c[s].palette:"dark"===s&&(r={mode:"dark"}));const o=wv({...e,palette:r},...t);return o.defaultColorScheme=s,o.colorSchemes=c,"light"===o.palette.mode&&(o.colorSchemes.light={...!0!==c.light&&c.light,palette:o.palette},Tv(o,"dark",c.dark)),"dark"===o.palette.mode&&(o.colorSchemes.dark={...!0!==c.dark&&c.dark,palette:o.palette},Tv(o,"light",c.light)),o}return n||"light"in c||"light"!==s||(c.light=!0),Rv({...a,colorSchemes:c,defaultColorScheme:s,..."boolean"!=typeof r&&r},...t)}();const Pv=Xy({themeId:"$$material",defaultTheme:Mv,rootShouldForwardProp:e=>function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}(e)&&"classes"!==e});const Dv=function(e){let t,n;return function(r){let o=t;return void 0!==o&&r.theme===n||(pb.theme=r.theme,o=Fy(e(pb)),t=o,n=r.theme),o}};function Bv(e){return db(e)}function jv(e){return Dh("MuiSvgIcon",e)}"production"!==process.env.NODE_ENV&&(ph.node,ph.object.isRequired),Bh("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Lv=Pv("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${wh(n.color)}`],t[`fontSize${wh(n.fontSize)}`]]}})(Dv((({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:e=>!e.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter((([,e])=>e&&e.main)).map((([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}}))),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]})))),Fv=e.forwardRef((function(t,n){const r=Bv({props:t,name:"MuiSvgIcon"}),{children:o,className:i,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:p="0 0 24 24",...f}=r,h=e.isValidElement(o)&&"svg"===o.type,m={...r,color:a,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:p,hasSvgAsChild:h},g={};u||(g.viewBox=p);const y=(e=>{const{color:t,fontSize:n,classes:r}=e;return Rh({root:["root","inherit"!==t&&`color${wh(t)}`,`fontSize${wh(n)}`]},jv,r)})(m);return nd.jsxs(Lv,{as:s,className:Lh(y.root,i),focusable:"false",color:c,"aria-hidden":!d||void 0,role:d?"img":void 0,ref:n,...g,...f,...h&&o.props,ownerState:m,children:[h?o.props.children:o,d?nd.jsx("title",{children:d}):null]})}));function Vv(t,n){function r(e,r){return nd.jsx(Fv,{"data-testid":`${n}Icon`,ref:r,...e,children:t})}return"production"!==process.env.NODE_ENV&&(r.displayName=`${n}Icon`),r.muiName=Fv.muiName,e.memo(e.forwardRef(r))}"production"!==process.env.NODE_ENV&&(Fv.propTypes={children:ph.node,classes:ph.object,className:ph.string,color:ph.oneOfType([ph.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),ph.string]),component:ph.elementType,fontSize:ph.oneOfType([ph.oneOf(["inherit","large","medium","small"]),ph.string]),htmlColor:ph.string,inheritViewBox:ph.bool,shapeRendering:ph.string,sx:ph.oneOfType([ph.arrayOf(ph.oneOfType([ph.func,ph.object,ph.bool])),ph.func,ph.object]),titleAccess:ph.string,viewBox:ph.string}),Fv.muiName="SvgIcon";var zv=Vv(nd.jsx("path",{d:"M4 18h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1m0-5h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1M3 7c0 .55.45 1 1 1h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1"}),"MenuRounded");function Gv(e=[]){return([,t])=>t&&function(e,t=[]){if(!function(e){return"string"==typeof e.main}(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||"string"!=typeof e[n])return!1;return!0}(t,e)}function Hv(e){return Dh("MuiTypography",e)}Bh("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Wv={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},Xv=Gm,Zv=Pv("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t[`align${wh(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(Dv((({theme:e})=>({margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter((([e,t])=>"inherit"!==e&&t&&"object"==typeof t)).map((([e,t])=>({props:{variant:e},style:t}))),...Object.entries(e.palette).filter(Gv()).map((([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))),...Object.entries(e.palette?.text||{}).filter((([,e])=>"string"==typeof e)).map((([t])=>({props:{color:`text${wh(t)}`},style:{color:(e.vars||e).palette.text[t]}}))),{props:({ownerState:e})=>"inherit"!==e.align,style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:e})=>e.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:e})=>e.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:e})=>e.paragraph,style:{marginBottom:16}}]})))),$v={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Yv=e.forwardRef((function(e,t){const{color:n,...r}=Bv({props:e,name:"MuiTypography"}),o=Xv({...r,...!Wv[n]&&{color:n}}),{align:i="inherit",className:a,component:s,gutterBottom:l=!1,noWrap:c=!1,paragraph:u=!1,variant:d="body1",variantMapping:p=$v,...f}=o,h={...o,align:i,color:n,className:a,component:s,gutterBottom:l,noWrap:c,paragraph:u,variant:d,variantMapping:p},m=s||(u?"p":p[d]||$v[d])||"span",g=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=e;return Rh({root:["root",i,"inherit"!==e.align&&`align${wh(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]},Hv,a)})(h);return nd.jsx(Zv,{as:m,ref:t,className:Lh(g.root,a),...f,ownerState:h,style:{..."inherit"!==i&&{"--Typography-textAlign":i},...f.style}})}));"production"!==process.env.NODE_ENV&&(Yv.propTypes={align:ph.oneOf(["center","inherit","justify","left","right"]),children:ph.node,classes:ph.object,className:ph.string,color:ph.oneOfType([ph.oneOf(["primary","secondary","success","error","info","warning","textPrimary","textSecondary","textDisabled"]),ph.string]),component:ph.elementType,gutterBottom:ph.bool,noWrap:ph.bool,paragraph:ph.bool,style:ph.object,sx:ph.oneOfType([ph.arrayOf(ph.oneOfType([ph.func,ph.object,ph.bool])),ph.func,ph.object]),variant:ph.oneOfType([ph.oneOf(["body1","body2","button","caption","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),ph.string]),variantMapping:ph.object});const Uv=function(t={}){const{createStyledComponent:n=yb,useThemeProps:r=bb,componentName:o="MuiStack"}=t,i=n(wb),a=e.forwardRef((function(e,t){const n=Gm(r(e)),{component:a="div",direction:s="column",spacing:l=0,divider:c,children:u,className:d,useFlexGap:p=!1,...f}=n,h={direction:s,spacing:l,useFlexGap:p},m=Rh({root:["root"]},(e=>Dh(o,e)),{});return nd.jsx(i,{as:a,ownerState:h,ref:t,className:Lh(m.root,d),...f,children:c?vb(u,c):u})}));return"production"!==process.env.NODE_ENV&&(a.propTypes={children:ph.node,direction:ph.oneOfType([ph.oneOf(["column-reverse","column","row-reverse","row"]),ph.arrayOf(ph.oneOf(["column-reverse","column","row-reverse","row"])),ph.object]),divider:ph.node,spacing:ph.oneOfType([ph.arrayOf(ph.oneOfType([ph.number,ph.string])),ph.number,ph.object,ph.string]),sx:ph.oneOfType([ph.arrayOf(ph.oneOfType([ph.func,ph.object,ph.bool])),ph.func,ph.object])}),a}({createStyledComponent:Pv("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>Bv({props:e,name:"MuiStack"})});"production"!==process.env.NODE_ENV&&(Uv.propTypes={children:ph.node,component:ph.elementType,direction:ph.oneOfType([ph.oneOf(["column-reverse","column","row-reverse","row"]),ph.arrayOf(ph.oneOf(["column-reverse","column","row-reverse","row"])),ph.object]),divider:ph.node,spacing:ph.oneOfType([ph.arrayOf(ph.oneOfType([ph.number,ph.string])),ph.number,ph.object,ph.string]),sx:ph.oneOfType([ph.arrayOf(ph.oneOfType([ph.func,ph.object,ph.bool])),ph.func,ph.object]),useFlexGap:ph.bool});var Jv=Vv(nd.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),Kv=Vv(nd.jsx("path",{d:"M12 17c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m6-9h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6h1.9c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m0 12H6V10h12z"}),"LockOpen"),Qv=Vv(nd.jsx("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1z"}),"Lock"),qv=Vv(nd.jsx("path",{d:"M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z"}),"Fullscreen"),ew=Vv(nd.jsx("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess"),tw=Vv(nd.jsx("path",{d:"M13 22h8v-7h-3v-4h-5V9h3V2H8v7h3v2H6v4H3v7h8v-7H8v-2h8v2h-3z"}),"Lan"),nw=Vv(nd.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 14.5v-9l6 4.5z"}),"PlayCircleFilled"),rw=Vv(nd.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft");const ow=e.createContext();function iw(e){return Dh("MuiTable",e)}"production"!==process.env.NODE_ENV&&(ow.displayName="TableContext"),Bh("MuiTable",["root","stickyHeader"]);const aw=Pv("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.stickyHeader&&t.stickyHeader]}})(Dv((({theme:e})=>({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":{...e.typography.body2,padding:e.spacing(2),color:(e.vars||e).palette.text.secondary,textAlign:"left",captionSide:"bottom"},variants:[{props:({ownerState:e})=>e.stickyHeader,style:{borderCollapse:"separate"}}]})))),sw="table",lw=e.forwardRef((function(t,n){const r=Bv({props:t,name:"MuiTable"}),{className:o,component:i=sw,padding:a="normal",size:s="medium",stickyHeader:l=!1,...c}=r,u={...r,component:i,padding:a,size:s,stickyHeader:l},d=(e=>{const{classes:t,stickyHeader:n}=e;return Rh({root:["root",n&&"stickyHeader"]},iw,t)})(u),p=e.useMemo((()=>({padding:a,size:s,stickyHeader:l})),[a,s,l]);return nd.jsx(ow.Provider,{value:p,children:nd.jsx(aw,{as:i,role:i===sw?null:"table",ref:n,className:Lh(d.root,o),ownerState:u,...c})})}));"production"!==process.env.NODE_ENV&&(lw.propTypes={children:ph.node,classes:ph.object,className:ph.string,component:ph.elementType,padding:ph.oneOf(["checkbox","none","normal"]),size:ph.oneOfType([ph.oneOf(["medium","small"]),ph.string]),stickyHeader:ph.bool,sx:ph.oneOfType([ph.arrayOf(ph.oneOfType([ph.func,ph.object,ph.bool])),ph.func,ph.object])});const cw=e.createContext();function uw(e){return Dh("MuiTableBody",e)}"production"!==process.env.NODE_ENV&&(cw.displayName="Tablelvl2Context"),Bh("MuiTableBody",["root"]);const dw=Pv("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-row-group"}),pw={variant:"body"},fw="tbody",hw=e.forwardRef((function(e,t){const n=Bv({props:e,name:"MuiTableBody"}),{className:r,component:o=fw,...i}=n,a={...n,component:o},s=(e=>{const{classes:t}=e;return Rh({root:["root"]},uw,t)})(a);return nd.jsx(cw.Provider,{value:pw,children:nd.jsx(dw,{className:Lh(s.root,r),as:o,ref:t,role:o===fw?null:"rowgroup",ownerState:a,...i})})}));function mw(e){return Dh("MuiTableCell",e)}"production"!==process.env.NODE_ENV&&(hw.propTypes={children:ph.node,classes:ph.object,className:ph.string,component:ph.elementType,sx:ph.oneOfType([ph.arrayOf(ph.oneOfType([ph.func,ph.object,ph.bool])),ph.func,ph.object])});const gw=Bh("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),yw=Pv("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${wh(n.size)}`],"normal"!==n.padding&&t[`padding${wh(n.padding)}`],"inherit"!==n.align&&t[`align${wh(n.align)}`],n.stickyHeader&&t.stickyHeader]}})(Dv((({theme:e})=>({...e.typography.body2,display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid\n ${"light"===e.palette.mode?sb(rb(e.palette.divider,1),.88):ib(rb(e.palette.divider,1),.68)}`,textAlign:"left",padding:16,variants:[{props:{variant:"head"},style:{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium}},{props:{variant:"body"},style:{color:(e.vars||e).palette.text.primary}},{props:{variant:"footer"},style:{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)}},{props:{size:"small"},style:{padding:"6px 16px",[`&.${gw.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}}},{props:{padding:"checkbox"},style:{width:48,padding:"0 0 0 4px"}},{props:{padding:"none"},style:{padding:0}},{props:{align:"left"},style:{textAlign:"left"}},{props:{align:"center"},style:{textAlign:"center"}},{props:{align:"right"},style:{textAlign:"right",flexDirection:"row-reverse"}},{props:{align:"justify"},style:{textAlign:"justify"}},{props:({ownerState:e})=>e.stickyHeader,style:{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default}}]})))),bw=e.forwardRef((function(t,n){const r=Bv({props:t,name:"MuiTableCell"}),{align:o="inherit",className:i,component:a,padding:s,scope:l,size:c,sortDirection:u,variant:d,...p}=r,f=e.useContext(ow),h=e.useContext(cw),m=h&&"head"===h.variant;let g;g=a||(m?"th":"td");let y=l;"td"===g?y=void 0:!y&&m&&(y="col");const b=d||h&&h.variant,v={...r,align:o,component:g,padding:s||(f&&f.padding?f.padding:"normal"),size:c||(f&&f.size?f.size:"medium"),sortDirection:u,stickyHeader:"head"===b&&f&&f.stickyHeader,variant:b},w=(e=>{const{classes:t,variant:n,align:r,padding:o,size:i,stickyHeader:a}=e;return Rh({root:["root",n,a&&"stickyHeader","inherit"!==r&&`align${wh(r)}`,"normal"!==o&&`padding${wh(o)}`,`size${wh(i)}`]},mw,t)})(v);let x=null;return u&&(x="asc"===u?"ascending":"descending"),nd.jsx(yw,{as:g,ref:n,className:Lh(w.root,i),"aria-sort":x,scope:y,ownerState:v,...p})}));function vw(e){return Dh("MuiTableContainer",e)}"production"!==process.env.NODE_ENV&&(bw.propTypes={align:ph.oneOf(["center","inherit","justify","left","right"]),children:ph.node,classes:ph.object,className:ph.string,component:ph.elementType,padding:ph.oneOf(["checkbox","none","normal"]),scope:ph.string,size:ph.oneOfType([ph.oneOf(["medium","small"]),ph.string]),sortDirection:ph.oneOf(["asc","desc",!1]),sx:ph.oneOfType([ph.arrayOf(ph.oneOfType([ph.func,ph.object,ph.bool])),ph.func,ph.object]),variant:ph.oneOfType([ph.oneOf(["body","footer","head"]),ph.string])}),Bh("MuiTableContainer",["root"]);const ww=Pv("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),xw=e.forwardRef((function(e,t){const n=Bv({props:e,name:"MuiTableContainer"}),{className:r,component:o="div",...i}=n,a={...n,component:o},s=(e=>{const{classes:t}=e;return Rh({root:["root"]},vw,t)})(a);return nd.jsx(ww,{ref:t,as:o,className:Lh(s.root,r),ownerState:a,...i})}));function Cw(e){return Dh("MuiTableHead",e)}"production"!==process.env.NODE_ENV&&(xw.propTypes={children:ph.node,classes:ph.object,className:ph.string,component:ph.elementType,sx:ph.oneOfType([ph.arrayOf(ph.oneOfType([ph.func,ph.object,ph.bool])),ph.func,ph.object])}),Bh("MuiTableHead",["root"]);const kw=Pv("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),Ew={variant:"head"},Sw="thead",Iw=e.forwardRef((function(e,t){const n=Bv({props:e,name:"MuiTableHead"}),{className:r,component:o=Sw,...i}=n,a={...n,component:o},s=(e=>{const{classes:t}=e;return Rh({root:["root"]},Cw,t)})(a);return nd.jsx(cw.Provider,{value:Ew,children:nd.jsx(kw,{as:o,className:Lh(s.root,r),ref:t,role:o===Sw?null:"rowgroup",ownerState:a,...i})})}));function _w(e){return Dh("MuiTableRow",e)}"production"!==process.env.NODE_ENV&&(Iw.propTypes={children:ph.node,classes:ph.object,className:ph.string,component:ph.elementType,sx:ph.oneOfType([ph.arrayOf(ph.oneOfType([ph.func,ph.object,ph.bool])),ph.func,ph.object])});const Aw=Bh("MuiTableRow",["root","selected","hover","head","footer"]),Nw=Pv("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.head&&t.head,n.footer&&t.footer]}})(Dv((({theme:e})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${Aw.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Aw.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:rb(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:rb(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)}}})))),Ow="tr",Rw=e.forwardRef((function(t,n){const r=Bv({props:t,name:"MuiTableRow"}),{className:o,component:i=Ow,hover:a=!1,selected:s=!1,...l}=r,c=e.useContext(cw),u={...r,component:i,hover:a,selected:s,head:c&&"head"===c.variant,footer:c&&"footer"===c.variant},d=(e=>{const{classes:t,selected:n,hover:r,head:o,footer:i}=e;return Rh({root:["root",n&&"selected",r&&"hover",o&&"head",i&&"footer"]},_w,t)})(u);return nd.jsx(Nw,{as:i,ref:n,className:Lh(d.root,o),role:i===Ow?null:"row",ownerState:u,...l})}));"production"!==process.env.NODE_ENV&&(Rw.propTypes={children:ph.node,classes:ph.object,className:ph.string,component:ph.elementType,hover:ph.bool,selected:ph.bool,sx:ph.oneOfType([ph.arrayOf(ph.oneOfType([ph.func,ph.object,ph.bool])),ph.func,ph.object])});class Tw{static create(){return new Tw}static use(){const t=Sh(Tw.create).current,[n,r]=e.useState(!1);return t.shouldMount=n,t.setShouldMount=r,e.useEffect(t.mountEffect,[n]),t}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=function(){let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));return n.resolve=e,n.reject=t,n}(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&null!==this.ref.current&&(this.didMount=!0,this.mounted.resolve())};start(...e){this.mount().then((()=>this.ref.current?.start(...e)))}stop(...e){this.mount().then((()=>this.ref.current?.stop(...e)))}pulsate(...e){this.mount().then((()=>this.ref.current?.pulsate(...e)))}}function Mw(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}function Pw(e,t){return Pw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Pw(e,t)}function Dw(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Pw(e,t)}var Bw=t.createContext(null);function jw(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Lw(e,t){var n=Object.create(null);return e&&f.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&d(e)?t(e):e}(e)})),n}function Fw(e,t,n){return null!=n[t]?n[t]:e.props[t]}function Vw(e,t,n){var r=Lw(e.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var a in e)a in t?i.length&&(o[a]=i,i=[]):i.push(a);var s={};for(var l in t){if(o[l])for(r=0;r<o[l].length;r++){var c=o[l][r];s[o[l][r]]=n(c)}s[l]=n(l)}for(r=0;r<i.length;r++)s[i[r]]=n(i[r]);return s}(t,r);return Object.keys(o).forEach((function(i){var a=o[i];if(d(a)){var s=i in t,l=i in r,c=t[i],u=d(c)&&!c.props.in;!l||s&&!u?l||!s||u?l&&s&&d(c)&&(o[i]=p(a,{onExited:n.bind(null,a),in:c.props.in,exit:Fw(a,"exit",e),enter:Fw(a,"enter",e)})):o[i]=p(a,{in:!1}):o[i]=p(a,{onExited:n.bind(null,a),in:!0,exit:Fw(a,"exit",e),enter:Fw(a,"enter",e)})}})),o}var zw=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},Gw=function(e){function n(t,n){var r,o=(r=e.call(this,t,n)||this).handleExited.bind(jw(r));return r.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},r}Dw(n,e);var r=n.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},n.getDerivedStateFromProps=function(e,t){var n,r,o=t.children,i=t.handleExited;return{children:t.firstRender?(n=e,r=i,Lw(n.children,(function(e){return p(e,{onExited:r.bind(null,e),in:!0,appear:Fw(e,"appear",n),enter:Fw(e,"enter",n),exit:Fw(e,"exit",n)})}))):Vw(e,o,i),firstRender:!1}},r.handleExited=function(e,t){var n=Lw(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=Hm({},t.children);return delete n[e.key],{children:n}})))},r.render=function(){var e=this.props,n=e.component,r=e.childFactory,o=Mw(e,["component","childFactory"]),i=this.state.contextValue,a=zw(this.state.children).map(r);return delete o.appear,delete o.enter,delete o.exit,null===n?t.createElement(Bw.Provider,{value:i},a):t.createElement(Bw.Provider,{value:i},t.createElement(n,o,a))},n}(t.Component);function Hw(t){const{className:n,classes:r,pulsate:o=!1,rippleX:i,rippleY:a,rippleSize:s,in:l,onExited:c,timeout:u}=t,[d,p]=e.useState(!1),f=Lh(n,r.ripple,r.rippleVisible,o&&r.ripplePulsate),h={width:s,height:s,top:-s/2+a,left:-s/2+i},m=Lh(r.child,d&&r.childLeaving,o&&r.childPulsate);return l||d||p(!0),e.useEffect((()=>{if(!l&&null!=c){const e=setTimeout(c,u);return()=>{clearTimeout(e)}}}),[c,l,u]),nd.jsx("span",{className:f,style:h,children:nd.jsx("span",{className:m})})}Gw.propTypes="production"!==process.env.NODE_ENV?{component:ph.any,children:ph.node,appear:ph.bool,enter:ph.bool,exit:ph.bool,childFactory:ph.func}:{},Gw.defaultProps={component:"div",childFactory:function(e){return e}},"production"!==process.env.NODE_ENV&&(Hw.propTypes={classes:ph.object.isRequired,className:ph.string,in:ph.bool,onExited:ph.func,pulsate:ph.bool,rippleSize:ph.number,rippleX:ph.number,rippleY:ph.number,timeout:ph.number.isRequired});const Ww=Bh("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Xw=Cy`
|
|
68
|
-
0% {
|
|
69
|
-
transform: scale(0);
|
|
70
|
-
opacity: 0.1;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
100% {
|
|
74
|
-
transform: scale(1);
|
|
75
|
-
opacity: 0.3;
|
|
76
|
-
}
|
|
77
|
-
`,Zw=Cy`
|
|
78
|
-
0% {
|
|
79
|
-
opacity: 1;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
100% {
|
|
83
|
-
opacity: 0;
|
|
84
|
-
}
|
|
85
|
-
`,$w=Cy`
|
|
86
|
-
0% {
|
|
87
|
-
transform: scale(1);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
50% {
|
|
91
|
-
transform: scale(0.92);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
100% {
|
|
95
|
-
transform: scale(1);
|
|
96
|
-
}
|
|
97
|
-
`,Yw=Pv("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),Uw=Pv(Hw,{name:"MuiTouchRipple",slot:"Ripple"})`
|
|
98
|
-
opacity: 0;
|
|
99
|
-
position: absolute;
|
|
100
|
-
|
|
101
|
-
&.${Ww.rippleVisible} {
|
|
102
|
-
opacity: 0.3;
|
|
103
|
-
transform: scale(1);
|
|
104
|
-
animation-name: ${Xw};
|
|
105
|
-
animation-duration: ${550}ms;
|
|
106
|
-
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
&.${Ww.ripplePulsate} {
|
|
110
|
-
animation-duration: ${({theme:e})=>e.transitions.duration.shorter}ms;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
& .${Ww.child} {
|
|
114
|
-
opacity: 1;
|
|
115
|
-
display: block;
|
|
116
|
-
width: 100%;
|
|
117
|
-
height: 100%;
|
|
118
|
-
border-radius: 50%;
|
|
119
|
-
background-color: currentColor;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
& .${Ww.childLeaving} {
|
|
123
|
-
opacity: 0;
|
|
124
|
-
animation-name: ${Zw};
|
|
125
|
-
animation-duration: ${550}ms;
|
|
126
|
-
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
& .${Ww.childPulsate} {
|
|
130
|
-
position: absolute;
|
|
131
|
-
/* @noflip */
|
|
132
|
-
left: 0px;
|
|
133
|
-
top: 0;
|
|
134
|
-
animation-name: ${$w};
|
|
135
|
-
animation-duration: 2500ms;
|
|
136
|
-
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
|
|
137
|
-
animation-iteration-count: infinite;
|
|
138
|
-
animation-delay: 200ms;
|
|
139
|
-
}
|
|
140
|
-
`,Jw=e.forwardRef((function(t,n){const r=Bv({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:a,...s}=r,[l,c]=e.useState([]),u=e.useRef(0),d=e.useRef(null);e.useEffect((()=>{d.current&&(d.current(),d.current=null)}),[l]);const p=e.useRef(!1),f=Ah(),h=e.useRef(null),m=e.useRef(null),g=e.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:o,cb:a}=e;c((e=>[...e,nd.jsx(Uw,{classes:{ripple:Lh(i.ripple,Ww.ripple),rippleVisible:Lh(i.rippleVisible,Ww.rippleVisible),ripplePulsate:Lh(i.ripplePulsate,Ww.ripplePulsate),child:Lh(i.child,Ww.child),childLeaving:Lh(i.childLeaving,Ww.childLeaving),childPulsate:Lh(i.childPulsate,Ww.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o},u.current)])),u.current+=1,d.current=a}),[i]),y=e.useCallback(((e={},t={},n=()=>{})=>{const{pulsate:r=!1,center:i=o||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===e?.type&&p.current)return void(p.current=!1);"touchstart"===e?.type&&(p.current=!0);const s=a?null:m.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,d;if(i||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(i)d=Math.sqrt((2*l.width**2+l.height**2)/3),d%2==0&&(d+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;d=Math.sqrt(e**2+t**2)}e?.touches?null===h.current&&(h.current=()=>{g({pulsate:r,rippleX:c,rippleY:u,rippleSize:d,cb:n})},f.start(80,(()=>{h.current&&(h.current(),h.current=null)}))):g({pulsate:r,rippleX:c,rippleY:u,rippleSize:d,cb:n})}),[o,g,f]),b=e.useCallback((()=>{y({},{pulsate:!0})}),[y]),v=e.useCallback(((e,t)=>{if(f.clear(),"touchend"===e?.type&&h.current)return h.current(),h.current=null,void f.start(0,(()=>{v(e,t)}));h.current=null,c((e=>e.length>0?e.slice(1):e)),d.current=t}),[f]);return e.useImperativeHandle(n,(()=>({pulsate:b,start:y,stop:v})),[b,y,v]),nd.jsx(Yw,{className:Lh(Ww.root,i.root,a),ref:m,...s,children:nd.jsx(Gw,{component:null,exit:!0,children:l})})}));function Kw(e){return Dh("MuiButtonBase",e)}"production"!==process.env.NODE_ENV&&(Jw.propTypes={center:ph.bool,classes:ph.object,className:ph.string});const Qw=Bh("MuiButtonBase",["root","disabled","focusVisible"]),qw=Pv("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Qw.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),ex=e.forwardRef((function(t,n){const r=Bv({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:a,className:s,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:d=!1,focusRipple:p=!1,focusVisibleClassName:f,LinkComponent:h="a",onBlur:m,onClick:g,onContextMenu:y,onDragLeave:b,onFocus:v,onFocusVisible:w,onKeyDown:x,onKeyUp:C,onMouseDown:k,onMouseLeave:E,onMouseUp:S,onTouchEnd:I,onTouchMove:_,onTouchStart:A,tabIndex:N=0,TouchRippleProps:O,touchRippleRef:R,type:T,...M}=r,P=e.useRef(null),D=Tw.use(),B=kh(D.ref,R),[j,L]=e.useState(!1);c&&j&&L(!1),e.useImperativeHandle(o,(()=>({focusVisible:()=>{L(!0),P.current.focus()}})),[]);const F=D.shouldMount&&!u&&!c;e.useEffect((()=>{j&&p&&!u&&D.pulsate()}),[u,p,j,D]);const V=tx(D,"start",k,d),z=tx(D,"stop",y,d),G=tx(D,"stop",b,d),H=tx(D,"stop",S,d),W=tx(D,"stop",(e=>{j&&e.preventDefault(),E&&E(e)}),d),X=tx(D,"start",A,d),Z=tx(D,"stop",I,d),$=tx(D,"stop",_,d),Y=tx(D,"stop",(e=>{Nh(e.target)||L(!1),m&&m(e)}),!1),U=Ch((e=>{P.current||(P.current=e.currentTarget),Nh(e.target)&&(L(!0),w&&w(e)),v&&v(e)})),J=()=>{const e=P.current;return l&&"button"!==l&&!("A"===e.tagName&&e.href)},K=Ch((e=>{p&&!e.repeat&&j&&" "===e.key&&D.stop(e,(()=>{D.start(e)})),e.target===e.currentTarget&&J()&&" "===e.key&&e.preventDefault(),x&&x(e),e.target===e.currentTarget&&J()&&"Enter"===e.key&&!c&&(e.preventDefault(),g&&g(e))})),Q=Ch((e=>{p&&" "===e.key&&j&&!e.defaultPrevented&&D.stop(e,(()=>{D.pulsate(e)})),C&&C(e),g&&e.target===e.currentTarget&&J()&&" "===e.key&&!e.defaultPrevented&&g(e)}));let q=l;"button"===q&&(M.href||M.to)&&(q=h);const ee={};"button"===q?(ee.type=void 0===T?"button":T,ee.disabled=c):(M.href||M.to||(ee.role="button"),c&&(ee["aria-disabled"]=c));const te=kh(n,P),ne={...r,centerRipple:i,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:p,tabIndex:N,focusVisible:j},re=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i=Rh({root:["root",t&&"disabled",n&&"focusVisible"]},Kw,o);return n&&r&&(i.root+=` ${r}`),i})(ne);return nd.jsxs(qw,{as:q,className:Lh(re.root,s),ownerState:ne,onBlur:Y,onClick:g,onContextMenu:z,onFocus:U,onKeyDown:K,onKeyUp:Q,onMouseDown:V,onMouseLeave:W,onMouseUp:H,onDragLeave:G,onTouchEnd:Z,onTouchMove:$,onTouchStart:X,ref:te,tabIndex:c?-1:N,type:T,...ee,...M,children:[a,F?nd.jsx(Jw,{ref:B,center:i,...O}):null]})}));function tx(e,t,n,r=!1){return Ch((o=>(n&&n(o),r||e[t](o),!0)))}"production"!==process.env.NODE_ENV&&(ex.propTypes={action:vh,centerRipple:ph.bool,children:ph.node,classes:ph.object,className:ph.string,component:mh,disabled:ph.bool,disableRipple:ph.bool,disableTouchRipple:ph.bool,focusRipple:ph.bool,focusVisibleClassName:ph.string,href:ph.any,LinkComponent:ph.elementType,onBlur:ph.func,onClick:ph.func,onContextMenu:ph.func,onDragLeave:ph.func,onFocus:ph.func,onFocusVisible:ph.func,onKeyDown:ph.func,onKeyUp:ph.func,onMouseDown:ph.func,onMouseLeave:ph.func,onMouseUp:ph.func,onTouchEnd:ph.func,onTouchMove:ph.func,onTouchStart:ph.func,sx:ph.oneOfType([ph.arrayOf(ph.oneOfType([ph.func,ph.object,ph.bool])),ph.func,ph.object]),tabIndex:ph.number,TouchRippleProps:ph.object,touchRippleRef:ph.oneOfType([ph.func,ph.shape({current:ph.shape({pulsate:ph.func.isRequired,start:ph.func.isRequired,stop:ph.func.isRequired})})]),type:ph.oneOfType([ph.oneOf(["button","reset","submit"]),ph.string])});var nx=Vv(nd.jsx("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward");function rx(e){return Dh("MuiTableSortLabel",e)}const ox=Bh("MuiTableSortLabel",["root","active","icon","iconDirectionDesc","iconDirectionAsc","directionDesc","directionAsc"]);function ix(e,t){const{className:n,elementType:r,ownerState:o,externalForwardedProps:i,internalForwardedProps:a,shouldForwardComponentProp:s=!1,...l}=t,{component:c,slots:u={[e]:void 0},slotProps:d={[e]:void 0},...p}=i,f=u[e]||r,h=function(e,t,n){return"function"==typeof e?e(t,n):e}(d[e],o),{props:{component:m,...g},internalRef:y}=Vh({className:n,...l,externalForwardedProps:"root"===e?p:void 0,externalSlotProps:h}),b=kh(y,h?.ref,t.ref),v="root"===e?m||c:m,w=function(e,t,n){return void 0===e||function(e){return"string"==typeof e}(e)?t:{...t,ownerState:{...t.ownerState,...n}}}(f,{..."root"===e&&!c&&!u[e]&&a,..."root"!==e&&!u[e]&&a,...g,...v&&!s&&{as:v},...v&&s&&{component:v},ref:b},o);return[f,w]}const ax=Pv(ex,{name:"MuiTableSortLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.active&&t.active]}})(Dv((({theme:e})=>({cursor:"pointer",display:"inline-flex",justifyContent:"flex-start",flexDirection:"inherit",alignItems:"center","&:focus":{color:(e.vars||e).palette.text.secondary},"&:hover":{color:(e.vars||e).palette.text.secondary,[`& .${ox.icon}`]:{opacity:.5}},[`&.${ox.active}`]:{color:(e.vars||e).palette.text.primary,[`& .${ox.icon}`]:{opacity:1,color:(e.vars||e).palette.text.secondary}}})))),sx=Pv("span",{name:"MuiTableSortLabel",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,t[`iconDirection${wh(n.direction)}`]]}})(Dv((({theme:e})=>({fontSize:18,marginRight:4,marginLeft:4,opacity:0,transition:e.transitions.create(["opacity","transform"],{duration:e.transitions.duration.shorter}),userSelect:"none",variants:[{props:{direction:"desc"},style:{transform:"rotate(0deg)"}},{props:{direction:"asc"},style:{transform:"rotate(180deg)"}}]})))),lx=e.forwardRef((function(e,t){const n=Bv({props:e,name:"MuiTableSortLabel"}),{active:r=!1,children:o,className:i,direction:a="asc",hideSortIcon:s=!1,IconComponent:l=nx,slots:c={},slotProps:u={},...d}=n,p={...n,active:r,direction:a,hideSortIcon:s,IconComponent:l},f=(e=>{const{classes:t,direction:n,active:r}=e;return Rh({root:["root",r&&"active",`direction${wh(n)}`],icon:["icon",`iconDirection${wh(n)}`]},rx,t)})(p),h={slots:c,slotProps:u},[m,g]=ix("root",{elementType:ax,externalForwardedProps:h,ownerState:p,className:Lh(f.root,i),ref:t}),[y,b]=ix("icon",{elementType:sx,externalForwardedProps:h,ownerState:p,className:f.icon});return nd.jsxs(m,{disableRipple:!0,component:"span",...g,...d,children:[o,s&&!r?null:nd.jsx(y,{as:l,...b})]})}));"production"!==process.env.NODE_ENV&&(lx.propTypes={active:ph.bool,children:ph.node,classes:ph.object,className:ph.string,direction:ph.oneOf(["asc","desc"]),hideSortIcon:ph.bool,IconComponent:ph.elementType,slotProps:ph.shape({icon:ph.oneOfType([ph.func,ph.object]),root:ph.oneOfType([ph.func,ph.object])}),slots:ph.shape({icon:ph.elementType,root:ph.elementType}),sx:ph.oneOfType([ph.arrayOf(ph.oneOfType([ph.func,ph.object,ph.bool])),ph.func,ph.object])});var cx=Vv(nd.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),ux=Vv(nd.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search");const dx=({trigger:e,title:n,description:r,children:o,closebutton:i=!0,onOpenChange:a,buttons:s=[],open:l,setOpen:c,modal:u=!0})=>t.createElement(gf,{open:l,onOpenChange:e=>{c&&c(e),a&&a(e)},modal:u},e&&t.createElement(yf,{asChild:!0},e),t.createElement(bf,null,t.createElement(vf,{className:"dialogoverlay funcnodescontainer"}),t.createElement(wf,{className:"dialogconent funcnodescontainer "},n&&t.createElement(xf,{className:"dialogtitle"},n),r&&t.createElement(Cf,{className:"dialogdescription"},r),t.createElement("div",{className:"dialogchildren"},o),t.createElement("div",{style:{display:"flex",marginTop:25,justifyContent:"flex-end"}},(s||[]).map(((e,n)=>t.createElement(kf,{asChild:!0,key:n},t.createElement("button",{className:"dialogsendbutton",onClick:e.onClick},e.text))))),i&&t.createElement(kf,{asChild:!0},t.createElement("button",{className:"dialogclosebutton","aria-label":"Close"},t.createElement(cx,null))))));function px(e){const n=e+"CollectionProvider",[r,o]=rd(n),[i,a]=r(n,{collectionRef:{current:null},itemMap:new Map}),s=e=>{const{scope:n,children:r}=e,o=t.useRef(null),a=t.useRef(new Map).current;return nd.jsx(i,{scope:n,itemMap:a,collectionRef:o,children:r})};s.displayName=n;const l=e+"CollectionSlot",c=t.forwardRef(((e,t)=>{const{scope:n,children:r}=e,o=Yu(t,a(l,n).collectionRef);return nd.jsx(dd,{ref:o,children:r})}));c.displayName=l;const u=e+"CollectionItemSlot",d="data-radix-collection-item",p=t.forwardRef(((e,n)=>{const{scope:r,children:o,...i}=e,s=t.useRef(null),l=Yu(n,s),c=a(u,r);return t.useEffect((()=>(c.itemMap.set(s,{ref:s,...i}),()=>{c.itemMap.delete(s)}))),nd.jsx(dd,{[d]:"",ref:l,children:o})}));return p.displayName=u,[{Provider:s,Slot:c,ItemSlot:p},function(n){const r=a(e+"CollectionConsumer",n);return t.useCallback((()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(r.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[r.collectionRef,r.itemMap])},o]}var fx=e.createContext(void 0);function hx(t){const n=e.useContext(fx);return t||n||"ltr"}const mx=["top","right","bottom","left"],gx=Math.min,yx=Math.max,bx=Math.round,vx=Math.floor,wx=e=>({x:e,y:e}),xx={left:"right",right:"left",bottom:"top",top:"bottom"},Cx={start:"end",end:"start"};function kx(e,t,n){return yx(e,gx(t,n))}function Ex(e,t){return"function"==typeof e?e(t):e}function Sx(e){return e.split("-")[0]}function Ix(e){return e.split("-")[1]}function _x(e){return"x"===e?"y":"x"}function Ax(e){return"y"===e?"height":"width"}function Nx(e){return["top","bottom"].includes(Sx(e))?"y":"x"}function Ox(e){return _x(Nx(e))}function Rx(e){return e.replace(/start|end/g,(e=>Cx[e]))}function Tx(e){return e.replace(/left|right|bottom|top/g,(e=>xx[e]))}function Mx(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Px(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Dx(e,t,n){let{reference:r,floating:o}=e;const i=Nx(t),a=Ox(t),s=Ax(a),l=Sx(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let f;switch(l){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch(Ix(t)){case"start":f[a]-=p*(n&&c?-1:1);break;case"end":f[a]+=p*(n&&c?-1:1)}return f}async function Bx(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=Ex(t,e),h=Mx(f),m=s[p?"floating"===d?"reference":"floating":d],g=Px(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),v=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},w=Px(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:b,strategy:l}):y);return{top:(g.top-w.top+h.top)/v.y,bottom:(w.bottom-g.bottom+h.bottom)/v.y,left:(g.left-w.left+h.left)/v.x,right:(w.right-g.right+h.right)/v.x}}function jx(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Lx(e){return mx.some((t=>e[t]>=0))}function Fx(){return"undefined"!=typeof window}function Vx(e){return Hx(e)?(e.nodeName||"").toLowerCase():"#document"}function zx(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Gx(e){var t;return null==(t=(Hx(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Hx(e){return!!Fx()&&(e instanceof Node||e instanceof zx(e).Node)}function Wx(e){return!!Fx()&&(e instanceof Element||e instanceof zx(e).Element)}function Xx(e){return!!Fx()&&(e instanceof HTMLElement||e instanceof zx(e).HTMLElement)}function Zx(e){return!(!Fx()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof zx(e).ShadowRoot)}function $x(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=qx(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Yx(e){return["table","td","th"].includes(Vx(e))}function Ux(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Jx(e){const t=Kx(),n=Wx(e)?qx(e):e;return["transform","translate","scale","rotate","perspective"].some((e=>!!n[e]&&"none"!==n[e]))||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","translate","scale","rotate","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function Kx(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Qx(e){return["html","body","#document"].includes(Vx(e))}function qx(e){return zx(e).getComputedStyle(e)}function eC(e){return Wx(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tC(e){if("html"===Vx(e))return e;const t=e.assignedSlot||e.parentNode||Zx(e)&&e.host||Gx(e);return Zx(t)?t.host:t}function nC(e){const t=tC(e);return Qx(t)?e.ownerDocument?e.ownerDocument.body:e.body:Xx(t)&&$x(t)?t:nC(t)}function rC(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=nC(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=zx(o);if(i){const e=oC(a);return t.concat(a,a.visualViewport||[],$x(o)?o:[],e&&n?rC(e):[])}return t.concat(o,rC(o,[],n))}function oC(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function iC(e){const t=qx(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Xx(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=bx(n)!==i||bx(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function aC(e){return Wx(e)?e:e.contextElement}function sC(e){const t=aC(e);if(!Xx(t))return wx(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=iC(t);let a=(i?bx(n.width):n.width)/r,s=(i?bx(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const lC=wx(0);function cC(e){const t=zx(e);return Kx()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:lC}function uC(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=aC(e);let a=wx(1);t&&(r?Wx(r)&&(a=sC(r)):a=sC(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==zx(e))&&t}(i,n,r)?cC(i):wx(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=zx(i),t=r&&Wx(r)?zx(r):r;let n=e,o=oC(n);for(;o&&r&&t!==n;){const e=sC(o),t=o.getBoundingClientRect(),r=qx(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=a,n=zx(o),o=oC(n)}}return Px({width:u,height:d,x:l,y:c})}function dC(e,t){const n=eC(e).scrollLeft;return t?t.left+n:uC(Gx(e)).left+n}function pC(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:dC(e,r)),y:r.top+t.scrollTop}}function fC(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=zx(e),r=Gx(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=Kx();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=Gx(e),n=eC(e),r=e.ownerDocument.body,o=yx(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=yx(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+dC(e);const s=-n.scrollTop;return"rtl"===qx(r).direction&&(a+=yx(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(Gx(e));else if(Wx(t))r=function(e,t){const n=uC(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Xx(e)?sC(e):wx(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=cC(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Px(r)}function hC(e,t){const n=tC(e);return!(n===t||!Wx(n)||Qx(n))&&("fixed"===qx(n).position||hC(n,t))}function mC(e,t,n){const r=Xx(t),o=Gx(t),i="fixed"===n,a=uC(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=wx(0);if(r||!r&&!i)if(("body"!==Vx(t)||$x(o))&&(s=eC(t)),r){const e=uC(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=dC(o));const c=!o||r||i?wx(0):pC(o,s);return{x:a.left+s.scrollLeft-l.x-c.x,y:a.top+s.scrollTop-l.y-c.y,width:a.width,height:a.height}}function gC(e){return"static"===qx(e).position}function yC(e,t){if(!Xx(e)||"fixed"===qx(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Gx(e)===n&&(n=n.ownerDocument.body),n}function bC(e,t){const n=zx(e);if(Ux(e))return n;if(!Xx(e)){let t=tC(e);for(;t&&!Qx(t);){if(Wx(t)&&!gC(t))return t;t=tC(t)}return n}let r=yC(e,t);for(;r&&Yx(r)&&gC(r);)r=yC(r,t);return r&&Qx(r)&&gC(r)&&!Jx(r)?n:r||function(e){let t=tC(e);for(;Xx(t)&&!Qx(t);){if(Jx(t))return t;if(Ux(t))return null;t=tC(t)}return null}(e)||n}const vC={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=Gx(r),s=!!t&&Ux(t.floating);if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=wx(1);const u=wx(0),d=Xx(r);if((d||!d&&!i)&&(("body"!==Vx(r)||$x(a))&&(l=eC(r)),Xx(r))){const e=uC(r);c=sC(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const p=!a||d||i?wx(0):pC(a,l,!0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-l.scrollTop*c.y+u.y+p.y}},getDocumentElement:Gx,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?Ux(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=rC(e,[],!1).filter((e=>Wx(e)&&"body"!==Vx(e))),o=null;const i="fixed"===qx(e).position;let a=i?tC(e):e;for(;Wx(a)&&!Qx(a);){const t=qx(a),n=Jx(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||$x(a)&&!n&&hC(e,a))?r=r.filter((e=>e!==a)):o=t,a=tC(a)}return t.set(e,r),r}(t,this._c):[].concat(n),a=[...i,r],s=a[0],l=a.reduce(((e,n)=>{const r=fC(t,n,o);return e.top=yx(r.top,e.top),e.right=gx(r.right,e.right),e.bottom=gx(r.bottom,e.bottom),e.left=yx(r.left,e.left),e}),fC(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:bC,getElementRects:async function(e){const t=this.getOffsetParent||bC,n=this.getDimensions,r=await n(e.floating);return{reference:mC(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=iC(e);return{width:t,height:n}},getScale:sC,isElement:Wx,isRTL:function(e){return"rtl"===qx(e).direction}};function wC(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function xC(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=aC(e),u=o||i?[...c?rC(c):[],...rC(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&s?function(e,t){let n,r=null;const o=Gx(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:p,height:f}=c;if(s||t(),!p||!f)return;const h={rootMargin:-vx(d)+"px "+-vx(o.clientWidth-(u+p))+"px "+-vx(o.clientHeight-(d+f))+"px "+-vx(u)+"px",threshold:yx(0,gx(1,l))||1};let m=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!m)return a();r?a(!1,r):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}1!==r||wC(c,e.getBoundingClientRect())||a(),m=!1}try{r=new IntersectionObserver(g,{...h,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,h)}r.observe(e)}(!0),i}(c,n):null;let p,f=-1,h=null;a&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),c&&!l&&h.observe(c),h.observe(t));let m=l?uC(e):null;return l&&function t(){const r=uC(e);m&&!wC(m,r)&&n();m=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const CC=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=Sx(n),s=Ix(n),l="y"===Nx(n),c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=Ex(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof h&&(f="end"===s?-1*h:h),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},kC=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Ex(e,t),c={x:n,y:r},u=await Bx(t,l),d=Nx(Sx(o)),p=_x(d);let f=c[p],h=c[d];if(i){const e="y"===p?"bottom":"right";f=kx(f+u["y"===p?"top":"left"],f,f-u[e])}if(a){const e="y"===d?"bottom":"right";h=kx(h+u["y"===d?"top":"left"],h,h-u[e])}const m=s.fn({...t,[p]:f,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[p]:i,[d]:a}}}}}},EC=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...g}=Ex(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=Sx(o),b=Nx(s),v=Sx(s)===s,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=p||(v||!m?[Tx(s)]:function(e){const t=Tx(e);return[Rx(e),t,Rx(t)]}(s)),C="none"!==h;!p&&C&&x.push(...function(e,t,n,r){const o=Ix(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}(Sx(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(Rx)))),i}(s,m,h,w));const k=[s,...x],E=await Bx(t,g),S=[];let I=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&S.push(E[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=Ix(e),o=Ox(e),i=Ax(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Tx(a)),[a,Tx(a)]}(o,a,w);S.push(E[e[0]],E[e[1]])}if(I=[...I,{placement:o,overflows:S}],!S.every((e=>e<=0))){var _,A;const e=((null==(_=i.flip)?void 0:_.index)||0)+1,t=k[e];if(t)return{data:{index:e,overflows:I},reset:{placement:t}};let n=null==(A=I.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:A.placement;if(!n)switch(f){case"bestFit":{var N;const e=null==(N=I.filter((e=>{if(C){const t=Nx(e.placement);return t===b||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:N[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},SC=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...c}=Ex(e,t),u=await Bx(t,c),d=Sx(o),p=Ix(o),f="y"===Nx(o),{width:h,height:m}=i.floating;let g,y;"top"===d||"bottom"===d?(g=d,y=p===(await(null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(y=d,g="end"===p?"top":"bottom");const b=m-u.top-u.bottom,v=h-u.left-u.right,w=gx(m-u[g],b),x=gx(h-u[y],v),C=!t.middlewareData.shift;let k=w,E=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(E=v),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(k=b),C&&!p){const e=yx(u.left,0),t=yx(u.right,0),n=yx(u.top,0),r=yx(u.bottom,0);f?E=h-2*(0!==e||0!==t?e+t:yx(u.left,u.right)):k=m-2*(0!==n||0!==r?n+r:yx(u.top,u.bottom))}await l({...t,availableWidth:E,availableHeight:k});const S=await a.getDimensions(s.floating);return h!==S.width||m!==S.height?{reset:{rects:!0}}:{}}}},IC=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Ex(e,t);switch(r){case"referenceHidden":{const e=jx(await Bx(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Lx(e)}}}case"escaped":{const e=jx(await Bx(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Lx(e)}}}default:return{}}}}},_C=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=Ex(e,t)||{};if(null==c)return{};const d=Mx(u),p={x:n,y:r},f=Ox(o),h=Ax(f),m=await a.getDimensions(c),g="y"===f,y=g?"top":"left",b=g?"bottom":"right",v=g?"clientHeight":"clientWidth",w=i.reference[h]+i.reference[f]-p[f]-i.floating[h],x=p[f]-i.reference[f],C=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let k=C?C[v]:0;k&&await(null==a.isElement?void 0:a.isElement(C))||(k=s.floating[v]||i.floating[h]);const E=w/2-x/2,S=k/2-m[h]/2-1,I=gx(d[y],S),_=gx(d[b],S),A=I,N=k-m[h]-_,O=k/2-m[h]/2+E,R=kx(A,O,N),T=!l.arrow&&null!=Ix(o)&&O!==R&&i.reference[h]/2-(O<A?I:_)-m[h]/2<0,M=T?O<A?O-A:O-N:0;return{[f]:p[f]+M,data:{[f]:R,centerOffset:O-R-M,...T&&{alignmentOffset:M}},reset:T}}}),AC=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=Ex(e,t),u={x:n,y:r},d=Nx(o),p=_x(d);let f=u[p],h=u[d];const m=Ex(s,t),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const e="y"===p?"height":"width",t=i.reference[p]-i.floating[e]+g.mainAxis,n=i.reference[p]+i.reference[e]-g.mainAxis;f<t?f=t:f>n&&(f=n)}if(c){var y,b;const e="y"===p?"width":"height",t=["top","left"].includes(Sx(o)),n=i.reference[d]-i.floating[e]+(t&&(null==(y=a.offset)?void 0:y[d])||0)+(t?0:g.crossAxis),r=i.reference[d]+i.reference[e]+(t?0:(null==(b=a.offset)?void 0:b[d])||0)-(t?g.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[p]:f,[d]:h}}}},NC=(e,t,n)=>{const r=new Map,o={platform:vC,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Dx(c,r,l),p=r,f={},h=0;for(let n=0;n<s.length;n++){const{name:i,fn:m}=s[n],{x:g,y:y,data:b,reset:v}=await m({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=y?y:d,f={...f,[i]:{...f[i],...b}},v&&h<=50&&(h++,"object"==typeof v&&(v.placement&&(p=v.placement),v.rects&&(c=!0===v.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):v.rects),({x:u,y:d}=Dx(c,p,l))),n=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:f}})(e,t,{...o,platform:i})};var OC="undefined"!=typeof document?h:s;function RC(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!RC(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!RC(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function TC(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function MC(e,t){const n=TC(e);return Math.round(t*n)/n}function PC(t){const n=e.useRef(t);return OC((()=>{n.current=t})),n}const DC=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?_C({element:n.current,padding:r}).fn(t):{}:n?_C({element:n,padding:r}).fn(t):{};var o}}),BC=(e,t)=>({...CC(e),options:[e,t]}),jC=(e,t)=>({...kC(e),options:[e,t]}),LC=(e,t)=>({...AC(e),options:[e,t]}),FC=(e,t)=>({...EC(e),options:[e,t]}),VC=(e,t)=>({...SC(e),options:[e,t]}),zC=(e,t)=>({...IC(e),options:[e,t]}),GC=(e,t)=>({...DC(e),options:[e,t]});var HC=e.forwardRef(((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return nd.jsx(md.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:nd.jsx("polygon",{points:"0,0 30,0 15,10"})})}));HC.displayName="Arrow";var WC=HC;function XC(t){const[n,r]=e.useState(void 0);return id((()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const e=new ResizeObserver((e=>{if(!Array.isArray(e))return;if(!e.length)return;const n=e[0];let o,i;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=t.offsetWidth,i=t.offsetHeight;r({width:o,height:i})}));return e.observe(t,{box:"border-box"}),()=>e.unobserve(t)}r(void 0)}),[t]),n}var ZC="Popper",[$C,YC]=rd(ZC),[UC,JC]=$C(ZC),KC=t=>{const{__scopePopper:n,children:r}=t,[o,i]=e.useState(null);return nd.jsx(UC,{scope:n,anchor:o,onAnchorChange:i,children:r})};KC.displayName=ZC;var QC="PopperAnchor",qC=e.forwardRef(((t,n)=>{const{__scopePopper:r,virtualRef:o,...i}=t,a=JC(QC,r),s=e.useRef(null),l=Yu(n,s);return e.useEffect((()=>{a.onAnchorChange(o?.current||s.current)})),o?null:nd.jsx(md.div,{...i,ref:l})}));qC.displayName=QC;var ek="PopperContent",[tk,nk]=$C(ek),rk=e.forwardRef(((t,n)=>{const{__scopePopper:r,side:o="bottom",sideOffset:i=0,align:a="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:p="partial",hideWhenDetached:f=!1,updatePositionStrategy:h="optimized",onPlaced:m,...g}=t,y=JC(ek,r),[b,v]=e.useState(null),x=Yu(n,(e=>v(e))),[C,k]=e.useState(null),E=XC(C),S=E?.width??0,I=E?.height??0,_=o+("center"!==a?"-"+a:""),A="number"==typeof d?d:{top:0,right:0,bottom:0,left:0,...d},N=Array.isArray(u)?u:[u],O=N.length>0,R={padding:A,boundary:N.filter(sk),altBoundary:O},{refs:T,floatingStyles:M,placement:P,isPositioned:D,middlewareData:B}=function(t){void 0===t&&(t={});const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:s}={},transform:l=!0,whileElementsMounted:c,open:u}=t,[d,p]=e.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[f,h]=e.useState(o);RC(f,o)||h(o);const[m,g]=e.useState(null),[y,b]=e.useState(null),v=e.useCallback((e=>{e!==E.current&&(E.current=e,g(e))}),[]),x=e.useCallback((e=>{e!==S.current&&(S.current=e,b(e))}),[]),C=a||m,k=s||y,E=e.useRef(null),S=e.useRef(null),I=e.useRef(d),_=null!=c,A=PC(c),N=PC(i),O=PC(u),R=e.useCallback((()=>{if(!E.current||!S.current)return;const e={placement:n,strategy:r,middleware:f};N.current&&(e.platform=N.current),NC(E.current,S.current,e).then((e=>{const t={...e,isPositioned:!1!==O.current};T.current&&!RC(I.current,t)&&(I.current=t,w.flushSync((()=>{p(t)})))}))}),[f,n,r,N,O]);OC((()=>{!1===u&&I.current.isPositioned&&(I.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[u]);const T=e.useRef(!1);OC((()=>(T.current=!0,()=>{T.current=!1})),[]),OC((()=>{if(C&&(E.current=C),k&&(S.current=k),C&&k){if(A.current)return A.current(C,k,R);R()}}),[C,k,R,A,_]);const M=e.useMemo((()=>({reference:E,floating:S,setReference:v,setFloating:x})),[v,x]),P=e.useMemo((()=>({reference:C,floating:k})),[C,k]),D=e.useMemo((()=>{const e={position:r,left:0,top:0};if(!P.floating)return e;const t=MC(P.floating,d.x),n=MC(P.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+n+"px)",...TC(P.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}}),[r,l,P.floating,d.x,d.y]);return e.useMemo((()=>({...d,update:R,refs:M,elements:P,floatingStyles:D})),[d,R,M,P,D])}({strategy:"fixed",placement:_,whileElementsMounted:(...e)=>xC(...e,{animationFrame:"always"===h}),elements:{reference:y.anchor},middleware:[BC({mainAxis:i+I,alignmentAxis:s}),c&&jC({mainAxis:!0,crossAxis:!1,limiter:"partial"===p?LC():void 0,...R}),c&&FC({...R}),VC({...R,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${n}px`),a.setProperty("--radix-popper-available-height",`${r}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),C&&GC({element:C,padding:l}),lk({arrowWidth:S,arrowHeight:I}),f&&zC({strategy:"referenceHidden",...R})]}),[j,L]=ck(P),F=cd(m);id((()=>{D&&F?.()}),[D,F]);const V=B.arrow?.x,z=B.arrow?.y,G=0!==B.arrow?.centerOffset,[H,W]=e.useState();return id((()=>{b&&W(window.getComputedStyle(b).zIndex)}),[b]),nd.jsx("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...M,transform:D?M.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:H,"--radix-popper-transform-origin":[B.transformOrigin?.x,B.transformOrigin?.y].join(" "),...B.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:nd.jsx(tk,{scope:r,placedSide:j,onArrowChange:k,arrowX:V,arrowY:z,shouldHideArrow:G,children:nd.jsx(md.div,{"data-side":j,"data-align":L,...g,ref:x,style:{...g.style,animation:D?void 0:"none"}})})})}));rk.displayName=ek;var ok="PopperArrow",ik={top:"bottom",right:"left",bottom:"top",left:"right"},ak=e.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,o=nk(ok,n),i=ik[o.placedSide];return nd.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:nd.jsx(WC,{...r,ref:t,style:{...r.style,display:"block"}})})}));function sk(e){return null!==e}ak.displayName=ok;var lk=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=0!==o.arrow?.centerOffset,a=i?0:e.arrowWidth,s=i?0:e.arrowHeight,[l,c]=ck(n),u={start:"0%",center:"50%",end:"100%"}[c],d=(o.arrow?.x??0)+a/2,p=(o.arrow?.y??0)+s/2;let f="",h="";return"bottom"===l?(f=i?u:`${d}px`,h=-s+"px"):"top"===l?(f=i?u:`${d}px`,h=`${r.floating.height+s}px`):"right"===l?(f=-s+"px",h=i?u:`${p}px`):"left"===l&&(f=`${r.floating.width+s}px`,h=i?u:`${p}px`),{data:{x:f,y:h}}}});function ck(e){const[t,n="center"]=e.split("-");return[t,n]}var uk=KC,dk=qC,pk=rk,fk=ak,hk="rovingFocusGroup.onEntryFocus",mk={bubbles:!1,cancelable:!0},gk="RovingFocusGroup",[yk,bk,vk]=px(gk),[wk,xk]=rd(gk,[vk]),[Ck,kk]=wk(gk),Ek=e.forwardRef(((e,t)=>nd.jsx(yk.Provider,{scope:e.__scopeRovingFocusGroup,children:nd.jsx(yk.Slot,{scope:e.__scopeRovingFocusGroup,children:nd.jsx(Sk,{...e,ref:t})})})));Ek.displayName=gk;var Sk=e.forwardRef(((t,n)=>{const{__scopeRovingFocusGroup:r,orientation:o,loop:i=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...p}=t,f=e.useRef(null),h=Yu(n,f),m=hx(a),[g=null,y]=ud({prop:s,defaultProp:l,onChange:c}),[b,v]=e.useState(!1),w=cd(u),x=bk(r),C=e.useRef(!1),[k,E]=e.useState(0);return e.useEffect((()=>{const e=f.current;if(e)return e.addEventListener(hk,w),()=>e.removeEventListener(hk,w)}),[w]),nd.jsx(Ck,{scope:r,orientation:o,dir:m,loop:i,currentTabStopId:g,onItemFocus:e.useCallback((e=>y(e)),[y]),onItemShiftTab:e.useCallback((()=>v(!0)),[]),onFocusableItemAdd:e.useCallback((()=>E((e=>e+1))),[]),onFocusableItemRemove:e.useCallback((()=>E((e=>e-1))),[]),children:nd.jsx(md.div,{tabIndex:b||0===k?-1:0,"data-orientation":o,...p,ref:h,style:{outline:"none",...t.style},onMouseDown:Xu(t.onMouseDown,(()=>{C.current=!0})),onFocus:Xu(t.onFocus,(e=>{const t=!C.current;if(e.target===e.currentTarget&&t&&!b){const t=new CustomEvent(hk,mk);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=x().filter((e=>e.focusable));Nk([e.find((e=>e.active)),e.find((e=>e.id===g)),...e].filter(Boolean).map((e=>e.ref.current)),d)}}C.current=!1})),onBlur:Xu(t.onBlur,(()=>v(!1)))})})})),Ik="RovingFocusGroupItem",_k=e.forwardRef(((t,n)=>{const{__scopeRovingFocusGroup:r,focusable:o=!0,active:i=!1,tabStopId:a,...s}=t,l=ld(),c=a||l,u=kk(Ik,r),d=u.currentTabStopId===c,p=bk(r),{onFocusableItemAdd:f,onFocusableItemRemove:h}=u;return e.useEffect((()=>{if(o)return f(),()=>h()}),[o,f,h]),nd.jsx(yk.ItemSlot,{scope:r,id:c,focusable:o,active:i,children:nd.jsx(md.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:n,onMouseDown:Xu(t.onMouseDown,(e=>{o?u.onItemFocus(c):e.preventDefault()})),onFocus:Xu(t.onFocus,(()=>u.onItemFocus(c))),onKeyDown:Xu(t.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void u.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:Ak[r]}(e,u.orientation,u.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=p().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)n.reverse();else if("prev"===t||"next"===t){"prev"===t&&n.reverse();const r=n.indexOf(e.currentTarget);n=u.loop?function(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}(n,r+1):n.slice(r+1)}setTimeout((()=>Nk(n)))}}))})})}));_k.displayName=Ik;var Ak={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Nk(e,t=!1){const n=document.activeElement;for(const r of e){if(r===n)return;if(r.focus({preventScroll:t}),document.activeElement!==n)return}}var Ok=Ek,Rk=_k,Tk=["Enter"," "],Mk=["ArrowUp","PageDown","End"],Pk=["ArrowDown","PageUp","Home",...Mk],Dk={ltr:[...Tk,"ArrowRight"],rtl:[...Tk,"ArrowLeft"]},Bk={ltr:["ArrowLeft"],rtl:["ArrowRight"]},jk="Menu",[Lk,Fk,Vk]=px(jk),[zk,Gk]=rd(jk,[Vk,YC,xk]),Hk=YC(),Wk=xk(),[Xk,Zk]=zk(jk),[$k,Yk]=zk(jk),Uk=t=>{const{__scopeMenu:n,open:r=!1,children:o,dir:i,onOpenChange:a,modal:s=!0}=t,l=Hk(n),[c,u]=e.useState(null),d=e.useRef(!1),p=cd(a),f=hx(i);return e.useEffect((()=>{const e=()=>{d.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>d.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}}),[]),nd.jsx(uk,{...l,children:nd.jsx(Xk,{scope:n,open:r,onOpenChange:p,content:c,onContentChange:u,children:nd.jsx($k,{scope:n,onClose:e.useCallback((()=>p(!1)),[p]),isUsingKeyboardRef:d,dir:f,modal:s,children:o})})})};Uk.displayName=jk;var Jk=e.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e,o=Hk(n);return nd.jsx(dk,{...o,...r,ref:t})}));Jk.displayName="MenuAnchor";var Kk="MenuPortal",[Qk,qk]=zk(Kk,{forceMount:void 0}),eE=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=Zk(Kk,t);return nd.jsx(Qk,{scope:t,forceMount:n,children:nd.jsx(jd,{present:n||i.open,children:nd.jsx(Bd,{asChild:!0,container:o,children:r})})})};eE.displayName=Kk;var tE="MenuContent",[nE,rE]=zk(tE),oE=e.forwardRef(((e,t)=>{const n=qk(tE,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=Zk(tE,e.__scopeMenu),a=Yk(tE,e.__scopeMenu);return nd.jsx(Lk.Provider,{scope:e.__scopeMenu,children:nd.jsx(jd,{present:r||i.open,children:nd.jsx(Lk.Slot,{scope:e.__scopeMenu,children:a.modal?nd.jsx(iE,{...o,ref:t}):nd.jsx(aE,{...o,ref:t})})})})})),iE=e.forwardRef(((t,n)=>{const r=Zk(tE,t.__scopeMenu),o=e.useRef(null),i=Yu(n,o);return e.useEffect((()=>{const e=o.current;if(e)return Bp(e)}),[]),nd.jsx(sE,{...t,ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:Xu(t.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})})),aE=e.forwardRef(((e,t)=>{const n=Zk(tE,e.__scopeMenu);return nd.jsx(sE,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})})),sE=e.forwardRef(((t,n)=>{const{__scopeMenu:r,loop:o=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:p,onInteractOutside:f,onDismiss:h,disableOutsideScroll:m,...g}=t,y=Zk(tE,r),b=Yk(tE,r),v=Hk(r),w=Wk(r),x=Fk(r),[C,k]=e.useState(null),E=e.useRef(null),S=Yu(n,E,y.onContentChange),I=e.useRef(0),_=e.useRef(""),A=e.useRef(0),N=e.useRef(null),O=e.useRef("right"),R=e.useRef(0),T=m?Np:e.Fragment,M=m?{as:dd,allowPinchZoom:!0}:void 0,P=e=>{const t=_.current+e,n=x().filter((e=>!e.disabled)),r=document.activeElement,o=n.find((e=>e.ref.current===r))?.textValue,i=function(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0])),o=r?t[0]:t,i=n?e.indexOf(n):-1;let a=function(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}(e,Math.max(i,0));1===o.length&&(a=a.filter((e=>e!==n)));const s=a.find((e=>e.toLowerCase().startsWith(o.toLowerCase())));return s!==n?s:void 0}(n.map((e=>e.textValue)),t,o),a=n.find((e=>e.textValue===i))?.ref.current;!function e(t){_.current=t,window.clearTimeout(I.current),""!==t&&(I.current=window.setTimeout((()=>e("")),1e3))}(t),a&&setTimeout((()=>a.focus()))};e.useEffect((()=>()=>window.clearTimeout(I.current)),[]),Vd();const D=e.useCallback((e=>O.current===N.current?.side&&function(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return function(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){const a=t[e].x,s=t[e].y,l=t[i].x,c=t[i].y;s>r!=c>r&&n<(l-a)*(r-s)/(c-s)+a&&(o=!o)}return o}(n,t)}(e,N.current?.area)),[]);return nd.jsx(nE,{scope:r,searchRef:_,onItemEnter:e.useCallback((e=>{D(e)&&e.preventDefault()}),[D]),onItemLeave:e.useCallback((e=>{D(e)||(E.current?.focus(),k(null))}),[D]),onTriggerLeave:e.useCallback((e=>{D(e)&&e.preventDefault()}),[D]),pointerGraceTimerRef:A,onPointerGraceIntentChange:e.useCallback((e=>{N.current=e}),[]),children:nd.jsx(T,{...M,children:nd.jsx(Nd,{asChild:!0,trapped:i,onMountAutoFocus:Xu(a,(e=>{e.preventDefault(),E.current?.focus({preventScroll:!0})})),onUnmountAutoFocus:s,children:nd.jsx(Cd,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:p,onInteractOutside:f,onDismiss:h,children:nd.jsx(Ok,{asChild:!0,...w,dir:b.dir,orientation:"vertical",loop:o,currentTabStopId:C,onCurrentTabStopIdChange:k,onEntryFocus:Xu(c,(e=>{b.isUsingKeyboardRef.current||e.preventDefault()})),preventScrollOnEntryFocus:!0,children:nd.jsx(pk,{role:"menu","aria-orientation":"vertical","data-state":DE(y.open),"data-radix-menu-content":"",dir:b.dir,...v,...g,ref:S,style:{outline:"none",...g.style},onKeyDown:Xu(g.onKeyDown,(e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&P(e.key));const o=E.current;if(e.target!==o)return;if(!Pk.includes(e.key))return;e.preventDefault();const i=x().filter((e=>!e.disabled)).map((e=>e.ref.current));Mk.includes(e.key)&&i.reverse(),function(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}(i)})),onBlur:Xu(t.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(I.current),_.current="")})),onPointerMove:Xu(t.onPointerMove,LE((e=>{const t=e.target,n=R.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>R.current?"right":"left";O.current=t,R.current=e.clientX}})))})})})})})})}));oE.displayName=tE;var lE=e.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return nd.jsx(md.div,{role:"group",...r,ref:t})}));lE.displayName="MenuGroup";var cE=e.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return nd.jsx(md.div,{...r,ref:t})}));cE.displayName="MenuLabel";var uE="MenuItem",dE="menu.itemSelect",pE=e.forwardRef(((t,n)=>{const{disabled:r=!1,onSelect:o,...i}=t,a=e.useRef(null),s=Yk(uE,t.__scopeMenu),l=rE(uE,t.__scopeMenu),c=Yu(n,a),u=e.useRef(!1);return nd.jsx(fE,{...i,ref:c,disabled:r,onClick:Xu(t.onClick,(()=>{const e=a.current;if(!r&&e){const t=new CustomEvent(dE,{bubbles:!0,cancelable:!0});e.addEventListener(dE,(e=>o?.(e)),{once:!0}),gd(e,t),t.defaultPrevented?u.current=!1:s.onClose()}})),onPointerDown:e=>{t.onPointerDown?.(e),u.current=!0},onPointerUp:Xu(t.onPointerUp,(e=>{u.current||e.currentTarget?.click()})),onKeyDown:Xu(t.onKeyDown,(e=>{const t=""!==l.searchRef.current;r||t&&" "===e.key||Tk.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))})}));pE.displayName=uE;var fE=e.forwardRef(((t,n)=>{const{__scopeMenu:r,disabled:o=!1,textValue:i,...a}=t,s=rE(uE,r),l=Wk(r),c=e.useRef(null),u=Yu(n,c),[d,p]=e.useState(!1),[f,h]=e.useState("");return e.useEffect((()=>{const e=c.current;e&&h((e.textContent??"").trim())}),[a.children]),nd.jsx(Lk.ItemSlot,{scope:r,disabled:o,textValue:i??f,children:nd.jsx(Rk,{asChild:!0,...l,focusable:!o,children:nd.jsx(md.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...a,ref:u,onPointerMove:Xu(t.onPointerMove,LE((e=>{if(o)s.onItemLeave(e);else if(s.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus({preventScroll:!0})}}))),onPointerLeave:Xu(t.onPointerLeave,LE((e=>s.onItemLeave(e)))),onFocus:Xu(t.onFocus,(()=>p(!0))),onBlur:Xu(t.onBlur,(()=>p(!1)))})})})})),hE=e.forwardRef(((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return nd.jsx(CE,{scope:e.__scopeMenu,checked:n,children:nd.jsx(pE,{role:"menuitemcheckbox","aria-checked":BE(n)?"mixed":n,...o,ref:t,"data-state":jE(n),onSelect:Xu(o.onSelect,(()=>r?.(!!BE(n)||!n)),{checkForDefaultPrevented:!1})})})}));hE.displayName="MenuCheckboxItem";var mE="MenuRadioGroup",[gE,yE]=zk(mE,{value:void 0,onValueChange:()=>{}}),bE=e.forwardRef(((e,t)=>{const{value:n,onValueChange:r,...o}=e,i=cd(r);return nd.jsx(gE,{scope:e.__scopeMenu,value:n,onValueChange:i,children:nd.jsx(lE,{...o,ref:t})})}));bE.displayName=mE;var vE="MenuRadioItem",wE=e.forwardRef(((e,t)=>{const{value:n,...r}=e,o=yE(vE,e.__scopeMenu),i=n===o.value;return nd.jsx(CE,{scope:e.__scopeMenu,checked:i,children:nd.jsx(pE,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":jE(i),onSelect:Xu(r.onSelect,(()=>o.onValueChange?.(n)),{checkForDefaultPrevented:!1})})})}));wE.displayName=vE;var xE="MenuItemIndicator",[CE,kE]=zk(xE,{checked:!1}),EE=e.forwardRef(((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,i=kE(xE,n);return nd.jsx(jd,{present:r||BE(i.checked)||!0===i.checked,children:nd.jsx(md.span,{...o,ref:t,"data-state":jE(i.checked)})})}));EE.displayName=xE;var SE=e.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return nd.jsx(md.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})}));SE.displayName="MenuSeparator";var IE=e.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e,o=Hk(n);return nd.jsx(fk,{...o,...r,ref:t})}));IE.displayName="MenuArrow";var _E="MenuSub",[AE,NE]=zk(_E),OE=t=>{const{__scopeMenu:n,children:r,open:o=!1,onOpenChange:i}=t,a=Zk(_E,n),s=Hk(n),[l,c]=e.useState(null),[u,d]=e.useState(null),p=cd(i);return e.useEffect((()=>(!1===a.open&&p(!1),()=>p(!1))),[a.open,p]),nd.jsx(uk,{...s,children:nd.jsx(Xk,{scope:n,open:o,onOpenChange:p,content:u,onContentChange:d,children:nd.jsx(AE,{scope:n,contentId:ld(),triggerId:ld(),trigger:l,onTriggerChange:c,children:r})})})};OE.displayName=_E;var RE="MenuSubTrigger",TE=e.forwardRef(((t,n)=>{const r=Zk(RE,t.__scopeMenu),o=Yk(RE,t.__scopeMenu),i=NE(RE,t.__scopeMenu),a=rE(RE,t.__scopeMenu),s=e.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=a,u={__scopeMenu:t.__scopeMenu},d=e.useCallback((()=>{s.current&&window.clearTimeout(s.current),s.current=null}),[]);return e.useEffect((()=>d),[d]),e.useEffect((()=>{const e=l.current;return()=>{window.clearTimeout(e),c(null)}}),[l,c]),nd.jsx(Jk,{asChild:!0,...u,children:nd.jsx(fE,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":i.contentId,"data-state":DE(r.open),...t,ref:$u(n,i.onTriggerChange),onClick:e=>{t.onClick?.(e),t.disabled||e.defaultPrevented||(e.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:Xu(t.onPointerMove,LE((e=>{a.onItemEnter(e),e.defaultPrevented||t.disabled||r.open||s.current||(a.onPointerGraceIntentChange(null),s.current=window.setTimeout((()=>{r.onOpenChange(!0),d()}),100))}))),onPointerLeave:Xu(t.onPointerLeave,LE((e=>{d();const t=r.content?.getBoundingClientRect();if(t){const n=r.content?.dataset.side,o="right"===n,i=o?-5:5,s=t[o?"left":"right"],c=t[o?"right":"left"];a.onPointerGraceIntentChange({area:[{x:e.clientX+i,y:e.clientY},{x:s,y:t.top},{x:c,y:t.top},{x:c,y:t.bottom},{x:s,y:t.bottom}],side:n}),window.clearTimeout(l.current),l.current=window.setTimeout((()=>a.onPointerGraceIntentChange(null)),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}}))),onKeyDown:Xu(t.onKeyDown,(e=>{const n=""!==a.searchRef.current;t.disabled||n&&" "===e.key||Dk[o.dir].includes(e.key)&&(r.onOpenChange(!0),r.content?.focus(),e.preventDefault())}))})})}));TE.displayName=RE;var ME="MenuSubContent",PE=e.forwardRef(((t,n)=>{const r=qk(tE,t.__scopeMenu),{forceMount:o=r.forceMount,...i}=t,a=Zk(tE,t.__scopeMenu),s=Yk(tE,t.__scopeMenu),l=NE(ME,t.__scopeMenu),c=e.useRef(null),u=Yu(n,c);return nd.jsx(Lk.Provider,{scope:t.__scopeMenu,children:nd.jsx(jd,{present:o||a.open,children:nd.jsx(Lk.Slot,{scope:t.__scopeMenu,children:nd.jsx(sE,{id:l.contentId,"aria-labelledby":l.triggerId,...i,ref:u,align:"start",side:"rtl"===s.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{s.isUsingKeyboardRef.current&&c.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:Xu(t.onFocusOutside,(e=>{e.target!==l.trigger&&a.onOpenChange(!1)})),onEscapeKeyDown:Xu(t.onEscapeKeyDown,(e=>{s.onClose(),e.preventDefault()})),onKeyDown:Xu(t.onKeyDown,(e=>{const t=e.currentTarget.contains(e.target),n=Bk[s.dir].includes(e.key);t&&n&&(a.onOpenChange(!1),l.trigger?.focus(),e.preventDefault())}))})})})})}));function DE(e){return e?"open":"closed"}function BE(e){return"indeterminate"===e}function jE(e){return BE(e)?"indeterminate":e?"checked":"unchecked"}function LE(e){return t=>"mouse"===t.pointerType?e(t):void 0}PE.displayName=ME;var FE=Uk,VE=Jk,zE=eE,GE=oE,HE=lE,WE=cE,XE=pE,ZE=hE,$E=bE,YE=wE,UE=EE,JE=SE,KE=IE,QE=OE,qE=TE,eS=PE,tS="DropdownMenu",[nS,rS]=rd(tS,[Gk]),oS=Gk(),[iS,aS]=nS(tS),sS=t=>{const{__scopeDropdownMenu:n,children:r,dir:o,open:i,defaultOpen:a,onOpenChange:s,modal:l=!0}=t,c=oS(n),u=e.useRef(null),[d=!1,p]=ud({prop:i,defaultProp:a,onChange:s});return nd.jsx(iS,{scope:n,triggerId:ld(),triggerRef:u,contentId:ld(),open:d,onOpenChange:p,onOpenToggle:e.useCallback((()=>p((e=>!e))),[p]),modal:l,children:nd.jsx(FE,{...c,open:d,onOpenChange:p,dir:o,modal:l,children:r})})};sS.displayName=tS;var lS="DropdownMenuTrigger",cS=e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=aS(lS,n),a=oS(n);return nd.jsx(VE,{asChild:!0,...a,children:nd.jsx(md.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:$u(t,i.triggerRef),onPointerDown:Xu(e.onPointerDown,(e=>{r||0!==e.button||!1!==e.ctrlKey||(i.onOpenToggle(),i.open||e.preventDefault())})),onKeyDown:Xu(e.onKeyDown,(e=>{r||(["Enter"," "].includes(e.key)&&i.onOpenToggle(),"ArrowDown"===e.key&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())}))})})}));cS.displayName=lS;var uS=e=>{const{__scopeDropdownMenu:t,...n}=e,r=oS(t);return nd.jsx(zE,{...r,...n})};uS.displayName="DropdownMenuPortal";var dS="DropdownMenuContent",pS=e.forwardRef(((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,i=aS(dS,r),a=oS(r),s=e.useRef(!1);return nd.jsx(GE,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...o,ref:n,onCloseAutoFocus:Xu(t.onCloseAutoFocus,(e=>{s.current||i.triggerRef.current?.focus(),s.current=!1,e.preventDefault()})),onInteractOutside:Xu(t.onInteractOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;i.modal&&!r||(s.current=!0)})),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})}));pS.displayName=dS;var fS=e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=oS(n);return nd.jsx(HE,{...o,...r,ref:t})}));fS.displayName="DropdownMenuGroup";e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=oS(n);return nd.jsx(WE,{...o,...r,ref:t})})).displayName="DropdownMenuLabel";var hS=e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=oS(n);return nd.jsx(XE,{...o,...r,ref:t})}));hS.displayName="DropdownMenuItem";e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=oS(n);return nd.jsx(ZE,{...o,...r,ref:t})})).displayName="DropdownMenuCheckboxItem";var mS=e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=oS(n);return nd.jsx($E,{...o,...r,ref:t})}));mS.displayName="DropdownMenuRadioGroup";var gS=e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=oS(n);return nd.jsx(YE,{...o,...r,ref:t})}));gS.displayName="DropdownMenuRadioItem";e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=oS(n);return nd.jsx(UE,{...o,...r,ref:t})})).displayName="DropdownMenuItemIndicator";e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=oS(n);return nd.jsx(JE,{...o,...r,ref:t})})).displayName="DropdownMenuSeparator";e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=oS(n);return nd.jsx(KE,{...o,...r,ref:t})})).displayName="DropdownMenuArrow";var yS=e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=oS(n);return nd.jsx(qE,{...o,...r,ref:t})}));yS.displayName="DropdownMenuSubTrigger";var bS=e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=oS(n);return nd.jsx(eS,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})}));bS.displayName="DropdownMenuSubContent";var vS=sS,wS=cS,xS=uS,CS=pS,kS=fS,ES=hS,SS=mS,IS=gS,_S=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:i}=e,a=oS(t),[s=!1,l]=ud({prop:r,defaultProp:i,onChange:o});return nd.jsx(QE,{...a,open:s,onOpenChange:l,children:n})},AS=yS,NS=bS;function OS(e,t){return function(e,t){return new Blob([e],{type:t})}(function(e){const t=window.atob(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.charCodeAt(e);return r}(e),t)}function RS(e,t=!0){return new Promise((n=>{const r=new FileReader;r.onload=()=>{const e=r.result;t&&n(e.split(",")[1]),n(e)},r.readAsDataURL(e)}))}function TS(e){return function(e){return new Promise((t=>{const n=document.createElement("input");n.type="file",n.accept=e,n.onchange=()=>{const e=n.files?.[0];e&&t(e)},n.click()}))}(e).then(RS)}const MS=({trigger:e,setOpen:n,open:r})=>{const[i,a]=c(""),s=o(CL);return s.options.useWorkerManager?t.createElement(dx,{setOpen:n,open:r,trigger:e,title:"New Worker",description:"Create a new worker"},t.createElement("div",null,"Name:",t.createElement("br",null),t.createElement("input",{className:"styledinput",onChange:e=>{a(e.currentTarget.value)},value:i})),t.createElement("div",null,i&&t.createElement("div",null,t.createElement("button",{className:"styledbtn",onClick:()=>{s.workermanager?.new_worker({name:i}),n(!1)}},"Create")))):null},PS=({trigger:e,setOpen:n,open:r})=>{const i=o(CL),[a,s]=c(!1),l=i.workers(),u=i.worker?.uuid,d=(u?l[u]?.name:void 0)||u||"worker";return t.createElement(dx,{setOpen:n,open:r,trigger:e,title:"Export Worker",description:"Export the worker as a .fnw file"},t.createElement("div",null,t.createElement("div",null,t.createElement("input",{type:"checkbox",className:"styledcheckbox",checked:a,onChange:e=>{s(e.currentTarget.checked)}}),"Include Files"),t.createElement("button",{className:"styledbtn",onClick:async()=>{if(!i.worker)return;!function(e,t,n){const r=OS(e,n),o=URL.createObjectURL(r),i=document.createElement("a");i.href=o,i.download=t,i.click(),URL.revokeObjectURL(o),i.remove()}(await i.worker.export({withFiles:a}),d+".fnw","application/zip"),n(!1)}},"Export")))},DS=()=>{const e=o(CL).progress_state();return t.createElement("div",{className:"statusbar"},t.createElement("span",{className:"statusbar-progressbar",style:{width:Math.min(100,100*e.progress)+"%"}}),t.createElement("span",{className:"statusbar-message"},e.message))},BS=()=>{const e=o(CL),n=e.workers(),[r,i]=c(!1),[a,s]=c(!1),l=e.options.useWorkerManager&&e.workermanager&&e.workermanager.open,u=l&&Object.keys(n).length>0,d=e.worker&&e.worker.is_open,p=d&&l;return l||d?t.createElement(t.Fragment,null,t.createElement(vS,null,t.createElement(wS,{asChild:!0},t.createElement("button",{className:"styledbtn"},t.createElement(Uv,{direction:"row",spacing:1},t.createElement(Yv,null,"Worker")," ",t.createElement(zv,null)))),t.createElement(xS,null,t.createElement(CS,{className:"headermenucontent funcnodescontainer"},t.createElement(kS,null,u&&t.createElement(_S,null,t.createElement(AS,{className:"headermenuitem submenuitem"},t.createElement(Uv,{direction:"row",spacing:1},"Select",t.createElement(Jv,null))),t.createElement(xS,null,t.createElement(NS,{className:"headermenucontent funcnodescontainer",sideOffset:2,alignOffset:-5},t.createElement(SS,{value:e.worker?.uuid,onValueChange:t=>{(t=>{if("__select__"!==t&&e.workers&&e.workermanager&&n[t]){if(!n[t].active&&!window.confirm("this is an inactive worker, selecting it will start it, continue?"))return;e.workermanager.set_active(t)}})(t)}},Object.keys(n).sort(((e,t)=>{if(n[e].active&&!n[t].active)return-1;if(!n[e].active&&n[t].active)return 1;const r=n[e].name||e,o=n[t].name||t;return r.localeCompare(o)})).map((r=>t.createElement(IS,{className:"headermenuitem workerselectoption"+(n[r]?.active?" active":" inactive")+" headermenuitem",key:r,value:r,disabled:r===e.worker?.uuid},n[r]?.name||r))))))),d&&t.createElement(t.Fragment,null,p&&t.createElement(ES,{className:"headermenuitem",onClick:()=>{if(e.worker)return e.workermanager?void e.workermanager?.restart_worker(e.worker.uuid):e.logger.error("no workermanager")}},"Restart"),t.createElement(ES,{className:"headermenuitem",onClick:()=>{e.worker&&e.worker.stop()}},"Stop"),t.createElement(ES,{className:"headermenuitem",onClick:()=>s(!0)},"Export"),t.createElement(ES,{className:"headermenuitem",onClick:async()=>{if(!e.worker)return;if(!window.confirm("Updateing the worker might replace the current nodespace, continue?"))return;const t=await TS(".fnw");e.worker.update_from_export(t)}},"Update")),l&&t.createElement(t.Fragment,null,t.createElement(ES,{className:"headermenuitem",onClick:()=>i(!0)},"New")))))),t.createElement(MS,{open:r,setOpen:i}),t.createElement(PS,{open:a,setOpen:s})):null},jS=()=>{const e=o(CL);return t.createElement(t.Fragment,null,t.createElement(vS,null,t.createElement(wS,{asChild:!0},t.createElement("button",{className:"styledbtn"},t.createElement(Uv,{direction:"row",spacing:1},t.createElement(Yv,null,"Nodespace")," ",t.createElement(zv,null)))),t.createElement(xS,null,t.createElement(CS,{className:"headermenucontent funcnodescontainer"},t.createElement(kS,null,t.createElement(ES,{className:"headermenuitem",onClick:()=>{window.confirm("Are you sure you want to start a new flow?")&&e.worker?.clear()}},"New"),t.createElement(ES,{className:"headermenuitem",onClick:async()=>{const t=await(e.worker?.save());if(!t)return;const n=new Blob([JSON.stringify(t)],{type:"application/json"}),r=URL.createObjectURL(n),o=document.createElement("a");o.href=r,o.download="flow.json",o.click(),URL.revokeObjectURL(r),o.remove()}},"Save"),t.createElement(ES,{className:"headermenuitem",onClick:async()=>{const t=document.createElement("input");t.type="file",t.accept=".json",t.onchange=async t=>{const n=t.target.files?.[0];if(!n)return;const r=new FileReader;r.onload=async t=>{const n=t.target?.result;if(!n)return;const r=JSON.parse(n);await(e.worker?.load(r))},r.readAsText(n)},t.click()}},"Load"))))))},LS=({...e})=>{const n=o(CL),r=n.workerstate();return Object.keys(e).length>0&&n.logger.debug("headerprops",e),t.createElement("div",{className:"funcnodesreactflowheader"},t.createElement("div",{className:"headerelement"},t.createElement(DS,null)),e.showmenu&&t.createElement(t.Fragment,null,t.createElement("div",{className:"headerelement"},t.createElement(BS,null)),n.worker&&r.is_open&&t.createElement("div",{className:"headerelement"},t.createElement(jS,null))))};const FS=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,VS=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,zS={};function GS(e,t){return(zS.jsx?VS:FS).test(e)}const HS=/[ \t\n\f\r]/g;function WS(e){return""===e.replace(HS,"")}class XS{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}}function ZS(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new XS(n,r,t)}function $S(e){return e.toLowerCase()}XS.prototype.property={},XS.prototype.normal={},XS.prototype.space=null;class YS{constructor(e,t){this.property=e,this.attribute=t}}YS.prototype.space=null,YS.prototype.boolean=!1,YS.prototype.booleanish=!1,YS.prototype.overloadedBoolean=!1,YS.prototype.number=!1,YS.prototype.commaSeparated=!1,YS.prototype.spaceSeparated=!1,YS.prototype.commaOrSpaceSeparated=!1,YS.prototype.mustUseProperty=!1,YS.prototype.defined=!1;let US=0;const JS=rI(),KS=rI(),QS=rI(),qS=rI(),eI=rI(),tI=rI(),nI=rI();function rI(){return 2**++US}var oI=Object.freeze({__proto__:null,boolean:JS,booleanish:KS,commaOrSpaceSeparated:nI,commaSeparated:tI,number:qS,overloadedBoolean:QS,spaceSeparated:eI});const iI=Object.keys(oI);class aI extends YS{constructor(e,t,n,r){let o=-1;if(super(e,t),sI(this,"space",r),"number"==typeof n)for(;++o<iI.length;){const e=iI[o];sI(this,iI[o],(n&oI[e])===oI[e])}}}function sI(e,t,n){n&&(e[t]=n)}aI.prototype.defined=!0;const lI={}.hasOwnProperty;function cI(e){const t={},n={};let r;for(r in e.properties)if(lI.call(e.properties,r)){const o=e.properties[r],i=new aI(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[$S(r)]=r,n[$S(i.attribute)]=r}return new XS(t,n,e.space)}const uI=cI({space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),dI=cI({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function pI(e,t){return t in e?e[t]:t}function fI(e,t){return pI(e,t.toLowerCase())}const hI=cI({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:fI,properties:{xmlns:null,xmlnsXLink:null}}),mI=cI({transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:KS,ariaAutoComplete:null,ariaBusy:KS,ariaChecked:KS,ariaColCount:qS,ariaColIndex:qS,ariaColSpan:qS,ariaControls:eI,ariaCurrent:null,ariaDescribedBy:eI,ariaDetails:null,ariaDisabled:KS,ariaDropEffect:eI,ariaErrorMessage:null,ariaExpanded:KS,ariaFlowTo:eI,ariaGrabbed:KS,ariaHasPopup:null,ariaHidden:KS,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:eI,ariaLevel:qS,ariaLive:null,ariaModal:KS,ariaMultiLine:KS,ariaMultiSelectable:KS,ariaOrientation:null,ariaOwns:eI,ariaPlaceholder:null,ariaPosInSet:qS,ariaPressed:KS,ariaReadOnly:KS,ariaRelevant:null,ariaRequired:KS,ariaRoleDescription:eI,ariaRowCount:qS,ariaRowIndex:qS,ariaRowSpan:qS,ariaSelected:KS,ariaSetSize:qS,ariaSort:null,ariaValueMax:qS,ariaValueMin:qS,ariaValueNow:qS,ariaValueText:null,role:null}}),gI=cI({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:fI,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:tI,acceptCharset:eI,accessKey:eI,action:null,allow:null,allowFullScreen:JS,allowPaymentRequest:JS,allowUserMedia:JS,alt:null,as:null,async:JS,autoCapitalize:null,autoComplete:eI,autoFocus:JS,autoPlay:JS,blocking:eI,capture:null,charSet:null,checked:JS,cite:null,className:eI,cols:qS,colSpan:null,content:null,contentEditable:KS,controls:JS,controlsList:eI,coords:qS|tI,crossOrigin:null,data:null,dateTime:null,decoding:null,default:JS,defer:JS,dir:null,dirName:null,disabled:JS,download:QS,draggable:KS,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:JS,formTarget:null,headers:eI,height:qS,hidden:JS,high:qS,href:null,hrefLang:null,htmlFor:eI,httpEquiv:eI,id:null,imageSizes:null,imageSrcSet:null,inert:JS,inputMode:null,integrity:null,is:null,isMap:JS,itemId:null,itemProp:eI,itemRef:eI,itemScope:JS,itemType:eI,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:JS,low:qS,manifest:null,max:null,maxLength:qS,media:null,method:null,min:null,minLength:qS,multiple:JS,muted:JS,name:null,nonce:null,noModule:JS,noValidate:JS,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:JS,optimum:qS,pattern:null,ping:eI,placeholder:null,playsInline:JS,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:JS,referrerPolicy:null,rel:eI,required:JS,reversed:JS,rows:qS,rowSpan:qS,sandbox:eI,scope:null,scoped:JS,seamless:JS,selected:JS,shadowRootClonable:JS,shadowRootDelegatesFocus:JS,shadowRootMode:null,shape:null,size:qS,sizes:null,slot:null,span:qS,spellCheck:KS,src:null,srcDoc:null,srcLang:null,srcSet:null,start:qS,step:null,style:null,tabIndex:qS,target:null,title:null,translate:null,type:null,typeMustMatch:JS,useMap:null,value:KS,width:qS,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:eI,axis:null,background:null,bgColor:null,border:qS,borderColor:null,bottomMargin:qS,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:JS,declare:JS,event:null,face:null,frame:null,frameBorder:null,hSpace:qS,leftMargin:qS,link:null,longDesc:null,lowSrc:null,marginHeight:qS,marginWidth:qS,noResize:JS,noHref:JS,noShade:JS,noWrap:JS,object:null,profile:null,prompt:null,rev:null,rightMargin:qS,rules:null,scheme:null,scrolling:KS,standby:null,summary:null,text:null,topMargin:qS,valueType:null,version:null,vAlign:null,vLink:null,vSpace:qS,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:JS,disableRemotePlayback:JS,prefix:null,property:null,results:qS,security:null,unselectable:null}}),yI=cI({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:pI,properties:{about:nI,accentHeight:qS,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:qS,amplitude:qS,arabicForm:null,ascent:qS,attributeName:null,attributeType:null,azimuth:qS,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:qS,by:null,calcMode:null,capHeight:qS,className:eI,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:qS,diffuseConstant:qS,direction:null,display:null,dur:null,divisor:qS,dominantBaseline:null,download:JS,dx:null,dy:null,edgeMode:null,editable:null,elevation:qS,enableBackground:null,end:null,event:null,exponent:qS,externalResourcesRequired:null,fill:null,fillOpacity:qS,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:tI,g2:tI,glyphName:tI,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:qS,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:qS,horizOriginX:qS,horizOriginY:qS,id:null,ideographic:qS,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:qS,k:qS,k1:qS,k2:qS,k3:qS,k4:qS,kernelMatrix:nI,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:qS,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:qS,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:qS,overlineThickness:qS,paintOrder:null,panose1:null,path:null,pathLength:qS,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:eI,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:qS,pointsAtY:qS,pointsAtZ:qS,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:nI,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:nI,rev:nI,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:nI,requiredFeatures:nI,requiredFonts:nI,requiredFormats:nI,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:qS,specularExponent:qS,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:qS,strikethroughThickness:qS,string:null,stroke:null,strokeDashArray:nI,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:qS,strokeOpacity:qS,strokeWidth:null,style:null,surfaceScale:qS,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:nI,tabIndex:qS,tableValues:null,target:null,targetX:qS,targetY:qS,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:nI,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:qS,underlineThickness:qS,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:qS,values:null,vAlphabetic:qS,vMathematical:qS,vectorEffect:null,vHanging:qS,vIdeographic:qS,version:null,vertAdvY:qS,vertOriginX:qS,vertOriginY:qS,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:qS,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),bI=/^data[-\w.:]+$/i,vI=/-[a-z]/g,wI=/[A-Z]/g;function xI(e){return"-"+e.toLowerCase()}function CI(e){return e.charAt(1).toUpperCase()}const kI={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},EI=ZS([dI,uI,hI,mI,gI],"html"),SI=ZS([dI,uI,hI,mI,yI],"svg");var II,_I,AI,NI={};var OI=function(){if(AI)return NI;AI=1;var e=NI&&NI.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(NI,"__esModule",{value:!0}),NI.default=function(e,n){var r=null;if(!e||"string"!=typeof e)return r;var o=(0,t.default)(e),i="function"==typeof n;return o.forEach((function(e){if("declaration"===e.type){var t=e.property,o=e.value;i?n(t,o,e):o&&((r=r||{})[t]=o)}})),r};var t=e(function(){if(_I)return II;_I=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,s=/^\s+|\s+$/g,l="";function c(e){return e?e.replace(s,l):l}return II=function(s,u){if("string"!=typeof s)throw new TypeError("First argument must be a string");if(!s)return[];u=u||{};var d=1,p=1;function f(e){var n=e.match(t);n&&(d+=n.length);var r=e.lastIndexOf("\n");p=~r?e.length-r:p+e.length}function h(){var e={line:d,column:p};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:d,column:p},this.source=u.source}function g(e){var t=new Error(u.source+":"+d+":"+p+": "+e);if(t.reason=e,t.filename=u.source,t.line=d,t.column=p,t.source=s,!u.silent)throw t}function y(e){var t=e.exec(s);if(t){var n=t[0];return f(n),s=s.slice(n.length),t}}function b(){y(n)}function v(e){var t;for(e=e||[];t=w();)!1!==t&&e.push(t);return e}function w(){var e=h();if("/"==s.charAt(0)&&"*"==s.charAt(1)){for(var t=2;l!=s.charAt(t)&&("*"!=s.charAt(t)||"/"!=s.charAt(t+1));)++t;if(t+=2,l===s.charAt(t-1))return g("End of comment missing");var n=s.slice(2,t-2);return p+=2,f(n),s=s.slice(t),p+=2,e({type:"comment",comment:n})}}function x(){var t=h(),n=y(r);if(n){if(w(),!y(o))return g("property missing ':'");var s=y(i),u=t({type:"declaration",property:c(n[0].replace(e,l)),value:s?c(s[0].replace(e,l)):l});return y(a),u}}return m.prototype.content=s,b(),function(){var e,t=[];for(v(t);e=x();)!1!==e&&(t.push(e),v(t));return t}()},II}());return NI}(),RI=S(OI),TI=RI.default||RI;const MI=DI("end"),PI=DI("start");function DI(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function BI(e){return e&&"object"==typeof e?"position"in e||"type"in e?LI(e.position):"start"in e||"end"in e?LI(e):"line"in e||"column"in e?jI(e):"":""}function jI(e){return FI(e&&e.line)+":"+FI(e&&e.column)}function LI(e){return jI(e&&e.start)+"-"+jI(e&&e.end)}function FI(e){return e&&"number"==typeof e?e:1}class VI extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",o={},i=!1;if(t&&(o="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!o.cause&&e&&(i=!0,r=e.message,o.cause=e),!o.ruleId&&!o.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?o.ruleId=n:(o.source=n.slice(0,e),o.ruleId=n.slice(e+1))}if(!o.place&&o.ancestors&&o.ancestors){const e=o.ancestors[o.ancestors.length-1];e&&(o.place=e.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=r,this.line=a?a.line:void 0,this.name=BI(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=i&&o.cause&&"string"==typeof o.cause.stack?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}VI.prototype.file="",VI.prototype.name="",VI.prototype.reason="",VI.prototype.message="",VI.prototype.stack="",VI.prototype.column=void 0,VI.prototype.line=void 0,VI.prototype.ancestors=void 0,VI.prototype.cause=void 0,VI.prototype.fatal=void 0,VI.prototype.place=void 0,VI.prototype.ruleId=void 0,VI.prototype.source=void 0;const zI={}.hasOwnProperty,GI=new Map,HI=/[A-Z]/g,WI=/-([a-z])/g,XI=new Set(["table","tbody","thead","tfoot","tr"]),ZI=new Set(["td","th"]),$I="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function YI(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return n;function n(n,r,o,i){const a=Array.isArray(o.children),s=PI(n);return t(r,o,i,a,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return r;function r(e,r,o,i){const a=Array.isArray(o.children)?n:t;return i?a(r,o,i):a(r,o)}}(0,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?SI:EI,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},i=UI(o,e,void 0);return i&&"string"!=typeof i?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function UI(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(o=SI,e.schema=o);e.ancestors.push(t);const i=e_(e,t.tagName,!1),a=function(e,t){const n={};let r,o;for(o in t.properties)if("children"!==o&&zI.call(t.properties,o)){const i=qI(e,o,t.properties[o]);if(i){const[o,a]=i;e.tableCellAlignToStyle&&"align"===o&&"string"==typeof a&&ZI.has(t.tagName)?r=a:n[o]=a}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let s=QI(e,t);XI.has(t.tagName)&&(s=s.filter((function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&WS(t.value):WS(t));var t})));return JI(e,a,i,t),KI(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}t_(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.name&&"html"===r.space&&(o=SI,e.schema=o);e.ancestors.push(t);const i=null===t.name?e.Fragment:e_(e,t.name,!0),a=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];t.type;const o=t.expression;o.type;const i=o.properties[0];i.type,Object.assign(n,e.evaluater.evaluateExpression(i.argument))}else t_(e,t.position);else{const o=r.name;let i;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];t.type,i=e.evaluater.evaluateExpression(t.expression)}else t_(e,t.position);else i=null===r.value||r.value;n[o]=i}return n}(e,t),s=QI(e,t);return JI(e,a,i,t),KI(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);t_(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return KI(r,QI(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function JI(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function KI(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function QI(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:GI;for(;++r<t.children.length;){const i=t.children[r];let a;if(e.passKeys){const e="element"===i.type?i.tagName:"mdxJsxFlowElement"===i.type||"mdxJsxTextElement"===i.type?i.name:void 0;if(e){const t=o.get(e)||0;a=e+"-"+t,o.set(e,t+1)}}const s=UI(e,i,a);void 0!==s&&n.push(s)}return n}function qI(e,t,n){const r=function(e,t){const n=$S(t);let r=t,o=YS;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&bI.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(vI,CI);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!vI.test(e)){let n=e.replace(wI,xI);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=aI}return new o(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(e){const t={};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}(n):function(e){return e.join(" ").trim()}(n)),"style"===r.property){let t="object"==typeof n?n:function(e,t){const n={};try{TI(t,r)}catch(t){if(!e.ignoreInvalidStyle){const n=t,r=new VI("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=$I+"#cannot-parse-style-attribute",r}}return n;function r(e,t){let r=e;"--"!==r.slice(0,2)&&("-ms-"===r.slice(0,4)&&(r="ms-"+r.slice(4)),r=r.replace(WI,r_)),n[r]=t}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)zI.call(e,n)&&(t[n_(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?kI[r.property]||r.property:r.attribute,n]}}function e_(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,o=-1;for(;++o<e.length;){const t=GS(e[o])?{type:"Identifier",name:e[o]}:{type:"Literal",value:e[o]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(o&&"Literal"===t.type),optional:!1}:t}r=n}else r=GS(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return zI.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);t_(e)}function t_(e,t){const n=new VI("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=$I+"#cannot-handle-mdx-estrees-without-createevaluater",n}function n_(e){let t=e.replace(HI,o_);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function r_(e,t){return t.toUpperCase()}function o_(e){return"-"+e.toLowerCase()}const i_={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},a_={};function s_(e,t){return l_(e,"boolean"!=typeof a_.includeImageAlt||a_.includeImageAlt,"boolean"!=typeof a_.includeHtml||a_.includeHtml)}function l_(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return c_(e.children,t,n)}return Array.isArray(e)?c_(e,t,n):""}function c_(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=l_(e[o],t,n);return r.join("")}const u_=document.createElement("i");function d_(e){const t="&"+e+";";u_.innerHTML=t;const n=u_.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}function p_(e,t,n,r){const o=e.length;let i,a=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)i=Array.from(r),i.unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);a<r.length;)i=r.slice(a,a+1e4),i.unshift(t,0),e.splice(...i),a+=1e4,t+=1e4}function f_(e,t){return e.length>0?(p_(e,e.length,0,t),e):t}const h_={}.hasOwnProperty;function m_(e){const t={};let n=-1;for(;++n<e.length;)g_(t,e[n]);return t}function g_(e,t){let n;for(n in t){const r=(h_.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){h_.call(r,i)||(r[i]=[]);const e=o[i];y_(r[i],Array.isArray(e)?e:e?[e]:[])}}}function y_(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);p_(e,0,0,r)}function b_(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}function v_(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const w_=T_(/[A-Za-z]/),x_=T_(/[\dA-Za-z]/),C_=T_(/[#-'*+\--9=?A-Z^-~]/);function k_(e){return null!==e&&(e<32||127===e)}const E_=T_(/\d/),S_=T_(/[\dA-Fa-f]/),I_=T_(/[!-/:-@[-`{-~]/);function __(e){return null!==e&&e<-2}function A_(e){return null!==e&&(e<0||32===e)}function N_(e){return-2===e||-1===e||32===e}const O_=T_(/\p{P}|\p{S}/u),R_=T_(/\s/);function T_(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function M_(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let a="";if(37===i&&x_(e.charCodeAt(n+1))&&x_(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(a=String.fromCharCode(i));else if(i>55295&&i<57344){const t=e.charCodeAt(n+1);i<56320&&t>56319&&t<57344?(a=String.fromCharCode(i,t),o=1):a="�"}else a=String.fromCharCode(i);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function P_(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return function(r){if(N_(r))return e.enter(n),a(r);return t(r)};function a(r){return N_(r)&&i++<o?(e.consume(r),a):(e.exit(n),t(r))}}const D_={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,(function(n){if(null===n)return void e.consume(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),P_(e,t,"linePrefix")}),(function(t){return e.enter("paragraph"),r(t)}));let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):__(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),o)}}};const B_={tokenize:function(e){const t=this,n=[];let r,o,i,a=0;return s;function s(r){if(a<n.length){const o=n[a];return t.containerState=o[1],e.attempt(o[0].continuation,l,c)(r)}return c(r)}function l(e){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&b();const n=t.events.length;let o,i=n;for(;i--;)if("exit"===t.events[i][0]&&"chunkFlow"===t.events[i][1].type){o=t.events[i][1].end;break}y(a);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return p_(t.events,i+1,0,t.events.slice(n)),t.events.length=s,c(e)}return s(e)}function c(o){if(a===n.length){if(!r)return p(o);if(r.currentConstruct&&r.currentConstruct.concrete)return h(o);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(j_,u,d)(o)}function u(e){return r&&b(),y(a),p(e)}function d(e){return t.parser.lazy[t.now().line]=a!==n.length,i=t.now().offset,h(e)}function p(n){return t.containerState={},e.attempt(j_,f,h)(n)}function f(e){return a++,n.push([t.currentConstruct,t.containerState]),p(e)}function h(n){return null===n?(r&&b(),y(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:o}),m(n))}function m(n){return null===n?(g(e.exit("chunkFlow"),!0),y(0),void e.consume(n)):__(n)?(e.consume(n),g(e.exit("chunkFlow")),a=0,t.interrupt=void 0,s):(e.consume(n),m)}function g(e,n){const s=t.sliceStream(e);if(n&&s.push(null),e.previous=o,o&&(o.next=e),o=e,r.defineSkip(e.start),r.write(s),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<i&&(!r.events[e][1].end||r.events[e][1].end.offset>i))return;const n=t.events.length;let o,s,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(o){s=t.events[l][1].end;break}o=!0}for(y(a),e=n;e<t.events.length;)t.events[e][1].end={...s},e++;p_(t.events,l+1,0,t.events.slice(n)),t.events.length=e}}function y(r){let o=n.length;for(;o-- >r;){const r=n[o];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function b(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}},j_={tokenize:function(e,t,n){return P_(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function L_(e){return null===e||A_(e)||R_(e)?1:O_(e)?2:void 0}function F_(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const V_={name:"attention",resolveAll:function(e,t){let n,r,o,i,a,s,l,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(n=u;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;s=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const d={...e[n][1].end},p={...e[u][1].start};z_(d,-s),z_(p,s),i={type:s>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},a={type:s>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:p},o={type:s>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:s>1?"strong":"emphasis",start:{...i.start},end:{...a.end}},e[n][1].end={...i.start},e[u][1].start={...a.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=f_(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=f_(l,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",o,t]]),l=f_(l,F_(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=f_(l,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=f_(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,p_(e,n-1,u-n+3,l),u=n+l.length-c-2;break}u=-1;for(;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=L_(r);let i;return function(t){return i=t,e.enter("attentionSequence"),a(t)};function a(s){if(s===i)return e.consume(s),a;const l=e.exit("attentionSequence"),c=L_(s),u=!c||2===c&&o||n.includes(s),d=!o||2===o&&c||n.includes(r);return l._open=Boolean(42===i?u:u&&(o||!d)),l._close=Boolean(42===i?d:d&&(c||!u)),t(s)}}};function z_(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const G_={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o};function o(t){return w_(t)?(e.consume(t),i):64===t?n(t):l(t)}function i(e){return 43===e||45===e||46===e||x_(e)?(r=1,a(e)):l(e)}function a(t){return 58===t?(e.consume(t),r=0,s):(43===t||45===t||46===t||x_(t))&&r++<32?(e.consume(t),a):(r=0,l(t))}function s(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||k_(r)?n(r):(e.consume(r),s)}function l(t){return 64===t?(e.consume(t),c):C_(t)?(e.consume(t),l):n(t)}function c(e){return x_(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,c):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):d(n)}function d(t){if((45===t||x_(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}};const H_={partial:!0,tokenize:function(e,t,n){return function(t){return N_(t)?P_(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||__(e)?t(e):n(e)}}};const W_={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(N_(t))return P_(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return o(t)};function o(r){return e.attempt(W_,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),o}return n(t)};function o(n){return N_(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const X_={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return I_(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const Z_={name:"characterReference",tokenize:function(e,t,n){const r=this;let o,i,a=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),o=31,i=x_,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,i=S_,c):(e.enter("characterReferenceValue"),o=7,i=E_,c(t))}function c(s){if(59===s&&a){const o=e.exit("characterReferenceValue");return i!==x_||d_(r.sliceSerialize(o))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(s)}return i(s)&&a++<o?(e.consume(s),c):n(s)}}};const $_={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(null===t)return n(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},Y_={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,o={partial:!0,tokenize:function(e,t,n){let o=0;return a;function a(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l}function l(t){return e.enter("codeFencedFence"),N_(t)?P_(e,c,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):c(t)}function c(t){return t===i?(e.enter("codeFencedFenceSequence"),u(t)):n(t)}function u(t){return t===i?(o++,e.consume(t),u):o>=s?(e.exit("codeFencedFenceSequence"),N_(t)?P_(e,d,"whitespace")(t):d(t)):n(t)}function d(r){return null===r||__(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let i,a=0,s=0;return function(t){return function(t){const n=r.events[r.events.length-1];return a=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,i=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===i?(s++,e.consume(t),l):s<3?n(t):(e.exit("codeFencedFenceSequence"),N_(t)?P_(e,c,"whitespace")(t):c(t))}function c(n){return null===n||__(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check($_,f,b)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||__(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):N_(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),P_(e,d,"whitespace")(t)):96===t&&t===i?n(t):(e.consume(t),u)}function d(t){return null===t||__(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(t))}function p(t){return null===t||__(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===i?n(t):(e.consume(t),p)}function f(t){return e.attempt(o,b,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return a>0&&N_(t)?P_(e,g,"linePrefix",a+1)(t):g(t)}function g(t){return null===t||__(t)?e.check($_,f,b)(t):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||__(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),y)}function b(n){return e.exit("codeFenced"),t(n)}}};const U_={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),P_(e,o,"linePrefix",5)(t)};function o(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?i(e):n(e)}function i(t){return null===t?s(t):__(t)?e.attempt(J_,i,s)(t):(e.enter("codeFlowValue"),a(t))}function a(t){return null===t||__(t)?(e.exit("codeFlowValue"),i(t)):(e.consume(t),a)}function s(n){return e.exit("codeIndented"),t(n)}}},J_={partial:!0,tokenize:function(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):__(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):P_(e,i,"linePrefix",5)(t)}function i(e){const i=r.events[r.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(e):__(e)?o(e):n(e)}}};const K_={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,o=3;if(!("lineEnding"!==e[o][1].type&&"space"!==e[o][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=o;++t<r;)if("codeTextData"===e[t][1].type){e[o][1].type="codeTextPadding",e[r][1].type="codeTextPadding",o+=2,r-=2;break}t=o-1,r++;for(;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,o,i=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),a(t)};function a(t){return 96===t?(e.consume(t),i++,a):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):96===t?(o=e.enter("codeTextSequence"),r=0,c(t)):__(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||__(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),l)}function c(n){return 96===n?(e.consume(n),r++,c):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(o.type="codeTextData",l(n))}}};class Q_{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=null==t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const o=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&q_(this.left,n),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),q_(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),q_(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);q_(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);q_(this.left,t.reverse())}}}function q_(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function eA(e){const t={};let n,r,o,i,a,s,l,c=-1;const u=new Q_(e);for(;++c<u.length;){for(;c in t;)c=t[c];if(n=u.get(c),c&&"chunkFlow"===n[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&(s=n[1]._tokenizer.events,o=0,o<s.length&&"lineEndingBlank"===s[o][1].type&&(o+=2),o<s.length&&"content"===s[o][1].type))for(;++o<s.length&&"content"!==s[o][1].type;)"chunkText"===s[o][1].type&&(s[o][1]._isInFirstContentOfListItem=!0,o++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,tA(u,c)),c=t[c],l=!0);else if(n[1]._container){for(o=c,r=void 0;o--;)if(i=u.get(o),"lineEnding"===i[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(r&&(u.get(r)[1].type="lineEndingBlank"),i[1].type="lineEnding",r=o);else if("linePrefix"!==i[1].type)break;r&&(n[1].end={...u.get(r)[1].start},a=u.slice(r,c),a.unshift(n),u.splice(r,c-r+1,a))}}return p_(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function tA(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[],a=n._tokenizer||r.parser[n.contentType](n.start),s=a.events,l=[],c={};let u,d,p=-1,f=n,h=0,m=0;const g=[m];for(;f;){for(;e.get(++o)[1]!==f;);i.push(o),f._tokenizer||(u=r.sliceStream(f),f.next||u.push(null),d&&a.defineSkip(f.start),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++p<s.length;)"exit"===s[p][0]&&"enter"===s[p-1][0]&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(m=p+1,g.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(a.events=[],f?(f._tokenizer=void 0,f.previous=void 0):g.pop(),p=g.length;p--;){const t=s.slice(g[p],g[p+1]),n=i.pop();l.push([n,n+t.length-1]),e.splice(n,2,t)}for(l.reverse(),p=-1;++p<l.length;)c[h+l[p][0]]=h+l[p][1],h+=l[p][1]-l[p][0]-1;return c}const nA={resolve:function(e){return eA(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?o(t):__(t)?e.check(rA,i,o)(t):(e.consume(t),r)}function o(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function i(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},rA={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),P_(e,o,"linePrefix")};function o(o){if(null===o||__(o))return n(o);const i=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}};function oA(e,t,n,r,o,i,a,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(t){if(60===t)return e.enter(r),e.enter(o),e.enter(i),e.consume(t),e.exit(i),d;if(null===t||32===t||41===t||k_(t))return n(t);return e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(t)};function d(n){return 62===n?(e.enter(i),e.consume(n),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(n))}function p(t){return 62===t?(e.exit("chunkString"),e.exit(s),d(t)):null===t||60===t||__(t)?n(t):(e.consume(t),92===t?f:p)}function f(t){return 60===t||62===t||92===t?(e.consume(t),p):p(t)}function h(o){return u||null!==o&&41!==o&&!A_(o)?u<c&&40===o?(e.consume(o),u++,h):41===o?(e.consume(o),u--,h):null===o||32===o||40===o||k_(o)?n(o):(e.consume(o),92===o?m:h):(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(o))}function m(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function iA(e,t,n,r,o,i){const a=this;let s,l=0;return function(t){return e.enter(r),e.enter(o),e.consume(t),e.exit(o),e.enter(i),c};function c(d){return l>999||null===d||91===d||93===d&&!s||94===d&&!l&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):93===d?(e.exit(i),e.enter(o),e.consume(d),e.exit(o),e.exit(r),t):__(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||__(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),s||(s=!N_(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function aA(e,t,n,r,o,i){let a;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(o),e.consume(t),e.exit(o),a=40===t?41:t,s;return n(t)};function s(n){return n===a?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(i),l(n))}function l(t){return t===a?(e.exit(i),s(a)):null===t?n(t):__(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),P_(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===a||null===t||__(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===a||92===t?(e.consume(t),c):c(t)}}function sA(e,t){let n;return function r(o){if(__(o))return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r;if(N_(o))return P_(e,r,n?"linePrefix":"lineSuffix")(o);return t(o)}}const lA={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(t){return e.enter("definition"),function(t){return iA.call(r,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function i(t){return o=v_(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a):n(t)}function a(t){return A_(t)?sA(e,s)(t):s(t)}function s(t){return oA(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(cA,c,c)(t)}function c(t){return N_(t)?P_(e,u,"whitespace")(t):u(t)}function u(i){return null===i||__(i)?(e.exit("definition"),r.parser.defined.push(o),t(i)):n(i)}}},cA={partial:!0,tokenize:function(e,t,n){return function(t){return A_(t)?sA(e,r)(t):n(t)};function r(t){return aA(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return N_(t)?P_(e,i,"whitespace")(t):i(t)}function i(e){return null===e||__(e)?t(e):n(e)}}};const uA={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return __(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const dA={name:"headingAtx",resolve:function(e,t){let n,r,o=e.length-2,i=3;"whitespace"===e[i][1].type&&(i+=2);o-2>i&&"whitespace"===e[o][1].type&&(o-=2);"atxHeadingSequence"===e[o][1].type&&(i===o-1||o-4>i&&"whitespace"===e[o-2][1].type)&&(o-=i+1===o?2:4);o>i&&(n={type:"atxHeadingText",start:e[i][1].start,end:e[o][1].end},r={type:"chunkText",start:e[i][1].start,end:e[o][1].end,contentType:"text"},p_(e,i,o-i+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),o(t)}(t)};function o(t){return 35===t&&r++<6?(e.consume(t),o):null===t||A_(t)?(e.exit("atxHeadingSequence"),i(t)):n(t)}function i(n){return 35===n?(e.enter("atxHeadingSequence"),a(n)):null===n||__(n)?(e.exit("atxHeading"),t(n)):N_(n)?P_(e,i,"whitespace")(n):(e.enter("atxHeadingText"),s(n))}function a(t){return 35===t?(e.consume(t),a):(e.exit("atxHeadingSequence"),i(t))}function s(t){return null===t||35===t||A_(t)?(e.exit("atxHeadingText"),i(t)):(e.consume(t),s)}}};const pA=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],fA=["pre","script","style","textarea"],hA={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},tokenize:function(e,t,n){const r=this;let o,i,a,s,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(s){return 33===s?(e.consume(s),u):47===s?(e.consume(s),i=!0,f):63===s?(e.consume(s),o=3,r.interrupt?t:P):w_(s)?(e.consume(s),a=String.fromCharCode(s),h):n(s)}function u(i){return 45===i?(e.consume(i),o=2,d):91===i?(e.consume(i),o=5,s=0,p):w_(i)?(e.consume(i),o=4,r.interrupt?t:P):n(i)}function d(o){return 45===o?(e.consume(o),r.interrupt?t:P):n(o)}function p(o){const i="CDATA[";return o===i.charCodeAt(s++)?(e.consume(o),6===s?r.interrupt?t:I:p):n(o)}function f(t){return w_(t)?(e.consume(t),a=String.fromCharCode(t),h):n(t)}function h(s){if(null===s||47===s||62===s||A_(s)){const l=47===s,c=a.toLowerCase();return l||i||!fA.includes(c)?pA.includes(a.toLowerCase())?(o=6,l?(e.consume(s),m):r.interrupt?t(s):I(s)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):i?g(s):y(s)):(o=1,r.interrupt?t(s):I(s))}return 45===s||x_(s)?(e.consume(s),a+=String.fromCharCode(s),h):n(s)}function m(o){return 62===o?(e.consume(o),r.interrupt?t:I):n(o)}function g(t){return N_(t)?(e.consume(t),g):E(t)}function y(t){return 47===t?(e.consume(t),E):58===t||95===t||w_(t)?(e.consume(t),b):N_(t)?(e.consume(t),y):E(t)}function b(t){return 45===t||46===t||58===t||95===t||x_(t)?(e.consume(t),b):v(t)}function v(t){return 61===t?(e.consume(t),w):N_(t)?(e.consume(t),v):y(t)}function w(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,x):N_(t)?(e.consume(t),w):C(t)}function x(t){return t===l?(e.consume(t),l=null,k):null===t||__(t)?n(t):(e.consume(t),x)}function C(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||A_(t)?v(t):(e.consume(t),C)}function k(e){return 47===e||62===e||N_(e)?y(e):n(e)}function E(t){return 62===t?(e.consume(t),S):n(t)}function S(t){return null===t||__(t)?I(t):N_(t)?(e.consume(t),S):n(t)}function I(t){return 45===t&&2===o?(e.consume(t),O):60===t&&1===o?(e.consume(t),R):62===t&&4===o?(e.consume(t),D):63===t&&3===o?(e.consume(t),P):93===t&&5===o?(e.consume(t),M):!__(t)||6!==o&&7!==o?null===t||__(t)?(e.exit("htmlFlowData"),_(t)):(e.consume(t),I):(e.exit("htmlFlowData"),e.check(mA,B,_)(t))}function _(t){return e.check(gA,A,B)(t)}function A(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),N}function N(t){return null===t||__(t)?_(t):(e.enter("htmlFlowData"),I(t))}function O(t){return 45===t?(e.consume(t),P):I(t)}function R(t){return 47===t?(e.consume(t),a="",T):I(t)}function T(t){if(62===t){const n=a.toLowerCase();return fA.includes(n)?(e.consume(t),D):I(t)}return w_(t)&&a.length<8?(e.consume(t),a+=String.fromCharCode(t),T):I(t)}function M(t){return 93===t?(e.consume(t),P):I(t)}function P(t){return 62===t?(e.consume(t),D):45===t&&2===o?(e.consume(t),P):I(t)}function D(t){return null===t||__(t)?(e.exit("htmlFlowData"),B(t)):(e.consume(t),D)}function B(n){return e.exit("htmlFlow"),t(n)}}},mA={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(H_,t,n)}}},gA={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(__(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o;return n(t)};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}};const yA={name:"htmlText",tokenize:function(e,t,n){const r=this;let o,i,a;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),w):63===t?(e.consume(t),b):w_(t)?(e.consume(t),k):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),i=0,f):w_(t)?(e.consume(t),y):n(t)}function c(t){return 45===t?(e.consume(t),p):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):__(t)?(a=u,T(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),p):u(t)}function p(e){return 62===e?R(e):45===e?d(e):u(e)}function f(t){const r="CDATA[";return t===r.charCodeAt(i++)?(e.consume(t),6===i?h:f):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),m):__(t)?(a=h,T(t)):(e.consume(t),h)}function m(t){return 93===t?(e.consume(t),g):h(t)}function g(t){return 62===t?R(t):93===t?(e.consume(t),g):h(t)}function y(t){return null===t||62===t?R(t):__(t)?(a=y,T(t)):(e.consume(t),y)}function b(t){return null===t?n(t):63===t?(e.consume(t),v):__(t)?(a=b,T(t)):(e.consume(t),b)}function v(e){return 62===e?R(e):b(e)}function w(t){return w_(t)?(e.consume(t),x):n(t)}function x(t){return 45===t||x_(t)?(e.consume(t),x):C(t)}function C(t){return __(t)?(a=C,T(t)):N_(t)?(e.consume(t),C):R(t)}function k(t){return 45===t||x_(t)?(e.consume(t),k):47===t||62===t||A_(t)?E(t):n(t)}function E(t){return 47===t?(e.consume(t),R):58===t||95===t||w_(t)?(e.consume(t),S):__(t)?(a=E,T(t)):N_(t)?(e.consume(t),E):R(t)}function S(t){return 45===t||46===t||58===t||95===t||x_(t)?(e.consume(t),S):I(t)}function I(t){return 61===t?(e.consume(t),_):__(t)?(a=I,T(t)):N_(t)?(e.consume(t),I):E(t)}function _(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,A):__(t)?(a=_,T(t)):N_(t)?(e.consume(t),_):(e.consume(t),N)}function A(t){return t===o?(e.consume(t),o=void 0,O):null===t?n(t):__(t)?(a=A,T(t)):(e.consume(t),A)}function N(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||A_(t)?E(t):(e.consume(t),N)}function O(e){return 47===e||62===e||A_(e)?E(e):n(e)}function R(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function T(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),M}function M(t){return N_(t)?P_(e,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):P(t)}function P(t){return e.enter("htmlTextData"),a(t)}}};const bA={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}e.length!==n.length&&p_(e,0,e.length,n);return e},resolveTo:function(e,t){let n,r,o,i,a=e.length,s=0;for(;a--;)if(n=e[a][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[a][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(o){if("enter"===e[a][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=a,"labelLink"!==n.type)){s=2;break}}else"labelEnd"===n.type&&(o=a);const l={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[r][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[r+s+2][1].end},end:{...e[o-2][1].start}};return i=[["enter",l,t],["enter",c,t]],i=f_(i,e.slice(r+1,r+s+3)),i=f_(i,[["enter",u,t]]),i=f_(i,F_(t.parser.constructs.insideSpan.null,e.slice(r+s+4,o-3),t)),i=f_(i,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),i=f_(i,e.slice(o+1)),i=f_(i,[["exit",l,t]]),p_(e,r,e.length,i),e},tokenize:function(e,t,n){const r=this;let o,i,a=r.events.length;for(;a--;)if(("labelImage"===r.events[a][1].type||"labelLink"===r.events[a][1].type)&&!r.events[a][1]._balanced){o=r.events[a][1];break}return function(t){if(!o)return n(t);if(o._inactive)return u(t);return i=r.parser.defined.includes(v_(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s};function s(t){return 40===t?e.attempt(vA,c,i?c:u)(t):91===t?e.attempt(wA,c,i?l:u)(t):i?c(t):u(t)}function l(t){return e.attempt(xA,c,u)(t)}function c(e){return t(e)}function u(e){return o._balanced=!0,n(e)}}},vA={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return A_(t)?sA(e,o)(t):o(t)}function o(t){return 41===t?c(t):oA(e,i,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return A_(t)?sA(e,s)(t):c(t)}function a(e){return n(e)}function s(t){return 34===t||39===t||40===t?aA(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return A_(t)?sA(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},wA={tokenize:function(e,t,n){const r=this;return function(t){return iA.call(r,e,o,i,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(v_(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function i(e){return n(e)}}},xA={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};const CA={name:"labelStartImage",resolveAll:bA.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),o};function o(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),i):n(t)}function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const kA={name:"labelStartLink",resolveAll:bA.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),o};function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const EA={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),P_(e,t,"linePrefix")}}};const SA={name:"thematicBreak",tokenize:function(e,t,n){let r,o=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,i(e)}(t)};function i(i){return i===r?(e.enter("thematicBreakSequence"),a(i)):o>=3&&(null===i||__(i))?(e.exit("thematicBreak"),t(i)):n(i)}function a(t){return t===r?(e.consume(t),o++,a):(e.exit("thematicBreakSequence"),N_(t)?P_(e,i,"whitespace")(t):i(t))}}};const IA={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(H_,o,i);function o(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,P_(e,t,"listItemIndent",r.containerState.size+1)(n)}function i(n){return r.containerState.furtherBlankLines||!N_(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(AA,t,a)(n))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,P_(e,e.attempt(IA,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0,a=0;return function(t){const o=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===o?!r.containerState.marker||t===r.containerState.marker:E_(t)){if(r.containerState.type||(r.containerState.type=o,e.enter(o,{_container:!0})),"listUnordered"===o)return e.enter("listItemPrefix"),42===t||45===t?e.check(SA,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return n(t)};function s(t){return E_(t)&&++a<10?(e.consume(t),s):(!r.interrupt||a<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(H_,r.interrupt?n:c,e.attempt(_A,d,u))}function c(e){return r.containerState.initialBlankLine=!0,i++,d(e)}function u(t){return N_(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},_A={partial:!0,tokenize:function(e,t,n){const r=this;return P_(e,(function(e){const o=r.events[r.events.length-1];return!N_(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)}),"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},AA={partial:!0,tokenize:function(e,t,n){const r=this;return P_(e,(function(e){const o=r.events[r.events.length-1];return o&&"listItemIndent"===o[1].type&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(e):n(e)}),"listItemIndent",r.containerState.size+1)}};const NA={name:"setextUnderline",resolveTo:function(e,t){let n,r,o,i=e.length;for(;i--;)if("enter"===e[i][0]){if("content"===e[i][1].type){n=i;break}"paragraph"===e[i][1].type&&(r=i)}else"content"===e[i][1].type&&e.splice(i,1),o||"definition"!==e[i][1].type||(o=i);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};e[r][1].type="setextHeadingText",o?(e.splice(r,0,["enter",a,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=a;return e.push(["exit",a,t]),e},tokenize:function(e,t,n){const r=this;let o;return function(t){let a,s=r.events.length;for(;s--;)if("lineEnding"!==r.events[s][1].type&&"linePrefix"!==r.events[s][1].type&&"content"!==r.events[s][1].type){a="paragraph"===r.events[s][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||a))return e.enter("setextHeadingLine"),o=t,function(t){return e.enter("setextHeadingLineSequence"),i(t)}(t);return n(t)};function i(t){return t===o?(e.consume(t),i):(e.exit("setextHeadingLineSequence"),N_(t)?P_(e,a,"lineSuffix")(t):a(t))}function a(r){return null===r||__(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const OA={tokenize:function(e){const t=this,n=e.attempt(H_,(function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}),e.attempt(this.parser.constructs.flowInitial,r,P_(e,e.attempt(this.parser.constructs.flow,r,e.attempt(nA,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};const RA={resolveAll:DA()},TA=PA("string"),MA=PA("text");function PA(e){return{resolveAll:DA("text"===e?BA:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,i,a);return i;function i(e){return l(e)?o(e):a(e)}function a(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return l(e)?(t.exit("data"),o(e)):(t.consume(e),s)}function l(e){if(null===e)return!0;const t=r[e];let o=-1;if(t)for(;++o<t.length;){const e=t[o];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function DA(e){return function(t,n){let r,o=-1;for(;++o<=t.length;)void 0===r?t[o]&&"data"===t[o][1].type&&(r=o,o++):t[o]&&"data"===t[o][1].type||(o!==r+2&&(t[r][1].end=t[o-1][1].end,t.splice(r+2,o-r-2),o=r+2),r=void 0);return e?e(t,n):t}}function BA(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],o=t.sliceStream(r);let i,a=o.length,s=-1,l=0;for(;a--;){const e=o[a];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)l++,s--;if(s)break;s=-1}else if(-2===e)i=!0,l++;else if(-1!==e){a++;break}}if(l){const o={type:n===e.length||i||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:r.start._bufferIndex+s,_index:r.start._index+a,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...o.start},r.start.offset===r.end.offset?Object.assign(r,o):(e.splice(n,0,["enter",o,t],["exit",o,t]),n+=2)}n++}return e}const jA={42:IA,43:IA,45:IA,48:IA,49:IA,50:IA,51:IA,52:IA,53:IA,54:IA,55:IA,56:IA,57:IA,62:W_},LA={91:lA},FA={[-2]:U_,[-1]:U_,32:U_},VA={35:dA,42:SA,45:[NA,SA],60:hA,61:NA,95:SA,96:Y_,126:Y_},zA={38:Z_,92:X_},GA={[-5]:EA,[-4]:EA,[-3]:EA,33:CA,38:Z_,42:V_,60:[G_,yA],91:kA,92:[uA,X_],93:bA,95:V_,96:K_},HA={null:[V_,RA]};var WA=Object.freeze({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:LA,disable:{null:[]},document:jA,flow:VA,flowInitial:FA,insideSpan:HA,string:zA,text:GA});function XA(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},i=[];let a=[],s=[];const l={attempt:g((function(e,t){y(e,t.from)})),check:g(m),consume:function(e){__(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,b()):-1!==e&&(r.column++,r.offset++);r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++));c.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=p(),c.events.push(["enter",n,c]),s.push(n),n},exit:function(e){const t=s.pop();return t.end=p(),c.events.push(["exit",t,c]),t},interrupt:g(m,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){o[e.line]=e.column,b()},events:[],now:p,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let a;if("string"==typeof i)a=i;else switch(i){case-5:a="\r";break;case-4:a="\n";break;case-3:a="\r\n";break;case-2:a=t?" ":"\t";break;case-1:if(!t&&o)continue;a=" ";break;default:a=String.fromCharCode(i)}o=-2===i,r.push(a)}return r.join("")}(d(e),t)},sliceStream:d,write:function(e){if(a=f_(a,e),f(),null!==a[a.length-1])return[];return y(t,0),c.events=F_(i,c.events,c),c.events}};let u=t.tokenize.call(c,l);return t.resolveAll&&i.push(t),c;function d(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(r,i)];else{if(a=e.slice(n,o),r>-1){const e=a[0];"string"==typeof e?a[0]=e.slice(r):a.shift()}i>0&&a.push(e[o].slice(0,i))}return a}(a,e)}function p(){const{_bufferIndex:e,_index:t,line:n,column:o,offset:i}=r;return{_bufferIndex:e,_index:t,line:n,column:o,offset:i}}function f(){let e;for(;r._index<a.length;){const t=a[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)h(t.charCodeAt(r._bufferIndex));else h(t)}}function h(e){u=u(e)}function m(e,t){t.restore()}function g(e,t){return function(n,o,i){let a,u,d,f;return Array.isArray(n)?h(n):"tokenize"in n?h([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return h([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function h(e){return a=e,u=0,0===e.length?i:m(e[u])}function m(e){return function(n){f=function(){const e=p(),t=c.previous,n=c.currentConstruct,o=c.events.length,i=Array.from(s);return{from:o,restore:a};function a(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=o,s=i,b()}}(),d=e,e.partial||(c.currentConstruct=e);if(e.name&&c.parser.constructs.disable.null.includes(e.name))return y();return e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,g,y)(n)}}function g(t){return e(d,f),o}function y(e){return f.restore(),++u<a.length?m(a[u]):i}}}function y(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&p_(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function b(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const ZA=/[\0\t\n\r]/g;const $A=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function YA(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return b_(n.slice(t?2:1),t?16:10)}return d_(n)||e}const UA={}.hasOwnProperty;function JA(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(te),autolinkProtocol:S,autolinkEmail:S,atxHeading:i(K),blockQuote:i(Z),characterEscape:S,characterReference:S,codeFenced:i($),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i($,a),codeText:i(Y,a),codeTextData:S,data:S,codeFlowValue:S,definition:i(U),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(J),hardBreakEscape:i(Q),hardBreakTrailing:i(Q),htmlFlow:i(q,a),htmlFlowData:S,htmlText:i(q,a),htmlTextData:S,image:i(ee),label:a,link:i(te),listItem:i(re),listItemValue:p,listOrdered:i(ne,d),listUnordered:i(ne),paragraph:i(oe),reference:F,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(K),strong:i(ie),thematicBreak:i(se)},exit:{atxHeading:l(),atxHeadingSequence:x,autolink:l(),autolinkEmail:X,autolinkProtocol:W,blockQuote:l(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:z,characterReferenceMarkerNumeric:z,characterReferenceValue:G,characterReference:H,codeFenced:l(g),codeFencedFence:m,codeFencedFenceInfo:f,codeFencedFenceMeta:h,codeFlowValue:I,codeIndented:l(y),codeText:l(R),codeTextData:I,data:I,definition:l(),definitionDestinationString:w,definitionLabelString:b,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(A),hardBreakTrailing:l(A),htmlFlow:l(N),htmlFlowData:I,htmlText:l(O),htmlTextData:I,image:l(M),label:D,labelText:P,lineEnding:_,link:l(T),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:V,resourceDestinationString:B,resourceTitleString:j,resource:L,setextHeading:l(E),setextHeadingLineSequence:k,setextHeadingText:C,strong:l(),thematicBreak:l()}};QA(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const i={stack:[r],tokenStack:[],config:t,enter:s,exit:c,buffer:a,resume:u,data:n},l=[];let d=-1;for(;++d<e.length;)if("listOrdered"===e[d][1].type||"listUnordered"===e[d][1].type)if("enter"===e[d][0])l.push(d);else{d=o(e,l.pop(),d)}for(d=-1;++d<e.length;){const n=t[e[d][0]];UA.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},i),e[d][1])}if(i.tokenStack.length>0){const e=i.tokenStack[i.tokenStack.length-1];(e[1]||eN).call(i,void 0,e[0])}for(r.position={start:KA(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:KA(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function o(e,t,n){let r,o,i,a,s=t-1,l=-1,c=!1;for(;++s<=n;){const t=e[s];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,a=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||a||l||i||(i=s),a=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:a=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let a=s;for(o=void 0;a--;){const t=e[a];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;o&&(e[o][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",o=a}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}i&&(!o||i<o)&&(r._spread=!0),r.end=Object.assign({},o?e[o][1].start:t[1].end),e.splice(o||s,0,["exit",r,t[2]]),s++,n++}if("listItemPrefix"===t[1].type){const o={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=o,e.splice(s,0,["enter",o,t[2]]),s++,n++,i=void 0,a=!0}}}return e[t][1]._spread=c,n}function i(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:KA(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),c.call(this,t)}}function c(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+BI({start:e.start,end:e.end})+"): it’s not open");if(r[0].type!==e.type)if(t)t.call(this,e,r[0]);else{(r[1]||eN).call(this,e,r[0])}n.position.end=KA(e.end)}function u(){return s_(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function f(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function h(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function b(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=v_(this.sliceSerialize(e)).toLowerCase()}function v(){const e=this.resume();this.stack[this.stack.length-1].title=e}function w(){const e=this.resume();this.stack[this.stack.length-1].url=e}function x(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function k(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function E(){this.data.setextHeadingSlurpLineEnding=void 0}function S(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n=ae(),n.position={start:KA(e.start),end:void 0},t.push(n)),this.stack.push(n)}function I(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=KA(e.end)}function _(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=KA(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(S.call(this,e),I.call(this,e))}function A(){this.data.atHardBreak=!0}function N(){const e=this.resume();this.stack[this.stack.length-1].value=e}function O(){const e=this.resume();this.stack[this.stack.length-1].value=e}function R(){const e=this.resume();this.stack[this.stack.length-1].value=e}function T(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function M(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace($A,YA)}(t),n.identifier=v_(t).toLowerCase()}function D(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t}function B(){const e=this.resume();this.stack[this.stack.length-1].url=e}function j(){const e=this.resume();this.stack[this.stack.length-1].title=e}function L(){this.data.inReference=void 0}function F(){this.data.referenceType="collapsed"}function V(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=v_(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function z(e){this.data.characterReferenceType=e.type}function G(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;if(n)r=b_(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=d_(t)}this.stack[this.stack.length-1].value+=r}function H(e){this.stack.pop().position.end=KA(e.end)}function W(e){I.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function X(e){I.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function Z(){return{type:"blockquote",children:[]}}function $(){return{type:"code",lang:null,meta:null,value:""}}function Y(){return{type:"inlineCode",value:""}}function U(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function J(){return{type:"emphasis",children:[]}}function K(){return{type:"heading",depth:0,children:[]}}function Q(){return{type:"break"}}function q(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function oe(){return{type:"paragraph",children:[]}}function ie(){return{type:"strong",children:[]}}function ae(){return{type:"text",value:""}}function se(){return{type:"thematicBreak"}}}(n)(function(e){for(;!eA(e););return e}(function(e){const t={constructs:m_([WA,...(e||{}).extensions||[]]),content:n(D_),defined:[],document:n(B_),flow:n(OA),lazy:{},string:n(TA),text:n(MA)};return t;function n(e){return function(n){return XA(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(o,i,a){const s=[];let l,c,u,d,p;for(o=n+("string"==typeof o?o.toString():new TextDecoder(i||void 0).decode(o)),u=0,n="",r&&(65279===o.charCodeAt(0)&&u++,r=void 0);u<o.length;){if(ZA.lastIndex=u,l=ZA.exec(o),d=l&&void 0!==l.index?l.index:o.length,p=o.charCodeAt(d),!l){n=o.slice(u);break}if(10===p&&u===d&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),u<d&&(s.push(o.slice(u,d)),t+=d-u),p){case 0:s.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),s.push(-2);t++<c;)s.push(-1);break;case 10:s.push(-4),t=1;break;default:e=!0,t=1}u=d+1}return a&&(e&&s.push(-5),n&&s.push(n),s.push(null)),s}}()(e,t,!0))))}function KA(e){return{line:e.line,column:e.column,offset:e.offset}}function QA(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?QA(e,r):qA(e,r)}}function qA(e,t){let n;for(n in t)if(UA.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function eN(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+BI({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+BI({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+BI({start:t.start,end:t.end})+") is still open")}function tN(e){const t=this;t.parser=function(n){return JA(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function nN(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),i=o[0];i&&"text"===i.type?i.value="["+i.value:o.unshift({type:"text",value:"["});const a=o[o.length-1];return a&&"text"===a.type?a.value+=r:o.push({type:"text",value:r}),o}function rN(e){const t=e.spread;return null==t?e.children.length>1:t}function oN(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(iN(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(iN(t.slice(o),o>0,!1)),i.join("")}function iN(e,t,n){let r=0,o=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(o-1);for(;9===t||32===t;)o--,t=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}const aN={blockquote:function(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={};t.lang&&(r.className=["language-"+t.lang]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=M_(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let a,s=e.footnoteCounts.get(r);void 0===s?(s=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=i+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return nN(e,t);const o={src:M_(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(o.title=r.title);const i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,i),e.applyData(t,i)},image:function(e,t){const n={src:M_(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return nN(e,t);const o={href:M_(r.url||"")};null!==r.title&&void 0!==r.title&&(o.title=r.title);const i={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)},link:function(e,t){const n={href:M_(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){const r=e.all(t),o=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=rN(n[r])}return t}(n):rN(t),i={},a=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const e=r[s];(o||0!==s||"element"!==e.type||"p"!==e.tagName)&&a.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||o?a.push(e):a.push(...e.children)}const l=r[r.length-1];l&&(o||"element"!==l.type||"p"!==l.tagName)&&a.push({type:"text",value:"\n"});const c={type:"element",tagName:"li",properties:i,children:a};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){const n={},r=e.all(t);let o=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++o<r.length;){const e=r[o];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),o.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},i=PI(t.children[1]),a=MI(t.children[t.children.length-1]);i&&a&&(r.position={start:i,end:a}),o.push(r)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,o=0===(r?r.indexOf(t):1)?"th":"td",i=n&&"table"===n.type?n.align:void 0,a=i?i.length:t.children.length;let s=-1;const l=[];for(;++s<a;){const n=t.children[s],r={},a=i?i[s]:void 0;a&&(r.align=a);let c={type:"element",tagName:o,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),l.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:oN(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:sN,yaml:sN,definition:sN,footnoteDefinition:sN};function sN(){}const lN="object"==typeof self?self:globalThis,cN=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=o=>{if(e.has(o))return e.get(o);const[i,a]=t[o];switch(i){case 0:case-1:return n(a,o);case 1:{const e=n([],o);for(const t of a)e.push(r(t));return e}case 2:{const e=n({},o);for(const[t,n]of a)e[r(t)]=r(n);return e}case 3:return n(new Date(a),o);case 4:{const{source:e,flags:t}=a;return n(new RegExp(e,t),o)}case 5:{const e=n(new Map,o);for(const[t,n]of a)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,o);for(const t of a)e.add(r(t));return e}case 7:{const{name:e,message:t}=a;return n(new lN[e](t),o)}case 8:return n(BigInt(a),o);case"BigInt":return n(Object(BigInt(a)),o);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:e}=new Uint8Array(a);return n(new DataView(e),a)}}return n(new lN[i](a),o)};return r})(new Map,e)(0),uN="",{toString:dN}={},{keys:pN}=Object,fN=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=dN.call(e).slice(8,-1);switch(n){case"Array":return[1,uN];case"Object":return[2,uN];case"Date":return[3,uN];case"RegExp":return[4,uN];case"Map":return[5,uN];case"Set":return[6,uN];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},hN=([e,t])=>0===e&&("function"===t||"symbol"===t),mN=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const o=(e,t)=>{const o=r.push(e)-1;return n.set(t,o),o},i=r=>{if(n.has(r))return n.get(r);let[a,s]=fN(r);switch(a){case 0:{let t=r;switch(s){case"bigint":a=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);t=null;break;case"undefined":return o([-1],r)}return o([a,t],r)}case 1:{if(s){let e=r;return"DataView"===s?e=new Uint8Array(r.buffer):"ArrayBuffer"===s&&(e=new Uint8Array(r)),o([s,[...e]],r)}const e=[],t=o([a,e],r);for(const t of r)e.push(i(t));return t}case 2:{if(s)switch(s){case"BigInt":return o([s,r.toString()],r);case"Boolean":case"Number":case"String":return o([s,r.valueOf()],r)}if(t&&"toJSON"in r)return i(r.toJSON());const n=[],l=o([a,n],r);for(const t of pN(r))!e&&hN(fN(r[t]))||n.push([i(t),i(r[t])]);return l}case 3:return o([a,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return o([a,{source:e,flags:t}],r)}case 5:{const t=[],n=o([a,t],r);for(const[n,o]of r)(e||!hN(fN(n))&&!hN(fN(o)))&&t.push([i(n),i(o)]);return n}case 6:{const t=[],n=o([a,t],r);for(const n of r)!e&&hN(fN(n))||t.push(i(n));return n}}const{message:l}=r;return o([a,{name:s,message:l}],r)};return i})(!(t||n),!!t,new Map,r)(e),r};var gN="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?cN(mN(e,t)):structuredClone(e):(e,t)=>cN(mN(e,t));function yN(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function bN(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const vN=function(e){if(null==e)return xN;if("function"==typeof e)return wN(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=vN(e[n]);return wN(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}(e):function(e){const t=e;return wN(n);function n(n){const r=n;let o;for(o in e)if(r[o]!==t[o])return!1;return!0}}(e);if("string"==typeof e)return function(e){return wN(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function wN(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function xN(){return!0}const CN=[],kN=!0,EN=!1;function SN(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;const i=vN(o),a=r?-1:1;!function e(o,s,l){const c=o&&"object"==typeof o?o:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+o.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,p=CN;if((!t||i(o,s,l[l.length-1]||void 0))&&(p=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[kN,e];return null==e?CN:[e]}(n(o,l)),p[0]===EN))return p;if("children"in o&&o.children){const t=o;if(t.children&&"skip"!==p[0])for(u=(r?t.children.length:-1)+a,d=l.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(c=e(n,u,d)(),c[0]===EN)return c;u="number"==typeof c[1]?c[1]:u+a}}return p}}(e,void 0,[])()}function IN(e,t,n,r){let o,i,a;"function"==typeof t?(i=void 0,a=t,o=n):(i=t,a=n,o=r),SN(e,i,(function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return a(e,r,n)}),o)}const _N={}.hasOwnProperty,AN={};function NN(e,t){e.position&&(t.position=function(e){const t=PI(e),n=MI(e);if(t&&n)return{start:t,end:n}}(e))}function ON(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,o=e.data.hProperties;if("string"==typeof t)if("element"===n.type)n.tagName=t;else{n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}}"element"===n.type&&o&&Object.assign(n.properties,gN(o)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function RN(e,t){const n=t.data||{},r=!("value"in t)||_N.call(n,"hProperties")||_N.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function TN(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function MN(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function PN(e,t){const n=function(e,t){const n=t||AN,r=new Map,o=new Map,i=new Map,a={...aN,...n.handlers},s={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const o=s.one(n[r],e);if(o){if(r&&"break"===n[r-1].type&&(Array.isArray(o)||"text"!==o.type||(o.value=MN(o.value)),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=MN(e.value))}Array.isArray(o)?t.push(...o):t.push(o)}}}return t},applyData:ON,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:a,one:function(e,t){const n=e.type,r=s.handlers[n];if(_N.call(s.handlers,n)&&r)return r(s,e,t);if(s.options.passThrough&&s.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=gN(n);return r.children=s.all(e),r}return gN(e)}return(s.options.unknownHandler||RN)(s,e,t)},options:n,patch:NN,wrap:TN};return IN(e,(function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:o,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}})),s}(e,t),r=n.one(e,void 0),o=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||yN,r=e.options.footnoteBackLabel||bN,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const o=e.footnoteById.get(e.footnoteOrder[l]);if(!o)continue;const i=e.all(o),a=String(o.identifier).toUpperCase(),c=M_(a.toLowerCase());let u=0;const d=[],p=e.footnoteCounts.get(a);for(;void 0!==p&&++u<=p;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(l,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(l,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const f=i[i.length-1];if(f&&"element"===f.type&&"p"===f.tagName){const e=f.children[f.children.length-1];e&&"text"===e.type?e.value+=" ":f.children.push({type:"text",value:" "}),f.children.push(...d)}else i.push(...d);const h={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(i,!0)};e.patch(o,h),s.push(h)}if(0!==s.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...gN(a),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:"\n"}]}}(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&i.children.push({type:"text",value:"\n"},o),i}function DN(e,t){return e&&"run"in e?async function(n,r){const o=PN(n,{file:r,...t});await e.run(o,r)}:function(n,r){return PN(n,{file:r,...e||t})}}function BN(e){if(e)throw e}var jN,LN;var FN=function(){if(LN)return jN;LN=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},i=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,o=e.call(n,"constructor"),i=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!o&&!i)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return jN=function e(){var t,n,r,l,c,u,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=s(d,n),d!==(l=s(t,n))&&(h&&l&&(i(l)||(c=o(l)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&i(r)?r:{},a(d,{name:n,newValue:e(h,u,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},jN}(),VN=S(FN);function zN(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function GN(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function o(i,...a){const s=e[++n];let l=-1;if(i)r(i);else{for(;++l<t.length;)null!==a[l]&&void 0!==a[l]||(a[l]=t[l]);t=a,s?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let a;r&&t.push(o);try{a=e.apply(this,t)}catch(e){if(r&&n)throw e;return o(e)}r||(a&&a.then&&"function"==typeof a.then?a.then(i,o):a instanceof Error?o(a):i(a))}function o(e,...r){n||(n=!0,t(e,...r))}function i(e){o(null,e)}}(s,o)(...a):r(null,...a)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const HN={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');WN(e);let n,r=0,o=-1,i=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else o<0&&(n=!0,o=i+1);return o<0?"":e.slice(r,o)}if(t===e)return"";let a=-1,s=t.length-1;for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else a<0&&(n=!0,a=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(o=i):(s=-1,o=a));r===o?o=a:o<0&&(o=e.length);return e.slice(r,o)},dirname:function(e){if(WN(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){WN(e);let t,n=e.length,r=-1,o=0,i=-1,a=0;for(;n--;){const s=e.codePointAt(n);if(47!==s)r<0&&(t=!0,r=n+1),46===s?i<0?i=n:1!==a&&(a=1):i>-1&&(a=-1);else if(t){o=n+1;break}}if(i<0||r<0||0===a||1===a&&i===r-1&&i===o+1)return"";return e.slice(i,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)WN(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){WN(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,o="",i=0,a=-1,s=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else{if(47===n)break;n=47}if(47===n){if(a===l-1||1===s);else if(a!==l-1&&2===s){if(o.length<2||2!==i||46!==o.codePointAt(o.length-1)||46!==o.codePointAt(o.length-2))if(o.length>2){if(r=o.lastIndexOf("/"),r!==o.length-1){r<0?(o="",i=0):(o=o.slice(0,r),i=o.length-1-o.lastIndexOf("/")),a=l,s=0;continue}}else if(o.length>0){o="",i=0,a=l,s=0;continue}t&&(o=o.length>0?o+"/..":"..",i=2)}else o.length>0?o+="/"+e.slice(a+1,l):o=e.slice(a+1,l),i=l-a-1;a=l,s=0}else 46===n&&s>-1?s++:s=-1}return o}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/");return t?"/"+n:n}(t)},sep:"/"};function WN(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const XN={cwd:function(){return"/"}};function ZN(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function $N(e){if("string"==typeof e)e=new URL(e);else if(!ZN(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}const YN=["history","path","basename","stem","extname","dirname"];class UN{constructor(e){let t;t=e?ZN(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":XN.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<YN.length;){const e=YN[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)YN.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?HN.basename(this.path):void 0}set basename(e){KN(e,"basename"),JN(e,"basename"),this.path=HN.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?HN.dirname(this.path):void 0}set dirname(e){QN(this.basename,"dirname"),this.path=HN.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?HN.extname(this.path):void 0}set extname(e){if(JN(e,"extname"),QN(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=HN.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){ZN(e)&&(e=$N(e)),KN(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?HN.basename(this.path,this.extname):void 0}set stem(e){KN(e,"stem"),JN(e,"stem"),this.path=HN.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new VI(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){if(void 0===this.value)return"";if("string"==typeof this.value)return this.value;return new TextDecoder(e||void 0).decode(this.value)}}function JN(e,t){if(e&&e.includes(HN.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+HN.sep+"`")}function KN(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function QN(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const qN=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},eO={}.hasOwnProperty;class tO extends qN{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=GN()}copy(){const e=new tO;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(VN(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(iO("data",this.frozen),this.namespace[e]=t,this):eO.call(this.namespace,e)&&this.namespace[e]||void 0:e?(iO("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=lO(e),n=this.parser||this.Parser;return rO("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),rO("process",this.parser||this.Parser),oO("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,o){const i=lO(e),a=n.parse(i);function s(e,n){e||!n?o(e):r?r(n):t(void 0,n)}n.run(a,i,(function(e,t,r){if(e||!t||!r)return s(e);const o=t,i=n.stringify(o,r);var a;"string"==typeof(a=i)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(a)?r.value=i:r.result=i,s(e,r)}))}}processSync(e){let t,n=!1;return this.freeze(),rO("processSync",this.parser||this.Parser),oO("processSync",this.compiler||this.Compiler),this.process(e,(function(e,r){n=!0,BN(e),t=r})),sO("processSync","process",n),t}run(e,t,n){aO(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?o(void 0,n):new Promise(o);function o(o,i){const a=lO(t);r.run(e,a,(function(t,r,a){const s=r||e;t?i(t):o?o(s):n(void 0,s,a)}))}}runSync(e,t){let n,r=!1;return this.run(e,t,(function(e,t){BN(e),n=t,r=!0})),sO("runSync","run",r),n}stringify(e,t){this.freeze();const n=lO(t),r=this.compiler||this.Compiler;return oO("stringify",r),aO(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(iO("use",this.frozen),null==e);else if("function"==typeof e)s(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?a(e):i(e)}return this;function o(e){if("function"==typeof e)s(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;s(t,n)}else i(e)}}function i(e){if(!("plugins"in e)&&!("settings"in e))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(e.plugins),e.settings&&(r.settings=VN(!0,r.settings,e.settings))}function a(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){o(e[t])}}}function s(e,t){let r=-1,o=-1;for(;++r<n.length;)if(n[r][0]===e){o=r;break}if(-1===o)n.push([e,...t]);else if(t.length>0){let[r,...i]=t;const a=n[o][1];zN(a)&&zN(r)&&(r=VN(!0,a,r)),n[o]=[e,r,...i]}}}}const nO=(new tO).freeze();function rO(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function oO(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function iO(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function aO(e){if(!zN(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function sO(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function lO(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new UN(e)}const cO=[],uO={allowDangerousHtml:!0},dO=/^(https?|ircs?|mailto|xmpp)$/i,pO=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function fO(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",o=e.className,i=e.components,a=e.disallowedElements,s=e.rehypePlugins||cO,l=e.remarkPlugins||cO,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...uO}:uO,u=e.skipHtml,d=e.unwrapDisallowed,p=e.urlTransform||hO,f=nO().use(tN).use(l).use(DN,c).use(s),h=new UN;"string"==typeof r&&(h.value=r);for(const t of pO)Object.hasOwn(e,t.from)&&(t.from,t.to&&t.to,t.id);const m=f.parse(h);let g=f.runSync(m,h);return o&&(g={type:"element",tagName:"div",properties:{className:o},children:"root"===g.type?g.children:[g]}),IN(g,(function(e,r,o){if("raw"===e.type&&o&&"number"==typeof r)return u?o.children.splice(r,1):o.children[r]={type:"text",value:e.value},r;if("element"===e.type){let t;for(t in i_)if(Object.hasOwn(i_,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=i_[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=p(String(n||""),t,e))}}if("element"===e.type){let i=t?!t.includes(e.tagName):!!a&&a.includes(e.tagName);if(!i&&n&&"number"==typeof r&&(i=!n(e,r,o)),i&&o&&"number"==typeof r)return d&&e.children?o.children.splice(r,1,...e.children):o.children.splice(r,1),r}})),YI(g,{Fragment:nd.Fragment,components:i,ignoreInvalidStyle:!0,jsx:nd.jsx,jsxs:nd.jsxs,passKeys:!0,passNode:!0})}function hO(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return-1===t||-1!==o&&t>o||-1!==n&&t>n||-1!==r&&t>r||dO.test(e.slice(0,t))?e:""}function mO(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;-1!==o;)r++,o=n.indexOf(t,o+t.length);return r}function gO(e,t,n){const r=vN((n||{}).ignore||[]),o=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const e=n[r];t.push([yO(e[0]),bO(e[1])])}return t}(t);let i=-1;for(;++i<o.length;)SN(e,"text",a);function a(e,t){let n,a=-1;for(;++a<t.length;){const e=t[a],o=n?n.children:void 0;if(r(e,o?o.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){const n=t[t.length-1],r=o[i][0],a=o[i][1];let s=0;const l=n.children.indexOf(e);let c=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){const n=d.index,o={index:d.index,input:d.input,stack:[...t,e]};let i=a(...d,o);if("string"==typeof i&&(i=i.length>0?{type:"text",value:i}:void 0),!1===i?r.lastIndex=n+1:(s!==n&&u.push({type:"text",value:e.value.slice(s,n)}),Array.isArray(i)?u.push(...i):i&&u.push(i),s=n+d[0].length,c=!0),!r.global)break;d=r.exec(e.value)}c?(s<e.value.length&&u.push({type:"text",value:e.value.slice(s)}),n.children.splice(l,1,...u)):u=[e];return l+u.length}(e,t)}}function yO(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function bO(e){return"function"==typeof e?e:function(){return e}}const vO="phrasing",wO=["autolink","link","image","label"];function xO(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function CO(e){this.config.enter.autolinkProtocol.call(this,e)}function kO(e){this.config.exit.autolinkProtocol.call(this,e)}function EO(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function SO(e){this.config.exit.autolinkEmail.call(this,e)}function IO(e){this.exit(e)}function _O(e){gO(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,AO],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,NO]],{ignore:["link","linkReference"]})}function AO(e,t,n,r,o){let i="";if(!OO(o))return!1;if(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!function(e){const t=e.split(".");if(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))return!1;return!0}(n))return!1;const a=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=mO(e,"(");let i=mO(e,")");for(;-1!==r&&o>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:i+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function NO(e,t,n,r){return!(!OO(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function OO(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||R_(n)||O_(n))&&(!t||47!==n)}function RO(){this.buffer()}function TO(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function MO(){this.buffer()}function PO(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function DO(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=v_(this.sliceSerialize(e)).toLowerCase(),n.label=t}function BO(e){this.exit(e)}function jO(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=v_(this.sliceSerialize(e)).toLowerCase(),n.label=t}function LO(e){this.exit(e)}function FO(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return i+=o.move(n.safe(n.associationId(e),{after:"]",before:i})),s(),a(),i+=o.move("]"),i}function VO(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,r,o){const i=r.createTracker(o);let a=i.move("[^");const s=r.enter("footnoteDefinition"),l=r.enter("label");a+=i.move(r.safe(r.associationId(e),{before:a,after:"]"})),l(),a+=i.move("]:"),e.children&&e.children.length>0&&(i.shift(4),a+=i.move((t?"\n":" ")+r.indentLines(r.containerFlow(e,i.current()),t?GO:zO)));return s(),a},footnoteReference:FO},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function zO(e,t,n){return 0===t?e:GO(e,t,n)}function GO(e,t,n){return(n?"":" ")+e}FO.peek=function(){return"["};const HO=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function WO(e){this.enter({type:"delete",children:[]},e)}function XO(e){this.exit(e)}function ZO(e,t,n,r){const o=n.createTracker(r),i=n.enter("strikethrough");let a=o.move("~~");return a+=n.containerPhrasing(e,{...o.current(),before:a,after:"~"}),a+=o.move("~~"),i(),a}function $O(e){return e.length}function YO(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}function UO(e,t,n){return">"+(n?"":" ")+e}function JO(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function KO(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if("\n"===n.unsafe[o].character&&(i=n.stack,a=n.unsafe[o],JO(i,a.inConstruct,!0)&&!JO(i,a.notInConstruct,!1)))return/[ \t]/.test(r.before)?"":" ";var i,a;return"\\\n"}function QO(e,t,n){return(n?"":" ")+e}function qO(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function eR(e){return"&#x"+e.toString(16).toUpperCase()+";"}function tR(e,t,n){const r=L_(e),o=L_(t);return void 0===r?void 0===o?"_"===n?{inside:!0,outside:!0}:{inside:!1,outside:!1}:1===o?{inside:!0,outside:!0}:{inside:!1,outside:!0}:1===r?void 0===o?{inside:!1,outside:!1}:1===o?{inside:!0,outside:!0}:{inside:!1,outside:!1}:void 0===o?{inside:!1,outside:!1}:1===o?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function nR(e,t,n,r){const o=function(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(n),i=n.enter("emphasis"),a=n.createTracker(r),s=a.move(o);let l=a.move(n.containerPhrasing(e,{after:o,before:s,...a.current()}));const c=l.charCodeAt(0),u=tR(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(l=eR(c)+l.slice(1));const d=l.charCodeAt(l.length-1),p=tR(r.after.charCodeAt(0),d,o);p.inside&&(l=l.slice(0,-1)+eR(d));const f=a.move(o);return i(),n.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},s+l+f}function rR(e){return e.value||""}function oR(e,t,n,r){const o=qO(n),i='"'===o?"Quote":"Apostrophe",a=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),c+=l.move(")"),a(),c}function iR(e,t,n,r){const o=e.referenceType,i=n.enter("imageReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,i(),"full"!==o&&c&&c===d?"shortcut"===o?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function aR(e,t,n){let r=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const e=n.unsafe[i],t=n.compilePattern(e);let o;if(e.atBreak)for(;o=t.exec(r);){let e=o.index;10===r.charCodeAt(e)&&13===r.charCodeAt(e-1)&&e--,r=r.slice(0,e)+" "+r.slice(o.index+1)}}return o+r+o}function sR(e,t){const n=s_(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function lR(e,t,n,r){const o=qO(n),i='"'===o?"Quote":"Apostrophe",a=n.createTracker(r);let s,l;if(sR(e,n)){const t=n.stack;n.stack=[],s=n.enter("autolink");let r=a.move("<");return r+=a.move(n.containerPhrasing(e,{before:r,after:">",...a.current()})),r+=a.move(">"),s(),n.stack=t,r}s=n.enter("link"),l=n.enter("label");let c=a.move("[");return c+=a.move(n.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${i}`),c+=a.move(" "+o),c+=a.move(n.safe(e.title,{before:c,after:o,...a.current()})),c+=a.move(o),l()),c+=a.move(")"),s(),c}function cR(e,t,n,r){const o=e.referenceType,i=n.enter("linkReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,i(),"full"!==o&&c&&c===d?"shortcut"===o?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function uR(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function dR(e){const t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}ZO.peek=function(){return"~"},nR.peek=function(e,t,n){return n.options.emphasis||"*"},rR.peek=function(){return"<"},oR.peek=function(){return"!"},iR.peek=function(){return"!"},aR.peek=function(){return"`"},lR.peek=function(e,t,n){return sR(e,n)?"<":"["},cR.peek=function(){return"["};const pR=vN(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function fR(e,t,n,r){const o=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),i=n.enter("strong"),a=n.createTracker(r),s=a.move(o+o);let l=a.move(n.containerPhrasing(e,{after:o,before:s,...a.current()}));const c=l.charCodeAt(0),u=tR(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(l=eR(c)+l.slice(1));const d=l.charCodeAt(l.length-1),p=tR(r.after.charCodeAt(0),d,o);p.inside&&(l=l.slice(0,-1)+eR(d));const f=a.move(o+o);return i(),n.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},s+l+f}fR.peek=function(e,t,n){return n.options.strong||"*"};const hR={blockquote:function(e,t,n,r){const o=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const a=n.indentLines(n.containerFlow(e,i.current()),UO);return o(),a},break:KO,code:function(e,t,n,r){const o=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),i=e.value||"",a="`"===o?"GraveAccent":"Tilde";if(function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(i,QO);return e(),t}const s=n.createTracker(r),l=o.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),o=r,i=0,a=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===o?++i>a&&(a=i):i=1,o=r+t.length,r=n.indexOf(t,o);return a}(i,o)+1,3)),c=n.enter("codeFenced");let u=s.move(l);if(e.lang){const t=n.enter(`codeFencedLang${a}`);u+=s.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${a}`);u+=s.move(" "),u+=s.move(n.safe(e.meta,{before:u,after:"\n",encode:["`"],...s.current()})),t()}return u+=s.move("\n"),i&&(u+=s.move(i+"\n")),u+=s.move(l),c(),u},definition:function(e,t,n,r){const o=qO(n),i='"'===o?"Quote":"Apostrophe",a=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":"\n",...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),a(),c},emphasis:nR,hardBreak:KO,heading:function(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(function(e,t){let n=!1;return IN(e,(function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,EN})),Boolean((!e.depth||e.depth<3)&&s_(e)&&(t.options.setext||n))}(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),a=n.containerPhrasing(e,{...i.current(),before:"\n",after:"\n"});return r(),t(),a+"\n"+(1===o?"=":"-").repeat(a.length-(Math.max(a.lastIndexOf("\r"),a.lastIndexOf("\n"))+1))}const a="#".repeat(o),s=n.enter("headingAtx"),l=n.enter("phrasing");i.move(a+" ");let c=n.containerPhrasing(e,{before:"# ",after:"\n",...i.current()});return/^[\t ]/.test(c)&&(c=eR(c.charCodeAt(0))+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),l(),s(),c},html:rR,image:oR,imageReference:iR,inlineCode:aR,link:lR,linkReference:cR,list:function(e,t,n,r){const o=n.enter("list"),i=n.bulletCurrent;let a=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):uR(n);const s=e.ordered?"."===a?")":".":function(e){const t=uR(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n);let l=!(!t||!n.bulletLastUsed)&&a===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==a&&"-"!==a||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(l=!0),dR(n)===a&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){l=!0;break}}}}l&&(a=s),n.bulletCurrent=a;const c=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=i,o(),c},listItem:function(e,t,n,r){const o=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let i=n.bulletCurrent||uR(n);t&&"list"===t.type&&t.ordered&&(i=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+i);let a=i.length+1;("tab"===o||"mixed"===o&&(t&&"list"===t.type&&t.spread||e.spread))&&(a=4*Math.ceil(a/4));const s=n.createTracker(r);s.move(i+" ".repeat(a-i.length)),s.shift(a);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),(function(e,t,n){if(t)return(n?"":" ".repeat(a))+e;return(n?i:i+" ".repeat(a-i.length))+e}));return l(),c},paragraph:function(e,t,n,r){const o=n.enter("paragraph"),i=n.enter("phrasing"),a=n.containerPhrasing(e,r);return i(),o(),a},root:function(e,t,n,r){return(e.children.some((function(e){return pR(e)}))?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:fR,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(dR(n)+(n.options.ruleSpaces?" ":"")).repeat(function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function mR(e){const t=e._align;this.enter({type:"table",align:t.map((function(e){return"none"===e?null:e})),children:[]},e),this.data.inTable=!0}function gR(e){this.exit(e),this.data.inTable=void 0}function yR(e){this.enter({type:"tableRow",children:[]},e)}function bR(e){this.exit(e)}function vR(e){this.enter({type:"tableCell",children:[]},e)}function wR(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,xR));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function xR(e,t){return"|"===t?t:e}function CR(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=hR.inlineCode(e,t,n);n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&"));return r},table:function(e,t,n,r){return s(function(e,t,n){const r=e.children;let o=-1;const i=[],a=t.enter("table");for(;++o<r.length;)i[o]=l(r[o],t,n);return a(),i}(e,n,r),e.align)},tableCell:a,tableRow:function(e,t,n,r){const o=l(e,n,r),i=s([o]);return i.slice(0,i.indexOf("\n"))}}};function a(e,t,n,r){const o=n.enter("tableCell"),a=n.enter("phrasing"),s=n.containerPhrasing(e,{...r,before:i,after:i});return a(),o(),s}function s(e,t){return function(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||$O,i=[],a=[],s=[],l=[];let c=0,u=-1;for(;++u<e.length;){const t=[],r=[];let i=-1;for(e[u].length>c&&(c=e[u].length);++i<e[u].length;){const a=null==(d=e[u][i])?"":String(d);if(!1!==n.alignDelimiters){const e=o(a);r[i]=e,(void 0===l[i]||e>l[i])&&(l[i]=e)}t.push(a)}a[u]=t,s[u]=r}var d;let p=-1;if("object"==typeof r&&"length"in r)for(;++p<c;)i[p]=YO(r[p]);else{const e=YO(r);for(;++p<c;)i[p]=e}p=-1;const f=[],h=[];for(;++p<c;){const e=i[p];let t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let o=!1===n.alignDelimiters?1:Math.max(1,l[p]-t.length-r.length);const a=t+"-".repeat(o)+r;!1!==n.alignDelimiters&&(o=t.length+o+r.length,o>l[p]&&(l[p]=o),h[p]=o),f[p]=a}a.splice(1,0,f),s.splice(1,0,h),u=-1;const m=[];for(;++u<a.length;){const e=a[u],t=s[u];p=-1;const r=[];for(;++p<c;){const o=e[p]||"";let a="",s="";if(!1!==n.alignDelimiters){const e=l[p]-(t[p]||0),n=i[p];114===n?a=" ".repeat(e):99===n?e%2?(a=" ".repeat(e/2+.5),s=" ".repeat(e/2-.5)):(a=" ".repeat(e/2),s=a):s=" ".repeat(e)}!1===n.delimiterStart||p||r.push("|"),!1===n.padding||!1===n.alignDelimiters&&""===o||!1===n.delimiterStart&&!p||r.push(" "),!1!==n.alignDelimiters&&r.push(a),r.push(o),!1!==n.alignDelimiters&&r.push(s),!1!==n.padding&&r.push(" "),!1===n.delimiterEnd&&p===c-1||r.push("|")}m.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return m.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:o})}function l(e,t,n){const r=e.children;let o=-1;const i=[],s=t.enter("tableRow");for(;++o<r.length;)i[o]=a(r[o],0,t,n);return s(),i}}function kR(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function ER(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];e.type;const n=e.children[0];if(n&&"text"===n.type){const r=t.children;let o,i=-1;for(;++i<r.length;){const e=r[i];if("paragraph"===e.type){o=e;break}}o===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function SR(e,t,n,r){const o=e.children[0],i="boolean"==typeof e.checked&&o&&"paragraph"===o.type,a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);i&&s.move(a);let l=hR.listItem(e,t,n,{...r,...s.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,(function(e){return e+a}))),l}const IR={tokenize:function(e,t,n){let r=0;return function t(i){if((87===i||119===i)&&r<3)return r++,e.consume(i),t;if(46===i&&3===r)return e.consume(i),o;return n(i)};function o(e){return null===e?n(e):t(e)}},partial:!0},_R={tokenize:function(e,t,n){let r,o,i;return a;function a(t){return 46===t||95===t?e.check(NR,l,s)(t):null===t||A_(t)||R_(t)||45!==t&&O_(t)?l(t):(i=!0,e.consume(t),a)}function s(t){return 95===t?r=!0:(o=r,r=void 0),e.consume(t),a}function l(e){return o||r||!i?n(e):t(e)}},partial:!0},AR={tokenize:function(e,t){let n=0,r=0;return o;function o(a){return 40===a?(n++,e.consume(a),o):41===a&&r<n?i(a):33===a||34===a||38===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||60===a||63===a||93===a||95===a||126===a?e.check(NR,t,i)(a):null===a||A_(a)||R_(a)?t(a):(e.consume(a),o)}function i(t){return 41===t&&r++,e.consume(t),o}},partial:!0},NR={tokenize:function(e,t,n){return r;function r(a){return 33===a||34===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||63===a||95===a||126===a?(e.consume(a),r):38===a?(e.consume(a),i):93===a?(e.consume(a),o):60===a||null===a||A_(a)||R_(a)?t(a):n(a)}function o(e){return null===e||40===e||91===e||A_(e)||R_(e)?t(e):r(e)}function i(e){return w_(e)?a(e):n(e)}function a(t){return 59===t?(e.consume(t),r):w_(t)?(e.consume(t),a):n(t)}},partial:!0},OR={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return x_(e)?n(e):t(e)}},partial:!0},RR={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!BR.call(r,r.previous)||VR(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(IR,e.attempt(_R,e.attempt(AR,o),n),n)(t)};function o(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:BR},TR={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let o="",i=!1;return function(t){if((72===t||104===t)&&jR.call(r,r.previous)&&!VR(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(t),e.consume(t),a;return n(t)};function a(t){if(w_(t)&&o.length<5)return o+=String.fromCodePoint(t),e.consume(t),a;if(58===t){const n=o.toLowerCase();if("http"===n||"https"===n)return e.consume(t),s}return n(t)}function s(t){return 47===t?(e.consume(t),i?l:(i=!0,s)):n(t)}function l(t){return null===t||k_(t)||A_(t)||R_(t)||O_(t)?n(t):e.attempt(_R,e.attempt(AR,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:jR},MR={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let o,i;return function(t){if(!FR(t)||!LR.call(r,r.previous)||VR(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(t)};function a(t){return FR(t)?(e.consume(t),a):64===t?(e.consume(t),s):n(t)}function s(t){return 46===t?e.check(OR,c,l)(t):45===t||95===t||x_(t)?(i=!0,e.consume(t),s):c(t)}function l(t){return e.consume(t),o=!0,s}function c(a){return i&&o&&w_(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(a)):n(a)}},previous:LR},PR={};let DR=48;for(;DR<123;)PR[DR]=MR,DR++,58===DR?DR=65:91===DR&&(DR=97);function BR(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||A_(e)}function jR(e){return!w_(e)}function LR(e){return!(47===e||FR(e))}function FR(e){return 43===e||45===e||46===e||95===e||x_(e)}function VR(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}PR[43]=MR,PR[45]=MR,PR[46]=MR,PR[95]=MR,PR[72]=[MR,TR],PR[104]=[MR,TR],PR[87]=[MR,RR],PR[119]=[MR,RR];const zR={tokenize:function(e,t,n){const r=this;return P_(e,(function(e){const o=r.events[r.events.length-1];return o&&"gfmFootnoteDefinitionIndent"===o[1].type&&4===o[2].sliceSerialize(o[1],!0).length?t(e):n(e)}),"gfmFootnoteDefinitionIndent",5)},partial:!0};function GR(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;o--;){const e=r.events[o][1];if("labelImage"===e.type){a=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(o){if(!a||!a._balanced)return n(o);const s=v_(r.sliceSerialize({start:a.end,end:r.now()}));if(94!==s.codePointAt(0)||!i.includes(s.slice(1)))return n(o);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o)}}function HR(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function WR(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),s};function s(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(s){if(a>999||93===s&&!i||null===s||91===s||A_(s))return n(s);if(93===s){e.exit("chunkString");const i=e.exit("gfmFootnoteCallString");return o.includes(v_(r.sliceSerialize(i)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return A_(s)||(i=!0),a++,e.consume(s),92===s?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),a++,l):l(t)}}function XR(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a,s=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(t)}function c(t){if(s>999||93===t&&!a||null===t||91===t||A_(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return i=v_(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return A_(t)||(a=!0),s++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o.includes(i)||o.push(i),P_(e,p,"gfmFootnoteDefinitionWhitespace")):n(t)}function p(e){return t(e)}}function ZR(e,t,n){return e.check(H_,t,e.attempt(zR,t,n))}function $R(e){e.exit("gfmFootnoteDefinition")}function YR(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,r){const o=this.previous,i=this.events;let a=0;return function(t){if(126===o&&"characterEscape"!==i[i.length-1][1].type)return r(t);return e.enter("strikethroughSequenceTemporary"),s(t)};function s(i){const l=L_(o);if(126===i)return a>1?r(i):(e.consume(i),a++,s);if(a<2&&!t)return r(i);const c=e.exit("strikethroughSequenceTemporary"),u=L_(i);return c._open=!u||2===u&&Boolean(l),c._close=!l||2===l&&Boolean(u),n(i)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset==e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";const o={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},i={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},a=[["enter",o,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",i,t]],s=t.parser.constructs.insideSpan.null;s&&p_(a,a.length,0,F_(s,e.slice(r+1,n),t)),p_(a,a.length,0,[["exit",i,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",o,t]]),p_(e,r-1,n-r+3,a),n=r+a.length-2;break}}n=-1;for(;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}class UR{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let o=0;if(0===n&&0===r.length)return;for(;o<e.map.length;){if(e.map[o][0]===t)return e.map[o][1]+=n,void e.map[o][2].push(...r);o+=1}e.map.push([t,n,r])}(this,e,t,n)}consume(e){if(this.map.sort((function(e,t){return e[0]-t[0]})),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const t of r)e.push(t);r=n.pop()}this.map.length=0}}function JR(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if("enter"===o[0])"tableContent"===o[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===o[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===o[1].type)break}else"enter"===o[0]&&"tableDelimiterRow"===o[1].type&&(n=!0);t+=1}return r}function KR(e,t,n){const r=this;let o,i=0,a=0;return function(e){let t=r.events.length-1;for(;t>-1;){const e=r.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const o=t>-1?r.events[t][1].type:null,i="tableHead"===o||"tableRow"===o?w:s;if(i===w&&r.parser.lazy[r.now().line])return n(e);return i(e)};function s(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return l(e);return o=!0,a+=1,l(e)}(t)}function l(t){return null===t?n(t):__(t)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):N_(t)?P_(e,l,"whitespace")(t):(a+=1,o&&(o=!1,i+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),o=!0,l):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||A_(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return 92===t||124===t?(e.consume(t),c):c(t)}function d(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),o=!1,N_(t)?P_(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):p(t))}function p(t){return 45===t||58===t?h(t):124===t?(o=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),f):v(t)}function f(t){return N_(t)?P_(e,h,"whitespace")(t):h(t)}function h(t){return 58===t?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(a+=1,m(t)):null===t||__(t)?b(t):v(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),g(t)):v(t)}function g(t){return 45===t?(e.consume(t),g):58===t?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(t))}function y(t){return N_(t)?P_(e,b,"whitespace")(t):b(t)}function b(n){return 124===n?p(n):(null===n||__(n))&&o&&i===a?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):v(n)}function v(e){return n(e)}function w(t){return e.enter("tableRow"),x(t)}function x(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),x):null===n||__(n)?(e.exit("tableRow"),t(n)):N_(n)?P_(e,x,"whitespace")(n):(e.enter("data"),C(n))}function C(t){return null===t||124===t||A_(t)?(e.exit("data"),x(t)):(e.consume(t),92===t?k:C)}function k(t){return 92===t||124===t?(e.consume(t),C):C(t)}}function QR(e,t){let n,r,o,i=-1,a=!0,s=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,d=0;const p=new UR;for(;++i<e.length;){const f=e[i],h=f[1];"enter"===f[0]?"tableHead"===h.type?(u=!1,0!==d&&(eT(p,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(i,0,[["enter",n,t]])):"tableRow"===h.type||"tableDelimiterRow"===h.type?(a=!0,o=void 0,l=[0,0,0,0],c=[0,i+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(i,0,[["enter",r,t]])),s="tableDelimiterRow"===h.type?2:r?3:1):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type?"tableCellDivider"===h.type&&(a?a=!1:(0!==l[1]&&(c[0]=c[1],o=qR(p,t,l,s,void 0,o)),l=c,c=[l[1],i,0,0])):(a=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],o=qR(p,t,l,s,void 0,o),l=[0,0,0,0]),c[2]=i)):"tableHead"===h.type?(u=!0,d=i):"tableRow"===h.type||"tableDelimiterRow"===h.type?(d=i,0!==l[1]?(c[0]=c[1],o=qR(p,t,l,s,i,o)):0!==c[1]&&(o=qR(p,t,c,s,i,o)),s=0):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type||(c[3]=i)}for(0!==d&&eT(p,t,d,n,r),p.consume(t.events),i=-1;++i<t.events.length;){const e=t.events[i];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=JR(t.events,i))}return e}function qR(e,t,n,r,o,i){const a=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(i.end=Object.assign({},tT(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const s=tT(t.events,n[1]);if(i={type:a,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",i,t]]),0!==n[2]){const o=tT(t.events,n[2]),i=tT(t.events,n[3]),a={type:"tableContent",start:Object.assign({},o),end:Object.assign({},i)};if(e.add(n[2],0,[["enter",a,t]]),2!==r){const r=t.events[n[2]],o=t.events[n[3]];if(r[1].end=Object.assign({},o[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",a,t]])}return void 0!==o&&(i.end=Object.assign({},tT(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function eT(e,t,n,r,o){const i=[],a=tT(t.events,n);o&&(o.end=Object.assign({},a),i.push(["exit",o,t])),r.end=Object.assign({},a),i.push(["exit",r,t]),e.add(n+1,0,i)}function tT(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const nT={name:"tasklistCheck",tokenize:function(e,t,n){const r=this;return function(t){if(null!==r.previous||!r._gfmTasklistFirstContentOfListItem)return n(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),o};function o(t){return A_(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),i):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),i):n(t)}function i(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(t)}function a(r){return __(r)?t(r):N_(r)?e.check({tokenize:rT},t,n)(r):n(r)}}};function rT(e,t,n){return P_(e,(function(e){return null===e?n(e):t(e)}),"whitespace")}const oT={};function iT(e){const t=e||oT,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),i=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return m_([{text:PR},{document:{91:{name:"gfmFootnoteDefinition",tokenize:XR,continuation:{tokenize:ZR},exit:$R}},text:{91:{name:"gfmFootnoteCall",tokenize:WR},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:GR,resolveTo:HR}}},YR(e),{flow:{null:{name:"table",tokenize:KR,resolveAll:QR}}},{text:{91:nT}}])}(t)),o.push([{transforms:[_O],enter:{literalAutolink:xO,literalAutolinkEmail:CO,literalAutolinkHttp:CO,literalAutolinkWww:CO},exit:{literalAutolink:IO,literalAutolinkEmail:SO,literalAutolinkHttp:kO,literalAutolinkWww:EO}},{enter:{gfmFootnoteCallString:RO,gfmFootnoteCall:TO,gfmFootnoteDefinitionLabelString:MO,gfmFootnoteDefinition:PO},exit:{gfmFootnoteCallString:DO,gfmFootnoteCall:BO,gfmFootnoteDefinitionLabelString:jO,gfmFootnoteDefinition:LO}},{canContainEols:["delete"],enter:{strikethrough:WO},exit:{strikethrough:XO}},{enter:{table:mR,tableData:vR,tableHeader:vR,tableRow:yR},exit:{codeText:wR,table:gR,tableData:bR,tableHeader:bR,tableRow:bR}},{exit:{taskListCheckValueChecked:kR,taskListCheckValueUnchecked:kR,paragraph:ER}}]),i.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:vO,notInConstruct:wO},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:vO,notInConstruct:wO},{character:":",before:"[ps]",after:"\\/",inConstruct:vO,notInConstruct:wO}]},VO(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:HO}],handlers:{delete:ZO}},CR(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:SR}}]}}(t))}const aT=({item:e})=>{const n=o(CL);return t.createElement("div",{className:"libnodeentry",onClick:t=>{2===t.detail&&n.worker?.add_node(e.node_id)},title:e.description},e.node_name||e.node_id)},sT=(e,t)=>{const n=e.nodes?.some((e=>e.node_id.toLowerCase().includes(t.toLowerCase())))??!1,r=e.subshelves?.some((e=>sT(e,t)))??!1;return n||r},lT=({item:e,filter:n})=>{const[r,o]=c(!1),i=e.nodes?.filter((e=>e.node_id.toLowerCase().includes(n.toLowerCase()))),a=r||n.length>0;return sT(e,n)?t.createElement("div",{className:"shelfcontainer"},t.createElement("div",{className:"shelftitle",onClick:()=>o(!r),style:{cursor:"pointer"},title:e.description},t.createElement("div",{className:"shelftitle_text"},e.name),t.createElement("div",{className:"expandicon "+(a?"open":"close")},t.createElement(ew,null))),t.createElement("div",{className:"libnodecontainer "+(a?"open":"close")},t.createElement("div",{className:"libnodecontainer_inner"},i&&t.createElement(t.Fragment,null,i.map(((e,n)=>t.createElement(aT,{key:n,item:e})))),e.subshelves&&t.createElement(t.Fragment,null,e.subshelves.map(((e,r)=>t.createElement(lT,{key:r,item:e,filter:n})))))),t.createElement("hr",null)):t.createElement(t.Fragment,null)},cT=({filter:e,setFilter:n})=>t.createElement("div",{className:"libfilter"},t.createElement(ux,{fontSize:"inherit"}),t.createElement("input",{type:"text",placeholder:"Filter",value:e,onChange:e=>{n(e.target.value)}}),e&&t.createElement(cx,{fontSize:"inherit",onClick:()=>{n("")}})),uT=({availableModule:e})=>t.createElement("div",{className:"module-links"},e.homepage&&t.createElement(t.Fragment,null,t.createElement("a",{href:e.homepage,target:"_blank",rel:"noopener noreferrer"},"Homepage")),e.source&&e.homepage&&" | ",e.source&&t.createElement(t.Fragment,null,t.createElement("a",{href:e.source,target:"_blank",rel:"noopener noreferrer"},"Source"))),dT=({availableModule:e})=>{const[n,r]=c(!1),o=e.description.length>150?e.description.substring(0,150)+"...":e.description;return t.createElement("div",{className:"module-description"},t.createElement(fO,{remarkPlugins:[iT]},n?e.description.replace(/\\n/g," \n"):o.replace(/\\n/g," \n")),e.description.length>150&&t.createElement("button",{onClick:()=>r(!n),className:"toggle-description"},n?"Show less":"Show more"))},pT=({availableModule:e,on_change:n})=>{const[r,o]=c(e.version||"latest"),[i,a]=c(">=");return e.releases&&!e.releases.includes(r)&&e.releases.unshift(r),t.createElement(t.Fragment,null,t.createElement("select",{value:i,onChange:e=>{a(e.target.value),"latest"!==r&&n(e.target.value+r)}},t.createElement("option",{value:">="},">="),t.createElement("option",{value:"=="},"=="),t.createElement("option",{value:"<="},"<=")),t.createElement("select",{onChange:e=>{const t=e.target.value;o(t),n("latest"!==t?i+t:t)},value:r},e.releases&&e.releases.map((e=>t.createElement("option",{key:e,value:e},e)))))},fT=({availableModule:e,on_remove:n,on_update:r})=>{const[o,i]=c(e.version||"latest");return t.createElement("div",{className:"addable-module"},t.createElement("div",{className:"module-name"},e.name+(e.version?` (${e.version})`:"")),t.createElement(uT,{availableModule:e}),t.createElement(dT,{availableModule:e}),t.createElement("div",null,t.createElement(pT,{availableModule:e,on_change:i}),t.createElement("button",{className:"update-button",disabled:o===e.version,onClick:()=>{r(e,o)}},"Update"),t.createElement("button",{className:"remove-button",onClick:()=>{n(e)}},"Remove")))},hT=({availableModule:e,on_add:n})=>{const[r,o]=c(e.version||"latest");return t.createElement("div",{className:"addable-module"},t.createElement("div",{className:"module-name"},e.name+(e.version?` (${e.version})`:"")),t.createElement(uT,{availableModule:e}),t.createElement(dT,{availableModule:e}),t.createElement("div",null,t.createElement(pT,{availableModule:e,on_change:o}),t.createElement("button",{className:"add-button",onClick:()=>{n(e,r)}},"Add")))},mT=({availableModule:e,on_add:n})=>{const[r,o]=c(e.version||"latest");return t.createElement("div",{className:"addable-module"},t.createElement("div",{className:"module-name"},e.name),t.createElement(uT,{availableModule:e}),t.createElement(dT,{availableModule:e}),t.createElement("div",null,t.createElement(pT,{availableModule:e,on_change:o}),t.createElement("button",{className:"add-button",onClick:()=>{n(e,r)}},"Add")))},gT=({children:e})=>{const[n,r]=c(""),i=o(CL),[a,s]=c(!0),[l,u]=c(!0),[d,p]=c(!0),[f,h]=c({installed:[],available:[],active:[]}),[m,g]=c(!1);if(!i.worker)return t.createElement(t.Fragment,null);const y=(e,t)=>{g(!1),void 0!==i.worker&&i.worker.add_lib(e.name,t)},b=(e,t)=>{g(!1),void 0!==i.worker&&i.worker.add_lib(e.name,t)},v=e=>{g(!1),void 0!==i.worker&&i.worker.remove_lib(e.name)},w=(e,t)=>{g(!1),void 0!==i.worker&&i.worker.add_lib(e.name,t)},x=e=>e.filter((e=>e.name.toLowerCase().includes(n.toLowerCase())||e.description.toLowerCase().includes(n.toLowerCase()))),C=x(f.available),k=x(f.installed),E=x(f.active);return t.createElement(dx,{title:"Manage Library",trigger:e,description:"Add or remove libraries to the current worker.",onOpenChange:e=>{e&&void 0!==i.worker&&i.worker.is_open&&i.worker.get_available_modules().then((e=>{console.log(e),h(e)}))},open:m,setOpen:g},t.createElement("input",{className:"filter-input styledinput",type:"text",placeholder:"Filter modules...",value:n,onChange:e=>r(e.target.value)}),t.createElement("div",{className:"packagelist",style:{maxHeight:"70%",overflow:"auto"}},k.length>0&&t.createElement("h3",{onClick:()=>{p(!d)}},"Installed"),d&&k.map(((e,n)=>t.createElement(hT,{key:n,availableModule:e,on_add:y}))),C.length>0&&t.createElement("h3",{onClick:()=>{u(!l)}},"Available"),l&&C.map(((e,n)=>t.createElement(mT,{key:n,availableModule:e,on_add:b}))),E.length>0&&t.createElement("h3",{onClick:()=>{s(!a)}},"Active"),a&&E.map(((e,n)=>t.createElement(fT,{key:n,availableModule:e,on_remove:v,on_update:w})))))},yT=({ins:e})=>{const[n,r]=c(e.name),i=o(CL);return t.createElement(t.Fragment,null,t.createElement(dx,{title:e.name,description:"Settings for"+e.name,trigger:t.createElement("div",null,"Settings"),buttons:[{text:"Save",onClick:()=>{i.worker&&(i.worker.update_external_worker(e.uuid,e.nodeclassid,{name:n}),e.name=n)},close:!0},{text:"Delete",onClick:()=>{i.worker&&i.worker.remove_external_worker(e.uuid,e.nodeclassid)},close:!0}]},t.createElement("div",null,t.createElement("div",null,t.createElement("label",{htmlFor:"name"},"Name: "),t.createElement("input",{type:"text",name:"name",value:n,onChange:e=>r(e.target.value),className:"styledinput"})))))},bT=({ins:e,lib:n,filter:r=""})=>{const[o,i]=c(!1),a=n?.nodes?.filter((e=>e.node_id.toLowerCase().includes(r.toLowerCase())));return t.createElement("div",{className:"shelfcontainer"},t.createElement("div",{className:"shelftitle",onClick:()=>i(!o),style:{cursor:"pointer"},title:e.name},t.createElement("div",{className:"shelftitle_text"},e.name),t.createElement("div",{className:"expandicon "+(o?"open":"close")},t.createElement(ew,null))),t.createElement("div",{className:"libnodecontainer "+(o?"open":"close")},t.createElement("div",{className:"libnodecontainer_inner"},o&&t.createElement(t.Fragment,null,t.createElement("div",{className:"libnodeentry",title:e.uuid},t.createElement(yT,{ins:e})),n&&t.createElement(t.Fragment,null,a&&t.createElement(t.Fragment,null,a.map(((e,n)=>t.createElement(aT,{key:n,item:e})))),n.subshelves.map(((e,n)=>t.createElement(lT,{key:n,item:e,filter:r}))))))))},vT=({item:e,mod:n,lib:r})=>{const i=o(CL),[a,s]=c(!1),l=e.name||e.module+"."+e.class_name;return t.createElement("div",{className:"shelfcontainer"},t.createElement("div",{className:"shelftitle",onClick:()=>s(!a),style:{cursor:"pointer"},title:l},t.createElement("div",{className:"shelftitle_text"},l),t.createElement("div",{className:"expandicon "+(a?"open":"close")},t.createElement(ew,null))),t.createElement("div",{className:"libnodecontainer "+(a?"open":"close")},t.createElement("div",{className:"libnodecontainer_inner"},a&&t.createElement(t.Fragment,null,t.createElement("div",{className:"libnodeentry",onClick:t=>{2===t.detail&&i.worker?.add_external_worker({module:n,cls_module:e.module,cls_name:e.class_name})},title:e.name},"New Instance"),e.instances.map(((e,n)=>t.createElement(bT,{key:n,ins:e,lib:r?.subshelves.find((t=>t.name===e.uuid))})))))))},wT=({externalworkermod:e,lib:n})=>{const[r,o]=c(!1),i=r;return t.createElement("div",{className:"shelfcontainer"},t.createElement("div",{className:"shelftitle",onClick:()=>o(!r),style:{cursor:"pointer"},title:e.module},t.createElement("div",{className:"shelftitle_text"},e.module),t.createElement("div",{className:"expandicon "+(i?"open":"close")},t.createElement(ew,null))),t.createElement("div",{className:"libnodecontainer "+(i?"open":"close")},t.createElement("div",{className:"libnodecontainer_inner"},e.worker_classes.map(((r,o)=>t.createElement(vT,{key:o,item:r,mod:e.module,lib:n}))))),t.createElement("hr",null))},xT=()=>{const e=o(CL),n=e.lib.libstate(),[r,i]=c(""),a=e.worker?.state((e=>e.is_open))??!1;return t.createElement("div",{className:"libcontainer"},t.createElement("div",{className:"library"},t.createElement("div",{className:"libtitle"},"Lib"),t.createElement("hr",{className:"hr_prominent"}),t.createElement(cT,{filter:r,setFilter:i}),t.createElement("div",{className:"vscrollcontainer"},n.lib.shelves.map(((e,n)=>"_external_worker"==e.name?t.createElement(t.Fragment,null):t.createElement(lT,{key:n,item:e,filter:r})))),t.createElement("hr",null),t.createElement("div",{className:"libtitle"},"External Worker"),t.createElement("hr",{className:"hr_prominent"}),t.createElement("div",{className:"vscrollcontainer"},n.external_worker?.map(((e,r)=>t.createElement(wT,{key:r,externalworkermod:e,lib:n.lib.shelves.find((e=>"_external_worker"===e.name))})))),t.createElement("hr",null)),t.createElement("div",{style:{paddingTop:"0.5rem"}}),a&&t.createElement("div",{className:"addlib"},t.createElement(gT,null,t.createElement("button",null,"Manage Libraries"))))};const{useRef:CT}=t;function kT(e){const t=CT();return n=>{const r=e(n);return function(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[n,r]of e)if(!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))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}(t.current,r)?t.current:t.current=r}}var ET=e.forwardRef(((e,t)=>nd.jsx(md.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})));ET.displayName="VisuallyHidden";var ST=ET,[IT,_T]=rd("Tooltip",[YC]),AT=YC(),NT="TooltipProvider",OT=700,RT="tooltip.open",[TT,MT]=IT(NT),PT=t=>{const{__scopeTooltip:n,delayDuration:r=OT,skipDelayDuration:o=300,disableHoverableContent:i=!1,children:a}=t,[s,l]=e.useState(!0),c=e.useRef(!1),u=e.useRef(0);return e.useEffect((()=>{const e=u.current;return()=>window.clearTimeout(e)}),[]),nd.jsx(TT,{scope:n,isOpenDelayed:s,delayDuration:r,onOpen:e.useCallback((()=>{window.clearTimeout(u.current),l(!1)}),[]),onClose:e.useCallback((()=>{window.clearTimeout(u.current),u.current=window.setTimeout((()=>l(!0)),o)}),[o]),isPointerInTransitRef:c,onPointerInTransitChange:e.useCallback((e=>{c.current=e}),[]),disableHoverableContent:i,children:a})};PT.displayName=NT;var DT="Tooltip",[BT,jT]=IT(DT),LT=t=>{const{__scopeTooltip:n,children:r,open:o,defaultOpen:i=!1,onOpenChange:a,disableHoverableContent:s,delayDuration:l}=t,c=MT(DT,t.__scopeTooltip),u=AT(n),[d,p]=e.useState(null),f=ld(),h=e.useRef(0),m=s??c.disableHoverableContent,g=l??c.delayDuration,y=e.useRef(!1),[b=!1,v]=ud({prop:o,defaultProp:i,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(RT))):c.onClose(),a?.(e)}}),w=e.useMemo((()=>b?y.current?"delayed-open":"instant-open":"closed"),[b]),x=e.useCallback((()=>{window.clearTimeout(h.current),h.current=0,y.current=!1,v(!0)}),[v]),C=e.useCallback((()=>{window.clearTimeout(h.current),h.current=0,v(!1)}),[v]),k=e.useCallback((()=>{window.clearTimeout(h.current),h.current=window.setTimeout((()=>{y.current=!0,v(!0),h.current=0}),g)}),[g,v]);return e.useEffect((()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)}),[]),nd.jsx(uk,{...u,children:nd.jsx(BT,{scope:n,contentId:f,open:b,stateAttribute:w,trigger:d,onTriggerChange:p,onTriggerEnter:e.useCallback((()=>{c.isOpenDelayed?k():x()}),[c.isOpenDelayed,k,x]),onTriggerLeave:e.useCallback((()=>{m?C():(window.clearTimeout(h.current),h.current=0)}),[C,m]),onOpen:x,onClose:C,disableHoverableContent:m,children:r})})};LT.displayName=DT;var FT="TooltipTrigger",VT=e.forwardRef(((t,n)=>{const{__scopeTooltip:r,...o}=t,i=jT(FT,r),a=MT(FT,r),s=AT(r),l=Yu(n,e.useRef(null),i.onTriggerChange),c=e.useRef(!1),u=e.useRef(!1),d=e.useCallback((()=>c.current=!1),[]);return e.useEffect((()=>()=>document.removeEventListener("pointerup",d)),[d]),nd.jsx(dk,{asChild:!0,...s,children:nd.jsx(md.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...o,ref:l,onPointerMove:Xu(t.onPointerMove,(e=>{"touch"!==e.pointerType&&(u.current||a.isPointerInTransitRef.current||(i.onTriggerEnter(),u.current=!0))})),onPointerLeave:Xu(t.onPointerLeave,(()=>{i.onTriggerLeave(),u.current=!1})),onPointerDown:Xu(t.onPointerDown,(()=>{c.current=!0,document.addEventListener("pointerup",d,{once:!0})})),onFocus:Xu(t.onFocus,(()=>{c.current||i.onOpen()})),onBlur:Xu(t.onBlur,i.onClose),onClick:Xu(t.onClick,i.onClose)})})}));VT.displayName=FT;var zT="TooltipPortal",[GT,HT]=IT(zT,{forceMount:void 0}),WT=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=jT(zT,t);return nd.jsx(GT,{scope:t,forceMount:n,children:nd.jsx(jd,{present:n||i.open,children:nd.jsx(Bd,{asChild:!0,container:o,children:r})})})};WT.displayName=zT;var XT="TooltipContent",ZT=e.forwardRef(((e,t)=>{const n=HT(XT,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=jT(XT,e.__scopeTooltip);return nd.jsx(jd,{present:r||a.open,children:a.disableHoverableContent?nd.jsx(JT,{side:o,...i,ref:t}):nd.jsx($T,{side:o,...i,ref:t})})})),$T=e.forwardRef(((t,n)=>{const r=jT(XT,t.__scopeTooltip),o=MT(XT,t.__scopeTooltip),i=e.useRef(null),a=Yu(n,i),[s,l]=e.useState(null),{trigger:c,onClose:u}=r,d=i.current,{onPointerInTransitChange:p}=o,f=e.useCallback((()=>{l(null),p(!1)}),[p]),h=e.useCallback(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=function(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}(r,n.getBoundingClientRect()),i=function(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}(r,o),a=function(e){const t=e.slice();return t.sort(((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0)),function(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const r=e[n];for(;t.length>=2;){const e=t[t.length-1],n=t[t.length-2];if(!((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x)))break;t.pop()}t.push(r)}t.pop();const n=[];for(let t=e.length-1;t>=0;t--){const r=e[t];for(;n.length>=2;){const e=n[n.length-1],t=n[n.length-2];if(!((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x)))break;n.pop()}n.push(r)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}(t)}([...i,...function(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}(t.getBoundingClientRect())]);l(a),p(!0)}),[p]);return e.useEffect((()=>()=>f()),[f]),e.useEffect((()=>{if(c&&d){const e=e=>h(e,d),t=e=>h(e,c);return c.addEventListener("pointerleave",e),d.addEventListener("pointerleave",t),()=>{c.removeEventListener("pointerleave",e),d.removeEventListener("pointerleave",t)}}}),[c,d,h,f]),e.useEffect((()=>{if(s){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||d?.contains(t),o=!function(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){const a=t[e].x,s=t[e].y,l=t[i].x,c=t[i].y;s>r!=c>r&&n<(l-a)*(r-s)/(c-s)+a&&(o=!o)}return o}(n,s);r?f():o&&(f(),u())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[c,d,s,u,f]),nd.jsx(JT,{...t,ref:a})})),[YT,UT]=IT(DT,{isInside:!1}),JT=e.forwardRef(((t,n)=>{const{__scopeTooltip:r,children:o,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:s,...l}=t,c=jT(XT,r),u=AT(r),{onClose:d}=c;return e.useEffect((()=>(document.addEventListener(RT,d),()=>document.removeEventListener(RT,d))),[d]),e.useEffect((()=>{if(c.trigger){const e=e=>{const t=e.target;t?.contains(c.trigger)&&d()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[c.trigger,d]),nd.jsx(Cd,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:nd.jsxs(pk,{"data-state":c.stateAttribute,...u,...l,ref:n,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[nd.jsx(fd,{children:o}),nd.jsx(YT,{scope:r,isInside:!0,children:nd.jsx(ST,{id:c.contentId,role:"tooltip",children:i||o})})]})})}));ZT.displayName=XT;var KT="TooltipArrow",QT=e.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=AT(n);return UT(KT,n).isInside?null:nd.jsx(fk,{...o,...r,ref:t})}));QT.displayName=KT;var qT=PT,eM=LT,tM=VT,nM=WT,rM=ZT,oM=QT,iM="Popover",[aM,sM]=rd(iM,[YC]),lM=YC(),[cM,uM]=aM(iM),dM=t=>{const{__scopePopover:n,children:r,open:o,defaultOpen:i,onOpenChange:a,modal:s=!1}=t,l=lM(n),c=e.useRef(null),[u,d]=e.useState(!1),[p=!1,f]=ud({prop:o,defaultProp:i,onChange:a});return nd.jsx(uk,{...l,children:nd.jsx(cM,{scope:n,contentId:ld(),triggerRef:c,open:p,onOpenChange:f,onOpenToggle:e.useCallback((()=>f((e=>!e))),[f]),hasCustomAnchor:u,onCustomAnchorAdd:e.useCallback((()=>d(!0)),[]),onCustomAnchorRemove:e.useCallback((()=>d(!1)),[]),modal:s,children:r})})};dM.displayName=iM;var pM="PopoverAnchor";e.forwardRef(((t,n)=>{const{__scopePopover:r,...o}=t,i=uM(pM,r),a=lM(r),{onCustomAnchorAdd:s,onCustomAnchorRemove:l}=i;return e.useEffect((()=>(s(),()=>l())),[s,l]),nd.jsx(dk,{...a,...o,ref:n})})).displayName=pM;var fM="PopoverTrigger",hM=e.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=uM(fM,n),i=lM(n),a=Yu(t,o.triggerRef),s=nd.jsx(md.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":SM(o.open),...r,ref:a,onClick:Xu(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?s:nd.jsx(dk,{asChild:!0,...i,children:s})}));hM.displayName=fM;var mM="PopoverPortal",[gM,yM]=aM(mM,{forceMount:void 0}),bM=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,i=uM(mM,t);return nd.jsx(gM,{scope:t,forceMount:n,children:nd.jsx(jd,{present:n||i.open,children:nd.jsx(Bd,{asChild:!0,container:o,children:r})})})};bM.displayName=mM;var vM="PopoverContent",wM=e.forwardRef(((e,t)=>{const n=yM(vM,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,i=uM(vM,e.__scopePopover);return nd.jsx(jd,{present:r||i.open,children:i.modal?nd.jsx(xM,{...o,ref:t}):nd.jsx(CM,{...o,ref:t})})}));wM.displayName=vM;var xM=e.forwardRef(((t,n)=>{const r=uM(vM,t.__scopePopover),o=e.useRef(null),i=Yu(n,o),a=e.useRef(!1);return e.useEffect((()=>{const e=o.current;if(e)return Bp(e)}),[]),nd.jsx(Np,{as:dd,allowPinchZoom:!0,children:nd.jsx(kM,{...t,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Xu(t.onCloseAutoFocus,(e=>{e.preventDefault(),a.current||r.triggerRef.current?.focus()})),onPointerDownOutside:Xu(t.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;a.current=r}),{checkForDefaultPrevented:!1}),onFocusOutside:Xu(t.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),CM=e.forwardRef(((t,n)=>{const r=uM(vM,t.__scopePopover),o=e.useRef(!1),i=e.useRef(!1);return nd.jsx(kM,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||r.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(i.current=!0));const n=e.target,a=r.triggerRef.current?.contains(n);a&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}})})),kM=e.forwardRef(((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,...d}=e,p=uM(vM,n),f=lM(n);return Vd(),nd.jsx(Nd,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:nd.jsx(Cd,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>p.onOpenChange(!1),children:nd.jsx(pk,{"data-state":SM(p.open),role:"dialog",id:p.contentId,...f,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})})),EM="PopoverClose";e.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=uM(EM,n);return nd.jsx(md.button,{type:"button",...r,ref:t,onClick:Xu(e.onClick,(()=>o.onOpenChange(!1)))})})).displayName=EM;function SM(e){return e?"open":"closed"}e.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=lM(n);return nd.jsx(fk,{...o,...r,ref:t})})).displayName="PopoverArrow";var IM,_M,AM,NM,OM,RM,TM,MM,PM=dM,DM=hM,BM=bM,jM=wM;function LM(){if(NM)return AM;NM=1;const e=_M?IM:(_M=1,IM={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),t={};for(const n of Object.keys(e))t[e[n]]=n;const n={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};AM=n;for(const e of Object.keys(n)){if(!("channels"in n[e]))throw new Error("missing channels property: "+e);if(!("labels"in n[e]))throw new Error("missing channel labels property: "+e);if(n[e].labels.length!==n[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:r}=n[e];delete n[e].channels,delete n[e].labels,Object.defineProperty(n[e],"channels",{value:t}),Object.defineProperty(n[e],"labels",{value:r})}return n.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=i-o;let s,l;i===o?s=0:t===i?s=(n-r)/a:n===i?s=2+(r-t)/a:r===i&&(s=4+(t-n)/a),s=Math.min(60*s,360),s<0&&(s+=360);const c=(o+i)/2;return l=i===o?0:c<=.5?a/(i+o):a/(2-i-o),[s,100*l,100*c]},n.rgb.hsv=function(e){let t,n,r,o,i;const a=e[0]/255,s=e[1]/255,l=e[2]/255,c=Math.max(a,s,l),u=c-Math.min(a,s,l),d=function(e){return(c-e)/6/u+.5};return 0===u?(o=0,i=0):(i=u/c,t=d(a),n=d(s),r=d(l),a===c?o=r-n:s===c?o=1/3+t-r:l===c&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[360*o,100*i,100*c]},n.rgb.hwb=function(e){const t=e[0],r=e[1];let o=e[2];const i=n.rgb.hsl(e)[0],a=1/255*Math.min(t,Math.min(r,o));return o=1-1/255*Math.max(t,Math.max(r,o)),[i,100*a,100*o]},n.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r);return[100*((1-t-o)/(1-o)||0),100*((1-n-o)/(1-o)||0),100*((1-r-o)/(1-o)||0),100*o]},n.rgb.keyword=function(n){const r=t[n];if(r)return r;let o,i=1/0;for(const t of Object.keys(e)){const r=e[t],l=(s=r,((a=n)[0]-s[0])**2+(a[1]-s[1])**2+(a[2]-s[2])**2);l<i&&(i=l,o=t)}var a,s;return o},n.keyword.rgb=function(t){return e[t]},n.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;return[100*(.4124*t+.3576*n+.1805*r),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},n.rgb.lab=function(e){const t=n.rgb.xyz(e);let r=t[0],o=t[1],i=t[2];r/=95.047,o/=100,i/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;return[116*o-16,500*(r-o),200*(o-i)]},n.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,i,a;if(0===n)return a=255*r,[a,a,a];o=r<.5?r*(1+n):r+n-r*n;const s=2*r-o,l=[0,0,0];for(let e=0;e<3;e++)i=t+1/3*-(e-1),i<0&&i++,i>1&&i--,a=6*i<1?s+6*(o-s)*i:2*i<1?o:3*i<2?s+(o-s)*(2/3-i)*6:s,l[e]=255*a;return l},n.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,o=n;const i=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=i<=1?i:2-i;return[t,100*(0===r?2*o/(i+o):2*n/(r+n)),100*((r+n)/2)]},n.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6,i=t-Math.floor(t),a=255*r*(1-n),s=255*r*(1-n*i),l=255*r*(1-n*(1-i));switch(r*=255,o){case 0:return[r,l,a];case 1:return[s,r,a];case 2:return[a,r,l];case 3:return[a,s,r];case 4:return[l,a,r];case 5:return[r,a,s]}},n.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let i,a;a=(2-n)*r;const s=(2-n)*o;return i=n*o,i/=s<=1?s:2-s,i=i||0,a/=2,[t,100*i,100*a]},n.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const o=n+r;let i;o>1&&(n/=o,r/=o);const a=Math.floor(6*t),s=1-r;i=6*t-a,1&a&&(i=1-i);const l=n+i*(s-n);let c,u,d;switch(a){default:case 6:case 0:c=s,u=l,d=n;break;case 1:c=l,u=s,d=n;break;case 2:c=n,u=s,d=l;break;case 3:c=n,u=l,d=s;break;case 4:c=l,u=n,d=s;break;case 5:c=s,u=n,d=l}return[255*c,255*u,255*d]},n.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100;return[255*(1-Math.min(1,t*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,r*(1-o)+o))]},n.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,i,a;return o=3.2406*t+-1.5372*n+-.4986*r,i=-.9689*t+1.8758*n+.0415*r,a=.0557*t+-.204*n+1.057*r,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,o=Math.min(Math.max(0,o),1),i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),[255*o,255*i,255*a]},n.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;return[116*n-16,500*(t-n),200*(n-r)]},n.lab.xyz=function(e){let t,n,r;n=(e[0]+16)/116,t=e[1]/500+n,r=n-e[2]/200;const o=n**3,i=t**3,a=r**3;return n=o>.008856?o:(n-16/116)/7.787,t=i>.008856?i:(t-16/116)/7.787,r=a>.008856?a:(r-16/116)/7.787,t*=95.047,n*=100,r*=108.883,[t,n,r]},n.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let o;o=360*Math.atan2(r,n)/2/Math.PI,o<0&&(o+=360);return[t,Math.sqrt(n*n+r*r),o]},n.lch.lab=function(e){const t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},n.rgb.ansi16=function(e,t=null){const[r,o,i]=e;let a=null===t?n.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),0===a)return 30;let s=30+(Math.round(i/255)<<2|Math.round(o/255)<<1|Math.round(r/255));return 2===a&&(s+=60),s},n.hsv.ansi16=function(e){return n.rgb.ansi16(n.hsv.rgb(e),e[2])},n.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];if(t===n&&n===r)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},n.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},n.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},n.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},n.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];3===t[0].length&&(n=n.split("").map((e=>e+e)).join(""));const r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},n.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.max(Math.max(t,n),r),i=Math.min(Math.min(t,n),r),a=o-i;let s,l;return s=a<1?i/(1-a):0,l=a<=0?0:o===t?(n-r)/a%6:o===n?2+(r-t)/a:4+(t-n)/a,l/=6,l%=1,[360*l,100*a,100*s]},n.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],100*r,100*o]},n.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},n.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];const o=[0,0,0],i=t%1*6,a=i%1,s=1-a;let l=0;switch(Math.floor(i)){case 0:o[0]=1,o[1]=a,o[2]=0;break;case 1:o[0]=s,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=a;break;case 3:o[0]=0,o[1]=s,o[2]=1;break;case 4:o[0]=a,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=s}return l=(1-n)*r,[255*(n*o[0]+l),255*(n*o[1]+l),255*(n*o[2]+l)]},n.hcg.hsv=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);let r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},n.hcg.hsl=function(e){const t=e[1]/100,n=e[2]/100*(1-t)+.5*t;let r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},n.hcg.hwb=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},n.hwb.hcg=function(e){const t=e[1]/100,n=1-e[2]/100,r=n-t;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},n.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},n.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},n.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},n.gray.hsl=function(e){return[0,0,e[0]]},n.gray.hsv=n.gray.hsl,n.gray.hwb=function(e){return[0,100,e[0]]},n.gray.cmyk=function(e){return[0,0,0,e[0]]},n.gray.lab=function(e){return[e[0],0,0]},n.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},n.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]},AM}function FM(){if(RM)return OM;RM=1;const e=LM();function t(t){const n=function(){const t={},n=Object.keys(e);for(let e=n.length,r=0;r<e;r++)t[n[r]]={distance:-1,parent:null};return t}(),r=[t];for(n[t].distance=0;r.length;){const t=r.pop(),o=Object.keys(e[t]);for(let e=o.length,i=0;i<e;i++){const e=o[i],a=n[e];-1===a.distance&&(a.distance=n[t].distance+1,a.parent=t,r.unshift(e))}}return n}function n(e,t){return function(n){return t(e(n))}}function r(t,r){const o=[r[t].parent,t];let i=e[r[t].parent][t],a=r[t].parent;for(;r[a].parent;)o.unshift(r[a].parent),i=n(e[r[a].parent][a],i),a=r[a].parent;return i.conversion=o,i}return OM=function(e){const n=t(e),o={},i=Object.keys(n);for(let e=i.length,t=0;t<e;t++){const e=i[t];null!==n[e].parent&&(o[e]=r(e,n))}return o},OM}var VM=function(){if(MM)return TM;MM=1;const e=LM(),t=FM(),n={};return Object.keys(e).forEach((r=>{n[r]={},Object.defineProperty(n[r],"channels",{value:e[r].channels}),Object.defineProperty(n[r],"labels",{value:e[r].labels});const o=t(r);Object.keys(o).forEach((e=>{const t=o[e];n[r][e]=function(e){const t=function(...t){const n=t[0];if(null==n)return n;n.length>1&&(t=n);const r=e(t);if("object"==typeof r)for(let e=r.length,t=0;t<e;t++)r[t]=Math.round(r[t]);return r};return"conversion"in e&&(t.conversion=e.conversion),t}(t),n[r][e].raw=function(e){const t=function(...t){const n=t[0];return null==n?n:(n.length>1&&(t=n),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(t)}))})),TM=n}(),zM=S(VM);const GM=(e,t)=>{if(Array.isArray(t)||(t=[t]),void 0===t[0]||null===t[0])return GM("rgb",[0,0,0]);const n=zM[e];if(!n)throw new Error("Unsupported color type: "+e);n[e]=()=>t;const r=n.rgb(t);if(!Array.isArray(r))return GM("rgb",[0,0,0]);if(void 0===r[0]||null===r[0])return GM("rgb",[0,0,0]);const o=n.hsl(t);if(!Array.isArray(o))return GM("rgb",[0,0,0]);if(void 0===o[0]||null===o[0])return GM("rgb",[0,0,0]);const i={};return Object.keys(n).forEach((e=>{const r=n[e];"function"==typeof r&&(i[e]=()=>r.apply(null,t))})),i},HM=({onChange:e,colorconverter:n,allow_null:r=!1})=>{if(null===n&&!r)throw new Error("Color converter is null");const[o,i]=c(n),[a,l]=c([0,0,0]),[u,d]=c([0,0,0]),[p,f]=c([0,0,0]),[h,m]=c("000");s((()=>{if(!o){if(!r)throw new Error("Color converter is null");return d([0,0,0]),l([0,0,0]),f([0,0,0]),void m("")}l(o.hsl()),d(o.rgb()),f(o.hsv()),m(o.hex())}),[o]);const g={backgroundColor:`hsl(${a[0]}, ${a[1]}%, ${a[2]}%)`,padding:"10px",margin:"10px 0"};return t.createElement("div",{style:{backgroundColor:"white"}},t.createElement("div",{style:g},"Color Preview"),t.createElement("div",{className:"colorspace"},t.createElement("div",{className:"colorspace_title"},"RGB"),t.createElement("div",null),t.createElement("label",null,"Red"),t.createElement("input",{type:"range",min:"0",max:"255",value:u[0],onChange:t=>{const n=[parseInt(t.target.value),u[1],u[2]],r=GM("rgb",n);i(r),e(r)},style:{background:"linear-gradient(to right, #000, #f00)"}}),t.createElement("label",null,"Green"),t.createElement("input",{type:"range",min:"0",max:"255",value:u[1],onChange:t=>{const n=[u[0],parseInt(t.target.value),u[2]],r=GM("rgb",n);i(r),e(r)},style:{background:"linear-gradient(to right, #000, #0f0)"}}),t.createElement("label",null,"Blue"),t.createElement("input",{type:"range",min:"0",max:"255",value:u[2],onChange:t=>{const n=[u[0],u[1],parseInt(t.target.value)],r=GM("rgb",n);i(r),e(r)},style:{background:"linear-gradient(to right, #000, #00f)"}})),t.createElement("div",{className:"colorspace"},t.createElement("div",{className:"colorspace_title"},"HSL"),t.createElement("div",null),t.createElement("label",null,"Hue"),t.createElement("input",{type:"range",min:"0",max:"360",value:a[0],onChange:t=>{const n=[parseInt(t.target.value),a[1],a[2]],r=GM("hsl",n);i(r),e(r)},style:{background:"linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00)"}}),t.createElement("label",null,"Saturation"),t.createElement("input",{type:"range",min:"0",max:"100",value:a[1],onChange:t=>{const n=[a[0],parseInt(t.target.value),a[2]],r=GM("hsl",n);i(r),e(r)},style:{background:`linear-gradient(to right, #fff, hsl(${a[0]}, 100%, 50%))`}}),t.createElement("label",null,"Lightness"),t.createElement("input",{type:"range",min:"0",max:"100",value:a[2],onChange:t=>{const n=[a[0],a[1],parseInt(t.target.value)],r=GM("hsl",n);i(r),e(r)},style:{background:`linear-gradient(to right, #000, hsl(${a[0]}, 100%, 50%), #fff)`}})),t.createElement("div",{className:"colorspace"},t.createElement("div",{className:"colorspace_title"},"HSV"),t.createElement("div",null),t.createElement("label",null,"Hue"),t.createElement("input",{type:"range",min:"0",max:"360",value:p[0],onChange:t=>{const n=[parseInt(t.target.value),p[1],p[2]],r=GM("hsv",n);i(r),e(r)},style:{background:"linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00)"}}),t.createElement("label",null,"Saturation"),t.createElement("input",{type:"range",min:"0",max:"100",value:p[1],onChange:t=>{const n=[p[0],parseInt(t.target.value),p[2]],r=GM("hsv",n);i(r),e(r)},style:{background:`linear-gradient(to right, #fff, hsl(${a[0]}, 100%, 50%))`}}),t.createElement("label",null,"Value"),t.createElement("input",{type:"range",min:"0",max:"100",value:p[2],onChange:t=>{const n=[p[0],p[1],parseInt(t.target.value)],r=GM("hsv",n);i(r),e(r)},style:{background:`linear-gradient(to right, #000, hsl(${a[0]}, 100%, 50%))`}})),t.createElement("div",{className:"colorspace"},t.createElement("div",{className:"colorspace_title"},"HEX"),t.createElement("div",null),t.createElement("input",{type:"text",value:h,onChange:t=>{const n=""===t.target.value?null:GM("hex",[t.target.value]);i(n),e(n)}})))},WM=({inicolordata:e,inicolorspace:n="hex",allow_null:r=!1,onChange:o})=>{void 0===e&&(e=[0,0,0],n="rgb"),Array.isArray(e)||(e=[e]);let i=GM(n,e);void 0===i.rgb()&&(i=GM("rgb",[0,0,0]));const[a,s]=c(i),l={background:"#"+a.hex(),borderRadius:"0.3rem",width:"2rem",height:"1rem"};return t.createElement(PM,null,t.createElement(DM,{asChild:!0},t.createElement("button",{style:l})),t.createElement(BM,null,t.createElement(jM,{side:"left"},t.createElement(HM,{onChange:e=>{if(null===e&&!r)throw new Error("Color is null");null!==e&&s(e),o&&o(e)},colorconverter:a,allow_null:r}))))};function XM(e,[t,n]){return Math.min(n,Math.max(t,e))}var ZM=["PageUp","PageDown"],$M=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],YM={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},UM="Slider",[JM,KM,QM]=px(UM),[qM,eP]=rd(UM,[QM]),[tP,nP]=qM(UM),rP=e.forwardRef(((t,n)=>{const{name:r,min:o=0,max:i=100,step:a=1,orientation:s="horizontal",disabled:l=!1,minStepsBetweenThumbs:c=0,defaultValue:u=[o],value:d,onValueChange:p=()=>{},onValueCommit:f=()=>{},inverted:h=!1,form:m,...g}=t,y=e.useRef(new Set),b=e.useRef(0),v="horizontal"===s?aP:sP,[w=[],x]=ud({prop:d,defaultProp:u,onChange:e=>{const t=[...y.current];t[b.current]?.focus(),p(e)}}),C=e.useRef(w);function k(e,t,{commit:n}={commit:!1}){const r=function(e){return(String(e).split(".")[1]||"").length}(a),s=function(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}(Math.round((e-o)/a)*a+o,r),l=XM(s,[o,i]);x(((e=[])=>{const r=function(e=[],t,n){const r=[...e];return r[n]=t,r.sort(((e,t)=>e-t))}(e,l,t);if(function(e,t){if(t>0){const n=function(e){return e.slice(0,-1).map(((t,n)=>e[n+1]-t))}(e);return Math.min(...n)>=t}return!0}(r,c*a)){b.current=r.indexOf(l);const t=String(r)!==String(e);return t&&n&&f(r),t?r:e}return e}))}return nd.jsx(tP,{scope:t.__scopeSlider,name:r,disabled:l,min:o,max:i,valueIndexToChangeRef:b,thumbs:y.current,values:w,orientation:s,form:m,children:nd.jsx(JM.Provider,{scope:t.__scopeSlider,children:nd.jsx(JM.Slot,{scope:t.__scopeSlider,children:nd.jsx(v,{"aria-disabled":l,"data-disabled":l?"":void 0,...g,ref:n,onPointerDown:Xu(g.onPointerDown,(()=>{l||(C.current=w)})),min:o,max:i,inverted:h,onSlideStart:l?void 0:function(e){const t=function(e,t){if(1===e.length)return 0;const n=e.map((e=>Math.abs(e-t))),r=Math.min(...n);return n.indexOf(r)}(w,e);k(e,t)},onSlideMove:l?void 0:function(e){k(e,b.current)},onSlideEnd:l?void 0:function(){const e=C.current[b.current];w[b.current]!==e&&f(w)},onHomeKeyDown:()=>!l&&k(o,0,{commit:!0}),onEndKeyDown:()=>!l&&k(i,w.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!l){const n=ZM.includes(e.key)||e.shiftKey&&$M.includes(e.key)?10:1,r=b.current;k(w[r]+a*n*t,r,{commit:!0})}}})})})})}));rP.displayName=UM;var[oP,iP]=qM(UM,{startEdge:"left",endEdge:"right",size:"width",direction:1}),aP=e.forwardRef(((t,n)=>{const{min:r,max:o,dir:i,inverted:a,onSlideStart:s,onSlideMove:l,onSlideEnd:c,onStepKeyDown:u,...d}=t,[p,f]=e.useState(null),h=Yu(n,(e=>f(e))),m=e.useRef(void 0),g=hx(i),y="ltr"===g,b=y&&!a||!y&&a;function v(e){const t=m.current||p.getBoundingClientRect(),n=bP([0,t.width],b?[r,o]:[o,r]);return m.current=t,n(e-t.left)}return nd.jsx(oP,{scope:t.__scopeSlider,startEdge:b?"left":"right",endEdge:b?"right":"left",direction:b?1:-1,size:"width",children:nd.jsx(lP,{dir:g,"data-orientation":"horizontal",...d,ref:h,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{const t=v(e.clientX);s?.(t)},onSlideMove:e=>{const t=v(e.clientX);l?.(t)},onSlideEnd:()=>{m.current=void 0,c?.()},onStepKeyDown:e=>{const t=YM[b?"from-left":"from-right"].includes(e.key);u?.({event:e,direction:t?-1:1})}})})})),sP=e.forwardRef(((t,n)=>{const{min:r,max:o,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:l,onStepKeyDown:c,...u}=t,d=e.useRef(null),p=Yu(n,d),f=e.useRef(void 0),h=!i;function m(e){const t=f.current||d.current.getBoundingClientRect(),n=bP([0,t.height],h?[o,r]:[r,o]);return f.current=t,n(e-t.top)}return nd.jsx(oP,{scope:t.__scopeSlider,startEdge:h?"bottom":"top",endEdge:h?"top":"bottom",size:"height",direction:h?1:-1,children:nd.jsx(lP,{"data-orientation":"vertical",...u,ref:p,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{const t=m(e.clientY);a?.(t)},onSlideMove:e=>{const t=m(e.clientY);s?.(t)},onSlideEnd:()=>{f.current=void 0,l?.()},onStepKeyDown:e=>{const t=YM[h?"from-bottom":"from-top"].includes(e.key);c?.({event:e,direction:t?-1:1})}})})})),lP=e.forwardRef(((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:l,...c}=e,u=nP(UM,n);return nd.jsx(md.span,{...c,ref:t,onKeyDown:Xu(e.onKeyDown,(e=>{"Home"===e.key?(a(e),e.preventDefault()):"End"===e.key?(s(e),e.preventDefault()):ZM.concat($M).includes(e.key)&&(l(e),e.preventDefault())})),onPointerDown:Xu(e.onPointerDown,(e=>{const t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():r(e)})),onPointerMove:Xu(e.onPointerMove,(e=>{e.target.hasPointerCapture(e.pointerId)&&o(e)})),onPointerUp:Xu(e.onPointerUp,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),i(e))}))})})),cP="SliderTrack",uP=e.forwardRef(((e,t)=>{const{__scopeSlider:n,...r}=e,o=nP(cP,n);return nd.jsx(md.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})}));uP.displayName=cP;var dP="SliderRange",pP=e.forwardRef(((t,n)=>{const{__scopeSlider:r,...o}=t,i=nP(dP,r),a=iP(dP,r),s=Yu(n,e.useRef(null)),l=i.values.length,c=i.values.map((e=>yP(e,i.min,i.max))),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return nd.jsx(md.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...o,ref:s,style:{...t.style,[a.startEdge]:u+"%",[a.endEdge]:d+"%"}})}));pP.displayName=dP;var fP="SliderThumb",hP=e.forwardRef(((t,n)=>{const r=KM(t.__scopeSlider),[o,i]=e.useState(null),a=Yu(n,(e=>i(e))),s=e.useMemo((()=>o?r().findIndex((e=>e.ref.current===o)):-1),[r,o]);return nd.jsx(mP,{...t,ref:a,index:s})})),mP=e.forwardRef(((t,n)=>{const{__scopeSlider:r,index:o,name:i,...a}=t,s=nP(fP,r),l=iP(fP,r),[c,u]=e.useState(null),d=Yu(n,(e=>u(e))),p=!c||(s.form||!!c.closest("form")),f=XC(c),h=s.values[o],m=void 0===h?0:yP(h,s.min,s.max),g=function(e,t){return t>2?`Value ${e+1} of ${t}`:2===t?["Minimum","Maximum"][e]:void 0}(o,s.values.length),y=f?.[l.size],b=y?function(e,t,n){const r=e/2,o=bP([0,50],[0,r]);return(r-o(t)*n)*n}(y,m,l.direction):0;return e.useEffect((()=>{if(c)return s.thumbs.add(c),()=>{s.thumbs.delete(c)}}),[c,s.thumbs]),nd.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[l.startEdge]:`calc(${m}% + ${b}px)`},children:[nd.jsx(JM.ItemSlot,{scope:t.__scopeSlider,children:nd.jsx(md.span,{role:"slider","aria-label":t["aria-label"]||g,"aria-valuemin":s.min,"aria-valuenow":h,"aria-valuemax":s.max,"aria-orientation":s.orientation,"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,tabIndex:s.disabled?void 0:0,...a,ref:d,style:void 0===h?{display:"none"}:t.style,onFocus:Xu(t.onFocus,(()=>{s.valueIndexToChangeRef.current=o}))})}),p&&nd.jsx(gP,{name:i??(s.name?s.name+(s.values.length>1?"[]":""):void 0),form:s.form,value:h},o)]})}));hP.displayName=fP;var gP=t=>{const{value:n,...r}=t,o=e.useRef(null),i=function(t){const n=e.useRef({value:t,previous:t});return e.useMemo((()=>(n.current.value!==t&&(n.current.previous=n.current.value,n.current.value=t),n.current.previous)),[t])}(n);return e.useEffect((()=>{const e=o.current,t=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(i!==n&&r){const t=new Event("input",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}}),[i,n]),nd.jsx("input",{style:{display:"none"},...r,ref:o,defaultValue:n})};function yP(e,t,n){return XM(100/(n-t)*(e-t),[0,100])}function bP(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}var vP=rP,wP=uP,xP=pP,CP=hP;function kP(e){return kP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kP(e)}function EP(e){var t=function(e,t){if("object"!=kP(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=kP(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==kP(t)?t:t+""}function SP(e,t,n){return(t=EP(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?IP(Object(n),!0).forEach((function(t){SP(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function AP(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function NP(e,t){if(e){if("string"==typeof e)return AP(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?AP(e,t):void 0}}function OP(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||NP(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function RP(e,t){if(null==e)return{};var n,r,o=Mw(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var TP=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function MP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,EP(r.key),r)}}function PP(e){return PP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},PP(e)}function DP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(DP=function(){return!!e})()}function BP(e){var t=DP();return function(){var n,r=PP(e);if(t){var o=PP(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==kP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return jw(e)}(this,n)}}function jP(e){return function(e){if(Array.isArray(e))return AP(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||NP(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var LP=h,FP=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],VP=function(){};function zP(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function GP(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var i=[].concat(r);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&i.push("".concat(zP(e,a)));return i.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var HP=function(e){return function(e){return Array.isArray(e)}(e)?e.filter(Boolean):"object"===kP(e)&&null!==e?[e]:[]},WP=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,_P({},RP(e,FP))},XP=function(e,t,n){var r=e.cx,o=e.getStyles,i=e.getClassNames,a=e.className;return{css:o(t,e),className:r(null!=n?n:{},i(t,e),a)}};function ZP(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function $P(e){return ZP(e)?window.pageYOffset:e.scrollTop}function YP(e,t){ZP(e)?window.scrollTo(0,t):e.scrollTop=t}function UP(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:VP,o=$P(e),i=t-o,a=0;!function t(){var s,l=i*((s=(s=a+=10)/n-1)*s*s+1)+o;YP(e,l),a<n?window.requestAnimationFrame(t):r(e)}()}function JP(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?YP(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&YP(e,Math.max(t.offsetTop-o,0))}function KP(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var QP=!1,qP={get passive(){return QP=!0}},eD="undefined"!=typeof window?window:{};eD.addEventListener&&eD.removeEventListener&&(eD.addEventListener("p",VP,qP),eD.removeEventListener("p",VP,!1));var tD=QP;function nD(e){return null!=e}function rD(e,t,n){return e?t:n}var oD=["children","innerProps"],iD=["children","innerProps"];function aD(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,a=e.isFixedPosition,s=e.controlHeight,l=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var u,d=l.getBoundingClientRect().height,p=n.getBoundingClientRect(),f=p.bottom,h=p.height,m=p.top,g=n.offsetParent.getBoundingClientRect().top,y=a?window.innerHeight:ZP(u=l)?window.innerHeight:u.clientHeight,b=$P(l),v=parseInt(getComputedStyle(n).marginBottom,10),w=parseInt(getComputedStyle(n).marginTop,10),x=g-w,C=y-m,k=x+b,E=d-b-m,S=f-y+b+v,I=b+m-w,_=160;switch(o){case"auto":case"bottom":if(C>=h)return{placement:"bottom",maxHeight:t};if(E>=h&&!a)return i&&UP(l,S,_),{placement:"bottom",maxHeight:t};if(!a&&E>=r||a&&C>=r)return i&&UP(l,S,_),{placement:"bottom",maxHeight:a?C-v:E-v};if("auto"===o||a){var A=t,N=a?x:k;return N>=r&&(A=Math.min(N-v-s,t)),{placement:"top",maxHeight:A}}if("bottom"===o)return i&&YP(l,S),{placement:"bottom",maxHeight:t};break;case"top":if(x>=h)return{placement:"top",maxHeight:t};if(k>=h&&!a)return i&&UP(l,I,_),{placement:"top",maxHeight:t};if(!a&&k>=r||a&&x>=r){var O=t;return(!a&&k>=r||a&&x>=r)&&(O=a?x-w:k-w),i&&UP(l,I,_),{placement:"top",maxHeight:O}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return c}var sD,lD=function(e){return"auto"===e?"bottom":e},cD=i(null),uD=function(e){var t=e.children,n=e.minMenuHeight,r=e.maxMenuHeight,i=e.menuPlacement,a=e.menuPosition,s=e.menuShouldScrollIntoView,l=e.theme,d=(o(cD)||{}).setPortalPlacement,p=u(null),f=OP(c(r),2),h=f[0],m=f[1],g=OP(c(null),2),y=g[0],b=g[1],v=l.spacing.controlHeight;return LP((function(){var e=p.current;if(e){var t="fixed"===a,o=aD({maxHeight:r,menuEl:e,minHeight:n,placement:i,shouldScroll:s&&!t,isFixedPosition:t,controlHeight:v});m(o.maxHeight),b(o.placement),null==d||d(o.placement)}}),[r,i,a,s,n,d,v]),t({ref:p,placerProps:_P(_P({},e),{},{placement:y||lD(i),maxHeight:h})})},dD=function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return wy("div",Hm({},XP(e,"menu",{menu:!0}),{ref:n},r),t)},pD=function(e,t){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return _P({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},fD=pD,hD=pD,mD=["size"],gD=["innerProps","isRtl","size"];var yD,bD,vD="production"===process.env.NODE_ENV?{name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"}:{name:"tj5bde-Svg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;label:Svg;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3gsIGtleWZyYW1lcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHtcbiAgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWUsXG4gIENTU09iamVjdFdpdGhMYWJlbCxcbiAgR3JvdXBCYXNlLFxufSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgeyBnZXRTdHlsZVByb3BzIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgSWNvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBTdmcgPSAoe1xuICBzaXplLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZTogbnVtYmVyIH0pID0+IChcbiAgPHN2Z1xuICAgIGhlaWdodD17c2l6ZX1cbiAgICB3aWR0aD17c2l6ZX1cbiAgICB2aWV3Qm94PVwiMCAwIDIwIDIwXCJcbiAgICBhcmlhLWhpZGRlbj1cInRydWVcIlxuICAgIGZvY3VzYWJsZT1cImZhbHNlXCJcbiAgICBjc3M9e3tcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgZmlsbDogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBsaW5lSGVpZ2h0OiAxLFxuICAgICAgc3Ryb2tlOiAnY3VycmVudENvbG9yJyxcbiAgICAgIHN0cm9rZVdpZHRoOiAwLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IHR5cGUgQ3Jvc3NJY29uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgQ3Jvc3NJY29uID0gKHByb3BzOiBDcm9zc0ljb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNMTQuMzQ4IDE0Ljg0OWMtMC40NjkgMC40NjktMS4yMjkgMC40NjktMS42OTcgMGwtMi42NTEtMy4wMzAtMi42NTEgMy4wMjljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDAtMC40NjktMC40NjktMC40NjktMS4yMjkgMC0xLjY5N2wyLjc1OC0zLjE1LTIuNzU5LTMuMTUyYy0wLjQ2OS0wLjQ2OS0wLjQ2OS0xLjIyOCAwLTEuNjk3czEuMjI4LTAuNDY5IDEuNjk3IDBsMi42NTIgMy4wMzEgMi42NTEtMy4wMzFjMC40NjktMC40NjkgMS4yMjgtMC40NjkgMS42OTcgMHMwLjQ2OSAxLjIyOSAwIDEuNjk3bC0yLjc1OCAzLjE1MiAyLjc1OCAzLjE1YzAuNDY5IDAuNDY5IDAuNDY5IDEuMjI5IDAgMS42OTh6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuZXhwb3J0IHR5cGUgRG93bkNoZXZyb25Qcm9wcyA9IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU/OiBudW1iZXIgfTtcbmV4cG9ydCBjb25zdCBEb3duQ2hldnJvbiA9IChwcm9wczogRG93bkNoZXZyb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNNC41MTYgNy41NDhjMC40MzYtMC40NDYgMS4wNDMtMC40ODEgMS41NzYgMGwzLjkwOCAzLjc0NyAzLjkwOC0zLjc0N2MwLjUzMy0wLjQ4MSAxLjE0MS0wLjQ0NiAxLjU3NCAwIDAuNDM2IDAuNDQ1IDAuNDA4IDEuMTk3IDAgMS42MTUtMC40MDYgMC40MTgtNC42OTUgNC41MDItNC42OTUgNC41MDItMC4yMTcgMC4yMjMtMC41MDIgMC4zMzUtMC43ODcgMC4zMzVzLTAuNTctMC4xMTItMC43ODktMC4zMzVjMCAwLTQuMjg3LTQuMDg0LTQuNjk1LTQuNTAycy0wLjQzNi0xLjE3IDAtMS42MTV6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgQnV0dG9uc1xuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cbmV4cG9ydCBpbnRlcmZhY2UgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBUaGUgY2hpbGRyZW4gdG8gYmUgcmVuZGVyZWQgaW5zaWRlIHRoZSBpbmRpY2F0b3IuICovXG4gIGNoaWxkcmVuPzogUmVhY3ROb2RlO1xuICAvKiogUHJvcHMgdGhhdCB3aWxsIGJlIHBhc3NlZCBvbiB0byB0aGUgY2hpbGRyZW4uICovXG4gIGlubmVyUHJvcHM6IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snZGl2J107XG4gIC8qKiBUaGUgZm9jdXNlZCBzdGF0ZSBvZiB0aGUgc2VsZWN0LiAqL1xuICBpc0ZvY3VzZWQ6IGJvb2xlYW47XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG59XG5cbmNvbnN0IGJhc2VDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgdGhlbWU6IHtcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICAgIGNvbG9ycyxcbiAgICB9LFxuICB9OlxuICAgIHwgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuICAgIHwgQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2luZGljYXRvckNvbnRhaW5lcicsXG4gIGRpc3BsYXk6ICdmbGV4JyxcbiAgdHJhbnNpdGlvbjogJ2NvbG9yIDE1MG1zJyxcbiAgLi4uKHVuc3R5bGVkXG4gICAgPyB7fVxuICAgIDoge1xuICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw2MCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIHBhZGRpbmc6IGJhc2VVbml0ICogMixcbiAgICAgICAgJzpob3Zlcic6IHtcbiAgICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw4MCA6IGNvbG9ycy5uZXV0cmFsNDAsXG4gICAgICAgIH0sXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgZHJvcGRvd25JbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IERyb3Bkb3duSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnZHJvcGRvd25JbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2Ryb3Bkb3duLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8RG93bkNoZXZyb24gLz59XG4gICAgPC9kaXY+XG4gICk7XG59O1xuXG5leHBvcnQgaW50ZXJmYWNlIENsZWFySW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xufVxuXG5leHBvcnQgY29uc3QgY2xlYXJJbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IENsZWFySW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnY2xlYXJJbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2NsZWFyLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8Q3Jvc3NJY29uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBTZXBhcmF0b3Jcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIEluZGljYXRvclNlcGFyYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpbm5lclByb3BzPzogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ107XG59XG5cbmV4cG9ydCBjb25zdCBpbmRpY2F0b3JTZXBhcmF0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0Rpc2FibGVkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JTZXBhcmF0b3InLFxuICBhbGlnblNlbGY6ICdzdHJldGNoJyxcbiAgd2lkdGg6IDEsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgYmFja2dyb3VuZENvbG9yOiBpc0Rpc2FibGVkID8gY29sb3JzLm5ldXRyYWwxMCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIG1hcmdpbkJvdHRvbTogYmFzZVVuaXQgKiAyLFxuICAgICAgICBtYXJnaW5Ub3A6IGJhc2VVbml0ICogMixcbiAgICAgIH0pLFxufSk7XG5cbmV4cG9ydCBjb25zdCBJbmRpY2F0b3JTZXBhcmF0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHByb3BzOiBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgaW5uZXJQcm9wcyB9ID0gcHJvcHM7XG4gIHJldHVybiAoXG4gICAgPHNwYW5cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgICAgey4uLmdldFN0eWxlUHJvcHMocHJvcHMsICdpbmRpY2F0b3JTZXBhcmF0b3InLCB7XG4gICAgICAgICdpbmRpY2F0b3Itc2VwYXJhdG9yJzogdHJ1ZSxcbiAgICAgIH0pfVxuICAgIC8+XG4gICk7XG59O1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIExvYWRpbmdcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBsb2FkaW5nRG90QW5pbWF0aW9ucyA9IGtleWZyYW1lc2BcbiAgMCUsIDgwJSwgMTAwJSB7IG9wYWNpdHk6IDA7IH1cbiAgNDAlIHsgb3BhY2l0eTogMTsgfVxuYDtcblxuZXhwb3J0IGNvbnN0IGxvYWRpbmdJbmRpY2F0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgc2l6ZSxcbiAgICB0aGVtZToge1xuICAgICAgY29sb3JzLFxuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgIH0sXG4gIH06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2xvYWRpbmdJbmRpY2F0b3InLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIGFsaWduU2VsZjogJ2NlbnRlcicsXG4gIGZvbnRTaXplOiBzaXplLFxuICBsaW5lSGVpZ2h0OiAxLFxuICBtYXJnaW5SaWdodDogc2l6ZSxcbiAgdGV4dEFsaWduOiAnY2VudGVyJyxcbiAgdmVydGljYWxBbGlnbjogJ21pZGRsZScsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5pbnRlcmZhY2UgTG9hZGluZ0RvdFByb3BzIHtcbiAgZGVsYXk6IG51bWJlcjtcbiAgb2Zmc2V0OiBib29sZWFuO1xufVxuY29uc3QgTG9hZGluZ0RvdCA9ICh7IGRlbGF5LCBvZmZzZXQgfTogTG9hZGluZ0RvdFByb3BzKSA9PiAoXG4gIDxzcGFuXG4gICAgY3NzPXt7XG4gICAgICBhbmltYXRpb246IGAke2xvYWRpbmdEb3RBbmltYXRpb25zfSAxcyBlYXNlLWluLW91dCAke2RlbGF5fW1zIGluZmluaXRlO2AsXG4gICAgICBiYWNrZ3JvdW5kQ29sb3I6ICdjdXJyZW50Q29sb3InLFxuICAgICAgYm9yZGVyUmFkaXVzOiAnMWVtJyxcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgbWFyZ2luTGVmdDogb2Zmc2V0ID8gJzFlbScgOiB1bmRlZmluZWQsXG4gICAgICBoZWlnaHQ6ICcxZW0nLFxuICAgICAgdmVydGljYWxBbGlnbjogJ3RvcCcsXG4gICAgICB3aWR0aDogJzFlbScsXG4gICAgfX1cbiAgLz5cbik7XG5cbmV4cG9ydCBpbnRlcmZhY2UgTG9hZGluZ0luZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xuICAvKiogU2V0IHNpemUgb2YgdGhlIGNvbnRhaW5lci4gKi9cbiAgc2l6ZTogbnVtYmVyO1xufVxuZXhwb3J0IGNvbnN0IExvYWRpbmdJbmRpY2F0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oe1xuICBpbm5lclByb3BzLFxuICBpc1J0bCxcbiAgc2l6ZSA9IDQsXG4gIC4uLnJlc3RQcm9wc1xufTogTG9hZGluZ0luZGljYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+KSA9PiB7XG4gIHJldHVybiAoXG4gICAgPGRpdlxuICAgICAgey4uLmdldFN0eWxlUHJvcHMoXG4gICAgICAgIHsgLi4ucmVzdFByb3BzLCBpbm5lclByb3BzLCBpc1J0bCwgc2l6ZSB9LFxuICAgICAgICAnbG9hZGluZ0luZGljYXRvcicsXG4gICAgICAgIHtcbiAgICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICAgJ2xvYWRpbmctaW5kaWNhdG9yJzogdHJ1ZSxcbiAgICAgICAgfVxuICAgICAgKX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXswfSBvZmZzZXQ9e2lzUnRsfSAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezE2MH0gb2Zmc2V0IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MzIwfSBvZmZzZXQ9eyFpc1J0bH0gLz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG4iXX0= */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}},wD=function(e){var t=e.size,n=RP(e,mD);return wy("svg",Hm({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:vD},n))},xD=function(e){return wy(wD,Hm({size:20},e),wy("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},CD=function(e){return wy(wD,Hm({size:20},e),wy("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},kD=function(e,t){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return _P({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*o,":hover":{color:n?i.neutral80:i.neutral40}})},ED=kD,SD=kD,ID=Cy(sD||(yD=["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"],bD||(bD=yD.slice(0)),sD=Object.freeze(Object.defineProperties(yD,{raw:{value:Object.freeze(bD)}})))),_D=function(e){var t=e.delay,n=e.offset;return wy("span",{css:xy({animation:"".concat(ID," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"production"===process.env.NODE_ENV?"":";label:LoadingDot;","production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1RSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3gsIGtleWZyYW1lcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHtcbiAgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWUsXG4gIENTU09iamVjdFdpdGhMYWJlbCxcbiAgR3JvdXBCYXNlLFxufSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgeyBnZXRTdHlsZVByb3BzIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgSWNvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBTdmcgPSAoe1xuICBzaXplLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZTogbnVtYmVyIH0pID0+IChcbiAgPHN2Z1xuICAgIGhlaWdodD17c2l6ZX1cbiAgICB3aWR0aD17c2l6ZX1cbiAgICB2aWV3Qm94PVwiMCAwIDIwIDIwXCJcbiAgICBhcmlhLWhpZGRlbj1cInRydWVcIlxuICAgIGZvY3VzYWJsZT1cImZhbHNlXCJcbiAgICBjc3M9e3tcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgZmlsbDogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBsaW5lSGVpZ2h0OiAxLFxuICAgICAgc3Ryb2tlOiAnY3VycmVudENvbG9yJyxcbiAgICAgIHN0cm9rZVdpZHRoOiAwLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IHR5cGUgQ3Jvc3NJY29uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgQ3Jvc3NJY29uID0gKHByb3BzOiBDcm9zc0ljb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNMTQuMzQ4IDE0Ljg0OWMtMC40NjkgMC40NjktMS4yMjkgMC40NjktMS42OTcgMGwtMi42NTEtMy4wMzAtMi42NTEgMy4wMjljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDAtMC40NjktMC40NjktMC40NjktMS4yMjkgMC0xLjY5N2wyLjc1OC0zLjE1LTIuNzU5LTMuMTUyYy0wLjQ2OS0wLjQ2OS0wLjQ2OS0xLjIyOCAwLTEuNjk3czEuMjI4LTAuNDY5IDEuNjk3IDBsMi42NTIgMy4wMzEgMi42NTEtMy4wMzFjMC40NjktMC40NjkgMS4yMjgtMC40NjkgMS42OTcgMHMwLjQ2OSAxLjIyOSAwIDEuNjk3bC0yLjc1OCAzLjE1MiAyLjc1OCAzLjE1YzAuNDY5IDAuNDY5IDAuNDY5IDEuMjI5IDAgMS42OTh6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuZXhwb3J0IHR5cGUgRG93bkNoZXZyb25Qcm9wcyA9IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU/OiBudW1iZXIgfTtcbmV4cG9ydCBjb25zdCBEb3duQ2hldnJvbiA9IChwcm9wczogRG93bkNoZXZyb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNNC41MTYgNy41NDhjMC40MzYtMC40NDYgMS4wNDMtMC40ODEgMS41NzYgMGwzLjkwOCAzLjc0NyAzLjkwOC0zLjc0N2MwLjUzMy0wLjQ4MSAxLjE0MS0wLjQ0NiAxLjU3NCAwIDAuNDM2IDAuNDQ1IDAuNDA4IDEuMTk3IDAgMS42MTUtMC40MDYgMC40MTgtNC42OTUgNC41MDItNC42OTUgNC41MDItMC4yMTcgMC4yMjMtMC41MDIgMC4zMzUtMC43ODcgMC4zMzVzLTAuNTctMC4xMTItMC43ODktMC4zMzVjMCAwLTQuMjg3LTQuMDg0LTQuNjk1LTQuNTAycy0wLjQzNi0xLjE3IDAtMS42MTV6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgQnV0dG9uc1xuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cbmV4cG9ydCBpbnRlcmZhY2UgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBUaGUgY2hpbGRyZW4gdG8gYmUgcmVuZGVyZWQgaW5zaWRlIHRoZSBpbmRpY2F0b3IuICovXG4gIGNoaWxkcmVuPzogUmVhY3ROb2RlO1xuICAvKiogUHJvcHMgdGhhdCB3aWxsIGJlIHBhc3NlZCBvbiB0byB0aGUgY2hpbGRyZW4uICovXG4gIGlubmVyUHJvcHM6IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snZGl2J107XG4gIC8qKiBUaGUgZm9jdXNlZCBzdGF0ZSBvZiB0aGUgc2VsZWN0LiAqL1xuICBpc0ZvY3VzZWQ6IGJvb2xlYW47XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG59XG5cbmNvbnN0IGJhc2VDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgdGhlbWU6IHtcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICAgIGNvbG9ycyxcbiAgICB9LFxuICB9OlxuICAgIHwgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuICAgIHwgQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2luZGljYXRvckNvbnRhaW5lcicsXG4gIGRpc3BsYXk6ICdmbGV4JyxcbiAgdHJhbnNpdGlvbjogJ2NvbG9yIDE1MG1zJyxcbiAgLi4uKHVuc3R5bGVkXG4gICAgPyB7fVxuICAgIDoge1xuICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw2MCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIHBhZGRpbmc6IGJhc2VVbml0ICogMixcbiAgICAgICAgJzpob3Zlcic6IHtcbiAgICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw4MCA6IGNvbG9ycy5uZXV0cmFsNDAsXG4gICAgICAgIH0sXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgZHJvcGRvd25JbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IERyb3Bkb3duSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnZHJvcGRvd25JbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2Ryb3Bkb3duLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8RG93bkNoZXZyb24gLz59XG4gICAgPC9kaXY+XG4gICk7XG59O1xuXG5leHBvcnQgaW50ZXJmYWNlIENsZWFySW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xufVxuXG5leHBvcnQgY29uc3QgY2xlYXJJbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IENsZWFySW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnY2xlYXJJbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2NsZWFyLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8Q3Jvc3NJY29uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBTZXBhcmF0b3Jcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIEluZGljYXRvclNlcGFyYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpbm5lclByb3BzPzogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ107XG59XG5cbmV4cG9ydCBjb25zdCBpbmRpY2F0b3JTZXBhcmF0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0Rpc2FibGVkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JTZXBhcmF0b3InLFxuICBhbGlnblNlbGY6ICdzdHJldGNoJyxcbiAgd2lkdGg6IDEsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgYmFja2dyb3VuZENvbG9yOiBpc0Rpc2FibGVkID8gY29sb3JzLm5ldXRyYWwxMCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIG1hcmdpbkJvdHRvbTogYmFzZVVuaXQgKiAyLFxuICAgICAgICBtYXJnaW5Ub3A6IGJhc2VVbml0ICogMixcbiAgICAgIH0pLFxufSk7XG5cbmV4cG9ydCBjb25zdCBJbmRpY2F0b3JTZXBhcmF0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHByb3BzOiBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgaW5uZXJQcm9wcyB9ID0gcHJvcHM7XG4gIHJldHVybiAoXG4gICAgPHNwYW5cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgICAgey4uLmdldFN0eWxlUHJvcHMocHJvcHMsICdpbmRpY2F0b3JTZXBhcmF0b3InLCB7XG4gICAgICAgICdpbmRpY2F0b3Itc2VwYXJhdG9yJzogdHJ1ZSxcbiAgICAgIH0pfVxuICAgIC8+XG4gICk7XG59O1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIExvYWRpbmdcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBsb2FkaW5nRG90QW5pbWF0aW9ucyA9IGtleWZyYW1lc2BcbiAgMCUsIDgwJSwgMTAwJSB7IG9wYWNpdHk6IDA7IH1cbiAgNDAlIHsgb3BhY2l0eTogMTsgfVxuYDtcblxuZXhwb3J0IGNvbnN0IGxvYWRpbmdJbmRpY2F0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgc2l6ZSxcbiAgICB0aGVtZToge1xuICAgICAgY29sb3JzLFxuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgIH0sXG4gIH06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2xvYWRpbmdJbmRpY2F0b3InLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIGFsaWduU2VsZjogJ2NlbnRlcicsXG4gIGZvbnRTaXplOiBzaXplLFxuICBsaW5lSGVpZ2h0OiAxLFxuICBtYXJnaW5SaWdodDogc2l6ZSxcbiAgdGV4dEFsaWduOiAnY2VudGVyJyxcbiAgdmVydGljYWxBbGlnbjogJ21pZGRsZScsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5pbnRlcmZhY2UgTG9hZGluZ0RvdFByb3BzIHtcbiAgZGVsYXk6IG51bWJlcjtcbiAgb2Zmc2V0OiBib29sZWFuO1xufVxuY29uc3QgTG9hZGluZ0RvdCA9ICh7IGRlbGF5LCBvZmZzZXQgfTogTG9hZGluZ0RvdFByb3BzKSA9PiAoXG4gIDxzcGFuXG4gICAgY3NzPXt7XG4gICAgICBhbmltYXRpb246IGAke2xvYWRpbmdEb3RBbmltYXRpb25zfSAxcyBlYXNlLWluLW91dCAke2RlbGF5fW1zIGluZmluaXRlO2AsXG4gICAgICBiYWNrZ3JvdW5kQ29sb3I6ICdjdXJyZW50Q29sb3InLFxuICAgICAgYm9yZGVyUmFkaXVzOiAnMWVtJyxcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgbWFyZ2luTGVmdDogb2Zmc2V0ID8gJzFlbScgOiB1bmRlZmluZWQsXG4gICAgICBoZWlnaHQ6ICcxZW0nLFxuICAgICAgdmVydGljYWxBbGlnbjogJ3RvcCcsXG4gICAgICB3aWR0aDogJzFlbScsXG4gICAgfX1cbiAgLz5cbik7XG5cbmV4cG9ydCBpbnRlcmZhY2UgTG9hZGluZ0luZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xuICAvKiogU2V0IHNpemUgb2YgdGhlIGNvbnRhaW5lci4gKi9cbiAgc2l6ZTogbnVtYmVyO1xufVxuZXhwb3J0IGNvbnN0IExvYWRpbmdJbmRpY2F0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oe1xuICBpbm5lclByb3BzLFxuICBpc1J0bCxcbiAgc2l6ZSA9IDQsXG4gIC4uLnJlc3RQcm9wc1xufTogTG9hZGluZ0luZGljYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+KSA9PiB7XG4gIHJldHVybiAoXG4gICAgPGRpdlxuICAgICAgey4uLmdldFN0eWxlUHJvcHMoXG4gICAgICAgIHsgLi4ucmVzdFByb3BzLCBpbm5lclByb3BzLCBpc1J0bCwgc2l6ZSB9LFxuICAgICAgICAnbG9hZGluZ0luZGljYXRvcicsXG4gICAgICAgIHtcbiAgICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICAgJ2xvYWRpbmctaW5kaWNhdG9yJzogdHJ1ZSxcbiAgICAgICAgfVxuICAgICAgKX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXswfSBvZmZzZXQ9e2lzUnRsfSAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezE2MH0gb2Zmc2V0IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MzIwfSBvZmZzZXQ9eyFpc1J0bH0gLz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG4iXX0= */")})},AD=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return wy("div",Hm({ref:o},XP(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":a}),i,{"aria-disabled":n||void 0}),t)},ND=["data"],OD=function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.getClassNames,i=e.Heading,a=e.headingProps,s=e.innerProps,l=e.label,c=e.theme,u=e.selectProps;return wy("div",Hm({},XP(e,"group",{group:!0}),s),wy(i,Hm({},a,{selectProps:u,theme:c,getStyles:r,getClassNames:o,cx:n}),l),wy("div",null,t))},RD=["innerRef","isDisabled","isHidden","inputClassName"],TD={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},MD={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":_P({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},TD)},PD=function(e){return _P({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},TD)},DD=function(e){var t=e.cx,n=e.value,r=WP(e),o=r.innerRef,i=r.isDisabled,a=r.isHidden,s=r.inputClassName,l=RP(r,RD);return wy("div",Hm({},XP(e,"input",{"input-container":!0}),{"data-value":n||""}),wy("input",Hm({className:t({input:!0},s),ref:o,style:PD(a),disabled:i},l)))},BD=function(e){var t=e.children,n=e.innerProps;return wy("div",n,t)};var jD=function(e){var t=e.children,n=e.components,r=e.data,o=e.innerProps,i=e.isDisabled,a=e.removeProps,s=e.selectProps,l=n.Container,c=n.Label,u=n.Remove;return wy(l,{data:r,innerProps:_P(_P({},XP(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),o),selectProps:s},wy(c,{data:r,innerProps:_P({},XP(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),wy(u,{data:r,innerProps:_P(_P({},XP(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:s}))},LD=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.innerRef,a=e.innerProps;return wy("div",Hm({},XP(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":o}),{ref:i,"aria-disabled":n},a),t)},FD=function(e){var t=e.children,n=e.innerProps;return wy("div",Hm({},XP(e,"placeholder",{placeholder:!0}),n),t)},VD=function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return wy("div",Hm({},XP(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},zD={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return wy("div",Hm({},XP(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||wy(xD,null))},Control:AD,DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return wy("div",Hm({},XP(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||wy(CD,null))},DownChevron:CD,CrossIcon:xD,Group:OD,GroupHeading:function(e){var t=WP(e);t.data;var n=RP(t,ND);return wy("div",Hm({},XP(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return wy("div",Hm({},XP(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return wy("span",Hm({},t,XP(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:DD,LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,o=void 0===r?4:r,i=RP(e,gD);return wy("div",Hm({},XP(_P(_P({},i),{},{innerProps:t,isRtl:n,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),wy(_D,{delay:0,offset:n}),wy(_D,{delay:160,offset:!0}),wy(_D,{delay:320,offset:!n}))},Menu:dD,MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,o=e.isMulti;return wy("div",Hm({},XP(e,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:r},n),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,r=e.controlElement,o=e.innerProps,i=e.menuPlacement,s=e.menuPosition,d=u(null),p=u(null),f=OP(c(lD(i)),2),h=f[0],m=f[1],g=a((function(){return{setPortalPlacement:m}}),[]),y=OP(c(null),2),b=y[0],v=y[1],w=l((function(){if(r){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(r),t="fixed"===s?0:window.pageYOffset,n=e[h]+t;n===(null==b?void 0:b.offset)&&e.left===(null==b?void 0:b.rect.left)&&e.width===(null==b?void 0:b.rect.width)||v({offset:n,rect:e})}}),[r,s,h,null==b?void 0:b.offset,null==b?void 0:b.rect.left,null==b?void 0:b.rect.width]);LP((function(){w()}),[w]);var x=l((function(){"function"==typeof p.current&&(p.current(),p.current=null),r&&d.current&&(p.current=xC(r,d.current,w,{elementResize:"ResizeObserver"in window}))}),[r,w]);LP((function(){x()}),[x]);var k=l((function(e){d.current=e,x()}),[x]);if(!t&&"fixed"!==s||!b)return null;var E=wy("div",Hm({ref:k},XP(_P(_P({},e),{},{offset:b.offset,position:s,rect:b.rect}),"menuPortal",{"menu-portal":!0}),o),n);return wy(cD.Provider,{value:g},t?C(E,t):E)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,o=RP(e,iD);return wy("div",Hm({},XP(_P(_P({},o),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},NoOptionsMessage:function(e){var t=e.children,n=void 0===t?"No options":t,r=e.innerProps,o=RP(e,oD);return wy("div",Hm({},XP(_P(_P({},o),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},MultiValue:jD,MultiValueContainer:BD,MultiValueLabel:BD,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return wy("div",Hm({role:"button"},n),t||wy(xD,{size:14}))},Option:LD,Placeholder:FD,SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,o=e.isRtl;return wy("div",Hm({},XP(e,"container",{"--is-disabled":r,"--is-rtl":o}),n),t)},SingleValue:VD,ValueContainer:function(e){var t=e.children,n=e.innerProps,r=e.isMulti,o=e.hasValue;return wy("div",Hm({},XP(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),n),t)}},GD=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function HD(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],o=t[n],!(r===o||GD(r)&&GD(o)))return!1;var r,o;return!0}for(var WD="production"===process.env.NODE_ENV?{name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"}:{name:"1f43avz-a11yText-A11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;label:A11yText;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkExMXlUZXh0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPSSIsImZpbGUiOiJBMTF5VGV4dC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQGpzeCBqc3ggKi9cbmltcG9ydCB7IEpTWCB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCB7IGpzeCB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLy8gQXNzaXN0aXZlIHRleHQgdG8gZGVzY3JpYmUgdmlzdWFsIGVsZW1lbnRzLiBIaWRkZW4gZm9yIHNpZ2h0ZWQgdXNlcnMuXG5jb25zdCBBMTF5VGV4dCA9IChwcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ10pID0+IChcbiAgPHNwYW5cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAnYTExeVRleHQnLFxuICAgICAgekluZGV4OiA5OTk5LFxuICAgICAgYm9yZGVyOiAwLFxuICAgICAgY2xpcDogJ3JlY3QoMXB4LCAxcHgsIDFweCwgMXB4KScsXG4gICAgICBoZWlnaHQ6IDEsXG4gICAgICB3aWR0aDogMSxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgcGFkZGluZzogMCxcbiAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgQTExeVRleHQ7XG4iXX0= */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}},XD=function(e){return wy("span",Hm({css:WD},e))},ZD={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.tabSelectsValue,o=e.context,i=e.isInitialFocus;switch(o){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(r?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,r=void 0===n?"":n,o=e.labels,i=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return"option ".concat(r,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,i=void 0===o?"":o,a=e.selectValue,s=e.isDisabled,l=e.isSelected,c=e.isAppleDevice,u=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(i," focused, ").concat(u(a,n),".");if("menu"===t&&c){var d=s?" disabled":"",p="".concat(l?" selected":"").concat(d);return"".concat(i).concat(p,", ").concat(u(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},$D=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,o=e.focusableOptions,i=e.isFocused,s=e.selectValue,l=e.selectProps,c=e.id,u=e.isAppleDevice,d=l.ariaLiveMessages,p=l.getOptionLabel,f=l.inputValue,h=l.isMulti,m=l.isOptionDisabled,y=l.isSearchable,b=l.menuIsOpen,v=l.options,w=l.screenReaderStatus,x=l.tabSelectsValue,C=l.isLoading,k=l["aria-label"],E=l["aria-live"],S=a((function(){return _P(_P({},ZD),d||{})}),[d]),I=a((function(){var e,n="";if(t&&S.onChange){var r=t.option,o=t.options,i=t.removedValue,a=t.removedValues,l=t.value,c=i||r||(e=l,Array.isArray(e)?null:e),u=c?p(c):"",d=o||a||void 0,f=d?d.map(p):[],h=_P({isDisabled:c&&m(c,s),label:u,labels:f},t);n=S.onChange(h)}return n}),[t,S,m,s,p]),_=a((function(){var e="",t=n||r,i=!!(n&&s&&s.includes(n));if(t&&S.onFocus){var a={focused:t,label:p(t),isDisabled:m(t,s),isSelected:i,options:o,context:t===n?"menu":"value",selectValue:s,isAppleDevice:u};e=S.onFocus(a)}return e}),[n,r,p,m,S,o,s,u]),A=a((function(){var e="";if(b&&v.length&&!C&&S.onFilter){var t=w({count:o.length});e=S.onFilter({inputValue:f,resultsMessage:t})}return e}),[o,f,b,S,v,w,C]),N="initial-input-focus"===(null==t?void 0:t.action),O=a((function(){var e="";if(S.guidance){var t=r?"value":b?"menu":"input";e=S.guidance({"aria-label":k,context:t,isDisabled:n&&m(n,s),isMulti:h,isSearchable:y,tabSelectsValue:x,isInitialFocus:N})}return e}),[k,n,r,h,m,y,b,S,s,x,N]),R=wy(g,null,wy("span",{id:"aria-selection"},I),wy("span",{id:"aria-focused"},_),wy("span",{id:"aria-results"},A),wy("span",{id:"aria-guidance"},O));return wy(g,null,wy(XD,{id:c},N&&R),wy(XD,{"aria-live":E,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!N&&R))},YD=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],UD=new RegExp("["+YD.map((function(e){return e.letters})).join("")+"]","g"),JD={},KD=0;KD<YD.length;KD++)for(var QD=YD[KD],qD=0;qD<QD.letters.length;qD++)JD[QD.letters[qD]]=QD.base;var eB=function(e){return e.replace(UD,(function(e){return JD[e]}))},tB=function(e,t){void 0===t&&(t=HD);var n=null;function r(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var i=e.apply(this,r);return n={lastResult:i,lastArgs:r,lastThis:this},i}return r.clear=function(){n=null},r}(eB),nB=function(e){return e.replace(/^\s+|\s+$/g,"")},rB=function(e){return"".concat(e.label," ").concat(e.value)},oB=["innerRef"];function iB(e){var t=e.innerRef,n=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=Object.entries(e).filter((function(e){var t=OP(e,1)[0];return!n.includes(t)}));return o.reduce((function(e,t){var n=OP(t,2),r=n[0],o=n[1];return e[r]=o,e}),{})}(RP(e,oB),"onExited","in","enter","exit","appear");return wy("input",Hm({ref:t},n,{css:xy({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"production"===process.env.NODE_ENV?"":";label:DummyInput;","production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkR1bW15SW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCTSIsImZpbGUiOiJEdW1teUlucHV0LnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWYgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyByZW1vdmVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gRHVtbXlJbnB1dCh7XG4gIGlubmVyUmVmLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydpbnB1dCddICYge1xuICByZWFkb25seSBpbm5lclJlZjogUmVmPEhUTUxJbnB1dEVsZW1lbnQ+O1xufSkge1xuICAvLyBSZW1vdmUgYW5pbWF0aW9uIHByb3BzIG5vdCBtZWFudCBmb3IgSFRNTCBlbGVtZW50c1xuICBjb25zdCBmaWx0ZXJlZFByb3BzID0gcmVtb3ZlUHJvcHMoXG4gICAgcHJvcHMsXG4gICAgJ29uRXhpdGVkJyxcbiAgICAnaW4nLFxuICAgICdlbnRlcicsXG4gICAgJ2V4aXQnLFxuICAgICdhcHBlYXInXG4gICk7XG5cbiAgcmV0dXJuIChcbiAgICA8aW5wdXRcbiAgICAgIHJlZj17aW5uZXJSZWZ9XG4gICAgICB7Li4uZmlsdGVyZWRQcm9wc31cbiAgICAgIGNzcz17e1xuICAgICAgICBsYWJlbDogJ2R1bW15SW5wdXQnLFxuICAgICAgICAvLyBnZXQgcmlkIG9mIGFueSBkZWZhdWx0IHN0eWxlc1xuICAgICAgICBiYWNrZ3JvdW5kOiAwLFxuICAgICAgICBib3JkZXI6IDAsXG4gICAgICAgIC8vIGltcG9ydGFudCEgdGhpcyBoaWRlcyB0aGUgZmxhc2hpbmcgY3Vyc29yXG4gICAgICAgIGNhcmV0Q29sb3I6ICd0cmFuc3BhcmVudCcsXG4gICAgICAgIGZvbnRTaXplOiAnaW5oZXJpdCcsXG4gICAgICAgIGdyaWRBcmVhOiAnMSAvIDEgLyAyIC8gMycsXG4gICAgICAgIG91dGxpbmU6IDAsXG4gICAgICAgIHBhZGRpbmc6IDAsXG4gICAgICAgIC8vIGltcG9ydGFudCEgd2l0aG91dCBgd2lkdGhgIGJyb3dzZXJzIHdvbid0IGFsbG93IGZvY3VzXG4gICAgICAgIHdpZHRoOiAxLFxuXG4gICAgICAgIC8vIHJlbW92ZSBjdXJzb3Igb24gZGVza3RvcFxuICAgICAgICBjb2xvcjogJ3RyYW5zcGFyZW50JyxcblxuICAgICAgICAvLyByZW1vdmUgY3Vyc29yIG9uIG1vYmlsZSB3aGlsc3QgbWFpbnRhaW5pbmcgXCJzY3JvbGwgaW50byB2aWV3XCIgYmVoYXZpb3VyXG4gICAgICAgIGxlZnQ6IC0xMDAsXG4gICAgICAgIG9wYWNpdHk6IDAsXG4gICAgICAgIHBvc2l0aW9uOiAncmVsYXRpdmUnLFxuICAgICAgICB0cmFuc2Zvcm06ICdzY2FsZSguMDEpJyxcbiAgICAgIH19XG4gICAgLz5cbiAgKTtcbn1cbiJdfQ== */")}))}var aB=["boxSizing","height","overflow","paddingRight","position"],sB={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function lB(e){e.cancelable&&e.preventDefault()}function cB(e){e.stopPropagation()}function uB(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function dB(){return"ontouchstart"in window||navigator.maxTouchPoints}var pB=!("undefined"==typeof window||!window.document||!window.document.createElement),fB=0,hB={capture:!1,passive:!1};var mB=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},gB="production"===process.env.NODE_ENV?{name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"}:{name:"bp8cua-ScrollManager",styles:"position:fixed;left:0;bottom:0;right:0;top:0;label:ScrollManager;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlNjcm9sbE1hbmFnZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9EVSIsImZpbGUiOiJTY3JvbGxNYW5hZ2VyLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgRnJhZ21lbnQsIFJlYWN0RWxlbWVudCwgUmVmQ2FsbGJhY2ssIE1vdXNlRXZlbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgdXNlU2Nyb2xsQ2FwdHVyZSBmcm9tICcuL3VzZVNjcm9sbENhcHR1cmUnO1xuaW1wb3J0IHVzZVNjcm9sbExvY2sgZnJvbSAnLi91c2VTY3JvbGxMb2NrJztcblxuaW50ZXJmYWNlIFByb3BzIHtcbiAgcmVhZG9ubHkgY2hpbGRyZW46IChyZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PikgPT4gUmVhY3RFbGVtZW50O1xuICByZWFkb25seSBsb2NrRW5hYmxlZDogYm9vbGVhbjtcbiAgcmVhZG9ubHkgY2FwdHVyZUVuYWJsZWQ6IGJvb2xlYW47XG4gIHJlYWRvbmx5IG9uQm90dG9tQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Cb3R0b21MZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG4gIHJlYWRvbmx5IG9uVG9wQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Ub3BMZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG59XG5cbmNvbnN0IGJsdXJTZWxlY3RJbnB1dCA9IChldmVudDogTW91c2VFdmVudDxIVE1MRGl2RWxlbWVudD4pID0+IHtcbiAgY29uc3QgZWxlbWVudCA9IGV2ZW50LnRhcmdldCBhcyBIVE1MRGl2RWxlbWVudDtcbiAgcmV0dXJuIChcbiAgICBlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCAmJlxuICAgIChlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCBhcyBIVE1MRWxlbWVudCkuYmx1cigpXG4gICk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBTY3JvbGxNYW5hZ2VyKHtcbiAgY2hpbGRyZW4sXG4gIGxvY2tFbmFibGVkLFxuICBjYXB0dXJlRW5hYmxlZCA9IHRydWUsXG4gIG9uQm90dG9tQXJyaXZlLFxuICBvbkJvdHRvbUxlYXZlLFxuICBvblRvcEFycml2ZSxcbiAgb25Ub3BMZWF2ZSxcbn06IFByb3BzKSB7XG4gIGNvbnN0IHNldFNjcm9sbENhcHR1cmVUYXJnZXQgPSB1c2VTY3JvbGxDYXB0dXJlKHtcbiAgICBpc0VuYWJsZWQ6IGNhcHR1cmVFbmFibGVkLFxuICAgIG9uQm90dG9tQXJyaXZlLFxuICAgIG9uQm90dG9tTGVhdmUsXG4gICAgb25Ub3BBcnJpdmUsXG4gICAgb25Ub3BMZWF2ZSxcbiAgfSk7XG4gIGNvbnN0IHNldFNjcm9sbExvY2tUYXJnZXQgPSB1c2VTY3JvbGxMb2NrKHsgaXNFbmFibGVkOiBsb2NrRW5hYmxlZCB9KTtcblxuICBjb25zdCB0YXJnZXRSZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PiA9IChlbGVtZW50KSA9PiB7XG4gICAgc2V0U2Nyb2xsQ2FwdHVyZVRhcmdldChlbGVtZW50KTtcbiAgICBzZXRTY3JvbGxMb2NrVGFyZ2V0KGVsZW1lbnQpO1xuICB9O1xuXG4gIHJldHVybiAoXG4gICAgPEZyYWdtZW50PlxuICAgICAge2xvY2tFbmFibGVkICYmIChcbiAgICAgICAgPGRpdlxuICAgICAgICAgIG9uQ2xpY2s9e2JsdXJTZWxlY3RJbnB1dH1cbiAgICAgICAgICBjc3M9e3sgcG9zaXRpb246ICdmaXhlZCcsIGxlZnQ6IDAsIGJvdHRvbTogMCwgcmlnaHQ6IDAsIHRvcDogMCB9fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAgIHtjaGlsZHJlbih0YXJnZXRSZWYpfVxuICAgIDwvRnJhZ21lbnQ+XG4gICk7XG59XG4iXX0= */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}};function yB(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=function(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,i=e.onTopLeave,a=u(!1),c=u(!1),d=u(0),p=u(null),f=l((function(e,t){if(null!==p.current){var s=p.current,l=s.scrollTop,u=s.scrollHeight,d=s.clientHeight,f=p.current,h=t>0,m=u-d-l,g=!1;m>t&&a.current&&(r&&r(e),a.current=!1),h&&c.current&&(i&&i(e),c.current=!1),h&&t>m?(n&&!a.current&&n(e),f.scrollTop=u,g=!0,a.current=!0):!h&&-t>l&&(o&&!c.current&&o(e),f.scrollTop=0,g=!0,c.current=!0),g&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}}),[n,r,o,i]),h=l((function(e){f(e,e.deltaY)}),[f]),m=l((function(e){d.current=e.changedTouches[0].clientY}),[]),g=l((function(e){var t=d.current-e.changedTouches[0].clientY;f(e,t)}),[f]),y=l((function(e){if(e){var t=!!tD&&{passive:!1};e.addEventListener("wheel",h,t),e.addEventListener("touchstart",m,t),e.addEventListener("touchmove",g,t)}}),[g,m,h]),b=l((function(e){e&&(e.removeEventListener("wheel",h,!1),e.removeEventListener("touchstart",m,!1),e.removeEventListener("touchmove",g,!1))}),[g,m,h]);return s((function(){if(t){var e=p.current;return y(e),function(){b(e)}}}),[t,y,b]),function(e){p.current=e}}({isEnabled:void 0===r||r,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),i=function(e){var t=e.isEnabled,n=e.accountForScrollbars,r=void 0===n||n,o=u({}),i=u(null),a=l((function(e){if(pB){var t=document.body,n=t&&t.style;if(r&&aB.forEach((function(e){var t=n&&n[e];o.current[e]=t})),r&&fB<1){var i=parseInt(o.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,s=window.innerWidth-a+i||0;Object.keys(sB).forEach((function(e){var t=sB[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(s,"px"))}t&&dB()&&(t.addEventListener("touchmove",lB,hB),e&&(e.addEventListener("touchstart",uB,hB),e.addEventListener("touchmove",cB,hB))),fB+=1}}),[r]),c=l((function(e){if(pB){var t=document.body,n=t&&t.style;fB=Math.max(fB-1,0),r&&fB<1&&aB.forEach((function(e){var t=o.current[e];n&&(n[e]=t)})),t&&dB()&&(t.removeEventListener("touchmove",lB,hB),e&&(e.removeEventListener("touchstart",uB,hB),e.removeEventListener("touchmove",cB,hB)))}}),[r]);return s((function(){if(t){var e=i.current;return a(e),function(){c(e)}}}),[t,a,c]),function(e){i.current=e}}({isEnabled:n});return wy(g,null,n&&wy("div",{onClick:mB,css:gB}),t((function(e){o(e),i(e)})))}var bB="production"===process.env.NODE_ENV?{name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"}:{name:"5kkxb2-requiredInput-RequiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%;label:RequiredInput;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJlcXVpcmVkSW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNJIiwiZmlsZSI6IlJlcXVpcmVkSW5wdXQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBGb2N1c0V2ZW50SGFuZGxlciwgRnVuY3Rpb25Db21wb25lbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmNvbnN0IFJlcXVpcmVkSW5wdXQ6IEZ1bmN0aW9uQ29tcG9uZW50PHtcbiAgcmVhZG9ubHkgbmFtZT86IHN0cmluZztcbiAgcmVhZG9ubHkgb25Gb2N1czogRm9jdXNFdmVudEhhbmRsZXI8SFRNTElucHV0RWxlbWVudD47XG59PiA9ICh7IG5hbWUsIG9uRm9jdXMgfSkgPT4gKFxuICA8aW5wdXRcbiAgICByZXF1aXJlZFxuICAgIG5hbWU9e25hbWV9XG4gICAgdGFiSW5kZXg9ey0xfVxuICAgIGFyaWEtaGlkZGVuPVwidHJ1ZVwiXG4gICAgb25Gb2N1cz17b25Gb2N1c31cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAncmVxdWlyZWRJbnB1dCcsXG4gICAgICBvcGFjaXR5OiAwLFxuICAgICAgcG9pbnRlckV2ZW50czogJ25vbmUnLFxuICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICBib3R0b206IDAsXG4gICAgICBsZWZ0OiAwLFxuICAgICAgcmlnaHQ6IDAsXG4gICAgICB3aWR0aDogJzEwMCUnLFxuICAgIH19XG4gICAgLy8gUHJldmVudCBgU3dpdGNoaW5nIGZyb20gdW5jb250cm9sbGVkIHRvIGNvbnRyb2xsZWRgIGVycm9yXG4gICAgdmFsdWU9XCJcIlxuICAgIG9uQ2hhbmdlPXsoKSA9PiB7fX1cbiAgLz5cbik7XG5cbmV4cG9ydCBkZWZhdWx0IFJlcXVpcmVkSW5wdXQ7XG4iXX0= */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}},vB=function(e){var t=e.name,n=e.onFocus;return wy("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:bB,value:"",onChange:function(){}})};function wB(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function xB(){return wB(/^Mac/i)}function CB(){return wB(/^iPhone/i)||wB(/^iPad/i)||xB()&&navigator.maxTouchPoints>1}var kB,EB={clearIndicator:SD,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.theme,i=o.colors,a=o.borderRadius;return _P({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:o.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:r?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:r?i.primary:i.neutral30}})},dropdownIndicator:ED,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,r=n.colors,o=n.spacing;return _P({label:"group",cursor:"default",display:"block"},t?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*o.baseUnit,paddingRight:3*o.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return _P({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*o,marginTop:2*o})},input:function(e,t){var n=e.isDisabled,r=e.value,o=e.theme,i=o.spacing,a=o.colors;return _P(_P({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},MD),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,r=e.size,o=e.theme,i=o.colors,a=o.spacing.baseUnit;return _P({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*a})},loadingMessage:hD,menu:function(e,t){var n,r=e.placement,o=e.theme,i=o.borderRadius,a=o.spacing,s=o.colors;return _P((SP(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),SP(n,"position","absolute"),SP(n,"width","100%"),SP(n,"zIndex",1),n),t?{}:{backgroundColor:s.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},menuList:function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return _P({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors;return _P({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,r=n.borderRadius,o=n.colors,i=e.cropWithEllipsis;return _P({overflow:"hidden",textOverflow:i||void 0===i?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:r/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors,a=e.isFocused;return _P({alignItems:"center",display:"flex"},t?{}:{borderRadius:o/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},noOptionsMessage:fD,option:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.theme,a=i.spacing,s=i.colors;return _P({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:o?s.primary:r?s.primary25:"transparent",color:n?s.neutral20:o?s.neutral0:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),":active":{backgroundColor:n?void 0:o?s.primary:s.primary50}})},placeholder:function(e,t){var n=e.theme,r=n.spacing,o=n.colors;return _P({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:o.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing,i=r.colors;return _P({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,r=e.isMulti,o=e.hasValue,i=e.selectProps.controlShouldRenderValue;return _P({alignItems:"center",display:r&&o&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},SB={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},IB={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:KP(),captureMenuScroll:!KP(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=_P({ignoreCase:!0,ignoreAccents:!0,stringify:rB,trim:!0,matchFrom:"any"},kB),r=n.ignoreCase,o=n.ignoreAccents,i=n.stringify,a=n.trim,s=n.matchFrom,l=a?nB(t):t,c=a?nB(i(e)):i(e);return r&&(l=l.toLowerCase(),c=c.toLowerCase()),o&&(l=tB(l),c=eB(c)),"start"===s?c.substr(0,l.length)===l:c.indexOf(l)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function _B(e,t,n,r){return{type:"option",data:t,isDisabled:DB(e,t,n),isSelected:BB(e,t,n),label:MB(e,t),value:PB(e,t),index:r}}function AB(e,t){return e.options.map((function(n,r){if("options"in n){var o=n.options.map((function(n,r){return _B(e,n,t,r)})).filter((function(t){return RB(e,t)}));return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=_B(e,n,t,r);return RB(e,i)?i:void 0})).filter(nD)}function NB(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,jP(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function OB(e,t){return e.reduce((function(e,n){return"group"===n.type?e.push.apply(e,jP(n.options.map((function(e){return{data:e.data,id:"".concat(t,"-").concat(n.index,"-").concat(e.index)}})))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e}),[])}function RB(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,i=t.isSelected,a=t.label,s=t.value;return(!LB(e)||!i)&&jB(e,{label:a,value:s,data:o},r)}var TB=function(e,t){var n;return(null===(n=e.find((function(e){return e.data===t})))||void 0===n?void 0:n.id)||null},MB=function(e,t){return e.getOptionLabel(t)},PB=function(e,t){return e.getOptionValue(t)};function DB(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function BB(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=PB(e,t);return n.some((function(t){return PB(e,t)===r}))}function jB(e,t,n){return!e.filterOption||e.filterOption(t,n)}var LB=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},FB=1,VB=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pw(e,t)}(n,m);var t=BP(n);function n(e){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(r=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.isAppleDevice=xB()||CB(),r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,o=n.onChange,i=n.name;t.name=i,r.ariaOnChange(e,t),o(e,t)},r.setValue=function(e,t,n){var o=r.props,i=o.closeMenuOnSelect,a=o.isMulti,s=o.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:s}),i&&(r.setState({inputIsHiddenAfterUpdate:!a}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,o=t.isMulti,i=t.name,a=r.state.selectValue,s=o&&r.isOptionSelected(e,a),l=r.isOptionDisabled(e,a);if(s){var c=r.getOptionValue(e);r.setValue(a.filter((function(e){return r.getOptionValue(e)!==c})),"deselect-option",e)}else{if(l)return void r.ariaOnChange(e,{action:"select-option",option:e,name:i});o?r.setValue([].concat(jP(a),[e]),"select-option",e):r.setValue(e,"select-option")}n&&r.blurInput()},r.removeValue=function(e){var t=r.props.isMulti,n=r.state.selectValue,o=r.getOptionValue(e),i=n.filter((function(e){return r.getOptionValue(e)!==o})),a=rD(t,i,i[0]||null);r.onChange(a,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(rD(r.props.isMulti,[],null),{action:"clear",removedValues:e})},r.popValue=function(){var e=r.props.isMulti,t=r.state.selectValue,n=t[t.length-1],o=t.slice(0,t.length-1),i=rD(e,o,o[0]||null);n&&r.onChange(i,{action:"pop-value",removedValue:n})},r.getFocusedOptionId=function(e){return TB(r.state.focusableOptionsWithIds,e)},r.getFocusableOptionsWithIds=function(){return OB(AB(r.props,r.state.selectValue),r.getElementId("option"))},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return GP.apply(void 0,[r.props.classNamePrefix].concat(t))},r.getOptionLabel=function(e){return MB(r.props,e)},r.getOptionValue=function(e){return PB(r.props,e)},r.getStyles=function(e,t){var n=r.props.unstyled,o=EB[e](t,n);o.boxSizing="border-box";var i=r.props.styles[e];return i?i(o,t):o},r.getClassNames=function(e,t){var n,o;return null===(n=(o=r.props.classNames)[e])||void 0===n?void 0:n.call(o,t)},r.getElementId=function(e){return"".concat(r.state.instancePrefix,"-").concat(e)},r.getComponents=function(){return e=r.props,_P(_P({},zD),e.components);var e},r.buildCategorizedOptions=function(){return AB(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return NB(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(e,t){r.setState({ariaSelection:_P({value:e},t)})},r.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),r.focusInput())},r.onMenuMouseMove=function(e){r.blockOptionHover=!1},r.onControlMouseDown=function(e){if(!e.defaultPrevented){var t=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&r.onMenuClose():t&&r.openMenu("first"):(t&&(r.openAfterFocus=!0),r.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},r.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||r.props.isDisabled)){var t=r.props,n=t.isMulti,o=t.menuIsOpen;r.focusInput(),o?(r.setState({inputIsHiddenAfterUpdate:!n}),r.onMenuClose()):r.openMenu("first"),e.preventDefault()}},r.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(r.clearValue(),e.preventDefault(),r.openAfterFocus=!1,"touchend"===e.type?r.focusInput():setTimeout((function(){return r.focusInput()})))},r.onScroll=function(e){"boolean"==typeof r.props.closeMenuOnScroll?e.target instanceof HTMLElement&&ZP(e.target)&&r.props.onMenuClose():"function"==typeof r.props.closeMenuOnScroll&&r.props.closeMenuOnScroll(e)&&r.props.onMenuClose()},r.onCompositionStart=function(){r.isComposing=!0},r.onCompositionEnd=function(){r.isComposing=!1},r.onTouchStart=function(e){var t=e.touches,n=t&&t.item(0);n&&(r.initialTouchX=n.clientX,r.initialTouchY=n.clientY,r.userIsDragging=!1)},r.onTouchMove=function(e){var t=e.touches,n=t&&t.item(0);if(n){var o=Math.abs(n.clientX-r.initialTouchX),i=Math.abs(n.clientY-r.initialTouchY);r.userIsDragging=o>5||i>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=r.props.inputValue,n=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(n,{action:"input-change",prevInputValue:t}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){var t=r.props.inputValue;r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur",prevInputValue:t}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){if(!r.blockOptionHover&&r.state.focusedOption!==e){var t=r.getFocusableOptions().indexOf(e);r.setState({focusedOption:e,focusedOptionId:t>-1?r.getFocusedOptionId(e):null})}},r.shouldHideSelectedOptions=function(){return LB(r.props)},r.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),r.focus()},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,o=t.backspaceRemovesValue,i=t.escapeClearsValue,a=t.inputValue,s=t.isClearable,l=t.isDisabled,c=t.menuIsOpen,u=t.onKeyDown,d=t.tabSelectsValue,p=t.openMenuOnFocus,f=r.state,h=f.focusedOption,m=f.focusedValue,g=f.selectValue;if(!(l||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||a)return;r.focusValue("previous");break;case"ArrowRight":if(!n||a)return;r.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(m)r.removeValue(m);else{if(!o)return;n?r.popValue():s&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!c||!d||!h||p&&r.isOptionSelected(h,g))return;r.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(c){if(!h)return;if(r.isComposing)return;r.selectOption(h);break}return;case"Escape":c?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close",prevInputValue:a}),r.onMenuClose()):s&&i&&r.clearValue();break;case" ":if(a)return;if(!c){r.openMenu("first");break}if(!h)return;r.selectOption(h);break;case"ArrowUp":c?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":c?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!c)return;r.focusOption("pageup");break;case"PageDown":if(!c)return;r.focusOption("pagedown");break;case"Home":if(!c)return;r.focusOption("first");break;case"End":if(!c)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.state.instancePrefix="react-select-"+(r.props.instanceId||++FB),r.state.selectValue=HP(e.value),e.menuIsOpen&&r.state.selectValue.length){var o=r.getFocusableOptionsWithIds(),i=r.buildFocusableOptions(),a=i.indexOf(r.state.selectValue[0]);r.state.focusableOptionsWithIds=o,r.state.focusedOption=i[a],r.state.focusedOptionId=TB(o,i[a])}return r}return function(e,t,n){t&&MP(e.prototype,t),n&&MP(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&JP(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),o&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):o||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(JP(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,o=n.isFocused,i=this.buildFocusableOptions(),a="first"===e?0:i.length-1;if(!this.props.isMulti){var s=i.indexOf(r[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[a],focusedOptionId:this.getFocusedOptionId(i[a])},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(r);r||(o=-1);var i=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===o?0:-1===o?i:o-1;break;case"next":o>-1&&o<i&&(a=o+1)}this.setState({inputIsHidden:-1!==a,focusedValue:n[a]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var o=0,i=r.indexOf(n);n||(i=-1),"up"===e?o=i>0?i-1:r.length-1:"down"===e?o=(i+1)%r.length:"pageup"===e?(o=i-t)<0&&(o=0):"pagedown"===e?(o=i+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null,focusedOptionId:this.getFocusedOptionId(r[o])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(SB):_P(_P({},SB),this.props.theme):SB}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,o=this.getValue,i=this.selectOption,a=this.setValue,s=this.props,l=s.isMulti,c=s.isRtl,u=s.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:l,isRtl:c,options:u,selectOption:i,selectProps:s,setValue:a,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return DB(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return BB(this.props,e,t)}},{key:"filterOption",value:function(e,t){return jB(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var t=this.props,n=t.isDisabled,r=t.isSearchable,o=t.inputId,i=t.inputValue,a=t.tabIndex,s=t.form,l=t.menuIsOpen,c=t.required,u=this.getComponents().Input,d=this.state,p=d.inputIsHidden,f=d.ariaSelection,h=this.commonProps,m=o||this.getElementId("input"),g=_P(_P(_P({"aria-autocomplete":"list","aria-expanded":l,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":c,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},l&&{"aria-controls":this.getElementId("listbox")}),!r&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==f?void 0:f.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return r?e.createElement(u,Hm({},h,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:m,innerRef:this.getInputRef,isDisabled:n,isHidden:p,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,form:s,type:"text",value:i},g)):e.createElement(iB,Hm({id:m,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:VP,onFocus:this.onInputFocus,disabled:n,tabIndex:a,inputMode:"none",form:s,value:""},g))}},{key:"renderPlaceholderOrValue",value:function(){var t=this,n=this.getComponents(),r=n.MultiValue,o=n.MultiValueContainer,i=n.MultiValueLabel,a=n.MultiValueRemove,s=n.SingleValue,l=n.Placeholder,c=this.commonProps,u=this.props,d=u.controlShouldRenderValue,p=u.isDisabled,f=u.isMulti,h=u.inputValue,m=u.placeholder,g=this.state,y=g.selectValue,b=g.focusedValue,v=g.isFocused;if(!this.hasValue()||!d)return h?null:e.createElement(l,Hm({},c,{key:"placeholder",isDisabled:p,isFocused:v,innerProps:{id:this.getElementId("placeholder")}}),m);if(f)return y.map((function(n,s){var l=n===b,u="".concat(t.getOptionLabel(n),"-").concat(t.getOptionValue(n));return e.createElement(r,Hm({},c,{components:{Container:o,Label:i,Remove:a},isFocused:l,isDisabled:p,key:u,index:s,removeProps:{onClick:function(){return t.removeValue(n)},onTouchEnd:function(){return t.removeValue(n)},onMouseDown:function(e){e.preventDefault()}},data:n}),t.formatOptionLabel(n,"value"))}));if(h)return null;var w=y[0];return e.createElement(s,Hm({},c,{data:w,isDisabled:p}),this.formatOptionLabel(w,"value"))}},{key:"renderClearIndicator",value:function(){var t=this.getComponents().ClearIndicator,n=this.commonProps,r=this.props,o=r.isDisabled,i=r.isLoading,a=this.state.isFocused;if(!this.isClearable()||!t||o||!this.hasValue()||i)return null;var s={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return e.createElement(t,Hm({},n,{innerProps:s,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var t=this.getComponents().LoadingIndicator,n=this.commonProps,r=this.props,o=r.isDisabled,i=r.isLoading,a=this.state.isFocused;if(!t||!i)return null;return e.createElement(t,Hm({},n,{innerProps:{"aria-hidden":"true"},isDisabled:o,isFocused:a}))}},{key:"renderIndicatorSeparator",value:function(){var t=this.getComponents(),n=t.DropdownIndicator,r=t.IndicatorSeparator;if(!n||!r)return null;var o=this.commonProps,i=this.props.isDisabled,a=this.state.isFocused;return e.createElement(r,Hm({},o,{isDisabled:i,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var t=this.getComponents().DropdownIndicator;if(!t)return null;var n=this.commonProps,r=this.props.isDisabled,o=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return e.createElement(t,Hm({},n,{innerProps:i,isDisabled:r,isFocused:o}))}},{key:"renderMenu",value:function(){var t=this,n=this.getComponents(),r=n.Group,o=n.GroupHeading,i=n.Menu,a=n.MenuList,s=n.MenuPortal,l=n.LoadingMessage,c=n.NoOptionsMessage,u=n.Option,d=this.commonProps,p=this.state.focusedOption,f=this.props,h=f.captureMenuScroll,m=f.inputValue,g=f.isLoading,y=f.loadingMessage,b=f.minMenuHeight,v=f.maxMenuHeight,w=f.menuIsOpen,x=f.menuPlacement,C=f.menuPosition,k=f.menuPortalTarget,E=f.menuShouldBlockScroll,S=f.menuShouldScrollIntoView,I=f.noOptionsMessage,_=f.onMenuScrollToTop,A=f.onMenuScrollToBottom;if(!w)return null;var N,O=function(n,r){var o=n.type,i=n.data,a=n.isDisabled,s=n.isSelected,l=n.label,c=n.value,f=p===i,h=a?void 0:function(){return t.onOptionHover(i)},m=a?void 0:function(){return t.selectOption(i)},g="".concat(t.getElementId("option"),"-").concat(r),y={id:g,onClick:m,onMouseMove:h,onMouseOver:h,tabIndex:-1,role:"option","aria-selected":t.isAppleDevice?void 0:s};return e.createElement(u,Hm({},d,{innerProps:y,data:i,isDisabled:a,isSelected:s,key:g,label:l,type:o,value:c,isFocused:f,innerRef:f?t.getFocusedOptionRef:void 0}),t.formatOptionLabel(n.data,"menu"))};if(this.hasOptions())N=this.getCategorizedOptions().map((function(n){if("group"===n.type){var i=n.data,a=n.options,s=n.index,l="".concat(t.getElementId("group"),"-").concat(s),c="".concat(l,"-heading");return e.createElement(r,Hm({},d,{key:l,data:i,options:a,Heading:o,headingProps:{id:c,data:n.data},label:t.formatGroupLabel(n.data)}),n.options.map((function(e){return O(e,"".concat(s,"-").concat(e.index))})))}if("option"===n.type)return O(n,"".concat(n.index))}));else if(g){var R=y({inputValue:m});if(null===R)return null;N=e.createElement(l,d,R)}else{var T=I({inputValue:m});if(null===T)return null;N=e.createElement(c,d,T)}var M={minMenuHeight:b,maxMenuHeight:v,menuPlacement:x,menuPosition:C,menuShouldScrollIntoView:S},P=e.createElement(uD,Hm({},d,M),(function(n){var r=n.ref,o=n.placerProps,s=o.placement,l=o.maxHeight;return e.createElement(i,Hm({},d,M,{innerRef:r,innerProps:{onMouseDown:t.onMenuMouseDown,onMouseMove:t.onMenuMouseMove},isLoading:g,placement:s}),e.createElement(yB,{captureEnabled:h,onTopArrive:_,onBottomArrive:A,lockEnabled:E},(function(n){return e.createElement(a,Hm({},d,{innerRef:function(e){t.getMenuListRef(e),n(e)},innerProps:{role:"listbox","aria-multiselectable":d.isMulti,id:t.getElementId("listbox")},isLoading:g,maxHeight:l,focusedOption:p}),N)})))}));return k||"fixed"===C?e.createElement(s,Hm({},d,{appendTo:k,controlElement:this.controlRef,menuPlacement:x,menuPosition:C}),P):P}},{key:"renderFormField",value:function(){var t=this,n=this.props,r=n.delimiter,o=n.isDisabled,i=n.isMulti,a=n.name,s=n.required,l=this.state.selectValue;if(s&&!this.hasValue()&&!o)return e.createElement(vB,{name:a,onFocus:this.onValueInputFocus});if(a&&!o){if(i){if(r){var c=l.map((function(e){return t.getOptionValue(e)})).join(r);return e.createElement("input",{name:a,type:"hidden",value:c})}var u=l.length>0?l.map((function(n,r){return e.createElement("input",{key:"i-".concat(r),name:a,type:"hidden",value:t.getOptionValue(n)})})):e.createElement("input",{name:a,type:"hidden",value:""});return e.createElement("div",null,u)}var d=l[0]?this.getOptionValue(l[0]):"";return e.createElement("input",{name:a,type:"hidden",value:d})}}},{key:"renderLiveRegion",value:function(){var t=this.commonProps,n=this.state,r=n.ariaSelection,o=n.focusedOption,i=n.focusedValue,a=n.isFocused,s=n.selectValue,l=this.getFocusableOptions();return e.createElement($D,Hm({},t,{id:this.getElementId("live-region"),ariaSelection:r,focusedOption:o,focusedValue:i,isFocused:a,selectValue:s,focusableOptions:l,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var t=this.getComponents(),n=t.Control,r=t.IndicatorsContainer,o=t.SelectContainer,i=t.ValueContainer,a=this.props,s=a.className,l=a.id,c=a.isDisabled,u=a.menuIsOpen,d=this.state.isFocused,p=this.commonProps=this.getCommonProps();return e.createElement(o,Hm({},p,{className:s,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:d}),this.renderLiveRegion(),e.createElement(n,Hm({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:d,menuIsOpen:u}),e.createElement(i,Hm({},p,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),e.createElement(r,Hm({},p,{isDisabled:c}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,a=t.isFocused,s=t.prevWasFocused,l=t.instancePrefix,c=e.options,u=e.value,d=e.menuIsOpen,p=e.inputValue,f=e.isMulti,h=HP(u),m={};if(n&&(u!==n.value||c!==n.options||d!==n.menuIsOpen||p!==n.inputValue)){var g=d?function(e,t){return NB(AB(e,t))}(e,h):[],y=d?OB(AB(e,h),"".concat(l,"-option")):[],b=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r<t.length)return t[r]}return null}(t,h):null,v=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,g);m={selectValue:h,focusedOption:v,focusedOptionId:TB(y,v),focusableOptionsWithIds:y,focusedValue:b,clearFocusValueOnUpdate:!1}}var w=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},x=i,C=a&&s;return a&&!C&&(x={value:rD(f,h,h[0]||null),options:h,action:"initial-input-focus"},C=!s),"initial-input-focus"===(null==i?void 0:i.action)&&(x=null),_P(_P(_P({},m),w),{},{prevProps:e,ariaSelection:x,prevWasFocused:C})}}]),n}();VB.defaultProps=IB;var zB=n((function(t,n){var r=function(e){var t=e.defaultInputValue,n=void 0===t?"":t,r=e.defaultMenuIsOpen,o=void 0!==r&&r,i=e.defaultValue,a=void 0===i?null:i,s=e.inputValue,u=e.menuIsOpen,d=e.onChange,p=e.onInputChange,f=e.onMenuClose,h=e.onMenuOpen,m=e.value,g=RP(e,TP),y=OP(c(void 0!==s?s:n),2),b=y[0],v=y[1],w=OP(c(void 0!==u?u:o),2),x=w[0],C=w[1],k=OP(c(void 0!==m?m:a),2),E=k[0],S=k[1],I=l((function(e,t){"function"==typeof d&&d(e,t),S(e)}),[d]),_=l((function(e,t){var n;"function"==typeof p&&(n=p(e,t)),v(void 0!==n?n:e)}),[p]),A=l((function(){"function"==typeof h&&h(),C(!0)}),[h]),N=l((function(){"function"==typeof f&&f(),C(!1)}),[f]),O=void 0!==s?s:b,R=void 0!==u?u:x,T=void 0!==m?m:E;return _P(_P({},g),{},{inputValue:O,menuIsOpen:R,onChange:I,onInputChange:_,onMenuClose:N,onMenuOpen:A,value:T})}(t);return e.createElement(VB,Hm({ref:n},r))})),GB=zB;const HB=({options:e,items_per_page:n,className:r,defaultValue:o,onChange:i})=>{const[a,s]=c(""),[l,u]=c(0),d=e.filter((e=>e.label.toLowerCase().includes(a)||e.value.toLowerCase().includes(a)));var p;p=void 0!==n?d.slice(l*n,(l+1)*n):d;const f={control:e=>({...e,minHeight:void 0})};return t.createElement(GB,{options:p,onInputChange:e=>{s(e.toLowerCase()),u(0)},onChange:i,inputValue:a,isSearchable:!0,placeholder:"Select an option...",className:r,unstyled:!0,styles:f,classNamePrefix:"styled-select",defaultValue:o,value:o})},WB=({io:e,inputconverter:n,parser:r=e=>parseFloat(e)})=>{const i=o(CL),[a,l]=c(n[1](e.value));s((()=>{l(n[1](e.value))}),[e.value]);const u=t=>{t=r(parseFloat(t.toString()).toString()),isNaN(t)?(t="<NoValue>",l("")):(void 0!==e.value_options?.min&&t<e.value_options.min&&(t=e.value_options.min),void 0!==e.value_options?.max&&t>e.value_options.max&&(t=e.value_options.max),l(t.toString()));try{t=n[0](t)}catch(e){}i.worker?.set_io_value({nid:e.node,ioid:e.id,value:t,set_default:e.render_options.set_default})};let d=e.connected?n[1](e.value):a;return void 0===d&&(d=e.value_options?.min),void 0===d&&(d=e.value_options?.max),void 0===d&&(d=""),null===d&&(d=""),void 0!==e.value_options?.max&&void 0!==e.value_options?.min?t.createElement("div",{style:{minWidth:"100px"},className:"SliderContainer"},t.createElement(vP,{className:"SliderRoot",value:[void 0===d?e.value_options?.min:d],min:e.value_options?.min,max:e.value_options?.max,step:e.value_options.step||(e.value_options?.max-e.value_options?.min)/1e3,disabled:e.connected,onValueCommit:e=>{isNaN(e[0])||u(e[0])},onValueChange:e=>{isNaN(e[0])||l(e[0].toString())}},t.createElement(wP,{className:"SliderTrack"},t.createElement(xP,{className:"SliderRange"})),t.createElement(PT,null,t.createElement(eM,{open:!0},t.createElement(tM,{asChild:!0},t.createElement(CP,{className:"SliderThumb"})),t.createElement(rM,{className:"SliderTooltipContent"},d))))):t.createElement("input",{type:"text",className:"nodedatainput styledinput numberinput",value:d,onChange:e=>l(e.target.value),onBlur:e=>{u(e.target.value)},onKeyDown:t=>{if("ArrowUp"!==t.key)if("ArrowDown"!==t.key)/^[0-9.eE+-]$/.test(t.key)||["Backspace","ArrowLeft","ArrowRight","Delete","Tab"].includes(t.key)||t.preventDefault();else{let n=e.render_options.step||1;t.shiftKey&&(n*=10);let r=(parseFloat(d)||0)-n;u(r)}else{let n=e.render_options.step||1;t.shiftKey&&(n*=10);let r=(parseFloat(d)||0)+n;u(r)}},disabled:e.connected,step:e.render_options.step,min:e.value_options?.min,max:e.value_options?.max})},XB=({io:e,inputconverter:n})=>{const r=o(CL),[i,a]=c(n[1](e.value));s((()=>{a(n[1](e.value))}),[e.value]);let l=e.connected?n[1](e.value):i;return null==l&&(l=""),t.createElement("input",{className:"nodedatainput styledinput stringinput",value:l,onChange:e=>a(e.target.value),onBlur:t=>{let o=t.target.value;o||(o="<NoValue>");try{o=n[0](o)}catch(t){}r.worker?.set_io_value({nid:e.node,ioid:e.id,value:o,set_default:e.render_options.set_default})},disabled:e.connected})},ZB=e=>e,$B=e=>parseFloat(e),YB=e=>!!e,UB=e=>"null"===e?null:e,JB=({io:e,inputconverter:n,parser:r})=>{let i=e.value_options?.options||[];Array.isArray(i)&&(i={type:"enum",values:i,keys:i.map((e=>null===e?"None":e.toString())),nullable:!1}),"enum"!==i.type&&(i={type:"enum",values:Object.values(i),keys:Object.keys(i),nullable:!1}),!i.nullable||i.values.includes(null)||i.keys.includes("None")||(i.values.unshift(null),i.keys.unshift("None"));const a=[];for(let e=0;e<i.values.length;e++){const t=null===i.values[e]||void 0===i.values[e]?"undefined":typeof i.values[e];let n=i.values[e];null===n&&(n="null"),void 0===n&&(n="undefined"),a.push([i.keys[e],n.toString(),t])}const s=o(CL),l=({value:t,datatype:o})=>{const i=r||(e=>"nuinputconvertermber"===e?$B:"boolean"===e?YB:"undefined"===e?UB:ZB)(o);let a=i(t);try{a=n[0](t)}catch(e){}s.worker?.set_io_value({nid:e.node,ioid:e.id,value:a,set_default:e.render_options.set_default})};let c=e.value;null===c&&(c="null"),void 0===c&&(c="undefined");const u=a.find((e=>e[1]===c.toString()));let d;void 0!==u&&(d={value:u[1],label:u[0],datatype:u[2]});const p=a.map((e=>({value:e[1],label:e[0],datatype:e[2]})));return t.createElement(HB,{className:"nodedatainput styleddropdown",options:p,defaultValue:d,onChange:e=>{l(null!==e?e:{value:"<NoValue>",datatype:"string"})}})},KB=e=>!!e&&e instanceof Date,QB=e=>!!e&&e instanceof Object&&"function"==typeof e;function qB(e,t){return void 0===t&&(t=!1),!e||t?`"${e}"`:e}function ej(e){let{field:t,value:n,data:r,lastElement:o,openBracket:i,closeBracket:a,level:l,style:d,shouldExpandNode:p,clickToExpandNode:f,outerRef:h}=e;const m=u(!1),[g,v,w]=function(e){const[t,n]=c(e());return[t,()=>n((e=>!e)),n]}((()=>p(l,n,t))),x=u(null);s((()=>{m.current?w(p(l,n,t)):m.current=!0}),[p]);const C=g?d.collapseIcon:d.expandIcon,k=g?"collapse JSON":"expand JSON",E=b(),S=l+1,I=r.length-1,_=e=>{if("ArrowRight"===e.key||"ArrowLeft"===e.key)e.preventDefault(),w("ArrowRight"===e.key);else if("ArrowUp"===e.key||"ArrowDown"===e.key){e.preventDefault();const t="ArrowUp"===e.key?-1:1;if(!h.current)return;const n=h.current.querySelectorAll("[role=button]");let r=-1;for(let e=0;e<n.length;e++)if(0===n[e].tabIndex){r=e;break}if(r<0)return;const o=(r+t+n.length)%n.length;n[r].tabIndex=-1,n[o].tabIndex=0,n[o].focus()}},A=()=>{var e;v();const t=x.current;if(!t)return;const n=null===(e=h.current)||void 0===e?void 0:e.querySelector('[role=button][tabindex="0"]');n&&(n.tabIndex=-1),t.tabIndex=0,t.focus()};return y("div",{className:d.basicChildStyle,role:"treeitem","aria-expanded":g,"aria-selected":void 0},y("span",{className:C,onClick:A,onKeyDown:_,role:"button","aria-label":k,"aria-expanded":g,"aria-controls":g?E:void 0,ref:x,tabIndex:0===l?0:-1}),(t||""===t)&&y("span",f?{className:d.clickableLabel,onClick:A,onKeyDown:_}:{className:d.label},qB(t,d.quotesForFieldNames),":"),y("span",{className:d.punctuation},i),g?y("ul",{id:E,role:"group",className:d.childFieldsContainer},r.map(((e,t)=>y(ij,{key:e[0]||t,field:e[0],value:e[1],style:d,lastElement:t===I,level:S,shouldExpandNode:p,clickToExpandNode:f,outerRef:h})))):y("span",{className:d.collapsedContent,onClick:A,onKeyDown:_}),y("span",{className:d.punctuation},a),!o&&y("span",{className:d.punctuation},","))}function tj(e){let{field:t,openBracket:n,closeBracket:r,lastElement:o,style:i}=e;return y("div",{className:i.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||""===t)&&y("span",{className:i.label},qB(t,i.quotesForFieldNames),":"),y("span",{className:i.punctuation},n),y("span",{className:i.punctuation},r),!o&&y("span",{className:i.punctuation},","))}function nj(e){let{field:t,value:n,style:r,lastElement:o,shouldExpandNode:i,clickToExpandNode:a,level:s,outerRef:l}=e;return 0===Object.keys(n).length?tj({field:t,openBracket:"{",closeBracket:"}",lastElement:o,style:r}):ej({field:t,value:n,lastElement:o||!1,level:s,openBracket:"{",closeBracket:"}",style:r,shouldExpandNode:i,clickToExpandNode:a,data:Object.keys(n).map((e=>[e,n[e]])),outerRef:l})}function rj(e){let{field:t,value:n,style:r,lastElement:o,level:i,shouldExpandNode:a,clickToExpandNode:s,outerRef:l}=e;return 0===n.length?tj({field:t,openBracket:"[",closeBracket:"]",lastElement:o,style:r}):ej({field:t,value:n,lastElement:o||!1,level:i,openBracket:"[",closeBracket:"]",style:r,shouldExpandNode:a,clickToExpandNode:s,data:n.map((e=>[void 0,e])),outerRef:l})}function oj(e){let t,{field:n,value:r,style:o,lastElement:i}=e,a=o.otherValue;var s;return null===r?(t="null",a=o.nullValue):void 0===r?(t="undefined",a=o.undefinedValue):"string"==typeof(s=r)||s instanceof String?(t=function(e,t){return t?`"${e}"`:e}(r,!o.noQuotesForStringValues),a=o.stringValue):(e=>"boolean"==typeof e||e instanceof Boolean)(r)?(t=r?"true":"false",a=o.booleanValue):(e=>"number"==typeof e||e instanceof Number)(r)?(t=r.toString(),a=o.numberValue):(e=>"bigint"==typeof e||e instanceof BigInt)(r)?(t=`${r.toString()}n`,a=o.numberValue):t=KB(r)?r.toISOString():QB(r)?"function() { }":r.toString(),y("div",{className:o.basicChildStyle,role:"treeitem","aria-selected":void 0},(n||""===n)&&y("span",{className:o.label},qB(n,o.quotesForFieldNames),":"),y("span",{className:a},t),!i&&y("span",{className:o.punctuation},","))}function ij(e){const t=e.value;return n=t,Array.isArray(n)?y(rj,Object.assign({},e)):!(e=>"object"==typeof e&&null!==e)(t)||KB(t)||QB(t)?y(oj,Object.assign({},e)):y(nj,Object.assign({},e));var n}var aj="_2bkNM",sj="_1BXBN";const lj={container:"_2IvMF _GzYRV",basicChildStyle:aj,childFieldsContainer:sj,label:"_1MGIk",clickableLabel:"_2YKJg _1MGIk _1MFti",nullValue:"_2T6PJ",undefinedValue:"_1Gho6",stringValue:"_vGjyY",booleanValue:"_3zQKs",numberValue:"_1bQdo",otherValue:"_1xvuR",punctuation:"_3uHL6 _3eOF8",collapseIcon:"_oLqym _f10Tu _1MFti _1LId0",expandIcon:"_2AXVT _f10Tu _1MFti _1UmXx",collapsedContent:"_2KJWg _1pNG9 _1MFti",noQuotesForStringValues:!1,quotesForFieldNames:!1},cj={container:"_11RoI _GzYRV",basicChildStyle:aj,childFieldsContainer:sj,label:"_2bSDX",clickableLabel:"_1RQEj _2bSDX _1MFti",nullValue:"_LaAZe",undefinedValue:"_GTKgm",stringValue:"_Chy1W",booleanValue:"_2vRm-",numberValue:"_2bveF",otherValue:"_1prJR",punctuation:"_gsbQL _3eOF8",collapseIcon:"_3QHg2 _f10Tu _1MFti _1LId0",expandIcon:"_17H2C _f10Tu _1MFti _1UmXx",collapsedContent:"_3fDAz _1pNG9 _1MFti",noQuotesForStringValues:!1,quotesForFieldNames:!1},uj=()=>!0,dj=e=>e<1,pj=e=>{let{data:t,style:n=lj,shouldExpandNode:r=uj,clickToExpandNode:o=!1,...i}=e;const a=u(null);return y("div",Object.assign({"aria-label":"JSON view"},i,{className:n.container,ref:a,role:"tree"}),y(ij,{value:t,style:{...lj,...n},lastElement:!0,level:0,shouldExpandNode:r,clickToExpandNode:o,outerRef:a}))},fj=({data:e})=>t.createElement(pj,{data:e,style:cj,shouldExpandNode:dj}),hj=({tabledata:e})=>{const n=a((()=>(e=>{const t=[];if(void 0===e)return{header:[],rows:[]};void 0===e.data&&(e.data=[]),void 0===e.columns&&(0===e.data.length?e.columns=[]:e.columns=e.data[0].map(((e,t)=>`col${t}`))),void 0===e.index&&(e.index=e.data.map(((e,t)=>`row${t}`)));for(let n=0;n<e.index.length;n++){const r=[e.index[n]];for(let t=0;t<e.columns.length;t++)r.push(e.data[n][t]);t.push(r)}return{header:["index",...e.columns],rows:t}})(e)),[e]),[r,o]=c("asc"),[i,s]=c("index");let l=n.header.indexOf(i);-1===l&&(l=0);const u=((e,t)=>{const n=e.map(((e,t)=>[e,t]));return n.sort(((e,n)=>t(e[0],n[0]))),n.map((e=>e[0]))})(n.rows,(e=>"desc"===e?(e,t)=>t[l]<e[l]?-1:1:(e,t)=>e[l]<t[l]?-1:1)(r));return t.createElement(xw,{className:"tablecontainer"},t.createElement(lw,{size:"small"},t.createElement(Iw,{className:"tableHead"},t.createElement(Rw,{className:"tableheadercolor"},n.header.map((e=>t.createElement(bw,{key:e,sortDirection:i===e&&r,className:"tableheadercolor"},t.createElement(lx,{active:i===e,direction:i===e?r:"asc",onClick:()=>(e=>{o(i===e&&"asc"===r?"desc":"asc"),s(e)})(e),className:"tableheadercolor",sx:{"& .MuiTableSortLabel-icon":{color:"inherit !important"}}},e)))))),t.createElement(hw,null,u.map(((n,r)=>t.createElement(Rw,{key:e.index[r]},n.map(((e,n)=>t.createElement(bw,{key:n,className:0==n?"indexcol":"datacol"},e)))))))))};var mj,gj={};
|
|
141
|
-
/*!
|
|
142
|
-
* content-type
|
|
143
|
-
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
144
|
-
* MIT Licensed
|
|
145
|
-
*/var yj=function(){if(mj)return gj;mj=1;var e=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,t=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,n=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,r=/\\([\u000b\u0020-\u00ff])/g,o=/([\\"])/g,i=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function a(e){var r=String(e);if(n.test(r))return r;if(r.length>0&&!t.test(r))throw new TypeError("invalid parameter value");return'"'+r.replace(o,"\\$1")+'"'}function s(e){this.parameters=Object.create(null),this.type=e}return gj.format=function(e){if(!e||"object"!=typeof e)throw new TypeError("argument obj is required");var t=e.parameters,r=e.type;if(!r||!i.test(r))throw new TypeError("invalid type");var o=r;if(t&&"object"==typeof t)for(var s,l=Object.keys(t).sort(),c=0;c<l.length;c++){if(s=l[c],!n.test(s))throw new TypeError("invalid parameter name");o+="; "+s+"="+a(t[s])}return o},gj.parse=function(t){if(!t)throw new TypeError("argument string is required");var n="object"==typeof t?function(e){var t;"function"==typeof e.getHeader?t=e.getHeader("content-type"):"object"==typeof e.headers&&(t=e.headers&&e.headers["content-type"]);if("string"!=typeof t)throw new TypeError("content-type header is missing from object");return t}(t):t;if("string"!=typeof n)throw new TypeError("argument string is required to be a string");var o=n.indexOf(";"),a=-1!==o?n.slice(0,o).trim():n.trim();if(!i.test(a))throw new TypeError("invalid media type");var l=new s(a.toLowerCase());if(-1!==o){var c,u,d;for(e.lastIndex=o;u=e.exec(n);){if(u.index!==o)throw new TypeError("invalid parameter format");o+=u[0].length,c=u[1].toLowerCase(),34===(d=u[2]).charCodeAt(0)&&-1!==(d=d.slice(1,-1)).indexOf("\\")&&(d=d.replace(r,"$1")),l.parameters[c]=d}if(o!==n.length)throw new TypeError("invalid parameter format")}return l},gj}(),bj=new Map,vj=function(e){return e.cloneNode(!0)},wj=function(){return"file:"===window.location.protocol},xj=function(e,t,n){var r=new XMLHttpRequest;r.onreadystatechange=function(){try{if(!/\.svg/i.test(e)&&2===r.readyState){var t=r.getResponseHeader("Content-Type");if(!t)throw new Error("Content type not found");var o=yj.parse(t).type;if("image/svg+xml"!==o&&"text/plain"!==o)throw new Error("Invalid content type: ".concat(o))}if(4===r.readyState){if(404===r.status||null===r.responseXML)throw new Error(wj()?"Note: SVG injection ajax calls do not work locally without adjusting security settings in your browser. Or consider using a local webserver.":"Unable to load SVG file: "+e);if(!(200===r.status||wj()&&0===r.status))throw new Error("There was a problem injecting the SVG: "+r.status+" "+r.statusText);n(null,r)}}catch(e){if(r.abort(),!(e instanceof Error))throw e;n(e,r)}},r.open("GET",e),r.withCredentials=t,r.overrideMimeType&&r.overrideMimeType("text/xml"),r.send()},Cj={},kj=function(e,t){Cj[e]=Cj[e]||[],Cj[e].push(t)},Ej=function(e,t,n){if(bj.has(e)){var r=bj.get(e);if(void 0===r)return void kj(e,n);if(r instanceof SVGSVGElement)return void n(null,vj(r))}bj.set(e,void 0),kj(e,n),xj(e,t,(function(t,n){var r;t?bj.set(e,t):(null===(r=n.responseXML)||void 0===r?void 0:r.documentElement)instanceof SVGSVGElement&&bj.set(e,n.responseXML.documentElement),function(e){for(var t=function(t,n){setTimeout((function(){if(Array.isArray(Cj[e])){var n=bj.get(e),r=Cj[e][t];n instanceof SVGSVGElement&&r(null,vj(n)),n instanceof Error&&r(n),t===Cj[e].length-1&&delete Cj[e]}}),0)},n=0,r=Cj[e].length;n<r;n++)t(n)}(e)}))},Sj=function(e,t,n){xj(e,t,(function(e,t){var r;e?n(e):(null===(r=t.responseXML)||void 0===r?void 0:r.documentElement)instanceof SVGSVGElement&&n(null,t.responseXML.documentElement)}))},Ij=0,_j=[],Aj={},Nj="http://www.w3.org/1999/xlink",Oj=function(e,t,n,r,o,i,a){var s=e.getAttribute("data-src")||e.getAttribute("src");if(s){if(-1!==_j.indexOf(e))return _j.splice(_j.indexOf(e),1),void(e=null);_j.push(e),e.setAttribute("src",""),(r?Ej:Sj)(s,o,(function(r,o){if(!o)return _j.splice(_j.indexOf(e),1),e=null,void a(r);var l=e.getAttribute("id");l&&o.setAttribute("id",l);var c=e.getAttribute("title");c&&o.setAttribute("title",c);var u=e.getAttribute("width");u&&o.setAttribute("width",u);var d=e.getAttribute("height");d&&o.setAttribute("height",d);var p=Array.from(new Set(Wd(Wd(Wd([],(o.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(e.getAttribute("class")||"").split(" "),!0))).join(" ").trim();o.setAttribute("class",p);var f=e.getAttribute("style");f&&o.setAttribute("style",f),o.setAttribute("data-src",s);var h=[].filter.call(e.attributes,(function(e){return/^data-\w[\w-]*$/.test(e.name)}));if(Array.prototype.forEach.call(h,(function(e){e.name&&e.value&&o.setAttribute(e.name,e.value)})),n){var m,g,y,b,v,w={clipPath:["clip-path"],"color-profile":["color-profile"],cursor:["cursor"],filter:["filter"],linearGradient:["fill","stroke"],marker:["marker","marker-start","marker-mid","marker-end"],mask:["mask"],path:[],pattern:["fill","stroke"],radialGradient:["fill","stroke"]};Object.keys(w).forEach((function(e){m=e,y=w[e];for(var t=function(e,t){var n;b=g[e].id,v=b+"-"+ ++Ij,Array.prototype.forEach.call(y,(function(e){for(var t=0,r=(n=o.querySelectorAll("["+e+'*="'+b+'"]')).length;t<r;t++){var i=n[t].getAttribute(e);i&&!i.match(new RegExp('url\\("?#'+b+'"?\\)'))||n[t].setAttribute(e,"url(#"+v+")")}}));for(var r=o.querySelectorAll("[*|href]"),i=[],a=0,s=r.length;a<s;a++){var l=r[a].getAttributeNS(Nj,"href");l&&l.toString()==="#"+g[e].id&&i.push(r[a])}for(var c=0,u=i.length;c<u;c++)i[c].setAttributeNS(Nj,"href","#"+v);g[e].id=v},n=0,r=(g=o.querySelectorAll(m+"[id]")).length;n<r;n++)t(n)}))}o.removeAttribute("xmlns:a");for(var x,C,k=o.querySelectorAll("script"),E=[],S=0,I=k.length;S<I;S++)(C=k[S].getAttribute("type"))&&"application/ecmascript"!==C&&"application/javascript"!==C&&"text/javascript"!==C||((x=k[S].innerText||k[S].textContent)&&E.push(x),o.removeChild(k[S]));if(E.length>0&&("always"===t||"once"===t&&!Aj[s])){for(var _=0,A=E.length;_<A;_++)new Function(E[_])(window);Aj[s]=!0}var N=o.querySelectorAll("style");if(Array.prototype.forEach.call(N,(function(e){e.textContent+=""})),o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("xmlns:xlink",Nj),i(o),!e.parentNode)return _j.splice(_j.indexOf(e),1),e=null,void a(new Error("Parent node is null"));e.parentNode.replaceChild(o,e),_j.splice(_j.indexOf(e),1),e=null,a(null,o)}))}else a(new Error("Invalid data-src or src attribute"))},Rj=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],Tj="http://www.w3.org/2000/svg",Mj="http://www.w3.org/1999/xlink",Pj=function(t){function n(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).initialState={hasError:!1,isLoading:!0},e.state=e.initialState,e._isMounted=!1,e.reactWrapper=void 0,e.nonReactWrapper=void 0,e.refCallback=function(t){e.reactWrapper=t},e}Dw(n,t);var r=n.prototype;return r.renderSVG=function(){var e=this;if(this.reactWrapper instanceof function(e){return((null==e?void 0:e.ownerDocument)||document).defaultView||window}(this.reactWrapper).Node){var t,n,r=this.props,o=r.desc,i=r.evalScripts,a=r.httpRequestWithCredentials,s=r.renumerateIRIElements,l=r.src,c=r.title,u=r.useRequestCache,d=this.props.onError,p=this.props.beforeInjection,f=this.props.afterInjection,h=this.props.wrapper;"svg"===h?((t=document.createElementNS(Tj,h)).setAttribute("xmlns",Tj),t.setAttribute("xmlns:xlink",Mj),n=document.createElementNS(Tj,h)):(t=document.createElement(h),n=document.createElement(h)),t.appendChild(n),n.dataset.src=l,this.nonReactWrapper=this.reactWrapper.appendChild(t);var m=function(t){e.removeSVG(),e._isMounted?e.setState((function(){return{hasError:!0,isLoading:!1}}),(function(){d(t)})):d(t)};!function(e,t){var n=void 0===t?{}:t,r=n.afterAll,o=void 0===r?function(){}:r,i=n.afterEach,a=void 0===i?function(){}:i,s=n.beforeEach,l=void 0===s?function(){}:s,c=n.cacheRequests,u=void 0===c||c,d=n.evalScripts,p=void 0===d?"never":d,f=n.httpRequestWithCredentials,h=void 0!==f&&f,m=n.renumerateIRIElements,g=void 0===m||m;if(e&&"length"in e)for(var y=0,b=0,v=e.length;b<v;b++)Oj(e[b],p,g,u,h,l,(function(t,n){a(t,n),e&&"length"in e&&e.length===++y&&o(y)}));else e?Oj(e,p,g,u,h,l,(function(t,n){a(t,n),o(1),e=null})):o(0)}(n,{afterEach:function(t,n){t?m(t):e._isMounted&&e.setState((function(){return{isLoading:!1}}),(function(){try{f(n)}catch(e){m(e)}}))},beforeEach:function(e){if(e.setAttribute("role","img"),o){var t=e.querySelector(":scope > desc");t&&e.removeChild(t);var n=document.createElement("desc");n.innerHTML=o,e.prepend(n)}if(c){var r=e.querySelector(":scope > title");r&&e.removeChild(r);var i=document.createElement("title");i.innerHTML=c,e.prepend(i)}try{p(e)}catch(e){m(e)}},cacheRequests:u,evalScripts:i,httpRequestWithCredentials:a,renumerateIRIElements:s})}},r.removeSVG=function(){var e;null!=(e=this.nonReactWrapper)&&e.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},r.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},r.componentDidUpdate=function(e){var t=this;(function(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1})(Hm({},e),this.props)&&this.setState((function(){return t.initialState}),(function(){t.removeSVG(),t.renderSVG()}))},r.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},r.render=function(){var t=this.props;t.afterInjection,t.beforeInjection,t.desc,t.evalScripts;var n=t.fallback;t.httpRequestWithCredentials;var r=t.loading;t.renumerateIRIElements,t.src,t.title,t.useRequestCache;var o=t.wrapper,i=Mw(t,Rj),a=o;return e.createElement(a,Hm({},i,{ref:this.refCallback},"svg"===o?{xmlns:Tj,xmlnsXlink:Mj}:{}),this.state.isLoading&&r&&e.createElement(r,null),this.state.hasError&&n&&e.createElement(n,null))},n}(e.Component);Pj.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"},Pj.propTypes={afterInjection:dh.func,beforeInjection:dh.func,desc:dh.string,evalScripts:dh.oneOf(["always","once","never"]),fallback:dh.oneOfType([dh.func,dh.object,dh.string]),httpRequestWithCredentials:dh.bool,loading:dh.oneOfType([dh.func,dh.object,dh.string]),onError:dh.func,renumerateIRIElements:dh.bool,src:dh.string.isRequired,title:dh.string,useRequestCache:dh.bool,wrapper:dh.oneOf(["div","span","svg"])};const Dj=({value:e,renderoptions:n})=>(void 0===n&&(n={}),void 0===n.format&&(n.format="jpeg"),t.createElement("img",{src:"data:image/"+n.format+";base64, "+e,style:{maxWidth:"100%",maxHeight:"100%"}})),Bj=({value:e})=>t.createElement(Pj,{src:`data:image/svg+xml;base64,${btoa(e)}`,style:{maxWidth:"100%",maxHeight:"100%"},beforeInjection:e=>{e.classList.add("svg-class-name"),e.setAttribute("style","max-width: 100%; max-height: 100%;"),e.setAttribute("width","100%"),e.setAttribute("height","100%")}}),jj=({io:e})=>{let n=e.fullvalue;if(null==n&&(n=e.value),void 0===n&&(n=""),"string"!=typeof n||n.length%4!=0)return t.createElement("div",null,n);const r=Math.round(3*n.length/4);return t.createElement("div",null,t.createElement("pre",null,"Bytes(",r,")"))},Lj=({io:e})=>{let n=e.fullvalue;return void 0===n&&(n=e.value),void 0===n&&(n={}),t.createElement(fj,{data:n})},Fj={float:({io:e,inputconverter:t})=>WB({io:e,inputconverter:t,parser:parseFloat}),int:({io:e,inputconverter:t})=>WB({io:e,inputconverter:t,parser:parseInt}),bool:({io:e,inputconverter:n})=>{const r=o(CL),i=void 0===e.value,a=u(null);s((()=>{a.current&&(a.current.indeterminate=i)}),[a,i]);return t.createElement("input",{ref:a,type:"checkbox",className:"styledcheckbox booleaninput",checked:!!n[1](e.value),onChange:t=>{let o=t.target.checked;try{o=n[0](t.target.checked)}catch(t){}r.worker?.set_io_value({nid:e.node,ioid:e.id,value:o,set_default:e.render_options.set_default})},disabled:e.connected})},string:XB,str:XB,color:({io:e})=>{const n=o(CL),r=e.value_options?.colorspace||"hex";let i=!1;return"string"!=typeof e.type&&"anyOf"in e.type&&void 0!==e.type.anyOf&&(i=e.type.anyOf.some((e=>"None"===e))),t.createElement(WM,{onChange:t=>{let o="<NoValue>";t&&(o=t[r]?t[r]():t.hex()),null===t&&(o=null),n.worker?.set_io_value({nid:e.node,ioid:e.id,value:o,set_default:e.render_options.set_default})},inicolordata:e.value,allow_null:i,inicolorspace:r})},select:JB,enum:JB,bytes:jj},Vj={Inputrenderer:Fj,Outputrenderer:{},HandlePreviewRenderer:{bytes:jj},DataOverlayRenderer:{},DataPreviewViewRenderer:{string:({io:e})=>{let n=e.fullvalue;return null==n&&(n=e.value),n=void 0===n?"":JSON.stringify(e.value).replace(/\\n/g,"\n"),t.createElement("div",null,t.createElement("pre",null,n))},table:({io:e})=>{let n=e.fullvalue;return null==n&&(n=e.value),void 0===n&&(n=[]),t.createElement(hj,{tabledata:n})},image:({io:e})=>{let n=e.fullvalue;return null==n&&(n=e.value),void 0===n&&(n=""),t.createElement(Dj,{value:n})},svg:({io:e})=>{let n=e.fullvalue;return null==n&&(n=e.value),void 0===n&&(n=""),t.createElement(Bj,{value:n})},dict:Lj,bytes:jj},DataViewRenderer:{},InLineRenderer:{bytes:({io:e})=>{let t=e.fullvalue;null==t&&(t=e.value),t=void 0===t?"":JSON.stringify(e.value).replace(/\\n/g,"\n");return`Bytes(${Math.round(3*t.length/4)})`}}},zj=(e,t)=>{const n=t.options||{},r=void 0===n.overwrite||n.overwrite;switch(t.type){case"EXTEND_INPUT_RENDER":return!r&&e.Inputrenderer[t.payload.type]?e:{...e,Inputrenderer:{...e.Inputrenderer,[t.payload.type]:t.payload.component}};case"EXTEND_OUTPUT_RENDER":return!r&&e.Outputrenderer[t.payload.type]?e:{...e,Outputrenderer:{...e.Outputrenderer,[t.payload.type]:t.payload.component}};case"EXTEND_HANDLE_PREVIEW_RENDER":return!r&&e.HandlePreviewRenderer[t.payload.type]?e:{...e,HandlePreviewRenderer:{...e.HandlePreviewRenderer,[t.payload.type]:t.payload.component}};case"EXTEND_DATA_OVERLAY_RENDER":return!r&&e.DataOverlayRenderer[t.payload.type]?e:{...e,DataOverlayRenderer:{...e.DataOverlayRenderer,[t.payload.type]:t.payload.component}};case"EXTEND_DATA_PREVIEW_RENDER":return!r&&e.DataPreviewViewRenderer[t.payload.type]?e:{...e,DataPreviewViewRenderer:{...e.DataPreviewViewRenderer,[t.payload.type]:t.payload.component}};case"EXTEND_DATA_VIEW_RENDER":return!r&&e.DataViewRenderer[t.payload.type]?e:{...e,DataViewRenderer:{...e.DataViewRenderer,[t.payload.type]:t.payload.component}};case"EXTEND_FROM_PLUGIN":let n=!1;const o=[[t.payload.plugin.input_renderers||{},e.Inputrenderer],[t.payload.plugin.output_renderers||{},e.Outputrenderer],[t.payload.plugin.handle_preview_renderers||{},e.HandlePreviewRenderer],[t.payload.plugin.data_overlay_renderers||{},e.DataOverlayRenderer],[t.payload.plugin.data_preview_renderers||{},e.DataPreviewViewRenderer],[t.payload.plugin.data_view_renderers||{},e.DataViewRenderer]];for(const[e,t]of o){if(Object.keys(e).length>0)if(r)n=!0;else for(const r in e)if(!t[r]){n=!0;break}if(n)break}if(!n)return e;for(const[e,t]of o)for(const n in e)!r&&t[n]||(t[n]=e[n]);return{...e};default:return e}},Gj=({children:e,plugins:n,fnrf_zst:r})=>{const[o,i]=v(zj,Vj),a=(e,t)=>{i({type:"EXTEND_FROM_PLUGIN",payload:{plugin:e},options:t})};return s((()=>{for(const e in n){const o=n[e].RendererPlugin;o&&a(o);const i=n[e].renderpluginfactory;i&&a(i({React:t,fnrf_zst:r}))}}),[n]),t.createElement(Hj.Provider,{value:{Inputrenderer:o.Inputrenderer,Outputrenderer:o.Outputrenderer,HandlePreviewRenderer:o.HandlePreviewRenderer,DataOverlayRenderer:o.DataOverlayRenderer,DataPreviewViewRenderer:o.DataPreviewViewRenderer,DataViewRenderer:o.DataViewRenderer,InLineRenderer:o.InLineRenderer,extendInputRenderMapping:(e,t,n)=>{i({type:"EXTEND_INPUT_RENDER",payload:{type:e,component:t},options:n})},extendOutputRenderMapping:(e,t,n)=>{i({type:"EXTEND_OUTPUT_RENDER",payload:{type:e,component:t},options:n})},extendHandlePreviewRenderMapping:(e,t,n)=>{i({type:"EXTEND_HANDLE_PREVIEW_RENDER",payload:{type:e,component:t},options:n})},extendDataOverlayRenderMapping:(e,t,n)=>{i({type:"EXTEND_DATA_OVERLAY_RENDER",payload:{type:e,component:t},options:n})},extendDataPreviewRenderMapping:(e,t,n)=>{i({type:"EXTEND_DATA_PREVIEW_RENDER",payload:{type:e,component:t},options:n})},extendDataViewRenderMapping:(e,t,n)=>{i({type:"EXTEND_DATA_VIEW_RENDER",payload:{type:e,component:t},options:n})},extendFromPlugin:a}},e)},Hj=i({Inputrenderer:Vj.Inputrenderer,Outputrenderer:Vj.Outputrenderer,HandlePreviewRenderer:Vj.HandlePreviewRenderer,DataOverlayRenderer:Vj.DataOverlayRenderer,DataPreviewViewRenderer:Vj.DataPreviewViewRenderer,DataViewRenderer:Vj.DataViewRenderer,InLineRenderer:Vj.InLineRenderer,extendInputRenderMapping:(e,t,n)=>{},extendOutputRenderMapping:(e,t,n)=>{},extendHandlePreviewRenderMapping:(e,t,n)=>{},extendDataOverlayRenderMapping:(e,t,n)=>{},extendDataPreviewRenderMapping:(e,t,n)=>{},extendDataViewRenderMapping:(e,t,n)=>{},extendFromPlugin:(e,t)=>{}}),Wj=({component:e,...n})=>t.createElement(e,{...n}),Xj=e=>{const t=o(CL).render_options(),[n]=Zj(e.type,t.typemap||{});if(!n)return Lj;const{DataOverlayRenderer:r,DataPreviewViewRenderer:i}=o(Hj);return r[n]?r[n]:i[n]?i[n]:Lj},Zj=(e,t)=>{if("string"==typeof e)return e in t?[t[e],e]:[e,e];if("allOf"in e&&void 0!==e.allOf)return[void 0,void 0];if("anyOf"in e&&void 0!==e.anyOf){const n=e.anyOf.map((e=>Zj(e,t)));for(const e of n)switch(e[0]){case"bool":return["bool",e[1]];case"enum":return["enum",e[1]];case"float":return["float",e[1]];case"int":return["int",e[1]];case"string":case"str":return["string",e[1]]}return[void 0,void 0]}return"type"in e&&void 0!==e.type&&"enum"===e.type?["enum","enum"]:[void 0,void 0]},$j=({io:e,typestring:n,preview:r,...i})=>{const[a,s]=c(!1),[l,u]=c(!1),[d,p]=e?(e=>{const t=o(CL).render_options(),[n]=Zj(e.type,t.typemap||{}),{HandlePreviewRenderer:r,DataPreviewViewRenderer:i}=o(Hj),a=Xj(e);return n?r[n]?[r[n],a]:i[n]?[i[n],a]:[Lj,a]:[Lj,a]})(e):[void 0,void 0];return t.createElement(qT,null,t.createElement(eM,{open:a||l,onOpenChange:u},t.createElement(tM,{asChild:!0},t.createElement(Si,{id:e.id,...i})),t.createElement(nM,null,t.createElement(rM,{className:"iotooltipcontent",sideOffset:5},t.createElement("div",{className:"iotooltip_container"},t.createElement("div",{className:"iotooltip_header"},a?t.createElement(Qv,{onClick:()=>s(!1)}):t.createElement(Kv,{onClick:()=>s(!0)}),p&&t.createElement(dx,{title:e.full_id,trigger:t.createElement(qv,null),onOpenChange:t=>{t&&e.try_get_full_value&&e.try_get_full_value(),s(t)}},t.createElement(Wj,{component:p,io:e}))),d?t.createElement(Wj,{component:d,io:e}):`no preview available for "${n}"`),t.createElement(oM,{className:"iotooltipcontentarrow"})))))},Yj={"":[e=>e,e=>e],str_to_json:[e=>JSON.parse(e),e=>"string"==typeof e?e:JSON.stringify(e)],str_to_list:[e=>{try{const t=JSON.parse(e);return Array.isArray(t)?t:[t]}catch(t){try{return JSON.parse("["+e+"]")}catch(e){}}throw new Error("Invalid list")},e=>JSON.stringify(e)]},Uj=({io:e})=>{const n=o(CL).render_options(),[r,i]=Zj(e.render_options.type,n.typemap||{}),{Inputrenderer:a}=o(Hj),s=r?e.value_options?.options?JB:a[r]:void 0,l=Yj[(i&&n.inputconverter?.[i])??""];return t.createElement("div",{className:"nodeinput"},t.createElement($j,{io:e,typestring:r,position:zo.Left,type:"target"}),s&&t.createElement("div",{className:"iovaluefield nodrag"},t.createElement(s,{io:e,inputconverter:l})),t.createElement("div",{className:"ioname"},e.name),t.createElement($j,{io:e,typestring:r,position:zo.Right,type:"source"}))},Jj=({io:e,typestring:n})=>{const{InLineRenderer:r}=o(Hj);if(n&&r[n])return t.createElement("div",null,r[n]({io:e}));let i=e.fullvalue;return null==i&&(i=e.value),i=void 0===i?"":JSON.stringify(i).replace(/\\n/g,"\n"),i.length>63&&(i=i.slice(0,60)+"..."),t.createElement("div",null,i)},Kj=({io:e})=>{const n=o(CL).render_options(),[r]=Zj(e.type,n.typemap||{}),{Outputrenderer:i}=o(Hj),a=r?i[r]:void 0;return t.createElement("div",{className:"nodeoutput"},t.createElement($j,{io:e,typestring:r,position:zo.Right,type:"source"}),t.createElement("div",{className:"ioname"},e.name),a?t.createElement("div",{className:"iovaluefield nodrag"},t.createElement(a,{io:e})):t.createElement("div",{className:"iovaluefield"},t.createElement(Jj,{io:e,typestring:r})))};function Qj(e){return`${Math.floor(e/60)}:${Math.floor(e%60).toString().padStart(2,"0")}`}function qj(e,t){const n=["","K","M","G","T"];let r=0;for(;e>=t&&r<n.length-1;)e/=t,r++;return[e.toFixed(2),n[r]]}const eL=({state:e,className:n="reacttqdm",...r})=>{const o=u(null),i=u(null);s((()=>{const e=()=>{o.current&&i.current&&function(e,t,n={}){const{maxFontSize:r=100,minFontSize:o=6,decrementFactor:i=.9}=n;if(!e||!t)return;if(i>=1||i<=0)throw new Error("decrementFactor must be between 0 and 1");const a=e.getBoundingClientRect(),s=a.width,l=a.height;let c=r;t.style.whiteSpace="nowrap",t.style.display="inline-block",t.style.fontSize=c+"px";let u=t.getBoundingClientRect();for(;(u.width>s||u.height>l)&&c>o;)c*=i,t.style.fontSize=c+"px",u=t.getBoundingClientRect()}(o.current,i.current,{maxFontSize:12,decrementFactor:.9})};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[e]);const a=e.total?e.n/e.total*100:0;return t.createElement("div",{ref:o,className:n,...r},t.createElement("div",{style:{position:"relative",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"}},t.createElement("div",{className:n+"-bar",style:{position:"absolute",width:"100%",height:"100%",overflow:"hidden"}},t.createElement("div",{className:n+"-progress",style:{width:`${a}%`,height:"100%"}})),t.createElement("div",{className:n+"-text",ref:i},function(e={n:0,elapsed:0,ascii:!1,unit:"it",unit_scale:!1,unit_divisor:1e3}){let t=e.total??null;const{n:n,unit_scale:r,elapsed:o,unit:i,unit_divisor:a,prefix:s="",rate:l,postfix:c=null,initial:u=0}=e;null!==t&&n>=t+.5&&(t=null);let d=n,p=t,f=l;r&&!0!==r&&1!==r&&(null!==t&&(p=t*r),d=n*r,void 0!==l&&(f=l*r));const h=Qj(o);void 0===f&&o>0&&(f=(d-u)/o);const m=f?1/f:void 0,[g,y]=f?qj(f,a):[void 0,""],[b,v]=m?qj(m,1e3):[void 0,""],w=m&&m>1?b?`${b}${v}s/`+i:"?":(g||"?")+`${y}${i}/s`,x=r?qj(d,a).join(""):d.toString(),C=r&&null!==p?qj(p,a).join(""):p?.toString()??"?",k=f?Qj(f&&null!==p?(p-d)/f:0):"?",E=s?`${s}: `:"";if(null!==t){const e=` ${x}/${C} [${h} < ${k}, ${w}${c??""}]`;return`${E}${(d/t*100).toFixed(0)}%${e}`}return`${E}${x}${i} [${h}, ${w}${c??""}]`}(e))))},tL=({node_data:e})=>{const n=o(CL);return t.createElement("div",{className:"nodeheader",title:e.description||e.node_name},t.createElement("div",{className:"nodeheader_element"},t.createElement(nw,{fontSize:"inherit",className:"triggerbutton",onClick:()=>{n.on_node_action({type:"trigger",from_remote:!1,id:e.id})}}),t.createElement(tw,{fontSize:"inherit",onClick:async()=>{n.logger.info("nodestatus",await(n.worker?.get_node_status(e.id)))}})),t.createElement("div",{className:"nodeheader_element nodeheader_title"},t.createElement("div",{className:"nodeheader_title_text"},e.node_name)),t.createElement("div",{className:"nodeheader_element"},t.createElement(ew,{fontSize:"inherit"})))},nL=({node_data:e})=>{const n=e.render_options?.data?.src?e.io[e.render_options?.data?.src]:void 0,[r,i]=n?(e=>{const t=o(CL).render_options(),[n]=Zj(e.type,t.typemap||{}),r=Xj(e),{DataPreviewViewRenderer:i,DataViewRenderer:a}=o(Hj);return n?a[n]?[a[n],r]:i[n]?[i[n],r]:[Lj,r]:[Lj,r]})(n):[void 0,void 0];return t.createElement("div",{className:"nodrag nodedatabody"},r&&n&&t.createElement(dx,{title:n.full_id,trigger:t.createElement("div",null,t.createElement(Wj,{component:r,io:n})),onOpenChange:e=>{e&&n?.try_get_full_value&&n?.try_get_full_value()}},t.createElement(Wj,{component:i,io:n})))},rL=({node_data:e})=>{const n=Object.values(e.io).filter((e=>e.is_input)),r=Object.values(e.io).filter((e=>!e.is_input));return e.render_options,t.createElement("div",{className:"nodebody"},r.map((e=>e.hidden?null:t.createElement(Kj,{key:e.id,io:e}))),t.createElement(nL,{node_data:e}),n.map((e=>e.hidden?null:t.createElement(Uj,{key:e.id,io:e}))))},oL=({node_data:e})=>{const[n,r]=c(e.name);s((()=>{r(e.name)}),[e]);const i=o(CL);return t.createElement("input",{className:"nodename_input",value:n,onChange:e=>{r(e.target.value)},onBlur:t=>{const n=t.target.value;i.on_node_action({type:"update",from_remote:!1,id:e.id,node:{name:n}})}})},iL=({node_data:e})=>e.progress?t.createElement(eL,{style:{height:"idle"===e.progress.prefix?"0px":void 0},state:e.progress,className:"nodeprogress"}):null,aL=({node_data:e})=>t.createElement("div",{className:"nodefooter"},e.error&&t.createElement("div",{className:"nodeerror"},e.error),t.createElement(iL,{node_data:e})),sL=({io:e})=>{const n=t.useContext(CL).render_options(),[r,o]=Zj(e.render_options.type,n.typemap||{}),{Inputrenderer:i}=t.useContext(Hj),a=r?e.value_options?.options?JB:i[r]:void 0,s=Yj[(o&&n.inputconverter?.[o])??""];return t.createElement("div",{className:"nodesettings_component"},t.createElement("div",null,e.name),a&&t.createElement(a,{io:e,inputconverter:s}),t.createElement("div",null,t.createElement("label",null,"hidden:",t.createElement("input",{className:"styledcheckbox",type:"checkbox",disabled:e.connected,onChange:t=>{e.set_hidden?.(t.target.checked)},checked:e.hidden}))))},lL=({io:e})=>t.createElement("div",{className:"nodesettings_component"},t.createElement("div",null,e.name),t.createElement("div",null,t.createElement("label",null,"hidden:",t.createElement("input",{className:"styledcheckbox",type:"checkbox",disabled:e.connected,onChange:t=>{e.set_hidden?.(t.target.checked)},checked:e.hidden})))),cL=({nodestore:e})=>{const n=e(),r=Object.values(n.io).filter((e=>e.is_input)),o=Object.values(n.io).filter((e=>!e.is_input));return t.createElement("div",null,t.createElement("div",{className:"nodesettings_section"},t.createElement("div",{className:"nodesettings_component"},t.createElement("div",null,"Name"),t.createElement("div",null,t.createElement(oL,{node_data:n})))),t.createElement("div",{className:"nodesettings_section"},t.createElement("div",null,"Inputs"),r.map((e=>t.createElement(sL,{io:e,key:e.id})))),t.createElement("div",{className:"nodesettings_section"},t.createElement("div",null,"Outputs"),o.map((e=>t.createElement(lL,{io:e,key:e.id})))))},uL=()=>{const e=t.useContext(CL),n=e.local_state((e=>e.selected_nodes));if(0===n.length)return t.createElement("div",null,"Node Settings");if(n.length>1)return t.createElement("div",null,"Multiple Nodes Selected");const r=e.nodespace.get_node(n[0]);return r?t.createElement(cL,{nodestore:r}):t.createElement("div",null,"Node not found")},dL=()=>{const e=t.useContext(CL),n=e.local_settings((e=>e.view_settings.expand_node_props)),r=e.local_settings((e=>e.update_view_settings)),o=e=>{r({expand_node_props:e})};return t.createElement("div",{className:"nodesettings_container"},t.createElement("div",{className:"nodesettings_expander"},n?t.createElement(Jv,{onClick:()=>{o(!1)}}):t.createElement(rw,{onClick:()=>{o(!0)}})),t.createElement("div",{className:"nodesettings_content "+(n?"expanded":"collapsed")},n&&t.createElement(uL,null)))},pL=e=>({nodes:e.nodes,edges:e.edges,onNodesChange:e.onNodesChange,onEdgesChange:e.onEdgesChange,onConnect:e.onConnect}),fL={default:({data:e})=>{const n=e.UseNodeStore(),r=n.frontend.collapsed||!1,[o,i]=c(!1);return s((()=>{let e;return n.in_trigger?i(!0):o&&(e=setTimeout((()=>i(!1)),200)),()=>clearTimeout(e)}),[n.in_trigger,o]),t.createElement(t.Fragment,null,t.createElement("div",{className:"innernode"+(o?" intrigger":"")+(n.error?" error":"")},t.createElement(tL,{node_data:n}),t.createElement(oL,{node_data:n}),r?null:t.createElement(rL,{node_data:n}),t.createElement(aL,{node_data:n})))}},hL={default:({id:e,sourceX:n,sourceY:r,targetX:o,targetY:i,sourcePosition:a,targetPosition:s,data:l,...c})=>{const[u]=ei({sourceX:n,sourceY:r,sourcePosition:a,targetX:o,targetY:i,targetPosition:s});return t.createElement(t.Fragment,null,t.createElement(To,{id:e,path:u,...c}))}},mL=()=>{const e=ca();return o(CL).rf_instance=e,t.createElement(t.Fragment,null)},gL=()=>{const e=o(CL),n=Ji("Delete"),r=ao(Ls,ce),i=ao(js,ce);if(n){for(const n of r)if(n.selected){if(!e.worker)return t.createElement(t.Fragment,null);if(!n.source||!n.target)return t.createElement(t.Fragment,null);if(!n.sourceHandle||!n.targetHandle)return t.createElement(t.Fragment,null);e.worker.remove_edge({src_nid:n.source,src_ioid:n.sourceHandle,trg_nid:n.target,trg_ioid:n.targetHandle})}for(const n of i)if(n.selected){if(!e.worker)return t.createElement(t.Fragment,null);e.worker.remove_node(n.id)}}return t.createElement(t.Fragment,null)},yL=({id:e,top:n,left:r,right:i,bottom:a,...s})=>{const{getNode:c,setNodes:u,addNodes:d,setEdges:p}=ca(),f=o(CL),h=l((()=>{const t=c(e);if(!t)return;const n={x:t.position.x+50,y:t.position.y+50};d({...t,id:`${t.id}-copy`,position:n})}),[e,c,d]),m=l((()=>{f.on_node_action({type:"delete",id:e,from_remote:!1})}),[e,u,p]),g=f.nodespace.get_node(e,!1);if(!g)return t.createElement(t.Fragment,null," ");const y=g();return t.createElement("div",{style:{top:n,left:r,right:i,bottom:a},className:"context-menu",...s},t.createElement("p",{style:{fontWeight:"bold"}},t.createElement("small",null,y.name)),t.createElement("button",{onClick:h},"duplicate"),t.createElement("button",{onClick:m},"delete"))},bL=e=>{const n=o(CL),r=u(null);s((()=>{n.reactflowRef=r.current}),[r]);const[i,a]=c(null),d=l((()=>a(null)),[a]),{nodes:p,edges:f,onNodesChange:h,onEdgesChange:m,onConnect:g}=n.useReactFlowStore(kT(pL));return t.createElement("div",{className:"reactflowlayer"},t.createElement(Bs,{nodes:p,edges:f,onNodesChange:h,onEdgesChange:m,onConnect:g,nodeTypes:fL,edgeTypes:hL,minZoom:e.minZoom,maxZoom:e.maxZoom,fitView:!0,onSelectionChange:({nodes:e,edges:t})=>{const r=n.local_state.getState();n.local_state.setState({...r,selected_nodes:e.map((e=>e.id)),selected_edges:t.map((e=>e.id))})},ref:r,onPaneClick:d,panOnDrag:!e.static},t.createElement(mL,null),t.createElement(gL,null),t.createElement(tl,{color:"#888",gap:16,size:1}),e.minimap&&t.createElement(Ys,{nodeStrokeWidth:3,pannable:!e.static,zoomable:!e.static,zoomStep:3}),i&&t.createElement(yL,{onClick:d,...i})))},vL=({fnrf_zst:e,header:n,flow:r,library:o})=>{const[i,a]=c(e.options.worker);e.workermanager&&(e.workermanager.on_setWorker=a),e.set_worker(i),e.auto_progress();const s=e.plugins();return t.createElement(Gj,{plugins:s,fnrf_zst:e},t.createElement(CL.Provider,{value:e},t.createElement("div",{className:"funcnodesreactflowcontainer funcnodescontainer"},n.show&&t.createElement(LS,{...n}),t.createElement("div",{className:"funcnodesreactflowbody"},i&&o.show&&t.createElement(xT,null),t.createElement(bL,{...r}),i&&t.createElement(dL,null)))))},wL={},xL={id:"",debug:!1,useWorkerManager:!0,show_library:!0,header:{show:!0,showmenu:!0},flow:{minimap:!0,static:!1,minZoom:.1,maxZoom:5},library:{show:!0}},CL=i(pl(xL)),kL=e=>{let n=J(e,{...xL,id:zu()}).new_obj;if(!n.useWorkerManager&&void 0===n.worker)return t.createElement("div",null,"Error: If you don't use a worker manager, you must provide a default worker.");if(e.useWorkerManager&&void 0===e.workermanager_url)return t.createElement("div",null,"Error: If you use a worker manager, you must provide a worker manager url.");if(void 0===window.fnrf_zst&&(window.fnrf_zst=wL),void 0===wL[n.id]){const e=pl(n);wL[n.id]=e}if(n.worker&&n.worker.set_zustand(wL[n.id]),wL[n.id].options.debug=n.debug,n.useWorkerManager){const e=new Wu(n.workermanager_url,wL[n.id]);wL[n.id].workermanager=e}return t.createElement(vL,{fnrf_zst:wL[n.id],header:n.header,library:n.library,flow:n.flow})},EL={set_io_value:({nid:e,ioid:t,value:n,set_default:r=!1})=>{const i=o(CL);i.worker?.set_io_value({nid:e,ioid:t,value:n,set_default:r})}},SL=e=>{const n=new cl("FuncNodes",e.debug?"debug":"info");n.debug("Initalizing FuncNodes with props:",e);let r=J(e,{...xL,id:zu()}).new_obj;if(void 0===e.worker&&void 0!==e.worker_url&&(r.useWorkerManager=!1,r.worker=new Hu({url:e.worker_url,uuid:r.id,on_sync_complete:e.on_sync_complete})),void 0!==r.worker){const e=pl(r);r.worker.set_zustand(e)}if(void 0!==e.fnw_url){if(void 0===r.worker)throw new Error("defining fnw_url requires a worker to be defined");const t=async function(e,t=!0){try{const n=await fetch(e);if(!n.ok)throw new Error(`Failed to fetch from URL: ${n.status} ${n.statusText}`);const r=await n.blob();return await new Promise(((e,n)=>{const o=new FileReader;o.onload=()=>{const r=o.result;"string"!=typeof r&&(n("Failed to convert URL to Base64: No result from FileReader"),n(o.error)),e(t?r.split(",")[1]:r)},o.onerror=()=>n(o.error),o.readAsDataURL(r)}))}catch(e){throw console.error("Error converting URL to Base64:",e),e}}(e.fnw_url),n=r.worker.on_sync_complete,o=async e=>{const r=await t;e.on_sync_complete=n,await e.update_from_export(r)};r.worker.on_sync_complete=o}return n.debug("Initalizing FuncnodesReactFlow with props:",r),t.createElement("div",{className:"App",style:{height:"100%",width:"100%"}},t.createElement(kL,{...r}))};export{CL as FuncNodesContext,pl as FuncNodesReactFlowZustand,Gu as FuncNodesWorker,kL as FuncnodesReactFlow,bL as ReactFlowLayer,Gj as RenderMappingProvider,Hu as WebSocketWorker,te as assert_full_node,J as deep_update,SL as default,EL as helperfunctions};
|
|
146
|
-
//# sourceMappingURL=index.esm.js.map
|