funcnodes-react-flow 0.3.11__py3-none-any.whl → 0.3.13__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * This source code is licensed under the MIT license found in the
9
9
  * LICENSE file in the root directory of this source tree.
10
- */var k=(g||(g=1,y.exports=function(){if(m)return v;m=1;var e=l(),t=x(),n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=t.useSyncExternalStore,o=e.useRef,i=e.useEffect,a=e.useMemo,s=e.useDebugValue;return v.useSyncExternalStoreWithSelector=function(e,t,l,c,u){var d=o(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=a((function(){function e(e){if(!i){if(i=!0,r=e,e=c(e),void 0!==u&&f.hasValue){var t=f.value;if(u(t,e))return o=t}return o=e}if(t=o,n(r,e))return t;var a=c(e);return void 0!==u&&u(t,a)?(r=e,t):(r=e,o=a)}var r,o,i=!1,a=void 0===l?null:l;return[function(){return e(t())},null===a?void 0:function(){return e(a())}]}),[t,l,c,u]);var p=r(e,d[0],d[1]);return i((function(){f.hasValue=!0,f.value=p}),[p]),s(p),p},v}()),y.exports),S=t(k);const{useDebugValue:E}=c,{useSyncExternalStoreWithSelector:_}=S;let C=!1;const O=e=>e;const N=e=>{"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?f(e):e,n=(e,n)=>function(e,t=O,n){n&&!C&&(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"),C=!0);const r=_(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return E(r),r}(t,e,n);return Object.assign(n,t),n},P=e=>e?N(e):N;function R(e){return"[object Object]"===Object.prototype.toString.call(e)}function M(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(!M(e[o],t[o]))return!1}}return!(e instanceof Date&&t instanceof Date)||e.getTime()===t.getTime()}const T=(e,t)=>{let n=!1;if(!R(e))throw new Error("Target must be a plain object");if(!R(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(R(i)&&R(a)){const{new_obj:e,change:t}=T(a,i);t&&(n=!0,r[o]=e)}else M(a,i)||(n=!0,r[o]=i)})),{new_obj:r,change:n}},A=(e,t)=>{let n=!1;if(!R(e))throw new Error("Target must be a plain object");if(!R(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(R(i)&&R(a)){const{new_obj:e,change:t}=A(a,i);t&&(n=!0,r[o]=e)}}})),{new_obj:r,change:n}},D={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},I=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}=A(e,D);return"any"!==t.render_options.type&&void 0!==t.render_options.type||(t.render_options.type=t.type),t},L={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}},z=JSON.stringify(L),F=e=>{if(!e.id)throw new Error("Node must have an id");const t=JSON.parse(z),{new_obj:n}=A(e,t);for(const e in n.io){if(void 0===n.io[e])continue;void 0===n.io[e].id&&(n.io[e].id=e);const t=I(n.io[e]);n.io[e]=t}return n},j=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 $(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=$(e[r]))&&(t+=(t&&" ")+n);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}const{useDebugValue:B}=c,{useSyncExternalStoreWithSelector:V}=S,H=e=>e;function U(e,t=H,n){const r=V(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return B(r),r}const W=(e,t)=>{const n=f(e),r=(e,r=t)=>U(n,e,r);return Object.assign(r,n),r};function q(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 K={value:()=>{}};function X(){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 Y(r)}function Y(e){this._=e}function G(e,t){for(var n,r=0,o=e.length;r<o;++r)if((n=e[r]).name===t)return n.value}function Q(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=K,e=e.slice(0,r).concat(e.slice(r+1));break}return null!=n&&e.push({name:t,value:n}),e}Y.prototype=X.prototype={constructor:Y,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]=Q(r[n],e.name,t);else if(null==t)for(n in r)r[n]=Q(r[n],e.name,null);return this}for(;++i<a;)if((n=(e=o[i]).type)&&(n=G(r[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Y(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 Z="http://www.w3.org/1999/xhtml",J={svg:"http://www.w3.org/2000/svg",xhtml:Z,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ee(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),J.hasOwnProperty(t)?{space:J[t],local:e}:e}function te(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Z&&t.documentElement.namespaceURI===Z?t.createElement(e):t.createElementNS(n,e)}}function ne(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function re(e){var t=ee(e);return(t.local?ne:te)(t)}function oe(){}function ie(e){return null==e?oe:function(){return this.querySelector(e)}}function ae(){return[]}function le(e){return null==e?ae: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 ce(e){return function(){return this.matches(e)}}function ue(e){return function(t){return t.matches(e)}}var de=Array.prototype.find;function fe(){return this.firstElementChild}var pe=Array.prototype.filter;function he(){return Array.from(this.children)}function me(e){return new Array(e.length)}function ge(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function ye(e,t,n,r,o,i){for(var a,l=0,s=t.length,c=i.length;l<c;++l)(a=t[l])?(a.__data__=i[l],r[l]=a):n[l]=new ge(e,i[l]);for(;l<s;++l)(a=t[l])&&(o[l]=a)}function ve(e,t,n,r,o,i,a){var l,s,c,u=new Map,d=t.length,f=i.length,p=new Array(d);for(l=0;l<d;++l)(s=t[l])&&(p[l]=c=a.call(s,s.__data__,l,t)+"",u.has(c)?o[l]=s:u.set(c,s));for(l=0;l<f;++l)c=a.call(e,i[l],l,i)+"",(s=u.get(c))?(r[l]=s,s.__data__=i[l],u.delete(c)):n[l]=new ge(e,i[l]);for(l=0;l<d;++l)(s=t[l])&&u.get(p[l])===s&&(o[l]=s)}function be(e){return e.__data__}function we(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function xe(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function ke(e){return function(){this.removeAttribute(e)}}function Se(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ee(e,t){return function(){this.setAttribute(e,t)}}function _e(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Ce(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function Oe(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 Ne(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Pe(e){return function(){this.style.removeProperty(e)}}function Re(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Me(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Te(e,t){return e.style.getPropertyValue(t)||Ne(e).getComputedStyle(e,null).getPropertyValue(t)}function Ae(e){return function(){delete this[e]}}function De(e,t){return function(){this[e]=t}}function Ie(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function Le(e){return e.trim().split(/^|\s+/)}function ze(e){return e.classList||new Fe(e)}function Fe(e){this._node=e,this._names=Le(e.getAttribute("class")||"")}function je(e,t){for(var n=ze(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function $e(e,t){for(var n=ze(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function Be(e){return function(){je(this,e)}}function Ve(e){return function(){$e(this,e)}}function He(e,t){return function(){(t.apply(this,arguments)?je:$e)(this,e)}}function Ue(){this.textContent=""}function We(e){return function(){this.textContent=e}}function qe(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function Ke(){this.innerHTML=""}function Xe(e){return function(){this.innerHTML=e}}function Ye(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function Ge(){this.nextSibling&&this.parentNode.appendChild(this)}function Qe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ze(){return null}function Je(){var e=this.parentNode;e&&e.removeChild(this)}function et(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function tt(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function nt(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 rt(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,l=o.length;a<l;++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 ot(e,t,n){var r=Ne(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 it(e,t){return function(){return ot(this,e,t)}}function at(e,t){return function(){return ot(this,e,t.apply(this,arguments))}}ge.prototype={constructor:ge,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)}},Fe.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 lt=[null];function st(e,t){this._groups=e,this._parents=t}function ct(){return new st([[document.documentElement]],lt)}function ut(e){return"string"==typeof e?new st([[document.querySelector(e)]],[document.documentElement]):new st([[e]],lt)}function dt(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=ct.prototype={constructor:st,select: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,l=t[o],s=l.length,c=r[o]=new Array(s),u=0;u<s;++u)(i=l[u])&&(a=e.call(i,i.__data__,u,l))&&("__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):le(e);for(var t=this._groups,n=t.length,r=[],o=[],i=0;i<n;++i)for(var a,l=t[i],s=l.length,c=0;c<s;++c)(a=l[c])&&(r.push(e.call(a,a.__data__,c,l)),o.push(a));return new st(r,o)},selectChild:function(e){return this.select(null==e?fe:function(e){return function(){return de.call(this.children,e)}}("function"==typeof e?e:ue(e)))},selectChildren:function(e){return this.selectAll(null==e?he:function(e){return function(){return pe.call(this.children,e)}}("function"==typeof e?e:ue(e)))},filter: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=t[o],l=a.length,s=r[o]=[],c=0;c<l;++c)(i=a[c])&&e.call(i,i.__data__,c,a)&&s.push(i);return new st(r,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,be);var n,r=t?ve:ye,o=this._parents,i=this._groups;"function"!=typeof e&&(n=e,e=function(){return n});for(var a=i.length,l=new Array(a),s=new Array(a),c=new Array(a),u=0;u<a;++u){var d=o[u],f=i[u],p=f.length,h=we(e.call(d,d&&d.__data__,u,o)),m=h.length,g=s[u]=new Array(m),y=l[u]=new Array(m);r(d,f,g,y,c[u]=new Array(p),h,t);for(var v,b,w=0,x=0;w<m;++w)if(v=g[w]){for(w>=x&&(x=w+1);!(b=y[x])&&++x<m;);v._next=b||null}}return(l=new st(l,o))._enter=s,l._exit=c,l},enter:function(){return new st(this._enter||this._groups.map(me),this._parents)},exit:function(){return new st(this._exit||this._groups.map(me),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),l=new Array(o),s=0;s<a;++s)for(var c,u=n[s],d=r[s],f=u.length,p=l[s]=new Array(f),h=0;h<f;++h)(c=u[h]||d[h])&&(p[h]=c);for(;s<o;++s)l[s]=n[s];return new st(l,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=xe);for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var a,l=n[i],s=l.length,c=o[i]=new Array(s),u=0;u<s;++u)(a=l[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,l=i.length;a<l;++a)(o=i[a])&&e.call(o,o.__data__,a,i);return this},attr:function(e,t){var n=ee(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?Se:ke:"function"==typeof t?n.local?Oe:Ce:n.local?_e:Ee)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?Pe:"function"==typeof t?Me:Re)(e,t,null==n?"":n)):Te(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?Ae:"function"==typeof t?Ie:De)(e,t)):this.node()[e]},classed:function(e,t){var n=Le(e+"");if(arguments.length<2){for(var r=ze(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each(("function"==typeof t?He:t?Be:Ve)(n,t))},text:function(e){return arguments.length?this.each(null==e?Ue:("function"==typeof e?qe:We)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?Ke:("function"==typeof e?Ye:Xe)(e)):this.node().innerHTML},raise:function(){return this.each(Ge)},lower:function(){return this.each(Qe)},append:function(e){var t="function"==typeof e?e:re(e);return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var n="function"==typeof e?e:re(e),r=null==t?Ze:"function"==typeof t?t:ie(t);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Je)},clone:function(e){return this.select(e?tt:et)},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(l=t?rt:nt,r=0;r<a;++r)this.each(l(i[r],t,n));return this}var l=this.node().__on;if(l)for(var s,c=0,u=l.length;c<u;++c)for(r=0,s=l[c];r<a;++r)if((o=i[r]).type===s.type&&o.name===s.name)return s.value},dispatch:function(e,t){return this.each(("function"==typeof t?at:it)(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 ft={passive:!1},pt={capture:!0,passive:!1};function ht(e){e.stopImmediatePropagation()}function mt(e){e.preventDefault(),e.stopImmediatePropagation()}function gt(e){var t=e.document.documentElement,n=ut(e).on("dragstart.drag",mt,pt);"onselectstart"in t?n.on("selectstart.drag",mt,pt):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function yt(e,t){var n=e.document.documentElement,r=ut(e).on("dragstart.drag",null);t&&(r.on("click.drag",mt,pt),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 vt=e=>()=>e;function bt(e,{sourceEvent:t,subject:n,target:r,identifier:o,active:i,x:a,y:l,dx:s,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:l,enumerable:!0,configurable:!0},dx:{value:s,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:u}})}function wt(e){return!e.ctrlKey&&!e.button}function xt(){return this.parentNode}function kt(e,t){return null==t?{x:e.x,y:e.y}:t}function St(){return navigator.maxTouchPoints||"ontouchstart"in this}function Et(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function _t(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Ct(){}bt.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};var Ot=.7,Nt=1/Ot,Pt="\\s*([+-]?\\d+)\\s*",Rt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Mt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Tt=/^#([0-9a-f]{3,8})$/,At=new RegExp(`^rgb\\(${Pt},${Pt},${Pt}\\)$`),Dt=new RegExp(`^rgb\\(${Mt},${Mt},${Mt}\\)$`),It=new RegExp(`^rgba\\(${Pt},${Pt},${Pt},${Rt}\\)$`),Lt=new RegExp(`^rgba\\(${Mt},${Mt},${Mt},${Rt}\\)$`),zt=new RegExp(`^hsl\\(${Rt},${Mt},${Mt}\\)$`),Ft=new RegExp(`^hsla\\(${Rt},${Mt},${Mt},${Rt}\\)$`),jt={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 $t(){return this.rgb().formatHex()}function Bt(){return this.rgb().formatRgb()}function Vt(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Tt.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Ht(t):3===n?new qt(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Ut(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Ut(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=At.exec(e))?new qt(t[1],t[2],t[3],1):(t=Dt.exec(e))?new qt(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=It.exec(e))?Ut(t[1],t[2],t[3],t[4]):(t=Lt.exec(e))?Ut(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=zt.exec(e))?Zt(t[1],t[2]/100,t[3]/100,1):(t=Ft.exec(e))?Zt(t[1],t[2]/100,t[3]/100,t[4]):jt.hasOwnProperty(e)?Ht(jt[e]):"transparent"===e?new qt(NaN,NaN,NaN,0):null}function Ht(e){return new qt(e>>16&255,e>>8&255,255&e,1)}function Ut(e,t,n,r){return r<=0&&(e=t=n=NaN),new qt(e,t,n,r)}function Wt(e,t,n,r){return 1===arguments.length?((o=e)instanceof Ct||(o=Vt(o)),o?new qt((o=o.rgb()).r,o.g,o.b,o.opacity):new qt):new qt(e,t,n,null==r?1:r);var o}function qt(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Kt(){return`#${Qt(this.r)}${Qt(this.g)}${Qt(this.b)}`}function Xt(){const e=Yt(this.opacity);return`${1===e?"rgb(":"rgba("}${Gt(this.r)}, ${Gt(this.g)}, ${Gt(this.b)}${1===e?")":`, ${e})`}`}function Yt(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Gt(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Qt(e){return((e=Gt(e))<16?"0":"")+e.toString(16)}function Zt(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new en(e,t,n,r)}function Jt(e){if(e instanceof en)return new en(e.h,e.s,e.l,e.opacity);if(e instanceof Ct||(e=Vt(e)),!e)return new en;if(e instanceof en)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,l=i-o,s=(i+o)/2;return l?(a=t===i?(n-r)/l+6*(n<r):n===i?(r-t)/l+2:(t-n)/l+4,l/=s<.5?i+o:2-i-o,a*=60):l=s>0&&s<1?0:a,new en(a,l,s,e.opacity)}function en(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function tn(e){return(e=(e||0)%360)<0?e+360:e}function nn(e){return Math.max(0,Math.min(1,e||0))}function rn(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Et(Ct,Vt,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:$t,formatHex:$t,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Jt(this).formatHsl()},formatRgb:Bt,toString:Bt}),Et(qt,Wt,_t(Ct,{brighter(e){return e=null==e?Nt:Math.pow(Nt,e),new qt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Ot:Math.pow(Ot,e),new qt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new qt(Gt(this.r),Gt(this.g),Gt(this.b),Yt(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:Kt,formatHex:Kt,formatHex8:function(){return`#${Qt(this.r)}${Qt(this.g)}${Qt(this.b)}${Qt(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Xt,toString:Xt})),Et(en,(function(e,t,n,r){return 1===arguments.length?Jt(e):new en(e,t,n,null==r?1:r)}),_t(Ct,{brighter(e){return e=null==e?Nt:Math.pow(Nt,e),new en(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Ot:Math.pow(Ot,e),new en(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 qt(rn(e>=240?e-240:e+120,o,r),rn(e,o,r),rn(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new en(tn(this.h),nn(this.s),nn(this.l),Yt(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=Yt(this.opacity);return`${1===e?"hsl(":"hsla("}${tn(this.h)}, ${100*nn(this.s)}%, ${100*nn(this.l)}%${1===e?")":`, ${e})`}`}}));var on=e=>()=>e;function an(e){return 1==(e=+e)?ln: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):on(isNaN(t)?n:t)}}function ln(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):on(isNaN(e)?t:e)}var sn=function e(t){var n=an(t);function r(e,t){var r=n((e=Wt(e)).r,(t=Wt(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=ln(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 cn(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var un=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,dn=new RegExp(un.source,"g");function fn(e,t){var n,r,o,i=un.lastIndex=dn.lastIndex=0,a=-1,l=[],s=[];for(e+="",t+="";(n=un.exec(e))&&(r=dn.exec(t));)(o=r.index)>i&&(o=t.slice(i,o),l[a]?l[a]+=o:l[++a]=o),(n=n[0])===(r=r[0])?l[a]?l[a]+=r:l[++a]=r:(l[++a]=null,s.push({i:a,x:cn(n,r)})),i=dn.lastIndex;return i<t.length&&(o=t.slice(i),l[a]?l[a]+=o:l[++a]=o),l.length<2?s[0]?function(e){return function(t){return e(t)+""}}(s[0].x):function(e){return function(){return e}}(t):(t=s.length,function(e){for(var n,r=0;r<t;++r)l[(n=s[r]).i]=n.x(e);return l.join("")})}var pn,hn=180/Math.PI,mn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function gn(e,t,n,r,o,i){var a,l,s;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(s=e*n+t*r)&&(n-=e*s,r-=t*s),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,s/=l),e*r<t*n&&(e=-e,t=-t,s=-s,a=-a),{translateX:o,translateY:i,rotate:Math.atan2(t,e)*hn,skewX:Math.atan(s)*hn,scaleX:a,scaleY:l}}function yn(e,t,n,r){function o(e){return e.length?e.pop()+" ":""}return function(i,a){var l=[],s=[];return i=e(i),a=e(a),function(e,r,o,i,a,l){if(e!==o||r!==i){var s=a.push("translate(",null,t,null,n);l.push({i:s-4,x:cn(e,o)},{i:s-2,x:cn(r,i)})}else(o||i)&&a.push("translate("+o+t+i+n)}(i.translateX,i.translateY,a.translateX,a.translateY,l,s),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:cn(e,t)})):t&&n.push(o(n)+"rotate("+t+r)}(i.rotate,a.rotate,l,s),function(e,t,n,i){e!==t?i.push({i:n.push(o(n)+"skewX(",null,r)-2,x:cn(e,t)}):t&&n.push(o(n)+"skewX("+t+r)}(i.skewX,a.skewX,l,s),function(e,t,n,r,i,a){if(e!==n||t!==r){var l=i.push(o(i)+"scale(",null,",",null,")");a.push({i:l-4,x:cn(e,n)},{i:l-2,x:cn(t,r)})}else 1===n&&1===r||i.push(o(i)+"scale("+n+","+r+")")}(i.scaleX,i.scaleY,a.scaleX,a.scaleY,l,s),i=a=null,function(e){for(var t,n=-1,r=s.length;++n<r;)l[(t=s[n]).i]=t.x(e);return l.join("")}}}var vn=yn((function(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?mn:gn(t.a,t.b,t.c,t.d,t.e,t.f)}),"px, ","px)","deg)"),bn=yn((function(e){return null==e?mn:(pn||(pn=document.createElementNS("http://www.w3.org/2000/svg","g")),pn.setAttribute("transform",e),(e=pn.transform.baseVal.consolidate())?gn((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):mn)}),", ",")",")");function wn(e){return((e=Math.exp(e))+1/e)/2}var xn,kn,Sn=function e(t,n,r){function o(e,o){var i,a,l=e[0],s=e[1],c=e[2],u=o[0],d=o[1],f=o[2],p=u-l,h=d-s,m=p*p+h*h;if(m<1e-12)a=Math.log(f/c)/t,i=function(e){return[l+e*p,s+e*h,c*Math.exp(t*e*a)]};else{var g=Math.sqrt(m),y=(f*f-c*c+r*m)/(2*c*n*g),v=(f*f-c*c-r*m)/(2*f*n*g),b=Math.log(Math.sqrt(y*y+1)-y),w=Math.log(Math.sqrt(v*v+1)-v);a=(w-b)/t,i=function(e){var r,o=e*a,i=wn(b),u=c/(n*g)*(i*(r=t*o+b,((r=Math.exp(2*r))-1)/(r+1))-function(e){return((e=Math.exp(e))-1/e)/2}(b));return[l+u*p,s+u*h,c*i/wn(t*o+b)]}}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),En=0,_n=0,Cn=0,On=0,Nn=0,Pn=0,Rn="object"==typeof performance&&performance.now?performance:Date,Mn="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Tn(){return Nn||(Mn(An),Nn=Rn.now()+Pn)}function An(){Nn=0}function Dn(){this._call=this._time=this._next=null}function In(e,t,n){var r=new Dn;return r.restart(e,t,n),r}function Ln(){Nn=(On=Rn.now())+Pn,En=_n=0;try{!function(){Tn(),++En;for(var e,t=xn;t;)(e=Nn-t._time)>=0&&t._call.call(void 0,e),t=t._next;--En}()}finally{En=0,function(){var e,t,n=xn,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:xn=t);kn=e,Fn(r)}(),Nn=0}}function zn(){var e=Rn.now(),t=e-On;t>1e3&&(Pn-=t,On=e)}function Fn(e){En||(_n&&(_n=clearTimeout(_n)),e-Nn>24?(e<1/0&&(_n=setTimeout(Ln,e-Rn.now()-Pn)),Cn&&(Cn=clearInterval(Cn))):(Cn||(On=Rn.now(),Cn=setInterval(zn,1e3)),En=1,Mn(Ln)))}function jn(e,t,n){var r=new Dn;return t=null==t?0:+t,r.restart((n=>{r.stop(),e(n+t)}),t,n),r}Dn.prototype=In.prototype={constructor:Dn,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?Tn():+n)+(null==t?0:+t),this._next||kn===this||(kn?kn._next=this:xn=this,kn=this),this._call=e,this._time=n,Fn()},stop:function(){this._call&&(this._call=null,this._time=1/0,Fn())}};var $n=X("start","end","cancel","interrupt"),Bn=[];function Vn(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,f;if(1!==n.state)return s();for(c in o)if((f=o[c]).name===n.name){if(3===f.state)return jn(a);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete o[c]):+c<t&&(f.state=6,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete o[c])}if(jn((function(){3===n.state&&(n.state=4,n.timer.restart(l,n.delay,n.time),l(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)(f=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(r[++u]=f);r.length=u+1}}function l(t){for(var o=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(s),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),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete o[t],o)return;delete e.__transition}o[t]=n,n.timer=In(i,0,n.time)}(e,n,{name:t,index:r,group:o,on:$n,tween:Bn,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:0})}function Hn(e,t){var n=Wn(e,t);if(n.state>0)throw new Error("too late; already scheduled");return n}function Un(e,t){var n=Wn(e,t);if(n.state>3)throw new Error("too late; already running");return n}function Wn(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function qn(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 Kn(e,t){var n,r;return function(){var o=Un(this,e),i=o.tween;if(i!==n)for(var a=0,l=(r=n=i).length;a<l;++a)if(r[a].name===t){(r=r.slice()).splice(a,1);break}o.tween=r}}function Xn(e,t,n){var r,o;if("function"!=typeof n)throw new Error;return function(){var i=Un(this,e),a=i.tween;if(a!==r){o=(r=a).slice();for(var l={name:t,value:n},s=0,c=o.length;s<c;++s)if(o[s].name===t){o[s]=l;break}s===c&&o.push(l)}i.tween=o}}function Yn(e,t,n){var r=e._id;return e.each((function(){var e=Un(this,r);(e.value||(e.value={}))[t]=n.apply(this,arguments)})),function(e){return Wn(e,r).value[t]}}function Gn(e,t){var n;return("number"==typeof t?cn:t instanceof Vt?sn:(n=Vt(t))?(t=n,sn):fn)(e,t)}function Qn(e){return function(){this.removeAttribute(e)}}function Zn(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Jn(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 er(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 tr(e,t,n){var r,o,i;return function(){var a,l,s=n(this);if(null!=s)return(a=this.getAttribute(e))===(l=s+"")?null:a===r&&l===o?i:(o=l,i=t(r=a,s));this.removeAttribute(e)}}function nr(e,t,n){var r,o,i;return function(){var a,l,s=n(this);if(null!=s)return(a=this.getAttributeNS(e.space,e.local))===(l=s+"")?null:a===r&&l===o?i:(o=l,i=t(r=a,s));this.removeAttributeNS(e.space,e.local)}}function rr(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 or(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 ir(e,t){return function(){Hn(this,e).delay=+t.apply(this,arguments)}}function ar(e,t){return t=+t,function(){Hn(this,e).delay=t}}function lr(e,t){return function(){Un(this,e).duration=+t.apply(this,arguments)}}function sr(e,t){return t=+t,function(){Un(this,e).duration=t}}var cr=ct.prototype.constructor;function ur(e){return function(){this.style.removeProperty(e)}}var dr=0;function fr(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function pr(){return++dr}var hr=ct.prototype;fr.prototype={constructor:fr,select:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=ie(e));for(var r=this._groups,o=r.length,i=new Array(o),a=0;a<o;++a)for(var l,s,c=r[a],u=c.length,d=i[a]=new Array(u),f=0;f<u;++f)(l=c[f])&&(s=e.call(l,l.__data__,f,c))&&("__data__"in l&&(s.__data__=l.__data__),d[f]=s,Vn(d[f],t,n,f,d,Wn(l,n)));return new fr(i,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=le(e));for(var r=this._groups,o=r.length,i=[],a=[],l=0;l<o;++l)for(var s,c=r[l],u=c.length,d=0;d<u;++d)if(s=c[d]){for(var f,p=e.call(s,s.__data__,d,c),h=Wn(s,n),m=0,g=p.length;m<g;++m)(f=p[m])&&Vn(f,t,n,m,p,h);i.push(p),a.push(s)}return new fr(i,a,t,n)},selectChild:hr.selectChild,selectChildren:hr.selectChildren,filter: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=t[o],l=a.length,s=r[o]=[],c=0;c<l;++c)(i=a[c])&&e.call(i,i.__data__,c,a)&&s.push(i);return new fr(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),l=0;l<i;++l)for(var s,c=t[l],u=n[l],d=c.length,f=a[l]=new Array(d),p=0;p<d;++p)(s=c[p]||u[p])&&(f[p]=s);for(;l<r;++l)a[l]=t[l];return new fr(a,this._parents,this._name,this._id)},selection:function(){return new cr(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=pr(),r=this._groups,o=r.length,i=0;i<o;++i)for(var a,l=r[i],s=l.length,c=0;c<s;++c)if(a=l[c]){var u=Wn(a,t);Vn(a,e,n,c,l,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new fr(r,this._parents,e,n)},call:hr.call,nodes:hr.nodes,node:hr.node,size:hr.size,empty:hr.empty,each:hr.each,on:function(e,t){var n=this._id;return arguments.length<2?Wn(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)?Hn:Un;return function(){var a=i(this,e),l=a.on;l!==r&&(o=(r=l).copy()).on(t,n),a.on=o}}(n,e,t))},attr:function(e,t){var n=ee(e),r="transform"===n?bn:Gn;return this.attrTween(e,"function"==typeof t?(n.local?nr:tr)(n,r,Yn(this,"attr."+e,t)):null==t?(n.local?Zn:Qn)(n):(n.local?er:Jn)(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=ee(e);return this.tween(n,(r.local?rr:or)(r,t))},style:function(e,t,n){var r="transform"==(e+="")?vn:Gn;return null==t?this.styleTween(e,function(e,t){var n,r,o;return function(){var i=Te(this,e),a=(this.style.removeProperty(e),Te(this,e));return i===a?null:i===n&&a===r?o:o=t(n=i,r=a)}}(e,r)).on("end.style."+e,ur(e)):"function"==typeof t?this.styleTween(e,function(e,t,n){var r,o,i;return function(){var a=Te(this,e),l=n(this),s=l+"";return null==l&&(this.style.removeProperty(e),s=l=Te(this,e)),a===s?null:a===r&&s===o?i:(o=s,i=t(r=a,l))}}(e,r,Yn(this,"style."+e,t))).each(function(e,t){var n,r,o,i,a="style."+t,l="end."+a;return function(){var s=Un(this,e),c=s.on,u=null==s.value[a]?i||(i=ur(t)):void 0;c===n&&o===u||(r=(n=c).copy()).on(l,o=u),s.on=r}}(this._id,e)):this.styleTween(e,function(e,t,n){var r,o,i=n+"";return function(){var a=Te(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}}(Yn(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=Wn(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?Kn:Xn)(n,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?ir:ar)(t,e)):Wn(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?lr:sr)(t,e)):Wn(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(){Un(this,e).ease=t}}(t,e)):Wn(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;Un(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 l={value:a},s={value:function(){0==--o&&i()}};n.each((function(){var n=Un(this,r),o=n.on;o!==e&&((t=(e=o).copy())._.cancel.push(l),t._.interrupt.push(l),t._.end.push(s)),n.on=t})),0===o&&i()}))},[Symbol.iterator]:hr[Symbol.iterator]};var mr={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}};function gr(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}ct.prototype.interrupt=function(e){return this.each((function(){qn(this,e)}))},ct.prototype.transition=function(e){var t,n;e instanceof fr?(t=e._id,e=e._name):(t=pr(),(n=mr).time=Tn(),e=null==e?null:e+"");for(var r=this._groups,o=r.length,i=0;i<o;++i)for(var a,l=r[i],s=l.length,c=0;c<s;++c)(a=l[c])&&Vn(a,e,t,c,l,n||gr(a,t));return new fr(r,this._parents,e,t)};var yr=e=>()=>e;function vr(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 wr=new br(1,0,0);function xr(e){e.stopImmediatePropagation()}function kr(e){e.preventDefault(),e.stopImmediatePropagation()}function Sr(e){return!(e.ctrlKey&&"wheel"!==e.type||e.button)}function Er(){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 _r(){return this.__zoom||wr}function Cr(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Or(){return navigator.maxTouchPoints||"ontouchstart"in this}function Nr(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 Pr(){var e,t,n,r=Sr,o=Er,i=Nr,a=Cr,l=Or,s=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],u=250,d=Sn,f=X("start","zoom","end"),p=0,h=10;function m(e){e.property("__zoom",_r).on("wheel.zoom",k,{passive:!1}).on("mousedown.zoom",S).on("dblclick.zoom",E).filter(l).on("touchstart.zoom",_).on("touchmove.zoom",C).on("touchend.zoom touchcancel.zoom",O).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(e,t){return(t=Math.max(s[0],Math.min(s[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 v(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function b(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),l=o.apply(e,i),s=null==n?v(l):"function"==typeof n?n.apply(e,i):n,c=Math.max(l[1][0]-l[0][0],l[1][1]-l[0][1]),u=e.__zoom,f="function"==typeof t?t.apply(e,i):t,p=d(u.invert(s).concat(c/u.k),f.invert(s).concat(c/f.k));return function(e){if(1===e)e=f;else{var t=p(e),n=c/t[2];e=new br(n,s[0]-t[0]*n,s[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 k(e,...t){if(r.apply(this,arguments)){var n=w(this,t).event(e),o=this.__zoom,l=Math.max(s[0],Math.min(s[1],o.k*Math.pow(2,a.apply(this,arguments)))),u=dt(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===l)return;n.mouse=[u,o.invert(u)],qn(this),n.start()}kr(e),n.wheel=setTimeout((function(){n.wheel=null,n.end()}),150),n.zoom("mouse",i(y(g(o,l),n.mouse[0],n.mouse[1]),n.extent,c))}}function S(e,...t){if(!n&&r.apply(this,arguments)){var o=e.currentTarget,a=w(this,t,!0).event(e),l=ut(e.view).on("mousemove.zoom",(function(e){if(kr(e),!a.moved){var t=e.clientX-u,n=e.clientY-d;a.moved=t*t+n*n>p}a.event(e).zoom("mouse",i(y(a.that.__zoom,a.mouse[0]=dt(e,o),a.mouse[1]),a.extent,c))}),!0).on("mouseup.zoom",(function(e){l.on("mousemove.zoom mouseup.zoom",null),yt(e.view,a.moved),kr(e),a.event(e).end()}),!0),s=dt(e,o),u=e.clientX,d=e.clientY;gt(e.view),xr(e),a.mouse=[s,this.__zoom.invert(s)],qn(this),a.start()}}function E(e,...t){if(r.apply(this,arguments)){var n=this.__zoom,a=dt(e.changedTouches?e.changedTouches[0]:e,this),l=n.invert(a),s=n.k*(e.shiftKey?.5:2),d=i(y(g(n,s),a,l),o.apply(this,t),c);kr(e),u>0?ut(this).transition().duration(u).call(b,d,a,e):ut(this).call(m.transform,d,a,e)}}function _(n,...o){if(r.apply(this,arguments)){var i,a,l,s,c=n.touches,u=c.length,d=w(this,o,n.changedTouches.length===u).event(n);for(xr(n),a=0;a<u;++a)s=[s=dt(l=c[a],this),this.__zoom.invert(s),l.identifier],d.touch0?d.touch1||d.touch0[2]===s[2]||(d.touch1=s,d.taps=0):(d.touch0=s,i=!0,d.taps=1+!!e);e&&(e=clearTimeout(e)),i&&(d.taps<2&&(t=s[0],e=setTimeout((function(){e=null}),500)),qn(this),d.start())}}function C(e,...t){if(this.__zooming){var n,r,o,a,l=w(this,t).event(e),s=e.changedTouches,u=s.length;for(kr(e),n=0;n<u;++n)o=dt(r=s[n],this),l.touch0&&l.touch0[2]===r.identifier?l.touch0[0]=o:l.touch1&&l.touch1[2]===r.identifier&&(l.touch1[0]=o);if(r=l.that.__zoom,l.touch1){var d=l.touch0[0],f=l.touch0[1],p=l.touch1[0],h=l.touch1[1],m=(m=p[0]-d[0])*m+(m=p[1]-d[1])*m,v=(v=h[0]-f[0])*v+(v=h[1]-f[1])*v;r=g(r,Math.sqrt(m/v)),o=[(d[0]+p[0])/2,(d[1]+p[1])/2],a=[(f[0]+h[0])/2,(f[1]+h[1])/2]}else{if(!l.touch0)return;o=l.touch0[0],a=l.touch0[1]}l.zoom("touch",i(y(r,o,a),l.extent,c))}}function O(e,...r){if(this.__zooming){var o,i,a=w(this,r).event(e),l=e.changedTouches,s=l.length;for(xr(e),n&&clearTimeout(n),n=setTimeout((function(){n=null}),500),o=0;o<s;++o)i=l[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=dt(i,this),Math.hypot(t[0]-i[0],t[1]-i[1])<h)){var c=ut(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",_r),e!==o?b(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?v(e):"function"==typeof n?n.apply(this,arguments):n,l=r.invert(a),s="function"==typeof t?t.apply(this,arguments):t;return i(y(g(r,s),a,l),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,l=null==r?v(e):"function"==typeof r?r.apply(this,arguments):r;return i(wr.translate(l[0],l[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=ut(this.that).datum();f.call(e,this.that,new vr(e,{sourceEvent:this.sourceEvent,target:m,transform:this.that.__zoom,dispatch:f}),t)}},m.wheelDelta=function(e){return arguments.length?(a="function"==typeof e?e:yr(+e),m):a},m.filter=function(e){return arguments.length?(r="function"==typeof e?e:yr(!!e),m):r},m.touchable=function(e){return arguments.length?(l="function"==typeof e?e:yr(!!e),m):l},m.extent=function(e){return arguments.length?(o="function"==typeof e?e:yr([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),m):o},m.scaleExtent=function(e){return arguments.length?(s[0]=+e[0],s[1]=+e[1],m):[s[0],s[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=f.on.apply(f,arguments);return e===f?m:e},m.clickDistance=function(e){return arguments.length?(p=(e=+e)*e,m):Math.sqrt(p)},m.tapDistance=function(e){return arguments.length?(h=+e,m):h},m}br.prototype;var Rr,Mr,Tr={exports:{}},Ar={};function Dr(){if(Rr)return Ar;Rr=1;var e=l();function t(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");var i=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function a(e,t){return"font"===e?"":"string"==typeof t?"use-credentials"===t?t:"":void 0}return Ar.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Ar.createPortal=function(e,n){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!n||1!==n.nodeType&&9!==n.nodeType&&11!==n.nodeType)throw Error(t(299));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:o,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,n,null,r)},Ar.flushSync=function(e){var t=i.T,n=r.p;try{if(i.T=null,r.p=2,e)return e()}finally{i.T=t,r.p=n,r.d.f()}},Ar.preconnect=function(e,t){"string"==typeof e&&(t?t="string"==typeof(t=t.crossOrigin)?"use-credentials"===t?t:"":void 0:t=null,r.d.C(e,t))},Ar.prefetchDNS=function(e){"string"==typeof e&&r.d.D(e)},Ar.preinit=function(e,t){if("string"==typeof e&&t&&"string"==typeof t.as){var n=t.as,o=a(n,t.crossOrigin),i="string"==typeof t.integrity?t.integrity:void 0,l="string"==typeof t.fetchPriority?t.fetchPriority:void 0;"style"===n?r.d.S(e,"string"==typeof t.precedence?t.precedence:void 0,{crossOrigin:o,integrity:i,fetchPriority:l}):"script"===n&&r.d.X(e,{crossOrigin:o,integrity:i,fetchPriority:l,nonce:"string"==typeof t.nonce?t.nonce:void 0})}},Ar.preinitModule=function(e,t){if("string"==typeof e)if("object"==typeof t&&null!==t){if(null==t.as||"script"===t.as){var n=a(t.as,t.crossOrigin);r.d.M(e,{crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0})}}else null==t&&r.d.M(e)},Ar.preload=function(e,t){if("string"==typeof e&&"object"==typeof t&&null!==t&&"string"==typeof t.as){var n=t.as,o=a(n,t.crossOrigin);r.d.L(e,n,{crossOrigin:o,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0,type:"string"==typeof t.type?t.type:void 0,fetchPriority:"string"==typeof t.fetchPriority?t.fetchPriority:void 0,referrerPolicy:"string"==typeof t.referrerPolicy?t.referrerPolicy:void 0,imageSrcSet:"string"==typeof t.imageSrcSet?t.imageSrcSet:void 0,imageSizes:"string"==typeof t.imageSizes?t.imageSizes:void 0,media:"string"==typeof t.media?t.media:void 0})}},Ar.preloadModule=function(e,t){if("string"==typeof e)if(t){var n=a(t.as,t.crossOrigin);r.d.m(e,{as:"string"==typeof t.as&&"script"!==t.as?t.as:void 0,crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0})}else r.d.m(e)},Ar.requestFormReset=function(e){r.d.r(e)},Ar.unstable_batchedUpdates=function(e,t){return e(t)},Ar.useFormState=function(e,t,n){return i.H.useFormState(e,t,n)},Ar.useFormStatus=function(){return i.H.useHostTransitionStatus()},Ar.version="19.0.0",Ar}function Ir(){if(Mr)return Tr.exports;return Mr=1,function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),Tr.exports=Dr(),Tr.exports}var Lr=Ir(),zr=t(Lr);const Fr=s.createContext(null),jr=Fr.Provider,$r=e=>`Node type "${e}" not found. Using fallback type "default".`,Br=()=>"The React Flow parent container needs a width and a height to render the graph.",Vr=()=>"Only child nodes can use a parent extent.",Hr=e=>`Marker type "${e}" doesn't exist.`,Ur=(e,t)=>`Couldn't create edge for ${e?"target":"source"} handle id: "${e?t.targetHandle:t.sourceHandle}", edge id: ${t.id}.`,Wr=()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",qr=e=>`Edge type "${e}" not found. Using fallback type "default".`,Kr=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.`,Xr=(()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001")();function Yr(e,t){const n=s.useContext(Fr);if(null===n)throw new Error(Xr);return U(n,e,t)}const Gr=()=>{const e=s.useContext(Fr);if(null===e)throw new Error(Xr);return s.useMemo((()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe,destroy:e.destroy})),[e])},Qr=e=>e.userSelectionActive?"none":"all";function Zr({position:e,children:t,className:n,style:r,...o}){const i=Yr(Qr),a=`${e}`.split("-");return c.createElement("div",{className:$(["react-flow__panel",n,...a]),style:{...r,pointerEvents:i},...o},t)}function Jr({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:c.createElement(Zr,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://reactflow.dev/pro"},c.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution"},"React Flow"))}var eo=s.memo((({x:e,y:t,label:n,labelStyle:r={},labelShowBg:o=!0,labelBgStyle:i={},labelBgPadding:a=[2,4],labelBgBorderRadius:l=2,children:u,className:d,...f})=>{const p=s.useRef(null),[h,m]=s.useState({x:0,y:0,width:0,height:0}),g=$(["react-flow__edge-textwrapper",d]);return s.useEffect((()=>{if(p.current){const e=p.current.getBBox();m({x:e.x,y:e.y,width:e.width,height:e.height})}}),[n]),void 0!==n&&n?c.createElement("g",{transform:`translate(${e-h.width/2} ${t-h.height/2})`,className:g,visibility:h.width?"visible":"hidden",...f},o&&c.createElement("rect",{width:h.width+2*a[0],x:-a[0],y:-a[1],height:h.height+2*a[1],className:"react-flow__edge-textbg",style:i,rx:l,ry:l}),c.createElement("text",{className:"react-flow__edge-text",y:h.height/2,dy:"0.3em",ref:p,style:r},n),u):null}));const to=e=>({width:e.offsetWidth,height:e.offsetHeight}),no=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),ro=(e={x:0,y:0},t)=>({x:no(e.x,t[0][0],t[1][0]),y:no(e.y,t[0][1],t[1][1])}),oo=(e,t,n)=>e<t?no(Math.abs(e-t),1,50)/50:e>n?-no(Math.abs(e-n),1,50)/50:0,io=(e,t)=>[20*oo(e.x,35,t.width-35),20*oo(e.y,35,t.height-35)],ao=e=>e.getRootNode?.()||window?.document,lo=(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)}),so=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),co=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),uo=e=>({...e.positionAbsolute||{x:0,y:0},width:e.width||0,height:e.height||0}),fo=(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)},po=e=>!isNaN(e)&&isFinite(e),ho=Symbol.for("internals"),mo=["Enter"," ","Escape"];function go(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 yo=e=>"clientX"in e,vo=(e,t)=>{const n=yo(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)}},bo=()=>"undefined"!=typeof navigator&&navigator?.userAgent?.indexOf("Mac")>=0,wo=({id:e,path:t,labelX:n,labelY:r,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:l,labelBgPadding:s,labelBgBorderRadius:u,style:d,markerEnd:f,markerStart:p,interactionWidth:h=20})=>c.createElement(c.Fragment,null,c.createElement("path",{id:e,style:d,d:t,fill:"none",className:"react-flow__edge-path",markerEnd:f,markerStart:p}),h&&c.createElement("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:h,className:"react-flow__edge-interaction"}),o&&po(n)&&po(r)?c.createElement(eo,{x:n,y:r,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:l,labelBgPadding:s,labelBgBorderRadius:u}):null);function xo(e,t,n){return void 0===n?n:r=>{const o=t().edges.find((t=>t.id===e));o&&n(r,{...o})}}function ko({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 So({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:o,sourceControlY:i,targetControlX:a,targetControlY:l}){const s=.125*e+.375*o+.375*a+.125*n,c=.125*t+.375*i+.375*l+.125*r;return[s,c,Math.abs(s-e),Math.abs(c-t)]}var Eo,_o,Co,Oo,No,Po;function Ro({pos:e,x1:t,y1:n,x2:r,y2:o}){return e===Po.Left||e===Po.Right?[.5*(t+r),n]:[t,.5*(n+o)]}function Mo({sourceX:e,sourceY:t,sourcePosition:n=Po.Bottom,targetX:r,targetY:o,targetPosition:i=Po.Top}){const[a,l]=Ro({pos:n,x1:e,y1:t,x2:r,y2:o}),[s,c]=Ro({pos:i,x1:r,y1:o,x2:e,y2:t}),[u,d,f,p]=So({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:a,sourceControlY:l,targetControlX:s,targetControlY:c});return[`M${e},${t} C${a},${l} ${s},${c} ${r},${o}`,u,d,f,p]}wo.displayName="BaseEdge",function(e){e.Strict="strict",e.Loose="loose"}(Eo||(Eo={})),function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"}(_o||(_o={})),function(e){e.Partial="partial",e.Full="full"}(Co||(Co={})),function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"}(Oo||(Oo={})),function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"}(No||(No={})),function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"}(Po||(Po={}));const To=s.memo((({sourceX:e,sourceY:t,targetX:n,targetY:r,sourcePosition:o=Po.Bottom,targetPosition:i=Po.Top,label:a,labelStyle:l,labelShowBg:s,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:h,markerStart:m,interactionWidth:g})=>{const[y,v,b]=Mo({sourceX:e,sourceY:t,sourcePosition:o,targetX:n,targetY:r,targetPosition:i});return c.createElement(wo,{path:y,labelX:v,labelY:b,label:a,labelStyle:l,labelShowBg:s,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:h,markerStart:m,interactionWidth:g})}));To.displayName="SimpleBezierEdge";const Ao={[Po.Left]:{x:-1,y:0},[Po.Right]:{x:1,y:0},[Po.Top]:{x:0,y:-1},[Po.Bottom]:{x:0,y:1}},Do=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function Io({source:e,sourcePosition:t=Po.Bottom,target:n,targetPosition:r=Po.Top,center:o,offset:i}){const a=Ao[t],l=Ao[r],s={x:e.x+a.x*i,y:e.y+a.y*i},c={x:n.x+l.x*i,y:n.y+l.y*i},u=(({source:e,sourcePosition:t=Po.Bottom,target:n})=>t===Po.Left||t===Po.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:s,sourcePosition:t,target:c}),d=0!==u.x?"x":"y",f=u[d];let p,h,m=[];const g={x:0,y:0},y={x:0,y:0},[v,b,w,x]=ko({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(a[d]*l[d]==-1){p=o.x??v,h=o.y??b;const e=[{x:p,y:s.y},{x:p,y:c.y}],t=[{x:s.x,y:h},{x:c.x,y:h}];m=a[d]===f?"x"===d?e:t:"x"===d?t:e}else{const o=[{x:s.x,y:c.y}],u=[{x:c.x,y:s.y}];if(m="x"===d?a.x===f?u:o:a.y===f?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]===f?g[d]=(s[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]===l[e],n=s[e]>c[e],r=s[e]<c[e];(1===a[d]&&(!t&&n||t&&r)||1!==a[d]&&(!t&&r||t&&n))&&(m="x"===d?o:u)}const v={x:s.x+g.x,y:s.y+g.y},b={x:c.x+y.x,y:c.y+y.y};Math.max(Math.abs(v.x-m[0].x),Math.abs(b.x-m[0].x))>=Math.max(Math.abs(v.y-m[0].y),Math.abs(b.y-m[0].y))?(p=(v.x+b.x)/2,h=m[0].y):(p=m[0].x,h=(v.y+b.y)/2)}return[[e,{x:s.x+g.x,y:s.y+g.y},...m,{x:c.x+y.x,y:c.y+y.y},n],p,h,w,x]}function Lo({sourceX:e,sourceY:t,sourcePosition:n=Po.Bottom,targetX:r,targetY:o,targetPosition:i=Po.Top,borderRadius:a=5,centerX:l,centerY:s,offset:c=20}){const[u,d,f,p,h]=Io({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:o},targetPosition:i,center:{x:l,y:s},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(Do(e,t)/2,Do(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 l=e.x<n.x?1:-1;return`L ${i},${a+o*(e.y<n.y?-1:1)}Q ${i},${a} ${i+o*l},${a}`}(u[n-1],t,u[n+1],a):`${0===n?"M":"L"}${t.x} ${t.y}`,e+=r}),"");return[m,d,f,p,h]}const zo=s.memo((({sourceX:e,sourceY:t,targetX:n,targetY:r,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:l,labelBgPadding:s,labelBgBorderRadius:u,style:d,sourcePosition:f=Po.Bottom,targetPosition:p=Po.Top,markerEnd:h,markerStart:m,pathOptions:g,interactionWidth:y})=>{const[v,b,w]=Lo({sourceX:e,sourceY:t,sourcePosition:f,targetX:n,targetY:r,targetPosition:p,borderRadius:g?.borderRadius,offset:g?.offset});return c.createElement(wo,{path:v,labelX:b,labelY:w,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:l,labelBgPadding:s,labelBgBorderRadius:u,style:d,markerEnd:h,markerStart:m,interactionWidth:y})}));zo.displayName="SmoothStepEdge";const Fo=s.memo((e=>c.createElement(zo,{...e,pathOptions:s.useMemo((()=>({borderRadius:0,offset:e.pathOptions?.offset})),[e.pathOptions?.offset])})));Fo.displayName="StepEdge";const jo=s.memo((({sourceX:e,sourceY:t,targetX:n,targetY:r,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:l,labelBgPadding:s,labelBgBorderRadius:u,style:d,markerEnd:f,markerStart:p,interactionWidth:h})=>{const[m,g,y]=function({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[o,i,a,l]=ko({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,o,i,a,l]}({sourceX:e,sourceY:t,targetX:n,targetY:r});return c.createElement(wo,{path:m,labelX:g,labelY:y,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:l,labelBgPadding:s,labelBgBorderRadius:u,style:d,markerEnd:f,markerStart:p,interactionWidth:h})}));function $o(e,t){return e>=0?.5*e:25*t*Math.sqrt(-e)}function Bo({pos:e,x1:t,y1:n,x2:r,y2:o,c:i}){switch(e){case Po.Left:return[t-$o(t-r,i),n];case Po.Right:return[t+$o(r-t,i),n];case Po.Top:return[t,n-$o(n-o,i)];case Po.Bottom:return[t,n+$o(o-n,i)]}}function Vo({sourceX:e,sourceY:t,sourcePosition:n=Po.Bottom,targetX:r,targetY:o,targetPosition:i=Po.Top,curvature:a=.25}){const[l,s]=Bo({pos:n,x1:e,y1:t,x2:r,y2:o,c:a}),[c,u]=Bo({pos:i,x1:r,y1:o,x2:e,y2:t,c:a}),[d,f,p,h]=So({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:l,sourceControlY:s,targetControlX:c,targetControlY:u});return[`M${e},${t} C${l},${s} ${c},${u} ${r},${o}`,d,f,p,h]}jo.displayName="StraightEdge";const Ho=s.memo((({sourceX:e,sourceY:t,targetX:n,targetY:r,sourcePosition:o=Po.Bottom,targetPosition:i=Po.Top,label:a,labelStyle:l,labelShowBg:s,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:h,markerStart:m,pathOptions:g,interactionWidth:y})=>{const[v,b,w]=Vo({sourceX:e,sourceY:t,sourcePosition:o,targetX:n,targetY:r,targetPosition:i,curvature:g?.curvature});return c.createElement(wo,{path:v,labelX:b,labelY:w,label:a,labelStyle:l,labelShowBg:s,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:h,markerStart:m,interactionWidth:y})}));Ho.displayName="BezierEdge";const Uo=s.createContext(null),Wo=Uo.Provider;Uo.Consumer;const qo=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`reactflow__edge-${e}${t||""}-${n}${r||""}`,Ko=(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("&")}`},Xo=({x:e,y:t},[n,r,o],i,[a,l])=>{const s={x:(e-n)/o,y:(t-r)/o};return i?{x:a*Math.round(s.x/a),y:l*Math.round(s.y/l)}:s},Yo=({x:e,y:t},[n,r,o])=>({x:e*o+n,y:t*o+r}),Go=(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}},Qo=(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}=Go(n,t).positionAbsolute;return lo(e,so({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 co(n)},Zo=(e,t,[n,r,o]=[0,0,1],i=!1,a=!1,l=[0,0])=>{const s={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}=Go(e,l),d={x:u.x,y:u.y,width:t||0,height:n||0},f=fo(s,d);(void 0===t||void 0===n||null===t||null===n||i&&f>0||f>=(t||0)*(n||0)||e.dragging)&&c.push(e)})),c},Jo=(e,t)=>{const n=e.map((e=>e.id));return t.filter((e=>n.includes(e.source)||n.includes(e.target)))},ei=(e,t,n,r,o,i=.1)=>{const a=t/(e.width*(1+i)),l=n/(e.height*(1+i)),s=Math.min(a,l),c=no(s,r,o);return{x:t/2-(e.x+e.width/2)*c,y:n/2-(e.y+e.height/2)*c,zoom:c}},ti=(e,t=0)=>e.transition().duration(t);function ni(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 ri={source:null,target:null,sourceHandle:null,targetHandle:null},oi=()=>({handleDomNode:null,isValid:!1,connection:ri,endHandle:null});function ii(e,t,n,r,o,i,a){const l="target"===o,s=a.querySelector(`.react-flow__handle[data-id="${e?.nodeId}-${e?.id}-${e?.type}"]`),c={...oi(),handleDomNode:s};if(s){const e=ai(void 0,s),o=s.getAttribute("data-nodeid"),a=s.getAttribute("data-handleid"),u=s.classList.contains("connectable"),d=s.classList.contains("connectableend"),f={source:l?o:n,sourceHandle:l?a:r,target:l?n:o,targetHandle:l?r:a};c.connection=f;u&&d&&(t===Eo.Strict?l&&"source"===e||!l&&"target"===e:o!==n||a!==r)&&(c.endHandle={nodeId:o,handleId:a,type:e},c.isValid=i(f))}return c}function ai(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function li(e){e?.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function si(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}function ci({event:e,handleId:t,nodeId:n,onConnect:r,isTarget:o,getState:i,setState:a,isValidConnection:l,edgeUpdaterType:s,onReconnectEnd:c}){const u=ao(e.target),{connectionMode:d,domNode:f,autoPanOnConnect:p,connectionRadius:h,onConnectStart:m,panBy:g,getNodes:y,cancelConnection:v}=i();let b,w=0;const{x:x,y:k}=vo(e),S=u?.elementFromPoint(x,k),E=ai(s,S),_=f?.getBoundingClientRect();if(!_||!E)return;let C,O=vo(e,_),N=!1,P=null,R=!1,M=null;const T=function({nodes:e,nodeId:t,handleId:n,handleType:r}){return e.reduce(((e,o)=>{if(o[ho]){const{handleBounds:i}=o[ho];let a=[],l=[];i&&(a=ni(o,i,"source",`${t}-${n}-${r}`),l=ni(o,i,"target",`${t}-${n}-${r}`)),e.push(...a,...l)}return e}),[])}({nodes:y(),nodeId:n,handleId:t,handleType:E}),A=()=>{if(!p)return;const[e,t]=io(O,_);g({x:e,y:t}),w=requestAnimationFrame(A)};function D(e){const{transform:r}=i();O=vo(e,_);const{handle:s,validHandleResult:c}=function(e,t,n,r,o,i){const{x:a,y:l}=vo(e),s=t.elementsFromPoint(a,l).find((e=>e.classList.contains("react-flow__handle")));if(s){const e=s.getAttribute("data-nodeid");if(e){const t=ai(void 0,s),r=s.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:oi()};if(1===c.length)return c[0];const d=c.some((({validHandleResult:e})=>e.isValid)),f=c.some((({handle:e})=>"target"===e.type));return c.find((({handle:e,validHandleResult:t})=>f?"target"===e.type:!d||t.isValid))||c[0]}(e,u,Xo(O,r,!1,[1,1]),h,T,(e=>ii(e,d,n,t,o?"target":"source",l,u)));if(b=s,N||(A(),N=!0),M=c.handleDomNode,P=c.connection,R=c.isValid,a({connectionPosition:b&&R?Yo({x:b.x,y:b.y},r):O,connectionStatus:si(!!b,R),connectionEndHandle:c.endHandle}),!b&&!R&&!M)return li(C);P.source!==P.target&&M&&(li(C),C=M,M.classList.add("connecting","react-flow__handle-connecting"),M.classList.toggle("valid",R),M.classList.toggle("react-flow__handle-valid",R))}function I(e){(b||M)&&P&&R&&r?.(P),i().onConnectEnd?.(e),s&&c?.(e),li(C),v(),cancelAnimationFrame(w),N=!1,R=!1,P=null,M=null,u.removeEventListener("mousemove",D),u.removeEventListener("mouseup",I),u.removeEventListener("touchmove",D),u.removeEventListener("touchend",I)}a({connectionPosition:O,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",D),u.addEventListener("mouseup",I),u.addEventListener("touchmove",D),u.addEventListener("touchend",I)}const ui=()=>!0,di=e=>({connectionStartHandle:e.connectionStartHandle,connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName}),fi=s.forwardRef((({type:e="source",position:t=Po.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:o=!0,isConnectableEnd:i=!0,id:a,onConnect:l,children:u,className:d,onMouseDown:f,onTouchStart:p,...h},m)=>{const g=a||null,y="target"===e,v=Gr(),b=s.useContext(Uo),{connectOnClick:w,noPanClassName:x}=Yr(di,q),{connecting:k,clickConnecting:S}=Yr(((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}})(b,g,e),q);b||v.getState().onError?.("010",Wr());const E=e=>{const{defaultEdgeOptions:t,onConnect:n,hasDefaultEdges:r}=v.getState(),o={...t,...e};if(r){const{edges:e,setEdges:t}=v.getState();t(((e,t)=>{if(!e.source||!e.target)return t;let n;return n=(e=>"id"in e&&"source"in e&&"target"in e)(e)?{...e}:{...e,id:qo(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),l?.(o)},_=e=>{if(!b)return;const t=yo(e);o&&(t&&0===e.button||!t)&&ci({event:e,handleId:g,nodeId:b,onConnect:E,isTarget:y,getState:v.getState,setState:v.setState,isValidConnection:n||v.getState().isValidConnection||ui}),t?f?.(e):p?.(e)};return c.createElement("div",{"data-handleid":g,"data-nodeid":b,"data-handlepos":t,"data-id":`${b}-${g}-${e}`,className:$(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",x,d,{source:!y,target:y,connectable:r,connectablestart:o,connectableend:i,connecting:S,connectionindicator:r&&(o&&!k||i&&k)}]),onMouseDown:_,onTouchStart:_,onClick:w?t=>{const{onClickConnectStart:r,onClickConnectEnd:i,connectionClickStartHandle:a,connectionMode:l,isValidConnection:s}=v.getState();if(!b||!a&&!o)return;if(!a)return r?.(t,{nodeId:b,handleId:g,handleType:e}),void v.setState({connectionClickStartHandle:{nodeId:b,type:e,handleId:g}});const c=ao(t.target),u=n||s||ui,{connection:d,isValid:f}=ii({nodeId:b,id:g,type:e},l,a.nodeId,a.handleId||null,a.type,u,c);f&&E(d),i?.(t),v.setState({connectionClickStartHandle:null})}:void 0,ref:m,...h},u)}));fi.displayName="Handle";var pi=s.memo(fi);const hi=({data:e,isConnectable:t,targetPosition:n=Po.Top,sourcePosition:r=Po.Bottom})=>c.createElement(c.Fragment,null,c.createElement(pi,{type:"target",position:n,isConnectable:t}),e?.label,c.createElement(pi,{type:"source",position:r,isConnectable:t}));hi.displayName="DefaultNode";var mi=s.memo(hi);const gi=({data:e,isConnectable:t,sourcePosition:n=Po.Bottom})=>c.createElement(c.Fragment,null,e?.label,c.createElement(pi,{type:"source",position:n,isConnectable:t}));gi.displayName="InputNode";var yi=s.memo(gi);const vi=({data:e,isConnectable:t,targetPosition:n=Po.Top})=>c.createElement(c.Fragment,null,c.createElement(pi,{type:"target",position:n,isConnectable:t}),e?.label);vi.displayName="OutputNode";var bi=s.memo(vi);const wi=()=>null;wi.displayName="GroupNode";const xi=e=>({selectedNodes:e.getNodes().filter((e=>e.selected)),selectedEdges:e.edges.filter((e=>e.selected)).map((e=>({...e})))}),ki=e=>e.id;function Si(e,t){return q(e.selectedNodes.map(ki),t.selectedNodes.map(ki))&&q(e.selectedEdges.map(ki),t.selectedEdges.map(ki))}const Ei=s.memo((({onSelectionChange:e})=>{const t=Gr(),{selectedNodes:n,selectedEdges:r}=Yr(xi,Si);return s.useEffect((()=>{const o={nodes:n,edges:r};e?.(o),t.getState().onSelectionChange.forEach((e=>e(o)))}),[n,r,e]),null}));Ei.displayName="SelectionListener";const _i=e=>!!e.onSelectionChange;function Ci({onSelectionChange:e}){const t=Yr(_i);return e||t?c.createElement(Ei,{onSelectionChange:e}):null}const Oi=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 Ni(e,t){s.useEffect((()=>{void 0!==e&&t(e)}),[e])}function Pi(e,t,n){s.useEffect((()=>{void 0!==t&&n({[e]:t})}),[t])}const Ri=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:o,onConnectStart:i,onConnectEnd:a,onClickConnectStart:l,onClickConnectEnd:c,nodesDraggable:u,nodesConnectable:d,nodesFocusable:f,edgesFocusable:p,edgesUpdatable:h,elevateNodesOnSelect:m,minZoom:g,maxZoom:y,nodeExtent:v,onNodesChange:b,onEdgesChange:w,elementsSelectable:x,connectionMode:k,snapGrid:S,snapToGrid:E,translateExtent:_,connectOnClick:C,defaultEdgeOptions:O,fitView:N,fitViewOptions:P,onNodesDelete:R,onEdgesDelete:M,onNodeDrag:T,onNodeDragStart:A,onNodeDragStop:D,onSelectionDrag:I,onSelectionDragStart:L,onSelectionDragStop:z,noPanClassName:F,nodeOrigin:j,rfId:$,autoPanOnConnect:B,autoPanOnNodeDrag:V,onError:H,connectionRadius:U,isValidConnection:W,nodeDragThreshold:K})=>{const{setNodes:X,setEdges:Y,setDefaultNodesAndEdges:G,setMinZoom:Q,setMaxZoom:Z,setTranslateExtent:J,setNodeExtent:ee,reset:te}=Yr(Oi,q),ne=Gr();return s.useEffect((()=>{const e=r?.map((e=>({...e,...O})));return G(n,e),()=>{te()}}),[]),Pi("defaultEdgeOptions",O,ne.setState),Pi("connectionMode",k,ne.setState),Pi("onConnect",o,ne.setState),Pi("onConnectStart",i,ne.setState),Pi("onConnectEnd",a,ne.setState),Pi("onClickConnectStart",l,ne.setState),Pi("onClickConnectEnd",c,ne.setState),Pi("nodesDraggable",u,ne.setState),Pi("nodesConnectable",d,ne.setState),Pi("nodesFocusable",f,ne.setState),Pi("edgesFocusable",p,ne.setState),Pi("edgesUpdatable",h,ne.setState),Pi("elementsSelectable",x,ne.setState),Pi("elevateNodesOnSelect",m,ne.setState),Pi("snapToGrid",E,ne.setState),Pi("snapGrid",S,ne.setState),Pi("onNodesChange",b,ne.setState),Pi("onEdgesChange",w,ne.setState),Pi("connectOnClick",C,ne.setState),Pi("fitViewOnInit",N,ne.setState),Pi("fitViewOnInitOptions",P,ne.setState),Pi("onNodesDelete",R,ne.setState),Pi("onEdgesDelete",M,ne.setState),Pi("onNodeDrag",T,ne.setState),Pi("onNodeDragStart",A,ne.setState),Pi("onNodeDragStop",D,ne.setState),Pi("onSelectionDrag",I,ne.setState),Pi("onSelectionDragStart",L,ne.setState),Pi("onSelectionDragStop",z,ne.setState),Pi("noPanClassName",F,ne.setState),Pi("nodeOrigin",j,ne.setState),Pi("rfId",$,ne.setState),Pi("autoPanOnConnect",B,ne.setState),Pi("autoPanOnNodeDrag",V,ne.setState),Pi("onError",H,ne.setState),Pi("connectionRadius",U,ne.setState),Pi("isValidConnection",W,ne.setState),Pi("nodeDragThreshold",K,ne.setState),Ni(e,X),Ni(t,Y),Ni(g,Q),Ni(y,Z),Ni(_,J),Ni(v,ee),null},Mi={display:"none"},Ti={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Ai="react-flow__node-desc",Di="react-flow__edge-desc",Ii=e=>e.ariaLiveMessage;function Li({rfId:e}){const t=Yr(Ii);return c.createElement("div",{id:`react-flow__aria-live-${e}`,"aria-live":"assertive","aria-atomic":"true",style:Ti},t)}function zi({rfId:e,disableKeyboardA11y:t}){return c.createElement(c.Fragment,null,c.createElement("div",{id:`${Ai}-${e}`,style:Mi},"Press enter or space to select a node.",!t&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "),c.createElement("div",{id:`${Di}-${e}`,style:Mi},"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."),!t&&c.createElement(Li,{rfId:e}))}var Fi=(e=null,t={actInsideInputWithModifier:!0})=>{const[n,r]=s.useState(!1),o=s.useRef(!1),i=s.useRef(new Set([])),[a,l]=s.useMemo((()=>{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.useEffect((()=>{const n="undefined"!=typeof document?document:null,s=t?.target||n;if(null!==e){const e=e=>{o.current=e.ctrlKey||e.metaKey||e.shiftKey;if((!o.current||o.current&&!t.actInsideInputWithModifier)&&go(e))return!1;const n=$i(e.code,l);i.current.add(e[n]),ji(a,i.current,!1)&&(e.preventDefault(),r(!0))},n=e=>{if((!o.current||o.current&&!t.actInsideInputWithModifier)&&go(e))return!1;const n=$i(e.code,l);ji(a,i.current,!0)?(r(!1),i.current.clear()):i.current.delete(e[n]),"Meta"===e.key&&i.current.clear(),o.current=!1},c=()=>{i.current.clear(),r(!1)};return s?.addEventListener("keydown",e),s?.addEventListener("keyup",n),window.addEventListener("blur",c),()=>{s?.removeEventListener("keydown",e),s?.removeEventListener("keyup",n),window.removeEventListener("blur",c)}}}),[e,r]),n};function ji(e,t,n){return e.filter((e=>n||e.length===t.size)).some((e=>e.every((e=>t.has(e)))))}function $i(e,t){return t.includes(e)?"code":"key"}function Bi(e,t,n,r){const o=e.parentNode||e.parentId;if(!o)return n;const i=t.get(o),a=Go(i,r);return Bi(i,t,{x:(n.x??0)+a.x,y:(n.y??0)+a.y,z:(i[ho]?.z??0)>(n.z??0)?i[ho]?.z??0:n.z??0},r)}function Vi(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}=Bi(r,e,{...r.position,z:r[ho]?.z??0},t);r.positionAbsolute={x:o,y:i},r[ho].z=a,n?.[r.id]&&(r[ho].isParent=!0)}}))}function Hi(e,t,n,r){const o=new Map,i={},a=r?1e3:0;return e.forEach((e=>{const n=(po(e.zIndex)?e.zIndex:0)+(e.selected?a:0),r=t.get(e.id),l={...e,positionAbsolute:{x:e.position.x,y:e.position.y}},s=e.parentNode||e.parentId;s&&(i[s]=!0);const c=r?.type&&r?.type!==e.type;Object.defineProperty(l,ho,{enumerable:!1,value:{handleBounds:c?void 0:r?.[ho]?.handleBounds,z:n}}),o.set(e.id,l)})),Vi(o,n,i),o}function Ui(e,t={}){const{getNodes:n,width:r,height:o,minZoom:i,maxZoom:a,d3Zoom:l,d3Selection:s,fitViewOnInitDone:c,fitViewOnInit:u,nodeOrigin:d}=e(),f=t.initial&&!c&&u;if(l&&s&&(f||!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=Qo(e,d),{x:c,y:u,zoom:f}=ei(n,r,o,t.minZoom??i,t.maxZoom??a,t.padding??.1),p=wr.translate(c,u).scale(f);return"number"==typeof t.duration&&t.duration>0?l.transform(ti(s,t.duration),p):l.transform(s,p),!0}}return!1}function Wi(e,t){return e.forEach((e=>{const n=t.get(e.id);n&&t.set(n.id,{...n,[ho]:n[ho],selected:e.selected})})),new Map(t)}function qi(e,t){return t.map((t=>{const n=e.find((e=>e.id===t.id));return n&&(t.selected=n.selected),t}))}function Ki({changedNodes:e,changedEdges:t,get:n,set:r}){const{nodeInternals:o,edges:i,onNodesChange:a,onEdgesChange:l,hasDefaultNodes:s,hasDefaultEdges:c}=n();e?.length&&(s&&r({nodeInternals:Wi(e,o)}),a?.(e)),t?.length&&(c&&r({edges:qi(t,i)}),l?.(t))}const Xi=()=>{},Yi={zoomIn:Xi,zoomOut:Xi,zoomTo:Xi,getZoom:()=>1,setViewport:Xi,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:Xi,fitBounds:Xi,project:e=>e,screenToFlowPosition:e=>e,flowToScreenPosition:e=>e,viewportInitialized:!1},Gi=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection});function Qi(){const e=(()=>{const e=Gr(),{d3Zoom:t,d3Selection:n}=Yr(Gi,q),r=s.useMemo((()=>n&&t?{zoomIn:e=>t.scaleBy(ti(n,e?.duration),1.2),zoomOut:e=>t.scaleBy(ti(n,e?.duration),1/1.2),zoomTo:(e,r)=>t.scaleTo(ti(n,r?.duration),e),getZoom:()=>e.getState().transform[2],setViewport:(r,o)=>{const[i,a,l]=e.getState().transform,s=wr.translate(r.x??i,r.y??a).scale(r.zoom??l);t.transform(ti(n,o?.duration),s)},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},fitView:t=>Ui(e.getState,t),setCenter:(r,o,i)=>{const{width:a,height:l,maxZoom:s}=e.getState(),c=void 0!==i?.zoom?i.zoom:s,u=a/2-r*c,d=l/2-o*c,f=wr.translate(u,d).scale(c);t.transform(ti(n,i?.duration),f)},fitBounds:(r,o)=>{const{width:i,height:a,minZoom:l,maxZoom:s}=e.getState(),{x:c,y:u,zoom:d}=ei(r,i,a,l,s,o?.padding??.1),f=wr.translate(c,u).scale(d);t.transform(ti(n,o?.duration),f)},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"),Xo(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:l}=i.getBoundingClientRect(),s={x:t.x-a,y:t.y-l};return Xo(s,n,r,o)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:o,y:i}=r.getBoundingClientRect(),a=Yo(t,n);return{x:a.x+o,y:a.y+i}},viewportInitialized:!0}:Yi),[t,n]);return r})(),t=Gr(),n=s.useCallback((()=>t.getState().getNodes().map((e=>({...e})))),[]),r=s.useCallback((e=>t.getState().nodeInternals.get(e)),[]),o=s.useCallback((()=>{const{edges:e=[]}=t.getState();return e.map((e=>({...e})))}),[]),i=s.useCallback((e=>{const{edges:n=[]}=t.getState();return n.find((t=>t.id===e))}),[]),a=s.useCallback((e=>{const{getNodes:n,setNodes:r,hasDefaultNodes:o,onNodesChange:i}=t.getState(),a=n(),l="function"==typeof e?e(a):e;if(o)r(l);else if(i){const e=0===l.length?a.map((e=>({type:"remove",id:e.id}))):l.map((e=>({item:e,type:"reset"})));i(e)}}),[]),l=s.useCallback((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"}))))}}),[]),c=s.useCallback((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)}}),[]),u=s.useCallback((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"}))))}}),[]),d=s.useCallback((()=>{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=s.useCallback((({nodes:e,edges:n})=>{const{nodeInternals:r,getNodes:o,edges:i,hasDefaultNodes:a,hasDefaultEdges:l,onNodesDelete:s,onEdgesDelete:c,onNodesChange:u,onEdgesChange:d}=t.getState(),f=(e||[]).map((e=>e.id)),p=(n||[]).map((e=>e.id)),h=o().reduce(((e,t)=>{const n=t.parentNode||t.parentId,r=!f.includes(t.id)&&n&&e.find((e=>e.id===n));return("boolean"!=typeof t.deletable||t.deletable)&&(f.includes(t.id)||r)&&e.push(t),e}),[]),m=i.filter((e=>"boolean"!=typeof e.deletable||e.deletable)),g=m.filter((e=>p.includes(e.id)));if(h||g){const e=Jo(h,m),n=[...g,...e],o=n.reduce(((e,t)=>(e.includes(t.id)||e.push(t.id),e)),[]);if((l||a)&&(l&&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&&(s?.(h),u)){u(h.map((e=>({id:e.id,type:"remove"}))))}}}),[]),p=s.useCallback((e=>{const n=po((r=e).width)&&po(r.height)&&po(r.x)&&po(r.y);var r;const o=n?null:t.getState().nodeInternals.get(e.id);if(!n&&!o)return[null,null,n];return[n?e:uo(o),o,n]}),[]),h=s.useCallback(((e,n=!0,r)=>{const[o,i,a]=p(e);return o?(r||t.getState().getNodes()).filter((e=>{if(!(a||e.id!==i.id&&e.positionAbsolute))return!1;const t=uo(e),r=fo(t,o);return n&&r>0||r>=o.width*o.height})):[]}),[]),m=s.useCallback(((e,t,n=!0)=>{const[r]=p(e);if(!r)return!1;const o=fo(r,t);return n&&o>0||o>=r.width*r.height}),[]);return s.useMemo((()=>({...e,getNodes:n,getNode:r,getEdges:o,getEdge:i,setNodes:a,setEdges:l,addNodes:c,addEdges:u,toObject:d,deleteElements:f,getIntersectingNodes:h,isNodeIntersecting:m})),[e,n,r,o,i,a,l,c,u,d,f,h,m])}const Zi={actInsideInputWithModifier:!1};const Ji={position:"absolute",width:"100%",height:"100%",top:0,left:0},ea=e=>({x:e.x,y:e.y,zoom:e.k}),ta=(e,t)=>e.target.closest(`.${t}`),na=(e,t)=>2===t&&Array.isArray(e)&&e.includes(2),ra=e=>{const t=e.ctrlKey&&bo()?10:1;return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*t},oa=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection,d3ZoomHandler:e.d3ZoomHandler,userSelectionActive:e.userSelectionActive}),ia=({onMove:e,onMoveStart:t,onMoveEnd:n,onPaneContextMenu:r,zoomOnScroll:o=!0,zoomOnPinch:i=!0,panOnScroll:a=!1,panOnScrollSpeed:l=.5,panOnScrollMode:u=_o.Free,zoomOnDoubleClick:d=!0,elementsSelectable:f,panOnDrag:p=!0,defaultViewport:h,translateExtent:m,minZoom:g,maxZoom:y,zoomActivationKeyCode:v,preventScrolling:b=!0,children:w,noWheelClassName:x,noPanClassName:k})=>{const S=s.useRef(),E=Gr(),_=s.useRef(!1),C=s.useRef(!1),O=s.useRef(null),N=s.useRef({x:0,y:0,zoom:0}),{d3Zoom:P,d3Selection:R,d3ZoomHandler:M,userSelectionActive:T}=Yr(oa,q),A=Fi(v),D=s.useRef(0),I=s.useRef(!1),L=s.useRef();return function(e){const t=Gr();s.useEffect((()=>{let n;const r=()=>{if(!e.current)return;const n=to(e.current);0!==n.height&&0!==n.width||t.getState().onError?.("004",Br()),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)}}),[])}(O),s.useEffect((()=>{if(O.current){const e=O.current.getBoundingClientRect(),t=Pr().scaleExtent([g,y]).translateExtent(m),n=ut(O.current).call(t),r=wr.translate(h.x,h.y).scale(no(h.zoom,g,y)),o=[[0,0],[e.width,e.height]],i=t.constrain()(r,o,m);t.transform(n,i),t.wheelDelta(ra),E.setState({d3Zoom:t,d3Selection:n,d3ZoomHandler:n.on("wheel.zoom"),transform:[i.x,i.y,i.k],domNode:O.current.closest(".react-flow")})}}),[]),s.useEffect((()=>{R&&P&&(!a||A||T?void 0!==M&&R.on("wheel.zoom",(function(e,t){if(!b&&"wheel"===e.type&&!e.ctrlKey||ta(e,x))return null;e.preventDefault(),M.call(this,e,t)}),{passive:!1}):R.on("wheel.zoom",(r=>{if(ta(r,x))return!1;r.preventDefault(),r.stopImmediatePropagation();const o=R.property("__zoom").k||1;if(r.ctrlKey&&i){const e=dt(r),t=ra(r),n=o*Math.pow(2,t);return void P.scaleTo(R,n,e,r)}const a=1===r.deltaMode?20:1;let s=u===_o.Vertical?0:r.deltaX*a,c=u===_o.Horizontal?0:r.deltaY*a;!bo()&&r.shiftKey&&u!==_o.Vertical&&(s=r.deltaY*a,c=0),P.translateBy(R,-s/o*l,-c/o*l,{internal:!0});const d=ea(R.property("__zoom")),{onViewportChangeStart:f,onViewportChange:p,onViewportChangeEnd:h}=E.getState();clearTimeout(L.current),I.current||(I.current=!0,t?.(r,d),f?.(d)),I.current&&(e?.(r,d),p?.(d),L.current=setTimeout((()=>{n?.(r,d),h?.(d),I.current=!1}),150))}),{passive:!1}))}),[T,a,u,R,P,M,A,i,b,x,t,e,n]),s.useEffect((()=>{P&&P.on("start",(e=>{if(!e.sourceEvent||e.sourceEvent.internal)return null;D.current=e.sourceEvent?.button;const{onViewportChangeStart:n}=E.getState(),r=ea(e.transform);_.current=!0,N.current=r,"mousedown"===e.sourceEvent?.type&&E.setState({paneDragging:!0}),n?.(r),t?.(e.sourceEvent,r)}))}),[P,t]),s.useEffect((()=>{P&&(T&&!_.current?P.on("zoom",null):T||P.on("zoom",(t=>{const{onViewportChange:n}=E.getState();if(E.setState({transform:[t.transform.x,t.transform.y,t.transform.k]}),C.current=!(!r||!na(p,D.current??0)),(e||n)&&!t.sourceEvent?.internal){const r=ea(t.transform);n?.(r),e?.(t.sourceEvent,r)}})))}),[T,P,e,p,r]),s.useEffect((()=>{P&&P.on("end",(e=>{if(!e.sourceEvent||e.sourceEvent.internal)return null;const{onViewportChangeEnd:t}=E.getState();if(_.current=!1,E.setState({paneDragging:!1}),r&&na(p,D.current??0)&&!C.current&&r(e.sourceEvent),C.current=!1,(n||t)&&(o=N.current,i=e.transform,o.x!==i.x||o.y!==i.y||o.zoom!==i.k)){const r=ea(e.transform);N.current=r,clearTimeout(S.current),S.current=setTimeout((()=>{t?.(r),n?.(e.sourceEvent,r)}),a?150:0)}var o,i}))}),[P,a,p,n,r]),s.useEffect((()=>{P&&P.filter((e=>{const t=A||o,n=i&&e.ctrlKey;if((!0===p||Array.isArray(p)&&p.includes(1))&&1===e.button&&"mousedown"===e.type&&(ta(e,"react-flow__node")||ta(e,"react-flow__edge")))return!0;if(!(p||t||a||d||i))return!1;if(T)return!1;if(!d&&"dblclick"===e.type)return!1;if(ta(e,x)&&"wheel"===e.type)return!1;if(ta(e,k)&&("wheel"!==e.type||a&&"wheel"===e.type&&!A))return!1;if(!i&&e.ctrlKey&&"wheel"===e.type)return!1;if(!t&&!a&&!n&&"wheel"===e.type)return!1;if(!p&&("mousedown"===e.type||"touchstart"===e.type))return!1;if(Array.isArray(p)&&!p.includes(e.button)&&"mousedown"===e.type)return!1;const r=Array.isArray(p)&&p.includes(e.button)||!e.button||e.button<=1;return(!e.ctrlKey||"wheel"===e.type)&&r}))}),[T,P,o,i,a,d,p,f,A]),c.createElement("div",{className:"react-flow__renderer",ref:O,style:Ji},w)},aa=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function la(){const{userSelectionActive:e,userSelectionRect:t}=Yr(aa,q);return e&&t?c.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}function sa(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 ca(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&&sa(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&&sa(t,o);break;case"remove":return t}return t.push(o),t}),n)}function ua(e,t){return ca(e,t)}function da(e,t){return ca(e,t)}const fa=(e,t)=>({id:e,type:"select",selected:t});function pa(e,t){return e.reduce(((e,n)=>{const r=t.includes(n.id);return!n.selected&&r?(n.selected=!0,e.push(fa(n.id,!0))):n.selected&&!r&&(n.selected=!1,e.push(fa(n.id,!1))),e}),[])}const ha=(e,t)=>n=>{n.target===t.current&&e?.(n)},ma=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging}),ga=s.memo((({isSelecting:e,selectionMode:t=Co.Full,panOnDrag:n,onSelectionStart:r,onSelectionEnd:o,onPaneClick:i,onPaneContextMenu:a,onPaneScroll:l,onPaneMouseEnter:u,onPaneMouseMove:d,onPaneMouseLeave:f,children:p})=>{const h=s.useRef(null),m=Gr(),g=s.useRef(0),y=s.useRef(0),v=s.useRef(),{userSelectionActive:b,elementsSelectable:w,dragging:x}=Yr(ma,q),k=()=>{m.setState({userSelectionActive:!1,userSelectionRect:null}),g.current=0,y.current=0},S=e=>{i?.(e),m.getState().resetSelectedElements(),m.setState({nodesSelectionActive:!1})},E=l?e=>l(e):void 0,_=w&&(e||b);return c.createElement("div",{className:$(["react-flow__pane",{dragging:x,selection:e}]),onClick:_?void 0:ha(S,h),onContextMenu:ha((e=>{Array.isArray(n)&&n?.includes(2)?e.preventDefault():a?.(e)}),h),onWheel:ha(E,h),onMouseEnter:_?void 0:u,onMouseDown:_?t=>{const{resetSelectedElements:n,domNode:o}=m.getState();if(v.current=o?.getBoundingClientRect(),!w||!e||0!==t.button||t.target!==h.current||!v.current)return;const{x:i,y:a}=vo(t,v.current);n(),m.setState({userSelectionRect:{width:0,height:0,startX:i,startY:a,x:i,y:a}}),r?.(t)}:void 0,onMouseMove:_?n=>{const{userSelectionRect:r,nodeInternals:o,edges:i,transform:a,onNodesChange:l,onEdgesChange:s,nodeOrigin:c,getNodes:u}=m.getState();if(!e||!v.current||!r)return;m.setState({userSelectionActive:!0,nodesSelectionActive:!1});const d=vo(n,v.current),f=r.startX??0,p=r.startY??0,h={...r,x:d.x<f?d.x:f,y:d.y<p?d.y:p,width:Math.abs(d.x-f),height:Math.abs(d.y-p)},b=u(),w=Zo(o,h,a,t===Co.Partial,!0,c),x=Jo(w,i).map((e=>e.id)),k=w.map((e=>e.id));if(g.current!==k.length){g.current=k.length;const e=pa(b,k);e.length&&l?.(e)}if(y.current!==x.length){y.current=x.length;const e=pa(i,x);e.length&&s?.(e)}m.setState({userSelectionRect:h})}:d,onMouseUp:_?e=>{if(0!==e.button)return;const{userSelectionRect:t}=m.getState();!b&&t&&e.target===h.current&&S?.(e),m.setState({nodesSelectionActive:g.current>0}),k(),o?.(e)}:void 0,onMouseLeave:_?e=>{b&&(m.setState({nodesSelectionActive:g.current>0}),o?.(e)),k()}:f,ref:h,style:Ji},p,c.createElement(la,null))}));function ya(e,t){const n=e.parentNode||e.parentId;if(!n)return!1;const r=t.get(n);return!!r&&(!!r.selected||ya(r,t))}function va(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 ba(e,t,n,r){return Array.from(e.values()).filter((n=>(n.selected||n.id===r)&&(!n.parentNode||n.parentId||!ya(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 wa(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 l=a;const s=e.parentNode||e.parentId;if("parent"!==e.extent||e.expandParent){if(e.extent&&s&&"parent"!==e.extent){const t=n.get(s),{x:r,y:i}=Go(t,o).positionAbsolute;l=[[e.extent[0][0]+r,e.extent[0][1]+i],[e.extent[1][0]+r,e.extent[1][1]+i]]}}else if(s&&e.width&&e.height){const t=n.get(s),{x:r,y:i}=Go(t,o).positionAbsolute;l=t&&po(r)&&po(i)&&po(t.width)&&po(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]]]:l}else i?.("005",Vr()),l=a;let c={x:0,y:0};if(s){const e=n.get(s);c=Go(e,o).positionAbsolute}const u=l&&"parent"!==l?ro(t,l):t;return{position:{x:u.x-c.x,y:u.y-c.y},positionAbsolute:u}}function xa({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]}ga.displayName="Pane";const ka=(e,t,n,r)=>{const o=t.querySelectorAll(e);if(!o||!o.length)return null;const i=Array.from(o),a=t.getBoundingClientRect(),l=a.width*r[0],s=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-l)/n,y:(t.top-a.top-s)/n,...to(e)}}))};function Sa(e,t,n){return void 0===n?n:r=>{const o=t().nodeInternals.get(e);o&&n(r,{...o})}}function Ea({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:o,unselectNodesAndEdges:i,multiSelectionActive:a,nodeInternals:l,onError:s}=t.getState(),c=l.get(e);c?(t.setState({nodesSelectionActive:!1}),c.selected?(n||c.selected&&a)&&(i({nodes:[c],edges:[]}),requestAnimationFrame((()=>r?.current?.blur()))):o([e])):s?.("012",Kr(e))}function _a(e){return(t,n,r)=>e?.(t,r)}function Ca({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:o,isSelectable:i,selectNodesOnDrag:a}){const l=Gr(),[c,u]=s.useState(!1),d=s.useRef([]),f=s.useRef({x:null,y:null}),p=s.useRef(0),h=s.useRef(null),m=s.useRef({x:0,y:0}),g=s.useRef(null),y=s.useRef(!1),v=s.useRef(!1),b=s.useRef(!1),w=function(){const e=Gr(),t=s.useCallback((({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,l={x:(i-n[0])/n[2],y:(a-n[1])/n[2]};return{xSnapped:o?r[0]*Math.round(l.x/r[0]):l.x,ySnapped:o?r[1]*Math.round(l.y/r[1]):l.y,...l}}),[]);return t}();return s.useEffect((()=>{if(e?.current){const s=ut(e.current),c=({x:e,y:t})=>{const{nodeInternals:n,onNodeDrag:r,onSelectionDrag:i,updateNodePositions:a,nodeExtent:s,snapGrid:c,snapToGrid:p,nodeOrigin:h,onError:m}=l.getState();f.current={x:e,y:t};let y=!1,v={x:0,y:0,x2:0,y2:0};if(d.current.length>1&&s){const e=Qo(d.current,h);v=so(e)}if(d.current=d.current.map((r=>{const o={x:e-r.distance.x,y:t-r.distance.y};p&&(o.x=c[0]*Math.round(o.x/c[0]),o.y=c[1]*Math.round(o.y/c[1]));const i=[[s[0][0],s[0][1]],[s[1][0],s[1][1]]];d.current.length>1&&s&&!r.extent&&(i[0][0]=r.positionAbsolute.x-v.x+s[0][0],i[1][0]=r.positionAbsolute.x+(r.width??0)-v.x2+s[1][0],i[0][1]=r.positionAbsolute.y-v.y+s[0][1],i[1][1]=r.positionAbsolute.y+(r.height??0)-v.y2+s[1][1]);const a=wa(r,o,n,i,h,m);return y=y||r.position.x!==a.position.x||r.position.y!==a.position.y,r.position=a.position,r.positionAbsolute=a.positionAbsolute,r})),!y)return;a(d.current,!0,!0),u(!0);const b=o?r:_a(i);if(b&&g.current){const[e,t]=xa({nodeId:o,dragItems:d.current,nodeInternals:n});b(g.current,e,t)}},x=()=>{if(!h.current)return;const[e,t]=io(m.current,h.current);if(0!==e||0!==t){const{transform:n,panBy:r}=l.getState();f.current.x=(f.current.x??0)-e/n[2],f.current.y=(f.current.y??0)-t/n[2],r({x:e,y:t})&&c(f.current)}p.current=requestAnimationFrame(x)},k=t=>{const{nodeInternals:n,multiSelectionActive:r,nodesDraggable:s,unselectNodesAndEdges:c,onNodeDragStart:u,onSelectionDragStart:p}=l.getState();v.current=!0;const h=o?u:_a(p);a&&i||r||!o||n.get(o)?.selected||c(),o&&i&&a&&Ea({id:o,store:l,nodeRef:e});const m=w(t);if(f.current=m,d.current=ba(n,s,m,o),h&&d.current){const[e,r]=xa({nodeId:o,dragItems:d.current,nodeInternals:n});h(t.sourceEvent,e,r)}};if(!t){const t=function(){var e,t,n,r,o=wt,i=xt,a=kt,l=St,s={},c=X("start","drag","end"),u=0,d=0;function f(e){e.on("mousedown.drag",p).filter(l).on("touchstart.drag",g).on("touchmove.drag",y,ft).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(a,l){if(!r&&o.call(this,a,l)){var s=b(this,i.call(this,a,l),a,l,"mouse");s&&(ut(a.view).on("mousemove.drag",h,pt).on("mouseup.drag",m,pt),gt(a.view),ht(a),n=!1,e=a.clientX,t=a.clientY,s("start",a))}}function h(r){if(mt(r),!n){var o=r.clientX-e,i=r.clientY-t;n=o*o+i*i>d}s.mouse("drag",r)}function m(e){ut(e.view).on("mousemove.drag mouseup.drag",null),yt(e.view,n),mt(e),s.mouse("end",e)}function g(e,t){if(o.call(this,e,t)){var n,r,a=e.changedTouches,l=i.call(this,e,t),s=a.length;for(n=0;n<s;++n)(r=b(this,l,e,t,a[n].identifier,a[n]))&&(ht(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=s[r[t].identifier])&&(mt(e),n("drag",e,r[t]))}function v(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=s[o[t].identifier])&&(ht(e),n("end",e,o[t]))}function b(e,t,n,r,o,i){var l,d,p,h=c.copy(),m=dt(i||n,t);if(null!=(p=a.call(e,new bt("beforestart",{sourceEvent:n,target:f,identifier:o,active:u,x:m[0],y:m[1],dx:0,dy:0,dispatch:h}),r)))return l=p.x-m[0]||0,d=p.y-m[1]||0,function n(i,a,c){var g,y=m;switch(i){case"start":s[o]=n,g=u++;break;case"end":delete s[o],--u;case"drag":m=dt(c||a,t),g=u}h.call(i,e,new bt(i,{sourceEvent:a,subject:p,target:f,identifier:o,active:g,x:m[0]+l,y:m[1]+d,dx:m[0]-y[0],dy:m[1]-y[1],dispatch:h}),r)}}return f.filter=function(e){return arguments.length?(o="function"==typeof e?e:vt(!!e),f):o},f.container=function(e){return arguments.length?(i="function"==typeof e?e:vt(e),f):i},f.subject=function(e){return arguments.length?(a="function"==typeof e?e:vt(e),f):a},f.touchable=function(e){return arguments.length?(l="function"==typeof e?e:vt(!!e),f):l},f.on=function(){var e=c.on.apply(c,arguments);return e===c?f:e},f.clickDistance=function(e){return arguments.length?(d=(e=+e)*e,f):Math.sqrt(d)},f}().on("start",(e=>{const{domNode:t,nodeDragThreshold:n}=l.getState();0===n&&k(e),b.current=!1;const r=w(e);f.current=r,h.current=t?.getBoundingClientRect()||null,m.current=vo(e.sourceEvent,h.current)})).on("drag",(e=>{const t=w(e),{autoPanOnNodeDrag:n,nodeDragThreshold:r}=l.getState();if("touchmove"===e.sourceEvent.type&&e.sourceEvent.touches.length>1&&(b.current=!0),!b.current){if(!y.current&&v.current&&n&&(y.current=!0,x()),!v.current){const n=t.xSnapped-(f?.current?.x??0),o=t.ySnapped-(f?.current?.y??0);Math.sqrt(n*n+o*o)>r&&k(e)}(f.current.x!==t.xSnapped||f.current.y!==t.ySnapped)&&d.current&&v.current&&(g.current=e.sourceEvent,m.current=vo(e.sourceEvent,h.current),c(t))}})).on("end",(e=>{if(v.current&&!b.current&&(u(!1),y.current=!1,v.current=!1,cancelAnimationFrame(p.current),d.current)){const{updateNodePositions:t,nodeInternals:n,onNodeDragStop:r,onSelectionDragStop:i}=l.getState(),a=o?r:_a(i);if(t(d.current,!1,!1),a){const[t,r]=xa({nodeId:o,dragItems:d.current,nodeInternals:n});a(e.sourceEvent,t,r)}}})).filter((t=>{const o=t.target;return!t.button&&(!n||!va(o,`.${n}`,e))&&(!r||va(o,r,e))}));return s.call(t),()=>{s.on(".drag",null)}}s.on(".drag",null)}}),[e,t,n,r,i,l,o,a,w]),c}function Oa(){const e=Gr(),t=s.useCallback((t=>{const{nodeInternals:n,nodeExtent:r,updateNodePositions:o,getNodes:i,snapToGrid:a,snapGrid:l,onError:s,nodesDraggable:c}=e.getState(),u=i().filter((e=>e.selected&&(e.draggable||c&&void 0===e.draggable))),d=a?l[0]:5,f=a?l[1]:5,p=t.isShiftPressed?4:1,h=t.x*d*p,m=t.y*f*p,g=u.map((e=>{if(e.positionAbsolute){const t={x:e.positionAbsolute.x+h,y:e.positionAbsolute.y+m};a&&(t.x=l[0]*Math.round(t.x/l[0]),t.y=l[1]*Math.round(t.y/l[1]));const{positionAbsolute:o,position:i}=wa(e,t,n,r,void 0,s);e.position=i,e.positionAbsolute=o}return e}));o(g,!0,!1)}),[]);return t}const Na={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var Pa=e=>{const t=({id:t,type:n,data:r,xPos:o,yPos:i,xPosOrigin:a,yPosOrigin:l,selected:u,onClick:d,onMouseEnter:f,onMouseMove:p,onMouseLeave:h,onContextMenu:m,onDoubleClick:g,style:y,className:v,isDraggable:b,isSelectable:w,isConnectable:x,isFocusable:k,selectNodesOnDrag:S,sourcePosition:E,targetPosition:_,hidden:C,resizeObserver:O,dragHandle:N,zIndex:P,isParent:R,noDragClassName:M,noPanClassName:T,initialized:A,disableKeyboardA11y:D,ariaLabel:I,rfId:L,hasHandleBounds:z})=>{const F=Gr(),j=s.useRef(null),B=s.useRef(null),V=s.useRef(E),H=s.useRef(_),U=s.useRef(n),W=w||b||d||f||p||h,q=Oa(),K=Sa(t,F.getState,f),X=Sa(t,F.getState,p),Y=Sa(t,F.getState,h),G=Sa(t,F.getState,m),Q=Sa(t,F.getState,g);s.useEffect((()=>()=>{B.current&&(O?.unobserve(B.current),B.current=null)}),[]),s.useEffect((()=>{if(j.current&&!C){const e=j.current;A&&z&&B.current===e||(B.current&&O?.unobserve(B.current),O?.observe(e),B.current=e)}}),[C,A,z]),s.useEffect((()=>{const e=U.current!==n,r=V.current!==E,o=H.current!==_;j.current&&(e||r||o)&&(e&&(U.current=n),r&&(V.current=E),o&&(H.current=_),F.getState().updateNodeDimensions([{id:t,nodeElement:j.current,forceUpdate:!0}]))}),[t,n,E,_]);const Z=Ca({nodeRef:j,disabled:C||!b,noDragClassName:M,handleSelector:N,nodeId:t,isSelectable:w,selectNodesOnDrag:S});return C?null:c.createElement("div",{className:$(["react-flow__node",`react-flow__node-${n}`,{[T]:b},v,{selected:u,selectable:w,parent:R,dragging:Z}]),ref:j,style:{zIndex:P,transform:`translate(${a}px,${l}px)`,pointerEvents:W?"all":"none",visibility:A?"visible":"hidden",...y},"data-id":t,"data-testid":`rf__node-${t}`,onMouseEnter:K,onMouseMove:X,onMouseLeave:Y,onContextMenu:G,onClick:e=>{const{nodeDragThreshold:n}=F.getState();if(w&&(!S||!b||n>0)&&Ea({id:t,store:F,nodeRef:j}),d){const n=F.getState().nodeInternals.get(t);n&&d(e,{...n})}},onDoubleClick:Q,onKeyDown:k?e=>{if(!go(e)&&!D)if(mo.includes(e.key)&&w){const n="Escape"===e.key;Ea({id:t,store:F,unselect:n,nodeRef:j})}else b&&u&&Object.prototype.hasOwnProperty.call(Na,e.key)&&(F.setState({ariaLiveMessage:`Moved selected node ${e.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~o}, y: ${~~i}`}),q({x:Na[e.key].x,y:Na[e.key].y,isShiftPressed:e.shiftKey}))}:void 0,tabIndex:k?0:void 0,role:k?"button":void 0,"aria-describedby":D?void 0:`${Ai}-${L}`,"aria-label":I},c.createElement(Wo,{value:t},c.createElement(e,{id:t,data:r,type:n,xPos:o,yPos:i,selected:u,isConnectable:x,sourcePosition:E,targetPosition:_,dragging:Z,dragHandle:N,zIndex:P})))};return t.displayName="NodeWrapper",s.memo(t)};const Ra=e=>{const t=e.getNodes().filter((e=>e.selected));return{...Qo(t,e.nodeOrigin),transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`,userSelectionActive:e.userSelectionActive}};var Ma=s.memo((function({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=Gr(),{width:o,height:i,x:a,y:l,transformString:u,userSelectionActive:d}=Yr(Ra,q),f=Oa(),p=s.useRef(null);if(s.useEffect((()=>{n||p.current?.focus({preventScroll:!0})}),[n]),Ca({nodeRef:p}),d||!o||!i)return null;const h=e?t=>{const n=r.getState().getNodes().filter((e=>e.selected));e(t,n)}:void 0;return c.createElement("div",{className:$(["react-flow__nodesselection","react-flow__container",t]),style:{transform:u}},c.createElement("div",{ref:p,className:"react-flow__nodesselection-rect",onContextMenu:h,tabIndex:n?void 0:-1,onKeyDown:n?void 0:e=>{Object.prototype.hasOwnProperty.call(Na,e.key)&&f({x:Na[e.key].x,y:Na[e.key].y,isShiftPressed:e.shiftKey})},style:{width:o,height:i,top:l,left:a}}))}));const Ta=e=>e.nodesSelectionActive,Aa=({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:i,onPaneScroll:a,deleteKeyCode:l,onMove:u,onMoveStart:d,onMoveEnd:f,selectionKeyCode:p,selectionOnDrag:h,selectionMode:m,onSelectionStart:g,onSelectionEnd:y,multiSelectionKeyCode:v,panActivationKeyCode:b,zoomActivationKeyCode:w,elementsSelectable:x,zoomOnScroll:k,zoomOnPinch:S,panOnScroll:E,panOnScrollSpeed:_,panOnScrollMode:C,zoomOnDoubleClick:O,panOnDrag:N,defaultViewport:P,translateExtent:R,minZoom:M,maxZoom:T,preventScrolling:A,onSelectionContextMenu:D,noWheelClassName:I,noPanClassName:L,disableKeyboardA11y:z})=>{const F=Yr(Ta),j=Fi(p),$=Fi(b),B=$||N,V=$||E,H=j||h&&!0!==B;return(({deleteKeyCode:e,multiSelectionKeyCode:t})=>{const n=Gr(),{deleteElements:r}=Qi(),o=Fi(e,Zi),i=Fi(t);s.useEffect((()=>{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.useEffect((()=>{n.setState({multiSelectionActive:i})}),[i])})({deleteKeyCode:l,multiSelectionKeyCode:v}),c.createElement(ia,{onMove:u,onMoveStart:d,onMoveEnd:f,onPaneContextMenu:i,elementsSelectable:x,zoomOnScroll:k,zoomOnPinch:S,panOnScroll:V,panOnScrollSpeed:_,panOnScrollMode:C,zoomOnDoubleClick:O,panOnDrag:!j&&B,defaultViewport:P,translateExtent:R,minZoom:M,maxZoom:T,zoomActivationKeyCode:w,preventScrolling:A,noWheelClassName:I,noPanClassName:L},c.createElement(ga,{onSelectionStart:g,onSelectionEnd:y,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:i,onPaneScroll:a,panOnDrag:B,isSelecting:!!H,selectionMode:m},e,F&&c.createElement(Ma,{onSelectionContextMenu:D,noPanClassName:L,disableKeyboardA11y:z})))};Aa.displayName="FlowRenderer";var Da=s.memo(Aa);function Ia(e){return{...{input:Pa(e.input||yi),default:Pa(e.default||mi),output:Pa(e.output||bi),group:Pa(e.group||wi)},...Object.keys(e).filter((e=>!["input","default","output","group"].includes(e))).reduce(((t,n)=>(t[n]=Pa(e[n]||mi),t)),{})}}const La=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,updateNodeDimensions:e.updateNodeDimensions,onError:e.onError}),za=e=>{const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:o,updateNodeDimensions:i,onError:a}=Yr(La,q),l=(u=e.onlyRenderVisibleElements,Yr(s.useCallback((e=>u?Zo(e.nodeInternals,{x:0,y:0,width:e.width,height:e.height},e.transform,!0):e.getNodes()),[u])));var u;const d=s.useRef(),f=s.useMemo((()=>{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})));i(t)}));return d.current=e,e}),[]);return s.useEffect((()=>()=>{d?.current?.disconnect()}),[]),c.createElement("div",{className:"react-flow__nodes",style:Ji},l.map((i=>{let l=i.type||"default";e.nodeTypes[l]||(a?.("003",$r(l)),l="default");const s=e.nodeTypes[l]||e.nodeTypes.default,u=!!(i.draggable||t&&void 0===i.draggable),d=!!(i.selectable||o&&void 0===i.selectable),p=!!(i.connectable||n&&void 0===i.connectable),h=!!(i.focusable||r&&void 0===i.focusable),m=e.nodeExtent?ro(i.positionAbsolute,e.nodeExtent):i.positionAbsolute,g=m?.x??0,y=m?.y??0,v=(({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:i.width??0,height:i.height??0,origin:e.nodeOrigin});return c.createElement(s,{key:i.id,id:i.id,className:i.className,style:i.style,type:l,data:i.data,sourcePosition:i.sourcePosition||Po.Bottom,targetPosition:i.targetPosition||Po.Top,hidden:i.hidden,xPos:g,yPos:y,xPosOrigin:v.x,yPosOrigin:v.y,selectNodesOnDrag:e.selectNodesOnDrag,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,selected:!!i.selected,isDraggable:u,isSelectable:d,isConnectable:p,isFocusable:h,resizeObserver:f,dragHandle:i.dragHandle,zIndex:i[ho]?.z??0,isParent:!!i[ho]?.isParent,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,initialized:!!i.width&&!!i.height,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,ariaLabel:i.ariaLabel,hasHandleBounds:!!i[ho]?.handleBounds})})))};za.displayName="NodeRenderer";var Fa=s.memo(za);const ja=(e,t,n)=>n===Po.Left?e-t:n===Po.Right?e+t:e,$a=(e,t,n)=>n===Po.Top?e-t:n===Po.Bottom?e+t:e,Ba="react-flow__edgeupdater",Va=({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:o,onMouseEnter:i,onMouseOut:a,type:l})=>c.createElement("circle",{onMouseDown:o,onMouseEnter:i,onMouseOut:a,className:$([Ba,`${Ba}-${l}`]),cx:ja(t,r,e),cy:$a(n,r,e),r:r,stroke:"transparent",fill:"transparent"}),Ha=()=>!0;var Ua=e=>{const t=({id:t,className:n,type:r,data:o,onClick:i,onEdgeDoubleClick:a,selected:l,animated:u,label:d,labelStyle:f,labelShowBg:p,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:g,style:y,source:v,target:b,sourceX:w,sourceY:x,targetX:k,targetY:S,sourcePosition:E,targetPosition:_,elementsSelectable:C,hidden:O,sourceHandleId:N,targetHandleId:P,onContextMenu:R,onMouseEnter:M,onMouseMove:T,onMouseLeave:A,reconnectRadius:D,onReconnect:I,onReconnectStart:L,onReconnectEnd:z,markerEnd:F,markerStart:j,rfId:B,ariaLabel:V,isFocusable:H,isReconnectable:U,pathOptions:W,interactionWidth:q,disableKeyboardA11y:K})=>{const X=s.useRef(null),[Y,G]=s.useState(!1),[Q,Z]=s.useState(!1),J=Gr(),ee=s.useMemo((()=>`url('#${Ko(j,B)}')`),[j,B]),te=s.useMemo((()=>`url('#${Ko(F,B)}')`),[F,B]);if(O)return null;const ne=xo(t,J.getState,a),re=xo(t,J.getState,R),oe=xo(t,J.getState,M),ie=xo(t,J.getState,T),ae=xo(t,J.getState,A),le=(e,n)=>{if(0!==e.button)return;const{edges:r,isValidConnection:o}=J.getState(),i=n?b:v,a=(n?P:N)||null,l=n?"target":"source",s=o||Ha,c=n,u=r.find((e=>e.id===t));Z(!0),L?.(e,u,l);ci({event:e,handleId:a,nodeId:i,onConnect:e=>I?.(u,e),isTarget:c,getState:J.getState,setState:J.setState,isValidConnection:s,edgeUpdaterType:l,onReconnectEnd:e=>{Z(!1),z?.(e,u,l)}})},se=()=>G(!0),ce=()=>G(!1),ue=!C&&!i;return c.createElement("g",{className:$(["react-flow__edge",`react-flow__edge-${r}`,n,{selected:l,animated:u,inactive:ue,updating:Y}]),onClick:e=>{const{edges:n,addSelectedEdges:r,unselectNodesAndEdges:o,multiSelectionActive:a}=J.getState(),l=n.find((e=>e.id===t));l&&(C&&(J.setState({nodesSelectionActive:!1}),l.selected&&a?(o({nodes:[],edges:[l]}),X.current?.blur()):r([t])),i&&i(e,l))},onDoubleClick:ne,onContextMenu:re,onMouseEnter:oe,onMouseMove:ie,onMouseLeave:ae,onKeyDown:H?e=>{if(!K&&mo.includes(e.key)&&C){const{unselectNodesAndEdges:n,addSelectedEdges:r,edges:o}=J.getState();"Escape"===e.key?(X.current?.blur(),n({edges:[o.find((e=>e.id===t))]})):r([t])}}:void 0,tabIndex:H?0:void 0,role:H?"button":"img","data-testid":`rf__edge-${t}`,"aria-label":null===V?void 0:V||`Edge from ${v} to ${b}`,"aria-describedby":H?`${Di}-${B}`:void 0,ref:X},!Q&&c.createElement(e,{id:t,source:v,target:b,selected:l,animated:u,label:d,labelStyle:f,labelShowBg:p,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:g,data:o,style:y,sourceX:w,sourceY:x,targetX:k,targetY:S,sourcePosition:E,targetPosition:_,sourceHandleId:N,targetHandleId:P,markerStart:ee,markerEnd:te,pathOptions:W,interactionWidth:q}),U&&c.createElement(c.Fragment,null,("source"===U||!0===U)&&c.createElement(Va,{position:E,centerX:w,centerY:x,radius:D,onMouseDown:e=>le(e,!0),onMouseEnter:se,onMouseOut:ce,type:"source"}),("target"===U||!0===U)&&c.createElement(Va,{position:_,centerX:k,centerY:S,radius:D,onMouseDown:e=>le(e,!1),onMouseEnter:se,onMouseOut:ce,type:"target"})))};return t.displayName="EdgeWrapper",s.memo(t)};function Wa(e){return{...{default:Ua(e.default||Ho),straight:Ua(e.bezier||jo),step:Ua(e.step||Fo),smoothstep:Ua(e.step||zo),simplebezier:Ua(e.simplebezier||To)},...Object.keys(e).filter((e=>!["default","bezier"].includes(e))).reduce(((t,n)=>(t[n]=Ua(e[n]||Ho),t)),{})}}function qa(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 Po.Top:return{x:r+i/2,y:o};case Po.Right:return{x:r+i,y:o+a/2};case Po.Bottom:return{x:r+i/2,y:o+a};case Po.Left:return{x:r,y:o+a/2}}}function Ka(e,t){return e?1!==e.length&&t?t&&e.find((e=>e.id===t))||null:e[0]:null}function Xa(e){const t=e?.[ho]?.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 Ya=[{level:0,isMaxLevel:!0,edges:[]}];function Ga(e,t,n){const r=Yr(s.useCallback((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:l,transform:s}){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=so({x:(0-s[0])/s[2],y:(0-s[1])/s[2],width:a/s[2],height:l/s[2]}),d=Math.max(0,Math.min(u.x2,c.x2)-Math.max(u.x,c.x)),f=Math.max(0,Math.min(u.y2,c.y2)-Math.max(u.y,c.y));return Math.ceil(d*f)>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=po(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,l=Math.max(n?.[ho]?.z||0,e?.[ho]?.z||0,1e3);a=(i?o.zIndex:0)+(r?l: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?Ya:i}(r,t,n)}const Qa={[No.Arrow]:({color:e="none",strokeWidth:t=1})=>c.createElement("polyline",{style:{stroke:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),[No.ArrowClosed]:({color:e="none",strokeWidth:t=1})=>c.createElement("polyline",{style:{stroke:e,fill:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})};const Za=({id:e,type:t,color:n,width:r=12.5,height:o=12.5,markerUnits:i="strokeWidth",strokeWidth:a,orient:l="auto-start-reverse"})=>{const u=function(e){const t=Gr();return s.useMemo((()=>Object.prototype.hasOwnProperty.call(Qa,e)?Qa[e]:(t.getState().onError?.("009",Hr(e)),null)),[e])}(t);return u?c.createElement("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${o}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:l,refX:"0",refY:"0"},c.createElement(u,{color:n,strokeWidth:a})):null},Ja=({defaultColor:e,rfId:t})=>{const n=Yr(s.useCallback((({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=Ko(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:t}),[e,t]),((e,t)=>!(e.length!==t.length||e.some(((e,n)=>e.id!==t[n].id)))));return c.createElement("defs",null,n.map((e=>c.createElement(Za,{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}))))};Ja.displayName="MarkerDefinitions";var el=s.memo(Ja);const tl=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}),nl=({defaultMarkerColor:e,onlyRenderVisibleElements:t,elevateEdgesOnSelect:n,rfId:r,edgeTypes:o,noPanClassName:i,onEdgeContextMenu:a,onEdgeMouseEnter:l,onEdgeMouseMove:s,onEdgeMouseLeave:u,onEdgeClick:d,onEdgeDoubleClick:f,onReconnect:p,onReconnectStart:h,onReconnectEnd:m,reconnectRadius:g,children:y,disableKeyboardA11y:v})=>{const{edgesFocusable:b,edgesUpdatable:w,elementsSelectable:x,width:k,height:S,connectionMode:E,nodeInternals:_,onError:C}=Yr(tl,q),O=Ga(t,_,n);return k?c.createElement(c.Fragment,null,O.map((({level:t,edges:n,isMaxLevel:y})=>c.createElement("svg",{key:t,style:{zIndex:t},width:k,height:S,className:"react-flow__edges react-flow__container"},y&&c.createElement(el,{defaultColor:e,rfId:r}),c.createElement("g",null,n.map((e=>{const[t,n,y]=Xa(_.get(e.source)),[k,S,O]=Xa(_.get(e.target));if(!y||!O)return null;let N=e.type||"default";o[N]||(C?.("011",qr(N)),N="default");const P=o[N]||o.default,R=E===Eo.Strict?S.target:(S.target??[]).concat(S.source??[]),M=Ka(n.source,e.sourceHandle),T=Ka(R,e.targetHandle),A=M?.position||Po.Bottom,D=T?.position||Po.Top,I=!!(e.focusable||b&&void 0===e.focusable),L=e.reconnectable||e.updatable,z=void 0!==p&&(L||w&&void 0===L);if(!M||!T)return C?.("008",Ur(M,e)),null;const{sourceX:F,sourceY:j,targetX:B,targetY:V}=((e,t,n,r,o,i)=>{const a=qa(n,e,t),l=qa(i,r,o);return{sourceX:a.x,sourceY:a.y,targetX:l.x,targetY:l.y}})(t,M,A,k,T,D);return c.createElement(P,{key:e.id,id:e.id,className:$([e.className,i]),type:N,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:F,sourceY:j,targetX:B,targetY:V,sourcePosition:A,targetPosition:D,elementsSelectable:x,onContextMenu:a,onMouseEnter:l,onMouseMove:s,onMouseLeave:u,onClick:d,onEdgeDoubleClick:f,onReconnect:p,onReconnectStart:h,onReconnectEnd:m,reconnectRadius:g,rfId:r,ariaLabel:e.ariaLabel,isFocusable:I,isReconnectable:z,pathOptions:"pathOptions"in e?e.pathOptions:void 0,interactionWidth:e.interactionWidth,disableKeyboardA11y:v})})))))),y):null};nl.displayName="EdgeRenderer";var rl=s.memo(nl);const ol=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function il({children:e}){const t=Yr(ol);return c.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:t}},e)}const al={[Po.Left]:Po.Right,[Po.Right]:Po.Left,[Po.Top]:Po.Bottom,[Po.Bottom]:Po.Top},ll=({nodeId:e,handleType:t,style:n,type:r=Oo.Bezier,CustomComponent:o,connectionStatus:i})=>{const{fromNode:a,handleId:l,toX:u,toY:d,connectionMode:f}=Yr(s.useCallback((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]),q),p=a?.[ho]?.handleBounds;let h=p?.[t];if(f===Eo.Loose&&(h=h||p?.["source"===t?"target":"source"]),!a||!h)return null;const m=l?h.find((e=>e.id===l)):h[0],g=m?m.x+m.width/2:(a.width??0)/2,y=m?m.y+m.height/2:a.height??0,v=(a.positionAbsolute?.x??0)+g,b=(a.positionAbsolute?.y??0)+y,w=m?.position,x=w?al[w]:null;if(!w||!x)return null;if(o)return c.createElement(o,{connectionLineType:r,connectionLineStyle:n,fromNode:a,fromHandle:m,fromX:v,fromY:b,toX:u,toY:d,fromPosition:w,toPosition:x,connectionStatus:i});let k="";const S={sourceX:v,sourceY:b,sourcePosition:w,targetX:u,targetY:d,targetPosition:x};return r===Oo.Bezier?[k]=Vo(S):r===Oo.Step?[k]=Lo({...S,borderRadius:0}):r===Oo.SmoothStep?[k]=Lo(S):r===Oo.SimpleBezier?[k]=Mo(S):k=`M${v},${b} ${u},${d}`,c.createElement("path",{d:k,fill:"none",className:"react-flow__connection-path",style:n})};ll.displayName="ConnectionLine";const sl=e=>({nodeId:e.connectionNodeId,handleType:e.connectionHandleType,nodesConnectable:e.nodesConnectable,connectionStatus:e.connectionStatus,width:e.width,height:e.height});function cl({containerStyle:e,style:t,type:n,component:r}){const{nodeId:o,handleType:i,nodesConnectable:a,width:l,height:s,connectionStatus:u}=Yr(sl,q);return!!(o&&i&&l&&a)?c.createElement("svg",{style:e,width:l,height:s,className:"react-flow__edges react-flow__connectionline react-flow__container"},c.createElement("g",{className:$(["react-flow__connection",u])},c.createElement(ll,{nodeId:o,handleType:i,style:t,type:n,CustomComponent:r,connectionStatus:u}))):null}function ul(e,t){s.useRef(null),Gr();return s.useMemo((()=>t(e)),[e])}const dl=({nodeTypes:e,edgeTypes:t,onMove:n,onMoveStart:r,onMoveEnd:o,onInit:i,onNodeClick:a,onEdgeClick:l,onNodeDoubleClick:u,onEdgeDoubleClick:d,onNodeMouseEnter:f,onNodeMouseMove:p,onNodeMouseLeave:h,onNodeContextMenu:m,onSelectionContextMenu:g,onSelectionStart:y,onSelectionEnd:v,connectionLineType:b,connectionLineStyle:w,connectionLineComponent:x,connectionLineContainerStyle:k,selectionKeyCode:S,selectionOnDrag:E,selectionMode:_,multiSelectionKeyCode:C,panActivationKeyCode:O,zoomActivationKeyCode:N,deleteKeyCode:P,onlyRenderVisibleElements:R,elementsSelectable:M,selectNodesOnDrag:T,defaultViewport:A,translateExtent:D,minZoom:I,maxZoom:L,preventScrolling:z,defaultMarkerColor:F,zoomOnScroll:j,zoomOnPinch:$,panOnScroll:B,panOnScrollSpeed:V,panOnScrollMode:H,zoomOnDoubleClick:U,panOnDrag:W,onPaneClick:q,onPaneMouseEnter:K,onPaneMouseMove:X,onPaneMouseLeave:Y,onPaneScroll:G,onPaneContextMenu:Q,onEdgeContextMenu:Z,onEdgeMouseEnter:J,onEdgeMouseMove:ee,onEdgeMouseLeave:te,onReconnect:ne,onReconnectStart:re,onReconnectEnd:oe,reconnectRadius:ie,noDragClassName:ae,noWheelClassName:le,noPanClassName:se,elevateEdgesOnSelect:ce,disableKeyboardA11y:ue,nodeOrigin:de,nodeExtent:fe,rfId:pe})=>{const he=ul(e,Ia),me=ul(t,Wa);return function(e){const t=Qi(),n=s.useRef(!1);s.useEffect((()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout((()=>e(t)),1),n.current=!0)}),[e,t.viewportInitialized])}(i),c.createElement(Da,{onPaneClick:q,onPaneMouseEnter:K,onPaneMouseMove:X,onPaneMouseLeave:Y,onPaneContextMenu:Q,onPaneScroll:G,deleteKeyCode:P,selectionKeyCode:S,selectionOnDrag:E,selectionMode:_,onSelectionStart:y,onSelectionEnd:v,multiSelectionKeyCode:C,panActivationKeyCode:O,zoomActivationKeyCode:N,elementsSelectable:M,onMove:n,onMoveStart:r,onMoveEnd:o,zoomOnScroll:j,zoomOnPinch:$,zoomOnDoubleClick:U,panOnScroll:B,panOnScrollSpeed:V,panOnScrollMode:H,panOnDrag:W,defaultViewport:A,translateExtent:D,minZoom:I,maxZoom:L,onSelectionContextMenu:g,preventScrolling:z,noDragClassName:ae,noWheelClassName:le,noPanClassName:se,disableKeyboardA11y:ue},c.createElement(il,null,c.createElement(rl,{edgeTypes:me,onEdgeClick:l,onEdgeDoubleClick:d,onlyRenderVisibleElements:R,onEdgeContextMenu:Z,onEdgeMouseEnter:J,onEdgeMouseMove:ee,onEdgeMouseLeave:te,onReconnect:ne,onReconnectStart:re,onReconnectEnd:oe,reconnectRadius:ie,defaultMarkerColor:F,noPanClassName:se,elevateEdgesOnSelect:!!ce,disableKeyboardA11y:ue,rfId:pe},c.createElement(cl,{style:w,type:b,component:x,containerStyle:k})),c.createElement("div",{className:"react-flow__edgelabel-renderer"}),c.createElement(Fa,{nodeTypes:he,onNodeClick:a,onNodeDoubleClick:u,onNodeMouseEnter:f,onNodeMouseMove:p,onNodeMouseLeave:h,onNodeContextMenu:m,selectNodesOnDrag:T,onlyRenderVisibleElements:R,noPanClassName:se,noDragClassName:ae,disableKeyboardA11y:ue,nodeOrigin:de,nodeExtent:fe,rfId:pe})))};dl.displayName="GraphView";var fl=s.memo(dl);const pl=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],hl={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:pl,nodeExtent:pl,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:Eo.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:(e,t)=>{},isValidConnection:void 0},ml=()=>((e,t)=>e?W(e,t):W)(((e,t)=>({...hl,setNodes:n=>{const{nodeInternals:r,nodeOrigin:o,elevateNodesOnSelect:i}=t();e({nodeInternals:Hi(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?Hi(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:l,domNode:s,nodeOrigin:c}=t(),u=s?.querySelector(".react-flow__viewport");if(!u)return;const d=window.getComputedStyle(u),{m22:f}=new window.DOMMatrixReadOnly(d.transform),p=n.reduce(((e,t)=>{const n=o.get(t.id);if(n?.hidden)o.set(n.id,{...n,[ho]:{...n[ho],handleBounds:void 0}});else if(n){const r=to(t.nodeElement);!(!r.width||!r.height||n.width===r.width&&n.height===r.height&&!t.forceUpdate)&&(o.set(n.id,{...n,[ho]:{...n[ho],handleBounds:{source:ka(".source",t.nodeElement,f,c),target:ka(".target",t.nodeElement,f,c)}},...r}),e.push({id:n.id,type:"dimensions",dimensions:r}))}return e}),[]);Vi(o,c);const h=a||i&&!a&&Ui(t,{initial:!0,...l});e({nodeInternals:new Map(o),fitViewOnInitDone:h}),p?.length>0&&r?.(p)},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:l,elevateNodesOnSelect:s}=t();if(n?.length){if(i){const t=Hi(ua(n,l()),o,a,s);e({nodeInternals:t})}r?.(n)}},addSelectedNodes:n=>{const{multiSelectionActive:r,edges:o,getNodes:i}=t();let a,l=null;r?a=n.map((e=>fa(e,!0))):(a=pa(i(),n),l=pa(o,[])),Ki({changedNodes:a,changedEdges:l,get:t,set:e})},addSelectedEdges:n=>{const{multiSelectionActive:r,edges:o,getNodes:i}=t();let a,l=null;r?a=n.map((e=>fa(e,!0))):(a=pa(o,n),l=pa(i(),[])),Ki({changedNodes:l,changedEdges:a,get:t,set:e})},unselectNodesAndEdges:({nodes:n,edges:r}={})=>{const{edges:o,getNodes:i}=t(),a=r||o;Ki({changedNodes:(n||i()).map((e=>(e.selected=!1,fa(e.id,!1)))),changedEdges:a.map((e=>fa(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();Ki({changedNodes:r().filter((e=>e.selected)).map((e=>fa(e.id,!1))),changedEdges:n.filter((e=>e.selected)).map((e=>fa(e.id,!1))),get:t,set:e})},setNodeExtent:n=>{const{nodeInternals:r}=t();r.forEach((e=>{e.positionAbsolute=ro(e.position,n)})),e({nodeExtent:n,nodeInternals:new Map(r)})},panBy:e=>{const{transform:n,width:r,height:o,d3Zoom:i,d3Selection:a,translateExtent:l}=t();if(!i||!a||!e.x&&!e.y)return!1;const s=wr.translate(n[0]+e.x,n[1]+e.y).scale(n[2]),c=[[0,0],[r,o]],u=i?.constrain()(s,c,l);i.transform(a,u);return n[0]!==u.x||n[1]!==u.y||n[2]!==u.k},cancelConnection:()=>e({connectionNodeId:hl.connectionNodeId,connectionHandleId:hl.connectionHandleId,connectionHandleType:hl.connectionHandleType,connectionStatus:hl.connectionStatus,connectionStartHandle:hl.connectionStartHandle,connectionEndHandle:hl.connectionEndHandle}),reset:()=>e({...hl})})),Object.is),gl=({children:e})=>{const t=s.useRef(null);return t.current||(t.current=ml()),c.createElement(jr,{value:t.current},e)};gl.displayName="ReactFlowProvider";const yl=({children:e})=>s.useContext(Fr)?c.createElement(c.Fragment,null,e):c.createElement(gl,null,e);yl.displayName="ReactFlowWrapper";const vl={input:yi,default:mi,output:bi,group:wi},bl={default:Ho,straight:jo,step:Fo,smoothstep:zo,simplebezier:To},wl=[0,0],xl=[15,15],kl={x:0,y:0,zoom:1},Sl={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},El=s.forwardRef((({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:o,nodeTypes:i=vl,edgeTypes:a=bl,onNodeClick:l,onEdgeClick:s,onInit:u,onMove:d,onMoveStart:f,onMoveEnd:p,onConnect:h,onConnectStart:m,onConnectEnd:g,onClickConnectStart:y,onClickConnectEnd:v,onNodeMouseEnter:b,onNodeMouseMove:w,onNodeMouseLeave:x,onNodeContextMenu:k,onNodeDoubleClick:S,onNodeDragStart:E,onNodeDrag:_,onNodeDragStop:C,onNodesDelete:O,onEdgesDelete:N,onSelectionChange:P,onSelectionDragStart:R,onSelectionDrag:M,onSelectionDragStop:T,onSelectionContextMenu:A,onSelectionStart:D,onSelectionEnd:I,connectionMode:L=Eo.Strict,connectionLineType:z=Oo.Bezier,connectionLineStyle:F,connectionLineComponent:j,connectionLineContainerStyle:B,deleteKeyCode:V="Backspace",selectionKeyCode:H="Shift",selectionOnDrag:U=!1,selectionMode:W=Co.Full,panActivationKeyCode:q="Space",multiSelectionKeyCode:K=(bo()?"Meta":"Control"),zoomActivationKeyCode:X=(bo()?"Meta":"Control"),snapToGrid:Y=!1,snapGrid:G=xl,onlyRenderVisibleElements:Q=!1,selectNodesOnDrag:Z=!0,nodesDraggable:J,nodesConnectable:ee,nodesFocusable:te,nodeOrigin:ne=wl,edgesFocusable:re,edgesUpdatable:oe,elementsSelectable:ie,defaultViewport:ae=kl,minZoom:le=.5,maxZoom:se=2,translateExtent:ce=pl,preventScrolling:ue=!0,nodeExtent:de,defaultMarkerColor:fe="#b1b1b7",zoomOnScroll:pe=!0,zoomOnPinch:he=!0,panOnScroll:me=!1,panOnScrollSpeed:ge=.5,panOnScrollMode:ye=_o.Free,zoomOnDoubleClick:ve=!0,panOnDrag:be=!0,onPaneClick:we,onPaneMouseEnter:xe,onPaneMouseMove:ke,onPaneMouseLeave:Se,onPaneScroll:Ee,onPaneContextMenu:_e,children:Ce,onEdgeContextMenu:Oe,onEdgeDoubleClick:Ne,onEdgeMouseEnter:Pe,onEdgeMouseMove:Re,onEdgeMouseLeave:Me,onEdgeUpdate:Te,onEdgeUpdateStart:Ae,onEdgeUpdateEnd:De,onReconnect:Ie,onReconnectStart:Le,onReconnectEnd:ze,reconnectRadius:Fe=10,edgeUpdaterRadius:je=10,onNodesChange:$e,onEdgesChange:Be,noDragClassName:Ve="nodrag",noWheelClassName:He="nowheel",noPanClassName:Ue="nopan",fitView:We=!1,fitViewOptions:qe,connectOnClick:Ke=!0,attributionPosition:Xe,proOptions:Ye,defaultEdgeOptions:Ge,elevateNodesOnSelect:Qe=!0,elevateEdgesOnSelect:Ze=!1,disableKeyboardA11y:Je=!1,autoPanOnConnect:et=!0,autoPanOnNodeDrag:tt=!0,connectionRadius:nt=20,isValidConnection:rt,onError:ot,style:it,id:at,nodeDragThreshold:lt,...st},ct)=>{const ut=at||"1";return c.createElement("div",{...st,style:{...it,...Sl},ref:ct,className:$(["react-flow",o]),"data-testid":"rf__wrapper",id:at},c.createElement(yl,null,c.createElement(fl,{onInit:u,onMove:d,onMoveStart:f,onMoveEnd:p,onNodeClick:l,onEdgeClick:s,onNodeMouseEnter:b,onNodeMouseMove:w,onNodeMouseLeave:x,onNodeContextMenu:k,onNodeDoubleClick:S,nodeTypes:i,edgeTypes:a,connectionLineType:z,connectionLineStyle:F,connectionLineComponent:j,connectionLineContainerStyle:B,selectionKeyCode:H,selectionOnDrag:U,selectionMode:W,deleteKeyCode:V,multiSelectionKeyCode:K,panActivationKeyCode:q,zoomActivationKeyCode:X,onlyRenderVisibleElements:Q,selectNodesOnDrag:Z,defaultViewport:ae,translateExtent:ce,minZoom:le,maxZoom:se,preventScrolling:ue,zoomOnScroll:pe,zoomOnPinch:he,zoomOnDoubleClick:ve,panOnScroll:me,panOnScrollSpeed:ge,panOnScrollMode:ye,panOnDrag:be,onPaneClick:we,onPaneMouseEnter:xe,onPaneMouseMove:ke,onPaneMouseLeave:Se,onPaneScroll:Ee,onPaneContextMenu:_e,onSelectionContextMenu:A,onSelectionStart:D,onSelectionEnd:I,onEdgeContextMenu:Oe,onEdgeDoubleClick:Ne,onEdgeMouseEnter:Pe,onEdgeMouseMove:Re,onEdgeMouseLeave:Me,onReconnect:Ie??Te,onReconnectStart:Le??Ae,onReconnectEnd:ze??De,reconnectRadius:Fe??je,defaultMarkerColor:fe,noDragClassName:Ve,noWheelClassName:He,noPanClassName:Ue,elevateEdgesOnSelect:Ze,rfId:ut,disableKeyboardA11y:Je,nodeOrigin:ne,nodeExtent:de}),c.createElement(Ri,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:h,onConnectStart:m,onConnectEnd:g,onClickConnectStart:y,onClickConnectEnd:v,nodesDraggable:J,nodesConnectable:ee,nodesFocusable:te,edgesFocusable:re,edgesUpdatable:oe,elementsSelectable:ie,elevateNodesOnSelect:Qe,minZoom:le,maxZoom:se,nodeExtent:de,onNodesChange:$e,onEdgesChange:Be,snapToGrid:Y,snapGrid:G,connectionMode:L,translateExtent:ce,connectOnClick:Ke,defaultEdgeOptions:Ge,fitView:We,fitViewOptions:qe,onNodesDelete:O,onEdgesDelete:N,onNodeDragStart:E,onNodeDrag:_,onNodeDragStop:C,onSelectionDrag:M,onSelectionDragStart:R,onSelectionDragStop:T,noPanClassName:Ue,nodeOrigin:ne,rfId:ut,autoPanOnConnect:et,autoPanOnNodeDrag:tt,onError:ot,connectionRadius:nt,isValidConnection:rt,nodeDragThreshold:lt}),c.createElement(Ci,{onSelectionChange:P}),Ce,c.createElement(Jr,{proOptions:Ye,position:Xe}),c.createElement(zi,{rfId:ut,disableKeyboardA11y:Je})))}));El.displayName="ReactFlow";const _l=e=>e.getNodes();const Cl=e=>e.edges;const Ol=({id:e,x:t,y:n,width:r,height:o,style:i,color:a,strokeColor:l,strokeWidth:s,className:u,borderRadius:d,shapeRendering:f,onClick:p,selected:h})=>{const{background:m,backgroundColor:g}=i||{},y=a||m||g;return c.createElement("rect",{className:$(["react-flow__minimap-node",{selected:h},u]),x:t,y:n,rx:d,ry:d,width:r,height:o,fill:y,stroke:l,strokeWidth:s,shapeRendering:f,onClick:p?t=>p(t,e):void 0})};Ol.displayName="MiniMapNode";var Nl=s.memo(Ol);const Pl=e=>e.nodeOrigin,Rl=e=>e.getNodes().filter((e=>!e.hidden&&e.width&&e.height)),Ml=e=>e instanceof Function?e:()=>e;var Tl=s.memo((function({nodeStrokeColor:e="transparent",nodeColor:t="#e2e2e2",nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:o=2,nodeComponent:i=Nl,onClick:a}){const l=Yr(Rl,q),s=Yr(Pl),u=Ml(t),d=Ml(e),f=Ml(n),p="undefined"==typeof window||window.chrome?"crispEdges":"geometricPrecision";return c.createElement(c.Fragment,null,l.map((e=>{const{x:t,y:n}=Go(e,s).positionAbsolute;return c.createElement(i,{key:e.id,x:t,y:n,width:e.width,height:e.height,style:e.style,selected:e.selected,className:f(e),color:u(e),borderRadius:r,strokeColor:d(e),strokeWidth:o,shapeRendering:p,onClick:a,id:e.id})})))}));const Al=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=Qo(t,e.nodeOrigin),o=n,co(lo(so(r),so(o)))):n,rfId:e.rfId};var r,o};function Dl({style:e,className:t,nodeStrokeColor:n="transparent",nodeColor:r="#e2e2e2",nodeClassName:o="",nodeBorderRadius:i=5,nodeStrokeWidth:a=2,nodeComponent:l,maskColor:u="rgb(240, 240, 240, 0.6)",maskStrokeColor:d="none",maskStrokeWidth:f=1,position:p="bottom-right",onClick:h,onNodeClick:m,pannable:g=!1,zoomable:y=!1,ariaLabel:v="React Flow mini map",inversePan:b=!1,zoomStep:w=10,offsetScale:x=5}){const k=Gr(),S=s.useRef(null),{boundingRect:E,viewBB:_,rfId:C}=Yr(Al,q),O=e?.width??200,N=e?.height??150,P=E.width/O,R=E.height/N,M=Math.max(P,R),T=M*O,A=M*N,D=x*M,I=E.x-(T-E.width)/2-D,L=E.y-(A-E.height)/2-D,z=T+2*D,F=A+2*D,j=`react-flow__minimap-desc-${C}`,B=s.useRef(0);B.current=M,s.useEffect((()=>{if(S.current){const e=ut(S.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)*w,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 l=B.current*Math.max(1,t[2])*(b?-1:1),s={x:t[0]-e.sourceEvent.movementX*l,y:t[1]-e.sourceEvent.movementY*l},c=[[0,0],[i,a]],u=wr.translate(s.x,s.y).scale(t[2]),d=r.constrain()(u,c,o);r.transform(n,d)},r=Pr().on("zoom",g?n:null).on("zoom.wheel",y?t:null);return e.call(r),()=>{e.on("zoom",null)}}}),[g,y,b,w]);const V=h?e=>{const t=dt(e);h(e,{x:t[0],y:t[1]})}:void 0,H=m?(e,t)=>{const n=k.getState().nodeInternals.get(t);m(e,n)}:void 0;return c.createElement(Zr,{position:p,style:e,className:$(["react-flow__minimap",t]),"data-testid":"rf__minimap"},c.createElement("svg",{width:O,height:N,viewBox:`${I} ${L} ${z} ${F}`,role:"img","aria-labelledby":j,ref:S,onClick:V},v&&c.createElement("title",{id:j},v),c.createElement(Tl,{onClick:H,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:i,nodeClassName:o,nodeStrokeWidth:a,nodeComponent:l}),c.createElement("path",{className:"react-flow__minimap-mask",d:`M${I-D},${L-D}h${z+2*D}v${F+2*D}h${-z-2*D}z\n M${_.x},${_.y}h${_.width}v${_.height}h${-_.width}z`,fill:u,fillRule:"evenodd",stroke:d,strokeWidth:f,pointerEvents:"none"})))}Dl.displayName="MiniMap";var Il,Ll=s.memo(Dl);function zl({color:e,dimensions:t,lineWidth:n}){return c.createElement("path",{stroke:e,strokeWidth:n,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`})}function Fl({color:e,radius:t}){return c.createElement("circle",{cx:t,cy:t,r:t,fill:e})}!function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"}(Il||(Il={}));const jl={[Il.Dots]:"#91919a",[Il.Lines]:"#eee",[Il.Cross]:"#e2e2e2"},$l={[Il.Dots]:1,[Il.Lines]:1,[Il.Cross]:6},Bl=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function Vl({id:e,variant:t=Il.Dots,gap:n=20,size:r,lineWidth:o=1,offset:i=2,color:a,style:l,className:u}){const d=s.useRef(null),{transform:f,patternId:p}=Yr(Bl,q),h=a||jl[t],m=r||$l[t],g=t===Il.Dots,y=t===Il.Cross,v=Array.isArray(n)?n:[n,n],b=[v[0]*f[2]||1,v[1]*f[2]||1],w=m*f[2],x=y?[w,w]:b,k=g?[w/i,w/i]:[x[0]/i,x[1]/i];return c.createElement("svg",{className:$(["react-flow__background",u]),style:{...l,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:d,"data-testid":"rf__background"},c.createElement("pattern",{id:p+e,x:f[0]%b[0],y:f[1]%b[1],width:b[0],height:b[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${k[0]},-${k[1]})`},g?c.createElement(Fl,{color:h,radius:w/i}):c.createElement(zl,{dimensions:x,color:h,lineWidth:o})),c.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${p+e})`}))}Vl.displayName="Background";var Hl=s.memo(Vl);const Ul=({src_nid:e,src_ioid:t,trg_nid:n,trg_ioid:r})=>[`${e}:${t}`,`${n}:${r}`].sort().join("--"),Wl=0,ql=10,Kl=20,Xl=30,Yl=ql,Gl=e=>"string"==typeof e?e:e===Wl?"DEBUG":e===ql?"INFO":e===Kl?"WARN":e===Xl?"ERROR":"UNKNOWN";class Ql{constructor(e,t=ql){this.name=e,this.level=(e=>{if("number"==typeof e)return e;const t=e.toLowerCase();if("debug"===t)return Wl;if("info"===t)return ql;if("warn"===t||"warning"===t)return Kl;if("error"===t)return Xl;throw new Error(`Unknown log level: ${e}`)})(t),this._level_name=Gl(t)}set_level(e){this.level=e,this._level_name=Gl(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<=Wl&&console.debug(this._fomat_message(e,...t))}info(e,...t){this.level<=ql&&console.info(this._fomat_message(e,...t))}warn(e,...t){this.level<=Kl&&console.warn(this._fomat_message(e,...t))}error(e,...t){this.level<=Xl&&console.error(this._fomat_message(e,...t))}}const Zl=(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),Jl=(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=F(e)).id)throw new Error("Node must have an id");for(const t in e.io)e.io[t].node=e.id,Zl(e.io[t],n);return{position:{x:e.frontend.pos[0],y:e.frontend.pos[1]},data:{UseNodeStore:t},type:"default",...e}},es=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=>P(((t,n)=>F(j(e)))))(e.node),i.nodesstates.set(e.node.id,n)}catch(e){return void l.logger.error(`Failed to create node store ${e}`)}const r=n.getState();l.logger.info("Add node",r.id,r.name);const a=[...t.nodes,Jl(r,n,l)];o.setState({nodes:a});for(const t in e.node.io){const n=e.node.io[t].id;void 0!==n&&l.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;j(e.node);const n=t.getState(),{new_obj:r,change:o}=T(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)}}Jl(r,t,l),l.logger.debug("update_action",r),t.setState(F(r))}}else l.worker&&l.worker.locally_update_node(e)})(e);break;case"delete":(e=>{l.logger.info("Deleting node",e.id),e.from_remote?o.getState().onNodesChange([{type:"remove",id:e.id}]):l.worker?.remove_node(e.id)})(e);break;case"error":(e=>{l.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}):l.worker?.trigger_node(e.id)})(e);break;default:l.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=P(((e,t)=>({nodes:[],edges:[],onNodesChange:n=>{e({nodes:ua(n,t().nodes)}),r(n)},onEdgesChange:n=>{e({edges:da(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&&l.worker&&l.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:P(((e,t)=>({lib:{shelves:[]},external_worker:[],set:t=>e((e=>({...e,...t}))),get_lib:()=>t().lib,get_external_worker:()=>t().external_worker})))},l={local_settings:P(((e,t)=>({view_settings:{expand_node_props:!1},update_view_settings:e=>{const t=l.local_settings.getState().view_settings,{new_obj:n,change:r}=T(t,e);r&&l.local_settings.setState((e=>({...e,view_settings:n})))}}))),local_state:P(((e,t)=>({selected_nodes:[],selected_edges:[]}))),options:t,lib:a,workermanager:void 0,workers:P(((e,t)=>({}))),workerstate:P(((e,t)=>({is_open:!1}))),render_options:P(((e,t)=>({}))),progress_state:P(((e,t)=>({message:"please select worker",status:"info",progress:0,blocking:!1}))),update_render_options:e=>{const t=l.render_options.getState(),{new_obj:n,change:r}=T(t,e);r&&l.render_options.setState(n)},worker:void 0,_unsubscribeFromWorker:void 0,set_worker:e=>{e!==l.worker&&(l._unsubscribeFromWorker&&(l._unsubscribeFromWorker(),l._unsubscribeFromWorker=void 0),e&&(l._unsubscribeFromWorker=e.state.subscribe((e=>{l.workerstate.setState(e)})),l.workerstate.setState(e.state.getState())),l.worker=e,e?.set_zustand(l))},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=Ul(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"};l.logger.info("Adding edge",i),o.setState({edges:[...n,i]}),l.worker?.get_remote_node_state(e.src_nid),l.worker?.get_remote_node_state(e.trg_nid)}break;case"delete":if(e.from_remote){const n=t.edges,r=Ul(e);l.logger.info("Deleting edge",r);const i=n.filter((e=>e.id!==r));o.setState({edges:i}),l.worker?.get_remote_node_state(e.src_nid),l.worker?.get_remote_node_state(e.trg_nid)}break;default:l.logger.error("Unknown edge action",e)}},reactflowRef:null,clear_all:()=>{l.worker?.disconnect(),l.set_worker(void 0),l.workermanager?.setWorker(void 0),l.lib.libstate.getState().set({lib:{shelves:[]},external_worker:[]}),l.nodespace.nodesstates.clear(),l.useReactFlowStore.setState({nodes:[],edges:[]}),l.auto_progress()},set_progress:e=>{if(""===e.message)return l.auto_progress();const t=l.progress_state.getState(),{new_obj:n,change:r}=T(t,e);r&&l.progress_state.setState(n)},auto_progress:()=>void 0===l.workermanager||l.workermanager.open?void 0===l.worker?l.set_progress({progress:0,message:"please select worker",status:"error",blocking:!1}):l.worker.is_open?void l.set_progress({progress:1,message:"running",status:"info",blocking:!1}):l.set_progress({progress:0,message:"connecting to worker",status:"info",blocking:!0}):l.set_progress({progress:0,message:"connecting to worker manager",status:"error",blocking:!1}),plugins:P(((e,t)=>({}))),add_plugin:(e,t)=>{void 0!==t&&l.plugins.setState((n=>({...n,[e]:t})))},dev_settings:{debug:!0},logger:new Ql("fn",Yl)};return l};function ts(e,t){return function(){return e.apply(t,arguments)}}const{toString:ns}=Object.prototype,{getPrototypeOf:rs}=Object,os=(e=>t=>{const n=ns.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),is=e=>(e=e.toLowerCase(),t=>os(t)===e),as=e=>t=>typeof t===e,{isArray:ls}=Array,ss=as("undefined");const cs=is("ArrayBuffer");const us=as("string"),ds=as("function"),fs=as("number"),ps=e=>null!==e&&"object"==typeof e,hs=e=>{if("object"!==os(e))return!1;const t=rs(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},ms=is("Date"),gs=is("File"),ys=is("Blob"),vs=is("FileList"),bs=is("URLSearchParams"),[ws,xs,ks,Ss]=["ReadableStream","Request","Response","Headers"].map(is);function Es(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),ls(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 _s(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 Cs="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:window,Os=e=>!ss(e)&&e!==Cs;const Ns=(Ps="undefined"!=typeof Uint8Array&&rs(Uint8Array),e=>Ps&&e instanceof Ps);var Ps;const Rs=is("HTMLFormElement"),Ms=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Ts=is("RegExp"),As=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Es(n,((n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)})),Object.defineProperties(e,r)},Ds="abcdefghijklmnopqrstuvwxyz",Is="0123456789",Ls={DIGIT:Is,ALPHA:Ds,ALPHA_DIGIT:Ds+Ds.toUpperCase()+Is};const zs=is("AsyncFunction"),Fs=(js="function"==typeof setImmediate,$s=ds(Cs.postMessage),js?setImmediate:$s?((e,t)=>(Cs.addEventListener("message",(({source:n,data:r})=>{n===Cs&&r===e&&t.length&&t.shift()()}),!1),n=>{t.push(n),Cs.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e));var js,$s;const Bs="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Cs):"undefined"!=typeof process&&process.nextTick||Fs;var Vs={isArray:ls,isArrayBuffer:cs,isBuffer:function(e){return null!==e&&!ss(e)&&null!==e.constructor&&!ss(e.constructor)&&ds(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||ds(e.append)&&("formdata"===(t=os(e))||"object"===t&&ds(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&cs(e.buffer),t},isString:us,isNumber:fs,isBoolean:e=>!0===e||!1===e,isObject:ps,isPlainObject:hs,isReadableStream:ws,isRequest:xs,isResponse:ks,isHeaders:Ss,isUndefined:ss,isDate:ms,isFile:gs,isBlob:ys,isRegExp:Ts,isFunction:ds,isStream:e=>ps(e)&&ds(e.pipe),isURLSearchParams:bs,isTypedArray:Ns,isFileList:vs,forEach:Es,merge:function e(){const{caseless:t}=Os(this)&&this||{},n={},r=(r,o)=>{const i=t&&_s(n,o)||o;hs(n[i])&&hs(r)?n[i]=e(n[i],r):hs(r)?n[i]=e({},r):ls(r)?n[i]=r.slice():n[i]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&Es(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(Es(t,((t,r)=>{n&&ds(t)?e[r]=ts(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 l={};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)||l[a]||(t[a]=e[a],l[a]=!0);e=!1!==n&&rs(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:os,kindOfTest:is,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(ls(e))return e;let t=e.length;if(!fs(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:Rs,hasOwnProperty:Ms,hasOwnProp:Ms,reduceDescriptors:As,freezeMethods:e=>{As(e,((t,n)=>{if(ds(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];ds(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 ls(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:_s,window:Cs,isContextDefined:Os,ALPHABET:Ls,generateString:(e=16,t=Ls.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&ds(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(ps(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=ls(e)?[]:{};return Es(e,((e,t)=>{const i=n(e,r+1);!ss(i)&&(o[t]=i)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:zs,isThenable:e=>e&&(ps(e)||ds(e))&&ds(e.then)&&ds(e.catch),setImmediate:Fs,asap:Bs};function Hs(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)}Vs.inherits(Hs,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:Vs.toJSONObject(this.config),code:this.code,status:this.status}}});const Us=Hs.prototype,Ws={};["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=>{Ws[e]={value:e}})),Object.defineProperties(Hs,Ws),Object.defineProperty(Us,"isAxiosError",{value:!0}),Hs.from=(e,t,n,r,o,i)=>{const a=Object.create(Us);return Vs.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),Hs.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};function qs(e){return Vs.isPlainObject(e)||Vs.isArray(e)}function Ks(e){return Vs.endsWith(e,"[]")?e.slice(0,-2):e}function Xs(e,t,n){return e?e.concat(t).map((function(e,t){return e=Ks(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const Ys=Vs.toFlatObject(Vs,{},null,(function(e){return/^is[A-Z]/.test(e)}));function Gs(e,t,n){if(!Vs.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=Vs.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!Vs.isUndefined(t[e])}))).metaTokens,o=n.visitor||c,i=n.dots,a=n.indexes,l=(n.Blob||"undefined"!=typeof Blob&&Blob)&&Vs.isSpecCompliantForm(t);if(!Vs.isFunction(o))throw new TypeError("visitor must be a function");function s(e){if(null===e)return"";if(Vs.isDate(e))return e.toISOString();if(!l&&Vs.isBlob(e))throw new Hs("Blob is not supported. Use a Buffer instead.");return Vs.isArrayBuffer(e)||Vs.isTypedArray(e)?l&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,o){let l=e;if(e&&!o&&"object"==typeof e)if(Vs.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(Vs.isArray(e)&&function(e){return Vs.isArray(e)&&!e.some(qs)}(e)||(Vs.isFileList(e)||Vs.endsWith(n,"[]"))&&(l=Vs.toArray(e)))return n=Ks(n),l.forEach((function(e,r){!Vs.isUndefined(e)&&null!==e&&t.append(!0===a?Xs([n],r,i):null===a?n:n+"[]",s(e))})),!1;return!!qs(e)||(t.append(Xs(o,n,i),s(e)),!1)}const u=[],d=Object.assign(Ys,{defaultVisitor:c,convertValue:s,isVisitable:qs});if(!Vs.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!Vs.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),Vs.forEach(n,(function(n,i){!0===(!(Vs.isUndefined(n)||null===n)&&o.call(t,n,Vs.isString(i)?i.trim():i,r,d))&&e(n,r?r.concat(i):[i])})),u.pop()}}(e),t}function Qs(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Zs(e,t){this._pairs=[],e&&Gs(e,this,t)}const Js=Zs.prototype;function ec(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function tc(e,t,n){if(!t)return e;const r=n&&n.encode||ec;Vs.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(i=o?o(t,n):Vs.isURLSearchParams(t)?t.toString():new Zs(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}Js.append=function(e,t){this._pairs.push([e,t])},Js.toString=function(e){const t=e?function(t){return e.call(this,t,Qs)}:Qs;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};class nc{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){Vs.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}var rc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},oc={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Zs,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const ic="undefined"!=typeof window&&"undefined"!=typeof document,ac="object"==typeof navigator&&navigator||void 0,lc=ic&&(!ac||["ReactNative","NativeScript","NS"].indexOf(ac.product)<0),sc="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,cc=ic&&window.location.href||"http://localhost";var uc={...Object.freeze({__proto__:null,hasBrowserEnv:ic,hasStandardBrowserEnv:lc,hasStandardBrowserWebWorkerEnv:sc,navigator:ac,origin:cc}),...oc};function dc(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),l=o>=e.length;if(i=!i&&Vs.isArray(r)?r.length:i,l)return Vs.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a;r[i]&&Vs.isObject(r[i])||(r[i]=[]);return t(e,n,r[i],o)&&Vs.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(Vs.isFormData(e)&&Vs.isFunction(e.entries)){const n={};return Vs.forEachEntry(e,((e,r)=>{t(function(e){return Vs.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null}const fc={transitional:rc,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=Vs.isObject(e);o&&Vs.isHTMLForm(e)&&(e=new FormData(e));if(Vs.isFormData(e))return r?JSON.stringify(dc(e)):e;if(Vs.isArrayBuffer(e)||Vs.isBuffer(e)||Vs.isStream(e)||Vs.isFile(e)||Vs.isBlob(e)||Vs.isReadableStream(e))return e;if(Vs.isArrayBufferView(e))return e.buffer;if(Vs.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 Gs(e,new uc.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return uc.isNode&&Vs.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=Vs.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Gs(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(Vs.isString(e))try{return(t||JSON.parse)(e),Vs.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||fc.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(Vs.isResponse(e)||Vs.isReadableStream(e))return e;if(e&&Vs.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 Hs.from(e,Hs.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:uc.classes.FormData,Blob:uc.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Vs.forEach(["delete","get","head","post","put","patch"],(e=>{fc.headers[e]={}}));const pc=Vs.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 hc=Symbol("internals");function mc(e){return e&&String(e).trim().toLowerCase()}function gc(e){return!1===e||null==e?e:Vs.isArray(e)?e.map(gc):String(e)}function yc(e,t,n,r,o){return Vs.isFunction(r)?r.call(this,t,n):(o&&(t=n),Vs.isString(t)?Vs.isString(r)?-1!==t.indexOf(r):Vs.isRegExp(r)?r.test(t):void 0:void 0)}let vc=class{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=mc(t);if(!o)throw new Error("header name must be a non-empty string");const i=Vs.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=gc(e))}const i=(e,t)=>Vs.forEach(e,((e,n)=>o(e,n,t)));if(Vs.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(Vs.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]&&pc[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(Vs.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=mc(e)){const n=Vs.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(Vs.isFunction(t))return t.call(this,e,n);if(Vs.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=mc(e)){const n=Vs.findKey(this,e);return!(!n||void 0===this[n]||t&&!yc(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=mc(e)){const o=Vs.findKey(n,e);!o||t&&!yc(0,n[o],o,t)||(delete n[o],r=!0)}}return Vs.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&&!yc(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return Vs.forEach(this,((r,o)=>{const i=Vs.findKey(n,o);if(i)return t[i]=gc(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]=gc(r),n[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Vs.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&Vs.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[hc]=this[hc]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=mc(e);t[r]||(!function(e,t){const n=Vs.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 Vs.isArray(e)?e.forEach(r):r(e),this}};function bc(e,t){const n=this||fc,r=t||n,o=vc.from(r.headers);let i=r.data;return Vs.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function wc(e){return!(!e||!e.__CANCEL__)}function xc(e,t,n){Hs.call(this,null==e?"canceled":e,Hs.ERR_CANCELED,t,n),this.name="CanceledError"}function kc(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Hs("Request failed with status code "+n.status,[Hs.ERR_BAD_REQUEST,Hs.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}vc.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Vs.reduceDescriptors(vc.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),Vs.freezeMethods(vc),Vs.inherits(xc,Hs,{__CANCEL__:!0});const Sc=(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(l){const s=Date.now(),c=r[a];o||(o=s),n[i]=l,r[i]=s;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),s-o<t)return;const f=c&&s-c;return f?Math.round(1e3*d/f):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(),l=t-o;l>=i?a(e,t):(n=e,r||(r=setTimeout((()=>{r=null,a(n)}),i-l)))},()=>n&&a(n)]}((n=>{const i=n.loaded,a=n.lengthComputable?n.total:void 0,l=i-r,s=o(l);r=i;e({loaded:i,total:a,progress:a?i/a:void 0,bytes:l,rate:s||void 0,estimated:s&&a&&i<=a?(a-i)/s:void 0,event:n,lengthComputable:null!=a,[t?"download":"upload"]:!0})}),n)},Ec=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},_c=e=>(...t)=>Vs.asap((()=>e(...t)));var Cc=uc.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,uc.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(uc.origin),uc.navigator&&/(msie|trident)/i.test(uc.navigator.userAgent)):()=>!0,Oc=uc.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const a=[e+"="+encodeURIComponent(t)];Vs.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),Vs.isString(r)&&a.push("path="+r),Vs.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 Nc(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 Pc=e=>e instanceof vc?{...e}:e;function Rc(e,t){t=t||{};const n={};function r(e,t,n,r){return Vs.isPlainObject(e)&&Vs.isPlainObject(t)?Vs.merge.call({caseless:r},e,t):Vs.isPlainObject(t)?Vs.merge({},t):Vs.isArray(t)?t.slice():t}function o(e,t,n,o){return Vs.isUndefined(t)?Vs.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function i(e,t){if(!Vs.isUndefined(t))return r(void 0,t)}function a(e,t){return Vs.isUndefined(t)?Vs.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function l(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const s={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:l,headers:(e,t,n)=>o(Pc(e),Pc(t),0,!0)};return Vs.forEach(Object.keys(Object.assign({},e,t)),(function(r){const i=s[r]||o,a=i(e[r],t[r],r);Vs.isUndefined(a)&&i!==l||(n[r]=a)})),n}var Mc=e=>{const t=Rc({},e);let n,{data:r,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:a,headers:l,auth:s}=t;if(t.headers=l=vc.from(l),t.url=tc(Nc(t.baseURL,t.url),e.params,e.paramsSerializer),s&&l.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),Vs.isFormData(r))if(uc.hasStandardBrowserEnv||uc.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if(!1!==(n=l.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];l.setContentType([e||"multipart/form-data",...t].join("; "))}if(uc.hasStandardBrowserEnv&&(o&&Vs.isFunction(o)&&(o=o(t)),o||!1!==o&&Cc(t.url))){const e=i&&a&&Oc.read(a);e&&l.set(i,e)}return t};var Tc="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=Mc(e);let o=r.data;const i=vc.from(r.headers).normalize();let a,l,s,c,u,{responseType:d,onUploadProgress:f,onDownloadProgress:p}=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=vc.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());kc((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 Hs("Request aborted",Hs.ECONNABORTED,e,m)),m=null)},m.onerror=function(){n(new Hs("Network Error",Hs.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||rc;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Hs(t,o.clarifyTimeoutError?Hs.ETIMEDOUT:Hs.ECONNABORTED,e,m)),m=null},void 0===o&&i.setContentType(null),"setRequestHeader"in m&&Vs.forEach(i.toJSON(),(function(e,t){m.setRequestHeader(t,e)})),Vs.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),d&&"json"!==d&&(m.responseType=r.responseType),p&&([s,u]=Sc(p,!0),m.addEventListener("progress",s)),f&&m.upload&&([l,c]=Sc(f),m.upload.addEventListener("progress",l),m.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(a=t=>{m&&(n(!t||t.type?new xc(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===uc.protocols.indexOf(y)?n(new Hs("Unsupported protocol "+y+":",Hs.ERR_BAD_REQUEST,e)):m.send(o||null)}))};const Ac=(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 Hs?t:new xc(t instanceof Error?t.message:t))}};let i=t&&setTimeout((()=>{i=null,o(new Hs(`timeout ${t} of ms exceeded`,Hs.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:l}=r;return l.unsubscribe=()=>Vs.asap(a),l}},Dc=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},Ic=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()}},Lc=(e,t,n,r)=>{const o=async function*(e,t){for await(const n of Ic(e))yield*Dc(n,t)}(e,t);let i,a=0,l=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 l(),void e.close();let i=r.byteLength;if(n){let e=a+=i;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw l(e),e}},cancel:e=>(l(e),o.return())},{highWaterMark:2})},zc="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Fc=zc&&"function"==typeof ReadableStream,jc=zc&&("function"==typeof TextEncoder?($c=new TextEncoder,e=>$c.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var $c;const Bc=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Vc=Fc&&Bc((()=>{let e=!1;const t=new Request(uc.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),Hc=Fc&&Bc((()=>Vs.isReadableStream(new Response("").body))),Uc={stream:Hc&&(e=>e.body)};var Wc;zc&&(Wc=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!Uc[e]&&(Uc[e]=Vs.isFunction(Wc[e])?t=>t[e]():(t,n)=>{throw new Hs(`Response type '${e}' is not supported`,Hs.ERR_NOT_SUPPORT,n)})})));const qc=async(e,t)=>{const n=Vs.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(Vs.isBlob(e))return e.size;if(Vs.isSpecCompliantForm(e)){const t=new Request(uc.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Vs.isArrayBufferView(e)||Vs.isArrayBuffer(e)?e.byteLength:(Vs.isURLSearchParams(e)&&(e+=""),Vs.isString(e)?(await jc(e)).byteLength:void 0)})(t):n};var Kc=zc&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:l,onUploadProgress:s,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:f}=Mc(e);c=c?(c+"").toLowerCase():"text";let p,h=Ac([o,i&&i.toAbortSignal()],a);const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let g;try{if(s&&Vc&&"get"!==n&&"head"!==n&&0!==(g=await qc(u,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(Vs.isFormData(r)&&(e=n.headers.get("content-type"))&&u.setContentType(e),n.body){const[e,t]=Ec(g,Sc(_c(s)));r=Lc(n.body,65536,e,t)}}Vs.isString(d)||(d=d?"include":"omit");const o="credentials"in Request.prototype;p=new Request(t,{...f,signal:h,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:o?d:void 0});let i=await fetch(p);const a=Hc&&("stream"===c||"response"===c);if(Hc&&(l||a&&m)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=i[t]}));const t=Vs.toFiniteNumber(i.headers.get("content-length")),[n,r]=l&&Ec(t,Sc(_c(l),!0))||[];i=new Response(Lc(i.body,65536,n,(()=>{r&&r(),m&&m()})),e)}c=c||"text";let y=await Uc[Vs.findKey(Uc,c)||"text"](i,e);return!a&&m&&m(),await new Promise(((t,n)=>{kc(t,n,{data:y,headers:vc.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:p})}))}catch(t){if(m&&m(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new Hs("Network Error",Hs.ERR_NETWORK,e,p),{cause:t.cause||t});throw Hs.from(t,t&&t.code,e,p)}});const Xc={http:null,xhr:Tc,fetch:Kc};Vs.forEach(Xc,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Yc=e=>`- ${e}`,Gc=e=>Vs.isFunction(e)||null===e||!1===e;var Qc=e=>{e=Vs.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,!Gc(n)&&(r=Xc[(t=String(n)).toLowerCase()],void 0===r))throw new Hs(`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 Hs("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Yc).join("\n"):" "+Yc(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function Zc(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new xc(null,e)}function Jc(e){Zc(e),e.headers=vc.from(e.headers),e.data=bc.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Qc(e.adapter||fc.adapter)(e).then((function(t){return Zc(e),t.data=bc.call(e,e.transformResponse,t),t.headers=vc.from(t.headers),t}),(function(t){return wc(t)||(Zc(e),t&&t.response&&(t.response.data=bc.call(e,e.transformResponse,t.response),t.response.headers=vc.from(t.response.headers))),Promise.reject(t)}))}const eu="1.7.9",tu={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{tu[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const nu={};tu.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 Hs(r(o," has been removed"+(t?" in "+t:"")),Hs.ERR_DEPRECATED);return t&&!nu[o]&&(nu[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)}},tu.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};var ru={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Hs("options must be an object",Hs.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 Hs("option "+i+" must be "+n,Hs.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Hs("Unknown option "+i,Hs.ERR_BAD_OPTION)}},validators:tu};const ou=ru.validators;let iu=class{constructor(e){this.defaults=e,this.interceptors={request:new nc,response:new nc}}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=Rc(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&ru.assertOptions(n,{silentJSONParsing:ou.transitional(ou.boolean),forcedJSONParsing:ou.transitional(ou.boolean),clarifyTimeoutError:ou.transitional(ou.boolean)},!1),null!=r&&(Vs.isFunction(r)?t.paramsSerializer={serialize:r}:ru.assertOptions(r,{encode:ou.function,serialize:ou.function},!0)),ru.assertOptions(t,{baseUrl:ou.spelling("baseURL"),withXsrfToken:ou.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&Vs.merge(o.common,o[t.method]);o&&Vs.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=vc.concat(i,o);const a=[];let l=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(l=l&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const s=[];let c;this.interceptors.response.forEach((function(e){s.push(e.fulfilled,e.rejected)}));let u,d=0;if(!l){const e=[Jc.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,s),u=e.length,c=Promise.resolve(t);d<u;)c=c.then(e[d++],e[d++]);return c}u=a.length;let f=t;for(d=0;d<u;){const e=a[d++],t=a[d++];try{f=e(f)}catch(e){t.call(this,e);break}}try{c=Jc.call(this,f)}catch(e){return Promise.reject(e)}for(d=0,u=s.length;d<u;)c=c.then(s[d++],s[d++]);return c}getUri(e){return tc(Nc((e=Rc(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}};Vs.forEach(["delete","get","head","options"],(function(e){iu.prototype[e]=function(t,n){return this.request(Rc(n||{},{method:e,url:t,data:(n||{}).data}))}})),Vs.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(Rc(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}iu.prototype[e]=t(),iu.prototype[e+"Form"]=t(!0)}));const au={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(au).forEach((([e,t])=>{au[t]=e}));const lu=function e(t){const n=new iu(t),r=ts(iu.prototype.request,n);return Vs.extend(r,iu.prototype,n,{allOwnKeys:!0}),Vs.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Rc(t,n))},r}(fc);lu.Axios=iu,lu.CanceledError=xc,lu.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 xc(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}}},lu.isCancel=wc,lu.VERSION=eu,lu.toFormData=Gs,lu.AxiosError=Hs,lu.Cancel=lu.CanceledError,lu.all=function(e){return Promise.all(e)},lu.spread=function(e){return function(t){return e.apply(null,t)}},lu.isAxiosError=function(e){return Vs.isObject(e)&&!0===e.isAxiosError},lu.mergeConfig=Rc,lu.AxiosHeaders=vc,lu.formToJSON=e=>dc(Vs.isHTMLForm(e)?new FormData(e):e),lu.getAdapter=Qc,lu.HttpStatusCode=au,lu.default=lu;const{Axios:su,AxiosError:cu,CanceledError:uu,isCancel:du,CancelToken:fu,VERSION:pu,all:hu,Cancel:mu,isAxiosError:gu,spread:yu,toFormData:vu,AxiosHeaders:bu,HttpStatusCode:wu,formToJSON:xu,getAdapter:ku,mergeConfig:Su}=lu;let Eu;const _u=new Uint8Array(16);function Cu(){if(!Eu&&(Eu="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Eu))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Eu(_u)}const Ou=[];for(let e=0;e<256;++e)Ou.push((e+256).toString(16).slice(1));var Nu={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Pu(e,t,n){if(Nu.randomUUID&&!e)return Nu.randomUUID();const r=(e=e||{}).random||(e.rng||Cu)();return r[6]=15&r[6]|64,r[8]=63&r[8]|128,function(e,t=0){return Ou[e[t+0]]+Ou[e[t+1]]+Ou[e[t+2]]+Ou[e[t+3]]+"-"+Ou[e[t+4]]+Ou[e[t+5]]+"-"+Ou[e[t+6]]+Ou[e[t+7]]+"-"+Ou[e[t+8]]+Ou[e[t+9]]+"-"+Ou[e[t+10]]+Ou[e[t+11]]+Ou[e[t+12]]+Ou[e[t+13]]+Ou[e[t+14]]+Ou[e[t+15]]}(r)}class Ru{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=P(((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),l=await import(a);URL.revokeObjectURL(a),this._zustand.add_plugin(t,l.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}=T(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||Pu();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 Mu extends Ru{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 lu.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 Tu{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 Mu({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 Au(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function Du(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Iu(...e){return t=>{let n=!1;const r=e.map((e=>{const r=Du(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():Du(e[t],null)}}}}function Lu(...e){return s.useCallback(Iu(...e),e)}var zu,Fu,ju={exports:{}},$u={};var Bu=(Fu||(Fu=1,ju.exports=function(){if(zu)return $u;zu=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 $u.Fragment=t,$u.jsx=n,$u.jsxs=n,$u}()),ju.exports);function Vu(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>s.createContext(e)));return function(n){const r=n?.[e]||t;return s.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=s.createContext(r),i=n.length;n=[...n,r];const a=t=>{const{scope:n,children:r,...a}=t,l=n?.[e]?.[i]||o,c=s.useMemo((()=>a),Object.values(a));return Bu.jsx(l.Provider,{value:c,children:r})};return a.displayName=t+"Provider",[a,function(n,a){const l=a?.[e]?.[i]||o,c=s.useContext(l);if(c)return c;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},Hu(r,...t)]}function Hu(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return s.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}var Uu=Boolean(globalThis?.document)?s.useLayoutEffect:()=>{},Wu=u["useId".toString()]||(()=>{}),qu=0;function Ku(e){const[t,n]=s.useState(Wu());return Uu((()=>{n((e=>e??String(qu++)))}),[e]),e||(t?`radix-${t}`:"")}function Xu(e){const t=s.useRef(e);return s.useEffect((()=>{t.current=e})),s.useMemo((()=>(...e)=>t.current?.(...e)),[])}function Yu({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=function({defaultProp:e,onChange:t}){const n=s.useState(e),[r]=n,o=s.useRef(r),i=Xu(t);return s.useEffect((()=>{o.current!==r&&(i(r),o.current=r)}),[r,o,i]),n}({defaultProp:t,onChange:n}),i=void 0!==e,a=i?e:r,l=Xu(n);return[a,s.useCallback((t=>{if(i){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[i,e,o,l])]}var Gu=s.forwardRef(((e,t)=>{const{children:n,...r}=e,o=s.Children.toArray(n),i=o.find(Ju);if(i){const e=i.props.children,n=o.map((t=>t===i?s.Children.count(e)>1?s.Children.only(null):s.isValidElement(e)?e.props.children:null:t));return Bu.jsx(Qu,{...r,ref:t,children:s.isValidElement(e)?s.cloneElement(e,void 0,n):null})}return Bu.jsx(Qu,{...r,ref:t,children:n})}));Gu.displayName="Slot";var Qu=s.forwardRef(((e,t)=>{const{children:n,...r}=e;if(s.isValidElement(n)){const e=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}(n),o=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}}(r,n.props);return n.type!==s.Fragment&&(o.ref=t?Iu(t,e):e),s.cloneElement(n,o)}return s.Children.count(n)>1?s.Children.only(null):null}));Qu.displayName="SlotClone";var Zu=({children:e})=>Bu.jsx(Bu.Fragment,{children:e});function Ju(e){return s.isValidElement(e)&&e.type===Zu}var ed=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const n=s.forwardRef(((e,n)=>{const{asChild:r,...o}=e,i=r?Gu:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),Bu.jsx(i,{...o,ref:n})}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function td(e,t){e&&Lr.flushSync((()=>e.dispatchEvent(t)))}var nd,rd="dismissableLayer.update",od="dismissableLayer.pointerDownOutside",id="dismissableLayer.focusOutside",ad=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ld=s.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:l,...c}=e,u=s.useContext(ad),[d,f]=s.useState(null),p=d?.ownerDocument??globalThis?.document,[,h]=s.useState({}),m=Lu(t,(e=>f(e))),g=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(y),b=d?g.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,x=b>=v,k=function(e,t=globalThis?.document){const n=Xu(e),r=s.useRef(!1),o=s.useRef((()=>{}));return s.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){ud(od,n,i,{discrete:!0})};const i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...u.branches].some((e=>e.contains(t)));x&&!n&&(o?.(e),a?.(e),e.defaultPrevented||l?.())}),p),S=function(e,t=globalThis?.document){const n=Xu(e),r=s.useRef(!1);return s.useEffect((()=>{const e=e=>{if(e.target&&!r.current){ud(id,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...u.branches].some((e=>e.contains(t)))||(i?.(e),a?.(e),e.defaultPrevented||l?.())}),p);return function(e,t=globalThis?.document){const n=Xu(e);s.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}((e=>{b===u.layers.size-1&&(r?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))}),p),s.useEffect((()=>{if(d)return n&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(nd=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),cd(),()=>{n&&1===u.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=nd)}}),[d,p,n,u]),s.useEffect((()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),cd())}),[d,u]),s.useEffect((()=>{const e=()=>h({});return document.addEventListener(rd,e),()=>document.removeEventListener(rd,e)}),[]),Bu.jsx(ed.div,{...c,ref:m,style:{pointerEvents:w?x?"auto":"none":void 0,...e.style},onFocusCapture:Au(e.onFocusCapture,S.onFocusCapture),onBlurCapture:Au(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:Au(e.onPointerDownCapture,k.onPointerDownCapture)})}));ld.displayName="DismissableLayer";var sd=s.forwardRef(((e,t)=>{const n=s.useContext(ad),r=s.useRef(null),o=Lu(t,r);return s.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),Bu.jsx(ed.div,{...e,ref:o})}));function cd(){const e=new CustomEvent(rd);document.dispatchEvent(e)}function ud(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?td(o,i):o.dispatchEvent(i)}sd.displayName="DismissableLayerBranch";var dd="focusScope.autoFocusOnMount",fd="focusScope.autoFocusOnUnmount",pd={bubbles:!1,cancelable:!0},hd=s.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[l,c]=s.useState(null),u=Xu(o),d=Xu(i),f=s.useRef(null),p=Lu(t,(e=>c(e))),h=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect((()=>{if(r){let e=function(e){if(h.paused||!l)return;const t=e.target;l.contains(t)?f.current=t:vd(f.current,{select:!0})},t=function(e){if(h.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||vd(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&vd(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()}}}),[r,l,h.paused]),s.useEffect((()=>{if(l){bd.add(h);const t=document.activeElement;if(!l.contains(t)){const n=new CustomEvent(dd,pd);l.addEventListener(dd,u),l.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(vd(r,{select:t}),document.activeElement!==n)return}((e=md(l),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&vd(l))}return()=>{l.removeEventListener(dd,u),setTimeout((()=>{const e=new CustomEvent(fd,pd);l.addEventListener(fd,d),l.dispatchEvent(e),e.defaultPrevented||vd(t??document.body,{select:!0}),l.removeEventListener(fd,d),bd.remove(h)}),0)}}var e}),[l,u,d,h]);const m=s.useCallback((e=>{if(!n&&!r)return;if(h.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,i]=function(e){const t=md(e),n=gd(t,e),r=gd(t.reverse(),e);return[n,r]}(t);r&&i?e.shiftKey||o!==i?e.shiftKey&&o===r&&(e.preventDefault(),n&&vd(i,{select:!0})):(e.preventDefault(),n&&vd(r,{select:!0})):o===t&&e.preventDefault()}}),[n,r,h.paused]);return Bu.jsx(ed.div,{tabIndex:-1,...a,ref:p,onKeyDown:m})}));function md(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 gd(e,t){for(const n of e)if(!yd(n,{upTo:t}))return n}function yd(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 vd(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()}}hd.displayName="FocusScope";var bd=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=wd(e,t),e.unshift(t)},remove(t){e=wd(e,t),e[0]?.resume()}}}();function wd(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var xd=s.forwardRef(((e,t)=>{const{container:n,...r}=e,[o,i]=s.useState(!1);Uu((()=>i(!0)),[]);const a=n||o&&globalThis?.document?.body;return a?zr.createPortal(Bu.jsx(ed.div,{...r,ref:t}),a):null}));xd.displayName="Portal";var kd=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=s.useState(),r=s.useRef({}),o=s.useRef(e),i=s.useRef("none"),a=e?"mounted":"unmounted",[l,c]=function(e,t){return s.useReducer(((e,n)=>t[e][n]??e),e)}(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect((()=>{const e=Sd(r.current);i.current="mounted"===l?e:"none"}),[l]),Uu((()=>{const t=r.current,n=o.current;if(n!==e){const r=i.current,a=Sd(t);if(e)c("MOUNT");else if("none"===a||"none"===t?.display)c("UNMOUNT");else{c(n&&r!==a?"ANIMATION_OUT":"UNMOUNT")}o.current=e}}),[e,c]),Uu((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,a=i=>{const a=Sd(r.current).includes(i.animationName);if(i.target===t&&a&&(c("ANIMATION_END"),!o.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},l=e=>{e.target===t&&(i.current=Sd(r.current))};return t.addEventListener("animationstart",l),t.addEventListener("animationcancel",a),t.addEventListener("animationend",a),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",l),t.removeEventListener("animationcancel",a),t.removeEventListener("animationend",a)}}c("ANIMATION_END")}),[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:s.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}(t),o="function"==typeof n?n({present:r.isPresent}):s.Children.only(n),i=Lu(r.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}(o));return"function"==typeof n||r.isPresent?s.cloneElement(o,{ref:i}):null};function Sd(e){return e?.animationName||"none"}kd.displayName="Presence";var Ed=0;function _d(){s.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Cd()),document.body.insertAdjacentElement("beforeend",e[1]??Cd()),Ed++,()=>{1===Ed&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),Ed--}}),[])}function Cd(){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 Od=function(){return Od=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},Od.apply(this,arguments)};function Nd(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 Pd(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 Rd="right-scroll-bar-position",Md="width-before-scroll-bar";function Td(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var Ad="undefined"!=typeof window?s.useLayoutEffect:s.useEffect,Dd=new WeakMap;function Id(e,t){var n,r,o,i=(n=null,r=function(t){return e.forEach((function(e){return Td(e,t)}))},(o=s.useState((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 Ad((function(){var t=Dd.get(i);if(t){var n=new Set(t),r=new Set(e),o=i.current;n.forEach((function(e){r.has(e)||Td(e,null)})),r.forEach((function(e){n.has(e)||Td(e,o)}))}Dd.set(i,e)}),[e]),i}function Ld(e){return e}var zd=function(e){var t=e.sideCar,n=Nd(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return s.createElement(r,Od({},n))};zd.isSideCarExport=!0;var Fd=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=Ld);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=Od({async:!0,ssr:!1},e),t}(),jd=function(){},$d=s.forwardRef((function(e,t){var n=s.useRef(null),r=s.useState({onScrollCapture:jd,onWheelCapture:jd,onTouchMoveCapture:jd}),o=r[0],i=r[1],a=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,h=e.noIsolation,m=e.inert,g=e.allowPinchZoom,y=e.as,v=void 0===y?"div":y,b=e.gapMode,w=Nd(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=p,k=Id([n,t]),S=Od(Od({},w),o);return s.createElement(s.Fragment,null,d&&s.createElement(x,{sideCar:Fd,removeScrollBar:u,shards:f,noIsolation:h,inert:m,setCallbacks:i,allowPinchZoom:!!g,lockRef:n,gapMode:b}),a?s.cloneElement(s.Children.only(l),Od(Od({},S),{ref:k})):s.createElement(v,Od({},S,{className:c,ref:k}),l))}));$d.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},$d.classNames={fullWidth:Md,zeroRight:Rd};function Bd(){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 Vd=function(){var e=0,t=null;return{add:function(n){var r;0==e&&(t=Bd())&&(!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)}}},Hd=function(){var e,t=(e=Vd(),function(t,n){s.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},Ud={left:0,top:0,right:0,gap:0},Wd=function(e){return parseInt(e||"",10)||0},qd=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Ud;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[Wd(n),Wd(r),Wd(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])}},Kd=Hd(),Xd="data-scroll-locked",Yd=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,l=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(l,"px ").concat(r,";\n }\n body[").concat(Xd,"] {\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(l,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Rd," {\n right: ").concat(l,"px ").concat(r,";\n }\n \n .").concat(Md," {\n margin-right: ").concat(l,"px ").concat(r,";\n }\n \n .").concat(Rd," .").concat(Rd," {\n right: 0 ").concat(r,";\n }\n \n .").concat(Md," .").concat(Md," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(Xd,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},Gd=function(){var e=parseInt(document.body.getAttribute(Xd)||"0",10);return isFinite(e)?e:0},Qd=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;s.useEffect((function(){return document.body.setAttribute(Xd,(Gd()+1).toString()),function(){var e=Gd()-1;e<=0?document.body.removeAttribute(Xd):document.body.setAttribute(Xd,e.toString())}}),[]);var i=s.useMemo((function(){return qd(o)}),[o]);return s.createElement(Kd,{styles:Yd(i,!t,o,n?"":"!important")})},Zd=!1;if("undefined"!=typeof window)try{var Jd=Object.defineProperty({},"passive",{get:function(){return Zd=!0,!0}});window.addEventListener("test",Jd,Jd),window.removeEventListener("test",Jd,Jd)}catch(e){Zd=!1}var ef=!!Zd&&{passive:!1},tf=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])},nf=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),rf(e,r)){var o=of(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},rf=function(e,t){return"v"===e?function(e){return tf(e,"overflowY")}(t):function(e){return tf(e,"overflowX")}(t)},of=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},af=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},lf=function(e){return[e.deltaX,e.deltaY]},sf=function(e){return e&&"current"in e?e.current:e},cf=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},uf=0,df=[];function ff(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var pf,hf=(pf=function(e){var t=s.useRef([]),n=s.useRef([0,0]),r=s.useRef(),o=s.useState(uf++)[0],i=s.useState(Hd)[0],a=s.useRef(e);s.useEffect((function(){a.current=e}),[e]),s.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=Pd([e.lockRef.current],(e.shards||[]).map(sf),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(o))})),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(o))}))}}}),[e.inert,e.lockRef.current,e.shards]);var l=s.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!a.current.allowPinchZoom;var o,i=af(e),l=n.current,s="deltaX"in e?e.deltaX:l[0]-i[0],c="deltaY"in e?e.deltaY:l[1]-i[1],u=e.target,d=Math.abs(s)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var f=nf(d,u);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=nf(d,u)),!f)return!1;if(!r.current&&"changedTouches"in e&&(s||c)&&(r.current=o),!o)return!0;var p=r.current||o;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,l=t.contains(a),s=!1,c=i>0,u=0,d=0;do{var f=of(e,a),p=f[0],h=f[1]-f[2]-o*p;(p||h)&&rf(e,a)&&(u+=h,d+=p),a=a instanceof ShadowRoot?a.host:a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(c&&Math.abs(u)<1||!c&&Math.abs(d)<1)&&(s=!0),s}(p,t,e,"h"===p?s:c)}),[]),c=s.useCallback((function(e){var n=e;if(df.length&&df[df.length-1]===i){var r="deltaY"in n?lf(n):af(n),o=t.current.filter((function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&(t=e.delta,o=r,t[0]===o[0]&&t[1]===o[1]);var t,o}))[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var s=(a.current.shards||[]).map(sf).filter(Boolean).filter((function(e){return e.contains(n.target)}));(s.length>0?l(n,s[0]):!a.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),u=s.useCallback((function(e,n,r,o){var i={name:e,delta:n,target:r,should:o,shadowParent:ff(r)};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),d=s.useCallback((function(e){n.current=af(e),r.current=void 0}),[]),f=s.useCallback((function(t){u(t.type,lf(t),t.target,l(t,e.lockRef.current))}),[]),p=s.useCallback((function(t){u(t.type,af(t),t.target,l(t,e.lockRef.current))}),[]);s.useEffect((function(){return df.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,ef),document.addEventListener("touchmove",c,ef),document.addEventListener("touchstart",d,ef),function(){df=df.filter((function(e){return e!==i})),document.removeEventListener("wheel",c,ef),document.removeEventListener("touchmove",c,ef),document.removeEventListener("touchstart",d,ef)}}),[]);var h=e.removeScrollBar,m=e.inert;return s.createElement(s.Fragment,null,m?s.createElement(i,{styles:cf(o)}):null,h?s.createElement(Qd,{gapMode:e.gapMode}):null)},Fd.useMedium(pf),zd),mf=s.forwardRef((function(e,t){return s.createElement($d,Od({},e,{ref:t,sideCar:hf}))}));mf.classNames=$d.classNames;var gf=new WeakMap,yf=new WeakMap,vf={},bf=0,wf=function(e){return e&&(e.host||wf(e.parentNode))},xf=function(e,t,n,r){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=wf(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]);vf[n]||(vf[n]=new WeakMap);var i=vf[n],a=[],l=new Set,s=new Set(o),c=function(e){e&&!l.has(e)&&(l.add(e),c(e.parentNode))};o.forEach(c);var u=function(e){e&&!s.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(l.has(e))u(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,s=(gf.get(e)||0)+1,c=(i.get(e)||0)+1;gf.set(e,s),i.set(e,c),a.push(e),1===s&&o&&yf.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),l.clear(),bf++,function(){a.forEach((function(e){var t=gf.get(e)-1,o=i.get(e)-1;gf.set(e,t),i.set(e,o),t||(yf.has(e)||e.removeAttribute(r),yf.delete(e)),o||e.removeAttribute(n)})),--bf||(gf=new WeakMap,gf=new WeakMap,yf=new WeakMap,vf={})}},kf=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]"))),xf(r,o,n,"aria-hidden")):function(){return null}},Sf="Dialog",[Ef,_f]=Vu(Sf),[Cf,Of]=Ef(Sf),Nf=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,l=s.useRef(null),c=s.useRef(null),[u=!1,d]=Yu({prop:r,defaultProp:o,onChange:i});return Bu.jsx(Cf,{scope:t,triggerRef:l,contentRef:c,contentId:Ku(),titleId:Ku(),descriptionId:Ku(),open:u,onOpenChange:d,onOpenToggle:s.useCallback((()=>d((e=>!e))),[d]),modal:a,children:n})};Nf.displayName=Sf;var Pf="DialogTrigger",Rf=s.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Of(Pf,n),i=Lu(t,o.triggerRef);return Bu.jsx(ed.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Yf(o.open),...r,ref:i,onClick:Au(e.onClick,o.onOpenToggle)})}));Rf.displayName=Pf;var Mf="DialogPortal",[Tf,Af]=Ef(Mf,{forceMount:void 0}),Df=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=Of(Mf,t);return Bu.jsx(Tf,{scope:t,forceMount:n,children:s.Children.map(r,(e=>Bu.jsx(kd,{present:n||i.open,children:Bu.jsx(xd,{asChild:!0,container:o,children:e})})))})};Df.displayName=Mf;var If="DialogOverlay",Lf=s.forwardRef(((e,t)=>{const n=Af(If,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Of(If,e.__scopeDialog);return i.modal?Bu.jsx(kd,{present:r||i.open,children:Bu.jsx(zf,{...o,ref:t})}):null}));Lf.displayName=If;var zf=s.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Of(If,n);return Bu.jsx(mf,{as:Gu,allowPinchZoom:!0,shards:[o.contentRef],children:Bu.jsx(ed.div,{"data-state":Yf(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})})),Ff="DialogContent",jf=s.forwardRef(((e,t)=>{const n=Af(Ff,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Of(Ff,e.__scopeDialog);return Bu.jsx(kd,{present:r||i.open,children:i.modal?Bu.jsx($f,{...o,ref:t}):Bu.jsx(Bf,{...o,ref:t})})}));jf.displayName=Ff;var $f=s.forwardRef(((e,t)=>{const n=Of(Ff,e.__scopeDialog),r=s.useRef(null),o=Lu(t,n.contentRef,r);return s.useEffect((()=>{const e=r.current;if(e)return kf(e)}),[]),Bu.jsx(Vf,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Au(e.onCloseAutoFocus,(e=>{e.preventDefault(),n.triggerRef.current?.focus()})),onPointerDownOutside:Au(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:Au(e.onFocusOutside,(e=>e.preventDefault()))})})),Bf=s.forwardRef(((e,t)=>{const n=Of(Ff,e.__scopeDialog),r=s.useRef(!1),o=s.useRef(!1);return Bu.jsx(Vf,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const i=t.target,a=n.triggerRef.current?.contains(i);a&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})})),Vf=s.forwardRef(((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,l=Of(Ff,n),c=s.useRef(null),u=Lu(t,c);return _d(),Bu.jsxs(Bu.Fragment,{children:[Bu.jsx(hd,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:Bu.jsx(ld,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Yf(l.open),...a,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),Bu.jsxs(Bu.Fragment,{children:[Bu.jsx(tp,{titleId:l.titleId}),Bu.jsx(np,{contentRef:c,descriptionId:l.descriptionId})]})]})})),Hf="DialogTitle",Uf=s.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Of(Hf,n);return Bu.jsx(ed.h2,{id:o.titleId,...r,ref:t})}));Uf.displayName=Hf;var Wf="DialogDescription",qf=s.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Of(Wf,n);return Bu.jsx(ed.p,{id:o.descriptionId,...r,ref:t})}));qf.displayName=Wf;var Kf="DialogClose",Xf=s.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Of(Kf,n);return Bu.jsx(ed.button,{type:"button",...r,ref:t,onClick:Au(e.onClick,(()=>o.onOpenChange(!1)))})}));function Yf(e){return e?"open":"closed"}Xf.displayName=Kf;var Gf,Qf,Zf="DialogTitleWarning",[Jf,ep]=function(e,t){const n=s.createContext(t),r=e=>{const{children:t,...r}=e,o=s.useMemo((()=>r),Object.values(r));return Bu.jsx(n.Provider,{value:o,children:t})};return r.displayName=e+"Provider",[r,function(r){const o=s.useContext(n);if(o)return o;if(void 0!==t)return t;throw new Error(`\`${r}\` must be used within \`${e}\``)}]}(Zf,{contentName:Ff,titleName:Hf,docsSlug:"dialog"}),tp=({titleId:e})=>{const t=ep(Zf),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return s.useEffect((()=>{if(e){document.getElementById(e)||console.error(n)}}),[n,e]),null},np=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ep("DialogDescriptionWarning").contentName}}.`;return s.useEffect((()=>{const r=e.current?.getAttribute("aria-describedby");if(t&&r){document.getElementById(t)||console.warn(n)}}),[n,e,t]),null},rp=Nf,op=Rf,ip=Df,ap=Lf,lp=jf,sp=Uf,cp=qf,up=Xf,dp={exports:{}},fp={};function pp(){if(Gf)return fp;Gf=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"),l=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen"),p=Symbol.for("react.client.reference");function h(f){if("object"==typeof f&&null!==f){var p=f.$$typeof;switch(p){case e:switch(f=f.type){case n:case o:case r:case s:case c:return f;default:switch(f=f&&f.$$typeof){case a:case l:case d:case u:case i:return f;default:return p}}case t:return p}}}return fp.ContextConsumer=i,fp.ContextProvider=a,fp.Element=e,fp.ForwardRef=l,fp.Fragment=n,fp.Lazy=d,fp.Memo=u,fp.Portal=t,fp.Profiler=o,fp.StrictMode=r,fp.Suspense=s,fp.SuspenseList=c,fp.isContextConsumer=function(e){return h(e)===i},fp.isContextProvider=function(e){return h(e)===a},fp.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},fp.isForwardRef=function(e){return h(e)===l},fp.isFragment=function(e){return h(e)===n},fp.isLazy=function(e){return h(e)===d},fp.isMemo=function(e){return h(e)===u},fp.isPortal=function(e){return h(e)===t},fp.isProfiler=function(e){return h(e)===o},fp.isStrictMode=function(e){return h(e)===r},fp.isSuspense=function(e){return h(e)===s},fp.isSuspenseList=function(e){return h(e)===c},fp.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===o||e===r||e===s||e===c||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===u||e.$$typeof===a||e.$$typeof===i||e.$$typeof===l||e.$$typeof===p||void 0!==e.getModuleId)},fp.typeOf=h,fp}function hp(){return Qf||(Qf=1,dp.exports=pp()),dp.exports}var mp=hp();function gp(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 yp(e){if(s.isValidElement(e)||mp.isValidElementType(e)||!gp(e))return e;const t={};return Object.keys(e).forEach((n=>{t[n]=yp(e[n])})),t}function vp(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return gp(e)&&gp(t)&&Object.keys(t).forEach((o=>{s.isValidElement(t[o])||mp.isValidElementType(t[o])?r[o]=t[o]:gp(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&gp(e[o])?r[o]=vp(e[o],t[o],n):n.clone?r[o]=gp(t[o])?yp(t[o]):t[o]:r[o]=t[o]})),r}var bp,wp,xp,kp,Sp,Ep,_p,Cp={exports:{}},Op={exports:{}},Np={};function Pp(){return wp||(wp=1,Op.exports=function(){if(bp)return Np;bp=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,l=e?Symbol.for("react.context"):60110,s=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,f=e?Symbol.for("react.suspense_list"):60120,p=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,v=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var f=e.$$typeof;switch(f){case t:switch(e=e.type){case s:case c:case r:case i:case o:case d:return e;default:switch(e=e&&e.$$typeof){case l:case u:case h:case p:case a:return e;default:return f}}case n:return f}}}function w(e){return b(e)===c}return Np.AsyncMode=s,Np.ConcurrentMode=c,Np.ContextConsumer=l,Np.ContextProvider=a,Np.Element=t,Np.ForwardRef=u,Np.Fragment=r,Np.Lazy=h,Np.Memo=p,Np.Portal=n,Np.Profiler=i,Np.StrictMode=o,Np.Suspense=d,Np.isAsyncMode=function(e){return w(e)||b(e)===s},Np.isConcurrentMode=w,Np.isContextConsumer=function(e){return b(e)===l},Np.isContextProvider=function(e){return b(e)===a},Np.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Np.isForwardRef=function(e){return b(e)===u},Np.isFragment=function(e){return b(e)===r},Np.isLazy=function(e){return b(e)===h},Np.isMemo=function(e){return b(e)===p},Np.isPortal=function(e){return b(e)===n},Np.isProfiler=function(e){return b(e)===i},Np.isStrictMode=function(e){return b(e)===o},Np.isSuspense=function(e){return b(e)===d},Np.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===d||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===p||e.$$typeof===a||e.$$typeof===l||e.$$typeof===u||e.$$typeof===g||e.$$typeof===y||e.$$typeof===v||e.$$typeof===m)},Np.typeOf=b,Np}()),Op.exports}function Rp(){if(kp)return xp;kp=1;return xp="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Mp(){if(Ep)return Sp;Ep=1;var e=Rp();function t(){}function n(){}return n.resetWarningCache=t,Sp=function(){function r(t,n,r,o,i,a){if(a!==e){var l=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 l.name="Invariant Violation",l}}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},Sp}function Tp(){return _p||(_p=1,Cp.exports=Mp()()),Cp.exports}var Ap=Tp();function Dp(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 Ip(e){if("string"!=typeof e)throw new Error(Dp(7));return e.charAt(0).toUpperCase()+e.slice(1)}const Lp="undefined"!=typeof window?s.useLayoutEffect:s.useEffect;function zp(e){const t=s.useRef(e);return Lp((()=>{t.current=e})),s.useRef(((...e)=>(0,t.current)(...e))).current}function Fp(...e){return s.useMemo((()=>e.every((e=>null==e))?null:t=>{e.forEach((e=>{!function(e,t){"function"==typeof e?e(t):e&&(e.current=t)}(e,t)}))}),e)}const jp={};function $p(e,t){const n=s.useRef(jp);return n.current===jp&&(n.current=e(t)),n}const Bp=[];class Vp{static create(){return new Vp}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 Hp(){const e=$p(Vp.create).current;var t;return t=e.disposeEffect,s.useEffect(t,Bp),e}function Up(e){try{return e.matches(":focus-visible")}catch(e){}return!1}function Wp(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]=Wp(r[t],i[t])}}else n[o]=i;else n[o]=r||{}}else void 0===n[o]&&(n[o]=e[o])}return n}function qp(e,t,n=void 0){const r={};for(const o in e){const i=e[o];let a="",l=!0;for(let e=0;e<i.length;e+=1){const r=i[e];r&&(a+=(!0===l?"":" ")+t(r),l=!1,n&&n[r]&&(a+=" "+n[r]))}r[o]=a}return r}const Kp=e=>e,Xp=(()=>{let e=Kp;return{configure(t){e=t},generate:t=>e(t),reset(){e=Kp}}})(),Yp={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 Gp(e,t,n="Mui"){const r=Yp[t];return r?`${n}-${r}`:`${Xp.generate(e)}-${t}`}function Qp(e,t,n="Mui"){const r={};return t.forEach((t=>{r[t]=Gp(e,t,n)})),r}function Zp(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=Zp(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Jp(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Zp(e))&&(r&&(r+=" "),r+=t);return r}function eh(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 th(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const e=Jp(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}),l=eh(r),s=eh(o),c=t(a),u=Jp(c?.className,n?.className,i,o?.className,r?.className),d={...c?.style,...n?.style,...o?.style,...r?.style},f={...c,...n,...s,...l};return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:c.ref}}function nh(e,t){return t?vp(e,t,{clone:!1}):e}const rh={xs:0,sm:600,md:900,lg:1200,xl:1536},oh={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${rh[e]}px)`},ih={containerQueries:e=>({up:t=>{let n="number"==typeof t?t:rh[t]||t;return"number"==typeof n&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function ah(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||oh;return t.reduce(((r,o,i)=>(r[e.up(e.keys[i])]=n(t[i]),r)),{})}if("object"==typeof t){const e=r.breakpoints||oh;return Object.keys(t).reduce(((o,i)=>{if(a=e.keys,"@"===(l=i)||l.startsWith("@")&&(a.some((e=>l.startsWith(`@${e}`)))||l.match(/^@\d/))){const e=function(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,o]=n,i=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(i)}(r.containerQueries?r:ih,i);e&&(o[e]=n(t[i],i))}else if(Object.keys(e.values||rh).includes(i)){o[e.up(i)]=n(t[i],i)}else{const e=i;o[e]=t[e]}var a,l;return o}),{})}return n(t)}function lh(e={}){const t=e.keys?.reduce(((t,n)=>(t[e.up(n)]={},t)),{});return t||{}}function sh(e,t){return e.reduce(((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}function ch({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 uh(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 dh(e,t,n,r=n){let o;return o="function"==typeof e?e(n):Array.isArray(e)?e[n]||r:uh(e,n)||r,t&&(o=t(o,r,e)),o}function fh(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=uh(e.theme,r)||{};return ah(e,i,(e=>{let r=dh(a,o,e);return e===r&&"string"==typeof e&&(r=dh(a,o,`${t}${"default"===e?"":Ip(e)}`,e)),!1===n?r:{[n]:r}}))};return i.propTypes={},i.filterProps=[t],i}const ph={m:"margin",p:"padding"},hh={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},mh={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},gh=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}((e=>{if(e.length>2){if(!mh[e])return[e];e=mh[e]}const[t,n]=e.split(""),r=ph[t],o=hh[n]||"";return Array.isArray(o)?o.map((e=>r+e)):[r+o]})),yh=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],vh=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];function bh(e,t,n,r){const o=uh(e,t,!0)??n;return"number"==typeof o||"string"==typeof o?e=>"string"==typeof e?e:"string"==typeof o?`calc(${e} * ${o})`:o*e:Array.isArray(o)?e=>{if("string"==typeof e)return e;const t=Math.abs(e),n=o[t];return e>=0?n:"number"==typeof n?-n:`-${n}`}:"function"==typeof o?o:()=>{}}function wh(e){return bh(e,"spacing",8)}function xh(e,t){return"string"==typeof t||null==t?t:e(t)}function kh(e,t,n,r){if(!t.includes(n))return null;const o=function(e,t){return n=>e.reduce(((e,r)=>(e[r]=xh(t,n),e)),{})}(gh(n),r);return ah(e,e[n],o)}function Sh(e,t){const n=wh(e.theme);return Object.keys(e).map((r=>kh(e,t,r,n))).reduce(nh,{})}function Eh(e){return Sh(e,yh)}function _h(e){return Sh(e,vh)}function Ch(...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]?nh(n,t[r](e)):n),{});return n.propTypes={},n.filterProps=e.reduce(((e,t)=>e.concat(t.filterProps)),[]),n}function Oh(e){return"number"!=typeof e?e:`${e}px solid`}function Nh(e,t){return fh({prop:e,themeKey:"borders",transform:t})}Eh.propTypes={},Eh.filterProps=yh,_h.propTypes={},_h.filterProps=vh;const Ph=Nh("border",Oh),Rh=Nh("borderTop",Oh),Mh=Nh("borderRight",Oh),Th=Nh("borderBottom",Oh),Ah=Nh("borderLeft",Oh),Dh=Nh("borderColor"),Ih=Nh("borderTopColor"),Lh=Nh("borderRightColor"),zh=Nh("borderBottomColor"),Fh=Nh("borderLeftColor"),jh=Nh("outline",Oh),$h=Nh("outlineColor"),Bh=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=bh(e.theme,"shape.borderRadius",4),n=e=>({borderRadius:xh(t,e)});return ah(e,e.borderRadius,n)}return null};Bh.propTypes={},Bh.filterProps=["borderRadius"],Ch(Ph,Rh,Mh,Th,Ah,Dh,Ih,Lh,zh,Fh,Bh,jh,$h);const Vh=e=>{if(void 0!==e.gap&&null!==e.gap){const t=bh(e.theme,"spacing",8),n=e=>({gap:xh(t,e)});return ah(e,e.gap,n)}return null};Vh.propTypes={},Vh.filterProps=["gap"];const Hh=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=bh(e.theme,"spacing",8),n=e=>({columnGap:xh(t,e)});return ah(e,e.columnGap,n)}return null};Hh.propTypes={},Hh.filterProps=["columnGap"];const Uh=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=bh(e.theme,"spacing",8),n=e=>({rowGap:xh(t,e)});return ah(e,e.rowGap,n)}return null};Uh.propTypes={},Uh.filterProps=["rowGap"];function Wh(e,t){return"grey"===t?t:e}Ch(Vh,Hh,Uh,fh({prop:"gridColumn"}),fh({prop:"gridRow"}),fh({prop:"gridAutoFlow"}),fh({prop:"gridAutoColumns"}),fh({prop:"gridAutoRows"}),fh({prop:"gridTemplateColumns"}),fh({prop:"gridTemplateRows"}),fh({prop:"gridTemplateAreas"}),fh({prop:"gridArea"}));function qh(e){return e<=1&&0!==e?100*e+"%":e}Ch(fh({prop:"color",themeKey:"palette",transform:Wh}),fh({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Wh}),fh({prop:"backgroundColor",themeKey:"palette",transform:Wh}));const Kh=fh({prop:"width",transform:qh}),Xh=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{const n=e.theme?.breakpoints?.values?.[t]||rh[t];return n?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:qh(t)}};return ah(e,e.maxWidth,t)}return null};Xh.filterProps=["maxWidth"];const Yh=fh({prop:"minWidth",transform:qh}),Gh=fh({prop:"height",transform:qh}),Qh=fh({prop:"maxHeight",transform:qh}),Zh=fh({prop:"minHeight",transform:qh});fh({prop:"size",cssProperty:"width",transform:qh}),fh({prop:"size",cssProperty:"height",transform:qh});Ch(Kh,Xh,Yh,Gh,Qh,Zh,fh({prop:"boxSizing"}));const Jh={border:{themeKey:"borders",transform:Oh},borderTop:{themeKey:"borders",transform:Oh},borderRight:{themeKey:"borders",transform:Oh},borderBottom:{themeKey:"borders",transform:Oh},borderLeft:{themeKey:"borders",transform:Oh},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Oh},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Bh},color:{themeKey:"palette",transform:Wh},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Wh},backgroundColor:{themeKey:"palette",transform:Wh},p:{style:_h},pt:{style:_h},pr:{style:_h},pb:{style:_h},pl:{style:_h},px:{style:_h},py:{style:_h},padding:{style:_h},paddingTop:{style:_h},paddingRight:{style:_h},paddingBottom:{style:_h},paddingLeft:{style:_h},paddingX:{style:_h},paddingY:{style:_h},paddingInline:{style:_h},paddingInlineStart:{style:_h},paddingInlineEnd:{style:_h},paddingBlock:{style:_h},paddingBlockStart:{style:_h},paddingBlockEnd:{style:_h},m:{style:Eh},mt:{style:Eh},mr:{style:Eh},mb:{style:Eh},ml:{style:Eh},mx:{style:Eh},my:{style:Eh},margin:{style:Eh},marginTop:{style:Eh},marginRight:{style:Eh},marginBottom:{style:Eh},marginLeft:{style:Eh},marginX:{style:Eh},marginY:{style:Eh},marginInline:{style:Eh},marginInlineStart:{style:Eh},marginInlineEnd:{style:Eh},marginBlock:{style:Eh},marginBlockStart:{style:Eh},marginBlockEnd:{style:Eh},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:Vh},rowGap:{style:Uh},columnGap:{style:Hh},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:qh},maxWidth:{style:Xh},minWidth:{transform:qh},height:{transform:qh},maxHeight:{transform:qh},minHeight:{transform:qh},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 em=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:l,transform:s,style:c}=i;if(null==t)return null;if("typography"===l&&"inherit"===t)return{[e]:t};const u=uh(n,l)||{};if(c)return c(o);return ah(o,t,(t=>{let n=dh(u,s,t);return t===n&&"string"==typeof t&&(n=dh(u,s,`${e}${"default"===t?"":Ip(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??Jh;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=lh(o.breakpoints),l=Object.keys(a);let s=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])s=nh(s,e(n,a,o,i));else{const e=ah({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)?s=nh(s,e):s[n]=t({sx:a,theme:o})}else s=nh(s,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,sh(l,s))}return Array.isArray(r)?r.map(a):a(r)}}();em.filterProps=["sx"];function tm(e){const{sx:t,...n}=e,{systemProps:r,otherProps:o}=(e=>{const t={systemProps:{},otherProps:{}},n=e?.theme?.unstable_sxConfig??Jh;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 gp(n)?{...r,...n}:r}:{...r,...t},{...o,sx:i}}function nm(){return nm=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},nm.apply(null,arguments)}var rm=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}(),om="-ms-",im="-moz-",am="-webkit-",lm="comm",sm="rule",cm="decl",um="@keyframes",dm=Math.abs,fm=String.fromCharCode,pm=Object.assign;function hm(e){return e.trim()}function mm(e,t,n){return e.replace(t,n)}function gm(e,t){return e.indexOf(t)}function ym(e,t){return 0|e.charCodeAt(t)}function vm(e,t,n){return e.slice(t,n)}function bm(e){return e.length}function wm(e){return e.length}function xm(e,t){return t.push(e),e}var km=1,Sm=1,Em=0,_m=0,Cm=0,Om="";function Nm(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:km,column:Sm,length:a,return:""}}function Pm(e,t){return pm(Nm("",null,null,"",null,null,0),e,{length:-e.length},t)}function Rm(){return Cm=_m>0?ym(Om,--_m):0,Sm--,10===Cm&&(Sm=1,km--),Cm}function Mm(){return Cm=_m<Em?ym(Om,_m++):0,Sm++,10===Cm&&(Sm=1,km++),Cm}function Tm(){return ym(Om,_m)}function Am(){return _m}function Dm(e,t){return vm(Om,e,t)}function Im(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 Lm(e){return km=Sm=1,Em=bm(Om=e),_m=0,[]}function zm(e){return Om="",e}function Fm(e){return hm(Dm(_m-1,Bm(91===e?e+2:40===e?e+1:e)))}function jm(e){for(;(Cm=Tm())&&Cm<33;)Mm();return Im(e)>2||Im(Cm)>3?"":" "}function $m(e,t){for(;--t&&Mm()&&!(Cm<48||Cm>102||Cm>57&&Cm<65||Cm>70&&Cm<97););return Dm(e,Am()+(t<6&&32==Tm()&&32==Mm()))}function Bm(e){for(;Mm();)switch(Cm){case e:return _m;case 34:case 39:34!==e&&39!==e&&Bm(Cm);break;case 40:41===e&&Bm(e);break;case 92:Mm()}return _m}function Vm(e,t){for(;Mm()&&e+Cm!==57&&(e+Cm!==84||47!==Tm()););return"/*"+Dm(t,_m-1)+"*"+fm(47===e?e:Mm())}function Hm(e){for(;!Im(Tm());)Mm();return Dm(e,_m)}function Um(e){return zm(Wm("",null,null,null,[""],e=Lm(e),0,[0],e))}function Wm(e,t,n,r,o,i,a,l,s){for(var c=0,u=0,d=a,f=0,p=0,h=0,m=1,g=1,y=1,v=0,b="",w=o,x=i,k=r,S=b;g;)switch(h=v,v=Mm()){case 40:if(108!=h&&58==ym(S,d-1)){-1!=gm(S+=mm(Fm(v),"&","&\f"),"&\f")&&(y=-1);break}case 34:case 39:case 91:S+=Fm(v);break;case 9:case 10:case 13:case 32:S+=jm(h);break;case 92:S+=$m(Am()-1,7);continue;case 47:switch(Tm()){case 42:case 47:xm(Km(Vm(Mm(),Am()),t,n),s);break;default:S+="/"}break;case 123*m:l[c++]=bm(S)*y;case 125*m:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:-1==y&&(S=mm(S,/\f/g,"")),p>0&&bm(S)-d&&xm(p>32?Xm(S+";",r,n,d-1):Xm(mm(S," ","")+";",r,n,d-2),s);break;case 59:S+=";";default:if(xm(k=qm(S,t,n,c,u,o,l,b,w=[],x=[],d),i),123===v)if(0===u)Wm(S,t,k,k,w,i,d,l,x);else switch(99===f&&110===ym(S,3)?100:f){case 100:case 108:case 109:case 115:Wm(e,k,k,r&&xm(qm(e,k,k,0,0,o,l,b,o,w=[],d),x),o,x,d,l,r?w:x);break;default:Wm(S,k,k,k,[""],x,0,l,x)}}c=u=p=0,m=y=1,b=S="",d=a;break;case 58:d=1+bm(S),p=h;default:if(m<1)if(123==v)--m;else if(125==v&&0==m++&&125==Rm())continue;switch(S+=fm(v),v*m){case 38:y=u>0?1:(S+="\f",-1);break;case 44:l[c++]=(bm(S)-1)*y,y=1;break;case 64:45===Tm()&&(S+=Fm(Mm())),f=Tm(),u=d=bm(b=S+=Hm(Am())),v++;break;case 45:45===h&&2==bm(S)&&(m=0)}}return i}function qm(e,t,n,r,o,i,a,l,s,c,u){for(var d=o-1,f=0===o?i:[""],p=wm(f),h=0,m=0,g=0;h<r;++h)for(var y=0,v=vm(e,d+1,d=dm(m=a[h])),b=e;y<p;++y)(b=hm(m>0?f[y]+" "+v:mm(v,/&\f/g,f[y])))&&(s[g++]=b);return Nm(e,t,n,0===o?sm:l,s,c,u)}function Km(e,t,n){return Nm(e,t,n,lm,fm(Cm),vm(e,2,-2),0)}function Xm(e,t,n,r){return Nm(e,t,n,cm,vm(e,0,r),vm(e,r+1,-1),r)}function Ym(e,t){for(var n="",r=wm(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function Gm(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case cm:return e.return=e.return||e.value;case lm:return"";case um:return e.return=e.value+"{"+Ym(e.children,r)+"}";case sm:e.value=e.props.join(",")}return bm(n=Ym(e.children,r))?e.return=e.value+"{"+n+"}":""}function Qm(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var Zm=function(e,t,n){for(var r=0,o=0;r=o,o=Tm(),38===r&&12===o&&(t[n]=1),!Im(o);)Mm();return Dm(e,_m)},Jm=function(e,t){return zm(function(e,t){var n=-1,r=44;do{switch(Im(r)){case 0:38===r&&12===Tm()&&(t[n]=1),e[n]+=Zm(_m-1,t,n);break;case 2:e[n]+=Fm(r);break;case 4:if(44===r){e[++n]=58===Tm()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=fm(r)}}while(r=Mm());return e}(Lm(e),t))},eg=new WeakMap,tg=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)||eg.get(n))&&!r){eg.set(e,!0);for(var o=[],i=Jm(t,o),a=n.props,l=0,s=0;l<i.length;l++)for(var c=0;c<a.length;c++,s++)e.props[s]=o[l]?i[l].replace(/&\f/g,a[c]):a[c]+" "+i[l]}}},ng=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function rg(e,t){switch(function(e,t){return 45^ym(e,0)?(((t<<2^ym(e,0))<<2^ym(e,1))<<2^ym(e,2))<<2^ym(e,3):0}(e,t)){case 5103:return am+"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 am+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return am+e+im+e+om+e+e;case 6828:case 4268:return am+e+om+e+e;case 6165:return am+e+om+"flex-"+e+e;case 5187:return am+e+mm(e,/(\w+).+(:[^]+)/,am+"box-$1$2"+om+"flex-$1$2")+e;case 5443:return am+e+om+"flex-item-"+mm(e,/flex-|-self/,"")+e;case 4675:return am+e+om+"flex-line-pack"+mm(e,/align-content|flex-|-self/,"")+e;case 5548:return am+e+om+mm(e,"shrink","negative")+e;case 5292:return am+e+om+mm(e,"basis","preferred-size")+e;case 6060:return am+"box-"+mm(e,"-grow","")+am+e+om+mm(e,"grow","positive")+e;case 4554:return am+mm(e,/([^-])(transform)/g,"$1"+am+"$2")+e;case 6187:return mm(mm(mm(e,/(zoom-|grab)/,am+"$1"),/(image-set)/,am+"$1"),e,"")+e;case 5495:case 3959:return mm(e,/(image-set\([^]*)/,am+"$1$`$1");case 4968:return mm(mm(e,/(.+:)(flex-)?(.*)/,am+"box-pack:$3"+om+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+am+e+e;case 4095:case 3583:case 4068:case 2532:return mm(e,/(.+)-inline(.+)/,am+"$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(bm(e)-1-t>6)switch(ym(e,t+1)){case 109:if(45!==ym(e,t+4))break;case 102:return mm(e,/(.+:)(.+)-([^]+)/,"$1"+am+"$2-$3$1"+im+(108==ym(e,t+3)?"$3":"$2-$3"))+e;case 115:return~gm(e,"stretch")?rg(mm(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==ym(e,t+1))break;case 6444:switch(ym(e,bm(e)-3-(~gm(e,"!important")&&10))){case 107:return mm(e,":",":"+am)+e;case 101:return mm(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+am+(45===ym(e,14)?"inline-":"")+"box$3$1"+am+"$2$3$1"+om+"$2box$3")+e}break;case 5936:switch(ym(e,t+11)){case 114:return am+e+om+mm(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return am+e+om+mm(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return am+e+om+mm(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return am+e+om+e+e}return e}var og,ig,ag=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case cm:e.return=rg(e.value,e.length);break;case um:return Ym([Pm(e,{value:mm(e.value,"@","@"+am)})],r);case sm: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 Ym([Pm(e,{props:[mm(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Ym([Pm(e,{props:[mm(t,/:(plac\w+)/,":"+am+"input-$1")]}),Pm(e,{props:[mm(t,/:(plac\w+)/,":-moz-$1")]}),Pm(e,{props:[mm(t,/:(plac\w+)/,om+"input-$1")]})],r)}return""}))}}],lg=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||ag,a={},l=[];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;l.push(e)}));var s,c,u=[Gm,(c=function(e){s.insert(e)},function(e){e.root||(e=e.return)&&c(e)})],d=function(e){var t=wm(e);return function(n,r,o,i){for(var a="",l=0;l<t;l++)a+=e[l](n,r,o,i)||"";return a}}([tg,ng].concat(i,u));o=function(e,t,n,r){s=n,function(e){Ym(Um(e),d)}(e?e+"{"+t.styles+"}":t.styles),r&&(f.inserted[t.name]=!0)};var f={key:t,sheet:new rm({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 f.sheet.hydrate(l),f};!function(){if(ig)return og;ig=1;var e=Pp(),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,l=Object.getOwnPropertyNames,s=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,u=Object.getPrototypeOf,d=Object.prototype;og=function e(t,r,o){if("string"!=typeof r){if(d){var f=u(r);f&&f!==d&&e(t,f,o)}var p=l(r);s&&(p=p.concat(s(r)));for(var h=i(t),m=i(r),g=0;g<p.length;++g){var y=p[g];if(!(n[y]||o&&o[y]||m&&m[y]||h&&h[y])){var v=c(r,y);try{a(t,y,v)}catch(e){}}}}return t}}();function sg(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")})),r}var cg=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},ug=function(e,t,n){cg(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 dg={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},fg=/[A-Z]|^ms/g,pg=/_EMO_([^_]+?)_([^]*?)_EMO_/g,hg=function(e){return 45===e.charCodeAt(1)},mg=function(e){return null!=e&&"boolean"!=typeof e},gg=Qm((function(e){return hg(e)?e:e.replace(fg,"-$&").toLowerCase()})),yg=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(pg,(function(e,t,n){return bg={name:t,styles:n,next:bg},t}))}return 1===dg[e]||hg(e)||"number"!=typeof t||0===t?t:t+"px"};function vg(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 bg={name:o.name,styles:o.styles,next:bg},o.name;var i=n;if(void 0!==i.styles){var a=i.next;if(void 0!==a)for(;void 0!==a;)bg={name:a.name,styles:a.styles,next:bg},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+=vg(e,t,n[o])+";";else for(var i in n){var a=n[i];if("object"!=typeof a){var l=a;null!=t&&void 0!==t[l]?r+=i+"{"+t[l]+"}":mg(l)&&(r+=gg(i)+":"+yg(i,l)+";")}else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=vg(e,t,a);switch(i){case"animation":case"animationName":r+=gg(i)+":"+s+";";break;default:r+=i+"{"+s+"}"}}else for(var c=0;c<a.length;c++)mg(a[c])&&(r+=gg(i)+":"+yg(i,a[c])+";")}return r}(e,t,n);case"function":if(void 0!==e){var l=bg,s=n(e);return bg=l,vg(e,t,s)}}var c=n;if(null==t)return c;var u=t[c];return void 0!==u?u:c}var bg,wg=/label:\s*([^\s;{]+)\s*(;|$)/g;function xg(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="";bg=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=vg(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++){if(o+=vg(n,t,e[a]),r)o+=i[a]}wg.lastIndex=0;for(var l,s="";null!==(l=wg.exec(o));)s+="-"+l[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)+s;return{name:c,styles:o,next:bg}}var kg=!!u.useInsertionEffect&&u.useInsertionEffect||function(e){return e()},Sg=s.createContext("undefined"!=typeof HTMLElement?lg({key:"css"}):null);Sg.Provider;var Eg,_g,Cg=function(e){return s.forwardRef((function(t,n){var r=s.useContext(Sg);return e(t,r,n)}))},Og=s.createContext({}),Ng={}.hasOwnProperty,Pg="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Rg=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return cg(t,n,r),kg((function(){return ug(t,n,r)})),null},Mg=Cg((function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var o=e[Pg],i=[r],a="";"string"==typeof e.className?a=sg(t.registered,i,e.className):null!=e.className&&(a=e.className+" ");var l=xg(i,void 0,s.useContext(Og));a+=t.key+"-"+l.name;var c={};for(var u in e)Ng.call(e,u)&&"css"!==u&&u!==Pg&&(c[u]=e[u]);return c.className=a,n&&(c.ref=n),s.createElement(s.Fragment,null,s.createElement(Rg,{cache:t,serialized:l,isStringTag:"string"==typeof o}),s.createElement(o,c))})),Tg=Mg,Ag=function(e,t){var n=arguments;if(null==t||!Ng.call(t,"css"))return s.createElement.apply(void 0,n);var r=n.length,o=new Array(r);o[0]=Tg,o[1]=function(e,t){var n={};for(var r in t)Ng.call(t,r)&&(n[r]=t[r]);return n[Pg]=e,n}(e,t);for(var i=2;i<r;i++)o[i]=n[i];return s.createElement.apply(null,o)};function Dg(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return xg(t)}function Ig(){var e=Dg.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_"}}}Eg=Ag||(Ag={}),_g||(_g=Eg.JSX||(Eg.JSX={}));var Lg=/^((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)-.*))$/,zg=Qm((function(e){return Lg.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),Fg=function(e){return"theme"!==e},jg=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?zg:Fg},$g=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},Bg=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return cg(t,n,r),kg((function(){return ug(t,n,r)})),null},Vg=function e(t,n){var r,o,i=t.__emotion_real===t,a=i&&t.__emotion_base||t;void 0!==n&&(r=n.label,o=n.target);var l=$g(t,n,i),c=l||jg(a),u=!c("as");return function(){var d=arguments,f=i&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&f.push("label:"+r+";"),null==d[0]||void 0===d[0].raw)f.push.apply(f,d);else{var p=d[0];f.push(p[0]);for(var h=d.length,m=1;m<h;m++)f.push(d[m],p[m])}var g=Cg((function(e,t,n){var r=u&&e.as||a,i="",d=[],p=e;if(null==e.theme){for(var h in p={},e)p[h]=e[h];p.theme=s.useContext(Og)}"string"==typeof e.className?i=sg(t.registered,d,e.className):null!=e.className&&(i=e.className+" ");var m=xg(f.concat(d),t.registered,p);i+=t.key+"-"+m.name,void 0!==o&&(i+=" "+o);var g=u&&void 0===l?jg(r):c,y={};for(var v in e)u&&"as"===v||g(v)&&(y[v]=e[v]);return y.className=i,n&&(y.ref=n),s.createElement(s.Fragment,null,s.createElement(Bg,{cache:t,serialized:m,isStringTag:"string"==typeof r}),s.createElement(r,y))}));return g.displayName=void 0!==r?r:"Styled("+("string"==typeof a?a:a.displayName||a.name||"Component")+")",g.defaultProps=t.defaultProps,g.__emotion_real=g,g.__emotion_base=a,g.__emotion_styles=f,g.__emotion_forwardProp=l,Object.defineProperty(g,"toString",{value:function(){return"."+o}}),g.withComponent=function(t,r){return e(t,nm({},n,r,{shouldForwardProp:$g(g,r,!0)})).apply(void 0,f)},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){Vg[e]=Vg(e)}));const Hg=[];function Ug(e){return Hg[0]=e,xg(Hg)}function Wg(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 l(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function s(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:l,down:s,between:c,only:function(e){return a.indexOf(e)+1<a.length?c(e,a[a.indexOf(e)+1]):l(e)},not:function(e){const t=a.indexOf(e);return 0===t?l(a[1]):t===a.length-1?s(a[t]):c(e,a[a.indexOf(e)+1]).replace("@media","@media not all and")},unit:n,...o}}const qg={borderRadius:4};function Kg(e=8,t=wh({spacing:e})){if(e.mui)return e;const n=(...e)=>(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 Xg(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 Yg(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:i={},...a}=e;let l=vp({breakpoints:Wg(n),direction:"ltr",components:{},palette:{mode:"light",...r},spacing:Kg(o),shape:{...qg,...i}},a);return l=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}}(l),l.applyStyles=Xg,l=t.reduce(((e,t)=>vp(e,t)),l),l.unstable_sxConfig={...Jh,...a?.unstable_sxConfig},l.unstable_sx=function(e){return em({sx:e,theme:this})},l}function Gg(e=null){const t=s.useContext(Og);return t&&(n=t,0!==Object.keys(n).length)?t:e;var n}const Qg=Yg();function Zg(e){const{variants:t,...n}=e,r={variants:t,style:Ug(n),isProcessed:!0};return r.style===n||t&&t.forEach((e=>{"function"!=typeof e.style&&(e.style=Ug(e.style))})),r}const Jg=Yg();function ey(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function ty(e){return e?(t,n)=>n[e]:null}function ny(e,t){const n="function"==typeof t?t(e):t;if(Array.isArray(n))return n.flatMap((t=>ny(e,t)));if(Array.isArray(n?.variants)){let t;if(n.isProcessed)t=n.style;else{const{variants:e,...r}=n;t=r}return ry(e,n.variants,[t])}return n?.isProcessed?n.style:n}function ry(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 oy(e={}){const{themeId:t,defaultTheme:n=Jg,rootShouldForwardProp:r=ey,slotShouldForwardProp:o=ey}=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!==em))));const{name:n,slot:a,skipVariantsResolver:l,skipSx:s,overridesResolver:c=ty(ay(a)),...u}=t,d=void 0!==l?l:a&&"Root"!==a&&"root"!==a||!1,f=s||!1;let p=ey;"Root"===a||"root"===a?p=r:a?p=o:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(p=void 0);const h=
10
+ */var k=(g||(g=1,y.exports=function(){if(m)return v;m=1;var e=l(),t=x(),n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=t.useSyncExternalStore,o=e.useRef,i=e.useEffect,a=e.useMemo,s=e.useDebugValue;return v.useSyncExternalStoreWithSelector=function(e,t,l,c,u){var d=o(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=a((function(){function e(e){if(!i){if(i=!0,r=e,e=c(e),void 0!==u&&f.hasValue){var t=f.value;if(u(t,e))return o=t}return o=e}if(t=o,n(r,e))return t;var a=c(e);return void 0!==u&&u(t,a)?(r=e,t):(r=e,o=a)}var r,o,i=!1,a=void 0===l?null:l;return[function(){return e(t())},null===a?void 0:function(){return e(a())}]}),[t,l,c,u]);var p=r(e,d[0],d[1]);return i((function(){f.hasValue=!0,f.value=p}),[p]),s(p),p},v}()),y.exports),S=t(k);const{useDebugValue:E}=c,{useSyncExternalStoreWithSelector:_}=S;let C=!1;const O=e=>e;const N=e=>{"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?f(e):e,n=(e,n)=>function(e,t=O,n){n&&!C&&(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"),C=!0);const r=_(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return E(r),r}(t,e,n);return Object.assign(n,t),n},P=e=>e?N(e):N;function R(e){return"[object Object]"===Object.prototype.toString.call(e)}function M(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(!M(e[o],t[o]))return!1}}return!(e instanceof Date&&t instanceof Date)||e.getTime()===t.getTime()}const T=(e,t)=>{let n=!1;if(!R(e))throw new Error("Target must be a plain object");if(!R(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(R(i)&&R(a)){const{new_obj:e,change:t}=T(a,i);t&&(n=!0,r[o]=e)}else M(a,i)||(n=!0,r[o]=i)})),{new_obj:r,change:n}},A=(e,t)=>{let n=!1;if(!R(e))throw new Error("Target must be a plain object");if(!R(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(R(i)&&R(a)){const{new_obj:e,change:t}=A(a,i);t&&(n=!0,r[o]=e)}}})),{new_obj:r,change:n}},D={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},I=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}=A(e,D);return"any"!==t.render_options.type&&void 0!==t.render_options.type||(t.render_options.type=t.type),t},L={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}},z=JSON.stringify(L),F=e=>{if(!e.id)throw new Error("Node must have an id");const t=JSON.parse(z),{new_obj:n}=A(e,t);for(const e in n.io){if(void 0===n.io[e])continue;void 0===n.io[e].id&&(n.io[e].id=e);const t=I(n.io[e]);n.io[e]=t}return n},j=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 $(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=$(e[r]))&&(t+=(t&&" ")+n);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}const{useDebugValue:B}=c,{useSyncExternalStoreWithSelector:V}=S,H=e=>e;function U(e,t=H,n){const r=V(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return B(r),r}const W=(e,t)=>{const n=f(e),r=(e,r=t)=>U(n,e,r);return Object.assign(r,n),r};function q(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 K={value:()=>{}};function X(){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 Y(r)}function Y(e){this._=e}function G(e,t){for(var n,r=0,o=e.length;r<o;++r)if((n=e[r]).name===t)return n.value}function Q(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=K,e=e.slice(0,r).concat(e.slice(r+1));break}return null!=n&&e.push({name:t,value:n}),e}Y.prototype=X.prototype={constructor:Y,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]=Q(r[n],e.name,t);else if(null==t)for(n in r)r[n]=Q(r[n],e.name,null);return this}for(;++i<a;)if((n=(e=o[i]).type)&&(n=G(r[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Y(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 Z="http://www.w3.org/1999/xhtml",J={svg:"http://www.w3.org/2000/svg",xhtml:Z,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ee(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),J.hasOwnProperty(t)?{space:J[t],local:e}:e}function te(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Z&&t.documentElement.namespaceURI===Z?t.createElement(e):t.createElementNS(n,e)}}function ne(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function re(e){var t=ee(e);return(t.local?ne:te)(t)}function oe(){}function ie(e){return null==e?oe:function(){return this.querySelector(e)}}function ae(){return[]}function le(e){return null==e?ae: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 ce(e){return function(){return this.matches(e)}}function ue(e){return function(t){return t.matches(e)}}var de=Array.prototype.find;function fe(){return this.firstElementChild}var pe=Array.prototype.filter;function he(){return Array.from(this.children)}function me(e){return new Array(e.length)}function ge(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function ye(e,t,n,r,o,i){for(var a,l=0,s=t.length,c=i.length;l<c;++l)(a=t[l])?(a.__data__=i[l],r[l]=a):n[l]=new ge(e,i[l]);for(;l<s;++l)(a=t[l])&&(o[l]=a)}function ve(e,t,n,r,o,i,a){var l,s,c,u=new Map,d=t.length,f=i.length,p=new Array(d);for(l=0;l<d;++l)(s=t[l])&&(p[l]=c=a.call(s,s.__data__,l,t)+"",u.has(c)?o[l]=s:u.set(c,s));for(l=0;l<f;++l)c=a.call(e,i[l],l,i)+"",(s=u.get(c))?(r[l]=s,s.__data__=i[l],u.delete(c)):n[l]=new ge(e,i[l]);for(l=0;l<d;++l)(s=t[l])&&u.get(p[l])===s&&(o[l]=s)}function be(e){return e.__data__}function we(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function xe(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function ke(e){return function(){this.removeAttribute(e)}}function Se(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ee(e,t){return function(){this.setAttribute(e,t)}}function _e(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Ce(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function Oe(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 Ne(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Pe(e){return function(){this.style.removeProperty(e)}}function Re(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Me(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Te(e,t){return e.style.getPropertyValue(t)||Ne(e).getComputedStyle(e,null).getPropertyValue(t)}function Ae(e){return function(){delete this[e]}}function De(e,t){return function(){this[e]=t}}function Ie(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function Le(e){return e.trim().split(/^|\s+/)}function ze(e){return e.classList||new Fe(e)}function Fe(e){this._node=e,this._names=Le(e.getAttribute("class")||"")}function je(e,t){for(var n=ze(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function $e(e,t){for(var n=ze(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function Be(e){return function(){je(this,e)}}function Ve(e){return function(){$e(this,e)}}function He(e,t){return function(){(t.apply(this,arguments)?je:$e)(this,e)}}function Ue(){this.textContent=""}function We(e){return function(){this.textContent=e}}function qe(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function Ke(){this.innerHTML=""}function Xe(e){return function(){this.innerHTML=e}}function Ye(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function Ge(){this.nextSibling&&this.parentNode.appendChild(this)}function Qe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ze(){return null}function Je(){var e=this.parentNode;e&&e.removeChild(this)}function et(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function tt(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function nt(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 rt(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,l=o.length;a<l;++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 ot(e,t,n){var r=Ne(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 it(e,t){return function(){return ot(this,e,t)}}function at(e,t){return function(){return ot(this,e,t.apply(this,arguments))}}ge.prototype={constructor:ge,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)}},Fe.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 lt=[null];function st(e,t){this._groups=e,this._parents=t}function ct(){return new st([[document.documentElement]],lt)}function ut(e){return"string"==typeof e?new st([[document.querySelector(e)]],[document.documentElement]):new st([[e]],lt)}function dt(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=ct.prototype={constructor:st,select: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,l=t[o],s=l.length,c=r[o]=new Array(s),u=0;u<s;++u)(i=l[u])&&(a=e.call(i,i.__data__,u,l))&&("__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):le(e);for(var t=this._groups,n=t.length,r=[],o=[],i=0;i<n;++i)for(var a,l=t[i],s=l.length,c=0;c<s;++c)(a=l[c])&&(r.push(e.call(a,a.__data__,c,l)),o.push(a));return new st(r,o)},selectChild:function(e){return this.select(null==e?fe:function(e){return function(){return de.call(this.children,e)}}("function"==typeof e?e:ue(e)))},selectChildren:function(e){return this.selectAll(null==e?he:function(e){return function(){return pe.call(this.children,e)}}("function"==typeof e?e:ue(e)))},filter: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=t[o],l=a.length,s=r[o]=[],c=0;c<l;++c)(i=a[c])&&e.call(i,i.__data__,c,a)&&s.push(i);return new st(r,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,be);var n,r=t?ve:ye,o=this._parents,i=this._groups;"function"!=typeof e&&(n=e,e=function(){return n});for(var a=i.length,l=new Array(a),s=new Array(a),c=new Array(a),u=0;u<a;++u){var d=o[u],f=i[u],p=f.length,h=we(e.call(d,d&&d.__data__,u,o)),m=h.length,g=s[u]=new Array(m),y=l[u]=new Array(m);r(d,f,g,y,c[u]=new Array(p),h,t);for(var v,b,w=0,x=0;w<m;++w)if(v=g[w]){for(w>=x&&(x=w+1);!(b=y[x])&&++x<m;);v._next=b||null}}return(l=new st(l,o))._enter=s,l._exit=c,l},enter:function(){return new st(this._enter||this._groups.map(me),this._parents)},exit:function(){return new st(this._exit||this._groups.map(me),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),l=new Array(o),s=0;s<a;++s)for(var c,u=n[s],d=r[s],f=u.length,p=l[s]=new Array(f),h=0;h<f;++h)(c=u[h]||d[h])&&(p[h]=c);for(;s<o;++s)l[s]=n[s];return new st(l,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=xe);for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var a,l=n[i],s=l.length,c=o[i]=new Array(s),u=0;u<s;++u)(a=l[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,l=i.length;a<l;++a)(o=i[a])&&e.call(o,o.__data__,a,i);return this},attr:function(e,t){var n=ee(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?Se:ke:"function"==typeof t?n.local?Oe:Ce:n.local?_e:Ee)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?Pe:"function"==typeof t?Me:Re)(e,t,null==n?"":n)):Te(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?Ae:"function"==typeof t?Ie:De)(e,t)):this.node()[e]},classed:function(e,t){var n=Le(e+"");if(arguments.length<2){for(var r=ze(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each(("function"==typeof t?He:t?Be:Ve)(n,t))},text:function(e){return arguments.length?this.each(null==e?Ue:("function"==typeof e?qe:We)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?Ke:("function"==typeof e?Ye:Xe)(e)):this.node().innerHTML},raise:function(){return this.each(Ge)},lower:function(){return this.each(Qe)},append:function(e){var t="function"==typeof e?e:re(e);return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var n="function"==typeof e?e:re(e),r=null==t?Ze:"function"==typeof t?t:ie(t);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Je)},clone:function(e){return this.select(e?tt:et)},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(l=t?rt:nt,r=0;r<a;++r)this.each(l(i[r],t,n));return this}var l=this.node().__on;if(l)for(var s,c=0,u=l.length;c<u;++c)for(r=0,s=l[c];r<a;++r)if((o=i[r]).type===s.type&&o.name===s.name)return s.value},dispatch:function(e,t){return this.each(("function"==typeof t?at:it)(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 ft={passive:!1},pt={capture:!0,passive:!1};function ht(e){e.stopImmediatePropagation()}function mt(e){e.preventDefault(),e.stopImmediatePropagation()}function gt(e){var t=e.document.documentElement,n=ut(e).on("dragstart.drag",mt,pt);"onselectstart"in t?n.on("selectstart.drag",mt,pt):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function yt(e,t){var n=e.document.documentElement,r=ut(e).on("dragstart.drag",null);t&&(r.on("click.drag",mt,pt),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 vt=e=>()=>e;function bt(e,{sourceEvent:t,subject:n,target:r,identifier:o,active:i,x:a,y:l,dx:s,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:l,enumerable:!0,configurable:!0},dx:{value:s,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:u}})}function wt(e){return!e.ctrlKey&&!e.button}function xt(){return this.parentNode}function kt(e,t){return null==t?{x:e.x,y:e.y}:t}function St(){return navigator.maxTouchPoints||"ontouchstart"in this}function Et(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function _t(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Ct(){}bt.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};var Ot=.7,Nt=1/Ot,Pt="\\s*([+-]?\\d+)\\s*",Rt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Mt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Tt=/^#([0-9a-f]{3,8})$/,At=new RegExp(`^rgb\\(${Pt},${Pt},${Pt}\\)$`),Dt=new RegExp(`^rgb\\(${Mt},${Mt},${Mt}\\)$`),It=new RegExp(`^rgba\\(${Pt},${Pt},${Pt},${Rt}\\)$`),Lt=new RegExp(`^rgba\\(${Mt},${Mt},${Mt},${Rt}\\)$`),zt=new RegExp(`^hsl\\(${Rt},${Mt},${Mt}\\)$`),Ft=new RegExp(`^hsla\\(${Rt},${Mt},${Mt},${Rt}\\)$`),jt={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 $t(){return this.rgb().formatHex()}function Bt(){return this.rgb().formatRgb()}function Vt(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Tt.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Ht(t):3===n?new qt(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Ut(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Ut(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=At.exec(e))?new qt(t[1],t[2],t[3],1):(t=Dt.exec(e))?new qt(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=It.exec(e))?Ut(t[1],t[2],t[3],t[4]):(t=Lt.exec(e))?Ut(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=zt.exec(e))?Zt(t[1],t[2]/100,t[3]/100,1):(t=Ft.exec(e))?Zt(t[1],t[2]/100,t[3]/100,t[4]):jt.hasOwnProperty(e)?Ht(jt[e]):"transparent"===e?new qt(NaN,NaN,NaN,0):null}function Ht(e){return new qt(e>>16&255,e>>8&255,255&e,1)}function Ut(e,t,n,r){return r<=0&&(e=t=n=NaN),new qt(e,t,n,r)}function Wt(e,t,n,r){return 1===arguments.length?((o=e)instanceof Ct||(o=Vt(o)),o?new qt((o=o.rgb()).r,o.g,o.b,o.opacity):new qt):new qt(e,t,n,null==r?1:r);var o}function qt(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Kt(){return`#${Qt(this.r)}${Qt(this.g)}${Qt(this.b)}`}function Xt(){const e=Yt(this.opacity);return`${1===e?"rgb(":"rgba("}${Gt(this.r)}, ${Gt(this.g)}, ${Gt(this.b)}${1===e?")":`, ${e})`}`}function Yt(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Gt(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Qt(e){return((e=Gt(e))<16?"0":"")+e.toString(16)}function Zt(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new en(e,t,n,r)}function Jt(e){if(e instanceof en)return new en(e.h,e.s,e.l,e.opacity);if(e instanceof Ct||(e=Vt(e)),!e)return new en;if(e instanceof en)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,l=i-o,s=(i+o)/2;return l?(a=t===i?(n-r)/l+6*(n<r):n===i?(r-t)/l+2:(t-n)/l+4,l/=s<.5?i+o:2-i-o,a*=60):l=s>0&&s<1?0:a,new en(a,l,s,e.opacity)}function en(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function tn(e){return(e=(e||0)%360)<0?e+360:e}function nn(e){return Math.max(0,Math.min(1,e||0))}function rn(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Et(Ct,Vt,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:$t,formatHex:$t,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Jt(this).formatHsl()},formatRgb:Bt,toString:Bt}),Et(qt,Wt,_t(Ct,{brighter(e){return e=null==e?Nt:Math.pow(Nt,e),new qt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Ot:Math.pow(Ot,e),new qt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new qt(Gt(this.r),Gt(this.g),Gt(this.b),Yt(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:Kt,formatHex:Kt,formatHex8:function(){return`#${Qt(this.r)}${Qt(this.g)}${Qt(this.b)}${Qt(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Xt,toString:Xt})),Et(en,(function(e,t,n,r){return 1===arguments.length?Jt(e):new en(e,t,n,null==r?1:r)}),_t(Ct,{brighter(e){return e=null==e?Nt:Math.pow(Nt,e),new en(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Ot:Math.pow(Ot,e),new en(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 qt(rn(e>=240?e-240:e+120,o,r),rn(e,o,r),rn(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new en(tn(this.h),nn(this.s),nn(this.l),Yt(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=Yt(this.opacity);return`${1===e?"hsl(":"hsla("}${tn(this.h)}, ${100*nn(this.s)}%, ${100*nn(this.l)}%${1===e?")":`, ${e})`}`}}));var on=e=>()=>e;function an(e){return 1==(e=+e)?ln: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):on(isNaN(t)?n:t)}}function ln(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):on(isNaN(e)?t:e)}var sn=function e(t){var n=an(t);function r(e,t){var r=n((e=Wt(e)).r,(t=Wt(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=ln(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 cn(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var un=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,dn=new RegExp(un.source,"g");function fn(e,t){var n,r,o,i=un.lastIndex=dn.lastIndex=0,a=-1,l=[],s=[];for(e+="",t+="";(n=un.exec(e))&&(r=dn.exec(t));)(o=r.index)>i&&(o=t.slice(i,o),l[a]?l[a]+=o:l[++a]=o),(n=n[0])===(r=r[0])?l[a]?l[a]+=r:l[++a]=r:(l[++a]=null,s.push({i:a,x:cn(n,r)})),i=dn.lastIndex;return i<t.length&&(o=t.slice(i),l[a]?l[a]+=o:l[++a]=o),l.length<2?s[0]?function(e){return function(t){return e(t)+""}}(s[0].x):function(e){return function(){return e}}(t):(t=s.length,function(e){for(var n,r=0;r<t;++r)l[(n=s[r]).i]=n.x(e);return l.join("")})}var pn,hn=180/Math.PI,mn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function gn(e,t,n,r,o,i){var a,l,s;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(s=e*n+t*r)&&(n-=e*s,r-=t*s),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,s/=l),e*r<t*n&&(e=-e,t=-t,s=-s,a=-a),{translateX:o,translateY:i,rotate:Math.atan2(t,e)*hn,skewX:Math.atan(s)*hn,scaleX:a,scaleY:l}}function yn(e,t,n,r){function o(e){return e.length?e.pop()+" ":""}return function(i,a){var l=[],s=[];return i=e(i),a=e(a),function(e,r,o,i,a,l){if(e!==o||r!==i){var s=a.push("translate(",null,t,null,n);l.push({i:s-4,x:cn(e,o)},{i:s-2,x:cn(r,i)})}else(o||i)&&a.push("translate("+o+t+i+n)}(i.translateX,i.translateY,a.translateX,a.translateY,l,s),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:cn(e,t)})):t&&n.push(o(n)+"rotate("+t+r)}(i.rotate,a.rotate,l,s),function(e,t,n,i){e!==t?i.push({i:n.push(o(n)+"skewX(",null,r)-2,x:cn(e,t)}):t&&n.push(o(n)+"skewX("+t+r)}(i.skewX,a.skewX,l,s),function(e,t,n,r,i,a){if(e!==n||t!==r){var l=i.push(o(i)+"scale(",null,",",null,")");a.push({i:l-4,x:cn(e,n)},{i:l-2,x:cn(t,r)})}else 1===n&&1===r||i.push(o(i)+"scale("+n+","+r+")")}(i.scaleX,i.scaleY,a.scaleX,a.scaleY,l,s),i=a=null,function(e){for(var t,n=-1,r=s.length;++n<r;)l[(t=s[n]).i]=t.x(e);return l.join("")}}}var vn=yn((function(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?mn:gn(t.a,t.b,t.c,t.d,t.e,t.f)}),"px, ","px)","deg)"),bn=yn((function(e){return null==e?mn:(pn||(pn=document.createElementNS("http://www.w3.org/2000/svg","g")),pn.setAttribute("transform",e),(e=pn.transform.baseVal.consolidate())?gn((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):mn)}),", ",")",")");function wn(e){return((e=Math.exp(e))+1/e)/2}var xn,kn,Sn=function e(t,n,r){function o(e,o){var i,a,l=e[0],s=e[1],c=e[2],u=o[0],d=o[1],f=o[2],p=u-l,h=d-s,m=p*p+h*h;if(m<1e-12)a=Math.log(f/c)/t,i=function(e){return[l+e*p,s+e*h,c*Math.exp(t*e*a)]};else{var g=Math.sqrt(m),y=(f*f-c*c+r*m)/(2*c*n*g),v=(f*f-c*c-r*m)/(2*f*n*g),b=Math.log(Math.sqrt(y*y+1)-y),w=Math.log(Math.sqrt(v*v+1)-v);a=(w-b)/t,i=function(e){var r,o=e*a,i=wn(b),u=c/(n*g)*(i*(r=t*o+b,((r=Math.exp(2*r))-1)/(r+1))-function(e){return((e=Math.exp(e))-1/e)/2}(b));return[l+u*p,s+u*h,c*i/wn(t*o+b)]}}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),En=0,_n=0,Cn=0,On=0,Nn=0,Pn=0,Rn="object"==typeof performance&&performance.now?performance:Date,Mn="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Tn(){return Nn||(Mn(An),Nn=Rn.now()+Pn)}function An(){Nn=0}function Dn(){this._call=this._time=this._next=null}function In(e,t,n){var r=new Dn;return r.restart(e,t,n),r}function Ln(){Nn=(On=Rn.now())+Pn,En=_n=0;try{!function(){Tn(),++En;for(var e,t=xn;t;)(e=Nn-t._time)>=0&&t._call.call(void 0,e),t=t._next;--En}()}finally{En=0,function(){var e,t,n=xn,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:xn=t);kn=e,Fn(r)}(),Nn=0}}function zn(){var e=Rn.now(),t=e-On;t>1e3&&(Pn-=t,On=e)}function Fn(e){En||(_n&&(_n=clearTimeout(_n)),e-Nn>24?(e<1/0&&(_n=setTimeout(Ln,e-Rn.now()-Pn)),Cn&&(Cn=clearInterval(Cn))):(Cn||(On=Rn.now(),Cn=setInterval(zn,1e3)),En=1,Mn(Ln)))}function jn(e,t,n){var r=new Dn;return t=null==t?0:+t,r.restart((n=>{r.stop(),e(n+t)}),t,n),r}Dn.prototype=In.prototype={constructor:Dn,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?Tn():+n)+(null==t?0:+t),this._next||kn===this||(kn?kn._next=this:xn=this,kn=this),this._call=e,this._time=n,Fn()},stop:function(){this._call&&(this._call=null,this._time=1/0,Fn())}};var $n=X("start","end","cancel","interrupt"),Bn=[];function Vn(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,f;if(1!==n.state)return s();for(c in o)if((f=o[c]).name===n.name){if(3===f.state)return jn(a);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete o[c]):+c<t&&(f.state=6,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete o[c])}if(jn((function(){3===n.state&&(n.state=4,n.timer.restart(l,n.delay,n.time),l(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)(f=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(r[++u]=f);r.length=u+1}}function l(t){for(var o=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(s),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),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete o[t],o)return;delete e.__transition}o[t]=n,n.timer=In(i,0,n.time)}(e,n,{name:t,index:r,group:o,on:$n,tween:Bn,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:0})}function Hn(e,t){var n=Wn(e,t);if(n.state>0)throw new Error("too late; already scheduled");return n}function Un(e,t){var n=Wn(e,t);if(n.state>3)throw new Error("too late; already running");return n}function Wn(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function qn(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 Kn(e,t){var n,r;return function(){var o=Un(this,e),i=o.tween;if(i!==n)for(var a=0,l=(r=n=i).length;a<l;++a)if(r[a].name===t){(r=r.slice()).splice(a,1);break}o.tween=r}}function Xn(e,t,n){var r,o;if("function"!=typeof n)throw new Error;return function(){var i=Un(this,e),a=i.tween;if(a!==r){o=(r=a).slice();for(var l={name:t,value:n},s=0,c=o.length;s<c;++s)if(o[s].name===t){o[s]=l;break}s===c&&o.push(l)}i.tween=o}}function Yn(e,t,n){var r=e._id;return e.each((function(){var e=Un(this,r);(e.value||(e.value={}))[t]=n.apply(this,arguments)})),function(e){return Wn(e,r).value[t]}}function Gn(e,t){var n;return("number"==typeof t?cn:t instanceof Vt?sn:(n=Vt(t))?(t=n,sn):fn)(e,t)}function Qn(e){return function(){this.removeAttribute(e)}}function Zn(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Jn(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 er(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 tr(e,t,n){var r,o,i;return function(){var a,l,s=n(this);if(null!=s)return(a=this.getAttribute(e))===(l=s+"")?null:a===r&&l===o?i:(o=l,i=t(r=a,s));this.removeAttribute(e)}}function nr(e,t,n){var r,o,i;return function(){var a,l,s=n(this);if(null!=s)return(a=this.getAttributeNS(e.space,e.local))===(l=s+"")?null:a===r&&l===o?i:(o=l,i=t(r=a,s));this.removeAttributeNS(e.space,e.local)}}function rr(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 or(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 ir(e,t){return function(){Hn(this,e).delay=+t.apply(this,arguments)}}function ar(e,t){return t=+t,function(){Hn(this,e).delay=t}}function lr(e,t){return function(){Un(this,e).duration=+t.apply(this,arguments)}}function sr(e,t){return t=+t,function(){Un(this,e).duration=t}}var cr=ct.prototype.constructor;function ur(e){return function(){this.style.removeProperty(e)}}var dr=0;function fr(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function pr(){return++dr}var hr=ct.prototype;fr.prototype={constructor:fr,select:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=ie(e));for(var r=this._groups,o=r.length,i=new Array(o),a=0;a<o;++a)for(var l,s,c=r[a],u=c.length,d=i[a]=new Array(u),f=0;f<u;++f)(l=c[f])&&(s=e.call(l,l.__data__,f,c))&&("__data__"in l&&(s.__data__=l.__data__),d[f]=s,Vn(d[f],t,n,f,d,Wn(l,n)));return new fr(i,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=le(e));for(var r=this._groups,o=r.length,i=[],a=[],l=0;l<o;++l)for(var s,c=r[l],u=c.length,d=0;d<u;++d)if(s=c[d]){for(var f,p=e.call(s,s.__data__,d,c),h=Wn(s,n),m=0,g=p.length;m<g;++m)(f=p[m])&&Vn(f,t,n,m,p,h);i.push(p),a.push(s)}return new fr(i,a,t,n)},selectChild:hr.selectChild,selectChildren:hr.selectChildren,filter: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=t[o],l=a.length,s=r[o]=[],c=0;c<l;++c)(i=a[c])&&e.call(i,i.__data__,c,a)&&s.push(i);return new fr(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),l=0;l<i;++l)for(var s,c=t[l],u=n[l],d=c.length,f=a[l]=new Array(d),p=0;p<d;++p)(s=c[p]||u[p])&&(f[p]=s);for(;l<r;++l)a[l]=t[l];return new fr(a,this._parents,this._name,this._id)},selection:function(){return new cr(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=pr(),r=this._groups,o=r.length,i=0;i<o;++i)for(var a,l=r[i],s=l.length,c=0;c<s;++c)if(a=l[c]){var u=Wn(a,t);Vn(a,e,n,c,l,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new fr(r,this._parents,e,n)},call:hr.call,nodes:hr.nodes,node:hr.node,size:hr.size,empty:hr.empty,each:hr.each,on:function(e,t){var n=this._id;return arguments.length<2?Wn(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)?Hn:Un;return function(){var a=i(this,e),l=a.on;l!==r&&(o=(r=l).copy()).on(t,n),a.on=o}}(n,e,t))},attr:function(e,t){var n=ee(e),r="transform"===n?bn:Gn;return this.attrTween(e,"function"==typeof t?(n.local?nr:tr)(n,r,Yn(this,"attr."+e,t)):null==t?(n.local?Zn:Qn)(n):(n.local?er:Jn)(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=ee(e);return this.tween(n,(r.local?rr:or)(r,t))},style:function(e,t,n){var r="transform"==(e+="")?vn:Gn;return null==t?this.styleTween(e,function(e,t){var n,r,o;return function(){var i=Te(this,e),a=(this.style.removeProperty(e),Te(this,e));return i===a?null:i===n&&a===r?o:o=t(n=i,r=a)}}(e,r)).on("end.style."+e,ur(e)):"function"==typeof t?this.styleTween(e,function(e,t,n){var r,o,i;return function(){var a=Te(this,e),l=n(this),s=l+"";return null==l&&(this.style.removeProperty(e),s=l=Te(this,e)),a===s?null:a===r&&s===o?i:(o=s,i=t(r=a,l))}}(e,r,Yn(this,"style."+e,t))).each(function(e,t){var n,r,o,i,a="style."+t,l="end."+a;return function(){var s=Un(this,e),c=s.on,u=null==s.value[a]?i||(i=ur(t)):void 0;c===n&&o===u||(r=(n=c).copy()).on(l,o=u),s.on=r}}(this._id,e)):this.styleTween(e,function(e,t,n){var r,o,i=n+"";return function(){var a=Te(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}}(Yn(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=Wn(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?Kn:Xn)(n,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?ir:ar)(t,e)):Wn(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?lr:sr)(t,e)):Wn(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(){Un(this,e).ease=t}}(t,e)):Wn(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;Un(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 l={value:a},s={value:function(){0==--o&&i()}};n.each((function(){var n=Un(this,r),o=n.on;o!==e&&((t=(e=o).copy())._.cancel.push(l),t._.interrupt.push(l),t._.end.push(s)),n.on=t})),0===o&&i()}))},[Symbol.iterator]:hr[Symbol.iterator]};var mr={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}};function gr(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}ct.prototype.interrupt=function(e){return this.each((function(){qn(this,e)}))},ct.prototype.transition=function(e){var t,n;e instanceof fr?(t=e._id,e=e._name):(t=pr(),(n=mr).time=Tn(),e=null==e?null:e+"");for(var r=this._groups,o=r.length,i=0;i<o;++i)for(var a,l=r[i],s=l.length,c=0;c<s;++c)(a=l[c])&&Vn(a,e,t,c,l,n||gr(a,t));return new fr(r,this._parents,e,t)};var yr=e=>()=>e;function vr(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 wr=new br(1,0,0);function xr(e){e.stopImmediatePropagation()}function kr(e){e.preventDefault(),e.stopImmediatePropagation()}function Sr(e){return!(e.ctrlKey&&"wheel"!==e.type||e.button)}function Er(){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 _r(){return this.__zoom||wr}function Cr(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Or(){return navigator.maxTouchPoints||"ontouchstart"in this}function Nr(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 Pr(){var e,t,n,r=Sr,o=Er,i=Nr,a=Cr,l=Or,s=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],u=250,d=Sn,f=X("start","zoom","end"),p=0,h=10;function m(e){e.property("__zoom",_r).on("wheel.zoom",k,{passive:!1}).on("mousedown.zoom",S).on("dblclick.zoom",E).filter(l).on("touchstart.zoom",_).on("touchmove.zoom",C).on("touchend.zoom touchcancel.zoom",O).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(e,t){return(t=Math.max(s[0],Math.min(s[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 v(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function b(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),l=o.apply(e,i),s=null==n?v(l):"function"==typeof n?n.apply(e,i):n,c=Math.max(l[1][0]-l[0][0],l[1][1]-l[0][1]),u=e.__zoom,f="function"==typeof t?t.apply(e,i):t,p=d(u.invert(s).concat(c/u.k),f.invert(s).concat(c/f.k));return function(e){if(1===e)e=f;else{var t=p(e),n=c/t[2];e=new br(n,s[0]-t[0]*n,s[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 k(e,...t){if(r.apply(this,arguments)){var n=w(this,t).event(e),o=this.__zoom,l=Math.max(s[0],Math.min(s[1],o.k*Math.pow(2,a.apply(this,arguments)))),u=dt(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===l)return;n.mouse=[u,o.invert(u)],qn(this),n.start()}kr(e),n.wheel=setTimeout((function(){n.wheel=null,n.end()}),150),n.zoom("mouse",i(y(g(o,l),n.mouse[0],n.mouse[1]),n.extent,c))}}function S(e,...t){if(!n&&r.apply(this,arguments)){var o=e.currentTarget,a=w(this,t,!0).event(e),l=ut(e.view).on("mousemove.zoom",(function(e){if(kr(e),!a.moved){var t=e.clientX-u,n=e.clientY-d;a.moved=t*t+n*n>p}a.event(e).zoom("mouse",i(y(a.that.__zoom,a.mouse[0]=dt(e,o),a.mouse[1]),a.extent,c))}),!0).on("mouseup.zoom",(function(e){l.on("mousemove.zoom mouseup.zoom",null),yt(e.view,a.moved),kr(e),a.event(e).end()}),!0),s=dt(e,o),u=e.clientX,d=e.clientY;gt(e.view),xr(e),a.mouse=[s,this.__zoom.invert(s)],qn(this),a.start()}}function E(e,...t){if(r.apply(this,arguments)){var n=this.__zoom,a=dt(e.changedTouches?e.changedTouches[0]:e,this),l=n.invert(a),s=n.k*(e.shiftKey?.5:2),d=i(y(g(n,s),a,l),o.apply(this,t),c);kr(e),u>0?ut(this).transition().duration(u).call(b,d,a,e):ut(this).call(m.transform,d,a,e)}}function _(n,...o){if(r.apply(this,arguments)){var i,a,l,s,c=n.touches,u=c.length,d=w(this,o,n.changedTouches.length===u).event(n);for(xr(n),a=0;a<u;++a)s=[s=dt(l=c[a],this),this.__zoom.invert(s),l.identifier],d.touch0?d.touch1||d.touch0[2]===s[2]||(d.touch1=s,d.taps=0):(d.touch0=s,i=!0,d.taps=1+!!e);e&&(e=clearTimeout(e)),i&&(d.taps<2&&(t=s[0],e=setTimeout((function(){e=null}),500)),qn(this),d.start())}}function C(e,...t){if(this.__zooming){var n,r,o,a,l=w(this,t).event(e),s=e.changedTouches,u=s.length;for(kr(e),n=0;n<u;++n)o=dt(r=s[n],this),l.touch0&&l.touch0[2]===r.identifier?l.touch0[0]=o:l.touch1&&l.touch1[2]===r.identifier&&(l.touch1[0]=o);if(r=l.that.__zoom,l.touch1){var d=l.touch0[0],f=l.touch0[1],p=l.touch1[0],h=l.touch1[1],m=(m=p[0]-d[0])*m+(m=p[1]-d[1])*m,v=(v=h[0]-f[0])*v+(v=h[1]-f[1])*v;r=g(r,Math.sqrt(m/v)),o=[(d[0]+p[0])/2,(d[1]+p[1])/2],a=[(f[0]+h[0])/2,(f[1]+h[1])/2]}else{if(!l.touch0)return;o=l.touch0[0],a=l.touch0[1]}l.zoom("touch",i(y(r,o,a),l.extent,c))}}function O(e,...r){if(this.__zooming){var o,i,a=w(this,r).event(e),l=e.changedTouches,s=l.length;for(xr(e),n&&clearTimeout(n),n=setTimeout((function(){n=null}),500),o=0;o<s;++o)i=l[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=dt(i,this),Math.hypot(t[0]-i[0],t[1]-i[1])<h)){var c=ut(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",_r),e!==o?b(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?v(e):"function"==typeof n?n.apply(this,arguments):n,l=r.invert(a),s="function"==typeof t?t.apply(this,arguments):t;return i(y(g(r,s),a,l),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,l=null==r?v(e):"function"==typeof r?r.apply(this,arguments):r;return i(wr.translate(l[0],l[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=ut(this.that).datum();f.call(e,this.that,new vr(e,{sourceEvent:this.sourceEvent,target:m,transform:this.that.__zoom,dispatch:f}),t)}},m.wheelDelta=function(e){return arguments.length?(a="function"==typeof e?e:yr(+e),m):a},m.filter=function(e){return arguments.length?(r="function"==typeof e?e:yr(!!e),m):r},m.touchable=function(e){return arguments.length?(l="function"==typeof e?e:yr(!!e),m):l},m.extent=function(e){return arguments.length?(o="function"==typeof e?e:yr([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),m):o},m.scaleExtent=function(e){return arguments.length?(s[0]=+e[0],s[1]=+e[1],m):[s[0],s[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=f.on.apply(f,arguments);return e===f?m:e},m.clickDistance=function(e){return arguments.length?(p=(e=+e)*e,m):Math.sqrt(p)},m.tapDistance=function(e){return arguments.length?(h=+e,m):h},m}br.prototype;var Rr,Mr,Tr={exports:{}},Ar={};function Dr(){if(Rr)return Ar;Rr=1;var e=l();function t(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");var i=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function a(e,t){return"font"===e?"":"string"==typeof t?"use-credentials"===t?t:"":void 0}return Ar.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Ar.createPortal=function(e,n){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!n||1!==n.nodeType&&9!==n.nodeType&&11!==n.nodeType)throw Error(t(299));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:o,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,n,null,r)},Ar.flushSync=function(e){var t=i.T,n=r.p;try{if(i.T=null,r.p=2,e)return e()}finally{i.T=t,r.p=n,r.d.f()}},Ar.preconnect=function(e,t){"string"==typeof e&&(t?t="string"==typeof(t=t.crossOrigin)?"use-credentials"===t?t:"":void 0:t=null,r.d.C(e,t))},Ar.prefetchDNS=function(e){"string"==typeof e&&r.d.D(e)},Ar.preinit=function(e,t){if("string"==typeof e&&t&&"string"==typeof t.as){var n=t.as,o=a(n,t.crossOrigin),i="string"==typeof t.integrity?t.integrity:void 0,l="string"==typeof t.fetchPriority?t.fetchPriority:void 0;"style"===n?r.d.S(e,"string"==typeof t.precedence?t.precedence:void 0,{crossOrigin:o,integrity:i,fetchPriority:l}):"script"===n&&r.d.X(e,{crossOrigin:o,integrity:i,fetchPriority:l,nonce:"string"==typeof t.nonce?t.nonce:void 0})}},Ar.preinitModule=function(e,t){if("string"==typeof e)if("object"==typeof t&&null!==t){if(null==t.as||"script"===t.as){var n=a(t.as,t.crossOrigin);r.d.M(e,{crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0})}}else null==t&&r.d.M(e)},Ar.preload=function(e,t){if("string"==typeof e&&"object"==typeof t&&null!==t&&"string"==typeof t.as){var n=t.as,o=a(n,t.crossOrigin);r.d.L(e,n,{crossOrigin:o,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0,type:"string"==typeof t.type?t.type:void 0,fetchPriority:"string"==typeof t.fetchPriority?t.fetchPriority:void 0,referrerPolicy:"string"==typeof t.referrerPolicy?t.referrerPolicy:void 0,imageSrcSet:"string"==typeof t.imageSrcSet?t.imageSrcSet:void 0,imageSizes:"string"==typeof t.imageSizes?t.imageSizes:void 0,media:"string"==typeof t.media?t.media:void 0})}},Ar.preloadModule=function(e,t){if("string"==typeof e)if(t){var n=a(t.as,t.crossOrigin);r.d.m(e,{as:"string"==typeof t.as&&"script"!==t.as?t.as:void 0,crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0})}else r.d.m(e)},Ar.requestFormReset=function(e){r.d.r(e)},Ar.unstable_batchedUpdates=function(e,t){return e(t)},Ar.useFormState=function(e,t,n){return i.H.useFormState(e,t,n)},Ar.useFormStatus=function(){return i.H.useHostTransitionStatus()},Ar.version="19.0.0",Ar}function Ir(){if(Mr)return Tr.exports;return Mr=1,function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),Tr.exports=Dr(),Tr.exports}var Lr=Ir(),zr=t(Lr);const Fr=s.createContext(null),jr=Fr.Provider,$r=e=>`Node type "${e}" not found. Using fallback type "default".`,Br=()=>"The React Flow parent container needs a width and a height to render the graph.",Vr=()=>"Only child nodes can use a parent extent.",Hr=e=>`Marker type "${e}" doesn't exist.`,Ur=(e,t)=>`Couldn't create edge for ${e?"target":"source"} handle id: "${e?t.targetHandle:t.sourceHandle}", edge id: ${t.id}.`,Wr=()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",qr=e=>`Edge type "${e}" not found. Using fallback type "default".`,Kr=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.`,Xr=(()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001")();function Yr(e,t){const n=s.useContext(Fr);if(null===n)throw new Error(Xr);return U(n,e,t)}const Gr=()=>{const e=s.useContext(Fr);if(null===e)throw new Error(Xr);return s.useMemo((()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe,destroy:e.destroy})),[e])},Qr=e=>e.userSelectionActive?"none":"all";function Zr({position:e,children:t,className:n,style:r,...o}){const i=Yr(Qr),a=`${e}`.split("-");return c.createElement("div",{className:$(["react-flow__panel",n,...a]),style:{...r,pointerEvents:i},...o},t)}function Jr({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:c.createElement(Zr,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://reactflow.dev/pro"},c.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution"},"React Flow"))}var eo=s.memo((({x:e,y:t,label:n,labelStyle:r={},labelShowBg:o=!0,labelBgStyle:i={},labelBgPadding:a=[2,4],labelBgBorderRadius:l=2,children:u,className:d,...f})=>{const p=s.useRef(null),[h,m]=s.useState({x:0,y:0,width:0,height:0}),g=$(["react-flow__edge-textwrapper",d]);return s.useEffect((()=>{if(p.current){const e=p.current.getBBox();m({x:e.x,y:e.y,width:e.width,height:e.height})}}),[n]),void 0!==n&&n?c.createElement("g",{transform:`translate(${e-h.width/2} ${t-h.height/2})`,className:g,visibility:h.width?"visible":"hidden",...f},o&&c.createElement("rect",{width:h.width+2*a[0],x:-a[0],y:-a[1],height:h.height+2*a[1],className:"react-flow__edge-textbg",style:i,rx:l,ry:l}),c.createElement("text",{className:"react-flow__edge-text",y:h.height/2,dy:"0.3em",ref:p,style:r},n),u):null}));const to=e=>({width:e.offsetWidth,height:e.offsetHeight}),no=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),ro=(e={x:0,y:0},t)=>({x:no(e.x,t[0][0],t[1][0]),y:no(e.y,t[0][1],t[1][1])}),oo=(e,t,n)=>e<t?no(Math.abs(e-t),1,50)/50:e>n?-no(Math.abs(e-n),1,50)/50:0,io=(e,t)=>[20*oo(e.x,35,t.width-35),20*oo(e.y,35,t.height-35)],ao=e=>e.getRootNode?.()||window?.document,lo=(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)}),so=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),co=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),uo=e=>({...e.positionAbsolute||{x:0,y:0},width:e.width||0,height:e.height||0}),fo=(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)},po=e=>!isNaN(e)&&isFinite(e),ho=Symbol.for("internals"),mo=["Enter"," ","Escape"];function go(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 yo=e=>"clientX"in e,vo=(e,t)=>{const n=yo(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)}},bo=()=>"undefined"!=typeof navigator&&navigator?.userAgent?.indexOf("Mac")>=0,wo=({id:e,path:t,labelX:n,labelY:r,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:l,labelBgPadding:s,labelBgBorderRadius:u,style:d,markerEnd:f,markerStart:p,interactionWidth:h=20})=>c.createElement(c.Fragment,null,c.createElement("path",{id:e,style:d,d:t,fill:"none",className:"react-flow__edge-path",markerEnd:f,markerStart:p}),h&&c.createElement("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:h,className:"react-flow__edge-interaction"}),o&&po(n)&&po(r)?c.createElement(eo,{x:n,y:r,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:l,labelBgPadding:s,labelBgBorderRadius:u}):null);function xo(e,t,n){return void 0===n?n:r=>{const o=t().edges.find((t=>t.id===e));o&&n(r,{...o})}}function ko({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 So({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:o,sourceControlY:i,targetControlX:a,targetControlY:l}){const s=.125*e+.375*o+.375*a+.125*n,c=.125*t+.375*i+.375*l+.125*r;return[s,c,Math.abs(s-e),Math.abs(c-t)]}var Eo,_o,Co,Oo,No,Po;function Ro({pos:e,x1:t,y1:n,x2:r,y2:o}){return e===Po.Left||e===Po.Right?[.5*(t+r),n]:[t,.5*(n+o)]}function Mo({sourceX:e,sourceY:t,sourcePosition:n=Po.Bottom,targetX:r,targetY:o,targetPosition:i=Po.Top}){const[a,l]=Ro({pos:n,x1:e,y1:t,x2:r,y2:o}),[s,c]=Ro({pos:i,x1:r,y1:o,x2:e,y2:t}),[u,d,f,p]=So({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:a,sourceControlY:l,targetControlX:s,targetControlY:c});return[`M${e},${t} C${a},${l} ${s},${c} ${r},${o}`,u,d,f,p]}wo.displayName="BaseEdge",function(e){e.Strict="strict",e.Loose="loose"}(Eo||(Eo={})),function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"}(_o||(_o={})),function(e){e.Partial="partial",e.Full="full"}(Co||(Co={})),function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"}(Oo||(Oo={})),function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"}(No||(No={})),function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"}(Po||(Po={}));const To=s.memo((({sourceX:e,sourceY:t,targetX:n,targetY:r,sourcePosition:o=Po.Bottom,targetPosition:i=Po.Top,label:a,labelStyle:l,labelShowBg:s,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:h,markerStart:m,interactionWidth:g})=>{const[y,v,b]=Mo({sourceX:e,sourceY:t,sourcePosition:o,targetX:n,targetY:r,targetPosition:i});return c.createElement(wo,{path:y,labelX:v,labelY:b,label:a,labelStyle:l,labelShowBg:s,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:h,markerStart:m,interactionWidth:g})}));To.displayName="SimpleBezierEdge";const Ao={[Po.Left]:{x:-1,y:0},[Po.Right]:{x:1,y:0},[Po.Top]:{x:0,y:-1},[Po.Bottom]:{x:0,y:1}},Do=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function Io({source:e,sourcePosition:t=Po.Bottom,target:n,targetPosition:r=Po.Top,center:o,offset:i}){const a=Ao[t],l=Ao[r],s={x:e.x+a.x*i,y:e.y+a.y*i},c={x:n.x+l.x*i,y:n.y+l.y*i},u=(({source:e,sourcePosition:t=Po.Bottom,target:n})=>t===Po.Left||t===Po.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:s,sourcePosition:t,target:c}),d=0!==u.x?"x":"y",f=u[d];let p,h,m=[];const g={x:0,y:0},y={x:0,y:0},[v,b,w,x]=ko({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(a[d]*l[d]==-1){p=o.x??v,h=o.y??b;const e=[{x:p,y:s.y},{x:p,y:c.y}],t=[{x:s.x,y:h},{x:c.x,y:h}];m=a[d]===f?"x"===d?e:t:"x"===d?t:e}else{const o=[{x:s.x,y:c.y}],u=[{x:c.x,y:s.y}];if(m="x"===d?a.x===f?u:o:a.y===f?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]===f?g[d]=(s[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]===l[e],n=s[e]>c[e],r=s[e]<c[e];(1===a[d]&&(!t&&n||t&&r)||1!==a[d]&&(!t&&r||t&&n))&&(m="x"===d?o:u)}const v={x:s.x+g.x,y:s.y+g.y},b={x:c.x+y.x,y:c.y+y.y};Math.max(Math.abs(v.x-m[0].x),Math.abs(b.x-m[0].x))>=Math.max(Math.abs(v.y-m[0].y),Math.abs(b.y-m[0].y))?(p=(v.x+b.x)/2,h=m[0].y):(p=m[0].x,h=(v.y+b.y)/2)}return[[e,{x:s.x+g.x,y:s.y+g.y},...m,{x:c.x+y.x,y:c.y+y.y},n],p,h,w,x]}function Lo({sourceX:e,sourceY:t,sourcePosition:n=Po.Bottom,targetX:r,targetY:o,targetPosition:i=Po.Top,borderRadius:a=5,centerX:l,centerY:s,offset:c=20}){const[u,d,f,p,h]=Io({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:o},targetPosition:i,center:{x:l,y:s},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(Do(e,t)/2,Do(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 l=e.x<n.x?1:-1;return`L ${i},${a+o*(e.y<n.y?-1:1)}Q ${i},${a} ${i+o*l},${a}`}(u[n-1],t,u[n+1],a):`${0===n?"M":"L"}${t.x} ${t.y}`,e+=r}),"");return[m,d,f,p,h]}const zo=s.memo((({sourceX:e,sourceY:t,targetX:n,targetY:r,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:l,labelBgPadding:s,labelBgBorderRadius:u,style:d,sourcePosition:f=Po.Bottom,targetPosition:p=Po.Top,markerEnd:h,markerStart:m,pathOptions:g,interactionWidth:y})=>{const[v,b,w]=Lo({sourceX:e,sourceY:t,sourcePosition:f,targetX:n,targetY:r,targetPosition:p,borderRadius:g?.borderRadius,offset:g?.offset});return c.createElement(wo,{path:v,labelX:b,labelY:w,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:l,labelBgPadding:s,labelBgBorderRadius:u,style:d,markerEnd:h,markerStart:m,interactionWidth:y})}));zo.displayName="SmoothStepEdge";const Fo=s.memo((e=>c.createElement(zo,{...e,pathOptions:s.useMemo((()=>({borderRadius:0,offset:e.pathOptions?.offset})),[e.pathOptions?.offset])})));Fo.displayName="StepEdge";const jo=s.memo((({sourceX:e,sourceY:t,targetX:n,targetY:r,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:l,labelBgPadding:s,labelBgBorderRadius:u,style:d,markerEnd:f,markerStart:p,interactionWidth:h})=>{const[m,g,y]=function({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[o,i,a,l]=ko({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,o,i,a,l]}({sourceX:e,sourceY:t,targetX:n,targetY:r});return c.createElement(wo,{path:m,labelX:g,labelY:y,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:l,labelBgPadding:s,labelBgBorderRadius:u,style:d,markerEnd:f,markerStart:p,interactionWidth:h})}));function $o(e,t){return e>=0?.5*e:25*t*Math.sqrt(-e)}function Bo({pos:e,x1:t,y1:n,x2:r,y2:o,c:i}){switch(e){case Po.Left:return[t-$o(t-r,i),n];case Po.Right:return[t+$o(r-t,i),n];case Po.Top:return[t,n-$o(n-o,i)];case Po.Bottom:return[t,n+$o(o-n,i)]}}function Vo({sourceX:e,sourceY:t,sourcePosition:n=Po.Bottom,targetX:r,targetY:o,targetPosition:i=Po.Top,curvature:a=.25}){const[l,s]=Bo({pos:n,x1:e,y1:t,x2:r,y2:o,c:a}),[c,u]=Bo({pos:i,x1:r,y1:o,x2:e,y2:t,c:a}),[d,f,p,h]=So({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:l,sourceControlY:s,targetControlX:c,targetControlY:u});return[`M${e},${t} C${l},${s} ${c},${u} ${r},${o}`,d,f,p,h]}jo.displayName="StraightEdge";const Ho=s.memo((({sourceX:e,sourceY:t,targetX:n,targetY:r,sourcePosition:o=Po.Bottom,targetPosition:i=Po.Top,label:a,labelStyle:l,labelShowBg:s,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:h,markerStart:m,pathOptions:g,interactionWidth:y})=>{const[v,b,w]=Vo({sourceX:e,sourceY:t,sourcePosition:o,targetX:n,targetY:r,targetPosition:i,curvature:g?.curvature});return c.createElement(wo,{path:v,labelX:b,labelY:w,label:a,labelStyle:l,labelShowBg:s,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:h,markerStart:m,interactionWidth:y})}));Ho.displayName="BezierEdge";const Uo=s.createContext(null),Wo=Uo.Provider;Uo.Consumer;const qo=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`reactflow__edge-${e}${t||""}-${n}${r||""}`,Ko=(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("&")}`},Xo=({x:e,y:t},[n,r,o],i,[a,l])=>{const s={x:(e-n)/o,y:(t-r)/o};return i?{x:a*Math.round(s.x/a),y:l*Math.round(s.y/l)}:s},Yo=({x:e,y:t},[n,r,o])=>({x:e*o+n,y:t*o+r}),Go=(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}},Qo=(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}=Go(n,t).positionAbsolute;return lo(e,so({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 co(n)},Zo=(e,t,[n,r,o]=[0,0,1],i=!1,a=!1,l=[0,0])=>{const s={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}=Go(e,l),d={x:u.x,y:u.y,width:t||0,height:n||0},f=fo(s,d);(void 0===t||void 0===n||null===t||null===n||i&&f>0||f>=(t||0)*(n||0)||e.dragging)&&c.push(e)})),c},Jo=(e,t)=>{const n=e.map((e=>e.id));return t.filter((e=>n.includes(e.source)||n.includes(e.target)))},ei=(e,t,n,r,o,i=.1)=>{const a=t/(e.width*(1+i)),l=n/(e.height*(1+i)),s=Math.min(a,l),c=no(s,r,o);return{x:t/2-(e.x+e.width/2)*c,y:n/2-(e.y+e.height/2)*c,zoom:c}},ti=(e,t=0)=>e.transition().duration(t);function ni(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 ri={source:null,target:null,sourceHandle:null,targetHandle:null},oi=()=>({handleDomNode:null,isValid:!1,connection:ri,endHandle:null});function ii(e,t,n,r,o,i,a){const l="target"===o,s=a.querySelector(`.react-flow__handle[data-id="${e?.nodeId}-${e?.id}-${e?.type}"]`),c={...oi(),handleDomNode:s};if(s){const e=ai(void 0,s),o=s.getAttribute("data-nodeid"),a=s.getAttribute("data-handleid"),u=s.classList.contains("connectable"),d=s.classList.contains("connectableend"),f={source:l?o:n,sourceHandle:l?a:r,target:l?n:o,targetHandle:l?r:a};c.connection=f;u&&d&&(t===Eo.Strict?l&&"source"===e||!l&&"target"===e:o!==n||a!==r)&&(c.endHandle={nodeId:o,handleId:a,type:e},c.isValid=i(f))}return c}function ai(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function li(e){e?.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function si(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}function ci({event:e,handleId:t,nodeId:n,onConnect:r,isTarget:o,getState:i,setState:a,isValidConnection:l,edgeUpdaterType:s,onReconnectEnd:c}){const u=ao(e.target),{connectionMode:d,domNode:f,autoPanOnConnect:p,connectionRadius:h,onConnectStart:m,panBy:g,getNodes:y,cancelConnection:v}=i();let b,w=0;const{x:x,y:k}=vo(e),S=u?.elementFromPoint(x,k),E=ai(s,S),_=f?.getBoundingClientRect();if(!_||!E)return;let C,O=vo(e,_),N=!1,P=null,R=!1,M=null;const T=function({nodes:e,nodeId:t,handleId:n,handleType:r}){return e.reduce(((e,o)=>{if(o[ho]){const{handleBounds:i}=o[ho];let a=[],l=[];i&&(a=ni(o,i,"source",`${t}-${n}-${r}`),l=ni(o,i,"target",`${t}-${n}-${r}`)),e.push(...a,...l)}return e}),[])}({nodes:y(),nodeId:n,handleId:t,handleType:E}),A=()=>{if(!p)return;const[e,t]=io(O,_);g({x:e,y:t}),w=requestAnimationFrame(A)};function D(e){const{transform:r}=i();O=vo(e,_);const{handle:s,validHandleResult:c}=function(e,t,n,r,o,i){const{x:a,y:l}=vo(e),s=t.elementsFromPoint(a,l).find((e=>e.classList.contains("react-flow__handle")));if(s){const e=s.getAttribute("data-nodeid");if(e){const t=ai(void 0,s),r=s.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:oi()};if(1===c.length)return c[0];const d=c.some((({validHandleResult:e})=>e.isValid)),f=c.some((({handle:e})=>"target"===e.type));return c.find((({handle:e,validHandleResult:t})=>f?"target"===e.type:!d||t.isValid))||c[0]}(e,u,Xo(O,r,!1,[1,1]),h,T,(e=>ii(e,d,n,t,o?"target":"source",l,u)));if(b=s,N||(A(),N=!0),M=c.handleDomNode,P=c.connection,R=c.isValid,a({connectionPosition:b&&R?Yo({x:b.x,y:b.y},r):O,connectionStatus:si(!!b,R),connectionEndHandle:c.endHandle}),!b&&!R&&!M)return li(C);P.source!==P.target&&M&&(li(C),C=M,M.classList.add("connecting","react-flow__handle-connecting"),M.classList.toggle("valid",R),M.classList.toggle("react-flow__handle-valid",R))}function I(e){(b||M)&&P&&R&&r?.(P),i().onConnectEnd?.(e),s&&c?.(e),li(C),v(),cancelAnimationFrame(w),N=!1,R=!1,P=null,M=null,u.removeEventListener("mousemove",D),u.removeEventListener("mouseup",I),u.removeEventListener("touchmove",D),u.removeEventListener("touchend",I)}a({connectionPosition:O,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",D),u.addEventListener("mouseup",I),u.addEventListener("touchmove",D),u.addEventListener("touchend",I)}const ui=()=>!0,di=e=>({connectionStartHandle:e.connectionStartHandle,connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName}),fi=s.forwardRef((({type:e="source",position:t=Po.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:o=!0,isConnectableEnd:i=!0,id:a,onConnect:l,children:u,className:d,onMouseDown:f,onTouchStart:p,...h},m)=>{const g=a||null,y="target"===e,v=Gr(),b=s.useContext(Uo),{connectOnClick:w,noPanClassName:x}=Yr(di,q),{connecting:k,clickConnecting:S}=Yr(((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}})(b,g,e),q);b||v.getState().onError?.("010",Wr());const E=e=>{const{defaultEdgeOptions:t,onConnect:n,hasDefaultEdges:r}=v.getState(),o={...t,...e};if(r){const{edges:e,setEdges:t}=v.getState();t(((e,t)=>{if(!e.source||!e.target)return t;let n;return n=(e=>"id"in e&&"source"in e&&"target"in e)(e)?{...e}:{...e,id:qo(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),l?.(o)},_=e=>{if(!b)return;const t=yo(e);o&&(t&&0===e.button||!t)&&ci({event:e,handleId:g,nodeId:b,onConnect:E,isTarget:y,getState:v.getState,setState:v.setState,isValidConnection:n||v.getState().isValidConnection||ui}),t?f?.(e):p?.(e)};return c.createElement("div",{"data-handleid":g,"data-nodeid":b,"data-handlepos":t,"data-id":`${b}-${g}-${e}`,className:$(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",x,d,{source:!y,target:y,connectable:r,connectablestart:o,connectableend:i,connecting:S,connectionindicator:r&&(o&&!k||i&&k)}]),onMouseDown:_,onTouchStart:_,onClick:w?t=>{const{onClickConnectStart:r,onClickConnectEnd:i,connectionClickStartHandle:a,connectionMode:l,isValidConnection:s}=v.getState();if(!b||!a&&!o)return;if(!a)return r?.(t,{nodeId:b,handleId:g,handleType:e}),void v.setState({connectionClickStartHandle:{nodeId:b,type:e,handleId:g}});const c=ao(t.target),u=n||s||ui,{connection:d,isValid:f}=ii({nodeId:b,id:g,type:e},l,a.nodeId,a.handleId||null,a.type,u,c);f&&E(d),i?.(t),v.setState({connectionClickStartHandle:null})}:void 0,ref:m,...h},u)}));fi.displayName="Handle";var pi=s.memo(fi);const hi=({data:e,isConnectable:t,targetPosition:n=Po.Top,sourcePosition:r=Po.Bottom})=>c.createElement(c.Fragment,null,c.createElement(pi,{type:"target",position:n,isConnectable:t}),e?.label,c.createElement(pi,{type:"source",position:r,isConnectable:t}));hi.displayName="DefaultNode";var mi=s.memo(hi);const gi=({data:e,isConnectable:t,sourcePosition:n=Po.Bottom})=>c.createElement(c.Fragment,null,e?.label,c.createElement(pi,{type:"source",position:n,isConnectable:t}));gi.displayName="InputNode";var yi=s.memo(gi);const vi=({data:e,isConnectable:t,targetPosition:n=Po.Top})=>c.createElement(c.Fragment,null,c.createElement(pi,{type:"target",position:n,isConnectable:t}),e?.label);vi.displayName="OutputNode";var bi=s.memo(vi);const wi=()=>null;wi.displayName="GroupNode";const xi=e=>({selectedNodes:e.getNodes().filter((e=>e.selected)),selectedEdges:e.edges.filter((e=>e.selected)).map((e=>({...e})))}),ki=e=>e.id;function Si(e,t){return q(e.selectedNodes.map(ki),t.selectedNodes.map(ki))&&q(e.selectedEdges.map(ki),t.selectedEdges.map(ki))}const Ei=s.memo((({onSelectionChange:e})=>{const t=Gr(),{selectedNodes:n,selectedEdges:r}=Yr(xi,Si);return s.useEffect((()=>{const o={nodes:n,edges:r};e?.(o),t.getState().onSelectionChange.forEach((e=>e(o)))}),[n,r,e]),null}));Ei.displayName="SelectionListener";const _i=e=>!!e.onSelectionChange;function Ci({onSelectionChange:e}){const t=Yr(_i);return e||t?c.createElement(Ei,{onSelectionChange:e}):null}const Oi=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 Ni(e,t){s.useEffect((()=>{void 0!==e&&t(e)}),[e])}function Pi(e,t,n){s.useEffect((()=>{void 0!==t&&n({[e]:t})}),[t])}const Ri=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:o,onConnectStart:i,onConnectEnd:a,onClickConnectStart:l,onClickConnectEnd:c,nodesDraggable:u,nodesConnectable:d,nodesFocusable:f,edgesFocusable:p,edgesUpdatable:h,elevateNodesOnSelect:m,minZoom:g,maxZoom:y,nodeExtent:v,onNodesChange:b,onEdgesChange:w,elementsSelectable:x,connectionMode:k,snapGrid:S,snapToGrid:E,translateExtent:_,connectOnClick:C,defaultEdgeOptions:O,fitView:N,fitViewOptions:P,onNodesDelete:R,onEdgesDelete:M,onNodeDrag:T,onNodeDragStart:A,onNodeDragStop:D,onSelectionDrag:I,onSelectionDragStart:L,onSelectionDragStop:z,noPanClassName:F,nodeOrigin:j,rfId:$,autoPanOnConnect:B,autoPanOnNodeDrag:V,onError:H,connectionRadius:U,isValidConnection:W,nodeDragThreshold:K})=>{const{setNodes:X,setEdges:Y,setDefaultNodesAndEdges:G,setMinZoom:Q,setMaxZoom:Z,setTranslateExtent:J,setNodeExtent:ee,reset:te}=Yr(Oi,q),ne=Gr();return s.useEffect((()=>{const e=r?.map((e=>({...e,...O})));return G(n,e),()=>{te()}}),[]),Pi("defaultEdgeOptions",O,ne.setState),Pi("connectionMode",k,ne.setState),Pi("onConnect",o,ne.setState),Pi("onConnectStart",i,ne.setState),Pi("onConnectEnd",a,ne.setState),Pi("onClickConnectStart",l,ne.setState),Pi("onClickConnectEnd",c,ne.setState),Pi("nodesDraggable",u,ne.setState),Pi("nodesConnectable",d,ne.setState),Pi("nodesFocusable",f,ne.setState),Pi("edgesFocusable",p,ne.setState),Pi("edgesUpdatable",h,ne.setState),Pi("elementsSelectable",x,ne.setState),Pi("elevateNodesOnSelect",m,ne.setState),Pi("snapToGrid",E,ne.setState),Pi("snapGrid",S,ne.setState),Pi("onNodesChange",b,ne.setState),Pi("onEdgesChange",w,ne.setState),Pi("connectOnClick",C,ne.setState),Pi("fitViewOnInit",N,ne.setState),Pi("fitViewOnInitOptions",P,ne.setState),Pi("onNodesDelete",R,ne.setState),Pi("onEdgesDelete",M,ne.setState),Pi("onNodeDrag",T,ne.setState),Pi("onNodeDragStart",A,ne.setState),Pi("onNodeDragStop",D,ne.setState),Pi("onSelectionDrag",I,ne.setState),Pi("onSelectionDragStart",L,ne.setState),Pi("onSelectionDragStop",z,ne.setState),Pi("noPanClassName",F,ne.setState),Pi("nodeOrigin",j,ne.setState),Pi("rfId",$,ne.setState),Pi("autoPanOnConnect",B,ne.setState),Pi("autoPanOnNodeDrag",V,ne.setState),Pi("onError",H,ne.setState),Pi("connectionRadius",U,ne.setState),Pi("isValidConnection",W,ne.setState),Pi("nodeDragThreshold",K,ne.setState),Ni(e,X),Ni(t,Y),Ni(g,Q),Ni(y,Z),Ni(_,J),Ni(v,ee),null},Mi={display:"none"},Ti={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Ai="react-flow__node-desc",Di="react-flow__edge-desc",Ii=e=>e.ariaLiveMessage;function Li({rfId:e}){const t=Yr(Ii);return c.createElement("div",{id:`react-flow__aria-live-${e}`,"aria-live":"assertive","aria-atomic":"true",style:Ti},t)}function zi({rfId:e,disableKeyboardA11y:t}){return c.createElement(c.Fragment,null,c.createElement("div",{id:`${Ai}-${e}`,style:Mi},"Press enter or space to select a node.",!t&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "),c.createElement("div",{id:`${Di}-${e}`,style:Mi},"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."),!t&&c.createElement(Li,{rfId:e}))}var Fi=(e=null,t={actInsideInputWithModifier:!0})=>{const[n,r]=s.useState(!1),o=s.useRef(!1),i=s.useRef(new Set([])),[a,l]=s.useMemo((()=>{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.useEffect((()=>{const n="undefined"!=typeof document?document:null,s=t?.target||n;if(null!==e){const e=e=>{o.current=e.ctrlKey||e.metaKey||e.shiftKey;if((!o.current||o.current&&!t.actInsideInputWithModifier)&&go(e))return!1;const n=$i(e.code,l);i.current.add(e[n]),ji(a,i.current,!1)&&(e.preventDefault(),r(!0))},n=e=>{if((!o.current||o.current&&!t.actInsideInputWithModifier)&&go(e))return!1;const n=$i(e.code,l);ji(a,i.current,!0)?(r(!1),i.current.clear()):i.current.delete(e[n]),"Meta"===e.key&&i.current.clear(),o.current=!1},c=()=>{i.current.clear(),r(!1)};return s?.addEventListener("keydown",e),s?.addEventListener("keyup",n),window.addEventListener("blur",c),()=>{s?.removeEventListener("keydown",e),s?.removeEventListener("keyup",n),window.removeEventListener("blur",c)}}}),[e,r]),n};function ji(e,t,n){return e.filter((e=>n||e.length===t.size)).some((e=>e.every((e=>t.has(e)))))}function $i(e,t){return t.includes(e)?"code":"key"}function Bi(e,t,n,r){const o=e.parentNode||e.parentId;if(!o)return n;const i=t.get(o),a=Go(i,r);return Bi(i,t,{x:(n.x??0)+a.x,y:(n.y??0)+a.y,z:(i[ho]?.z??0)>(n.z??0)?i[ho]?.z??0:n.z??0},r)}function Vi(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}=Bi(r,e,{...r.position,z:r[ho]?.z??0},t);r.positionAbsolute={x:o,y:i},r[ho].z=a,n?.[r.id]&&(r[ho].isParent=!0)}}))}function Hi(e,t,n,r){const o=new Map,i={},a=r?1e3:0;return e.forEach((e=>{const n=(po(e.zIndex)?e.zIndex:0)+(e.selected?a:0),r=t.get(e.id),l={...e,positionAbsolute:{x:e.position.x,y:e.position.y}},s=e.parentNode||e.parentId;s&&(i[s]=!0);const c=r?.type&&r?.type!==e.type;Object.defineProperty(l,ho,{enumerable:!1,value:{handleBounds:c?void 0:r?.[ho]?.handleBounds,z:n}}),o.set(e.id,l)})),Vi(o,n,i),o}function Ui(e,t={}){const{getNodes:n,width:r,height:o,minZoom:i,maxZoom:a,d3Zoom:l,d3Selection:s,fitViewOnInitDone:c,fitViewOnInit:u,nodeOrigin:d}=e(),f=t.initial&&!c&&u;if(l&&s&&(f||!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=Qo(e,d),{x:c,y:u,zoom:f}=ei(n,r,o,t.minZoom??i,t.maxZoom??a,t.padding??.1),p=wr.translate(c,u).scale(f);return"number"==typeof t.duration&&t.duration>0?l.transform(ti(s,t.duration),p):l.transform(s,p),!0}}return!1}function Wi(e,t){return e.forEach((e=>{const n=t.get(e.id);n&&t.set(n.id,{...n,[ho]:n[ho],selected:e.selected})})),new Map(t)}function qi(e,t){return t.map((t=>{const n=e.find((e=>e.id===t.id));return n&&(t.selected=n.selected),t}))}function Ki({changedNodes:e,changedEdges:t,get:n,set:r}){const{nodeInternals:o,edges:i,onNodesChange:a,onEdgesChange:l,hasDefaultNodes:s,hasDefaultEdges:c}=n();e?.length&&(s&&r({nodeInternals:Wi(e,o)}),a?.(e)),t?.length&&(c&&r({edges:qi(t,i)}),l?.(t))}const Xi=()=>{},Yi={zoomIn:Xi,zoomOut:Xi,zoomTo:Xi,getZoom:()=>1,setViewport:Xi,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:Xi,fitBounds:Xi,project:e=>e,screenToFlowPosition:e=>e,flowToScreenPosition:e=>e,viewportInitialized:!1},Gi=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection});function Qi(){const e=(()=>{const e=Gr(),{d3Zoom:t,d3Selection:n}=Yr(Gi,q),r=s.useMemo((()=>n&&t?{zoomIn:e=>t.scaleBy(ti(n,e?.duration),1.2),zoomOut:e=>t.scaleBy(ti(n,e?.duration),1/1.2),zoomTo:(e,r)=>t.scaleTo(ti(n,r?.duration),e),getZoom:()=>e.getState().transform[2],setViewport:(r,o)=>{const[i,a,l]=e.getState().transform,s=wr.translate(r.x??i,r.y??a).scale(r.zoom??l);t.transform(ti(n,o?.duration),s)},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},fitView:t=>Ui(e.getState,t),setCenter:(r,o,i)=>{const{width:a,height:l,maxZoom:s}=e.getState(),c=void 0!==i?.zoom?i.zoom:s,u=a/2-r*c,d=l/2-o*c,f=wr.translate(u,d).scale(c);t.transform(ti(n,i?.duration),f)},fitBounds:(r,o)=>{const{width:i,height:a,minZoom:l,maxZoom:s}=e.getState(),{x:c,y:u,zoom:d}=ei(r,i,a,l,s,o?.padding??.1),f=wr.translate(c,u).scale(d);t.transform(ti(n,o?.duration),f)},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"),Xo(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:l}=i.getBoundingClientRect(),s={x:t.x-a,y:t.y-l};return Xo(s,n,r,o)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:o,y:i}=r.getBoundingClientRect(),a=Yo(t,n);return{x:a.x+o,y:a.y+i}},viewportInitialized:!0}:Yi),[t,n]);return r})(),t=Gr(),n=s.useCallback((()=>t.getState().getNodes().map((e=>({...e})))),[]),r=s.useCallback((e=>t.getState().nodeInternals.get(e)),[]),o=s.useCallback((()=>{const{edges:e=[]}=t.getState();return e.map((e=>({...e})))}),[]),i=s.useCallback((e=>{const{edges:n=[]}=t.getState();return n.find((t=>t.id===e))}),[]),a=s.useCallback((e=>{const{getNodes:n,setNodes:r,hasDefaultNodes:o,onNodesChange:i}=t.getState(),a=n(),l="function"==typeof e?e(a):e;if(o)r(l);else if(i){const e=0===l.length?a.map((e=>({type:"remove",id:e.id}))):l.map((e=>({item:e,type:"reset"})));i(e)}}),[]),l=s.useCallback((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"}))))}}),[]),c=s.useCallback((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)}}),[]),u=s.useCallback((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"}))))}}),[]),d=s.useCallback((()=>{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=s.useCallback((({nodes:e,edges:n})=>{const{nodeInternals:r,getNodes:o,edges:i,hasDefaultNodes:a,hasDefaultEdges:l,onNodesDelete:s,onEdgesDelete:c,onNodesChange:u,onEdgesChange:d}=t.getState(),f=(e||[]).map((e=>e.id)),p=(n||[]).map((e=>e.id)),h=o().reduce(((e,t)=>{const n=t.parentNode||t.parentId,r=!f.includes(t.id)&&n&&e.find((e=>e.id===n));return("boolean"!=typeof t.deletable||t.deletable)&&(f.includes(t.id)||r)&&e.push(t),e}),[]),m=i.filter((e=>"boolean"!=typeof e.deletable||e.deletable)),g=m.filter((e=>p.includes(e.id)));if(h||g){const e=Jo(h,m),n=[...g,...e],o=n.reduce(((e,t)=>(e.includes(t.id)||e.push(t.id),e)),[]);if((l||a)&&(l&&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&&(s?.(h),u)){u(h.map((e=>({id:e.id,type:"remove"}))))}}}),[]),p=s.useCallback((e=>{const n=po((r=e).width)&&po(r.height)&&po(r.x)&&po(r.y);var r;const o=n?null:t.getState().nodeInternals.get(e.id);if(!n&&!o)return[null,null,n];return[n?e:uo(o),o,n]}),[]),h=s.useCallback(((e,n=!0,r)=>{const[o,i,a]=p(e);return o?(r||t.getState().getNodes()).filter((e=>{if(!(a||e.id!==i.id&&e.positionAbsolute))return!1;const t=uo(e),r=fo(t,o);return n&&r>0||r>=o.width*o.height})):[]}),[]),m=s.useCallback(((e,t,n=!0)=>{const[r]=p(e);if(!r)return!1;const o=fo(r,t);return n&&o>0||o>=r.width*r.height}),[]);return s.useMemo((()=>({...e,getNodes:n,getNode:r,getEdges:o,getEdge:i,setNodes:a,setEdges:l,addNodes:c,addEdges:u,toObject:d,deleteElements:f,getIntersectingNodes:h,isNodeIntersecting:m})),[e,n,r,o,i,a,l,c,u,d,f,h,m])}const Zi={actInsideInputWithModifier:!1};const Ji={position:"absolute",width:"100%",height:"100%",top:0,left:0},ea=e=>({x:e.x,y:e.y,zoom:e.k}),ta=(e,t)=>e.target.closest(`.${t}`),na=(e,t)=>2===t&&Array.isArray(e)&&e.includes(2),ra=e=>{const t=e.ctrlKey&&bo()?10:1;return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*t},oa=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection,d3ZoomHandler:e.d3ZoomHandler,userSelectionActive:e.userSelectionActive}),ia=({onMove:e,onMoveStart:t,onMoveEnd:n,onPaneContextMenu:r,zoomOnScroll:o=!0,zoomOnPinch:i=!0,panOnScroll:a=!1,panOnScrollSpeed:l=.5,panOnScrollMode:u=_o.Free,zoomOnDoubleClick:d=!0,elementsSelectable:f,panOnDrag:p=!0,defaultViewport:h,translateExtent:m,minZoom:g,maxZoom:y,zoomActivationKeyCode:v,preventScrolling:b=!0,children:w,noWheelClassName:x,noPanClassName:k})=>{const S=s.useRef(),E=Gr(),_=s.useRef(!1),C=s.useRef(!1),O=s.useRef(null),N=s.useRef({x:0,y:0,zoom:0}),{d3Zoom:P,d3Selection:R,d3ZoomHandler:M,userSelectionActive:T}=Yr(oa,q),A=Fi(v),D=s.useRef(0),I=s.useRef(!1),L=s.useRef();return function(e){const t=Gr();s.useEffect((()=>{let n;const r=()=>{if(!e.current)return;const n=to(e.current);0!==n.height&&0!==n.width||t.getState().onError?.("004",Br()),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)}}),[])}(O),s.useEffect((()=>{if(O.current){const e=O.current.getBoundingClientRect(),t=Pr().scaleExtent([g,y]).translateExtent(m),n=ut(O.current).call(t),r=wr.translate(h.x,h.y).scale(no(h.zoom,g,y)),o=[[0,0],[e.width,e.height]],i=t.constrain()(r,o,m);t.transform(n,i),t.wheelDelta(ra),E.setState({d3Zoom:t,d3Selection:n,d3ZoomHandler:n.on("wheel.zoom"),transform:[i.x,i.y,i.k],domNode:O.current.closest(".react-flow")})}}),[]),s.useEffect((()=>{R&&P&&(!a||A||T?void 0!==M&&R.on("wheel.zoom",(function(e,t){if(!b&&"wheel"===e.type&&!e.ctrlKey||ta(e,x))return null;e.preventDefault(),M.call(this,e,t)}),{passive:!1}):R.on("wheel.zoom",(r=>{if(ta(r,x))return!1;r.preventDefault(),r.stopImmediatePropagation();const o=R.property("__zoom").k||1;if(r.ctrlKey&&i){const e=dt(r),t=ra(r),n=o*Math.pow(2,t);return void P.scaleTo(R,n,e,r)}const a=1===r.deltaMode?20:1;let s=u===_o.Vertical?0:r.deltaX*a,c=u===_o.Horizontal?0:r.deltaY*a;!bo()&&r.shiftKey&&u!==_o.Vertical&&(s=r.deltaY*a,c=0),P.translateBy(R,-s/o*l,-c/o*l,{internal:!0});const d=ea(R.property("__zoom")),{onViewportChangeStart:f,onViewportChange:p,onViewportChangeEnd:h}=E.getState();clearTimeout(L.current),I.current||(I.current=!0,t?.(r,d),f?.(d)),I.current&&(e?.(r,d),p?.(d),L.current=setTimeout((()=>{n?.(r,d),h?.(d),I.current=!1}),150))}),{passive:!1}))}),[T,a,u,R,P,M,A,i,b,x,t,e,n]),s.useEffect((()=>{P&&P.on("start",(e=>{if(!e.sourceEvent||e.sourceEvent.internal)return null;D.current=e.sourceEvent?.button;const{onViewportChangeStart:n}=E.getState(),r=ea(e.transform);_.current=!0,N.current=r,"mousedown"===e.sourceEvent?.type&&E.setState({paneDragging:!0}),n?.(r),t?.(e.sourceEvent,r)}))}),[P,t]),s.useEffect((()=>{P&&(T&&!_.current?P.on("zoom",null):T||P.on("zoom",(t=>{const{onViewportChange:n}=E.getState();if(E.setState({transform:[t.transform.x,t.transform.y,t.transform.k]}),C.current=!(!r||!na(p,D.current??0)),(e||n)&&!t.sourceEvent?.internal){const r=ea(t.transform);n?.(r),e?.(t.sourceEvent,r)}})))}),[T,P,e,p,r]),s.useEffect((()=>{P&&P.on("end",(e=>{if(!e.sourceEvent||e.sourceEvent.internal)return null;const{onViewportChangeEnd:t}=E.getState();if(_.current=!1,E.setState({paneDragging:!1}),r&&na(p,D.current??0)&&!C.current&&r(e.sourceEvent),C.current=!1,(n||t)&&(o=N.current,i=e.transform,o.x!==i.x||o.y!==i.y||o.zoom!==i.k)){const r=ea(e.transform);N.current=r,clearTimeout(S.current),S.current=setTimeout((()=>{t?.(r),n?.(e.sourceEvent,r)}),a?150:0)}var o,i}))}),[P,a,p,n,r]),s.useEffect((()=>{P&&P.filter((e=>{const t=A||o,n=i&&e.ctrlKey;if((!0===p||Array.isArray(p)&&p.includes(1))&&1===e.button&&"mousedown"===e.type&&(ta(e,"react-flow__node")||ta(e,"react-flow__edge")))return!0;if(!(p||t||a||d||i))return!1;if(T)return!1;if(!d&&"dblclick"===e.type)return!1;if(ta(e,x)&&"wheel"===e.type)return!1;if(ta(e,k)&&("wheel"!==e.type||a&&"wheel"===e.type&&!A))return!1;if(!i&&e.ctrlKey&&"wheel"===e.type)return!1;if(!t&&!a&&!n&&"wheel"===e.type)return!1;if(!p&&("mousedown"===e.type||"touchstart"===e.type))return!1;if(Array.isArray(p)&&!p.includes(e.button)&&"mousedown"===e.type)return!1;const r=Array.isArray(p)&&p.includes(e.button)||!e.button||e.button<=1;return(!e.ctrlKey||"wheel"===e.type)&&r}))}),[T,P,o,i,a,d,p,f,A]),c.createElement("div",{className:"react-flow__renderer",ref:O,style:Ji},w)},aa=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function la(){const{userSelectionActive:e,userSelectionRect:t}=Yr(aa,q);return e&&t?c.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}function sa(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 ca(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&&sa(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&&sa(t,o);break;case"remove":return t}return t.push(o),t}),n)}function ua(e,t){return ca(e,t)}function da(e,t){return ca(e,t)}const fa=(e,t)=>({id:e,type:"select",selected:t});function pa(e,t){return e.reduce(((e,n)=>{const r=t.includes(n.id);return!n.selected&&r?(n.selected=!0,e.push(fa(n.id,!0))):n.selected&&!r&&(n.selected=!1,e.push(fa(n.id,!1))),e}),[])}const ha=(e,t)=>n=>{n.target===t.current&&e?.(n)},ma=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging}),ga=s.memo((({isSelecting:e,selectionMode:t=Co.Full,panOnDrag:n,onSelectionStart:r,onSelectionEnd:o,onPaneClick:i,onPaneContextMenu:a,onPaneScroll:l,onPaneMouseEnter:u,onPaneMouseMove:d,onPaneMouseLeave:f,children:p})=>{const h=s.useRef(null),m=Gr(),g=s.useRef(0),y=s.useRef(0),v=s.useRef(),{userSelectionActive:b,elementsSelectable:w,dragging:x}=Yr(ma,q),k=()=>{m.setState({userSelectionActive:!1,userSelectionRect:null}),g.current=0,y.current=0},S=e=>{i?.(e),m.getState().resetSelectedElements(),m.setState({nodesSelectionActive:!1})},E=l?e=>l(e):void 0,_=w&&(e||b);return c.createElement("div",{className:$(["react-flow__pane",{dragging:x,selection:e}]),onClick:_?void 0:ha(S,h),onContextMenu:ha((e=>{Array.isArray(n)&&n?.includes(2)?e.preventDefault():a?.(e)}),h),onWheel:ha(E,h),onMouseEnter:_?void 0:u,onMouseDown:_?t=>{const{resetSelectedElements:n,domNode:o}=m.getState();if(v.current=o?.getBoundingClientRect(),!w||!e||0!==t.button||t.target!==h.current||!v.current)return;const{x:i,y:a}=vo(t,v.current);n(),m.setState({userSelectionRect:{width:0,height:0,startX:i,startY:a,x:i,y:a}}),r?.(t)}:void 0,onMouseMove:_?n=>{const{userSelectionRect:r,nodeInternals:o,edges:i,transform:a,onNodesChange:l,onEdgesChange:s,nodeOrigin:c,getNodes:u}=m.getState();if(!e||!v.current||!r)return;m.setState({userSelectionActive:!0,nodesSelectionActive:!1});const d=vo(n,v.current),f=r.startX??0,p=r.startY??0,h={...r,x:d.x<f?d.x:f,y:d.y<p?d.y:p,width:Math.abs(d.x-f),height:Math.abs(d.y-p)},b=u(),w=Zo(o,h,a,t===Co.Partial,!0,c),x=Jo(w,i).map((e=>e.id)),k=w.map((e=>e.id));if(g.current!==k.length){g.current=k.length;const e=pa(b,k);e.length&&l?.(e)}if(y.current!==x.length){y.current=x.length;const e=pa(i,x);e.length&&s?.(e)}m.setState({userSelectionRect:h})}:d,onMouseUp:_?e=>{if(0!==e.button)return;const{userSelectionRect:t}=m.getState();!b&&t&&e.target===h.current&&S?.(e),m.setState({nodesSelectionActive:g.current>0}),k(),o?.(e)}:void 0,onMouseLeave:_?e=>{b&&(m.setState({nodesSelectionActive:g.current>0}),o?.(e)),k()}:f,ref:h,style:Ji},p,c.createElement(la,null))}));function ya(e,t){const n=e.parentNode||e.parentId;if(!n)return!1;const r=t.get(n);return!!r&&(!!r.selected||ya(r,t))}function va(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 ba(e,t,n,r){return Array.from(e.values()).filter((n=>(n.selected||n.id===r)&&(!n.parentNode||n.parentId||!ya(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 wa(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 l=a;const s=e.parentNode||e.parentId;if("parent"!==e.extent||e.expandParent){if(e.extent&&s&&"parent"!==e.extent){const t=n.get(s),{x:r,y:i}=Go(t,o).positionAbsolute;l=[[e.extent[0][0]+r,e.extent[0][1]+i],[e.extent[1][0]+r,e.extent[1][1]+i]]}}else if(s&&e.width&&e.height){const t=n.get(s),{x:r,y:i}=Go(t,o).positionAbsolute;l=t&&po(r)&&po(i)&&po(t.width)&&po(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]]]:l}else i?.("005",Vr()),l=a;let c={x:0,y:0};if(s){const e=n.get(s);c=Go(e,o).positionAbsolute}const u=l&&"parent"!==l?ro(t,l):t;return{position:{x:u.x-c.x,y:u.y-c.y},positionAbsolute:u}}function xa({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]}ga.displayName="Pane";const ka=(e,t,n,r)=>{const o=t.querySelectorAll(e);if(!o||!o.length)return null;const i=Array.from(o),a=t.getBoundingClientRect(),l=a.width*r[0],s=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-l)/n,y:(t.top-a.top-s)/n,...to(e)}}))};function Sa(e,t,n){return void 0===n?n:r=>{const o=t().nodeInternals.get(e);o&&n(r,{...o})}}function Ea({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:o,unselectNodesAndEdges:i,multiSelectionActive:a,nodeInternals:l,onError:s}=t.getState(),c=l.get(e);c?(t.setState({nodesSelectionActive:!1}),c.selected?(n||c.selected&&a)&&(i({nodes:[c],edges:[]}),requestAnimationFrame((()=>r?.current?.blur()))):o([e])):s?.("012",Kr(e))}function _a(e){return(t,n,r)=>e?.(t,r)}function Ca({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:o,isSelectable:i,selectNodesOnDrag:a}){const l=Gr(),[c,u]=s.useState(!1),d=s.useRef([]),f=s.useRef({x:null,y:null}),p=s.useRef(0),h=s.useRef(null),m=s.useRef({x:0,y:0}),g=s.useRef(null),y=s.useRef(!1),v=s.useRef(!1),b=s.useRef(!1),w=function(){const e=Gr(),t=s.useCallback((({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,l={x:(i-n[0])/n[2],y:(a-n[1])/n[2]};return{xSnapped:o?r[0]*Math.round(l.x/r[0]):l.x,ySnapped:o?r[1]*Math.round(l.y/r[1]):l.y,...l}}),[]);return t}();return s.useEffect((()=>{if(e?.current){const s=ut(e.current),c=({x:e,y:t})=>{const{nodeInternals:n,onNodeDrag:r,onSelectionDrag:i,updateNodePositions:a,nodeExtent:s,snapGrid:c,snapToGrid:p,nodeOrigin:h,onError:m}=l.getState();f.current={x:e,y:t};let y=!1,v={x:0,y:0,x2:0,y2:0};if(d.current.length>1&&s){const e=Qo(d.current,h);v=so(e)}if(d.current=d.current.map((r=>{const o={x:e-r.distance.x,y:t-r.distance.y};p&&(o.x=c[0]*Math.round(o.x/c[0]),o.y=c[1]*Math.round(o.y/c[1]));const i=[[s[0][0],s[0][1]],[s[1][0],s[1][1]]];d.current.length>1&&s&&!r.extent&&(i[0][0]=r.positionAbsolute.x-v.x+s[0][0],i[1][0]=r.positionAbsolute.x+(r.width??0)-v.x2+s[1][0],i[0][1]=r.positionAbsolute.y-v.y+s[0][1],i[1][1]=r.positionAbsolute.y+(r.height??0)-v.y2+s[1][1]);const a=wa(r,o,n,i,h,m);return y=y||r.position.x!==a.position.x||r.position.y!==a.position.y,r.position=a.position,r.positionAbsolute=a.positionAbsolute,r})),!y)return;a(d.current,!0,!0),u(!0);const b=o?r:_a(i);if(b&&g.current){const[e,t]=xa({nodeId:o,dragItems:d.current,nodeInternals:n});b(g.current,e,t)}},x=()=>{if(!h.current)return;const[e,t]=io(m.current,h.current);if(0!==e||0!==t){const{transform:n,panBy:r}=l.getState();f.current.x=(f.current.x??0)-e/n[2],f.current.y=(f.current.y??0)-t/n[2],r({x:e,y:t})&&c(f.current)}p.current=requestAnimationFrame(x)},k=t=>{const{nodeInternals:n,multiSelectionActive:r,nodesDraggable:s,unselectNodesAndEdges:c,onNodeDragStart:u,onSelectionDragStart:p}=l.getState();v.current=!0;const h=o?u:_a(p);a&&i||r||!o||n.get(o)?.selected||c(),o&&i&&a&&Ea({id:o,store:l,nodeRef:e});const m=w(t);if(f.current=m,d.current=ba(n,s,m,o),h&&d.current){const[e,r]=xa({nodeId:o,dragItems:d.current,nodeInternals:n});h(t.sourceEvent,e,r)}};if(!t){const t=function(){var e,t,n,r,o=wt,i=xt,a=kt,l=St,s={},c=X("start","drag","end"),u=0,d=0;function f(e){e.on("mousedown.drag",p).filter(l).on("touchstart.drag",g).on("touchmove.drag",y,ft).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(a,l){if(!r&&o.call(this,a,l)){var s=b(this,i.call(this,a,l),a,l,"mouse");s&&(ut(a.view).on("mousemove.drag",h,pt).on("mouseup.drag",m,pt),gt(a.view),ht(a),n=!1,e=a.clientX,t=a.clientY,s("start",a))}}function h(r){if(mt(r),!n){var o=r.clientX-e,i=r.clientY-t;n=o*o+i*i>d}s.mouse("drag",r)}function m(e){ut(e.view).on("mousemove.drag mouseup.drag",null),yt(e.view,n),mt(e),s.mouse("end",e)}function g(e,t){if(o.call(this,e,t)){var n,r,a=e.changedTouches,l=i.call(this,e,t),s=a.length;for(n=0;n<s;++n)(r=b(this,l,e,t,a[n].identifier,a[n]))&&(ht(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=s[r[t].identifier])&&(mt(e),n("drag",e,r[t]))}function v(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=s[o[t].identifier])&&(ht(e),n("end",e,o[t]))}function b(e,t,n,r,o,i){var l,d,p,h=c.copy(),m=dt(i||n,t);if(null!=(p=a.call(e,new bt("beforestart",{sourceEvent:n,target:f,identifier:o,active:u,x:m[0],y:m[1],dx:0,dy:0,dispatch:h}),r)))return l=p.x-m[0]||0,d=p.y-m[1]||0,function n(i,a,c){var g,y=m;switch(i){case"start":s[o]=n,g=u++;break;case"end":delete s[o],--u;case"drag":m=dt(c||a,t),g=u}h.call(i,e,new bt(i,{sourceEvent:a,subject:p,target:f,identifier:o,active:g,x:m[0]+l,y:m[1]+d,dx:m[0]-y[0],dy:m[1]-y[1],dispatch:h}),r)}}return f.filter=function(e){return arguments.length?(o="function"==typeof e?e:vt(!!e),f):o},f.container=function(e){return arguments.length?(i="function"==typeof e?e:vt(e),f):i},f.subject=function(e){return arguments.length?(a="function"==typeof e?e:vt(e),f):a},f.touchable=function(e){return arguments.length?(l="function"==typeof e?e:vt(!!e),f):l},f.on=function(){var e=c.on.apply(c,arguments);return e===c?f:e},f.clickDistance=function(e){return arguments.length?(d=(e=+e)*e,f):Math.sqrt(d)},f}().on("start",(e=>{const{domNode:t,nodeDragThreshold:n}=l.getState();0===n&&k(e),b.current=!1;const r=w(e);f.current=r,h.current=t?.getBoundingClientRect()||null,m.current=vo(e.sourceEvent,h.current)})).on("drag",(e=>{const t=w(e),{autoPanOnNodeDrag:n,nodeDragThreshold:r}=l.getState();if("touchmove"===e.sourceEvent.type&&e.sourceEvent.touches.length>1&&(b.current=!0),!b.current){if(!y.current&&v.current&&n&&(y.current=!0,x()),!v.current){const n=t.xSnapped-(f?.current?.x??0),o=t.ySnapped-(f?.current?.y??0);Math.sqrt(n*n+o*o)>r&&k(e)}(f.current.x!==t.xSnapped||f.current.y!==t.ySnapped)&&d.current&&v.current&&(g.current=e.sourceEvent,m.current=vo(e.sourceEvent,h.current),c(t))}})).on("end",(e=>{if(v.current&&!b.current&&(u(!1),y.current=!1,v.current=!1,cancelAnimationFrame(p.current),d.current)){const{updateNodePositions:t,nodeInternals:n,onNodeDragStop:r,onSelectionDragStop:i}=l.getState(),a=o?r:_a(i);if(t(d.current,!1,!1),a){const[t,r]=xa({nodeId:o,dragItems:d.current,nodeInternals:n});a(e.sourceEvent,t,r)}}})).filter((t=>{const o=t.target;return!t.button&&(!n||!va(o,`.${n}`,e))&&(!r||va(o,r,e))}));return s.call(t),()=>{s.on(".drag",null)}}s.on(".drag",null)}}),[e,t,n,r,i,l,o,a,w]),c}function Oa(){const e=Gr(),t=s.useCallback((t=>{const{nodeInternals:n,nodeExtent:r,updateNodePositions:o,getNodes:i,snapToGrid:a,snapGrid:l,onError:s,nodesDraggable:c}=e.getState(),u=i().filter((e=>e.selected&&(e.draggable||c&&void 0===e.draggable))),d=a?l[0]:5,f=a?l[1]:5,p=t.isShiftPressed?4:1,h=t.x*d*p,m=t.y*f*p,g=u.map((e=>{if(e.positionAbsolute){const t={x:e.positionAbsolute.x+h,y:e.positionAbsolute.y+m};a&&(t.x=l[0]*Math.round(t.x/l[0]),t.y=l[1]*Math.round(t.y/l[1]));const{positionAbsolute:o,position:i}=wa(e,t,n,r,void 0,s);e.position=i,e.positionAbsolute=o}return e}));o(g,!0,!1)}),[]);return t}const Na={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var Pa=e=>{const t=({id:t,type:n,data:r,xPos:o,yPos:i,xPosOrigin:a,yPosOrigin:l,selected:u,onClick:d,onMouseEnter:f,onMouseMove:p,onMouseLeave:h,onContextMenu:m,onDoubleClick:g,style:y,className:v,isDraggable:b,isSelectable:w,isConnectable:x,isFocusable:k,selectNodesOnDrag:S,sourcePosition:E,targetPosition:_,hidden:C,resizeObserver:O,dragHandle:N,zIndex:P,isParent:R,noDragClassName:M,noPanClassName:T,initialized:A,disableKeyboardA11y:D,ariaLabel:I,rfId:L,hasHandleBounds:z})=>{const F=Gr(),j=s.useRef(null),B=s.useRef(null),V=s.useRef(E),H=s.useRef(_),U=s.useRef(n),W=w||b||d||f||p||h,q=Oa(),K=Sa(t,F.getState,f),X=Sa(t,F.getState,p),Y=Sa(t,F.getState,h),G=Sa(t,F.getState,m),Q=Sa(t,F.getState,g);s.useEffect((()=>()=>{B.current&&(O?.unobserve(B.current),B.current=null)}),[]),s.useEffect((()=>{if(j.current&&!C){const e=j.current;A&&z&&B.current===e||(B.current&&O?.unobserve(B.current),O?.observe(e),B.current=e)}}),[C,A,z]),s.useEffect((()=>{const e=U.current!==n,r=V.current!==E,o=H.current!==_;j.current&&(e||r||o)&&(e&&(U.current=n),r&&(V.current=E),o&&(H.current=_),F.getState().updateNodeDimensions([{id:t,nodeElement:j.current,forceUpdate:!0}]))}),[t,n,E,_]);const Z=Ca({nodeRef:j,disabled:C||!b,noDragClassName:M,handleSelector:N,nodeId:t,isSelectable:w,selectNodesOnDrag:S});return C?null:c.createElement("div",{className:$(["react-flow__node",`react-flow__node-${n}`,{[T]:b},v,{selected:u,selectable:w,parent:R,dragging:Z}]),ref:j,style:{zIndex:P,transform:`translate(${a}px,${l}px)`,pointerEvents:W?"all":"none",visibility:A?"visible":"hidden",...y},"data-id":t,"data-testid":`rf__node-${t}`,onMouseEnter:K,onMouseMove:X,onMouseLeave:Y,onContextMenu:G,onClick:e=>{const{nodeDragThreshold:n}=F.getState();if(w&&(!S||!b||n>0)&&Ea({id:t,store:F,nodeRef:j}),d){const n=F.getState().nodeInternals.get(t);n&&d(e,{...n})}},onDoubleClick:Q,onKeyDown:k?e=>{if(!go(e)&&!D)if(mo.includes(e.key)&&w){const n="Escape"===e.key;Ea({id:t,store:F,unselect:n,nodeRef:j})}else b&&u&&Object.prototype.hasOwnProperty.call(Na,e.key)&&(F.setState({ariaLiveMessage:`Moved selected node ${e.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~o}, y: ${~~i}`}),q({x:Na[e.key].x,y:Na[e.key].y,isShiftPressed:e.shiftKey}))}:void 0,tabIndex:k?0:void 0,role:k?"button":void 0,"aria-describedby":D?void 0:`${Ai}-${L}`,"aria-label":I},c.createElement(Wo,{value:t},c.createElement(e,{id:t,data:r,type:n,xPos:o,yPos:i,selected:u,isConnectable:x,sourcePosition:E,targetPosition:_,dragging:Z,dragHandle:N,zIndex:P})))};return t.displayName="NodeWrapper",s.memo(t)};const Ra=e=>{const t=e.getNodes().filter((e=>e.selected));return{...Qo(t,e.nodeOrigin),transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`,userSelectionActive:e.userSelectionActive}};var Ma=s.memo((function({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=Gr(),{width:o,height:i,x:a,y:l,transformString:u,userSelectionActive:d}=Yr(Ra,q),f=Oa(),p=s.useRef(null);if(s.useEffect((()=>{n||p.current?.focus({preventScroll:!0})}),[n]),Ca({nodeRef:p}),d||!o||!i)return null;const h=e?t=>{const n=r.getState().getNodes().filter((e=>e.selected));e(t,n)}:void 0;return c.createElement("div",{className:$(["react-flow__nodesselection","react-flow__container",t]),style:{transform:u}},c.createElement("div",{ref:p,className:"react-flow__nodesselection-rect",onContextMenu:h,tabIndex:n?void 0:-1,onKeyDown:n?void 0:e=>{Object.prototype.hasOwnProperty.call(Na,e.key)&&f({x:Na[e.key].x,y:Na[e.key].y,isShiftPressed:e.shiftKey})},style:{width:o,height:i,top:l,left:a}}))}));const Ta=e=>e.nodesSelectionActive,Aa=({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:i,onPaneScroll:a,deleteKeyCode:l,onMove:u,onMoveStart:d,onMoveEnd:f,selectionKeyCode:p,selectionOnDrag:h,selectionMode:m,onSelectionStart:g,onSelectionEnd:y,multiSelectionKeyCode:v,panActivationKeyCode:b,zoomActivationKeyCode:w,elementsSelectable:x,zoomOnScroll:k,zoomOnPinch:S,panOnScroll:E,panOnScrollSpeed:_,panOnScrollMode:C,zoomOnDoubleClick:O,panOnDrag:N,defaultViewport:P,translateExtent:R,minZoom:M,maxZoom:T,preventScrolling:A,onSelectionContextMenu:D,noWheelClassName:I,noPanClassName:L,disableKeyboardA11y:z})=>{const F=Yr(Ta),j=Fi(p),$=Fi(b),B=$||N,V=$||E,H=j||h&&!0!==B;return(({deleteKeyCode:e,multiSelectionKeyCode:t})=>{const n=Gr(),{deleteElements:r}=Qi(),o=Fi(e,Zi),i=Fi(t);s.useEffect((()=>{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.useEffect((()=>{n.setState({multiSelectionActive:i})}),[i])})({deleteKeyCode:l,multiSelectionKeyCode:v}),c.createElement(ia,{onMove:u,onMoveStart:d,onMoveEnd:f,onPaneContextMenu:i,elementsSelectable:x,zoomOnScroll:k,zoomOnPinch:S,panOnScroll:V,panOnScrollSpeed:_,panOnScrollMode:C,zoomOnDoubleClick:O,panOnDrag:!j&&B,defaultViewport:P,translateExtent:R,minZoom:M,maxZoom:T,zoomActivationKeyCode:w,preventScrolling:A,noWheelClassName:I,noPanClassName:L},c.createElement(ga,{onSelectionStart:g,onSelectionEnd:y,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:i,onPaneScroll:a,panOnDrag:B,isSelecting:!!H,selectionMode:m},e,F&&c.createElement(Ma,{onSelectionContextMenu:D,noPanClassName:L,disableKeyboardA11y:z})))};Aa.displayName="FlowRenderer";var Da=s.memo(Aa);function Ia(e){return{...{input:Pa(e.input||yi),default:Pa(e.default||mi),output:Pa(e.output||bi),group:Pa(e.group||wi)},...Object.keys(e).filter((e=>!["input","default","output","group"].includes(e))).reduce(((t,n)=>(t[n]=Pa(e[n]||mi),t)),{})}}const La=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,updateNodeDimensions:e.updateNodeDimensions,onError:e.onError}),za=e=>{const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:o,updateNodeDimensions:i,onError:a}=Yr(La,q),l=(u=e.onlyRenderVisibleElements,Yr(s.useCallback((e=>u?Zo(e.nodeInternals,{x:0,y:0,width:e.width,height:e.height},e.transform,!0):e.getNodes()),[u])));var u;const d=s.useRef(),f=s.useMemo((()=>{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})));i(t)}));return d.current=e,e}),[]);return s.useEffect((()=>()=>{d?.current?.disconnect()}),[]),c.createElement("div",{className:"react-flow__nodes",style:Ji},l.map((i=>{let l=i.type||"default";e.nodeTypes[l]||(a?.("003",$r(l)),l="default");const s=e.nodeTypes[l]||e.nodeTypes.default,u=!!(i.draggable||t&&void 0===i.draggable),d=!!(i.selectable||o&&void 0===i.selectable),p=!!(i.connectable||n&&void 0===i.connectable),h=!!(i.focusable||r&&void 0===i.focusable),m=e.nodeExtent?ro(i.positionAbsolute,e.nodeExtent):i.positionAbsolute,g=m?.x??0,y=m?.y??0,v=(({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:i.width??0,height:i.height??0,origin:e.nodeOrigin});return c.createElement(s,{key:i.id,id:i.id,className:i.className,style:i.style,type:l,data:i.data,sourcePosition:i.sourcePosition||Po.Bottom,targetPosition:i.targetPosition||Po.Top,hidden:i.hidden,xPos:g,yPos:y,xPosOrigin:v.x,yPosOrigin:v.y,selectNodesOnDrag:e.selectNodesOnDrag,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,selected:!!i.selected,isDraggable:u,isSelectable:d,isConnectable:p,isFocusable:h,resizeObserver:f,dragHandle:i.dragHandle,zIndex:i[ho]?.z??0,isParent:!!i[ho]?.isParent,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,initialized:!!i.width&&!!i.height,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,ariaLabel:i.ariaLabel,hasHandleBounds:!!i[ho]?.handleBounds})})))};za.displayName="NodeRenderer";var Fa=s.memo(za);const ja=(e,t,n)=>n===Po.Left?e-t:n===Po.Right?e+t:e,$a=(e,t,n)=>n===Po.Top?e-t:n===Po.Bottom?e+t:e,Ba="react-flow__edgeupdater",Va=({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:o,onMouseEnter:i,onMouseOut:a,type:l})=>c.createElement("circle",{onMouseDown:o,onMouseEnter:i,onMouseOut:a,className:$([Ba,`${Ba}-${l}`]),cx:ja(t,r,e),cy:$a(n,r,e),r:r,stroke:"transparent",fill:"transparent"}),Ha=()=>!0;var Ua=e=>{const t=({id:t,className:n,type:r,data:o,onClick:i,onEdgeDoubleClick:a,selected:l,animated:u,label:d,labelStyle:f,labelShowBg:p,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:g,style:y,source:v,target:b,sourceX:w,sourceY:x,targetX:k,targetY:S,sourcePosition:E,targetPosition:_,elementsSelectable:C,hidden:O,sourceHandleId:N,targetHandleId:P,onContextMenu:R,onMouseEnter:M,onMouseMove:T,onMouseLeave:A,reconnectRadius:D,onReconnect:I,onReconnectStart:L,onReconnectEnd:z,markerEnd:F,markerStart:j,rfId:B,ariaLabel:V,isFocusable:H,isReconnectable:U,pathOptions:W,interactionWidth:q,disableKeyboardA11y:K})=>{const X=s.useRef(null),[Y,G]=s.useState(!1),[Q,Z]=s.useState(!1),J=Gr(),ee=s.useMemo((()=>`url('#${Ko(j,B)}')`),[j,B]),te=s.useMemo((()=>`url('#${Ko(F,B)}')`),[F,B]);if(O)return null;const ne=xo(t,J.getState,a),re=xo(t,J.getState,R),oe=xo(t,J.getState,M),ie=xo(t,J.getState,T),ae=xo(t,J.getState,A),le=(e,n)=>{if(0!==e.button)return;const{edges:r,isValidConnection:o}=J.getState(),i=n?b:v,a=(n?P:N)||null,l=n?"target":"source",s=o||Ha,c=n,u=r.find((e=>e.id===t));Z(!0),L?.(e,u,l);ci({event:e,handleId:a,nodeId:i,onConnect:e=>I?.(u,e),isTarget:c,getState:J.getState,setState:J.setState,isValidConnection:s,edgeUpdaterType:l,onReconnectEnd:e=>{Z(!1),z?.(e,u,l)}})},se=()=>G(!0),ce=()=>G(!1),ue=!C&&!i;return c.createElement("g",{className:$(["react-flow__edge",`react-flow__edge-${r}`,n,{selected:l,animated:u,inactive:ue,updating:Y}]),onClick:e=>{const{edges:n,addSelectedEdges:r,unselectNodesAndEdges:o,multiSelectionActive:a}=J.getState(),l=n.find((e=>e.id===t));l&&(C&&(J.setState({nodesSelectionActive:!1}),l.selected&&a?(o({nodes:[],edges:[l]}),X.current?.blur()):r([t])),i&&i(e,l))},onDoubleClick:ne,onContextMenu:re,onMouseEnter:oe,onMouseMove:ie,onMouseLeave:ae,onKeyDown:H?e=>{if(!K&&mo.includes(e.key)&&C){const{unselectNodesAndEdges:n,addSelectedEdges:r,edges:o}=J.getState();"Escape"===e.key?(X.current?.blur(),n({edges:[o.find((e=>e.id===t))]})):r([t])}}:void 0,tabIndex:H?0:void 0,role:H?"button":"img","data-testid":`rf__edge-${t}`,"aria-label":null===V?void 0:V||`Edge from ${v} to ${b}`,"aria-describedby":H?`${Di}-${B}`:void 0,ref:X},!Q&&c.createElement(e,{id:t,source:v,target:b,selected:l,animated:u,label:d,labelStyle:f,labelShowBg:p,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:g,data:o,style:y,sourceX:w,sourceY:x,targetX:k,targetY:S,sourcePosition:E,targetPosition:_,sourceHandleId:N,targetHandleId:P,markerStart:ee,markerEnd:te,pathOptions:W,interactionWidth:q}),U&&c.createElement(c.Fragment,null,("source"===U||!0===U)&&c.createElement(Va,{position:E,centerX:w,centerY:x,radius:D,onMouseDown:e=>le(e,!0),onMouseEnter:se,onMouseOut:ce,type:"source"}),("target"===U||!0===U)&&c.createElement(Va,{position:_,centerX:k,centerY:S,radius:D,onMouseDown:e=>le(e,!1),onMouseEnter:se,onMouseOut:ce,type:"target"})))};return t.displayName="EdgeWrapper",s.memo(t)};function Wa(e){return{...{default:Ua(e.default||Ho),straight:Ua(e.bezier||jo),step:Ua(e.step||Fo),smoothstep:Ua(e.step||zo),simplebezier:Ua(e.simplebezier||To)},...Object.keys(e).filter((e=>!["default","bezier"].includes(e))).reduce(((t,n)=>(t[n]=Ua(e[n]||Ho),t)),{})}}function qa(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 Po.Top:return{x:r+i/2,y:o};case Po.Right:return{x:r+i,y:o+a/2};case Po.Bottom:return{x:r+i/2,y:o+a};case Po.Left:return{x:r,y:o+a/2}}}function Ka(e,t){return e?1!==e.length&&t?t&&e.find((e=>e.id===t))||null:e[0]:null}function Xa(e){const t=e?.[ho]?.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 Ya=[{level:0,isMaxLevel:!0,edges:[]}];function Ga(e,t,n){const r=Yr(s.useCallback((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:l,transform:s}){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=so({x:(0-s[0])/s[2],y:(0-s[1])/s[2],width:a/s[2],height:l/s[2]}),d=Math.max(0,Math.min(u.x2,c.x2)-Math.max(u.x,c.x)),f=Math.max(0,Math.min(u.y2,c.y2)-Math.max(u.y,c.y));return Math.ceil(d*f)>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=po(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,l=Math.max(n?.[ho]?.z||0,e?.[ho]?.z||0,1e3);a=(i?o.zIndex:0)+(r?l: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?Ya:i}(r,t,n)}const Qa={[No.Arrow]:({color:e="none",strokeWidth:t=1})=>c.createElement("polyline",{style:{stroke:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),[No.ArrowClosed]:({color:e="none",strokeWidth:t=1})=>c.createElement("polyline",{style:{stroke:e,fill:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})};const Za=({id:e,type:t,color:n,width:r=12.5,height:o=12.5,markerUnits:i="strokeWidth",strokeWidth:a,orient:l="auto-start-reverse"})=>{const u=function(e){const t=Gr();return s.useMemo((()=>Object.prototype.hasOwnProperty.call(Qa,e)?Qa[e]:(t.getState().onError?.("009",Hr(e)),null)),[e])}(t);return u?c.createElement("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${o}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:l,refX:"0",refY:"0"},c.createElement(u,{color:n,strokeWidth:a})):null},Ja=({defaultColor:e,rfId:t})=>{const n=Yr(s.useCallback((({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=Ko(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:t}),[e,t]),((e,t)=>!(e.length!==t.length||e.some(((e,n)=>e.id!==t[n].id)))));return c.createElement("defs",null,n.map((e=>c.createElement(Za,{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}))))};Ja.displayName="MarkerDefinitions";var el=s.memo(Ja);const tl=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}),nl=({defaultMarkerColor:e,onlyRenderVisibleElements:t,elevateEdgesOnSelect:n,rfId:r,edgeTypes:o,noPanClassName:i,onEdgeContextMenu:a,onEdgeMouseEnter:l,onEdgeMouseMove:s,onEdgeMouseLeave:u,onEdgeClick:d,onEdgeDoubleClick:f,onReconnect:p,onReconnectStart:h,onReconnectEnd:m,reconnectRadius:g,children:y,disableKeyboardA11y:v})=>{const{edgesFocusable:b,edgesUpdatable:w,elementsSelectable:x,width:k,height:S,connectionMode:E,nodeInternals:_,onError:C}=Yr(tl,q),O=Ga(t,_,n);return k?c.createElement(c.Fragment,null,O.map((({level:t,edges:n,isMaxLevel:y})=>c.createElement("svg",{key:t,style:{zIndex:t},width:k,height:S,className:"react-flow__edges react-flow__container"},y&&c.createElement(el,{defaultColor:e,rfId:r}),c.createElement("g",null,n.map((e=>{const[t,n,y]=Xa(_.get(e.source)),[k,S,O]=Xa(_.get(e.target));if(!y||!O)return null;let N=e.type||"default";o[N]||(C?.("011",qr(N)),N="default");const P=o[N]||o.default,R=E===Eo.Strict?S.target:(S.target??[]).concat(S.source??[]),M=Ka(n.source,e.sourceHandle),T=Ka(R,e.targetHandle),A=M?.position||Po.Bottom,D=T?.position||Po.Top,I=!!(e.focusable||b&&void 0===e.focusable),L=e.reconnectable||e.updatable,z=void 0!==p&&(L||w&&void 0===L);if(!M||!T)return C?.("008",Ur(M,e)),null;const{sourceX:F,sourceY:j,targetX:B,targetY:V}=((e,t,n,r,o,i)=>{const a=qa(n,e,t),l=qa(i,r,o);return{sourceX:a.x,sourceY:a.y,targetX:l.x,targetY:l.y}})(t,M,A,k,T,D);return c.createElement(P,{key:e.id,id:e.id,className:$([e.className,i]),type:N,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:F,sourceY:j,targetX:B,targetY:V,sourcePosition:A,targetPosition:D,elementsSelectable:x,onContextMenu:a,onMouseEnter:l,onMouseMove:s,onMouseLeave:u,onClick:d,onEdgeDoubleClick:f,onReconnect:p,onReconnectStart:h,onReconnectEnd:m,reconnectRadius:g,rfId:r,ariaLabel:e.ariaLabel,isFocusable:I,isReconnectable:z,pathOptions:"pathOptions"in e?e.pathOptions:void 0,interactionWidth:e.interactionWidth,disableKeyboardA11y:v})})))))),y):null};nl.displayName="EdgeRenderer";var rl=s.memo(nl);const ol=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function il({children:e}){const t=Yr(ol);return c.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:t}},e)}const al={[Po.Left]:Po.Right,[Po.Right]:Po.Left,[Po.Top]:Po.Bottom,[Po.Bottom]:Po.Top},ll=({nodeId:e,handleType:t,style:n,type:r=Oo.Bezier,CustomComponent:o,connectionStatus:i})=>{const{fromNode:a,handleId:l,toX:u,toY:d,connectionMode:f}=Yr(s.useCallback((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]),q),p=a?.[ho]?.handleBounds;let h=p?.[t];if(f===Eo.Loose&&(h=h||p?.["source"===t?"target":"source"]),!a||!h)return null;const m=l?h.find((e=>e.id===l)):h[0],g=m?m.x+m.width/2:(a.width??0)/2,y=m?m.y+m.height/2:a.height??0,v=(a.positionAbsolute?.x??0)+g,b=(a.positionAbsolute?.y??0)+y,w=m?.position,x=w?al[w]:null;if(!w||!x)return null;if(o)return c.createElement(o,{connectionLineType:r,connectionLineStyle:n,fromNode:a,fromHandle:m,fromX:v,fromY:b,toX:u,toY:d,fromPosition:w,toPosition:x,connectionStatus:i});let k="";const S={sourceX:v,sourceY:b,sourcePosition:w,targetX:u,targetY:d,targetPosition:x};return r===Oo.Bezier?[k]=Vo(S):r===Oo.Step?[k]=Lo({...S,borderRadius:0}):r===Oo.SmoothStep?[k]=Lo(S):r===Oo.SimpleBezier?[k]=Mo(S):k=`M${v},${b} ${u},${d}`,c.createElement("path",{d:k,fill:"none",className:"react-flow__connection-path",style:n})};ll.displayName="ConnectionLine";const sl=e=>({nodeId:e.connectionNodeId,handleType:e.connectionHandleType,nodesConnectable:e.nodesConnectable,connectionStatus:e.connectionStatus,width:e.width,height:e.height});function cl({containerStyle:e,style:t,type:n,component:r}){const{nodeId:o,handleType:i,nodesConnectable:a,width:l,height:s,connectionStatus:u}=Yr(sl,q);return!!(o&&i&&l&&a)?c.createElement("svg",{style:e,width:l,height:s,className:"react-flow__edges react-flow__connectionline react-flow__container"},c.createElement("g",{className:$(["react-flow__connection",u])},c.createElement(ll,{nodeId:o,handleType:i,style:t,type:n,CustomComponent:r,connectionStatus:u}))):null}function ul(e,t){s.useRef(null),Gr();return s.useMemo((()=>t(e)),[e])}const dl=({nodeTypes:e,edgeTypes:t,onMove:n,onMoveStart:r,onMoveEnd:o,onInit:i,onNodeClick:a,onEdgeClick:l,onNodeDoubleClick:u,onEdgeDoubleClick:d,onNodeMouseEnter:f,onNodeMouseMove:p,onNodeMouseLeave:h,onNodeContextMenu:m,onSelectionContextMenu:g,onSelectionStart:y,onSelectionEnd:v,connectionLineType:b,connectionLineStyle:w,connectionLineComponent:x,connectionLineContainerStyle:k,selectionKeyCode:S,selectionOnDrag:E,selectionMode:_,multiSelectionKeyCode:C,panActivationKeyCode:O,zoomActivationKeyCode:N,deleteKeyCode:P,onlyRenderVisibleElements:R,elementsSelectable:M,selectNodesOnDrag:T,defaultViewport:A,translateExtent:D,minZoom:I,maxZoom:L,preventScrolling:z,defaultMarkerColor:F,zoomOnScroll:j,zoomOnPinch:$,panOnScroll:B,panOnScrollSpeed:V,panOnScrollMode:H,zoomOnDoubleClick:U,panOnDrag:W,onPaneClick:q,onPaneMouseEnter:K,onPaneMouseMove:X,onPaneMouseLeave:Y,onPaneScroll:G,onPaneContextMenu:Q,onEdgeContextMenu:Z,onEdgeMouseEnter:J,onEdgeMouseMove:ee,onEdgeMouseLeave:te,onReconnect:ne,onReconnectStart:re,onReconnectEnd:oe,reconnectRadius:ie,noDragClassName:ae,noWheelClassName:le,noPanClassName:se,elevateEdgesOnSelect:ce,disableKeyboardA11y:ue,nodeOrigin:de,nodeExtent:fe,rfId:pe})=>{const he=ul(e,Ia),me=ul(t,Wa);return function(e){const t=Qi(),n=s.useRef(!1);s.useEffect((()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout((()=>e(t)),1),n.current=!0)}),[e,t.viewportInitialized])}(i),c.createElement(Da,{onPaneClick:q,onPaneMouseEnter:K,onPaneMouseMove:X,onPaneMouseLeave:Y,onPaneContextMenu:Q,onPaneScroll:G,deleteKeyCode:P,selectionKeyCode:S,selectionOnDrag:E,selectionMode:_,onSelectionStart:y,onSelectionEnd:v,multiSelectionKeyCode:C,panActivationKeyCode:O,zoomActivationKeyCode:N,elementsSelectable:M,onMove:n,onMoveStart:r,onMoveEnd:o,zoomOnScroll:j,zoomOnPinch:$,zoomOnDoubleClick:U,panOnScroll:B,panOnScrollSpeed:V,panOnScrollMode:H,panOnDrag:W,defaultViewport:A,translateExtent:D,minZoom:I,maxZoom:L,onSelectionContextMenu:g,preventScrolling:z,noDragClassName:ae,noWheelClassName:le,noPanClassName:se,disableKeyboardA11y:ue},c.createElement(il,null,c.createElement(rl,{edgeTypes:me,onEdgeClick:l,onEdgeDoubleClick:d,onlyRenderVisibleElements:R,onEdgeContextMenu:Z,onEdgeMouseEnter:J,onEdgeMouseMove:ee,onEdgeMouseLeave:te,onReconnect:ne,onReconnectStart:re,onReconnectEnd:oe,reconnectRadius:ie,defaultMarkerColor:F,noPanClassName:se,elevateEdgesOnSelect:!!ce,disableKeyboardA11y:ue,rfId:pe},c.createElement(cl,{style:w,type:b,component:x,containerStyle:k})),c.createElement("div",{className:"react-flow__edgelabel-renderer"}),c.createElement(Fa,{nodeTypes:he,onNodeClick:a,onNodeDoubleClick:u,onNodeMouseEnter:f,onNodeMouseMove:p,onNodeMouseLeave:h,onNodeContextMenu:m,selectNodesOnDrag:T,onlyRenderVisibleElements:R,noPanClassName:se,noDragClassName:ae,disableKeyboardA11y:ue,nodeOrigin:de,nodeExtent:fe,rfId:pe})))};dl.displayName="GraphView";var fl=s.memo(dl);const pl=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],hl={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:pl,nodeExtent:pl,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:Eo.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:(e,t)=>{},isValidConnection:void 0},ml=()=>((e,t)=>e?W(e,t):W)(((e,t)=>({...hl,setNodes:n=>{const{nodeInternals:r,nodeOrigin:o,elevateNodesOnSelect:i}=t();e({nodeInternals:Hi(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?Hi(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:l,domNode:s,nodeOrigin:c}=t(),u=s?.querySelector(".react-flow__viewport");if(!u)return;const d=window.getComputedStyle(u),{m22:f}=new window.DOMMatrixReadOnly(d.transform),p=n.reduce(((e,t)=>{const n=o.get(t.id);if(n?.hidden)o.set(n.id,{...n,[ho]:{...n[ho],handleBounds:void 0}});else if(n){const r=to(t.nodeElement);!(!r.width||!r.height||n.width===r.width&&n.height===r.height&&!t.forceUpdate)&&(o.set(n.id,{...n,[ho]:{...n[ho],handleBounds:{source:ka(".source",t.nodeElement,f,c),target:ka(".target",t.nodeElement,f,c)}},...r}),e.push({id:n.id,type:"dimensions",dimensions:r}))}return e}),[]);Vi(o,c);const h=a||i&&!a&&Ui(t,{initial:!0,...l});e({nodeInternals:new Map(o),fitViewOnInitDone:h}),p?.length>0&&r?.(p)},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:l,elevateNodesOnSelect:s}=t();if(n?.length){if(i){const t=Hi(ua(n,l()),o,a,s);e({nodeInternals:t})}r?.(n)}},addSelectedNodes:n=>{const{multiSelectionActive:r,edges:o,getNodes:i}=t();let a,l=null;r?a=n.map((e=>fa(e,!0))):(a=pa(i(),n),l=pa(o,[])),Ki({changedNodes:a,changedEdges:l,get:t,set:e})},addSelectedEdges:n=>{const{multiSelectionActive:r,edges:o,getNodes:i}=t();let a,l=null;r?a=n.map((e=>fa(e,!0))):(a=pa(o,n),l=pa(i(),[])),Ki({changedNodes:l,changedEdges:a,get:t,set:e})},unselectNodesAndEdges:({nodes:n,edges:r}={})=>{const{edges:o,getNodes:i}=t(),a=r||o;Ki({changedNodes:(n||i()).map((e=>(e.selected=!1,fa(e.id,!1)))),changedEdges:a.map((e=>fa(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();Ki({changedNodes:r().filter((e=>e.selected)).map((e=>fa(e.id,!1))),changedEdges:n.filter((e=>e.selected)).map((e=>fa(e.id,!1))),get:t,set:e})},setNodeExtent:n=>{const{nodeInternals:r}=t();r.forEach((e=>{e.positionAbsolute=ro(e.position,n)})),e({nodeExtent:n,nodeInternals:new Map(r)})},panBy:e=>{const{transform:n,width:r,height:o,d3Zoom:i,d3Selection:a,translateExtent:l}=t();if(!i||!a||!e.x&&!e.y)return!1;const s=wr.translate(n[0]+e.x,n[1]+e.y).scale(n[2]),c=[[0,0],[r,o]],u=i?.constrain()(s,c,l);i.transform(a,u);return n[0]!==u.x||n[1]!==u.y||n[2]!==u.k},cancelConnection:()=>e({connectionNodeId:hl.connectionNodeId,connectionHandleId:hl.connectionHandleId,connectionHandleType:hl.connectionHandleType,connectionStatus:hl.connectionStatus,connectionStartHandle:hl.connectionStartHandle,connectionEndHandle:hl.connectionEndHandle}),reset:()=>e({...hl})})),Object.is),gl=({children:e})=>{const t=s.useRef(null);return t.current||(t.current=ml()),c.createElement(jr,{value:t.current},e)};gl.displayName="ReactFlowProvider";const yl=({children:e})=>s.useContext(Fr)?c.createElement(c.Fragment,null,e):c.createElement(gl,null,e);yl.displayName="ReactFlowWrapper";const vl={input:yi,default:mi,output:bi,group:wi},bl={default:Ho,straight:jo,step:Fo,smoothstep:zo,simplebezier:To},wl=[0,0],xl=[15,15],kl={x:0,y:0,zoom:1},Sl={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},El=s.forwardRef((({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:o,nodeTypes:i=vl,edgeTypes:a=bl,onNodeClick:l,onEdgeClick:s,onInit:u,onMove:d,onMoveStart:f,onMoveEnd:p,onConnect:h,onConnectStart:m,onConnectEnd:g,onClickConnectStart:y,onClickConnectEnd:v,onNodeMouseEnter:b,onNodeMouseMove:w,onNodeMouseLeave:x,onNodeContextMenu:k,onNodeDoubleClick:S,onNodeDragStart:E,onNodeDrag:_,onNodeDragStop:C,onNodesDelete:O,onEdgesDelete:N,onSelectionChange:P,onSelectionDragStart:R,onSelectionDrag:M,onSelectionDragStop:T,onSelectionContextMenu:A,onSelectionStart:D,onSelectionEnd:I,connectionMode:L=Eo.Strict,connectionLineType:z=Oo.Bezier,connectionLineStyle:F,connectionLineComponent:j,connectionLineContainerStyle:B,deleteKeyCode:V="Backspace",selectionKeyCode:H="Shift",selectionOnDrag:U=!1,selectionMode:W=Co.Full,panActivationKeyCode:q="Space",multiSelectionKeyCode:K=(bo()?"Meta":"Control"),zoomActivationKeyCode:X=(bo()?"Meta":"Control"),snapToGrid:Y=!1,snapGrid:G=xl,onlyRenderVisibleElements:Q=!1,selectNodesOnDrag:Z=!0,nodesDraggable:J,nodesConnectable:ee,nodesFocusable:te,nodeOrigin:ne=wl,edgesFocusable:re,edgesUpdatable:oe,elementsSelectable:ie,defaultViewport:ae=kl,minZoom:le=.5,maxZoom:se=2,translateExtent:ce=pl,preventScrolling:ue=!0,nodeExtent:de,defaultMarkerColor:fe="#b1b1b7",zoomOnScroll:pe=!0,zoomOnPinch:he=!0,panOnScroll:me=!1,panOnScrollSpeed:ge=.5,panOnScrollMode:ye=_o.Free,zoomOnDoubleClick:ve=!0,panOnDrag:be=!0,onPaneClick:we,onPaneMouseEnter:xe,onPaneMouseMove:ke,onPaneMouseLeave:Se,onPaneScroll:Ee,onPaneContextMenu:_e,children:Ce,onEdgeContextMenu:Oe,onEdgeDoubleClick:Ne,onEdgeMouseEnter:Pe,onEdgeMouseMove:Re,onEdgeMouseLeave:Me,onEdgeUpdate:Te,onEdgeUpdateStart:Ae,onEdgeUpdateEnd:De,onReconnect:Ie,onReconnectStart:Le,onReconnectEnd:ze,reconnectRadius:Fe=10,edgeUpdaterRadius:je=10,onNodesChange:$e,onEdgesChange:Be,noDragClassName:Ve="nodrag",noWheelClassName:He="nowheel",noPanClassName:Ue="nopan",fitView:We=!1,fitViewOptions:qe,connectOnClick:Ke=!0,attributionPosition:Xe,proOptions:Ye,defaultEdgeOptions:Ge,elevateNodesOnSelect:Qe=!0,elevateEdgesOnSelect:Ze=!1,disableKeyboardA11y:Je=!1,autoPanOnConnect:et=!0,autoPanOnNodeDrag:tt=!0,connectionRadius:nt=20,isValidConnection:rt,onError:ot,style:it,id:at,nodeDragThreshold:lt,...st},ct)=>{const ut=at||"1";return c.createElement("div",{...st,style:{...it,...Sl},ref:ct,className:$(["react-flow",o]),"data-testid":"rf__wrapper",id:at},c.createElement(yl,null,c.createElement(fl,{onInit:u,onMove:d,onMoveStart:f,onMoveEnd:p,onNodeClick:l,onEdgeClick:s,onNodeMouseEnter:b,onNodeMouseMove:w,onNodeMouseLeave:x,onNodeContextMenu:k,onNodeDoubleClick:S,nodeTypes:i,edgeTypes:a,connectionLineType:z,connectionLineStyle:F,connectionLineComponent:j,connectionLineContainerStyle:B,selectionKeyCode:H,selectionOnDrag:U,selectionMode:W,deleteKeyCode:V,multiSelectionKeyCode:K,panActivationKeyCode:q,zoomActivationKeyCode:X,onlyRenderVisibleElements:Q,selectNodesOnDrag:Z,defaultViewport:ae,translateExtent:ce,minZoom:le,maxZoom:se,preventScrolling:ue,zoomOnScroll:pe,zoomOnPinch:he,zoomOnDoubleClick:ve,panOnScroll:me,panOnScrollSpeed:ge,panOnScrollMode:ye,panOnDrag:be,onPaneClick:we,onPaneMouseEnter:xe,onPaneMouseMove:ke,onPaneMouseLeave:Se,onPaneScroll:Ee,onPaneContextMenu:_e,onSelectionContextMenu:A,onSelectionStart:D,onSelectionEnd:I,onEdgeContextMenu:Oe,onEdgeDoubleClick:Ne,onEdgeMouseEnter:Pe,onEdgeMouseMove:Re,onEdgeMouseLeave:Me,onReconnect:Ie??Te,onReconnectStart:Le??Ae,onReconnectEnd:ze??De,reconnectRadius:Fe??je,defaultMarkerColor:fe,noDragClassName:Ve,noWheelClassName:He,noPanClassName:Ue,elevateEdgesOnSelect:Ze,rfId:ut,disableKeyboardA11y:Je,nodeOrigin:ne,nodeExtent:de}),c.createElement(Ri,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:h,onConnectStart:m,onConnectEnd:g,onClickConnectStart:y,onClickConnectEnd:v,nodesDraggable:J,nodesConnectable:ee,nodesFocusable:te,edgesFocusable:re,edgesUpdatable:oe,elementsSelectable:ie,elevateNodesOnSelect:Qe,minZoom:le,maxZoom:se,nodeExtent:de,onNodesChange:$e,onEdgesChange:Be,snapToGrid:Y,snapGrid:G,connectionMode:L,translateExtent:ce,connectOnClick:Ke,defaultEdgeOptions:Ge,fitView:We,fitViewOptions:qe,onNodesDelete:O,onEdgesDelete:N,onNodeDragStart:E,onNodeDrag:_,onNodeDragStop:C,onSelectionDrag:M,onSelectionDragStart:R,onSelectionDragStop:T,noPanClassName:Ue,nodeOrigin:ne,rfId:ut,autoPanOnConnect:et,autoPanOnNodeDrag:tt,onError:ot,connectionRadius:nt,isValidConnection:rt,nodeDragThreshold:lt}),c.createElement(Ci,{onSelectionChange:P}),Ce,c.createElement(Jr,{proOptions:Ye,position:Xe}),c.createElement(zi,{rfId:ut,disableKeyboardA11y:Je})))}));El.displayName="ReactFlow";const _l=e=>e.getNodes();const Cl=e=>e.edges;const Ol=({id:e,x:t,y:n,width:r,height:o,style:i,color:a,strokeColor:l,strokeWidth:s,className:u,borderRadius:d,shapeRendering:f,onClick:p,selected:h})=>{const{background:m,backgroundColor:g}=i||{},y=a||m||g;return c.createElement("rect",{className:$(["react-flow__minimap-node",{selected:h},u]),x:t,y:n,rx:d,ry:d,width:r,height:o,fill:y,stroke:l,strokeWidth:s,shapeRendering:f,onClick:p?t=>p(t,e):void 0})};Ol.displayName="MiniMapNode";var Nl=s.memo(Ol);const Pl=e=>e.nodeOrigin,Rl=e=>e.getNodes().filter((e=>!e.hidden&&e.width&&e.height)),Ml=e=>e instanceof Function?e:()=>e;var Tl=s.memo((function({nodeStrokeColor:e="transparent",nodeColor:t="#e2e2e2",nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:o=2,nodeComponent:i=Nl,onClick:a}){const l=Yr(Rl,q),s=Yr(Pl),u=Ml(t),d=Ml(e),f=Ml(n),p="undefined"==typeof window||window.chrome?"crispEdges":"geometricPrecision";return c.createElement(c.Fragment,null,l.map((e=>{const{x:t,y:n}=Go(e,s).positionAbsolute;return c.createElement(i,{key:e.id,x:t,y:n,width:e.width,height:e.height,style:e.style,selected:e.selected,className:f(e),color:u(e),borderRadius:r,strokeColor:d(e),strokeWidth:o,shapeRendering:p,onClick:a,id:e.id})})))}));const Al=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=Qo(t,e.nodeOrigin),o=n,co(lo(so(r),so(o)))):n,rfId:e.rfId};var r,o};function Dl({style:e,className:t,nodeStrokeColor:n="transparent",nodeColor:r="#e2e2e2",nodeClassName:o="",nodeBorderRadius:i=5,nodeStrokeWidth:a=2,nodeComponent:l,maskColor:u="rgb(240, 240, 240, 0.6)",maskStrokeColor:d="none",maskStrokeWidth:f=1,position:p="bottom-right",onClick:h,onNodeClick:m,pannable:g=!1,zoomable:y=!1,ariaLabel:v="React Flow mini map",inversePan:b=!1,zoomStep:w=10,offsetScale:x=5}){const k=Gr(),S=s.useRef(null),{boundingRect:E,viewBB:_,rfId:C}=Yr(Al,q),O=e?.width??200,N=e?.height??150,P=E.width/O,R=E.height/N,M=Math.max(P,R),T=M*O,A=M*N,D=x*M,I=E.x-(T-E.width)/2-D,L=E.y-(A-E.height)/2-D,z=T+2*D,F=A+2*D,j=`react-flow__minimap-desc-${C}`,B=s.useRef(0);B.current=M,s.useEffect((()=>{if(S.current){const e=ut(S.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)*w,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 l=B.current*Math.max(1,t[2])*(b?-1:1),s={x:t[0]-e.sourceEvent.movementX*l,y:t[1]-e.sourceEvent.movementY*l},c=[[0,0],[i,a]],u=wr.translate(s.x,s.y).scale(t[2]),d=r.constrain()(u,c,o);r.transform(n,d)},r=Pr().on("zoom",g?n:null).on("zoom.wheel",y?t:null);return e.call(r),()=>{e.on("zoom",null)}}}),[g,y,b,w]);const V=h?e=>{const t=dt(e);h(e,{x:t[0],y:t[1]})}:void 0,H=m?(e,t)=>{const n=k.getState().nodeInternals.get(t);m(e,n)}:void 0;return c.createElement(Zr,{position:p,style:e,className:$(["react-flow__minimap",t]),"data-testid":"rf__minimap"},c.createElement("svg",{width:O,height:N,viewBox:`${I} ${L} ${z} ${F}`,role:"img","aria-labelledby":j,ref:S,onClick:V},v&&c.createElement("title",{id:j},v),c.createElement(Tl,{onClick:H,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:i,nodeClassName:o,nodeStrokeWidth:a,nodeComponent:l}),c.createElement("path",{className:"react-flow__minimap-mask",d:`M${I-D},${L-D}h${z+2*D}v${F+2*D}h${-z-2*D}z\n M${_.x},${_.y}h${_.width}v${_.height}h${-_.width}z`,fill:u,fillRule:"evenodd",stroke:d,strokeWidth:f,pointerEvents:"none"})))}Dl.displayName="MiniMap";var Il,Ll=s.memo(Dl);function zl({color:e,dimensions:t,lineWidth:n}){return c.createElement("path",{stroke:e,strokeWidth:n,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`})}function Fl({color:e,radius:t}){return c.createElement("circle",{cx:t,cy:t,r:t,fill:e})}!function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"}(Il||(Il={}));const jl={[Il.Dots]:"#91919a",[Il.Lines]:"#eee",[Il.Cross]:"#e2e2e2"},$l={[Il.Dots]:1,[Il.Lines]:1,[Il.Cross]:6},Bl=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function Vl({id:e,variant:t=Il.Dots,gap:n=20,size:r,lineWidth:o=1,offset:i=2,color:a,style:l,className:u}){const d=s.useRef(null),{transform:f,patternId:p}=Yr(Bl,q),h=a||jl[t],m=r||$l[t],g=t===Il.Dots,y=t===Il.Cross,v=Array.isArray(n)?n:[n,n],b=[v[0]*f[2]||1,v[1]*f[2]||1],w=m*f[2],x=y?[w,w]:b,k=g?[w/i,w/i]:[x[0]/i,x[1]/i];return c.createElement("svg",{className:$(["react-flow__background",u]),style:{...l,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:d,"data-testid":"rf__background"},c.createElement("pattern",{id:p+e,x:f[0]%b[0],y:f[1]%b[1],width:b[0],height:b[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${k[0]},-${k[1]})`},g?c.createElement(Fl,{color:h,radius:w/i}):c.createElement(zl,{dimensions:x,color:h,lineWidth:o})),c.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${p+e})`}))}Vl.displayName="Background";var Hl=s.memo(Vl);const Ul=({src_nid:e,src_ioid:t,trg_nid:n,trg_ioid:r})=>[`${e}:${t}`,`${n}:${r}`].sort().join("--"),Wl=0,ql=10,Kl=20,Xl=30,Yl=ql,Gl=e=>"string"==typeof e?e:e===Wl?"DEBUG":e===ql?"INFO":e===Kl?"WARN":e===Xl?"ERROR":"UNKNOWN";class Ql{constructor(e,t=ql){this.name=e,this.level=(e=>{if("number"==typeof e)return e;const t=e.toLowerCase();if("debug"===t)return Wl;if("info"===t)return ql;if("warn"===t||"warning"===t)return Kl;if("error"===t)return Xl;throw new Error(`Unknown log level: ${e}`)})(t),this._level_name=Gl(t)}set_level(e){this.level=e,this._level_name=Gl(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<=Wl&&console.debug(this._fomat_message(e,...t))}info(e,...t){this.level<=ql&&console.info(this._fomat_message(e,...t))}warn(e,...t){this.level<=Kl&&console.warn(this._fomat_message(e,...t))}error(e,...t){this.level<=Xl&&console.error(this._fomat_message(e,...t))}}const Zl=(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),Jl=(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=F(e)).id)throw new Error("Node must have an id");for(const t in e.io)e.io[t].node=e.id,Zl(e.io[t],n);return{position:{x:e.frontend.pos[0],y:e.frontend.pos[1]},data:{UseNodeStore:t},type:"default",...e}},es=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=>P(((t,n)=>F(j(e)))))(e.node),i.nodesstates.set(e.node.id,n)}catch(e){return void l.logger.error(`Failed to create node store ${e}`)}const r=n.getState();l.logger.info("Add node",r.id,r.name);const a=[...t.nodes,Jl(r,n,l)];o.setState({nodes:a});for(const t in e.node.io){const n=e.node.io[t].id;void 0!==n&&l.worker?.get_io_value({nid:e.node.id,ioid:n})}setTimeout((()=>{l.worker?.call_hooks("node_added",{node:r.id})}),0)}},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;j(e.node);const n=t.getState(),{new_obj:r,change:o}=T(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)}}Jl(r,t,l),l.logger.debug("update_action",r),t.setState(F(r))}}else l.worker&&l.worker.locally_update_node(e)})(e);break;case"delete":(e=>{l.logger.info("Deleting node",e.id),e.from_remote?o.getState().onNodesChange([{type:"remove",id:e.id}]):l.worker?.remove_node(e.id)})(e);break;case"error":(e=>{l.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}):l.worker?.trigger_node(e.id)})(e);break;default:l.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=P(((e,t)=>({nodes:[],edges:[],onNodesChange:n=>{e({nodes:ua(n,t().nodes)}),r(n)},onEdgesChange:n=>{e({edges:da(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&&l.worker&&l.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:P(((e,t)=>({lib:{shelves:[]},external_worker:[],set:t=>e((e=>({...e,...t}))),get_lib:()=>t().lib,get_external_worker:()=>t().external_worker})))},l={local_settings:P(((e,t)=>({view_settings:{expand_node_props:!1},update_view_settings:e=>{const t=l.local_settings.getState().view_settings,{new_obj:n,change:r}=T(t,e);r&&l.local_settings.setState((e=>({...e,view_settings:n})))}}))),local_state:P(((e,t)=>({selected_nodes:[],selected_edges:[]}))),options:t,lib:a,workermanager:void 0,workers:P(((e,t)=>({}))),workerstate:P(((e,t)=>({is_open:!1}))),render_options:P(((e,t)=>({}))),progress_state:P(((e,t)=>({message:"please select worker",status:"info",progress:0,blocking:!1}))),update_render_options:e=>{const t=l.render_options.getState(),{new_obj:n,change:r}=T(t,e);r&&l.render_options.setState(n)},worker:void 0,_unsubscribeFromWorker:void 0,set_worker:e=>{e!==l.worker&&(l._unsubscribeFromWorker&&(l._unsubscribeFromWorker(),l._unsubscribeFromWorker=void 0),e&&(l._unsubscribeFromWorker=e.state.subscribe((e=>{l.workerstate.setState(e)})),l.workerstate.setState(e.state.getState())),l.worker=e,e?.set_zustand(l))},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=Ul(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"};l.logger.info("Adding edge",i),o.setState({edges:[...n,i]}),l.worker?.get_remote_node_state(e.src_nid),l.worker?.get_remote_node_state(e.trg_nid)}break;case"delete":if(e.from_remote){const n=t.edges,r=Ul(e);l.logger.info("Deleting edge",r);const i=n.filter((e=>e.id!==r));o.setState({edges:i}),l.worker?.get_remote_node_state(e.src_nid),l.worker?.get_remote_node_state(e.trg_nid)}break;default:l.logger.error("Unknown edge action",e)}},reactflowRef:null,clear_all:()=>{l.worker?.disconnect(),l.set_worker(void 0),l.workermanager?.setWorker(void 0),l.lib.libstate.getState().set({lib:{shelves:[]},external_worker:[]}),l.nodespace.nodesstates.clear(),l.useReactFlowStore.setState({nodes:[],edges:[]}),l.auto_progress()},center_node:e=>{if(!l.rf_instance)return;e=Array.isArray(e)?e:[e];const t=l.useReactFlowStore.getState().nodes.filter((t=>e.includes(t.id)));t.length>0&&l.rf_instance?.fitView({padding:.2,nodes:t})},set_progress:e=>{if(""===e.message)return l.auto_progress();const t=l.progress_state.getState(),{new_obj:n,change:r}=T(t,e);r&&l.progress_state.setState(n)},auto_progress:()=>void 0===l.workermanager||l.workermanager.open?void 0===l.worker?l.set_progress({progress:0,message:"please select worker",status:"error",blocking:!1}):l.worker.is_open?void l.set_progress({progress:1,message:"running",status:"info",blocking:!1}):l.set_progress({progress:0,message:"connecting to worker",status:"info",blocking:!0}):l.set_progress({progress:0,message:"connecting to worker manager",status:"error",blocking:!1}),plugins:P(((e,t)=>({}))),add_plugin:(e,t)=>{void 0!==t&&l.plugins.setState((n=>({...n,[e]:t})))},dev_settings:{debug:!0},logger:new Ql("fn",Yl)};return l};function ts(e,t){return function(){return e.apply(t,arguments)}}const{toString:ns}=Object.prototype,{getPrototypeOf:rs}=Object,os=(e=>t=>{const n=ns.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),is=e=>(e=e.toLowerCase(),t=>os(t)===e),as=e=>t=>typeof t===e,{isArray:ls}=Array,ss=as("undefined");const cs=is("ArrayBuffer");const us=as("string"),ds=as("function"),fs=as("number"),ps=e=>null!==e&&"object"==typeof e,hs=e=>{if("object"!==os(e))return!1;const t=rs(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},ms=is("Date"),gs=is("File"),ys=is("Blob"),vs=is("FileList"),bs=is("URLSearchParams"),[ws,xs,ks,Ss]=["ReadableStream","Request","Response","Headers"].map(is);function Es(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),ls(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 _s(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 Cs="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:window,Os=e=>!ss(e)&&e!==Cs;const Ns=(Ps="undefined"!=typeof Uint8Array&&rs(Uint8Array),e=>Ps&&e instanceof Ps);var Ps;const Rs=is("HTMLFormElement"),Ms=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Ts=is("RegExp"),As=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Es(n,((n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)})),Object.defineProperties(e,r)},Ds="abcdefghijklmnopqrstuvwxyz",Is="0123456789",Ls={DIGIT:Is,ALPHA:Ds,ALPHA_DIGIT:Ds+Ds.toUpperCase()+Is};const zs=is("AsyncFunction"),Fs=(js="function"==typeof setImmediate,$s=ds(Cs.postMessage),js?setImmediate:$s?((e,t)=>(Cs.addEventListener("message",(({source:n,data:r})=>{n===Cs&&r===e&&t.length&&t.shift()()}),!1),n=>{t.push(n),Cs.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e));var js,$s;const Bs="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Cs):"undefined"!=typeof process&&process.nextTick||Fs;var Vs={isArray:ls,isArrayBuffer:cs,isBuffer:function(e){return null!==e&&!ss(e)&&null!==e.constructor&&!ss(e.constructor)&&ds(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||ds(e.append)&&("formdata"===(t=os(e))||"object"===t&&ds(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&cs(e.buffer),t},isString:us,isNumber:fs,isBoolean:e=>!0===e||!1===e,isObject:ps,isPlainObject:hs,isReadableStream:ws,isRequest:xs,isResponse:ks,isHeaders:Ss,isUndefined:ss,isDate:ms,isFile:gs,isBlob:ys,isRegExp:Ts,isFunction:ds,isStream:e=>ps(e)&&ds(e.pipe),isURLSearchParams:bs,isTypedArray:Ns,isFileList:vs,forEach:Es,merge:function e(){const{caseless:t}=Os(this)&&this||{},n={},r=(r,o)=>{const i=t&&_s(n,o)||o;hs(n[i])&&hs(r)?n[i]=e(n[i],r):hs(r)?n[i]=e({},r):ls(r)?n[i]=r.slice():n[i]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&Es(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(Es(t,((t,r)=>{n&&ds(t)?e[r]=ts(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 l={};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)||l[a]||(t[a]=e[a],l[a]=!0);e=!1!==n&&rs(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:os,kindOfTest:is,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(ls(e))return e;let t=e.length;if(!fs(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:Rs,hasOwnProperty:Ms,hasOwnProp:Ms,reduceDescriptors:As,freezeMethods:e=>{As(e,((t,n)=>{if(ds(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];ds(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 ls(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:_s,window:Cs,isContextDefined:Os,ALPHABET:Ls,generateString:(e=16,t=Ls.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&ds(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(ps(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=ls(e)?[]:{};return Es(e,((e,t)=>{const i=n(e,r+1);!ss(i)&&(o[t]=i)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:zs,isThenable:e=>e&&(ps(e)||ds(e))&&ds(e.then)&&ds(e.catch),setImmediate:Fs,asap:Bs};function Hs(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)}Vs.inherits(Hs,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:Vs.toJSONObject(this.config),code:this.code,status:this.status}}});const Us=Hs.prototype,Ws={};["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=>{Ws[e]={value:e}})),Object.defineProperties(Hs,Ws),Object.defineProperty(Us,"isAxiosError",{value:!0}),Hs.from=(e,t,n,r,o,i)=>{const a=Object.create(Us);return Vs.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),Hs.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};function qs(e){return Vs.isPlainObject(e)||Vs.isArray(e)}function Ks(e){return Vs.endsWith(e,"[]")?e.slice(0,-2):e}function Xs(e,t,n){return e?e.concat(t).map((function(e,t){return e=Ks(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const Ys=Vs.toFlatObject(Vs,{},null,(function(e){return/^is[A-Z]/.test(e)}));function Gs(e,t,n){if(!Vs.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=Vs.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!Vs.isUndefined(t[e])}))).metaTokens,o=n.visitor||c,i=n.dots,a=n.indexes,l=(n.Blob||"undefined"!=typeof Blob&&Blob)&&Vs.isSpecCompliantForm(t);if(!Vs.isFunction(o))throw new TypeError("visitor must be a function");function s(e){if(null===e)return"";if(Vs.isDate(e))return e.toISOString();if(!l&&Vs.isBlob(e))throw new Hs("Blob is not supported. Use a Buffer instead.");return Vs.isArrayBuffer(e)||Vs.isTypedArray(e)?l&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,o){let l=e;if(e&&!o&&"object"==typeof e)if(Vs.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(Vs.isArray(e)&&function(e){return Vs.isArray(e)&&!e.some(qs)}(e)||(Vs.isFileList(e)||Vs.endsWith(n,"[]"))&&(l=Vs.toArray(e)))return n=Ks(n),l.forEach((function(e,r){!Vs.isUndefined(e)&&null!==e&&t.append(!0===a?Xs([n],r,i):null===a?n:n+"[]",s(e))})),!1;return!!qs(e)||(t.append(Xs(o,n,i),s(e)),!1)}const u=[],d=Object.assign(Ys,{defaultVisitor:c,convertValue:s,isVisitable:qs});if(!Vs.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!Vs.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),Vs.forEach(n,(function(n,i){!0===(!(Vs.isUndefined(n)||null===n)&&o.call(t,n,Vs.isString(i)?i.trim():i,r,d))&&e(n,r?r.concat(i):[i])})),u.pop()}}(e),t}function Qs(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Zs(e,t){this._pairs=[],e&&Gs(e,this,t)}const Js=Zs.prototype;function ec(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function tc(e,t,n){if(!t)return e;const r=n&&n.encode||ec;Vs.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(i=o?o(t,n):Vs.isURLSearchParams(t)?t.toString():new Zs(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}Js.append=function(e,t){this._pairs.push([e,t])},Js.toString=function(e){const t=e?function(t){return e.call(this,t,Qs)}:Qs;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};class nc{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){Vs.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}var rc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},oc={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Zs,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const ic="undefined"!=typeof window&&"undefined"!=typeof document,ac="object"==typeof navigator&&navigator||void 0,lc=ic&&(!ac||["ReactNative","NativeScript","NS"].indexOf(ac.product)<0),sc="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,cc=ic&&window.location.href||"http://localhost";var uc={...Object.freeze({__proto__:null,hasBrowserEnv:ic,hasStandardBrowserEnv:lc,hasStandardBrowserWebWorkerEnv:sc,navigator:ac,origin:cc}),...oc};function dc(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),l=o>=e.length;if(i=!i&&Vs.isArray(r)?r.length:i,l)return Vs.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a;r[i]&&Vs.isObject(r[i])||(r[i]=[]);return t(e,n,r[i],o)&&Vs.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(Vs.isFormData(e)&&Vs.isFunction(e.entries)){const n={};return Vs.forEachEntry(e,((e,r)=>{t(function(e){return Vs.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null}const fc={transitional:rc,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=Vs.isObject(e);o&&Vs.isHTMLForm(e)&&(e=new FormData(e));if(Vs.isFormData(e))return r?JSON.stringify(dc(e)):e;if(Vs.isArrayBuffer(e)||Vs.isBuffer(e)||Vs.isStream(e)||Vs.isFile(e)||Vs.isBlob(e)||Vs.isReadableStream(e))return e;if(Vs.isArrayBufferView(e))return e.buffer;if(Vs.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 Gs(e,new uc.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return uc.isNode&&Vs.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=Vs.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Gs(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(Vs.isString(e))try{return(t||JSON.parse)(e),Vs.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||fc.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(Vs.isResponse(e)||Vs.isReadableStream(e))return e;if(e&&Vs.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 Hs.from(e,Hs.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:uc.classes.FormData,Blob:uc.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Vs.forEach(["delete","get","head","post","put","patch"],(e=>{fc.headers[e]={}}));const pc=Vs.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 hc=Symbol("internals");function mc(e){return e&&String(e).trim().toLowerCase()}function gc(e){return!1===e||null==e?e:Vs.isArray(e)?e.map(gc):String(e)}function yc(e,t,n,r,o){return Vs.isFunction(r)?r.call(this,t,n):(o&&(t=n),Vs.isString(t)?Vs.isString(r)?-1!==t.indexOf(r):Vs.isRegExp(r)?r.test(t):void 0:void 0)}let vc=class{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=mc(t);if(!o)throw new Error("header name must be a non-empty string");const i=Vs.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=gc(e))}const i=(e,t)=>Vs.forEach(e,((e,n)=>o(e,n,t)));if(Vs.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(Vs.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]&&pc[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(Vs.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=mc(e)){const n=Vs.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(Vs.isFunction(t))return t.call(this,e,n);if(Vs.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=mc(e)){const n=Vs.findKey(this,e);return!(!n||void 0===this[n]||t&&!yc(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=mc(e)){const o=Vs.findKey(n,e);!o||t&&!yc(0,n[o],o,t)||(delete n[o],r=!0)}}return Vs.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&&!yc(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return Vs.forEach(this,((r,o)=>{const i=Vs.findKey(n,o);if(i)return t[i]=gc(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]=gc(r),n[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Vs.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&Vs.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[hc]=this[hc]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=mc(e);t[r]||(!function(e,t){const n=Vs.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 Vs.isArray(e)?e.forEach(r):r(e),this}};function bc(e,t){const n=this||fc,r=t||n,o=vc.from(r.headers);let i=r.data;return Vs.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function wc(e){return!(!e||!e.__CANCEL__)}function xc(e,t,n){Hs.call(this,null==e?"canceled":e,Hs.ERR_CANCELED,t,n),this.name="CanceledError"}function kc(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Hs("Request failed with status code "+n.status,[Hs.ERR_BAD_REQUEST,Hs.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}vc.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Vs.reduceDescriptors(vc.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),Vs.freezeMethods(vc),Vs.inherits(xc,Hs,{__CANCEL__:!0});const Sc=(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(l){const s=Date.now(),c=r[a];o||(o=s),n[i]=l,r[i]=s;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),s-o<t)return;const f=c&&s-c;return f?Math.round(1e3*d/f):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(),l=t-o;l>=i?a(e,t):(n=e,r||(r=setTimeout((()=>{r=null,a(n)}),i-l)))},()=>n&&a(n)]}((n=>{const i=n.loaded,a=n.lengthComputable?n.total:void 0,l=i-r,s=o(l);r=i;e({loaded:i,total:a,progress:a?i/a:void 0,bytes:l,rate:s||void 0,estimated:s&&a&&i<=a?(a-i)/s:void 0,event:n,lengthComputable:null!=a,[t?"download":"upload"]:!0})}),n)},Ec=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},_c=e=>(...t)=>Vs.asap((()=>e(...t)));var Cc=uc.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,uc.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(uc.origin),uc.navigator&&/(msie|trident)/i.test(uc.navigator.userAgent)):()=>!0,Oc=uc.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const a=[e+"="+encodeURIComponent(t)];Vs.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),Vs.isString(r)&&a.push("path="+r),Vs.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 Nc(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 Pc=e=>e instanceof vc?{...e}:e;function Rc(e,t){t=t||{};const n={};function r(e,t,n,r){return Vs.isPlainObject(e)&&Vs.isPlainObject(t)?Vs.merge.call({caseless:r},e,t):Vs.isPlainObject(t)?Vs.merge({},t):Vs.isArray(t)?t.slice():t}function o(e,t,n,o){return Vs.isUndefined(t)?Vs.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function i(e,t){if(!Vs.isUndefined(t))return r(void 0,t)}function a(e,t){return Vs.isUndefined(t)?Vs.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function l(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const s={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:l,headers:(e,t,n)=>o(Pc(e),Pc(t),0,!0)};return Vs.forEach(Object.keys(Object.assign({},e,t)),(function(r){const i=s[r]||o,a=i(e[r],t[r],r);Vs.isUndefined(a)&&i!==l||(n[r]=a)})),n}var Mc=e=>{const t=Rc({},e);let n,{data:r,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:a,headers:l,auth:s}=t;if(t.headers=l=vc.from(l),t.url=tc(Nc(t.baseURL,t.url),e.params,e.paramsSerializer),s&&l.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),Vs.isFormData(r))if(uc.hasStandardBrowserEnv||uc.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if(!1!==(n=l.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];l.setContentType([e||"multipart/form-data",...t].join("; "))}if(uc.hasStandardBrowserEnv&&(o&&Vs.isFunction(o)&&(o=o(t)),o||!1!==o&&Cc(t.url))){const e=i&&a&&Oc.read(a);e&&l.set(i,e)}return t};var Tc="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=Mc(e);let o=r.data;const i=vc.from(r.headers).normalize();let a,l,s,c,u,{responseType:d,onUploadProgress:f,onDownloadProgress:p}=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=vc.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());kc((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 Hs("Request aborted",Hs.ECONNABORTED,e,m)),m=null)},m.onerror=function(){n(new Hs("Network Error",Hs.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||rc;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Hs(t,o.clarifyTimeoutError?Hs.ETIMEDOUT:Hs.ECONNABORTED,e,m)),m=null},void 0===o&&i.setContentType(null),"setRequestHeader"in m&&Vs.forEach(i.toJSON(),(function(e,t){m.setRequestHeader(t,e)})),Vs.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),d&&"json"!==d&&(m.responseType=r.responseType),p&&([s,u]=Sc(p,!0),m.addEventListener("progress",s)),f&&m.upload&&([l,c]=Sc(f),m.upload.addEventListener("progress",l),m.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(a=t=>{m&&(n(!t||t.type?new xc(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===uc.protocols.indexOf(y)?n(new Hs("Unsupported protocol "+y+":",Hs.ERR_BAD_REQUEST,e)):m.send(o||null)}))};const Ac=(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 Hs?t:new xc(t instanceof Error?t.message:t))}};let i=t&&setTimeout((()=>{i=null,o(new Hs(`timeout ${t} of ms exceeded`,Hs.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:l}=r;return l.unsubscribe=()=>Vs.asap(a),l}},Dc=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},Ic=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()}},Lc=(e,t,n,r)=>{const o=async function*(e,t){for await(const n of Ic(e))yield*Dc(n,t)}(e,t);let i,a=0,l=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 l(),void e.close();let i=r.byteLength;if(n){let e=a+=i;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw l(e),e}},cancel:e=>(l(e),o.return())},{highWaterMark:2})},zc="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Fc=zc&&"function"==typeof ReadableStream,jc=zc&&("function"==typeof TextEncoder?($c=new TextEncoder,e=>$c.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var $c;const Bc=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Vc=Fc&&Bc((()=>{let e=!1;const t=new Request(uc.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),Hc=Fc&&Bc((()=>Vs.isReadableStream(new Response("").body))),Uc={stream:Hc&&(e=>e.body)};var Wc;zc&&(Wc=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!Uc[e]&&(Uc[e]=Vs.isFunction(Wc[e])?t=>t[e]():(t,n)=>{throw new Hs(`Response type '${e}' is not supported`,Hs.ERR_NOT_SUPPORT,n)})})));const qc=async(e,t)=>{const n=Vs.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(Vs.isBlob(e))return e.size;if(Vs.isSpecCompliantForm(e)){const t=new Request(uc.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Vs.isArrayBufferView(e)||Vs.isArrayBuffer(e)?e.byteLength:(Vs.isURLSearchParams(e)&&(e+=""),Vs.isString(e)?(await jc(e)).byteLength:void 0)})(t):n};var Kc=zc&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:l,onUploadProgress:s,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:f}=Mc(e);c=c?(c+"").toLowerCase():"text";let p,h=Ac([o,i&&i.toAbortSignal()],a);const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let g;try{if(s&&Vc&&"get"!==n&&"head"!==n&&0!==(g=await qc(u,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(Vs.isFormData(r)&&(e=n.headers.get("content-type"))&&u.setContentType(e),n.body){const[e,t]=Ec(g,Sc(_c(s)));r=Lc(n.body,65536,e,t)}}Vs.isString(d)||(d=d?"include":"omit");const o="credentials"in Request.prototype;p=new Request(t,{...f,signal:h,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:o?d:void 0});let i=await fetch(p);const a=Hc&&("stream"===c||"response"===c);if(Hc&&(l||a&&m)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=i[t]}));const t=Vs.toFiniteNumber(i.headers.get("content-length")),[n,r]=l&&Ec(t,Sc(_c(l),!0))||[];i=new Response(Lc(i.body,65536,n,(()=>{r&&r(),m&&m()})),e)}c=c||"text";let y=await Uc[Vs.findKey(Uc,c)||"text"](i,e);return!a&&m&&m(),await new Promise(((t,n)=>{kc(t,n,{data:y,headers:vc.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:p})}))}catch(t){if(m&&m(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new Hs("Network Error",Hs.ERR_NETWORK,e,p),{cause:t.cause||t});throw Hs.from(t,t&&t.code,e,p)}});const Xc={http:null,xhr:Tc,fetch:Kc};Vs.forEach(Xc,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Yc=e=>`- ${e}`,Gc=e=>Vs.isFunction(e)||null===e||!1===e;var Qc=e=>{e=Vs.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,!Gc(n)&&(r=Xc[(t=String(n)).toLowerCase()],void 0===r))throw new Hs(`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 Hs("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Yc).join("\n"):" "+Yc(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function Zc(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new xc(null,e)}function Jc(e){Zc(e),e.headers=vc.from(e.headers),e.data=bc.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Qc(e.adapter||fc.adapter)(e).then((function(t){return Zc(e),t.data=bc.call(e,e.transformResponse,t),t.headers=vc.from(t.headers),t}),(function(t){return wc(t)||(Zc(e),t&&t.response&&(t.response.data=bc.call(e,e.transformResponse,t.response),t.response.headers=vc.from(t.response.headers))),Promise.reject(t)}))}const eu="1.7.9",tu={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{tu[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const nu={};tu.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 Hs(r(o," has been removed"+(t?" in "+t:"")),Hs.ERR_DEPRECATED);return t&&!nu[o]&&(nu[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)}},tu.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};var ru={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Hs("options must be an object",Hs.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 Hs("option "+i+" must be "+n,Hs.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Hs("Unknown option "+i,Hs.ERR_BAD_OPTION)}},validators:tu};const ou=ru.validators;let iu=class{constructor(e){this.defaults=e,this.interceptors={request:new nc,response:new nc}}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=Rc(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&ru.assertOptions(n,{silentJSONParsing:ou.transitional(ou.boolean),forcedJSONParsing:ou.transitional(ou.boolean),clarifyTimeoutError:ou.transitional(ou.boolean)},!1),null!=r&&(Vs.isFunction(r)?t.paramsSerializer={serialize:r}:ru.assertOptions(r,{encode:ou.function,serialize:ou.function},!0)),ru.assertOptions(t,{baseUrl:ou.spelling("baseURL"),withXsrfToken:ou.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&Vs.merge(o.common,o[t.method]);o&&Vs.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=vc.concat(i,o);const a=[];let l=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(l=l&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const s=[];let c;this.interceptors.response.forEach((function(e){s.push(e.fulfilled,e.rejected)}));let u,d=0;if(!l){const e=[Jc.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,s),u=e.length,c=Promise.resolve(t);d<u;)c=c.then(e[d++],e[d++]);return c}u=a.length;let f=t;for(d=0;d<u;){const e=a[d++],t=a[d++];try{f=e(f)}catch(e){t.call(this,e);break}}try{c=Jc.call(this,f)}catch(e){return Promise.reject(e)}for(d=0,u=s.length;d<u;)c=c.then(s[d++],s[d++]);return c}getUri(e){return tc(Nc((e=Rc(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}};Vs.forEach(["delete","get","head","options"],(function(e){iu.prototype[e]=function(t,n){return this.request(Rc(n||{},{method:e,url:t,data:(n||{}).data}))}})),Vs.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(Rc(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}iu.prototype[e]=t(),iu.prototype[e+"Form"]=t(!0)}));const au={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(au).forEach((([e,t])=>{au[t]=e}));const lu=function e(t){const n=new iu(t),r=ts(iu.prototype.request,n);return Vs.extend(r,iu.prototype,n,{allOwnKeys:!0}),Vs.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Rc(t,n))},r}(fc);lu.Axios=iu,lu.CanceledError=xc,lu.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 xc(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}}},lu.isCancel=wc,lu.VERSION=eu,lu.toFormData=Gs,lu.AxiosError=Hs,lu.Cancel=lu.CanceledError,lu.all=function(e){return Promise.all(e)},lu.spread=function(e){return function(t){return e.apply(null,t)}},lu.isAxiosError=function(e){return Vs.isObject(e)&&!0===e.isAxiosError},lu.mergeConfig=Rc,lu.AxiosHeaders=vc,lu.formToJSON=e=>dc(Vs.isHTMLForm(e)?new FormData(e):e),lu.getAdapter=Qc,lu.HttpStatusCode=au,lu.default=lu;const{Axios:su,AxiosError:cu,CanceledError:uu,isCancel:du,CancelToken:fu,VERSION:pu,all:hu,Cancel:mu,isAxiosError:gu,spread:yu,toFormData:vu,AxiosHeaders:bu,HttpStatusCode:wu,formToJSON:xu,getAdapter:ku,mergeConfig:Su}=lu;let Eu;const _u=new Uint8Array(16);function Cu(){if(!Eu&&(Eu="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Eu))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Eu(_u)}const Ou=[];for(let e=0;e<256;++e)Ou.push((e+256).toString(16).slice(1));var Nu={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Pu(e,t,n){if(Nu.randomUUID&&!e)return Nu.randomUUID();const r=(e=e||{}).random||(e.rng||Cu)();return r[6]=15&r[6]|64,r[8]=63&r[8]|128,function(e,t=0){return Ou[e[t+0]]+Ou[e[t+1]]+Ou[e[t+2]]+Ou[e[t+3]]+"-"+Ou[e[t+4]]+Ou[e[t+5]]+"-"+Ou[e[t+6]]+Ou[e[t+7]]+"-"+Ou[e[t+8]]+Ou[e[t+9]]+"-"+Ou[e[t+10]]+Ou[e[t+11]]+Ou[e[t+12]]+Ou[e[t+13]]+Ou[e[t+14]]+Ou[e[t+15]]}(r)}class Ru{constructor(e){this._hooks=new Map,this._ns_event_intercepts=new Map,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=P(((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())}add_hook(e,t){const n=this._hooks.get(e)||[];n.push(t),this._hooks.set(e,n);return()=>{const n=this._hooks.get(e)||[],r=n.indexOf(t);r>=0&&n.splice(r,1)}}async call_hooks(e,t){const n=[];for(const r of this._hooks.get(e)||[]){const e=r({worker:this,data:t});e instanceof Promise&&n.push(e)}await Promise.all(n)}add_ns_event_intercept(e,t){const n=this._ns_event_intercepts.get(e)||[];n.push(t),this._ns_event_intercepts.set(e,n);return()=>{const n=this._ns_event_intercepts.get(e)||[],r=n.indexOf(t);r>=0&&n.splice(r,1)}}async intercept_ns_event(e){let t=e;for(const n of this._ns_event_intercepts.get(e.event)||[])t=await n(t);return t}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),l=await import(a);URL.revokeObjectURL(a),this._zustand.add_plugin(t,l.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}=T(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 get_runstate(){return await this._send_cmd({cmd:"get_runstate",wait_for_response:!0})}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||Pu();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();case"starting":return void this.call_hooks("starting");case"stopping":return void this.call_hooks("stopping");default:console.warn("Unhandled worker event",e,t)}}async receive_nodespace_event(e){const{event:t,data:n}=await this.intercept_ns_event(e);switch(t){case"after_set_value":if(!this._zustand)return;return this._zustand.on_node_action({type:"update",node:{id:n.node,io:{[n.io]:{value:n.result}}},id:n.node,from_remote:!0});case"after_update_value_options":if(!this._zustand)return;return this._zustand.on_node_action({type:"update",node:{id:n.node,io:{[n.io]:{value_options:n.result}}},id:n.node,from_remote:!0});case"triggerstart":if(!this._zustand)return;return this._zustand.on_node_action({type:"update",node:{id:n.node,in_trigger:!0},id:n.node,from_remote:!0});case"triggerdone":if(!this._zustand)return;return this._zustand.on_node_action({type:"update",node:{id:n.node,in_trigger:!1},id:n.node,from_remote:!0});case"node_trigger_error":if(!this._zustand)return;return this._zustand.on_node_action({type:"error",errortype:"trigger",error:n.error,id:n.node,tb:n.tb,from_remote:!0});case"node_removed":if(!this._zustand)return;return this._zustand.on_node_action({type:"delete",id:n.node,from_remote:!0}),void this.call_hooks("node_removed",{node:n.node});case"node_added":return void this._receive_node_added(n.node);case"after_disconnect":case"after_unforward":if(!n.result)return;if(!Array.isArray(n.result))return;if(4!==n.result.length)return;if(!this._zustand)return;return this._zustand.on_edge_action({type:"delete",from_remote:!0,src_nid:n.result[0],src_ioid:n.result[1],trg_nid:n.result[2],trg_ioid:n.result[3]});case"after_connect":case"after_forward":if(!n.result)return;if(!Array.isArray(n.result))return;if(4!==n.result.length)return;return this._receive_edge_added(...n.result);case"after_add_shelf":case"after_remove_shelf":if(!n.result)return;if(!this._zustand)return;return this._zustand.lib.libstate.getState().set({lib:n.result});case"progress":if(!this._zustand)return;if(n.node)return this._zustand.on_node_action({type:"update",node:{id:n.node,progress:n.info},id:n.node,from_remote:!0});console.warn("Unhandled nodepsace event",t,n);break;default:console.warn("Unhandled nodepsace event",t,n)}}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 Mu extends Ru{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 lu.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 Tu{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 Mu({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 Au(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function Du(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Iu(...e){return t=>{let n=!1;const r=e.map((e=>{const r=Du(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():Du(e[t],null)}}}}function Lu(...e){return s.useCallback(Iu(...e),e)}var zu,Fu,ju={exports:{}},$u={};var Bu=(Fu||(Fu=1,ju.exports=function(){if(zu)return $u;zu=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 $u.Fragment=t,$u.jsx=n,$u.jsxs=n,$u}()),ju.exports);function Vu(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>s.createContext(e)));return function(n){const r=n?.[e]||t;return s.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=s.createContext(r),i=n.length;n=[...n,r];const a=t=>{const{scope:n,children:r,...a}=t,l=n?.[e]?.[i]||o,c=s.useMemo((()=>a),Object.values(a));return Bu.jsx(l.Provider,{value:c,children:r})};return a.displayName=t+"Provider",[a,function(n,a){const l=a?.[e]?.[i]||o,c=s.useContext(l);if(c)return c;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},Hu(r,...t)]}function Hu(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return s.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}var Uu=Boolean(globalThis?.document)?s.useLayoutEffect:()=>{},Wu=u["useId".toString()]||(()=>{}),qu=0;function Ku(e){const[t,n]=s.useState(Wu());return Uu((()=>{n((e=>e??String(qu++)))}),[e]),e||(t?`radix-${t}`:"")}function Xu(e){const t=s.useRef(e);return s.useEffect((()=>{t.current=e})),s.useMemo((()=>(...e)=>t.current?.(...e)),[])}function Yu({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=function({defaultProp:e,onChange:t}){const n=s.useState(e),[r]=n,o=s.useRef(r),i=Xu(t);return s.useEffect((()=>{o.current!==r&&(i(r),o.current=r)}),[r,o,i]),n}({defaultProp:t,onChange:n}),i=void 0!==e,a=i?e:r,l=Xu(n);return[a,s.useCallback((t=>{if(i){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[i,e,o,l])]}var Gu=s.forwardRef(((e,t)=>{const{children:n,...r}=e,o=s.Children.toArray(n),i=o.find(Ju);if(i){const e=i.props.children,n=o.map((t=>t===i?s.Children.count(e)>1?s.Children.only(null):s.isValidElement(e)?e.props.children:null:t));return Bu.jsx(Qu,{...r,ref:t,children:s.isValidElement(e)?s.cloneElement(e,void 0,n):null})}return Bu.jsx(Qu,{...r,ref:t,children:n})}));Gu.displayName="Slot";var Qu=s.forwardRef(((e,t)=>{const{children:n,...r}=e;if(s.isValidElement(n)){const e=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}(n),o=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}}(r,n.props);return n.type!==s.Fragment&&(o.ref=t?Iu(t,e):e),s.cloneElement(n,o)}return s.Children.count(n)>1?s.Children.only(null):null}));Qu.displayName="SlotClone";var Zu=({children:e})=>Bu.jsx(Bu.Fragment,{children:e});function Ju(e){return s.isValidElement(e)&&e.type===Zu}var ed=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const n=s.forwardRef(((e,n)=>{const{asChild:r,...o}=e,i=r?Gu:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),Bu.jsx(i,{...o,ref:n})}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function td(e,t){e&&Lr.flushSync((()=>e.dispatchEvent(t)))}var nd,rd="dismissableLayer.update",od="dismissableLayer.pointerDownOutside",id="dismissableLayer.focusOutside",ad=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ld=s.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:l,...c}=e,u=s.useContext(ad),[d,f]=s.useState(null),p=d?.ownerDocument??globalThis?.document,[,h]=s.useState({}),m=Lu(t,(e=>f(e))),g=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(y),b=d?g.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,x=b>=v,k=function(e,t=globalThis?.document){const n=Xu(e),r=s.useRef(!1),o=s.useRef((()=>{}));return s.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){ud(od,n,i,{discrete:!0})};const i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...u.branches].some((e=>e.contains(t)));x&&!n&&(o?.(e),a?.(e),e.defaultPrevented||l?.())}),p),S=function(e,t=globalThis?.document){const n=Xu(e),r=s.useRef(!1);return s.useEffect((()=>{const e=e=>{if(e.target&&!r.current){ud(id,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...u.branches].some((e=>e.contains(t)))||(i?.(e),a?.(e),e.defaultPrevented||l?.())}),p);return function(e,t=globalThis?.document){const n=Xu(e);s.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}((e=>{b===u.layers.size-1&&(r?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))}),p),s.useEffect((()=>{if(d)return n&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(nd=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),cd(),()=>{n&&1===u.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=nd)}}),[d,p,n,u]),s.useEffect((()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),cd())}),[d,u]),s.useEffect((()=>{const e=()=>h({});return document.addEventListener(rd,e),()=>document.removeEventListener(rd,e)}),[]),Bu.jsx(ed.div,{...c,ref:m,style:{pointerEvents:w?x?"auto":"none":void 0,...e.style},onFocusCapture:Au(e.onFocusCapture,S.onFocusCapture),onBlurCapture:Au(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:Au(e.onPointerDownCapture,k.onPointerDownCapture)})}));ld.displayName="DismissableLayer";var sd=s.forwardRef(((e,t)=>{const n=s.useContext(ad),r=s.useRef(null),o=Lu(t,r);return s.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),Bu.jsx(ed.div,{...e,ref:o})}));function cd(){const e=new CustomEvent(rd);document.dispatchEvent(e)}function ud(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?td(o,i):o.dispatchEvent(i)}sd.displayName="DismissableLayerBranch";var dd="focusScope.autoFocusOnMount",fd="focusScope.autoFocusOnUnmount",pd={bubbles:!1,cancelable:!0},hd=s.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[l,c]=s.useState(null),u=Xu(o),d=Xu(i),f=s.useRef(null),p=Lu(t,(e=>c(e))),h=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect((()=>{if(r){let e=function(e){if(h.paused||!l)return;const t=e.target;l.contains(t)?f.current=t:vd(f.current,{select:!0})},t=function(e){if(h.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||vd(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&vd(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()}}}),[r,l,h.paused]),s.useEffect((()=>{if(l){bd.add(h);const t=document.activeElement;if(!l.contains(t)){const n=new CustomEvent(dd,pd);l.addEventListener(dd,u),l.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(vd(r,{select:t}),document.activeElement!==n)return}((e=md(l),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&vd(l))}return()=>{l.removeEventListener(dd,u),setTimeout((()=>{const e=new CustomEvent(fd,pd);l.addEventListener(fd,d),l.dispatchEvent(e),e.defaultPrevented||vd(t??document.body,{select:!0}),l.removeEventListener(fd,d),bd.remove(h)}),0)}}var e}),[l,u,d,h]);const m=s.useCallback((e=>{if(!n&&!r)return;if(h.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,i]=function(e){const t=md(e),n=gd(t,e),r=gd(t.reverse(),e);return[n,r]}(t);r&&i?e.shiftKey||o!==i?e.shiftKey&&o===r&&(e.preventDefault(),n&&vd(i,{select:!0})):(e.preventDefault(),n&&vd(r,{select:!0})):o===t&&e.preventDefault()}}),[n,r,h.paused]);return Bu.jsx(ed.div,{tabIndex:-1,...a,ref:p,onKeyDown:m})}));function md(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 gd(e,t){for(const n of e)if(!yd(n,{upTo:t}))return n}function yd(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 vd(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()}}hd.displayName="FocusScope";var bd=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=wd(e,t),e.unshift(t)},remove(t){e=wd(e,t),e[0]?.resume()}}}();function wd(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var xd=s.forwardRef(((e,t)=>{const{container:n,...r}=e,[o,i]=s.useState(!1);Uu((()=>i(!0)),[]);const a=n||o&&globalThis?.document?.body;return a?zr.createPortal(Bu.jsx(ed.div,{...r,ref:t}),a):null}));xd.displayName="Portal";var kd=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=s.useState(),r=s.useRef({}),o=s.useRef(e),i=s.useRef("none"),a=e?"mounted":"unmounted",[l,c]=function(e,t){return s.useReducer(((e,n)=>t[e][n]??e),e)}(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect((()=>{const e=Sd(r.current);i.current="mounted"===l?e:"none"}),[l]),Uu((()=>{const t=r.current,n=o.current;if(n!==e){const r=i.current,a=Sd(t);if(e)c("MOUNT");else if("none"===a||"none"===t?.display)c("UNMOUNT");else{c(n&&r!==a?"ANIMATION_OUT":"UNMOUNT")}o.current=e}}),[e,c]),Uu((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,a=i=>{const a=Sd(r.current).includes(i.animationName);if(i.target===t&&a&&(c("ANIMATION_END"),!o.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},l=e=>{e.target===t&&(i.current=Sd(r.current))};return t.addEventListener("animationstart",l),t.addEventListener("animationcancel",a),t.addEventListener("animationend",a),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",l),t.removeEventListener("animationcancel",a),t.removeEventListener("animationend",a)}}c("ANIMATION_END")}),[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:s.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}(t),o="function"==typeof n?n({present:r.isPresent}):s.Children.only(n),i=Lu(r.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}(o));return"function"==typeof n||r.isPresent?s.cloneElement(o,{ref:i}):null};function Sd(e){return e?.animationName||"none"}kd.displayName="Presence";var Ed=0;function _d(){s.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Cd()),document.body.insertAdjacentElement("beforeend",e[1]??Cd()),Ed++,()=>{1===Ed&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),Ed--}}),[])}function Cd(){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 Od=function(){return Od=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},Od.apply(this,arguments)};function Nd(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 Pd(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 Rd="right-scroll-bar-position",Md="width-before-scroll-bar";function Td(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var Ad="undefined"!=typeof window?s.useLayoutEffect:s.useEffect,Dd=new WeakMap;function Id(e,t){var n,r,o,i=(n=null,r=function(t){return e.forEach((function(e){return Td(e,t)}))},(o=s.useState((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 Ad((function(){var t=Dd.get(i);if(t){var n=new Set(t),r=new Set(e),o=i.current;n.forEach((function(e){r.has(e)||Td(e,null)})),r.forEach((function(e){n.has(e)||Td(e,o)}))}Dd.set(i,e)}),[e]),i}function Ld(e){return e}var zd=function(e){var t=e.sideCar,n=Nd(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return s.createElement(r,Od({},n))};zd.isSideCarExport=!0;var Fd=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=Ld);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=Od({async:!0,ssr:!1},e),t}(),jd=function(){},$d=s.forwardRef((function(e,t){var n=s.useRef(null),r=s.useState({onScrollCapture:jd,onWheelCapture:jd,onTouchMoveCapture:jd}),o=r[0],i=r[1],a=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,h=e.noIsolation,m=e.inert,g=e.allowPinchZoom,y=e.as,v=void 0===y?"div":y,b=e.gapMode,w=Nd(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=p,k=Id([n,t]),S=Od(Od({},w),o);return s.createElement(s.Fragment,null,d&&s.createElement(x,{sideCar:Fd,removeScrollBar:u,shards:f,noIsolation:h,inert:m,setCallbacks:i,allowPinchZoom:!!g,lockRef:n,gapMode:b}),a?s.cloneElement(s.Children.only(l),Od(Od({},S),{ref:k})):s.createElement(v,Od({},S,{className:c,ref:k}),l))}));$d.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},$d.classNames={fullWidth:Md,zeroRight:Rd};function Bd(){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 Vd=function(){var e=0,t=null;return{add:function(n){var r;0==e&&(t=Bd())&&(!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)}}},Hd=function(){var e,t=(e=Vd(),function(t,n){s.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},Ud={left:0,top:0,right:0,gap:0},Wd=function(e){return parseInt(e||"",10)||0},qd=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Ud;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[Wd(n),Wd(r),Wd(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])}},Kd=Hd(),Xd="data-scroll-locked",Yd=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,l=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(l,"px ").concat(r,";\n }\n body[").concat(Xd,"] {\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(l,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Rd," {\n right: ").concat(l,"px ").concat(r,";\n }\n \n .").concat(Md," {\n margin-right: ").concat(l,"px ").concat(r,";\n }\n \n .").concat(Rd," .").concat(Rd," {\n right: 0 ").concat(r,";\n }\n \n .").concat(Md," .").concat(Md," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(Xd,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},Gd=function(){var e=parseInt(document.body.getAttribute(Xd)||"0",10);return isFinite(e)?e:0},Qd=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;s.useEffect((function(){return document.body.setAttribute(Xd,(Gd()+1).toString()),function(){var e=Gd()-1;e<=0?document.body.removeAttribute(Xd):document.body.setAttribute(Xd,e.toString())}}),[]);var i=s.useMemo((function(){return qd(o)}),[o]);return s.createElement(Kd,{styles:Yd(i,!t,o,n?"":"!important")})},Zd=!1;if("undefined"!=typeof window)try{var Jd=Object.defineProperty({},"passive",{get:function(){return Zd=!0,!0}});window.addEventListener("test",Jd,Jd),window.removeEventListener("test",Jd,Jd)}catch(e){Zd=!1}var ef=!!Zd&&{passive:!1},tf=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])},nf=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),rf(e,r)){var o=of(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},rf=function(e,t){return"v"===e?function(e){return tf(e,"overflowY")}(t):function(e){return tf(e,"overflowX")}(t)},of=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},af=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},lf=function(e){return[e.deltaX,e.deltaY]},sf=function(e){return e&&"current"in e?e.current:e},cf=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},uf=0,df=[];function ff(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var pf,hf=(pf=function(e){var t=s.useRef([]),n=s.useRef([0,0]),r=s.useRef(),o=s.useState(uf++)[0],i=s.useState(Hd)[0],a=s.useRef(e);s.useEffect((function(){a.current=e}),[e]),s.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=Pd([e.lockRef.current],(e.shards||[]).map(sf),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(o))})),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(o))}))}}}),[e.inert,e.lockRef.current,e.shards]);var l=s.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!a.current.allowPinchZoom;var o,i=af(e),l=n.current,s="deltaX"in e?e.deltaX:l[0]-i[0],c="deltaY"in e?e.deltaY:l[1]-i[1],u=e.target,d=Math.abs(s)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var f=nf(d,u);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=nf(d,u)),!f)return!1;if(!r.current&&"changedTouches"in e&&(s||c)&&(r.current=o),!o)return!0;var p=r.current||o;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,l=t.contains(a),s=!1,c=i>0,u=0,d=0;do{var f=of(e,a),p=f[0],h=f[1]-f[2]-o*p;(p||h)&&rf(e,a)&&(u+=h,d+=p),a=a instanceof ShadowRoot?a.host:a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(c&&Math.abs(u)<1||!c&&Math.abs(d)<1)&&(s=!0),s}(p,t,e,"h"===p?s:c)}),[]),c=s.useCallback((function(e){var n=e;if(df.length&&df[df.length-1]===i){var r="deltaY"in n?lf(n):af(n),o=t.current.filter((function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&(t=e.delta,o=r,t[0]===o[0]&&t[1]===o[1]);var t,o}))[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var s=(a.current.shards||[]).map(sf).filter(Boolean).filter((function(e){return e.contains(n.target)}));(s.length>0?l(n,s[0]):!a.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),u=s.useCallback((function(e,n,r,o){var i={name:e,delta:n,target:r,should:o,shadowParent:ff(r)};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),d=s.useCallback((function(e){n.current=af(e),r.current=void 0}),[]),f=s.useCallback((function(t){u(t.type,lf(t),t.target,l(t,e.lockRef.current))}),[]),p=s.useCallback((function(t){u(t.type,af(t),t.target,l(t,e.lockRef.current))}),[]);s.useEffect((function(){return df.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,ef),document.addEventListener("touchmove",c,ef),document.addEventListener("touchstart",d,ef),function(){df=df.filter((function(e){return e!==i})),document.removeEventListener("wheel",c,ef),document.removeEventListener("touchmove",c,ef),document.removeEventListener("touchstart",d,ef)}}),[]);var h=e.removeScrollBar,m=e.inert;return s.createElement(s.Fragment,null,m?s.createElement(i,{styles:cf(o)}):null,h?s.createElement(Qd,{gapMode:e.gapMode}):null)},Fd.useMedium(pf),zd),mf=s.forwardRef((function(e,t){return s.createElement($d,Od({},e,{ref:t,sideCar:hf}))}));mf.classNames=$d.classNames;var gf=new WeakMap,yf=new WeakMap,vf={},bf=0,wf=function(e){return e&&(e.host||wf(e.parentNode))},xf=function(e,t,n,r){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=wf(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]);vf[n]||(vf[n]=new WeakMap);var i=vf[n],a=[],l=new Set,s=new Set(o),c=function(e){e&&!l.has(e)&&(l.add(e),c(e.parentNode))};o.forEach(c);var u=function(e){e&&!s.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(l.has(e))u(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,s=(gf.get(e)||0)+1,c=(i.get(e)||0)+1;gf.set(e,s),i.set(e,c),a.push(e),1===s&&o&&yf.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),l.clear(),bf++,function(){a.forEach((function(e){var t=gf.get(e)-1,o=i.get(e)-1;gf.set(e,t),i.set(e,o),t||(yf.has(e)||e.removeAttribute(r),yf.delete(e)),o||e.removeAttribute(n)})),--bf||(gf=new WeakMap,gf=new WeakMap,yf=new WeakMap,vf={})}},kf=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]"))),xf(r,o,n,"aria-hidden")):function(){return null}},Sf="Dialog",[Ef,_f]=Vu(Sf),[Cf,Of]=Ef(Sf),Nf=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,l=s.useRef(null),c=s.useRef(null),[u=!1,d]=Yu({prop:r,defaultProp:o,onChange:i});return Bu.jsx(Cf,{scope:t,triggerRef:l,contentRef:c,contentId:Ku(),titleId:Ku(),descriptionId:Ku(),open:u,onOpenChange:d,onOpenToggle:s.useCallback((()=>d((e=>!e))),[d]),modal:a,children:n})};Nf.displayName=Sf;var Pf="DialogTrigger",Rf=s.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Of(Pf,n),i=Lu(t,o.triggerRef);return Bu.jsx(ed.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Yf(o.open),...r,ref:i,onClick:Au(e.onClick,o.onOpenToggle)})}));Rf.displayName=Pf;var Mf="DialogPortal",[Tf,Af]=Ef(Mf,{forceMount:void 0}),Df=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=Of(Mf,t);return Bu.jsx(Tf,{scope:t,forceMount:n,children:s.Children.map(r,(e=>Bu.jsx(kd,{present:n||i.open,children:Bu.jsx(xd,{asChild:!0,container:o,children:e})})))})};Df.displayName=Mf;var If="DialogOverlay",Lf=s.forwardRef(((e,t)=>{const n=Af(If,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Of(If,e.__scopeDialog);return i.modal?Bu.jsx(kd,{present:r||i.open,children:Bu.jsx(zf,{...o,ref:t})}):null}));Lf.displayName=If;var zf=s.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Of(If,n);return Bu.jsx(mf,{as:Gu,allowPinchZoom:!0,shards:[o.contentRef],children:Bu.jsx(ed.div,{"data-state":Yf(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})})),Ff="DialogContent",jf=s.forwardRef(((e,t)=>{const n=Af(Ff,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Of(Ff,e.__scopeDialog);return Bu.jsx(kd,{present:r||i.open,children:i.modal?Bu.jsx($f,{...o,ref:t}):Bu.jsx(Bf,{...o,ref:t})})}));jf.displayName=Ff;var $f=s.forwardRef(((e,t)=>{const n=Of(Ff,e.__scopeDialog),r=s.useRef(null),o=Lu(t,n.contentRef,r);return s.useEffect((()=>{const e=r.current;if(e)return kf(e)}),[]),Bu.jsx(Vf,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Au(e.onCloseAutoFocus,(e=>{e.preventDefault(),n.triggerRef.current?.focus()})),onPointerDownOutside:Au(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:Au(e.onFocusOutside,(e=>e.preventDefault()))})})),Bf=s.forwardRef(((e,t)=>{const n=Of(Ff,e.__scopeDialog),r=s.useRef(!1),o=s.useRef(!1);return Bu.jsx(Vf,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const i=t.target,a=n.triggerRef.current?.contains(i);a&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})})),Vf=s.forwardRef(((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,l=Of(Ff,n),c=s.useRef(null),u=Lu(t,c);return _d(),Bu.jsxs(Bu.Fragment,{children:[Bu.jsx(hd,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:Bu.jsx(ld,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Yf(l.open),...a,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),Bu.jsxs(Bu.Fragment,{children:[Bu.jsx(tp,{titleId:l.titleId}),Bu.jsx(np,{contentRef:c,descriptionId:l.descriptionId})]})]})})),Hf="DialogTitle",Uf=s.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Of(Hf,n);return Bu.jsx(ed.h2,{id:o.titleId,...r,ref:t})}));Uf.displayName=Hf;var Wf="DialogDescription",qf=s.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Of(Wf,n);return Bu.jsx(ed.p,{id:o.descriptionId,...r,ref:t})}));qf.displayName=Wf;var Kf="DialogClose",Xf=s.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Of(Kf,n);return Bu.jsx(ed.button,{type:"button",...r,ref:t,onClick:Au(e.onClick,(()=>o.onOpenChange(!1)))})}));function Yf(e){return e?"open":"closed"}Xf.displayName=Kf;var Gf,Qf,Zf="DialogTitleWarning",[Jf,ep]=function(e,t){const n=s.createContext(t),r=e=>{const{children:t,...r}=e,o=s.useMemo((()=>r),Object.values(r));return Bu.jsx(n.Provider,{value:o,children:t})};return r.displayName=e+"Provider",[r,function(r){const o=s.useContext(n);if(o)return o;if(void 0!==t)return t;throw new Error(`\`${r}\` must be used within \`${e}\``)}]}(Zf,{contentName:Ff,titleName:Hf,docsSlug:"dialog"}),tp=({titleId:e})=>{const t=ep(Zf),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return s.useEffect((()=>{if(e){document.getElementById(e)||console.error(n)}}),[n,e]),null},np=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ep("DialogDescriptionWarning").contentName}}.`;return s.useEffect((()=>{const r=e.current?.getAttribute("aria-describedby");if(t&&r){document.getElementById(t)||console.warn(n)}}),[n,e,t]),null},rp=Nf,op=Rf,ip=Df,ap=Lf,lp=jf,sp=Uf,cp=qf,up=Xf,dp={exports:{}},fp={};function pp(){if(Gf)return fp;Gf=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"),l=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen"),p=Symbol.for("react.client.reference");function h(f){if("object"==typeof f&&null!==f){var p=f.$$typeof;switch(p){case e:switch(f=f.type){case n:case o:case r:case s:case c:return f;default:switch(f=f&&f.$$typeof){case a:case l:case d:case u:case i:return f;default:return p}}case t:return p}}}return fp.ContextConsumer=i,fp.ContextProvider=a,fp.Element=e,fp.ForwardRef=l,fp.Fragment=n,fp.Lazy=d,fp.Memo=u,fp.Portal=t,fp.Profiler=o,fp.StrictMode=r,fp.Suspense=s,fp.SuspenseList=c,fp.isContextConsumer=function(e){return h(e)===i},fp.isContextProvider=function(e){return h(e)===a},fp.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},fp.isForwardRef=function(e){return h(e)===l},fp.isFragment=function(e){return h(e)===n},fp.isLazy=function(e){return h(e)===d},fp.isMemo=function(e){return h(e)===u},fp.isPortal=function(e){return h(e)===t},fp.isProfiler=function(e){return h(e)===o},fp.isStrictMode=function(e){return h(e)===r},fp.isSuspense=function(e){return h(e)===s},fp.isSuspenseList=function(e){return h(e)===c},fp.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===o||e===r||e===s||e===c||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===u||e.$$typeof===a||e.$$typeof===i||e.$$typeof===l||e.$$typeof===p||void 0!==e.getModuleId)},fp.typeOf=h,fp}function hp(){return Qf||(Qf=1,dp.exports=pp()),dp.exports}var mp=hp();function gp(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 yp(e){if(s.isValidElement(e)||mp.isValidElementType(e)||!gp(e))return e;const t={};return Object.keys(e).forEach((n=>{t[n]=yp(e[n])})),t}function vp(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return gp(e)&&gp(t)&&Object.keys(t).forEach((o=>{s.isValidElement(t[o])||mp.isValidElementType(t[o])?r[o]=t[o]:gp(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&gp(e[o])?r[o]=vp(e[o],t[o],n):n.clone?r[o]=gp(t[o])?yp(t[o]):t[o]:r[o]=t[o]})),r}var bp,wp,xp,kp,Sp,Ep,_p,Cp={exports:{}},Op={exports:{}},Np={};function Pp(){return wp||(wp=1,Op.exports=function(){if(bp)return Np;bp=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,l=e?Symbol.for("react.context"):60110,s=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,f=e?Symbol.for("react.suspense_list"):60120,p=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,v=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var f=e.$$typeof;switch(f){case t:switch(e=e.type){case s:case c:case r:case i:case o:case d:return e;default:switch(e=e&&e.$$typeof){case l:case u:case h:case p:case a:return e;default:return f}}case n:return f}}}function w(e){return b(e)===c}return Np.AsyncMode=s,Np.ConcurrentMode=c,Np.ContextConsumer=l,Np.ContextProvider=a,Np.Element=t,Np.ForwardRef=u,Np.Fragment=r,Np.Lazy=h,Np.Memo=p,Np.Portal=n,Np.Profiler=i,Np.StrictMode=o,Np.Suspense=d,Np.isAsyncMode=function(e){return w(e)||b(e)===s},Np.isConcurrentMode=w,Np.isContextConsumer=function(e){return b(e)===l},Np.isContextProvider=function(e){return b(e)===a},Np.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Np.isForwardRef=function(e){return b(e)===u},Np.isFragment=function(e){return b(e)===r},Np.isLazy=function(e){return b(e)===h},Np.isMemo=function(e){return b(e)===p},Np.isPortal=function(e){return b(e)===n},Np.isProfiler=function(e){return b(e)===i},Np.isStrictMode=function(e){return b(e)===o},Np.isSuspense=function(e){return b(e)===d},Np.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===d||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===p||e.$$typeof===a||e.$$typeof===l||e.$$typeof===u||e.$$typeof===g||e.$$typeof===y||e.$$typeof===v||e.$$typeof===m)},Np.typeOf=b,Np}()),Op.exports}function Rp(){if(kp)return xp;kp=1;return xp="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Mp(){if(Ep)return Sp;Ep=1;var e=Rp();function t(){}function n(){}return n.resetWarningCache=t,Sp=function(){function r(t,n,r,o,i,a){if(a!==e){var l=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 l.name="Invariant Violation",l}}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},Sp}function Tp(){return _p||(_p=1,Cp.exports=Mp()()),Cp.exports}var Ap=Tp();function Dp(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 Ip(e){if("string"!=typeof e)throw new Error(Dp(7));return e.charAt(0).toUpperCase()+e.slice(1)}const Lp="undefined"!=typeof window?s.useLayoutEffect:s.useEffect;function zp(e){const t=s.useRef(e);return Lp((()=>{t.current=e})),s.useRef(((...e)=>(0,t.current)(...e))).current}function Fp(...e){return s.useMemo((()=>e.every((e=>null==e))?null:t=>{e.forEach((e=>{!function(e,t){"function"==typeof e?e(t):e&&(e.current=t)}(e,t)}))}),e)}const jp={};function $p(e,t){const n=s.useRef(jp);return n.current===jp&&(n.current=e(t)),n}const Bp=[];class Vp{static create(){return new Vp}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 Hp(){const e=$p(Vp.create).current;var t;return t=e.disposeEffect,s.useEffect(t,Bp),e}function Up(e){try{return e.matches(":focus-visible")}catch(e){}return!1}function Wp(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]=Wp(r[t],i[t])}}else n[o]=i;else n[o]=r||{}}else void 0===n[o]&&(n[o]=e[o])}return n}function qp(e,t,n=void 0){const r={};for(const o in e){const i=e[o];let a="",l=!0;for(let e=0;e<i.length;e+=1){const r=i[e];r&&(a+=(!0===l?"":" ")+t(r),l=!1,n&&n[r]&&(a+=" "+n[r]))}r[o]=a}return r}const Kp=e=>e,Xp=(()=>{let e=Kp;return{configure(t){e=t},generate:t=>e(t),reset(){e=Kp}}})(),Yp={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 Gp(e,t,n="Mui"){const r=Yp[t];return r?`${n}-${r}`:`${Xp.generate(e)}-${t}`}function Qp(e,t,n="Mui"){const r={};return t.forEach((t=>{r[t]=Gp(e,t,n)})),r}function Zp(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=Zp(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Jp(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Zp(e))&&(r&&(r+=" "),r+=t);return r}function eh(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 th(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const e=Jp(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}),l=eh(r),s=eh(o),c=t(a),u=Jp(c?.className,n?.className,i,o?.className,r?.className),d={...c?.style,...n?.style,...o?.style,...r?.style},f={...c,...n,...s,...l};return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:c.ref}}function nh(e,t){return t?vp(e,t,{clone:!1}):e}const rh={xs:0,sm:600,md:900,lg:1200,xl:1536},oh={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${rh[e]}px)`},ih={containerQueries:e=>({up:t=>{let n="number"==typeof t?t:rh[t]||t;return"number"==typeof n&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function ah(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||oh;return t.reduce(((r,o,i)=>(r[e.up(e.keys[i])]=n(t[i]),r)),{})}if("object"==typeof t){const e=r.breakpoints||oh;return Object.keys(t).reduce(((o,i)=>{if(a=e.keys,"@"===(l=i)||l.startsWith("@")&&(a.some((e=>l.startsWith(`@${e}`)))||l.match(/^@\d/))){const e=function(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,o]=n,i=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(i)}(r.containerQueries?r:ih,i);e&&(o[e]=n(t[i],i))}else if(Object.keys(e.values||rh).includes(i)){o[e.up(i)]=n(t[i],i)}else{const e=i;o[e]=t[e]}var a,l;return o}),{})}return n(t)}function lh(e={}){const t=e.keys?.reduce(((t,n)=>(t[e.up(n)]={},t)),{});return t||{}}function sh(e,t){return e.reduce(((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}function ch({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 uh(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 dh(e,t,n,r=n){let o;return o="function"==typeof e?e(n):Array.isArray(e)?e[n]||r:uh(e,n)||r,t&&(o=t(o,r,e)),o}function fh(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=uh(e.theme,r)||{};return ah(e,i,(e=>{let r=dh(a,o,e);return e===r&&"string"==typeof e&&(r=dh(a,o,`${t}${"default"===e?"":Ip(e)}`,e)),!1===n?r:{[n]:r}}))};return i.propTypes={},i.filterProps=[t],i}const ph={m:"margin",p:"padding"},hh={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},mh={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},gh=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}((e=>{if(e.length>2){if(!mh[e])return[e];e=mh[e]}const[t,n]=e.split(""),r=ph[t],o=hh[n]||"";return Array.isArray(o)?o.map((e=>r+e)):[r+o]})),yh=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],vh=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];function bh(e,t,n,r){const o=uh(e,t,!0)??n;return"number"==typeof o||"string"==typeof o?e=>"string"==typeof e?e:"string"==typeof o?`calc(${e} * ${o})`:o*e:Array.isArray(o)?e=>{if("string"==typeof e)return e;const t=Math.abs(e),n=o[t];return e>=0?n:"number"==typeof n?-n:`-${n}`}:"function"==typeof o?o:()=>{}}function wh(e){return bh(e,"spacing",8)}function xh(e,t){return"string"==typeof t||null==t?t:e(t)}function kh(e,t,n,r){if(!t.includes(n))return null;const o=function(e,t){return n=>e.reduce(((e,r)=>(e[r]=xh(t,n),e)),{})}(gh(n),r);return ah(e,e[n],o)}function Sh(e,t){const n=wh(e.theme);return Object.keys(e).map((r=>kh(e,t,r,n))).reduce(nh,{})}function Eh(e){return Sh(e,yh)}function _h(e){return Sh(e,vh)}function Ch(...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]?nh(n,t[r](e)):n),{});return n.propTypes={},n.filterProps=e.reduce(((e,t)=>e.concat(t.filterProps)),[]),n}function Oh(e){return"number"!=typeof e?e:`${e}px solid`}function Nh(e,t){return fh({prop:e,themeKey:"borders",transform:t})}Eh.propTypes={},Eh.filterProps=yh,_h.propTypes={},_h.filterProps=vh;const Ph=Nh("border",Oh),Rh=Nh("borderTop",Oh),Mh=Nh("borderRight",Oh),Th=Nh("borderBottom",Oh),Ah=Nh("borderLeft",Oh),Dh=Nh("borderColor"),Ih=Nh("borderTopColor"),Lh=Nh("borderRightColor"),zh=Nh("borderBottomColor"),Fh=Nh("borderLeftColor"),jh=Nh("outline",Oh),$h=Nh("outlineColor"),Bh=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=bh(e.theme,"shape.borderRadius",4),n=e=>({borderRadius:xh(t,e)});return ah(e,e.borderRadius,n)}return null};Bh.propTypes={},Bh.filterProps=["borderRadius"],Ch(Ph,Rh,Mh,Th,Ah,Dh,Ih,Lh,zh,Fh,Bh,jh,$h);const Vh=e=>{if(void 0!==e.gap&&null!==e.gap){const t=bh(e.theme,"spacing",8),n=e=>({gap:xh(t,e)});return ah(e,e.gap,n)}return null};Vh.propTypes={},Vh.filterProps=["gap"];const Hh=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=bh(e.theme,"spacing",8),n=e=>({columnGap:xh(t,e)});return ah(e,e.columnGap,n)}return null};Hh.propTypes={},Hh.filterProps=["columnGap"];const Uh=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=bh(e.theme,"spacing",8),n=e=>({rowGap:xh(t,e)});return ah(e,e.rowGap,n)}return null};Uh.propTypes={},Uh.filterProps=["rowGap"];function Wh(e,t){return"grey"===t?t:e}Ch(Vh,Hh,Uh,fh({prop:"gridColumn"}),fh({prop:"gridRow"}),fh({prop:"gridAutoFlow"}),fh({prop:"gridAutoColumns"}),fh({prop:"gridAutoRows"}),fh({prop:"gridTemplateColumns"}),fh({prop:"gridTemplateRows"}),fh({prop:"gridTemplateAreas"}),fh({prop:"gridArea"}));function qh(e){return e<=1&&0!==e?100*e+"%":e}Ch(fh({prop:"color",themeKey:"palette",transform:Wh}),fh({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Wh}),fh({prop:"backgroundColor",themeKey:"palette",transform:Wh}));const Kh=fh({prop:"width",transform:qh}),Xh=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{const n=e.theme?.breakpoints?.values?.[t]||rh[t];return n?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:qh(t)}};return ah(e,e.maxWidth,t)}return null};Xh.filterProps=["maxWidth"];const Yh=fh({prop:"minWidth",transform:qh}),Gh=fh({prop:"height",transform:qh}),Qh=fh({prop:"maxHeight",transform:qh}),Zh=fh({prop:"minHeight",transform:qh});fh({prop:"size",cssProperty:"width",transform:qh}),fh({prop:"size",cssProperty:"height",transform:qh});Ch(Kh,Xh,Yh,Gh,Qh,Zh,fh({prop:"boxSizing"}));const Jh={border:{themeKey:"borders",transform:Oh},borderTop:{themeKey:"borders",transform:Oh},borderRight:{themeKey:"borders",transform:Oh},borderBottom:{themeKey:"borders",transform:Oh},borderLeft:{themeKey:"borders",transform:Oh},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Oh},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Bh},color:{themeKey:"palette",transform:Wh},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Wh},backgroundColor:{themeKey:"palette",transform:Wh},p:{style:_h},pt:{style:_h},pr:{style:_h},pb:{style:_h},pl:{style:_h},px:{style:_h},py:{style:_h},padding:{style:_h},paddingTop:{style:_h},paddingRight:{style:_h},paddingBottom:{style:_h},paddingLeft:{style:_h},paddingX:{style:_h},paddingY:{style:_h},paddingInline:{style:_h},paddingInlineStart:{style:_h},paddingInlineEnd:{style:_h},paddingBlock:{style:_h},paddingBlockStart:{style:_h},paddingBlockEnd:{style:_h},m:{style:Eh},mt:{style:Eh},mr:{style:Eh},mb:{style:Eh},ml:{style:Eh},mx:{style:Eh},my:{style:Eh},margin:{style:Eh},marginTop:{style:Eh},marginRight:{style:Eh},marginBottom:{style:Eh},marginLeft:{style:Eh},marginX:{style:Eh},marginY:{style:Eh},marginInline:{style:Eh},marginInlineStart:{style:Eh},marginInlineEnd:{style:Eh},marginBlock:{style:Eh},marginBlockStart:{style:Eh},marginBlockEnd:{style:Eh},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:Vh},rowGap:{style:Uh},columnGap:{style:Hh},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:qh},maxWidth:{style:Xh},minWidth:{transform:qh},height:{transform:qh},maxHeight:{transform:qh},minHeight:{transform:qh},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 em=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:l,transform:s,style:c}=i;if(null==t)return null;if("typography"===l&&"inherit"===t)return{[e]:t};const u=uh(n,l)||{};if(c)return c(o);return ah(o,t,(t=>{let n=dh(u,s,t);return t===n&&"string"==typeof t&&(n=dh(u,s,`${e}${"default"===t?"":Ip(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??Jh;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=lh(o.breakpoints),l=Object.keys(a);let s=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])s=nh(s,e(n,a,o,i));else{const e=ah({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)?s=nh(s,e):s[n]=t({sx:a,theme:o})}else s=nh(s,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,sh(l,s))}return Array.isArray(r)?r.map(a):a(r)}}();em.filterProps=["sx"];function tm(e){const{sx:t,...n}=e,{systemProps:r,otherProps:o}=(e=>{const t={systemProps:{},otherProps:{}},n=e?.theme?.unstable_sxConfig??Jh;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 gp(n)?{...r,...n}:r}:{...r,...t},{...o,sx:i}}function nm(){return nm=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},nm.apply(null,arguments)}var rm=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}(),om="-ms-",im="-moz-",am="-webkit-",lm="comm",sm="rule",cm="decl",um="@keyframes",dm=Math.abs,fm=String.fromCharCode,pm=Object.assign;function hm(e){return e.trim()}function mm(e,t,n){return e.replace(t,n)}function gm(e,t){return e.indexOf(t)}function ym(e,t){return 0|e.charCodeAt(t)}function vm(e,t,n){return e.slice(t,n)}function bm(e){return e.length}function wm(e){return e.length}function xm(e,t){return t.push(e),e}var km=1,Sm=1,Em=0,_m=0,Cm=0,Om="";function Nm(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:km,column:Sm,length:a,return:""}}function Pm(e,t){return pm(Nm("",null,null,"",null,null,0),e,{length:-e.length},t)}function Rm(){return Cm=_m>0?ym(Om,--_m):0,Sm--,10===Cm&&(Sm=1,km--),Cm}function Mm(){return Cm=_m<Em?ym(Om,_m++):0,Sm++,10===Cm&&(Sm=1,km++),Cm}function Tm(){return ym(Om,_m)}function Am(){return _m}function Dm(e,t){return vm(Om,e,t)}function Im(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 Lm(e){return km=Sm=1,Em=bm(Om=e),_m=0,[]}function zm(e){return Om="",e}function Fm(e){return hm(Dm(_m-1,Bm(91===e?e+2:40===e?e+1:e)))}function jm(e){for(;(Cm=Tm())&&Cm<33;)Mm();return Im(e)>2||Im(Cm)>3?"":" "}function $m(e,t){for(;--t&&Mm()&&!(Cm<48||Cm>102||Cm>57&&Cm<65||Cm>70&&Cm<97););return Dm(e,Am()+(t<6&&32==Tm()&&32==Mm()))}function Bm(e){for(;Mm();)switch(Cm){case e:return _m;case 34:case 39:34!==e&&39!==e&&Bm(Cm);break;case 40:41===e&&Bm(e);break;case 92:Mm()}return _m}function Vm(e,t){for(;Mm()&&e+Cm!==57&&(e+Cm!==84||47!==Tm()););return"/*"+Dm(t,_m-1)+"*"+fm(47===e?e:Mm())}function Hm(e){for(;!Im(Tm());)Mm();return Dm(e,_m)}function Um(e){return zm(Wm("",null,null,null,[""],e=Lm(e),0,[0],e))}function Wm(e,t,n,r,o,i,a,l,s){for(var c=0,u=0,d=a,f=0,p=0,h=0,m=1,g=1,y=1,v=0,b="",w=o,x=i,k=r,S=b;g;)switch(h=v,v=Mm()){case 40:if(108!=h&&58==ym(S,d-1)){-1!=gm(S+=mm(Fm(v),"&","&\f"),"&\f")&&(y=-1);break}case 34:case 39:case 91:S+=Fm(v);break;case 9:case 10:case 13:case 32:S+=jm(h);break;case 92:S+=$m(Am()-1,7);continue;case 47:switch(Tm()){case 42:case 47:xm(Km(Vm(Mm(),Am()),t,n),s);break;default:S+="/"}break;case 123*m:l[c++]=bm(S)*y;case 125*m:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:-1==y&&(S=mm(S,/\f/g,"")),p>0&&bm(S)-d&&xm(p>32?Xm(S+";",r,n,d-1):Xm(mm(S," ","")+";",r,n,d-2),s);break;case 59:S+=";";default:if(xm(k=qm(S,t,n,c,u,o,l,b,w=[],x=[],d),i),123===v)if(0===u)Wm(S,t,k,k,w,i,d,l,x);else switch(99===f&&110===ym(S,3)?100:f){case 100:case 108:case 109:case 115:Wm(e,k,k,r&&xm(qm(e,k,k,0,0,o,l,b,o,w=[],d),x),o,x,d,l,r?w:x);break;default:Wm(S,k,k,k,[""],x,0,l,x)}}c=u=p=0,m=y=1,b=S="",d=a;break;case 58:d=1+bm(S),p=h;default:if(m<1)if(123==v)--m;else if(125==v&&0==m++&&125==Rm())continue;switch(S+=fm(v),v*m){case 38:y=u>0?1:(S+="\f",-1);break;case 44:l[c++]=(bm(S)-1)*y,y=1;break;case 64:45===Tm()&&(S+=Fm(Mm())),f=Tm(),u=d=bm(b=S+=Hm(Am())),v++;break;case 45:45===h&&2==bm(S)&&(m=0)}}return i}function qm(e,t,n,r,o,i,a,l,s,c,u){for(var d=o-1,f=0===o?i:[""],p=wm(f),h=0,m=0,g=0;h<r;++h)for(var y=0,v=vm(e,d+1,d=dm(m=a[h])),b=e;y<p;++y)(b=hm(m>0?f[y]+" "+v:mm(v,/&\f/g,f[y])))&&(s[g++]=b);return Nm(e,t,n,0===o?sm:l,s,c,u)}function Km(e,t,n){return Nm(e,t,n,lm,fm(Cm),vm(e,2,-2),0)}function Xm(e,t,n,r){return Nm(e,t,n,cm,vm(e,0,r),vm(e,r+1,-1),r)}function Ym(e,t){for(var n="",r=wm(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function Gm(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case cm:return e.return=e.return||e.value;case lm:return"";case um:return e.return=e.value+"{"+Ym(e.children,r)+"}";case sm:e.value=e.props.join(",")}return bm(n=Ym(e.children,r))?e.return=e.value+"{"+n+"}":""}function Qm(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var Zm=function(e,t,n){for(var r=0,o=0;r=o,o=Tm(),38===r&&12===o&&(t[n]=1),!Im(o);)Mm();return Dm(e,_m)},Jm=function(e,t){return zm(function(e,t){var n=-1,r=44;do{switch(Im(r)){case 0:38===r&&12===Tm()&&(t[n]=1),e[n]+=Zm(_m-1,t,n);break;case 2:e[n]+=Fm(r);break;case 4:if(44===r){e[++n]=58===Tm()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=fm(r)}}while(r=Mm());return e}(Lm(e),t))},eg=new WeakMap,tg=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)||eg.get(n))&&!r){eg.set(e,!0);for(var o=[],i=Jm(t,o),a=n.props,l=0,s=0;l<i.length;l++)for(var c=0;c<a.length;c++,s++)e.props[s]=o[l]?i[l].replace(/&\f/g,a[c]):a[c]+" "+i[l]}}},ng=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function rg(e,t){switch(function(e,t){return 45^ym(e,0)?(((t<<2^ym(e,0))<<2^ym(e,1))<<2^ym(e,2))<<2^ym(e,3):0}(e,t)){case 5103:return am+"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 am+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return am+e+im+e+om+e+e;case 6828:case 4268:return am+e+om+e+e;case 6165:return am+e+om+"flex-"+e+e;case 5187:return am+e+mm(e,/(\w+).+(:[^]+)/,am+"box-$1$2"+om+"flex-$1$2")+e;case 5443:return am+e+om+"flex-item-"+mm(e,/flex-|-self/,"")+e;case 4675:return am+e+om+"flex-line-pack"+mm(e,/align-content|flex-|-self/,"")+e;case 5548:return am+e+om+mm(e,"shrink","negative")+e;case 5292:return am+e+om+mm(e,"basis","preferred-size")+e;case 6060:return am+"box-"+mm(e,"-grow","")+am+e+om+mm(e,"grow","positive")+e;case 4554:return am+mm(e,/([^-])(transform)/g,"$1"+am+"$2")+e;case 6187:return mm(mm(mm(e,/(zoom-|grab)/,am+"$1"),/(image-set)/,am+"$1"),e,"")+e;case 5495:case 3959:return mm(e,/(image-set\([^]*)/,am+"$1$`$1");case 4968:return mm(mm(e,/(.+:)(flex-)?(.*)/,am+"box-pack:$3"+om+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+am+e+e;case 4095:case 3583:case 4068:case 2532:return mm(e,/(.+)-inline(.+)/,am+"$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(bm(e)-1-t>6)switch(ym(e,t+1)){case 109:if(45!==ym(e,t+4))break;case 102:return mm(e,/(.+:)(.+)-([^]+)/,"$1"+am+"$2-$3$1"+im+(108==ym(e,t+3)?"$3":"$2-$3"))+e;case 115:return~gm(e,"stretch")?rg(mm(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==ym(e,t+1))break;case 6444:switch(ym(e,bm(e)-3-(~gm(e,"!important")&&10))){case 107:return mm(e,":",":"+am)+e;case 101:return mm(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+am+(45===ym(e,14)?"inline-":"")+"box$3$1"+am+"$2$3$1"+om+"$2box$3")+e}break;case 5936:switch(ym(e,t+11)){case 114:return am+e+om+mm(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return am+e+om+mm(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return am+e+om+mm(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return am+e+om+e+e}return e}var og,ig,ag=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case cm:e.return=rg(e.value,e.length);break;case um:return Ym([Pm(e,{value:mm(e.value,"@","@"+am)})],r);case sm: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 Ym([Pm(e,{props:[mm(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Ym([Pm(e,{props:[mm(t,/:(plac\w+)/,":"+am+"input-$1")]}),Pm(e,{props:[mm(t,/:(plac\w+)/,":-moz-$1")]}),Pm(e,{props:[mm(t,/:(plac\w+)/,om+"input-$1")]})],r)}return""}))}}],lg=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||ag,a={},l=[];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;l.push(e)}));var s,c,u=[Gm,(c=function(e){s.insert(e)},function(e){e.root||(e=e.return)&&c(e)})],d=function(e){var t=wm(e);return function(n,r,o,i){for(var a="",l=0;l<t;l++)a+=e[l](n,r,o,i)||"";return a}}([tg,ng].concat(i,u));o=function(e,t,n,r){s=n,function(e){Ym(Um(e),d)}(e?e+"{"+t.styles+"}":t.styles),r&&(f.inserted[t.name]=!0)};var f={key:t,sheet:new rm({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 f.sheet.hydrate(l),f};!function(){if(ig)return og;ig=1;var e=Pp(),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,l=Object.getOwnPropertyNames,s=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,u=Object.getPrototypeOf,d=Object.prototype;og=function e(t,r,o){if("string"!=typeof r){if(d){var f=u(r);f&&f!==d&&e(t,f,o)}var p=l(r);s&&(p=p.concat(s(r)));for(var h=i(t),m=i(r),g=0;g<p.length;++g){var y=p[g];if(!(n[y]||o&&o[y]||m&&m[y]||h&&h[y])){var v=c(r,y);try{a(t,y,v)}catch(e){}}}}return t}}();function sg(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")})),r}var cg=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},ug=function(e,t,n){cg(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 dg={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},fg=/[A-Z]|^ms/g,pg=/_EMO_([^_]+?)_([^]*?)_EMO_/g,hg=function(e){return 45===e.charCodeAt(1)},mg=function(e){return null!=e&&"boolean"!=typeof e},gg=Qm((function(e){return hg(e)?e:e.replace(fg,"-$&").toLowerCase()})),yg=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(pg,(function(e,t,n){return bg={name:t,styles:n,next:bg},t}))}return 1===dg[e]||hg(e)||"number"!=typeof t||0===t?t:t+"px"};function vg(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 bg={name:o.name,styles:o.styles,next:bg},o.name;var i=n;if(void 0!==i.styles){var a=i.next;if(void 0!==a)for(;void 0!==a;)bg={name:a.name,styles:a.styles,next:bg},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+=vg(e,t,n[o])+";";else for(var i in n){var a=n[i];if("object"!=typeof a){var l=a;null!=t&&void 0!==t[l]?r+=i+"{"+t[l]+"}":mg(l)&&(r+=gg(i)+":"+yg(i,l)+";")}else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=vg(e,t,a);switch(i){case"animation":case"animationName":r+=gg(i)+":"+s+";";break;default:r+=i+"{"+s+"}"}}else for(var c=0;c<a.length;c++)mg(a[c])&&(r+=gg(i)+":"+yg(i,a[c])+";")}return r}(e,t,n);case"function":if(void 0!==e){var l=bg,s=n(e);return bg=l,vg(e,t,s)}}var c=n;if(null==t)return c;var u=t[c];return void 0!==u?u:c}var bg,wg=/label:\s*([^\s;{]+)\s*(;|$)/g;function xg(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="";bg=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=vg(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++){if(o+=vg(n,t,e[a]),r)o+=i[a]}wg.lastIndex=0;for(var l,s="";null!==(l=wg.exec(o));)s+="-"+l[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)+s;return{name:c,styles:o,next:bg}}var kg=!!u.useInsertionEffect&&u.useInsertionEffect||function(e){return e()},Sg=s.createContext("undefined"!=typeof HTMLElement?lg({key:"css"}):null);Sg.Provider;var Eg,_g,Cg=function(e){return s.forwardRef((function(t,n){var r=s.useContext(Sg);return e(t,r,n)}))},Og=s.createContext({}),Ng={}.hasOwnProperty,Pg="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Rg=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return cg(t,n,r),kg((function(){return ug(t,n,r)})),null},Mg=Cg((function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var o=e[Pg],i=[r],a="";"string"==typeof e.className?a=sg(t.registered,i,e.className):null!=e.className&&(a=e.className+" ");var l=xg(i,void 0,s.useContext(Og));a+=t.key+"-"+l.name;var c={};for(var u in e)Ng.call(e,u)&&"css"!==u&&u!==Pg&&(c[u]=e[u]);return c.className=a,n&&(c.ref=n),s.createElement(s.Fragment,null,s.createElement(Rg,{cache:t,serialized:l,isStringTag:"string"==typeof o}),s.createElement(o,c))})),Tg=Mg,Ag=function(e,t){var n=arguments;if(null==t||!Ng.call(t,"css"))return s.createElement.apply(void 0,n);var r=n.length,o=new Array(r);o[0]=Tg,o[1]=function(e,t){var n={};for(var r in t)Ng.call(t,r)&&(n[r]=t[r]);return n[Pg]=e,n}(e,t);for(var i=2;i<r;i++)o[i]=n[i];return s.createElement.apply(null,o)};function Dg(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return xg(t)}function Ig(){var e=Dg.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_"}}}Eg=Ag||(Ag={}),_g||(_g=Eg.JSX||(Eg.JSX={}));var Lg=/^((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)-.*))$/,zg=Qm((function(e){return Lg.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),Fg=function(e){return"theme"!==e},jg=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?zg:Fg},$g=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},Bg=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return cg(t,n,r),kg((function(){return ug(t,n,r)})),null},Vg=function e(t,n){var r,o,i=t.__emotion_real===t,a=i&&t.__emotion_base||t;void 0!==n&&(r=n.label,o=n.target);var l=$g(t,n,i),c=l||jg(a),u=!c("as");return function(){var d=arguments,f=i&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&f.push("label:"+r+";"),null==d[0]||void 0===d[0].raw)f.push.apply(f,d);else{var p=d[0];f.push(p[0]);for(var h=d.length,m=1;m<h;m++)f.push(d[m],p[m])}var g=Cg((function(e,t,n){var r=u&&e.as||a,i="",d=[],p=e;if(null==e.theme){for(var h in p={},e)p[h]=e[h];p.theme=s.useContext(Og)}"string"==typeof e.className?i=sg(t.registered,d,e.className):null!=e.className&&(i=e.className+" ");var m=xg(f.concat(d),t.registered,p);i+=t.key+"-"+m.name,void 0!==o&&(i+=" "+o);var g=u&&void 0===l?jg(r):c,y={};for(var v in e)u&&"as"===v||g(v)&&(y[v]=e[v]);return y.className=i,n&&(y.ref=n),s.createElement(s.Fragment,null,s.createElement(Bg,{cache:t,serialized:m,isStringTag:"string"==typeof r}),s.createElement(r,y))}));return g.displayName=void 0!==r?r:"Styled("+("string"==typeof a?a:a.displayName||a.name||"Component")+")",g.defaultProps=t.defaultProps,g.__emotion_real=g,g.__emotion_base=a,g.__emotion_styles=f,g.__emotion_forwardProp=l,Object.defineProperty(g,"toString",{value:function(){return"."+o}}),g.withComponent=function(t,r){return e(t,nm({},n,r,{shouldForwardProp:$g(g,r,!0)})).apply(void 0,f)},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){Vg[e]=Vg(e)}));const Hg=[];function Ug(e){return Hg[0]=e,xg(Hg)}function Wg(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 l(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function s(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:l,down:s,between:c,only:function(e){return a.indexOf(e)+1<a.length?c(e,a[a.indexOf(e)+1]):l(e)},not:function(e){const t=a.indexOf(e);return 0===t?l(a[1]):t===a.length-1?s(a[t]):c(e,a[a.indexOf(e)+1]).replace("@media","@media not all and")},unit:n,...o}}const qg={borderRadius:4};function Kg(e=8,t=wh({spacing:e})){if(e.mui)return e;const n=(...e)=>(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 Xg(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 Yg(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:i={},...a}=e;let l=vp({breakpoints:Wg(n),direction:"ltr",components:{},palette:{mode:"light",...r},spacing:Kg(o),shape:{...qg,...i}},a);return l=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}}(l),l.applyStyles=Xg,l=t.reduce(((e,t)=>vp(e,t)),l),l.unstable_sxConfig={...Jh,...a?.unstable_sxConfig},l.unstable_sx=function(e){return em({sx:e,theme:this})},l}function Gg(e=null){const t=s.useContext(Og);return t&&(n=t,0!==Object.keys(n).length)?t:e;var n}const Qg=Yg();function Zg(e){const{variants:t,...n}=e,r={variants:t,style:Ug(n),isProcessed:!0};return r.style===n||t&&t.forEach((e=>{"function"!=typeof e.style&&(e.style=Ug(e.style))})),r}const Jg=Yg();function ey(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function ty(e){return e?(t,n)=>n[e]:null}function ny(e,t){const n="function"==typeof t?t(e):t;if(Array.isArray(n))return n.flatMap((t=>ny(e,t)));if(Array.isArray(n?.variants)){let t;if(n.isProcessed)t=n.style;else{const{variants:e,...r}=n;t=r}return ry(e,n.variants,[t])}return n?.isProcessed?n.style:n}function ry(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 oy(e={}){const{themeId:t,defaultTheme:n=Jg,rootShouldForwardProp:r=ey,slotShouldForwardProp:o=ey}=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!==em))));const{name:n,slot:a,skipVariantsResolver:l,skipSx:s,overridesResolver:c=ty(ay(a)),...u}=t,d=void 0!==l?l:a&&"Root"!==a&&"root"!==a||!1,f=s||!1;let p=ey;"Root"===a||"root"===a?p=r:a?p=o:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(p=void 0);const h=
11
11
  /**
12
12
  * @mui/styled-engine v6.4.3
13
13
  *
@@ -88,12 +88,12 @@ function(e,t){return Vg(e,t)}(e,{shouldForwardProp:p,label:iy(),...u}),m=e=>{if(
88
88
  animation-iteration-count: infinite;
89
89
  animation-delay: 200ms;
90
90
  }
91
- `,lw=s.forwardRef((function(e,t){const n=Xv({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:o={},className:i,...a}=n,[l,c]=s.useState([]),u=s.useRef(0),d=s.useRef(null);s.useEffect((()=>{d.current&&(d.current(),d.current=null)}),[l]);const f=s.useRef(!1),p=Hp(),h=s.useRef(null),m=s.useRef(null),g=s.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:i,cb:a}=e;c((e=>[...e,Bu.jsx(aw,{classes:{ripple:Jp(o.ripple,tw.ripple),rippleVisible:Jp(o.rippleVisible,tw.rippleVisible),ripplePulsate:Jp(o.ripplePulsate,tw.ripplePulsate),child:Jp(o.child,tw.child),childLeaving:Jp(o.childLeaving,tw.childLeaving),childPulsate:Jp(o.childPulsate,tw.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i},u.current)])),u.current+=1,d.current=a}),[o]),y=s.useCallback(((e={},t={},n=()=>{})=>{const{pulsate:o=!1,center:i=r||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===e?.type&&f.current)return void(f.current=!1);"touchstart"===e?.type&&(f.current=!0);const l=a?null:m.current,s=l?l.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(s.width/2),u=Math.round(s.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-s.left),u=Math.round(n-s.top)}if(i)d=Math.sqrt((2*s.width**2+s.height**2)/3),d%2==0&&(d+=1);else{const e=2*Math.max(Math.abs((l?l.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((l?l.clientHeight:0)-u),u)+2;d=Math.sqrt(e**2+t**2)}e?.touches?null===h.current&&(h.current=()=>{g({pulsate:o,rippleX:c,rippleY:u,rippleSize:d,cb:n})},p.start(80,(()=>{h.current&&(h.current(),h.current=null)}))):g({pulsate:o,rippleX:c,rippleY:u,rippleSize:d,cb:n})}),[r,g,p]),v=s.useCallback((()=>{y({},{pulsate:!0})}),[y]),b=s.useCallback(((e,t)=>{if(p.clear(),"touchend"===e?.type&&h.current)return h.current(),h.current=null,void p.start(0,(()=>{b(e,t)}));h.current=null,c((e=>e.length>0?e.slice(1):e)),d.current=t}),[p]);return s.useImperativeHandle(t,(()=>({pulsate:v,start:y,stop:b})),[v,y,b]),Bu.jsx(iw,{className:Jp(tw.root,o.root,i),ref:m,...a,children:Bu.jsx(ew,{component:null,exit:!0,children:l})})}));function sw(e){return Gp("MuiButtonBase",e)}const cw=Qp("MuiButtonBase",["root","disabled","focusVisible"]),uw=qv("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"},[`&.${cw.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),dw=s.forwardRef((function(e,t){const n=Xv({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:o=!1,children:i,className:a,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:d=!1,focusRipple:f=!1,focusVisibleClassName:p,LinkComponent:h="a",onBlur:m,onClick:g,onContextMenu:y,onDragLeave:v,onFocus:b,onFocusVisible:w,onKeyDown:x,onKeyUp:k,onMouseDown:S,onMouseLeave:E,onMouseUp:_,onTouchEnd:C,onTouchMove:O,onTouchStart:N,tabIndex:P=0,TouchRippleProps:R,touchRippleRef:M,type:T,...A}=n,D=s.useRef(null),I=Ub.use(),L=Fp(I.ref,M),[z,F]=s.useState(!1);c&&z&&F(!1),s.useImperativeHandle(r,(()=>({focusVisible:()=>{F(!0),D.current.focus()}})),[]);const j=I.shouldMount&&!u&&!c;s.useEffect((()=>{z&&f&&!u&&I.pulsate()}),[u,f,z,I]);const $=fw(I,"start",S,d),B=fw(I,"stop",y,d),V=fw(I,"stop",v,d),H=fw(I,"stop",_,d),U=fw(I,"stop",(e=>{z&&e.preventDefault(),E&&E(e)}),d),W=fw(I,"start",N,d),q=fw(I,"stop",C,d),K=fw(I,"stop",O,d),X=fw(I,"stop",(e=>{Up(e.target)||F(!1),m&&m(e)}),!1),Y=zp((e=>{D.current||(D.current=e.currentTarget),Up(e.target)&&(F(!0),w&&w(e)),b&&b(e)})),G=()=>{const e=D.current;return l&&"button"!==l&&!("A"===e.tagName&&e.href)},Q=zp((e=>{f&&!e.repeat&&z&&" "===e.key&&I.stop(e,(()=>{I.start(e)})),e.target===e.currentTarget&&G()&&" "===e.key&&e.preventDefault(),x&&x(e),e.target===e.currentTarget&&G()&&"Enter"===e.key&&!c&&(e.preventDefault(),g&&g(e))})),Z=zp((e=>{f&&" "===e.key&&z&&!e.defaultPrevented&&I.stop(e,(()=>{I.pulsate(e)})),k&&k(e),g&&e.target===e.currentTarget&&G()&&" "===e.key&&!e.defaultPrevented&&g(e)}));let J=l;"button"===J&&(A.href||A.to)&&(J=h);const ee={};"button"===J?(ee.type=void 0===T?"button":T,ee.disabled=c):(A.href||A.to||(ee.role="button"),c&&(ee["aria-disabled"]=c));const te=Fp(t,D),ne={...n,centerRipple:o,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:f,tabIndex:P,focusVisible:z},re=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i=qp({root:["root",t&&"disabled",n&&"focusVisible"]},sw,o);return n&&r&&(i.root+=` ${r}`),i})(ne);return Bu.jsxs(uw,{as:J,className:Jp(re.root,a),ownerState:ne,onBlur:X,onClick:g,onContextMenu:B,onFocus:Y,onKeyDown:Q,onKeyUp:Z,onMouseDown:$,onMouseLeave:U,onMouseUp:H,onDragLeave:V,onTouchEnd:q,onTouchMove:K,onTouchStart:W,ref:te,tabIndex:c?-1:P,type:T,...ee,...A,children:[i,j?Bu.jsx(lw,{ref:L,center:o,...R}):null]})}));function fw(e,t,n,r=!1){return zp((o=>(n&&n(o),r||e[t](o),!0)))}var pw=Zv(Bu.jsx("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward");function hw(e){return Gp("MuiTableSortLabel",e)}const mw=Qp("MuiTableSortLabel",["root","active","icon","iconDirectionDesc","iconDirectionAsc","directionDesc","directionAsc"]);function gw(e,t){const{className:n,elementType:r,ownerState:o,externalForwardedProps:i,internalForwardedProps:a,shouldForwardComponentProp:l=!1,...s}=t,{component:c,slots:u={[e]:void 0},slotProps:d={[e]:void 0},...f}=i,p=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}=th({className:n,...s,externalForwardedProps:"root"===e?f:void 0,externalSlotProps:h}),v=Fp(y,h?.ref,t.ref),b="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}}}(p,{..."root"===e&&!c&&!u[e]&&a,..."root"!==e&&!u[e]&&a,...g,...b&&!l&&{as:b},...b&&l&&{component:b},ref:v},o);return[p,w]}const yw=qv(dw,{name:"MuiTableSortLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.active&&t.active]}})(Kv((({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,[`& .${mw.icon}`]:{opacity:.5}},[`&.${mw.active}`]:{color:(e.vars||e).palette.text.primary,[`& .${mw.icon}`]:{opacity:1,color:(e.vars||e).palette.text.secondary}}})))),vw=qv("span",{name:"MuiTableSortLabel",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,t[`iconDirection${Ip(n.direction)}`]]}})(Kv((({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)"}}]})))),bw=s.forwardRef((function(e,t){const n=Xv({props:e,name:"MuiTableSortLabel"}),{active:r=!1,children:o,className:i,direction:a="asc",hideSortIcon:l=!1,IconComponent:s=pw,slots:c={},slotProps:u={},...d}=n,f={...n,active:r,direction:a,hideSortIcon:l,IconComponent:s},p=(e=>{const{classes:t,direction:n,active:r}=e;return qp({root:["root",r&&"active",`direction${Ip(n)}`],icon:["icon",`iconDirection${Ip(n)}`]},hw,t)})(f),h={slots:c,slotProps:u},[m,g]=gw("root",{elementType:yw,externalForwardedProps:h,ownerState:f,className:Jp(p.root,i),ref:t}),[y,v]=gw("icon",{elementType:vw,externalForwardedProps:h,ownerState:f,className:p.icon});return Bu.jsxs(m,{disableRipple:!0,component:"span",...g,...d,children:[o,l&&!r?null:Bu.jsx(y,{as:s,...v})]})}));var ww=Zv(Bu.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"),xw=Zv(Bu.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"),kw=Zv(Bu.jsx("path",{d:"M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"}),"FullscreenExit"),Sw=Zv(Bu.jsx("path",{d:"M22 3.41 16.71 8.7 20 12h-8V4l3.29 3.29L20.59 2zM3.41 22l5.29-5.29L12 20v-8H4l3.29 3.29L2 20.59z"}),"CloseFullscreen"),Ew=Zv(Bu.jsx("path",{d:"M21 11V3h-8l3.29 3.29-10 10L3 13v8h8l-3.29-3.29 10-10z"}),"OpenInFull");const _w=({trigger:e,title:t,description:n,children:r,closebutton:o=!0,onOpenChange:i,buttons:a=[],open:l,setOpen:c,modal:u=!0})=>s.createElement(rp,{open:l,onOpenChange:e=>{c&&c(e),i&&i(e)},modal:u},e&&s.createElement(op,{asChild:!0},e),s.createElement(ip,null,s.createElement(ap,{className:"dialogoverlay funcnodescontainer"}),s.createElement(lp,{className:"dialogconent funcnodescontainer "},t&&s.createElement(sp,{className:"dialogtitle"},t),n&&s.createElement(cp,{className:"dialogdescription"},n),s.createElement("div",{className:"dialogchildren"},r),s.createElement("div",{style:{display:"flex",marginTop:25,justifyContent:"flex-end"}},(a||[]).map(((e,t)=>s.createElement(up,{asChild:!0,key:t},s.createElement("button",{className:"dialogsendbutton",onClick:e.onClick},e.text))))),o&&s.createElement(up,{asChild:!0},s.createElement("button",{className:"dialogclosebutton","aria-label":"Close"},s.createElement(ww,null))))));function Cw(e){const t=e+"CollectionProvider",[n,r]=Vu(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=e=>{const{scope:t,children:n}=e,r=c.useRef(null),i=c.useRef(new Map).current;return Bu.jsx(o,{scope:t,itemMap:i,collectionRef:r,children:n})};a.displayName=t;const l=e+"CollectionSlot",s=c.forwardRef(((e,t)=>{const{scope:n,children:r}=e,o=Lu(t,i(l,n).collectionRef);return Bu.jsx(Gu,{ref:o,children:r})}));s.displayName=l;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=c.forwardRef(((e,t)=>{const{scope:n,children:r,...o}=e,a=c.useRef(null),l=Lu(t,a),s=i(u,n);return c.useEffect((()=>(s.itemMap.set(a,{ref:a,...o}),()=>{s.itemMap.delete(a)}))),Bu.jsx(Gu,{[d]:"",ref:l,children:r})}));return f.displayName=u,[{Provider:a,Slot:s,ItemSlot:f},function(t){const n=i(e+"CollectionConsumer",t);return c.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[n.collectionRef,n.itemMap])},r]}var Ow=s.createContext(void 0);function Nw(e){const t=s.useContext(Ow);return e||t||"ltr"}const Pw=["top","right","bottom","left"],Rw=Math.min,Mw=Math.max,Tw=Math.round,Aw=Math.floor,Dw=e=>({x:e,y:e}),Iw={left:"right",right:"left",bottom:"top",top:"bottom"},Lw={start:"end",end:"start"};function zw(e,t,n){return Mw(e,Rw(t,n))}function Fw(e,t){return"function"==typeof e?e(t):e}function jw(e){return e.split("-")[0]}function $w(e){return e.split("-")[1]}function Bw(e){return"x"===e?"y":"x"}function Vw(e){return"y"===e?"height":"width"}function Hw(e){return["top","bottom"].includes(jw(e))?"y":"x"}function Uw(e){return Bw(Hw(e))}function Ww(e){return e.replace(/start|end/g,(e=>Lw[e]))}function qw(e){return e.replace(/left|right|bottom|top/g,(e=>Iw[e]))}function Kw(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 Xw(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 Yw(e,t,n){let{reference:r,floating:o}=e;const i=Hw(t),a=Uw(t),l=Vw(a),s=jw(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[l]/2-o[l]/2;let p;switch(s){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch($w(t)){case"start":p[a]-=f*(n&&c?-1:1);break;case"end":p[a]+=f*(n&&c?-1:1)}return p}async function Gw(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Fw(t,e),h=Kw(p),m=l[f?"floating"===d?"reference":"floating":d],g=Xw(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(l.floating)),boundary:c,rootBoundary:u,strategy:s})),y="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),b=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},w=Xw(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:v,strategy:s}):y);return{top:(g.top-w.top+h.top)/b.y,bottom:(w.bottom-g.bottom+h.bottom)/b.y,left:(g.left-w.left+h.left)/b.x,right:(w.right-g.right+h.right)/b.x}}function Qw(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Zw(e){return Pw.some((t=>e[t]>=0))}function Jw(){return"undefined"!=typeof window}function ex(e){return rx(e)?(e.nodeName||"").toLowerCase():"#document"}function tx(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function nx(e){var t;return null==(t=(rx(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function rx(e){return!!Jw()&&(e instanceof Node||e instanceof tx(e).Node)}function ox(e){return!!Jw()&&(e instanceof Element||e instanceof tx(e).Element)}function ix(e){return!!Jw()&&(e instanceof HTMLElement||e instanceof tx(e).HTMLElement)}function ax(e){return!(!Jw()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof tx(e).ShadowRoot)}function lx(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=px(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function sx(e){return["table","td","th"].includes(ex(e))}function cx(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function ux(e){const t=dx(),n=ox(e)?px(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 dx(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function fx(e){return["html","body","#document"].includes(ex(e))}function px(e){return tx(e).getComputedStyle(e)}function hx(e){return ox(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function mx(e){if("html"===ex(e))return e;const t=e.assignedSlot||e.parentNode||ax(e)&&e.host||nx(e);return ax(t)?t.host:t}function gx(e){const t=mx(e);return fx(t)?e.ownerDocument?e.ownerDocument.body:e.body:ix(t)&&lx(t)?t:gx(t)}function yx(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=gx(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=tx(o);if(i){const e=vx(a);return t.concat(a,a.visualViewport||[],lx(o)?o:[],e&&n?yx(e):[])}return t.concat(o,yx(o,[],n))}function vx(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function bx(e){const t=px(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ix(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,l=Tw(n)!==i||Tw(r)!==a;return l&&(n=i,r=a),{width:n,height:r,$:l}}function wx(e){return ox(e)?e:e.contextElement}function xx(e){const t=wx(e);if(!ix(t))return Dw(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=bx(t);let a=(i?Tw(n.width):n.width)/r,l=(i?Tw(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const kx=Dw(0);function Sx(e){const t=tx(e);return dx()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:kx}function Ex(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=wx(e);let a=Dw(1);t&&(r?ox(r)&&(a=xx(r)):a=xx(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==tx(e))&&t}(i,n,r)?Sx(i):Dw(0);let s=(o.left+l.x)/a.x,c=(o.top+l.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=tx(i),t=r&&ox(r)?tx(r):r;let n=e,o=vx(n);for(;o&&r&&t!==n;){const e=xx(o),t=o.getBoundingClientRect(),r=px(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,d*=e.y,s+=i,c+=a,n=tx(o),o=vx(n)}}return Xw({width:u,height:d,x:s,y:c})}function _x(e,t){const n=hx(e).scrollLeft;return t?t.left+n:Ex(nx(e)).left+n}function Cx(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:_x(e,r)),y:r.top+t.scrollTop}}function Ox(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=tx(e),r=nx(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,l=0,s=0;if(o){i=o.width,a=o.height;const e=dx();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}return{width:i,height:a,x:l,y:s}}(e,n);else if("document"===t)r=function(e){const t=nx(e),n=hx(e),r=e.ownerDocument.body,o=Mw(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Mw(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+_x(e);const l=-n.scrollTop;return"rtl"===px(r).direction&&(a+=Mw(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:l}}(nx(e));else if(ox(t))r=function(e,t){const n=Ex(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ix(e)?xx(e):Dw(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=Sx(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Xw(r)}function Nx(e,t){const n=mx(e);return!(n===t||!ox(n)||fx(n))&&("fixed"===px(n).position||Nx(n,t))}function Px(e,t,n){const r=ix(t),o=nx(t),i="fixed"===n,a=Ex(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const s=Dw(0);if(r||!r&&!i)if(("body"!==ex(t)||lx(o))&&(l=hx(t)),r){const e=Ex(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&(s.x=_x(o));const c=!o||r||i?Dw(0):Cx(o,l);return{x:a.left+l.scrollLeft-s.x-c.x,y:a.top+l.scrollTop-s.y-c.y,width:a.width,height:a.height}}function Rx(e){return"static"===px(e).position}function Mx(e,t){if(!ix(e)||"fixed"===px(e).position)return null;if(t)return t(e);let n=e.offsetParent;return nx(e)===n&&(n=n.ownerDocument.body),n}function Tx(e,t){const n=tx(e);if(cx(e))return n;if(!ix(e)){let t=mx(e);for(;t&&!fx(t);){if(ox(t)&&!Rx(t))return t;t=mx(t)}return n}let r=Mx(e,t);for(;r&&sx(r)&&Rx(r);)r=Mx(r,t);return r&&fx(r)&&Rx(r)&&!ux(r)?n:r||function(e){let t=mx(e);for(;ix(t)&&!fx(t);){if(ux(t))return t;if(cx(t))return null;t=mx(t)}return null}(e)||n}const Ax={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=nx(r),l=!!t&&cx(t.floating);if(r===a||l&&i)return n;let s={scrollLeft:0,scrollTop:0},c=Dw(1);const u=Dw(0),d=ix(r);if((d||!d&&!i)&&(("body"!==ex(r)||lx(a))&&(s=hx(r)),ix(r))){const e=Ex(r);c=xx(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const f=!a||d||i?Dw(0):Cx(a,s,!0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-s.scrollTop*c.y+u.y+f.y}},getDocumentElement:nx,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?cx(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=yx(e,[],!1).filter((e=>ox(e)&&"body"!==ex(e))),o=null;const i="fixed"===px(e).position;let a=i?mx(e):e;for(;ox(a)&&!fx(a);){const t=px(a),n=ux(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||lx(a)&&!n&&Nx(e,a))?r=r.filter((e=>e!==a)):o=t,a=mx(a)}return t.set(e,r),r}(t,this._c):[].concat(n),a=[...i,r],l=a[0],s=a.reduce(((e,n)=>{const r=Ox(t,n,o);return e.top=Mw(r.top,e.top),e.right=Rw(r.right,e.right),e.bottom=Rw(r.bottom,e.bottom),e.left=Mw(r.left,e.left),e}),Ox(t,l,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:Tx,getElementRects:async function(e){const t=this.getOffsetParent||Tx,n=this.getDimensions,r=await n(e.floating);return{reference:Px(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}=bx(e);return{width:t,height:n}},getScale:xx,isElement:ox,isRTL:function(e){return"rtl"===px(e).direction}};function Dx(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ix(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,c=wx(e),u=o||i?[...c?yx(c):[],...yx(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&l?function(e,t){let n,r=null;const o=nx(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(l||t(),!f||!p)return;const h={rootMargin:-Aw(d)+"px "+-Aw(o.clientWidth-(u+f))+"px "+-Aw(o.clientHeight-(d+p))+"px "+-Aw(u)+"px",threshold:Mw(0,Rw(1,s))||1};let m=!0;function g(t){const r=t[0].intersectionRatio;if(r!==s){if(!m)return a();r?a(!1,r):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}1!==r||Dx(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 f,p=-1,h=null;a&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),c&&!s&&h.observe(c),h.observe(t));let m=s?Ex(e):null;return s&&function t(){const r=Ex(e);m&&!Dx(m,r)&&n();m=r,f=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,s&&cancelAnimationFrame(f)}}const Lx=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:l}=t,s=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=jw(n),l=$w(n),s="y"===Hw(n),c=["left","top"].includes(a)?-1:1,u=i&&s?-1:1,d=Fw(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&"number"==typeof h&&(p="end"===l?-1*h:h),s?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return a===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:a}}}}},zx=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:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=Fw(e,t),c={x:n,y:r},u=await Gw(t,s),d=Hw(jw(o)),f=Bw(d);let p=c[f],h=c[d];if(i){const e="y"===f?"bottom":"right";p=zw(p+u["y"===f?"top":"left"],p,p-u[e])}if(a){const e="y"===d?"bottom":"right";h=zw(h+u["y"===d?"top":"left"],h,h-u[e])}const m=l.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:i,[d]:a}}}}}},Fx=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:l,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...g}=Fw(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=jw(o),v=Hw(l),b=jw(l)===l,w=await(null==s.isRTL?void 0:s.isRTL(c.floating)),x=f||(b||!m?[qw(l)]:function(e){const t=qw(e);return[Ww(e),t,Ww(t)]}(l)),k="none"!==h;!f&&k&&x.push(...function(e,t,n,r){const o=$w(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[]}}(jw(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(Ww)))),i}(l,m,h,w));const S=[l,...x],E=await Gw(t,g),_=[];let C=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&_.push(E[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=$w(e),o=Uw(e),i=Vw(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=qw(a)),[a,qw(a)]}(o,a,w);_.push(E[e[0]],E[e[1]])}if(C=[...C,{placement:o,overflows:_}],!_.every((e=>e<=0))){var O,N;const e=((null==(O=i.flip)?void 0:O.index)||0)+1,t=S[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let n=null==(N=C.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:N.placement;if(!n)switch(p){case"bestFit":{var P;const e=null==(P=C.filter((e=>{if(k){const t=Hw(e.placement);return t===v||"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:P[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}},jx=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:l}=t,{apply:s=()=>{},...c}=Fw(e,t),u=await Gw(t,c),d=jw(o),f=$w(o),p="y"===Hw(o),{width:h,height:m}=i.floating;let g,y;"top"===d||"bottom"===d?(g=d,y=f===(await(null==a.isRTL?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(y=d,g="end"===f?"top":"bottom");const v=m-u.top-u.bottom,b=h-u.left-u.right,w=Rw(m-u[g],v),x=Rw(h-u[y],b),k=!t.middlewareData.shift;let S=w,E=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(E=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(S=v),k&&!f){const e=Mw(u.left,0),t=Mw(u.right,0),n=Mw(u.top,0),r=Mw(u.bottom,0);p?E=h-2*(0!==e||0!==t?e+t:Mw(u.left,u.right)):S=m-2*(0!==n||0!==r?n+r:Mw(u.top,u.bottom))}await s({...t,availableWidth:E,availableHeight:S});const _=await a.getDimensions(l.floating);return h!==_.width||m!==_.height?{reset:{rects:!0}}:{}}}},$x=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Fw(e,t);switch(r){case"referenceHidden":{const e=Qw(await Gw(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Zw(e)}}}case"escaped":{const e=Qw(await Gw(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Zw(e)}}}default:return{}}}}},Bx=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:l,middlewareData:s}=t,{element:c,padding:u=0}=Fw(e,t)||{};if(null==c)return{};const d=Kw(u),f={x:n,y:r},p=Uw(o),h=Vw(p),m=await a.getDimensions(c),g="y"===p,y=g?"top":"left",v=g?"bottom":"right",b=g?"clientHeight":"clientWidth",w=i.reference[h]+i.reference[p]-f[p]-i.floating[h],x=f[p]-i.reference[p],k=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let S=k?k[b]:0;S&&await(null==a.isElement?void 0:a.isElement(k))||(S=l.floating[b]||i.floating[h]);const E=w/2-x/2,_=S/2-m[h]/2-1,C=Rw(d[y],_),O=Rw(d[v],_),N=C,P=S-m[h]-O,R=S/2-m[h]/2+E,M=zw(N,R,P),T=!s.arrow&&null!=$w(o)&&R!==M&&i.reference[h]/2-(R<N?C:O)-m[h]/2<0,A=T?R<N?R-N:R-P:0;return{[p]:f[p]+A,data:{[p]:M,centerOffset:R-M-A,...T&&{alignmentOffset:A}},reset:T}}}),Vx=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:l=0,mainAxis:s=!0,crossAxis:c=!0}=Fw(e,t),u={x:n,y:r},d=Hw(o),f=Bw(d);let p=u[f],h=u[d];const m=Fw(l,t),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(s){const e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+g.mainAxis,n=i.reference[f]+i.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(c){var y,v;const e="y"===f?"width":"height",t=["top","left"].includes(jw(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==(v=a.offset)?void 0:v[d])||0)-(t?g.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[f]:p,[d]:h}}}},Hx=(e,t,n)=>{const r=new Map,o={platform:Ax,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,l=i.filter(Boolean),s=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Yw(c,r,s),f=r,p={},h=0;for(let n=0;n<l.length;n++){const{name:i,fn:m}=l[n],{x:g,y:y,data:v,reset:b}=await m({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=y?y:d,p={...p,[i]:{...p[i],...v}},b&&h<=50&&(h++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:d}=Yw(c,f,s))),n=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var Ux="undefined"!=typeof document?s.useLayoutEffect:s.useEffect;function Wx(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(!Wx(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)&&!Wx(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function qx(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Kx(e,t){const n=qx(e);return Math.round(t*n)/n}function Xx(e){const t=s.useRef(e);return Ux((()=>{t.current=e})),t}const Yx=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?Bx({element:n.current,padding:r}).fn(t):{}:n?Bx({element:n,padding:r}).fn(t):{};var o}}),Gx=(e,t)=>({...Lx(e),options:[e,t]}),Qx=(e,t)=>({...zx(e),options:[e,t]}),Zx=(e,t)=>({...Vx(e),options:[e,t]}),Jx=(e,t)=>({...Fx(e),options:[e,t]}),ek=(e,t)=>({...jx(e),options:[e,t]}),tk=(e,t)=>({...$x(e),options:[e,t]}),nk=(e,t)=>({...Yx(e),options:[e,t]});var rk=s.forwardRef(((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return Bu.jsx(ed.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:Bu.jsx("polygon",{points:"0,0 30,0 15,10"})})}));rk.displayName="Arrow";var ok=rk;function ik(e){const[t,n]=s.useState(void 0);return Uu((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;n({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}var ak="Popper",[lk,sk]=Vu(ak),[ck,uk]=lk(ak),dk=e=>{const{__scopePopper:t,children:n}=e,[r,o]=s.useState(null);return Bu.jsx(ck,{scope:t,anchor:r,onAnchorChange:o,children:n})};dk.displayName=ak;var fk="PopperAnchor",pk=s.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=uk(fk,n),a=s.useRef(null),l=Lu(t,a);return s.useEffect((()=>{i.onAnchorChange(r?.current||a.current)})),r?null:Bu.jsx(ed.div,{...o,ref:l})}));pk.displayName=fk;var hk="PopperContent",[mk,gk]=lk(hk),yk=s.forwardRef(((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:a=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:m,...g}=e,y=uk(hk,n),[v,b]=s.useState(null),w=Lu(t,(e=>b(e))),[x,k]=s.useState(null),S=ik(x),E=S?.width??0,_=S?.height??0,C=r+("center"!==i?"-"+i:""),O="number"==typeof d?d:{top:0,right:0,bottom:0,left:0,...d},N=Array.isArray(u)?u:[u],P=N.length>0,R={padding:O,boundary:N.filter(xk),altBoundary:P},{refs:M,floatingStyles:T,placement:A,isPositioned:D,middlewareData:I}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,f]=s.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=s.useState(r);Wx(p,r)||h(r);const[m,g]=s.useState(null),[y,v]=s.useState(null),b=s.useCallback((e=>{e!==S.current&&(S.current=e,g(e))}),[]),w=s.useCallback((e=>{e!==E.current&&(E.current=e,v(e))}),[]),x=i||m,k=a||y,S=s.useRef(null),E=s.useRef(null),_=s.useRef(d),C=null!=c,O=Xx(c),N=Xx(o),P=Xx(u),R=s.useCallback((()=>{if(!S.current||!E.current)return;const e={placement:t,strategy:n,middleware:p};N.current&&(e.platform=N.current),Hx(S.current,E.current,e).then((e=>{const t={...e,isPositioned:!1!==P.current};M.current&&!Wx(_.current,t)&&(_.current=t,Lr.flushSync((()=>{f(t)})))}))}),[p,t,n,N,P]);Ux((()=>{!1===u&&_.current.isPositioned&&(_.current.isPositioned=!1,f((e=>({...e,isPositioned:!1}))))}),[u]);const M=s.useRef(!1);Ux((()=>(M.current=!0,()=>{M.current=!1})),[]),Ux((()=>{if(x&&(S.current=x),k&&(E.current=k),x&&k){if(O.current)return O.current(x,k,R);R()}}),[x,k,R,O,C]);const T=s.useMemo((()=>({reference:S,floating:E,setReference:b,setFloating:w})),[b,w]),A=s.useMemo((()=>({reference:x,floating:k})),[x,k]),D=s.useMemo((()=>{const e={position:n,left:0,top:0};if(!A.floating)return e;const t=Kx(A.floating,d.x),r=Kx(A.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...qx(A.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,l,A.floating,d.x,d.y]);return s.useMemo((()=>({...d,update:R,refs:T,elements:A,floatingStyles:D})),[d,R,T,A,D])}({strategy:"fixed",placement:C,whileElementsMounted:(...e)=>Ix(...e,{animationFrame:"always"===h}),elements:{reference:y.anchor},middleware:[Gx({mainAxis:o+_,alignmentAxis:a}),c&&Qx({mainAxis:!0,crossAxis:!1,limiter:"partial"===f?Zx():void 0,...R}),c&&Jx({...R}),ek({...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`)}}),x&&nk({element:x,padding:l}),kk({arrowWidth:E,arrowHeight:_}),p&&tk({strategy:"referenceHidden",...R})]}),[L,z]=Sk(A),F=Xu(m);Uu((()=>{D&&F?.()}),[D,F]);const j=I.arrow?.x,$=I.arrow?.y,B=0!==I.arrow?.centerOffset,[V,H]=s.useState();return Uu((()=>{v&&H(window.getComputedStyle(v).zIndex)}),[v]),Bu.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...T,transform:D?T.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:V,"--radix-popper-transform-origin":[I.transformOrigin?.x,I.transformOrigin?.y].join(" "),...I.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:Bu.jsx(mk,{scope:n,placedSide:L,onArrowChange:k,arrowX:j,arrowY:$,shouldHideArrow:B,children:Bu.jsx(ed.div,{"data-side":L,"data-align":z,...g,ref:w,style:{...g.style,animation:D?void 0:"none"}})})})}));yk.displayName=hk;var vk="PopperArrow",bk={top:"bottom",right:"left",bottom:"top",left:"right"},wk=s.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,o=gk(vk,n),i=bk[o.placedSide];return Bu.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:Bu.jsx(ok,{...r,ref:t,style:{...r.style,display:"block"}})})}));function xk(e){return null!==e}wk.displayName=vk;var kk=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,l=i?0:e.arrowHeight,[s,c]=Sk(n),u={start:"0%",center:"50%",end:"100%"}[c],d=(o.arrow?.x??0)+a/2,f=(o.arrow?.y??0)+l/2;let p="",h="";return"bottom"===s?(p=i?u:`${d}px`,h=-l+"px"):"top"===s?(p=i?u:`${d}px`,h=`${r.floating.height+l}px`):"right"===s?(p=-l+"px",h=i?u:`${f}px`):"left"===s&&(p=`${r.floating.width+l}px`,h=i?u:`${f}px`),{data:{x:p,y:h}}}});function Sk(e){const[t,n="center"]=e.split("-");return[t,n]}var Ek=dk,_k=pk,Ck=yk,Ok=wk,Nk="rovingFocusGroup.onEntryFocus",Pk={bubbles:!1,cancelable:!0},Rk="RovingFocusGroup",[Mk,Tk,Ak]=Cw(Rk),[Dk,Ik]=Vu(Rk,[Ak]),[Lk,zk]=Dk(Rk),Fk=s.forwardRef(((e,t)=>Bu.jsx(Mk.Provider,{scope:e.__scopeRovingFocusGroup,children:Bu.jsx(Mk.Slot,{scope:e.__scopeRovingFocusGroup,children:Bu.jsx(jk,{...e,ref:t})})})));Fk.displayName=Rk;var jk=s.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,p=s.useRef(null),h=Lu(t,p),m=Nw(i),[g=null,y]=Yu({prop:a,defaultProp:l,onChange:c}),[v,b]=s.useState(!1),w=Xu(u),x=Tk(n),k=s.useRef(!1),[S,E]=s.useState(0);return s.useEffect((()=>{const e=p.current;if(e)return e.addEventListener(Nk,w),()=>e.removeEventListener(Nk,w)}),[w]),Bu.jsx(Lk,{scope:n,orientation:r,dir:m,loop:o,currentTabStopId:g,onItemFocus:s.useCallback((e=>y(e)),[y]),onItemShiftTab:s.useCallback((()=>b(!0)),[]),onFocusableItemAdd:s.useCallback((()=>E((e=>e+1))),[]),onFocusableItemRemove:s.useCallback((()=>E((e=>e-1))),[]),children:Bu.jsx(ed.div,{tabIndex:v||0===S?-1:0,"data-orientation":r,...f,ref:h,style:{outline:"none",...e.style},onMouseDown:Au(e.onMouseDown,(()=>{k.current=!0})),onFocus:Au(e.onFocus,(e=>{const t=!k.current;if(e.target===e.currentTarget&&t&&!v){const t=new CustomEvent(Nk,Pk);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=x().filter((e=>e.focusable));Hk([e.find((e=>e.active)),e.find((e=>e.id===g)),...e].filter(Boolean).map((e=>e.ref.current)),d)}}k.current=!1})),onBlur:Au(e.onBlur,(()=>b(!1)))})})})),$k="RovingFocusGroupItem",Bk=s.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...a}=e,l=Ku(),c=i||l,u=zk($k,n),d=u.currentTabStopId===c,f=Tk(n),{onFocusableItemAdd:p,onFocusableItemRemove:h}=u;return s.useEffect((()=>{if(r)return p(),()=>h()}),[r,p,h]),Bu.jsx(Mk.ItemSlot,{scope:n,id:c,focusable:r,active:o,children:Bu.jsx(ed.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...a,ref:t,onMouseDown:Au(e.onMouseDown,(e=>{r?u.onItemFocus(c):e.preventDefault()})),onFocus:Au(e.onFocus,(()=>u.onItemFocus(c))),onKeyDown:Au(e.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:Vk[r]}(e,u.orientation,u.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().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((()=>Hk(n)))}}))})})}));Bk.displayName=$k;var Vk={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Hk(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 Uk=Fk,Wk=Bk,qk=["Enter"," "],Kk=["ArrowUp","PageDown","End"],Xk=["ArrowDown","PageUp","Home",...Kk],Yk={ltr:[...qk,"ArrowRight"],rtl:[...qk,"ArrowLeft"]},Gk={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Qk="Menu",[Zk,Jk,eS]=Cw(Qk),[tS,nS]=Vu(Qk,[eS,sk,Ik]),rS=sk(),oS=Ik(),[iS,aS]=tS(Qk),[lS,sS]=tS(Qk),cS=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:i,modal:a=!0}=e,l=rS(t),[c,u]=s.useState(null),d=s.useRef(!1),f=Xu(i),p=Nw(o);return s.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})}}),[]),Bu.jsx(Ek,{...l,children:Bu.jsx(iS,{scope:t,open:n,onOpenChange:f,content:c,onContentChange:u,children:Bu.jsx(lS,{scope:t,onClose:s.useCallback((()=>f(!1)),[f]),isUsingKeyboardRef:d,dir:p,modal:a,children:r})})})};cS.displayName=Qk;var uS=s.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e,o=rS(n);return Bu.jsx(_k,{...o,...r,ref:t})}));uS.displayName="MenuAnchor";var dS="MenuPortal",[fS,pS]=tS(dS,{forceMount:void 0}),hS=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=aS(dS,t);return Bu.jsx(fS,{scope:t,forceMount:n,children:Bu.jsx(kd,{present:n||i.open,children:Bu.jsx(xd,{asChild:!0,container:o,children:r})})})};hS.displayName=dS;var mS="MenuContent",[gS,yS]=tS(mS),vS=s.forwardRef(((e,t)=>{const n=pS(mS,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=aS(mS,e.__scopeMenu),a=sS(mS,e.__scopeMenu);return Bu.jsx(Zk.Provider,{scope:e.__scopeMenu,children:Bu.jsx(kd,{present:r||i.open,children:Bu.jsx(Zk.Slot,{scope:e.__scopeMenu,children:a.modal?Bu.jsx(bS,{...o,ref:t}):Bu.jsx(wS,{...o,ref:t})})})})})),bS=s.forwardRef(((e,t)=>{const n=aS(mS,e.__scopeMenu),r=s.useRef(null),o=Lu(t,r);return s.useEffect((()=>{const e=r.current;if(e)return kf(e)}),[]),Bu.jsx(xS,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Au(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})})),wS=s.forwardRef(((e,t)=>{const n=aS(mS,e.__scopeMenu);return Bu.jsx(xS,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})})),xS=s.forwardRef(((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:h,disableOutsideScroll:m,...g}=e,y=aS(mS,n),v=sS(mS,n),b=rS(n),w=oS(n),x=Jk(n),[k,S]=s.useState(null),E=s.useRef(null),_=Lu(t,E,y.onContentChange),C=s.useRef(0),O=s.useRef(""),N=s.useRef(0),P=s.useRef(null),R=s.useRef("right"),M=s.useRef(0),T=m?mf:s.Fragment,A=m?{as:Gu,allowPinchZoom:!0}:void 0,D=e=>{const t=O.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 l=a.find((e=>e.toLowerCase().startsWith(o.toLowerCase())));return l!==n?l:void 0}(n.map((e=>e.textValue)),t,o),a=n.find((e=>e.textValue===i))?.ref.current;!function e(t){O.current=t,window.clearTimeout(C.current),""!==t&&(C.current=window.setTimeout((()=>e("")),1e3))}(t),a&&setTimeout((()=>a.focus()))};s.useEffect((()=>()=>window.clearTimeout(C.current)),[]),_d();const I=s.useCallback((e=>R.current===P.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,l=t[e].y,s=t[i].x,c=t[i].y;l>r!=c>r&&n<(s-a)*(r-l)/(c-l)+a&&(o=!o)}return o}(n,t)}(e,P.current?.area)),[]);return Bu.jsx(gS,{scope:n,searchRef:O,onItemEnter:s.useCallback((e=>{I(e)&&e.preventDefault()}),[I]),onItemLeave:s.useCallback((e=>{I(e)||(E.current?.focus(),S(null))}),[I]),onTriggerLeave:s.useCallback((e=>{I(e)&&e.preventDefault()}),[I]),pointerGraceTimerRef:N,onPointerGraceIntentChange:s.useCallback((e=>{P.current=e}),[]),children:Bu.jsx(T,{...A,children:Bu.jsx(hd,{asChild:!0,trapped:o,onMountAutoFocus:Au(i,(e=>{e.preventDefault(),E.current?.focus({preventScroll:!0})})),onUnmountAutoFocus:a,children:Bu.jsx(ld,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:h,children:Bu.jsx(Uk,{asChild:!0,...w,dir:v.dir,orientation:"vertical",loop:r,currentTabStopId:k,onCurrentTabStopIdChange:S,onEntryFocus:Au(c,(e=>{v.isUsingKeyboardRef.current||e.preventDefault()})),preventScrollOnEntryFocus:!0,children:Bu.jsx(Ck,{role:"menu","aria-orientation":"vertical","data-state":YS(y.open),"data-radix-menu-content":"",dir:v.dir,...b,...g,ref:_,style:{outline:"none",...g.style},onKeyDown:Au(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&&D(e.key));const o=E.current;if(e.target!==o)return;if(!Xk.includes(e.key))return;e.preventDefault();const i=x().filter((e=>!e.disabled)).map((e=>e.ref.current));Kk.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:Au(e.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(C.current),O.current="")})),onPointerMove:Au(e.onPointerMove,ZS((e=>{const t=e.target,n=M.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>M.current?"right":"left";R.current=t,M.current=e.clientX}})))})})})})})})}));vS.displayName=mS;var kS=s.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return Bu.jsx(ed.div,{role:"group",...r,ref:t})}));kS.displayName="MenuGroup";var SS=s.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return Bu.jsx(ed.div,{...r,ref:t})}));SS.displayName="MenuLabel";var ES="MenuItem",_S="menu.itemSelect",CS=s.forwardRef(((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,i=s.useRef(null),a=sS(ES,e.__scopeMenu),l=yS(ES,e.__scopeMenu),c=Lu(t,i),u=s.useRef(!1);return Bu.jsx(OS,{...o,ref:c,disabled:n,onClick:Au(e.onClick,(()=>{const e=i.current;if(!n&&e){const t=new CustomEvent(_S,{bubbles:!0,cancelable:!0});e.addEventListener(_S,(e=>r?.(e)),{once:!0}),td(e,t),t.defaultPrevented?u.current=!1:a.onClose()}})),onPointerDown:t=>{e.onPointerDown?.(t),u.current=!0},onPointerUp:Au(e.onPointerUp,(e=>{u.current||e.currentTarget?.click()})),onKeyDown:Au(e.onKeyDown,(e=>{const t=""!==l.searchRef.current;n||t&&" "===e.key||qk.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))})}));CS.displayName=ES;var OS=s.forwardRef(((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...i}=e,a=yS(ES,n),l=oS(n),c=s.useRef(null),u=Lu(t,c),[d,f]=s.useState(!1),[p,h]=s.useState("");return s.useEffect((()=>{const e=c.current;e&&h((e.textContent??"").trim())}),[i.children]),Bu.jsx(Zk.ItemSlot,{scope:n,disabled:r,textValue:o??p,children:Bu.jsx(Wk,{asChild:!0,...l,focusable:!r,children:Bu.jsx(ed.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:u,onPointerMove:Au(e.onPointerMove,ZS((e=>{if(r)a.onItemLeave(e);else if(a.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus({preventScroll:!0})}}))),onPointerLeave:Au(e.onPointerLeave,ZS((e=>a.onItemLeave(e)))),onFocus:Au(e.onFocus,(()=>f(!0))),onBlur:Au(e.onBlur,(()=>f(!1)))})})})})),NS=s.forwardRef(((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return Bu.jsx(LS,{scope:e.__scopeMenu,checked:n,children:Bu.jsx(CS,{role:"menuitemcheckbox","aria-checked":GS(n)?"mixed":n,...o,ref:t,"data-state":QS(n),onSelect:Au(o.onSelect,(()=>r?.(!!GS(n)||!n)),{checkForDefaultPrevented:!1})})})}));NS.displayName="MenuCheckboxItem";var PS="MenuRadioGroup",[RS,MS]=tS(PS,{value:void 0,onValueChange:()=>{}}),TS=s.forwardRef(((e,t)=>{const{value:n,onValueChange:r,...o}=e,i=Xu(r);return Bu.jsx(RS,{scope:e.__scopeMenu,value:n,onValueChange:i,children:Bu.jsx(kS,{...o,ref:t})})}));TS.displayName=PS;var AS="MenuRadioItem",DS=s.forwardRef(((e,t)=>{const{value:n,...r}=e,o=MS(AS,e.__scopeMenu),i=n===o.value;return Bu.jsx(LS,{scope:e.__scopeMenu,checked:i,children:Bu.jsx(CS,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":QS(i),onSelect:Au(r.onSelect,(()=>o.onValueChange?.(n)),{checkForDefaultPrevented:!1})})})}));DS.displayName=AS;var IS="MenuItemIndicator",[LS,zS]=tS(IS,{checked:!1}),FS=s.forwardRef(((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,i=zS(IS,n);return Bu.jsx(kd,{present:r||GS(i.checked)||!0===i.checked,children:Bu.jsx(ed.span,{...o,ref:t,"data-state":QS(i.checked)})})}));FS.displayName=IS;var jS=s.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return Bu.jsx(ed.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})}));jS.displayName="MenuSeparator";var $S=s.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e,o=rS(n);return Bu.jsx(Ok,{...o,...r,ref:t})}));$S.displayName="MenuArrow";var BS="MenuSub",[VS,HS]=tS(BS),US=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,i=aS(BS,t),a=rS(t),[l,c]=s.useState(null),[u,d]=s.useState(null),f=Xu(o);return s.useEffect((()=>(!1===i.open&&f(!1),()=>f(!1))),[i.open,f]),Bu.jsx(Ek,{...a,children:Bu.jsx(iS,{scope:t,open:r,onOpenChange:f,content:u,onContentChange:d,children:Bu.jsx(VS,{scope:t,contentId:Ku(),triggerId:Ku(),trigger:l,onTriggerChange:c,children:n})})})};US.displayName=BS;var WS="MenuSubTrigger",qS=s.forwardRef(((e,t)=>{const n=aS(WS,e.__scopeMenu),r=sS(WS,e.__scopeMenu),o=HS(WS,e.__scopeMenu),i=yS(WS,e.__scopeMenu),a=s.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=i,u={__scopeMenu:e.__scopeMenu},d=s.useCallback((()=>{a.current&&window.clearTimeout(a.current),a.current=null}),[]);return s.useEffect((()=>d),[d]),s.useEffect((()=>{const e=l.current;return()=>{window.clearTimeout(e),c(null)}}),[l,c]),Bu.jsx(uS,{asChild:!0,...u,children:Bu.jsx(OS,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":YS(n.open),...e,ref:Iu(t,o.onTriggerChange),onClick:t=>{e.onClick?.(t),e.disabled||t.defaultPrevented||(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Au(e.onPointerMove,ZS((t=>{i.onItemEnter(t),t.defaultPrevented||e.disabled||n.open||a.current||(i.onPointerGraceIntentChange(null),a.current=window.setTimeout((()=>{n.onOpenChange(!0),d()}),100))}))),onPointerLeave:Au(e.onPointerLeave,ZS((e=>{d();const t=n.content?.getBoundingClientRect();if(t){const r=n.content?.dataset.side,o="right"===r,a=o?-5:5,s=t[o?"left":"right"],c=t[o?"right":"left"];i.onPointerGraceIntentChange({area:[{x:e.clientX+a,y:e.clientY},{x:s,y:t.top},{x:c,y:t.top},{x:c,y:t.bottom},{x:s,y:t.bottom}],side:r}),window.clearTimeout(l.current),l.current=window.setTimeout((()=>i.onPointerGraceIntentChange(null)),300)}else{if(i.onTriggerLeave(e),e.defaultPrevented)return;i.onPointerGraceIntentChange(null)}}))),onKeyDown:Au(e.onKeyDown,(t=>{const o=""!==i.searchRef.current;e.disabled||o&&" "===t.key||Yk[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())}))})})}));qS.displayName=WS;var KS="MenuSubContent",XS=s.forwardRef(((e,t)=>{const n=pS(mS,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=aS(mS,e.__scopeMenu),a=sS(mS,e.__scopeMenu),l=HS(KS,e.__scopeMenu),c=s.useRef(null),u=Lu(t,c);return Bu.jsx(Zk.Provider,{scope:e.__scopeMenu,children:Bu.jsx(kd,{present:r||i.open,children:Bu.jsx(Zk.Slot,{scope:e.__scopeMenu,children:Bu.jsx(xS,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:u,align:"start",side:"rtl"===a.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{a.isUsingKeyboardRef.current&&c.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:Au(e.onFocusOutside,(e=>{e.target!==l.trigger&&i.onOpenChange(!1)})),onEscapeKeyDown:Au(e.onEscapeKeyDown,(e=>{a.onClose(),e.preventDefault()})),onKeyDown:Au(e.onKeyDown,(e=>{const t=e.currentTarget.contains(e.target),n=Gk[a.dir].includes(e.key);t&&n&&(i.onOpenChange(!1),l.trigger?.focus(),e.preventDefault())}))})})})})}));function YS(e){return e?"open":"closed"}function GS(e){return"indeterminate"===e}function QS(e){return GS(e)?"indeterminate":e?"checked":"unchecked"}function ZS(e){return t=>"mouse"===t.pointerType?e(t):void 0}XS.displayName=KS;var JS=cS,eE=uS,tE=hS,nE=vS,rE=kS,oE=SS,iE=CS,aE=NS,lE=TS,sE=DS,cE=FS,uE=jS,dE=$S,fE=US,pE=qS,hE=XS,mE="DropdownMenu",[gE,yE]=Vu(mE,[nS]),vE=nS(),[bE,wE]=gE(mE),xE=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:i,onOpenChange:a,modal:l=!0}=e,c=vE(t),u=s.useRef(null),[d=!1,f]=Yu({prop:o,defaultProp:i,onChange:a});return Bu.jsx(bE,{scope:t,triggerId:Ku(),triggerRef:u,contentId:Ku(),open:d,onOpenChange:f,onOpenToggle:s.useCallback((()=>f((e=>!e))),[f]),modal:l,children:Bu.jsx(JS,{...c,open:d,onOpenChange:f,dir:r,modal:l,children:n})})};xE.displayName=mE;var kE="DropdownMenuTrigger",SE=s.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=wE(kE,n),a=vE(n);return Bu.jsx(eE,{asChild:!0,...a,children:Bu.jsx(ed.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:Iu(t,i.triggerRef),onPointerDown:Au(e.onPointerDown,(e=>{r||0!==e.button||!1!==e.ctrlKey||(i.onOpenToggle(),i.open||e.preventDefault())})),onKeyDown:Au(e.onKeyDown,(e=>{r||(["Enter"," "].includes(e.key)&&i.onOpenToggle(),"ArrowDown"===e.key&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())}))})})}));SE.displayName=kE;var EE=e=>{const{__scopeDropdownMenu:t,...n}=e,r=vE(t);return Bu.jsx(tE,{...r,...n})};EE.displayName="DropdownMenuPortal";var _E="DropdownMenuContent",CE=s.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=wE(_E,n),i=vE(n),a=s.useRef(!1);return Bu.jsx(nE,{id:o.contentId,"aria-labelledby":o.triggerId,...i,...r,ref:t,onCloseAutoFocus:Au(e.onCloseAutoFocus,(e=>{a.current||o.triggerRef.current?.focus(),a.current=!1,e.preventDefault()})),onInteractOutside:Au(e.onInteractOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;o.modal&&!r||(a.current=!0)})),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})}));CE.displayName=_E;var OE=s.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=vE(n);return Bu.jsx(rE,{...o,...r,ref:t})}));OE.displayName="DropdownMenuGroup";s.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=vE(n);return Bu.jsx(oE,{...o,...r,ref:t})})).displayName="DropdownMenuLabel";var NE=s.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=vE(n);return Bu.jsx(iE,{...o,...r,ref:t})}));NE.displayName="DropdownMenuItem";s.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=vE(n);return Bu.jsx(aE,{...o,...r,ref:t})})).displayName="DropdownMenuCheckboxItem";var PE=s.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=vE(n);return Bu.jsx(lE,{...o,...r,ref:t})}));PE.displayName="DropdownMenuRadioGroup";var RE=s.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=vE(n);return Bu.jsx(sE,{...o,...r,ref:t})}));RE.displayName="DropdownMenuRadioItem";s.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=vE(n);return Bu.jsx(cE,{...o,...r,ref:t})})).displayName="DropdownMenuItemIndicator";s.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=vE(n);return Bu.jsx(uE,{...o,...r,ref:t})})).displayName="DropdownMenuSeparator";s.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=vE(n);return Bu.jsx(dE,{...o,...r,ref:t})})).displayName="DropdownMenuArrow";var ME=s.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=vE(n);return Bu.jsx(pE,{...o,...r,ref:t})}));ME.displayName="DropdownMenuSubTrigger";var TE=s.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=vE(n);return Bu.jsx(hE,{...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)"}})}));TE.displayName="DropdownMenuSubContent";var AE=xE,DE=SE,IE=EE,LE=CE,zE=OE,FE=NE,jE=PE,$E=RE,BE=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:i}=e,a=vE(t),[l=!1,s]=Yu({prop:r,defaultProp:i,onChange:o});return Bu.jsx(fE,{...a,open:l,onOpenChange:s,children:n})},VE=ME,HE=TE;function UE(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 WE(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 qE(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(WE)}const KE=({trigger:e,setOpen:t,open:n})=>{const[r,o]=s.useState(""),i=s.useContext($z);return i.options.useWorkerManager?s.createElement(_w,{setOpen:t,open:n,trigger:e,title:"New Worker",description:"Create a new worker"},s.createElement("div",null,"Name:",s.createElement("br",null),s.createElement("input",{className:"styledinput",onChange:e=>{o(e.currentTarget.value)},value:r})),s.createElement("div",null,r&&s.createElement("div",null,s.createElement("button",{className:"styledbtn",onClick:()=>{i.workermanager?.new_worker({name:r}),t(!1)}},"Create")))):null},XE=({trigger:e,setOpen:t,open:n})=>{const r=s.useContext($z),[o,i]=s.useState(!1),a=r.workers(),l=r.worker?.uuid,c=(l?a[l]?.name:void 0)||l||"worker";return s.createElement(_w,{setOpen:t,open:n,trigger:e,title:"Export Worker",description:"Export the worker as a .fnw file"},s.createElement("div",null,s.createElement("div",null,s.createElement("input",{type:"checkbox",className:"styledcheckbox",checked:o,onChange:e=>{i(e.currentTarget.checked)}}),"Include Files"),s.createElement("button",{className:"styledbtn",onClick:async()=>{if(!r.worker)return;!function(e,t,n){const r=UE(e,n),o=URL.createObjectURL(r),i=document.createElement("a");i.href=o,i.download=t,i.click(),URL.revokeObjectURL(o),i.remove()}(await r.worker.export({withFiles:o}),c+".fnw","application/zip"),t(!1)}},"Export")))},YE=()=>{const e=s.useContext($z).progress_state();return s.createElement("div",{className:"statusbar"},s.createElement("span",{className:"statusbar-progressbar",style:{width:Math.min(100,100*e.progress)+"%"}}),s.createElement("span",{className:"statusbar-message"},e.message))},GE=()=>{const e=s.useContext($z),t=e.workers(),[n,r]=s.useState(!1),[o,i]=s.useState(!1),a=e.options.useWorkerManager&&e.workermanager&&e.workermanager.open,l=a&&Object.keys(t).length>0,c=e.worker&&e.worker.is_open,u=c&&a;return a||c?s.createElement(s.Fragment,null,s.createElement(AE,null,s.createElement(DE,{asChild:!0},s.createElement("button",{className:"styledbtn"},s.createElement(lb,{direction:"row",spacing:1},s.createElement(ab,null,"Worker")," ",s.createElement(Jv,null)))),s.createElement(IE,null,s.createElement(LE,{className:"headermenucontent funcnodescontainer"},s.createElement(zE,null,l&&s.createElement(BE,null,s.createElement(VE,{className:"headermenuitem submenuitem"},s.createElement(lb,{direction:"row",spacing:1},"Select",s.createElement(sb,null))),s.createElement(IE,null,s.createElement(HE,{className:"headermenucontent funcnodescontainer",sideOffset:2,alignOffset:-5},s.createElement(jE,{value:e.worker?.uuid,onValueChange:n=>{(n=>{if("__select__"!==n&&e.workers&&e.workermanager&&t[n]){if(!t[n].active&&!window.confirm("this is an inactive worker, selecting it will start it, continue?"))return;e.workermanager.set_active(n)}})(n)}},Object.keys(t).sort(((e,n)=>{if(t[e].active&&!t[n].active)return-1;if(!t[e].active&&t[n].active)return 1;const r=t[e].name||e,o=t[n].name||n;return r.localeCompare(o)})).map((n=>s.createElement($E,{className:"headermenuitem workerselectoption"+(t[n]?.active?" active":" inactive")+" headermenuitem",key:n,value:n,disabled:n===e.worker?.uuid},t[n]?.name||n))))))),c&&s.createElement(s.Fragment,null,u&&s.createElement(FE,{className:"headermenuitem",onClick:()=>{if(e.worker)return e.workermanager?void e.workermanager?.restart_worker(e.worker.uuid):e.logger.error("no workermanager")}},"Restart"),s.createElement(FE,{className:"headermenuitem",onClick:()=>{e.worker&&e.worker.stop()}},"Stop"),s.createElement(FE,{className:"headermenuitem",onClick:()=>i(!0)},"Export"),s.createElement(FE,{className:"headermenuitem",onClick:async()=>{if(!e.worker)return;if(!window.confirm("Updateing the worker might replace the current nodespace, continue?"))return;const t=await qE(".fnw");e.worker.update_from_export(t)}},"Update")),a&&s.createElement(s.Fragment,null,s.createElement(FE,{className:"headermenuitem",onClick:()=>r(!0)},"New")))))),s.createElement(KE,{open:n,setOpen:r}),s.createElement(XE,{open:o,setOpen:i})):null},QE=()=>{const e=s.useContext($z);return s.createElement(s.Fragment,null,s.createElement(AE,null,s.createElement(DE,{asChild:!0},s.createElement("button",{className:"styledbtn"},s.createElement(lb,{direction:"row",spacing:1},s.createElement(ab,null,"Nodespace")," ",s.createElement(Jv,null)))),s.createElement(IE,null,s.createElement(LE,{className:"headermenucontent funcnodescontainer"},s.createElement(zE,null,s.createElement(FE,{className:"headermenuitem",onClick:()=>{window.confirm("Are you sure you want to start a new flow?")&&e.worker?.clear()}},"New"),s.createElement(FE,{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"),s.createElement(FE,{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"))))))},ZE=({...e})=>{const t=s.useContext($z),n=t.workerstate();return Object.keys(e).length>0&&t.logger.debug("headerprops",e),s.createElement("div",{className:"funcnodesreactflowheader"},s.createElement("div",{className:"headerelement"},s.createElement(YE,null)),e.showmenu&&s.createElement(s.Fragment,null,s.createElement("div",{className:"headerelement"},s.createElement(GE,null)),t.worker&&n.is_open&&s.createElement("div",{className:"headerelement"},s.createElement(QE,null))))};const JE=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,e_=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,t_={};function n_(e,t){return(t_.jsx?e_:JE).test(e)}const r_=/[ \t\n\f\r]/g;function o_(e){return""===e.replace(r_,"")}class i_{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}}function a_(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 i_(n,r,t)}function l_(e){return e.toLowerCase()}i_.prototype.property={},i_.prototype.normal={},i_.prototype.space=null;class s_{constructor(e,t){this.property=e,this.attribute=t}}s_.prototype.space=null,s_.prototype.boolean=!1,s_.prototype.booleanish=!1,s_.prototype.overloadedBoolean=!1,s_.prototype.number=!1,s_.prototype.commaSeparated=!1,s_.prototype.spaceSeparated=!1,s_.prototype.commaOrSpaceSeparated=!1,s_.prototype.mustUseProperty=!1,s_.prototype.defined=!1;let c_=0;const u_=y_(),d_=y_(),f_=y_(),p_=y_(),h_=y_(),m_=y_(),g_=y_();function y_(){return 2**++c_}var v_=Object.freeze({__proto__:null,boolean:u_,booleanish:d_,commaOrSpaceSeparated:g_,commaSeparated:m_,number:p_,overloadedBoolean:f_,spaceSeparated:h_});const b_=Object.keys(v_);class w_ extends s_{constructor(e,t,n,r){let o=-1;if(super(e,t),x_(this,"space",r),"number"==typeof n)for(;++o<b_.length;){const e=b_[o];x_(this,b_[o],(n&v_[e])===v_[e])}}}function x_(e,t,n){n&&(e[t]=n)}w_.prototype.defined=!0;const k_={}.hasOwnProperty;function S_(e){const t={},n={};let r;for(r in e.properties)if(k_.call(e.properties,r)){const o=e.properties[r],i=new w_(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[l_(r)]=r,n[l_(i.attribute)]=r}return new i_(t,n,e.space)}const E_=S_({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}}),__=S_({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function C_(e,t){return t in e?e[t]:t}function O_(e,t){return C_(e,t.toLowerCase())}const N_=S_({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:O_,properties:{xmlns:null,xmlnsXLink:null}}),P_=S_({transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:d_,ariaAutoComplete:null,ariaBusy:d_,ariaChecked:d_,ariaColCount:p_,ariaColIndex:p_,ariaColSpan:p_,ariaControls:h_,ariaCurrent:null,ariaDescribedBy:h_,ariaDetails:null,ariaDisabled:d_,ariaDropEffect:h_,ariaErrorMessage:null,ariaExpanded:d_,ariaFlowTo:h_,ariaGrabbed:d_,ariaHasPopup:null,ariaHidden:d_,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:h_,ariaLevel:p_,ariaLive:null,ariaModal:d_,ariaMultiLine:d_,ariaMultiSelectable:d_,ariaOrientation:null,ariaOwns:h_,ariaPlaceholder:null,ariaPosInSet:p_,ariaPressed:d_,ariaReadOnly:d_,ariaRelevant:null,ariaRequired:d_,ariaRoleDescription:h_,ariaRowCount:p_,ariaRowIndex:p_,ariaRowSpan:p_,ariaSelected:d_,ariaSetSize:p_,ariaSort:null,ariaValueMax:p_,ariaValueMin:p_,ariaValueNow:p_,ariaValueText:null,role:null}}),R_=S_({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:O_,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:m_,acceptCharset:h_,accessKey:h_,action:null,allow:null,allowFullScreen:u_,allowPaymentRequest:u_,allowUserMedia:u_,alt:null,as:null,async:u_,autoCapitalize:null,autoComplete:h_,autoFocus:u_,autoPlay:u_,blocking:h_,capture:null,charSet:null,checked:u_,cite:null,className:h_,cols:p_,colSpan:null,content:null,contentEditable:d_,controls:u_,controlsList:h_,coords:p_|m_,crossOrigin:null,data:null,dateTime:null,decoding:null,default:u_,defer:u_,dir:null,dirName:null,disabled:u_,download:f_,draggable:d_,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:u_,formTarget:null,headers:h_,height:p_,hidden:u_,high:p_,href:null,hrefLang:null,htmlFor:h_,httpEquiv:h_,id:null,imageSizes:null,imageSrcSet:null,inert:u_,inputMode:null,integrity:null,is:null,isMap:u_,itemId:null,itemProp:h_,itemRef:h_,itemScope:u_,itemType:h_,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:u_,low:p_,manifest:null,max:null,maxLength:p_,media:null,method:null,min:null,minLength:p_,multiple:u_,muted:u_,name:null,nonce:null,noModule:u_,noValidate:u_,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:u_,optimum:p_,pattern:null,ping:h_,placeholder:null,playsInline:u_,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:u_,referrerPolicy:null,rel:h_,required:u_,reversed:u_,rows:p_,rowSpan:p_,sandbox:h_,scope:null,scoped:u_,seamless:u_,selected:u_,shadowRootClonable:u_,shadowRootDelegatesFocus:u_,shadowRootMode:null,shape:null,size:p_,sizes:null,slot:null,span:p_,spellCheck:d_,src:null,srcDoc:null,srcLang:null,srcSet:null,start:p_,step:null,style:null,tabIndex:p_,target:null,title:null,translate:null,type:null,typeMustMatch:u_,useMap:null,value:d_,width:p_,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:h_,axis:null,background:null,bgColor:null,border:p_,borderColor:null,bottomMargin:p_,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:u_,declare:u_,event:null,face:null,frame:null,frameBorder:null,hSpace:p_,leftMargin:p_,link:null,longDesc:null,lowSrc:null,marginHeight:p_,marginWidth:p_,noResize:u_,noHref:u_,noShade:u_,noWrap:u_,object:null,profile:null,prompt:null,rev:null,rightMargin:p_,rules:null,scheme:null,scrolling:d_,standby:null,summary:null,text:null,topMargin:p_,valueType:null,version:null,vAlign:null,vLink:null,vSpace:p_,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:u_,disableRemotePlayback:u_,prefix:null,property:null,results:p_,security:null,unselectable:null}}),M_=S_({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:C_,properties:{about:g_,accentHeight:p_,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:p_,amplitude:p_,arabicForm:null,ascent:p_,attributeName:null,attributeType:null,azimuth:p_,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:p_,by:null,calcMode:null,capHeight:p_,className:h_,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:p_,diffuseConstant:p_,direction:null,display:null,dur:null,divisor:p_,dominantBaseline:null,download:u_,dx:null,dy:null,edgeMode:null,editable:null,elevation:p_,enableBackground:null,end:null,event:null,exponent:p_,externalResourcesRequired:null,fill:null,fillOpacity:p_,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:m_,g2:m_,glyphName:m_,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:p_,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:p_,horizOriginX:p_,horizOriginY:p_,id:null,ideographic:p_,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:p_,k:p_,k1:p_,k2:p_,k3:p_,k4:p_,kernelMatrix:g_,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:p_,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:p_,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:p_,overlineThickness:p_,paintOrder:null,panose1:null,path:null,pathLength:p_,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:h_,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:p_,pointsAtY:p_,pointsAtZ:p_,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:g_,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:g_,rev:g_,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:g_,requiredFeatures:g_,requiredFonts:g_,requiredFormats:g_,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:p_,specularExponent:p_,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:p_,strikethroughThickness:p_,string:null,stroke:null,strokeDashArray:g_,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:p_,strokeOpacity:p_,strokeWidth:null,style:null,surfaceScale:p_,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:g_,tabIndex:p_,tableValues:null,target:null,targetX:p_,targetY:p_,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:g_,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:p_,underlineThickness:p_,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:p_,values:null,vAlphabetic:p_,vMathematical:p_,vectorEffect:null,vHanging:p_,vIdeographic:p_,version:null,vertAdvY:p_,vertOriginX:p_,vertOriginY:p_,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:p_,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),T_=/^data[-\w.:]+$/i,A_=/-[a-z]/g,D_=/[A-Z]/g;function I_(e){return"-"+e.toLowerCase()}function L_(e){return e.charAt(1).toUpperCase()}const z_={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"},F_=a_([__,E_,N_,P_,R_],"html"),j_=a_([__,E_,N_,P_,M_],"svg");var $_,B_,V_,H_={};var U_=function(){if(V_)return H_;V_=1;var e=H_&&H_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(H_,"__esModule",{value:!0}),H_.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(B_)return $_;B_=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,l=/^\s+|\s+$/g,s="";function c(e){return e?e.replace(l,s):s}return $_=function(l,u){if("string"!=typeof l)throw new TypeError("First argument must be a string");if(!l)return[];u=u||{};var d=1,f=1;function p(e){var n=e.match(t);n&&(d+=n.length);var r=e.lastIndexOf("\n");f=~r?e.length-r:f+e.length}function h(){var e={line:d,column:f};return function(t){return t.position=new m(e),v(),t}}function m(e){this.start=e,this.end={line:d,column:f},this.source=u.source}function g(e){var t=new Error(u.source+":"+d+":"+f+": "+e);if(t.reason=e,t.filename=u.source,t.line=d,t.column=f,t.source=l,!u.silent)throw t}function y(e){var t=e.exec(l);if(t){var n=t[0];return p(n),l=l.slice(n.length),t}}function v(){y(n)}function b(e){var t;for(e=e||[];t=w();)!1!==t&&e.push(t);return e}function w(){var e=h();if("/"==l.charAt(0)&&"*"==l.charAt(1)){for(var t=2;s!=l.charAt(t)&&("*"!=l.charAt(t)||"/"!=l.charAt(t+1));)++t;if(t+=2,s===l.charAt(t-1))return g("End of comment missing");var n=l.slice(2,t-2);return f+=2,p(n),l=l.slice(t),f+=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 l=y(i),u=t({type:"declaration",property:c(n[0].replace(e,s)),value:l?c(l[0].replace(e,s)):s});return y(a),u}}return m.prototype.content=l,v(),function(){var e,t=[];for(b(t);e=x();)!1!==e&&(t.push(e),b(t));return t}()},$_}());return H_}(),W_=t(U_),q_=W_.default||W_;const K_=Y_("end"),X_=Y_("start");function Y_(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 G_(e){return e&&"object"==typeof e?"position"in e||"type"in e?Z_(e.position):"start"in e||"end"in e?Z_(e):"line"in e||"column"in e?Q_(e):"":""}function Q_(e){return J_(e&&e.line)+":"+J_(e&&e.column)}function Z_(e){return Q_(e&&e.start)+"-"+Q_(e&&e.end)}function J_(e){return e&&"number"==typeof e?e:1}class eC 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=G_(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}}eC.prototype.file="",eC.prototype.name="",eC.prototype.reason="",eC.prototype.message="",eC.prototype.stack="",eC.prototype.column=void 0,eC.prototype.line=void 0,eC.prototype.ancestors=void 0,eC.prototype.cause=void 0,eC.prototype.fatal=void 0,eC.prototype.place=void 0,eC.prototype.ruleId=void 0,eC.prototype.source=void 0;const tC={}.hasOwnProperty,nC=new Map,rC=/[A-Z]/g,oC=/-([a-z])/g,iC=new Set(["table","tbody","thead","tfoot","tr"]),aC=new Set(["td","th"]),lC="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function sC(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),l=X_(n);return t(r,o,i,a,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.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?j_:F_,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},i=cC(o,e,void 0);return i&&"string"!=typeof i?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function cC(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=j_,e.schema=o);e.ancestors.push(t);const i=hC(e,t.tagName,!1),a=function(e,t){const n={};let r,o;for(o in t.properties)if("children"!==o&&tC.call(t.properties,o)){const i=pC(e,o,t.properties[o]);if(i){const[o,a]=i;e.tableCellAlignToStyle&&"align"===o&&"string"==typeof a&&aC.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 l=fC(e,t);iC.has(t.tagName)&&(l=l.filter((function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&o_(t.value):o_(t));var t})));return uC(e,a,i,t),dC(a,l),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)}mC(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=j_,e.schema=o);e.ancestors.push(t);const i=null===t.name?e.Fragment:hC(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 mC(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 mC(e,t.position);else i=null===r.value||r.value;n[o]=i}return n}(e,t),l=fC(e,t);return uC(e,a,i,t),dC(a,l),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);mC(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return dC(r,fC(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 uC(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function dC(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function fC(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:nC;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 l=cC(e,i,a);void 0!==l&&n.push(l)}return n}function pC(e,t,n){const r=function(e,t){const n=l_(t);let r=t,o=s_;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&T_.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(A_,L_);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!A_.test(e)){let n=e.replace(D_,I_);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=w_}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{q_(t,r)}catch(t){if(!e.ignoreInvalidStyle){const n=t,r=new eC("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=lC+"#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(oC,yC)),n[r]=t}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)tC.call(e,n)&&(t[gC(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?z_[r.property]||r.property:r.attribute,n]}}function hC(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,o=-1;for(;++o<e.length;){const t=n_(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=n_(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 tC.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);mC(e)}function mC(e,t){const n=new eC("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=lC+"#cannot-handle-mdx-estrees-without-createevaluater",n}function gC(e){let t=e.replace(rC,vC);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function yC(e,t){return t.toUpperCase()}function vC(e){return"-"+e.toLowerCase()}const bC={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"]},wC={};function xC(e,t){return kC(e,"boolean"!=typeof wC.includeImageAlt||wC.includeImageAlt,"boolean"!=typeof wC.includeHtml||wC.includeHtml)}function kC(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 SC(e.children,t,n)}return Array.isArray(e)?SC(e,t,n):""}function SC(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=kC(e[o],t,n);return r.join("")}const EC=document.createElement("i");function _C(e){const t="&"+e+";";EC.innerHTML=t;const n=EC.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}function CC(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 OC(e,t){return e.length>0?(CC(e,e.length,0,t),e):t}const NC={}.hasOwnProperty;function PC(e){const t={};let n=-1;for(;++n<e.length;)RC(t,e[n]);return t}function RC(e,t){let n;for(n in t){const r=(NC.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){NC.call(r,i)||(r[i]=[]);const e=o[i];MC(r[i],Array.isArray(e)?e:e?[e]:[])}}}function MC(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);CC(e,0,0,r)}function TC(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 AC(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const DC=qC(/[A-Za-z]/),IC=qC(/[\dA-Za-z]/),LC=qC(/[#-'*+\--9=?A-Z^-~]/);function zC(e){return null!==e&&(e<32||127===e)}const FC=qC(/\d/),jC=qC(/[\dA-Fa-f]/),$C=qC(/[!-/:-@[-`{-~]/);function BC(e){return null!==e&&e<-2}function VC(e){return null!==e&&(e<0||32===e)}function HC(e){return-2===e||-1===e||32===e}const UC=qC(/\p{P}|\p{S}/u),WC=qC(/\s/);function qC(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function KC(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let a="";if(37===i&&IC(e.charCodeAt(n+1))&&IC(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 XC(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return function(r){if(HC(r))return e.enter(n),a(r);return t(r)};function a(r){return HC(r)&&i++<o?(e.consume(r),a):(e.exit(n),t(r))}}const YC={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"),XC(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)):BC(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),o)}}};const GC={tokenize:function(e){const t=this,n=[];let r,o,i,a=0;return l;function l(r){if(a<n.length){const o=n[a];return t.containerState=o[1],e.attempt(o[0].continuation,s,c)(r)}return c(r)}function s(e){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&v();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 l=n;for(;l<t.events.length;)t.events[l][1].end={...o},l++;return CC(t.events,i+1,0,t.events.slice(n)),t.events.length=l,c(e)}return l(e)}function c(o){if(a===n.length){if(!r)return f(o);if(r.currentConstruct&&r.currentConstruct.concrete)return h(o);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(QC,u,d)(o)}function u(e){return r&&v(),y(a),f(e)}function d(e){return t.parser.lazy[t.now().line]=a!==n.length,i=t.now().offset,h(e)}function f(n){return t.containerState={},e.attempt(QC,p,h)(n)}function p(e){return a++,n.push([t.currentConstruct,t.containerState]),f(e)}function h(n){return null===n?(r&&v(),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)):BC(n)?(e.consume(n),g(e.exit("chunkFlow")),a=0,t.interrupt=void 0,l):(e.consume(n),m)}function g(e,n){const l=t.sliceStream(e);if(n&&l.push(null),e.previous=o,o&&(o.next=e),o=e,r.defineSkip(e.start),r.write(l),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,l,s=n;for(;s--;)if("exit"===t.events[s][0]&&"chunkFlow"===t.events[s][1].type){if(o){l=t.events[s][1].end;break}o=!0}for(y(a),e=n;e<t.events.length;)t.events[e][1].end={...l},e++;CC(t.events,s+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 v(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}},QC={tokenize:function(e,t,n){return XC(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function ZC(e){return null===e||VC(e)||WC(e)?1:UC(e)?2:void 0}function JC(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 eO={name:"attention",resolveAll:function(e,t){let n,r,o,i,a,l,s,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;l=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},f={...e[u][1].start};tO(d,-l),tO(f,l),i={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},a={type:l>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:f},o={type:l>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:l>1?"strong":"emphasis",start:{...i.start},end:{...a.end}},e[n][1].end={...i.start},e[u][1].start={...a.end},s=[],e[n][1].end.offset-e[n][1].start.offset&&(s=OC(s,[["enter",e[n][1],t],["exit",e[n][1],t]])),s=OC(s,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",o,t]]),s=OC(s,JC(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),s=OC(s,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,s=OC(s,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,CC(e,n-1,u-n+3,s),u=n+s.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=ZC(r);let i;return function(t){return i=t,e.enter("attentionSequence"),a(t)};function a(l){if(l===i)return e.consume(l),a;const s=e.exit("attentionSequence"),c=ZC(l),u=!c||2===c&&o||n.includes(l),d=!o||2===o&&c||n.includes(r);return s._open=Boolean(42===i?u:u&&(o||!d)),s._close=Boolean(42===i?d:d&&(c||!u)),t(l)}}};function tO(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const nO={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 DC(t)?(e.consume(t),i):64===t?n(t):s(t)}function i(e){return 43===e||45===e||46===e||IC(e)?(r=1,a(e)):s(e)}function a(t){return 58===t?(e.consume(t),r=0,l):(43===t||45===t||46===t||IC(t))&&r++<32?(e.consume(t),a):(r=0,s(t))}function l(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||zC(r)?n(r):(e.consume(r),l)}function s(t){return 64===t?(e.consume(t),c):LC(t)?(e.consume(t),s):n(t)}function c(e){return IC(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||IC(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}};const rO={partial:!0,tokenize:function(e,t,n){return function(t){return HC(t)?XC(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||BC(e)?t(e):n(e)}}};const oO={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(HC(t))return XC(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return o(t)};function o(r){return e.attempt(oO,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 HC(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const iO={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 $C(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const aO={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"),l};function l(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),o=31,i=IC,c(t))}function s(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,i=jC,c):(e.enter("characterReferenceValue"),o=7,i=FC,c(t))}function c(l){if(59===l&&a){const o=e.exit("characterReferenceValue");return i!==IC||_C(r.sliceSerialize(o))?(e.enter("characterReferenceMarker"),e.consume(l),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(l)}return i(l)&&a++<o?(e.consume(l),c):n(l)}}};const lO={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)}}},sO={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"),s}function s(t){return e.enter("codeFencedFence"),HC(t)?XC(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>=l?(e.exit("codeFencedFenceSequence"),HC(t)?XC(e,d,"whitespace")(t):d(t)):n(t)}function d(r){return null===r||BC(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let i,a=0,l=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"),s(t)}(t)};function s(t){return t===i?(l++,e.consume(t),s):l<3?n(t):(e.exit("codeFencedFenceSequence"),HC(t)?XC(e,c,"whitespace")(t):c(t))}function c(n){return null===n||BC(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(lO,p,v)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||BC(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):HC(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),XC(e,d,"whitespace")(t)):96===t&&t===i?n(t):(e.consume(t),u)}function d(t){return null===t||BC(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),f(t))}function f(t){return null===t||BC(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===i?n(t):(e.consume(t),f)}function p(t){return e.attempt(o,v,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return a>0&&HC(t)?XC(e,g,"linePrefix",a+1)(t):g(t)}function g(t){return null===t||BC(t)?e.check(lO,p,v)(t):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||BC(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),y)}function v(n){return e.exit("codeFenced"),t(n)}}};const cO={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),XC(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?l(t):BC(t)?e.attempt(uO,i,l)(t):(e.enter("codeFlowValue"),a(t))}function a(t){return null===t||BC(t)?(e.exit("codeFlowValue"),i(t)):(e.consume(t),a)}function l(n){return e.exit("codeIndented"),t(n)}}},uO={partial:!0,tokenize:function(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):BC(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):XC(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):BC(e)?o(e):n(e)}}};const dO={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"),l(t))}function l(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),l):96===t?(o=e.enter("codeTextSequence"),r=0,c(t)):BC(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l):(e.enter("codeTextData"),s(t))}function s(t){return null===t||32===t||96===t||BC(t)?(e.exit("codeTextData"),l(t)):(e.consume(t),s)}function c(n){return 96===n?(e.consume(n),r++,c):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(o.type="codeTextData",s(n))}}};class fO{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&&pO(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),pO(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),pO(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);pO(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);pO(this.left,t.reverse())}}}function pO(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 hO(e){const t={};let n,r,o,i,a,l,s,c=-1;const u=new fO(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&&(l=n[1]._tokenizer.events,o=0,o<l.length&&"lineEndingBlank"===l[o][1].type&&(o+=2),o<l.length&&"content"===l[o][1].type))for(;++o<l.length&&"content"!==l[o][1].type;)"chunkText"===l[o][1].type&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,mO(u,c)),c=t[c],s=!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 CC(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!s}function mO(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),l=a.events,s=[],c={};let u,d,f=-1,p=n,h=0,m=0;const g=[m];for(;p;){for(;e.get(++o)[1]!==p;);i.push(o),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<l.length;)"exit"===l[f][0]&&"enter"===l[f-1][0]&&l[f][1].type===l[f-1][1].type&&l[f][1].start.line!==l[f][1].end.line&&(m=f+1,g.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){const t=l.slice(g[f],g[f+1]),n=i.pop();s.push([n,n+t.length-1]),e.splice(n,2,t)}for(s.reverse(),f=-1;++f<s.length;)c[h+s[f][0]]=h+s[f][1],h+=s[f][1]-s[f][0]-1;return c}const gO={resolve:function(e){return hO(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):BC(t)?e.check(yO,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}}},yO={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"),XC(e,o,"linePrefix")};function o(o){if(null===o||BC(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 vO(e,t,n,r,o,i,a,l,s){const c=s||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||zC(t))return n(t);return e.enter(r),e.enter(a),e.enter(l),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(l),e.enter("chunkString",{contentType:"string"}),f(n))}function f(t){return 62===t?(e.exit("chunkString"),e.exit(l),d(t)):null===t||60===t||BC(t)?n(t):(e.consume(t),92===t?p:f)}function p(t){return 60===t||62===t||92===t?(e.consume(t),f):f(t)}function h(o){return u||null!==o&&41!==o&&!VC(o)?u<c&&40===o?(e.consume(o),u++,h):41===o?(e.consume(o),u--,h):null===o||32===o||40===o||zC(o)?n(o):(e.consume(o),92===o?m:h):(e.exit("chunkString"),e.exit(l),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 bO(e,t,n,r,o,i){const a=this;let l,s=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 s>999||null===d||91===d||93===d&&!l||94===d&&!s&&"_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):BC(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||BC(t)||s++>999?(e.exit("chunkString"),c(t)):(e.consume(t),l||(l=!HC(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),s++,u):u(t)}}function wO(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,l;return n(t)};function l(n){return n===a?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(i),s(n))}function s(t){return t===a?(e.exit(i),l(a)):null===t?n(t):BC(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),XC(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===a||null===t||BC(t)?(e.exit("chunkString"),s(t)):(e.consume(t),92===t?u:c)}function u(t){return t===a||92===t?(e.consume(t),c):c(t)}}function xO(e,t){let n;return function r(o){if(BC(o))return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r;if(HC(o))return XC(e,r,n?"linePrefix":"lineSuffix")(o);return t(o)}}const kO={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(t){return e.enter("definition"),function(t){return bO.call(r,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function i(t){return o=AC(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 VC(t)?xO(e,l)(t):l(t)}function l(t){return vO(e,s,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function s(t){return e.attempt(SO,c,c)(t)}function c(t){return HC(t)?XC(e,u,"whitespace")(t):u(t)}function u(i){return null===i||BC(i)?(e.exit("definition"),r.parser.defined.push(o),t(i)):n(i)}}},SO={partial:!0,tokenize:function(e,t,n){return function(t){return VC(t)?xO(e,r)(t):n(t)};function r(t){return wO(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return HC(t)?XC(e,i,"whitespace")(t):i(t)}function i(e){return null===e||BC(e)?t(e):n(e)}}};const EO={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return BC(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const _O={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"},CC(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||VC(t)?(e.exit("atxHeadingSequence"),i(t)):n(t)}function i(n){return 35===n?(e.enter("atxHeadingSequence"),a(n)):null===n||BC(n)?(e.exit("atxHeading"),t(n)):HC(n)?XC(e,i,"whitespace")(n):(e.enter("atxHeadingText"),l(n))}function a(t){return 35===t?(e.consume(t),a):(e.exit("atxHeadingSequence"),i(t))}function l(t){return null===t||35===t||VC(t)?(e.exit("atxHeadingText"),i(t)):(e.consume(t),l)}}};const CO=["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"],OO=["pre","script","style","textarea"],NO={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,l,s;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(l){return 33===l?(e.consume(l),u):47===l?(e.consume(l),i=!0,p):63===l?(e.consume(l),o=3,r.interrupt?t:D):DC(l)?(e.consume(l),a=String.fromCharCode(l),h):n(l)}function u(i){return 45===i?(e.consume(i),o=2,d):91===i?(e.consume(i),o=5,l=0,f):DC(i)?(e.consume(i),o=4,r.interrupt?t:D):n(i)}function d(o){return 45===o?(e.consume(o),r.interrupt?t:D):n(o)}function f(o){const i="CDATA[";return o===i.charCodeAt(l++)?(e.consume(o),6===l?r.interrupt?t:C:f):n(o)}function p(t){return DC(t)?(e.consume(t),a=String.fromCharCode(t),h):n(t)}function h(l){if(null===l||47===l||62===l||VC(l)){const s=47===l,c=a.toLowerCase();return s||i||!OO.includes(c)?CO.includes(a.toLowerCase())?(o=6,s?(e.consume(l),m):r.interrupt?t(l):C(l)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(l):i?g(l):y(l)):(o=1,r.interrupt?t(l):C(l))}return 45===l||IC(l)?(e.consume(l),a+=String.fromCharCode(l),h):n(l)}function m(o){return 62===o?(e.consume(o),r.interrupt?t:C):n(o)}function g(t){return HC(t)?(e.consume(t),g):E(t)}function y(t){return 47===t?(e.consume(t),E):58===t||95===t||DC(t)?(e.consume(t),v):HC(t)?(e.consume(t),y):E(t)}function v(t){return 45===t||46===t||58===t||95===t||IC(t)?(e.consume(t),v):b(t)}function b(t){return 61===t?(e.consume(t),w):HC(t)?(e.consume(t),b):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),s=t,x):HC(t)?(e.consume(t),w):k(t)}function x(t){return t===s?(e.consume(t),s=null,S):null===t||BC(t)?n(t):(e.consume(t),x)}function k(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||VC(t)?b(t):(e.consume(t),k)}function S(e){return 47===e||62===e||HC(e)?y(e):n(e)}function E(t){return 62===t?(e.consume(t),_):n(t)}function _(t){return null===t||BC(t)?C(t):HC(t)?(e.consume(t),_):n(t)}function C(t){return 45===t&&2===o?(e.consume(t),R):60===t&&1===o?(e.consume(t),M):62===t&&4===o?(e.consume(t),I):63===t&&3===o?(e.consume(t),D):93===t&&5===o?(e.consume(t),A):!BC(t)||6!==o&&7!==o?null===t||BC(t)?(e.exit("htmlFlowData"),O(t)):(e.consume(t),C):(e.exit("htmlFlowData"),e.check(PO,L,O)(t))}function O(t){return e.check(RO,N,L)(t)}function N(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),P}function P(t){return null===t||BC(t)?O(t):(e.enter("htmlFlowData"),C(t))}function R(t){return 45===t?(e.consume(t),D):C(t)}function M(t){return 47===t?(e.consume(t),a="",T):C(t)}function T(t){if(62===t){const n=a.toLowerCase();return OO.includes(n)?(e.consume(t),I):C(t)}return DC(t)&&a.length<8?(e.consume(t),a+=String.fromCharCode(t),T):C(t)}function A(t){return 93===t?(e.consume(t),D):C(t)}function D(t){return 62===t?(e.consume(t),I):45===t&&2===o?(e.consume(t),D):C(t)}function I(t){return null===t||BC(t)?(e.exit("htmlFlowData"),L(t)):(e.consume(t),I)}function L(n){return e.exit("htmlFlow"),t(n)}}},PO={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(rO,t,n)}}},RO={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(BC(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 MO={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),l};function l(t){return 33===t?(e.consume(t),s):47===t?(e.consume(t),w):63===t?(e.consume(t),v):DC(t)?(e.consume(t),S):n(t)}function s(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),i=0,p):DC(t)?(e.consume(t),y):n(t)}function c(t){return 45===t?(e.consume(t),f):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):BC(t)?(a=u,T(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),f):u(t)}function f(e){return 62===e?M(e):45===e?d(e):u(e)}function p(t){const r="CDATA[";return t===r.charCodeAt(i++)?(e.consume(t),6===i?h:p):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),m):BC(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?M(t):93===t?(e.consume(t),g):h(t)}function y(t){return null===t||62===t?M(t):BC(t)?(a=y,T(t)):(e.consume(t),y)}function v(t){return null===t?n(t):63===t?(e.consume(t),b):BC(t)?(a=v,T(t)):(e.consume(t),v)}function b(e){return 62===e?M(e):v(e)}function w(t){return DC(t)?(e.consume(t),x):n(t)}function x(t){return 45===t||IC(t)?(e.consume(t),x):k(t)}function k(t){return BC(t)?(a=k,T(t)):HC(t)?(e.consume(t),k):M(t)}function S(t){return 45===t||IC(t)?(e.consume(t),S):47===t||62===t||VC(t)?E(t):n(t)}function E(t){return 47===t?(e.consume(t),M):58===t||95===t||DC(t)?(e.consume(t),_):BC(t)?(a=E,T(t)):HC(t)?(e.consume(t),E):M(t)}function _(t){return 45===t||46===t||58===t||95===t||IC(t)?(e.consume(t),_):C(t)}function C(t){return 61===t?(e.consume(t),O):BC(t)?(a=C,T(t)):HC(t)?(e.consume(t),C):E(t)}function O(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,N):BC(t)?(a=O,T(t)):HC(t)?(e.consume(t),O):(e.consume(t),P)}function N(t){return t===o?(e.consume(t),o=void 0,R):null===t?n(t):BC(t)?(a=N,T(t)):(e.consume(t),N)}function P(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||VC(t)?E(t):(e.consume(t),P)}function R(e){return 47===e||62===e||VC(e)?E(e):n(e)}function M(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"),A}function A(t){return HC(t)?XC(e,D,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):D(t)}function D(t){return e.enter("htmlTextData"),a(t)}}};const TO={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&&CC(e,0,e.length,n);return e},resolveTo:function(e,t){let n,r,o,i,a=e.length,l=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)){l=2;break}}else"labelEnd"===n.type&&(o=a);const s={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+l+2][1].end},end:{...e[o-2][1].start}};return i=[["enter",s,t],["enter",c,t]],i=OC(i,e.slice(r+1,r+l+3)),i=OC(i,[["enter",u,t]]),i=OC(i,JC(t.parser.constructs.insideSpan.null,e.slice(r+l+4,o-3),t)),i=OC(i,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),i=OC(i,e.slice(o+1)),i=OC(i,[["exit",s,t]]),CC(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(AC(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),l};function l(t){return 40===t?e.attempt(AO,c,i?c:u)(t):91===t?e.attempt(DO,c,i?s:u)(t):i?c(t):u(t)}function s(t){return e.attempt(IO,c,u)(t)}function c(e){return t(e)}function u(e){return o._balanced=!0,n(e)}}},AO={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 VC(t)?xO(e,o)(t):o(t)}function o(t){return 41===t?c(t):vO(e,i,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return VC(t)?xO(e,l)(t):c(t)}function a(e){return n(e)}function l(t){return 34===t||39===t||40===t?wO(e,s,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function s(t){return VC(t)?xO(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)}}},DO={tokenize:function(e,t,n){const r=this;return function(t){return bO.call(r,e,o,i,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(AC(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function i(e){return n(e)}}},IO={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 LO={name:"labelStartImage",resolveAll:TO.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 zO={name:"labelStartLink",resolveAll:TO.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 FO={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),XC(e,t,"linePrefix")}}};const jO={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||BC(i))?(e.exit("thematicBreak"),t(i)):n(i)}function a(t){return t===r?(e.consume(t),o++,a):(e.exit("thematicBreakSequence"),HC(t)?XC(e,i,"whitespace")(t):i(t))}}};const $O={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(rO,o,i);function o(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,XC(e,t,"listItemIndent",r.containerState.size+1)(n)}function i(n){return r.containerState.furtherBlankLines||!HC(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(VO,t,a)(n))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,XC(e,e.attempt($O,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:FC(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(jO,n,s)(t):s(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(t)}return n(t)};function l(t){return FC(t)&&++a<10?(e.consume(t),l):(!r.interrupt||a<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),s(t)):n(t)}function s(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(rO,r.interrupt?n:c,e.attempt(BO,d,u))}function c(e){return r.containerState.initialBlankLine=!0,i++,d(e)}function u(t){return HC(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)}}},BO={partial:!0,tokenize:function(e,t,n){const r=this;return XC(e,(function(e){const o=r.events[r.events.length-1];return!HC(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)}),"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},VO={partial:!0,tokenize:function(e,t,n){const r=this;return XC(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 HO={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,l=r.events.length;for(;l--;)if("lineEnding"!==r.events[l][1].type&&"linePrefix"!==r.events[l][1].type&&"content"!==r.events[l][1].type){a="paragraph"===r.events[l][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"),HC(t)?XC(e,a,"lineSuffix")(t):a(t))}function a(r){return null===r||BC(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const UO={tokenize:function(e){const t=this,n=e.attempt(rO,(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,XC(e,e.attempt(this.parser.constructs.flow,r,e.attempt(gO,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 WO={resolveAll:YO()},qO=XO("string"),KO=XO("text");function XO(e){return{resolveAll:YO("text"===e?GO: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 s(e)?o(e):a(e)}function a(e){if(null!==e)return t.enter("data"),t.consume(e),l;t.consume(e)}function l(e){return s(e)?(t.exit("data"),o(e)):(t.consume(e),l)}function s(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 YO(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 GO(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,l=-1,s=0;for(;a--;){const e=o[a];if("string"==typeof e){for(l=e.length;32===e.charCodeAt(l-1);)s++,l--;if(l)break;l=-1}else if(-2===e)i=!0,s++;else if(-1!==e){a++;break}}if(s){const o={type:n===e.length||i||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?l:r.start._bufferIndex+l,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},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 QO={42:$O,43:$O,45:$O,48:$O,49:$O,50:$O,51:$O,52:$O,53:$O,54:$O,55:$O,56:$O,57:$O,62:oO},ZO={91:kO},JO={[-2]:cO,[-1]:cO,32:cO},eN={35:_O,42:jO,45:[HO,jO],60:NO,61:HO,95:jO,96:sO,126:sO},tN={38:aO,92:iO},nN={[-5]:FO,[-4]:FO,[-3]:FO,33:LO,38:aO,42:eO,60:[nO,MO],91:zO,92:[EO,iO],93:TO,95:eO,96:dO},rN={null:[eO,WO]};var oN=Object.freeze({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:ZO,disable:{null:[]},document:QO,flow:eN,flowInitial:JO,insideSpan:rN,string:tN,text:nN});function iN(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=[],l=[];const s={attempt:g((function(e,t){y(e,t.from)})),check:g(m),consume:function(e){BC(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,v()):-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=f(),c.events.push(["enter",n,c]),l.push(n),n},exit:function(e){const t=l.pop();return t.end=f(),c.events.push(["exit",t,c]),t},interrupt:g(m,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){o[e.line]=e.column,v()},events:[],now:f,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=OC(a,e),p(),null!==a[a.length-1])return[];return y(t,0),c.events=JC(i,c.events,c),c.events}};let u=t.tokenize.call(c,s);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 f(){const{_bufferIndex:e,_index:t,line:n,column:o,offset:i}=r;return{_bufferIndex:e,_index:t,line:n,column:o,offset:i}}function p(){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,p;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){p=function(){const e=f(),t=c.previous,n=c.currentConstruct,o=c.events.length,i=Array.from(l);return{from:o,restore:a};function a(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=o,l=i,v()}}(),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,s,g,y)(n)}}function g(t){return e(d,p),o}function y(e){return p.restore(),++u<a.length?m(a[u]):i}}}function y(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&CC(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function v(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const aN=/[\0\t\n\r]/g;const lN=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function sN(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return TC(n.slice(t?2:1),t?16:10)}return _C(n)||e}const cN={}.hasOwnProperty;function uN(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:_,autolinkEmail:_,atxHeading:i(Q),blockQuote:i(q),characterEscape:_,characterReference:_,codeFenced:i(K),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(K,a),codeText:i(X,a),codeTextData:_,data:_,codeFlowValue:_,definition:i(Y),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(G),hardBreakEscape:i(Z),hardBreakTrailing:i(Z),htmlFlow:i(J,a),htmlFlowData:_,htmlText:i(J,a),htmlTextData:_,image:i(ee),label:a,link:i(te),listItem:i(re),listItemValue:f,listOrdered:i(ne,d),listUnordered:i(ne),paragraph:i(oe),reference:j,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(Q),strong:i(ie),thematicBreak:i(le)},exit:{atxHeading:s(),atxHeadingSequence:x,autolink:s(),autolinkEmail:W,autolinkProtocol:U,blockQuote:s(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:B,characterReferenceMarkerNumeric:B,characterReferenceValue:V,characterReference:H,codeFenced:s(g),codeFencedFence:m,codeFencedFenceInfo:p,codeFencedFenceMeta:h,codeFlowValue:C,codeIndented:s(y),codeText:s(M),codeTextData:C,data:C,definition:s(),definitionDestinationString:w,definitionLabelString:v,definitionTitleString:b,emphasis:s(),hardBreakEscape:s(N),hardBreakTrailing:s(N),htmlFlow:s(P),htmlFlowData:C,htmlText:s(R),htmlTextData:C,image:s(A),label:I,labelText:D,lineEnding:O,link:s(T),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:$,resourceDestinationString:L,resourceTitleString:z,resource:F,setextHeading:s(E),setextHeadingLineSequence:S,setextHeadingText:k,strong:s(),thematicBreak:s()}};fN(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const i={stack:[r],tokenStack:[],config:t,enter:l,exit:c,buffer:a,resume:u,data:n},s=[];let d=-1;for(;++d<e.length;)if("listOrdered"===e[d][1].type||"listUnordered"===e[d][1].type)if("enter"===e[d][0])s.push(d);else{d=o(e,s.pop(),d)}for(d=-1;++d<e.length;){const n=t[e[d][0]];cN.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]||hN).call(i,void 0,e[0])}for(r.position={start:dN(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:dN(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,l=t-1,s=-1,c=!1;for(;++l<=n;){const t=e[l];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?s++:s--,a=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||a||s||i||(i=l),a=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:a=void 0}if(!s&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===s&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let a=l;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||l,0,["exit",r,t[2]]),l++,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(l,0,["enter",o,t[2]]),l++,n++,i=void 0,a=!0}}}return e[t][1]._spread=c,n}function i(e,t){return n;function n(n){l.call(this,e(n),n),t&&t.call(this,n)}}function a(){this.stack.push({type:"fragment",children:[]})}function l(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:dN(t.start),end:void 0}}function s(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+"` ("+G_({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]||hN).call(this,e,r[0])}n.position.end=dN(e.end)}function u(){return xC(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){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 v(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=AC(this.sliceSerialize(e)).toLowerCase()}function b(){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 k(){this.data.setextHeadingSlurpLineEnding=!0}function S(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function E(){this.data.setextHeadingSlurpLineEnding=void 0}function _(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:dN(e.start),end:void 0},t.push(n)),this.stack.push(n)}function C(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=dN(e.end)}function O(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=dN(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(_.call(this,e),C.call(this,e))}function N(){this.data.atHardBreak=!0}function P(){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 M(){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 A(){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 D(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(lN,sN)}(t),n.identifier=AC(t).toLowerCase()}function I(){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 L(){const e=this.resume();this.stack[this.stack.length-1].url=e}function z(){const e=this.resume();this.stack[this.stack.length-1].title=e}function F(){this.data.inReference=void 0}function j(){this.data.referenceType="collapsed"}function $(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=AC(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function B(e){this.data.characterReferenceType=e.type}function V(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;if(n)r=TC(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=_C(t)}this.stack[this.stack.length-1].value+=r}function H(e){this.stack.pop().position.end=dN(e.end)}function U(e){C.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function W(e){C.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function q(){return{type:"blockquote",children:[]}}function K(){return{type:"code",lang:null,meta:null,value:""}}function X(){return{type:"inlineCode",value:""}}function Y(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function G(){return{type:"emphasis",children:[]}}function Q(){return{type:"heading",depth:0,children:[]}}function Z(){return{type:"break"}}function J(){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 le(){return{type:"thematicBreak"}}}(n)(function(e){for(;!hO(e););return e}(function(e){const t={constructs:PC([oN,...(e||{}).extensions||[]]),content:n(YC),defined:[],document:n(GC),flow:n(UO),lazy:{},string:n(qO),text:n(KO)};return t;function n(e){return function(n){return iN(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(o,i,a){const l=[];let s,c,u,d,f;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(aN.lastIndex=u,s=aN.exec(o),d=s&&void 0!==s.index?s.index:o.length,f=o.charCodeAt(d),!s){n=o.slice(u);break}if(10===f&&u===d&&e)l.push(-3),e=void 0;else switch(e&&(l.push(-5),e=void 0),u<d&&(l.push(o.slice(u,d)),t+=d-u),f){case 0:l.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),l.push(-2);t++<c;)l.push(-1);break;case 10:l.push(-4),t=1;break;default:e=!0,t=1}u=d+1}return a&&(e&&l.push(-5),n&&l.push(n),l.push(null)),l}}()(e,t,!0))))}function dN(e){return{line:e.line,column:e.column,offset:e.offset}}function fN(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?fN(e,r):pN(e,r)}}function pN(e,t){let n;for(n in t)if(cN.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 hN(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+G_({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+G_({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+G_({start:t.start,end:t.end})+") is still open")}function mN(e){const t=this;t.parser=function(n){return uN(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function gN(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 yN(e){const t=e.spread;return null==t?e.children.length>1:t}function vN(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(bN(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(bN(t.slice(o),o>0,!1)),i.join("")}function bN(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 wN={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=KC(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let a,l=e.footnoteCounts.get(r);void 0===l?(l=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=i+1,l+=1,e.footnoteCounts.set(r,l);const s={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,s);const c={type:"element",tagName:"sup",properties:{},children:[s]};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 gN(e,t);const o={src:KC(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:KC(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 gN(e,t);const o={href:KC(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:KC(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=yN(n[r])}return t}(n):yN(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 l=-1;for(;++l<r.length;){const e=r[l];(o||0!==l||"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 s=r[r.length-1];s&&(o||"element"!==s.type||"p"!==s.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=X_(t.children[1]),a=K_(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 l=-1;const s=[];for(;++l<a;){const n=t.children[l],r={},a=i?i[l]: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)),s.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(s,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:vN(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:xN,yaml:xN,definition:xN,footnoteDefinition:xN};function xN(){}const kN="object"==typeof self?self:globalThis,SN=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 kN[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 kN[i](a),o)};return r})(new Map,e)(0),EN="",{toString:_N}={},{keys:CN}=Object,ON=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=_N.call(e).slice(8,-1);switch(n){case"Array":return[1,EN];case"Object":return[2,EN];case"Date":return[3,EN];case"RegExp":return[4,EN];case"Map":return[5,EN];case"Set":return[6,EN];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},NN=([e,t])=>0===e&&("function"===t||"symbol"===t),PN=(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,l]=ON(r);switch(a){case 0:{let t=r;switch(l){case"bigint":a=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);t=null;break;case"undefined":return o([-1],r)}return o([a,t],r)}case 1:{if(l){let e=r;return"DataView"===l?e=new Uint8Array(r.buffer):"ArrayBuffer"===l&&(e=new Uint8Array(r)),o([l,[...e]],r)}const e=[],t=o([a,e],r);for(const t of r)e.push(i(t));return t}case 2:{if(l)switch(l){case"BigInt":return o([l,r.toString()],r);case"Boolean":case"Number":case"String":return o([l,r.valueOf()],r)}if(t&&"toJSON"in r)return i(r.toJSON());const n=[],s=o([a,n],r);for(const t of CN(r))!e&&NN(ON(r[t]))||n.push([i(t),i(r[t])]);return s}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||!NN(ON(n))&&!NN(ON(o)))&&t.push([i(n),i(o)]);return n}case 6:{const t=[],n=o([a,t],r);for(const n of r)!e&&NN(ON(n))||t.push(i(n));return n}}const{message:s}=r;return o([a,{name:l,message:s}],r)};return i})(!(t||n),!!t,new Map,r)(e),r};var RN="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?SN(PN(e,t)):structuredClone(e):(e,t)=>SN(PN(e,t));function MN(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 TN(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const AN=function(e){if(null==e)return IN;if("function"==typeof e)return DN(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=AN(e[n]);return DN(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 DN(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 DN(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function DN(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 IN(){return!0}const LN=[],zN=!0,FN=!1;function jN(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;const i=AN(o),a=r?-1:1;!function e(o,l,s){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,f=LN;if((!t||i(o,l,s[s.length-1]||void 0))&&(f=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[zN,e];return null==e?LN:[e]}(n(o,s)),f[0]===FN))return f;if("children"in o&&o.children){const t=o;if(t.children&&"skip"!==f[0])for(u=(r?t.children.length:-1)+a,d=s.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(c=e(n,u,d)(),c[0]===FN)return c;u="number"==typeof c[1]?c[1]:u+a}}return f}}(e,void 0,[])()}function $N(e,t,n,r){let o,i,a;"function"==typeof t?(i=void 0,a=t,o=n):(i=t,a=n,o=r),jN(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 BN={}.hasOwnProperty,VN={};function HN(e,t){e.position&&(t.position=function(e){const t=X_(e),n=K_(e);if(t&&n)return{start:t,end:n}}(e))}function UN(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,RN(o)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function WN(e,t){const n=t.data||{},r=!("value"in t)||BN.call(n,"hProperties")||BN.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 qN(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 KN(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function XN(e,t){const n=function(e,t){const n=t||VN,r=new Map,o=new Map,i=new Map,a={...wN,...n.handlers},l={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const o=l.one(n[r],e);if(o){if(r&&"break"===n[r-1].type&&(Array.isArray(o)||"text"!==o.type||(o.value=KN(o.value)),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=KN(e.value))}Array.isArray(o)?t.push(...o):t.push(o)}}}return t},applyData:UN,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:a,one:function(e,t){const n=e.type,r=l.handlers[n];if(BN.call(l.handlers,n)&&r)return r(l,e,t);if(l.options.passThrough&&l.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=RN(n);return r.children=l.all(e),r}return RN(e)}return(l.options.unknownHandler||WN)(l,e,t)},options:n,patch:HN,wrap:qN};return $N(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)}})),l}(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||MN,r=e.options.footnoteBackLabel||TN,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let s=-1;for(;++s<e.footnoteOrder.length;){const o=e.footnoteById.get(e.footnoteOrder[s]);if(!o)continue;const i=e.all(o),a=String(o.identifier).toUpperCase(),c=KC(a.toLowerCase());let u=0;const d=[],f=e.footnoteCounts.get(a);for(;void 0!==f&&++u<=f;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(s,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(s,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const p=i[i.length-1];if(p&&"element"===p.type&&"p"===p.tagName){const e=p.children[p.children.length-1];e&&"text"===e.type?e.value+=" ":p.children.push({type:"text",value:" "}),p.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),l.push(h)}if(0!==l.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...RN(a),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!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 YN(e,t){return e&&"run"in e?async function(n,r){const o=XN(n,{file:r,...t});await e.run(o,r)}:function(n,r){return XN(n,{file:r,...e||t})}}function GN(e){if(e)throw e}var QN,ZN;var JN=function(){if(ZN)return QN;ZN=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},l=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return QN=function e(){var t,n,r,s,c,u,d=arguments[0],f=1,p=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(null!=(t=arguments[f]))for(n in t)r=l(d,n),d!==(s=l(t,n))&&(h&&s&&(i(s)||(c=o(s)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&i(r)?r:{},a(d,{name:n,newValue:e(h,u,s)})):void 0!==s&&a(d,{name:n,newValue:s}));return d},QN}(),eP=t(JN);function tP(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 nP(){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 l=e[++n];let s=-1;if(i)r(i);else{for(;++s<t.length;)null!==a[s]&&void 0!==a[s]||(a[s]=t[s]);t=a,l?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)}}(l,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 rP={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');oP(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,l=t.length-1;for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else a<0&&(n=!0,a=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(o=i):(l=-1,o=a));r===o?o=a:o<0&&(o=e.length);return e.slice(r,o)},dirname:function(e){if(oP(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){oP(e);let t,n=e.length,r=-1,o=0,i=-1,a=0;for(;n--;){const l=e.codePointAt(n);if(47!==l)r<0&&(t=!0,r=n+1),46===l?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;)oP(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){oP(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,o="",i=0,a=-1,l=0,s=-1;for(;++s<=e.length;){if(s<e.length)n=e.codePointAt(s);else{if(47===n)break;n=47}if(47===n){if(a===s-1||1===l);else if(a!==s-1&&2===l){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=s,l=0;continue}}else if(o.length>0){o="",i=0,a=s,l=0;continue}t&&(o=o.length>0?o+"/..":"..",i=2)}else o.length>0?o+="/"+e.slice(a+1,s):o=e.slice(a+1,s),i=s-a-1;a=s,l=0}else 46===n&&l>-1?l++:l=-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 oP(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const iP={cwd:function(){return"/"}};function aP(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function lP(e){if("string"==typeof e)e=new URL(e);else if(!aP(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 sP=["history","path","basename","stem","extname","dirname"];class cP{constructor(e){let t;t=e?aP(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?"":iP.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<sP.length;){const e=sP[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)sP.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?rP.basename(this.path):void 0}set basename(e){dP(e,"basename"),uP(e,"basename"),this.path=rP.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?rP.dirname(this.path):void 0}set dirname(e){fP(this.basename,"dirname"),this.path=rP.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?rP.extname(this.path):void 0}set extname(e){if(uP(e,"extname"),fP(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=rP.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){aP(e)&&(e=lP(e)),dP(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?rP.basename(this.path,this.extname):void 0}set stem(e){dP(e,"stem"),uP(e,"stem"),this.path=rP.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 eC(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 uP(e,t){if(e&&e.includes(rP.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+rP.sep+"`")}function dP(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function fP(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const pP=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},hP={}.hasOwnProperty;class mP extends pP{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=nP()}copy(){const e=new mP;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(eP(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(bP("data",this.frozen),this.namespace[e]=t,this):hP.call(this.namespace,e)&&this.namespace[e]||void 0:e?(bP("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=kP(e),n=this.parser||this.Parser;return yP("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),yP("process",this.parser||this.Parser),vP("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,o){const i=kP(e),a=n.parse(i);function l(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 l(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,l(e,r)}))}}processSync(e){let t,n=!1;return this.freeze(),yP("processSync",this.parser||this.Parser),vP("processSync",this.compiler||this.Compiler),this.process(e,(function(e,r){n=!0,GN(e),t=r})),xP("processSync","process",n),t}run(e,t,n){wP(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=kP(t);r.run(e,a,(function(t,r,a){const l=r||e;t?i(t):o?o(l):n(void 0,l,a)}))}}runSync(e,t){let n,r=!1;return this.run(e,t,(function(e,t){GN(e),n=t,r=!0})),xP("runSync","run",r),n}stringify(e,t){this.freeze();const n=kP(t),r=this.compiler||this.Compiler;return vP("stringify",r),wP(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(bP("use",this.frozen),null==e);else if("function"==typeof e)l(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)l(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;l(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=eP(!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 l(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];tP(a)&&tP(r)&&(r=eP(!0,a,r)),n[o]=[e,r,...i]}}}}const gP=(new mP).freeze();function yP(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function vP(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function bP(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 wP(e){if(!tP(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function xP(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function kP(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new cP(e)}const SP=[],EP={allowDangerousHtml:!0},_P=/^(https?|ircs?|mailto|xmpp)$/i,CP=[{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 OP(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",o=e.className,i=e.components,a=e.disallowedElements,l=e.rehypePlugins||SP,s=e.remarkPlugins||SP,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...EP}:EP,u=e.skipHtml,d=e.unwrapDisallowed,f=e.urlTransform||NP,p=gP().use(mN).use(s).use(YN,c).use(l),h=new cP;"string"==typeof r&&(h.value=r);for(const t of CP)Object.hasOwn(e,t.from)&&(t.from,t.to&&t.to,t.id);const m=p.parse(h);let g=p.runSync(m,h);return o&&(g={type:"element",tagName:"div",properties:{className:o},children:"root"===g.type?g.children:[g]}),$N(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 bC)if(Object.hasOwn(bC,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=bC[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=f(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}})),sC(g,{Fragment:Bu.Fragment,components:i,ignoreInvalidStyle:!0,jsx:Bu.jsx,jsxs:Bu.jsxs,passKeys:!0,passNode:!0})}function NP(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||_P.test(e.slice(0,t))?e:""}function PP(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 RP(e,t,n){const r=AN((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([MP(e[0]),TP(e[1])])}return t}(t);let i=-1;for(;++i<o.length;)jN(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 l=0;const s=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:(l!==n&&u.push({type:"text",value:e.value.slice(l,n)}),Array.isArray(i)?u.push(...i):i&&u.push(i),l=n+d[0].length,c=!0),!r.window)break;d=r.exec(e.value)}c?(l<e.value.length&&u.push({type:"text",value:e.value.slice(l)}),n.children.splice(s,1,...u)):u=[e];return s+u.length}(e,t)}}function MP(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 TP(e){return"function"==typeof e?e:function(){return e}}const AP="phrasing",DP=["autolink","link","image","label"];function IP(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function LP(e){this.config.enter.autolinkProtocol.call(this,e)}function zP(e){this.config.exit.autolinkProtocol.call(this,e)}function FP(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 jP(e){this.config.exit.autolinkEmail.call(this,e)}function $P(e){this.exit(e)}function BP(e){RP(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,VP],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,HP]],{ignore:["link","linkReference"]})}function VP(e,t,n,r,o){let i="";if(!UP(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=PP(e,"(");let i=PP(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 l={type:"link",title:null,url:i+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[l,{type:"text",value:a[1]}]:l}function HP(e,t,n,r){return!(!UP(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function UP(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||WC(n)||UC(n))&&(!t||47!==n)}function WP(){this.buffer()}function qP(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function KP(){this.buffer()}function XP(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function YP(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=AC(this.sliceSerialize(e)).toLowerCase(),n.label=t}function GP(e){this.exit(e)}function QP(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=AC(this.sliceSerialize(e)).toLowerCase(),n.label=t}function ZP(e){this.exit(e)}function JP(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const a=n.enter("footnoteReference"),l=n.enter("reference");return i+=o.move(n.safe(n.associationId(e),{after:"]",before:i})),l(),a(),i+=o.move("]"),i}function eR(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 l=r.enter("footnoteDefinition"),s=r.enter("label");a+=i.move(r.safe(r.associationId(e),{before:a,after:"]"})),s(),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?nR:tR)));return l(),a},footnoteReference:JP},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function tR(e,t,n){return 0===t?e:nR(e,t,n)}function nR(e,t,n){return(n?"":" ")+e}JP.peek=function(){return"["};const rR=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function oR(e){this.enter({type:"delete",children:[]},e)}function iR(e){this.exit(e)}function aR(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 lR(e){return e.length}function sR(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 cR(e,t,n){return">"+(n?"":" ")+e}function uR(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 dR(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],uR(i,a.inConstruct,!0)&&!uR(i,a.notInConstruct,!1)))return/[ \t]/.test(r.before)?"":" ";var i,a;return"\\\n"}function fR(e,t,n){return(n?"":" ")+e}function pR(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 hR(e){return"&#x"+e.toString(16).toUpperCase()+";"}function mR(e,t,n){const r=ZC(e),o=ZC(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 gR(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),l=a.move(o);let s=a.move(n.containerPhrasing(e,{after:o,before:l,...a.current()}));const c=s.charCodeAt(0),u=mR(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(s=hR(c)+s.slice(1));const d=s.charCodeAt(s.length-1),f=mR(r.after.charCodeAt(0),d,o);f.inside&&(s=s.slice(0,-1)+hR(d));const p=a.move(o);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},l+s+p}function yR(e){return e.value||""}function vR(e,t,n,r){const o=pR(n),i='"'===o?"Quote":"Apostrophe",a=n.enter("image");let l=n.enter("label");const s=n.createTracker(r);let c=s.move("![");return c+=s.move(n.safe(e.alt,{before:c,after:"]",...s.current()})),c+=s.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(l=n.enter("destinationRaw"),c+=s.move(n.safe(e.url,{before:c,after:e.title?" ":")",...s.current()}))),l(),e.title&&(l=n.enter(`title${i}`),c+=s.move(" "+o),c+=s.move(n.safe(e.title,{before:c,after:o,...s.current()})),c+=s.move(o),l()),c+=s.move(")"),a(),c}function bR(e,t,n,r){const o=e.referenceType,i=n.enter("imageReference");let a=n.enter("label");const l=n.createTracker(r);let s=l.move("![");const c=n.safe(e.alt,{before:s,after:"]",...l.current()});s+=l.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:s,after:"]",...l.current()});return a(),n.stack=u,i(),"full"!==o&&c&&c===d?"shortcut"===o?s=s.slice(0,-1):s+=l.move("]"):s+=l.move(d+"]"),s}function wR(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 xR(e,t){const n=xC(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 kR(e,t,n,r){const o=pR(n),i='"'===o?"Quote":"Apostrophe",a=n.createTracker(r);let l,s;if(xR(e,n)){const t=n.stack;n.stack=[],l=n.enter("autolink");let r=a.move("<");return r+=a.move(n.containerPhrasing(e,{before:r,after:">",...a.current()})),r+=a.move(">"),l(),n.stack=t,r}l=n.enter("link"),s=n.enter("label");let c=a.move("[");return c+=a.move(n.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(s=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),s(),e.title&&(s=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),s()),c+=a.move(")"),l(),c}function SR(e,t,n,r){const o=e.referenceType,i=n.enter("linkReference");let a=n.enter("label");const l=n.createTracker(r);let s=l.move("[");const c=n.containerPhrasing(e,{before:s,after:"]",...l.current()});s+=l.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:s,after:"]",...l.current()});return a(),n.stack=u,i(),"full"!==o&&c&&c===d?"shortcut"===o?s=s.slice(0,-1):s+=l.move("]"):s+=l.move(d+"]"),s}function ER(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 _R(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}aR.peek=function(){return"~"},gR.peek=function(e,t,n){return n.options.emphasis||"*"},yR.peek=function(){return"<"},vR.peek=function(){return"!"},bR.peek=function(){return"!"},wR.peek=function(){return"`"},kR.peek=function(e,t,n){return xR(e,n)?"<":"["},SR.peek=function(){return"["};const CR=AN(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function OR(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),l=a.move(o+o);let s=a.move(n.containerPhrasing(e,{after:o,before:l,...a.current()}));const c=s.charCodeAt(0),u=mR(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(s=hR(c)+s.slice(1));const d=s.charCodeAt(s.length-1),f=mR(r.after.charCodeAt(0),d,o);f.inside&&(s=s.slice(0,-1)+hR(d));const p=a.move(o+o);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},l+s+p}OR.peek=function(e,t,n){return n.options.strong||"*"};const NR={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()),cR);return o(),a},break:dR,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,fR);return e(),t}const l=n.createTracker(r),s=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=l.move(s);if(e.lang){const t=n.enter(`codeFencedLang${a}`);u+=l.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...l.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${a}`);u+=l.move(" "),u+=l.move(n.safe(e.meta,{before:u,after:"\n",encode:["`"],...l.current()})),t()}return u+=l.move("\n"),i&&(u+=l.move(i+"\n")),u+=l.move(s),c(),u},definition:function(e,t,n,r){const o=pR(n),i='"'===o?"Quote":"Apostrophe",a=n.enter("definition");let l=n.enter("label");const s=n.createTracker(r);let c=s.move("[");return c+=s.move(n.safe(n.associationId(e),{before:c,after:"]",...s.current()})),c+=s.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(l=n.enter("destinationRaw"),c+=s.move(n.safe(e.url,{before:c,after:e.title?" ":"\n",...s.current()}))),l(),e.title&&(l=n.enter(`title${i}`),c+=s.move(" "+o),c+=s.move(n.safe(e.title,{before:c,after:o,...s.current()})),c+=s.move(o),l()),a(),c},emphasis:gR,hardBreak:dR,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 $N(e,(function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,FN})),Boolean((!e.depth||e.depth<3)&&xC(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),l=n.enter("headingAtx"),s=n.enter("phrasing");i.move(a+" ");let c=n.containerPhrasing(e,{before:"# ",after:"\n",...i.current()});return/^[\t ]/.test(c)&&(c=hR(c.charCodeAt(0))+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),s(),l(),c},html:yR,image:vR,imageReference:bR,inlineCode:wR,link:kR,linkReference:SR,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):ER(n);const l=e.ordered?"."===a?")":".":function(e){const t=ER(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 s=!(!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]||(s=!0),_R(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){s=!0;break}}}}s&&(a=l),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||ER(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 l=n.createTracker(r);l.move(i+" ".repeat(a-i.length)),l.shift(a);const s=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,l.current()),(function(e,t,n){if(t)return(n?"":" ".repeat(a))+e;return(n?i:i+" ".repeat(a-i.length))+e}));return s(),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 CR(e)}))?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:OR,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(_R(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 PR(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 RR(e){this.exit(e),this.data.inTable=void 0}function MR(e){this.enter({type:"tableRow",children:[]},e)}function TR(e){this.exit(e)}function AR(e){this.enter({type:"tableCell",children:[]},e)}function DR(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,IR));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function IR(e,t){return"|"===t?t:e}function LR(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=NR.inlineCode(e,t,n);n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&"));return r},table:function(e,t,n,r){return l(function(e,t,n){const r=e.children;let o=-1;const i=[],a=t.enter("table");for(;++o<r.length;)i[o]=s(r[o],t,n);return a(),i}(e,n,r),e.align)},tableCell:a,tableRow:function(e,t,n,r){const o=s(e,n,r),i=l([o]);return i.slice(0,i.indexOf("\n"))}}};function a(e,t,n,r){const o=n.enter("tableCell"),a=n.enter("phrasing"),l=n.containerPhrasing(e,{...r,before:i,after:i});return a(),o(),l}function l(e,t){return function(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||lR,i=[],a=[],l=[],s=[];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===s[i]||e>s[i])&&(s[i]=e)}t.push(a)}a[u]=t,l[u]=r}var d;let f=-1;if("object"==typeof r&&"length"in r)for(;++f<c;)i[f]=sR(r[f]);else{const e=sR(r);for(;++f<c;)i[f]=e}f=-1;const p=[],h=[];for(;++f<c;){const e=i[f];let t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let o=!1===n.alignDelimiters?1:Math.max(1,s[f]-t.length-r.length);const a=t+"-".repeat(o)+r;!1!==n.alignDelimiters&&(o=t.length+o+r.length,o>s[f]&&(s[f]=o),h[f]=o),p[f]=a}a.splice(1,0,p),l.splice(1,0,h),u=-1;const m=[];for(;++u<a.length;){const e=a[u],t=l[u];f=-1;const r=[];for(;++f<c;){const o=e[f]||"";let a="",l="";if(!1!==n.alignDelimiters){const e=s[f]-(t[f]||0),n=i[f];114===n?a=" ".repeat(e):99===n?e%2?(a=" ".repeat(e/2+.5),l=" ".repeat(e/2-.5)):(a=" ".repeat(e/2),l=a):l=" ".repeat(e)}!1===n.delimiterStart||f||r.push("|"),!1===n.padding||!1===n.alignDelimiters&&""===o||!1===n.delimiterStart&&!f||r.push(" "),!1!==n.alignDelimiters&&r.push(a),r.push(o),!1!==n.alignDelimiters&&r.push(l),!1!==n.padding&&r.push(" "),!1===n.delimiterEnd&&f===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 s(e,t,n){const r=e.children;let o=-1;const i=[],l=t.enter("tableRow");for(;++o<r.length;)i[o]=a(r[o],0,t,n);return l(),i}}function zR(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function FR(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 jR(e,t,n,r){const o=e.children[0],i="boolean"==typeof e.checked&&o&&"paragraph"===o.type,a="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);i&&l.move(a);let s=NR.listItem(e,t,n,{...r,...l.current()});return i&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,(function(e){return e+a}))),s}const $R={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},BR={tokenize:function(e,t,n){let r,o,i;return a;function a(t){return 46===t||95===t?e.check(HR,s,l)(t):null===t||VC(t)||WC(t)||45!==t&&UC(t)?s(t):(i=!0,e.consume(t),a)}function l(t){return 95===t?r=!0:(o=r,r=void 0),e.consume(t),a}function s(e){return o||r||!i?n(e):t(e)}},partial:!0},VR={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(HR,t,i)(a):null===a||VC(a)||WC(a)?t(a):(e.consume(a),o)}function i(t){return 41===t&&r++,e.consume(t),o}},partial:!0},HR={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||VC(a)||WC(a)?t(a):n(a)}function o(e){return null===e||40===e||91===e||VC(e)||WC(e)?t(e):r(e)}function i(e){return DC(e)?a(e):n(e)}function a(t){return 59===t?(e.consume(t),r):DC(t)?(e.consume(t),a):n(t)}},partial:!0},UR={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return IC(e)?n(e):t(e)}},partial:!0},WR={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!GR.call(r,r.previous)||eM(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check($R,e.attempt(BR,e.attempt(VR,o),n),n)(t)};function o(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:GR},qR={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let o="",i=!1;return function(t){if((72===t||104===t)&&QR.call(r,r.previous)&&!eM(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(t),e.consume(t),a;return n(t)};function a(t){if(DC(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),l}return n(t)}function l(t){return 47===t?(e.consume(t),i?s:(i=!0,l)):n(t)}function s(t){return null===t||zC(t)||VC(t)||WC(t)||UC(t)?n(t):e.attempt(BR,e.attempt(VR,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:QR},KR={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let o,i;return function(t){if(!JR(t)||!ZR.call(r,r.previous)||eM(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(t)};function a(t){return JR(t)?(e.consume(t),a):64===t?(e.consume(t),l):n(t)}function l(t){return 46===t?e.check(UR,c,s)(t):45===t||95===t||IC(t)?(i=!0,e.consume(t),l):c(t)}function s(t){return e.consume(t),o=!0,l}function c(a){return i&&o&&DC(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(a)):n(a)}},previous:ZR},XR={};let YR=48;for(;YR<123;)XR[YR]=KR,YR++,58===YR?YR=65:91===YR&&(YR=97);function GR(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||VC(e)}function QR(e){return!DC(e)}function ZR(e){return!(47===e||JR(e))}function JR(e){return 43===e||45===e||46===e||95===e||IC(e)}function eM(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}XR[43]=KR,XR[45]=KR,XR[46]=KR,XR[95]=KR,XR[72]=[KR,qR],XR[104]=[KR,qR],XR[87]=[KR,WR],XR[119]=[KR,WR];const tM={tokenize:function(e,t,n){const r=this;return XC(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 nM(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 l=AC(r.sliceSerialize({start:a.end,end:r.now()}));if(94!==l.codePointAt(0)||!i.includes(l.slice(1)))return n(o);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o)}}function rM(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)},l=[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,...l),e}function oM(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"),l};function l(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",s)}function s(l){if(a>999||93===l&&!i||null===l||91===l||VC(l))return n(l);if(93===l){e.exit("chunkString");const i=e.exit("gfmFootnoteCallString");return o.includes(AC(r.sliceSerialize(i)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(l)}return VC(l)||(i=!0),a++,e.consume(l),92===l?c:s}function c(t){return 91===t||92===t||93===t?(e.consume(t),a++,s):s(t)}}function iM(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a,l=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),s};function s(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(l>999||93===t&&!a||null===t||91===t||VC(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return i=AC(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return VC(t)||(a=!0),l++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),l++,c):c(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o.includes(i)||o.push(i),XC(e,f,"gfmFootnoteDefinitionWhitespace")):n(t)}function f(e){return t(e)}}function aM(e,t,n){return e.check(rO,t,e.attempt(tM,t,n))}function lM(e){e.exit("gfmFootnoteDefinition")}function sM(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"),l(t)};function l(i){const s=ZC(o);if(126===i)return a>1?r(i):(e.consume(i),a++,l);if(a<2&&!t)return r(i);const c=e.exit("strikethroughSequenceTemporary"),u=ZC(i);return c._open=!u||2===u&&Boolean(s),c._close=!s||2===s&&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]],l=t.parser.constructs.insideSpan.null;l&&CC(a,a.length,0,JC(l,e.slice(r+1,n),t)),CC(a,a.length,0,[["exit",i,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",o,t]]),CC(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 cM{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 uM(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 dM(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:l;if(i===w&&r.parser.lazy[r.now().line])return n(e);return i(e)};function l(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return s(e);return o=!0,a+=1,s(e)}(t)}function s(t){return null===t?n(t):BC(t)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):HC(t)?XC(e,s,"whitespace")(t):(a+=1,o&&(o=!1,i+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),o=!0,s):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||VC(t)?(e.exit("data"),s(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,HC(t)?XC(e,f,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):f(t))}function f(t){return 45===t||58===t?h(t):124===t?(o=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),p):b(t)}function p(t){return HC(t)?XC(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||BC(t)?v(t):b(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),g(t)):b(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 HC(t)?XC(e,v,"whitespace")(t):v(t)}function v(n){return 124===n?f(n):(null===n||BC(n))&&o&&i===a?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):b(n)}function b(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||BC(n)?(e.exit("tableRow"),t(n)):HC(n)?XC(e,x,"whitespace")(n):(e.enter("data"),k(n))}function k(t){return null===t||124===t||VC(t)?(e.exit("data"),x(t)):(e.consume(t),92===t?S:k)}function S(t){return 92===t||124===t?(e.consume(t),k):k(t)}}function fM(e,t){let n,r,o,i=-1,a=!0,l=0,s=[0,0,0,0],c=[0,0,0,0],u=!1,d=0;const f=new cM;for(;++i<e.length;){const p=e[i],h=p[1];"enter"===p[0]?"tableHead"===h.type?(u=!1,0!==d&&(hM(f,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(i,0,[["enter",n,t]])):"tableRow"===h.type||"tableDelimiterRow"===h.type?(a=!0,o=void 0,s=[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)},f.add(i,0,[["enter",r,t]])),l="tableDelimiterRow"===h.type?2:r?3:1):!l||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type?"tableCellDivider"===h.type&&(a?a=!1:(0!==s[1]&&(c[0]=c[1],o=pM(f,t,s,l,void 0,o)),s=c,c=[s[1],i,0,0])):(a=!1,0===c[2]&&(0!==s[1]&&(c[0]=c[1],o=pM(f,t,s,l,void 0,o),s=[0,0,0,0]),c[2]=i)):"tableHead"===h.type?(u=!0,d=i):"tableRow"===h.type||"tableDelimiterRow"===h.type?(d=i,0!==s[1]?(c[0]=c[1],o=pM(f,t,s,l,i,o)):0!==c[1]&&(o=pM(f,t,c,l,i,o)),l=0):!l||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type||(c[3]=i)}for(0!==d&&hM(f,t,d,n,r),f.consume(t.events),i=-1;++i<t.events.length;){const e=t.events[i];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=uM(t.events,i))}return e}function pM(e,t,n,r,o,i){const a=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(i.end=Object.assign({},mM(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const l=mM(t.events,n[1]);if(i={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",i,t]]),0!==n[2]){const o=mM(t.events,n[2]),i=mM(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({},mM(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function hM(e,t,n,r,o){const i=[],a=mM(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 mM(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const gM={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 VC(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 BC(r)?t(r):HC(r)?e.check({tokenize:yM},t,n)(r):n(r)}}};function yM(e,t,n){return XC(e,(function(e){return null===e?n(e):t(e)}),"whitespace")}const vM={};function bM(e){const t=e||vM,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),i=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return PC([{text:XR},{document:{91:{name:"gfmFootnoteDefinition",tokenize:iM,continuation:{tokenize:aM},exit:lM}},text:{91:{name:"gfmFootnoteCall",tokenize:oM},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:nM,resolveTo:rM}}},sM(e),{flow:{null:{name:"table",tokenize:dM,resolveAll:fM}}},{text:{91:gM}}])}(t)),o.push([{transforms:[BP],enter:{literalAutolink:IP,literalAutolinkEmail:LP,literalAutolinkHttp:LP,literalAutolinkWww:LP},exit:{literalAutolink:$P,literalAutolinkEmail:jP,literalAutolinkHttp:zP,literalAutolinkWww:FP}},{enter:{gfmFootnoteCallString:WP,gfmFootnoteCall:qP,gfmFootnoteDefinitionLabelString:KP,gfmFootnoteDefinition:XP},exit:{gfmFootnoteCallString:YP,gfmFootnoteCall:GP,gfmFootnoteDefinitionLabelString:QP,gfmFootnoteDefinition:ZP}},{canContainEols:["delete"],enter:{strikethrough:oR},exit:{strikethrough:iR}},{enter:{table:PR,tableData:AR,tableHeader:AR,tableRow:MR},exit:{codeText:DR,table:RR,tableData:TR,tableHeader:TR,tableRow:TR}},{exit:{taskListCheckValueChecked:zR,taskListCheckValueUnchecked:zR,paragraph:FR}}]),i.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:AP,notInConstruct:DP},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:AP,notInConstruct:DP},{character:":",before:"[ps]",after:"\\/",inConstruct:AP,notInConstruct:DP}]},eR(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:rR}],handlers:{delete:aR}},LR(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:jR}}]}}(t))}const wM=({item:e})=>{const t=s.useContext($z);return s.createElement("div",{className:"libnodeentry",onClick:n=>{2===n.detail&&t.worker?.add_node(e.node_id)},title:e.description},e.node_name||e.node_id)},xM=(e,t)=>{const n=e.nodes?.some((e=>e.node_id.toLowerCase().includes(t.toLowerCase())))??!1,r=e.subshelves?.some((e=>xM(e,t)))??!1;return n||r},kM=({item:e,filter:t,parentkey:n})=>{const[r,o]=s.useState(!1),i=e.nodes?.filter((e=>e.node_id.toLowerCase().includes(t.toLowerCase()))),a=r||t.length>0;return xM(e,t)?s.createElement("div",{className:"shelfcontainer"},s.createElement("div",{className:"shelftitle",onClick:()=>o(!r),style:{cursor:"pointer"},title:e.description},s.createElement("div",{className:"shelftitle_text"},e.name),s.createElement("div",{className:"expandicon "+(a?"open":"close")},s.createElement(fb,null))),s.createElement("div",{className:"libnodecontainer "+(a?"open":"close")},s.createElement("div",{className:"libnodecontainer_inner"},i&&s.createElement(s.Fragment,null,i.map((e=>s.createElement(wM,{key:e.node_id,item:e})))),e.subshelves&&s.createElement(s.Fragment,null,e.subshelves.map((e=>s.createElement(kM,{key:n+e.name,item:e,filter:t,parentkey:n+e.name})))))),s.createElement("hr",null)):s.createElement(s.Fragment,null)},SM=({filter:e,setFilter:t})=>s.createElement("div",{className:"libfilter"},s.createElement(xw,{fontSize:"inherit"}),s.createElement("input",{type:"text",placeholder:"Filter",value:e,onChange:e=>{t(e.target.value)}}),e&&s.createElement(ww,{fontSize:"inherit",onClick:()=>{t("")}})),EM=({availableModule:e})=>s.createElement("div",{className:"module-links"},e.homepage&&s.createElement(s.Fragment,null,s.createElement("a",{href:e.homepage,target:"_blank",rel:"noopener noreferrer"},"Homepage")),e.source&&e.homepage&&" | ",e.source&&s.createElement(s.Fragment,null,s.createElement("a",{href:e.source,target:"_blank",rel:"noopener noreferrer"},"Source"))),_M=({availableModule:e})=>{const[t,n]=s.useState(!1),r=e.description.length>150?e.description.substring(0,150)+"...":e.description;return s.createElement("div",{className:"module-description"},s.createElement(OP,{remarkPlugins:[bM]},t?e.description.replace(/\\n/g," \n"):r.replace(/\\n/g," \n")),e.description.length>150&&s.createElement("button",{onClick:()=>n(!t),className:"toggle-description"},t?"Show less":"Show more"))},CM=({availableModule:e,on_change:t})=>{const[n,r]=s.useState(e.version||"latest"),[o,i]=s.useState(">=");return e.releases&&!e.releases.includes(n)&&e.releases.unshift(n),s.createElement(s.Fragment,null,s.createElement("select",{value:o,onChange:e=>{i(e.target.value),"latest"!==n&&t(e.target.value+n)}},s.createElement("option",{value:">="},">="),s.createElement("option",{value:"=="},"=="),s.createElement("option",{value:"<="},"<=")),s.createElement("select",{onChange:e=>{const n=e.target.value;r(n),t("latest"!==n?o+n:n)},value:n},e.releases&&e.releases.map((e=>s.createElement("option",{key:e,value:e},e)))))},OM=({availableModule:e,on_remove:t,on_update:n})=>{const[r,o]=s.useState(e.version||"latest");return s.createElement("div",{className:"addable-module"},s.createElement("div",{className:"module-name"},e.name+(e.version?` (${e.version})`:"")),s.createElement(EM,{availableModule:e}),s.createElement(_M,{availableModule:e}),s.createElement("div",null,s.createElement(CM,{availableModule:e,on_change:o}),s.createElement("button",{className:"update-button",disabled:r===e.version,onClick:()=>{n(e,r)}},"Update"),s.createElement("button",{className:"remove-button",onClick:()=>{t(e)}},"Remove")))},NM=({availableModule:e,on_add:t})=>{const[n,r]=s.useState(e.version||"latest");return s.createElement("div",{className:"addable-module"},s.createElement("div",{className:"module-name"},e.name+(e.version?` (${e.version})`:"")),s.createElement(EM,{availableModule:e}),s.createElement(_M,{availableModule:e}),s.createElement("div",null,s.createElement(CM,{availableModule:e,on_change:r}),s.createElement("button",{className:"add-button",onClick:()=>{t(e,n)}},"Add")))},PM=({availableModule:e,on_add:t})=>{const[n,r]=s.useState(e.version||"latest");return s.createElement("div",{className:"addable-module"},s.createElement("div",{className:"module-name"},e.name),s.createElement(EM,{availableModule:e}),s.createElement(_M,{availableModule:e}),s.createElement("div",null,s.createElement(CM,{availableModule:e,on_change:r}),s.createElement("button",{className:"add-button",onClick:()=>{t(e,n)}},"Add")))},RM=({children:e})=>{const[t,n]=s.useState(""),r=s.useContext($z),[o,i]=s.useState(!0),[a,l]=s.useState(!0),[c,u]=s.useState(!0),[d,f]=s.useState({installed:[],available:[],active:[]}),[p,h]=s.useState(!1);if(!r.worker)return s.createElement(s.Fragment,null);const m=(e,t)=>{h(!1),void 0!==r.worker&&r.worker.add_lib(e.name,t)},g=(e,t)=>{h(!1),void 0!==r.worker&&r.worker.add_lib(e.name,t)},y=e=>{h(!1),void 0!==r.worker&&r.worker.remove_lib(e.name)},v=(e,t)=>{h(!1),void 0!==r.worker&&r.worker.add_lib(e.name,t)},b=e=>e.filter((e=>e.name.toLowerCase().includes(t.toLowerCase())||e.description.toLowerCase().includes(t.toLowerCase()))),w=b(d.available),x=b(d.installed),k=b(d.active);return s.createElement(_w,{title:"Manage Library",trigger:e,description:"Add or remove libraries to the current worker.",onOpenChange:e=>{e&&void 0!==r.worker&&r.worker.is_open&&r.worker.get_available_modules().then((e=>{f(e)}))},open:p,setOpen:h},s.createElement("input",{className:"filter-input styledinput",type:"text",placeholder:"Filter modules...",value:t,onChange:e=>n(e.target.value)}),s.createElement("div",{className:"packagelist",style:{maxHeight:"70%",overflow:"auto"}},x.length>0&&s.createElement("h3",{onClick:()=>{u(!c)}},"Installed"),c&&x.map((e=>s.createElement(NM,{key:e.name+e.source,availableModule:e,on_add:m}))),w.length>0&&s.createElement("h3",{onClick:()=>{l(!a)}},"Available"),a&&w.map((e=>s.createElement(PM,{key:e.name+e.source,availableModule:e,on_add:g}))),k.length>0&&s.createElement("h3",{onClick:()=>{i(!o)}},"Active"),o&&k.map((e=>s.createElement(OM,{key:e.name+e.source,availableModule:e,on_remove:y,on_update:v})))))},MM=({ins:e})=>{const[t,n]=s.useState(e.name),r=s.useContext($z);return s.createElement(s.Fragment,null,s.createElement(_w,{title:e.name,description:"Settings for"+e.name,trigger:s.createElement("div",null,"Settings"),buttons:[{text:"Save",onClick:()=>{r.worker&&(r.worker.update_external_worker(e.uuid,e.nodeclassid,{name:t}),e.name=t)},close:!0},{text:"Delete",onClick:()=>{r.worker&&r.worker.remove_external_worker(e.uuid,e.nodeclassid)},close:!0}]},s.createElement("div",null,s.createElement("div",null,s.createElement("label",{htmlFor:"name"},"Name: "),s.createElement("input",{type:"text",name:"name",value:t,onChange:e=>n(e.target.value),className:"styledinput"})))))},TM=({ins:e,lib:t,filter:n="",parentkey:r})=>{const[o,i]=s.useState(!1),a=t?.nodes?.filter((e=>e.node_id.toLowerCase().includes(n.toLowerCase())));return s.createElement("div",{className:"shelfcontainer"},s.createElement("div",{className:"shelftitle",onClick:()=>i(!o),style:{cursor:"pointer"},title:e.name},s.createElement("div",{className:"shelftitle_text"},e.name),s.createElement("div",{className:"expandicon "+(o?"open":"close")},s.createElement(fb,null))),s.createElement("div",{className:"libnodecontainer "+(o?"open":"close")},s.createElement("div",{className:"libnodecontainer_inner"},o&&s.createElement(s.Fragment,null,s.createElement("div",{className:"libnodeentry",title:e.uuid},s.createElement(MM,{ins:e})),t&&s.createElement(s.Fragment,null,a&&s.createElement(s.Fragment,null,a.map((e=>s.createElement(wM,{key:e.node_id,item:e})))),t.subshelves.map((e=>s.createElement(kM,{key:r+e.name,item:e,filter:n,parentkey:r+e.name}))))))))},AM=({item:e,mod:t,lib:n})=>{const r=s.useContext($z),[o,i]=s.useState(!1),a=e.name||e.module+"."+e.class_name;return s.createElement("div",{className:"shelfcontainer"},s.createElement("div",{className:"shelftitle",onClick:()=>i(!o),style:{cursor:"pointer"},title:a},s.createElement("div",{className:"shelftitle_text"},a),s.createElement("div",{className:"expandicon "+(o?"open":"close")},s.createElement(fb,null))),s.createElement("div",{className:"libnodecontainer "+(o?"open":"close")},s.createElement("div",{className:"libnodecontainer_inner"},o&&s.createElement(s.Fragment,null,s.createElement("div",{className:"libnodeentry",onClick:n=>{2===n.detail&&r.worker?.add_external_worker({module:t,cls_module:e.module,cls_name:e.class_name})},title:e.name},"New Instance"),e.instances.map((e=>s.createElement(TM,{key:e.uuid,ins:e,lib:n?.subshelves.find((t=>t.name===e.uuid)),parentkey:e.uuid})))))))},DM=({externalworkermod:e,lib:t})=>{const[n,r]=s.useState(!1),o=n;return s.createElement("div",{className:"shelfcontainer"},s.createElement("div",{className:"shelftitle",onClick:()=>r(!n),style:{cursor:"pointer"},title:e.module},s.createElement("div",{className:"shelftitle_text"},e.module),s.createElement("div",{className:"expandicon "+(o?"open":"close")},s.createElement(fb,null))),s.createElement("div",{className:"libnodecontainer "+(o?"open":"close")},s.createElement("div",{className:"libnodecontainer_inner"},e.worker_classes.map((n=>s.createElement(AM,{key:n.module+n.class_name,item:n,mod:e.module,lib:t}))))),s.createElement("hr",null))},IM=()=>{const e=s.useContext($z),t=e.lib.libstate(),[n,r]=s.useState(""),o=e.worker?.state((e=>e.is_open))??!1;return s.createElement("div",{className:"libcontainer"},s.createElement("div",{className:"library"},s.createElement("div",{className:"libtitle"},"Lib"),s.createElement("hr",{className:"hr_prominent"}),s.createElement(SM,{filter:n,setFilter:r}),s.createElement("div",{className:"vscrollcontainer"},t.lib.shelves.map((e=>"_external_worker"==e.name?s.createElement(s.Fragment,null):s.createElement(kM,{key:e.name,item:e,filter:n,parentkey:e.name})))),s.createElement("hr",null),s.createElement("div",{className:"libtitle"},"External Worker"),s.createElement("hr",{className:"hr_prominent"}),s.createElement("div",{className:"vscrollcontainer"},t.external_worker?.map((e=>s.createElement(DM,{key:e.module,externalworkermod:e,lib:t.lib.shelves.find((e=>"_external_worker"===e.name))})))),s.createElement("hr",null)),s.createElement("div",{style:{paddingTop:"0.5rem"}}),o&&s.createElement("div",{className:"addlib"},s.createElement(RM,null,s.createElement("button",null,"Manage Libraries"))))};const{useRef:LM}=c;function zM(e){const t=LM();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 FM=s.forwardRef(((e,t)=>Bu.jsx(ed.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}})));FM.displayName="VisuallyHidden";var jM=FM,[$M,BM]=Vu("Tooltip",[sk]),VM=sk(),HM="TooltipProvider",UM=700,WM="tooltip.open",[qM,KM]=$M(HM),XM=e=>{const{__scopeTooltip:t,delayDuration:n=UM,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,[a,l]=s.useState(!0),c=s.useRef(!1),u=s.useRef(0);return s.useEffect((()=>{const e=u.current;return()=>window.clearTimeout(e)}),[]),Bu.jsx(qM,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:s.useCallback((()=>{window.clearTimeout(u.current),l(!1)}),[]),onClose:s.useCallback((()=>{window.clearTimeout(u.current),u.current=window.setTimeout((()=>l(!0)),r)}),[r]),isPointerInTransitRef:c,onPointerInTransitChange:s.useCallback((e=>{c.current=e}),[]),disableHoverableContent:o,children:i})};XM.displayName=HM;var YM="Tooltip",[GM,QM]=$M(YM),ZM=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:l}=e,c=KM(YM,e.__scopeTooltip),u=VM(t),[d,f]=s.useState(null),p=Ku(),h=s.useRef(0),m=a??c.disableHoverableContent,g=l??c.delayDuration,y=s.useRef(!1),[v=!1,b]=Yu({prop:r,defaultProp:o,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(WM))):c.onClose(),i?.(e)}}),w=s.useMemo((()=>v?y.current?"delayed-open":"instant-open":"closed"),[v]),x=s.useCallback((()=>{window.clearTimeout(h.current),h.current=0,y.current=!1,b(!0)}),[b]),k=s.useCallback((()=>{window.clearTimeout(h.current),h.current=0,b(!1)}),[b]),S=s.useCallback((()=>{window.clearTimeout(h.current),h.current=window.setTimeout((()=>{y.current=!0,b(!0),h.current=0}),g)}),[g,b]);return s.useEffect((()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)}),[]),Bu.jsx(Ek,{...u,children:Bu.jsx(GM,{scope:t,contentId:p,open:v,stateAttribute:w,trigger:d,onTriggerChange:f,onTriggerEnter:s.useCallback((()=>{c.isOpenDelayed?S():x()}),[c.isOpenDelayed,S,x]),onTriggerLeave:s.useCallback((()=>{m?k():(window.clearTimeout(h.current),h.current=0)}),[k,m]),onOpen:x,onClose:k,disableHoverableContent:m,children:n})})};ZM.displayName=YM;var JM="TooltipTrigger",eT=s.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=QM(JM,n),i=KM(JM,n),a=VM(n),l=Lu(t,s.useRef(null),o.onTriggerChange),c=s.useRef(!1),u=s.useRef(!1),d=s.useCallback((()=>c.current=!1),[]);return s.useEffect((()=>()=>document.removeEventListener("pointerup",d)),[d]),Bu.jsx(_k,{asChild:!0,...a,children:Bu.jsx(ed.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:Au(e.onPointerMove,(e=>{"touch"!==e.pointerType&&(u.current||i.isPointerInTransitRef.current||(o.onTriggerEnter(),u.current=!0))})),onPointerLeave:Au(e.onPointerLeave,(()=>{o.onTriggerLeave(),u.current=!1})),onPointerDown:Au(e.onPointerDown,(()=>{c.current=!0,document.addEventListener("pointerup",d,{once:!0})})),onFocus:Au(e.onFocus,(()=>{c.current||o.onOpen()})),onBlur:Au(e.onBlur,o.onClose),onClick:Au(e.onClick,o.onClose)})})}));eT.displayName=JM;var tT="TooltipPortal",[nT,rT]=$M(tT,{forceMount:void 0}),oT=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=QM(tT,t);return Bu.jsx(nT,{scope:t,forceMount:n,children:Bu.jsx(kd,{present:n||i.open,children:Bu.jsx(xd,{asChild:!0,container:o,children:r})})})};oT.displayName=tT;var iT="TooltipContent",aT=s.forwardRef(((e,t)=>{const n=rT(iT,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=QM(iT,e.__scopeTooltip);return Bu.jsx(kd,{present:r||a.open,children:a.disableHoverableContent?Bu.jsx(uT,{side:o,...i,ref:t}):Bu.jsx(lT,{side:o,...i,ref:t})})})),lT=s.forwardRef(((e,t)=>{const n=QM(iT,e.__scopeTooltip),r=KM(iT,e.__scopeTooltip),o=s.useRef(null),i=Lu(t,o),[a,l]=s.useState(null),{trigger:c,onClose:u}=n,d=o.current,{onPointerInTransitChange:f}=r,p=s.useCallback((()=>{l(null),f(!1)}),[f]),h=s.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),f(!0)}),[f]);return s.useEffect((()=>()=>p()),[p]),s.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,p]),s.useEffect((()=>{if(a){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,l=t[e].y,s=t[i].x,c=t[i].y;l>r!=c>r&&n<(s-a)*(r-l)/(c-l)+a&&(o=!o)}return o}(n,a);r?p():o&&(p(),u())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[c,d,a,u,p]),Bu.jsx(uT,{...e,ref:i})})),[sT,cT]=$M(YM,{isInside:!1}),uT=s.forwardRef(((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...l}=e,c=QM(iT,n),u=VM(n),{onClose:d}=c;return s.useEffect((()=>(document.addEventListener(WM,d),()=>document.removeEventListener(WM,d))),[d]),s.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]),Bu.jsx(ld,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:Bu.jsxs(Ck,{"data-state":c.stateAttribute,...u,...l,ref:t,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:[Bu.jsx(Zu,{children:r}),Bu.jsx(sT,{scope:n,isInside:!0,children:Bu.jsx(jM,{id:c.contentId,role:"tooltip",children:o||r})})]})})}));aT.displayName=iT;var dT="TooltipArrow",fT=s.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=VM(n);return cT(dT,n).isInside?null:Bu.jsx(Ok,{...o,...r,ref:t})}));fT.displayName=dT;var pT=XM,hT=ZM,mT=eT,gT=oT,yT=aT,vT=fT,bT="Popover",[wT,xT]=Vu(bT,[sk]),kT=sk(),[ST,ET]=wT(bT),_T=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!1}=e,l=kT(t),c=s.useRef(null),[u,d]=s.useState(!1),[f=!1,p]=Yu({prop:r,defaultProp:o,onChange:i});return Bu.jsx(Ek,{...l,children:Bu.jsx(ST,{scope:t,contentId:Ku(),triggerRef:c,open:f,onOpenChange:p,onOpenToggle:s.useCallback((()=>p((e=>!e))),[p]),hasCustomAnchor:u,onCustomAnchorAdd:s.useCallback((()=>d(!0)),[]),onCustomAnchorRemove:s.useCallback((()=>d(!1)),[]),modal:a,children:n})})};_T.displayName=bT;var CT="PopoverAnchor";s.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=ET(CT,n),i=kT(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:l}=o;return s.useEffect((()=>(a(),()=>l())),[a,l]),Bu.jsx(_k,{...i,...r,ref:t})})).displayName=CT;var OT="PopoverTrigger",NT=s.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=ET(OT,n),i=kT(n),a=Lu(t,o.triggerRef),l=Bu.jsx(ed.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":jT(o.open),...r,ref:a,onClick:Au(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:Bu.jsx(_k,{asChild:!0,...i,children:l})}));NT.displayName=OT;var PT="PopoverPortal",[RT,MT]=wT(PT,{forceMount:void 0}),TT=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,i=ET(PT,t);return Bu.jsx(RT,{scope:t,forceMount:n,children:Bu.jsx(kd,{present:n||i.open,children:Bu.jsx(xd,{asChild:!0,container:o,children:r})})})};TT.displayName=PT;var AT="PopoverContent",DT=s.forwardRef(((e,t)=>{const n=MT(AT,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,i=ET(AT,e.__scopePopover);return Bu.jsx(kd,{present:r||i.open,children:i.modal?Bu.jsx(IT,{...o,ref:t}):Bu.jsx(LT,{...o,ref:t})})}));DT.displayName=AT;var IT=s.forwardRef(((e,t)=>{const n=ET(AT,e.__scopePopover),r=s.useRef(null),o=Lu(t,r),i=s.useRef(!1);return s.useEffect((()=>{const e=r.current;if(e)return kf(e)}),[]),Bu.jsx(mf,{as:Gu,allowPinchZoom:!0,children:Bu.jsx(zT,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Au(e.onCloseAutoFocus,(e=>{e.preventDefault(),i.current||n.triggerRef.current?.focus()})),onPointerDownOutside:Au(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;i.current=r}),{checkForDefaultPrevented:!1}),onFocusOutside:Au(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),LT=s.forwardRef(((e,t)=>{const n=ET(AT,e.__scopePopover),r=s.useRef(!1),o=s.useRef(!1);return Bu.jsx(zT,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const i=t.target,a=n.triggerRef.current?.contains(i);a&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})})),zT=s.forwardRef(((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:u,...d}=e,f=ET(AT,n),p=kT(n);return _d(),Bu.jsx(hd,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:Bu.jsx(ld,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onDismiss:()=>f.onOpenChange(!1),children:Bu.jsx(Ck,{"data-state":jT(f.open),role:"dialog",id:f.contentId,...p,...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)"}})})})})),FT="PopoverClose";s.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=ET(FT,n);return Bu.jsx(ed.button,{type:"button",...r,ref:t,onClick:Au(e.onClick,(()=>o.onOpenChange(!1)))})})).displayName=FT;function jT(e){return e?"open":"closed"}s.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=kT(n);return Bu.jsx(Ok,{...o,...r,ref:t})})).displayName="PopoverArrow";var $T,BT,VT,HT,UT,WT,qT,KT,XT=_T,YT=NT,GT=TT,QT=DT;function ZT(){if(HT)return VT;HT=1;const e=BT?$T:(BT=1,$T={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"]}};VT=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 l,s;i===o?l=0:t===i?l=(n-r)/a:n===i?l=2+(r-t)/a:r===i&&(l=4+(t-n)/a),l=Math.min(60*l,360),l<0&&(l+=360);const c=(o+i)/2;return s=i===o?0:c<=.5?a/(i+o):a/(2-i-o),[l,100*s,100*c]},n.rgb.hsv=function(e){let t,n,r,o,i;const a=e[0]/255,l=e[1]/255,s=e[2]/255,c=Math.max(a,l,s),u=c-Math.min(a,l,s),d=function(e){return(c-e)/6/u+.5};return 0===u?(o=0,i=0):(i=u/c,t=d(a),n=d(l),r=d(s),a===c?o=r-n:l===c?o=1/3+t-r:s===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],s=(l=r,((a=n)[0]-l[0])**2+(a[1]-l[1])**2+(a[2]-l[2])**2);s<i&&(i=s,o=t)}var a,l;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 l=2*r-o,s=[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?l+6*(o-l)*i:2*i<1?o:3*i<2?l+(o-l)*(2/3-i)*6:l,s[e]=255*a;return s},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),l=255*r*(1-n*i),s=255*r*(1-n*(1-i));switch(r*=255,o){case 0:return[r,s,a];case 1:return[l,r,a];case 2:return[a,r,s];case 3:return[a,l,r];case 4:return[s,a,r];case 5:return[r,a,l]}},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 l=(2-n)*o;return i=n*o,i/=l<=1?l:2-l,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),l=1-r;i=6*t-a,1&a&&(i=1-i);const s=n+i*(l-n);let c,u,d;switch(a){default:case 6:case 0:c=l,u=s,d=n;break;case 1:c=s,u=l,d=n;break;case 2:c=n,u=l,d=s;break;case 3:c=n,u=s,d=l;break;case 4:c=s,u=n,d=l;break;case 5:c=l,u=n,d=s}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 l=30+(Math.round(i/255)<<2|Math.round(o/255)<<1|Math.round(r/255));return 2===a&&(l+=60),l},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 l,s;return l=a<1?i/(1-a):0,s=a<=0?0:o===t?(n-r)/a%6:o===n?2+(r-t)/a:4+(t-n)/a,s/=6,s%=1,[360*s,100*a,100*l]},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,l=1-a;let s=0;switch(Math.floor(i)){case 0:o[0]=1,o[1]=a,o[2]=0;break;case 1:o[0]=l,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]=l,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]=l}return s=(1-n)*r,[255*(n*o[0]+s),255*(n*o[1]+s),255*(n*o[2]+s)]},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]},VT}function JT(){if(WT)return UT;WT=1;const e=ZT();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 UT=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},UT}var eA=function(){if(KT)return qT;KT=1;const e=ZT(),t=JT(),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)}))})),qT=n}(),tA=e({__proto__:null,default:t(eA)},[eA]);const nA=(e,t)=>{if(Array.isArray(t)||(t=[t]),void 0===t[0]||null===t[0])return nA("rgb",[0,0,0]);const n=tA[e];if(!n)throw new Error("Unsupported color type: "+e);n[e]=()=>t;const r=n.rgb(t);if(!Array.isArray(r))return nA("rgb",[0,0,0]);if(void 0===r[0]||null===r[0])return nA("rgb",[0,0,0]);const o=n.hsl(t);if(!Array.isArray(o))return nA("rgb",[0,0,0]);if(void 0===o[0]||null===o[0])return nA("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},rA=({onChange:e,colorconverter:t,allow_null:n=!1})=>{if(null===t&&!n)throw new Error("Color converter is null");const[r,o]=s.useState(t),[i,a]=s.useState([0,0,0]),[l,c]=s.useState([0,0,0]),[u,d]=s.useState([0,0,0]),[f,p]=s.useState("000");s.useEffect((()=>{if(!r){if(!n)throw new Error("Color converter is null");return c([0,0,0]),a([0,0,0]),d([0,0,0]),void p("")}a(r.hsl()),c(r.rgb()),d(r.hsv()),p(r.hex())}),[r]);const h={backgroundColor:`hsl(${i[0]}, ${i[1]}%, ${i[2]}%)`,padding:"10px",margin:"10px 0"};return s.createElement("div",{style:{backgroundColor:"white"}},s.createElement("div",{style:h},"Color Preview"),s.createElement("div",{className:"colorspace"},s.createElement("div",{className:"colorspace_title"},"RGB"),s.createElement("div",null),s.createElement("label",null,"Red"),s.createElement("input",{type:"range",min:"0",max:"255",value:l[0],onChange:t=>{const n=[parseInt(t.target.value),l[1],l[2]],r=nA("rgb",n);o(r),e(r)},style:{background:"linear-gradient(to right, #000, #f00)"}}),s.createElement("label",null,"Green"),s.createElement("input",{type:"range",min:"0",max:"255",value:l[1],onChange:t=>{const n=[l[0],parseInt(t.target.value),l[2]],r=nA("rgb",n);o(r),e(r)},style:{background:"linear-gradient(to right, #000, #0f0)"}}),s.createElement("label",null,"Blue"),s.createElement("input",{type:"range",min:"0",max:"255",value:l[2],onChange:t=>{const n=[l[0],l[1],parseInt(t.target.value)],r=nA("rgb",n);o(r),e(r)},style:{background:"linear-gradient(to right, #000, #00f)"}})),s.createElement("div",{className:"colorspace"},s.createElement("div",{className:"colorspace_title"},"HSL"),s.createElement("div",null),s.createElement("label",null,"Hue"),s.createElement("input",{type:"range",min:"0",max:"360",value:i[0],onChange:t=>{const n=[parseInt(t.target.value),i[1],i[2]],r=nA("hsl",n);o(r),e(r)},style:{background:"linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00)"}}),s.createElement("label",null,"Saturation"),s.createElement("input",{type:"range",min:"0",max:"100",value:i[1],onChange:t=>{const n=[i[0],parseInt(t.target.value),i[2]],r=nA("hsl",n);o(r),e(r)},style:{background:`linear-gradient(to right, #fff, hsl(${i[0]}, 100%, 50%))`}}),s.createElement("label",null,"Lightness"),s.createElement("input",{type:"range",min:"0",max:"100",value:i[2],onChange:t=>{const n=[i[0],i[1],parseInt(t.target.value)],r=nA("hsl",n);o(r),e(r)},style:{background:`linear-gradient(to right, #000, hsl(${i[0]}, 100%, 50%), #fff)`}})),s.createElement("div",{className:"colorspace"},s.createElement("div",{className:"colorspace_title"},"HSV"),s.createElement("div",null),s.createElement("label",null,"Hue"),s.createElement("input",{type:"range",min:"0",max:"360",value:u[0],onChange:t=>{const n=[parseInt(t.target.value),u[1],u[2]],r=nA("hsv",n);o(r),e(r)},style:{background:"linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00)"}}),s.createElement("label",null,"Saturation"),s.createElement("input",{type:"range",min:"0",max:"100",value:u[1],onChange:t=>{const n=[u[0],parseInt(t.target.value),u[2]],r=nA("hsv",n);o(r),e(r)},style:{background:`linear-gradient(to right, #fff, hsl(${i[0]}, 100%, 50%))`}}),s.createElement("label",null,"Value"),s.createElement("input",{type:"range",min:"0",max:"100",value:u[2],onChange:t=>{const n=[u[0],u[1],parseInt(t.target.value)],r=nA("hsv",n);o(r),e(r)},style:{background:`linear-gradient(to right, #000, hsl(${i[0]}, 100%, 50%))`}})),s.createElement("div",{className:"colorspace"},s.createElement("div",{className:"colorspace_title"},"HEX"),s.createElement("div",null),s.createElement("input",{type:"text",value:f,onChange:t=>{const n=""===t.target.value?null:nA("hex",[t.target.value]);o(n),e(n)}})))},oA=({inicolordata:e,inicolorspace:t="hex",allow_null:n=!1,onChange:r})=>{void 0===e&&(e=[0,0,0],t="rgb"),Array.isArray(e)||(e=[e]);let o=nA(t,e);void 0===o.rgb()&&(o=nA("rgb",[0,0,0]));const[i,a]=s.useState(o),l={background:"#"+i.hex(),borderRadius:"0.3rem",width:"2rem",height:"1rem"};return s.createElement(XT,null,s.createElement(YT,{asChild:!0},s.createElement("button",{style:l})),s.createElement(GT,null,s.createElement(QT,{side:"left"},s.createElement(rA,{onChange:e=>{if(null===e&&!n)throw new Error("Color is null");null!==e&&a(e),r&&r(e)},colorconverter:i,allow_null:n}))))};function iA(e,[t,n]){return Math.min(n,Math.max(t,e))}var aA=["PageUp","PageDown"],lA=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],sA={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},cA="Slider",[uA,dA,fA]=Cw(cA),[pA,hA]=Vu(cA,[fA]),[mA,gA]=pA(cA),yA=s.forwardRef(((e,t)=>{const{name:n,min:r=0,max:o=100,step:i=1,orientation:a="horizontal",disabled:l=!1,minStepsBetweenThumbs:c=0,defaultValue:u=[r],value:d,onValueChange:f=()=>{},onValueCommit:p=()=>{},inverted:h=!1,form:m,...g}=e,y=s.useRef(new Set),v=s.useRef(0),b="horizontal"===a?wA:xA,[w=[],x]=Yu({prop:d,defaultProp:u,onChange:e=>{const t=[...y.current];t[v.current]?.focus(),f(e)}}),k=s.useRef(w);function S(e,t,{commit:n}={commit:!1}){const a=function(e){return(String(e).split(".")[1]||"").length}(i),l=function(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}(Math.round((e-r)/i)*i+r,a),s=iA(l,[r,o]);x(((e=[])=>{const r=function(e=[],t,n){const r=[...e];return r[n]=t,r.sort(((e,t)=>e-t))}(e,s,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*i)){v.current=r.indexOf(s);const t=String(r)!==String(e);return t&&n&&p(r),t?r:e}return e}))}return Bu.jsx(mA,{scope:e.__scopeSlider,name:n,disabled:l,min:r,max:o,valueIndexToChangeRef:v,thumbs:y.current,values:w,orientation:a,form:m,children:Bu.jsx(uA.Provider,{scope:e.__scopeSlider,children:Bu.jsx(uA.Slot,{scope:e.__scopeSlider,children:Bu.jsx(b,{"aria-disabled":l,"data-disabled":l?"":void 0,...g,ref:t,onPointerDown:Au(g.onPointerDown,(()=>{l||(k.current=w)})),min:r,max:o,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);S(e,t)},onSlideMove:l?void 0:function(e){S(e,v.current)},onSlideEnd:l?void 0:function(){const e=k.current[v.current];w[v.current]!==e&&p(w)},onHomeKeyDown:()=>!l&&S(r,0,{commit:!0}),onEndKeyDown:()=>!l&&S(o,w.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!l){const n=aA.includes(e.key)||e.shiftKey&&lA.includes(e.key)?10:1,r=v.current;S(w[r]+i*n*t,r,{commit:!0})}}})})})})}));yA.displayName=cA;var[vA,bA]=pA(cA,{startEdge:"left",endEdge:"right",size:"width",direction:1}),wA=s.forwardRef(((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:a,onSlideMove:l,onSlideEnd:c,onStepKeyDown:u,...d}=e,[f,p]=s.useState(null),h=Lu(t,(e=>p(e))),m=s.useRef(void 0),g=Nw(o),y="ltr"===g,v=y&&!i||!y&&i;function b(e){const t=m.current||f.getBoundingClientRect(),o=TA([0,t.width],v?[n,r]:[r,n]);return m.current=t,o(e-t.left)}return Bu.jsx(vA,{scope:e.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:Bu.jsx(kA,{dir:g,"data-orientation":"horizontal",...d,ref:h,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{const t=b(e.clientX);a?.(t)},onSlideMove:e=>{const t=b(e.clientX);l?.(t)},onSlideEnd:()=>{m.current=void 0,c?.()},onStepKeyDown:e=>{const t=sA[v?"from-left":"from-right"].includes(e.key);u?.({event:e,direction:t?-1:1})}})})})),xA=s.forwardRef(((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:l,onStepKeyDown:c,...u}=e,d=s.useRef(null),f=Lu(t,d),p=s.useRef(void 0),h=!o;function m(e){const t=p.current||d.current.getBoundingClientRect(),o=TA([0,t.height],h?[r,n]:[n,r]);return p.current=t,o(e-t.top)}return Bu.jsx(vA,{scope:e.__scopeSlider,startEdge:h?"bottom":"top",endEdge:h?"top":"bottom",size:"height",direction:h?1:-1,children:Bu.jsx(kA,{"data-orientation":"vertical",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{const t=m(e.clientY);i?.(t)},onSlideMove:e=>{const t=m(e.clientY);a?.(t)},onSlideEnd:()=>{p.current=void 0,l?.()},onStepKeyDown:e=>{const t=sA[h?"from-bottom":"from-top"].includes(e.key);c?.({event:e,direction:t?-1:1})}})})})),kA=s.forwardRef(((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:l,onStepKeyDown:s,...c}=e,u=gA(cA,n);return Bu.jsx(ed.span,{...c,ref:t,onKeyDown:Au(e.onKeyDown,(e=>{"Home"===e.key?(a(e),e.preventDefault()):"End"===e.key?(l(e),e.preventDefault()):aA.concat(lA).includes(e.key)&&(s(e),e.preventDefault())})),onPointerDown:Au(e.onPointerDown,(e=>{const t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():r(e)})),onPointerMove:Au(e.onPointerMove,(e=>{e.target.hasPointerCapture(e.pointerId)&&o(e)})),onPointerUp:Au(e.onPointerUp,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),i(e))}))})})),SA="SliderTrack",EA=s.forwardRef(((e,t)=>{const{__scopeSlider:n,...r}=e,o=gA(SA,n);return Bu.jsx(ed.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})}));EA.displayName=SA;var _A="SliderRange",CA=s.forwardRef(((e,t)=>{const{__scopeSlider:n,...r}=e,o=gA(_A,n),i=bA(_A,n),a=Lu(t,s.useRef(null)),l=o.values.length,c=o.values.map((e=>MA(e,o.min,o.max))),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return Bu.jsx(ed.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:a,style:{...e.style,[i.startEdge]:u+"%",[i.endEdge]:d+"%"}})}));CA.displayName=_A;var OA="SliderThumb",NA=s.forwardRef(((e,t)=>{const n=dA(e.__scopeSlider),[r,o]=s.useState(null),i=Lu(t,(e=>o(e))),a=s.useMemo((()=>r?n().findIndex((e=>e.ref.current===r)):-1),[n,r]);return Bu.jsx(PA,{...e,ref:i,index:a})})),PA=s.forwardRef(((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,a=gA(OA,n),l=bA(OA,n),[c,u]=s.useState(null),d=Lu(t,(e=>u(e))),f=!c||(a.form||!!c.closest("form")),p=ik(c),h=a.values[r],m=void 0===h?0:MA(h,a.min,a.max),g=function(e,t){return t>2?`Value ${e+1} of ${t}`:2===t?["Minimum","Maximum"][e]:void 0}(r,a.values.length),y=p?.[l.size],v=y?function(e,t,n){const r=e/2,o=TA([0,50],[0,r]);return(r-o(t)*n)*n}(y,m,l.direction):0;return s.useEffect((()=>{if(c)return a.thumbs.add(c),()=>{a.thumbs.delete(c)}}),[c,a.thumbs]),Bu.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[l.startEdge]:`calc(${m}% + ${v}px)`},children:[Bu.jsx(uA.ItemSlot,{scope:e.__scopeSlider,children:Bu.jsx(ed.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":a.min,"aria-valuenow":h,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...i,ref:d,style:void 0===h?{display:"none"}:e.style,onFocus:Au(e.onFocus,(()=>{a.valueIndexToChangeRef.current=r}))})}),f&&Bu.jsx(RA,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:h},r)]})}));NA.displayName=OA;var RA=e=>{const{value:t,...n}=e,r=s.useRef(null),o=function(e){const t=s.useRef({value:e,previous:e});return s.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}(t);return s.useEffect((()=>{const e=r.current,n=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(n,"value").set;if(o!==t&&i){const n=new Event("input",{bubbles:!0});i.call(e,t),e.dispatchEvent(n)}}),[o,t]),Bu.jsx("input",{style:{display:"none"},...n,ref:r,defaultValue:t})};function MA(e,t,n){return iA(100/(n-t)*(e-t),[0,100])}function TA(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 AA=yA,DA=EA,IA=CA,LA=NA;function zA(e){return zA="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},zA(e)}function FA(e){var t=function(e,t){if("object"!=zA(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=zA(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==zA(t)?t:t+""}function jA(e,t,n){return(t=FA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $A(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 BA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$A(Object(n),!0).forEach((function(t){jA(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$A(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function VA(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 HA(e,t){if(e){if("string"==typeof e)return VA(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)?VA(e,t):void 0}}function UA(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,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||HA(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 WA(e,t){if(null==e)return{};var n,r,o=Wb(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 qA=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function KA(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,FA(r.key),r)}}function XA(e){return XA=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},XA(e)}function YA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(YA=function(){return!!e})()}function GA(e){var t=YA();return function(){var n,r=XA(e);if(t){var o=XA(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==zA(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Yb(e)}(this,n)}}function QA(e){return function(e){if(Array.isArray(e))return VA(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||HA(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 ZA=s.useLayoutEffect,JA=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],eD=function(){};function tD(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function nD(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(tD(e,a)));return i.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var rD=function(e){return function(e){return Array.isArray(e)}(e)?e.filter(Boolean):"object"===zA(e)&&null!==e?[e]:[]},oD=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,BA({},WA(e,JA))},iD=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 aD(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function lD(e){return aD(e)?window.pageYOffset:e.scrollTop}function sD(e,t){aD(e)?window.scrollTo(0,t):e.scrollTop=t}function cD(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:eD,o=lD(e),i=t-o,a=0;!function t(){var l,s=i*((l=(l=a+=10)/n-1)*l*l+1)+o;sD(e,s),a<n?window.requestAnimationFrame(t):r(e)}()}function uD(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?sD(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&sD(e,Math.max(t.offsetTop-o,0))}function dD(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var fD=!1,pD={get passive(){return fD=!0}},hD="undefined"!=typeof window?window:{};hD.addEventListener&&hD.removeEventListener&&(hD.addEventListener("p",eD,pD),hD.removeEventListener("p",eD,!1));var mD=fD;function gD(e){return null!=e}function yD(e,t,n){return e?t:n}var vD=["children","innerProps"],bD=["children","innerProps"];function wD(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,a=e.isFixedPosition,l=e.controlHeight,s=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=s.getBoundingClientRect().height,f=n.getBoundingClientRect(),p=f.bottom,h=f.height,m=f.top,g=n.offsetParent.getBoundingClientRect().top,y=a?window.innerHeight:aD(u=s)?window.innerHeight:u.clientHeight,v=lD(s),b=parseInt(getComputedStyle(n).marginBottom,10),w=parseInt(getComputedStyle(n).marginTop,10),x=g-w,k=y-m,S=x+v,E=d-v-m,_=p-y+v+b,C=v+m-w,O=160;switch(o){case"auto":case"bottom":if(k>=h)return{placement:"bottom",maxHeight:t};if(E>=h&&!a)return i&&cD(s,_,O),{placement:"bottom",maxHeight:t};if(!a&&E>=r||a&&k>=r)return i&&cD(s,_,O),{placement:"bottom",maxHeight:a?k-b:E-b};if("auto"===o||a){var N=t,P=a?x:S;return P>=r&&(N=Math.min(P-b-l,t)),{placement:"top",maxHeight:N}}if("bottom"===o)return i&&sD(s,_),{placement:"bottom",maxHeight:t};break;case"top":if(x>=h)return{placement:"top",maxHeight:t};if(S>=h&&!a)return i&&cD(s,C,O),{placement:"top",maxHeight:t};if(!a&&S>=r||a&&x>=r){var R=t;return(!a&&S>=r||a&&x>=r)&&(R=a?x-w:S-w),i&&cD(s,C,O),{placement:"top",maxHeight:R}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return c}var xD,kD,SD,ED=function(e){return"auto"===e?"bottom":e},_D=s.createContext(null),CD=function(e){var t=e.children,n=e.minMenuHeight,r=e.maxMenuHeight,o=e.menuPlacement,i=e.menuPosition,a=e.menuShouldScrollIntoView,l=e.theme,c=(s.useContext(_D)||{}).setPortalPlacement,u=s.useRef(null),d=UA(s.useState(r),2),f=d[0],p=d[1],h=UA(s.useState(null),2),m=h[0],g=h[1],y=l.spacing.controlHeight;return ZA((function(){var e=u.current;if(e){var t="fixed"===i,l=wD({maxHeight:r,menuEl:e,minHeight:n,placement:o,shouldScroll:a&&!t,isFixedPosition:t,controlHeight:y});p(l.maxHeight),g(l.placement),null==c||c(l.placement)}}),[r,o,i,a,n,c,y]),t({ref:u,placerProps:BA(BA({},e),{},{placement:m||ED(o),maxHeight:f})})},OD=function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return Ag("div",nm({},iD(e,"menu",{menu:!0}),{ref:n},r),t)},ND=function(e,t){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return BA({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},PD=ND,RD=ND,MD=["size"],TD=["innerProps","isRtl","size"],AD={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},DD=function(e){var t=e.size,n=WA(e,MD);return Ag("svg",nm({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:AD},n))},ID=function(e){return Ag(DD,nm({size:20},e),Ag("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"}))},LD=function(e){return Ag(DD,nm({size:20},e),Ag("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"}))},zD=function(e,t){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return BA({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*o,":hover":{color:n?i.neutral80:i.neutral40}})},FD=zD,jD=zD,$D=Ig(xD||(kD=["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"],SD||(SD=kD.slice(0)),xD=Object.freeze(Object.defineProperties(kD,{raw:{value:Object.freeze(SD)}})))),BD=function(e){var t=e.delay,n=e.offset;return Ag("span",{css:Dg({animation:"".concat($D," 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"},"","")})},VD=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return Ag("div",nm({ref:o},iD(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":a}),i,{"aria-disabled":n||void 0}),t)},HD=["data"],UD=function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.getClassNames,i=e.Heading,a=e.headingProps,l=e.innerProps,s=e.label,c=e.theme,u=e.selectProps;return Ag("div",nm({},iD(e,"group",{group:!0}),l),Ag(i,nm({},a,{selectProps:u,theme:c,getStyles:r,getClassNames:o,cx:n}),s),Ag("div",null,t))},WD=["innerRef","isDisabled","isHidden","inputClassName"],qD={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},KD={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":BA({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},qD)},XD=function(e){return BA({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},qD)},YD=function(e){var t=e.cx,n=e.value,r=oD(e),o=r.innerRef,i=r.isDisabled,a=r.isHidden,l=r.inputClassName,s=WA(r,WD);return Ag("div",nm({},iD(e,"input",{"input-container":!0}),{"data-value":n||""}),Ag("input",nm({className:t({input:!0},l),ref:o,style:XD(a),disabled:i},s)))},GD=function(e){var t=e.children,n=e.innerProps;return Ag("div",n,t)};var QD=function(e){var t=e.children,n=e.components,r=e.data,o=e.innerProps,i=e.isDisabled,a=e.removeProps,l=e.selectProps,s=n.Container,c=n.Label,u=n.Remove;return Ag(s,{data:r,innerProps:BA(BA({},iD(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),o),selectProps:l},Ag(c,{data:r,innerProps:BA({},iD(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},t),Ag(u,{data:r,innerProps:BA(BA({},iD(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:l}))},ZD=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.innerRef,a=e.innerProps;return Ag("div",nm({},iD(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":o}),{ref:i,"aria-disabled":n},a),t)},JD=function(e){var t=e.children,n=e.innerProps;return Ag("div",nm({},iD(e,"placeholder",{placeholder:!0}),n),t)},eI=function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return Ag("div",nm({},iD(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},tI={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return Ag("div",nm({},iD(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||Ag(ID,null))},Control:VD,DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return Ag("div",nm({},iD(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||Ag(LD,null))},DownChevron:LD,CrossIcon:ID,Group:UD,GroupHeading:function(e){var t=oD(e);t.data;var n=WA(t,HD);return Ag("div",nm({},iD(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return Ag("div",nm({},iD(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return Ag("span",nm({},t,iD(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:YD,LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,o=void 0===r?4:r,i=WA(e,TD);return Ag("div",nm({},iD(BA(BA({},i),{},{innerProps:t,isRtl:n,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),Ag(BD,{delay:0,offset:n}),Ag(BD,{delay:160,offset:!0}),Ag(BD,{delay:320,offset:!n}))},Menu:OD,MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,o=e.isMulti;return Ag("div",nm({},iD(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,a=e.menuPosition,l=s.useRef(null),c=s.useRef(null),u=UA(s.useState(ED(i)),2),d=u[0],f=u[1],p=s.useMemo((function(){return{setPortalPlacement:f}}),[]),h=UA(s.useState(null),2),m=h[0],g=h[1],y=s.useCallback((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"===a?0:window.pageYOffset,n=e[d]+t;n===(null==m?void 0:m.offset)&&e.left===(null==m?void 0:m.rect.left)&&e.width===(null==m?void 0:m.rect.width)||g({offset:n,rect:e})}}),[r,a,d,null==m?void 0:m.offset,null==m?void 0:m.rect.left,null==m?void 0:m.rect.width]);ZA((function(){y()}),[y]);var v=s.useCallback((function(){"function"==typeof c.current&&(c.current(),c.current=null),r&&l.current&&(c.current=Ix(r,l.current,y,{elementResize:"ResizeObserver"in window}))}),[r,y]);ZA((function(){v()}),[v]);var b=s.useCallback((function(e){l.current=e,v()}),[v]);if(!t&&"fixed"!==a||!m)return null;var w=Ag("div",nm({ref:b},iD(BA(BA({},e),{},{offset:m.offset,position:a,rect:m.rect}),"menuPortal",{"menu-portal":!0}),o),n);return Ag(_D.Provider,{value:p},t?Lr.createPortal(w,t):w)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,o=WA(e,bD);return Ag("div",nm({},iD(BA(BA({},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=WA(e,vD);return Ag("div",nm({},iD(BA(BA({},o),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},MultiValue:QD,MultiValueContainer:GD,MultiValueLabel:GD,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return Ag("div",nm({role:"button"},n),t||Ag(ID,{size:14}))},Option:ZD,Placeholder:JD,SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,o=e.isRtl;return Ag("div",nm({},iD(e,"container",{"--is-disabled":r,"--is-rtl":o}),n),t)},SingleValue:eI,ValueContainer:function(e){var t=e.children,n=e.innerProps,r=e.isMulti,o=e.hasValue;return Ag("div",nm({},iD(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),n),t)}},nI=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function rI(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||nI(r)&&nI(o)))return!1;var r,o;return!0}for(var oI={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"},iI=function(e){return Ag("span",nm({css:oI},e))},aI={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,l=e.isDisabled,s=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=l?" disabled":"",f="".concat(s?" selected":"").concat(d);return"".concat(i).concat(f,", ").concat(u(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},lI=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,o=e.focusableOptions,i=e.isFocused,a=e.selectValue,l=e.selectProps,c=e.id,u=e.isAppleDevice,d=l.ariaLiveMessages,f=l.getOptionLabel,p=l.inputValue,h=l.isMulti,m=l.isOptionDisabled,g=l.isSearchable,y=l.menuIsOpen,v=l.options,b=l.screenReaderStatus,w=l.tabSelectsValue,x=l.isLoading,k=l["aria-label"],S=l["aria-live"],E=s.useMemo((function(){return BA(BA({},aI),d||{})}),[d]),_=s.useMemo((function(){var e,n="";if(t&&E.onChange){var r=t.option,o=t.options,i=t.removedValue,l=t.removedValues,s=t.value,c=i||r||(e=s,Array.isArray(e)?null:e),u=c?f(c):"",d=o||l||void 0,p=d?d.map(f):[],h=BA({isDisabled:c&&m(c,a),label:u,labels:p},t);n=E.onChange(h)}return n}),[t,E,m,a,f]),C=s.useMemo((function(){var e="",t=n||r,i=!!(n&&a&&a.includes(n));if(t&&E.onFocus){var l={focused:t,label:f(t),isDisabled:m(t,a),isSelected:i,options:o,context:t===n?"menu":"value",selectValue:a,isAppleDevice:u};e=E.onFocus(l)}return e}),[n,r,f,m,E,o,a,u]),O=s.useMemo((function(){var e="";if(y&&v.length&&!x&&E.onFilter){var t=b({count:o.length});e=E.onFilter({inputValue:p,resultsMessage:t})}return e}),[o,p,y,E,v,b,x]),N="initial-input-focus"===(null==t?void 0:t.action),P=s.useMemo((function(){var e="";if(E.guidance){var t=r?"value":y?"menu":"input";e=E.guidance({"aria-label":k,context:t,isDisabled:n&&m(n,a),isMulti:h,isSearchable:g,tabSelectsValue:w,isInitialFocus:N})}return e}),[k,n,r,h,m,g,y,E,a,w,N]),R=Ag(s.Fragment,null,Ag("span",{id:"aria-selection"},_),Ag("span",{id:"aria-focused"},C),Ag("span",{id:"aria-results"},O),Ag("span",{id:"aria-guidance"},P));return Ag(s.Fragment,null,Ag(iI,{id:c},N&&R),Ag(iI,{"aria-live":S,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!N&&R))},sI=[{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źẑżžẓẕƶȥɀⱬꝣ"}],cI=new RegExp("["+sI.map((function(e){return e.letters})).join("")+"]","g"),uI={},dI=0;dI<sI.length;dI++)for(var fI=sI[dI],pI=0;pI<fI.letters.length;pI++)uI[fI.letters[pI]]=fI.base;var hI=function(e){return e.replace(cI,(function(e){return uI[e]}))},mI=function(e,t){void 0===t&&(t=rI);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}(hI),gI=function(e){return e.replace(/^\s+|\s+$/g,"")},yI=function(e){return"".concat(e.label," ").concat(e.value)},vI=["innerRef"];function bI(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=UA(e,1)[0];return!n.includes(t)}));return o.reduce((function(e,t){var n=UA(t,2),r=n[0],o=n[1];return e[r]=o,e}),{})}(WA(e,vI),"onExited","in","enter","exit","appear");return Ag("input",nm({ref:t},n,{css:Dg({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)"},"","")}))}var wI=["boxSizing","height","overflow","paddingRight","position"],xI={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function kI(e){e.cancelable&&e.preventDefault()}function SI(e){e.stopPropagation()}function EI(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function _I(){return"ontouchstart"in window||navigator.maxTouchPoints}var CI=!("undefined"==typeof window||!window.document||!window.document.createElement),OI=0,NI={capture:!1,passive:!1};var PI=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},RI={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function MI(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=s.useRef(!1),l=s.useRef(!1),c=s.useRef(0),u=s.useRef(null),d=s.useCallback((function(e,t){if(null!==u.current){var s=u.current,c=s.scrollTop,d=s.scrollHeight,f=s.clientHeight,p=u.current,h=t>0,m=d-f-c,g=!1;m>t&&a.current&&(r&&r(e),a.current=!1),h&&l.current&&(i&&i(e),l.current=!1),h&&t>m?(n&&!a.current&&n(e),p.scrollTop=d,g=!0,a.current=!0):!h&&-t>c&&(o&&!l.current&&o(e),p.scrollTop=0,g=!0,l.current=!0),g&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}}),[n,r,o,i]),f=s.useCallback((function(e){d(e,e.deltaY)}),[d]),p=s.useCallback((function(e){c.current=e.changedTouches[0].clientY}),[]),h=s.useCallback((function(e){var t=c.current-e.changedTouches[0].clientY;d(e,t)}),[d]),m=s.useCallback((function(e){if(e){var t=!!mD&&{passive:!1};e.addEventListener("wheel",f,t),e.addEventListener("touchstart",p,t),e.addEventListener("touchmove",h,t)}}),[h,p,f]),g=s.useCallback((function(e){e&&(e.removeEventListener("wheel",f,!1),e.removeEventListener("touchstart",p,!1),e.removeEventListener("touchmove",h,!1))}),[h,p,f]);return s.useEffect((function(){if(t){var e=u.current;return m(e),function(){g(e)}}}),[t,m,g]),function(e){u.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=s.useRef({}),i=s.useRef(null),a=s.useCallback((function(e){if(CI){var t=document.body,n=t&&t.style;if(r&&wI.forEach((function(e){var t=n&&n[e];o.current[e]=t})),r&&OI<1){var i=parseInt(o.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,l=window.innerWidth-a+i||0;Object.keys(xI).forEach((function(e){var t=xI[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(l,"px"))}t&&_I()&&(t.addEventListener("touchmove",kI,NI),e&&(e.addEventListener("touchstart",EI,NI),e.addEventListener("touchmove",SI,NI))),OI+=1}}),[r]),l=s.useCallback((function(e){if(CI){var t=document.body,n=t&&t.style;OI=Math.max(OI-1,0),r&&OI<1&&wI.forEach((function(e){var t=o.current[e];n&&(n[e]=t)})),t&&_I()&&(t.removeEventListener("touchmove",kI,NI),e&&(e.removeEventListener("touchstart",EI,NI),e.removeEventListener("touchmove",SI,NI)))}}),[r]);return s.useEffect((function(){if(t){var e=i.current;return a(e),function(){l(e)}}}),[t,a,l]),function(e){i.current=e}}({isEnabled:n});return Ag(s.Fragment,null,n&&Ag("div",{onClick:PI,css:RI}),t((function(e){o(e),i(e)})))}var TI={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},AI=function(e){var t=e.name,n=e.onFocus;return Ag("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:TI,value:"",onChange:function(){}})};function DI(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 II(){return DI(/^Mac/i)}function LI(){return DI(/^iPhone/i)||DI(/^iPad/i)||II()&&navigator.maxTouchPoints>1}var zI,FI={clearIndicator:jD,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 BA({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:FD,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 BA({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 BA({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 BA(BA({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},KD),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 BA({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:RD,menu:function(e,t){var n,r=e.placement,o=e.theme,i=o.borderRadius,a=o.spacing,l=o.colors;return BA((jA(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),jA(n,"position","absolute"),jA(n,"width","100%"),jA(n,"zIndex",1),n),t?{}:{backgroundColor:l.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 BA({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 BA({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 BA({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 BA({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:PD,option:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.theme,a=i.spacing,l=i.colors;return BA({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:o?l.primary:r?l.primary25:"transparent",color:n?l.neutral20:o?l.neutral0:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),":active":{backgroundColor:n?void 0:o?l.primary:l.primary50}})},placeholder:function(e,t){var n=e.theme,r=n.spacing,o=n.colors;return BA({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 BA({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 BA({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")})}},jI={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}},$I={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:dD(),captureMenuScroll:!dD(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=BA({ignoreCase:!0,ignoreAccents:!0,stringify:yI,trim:!0,matchFrom:"any"},zI),r=n.ignoreCase,o=n.ignoreAccents,i=n.stringify,a=n.trim,l=n.matchFrom,s=a?gI(t):t,c=a?gI(i(e)):i(e);return r&&(s=s.toLowerCase(),c=c.toLowerCase()),o&&(s=mI(s),c=hI(c)),"start"===l?c.substr(0,s.length)===s:c.indexOf(s)>-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 BI(e,t,n,r){return{type:"option",data:t,isDisabled:YI(e,t,n),isSelected:GI(e,t,n),label:KI(e,t),value:XI(e,t),index:r}}function VI(e,t){return e.options.map((function(n,r){if("options"in n){var o=n.options.map((function(n,r){return BI(e,n,t,r)})).filter((function(t){return WI(e,t)}));return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=BI(e,n,t,r);return WI(e,i)?i:void 0})).filter(gD)}function HI(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,QA(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function UI(e,t){return e.reduce((function(e,n){return"group"===n.type?e.push.apply(e,QA(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 WI(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,i=t.isSelected,a=t.label,l=t.value;return(!ZI(e)||!i)&&QI(e,{label:a,value:l,data:o},r)}var qI=function(e,t){var n;return(null===(n=e.find((function(e){return e.data===t})))||void 0===n?void 0:n.id)||null},KI=function(e,t){return e.getOptionLabel(t)},XI=function(e,t){return e.getOptionValue(t)};function YI(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function GI(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=XI(e,t);return n.some((function(t){return XI(e,t)===r}))}function QI(e,t,n){return!e.filterOption||e.filterOption(t,n)}var ZI=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},JI=1,eL=function(e){!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&&qb(e,t)}(n,e);var t=GA(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=II()||LI(),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,l=o.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:l}),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,l=o&&r.isOptionSelected(e,a),s=r.isOptionDisabled(e,a);if(l){var c=r.getOptionValue(e);r.setValue(a.filter((function(e){return r.getOptionValue(e)!==c})),"deselect-option",e)}else{if(s)return void r.ariaOnChange(e,{action:"select-option",option:e,name:i});o?r.setValue([].concat(QA(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=yD(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(yD(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=yD(e,o,o[0]||null);n&&r.onChange(i,{action:"pop-value",removedValue:n})},r.getFocusedOptionId=function(e){return qI(r.state.focusableOptionsWithIds,e)},r.getFocusableOptionsWithIds=function(){return UI(VI(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 nD.apply(void 0,[r.props.classNamePrefix].concat(t))},r.getOptionLabel=function(e){return KI(r.props,e)},r.getOptionValue=function(e){return XI(r.props,e)},r.getStyles=function(e,t){var n=r.props.unstyled,o=FI[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,BA(BA({},tI),e.components);var e},r.buildCategorizedOptions=function(){return VI(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return HI(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(e,t){r.setState({ariaSelection:BA({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&&aD(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 ZI(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,l=t.isClearable,s=t.isDisabled,c=t.menuIsOpen,u=t.onKeyDown,d=t.tabSelectsValue,f=t.openMenuOnFocus,p=r.state,h=p.focusedOption,m=p.focusedValue,g=p.selectValue;if(!(s||"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():l&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!c||!d||!h||f&&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()):l&&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||++JI),r.state.selectValue=rD(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=qI(o,i[a])}return r}return function(e,t,n){t&&KA(e.prototype,t),n&&KA(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&&uD(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&&(uD(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 l=i.indexOf(r[0]);l>-1&&(a=l)}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(jI):BA(BA({},jI),this.props.theme):jI}},{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,l=this.props,s=l.isMulti,c=l.isRtl,u=l.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:s,isRtl:c,options:u,selectOption:i,selectProps:l,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 YI(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return GI(this.props,e,t)}},{key:"filterOption",value:function(e,t){return QI(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 e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,i=e.tabIndex,a=e.form,l=e.menuIsOpen,c=e.required,u=this.getComponents().Input,d=this.state,f=d.inputIsHidden,p=d.ariaSelection,h=this.commonProps,m=r||this.getElementId("input"),g=BA(BA(BA({"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")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==p?void 0:p.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?s.createElement(u,nm({},h,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:m,innerRef:this.getInputRef,isDisabled:t,isHidden:f,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:i,form:a,type:"text",value:o},g)):s.createElement(bI,nm({id:m,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:eD,onFocus:this.onInputFocus,disabled:t,tabIndex:i,inputMode:"none",form:a,value:""},g))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,i=t.MultiValueRemove,a=t.SingleValue,l=t.Placeholder,c=this.commonProps,u=this.props,d=u.controlShouldRenderValue,f=u.isDisabled,p=u.isMulti,h=u.inputValue,m=u.placeholder,g=this.state,y=g.selectValue,v=g.focusedValue,b=g.isFocused;if(!this.hasValue()||!d)return h?null:s.createElement(l,nm({},c,{key:"placeholder",isDisabled:f,isFocused:b,innerProps:{id:this.getElementId("placeholder")}}),m);if(p)return y.map((function(t,a){var l=t===v,u="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return s.createElement(n,nm({},c,{components:{Container:r,Label:o,Remove:i},isFocused:l,isDisabled:f,key:u,index:a,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))}));if(h)return null;var w=y[0];return s.createElement(a,nm({},c,{data:w,isDisabled:f}),this.formatOptionLabel(w,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return s.createElement(e,nm({},t,{innerProps:a,isFocused:i}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;if(!e||!o)return null;return s.createElement(e,nm({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:i}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,i=this.state.isFocused;return s.createElement(n,nm({},r,{isDisabled:o,isFocused:i}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return s.createElement(e,nm({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,r=t.GroupHeading,o=t.Menu,i=t.MenuList,a=t.MenuPortal,l=t.LoadingMessage,c=t.NoOptionsMessage,u=t.Option,d=this.commonProps,f=this.state.focusedOption,p=this.props,h=p.captureMenuScroll,m=p.inputValue,g=p.isLoading,y=p.loadingMessage,v=p.minMenuHeight,b=p.maxMenuHeight,w=p.menuIsOpen,x=p.menuPlacement,k=p.menuPosition,S=p.menuPortalTarget,E=p.menuShouldBlockScroll,_=p.menuShouldScrollIntoView,C=p.noOptionsMessage,O=p.onMenuScrollToTop,N=p.onMenuScrollToBottom;if(!w)return null;var P,R=function(t,n){var r=t.type,o=t.data,i=t.isDisabled,a=t.isSelected,l=t.label,c=t.value,p=f===o,h=i?void 0:function(){return e.onOptionHover(o)},m=i?void 0:function(){return e.selectOption(o)},g="".concat(e.getElementId("option"),"-").concat(n),y={id:g,onClick:m,onMouseMove:h,onMouseOver:h,tabIndex:-1,role:"option","aria-selected":e.isAppleDevice?void 0:a};return s.createElement(u,nm({},d,{innerProps:y,data:o,isDisabled:i,isSelected:a,key:g,label:l,type:r,value:c,isFocused:p,innerRef:p?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())P=this.getCategorizedOptions().map((function(t){if("group"===t.type){var o=t.data,i=t.options,a=t.index,l="".concat(e.getElementId("group"),"-").concat(a),c="".concat(l,"-heading");return s.createElement(n,nm({},d,{key:l,data:o,options:i,Heading:r,headingProps:{id:c,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return R(e,"".concat(a,"-").concat(e.index))})))}if("option"===t.type)return R(t,"".concat(t.index))}));else if(g){var M=y({inputValue:m});if(null===M)return null;P=s.createElement(l,d,M)}else{var T=C({inputValue:m});if(null===T)return null;P=s.createElement(c,d,T)}var A={minMenuHeight:v,maxMenuHeight:b,menuPlacement:x,menuPosition:k,menuShouldScrollIntoView:_},D=s.createElement(CD,nm({},d,A),(function(t){var n=t.ref,r=t.placerProps,a=r.placement,l=r.maxHeight;return s.createElement(o,nm({},d,A,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:g,placement:a}),s.createElement(MI,{captureEnabled:h,onTopArrive:O,onBottomArrive:N,lockEnabled:E},(function(t){return s.createElement(i,nm({},d,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:"listbox","aria-multiselectable":d.isMulti,id:e.getElementId("listbox")},isLoading:g,maxHeight:l,focusedOption:f}),P)})))}));return S||"fixed"===k?s.createElement(a,nm({},d,{appendTo:S,controlElement:this.controlRef,menuPlacement:x,menuPosition:k}),D):D}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,i=t.name,a=t.required,l=this.state.selectValue;if(a&&!this.hasValue()&&!r)return s.createElement(AI,{name:i,onFocus:this.onValueInputFocus});if(i&&!r){if(o){if(n){var c=l.map((function(t){return e.getOptionValue(t)})).join(n);return s.createElement("input",{name:i,type:"hidden",value:c})}var u=l.length>0?l.map((function(t,n){return s.createElement("input",{key:"i-".concat(n),name:i,type:"hidden",value:e.getOptionValue(t)})})):s.createElement("input",{name:i,type:"hidden",value:""});return s.createElement("div",null,u)}var d=l[0]?this.getOptionValue(l[0]):"";return s.createElement("input",{name:i,type:"hidden",value:d})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,i=t.isFocused,a=t.selectValue,l=this.getFocusableOptions();return s.createElement(lI,nm({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:r,focusedValue:o,isFocused:i,selectValue:a,focusableOptions:l,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,i=this.props,a=i.className,l=i.id,c=i.isDisabled,u=i.menuIsOpen,d=this.state.isFocused,f=this.commonProps=this.getCommonProps();return s.createElement(r,nm({},f,{className:a,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:d}),this.renderLiveRegion(),s.createElement(t,nm({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:d,menuIsOpen:u}),s.createElement(o,nm({},f,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),s.createElement(n,nm({},f,{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,l=t.prevWasFocused,s=t.instancePrefix,c=e.options,u=e.value,d=e.menuIsOpen,f=e.inputValue,p=e.isMulti,h=rD(u),m={};if(n&&(u!==n.value||c!==n.options||d!==n.menuIsOpen||f!==n.inputValue)){var g=d?function(e,t){return HI(VI(e,t))}(e,h):[],y=d?UI(VI(e,h),"".concat(s,"-option")):[],v=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,b=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,g);m={selectValue:h,focusedOption:b,focusedOptionId:qI(y,b),focusableOptionsWithIds:y,focusedValue:v,clearFocusValueOnUpdate:!1}}var w=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},x=i,k=a&&l;return a&&!k&&(x={value:yD(p,h,h[0]||null),options:h,action:"initial-input-focus"},k=!l),"initial-input-focus"===(null==i?void 0:i.action)&&(x=null),BA(BA(BA({},m),w),{},{prevProps:e,ariaSelection:x,prevWasFocused:k})}}]),n}(s.Component);eL.defaultProps=$I;var tL=s.forwardRef((function(e,t){var n=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,l=e.inputValue,c=e.menuIsOpen,u=e.onChange,d=e.onInputChange,f=e.onMenuClose,p=e.onMenuOpen,h=e.value,m=WA(e,qA),g=UA(s.useState(void 0!==l?l:n),2),y=g[0],v=g[1],b=UA(s.useState(void 0!==c?c:o),2),w=b[0],x=b[1],k=UA(s.useState(void 0!==h?h:a),2),S=k[0],E=k[1],_=s.useCallback((function(e,t){"function"==typeof u&&u(e,t),E(e)}),[u]),C=s.useCallback((function(e,t){var n;"function"==typeof d&&(n=d(e,t)),v(void 0!==n?n:e)}),[d]),O=s.useCallback((function(){"function"==typeof p&&p(),x(!0)}),[p]),N=s.useCallback((function(){"function"==typeof f&&f(),x(!1)}),[f]),P=void 0!==l?l:y,R=void 0!==c?c:w,M=void 0!==h?h:S;return BA(BA({},m),{},{inputValue:P,menuIsOpen:R,onChange:_,onInputChange:C,onMenuClose:N,onMenuOpen:O,value:M})}(e);return s.createElement(eL,nm({ref:t},n))})),nL=tL;const rL=({options:e,items_per_page:t,className:n,defaultValue:r,onChange:o})=>{const[i,a]=s.useState(""),[l,c]=s.useState(0),u=e.filter((e=>e.label.toLowerCase().includes(i)||e.value.toLowerCase().includes(i)));var d;d=void 0!==t?u.slice(l*t,(l+1)*t):u;const f={control:e=>({...e,minHeight:void 0})};return s.createElement(nL,{options:d,onInputChange:e=>{a(e.toLowerCase()),c(0)},onChange:o,inputValue:i,isSearchable:!0,placeholder:"Select an option...",className:n,unstyled:!0,styles:f,classNamePrefix:"styled-select",defaultValue:r,value:r})},oL=({io:e,inputconverter:t,parser:n=e=>parseFloat(e)})=>{const r=s.useContext($z),[o,i]=s.useState(t[1](e.value));s.useEffect((()=>{i(t[1](e.value))}),[e.value]);const a=o=>{o=n(parseFloat(o.toString()).toString()),isNaN(o)?(o="<NoValue>",i("")):(void 0!==e.value_options?.min&&o<e.value_options.min&&(o=e.value_options.min),void 0!==e.value_options?.max&&o>e.value_options.max&&(o=e.value_options.max),i(o.toString()));try{o=t[0](o)}catch(e){}r.worker?.set_io_value({nid:e.node,ioid:e.id,value:o,set_default:e.render_options.set_default})};let l=e.connected?t[1](e.value):o;return void 0===l&&(l=e.value_options?.min),void 0===l&&(l=e.value_options?.max),void 0===l&&(l=""),null===l&&(l=""),void 0!==e.value_options?.max&&void 0!==e.value_options?.min?s.createElement("div",{style:{minWidth:"100px"},className:"SliderContainer"},s.createElement(AA,{className:"SliderRoot",value:[void 0===l?e.value_options?.min:l],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])||a(e[0])},onValueChange:e=>{isNaN(e[0])||i(e[0].toString())}},s.createElement(DA,{className:"SliderTrack"},s.createElement(IA,{className:"SliderRange"})),s.createElement(XM,null,s.createElement(hT,{open:!0},s.createElement(mT,{asChild:!0},s.createElement(LA,{className:"SliderThumb"})),s.createElement(yT,{className:"SliderTooltipContent"},l))))):s.createElement("input",{type:"text",className:"nodedatainput styledinput numberinput",value:l,onChange:e=>i(e.target.value),onBlur:e=>{a(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(l)||0)-n;a(r)}else{let n=e.render_options.step||1;t.shiftKey&&(n*=10);let r=(parseFloat(l)||0)+n;a(r)}},disabled:e.connected,step:e.render_options.step,min:e.value_options?.min,max:e.value_options?.max})},iL=({io:e,inputconverter:t})=>{const n=s.useContext($z),[r,o]=s.useState(t[1](e.value));s.useEffect((()=>{o(t[1](e.value))}),[e.value]);let i=e.connected?t[1](e.value):r;return null==i&&(i=""),s.createElement("input",{className:"nodedatainput styledinput stringinput",value:i,onChange:e=>o(e.target.value),onBlur:r=>{let o=r.target.value;o||(o="<NoValue>");try{o=t[0](o)}catch(r){}n.worker?.set_io_value({nid:e.node,ioid:e.id,value:o,set_default:e.render_options.set_default})},disabled:e.connected})},aL=e=>e,lL=e=>parseFloat(e),sL=e=>!!e,cL=e=>"null"===e?null:e,uL=({io:e,inputconverter:t,parser:n})=>{let r=e.value_options?.options||[];Array.isArray(r)&&(r={type:"enum",values:r,keys:r.map((e=>null===e?"None":e.toString())),nullable:!1}),"enum"!==r.type&&(r={type:"enum",values:Object.values(r),keys:Object.keys(r),nullable:!1}),!r.nullable||r.values.includes(null)||r.keys.includes("None")||(r.values.unshift(null),r.keys.unshift("None"));const o=[];for(let e=0;e<r.values.length;e++){const t=null===r.values[e]||void 0===r.values[e]?"undefined":typeof r.values[e];let n=r.values[e];null===n&&(n="null"),void 0===n&&(n="undefined"),o.push([r.keys[e],n.toString(),t])}const i=s.useContext($z),a=({value:r,datatype:o})=>{const a=n||(e=>"nuinputconvertermber"===e?lL:"boolean"===e?sL:"undefined"===e?cL:aL)(o);let l=a(r);try{l=t[0](r)}catch(e){}i.worker?.set_io_value({nid:e.node,ioid:e.id,value:l,set_default:e.render_options.set_default})};let l=e.value;null===l&&(l="null"),void 0===l&&(l="undefined");const c=o.find((e=>e[1]===l.toString()));let u;void 0!==c&&(u={value:c[1],label:c[0],datatype:c[2]});const d=o.map((e=>({value:e[1],label:e[0],datatype:e[2]})));return s.createElement(rL,{className:"nodedatainput styleddropdown",options:d,defaultValue:u,onChange:e=>{a(null!==e?e:{value:"<NoValue>",datatype:"string"})}})},dL=e=>!!e&&e instanceof Date,fL=e=>!!e&&e instanceof Object&&"function"==typeof e;function pL(e,t){return void 0===t&&(t=!1),!e||t?`"${e}"`:e}function hL(e){let{field:t,value:n,data:r,lastElement:o,openBracket:i,closeBracket:a,level:l,style:c,shouldExpandNode:u,clickToExpandNode:d,outerRef:f}=e;const p=s.useRef(!1),[h,m,g]=function(e){const[t,n]=s.useState(e());return[t,()=>n((e=>!e)),n]}((()=>u(l,n,t))),y=s.useRef(null);s.useEffect((()=>{p.current?g(u(l,n,t)):p.current=!0}),[u]);const v=h?c.collapseIcon:c.expandIcon,b=h?"collapse JSON":"expand JSON",w=s.useId(),x=l+1,k=r.length-1,S=e=>{if("ArrowRight"===e.key||"ArrowLeft"===e.key)e.preventDefault(),g("ArrowRight"===e.key);else if("ArrowUp"===e.key||"ArrowDown"===e.key){e.preventDefault();const t="ArrowUp"===e.key?-1:1;if(!f.current)return;const n=f.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()}},E=()=>{var e;m();const t=y.current;if(!t)return;const n=null===(e=f.current)||void 0===e?void 0:e.querySelector('[role=button][tabindex="0"]');n&&(n.tabIndex=-1),t.tabIndex=0,t.focus()};return s.createElement("div",{className:c.basicChildStyle,role:"treeitem","aria-expanded":h,"aria-selected":void 0},s.createElement("span",{className:v,onClick:E,onKeyDown:S,role:"button","aria-label":b,"aria-expanded":h,"aria-controls":h?w:void 0,ref:y,tabIndex:0===l?0:-1}),(t||""===t)&&(d?s.createElement("span",{className:c.clickableLabel,onClick:E,onKeyDown:S},pL(t,c.quotesForFieldNames),":"):s.createElement("span",{className:c.label},pL(t,c.quotesForFieldNames),":")),s.createElement("span",{className:c.punctuation},i),h?s.createElement("ul",{id:w,role:"group",className:c.childFieldsContainer},r.map(((e,t)=>s.createElement(bL,{key:e[0]||t,field:e[0],value:e[1],style:c,lastElement:t===k,level:x,shouldExpandNode:u,clickToExpandNode:d,outerRef:f})))):s.createElement("span",{className:c.collapsedContent,onClick:E,onKeyDown:S}),s.createElement("span",{className:c.punctuation},a),!o&&s.createElement("span",{className:c.punctuation},","))}function mL(e){let{field:t,openBracket:n,closeBracket:r,lastElement:o,style:i}=e;return s.createElement("div",{className:i.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||""===t)&&s.createElement("span",{className:i.label},pL(t,i.quotesForFieldNames),":"),s.createElement("span",{className:i.punctuation},n),s.createElement("span",{className:i.punctuation},r),!o&&s.createElement("span",{className:i.punctuation},","))}function gL(e){let{field:t,value:n,style:r,lastElement:o,shouldExpandNode:i,clickToExpandNode:a,level:l,outerRef:s}=e;return 0===Object.keys(n).length?mL({field:t,openBracket:"{",closeBracket:"}",lastElement:o,style:r}):hL({field:t,value:n,lastElement:o||!1,level:l,openBracket:"{",closeBracket:"}",style:r,shouldExpandNode:i,clickToExpandNode:a,data:Object.keys(n).map((e=>[e,n[e]])),outerRef:s})}function yL(e){let{field:t,value:n,style:r,lastElement:o,level:i,shouldExpandNode:a,clickToExpandNode:l,outerRef:s}=e;return 0===n.length?mL({field:t,openBracket:"[",closeBracket:"]",lastElement:o,style:r}):hL({field:t,value:n,lastElement:o||!1,level:i,openBracket:"[",closeBracket:"]",style:r,shouldExpandNode:a,clickToExpandNode:l,data:n.map((e=>[void 0,e])),outerRef:s})}function vL(e){let t,{field:n,value:r,style:o,lastElement:i}=e,a=o.otherValue;var l;return null===r?(t="null",a=o.nullValue):void 0===r?(t="undefined",a=o.undefinedValue):"string"==typeof(l=r)||l 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=dL(r)?r.toISOString():fL(r)?"function() { }":r.toString(),s.createElement("div",{className:o.basicChildStyle,role:"treeitem","aria-selected":void 0},(n||""===n)&&s.createElement("span",{className:o.label},pL(n,o.quotesForFieldNames),":"),s.createElement("span",{className:a},t),!i&&s.createElement("span",{className:o.punctuation},","))}function bL(e){const t=e.value;return n=t,Array.isArray(n)?s.createElement(yL,Object.assign({},e)):!(e=>"object"==typeof e&&null!==e)(t)||dL(t)||fL(t)?s.createElement(vL,Object.assign({},e)):s.createElement(gL,Object.assign({},e));var n}var wL="_2bkNM",xL="_1BXBN";const kL={container:"_2IvMF _GzYRV",basicChildStyle:wL,childFieldsContainer:xL,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},SL={container:"_11RoI _GzYRV",basicChildStyle:wL,childFieldsContainer:xL,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},EL=()=>!0,_L=e=>e<1,CL=e=>{let{data:t,style:n=kL,shouldExpandNode:r=EL,clickToExpandNode:o=!1,...i}=e;const a=s.useRef(null);return s.createElement("div",Object.assign({"aria-label":"JSON view"},i,{className:n.container,ref:a,role:"tree"}),s.createElement(bL,{value:t,style:{...kL,...n},lastElement:!0,level:0,shouldExpandNode:r,clickToExpandNode:o,outerRef:a}))},OL=({data:e})=>s.createElement(CL,{data:e,style:SL,shouldExpandNode:_L}),NL=({tabledata:e})=>{const t=s.useMemo((()=>(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]),[n,r]=s.useState("asc"),[o,i]=s.useState("index");let a=t.header.indexOf(o);-1===a&&(a=0);const l=((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]))})(t.rows,(e=>"desc"===e?(e,t)=>t[a]<e[a]?-1:1:(e,t)=>e[a]<t[a]?-1:1)(n));return s.createElement(Ab,{className:"tablecontainer"},s.createElement(wb,{size:"small"},s.createElement(Fb,{className:"tableHead"},s.createElement(Hb,{className:"tableheadercolor"},t.header.map((e=>s.createElement(Rb,{key:e,sortDirection:o===e&&n,className:"tableheadercolor"},s.createElement(bw,{active:o===e,direction:o===e?n:"asc",onClick:()=>(e=>{r(o===e&&"asc"===n?"desc":"asc"),i(e)})(e),className:"tableheadercolor",sx:{"& .MuiTableSortLabel-icon":{color:"inherit !important"}}},e)))))),s.createElement(Cb,null,l.map(((t,n)=>s.createElement(Hb,{key:e.index[n]},t.map(((e,t)=>s.createElement(Rb,{key:t,className:0==t?"indexcol":"datacol"},e)))))))))};var PL,RL={};
91
+ `,lw=s.forwardRef((function(e,t){const n=Xv({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:o={},className:i,...a}=n,[l,c]=s.useState([]),u=s.useRef(0),d=s.useRef(null);s.useEffect((()=>{d.current&&(d.current(),d.current=null)}),[l]);const f=s.useRef(!1),p=Hp(),h=s.useRef(null),m=s.useRef(null),g=s.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:i,cb:a}=e;c((e=>[...e,Bu.jsx(aw,{classes:{ripple:Jp(o.ripple,tw.ripple),rippleVisible:Jp(o.rippleVisible,tw.rippleVisible),ripplePulsate:Jp(o.ripplePulsate,tw.ripplePulsate),child:Jp(o.child,tw.child),childLeaving:Jp(o.childLeaving,tw.childLeaving),childPulsate:Jp(o.childPulsate,tw.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i},u.current)])),u.current+=1,d.current=a}),[o]),y=s.useCallback(((e={},t={},n=()=>{})=>{const{pulsate:o=!1,center:i=r||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===e?.type&&f.current)return void(f.current=!1);"touchstart"===e?.type&&(f.current=!0);const l=a?null:m.current,s=l?l.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(s.width/2),u=Math.round(s.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-s.left),u=Math.round(n-s.top)}if(i)d=Math.sqrt((2*s.width**2+s.height**2)/3),d%2==0&&(d+=1);else{const e=2*Math.max(Math.abs((l?l.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((l?l.clientHeight:0)-u),u)+2;d=Math.sqrt(e**2+t**2)}e?.touches?null===h.current&&(h.current=()=>{g({pulsate:o,rippleX:c,rippleY:u,rippleSize:d,cb:n})},p.start(80,(()=>{h.current&&(h.current(),h.current=null)}))):g({pulsate:o,rippleX:c,rippleY:u,rippleSize:d,cb:n})}),[r,g,p]),v=s.useCallback((()=>{y({},{pulsate:!0})}),[y]),b=s.useCallback(((e,t)=>{if(p.clear(),"touchend"===e?.type&&h.current)return h.current(),h.current=null,void p.start(0,(()=>{b(e,t)}));h.current=null,c((e=>e.length>0?e.slice(1):e)),d.current=t}),[p]);return s.useImperativeHandle(t,(()=>({pulsate:v,start:y,stop:b})),[v,y,b]),Bu.jsx(iw,{className:Jp(tw.root,o.root,i),ref:m,...a,children:Bu.jsx(ew,{component:null,exit:!0,children:l})})}));function sw(e){return Gp("MuiButtonBase",e)}const cw=Qp("MuiButtonBase",["root","disabled","focusVisible"]),uw=qv("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"},[`&.${cw.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),dw=s.forwardRef((function(e,t){const n=Xv({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:o=!1,children:i,className:a,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:d=!1,focusRipple:f=!1,focusVisibleClassName:p,LinkComponent:h="a",onBlur:m,onClick:g,onContextMenu:y,onDragLeave:v,onFocus:b,onFocusVisible:w,onKeyDown:x,onKeyUp:k,onMouseDown:S,onMouseLeave:E,onMouseUp:_,onTouchEnd:C,onTouchMove:O,onTouchStart:N,tabIndex:P=0,TouchRippleProps:R,touchRippleRef:M,type:T,...A}=n,D=s.useRef(null),I=Ub.use(),L=Fp(I.ref,M),[z,F]=s.useState(!1);c&&z&&F(!1),s.useImperativeHandle(r,(()=>({focusVisible:()=>{F(!0),D.current.focus()}})),[]);const j=I.shouldMount&&!u&&!c;s.useEffect((()=>{z&&f&&!u&&I.pulsate()}),[u,f,z,I]);const $=fw(I,"start",S,d),B=fw(I,"stop",y,d),V=fw(I,"stop",v,d),H=fw(I,"stop",_,d),U=fw(I,"stop",(e=>{z&&e.preventDefault(),E&&E(e)}),d),W=fw(I,"start",N,d),q=fw(I,"stop",C,d),K=fw(I,"stop",O,d),X=fw(I,"stop",(e=>{Up(e.target)||F(!1),m&&m(e)}),!1),Y=zp((e=>{D.current||(D.current=e.currentTarget),Up(e.target)&&(F(!0),w&&w(e)),b&&b(e)})),G=()=>{const e=D.current;return l&&"button"!==l&&!("A"===e.tagName&&e.href)},Q=zp((e=>{f&&!e.repeat&&z&&" "===e.key&&I.stop(e,(()=>{I.start(e)})),e.target===e.currentTarget&&G()&&" "===e.key&&e.preventDefault(),x&&x(e),e.target===e.currentTarget&&G()&&"Enter"===e.key&&!c&&(e.preventDefault(),g&&g(e))})),Z=zp((e=>{f&&" "===e.key&&z&&!e.defaultPrevented&&I.stop(e,(()=>{I.pulsate(e)})),k&&k(e),g&&e.target===e.currentTarget&&G()&&" "===e.key&&!e.defaultPrevented&&g(e)}));let J=l;"button"===J&&(A.href||A.to)&&(J=h);const ee={};"button"===J?(ee.type=void 0===T?"button":T,ee.disabled=c):(A.href||A.to||(ee.role="button"),c&&(ee["aria-disabled"]=c));const te=Fp(t,D),ne={...n,centerRipple:o,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:f,tabIndex:P,focusVisible:z},re=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i=qp({root:["root",t&&"disabled",n&&"focusVisible"]},sw,o);return n&&r&&(i.root+=` ${r}`),i})(ne);return Bu.jsxs(uw,{as:J,className:Jp(re.root,a),ownerState:ne,onBlur:X,onClick:g,onContextMenu:B,onFocus:Y,onKeyDown:Q,onKeyUp:Z,onMouseDown:$,onMouseLeave:U,onMouseUp:H,onDragLeave:V,onTouchEnd:q,onTouchMove:K,onTouchStart:W,ref:te,tabIndex:c?-1:P,type:T,...ee,...A,children:[i,j?Bu.jsx(lw,{ref:L,center:o,...R}):null]})}));function fw(e,t,n,r=!1){return zp((o=>(n&&n(o),r||e[t](o),!0)))}var pw=Zv(Bu.jsx("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward");function hw(e){return Gp("MuiTableSortLabel",e)}const mw=Qp("MuiTableSortLabel",["root","active","icon","iconDirectionDesc","iconDirectionAsc","directionDesc","directionAsc"]);function gw(e,t){const{className:n,elementType:r,ownerState:o,externalForwardedProps:i,internalForwardedProps:a,shouldForwardComponentProp:l=!1,...s}=t,{component:c,slots:u={[e]:void 0},slotProps:d={[e]:void 0},...f}=i,p=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}=th({className:n,...s,externalForwardedProps:"root"===e?f:void 0,externalSlotProps:h}),v=Fp(y,h?.ref,t.ref),b="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}}}(p,{..."root"===e&&!c&&!u[e]&&a,..."root"!==e&&!u[e]&&a,...g,...b&&!l&&{as:b},...b&&l&&{component:b},ref:v},o);return[p,w]}const yw=qv(dw,{name:"MuiTableSortLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.active&&t.active]}})(Kv((({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,[`& .${mw.icon}`]:{opacity:.5}},[`&.${mw.active}`]:{color:(e.vars||e).palette.text.primary,[`& .${mw.icon}`]:{opacity:1,color:(e.vars||e).palette.text.secondary}}})))),vw=qv("span",{name:"MuiTableSortLabel",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,t[`iconDirection${Ip(n.direction)}`]]}})(Kv((({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)"}}]})))),bw=s.forwardRef((function(e,t){const n=Xv({props:e,name:"MuiTableSortLabel"}),{active:r=!1,children:o,className:i,direction:a="asc",hideSortIcon:l=!1,IconComponent:s=pw,slots:c={},slotProps:u={},...d}=n,f={...n,active:r,direction:a,hideSortIcon:l,IconComponent:s},p=(e=>{const{classes:t,direction:n,active:r}=e;return qp({root:["root",r&&"active",`direction${Ip(n)}`],icon:["icon",`iconDirection${Ip(n)}`]},hw,t)})(f),h={slots:c,slotProps:u},[m,g]=gw("root",{elementType:yw,externalForwardedProps:h,ownerState:f,className:Jp(p.root,i),ref:t}),[y,v]=gw("icon",{elementType:vw,externalForwardedProps:h,ownerState:f,className:p.icon});return Bu.jsxs(m,{disableRipple:!0,component:"span",...g,...d,children:[o,l&&!r?null:Bu.jsx(y,{as:s,...v})]})}));var ww=Zv(Bu.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"),xw=Zv(Bu.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"),kw=Zv(Bu.jsx("path",{d:"M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"}),"FullscreenExit"),Sw=Zv(Bu.jsx("path",{d:"M22 3.41 16.71 8.7 20 12h-8V4l3.29 3.29L20.59 2zM3.41 22l5.29-5.29L12 20v-8H4l3.29 3.29L2 20.59z"}),"CloseFullscreen"),Ew=Zv(Bu.jsx("path",{d:"M21 11V3h-8l3.29 3.29-10 10L3 13v8h8l-3.29-3.29 10-10z"}),"OpenInFull");const _w=({trigger:e,title:t,description:n,children:r,closebutton:o=!0,onOpenChange:i,buttons:a=[],open:l,setOpen:c,modal:u=!0})=>s.createElement(rp,{open:l,onOpenChange:e=>{c&&c(e),i&&i(e)},modal:u},e&&s.createElement(op,{asChild:!0},e),s.createElement(ip,null,s.createElement(ap,{className:"dialogoverlay funcnodescontainer"}),s.createElement(lp,{className:"dialogconent funcnodescontainer "},t&&s.createElement(sp,{className:"dialogtitle"},t),n&&s.createElement(cp,{className:"dialogdescription"},n),s.createElement("div",{className:"dialogchildren"},r),s.createElement("div",{style:{display:"flex",marginTop:25,justifyContent:"flex-end"}},(a||[]).map(((e,t)=>s.createElement(up,{asChild:!0,key:t},s.createElement("button",{className:"dialogsendbutton",onClick:e.onClick},e.text))))),o&&s.createElement(up,{asChild:!0},s.createElement("button",{className:"dialogclosebutton","aria-label":"Close"},s.createElement(ww,null))))));function Cw(e){const t=e+"CollectionProvider",[n,r]=Vu(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=e=>{const{scope:t,children:n}=e,r=c.useRef(null),i=c.useRef(new Map).current;return Bu.jsx(o,{scope:t,itemMap:i,collectionRef:r,children:n})};a.displayName=t;const l=e+"CollectionSlot",s=c.forwardRef(((e,t)=>{const{scope:n,children:r}=e,o=Lu(t,i(l,n).collectionRef);return Bu.jsx(Gu,{ref:o,children:r})}));s.displayName=l;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=c.forwardRef(((e,t)=>{const{scope:n,children:r,...o}=e,a=c.useRef(null),l=Lu(t,a),s=i(u,n);return c.useEffect((()=>(s.itemMap.set(a,{ref:a,...o}),()=>{s.itemMap.delete(a)}))),Bu.jsx(Gu,{[d]:"",ref:l,children:r})}));return f.displayName=u,[{Provider:a,Slot:s,ItemSlot:f},function(t){const n=i(e+"CollectionConsumer",t);return c.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[n.collectionRef,n.itemMap])},r]}var Ow=s.createContext(void 0);function Nw(e){const t=s.useContext(Ow);return e||t||"ltr"}const Pw=["top","right","bottom","left"],Rw=Math.min,Mw=Math.max,Tw=Math.round,Aw=Math.floor,Dw=e=>({x:e,y:e}),Iw={left:"right",right:"left",bottom:"top",top:"bottom"},Lw={start:"end",end:"start"};function zw(e,t,n){return Mw(e,Rw(t,n))}function Fw(e,t){return"function"==typeof e?e(t):e}function jw(e){return e.split("-")[0]}function $w(e){return e.split("-")[1]}function Bw(e){return"x"===e?"y":"x"}function Vw(e){return"y"===e?"height":"width"}function Hw(e){return["top","bottom"].includes(jw(e))?"y":"x"}function Uw(e){return Bw(Hw(e))}function Ww(e){return e.replace(/start|end/g,(e=>Lw[e]))}function qw(e){return e.replace(/left|right|bottom|top/g,(e=>Iw[e]))}function Kw(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 Xw(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 Yw(e,t,n){let{reference:r,floating:o}=e;const i=Hw(t),a=Uw(t),l=Vw(a),s=jw(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[l]/2-o[l]/2;let p;switch(s){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch($w(t)){case"start":p[a]-=f*(n&&c?-1:1);break;case"end":p[a]+=f*(n&&c?-1:1)}return p}async function Gw(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Fw(t,e),h=Kw(p),m=l[f?"floating"===d?"reference":"floating":d],g=Xw(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(l.floating)),boundary:c,rootBoundary:u,strategy:s})),y="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),b=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},w=Xw(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:v,strategy:s}):y);return{top:(g.top-w.top+h.top)/b.y,bottom:(w.bottom-g.bottom+h.bottom)/b.y,left:(g.left-w.left+h.left)/b.x,right:(w.right-g.right+h.right)/b.x}}function Qw(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Zw(e){return Pw.some((t=>e[t]>=0))}function Jw(){return"undefined"!=typeof window}function ex(e){return rx(e)?(e.nodeName||"").toLowerCase():"#document"}function tx(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function nx(e){var t;return null==(t=(rx(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function rx(e){return!!Jw()&&(e instanceof Node||e instanceof tx(e).Node)}function ox(e){return!!Jw()&&(e instanceof Element||e instanceof tx(e).Element)}function ix(e){return!!Jw()&&(e instanceof HTMLElement||e instanceof tx(e).HTMLElement)}function ax(e){return!(!Jw()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof tx(e).ShadowRoot)}function lx(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=px(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function sx(e){return["table","td","th"].includes(ex(e))}function cx(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function ux(e){const t=dx(),n=ox(e)?px(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 dx(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function fx(e){return["html","body","#document"].includes(ex(e))}function px(e){return tx(e).getComputedStyle(e)}function hx(e){return ox(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function mx(e){if("html"===ex(e))return e;const t=e.assignedSlot||e.parentNode||ax(e)&&e.host||nx(e);return ax(t)?t.host:t}function gx(e){const t=mx(e);return fx(t)?e.ownerDocument?e.ownerDocument.body:e.body:ix(t)&&lx(t)?t:gx(t)}function yx(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=gx(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=tx(o);if(i){const e=vx(a);return t.concat(a,a.visualViewport||[],lx(o)?o:[],e&&n?yx(e):[])}return t.concat(o,yx(o,[],n))}function vx(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function bx(e){const t=px(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ix(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,l=Tw(n)!==i||Tw(r)!==a;return l&&(n=i,r=a),{width:n,height:r,$:l}}function wx(e){return ox(e)?e:e.contextElement}function xx(e){const t=wx(e);if(!ix(t))return Dw(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=bx(t);let a=(i?Tw(n.width):n.width)/r,l=(i?Tw(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const kx=Dw(0);function Sx(e){const t=tx(e);return dx()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:kx}function Ex(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=wx(e);let a=Dw(1);t&&(r?ox(r)&&(a=xx(r)):a=xx(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==tx(e))&&t}(i,n,r)?Sx(i):Dw(0);let s=(o.left+l.x)/a.x,c=(o.top+l.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=tx(i),t=r&&ox(r)?tx(r):r;let n=e,o=vx(n);for(;o&&r&&t!==n;){const e=xx(o),t=o.getBoundingClientRect(),r=px(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,d*=e.y,s+=i,c+=a,n=tx(o),o=vx(n)}}return Xw({width:u,height:d,x:s,y:c})}function _x(e,t){const n=hx(e).scrollLeft;return t?t.left+n:Ex(nx(e)).left+n}function Cx(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:_x(e,r)),y:r.top+t.scrollTop}}function Ox(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=tx(e),r=nx(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,l=0,s=0;if(o){i=o.width,a=o.height;const e=dx();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}return{width:i,height:a,x:l,y:s}}(e,n);else if("document"===t)r=function(e){const t=nx(e),n=hx(e),r=e.ownerDocument.body,o=Mw(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Mw(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+_x(e);const l=-n.scrollTop;return"rtl"===px(r).direction&&(a+=Mw(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:l}}(nx(e));else if(ox(t))r=function(e,t){const n=Ex(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ix(e)?xx(e):Dw(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=Sx(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Xw(r)}function Nx(e,t){const n=mx(e);return!(n===t||!ox(n)||fx(n))&&("fixed"===px(n).position||Nx(n,t))}function Px(e,t,n){const r=ix(t),o=nx(t),i="fixed"===n,a=Ex(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const s=Dw(0);if(r||!r&&!i)if(("body"!==ex(t)||lx(o))&&(l=hx(t)),r){const e=Ex(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&(s.x=_x(o));const c=!o||r||i?Dw(0):Cx(o,l);return{x:a.left+l.scrollLeft-s.x-c.x,y:a.top+l.scrollTop-s.y-c.y,width:a.width,height:a.height}}function Rx(e){return"static"===px(e).position}function Mx(e,t){if(!ix(e)||"fixed"===px(e).position)return null;if(t)return t(e);let n=e.offsetParent;return nx(e)===n&&(n=n.ownerDocument.body),n}function Tx(e,t){const n=tx(e);if(cx(e))return n;if(!ix(e)){let t=mx(e);for(;t&&!fx(t);){if(ox(t)&&!Rx(t))return t;t=mx(t)}return n}let r=Mx(e,t);for(;r&&sx(r)&&Rx(r);)r=Mx(r,t);return r&&fx(r)&&Rx(r)&&!ux(r)?n:r||function(e){let t=mx(e);for(;ix(t)&&!fx(t);){if(ux(t))return t;if(cx(t))return null;t=mx(t)}return null}(e)||n}const Ax={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=nx(r),l=!!t&&cx(t.floating);if(r===a||l&&i)return n;let s={scrollLeft:0,scrollTop:0},c=Dw(1);const u=Dw(0),d=ix(r);if((d||!d&&!i)&&(("body"!==ex(r)||lx(a))&&(s=hx(r)),ix(r))){const e=Ex(r);c=xx(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const f=!a||d||i?Dw(0):Cx(a,s,!0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-s.scrollTop*c.y+u.y+f.y}},getDocumentElement:nx,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?cx(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=yx(e,[],!1).filter((e=>ox(e)&&"body"!==ex(e))),o=null;const i="fixed"===px(e).position;let a=i?mx(e):e;for(;ox(a)&&!fx(a);){const t=px(a),n=ux(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||lx(a)&&!n&&Nx(e,a))?r=r.filter((e=>e!==a)):o=t,a=mx(a)}return t.set(e,r),r}(t,this._c):[].concat(n),a=[...i,r],l=a[0],s=a.reduce(((e,n)=>{const r=Ox(t,n,o);return e.top=Mw(r.top,e.top),e.right=Rw(r.right,e.right),e.bottom=Rw(r.bottom,e.bottom),e.left=Mw(r.left,e.left),e}),Ox(t,l,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:Tx,getElementRects:async function(e){const t=this.getOffsetParent||Tx,n=this.getDimensions,r=await n(e.floating);return{reference:Px(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}=bx(e);return{width:t,height:n}},getScale:xx,isElement:ox,isRTL:function(e){return"rtl"===px(e).direction}};function Dx(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ix(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,c=wx(e),u=o||i?[...c?yx(c):[],...yx(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&l?function(e,t){let n,r=null;const o=nx(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(l||t(),!f||!p)return;const h={rootMargin:-Aw(d)+"px "+-Aw(o.clientWidth-(u+f))+"px "+-Aw(o.clientHeight-(d+p))+"px "+-Aw(u)+"px",threshold:Mw(0,Rw(1,s))||1};let m=!0;function g(t){const r=t[0].intersectionRatio;if(r!==s){if(!m)return a();r?a(!1,r):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}1!==r||Dx(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 f,p=-1,h=null;a&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),c&&!s&&h.observe(c),h.observe(t));let m=s?Ex(e):null;return s&&function t(){const r=Ex(e);m&&!Dx(m,r)&&n();m=r,f=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,s&&cancelAnimationFrame(f)}}const Lx=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:l}=t,s=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=jw(n),l=$w(n),s="y"===Hw(n),c=["left","top"].includes(a)?-1:1,u=i&&s?-1:1,d=Fw(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&"number"==typeof h&&(p="end"===l?-1*h:h),s?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return a===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:a}}}}},zx=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:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=Fw(e,t),c={x:n,y:r},u=await Gw(t,s),d=Hw(jw(o)),f=Bw(d);let p=c[f],h=c[d];if(i){const e="y"===f?"bottom":"right";p=zw(p+u["y"===f?"top":"left"],p,p-u[e])}if(a){const e="y"===d?"bottom":"right";h=zw(h+u["y"===d?"top":"left"],h,h-u[e])}const m=l.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:i,[d]:a}}}}}},Fx=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:l,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...g}=Fw(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=jw(o),v=Hw(l),b=jw(l)===l,w=await(null==s.isRTL?void 0:s.isRTL(c.floating)),x=f||(b||!m?[qw(l)]:function(e){const t=qw(e);return[Ww(e),t,Ww(t)]}(l)),k="none"!==h;!f&&k&&x.push(...function(e,t,n,r){const o=$w(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[]}}(jw(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(Ww)))),i}(l,m,h,w));const S=[l,...x],E=await Gw(t,g),_=[];let C=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&_.push(E[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=$w(e),o=Uw(e),i=Vw(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=qw(a)),[a,qw(a)]}(o,a,w);_.push(E[e[0]],E[e[1]])}if(C=[...C,{placement:o,overflows:_}],!_.every((e=>e<=0))){var O,N;const e=((null==(O=i.flip)?void 0:O.index)||0)+1,t=S[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let n=null==(N=C.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:N.placement;if(!n)switch(p){case"bestFit":{var P;const e=null==(P=C.filter((e=>{if(k){const t=Hw(e.placement);return t===v||"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:P[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}},jx=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:l}=t,{apply:s=()=>{},...c}=Fw(e,t),u=await Gw(t,c),d=jw(o),f=$w(o),p="y"===Hw(o),{width:h,height:m}=i.floating;let g,y;"top"===d||"bottom"===d?(g=d,y=f===(await(null==a.isRTL?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(y=d,g="end"===f?"top":"bottom");const v=m-u.top-u.bottom,b=h-u.left-u.right,w=Rw(m-u[g],v),x=Rw(h-u[y],b),k=!t.middlewareData.shift;let S=w,E=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(E=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(S=v),k&&!f){const e=Mw(u.left,0),t=Mw(u.right,0),n=Mw(u.top,0),r=Mw(u.bottom,0);p?E=h-2*(0!==e||0!==t?e+t:Mw(u.left,u.right)):S=m-2*(0!==n||0!==r?n+r:Mw(u.top,u.bottom))}await s({...t,availableWidth:E,availableHeight:S});const _=await a.getDimensions(l.floating);return h!==_.width||m!==_.height?{reset:{rects:!0}}:{}}}},$x=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Fw(e,t);switch(r){case"referenceHidden":{const e=Qw(await Gw(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Zw(e)}}}case"escaped":{const e=Qw(await Gw(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Zw(e)}}}default:return{}}}}},Bx=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:l,middlewareData:s}=t,{element:c,padding:u=0}=Fw(e,t)||{};if(null==c)return{};const d=Kw(u),f={x:n,y:r},p=Uw(o),h=Vw(p),m=await a.getDimensions(c),g="y"===p,y=g?"top":"left",v=g?"bottom":"right",b=g?"clientHeight":"clientWidth",w=i.reference[h]+i.reference[p]-f[p]-i.floating[h],x=f[p]-i.reference[p],k=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let S=k?k[b]:0;S&&await(null==a.isElement?void 0:a.isElement(k))||(S=l.floating[b]||i.floating[h]);const E=w/2-x/2,_=S/2-m[h]/2-1,C=Rw(d[y],_),O=Rw(d[v],_),N=C,P=S-m[h]-O,R=S/2-m[h]/2+E,M=zw(N,R,P),T=!s.arrow&&null!=$w(o)&&R!==M&&i.reference[h]/2-(R<N?C:O)-m[h]/2<0,A=T?R<N?R-N:R-P:0;return{[p]:f[p]+A,data:{[p]:M,centerOffset:R-M-A,...T&&{alignmentOffset:A}},reset:T}}}),Vx=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:l=0,mainAxis:s=!0,crossAxis:c=!0}=Fw(e,t),u={x:n,y:r},d=Hw(o),f=Bw(d);let p=u[f],h=u[d];const m=Fw(l,t),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(s){const e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+g.mainAxis,n=i.reference[f]+i.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(c){var y,v;const e="y"===f?"width":"height",t=["top","left"].includes(jw(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==(v=a.offset)?void 0:v[d])||0)-(t?g.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[f]:p,[d]:h}}}},Hx=(e,t,n)=>{const r=new Map,o={platform:Ax,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,l=i.filter(Boolean),s=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Yw(c,r,s),f=r,p={},h=0;for(let n=0;n<l.length;n++){const{name:i,fn:m}=l[n],{x:g,y:y,data:v,reset:b}=await m({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=y?y:d,p={...p,[i]:{...p[i],...v}},b&&h<=50&&(h++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:d}=Yw(c,f,s))),n=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var Ux="undefined"!=typeof document?s.useLayoutEffect:s.useEffect;function Wx(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(!Wx(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)&&!Wx(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function qx(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Kx(e,t){const n=qx(e);return Math.round(t*n)/n}function Xx(e){const t=s.useRef(e);return Ux((()=>{t.current=e})),t}const Yx=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?Bx({element:n.current,padding:r}).fn(t):{}:n?Bx({element:n,padding:r}).fn(t):{};var o}}),Gx=(e,t)=>({...Lx(e),options:[e,t]}),Qx=(e,t)=>({...zx(e),options:[e,t]}),Zx=(e,t)=>({...Vx(e),options:[e,t]}),Jx=(e,t)=>({...Fx(e),options:[e,t]}),ek=(e,t)=>({...jx(e),options:[e,t]}),tk=(e,t)=>({...$x(e),options:[e,t]}),nk=(e,t)=>({...Yx(e),options:[e,t]});var rk=s.forwardRef(((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return Bu.jsx(ed.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:Bu.jsx("polygon",{points:"0,0 30,0 15,10"})})}));rk.displayName="Arrow";var ok=rk;function ik(e){const[t,n]=s.useState(void 0);return Uu((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;n({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}var ak="Popper",[lk,sk]=Vu(ak),[ck,uk]=lk(ak),dk=e=>{const{__scopePopper:t,children:n}=e,[r,o]=s.useState(null);return Bu.jsx(ck,{scope:t,anchor:r,onAnchorChange:o,children:n})};dk.displayName=ak;var fk="PopperAnchor",pk=s.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=uk(fk,n),a=s.useRef(null),l=Lu(t,a);return s.useEffect((()=>{i.onAnchorChange(r?.current||a.current)})),r?null:Bu.jsx(ed.div,{...o,ref:l})}));pk.displayName=fk;var hk="PopperContent",[mk,gk]=lk(hk),yk=s.forwardRef(((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:a=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:m,...g}=e,y=uk(hk,n),[v,b]=s.useState(null),w=Lu(t,(e=>b(e))),[x,k]=s.useState(null),S=ik(x),E=S?.width??0,_=S?.height??0,C=r+("center"!==i?"-"+i:""),O="number"==typeof d?d:{top:0,right:0,bottom:0,left:0,...d},N=Array.isArray(u)?u:[u],P=N.length>0,R={padding:O,boundary:N.filter(xk),altBoundary:P},{refs:M,floatingStyles:T,placement:A,isPositioned:D,middlewareData:I}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,f]=s.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=s.useState(r);Wx(p,r)||h(r);const[m,g]=s.useState(null),[y,v]=s.useState(null),b=s.useCallback((e=>{e!==S.current&&(S.current=e,g(e))}),[]),w=s.useCallback((e=>{e!==E.current&&(E.current=e,v(e))}),[]),x=i||m,k=a||y,S=s.useRef(null),E=s.useRef(null),_=s.useRef(d),C=null!=c,O=Xx(c),N=Xx(o),P=Xx(u),R=s.useCallback((()=>{if(!S.current||!E.current)return;const e={placement:t,strategy:n,middleware:p};N.current&&(e.platform=N.current),Hx(S.current,E.current,e).then((e=>{const t={...e,isPositioned:!1!==P.current};M.current&&!Wx(_.current,t)&&(_.current=t,Lr.flushSync((()=>{f(t)})))}))}),[p,t,n,N,P]);Ux((()=>{!1===u&&_.current.isPositioned&&(_.current.isPositioned=!1,f((e=>({...e,isPositioned:!1}))))}),[u]);const M=s.useRef(!1);Ux((()=>(M.current=!0,()=>{M.current=!1})),[]),Ux((()=>{if(x&&(S.current=x),k&&(E.current=k),x&&k){if(O.current)return O.current(x,k,R);R()}}),[x,k,R,O,C]);const T=s.useMemo((()=>({reference:S,floating:E,setReference:b,setFloating:w})),[b,w]),A=s.useMemo((()=>({reference:x,floating:k})),[x,k]),D=s.useMemo((()=>{const e={position:n,left:0,top:0};if(!A.floating)return e;const t=Kx(A.floating,d.x),r=Kx(A.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...qx(A.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,l,A.floating,d.x,d.y]);return s.useMemo((()=>({...d,update:R,refs:T,elements:A,floatingStyles:D})),[d,R,T,A,D])}({strategy:"fixed",placement:C,whileElementsMounted:(...e)=>Ix(...e,{animationFrame:"always"===h}),elements:{reference:y.anchor},middleware:[Gx({mainAxis:o+_,alignmentAxis:a}),c&&Qx({mainAxis:!0,crossAxis:!1,limiter:"partial"===f?Zx():void 0,...R}),c&&Jx({...R}),ek({...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`)}}),x&&nk({element:x,padding:l}),kk({arrowWidth:E,arrowHeight:_}),p&&tk({strategy:"referenceHidden",...R})]}),[L,z]=Sk(A),F=Xu(m);Uu((()=>{D&&F?.()}),[D,F]);const j=I.arrow?.x,$=I.arrow?.y,B=0!==I.arrow?.centerOffset,[V,H]=s.useState();return Uu((()=>{v&&H(window.getComputedStyle(v).zIndex)}),[v]),Bu.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...T,transform:D?T.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:V,"--radix-popper-transform-origin":[I.transformOrigin?.x,I.transformOrigin?.y].join(" "),...I.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:Bu.jsx(mk,{scope:n,placedSide:L,onArrowChange:k,arrowX:j,arrowY:$,shouldHideArrow:B,children:Bu.jsx(ed.div,{"data-side":L,"data-align":z,...g,ref:w,style:{...g.style,animation:D?void 0:"none"}})})})}));yk.displayName=hk;var vk="PopperArrow",bk={top:"bottom",right:"left",bottom:"top",left:"right"},wk=s.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,o=gk(vk,n),i=bk[o.placedSide];return Bu.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:Bu.jsx(ok,{...r,ref:t,style:{...r.style,display:"block"}})})}));function xk(e){return null!==e}wk.displayName=vk;var kk=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,l=i?0:e.arrowHeight,[s,c]=Sk(n),u={start:"0%",center:"50%",end:"100%"}[c],d=(o.arrow?.x??0)+a/2,f=(o.arrow?.y??0)+l/2;let p="",h="";return"bottom"===s?(p=i?u:`${d}px`,h=-l+"px"):"top"===s?(p=i?u:`${d}px`,h=`${r.floating.height+l}px`):"right"===s?(p=-l+"px",h=i?u:`${f}px`):"left"===s&&(p=`${r.floating.width+l}px`,h=i?u:`${f}px`),{data:{x:p,y:h}}}});function Sk(e){const[t,n="center"]=e.split("-");return[t,n]}var Ek=dk,_k=pk,Ck=yk,Ok=wk,Nk="rovingFocusGroup.onEntryFocus",Pk={bubbles:!1,cancelable:!0},Rk="RovingFocusGroup",[Mk,Tk,Ak]=Cw(Rk),[Dk,Ik]=Vu(Rk,[Ak]),[Lk,zk]=Dk(Rk),Fk=s.forwardRef(((e,t)=>Bu.jsx(Mk.Provider,{scope:e.__scopeRovingFocusGroup,children:Bu.jsx(Mk.Slot,{scope:e.__scopeRovingFocusGroup,children:Bu.jsx(jk,{...e,ref:t})})})));Fk.displayName=Rk;var jk=s.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,p=s.useRef(null),h=Lu(t,p),m=Nw(i),[g=null,y]=Yu({prop:a,defaultProp:l,onChange:c}),[v,b]=s.useState(!1),w=Xu(u),x=Tk(n),k=s.useRef(!1),[S,E]=s.useState(0);return s.useEffect((()=>{const e=p.current;if(e)return e.addEventListener(Nk,w),()=>e.removeEventListener(Nk,w)}),[w]),Bu.jsx(Lk,{scope:n,orientation:r,dir:m,loop:o,currentTabStopId:g,onItemFocus:s.useCallback((e=>y(e)),[y]),onItemShiftTab:s.useCallback((()=>b(!0)),[]),onFocusableItemAdd:s.useCallback((()=>E((e=>e+1))),[]),onFocusableItemRemove:s.useCallback((()=>E((e=>e-1))),[]),children:Bu.jsx(ed.div,{tabIndex:v||0===S?-1:0,"data-orientation":r,...f,ref:h,style:{outline:"none",...e.style},onMouseDown:Au(e.onMouseDown,(()=>{k.current=!0})),onFocus:Au(e.onFocus,(e=>{const t=!k.current;if(e.target===e.currentTarget&&t&&!v){const t=new CustomEvent(Nk,Pk);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=x().filter((e=>e.focusable));Hk([e.find((e=>e.active)),e.find((e=>e.id===g)),...e].filter(Boolean).map((e=>e.ref.current)),d)}}k.current=!1})),onBlur:Au(e.onBlur,(()=>b(!1)))})})})),$k="RovingFocusGroupItem",Bk=s.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...a}=e,l=Ku(),c=i||l,u=zk($k,n),d=u.currentTabStopId===c,f=Tk(n),{onFocusableItemAdd:p,onFocusableItemRemove:h}=u;return s.useEffect((()=>{if(r)return p(),()=>h()}),[r,p,h]),Bu.jsx(Mk.ItemSlot,{scope:n,id:c,focusable:r,active:o,children:Bu.jsx(ed.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...a,ref:t,onMouseDown:Au(e.onMouseDown,(e=>{r?u.onItemFocus(c):e.preventDefault()})),onFocus:Au(e.onFocus,(()=>u.onItemFocus(c))),onKeyDown:Au(e.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:Vk[r]}(e,u.orientation,u.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().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((()=>Hk(n)))}}))})})}));Bk.displayName=$k;var Vk={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Hk(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 Uk=Fk,Wk=Bk,qk=["Enter"," "],Kk=["ArrowUp","PageDown","End"],Xk=["ArrowDown","PageUp","Home",...Kk],Yk={ltr:[...qk,"ArrowRight"],rtl:[...qk,"ArrowLeft"]},Gk={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Qk="Menu",[Zk,Jk,eS]=Cw(Qk),[tS,nS]=Vu(Qk,[eS,sk,Ik]),rS=sk(),oS=Ik(),[iS,aS]=tS(Qk),[lS,sS]=tS(Qk),cS=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:i,modal:a=!0}=e,l=rS(t),[c,u]=s.useState(null),d=s.useRef(!1),f=Xu(i),p=Nw(o);return s.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})}}),[]),Bu.jsx(Ek,{...l,children:Bu.jsx(iS,{scope:t,open:n,onOpenChange:f,content:c,onContentChange:u,children:Bu.jsx(lS,{scope:t,onClose:s.useCallback((()=>f(!1)),[f]),isUsingKeyboardRef:d,dir:p,modal:a,children:r})})})};cS.displayName=Qk;var uS=s.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e,o=rS(n);return Bu.jsx(_k,{...o,...r,ref:t})}));uS.displayName="MenuAnchor";var[dS,fS]=tS("MenuPortal",{forceMount:void 0}),pS="MenuContent",[hS,mS]=tS(pS),gS=s.forwardRef(((e,t)=>{const n=fS(pS,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=aS(pS,e.__scopeMenu),a=sS(pS,e.__scopeMenu);return Bu.jsx(Zk.Provider,{scope:e.__scopeMenu,children:Bu.jsx(kd,{present:r||i.open,children:Bu.jsx(Zk.Slot,{scope:e.__scopeMenu,children:a.modal?Bu.jsx(yS,{...o,ref:t}):Bu.jsx(vS,{...o,ref:t})})})})})),yS=s.forwardRef(((e,t)=>{const n=aS(pS,e.__scopeMenu),r=s.useRef(null),o=Lu(t,r);return s.useEffect((()=>{const e=r.current;if(e)return kf(e)}),[]),Bu.jsx(bS,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Au(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})})),vS=s.forwardRef(((e,t)=>{const n=aS(pS,e.__scopeMenu);return Bu.jsx(bS,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})})),bS=s.forwardRef(((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:h,disableOutsideScroll:m,...g}=e,y=aS(pS,n),v=sS(pS,n),b=rS(n),w=oS(n),x=Jk(n),[k,S]=s.useState(null),E=s.useRef(null),_=Lu(t,E,y.onContentChange),C=s.useRef(0),O=s.useRef(""),N=s.useRef(0),P=s.useRef(null),R=s.useRef("right"),M=s.useRef(0),T=m?mf:s.Fragment,A=m?{as:Gu,allowPinchZoom:!0}:void 0,D=e=>{const t=O.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 l=a.find((e=>e.toLowerCase().startsWith(o.toLowerCase())));return l!==n?l:void 0}(n.map((e=>e.textValue)),t,o),a=n.find((e=>e.textValue===i))?.ref.current;!function e(t){O.current=t,window.clearTimeout(C.current),""!==t&&(C.current=window.setTimeout((()=>e("")),1e3))}(t),a&&setTimeout((()=>a.focus()))};s.useEffect((()=>()=>window.clearTimeout(C.current)),[]),_d();const I=s.useCallback((e=>R.current===P.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,l=t[e].y,s=t[i].x,c=t[i].y;l>r!=c>r&&n<(s-a)*(r-l)/(c-l)+a&&(o=!o)}return o}(n,t)}(e,P.current?.area)),[]);return Bu.jsx(hS,{scope:n,searchRef:O,onItemEnter:s.useCallback((e=>{I(e)&&e.preventDefault()}),[I]),onItemLeave:s.useCallback((e=>{I(e)||(E.current?.focus(),S(null))}),[I]),onTriggerLeave:s.useCallback((e=>{I(e)&&e.preventDefault()}),[I]),pointerGraceTimerRef:N,onPointerGraceIntentChange:s.useCallback((e=>{P.current=e}),[]),children:Bu.jsx(T,{...A,children:Bu.jsx(hd,{asChild:!0,trapped:o,onMountAutoFocus:Au(i,(e=>{e.preventDefault(),E.current?.focus({preventScroll:!0})})),onUnmountAutoFocus:a,children:Bu.jsx(ld,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:h,children:Bu.jsx(Uk,{asChild:!0,...w,dir:v.dir,orientation:"vertical",loop:r,currentTabStopId:k,onCurrentTabStopIdChange:S,onEntryFocus:Au(c,(e=>{v.isUsingKeyboardRef.current||e.preventDefault()})),preventScrollOnEntryFocus:!0,children:Bu.jsx(Ck,{role:"menu","aria-orientation":"vertical","data-state":KS(y.open),"data-radix-menu-content":"",dir:v.dir,...b,...g,ref:_,style:{outline:"none",...g.style},onKeyDown:Au(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&&D(e.key));const o=E.current;if(e.target!==o)return;if(!Xk.includes(e.key))return;e.preventDefault();const i=x().filter((e=>!e.disabled)).map((e=>e.ref.current));Kk.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:Au(e.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(C.current),O.current="")})),onPointerMove:Au(e.onPointerMove,GS((e=>{const t=e.target,n=M.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>M.current?"right":"left";R.current=t,M.current=e.clientX}})))})})})})})})}));gS.displayName=pS;var wS=s.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return Bu.jsx(ed.div,{role:"group",...r,ref:t})}));wS.displayName="MenuGroup";var xS=s.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return Bu.jsx(ed.div,{...r,ref:t})}));xS.displayName="MenuLabel";var kS="MenuItem",SS="menu.itemSelect",ES=s.forwardRef(((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,i=s.useRef(null),a=sS(kS,e.__scopeMenu),l=mS(kS,e.__scopeMenu),c=Lu(t,i),u=s.useRef(!1);return Bu.jsx(_S,{...o,ref:c,disabled:n,onClick:Au(e.onClick,(()=>{const e=i.current;if(!n&&e){const t=new CustomEvent(SS,{bubbles:!0,cancelable:!0});e.addEventListener(SS,(e=>r?.(e)),{once:!0}),td(e,t),t.defaultPrevented?u.current=!1:a.onClose()}})),onPointerDown:t=>{e.onPointerDown?.(t),u.current=!0},onPointerUp:Au(e.onPointerUp,(e=>{u.current||e.currentTarget?.click()})),onKeyDown:Au(e.onKeyDown,(e=>{const t=""!==l.searchRef.current;n||t&&" "===e.key||qk.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))})}));ES.displayName=kS;var _S=s.forwardRef(((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...i}=e,a=mS(kS,n),l=oS(n),c=s.useRef(null),u=Lu(t,c),[d,f]=s.useState(!1),[p,h]=s.useState("");return s.useEffect((()=>{const e=c.current;e&&h((e.textContent??"").trim())}),[i.children]),Bu.jsx(Zk.ItemSlot,{scope:n,disabled:r,textValue:o??p,children:Bu.jsx(Wk,{asChild:!0,...l,focusable:!r,children:Bu.jsx(ed.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:u,onPointerMove:Au(e.onPointerMove,GS((e=>{if(r)a.onItemLeave(e);else if(a.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus({preventScroll:!0})}}))),onPointerLeave:Au(e.onPointerLeave,GS((e=>a.onItemLeave(e)))),onFocus:Au(e.onFocus,(()=>f(!0))),onBlur:Au(e.onBlur,(()=>f(!1)))})})})})),CS=s.forwardRef(((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return Bu.jsx(DS,{scope:e.__scopeMenu,checked:n,children:Bu.jsx(ES,{role:"menuitemcheckbox","aria-checked":XS(n)?"mixed":n,...o,ref:t,"data-state":YS(n),onSelect:Au(o.onSelect,(()=>r?.(!!XS(n)||!n)),{checkForDefaultPrevented:!1})})})}));CS.displayName="MenuCheckboxItem";var OS="MenuRadioGroup",[NS,PS]=tS(OS,{value:void 0,onValueChange:()=>{}}),RS=s.forwardRef(((e,t)=>{const{value:n,onValueChange:r,...o}=e,i=Xu(r);return Bu.jsx(NS,{scope:e.__scopeMenu,value:n,onValueChange:i,children:Bu.jsx(wS,{...o,ref:t})})}));RS.displayName=OS;var MS="MenuRadioItem",TS=s.forwardRef(((e,t)=>{const{value:n,...r}=e,o=PS(MS,e.__scopeMenu),i=n===o.value;return Bu.jsx(DS,{scope:e.__scopeMenu,checked:i,children:Bu.jsx(ES,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":YS(i),onSelect:Au(r.onSelect,(()=>o.onValueChange?.(n)),{checkForDefaultPrevented:!1})})})}));TS.displayName=MS;var AS="MenuItemIndicator",[DS,IS]=tS(AS,{checked:!1}),LS=s.forwardRef(((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,i=IS(AS,n);return Bu.jsx(kd,{present:r||XS(i.checked)||!0===i.checked,children:Bu.jsx(ed.span,{...o,ref:t,"data-state":YS(i.checked)})})}));LS.displayName=AS;var zS=s.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return Bu.jsx(ed.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})}));zS.displayName="MenuSeparator";var FS=s.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e,o=rS(n);return Bu.jsx(Ok,{...o,...r,ref:t})}));FS.displayName="MenuArrow";var jS="MenuSub",[$S,BS]=tS(jS),VS=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,i=aS(jS,t),a=rS(t),[l,c]=s.useState(null),[u,d]=s.useState(null),f=Xu(o);return s.useEffect((()=>(!1===i.open&&f(!1),()=>f(!1))),[i.open,f]),Bu.jsx(Ek,{...a,children:Bu.jsx(iS,{scope:t,open:r,onOpenChange:f,content:u,onContentChange:d,children:Bu.jsx($S,{scope:t,contentId:Ku(),triggerId:Ku(),trigger:l,onTriggerChange:c,children:n})})})};VS.displayName=jS;var HS="MenuSubTrigger",US=s.forwardRef(((e,t)=>{const n=aS(HS,e.__scopeMenu),r=sS(HS,e.__scopeMenu),o=BS(HS,e.__scopeMenu),i=mS(HS,e.__scopeMenu),a=s.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=i,u={__scopeMenu:e.__scopeMenu},d=s.useCallback((()=>{a.current&&window.clearTimeout(a.current),a.current=null}),[]);return s.useEffect((()=>d),[d]),s.useEffect((()=>{const e=l.current;return()=>{window.clearTimeout(e),c(null)}}),[l,c]),Bu.jsx(uS,{asChild:!0,...u,children:Bu.jsx(_S,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":KS(n.open),...e,ref:Iu(t,o.onTriggerChange),onClick:t=>{e.onClick?.(t),e.disabled||t.defaultPrevented||(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Au(e.onPointerMove,GS((t=>{i.onItemEnter(t),t.defaultPrevented||e.disabled||n.open||a.current||(i.onPointerGraceIntentChange(null),a.current=window.setTimeout((()=>{n.onOpenChange(!0),d()}),100))}))),onPointerLeave:Au(e.onPointerLeave,GS((e=>{d();const t=n.content?.getBoundingClientRect();if(t){const r=n.content?.dataset.side,o="right"===r,a=o?-5:5,s=t[o?"left":"right"],c=t[o?"right":"left"];i.onPointerGraceIntentChange({area:[{x:e.clientX+a,y:e.clientY},{x:s,y:t.top},{x:c,y:t.top},{x:c,y:t.bottom},{x:s,y:t.bottom}],side:r}),window.clearTimeout(l.current),l.current=window.setTimeout((()=>i.onPointerGraceIntentChange(null)),300)}else{if(i.onTriggerLeave(e),e.defaultPrevented)return;i.onPointerGraceIntentChange(null)}}))),onKeyDown:Au(e.onKeyDown,(t=>{const o=""!==i.searchRef.current;e.disabled||o&&" "===t.key||Yk[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())}))})})}));US.displayName=HS;var WS="MenuSubContent",qS=s.forwardRef(((e,t)=>{const n=fS(pS,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=aS(pS,e.__scopeMenu),a=sS(pS,e.__scopeMenu),l=BS(WS,e.__scopeMenu),c=s.useRef(null),u=Lu(t,c);return Bu.jsx(Zk.Provider,{scope:e.__scopeMenu,children:Bu.jsx(kd,{present:r||i.open,children:Bu.jsx(Zk.Slot,{scope:e.__scopeMenu,children:Bu.jsx(bS,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:u,align:"start",side:"rtl"===a.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{a.isUsingKeyboardRef.current&&c.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:Au(e.onFocusOutside,(e=>{e.target!==l.trigger&&i.onOpenChange(!1)})),onEscapeKeyDown:Au(e.onEscapeKeyDown,(e=>{a.onClose(),e.preventDefault()})),onKeyDown:Au(e.onKeyDown,(e=>{const t=e.currentTarget.contains(e.target),n=Gk[a.dir].includes(e.key);t&&n&&(i.onOpenChange(!1),l.trigger?.focus(),e.preventDefault())}))})})})})}));function KS(e){return e?"open":"closed"}function XS(e){return"indeterminate"===e}function YS(e){return XS(e)?"indeterminate":e?"checked":"unchecked"}function GS(e){return t=>"mouse"===t.pointerType?e(t):void 0}qS.displayName=WS;var QS=cS,ZS=uS,JS=gS,eE=wS,tE=xS,nE=ES,rE=CS,oE=RS,iE=TS,aE=LS,lE=zS,sE=FS,cE=VS,uE=US,dE=qS,fE="DropdownMenu",[pE,hE]=Vu(fE,[nS]),mE=nS(),[gE,yE]=pE(fE),vE=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:i,onOpenChange:a,modal:l=!0}=e,c=mE(t),u=s.useRef(null),[d=!1,f]=Yu({prop:o,defaultProp:i,onChange:a});return Bu.jsx(gE,{scope:t,triggerId:Ku(),triggerRef:u,contentId:Ku(),open:d,onOpenChange:f,onOpenToggle:s.useCallback((()=>f((e=>!e))),[f]),modal:l,children:Bu.jsx(QS,{...c,open:d,onOpenChange:f,dir:r,modal:l,children:n})})};vE.displayName=fE;var bE="DropdownMenuTrigger",wE=s.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=yE(bE,n),a=mE(n);return Bu.jsx(ZS,{asChild:!0,...a,children:Bu.jsx(ed.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:Iu(t,i.triggerRef),onPointerDown:Au(e.onPointerDown,(e=>{r||0!==e.button||!1!==e.ctrlKey||(i.onOpenToggle(),i.open||e.preventDefault())})),onKeyDown:Au(e.onKeyDown,(e=>{r||(["Enter"," "].includes(e.key)&&i.onOpenToggle(),"ArrowDown"===e.key&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())}))})})}));wE.displayName=bE;var xE="DropdownMenuContent",kE=s.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=yE(xE,n),i=mE(n),a=s.useRef(!1);return Bu.jsx(JS,{id:o.contentId,"aria-labelledby":o.triggerId,...i,...r,ref:t,onCloseAutoFocus:Au(e.onCloseAutoFocus,(e=>{a.current||o.triggerRef.current?.focus(),a.current=!1,e.preventDefault()})),onInteractOutside:Au(e.onInteractOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;o.modal&&!r||(a.current=!0)})),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})}));kE.displayName=xE;var SE=s.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=mE(n);return Bu.jsx(eE,{...o,...r,ref:t})}));SE.displayName="DropdownMenuGroup";s.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=mE(n);return Bu.jsx(tE,{...o,...r,ref:t})})).displayName="DropdownMenuLabel";var EE=s.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=mE(n);return Bu.jsx(nE,{...o,...r,ref:t})}));EE.displayName="DropdownMenuItem";s.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=mE(n);return Bu.jsx(rE,{...o,...r,ref:t})})).displayName="DropdownMenuCheckboxItem";var _E=s.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=mE(n);return Bu.jsx(oE,{...o,...r,ref:t})}));_E.displayName="DropdownMenuRadioGroup";var CE=s.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=mE(n);return Bu.jsx(iE,{...o,...r,ref:t})}));CE.displayName="DropdownMenuRadioItem";s.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=mE(n);return Bu.jsx(aE,{...o,...r,ref:t})})).displayName="DropdownMenuItemIndicator";s.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=mE(n);return Bu.jsx(lE,{...o,...r,ref:t})})).displayName="DropdownMenuSeparator";s.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=mE(n);return Bu.jsx(sE,{...o,...r,ref:t})})).displayName="DropdownMenuArrow";var OE=s.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=mE(n);return Bu.jsx(uE,{...o,...r,ref:t})}));OE.displayName="DropdownMenuSubTrigger";var NE=s.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=mE(n);return Bu.jsx(dE,{...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)"}})}));NE.displayName="DropdownMenuSubContent";var PE=vE,RE=wE,ME=kE,TE=SE,AE=EE,DE=_E,IE=CE,LE=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:i}=e,a=mE(t),[l=!1,s]=Yu({prop:r,defaultProp:i,onChange:o});return Bu.jsx(cE,{...a,open:l,onOpenChange:s,children:n})},zE=OE,FE=NE;function jE(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 $E(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 BE(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($E)}const VE=({trigger:e,setOpen:t,open:n})=>{const[r,o]=s.useState(""),i=s.useContext(Iz);return i.options.useWorkerManager?s.createElement(_w,{setOpen:t,open:n,trigger:e,title:"New Worker",description:"Create a new worker"},s.createElement("div",null,"Name:",s.createElement("br",null),s.createElement("input",{className:"styledinput",onChange:e=>{o(e.currentTarget.value)},value:r})),s.createElement("div",null,r&&s.createElement("div",null,s.createElement("button",{className:"styledbtn",onClick:()=>{i.workermanager?.new_worker({name:r}),t(!1)}},"Create")))):null},HE=({trigger:e,setOpen:t,open:n})=>{const r=s.useContext(Iz),[o,i]=s.useState(!1),a=r.workers(),l=r.worker?.uuid,c=(l?a[l]?.name:void 0)||l||"worker";return s.createElement(_w,{setOpen:t,open:n,trigger:e,title:"Export Worker",description:"Export the worker as a .fnw file"},s.createElement("div",null,s.createElement("div",null,s.createElement("input",{type:"checkbox",className:"styledcheckbox",checked:o,onChange:e=>{i(e.currentTarget.checked)}}),"Include Files"),s.createElement("button",{className:"styledbtn",onClick:async()=>{if(!r.worker)return;!function(e,t,n){const r=jE(e,n),o=URL.createObjectURL(r),i=document.createElement("a");i.href=o,i.download=t,i.click(),URL.revokeObjectURL(o),i.remove()}(await r.worker.export({withFiles:o}),c+".fnw","application/zip"),t(!1)}},"Export")))},UE=()=>{const e=s.useContext(Iz).progress_state();return s.createElement("div",{className:"statusbar"},s.createElement("span",{className:"statusbar-progressbar",style:{width:Math.min(100,100*e.progress)+"%"}}),s.createElement("span",{className:"statusbar-message"},e.message))},WE=()=>{const e=s.useContext(Iz),t=e.workers(),[n,r]=s.useState(!1),[o,i]=s.useState(!1),a=e.options.useWorkerManager&&e.workermanager&&e.workermanager.open,l=a&&Object.keys(t).length>0,c=e.worker&&e.worker.is_open,u=c&&a;return a||c?s.createElement(s.Fragment,null,s.createElement(PE,null,s.createElement(RE,{asChild:!0},s.createElement("button",{className:"styledbtn"},s.createElement(lb,{direction:"row",spacing:1},s.createElement(ab,null,"Worker")," ",s.createElement(Jv,null)))),s.createElement(ME,{className:"headermenucontent funcnodescontainer"},s.createElement(TE,null,l&&s.createElement(LE,null,s.createElement(zE,{className:"headermenuitem submenuitem"},s.createElement(lb,{direction:"row",spacing:1},"Select",s.createElement(sb,null))),s.createElement(FE,{className:"headermenucontent funcnodescontainer",sideOffset:2,alignOffset:-5},s.createElement(DE,{value:e.worker?.uuid,onValueChange:n=>{(n=>{if("__select__"!==n&&e.workers&&e.workermanager&&t[n]){if(!t[n].active&&!window.confirm("this is an inactive worker, selecting it will start it, continue?"))return;e.workermanager.set_active(n)}})(n)}},Object.keys(t).sort(((e,n)=>{if(t[e].active&&!t[n].active)return-1;if(!t[e].active&&t[n].active)return 1;const r=t[e].name||e,o=t[n].name||n;return r.localeCompare(o)})).map((n=>s.createElement(IE,{className:"headermenuitem workerselectoption"+(t[n]?.active?" active":" inactive")+" headermenuitem",key:n,value:n,disabled:n===e.worker?.uuid},t[n]?.name||n)))))),c&&s.createElement(s.Fragment,null,u&&s.createElement(AE,{className:"headermenuitem",onClick:()=>{if(e.worker)return e.workermanager?void e.workermanager?.restart_worker(e.worker.uuid):e.logger.error("no workermanager")}},"Restart"),s.createElement(AE,{className:"headermenuitem",onClick:()=>{e.worker&&e.worker.stop()}},"Stop"),s.createElement(AE,{className:"headermenuitem",onClick:()=>i(!0)},"Export"),s.createElement(AE,{className:"headermenuitem",onClick:async()=>{if(!e.worker)return;if(!window.confirm("Updateing the worker might replace the current nodespace, continue?"))return;const t=await BE(".fnw");e.worker.update_from_export(t)}},"Update")),a&&s.createElement(s.Fragment,null,s.createElement(AE,{className:"headermenuitem",onClick:()=>r(!0)},"New"))))),s.createElement(VE,{open:n,setOpen:r}),s.createElement(HE,{open:o,setOpen:i})):null},qE=()=>{const e=s.useContext(Iz);return s.createElement(s.Fragment,null,s.createElement(PE,null,s.createElement(RE,{asChild:!0},s.createElement("button",{className:"styledbtn"},s.createElement(lb,{direction:"row",spacing:1},s.createElement(ab,null,"Nodespace")," ",s.createElement(Jv,null)))),s.createElement(ME,{className:"headermenucontent funcnodescontainer"},s.createElement(TE,null,s.createElement(AE,{className:"headermenuitem",onClick:()=>{window.confirm("Are you sure you want to start a new flow?")&&e.worker?.clear()}},"New"),s.createElement(AE,{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"),s.createElement(AE,{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")))))},KE=({...e})=>{const t=s.useContext(Iz),n=t.workerstate();return Object.keys(e).length>0&&t.logger.debug("headerprops",e),s.createElement("div",{className:"funcnodesreactflowheader"},s.createElement("div",{className:"headerelement"},s.createElement(UE,null)),e.showmenu&&s.createElement(s.Fragment,null,s.createElement("div",{className:"headerelement"},s.createElement(WE,null)),t.worker&&n.is_open&&s.createElement("div",{className:"headerelement"},s.createElement(qE,null))))};const XE=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,YE=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,GE={};function QE(e,t){return(GE.jsx?YE:XE).test(e)}const ZE=/[ \t\n\f\r]/g;function JE(e){return""===e.replace(ZE,"")}class e_{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}}function t_(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 e_(n,r,t)}function n_(e){return e.toLowerCase()}e_.prototype.property={},e_.prototype.normal={},e_.prototype.space=null;class r_{constructor(e,t){this.property=e,this.attribute=t}}r_.prototype.space=null,r_.prototype.boolean=!1,r_.prototype.booleanish=!1,r_.prototype.overloadedBoolean=!1,r_.prototype.number=!1,r_.prototype.commaSeparated=!1,r_.prototype.spaceSeparated=!1,r_.prototype.commaOrSpaceSeparated=!1,r_.prototype.mustUseProperty=!1,r_.prototype.defined=!1;let o_=0;const i_=f_(),a_=f_(),l_=f_(),s_=f_(),c_=f_(),u_=f_(),d_=f_();function f_(){return 2**++o_}var p_=Object.freeze({__proto__:null,boolean:i_,booleanish:a_,commaOrSpaceSeparated:d_,commaSeparated:u_,number:s_,overloadedBoolean:l_,spaceSeparated:c_});const h_=Object.keys(p_);class m_ extends r_{constructor(e,t,n,r){let o=-1;if(super(e,t),g_(this,"space",r),"number"==typeof n)for(;++o<h_.length;){const e=h_[o];g_(this,h_[o],(n&p_[e])===p_[e])}}}function g_(e,t,n){n&&(e[t]=n)}m_.prototype.defined=!0;const y_={}.hasOwnProperty;function v_(e){const t={},n={};let r;for(r in e.properties)if(y_.call(e.properties,r)){const o=e.properties[r],i=new m_(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[n_(r)]=r,n[n_(i.attribute)]=r}return new e_(t,n,e.space)}const b_=v_({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}}),w_=v_({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function x_(e,t){return t in e?e[t]:t}function k_(e,t){return x_(e,t.toLowerCase())}const S_=v_({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:k_,properties:{xmlns:null,xmlnsXLink:null}}),E_=v_({transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:a_,ariaAutoComplete:null,ariaBusy:a_,ariaChecked:a_,ariaColCount:s_,ariaColIndex:s_,ariaColSpan:s_,ariaControls:c_,ariaCurrent:null,ariaDescribedBy:c_,ariaDetails:null,ariaDisabled:a_,ariaDropEffect:c_,ariaErrorMessage:null,ariaExpanded:a_,ariaFlowTo:c_,ariaGrabbed:a_,ariaHasPopup:null,ariaHidden:a_,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:c_,ariaLevel:s_,ariaLive:null,ariaModal:a_,ariaMultiLine:a_,ariaMultiSelectable:a_,ariaOrientation:null,ariaOwns:c_,ariaPlaceholder:null,ariaPosInSet:s_,ariaPressed:a_,ariaReadOnly:a_,ariaRelevant:null,ariaRequired:a_,ariaRoleDescription:c_,ariaRowCount:s_,ariaRowIndex:s_,ariaRowSpan:s_,ariaSelected:a_,ariaSetSize:s_,ariaSort:null,ariaValueMax:s_,ariaValueMin:s_,ariaValueNow:s_,ariaValueText:null,role:null}}),__=v_({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:k_,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:u_,acceptCharset:c_,accessKey:c_,action:null,allow:null,allowFullScreen:i_,allowPaymentRequest:i_,allowUserMedia:i_,alt:null,as:null,async:i_,autoCapitalize:null,autoComplete:c_,autoFocus:i_,autoPlay:i_,blocking:c_,capture:null,charSet:null,checked:i_,cite:null,className:c_,cols:s_,colSpan:null,content:null,contentEditable:a_,controls:i_,controlsList:c_,coords:s_|u_,crossOrigin:null,data:null,dateTime:null,decoding:null,default:i_,defer:i_,dir:null,dirName:null,disabled:i_,download:l_,draggable:a_,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:i_,formTarget:null,headers:c_,height:s_,hidden:i_,high:s_,href:null,hrefLang:null,htmlFor:c_,httpEquiv:c_,id:null,imageSizes:null,imageSrcSet:null,inert:i_,inputMode:null,integrity:null,is:null,isMap:i_,itemId:null,itemProp:c_,itemRef:c_,itemScope:i_,itemType:c_,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:i_,low:s_,manifest:null,max:null,maxLength:s_,media:null,method:null,min:null,minLength:s_,multiple:i_,muted:i_,name:null,nonce:null,noModule:i_,noValidate:i_,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:i_,optimum:s_,pattern:null,ping:c_,placeholder:null,playsInline:i_,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:i_,referrerPolicy:null,rel:c_,required:i_,reversed:i_,rows:s_,rowSpan:s_,sandbox:c_,scope:null,scoped:i_,seamless:i_,selected:i_,shadowRootClonable:i_,shadowRootDelegatesFocus:i_,shadowRootMode:null,shape:null,size:s_,sizes:null,slot:null,span:s_,spellCheck:a_,src:null,srcDoc:null,srcLang:null,srcSet:null,start:s_,step:null,style:null,tabIndex:s_,target:null,title:null,translate:null,type:null,typeMustMatch:i_,useMap:null,value:a_,width:s_,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:c_,axis:null,background:null,bgColor:null,border:s_,borderColor:null,bottomMargin:s_,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:i_,declare:i_,event:null,face:null,frame:null,frameBorder:null,hSpace:s_,leftMargin:s_,link:null,longDesc:null,lowSrc:null,marginHeight:s_,marginWidth:s_,noResize:i_,noHref:i_,noShade:i_,noWrap:i_,object:null,profile:null,prompt:null,rev:null,rightMargin:s_,rules:null,scheme:null,scrolling:a_,standby:null,summary:null,text:null,topMargin:s_,valueType:null,version:null,vAlign:null,vLink:null,vSpace:s_,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:i_,disableRemotePlayback:i_,prefix:null,property:null,results:s_,security:null,unselectable:null}}),C_=v_({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:x_,properties:{about:d_,accentHeight:s_,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:s_,amplitude:s_,arabicForm:null,ascent:s_,attributeName:null,attributeType:null,azimuth:s_,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:s_,by:null,calcMode:null,capHeight:s_,className:c_,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:s_,diffuseConstant:s_,direction:null,display:null,dur:null,divisor:s_,dominantBaseline:null,download:i_,dx:null,dy:null,edgeMode:null,editable:null,elevation:s_,enableBackground:null,end:null,event:null,exponent:s_,externalResourcesRequired:null,fill:null,fillOpacity:s_,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:u_,g2:u_,glyphName:u_,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:s_,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:s_,horizOriginX:s_,horizOriginY:s_,id:null,ideographic:s_,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:s_,k:s_,k1:s_,k2:s_,k3:s_,k4:s_,kernelMatrix:d_,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:s_,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:s_,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:s_,overlineThickness:s_,paintOrder:null,panose1:null,path:null,pathLength:s_,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:c_,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:s_,pointsAtY:s_,pointsAtZ:s_,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:d_,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:d_,rev:d_,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:d_,requiredFeatures:d_,requiredFonts:d_,requiredFormats:d_,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:s_,specularExponent:s_,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:s_,strikethroughThickness:s_,string:null,stroke:null,strokeDashArray:d_,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:s_,strokeOpacity:s_,strokeWidth:null,style:null,surfaceScale:s_,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:d_,tabIndex:s_,tableValues:null,target:null,targetX:s_,targetY:s_,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:d_,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:s_,underlineThickness:s_,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:s_,values:null,vAlphabetic:s_,vMathematical:s_,vectorEffect:null,vHanging:s_,vIdeographic:s_,version:null,vertAdvY:s_,vertOriginX:s_,vertOriginY:s_,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:s_,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),O_=/^data[-\w.:]+$/i,N_=/-[a-z]/g,P_=/[A-Z]/g;function R_(e){return"-"+e.toLowerCase()}function M_(e){return e.charAt(1).toUpperCase()}const T_={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"},A_=t_([w_,b_,S_,E_,__],"html"),D_=t_([w_,b_,S_,E_,C_],"svg");var I_,L_,z_,F_={};var j_=function(){if(z_)return F_;z_=1;var e=F_&&F_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(F_,"__esModule",{value:!0}),F_.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(L_)return I_;L_=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,l=/^\s+|\s+$/g,s="";function c(e){return e?e.replace(l,s):s}return I_=function(l,u){if("string"!=typeof l)throw new TypeError("First argument must be a string");if(!l)return[];u=u||{};var d=1,f=1;function p(e){var n=e.match(t);n&&(d+=n.length);var r=e.lastIndexOf("\n");f=~r?e.length-r:f+e.length}function h(){var e={line:d,column:f};return function(t){return t.position=new m(e),v(),t}}function m(e){this.start=e,this.end={line:d,column:f},this.source=u.source}function g(e){var t=new Error(u.source+":"+d+":"+f+": "+e);if(t.reason=e,t.filename=u.source,t.line=d,t.column=f,t.source=l,!u.silent)throw t}function y(e){var t=e.exec(l);if(t){var n=t[0];return p(n),l=l.slice(n.length),t}}function v(){y(n)}function b(e){var t;for(e=e||[];t=w();)!1!==t&&e.push(t);return e}function w(){var e=h();if("/"==l.charAt(0)&&"*"==l.charAt(1)){for(var t=2;s!=l.charAt(t)&&("*"!=l.charAt(t)||"/"!=l.charAt(t+1));)++t;if(t+=2,s===l.charAt(t-1))return g("End of comment missing");var n=l.slice(2,t-2);return f+=2,p(n),l=l.slice(t),f+=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 l=y(i),u=t({type:"declaration",property:c(n[0].replace(e,s)),value:l?c(l[0].replace(e,s)):s});return y(a),u}}return m.prototype.content=l,v(),function(){var e,t=[];for(b(t);e=x();)!1!==e&&(t.push(e),b(t));return t}()},I_}());return F_}(),$_=t(j_),B_=$_.default||$_;const V_=U_("end"),H_=U_("start");function U_(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 W_(e){return e&&"object"==typeof e?"position"in e||"type"in e?K_(e.position):"start"in e||"end"in e?K_(e):"line"in e||"column"in e?q_(e):"":""}function q_(e){return X_(e&&e.line)+":"+X_(e&&e.column)}function K_(e){return q_(e&&e.start)+"-"+q_(e&&e.end)}function X_(e){return e&&"number"==typeof e?e:1}class Y_ 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=W_(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}}Y_.prototype.file="",Y_.prototype.name="",Y_.prototype.reason="",Y_.prototype.message="",Y_.prototype.stack="",Y_.prototype.column=void 0,Y_.prototype.line=void 0,Y_.prototype.ancestors=void 0,Y_.prototype.cause=void 0,Y_.prototype.fatal=void 0,Y_.prototype.place=void 0,Y_.prototype.ruleId=void 0,Y_.prototype.source=void 0;const G_={}.hasOwnProperty,Q_=new Map,Z_=/[A-Z]/g,J_=/-([a-z])/g,eC=new Set(["table","tbody","thead","tfoot","tr"]),tC=new Set(["td","th"]),nC="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function rC(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),l=H_(n);return t(r,o,i,a,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.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?D_:A_,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},i=oC(o,e,void 0);return i&&"string"!=typeof i?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function oC(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=D_,e.schema=o);e.ancestors.push(t);const i=cC(e,t.tagName,!1),a=function(e,t){const n={};let r,o;for(o in t.properties)if("children"!==o&&G_.call(t.properties,o)){const i=sC(e,o,t.properties[o]);if(i){const[o,a]=i;e.tableCellAlignToStyle&&"align"===o&&"string"==typeof a&&tC.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 l=lC(e,t);eC.has(t.tagName)&&(l=l.filter((function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&JE(t.value):JE(t));var t})));return iC(e,a,i,t),aC(a,l),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)}uC(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=D_,e.schema=o);e.ancestors.push(t);const i=null===t.name?e.Fragment:cC(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 uC(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 uC(e,t.position);else i=null===r.value||r.value;n[o]=i}return n}(e,t),l=lC(e,t);return iC(e,a,i,t),aC(a,l),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);uC(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return aC(r,lC(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 iC(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function aC(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function lC(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:Q_;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 l=oC(e,i,a);void 0!==l&&n.push(l)}return n}function sC(e,t,n){const r=function(e,t){const n=n_(t);let r=t,o=r_;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&O_.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(N_,M_);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!N_.test(e)){let n=e.replace(P_,R_);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=m_}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{B_(t,r)}catch(t){if(!e.ignoreInvalidStyle){const n=t,r=new Y_("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=nC+"#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(J_,fC)),n[r]=t}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)G_.call(e,n)&&(t[dC(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?T_[r.property]||r.property:r.attribute,n]}}function cC(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,o=-1;for(;++o<e.length;){const t=QE(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=QE(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 G_.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);uC(e)}function uC(e,t){const n=new Y_("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=nC+"#cannot-handle-mdx-estrees-without-createevaluater",n}function dC(e){let t=e.replace(Z_,pC);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function fC(e,t){return t.toUpperCase()}function pC(e){return"-"+e.toLowerCase()}const hC={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"]},mC={};function gC(e,t){return yC(e,"boolean"!=typeof mC.includeImageAlt||mC.includeImageAlt,"boolean"!=typeof mC.includeHtml||mC.includeHtml)}function yC(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 vC(e.children,t,n)}return Array.isArray(e)?vC(e,t,n):""}function vC(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=yC(e[o],t,n);return r.join("")}const bC=document.createElement("i");function wC(e){const t="&"+e+";";bC.innerHTML=t;const n=bC.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}function xC(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 kC(e,t){return e.length>0?(xC(e,e.length,0,t),e):t}const SC={}.hasOwnProperty;function EC(e){const t={};let n=-1;for(;++n<e.length;)_C(t,e[n]);return t}function _C(e,t){let n;for(n in t){const r=(SC.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){SC.call(r,i)||(r[i]=[]);const e=o[i];CC(r[i],Array.isArray(e)?e:e?[e]:[])}}}function CC(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);xC(e,0,0,r)}function OC(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 NC(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const PC=BC(/[A-Za-z]/),RC=BC(/[\dA-Za-z]/),MC=BC(/[#-'*+\--9=?A-Z^-~]/);function TC(e){return null!==e&&(e<32||127===e)}const AC=BC(/\d/),DC=BC(/[\dA-Fa-f]/),IC=BC(/[!-/:-@[-`{-~]/);function LC(e){return null!==e&&e<-2}function zC(e){return null!==e&&(e<0||32===e)}function FC(e){return-2===e||-1===e||32===e}const jC=BC(/\p{P}|\p{S}/u),$C=BC(/\s/);function BC(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function VC(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let a="";if(37===i&&RC(e.charCodeAt(n+1))&&RC(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 HC(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return function(r){if(FC(r))return e.enter(n),a(r);return t(r)};function a(r){return FC(r)&&i++<o?(e.consume(r),a):(e.exit(n),t(r))}}const UC={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"),HC(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)):LC(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),o)}}};const WC={tokenize:function(e){const t=this,n=[];let r,o,i,a=0;return l;function l(r){if(a<n.length){const o=n[a];return t.containerState=o[1],e.attempt(o[0].continuation,s,c)(r)}return c(r)}function s(e){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&v();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 l=n;for(;l<t.events.length;)t.events[l][1].end={...o},l++;return xC(t.events,i+1,0,t.events.slice(n)),t.events.length=l,c(e)}return l(e)}function c(o){if(a===n.length){if(!r)return f(o);if(r.currentConstruct&&r.currentConstruct.concrete)return h(o);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(qC,u,d)(o)}function u(e){return r&&v(),y(a),f(e)}function d(e){return t.parser.lazy[t.now().line]=a!==n.length,i=t.now().offset,h(e)}function f(n){return t.containerState={},e.attempt(qC,p,h)(n)}function p(e){return a++,n.push([t.currentConstruct,t.containerState]),f(e)}function h(n){return null===n?(r&&v(),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)):LC(n)?(e.consume(n),g(e.exit("chunkFlow")),a=0,t.interrupt=void 0,l):(e.consume(n),m)}function g(e,n){const l=t.sliceStream(e);if(n&&l.push(null),e.previous=o,o&&(o.next=e),o=e,r.defineSkip(e.start),r.write(l),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,l,s=n;for(;s--;)if("exit"===t.events[s][0]&&"chunkFlow"===t.events[s][1].type){if(o){l=t.events[s][1].end;break}o=!0}for(y(a),e=n;e<t.events.length;)t.events[e][1].end={...l},e++;xC(t.events,s+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 v(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}},qC={tokenize:function(e,t,n){return HC(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function KC(e){return null===e||zC(e)||$C(e)?1:jC(e)?2:void 0}function XC(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 YC={name:"attention",resolveAll:function(e,t){let n,r,o,i,a,l,s,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;l=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},f={...e[u][1].start};GC(d,-l),GC(f,l),i={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},a={type:l>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:f},o={type:l>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:l>1?"strong":"emphasis",start:{...i.start},end:{...a.end}},e[n][1].end={...i.start},e[u][1].start={...a.end},s=[],e[n][1].end.offset-e[n][1].start.offset&&(s=kC(s,[["enter",e[n][1],t],["exit",e[n][1],t]])),s=kC(s,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",o,t]]),s=kC(s,XC(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),s=kC(s,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,s=kC(s,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,xC(e,n-1,u-n+3,s),u=n+s.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=KC(r);let i;return function(t){return i=t,e.enter("attentionSequence"),a(t)};function a(l){if(l===i)return e.consume(l),a;const s=e.exit("attentionSequence"),c=KC(l),u=!c||2===c&&o||n.includes(l),d=!o||2===o&&c||n.includes(r);return s._open=Boolean(42===i?u:u&&(o||!d)),s._close=Boolean(42===i?d:d&&(c||!u)),t(l)}}};function GC(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const QC={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 PC(t)?(e.consume(t),i):64===t?n(t):s(t)}function i(e){return 43===e||45===e||46===e||RC(e)?(r=1,a(e)):s(e)}function a(t){return 58===t?(e.consume(t),r=0,l):(43===t||45===t||46===t||RC(t))&&r++<32?(e.consume(t),a):(r=0,s(t))}function l(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||TC(r)?n(r):(e.consume(r),l)}function s(t){return 64===t?(e.consume(t),c):MC(t)?(e.consume(t),s):n(t)}function c(e){return RC(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||RC(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}};const ZC={partial:!0,tokenize:function(e,t,n){return function(t){return FC(t)?HC(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||LC(e)?t(e):n(e)}}};const JC={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(FC(t))return HC(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return o(t)};function o(r){return e.attempt(JC,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 FC(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const eO={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 IC(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const tO={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"),l};function l(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),o=31,i=RC,c(t))}function s(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,i=DC,c):(e.enter("characterReferenceValue"),o=7,i=AC,c(t))}function c(l){if(59===l&&a){const o=e.exit("characterReferenceValue");return i!==RC||wC(r.sliceSerialize(o))?(e.enter("characterReferenceMarker"),e.consume(l),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(l)}return i(l)&&a++<o?(e.consume(l),c):n(l)}}};const nO={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)}}},rO={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"),s}function s(t){return e.enter("codeFencedFence"),FC(t)?HC(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>=l?(e.exit("codeFencedFenceSequence"),FC(t)?HC(e,d,"whitespace")(t):d(t)):n(t)}function d(r){return null===r||LC(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let i,a=0,l=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"),s(t)}(t)};function s(t){return t===i?(l++,e.consume(t),s):l<3?n(t):(e.exit("codeFencedFenceSequence"),FC(t)?HC(e,c,"whitespace")(t):c(t))}function c(n){return null===n||LC(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(nO,p,v)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||LC(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):FC(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),HC(e,d,"whitespace")(t)):96===t&&t===i?n(t):(e.consume(t),u)}function d(t){return null===t||LC(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),f(t))}function f(t){return null===t||LC(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===i?n(t):(e.consume(t),f)}function p(t){return e.attempt(o,v,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return a>0&&FC(t)?HC(e,g,"linePrefix",a+1)(t):g(t)}function g(t){return null===t||LC(t)?e.check(nO,p,v)(t):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||LC(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),y)}function v(n){return e.exit("codeFenced"),t(n)}}};const oO={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),HC(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?l(t):LC(t)?e.attempt(iO,i,l)(t):(e.enter("codeFlowValue"),a(t))}function a(t){return null===t||LC(t)?(e.exit("codeFlowValue"),i(t)):(e.consume(t),a)}function l(n){return e.exit("codeIndented"),t(n)}}},iO={partial:!0,tokenize:function(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):LC(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):HC(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):LC(e)?o(e):n(e)}}};const aO={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"),l(t))}function l(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),l):96===t?(o=e.enter("codeTextSequence"),r=0,c(t)):LC(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l):(e.enter("codeTextData"),s(t))}function s(t){return null===t||32===t||96===t||LC(t)?(e.exit("codeTextData"),l(t)):(e.consume(t),s)}function c(n){return 96===n?(e.consume(n),r++,c):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(o.type="codeTextData",s(n))}}};class lO{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&&sO(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),sO(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),sO(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);sO(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);sO(this.left,t.reverse())}}}function sO(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 cO(e){const t={};let n,r,o,i,a,l,s,c=-1;const u=new lO(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&&(l=n[1]._tokenizer.events,o=0,o<l.length&&"lineEndingBlank"===l[o][1].type&&(o+=2),o<l.length&&"content"===l[o][1].type))for(;++o<l.length&&"content"!==l[o][1].type;)"chunkText"===l[o][1].type&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,uO(u,c)),c=t[c],s=!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 xC(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!s}function uO(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),l=a.events,s=[],c={};let u,d,f=-1,p=n,h=0,m=0;const g=[m];for(;p;){for(;e.get(++o)[1]!==p;);i.push(o),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<l.length;)"exit"===l[f][0]&&"enter"===l[f-1][0]&&l[f][1].type===l[f-1][1].type&&l[f][1].start.line!==l[f][1].end.line&&(m=f+1,g.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){const t=l.slice(g[f],g[f+1]),n=i.pop();s.push([n,n+t.length-1]),e.splice(n,2,t)}for(s.reverse(),f=-1;++f<s.length;)c[h+s[f][0]]=h+s[f][1],h+=s[f][1]-s[f][0]-1;return c}const dO={resolve:function(e){return cO(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):LC(t)?e.check(fO,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}}},fO={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"),HC(e,o,"linePrefix")};function o(o){if(null===o||LC(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 pO(e,t,n,r,o,i,a,l,s){const c=s||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||TC(t))return n(t);return e.enter(r),e.enter(a),e.enter(l),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(l),e.enter("chunkString",{contentType:"string"}),f(n))}function f(t){return 62===t?(e.exit("chunkString"),e.exit(l),d(t)):null===t||60===t||LC(t)?n(t):(e.consume(t),92===t?p:f)}function p(t){return 60===t||62===t||92===t?(e.consume(t),f):f(t)}function h(o){return u||null!==o&&41!==o&&!zC(o)?u<c&&40===o?(e.consume(o),u++,h):41===o?(e.consume(o),u--,h):null===o||32===o||40===o||TC(o)?n(o):(e.consume(o),92===o?m:h):(e.exit("chunkString"),e.exit(l),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 hO(e,t,n,r,o,i){const a=this;let l,s=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 s>999||null===d||91===d||93===d&&!l||94===d&&!s&&"_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):LC(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||LC(t)||s++>999?(e.exit("chunkString"),c(t)):(e.consume(t),l||(l=!FC(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),s++,u):u(t)}}function mO(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,l;return n(t)};function l(n){return n===a?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(i),s(n))}function s(t){return t===a?(e.exit(i),l(a)):null===t?n(t):LC(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),HC(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===a||null===t||LC(t)?(e.exit("chunkString"),s(t)):(e.consume(t),92===t?u:c)}function u(t){return t===a||92===t?(e.consume(t),c):c(t)}}function gO(e,t){let n;return function r(o){if(LC(o))return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r;if(FC(o))return HC(e,r,n?"linePrefix":"lineSuffix")(o);return t(o)}}const yO={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(t){return e.enter("definition"),function(t){return hO.call(r,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function i(t){return o=NC(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 zC(t)?gO(e,l)(t):l(t)}function l(t){return pO(e,s,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function s(t){return e.attempt(vO,c,c)(t)}function c(t){return FC(t)?HC(e,u,"whitespace")(t):u(t)}function u(i){return null===i||LC(i)?(e.exit("definition"),r.parser.defined.push(o),t(i)):n(i)}}},vO={partial:!0,tokenize:function(e,t,n){return function(t){return zC(t)?gO(e,r)(t):n(t)};function r(t){return mO(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return FC(t)?HC(e,i,"whitespace")(t):i(t)}function i(e){return null===e||LC(e)?t(e):n(e)}}};const bO={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return LC(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const wO={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"},xC(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||zC(t)?(e.exit("atxHeadingSequence"),i(t)):n(t)}function i(n){return 35===n?(e.enter("atxHeadingSequence"),a(n)):null===n||LC(n)?(e.exit("atxHeading"),t(n)):FC(n)?HC(e,i,"whitespace")(n):(e.enter("atxHeadingText"),l(n))}function a(t){return 35===t?(e.consume(t),a):(e.exit("atxHeadingSequence"),i(t))}function l(t){return null===t||35===t||zC(t)?(e.exit("atxHeadingText"),i(t)):(e.consume(t),l)}}};const xO=["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"],kO=["pre","script","style","textarea"],SO={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,l,s;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(l){return 33===l?(e.consume(l),u):47===l?(e.consume(l),i=!0,p):63===l?(e.consume(l),o=3,r.interrupt?t:D):PC(l)?(e.consume(l),a=String.fromCharCode(l),h):n(l)}function u(i){return 45===i?(e.consume(i),o=2,d):91===i?(e.consume(i),o=5,l=0,f):PC(i)?(e.consume(i),o=4,r.interrupt?t:D):n(i)}function d(o){return 45===o?(e.consume(o),r.interrupt?t:D):n(o)}function f(o){const i="CDATA[";return o===i.charCodeAt(l++)?(e.consume(o),6===l?r.interrupt?t:C:f):n(o)}function p(t){return PC(t)?(e.consume(t),a=String.fromCharCode(t),h):n(t)}function h(l){if(null===l||47===l||62===l||zC(l)){const s=47===l,c=a.toLowerCase();return s||i||!kO.includes(c)?xO.includes(a.toLowerCase())?(o=6,s?(e.consume(l),m):r.interrupt?t(l):C(l)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(l):i?g(l):y(l)):(o=1,r.interrupt?t(l):C(l))}return 45===l||RC(l)?(e.consume(l),a+=String.fromCharCode(l),h):n(l)}function m(o){return 62===o?(e.consume(o),r.interrupt?t:C):n(o)}function g(t){return FC(t)?(e.consume(t),g):E(t)}function y(t){return 47===t?(e.consume(t),E):58===t||95===t||PC(t)?(e.consume(t),v):FC(t)?(e.consume(t),y):E(t)}function v(t){return 45===t||46===t||58===t||95===t||RC(t)?(e.consume(t),v):b(t)}function b(t){return 61===t?(e.consume(t),w):FC(t)?(e.consume(t),b):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),s=t,x):FC(t)?(e.consume(t),w):k(t)}function x(t){return t===s?(e.consume(t),s=null,S):null===t||LC(t)?n(t):(e.consume(t),x)}function k(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||zC(t)?b(t):(e.consume(t),k)}function S(e){return 47===e||62===e||FC(e)?y(e):n(e)}function E(t){return 62===t?(e.consume(t),_):n(t)}function _(t){return null===t||LC(t)?C(t):FC(t)?(e.consume(t),_):n(t)}function C(t){return 45===t&&2===o?(e.consume(t),R):60===t&&1===o?(e.consume(t),M):62===t&&4===o?(e.consume(t),I):63===t&&3===o?(e.consume(t),D):93===t&&5===o?(e.consume(t),A):!LC(t)||6!==o&&7!==o?null===t||LC(t)?(e.exit("htmlFlowData"),O(t)):(e.consume(t),C):(e.exit("htmlFlowData"),e.check(EO,L,O)(t))}function O(t){return e.check(_O,N,L)(t)}function N(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),P}function P(t){return null===t||LC(t)?O(t):(e.enter("htmlFlowData"),C(t))}function R(t){return 45===t?(e.consume(t),D):C(t)}function M(t){return 47===t?(e.consume(t),a="",T):C(t)}function T(t){if(62===t){const n=a.toLowerCase();return kO.includes(n)?(e.consume(t),I):C(t)}return PC(t)&&a.length<8?(e.consume(t),a+=String.fromCharCode(t),T):C(t)}function A(t){return 93===t?(e.consume(t),D):C(t)}function D(t){return 62===t?(e.consume(t),I):45===t&&2===o?(e.consume(t),D):C(t)}function I(t){return null===t||LC(t)?(e.exit("htmlFlowData"),L(t)):(e.consume(t),I)}function L(n){return e.exit("htmlFlow"),t(n)}}},EO={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(ZC,t,n)}}},_O={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(LC(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 CO={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),l};function l(t){return 33===t?(e.consume(t),s):47===t?(e.consume(t),w):63===t?(e.consume(t),v):PC(t)?(e.consume(t),S):n(t)}function s(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),i=0,p):PC(t)?(e.consume(t),y):n(t)}function c(t){return 45===t?(e.consume(t),f):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):LC(t)?(a=u,T(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),f):u(t)}function f(e){return 62===e?M(e):45===e?d(e):u(e)}function p(t){const r="CDATA[";return t===r.charCodeAt(i++)?(e.consume(t),6===i?h:p):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),m):LC(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?M(t):93===t?(e.consume(t),g):h(t)}function y(t){return null===t||62===t?M(t):LC(t)?(a=y,T(t)):(e.consume(t),y)}function v(t){return null===t?n(t):63===t?(e.consume(t),b):LC(t)?(a=v,T(t)):(e.consume(t),v)}function b(e){return 62===e?M(e):v(e)}function w(t){return PC(t)?(e.consume(t),x):n(t)}function x(t){return 45===t||RC(t)?(e.consume(t),x):k(t)}function k(t){return LC(t)?(a=k,T(t)):FC(t)?(e.consume(t),k):M(t)}function S(t){return 45===t||RC(t)?(e.consume(t),S):47===t||62===t||zC(t)?E(t):n(t)}function E(t){return 47===t?(e.consume(t),M):58===t||95===t||PC(t)?(e.consume(t),_):LC(t)?(a=E,T(t)):FC(t)?(e.consume(t),E):M(t)}function _(t){return 45===t||46===t||58===t||95===t||RC(t)?(e.consume(t),_):C(t)}function C(t){return 61===t?(e.consume(t),O):LC(t)?(a=C,T(t)):FC(t)?(e.consume(t),C):E(t)}function O(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,N):LC(t)?(a=O,T(t)):FC(t)?(e.consume(t),O):(e.consume(t),P)}function N(t){return t===o?(e.consume(t),o=void 0,R):null===t?n(t):LC(t)?(a=N,T(t)):(e.consume(t),N)}function P(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||zC(t)?E(t):(e.consume(t),P)}function R(e){return 47===e||62===e||zC(e)?E(e):n(e)}function M(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"),A}function A(t){return FC(t)?HC(e,D,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):D(t)}function D(t){return e.enter("htmlTextData"),a(t)}}};const OO={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&&xC(e,0,e.length,n);return e},resolveTo:function(e,t){let n,r,o,i,a=e.length,l=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)){l=2;break}}else"labelEnd"===n.type&&(o=a);const s={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+l+2][1].end},end:{...e[o-2][1].start}};return i=[["enter",s,t],["enter",c,t]],i=kC(i,e.slice(r+1,r+l+3)),i=kC(i,[["enter",u,t]]),i=kC(i,XC(t.parser.constructs.insideSpan.null,e.slice(r+l+4,o-3),t)),i=kC(i,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),i=kC(i,e.slice(o+1)),i=kC(i,[["exit",s,t]]),xC(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(NC(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),l};function l(t){return 40===t?e.attempt(NO,c,i?c:u)(t):91===t?e.attempt(PO,c,i?s:u)(t):i?c(t):u(t)}function s(t){return e.attempt(RO,c,u)(t)}function c(e){return t(e)}function u(e){return o._balanced=!0,n(e)}}},NO={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 zC(t)?gO(e,o)(t):o(t)}function o(t){return 41===t?c(t):pO(e,i,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return zC(t)?gO(e,l)(t):c(t)}function a(e){return n(e)}function l(t){return 34===t||39===t||40===t?mO(e,s,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function s(t){return zC(t)?gO(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)}}},PO={tokenize:function(e,t,n){const r=this;return function(t){return hO.call(r,e,o,i,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(NC(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function i(e){return n(e)}}},RO={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 MO={name:"labelStartImage",resolveAll:OO.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 TO={name:"labelStartLink",resolveAll:OO.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 AO={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),HC(e,t,"linePrefix")}}};const DO={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||LC(i))?(e.exit("thematicBreak"),t(i)):n(i)}function a(t){return t===r?(e.consume(t),o++,a):(e.exit("thematicBreakSequence"),FC(t)?HC(e,i,"whitespace")(t):i(t))}}};const IO={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ZC,o,i);function o(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,HC(e,t,"listItemIndent",r.containerState.size+1)(n)}function i(n){return r.containerState.furtherBlankLines||!FC(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(zO,t,a)(n))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,HC(e,e.attempt(IO,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:AC(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(DO,n,s)(t):s(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(t)}return n(t)};function l(t){return AC(t)&&++a<10?(e.consume(t),l):(!r.interrupt||a<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),s(t)):n(t)}function s(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(ZC,r.interrupt?n:c,e.attempt(LO,d,u))}function c(e){return r.containerState.initialBlankLine=!0,i++,d(e)}function u(t){return FC(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)}}},LO={partial:!0,tokenize:function(e,t,n){const r=this;return HC(e,(function(e){const o=r.events[r.events.length-1];return!FC(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)}),"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},zO={partial:!0,tokenize:function(e,t,n){const r=this;return HC(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 FO={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,l=r.events.length;for(;l--;)if("lineEnding"!==r.events[l][1].type&&"linePrefix"!==r.events[l][1].type&&"content"!==r.events[l][1].type){a="paragraph"===r.events[l][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"),FC(t)?HC(e,a,"lineSuffix")(t):a(t))}function a(r){return null===r||LC(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const jO={tokenize:function(e){const t=this,n=e.attempt(ZC,(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,HC(e,e.attempt(this.parser.constructs.flow,r,e.attempt(dO,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 $O={resolveAll:UO()},BO=HO("string"),VO=HO("text");function HO(e){return{resolveAll:UO("text"===e?WO: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 s(e)?o(e):a(e)}function a(e){if(null!==e)return t.enter("data"),t.consume(e),l;t.consume(e)}function l(e){return s(e)?(t.exit("data"),o(e)):(t.consume(e),l)}function s(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 UO(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 WO(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,l=-1,s=0;for(;a--;){const e=o[a];if("string"==typeof e){for(l=e.length;32===e.charCodeAt(l-1);)s++,l--;if(l)break;l=-1}else if(-2===e)i=!0,s++;else if(-1!==e){a++;break}}if(s){const o={type:n===e.length||i||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?l:r.start._bufferIndex+l,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},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 qO={42:IO,43:IO,45:IO,48:IO,49:IO,50:IO,51:IO,52:IO,53:IO,54:IO,55:IO,56:IO,57:IO,62:JC},KO={91:yO},XO={[-2]:oO,[-1]:oO,32:oO},YO={35:wO,42:DO,45:[FO,DO],60:SO,61:FO,95:DO,96:rO,126:rO},GO={38:tO,92:eO},QO={[-5]:AO,[-4]:AO,[-3]:AO,33:MO,38:tO,42:YC,60:[QC,CO],91:TO,92:[bO,eO],93:OO,95:YC,96:aO},ZO={null:[YC,$O]};var JO=Object.freeze({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:KO,disable:{null:[]},document:qO,flow:YO,flowInitial:XO,insideSpan:ZO,string:GO,text:QO});function eN(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=[],l=[];const s={attempt:g((function(e,t){y(e,t.from)})),check:g(m),consume:function(e){LC(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,v()):-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=f(),c.events.push(["enter",n,c]),l.push(n),n},exit:function(e){const t=l.pop();return t.end=f(),c.events.push(["exit",t,c]),t},interrupt:g(m,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){o[e.line]=e.column,v()},events:[],now:f,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=kC(a,e),p(),null!==a[a.length-1])return[];return y(t,0),c.events=XC(i,c.events,c),c.events}};let u=t.tokenize.call(c,s);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 f(){const{_bufferIndex:e,_index:t,line:n,column:o,offset:i}=r;return{_bufferIndex:e,_index:t,line:n,column:o,offset:i}}function p(){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,p;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){p=function(){const e=f(),t=c.previous,n=c.currentConstruct,o=c.events.length,i=Array.from(l);return{from:o,restore:a};function a(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=o,l=i,v()}}(),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,s,g,y)(n)}}function g(t){return e(d,p),o}function y(e){return p.restore(),++u<a.length?m(a[u]):i}}}function y(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&xC(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function v(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const tN=/[\0\t\n\r]/g;const nN=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function rN(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return OC(n.slice(t?2:1),t?16:10)}return wC(n)||e}const oN={}.hasOwnProperty;function iN(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:_,autolinkEmail:_,atxHeading:i(Q),blockQuote:i(q),characterEscape:_,characterReference:_,codeFenced:i(K),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(K,a),codeText:i(X,a),codeTextData:_,data:_,codeFlowValue:_,definition:i(Y),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(G),hardBreakEscape:i(Z),hardBreakTrailing:i(Z),htmlFlow:i(J,a),htmlFlowData:_,htmlText:i(J,a),htmlTextData:_,image:i(ee),label:a,link:i(te),listItem:i(re),listItemValue:f,listOrdered:i(ne,d),listUnordered:i(ne),paragraph:i(oe),reference:j,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(Q),strong:i(ie),thematicBreak:i(le)},exit:{atxHeading:s(),atxHeadingSequence:x,autolink:s(),autolinkEmail:W,autolinkProtocol:U,blockQuote:s(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:B,characterReferenceMarkerNumeric:B,characterReferenceValue:V,characterReference:H,codeFenced:s(g),codeFencedFence:m,codeFencedFenceInfo:p,codeFencedFenceMeta:h,codeFlowValue:C,codeIndented:s(y),codeText:s(M),codeTextData:C,data:C,definition:s(),definitionDestinationString:w,definitionLabelString:v,definitionTitleString:b,emphasis:s(),hardBreakEscape:s(N),hardBreakTrailing:s(N),htmlFlow:s(P),htmlFlowData:C,htmlText:s(R),htmlTextData:C,image:s(A),label:I,labelText:D,lineEnding:O,link:s(T),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:$,resourceDestinationString:L,resourceTitleString:z,resource:F,setextHeading:s(E),setextHeadingLineSequence:S,setextHeadingText:k,strong:s(),thematicBreak:s()}};lN(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const i={stack:[r],tokenStack:[],config:t,enter:l,exit:c,buffer:a,resume:u,data:n},s=[];let d=-1;for(;++d<e.length;)if("listOrdered"===e[d][1].type||"listUnordered"===e[d][1].type)if("enter"===e[d][0])s.push(d);else{d=o(e,s.pop(),d)}for(d=-1;++d<e.length;){const n=t[e[d][0]];oN.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]||cN).call(i,void 0,e[0])}for(r.position={start:aN(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:aN(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,l=t-1,s=-1,c=!1;for(;++l<=n;){const t=e[l];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?s++:s--,a=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||a||s||i||(i=l),a=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:a=void 0}if(!s&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===s&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let a=l;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||l,0,["exit",r,t[2]]),l++,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(l,0,["enter",o,t[2]]),l++,n++,i=void 0,a=!0}}}return e[t][1]._spread=c,n}function i(e,t){return n;function n(n){l.call(this,e(n),n),t&&t.call(this,n)}}function a(){this.stack.push({type:"fragment",children:[]})}function l(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:aN(t.start),end:void 0}}function s(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+"` ("+W_({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]||cN).call(this,e,r[0])}n.position.end=aN(e.end)}function u(){return gC(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){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 v(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=NC(this.sliceSerialize(e)).toLowerCase()}function b(){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 k(){this.data.setextHeadingSlurpLineEnding=!0}function S(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function E(){this.data.setextHeadingSlurpLineEnding=void 0}function _(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:aN(e.start),end:void 0},t.push(n)),this.stack.push(n)}function C(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=aN(e.end)}function O(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=aN(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(_.call(this,e),C.call(this,e))}function N(){this.data.atHardBreak=!0}function P(){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 M(){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 A(){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 D(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(nN,rN)}(t),n.identifier=NC(t).toLowerCase()}function I(){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 L(){const e=this.resume();this.stack[this.stack.length-1].url=e}function z(){const e=this.resume();this.stack[this.stack.length-1].title=e}function F(){this.data.inReference=void 0}function j(){this.data.referenceType="collapsed"}function $(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=NC(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function B(e){this.data.characterReferenceType=e.type}function V(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;if(n)r=OC(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=wC(t)}this.stack[this.stack.length-1].value+=r}function H(e){this.stack.pop().position.end=aN(e.end)}function U(e){C.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function W(e){C.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function q(){return{type:"blockquote",children:[]}}function K(){return{type:"code",lang:null,meta:null,value:""}}function X(){return{type:"inlineCode",value:""}}function Y(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function G(){return{type:"emphasis",children:[]}}function Q(){return{type:"heading",depth:0,children:[]}}function Z(){return{type:"break"}}function J(){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 le(){return{type:"thematicBreak"}}}(n)(function(e){for(;!cO(e););return e}(function(e){const t={constructs:EC([JO,...(e||{}).extensions||[]]),content:n(UC),defined:[],document:n(WC),flow:n(jO),lazy:{},string:n(BO),text:n(VO)};return t;function n(e){return function(n){return eN(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(o,i,a){const l=[];let s,c,u,d,f;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(tN.lastIndex=u,s=tN.exec(o),d=s&&void 0!==s.index?s.index:o.length,f=o.charCodeAt(d),!s){n=o.slice(u);break}if(10===f&&u===d&&e)l.push(-3),e=void 0;else switch(e&&(l.push(-5),e=void 0),u<d&&(l.push(o.slice(u,d)),t+=d-u),f){case 0:l.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),l.push(-2);t++<c;)l.push(-1);break;case 10:l.push(-4),t=1;break;default:e=!0,t=1}u=d+1}return a&&(e&&l.push(-5),n&&l.push(n),l.push(null)),l}}()(e,t,!0))))}function aN(e){return{line:e.line,column:e.column,offset:e.offset}}function lN(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?lN(e,r):sN(e,r)}}function sN(e,t){let n;for(n in t)if(oN.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 cN(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+W_({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+W_({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+W_({start:t.start,end:t.end})+") is still open")}function uN(e){const t=this;t.parser=function(n){return iN(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function dN(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 fN(e){const t=e.spread;return null==t?e.children.length>1:t}function pN(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(hN(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(hN(t.slice(o),o>0,!1)),i.join("")}function hN(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 mN={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=VC(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let a,l=e.footnoteCounts.get(r);void 0===l?(l=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=i+1,l+=1,e.footnoteCounts.set(r,l);const s={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,s);const c={type:"element",tagName:"sup",properties:{},children:[s]};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 dN(e,t);const o={src:VC(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:VC(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 dN(e,t);const o={href:VC(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:VC(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=fN(n[r])}return t}(n):fN(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 l=-1;for(;++l<r.length;){const e=r[l];(o||0!==l||"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 s=r[r.length-1];s&&(o||"element"!==s.type||"p"!==s.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=H_(t.children[1]),a=V_(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 l=-1;const s=[];for(;++l<a;){const n=t.children[l],r={},a=i?i[l]: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)),s.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(s,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:pN(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:gN,yaml:gN,definition:gN,footnoteDefinition:gN};function gN(){}const yN="object"==typeof self?self:globalThis,vN=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 yN[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 yN[i](a),o)};return r})(new Map,e)(0),bN="",{toString:wN}={},{keys:xN}=Object,kN=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=wN.call(e).slice(8,-1);switch(n){case"Array":return[1,bN];case"Object":return[2,bN];case"Date":return[3,bN];case"RegExp":return[4,bN];case"Map":return[5,bN];case"Set":return[6,bN];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},SN=([e,t])=>0===e&&("function"===t||"symbol"===t),EN=(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,l]=kN(r);switch(a){case 0:{let t=r;switch(l){case"bigint":a=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);t=null;break;case"undefined":return o([-1],r)}return o([a,t],r)}case 1:{if(l){let e=r;return"DataView"===l?e=new Uint8Array(r.buffer):"ArrayBuffer"===l&&(e=new Uint8Array(r)),o([l,[...e]],r)}const e=[],t=o([a,e],r);for(const t of r)e.push(i(t));return t}case 2:{if(l)switch(l){case"BigInt":return o([l,r.toString()],r);case"Boolean":case"Number":case"String":return o([l,r.valueOf()],r)}if(t&&"toJSON"in r)return i(r.toJSON());const n=[],s=o([a,n],r);for(const t of xN(r))!e&&SN(kN(r[t]))||n.push([i(t),i(r[t])]);return s}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||!SN(kN(n))&&!SN(kN(o)))&&t.push([i(n),i(o)]);return n}case 6:{const t=[],n=o([a,t],r);for(const n of r)!e&&SN(kN(n))||t.push(i(n));return n}}const{message:s}=r;return o([a,{name:l,message:s}],r)};return i})(!(t||n),!!t,new Map,r)(e),r};var _N="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?vN(EN(e,t)):structuredClone(e):(e,t)=>vN(EN(e,t));function CN(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 ON(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const NN=function(e){if(null==e)return RN;if("function"==typeof e)return PN(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=NN(e[n]);return PN(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 PN(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 PN(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function PN(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 RN(){return!0}const MN=[],TN=!0,AN=!1;function DN(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;const i=NN(o),a=r?-1:1;!function e(o,l,s){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,f=MN;if((!t||i(o,l,s[s.length-1]||void 0))&&(f=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[TN,e];return null==e?MN:[e]}(n(o,s)),f[0]===AN))return f;if("children"in o&&o.children){const t=o;if(t.children&&"skip"!==f[0])for(u=(r?t.children.length:-1)+a,d=s.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(c=e(n,u,d)(),c[0]===AN)return c;u="number"==typeof c[1]?c[1]:u+a}}return f}}(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),DN(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 LN={}.hasOwnProperty,zN={};function FN(e,t){e.position&&(t.position=function(e){const t=H_(e),n=V_(e);if(t&&n)return{start:t,end:n}}(e))}function jN(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,_N(o)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function $N(e,t){const n=t.data||{},r=!("value"in t)||LN.call(n,"hProperties")||LN.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 BN(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 VN(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function HN(e,t){const n=function(e,t){const n=t||zN,r=new Map,o=new Map,i=new Map,a={...mN,...n.handlers},l={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const o=l.one(n[r],e);if(o){if(r&&"break"===n[r-1].type&&(Array.isArray(o)||"text"!==o.type||(o.value=VN(o.value)),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=VN(e.value))}Array.isArray(o)?t.push(...o):t.push(o)}}}return t},applyData:jN,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:a,one:function(e,t){const n=e.type,r=l.handlers[n];if(LN.call(l.handlers,n)&&r)return r(l,e,t);if(l.options.passThrough&&l.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=_N(n);return r.children=l.all(e),r}return _N(e)}return(l.options.unknownHandler||$N)(l,e,t)},options:n,patch:FN,wrap:BN};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)}})),l}(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||CN,r=e.options.footnoteBackLabel||ON,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let s=-1;for(;++s<e.footnoteOrder.length;){const o=e.footnoteById.get(e.footnoteOrder[s]);if(!o)continue;const i=e.all(o),a=String(o.identifier).toUpperCase(),c=VC(a.toLowerCase());let u=0;const d=[],f=e.footnoteCounts.get(a);for(;void 0!==f&&++u<=f;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(s,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(s,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const p=i[i.length-1];if(p&&"element"===p.type&&"p"===p.tagName){const e=p.children[p.children.length-1];e&&"text"===e.type?e.value+=" ":p.children.push({type:"text",value:" "}),p.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),l.push(h)}if(0!==l.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{..._N(a),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!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 UN(e,t){return e&&"run"in e?async function(n,r){const o=HN(n,{file:r,...t});await e.run(o,r)}:function(n,r){return HN(n,{file:r,...e||t})}}function WN(e){if(e)throw e}var qN,KN;var XN=function(){if(KN)return qN;KN=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},l=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return qN=function e(){var t,n,r,s,c,u,d=arguments[0],f=1,p=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(null!=(t=arguments[f]))for(n in t)r=l(d,n),d!==(s=l(t,n))&&(h&&s&&(i(s)||(c=o(s)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&i(r)?r:{},a(d,{name:n,newValue:e(h,u,s)})):void 0!==s&&a(d,{name:n,newValue:s}));return d},qN}(),YN=t(XN);function GN(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 QN(){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 l=e[++n];let s=-1;if(i)r(i);else{for(;++s<t.length;)null!==a[s]&&void 0!==a[s]||(a[s]=t[s]);t=a,l?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)}}(l,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 ZN={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');JN(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,l=t.length-1;for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else a<0&&(n=!0,a=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(o=i):(l=-1,o=a));r===o?o=a:o<0&&(o=e.length);return e.slice(r,o)},dirname:function(e){if(JN(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){JN(e);let t,n=e.length,r=-1,o=0,i=-1,a=0;for(;n--;){const l=e.codePointAt(n);if(47!==l)r<0&&(t=!0,r=n+1),46===l?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;)JN(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){JN(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,o="",i=0,a=-1,l=0,s=-1;for(;++s<=e.length;){if(s<e.length)n=e.codePointAt(s);else{if(47===n)break;n=47}if(47===n){if(a===s-1||1===l);else if(a!==s-1&&2===l){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=s,l=0;continue}}else if(o.length>0){o="",i=0,a=s,l=0;continue}t&&(o=o.length>0?o+"/..":"..",i=2)}else o.length>0?o+="/"+e.slice(a+1,s):o=e.slice(a+1,s),i=s-a-1;a=s,l=0}else 46===n&&l>-1?l++:l=-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 JN(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const eP={cwd:function(){return"/"}};function tP(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function nP(e){if("string"==typeof e)e=new URL(e);else if(!tP(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 rP=["history","path","basename","stem","extname","dirname"];class oP{constructor(e){let t;t=e?tP(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?"":eP.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<rP.length;){const e=rP[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)rP.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?ZN.basename(this.path):void 0}set basename(e){aP(e,"basename"),iP(e,"basename"),this.path=ZN.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?ZN.dirname(this.path):void 0}set dirname(e){lP(this.basename,"dirname"),this.path=ZN.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?ZN.extname(this.path):void 0}set extname(e){if(iP(e,"extname"),lP(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=ZN.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){tP(e)&&(e=nP(e)),aP(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?ZN.basename(this.path,this.extname):void 0}set stem(e){aP(e,"stem"),iP(e,"stem"),this.path=ZN.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 Y_(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 iP(e,t){if(e&&e.includes(ZN.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ZN.sep+"`")}function aP(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function lP(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const sP=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},cP={}.hasOwnProperty;class uP extends sP{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=QN()}copy(){const e=new uP;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(YN(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(hP("data",this.frozen),this.namespace[e]=t,this):cP.call(this.namespace,e)&&this.namespace[e]||void 0:e?(hP("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=yP(e),n=this.parser||this.Parser;return fP("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),fP("process",this.parser||this.Parser),pP("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,o){const i=yP(e),a=n.parse(i);function l(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 l(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,l(e,r)}))}}processSync(e){let t,n=!1;return this.freeze(),fP("processSync",this.parser||this.Parser),pP("processSync",this.compiler||this.Compiler),this.process(e,(function(e,r){n=!0,WN(e),t=r})),gP("processSync","process",n),t}run(e,t,n){mP(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=yP(t);r.run(e,a,(function(t,r,a){const l=r||e;t?i(t):o?o(l):n(void 0,l,a)}))}}runSync(e,t){let n,r=!1;return this.run(e,t,(function(e,t){WN(e),n=t,r=!0})),gP("runSync","run",r),n}stringify(e,t){this.freeze();const n=yP(t),r=this.compiler||this.Compiler;return pP("stringify",r),mP(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(hP("use",this.frozen),null==e);else if("function"==typeof e)l(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)l(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;l(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=YN(!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 l(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];GN(a)&&GN(r)&&(r=YN(!0,a,r)),n[o]=[e,r,...i]}}}}const dP=(new uP).freeze();function fP(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function pP(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function hP(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 mP(e){if(!GN(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function gP(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function yP(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new oP(e)}const vP=[],bP={allowDangerousHtml:!0},wP=/^(https?|ircs?|mailto|xmpp)$/i,xP=[{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 kP(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",o=e.className,i=e.components,a=e.disallowedElements,l=e.rehypePlugins||vP,s=e.remarkPlugins||vP,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...bP}:bP,u=e.skipHtml,d=e.unwrapDisallowed,f=e.urlTransform||SP,p=dP().use(uN).use(s).use(UN,c).use(l),h=new oP;"string"==typeof r&&(h.value=r);for(const t of xP)Object.hasOwn(e,t.from)&&(t.from,t.to&&t.to,t.id);const m=p.parse(h);let g=p.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 hC)if(Object.hasOwn(hC,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=hC[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=f(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}})),rC(g,{Fragment:Bu.Fragment,components:i,ignoreInvalidStyle:!0,jsx:Bu.jsx,jsxs:Bu.jsxs,passKeys:!0,passNode:!0})}function SP(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||wP.test(e.slice(0,t))?e:""}function EP(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 _P(e,t,n){const r=NN((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([CP(e[0]),OP(e[1])])}return t}(t);let i=-1;for(;++i<o.length;)DN(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 l=0;const s=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:(l!==n&&u.push({type:"text",value:e.value.slice(l,n)}),Array.isArray(i)?u.push(...i):i&&u.push(i),l=n+d[0].length,c=!0),!r.window)break;d=r.exec(e.value)}c?(l<e.value.length&&u.push({type:"text",value:e.value.slice(l)}),n.children.splice(s,1,...u)):u=[e];return s+u.length}(e,t)}}function CP(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 OP(e){return"function"==typeof e?e:function(){return e}}const NP="phrasing",PP=["autolink","link","image","label"];function RP(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function MP(e){this.config.enter.autolinkProtocol.call(this,e)}function TP(e){this.config.exit.autolinkProtocol.call(this,e)}function AP(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 DP(e){this.config.exit.autolinkEmail.call(this,e)}function IP(e){this.exit(e)}function LP(e){_P(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,zP],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,FP]],{ignore:["link","linkReference"]})}function zP(e,t,n,r,o){let i="";if(!jP(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=EP(e,"(");let i=EP(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 l={type:"link",title:null,url:i+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[l,{type:"text",value:a[1]}]:l}function FP(e,t,n,r){return!(!jP(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function jP(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||$C(n)||jC(n))&&(!t||47!==n)}function $P(){this.buffer()}function BP(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function VP(){this.buffer()}function HP(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function UP(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=NC(this.sliceSerialize(e)).toLowerCase(),n.label=t}function WP(e){this.exit(e)}function qP(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=NC(this.sliceSerialize(e)).toLowerCase(),n.label=t}function KP(e){this.exit(e)}function XP(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const a=n.enter("footnoteReference"),l=n.enter("reference");return i+=o.move(n.safe(n.associationId(e),{after:"]",before:i})),l(),a(),i+=o.move("]"),i}function YP(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 l=r.enter("footnoteDefinition"),s=r.enter("label");a+=i.move(r.safe(r.associationId(e),{before:a,after:"]"})),s(),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?QP:GP)));return l(),a},footnoteReference:XP},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function GP(e,t,n){return 0===t?e:QP(e,t,n)}function QP(e,t,n){return(n?"":" ")+e}XP.peek=function(){return"["};const ZP=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function JP(e){this.enter({type:"delete",children:[]},e)}function eR(e){this.exit(e)}function tR(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 nR(e){return e.length}function rR(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 oR(e,t,n){return">"+(n?"":" ")+e}function iR(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 aR(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],iR(i,a.inConstruct,!0)&&!iR(i,a.notInConstruct,!1)))return/[ \t]/.test(r.before)?"":" ";var i,a;return"\\\n"}function lR(e,t,n){return(n?"":" ")+e}function sR(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 cR(e){return"&#x"+e.toString(16).toUpperCase()+";"}function uR(e,t,n){const r=KC(e),o=KC(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 dR(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),l=a.move(o);let s=a.move(n.containerPhrasing(e,{after:o,before:l,...a.current()}));const c=s.charCodeAt(0),u=uR(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(s=cR(c)+s.slice(1));const d=s.charCodeAt(s.length-1),f=uR(r.after.charCodeAt(0),d,o);f.inside&&(s=s.slice(0,-1)+cR(d));const p=a.move(o);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},l+s+p}function fR(e){return e.value||""}function pR(e,t,n,r){const o=sR(n),i='"'===o?"Quote":"Apostrophe",a=n.enter("image");let l=n.enter("label");const s=n.createTracker(r);let c=s.move("![");return c+=s.move(n.safe(e.alt,{before:c,after:"]",...s.current()})),c+=s.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(l=n.enter("destinationRaw"),c+=s.move(n.safe(e.url,{before:c,after:e.title?" ":")",...s.current()}))),l(),e.title&&(l=n.enter(`title${i}`),c+=s.move(" "+o),c+=s.move(n.safe(e.title,{before:c,after:o,...s.current()})),c+=s.move(o),l()),c+=s.move(")"),a(),c}function hR(e,t,n,r){const o=e.referenceType,i=n.enter("imageReference");let a=n.enter("label");const l=n.createTracker(r);let s=l.move("![");const c=n.safe(e.alt,{before:s,after:"]",...l.current()});s+=l.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:s,after:"]",...l.current()});return a(),n.stack=u,i(),"full"!==o&&c&&c===d?"shortcut"===o?s=s.slice(0,-1):s+=l.move("]"):s+=l.move(d+"]"),s}function mR(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 gR(e,t){const n=gC(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 yR(e,t,n,r){const o=sR(n),i='"'===o?"Quote":"Apostrophe",a=n.createTracker(r);let l,s;if(gR(e,n)){const t=n.stack;n.stack=[],l=n.enter("autolink");let r=a.move("<");return r+=a.move(n.containerPhrasing(e,{before:r,after:">",...a.current()})),r+=a.move(">"),l(),n.stack=t,r}l=n.enter("link"),s=n.enter("label");let c=a.move("[");return c+=a.move(n.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(s=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),s(),e.title&&(s=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),s()),c+=a.move(")"),l(),c}function vR(e,t,n,r){const o=e.referenceType,i=n.enter("linkReference");let a=n.enter("label");const l=n.createTracker(r);let s=l.move("[");const c=n.containerPhrasing(e,{before:s,after:"]",...l.current()});s+=l.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:s,after:"]",...l.current()});return a(),n.stack=u,i(),"full"!==o&&c&&c===d?"shortcut"===o?s=s.slice(0,-1):s+=l.move("]"):s+=l.move(d+"]"),s}function bR(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 wR(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}tR.peek=function(){return"~"},dR.peek=function(e,t,n){return n.options.emphasis||"*"},fR.peek=function(){return"<"},pR.peek=function(){return"!"},hR.peek=function(){return"!"},mR.peek=function(){return"`"},yR.peek=function(e,t,n){return gR(e,n)?"<":"["},vR.peek=function(){return"["};const xR=NN(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function kR(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),l=a.move(o+o);let s=a.move(n.containerPhrasing(e,{after:o,before:l,...a.current()}));const c=s.charCodeAt(0),u=uR(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(s=cR(c)+s.slice(1));const d=s.charCodeAt(s.length-1),f=uR(r.after.charCodeAt(0),d,o);f.inside&&(s=s.slice(0,-1)+cR(d));const p=a.move(o+o);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},l+s+p}kR.peek=function(e,t,n){return n.options.strong||"*"};const SR={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()),oR);return o(),a},break:aR,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,lR);return e(),t}const l=n.createTracker(r),s=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=l.move(s);if(e.lang){const t=n.enter(`codeFencedLang${a}`);u+=l.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...l.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${a}`);u+=l.move(" "),u+=l.move(n.safe(e.meta,{before:u,after:"\n",encode:["`"],...l.current()})),t()}return u+=l.move("\n"),i&&(u+=l.move(i+"\n")),u+=l.move(s),c(),u},definition:function(e,t,n,r){const o=sR(n),i='"'===o?"Quote":"Apostrophe",a=n.enter("definition");let l=n.enter("label");const s=n.createTracker(r);let c=s.move("[");return c+=s.move(n.safe(n.associationId(e),{before:c,after:"]",...s.current()})),c+=s.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(l=n.enter("destinationRaw"),c+=s.move(n.safe(e.url,{before:c,after:e.title?" ":"\n",...s.current()}))),l(),e.title&&(l=n.enter(`title${i}`),c+=s.move(" "+o),c+=s.move(n.safe(e.title,{before:c,after:o,...s.current()})),c+=s.move(o),l()),a(),c},emphasis:dR,hardBreak:aR,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,AN})),Boolean((!e.depth||e.depth<3)&&gC(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),l=n.enter("headingAtx"),s=n.enter("phrasing");i.move(a+" ");let c=n.containerPhrasing(e,{before:"# ",after:"\n",...i.current()});return/^[\t ]/.test(c)&&(c=cR(c.charCodeAt(0))+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),s(),l(),c},html:fR,image:pR,imageReference:hR,inlineCode:mR,link:yR,linkReference:vR,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):bR(n);const l=e.ordered?"."===a?")":".":function(e){const t=bR(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 s=!(!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]||(s=!0),wR(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){s=!0;break}}}}s&&(a=l),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||bR(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 l=n.createTracker(r);l.move(i+" ".repeat(a-i.length)),l.shift(a);const s=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,l.current()),(function(e,t,n){if(t)return(n?"":" ".repeat(a))+e;return(n?i:i+" ".repeat(a-i.length))+e}));return s(),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 xR(e)}))?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:kR,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(wR(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 ER(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 _R(e){this.exit(e),this.data.inTable=void 0}function CR(e){this.enter({type:"tableRow",children:[]},e)}function OR(e){this.exit(e)}function NR(e){this.enter({type:"tableCell",children:[]},e)}function PR(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,RR));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function RR(e,t){return"|"===t?t:e}function MR(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=SR.inlineCode(e,t,n);n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&"));return r},table:function(e,t,n,r){return l(function(e,t,n){const r=e.children;let o=-1;const i=[],a=t.enter("table");for(;++o<r.length;)i[o]=s(r[o],t,n);return a(),i}(e,n,r),e.align)},tableCell:a,tableRow:function(e,t,n,r){const o=s(e,n,r),i=l([o]);return i.slice(0,i.indexOf("\n"))}}};function a(e,t,n,r){const o=n.enter("tableCell"),a=n.enter("phrasing"),l=n.containerPhrasing(e,{...r,before:i,after:i});return a(),o(),l}function l(e,t){return function(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||nR,i=[],a=[],l=[],s=[];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===s[i]||e>s[i])&&(s[i]=e)}t.push(a)}a[u]=t,l[u]=r}var d;let f=-1;if("object"==typeof r&&"length"in r)for(;++f<c;)i[f]=rR(r[f]);else{const e=rR(r);for(;++f<c;)i[f]=e}f=-1;const p=[],h=[];for(;++f<c;){const e=i[f];let t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let o=!1===n.alignDelimiters?1:Math.max(1,s[f]-t.length-r.length);const a=t+"-".repeat(o)+r;!1!==n.alignDelimiters&&(o=t.length+o+r.length,o>s[f]&&(s[f]=o),h[f]=o),p[f]=a}a.splice(1,0,p),l.splice(1,0,h),u=-1;const m=[];for(;++u<a.length;){const e=a[u],t=l[u];f=-1;const r=[];for(;++f<c;){const o=e[f]||"";let a="",l="";if(!1!==n.alignDelimiters){const e=s[f]-(t[f]||0),n=i[f];114===n?a=" ".repeat(e):99===n?e%2?(a=" ".repeat(e/2+.5),l=" ".repeat(e/2-.5)):(a=" ".repeat(e/2),l=a):l=" ".repeat(e)}!1===n.delimiterStart||f||r.push("|"),!1===n.padding||!1===n.alignDelimiters&&""===o||!1===n.delimiterStart&&!f||r.push(" "),!1!==n.alignDelimiters&&r.push(a),r.push(o),!1!==n.alignDelimiters&&r.push(l),!1!==n.padding&&r.push(" "),!1===n.delimiterEnd&&f===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 s(e,t,n){const r=e.children;let o=-1;const i=[],l=t.enter("tableRow");for(;++o<r.length;)i[o]=a(r[o],0,t,n);return l(),i}}function TR(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function AR(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 DR(e,t,n,r){const o=e.children[0],i="boolean"==typeof e.checked&&o&&"paragraph"===o.type,a="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);i&&l.move(a);let s=SR.listItem(e,t,n,{...r,...l.current()});return i&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,(function(e){return e+a}))),s}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},LR={tokenize:function(e,t,n){let r,o,i;return a;function a(t){return 46===t||95===t?e.check(FR,s,l)(t):null===t||zC(t)||$C(t)||45!==t&&jC(t)?s(t):(i=!0,e.consume(t),a)}function l(t){return 95===t?r=!0:(o=r,r=void 0),e.consume(t),a}function s(e){return o||r||!i?n(e):t(e)}},partial:!0},zR={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(FR,t,i)(a):null===a||zC(a)||$C(a)?t(a):(e.consume(a),o)}function i(t){return 41===t&&r++,e.consume(t),o}},partial:!0},FR={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||zC(a)||$C(a)?t(a):n(a)}function o(e){return null===e||40===e||91===e||zC(e)||$C(e)?t(e):r(e)}function i(e){return PC(e)?a(e):n(e)}function a(t){return 59===t?(e.consume(t),r):PC(t)?(e.consume(t),a):n(t)}},partial:!0},jR={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return RC(e)?n(e):t(e)}},partial:!0},$R={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!WR.call(r,r.previous)||YR(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(IR,e.attempt(LR,e.attempt(zR,o),n),n)(t)};function o(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:WR},BR={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let o="",i=!1;return function(t){if((72===t||104===t)&&qR.call(r,r.previous)&&!YR(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(t),e.consume(t),a;return n(t)};function a(t){if(PC(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),l}return n(t)}function l(t){return 47===t?(e.consume(t),i?s:(i=!0,l)):n(t)}function s(t){return null===t||TC(t)||zC(t)||$C(t)||jC(t)?n(t):e.attempt(LR,e.attempt(zR,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:qR},VR={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let o,i;return function(t){if(!XR(t)||!KR.call(r,r.previous)||YR(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(t)};function a(t){return XR(t)?(e.consume(t),a):64===t?(e.consume(t),l):n(t)}function l(t){return 46===t?e.check(jR,c,s)(t):45===t||95===t||RC(t)?(i=!0,e.consume(t),l):c(t)}function s(t){return e.consume(t),o=!0,l}function c(a){return i&&o&&PC(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(a)):n(a)}},previous:KR},HR={};let UR=48;for(;UR<123;)HR[UR]=VR,UR++,58===UR?UR=65:91===UR&&(UR=97);function WR(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||zC(e)}function qR(e){return!PC(e)}function KR(e){return!(47===e||XR(e))}function XR(e){return 43===e||45===e||46===e||95===e||RC(e)}function YR(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}HR[43]=VR,HR[45]=VR,HR[46]=VR,HR[95]=VR,HR[72]=[VR,BR],HR[104]=[VR,BR],HR[87]=[VR,$R],HR[119]=[VR,$R];const GR={tokenize:function(e,t,n){const r=this;return HC(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 QR(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 l=NC(r.sliceSerialize({start:a.end,end:r.now()}));if(94!==l.codePointAt(0)||!i.includes(l.slice(1)))return n(o);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o)}}function ZR(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)},l=[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,...l),e}function JR(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"),l};function l(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",s)}function s(l){if(a>999||93===l&&!i||null===l||91===l||zC(l))return n(l);if(93===l){e.exit("chunkString");const i=e.exit("gfmFootnoteCallString");return o.includes(NC(r.sliceSerialize(i)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(l)}return zC(l)||(i=!0),a++,e.consume(l),92===l?c:s}function c(t){return 91===t||92===t||93===t?(e.consume(t),a++,s):s(t)}}function eM(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a,l=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),s};function s(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(l>999||93===t&&!a||null===t||91===t||zC(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return i=NC(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return zC(t)||(a=!0),l++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),l++,c):c(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o.includes(i)||o.push(i),HC(e,f,"gfmFootnoteDefinitionWhitespace")):n(t)}function f(e){return t(e)}}function tM(e,t,n){return e.check(ZC,t,e.attempt(GR,t,n))}function nM(e){e.exit("gfmFootnoteDefinition")}function rM(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"),l(t)};function l(i){const s=KC(o);if(126===i)return a>1?r(i):(e.consume(i),a++,l);if(a<2&&!t)return r(i);const c=e.exit("strikethroughSequenceTemporary"),u=KC(i);return c._open=!u||2===u&&Boolean(s),c._close=!s||2===s&&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]],l=t.parser.constructs.insideSpan.null;l&&xC(a,a.length,0,XC(l,e.slice(r+1,n),t)),xC(a,a.length,0,[["exit",i,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",o,t]]),xC(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 oM{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 iM(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 aM(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:l;if(i===w&&r.parser.lazy[r.now().line])return n(e);return i(e)};function l(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return s(e);return o=!0,a+=1,s(e)}(t)}function s(t){return null===t?n(t):LC(t)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):FC(t)?HC(e,s,"whitespace")(t):(a+=1,o&&(o=!1,i+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),o=!0,s):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||zC(t)?(e.exit("data"),s(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,FC(t)?HC(e,f,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):f(t))}function f(t){return 45===t||58===t?h(t):124===t?(o=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),p):b(t)}function p(t){return FC(t)?HC(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||LC(t)?v(t):b(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),g(t)):b(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 FC(t)?HC(e,v,"whitespace")(t):v(t)}function v(n){return 124===n?f(n):(null===n||LC(n))&&o&&i===a?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):b(n)}function b(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||LC(n)?(e.exit("tableRow"),t(n)):FC(n)?HC(e,x,"whitespace")(n):(e.enter("data"),k(n))}function k(t){return null===t||124===t||zC(t)?(e.exit("data"),x(t)):(e.consume(t),92===t?S:k)}function S(t){return 92===t||124===t?(e.consume(t),k):k(t)}}function lM(e,t){let n,r,o,i=-1,a=!0,l=0,s=[0,0,0,0],c=[0,0,0,0],u=!1,d=0;const f=new oM;for(;++i<e.length;){const p=e[i],h=p[1];"enter"===p[0]?"tableHead"===h.type?(u=!1,0!==d&&(cM(f,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(i,0,[["enter",n,t]])):"tableRow"===h.type||"tableDelimiterRow"===h.type?(a=!0,o=void 0,s=[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)},f.add(i,0,[["enter",r,t]])),l="tableDelimiterRow"===h.type?2:r?3:1):!l||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type?"tableCellDivider"===h.type&&(a?a=!1:(0!==s[1]&&(c[0]=c[1],o=sM(f,t,s,l,void 0,o)),s=c,c=[s[1],i,0,0])):(a=!1,0===c[2]&&(0!==s[1]&&(c[0]=c[1],o=sM(f,t,s,l,void 0,o),s=[0,0,0,0]),c[2]=i)):"tableHead"===h.type?(u=!0,d=i):"tableRow"===h.type||"tableDelimiterRow"===h.type?(d=i,0!==s[1]?(c[0]=c[1],o=sM(f,t,s,l,i,o)):0!==c[1]&&(o=sM(f,t,c,l,i,o)),l=0):!l||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type||(c[3]=i)}for(0!==d&&cM(f,t,d,n,r),f.consume(t.events),i=-1;++i<t.events.length;){const e=t.events[i];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=iM(t.events,i))}return e}function sM(e,t,n,r,o,i){const a=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(i.end=Object.assign({},uM(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const l=uM(t.events,n[1]);if(i={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",i,t]]),0!==n[2]){const o=uM(t.events,n[2]),i=uM(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({},uM(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function cM(e,t,n,r,o){const i=[],a=uM(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 uM(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const dM={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 zC(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 LC(r)?t(r):FC(r)?e.check({tokenize:fM},t,n)(r):n(r)}}};function fM(e,t,n){return HC(e,(function(e){return null===e?n(e):t(e)}),"whitespace")}const pM={};function hM(e){const t=e||pM,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),i=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return EC([{text:HR},{document:{91:{name:"gfmFootnoteDefinition",tokenize:eM,continuation:{tokenize:tM},exit:nM}},text:{91:{name:"gfmFootnoteCall",tokenize:JR},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:QR,resolveTo:ZR}}},rM(e),{flow:{null:{name:"table",tokenize:aM,resolveAll:lM}}},{text:{91:dM}}])}(t)),o.push([{transforms:[LP],enter:{literalAutolink:RP,literalAutolinkEmail:MP,literalAutolinkHttp:MP,literalAutolinkWww:MP},exit:{literalAutolink:IP,literalAutolinkEmail:DP,literalAutolinkHttp:TP,literalAutolinkWww:AP}},{enter:{gfmFootnoteCallString:$P,gfmFootnoteCall:BP,gfmFootnoteDefinitionLabelString:VP,gfmFootnoteDefinition:HP},exit:{gfmFootnoteCallString:UP,gfmFootnoteCall:WP,gfmFootnoteDefinitionLabelString:qP,gfmFootnoteDefinition:KP}},{canContainEols:["delete"],enter:{strikethrough:JP},exit:{strikethrough:eR}},{enter:{table:ER,tableData:NR,tableHeader:NR,tableRow:CR},exit:{codeText:PR,table:_R,tableData:OR,tableHeader:OR,tableRow:OR}},{exit:{taskListCheckValueChecked:TR,taskListCheckValueUnchecked:TR,paragraph:AR}}]),i.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:NP,notInConstruct:PP},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:NP,notInConstruct:PP},{character:":",before:"[ps]",after:"\\/",inConstruct:NP,notInConstruct:PP}]},YP(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:ZP}],handlers:{delete:tR}},MR(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:DR}}]}}(t))}const mM=({item:e})=>{const t=s.useContext(Iz);return s.createElement("div",{className:"libnodeentry",onClick:n=>{2===n.detail&&t.worker?.add_node(e.node_id)},title:e.description},e.node_name||e.node_id)},gM=(e,t)=>{const n=e.nodes?.some((e=>e.node_id.toLowerCase().includes(t.toLowerCase())))??!1,r=e.subshelves?.some((e=>gM(e,t)))??!1;return n||r},yM=({item:e,filter:t,parentkey:n})=>{const[r,o]=s.useState(!1),i=e.nodes?.filter((e=>e.node_id.toLowerCase().includes(t.toLowerCase()))),a=r||t.length>0;return gM(e,t)?s.createElement("div",{className:"shelfcontainer"},s.createElement("div",{className:"shelftitle",onClick:()=>o(!r),style:{cursor:"pointer"},title:e.description},s.createElement("div",{className:"shelftitle_text"},e.name),s.createElement("div",{className:"expandicon "+(a?"open":"close")},s.createElement(fb,null))),s.createElement("div",{className:"libnodecontainer "+(a?"open":"close")},s.createElement("div",{className:"libnodecontainer_inner"},i&&s.createElement(s.Fragment,null,i.map((e=>s.createElement(mM,{key:e.node_id,item:e})))),e.subshelves&&s.createElement(s.Fragment,null,e.subshelves.map((e=>s.createElement(yM,{key:n+e.name,item:e,filter:t,parentkey:n+e.name})))))),s.createElement("hr",null)):s.createElement(s.Fragment,null)},vM=({filter:e,setFilter:t})=>s.createElement("div",{className:"libfilter"},s.createElement(xw,{fontSize:"inherit"}),s.createElement("input",{type:"text",placeholder:"Filter",value:e,onChange:e=>{t(e.target.value)}}),e&&s.createElement(ww,{fontSize:"inherit",onClick:()=>{t("")}})),bM=({availableModule:e})=>s.createElement("div",{className:"module-links"},e.homepage&&s.createElement(s.Fragment,null,s.createElement("a",{href:e.homepage,target:"_blank",rel:"noopener noreferrer"},"Homepage")),e.source&&e.homepage&&" | ",e.source&&s.createElement(s.Fragment,null,s.createElement("a",{href:e.source,target:"_blank",rel:"noopener noreferrer"},"Source"))),wM=({availableModule:e})=>{const[t,n]=s.useState(!1),r=e.description.length>150?e.description.substring(0,150)+"...":e.description;return s.createElement("div",{className:"module-description"},s.createElement(kP,{remarkPlugins:[hM]},t?e.description.replace(/\\n/g," \n"):r.replace(/\\n/g," \n")),e.description.length>150&&s.createElement("button",{onClick:()=>n(!t),className:"toggle-description"},t?"Show less":"Show more"))},xM=({availableModule:e,on_change:t})=>{const[n,r]=s.useState(e.version||"latest"),[o,i]=s.useState(">=");return e.releases&&!e.releases.includes(n)&&e.releases.unshift(n),s.createElement(s.Fragment,null,s.createElement("select",{value:o,onChange:e=>{i(e.target.value),"latest"!==n&&t(e.target.value+n)}},s.createElement("option",{value:">="},">="),s.createElement("option",{value:"=="},"=="),s.createElement("option",{value:"<="},"<=")),s.createElement("select",{onChange:e=>{const n=e.target.value;r(n),t("latest"!==n?o+n:n)},value:n},e.releases&&e.releases.map((e=>s.createElement("option",{key:e,value:e},e)))))},kM=({availableModule:e,on_remove:t,on_update:n})=>{const[r,o]=s.useState(e.version||"latest");return s.createElement("div",{className:"addable-module"},s.createElement("div",{className:"module-name"},e.name+(e.version?` (${e.version})`:"")),s.createElement(bM,{availableModule:e}),s.createElement(wM,{availableModule:e}),s.createElement("div",null,s.createElement(xM,{availableModule:e,on_change:o}),s.createElement("button",{className:"update-button",disabled:r===e.version,onClick:()=>{n(e,r)}},"Update"),s.createElement("button",{className:"remove-button",onClick:()=>{t(e)}},"Remove")))},SM=({availableModule:e,on_add:t})=>{const[n,r]=s.useState(e.version||"latest");return s.createElement("div",{className:"addable-module"},s.createElement("div",{className:"module-name"},e.name+(e.version?` (${e.version})`:"")),s.createElement(bM,{availableModule:e}),s.createElement(wM,{availableModule:e}),s.createElement("div",null,s.createElement(xM,{availableModule:e,on_change:r}),s.createElement("button",{className:"add-button",onClick:()=>{t(e,n)}},"Add")))},EM=({availableModule:e,on_add:t})=>{const[n,r]=s.useState(e.version||"latest");return s.createElement("div",{className:"addable-module"},s.createElement("div",{className:"module-name"},e.name),s.createElement(bM,{availableModule:e}),s.createElement(wM,{availableModule:e}),s.createElement("div",null,s.createElement(xM,{availableModule:e,on_change:r}),s.createElement("button",{className:"add-button",onClick:()=>{t(e,n)}},"Add")))},_M=({children:e})=>{const[t,n]=s.useState(""),r=s.useContext(Iz),[o,i]=s.useState(!0),[a,l]=s.useState(!0),[c,u]=s.useState(!0),[d,f]=s.useState({installed:[],available:[],active:[]}),[p,h]=s.useState(!1);if(!r.worker)return s.createElement(s.Fragment,null);const m=(e,t)=>{h(!1),void 0!==r.worker&&r.worker.add_lib(e.name,t)},g=(e,t)=>{h(!1),void 0!==r.worker&&r.worker.add_lib(e.name,t)},y=e=>{h(!1),void 0!==r.worker&&r.worker.remove_lib(e.name)},v=(e,t)=>{h(!1),void 0!==r.worker&&r.worker.add_lib(e.name,t)},b=e=>e.filter((e=>e.name.toLowerCase().includes(t.toLowerCase())||e.description.toLowerCase().includes(t.toLowerCase()))),w=b(d.available),x=b(d.installed),k=b(d.active);return s.createElement(_w,{title:"Manage Library",trigger:e,description:"Add or remove libraries to the current worker.",onOpenChange:e=>{e&&void 0!==r.worker&&r.worker.is_open&&r.worker.get_available_modules().then((e=>{f(e)}))},open:p,setOpen:h},s.createElement("input",{className:"filter-input styledinput",type:"text",placeholder:"Filter modules...",value:t,onChange:e=>n(e.target.value)}),s.createElement("div",{className:"packagelist",style:{maxHeight:"70%",overflow:"auto"}},x.length>0&&s.createElement("h3",{onClick:()=>{u(!c)}},"Installed"),c&&x.map((e=>s.createElement(SM,{key:e.name+e.source,availableModule:e,on_add:m}))),w.length>0&&s.createElement("h3",{onClick:()=>{l(!a)}},"Available"),a&&w.map((e=>s.createElement(EM,{key:e.name+e.source,availableModule:e,on_add:g}))),k.length>0&&s.createElement("h3",{onClick:()=>{i(!o)}},"Active"),o&&k.map((e=>s.createElement(kM,{key:e.name+e.source,availableModule:e,on_remove:y,on_update:v})))))},CM=({ins:e})=>{const[t,n]=s.useState(e.name),r=s.useContext(Iz);return s.createElement(s.Fragment,null,s.createElement(_w,{title:e.name,description:"Settings for"+e.name,trigger:s.createElement("div",null,"Settings"),buttons:[{text:"Save",onClick:()=>{r.worker&&(r.worker.update_external_worker(e.uuid,e.nodeclassid,{name:t}),e.name=t)},close:!0},{text:"Delete",onClick:()=>{r.worker&&r.worker.remove_external_worker(e.uuid,e.nodeclassid)},close:!0}]},s.createElement("div",null,s.createElement("div",null,s.createElement("label",{htmlFor:"name"},"Name: "),s.createElement("input",{type:"text",name:"name",value:t,onChange:e=>n(e.target.value),className:"styledinput"})))))},OM=({ins:e,lib:t,filter:n="",parentkey:r})=>{const[o,i]=s.useState(!1),a=t?.nodes?.filter((e=>e.node_id.toLowerCase().includes(n.toLowerCase())));return s.createElement("div",{className:"shelfcontainer"},s.createElement("div",{className:"shelftitle",onClick:()=>i(!o),style:{cursor:"pointer"},title:e.name},s.createElement("div",{className:"shelftitle_text"},e.name),s.createElement("div",{className:"expandicon "+(o?"open":"close")},s.createElement(fb,null))),s.createElement("div",{className:"libnodecontainer "+(o?"open":"close")},s.createElement("div",{className:"libnodecontainer_inner"},o&&s.createElement(s.Fragment,null,s.createElement("div",{className:"libnodeentry",title:e.uuid},s.createElement(CM,{ins:e})),t&&s.createElement(s.Fragment,null,a&&s.createElement(s.Fragment,null,a.map((e=>s.createElement(mM,{key:e.node_id,item:e})))),t.subshelves.map((e=>s.createElement(yM,{key:r+e.name,item:e,filter:n,parentkey:r+e.name}))))))))},NM=({item:e,mod:t,lib:n})=>{const r=s.useContext(Iz),[o,i]=s.useState(!1),a=e.name||e.module+"."+e.class_name;return s.createElement("div",{className:"shelfcontainer"},s.createElement("div",{className:"shelftitle",onClick:()=>i(!o),style:{cursor:"pointer"},title:a},s.createElement("div",{className:"shelftitle_text"},a),s.createElement("div",{className:"expandicon "+(o?"open":"close")},s.createElement(fb,null))),s.createElement("div",{className:"libnodecontainer "+(o?"open":"close")},s.createElement("div",{className:"libnodecontainer_inner"},o&&s.createElement(s.Fragment,null,s.createElement("div",{className:"libnodeentry",onClick:n=>{2===n.detail&&r.worker?.add_external_worker({module:t,cls_module:e.module,cls_name:e.class_name})},title:e.name},"New Instance"),e.instances.map((e=>s.createElement(OM,{key:e.uuid,ins:e,lib:n?.subshelves.find((t=>t.name===e.uuid)),parentkey:e.uuid})))))))},PM=({externalworkermod:e,lib:t})=>{const[n,r]=s.useState(!1),o=n;return s.createElement("div",{className:"shelfcontainer"},s.createElement("div",{className:"shelftitle",onClick:()=>r(!n),style:{cursor:"pointer"},title:e.module},s.createElement("div",{className:"shelftitle_text"},e.module),s.createElement("div",{className:"expandicon "+(o?"open":"close")},s.createElement(fb,null))),s.createElement("div",{className:"libnodecontainer "+(o?"open":"close")},s.createElement("div",{className:"libnodecontainer_inner"},e.worker_classes.map((n=>s.createElement(NM,{key:n.module+n.class_name,item:n,mod:e.module,lib:t}))))),s.createElement("hr",null))},RM=()=>{const e=s.useContext(Iz),t=e.lib.libstate(),[n,r]=s.useState(""),o=e.worker?.state((e=>e.is_open))??!1;return s.createElement("div",{className:"libcontainer"},s.createElement("div",{className:"library"},s.createElement("div",{className:"libtitle"},"Lib"),s.createElement("hr",{className:"hr_prominent"}),s.createElement(vM,{filter:n,setFilter:r}),s.createElement("div",{className:"vscrollcontainer"},t.lib.shelves.map((e=>"_external_worker"==e.name?s.createElement(s.Fragment,null):s.createElement(yM,{key:e.name,item:e,filter:n,parentkey:e.name})))),s.createElement("hr",null),s.createElement("div",{className:"libtitle"},"External Worker"),s.createElement("hr",{className:"hr_prominent"}),s.createElement("div",{className:"vscrollcontainer"},t.external_worker?.map((e=>s.createElement(PM,{key:e.module,externalworkermod:e,lib:t.lib.shelves.find((e=>"_external_worker"===e.name))})))),s.createElement("hr",null)),s.createElement("div",{style:{paddingTop:"0.5rem"}}),o&&s.createElement("div",{className:"addlib"},s.createElement(_M,null,s.createElement("button",null,"Manage Libraries"))))};const{useRef:MM}=c;function TM(e){const t=MM();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 AM=s.forwardRef(((e,t)=>Bu.jsx(ed.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}})));AM.displayName="VisuallyHidden";var DM=AM,[IM,LM]=Vu("Tooltip",[sk]),zM=sk(),FM="TooltipProvider",jM=700,$M="tooltip.open",[BM,VM]=IM(FM),HM=e=>{const{__scopeTooltip:t,delayDuration:n=jM,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,[a,l]=s.useState(!0),c=s.useRef(!1),u=s.useRef(0);return s.useEffect((()=>{const e=u.current;return()=>window.clearTimeout(e)}),[]),Bu.jsx(BM,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:s.useCallback((()=>{window.clearTimeout(u.current),l(!1)}),[]),onClose:s.useCallback((()=>{window.clearTimeout(u.current),u.current=window.setTimeout((()=>l(!0)),r)}),[r]),isPointerInTransitRef:c,onPointerInTransitChange:s.useCallback((e=>{c.current=e}),[]),disableHoverableContent:o,children:i})};HM.displayName=FM;var UM="Tooltip",[WM,qM]=IM(UM),KM=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:l}=e,c=VM(UM,e.__scopeTooltip),u=zM(t),[d,f]=s.useState(null),p=Ku(),h=s.useRef(0),m=a??c.disableHoverableContent,g=l??c.delayDuration,y=s.useRef(!1),[v=!1,b]=Yu({prop:r,defaultProp:o,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent($M))):c.onClose(),i?.(e)}}),w=s.useMemo((()=>v?y.current?"delayed-open":"instant-open":"closed"),[v]),x=s.useCallback((()=>{window.clearTimeout(h.current),h.current=0,y.current=!1,b(!0)}),[b]),k=s.useCallback((()=>{window.clearTimeout(h.current),h.current=0,b(!1)}),[b]),S=s.useCallback((()=>{window.clearTimeout(h.current),h.current=window.setTimeout((()=>{y.current=!0,b(!0),h.current=0}),g)}),[g,b]);return s.useEffect((()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)}),[]),Bu.jsx(Ek,{...u,children:Bu.jsx(WM,{scope:t,contentId:p,open:v,stateAttribute:w,trigger:d,onTriggerChange:f,onTriggerEnter:s.useCallback((()=>{c.isOpenDelayed?S():x()}),[c.isOpenDelayed,S,x]),onTriggerLeave:s.useCallback((()=>{m?k():(window.clearTimeout(h.current),h.current=0)}),[k,m]),onOpen:x,onClose:k,disableHoverableContent:m,children:n})})};KM.displayName=UM;var XM="TooltipTrigger",YM=s.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=qM(XM,n),i=VM(XM,n),a=zM(n),l=Lu(t,s.useRef(null),o.onTriggerChange),c=s.useRef(!1),u=s.useRef(!1),d=s.useCallback((()=>c.current=!1),[]);return s.useEffect((()=>()=>document.removeEventListener("pointerup",d)),[d]),Bu.jsx(_k,{asChild:!0,...a,children:Bu.jsx(ed.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:Au(e.onPointerMove,(e=>{"touch"!==e.pointerType&&(u.current||i.isPointerInTransitRef.current||(o.onTriggerEnter(),u.current=!0))})),onPointerLeave:Au(e.onPointerLeave,(()=>{o.onTriggerLeave(),u.current=!1})),onPointerDown:Au(e.onPointerDown,(()=>{c.current=!0,document.addEventListener("pointerup",d,{once:!0})})),onFocus:Au(e.onFocus,(()=>{c.current||o.onOpen()})),onBlur:Au(e.onBlur,o.onClose),onClick:Au(e.onClick,o.onClose)})})}));YM.displayName=XM;var GM="TooltipPortal",[QM,ZM]=IM(GM,{forceMount:void 0}),JM=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=qM(GM,t);return Bu.jsx(QM,{scope:t,forceMount:n,children:Bu.jsx(kd,{present:n||i.open,children:Bu.jsx(xd,{asChild:!0,container:o,children:r})})})};JM.displayName=GM;var eT="TooltipContent",tT=s.forwardRef(((e,t)=>{const n=ZM(eT,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=qM(eT,e.__scopeTooltip);return Bu.jsx(kd,{present:r||a.open,children:a.disableHoverableContent?Bu.jsx(iT,{side:o,...i,ref:t}):Bu.jsx(nT,{side:o,...i,ref:t})})})),nT=s.forwardRef(((e,t)=>{const n=qM(eT,e.__scopeTooltip),r=VM(eT,e.__scopeTooltip),o=s.useRef(null),i=Lu(t,o),[a,l]=s.useState(null),{trigger:c,onClose:u}=n,d=o.current,{onPointerInTransitChange:f}=r,p=s.useCallback((()=>{l(null),f(!1)}),[f]),h=s.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),f(!0)}),[f]);return s.useEffect((()=>()=>p()),[p]),s.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,p]),s.useEffect((()=>{if(a){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,l=t[e].y,s=t[i].x,c=t[i].y;l>r!=c>r&&n<(s-a)*(r-l)/(c-l)+a&&(o=!o)}return o}(n,a);r?p():o&&(p(),u())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[c,d,a,u,p]),Bu.jsx(iT,{...e,ref:i})})),[rT,oT]=IM(UM,{isInside:!1}),iT=s.forwardRef(((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...l}=e,c=qM(eT,n),u=zM(n),{onClose:d}=c;return s.useEffect((()=>(document.addEventListener($M,d),()=>document.removeEventListener($M,d))),[d]),s.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]),Bu.jsx(ld,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:Bu.jsxs(Ck,{"data-state":c.stateAttribute,...u,...l,ref:t,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:[Bu.jsx(Zu,{children:r}),Bu.jsx(rT,{scope:n,isInside:!0,children:Bu.jsx(DM,{id:c.contentId,role:"tooltip",children:o||r})})]})})}));tT.displayName=eT;var aT="TooltipArrow",lT=s.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=zM(n);return oT(aT,n).isInside?null:Bu.jsx(Ok,{...o,...r,ref:t})}));lT.displayName=aT;var sT=HM,cT=KM,uT=YM,dT=JM,fT=tT,pT=lT,hT="Popover",[mT,gT]=Vu(hT,[sk]),yT=sk(),[vT,bT]=mT(hT),wT=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!1}=e,l=yT(t),c=s.useRef(null),[u,d]=s.useState(!1),[f=!1,p]=Yu({prop:r,defaultProp:o,onChange:i});return Bu.jsx(Ek,{...l,children:Bu.jsx(vT,{scope:t,contentId:Ku(),triggerRef:c,open:f,onOpenChange:p,onOpenToggle:s.useCallback((()=>p((e=>!e))),[p]),hasCustomAnchor:u,onCustomAnchorAdd:s.useCallback((()=>d(!0)),[]),onCustomAnchorRemove:s.useCallback((()=>d(!1)),[]),modal:a,children:n})})};wT.displayName=hT;var xT="PopoverAnchor";s.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=bT(xT,n),i=yT(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:l}=o;return s.useEffect((()=>(a(),()=>l())),[a,l]),Bu.jsx(_k,{...i,...r,ref:t})})).displayName=xT;var kT="PopoverTrigger",ST=s.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=bT(kT,n),i=yT(n),a=Lu(t,o.triggerRef),l=Bu.jsx(ed.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":DT(o.open),...r,ref:a,onClick:Au(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:Bu.jsx(_k,{asChild:!0,...i,children:l})}));ST.displayName=kT;var ET="PopoverPortal",[_T,CT]=mT(ET,{forceMount:void 0}),OT=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,i=bT(ET,t);return Bu.jsx(_T,{scope:t,forceMount:n,children:Bu.jsx(kd,{present:n||i.open,children:Bu.jsx(xd,{asChild:!0,container:o,children:r})})})};OT.displayName=ET;var NT="PopoverContent",PT=s.forwardRef(((e,t)=>{const n=CT(NT,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,i=bT(NT,e.__scopePopover);return Bu.jsx(kd,{present:r||i.open,children:i.modal?Bu.jsx(RT,{...o,ref:t}):Bu.jsx(MT,{...o,ref:t})})}));PT.displayName=NT;var RT=s.forwardRef(((e,t)=>{const n=bT(NT,e.__scopePopover),r=s.useRef(null),o=Lu(t,r),i=s.useRef(!1);return s.useEffect((()=>{const e=r.current;if(e)return kf(e)}),[]),Bu.jsx(mf,{as:Gu,allowPinchZoom:!0,children:Bu.jsx(TT,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Au(e.onCloseAutoFocus,(e=>{e.preventDefault(),i.current||n.triggerRef.current?.focus()})),onPointerDownOutside:Au(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;i.current=r}),{checkForDefaultPrevented:!1}),onFocusOutside:Au(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),MT=s.forwardRef(((e,t)=>{const n=bT(NT,e.__scopePopover),r=s.useRef(!1),o=s.useRef(!1);return Bu.jsx(TT,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const i=t.target,a=n.triggerRef.current?.contains(i);a&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})})),TT=s.forwardRef(((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:u,...d}=e,f=bT(NT,n),p=yT(n);return _d(),Bu.jsx(hd,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:Bu.jsx(ld,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onDismiss:()=>f.onOpenChange(!1),children:Bu.jsx(Ck,{"data-state":DT(f.open),role:"dialog",id:f.contentId,...p,...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)"}})})})})),AT="PopoverClose";s.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=bT(AT,n);return Bu.jsx(ed.button,{type:"button",...r,ref:t,onClick:Au(e.onClick,(()=>o.onOpenChange(!1)))})})).displayName=AT;function DT(e){return e?"open":"closed"}s.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=yT(n);return Bu.jsx(Ok,{...o,...r,ref:t})})).displayName="PopoverArrow";var IT,LT,zT,FT,jT,$T,BT,VT,HT=wT,UT=ST,WT=OT,qT=PT;function KT(){if(FT)return zT;FT=1;const e=LT?IT:(LT=1,IT={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"]}};zT=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 l,s;i===o?l=0:t===i?l=(n-r)/a:n===i?l=2+(r-t)/a:r===i&&(l=4+(t-n)/a),l=Math.min(60*l,360),l<0&&(l+=360);const c=(o+i)/2;return s=i===o?0:c<=.5?a/(i+o):a/(2-i-o),[l,100*s,100*c]},n.rgb.hsv=function(e){let t,n,r,o,i;const a=e[0]/255,l=e[1]/255,s=e[2]/255,c=Math.max(a,l,s),u=c-Math.min(a,l,s),d=function(e){return(c-e)/6/u+.5};return 0===u?(o=0,i=0):(i=u/c,t=d(a),n=d(l),r=d(s),a===c?o=r-n:l===c?o=1/3+t-r:s===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],s=(l=r,((a=n)[0]-l[0])**2+(a[1]-l[1])**2+(a[2]-l[2])**2);s<i&&(i=s,o=t)}var a,l;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 l=2*r-o,s=[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?l+6*(o-l)*i:2*i<1?o:3*i<2?l+(o-l)*(2/3-i)*6:l,s[e]=255*a;return s},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),l=255*r*(1-n*i),s=255*r*(1-n*(1-i));switch(r*=255,o){case 0:return[r,s,a];case 1:return[l,r,a];case 2:return[a,r,s];case 3:return[a,l,r];case 4:return[s,a,r];case 5:return[r,a,l]}},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 l=(2-n)*o;return i=n*o,i/=l<=1?l:2-l,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),l=1-r;i=6*t-a,1&a&&(i=1-i);const s=n+i*(l-n);let c,u,d;switch(a){default:case 6:case 0:c=l,u=s,d=n;break;case 1:c=s,u=l,d=n;break;case 2:c=n,u=l,d=s;break;case 3:c=n,u=s,d=l;break;case 4:c=s,u=n,d=l;break;case 5:c=l,u=n,d=s}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 l=30+(Math.round(i/255)<<2|Math.round(o/255)<<1|Math.round(r/255));return 2===a&&(l+=60),l},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 l,s;return l=a<1?i/(1-a):0,s=a<=0?0:o===t?(n-r)/a%6:o===n?2+(r-t)/a:4+(t-n)/a,s/=6,s%=1,[360*s,100*a,100*l]},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,l=1-a;let s=0;switch(Math.floor(i)){case 0:o[0]=1,o[1]=a,o[2]=0;break;case 1:o[0]=l,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]=l,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]=l}return s=(1-n)*r,[255*(n*o[0]+s),255*(n*o[1]+s),255*(n*o[2]+s)]},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]},zT}function XT(){if($T)return jT;$T=1;const e=KT();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 jT=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},jT}var YT=function(){if(VT)return BT;VT=1;const e=KT(),t=XT(),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)}))})),BT=n}(),GT=e({__proto__:null,default:t(YT)},[YT]);const QT=(e,t)=>{if(Array.isArray(t)||(t=[t]),void 0===t[0]||null===t[0])return QT("rgb",[0,0,0]);const n=GT[e];if(!n)throw new Error("Unsupported color type: "+e);n[e]=()=>t;const r=n.rgb(t);if(!Array.isArray(r))return QT("rgb",[0,0,0]);if(void 0===r[0]||null===r[0])return QT("rgb",[0,0,0]);const o=n.hsl(t);if(!Array.isArray(o))return QT("rgb",[0,0,0]);if(void 0===o[0]||null===o[0])return QT("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},ZT=({onChange:e,colorconverter:t,allow_null:n=!1})=>{if(null===t&&!n)throw new Error("Color converter is null");const[r,o]=s.useState(t),[i,a]=s.useState([0,0,0]),[l,c]=s.useState([0,0,0]),[u,d]=s.useState([0,0,0]),[f,p]=s.useState("000");s.useEffect((()=>{if(!r){if(!n)throw new Error("Color converter is null");return c([0,0,0]),a([0,0,0]),d([0,0,0]),void p("")}a(r.hsl()),c(r.rgb()),d(r.hsv()),p(r.hex())}),[r]);const h={backgroundColor:`hsl(${i[0]}, ${i[1]}%, ${i[2]}%)`,padding:"10px",margin:"10px 0"};return s.createElement("div",{style:{backgroundColor:"white"}},s.createElement("div",{style:h},"Color Preview"),s.createElement("div",{className:"colorspace"},s.createElement("div",{className:"colorspace_title"},"RGB"),s.createElement("div",null),s.createElement("label",null,"Red"),s.createElement("input",{type:"range",min:"0",max:"255",value:l[0],onChange:t=>{const n=[parseInt(t.target.value),l[1],l[2]],r=QT("rgb",n);o(r),e(r)},style:{background:"linear-gradient(to right, #000, #f00)"}}),s.createElement("label",null,"Green"),s.createElement("input",{type:"range",min:"0",max:"255",value:l[1],onChange:t=>{const n=[l[0],parseInt(t.target.value),l[2]],r=QT("rgb",n);o(r),e(r)},style:{background:"linear-gradient(to right, #000, #0f0)"}}),s.createElement("label",null,"Blue"),s.createElement("input",{type:"range",min:"0",max:"255",value:l[2],onChange:t=>{const n=[l[0],l[1],parseInt(t.target.value)],r=QT("rgb",n);o(r),e(r)},style:{background:"linear-gradient(to right, #000, #00f)"}})),s.createElement("div",{className:"colorspace"},s.createElement("div",{className:"colorspace_title"},"HSL"),s.createElement("div",null),s.createElement("label",null,"Hue"),s.createElement("input",{type:"range",min:"0",max:"360",value:i[0],onChange:t=>{const n=[parseInt(t.target.value),i[1],i[2]],r=QT("hsl",n);o(r),e(r)},style:{background:"linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00)"}}),s.createElement("label",null,"Saturation"),s.createElement("input",{type:"range",min:"0",max:"100",value:i[1],onChange:t=>{const n=[i[0],parseInt(t.target.value),i[2]],r=QT("hsl",n);o(r),e(r)},style:{background:`linear-gradient(to right, #fff, hsl(${i[0]}, 100%, 50%))`}}),s.createElement("label",null,"Lightness"),s.createElement("input",{type:"range",min:"0",max:"100",value:i[2],onChange:t=>{const n=[i[0],i[1],parseInt(t.target.value)],r=QT("hsl",n);o(r),e(r)},style:{background:`linear-gradient(to right, #000, hsl(${i[0]}, 100%, 50%), #fff)`}})),s.createElement("div",{className:"colorspace"},s.createElement("div",{className:"colorspace_title"},"HSV"),s.createElement("div",null),s.createElement("label",null,"Hue"),s.createElement("input",{type:"range",min:"0",max:"360",value:u[0],onChange:t=>{const n=[parseInt(t.target.value),u[1],u[2]],r=QT("hsv",n);o(r),e(r)},style:{background:"linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00)"}}),s.createElement("label",null,"Saturation"),s.createElement("input",{type:"range",min:"0",max:"100",value:u[1],onChange:t=>{const n=[u[0],parseInt(t.target.value),u[2]],r=QT("hsv",n);o(r),e(r)},style:{background:`linear-gradient(to right, #fff, hsl(${i[0]}, 100%, 50%))`}}),s.createElement("label",null,"Value"),s.createElement("input",{type:"range",min:"0",max:"100",value:u[2],onChange:t=>{const n=[u[0],u[1],parseInt(t.target.value)],r=QT("hsv",n);o(r),e(r)},style:{background:`linear-gradient(to right, #000, hsl(${i[0]}, 100%, 50%))`}})),s.createElement("div",{className:"colorspace"},s.createElement("div",{className:"colorspace_title"},"HEX"),s.createElement("div",null),s.createElement("input",{type:"text",value:f,onChange:t=>{const n=""===t.target.value?null:QT("hex",[t.target.value]);o(n),e(n)}})))},JT=({inicolordata:e,inicolorspace:t="hex",allow_null:n=!1,onChange:r})=>{void 0===e&&(e=[0,0,0],t="rgb"),Array.isArray(e)||(e=[e]);let o=QT(t,e);void 0===o.rgb()&&(o=QT("rgb",[0,0,0]));const[i,a]=s.useState(o),l={background:"#"+i.hex(),borderRadius:"0.3rem",width:"2rem",height:"1rem"};return s.createElement(HT,null,s.createElement(UT,{asChild:!0},s.createElement("button",{style:l})),s.createElement(WT,null,s.createElement(qT,{side:"left"},s.createElement(ZT,{onChange:e=>{if(null===e&&!n)throw new Error("Color is null");null!==e&&a(e),r&&r(e)},colorconverter:i,allow_null:n}))))};function eA(e,[t,n]){return Math.min(n,Math.max(t,e))}var tA=["PageUp","PageDown"],nA=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],rA={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},oA="Slider",[iA,aA,lA]=Cw(oA),[sA,cA]=Vu(oA,[lA]),[uA,dA]=sA(oA),fA=s.forwardRef(((e,t)=>{const{name:n,min:r=0,max:o=100,step:i=1,orientation:a="horizontal",disabled:l=!1,minStepsBetweenThumbs:c=0,defaultValue:u=[r],value:d,onValueChange:f=()=>{},onValueCommit:p=()=>{},inverted:h=!1,form:m,...g}=e,y=s.useRef(new Set),v=s.useRef(0),b="horizontal"===a?mA:gA,[w=[],x]=Yu({prop:d,defaultProp:u,onChange:e=>{const t=[...y.current];t[v.current]?.focus(),f(e)}}),k=s.useRef(w);function S(e,t,{commit:n}={commit:!1}){const a=function(e){return(String(e).split(".")[1]||"").length}(i),l=function(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}(Math.round((e-r)/i)*i+r,a),s=eA(l,[r,o]);x(((e=[])=>{const r=function(e=[],t,n){const r=[...e];return r[n]=t,r.sort(((e,t)=>e-t))}(e,s,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*i)){v.current=r.indexOf(s);const t=String(r)!==String(e);return t&&n&&p(r),t?r:e}return e}))}return Bu.jsx(uA,{scope:e.__scopeSlider,name:n,disabled:l,min:r,max:o,valueIndexToChangeRef:v,thumbs:y.current,values:w,orientation:a,form:m,children:Bu.jsx(iA.Provider,{scope:e.__scopeSlider,children:Bu.jsx(iA.Slot,{scope:e.__scopeSlider,children:Bu.jsx(b,{"aria-disabled":l,"data-disabled":l?"":void 0,...g,ref:t,onPointerDown:Au(g.onPointerDown,(()=>{l||(k.current=w)})),min:r,max:o,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);S(e,t)},onSlideMove:l?void 0:function(e){S(e,v.current)},onSlideEnd:l?void 0:function(){const e=k.current[v.current];w[v.current]!==e&&p(w)},onHomeKeyDown:()=>!l&&S(r,0,{commit:!0}),onEndKeyDown:()=>!l&&S(o,w.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!l){const n=tA.includes(e.key)||e.shiftKey&&nA.includes(e.key)?10:1,r=v.current;S(w[r]+i*n*t,r,{commit:!0})}}})})})})}));fA.displayName=oA;var[pA,hA]=sA(oA,{startEdge:"left",endEdge:"right",size:"width",direction:1}),mA=s.forwardRef(((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:a,onSlideMove:l,onSlideEnd:c,onStepKeyDown:u,...d}=e,[f,p]=s.useState(null),h=Lu(t,(e=>p(e))),m=s.useRef(void 0),g=Nw(o),y="ltr"===g,v=y&&!i||!y&&i;function b(e){const t=m.current||f.getBoundingClientRect(),o=OA([0,t.width],v?[n,r]:[r,n]);return m.current=t,o(e-t.left)}return Bu.jsx(pA,{scope:e.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:Bu.jsx(yA,{dir:g,"data-orientation":"horizontal",...d,ref:h,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{const t=b(e.clientX);a?.(t)},onSlideMove:e=>{const t=b(e.clientX);l?.(t)},onSlideEnd:()=>{m.current=void 0,c?.()},onStepKeyDown:e=>{const t=rA[v?"from-left":"from-right"].includes(e.key);u?.({event:e,direction:t?-1:1})}})})})),gA=s.forwardRef(((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:l,onStepKeyDown:c,...u}=e,d=s.useRef(null),f=Lu(t,d),p=s.useRef(void 0),h=!o;function m(e){const t=p.current||d.current.getBoundingClientRect(),o=OA([0,t.height],h?[r,n]:[n,r]);return p.current=t,o(e-t.top)}return Bu.jsx(pA,{scope:e.__scopeSlider,startEdge:h?"bottom":"top",endEdge:h?"top":"bottom",size:"height",direction:h?1:-1,children:Bu.jsx(yA,{"data-orientation":"vertical",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{const t=m(e.clientY);i?.(t)},onSlideMove:e=>{const t=m(e.clientY);a?.(t)},onSlideEnd:()=>{p.current=void 0,l?.()},onStepKeyDown:e=>{const t=rA[h?"from-bottom":"from-top"].includes(e.key);c?.({event:e,direction:t?-1:1})}})})})),yA=s.forwardRef(((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:l,onStepKeyDown:s,...c}=e,u=dA(oA,n);return Bu.jsx(ed.span,{...c,ref:t,onKeyDown:Au(e.onKeyDown,(e=>{"Home"===e.key?(a(e),e.preventDefault()):"End"===e.key?(l(e),e.preventDefault()):tA.concat(nA).includes(e.key)&&(s(e),e.preventDefault())})),onPointerDown:Au(e.onPointerDown,(e=>{const t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():r(e)})),onPointerMove:Au(e.onPointerMove,(e=>{e.target.hasPointerCapture(e.pointerId)&&o(e)})),onPointerUp:Au(e.onPointerUp,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),i(e))}))})})),vA="SliderTrack",bA=s.forwardRef(((e,t)=>{const{__scopeSlider:n,...r}=e,o=dA(vA,n);return Bu.jsx(ed.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})}));bA.displayName=vA;var wA="SliderRange",xA=s.forwardRef(((e,t)=>{const{__scopeSlider:n,...r}=e,o=dA(wA,n),i=hA(wA,n),a=Lu(t,s.useRef(null)),l=o.values.length,c=o.values.map((e=>CA(e,o.min,o.max))),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return Bu.jsx(ed.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:a,style:{...e.style,[i.startEdge]:u+"%",[i.endEdge]:d+"%"}})}));xA.displayName=wA;var kA="SliderThumb",SA=s.forwardRef(((e,t)=>{const n=aA(e.__scopeSlider),[r,o]=s.useState(null),i=Lu(t,(e=>o(e))),a=s.useMemo((()=>r?n().findIndex((e=>e.ref.current===r)):-1),[n,r]);return Bu.jsx(EA,{...e,ref:i,index:a})})),EA=s.forwardRef(((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,a=dA(kA,n),l=hA(kA,n),[c,u]=s.useState(null),d=Lu(t,(e=>u(e))),f=!c||(a.form||!!c.closest("form")),p=ik(c),h=a.values[r],m=void 0===h?0:CA(h,a.min,a.max),g=function(e,t){return t>2?`Value ${e+1} of ${t}`:2===t?["Minimum","Maximum"][e]:void 0}(r,a.values.length),y=p?.[l.size],v=y?function(e,t,n){const r=e/2,o=OA([0,50],[0,r]);return(r-o(t)*n)*n}(y,m,l.direction):0;return s.useEffect((()=>{if(c)return a.thumbs.add(c),()=>{a.thumbs.delete(c)}}),[c,a.thumbs]),Bu.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[l.startEdge]:`calc(${m}% + ${v}px)`},children:[Bu.jsx(iA.ItemSlot,{scope:e.__scopeSlider,children:Bu.jsx(ed.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":a.min,"aria-valuenow":h,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...i,ref:d,style:void 0===h?{display:"none"}:e.style,onFocus:Au(e.onFocus,(()=>{a.valueIndexToChangeRef.current=r}))})}),f&&Bu.jsx(_A,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:h},r)]})}));SA.displayName=kA;var _A=e=>{const{value:t,...n}=e,r=s.useRef(null),o=function(e){const t=s.useRef({value:e,previous:e});return s.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}(t);return s.useEffect((()=>{const e=r.current,n=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(n,"value").set;if(o!==t&&i){const n=new Event("input",{bubbles:!0});i.call(e,t),e.dispatchEvent(n)}}),[o,t]),Bu.jsx("input",{style:{display:"none"},...n,ref:r,defaultValue:t})};function CA(e,t,n){return eA(100/(n-t)*(e-t),[0,100])}function OA(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 NA=fA,PA=bA,RA=xA,MA=SA;function TA(e){return TA="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},TA(e)}function AA(e){var t=function(e,t){if("object"!=TA(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=TA(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==TA(t)?t:t+""}function DA(e,t,n){return(t=AA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IA(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 LA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?IA(Object(n),!0).forEach((function(t){DA(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IA(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function zA(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 FA(e,t){if(e){if("string"==typeof e)return zA(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)?zA(e,t):void 0}}function jA(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,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||FA(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 $A(e,t){if(null==e)return{};var n,r,o=Wb(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 BA=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function VA(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,AA(r.key),r)}}function HA(e){return HA=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},HA(e)}function UA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(UA=function(){return!!e})()}function WA(e){var t=UA();return function(){var n,r=HA(e);if(t){var o=HA(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==TA(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Yb(e)}(this,n)}}function qA(e){return function(e){if(Array.isArray(e))return zA(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||FA(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 KA=s.useLayoutEffect,XA=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],YA=function(){};function GA(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function QA(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(GA(e,a)));return i.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var ZA=function(e){return function(e){return Array.isArray(e)}(e)?e.filter(Boolean):"object"===TA(e)&&null!==e?[e]:[]},JA=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,LA({},$A(e,XA))},eD=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 tD(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function nD(e){return tD(e)?window.pageYOffset:e.scrollTop}function rD(e,t){tD(e)?window.scrollTo(0,t):e.scrollTop=t}function oD(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:YA,o=nD(e),i=t-o,a=0;!function t(){var l,s=i*((l=(l=a+=10)/n-1)*l*l+1)+o;rD(e,s),a<n?window.requestAnimationFrame(t):r(e)}()}function iD(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?rD(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&rD(e,Math.max(t.offsetTop-o,0))}function aD(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var lD=!1,sD={get passive(){return lD=!0}},cD="undefined"!=typeof window?window:{};cD.addEventListener&&cD.removeEventListener&&(cD.addEventListener("p",YA,sD),cD.removeEventListener("p",YA,!1));var uD=lD;function dD(e){return null!=e}function fD(e,t,n){return e?t:n}var pD=["children","innerProps"],hD=["children","innerProps"];function mD(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,a=e.isFixedPosition,l=e.controlHeight,s=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=s.getBoundingClientRect().height,f=n.getBoundingClientRect(),p=f.bottom,h=f.height,m=f.top,g=n.offsetParent.getBoundingClientRect().top,y=a?window.innerHeight:tD(u=s)?window.innerHeight:u.clientHeight,v=nD(s),b=parseInt(getComputedStyle(n).marginBottom,10),w=parseInt(getComputedStyle(n).marginTop,10),x=g-w,k=y-m,S=x+v,E=d-v-m,_=p-y+v+b,C=v+m-w,O=160;switch(o){case"auto":case"bottom":if(k>=h)return{placement:"bottom",maxHeight:t};if(E>=h&&!a)return i&&oD(s,_,O),{placement:"bottom",maxHeight:t};if(!a&&E>=r||a&&k>=r)return i&&oD(s,_,O),{placement:"bottom",maxHeight:a?k-b:E-b};if("auto"===o||a){var N=t,P=a?x:S;return P>=r&&(N=Math.min(P-b-l,t)),{placement:"top",maxHeight:N}}if("bottom"===o)return i&&rD(s,_),{placement:"bottom",maxHeight:t};break;case"top":if(x>=h)return{placement:"top",maxHeight:t};if(S>=h&&!a)return i&&oD(s,C,O),{placement:"top",maxHeight:t};if(!a&&S>=r||a&&x>=r){var R=t;return(!a&&S>=r||a&&x>=r)&&(R=a?x-w:S-w),i&&oD(s,C,O),{placement:"top",maxHeight:R}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return c}var gD,yD,vD,bD=function(e){return"auto"===e?"bottom":e},wD=s.createContext(null),xD=function(e){var t=e.children,n=e.minMenuHeight,r=e.maxMenuHeight,o=e.menuPlacement,i=e.menuPosition,a=e.menuShouldScrollIntoView,l=e.theme,c=(s.useContext(wD)||{}).setPortalPlacement,u=s.useRef(null),d=jA(s.useState(r),2),f=d[0],p=d[1],h=jA(s.useState(null),2),m=h[0],g=h[1],y=l.spacing.controlHeight;return KA((function(){var e=u.current;if(e){var t="fixed"===i,l=mD({maxHeight:r,menuEl:e,minHeight:n,placement:o,shouldScroll:a&&!t,isFixedPosition:t,controlHeight:y});p(l.maxHeight),g(l.placement),null==c||c(l.placement)}}),[r,o,i,a,n,c,y]),t({ref:u,placerProps:LA(LA({},e),{},{placement:m||bD(o),maxHeight:f})})},kD=function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return Ag("div",nm({},eD(e,"menu",{menu:!0}),{ref:n},r),t)},SD=function(e,t){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return LA({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},ED=SD,_D=SD,CD=["size"],OD=["innerProps","isRtl","size"],ND={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},PD=function(e){var t=e.size,n=$A(e,CD);return Ag("svg",nm({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:ND},n))},RD=function(e){return Ag(PD,nm({size:20},e),Ag("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"}))},MD=function(e){return Ag(PD,nm({size:20},e),Ag("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"}))},TD=function(e,t){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return LA({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*o,":hover":{color:n?i.neutral80:i.neutral40}})},AD=TD,DD=TD,ID=Ig(gD||(yD=["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"],vD||(vD=yD.slice(0)),gD=Object.freeze(Object.defineProperties(yD,{raw:{value:Object.freeze(vD)}})))),LD=function(e){var t=e.delay,n=e.offset;return Ag("span",{css:Dg({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"},"","")})},zD=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return Ag("div",nm({ref:o},eD(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":a}),i,{"aria-disabled":n||void 0}),t)},FD=["data"],jD=function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.getClassNames,i=e.Heading,a=e.headingProps,l=e.innerProps,s=e.label,c=e.theme,u=e.selectProps;return Ag("div",nm({},eD(e,"group",{group:!0}),l),Ag(i,nm({},a,{selectProps:u,theme:c,getStyles:r,getClassNames:o,cx:n}),s),Ag("div",null,t))},$D=["innerRef","isDisabled","isHidden","inputClassName"],BD={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},VD={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":LA({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},BD)},HD=function(e){return LA({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},BD)},UD=function(e){var t=e.cx,n=e.value,r=JA(e),o=r.innerRef,i=r.isDisabled,a=r.isHidden,l=r.inputClassName,s=$A(r,$D);return Ag("div",nm({},eD(e,"input",{"input-container":!0}),{"data-value":n||""}),Ag("input",nm({className:t({input:!0},l),ref:o,style:HD(a),disabled:i},s)))},WD=function(e){var t=e.children,n=e.innerProps;return Ag("div",n,t)};var qD=function(e){var t=e.children,n=e.components,r=e.data,o=e.innerProps,i=e.isDisabled,a=e.removeProps,l=e.selectProps,s=n.Container,c=n.Label,u=n.Remove;return Ag(s,{data:r,innerProps:LA(LA({},eD(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),o),selectProps:l},Ag(c,{data:r,innerProps:LA({},eD(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},t),Ag(u,{data:r,innerProps:LA(LA({},eD(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:l}))},KD=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.innerRef,a=e.innerProps;return Ag("div",nm({},eD(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":o}),{ref:i,"aria-disabled":n},a),t)},XD=function(e){var t=e.children,n=e.innerProps;return Ag("div",nm({},eD(e,"placeholder",{placeholder:!0}),n),t)},YD=function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return Ag("div",nm({},eD(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},GD={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return Ag("div",nm({},eD(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||Ag(RD,null))},Control:zD,DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return Ag("div",nm({},eD(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||Ag(MD,null))},DownChevron:MD,CrossIcon:RD,Group:jD,GroupHeading:function(e){var t=JA(e);t.data;var n=$A(t,FD);return Ag("div",nm({},eD(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return Ag("div",nm({},eD(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return Ag("span",nm({},t,eD(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:UD,LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,o=void 0===r?4:r,i=$A(e,OD);return Ag("div",nm({},eD(LA(LA({},i),{},{innerProps:t,isRtl:n,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),Ag(LD,{delay:0,offset:n}),Ag(LD,{delay:160,offset:!0}),Ag(LD,{delay:320,offset:!n}))},Menu:kD,MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,o=e.isMulti;return Ag("div",nm({},eD(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,a=e.menuPosition,l=s.useRef(null),c=s.useRef(null),u=jA(s.useState(bD(i)),2),d=u[0],f=u[1],p=s.useMemo((function(){return{setPortalPlacement:f}}),[]),h=jA(s.useState(null),2),m=h[0],g=h[1],y=s.useCallback((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"===a?0:window.pageYOffset,n=e[d]+t;n===(null==m?void 0:m.offset)&&e.left===(null==m?void 0:m.rect.left)&&e.width===(null==m?void 0:m.rect.width)||g({offset:n,rect:e})}}),[r,a,d,null==m?void 0:m.offset,null==m?void 0:m.rect.left,null==m?void 0:m.rect.width]);KA((function(){y()}),[y]);var v=s.useCallback((function(){"function"==typeof c.current&&(c.current(),c.current=null),r&&l.current&&(c.current=Ix(r,l.current,y,{elementResize:"ResizeObserver"in window}))}),[r,y]);KA((function(){v()}),[v]);var b=s.useCallback((function(e){l.current=e,v()}),[v]);if(!t&&"fixed"!==a||!m)return null;var w=Ag("div",nm({ref:b},eD(LA(LA({},e),{},{offset:m.offset,position:a,rect:m.rect}),"menuPortal",{"menu-portal":!0}),o),n);return Ag(wD.Provider,{value:p},t?Lr.createPortal(w,t):w)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,o=$A(e,hD);return Ag("div",nm({},eD(LA(LA({},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=$A(e,pD);return Ag("div",nm({},eD(LA(LA({},o),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},MultiValue:qD,MultiValueContainer:WD,MultiValueLabel:WD,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return Ag("div",nm({role:"button"},n),t||Ag(RD,{size:14}))},Option:KD,Placeholder:XD,SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,o=e.isRtl;return Ag("div",nm({},eD(e,"container",{"--is-disabled":r,"--is-rtl":o}),n),t)},SingleValue:YD,ValueContainer:function(e){var t=e.children,n=e.innerProps,r=e.isMulti,o=e.hasValue;return Ag("div",nm({},eD(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),n),t)}},QD=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function ZD(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||QD(r)&&QD(o)))return!1;var r,o;return!0}for(var JD={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"},eI=function(e){return Ag("span",nm({css:JD},e))},tI={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,l=e.isDisabled,s=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=l?" disabled":"",f="".concat(s?" selected":"").concat(d);return"".concat(i).concat(f,", ").concat(u(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},nI=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,o=e.focusableOptions,i=e.isFocused,a=e.selectValue,l=e.selectProps,c=e.id,u=e.isAppleDevice,d=l.ariaLiveMessages,f=l.getOptionLabel,p=l.inputValue,h=l.isMulti,m=l.isOptionDisabled,g=l.isSearchable,y=l.menuIsOpen,v=l.options,b=l.screenReaderStatus,w=l.tabSelectsValue,x=l.isLoading,k=l["aria-label"],S=l["aria-live"],E=s.useMemo((function(){return LA(LA({},tI),d||{})}),[d]),_=s.useMemo((function(){var e,n="";if(t&&E.onChange){var r=t.option,o=t.options,i=t.removedValue,l=t.removedValues,s=t.value,c=i||r||(e=s,Array.isArray(e)?null:e),u=c?f(c):"",d=o||l||void 0,p=d?d.map(f):[],h=LA({isDisabled:c&&m(c,a),label:u,labels:p},t);n=E.onChange(h)}return n}),[t,E,m,a,f]),C=s.useMemo((function(){var e="",t=n||r,i=!!(n&&a&&a.includes(n));if(t&&E.onFocus){var l={focused:t,label:f(t),isDisabled:m(t,a),isSelected:i,options:o,context:t===n?"menu":"value",selectValue:a,isAppleDevice:u};e=E.onFocus(l)}return e}),[n,r,f,m,E,o,a,u]),O=s.useMemo((function(){var e="";if(y&&v.length&&!x&&E.onFilter){var t=b({count:o.length});e=E.onFilter({inputValue:p,resultsMessage:t})}return e}),[o,p,y,E,v,b,x]),N="initial-input-focus"===(null==t?void 0:t.action),P=s.useMemo((function(){var e="";if(E.guidance){var t=r?"value":y?"menu":"input";e=E.guidance({"aria-label":k,context:t,isDisabled:n&&m(n,a),isMulti:h,isSearchable:g,tabSelectsValue:w,isInitialFocus:N})}return e}),[k,n,r,h,m,g,y,E,a,w,N]),R=Ag(s.Fragment,null,Ag("span",{id:"aria-selection"},_),Ag("span",{id:"aria-focused"},C),Ag("span",{id:"aria-results"},O),Ag("span",{id:"aria-guidance"},P));return Ag(s.Fragment,null,Ag(eI,{id:c},N&&R),Ag(eI,{"aria-live":S,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!N&&R))},rI=[{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źẑżžẓẕƶȥɀⱬꝣ"}],oI=new RegExp("["+rI.map((function(e){return e.letters})).join("")+"]","g"),iI={},aI=0;aI<rI.length;aI++)for(var lI=rI[aI],sI=0;sI<lI.letters.length;sI++)iI[lI.letters[sI]]=lI.base;var cI=function(e){return e.replace(oI,(function(e){return iI[e]}))},uI=function(e,t){void 0===t&&(t=ZD);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}(cI),dI=function(e){return e.replace(/^\s+|\s+$/g,"")},fI=function(e){return"".concat(e.label," ").concat(e.value)},pI=["innerRef"];function hI(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=jA(e,1)[0];return!n.includes(t)}));return o.reduce((function(e,t){var n=jA(t,2),r=n[0],o=n[1];return e[r]=o,e}),{})}($A(e,pI),"onExited","in","enter","exit","appear");return Ag("input",nm({ref:t},n,{css:Dg({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)"},"","")}))}var mI=["boxSizing","height","overflow","paddingRight","position"],gI={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function yI(e){e.cancelable&&e.preventDefault()}function vI(e){e.stopPropagation()}function bI(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function wI(){return"ontouchstart"in window||navigator.maxTouchPoints}var xI=!("undefined"==typeof window||!window.document||!window.document.createElement),kI=0,SI={capture:!1,passive:!1};var EI=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},_I={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function CI(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=s.useRef(!1),l=s.useRef(!1),c=s.useRef(0),u=s.useRef(null),d=s.useCallback((function(e,t){if(null!==u.current){var s=u.current,c=s.scrollTop,d=s.scrollHeight,f=s.clientHeight,p=u.current,h=t>0,m=d-f-c,g=!1;m>t&&a.current&&(r&&r(e),a.current=!1),h&&l.current&&(i&&i(e),l.current=!1),h&&t>m?(n&&!a.current&&n(e),p.scrollTop=d,g=!0,a.current=!0):!h&&-t>c&&(o&&!l.current&&o(e),p.scrollTop=0,g=!0,l.current=!0),g&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}}),[n,r,o,i]),f=s.useCallback((function(e){d(e,e.deltaY)}),[d]),p=s.useCallback((function(e){c.current=e.changedTouches[0].clientY}),[]),h=s.useCallback((function(e){var t=c.current-e.changedTouches[0].clientY;d(e,t)}),[d]),m=s.useCallback((function(e){if(e){var t=!!uD&&{passive:!1};e.addEventListener("wheel",f,t),e.addEventListener("touchstart",p,t),e.addEventListener("touchmove",h,t)}}),[h,p,f]),g=s.useCallback((function(e){e&&(e.removeEventListener("wheel",f,!1),e.removeEventListener("touchstart",p,!1),e.removeEventListener("touchmove",h,!1))}),[h,p,f]);return s.useEffect((function(){if(t){var e=u.current;return m(e),function(){g(e)}}}),[t,m,g]),function(e){u.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=s.useRef({}),i=s.useRef(null),a=s.useCallback((function(e){if(xI){var t=document.body,n=t&&t.style;if(r&&mI.forEach((function(e){var t=n&&n[e];o.current[e]=t})),r&&kI<1){var i=parseInt(o.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,l=window.innerWidth-a+i||0;Object.keys(gI).forEach((function(e){var t=gI[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(l,"px"))}t&&wI()&&(t.addEventListener("touchmove",yI,SI),e&&(e.addEventListener("touchstart",bI,SI),e.addEventListener("touchmove",vI,SI))),kI+=1}}),[r]),l=s.useCallback((function(e){if(xI){var t=document.body,n=t&&t.style;kI=Math.max(kI-1,0),r&&kI<1&&mI.forEach((function(e){var t=o.current[e];n&&(n[e]=t)})),t&&wI()&&(t.removeEventListener("touchmove",yI,SI),e&&(e.removeEventListener("touchstart",bI,SI),e.removeEventListener("touchmove",vI,SI)))}}),[r]);return s.useEffect((function(){if(t){var e=i.current;return a(e),function(){l(e)}}}),[t,a,l]),function(e){i.current=e}}({isEnabled:n});return Ag(s.Fragment,null,n&&Ag("div",{onClick:EI,css:_I}),t((function(e){o(e),i(e)})))}var OI={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},NI=function(e){var t=e.name,n=e.onFocus;return Ag("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:OI,value:"",onChange:function(){}})};function PI(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 RI(){return PI(/^Mac/i)}function MI(){return PI(/^iPhone/i)||PI(/^iPad/i)||RI()&&navigator.maxTouchPoints>1}var TI,AI={clearIndicator:DD,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 LA({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:AD,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 LA({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 LA({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 LA(LA({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},VD),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 LA({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:_D,menu:function(e,t){var n,r=e.placement,o=e.theme,i=o.borderRadius,a=o.spacing,l=o.colors;return LA((DA(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),DA(n,"position","absolute"),DA(n,"width","100%"),DA(n,"zIndex",1),n),t?{}:{backgroundColor:l.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 LA({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 LA({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 LA({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 LA({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:ED,option:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.theme,a=i.spacing,l=i.colors;return LA({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:o?l.primary:r?l.primary25:"transparent",color:n?l.neutral20:o?l.neutral0:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),":active":{backgroundColor:n?void 0:o?l.primary:l.primary50}})},placeholder:function(e,t){var n=e.theme,r=n.spacing,o=n.colors;return LA({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 LA({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 LA({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")})}},DI={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}},II={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:aD(),captureMenuScroll:!aD(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=LA({ignoreCase:!0,ignoreAccents:!0,stringify:fI,trim:!0,matchFrom:"any"},TI),r=n.ignoreCase,o=n.ignoreAccents,i=n.stringify,a=n.trim,l=n.matchFrom,s=a?dI(t):t,c=a?dI(i(e)):i(e);return r&&(s=s.toLowerCase(),c=c.toLowerCase()),o&&(s=uI(s),c=cI(c)),"start"===l?c.substr(0,s.length)===s:c.indexOf(s)>-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 LI(e,t,n,r){return{type:"option",data:t,isDisabled:UI(e,t,n),isSelected:WI(e,t,n),label:VI(e,t),value:HI(e,t),index:r}}function zI(e,t){return e.options.map((function(n,r){if("options"in n){var o=n.options.map((function(n,r){return LI(e,n,t,r)})).filter((function(t){return $I(e,t)}));return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=LI(e,n,t,r);return $I(e,i)?i:void 0})).filter(dD)}function FI(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,qA(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function jI(e,t){return e.reduce((function(e,n){return"group"===n.type?e.push.apply(e,qA(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 $I(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,i=t.isSelected,a=t.label,l=t.value;return(!KI(e)||!i)&&qI(e,{label:a,value:l,data:o},r)}var BI=function(e,t){var n;return(null===(n=e.find((function(e){return e.data===t})))||void 0===n?void 0:n.id)||null},VI=function(e,t){return e.getOptionLabel(t)},HI=function(e,t){return e.getOptionValue(t)};function UI(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function WI(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=HI(e,t);return n.some((function(t){return HI(e,t)===r}))}function qI(e,t,n){return!e.filterOption||e.filterOption(t,n)}var KI=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},XI=1,YI=function(e){!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&&qb(e,t)}(n,e);var t=WA(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=RI()||MI(),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,l=o.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:l}),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,l=o&&r.isOptionSelected(e,a),s=r.isOptionDisabled(e,a);if(l){var c=r.getOptionValue(e);r.setValue(a.filter((function(e){return r.getOptionValue(e)!==c})),"deselect-option",e)}else{if(s)return void r.ariaOnChange(e,{action:"select-option",option:e,name:i});o?r.setValue([].concat(qA(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=fD(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(fD(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=fD(e,o,o[0]||null);n&&r.onChange(i,{action:"pop-value",removedValue:n})},r.getFocusedOptionId=function(e){return BI(r.state.focusableOptionsWithIds,e)},r.getFocusableOptionsWithIds=function(){return jI(zI(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 QA.apply(void 0,[r.props.classNamePrefix].concat(t))},r.getOptionLabel=function(e){return VI(r.props,e)},r.getOptionValue=function(e){return HI(r.props,e)},r.getStyles=function(e,t){var n=r.props.unstyled,o=AI[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,LA(LA({},GD),e.components);var e},r.buildCategorizedOptions=function(){return zI(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return FI(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(e,t){r.setState({ariaSelection:LA({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&&tD(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 KI(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,l=t.isClearable,s=t.isDisabled,c=t.menuIsOpen,u=t.onKeyDown,d=t.tabSelectsValue,f=t.openMenuOnFocus,p=r.state,h=p.focusedOption,m=p.focusedValue,g=p.selectValue;if(!(s||"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():l&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!c||!d||!h||f&&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()):l&&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||++XI),r.state.selectValue=ZA(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=BI(o,i[a])}return r}return function(e,t,n){t&&VA(e.prototype,t),n&&VA(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&&iD(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&&(iD(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 l=i.indexOf(r[0]);l>-1&&(a=l)}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(DI):LA(LA({},DI),this.props.theme):DI}},{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,l=this.props,s=l.isMulti,c=l.isRtl,u=l.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:s,isRtl:c,options:u,selectOption:i,selectProps:l,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 UI(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return WI(this.props,e,t)}},{key:"filterOption",value:function(e,t){return qI(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 e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,i=e.tabIndex,a=e.form,l=e.menuIsOpen,c=e.required,u=this.getComponents().Input,d=this.state,f=d.inputIsHidden,p=d.ariaSelection,h=this.commonProps,m=r||this.getElementId("input"),g=LA(LA(LA({"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")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==p?void 0:p.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?s.createElement(u,nm({},h,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:m,innerRef:this.getInputRef,isDisabled:t,isHidden:f,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:i,form:a,type:"text",value:o},g)):s.createElement(hI,nm({id:m,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:YA,onFocus:this.onInputFocus,disabled:t,tabIndex:i,inputMode:"none",form:a,value:""},g))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,i=t.MultiValueRemove,a=t.SingleValue,l=t.Placeholder,c=this.commonProps,u=this.props,d=u.controlShouldRenderValue,f=u.isDisabled,p=u.isMulti,h=u.inputValue,m=u.placeholder,g=this.state,y=g.selectValue,v=g.focusedValue,b=g.isFocused;if(!this.hasValue()||!d)return h?null:s.createElement(l,nm({},c,{key:"placeholder",isDisabled:f,isFocused:b,innerProps:{id:this.getElementId("placeholder")}}),m);if(p)return y.map((function(t,a){var l=t===v,u="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return s.createElement(n,nm({},c,{components:{Container:r,Label:o,Remove:i},isFocused:l,isDisabled:f,key:u,index:a,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))}));if(h)return null;var w=y[0];return s.createElement(a,nm({},c,{data:w,isDisabled:f}),this.formatOptionLabel(w,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return s.createElement(e,nm({},t,{innerProps:a,isFocused:i}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;if(!e||!o)return null;return s.createElement(e,nm({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:i}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,i=this.state.isFocused;return s.createElement(n,nm({},r,{isDisabled:o,isFocused:i}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return s.createElement(e,nm({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,r=t.GroupHeading,o=t.Menu,i=t.MenuList,a=t.MenuPortal,l=t.LoadingMessage,c=t.NoOptionsMessage,u=t.Option,d=this.commonProps,f=this.state.focusedOption,p=this.props,h=p.captureMenuScroll,m=p.inputValue,g=p.isLoading,y=p.loadingMessage,v=p.minMenuHeight,b=p.maxMenuHeight,w=p.menuIsOpen,x=p.menuPlacement,k=p.menuPosition,S=p.menuPortalTarget,E=p.menuShouldBlockScroll,_=p.menuShouldScrollIntoView,C=p.noOptionsMessage,O=p.onMenuScrollToTop,N=p.onMenuScrollToBottom;if(!w)return null;var P,R=function(t,n){var r=t.type,o=t.data,i=t.isDisabled,a=t.isSelected,l=t.label,c=t.value,p=f===o,h=i?void 0:function(){return e.onOptionHover(o)},m=i?void 0:function(){return e.selectOption(o)},g="".concat(e.getElementId("option"),"-").concat(n),y={id:g,onClick:m,onMouseMove:h,onMouseOver:h,tabIndex:-1,role:"option","aria-selected":e.isAppleDevice?void 0:a};return s.createElement(u,nm({},d,{innerProps:y,data:o,isDisabled:i,isSelected:a,key:g,label:l,type:r,value:c,isFocused:p,innerRef:p?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())P=this.getCategorizedOptions().map((function(t){if("group"===t.type){var o=t.data,i=t.options,a=t.index,l="".concat(e.getElementId("group"),"-").concat(a),c="".concat(l,"-heading");return s.createElement(n,nm({},d,{key:l,data:o,options:i,Heading:r,headingProps:{id:c,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return R(e,"".concat(a,"-").concat(e.index))})))}if("option"===t.type)return R(t,"".concat(t.index))}));else if(g){var M=y({inputValue:m});if(null===M)return null;P=s.createElement(l,d,M)}else{var T=C({inputValue:m});if(null===T)return null;P=s.createElement(c,d,T)}var A={minMenuHeight:v,maxMenuHeight:b,menuPlacement:x,menuPosition:k,menuShouldScrollIntoView:_},D=s.createElement(xD,nm({},d,A),(function(t){var n=t.ref,r=t.placerProps,a=r.placement,l=r.maxHeight;return s.createElement(o,nm({},d,A,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:g,placement:a}),s.createElement(CI,{captureEnabled:h,onTopArrive:O,onBottomArrive:N,lockEnabled:E},(function(t){return s.createElement(i,nm({},d,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:"listbox","aria-multiselectable":d.isMulti,id:e.getElementId("listbox")},isLoading:g,maxHeight:l,focusedOption:f}),P)})))}));return S||"fixed"===k?s.createElement(a,nm({},d,{appendTo:S,controlElement:this.controlRef,menuPlacement:x,menuPosition:k}),D):D}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,i=t.name,a=t.required,l=this.state.selectValue;if(a&&!this.hasValue()&&!r)return s.createElement(NI,{name:i,onFocus:this.onValueInputFocus});if(i&&!r){if(o){if(n){var c=l.map((function(t){return e.getOptionValue(t)})).join(n);return s.createElement("input",{name:i,type:"hidden",value:c})}var u=l.length>0?l.map((function(t,n){return s.createElement("input",{key:"i-".concat(n),name:i,type:"hidden",value:e.getOptionValue(t)})})):s.createElement("input",{name:i,type:"hidden",value:""});return s.createElement("div",null,u)}var d=l[0]?this.getOptionValue(l[0]):"";return s.createElement("input",{name:i,type:"hidden",value:d})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,i=t.isFocused,a=t.selectValue,l=this.getFocusableOptions();return s.createElement(nI,nm({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:r,focusedValue:o,isFocused:i,selectValue:a,focusableOptions:l,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,i=this.props,a=i.className,l=i.id,c=i.isDisabled,u=i.menuIsOpen,d=this.state.isFocused,f=this.commonProps=this.getCommonProps();return s.createElement(r,nm({},f,{className:a,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:d}),this.renderLiveRegion(),s.createElement(t,nm({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:d,menuIsOpen:u}),s.createElement(o,nm({},f,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),s.createElement(n,nm({},f,{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,l=t.prevWasFocused,s=t.instancePrefix,c=e.options,u=e.value,d=e.menuIsOpen,f=e.inputValue,p=e.isMulti,h=ZA(u),m={};if(n&&(u!==n.value||c!==n.options||d!==n.menuIsOpen||f!==n.inputValue)){var g=d?function(e,t){return FI(zI(e,t))}(e,h):[],y=d?jI(zI(e,h),"".concat(s,"-option")):[],v=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,b=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,g);m={selectValue:h,focusedOption:b,focusedOptionId:BI(y,b),focusableOptionsWithIds:y,focusedValue:v,clearFocusValueOnUpdate:!1}}var w=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},x=i,k=a&&l;return a&&!k&&(x={value:fD(p,h,h[0]||null),options:h,action:"initial-input-focus"},k=!l),"initial-input-focus"===(null==i?void 0:i.action)&&(x=null),LA(LA(LA({},m),w),{},{prevProps:e,ariaSelection:x,prevWasFocused:k})}}]),n}(s.Component);YI.defaultProps=II;var GI=s.forwardRef((function(e,t){var n=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,l=e.inputValue,c=e.menuIsOpen,u=e.onChange,d=e.onInputChange,f=e.onMenuClose,p=e.onMenuOpen,h=e.value,m=$A(e,BA),g=jA(s.useState(void 0!==l?l:n),2),y=g[0],v=g[1],b=jA(s.useState(void 0!==c?c:o),2),w=b[0],x=b[1],k=jA(s.useState(void 0!==h?h:a),2),S=k[0],E=k[1],_=s.useCallback((function(e,t){"function"==typeof u&&u(e,t),E(e)}),[u]),C=s.useCallback((function(e,t){var n;"function"==typeof d&&(n=d(e,t)),v(void 0!==n?n:e)}),[d]),O=s.useCallback((function(){"function"==typeof p&&p(),x(!0)}),[p]),N=s.useCallback((function(){"function"==typeof f&&f(),x(!1)}),[f]),P=void 0!==l?l:y,R=void 0!==c?c:w,M=void 0!==h?h:S;return LA(LA({},m),{},{inputValue:P,menuIsOpen:R,onChange:_,onInputChange:C,onMenuClose:N,onMenuOpen:O,value:M})}(e);return s.createElement(YI,nm({ref:t},n))})),QI=GI;const ZI=({options:e,items_per_page:t,className:n,defaultValue:r,onChange:o})=>{const[i,a]=s.useState(""),[l,c]=s.useState(0),u=e.filter((e=>e.label.toLowerCase().includes(i)||e.value.toLowerCase().includes(i)));var d;d=void 0!==t?u.slice(l*t,(l+1)*t):u;const f={control:e=>({...e,minHeight:void 0})};return s.createElement(QI,{options:d,onInputChange:e=>{a(e.toLowerCase()),c(0)},onChange:o,inputValue:i,isSearchable:!0,placeholder:"Select an option...",className:n,unstyled:!0,styles:f,classNamePrefix:"styled-select",defaultValue:r,value:r})},JI=({io:e,inputconverter:t,parser:n=e=>parseFloat(e)})=>{const r=s.useContext(Iz),[o,i]=s.useState(t[1](e.value));s.useEffect((()=>{i(t[1](e.value))}),[e.value]);const a=o=>{o=n(parseFloat(o.toString()).toString()),isNaN(o)?(o="<NoValue>",i("")):(void 0!==e.value_options?.min&&o<e.value_options.min&&(o=e.value_options.min),void 0!==e.value_options?.max&&o>e.value_options.max&&(o=e.value_options.max),i(o.toString()));try{o=t[0](o)}catch(e){}r.worker?.set_io_value({nid:e.node,ioid:e.id,value:o,set_default:e.render_options.set_default})};let l=e.connected?t[1](e.value):o;return void 0===l&&(l=e.value_options?.min),void 0===l&&(l=e.value_options?.max),void 0===l&&(l=""),null===l&&(l=""),void 0!==e.value_options?.max&&void 0!==e.value_options?.min?s.createElement("div",{style:{minWidth:"100px"},className:"SliderContainer"},s.createElement(NA,{className:"SliderRoot",value:[void 0===l?e.value_options?.min:l],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])||a(e[0])},onValueChange:e=>{isNaN(e[0])||i(e[0].toString())}},s.createElement(PA,{className:"SliderTrack"},s.createElement(RA,{className:"SliderRange"})),s.createElement(HM,null,s.createElement(cT,{open:!0},s.createElement(uT,{asChild:!0},s.createElement(MA,{className:"SliderThumb"})),s.createElement(fT,{className:"SliderTooltipContent"},l))))):s.createElement("input",{type:"text",className:"nodedatainput styledinput numberinput",value:l,onChange:e=>i(e.target.value),onBlur:e=>{a(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.value_options?.step||1;t.shiftKey&&(n*=10);let r=(parseFloat(l)||0)-n;a(r)}else{let n=e.value_options?.step||1;t.shiftKey&&(n*=10);let r=(parseFloat(l)||0)+n;a(r)}},disabled:e.connected,step:e.value_options?.step,min:e.value_options?.min,max:e.value_options?.max})},eL=({io:e,inputconverter:t})=>{const n=s.useContext(Iz),[r,o]=s.useState(t[1](e.value));s.useEffect((()=>{o(t[1](e.value))}),[e.value]);let i=e.connected?t[1](e.value):r;return null==i&&(i=""),s.createElement("input",{className:"nodedatainput styledinput stringinput",value:i,onChange:e=>o(e.target.value),onBlur:r=>{let o=r.target.value;o||(o="<NoValue>");try{o=t[0](o)}catch(r){}n.worker?.set_io_value({nid:e.node,ioid:e.id,value:o,set_default:e.render_options.set_default})},disabled:e.connected})},tL=e=>e,nL=e=>parseFloat(e),rL=e=>!!e,oL=e=>"null"===e?null:e,iL=({io:e,inputconverter:t,parser:n})=>{let r=e.value_options?.options||[];Array.isArray(r)&&(r={type:"enum",values:r,keys:r.map((e=>null===e?"None":e.toString())),nullable:!1}),"enum"!==r.type&&(r={type:"enum",values:Object.values(r),keys:Object.keys(r),nullable:!1}),!r.nullable||r.values.includes(null)||r.keys.includes("None")||(r.values.unshift(null),r.keys.unshift("None"));const o=[];for(let e=0;e<r.values.length;e++){const t=null===r.values[e]||void 0===r.values[e]?"undefined":typeof r.values[e];let n=r.values[e];null===n&&(n="null"),void 0===n&&(n="undefined"),o.push([r.keys[e],n.toString(),t])}const i=s.useContext(Iz),a=({value:r,datatype:o})=>{const a=n||(e=>"nuinputconvertermber"===e?nL:"boolean"===e?rL:"undefined"===e?oL:tL)(o);let l=a(r);try{l=t[0](r)}catch(e){}i.worker?.set_io_value({nid:e.node,ioid:e.id,value:l,set_default:e.render_options.set_default})};let l=e.value;null===l&&(l="null"),void 0===l&&(l="undefined");const c=o.find((e=>e[1]===l.toString()));let u;void 0!==c&&(u={value:c[1],label:c[0],datatype:c[2]});const d=o.map((e=>({value:e[1],label:e[0],datatype:e[2]})));return s.createElement(ZI,{className:"nodedatainput styleddropdown",options:d,defaultValue:u,onChange:e=>{a(null!==e?e:{value:"<NoValue>",datatype:"string"})}})},aL=e=>!!e&&e instanceof Date,lL=e=>!!e&&e instanceof Object&&"function"==typeof e;function sL(e,t){return void 0===t&&(t=!1),!e||t?`"${e}"`:e}function cL(e){let{field:t,value:n,data:r,lastElement:o,openBracket:i,closeBracket:a,level:l,style:c,shouldExpandNode:u,clickToExpandNode:d,outerRef:f}=e;const p=s.useRef(!1),[h,m,g]=function(e){const[t,n]=s.useState(e());return[t,()=>n((e=>!e)),n]}((()=>u(l,n,t))),y=s.useRef(null);s.useEffect((()=>{p.current?g(u(l,n,t)):p.current=!0}),[u]);const v=h?c.collapseIcon:c.expandIcon,b=h?"collapse JSON":"expand JSON",w=s.useId(),x=l+1,k=r.length-1,S=e=>{if("ArrowRight"===e.key||"ArrowLeft"===e.key)e.preventDefault(),g("ArrowRight"===e.key);else if("ArrowUp"===e.key||"ArrowDown"===e.key){e.preventDefault();const t="ArrowUp"===e.key?-1:1;if(!f.current)return;const n=f.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()}},E=()=>{var e;m();const t=y.current;if(!t)return;const n=null===(e=f.current)||void 0===e?void 0:e.querySelector('[role=button][tabindex="0"]');n&&(n.tabIndex=-1),t.tabIndex=0,t.focus()};return s.createElement("div",{className:c.basicChildStyle,role:"treeitem","aria-expanded":h,"aria-selected":void 0},s.createElement("span",{className:v,onClick:E,onKeyDown:S,role:"button","aria-label":b,"aria-expanded":h,"aria-controls":h?w:void 0,ref:y,tabIndex:0===l?0:-1}),(t||""===t)&&(d?s.createElement("span",{className:c.clickableLabel,onClick:E,onKeyDown:S},sL(t,c.quotesForFieldNames),":"):s.createElement("span",{className:c.label},sL(t,c.quotesForFieldNames),":")),s.createElement("span",{className:c.punctuation},i),h?s.createElement("ul",{id:w,role:"group",className:c.childFieldsContainer},r.map(((e,t)=>s.createElement(hL,{key:e[0]||t,field:e[0],value:e[1],style:c,lastElement:t===k,level:x,shouldExpandNode:u,clickToExpandNode:d,outerRef:f})))):s.createElement("span",{className:c.collapsedContent,onClick:E,onKeyDown:S}),s.createElement("span",{className:c.punctuation},a),!o&&s.createElement("span",{className:c.punctuation},","))}function uL(e){let{field:t,openBracket:n,closeBracket:r,lastElement:o,style:i}=e;return s.createElement("div",{className:i.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||""===t)&&s.createElement("span",{className:i.label},sL(t,i.quotesForFieldNames),":"),s.createElement("span",{className:i.punctuation},n),s.createElement("span",{className:i.punctuation},r),!o&&s.createElement("span",{className:i.punctuation},","))}function dL(e){let{field:t,value:n,style:r,lastElement:o,shouldExpandNode:i,clickToExpandNode:a,level:l,outerRef:s}=e;return 0===Object.keys(n).length?uL({field:t,openBracket:"{",closeBracket:"}",lastElement:o,style:r}):cL({field:t,value:n,lastElement:o||!1,level:l,openBracket:"{",closeBracket:"}",style:r,shouldExpandNode:i,clickToExpandNode:a,data:Object.keys(n).map((e=>[e,n[e]])),outerRef:s})}function fL(e){let{field:t,value:n,style:r,lastElement:o,level:i,shouldExpandNode:a,clickToExpandNode:l,outerRef:s}=e;return 0===n.length?uL({field:t,openBracket:"[",closeBracket:"]",lastElement:o,style:r}):cL({field:t,value:n,lastElement:o||!1,level:i,openBracket:"[",closeBracket:"]",style:r,shouldExpandNode:a,clickToExpandNode:l,data:n.map((e=>[void 0,e])),outerRef:s})}function pL(e){let t,{field:n,value:r,style:o,lastElement:i}=e,a=o.otherValue;var l;return null===r?(t="null",a=o.nullValue):void 0===r?(t="undefined",a=o.undefinedValue):"string"==typeof(l=r)||l 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=aL(r)?r.toISOString():lL(r)?"function() { }":r.toString(),s.createElement("div",{className:o.basicChildStyle,role:"treeitem","aria-selected":void 0},(n||""===n)&&s.createElement("span",{className:o.label},sL(n,o.quotesForFieldNames),":"),s.createElement("span",{className:a},t),!i&&s.createElement("span",{className:o.punctuation},","))}function hL(e){const t=e.value;return n=t,Array.isArray(n)?s.createElement(fL,Object.assign({},e)):!(e=>"object"==typeof e&&null!==e)(t)||aL(t)||lL(t)?s.createElement(pL,Object.assign({},e)):s.createElement(dL,Object.assign({},e));var n}var mL="_2bkNM",gL="_1BXBN";const yL={container:"_2IvMF _GzYRV",basicChildStyle:mL,childFieldsContainer:gL,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},vL={container:"_11RoI _GzYRV",basicChildStyle:mL,childFieldsContainer:gL,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},bL=()=>!0,wL=e=>e<1,xL=e=>{let{data:t,style:n=yL,shouldExpandNode:r=bL,clickToExpandNode:o=!1,...i}=e;const a=s.useRef(null);return s.createElement("div",Object.assign({"aria-label":"JSON view"},i,{className:n.container,ref:a,role:"tree"}),s.createElement(hL,{value:t,style:{...yL,...n},lastElement:!0,level:0,shouldExpandNode:r,clickToExpandNode:o,outerRef:a}))},kL=({data:e})=>s.createElement(xL,{data:e,style:vL,shouldExpandNode:wL}),SL=({tabledata:e})=>{const t=s.useMemo((()=>(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]),[n,r]=s.useState("asc"),[o,i]=s.useState("index");let a=t.header.indexOf(o);-1===a&&(a=0);const l=((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]))})(t.rows,(e=>"desc"===e?(e,t)=>t[a]<e[a]?-1:1:(e,t)=>e[a]<t[a]?-1:1)(n));return s.createElement(Ab,{className:"tablecontainer"},s.createElement(wb,{size:"small"},s.createElement(Fb,{className:"tableHead"},s.createElement(Hb,{className:"tableheadercolor"},t.header.map((e=>s.createElement(Rb,{key:e,sortDirection:o===e&&n,className:"tableheadercolor"},s.createElement(bw,{active:o===e,direction:o===e?n:"asc",onClick:()=>(e=>{r(o===e&&"asc"===n?"desc":"asc"),i(e)})(e),className:"tableheadercolor",sx:{"& .MuiTableSortLabel-icon":{color:"inherit !important"}}},e)))))),s.createElement(Cb,null,l.map(((t,n)=>s.createElement(Hb,{key:e.index[n]},t.map(((e,t)=>s.createElement(Rb,{key:t,className:0==t?"indexcol":"datacol"},e)))))))))};var EL,_L={};
92
92
  /*!
93
93
  * content-type
94
94
  * Copyright(c) 2015 Douglas Christopher Wilson
95
95
  * MIT Licensed
96
- */var ML=function(){if(PL)return RL;PL=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 l(e){this.parameters=Object.create(null),this.type=e}return RL.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 l,s=Object.keys(t).sort(),c=0;c<s.length;c++){if(l=s[c],!n.test(l))throw new TypeError("invalid parameter name");o+="; "+l+"="+a(t[l])}return o},RL.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 s=new l(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")),s.parameters[c]=d}if(o!==n.length)throw new TypeError("invalid parameter format")}return s},RL}(),TL=new Map,AL=function(e){return e.cloneNode(!0)},DL=function(){return"file:"===window.location.protocol},IL=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=ML.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(DL()?"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||DL()&&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()},LL={},zL=function(e,t){LL[e]=LL[e]||[],LL[e].push(t)},FL=function(e,t,n){if(TL.has(e)){var r=TL.get(e);if(void 0===r)return void zL(e,n);if(r instanceof SVGSVGElement)return void n(null,AL(r))}TL.set(e,void 0),zL(e,n),IL(e,t,(function(t,n){var r;t?TL.set(e,t):(null===(r=n.responseXML)||void 0===r?void 0:r.documentElement)instanceof SVGSVGElement&&TL.set(e,n.responseXML.documentElement),function(e){for(var t=function(t,n){setTimeout((function(){if(Array.isArray(LL[e])){var n=TL.get(e),r=LL[e][t];n instanceof SVGSVGElement&&r(null,AL(n)),n instanceof Error&&r(n),t===LL[e].length-1&&delete LL[e]}}),0)},n=0,r=LL[e].length;n<r;n++)t(n)}(e)}))},jL=function(e,t,n){IL(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)}))},$L=0,BL=[],VL={},HL="http://www.w3.org/1999/xlink",UL=function(e,t,n,r,o,i,a){var l=e.getAttribute("data-src")||e.getAttribute("src");if(l){if(-1!==BL.indexOf(e))return BL.splice(BL.indexOf(e),1),void(e=null);BL.push(e),e.setAttribute("src",""),(r?FL:jL)(l,o,(function(r,o){if(!o)return BL.splice(BL.indexOf(e),1),e=null,void a(r);var s=e.getAttribute("id");s&&o.setAttribute("id",s);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 f=Array.from(new Set(Pd(Pd(Pd([],(o.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(e.getAttribute("class")||"").split(" "),!0))).join(" ").trim();o.setAttribute("class",f);var p=e.getAttribute("style");p&&o.setAttribute("style",p),o.setAttribute("data-src",l);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,v,b,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;v=g[e].id,b=v+"-"+ ++$L,Array.prototype.forEach.call(y,(function(e){for(var t=0,r=(n=o.querySelectorAll("["+e+'*="'+v+'"]')).length;t<r;t++){var i=n[t].getAttribute(e);i&&!i.match(new RegExp('url\\("?#'+v+'"?\\)'))||n[t].setAttribute(e,"url(#"+b+")")}}));for(var r=o.querySelectorAll("[*|href]"),i=[],a=0,l=r.length;a<l;a++){var s=r[a].getAttributeNS(HL,"href");s&&s.toString()==="#"+g[e].id&&i.push(r[a])}for(var c=0,u=i.length;c<u;c++)i[c].setAttributeNS(HL,"href","#"+b);g[e].id=b},n=0,r=(g=o.querySelectorAll(m+"[id]")).length;n<r;n++)t(n)}))}o.removeAttribute("xmlns:a");for(var x,k,S=o.querySelectorAll("script"),E=[],_=0,C=S.length;_<C;_++)(k=S[_].getAttribute("type"))&&"application/ecmascript"!==k&&"application/javascript"!==k&&"text/javascript"!==k||((x=S[_].innerText||S[_].textContent)&&E.push(x),o.removeChild(S[_]));if(E.length>0&&("always"===t||"once"===t&&!VL[l])){for(var O=0,N=E.length;O<N;O++)new Function(E[O])(window);VL[l]=!0}var P=o.querySelectorAll("style");if(Array.prototype.forEach.call(P,(function(e){e.textContent+=""})),o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("xmlns:xlink",HL),i(o),!e.parentNode)return BL.splice(BL.indexOf(e),1),e=null,void a(new Error("Parent node is null"));e.parentNode.replaceChild(o,e),BL.splice(BL.indexOf(e),1),e=null,a(null,o)}))}else a(new Error("Invalid data-src or src attribute"))},WL=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],qL="http://www.w3.org/2000/svg",KL="http://www.w3.org/1999/xlink",XL=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).initialState={hasError:!1,isLoading:!0},t.state=t.initialState,t._isMounted=!1,t.reactWrapper=void 0,t.nonReactWrapper=void 0,t.refCallback=function(e){t.reactWrapper=e},t}Kb(t,e);var n=t.prototype;return n.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,l=r.renumerateIRIElements,s=r.src,c=r.title,u=r.useRequestCache,d=this.props.onError,f=this.props.beforeInjection,p=this.props.afterInjection,h=this.props.wrapper;"svg"===h?((t=document.createElementNS(qL,h)).setAttribute("xmlns",qL),t.setAttribute("xmlns:xlink",KL),n=document.createElementNS(qL,h)):(t=document.createElement(h),n=document.createElement(h)),t.appendChild(n),n.dataset.src=s,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,l=n.beforeEach,s=void 0===l?function(){}:l,c=n.cacheRequests,u=void 0===c||c,d=n.evalScripts,f=void 0===d?"never":d,p=n.httpRequestWithCredentials,h=void 0!==p&&p,m=n.renumerateIRIElements,g=void 0===m||m;if(e&&"length"in e)for(var y=0,v=0,b=e.length;v<b;v++)UL(e[v],f,g,u,h,s,(function(t,n){a(t,n),e&&"length"in e&&e.length===++y&&o(y)}));else e?UL(e,f,g,u,h,s,(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{p(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{f(e)}catch(e){m(e)}},cacheRequests:u,evalScripts:i,httpRequestWithCredentials:a,renumerateIRIElements:l})}},n.removeSVG=function(){var e;null!=(e=this.nonReactWrapper)&&e.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},n.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},n.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})(nm({},e),this.props)&&this.setState((function(){return t.initialState}),(function(){t.removeSVG(),t.renderSVG()}))},n.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},n.render=function(){var e=this.props;e.afterInjection,e.beforeInjection,e.desc,e.evalScripts;var t=e.fallback;e.httpRequestWithCredentials;var n=e.loading;e.renumerateIRIElements,e.src,e.title,e.useRequestCache;var r=e.wrapper,o=Wb(e,WL),i=r;return s.createElement(i,nm({},o,{ref:this.refCallback},"svg"===r?{xmlns:qL,xmlnsXlink:KL}:{}),this.state.isLoading&&n&&s.createElement(n,null),this.state.hasError&&t&&s.createElement(t,null))},t}(s.Component);XL.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"},XL.propTypes={afterInjection:Ap.func,beforeInjection:Ap.func,desc:Ap.string,evalScripts:Ap.oneOf(["always","once","never"]),fallback:Ap.oneOfType([Ap.func,Ap.object,Ap.string]),httpRequestWithCredentials:Ap.bool,loading:Ap.oneOfType([Ap.func,Ap.object,Ap.string]),onError:Ap.func,renumerateIRIElements:Ap.bool,src:Ap.string.isRequired,title:Ap.string,useRequestCache:Ap.bool,wrapper:Ap.oneOf(["div","span","svg"])};const YL=({value:e,renderoptions:t})=>(void 0===t&&(t={}),void 0===t.format&&(t.format="jpeg"),s.createElement("img",{src:"data:image/"+t.format+";base64, "+e,style:{maxWidth:"100%",maxHeight:"100%"}})),GL=({value:e})=>s.createElement(XL,{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%")}}),QL=({io:e})=>{let t=e.fullvalue;if(null==t&&(t=e.value),void 0===t&&(t=""),"string"!=typeof t||t.length%4!=0)return s.createElement("div",null,t);const n=Math.round(3*t.length/4);return s.createElement("div",null,s.createElement("pre",null,"Bytes(",n,")"))},ZL=({io:e})=>{let t=e.fullvalue;return void 0===t&&(t=e.value),void 0===t&&(t={}),s.createElement(OL,{data:t})},JL={float:({io:e,inputconverter:t})=>oL({io:e,inputconverter:t,parser:parseFloat}),int:({io:e,inputconverter:t})=>oL({io:e,inputconverter:t,parser:parseInt}),bool:({io:e,inputconverter:t})=>{const n=s.useContext($z),r=void 0===e.value,o=s.useRef(null);s.useEffect((()=>{o.current&&(o.current.indeterminate=r)}),[o,r]);return s.createElement("input",{ref:o,type:"checkbox",className:"styledcheckbox booleaninput",checked:!!t[1](e.value),onChange:r=>{let o=r.target.checked;try{o=t[0](r.target.checked)}catch(r){}n.worker?.set_io_value({nid:e.node,ioid:e.id,value:o,set_default:e.render_options.set_default})},disabled:e.connected})},string:iL,str:iL,color:({io:e})=>{const t=s.useContext($z),n=e.value_options?.colorspace||"hex";let r=!1;return"string"!=typeof e.type&&"anyOf"in e.type&&void 0!==e.type.anyOf&&(r=e.type.anyOf.some((e=>"None"===e))),s.createElement(oA,{onChange:r=>{let o="<NoValue>";r&&(o=r[n]?r[n]():r.hex()),null===r&&(o=null),t.worker?.set_io_value({nid:e.node,ioid:e.id,value:o,set_default:e.render_options.set_default})},inicolordata:e.value,allow_null:r,inicolorspace:n})},select:uL,enum:uL,bytes:QL},ez={Inputrenderer:JL,Outputrenderer:{},HandlePreviewRenderer:{bytes:QL},DataOverlayRenderer:{},DataPreviewViewRenderer:{string:({io:e})=>{let t=e.fullvalue;return null==t&&(t=e.value),t=void 0===t?"":JSON.stringify(e.value).replace(/\\n/g,"\n"),s.createElement("div",null,s.createElement("pre",null,t))},table:({io:e})=>{let t=e.fullvalue;return null==t&&(t=e.value),void 0===t&&(t=[]),s.createElement(NL,{tabledata:t})},image:({io:e})=>{let t=e.fullvalue;return null==t&&(t=e.value),void 0===t&&(t=""),s.createElement(YL,{value:t})},svg:({io:e})=>{let t=e.fullvalue;return null==t&&(t=e.value),void 0===t&&(t=""),s.createElement(GL,{value:t})},dict:ZL,bytes:QL},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)})`}}},tz=(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}},nz=({children:e,plugins:t,fnrf_zst:n})=>{const[r,o]=s.useReducer(tz,ez),i=(e,t)=>{o({type:"EXTEND_FROM_PLUGIN",payload:{plugin:e},options:t})};return s.useEffect((()=>{for(const e in t){const r=t[e].RendererPlugin;r&&i(r);const o=t[e].renderpluginfactory;o&&i(o({React:u,fnrf_zst:n}))}}),[t]),s.createElement(rz.Provider,{value:{Inputrenderer:r.Inputrenderer,Outputrenderer:r.Outputrenderer,HandlePreviewRenderer:r.HandlePreviewRenderer,DataOverlayRenderer:r.DataOverlayRenderer,DataPreviewViewRenderer:r.DataPreviewViewRenderer,DataViewRenderer:r.DataViewRenderer,InLineRenderer:r.InLineRenderer,extendInputRenderMapping:(e,t,n)=>{o({type:"EXTEND_INPUT_RENDER",payload:{type:e,component:t},options:n})},extendOutputRenderMapping:(e,t,n)=>{o({type:"EXTEND_OUTPUT_RENDER",payload:{type:e,component:t},options:n})},extendHandlePreviewRenderMapping:(e,t,n)=>{o({type:"EXTEND_HANDLE_PREVIEW_RENDER",payload:{type:e,component:t},options:n})},extendDataOverlayRenderMapping:(e,t,n)=>{o({type:"EXTEND_DATA_OVERLAY_RENDER",payload:{type:e,component:t},options:n})},extendDataPreviewRenderMapping:(e,t,n)=>{o({type:"EXTEND_DATA_PREVIEW_RENDER",payload:{type:e,component:t},options:n})},extendDataViewRenderMapping:(e,t,n)=>{o({type:"EXTEND_DATA_VIEW_RENDER",payload:{type:e,component:t},options:n})},extendFromPlugin:i}},e)},rz=s.createContext({Inputrenderer:ez.Inputrenderer,Outputrenderer:ez.Outputrenderer,HandlePreviewRenderer:ez.HandlePreviewRenderer,DataOverlayRenderer:ez.DataOverlayRenderer,DataPreviewViewRenderer:ez.DataPreviewViewRenderer,DataViewRenderer:ez.DataViewRenderer,InLineRenderer:ez.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)=>{}}),oz=({component:e,...t})=>s.createElement(e,{...t}),iz=e=>{const t=s.useContext($z).render_options(),[n]=az(e.type,t.typemap||{});if(!n)return ZL;const{DataOverlayRenderer:r,DataPreviewViewRenderer:o}=s.useContext(rz);return r[n]?r[n]:o[n]?o[n]:ZL},az=(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=>az(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]},lz=({io:e,typestring:t,preview:n,...r})=>{const[o,i]=s.useState(!1),[a,l]=s.useState(!1),[c,u]=e?(e=>{const t=s.useContext($z).render_options(),[n]=az(e.type,t.typemap||{}),{HandlePreviewRenderer:r,DataPreviewViewRenderer:o}=s.useContext(rz),i=iz(e);return n?r[n]?[r[n],i]:o[n]?[o[n],i]:[ZL,i]:[ZL,i]})(e):[void 0,void 0];return s.createElement(pT,null,s.createElement(hT,{open:o||a,onOpenChange:l},s.createElement(mT,{asChild:!0},s.createElement(pi,{id:e.id,"data-type":t,...r})),s.createElement(gT,null,s.createElement(yT,{className:"iotooltipcontent",sideOffset:5},s.createElement("div",{className:"iotooltip_container"},s.createElement("div",{className:"iotooltip_header"},o?s.createElement(ub,{onClick:()=>i(!1)}):s.createElement(cb,{onClick:()=>i(!0)}),u&&s.createElement(_w,{title:e.full_id,trigger:s.createElement(db,null),onOpenChange:t=>{t&&e.try_get_full_value&&e.try_get_full_value(),i(t)}},s.createElement(oz,{component:u,io:e}))),c?s.createElement(oz,{component:c,io:e}):`no preview available for "${t}"`),s.createElement(vT,{className:"iotooltipcontentarrow"})))))},sz={"":[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)]},cz=({io:e})=>{const t=s.useContext($z).render_options(),[n,r]=az(e.render_options.type,t.typemap||{}),{Inputrenderer:o}=s.useContext(rz),i=n?e.value_options?.options?uL:o[n]:void 0,a=sz[(r&&t.inputconverter?.[r])??""];return s.createElement("div",{className:"nodeinput","data-type":n},s.createElement(lz,{io:e,typestring:n,position:Po.Left,type:"target"}),i&&s.createElement("div",{className:"iovaluefield nodrag","data-type":n},s.createElement(i,{io:e,inputconverter:a})),s.createElement("div",{className:"ioname"},e.name),s.createElement(lz,{io:e,typestring:n,position:Po.Right,type:"source"}))},uz=({io:e,typestring:t})=>{const{InLineRenderer:n}=s.useContext(rz);if(t&&n[t])return s.createElement("div",null,n[t]({io:e}));let r=e.fullvalue;return null==r&&(r=e.value),r=void 0===r?"":JSON.stringify(r).replace(/\\n/g,"\n"),r.length>63&&(r=r.slice(0,60)+"..."),s.createElement("div",null,r)},dz=({io:e})=>{const t=s.useContext($z).render_options(),[n]=az(e.type,t.typemap||{}),{Outputrenderer:r}=s.useContext(rz),o=n?r[n]:void 0;return s.createElement("div",{className:"nodeoutput","data-type":n},s.createElement(lz,{io:e,typestring:n,position:Po.Right,type:"source"}),s.createElement("div",{className:"ioname"},e.name),o?s.createElement("div",{className:"iovaluefield nodrag"},s.createElement(o,{io:e})):s.createElement("div",{className:"iovaluefield"},s.createElement(uz,{io:e,typestring:n})))};function fz(e){return`${Math.floor(e/60)}:${Math.floor(e%60).toString().padStart(2,"0")}`}function pz(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 hz=({state:e,className:t="reacttqdm",...n})=>{const r=s.useRef(null),o=s.useRef(null);s.useEffect((()=>{const e=()=>{r.current&&o.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(),l=a.width,s=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>l||u.height>s)&&c>o;)c*=i,t.style.fontSize=c+"px",u=t.getBoundingClientRect()}(r.current,o.current,{maxFontSize:12,decrementFactor:.9})};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[e]);const i=e.total?e.n/e.total*100:0;return s.createElement("div",{ref:r,className:t,...n},s.createElement("div",{style:{position:"relative",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"}},s.createElement("div",{className:t+"-bar",style:{position:"absolute",width:"100%",height:"100%",overflow:"hidden"}},s.createElement("div",{className:t+"-progress",style:{width:`${i}%`,height:"100%"}})),s.createElement("div",{className:t+"-text",ref:o},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:l="",rate:s,postfix:c=null,initial:u=0}=e;null!==t&&n>=t+.5&&(t=null);let d=n,f=t,p=s;r&&!0!==r&&1!==r&&(null!==t&&(f=t*r),d=n*r,void 0!==s&&(p=s*r));const h=fz(o);void 0===p&&o>0&&(p=(d-u)/o);const m=p?1/p:void 0,[g,y]=p?pz(p,a):[void 0,""],[v,b]=m?pz(m,1e3):[void 0,""],w=m&&m>1?v?`${v}${b}s/`+i:"?":(g||"?")+`${y}${i}/s`,x=r?pz(d,a).join(""):d.toString(),k=r&&null!==f?pz(f,a).join(""):f?.toString()??"?",S=p?fz(p&&null!==f?(f-d)/p:0):"?",E=l?`${l}: `:"";if(null!==t){const e=` ${x}/${k} [${h} < ${S}, ${w}${c??""}]`;return`${E}${(d/t*100).toFixed(0)}%${e}`}return`${E}${x}${i} [${h}, ${w}${c??""}]`}(e))))},mz=({node_data:e})=>{const t=s.useContext($z);return s.createElement("div",{className:"nodeheader",title:e.description||e.node_name},s.createElement("div",{className:"nodeheader_element"},s.createElement(hb,{fontSize:"inherit",className:"triggerbutton",onClick:()=>{t.on_node_action({type:"trigger",from_remote:!1,id:e.id})}}),s.createElement(pb,{fontSize:"inherit",onClick:async()=>{t.logger.info("nodestatus",await(t.worker?.get_node_status(e.id)))}})),s.createElement("div",{className:"nodeheader_element nodeheader_title"},s.createElement("div",{className:"nodeheader_title_text"},e.node_name)),s.createElement("div",{className:"nodeheader_element"},s.createElement(fb,{fontSize:"inherit"})))},gz=({node_data:e})=>{const t=e.render_options?.data?.src?e.io[e.render_options?.data?.src]:void 0,[n,r]=t?(e=>{const t=s.useContext($z).render_options(),[n]=az(e.type,t.typemap||{}),r=iz(e),{DataPreviewViewRenderer:o,DataViewRenderer:i}=s.useContext(rz);return n?i[n]?[i[n],r]:o[n]?[o[n],r]:[ZL,r]:[ZL,r]})(t):[void 0,void 0];return s.createElement("div",{className:"nodrag nodedatabody"},n&&t&&s.createElement(_w,{title:t.full_id,trigger:s.createElement("div",null,s.createElement(oz,{component:n,io:t})),onOpenChange:e=>{e&&t?.try_get_full_value&&t?.try_get_full_value()}},s.createElement(oz,{component:r,io:t})))},yz=({node_data:e})=>{const t=Object.values(e.io).filter((e=>e.is_input)),n=Object.values(e.io).filter((e=>!e.is_input));return e.render_options,s.createElement("div",{className:"nodebody"},n.map((e=>e.hidden?null:s.createElement(dz,{key:e.id,io:e}))),s.createElement(gz,{node_data:e}),t.map((e=>e.hidden?null:s.createElement(cz,{key:e.id,io:e}))))},vz=({node_data:e})=>{const[t,n]=s.useState(e.name);s.useEffect((()=>{n(e.name)}),[e]);const r=s.useContext($z);return s.createElement("input",{className:"nodename_input",value:t,onChange:e=>{n(e.target.value)},onBlur:t=>{const n=t.target.value;r.on_node_action({type:"update",from_remote:!1,id:e.id,node:{name:n}})}})},bz=({node_data:e})=>e.progress?s.createElement(hz,{style:{height:"idle"===e.progress.prefix?"0px":void 0},state:e.progress,className:"nodeprogress"}):null,wz=({node_data:e})=>s.createElement("div",{className:"nodefooter"},e.error&&s.createElement("div",{className:"nodeerror"},e.error),s.createElement(bz,{node_data:e})),xz=({io:e})=>{const t=s.useContext($z).render_options(),[n,r]=az(e.render_options.type,t.typemap||{}),{Inputrenderer:o}=s.useContext(rz),i=n?e.value_options?.options?uL:o[n]:void 0,a=sz[(r&&t.inputconverter?.[r])??""];return s.createElement("div",{className:"nodesettings_component"},s.createElement("div",null,e.name),i&&s.createElement(i,{io:e,inputconverter:a}),s.createElement("div",null,s.createElement("label",null,"hidden:",s.createElement("input",{className:"styledcheckbox",type:"checkbox",disabled:e.connected,onChange:t=>{e.set_hidden?.(t.target.checked)},checked:e.hidden}))))},kz=({io:e})=>s.createElement("div",{className:"nodesettings_component"},s.createElement("div",null,e.name),s.createElement("div",null,s.createElement("label",null,"hidden:",s.createElement("input",{className:"styledcheckbox",type:"checkbox",disabled:e.connected,onChange:t=>{e.set_hidden?.(t.target.checked)},checked:e.hidden})))),Sz=({nodestore:e})=>{const t=e(),n=Object.values(t.io).filter((e=>e.is_input)),r=Object.values(t.io).filter((e=>!e.is_input));return s.createElement("div",null,s.createElement("div",{className:"nodesettings_section"},s.createElement("div",{className:"nodesettings_component"},s.createElement("div",null,"Name"),s.createElement("div",null,s.createElement(vz,{node_data:t})))),s.createElement("div",{className:"nodesettings_section"},s.createElement("div",null,"Inputs"),n.map((e=>s.createElement(xz,{io:e,key:e.id})))),s.createElement("div",{className:"nodesettings_section"},s.createElement("div",null,"Outputs"),r.map((e=>s.createElement(kz,{io:e,key:e.id})))))},Ez=()=>{const e=s.useContext($z),t=e.local_state((e=>e.selected_nodes));if(0===t.length)return s.createElement("div",null,"Node Settings");if(t.length>1)return s.createElement("div",null,"Multiple Nodes Selected");const n=e.nodespace.get_node(t[0]);return n?s.createElement(Sz,{nodestore:n}):s.createElement("div",null,"Node not found")},_z=()=>{const e=s.useContext($z),t=e.local_settings((e=>e.view_settings.expand_node_props)),n=e.local_settings((e=>e.update_view_settings)),r=e=>{n({expand_node_props:e})};return s.createElement("div",{className:"nodesettings_container"},s.createElement("div",{className:"nodesettings_expander"},t?s.createElement(sb,{onClick:()=>{r(!1)}}):s.createElement(mb,{onClick:()=>{r(!0)}})),s.createElement("div",{className:"nodesettings_content "+(t?"expanded":"collapsed")},t&&s.createElement(Ez,null)))},Cz=e=>({nodes:e.nodes,edges:e.edges,onNodesChange:e.onNodesChange,onEdgesChange:e.onEdgesChange,onConnect:e.onConnect}),Oz={default:({data:e})=>{const t=e.UseNodeStore(),n=t.frontend.collapsed||!1,[r,o]=s.useState(!1);return s.useEffect((()=>{let e;return t.in_trigger?o(!0):r&&(e=setTimeout((()=>o(!1)),200)),()=>clearTimeout(e)}),[t.in_trigger,r]),s.createElement(s.Fragment,null,s.createElement("div",{className:"innernode"+(r?" intrigger":"")+(t.error?" error":"")},s.createElement(mz,{node_data:t}),s.createElement(vz,{node_data:t}),n?null:s.createElement(yz,{node_data:t}),s.createElement(wz,{node_data:t})))}},Nz={default:({id:e,sourceX:t,sourceY:n,targetX:r,targetY:o,sourcePosition:i,targetPosition:a,data:l,...c})=>{const[u]=Vo({sourceX:t,sourceY:n,sourcePosition:i,targetX:r,targetY:o,targetPosition:a});return s.createElement(s.Fragment,null,s.createElement(wo,{id:e,path:u,...c}))}},Pz=()=>{const e=Qi();return s.useContext($z).rf_instance=e,s.createElement(s.Fragment,null)},Rz=()=>{const e=s.useContext($z),t=Fi("Delete"),n=Yr(Cl,q),r=Yr(_l,q);if(t){for(const t of n)if(t.selected){if(!e.worker)return s.createElement(s.Fragment,null);if(!t.source||!t.target)return s.createElement(s.Fragment,null);if(!t.sourceHandle||!t.targetHandle)return s.createElement(s.Fragment,null);e.worker.remove_edge({src_nid:t.source,src_ioid:t.sourceHandle,trg_nid:t.target,trg_ioid:t.targetHandle})}for(const t of r)if(t.selected){if(!e.worker)return s.createElement(s.Fragment,null);e.worker.remove_node(t.id)}}return s.createElement(s.Fragment,null)},Mz=({id:e,top:t,left:n,right:r,bottom:o,...i})=>{const{getNode:a,setNodes:l,addNodes:c,setEdges:u}=Qi(),d=s.useContext($z),f=s.useCallback((()=>{const t=a(e);if(!t)return;const n={x:t.position.x+50,y:t.position.y+50};c({...t,id:`${t.id}-copy`,position:n})}),[e,a,c]),p=s.useCallback((()=>{d.on_node_action({type:"delete",id:e,from_remote:!1})}),[e,l,u]),h=d.nodespace.get_node(e,!1);if(!h)return s.createElement(s.Fragment,null," ");const m=h();return s.createElement("div",{style:{top:t,left:n,right:r,bottom:o},className:"context-menu",...i},s.createElement("p",{style:{fontWeight:"bold"}},s.createElement("small",null,m.name)),s.createElement("button",{onClick:f},"duplicate"),s.createElement("button",{onClick:p},"delete"))},Tz=e=>{const t=s.useContext($z),n=s.useRef(null);s.useEffect((()=>{t.reactflowRef=n.current}),[n]);const[r,o]=s.useState(null),i=s.useCallback((()=>o(null)),[o]),{nodes:a,edges:l,onNodesChange:c,onEdgesChange:u,onConnect:d}=t.useReactFlowStore(zM(Cz));return s.createElement("div",{className:"reactflowlayer"},s.createElement(El,{nodes:a,edges:l,onNodesChange:c,onEdgesChange:u,onConnect:d,nodeTypes:Oz,edgeTypes:Nz,minZoom:e.minZoom,maxZoom:e.maxZoom,fitView:!0,onSelectionChange:({nodes:e,edges:n})=>{const r=t.local_state.getState();t.local_state.setState({...r,selected_nodes:e.map((e=>e.id)),selected_edges:n.map((e=>e.id))})},ref:n,onPaneClick:i,panOnDrag:!e.static},s.createElement(Pz,null),s.createElement(Rz,null),s.createElement(Hl,{color:"#888",gap:16,size:1}),e.minimap&&s.createElement(Ll,{nodeStrokeWidth:3,pannable:!e.static,zoomable:!e.static,zoomStep:3}),r&&s.createElement(Mz,{onClick:i,...r})))},Az=s.createContext(void 0),Dz=s.forwardRef(((e,t)=>{const{asChild:n,children:r,className:o,style:i,...a}=e,[l,c]=s.useState(!1),u=s.useRef(null),[d,f]=s.useState(null),[p,h]=s.useState({}),m=e.htime||300,g=e.vtime||300,y=e.hdelay||0,v=e.vdelay||200;s.useImperativeHandle(t,(()=>u.current),[]);let b;if(n&&s.isValidElement(r)){const e=r,t=[e.props.className,o,"smooth-expand",l?"smooth-expand-expanded":""].filter(Boolean).join(" "),n={...e.props.style,...i,...p};b=s.cloneElement(e,{ref:u,className:t,style:n,...a})}else b=s.createElement("div",{ref:u,...a,className:`smooth-expand ${l?"smooth-expand-expanded":""} ${o||""}`,style:{...i,...p}},r);const w=s.createElement(Az.Provider,{value:{isExpanded:l,toggleExpand:async()=>{u.current&&(l?await(async()=>{if(!u.current)return;if(!d)return;const e={transitionProperty:"width, left, height, top",transitionDuration:`${m}ms, ${m}ms, ${g}ms, ${g}ms`};h((t=>({...t,...e})));const[t,n,r,o]=d,i=new Promise((e=>{setTimeout((()=>{h((e=>({...e,left:`${t}px`,width:`${r}px`}))),e()}),v)})),a=new Promise((e=>{setTimeout((()=>{h((e=>({...e,top:`${n}px`,height:`${o}px`}))),e()}),y)})),l=Math.max(m+y,g+v),s=new Promise((e=>{setTimeout((()=>{e()}),l)}));await Promise.all([i,a,s]),u.current.style.transition="",h({}),c(!1)})():await(async()=>{if(!u.current)return;u.current.style.transition="none",u.current.style.position="",u.current.style.top="",u.current.style.left="",u.current.style.width="",u.current.style.height="";const e=u.current.getBoundingClientRect();f([e.left,e.top,e.width,e.height]),u.current.style.transition="none",h({position:"absolute",top:`${e.top}px`,left:`${e.left}px`,width:`${e.width}px`,height:`${e.height}px`}),h((e=>({...e,transitionProperty:"width, left, height, top",transitionDuration:`${m}ms, ${m}ms, ${g}ms, ${g}ms`}))),c(!0);const t=new Promise((e=>{setTimeout((()=>{h((e=>({...e,left:"0px",width:"100vw"}))),e()}),y)})),n=new Promise((e=>{setTimeout((()=>{h((e=>({...e,top:"0px",height:"100vh"}))),e()}),v)})),r=Math.max(m+y,g+v),o=new Promise((e=>{setTimeout((()=>{e()}),r)}));await Promise.all([t,n,o])})())}}},b);return l?Lr.createPortal(w,document.body):w}));Dz.Trigger=function({children:e}){const t=s.useContext(Az);if(!t)throw new Error("SmoothExpandComponent.Trigger must be used within a SmoothExpandComponent");return s.createElement("div",{style:{cursor:"pointer"},onClick:t.toggleExpand},e)},Dz.Expanded=function({children:e}){const t=s.useContext(Az);if(!t)throw new Error("SmoothExpandComponent.Expanded must be used within a SmoothExpandComponent");return t.isExpanded?s.createElement(s.Fragment,null,e):null},Dz.Collapsed=function({children:e}){const t=s.useContext(Az);if(!t)throw new Error("SmoothExpandComponent.Collapsed must be used within a SmoothExpandComponent");return t.isExpanded?null:s.createElement(s.Fragment,null,e)};const Iz=s.createContext(void 0),Lz=s.forwardRef(((e,t)=>{const{asChild:n,children:r,className:o,style:i,...a}=e,l=s.useRef(null);s.useImperativeHandle(t,(()=>l.current),[]);const[c,u]=s.useState(!1),d=s.useCallback((async()=>{try{const e=l.current;if(!e)return;if(c){const e=document;e.exitFullscreen?await e.exitFullscreen():e.mozCancelFullScreen?await e.mozCancelFullScreen():e.webkitExitFullscreen?await e.webkitExitFullscreen():e.msExitFullscreen&&await e.msExitFullscreen(),u(!1)}else e.requestFullscreen?await e.requestFullscreen():e.mozRequestFullScreen?await e.mozRequestFullScreen():e.webkitRequestFullscreen?await e.webkitRequestFullscreen():e.msRequestFullscreen&&await e.msRequestFullscreen(),u(!0)}catch(e){console.error("Error toggling fullscreen",e)}}),[c]);let f;if(s.useEffect((()=>{const e=()=>{const e=document.fullscreenElement;u(!!e)};return document.addEventListener("fullscreenchange",e),document.addEventListener("webkitfullscreenchange",e),document.addEventListener("mozfullscreenchange",e),document.addEventListener("MSFullscreenChange",e),()=>{document.removeEventListener("fullscreenchange",e),document.removeEventListener("webkitfullscreenchange",e),document.removeEventListener("mozfullscreenchange",e),document.removeEventListener("MSFullscreenChange",e)}}),[]),n&&s.isValidElement(r)){const e=r,t=[e.props.className,o].filter(Boolean).join(" "),n={...e.props.style,...i};f=s.cloneElement(e,{ref:l,className:t,style:n,...a})}else f=s.createElement("div",{ref:l,...a,className:o,style:i},r);return s.createElement(Iz.Provider,{value:{isFullScreen:c,toggleFullscreen:d}},f)}));Lz.Trigger=function({children:e}){const t=s.useContext(Iz);if(!t)throw new Error("FullScreenComponent.Trigger must be used within a FullScreenComponent");return s.createElement("div",{style:{cursor:"pointer"},onClick:t.toggleFullscreen},e)},Lz.InFullScreen=function({children:e}){const t=s.useContext(Iz);if(!t)throw new Error("FullScreenComponent.Expanded must be used within a FullScreenComponent");return t.isFullScreen?s.createElement(s.Fragment,null,e):null},Lz.OutFullScreen=function({children:e}){const t=s.useContext(Iz);if(!t)throw new Error("FullScreenComponent.Collapsed must be used within a FullScreenComponent");return t.isFullScreen?null:s.createElement(s.Fragment,null,e)};const zz=({fnrf_zst:e,header:t,flow:n,library:r})=>{const[o,i]=s.useState(e.options.worker);e.workermanager&&(e.workermanager.on_setWorker=i),e.set_worker(o),e.auto_progress();const a=e.plugins();return s.createElement(nz,{plugins:a,fnrf_zst:e},s.createElement($z.Provider,{value:e},s.createElement(Dz,{asChild:!0},s.createElement(Lz,{asChild:!0},s.createElement("div",{className:"funcnodesreactflowcontainer funcnodescontainer"},t.show&&s.createElement(ZE,{...t}),s.createElement("div",{className:"funcnodesreactflowbody"},o&&r.show&&s.createElement(IM,null),s.createElement(Tz,{...n}),o&&n.showNodeSettings&&s.createElement(_z,null)),s.createElement("div",{className:"funcnodesflaotingmenu"},s.createElement(Lz.OutFullScreen,null,n.allowExpand&&s.createElement(Dz.Trigger,null,s.createElement(Dz.Expanded,null,s.createElement(Sw,null)),s.createElement(Dz.Collapsed,null,s.createElement(Ew,null)))),n.allowFullScreen&&s.createElement(Lz.Trigger,null,s.createElement(Lz.OutFullScreen,null,s.createElement(db,null)),s.createElement(Lz.InFullScreen,null,s.createElement(kw,null)))))))))},Fz={},jz={id:"",debug:!1,useWorkerManager:!0,show_library:!0,header:{show:!0,showmenu:!0},flow:{minimap:!0,static:!1,minZoom:.1,maxZoom:5,allowFullScreen:!0,allowExpand:!0,showNodeSettings:!0},library:{show:!0}},$z=s.createContext(es(jz)),Bz=e=>{let t=A(e,{...jz,id:Pu()}).new_obj;if(!t.useWorkerManager&&void 0===t.worker)return s.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 s.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=Fz),void 0===Fz[t.id]){const e=es(t);Fz[t.id]=e}if(t.worker&&t.worker.set_zustand(Fz[t.id]),Fz[t.id].options.debug=t.debug,t.useWorkerManager){const e=new Tu(t.workermanager_url,Fz[t.id]);Fz[t.id].workermanager=e}return s.createElement(zz,{fnrf_zst:Fz[t.id],header:t.header,library:t.library,flow:t.flow})},Vz=e=>{const t=new Ql("FuncNodes",e.debug?"debug":"info");t.debug("Initalizing FuncNodes with props:",e);let n=A(e,{...jz,id:Pu()}).new_obj;if(void 0===e.worker&&void 0!==e.worker_url&&(n.useWorkerManager=!1,n.worker=new Mu({url:e.worker_url,uuid:n.id,on_sync_complete:n.on_sync_complete})),void 0!==n.worker){const e=es(n);n.worker.set_zustand(e)}if(void 0!==e.fnw_url){if(void 0===n.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),r=n.worker.on_sync_complete,o=async e=>{const n=await t;e.on_sync_complete=r,await e.update_from_export(n)};n.worker.on_sync_complete=o}return t.debug("Initalizing FuncnodesReactFlow with props:",n),s.createElement("div",{className:"App",style:{height:"100%",width:"100%"}},s.createElement(Bz,{...n}))};var Hz,Uz,Wz,qz,Kz={exports:{}},Xz={},Yz={exports:{}},Gz={};function Qz(){return Uz||(Uz=1,Yz.exports=(Hz||(Hz=1,function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<o(i,t)))break e;e[r]=t,e[n]=i,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,a=i>>>1;r<a;){var l=2*(r+1)-1,s=e[l],c=l+1,u=e[c];if(0>o(s,n))c<i&&0>o(u,s)?(e[r]=u,e[c]=n,r=c):(e[r]=s,e[l]=n,r=l);else{if(!(c<i&&0>o(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(e.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var s=[],c=[],u=1,d=null,f=3,p=!1,h=!1,m=!1,g="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,v="undefined"!=typeof setImmediate?setImmediate:null;function b(e){for(var o=n(c);null!==o;){if(null===o.callback)r(c);else{if(!(o.startTime<=e))break;r(c),o.sortIndex=o.expirationTime,t(s,o)}o=n(c)}}function w(e){if(m=!1,b(e),!h)if(null!==n(s))h=!0,R();else{var t=n(c);null!==t&&M(w,t.startTime-e)}}var x,k=!1,S=-1,E=5,_=-1;function C(){return!(e.unstable_now()-_<E)}function O(){if(k){var t=e.unstable_now();_=t;var o=!0;try{e:{h=!1,m&&(m=!1,y(S),S=-1),p=!0;var i=f;try{t:{for(b(t),d=n(s);null!==d&&!(d.expirationTime>t&&C());){var a=d.callback;if("function"==typeof a){d.callback=null,f=d.priorityLevel;var l=a(d.expirationTime<=t);if(t=e.unstable_now(),"function"==typeof l){d.callback=l,b(t),o=!0;break t}d===n(s)&&r(s),b(t)}else r(s);d=n(s)}if(null!==d)o=!0;else{var u=n(c);null!==u&&M(w,u.startTime-t),o=!1}}break e}finally{d=null,f=i,p=!1}o=void 0}}finally{o?x():k=!1}}}if("function"==typeof v)x=function(){v(O)};else if("undefined"!=typeof MessageChannel){var N=new MessageChannel,P=N.port2;N.port1.onmessage=O,x=function(){P.postMessage(null)}}else x=function(){g(O,0)};function R(){k||(k=!0,x())}function M(t,n){S=g((function(){t(e.unstable_now())}),n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){h||p||(h=!0,R())},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(s)},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,o,i){var a=e.unstable_now();switch(i="object"==typeof i&&null!==i&&"number"==typeof(i=i.delay)&&0<i?a+i:a,r){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}return r={id:u++,callback:o,priorityLevel:r,startTime:i,expirationTime:l=i+l,sortIndex:-1},i>a?(r.sortIndex=i,t(c,r),null===n(s)&&r===n(c)&&(m?(y(S),S=-1):m=!0,M(w,i-a))):(r.sortIndex=l,t(s,r),h||p||(h=!0,R())),r},e.unstable_shouldYield=C,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}}(Gz)),Gz)),Yz.exports}
96
+ */var CL=function(){if(EL)return _L;EL=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 l(e){this.parameters=Object.create(null),this.type=e}return _L.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 l,s=Object.keys(t).sort(),c=0;c<s.length;c++){if(l=s[c],!n.test(l))throw new TypeError("invalid parameter name");o+="; "+l+"="+a(t[l])}return o},_L.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 s=new l(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")),s.parameters[c]=d}if(o!==n.length)throw new TypeError("invalid parameter format")}return s},_L}(),OL=new Map,NL=function(e){return e.cloneNode(!0)},PL=function(){return"file:"===window.location.protocol},RL=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=CL.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(PL()?"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||PL()&&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()},ML={},TL=function(e,t){ML[e]=ML[e]||[],ML[e].push(t)},AL=function(e,t,n){if(OL.has(e)){var r=OL.get(e);if(void 0===r)return void TL(e,n);if(r instanceof SVGSVGElement)return void n(null,NL(r))}OL.set(e,void 0),TL(e,n),RL(e,t,(function(t,n){var r;t?OL.set(e,t):(null===(r=n.responseXML)||void 0===r?void 0:r.documentElement)instanceof SVGSVGElement&&OL.set(e,n.responseXML.documentElement),function(e){for(var t=function(t,n){setTimeout((function(){if(Array.isArray(ML[e])){var n=OL.get(e),r=ML[e][t];n instanceof SVGSVGElement&&r(null,NL(n)),n instanceof Error&&r(n),t===ML[e].length-1&&delete ML[e]}}),0)},n=0,r=ML[e].length;n<r;n++)t(n)}(e)}))},DL=function(e,t,n){RL(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)}))},IL=0,LL=[],zL={},FL="http://www.w3.org/1999/xlink",jL=function(e,t,n,r,o,i,a){var l=e.getAttribute("data-src")||e.getAttribute("src");if(l){if(-1!==LL.indexOf(e))return LL.splice(LL.indexOf(e),1),void(e=null);LL.push(e),e.setAttribute("src",""),(r?AL:DL)(l,o,(function(r,o){if(!o)return LL.splice(LL.indexOf(e),1),e=null,void a(r);var s=e.getAttribute("id");s&&o.setAttribute("id",s);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 f=Array.from(new Set(Pd(Pd(Pd([],(o.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(e.getAttribute("class")||"").split(" "),!0))).join(" ").trim();o.setAttribute("class",f);var p=e.getAttribute("style");p&&o.setAttribute("style",p),o.setAttribute("data-src",l);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,v,b,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;v=g[e].id,b=v+"-"+ ++IL,Array.prototype.forEach.call(y,(function(e){for(var t=0,r=(n=o.querySelectorAll("["+e+'*="'+v+'"]')).length;t<r;t++){var i=n[t].getAttribute(e);i&&!i.match(new RegExp('url\\("?#'+v+'"?\\)'))||n[t].setAttribute(e,"url(#"+b+")")}}));for(var r=o.querySelectorAll("[*|href]"),i=[],a=0,l=r.length;a<l;a++){var s=r[a].getAttributeNS(FL,"href");s&&s.toString()==="#"+g[e].id&&i.push(r[a])}for(var c=0,u=i.length;c<u;c++)i[c].setAttributeNS(FL,"href","#"+b);g[e].id=b},n=0,r=(g=o.querySelectorAll(m+"[id]")).length;n<r;n++)t(n)}))}o.removeAttribute("xmlns:a");for(var x,k,S=o.querySelectorAll("script"),E=[],_=0,C=S.length;_<C;_++)(k=S[_].getAttribute("type"))&&"application/ecmascript"!==k&&"application/javascript"!==k&&"text/javascript"!==k||((x=S[_].innerText||S[_].textContent)&&E.push(x),o.removeChild(S[_]));if(E.length>0&&("always"===t||"once"===t&&!zL[l])){for(var O=0,N=E.length;O<N;O++)new Function(E[O])(window);zL[l]=!0}var P=o.querySelectorAll("style");if(Array.prototype.forEach.call(P,(function(e){e.textContent+=""})),o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("xmlns:xlink",FL),i(o),!e.parentNode)return LL.splice(LL.indexOf(e),1),e=null,void a(new Error("Parent node is null"));e.parentNode.replaceChild(o,e),LL.splice(LL.indexOf(e),1),e=null,a(null,o)}))}else a(new Error("Invalid data-src or src attribute"))},$L=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],BL="http://www.w3.org/2000/svg",VL="http://www.w3.org/1999/xlink",HL=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).initialState={hasError:!1,isLoading:!0},t.state=t.initialState,t._isMounted=!1,t.reactWrapper=void 0,t.nonReactWrapper=void 0,t.refCallback=function(e){t.reactWrapper=e},t}Kb(t,e);var n=t.prototype;return n.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,l=r.renumerateIRIElements,s=r.src,c=r.title,u=r.useRequestCache,d=this.props.onError,f=this.props.beforeInjection,p=this.props.afterInjection,h=this.props.wrapper;"svg"===h?((t=document.createElementNS(BL,h)).setAttribute("xmlns",BL),t.setAttribute("xmlns:xlink",VL),n=document.createElementNS(BL,h)):(t=document.createElement(h),n=document.createElement(h)),t.appendChild(n),n.dataset.src=s,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,l=n.beforeEach,s=void 0===l?function(){}:l,c=n.cacheRequests,u=void 0===c||c,d=n.evalScripts,f=void 0===d?"never":d,p=n.httpRequestWithCredentials,h=void 0!==p&&p,m=n.renumerateIRIElements,g=void 0===m||m;if(e&&"length"in e)for(var y=0,v=0,b=e.length;v<b;v++)jL(e[v],f,g,u,h,s,(function(t,n){a(t,n),e&&"length"in e&&e.length===++y&&o(y)}));else e?jL(e,f,g,u,h,s,(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{p(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{f(e)}catch(e){m(e)}},cacheRequests:u,evalScripts:i,httpRequestWithCredentials:a,renumerateIRIElements:l})}},n.removeSVG=function(){var e;null!=(e=this.nonReactWrapper)&&e.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},n.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},n.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})(nm({},e),this.props)&&this.setState((function(){return t.initialState}),(function(){t.removeSVG(),t.renderSVG()}))},n.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},n.render=function(){var e=this.props;e.afterInjection,e.beforeInjection,e.desc,e.evalScripts;var t=e.fallback;e.httpRequestWithCredentials;var n=e.loading;e.renumerateIRIElements,e.src,e.title,e.useRequestCache;var r=e.wrapper,o=Wb(e,$L),i=r;return s.createElement(i,nm({},o,{ref:this.refCallback},"svg"===r?{xmlns:BL,xmlnsXlink:VL}:{}),this.state.isLoading&&n&&s.createElement(n,null),this.state.hasError&&t&&s.createElement(t,null))},t}(s.Component);HL.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"},HL.propTypes={afterInjection:Ap.func,beforeInjection:Ap.func,desc:Ap.string,evalScripts:Ap.oneOf(["always","once","never"]),fallback:Ap.oneOfType([Ap.func,Ap.object,Ap.string]),httpRequestWithCredentials:Ap.bool,loading:Ap.oneOfType([Ap.func,Ap.object,Ap.string]),onError:Ap.func,renumerateIRIElements:Ap.bool,src:Ap.string.isRequired,title:Ap.string,useRequestCache:Ap.bool,wrapper:Ap.oneOf(["div","span","svg"])};const UL=({value:e,renderoptions:t})=>(void 0===t&&(t={}),void 0===t.format&&(t.format="jpeg"),s.createElement("img",{src:"data:image/"+t.format+";base64, "+e,style:{maxWidth:"100%",maxHeight:"100%"}})),WL=({value:e})=>s.createElement(HL,{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%")}}),qL=({io:e})=>{let t=e.fullvalue;if(null==t&&(t=e.value),void 0===t&&(t=""),"string"!=typeof t||t.length%4!=0)return s.createElement("div",null,t);const n=Math.round(3*t.length/4);return s.createElement("div",null,s.createElement("pre",null,"Bytes(",n,")"))},KL=({io:e})=>{let t=e.fullvalue;return void 0===t&&(t=e.value),void 0===t&&(t={}),s.createElement(kL,{data:t})},XL={float:({io:e,inputconverter:t})=>JI({io:e,inputconverter:t,parser:parseFloat}),int:({io:e,inputconverter:t})=>JI({io:e,inputconverter:t,parser:parseInt}),bool:({io:e,inputconverter:t})=>{const n=s.useContext(Iz),r=void 0===e.value,o=s.useRef(null);s.useEffect((()=>{o.current&&(o.current.indeterminate=r)}),[o,r]);return s.createElement("input",{ref:o,type:"checkbox",className:"styledcheckbox booleaninput",checked:!!t[1](e.value),onChange:r=>{let o=r.target.checked;try{o=t[0](r.target.checked)}catch(r){}n.worker?.set_io_value({nid:e.node,ioid:e.id,value:o,set_default:e.render_options.set_default})},disabled:e.connected})},string:eL,str:eL,color:({io:e})=>{const t=s.useContext(Iz),n=e.value_options?.colorspace||"hex";let r=!1;return"string"!=typeof e.type&&"anyOf"in e.type&&void 0!==e.type.anyOf&&(r=e.type.anyOf.some((e=>"None"===e))),s.createElement(JT,{onChange:r=>{let o="<NoValue>";r&&(o=r[n]?r[n]():r.hex()),null===r&&(o=null),t.worker?.set_io_value({nid:e.node,ioid:e.id,value:o,set_default:e.render_options.set_default})},inicolordata:e.value,allow_null:r,inicolorspace:n})},select:iL,enum:iL,bytes:qL},YL={Inputrenderer:XL,Outputrenderer:{},HandlePreviewRenderer:{bytes:qL},DataOverlayRenderer:{},DataPreviewViewRenderer:{string:({io:e})=>{let t=e.fullvalue;return null==t&&(t=e.value),t=void 0===t?"":JSON.stringify(e.value).replace(/\\n/g,"\n"),s.createElement("div",null,s.createElement("pre",null,t))},table:({io:e})=>{let t=e.fullvalue;return null==t&&(t=e.value),void 0===t&&(t=[]),s.createElement(SL,{tabledata:t})},image:({io:e})=>{let t=e.fullvalue;return null==t&&(t=e.value),void 0===t&&(t=""),s.createElement(UL,{value:t})},svg:({io:e})=>{let t=e.fullvalue;return null==t&&(t=e.value),void 0===t&&(t=""),s.createElement(WL,{value:t})},dict:KL,bytes:qL},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)})`}}},GL=(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}},QL=({children:e,plugins:t,fnrf_zst:n})=>{const[r,o]=s.useReducer(GL,YL),i=(e,t)=>{o({type:"EXTEND_FROM_PLUGIN",payload:{plugin:e},options:t})};return s.useEffect((()=>{for(const e in t){const r=t[e].RendererPlugin;r&&i(r);const o=t[e].renderpluginfactory;o&&i(o({React:u,fnrf_zst:n}))}}),[t]),s.createElement(ZL.Provider,{value:{Inputrenderer:r.Inputrenderer,Outputrenderer:r.Outputrenderer,HandlePreviewRenderer:r.HandlePreviewRenderer,DataOverlayRenderer:r.DataOverlayRenderer,DataPreviewViewRenderer:r.DataPreviewViewRenderer,DataViewRenderer:r.DataViewRenderer,InLineRenderer:r.InLineRenderer,extendInputRenderMapping:(e,t,n)=>{o({type:"EXTEND_INPUT_RENDER",payload:{type:e,component:t},options:n})},extendOutputRenderMapping:(e,t,n)=>{o({type:"EXTEND_OUTPUT_RENDER",payload:{type:e,component:t},options:n})},extendHandlePreviewRenderMapping:(e,t,n)=>{o({type:"EXTEND_HANDLE_PREVIEW_RENDER",payload:{type:e,component:t},options:n})},extendDataOverlayRenderMapping:(e,t,n)=>{o({type:"EXTEND_DATA_OVERLAY_RENDER",payload:{type:e,component:t},options:n})},extendDataPreviewRenderMapping:(e,t,n)=>{o({type:"EXTEND_DATA_PREVIEW_RENDER",payload:{type:e,component:t},options:n})},extendDataViewRenderMapping:(e,t,n)=>{o({type:"EXTEND_DATA_VIEW_RENDER",payload:{type:e,component:t},options:n})},extendFromPlugin:i}},e)},ZL=s.createContext({Inputrenderer:YL.Inputrenderer,Outputrenderer:YL.Outputrenderer,HandlePreviewRenderer:YL.HandlePreviewRenderer,DataOverlayRenderer:YL.DataOverlayRenderer,DataPreviewViewRenderer:YL.DataPreviewViewRenderer,DataViewRenderer:YL.DataViewRenderer,InLineRenderer:YL.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)=>{}}),JL=({component:e,...t})=>s.createElement(e,{...t}),ez=e=>{const t=s.useContext(Iz).render_options(),[n]=tz(e.type,t.typemap||{});if(!n)return KL;const{DataOverlayRenderer:r,DataPreviewViewRenderer:o}=s.useContext(ZL);return r[n]?r[n]:o[n]?o[n]:KL},tz=(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=>tz(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]},nz=({io:e,typestring:t,preview:n,...r})=>{const[o,i]=s.useState(!1),[a,l]=s.useState(!1),[c,u]=e?(e=>{const t=s.useContext(Iz).render_options(),[n]=tz(e.type,t.typemap||{}),{HandlePreviewRenderer:r,DataPreviewViewRenderer:o}=s.useContext(ZL),i=ez(e);return n?r[n]?[r[n],i]:o[n]?[o[n],i]:[KL,i]:[KL,i]})(e):[void 0,void 0];return s.createElement(sT,null,s.createElement(cT,{open:o||a,onOpenChange:l},s.createElement(uT,{asChild:!0},s.createElement(pi,{id:e.id,"data-type":t,...r})),s.createElement(dT,null,s.createElement(fT,{className:"iotooltipcontent",sideOffset:5},s.createElement("div",{className:"iotooltip_container"},s.createElement("div",{className:"iotooltip_header"},o?s.createElement(ub,{onClick:()=>i(!1)}):s.createElement(cb,{onClick:()=>i(!0)}),u&&s.createElement(_w,{title:e.full_id,trigger:s.createElement(db,null),onOpenChange:t=>{t&&e.try_get_full_value&&e.try_get_full_value(),i(t)}},s.createElement(JL,{component:u,io:e}))),c?s.createElement(JL,{component:c,io:e}):`no preview available for "${t}"`),s.createElement(pT,{className:"iotooltipcontentarrow"})))))},rz={"":[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)]},oz=({io:e})=>{const t=s.useContext(Iz).render_options(),[n,r]=tz(e.render_options.type,t.typemap||{}),{Inputrenderer:o}=s.useContext(ZL),i=n?e.value_options?.options?iL:o[n]:void 0,a=rz[(r&&t.inputconverter?.[r])??""];return s.createElement("div",{className:"nodeinput","data-type":n},s.createElement(nz,{io:e,typestring:n,position:Po.Left,type:"target"}),i&&s.createElement("div",{className:"iovaluefield nodrag","data-type":n},s.createElement(i,{io:e,inputconverter:a})),s.createElement("div",{className:"ioname"},e.name),s.createElement(nz,{io:e,typestring:n,position:Po.Right,type:"source"}))},iz=({io:e,typestring:t})=>{const{InLineRenderer:n}=s.useContext(ZL);if(t&&n[t])return s.createElement("div",null,n[t]({io:e}));let r=e.fullvalue;return null==r&&(r=e.value),r=void 0===r?"":JSON.stringify(r).replace(/\\n/g,"\n"),r.length>63&&(r=r.slice(0,60)+"..."),s.createElement("div",null,r)},az=({io:e})=>{const t=s.useContext(Iz).render_options(),[n]=tz(e.type,t.typemap||{}),{Outputrenderer:r}=s.useContext(ZL),o=n?r[n]:void 0;return s.createElement("div",{className:"nodeoutput","data-type":n},s.createElement(nz,{io:e,typestring:n,position:Po.Right,type:"source"}),s.createElement("div",{className:"ioname"},e.name),o?s.createElement("div",{className:"iovaluefield nodrag"},s.createElement(o,{io:e})):s.createElement("div",{className:"iovaluefield"},s.createElement(iz,{io:e,typestring:n})))};function lz(e){return`${Math.floor(e/60)}:${Math.floor(e%60).toString().padStart(2,"0")}`}function sz(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 cz=({state:e,className:t="reacttqdm",...n})=>{const r=s.useRef(null),o=s.useRef(null);s.useEffect((()=>{const e=()=>{r.current&&o.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(),l=a.width,s=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>l||u.height>s)&&c>o;)c*=i,t.style.fontSize=c+"px",u=t.getBoundingClientRect()}(r.current,o.current,{maxFontSize:12,decrementFactor:.9})};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[e]);const i=e.total?e.n/e.total*100:0;return s.createElement("div",{ref:r,className:t,...n},s.createElement("div",{style:{position:"relative",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"}},s.createElement("div",{className:t+"-bar",style:{position:"absolute",width:"100%",height:"100%",overflow:"hidden"}},s.createElement("div",{className:t+"-progress",style:{width:`${i}%`,height:"100%"}})),s.createElement("div",{className:t+"-text",ref:o},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:l="",rate:s,postfix:c=null,initial:u=0}=e;null!==t&&n>=t+.5&&(t=null);let d=n,f=t,p=s;r&&!0!==r&&1!==r&&(null!==t&&(f=t*r),d=n*r,void 0!==s&&(p=s*r));const h=lz(o);void 0===p&&o>0&&(p=(d-u)/o);const m=p?1/p:void 0,[g,y]=p?sz(p,a):[void 0,""],[v,b]=m?sz(m,1e3):[void 0,""],w=m&&m>1?v?`${v}${b}s/`+i:"?":(g||"?")+`${y}${i}/s`,x=r?sz(d,a).join(""):d.toString(),k=r&&null!==f?sz(f,a).join(""):f?.toString()??"?",S=p?lz(p&&null!==f?(f-d)/p:0):"?",E=l?`${l}: `:"";if(null!==t){const e=` ${x}/${k} [${h} < ${S}, ${w}${c??""}]`;return`${E}${(d/t*100).toFixed(0)}%${e}`}return`${E}${x}${i} [${h}, ${w}${c??""}]`}(e))))},uz=({node_data:e})=>{const t=s.useContext(Iz);return s.createElement("div",{className:"nodeheader",title:e.description||e.node_name},s.createElement("div",{className:"nodeheader_element"},s.createElement(hb,{fontSize:"inherit",className:"triggerbutton",onClick:()=>{t.on_node_action({type:"trigger",from_remote:!1,id:e.id})}}),s.createElement(pb,{fontSize:"inherit",onClick:async()=>{t.logger.info("nodestatus",await(t.worker?.get_node_status(e.id)))}})),s.createElement("div",{className:"nodeheader_element nodeheader_title"},s.createElement("div",{className:"nodeheader_title_text"},e.node_name)),s.createElement("div",{className:"nodeheader_element"},s.createElement(fb,{fontSize:"inherit"})))},dz=({node_data:e})=>{const t=e.render_options?.data?.src?e.io[e.render_options?.data?.src]:void 0,[n,r]=t?(e=>{const t=s.useContext(Iz).render_options(),[n]=tz(e.type,t.typemap||{}),r=ez(e),{DataPreviewViewRenderer:o,DataViewRenderer:i}=s.useContext(ZL);return n?i[n]?[i[n],r]:o[n]?[o[n],r]:[KL,r]:[KL,r]})(t):[void 0,void 0];return s.createElement("div",{className:"nodrag nodedatabody"},n&&t&&s.createElement(_w,{title:t.full_id,trigger:s.createElement("div",null,s.createElement(JL,{component:n,io:t})),onOpenChange:e=>{e&&t?.try_get_full_value&&t?.try_get_full_value()}},s.createElement(JL,{component:r,io:t})))},fz=({node_data:e})=>{const t=Object.values(e.io).filter((e=>e.is_input)),n=Object.values(e.io).filter((e=>!e.is_input));return e.render_options,s.createElement("div",{className:"nodebody"},n.map((e=>e.hidden?null:s.createElement(az,{key:e.id,io:e}))),s.createElement(dz,{node_data:e}),t.map((e=>e.hidden?null:s.createElement(oz,{key:e.id,io:e}))))},pz=({node_data:e})=>{const[t,n]=s.useState(e.name);s.useEffect((()=>{n(e.name)}),[e]);const r=s.useContext(Iz);return s.createElement("input",{className:"nodename_input",value:t,onChange:e=>{n(e.target.value)},onBlur:t=>{const n=t.target.value;r.on_node_action({type:"update",from_remote:!1,id:e.id,node:{name:n}})}})},hz=({node_data:e})=>e.progress?s.createElement(cz,{style:{height:"idle"===e.progress.prefix?"0px":void 0},state:e.progress,className:"nodeprogress"}):null,mz=({node_data:e})=>s.createElement("div",{className:"nodefooter"},e.error&&s.createElement("div",{className:"nodeerror"},e.error),s.createElement(hz,{node_data:e})),gz=({io:e})=>{const t=s.useContext(Iz).render_options(),[n,r]=tz(e.render_options.type,t.typemap||{}),{Inputrenderer:o}=s.useContext(ZL),i=n?e.value_options?.options?iL:o[n]:void 0,a=rz[(r&&t.inputconverter?.[r])??""];return s.createElement("div",{className:"nodesettings_component"},s.createElement("div",null,e.name),i&&s.createElement(i,{io:e,inputconverter:a}),s.createElement("div",null,s.createElement("label",null,"hidden:",s.createElement("input",{className:"styledcheckbox",type:"checkbox",disabled:e.connected,onChange:t=>{e.set_hidden?.(t.target.checked)},checked:e.hidden}))))},yz=({io:e})=>s.createElement("div",{className:"nodesettings_component"},s.createElement("div",null,e.name),s.createElement("div",null,s.createElement("label",null,"hidden:",s.createElement("input",{className:"styledcheckbox",type:"checkbox",disabled:e.connected,onChange:t=>{e.set_hidden?.(t.target.checked)},checked:e.hidden})))),vz=({nodestore:e})=>{const t=e(),n=Object.values(t.io).filter((e=>e.is_input)),r=Object.values(t.io).filter((e=>!e.is_input));return s.createElement("div",null,s.createElement("div",{className:"nodesettings_section"},s.createElement("div",{className:"nodesettings_component"},s.createElement("div",null,"Name"),s.createElement("div",null,s.createElement(pz,{node_data:t})))),s.createElement("div",{className:"nodesettings_section"},s.createElement("div",null,"Inputs"),n.map((e=>s.createElement(gz,{io:e,key:e.id})))),s.createElement("div",{className:"nodesettings_section"},s.createElement("div",null,"Outputs"),r.map((e=>s.createElement(yz,{io:e,key:e.id})))))},bz=()=>{const e=s.useContext(Iz),t=e.local_state((e=>e.selected_nodes));if(0===t.length)return s.createElement("div",null,"Node Settings");if(t.length>1)return s.createElement("div",null,"Multiple Nodes Selected");const n=e.nodespace.get_node(t[0]);return n?s.createElement(vz,{nodestore:n}):s.createElement("div",null,"Node not found")},wz=()=>{const e=s.useContext(Iz),t=e.local_settings((e=>e.view_settings.expand_node_props)),n=e.local_settings((e=>e.update_view_settings)),r=e=>{n({expand_node_props:e})};return s.createElement("div",{className:"nodesettings_container"},s.createElement("div",{className:"nodesettings_expander"},t?s.createElement(sb,{onClick:()=>{r(!1)}}):s.createElement(mb,{onClick:()=>{r(!0)}})),s.createElement("div",{className:"nodesettings_content "+(t?"expanded":"collapsed")},t&&s.createElement(bz,null)))},xz=e=>({nodes:e.nodes,edges:e.edges,onNodesChange:e.onNodesChange,onEdgesChange:e.onEdgesChange,onConnect:e.onConnect}),kz={default:({data:e})=>{const t=e.UseNodeStore(),n=t.frontend.collapsed||!1,{visualTrigger:r}=(e=>{const t=s.useContext(Iz),[n,r]=s.useState(!1);return s.useEffect((()=>{t.worker?.call_hooks("node_mounted",e.id)}),[t.worker,e.id]),s.useEffect((()=>{let t;return e.in_trigger&&!n?r(!0):n&&(t=setTimeout((()=>r(!1)),200)),()=>clearTimeout(t)}),[e.in_trigger,n]),{visualTrigger:n}})(t);return s.createElement(s.Fragment,null,s.createElement("div",{className:"innernode"+(r?" intrigger":"")+(t.error?" error":"")},s.createElement(uz,{node_data:t}),s.createElement(pz,{node_data:t}),n?null:s.createElement(fz,{node_data:t}),s.createElement(mz,{node_data:t})))}},Sz={default:({id:e,sourceX:t,sourceY:n,targetX:r,targetY:o,sourcePosition:i,targetPosition:a,data:l,...c})=>{const[u]=Vo({sourceX:t,sourceY:n,sourcePosition:i,targetX:r,targetY:o,targetPosition:a});return s.createElement(s.Fragment,null,s.createElement(wo,{id:e,path:u,...c}))}},Ez=()=>{const e=Qi();return s.useContext(Iz).rf_instance=e,s.createElement(s.Fragment,null)},_z=()=>{const e=s.useContext(Iz),t=Fi("Delete"),n=Yr(Cl,q),r=Yr(_l,q);if(t){for(const t of n)if(t.selected){if(!e.worker)return s.createElement(s.Fragment,null);if(!t.source||!t.target)return s.createElement(s.Fragment,null);if(!t.sourceHandle||!t.targetHandle)return s.createElement(s.Fragment,null);e.worker.remove_edge({src_nid:t.source,src_ioid:t.sourceHandle,trg_nid:t.target,trg_ioid:t.targetHandle})}for(const t of r)if(t.selected){if(!e.worker)return s.createElement(s.Fragment,null);e.worker.remove_node(t.id)}}return s.createElement(s.Fragment,null)},Cz=({id:e,top:t,left:n,right:r,bottom:o,...i})=>{const{getNode:a,setNodes:l,addNodes:c,setEdges:u}=Qi(),d=s.useContext(Iz),f=s.useCallback((()=>{const t=a(e);if(!t)return;const n={x:t.position.x+50,y:t.position.y+50};c({...t,id:`${t.id}-copy`,position:n})}),[e,a,c]),p=s.useCallback((()=>{d.on_node_action({type:"delete",id:e,from_remote:!1})}),[e,l,u]),h=d.nodespace.get_node(e,!1);if(!h)return s.createElement(s.Fragment,null," ");const m=h();return s.createElement("div",{style:{top:t,left:n,right:r,bottom:o},className:"context-menu",...i},s.createElement("p",{style:{fontWeight:"bold"}},s.createElement("small",null,m.name)),s.createElement("button",{onClick:f},"duplicate"),s.createElement("button",{onClick:p},"delete"))},Oz=e=>{const t=s.useContext(Iz),n=s.useRef(null);s.useEffect((()=>{t.reactflowRef=n.current}),[n]);const[r,o]=s.useState(null),i=s.useCallback((()=>o(null)),[o]),{nodes:a,edges:l,onNodesChange:c,onEdgesChange:u,onConnect:d}=t.useReactFlowStore(TM(xz));return s.createElement("div",{className:"reactflowlayer"},s.createElement(El,{nodes:a,edges:l,onNodesChange:c,onEdgesChange:u,onConnect:d,nodeTypes:kz,edgeTypes:Sz,minZoom:e.minZoom,maxZoom:e.maxZoom,fitView:!0,onSelectionChange:({nodes:e,edges:n})=>{const r=t.local_state.getState();t.local_state.setState({...r,selected_nodes:e.map((e=>e.id)),selected_edges:n.map((e=>e.id))})},ref:n,onPaneClick:i,panOnDrag:!e.static},s.createElement(Ez,null),s.createElement(_z,null),s.createElement(Hl,{color:"#888",gap:16,size:1}),e.minimap&&s.createElement(Ll,{nodeStrokeWidth:3,pannable:!e.static,zoomable:!e.static,zoomStep:3}),r&&s.createElement(Cz,{onClick:i,...r})))},Nz=s.createContext(void 0),Pz=s.forwardRef(((e,t)=>{const{asChild:n,children:r,className:o,style:i,...a}=e,[l,c]=s.useState(!1),u=s.useRef(null),[d,f]=s.useState(null),[p,h]=s.useState({}),m=e.htime||300,g=e.vtime||300,y=e.hdelay||0,v=e.vdelay||200;s.useImperativeHandle(t,(()=>u.current),[]);let b;if(n&&s.isValidElement(r)){const e=r,t=[e.props.className,o,"smooth-expand",l?"smooth-expand-expanded":""].filter(Boolean).join(" "),n={...e.props.style,...i,...p};b=s.cloneElement(e,{ref:u,className:t,style:n,...a})}else b=s.createElement("div",{ref:u,...a,className:`smooth-expand ${l?"smooth-expand-expanded":""} ${o||""}`,style:{...i,...p}},r);const w=s.createElement(Nz.Provider,{value:{isExpanded:l,toggleExpand:async()=>{u.current&&(l?await(async()=>{if(!u.current)return;if(!d)return;const e={transitionProperty:"width, left, height, top",transitionDuration:`${m}ms, ${m}ms, ${g}ms, ${g}ms`};h((t=>({...t,...e})));const[t,n,r,o]=d,i=new Promise((e=>{setTimeout((()=>{h((e=>({...e,left:`${t}px`,width:`${r}px`}))),e()}),v)})),a=new Promise((e=>{setTimeout((()=>{h((e=>({...e,top:`${n}px`,height:`${o}px`}))),e()}),y)})),l=Math.max(m+y,g+v),s=new Promise((e=>{setTimeout((()=>{e()}),l)}));await Promise.all([i,a,s]),u.current.style.transition="",h({}),c(!1)})():await(async()=>{if(!u.current)return;u.current.style.transition="none",u.current.style.position="",u.current.style.top="",u.current.style.left="",u.current.style.width="",u.current.style.height="";const e=u.current.getBoundingClientRect();f([e.left,e.top,e.width,e.height]),u.current.style.transition="none",h({position:"absolute",top:`${e.top}px`,left:`${e.left}px`,width:`${e.width}px`,height:`${e.height}px`}),h((e=>({...e,transitionProperty:"width, left, height, top",transitionDuration:`${m}ms, ${m}ms, ${g}ms, ${g}ms`}))),c(!0);const t=new Promise((e=>{setTimeout((()=>{h((e=>({...e,left:"0px",width:"100vw"}))),e()}),y)})),n=new Promise((e=>{setTimeout((()=>{h((e=>({...e,top:"0px",height:"100vh"}))),e()}),v)})),r=Math.max(m+y,g+v),o=new Promise((e=>{setTimeout((()=>{e()}),r)}));await Promise.all([t,n,o])})())}}},b);return l?Lr.createPortal(w,document.body):w}));Pz.Trigger=function({children:e}){const t=s.useContext(Nz);if(!t)throw new Error("SmoothExpandComponent.Trigger must be used within a SmoothExpandComponent");return s.createElement("div",{style:{cursor:"pointer"},onClick:t.toggleExpand},e)},Pz.Expanded=function({children:e}){const t=s.useContext(Nz);if(!t)throw new Error("SmoothExpandComponent.Expanded must be used within a SmoothExpandComponent");return t.isExpanded?s.createElement(s.Fragment,null,e):null},Pz.Collapsed=function({children:e}){const t=s.useContext(Nz);if(!t)throw new Error("SmoothExpandComponent.Collapsed must be used within a SmoothExpandComponent");return t.isExpanded?null:s.createElement(s.Fragment,null,e)};const Rz=s.createContext(void 0),Mz=s.forwardRef(((e,t)=>{const{asChild:n,children:r,className:o,style:i,...a}=e,l=s.useRef(null);s.useImperativeHandle(t,(()=>l.current),[]);const[c,u]=s.useState(!1),d=s.useCallback((async()=>{try{const e=l.current;if(!e)return;if(c){const e=document;e.exitFullscreen?await e.exitFullscreen():e.mozCancelFullScreen?await e.mozCancelFullScreen():e.webkitExitFullscreen?await e.webkitExitFullscreen():e.msExitFullscreen&&await e.msExitFullscreen(),u(!1)}else e.requestFullscreen?await e.requestFullscreen():e.mozRequestFullScreen?await e.mozRequestFullScreen():e.webkitRequestFullscreen?await e.webkitRequestFullscreen():e.msRequestFullscreen&&await e.msRequestFullscreen(),u(!0)}catch(e){console.error("Error toggling fullscreen",e)}}),[c]);let f;if(s.useEffect((()=>{const e=()=>{const e=document.fullscreenElement;u(!!e)};return document.addEventListener("fullscreenchange",e),document.addEventListener("webkitfullscreenchange",e),document.addEventListener("mozfullscreenchange",e),document.addEventListener("MSFullscreenChange",e),()=>{document.removeEventListener("fullscreenchange",e),document.removeEventListener("webkitfullscreenchange",e),document.removeEventListener("mozfullscreenchange",e),document.removeEventListener("MSFullscreenChange",e)}}),[]),n&&s.isValidElement(r)){const e=r,t=[e.props.className,o].filter(Boolean).join(" "),n={...e.props.style,...i};f=s.cloneElement(e,{ref:l,className:t,style:n,...a})}else f=s.createElement("div",{ref:l,...a,className:o,style:i},r);return s.createElement(Rz.Provider,{value:{isFullScreen:c,toggleFullscreen:d}},f)}));Mz.Trigger=function({children:e}){const t=s.useContext(Rz);if(!t)throw new Error("FullScreenComponent.Trigger must be used within a FullScreenComponent");return s.createElement("div",{style:{cursor:"pointer"},onClick:t.toggleFullscreen},e)},Mz.InFullScreen=function({children:e}){const t=s.useContext(Rz);if(!t)throw new Error("FullScreenComponent.Expanded must be used within a FullScreenComponent");return t.isFullScreen?s.createElement(s.Fragment,null,e):null},Mz.OutFullScreen=function({children:e}){const t=s.useContext(Rz);if(!t)throw new Error("FullScreenComponent.Collapsed must be used within a FullScreenComponent");return t.isFullScreen?null:s.createElement(s.Fragment,null,e)};const Tz=({fnrf_zst:e,header:t,flow:n,library:r})=>{const[o,i]=s.useState(e.options.worker);e.workermanager&&(e.workermanager.on_setWorker=i),e.set_worker(o),e.auto_progress();const a=e.plugins();return s.createElement(QL,{plugins:a,fnrf_zst:e},s.createElement(Iz.Provider,{value:e},s.createElement(Pz,{asChild:!0},s.createElement(Mz,{asChild:!0},s.createElement("div",{className:"funcnodesreactflowcontainer funcnodescontainer"},t.show&&s.createElement(KE,{...t}),s.createElement("div",{className:"funcnodesreactflowbody"},o&&r.show&&s.createElement(RM,null),s.createElement(Oz,{...n}),o&&n.showNodeSettings&&s.createElement(wz,null)),s.createElement("div",{className:"funcnodesflaotingmenu"},s.createElement(Mz.OutFullScreen,null,n.allowExpand&&s.createElement(Pz.Trigger,null,s.createElement(Pz.Expanded,null,s.createElement(Sw,null)),s.createElement(Pz.Collapsed,null,s.createElement(Ew,null)))),n.allowFullScreen&&s.createElement(Mz.Trigger,null,s.createElement(Mz.OutFullScreen,null,s.createElement(db,null)),s.createElement(Mz.InFullScreen,null,s.createElement(kw,null)))))))))},Az={},Dz={id:"",debug:!1,useWorkerManager:!0,show_library:!0,header:{show:!0,showmenu:!0},flow:{minimap:!0,static:!1,minZoom:.1,maxZoom:5,allowFullScreen:!0,allowExpand:!0,showNodeSettings:!0},library:{show:!0}},Iz=s.createContext(es(Dz)),Lz=e=>{let t=A(e,{...Dz,id:Pu()}).new_obj;if(!t.useWorkerManager&&void 0===t.worker)return s.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 s.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=Az),void 0===Az[t.id]){const e=es(t);Az[t.id]=e}if(t.worker&&t.worker.set_zustand(Az[t.id]),Az[t.id].options.debug=t.debug,t.useWorkerManager){const e=new Tu(t.workermanager_url,Az[t.id]);Az[t.id].workermanager=e}return s.createElement(Tz,{fnrf_zst:Az[t.id],header:t.header,library:t.library,flow:t.flow})},zz=e=>{const t=new Ql("FuncNodes",e.debug?"debug":"info");t.debug("Initalizing FuncNodes with props:",e);let n=A(e,{...Dz,id:Pu()}).new_obj;if(void 0===e.worker&&void 0!==e.worker_url&&(n.useWorkerManager=!1,n.worker=new Mu({url:e.worker_url,uuid:n.id,on_sync_complete:n.on_sync_complete})),void 0!==n.worker){const e=es(n);n.worker.set_zustand(e)}if(void 0!==e.fnw_url){if(void 0===n.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),r=n.worker.on_sync_complete,o=async e=>{const n=await t;e.on_sync_complete=r,await e.update_from_export(n)};n.worker.on_sync_complete=o}return t.debug("Initalizing FuncnodesReactFlow with props:",n),s.createElement("div",{className:"FuncnodesApp"},s.createElement(Lz,{...n}))};var Fz,jz,$z,Bz,Vz={exports:{}},Hz={},Uz={exports:{}},Wz={};function qz(){return jz||(jz=1,Uz.exports=(Fz||(Fz=1,function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<o(i,t)))break e;e[r]=t,e[n]=i,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,a=i>>>1;r<a;){var l=2*(r+1)-1,s=e[l],c=l+1,u=e[c];if(0>o(s,n))c<i&&0>o(u,s)?(e[r]=u,e[c]=n,r=c):(e[r]=s,e[l]=n,r=l);else{if(!(c<i&&0>o(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(e.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var s=[],c=[],u=1,d=null,f=3,p=!1,h=!1,m=!1,g="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,v="undefined"!=typeof setImmediate?setImmediate:null;function b(e){for(var o=n(c);null!==o;){if(null===o.callback)r(c);else{if(!(o.startTime<=e))break;r(c),o.sortIndex=o.expirationTime,t(s,o)}o=n(c)}}function w(e){if(m=!1,b(e),!h)if(null!==n(s))h=!0,R();else{var t=n(c);null!==t&&M(w,t.startTime-e)}}var x,k=!1,S=-1,E=5,_=-1;function C(){return!(e.unstable_now()-_<E)}function O(){if(k){var t=e.unstable_now();_=t;var o=!0;try{e:{h=!1,m&&(m=!1,y(S),S=-1),p=!0;var i=f;try{t:{for(b(t),d=n(s);null!==d&&!(d.expirationTime>t&&C());){var a=d.callback;if("function"==typeof a){d.callback=null,f=d.priorityLevel;var l=a(d.expirationTime<=t);if(t=e.unstable_now(),"function"==typeof l){d.callback=l,b(t),o=!0;break t}d===n(s)&&r(s),b(t)}else r(s);d=n(s)}if(null!==d)o=!0;else{var u=n(c);null!==u&&M(w,u.startTime-t),o=!1}}break e}finally{d=null,f=i,p=!1}o=void 0}}finally{o?x():k=!1}}}if("function"==typeof v)x=function(){v(O)};else if("undefined"!=typeof MessageChannel){var N=new MessageChannel,P=N.port2;N.port1.onmessage=O,x=function(){P.postMessage(null)}}else x=function(){g(O,0)};function R(){k||(k=!0,x())}function M(t,n){S=g((function(){t(e.unstable_now())}),n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){h||p||(h=!0,R())},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(s)},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,o,i){var a=e.unstable_now();switch(i="object"==typeof i&&null!==i&&"number"==typeof(i=i.delay)&&0<i?a+i:a,r){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}return r={id:u++,callback:o,priorityLevel:r,startTime:i,expirationTime:l=i+l,sortIndex:-1},i>a?(r.sortIndex=i,t(c,r),null===n(s)&&r===n(c)&&(m?(y(S),S=-1):m=!0,M(w,i-a))):(r.sortIndex=l,t(s,r),h||p||(h=!0,R())),r},e.unstable_shouldYield=C,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}}(Wz)),Wz)),Uz.exports}
97
97
  /**
98
98
  * @license React
99
99
  * react-dom-client.production.js
@@ -102,5 +102,5 @@ function(e,t){return Vg(e,t)}(e,{shouldForwardProp:p,label:iy(),...u}),m=e=>{if(
102
102
  *
103
103
  * This source code is licensed under the MIT license found in the
104
104
  * LICENSE file in the root directory of this source tree.
105
- */function Zz(){if(Wz)return Xz;Wz=1;var e=Qz(),t=l(),n=Ir();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}var i=Symbol.for("react.element"),a=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),p=Symbol.for("react.consumer"),h=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),v=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),w=Symbol.for("react.offscreen"),x=Symbol.for("react.memo_cache_sentinel"),k=Symbol.iterator;function S(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=k&&e[k]||e["@@iterator"])?e:null}var E=Symbol.for("react.client.reference");function _(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===E?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case c:return"Fragment";case s:return"Portal";case d:return"Profiler";case u:return"StrictMode";case g:return"Suspense";case y:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case h:return(e.displayName||"Context")+".Provider";case p:return(e._context.displayName||"Context")+".Consumer";case m:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case v:return null!==(t=e.displayName||null)?t:_(e.type)||"Memo";case b:t=e._payload,e=e._init;try{return _(e(t))}catch(e){}}return null}var C,O,N=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=Object.assign;function R(e){if(void 0===C)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);C=t&&t[1]||"",O=-1<e.stack.indexOf("\n at")?" (<anonymous>)":-1<e.stack.indexOf("@")?"@unknown:0:0":""}return"\n"+C+e+O}var M=!1;function T(e,t){if(!e||M)return"";M=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={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]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=r.DetermineComponentFrameRoot(),a=i[0],l=i[1];if(a&&l){var s=a.split("\n"),c=l.split("\n");for(o=r=0;r<s.length&&!s[r].includes("DetermineComponentFrameRoot");)r++;for(;o<c.length&&!c[o].includes("DetermineComponentFrameRoot");)o++;if(r===s.length||o===c.length)for(r=s.length-1,o=c.length-1;1<=r&&0<=o&&s[r]!==c[o];)o--;for(;1<=r&&0<=o;r--,o--)if(s[r]!==c[o]){if(1!==r||1!==o)do{if(r--,0>--o||s[r]!==c[o]){var u="\n"+s[r].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}}while(1<=r&&0<=o);break}}}finally{M=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?R(n):""}function A(e){switch(e.tag){case 26:case 27:case 5:return R(e.type);case 16:return R("Lazy");case 13:return R("Suspense");case 19:return R("SuspenseList");case 0:case 15:return e=T(e.type,!1);case 11:return e=T(e.type.render,!1);case 1:return e=T(e.type,!0);default:return""}}function D(e){try{var t="";do{t+=A(e),e=e.return}while(e);return t}catch(e){return"\nError generating stack: "+e.message+"\n"+e.stack}}function I(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function L(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function z(e){if(I(e)!==e)throw Error(r(188))}function F(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e;for(e=e.child;null!==e;){if(null!==(t=F(e)))return t;e=e.sibling}return null}var j=Array.isArray,$=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B={pending:!1,data:null,method:null,action:null},V=[],H=-1;function U(e){return{current:e}}function W(e){0>H||(e.current=V[H],V[H]=null,H--)}function q(e,t){H++,V[H]=e.current,e.current=t}var K=U(null),X=U(null),Y=U(null),G=U(null);function Q(e,t){switch(q(Y,t),q(X,e),q(K,null),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)&&(t=t.namespaceURI)?Yu(t):0;break;default:if(t=(e=8===e?t.parentNode:t).tagName,e=e.namespaceURI)t=Gu(e=Yu(e),t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}W(K),q(K,t)}function Z(){W(K),W(X),W(Y)}function J(e){null!==e.memoizedState&&q(G,e);var t=K.current,n=Gu(t,e.type);t!==n&&(q(X,e),q(K,n))}function ee(e){X.current===e&&(W(K),W(X)),G.current===e&&(W(G),Id._currentValue=B)}var te=Object.prototype.hasOwnProperty,ne=e.unstable_scheduleCallback,re=e.unstable_cancelCallback,oe=e.unstable_shouldYield,ie=e.unstable_requestPaint,ae=e.unstable_now,le=e.unstable_getCurrentPriorityLevel,se=e.unstable_ImmediatePriority,ce=e.unstable_UserBlockingPriority,ue=e.unstable_NormalPriority,de=e.unstable_LowPriority,fe=e.unstable_IdlePriority,pe=e.log,he=e.unstable_setDisableYieldValue,me=null,ge=null;function ye(e){if("function"==typeof pe&&he(e),ge&&"function"==typeof ge.setStrictMode)try{ge.setStrictMode(me,e)}catch(e){}}var ve=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(be(e)/we|0)|0},be=Math.log,we=Math.LN2;var xe=128,ke=4194304;function Se(e){var t=42&e;if(0!==t)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194176&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ee(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=e.warmLanes;e=0!==e.finishedLanes;var l=134217727&n;return 0!==l?0!==(n=l&~o)?r=Se(n):0!==(i&=l)?r=Se(i):e||0!==(a=l&~a)&&(r=Se(a)):0!==(l=n&~o)?r=Se(l):0!==i?r=Se(i):e||0!==(a=n&~a)&&(r=Se(a)),0===r?0:0!==t&&t!==r&&!(t&o)&&((o=r&-r)>=(a=t&-t)||32===o&&4194176&a)?t:r}function _e(e,t){return!(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function Ce(e,t){switch(e){case 1:case 2:case 4:case 8:return t+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function Oe(){var e=xe;return!(4194176&(xe<<=1))&&(xe=128),e}function Ne(){var e=ke;return!(62914560&(ke<<=1))&&(ke=4194304),e}function Pe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Re(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Me(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-ve(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|4194218&n}function Te(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ve(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}function Ae(e){return 2<(e&=-e)?8<e?134217727&e?32:268435456:8:2}function De(){var e=$.p;return 0!==e?e:void 0===(e=window.event)?32:Gd(e.type)}var Ie=Math.random().toString(36).slice(2),Le="__reactFiber$"+Ie,ze="__reactProps$"+Ie,Fe="__reactContainer$"+Ie,je="__reactEvents$"+Ie,$e="__reactListeners$"+Ie,Be="__reactHandles$"+Ie,Ve="__reactResources$"+Ie,He="__reactMarker$"+Ie;function Ue(e){delete e[Le],delete e[ze],delete e[je],delete e[$e],delete e[Be]}function We(e){var t=e[Le];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Fe]||n[Le]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ld(e);null!==e;){if(n=e[Le])return n;e=ld(e)}return t}n=(e=n).parentNode}return null}function qe(e){if(e=e[Le]||e[Fe]){var t=e.tag;if(5===t||6===t||13===t||26===t||27===t||3===t)return e}return null}function Ke(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e.stateNode;throw Error(r(33))}function Xe(e){var t=e[Ve];return t||(t=e[Ve]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ye(e){e[He]=!0}var Ge=new Set,Qe={};function Ze(e,t){Je(e,t),Je(e+"Capture",t)}function Je(e,t){for(Qe[e]=t,e=0;e<t.length;e++)Ge.add(t[e])}var et=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),tt=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),nt={},rt={};function ot(e,t,n){if(o=t,te.call(rt,o)||!te.call(nt,o)&&(tt.test(o)?rt[o]=!0:(nt[o]=!0,0)))if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":return void e.removeAttribute(t);case"boolean":var r=t.toLowerCase().slice(0,5);if("data-"!==r&&"aria-"!==r)return void e.removeAttribute(t)}e.setAttribute(t,""+n)}var o}function it(e,t,n){if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(t)}e.setAttribute(t,""+n)}}function at(e,t,n,r){if(null===r)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(n)}e.setAttributeNS(t,n,""+r)}}function lt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function st(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function ct(e){e._valueTracker||(e._valueTracker=function(e){var t=st(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function ut(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=st(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function dt(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}var ft=/[\n"\\]/g;function pt(e){return e.replace(ft,(function(e){return"\\"+e.charCodeAt(0).toString(16)+" "}))}function ht(e,t,n,r,o,i,a,l){e.name="",null!=a&&"function"!=typeof a&&"symbol"!=typeof a&&"boolean"!=typeof a?e.type=a:e.removeAttribute("type"),null!=t?"number"===a?(0===t&&""===e.value||e.value!=t)&&(e.value=""+lt(t)):e.value!==""+lt(t)&&(e.value=""+lt(t)):"submit"!==a&&"reset"!==a||e.removeAttribute("value"),null!=t?gt(e,a,lt(t)):null!=n?gt(e,a,lt(n)):null!=r&&e.removeAttribute("value"),null==o&&null!=i&&(e.defaultChecked=!!i),null!=o&&(e.checked=o&&"function"!=typeof o&&"symbol"!=typeof o),null!=l&&"function"!=typeof l&&"symbol"!=typeof l&&"boolean"!=typeof l?e.name=""+lt(l):e.removeAttribute("name")}function mt(e,t,n,r,o,i,a,l){if(null!=i&&"function"!=typeof i&&"symbol"!=typeof i&&"boolean"!=typeof i&&(e.type=i),null!=t||null!=n){if(("submit"===i||"reset"===i)&&null==t)return;n=null!=n?""+lt(n):"",t=null!=t?""+lt(t):n,l||t===e.value||(e.value=t),e.defaultValue=t}r="function"!=typeof(r=null!=r?r:o)&&"symbol"!=typeof r&&!!r,e.checked=l?e.checked:!!r,e.defaultChecked=!!r,null!=a&&"function"!=typeof a&&"symbol"!=typeof a&&"boolean"!=typeof a&&(e.name=a)}function gt(e,t,n){"number"===t&&dt(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function yt(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+lt(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function vt(e,t,n){null==t||((t=""+lt(t))!==e.value&&(e.value=t),null!=n)?e.defaultValue=null!=n?""+lt(n):"":e.defaultValue!==t&&(e.defaultValue=t)}function bt(e,t,n,o){if(null==t){if(null!=o){if(null!=n)throw Error(r(92));if(j(o)){if(1<o.length)throw Error(r(93));o=o[0]}n=o}null==n&&(n=""),t=n}n=lt(t),e.defaultValue=n,(o=e.textContent)===n&&""!==o&&null!==o&&(e.value=o)}function wt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var xt=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function kt(e,t,n){var r=0===t.indexOf("--");null==n||"boolean"==typeof n||""===n?r?e.setProperty(t,""):"float"===t?e.cssFloat="":e[t]="":r?e.setProperty(t,n):"number"!=typeof n||0===n||xt.has(t)?"float"===t?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function St(e,t,n){if(null!=t&&"object"!=typeof t)throw Error(r(62));if(e=e.style,null!=n){for(var o in n)!n.hasOwnProperty(o)||null!=t&&t.hasOwnProperty(o)||(0===o.indexOf("--")?e.setProperty(o,""):"float"===o?e.cssFloat="":e[o]="");for(var i in t)o=t[i],t.hasOwnProperty(i)&&n[i]!==o&&kt(e,i,o)}else for(var a in t)t.hasOwnProperty(a)&&kt(e,a,t[a])}function Et(e){if(-1===e.indexOf("-"))return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var _t=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Ct=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Ot(e){return Ct.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var Nt=null;function Pt(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Rt=null,Mt=null;function Tt(e){var t=qe(e);if(t&&(e=t.stateNode)){var n=e[ze]||null;e:switch(e=t.stateNode,t.type){case"input":if(ht(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+pt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var o=n[t];if(o!==e&&o.form===e.form){var i=o[ze]||null;if(!i)throw Error(r(90));ht(o,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)(o=n[t]).form===e.form&&ut(o)}break e;case"textarea":vt(e,n.value,n.defaultValue);break e;case"select":null!=(t=n.value)&&yt(e,!!n.multiple,t,!1)}}}var At=!1;function Dt(e,t,n){if(At)return e(t,n);At=!0;try{return e(t)}finally{if(At=!1,(null!==Rt||null!==Mt)&&(zc(),Rt&&(t=Rt,e=Mt,Mt=Rt=null,Tt(t),e)))for(t=0;t<e.length;t++)Tt(e[t])}}function It(e,t){var n=e.stateNode;if(null===n)return null;var o=n[ze]||null;if(null===o)return null;n=o[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(o=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!o;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(r(231,t,typeof n));return n}var Lt=!1;if(et)try{var zt={};Object.defineProperty(zt,"passive",{get:function(){Lt=!0}}),window.addEventListener("test",zt,zt),window.removeEventListener("test",zt,zt)}catch(e){Lt=!1}var Ft=null,jt=null,$t=null;function Bt(){if($t)return $t;var e,t,n=jt,r=n.length,o="value"in Ft?Ft.value:Ft.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return $t=o.slice(e,1<t?1-t:void 0)}function Vt(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function Ht(){return!0}function Ut(){return!1}function Wt(e){function t(t,n,r,o,i){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(o):o[a]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?Ht:Ut,this.isPropagationStopped=Ut,this}return P(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Ht)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Ht)},persist:function(){},isPersistent:Ht}),t}var qt,Kt,Xt,Yt={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Gt=Wt(Yt),Qt=P({},Yt,{view:0,detail:0}),Zt=Wt(Qt),Jt=P({},Qt,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:dn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Xt&&(Xt&&"mousemove"===e.type?(qt=e.screenX-Xt.screenX,Kt=e.screenY-Xt.screenY):Kt=qt=0,Xt=e),qt)},movementY:function(e){return"movementY"in e?e.movementY:Kt}}),en=Wt(Jt),tn=Wt(P({},Jt,{dataTransfer:0})),nn=Wt(P({},Qt,{relatedTarget:0})),rn=Wt(P({},Yt,{animationName:0,elapsedTime:0,pseudoElement:0})),on=Wt(P({},Yt,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),an=Wt(P({},Yt,{data:0})),ln={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},sn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},cn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function un(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=cn[e])&&!!t[e]}function dn(){return un}var fn=Wt(P({},Qt,{key:function(e){if(e.key){var t=ln[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Vt(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?sn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:dn,charCode:function(e){return"keypress"===e.type?Vt(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Vt(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),pn=Wt(P({},Jt,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),hn=Wt(P({},Qt,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:dn})),mn=Wt(P({},Yt,{propertyName:0,elapsedTime:0,pseudoElement:0})),gn=Wt(P({},Jt,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),yn=Wt(P({},Yt,{newState:0,oldState:0})),vn=[9,13,27,32],bn=et&&"CompositionEvent"in window,wn=null;et&&"documentMode"in document&&(wn=document.documentMode);var xn=et&&"TextEvent"in window&&!wn,kn=et&&(!bn||wn&&8<wn&&11>=wn),Sn=String.fromCharCode(32),En=!1;function _n(e,t){switch(e){case"keyup":return-1!==vn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Cn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var On=!1;var Nn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Pn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Nn[e.type]:"textarea"===t}function Rn(e,t,n,r){Rt?Mt?Mt.push(r):Mt=[r]:Rt=r,0<(t=Iu(t,"onChange")).length&&(n=new Gt("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Mn=null,Tn=null;function An(e){Ou(e,0)}function Dn(e){if(ut(Ke(e)))return e}function In(e,t){if("change"===e)return t}var Ln=!1;if(et){var zn;if(et){var Fn="oninput"in document;if(!Fn){var jn=document.createElement("div");jn.setAttribute("oninput","return;"),Fn="function"==typeof jn.oninput}zn=Fn}else zn=!1;Ln=zn&&(!document.documentMode||9<document.documentMode)}function $n(){Mn&&(Mn.detachEvent("onpropertychange",Bn),Tn=Mn=null)}function Bn(e){if("value"===e.propertyName&&Dn(Tn)){var t=[];Rn(t,Tn,e,Pt(e)),Dt(An,t)}}function Vn(e,t,n){"focusin"===e?($n(),Tn=n,(Mn=t).attachEvent("onpropertychange",Bn)):"focusout"===e&&$n()}function Hn(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Dn(Tn)}function Un(e,t){if("click"===e)return Dn(t)}function Wn(e,t){if("input"===e||"change"===e)return Dn(t)}var qn="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function Kn(e,t){if(qn(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!te.call(t,o)||!qn(e[o],t[o]))return!1}return!0}function Xn(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Yn(e,t){var n,r=Xn(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Xn(r)}}function Gn(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?Gn(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function Qn(e){for(var t=dt((e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window).document);t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=dt((e=t.contentWindow).document)}return t}function Zn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function Jn(e,t){var n=Qn(t);t=e.focusedElem;var r=e.selectionRange;if(n!==t&&t&&t.ownerDocument&&Gn(t.ownerDocument.documentElement,t)){if(null!==r&&Zn(t))if(e=r.start,void 0===(n=r.end)&&(n=e),"selectionStart"in t)t.selectionStart=e,t.selectionEnd=Math.min(n,t.value.length);else if((n=(e=t.ownerDocument||document)&&e.defaultView||window).getSelection){n=n.getSelection();var o=t.textContent.length,i=Math.min(r.start,o);r=void 0===r.end?i:Math.min(r.end,o),!n.extend&&i>r&&(o=r,r=i,i=o),o=Yn(t,i);var a=Yn(t,r);o&&a&&(1!==n.rangeCount||n.anchorNode!==o.node||n.anchorOffset!==o.offset||n.focusNode!==a.node||n.focusOffset!==a.offset)&&((e=e.createRange()).setStart(o.node,o.offset),n.removeAllRanges(),i>r?(n.addRange(e),n.extend(a.node,a.offset)):(e.setEnd(a.node,a.offset),n.addRange(e)))}for(e=[],n=t;n=n.parentNode;)1===n.nodeType&&e.push({element:n,left:n.scrollLeft,top:n.scrollTop});for("function"==typeof t.focus&&t.focus(),t=0;t<e.length;t++)(n=e[t]).element.scrollLeft=n.left,n.element.scrollTop=n.top}}var er=et&&"documentMode"in document&&11>=document.documentMode,tr=null,nr=null,rr=null,or=!1;function ir(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;or||null==tr||tr!==dt(r)||("selectionStart"in(r=tr)&&Zn(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},rr&&Kn(rr,r)||(rr=r,0<(r=Iu(nr,"onSelect")).length&&(t=new Gt("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=tr)))}function ar(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var lr={animationend:ar("Animation","AnimationEnd"),animationiteration:ar("Animation","AnimationIteration"),animationstart:ar("Animation","AnimationStart"),transitionrun:ar("Transition","TransitionRun"),transitionstart:ar("Transition","TransitionStart"),transitioncancel:ar("Transition","TransitionCancel"),transitionend:ar("Transition","TransitionEnd")},sr={},cr={};function ur(e){if(sr[e])return sr[e];if(!lr[e])return e;var t,n=lr[e];for(t in n)if(n.hasOwnProperty(t)&&t in cr)return sr[e]=n[t];return e}et&&(cr=document.createElement("div").style,"AnimationEvent"in window||(delete lr.animationend.animation,delete lr.animationiteration.animation,delete lr.animationstart.animation),"TransitionEvent"in window||delete lr.transitionend.transition);var dr=ur("animationend"),fr=ur("animationiteration"),pr=ur("animationstart"),hr=ur("transitionrun"),mr=ur("transitionstart"),gr=ur("transitioncancel"),yr=ur("transitionend"),vr=new Map,br="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll scrollEnd toggle touchMove waiting wheel".split(" ");function wr(e,t){vr.set(e,t),Ze(t,[e])}var xr=[],kr=0,Sr=0;function Er(){for(var e=kr,t=Sr=kr=0;t<e;){var n=xr[t];xr[t++]=null;var r=xr[t];xr[t++]=null;var o=xr[t];xr[t++]=null;var i=xr[t];if(xr[t++]=null,null!==r&&null!==o){var a=r.pending;null===a?o.next=o:(o.next=a.next,a.next=o),r.pending=o}0!==i&&Nr(n,o,i)}}function _r(e,t,n,r){xr[kr++]=e,xr[kr++]=t,xr[kr++]=n,xr[kr++]=r,Sr|=r,e.lanes|=r,null!==(e=e.alternate)&&(e.lanes|=r)}function Cr(e,t,n,r){return _r(e,t,n,r),Pr(e)}function Or(e,t){return _r(e,null,null,t),Pr(e)}function Nr(e,t,n){e.lanes|=n;var r=e.alternate;null!==r&&(r.lanes|=n);for(var o=!1,i=e.return;null!==i;)i.childLanes|=n,null!==(r=i.alternate)&&(r.childLanes|=n),22===i.tag&&(null===(e=i.stateNode)||1&e._visibility||(o=!0)),e=i,i=i.return;o&&null!==t&&3===e.tag&&(i=e.stateNode,o=31-ve(n),null===(e=(i=i.hiddenUpdates)[o])?i[o]=[t]:e.push(t),t.lane=536870912|n)}function Pr(e){if(50<Oc)throw Oc=0,Nc=null,Error(r(185));for(var t=e.return;null!==t;)t=(e=t).return;return 3===e.tag?e.stateNode:null}var Rr={},Mr=new WeakMap;function Tr(e,t){if("object"==typeof e&&null!==e){var n=Mr.get(e);return void 0!==n?n:(t={value:e,source:t,stack:D(t)},Mr.set(e,t),t)}return{value:e,source:t,stack:D(t)}}var Ar=[],Dr=0,Lr=null,zr=0,Fr=[],jr=0,$r=null,Br=1,Vr="";function Hr(e,t){Ar[Dr++]=zr,Ar[Dr++]=Lr,Lr=e,zr=t}function Ur(e,t,n){Fr[jr++]=Br,Fr[jr++]=Vr,Fr[jr++]=$r,$r=e;var r=Br;e=Vr;var o=32-ve(r)-1;r&=~(1<<o),n+=1;var i=32-ve(t)+o;if(30<i){var a=o-o%5;i=(r&(1<<a)-1).toString(32),r>>=a,o-=a,Br=1<<32-ve(t)+o|n<<o|r,Vr=i+e}else Br=1<<i|n<<o|r,Vr=e}function Wr(e){null!==e.return&&(Hr(e,1),Ur(e,1,0))}function qr(e){for(;e===Lr;)Lr=Ar[--Dr],Ar[Dr]=null,zr=Ar[--Dr],Ar[Dr]=null;for(;e===$r;)$r=Fr[--jr],Fr[jr]=null,Vr=Fr[--jr],Fr[jr]=null,Br=Fr[--jr],Fr[jr]=null}var Kr=null,Xr=null,Yr=!1,Gr=null,Qr=!1,Zr=Error(r(519));function Jr(e){throw oo(Tr(Error(r(418,"")),e)),Zr}function eo(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Le]=e,t[ze]=r,n){case"dialog":Nu("cancel",t),Nu("close",t);break;case"iframe":case"object":case"embed":Nu("load",t);break;case"video":case"audio":for(n=0;n<_u.length;n++)Nu(_u[n],t);break;case"source":Nu("error",t);break;case"img":case"image":case"link":Nu("error",t),Nu("load",t);break;case"details":Nu("toggle",t);break;case"input":Nu("invalid",t),mt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0),ct(t);break;case"select":Nu("invalid",t);break;case"textarea":Nu("invalid",t),bt(t,r.value,r.defaultValue,r.children),ct(t)}"string"!=typeof(n=r.children)&&"number"!=typeof n&&"bigint"!=typeof n||t.textContent===""+n||!0===r.suppressHydrationWarning||Bu(t.textContent,n)?(null!=r.popover&&(Nu("beforetoggle",t),Nu("toggle",t)),null!=r.onScroll&&Nu("scroll",t),null!=r.onScrollEnd&&Nu("scrollend",t),null!=r.onClick&&(t.onclick=Vu),t=!0):t=!1,t||Jr(e)}function to(e){for(Kr=e.return;Kr;)switch(Kr.tag){case 3:case 27:return void(Qr=!0);case 5:case 13:return void(Qr=!1);default:Kr=Kr.return}}function no(e){if(e!==Kr)return!1;if(!Yr)return to(e),Yr=!0,!1;var t,n=!1;if((t=3!==e.tag&&27!==e.tag)&&((t=5===e.tag)&&(t=!("form"!==(t=e.type)&&"button"!==t)||Qu(e.type,e.memoizedProps)),t=!t),t&&(n=!0),n&&Xr&&Jr(e),to(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(r(317));e:{for(e=e.nextSibling,n=0;e;){if(8===e.nodeType)if("/$"===(t=e.data)){if(0===n){Xr=ad(e.nextSibling);break e}n--}else"$"!==t&&"$!"!==t&&"$?"!==t||n++;e=e.nextSibling}Xr=null}}else Xr=Kr?ad(e.stateNode.nextSibling):null;return!0}function ro(){Xr=Kr=null,Yr=!1}function oo(e){null===Gr?Gr=[e]:Gr.push(e)}var io=Error(r(460)),ao=Error(r(474)),lo={then:function(){}};function so(e){return"fulfilled"===(e=e.status)||"rejected"===e}function co(){}function uo(e,t,n){switch(void 0===(n=e[n])?e.push(t):n!==t&&(t.then(co,co),t=n),t.status){case"fulfilled":return t.value;case"rejected":if((e=t.reason)===io)throw Error(r(483));throw e;default:if("string"==typeof t.status)t.then(co,co);else{if(null!==(e=ec)&&100<e.shellSuspendCounter)throw Error(r(482));(e=t).status="pending",e.then((function(e){if("pending"===t.status){var n=t;n.status="fulfilled",n.value=e}}),(function(e){if("pending"===t.status){var n=t;n.status="rejected",n.reason=e}}))}switch(t.status){case"fulfilled":return t.value;case"rejected":if((e=t.reason)===io)throw Error(r(483));throw e}throw fo=t,io}}var fo=null;function po(){if(null===fo)throw Error(r(459));var e=fo;return fo=null,e}var ho=null,mo=0;function go(e){var t=mo;return mo+=1,null===ho&&(ho=[]),uo(ho,e,t)}function yo(e,t){t=t.props.ref,e.ref=void 0!==t?t:null}function vo(e,t){if(t.$$typeof===i)throw Error(r(525));throw e=Object.prototype.toString.call(t),Error(r(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function bo(e){return(0,e._init)(e._payload)}function wo(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function o(e){for(var t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function i(e,t){return(e=Ls(e,t)).index=0,e.sibling=null,e}function l(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=33554434,n):r:(t.flags|=33554434,n):(t.flags|=1048576,n)}function u(t){return e&&null===t.alternate&&(t.flags|=33554434),t}function d(e,t,n,r){return null===t||6!==t.tag?((t=Bs(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function f(e,t,n,r){var o=n.type;return o===c?m(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===b&&bo(o)===t.type)?(yo(t=i(t,n.props),n),t.return=e,t):(yo(t=Fs(n.type,n.key,n.props,null,e.mode,r),n),t.return=e,t)}function p(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Vs(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function m(e,t,n,r,o){return null===t||7!==t.tag?((t=js(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function g(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t||"bigint"==typeof t)return(t=Bs(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case a:return yo(n=Fs(t.type,t.key,t.props,null,e.mode,n),t),n.return=e,n;case s:return(t=Vs(t,e.mode,n)).return=e,t;case b:return g(e,t=(0,t._init)(t._payload),n)}if(j(t)||S(t))return(t=js(t,e.mode,n,null)).return=e,t;if("function"==typeof t.then)return g(e,go(t),n);if(t.$$typeof===h)return g(e,_l(e,t),n);vo(e,t)}return null}function y(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n||"bigint"==typeof n)return null!==o?null:d(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case a:return n.key===o?f(e,t,n,r):null;case s:return n.key===o?p(e,t,n,r):null;case b:return y(e,t,n=(o=n._init)(n._payload),r)}if(j(n)||S(n))return null!==o?null:m(e,t,n,r,null);if("function"==typeof n.then)return y(e,t,go(n),r);if(n.$$typeof===h)return y(e,t,_l(e,n),r);vo(e,n)}return null}function v(e,t,n,r,o){if("string"==typeof r&&""!==r||"number"==typeof r||"bigint"==typeof r)return d(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case a:return f(t,e=e.get(null===r.key?n:r.key)||null,r,o);case s:return p(t,e=e.get(null===r.key?n:r.key)||null,r,o);case b:return v(e,t,n,r=(0,r._init)(r._payload),o)}if(j(r)||S(r))return m(t,e=e.get(n)||null,r,o,null);if("function"==typeof r.then)return v(e,t,n,go(r),o);if(r.$$typeof===h)return v(e,t,n,_l(t,r),o);vo(t,r)}return null}function w(d,f,p,m){if("object"==typeof p&&null!==p&&p.type===c&&null===p.key&&(p=p.props.children),"object"==typeof p&&null!==p){switch(p.$$typeof){case a:e:{for(var x=p.key;null!==f;){if(f.key===x){if((x=p.type)===c){if(7===f.tag){n(d,f.sibling),(m=i(f,p.props.children)).return=d,d=m;break e}}else if(f.elementType===x||"object"==typeof x&&null!==x&&x.$$typeof===b&&bo(x)===f.type){n(d,f.sibling),yo(m=i(f,p.props),p),m.return=d,d=m;break e}n(d,f);break}t(d,f),f=f.sibling}p.type===c?((m=js(p.props.children,d.mode,m,p.key)).return=d,d=m):(yo(m=Fs(p.type,p.key,p.props,null,d.mode,m),p),m.return=d,d=m)}return u(d);case s:e:{for(x=p.key;null!==f;){if(f.key===x){if(4===f.tag&&f.stateNode.containerInfo===p.containerInfo&&f.stateNode.implementation===p.implementation){n(d,f.sibling),(m=i(f,p.children||[])).return=d,d=m;break e}n(d,f);break}t(d,f),f=f.sibling}(m=Vs(p,d.mode,m)).return=d,d=m}return u(d);case b:return w(d,f,p=(x=p._init)(p._payload),m)}if(j(p))return function(r,i,a,s){for(var c=null,u=null,d=i,f=i=0,p=null;null!==d&&f<a.length;f++){d.index>f?(p=d,d=null):p=d.sibling;var h=y(r,d,a[f],s);if(null===h){null===d&&(d=p);break}e&&d&&null===h.alternate&&t(r,d),i=l(h,i,f),null===u?c=h:u.sibling=h,u=h,d=p}if(f===a.length)return n(r,d),Yr&&Hr(r,f),c;if(null===d){for(;f<a.length;f++)null!==(d=g(r,a[f],s))&&(i=l(d,i,f),null===u?c=d:u.sibling=d,u=d);return Yr&&Hr(r,f),c}for(d=o(d);f<a.length;f++)null!==(p=v(d,r,f,a[f],s))&&(e&&null!==p.alternate&&d.delete(null===p.key?f:p.key),i=l(p,i,f),null===u?c=p:u.sibling=p,u=p);return e&&d.forEach((function(e){return t(r,e)})),Yr&&Hr(r,f),c}(d,f,p,m);if(S(p)){if("function"!=typeof(x=S(p)))throw Error(r(150));return function(i,a,s,c){if(null==s)throw Error(r(151));for(var u=null,d=null,f=a,p=a=0,h=null,m=s.next();null!==f&&!m.done;p++,m=s.next()){f.index>p?(h=f,f=null):h=f.sibling;var b=y(i,f,m.value,c);if(null===b){null===f&&(f=h);break}e&&f&&null===b.alternate&&t(i,f),a=l(b,a,p),null===d?u=b:d.sibling=b,d=b,f=h}if(m.done)return n(i,f),Yr&&Hr(i,p),u;if(null===f){for(;!m.done;p++,m=s.next())null!==(m=g(i,m.value,c))&&(a=l(m,a,p),null===d?u=m:d.sibling=m,d=m);return Yr&&Hr(i,p),u}for(f=o(f);!m.done;p++,m=s.next())null!==(m=v(f,i,p,m.value,c))&&(e&&null!==m.alternate&&f.delete(null===m.key?p:m.key),a=l(m,a,p),null===d?u=m:d.sibling=m,d=m);return e&&f.forEach((function(e){return t(i,e)})),Yr&&Hr(i,p),u}(d,f,p=x.call(p),m)}if("function"==typeof p.then)return w(d,f,go(p),m);if(p.$$typeof===h)return w(d,f,_l(d,p),m);vo(d,p)}return"string"==typeof p&&""!==p||"number"==typeof p||"bigint"==typeof p?(p=""+p,null!==f&&6===f.tag?(n(d,f.sibling),(m=i(f,p)).return=d,d=m):(n(d,f),(m=Bs(p,d.mode,m)).return=d,d=m),u(d)):n(d,f)}return function(e,t,n,r){try{mo=0;var o=w(e,t,n,r);return ho=null,o}catch(t){if(t===io)throw t;var i=Ds(29,t,null,e.mode);return i.lanes=r,i.return=e,i}}}var xo=wo(!0),ko=wo(!1),So=U(null),Eo=U(0);function _o(e,t){q(Eo,e=sc),q(So,t),sc=e|t.baseLanes}function Co(){q(Eo,sc),q(So,So.current)}function Oo(){sc=Eo.current,W(So),W(Eo)}var No=U(null),Po=null;function Ro(e){var t=e.alternate;q(Do,1&Do.current),q(No,e),null===Po&&(null===t||null!==So.current||null!==t.memoizedState)&&(Po=e)}function Mo(e){if(22===e.tag){if(q(Do,Do.current),q(No,e),null===Po){var t=e.alternate;null!==t&&null!==t.memoizedState&&(Po=e)}}else To()}function To(){q(Do,Do.current),q(No,No.current)}function Ao(e){W(No),Po===e&&(Po=null),W(Do)}var Do=U(0);function Io(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Lo="undefined"!=typeof AbortController?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach((function(e){return e()}))}},zo=e.unstable_scheduleCallback,Fo=e.unstable_NormalPriority,jo={$$typeof:h,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function $o(){return{controller:new Lo,data:new Map,refCount:0}}function Bo(e){e.refCount--,0===e.refCount&&zo(Fo,(function(){e.controller.abort()}))}var Vo=null,Ho=0,Uo=0,Wo=null;function qo(){if(0==--Ho&&null!==Vo){null!==Wo&&(Wo.status="fulfilled");var e=Vo;Vo=null,Uo=0,Wo=null;for(var t=0;t<e.length;t++)(0,e[t])()}}var Ko=N.S;N.S=function(e,t){"object"==typeof t&&null!==t&&"function"==typeof t.then&&function(e,t){if(null===Vo){var n=Vo=[];Ho=0,Uo=wu(),Wo={status:"pending",value:void 0,then:function(e){n.push(e)}}}Ho++,t.then(qo,qo)}(0,t),null!==Ko&&Ko(e,t)};var Xo=U(null);function Yo(){var e=Xo.current;return null!==e?e:ec.pooledCache}function Go(e,t){q(Xo,null===t?Xo.current:t.pool)}function Qo(){var e=Yo();return null===e?null:{parent:jo._currentValue,pool:e}}var Zo=0,Jo=null,ei=null,ti=null,ni=!1,ri=!1,oi=!1,ii=0,ai=0,li=null,si=0;function ci(){throw Error(r(321))}function ui(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!qn(e[n],t[n]))return!1;return!0}function di(e,t,n,r,o,i){return Zo=i,Jo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,N.H=null===e||null===e.memoizedState?_a:Ca,oi=!1,i=n(r,o),oi=!1,ri&&(i=pi(t,n,r,o)),fi(e),i}function fi(e){N.H=Ea;var t=null!==ei&&null!==ei.next;if(Zo=0,ti=ei=Jo=null,ni=!1,ai=0,li=null,t)throw Error(r(300));null===e||Ha||null!==(e=e.dependencies)&&kl(e)&&(Ha=!0)}function pi(e,t,n,o){Jo=e;var i=0;do{if(ri&&(li=null),ai=0,ri=!1,25<=i)throw Error(r(301));if(i+=1,ti=ei=null,null!=e.updateQueue){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,null!=a.memoCache&&(a.memoCache.index=0)}N.H=Oa,a=t(n,o)}while(ri);return a}function hi(){var e=N.H,t=e.useState()[0];return t="function"==typeof t.then?wi(t):t,e=e.useState()[0],(null!==ei?ei.memoizedState:null)!==e&&(Jo.flags|=1024),t}function mi(){var e=0!==ii;return ii=0,e}function gi(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function yi(e){if(ni){for(e=e.memoizedState;null!==e;){var t=e.queue;null!==t&&(t.pending=null),e=e.next}ni=!1}Zo=0,ti=ei=Jo=null,ri=!1,ai=ii=0,li=null}function vi(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ti?Jo.memoizedState=ti=e:ti=ti.next=e,ti}function bi(){if(null===ei){var e=Jo.alternate;e=null!==e?e.memoizedState:null}else e=ei.next;var t=null===ti?Jo.memoizedState:ti.next;if(null!==t)ti=t,ei=e;else{if(null===e){if(null===Jo.alternate)throw Error(r(467));throw Error(r(310))}e={memoizedState:(ei=e).memoizedState,baseState:ei.baseState,baseQueue:ei.baseQueue,queue:ei.queue,next:null},null===ti?Jo.memoizedState=ti=e:ti=ti.next=e}return ti}function wi(e){var t=ai;return ai+=1,null===li&&(li=[]),e=uo(li,e,t),t=Jo,null===(null===ti?t.memoizedState:ti.next)&&(t=t.alternate,N.H=null===t||null===t.memoizedState?_a:Ca),e}function xi(e){if(null!==e&&"object"==typeof e){if("function"==typeof e.then)return wi(e);if(e.$$typeof===h)return El(e)}throw Error(r(438,String(e)))}function ki(e){var t=null,n=Jo.updateQueue;if(null!==n&&(t=n.memoCache),null==t){var r=Jo.alternate;null!==r&&(null!==(r=r.updateQueue)&&(null!=(r=r.memoCache)&&(t={data:r.data.map((function(e){return e.slice()})),index:0})))}if(null==t&&(t={data:[],index:0}),null===n&&(n={lastEffect:null,events:null,stores:null,memoCache:null},Jo.updateQueue=n),n.memoCache=t,void 0===(n=t.data[t.index]))for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=x;return t.index++,n}function Si(e,t){return"function"==typeof t?t(e):t}function Ei(e){return _i(bi(),ei,e)}function _i(e,t,n){var o=e.queue;if(null===o)throw Error(r(311));o.lastRenderedReducer=n;var i=e.baseQueue,a=o.pending;if(null!==a){if(null!==i){var l=i.next;i.next=a.next,a.next=l}t.baseQueue=i=a,o.pending=null}if(a=e.baseState,null===i)e.memoizedState=a;else{var s=l=null,c=null,u=t=i.next,d=!1;do{var f=-536870913&u.lane;if(f!==u.lane?(nc&f)===f:(Zo&f)===f){var p=u.revertLane;if(0===p)null!==c&&(c=c.next={lane:0,revertLane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Uo&&(d=!0);else{if((Zo&p)===p){u=u.next,p===Uo&&(d=!0);continue}f={lane:0,revertLane:u.revertLane,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},null===c?(s=c=f,l=a):c=c.next=f,Jo.lanes|=p,uc|=p}f=u.action,oi&&n(a,f),a=u.hasEagerState?u.eagerState:n(a,f)}else p={lane:f,revertLane:u.revertLane,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},null===c?(s=c=p,l=a):c=c.next=p,Jo.lanes|=f,uc|=f;u=u.next}while(null!==u&&u!==t);if(null===c?l=a:c.next=s,!qn(a,e.memoizedState)&&(Ha=!0,d&&null!==(n=Wo)))throw n;e.memoizedState=a,e.baseState=l,e.baseQueue=c,o.lastRenderedState=a}return null===i&&(o.lanes=0),[e.memoizedState,o.dispatch]}function Ci(e){var t=bi(),n=t.queue;if(null===n)throw Error(r(311));n.lastRenderedReducer=e;var o=n.dispatch,i=n.pending,a=t.memoizedState;if(null!==i){n.pending=null;var l=i=i.next;do{a=e(a,l.action),l=l.next}while(l!==i);qn(a,t.memoizedState)||(Ha=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,o]}function Oi(e,t,n){var o=Jo,i=bi(),a=Yr;if(a){if(void 0===n)throw Error(r(407));n=n()}else n=t();var l=!qn((ei||i).memoizedState,n);if(l&&(i.memoizedState=n,Ha=!0),i=i.queue,Zi(Ri.bind(null,o,i,e),[e]),i.getSnapshot!==t||l||null!==ti&&1&ti.memoizedState.tag){if(o.flags|=2048,Ki(9,Pi.bind(null,o,i,n,t),{destroy:void 0},null),null===ec)throw Error(r(349));a||60&Zo||Ni(o,t,n)}return n}function Ni(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=Jo.updateQueue)?(t={lastEffect:null,events:null,stores:null,memoCache:null},Jo.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Pi(e,t,n,r){t.value=n,t.getSnapshot=r,Mi(t)&&Ti(e)}function Ri(e,t,n){return n((function(){Mi(t)&&Ti(e)}))}function Mi(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!qn(e,n)}catch(e){return!0}}function Ti(e){var t=Or(e,2);null!==t&&Mc(t,e,2)}function Ai(e){var t=vi();if("function"==typeof e){var n=e;if(e=n(),oi){ye(!0);try{n()}finally{ye(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Si,lastRenderedState:e},t}function Di(e,t,n,r){return e.baseState=n,_i(e,ei,"function"==typeof r?r:Si)}function Ii(e,t,n,o,i){if(xa(e))throw Error(r(485));if(null!==(e=t.action)){var a={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(e){a.listeners.push(e)}};null!==N.T?n(!0):a.isTransition=!1,o(a),null===(n=t.pending)?(a.next=t.pending=a,Li(t,a)):(a.next=n.next,t.pending=n.next=a)}}function Li(e,t){var n=t.action,r=t.payload,o=e.state;if(t.isTransition){var i=N.T,a={};N.T=a;try{var l=n(o,r),s=N.S;null!==s&&s(a,l),zi(e,t,l)}catch(n){ji(e,t,n)}finally{N.T=i}}else try{zi(e,t,i=n(o,r))}catch(n){ji(e,t,n)}}function zi(e,t,n){null!==n&&"object"==typeof n&&"function"==typeof n.then?n.then((function(n){Fi(e,t,n)}),(function(n){return ji(e,t,n)})):Fi(e,t,n)}function Fi(e,t,n){t.status="fulfilled",t.value=n,$i(t),e.state=n,null!==(t=e.pending)&&((n=t.next)===t?e.pending=null:(n=n.next,t.next=n,Li(e,n)))}function ji(e,t,n){var r=e.pending;if(e.pending=null,null!==r){r=r.next;do{t.status="rejected",t.reason=n,$i(t),t=t.next}while(t!==r)}e.action=null}function $i(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Bi(e,t){return t}function Vi(e,t){if(Yr){var n=ec.formState;if(null!==n){e:{var r=Jo;if(Yr){if(Xr){t:{for(var o=Xr,i=Qr;8!==o.nodeType;){if(!i){o=null;break t}if(null===(o=ad(o.nextSibling))){o=null;break t}}o="F!"===(i=o.data)||"F"===i?o:null}if(o){Xr=ad(o.nextSibling),r="F!"===o.data;break e}}Jr(r)}r=!1}r&&(t=n[0])}}return(n=vi()).memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bi,lastRenderedState:t},n.queue=r,n=va.bind(null,Jo,r),r.dispatch=n,r=Ai(!1),i=wa.bind(null,Jo,!1,r.queue),o={state:t,dispatch:null,action:e,pending:null},(r=vi()).queue=o,n=Ii.bind(null,Jo,o,i,n),o.dispatch=n,r.memoizedState=e,[t,n,!1]}function Hi(e){return Ui(bi(),ei,e)}function Ui(e,t,n){t=_i(e,t,Bi)[0],e=Ei(Si)[0],t="object"==typeof t&&null!==t&&"function"==typeof t.then?wi(t):t;var r=bi(),o=r.queue,i=o.dispatch;return n!==r.memoizedState&&(Jo.flags|=2048,Ki(9,Wi.bind(null,o,n),{destroy:void 0},null)),[t,i,e]}function Wi(e,t){e.action=t}function qi(e){var t=bi(),n=ei;if(null!==n)return Ui(t,n,e);bi(),t=t.memoizedState;var r=(n=bi()).queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Ki(e,t,n,r){return e={tag:e,create:t,inst:n,deps:r,next:null},null===(t=Jo.updateQueue)&&(t={lastEffect:null,events:null,stores:null,memoCache:null},Jo.updateQueue=t),null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Xi(){return bi().memoizedState}function Yi(e,t,n,r){var o=vi();Jo.flags|=e,o.memoizedState=Ki(1|t,n,{destroy:void 0},void 0===r?null:r)}function Gi(e,t,n,r){var o=bi();r=void 0===r?null:r;var i=o.memoizedState.inst;null!==ei&&null!==r&&ui(r,ei.memoizedState.deps)?o.memoizedState=Ki(t,n,i,r):(Jo.flags|=e,o.memoizedState=Ki(1|t,n,i,r))}function Qi(e,t){Yi(8390656,8,e,t)}function Zi(e,t){Gi(2048,8,e,t)}function Ji(e,t){return Gi(4,2,e,t)}function ea(e,t){return Gi(4,4,e,t)}function ta(e,t){if("function"==typeof t){e=e();var n=t(e);return function(){"function"==typeof n?n():t(null)}}if(null!=t)return e=e(),t.current=e,function(){t.current=null}}function na(e,t,n){n=null!=n?n.concat([e]):null,Gi(4,4,ta.bind(null,t,e),n)}function ra(){}function oa(e,t){var n=bi();t=void 0===t?null:t;var r=n.memoizedState;return null!==t&&ui(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ia(e,t){var n=bi();t=void 0===t?null:t;var r=n.memoizedState;if(null!==t&&ui(t,r[1]))return r[0];if(r=e(),oi){ye(!0);try{e()}finally{ye(!1)}}return n.memoizedState=[r,t],r}function aa(e,t,n){return void 0===n||1073741824&Zo?e.memoizedState=t:(e.memoizedState=n,e=Rc(),Jo.lanes|=e,uc|=e,n)}function la(e,t,n,r){return qn(n,t)?n:null!==So.current?(e=aa(e,n,r),qn(e,t)||(Ha=!0),e):42&Zo?(e=Rc(),Jo.lanes|=e,uc|=e,t):(Ha=!0,e.memoizedState=n)}function sa(e,t,n,r,o){var i=$.p;$.p=0!==i&&8>i?i:8;var a,l,s,c=N.T,u={};N.T=u,wa(e,!1,t,n);try{var d=o(),f=N.S;if(null!==f&&f(u,d),null!==d&&"object"==typeof d&&"function"==typeof d.then){var p=(a=r,l=[],s={status:"pending",value:null,reason:null,then:function(e){l.push(e)}},d.then((function(){s.status="fulfilled",s.value=a;for(var e=0;e<l.length;e++)(0,l[e])(a)}),(function(e){for(s.status="rejected",s.reason=e,e=0;e<l.length;e++)(0,l[e])(void 0)})),s);ba(e,t,p,Pc())}else ba(e,t,r,Pc())}catch(n){ba(e,t,{then:function(){},status:"rejected",reason:n},Pc())}finally{$.p=i,N.T=c}}function ca(){}function ua(e,t,n,o){if(5!==e.tag)throw Error(r(476));var i=da(e).queue;sa(e,i,t,B,null===n?ca:function(){return fa(e),n(o)})}function da(e){var t=e.memoizedState;if(null!==t)return t;var n={};return(t={memoizedState:B,baseState:B,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Si,lastRenderedState:B},next:null}).next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Si,lastRenderedState:n},next:null},e.memoizedState=t,null!==(e=e.alternate)&&(e.memoizedState=t),t}function fa(e){ba(e,da(e).next.queue,{},Pc())}function pa(){return El(Id)}function ha(){return bi().memoizedState}function ma(){return bi().memoizedState}function ga(e){for(var t=e.return;null!==t;){switch(t.tag){case 24:case 3:var n=Pc(),r=Ml(t,e=Rl(n),n);return null!==r&&(Mc(r,t,n),Tl(r,t,n)),t={cache:$o()},void(e.payload=t)}t=t.return}}function ya(e,t,n){var r=Pc();n={lane:r,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},xa(e)?ka(t,n):null!==(n=Cr(e,t,n,r))&&(Mc(n,e,r),Sa(n,t,r))}function va(e,t,n){ba(e,t,n,Pc())}function ba(e,t,n,r){var o={lane:r,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(xa(e))ka(t,o);else{var i=e.alternate;if(0===e.lanes&&(null===i||0===i.lanes)&&null!==(i=t.lastRenderedReducer))try{var a=t.lastRenderedState,l=i(a,n);if(o.hasEagerState=!0,o.eagerState=l,qn(l,a))return _r(e,t,o,0),null===ec&&Er(),!1}catch(e){}if(null!==(n=Cr(e,t,o,r)))return Mc(n,e,r),Sa(n,t,r),!0}return!1}function wa(e,t,n,o){if(o={lane:2,revertLane:wu(),action:o,hasEagerState:!1,eagerState:null,next:null},xa(e)){if(t)throw Error(r(479))}else null!==(t=Cr(e,n,o,2))&&Mc(t,e,2)}function xa(e){var t=e.alternate;return e===Jo||null!==t&&t===Jo}function ka(e,t){ri=ni=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Sa(e,t,n){if(4194176&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Te(e,n)}}var Ea={readContext:El,use:xi,useCallback:ci,useContext:ci,useEffect:ci,useImperativeHandle:ci,useLayoutEffect:ci,useInsertionEffect:ci,useMemo:ci,useReducer:ci,useRef:ci,useState:ci,useDebugValue:ci,useDeferredValue:ci,useTransition:ci,useSyncExternalStore:ci,useId:ci};Ea.useCacheRefresh=ci,Ea.useMemoCache=ci,Ea.useHostTransitionStatus=ci,Ea.useFormState=ci,Ea.useActionState=ci,Ea.useOptimistic=ci;var _a={readContext:El,use:xi,useCallback:function(e,t){return vi().memoizedState=[e,void 0===t?null:t],e},useContext:El,useEffect:Qi,useImperativeHandle:function(e,t,n){n=null!=n?n.concat([e]):null,Yi(4194308,4,ta.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Yi(4194308,4,e,t)},useInsertionEffect:function(e,t){Yi(4,2,e,t)},useMemo:function(e,t){var n=vi();t=void 0===t?null:t;var r=e();if(oi){ye(!0);try{e()}finally{ye(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=vi();if(void 0!==n){var o=n(t);if(oi){ye(!0);try{n(t)}finally{ye(!1)}}}else o=t;return r.memoizedState=r.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},r.queue=e,e=e.dispatch=ya.bind(null,Jo,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},vi().memoizedState=e},useState:function(e){var t=(e=Ai(e)).queue,n=va.bind(null,Jo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ra,useDeferredValue:function(e,t){return aa(vi(),e,t)},useTransition:function(){var e=Ai(!1);return e=sa.bind(null,Jo,e.queue,!0,!1),vi().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var o=Jo,i=vi();if(Yr){if(void 0===n)throw Error(r(407));n=n()}else{if(n=t(),null===ec)throw Error(r(349));60&nc||Ni(o,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,Qi(Ri.bind(null,o,a,e),[e]),o.flags|=2048,Ki(9,Pi.bind(null,o,a,n,t),{destroy:void 0},null),n},useId:function(){var e=vi(),t=ec.identifierPrefix;if(Yr){var n=Vr;t=":"+t+"R"+(n=(Br&~(1<<32-ve(Br)-1)).toString(32)+n),0<(n=ii++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=si++).toString(32)+":";return e.memoizedState=t},useCacheRefresh:function(){return vi().memoizedState=ga.bind(null,Jo)}};_a.useMemoCache=ki,_a.useHostTransitionStatus=pa,_a.useFormState=Vi,_a.useActionState=Vi,_a.useOptimistic=function(e){var t=vi();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=wa.bind(null,Jo,!0,n),n.dispatch=t,[e,t]};var Ca={readContext:El,use:xi,useCallback:oa,useContext:El,useEffect:Zi,useImperativeHandle:na,useInsertionEffect:Ji,useLayoutEffect:ea,useMemo:ia,useReducer:Ei,useRef:Xi,useState:function(){return Ei(Si)},useDebugValue:ra,useDeferredValue:function(e,t){return la(bi(),ei.memoizedState,e,t)},useTransition:function(){var e=Ei(Si)[0],t=bi().memoizedState;return["boolean"==typeof e?e:wi(e),t]},useSyncExternalStore:Oi,useId:ha};Ca.useCacheRefresh=ma,Ca.useMemoCache=ki,Ca.useHostTransitionStatus=pa,Ca.useFormState=Hi,Ca.useActionState=Hi,Ca.useOptimistic=function(e,t){return Di(bi(),0,e,t)};var Oa={readContext:El,use:xi,useCallback:oa,useContext:El,useEffect:Zi,useImperativeHandle:na,useInsertionEffect:Ji,useLayoutEffect:ea,useMemo:ia,useReducer:Ci,useRef:Xi,useState:function(){return Ci(Si)},useDebugValue:ra,useDeferredValue:function(e,t){var n=bi();return null===ei?aa(n,e,t):la(n,ei.memoizedState,e,t)},useTransition:function(){var e=Ci(Si)[0],t=bi().memoizedState;return["boolean"==typeof e?e:wi(e),t]},useSyncExternalStore:Oi,useId:ha};function Na(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:P({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}Oa.useCacheRefresh=ma,Oa.useMemoCache=ki,Oa.useHostTransitionStatus=pa,Oa.useFormState=qi,Oa.useActionState=qi,Oa.useOptimistic=function(e,t){var n=bi();return null!==ei?Di(n,0,e,t):(n.baseState=e,[e,n.queue.dispatch])};var Pa={isMounted:function(e){return!!(e=e._reactInternals)&&I(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Pc(),o=Rl(r);o.payload=t,null!=n&&(o.callback=n),null!==(t=Ml(e,o,r))&&(Mc(t,e,r),Tl(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Pc(),o=Rl(r);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=Ml(e,o,r))&&(Mc(t,e,r),Tl(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Pc(),r=Rl(n);r.tag=2,null!=t&&(r.callback=t),null!==(t=Ml(e,r,n))&&(Mc(t,e,n),Tl(t,e,n))}};function Ra(e,t,n,r,o,i,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!t.prototype||!t.prototype.isPureReactComponent||(!Kn(n,r)||!Kn(o,i))}function Ma(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Pa.enqueueReplaceState(t,t.state,null)}function Ta(e,t){var n=t;if("ref"in t)for(var r in n={},t)"ref"!==r&&(n[r]=t[r]);if(e=e.defaultProps)for(var o in n===t&&(n=P({},n)),e)void 0===n[o]&&(n[o]=e[o]);return n}var Aa="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)};function Da(e){Aa(e)}function Ia(e){console.error(e)}function La(e){Aa(e)}function za(e,t){try{(0,e.onUncaughtError)(t.value,{componentStack:t.stack})}catch(e){setTimeout((function(){throw e}))}}function Fa(e,t,n){try{(0,e.onCaughtError)(n.value,{componentStack:n.stack,errorBoundary:1===t.tag?t.stateNode:null})}catch(e){setTimeout((function(){throw e}))}}function ja(e,t,n){return(n=Rl(n)).tag=3,n.payload={element:null},n.callback=function(){za(e,t)},n}function $a(e){return(e=Rl(e)).tag=3,e}function Ba(e,t,n,r){var o=n.type.getDerivedStateFromError;if("function"==typeof o){var i=r.value;e.payload=function(){return o(i)},e.callback=function(){Fa(t,n,r)}}var a=n.stateNode;null!==a&&"function"==typeof a.componentDidCatch&&(e.callback=function(){Fa(t,n,r),"function"!=typeof o&&(null===xc?xc=new Set([this]):xc.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:null!==e?e:""})})}var Va=Error(r(461)),Ha=!1;function Ua(e,t,n,r){t.child=null===e?ko(t,null,n,r):xo(t,e.child,n,r)}function Wa(e,t,n,r,o){n=n.render;var i=t.ref;if("ref"in r){var a={};for(var l in r)"ref"!==l&&(a[l]=r[l])}else a=r;return Sl(t),r=di(e,t,n,a,i,o),l=mi(),null===e||Ha?(Yr&&l&&Wr(t),t.flags|=1,Ua(e,t,r,o),t.child):(gi(e,t,o),dl(e,t,o))}function qa(e,t,n,r,o){if(null===e){var i=n.type;return"function"!=typeof i||Is(i)||void 0!==i.defaultProps||null!==n.compare?((e=Fs(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,Ka(e,t,i,r,o))}if(i=e.child,!fl(e,o)){var a=i.memoizedProps;if((n=null!==(n=n.compare)?n:Kn)(a,r)&&e.ref===t.ref)return dl(e,t,o)}return t.flags|=1,(e=Ls(i,r)).ref=t.ref,e.return=t,t.child=e}function Ka(e,t,n,r,o){if(null!==e){var i=e.memoizedProps;if(Kn(i,r)&&e.ref===t.ref){if(Ha=!1,t.pendingProps=r=i,!fl(e,o))return t.lanes=e.lanes,dl(e,t,o);131072&e.flags&&(Ha=!0)}}return Qa(e,t,n,r,o)}function Xa(e,t,n){var r=t.pendingProps,o=r.children,i=!!(2&t.stateNode._pendingVisibility),a=null!==e?e.memoizedState:null;if(Ga(e,t),"hidden"===r.mode||i){if(128&t.flags){if(r=null!==a?a.baseLanes|n:n,null!==e){for(o=t.child=e.child,i=0;null!==o;)i=i|o.lanes|o.childLanes,o=o.sibling;t.childLanes=i&~r}else t.childLanes=0,t.child=null;return Ya(e,t,r,n)}if(!(536870912&n))return t.lanes=t.childLanes=536870912,Ya(e,t,null!==a?a.baseLanes|n:n,n);t.memoizedState={baseLanes:0,cachePool:null},null!==e&&Go(0,null!==a?a.cachePool:null),null!==a?_o(t,a):Co(),Mo(t)}else null!==a?(Go(0,a.cachePool),_o(t,a),To(),t.memoizedState=null):(null!==e&&Go(0,null),Co(),To());return Ua(e,t,o,n),t.child}function Ya(e,t,n,r){var o=Yo();return o=null===o?null:{parent:jo._currentValue,pool:o},t.memoizedState={baseLanes:n,cachePool:o},null!==e&&Go(0,null),Co(),Mo(t),null!==e&&xl(e,t,r,!0),null}function Ga(e,t){var n=t.ref;if(null===n)null!==e&&null!==e.ref&&(t.flags|=2097664);else{if("function"!=typeof n&&"object"!=typeof n)throw Error(r(284));null!==e&&e.ref===n||(t.flags|=2097664)}}function Qa(e,t,n,r,o){return Sl(t),n=di(e,t,n,r,void 0,o),r=mi(),null===e||Ha?(Yr&&r&&Wr(t),t.flags|=1,Ua(e,t,n,o),t.child):(gi(e,t,o),dl(e,t,o))}function Za(e,t,n,r,o,i){return Sl(t),t.updateQueue=null,n=pi(t,r,n,o),fi(e),r=mi(),null===e||Ha?(Yr&&r&&Wr(t),t.flags|=1,Ua(e,t,n,i),t.child):(gi(e,t,i),dl(e,t,i))}function Ja(e,t,n,r,o){if(Sl(t),null===t.stateNode){var i=Rr,a=n.contextType;"object"==typeof a&&null!==a&&(i=El(a)),i=new n(r,i),t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,i.updater=Pa,t.stateNode=i,i._reactInternals=t,(i=t.stateNode).props=r,i.state=t.memoizedState,i.refs={},Nl(t),a=n.contextType,i.context="object"==typeof a&&null!==a?El(a):Rr,i.state=t.memoizedState,"function"==typeof(a=n.getDerivedStateFromProps)&&(Na(t,n,a,r),i.state=t.memoizedState),"function"==typeof n.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(a=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),a!==i.state&&Pa.enqueueReplaceState(i,i.state,null),Ll(t,r,i,o),Il(),i.state=t.memoizedState),"function"==typeof i.componentDidMount&&(t.flags|=4194308),r=!0}else if(null===e){i=t.stateNode;var l=t.memoizedProps,s=Ta(n,l);i.props=s;var c=i.context,u=n.contextType;a=Rr,"object"==typeof u&&null!==u&&(a=El(u));var d=n.getDerivedStateFromProps;u="function"==typeof d||"function"==typeof i.getSnapshotBeforeUpdate,l=t.pendingProps!==l,u||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(l||c!==a)&&Ma(t,i,r,a),Ol=!1;var f=t.memoizedState;i.state=f,Ll(t,r,i,o),Il(),c=t.memoizedState,l||f!==c||Ol?("function"==typeof d&&(Na(t,n,d,r),c=t.memoizedState),(s=Ol||Ra(t,n,s,r,f,c,a))?(u||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||("function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"==typeof i.componentDidMount&&(t.flags|=4194308)):("function"==typeof i.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),i.props=r,i.state=c,i.context=a,r=s):("function"==typeof i.componentDidMount&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Pl(e,t),u=Ta(n,a=t.memoizedProps),i.props=u,d=t.pendingProps,f=i.context,c=n.contextType,s=Rr,"object"==typeof c&&null!==c&&(s=El(c)),(c="function"==typeof(l=n.getDerivedStateFromProps)||"function"==typeof i.getSnapshotBeforeUpdate)||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(a!==d||f!==s)&&Ma(t,i,r,s),Ol=!1,f=t.memoizedState,i.state=f,Ll(t,r,i,o),Il();var p=t.memoizedState;a!==d||f!==p||Ol||null!==e&&null!==e.dependencies&&kl(e.dependencies)?("function"==typeof l&&(Na(t,n,l,r),p=t.memoizedState),(u=Ol||Ra(t,n,u,r,f,p,s)||null!==e&&null!==e.dependencies&&kl(e.dependencies))?(c||"function"!=typeof i.UNSAFE_componentWillUpdate&&"function"!=typeof i.componentWillUpdate||("function"==typeof i.componentWillUpdate&&i.componentWillUpdate(r,p,s),"function"==typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(r,p,s)),"function"==typeof i.componentDidUpdate&&(t.flags|=4),"function"==typeof i.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof i.componentDidUpdate||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),i.props=r,i.state=p,i.context=s,r=u):("function"!=typeof i.componentDidUpdate||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return i=r,Ga(e,t),r=!!(128&t.flags),i||r?(i=t.stateNode,n=r&&"function"!=typeof n.getDerivedStateFromError?null:i.render(),t.flags|=1,null!==e&&r?(t.child=xo(t,e.child,null,o),t.child=xo(t,null,n,o)):Ua(e,t,n,o),t.memoizedState=i.state,e=t.child):e=dl(e,t,o),e}function el(e,t,n,r){return ro(),t.flags|=256,Ua(e,t,n,r),t.child}var tl={dehydrated:null,treeContext:null,retryLane:0};function nl(e){return{baseLanes:e,cachePool:Qo()}}function rl(e,t,n){return e=null!==e?e.childLanes&~n:0,t&&(e|=pc),e}function ol(e,t,n){var o,i=t.pendingProps,a=!1,l=!!(128&t.flags);if((o=l)||(o=(null===e||null!==e.memoizedState)&&!!(2&Do.current)),o&&(a=!0,t.flags&=-129),o=!!(32&t.flags),t.flags&=-33,null===e){if(Yr){if(a?Ro(t):To(),Yr){var s,c=Xr;if(s=c){e:{for(s=c,c=Qr;8!==s.nodeType;){if(!c){c=null;break e}if(null===(s=ad(s.nextSibling))){c=null;break e}}c=s}null!==c?(t.memoizedState={dehydrated:c,treeContext:null!==$r?{id:Br,overflow:Vr}:null,retryLane:536870912},(s=Ds(18,null,null,0)).stateNode=c,s.return=t,t.child=s,Kr=t,Xr=null,s=!0):s=!1}s||Jr(t)}if(null!==(c=t.memoizedState)&&null!==(c=c.dehydrated))return"$!"===c.data?t.lanes=16:t.lanes=536870912,null;Ao(t)}return c=i.children,i=i.fallback,a?(To(),c=al({mode:"hidden",children:c},a=t.mode),i=js(i,a,n,null),c.return=t,i.return=t,c.sibling=i,t.child=c,(a=t.child).memoizedState=nl(n),a.childLanes=rl(e,o,n),t.memoizedState=tl,i):(Ro(t),il(t,c))}if(null!==(s=e.memoizedState)&&null!==(c=s.dehydrated)){if(l)256&t.flags?(Ro(t),t.flags&=-257,t=ll(e,t,n)):null!==t.memoizedState?(To(),t.child=e.child,t.flags|=128,t=null):(To(),a=i.fallback,c=t.mode,i=al({mode:"visible",children:i.children},c),(a=js(a,c,n,null)).flags|=2,i.return=t,a.return=t,i.sibling=a,t.child=i,xo(t,e.child,null,n),(i=t.child).memoizedState=nl(n),i.childLanes=rl(e,o,n),t.memoizedState=tl,t=a);else if(Ro(t),"$!"===c.data){if(o=c.nextSibling&&c.nextSibling.dataset)var u=o.dgst;o=u,(i=Error(r(419))).stack="",i.digest=o,oo({value:i,source:null,stack:null}),t=ll(e,t,n)}else if(Ha||xl(e,t,n,!1),o=!!(n&e.childLanes),Ha||o){if(null!==(o=ec)){if(42&(i=n&-n))i=1;else switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=16;break;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:i=64;break;case 268435456:i=134217728;break;default:i=0}if(0!==(i=i&(o.suspendedLanes|n)?0:i)&&i!==s.retryLane)throw s.retryLane=i,Or(e,i),Mc(o,e,i),Va}"$?"===c.data||Hc(),t=ll(e,t,n)}else"$?"===c.data?(t.flags|=128,t.child=e.child,t=au.bind(null,e),c._reactRetry=t,t=null):(e=s.treeContext,Xr=ad(c.nextSibling),Kr=t,Yr=!0,Gr=null,Qr=!1,null!==e&&(Fr[jr++]=Br,Fr[jr++]=Vr,Fr[jr++]=$r,Br=e.id,Vr=e.overflow,$r=t),(t=il(t,i.children)).flags|=4096);return t}return a?(To(),a=i.fallback,c=t.mode,u=(s=e.child).sibling,(i=Ls(s,{mode:"hidden",children:i.children})).subtreeFlags=31457280&s.subtreeFlags,null!==u?a=Ls(u,a):(a=js(a,c,n,null)).flags|=2,a.return=t,i.return=t,i.sibling=a,t.child=i,i=a,a=t.child,null===(c=e.child.memoizedState)?c=nl(n):(null!==(s=c.cachePool)?(u=jo._currentValue,s=s.parent!==u?{parent:u,pool:u}:s):s=Qo(),c={baseLanes:c.baseLanes|n,cachePool:s}),a.memoizedState=c,a.childLanes=rl(e,o,n),t.memoizedState=tl,i):(Ro(t),e=(n=e.child).sibling,(n=Ls(n,{mode:"visible",children:i.children})).return=t,n.sibling=null,null!==e&&(null===(o=t.deletions)?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function il(e,t){return(t=al({mode:"visible",children:t},e.mode)).return=e,e.child=t}function al(e,t){return $s(e,t,0,null)}function ll(e,t,n){return xo(t,e.child,null,n),(e=il(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function sl(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),bl(e.return,t,n)}function cl(e,t,n,r,o){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function ul(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Ua(e,t,r.children,n),2&(r=Do.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&sl(e,n,t);else if(19===e.tag)sl(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}switch(q(Do,r),o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===Io(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),cl(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===Io(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}cl(t,!0,n,null,i);break;case"together":cl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function dl(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),uc|=t.lanes,!(n&t.childLanes)){if(null===e)return null;if(xl(e,t,n,!1),!(n&t.childLanes))return null}if(null!==e&&t.child!==e.child)throw Error(r(153));if(null!==t.child){for(n=Ls(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Ls(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function fl(e,t){return!!(e.lanes&t)||!(null===(e=e.dependencies)||!kl(e))}function pl(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps)Ha=!0;else{if(!(fl(e,n)||128&t.flags))return Ha=!1,function(e,t,n){switch(t.tag){case 3:Q(t,t.stateNode.containerInfo),yl(t,jo,e.memoizedState.cache),ro();break;case 27:case 5:J(t);break;case 4:Q(t,t.stateNode.containerInfo);break;case 10:yl(t,t.type,t.memoizedProps.value);break;case 13:var r=t.memoizedState;if(null!==r)return null!==r.dehydrated?(Ro(t),t.flags|=128,null):n&t.child.childLanes?ol(e,t,n):(Ro(t),null!==(e=dl(e,t,n))?e.sibling:null);Ro(t);break;case 19:var o=!!(128&e.flags);if((r=!!(n&t.childLanes))||(xl(e,t,n,!1),r=!!(n&t.childLanes)),o){if(r)return ul(e,t,n);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),q(Do,Do.current),r)break;return null;case 22:case 23:return t.lanes=0,Xa(e,t,n);case 24:yl(t,jo,e.memoizedState.cache)}return dl(e,t,n)}(e,t,n);Ha=!!(131072&e.flags)}else Ha=!1,Yr&&1048576&t.flags&&Ur(t,zr,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var o=t.elementType,i=o._init;if(o=i(o._payload),t.type=o,"function"!=typeof o){if(null!=o){if((i=o.$$typeof)===m){t.tag=11,t=Wa(null,t,o,e,n);break e}if(i===v){t.tag=14,t=qa(null,t,o,e,n);break e}}throw t=_(o)||o,Error(r(306,t,""))}Is(o)?(e=Ta(o,e),t.tag=1,t=Ja(null,t,o,e,n)):(t.tag=0,t=Qa(null,t,o,e,n))}return t;case 0:return Qa(e,t,t.type,t.pendingProps,n);case 1:return Ja(e,t,o=t.type,i=Ta(o,t.pendingProps),n);case 3:e:{if(Q(t,t.stateNode.containerInfo),null===e)throw Error(r(387));var a=t.pendingProps;o=(i=t.memoizedState).element,Pl(e,t),Ll(t,a,null,n);var l=t.memoizedState;if(a=l.cache,yl(t,jo,a),a!==i.cache&&wl(t,[jo],n,!0),Il(),a=l.element,i.isDehydrated){if(i={element:a,isDehydrated:!1,cache:l.cache},t.updateQueue.baseState=i,t.memoizedState=i,256&t.flags){t=el(e,t,a,n);break e}if(a!==o){oo(o=Tr(Error(r(424)),t)),t=el(e,t,a,n);break e}for(Xr=ad(t.stateNode.containerInfo.firstChild),Kr=t,Yr=!0,Gr=null,Qr=!0,n=ko(t,null,a,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(ro(),a===o){t=dl(e,t,n);break e}Ua(e,t,a,n)}t=t.child}return t;case 26:return Ga(e,t),null===e?(n=md(t.type,null,t.pendingProps,null))?t.memoizedState=n:Yr||(n=t.type,e=t.pendingProps,(o=Xu(Y.current).createElement(n))[Le]=t,o[ze]=e,Wu(o,n,e),Ye(o),t.stateNode=o):t.memoizedState=md(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return J(t),null===e&&Yr&&(o=t.stateNode=sd(t.type,t.pendingProps,Y.current),Kr=t,Qr=!0,Xr=ad(o.firstChild)),o=t.pendingProps.children,null!==e||Yr?Ua(e,t,o,n):t.child=xo(t,null,o,n),Ga(e,t),t.child;case 5:return null===e&&Yr&&((i=o=Xr)&&(o=function(e,t,n,r){for(;1===e.nodeType;){var o=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&("INPUT"!==e.nodeName||"hidden"!==e.type))break}else if(r){if(!e[He])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if("stylesheet"===(i=e.getAttribute("rel"))&&e.hasAttribute("data-precedence"))break;if(i!==o.rel||e.getAttribute("href")!==(null==o.href?null:o.href)||e.getAttribute("crossorigin")!==(null==o.crossOrigin?null:o.crossOrigin)||e.getAttribute("title")!==(null==o.title?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(((i=e.getAttribute("src"))!==(null==o.src?null:o.src)||e.getAttribute("type")!==(null==o.type?null:o.type)||e.getAttribute("crossorigin")!==(null==o.crossOrigin?null:o.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else{if("input"!==t||"hidden"!==e.type)return e;var i=null==o.name?null:""+o.name;if("hidden"===o.type&&e.getAttribute("name")===i)return e}if(null===(e=ad(e.nextSibling)))break}return null}(o,t.type,t.pendingProps,Qr),null!==o?(t.stateNode=o,Kr=t,Xr=ad(o.firstChild),Qr=!1,i=!0):i=!1),i||Jr(t)),J(t),i=t.type,a=t.pendingProps,l=null!==e?e.memoizedProps:null,o=a.children,Qu(i,a)?o=null:null!==l&&Qu(i,l)&&(t.flags|=32),null!==t.memoizedState&&(i=di(e,t,hi,null,null,n),Id._currentValue=i),Ga(e,t),Ua(e,t,o,n),t.child;case 6:return null===e&&Yr&&((e=n=Xr)&&(n=function(e,t,n){if(""===t)return null;for(;3!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!n)return null;if(null===(e=ad(e.nextSibling)))return null}return e}(n,t.pendingProps,Qr),null!==n?(t.stateNode=n,Kr=t,Xr=null,e=!0):e=!1),e||Jr(t)),null;case 13:return ol(e,t,n);case 4:return Q(t,t.stateNode.containerInfo),o=t.pendingProps,null===e?t.child=xo(t,null,o,n):Ua(e,t,o,n),t.child;case 11:return Wa(e,t,t.type,t.pendingProps,n);case 7:return Ua(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ua(e,t,t.pendingProps.children,n),t.child;case 10:return o=t.pendingProps,yl(t,t.type,o.value),Ua(e,t,o.children,n),t.child;case 9:return i=t.type._context,o=t.pendingProps.children,Sl(t),o=o(i=El(i)),t.flags|=1,Ua(e,t,o,n),t.child;case 14:return qa(e,t,t.type,t.pendingProps,n);case 15:return Ka(e,t,t.type,t.pendingProps,n);case 19:return ul(e,t,n);case 22:return Xa(e,t,n);case 24:return Sl(t),o=El(jo),null===e?(null===(i=Yo())&&(i=ec,a=$o(),i.pooledCache=a,a.refCount++,null!==a&&(i.pooledCacheLanes|=n),i=a),t.memoizedState={parent:o,cache:i},Nl(t),yl(t,jo,i)):(!!(e.lanes&n)&&(Pl(e,t),Ll(t,null,null,n),Il()),i=e.memoizedState,a=t.memoizedState,i.parent!==o?(i={parent:o,cache:o},t.memoizedState=i,0===t.lanes&&(t.memoizedState=t.updateQueue.baseState=i),yl(t,jo,o)):(o=a.cache,yl(t,jo,o),o!==i.cache&&wl(t,[jo],n,!0))),Ua(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}var hl=U(null),ml=null,gl=null;function yl(e,t,n){q(hl,t._currentValue),t._currentValue=n}function vl(e){e._currentValue=hl.current,W(hl)}function bl(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function wl(e,t,n,o){var i=e.child;for(null!==i&&(i.return=e);null!==i;){var a=i.dependencies;if(null!==a){var l=i.child;a=a.firstContext;e:for(;null!==a;){var s=a;a=i;for(var c=0;c<t.length;c++)if(s.context===t[c]){a.lanes|=n,null!==(s=a.alternate)&&(s.lanes|=n),bl(a.return,n,e),o||(l=null);break e}a=s.next}}else if(18===i.tag){if(null===(l=i.return))throw Error(r(341));l.lanes|=n,null!==(a=l.alternate)&&(a.lanes|=n),bl(l,n,e),l=null}else l=i.child;if(null!==l)l.return=i;else for(l=i;null!==l;){if(l===e){l=null;break}if(null!==(i=l.sibling)){i.return=l.return,l=i;break}l=l.return}i=l}}function xl(e,t,n,o){e=null;for(var i=t,a=!1;null!==i;){if(!a)if(524288&i.flags)a=!0;else if(262144&i.flags)break;if(10===i.tag){var l=i.alternate;if(null===l)throw Error(r(387));if(null!==(l=l.memoizedProps)){var s=i.type;qn(i.pendingProps.value,l.value)||(null!==e?e.push(s):e=[s])}}else if(i===G.current){if(null===(l=i.alternate))throw Error(r(387));l.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(null!==e?e.push(Id):e=[Id])}i=i.return}null!==e&&wl(t,e,n,o),t.flags|=262144}function kl(e){for(e=e.firstContext;null!==e;){if(!qn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Sl(e){ml=e,gl=null,null!==(e=e.dependencies)&&(e.firstContext=null)}function El(e){return Cl(ml,e)}function _l(e,t){return null===ml&&Sl(e),Cl(e,t)}function Cl(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},null===gl){if(null===e)throw Error(r(308));gl=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else gl=gl.next=t;return n}var Ol=!1;function Nl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Pl(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Rl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ml(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&Js){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,t=Pr(e),Nr(e,null,n),t}return _r(e,r,t,n),Pr(e)}function Tl(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194176&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Te(e,n)}}function Al(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,i=null;if(null!==(n=n.firstBaseUpdate)){do{var a={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};null===i?o=i=a:i=i.next=a,n=n.next}while(null!==n);null===i?o=i=t:i=i.next=t}else o=i=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,callbacks:r.callbacks},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Dl=!1;function Il(){if(Dl){if(null!==Wo)throw Wo}}function Ll(e,t,n,r){Dl=!1;var o=e.updateQueue;Ol=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,l=o.shared.pending;if(null!==l){o.shared.pending=null;var s=l,c=s.next;s.next=null,null===a?i=c:a.next=c,a=s;var u=e.alternate;null!==u&&((l=(u=u.updateQueue).lastBaseUpdate)!==a&&(null===l?u.firstBaseUpdate=c:l.next=c,u.lastBaseUpdate=s))}if(null!==i){var d=o.baseState;for(a=0,u=c=s=null,l=i;;){var f=-536870913&l.lane,p=f!==l.lane;if(p?(nc&f)===f:(r&f)===f){0!==f&&f===Uo&&(Dl=!0),null!==u&&(u=u.next={lane:0,tag:l.tag,payload:l.payload,callback:null,next:null});e:{var h=e,m=l;f=t;var g=n;switch(m.tag){case 1:if("function"==typeof(h=m.payload)){d=h.call(g,d,f);break e}d=h;break e;case 3:h.flags=-65537&h.flags|128;case 0:if(null==(f="function"==typeof(h=m.payload)?h.call(g,d,f):h))break e;d=P({},d,f);break e;case 2:Ol=!0}}null!==(f=l.callback)&&(e.flags|=64,p&&(e.flags|=8192),null===(p=o.callbacks)?o.callbacks=[f]:p.push(f))}else p={lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},null===u?(c=u=p,s=d):u=u.next=p,a|=f;if(null===(l=l.next)){if(null===(l=o.shared.pending))break;l=(p=l).next,p.next=null,o.lastBaseUpdate=p,o.shared.pending=null}}null===u&&(s=d),o.baseState=s,o.firstBaseUpdate=c,o.lastBaseUpdate=u,null===i&&(o.shared.lanes=0),uc|=a,e.lanes=a,e.memoizedState=d}}function zl(e,t){if("function"!=typeof e)throw Error(r(191,e));e.call(t)}function Fl(e,t){var n=e.callbacks;if(null!==n)for(e.callbacks=null,e=0;e<n.length;e++)zl(n[e],t)}function jl(e,t){try{var n=t.updateQueue,r=null!==n?n.lastEffect:null;if(null!==r){var o=r.next;n=o;do{if((n.tag&e)===e){r=void 0;var i=n.create,a=n.inst;r=i(),a.destroy=r}n=n.next}while(n!==o)}}catch(e){nu(t,t.return,e)}}function $l(e,t,n){try{var r=t.updateQueue,o=null!==r?r.lastEffect:null;if(null!==o){var i=o.next;r=i;do{if((r.tag&e)===e){var a=r.inst,l=a.destroy;if(void 0!==l){a.destroy=void 0,o=t;var s=n;try{l()}catch(e){nu(o,s,e)}}}r=r.next}while(r!==i)}}catch(e){nu(t,t.return,e)}}function Bl(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{Fl(t,n)}catch(t){nu(e,e.return,t)}}}function Vl(e,t,n){n.props=Ta(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){nu(e,t,n)}}function Hl(e,t){try{var n=e.ref;if(null!==n){var r=e.stateNode;switch(e.tag){case 26:case 27:case 5:var o=r;break;default:o=r}"function"==typeof n?e.refCleanup=n(o):n.current=o}}catch(n){nu(e,t,n)}}function Ul(e,t){var n=e.ref,r=e.refCleanup;if(null!==n)if("function"==typeof r)try{r()}catch(n){nu(e,t,n)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"==typeof n)try{n(null)}catch(n){nu(e,t,n)}else n.current=null}function Wl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){nu(e,e.return,t)}}function ql(e,t,n){try{var o=e.stateNode;!function(e,t,n,o){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,a=null,l=null,s=null,c=null,u=null,d=null;for(h in n){var f=n[h];if(n.hasOwnProperty(h)&&null!=f)switch(h){case"checked":case"value":break;case"defaultValue":c=f;default:o.hasOwnProperty(h)||Hu(e,t,h,null,o,f)}}for(var p in o){var h=o[p];if(f=n[p],o.hasOwnProperty(p)&&(null!=h||null!=f))switch(p){case"type":a=h;break;case"name":i=h;break;case"checked":u=h;break;case"defaultChecked":d=h;break;case"value":l=h;break;case"defaultValue":s=h;break;case"children":case"dangerouslySetInnerHTML":if(null!=h)throw Error(r(137,t));break;default:h!==f&&Hu(e,t,p,h,o,f)}}return void ht(e,l,s,c,u,d,a,i);case"select":for(a in h=l=s=p=null,n)if(c=n[a],n.hasOwnProperty(a)&&null!=c)switch(a){case"value":break;case"multiple":h=c;default:o.hasOwnProperty(a)||Hu(e,t,a,null,o,c)}for(i in o)if(a=o[i],c=n[i],o.hasOwnProperty(i)&&(null!=a||null!=c))switch(i){case"value":p=a;break;case"defaultValue":s=a;break;case"multiple":l=a;default:a!==c&&Hu(e,t,i,a,o,c)}return t=s,n=l,o=h,void(null!=p?yt(e,!!n,p,!1):!!o!=!!n&&(null!=t?yt(e,!!n,t,!0):yt(e,!!n,n?[]:"",!1)));case"textarea":for(s in h=p=null,n)if(i=n[s],n.hasOwnProperty(s)&&null!=i&&!o.hasOwnProperty(s))switch(s){case"value":case"children":break;default:Hu(e,t,s,null,o,i)}for(l in o)if(i=o[l],a=n[l],o.hasOwnProperty(l)&&(null!=i||null!=a))switch(l){case"value":p=i;break;case"defaultValue":h=i;break;case"children":break;case"dangerouslySetInnerHTML":if(null!=i)throw Error(r(91));break;default:i!==a&&Hu(e,t,l,i,o,a)}return void vt(e,p,h);case"option":for(var m in n)if(p=n[m],n.hasOwnProperty(m)&&null!=p&&!o.hasOwnProperty(m))if("selected"===m)e.selected=!1;else Hu(e,t,m,null,o,p);for(c in o)if(p=o[c],h=n[c],o.hasOwnProperty(c)&&p!==h&&(null!=p||null!=h))if("selected"===c)e.selected=p&&"function"!=typeof p&&"symbol"!=typeof p;else Hu(e,t,c,p,o,h);return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var g in n)p=n[g],n.hasOwnProperty(g)&&null!=p&&!o.hasOwnProperty(g)&&Hu(e,t,g,null,o,p);for(u in o)if(p=o[u],h=n[u],o.hasOwnProperty(u)&&p!==h&&(null!=p||null!=h))switch(u){case"children":case"dangerouslySetInnerHTML":if(null!=p)throw Error(r(137,t));break;default:Hu(e,t,u,p,o,h)}return;default:if(Et(t)){for(var y in n)p=n[y],n.hasOwnProperty(y)&&void 0!==p&&!o.hasOwnProperty(y)&&Uu(e,t,y,void 0,o,p);for(d in o)p=o[d],h=n[d],!o.hasOwnProperty(d)||p===h||void 0===p&&void 0===h||Uu(e,t,d,p,o,h);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&null!=p&&!o.hasOwnProperty(v)&&Hu(e,t,v,null,o,p);for(f in o)p=o[f],h=n[f],!o.hasOwnProperty(f)||p===h||null==p&&null==h||Hu(e,t,f,p,o,h)}(o,e.type,n,t),o[ze]=t}catch(t){nu(e,e.return,t)}}function Kl(e){return 5===e.tag||3===e.tag||26===e.tag||27===e.tag||4===e.tag}function Xl(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Kl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&27!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function Yl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Vu));else if(4!==r&&27!==r&&null!==(e=e.child))for(Yl(e,t,n),e=e.sibling;null!==e;)Yl(e,t,n),e=e.sibling}function Gl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&27!==r&&null!==(e=e.child))for(Gl(e,t,n),e=e.sibling;null!==e;)Gl(e,t,n),e=e.sibling}var Ql=!1,Zl=!1,Jl=!1,es="function"==typeof WeakSet?WeakSet:Set,ts=null,ns=!1;function rs(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:gs(e,n),4&r&&jl(5,n);break;case 1:if(gs(e,n),4&r)if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(e){nu(n,n.return,e)}else{var o=Ta(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){nu(n,n.return,e)}}64&r&&Bl(n),512&r&&Hl(n,n.return);break;case 3:if(gs(e,n),64&r&&null!==(r=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 27:case 5:case 1:e=n.child.stateNode}try{Fl(r,e)}catch(e){nu(n,n.return,e)}}break;case 26:gs(e,n),512&r&&Hl(n,n.return);break;case 27:case 5:gs(e,n),null===t&&4&r&&Wl(n),512&r&&Hl(n,n.return);break;case 12:default:gs(e,n);break;case 13:gs(e,n),4&r&&cs(e,n);break;case 22:if(!(o=null!==n.memoizedState||Ql)){t=null!==t&&null!==t.memoizedState||Zl;var i=Ql,a=Zl;Ql=o,(Zl=t)&&!a?vs(e,n,!!(8772&n.subtreeFlags)):gs(e,n),Ql=i,Zl=a}512&r&&("manual"===n.memoizedProps.mode?Hl(n,n.return):Ul(n,n.return))}}function os(e){var t=e.alternate;null!==t&&(e.alternate=null,os(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&Ue(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var is=null,as=!1;function ls(e,t,n){for(n=n.child;null!==n;)ss(e,t,n),n=n.sibling}function ss(e,t,n){if(ge&&"function"==typeof ge.onCommitFiberUnmount)try{ge.onCommitFiberUnmount(me,n)}catch(e){}switch(n.tag){case 26:Zl||Ul(n,t),ls(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode).parentNode.removeChild(n);break;case 27:Zl||Ul(n,t);var r=is,o=as;for(is=n.stateNode,ls(e,t,n),t=(n=n.stateNode).attributes;t.length;)n.removeAttributeNode(t[0]);Ue(n),is=r,as=o;break;case 5:Zl||Ul(n,t);case 6:o=is;var i=as;if(is=null,ls(e,t,n),as=i,null!==(is=o))if(as)try{e=is,r=n.stateNode,8===e.nodeType?e.parentNode.removeChild(r):e.removeChild(r)}catch(e){nu(n,t,e)}else try{is.removeChild(n.stateNode)}catch(e){nu(n,t,e)}break;case 18:null!==is&&(as?(t=is,n=n.stateNode,8===t.nodeType?od(t.parentNode,n):1===t.nodeType&&od(t,n),mf(t)):od(is,n.stateNode));break;case 4:r=is,o=as,is=n.stateNode.containerInfo,as=!0,ls(e,t,n),is=r,as=o;break;case 0:case 11:case 14:case 15:Zl||$l(2,n,t),Zl||$l(4,n,t),ls(e,t,n);break;case 1:Zl||(Ul(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount&&Vl(n,t,r)),ls(e,t,n);break;case 21:ls(e,t,n);break;case 22:Zl||Ul(n,t),Zl=(r=Zl)||null!==n.memoizedState,ls(e,t,n),Zl=r;break;default:ls(e,t,n)}}function cs(e,t){if(null===t.memoizedState&&(null!==(e=t.alternate)&&(null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))))try{mf(e)}catch(e){nu(t,t.return,e)}}function us(e,t){var n=function(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return null===t&&(t=e.stateNode=new es),t;case 22:return null===(t=(e=e.stateNode)._retryCache)&&(t=e._retryCache=new es),t;default:throw Error(r(435,e.tag))}}(e);t.forEach((function(t){var r=lu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}function ds(e,t){var n=t.deletions;if(null!==n)for(var o=0;o<n.length;o++){var i=n[o],a=e,l=t,s=l;e:for(;null!==s;){switch(s.tag){case 27:case 5:is=s.stateNode,as=!1;break e;case 3:case 4:is=s.stateNode.containerInfo,as=!0;break e}s=s.return}if(null===is)throw Error(r(160));ss(a,l,i),is=null,as=!1,null!==(a=i.alternate)&&(a.return=null),i.return=null}if(13878&t.subtreeFlags)for(t=t.child;null!==t;)ps(t,e),t=t.sibling}var fs=null;function ps(e,t){var n=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ds(t,e),hs(e),4&o&&($l(3,e,e.return),jl(3,e),$l(5,e,e.return));break;case 1:ds(t,e),hs(e),512&o&&(Zl||null===n||Ul(n,n.return)),64&o&&Ql&&(null!==(e=e.updateQueue)&&(null!==(o=e.callbacks)&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=null===n?o:n.concat(o))));break;case 26:var i=fs;if(ds(t,e),hs(e),512&o&&(Zl||null===n||Ul(n,n.return)),4&o){var a=null!==n?n.memoizedState:null;if(o=e.memoizedState,null===n)if(null===o)if(null===e.stateNode){e:{o=e.type,n=e.memoizedProps,i=i.ownerDocument||i;t:switch(o){case"title":(!(a=i.getElementsByTagName("title")[0])||a[He]||a[Le]||"http://www.w3.org/2000/svg"===a.namespaceURI||a.hasAttribute("itemprop"))&&(a=i.createElement(o),i.head.insertBefore(a,i.querySelector("head > title"))),Wu(a,o,n),a[Le]=e,Ye(a),o=a;break e;case"link":var l=Cd("link","href",i).get(o+(n.href||""));if(l)for(var s=0;s<l.length;s++)if((a=l[s]).getAttribute("href")===(null==n.href?null:n.href)&&a.getAttribute("rel")===(null==n.rel?null:n.rel)&&a.getAttribute("title")===(null==n.title?null:n.title)&&a.getAttribute("crossorigin")===(null==n.crossOrigin?null:n.crossOrigin)){l.splice(s,1);break t}Wu(a=i.createElement(o),o,n),i.head.appendChild(a);break;case"meta":if(l=Cd("meta","content",i).get(o+(n.content||"")))for(s=0;s<l.length;s++)if((a=l[s]).getAttribute("content")===(null==n.content?null:""+n.content)&&a.getAttribute("name")===(null==n.name?null:n.name)&&a.getAttribute("property")===(null==n.property?null:n.property)&&a.getAttribute("http-equiv")===(null==n.httpEquiv?null:n.httpEquiv)&&a.getAttribute("charset")===(null==n.charSet?null:n.charSet)){l.splice(s,1);break t}Wu(a=i.createElement(o),o,n),i.head.appendChild(a);break;default:throw Error(r(468,o))}a[Le]=e,Ye(a),o=a}e.stateNode=o}else Od(i,e.type,e.stateNode);else e.stateNode=xd(i,o,e.memoizedProps);else a!==o?(null===a?null!==n.stateNode&&(n=n.stateNode).parentNode.removeChild(n):a.count--,null===o?Od(i,e.type,e.stateNode):xd(i,o,e.memoizedProps)):null===o&&null!==e.stateNode&&ql(e,e.memoizedProps,n.memoizedProps)}break;case 27:if(4&o&&null===e.alternate){i=e.stateNode,a=e.memoizedProps;try{for(var c=i.firstChild;c;){var u=c.nextSibling,d=c.nodeName;c[He]||"HEAD"===d||"BODY"===d||"SCRIPT"===d||"STYLE"===d||"LINK"===d&&"stylesheet"===c.rel.toLowerCase()||i.removeChild(c),c=u}for(var f=e.type,p=i.attributes;p.length;)i.removeAttributeNode(p[0]);Wu(i,f,a),i[Le]=e,i[ze]=a}catch(t){nu(e,e.return,t)}}case 5:if(ds(t,e),hs(e),512&o&&(Zl||null===n||Ul(n,n.return)),32&e.flags){i=e.stateNode;try{wt(i,"")}catch(t){nu(e,e.return,t)}}4&o&&null!=e.stateNode&&ql(e,i=e.memoizedProps,null!==n?n.memoizedProps:i),1024&o&&(Jl=!0);break;case 6:if(ds(t,e),hs(e),4&o){if(null===e.stateNode)throw Error(r(162));o=e.memoizedProps,n=e.stateNode;try{n.nodeValue=o}catch(t){nu(e,e.return,t)}}break;case 3:if(_d=null,i=fs,fs=dd(t.containerInfo),ds(t,e),fs=i,hs(e),4&o&&null!==n&&n.memoizedState.isDehydrated)try{mf(t.containerInfo)}catch(t){nu(e,e.return,t)}Jl&&(Jl=!1,ms(e));break;case 4:o=fs,fs=dd(e.stateNode.containerInfo),ds(t,e),hs(e),fs=o;break;case 12:ds(t,e),hs(e);break;case 13:ds(t,e),hs(e),8192&e.child.flags&&null!==e.memoizedState!=(null!==n&&null!==n.memoizedState)&&(vc=ae()),4&o&&(null!==(o=e.updateQueue)&&(e.updateQueue=null,us(e,o)));break;case 22:if(512&o&&(Zl||null===n||Ul(n,n.return)),c=null!==e.memoizedState,u=null!==n&&null!==n.memoizedState,Ql=(d=Ql)||c,Zl=(f=Zl)||u,ds(t,e),Zl=f,Ql=d,hs(e),(t=e.stateNode)._current=e,t._visibility&=-3,t._visibility|=2&t._pendingVisibility,8192&o&&(t._visibility=c?-2&t._visibility:1|t._visibility,c&&(t=Ql||Zl,null===n||u||t||ys(e)),null===e.memoizedProps||"manual"!==e.memoizedProps.mode))e:for(n=null,t=e;;){if(5===t.tag||26===t.tag||27===t.tag){if(null===n){u=n=t;try{if(i=u.stateNode,c)"function"==typeof(a=i.style).setProperty?a.setProperty("display","none","important"):a.display="none";else{l=u.stateNode;var h=null!=(s=u.memoizedProps.style)&&s.hasOwnProperty("display")?s.display:null;l.style.display=null==h||"boolean"==typeof h?"":(""+h).trim()}}catch(e){nu(u,u.return,e)}}}else if(6===t.tag){if(null===n){u=t;try{u.stateNode.nodeValue=c?"":u.memoizedProps}catch(e){nu(u,u.return,e)}}}else if((22!==t.tag&&23!==t.tag||null===t.memoizedState||t===e)&&null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;null===t.sibling;){if(null===t.return||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}4&o&&(null!==(o=e.updateQueue)&&(null!==(n=o.retryQueue)&&(o.retryQueue=null,us(e,n))));break;case 19:ds(t,e),hs(e),4&o&&(null!==(o=e.updateQueue)&&(e.updateQueue=null,us(e,o)));break;case 21:break;default:ds(t,e),hs(e)}}function hs(e){var t=e.flags;if(2&t){try{if(27!==e.tag){e:{for(var n=e.return;null!==n;){if(Kl(n)){var o=n;break e}n=n.return}throw Error(r(160))}switch(o.tag){case 27:var i=o.stateNode;Gl(e,Xl(e),i);break;case 5:var a=o.stateNode;32&o.flags&&(wt(a,""),o.flags&=-33),Gl(e,Xl(e),a);break;case 3:case 4:var l=o.stateNode.containerInfo;Yl(e,Xl(e),l);break;default:throw Error(r(161))}}}catch(t){nu(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function ms(e){if(1024&e.subtreeFlags)for(e=e.child;null!==e;){var t=e;ms(t),5===t.tag&&1024&t.flags&&t.stateNode.reset(),e=e.sibling}}function gs(e,t){if(8772&t.subtreeFlags)for(t=t.child;null!==t;)rs(e,t.alternate,t),t=t.sibling}function ys(e){for(e=e.child;null!==e;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:$l(4,t,t.return),ys(t);break;case 1:Ul(t,t.return);var n=t.stateNode;"function"==typeof n.componentWillUnmount&&Vl(t,t.return,n),ys(t);break;case 26:case 27:case 5:Ul(t,t.return),ys(t);break;case 22:Ul(t,t.return),null===t.memoizedState&&ys(t);break;default:ys(t)}e=e.sibling}}function vs(e,t,n){for(n=n&&!!(8772&t.subtreeFlags),t=t.child;null!==t;){var r=t.alternate,o=e,i=t,a=i.flags;switch(i.tag){case 0:case 11:case 15:vs(o,i,n),jl(4,i);break;case 1:if(vs(o,i,n),"function"==typeof(o=(r=i).stateNode).componentDidMount)try{o.componentDidMount()}catch(e){nu(r,r.return,e)}if(null!==(o=(r=i).updateQueue)){var l=r.stateNode;try{var s=o.shared.hiddenCallbacks;if(null!==s)for(o.shared.hiddenCallbacks=null,o=0;o<s.length;o++)zl(s[o],l)}catch(e){nu(r,r.return,e)}}n&&64&a&&Bl(i),Hl(i,i.return);break;case 26:case 27:case 5:vs(o,i,n),n&&null===r&&4&a&&Wl(i),Hl(i,i.return);break;case 12:default:vs(o,i,n);break;case 13:vs(o,i,n),n&&4&a&&cs(o,i);break;case 22:null===i.memoizedState&&vs(o,i,n),Hl(i,i.return)}t=t.sibling}}function bs(e,t){var n=null;null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),e=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(e=t.memoizedState.cachePool.pool),e!==n&&(null!=e&&e.refCount++,null!=n&&Bo(n))}function ws(e,t){e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&Bo(e))}function xs(e,t,n,r){if(10256&t.subtreeFlags)for(t=t.child;null!==t;)ks(e,t,n,r),t=t.sibling}function ks(e,t,n,r){var o=t.flags;switch(t.tag){case 0:case 11:case 15:xs(e,t,n,r),2048&o&&jl(9,t);break;case 3:xs(e,t,n,r),2048&o&&(e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&Bo(e)));break;case 12:if(2048&o){xs(e,t,n,r),e=t.stateNode;try{var i=t.memoizedProps,a=i.id,l=i.onPostCommit;"function"==typeof l&&l(a,null===t.alternate?"mount":"update",e.passiveEffectDuration,-0)}catch(e){nu(t,t.return,e)}}else xs(e,t,n,r);break;case 23:break;case 22:i=t.stateNode,null!==t.memoizedState?4&i._visibility?xs(e,t,n,r):Es(e,t):4&i._visibility?xs(e,t,n,r):(i._visibility|=4,Ss(e,t,n,r,!!(10256&t.subtreeFlags))),2048&o&&bs(t.alternate,t);break;case 24:xs(e,t,n,r),2048&o&&ws(t.alternate,t);break;default:xs(e,t,n,r)}}function Ss(e,t,n,r,o){for(o=o&&!!(10256&t.subtreeFlags),t=t.child;null!==t;){var i=e,a=t,l=n,s=r,c=a.flags;switch(a.tag){case 0:case 11:case 15:Ss(i,a,l,s,o),jl(8,a);break;case 23:break;case 22:var u=a.stateNode;null!==a.memoizedState?4&u._visibility?Ss(i,a,l,s,o):Es(i,a):(u._visibility|=4,Ss(i,a,l,s,o)),o&&2048&c&&bs(a.alternate,a);break;case 24:Ss(i,a,l,s,o),o&&2048&c&&ws(a.alternate,a);break;default:Ss(i,a,l,s,o)}t=t.sibling}}function Es(e,t){if(10256&t.subtreeFlags)for(t=t.child;null!==t;){var n=e,r=t,o=r.flags;switch(r.tag){case 22:Es(n,r),2048&o&&bs(r.alternate,r);break;case 24:Es(n,r),2048&o&&ws(r.alternate,r);break;default:Es(n,r)}t=t.sibling}}var _s=8192;function Cs(e){if(e.subtreeFlags&_s)for(e=e.child;null!==e;)Os(e),e=e.sibling}function Os(e){switch(e.tag){case 26:Cs(e),e.flags&_s&&null!==e.memoizedState&&function(e,t,n){if(null===Pd)throw Error(r(475));var o=Pd;if(!("stylesheet"!==t.type||"string"==typeof n.media&&!1===matchMedia(n.media).matches||4&t.state.loading)){if(null===t.instance){var i=gd(n.href),a=e.querySelector(yd(i));if(a)return null!==(e=a._p)&&"object"==typeof e&&"function"==typeof e.then&&(o.count++,o=Md.bind(o),e.then(o,o)),t.state.loading|=4,t.instance=a,void Ye(a);a=e.ownerDocument||e,n=vd(n),(i=cd.get(i))&&Sd(n,i),Ye(a=a.createElement("link"));var l=a;l._p=new Promise((function(e,t){l.onload=e,l.onerror=t})),Wu(a,"link",n),t.instance=a}null===o.stylesheets&&(o.stylesheets=new Map),o.stylesheets.set(t,e),(e=t.state.preload)&&!(3&t.state.loading)&&(o.count++,t=Md.bind(o),e.addEventListener("load",t),e.addEventListener("error",t))}}(fs,e.memoizedState,e.memoizedProps);break;case 5:default:Cs(e);break;case 3:case 4:var t=fs;fs=dd(e.stateNode.containerInfo),Cs(e),fs=t;break;case 22:null===e.memoizedState&&(null!==(t=e.alternate)&&null!==t.memoizedState?(t=_s,_s=16777216,Cs(e),_s=t):Cs(e))}}function Ns(e){var t=e.alternate;if(null!==t&&null!==(e=t.child)){t.child=null;do{t=e.sibling,e.sibling=null,e=t}while(null!==e)}}function Ps(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];ts=r,Ts(r,e)}Ns(e)}if(10256&e.subtreeFlags)for(e=e.child;null!==e;)Rs(e),e=e.sibling}function Rs(e){switch(e.tag){case 0:case 11:case 15:Ps(e),2048&e.flags&&$l(9,e,e.return);break;case 3:case 12:default:Ps(e);break;case 22:var t=e.stateNode;null!==e.memoizedState&&4&t._visibility&&(null===e.return||13!==e.return.tag)?(t._visibility&=-5,Ms(e)):Ps(e)}}function Ms(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];ts=r,Ts(r,e)}Ns(e)}for(e=e.child;null!==e;){switch((t=e).tag){case 0:case 11:case 15:$l(8,t,t.return),Ms(t);break;case 22:4&(n=t.stateNode)._visibility&&(n._visibility&=-5,Ms(t));break;default:Ms(t)}e=e.sibling}}function Ts(e,t){for(;null!==ts;){var n=ts;switch(n.tag){case 0:case 11:case 15:$l(8,n,t);break;case 23:case 22:if(null!==n.memoizedState&&null!==n.memoizedState.cachePool){var r=n.memoizedState.cachePool.pool;null!=r&&r.refCount++}break;case 24:Bo(n.memoizedState.cache)}if(null!==(r=n.child))r.return=n,ts=r;else e:for(n=e;null!==ts;){var o=(r=ts).sibling,i=r.return;if(os(r),r===n){ts=null;break e}if(null!==o){o.return=i,ts=o;break e}ts=i}}}function As(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ds(e,t,n,r){return new As(e,t,n,r)}function Is(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ls(e,t){var n=e.alternate;return null===n?((n=Ds(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=31457280&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function zs(e,t){e.flags&=31457282;var n=e.alternate;return null===n?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Fs(e,t,n,o,i,a){var l=0;if(o=e,"function"==typeof e)Is(e)&&(l=1);else if("string"==typeof e)l=function(e,t,n){if(1===n||null!=t.itemProp)return!1;switch(e){case"meta":case"title":return!0;case"style":if("string"!=typeof t.precedence||"string"!=typeof t.href||""===t.href)break;return!0;case"link":if("string"!=typeof t.rel||"string"!=typeof t.href||""===t.href||t.onLoad||t.onError)break;return"stylesheet"!==t.rel||(e=t.disabled,"string"==typeof t.precedence&&null==e);case"script":if(t.async&&"function"!=typeof t.async&&"symbol"!=typeof t.async&&!t.onLoad&&!t.onError&&t.src&&"string"==typeof t.src)return!0}return!1}(e,n,K.current)?26:"html"===e||"head"===e||"body"===e?27:5;else e:switch(e){case c:return js(n.children,i,a,t);case u:l=8,i|=24;break;case d:return(e=Ds(12,n,t,2|i)).elementType=d,e.lanes=a,e;case g:return(e=Ds(13,n,t,i)).elementType=g,e.lanes=a,e;case y:return(e=Ds(19,n,t,i)).elementType=y,e.lanes=a,e;case w:return $s(n,i,a,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case f:case h:l=10;break e;case p:l=9;break e;case m:l=11;break e;case v:l=14;break e;case b:l=16,o=null;break e}l=29,n=Error(r(130,null===e?"null":typeof e,"")),o=null}return(t=Ds(l,n,t,i)).elementType=e,t.type=o,t.lanes=a,t}function js(e,t,n,r){return(e=Ds(7,e,r,t)).lanes=n,e}function $s(e,t,n,o){(e=Ds(22,e,o,t)).elementType=w,e.lanes=n;var i={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var e=i._current;if(null===e)throw Error(r(456));if(!(2&i._pendingVisibility)){var t=Or(e,2);null!==t&&(i._pendingVisibility|=2,Mc(t,e,2))}},attach:function(){var e=i._current;if(null===e)throw Error(r(456));if(2&i._pendingVisibility){var t=Or(e,2);null!==t&&(i._pendingVisibility&=-3,Mc(t,e,2))}}};return e.stateNode=i,e}function Bs(e,t,n){return(e=Ds(6,e,null,t)).lanes=n,e}function Vs(e,t,n){return(t=Ds(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Hs(e){e.flags|=4}function Us(e,t){if("stylesheet"!==t.type||4&t.state.loading)e.flags&=-16777217;else if(e.flags|=16777216,!Nd(t)){if(null!==(t=No.current)&&((4194176&nc)===nc?null!==Po:(62914560&nc)!==nc&&!(536870912&nc)||t!==Po))throw fo=lo,ao;e.flags|=8192}}function Ws(e,t){null!==t&&(e.flags|=4),16384&e.flags&&(t=22!==e.tag?Ne():536870912,e.lanes|=t,hc|=t)}function qs(e,t){if(!Yr)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ks(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=31457280&o.subtreeFlags,r|=31457280&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Xs(e,t,n){var o=t.pendingProps;switch(qr(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:case 1:return Ks(t),null;case 3:return n=t.stateNode,o=null,null!==e&&(o=e.memoizedState.cache),t.memoizedState.cache!==o&&(t.flags|=2048),vl(jo),Z(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||(no(t)?Hs(t):null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==Gr&&(Ac(Gr),Gr=null))),Ks(t),null;case 26:return n=t.memoizedState,null===e?(Hs(t),null!==n?(Ks(t),Us(t,n)):(Ks(t),t.flags&=-16777217)):n?n!==e.memoizedState?(Hs(t),Ks(t),Us(t,n)):(Ks(t),t.flags&=-16777217):(e.memoizedProps!==o&&Hs(t),Ks(t),t.flags&=-16777217),null;case 27:ee(t),n=Y.current;var i=t.type;if(null!==e&&null!=t.stateNode)e.memoizedProps!==o&&Hs(t);else{if(!o){if(null===t.stateNode)throw Error(r(166));return Ks(t),null}e=K.current,no(t)?eo(t):(e=sd(i,o,n),t.stateNode=e,Hs(t))}return Ks(t),null;case 5:if(ee(t),n=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==o&&Hs(t);else{if(!o){if(null===t.stateNode)throw Error(r(166));return Ks(t),null}if(e=K.current,no(t))eo(t);else{switch(i=Xu(Y.current),e){case 1:e=i.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:e=i.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":e=i.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":e=i.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":(e=i.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e="string"==typeof o.is?i.createElement("select",{is:o.is}):i.createElement("select"),o.multiple?e.multiple=!0:o.size&&(e.size=o.size);break;default:e="string"==typeof o.is?i.createElement(n,{is:o.is}):i.createElement(n)}}e[Le]=t,e[ze]=o;e:for(i=t.child;null!==i;){if(5===i.tag||6===i.tag)e.appendChild(i.stateNode);else if(4!==i.tag&&27!==i.tag&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break e;for(;null===i.sibling;){if(null===i.return||i.return===t)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}t.stateNode=e;e:switch(Wu(e,n,o),n){case"button":case"input":case"select":case"textarea":e=!!o.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&Hs(t)}}return Ks(t),t.flags&=-16777217,null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==o&&Hs(t);else{if("string"!=typeof o&&null===t.stateNode)throw Error(r(166));if(e=Y.current,no(t)){if(e=t.stateNode,n=t.memoizedProps,o=null,null!==(i=Kr))switch(i.tag){case 27:case 5:o=i.memoizedProps}e[Le]=t,(e=!!(e.nodeValue===n||null!==o&&!0===o.suppressHydrationWarning||Bu(e.nodeValue,n)))||Jr(t)}else(e=Xu(e).createTextNode(o))[Le]=t,t.stateNode=e}return Ks(t),null;case 13:if(o=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(i=no(t),null!==o&&null!==o.dehydrated){if(null===e){if(!i)throw Error(r(318));if(!(i=null!==(i=t.memoizedState)?i.dehydrated:null))throw Error(r(317));i[Le]=t}else ro(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Ks(t),i=!1}else null!==Gr&&(Ac(Gr),Gr=null),i=!0;if(!i)return 256&t.flags?(Ao(t),t):(Ao(t),null)}if(Ao(t),128&t.flags)return t.lanes=n,t;if(n=null!==o,e=null!==e&&null!==e.memoizedState,n){i=null,null!==(o=t.child).alternate&&null!==o.alternate.memoizedState&&null!==o.alternate.memoizedState.cachePool&&(i=o.alternate.memoizedState.cachePool.pool);var a=null;null!==o.memoizedState&&null!==o.memoizedState.cachePool&&(a=o.memoizedState.cachePool.pool),a!==i&&(o.flags|=2048)}return n!==e&&n&&(t.child.flags|=8192),Ws(t,t.updateQueue),Ks(t),null;case 4:return Z(),null===e&&Mu(t.stateNode.containerInfo),Ks(t),null;case 10:return vl(t.type),Ks(t),null;case 19:if(W(Do),null===(i=t.memoizedState))return Ks(t),null;if(o=!!(128&t.flags),null===(a=i.rendering))if(o)qs(i,!1);else{if(0!==cc||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(a=Io(e))){for(t.flags|=128,qs(i,!1),e=a.updateQueue,t.updateQueue=e,Ws(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)zs(n,e),n=n.sibling;return q(Do,1&Do.current|2),t.child}e=e.sibling}null!==i.tail&&ae()>bc&&(t.flags|=128,o=!0,qs(i,!1),t.lanes=4194304)}else{if(!o)if(null!==(e=Io(a))){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,Ws(t,e),qs(i,!0),null===i.tail&&"hidden"===i.tailMode&&!a.alternate&&!Yr)return Ks(t),null}else 2*ae()-i.renderingStartTime>bc&&536870912!==n&&(t.flags|=128,o=!0,qs(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(null!==(e=i.last)?e.sibling=a:t.child=a,i.last=a)}return null!==i.tail?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ae(),t.sibling=null,e=Do.current,q(Do,o?1&e|2:1&e),t):(Ks(t),null);case 22:case 23:return Ao(t),Oo(),o=null!==t.memoizedState,null!==e?null!==e.memoizedState!==o&&(t.flags|=8192):o&&(t.flags|=8192),o?!!(536870912&n)&&!(128&t.flags)&&(Ks(t),6&t.subtreeFlags&&(t.flags|=8192)):Ks(t),null!==(n=t.updateQueue)&&Ws(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),o=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(o=t.memoizedState.cachePool.pool),o!==n&&(t.flags|=2048),null!==e&&W(Xo),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),vl(jo),Ks(t),null;case 25:return null}throw Error(r(156,t.tag))}function Ys(e,t){switch(qr(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return vl(jo),Z(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return ee(t),null;case 13:if(Ao(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(r(340));ro()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return W(Do),null;case 4:return Z(),null;case 10:return vl(t.type),null;case 22:case 23:return Ao(t),Oo(),null!==e&&W(Xo),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return vl(jo),null;default:return null}}function Gs(e,t){switch(qr(t),t.tag){case 3:vl(jo),Z();break;case 26:case 27:case 5:ee(t);break;case 4:Z();break;case 13:Ao(t);break;case 19:W(Do);break;case 10:vl(t.type);break;case 22:case 23:Ao(t),Oo(),null!==e&&W(Xo);break;case 24:vl(jo)}}var Qs={getCacheForType:function(e){var t=El(jo),n=t.data.get(e);return void 0===n&&(n=e(),t.data.set(e,n)),n}},Zs="function"==typeof WeakMap?WeakMap:Map,Js=0,ec=null,tc=null,nc=0,rc=0,oc=null,ic=!1,ac=!1,lc=!1,sc=0,cc=0,uc=0,dc=0,fc=0,pc=0,hc=0,mc=null,gc=null,yc=!1,vc=0,bc=1/0,wc=null,xc=null,kc=!1,Sc=null,Ec=0,_c=0,Cc=null,Oc=0,Nc=null;function Pc(){if(2&Js&&0!==nc)return nc&-nc;if(null!==N.T){return 0!==Uo?Uo:wu()}return De()}function Rc(){0===pc&&(pc=536870912&nc&&!Yr?536870912:Oe());var e=No.current;return null!==e&&(e.flags|=32),pc}function Mc(e,t,n){(e===ec&&2===rc||null!==e.cancelPendingCommit)&&(jc(e,0),Lc(e,nc,pc,!1)),Re(e,n),2&Js&&e===ec||(e===ec&&(!(2&Js)&&(dc|=n),4===cc&&Lc(e,nc,pc,!1)),hu(e))}function Tc(e,t,n){if(6&Js)throw Error(r(327));for(var o=!n&&!(60&t)&&!(t&e.expiredLanes)||_e(e,t),i=o?function(e,t){var n=Js;Js|=2;var o=Bc(),i=Vc();ec!==e||nc!==t?(wc=null,bc=ae()+500,jc(e,t)):ac=_e(e,t);e:for(;;)try{if(0!==rc&&null!==tc){t=tc;var a=oc;t:switch(rc){case 1:rc=0,oc=null,Yc(e,t,a,1);break;case 2:if(so(a)){rc=0,oc=null,Xc(t);break}t=function(){2===rc&&ec===e&&(rc=7),hu(e)},a.then(t,t);break e;case 3:rc=7;break e;case 4:rc=5;break e;case 7:so(a)?(rc=0,oc=null,Xc(t)):(rc=0,oc=null,Yc(e,t,a,7));break;case 5:var l=null;switch(tc.tag){case 26:l=tc.memoizedState;case 5:case 27:var s=tc;if(!l||Nd(l)){rc=0,oc=null;var c=s.sibling;if(null!==c)tc=c;else{var u=s.return;null!==u?(tc=u,Gc(u)):tc=null}break t}}rc=0,oc=null,Yc(e,t,a,5);break;case 6:rc=0,oc=null,Yc(e,t,a,6);break;case 8:Fc(),cc=6;break e;default:throw Error(r(462))}}qc();break}catch(t){$c(e,t)}return gl=ml=null,N.H=o,N.A=i,Js=n,null!==tc?0:(ec=null,nc=0,Er(),cc)}(e,t):Uc(e,t,!0),a=o;;){if(0===i){ac&&!o&&Lc(e,t,0,!1);break}if(6===i)Lc(e,t,0,!ic);else{if(n=e.current.alternate,a&&!Ic(n)){i=Uc(e,t,!1),a=!1;continue}if(2===i){if(a=t,e.errorRecoveryDisabledLanes&a)var l=0;else l=0!==(l=-536870913&e.pendingLanes)?l:536870912&l?536870912:0;if(0!==l){t=l;e:{var s=e;i=mc;var c=s.current.memoizedState.isDehydrated;if(c&&(jc(s,l).flags|=256),2!==(l=Uc(s,l,!1))){if(lc&&!c){s.errorRecoveryDisabledLanes|=a,dc|=a,i=4;break e}a=gc,gc=i,null!==a&&Ac(a)}i=l}if(a=!1,2!==i)continue}}if(1===i){jc(e,0),Lc(e,t,0,!0);break}e:{switch(o=e,i){case 0:case 1:throw Error(r(345));case 4:if((4194176&t)===t){Lc(o,t,pc,!ic);break e}break;case 2:gc=null;break;case 3:case 5:break;default:throw Error(r(329))}if(o.finishedWork=n,o.finishedLanes=t,(62914560&t)===t&&10<(a=vc+300-ae())){if(Lc(o,t,pc,!ic),0!==Ee(o,0))break e;o.timeoutHandle=Ju(Dc.bind(null,o,n,gc,wc,yc,t,pc,dc,hc,ic,2,-0,0),a)}else Dc(o,n,gc,wc,yc,t,pc,dc,hc,ic,0,-0,0)}}break}hu(e)}function Ac(e){null===gc?gc=e:gc.push.apply(gc,e)}function Dc(e,t,n,o,i,a,l,s,c,u,d,f,p){var h=t.subtreeFlags;if((8192&h||!(16785408&~h))&&(Pd={stylesheets:null,count:0,unsuspend:Rd},Os(t),null!==(t=function(){if(null===Pd)throw Error(r(475));var e=Pd;return e.stylesheets&&0===e.count&&Ad(e,e.stylesheets),0<e.count?function(t){var n=setTimeout((function(){if(e.stylesheets&&Ad(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}),6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(n)}}:null}())))return e.cancelPendingCommit=t(Zc.bind(null,e,n,o,i,l,s,c,1,f,p)),void Lc(e,a,l,!u);Zc(e,n,o,i,l,s,c,d,f,p)}function Ic(e){for(var t=e;;){var n=t.tag;if((0===n||11===n||15===n)&&16384&t.flags&&(null!==(n=t.updateQueue)&&null!==(n=n.stores)))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!qn(i(),o))return!1}catch(e){return!1}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Lc(e,t,n,r){t&=~fc,t&=~dc,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var o=t;0<o;){var i=31-ve(o),a=1<<i;r[i]=-1,o&=~a}0!==n&&Me(e,n,t)}function zc(){return!!(6&Js)||(mu(0),!1)}function Fc(){if(null!==tc){if(0===rc)var e=tc.return;else gl=ml=null,yi(e=tc),ho=null,mo=0,e=tc;for(;null!==e;)Gs(e.alternate,e),e=e.return;tc=null}}function jc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;-1!==n&&(e.timeoutHandle=-1,ed(n)),null!==(n=e.cancelPendingCommit)&&(e.cancelPendingCommit=null,n()),Fc(),ec=e,tc=n=Ls(e.current,null),nc=t,rc=0,oc=null,ic=!1,ac=_e(e,t),lc=!1,hc=pc=fc=dc=uc=cc=0,gc=mc=null,yc=!1,8&t&&(t|=32&t);var r=e.entangledLanes;if(0!==r)for(e=e.entanglements,r&=t;0<r;){var o=31-ve(r),i=1<<o;t|=e[o],r&=~i}return sc=t,Er(),n}function $c(e,t){Jo=null,N.H=Ea,t===io?(t=po(),rc=3):t===ao?(t=po(),rc=4):rc=t===Va?8:null!==t&&"object"==typeof t&&"function"==typeof t.then?6:1,oc=t,null===tc&&(cc=1,za(e,Tr(t,e.current)))}function Bc(){var e=N.H;return N.H=Ea,null===e?Ea:e}function Vc(){var e=N.A;return N.A=Qs,e}function Hc(){cc=4,ic||(4194176&nc)!==nc&&null!==No.current||(ac=!0),!(134217727&uc)&&!(134217727&dc)||null===ec||Lc(ec,nc,pc,!1)}function Uc(e,t,n){var r=Js;Js|=2;var o=Bc(),i=Vc();ec===e&&nc===t||(wc=null,jc(e,t)),t=!1;var a=cc;e:for(;;)try{if(0!==rc&&null!==tc){var l=tc,s=oc;switch(rc){case 8:Fc(),a=6;break e;case 3:case 2:case 6:null===No.current&&(t=!0);var c=rc;if(rc=0,oc=null,Yc(e,l,s,c),n&&ac){a=0;break e}break;default:c=rc,rc=0,oc=null,Yc(e,l,s,c)}}Wc(),a=cc;break}catch(t){$c(e,t)}return t&&e.shellSuspendCounter++,gl=ml=null,Js=r,N.H=o,N.A=i,null===tc&&(ec=null,nc=0,Er()),a}function Wc(){for(;null!==tc;)Kc(tc)}function qc(){for(;null!==tc&&!oe();)Kc(tc)}function Kc(e){var t=pl(e.alternate,e,sc);e.memoizedProps=e.pendingProps,null===t?Gc(e):tc=t}function Xc(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Za(n,t,t.pendingProps,t.type,void 0,nc);break;case 11:t=Za(n,t,t.pendingProps,t.type.render,t.ref,nc);break;case 5:yi(t);default:Gs(n,t),t=pl(n,t=tc=zs(t,sc),sc)}e.memoizedProps=e.pendingProps,null===t?Gc(e):tc=t}function Yc(e,t,n,o){gl=ml=null,yi(t),ho=null,mo=0;var i=t.return;try{if(function(e,t,n,o,i){if(n.flags|=32768,null!==o&&"object"==typeof o&&"function"==typeof o.then){if(null!==(t=n.alternate)&&xl(t,n,i,!0),null!==(n=No.current)){switch(n.tag){case 13:return null===Po?Hc():null===n.alternate&&0===cc&&(cc=3),n.flags&=-257,n.flags|=65536,n.lanes=i,o===lo?n.flags|=16384:(null===(t=n.updateQueue)?n.updateQueue=new Set([o]):t.add(o),ru(e,o,i)),!1;case 22:return n.flags|=65536,o===lo?n.flags|=16384:(null===(t=n.updateQueue)?(t={transitions:null,markerInstances:null,retryQueue:new Set([o])},n.updateQueue=t):null===(n=t.retryQueue)?t.retryQueue=new Set([o]):n.add(o),ru(e,o,i)),!1}throw Error(r(435,n.tag))}return ru(e,o,i),Hc(),!1}if(Yr)return null!==(t=No.current)?(!(65536&t.flags)&&(t.flags|=256),t.flags|=65536,t.lanes=i,o!==Zr&&oo(Tr(e=Error(r(422),{cause:o}),n))):(o!==Zr&&oo(Tr(t=Error(r(423),{cause:o}),n)),(e=e.current.alternate).flags|=65536,i&=-i,e.lanes|=i,o=Tr(o,n),Al(e,i=ja(e.stateNode,o,i)),4!==cc&&(cc=2)),!1;var a=Error(r(520),{cause:o});if(a=Tr(a,n),null===mc?mc=[a]:mc.push(a),4!==cc&&(cc=2),null===t)return!0;o=Tr(o,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,Al(n,e=ja(n.stateNode,o,e)),!1;case 1:if(t=n.type,a=n.stateNode,!(128&n.flags||"function"!=typeof t.getDerivedStateFromError&&(null===a||"function"!=typeof a.componentDidCatch||null!==xc&&xc.has(a))))return n.flags|=65536,i&=-i,n.lanes|=i,Ba(i=$a(i),e,n,o),Al(n,i),!1}n=n.return}while(null!==n);return!1}(e,i,t,n,nc))return cc=1,za(e,Tr(n,e.current)),void(tc=null)}catch(t){if(null!==i)throw tc=i,t;return cc=1,za(e,Tr(n,e.current)),void(tc=null)}32768&t.flags?(Yr||1===o?e=!0:ac||536870912&nc?e=!1:(ic=e=!0,(2===o||3===o||6===o)&&(null!==(o=No.current)&&13===o.tag&&(o.flags|=16384))),Qc(t,e)):Gc(t)}function Gc(e){var t=e;do{if(32768&t.flags)return void Qc(t,ic);e=t.return;var n=Xs(t.alternate,t,sc);if(null!==n)return void(tc=n);if(null!==(t=t.sibling))return void(tc=t);tc=t=e}while(null!==t);0===cc&&(cc=5)}function Qc(e,t){do{var n=Ys(e.alternate,e);if(null!==n)return n.flags&=32767,void(tc=n);if(null!==(n=e.return)&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&null!==(e=e.sibling))return void(tc=e);tc=e=n}while(null!==e);cc=6,tc=null}function Zc(e,t,n,o,i,a,l,s,c,u){var d=N.T,f=$.p;try{$.p=2,N.T=null,function(e,t,n,o,i,a,l,s){do{eu()}while(null!==Sc);if(6&Js)throw Error(r(327));var c=e.finishedWork;if(o=e.finishedLanes,null===c)return null;if(e.finishedWork=null,e.finishedLanes=0,c===e.current)throw Error(r(177));e.callbackNode=null,e.callbackPriority=0,e.cancelPendingCommit=null;var u=c.lanes|c.childLanes;if(function(e,t,n,r,o,i){var a=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var l=e.entanglements,s=e.expirationTimes,c=e.hiddenUpdates;for(n=a&~n;0<n;){var u=31-ve(n),d=1<<u;l[u]=0,s[u]=-1;var f=c[u];if(null!==f)for(c[u]=null,u=0;u<f.length;u++){var p=f[u];null!==p&&(p.lane&=-536870913)}n&=~d}0!==r&&Me(e,r,0),0!==i&&0===o&&0!==e.tag&&(e.suspendedLanes|=i&~(a&~t))}(e,o,u|=Sr,a,l,s),e===ec&&(tc=ec=null,nc=0),!(10256&c.subtreeFlags)&&!(10256&c.flags)||kc||(kc=!0,_c=u,Cc=n,function(e,t){ne(e,t)}(ue,(function(){return eu(),null}))),n=!!(15990&c.flags),15990&c.subtreeFlags||n?(n=N.T,N.T=null,a=$.p,$.p=2,l=Js,Js|=4,function(e,t){if(e=e.containerInfo,qu=Hd,Zn(e=Qn(e))){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var o=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(o&&0!==o.rangeCount){n=o.anchorNode;var i=o.anchorOffset,a=o.focusNode;o=o.focusOffset;try{n.nodeType,a.nodeType}catch(e){n=null;break e}var l=0,s=-1,c=-1,u=0,d=0,f=e,p=null;t:for(;;){for(var h;f!==n||0!==i&&3!==f.nodeType||(s=l+i),f!==a||0!==o&&3!==f.nodeType||(c=l+o),3===f.nodeType&&(l+=f.nodeValue.length),null!==(h=f.firstChild);)p=f,f=h;for(;;){if(f===e)break t;if(p===n&&++u===i&&(s=l),p===a&&++d===o&&(c=l),null!==(h=f.nextSibling))break;p=(f=p).parentNode}f=h}n=-1===s||-1===c?null:{start:s,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ku={focusedElem:e,selectionRange:n},Hd=!1,ts=t;null!==ts;)if(e=(t=ts).child,1028&t.subtreeFlags&&null!==e)e.return=t,ts=e;else for(;null!==ts;){switch(a=(t=ts).alternate,e=t.flags,t.tag){case 0:case 11:case 15:case 5:case 26:case 27:case 6:case 4:case 17:break;case 1:if(1024&e&&null!==a){e=void 0,n=t,i=a.memoizedProps,a=a.memoizedState,o=n.stateNode;try{var m=Ta(n.type,i,(n.elementType,n.type));e=o.getSnapshotBeforeUpdate(m,a),o.__reactInternalSnapshotBeforeUpdate=e}catch(e){nu(n,n.return,e)}}break;case 3:if(1024&e)if(9===(n=(e=t.stateNode.containerInfo).nodeType))id(e);else if(1===n)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":id(e);break;default:e.textContent=""}break;default:if(1024&e)throw Error(r(163))}if(null!==(e=t.sibling)){e.return=t.return,ts=e;break}ts=t.return}m=ns,ns=!1}(e,c),ps(c,e),Jn(Ku,e.containerInfo),Hd=!!qu,Ku=qu=null,e.current=c,rs(e,c.alternate,c),ie(),Js=l,$.p=a,N.T=n):e.current=c,kc?(kc=!1,Sc=e,Ec=o):Jc(e,u),u=e.pendingLanes,0===u&&(xc=null),function(e){if(ge&&"function"==typeof ge.onCommitFiberRoot)try{ge.onCommitFiberRoot(me,e,void 0,!(128&~e.current.flags))}catch(e){}}(c.stateNode),hu(e),null!==t)for(i=e.onRecoverableError,c=0;c<t.length;c++)u=t[c],i(u.value,{componentStack:u.stack});!!(3&Ec)&&eu(),u=e.pendingLanes,4194218&o&&42&u?e===Nc?Oc++:(Oc=0,Nc=e):Oc=0,mu(0)}(e,t,n,o,f,i,a,l)}finally{N.T=d,$.p=f}}function Jc(e,t){0==(e.pooledCacheLanes&=t)&&(null!=(t=e.pooledCache)&&(e.pooledCache=null,Bo(t)))}function eu(){if(null!==Sc){var e=Sc,t=_c;_c=0;var n=Ae(Ec),o=N.T,i=$.p;try{if($.p=32>n?32:n,N.T=null,null===Sc)var a=!1;else{n=Cc,Cc=null;var l=Sc,s=Ec;if(Sc=null,Ec=0,6&Js)throw Error(r(331));var c=Js;if(Js|=4,Rs(l.current),ks(l,l.current,s,n),Js=c,mu(0,!1),ge&&"function"==typeof ge.onPostCommitFiberRoot)try{ge.onPostCommitFiberRoot(me,l)}catch(e){}a=!0}return a}finally{$.p=i,N.T=o,Jc(e,t)}}return!1}function tu(e,t,n){t=Tr(n,t),null!==(e=Ml(e,t=ja(e.stateNode,t,2),2))&&(Re(e,2),hu(e))}function nu(e,t,n){if(3===e.tag)tu(e,e,n);else for(;null!==t;){if(3===t.tag){tu(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===xc||!xc.has(r))){e=Tr(n,e),null!==(r=Ml(t,n=$a(2),2))&&(Ba(n,r,t,e),Re(r,2),hu(r));break}}t=t.return}}function ru(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new Zs;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(lc=!0,o.add(n),e=ou.bind(null,e,t,n),t.then(e,e))}function ou(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,ec===e&&(nc&n)===n&&(4===cc||3===cc&&(62914560&nc)===nc&&300>ae()-vc?!(2&Js)&&jc(e,0):fc|=n,hc===nc&&(hc=0)),hu(e)}function iu(e,t){0===t&&(t=Ne()),null!==(e=Or(e,t))&&(Re(e,t),hu(e))}function au(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),iu(e,n)}function lu(e,t){var n=0;switch(e.tag){case 13:var o=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(r(314))}null!==o&&o.delete(t),iu(e,n)}var su=null,cu=null,uu=!1,du=!1,fu=!1,pu=0;function hu(e){var t;e!==cu&&null===e.next&&(null===cu?su=cu=e:cu=cu.next=e),du=!0,uu||(uu=!0,t=gu,nd((function(){6&Js?ne(se,t):t()})))}function mu(e,t){if(!fu&&du){fu=!0;do{for(var n=!1,r=su;null!==r;){if(0!==e){var o=r.pendingLanes;if(0===o)var i=0;else{var a=r.suspendedLanes,l=r.pingedLanes;i=(1<<31-ve(42|e)+1)-1,i=201326677&(i&=o&~(a&~l))?201326677&i|1:i?2|i:0}0!==i&&(n=!0,bu(r,i))}else i=nc,!(3&(i=Ee(r,r===ec?i:0)))||_e(r,i)||(n=!0,bu(r,i));r=r.next}}while(n);fu=!1}}function gu(){du=uu=!1;var e=0;0!==pu&&(function(){var e=window.event;if(e&&"popstate"===e.type)return e!==Zu&&(Zu=e,!0);return Zu=null,!1}()&&(e=pu),pu=0);for(var t=ae(),n=null,r=su;null!==r;){var o=r.next,i=yu(r,t);0===i?(r.next=null,null===n?su=o:n.next=o,null===o&&(cu=n)):(n=r,(0!==e||3&i)&&(du=!0)),r=o}mu(e)}function yu(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=-62914561&e.pendingLanes;0<i;){var a=31-ve(i),l=1<<a,s=o[a];-1===s?l&n&&!(l&r)||(o[a]=Ce(l,t)):s<=t&&(e.expiredLanes|=l),i&=~l}if(n=nc,n=Ee(e,e===(t=ec)?n:0),r=e.callbackNode,0===n||e===t&&2===rc||null!==e.cancelPendingCommit)return null!==r&&null!==r&&re(r),e.callbackNode=null,e.callbackPriority=0;if(!(3&n)||_e(e,n)){if((t=n&-n)===e.callbackPriority)return t;switch(null!==r&&re(r),Ae(n)){case 2:case 8:n=ce;break;case 32:default:n=ue;break;case 268435456:n=fe}return r=vu.bind(null,e),n=ne(n,r),e.callbackPriority=t,e.callbackNode=n,t}return null!==r&&null!==r&&re(r),e.callbackPriority=2,e.callbackNode=null,2}function vu(e,t){var n=e.callbackNode;if(eu()&&e.callbackNode!==n)return null;var r=nc;return 0===(r=Ee(e,e===ec?r:0))?null:(Tc(e,r,t),yu(e,ae()),null!=e.callbackNode&&e.callbackNode===n?vu.bind(null,e):null)}function bu(e,t){if(eu())return null;Tc(e,t,!0)}function wu(){return 0===pu&&(pu=Oe()),pu}function xu(e){return null==e||"symbol"==typeof e||"boolean"==typeof e?null:"function"==typeof e?e:Ot(""+e)}function ku(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}for(var Su=0;Su<br.length;Su++){var Eu=br[Su];wr(Eu.toLowerCase(),"on"+(Eu[0].toUpperCase()+Eu.slice(1)))}wr(dr,"onAnimationEnd"),wr(fr,"onAnimationIteration"),wr(pr,"onAnimationStart"),wr("dblclick","onDoubleClick"),wr("focusin","onFocus"),wr("focusout","onBlur"),wr(hr,"onTransitionRun"),wr(mr,"onTransitionStart"),wr(gr,"onTransitionCancel"),wr(yr,"onTransitionEnd"),Je("onMouseEnter",["mouseout","mouseover"]),Je("onMouseLeave",["mouseout","mouseover"]),Je("onPointerEnter",["pointerout","pointerover"]),Je("onPointerLeave",["pointerout","pointerover"]),Ze("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ze("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ze("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ze("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ze("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ze("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _u="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Cu=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(_u));function Ou(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var l=r[a],s=l.instance,c=l.currentTarget;if(l=l.listener,s!==i&&o.isPropagationStopped())break e;i=l,o.currentTarget=c;try{i(o)}catch(e){Aa(e)}o.currentTarget=null,i=s}else for(a=0;a<r.length;a++){if(s=(l=r[a]).instance,c=l.currentTarget,l=l.listener,s!==i&&o.isPropagationStopped())break e;i=l,o.currentTarget=c;try{i(o)}catch(e){Aa(e)}o.currentTarget=null,i=s}}}}function Nu(e,t){var n=t[je];void 0===n&&(n=t[je]=new Set);var r=e+"__bubble";n.has(r)||(Tu(t,e,2,!1),n.add(r))}function Pu(e,t,n){var r=0;t&&(r|=4),Tu(n,e,r,t)}var Ru="_reactListening"+Math.random().toString(36).slice(2);function Mu(e){if(!e[Ru]){e[Ru]=!0,Ge.forEach((function(t){"selectionchange"!==t&&(Cu.has(t)||Pu(t,!1,e),Pu(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Ru]||(t[Ru]=!0,Pu("selectionchange",!1,t))}}function Tu(e,t,n,r){switch(Gd(t)){case 2:var o=Ud;break;case 8:o=Wd;break;default:o=qd}n=o.bind(null,t,n,e),o=void 0,!Lt||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Au(e,t,n,r,o){var i=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var l=r.stateNode.containerInfo;if(l===o||8===l.nodeType&&l.parentNode===o)break;if(4===a)for(a=r.return;null!==a;){var s=a.tag;if((3===s||4===s)&&((s=a.stateNode.containerInfo)===o||8===s.nodeType&&s.parentNode===o))return;a=a.return}for(;null!==l;){if(null===(a=We(l)))return;if(5===(s=a.tag)||6===s||26===s||27===s){r=i=a;continue e}l=l.parentNode}}r=r.return}Dt((function(){var r=i,o=Pt(n),a=[];e:{var l=vr.get(e);if(void 0!==l){var s=Gt,c=e;switch(e){case"keypress":if(0===Vt(n))break e;case"keydown":case"keyup":s=fn;break;case"focusin":c="focus",s=nn;break;case"focusout":c="blur",s=nn;break;case"beforeblur":case"afterblur":s=nn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":s=en;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":s=tn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":s=hn;break;case dr:case fr:case pr:s=rn;break;case yr:s=mn;break;case"scroll":case"scrollend":s=Zt;break;case"wheel":s=gn;break;case"copy":case"cut":case"paste":s=on;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":s=pn;break;case"toggle":case"beforetoggle":s=yn}var u=!!(4&t),d=!u&&("scroll"===e||"scrollend"===e),f=u?null!==l?l+"Capture":null:l;u=[];for(var p,h=r;null!==h;){var m=h;if(p=m.stateNode,5!==(m=m.tag)&&26!==m&&27!==m||null===p||null===f||null!=(m=It(h,f))&&u.push(Du(h,m,p)),d)break;h=h.return}0<u.length&&(l=new s(l,c,null,n,o),a.push({event:l,listeners:u}))}}if(!(7&t)){if(s="mouseout"===e||"pointerout"===e,(!(l="mouseover"===e||"pointerover"===e)||n===Nt||!(c=n.relatedTarget||n.fromElement)||!We(c)&&!c[Fe])&&(s||l)&&(l=o.window===o?o:(l=o.ownerDocument)?l.defaultView||l.parentWindow:window,s?(s=r,null!==(c=(c=n.relatedTarget||n.toElement)?We(c):null)&&(d=I(c),u=c.tag,c!==d||5!==u&&27!==u&&6!==u)&&(c=null)):(s=null,c=r),s!==c)){if(u=en,m="onMouseLeave",f="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(u=pn,m="onPointerLeave",f="onPointerEnter",h="pointer"),d=null==s?l:Ke(s),p=null==c?l:Ke(c),(l=new u(m,h+"leave",s,n,o)).target=d,l.relatedTarget=p,m=null,We(o)===r&&((u=new u(f,h+"enter",c,n,o)).target=p,u.relatedTarget=d,m=u),d=m,s&&c)e:{for(f=c,h=0,p=u=s;p;p=Lu(p))h++;for(p=0,m=f;m;m=Lu(m))p++;for(;0<h-p;)u=Lu(u),h--;for(;0<p-h;)f=Lu(f),p--;for(;h--;){if(u===f||null!==f&&u===f.alternate)break e;u=Lu(u),f=Lu(f)}u=null}else u=null;null!==s&&zu(a,l,s,u,!1),null!==c&&null!==d&&zu(a,d,c,u,!0)}if("select"===(s=(l=r?Ke(r):window).nodeName&&l.nodeName.toLowerCase())||"input"===s&&"file"===l.type)var g=In;else if(Pn(l))if(Ln)g=Wn;else{g=Hn;var y=Vn}else!(s=l.nodeName)||"input"!==s.toLowerCase()||"checkbox"!==l.type&&"radio"!==l.type?r&&Et(r.elementType)&&(g=In):g=Un;switch(g&&(g=g(e,r))?Rn(a,g,n,o):(y&&y(e,l,r),"focusout"===e&&r&&"number"===l.type&&null!=r.memoizedProps.value&&gt(l,"number",l.value)),y=r?Ke(r):window,e){case"focusin":(Pn(y)||"true"===y.contentEditable)&&(tr=y,nr=r,rr=null);break;case"focusout":rr=nr=tr=null;break;case"mousedown":or=!0;break;case"contextmenu":case"mouseup":case"dragend":or=!1,ir(a,n,o);break;case"selectionchange":if(er)break;case"keydown":case"keyup":ir(a,n,o)}var v;if(bn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else On?_n(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(kn&&"ko"!==n.locale&&(On||"onCompositionStart"!==b?"onCompositionEnd"===b&&On&&(v=Bt()):(jt="value"in(Ft=o)?Ft.value:Ft.textContent,On=!0)),0<(y=Iu(r,b)).length&&(b=new an(b,e,null,n,o),a.push({event:b,listeners:y}),v?b.data=v:null!==(v=Cn(n))&&(b.data=v))),(v=xn?function(e,t){switch(e){case"compositionend":return Cn(t);case"keypress":return 32!==t.which?null:(En=!0,Sn);case"textInput":return(e=t.data)===Sn&&En?null:e;default:return null}}(e,n):function(e,t){if(On)return"compositionend"===e||!bn&&_n(e,t)?(e=Bt(),$t=jt=Ft=null,On=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return kn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(b=Iu(r,"onBeforeInput")).length&&(y=new an("onBeforeInput","beforeinput",null,n,o),a.push({event:y,listeners:b}),y.data=v)),function(e,t,n,r,o){if("submit"===t&&n&&n.stateNode===o){var i=xu((o[ze]||null).action),a=r.submitter;a&&null!==(t=(t=a[ze]||null)?xu(t.formAction):a.getAttribute("formAction"))&&(i=t,a=null);var l=new Gt("action","action",null,r,o);e.push({event:l,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(0!==pu){var e=a?ku(o,a):new FormData(o);ua(n,{pending:!0,data:e,method:o.method,action:i},null,e)}}else"function"==typeof i&&(l.preventDefault(),e=a?ku(o,a):new FormData(o),ua(n,{pending:!0,data:e,method:o.method,action:i},i,e))},currentTarget:o}]})}}(a,e,r,n,o)}Ou(a,t)}))}function Du(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Iu(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,i=o.stateNode;5!==(o=o.tag)&&26!==o&&27!==o||null===i||(null!=(o=It(e,n))&&r.unshift(Du(e,o,i)),null!=(o=It(e,t))&&r.push(Du(e,o,i))),e=e.return}return r}function Lu(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag&&27!==e.tag);return e||null}function zu(e,t,n,r,o){for(var i=t._reactName,a=[];null!==n&&n!==r;){var l=n,s=l.alternate,c=l.stateNode;if(l=l.tag,null!==s&&s===r)break;5!==l&&26!==l&&27!==l||null===c||(s=c,o?null!=(c=It(n,i))&&a.unshift(Du(n,c,s)):o||null!=(c=It(n,i))&&a.push(Du(n,c,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var Fu=/\r\n?/g,ju=/\u0000|\uFFFD/g;function $u(e){return("string"==typeof e?e:""+e).replace(Fu,"\n").replace(ju,"")}function Bu(e,t){return t=$u(t),$u(e)===t}function Vu(){}function Hu(e,t,n,o,i,a){switch(n){case"children":"string"==typeof o?"body"===t||"textarea"===t&&""===o||wt(e,o):("number"==typeof o||"bigint"==typeof o)&&"body"!==t&&wt(e,""+o);break;case"className":it(e,"class",o);break;case"tabIndex":it(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":it(e,n,o);break;case"style":St(e,o,a);break;case"data":if("object"!==t){it(e,"data",o);break}case"src":case"href":if(""===o&&("a"!==t||"href"!==n)){e.removeAttribute(n);break}if(null==o||"function"==typeof o||"symbol"==typeof o||"boolean"==typeof o){e.removeAttribute(n);break}o=Ot(""+o),e.setAttribute(n,o);break;case"action":case"formAction":if("function"==typeof o){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}if("function"==typeof a&&("formAction"===n?("input"!==t&&Hu(e,t,"name",i.name,i,null),Hu(e,t,"formEncType",i.formEncType,i,null),Hu(e,t,"formMethod",i.formMethod,i,null),Hu(e,t,"formTarget",i.formTarget,i,null)):(Hu(e,t,"encType",i.encType,i,null),Hu(e,t,"method",i.method,i,null),Hu(e,t,"target",i.target,i,null))),null==o||"symbol"==typeof o||"boolean"==typeof o){e.removeAttribute(n);break}o=Ot(""+o),e.setAttribute(n,o);break;case"onClick":null!=o&&(e.onclick=Vu);break;case"onScroll":null!=o&&Nu("scroll",e);break;case"onScrollEnd":null!=o&&Nu("scrollend",e);break;case"dangerouslySetInnerHTML":if(null!=o){if("object"!=typeof o||!("__html"in o))throw Error(r(61));if(null!=(n=o.__html)){if(null!=i.children)throw Error(r(60));e.innerHTML=n}}break;case"multiple":e.multiple=o&&"function"!=typeof o&&"symbol"!=typeof o;break;case"muted":e.muted=o&&"function"!=typeof o&&"symbol"!=typeof o;break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":case"autoFocus":break;case"xlinkHref":if(null==o||"function"==typeof o||"boolean"==typeof o||"symbol"==typeof o){e.removeAttribute("xlink:href");break}n=Ot(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":null!=o&&"function"!=typeof o&&"symbol"!=typeof o?e.setAttribute(n,""+o):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&"function"!=typeof o&&"symbol"!=typeof o?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":!0===o?e.setAttribute(n,""):!1!==o&&null!=o&&"function"!=typeof o&&"symbol"!=typeof o?e.setAttribute(n,o):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&!isNaN(o)&&1<=o?e.setAttribute(n,o):e.removeAttribute(n);break;case"rowSpan":case"start":null==o||"function"==typeof o||"symbol"==typeof o||isNaN(o)?e.removeAttribute(n):e.setAttribute(n,o);break;case"popover":Nu("beforetoggle",e),Nu("toggle",e),ot(e,"popover",o);break;case"xlinkActuate":at(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":at(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":at(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":at(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":at(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":at(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":at(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":at(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":at(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":ot(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])&&ot(e,n=_t.get(n)||n,o)}}function Uu(e,t,n,o,i,a){switch(n){case"style":St(e,o,a);break;case"dangerouslySetInnerHTML":if(null!=o){if("object"!=typeof o||!("__html"in o))throw Error(r(61));if(null!=(n=o.__html)){if(null!=i.children)throw Error(r(60));e.innerHTML=n}}break;case"children":"string"==typeof o?wt(e,o):("number"==typeof o||"bigint"==typeof o)&&wt(e,""+o);break;case"onScroll":null!=o&&Nu("scroll",e);break;case"onScrollEnd":null!=o&&Nu("scrollend",e);break;case"onClick":null!=o&&(e.onclick=Vu);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":case"innerText":case"textContent":break;default:Qe.hasOwnProperty(n)||("o"!==n[0]||"n"!==n[1]||(i=n.endsWith("Capture"),t=n.slice(2,i?n.length-7:void 0),"function"==typeof(a=null!=(a=e[ze]||null)?a[n]:null)&&e.removeEventListener(t,a,i),"function"!=typeof o)?n in e?e[n]=o:!0===o?e.setAttribute(n,""):ot(e,n,o):("function"!=typeof a&&null!==a&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,o,i)))}}function Wu(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Nu("error",e),Nu("load",e);var o,i=!1,a=!1;for(o in n)if(n.hasOwnProperty(o)){var l=n[o];if(null!=l)switch(o){case"src":i=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Hu(e,t,o,l,n,null)}}return a&&Hu(e,t,"srcSet",n.srcSet,n,null),void(i&&Hu(e,t,"src",n.src,n,null));case"input":Nu("invalid",e);var s=o=l=a=null,c=null,u=null;for(i in n)if(n.hasOwnProperty(i)){var d=n[i];if(null!=d)switch(i){case"name":a=d;break;case"type":l=d;break;case"checked":c=d;break;case"defaultChecked":u=d;break;case"value":o=d;break;case"defaultValue":s=d;break;case"children":case"dangerouslySetInnerHTML":if(null!=d)throw Error(r(137,t));break;default:Hu(e,t,i,d,n,null)}}return mt(e,o,s,c,u,l,a,!1),void ct(e);case"select":for(a in Nu("invalid",e),i=l=o=null,n)if(n.hasOwnProperty(a)&&null!=(s=n[a]))switch(a){case"value":o=s;break;case"defaultValue":l=s;break;case"multiple":i=s;default:Hu(e,t,a,s,n,null)}return t=o,n=l,e.multiple=!!i,void(null!=t?yt(e,!!i,t,!1):null!=n&&yt(e,!!i,n,!0));case"textarea":for(l in Nu("invalid",e),o=a=i=null,n)if(n.hasOwnProperty(l)&&null!=(s=n[l]))switch(l){case"value":i=s;break;case"defaultValue":a=s;break;case"children":o=s;break;case"dangerouslySetInnerHTML":if(null!=s)throw Error(r(91));break;default:Hu(e,t,l,s,n,null)}return bt(e,i,a,o),void ct(e);case"option":for(c in n)if(n.hasOwnProperty(c)&&null!=(i=n[c]))if("selected"===c)e.selected=i&&"function"!=typeof i&&"symbol"!=typeof i;else Hu(e,t,c,i,n,null);return;case"dialog":Nu("cancel",e),Nu("close",e);break;case"iframe":case"object":Nu("load",e);break;case"video":case"audio":for(i=0;i<_u.length;i++)Nu(_u[i],e);break;case"image":Nu("error",e),Nu("load",e);break;case"details":Nu("toggle",e);break;case"embed":case"source":case"link":Nu("error",e),Nu("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in n)if(n.hasOwnProperty(u)&&null!=(i=n[u]))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Hu(e,t,u,i,n,null)}return;default:if(Et(t)){for(d in n)n.hasOwnProperty(d)&&(void 0!==(i=n[d])&&Uu(e,t,d,i,n,void 0));return}}for(s in n)n.hasOwnProperty(s)&&(null!=(i=n[s])&&Hu(e,t,s,i,n,null))}var qu=null,Ku=null;function Xu(e){return 9===e.nodeType?e:e.ownerDocument}function Yu(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Gu(e,t){if(0===e)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return 1===e&&"foreignObject"===t?0:e}function Qu(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"bigint"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Zu=null;var Ju="function"==typeof setTimeout?setTimeout:void 0,ed="function"==typeof clearTimeout?clearTimeout:void 0,td="function"==typeof Promise?Promise:void 0,nd="function"==typeof queueMicrotask?queueMicrotask:void 0!==td?function(e){return td.resolve(null).then(e).catch(rd)}:Ju;function rd(e){setTimeout((function(){throw e}))}function od(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&8===o.nodeType)if("/$"===(n=o.data)){if(0===r)return e.removeChild(o),void mf(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=o}while(n);mf(t)}function id(e){var t=e.firstChild;for(t&&10===t.nodeType&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":id(n),Ue(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if("stylesheet"===n.rel.toLowerCase())continue}e.removeChild(n)}}function ad(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t||"F!"===t||"F"===t)break;if("/$"===t)return null}}return e}function ld(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}function sd(e,t,n){switch(t=Xu(n),e){case"html":if(!(e=t.documentElement))throw Error(r(452));return e;case"head":if(!(e=t.head))throw Error(r(453));return e;case"body":if(!(e=t.body))throw Error(r(454));return e;default:throw Error(r(451))}}var cd=new Map,ud=new Set;function dd(e){return"function"==typeof e.getRootNode?e.getRootNode():e.ownerDocument}var fd=$.d;$.d={f:function(){var e=fd.f(),t=zc();return e||t},r:function(e){var t=qe(e);null!==t&&5===t.tag&&"form"===t.type?fa(t):fd.r(e)},D:function(e){fd.D(e),hd("dns-prefetch",e,null)},C:function(e,t){fd.C(e,t),hd("preconnect",e,t)},L:function(e,t,n){fd.L(e,t,n);var r=pd;if(r&&e&&t){var o='link[rel="preload"][as="'+pt(t)+'"]';"image"===t&&n&&n.imageSrcSet?(o+='[imagesrcset="'+pt(n.imageSrcSet)+'"]',"string"==typeof n.imageSizes&&(o+='[imagesizes="'+pt(n.imageSizes)+'"]')):o+='[href="'+pt(e)+'"]';var i=o;switch(t){case"style":i=gd(e);break;case"script":i=bd(e)}cd.has(i)||(e=P({rel:"preload",href:"image"===t&&n&&n.imageSrcSet?void 0:e,as:t},n),cd.set(i,e),null!==r.querySelector(o)||"style"===t&&r.querySelector(yd(i))||"script"===t&&r.querySelector(wd(i))||(Wu(t=r.createElement("link"),"link",e),Ye(t),r.head.appendChild(t)))}},m:function(e,t){fd.m(e,t);var n=pd;if(n&&e){var r=t&&"string"==typeof t.as?t.as:"script",o='link[rel="modulepreload"][as="'+pt(r)+'"][href="'+pt(e)+'"]',i=o;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=bd(e)}if(!cd.has(i)&&(e=P({rel:"modulepreload",href:e},t),cd.set(i,e),null===n.querySelector(o))){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(wd(i)))return}Wu(r=n.createElement("link"),"link",e),Ye(r),n.head.appendChild(r)}}},X:function(e,t){fd.X(e,t);var n=pd;if(n&&e){var r=Xe(n).hoistableScripts,o=bd(e),i=r.get(o);i||((i=n.querySelector(wd(o)))||(e=P({src:e,async:!0},t),(t=cd.get(o))&&Ed(e,t),Ye(i=n.createElement("script")),Wu(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(o,i))}},S:function(e,t,n){fd.S(e,t,n);var r=pd;if(r&&e){var o=Xe(r).hoistableStyles,i=gd(e);t=t||"default";var a=o.get(i);if(!a){var l={loading:0,preload:null};if(a=r.querySelector(yd(i)))l.loading=5;else{e=P({rel:"stylesheet",href:e,"data-precedence":t},n),(n=cd.get(i))&&Sd(e,n);var s=a=r.createElement("link");Ye(s),Wu(s,"link",e),s._p=new Promise((function(e,t){s.onload=e,s.onerror=t})),s.addEventListener("load",(function(){l.loading|=1})),s.addEventListener("error",(function(){l.loading|=2})),l.loading|=4,kd(a,t,r)}a={type:"stylesheet",instance:a,count:1,state:l},o.set(i,a)}}},M:function(e,t){fd.M(e,t);var n=pd;if(n&&e){var r=Xe(n).hoistableScripts,o=bd(e),i=r.get(o);i||((i=n.querySelector(wd(o)))||(e=P({src:e,async:!0,type:"module"},t),(t=cd.get(o))&&Ed(e,t),Ye(i=n.createElement("script")),Wu(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(o,i))}}};var pd="undefined"==typeof document?null:document;function hd(e,t,n){var r=pd;if(r&&"string"==typeof t&&t){var o=pt(t);o='link[rel="'+e+'"][href="'+o+'"]',"string"==typeof n&&(o+='[crossorigin="'+n+'"]'),ud.has(o)||(ud.add(o),e={rel:e,crossOrigin:n,href:t},null===r.querySelector(o)&&(Wu(t=r.createElement("link"),"link",e),Ye(t),r.head.appendChild(t)))}}function md(e,t,n,o){var i,a,l,s,c=(c=Y.current)?dd(c):null;if(!c)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return"string"==typeof n.precedence&&"string"==typeof n.href?(t=gd(n.href),(o=(n=Xe(c).hoistableStyles).get(t))||(o={type:"style",instance:null,count:0,state:null},n.set(t,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if("stylesheet"===n.rel&&"string"==typeof n.href&&"string"==typeof n.precedence){e=gd(n.href);var u=Xe(c).hoistableStyles,d=u.get(e);if(d||(c=c.ownerDocument||c,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,d),(u=c.querySelector(yd(e)))&&!u._p&&(d.instance=u,d.state.loading=5),cd.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},cd.set(e,n),u||(i=c,a=e,l=n,s=d.state,i.querySelector('link[rel="preload"][as="style"]['+a+"]")?s.loading=1:(a=i.createElement("link"),s.preload=a,a.addEventListener("load",(function(){return s.loading|=1})),a.addEventListener("error",(function(){return s.loading|=2})),Wu(a,"link",l),Ye(a),i.head.appendChild(a))))),t&&null===o)throw Error(r(528,""));return d}if(t&&null!==o)throw Error(r(529,""));return null;case"script":return t=n.async,"string"==typeof(n=n.src)&&t&&"function"!=typeof t&&"symbol"!=typeof t?(t=bd(n),(o=(n=Xe(c).hoistableScripts).get(t))||(o={type:"script",instance:null,count:0,state:null},n.set(t,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function gd(e){return'href="'+pt(e)+'"'}function yd(e){return'link[rel="stylesheet"]['+e+"]"}function vd(e){return P({},e,{"data-precedence":e.precedence,precedence:null})}function bd(e){return'[src="'+pt(e)+'"]'}function wd(e){return"script[async]"+e}function xd(e,t,n){if(t.count++,null===t.instance)switch(t.type){case"style":var o=e.querySelector('style[data-href~="'+pt(n.href)+'"]');if(o)return t.instance=o,Ye(o),o;var i=P({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return Ye(o=(e.ownerDocument||e).createElement("style")),Wu(o,"style",i),kd(o,n.precedence,e),t.instance=o;case"stylesheet":i=gd(n.href);var a=e.querySelector(yd(i));if(a)return t.state.loading|=4,t.instance=a,Ye(a),a;o=vd(n),(i=cd.get(i))&&Sd(o,i),Ye(a=(e.ownerDocument||e).createElement("link"));var l=a;return l._p=new Promise((function(e,t){l.onload=e,l.onerror=t})),Wu(a,"link",o),t.state.loading|=4,kd(a,n.precedence,e),t.instance=a;case"script":return a=bd(n.src),(i=e.querySelector(wd(a)))?(t.instance=i,Ye(i),i):(o=n,(i=cd.get(a))&&Ed(o=P({},n),i),Ye(i=(e=e.ownerDocument||e).createElement("script")),Wu(i,"link",o),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(r(443,t.type))}else"stylesheet"===t.type&&!(4&t.state.loading)&&(o=t.instance,t.state.loading|=4,kd(o,n.precedence,e));return t.instance}function kd(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=r.length?r[r.length-1]:null,i=o,a=0;a<r.length;a++){var l=r[a];if(l.dataset.precedence===t)i=l;else if(i!==o)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=9===n.nodeType?n.head:n).insertBefore(e,t.firstChild)}function Sd(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.title&&(e.title=t.title)}function Ed(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.integrity&&(e.integrity=t.integrity)}var _d=null;function Cd(e,t,n){if(null===_d){var r=new Map,o=_d=new Map;o.set(n,r)}else(r=(o=_d).get(n))||(r=new Map,o.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),o=0;o<n.length;o++){var i=n[o];if(!(i[He]||i[Le]||"link"===e&&"stylesheet"===i.getAttribute("rel"))&&"http://www.w3.org/2000/svg"!==i.namespaceURI){var a=i.getAttribute(t)||"";a=e+a;var l=r.get(a);l?l.push(i):r.set(a,[i])}}return r}function Od(e,t,n){(e=e.ownerDocument||e).head.insertBefore(n,"title"===t?e.querySelector("head > title"):null)}function Nd(e){return!!("stylesheet"!==e.type||3&e.state.loading)}var Pd=null;function Rd(){}function Md(){if(this.count--,0===this.count)if(this.stylesheets)Ad(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}var Td=null;function Ad(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,Td=new Map,t.forEach(Dd,e),Td=null,Md.call(e))}function Dd(e,t){if(!(4&t.state.loading)){var n=Td.get(e);if(n)var r=n.get(null);else{n=new Map,Td.set(e,n);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<o.length;i++){var a=o[i];"LINK"!==a.nodeName&&"not all"===a.getAttribute("media")||(n.set(a.dataset.precedence,a),r=a)}r&&n.set(null,r)}a=(o=t.instance).getAttribute("data-precedence"),(i=n.get(a)||r)===r&&n.set(null,o),n.set(a,o),this.count++,r=Md.bind(this),o.addEventListener("load",r),o.addEventListener("error",r),i?i.parentNode.insertBefore(o,i.nextSibling):(e=9===e.nodeType?e.head:e).insertBefore(o,e.firstChild),t.state.loading|=4}}var Id={$$typeof:h,Provider:null,Consumer:null,_currentValue:B,_currentValue2:B,_threadCount:0};function Ld(e,t,n,r,o,i,a,l){this.tag=1,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Pe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Pe(0),this.hiddenUpdates=Pe(null),this.identifierPrefix=r,this.onUncaughtError=o,this.onCaughtError=i,this.onRecoverableError=a,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function zd(e,t,n,r,o,i,a,l,s,c,u,d){return e=new Ld(e,t,n,a,l,s,c,d),t=1,!0===i&&(t|=24),i=Ds(3,null,null,t),e.current=i,i.stateNode=e,(t=$o()).refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:r,isDehydrated:n,cache:t},Nl(i),e}function Fd(e){return e?e=Rr:Rr}function jd(e,t,n,r,o,i){o=Fd(o),null===r.context?r.context=o:r.pendingContext=o,(r=Rl(t)).payload={element:n},null!==(i=void 0===i?null:i)&&(r.callback=i),null!==(n=Ml(e,r,t))&&(Mc(n,0,t),Tl(n,e,t))}function $d(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Bd(e,t){$d(e,t),(e=e.alternate)&&$d(e,t)}function Vd(e){if(13===e.tag){var t=Or(e,67108864);null!==t&&Mc(t,0,67108864),Bd(e,67108864)}}var Hd=!0;function Ud(e,t,n,r){var o=N.T;N.T=null;var i=$.p;try{$.p=2,qd(e,t,n,r)}finally{$.p=i,N.T=o}}function Wd(e,t,n,r){var o=N.T;N.T=null;var i=$.p;try{$.p=8,qd(e,t,n,r)}finally{$.p=i,N.T=o}}function qd(e,t,n,r){if(Hd){var o=Kd(r);if(null===o)Au(e,t,r,Xd,n),af(e,r);else if(function(e,t,n,r,o){switch(t){case"focusin":return Zd=lf(Zd,e,t,n,r,o),!0;case"dragenter":return Jd=lf(Jd,e,t,n,r,o),!0;case"mouseover":return ef=lf(ef,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return tf.set(i,lf(tf.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,nf.set(i,lf(nf.get(i)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r))r.stopPropagation();else if(af(e,r),4&t&&-1<of.indexOf(e)){for(;null!==o;){var i=qe(o);if(null!==i)switch(i.tag){case 3:if((i=i.stateNode).current.memoizedState.isDehydrated){var a=Se(i.pendingLanes);if(0!==a){var l=i;for(l.pendingLanes|=2,l.entangledLanes|=2;a;){var s=1<<31-ve(a);l.entanglements[1]|=s,a&=~s}hu(i),!(6&Js)&&(bc=ae()+500,mu(0))}}break;case 13:null!==(l=Or(i,2))&&Mc(l,0,2),zc(),Bd(i,2)}if(null===(i=Kd(r))&&Au(e,t,r,Xd,n),i===o)break;o=i}null!==o&&r.stopPropagation()}else Au(e,t,r,null,n)}}function Kd(e){return Yd(e=Pt(e))}var Xd=null;function Yd(e){if(Xd=null,null!==(e=We(e))){var t=I(e);if(null===t)e=null;else{var n=t.tag;if(13===n){if(null!==(e=L(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Xd=e,null}function Gd(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(le()){case se:return 2;case ce:return 8;case ue:case de:return 32;case fe:return 268435456;default:return 32}default:return 32}}var Qd=!1,Zd=null,Jd=null,ef=null,tf=new Map,nf=new Map,rf=[],of="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function af(e,t){switch(e){case"focusin":case"focusout":Zd=null;break;case"dragenter":case"dragleave":Jd=null;break;case"mouseover":case"mouseout":ef=null;break;case"pointerover":case"pointerout":tf.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":nf.delete(t.pointerId)}}function lf(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},null!==t&&(null!==(t=qe(t))&&Vd(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function sf(e){var t=We(e.target);if(null!==t){var n=I(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=L(n)))return e.blockedOn=t,void function(e,t){var n=$.p;try{return $.p=e,t()}finally{$.p=n}}(e.priority,(function(){if(13===n.tag){var e=Pc(),t=Or(n,e);null!==t&&Mc(t,0,e),Bd(n,e)}}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function cf(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Kd(e.nativeEvent);if(null!==n)return null!==(t=qe(n))&&Vd(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);Nt=r,n.target.dispatchEvent(r),Nt=null,t.shift()}return!0}function uf(e,t,n){cf(e)&&n.delete(t)}function df(){Qd=!1,null!==Zd&&cf(Zd)&&(Zd=null),null!==Jd&&cf(Jd)&&(Jd=null),null!==ef&&cf(ef)&&(ef=null),tf.forEach(uf),nf.forEach(uf)}function ff(t,n){t.blockedOn===n&&(t.blockedOn=null,Qd||(Qd=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,df)))}var pf=null;function hf(t){pf!==t&&(pf=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,(function(){pf===t&&(pf=null);for(var e=0;e<t.length;e+=3){var n=t[e],r=t[e+1],o=t[e+2];if("function"!=typeof r){if(null===Yd(r||n))continue;break}var i=qe(n);null!==i&&(t.splice(e,3),e-=3,ua(i,{pending:!0,data:o,method:n.method,action:r},r,o))}})))}function mf(e){function t(t){return ff(t,e)}null!==Zd&&ff(Zd,e),null!==Jd&&ff(Jd,e),null!==ef&&ff(ef,e),tf.forEach(t),nf.forEach(t);for(var n=0;n<rf.length;n++){var r=rf[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<rf.length&&null===(n=rf[0]).blockedOn;)sf(n),null===n.blockedOn&&rf.shift();if(null!=(n=(e.ownerDocument||e).$$reactFormReplay))for(r=0;r<n.length;r+=3){var o=n[r],i=n[r+1],a=o[ze]||null;if("function"==typeof i)a||hf(n);else if(a){var l=null;if(i&&i.hasAttribute("formAction")){if(o=i,a=i[ze]||null)l=a.formAction;else if(null!==Yd(o))continue}else l=a.action;"function"==typeof l?n[r+1]=l:(n.splice(r,3),r-=3),hf(n)}}}function gf(e){this._internalRoot=e}function yf(e){this._internalRoot=e}yf.prototype.render=gf.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(r(409));jd(t.current,Pc(),e,t,null,null)},yf.prototype.unmount=gf.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;0===e.tag&&eu(),jd(e.current,2,null,e,null,null),zc(),t[Fe]=null}},yf.prototype.unstable_scheduleHydration=function(e){if(e){var t=De();e={blockedOn:null,target:e,priority:t};for(var n=0;n<rf.length&&0!==t&&t<rf[n].priority;n++);rf.splice(n,0,e),0===n&&sf(e)}};var vf=t.version;if("19.0.0"!==vf)throw Error(r(527,vf,"19.0.0"));$.findDOMNode=function(e){var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(r(188));throw e=Object.keys(e).join(","),Error(r(268,e))}return e=function(e){var t=e.alternate;if(!t){if(null===(t=I(e)))throw Error(r(188));return t!==e?null:e}for(var n=e,o=t;;){var i=n.return;if(null===i)break;var a=i.alternate;if(null===a){if(null!==(o=i.return)){n=o;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return z(i),e;if(a===o)return z(i),t;a=a.sibling}throw Error(r(188))}if(n.return!==o.return)n=i,o=a;else{for(var l=!1,s=i.child;s;){if(s===n){l=!0,n=i,o=a;break}if(s===o){l=!0,o=i,n=a;break}s=s.sibling}if(!l){for(s=a.child;s;){if(s===n){l=!0,n=a,o=i;break}if(s===o){l=!0,o=a,n=i;break}s=s.sibling}if(!l)throw Error(r(189))}}if(n.alternate!==o)throw Error(r(190))}if(3!==n.tag)throw Error(r(188));return n.stateNode.current===n?e:t}(t),e=null===(e=null!==e?F(e):null)?null:e.stateNode};var bf={bundleType:0,version:"19.0.0",rendererPackageName:"react-dom",currentDispatcherRef:N,findFiberByHostInstance:We,reconcilerVersion:"19.0.0"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var wf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wf.isDisabled&&wf.supportsFiber)try{me=wf.inject(bf),ge=wf}catch(e){}}return Xz.createRoot=function(e,t){if(!o(e))throw Error(r(299));var n=!1,i="",a=Da,l=Ia,s=La;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(i=t.identifierPrefix),void 0!==t.onUncaughtError&&(a=t.onUncaughtError),void 0!==t.onCaughtError&&(l=t.onCaughtError),void 0!==t.onRecoverableError&&(s=t.onRecoverableError),void 0!==t.unstable_transitionCallbacks&&t.unstable_transitionCallbacks),t=zd(e,1,!1,null,0,n,i,a,l,s,0,null),e[Fe]=t.current,Mu(8===e.nodeType?e.parentNode:e),new gf(t)},Xz.hydrateRoot=function(e,t,n){if(!o(e))throw Error(r(299));var i=!1,a="",l=Da,s=Ia,c=La,u=null;return null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(a=n.identifierPrefix),void 0!==n.onUncaughtError&&(l=n.onUncaughtError),void 0!==n.onCaughtError&&(s=n.onCaughtError),void 0!==n.onRecoverableError&&(c=n.onRecoverableError),void 0!==n.unstable_transitionCallbacks&&n.unstable_transitionCallbacks,void 0!==n.formState&&(u=n.formState)),(t=zd(e,1,!0,t,0,i,a,l,s,c,0,u)).context=Fd(null),n=t.current,(a=Rl(i=Pc())).callback=null,Ml(n,a,i),t.current.lanes=i,Re(t,i),hu(t),e[Fe]=t.current,Mu(e),new yf(t)},Xz.version="19.0.0",Xz}var Jz=(qz||(qz=1,function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),Kz.exports=Zz()),Kz.exports);const eF=(e,t)=>{void 0===t&&(t={});const{element:n,eleid:r}="string"==typeof e?{element:document.getElementById(e),eleid:e}:{element:e,eleid:e.id};Jz.createRoot(n).render(s.createElement(s.StrictMode,null,s.createElement(Vz,{...t,id:t.id||r})))};window.FuncNodes=eF}();
105
+ */function Kz(){if($z)return Hz;$z=1;var e=qz(),t=l(),n=Ir();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}var i=Symbol.for("react.element"),a=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),p=Symbol.for("react.consumer"),h=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),v=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),w=Symbol.for("react.offscreen"),x=Symbol.for("react.memo_cache_sentinel"),k=Symbol.iterator;function S(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=k&&e[k]||e["@@iterator"])?e:null}var E=Symbol.for("react.client.reference");function _(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===E?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case c:return"Fragment";case s:return"Portal";case d:return"Profiler";case u:return"StrictMode";case g:return"Suspense";case y:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case h:return(e.displayName||"Context")+".Provider";case p:return(e._context.displayName||"Context")+".Consumer";case m:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case v:return null!==(t=e.displayName||null)?t:_(e.type)||"Memo";case b:t=e._payload,e=e._init;try{return _(e(t))}catch(e){}}return null}var C,O,N=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=Object.assign;function R(e){if(void 0===C)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);C=t&&t[1]||"",O=-1<e.stack.indexOf("\n at")?" (<anonymous>)":-1<e.stack.indexOf("@")?"@unknown:0:0":""}return"\n"+C+e+O}var M=!1;function T(e,t){if(!e||M)return"";M=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={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]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=r.DetermineComponentFrameRoot(),a=i[0],l=i[1];if(a&&l){var s=a.split("\n"),c=l.split("\n");for(o=r=0;r<s.length&&!s[r].includes("DetermineComponentFrameRoot");)r++;for(;o<c.length&&!c[o].includes("DetermineComponentFrameRoot");)o++;if(r===s.length||o===c.length)for(r=s.length-1,o=c.length-1;1<=r&&0<=o&&s[r]!==c[o];)o--;for(;1<=r&&0<=o;r--,o--)if(s[r]!==c[o]){if(1!==r||1!==o)do{if(r--,0>--o||s[r]!==c[o]){var u="\n"+s[r].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}}while(1<=r&&0<=o);break}}}finally{M=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?R(n):""}function A(e){switch(e.tag){case 26:case 27:case 5:return R(e.type);case 16:return R("Lazy");case 13:return R("Suspense");case 19:return R("SuspenseList");case 0:case 15:return e=T(e.type,!1);case 11:return e=T(e.type.render,!1);case 1:return e=T(e.type,!0);default:return""}}function D(e){try{var t="";do{t+=A(e),e=e.return}while(e);return t}catch(e){return"\nError generating stack: "+e.message+"\n"+e.stack}}function I(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function L(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function z(e){if(I(e)!==e)throw Error(r(188))}function F(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e;for(e=e.child;null!==e;){if(null!==(t=F(e)))return t;e=e.sibling}return null}var j=Array.isArray,$=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B={pending:!1,data:null,method:null,action:null},V=[],H=-1;function U(e){return{current:e}}function W(e){0>H||(e.current=V[H],V[H]=null,H--)}function q(e,t){H++,V[H]=e.current,e.current=t}var K=U(null),X=U(null),Y=U(null),G=U(null);function Q(e,t){switch(q(Y,t),q(X,e),q(K,null),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)&&(t=t.namespaceURI)?Yu(t):0;break;default:if(t=(e=8===e?t.parentNode:t).tagName,e=e.namespaceURI)t=Gu(e=Yu(e),t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}W(K),q(K,t)}function Z(){W(K),W(X),W(Y)}function J(e){null!==e.memoizedState&&q(G,e);var t=K.current,n=Gu(t,e.type);t!==n&&(q(X,e),q(K,n))}function ee(e){X.current===e&&(W(K),W(X)),G.current===e&&(W(G),Id._currentValue=B)}var te=Object.prototype.hasOwnProperty,ne=e.unstable_scheduleCallback,re=e.unstable_cancelCallback,oe=e.unstable_shouldYield,ie=e.unstable_requestPaint,ae=e.unstable_now,le=e.unstable_getCurrentPriorityLevel,se=e.unstable_ImmediatePriority,ce=e.unstable_UserBlockingPriority,ue=e.unstable_NormalPriority,de=e.unstable_LowPriority,fe=e.unstable_IdlePriority,pe=e.log,he=e.unstable_setDisableYieldValue,me=null,ge=null;function ye(e){if("function"==typeof pe&&he(e),ge&&"function"==typeof ge.setStrictMode)try{ge.setStrictMode(me,e)}catch(e){}}var ve=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(be(e)/we|0)|0},be=Math.log,we=Math.LN2;var xe=128,ke=4194304;function Se(e){var t=42&e;if(0!==t)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194176&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ee(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=e.warmLanes;e=0!==e.finishedLanes;var l=134217727&n;return 0!==l?0!==(n=l&~o)?r=Se(n):0!==(i&=l)?r=Se(i):e||0!==(a=l&~a)&&(r=Se(a)):0!==(l=n&~o)?r=Se(l):0!==i?r=Se(i):e||0!==(a=n&~a)&&(r=Se(a)),0===r?0:0!==t&&t!==r&&!(t&o)&&((o=r&-r)>=(a=t&-t)||32===o&&4194176&a)?t:r}function _e(e,t){return!(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function Ce(e,t){switch(e){case 1:case 2:case 4:case 8:return t+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function Oe(){var e=xe;return!(4194176&(xe<<=1))&&(xe=128),e}function Ne(){var e=ke;return!(62914560&(ke<<=1))&&(ke=4194304),e}function Pe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Re(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Me(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-ve(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|4194218&n}function Te(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ve(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}function Ae(e){return 2<(e&=-e)?8<e?134217727&e?32:268435456:8:2}function De(){var e=$.p;return 0!==e?e:void 0===(e=window.event)?32:Gd(e.type)}var Ie=Math.random().toString(36).slice(2),Le="__reactFiber$"+Ie,ze="__reactProps$"+Ie,Fe="__reactContainer$"+Ie,je="__reactEvents$"+Ie,$e="__reactListeners$"+Ie,Be="__reactHandles$"+Ie,Ve="__reactResources$"+Ie,He="__reactMarker$"+Ie;function Ue(e){delete e[Le],delete e[ze],delete e[je],delete e[$e],delete e[Be]}function We(e){var t=e[Le];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Fe]||n[Le]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ld(e);null!==e;){if(n=e[Le])return n;e=ld(e)}return t}n=(e=n).parentNode}return null}function qe(e){if(e=e[Le]||e[Fe]){var t=e.tag;if(5===t||6===t||13===t||26===t||27===t||3===t)return e}return null}function Ke(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e.stateNode;throw Error(r(33))}function Xe(e){var t=e[Ve];return t||(t=e[Ve]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ye(e){e[He]=!0}var Ge=new Set,Qe={};function Ze(e,t){Je(e,t),Je(e+"Capture",t)}function Je(e,t){for(Qe[e]=t,e=0;e<t.length;e++)Ge.add(t[e])}var et=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),tt=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),nt={},rt={};function ot(e,t,n){if(o=t,te.call(rt,o)||!te.call(nt,o)&&(tt.test(o)?rt[o]=!0:(nt[o]=!0,0)))if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":return void e.removeAttribute(t);case"boolean":var r=t.toLowerCase().slice(0,5);if("data-"!==r&&"aria-"!==r)return void e.removeAttribute(t)}e.setAttribute(t,""+n)}var o}function it(e,t,n){if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(t)}e.setAttribute(t,""+n)}}function at(e,t,n,r){if(null===r)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(n)}e.setAttributeNS(t,n,""+r)}}function lt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function st(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function ct(e){e._valueTracker||(e._valueTracker=function(e){var t=st(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function ut(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=st(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function dt(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}var ft=/[\n"\\]/g;function pt(e){return e.replace(ft,(function(e){return"\\"+e.charCodeAt(0).toString(16)+" "}))}function ht(e,t,n,r,o,i,a,l){e.name="",null!=a&&"function"!=typeof a&&"symbol"!=typeof a&&"boolean"!=typeof a?e.type=a:e.removeAttribute("type"),null!=t?"number"===a?(0===t&&""===e.value||e.value!=t)&&(e.value=""+lt(t)):e.value!==""+lt(t)&&(e.value=""+lt(t)):"submit"!==a&&"reset"!==a||e.removeAttribute("value"),null!=t?gt(e,a,lt(t)):null!=n?gt(e,a,lt(n)):null!=r&&e.removeAttribute("value"),null==o&&null!=i&&(e.defaultChecked=!!i),null!=o&&(e.checked=o&&"function"!=typeof o&&"symbol"!=typeof o),null!=l&&"function"!=typeof l&&"symbol"!=typeof l&&"boolean"!=typeof l?e.name=""+lt(l):e.removeAttribute("name")}function mt(e,t,n,r,o,i,a,l){if(null!=i&&"function"!=typeof i&&"symbol"!=typeof i&&"boolean"!=typeof i&&(e.type=i),null!=t||null!=n){if(("submit"===i||"reset"===i)&&null==t)return;n=null!=n?""+lt(n):"",t=null!=t?""+lt(t):n,l||t===e.value||(e.value=t),e.defaultValue=t}r="function"!=typeof(r=null!=r?r:o)&&"symbol"!=typeof r&&!!r,e.checked=l?e.checked:!!r,e.defaultChecked=!!r,null!=a&&"function"!=typeof a&&"symbol"!=typeof a&&"boolean"!=typeof a&&(e.name=a)}function gt(e,t,n){"number"===t&&dt(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function yt(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+lt(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function vt(e,t,n){null==t||((t=""+lt(t))!==e.value&&(e.value=t),null!=n)?e.defaultValue=null!=n?""+lt(n):"":e.defaultValue!==t&&(e.defaultValue=t)}function bt(e,t,n,o){if(null==t){if(null!=o){if(null!=n)throw Error(r(92));if(j(o)){if(1<o.length)throw Error(r(93));o=o[0]}n=o}null==n&&(n=""),t=n}n=lt(t),e.defaultValue=n,(o=e.textContent)===n&&""!==o&&null!==o&&(e.value=o)}function wt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var xt=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function kt(e,t,n){var r=0===t.indexOf("--");null==n||"boolean"==typeof n||""===n?r?e.setProperty(t,""):"float"===t?e.cssFloat="":e[t]="":r?e.setProperty(t,n):"number"!=typeof n||0===n||xt.has(t)?"float"===t?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function St(e,t,n){if(null!=t&&"object"!=typeof t)throw Error(r(62));if(e=e.style,null!=n){for(var o in n)!n.hasOwnProperty(o)||null!=t&&t.hasOwnProperty(o)||(0===o.indexOf("--")?e.setProperty(o,""):"float"===o?e.cssFloat="":e[o]="");for(var i in t)o=t[i],t.hasOwnProperty(i)&&n[i]!==o&&kt(e,i,o)}else for(var a in t)t.hasOwnProperty(a)&&kt(e,a,t[a])}function Et(e){if(-1===e.indexOf("-"))return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var _t=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Ct=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Ot(e){return Ct.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var Nt=null;function Pt(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Rt=null,Mt=null;function Tt(e){var t=qe(e);if(t&&(e=t.stateNode)){var n=e[ze]||null;e:switch(e=t.stateNode,t.type){case"input":if(ht(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+pt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var o=n[t];if(o!==e&&o.form===e.form){var i=o[ze]||null;if(!i)throw Error(r(90));ht(o,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)(o=n[t]).form===e.form&&ut(o)}break e;case"textarea":vt(e,n.value,n.defaultValue);break e;case"select":null!=(t=n.value)&&yt(e,!!n.multiple,t,!1)}}}var At=!1;function Dt(e,t,n){if(At)return e(t,n);At=!0;try{return e(t)}finally{if(At=!1,(null!==Rt||null!==Mt)&&(zc(),Rt&&(t=Rt,e=Mt,Mt=Rt=null,Tt(t),e)))for(t=0;t<e.length;t++)Tt(e[t])}}function It(e,t){var n=e.stateNode;if(null===n)return null;var o=n[ze]||null;if(null===o)return null;n=o[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(o=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!o;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(r(231,t,typeof n));return n}var Lt=!1;if(et)try{var zt={};Object.defineProperty(zt,"passive",{get:function(){Lt=!0}}),window.addEventListener("test",zt,zt),window.removeEventListener("test",zt,zt)}catch(e){Lt=!1}var Ft=null,jt=null,$t=null;function Bt(){if($t)return $t;var e,t,n=jt,r=n.length,o="value"in Ft?Ft.value:Ft.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return $t=o.slice(e,1<t?1-t:void 0)}function Vt(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function Ht(){return!0}function Ut(){return!1}function Wt(e){function t(t,n,r,o,i){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(o):o[a]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?Ht:Ut,this.isPropagationStopped=Ut,this}return P(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Ht)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Ht)},persist:function(){},isPersistent:Ht}),t}var qt,Kt,Xt,Yt={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Gt=Wt(Yt),Qt=P({},Yt,{view:0,detail:0}),Zt=Wt(Qt),Jt=P({},Qt,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:dn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Xt&&(Xt&&"mousemove"===e.type?(qt=e.screenX-Xt.screenX,Kt=e.screenY-Xt.screenY):Kt=qt=0,Xt=e),qt)},movementY:function(e){return"movementY"in e?e.movementY:Kt}}),en=Wt(Jt),tn=Wt(P({},Jt,{dataTransfer:0})),nn=Wt(P({},Qt,{relatedTarget:0})),rn=Wt(P({},Yt,{animationName:0,elapsedTime:0,pseudoElement:0})),on=Wt(P({},Yt,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),an=Wt(P({},Yt,{data:0})),ln={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},sn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},cn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function un(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=cn[e])&&!!t[e]}function dn(){return un}var fn=Wt(P({},Qt,{key:function(e){if(e.key){var t=ln[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Vt(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?sn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:dn,charCode:function(e){return"keypress"===e.type?Vt(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Vt(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),pn=Wt(P({},Jt,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),hn=Wt(P({},Qt,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:dn})),mn=Wt(P({},Yt,{propertyName:0,elapsedTime:0,pseudoElement:0})),gn=Wt(P({},Jt,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),yn=Wt(P({},Yt,{newState:0,oldState:0})),vn=[9,13,27,32],bn=et&&"CompositionEvent"in window,wn=null;et&&"documentMode"in document&&(wn=document.documentMode);var xn=et&&"TextEvent"in window&&!wn,kn=et&&(!bn||wn&&8<wn&&11>=wn),Sn=String.fromCharCode(32),En=!1;function _n(e,t){switch(e){case"keyup":return-1!==vn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Cn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var On=!1;var Nn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Pn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Nn[e.type]:"textarea"===t}function Rn(e,t,n,r){Rt?Mt?Mt.push(r):Mt=[r]:Rt=r,0<(t=Iu(t,"onChange")).length&&(n=new Gt("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Mn=null,Tn=null;function An(e){Ou(e,0)}function Dn(e){if(ut(Ke(e)))return e}function In(e,t){if("change"===e)return t}var Ln=!1;if(et){var zn;if(et){var Fn="oninput"in document;if(!Fn){var jn=document.createElement("div");jn.setAttribute("oninput","return;"),Fn="function"==typeof jn.oninput}zn=Fn}else zn=!1;Ln=zn&&(!document.documentMode||9<document.documentMode)}function $n(){Mn&&(Mn.detachEvent("onpropertychange",Bn),Tn=Mn=null)}function Bn(e){if("value"===e.propertyName&&Dn(Tn)){var t=[];Rn(t,Tn,e,Pt(e)),Dt(An,t)}}function Vn(e,t,n){"focusin"===e?($n(),Tn=n,(Mn=t).attachEvent("onpropertychange",Bn)):"focusout"===e&&$n()}function Hn(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Dn(Tn)}function Un(e,t){if("click"===e)return Dn(t)}function Wn(e,t){if("input"===e||"change"===e)return Dn(t)}var qn="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function Kn(e,t){if(qn(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!te.call(t,o)||!qn(e[o],t[o]))return!1}return!0}function Xn(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Yn(e,t){var n,r=Xn(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Xn(r)}}function Gn(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?Gn(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function Qn(e){for(var t=dt((e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window).document);t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=dt((e=t.contentWindow).document)}return t}function Zn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function Jn(e,t){var n=Qn(t);t=e.focusedElem;var r=e.selectionRange;if(n!==t&&t&&t.ownerDocument&&Gn(t.ownerDocument.documentElement,t)){if(null!==r&&Zn(t))if(e=r.start,void 0===(n=r.end)&&(n=e),"selectionStart"in t)t.selectionStart=e,t.selectionEnd=Math.min(n,t.value.length);else if((n=(e=t.ownerDocument||document)&&e.defaultView||window).getSelection){n=n.getSelection();var o=t.textContent.length,i=Math.min(r.start,o);r=void 0===r.end?i:Math.min(r.end,o),!n.extend&&i>r&&(o=r,r=i,i=o),o=Yn(t,i);var a=Yn(t,r);o&&a&&(1!==n.rangeCount||n.anchorNode!==o.node||n.anchorOffset!==o.offset||n.focusNode!==a.node||n.focusOffset!==a.offset)&&((e=e.createRange()).setStart(o.node,o.offset),n.removeAllRanges(),i>r?(n.addRange(e),n.extend(a.node,a.offset)):(e.setEnd(a.node,a.offset),n.addRange(e)))}for(e=[],n=t;n=n.parentNode;)1===n.nodeType&&e.push({element:n,left:n.scrollLeft,top:n.scrollTop});for("function"==typeof t.focus&&t.focus(),t=0;t<e.length;t++)(n=e[t]).element.scrollLeft=n.left,n.element.scrollTop=n.top}}var er=et&&"documentMode"in document&&11>=document.documentMode,tr=null,nr=null,rr=null,or=!1;function ir(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;or||null==tr||tr!==dt(r)||("selectionStart"in(r=tr)&&Zn(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},rr&&Kn(rr,r)||(rr=r,0<(r=Iu(nr,"onSelect")).length&&(t=new Gt("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=tr)))}function ar(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var lr={animationend:ar("Animation","AnimationEnd"),animationiteration:ar("Animation","AnimationIteration"),animationstart:ar("Animation","AnimationStart"),transitionrun:ar("Transition","TransitionRun"),transitionstart:ar("Transition","TransitionStart"),transitioncancel:ar("Transition","TransitionCancel"),transitionend:ar("Transition","TransitionEnd")},sr={},cr={};function ur(e){if(sr[e])return sr[e];if(!lr[e])return e;var t,n=lr[e];for(t in n)if(n.hasOwnProperty(t)&&t in cr)return sr[e]=n[t];return e}et&&(cr=document.createElement("div").style,"AnimationEvent"in window||(delete lr.animationend.animation,delete lr.animationiteration.animation,delete lr.animationstart.animation),"TransitionEvent"in window||delete lr.transitionend.transition);var dr=ur("animationend"),fr=ur("animationiteration"),pr=ur("animationstart"),hr=ur("transitionrun"),mr=ur("transitionstart"),gr=ur("transitioncancel"),yr=ur("transitionend"),vr=new Map,br="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll scrollEnd toggle touchMove waiting wheel".split(" ");function wr(e,t){vr.set(e,t),Ze(t,[e])}var xr=[],kr=0,Sr=0;function Er(){for(var e=kr,t=Sr=kr=0;t<e;){var n=xr[t];xr[t++]=null;var r=xr[t];xr[t++]=null;var o=xr[t];xr[t++]=null;var i=xr[t];if(xr[t++]=null,null!==r&&null!==o){var a=r.pending;null===a?o.next=o:(o.next=a.next,a.next=o),r.pending=o}0!==i&&Nr(n,o,i)}}function _r(e,t,n,r){xr[kr++]=e,xr[kr++]=t,xr[kr++]=n,xr[kr++]=r,Sr|=r,e.lanes|=r,null!==(e=e.alternate)&&(e.lanes|=r)}function Cr(e,t,n,r){return _r(e,t,n,r),Pr(e)}function Or(e,t){return _r(e,null,null,t),Pr(e)}function Nr(e,t,n){e.lanes|=n;var r=e.alternate;null!==r&&(r.lanes|=n);for(var o=!1,i=e.return;null!==i;)i.childLanes|=n,null!==(r=i.alternate)&&(r.childLanes|=n),22===i.tag&&(null===(e=i.stateNode)||1&e._visibility||(o=!0)),e=i,i=i.return;o&&null!==t&&3===e.tag&&(i=e.stateNode,o=31-ve(n),null===(e=(i=i.hiddenUpdates)[o])?i[o]=[t]:e.push(t),t.lane=536870912|n)}function Pr(e){if(50<Oc)throw Oc=0,Nc=null,Error(r(185));for(var t=e.return;null!==t;)t=(e=t).return;return 3===e.tag?e.stateNode:null}var Rr={},Mr=new WeakMap;function Tr(e,t){if("object"==typeof e&&null!==e){var n=Mr.get(e);return void 0!==n?n:(t={value:e,source:t,stack:D(t)},Mr.set(e,t),t)}return{value:e,source:t,stack:D(t)}}var Ar=[],Dr=0,Lr=null,zr=0,Fr=[],jr=0,$r=null,Br=1,Vr="";function Hr(e,t){Ar[Dr++]=zr,Ar[Dr++]=Lr,Lr=e,zr=t}function Ur(e,t,n){Fr[jr++]=Br,Fr[jr++]=Vr,Fr[jr++]=$r,$r=e;var r=Br;e=Vr;var o=32-ve(r)-1;r&=~(1<<o),n+=1;var i=32-ve(t)+o;if(30<i){var a=o-o%5;i=(r&(1<<a)-1).toString(32),r>>=a,o-=a,Br=1<<32-ve(t)+o|n<<o|r,Vr=i+e}else Br=1<<i|n<<o|r,Vr=e}function Wr(e){null!==e.return&&(Hr(e,1),Ur(e,1,0))}function qr(e){for(;e===Lr;)Lr=Ar[--Dr],Ar[Dr]=null,zr=Ar[--Dr],Ar[Dr]=null;for(;e===$r;)$r=Fr[--jr],Fr[jr]=null,Vr=Fr[--jr],Fr[jr]=null,Br=Fr[--jr],Fr[jr]=null}var Kr=null,Xr=null,Yr=!1,Gr=null,Qr=!1,Zr=Error(r(519));function Jr(e){throw oo(Tr(Error(r(418,"")),e)),Zr}function eo(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Le]=e,t[ze]=r,n){case"dialog":Nu("cancel",t),Nu("close",t);break;case"iframe":case"object":case"embed":Nu("load",t);break;case"video":case"audio":for(n=0;n<_u.length;n++)Nu(_u[n],t);break;case"source":Nu("error",t);break;case"img":case"image":case"link":Nu("error",t),Nu("load",t);break;case"details":Nu("toggle",t);break;case"input":Nu("invalid",t),mt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0),ct(t);break;case"select":Nu("invalid",t);break;case"textarea":Nu("invalid",t),bt(t,r.value,r.defaultValue,r.children),ct(t)}"string"!=typeof(n=r.children)&&"number"!=typeof n&&"bigint"!=typeof n||t.textContent===""+n||!0===r.suppressHydrationWarning||Bu(t.textContent,n)?(null!=r.popover&&(Nu("beforetoggle",t),Nu("toggle",t)),null!=r.onScroll&&Nu("scroll",t),null!=r.onScrollEnd&&Nu("scrollend",t),null!=r.onClick&&(t.onclick=Vu),t=!0):t=!1,t||Jr(e)}function to(e){for(Kr=e.return;Kr;)switch(Kr.tag){case 3:case 27:return void(Qr=!0);case 5:case 13:return void(Qr=!1);default:Kr=Kr.return}}function no(e){if(e!==Kr)return!1;if(!Yr)return to(e),Yr=!0,!1;var t,n=!1;if((t=3!==e.tag&&27!==e.tag)&&((t=5===e.tag)&&(t=!("form"!==(t=e.type)&&"button"!==t)||Qu(e.type,e.memoizedProps)),t=!t),t&&(n=!0),n&&Xr&&Jr(e),to(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(r(317));e:{for(e=e.nextSibling,n=0;e;){if(8===e.nodeType)if("/$"===(t=e.data)){if(0===n){Xr=ad(e.nextSibling);break e}n--}else"$"!==t&&"$!"!==t&&"$?"!==t||n++;e=e.nextSibling}Xr=null}}else Xr=Kr?ad(e.stateNode.nextSibling):null;return!0}function ro(){Xr=Kr=null,Yr=!1}function oo(e){null===Gr?Gr=[e]:Gr.push(e)}var io=Error(r(460)),ao=Error(r(474)),lo={then:function(){}};function so(e){return"fulfilled"===(e=e.status)||"rejected"===e}function co(){}function uo(e,t,n){switch(void 0===(n=e[n])?e.push(t):n!==t&&(t.then(co,co),t=n),t.status){case"fulfilled":return t.value;case"rejected":if((e=t.reason)===io)throw Error(r(483));throw e;default:if("string"==typeof t.status)t.then(co,co);else{if(null!==(e=ec)&&100<e.shellSuspendCounter)throw Error(r(482));(e=t).status="pending",e.then((function(e){if("pending"===t.status){var n=t;n.status="fulfilled",n.value=e}}),(function(e){if("pending"===t.status){var n=t;n.status="rejected",n.reason=e}}))}switch(t.status){case"fulfilled":return t.value;case"rejected":if((e=t.reason)===io)throw Error(r(483));throw e}throw fo=t,io}}var fo=null;function po(){if(null===fo)throw Error(r(459));var e=fo;return fo=null,e}var ho=null,mo=0;function go(e){var t=mo;return mo+=1,null===ho&&(ho=[]),uo(ho,e,t)}function yo(e,t){t=t.props.ref,e.ref=void 0!==t?t:null}function vo(e,t){if(t.$$typeof===i)throw Error(r(525));throw e=Object.prototype.toString.call(t),Error(r(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function bo(e){return(0,e._init)(e._payload)}function wo(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function o(e){for(var t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function i(e,t){return(e=Ls(e,t)).index=0,e.sibling=null,e}function l(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=33554434,n):r:(t.flags|=33554434,n):(t.flags|=1048576,n)}function u(t){return e&&null===t.alternate&&(t.flags|=33554434),t}function d(e,t,n,r){return null===t||6!==t.tag?((t=Bs(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function f(e,t,n,r){var o=n.type;return o===c?m(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===b&&bo(o)===t.type)?(yo(t=i(t,n.props),n),t.return=e,t):(yo(t=Fs(n.type,n.key,n.props,null,e.mode,r),n),t.return=e,t)}function p(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Vs(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function m(e,t,n,r,o){return null===t||7!==t.tag?((t=js(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function g(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t||"bigint"==typeof t)return(t=Bs(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case a:return yo(n=Fs(t.type,t.key,t.props,null,e.mode,n),t),n.return=e,n;case s:return(t=Vs(t,e.mode,n)).return=e,t;case b:return g(e,t=(0,t._init)(t._payload),n)}if(j(t)||S(t))return(t=js(t,e.mode,n,null)).return=e,t;if("function"==typeof t.then)return g(e,go(t),n);if(t.$$typeof===h)return g(e,_l(e,t),n);vo(e,t)}return null}function y(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n||"bigint"==typeof n)return null!==o?null:d(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case a:return n.key===o?f(e,t,n,r):null;case s:return n.key===o?p(e,t,n,r):null;case b:return y(e,t,n=(o=n._init)(n._payload),r)}if(j(n)||S(n))return null!==o?null:m(e,t,n,r,null);if("function"==typeof n.then)return y(e,t,go(n),r);if(n.$$typeof===h)return y(e,t,_l(e,n),r);vo(e,n)}return null}function v(e,t,n,r,o){if("string"==typeof r&&""!==r||"number"==typeof r||"bigint"==typeof r)return d(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case a:return f(t,e=e.get(null===r.key?n:r.key)||null,r,o);case s:return p(t,e=e.get(null===r.key?n:r.key)||null,r,o);case b:return v(e,t,n,r=(0,r._init)(r._payload),o)}if(j(r)||S(r))return m(t,e=e.get(n)||null,r,o,null);if("function"==typeof r.then)return v(e,t,n,go(r),o);if(r.$$typeof===h)return v(e,t,n,_l(t,r),o);vo(t,r)}return null}function w(d,f,p,m){if("object"==typeof p&&null!==p&&p.type===c&&null===p.key&&(p=p.props.children),"object"==typeof p&&null!==p){switch(p.$$typeof){case a:e:{for(var x=p.key;null!==f;){if(f.key===x){if((x=p.type)===c){if(7===f.tag){n(d,f.sibling),(m=i(f,p.props.children)).return=d,d=m;break e}}else if(f.elementType===x||"object"==typeof x&&null!==x&&x.$$typeof===b&&bo(x)===f.type){n(d,f.sibling),yo(m=i(f,p.props),p),m.return=d,d=m;break e}n(d,f);break}t(d,f),f=f.sibling}p.type===c?((m=js(p.props.children,d.mode,m,p.key)).return=d,d=m):(yo(m=Fs(p.type,p.key,p.props,null,d.mode,m),p),m.return=d,d=m)}return u(d);case s:e:{for(x=p.key;null!==f;){if(f.key===x){if(4===f.tag&&f.stateNode.containerInfo===p.containerInfo&&f.stateNode.implementation===p.implementation){n(d,f.sibling),(m=i(f,p.children||[])).return=d,d=m;break e}n(d,f);break}t(d,f),f=f.sibling}(m=Vs(p,d.mode,m)).return=d,d=m}return u(d);case b:return w(d,f,p=(x=p._init)(p._payload),m)}if(j(p))return function(r,i,a,s){for(var c=null,u=null,d=i,f=i=0,p=null;null!==d&&f<a.length;f++){d.index>f?(p=d,d=null):p=d.sibling;var h=y(r,d,a[f],s);if(null===h){null===d&&(d=p);break}e&&d&&null===h.alternate&&t(r,d),i=l(h,i,f),null===u?c=h:u.sibling=h,u=h,d=p}if(f===a.length)return n(r,d),Yr&&Hr(r,f),c;if(null===d){for(;f<a.length;f++)null!==(d=g(r,a[f],s))&&(i=l(d,i,f),null===u?c=d:u.sibling=d,u=d);return Yr&&Hr(r,f),c}for(d=o(d);f<a.length;f++)null!==(p=v(d,r,f,a[f],s))&&(e&&null!==p.alternate&&d.delete(null===p.key?f:p.key),i=l(p,i,f),null===u?c=p:u.sibling=p,u=p);return e&&d.forEach((function(e){return t(r,e)})),Yr&&Hr(r,f),c}(d,f,p,m);if(S(p)){if("function"!=typeof(x=S(p)))throw Error(r(150));return function(i,a,s,c){if(null==s)throw Error(r(151));for(var u=null,d=null,f=a,p=a=0,h=null,m=s.next();null!==f&&!m.done;p++,m=s.next()){f.index>p?(h=f,f=null):h=f.sibling;var b=y(i,f,m.value,c);if(null===b){null===f&&(f=h);break}e&&f&&null===b.alternate&&t(i,f),a=l(b,a,p),null===d?u=b:d.sibling=b,d=b,f=h}if(m.done)return n(i,f),Yr&&Hr(i,p),u;if(null===f){for(;!m.done;p++,m=s.next())null!==(m=g(i,m.value,c))&&(a=l(m,a,p),null===d?u=m:d.sibling=m,d=m);return Yr&&Hr(i,p),u}for(f=o(f);!m.done;p++,m=s.next())null!==(m=v(f,i,p,m.value,c))&&(e&&null!==m.alternate&&f.delete(null===m.key?p:m.key),a=l(m,a,p),null===d?u=m:d.sibling=m,d=m);return e&&f.forEach((function(e){return t(i,e)})),Yr&&Hr(i,p),u}(d,f,p=x.call(p),m)}if("function"==typeof p.then)return w(d,f,go(p),m);if(p.$$typeof===h)return w(d,f,_l(d,p),m);vo(d,p)}return"string"==typeof p&&""!==p||"number"==typeof p||"bigint"==typeof p?(p=""+p,null!==f&&6===f.tag?(n(d,f.sibling),(m=i(f,p)).return=d,d=m):(n(d,f),(m=Bs(p,d.mode,m)).return=d,d=m),u(d)):n(d,f)}return function(e,t,n,r){try{mo=0;var o=w(e,t,n,r);return ho=null,o}catch(t){if(t===io)throw t;var i=Ds(29,t,null,e.mode);return i.lanes=r,i.return=e,i}}}var xo=wo(!0),ko=wo(!1),So=U(null),Eo=U(0);function _o(e,t){q(Eo,e=sc),q(So,t),sc=e|t.baseLanes}function Co(){q(Eo,sc),q(So,So.current)}function Oo(){sc=Eo.current,W(So),W(Eo)}var No=U(null),Po=null;function Ro(e){var t=e.alternate;q(Do,1&Do.current),q(No,e),null===Po&&(null===t||null!==So.current||null!==t.memoizedState)&&(Po=e)}function Mo(e){if(22===e.tag){if(q(Do,Do.current),q(No,e),null===Po){var t=e.alternate;null!==t&&null!==t.memoizedState&&(Po=e)}}else To()}function To(){q(Do,Do.current),q(No,No.current)}function Ao(e){W(No),Po===e&&(Po=null),W(Do)}var Do=U(0);function Io(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Lo="undefined"!=typeof AbortController?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach((function(e){return e()}))}},zo=e.unstable_scheduleCallback,Fo=e.unstable_NormalPriority,jo={$$typeof:h,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function $o(){return{controller:new Lo,data:new Map,refCount:0}}function Bo(e){e.refCount--,0===e.refCount&&zo(Fo,(function(){e.controller.abort()}))}var Vo=null,Ho=0,Uo=0,Wo=null;function qo(){if(0==--Ho&&null!==Vo){null!==Wo&&(Wo.status="fulfilled");var e=Vo;Vo=null,Uo=0,Wo=null;for(var t=0;t<e.length;t++)(0,e[t])()}}var Ko=N.S;N.S=function(e,t){"object"==typeof t&&null!==t&&"function"==typeof t.then&&function(e,t){if(null===Vo){var n=Vo=[];Ho=0,Uo=wu(),Wo={status:"pending",value:void 0,then:function(e){n.push(e)}}}Ho++,t.then(qo,qo)}(0,t),null!==Ko&&Ko(e,t)};var Xo=U(null);function Yo(){var e=Xo.current;return null!==e?e:ec.pooledCache}function Go(e,t){q(Xo,null===t?Xo.current:t.pool)}function Qo(){var e=Yo();return null===e?null:{parent:jo._currentValue,pool:e}}var Zo=0,Jo=null,ei=null,ti=null,ni=!1,ri=!1,oi=!1,ii=0,ai=0,li=null,si=0;function ci(){throw Error(r(321))}function ui(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!qn(e[n],t[n]))return!1;return!0}function di(e,t,n,r,o,i){return Zo=i,Jo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,N.H=null===e||null===e.memoizedState?_a:Ca,oi=!1,i=n(r,o),oi=!1,ri&&(i=pi(t,n,r,o)),fi(e),i}function fi(e){N.H=Ea;var t=null!==ei&&null!==ei.next;if(Zo=0,ti=ei=Jo=null,ni=!1,ai=0,li=null,t)throw Error(r(300));null===e||Ha||null!==(e=e.dependencies)&&kl(e)&&(Ha=!0)}function pi(e,t,n,o){Jo=e;var i=0;do{if(ri&&(li=null),ai=0,ri=!1,25<=i)throw Error(r(301));if(i+=1,ti=ei=null,null!=e.updateQueue){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,null!=a.memoCache&&(a.memoCache.index=0)}N.H=Oa,a=t(n,o)}while(ri);return a}function hi(){var e=N.H,t=e.useState()[0];return t="function"==typeof t.then?wi(t):t,e=e.useState()[0],(null!==ei?ei.memoizedState:null)!==e&&(Jo.flags|=1024),t}function mi(){var e=0!==ii;return ii=0,e}function gi(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function yi(e){if(ni){for(e=e.memoizedState;null!==e;){var t=e.queue;null!==t&&(t.pending=null),e=e.next}ni=!1}Zo=0,ti=ei=Jo=null,ri=!1,ai=ii=0,li=null}function vi(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ti?Jo.memoizedState=ti=e:ti=ti.next=e,ti}function bi(){if(null===ei){var e=Jo.alternate;e=null!==e?e.memoizedState:null}else e=ei.next;var t=null===ti?Jo.memoizedState:ti.next;if(null!==t)ti=t,ei=e;else{if(null===e){if(null===Jo.alternate)throw Error(r(467));throw Error(r(310))}e={memoizedState:(ei=e).memoizedState,baseState:ei.baseState,baseQueue:ei.baseQueue,queue:ei.queue,next:null},null===ti?Jo.memoizedState=ti=e:ti=ti.next=e}return ti}function wi(e){var t=ai;return ai+=1,null===li&&(li=[]),e=uo(li,e,t),t=Jo,null===(null===ti?t.memoizedState:ti.next)&&(t=t.alternate,N.H=null===t||null===t.memoizedState?_a:Ca),e}function xi(e){if(null!==e&&"object"==typeof e){if("function"==typeof e.then)return wi(e);if(e.$$typeof===h)return El(e)}throw Error(r(438,String(e)))}function ki(e){var t=null,n=Jo.updateQueue;if(null!==n&&(t=n.memoCache),null==t){var r=Jo.alternate;null!==r&&(null!==(r=r.updateQueue)&&(null!=(r=r.memoCache)&&(t={data:r.data.map((function(e){return e.slice()})),index:0})))}if(null==t&&(t={data:[],index:0}),null===n&&(n={lastEffect:null,events:null,stores:null,memoCache:null},Jo.updateQueue=n),n.memoCache=t,void 0===(n=t.data[t.index]))for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=x;return t.index++,n}function Si(e,t){return"function"==typeof t?t(e):t}function Ei(e){return _i(bi(),ei,e)}function _i(e,t,n){var o=e.queue;if(null===o)throw Error(r(311));o.lastRenderedReducer=n;var i=e.baseQueue,a=o.pending;if(null!==a){if(null!==i){var l=i.next;i.next=a.next,a.next=l}t.baseQueue=i=a,o.pending=null}if(a=e.baseState,null===i)e.memoizedState=a;else{var s=l=null,c=null,u=t=i.next,d=!1;do{var f=-536870913&u.lane;if(f!==u.lane?(nc&f)===f:(Zo&f)===f){var p=u.revertLane;if(0===p)null!==c&&(c=c.next={lane:0,revertLane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Uo&&(d=!0);else{if((Zo&p)===p){u=u.next,p===Uo&&(d=!0);continue}f={lane:0,revertLane:u.revertLane,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},null===c?(s=c=f,l=a):c=c.next=f,Jo.lanes|=p,uc|=p}f=u.action,oi&&n(a,f),a=u.hasEagerState?u.eagerState:n(a,f)}else p={lane:f,revertLane:u.revertLane,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},null===c?(s=c=p,l=a):c=c.next=p,Jo.lanes|=f,uc|=f;u=u.next}while(null!==u&&u!==t);if(null===c?l=a:c.next=s,!qn(a,e.memoizedState)&&(Ha=!0,d&&null!==(n=Wo)))throw n;e.memoizedState=a,e.baseState=l,e.baseQueue=c,o.lastRenderedState=a}return null===i&&(o.lanes=0),[e.memoizedState,o.dispatch]}function Ci(e){var t=bi(),n=t.queue;if(null===n)throw Error(r(311));n.lastRenderedReducer=e;var o=n.dispatch,i=n.pending,a=t.memoizedState;if(null!==i){n.pending=null;var l=i=i.next;do{a=e(a,l.action),l=l.next}while(l!==i);qn(a,t.memoizedState)||(Ha=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,o]}function Oi(e,t,n){var o=Jo,i=bi(),a=Yr;if(a){if(void 0===n)throw Error(r(407));n=n()}else n=t();var l=!qn((ei||i).memoizedState,n);if(l&&(i.memoizedState=n,Ha=!0),i=i.queue,Zi(Ri.bind(null,o,i,e),[e]),i.getSnapshot!==t||l||null!==ti&&1&ti.memoizedState.tag){if(o.flags|=2048,Ki(9,Pi.bind(null,o,i,n,t),{destroy:void 0},null),null===ec)throw Error(r(349));a||60&Zo||Ni(o,t,n)}return n}function Ni(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=Jo.updateQueue)?(t={lastEffect:null,events:null,stores:null,memoCache:null},Jo.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Pi(e,t,n,r){t.value=n,t.getSnapshot=r,Mi(t)&&Ti(e)}function Ri(e,t,n){return n((function(){Mi(t)&&Ti(e)}))}function Mi(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!qn(e,n)}catch(e){return!0}}function Ti(e){var t=Or(e,2);null!==t&&Mc(t,e,2)}function Ai(e){var t=vi();if("function"==typeof e){var n=e;if(e=n(),oi){ye(!0);try{n()}finally{ye(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Si,lastRenderedState:e},t}function Di(e,t,n,r){return e.baseState=n,_i(e,ei,"function"==typeof r?r:Si)}function Ii(e,t,n,o,i){if(xa(e))throw Error(r(485));if(null!==(e=t.action)){var a={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(e){a.listeners.push(e)}};null!==N.T?n(!0):a.isTransition=!1,o(a),null===(n=t.pending)?(a.next=t.pending=a,Li(t,a)):(a.next=n.next,t.pending=n.next=a)}}function Li(e,t){var n=t.action,r=t.payload,o=e.state;if(t.isTransition){var i=N.T,a={};N.T=a;try{var l=n(o,r),s=N.S;null!==s&&s(a,l),zi(e,t,l)}catch(n){ji(e,t,n)}finally{N.T=i}}else try{zi(e,t,i=n(o,r))}catch(n){ji(e,t,n)}}function zi(e,t,n){null!==n&&"object"==typeof n&&"function"==typeof n.then?n.then((function(n){Fi(e,t,n)}),(function(n){return ji(e,t,n)})):Fi(e,t,n)}function Fi(e,t,n){t.status="fulfilled",t.value=n,$i(t),e.state=n,null!==(t=e.pending)&&((n=t.next)===t?e.pending=null:(n=n.next,t.next=n,Li(e,n)))}function ji(e,t,n){var r=e.pending;if(e.pending=null,null!==r){r=r.next;do{t.status="rejected",t.reason=n,$i(t),t=t.next}while(t!==r)}e.action=null}function $i(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Bi(e,t){return t}function Vi(e,t){if(Yr){var n=ec.formState;if(null!==n){e:{var r=Jo;if(Yr){if(Xr){t:{for(var o=Xr,i=Qr;8!==o.nodeType;){if(!i){o=null;break t}if(null===(o=ad(o.nextSibling))){o=null;break t}}o="F!"===(i=o.data)||"F"===i?o:null}if(o){Xr=ad(o.nextSibling),r="F!"===o.data;break e}}Jr(r)}r=!1}r&&(t=n[0])}}return(n=vi()).memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bi,lastRenderedState:t},n.queue=r,n=va.bind(null,Jo,r),r.dispatch=n,r=Ai(!1),i=wa.bind(null,Jo,!1,r.queue),o={state:t,dispatch:null,action:e,pending:null},(r=vi()).queue=o,n=Ii.bind(null,Jo,o,i,n),o.dispatch=n,r.memoizedState=e,[t,n,!1]}function Hi(e){return Ui(bi(),ei,e)}function Ui(e,t,n){t=_i(e,t,Bi)[0],e=Ei(Si)[0],t="object"==typeof t&&null!==t&&"function"==typeof t.then?wi(t):t;var r=bi(),o=r.queue,i=o.dispatch;return n!==r.memoizedState&&(Jo.flags|=2048,Ki(9,Wi.bind(null,o,n),{destroy:void 0},null)),[t,i,e]}function Wi(e,t){e.action=t}function qi(e){var t=bi(),n=ei;if(null!==n)return Ui(t,n,e);bi(),t=t.memoizedState;var r=(n=bi()).queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Ki(e,t,n,r){return e={tag:e,create:t,inst:n,deps:r,next:null},null===(t=Jo.updateQueue)&&(t={lastEffect:null,events:null,stores:null,memoCache:null},Jo.updateQueue=t),null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Xi(){return bi().memoizedState}function Yi(e,t,n,r){var o=vi();Jo.flags|=e,o.memoizedState=Ki(1|t,n,{destroy:void 0},void 0===r?null:r)}function Gi(e,t,n,r){var o=bi();r=void 0===r?null:r;var i=o.memoizedState.inst;null!==ei&&null!==r&&ui(r,ei.memoizedState.deps)?o.memoizedState=Ki(t,n,i,r):(Jo.flags|=e,o.memoizedState=Ki(1|t,n,i,r))}function Qi(e,t){Yi(8390656,8,e,t)}function Zi(e,t){Gi(2048,8,e,t)}function Ji(e,t){return Gi(4,2,e,t)}function ea(e,t){return Gi(4,4,e,t)}function ta(e,t){if("function"==typeof t){e=e();var n=t(e);return function(){"function"==typeof n?n():t(null)}}if(null!=t)return e=e(),t.current=e,function(){t.current=null}}function na(e,t,n){n=null!=n?n.concat([e]):null,Gi(4,4,ta.bind(null,t,e),n)}function ra(){}function oa(e,t){var n=bi();t=void 0===t?null:t;var r=n.memoizedState;return null!==t&&ui(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ia(e,t){var n=bi();t=void 0===t?null:t;var r=n.memoizedState;if(null!==t&&ui(t,r[1]))return r[0];if(r=e(),oi){ye(!0);try{e()}finally{ye(!1)}}return n.memoizedState=[r,t],r}function aa(e,t,n){return void 0===n||1073741824&Zo?e.memoizedState=t:(e.memoizedState=n,e=Rc(),Jo.lanes|=e,uc|=e,n)}function la(e,t,n,r){return qn(n,t)?n:null!==So.current?(e=aa(e,n,r),qn(e,t)||(Ha=!0),e):42&Zo?(e=Rc(),Jo.lanes|=e,uc|=e,t):(Ha=!0,e.memoizedState=n)}function sa(e,t,n,r,o){var i=$.p;$.p=0!==i&&8>i?i:8;var a,l,s,c=N.T,u={};N.T=u,wa(e,!1,t,n);try{var d=o(),f=N.S;if(null!==f&&f(u,d),null!==d&&"object"==typeof d&&"function"==typeof d.then){var p=(a=r,l=[],s={status:"pending",value:null,reason:null,then:function(e){l.push(e)}},d.then((function(){s.status="fulfilled",s.value=a;for(var e=0;e<l.length;e++)(0,l[e])(a)}),(function(e){for(s.status="rejected",s.reason=e,e=0;e<l.length;e++)(0,l[e])(void 0)})),s);ba(e,t,p,Pc())}else ba(e,t,r,Pc())}catch(n){ba(e,t,{then:function(){},status:"rejected",reason:n},Pc())}finally{$.p=i,N.T=c}}function ca(){}function ua(e,t,n,o){if(5!==e.tag)throw Error(r(476));var i=da(e).queue;sa(e,i,t,B,null===n?ca:function(){return fa(e),n(o)})}function da(e){var t=e.memoizedState;if(null!==t)return t;var n={};return(t={memoizedState:B,baseState:B,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Si,lastRenderedState:B},next:null}).next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Si,lastRenderedState:n},next:null},e.memoizedState=t,null!==(e=e.alternate)&&(e.memoizedState=t),t}function fa(e){ba(e,da(e).next.queue,{},Pc())}function pa(){return El(Id)}function ha(){return bi().memoizedState}function ma(){return bi().memoizedState}function ga(e){for(var t=e.return;null!==t;){switch(t.tag){case 24:case 3:var n=Pc(),r=Ml(t,e=Rl(n),n);return null!==r&&(Mc(r,t,n),Tl(r,t,n)),t={cache:$o()},void(e.payload=t)}t=t.return}}function ya(e,t,n){var r=Pc();n={lane:r,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},xa(e)?ka(t,n):null!==(n=Cr(e,t,n,r))&&(Mc(n,e,r),Sa(n,t,r))}function va(e,t,n){ba(e,t,n,Pc())}function ba(e,t,n,r){var o={lane:r,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(xa(e))ka(t,o);else{var i=e.alternate;if(0===e.lanes&&(null===i||0===i.lanes)&&null!==(i=t.lastRenderedReducer))try{var a=t.lastRenderedState,l=i(a,n);if(o.hasEagerState=!0,o.eagerState=l,qn(l,a))return _r(e,t,o,0),null===ec&&Er(),!1}catch(e){}if(null!==(n=Cr(e,t,o,r)))return Mc(n,e,r),Sa(n,t,r),!0}return!1}function wa(e,t,n,o){if(o={lane:2,revertLane:wu(),action:o,hasEagerState:!1,eagerState:null,next:null},xa(e)){if(t)throw Error(r(479))}else null!==(t=Cr(e,n,o,2))&&Mc(t,e,2)}function xa(e){var t=e.alternate;return e===Jo||null!==t&&t===Jo}function ka(e,t){ri=ni=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Sa(e,t,n){if(4194176&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Te(e,n)}}var Ea={readContext:El,use:xi,useCallback:ci,useContext:ci,useEffect:ci,useImperativeHandle:ci,useLayoutEffect:ci,useInsertionEffect:ci,useMemo:ci,useReducer:ci,useRef:ci,useState:ci,useDebugValue:ci,useDeferredValue:ci,useTransition:ci,useSyncExternalStore:ci,useId:ci};Ea.useCacheRefresh=ci,Ea.useMemoCache=ci,Ea.useHostTransitionStatus=ci,Ea.useFormState=ci,Ea.useActionState=ci,Ea.useOptimistic=ci;var _a={readContext:El,use:xi,useCallback:function(e,t){return vi().memoizedState=[e,void 0===t?null:t],e},useContext:El,useEffect:Qi,useImperativeHandle:function(e,t,n){n=null!=n?n.concat([e]):null,Yi(4194308,4,ta.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Yi(4194308,4,e,t)},useInsertionEffect:function(e,t){Yi(4,2,e,t)},useMemo:function(e,t){var n=vi();t=void 0===t?null:t;var r=e();if(oi){ye(!0);try{e()}finally{ye(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=vi();if(void 0!==n){var o=n(t);if(oi){ye(!0);try{n(t)}finally{ye(!1)}}}else o=t;return r.memoizedState=r.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},r.queue=e,e=e.dispatch=ya.bind(null,Jo,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},vi().memoizedState=e},useState:function(e){var t=(e=Ai(e)).queue,n=va.bind(null,Jo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ra,useDeferredValue:function(e,t){return aa(vi(),e,t)},useTransition:function(){var e=Ai(!1);return e=sa.bind(null,Jo,e.queue,!0,!1),vi().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var o=Jo,i=vi();if(Yr){if(void 0===n)throw Error(r(407));n=n()}else{if(n=t(),null===ec)throw Error(r(349));60&nc||Ni(o,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,Qi(Ri.bind(null,o,a,e),[e]),o.flags|=2048,Ki(9,Pi.bind(null,o,a,n,t),{destroy:void 0},null),n},useId:function(){var e=vi(),t=ec.identifierPrefix;if(Yr){var n=Vr;t=":"+t+"R"+(n=(Br&~(1<<32-ve(Br)-1)).toString(32)+n),0<(n=ii++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=si++).toString(32)+":";return e.memoizedState=t},useCacheRefresh:function(){return vi().memoizedState=ga.bind(null,Jo)}};_a.useMemoCache=ki,_a.useHostTransitionStatus=pa,_a.useFormState=Vi,_a.useActionState=Vi,_a.useOptimistic=function(e){var t=vi();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=wa.bind(null,Jo,!0,n),n.dispatch=t,[e,t]};var Ca={readContext:El,use:xi,useCallback:oa,useContext:El,useEffect:Zi,useImperativeHandle:na,useInsertionEffect:Ji,useLayoutEffect:ea,useMemo:ia,useReducer:Ei,useRef:Xi,useState:function(){return Ei(Si)},useDebugValue:ra,useDeferredValue:function(e,t){return la(bi(),ei.memoizedState,e,t)},useTransition:function(){var e=Ei(Si)[0],t=bi().memoizedState;return["boolean"==typeof e?e:wi(e),t]},useSyncExternalStore:Oi,useId:ha};Ca.useCacheRefresh=ma,Ca.useMemoCache=ki,Ca.useHostTransitionStatus=pa,Ca.useFormState=Hi,Ca.useActionState=Hi,Ca.useOptimistic=function(e,t){return Di(bi(),0,e,t)};var Oa={readContext:El,use:xi,useCallback:oa,useContext:El,useEffect:Zi,useImperativeHandle:na,useInsertionEffect:Ji,useLayoutEffect:ea,useMemo:ia,useReducer:Ci,useRef:Xi,useState:function(){return Ci(Si)},useDebugValue:ra,useDeferredValue:function(e,t){var n=bi();return null===ei?aa(n,e,t):la(n,ei.memoizedState,e,t)},useTransition:function(){var e=Ci(Si)[0],t=bi().memoizedState;return["boolean"==typeof e?e:wi(e),t]},useSyncExternalStore:Oi,useId:ha};function Na(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:P({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}Oa.useCacheRefresh=ma,Oa.useMemoCache=ki,Oa.useHostTransitionStatus=pa,Oa.useFormState=qi,Oa.useActionState=qi,Oa.useOptimistic=function(e,t){var n=bi();return null!==ei?Di(n,0,e,t):(n.baseState=e,[e,n.queue.dispatch])};var Pa={isMounted:function(e){return!!(e=e._reactInternals)&&I(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Pc(),o=Rl(r);o.payload=t,null!=n&&(o.callback=n),null!==(t=Ml(e,o,r))&&(Mc(t,e,r),Tl(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Pc(),o=Rl(r);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=Ml(e,o,r))&&(Mc(t,e,r),Tl(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Pc(),r=Rl(n);r.tag=2,null!=t&&(r.callback=t),null!==(t=Ml(e,r,n))&&(Mc(t,e,n),Tl(t,e,n))}};function Ra(e,t,n,r,o,i,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!t.prototype||!t.prototype.isPureReactComponent||(!Kn(n,r)||!Kn(o,i))}function Ma(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Pa.enqueueReplaceState(t,t.state,null)}function Ta(e,t){var n=t;if("ref"in t)for(var r in n={},t)"ref"!==r&&(n[r]=t[r]);if(e=e.defaultProps)for(var o in n===t&&(n=P({},n)),e)void 0===n[o]&&(n[o]=e[o]);return n}var Aa="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)};function Da(e){Aa(e)}function Ia(e){console.error(e)}function La(e){Aa(e)}function za(e,t){try{(0,e.onUncaughtError)(t.value,{componentStack:t.stack})}catch(e){setTimeout((function(){throw e}))}}function Fa(e,t,n){try{(0,e.onCaughtError)(n.value,{componentStack:n.stack,errorBoundary:1===t.tag?t.stateNode:null})}catch(e){setTimeout((function(){throw e}))}}function ja(e,t,n){return(n=Rl(n)).tag=3,n.payload={element:null},n.callback=function(){za(e,t)},n}function $a(e){return(e=Rl(e)).tag=3,e}function Ba(e,t,n,r){var o=n.type.getDerivedStateFromError;if("function"==typeof o){var i=r.value;e.payload=function(){return o(i)},e.callback=function(){Fa(t,n,r)}}var a=n.stateNode;null!==a&&"function"==typeof a.componentDidCatch&&(e.callback=function(){Fa(t,n,r),"function"!=typeof o&&(null===xc?xc=new Set([this]):xc.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:null!==e?e:""})})}var Va=Error(r(461)),Ha=!1;function Ua(e,t,n,r){t.child=null===e?ko(t,null,n,r):xo(t,e.child,n,r)}function Wa(e,t,n,r,o){n=n.render;var i=t.ref;if("ref"in r){var a={};for(var l in r)"ref"!==l&&(a[l]=r[l])}else a=r;return Sl(t),r=di(e,t,n,a,i,o),l=mi(),null===e||Ha?(Yr&&l&&Wr(t),t.flags|=1,Ua(e,t,r,o),t.child):(gi(e,t,o),dl(e,t,o))}function qa(e,t,n,r,o){if(null===e){var i=n.type;return"function"!=typeof i||Is(i)||void 0!==i.defaultProps||null!==n.compare?((e=Fs(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,Ka(e,t,i,r,o))}if(i=e.child,!fl(e,o)){var a=i.memoizedProps;if((n=null!==(n=n.compare)?n:Kn)(a,r)&&e.ref===t.ref)return dl(e,t,o)}return t.flags|=1,(e=Ls(i,r)).ref=t.ref,e.return=t,t.child=e}function Ka(e,t,n,r,o){if(null!==e){var i=e.memoizedProps;if(Kn(i,r)&&e.ref===t.ref){if(Ha=!1,t.pendingProps=r=i,!fl(e,o))return t.lanes=e.lanes,dl(e,t,o);131072&e.flags&&(Ha=!0)}}return Qa(e,t,n,r,o)}function Xa(e,t,n){var r=t.pendingProps,o=r.children,i=!!(2&t.stateNode._pendingVisibility),a=null!==e?e.memoizedState:null;if(Ga(e,t),"hidden"===r.mode||i){if(128&t.flags){if(r=null!==a?a.baseLanes|n:n,null!==e){for(o=t.child=e.child,i=0;null!==o;)i=i|o.lanes|o.childLanes,o=o.sibling;t.childLanes=i&~r}else t.childLanes=0,t.child=null;return Ya(e,t,r,n)}if(!(536870912&n))return t.lanes=t.childLanes=536870912,Ya(e,t,null!==a?a.baseLanes|n:n,n);t.memoizedState={baseLanes:0,cachePool:null},null!==e&&Go(0,null!==a?a.cachePool:null),null!==a?_o(t,a):Co(),Mo(t)}else null!==a?(Go(0,a.cachePool),_o(t,a),To(),t.memoizedState=null):(null!==e&&Go(0,null),Co(),To());return Ua(e,t,o,n),t.child}function Ya(e,t,n,r){var o=Yo();return o=null===o?null:{parent:jo._currentValue,pool:o},t.memoizedState={baseLanes:n,cachePool:o},null!==e&&Go(0,null),Co(),Mo(t),null!==e&&xl(e,t,r,!0),null}function Ga(e,t){var n=t.ref;if(null===n)null!==e&&null!==e.ref&&(t.flags|=2097664);else{if("function"!=typeof n&&"object"!=typeof n)throw Error(r(284));null!==e&&e.ref===n||(t.flags|=2097664)}}function Qa(e,t,n,r,o){return Sl(t),n=di(e,t,n,r,void 0,o),r=mi(),null===e||Ha?(Yr&&r&&Wr(t),t.flags|=1,Ua(e,t,n,o),t.child):(gi(e,t,o),dl(e,t,o))}function Za(e,t,n,r,o,i){return Sl(t),t.updateQueue=null,n=pi(t,r,n,o),fi(e),r=mi(),null===e||Ha?(Yr&&r&&Wr(t),t.flags|=1,Ua(e,t,n,i),t.child):(gi(e,t,i),dl(e,t,i))}function Ja(e,t,n,r,o){if(Sl(t),null===t.stateNode){var i=Rr,a=n.contextType;"object"==typeof a&&null!==a&&(i=El(a)),i=new n(r,i),t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,i.updater=Pa,t.stateNode=i,i._reactInternals=t,(i=t.stateNode).props=r,i.state=t.memoizedState,i.refs={},Nl(t),a=n.contextType,i.context="object"==typeof a&&null!==a?El(a):Rr,i.state=t.memoizedState,"function"==typeof(a=n.getDerivedStateFromProps)&&(Na(t,n,a,r),i.state=t.memoizedState),"function"==typeof n.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(a=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),a!==i.state&&Pa.enqueueReplaceState(i,i.state,null),Ll(t,r,i,o),Il(),i.state=t.memoizedState),"function"==typeof i.componentDidMount&&(t.flags|=4194308),r=!0}else if(null===e){i=t.stateNode;var l=t.memoizedProps,s=Ta(n,l);i.props=s;var c=i.context,u=n.contextType;a=Rr,"object"==typeof u&&null!==u&&(a=El(u));var d=n.getDerivedStateFromProps;u="function"==typeof d||"function"==typeof i.getSnapshotBeforeUpdate,l=t.pendingProps!==l,u||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(l||c!==a)&&Ma(t,i,r,a),Ol=!1;var f=t.memoizedState;i.state=f,Ll(t,r,i,o),Il(),c=t.memoizedState,l||f!==c||Ol?("function"==typeof d&&(Na(t,n,d,r),c=t.memoizedState),(s=Ol||Ra(t,n,s,r,f,c,a))?(u||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||("function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"==typeof i.componentDidMount&&(t.flags|=4194308)):("function"==typeof i.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),i.props=r,i.state=c,i.context=a,r=s):("function"==typeof i.componentDidMount&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Pl(e,t),u=Ta(n,a=t.memoizedProps),i.props=u,d=t.pendingProps,f=i.context,c=n.contextType,s=Rr,"object"==typeof c&&null!==c&&(s=El(c)),(c="function"==typeof(l=n.getDerivedStateFromProps)||"function"==typeof i.getSnapshotBeforeUpdate)||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(a!==d||f!==s)&&Ma(t,i,r,s),Ol=!1,f=t.memoizedState,i.state=f,Ll(t,r,i,o),Il();var p=t.memoizedState;a!==d||f!==p||Ol||null!==e&&null!==e.dependencies&&kl(e.dependencies)?("function"==typeof l&&(Na(t,n,l,r),p=t.memoizedState),(u=Ol||Ra(t,n,u,r,f,p,s)||null!==e&&null!==e.dependencies&&kl(e.dependencies))?(c||"function"!=typeof i.UNSAFE_componentWillUpdate&&"function"!=typeof i.componentWillUpdate||("function"==typeof i.componentWillUpdate&&i.componentWillUpdate(r,p,s),"function"==typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(r,p,s)),"function"==typeof i.componentDidUpdate&&(t.flags|=4),"function"==typeof i.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof i.componentDidUpdate||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),i.props=r,i.state=p,i.context=s,r=u):("function"!=typeof i.componentDidUpdate||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return i=r,Ga(e,t),r=!!(128&t.flags),i||r?(i=t.stateNode,n=r&&"function"!=typeof n.getDerivedStateFromError?null:i.render(),t.flags|=1,null!==e&&r?(t.child=xo(t,e.child,null,o),t.child=xo(t,null,n,o)):Ua(e,t,n,o),t.memoizedState=i.state,e=t.child):e=dl(e,t,o),e}function el(e,t,n,r){return ro(),t.flags|=256,Ua(e,t,n,r),t.child}var tl={dehydrated:null,treeContext:null,retryLane:0};function nl(e){return{baseLanes:e,cachePool:Qo()}}function rl(e,t,n){return e=null!==e?e.childLanes&~n:0,t&&(e|=pc),e}function ol(e,t,n){var o,i=t.pendingProps,a=!1,l=!!(128&t.flags);if((o=l)||(o=(null===e||null!==e.memoizedState)&&!!(2&Do.current)),o&&(a=!0,t.flags&=-129),o=!!(32&t.flags),t.flags&=-33,null===e){if(Yr){if(a?Ro(t):To(),Yr){var s,c=Xr;if(s=c){e:{for(s=c,c=Qr;8!==s.nodeType;){if(!c){c=null;break e}if(null===(s=ad(s.nextSibling))){c=null;break e}}c=s}null!==c?(t.memoizedState={dehydrated:c,treeContext:null!==$r?{id:Br,overflow:Vr}:null,retryLane:536870912},(s=Ds(18,null,null,0)).stateNode=c,s.return=t,t.child=s,Kr=t,Xr=null,s=!0):s=!1}s||Jr(t)}if(null!==(c=t.memoizedState)&&null!==(c=c.dehydrated))return"$!"===c.data?t.lanes=16:t.lanes=536870912,null;Ao(t)}return c=i.children,i=i.fallback,a?(To(),c=al({mode:"hidden",children:c},a=t.mode),i=js(i,a,n,null),c.return=t,i.return=t,c.sibling=i,t.child=c,(a=t.child).memoizedState=nl(n),a.childLanes=rl(e,o,n),t.memoizedState=tl,i):(Ro(t),il(t,c))}if(null!==(s=e.memoizedState)&&null!==(c=s.dehydrated)){if(l)256&t.flags?(Ro(t),t.flags&=-257,t=ll(e,t,n)):null!==t.memoizedState?(To(),t.child=e.child,t.flags|=128,t=null):(To(),a=i.fallback,c=t.mode,i=al({mode:"visible",children:i.children},c),(a=js(a,c,n,null)).flags|=2,i.return=t,a.return=t,i.sibling=a,t.child=i,xo(t,e.child,null,n),(i=t.child).memoizedState=nl(n),i.childLanes=rl(e,o,n),t.memoizedState=tl,t=a);else if(Ro(t),"$!"===c.data){if(o=c.nextSibling&&c.nextSibling.dataset)var u=o.dgst;o=u,(i=Error(r(419))).stack="",i.digest=o,oo({value:i,source:null,stack:null}),t=ll(e,t,n)}else if(Ha||xl(e,t,n,!1),o=!!(n&e.childLanes),Ha||o){if(null!==(o=ec)){if(42&(i=n&-n))i=1;else switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=16;break;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:i=64;break;case 268435456:i=134217728;break;default:i=0}if(0!==(i=i&(o.suspendedLanes|n)?0:i)&&i!==s.retryLane)throw s.retryLane=i,Or(e,i),Mc(o,e,i),Va}"$?"===c.data||Hc(),t=ll(e,t,n)}else"$?"===c.data?(t.flags|=128,t.child=e.child,t=au.bind(null,e),c._reactRetry=t,t=null):(e=s.treeContext,Xr=ad(c.nextSibling),Kr=t,Yr=!0,Gr=null,Qr=!1,null!==e&&(Fr[jr++]=Br,Fr[jr++]=Vr,Fr[jr++]=$r,Br=e.id,Vr=e.overflow,$r=t),(t=il(t,i.children)).flags|=4096);return t}return a?(To(),a=i.fallback,c=t.mode,u=(s=e.child).sibling,(i=Ls(s,{mode:"hidden",children:i.children})).subtreeFlags=31457280&s.subtreeFlags,null!==u?a=Ls(u,a):(a=js(a,c,n,null)).flags|=2,a.return=t,i.return=t,i.sibling=a,t.child=i,i=a,a=t.child,null===(c=e.child.memoizedState)?c=nl(n):(null!==(s=c.cachePool)?(u=jo._currentValue,s=s.parent!==u?{parent:u,pool:u}:s):s=Qo(),c={baseLanes:c.baseLanes|n,cachePool:s}),a.memoizedState=c,a.childLanes=rl(e,o,n),t.memoizedState=tl,i):(Ro(t),e=(n=e.child).sibling,(n=Ls(n,{mode:"visible",children:i.children})).return=t,n.sibling=null,null!==e&&(null===(o=t.deletions)?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function il(e,t){return(t=al({mode:"visible",children:t},e.mode)).return=e,e.child=t}function al(e,t){return $s(e,t,0,null)}function ll(e,t,n){return xo(t,e.child,null,n),(e=il(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function sl(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),bl(e.return,t,n)}function cl(e,t,n,r,o){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function ul(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Ua(e,t,r.children,n),2&(r=Do.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&sl(e,n,t);else if(19===e.tag)sl(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}switch(q(Do,r),o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===Io(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),cl(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===Io(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}cl(t,!0,n,null,i);break;case"together":cl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function dl(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),uc|=t.lanes,!(n&t.childLanes)){if(null===e)return null;if(xl(e,t,n,!1),!(n&t.childLanes))return null}if(null!==e&&t.child!==e.child)throw Error(r(153));if(null!==t.child){for(n=Ls(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Ls(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function fl(e,t){return!!(e.lanes&t)||!(null===(e=e.dependencies)||!kl(e))}function pl(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps)Ha=!0;else{if(!(fl(e,n)||128&t.flags))return Ha=!1,function(e,t,n){switch(t.tag){case 3:Q(t,t.stateNode.containerInfo),yl(t,jo,e.memoizedState.cache),ro();break;case 27:case 5:J(t);break;case 4:Q(t,t.stateNode.containerInfo);break;case 10:yl(t,t.type,t.memoizedProps.value);break;case 13:var r=t.memoizedState;if(null!==r)return null!==r.dehydrated?(Ro(t),t.flags|=128,null):n&t.child.childLanes?ol(e,t,n):(Ro(t),null!==(e=dl(e,t,n))?e.sibling:null);Ro(t);break;case 19:var o=!!(128&e.flags);if((r=!!(n&t.childLanes))||(xl(e,t,n,!1),r=!!(n&t.childLanes)),o){if(r)return ul(e,t,n);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),q(Do,Do.current),r)break;return null;case 22:case 23:return t.lanes=0,Xa(e,t,n);case 24:yl(t,jo,e.memoizedState.cache)}return dl(e,t,n)}(e,t,n);Ha=!!(131072&e.flags)}else Ha=!1,Yr&&1048576&t.flags&&Ur(t,zr,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var o=t.elementType,i=o._init;if(o=i(o._payload),t.type=o,"function"!=typeof o){if(null!=o){if((i=o.$$typeof)===m){t.tag=11,t=Wa(null,t,o,e,n);break e}if(i===v){t.tag=14,t=qa(null,t,o,e,n);break e}}throw t=_(o)||o,Error(r(306,t,""))}Is(o)?(e=Ta(o,e),t.tag=1,t=Ja(null,t,o,e,n)):(t.tag=0,t=Qa(null,t,o,e,n))}return t;case 0:return Qa(e,t,t.type,t.pendingProps,n);case 1:return Ja(e,t,o=t.type,i=Ta(o,t.pendingProps),n);case 3:e:{if(Q(t,t.stateNode.containerInfo),null===e)throw Error(r(387));var a=t.pendingProps;o=(i=t.memoizedState).element,Pl(e,t),Ll(t,a,null,n);var l=t.memoizedState;if(a=l.cache,yl(t,jo,a),a!==i.cache&&wl(t,[jo],n,!0),Il(),a=l.element,i.isDehydrated){if(i={element:a,isDehydrated:!1,cache:l.cache},t.updateQueue.baseState=i,t.memoizedState=i,256&t.flags){t=el(e,t,a,n);break e}if(a!==o){oo(o=Tr(Error(r(424)),t)),t=el(e,t,a,n);break e}for(Xr=ad(t.stateNode.containerInfo.firstChild),Kr=t,Yr=!0,Gr=null,Qr=!0,n=ko(t,null,a,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(ro(),a===o){t=dl(e,t,n);break e}Ua(e,t,a,n)}t=t.child}return t;case 26:return Ga(e,t),null===e?(n=md(t.type,null,t.pendingProps,null))?t.memoizedState=n:Yr||(n=t.type,e=t.pendingProps,(o=Xu(Y.current).createElement(n))[Le]=t,o[ze]=e,Wu(o,n,e),Ye(o),t.stateNode=o):t.memoizedState=md(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return J(t),null===e&&Yr&&(o=t.stateNode=sd(t.type,t.pendingProps,Y.current),Kr=t,Qr=!0,Xr=ad(o.firstChild)),o=t.pendingProps.children,null!==e||Yr?Ua(e,t,o,n):t.child=xo(t,null,o,n),Ga(e,t),t.child;case 5:return null===e&&Yr&&((i=o=Xr)&&(o=function(e,t,n,r){for(;1===e.nodeType;){var o=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&("INPUT"!==e.nodeName||"hidden"!==e.type))break}else if(r){if(!e[He])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if("stylesheet"===(i=e.getAttribute("rel"))&&e.hasAttribute("data-precedence"))break;if(i!==o.rel||e.getAttribute("href")!==(null==o.href?null:o.href)||e.getAttribute("crossorigin")!==(null==o.crossOrigin?null:o.crossOrigin)||e.getAttribute("title")!==(null==o.title?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(((i=e.getAttribute("src"))!==(null==o.src?null:o.src)||e.getAttribute("type")!==(null==o.type?null:o.type)||e.getAttribute("crossorigin")!==(null==o.crossOrigin?null:o.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else{if("input"!==t||"hidden"!==e.type)return e;var i=null==o.name?null:""+o.name;if("hidden"===o.type&&e.getAttribute("name")===i)return e}if(null===(e=ad(e.nextSibling)))break}return null}(o,t.type,t.pendingProps,Qr),null!==o?(t.stateNode=o,Kr=t,Xr=ad(o.firstChild),Qr=!1,i=!0):i=!1),i||Jr(t)),J(t),i=t.type,a=t.pendingProps,l=null!==e?e.memoizedProps:null,o=a.children,Qu(i,a)?o=null:null!==l&&Qu(i,l)&&(t.flags|=32),null!==t.memoizedState&&(i=di(e,t,hi,null,null,n),Id._currentValue=i),Ga(e,t),Ua(e,t,o,n),t.child;case 6:return null===e&&Yr&&((e=n=Xr)&&(n=function(e,t,n){if(""===t)return null;for(;3!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!n)return null;if(null===(e=ad(e.nextSibling)))return null}return e}(n,t.pendingProps,Qr),null!==n?(t.stateNode=n,Kr=t,Xr=null,e=!0):e=!1),e||Jr(t)),null;case 13:return ol(e,t,n);case 4:return Q(t,t.stateNode.containerInfo),o=t.pendingProps,null===e?t.child=xo(t,null,o,n):Ua(e,t,o,n),t.child;case 11:return Wa(e,t,t.type,t.pendingProps,n);case 7:return Ua(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ua(e,t,t.pendingProps.children,n),t.child;case 10:return o=t.pendingProps,yl(t,t.type,o.value),Ua(e,t,o.children,n),t.child;case 9:return i=t.type._context,o=t.pendingProps.children,Sl(t),o=o(i=El(i)),t.flags|=1,Ua(e,t,o,n),t.child;case 14:return qa(e,t,t.type,t.pendingProps,n);case 15:return Ka(e,t,t.type,t.pendingProps,n);case 19:return ul(e,t,n);case 22:return Xa(e,t,n);case 24:return Sl(t),o=El(jo),null===e?(null===(i=Yo())&&(i=ec,a=$o(),i.pooledCache=a,a.refCount++,null!==a&&(i.pooledCacheLanes|=n),i=a),t.memoizedState={parent:o,cache:i},Nl(t),yl(t,jo,i)):(!!(e.lanes&n)&&(Pl(e,t),Ll(t,null,null,n),Il()),i=e.memoizedState,a=t.memoizedState,i.parent!==o?(i={parent:o,cache:o},t.memoizedState=i,0===t.lanes&&(t.memoizedState=t.updateQueue.baseState=i),yl(t,jo,o)):(o=a.cache,yl(t,jo,o),o!==i.cache&&wl(t,[jo],n,!0))),Ua(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}var hl=U(null),ml=null,gl=null;function yl(e,t,n){q(hl,t._currentValue),t._currentValue=n}function vl(e){e._currentValue=hl.current,W(hl)}function bl(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function wl(e,t,n,o){var i=e.child;for(null!==i&&(i.return=e);null!==i;){var a=i.dependencies;if(null!==a){var l=i.child;a=a.firstContext;e:for(;null!==a;){var s=a;a=i;for(var c=0;c<t.length;c++)if(s.context===t[c]){a.lanes|=n,null!==(s=a.alternate)&&(s.lanes|=n),bl(a.return,n,e),o||(l=null);break e}a=s.next}}else if(18===i.tag){if(null===(l=i.return))throw Error(r(341));l.lanes|=n,null!==(a=l.alternate)&&(a.lanes|=n),bl(l,n,e),l=null}else l=i.child;if(null!==l)l.return=i;else for(l=i;null!==l;){if(l===e){l=null;break}if(null!==(i=l.sibling)){i.return=l.return,l=i;break}l=l.return}i=l}}function xl(e,t,n,o){e=null;for(var i=t,a=!1;null!==i;){if(!a)if(524288&i.flags)a=!0;else if(262144&i.flags)break;if(10===i.tag){var l=i.alternate;if(null===l)throw Error(r(387));if(null!==(l=l.memoizedProps)){var s=i.type;qn(i.pendingProps.value,l.value)||(null!==e?e.push(s):e=[s])}}else if(i===G.current){if(null===(l=i.alternate))throw Error(r(387));l.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(null!==e?e.push(Id):e=[Id])}i=i.return}null!==e&&wl(t,e,n,o),t.flags|=262144}function kl(e){for(e=e.firstContext;null!==e;){if(!qn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Sl(e){ml=e,gl=null,null!==(e=e.dependencies)&&(e.firstContext=null)}function El(e){return Cl(ml,e)}function _l(e,t){return null===ml&&Sl(e),Cl(e,t)}function Cl(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},null===gl){if(null===e)throw Error(r(308));gl=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else gl=gl.next=t;return n}var Ol=!1;function Nl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Pl(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Rl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ml(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&Js){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,t=Pr(e),Nr(e,null,n),t}return _r(e,r,t,n),Pr(e)}function Tl(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194176&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Te(e,n)}}function Al(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,i=null;if(null!==(n=n.firstBaseUpdate)){do{var a={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};null===i?o=i=a:i=i.next=a,n=n.next}while(null!==n);null===i?o=i=t:i=i.next=t}else o=i=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,callbacks:r.callbacks},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Dl=!1;function Il(){if(Dl){if(null!==Wo)throw Wo}}function Ll(e,t,n,r){Dl=!1;var o=e.updateQueue;Ol=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,l=o.shared.pending;if(null!==l){o.shared.pending=null;var s=l,c=s.next;s.next=null,null===a?i=c:a.next=c,a=s;var u=e.alternate;null!==u&&((l=(u=u.updateQueue).lastBaseUpdate)!==a&&(null===l?u.firstBaseUpdate=c:l.next=c,u.lastBaseUpdate=s))}if(null!==i){var d=o.baseState;for(a=0,u=c=s=null,l=i;;){var f=-536870913&l.lane,p=f!==l.lane;if(p?(nc&f)===f:(r&f)===f){0!==f&&f===Uo&&(Dl=!0),null!==u&&(u=u.next={lane:0,tag:l.tag,payload:l.payload,callback:null,next:null});e:{var h=e,m=l;f=t;var g=n;switch(m.tag){case 1:if("function"==typeof(h=m.payload)){d=h.call(g,d,f);break e}d=h;break e;case 3:h.flags=-65537&h.flags|128;case 0:if(null==(f="function"==typeof(h=m.payload)?h.call(g,d,f):h))break e;d=P({},d,f);break e;case 2:Ol=!0}}null!==(f=l.callback)&&(e.flags|=64,p&&(e.flags|=8192),null===(p=o.callbacks)?o.callbacks=[f]:p.push(f))}else p={lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},null===u?(c=u=p,s=d):u=u.next=p,a|=f;if(null===(l=l.next)){if(null===(l=o.shared.pending))break;l=(p=l).next,p.next=null,o.lastBaseUpdate=p,o.shared.pending=null}}null===u&&(s=d),o.baseState=s,o.firstBaseUpdate=c,o.lastBaseUpdate=u,null===i&&(o.shared.lanes=0),uc|=a,e.lanes=a,e.memoizedState=d}}function zl(e,t){if("function"!=typeof e)throw Error(r(191,e));e.call(t)}function Fl(e,t){var n=e.callbacks;if(null!==n)for(e.callbacks=null,e=0;e<n.length;e++)zl(n[e],t)}function jl(e,t){try{var n=t.updateQueue,r=null!==n?n.lastEffect:null;if(null!==r){var o=r.next;n=o;do{if((n.tag&e)===e){r=void 0;var i=n.create,a=n.inst;r=i(),a.destroy=r}n=n.next}while(n!==o)}}catch(e){nu(t,t.return,e)}}function $l(e,t,n){try{var r=t.updateQueue,o=null!==r?r.lastEffect:null;if(null!==o){var i=o.next;r=i;do{if((r.tag&e)===e){var a=r.inst,l=a.destroy;if(void 0!==l){a.destroy=void 0,o=t;var s=n;try{l()}catch(e){nu(o,s,e)}}}r=r.next}while(r!==i)}}catch(e){nu(t,t.return,e)}}function Bl(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{Fl(t,n)}catch(t){nu(e,e.return,t)}}}function Vl(e,t,n){n.props=Ta(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){nu(e,t,n)}}function Hl(e,t){try{var n=e.ref;if(null!==n){var r=e.stateNode;switch(e.tag){case 26:case 27:case 5:var o=r;break;default:o=r}"function"==typeof n?e.refCleanup=n(o):n.current=o}}catch(n){nu(e,t,n)}}function Ul(e,t){var n=e.ref,r=e.refCleanup;if(null!==n)if("function"==typeof r)try{r()}catch(n){nu(e,t,n)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"==typeof n)try{n(null)}catch(n){nu(e,t,n)}else n.current=null}function Wl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){nu(e,e.return,t)}}function ql(e,t,n){try{var o=e.stateNode;!function(e,t,n,o){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,a=null,l=null,s=null,c=null,u=null,d=null;for(h in n){var f=n[h];if(n.hasOwnProperty(h)&&null!=f)switch(h){case"checked":case"value":break;case"defaultValue":c=f;default:o.hasOwnProperty(h)||Hu(e,t,h,null,o,f)}}for(var p in o){var h=o[p];if(f=n[p],o.hasOwnProperty(p)&&(null!=h||null!=f))switch(p){case"type":a=h;break;case"name":i=h;break;case"checked":u=h;break;case"defaultChecked":d=h;break;case"value":l=h;break;case"defaultValue":s=h;break;case"children":case"dangerouslySetInnerHTML":if(null!=h)throw Error(r(137,t));break;default:h!==f&&Hu(e,t,p,h,o,f)}}return void ht(e,l,s,c,u,d,a,i);case"select":for(a in h=l=s=p=null,n)if(c=n[a],n.hasOwnProperty(a)&&null!=c)switch(a){case"value":break;case"multiple":h=c;default:o.hasOwnProperty(a)||Hu(e,t,a,null,o,c)}for(i in o)if(a=o[i],c=n[i],o.hasOwnProperty(i)&&(null!=a||null!=c))switch(i){case"value":p=a;break;case"defaultValue":s=a;break;case"multiple":l=a;default:a!==c&&Hu(e,t,i,a,o,c)}return t=s,n=l,o=h,void(null!=p?yt(e,!!n,p,!1):!!o!=!!n&&(null!=t?yt(e,!!n,t,!0):yt(e,!!n,n?[]:"",!1)));case"textarea":for(s in h=p=null,n)if(i=n[s],n.hasOwnProperty(s)&&null!=i&&!o.hasOwnProperty(s))switch(s){case"value":case"children":break;default:Hu(e,t,s,null,o,i)}for(l in o)if(i=o[l],a=n[l],o.hasOwnProperty(l)&&(null!=i||null!=a))switch(l){case"value":p=i;break;case"defaultValue":h=i;break;case"children":break;case"dangerouslySetInnerHTML":if(null!=i)throw Error(r(91));break;default:i!==a&&Hu(e,t,l,i,o,a)}return void vt(e,p,h);case"option":for(var m in n)if(p=n[m],n.hasOwnProperty(m)&&null!=p&&!o.hasOwnProperty(m))if("selected"===m)e.selected=!1;else Hu(e,t,m,null,o,p);for(c in o)if(p=o[c],h=n[c],o.hasOwnProperty(c)&&p!==h&&(null!=p||null!=h))if("selected"===c)e.selected=p&&"function"!=typeof p&&"symbol"!=typeof p;else Hu(e,t,c,p,o,h);return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var g in n)p=n[g],n.hasOwnProperty(g)&&null!=p&&!o.hasOwnProperty(g)&&Hu(e,t,g,null,o,p);for(u in o)if(p=o[u],h=n[u],o.hasOwnProperty(u)&&p!==h&&(null!=p||null!=h))switch(u){case"children":case"dangerouslySetInnerHTML":if(null!=p)throw Error(r(137,t));break;default:Hu(e,t,u,p,o,h)}return;default:if(Et(t)){for(var y in n)p=n[y],n.hasOwnProperty(y)&&void 0!==p&&!o.hasOwnProperty(y)&&Uu(e,t,y,void 0,o,p);for(d in o)p=o[d],h=n[d],!o.hasOwnProperty(d)||p===h||void 0===p&&void 0===h||Uu(e,t,d,p,o,h);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&null!=p&&!o.hasOwnProperty(v)&&Hu(e,t,v,null,o,p);for(f in o)p=o[f],h=n[f],!o.hasOwnProperty(f)||p===h||null==p&&null==h||Hu(e,t,f,p,o,h)}(o,e.type,n,t),o[ze]=t}catch(t){nu(e,e.return,t)}}function Kl(e){return 5===e.tag||3===e.tag||26===e.tag||27===e.tag||4===e.tag}function Xl(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Kl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&27!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function Yl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Vu));else if(4!==r&&27!==r&&null!==(e=e.child))for(Yl(e,t,n),e=e.sibling;null!==e;)Yl(e,t,n),e=e.sibling}function Gl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&27!==r&&null!==(e=e.child))for(Gl(e,t,n),e=e.sibling;null!==e;)Gl(e,t,n),e=e.sibling}var Ql=!1,Zl=!1,Jl=!1,es="function"==typeof WeakSet?WeakSet:Set,ts=null,ns=!1;function rs(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:gs(e,n),4&r&&jl(5,n);break;case 1:if(gs(e,n),4&r)if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(e){nu(n,n.return,e)}else{var o=Ta(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){nu(n,n.return,e)}}64&r&&Bl(n),512&r&&Hl(n,n.return);break;case 3:if(gs(e,n),64&r&&null!==(r=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 27:case 5:case 1:e=n.child.stateNode}try{Fl(r,e)}catch(e){nu(n,n.return,e)}}break;case 26:gs(e,n),512&r&&Hl(n,n.return);break;case 27:case 5:gs(e,n),null===t&&4&r&&Wl(n),512&r&&Hl(n,n.return);break;case 12:default:gs(e,n);break;case 13:gs(e,n),4&r&&cs(e,n);break;case 22:if(!(o=null!==n.memoizedState||Ql)){t=null!==t&&null!==t.memoizedState||Zl;var i=Ql,a=Zl;Ql=o,(Zl=t)&&!a?vs(e,n,!!(8772&n.subtreeFlags)):gs(e,n),Ql=i,Zl=a}512&r&&("manual"===n.memoizedProps.mode?Hl(n,n.return):Ul(n,n.return))}}function os(e){var t=e.alternate;null!==t&&(e.alternate=null,os(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&Ue(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var is=null,as=!1;function ls(e,t,n){for(n=n.child;null!==n;)ss(e,t,n),n=n.sibling}function ss(e,t,n){if(ge&&"function"==typeof ge.onCommitFiberUnmount)try{ge.onCommitFiberUnmount(me,n)}catch(e){}switch(n.tag){case 26:Zl||Ul(n,t),ls(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode).parentNode.removeChild(n);break;case 27:Zl||Ul(n,t);var r=is,o=as;for(is=n.stateNode,ls(e,t,n),t=(n=n.stateNode).attributes;t.length;)n.removeAttributeNode(t[0]);Ue(n),is=r,as=o;break;case 5:Zl||Ul(n,t);case 6:o=is;var i=as;if(is=null,ls(e,t,n),as=i,null!==(is=o))if(as)try{e=is,r=n.stateNode,8===e.nodeType?e.parentNode.removeChild(r):e.removeChild(r)}catch(e){nu(n,t,e)}else try{is.removeChild(n.stateNode)}catch(e){nu(n,t,e)}break;case 18:null!==is&&(as?(t=is,n=n.stateNode,8===t.nodeType?od(t.parentNode,n):1===t.nodeType&&od(t,n),mf(t)):od(is,n.stateNode));break;case 4:r=is,o=as,is=n.stateNode.containerInfo,as=!0,ls(e,t,n),is=r,as=o;break;case 0:case 11:case 14:case 15:Zl||$l(2,n,t),Zl||$l(4,n,t),ls(e,t,n);break;case 1:Zl||(Ul(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount&&Vl(n,t,r)),ls(e,t,n);break;case 21:ls(e,t,n);break;case 22:Zl||Ul(n,t),Zl=(r=Zl)||null!==n.memoizedState,ls(e,t,n),Zl=r;break;default:ls(e,t,n)}}function cs(e,t){if(null===t.memoizedState&&(null!==(e=t.alternate)&&(null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))))try{mf(e)}catch(e){nu(t,t.return,e)}}function us(e,t){var n=function(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return null===t&&(t=e.stateNode=new es),t;case 22:return null===(t=(e=e.stateNode)._retryCache)&&(t=e._retryCache=new es),t;default:throw Error(r(435,e.tag))}}(e);t.forEach((function(t){var r=lu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}function ds(e,t){var n=t.deletions;if(null!==n)for(var o=0;o<n.length;o++){var i=n[o],a=e,l=t,s=l;e:for(;null!==s;){switch(s.tag){case 27:case 5:is=s.stateNode,as=!1;break e;case 3:case 4:is=s.stateNode.containerInfo,as=!0;break e}s=s.return}if(null===is)throw Error(r(160));ss(a,l,i),is=null,as=!1,null!==(a=i.alternate)&&(a.return=null),i.return=null}if(13878&t.subtreeFlags)for(t=t.child;null!==t;)ps(t,e),t=t.sibling}var fs=null;function ps(e,t){var n=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ds(t,e),hs(e),4&o&&($l(3,e,e.return),jl(3,e),$l(5,e,e.return));break;case 1:ds(t,e),hs(e),512&o&&(Zl||null===n||Ul(n,n.return)),64&o&&Ql&&(null!==(e=e.updateQueue)&&(null!==(o=e.callbacks)&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=null===n?o:n.concat(o))));break;case 26:var i=fs;if(ds(t,e),hs(e),512&o&&(Zl||null===n||Ul(n,n.return)),4&o){var a=null!==n?n.memoizedState:null;if(o=e.memoizedState,null===n)if(null===o)if(null===e.stateNode){e:{o=e.type,n=e.memoizedProps,i=i.ownerDocument||i;t:switch(o){case"title":(!(a=i.getElementsByTagName("title")[0])||a[He]||a[Le]||"http://www.w3.org/2000/svg"===a.namespaceURI||a.hasAttribute("itemprop"))&&(a=i.createElement(o),i.head.insertBefore(a,i.querySelector("head > title"))),Wu(a,o,n),a[Le]=e,Ye(a),o=a;break e;case"link":var l=Cd("link","href",i).get(o+(n.href||""));if(l)for(var s=0;s<l.length;s++)if((a=l[s]).getAttribute("href")===(null==n.href?null:n.href)&&a.getAttribute("rel")===(null==n.rel?null:n.rel)&&a.getAttribute("title")===(null==n.title?null:n.title)&&a.getAttribute("crossorigin")===(null==n.crossOrigin?null:n.crossOrigin)){l.splice(s,1);break t}Wu(a=i.createElement(o),o,n),i.head.appendChild(a);break;case"meta":if(l=Cd("meta","content",i).get(o+(n.content||"")))for(s=0;s<l.length;s++)if((a=l[s]).getAttribute("content")===(null==n.content?null:""+n.content)&&a.getAttribute("name")===(null==n.name?null:n.name)&&a.getAttribute("property")===(null==n.property?null:n.property)&&a.getAttribute("http-equiv")===(null==n.httpEquiv?null:n.httpEquiv)&&a.getAttribute("charset")===(null==n.charSet?null:n.charSet)){l.splice(s,1);break t}Wu(a=i.createElement(o),o,n),i.head.appendChild(a);break;default:throw Error(r(468,o))}a[Le]=e,Ye(a),o=a}e.stateNode=o}else Od(i,e.type,e.stateNode);else e.stateNode=xd(i,o,e.memoizedProps);else a!==o?(null===a?null!==n.stateNode&&(n=n.stateNode).parentNode.removeChild(n):a.count--,null===o?Od(i,e.type,e.stateNode):xd(i,o,e.memoizedProps)):null===o&&null!==e.stateNode&&ql(e,e.memoizedProps,n.memoizedProps)}break;case 27:if(4&o&&null===e.alternate){i=e.stateNode,a=e.memoizedProps;try{for(var c=i.firstChild;c;){var u=c.nextSibling,d=c.nodeName;c[He]||"HEAD"===d||"BODY"===d||"SCRIPT"===d||"STYLE"===d||"LINK"===d&&"stylesheet"===c.rel.toLowerCase()||i.removeChild(c),c=u}for(var f=e.type,p=i.attributes;p.length;)i.removeAttributeNode(p[0]);Wu(i,f,a),i[Le]=e,i[ze]=a}catch(t){nu(e,e.return,t)}}case 5:if(ds(t,e),hs(e),512&o&&(Zl||null===n||Ul(n,n.return)),32&e.flags){i=e.stateNode;try{wt(i,"")}catch(t){nu(e,e.return,t)}}4&o&&null!=e.stateNode&&ql(e,i=e.memoizedProps,null!==n?n.memoizedProps:i),1024&o&&(Jl=!0);break;case 6:if(ds(t,e),hs(e),4&o){if(null===e.stateNode)throw Error(r(162));o=e.memoizedProps,n=e.stateNode;try{n.nodeValue=o}catch(t){nu(e,e.return,t)}}break;case 3:if(_d=null,i=fs,fs=dd(t.containerInfo),ds(t,e),fs=i,hs(e),4&o&&null!==n&&n.memoizedState.isDehydrated)try{mf(t.containerInfo)}catch(t){nu(e,e.return,t)}Jl&&(Jl=!1,ms(e));break;case 4:o=fs,fs=dd(e.stateNode.containerInfo),ds(t,e),hs(e),fs=o;break;case 12:ds(t,e),hs(e);break;case 13:ds(t,e),hs(e),8192&e.child.flags&&null!==e.memoizedState!=(null!==n&&null!==n.memoizedState)&&(vc=ae()),4&o&&(null!==(o=e.updateQueue)&&(e.updateQueue=null,us(e,o)));break;case 22:if(512&o&&(Zl||null===n||Ul(n,n.return)),c=null!==e.memoizedState,u=null!==n&&null!==n.memoizedState,Ql=(d=Ql)||c,Zl=(f=Zl)||u,ds(t,e),Zl=f,Ql=d,hs(e),(t=e.stateNode)._current=e,t._visibility&=-3,t._visibility|=2&t._pendingVisibility,8192&o&&(t._visibility=c?-2&t._visibility:1|t._visibility,c&&(t=Ql||Zl,null===n||u||t||ys(e)),null===e.memoizedProps||"manual"!==e.memoizedProps.mode))e:for(n=null,t=e;;){if(5===t.tag||26===t.tag||27===t.tag){if(null===n){u=n=t;try{if(i=u.stateNode,c)"function"==typeof(a=i.style).setProperty?a.setProperty("display","none","important"):a.display="none";else{l=u.stateNode;var h=null!=(s=u.memoizedProps.style)&&s.hasOwnProperty("display")?s.display:null;l.style.display=null==h||"boolean"==typeof h?"":(""+h).trim()}}catch(e){nu(u,u.return,e)}}}else if(6===t.tag){if(null===n){u=t;try{u.stateNode.nodeValue=c?"":u.memoizedProps}catch(e){nu(u,u.return,e)}}}else if((22!==t.tag&&23!==t.tag||null===t.memoizedState||t===e)&&null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;null===t.sibling;){if(null===t.return||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}4&o&&(null!==(o=e.updateQueue)&&(null!==(n=o.retryQueue)&&(o.retryQueue=null,us(e,n))));break;case 19:ds(t,e),hs(e),4&o&&(null!==(o=e.updateQueue)&&(e.updateQueue=null,us(e,o)));break;case 21:break;default:ds(t,e),hs(e)}}function hs(e){var t=e.flags;if(2&t){try{if(27!==e.tag){e:{for(var n=e.return;null!==n;){if(Kl(n)){var o=n;break e}n=n.return}throw Error(r(160))}switch(o.tag){case 27:var i=o.stateNode;Gl(e,Xl(e),i);break;case 5:var a=o.stateNode;32&o.flags&&(wt(a,""),o.flags&=-33),Gl(e,Xl(e),a);break;case 3:case 4:var l=o.stateNode.containerInfo;Yl(e,Xl(e),l);break;default:throw Error(r(161))}}}catch(t){nu(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function ms(e){if(1024&e.subtreeFlags)for(e=e.child;null!==e;){var t=e;ms(t),5===t.tag&&1024&t.flags&&t.stateNode.reset(),e=e.sibling}}function gs(e,t){if(8772&t.subtreeFlags)for(t=t.child;null!==t;)rs(e,t.alternate,t),t=t.sibling}function ys(e){for(e=e.child;null!==e;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:$l(4,t,t.return),ys(t);break;case 1:Ul(t,t.return);var n=t.stateNode;"function"==typeof n.componentWillUnmount&&Vl(t,t.return,n),ys(t);break;case 26:case 27:case 5:Ul(t,t.return),ys(t);break;case 22:Ul(t,t.return),null===t.memoizedState&&ys(t);break;default:ys(t)}e=e.sibling}}function vs(e,t,n){for(n=n&&!!(8772&t.subtreeFlags),t=t.child;null!==t;){var r=t.alternate,o=e,i=t,a=i.flags;switch(i.tag){case 0:case 11:case 15:vs(o,i,n),jl(4,i);break;case 1:if(vs(o,i,n),"function"==typeof(o=(r=i).stateNode).componentDidMount)try{o.componentDidMount()}catch(e){nu(r,r.return,e)}if(null!==(o=(r=i).updateQueue)){var l=r.stateNode;try{var s=o.shared.hiddenCallbacks;if(null!==s)for(o.shared.hiddenCallbacks=null,o=0;o<s.length;o++)zl(s[o],l)}catch(e){nu(r,r.return,e)}}n&&64&a&&Bl(i),Hl(i,i.return);break;case 26:case 27:case 5:vs(o,i,n),n&&null===r&&4&a&&Wl(i),Hl(i,i.return);break;case 12:default:vs(o,i,n);break;case 13:vs(o,i,n),n&&4&a&&cs(o,i);break;case 22:null===i.memoizedState&&vs(o,i,n),Hl(i,i.return)}t=t.sibling}}function bs(e,t){var n=null;null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),e=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(e=t.memoizedState.cachePool.pool),e!==n&&(null!=e&&e.refCount++,null!=n&&Bo(n))}function ws(e,t){e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&Bo(e))}function xs(e,t,n,r){if(10256&t.subtreeFlags)for(t=t.child;null!==t;)ks(e,t,n,r),t=t.sibling}function ks(e,t,n,r){var o=t.flags;switch(t.tag){case 0:case 11:case 15:xs(e,t,n,r),2048&o&&jl(9,t);break;case 3:xs(e,t,n,r),2048&o&&(e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&Bo(e)));break;case 12:if(2048&o){xs(e,t,n,r),e=t.stateNode;try{var i=t.memoizedProps,a=i.id,l=i.onPostCommit;"function"==typeof l&&l(a,null===t.alternate?"mount":"update",e.passiveEffectDuration,-0)}catch(e){nu(t,t.return,e)}}else xs(e,t,n,r);break;case 23:break;case 22:i=t.stateNode,null!==t.memoizedState?4&i._visibility?xs(e,t,n,r):Es(e,t):4&i._visibility?xs(e,t,n,r):(i._visibility|=4,Ss(e,t,n,r,!!(10256&t.subtreeFlags))),2048&o&&bs(t.alternate,t);break;case 24:xs(e,t,n,r),2048&o&&ws(t.alternate,t);break;default:xs(e,t,n,r)}}function Ss(e,t,n,r,o){for(o=o&&!!(10256&t.subtreeFlags),t=t.child;null!==t;){var i=e,a=t,l=n,s=r,c=a.flags;switch(a.tag){case 0:case 11:case 15:Ss(i,a,l,s,o),jl(8,a);break;case 23:break;case 22:var u=a.stateNode;null!==a.memoizedState?4&u._visibility?Ss(i,a,l,s,o):Es(i,a):(u._visibility|=4,Ss(i,a,l,s,o)),o&&2048&c&&bs(a.alternate,a);break;case 24:Ss(i,a,l,s,o),o&&2048&c&&ws(a.alternate,a);break;default:Ss(i,a,l,s,o)}t=t.sibling}}function Es(e,t){if(10256&t.subtreeFlags)for(t=t.child;null!==t;){var n=e,r=t,o=r.flags;switch(r.tag){case 22:Es(n,r),2048&o&&bs(r.alternate,r);break;case 24:Es(n,r),2048&o&&ws(r.alternate,r);break;default:Es(n,r)}t=t.sibling}}var _s=8192;function Cs(e){if(e.subtreeFlags&_s)for(e=e.child;null!==e;)Os(e),e=e.sibling}function Os(e){switch(e.tag){case 26:Cs(e),e.flags&_s&&null!==e.memoizedState&&function(e,t,n){if(null===Pd)throw Error(r(475));var o=Pd;if(!("stylesheet"!==t.type||"string"==typeof n.media&&!1===matchMedia(n.media).matches||4&t.state.loading)){if(null===t.instance){var i=gd(n.href),a=e.querySelector(yd(i));if(a)return null!==(e=a._p)&&"object"==typeof e&&"function"==typeof e.then&&(o.count++,o=Md.bind(o),e.then(o,o)),t.state.loading|=4,t.instance=a,void Ye(a);a=e.ownerDocument||e,n=vd(n),(i=cd.get(i))&&Sd(n,i),Ye(a=a.createElement("link"));var l=a;l._p=new Promise((function(e,t){l.onload=e,l.onerror=t})),Wu(a,"link",n),t.instance=a}null===o.stylesheets&&(o.stylesheets=new Map),o.stylesheets.set(t,e),(e=t.state.preload)&&!(3&t.state.loading)&&(o.count++,t=Md.bind(o),e.addEventListener("load",t),e.addEventListener("error",t))}}(fs,e.memoizedState,e.memoizedProps);break;case 5:default:Cs(e);break;case 3:case 4:var t=fs;fs=dd(e.stateNode.containerInfo),Cs(e),fs=t;break;case 22:null===e.memoizedState&&(null!==(t=e.alternate)&&null!==t.memoizedState?(t=_s,_s=16777216,Cs(e),_s=t):Cs(e))}}function Ns(e){var t=e.alternate;if(null!==t&&null!==(e=t.child)){t.child=null;do{t=e.sibling,e.sibling=null,e=t}while(null!==e)}}function Ps(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];ts=r,Ts(r,e)}Ns(e)}if(10256&e.subtreeFlags)for(e=e.child;null!==e;)Rs(e),e=e.sibling}function Rs(e){switch(e.tag){case 0:case 11:case 15:Ps(e),2048&e.flags&&$l(9,e,e.return);break;case 3:case 12:default:Ps(e);break;case 22:var t=e.stateNode;null!==e.memoizedState&&4&t._visibility&&(null===e.return||13!==e.return.tag)?(t._visibility&=-5,Ms(e)):Ps(e)}}function Ms(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];ts=r,Ts(r,e)}Ns(e)}for(e=e.child;null!==e;){switch((t=e).tag){case 0:case 11:case 15:$l(8,t,t.return),Ms(t);break;case 22:4&(n=t.stateNode)._visibility&&(n._visibility&=-5,Ms(t));break;default:Ms(t)}e=e.sibling}}function Ts(e,t){for(;null!==ts;){var n=ts;switch(n.tag){case 0:case 11:case 15:$l(8,n,t);break;case 23:case 22:if(null!==n.memoizedState&&null!==n.memoizedState.cachePool){var r=n.memoizedState.cachePool.pool;null!=r&&r.refCount++}break;case 24:Bo(n.memoizedState.cache)}if(null!==(r=n.child))r.return=n,ts=r;else e:for(n=e;null!==ts;){var o=(r=ts).sibling,i=r.return;if(os(r),r===n){ts=null;break e}if(null!==o){o.return=i,ts=o;break e}ts=i}}}function As(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ds(e,t,n,r){return new As(e,t,n,r)}function Is(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ls(e,t){var n=e.alternate;return null===n?((n=Ds(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=31457280&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function zs(e,t){e.flags&=31457282;var n=e.alternate;return null===n?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Fs(e,t,n,o,i,a){var l=0;if(o=e,"function"==typeof e)Is(e)&&(l=1);else if("string"==typeof e)l=function(e,t,n){if(1===n||null!=t.itemProp)return!1;switch(e){case"meta":case"title":return!0;case"style":if("string"!=typeof t.precedence||"string"!=typeof t.href||""===t.href)break;return!0;case"link":if("string"!=typeof t.rel||"string"!=typeof t.href||""===t.href||t.onLoad||t.onError)break;return"stylesheet"!==t.rel||(e=t.disabled,"string"==typeof t.precedence&&null==e);case"script":if(t.async&&"function"!=typeof t.async&&"symbol"!=typeof t.async&&!t.onLoad&&!t.onError&&t.src&&"string"==typeof t.src)return!0}return!1}(e,n,K.current)?26:"html"===e||"head"===e||"body"===e?27:5;else e:switch(e){case c:return js(n.children,i,a,t);case u:l=8,i|=24;break;case d:return(e=Ds(12,n,t,2|i)).elementType=d,e.lanes=a,e;case g:return(e=Ds(13,n,t,i)).elementType=g,e.lanes=a,e;case y:return(e=Ds(19,n,t,i)).elementType=y,e.lanes=a,e;case w:return $s(n,i,a,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case f:case h:l=10;break e;case p:l=9;break e;case m:l=11;break e;case v:l=14;break e;case b:l=16,o=null;break e}l=29,n=Error(r(130,null===e?"null":typeof e,"")),o=null}return(t=Ds(l,n,t,i)).elementType=e,t.type=o,t.lanes=a,t}function js(e,t,n,r){return(e=Ds(7,e,r,t)).lanes=n,e}function $s(e,t,n,o){(e=Ds(22,e,o,t)).elementType=w,e.lanes=n;var i={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var e=i._current;if(null===e)throw Error(r(456));if(!(2&i._pendingVisibility)){var t=Or(e,2);null!==t&&(i._pendingVisibility|=2,Mc(t,e,2))}},attach:function(){var e=i._current;if(null===e)throw Error(r(456));if(2&i._pendingVisibility){var t=Or(e,2);null!==t&&(i._pendingVisibility&=-3,Mc(t,e,2))}}};return e.stateNode=i,e}function Bs(e,t,n){return(e=Ds(6,e,null,t)).lanes=n,e}function Vs(e,t,n){return(t=Ds(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Hs(e){e.flags|=4}function Us(e,t){if("stylesheet"!==t.type||4&t.state.loading)e.flags&=-16777217;else if(e.flags|=16777216,!Nd(t)){if(null!==(t=No.current)&&((4194176&nc)===nc?null!==Po:(62914560&nc)!==nc&&!(536870912&nc)||t!==Po))throw fo=lo,ao;e.flags|=8192}}function Ws(e,t){null!==t&&(e.flags|=4),16384&e.flags&&(t=22!==e.tag?Ne():536870912,e.lanes|=t,hc|=t)}function qs(e,t){if(!Yr)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ks(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=31457280&o.subtreeFlags,r|=31457280&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Xs(e,t,n){var o=t.pendingProps;switch(qr(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:case 1:return Ks(t),null;case 3:return n=t.stateNode,o=null,null!==e&&(o=e.memoizedState.cache),t.memoizedState.cache!==o&&(t.flags|=2048),vl(jo),Z(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||(no(t)?Hs(t):null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==Gr&&(Ac(Gr),Gr=null))),Ks(t),null;case 26:return n=t.memoizedState,null===e?(Hs(t),null!==n?(Ks(t),Us(t,n)):(Ks(t),t.flags&=-16777217)):n?n!==e.memoizedState?(Hs(t),Ks(t),Us(t,n)):(Ks(t),t.flags&=-16777217):(e.memoizedProps!==o&&Hs(t),Ks(t),t.flags&=-16777217),null;case 27:ee(t),n=Y.current;var i=t.type;if(null!==e&&null!=t.stateNode)e.memoizedProps!==o&&Hs(t);else{if(!o){if(null===t.stateNode)throw Error(r(166));return Ks(t),null}e=K.current,no(t)?eo(t):(e=sd(i,o,n),t.stateNode=e,Hs(t))}return Ks(t),null;case 5:if(ee(t),n=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==o&&Hs(t);else{if(!o){if(null===t.stateNode)throw Error(r(166));return Ks(t),null}if(e=K.current,no(t))eo(t);else{switch(i=Xu(Y.current),e){case 1:e=i.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:e=i.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":e=i.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":e=i.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":(e=i.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e="string"==typeof o.is?i.createElement("select",{is:o.is}):i.createElement("select"),o.multiple?e.multiple=!0:o.size&&(e.size=o.size);break;default:e="string"==typeof o.is?i.createElement(n,{is:o.is}):i.createElement(n)}}e[Le]=t,e[ze]=o;e:for(i=t.child;null!==i;){if(5===i.tag||6===i.tag)e.appendChild(i.stateNode);else if(4!==i.tag&&27!==i.tag&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break e;for(;null===i.sibling;){if(null===i.return||i.return===t)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}t.stateNode=e;e:switch(Wu(e,n,o),n){case"button":case"input":case"select":case"textarea":e=!!o.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&Hs(t)}}return Ks(t),t.flags&=-16777217,null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==o&&Hs(t);else{if("string"!=typeof o&&null===t.stateNode)throw Error(r(166));if(e=Y.current,no(t)){if(e=t.stateNode,n=t.memoizedProps,o=null,null!==(i=Kr))switch(i.tag){case 27:case 5:o=i.memoizedProps}e[Le]=t,(e=!!(e.nodeValue===n||null!==o&&!0===o.suppressHydrationWarning||Bu(e.nodeValue,n)))||Jr(t)}else(e=Xu(e).createTextNode(o))[Le]=t,t.stateNode=e}return Ks(t),null;case 13:if(o=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(i=no(t),null!==o&&null!==o.dehydrated){if(null===e){if(!i)throw Error(r(318));if(!(i=null!==(i=t.memoizedState)?i.dehydrated:null))throw Error(r(317));i[Le]=t}else ro(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Ks(t),i=!1}else null!==Gr&&(Ac(Gr),Gr=null),i=!0;if(!i)return 256&t.flags?(Ao(t),t):(Ao(t),null)}if(Ao(t),128&t.flags)return t.lanes=n,t;if(n=null!==o,e=null!==e&&null!==e.memoizedState,n){i=null,null!==(o=t.child).alternate&&null!==o.alternate.memoizedState&&null!==o.alternate.memoizedState.cachePool&&(i=o.alternate.memoizedState.cachePool.pool);var a=null;null!==o.memoizedState&&null!==o.memoizedState.cachePool&&(a=o.memoizedState.cachePool.pool),a!==i&&(o.flags|=2048)}return n!==e&&n&&(t.child.flags|=8192),Ws(t,t.updateQueue),Ks(t),null;case 4:return Z(),null===e&&Mu(t.stateNode.containerInfo),Ks(t),null;case 10:return vl(t.type),Ks(t),null;case 19:if(W(Do),null===(i=t.memoizedState))return Ks(t),null;if(o=!!(128&t.flags),null===(a=i.rendering))if(o)qs(i,!1);else{if(0!==cc||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(a=Io(e))){for(t.flags|=128,qs(i,!1),e=a.updateQueue,t.updateQueue=e,Ws(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)zs(n,e),n=n.sibling;return q(Do,1&Do.current|2),t.child}e=e.sibling}null!==i.tail&&ae()>bc&&(t.flags|=128,o=!0,qs(i,!1),t.lanes=4194304)}else{if(!o)if(null!==(e=Io(a))){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,Ws(t,e),qs(i,!0),null===i.tail&&"hidden"===i.tailMode&&!a.alternate&&!Yr)return Ks(t),null}else 2*ae()-i.renderingStartTime>bc&&536870912!==n&&(t.flags|=128,o=!0,qs(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(null!==(e=i.last)?e.sibling=a:t.child=a,i.last=a)}return null!==i.tail?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ae(),t.sibling=null,e=Do.current,q(Do,o?1&e|2:1&e),t):(Ks(t),null);case 22:case 23:return Ao(t),Oo(),o=null!==t.memoizedState,null!==e?null!==e.memoizedState!==o&&(t.flags|=8192):o&&(t.flags|=8192),o?!!(536870912&n)&&!(128&t.flags)&&(Ks(t),6&t.subtreeFlags&&(t.flags|=8192)):Ks(t),null!==(n=t.updateQueue)&&Ws(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),o=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(o=t.memoizedState.cachePool.pool),o!==n&&(t.flags|=2048),null!==e&&W(Xo),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),vl(jo),Ks(t),null;case 25:return null}throw Error(r(156,t.tag))}function Ys(e,t){switch(qr(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return vl(jo),Z(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return ee(t),null;case 13:if(Ao(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(r(340));ro()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return W(Do),null;case 4:return Z(),null;case 10:return vl(t.type),null;case 22:case 23:return Ao(t),Oo(),null!==e&&W(Xo),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return vl(jo),null;default:return null}}function Gs(e,t){switch(qr(t),t.tag){case 3:vl(jo),Z();break;case 26:case 27:case 5:ee(t);break;case 4:Z();break;case 13:Ao(t);break;case 19:W(Do);break;case 10:vl(t.type);break;case 22:case 23:Ao(t),Oo(),null!==e&&W(Xo);break;case 24:vl(jo)}}var Qs={getCacheForType:function(e){var t=El(jo),n=t.data.get(e);return void 0===n&&(n=e(),t.data.set(e,n)),n}},Zs="function"==typeof WeakMap?WeakMap:Map,Js=0,ec=null,tc=null,nc=0,rc=0,oc=null,ic=!1,ac=!1,lc=!1,sc=0,cc=0,uc=0,dc=0,fc=0,pc=0,hc=0,mc=null,gc=null,yc=!1,vc=0,bc=1/0,wc=null,xc=null,kc=!1,Sc=null,Ec=0,_c=0,Cc=null,Oc=0,Nc=null;function Pc(){if(2&Js&&0!==nc)return nc&-nc;if(null!==N.T){return 0!==Uo?Uo:wu()}return De()}function Rc(){0===pc&&(pc=536870912&nc&&!Yr?536870912:Oe());var e=No.current;return null!==e&&(e.flags|=32),pc}function Mc(e,t,n){(e===ec&&2===rc||null!==e.cancelPendingCommit)&&(jc(e,0),Lc(e,nc,pc,!1)),Re(e,n),2&Js&&e===ec||(e===ec&&(!(2&Js)&&(dc|=n),4===cc&&Lc(e,nc,pc,!1)),hu(e))}function Tc(e,t,n){if(6&Js)throw Error(r(327));for(var o=!n&&!(60&t)&&!(t&e.expiredLanes)||_e(e,t),i=o?function(e,t){var n=Js;Js|=2;var o=Bc(),i=Vc();ec!==e||nc!==t?(wc=null,bc=ae()+500,jc(e,t)):ac=_e(e,t);e:for(;;)try{if(0!==rc&&null!==tc){t=tc;var a=oc;t:switch(rc){case 1:rc=0,oc=null,Yc(e,t,a,1);break;case 2:if(so(a)){rc=0,oc=null,Xc(t);break}t=function(){2===rc&&ec===e&&(rc=7),hu(e)},a.then(t,t);break e;case 3:rc=7;break e;case 4:rc=5;break e;case 7:so(a)?(rc=0,oc=null,Xc(t)):(rc=0,oc=null,Yc(e,t,a,7));break;case 5:var l=null;switch(tc.tag){case 26:l=tc.memoizedState;case 5:case 27:var s=tc;if(!l||Nd(l)){rc=0,oc=null;var c=s.sibling;if(null!==c)tc=c;else{var u=s.return;null!==u?(tc=u,Gc(u)):tc=null}break t}}rc=0,oc=null,Yc(e,t,a,5);break;case 6:rc=0,oc=null,Yc(e,t,a,6);break;case 8:Fc(),cc=6;break e;default:throw Error(r(462))}}qc();break}catch(t){$c(e,t)}return gl=ml=null,N.H=o,N.A=i,Js=n,null!==tc?0:(ec=null,nc=0,Er(),cc)}(e,t):Uc(e,t,!0),a=o;;){if(0===i){ac&&!o&&Lc(e,t,0,!1);break}if(6===i)Lc(e,t,0,!ic);else{if(n=e.current.alternate,a&&!Ic(n)){i=Uc(e,t,!1),a=!1;continue}if(2===i){if(a=t,e.errorRecoveryDisabledLanes&a)var l=0;else l=0!==(l=-536870913&e.pendingLanes)?l:536870912&l?536870912:0;if(0!==l){t=l;e:{var s=e;i=mc;var c=s.current.memoizedState.isDehydrated;if(c&&(jc(s,l).flags|=256),2!==(l=Uc(s,l,!1))){if(lc&&!c){s.errorRecoveryDisabledLanes|=a,dc|=a,i=4;break e}a=gc,gc=i,null!==a&&Ac(a)}i=l}if(a=!1,2!==i)continue}}if(1===i){jc(e,0),Lc(e,t,0,!0);break}e:{switch(o=e,i){case 0:case 1:throw Error(r(345));case 4:if((4194176&t)===t){Lc(o,t,pc,!ic);break e}break;case 2:gc=null;break;case 3:case 5:break;default:throw Error(r(329))}if(o.finishedWork=n,o.finishedLanes=t,(62914560&t)===t&&10<(a=vc+300-ae())){if(Lc(o,t,pc,!ic),0!==Ee(o,0))break e;o.timeoutHandle=Ju(Dc.bind(null,o,n,gc,wc,yc,t,pc,dc,hc,ic,2,-0,0),a)}else Dc(o,n,gc,wc,yc,t,pc,dc,hc,ic,0,-0,0)}}break}hu(e)}function Ac(e){null===gc?gc=e:gc.push.apply(gc,e)}function Dc(e,t,n,o,i,a,l,s,c,u,d,f,p){var h=t.subtreeFlags;if((8192&h||!(16785408&~h))&&(Pd={stylesheets:null,count:0,unsuspend:Rd},Os(t),null!==(t=function(){if(null===Pd)throw Error(r(475));var e=Pd;return e.stylesheets&&0===e.count&&Ad(e,e.stylesheets),0<e.count?function(t){var n=setTimeout((function(){if(e.stylesheets&&Ad(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}),6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(n)}}:null}())))return e.cancelPendingCommit=t(Zc.bind(null,e,n,o,i,l,s,c,1,f,p)),void Lc(e,a,l,!u);Zc(e,n,o,i,l,s,c,d,f,p)}function Ic(e){for(var t=e;;){var n=t.tag;if((0===n||11===n||15===n)&&16384&t.flags&&(null!==(n=t.updateQueue)&&null!==(n=n.stores)))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!qn(i(),o))return!1}catch(e){return!1}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Lc(e,t,n,r){t&=~fc,t&=~dc,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var o=t;0<o;){var i=31-ve(o),a=1<<i;r[i]=-1,o&=~a}0!==n&&Me(e,n,t)}function zc(){return!!(6&Js)||(mu(0),!1)}function Fc(){if(null!==tc){if(0===rc)var e=tc.return;else gl=ml=null,yi(e=tc),ho=null,mo=0,e=tc;for(;null!==e;)Gs(e.alternate,e),e=e.return;tc=null}}function jc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;-1!==n&&(e.timeoutHandle=-1,ed(n)),null!==(n=e.cancelPendingCommit)&&(e.cancelPendingCommit=null,n()),Fc(),ec=e,tc=n=Ls(e.current,null),nc=t,rc=0,oc=null,ic=!1,ac=_e(e,t),lc=!1,hc=pc=fc=dc=uc=cc=0,gc=mc=null,yc=!1,8&t&&(t|=32&t);var r=e.entangledLanes;if(0!==r)for(e=e.entanglements,r&=t;0<r;){var o=31-ve(r),i=1<<o;t|=e[o],r&=~i}return sc=t,Er(),n}function $c(e,t){Jo=null,N.H=Ea,t===io?(t=po(),rc=3):t===ao?(t=po(),rc=4):rc=t===Va?8:null!==t&&"object"==typeof t&&"function"==typeof t.then?6:1,oc=t,null===tc&&(cc=1,za(e,Tr(t,e.current)))}function Bc(){var e=N.H;return N.H=Ea,null===e?Ea:e}function Vc(){var e=N.A;return N.A=Qs,e}function Hc(){cc=4,ic||(4194176&nc)!==nc&&null!==No.current||(ac=!0),!(134217727&uc)&&!(134217727&dc)||null===ec||Lc(ec,nc,pc,!1)}function Uc(e,t,n){var r=Js;Js|=2;var o=Bc(),i=Vc();ec===e&&nc===t||(wc=null,jc(e,t)),t=!1;var a=cc;e:for(;;)try{if(0!==rc&&null!==tc){var l=tc,s=oc;switch(rc){case 8:Fc(),a=6;break e;case 3:case 2:case 6:null===No.current&&(t=!0);var c=rc;if(rc=0,oc=null,Yc(e,l,s,c),n&&ac){a=0;break e}break;default:c=rc,rc=0,oc=null,Yc(e,l,s,c)}}Wc(),a=cc;break}catch(t){$c(e,t)}return t&&e.shellSuspendCounter++,gl=ml=null,Js=r,N.H=o,N.A=i,null===tc&&(ec=null,nc=0,Er()),a}function Wc(){for(;null!==tc;)Kc(tc)}function qc(){for(;null!==tc&&!oe();)Kc(tc)}function Kc(e){var t=pl(e.alternate,e,sc);e.memoizedProps=e.pendingProps,null===t?Gc(e):tc=t}function Xc(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Za(n,t,t.pendingProps,t.type,void 0,nc);break;case 11:t=Za(n,t,t.pendingProps,t.type.render,t.ref,nc);break;case 5:yi(t);default:Gs(n,t),t=pl(n,t=tc=zs(t,sc),sc)}e.memoizedProps=e.pendingProps,null===t?Gc(e):tc=t}function Yc(e,t,n,o){gl=ml=null,yi(t),ho=null,mo=0;var i=t.return;try{if(function(e,t,n,o,i){if(n.flags|=32768,null!==o&&"object"==typeof o&&"function"==typeof o.then){if(null!==(t=n.alternate)&&xl(t,n,i,!0),null!==(n=No.current)){switch(n.tag){case 13:return null===Po?Hc():null===n.alternate&&0===cc&&(cc=3),n.flags&=-257,n.flags|=65536,n.lanes=i,o===lo?n.flags|=16384:(null===(t=n.updateQueue)?n.updateQueue=new Set([o]):t.add(o),ru(e,o,i)),!1;case 22:return n.flags|=65536,o===lo?n.flags|=16384:(null===(t=n.updateQueue)?(t={transitions:null,markerInstances:null,retryQueue:new Set([o])},n.updateQueue=t):null===(n=t.retryQueue)?t.retryQueue=new Set([o]):n.add(o),ru(e,o,i)),!1}throw Error(r(435,n.tag))}return ru(e,o,i),Hc(),!1}if(Yr)return null!==(t=No.current)?(!(65536&t.flags)&&(t.flags|=256),t.flags|=65536,t.lanes=i,o!==Zr&&oo(Tr(e=Error(r(422),{cause:o}),n))):(o!==Zr&&oo(Tr(t=Error(r(423),{cause:o}),n)),(e=e.current.alternate).flags|=65536,i&=-i,e.lanes|=i,o=Tr(o,n),Al(e,i=ja(e.stateNode,o,i)),4!==cc&&(cc=2)),!1;var a=Error(r(520),{cause:o});if(a=Tr(a,n),null===mc?mc=[a]:mc.push(a),4!==cc&&(cc=2),null===t)return!0;o=Tr(o,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,Al(n,e=ja(n.stateNode,o,e)),!1;case 1:if(t=n.type,a=n.stateNode,!(128&n.flags||"function"!=typeof t.getDerivedStateFromError&&(null===a||"function"!=typeof a.componentDidCatch||null!==xc&&xc.has(a))))return n.flags|=65536,i&=-i,n.lanes|=i,Ba(i=$a(i),e,n,o),Al(n,i),!1}n=n.return}while(null!==n);return!1}(e,i,t,n,nc))return cc=1,za(e,Tr(n,e.current)),void(tc=null)}catch(t){if(null!==i)throw tc=i,t;return cc=1,za(e,Tr(n,e.current)),void(tc=null)}32768&t.flags?(Yr||1===o?e=!0:ac||536870912&nc?e=!1:(ic=e=!0,(2===o||3===o||6===o)&&(null!==(o=No.current)&&13===o.tag&&(o.flags|=16384))),Qc(t,e)):Gc(t)}function Gc(e){var t=e;do{if(32768&t.flags)return void Qc(t,ic);e=t.return;var n=Xs(t.alternate,t,sc);if(null!==n)return void(tc=n);if(null!==(t=t.sibling))return void(tc=t);tc=t=e}while(null!==t);0===cc&&(cc=5)}function Qc(e,t){do{var n=Ys(e.alternate,e);if(null!==n)return n.flags&=32767,void(tc=n);if(null!==(n=e.return)&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&null!==(e=e.sibling))return void(tc=e);tc=e=n}while(null!==e);cc=6,tc=null}function Zc(e,t,n,o,i,a,l,s,c,u){var d=N.T,f=$.p;try{$.p=2,N.T=null,function(e,t,n,o,i,a,l,s){do{eu()}while(null!==Sc);if(6&Js)throw Error(r(327));var c=e.finishedWork;if(o=e.finishedLanes,null===c)return null;if(e.finishedWork=null,e.finishedLanes=0,c===e.current)throw Error(r(177));e.callbackNode=null,e.callbackPriority=0,e.cancelPendingCommit=null;var u=c.lanes|c.childLanes;if(function(e,t,n,r,o,i){var a=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var l=e.entanglements,s=e.expirationTimes,c=e.hiddenUpdates;for(n=a&~n;0<n;){var u=31-ve(n),d=1<<u;l[u]=0,s[u]=-1;var f=c[u];if(null!==f)for(c[u]=null,u=0;u<f.length;u++){var p=f[u];null!==p&&(p.lane&=-536870913)}n&=~d}0!==r&&Me(e,r,0),0!==i&&0===o&&0!==e.tag&&(e.suspendedLanes|=i&~(a&~t))}(e,o,u|=Sr,a,l,s),e===ec&&(tc=ec=null,nc=0),!(10256&c.subtreeFlags)&&!(10256&c.flags)||kc||(kc=!0,_c=u,Cc=n,function(e,t){ne(e,t)}(ue,(function(){return eu(),null}))),n=!!(15990&c.flags),15990&c.subtreeFlags||n?(n=N.T,N.T=null,a=$.p,$.p=2,l=Js,Js|=4,function(e,t){if(e=e.containerInfo,qu=Hd,Zn(e=Qn(e))){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var o=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(o&&0!==o.rangeCount){n=o.anchorNode;var i=o.anchorOffset,a=o.focusNode;o=o.focusOffset;try{n.nodeType,a.nodeType}catch(e){n=null;break e}var l=0,s=-1,c=-1,u=0,d=0,f=e,p=null;t:for(;;){for(var h;f!==n||0!==i&&3!==f.nodeType||(s=l+i),f!==a||0!==o&&3!==f.nodeType||(c=l+o),3===f.nodeType&&(l+=f.nodeValue.length),null!==(h=f.firstChild);)p=f,f=h;for(;;){if(f===e)break t;if(p===n&&++u===i&&(s=l),p===a&&++d===o&&(c=l),null!==(h=f.nextSibling))break;p=(f=p).parentNode}f=h}n=-1===s||-1===c?null:{start:s,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ku={focusedElem:e,selectionRange:n},Hd=!1,ts=t;null!==ts;)if(e=(t=ts).child,1028&t.subtreeFlags&&null!==e)e.return=t,ts=e;else for(;null!==ts;){switch(a=(t=ts).alternate,e=t.flags,t.tag){case 0:case 11:case 15:case 5:case 26:case 27:case 6:case 4:case 17:break;case 1:if(1024&e&&null!==a){e=void 0,n=t,i=a.memoizedProps,a=a.memoizedState,o=n.stateNode;try{var m=Ta(n.type,i,(n.elementType,n.type));e=o.getSnapshotBeforeUpdate(m,a),o.__reactInternalSnapshotBeforeUpdate=e}catch(e){nu(n,n.return,e)}}break;case 3:if(1024&e)if(9===(n=(e=t.stateNode.containerInfo).nodeType))id(e);else if(1===n)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":id(e);break;default:e.textContent=""}break;default:if(1024&e)throw Error(r(163))}if(null!==(e=t.sibling)){e.return=t.return,ts=e;break}ts=t.return}m=ns,ns=!1}(e,c),ps(c,e),Jn(Ku,e.containerInfo),Hd=!!qu,Ku=qu=null,e.current=c,rs(e,c.alternate,c),ie(),Js=l,$.p=a,N.T=n):e.current=c,kc?(kc=!1,Sc=e,Ec=o):Jc(e,u),u=e.pendingLanes,0===u&&(xc=null),function(e){if(ge&&"function"==typeof ge.onCommitFiberRoot)try{ge.onCommitFiberRoot(me,e,void 0,!(128&~e.current.flags))}catch(e){}}(c.stateNode),hu(e),null!==t)for(i=e.onRecoverableError,c=0;c<t.length;c++)u=t[c],i(u.value,{componentStack:u.stack});!!(3&Ec)&&eu(),u=e.pendingLanes,4194218&o&&42&u?e===Nc?Oc++:(Oc=0,Nc=e):Oc=0,mu(0)}(e,t,n,o,f,i,a,l)}finally{N.T=d,$.p=f}}function Jc(e,t){0==(e.pooledCacheLanes&=t)&&(null!=(t=e.pooledCache)&&(e.pooledCache=null,Bo(t)))}function eu(){if(null!==Sc){var e=Sc,t=_c;_c=0;var n=Ae(Ec),o=N.T,i=$.p;try{if($.p=32>n?32:n,N.T=null,null===Sc)var a=!1;else{n=Cc,Cc=null;var l=Sc,s=Ec;if(Sc=null,Ec=0,6&Js)throw Error(r(331));var c=Js;if(Js|=4,Rs(l.current),ks(l,l.current,s,n),Js=c,mu(0,!1),ge&&"function"==typeof ge.onPostCommitFiberRoot)try{ge.onPostCommitFiberRoot(me,l)}catch(e){}a=!0}return a}finally{$.p=i,N.T=o,Jc(e,t)}}return!1}function tu(e,t,n){t=Tr(n,t),null!==(e=Ml(e,t=ja(e.stateNode,t,2),2))&&(Re(e,2),hu(e))}function nu(e,t,n){if(3===e.tag)tu(e,e,n);else for(;null!==t;){if(3===t.tag){tu(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===xc||!xc.has(r))){e=Tr(n,e),null!==(r=Ml(t,n=$a(2),2))&&(Ba(n,r,t,e),Re(r,2),hu(r));break}}t=t.return}}function ru(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new Zs;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(lc=!0,o.add(n),e=ou.bind(null,e,t,n),t.then(e,e))}function ou(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,ec===e&&(nc&n)===n&&(4===cc||3===cc&&(62914560&nc)===nc&&300>ae()-vc?!(2&Js)&&jc(e,0):fc|=n,hc===nc&&(hc=0)),hu(e)}function iu(e,t){0===t&&(t=Ne()),null!==(e=Or(e,t))&&(Re(e,t),hu(e))}function au(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),iu(e,n)}function lu(e,t){var n=0;switch(e.tag){case 13:var o=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(r(314))}null!==o&&o.delete(t),iu(e,n)}var su=null,cu=null,uu=!1,du=!1,fu=!1,pu=0;function hu(e){var t;e!==cu&&null===e.next&&(null===cu?su=cu=e:cu=cu.next=e),du=!0,uu||(uu=!0,t=gu,nd((function(){6&Js?ne(se,t):t()})))}function mu(e,t){if(!fu&&du){fu=!0;do{for(var n=!1,r=su;null!==r;){if(0!==e){var o=r.pendingLanes;if(0===o)var i=0;else{var a=r.suspendedLanes,l=r.pingedLanes;i=(1<<31-ve(42|e)+1)-1,i=201326677&(i&=o&~(a&~l))?201326677&i|1:i?2|i:0}0!==i&&(n=!0,bu(r,i))}else i=nc,!(3&(i=Ee(r,r===ec?i:0)))||_e(r,i)||(n=!0,bu(r,i));r=r.next}}while(n);fu=!1}}function gu(){du=uu=!1;var e=0;0!==pu&&(function(){var e=window.event;if(e&&"popstate"===e.type)return e!==Zu&&(Zu=e,!0);return Zu=null,!1}()&&(e=pu),pu=0);for(var t=ae(),n=null,r=su;null!==r;){var o=r.next,i=yu(r,t);0===i?(r.next=null,null===n?su=o:n.next=o,null===o&&(cu=n)):(n=r,(0!==e||3&i)&&(du=!0)),r=o}mu(e)}function yu(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=-62914561&e.pendingLanes;0<i;){var a=31-ve(i),l=1<<a,s=o[a];-1===s?l&n&&!(l&r)||(o[a]=Ce(l,t)):s<=t&&(e.expiredLanes|=l),i&=~l}if(n=nc,n=Ee(e,e===(t=ec)?n:0),r=e.callbackNode,0===n||e===t&&2===rc||null!==e.cancelPendingCommit)return null!==r&&null!==r&&re(r),e.callbackNode=null,e.callbackPriority=0;if(!(3&n)||_e(e,n)){if((t=n&-n)===e.callbackPriority)return t;switch(null!==r&&re(r),Ae(n)){case 2:case 8:n=ce;break;case 32:default:n=ue;break;case 268435456:n=fe}return r=vu.bind(null,e),n=ne(n,r),e.callbackPriority=t,e.callbackNode=n,t}return null!==r&&null!==r&&re(r),e.callbackPriority=2,e.callbackNode=null,2}function vu(e,t){var n=e.callbackNode;if(eu()&&e.callbackNode!==n)return null;var r=nc;return 0===(r=Ee(e,e===ec?r:0))?null:(Tc(e,r,t),yu(e,ae()),null!=e.callbackNode&&e.callbackNode===n?vu.bind(null,e):null)}function bu(e,t){if(eu())return null;Tc(e,t,!0)}function wu(){return 0===pu&&(pu=Oe()),pu}function xu(e){return null==e||"symbol"==typeof e||"boolean"==typeof e?null:"function"==typeof e?e:Ot(""+e)}function ku(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}for(var Su=0;Su<br.length;Su++){var Eu=br[Su];wr(Eu.toLowerCase(),"on"+(Eu[0].toUpperCase()+Eu.slice(1)))}wr(dr,"onAnimationEnd"),wr(fr,"onAnimationIteration"),wr(pr,"onAnimationStart"),wr("dblclick","onDoubleClick"),wr("focusin","onFocus"),wr("focusout","onBlur"),wr(hr,"onTransitionRun"),wr(mr,"onTransitionStart"),wr(gr,"onTransitionCancel"),wr(yr,"onTransitionEnd"),Je("onMouseEnter",["mouseout","mouseover"]),Je("onMouseLeave",["mouseout","mouseover"]),Je("onPointerEnter",["pointerout","pointerover"]),Je("onPointerLeave",["pointerout","pointerover"]),Ze("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ze("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ze("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ze("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ze("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ze("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _u="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Cu=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(_u));function Ou(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var l=r[a],s=l.instance,c=l.currentTarget;if(l=l.listener,s!==i&&o.isPropagationStopped())break e;i=l,o.currentTarget=c;try{i(o)}catch(e){Aa(e)}o.currentTarget=null,i=s}else for(a=0;a<r.length;a++){if(s=(l=r[a]).instance,c=l.currentTarget,l=l.listener,s!==i&&o.isPropagationStopped())break e;i=l,o.currentTarget=c;try{i(o)}catch(e){Aa(e)}o.currentTarget=null,i=s}}}}function Nu(e,t){var n=t[je];void 0===n&&(n=t[je]=new Set);var r=e+"__bubble";n.has(r)||(Tu(t,e,2,!1),n.add(r))}function Pu(e,t,n){var r=0;t&&(r|=4),Tu(n,e,r,t)}var Ru="_reactListening"+Math.random().toString(36).slice(2);function Mu(e){if(!e[Ru]){e[Ru]=!0,Ge.forEach((function(t){"selectionchange"!==t&&(Cu.has(t)||Pu(t,!1,e),Pu(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Ru]||(t[Ru]=!0,Pu("selectionchange",!1,t))}}function Tu(e,t,n,r){switch(Gd(t)){case 2:var o=Ud;break;case 8:o=Wd;break;default:o=qd}n=o.bind(null,t,n,e),o=void 0,!Lt||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Au(e,t,n,r,o){var i=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var l=r.stateNode.containerInfo;if(l===o||8===l.nodeType&&l.parentNode===o)break;if(4===a)for(a=r.return;null!==a;){var s=a.tag;if((3===s||4===s)&&((s=a.stateNode.containerInfo)===o||8===s.nodeType&&s.parentNode===o))return;a=a.return}for(;null!==l;){if(null===(a=We(l)))return;if(5===(s=a.tag)||6===s||26===s||27===s){r=i=a;continue e}l=l.parentNode}}r=r.return}Dt((function(){var r=i,o=Pt(n),a=[];e:{var l=vr.get(e);if(void 0!==l){var s=Gt,c=e;switch(e){case"keypress":if(0===Vt(n))break e;case"keydown":case"keyup":s=fn;break;case"focusin":c="focus",s=nn;break;case"focusout":c="blur",s=nn;break;case"beforeblur":case"afterblur":s=nn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":s=en;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":s=tn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":s=hn;break;case dr:case fr:case pr:s=rn;break;case yr:s=mn;break;case"scroll":case"scrollend":s=Zt;break;case"wheel":s=gn;break;case"copy":case"cut":case"paste":s=on;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":s=pn;break;case"toggle":case"beforetoggle":s=yn}var u=!!(4&t),d=!u&&("scroll"===e||"scrollend"===e),f=u?null!==l?l+"Capture":null:l;u=[];for(var p,h=r;null!==h;){var m=h;if(p=m.stateNode,5!==(m=m.tag)&&26!==m&&27!==m||null===p||null===f||null!=(m=It(h,f))&&u.push(Du(h,m,p)),d)break;h=h.return}0<u.length&&(l=new s(l,c,null,n,o),a.push({event:l,listeners:u}))}}if(!(7&t)){if(s="mouseout"===e||"pointerout"===e,(!(l="mouseover"===e||"pointerover"===e)||n===Nt||!(c=n.relatedTarget||n.fromElement)||!We(c)&&!c[Fe])&&(s||l)&&(l=o.window===o?o:(l=o.ownerDocument)?l.defaultView||l.parentWindow:window,s?(s=r,null!==(c=(c=n.relatedTarget||n.toElement)?We(c):null)&&(d=I(c),u=c.tag,c!==d||5!==u&&27!==u&&6!==u)&&(c=null)):(s=null,c=r),s!==c)){if(u=en,m="onMouseLeave",f="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(u=pn,m="onPointerLeave",f="onPointerEnter",h="pointer"),d=null==s?l:Ke(s),p=null==c?l:Ke(c),(l=new u(m,h+"leave",s,n,o)).target=d,l.relatedTarget=p,m=null,We(o)===r&&((u=new u(f,h+"enter",c,n,o)).target=p,u.relatedTarget=d,m=u),d=m,s&&c)e:{for(f=c,h=0,p=u=s;p;p=Lu(p))h++;for(p=0,m=f;m;m=Lu(m))p++;for(;0<h-p;)u=Lu(u),h--;for(;0<p-h;)f=Lu(f),p--;for(;h--;){if(u===f||null!==f&&u===f.alternate)break e;u=Lu(u),f=Lu(f)}u=null}else u=null;null!==s&&zu(a,l,s,u,!1),null!==c&&null!==d&&zu(a,d,c,u,!0)}if("select"===(s=(l=r?Ke(r):window).nodeName&&l.nodeName.toLowerCase())||"input"===s&&"file"===l.type)var g=In;else if(Pn(l))if(Ln)g=Wn;else{g=Hn;var y=Vn}else!(s=l.nodeName)||"input"!==s.toLowerCase()||"checkbox"!==l.type&&"radio"!==l.type?r&&Et(r.elementType)&&(g=In):g=Un;switch(g&&(g=g(e,r))?Rn(a,g,n,o):(y&&y(e,l,r),"focusout"===e&&r&&"number"===l.type&&null!=r.memoizedProps.value&&gt(l,"number",l.value)),y=r?Ke(r):window,e){case"focusin":(Pn(y)||"true"===y.contentEditable)&&(tr=y,nr=r,rr=null);break;case"focusout":rr=nr=tr=null;break;case"mousedown":or=!0;break;case"contextmenu":case"mouseup":case"dragend":or=!1,ir(a,n,o);break;case"selectionchange":if(er)break;case"keydown":case"keyup":ir(a,n,o)}var v;if(bn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else On?_n(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(kn&&"ko"!==n.locale&&(On||"onCompositionStart"!==b?"onCompositionEnd"===b&&On&&(v=Bt()):(jt="value"in(Ft=o)?Ft.value:Ft.textContent,On=!0)),0<(y=Iu(r,b)).length&&(b=new an(b,e,null,n,o),a.push({event:b,listeners:y}),v?b.data=v:null!==(v=Cn(n))&&(b.data=v))),(v=xn?function(e,t){switch(e){case"compositionend":return Cn(t);case"keypress":return 32!==t.which?null:(En=!0,Sn);case"textInput":return(e=t.data)===Sn&&En?null:e;default:return null}}(e,n):function(e,t){if(On)return"compositionend"===e||!bn&&_n(e,t)?(e=Bt(),$t=jt=Ft=null,On=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return kn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(b=Iu(r,"onBeforeInput")).length&&(y=new an("onBeforeInput","beforeinput",null,n,o),a.push({event:y,listeners:b}),y.data=v)),function(e,t,n,r,o){if("submit"===t&&n&&n.stateNode===o){var i=xu((o[ze]||null).action),a=r.submitter;a&&null!==(t=(t=a[ze]||null)?xu(t.formAction):a.getAttribute("formAction"))&&(i=t,a=null);var l=new Gt("action","action",null,r,o);e.push({event:l,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(0!==pu){var e=a?ku(o,a):new FormData(o);ua(n,{pending:!0,data:e,method:o.method,action:i},null,e)}}else"function"==typeof i&&(l.preventDefault(),e=a?ku(o,a):new FormData(o),ua(n,{pending:!0,data:e,method:o.method,action:i},i,e))},currentTarget:o}]})}}(a,e,r,n,o)}Ou(a,t)}))}function Du(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Iu(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,i=o.stateNode;5!==(o=o.tag)&&26!==o&&27!==o||null===i||(null!=(o=It(e,n))&&r.unshift(Du(e,o,i)),null!=(o=It(e,t))&&r.push(Du(e,o,i))),e=e.return}return r}function Lu(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag&&27!==e.tag);return e||null}function zu(e,t,n,r,o){for(var i=t._reactName,a=[];null!==n&&n!==r;){var l=n,s=l.alternate,c=l.stateNode;if(l=l.tag,null!==s&&s===r)break;5!==l&&26!==l&&27!==l||null===c||(s=c,o?null!=(c=It(n,i))&&a.unshift(Du(n,c,s)):o||null!=(c=It(n,i))&&a.push(Du(n,c,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var Fu=/\r\n?/g,ju=/\u0000|\uFFFD/g;function $u(e){return("string"==typeof e?e:""+e).replace(Fu,"\n").replace(ju,"")}function Bu(e,t){return t=$u(t),$u(e)===t}function Vu(){}function Hu(e,t,n,o,i,a){switch(n){case"children":"string"==typeof o?"body"===t||"textarea"===t&&""===o||wt(e,o):("number"==typeof o||"bigint"==typeof o)&&"body"!==t&&wt(e,""+o);break;case"className":it(e,"class",o);break;case"tabIndex":it(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":it(e,n,o);break;case"style":St(e,o,a);break;case"data":if("object"!==t){it(e,"data",o);break}case"src":case"href":if(""===o&&("a"!==t||"href"!==n)){e.removeAttribute(n);break}if(null==o||"function"==typeof o||"symbol"==typeof o||"boolean"==typeof o){e.removeAttribute(n);break}o=Ot(""+o),e.setAttribute(n,o);break;case"action":case"formAction":if("function"==typeof o){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}if("function"==typeof a&&("formAction"===n?("input"!==t&&Hu(e,t,"name",i.name,i,null),Hu(e,t,"formEncType",i.formEncType,i,null),Hu(e,t,"formMethod",i.formMethod,i,null),Hu(e,t,"formTarget",i.formTarget,i,null)):(Hu(e,t,"encType",i.encType,i,null),Hu(e,t,"method",i.method,i,null),Hu(e,t,"target",i.target,i,null))),null==o||"symbol"==typeof o||"boolean"==typeof o){e.removeAttribute(n);break}o=Ot(""+o),e.setAttribute(n,o);break;case"onClick":null!=o&&(e.onclick=Vu);break;case"onScroll":null!=o&&Nu("scroll",e);break;case"onScrollEnd":null!=o&&Nu("scrollend",e);break;case"dangerouslySetInnerHTML":if(null!=o){if("object"!=typeof o||!("__html"in o))throw Error(r(61));if(null!=(n=o.__html)){if(null!=i.children)throw Error(r(60));e.innerHTML=n}}break;case"multiple":e.multiple=o&&"function"!=typeof o&&"symbol"!=typeof o;break;case"muted":e.muted=o&&"function"!=typeof o&&"symbol"!=typeof o;break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":case"autoFocus":break;case"xlinkHref":if(null==o||"function"==typeof o||"boolean"==typeof o||"symbol"==typeof o){e.removeAttribute("xlink:href");break}n=Ot(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":null!=o&&"function"!=typeof o&&"symbol"!=typeof o?e.setAttribute(n,""+o):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&"function"!=typeof o&&"symbol"!=typeof o?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":!0===o?e.setAttribute(n,""):!1!==o&&null!=o&&"function"!=typeof o&&"symbol"!=typeof o?e.setAttribute(n,o):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&!isNaN(o)&&1<=o?e.setAttribute(n,o):e.removeAttribute(n);break;case"rowSpan":case"start":null==o||"function"==typeof o||"symbol"==typeof o||isNaN(o)?e.removeAttribute(n):e.setAttribute(n,o);break;case"popover":Nu("beforetoggle",e),Nu("toggle",e),ot(e,"popover",o);break;case"xlinkActuate":at(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":at(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":at(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":at(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":at(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":at(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":at(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":at(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":at(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":ot(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])&&ot(e,n=_t.get(n)||n,o)}}function Uu(e,t,n,o,i,a){switch(n){case"style":St(e,o,a);break;case"dangerouslySetInnerHTML":if(null!=o){if("object"!=typeof o||!("__html"in o))throw Error(r(61));if(null!=(n=o.__html)){if(null!=i.children)throw Error(r(60));e.innerHTML=n}}break;case"children":"string"==typeof o?wt(e,o):("number"==typeof o||"bigint"==typeof o)&&wt(e,""+o);break;case"onScroll":null!=o&&Nu("scroll",e);break;case"onScrollEnd":null!=o&&Nu("scrollend",e);break;case"onClick":null!=o&&(e.onclick=Vu);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":case"innerText":case"textContent":break;default:Qe.hasOwnProperty(n)||("o"!==n[0]||"n"!==n[1]||(i=n.endsWith("Capture"),t=n.slice(2,i?n.length-7:void 0),"function"==typeof(a=null!=(a=e[ze]||null)?a[n]:null)&&e.removeEventListener(t,a,i),"function"!=typeof o)?n in e?e[n]=o:!0===o?e.setAttribute(n,""):ot(e,n,o):("function"!=typeof a&&null!==a&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,o,i)))}}function Wu(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Nu("error",e),Nu("load",e);var o,i=!1,a=!1;for(o in n)if(n.hasOwnProperty(o)){var l=n[o];if(null!=l)switch(o){case"src":i=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Hu(e,t,o,l,n,null)}}return a&&Hu(e,t,"srcSet",n.srcSet,n,null),void(i&&Hu(e,t,"src",n.src,n,null));case"input":Nu("invalid",e);var s=o=l=a=null,c=null,u=null;for(i in n)if(n.hasOwnProperty(i)){var d=n[i];if(null!=d)switch(i){case"name":a=d;break;case"type":l=d;break;case"checked":c=d;break;case"defaultChecked":u=d;break;case"value":o=d;break;case"defaultValue":s=d;break;case"children":case"dangerouslySetInnerHTML":if(null!=d)throw Error(r(137,t));break;default:Hu(e,t,i,d,n,null)}}return mt(e,o,s,c,u,l,a,!1),void ct(e);case"select":for(a in Nu("invalid",e),i=l=o=null,n)if(n.hasOwnProperty(a)&&null!=(s=n[a]))switch(a){case"value":o=s;break;case"defaultValue":l=s;break;case"multiple":i=s;default:Hu(e,t,a,s,n,null)}return t=o,n=l,e.multiple=!!i,void(null!=t?yt(e,!!i,t,!1):null!=n&&yt(e,!!i,n,!0));case"textarea":for(l in Nu("invalid",e),o=a=i=null,n)if(n.hasOwnProperty(l)&&null!=(s=n[l]))switch(l){case"value":i=s;break;case"defaultValue":a=s;break;case"children":o=s;break;case"dangerouslySetInnerHTML":if(null!=s)throw Error(r(91));break;default:Hu(e,t,l,s,n,null)}return bt(e,i,a,o),void ct(e);case"option":for(c in n)if(n.hasOwnProperty(c)&&null!=(i=n[c]))if("selected"===c)e.selected=i&&"function"!=typeof i&&"symbol"!=typeof i;else Hu(e,t,c,i,n,null);return;case"dialog":Nu("cancel",e),Nu("close",e);break;case"iframe":case"object":Nu("load",e);break;case"video":case"audio":for(i=0;i<_u.length;i++)Nu(_u[i],e);break;case"image":Nu("error",e),Nu("load",e);break;case"details":Nu("toggle",e);break;case"embed":case"source":case"link":Nu("error",e),Nu("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in n)if(n.hasOwnProperty(u)&&null!=(i=n[u]))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Hu(e,t,u,i,n,null)}return;default:if(Et(t)){for(d in n)n.hasOwnProperty(d)&&(void 0!==(i=n[d])&&Uu(e,t,d,i,n,void 0));return}}for(s in n)n.hasOwnProperty(s)&&(null!=(i=n[s])&&Hu(e,t,s,i,n,null))}var qu=null,Ku=null;function Xu(e){return 9===e.nodeType?e:e.ownerDocument}function Yu(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Gu(e,t){if(0===e)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return 1===e&&"foreignObject"===t?0:e}function Qu(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"bigint"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Zu=null;var Ju="function"==typeof setTimeout?setTimeout:void 0,ed="function"==typeof clearTimeout?clearTimeout:void 0,td="function"==typeof Promise?Promise:void 0,nd="function"==typeof queueMicrotask?queueMicrotask:void 0!==td?function(e){return td.resolve(null).then(e).catch(rd)}:Ju;function rd(e){setTimeout((function(){throw e}))}function od(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&8===o.nodeType)if("/$"===(n=o.data)){if(0===r)return e.removeChild(o),void mf(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=o}while(n);mf(t)}function id(e){var t=e.firstChild;for(t&&10===t.nodeType&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":id(n),Ue(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if("stylesheet"===n.rel.toLowerCase())continue}e.removeChild(n)}}function ad(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t||"F!"===t||"F"===t)break;if("/$"===t)return null}}return e}function ld(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}function sd(e,t,n){switch(t=Xu(n),e){case"html":if(!(e=t.documentElement))throw Error(r(452));return e;case"head":if(!(e=t.head))throw Error(r(453));return e;case"body":if(!(e=t.body))throw Error(r(454));return e;default:throw Error(r(451))}}var cd=new Map,ud=new Set;function dd(e){return"function"==typeof e.getRootNode?e.getRootNode():e.ownerDocument}var fd=$.d;$.d={f:function(){var e=fd.f(),t=zc();return e||t},r:function(e){var t=qe(e);null!==t&&5===t.tag&&"form"===t.type?fa(t):fd.r(e)},D:function(e){fd.D(e),hd("dns-prefetch",e,null)},C:function(e,t){fd.C(e,t),hd("preconnect",e,t)},L:function(e,t,n){fd.L(e,t,n);var r=pd;if(r&&e&&t){var o='link[rel="preload"][as="'+pt(t)+'"]';"image"===t&&n&&n.imageSrcSet?(o+='[imagesrcset="'+pt(n.imageSrcSet)+'"]',"string"==typeof n.imageSizes&&(o+='[imagesizes="'+pt(n.imageSizes)+'"]')):o+='[href="'+pt(e)+'"]';var i=o;switch(t){case"style":i=gd(e);break;case"script":i=bd(e)}cd.has(i)||(e=P({rel:"preload",href:"image"===t&&n&&n.imageSrcSet?void 0:e,as:t},n),cd.set(i,e),null!==r.querySelector(o)||"style"===t&&r.querySelector(yd(i))||"script"===t&&r.querySelector(wd(i))||(Wu(t=r.createElement("link"),"link",e),Ye(t),r.head.appendChild(t)))}},m:function(e,t){fd.m(e,t);var n=pd;if(n&&e){var r=t&&"string"==typeof t.as?t.as:"script",o='link[rel="modulepreload"][as="'+pt(r)+'"][href="'+pt(e)+'"]',i=o;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=bd(e)}if(!cd.has(i)&&(e=P({rel:"modulepreload",href:e},t),cd.set(i,e),null===n.querySelector(o))){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(wd(i)))return}Wu(r=n.createElement("link"),"link",e),Ye(r),n.head.appendChild(r)}}},X:function(e,t){fd.X(e,t);var n=pd;if(n&&e){var r=Xe(n).hoistableScripts,o=bd(e),i=r.get(o);i||((i=n.querySelector(wd(o)))||(e=P({src:e,async:!0},t),(t=cd.get(o))&&Ed(e,t),Ye(i=n.createElement("script")),Wu(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(o,i))}},S:function(e,t,n){fd.S(e,t,n);var r=pd;if(r&&e){var o=Xe(r).hoistableStyles,i=gd(e);t=t||"default";var a=o.get(i);if(!a){var l={loading:0,preload:null};if(a=r.querySelector(yd(i)))l.loading=5;else{e=P({rel:"stylesheet",href:e,"data-precedence":t},n),(n=cd.get(i))&&Sd(e,n);var s=a=r.createElement("link");Ye(s),Wu(s,"link",e),s._p=new Promise((function(e,t){s.onload=e,s.onerror=t})),s.addEventListener("load",(function(){l.loading|=1})),s.addEventListener("error",(function(){l.loading|=2})),l.loading|=4,kd(a,t,r)}a={type:"stylesheet",instance:a,count:1,state:l},o.set(i,a)}}},M:function(e,t){fd.M(e,t);var n=pd;if(n&&e){var r=Xe(n).hoistableScripts,o=bd(e),i=r.get(o);i||((i=n.querySelector(wd(o)))||(e=P({src:e,async:!0,type:"module"},t),(t=cd.get(o))&&Ed(e,t),Ye(i=n.createElement("script")),Wu(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(o,i))}}};var pd="undefined"==typeof document?null:document;function hd(e,t,n){var r=pd;if(r&&"string"==typeof t&&t){var o=pt(t);o='link[rel="'+e+'"][href="'+o+'"]',"string"==typeof n&&(o+='[crossorigin="'+n+'"]'),ud.has(o)||(ud.add(o),e={rel:e,crossOrigin:n,href:t},null===r.querySelector(o)&&(Wu(t=r.createElement("link"),"link",e),Ye(t),r.head.appendChild(t)))}}function md(e,t,n,o){var i,a,l,s,c=(c=Y.current)?dd(c):null;if(!c)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return"string"==typeof n.precedence&&"string"==typeof n.href?(t=gd(n.href),(o=(n=Xe(c).hoistableStyles).get(t))||(o={type:"style",instance:null,count:0,state:null},n.set(t,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if("stylesheet"===n.rel&&"string"==typeof n.href&&"string"==typeof n.precedence){e=gd(n.href);var u=Xe(c).hoistableStyles,d=u.get(e);if(d||(c=c.ownerDocument||c,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,d),(u=c.querySelector(yd(e)))&&!u._p&&(d.instance=u,d.state.loading=5),cd.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},cd.set(e,n),u||(i=c,a=e,l=n,s=d.state,i.querySelector('link[rel="preload"][as="style"]['+a+"]")?s.loading=1:(a=i.createElement("link"),s.preload=a,a.addEventListener("load",(function(){return s.loading|=1})),a.addEventListener("error",(function(){return s.loading|=2})),Wu(a,"link",l),Ye(a),i.head.appendChild(a))))),t&&null===o)throw Error(r(528,""));return d}if(t&&null!==o)throw Error(r(529,""));return null;case"script":return t=n.async,"string"==typeof(n=n.src)&&t&&"function"!=typeof t&&"symbol"!=typeof t?(t=bd(n),(o=(n=Xe(c).hoistableScripts).get(t))||(o={type:"script",instance:null,count:0,state:null},n.set(t,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function gd(e){return'href="'+pt(e)+'"'}function yd(e){return'link[rel="stylesheet"]['+e+"]"}function vd(e){return P({},e,{"data-precedence":e.precedence,precedence:null})}function bd(e){return'[src="'+pt(e)+'"]'}function wd(e){return"script[async]"+e}function xd(e,t,n){if(t.count++,null===t.instance)switch(t.type){case"style":var o=e.querySelector('style[data-href~="'+pt(n.href)+'"]');if(o)return t.instance=o,Ye(o),o;var i=P({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return Ye(o=(e.ownerDocument||e).createElement("style")),Wu(o,"style",i),kd(o,n.precedence,e),t.instance=o;case"stylesheet":i=gd(n.href);var a=e.querySelector(yd(i));if(a)return t.state.loading|=4,t.instance=a,Ye(a),a;o=vd(n),(i=cd.get(i))&&Sd(o,i),Ye(a=(e.ownerDocument||e).createElement("link"));var l=a;return l._p=new Promise((function(e,t){l.onload=e,l.onerror=t})),Wu(a,"link",o),t.state.loading|=4,kd(a,n.precedence,e),t.instance=a;case"script":return a=bd(n.src),(i=e.querySelector(wd(a)))?(t.instance=i,Ye(i),i):(o=n,(i=cd.get(a))&&Ed(o=P({},n),i),Ye(i=(e=e.ownerDocument||e).createElement("script")),Wu(i,"link",o),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(r(443,t.type))}else"stylesheet"===t.type&&!(4&t.state.loading)&&(o=t.instance,t.state.loading|=4,kd(o,n.precedence,e));return t.instance}function kd(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=r.length?r[r.length-1]:null,i=o,a=0;a<r.length;a++){var l=r[a];if(l.dataset.precedence===t)i=l;else if(i!==o)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=9===n.nodeType?n.head:n).insertBefore(e,t.firstChild)}function Sd(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.title&&(e.title=t.title)}function Ed(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.integrity&&(e.integrity=t.integrity)}var _d=null;function Cd(e,t,n){if(null===_d){var r=new Map,o=_d=new Map;o.set(n,r)}else(r=(o=_d).get(n))||(r=new Map,o.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),o=0;o<n.length;o++){var i=n[o];if(!(i[He]||i[Le]||"link"===e&&"stylesheet"===i.getAttribute("rel"))&&"http://www.w3.org/2000/svg"!==i.namespaceURI){var a=i.getAttribute(t)||"";a=e+a;var l=r.get(a);l?l.push(i):r.set(a,[i])}}return r}function Od(e,t,n){(e=e.ownerDocument||e).head.insertBefore(n,"title"===t?e.querySelector("head > title"):null)}function Nd(e){return!!("stylesheet"!==e.type||3&e.state.loading)}var Pd=null;function Rd(){}function Md(){if(this.count--,0===this.count)if(this.stylesheets)Ad(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}var Td=null;function Ad(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,Td=new Map,t.forEach(Dd,e),Td=null,Md.call(e))}function Dd(e,t){if(!(4&t.state.loading)){var n=Td.get(e);if(n)var r=n.get(null);else{n=new Map,Td.set(e,n);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<o.length;i++){var a=o[i];"LINK"!==a.nodeName&&"not all"===a.getAttribute("media")||(n.set(a.dataset.precedence,a),r=a)}r&&n.set(null,r)}a=(o=t.instance).getAttribute("data-precedence"),(i=n.get(a)||r)===r&&n.set(null,o),n.set(a,o),this.count++,r=Md.bind(this),o.addEventListener("load",r),o.addEventListener("error",r),i?i.parentNode.insertBefore(o,i.nextSibling):(e=9===e.nodeType?e.head:e).insertBefore(o,e.firstChild),t.state.loading|=4}}var Id={$$typeof:h,Provider:null,Consumer:null,_currentValue:B,_currentValue2:B,_threadCount:0};function Ld(e,t,n,r,o,i,a,l){this.tag=1,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Pe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Pe(0),this.hiddenUpdates=Pe(null),this.identifierPrefix=r,this.onUncaughtError=o,this.onCaughtError=i,this.onRecoverableError=a,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function zd(e,t,n,r,o,i,a,l,s,c,u,d){return e=new Ld(e,t,n,a,l,s,c,d),t=1,!0===i&&(t|=24),i=Ds(3,null,null,t),e.current=i,i.stateNode=e,(t=$o()).refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:r,isDehydrated:n,cache:t},Nl(i),e}function Fd(e){return e?e=Rr:Rr}function jd(e,t,n,r,o,i){o=Fd(o),null===r.context?r.context=o:r.pendingContext=o,(r=Rl(t)).payload={element:n},null!==(i=void 0===i?null:i)&&(r.callback=i),null!==(n=Ml(e,r,t))&&(Mc(n,0,t),Tl(n,e,t))}function $d(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Bd(e,t){$d(e,t),(e=e.alternate)&&$d(e,t)}function Vd(e){if(13===e.tag){var t=Or(e,67108864);null!==t&&Mc(t,0,67108864),Bd(e,67108864)}}var Hd=!0;function Ud(e,t,n,r){var o=N.T;N.T=null;var i=$.p;try{$.p=2,qd(e,t,n,r)}finally{$.p=i,N.T=o}}function Wd(e,t,n,r){var o=N.T;N.T=null;var i=$.p;try{$.p=8,qd(e,t,n,r)}finally{$.p=i,N.T=o}}function qd(e,t,n,r){if(Hd){var o=Kd(r);if(null===o)Au(e,t,r,Xd,n),af(e,r);else if(function(e,t,n,r,o){switch(t){case"focusin":return Zd=lf(Zd,e,t,n,r,o),!0;case"dragenter":return Jd=lf(Jd,e,t,n,r,o),!0;case"mouseover":return ef=lf(ef,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return tf.set(i,lf(tf.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,nf.set(i,lf(nf.get(i)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r))r.stopPropagation();else if(af(e,r),4&t&&-1<of.indexOf(e)){for(;null!==o;){var i=qe(o);if(null!==i)switch(i.tag){case 3:if((i=i.stateNode).current.memoizedState.isDehydrated){var a=Se(i.pendingLanes);if(0!==a){var l=i;for(l.pendingLanes|=2,l.entangledLanes|=2;a;){var s=1<<31-ve(a);l.entanglements[1]|=s,a&=~s}hu(i),!(6&Js)&&(bc=ae()+500,mu(0))}}break;case 13:null!==(l=Or(i,2))&&Mc(l,0,2),zc(),Bd(i,2)}if(null===(i=Kd(r))&&Au(e,t,r,Xd,n),i===o)break;o=i}null!==o&&r.stopPropagation()}else Au(e,t,r,null,n)}}function Kd(e){return Yd(e=Pt(e))}var Xd=null;function Yd(e){if(Xd=null,null!==(e=We(e))){var t=I(e);if(null===t)e=null;else{var n=t.tag;if(13===n){if(null!==(e=L(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Xd=e,null}function Gd(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(le()){case se:return 2;case ce:return 8;case ue:case de:return 32;case fe:return 268435456;default:return 32}default:return 32}}var Qd=!1,Zd=null,Jd=null,ef=null,tf=new Map,nf=new Map,rf=[],of="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function af(e,t){switch(e){case"focusin":case"focusout":Zd=null;break;case"dragenter":case"dragleave":Jd=null;break;case"mouseover":case"mouseout":ef=null;break;case"pointerover":case"pointerout":tf.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":nf.delete(t.pointerId)}}function lf(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},null!==t&&(null!==(t=qe(t))&&Vd(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function sf(e){var t=We(e.target);if(null!==t){var n=I(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=L(n)))return e.blockedOn=t,void function(e,t){var n=$.p;try{return $.p=e,t()}finally{$.p=n}}(e.priority,(function(){if(13===n.tag){var e=Pc(),t=Or(n,e);null!==t&&Mc(t,0,e),Bd(n,e)}}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function cf(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Kd(e.nativeEvent);if(null!==n)return null!==(t=qe(n))&&Vd(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);Nt=r,n.target.dispatchEvent(r),Nt=null,t.shift()}return!0}function uf(e,t,n){cf(e)&&n.delete(t)}function df(){Qd=!1,null!==Zd&&cf(Zd)&&(Zd=null),null!==Jd&&cf(Jd)&&(Jd=null),null!==ef&&cf(ef)&&(ef=null),tf.forEach(uf),nf.forEach(uf)}function ff(t,n){t.blockedOn===n&&(t.blockedOn=null,Qd||(Qd=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,df)))}var pf=null;function hf(t){pf!==t&&(pf=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,(function(){pf===t&&(pf=null);for(var e=0;e<t.length;e+=3){var n=t[e],r=t[e+1],o=t[e+2];if("function"!=typeof r){if(null===Yd(r||n))continue;break}var i=qe(n);null!==i&&(t.splice(e,3),e-=3,ua(i,{pending:!0,data:o,method:n.method,action:r},r,o))}})))}function mf(e){function t(t){return ff(t,e)}null!==Zd&&ff(Zd,e),null!==Jd&&ff(Jd,e),null!==ef&&ff(ef,e),tf.forEach(t),nf.forEach(t);for(var n=0;n<rf.length;n++){var r=rf[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<rf.length&&null===(n=rf[0]).blockedOn;)sf(n),null===n.blockedOn&&rf.shift();if(null!=(n=(e.ownerDocument||e).$$reactFormReplay))for(r=0;r<n.length;r+=3){var o=n[r],i=n[r+1],a=o[ze]||null;if("function"==typeof i)a||hf(n);else if(a){var l=null;if(i&&i.hasAttribute("formAction")){if(o=i,a=i[ze]||null)l=a.formAction;else if(null!==Yd(o))continue}else l=a.action;"function"==typeof l?n[r+1]=l:(n.splice(r,3),r-=3),hf(n)}}}function gf(e){this._internalRoot=e}function yf(e){this._internalRoot=e}yf.prototype.render=gf.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(r(409));jd(t.current,Pc(),e,t,null,null)},yf.prototype.unmount=gf.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;0===e.tag&&eu(),jd(e.current,2,null,e,null,null),zc(),t[Fe]=null}},yf.prototype.unstable_scheduleHydration=function(e){if(e){var t=De();e={blockedOn:null,target:e,priority:t};for(var n=0;n<rf.length&&0!==t&&t<rf[n].priority;n++);rf.splice(n,0,e),0===n&&sf(e)}};var vf=t.version;if("19.0.0"!==vf)throw Error(r(527,vf,"19.0.0"));$.findDOMNode=function(e){var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(r(188));throw e=Object.keys(e).join(","),Error(r(268,e))}return e=function(e){var t=e.alternate;if(!t){if(null===(t=I(e)))throw Error(r(188));return t!==e?null:e}for(var n=e,o=t;;){var i=n.return;if(null===i)break;var a=i.alternate;if(null===a){if(null!==(o=i.return)){n=o;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return z(i),e;if(a===o)return z(i),t;a=a.sibling}throw Error(r(188))}if(n.return!==o.return)n=i,o=a;else{for(var l=!1,s=i.child;s;){if(s===n){l=!0,n=i,o=a;break}if(s===o){l=!0,o=i,n=a;break}s=s.sibling}if(!l){for(s=a.child;s;){if(s===n){l=!0,n=a,o=i;break}if(s===o){l=!0,o=a,n=i;break}s=s.sibling}if(!l)throw Error(r(189))}}if(n.alternate!==o)throw Error(r(190))}if(3!==n.tag)throw Error(r(188));return n.stateNode.current===n?e:t}(t),e=null===(e=null!==e?F(e):null)?null:e.stateNode};var bf={bundleType:0,version:"19.0.0",rendererPackageName:"react-dom",currentDispatcherRef:N,findFiberByHostInstance:We,reconcilerVersion:"19.0.0"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var wf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wf.isDisabled&&wf.supportsFiber)try{me=wf.inject(bf),ge=wf}catch(e){}}return Hz.createRoot=function(e,t){if(!o(e))throw Error(r(299));var n=!1,i="",a=Da,l=Ia,s=La;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(i=t.identifierPrefix),void 0!==t.onUncaughtError&&(a=t.onUncaughtError),void 0!==t.onCaughtError&&(l=t.onCaughtError),void 0!==t.onRecoverableError&&(s=t.onRecoverableError),void 0!==t.unstable_transitionCallbacks&&t.unstable_transitionCallbacks),t=zd(e,1,!1,null,0,n,i,a,l,s,0,null),e[Fe]=t.current,Mu(8===e.nodeType?e.parentNode:e),new gf(t)},Hz.hydrateRoot=function(e,t,n){if(!o(e))throw Error(r(299));var i=!1,a="",l=Da,s=Ia,c=La,u=null;return null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(a=n.identifierPrefix),void 0!==n.onUncaughtError&&(l=n.onUncaughtError),void 0!==n.onCaughtError&&(s=n.onCaughtError),void 0!==n.onRecoverableError&&(c=n.onRecoverableError),void 0!==n.unstable_transitionCallbacks&&n.unstable_transitionCallbacks,void 0!==n.formState&&(u=n.formState)),(t=zd(e,1,!0,t,0,i,a,l,s,c,0,u)).context=Fd(null),n=t.current,(a=Rl(i=Pc())).callback=null,Ml(n,a,i),t.current.lanes=i,Re(t,i),hu(t),e[Fe]=t.current,Mu(e),new yf(t)},Hz.version="19.0.0",Hz}var Xz=(Bz||(Bz=1,function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),Vz.exports=Kz()),Vz.exports);const Yz=(e,t)=>{void 0===t&&(t={});const{element:n,eleid:r}="string"==typeof e?{element:document.getElementById(e),eleid:e}:{element:e,eleid:e.id};Xz.createRoot(n).render(s.createElement(s.StrictMode,null,s.createElement(zz,{...t,id:t.id||r})))};window.FuncNodes=Yz}();
106
106
  //# sourceMappingURL=index.js.map