@flarehr/superhero-super-selection 4.38.35531 → 4.40.35800

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.
@@ -1 +1 @@
1
- (()=>{"use strict";var e,n,t,r,o,i,s,u={},l=[],c=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function a(e,n){for(var t in n)e[t]=n[t];return e}function f(e){var n=e.parentNode;n&&n.removeChild(e)}function d(n,t,r){var o,i,s,u={};for(s in t)"key"==s?o=t[s]:"ref"==s?i=t[s]:u[s]=t[s];if(arguments.length>2&&(u.children=arguments.length>3?e.call(arguments,2):r),"function"==typeof n&&null!=n.defaultProps)for(s in n.defaultProps)void 0===u[s]&&(u[s]=n.defaultProps[s]);return h(n,u,o,i,null)}function h(e,r,o,i,s){var u={type:e,props:r,key:o,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==s?++t:s};return null==s&&null!=n.vnode&&n.vnode(u),u}function m(e){return e.children}function p(e,n){this.props=e,this.context=n}function w(e,n){if(null==n)return e.__?w(e.__,e.__.__k.indexOf(e)+1):null;for(var t;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e)return t.__e;return"function"==typeof e.type?w(e):null}function g(e){var n,t;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,n=0;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e){e.__e=e.__c.base=t.__e;break}return g(e)}}function _(e){(!e.__d&&(e.__d=!0)&&r.push(e)&&!y.__r++||i!==n.debounceRendering)&&((i=n.debounceRendering)||o)(y)}function y(){for(var e;y.__r=r.length;)e=r.sort((function(e,n){return e.__v.__b-n.__v.__b})),r=[],e.some((function(e){var n,t,r,o,i,s;e.__d&&(i=(o=(n=e).__v).__e,(s=n.__P)&&(t=[],(r=a({},o)).__v=o.__v+1,I(s,o,r,n.__n,void 0!==s.ownerSVGElement,null!=o.__h?[i]:null,t,null==i?w(o):i,o.__h),T(t,o),o.__e!=i&&g(o)))}))}function v(e,n,t,r,o,i,s,c,a,f){var d,p,g,_,y,v,b,S=r&&r.__k||l,E=S.length;for(t.__k=[],d=0;d<n.length;d++)if(null!=(_=t.__k[d]=null==(_=n[d])||"boolean"==typeof _?null:"string"==typeof _||"number"==typeof _||"bigint"==typeof _?h(null,_,null,null,_):Array.isArray(_)?h(m,{children:_},null,null,null):_.__b>0?h(_.type,_.props,_.key,null,_.__v):_)){if(_.__=t,_.__b=t.__b+1,null===(g=S[d])||g&&_.key==g.key&&_.type===g.type)S[d]=void 0;else for(p=0;p<E;p++){if((g=S[p])&&_.key==g.key&&_.type===g.type){S[p]=void 0;break}g=null}I(e,_,g=g||u,o,i,s,c,a,f),y=_.__e,(p=_.ref)&&g.ref!=p&&(b||(b=[]),g.ref&&b.push(g.ref,null,_),b.push(p,_.__c||y,_)),null!=y?(null==v&&(v=y),"function"==typeof _.type&&_.__k===g.__k?_.__d=a=C(_,a,e):a=x(e,_,g,S,y,a),"function"==typeof t.type&&(t.__d=a)):a&&g.__e==a&&a.parentNode!=e&&(a=w(g))}for(t.__e=v,d=E;d--;)null!=S[d]&&("function"==typeof t.type&&null!=S[d].__e&&S[d].__e==t.__d&&(t.__d=w(r,d+1)),M(S[d],S[d]));if(b)for(d=0;d<b.length;d++)O(b[d],b[++d],b[++d])}function C(e,n,t){for(var r,o=e.__k,i=0;o&&i<o.length;i++)(r=o[i])&&(r.__=e,n="function"==typeof r.type?C(r,n,t):x(t,r,r,o,r.__e,n));return n}function b(e,n){return n=n||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){b(e,n)})):n.push(e)),n}function x(e,n,t,r,o,i){var s,u,l;if(void 0!==n.__d)s=n.__d,n.__d=void 0;else if(null==t||o!=i||null==o.parentNode)e:if(null==i||i.parentNode!==e)e.appendChild(o),s=null;else{for(u=i,l=0;(u=u.nextSibling)&&l<r.length;l+=2)if(u==o)break e;e.insertBefore(o,i),s=i}return void 0!==s?s:o.nextSibling}function S(e,n,t){"-"===n[0]?e.setProperty(n,t):e[n]=null==t?"":"number"!=typeof t||c.test(n)?t:t+"px"}function E(e,n,t,r,o){var i;e:if("style"===n)if("string"==typeof t)e.style.cssText=t;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(n in r)t&&n in t||S(e.style,n,"");if(t)for(n in t)r&&t[n]===r[n]||S(e.style,n,t[n])}else if("o"===n[0]&&"n"===n[1])i=n!==(n=n.replace(/Capture$/,"")),n=n.toLowerCase()in e?n.toLowerCase().slice(2):n.slice(2),e.l||(e.l={}),e.l[n+i]=t,t?r||e.addEventListener(n,i?k:A,i):e.removeEventListener(n,i?k:A,i);else if("dangerouslySetInnerHTML"!==n){if(o)n=n.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==n&&"list"!==n&&"form"!==n&&"tabIndex"!==n&&"download"!==n&&n in e)try{e[n]=null==t?"":t;break e}catch(e){}"function"==typeof t||(null!=t&&(!1!==t||"a"===n[0]&&"r"===n[1])?e.setAttribute(n,t):e.removeAttribute(n))}}function A(e){this.l[e.type+!1](n.event?n.event(e):e)}function k(e){this.l[e.type+!0](n.event?n.event(e):e)}function I(e,t,r,o,i,s,u,l,c){var f,d,h,w,g,_,y,C,b,x,S,E=t.type;if(void 0!==t.constructor)return null;null!=r.__h&&(c=r.__h,l=t.__e=r.__e,t.__h=null,s=[l]),(f=n.__b)&&f(t);try{e:if("function"==typeof E){if(C=t.props,b=(f=E.contextType)&&o[f.__c],x=f?b?b.props.value:f.__:o,r.__c?y=(d=t.__c=r.__c).__=d.__E:("prototype"in E&&E.prototype.render?t.__c=d=new E(C,x):(t.__c=d=new p(C,x),d.constructor=E,d.render=D),b&&b.sub(d),d.props=C,d.state||(d.state={}),d.context=x,d.__n=o,h=d.__d=!0,d.__h=[]),null==d.__s&&(d.__s=d.state),null!=E.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=a({},d.__s)),a(d.__s,E.getDerivedStateFromProps(C,d.__s))),w=d.props,g=d.state,h)null==E.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==E.getDerivedStateFromProps&&C!==w&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(C,x),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(C,d.__s,x)||t.__v===r.__v){d.props=C,d.state=d.__s,t.__v!==r.__v&&(d.__d=!1),d.__v=t,t.__e=r.__e,t.__k=r.__k,t.__k.forEach((function(e){e&&(e.__=t)})),d.__h.length&&u.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(C,d.__s,x),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(w,g,_)}))}d.context=x,d.props=C,d.state=d.__s,(f=n.__r)&&f(t),d.__d=!1,d.__v=t,d.__P=e,f=d.render(d.props,d.state,d.context),d.state=d.__s,null!=d.getChildContext&&(o=a(a({},o),d.getChildContext())),h||null==d.getSnapshotBeforeUpdate||(_=d.getSnapshotBeforeUpdate(w,g)),S=null!=f&&f.type===m&&null==f.key?f.props.children:f,v(e,Array.isArray(S)?S:[S],t,r,o,i,s,u,l,c),d.base=t.__e,t.__h=null,d.__h.length&&u.push(d),y&&(d.__E=d.__=null),d.__e=!1}else null==s&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=N(r.__e,t,r,o,i,s,u,c);(f=n.diffed)&&f(t)}catch(e){t.__v=null,(c||null!=s)&&(t.__e=l,t.__h=!!c,s[s.indexOf(l)]=null),n.__e(e,t,r)}}function T(e,t){n.__c&&n.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){n.__e(e,t.__v)}}))}function N(n,t,r,o,i,s,l,c){var a,d,h,m=r.props,p=t.props,g=t.type,_=0;if("svg"===g&&(i=!0),null!=s)for(;_<s.length;_++)if((a=s[_])&&"setAttribute"in a==!!g&&(g?a.localName===g:3===a.nodeType)){n=a,s[_]=null;break}if(null==n){if(null===g)return document.createTextNode(p);n=i?document.createElementNS("http://www.w3.org/2000/svg",g):document.createElement(g,p.is&&p),s=null,c=!1}if(null===g)m===p||c&&n.data===p||(n.data=p);else{if(s=s&&e.call(n.childNodes),d=(m=r.props||u).dangerouslySetInnerHTML,h=p.dangerouslySetInnerHTML,!c){if(null!=s)for(m={},_=0;_<n.attributes.length;_++)m[n.attributes[_].name]=n.attributes[_].value;(h||d)&&(h&&(d&&h.__html==d.__html||h.__html===n.innerHTML)||(n.innerHTML=h&&h.__html||""))}if(function(e,n,t,r,o){var i;for(i in t)"children"===i||"key"===i||i in n||E(e,i,null,t[i],r);for(i in n)o&&"function"!=typeof n[i]||"children"===i||"key"===i||"value"===i||"checked"===i||t[i]===n[i]||E(e,i,n[i],t[i],r)}(n,p,m,i,c),h)t.__k=[];else if(_=t.props.children,v(n,Array.isArray(_)?_:[_],t,r,o,i&&"foreignObject"!==g,s,l,s?s[0]:r.__k&&w(r,0),c),null!=s)for(_=s.length;_--;)null!=s[_]&&f(s[_]);c||("value"in p&&void 0!==(_=p.value)&&(_!==n.value||"progress"===g&&!_||"option"===g&&_!==m.value)&&E(n,"value",_,m.value,!1),"checked"in p&&void 0!==(_=p.checked)&&_!==n.checked&&E(n,"checked",_,m.checked,!1))}return n}function O(e,t,r){try{"function"==typeof e?e(t):e.current=t}catch(e){n.__e(e,r)}}function M(e,t,r){var o,i;if(n.unmount&&n.unmount(e),(o=e.ref)&&(o.current&&o.current!==e.__e||O(o,null,t)),null!=(o=e.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(e){n.__e(e,t)}o.base=o.__P=null}if(o=e.__k)for(i=0;i<o.length;i++)o[i]&&M(o[i],t,"function"!=typeof e.type);r||null==e.__e||f(e.__e),e.__e=e.__d=void 0}function D(e,n,t){return this.constructor(e,t)}function U(t,r,o){var i,s,l;n.__&&n.__(t,r),s=(i="function"==typeof o)?null:o&&o.__k||r.__k,l=[],I(r,t=(!i&&o||r).__k=d(m,null,[t]),s||u,u,void 0!==r.ownerSVGElement,!i&&o?[o]:s?null:r.firstChild?e.call(r.childNodes):null,l,!i&&o?o:s?s.__e:r.firstChild,i),T(l,t)}function P(e,n){U(e,n,P)}function F(n,t,r){var o,i,s,u=a({},n.props);for(s in t)"key"==s?o=t[s]:"ref"==s?i=t[s]:u[s]=t[s];return arguments.length>2&&(u.children=arguments.length>3?e.call(arguments,2):r),h(n.type,u,o||n.key,i||n.ref,null)}function R(){return(R=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function $(e){this.getChildContext=function(){return e.context};var n=e.children,t=function(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n.indexOf(t=i[r])>=0||(o[t]=e[t]);return o}(e,["context","children"]);return F(n,t)}function G(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=d($,R({},this._props,{context:e.detail.context}),function e(n,t){if(3===n.nodeType)return n.data;if(1!==n.nodeType)return null;var r=[],o={},i=0,s=n.attributes,u=n.childNodes;for(i=s.length;i--;)"slot"!==s[i].name&&(o[s[i].name]=s[i].value,o[H(s[i].name)]=s[i].value);for(i=u.length;i--;){var l=e(u[i],null),c=u[i].slot;c?o[c]=d(B,{name:c},l):r[i]=l}var a=t?d(B,null,r):r;return d(t||n.nodeName.toLowerCase(),o,a)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?P:U)(this._vdom,this._root)}function H(e){return e.replace(/-(\w)/g,(function(e,n){return n?n.toUpperCase():""}))}function j(e,n,t){if(this._vdom){var r={};r[e]=t=null==t?void 0:t,r[H(e)]=t,this._vdom=F(this._vdom,r),U(this._vdom,this._root)}}function L(){U(this._vdom=null,this._root)}function B(e,n){var t=this;return d("slot",R({},e,{ref:function(e){e?(t.ref=e,t._listener||(t._listener=function(e){e.stopPropagation(),e.detail.context=n},e.addEventListener("_preact",t._listener))):t.ref.removeEventListener("_preact",t._listener)}}))}function V(e,n){!function(e,n,t,r){function o(){var n=Reflect.construct(HTMLElement,[],o);return n._vdomComponent=e,n._root=n,n}(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=G,o.prototype.attributeChangedCallback=j,o.prototype.disconnectedCallback=L,t=t||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=t,t.forEach((function(e){Object.defineProperty(o.prototype,e,{get:function(){return this._vdom.props[e]},set:function(n){this._vdom?this.attributeChangedCallback(e,null,n):(this._props||(this._props={}),this._props[e]=n,this.connectedCallback());var t=typeof n;null!=n&&"string"!==t&&"boolean"!==t&&"number"!==t||this.setAttribute(e,n)}})})),customElements.define(n||e.tagName||e.displayName||e.name,o)}(e,n)}e=l.slice,n={__e:function(e,n){for(var t,r,o;n=n.__;)if((t=n.__c)&&!t.__)try{if((r=t.constructor)&&null!=r.getDerivedStateFromError&&(t.setState(r.getDerivedStateFromError(e)),o=t.__d),null!=t.componentDidCatch&&(t.componentDidCatch(e),o=t.__d),o)return t.__E=t}catch(n){e=n}throw e}},t=0,p.prototype.setState=function(e,n){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=a({},this.state),"function"==typeof e&&(e=e(a({},t),this.props)),e&&a(t,e),null!=e&&this.__v&&(n&&this.__h.push(n),_(this))},p.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),_(this))},p.prototype.render=m,r=[],o="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,y.__r=0,s=0;var z,W,q,Z=0,J=[],Y=n.__b,X=n.__r,K=n.diffed,Q=n.__c,ee=n.unmount;function ne(e,t){n.__h&&n.__h(W,e,Z||t),Z=0;var r=W.__H||(W.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function te(e,n,t){var r=ne(z++,2);return r.t=e,r.__c||(r.__=[t?t(n):fe(void 0,n),function(e){var n=r.t(r.__[0],e);r.__[0]!==n&&(r.__=[n,r.__[1]],r.__c.setState({}))}],r.__c=W),r.__}function re(e,t){var r=ne(z++,3);!n.__s&&ae(r.__H,t)&&(r.__=e,r.__H=t,W.__H.__h.push(r))}function oe(e,t){var r=ne(z++,4);!n.__s&&ae(r.__H,t)&&(r.__=e,r.__H=t,W.__h.push(r))}function ie(e,n){var t=ne(z++,7);return ae(t.__H,n)&&(t.__=e(),t.__H=n,t.__h=e),t.__}function se(){for(var e;e=J.shift();)if(e.__P)try{e.__H.__h.forEach(le),e.__H.__h.forEach(ce),e.__H.__h=[]}catch(t){e.__H.__h=[],n.__e(t,e.__v)}}n.__b=function(e){W=null,Y&&Y(e)},n.__r=function(e){X&&X(e),z=0;var n=(W=e.__c).__H;n&&(n.__h.forEach(le),n.__h.forEach(ce),n.__h=[])},n.diffed=function(e){K&&K(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(1!==J.push(t)&&q===n.requestAnimationFrame||((q=n.requestAnimationFrame)||function(e){var n,t=function(){clearTimeout(r),ue&&cancelAnimationFrame(n),setTimeout(e)},r=setTimeout(t,100);ue&&(n=requestAnimationFrame(t))})(se)),W=null},n.__c=function(e,t){t.some((function(e){try{e.__h.forEach(le),e.__h=e.__h.filter((function(e){return!e.__||ce(e)}))}catch(r){t.some((function(e){e.__h&&(e.__h=[])})),t=[],n.__e(r,e.__v)}})),Q&&Q(e,t)},n.unmount=function(e){ee&&ee(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach((function(e){try{le(e)}catch(e){t=e}})),t&&n.__e(t,r.__v))};var ue="function"==typeof requestAnimationFrame;function le(e){var n=W,t=e.__c;"function"==typeof t&&(e.__c=void 0,t()),W=n}function ce(e){var n=W;e.__c=e.__(),W=n}function ae(e,n){return!e||e.length!==n.length||n.some((function(n,t){return n!==e[t]}))}function fe(e,n){return"function"==typeof n?n(e):n}function de(e,n){for(var t in n)e[t]=n[t];return e}function he(e,n){for(var t in e)if("__source"!==t&&!(t in n))return!0;for(var r in n)if("__source"!==r&&e[r]!==n[r])return!0;return!1}function me(e){this.props=e}(me.prototype=new p).isPureReactComponent=!0,me.prototype.shouldComponentUpdate=function(e,n){return he(this.props,e)||he(this.state,n)};var pe=n.__b;n.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),pe&&pe(e)};var we="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ge(e){function n(n,t){var r=de({},n);return delete r.ref,e(r,(t=n.ref||t)&&("object"!=typeof t||"current"in t)?t:null)}return n.$$typeof=we,n.render=n,n.prototype.isReactComponent=n.__f=!0,n.displayName="ForwardRef("+(e.displayName||e.name)+")",n}var _e=function(e,n){return null==e?null:b(b(e).map(n))},ye={map:_e,forEach:_e,count:function(e){return e?b(e).length:0},only:function(e){var n=b(e);if(1!==n.length)throw"Children.only";return n[0]},toArray:b},ve=n.__e;n.__e=function(e,n,t){if(e.then)for(var r,o=n;o=o.__;)if((r=o.__c)&&r.__c)return null==n.__e&&(n.__e=t.__e,n.__k=t.__k),r.__c(e,n);ve(e,n,t)};var Ce=n.unmount;function be(){this.__u=0,this.t=null,this.__b=null}function xe(e){var n=e.__.__c;return n&&n.__e&&n.__e(e)}function Se(){this.u=null,this.o=null}n.unmount=function(e){var n=e.__c;n&&n.__R&&n.__R(),n&&!0===e.__h&&(e.type=null),Ce&&Ce(e)},(be.prototype=new p).__c=function(e,n){var t=n.__c,r=this;null==r.t&&(r.t=[]),r.t.push(t);var o=xe(r.__v),i=!1,s=function(){i||(i=!0,t.__R=null,o?o(u):u())};t.__R=s;var u=function(){if(!--r.__u){if(r.state.__e){var e=r.state.__e;r.__v.__k[0]=function e(n,t,r){return n&&(n.__v=null,n.__k=n.__k&&n.__k.map((function(n){return e(n,t,r)})),n.__c&&n.__c.__P===t&&(n.__e&&r.insertBefore(n.__e,n.__d),n.__c.__e=!0,n.__c.__P=r)),n}(e,e.__c.__P,e.__c.__O)}var n;for(r.setState({__e:r.__b=null});n=r.t.pop();)n.forceUpdate()}},l=!0===n.__h;r.__u++||l||r.setState({__e:r.__b=r.__v.__k[0]}),e.then(s,s)},be.prototype.componentWillUnmount=function(){this.t=[]},be.prototype.render=function(e,n){if(this.__b){if(this.__v.__k){var t=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function e(n,t,r){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),n.__c.__H=null),null!=(n=de({},n)).__c&&(n.__c.__P===r&&(n.__c.__P=t),n.__c=null),n.__k=n.__k&&n.__k.map((function(n){return e(n,t,r)}))),n}(this.__b,t,r.__O=r.__P)}this.__b=null}var o=n.__e&&d(m,null,e.fallback);return o&&(o.__h=null),[d(m,null,n.__e?null:e.children),o]};var Ee=function(e,n,t){if(++t[1]===t[0]&&e.o.delete(n),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(t=e.u;t;){for(;t.length>3;)t.pop()();if(t[1]<t[0])break;e.u=t=t[2]}};function Ae(e){return this.getChildContext=function(){return e.context},e.children}function ke(e){var n=this,t=e.i;n.componentWillUnmount=function(){U(null,n.l),n.l=null,n.i=null},n.i&&n.i!==t&&n.componentWillUnmount(),e.__v?(n.l||(n.i=t,n.l={nodeType:1,parentNode:t,childNodes:[],appendChild:function(e){this.childNodes.push(e),n.i.appendChild(e)},insertBefore:function(e,t){this.childNodes.push(e),n.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),n.i.removeChild(e)}}),U(d(Ae,{context:n.context},e.__v),n.l)):n.l&&n.componentWillUnmount()}(Se.prototype=new p).__e=function(e){var n=this,t=xe(n.__v),r=n.o.get(e);return r[0]++,function(o){var i=function(){n.props.revealOrder?(r.push(o),Ee(n,e,r)):o()};t?t(i):i()}},Se.prototype.render=function(e){this.u=null,this.o=new Map;var n=b(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&n.reverse();for(var t=n.length;t--;)this.o.set(n[t],this.u=[1,0,this.u]);return e.children},Se.prototype.componentDidUpdate=Se.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(n,t){Ee(e,t,n)}))};var Ie="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Te=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Ne="undefined"!=typeof document,Oe=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};p.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(p.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(n){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:n})}})}));var Me=n.event;function De(){}function Ue(){return this.cancelBubble}function Pe(){return this.defaultPrevented}n.event=function(e){return Me&&(e=Me(e)),e.persist=De,e.isPropagationStopped=Ue,e.isDefaultPrevented=Pe,e.nativeEvent=e};var Fe,Re={configurable:!0,get:function(){return this.class}},$e=n.vnode;n.vnode=function(e){var n=e.type,t=e.props,r=t;if("string"==typeof n){var o=-1===n.indexOf("-");for(var i in r={},t){var s=t[i];Ne&&"children"===i&&"noscript"===n||"value"===i&&"defaultValue"in t&&null==s||("defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===s?s="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+n)&&!Oe(t.type)?i="oninput":/^onfocus$/i.test(i)?i="onfocusin":/^onblur$/i.test(i)?i="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(i)?i=i.toLowerCase():o&&Te.test(i)?i=i.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===s&&(s=void 0),r[i]=s)}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=b(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=b(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,t.class!=t.className&&(Re.enumerable="className"in t,null!=t.className&&(r.class=t.className),Object.defineProperty(r,"className",Re))}e.$$typeof=Ie,$e&&$e(e)};var Ge=n.__r;n.__r=function(e){Ge&&Ge(e),Fe=e.__c};var He={ReactCurrentDispatcher:{current:{readContext:function(e){return Fe.__n[e.__c].props.value}}}};function je(e){return!!e&&e.$$typeof===Ie}const Le={useState:function(e){return Z=1,te(fe,e)},useReducer:te,useEffect:re,useLayoutEffect:oe,useRef:function(e){return Z=5,ie((function(){return{current:e}}),[])},useImperativeHandle:function(e,n,t){Z=6,oe((function(){"function"==typeof e?e(n()):e&&(e.current=n())}),null==t?t:t.concat(e))},useMemo:ie,useCallback:function(e,n){return Z=8,ie((function(){return e}),n)},useContext:function(e){var n=W.context[e.__c],t=ne(z++,9);return t.c=e,n?(null==t.__&&(t.__=!0,n.sub(W)),n.props.value):e.__},useDebugValue:function(e,t){n.useDebugValue&&n.useDebugValue(t?t(e):e)},version:"17.0.2",Children:ye,render:function(e,n,t){return null==n.__k&&(n.textContent=""),U(e,n),"function"==typeof t&&t(),e?e.__c:null},hydrate:function(e,n,t){return P(e,n),"function"==typeof t&&t(),e?e.__c:null},unmountComponentAtNode:function(e){return!!e.__k&&(U(null,e),!0)},createPortal:function(e,n){return d(ke,{__v:e,i:n})},createElement:d,createContext:function(e,n){var t={__c:n="__cC"+s++,__:e,Consumer:function(e,n){return e.children(n)},Provider:function(e){var t,r;return this.getChildContext||(t=[],(r={})[n]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&t.some(_)},this.sub=function(e){t.push(e);var n=e.componentWillUnmount;e.componentWillUnmount=function(){t.splice(t.indexOf(e),1),n&&n.call(e)}}),e.children}};return t.Provider.__=t.Consumer.contextType=t},createFactory:function(e){return d.bind(null,e)},cloneElement:function(e){return je(e)?F.apply(null,arguments):e},createRef:function(){return{current:null}},Fragment:m,isValidElement:je,findDOMNode:function(e){return e&&(e.base||1===e.nodeType&&e)||null},Component:p,PureComponent:me,memo:function(e,n){function t(e){var t=this.props.ref,r=t==e.ref;return!r&&t&&(t.call?t(null):t.current=null),n?!n(this.props,e)||!r:he(this.props,e)}function r(n){return this.shouldComponentUpdate=t,d(e,n)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r},forwardRef:ge,flushSync:function(e,n){return e(n)},unstable_batchedUpdates:function(e,n){return e(n)},StrictMode:m,Suspense:be,SuspenseList:Se,lazy:function(e){var n,t,r;function o(o){if(n||(n=e()).then((function(e){t=e.default||e}),(function(e){r=e})),r)throw r;if(!t)throw n;return d(t,o)}return o.displayName="Lazy",o.__f=!0,o},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:He};function Be(e){return Array.isArray(e)||ArrayBuffer.isView(e)}function Ve(e){return"function"==typeof e.GetHashCode}function ze(e){return null!=e&&"function"==typeof e.Dispose}function We(e){ze(e)&&e.Dispose()}function qe(e,n){var t,r;return(null===(t=Object.getPrototypeOf(e))||void 0===t?void 0:t.constructor)===(null===(r=Object.getPrototypeOf(n))||void 0===r?void 0:r.constructor)}class Ze{constructor(e){this.iter=e}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current}"System.Collections.IEnumerator.get_Current"(){return this.current}"System.Collections.IEnumerator.MoveNext"(){const e=this.iter.next();return this.current=e.value,!e.done}"System.Collections.IEnumerator.Reset"(){throw new Error("JS iterators cannot be reset")}Dispose(){}}function Je(e){return"function"==typeof e.GetEnumerator?e.GetEnumerator():new Ze(e[Symbol.iterator]())}function Ye(e){return{[Symbol.iterator](){return this},next(){const n=e["System.Collections.IEnumerator.MoveNext"]();return{done:!n,value:n?e["System.Collections.IEnumerator.get_Current"]():void 0}}}}class Xe{constructor(e){this.factory=e,this.isValueCreated=!1}get Value(){return this.isValueCreated||(this.createdValue=this.factory(),this.isValueCreated=!0),this.createdValue}get IsValueCreated(){return this.isValueCreated}}function Ke(e,n){let t=e.toString(10);for(;t.length<n;)t="0"+t;return t}function Qe(e){const n=e;return"number"==typeof n.offset?n.offset:1===e.kind?0:-6e4*e.getTimezoneOffset()}function en(e,n){return(e=e<0&&null!=n&&10!==n?4294967295+e+1:e).toString(n)}class nn{static id(e){return nn.idMap.has(e)||nn.idMap.set(e,++nn.count),nn.idMap.get(e)}}function tn(e){let n=0,t=5381;const r=e.length;for(;n<r;)t=33*t^e.charCodeAt(n++);return t}function rn(e){return 2654435761*e|0}function on(e){return 0===e.length?0:e.reduce(((e,n)=>(e<<5)+e^n))}function sn(e){var n;if(null==e)return 0;switch(typeof e){case"boolean":return e?1:0;case"number":return rn(e);case"string":return tn(e);default:if(Ve(e))return e.GetHashCode();if(Be(e))return function(e){const n=e.length,t=new Array(n);for(let r=0;r<n;r++)t[r]=sn(e[r]);return on(t)}(e);if(e instanceof Date)return function(e){return e.getTime()}(e);if((null===(n=Object.getPrototypeOf(e))||void 0===n?void 0:n.constructor)===Object){const n=Object.values(e).map((e=>sn(e)));return on(n)}return rn(nn.id(e))}}function un(e){return null==e?0:Ve(e)?e.GetHashCode():rn(nn.id(e))}function ln(e,n,t){if(null==e)return null==n;if(null==n)return!1;if(e.length!==n.length)return!1;for(let r=0;r<e.length;r++)if(!t(e[r],n[r]))return!1;return!0}function cn(e,n){return ln(e,n,an)}function an(e,n){var t;return e===n||(null==e?null==n:null!=n&&"object"==typeof e&&(function(e){return"function"==typeof e.Equals}(e)?e.Equals(n):Be(e)?Be(n)&&cn(e,n):e instanceof Date?n instanceof Date&&0===fn(e,n):(null===(t=Object.getPrototypeOf(e))||void 0===t?void 0:t.constructor)===Object&&function(e,n){const t=Object.keys(e),r=Object.keys(n);if(t.length!==r.length)return!1;t.sort(),r.sort();for(let o=0;o<t.length;o++)if(t[o]!==r[o]||!an(e[t[o]],n[r[o]]))return!1;return!0}(e,n)))}function fn(e,n){let t,r;return"offset"in e&&"offset"in n?(t=e.getTime(),r=n.getTime()):(t=e.getTime()+Qe(e),r=n.getTime()+Qe(n)),t===r?0:t<r?-1:1}function dn(e,n){return e===n?0:e<n?-1:1}function hn(e,n){return function(e,n,t){if(null==e)return null==n?0:1;if(null==n)return-1;if(e.length!==n.length)return e.length<n.length?-1:1;for(let r=0,o=0;r<e.length;r++)if(o=t(e[r],n[r]),0!==o)return o;return 0}(e,n,mn)}function mn(e,n){var t;return e===n?0:null==e?null==n?0:-1:null==n?1:"object"!=typeof e?e<n?-1:1:function(e){return"function"==typeof e.CompareTo}(e)?e.CompareTo(n):Be(e)?Be(n)?hn(e,n):-1:e instanceof Date?n instanceof Date?fn(e,n):-1:(null===(t=Object.getPrototypeOf(e))||void 0===t?void 0:t.constructor)===Object?function(e,n){const t=Object.keys(e),r=Object.keys(n);if(t.length!==r.length)return t.length<r.length?-1:1;t.sort(),r.sort();for(let o=0,i=0;o<t.length;o++){const s=t[o];if(s!==r[o])return s<r[o]?-1:1;if(i=mn(e[s],n[s]),0!==i)return i}return 0}(e,n):-1}function pn(e,n,t){return e(n,t)>0?n:t}function wn(e){const n={};for(const t of e)n[t[0]]=t[1];return n}nn.idMap=new WeakMap,nn.count=0;const gn=Symbol("curried");function _n(e,n){if(null==n||n.length>1)return n;const t=(...t)=>{let r=n;for(let n=0;n<e;n++)r=r(t[n]);return r};return t[gn]=n,t}function yn(e,n,t){return r=>1===n?t(...e.concat([r])):yn(e.concat([r]),n-1,t)}function vn(e,n,t){if(null!=n){if(gn in n){n=n[gn];for(let e=0;e<t.length;e++)n=n(t[e]);return n}return yn(t,e,n)}}function Cn(e,n=0){var t,r;if(null!=e&&"object"==typeof e){if("function"==typeof e.toString)return e.toString();if(Symbol.iterator in e)return function(e){let n=0,t="[";for(const r of e){if(0===n)t+=Cn(r);else{if(100===n){t+="; ...";break}t+="; "+Cn(r)}n++}return t+"]"}(e);{const o=null===(t=Object.getPrototypeOf(e))||void 0===t?void 0:t.constructor;return o===Object&&n<10?"{ "+Object.entries(e).map((([e,t])=>e+" = "+Cn(t,n+1))).join("\n ")+" }":null!==(r=null==o?void 0:o.name)&&void 0!==r?r:""}}return String(e)}class bn{get name(){return this.cases()[this.tag]}toJSON(){return 0===this.fields.length?this.name:[this.name].concat(this.fields)}toString(){return function(e,n){if(0===n.length)return e;{let t="",r=!0;return 1===n.length?(t=Cn(n[0]),r=t.indexOf(" ")>=0):t=n.map((e=>Cn(e))).join(", "),e+(r?" (":" ")+t+(r?")":"")}}(this.name,this.fields)}GetHashCode(){const e=this.fields.map((e=>sn(e)));return e.splice(0,0,rn(this.tag)),on(e)}Equals(e){return this===e||!!qe(this,e)&&this.tag===e.tag&&cn(this.fields,e.fields)}CompareTo(e){return this===e?0:qe(this,e)?this.tag===e.tag?hn(this.fields,e.fields):this.tag<e.tag?-1:1:-1}}class xn{toJSON(){return function(e){const n={},t=Object.keys(e);for(let r=0;r<t.length;r++)n[t[r]]=e[t[r]];return n}(this)}toString(){return e=this,"{ "+Object.entries(e).map((([e,n])=>e+" = "+Cn(n))).join("\n ")+" }";var e}GetHashCode(){return function(e){const n=Object.values(e).map((e=>sn(e)));return on(n)}(this)}Equals(e){return function(e,n){if(e===n)return!0;if(qe(e,n)){const t=Object.keys(e);for(let r=0;r<t.length;r++)if(!an(e[t[r]],n[t[r]]))return!1;return!0}return!1}(this,e)}CompareTo(e){return function(e,n){if(e===n)return 0;if(qe(e,n)){const t=Object.keys(e);for(let r=0;r<t.length;r++){const o=mn(e[t[r]],n[t[r]]);if(0!==o)return o}return 0}return-1}(this,e)}}class Sn{constructor(e,n){"function"==typeof n?(this.getter=e,this.setter=n):(this.getter=()=>e,this.setter=n=>{e=n})}get contents(){return this.getter()}set contents(e){this.setter(e)}}function En(e){return function(e){return e instanceof class{constructor(e){this.message=e}}||e instanceof Error}(e)?e:new Error(String(e))}class An{constructor(e){this.value=e}toJSON(){return this.value}toString(){return String(this.value)}GetHashCode(){return sn(this.value)}Equals(e){return null!=e&&an(this.value,e instanceof An?e.value:e)}CompareTo(e){return null==e?1:mn(this.value,e instanceof An?e.value:e)}}function kn(e){return null==e||e instanceof An?new An(e):e}function In(e){if(null==e)throw new Error("Option has no value");return e instanceof An?e.value:e}function Tn(e){return null==e?[]:[In(e)]}function Nn(e,n){return null!=e?In(e):n}function On(e,n){return null!=n?kn(e(In(n))):void 0}function Mn(e){const n=e<0,t=(e=Math.abs(e))%36e5/6e4;return(n?"-":"+")+Ke(~~(e/36e5),2)+":"+Ke(t,2)}function Dn(e,n){const t=e.toISOString();return"first"===n?t.substring(0,t.indexOf("T")):t.substring(t.indexOf("T")+1,t.length-1)}function Un(e,n,t){return n.replace(/(\w)\1*/g,(n=>{let r=Number.NaN;switch(n.substring(0,1)){case"y":const o=t?e.getUTCFullYear():e.getFullYear();r=n.length<4?o%100:o;break;case"M":r=(t?e.getUTCMonth():e.getMonth())+1;break;case"d":r=t?e.getUTCDate():e.getDate();break;case"H":r=t?e.getUTCHours():e.getHours();break;case"h":const i=t?e.getUTCHours():e.getHours();r=i>12?i%12:i;break;case"m":r=t?e.getUTCMinutes():e.getMinutes();break;case"s":r=t?e.getUTCSeconds():e.getSeconds();break;case"f":r=t?e.getUTCMilliseconds():e.getMilliseconds()}return Number.isNaN(r)?n:r<10&&n.length>1?"0"+r:""+r}))}function Pn(e,n,t){return null!=e.offset?function(e,n){var t,r,o;const i=new Date(e.getTime()+(null!==(t=e.offset)&&void 0!==t?t:0));if("string"!=typeof n)return i.toISOString().replace(/\.\d+/,"").replace(/[A-Z]|\.\d+/g," ")+Mn(null!==(r=e.offset)&&void 0!==r?r:0);if(1!==n.length)return Un(i,n,!0);switch(n){case"D":case"d":return Dn(i,"first");case"T":case"t":return Dn(i,"second");case"O":case"o":return function(e,n){const t=e.toISOString();return t.substring(0,t.length-1)+Mn(n)}(i,null!==(o=e.offset)&&void 0!==o?o:0);default:throw new Error("Unrecognized Date print format")}}(e,n):function(e,n){const t=1===e.kind;if("string"!=typeof n)return t?e.toUTCString():e.toLocaleString();if(1!==n.length)return Un(e,n,t);switch(n){case"D":case"d":return t?Dn(e,"first"):e.toLocaleDateString();case"T":case"t":return t?Dn(e,"second"):e.toLocaleTimeString();case"O":case"o":return function(e,n){if(n)return e.toISOString();{const n=null==e.kind||2===e.kind;return Ke(e.getFullYear(),4)+"-"+Ke(e.getMonth()+1,2)+"-"+Ke(e.getDate(),2)+"T"+Ke(e.getHours(),2)+":"+Ke(e.getMinutes(),2)+":"+Ke(e.getSeconds(),2)+"."+Ke(e.getMilliseconds(),3)+(n?Mn(-6e4*e.getTimezoneOffset()):"")}}(e,t);default:throw new Error("Unrecognized Date print format")}}(e,n)}function Fn(e,n){const t=new Date(e);return t.kind=0|(null==n?0:n),t}function Rn(e){function n(){throw new Error(`The string is not a valid Date: ${e}`)}null!=e&&""!==e.trim()||n(),10===e.length&&"-"===e[4]&&"-"===e[7]&&(e+="T00:00:00");let t=new Date(e),r=null;if(isNaN(t.getTime())){const o=/^\s*(\d+[^\w\s:]\d+[^\w\s:]\d+)?\s*(\d+:\d+(?::\d+(?:\.\d+)?)?)?\s*([AaPp][Mm])?\s*(Z|[+-]([01]?\d):?([0-5]?\d)?)?\s*$/.exec(e);if(null!=o){let e,n=0;if(null!=o[2]){const e=o[2].split(":");n=3600*parseInt(e[0],10)+60*parseInt(e[1]||"0",10)+parseFloat(e[2]||"0"),null!=o[3]&&"PM"===o[3].toUpperCase()&&(n+=720)}if(null!=o[4]){if(null!=o[1])e=new Date(o[1]+" UTC");else{const n=new Date;e=new Date(n.getUTCFullYear()+"/"+(n.getUTCMonth()+1)+"/"+n.getUTCDate())}if("Z"===o[4])r="Z";else{let e=60*parseInt(o[5],10)+parseInt(o[6]||"0",10);"-"===o[4][0]&&(e*=-1),r=e,n-=60*e}}else if(null!=o[1])e=new Date(o[1]);else{const n=new Date;e=new Date(n.getFullYear()+"/"+(n.getMonth()+1)+"/"+n.getDate())}t=new Date(e.getTime()+1e3*n),t=new Date(t.getTime()+6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))}else n();isNaN(t.getTime())&&n()}return[t,r]}function $n(e,n){try{return n.contents=function(e,n=!1){const[t,r]=Rn(e),o=null!=r?n&&"Z"===r?1:2:0;return Fn(t.getTime(),o)}(e),!0}catch(e){return!1}}const Gn=Symbol("numeric");function Hn(e){return"number"==typeof e||(null==e?void 0:e[Gn])}function jn(e,n){return"number"==typeof e?e*n:e[Gn]().multiply(n)}function Ln(e,n){return"number"==typeof e?e.toFixed(n):e[Gn]().toFixed(n)}function Bn(e,n){return"number"==typeof e?e.toPrecision(n):e[Gn]().toPrecision(n)}function Vn(e,n){return"number"==typeof e?e.toExponential(n):e[Gn]().toExponential(n)}function zn(e){return"number"==typeof e?(Number(e)>>>0).toString(16):e[Gn]().toHex()}function Wn(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function qn(e,n,t=0){if(null==n)throw new Error("Input cannot ve null");if(!e.global)throw new Error("Non-global RegExp");e.lastIndex=t;const r=[];let o,i=-1;for(;null!=(o=e.exec(n));)o.index===i?e.lastIndex++:(i=o.index,r.push(o));return r}const Zn=/(^|[^%])%([0+\- ]*)(\*|\d+)?(?:\.(\d+))?(\w)/g,Jn=/\{(\d+)(,-?\d+)?(?:\:([a-zA-Z])(\d{0,2})|\:(.+?))?\}/g;function Yn(e,n){return function(e,n){return"number"==typeof e?e<n?-1:e>n?1:0:e.CompareTo(n)}(e,n)<0}function Xn(e){return{input:e,cont:(n=e,e=>{Zn.lastIndex=0;const t=[],r=[];let o=0,i=Zn.exec(n);for(;i;){const e=i.index+(i[1]||"").length;t.push(n.substring(o,e).replace(/%%/g,"%")),r.push(i),o=Zn.lastIndex,Zn.lastIndex-=1,i=Zn.exec(n)}return 0===t.length?e(n.replace(/%%/g,"%")):(t.push(n.substring(o).replace(/%%/g,"%")),tt(e,t,r))})};var n}function Kn(e,n){return"string"==typeof n?e(n):n.cont(e)}function Qn(e){return Kn((e=>e),e)}function et(e){return Kn((e=>{throw new Error(e)}),e)}function nt(e,n,t,r,o){let i="";if(n=n||"",o=o||"",Hn(e))switch("x"!==o.toLowerCase()&&(Yn(e,0)?(e=jn(e,-1),i="-"):n.indexOf(" ")>=0?i=" ":n.indexOf("+")>=0&&(i="+")),r=null==r?null:parseInt(r,10),o){case"f":case"F":e=Ln(e,r=null!=r?r:6);break;case"g":case"G":e=null!=r?Bn(e,r):Bn(e);break;case"e":case"E":e=null!=r?Vn(e,r):Vn(e);break;case"x":e=zn(e);break;case"X":e=zn(e).toUpperCase();break;default:e=String(e)}else e=e instanceof Date?Pn(e):Cn(e);if(t="number"==typeof t?t:parseInt(t,10),isNaN(t))e=i+e;else{const r=n.indexOf("0")>=0,o=n.indexOf("-")>=0,s=o||!r?" ":"0";e="0"===s?i+(e=ot(e,t-i.length,s,o)):ot(i+e,t,s,o)}return e}function tt(e,n,t,r="",o=-1){return(...i)=>{let s=r;const u=n.slice(),l=t.slice();for(const e of i){const[,,n,t,r,i]=l[0];let c=t;if(o>=0)c=o,o=-1;else if("*"===c){if(e<0)throw new Error("Non-negative number required");o=e;continue}s+=u[0],s+=nt(e,n,c,r,i),u.splice(0,1),l.splice(0,1)}return 0===l.length?(s+=u[0],e(s)):tt(e,u,l,s,o)}}function rt(e,n){return Array.isArray(n)?n.join(e):Array.from(n).join(e)}function ot(e,n,t,r){t=t||" ",n-=e.length;for(let o=0;o<n;o++)e=r?e+t:t+e;return e}function it(e,n,t){return ot(e,n,t)}function st(e,n,t,r){if(r="number"==typeof r?r:0,(t="number"==typeof t?t:void 0)&&t<0)throw new Error("Count cannot be less than zero");if(0===t)return[];const o=1==(1&r),i=2==(2&r);n=(n=n||[]).filter((e=>e)).map(Wn),n=n.length>0?n:["\\s"];const s=[],u=new RegExp(n.join("|"),"g");let l=!0,c=0;do{const n=u.exec(e);if(null===n){const n=i?e.substring(c).trim():e.substring(c);(!o||n.length>0)&&s.push(n),l=!1}else{const r=i?e.substring(c,n.index).trim():e.substring(c,n.index);(!o||r.length>0)&&(null!=t&&s.length+1===t?(s.push(i?e.substring(c).trim():e.substring(c)),l=!1):s.push(r)),c=u.lastIndex}}while(l);return s}function ut(e,n,t){if(n+(t||0)>e.length)throw new Error("Invalid startIndex and/or length");return null!=t?e.substr(n,t):e.substr(n)}function lt(e,n){return"function"==typeof e?new e(n):new Array(n)}function ct(e,n,t,r){const o=0|n;return e.fill(r,o,o+t)}function at(e,n,t){const r=0|n.length,o=lt(t,r);for(let t=0;t<=r-1;t++)o[t]=e(n[t]);return o}function ft(e,n,t){return t.reduce(e,n)}function dt(e,n,t){if(null==n)return null==t;if(null==t)return!1;{let r=0,o=!0;const i=0|n.length,s=0|t.length;if(i>s)return!1;if(i<s)return!1;for(;r<i&&o;)o=e(n[r],t[r]),r=r+1|0;return o}}class ht extends xn{constructor(e,n){super(),this.head=e,this.tail=n}toString(){return"["+rt("; ",this)+"]"}Equals(e){return this===e||((e,n)=>{e:for(;;){const t=e,r=n,o=[t.tail,r.tail];if(null!=o[0]){if(null!=o[1]){const i=o[0],s=o[1];if(an(t.head,r.head)){e=i,n=s;continue e}return!1}return!1}return null==o[1]}})(this,e)}GetHashCode(){return 0|((e,n,t)=>{for(;;){const r=e,o=n,i=t,s=i.tail;if(null==s)return 0|o;{const u=s;if(r>18)return 0|o;e=r+1,n=(o<<1)+sn(i.head)+631*r,t=u}}})(0,0,this)}toJSON(e){return Array.from(this)}CompareTo(e){return 0|((e,n)=>{e:for(;;){const t=e,r=n,o=[t.tail,r.tail];if(null!=o[0]){if(null!=o[1]){const i=o[0],s=o[1],u=0|mn(t.head,r.head);if(0===u){e=i,n=s;continue e}return 0|u}return 1}return null!=o[1]?-1:0}})(this,e)}GetEnumerator(){return new mt(this)}[Symbol.iterator](){return Ye(this.GetEnumerator())}"System.Collections.IEnumerable.GetEnumerator"(){return Je(this)}}class mt{constructor(e){this.xs=e,this.it=this.xs,this.current=null}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current}"System.Collections.IEnumerator.get_Current"(){return this.current}"System.Collections.IEnumerator.MoveNext"(){const e=this,n=e.it.tail;if(null!=n){const t=n;return e.current=e.it.head,e.it=t,!0}return!1}"System.Collections.IEnumerator.Reset"(){const e=this;e.it=e.xs,e.current=null}Dispose(){}}function pt(){return new ht(null,void 0)}function wt(e,n){return new ht(e,n)}function gt(e){return null==e.tail}function _t(e){if(null!=e.tail)return e.head;throw new Error("Collection was empty.\\nParameter name: list")}function yt(e){const n=e.tail;if(null!=n)return n;throw new Error("Collection was empty.\\nParameter name: list")}function vt(){return pt()}function Ct(e,n){return wt(e,n)}function bt(e){return wt(e,pt())}function xt(e){return gt(e)}function St(e){return _t(e)}function Et(e){return yt(e)}function At(e){const n=0|function(e){return 0|((e,n)=>{for(;;){const t=e,r=n.tail;if(null==r)return 0|t;e=t+1,n=r}})(0,e)}(e),t=ct(new Array(n),0,n,null);return((e,n)=>{for(;;){const r=e,o=n;if(gt(o))break;t[r]=_t(o),e=r+1,n=yt(o)}})(0,e),t}function kt(e,n,t){let r=n,o=t;for(;!gt(o);)r=e(r,_t(o)),o=yt(o);return r}function It(e){return kt(((e,n)=>wt(n,e)),pt(),e)}function Tt(e,n){kt(((n,t)=>{e(t)}),void 0,n)}function Nt(e,n){let t=n;for(let n=e.length-1;n>=0;n--)t=wt(e[n],t);return t}function Ot(e){return Nt(e,pt())}function Mt(e,n){return kt(((e,n)=>wt(n,e)),n,It(e))}function Dt(e,n){const t=pt(),r=kt(((n,t)=>{const r=new ht(e(t),void 0);return n.tail=r,r}),t,n),o=pt();return r.tail=o,yt(t)}function Ut(e,n,t){return null!=function(e,n){return((n,t)=>{for(;;){const r=n,o=t;if(gt(o))return;if(e(_t(o)))return r;n=r+1,t=yt(o)}})(0,n)}((n=>t.Equals(e,n)),n)}function Pt(){return e=mn,{Compare:(n,t)=>e(n,t)};var e}const Ft="The input sequence has an insufficient number of elements.";function Rt(){throw new Error("Enumeration has not started. Call MoveNext.")}function $t(){throw new Error("Enumeration already finished.")}class Gt{constructor(e){this.f=e}toString(){let e=0,n="seq [";const t=Je(this);try{for(;e<4&&t["System.Collections.IEnumerator.MoveNext"]();)e>0&&(n+="; "),n+=Cn(t["System.Collections.Generic.IEnumerator`1.get_Current"]()),e=e+1|0;return 4===e&&(n+="; ..."),n+"]"}finally{We(t)}}GetEnumerator(){return this.f()}[Symbol.iterator](){return Ye(this.GetEnumerator())}"System.Collections.IEnumerable.GetEnumerator"(){return this.f()}}class Ht{constructor(e,n,t){this.current=e,this.next=n,this.dispose=t}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current()}"System.Collections.IEnumerator.get_Current"(){return this.current()}"System.Collections.IEnumerator.MoveNext"(){return this.next()}"System.Collections.IEnumerator.Reset"(){!function(){throw new Error("Reset is not supported on this enumerator.")}()}Dispose(){this.dispose()}}function jt(e,n,t){return new Ht(e,n,t)}function Lt(e,n,t){let r,o=!1,i=kn(e());const s=()=>{if(null!=i){const e=In(i);try{t(e)}finally{i=void 0}}},u=()=>{try{s()}finally{r=void 0}};return jt((()=>(o||Rt(),null!=r?In(r):$t())),(()=>{if(o||(o=!0),null!=i){const e=In(i);let t;try{t=n(e)}catch(e){throw u(),e}return null!=t?(r=t,!0):(u(),!1)}return!1}),s)}function Bt(e){return function(e){return new Gt(e)}(e)}function Vt(e){return n="source",null==e&&function(e){throw new Error(e)}(n),Je(e);var n}function zt(e){return Bt((()=>Je(e())))}function Wt(e){return Bt((()=>function(e){let n,t,r,o=!1,i=!1;const s=()=>{if(i=!0,null!=t){const e=t;try{We(e)}finally{t=void 0}}if(null!=n){const e=n;try{We(e)}finally{n=void 0}}};return jt((()=>(o?i&&$t():Rt(),null!=r?In(r):$t())),(()=>{let u;if(o||(o=!0),i)return!1;{let o;for(;null==o;){const i=[n,t];if(null!=i[0])if(null!=i[1]){const e=i[1];if(e["System.Collections.IEnumerator.MoveNext"]())r=kn(e["System.Collections.Generic.IEnumerator`1.get_Current"]()),o=!0;else try{We(e)}finally{t=void 0}}else{const e=i[0];e["System.Collections.IEnumerator.MoveNext"]()?(u=e["System.Collections.Generic.IEnumerator`1.get_Current"](),t=Je(u)):(s(),o=!1)}else n=Je(e)}return In(o)}}),(()=>{i||s()}))}(e)))}function qt(e){return zt((()=>function(e,n){const t=lt(void 0,1);return t[0]=e,t}(e)))}function Zt(e){return Be(e)?Ot(e):e instanceof ht?e:function(e){let n,t;if(Be(e))return Ot(e);if(e instanceof ht)return e;{const r=pt();let o=r;const i=Je(e);try{for(;i["System.Collections.IEnumerator.MoveNext"]();){const e=i["System.Collections.Generic.IEnumerator`1.get_Current"]();n=o,t=new ht(e,void 0),n.tail=t,o=t}}finally{We(i)}const s=o,u=pt();return s.tail=u,yt(r)}}(e)}function Jt(e,n,t){return Bt((()=>{let r=-1;return Lt(e,(e=>(r=r+1|0,n(r,e))),t)}))}function Yt(e,n){return Wt([e,n])}function Xt(e,n,t){const r=Vt(n);try{let n=!1;for(;!n&&r["System.Collections.IEnumerator.MoveNext"]();)n=t.Equals(e,r["System.Collections.Generic.IEnumerator`1.get_Current"]());return n}finally{We(r)}}function Kt(e,n,t){const r=Vt(t);try{let t=n;for(;r["System.Collections.IEnumerator.MoveNext"]();)t=e(t,r["System.Collections.Generic.IEnumerator`1.get_Current"]());return t}finally{We(r)}}function Qt(e,n){Kt(((n,t)=>{e(t)}),void 0,n)}function er(e,n){return t=()=>Vt(n),r=n=>n["System.Collections.IEnumerator.MoveNext"]()?kn(e(n["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0,o=e=>{We(e)},Bt((()=>Lt(t,r,o)));var t,r,o}function nr(e,n){return Jt((()=>Vt(n)),((n,t)=>t["System.Collections.IEnumerator.MoveNext"]()?kn(e(n,t["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0),(e=>{We(e)}))}function tr(e){return zt((()=>function(e){return e.slice().reverse()}(function(e){return e instanceof ht?At(e):Array.from(e)}(e))))}function rr(e,n){return Bt((()=>{const t=Vt(n);try{for(let n=1;n<=e;n++)if(!t["System.Collections.IEnumerator.MoveNext"]())throw new Error(Ft+"\\nParameter name: source");return function(e,n){return jt((()=>n["System.Collections.Generic.IEnumerator`1.get_Current"]()),(()=>n["System.Collections.IEnumerator.MoveNext"]()),(()=>{try{We(n)}finally{e()}}))}((()=>{}),t)}catch(e){throw We(t),e}}))}Symbol.iterator;class or{constructor(e,n){this.k=e,this.v=n}}function ir(e,n){return new or(e,n)}function sr(e){return e.k}function ur(e){return e.v}class lr extends or{constructor(e,n,t,r,o){super(e,n),this.left=t,this.right=r,this.h=0|o}}function cr(e,n,t,r,o){return new lr(e,n,t,r,o)}function ar(e){return e.left}function fr(e){return e.right}function dr(e){return e.h}function hr(e,n){e:for(;;){const t=e,r=n;if(null!=r){const o=r;if(o instanceof lr){e=hr(t+1,ar(o)),n=fr(o);continue e}return t+1|0}return 0|t}}function mr(e){return hr(0,e)}function pr(e,n,t,r){let o,i;if(null!=e){const n=e;o=n instanceof lr?dr(n):1}else o=0;if(null!=r){const e=r;i=e instanceof lr?dr(e):1}else i=0;const s=0|(o<i?i:o);return 0===s?ir(n,t):cr(n,t,e,r,s+1)}function wr(e,n,t,r){let o,i,s,u,l,c;if(null!=e){const n=e;l=n instanceof lr?dr(n):1}else l=0;if(null!=r){const e=r;c=e instanceof lr?dr(e):1}else c=0;if(c>l+2){const s=In(r);if(s instanceof lr){if(o=ar(s),(null!=o?(i=o,i instanceof lr?dr(i):1):0)>l+1){const r=In(ar(s));if(r instanceof lr)return pr(pr(e,n,t,ar(r)),sr(r),ur(r),pr(fr(r),sr(s),ur(s),fr(s)));throw new Error("internal error: Map.rebalance")}return pr(pr(e,n,t,ar(s)),sr(s),ur(s),fr(s))}throw new Error("internal error: Map.rebalance")}if(l>c+2){const o=In(e);if(o instanceof lr){if(s=fr(o),(null!=s?(u=s,u instanceof lr?dr(u):1):0)>c+1){const e=In(fr(o));if(e instanceof lr)return pr(pr(ar(o),sr(o),ur(o),ar(e)),sr(e),ur(e),pr(fr(e),n,t,r));throw new Error("internal error: Map.rebalance")}return pr(ar(o),sr(o),ur(o),pr(fr(o),n,t,r))}throw new Error("internal error: Map.rebalance")}return pr(e,n,t,r)}function gr(e,n,t,r){if(null!=r){const o=r,i=0|e.Compare(n,sr(o));return o instanceof lr?i<0?wr(gr(e,n,t,ar(o)),sr(o),ur(o),fr(o)):0===i?cr(n,t,ar(o),fr(o),dr(o)):wr(ar(o),sr(o),ur(o),gr(e,n,t,fr(o))):i<0?cr(n,t,void 0,r,2):0===i?ir(n,t):cr(n,t,r,void 0,2)}return ir(n,t)}function _r(e,n,t){e:for(;;){const r=e,o=n,i=t;if(null!=i){const s=i,u=0|r.Compare(o,sr(s));if(0===u)return kn(ur(s));if(s instanceof lr){e=r,n=o,t=u<0?ar(s):fr(s);continue e}return}return}}function yr(e){if(null!=e){const n=e;if(n instanceof lr){if(null==ar(n))return[sr(n),ur(n),fr(n)];{const e=yr(ar(n));return[e[0],e[1],pr(e[2],sr(n),ur(n),fr(n))]}}return[sr(n),ur(n),void 0]}throw new Error("internal error: Map.spliceOutSuccessor")}function vr(e,n,t,r){if(null!=r){const o=r;if(o instanceof lr){const r=0|e.Compare(n,sr(o));if(r<0)return wr(vr(e,n,t,ar(o)),sr(o),ur(o),fr(o));if(0===r){const e=t(kn(ur(o)));if(null!=e)return cr(n,In(e),ar(o),fr(o),dr(o));if(null==ar(o))return fr(o);if(null==fr(o))return ar(o);{const e=yr(fr(o));return pr(ar(o),e[0],e[1],e[2])}}return wr(ar(o),sr(o),ur(o),vr(e,n,t,fr(o)))}{const i=0|e.Compare(n,sr(o));if(i<0){const e=t(void 0);return null!=e?cr(n,In(e),void 0,r,2):r}if(0===i){const e=t(kn(ur(o)));return null!=e?ir(n,In(e)):void 0}{const e=t(void 0);return null!=e?cr(n,In(e),r,void 0,2):r}}}{const e=t(void 0);return null!=e?ir(n,In(e)):r}}function Cr(e,n){e:for(;;){const t=e,r=n;if(null!=r){const o=r;if(o instanceof lr){Cr(t,ar(o)),t(sr(o),ur(o)),e=t,n=fr(o);continue e}t(sr(o),ur(o))}break}}function br(e,n){Cr(e,n)}function xr(e,n){e:for(;;){const t=e,r=n;if(null!=r){const o=r;if(o instanceof lr){const r=xr(t,ar(o));if(null==r){const r=t(sr(o),ur(o));if(null==r){e=t,n=fr(o);continue e}return r}return r}return t(sr(o),ur(o))}return}}function Sr(e,n){return xr(e,n)}function Er(e,n){if(null!=n){const t=n;if(t instanceof lr){const n=Er(e,ar(t)),r=e(sr(t),ur(t)),o=Er(e,fr(t));return cr(sr(t),r,n,o,dr(t))}return ir(sr(t),e(sr(t),ur(t)))}}function Ar(e,n){return Er(e,n)}function kr(e,n){let t;for(let r=0;r<=n.length-1;r++){const o=n[r];t=gr(e,o[0],o[1],t)}return t}class Ir extends xn{constructor(e,n){super(),this.stack=e,this.started=n}}function Tr(e){e:for(;;){const n=e;if(xt(n))return vt();{const t=Et(n),r=St(n);if(null!=r){const o=r;if(o instanceof lr){e=Nt([ar(o),ir(sr(o),ur(o)),fr(o)],t);continue e}return n}e=t;continue e}}}function Nr(e){return new Ir(Tr(bt(e)),!1)}function Or(e){if(e.started){const n=e.stack;if(xt(n))return function(){throw new Error("enumeration already finished")}();if(null!=St(n)){const e=St(n);if(e instanceof lr)throw new Error("Please report error: Map iterator, unexpected stack for current");return[sr(e),ur(e)]}throw new Error("Please report error: Map iterator, unexpected stack for current")}return function(){throw new Error("enumeration not started")}()}function Mr(e){let n=Nr(e);return{"System.Collections.Generic.IEnumerator`1.get_Current":()=>Or(n),"System.Collections.IEnumerator.get_Current":()=>Or(n),"System.Collections.IEnumerator.MoveNext":()=>function(e){if(e.started){const n=e.stack;if(xt(n))return!1;if(null!=St(n)){if(St(n)instanceof lr)throw new Error("Please report error: Map iterator, unexpected stack for moveNext");return e.stack=Tr(Et(n)),!xt(e.stack)}throw new Error("Please report error: Map iterator, unexpected stack for moveNext")}return e.started=!0,!xt(e.stack)}(n),"System.Collections.IEnumerator.Reset"(){n=Nr(e)},Dispose(){}}}class Dr{constructor(e,n){this.comparer=e,this.tree=n}GetHashCode(){return 0|function(e){const n=(e,n)=>(e<<1)+n+631;let t=0;const r=Je(e);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const e=r["System.Collections.Generic.IEnumerator`1.get_Current"]();t=0|n(t,sn(e[0])),t=0|n(t,sn(e[1]))}}finally{We(r)}return 0|t}(this)}Equals(e){if(!(e instanceof Dr))return!1;{const n=Je(this);try{const t=Je(e);try{const e=()=>{const r=n["System.Collections.IEnumerator.MoveNext"]();if(r===t["System.Collections.IEnumerator.MoveNext"]()){if(r){const r=n["System.Collections.Generic.IEnumerator`1.get_Current"](),o=t["System.Collections.Generic.IEnumerator`1.get_Current"]();return!(!an(r[0],o[0])||!an(r[1],o[1]))&&e()}return!0}return!1};return e()}finally{We(t)}}finally{We(n)}}}toString(){return"map ["+rt("; ",er((e=>function(e,...n){return"object"==typeof e&&n.length>0&&(e=n[0],n.shift()),e.replace(Jn,((e,t,r,o,i,s)=>{if(t<0||t>=n.length)throw new Error("Index must be greater or equal to zero and less than the arguments' length.");let u=n[t];if(Hn(u))switch(i=null==i?null:parseInt(i,10),o){case"f":case"F":u=Ln(u,i=null!=i?i:2);break;case"g":case"G":u=null!=i?Bn(u,i):Bn(u);break;case"e":case"E":u=null!=i?Vn(u,i):Vn(u);break;case"p":case"P":i=null!=i?i:2,u=Ln(jn(u,100),i)+" %";break;case"d":case"D":u=null!=i?it(String(u),i,"0"):String(u);break;case"x":case"X":u=null!=i?it(zn(u),i,"0"):zn(u),"X"===o&&(u=u.toUpperCase());break;default:if(s){let e="";u=s.replace(/([0#,]+)(\.[0#]+)?/,((n,t,r)=>{Yn(u,0)&&(u=jn(u,-1),e="-"),r=null==r?"":r.substring(1),u=Ln(u,Math.max(r.length,0));let[o,i]=u.split(".");i||(i=""),o=it(o,t.replace(/,/g,"").replace(/^#+/,"").length,"0");const s=r.replace(/#+$/,"").length;if(s>i.length?i=function(e,n,t){return ot(e,n,"0",!0)}(i,s):s<i.length&&(i=i.substring(0,s)+i.substring(s).replace(/0+$/,"")),t.indexOf(",")>0){const e=o.length%3,n=Math.floor(o.length/3);let t=e>0?o.substr(0,e)+(n>0?",":""):"";for(let r=0;r<n;r++)t+=o.substr(e+3*r,3)+(r<n-1?",":"");o=t}return i.length>0?o+"."+i:o})),u=e+u}}else u=u instanceof Date?Pn(u,s||o):Cn(u);return r=parseInt((r||" ").substring(1),10),isNaN(r)||(u=ot(String(u),Math.abs(r)," ",r<0)),u}))}("({0}, {1})",e[0],e[1])),this))+"]"}get[Symbol.toStringTag](){return"FSharpMap"}toJSON(e){return Array.from(this)}GetEnumerator(){return Mr(this.tree)}[Symbol.iterator](){return Ye(this.GetEnumerator())}"System.Collections.IEnumerable.GetEnumerator"(){return Mr(this.tree)}CompareTo(e){const n=this;if(e instanceof Dr)return 0|function(e,n,t){const r=Vt(n);try{const n=Vt(t);try{let t=0,o=r["System.Collections.IEnumerator.MoveNext"](),i=n["System.Collections.IEnumerator.MoveNext"]();for(;0===t&&o&&i;)t=0|e(r["System.Collections.Generic.IEnumerator`1.get_Current"](),n["System.Collections.Generic.IEnumerator`1.get_Current"]()),0===t&&(o=r["System.Collections.IEnumerator.MoveNext"](),i=n["System.Collections.IEnumerator.MoveNext"]());return 0|(0!==t?t:o?1:i?-1:0)}finally{We(n)}}finally{We(r)}}(((e,t)=>{const r=0|n.comparer.Compare(e[0],t[0]);return 0|(0!==r?r:mn(e[1],t[1]))}),n,e);throw new Error("not comparable\\nParameter name: obj")}"System.Collections.Generic.ICollection`1.Add2B595"(e){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Clear"(){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Remove2B595"(e){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Contains2B595"(e){return $r(this,e[0])&&an(Fr(this,e[0]),e[1])}"System.Collections.Generic.ICollection`1.CopyToZ2E171D71"(e,n){!function(e,n,t){let r=t;br(((e,t)=>{n[r]=[e,t],r=r+1|0}),e)}(this.tree,e,n)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return 0|Rr(this)}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return 0|Rr(this)}get size(){return 0|Rr(this)}clear(){throw new Error("Map cannot be mutated")}delete(e){throw new Error("Map cannot be mutated")}entries(){return er((e=>[e[0],e[1]]),this)}get(e){return Fr(this,e)}has(e){return $r(this,e)}keys(){return er((e=>e[0]),this)}set(e,n){throw new Error("Map cannot be mutated")}values(){return er((e=>e[1]),this)}forEach(e,n){const t=this;Qt((n=>{e(n[1],n[0],t)}),t)}}function Ur(e,n){return new Dr(e,n)}function Pr(e){const n=Pt();return Ur(n,function(e,n){if(Be(n))return kr(e,n);if(n instanceof ht)return function(e,n){return kt(((n,t)=>gr(e,t[0],t[1],n)),void 0,n)}(e,n);{const t=Je(n);try{return function(e,n,t){for(;;){const r=e,o=n,i=t;if(!i["System.Collections.IEnumerator.MoveNext"]())return o;{const s=i["System.Collections.Generic.IEnumerator`1.get_Current"]();e=r,n=gr(r,s[0],s[1],o),t=i}}}(e,void 0,t)}finally{We(t)}}}(n,e))}function Fr(e,n){return function(e,n,t){const r=_r(e,n,t);if(null==r)throw new Error;return In(r)}(e.comparer,n,e.tree)}function Rr(e){return mr(e.tree)}function $r(e,n){return function(e,n,t){e:for(;;){const r=e,o=n,i=t;if(null!=i){const s=i,u=0|r.Compare(o,sr(s));if(s instanceof lr){if(u<0){e=r,n=o,t=ar(s);continue e}if(0===u)return!0;e=r,n=o,t=fr(s);continue e}return 0===u}return!1}}(e.comparer,n,e.tree)}function Gr(e,n){return _r(e.comparer,n,e.tree)}function Hr(e,n,t){return function(e,n,t){return Ur(e.comparer,gr(e.comparer,n,t,e.tree))}(t,e,n)}function jr(e,n,t){return function(e,n,t){return Ur(e.comparer,vr(e.comparer,n,t,e.tree))}(t,e,n)}function Lr(e,n){return Gr(n,e)}function Br(e,n){return function(e,n){return Ur(e.comparer,Ar(n,e.tree))}(n,e)}function Vr(){return Dr.empty}Dr.empty=Ur(Pt(),void 0);class zr{constructor(e,n,t,r,o,i,s){this.fullname=e,this.generics=n,this.construct=t,this.parent=r,this.fields=o,this.cases=i,this.enumCases=s}toString(){return to(this)}GetHashCode(){return qr(this)}Equals(e){return Zr(this,e)}}function Wr(e){return null!=e.generics?e.generics:[]}function qr(e){return on([tn(e.fullname),...Wr(e).map(qr)])}function Zr(e,n){return""===e.fullname?""===n.fullname&&ln(ho(e),ho(n),(([e,n],[t,r])=>e===t&&Zr(n,r))):e.fullname===n.fullname&&ln(Wr(e),Wr(n),Zr)}function Jr(e,n,t,r){return new zr(e,n,t,void 0,r)}function Yr(...e){return new zr("",void 0,void 0,void 0,(()=>e))}function Xr(e){return new zr("Microsoft.FSharp.Core.FSharpOption`1",[e])}function Kr(e){return new zr("Microsoft.FSharp.Collections.FSharpList`1",[e])}const Qr=new zr("System.Object"),eo=(new zr("Microsoft.FSharp.Core.Unit"),new zr("System.Char"),new zr("System.String"));function no(e){if(Array.isArray(e))return e[0];if(e instanceof zr){const n=oo(e);if(null!=n)return no(n)+"[]";{const n=e.fullname.lastIndexOf(".");return-1===n?e.fullname:e.fullname.substr(n+1)}}return e.name}function to(e){const n=oo(e);return null!=n?to(n)+"[]":null==e.generics||0===e.generics.length?e.fullname:e.fullname+"["+e.generics.map((e=>to(e))).join(",")+"]"}function ro(e){return null!=oo(e)}function oo(e){var n;return"[]"===e.fullname&&1===(null===(n=e.generics)||void 0===n?void 0:n.length)?e.generics[0]:void 0}function io(e){return null!=e.generics&&e.generics.length>0}function so(e){return null!=e.enumCases&&e.enumCases.length>0}function uo(e){return null==e.generics?e:new zr(e.fullname,e.generics.map((()=>Qr)))}function lo(e){var n;return null===(n=e.generics)||void 0===n?void 0:n[0]}function co(e){if(so(e)&&null!=e.enumCases)return e.enumCases.map((e=>e[1]));throw new Error(`${e.fullname} is not an enum type`)}function ao(e,n){const t=parseInt(n,10);return function(e,n){if(null!=e.enumCases){if("string"==typeof n){for(const t of e.enumCases)if(t[0]===n)return t;throw new Error(`'${n}' was not found in ${e.fullname}`)}for(const t of e.enumCases)if(t[1]===n)return t;return["",n]}throw new Error(`${e.fullname} is not an enum type`)}(e,isNaN(t)?n:t)[1]}function fo(e){if(null!=e.cases)return e.cases();throw new Error(`${e.fullname} is not an F# union type`)}function ho(e){if(null!=e.fields)return e.fields();throw new Error(`${e.fullname} is not an F# record type`)}function mo(e){if(go(e)&&null!=e.generics)return e.generics;throw new Error(`${e.fullname} is not a tuple type`)}function po(e){return e instanceof zr?null!=e.cases:e instanceof bn}function wo(e){return e instanceof zr?null!=e.fields:e instanceof xn}function go(e){return e.fullname.startsWith("System.Tuple")}function _o(e){return null==e.fields?[]:e.fields}new zr("System.Boolean"),new zr("System.SByte"),new zr("System.Byte"),new zr("System.Int16"),new zr("System.UInt16"),new zr("System.Int32"),new zr("System.UInt32"),new zr("System.Single"),new zr("System.Double"),new zr("System.Decimal");class yo extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Ok","Error"]}}function vo(e,n){return 0===n.tag?new yo(0,e(n.fields[0])):new yo(1,n.fields[0])}class Co extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["BadPrimitive","BadPrimitiveExtra","BadType","BadField","BadPath","TooSmallArray","FailMessage","BadOneOf"]}}class bo extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["PascalCase","CamelCase","SnakeCase"]}}class xo{constructor(){this.cache=new Map([])}}function So(){return new xo}function Eo(e){return e.slice(void 0,1).toLowerCase()+e.slice(1,e.length)}function Ao(e,n){switch(e.tag){case 2:return function(e,n,t,r,o=0){if("string"==typeof e){const t=e;e=function(e,n=0){if(0!=(-284&n))throw new Error("RegexOptions only supports: IgnoreCase, Multiline, Compiled, Singleline and ECMAScript");let t="gu";return t+=1&n?"i":"",t+=2&n?"m":"",t+=16&n?"s":"",new RegExp(e,t)}(n,null!=r?r:0),n=t,r=void 0}if("function"==typeof t)return r=null==r?-1:r,n.substring(0,o)+n.substring(o).replace(e,(function(){let e=arguments[0];if(r){r--;const n=[],o=arguments.length,i="string"!=typeof arguments[o-1];let s=i?o-3:o-2;for(let e=0;e<s;e++)n.push(arguments[e]);n.index=arguments[s++],n.input=arguments[s++],i&&(n.groups=arguments[s]),e=t(n)}return e}));if(t=t.replace(/\$0/g,(e=>"$&")).replace(/\${([^}]+)}/g,"$<$1>"),null!=r){let i;const s=n.substring(o),u=qn(e,s),l=qn.length>r?(i=u[r-1],s.substring(0,i.index+i[0].length)):s;return n.substring(0,o)+l.replace(e,t)+n.substring(o+l.length)}return n.replace(e,t)}(Eo(n),"[A-Z]","_$0").toLowerCase();case 0:return n;default:return Eo(n)}}So(),So();const ko=/^[\(\{]{0,2}[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[\)\}]{0,2}$/,Io=/^([0-9a-f]{8})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{12})$/,To=/^\{0x[0-9a-f]{8},(0x[0-9a-f]{4},){2}\{(0x[0-9a-f]{2},){7}0x[0-9a-f]{2}\}\}$/;function No(e,n){try{return n.contents=function(e){function n(e){return e.replace(Io,"$1-$2-$3-$4-$5")}const t=e.trim().toLowerCase();if(ko.test(t))return function(e,...n){if(0===n.length)return e.trim();const t="["+Wn(n.join(""))+"]+";return e.replace(new RegExp("^"+t),"").replace(new RegExp(t+"$"),"")}(t,"{","}","(",")");if(Io.test(t))return n(t);if(To.test(t))return n(t.replace(/[\{\},]|0x/g,""));throw new Error("Guid should contain 32 digits with 4 dashes: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")}(e),!0}catch(e){return!1}}var Oo;function Mo(e,n){switch(n){case 8:return e?[0,255]:[-128,127];case 16:return e?[0,65535]:[-32768,32767];case 32:return e?[0,4294967295]:[-2147483648,2147483647];default:throw new Error("Invalid bit size.")}}function Do(e,n,t,r,o){try{return o.contents=function(e,n,t,r,o){const i=function(e,n,t){const r=/^\s*([\+\-])?(0[xXoObB])?([0-9a-fA-F]+)\s*$/.exec(e.replace(/_/g,""));if(null!=r){const[,,e,o]=r;t=t||function(e,n){if(n&Oo.AllowHexSpecifier)return 16;switch(e){case"0b":case"0B":return 2;case"0o":case"0O":return 8;case"0x":case"0X":return 16;default:return 10}}(e,n);const i=function(e){switch(e){case 2:return/[^0-1]/;case 8:return/[^0-7]/;case 10:return/[^0-9]/;case 16:return/[^0-9a-fA-F]/;default:throw new Error("Invalid Base.")}}(t);if(!i.test(o))return function(e,n){const[,t,r,o]=e;return{sign:t||"",prefix:r||"",digits:o,radix:n}}(r,t)}return null}(e,n,void 0);if(null!=i){let e=Number.parseInt(i.sign+i.digits,i.radix);if(!Number.isNaN(e)){const[n,o]=Mo(!0,r);!t&&10!==i.radix&&e>=n&&e<=o&&(e=e<<32-r>>32-r);const[s,u]=Mo(t,r);if(e>=s&&e<=u)return e}}throw new Error("Input string was not in a correct format.")}(e,n,t,r),!0}catch(e){return!1}}function Uo(e,n){!function(e){if(null!=e&&0!==e){if(e%6e4!=0)throw new Error("Offset must be specified in whole minutes.");if(Math.abs(e/36e5)>14)throw new Error("Offset must be within plus or minus 14 hours.")}}(n);const t=new Date(e);return t.offset=null!=n?n:-6e4*(new Date).getTimezoneOffset(),t}function Po(e,n){try{return n.contents=function(e){const[n,t]=Rn(e),r=null==t?-6e4*n.getTimezoneOffset():"Z"===t?0:6e4*t;return Uo(n.getTime(),r)}(e),!0}catch(e){return!1}}!function(e){e[e.AllowHexSpecifier=512]="AllowHexSpecifier"}(Oo||(Oo={}));var Fo=null;try{Fo=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(u){}function Ro(e,n,t){this.low=0|e,this.high=0|n,this.unsigned=!!t}function $o(e){return!0===(e&&e.__isLong__)}Ro.prototype.GetHashCode=function(){let e=this.unsigned?1:0;return e=(e<<5)+e^this.high,e=(e<<5)+e^this.low,e},Ro.prototype.Equals=function(e){return fi(this,e)},Ro.prototype.CompareTo=function(e){return pi(this,e)},Ro.prototype.toString=function(e){return ui(this,e)},Ro.prototype.toJSON=function(){return ui(this)},Ro.prototype[Gn]=function(){const e=this;return{multiply:n=>yi(e,n),toPrecision:n=>String(e)+(0).toPrecision(n).substr(1),toExponential:n=>String(e)+(0).toExponential(n).substr(1),toFixed:n=>String(e)+(0).toFixed(n).substr(1),toHex:()=>{return ui(e.unsigned?e:function(e,n,t){return t?function(e,n){return new Ro(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,n)}(e,n):function(e,n){return new Ro(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],n)}(e,n)}((n=e,t?function(e){var n=e.high,t=e.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&n,n>>>8&255,n>>>16&255,n>>>24]}(n):function(e){var n=e.high,t=e.low;return[n>>>24,n>>>16&255,n>>>8&255,255&n,t>>>24,t>>>16&255,t>>>8&255,255&t]}(n)),!0),16);var n,t}}},Ro.prototype.__isLong__,Object.defineProperty(Ro.prototype,"__isLong__",{value:!0});var Go={},Ho={};function jo(e,n){var t,r,o;return n?(o=0<=(e>>>=0)&&e<256)&&(r=Ho[e])?r:(t=Bo(e,(0|e)<0?-1:0,!0),o&&(Ho[e]=t),t):(o=-128<=(e|=0)&&e<128)&&(r=Go[e])?r:(t=Bo(e,e<0?-1:0,!1),o&&(Go[e]=t),t)}function Lo(e,n){if(isNaN(e))return n?Ko:Xo;if(n){if(e<0)return Ko;if(e>=Zo)return ri}else{if(e<=-Jo)return oi;if(e+1>=Jo)return ti}return e<0?wi(Lo(-e,n)):Bo(e%qo|0,e/qo|0,n)}function Bo(e,n,t){return new Ro(e,n,t)}var Vo=Math.pow;function zo(e,n,t){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return Xo;if("number"==typeof n?(t=n,n=!1):n=!!n,(t=t||10)<2||36<t)throw RangeError("radix");var r=e.indexOf("-");if(r>0)throw Error("interior hyphen");if(0===r)return wi(zo(e.substring(1),n,t));for(var o=Lo(Vo(t,8)),i=Xo,s=0;s<e.length;s+=8){var u=Math.min(8,e.length-s),l=parseInt(e.substring(s,s+u),t);i=gi(u<8?yi(i,Lo(Vo(t,u))):i=yi(i,o),Lo(l))}return i.unsigned=n,i}function Wo(e,n){return"number"==typeof e?Lo(e,n):"string"==typeof e?zo(e,n):Bo(e.low,e.high,"boolean"==typeof n?n:e.unsigned)}var qo=4294967296,Zo=qo*qo,Jo=Zo/2,Yo=jo(1<<24),Xo=jo(0),Ko=jo(0,!0),Qo=jo(1),ei=jo(1,!0),ni=jo(-1),ti=Bo(-1,2147483647,!1),ri=Bo(-1,-1,!0),oi=Bo(0,-2147483648,!1);function ii(e){return e.unsigned?e.low>>>0:e.low}function si(e){return e.unsigned?(e.high>>>0)*qo+(e.low>>>0):e.high*qo+(e.low>>>0)}function ui(e,n){if((n=n||10)<2||36<n)throw RangeError("radix");if(li(e))return"0";if(ci(e)){if(fi(e,oi)){var t=Lo(n),r=vi(e,t),o=_i(yi(r,t),e);return ui(r,n)+ii(o).toString(n)}return"-"+ui(wi(e),n)}for(var i=Lo(Vo(n,6),e.unsigned),s=e,u="";;){var l=vi(s,i),c=(ii(_i(s,yi(l,i)))>>>0).toString(n);if(li(s=l))return c+u;for(;c.length<6;)c="0"+c;u=""+c+u}}function li(e){return 0===e.high&&0===e.low}function ci(e){return!e.unsigned&&e.high<0}function ai(e){return 1==(1&e.low)}function fi(e,n){return $o(n)||(n=Wo(n)),(e.unsigned===n.unsigned||e.high>>>31!=1||n.high>>>31!=1)&&e.high===n.high&&e.low===n.low}function di(e,n){return pi(e,n)<0}function hi(e,n){return pi(e,n)>0}function mi(e,n){return pi(e,n)>=0}function pi(e,n){if($o(n)||(n=Wo(n)),fi(e,n))return 0;var t=ci(e),r=ci(n);return t&&!r?-1:!t&&r?1:e.unsigned?n.high>>>0>e.high>>>0||n.high===e.high&&n.low>>>0>e.low>>>0?-1:1:ci(_i(e,n))?-1:1}function wi(e){return!e.unsigned&&fi(e,oi)?oi:gi(function(e){return Bo(~e.low,~e.high,e.unsigned)}(e),Qo)}function gi(e,n){$o(n)||(n=Wo(n));var t=e.high>>>16,r=65535&e.high,o=e.low>>>16,i=65535&e.low,s=n.high>>>16,u=65535&n.high,l=n.low>>>16,c=0,a=0,f=0,d=0;return f+=(d+=i+(65535&n.low))>>>16,a+=(f+=o+l)>>>16,c+=(a+=r+u)>>>16,c+=t+s,Bo((f&=65535)<<16|(d&=65535),(c&=65535)<<16|(a&=65535),e.unsigned)}function _i(e,n){return $o(n)||(n=Wo(n)),gi(e,wi(n))}function yi(e,n){if(li(e))return e.unsigned?Ko:Xo;if($o(n)||(n=Wo(n)),Fo)return Bo(Fo.mul(e.low,e.high,n.low,n.high),Fo.get_high(),e.unsigned);if(li(n))return e.unsigned?Ko:Xo;if(fi(e,oi))return ai(n)?oi:Xo;if(fi(n,oi))return ai(e)?oi:Xo;if(ci(e))return ci(n)?yi(wi(e),wi(n)):wi(yi(wi(e),n));if(ci(n))return wi(yi(e,wi(n)));if(di(e,Yo)&&di(n,Yo))return Lo(si(e)*si(n),e.unsigned);var t=e.high>>>16,r=65535&e.high,o=e.low>>>16,i=65535&e.low,s=n.high>>>16,u=65535&n.high,l=n.low>>>16,c=65535&n.low,a=0,f=0,d=0,h=0;return d+=(h+=i*c)>>>16,f+=(d+=o*c)>>>16,d&=65535,f+=(d+=i*l)>>>16,a+=(f+=r*c)>>>16,f&=65535,a+=(f+=o*l)>>>16,f&=65535,a+=(f+=i*u)>>>16,a+=t*c+r*l+o*u+i*s,Bo((d&=65535)<<16|(h&=65535),(a&=65535)<<16|(f&=65535),e.unsigned)}function vi(e,n){if($o(n)||(n=Wo(n)),li(n))throw Error("division by zero");var t,r,o;if(Fo)return e.unsigned||-2147483648!==e.high||-1!==n.low||-1!==n.high?Bo((e.unsigned?Fo.div_u:Fo.div_s)(e.low,e.high,n.low,n.high),Fo.get_high(),e.unsigned):e;if(li(e))return e.unsigned?Ko:Xo;if(e.unsigned){if(n.unsigned||(n=function(e){return e.unsigned?e:Bo(e.low,e.high,!0)}(n)),hi(n,e))return Ko;if(hi(n,function(e,n){if($o(n)&&(n=ii(n)),0==(n&=63))return e;var t=e.high;return n<32?Bo(e.low>>>n|t<<32-n,t>>>n,e.unsigned):Bo(32===n?t:t>>>n-32,0,e.unsigned)}(e,1)))return ei;o=Ko}else{if(fi(e,oi))return fi(n,Qo)||fi(n,ni)?oi:fi(n,oi)?Qo:fi(t=function(e,n){return $o(n)&&(n=ii(n)),0==(n&=63)?e:n<32?Bo(e.low<<n,e.high<<n|e.low>>>32-n,e.unsigned):Bo(0,e.low<<n-32,e.unsigned)}(vi(function(e,n){return $o(n)&&(n=ii(n)),0==(n&=63)?e:n<32?Bo(e.low>>>n|e.high<<32-n,e.high>>n,e.unsigned):Bo(e.high>>n-32,e.high>=0?0:-1,e.unsigned)}(e,1),n),1),Xo)?ci(n)?Qo:ni:o=gi(t,vi(r=_i(e,yi(n,t)),n));if(fi(n,oi))return e.unsigned?Ko:Xo;if(ci(e))return ci(n)?vi(wi(e),wi(n)):wi(vi(wi(e),n));if(ci(n))return wi(vi(e,wi(n)));o=Xo}for(r=e;mi(r,n);){t=Math.max(1,Math.floor(si(r)/si(n)));for(var i=Math.ceil(Math.log(t)/Math.LN2),s=i<=48?1:Vo(2,i-48),u=Lo(t),l=yi(u,n);ci(l)||hi(l,r);)l=yi(u=Lo(t-=s,e.unsigned),n);li(u)&&(u=Qo),o=gi(o,u),r=_i(r,l)}return o}const Ci=vi,bi=si;function xi(e){return e<0?Math.ceil(e):Math.floor(e)}function Si(e=0,n=0,t=0,r=0,o=0){switch(arguments.length){case 1:return Ei(arguments[0]);case 3:e=0,n=arguments[0],t=arguments[1],r=arguments[2],o=0}return 864e5*e+36e5*n+6e4*t+1e3*r+o}function Ei(e){return bi(Ci(e,1e4))}function Ai(e,n){try{return n.contents=function(e){const n=e.search("\\."),t=e.search("\\:");if(-1===n&&-1===t){const n=parseInt(e,0);if(isNaN(n))throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`);return Si(n,0,0,0,0)}if(t>0){const n=/^(-?)((\d+)\.)?(?:0*)([0-9]|0[0-9]|1[0-9]|2[0-3]):(?:0*)([0-5][0-9]|[0-9])(:(?:0*)([0-5][0-9]|[0-9]))?\.?(\d+)?$/.exec(e);if(null!=n&&null!=n[4]&&null!=n[5]){let t=0,r=0,o=0;const i=null!=n[1]&&"-"===n[1]?-1:1,s=+n[4],u=+n[5];if(null!=n[3]&&(t=+n[3]),null!=n[7]&&(o=+n[7]),null!=n[8])switch(n[8].length){case 1:r=100*+n[8];break;case 2:r=10*+n[8];break;case 3:r=+n[8];break;case 4:r=+n[8]/10;break;case 5:r=+n[8]/100;break;case 6:r=+n[8]/1e3;break;case 7:r=+n[8]/1e4;break;default:throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}return i*Si(t,s,u,o,r)}}throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}(e),!0}catch(e){return!1}}class ki{constructor(e){this.k=e}}function Ii(e){return new ki(e)}function Ti(e){return e.k}class Ni extends ki{constructor(e,n,t,r){super(e),this.left=n,this.right=t,this.h=0|r}}function Oi(e,n,t,r){return new Ni(e,n,t,r)}function Mi(e){return e.left}function Di(e){return e.right}function Ui(e){return e.h}function Pi(e,n){e:for(;;){const t=e,r=n;if(null!=t){const o=t;if(o instanceof Ni){e=Mi(o),n=Pi(Di(o),r+1);continue e}return r+1|0}return 0|r}}function Fi(e){return Pi(e,0)}function Ri(e,n,t){let r,o;if(null!=e){const n=e;r=n instanceof Ni?Ui(n):1}else r=0;if(null!=t){const e=t;o=e instanceof Ni?Ui(e):1}else o=0;const i=0|(r<o?o:r);return 0===i?Ii(n):Oi(n,e,t,i+1)}function $i(e,n,t){let r,o,i,s,u,l;if(null!=e){const n=e;u=n instanceof Ni?Ui(n):1}else u=0;if(null!=t){const e=t;l=e instanceof Ni?Ui(e):1}else l=0;if(l>u+2){const i=In(t);if(i instanceof Ni){if(r=Mi(i),(null!=r?(o=r,o instanceof Ni?Ui(o):1):0)>u+1){const t=In(Mi(i));if(t instanceof Ni)return Ri(Ri(e,n,Mi(t)),Ti(t),Ri(Di(t),Ti(i),Di(i)));throw new Error("internal error: Set.rebalance")}return Ri(Ri(e,n,Mi(i)),Ti(i),Di(i))}throw new Error("internal error: Set.rebalance")}if(u>l+2){const r=In(e);if(r instanceof Ni){if(i=Di(r),(null!=i?(s=i,s instanceof Ni?Ui(s):1):0)>l+1){const e=In(Di(r));if(e instanceof Ni)return Ri(Ri(Mi(r),Ti(r),Mi(e)),Ti(e),Ri(Di(e),n,t));throw new Error("internal error: Set.rebalance")}return Ri(Mi(r),Ti(r),Ri(Di(r),n,t))}throw new Error("internal error: Set.rebalance")}return Ri(e,n,t)}function Gi(e,n,t){if(null!=t){const r=t,o=0|e.Compare(n,Ti(r));if(r instanceof Ni)return o<0?$i(Gi(e,n,Mi(r)),Ti(r),Di(r)):0===o?t:$i(Mi(r),Ti(r),Gi(e,n,Di(r)));{const o=0|e.Compare(n,Ti(r));return o<0?Oi(n,void 0,t,2):0===o?t:Oi(n,t,void 0,2)}}return Ii(n)}function Hi(e,n,t){e:for(;;){const r=e,o=n,i=t;if(null!=i){const s=i,u=0|r.Compare(o,Ti(s));if(s instanceof Ni){if(u<0){e=r,n=o,t=Mi(s);continue e}if(0===u)return!0;e=r,n=o,t=Di(s);continue e}return 0===u}return!1}}function ji(e,n){e:for(;;){const t=e,r=n;if(null!=r){const o=r;if(o instanceof Ni){ji(t,Mi(o)),t(Ti(o)),e=t,n=Di(o);continue e}t(Ti(o))}break}}class Li extends xn{constructor(e,n){super(),this.stack=e,this.started=n}}function Bi(e){e:for(;;){const n=e;if(xt(n))return vt();{const t=St(n),r=Et(n);if(null!=t){const o=t;if(o instanceof Ni){e=Nt([Mi(o),Ii(Ti(o)),Di(o)],r);continue e}return n}e=r;continue e}}}function Vi(e){return new Li(Bi(bt(e)),!1)}function zi(e){if(e.started){const n=e.stack;if(xt(n))return function(){throw new Error("Enumeration already started")}();if(null!=St(n))return Ti(St(n));throw new Error("Please report error: Set iterator, unexpected stack for current")}return function(){throw new Error("Enumeration not started")}()}function Wi(e){let n=Vi(e);return{"System.Collections.Generic.IEnumerator`1.get_Current":()=>zi(n),"System.Collections.IEnumerator.get_Current":()=>zi(n),"System.Collections.IEnumerator.MoveNext":()=>function(e){if(e.started){const n=e.stack;if(xt(n))return!1;if(null!=St(n)){if(St(n)instanceof Ni)throw new Error("Please report error: Set iterator, unexpected stack for moveNext");return e.stack=Bi(Et(n)),!xt(e.stack)}throw new Error("Please report error: Set iterator, unexpected stack for moveNext")}return e.started=!0,!xt(e.stack)}(n),"System.Collections.IEnumerator.Reset"(){n=Vi(e)},Dispose(){}}}function qi(e,n,t){return null==n?null==t?0:-1:null==t?1:0|function(e,n,t){e:for(;;){const r=e,o=n,i=t,s=[o,i];if(xt(s[0]))return xt(s[1])?0:-1;if(xt(s[1]))return 1;if(null!=St(s[1]))if(null!=St(s[0])){const u=St(s[0]),l=St(s[1]);if(u instanceof Ni)if(null==Mi(u)){if(!(l instanceof Ni)){const o=0|r.Compare(Ti(u),Ti(l));if(0!==o)return 0|o;e=r,n=Ct(Di(u),Et(s[0])),t=Ct(void 0,Et(s[1]));continue e}if(null==Mi(l)){const o=0|r.Compare(Ti(u),Ti(l));if(0!==o)return 0|o;e=r,n=Ct(Di(u),Et(s[0])),t=Ct(Di(l),Et(s[1]));continue e}{const s=[o,i];let u,l,c,a,f;switch(xt(s[0])?xt(s[1])?u=2:null!=St(s[1])?(u=1,a=Et(s[1]),f=St(s[1])):u=2:null!=St(s[0])?(u=0,l=Et(s[0]),c=St(s[0])):xt(s[1])?u=2:null!=St(s[1])?(u=1,a=Et(s[1]),f=St(s[1])):u=2,u){case 0:if(c instanceof Ni){e=r,n=Nt([Mi(c),Oi(Ti(c),void 0,Di(c),0)],l),t=i;continue e}e=r,n=Nt([void 0,Ii(Ti(c))],l),t=i;continue e;case 1:if(f instanceof Ni){e=r,n=o,t=Nt([Mi(f),Oi(Ti(f),void 0,Di(f),0)],a);continue e}e=r,n=o,t=Nt([void 0,Ii(Ti(f))],a);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}}else{const s=[o,i];let u,l,c,a,f;switch(xt(s[0])?xt(s[1])?u=2:null!=St(s[1])?(u=1,a=Et(s[1]),f=St(s[1])):u=2:null!=St(s[0])?(u=0,l=Et(s[0]),c=St(s[0])):xt(s[1])?u=2:null!=St(s[1])?(u=1,a=Et(s[1]),f=St(s[1])):u=2,u){case 0:if(c instanceof Ni){e=r,n=Nt([Mi(c),Oi(Ti(c),void 0,Di(c),0)],l),t=i;continue e}e=r,n=Nt([void 0,Ii(Ti(c))],l),t=i;continue e;case 1:if(f instanceof Ni){e=r,n=o,t=Nt([Mi(f),Oi(Ti(f),void 0,Di(f),0)],a);continue e}e=r,n=o,t=Nt([void 0,Ii(Ti(f))],a);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}else{if(!(l instanceof Ni)){const o=0|r.Compare(Ti(u),Ti(l));if(0!==o)return 0|o;e=r,n=Et(s[0]),t=Et(s[1]);continue e}if(null==Mi(l)){const o=0|r.Compare(Ti(u),Ti(l));if(0!==o)return 0|o;e=r,n=Ct(void 0,Et(s[0])),t=Ct(Di(l),Et(s[1]));continue e}{const s=[o,i];let u,l,c,a,f;switch(xt(s[0])?xt(s[1])?u=2:null!=St(s[1])?(u=1,a=Et(s[1]),f=St(s[1])):u=2:null!=St(s[0])?(u=0,l=Et(s[0]),c=St(s[0])):xt(s[1])?u=2:null!=St(s[1])?(u=1,a=Et(s[1]),f=St(s[1])):u=2,u){case 0:if(c instanceof Ni){e=r,n=Nt([Mi(c),Oi(Ti(c),void 0,Di(c),0)],l),t=i;continue e}e=r,n=Nt([void 0,Ii(Ti(c))],l),t=i;continue e;case 1:if(f instanceof Ni){e=r,n=o,t=Nt([Mi(f),Oi(Ti(f),void 0,Di(f),0)],a);continue e}e=r,n=o,t=Nt([void 0,Ii(Ti(f))],a);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}}}else{St(s[1]);const u=[o,i];let l,c,a,f,d;switch(xt(u[0])?xt(u[1])?l=2:null!=St(u[1])?(l=1,f=Et(u[1]),d=St(u[1])):l=2:null!=St(u[0])?(l=0,c=Et(u[0]),a=St(u[0])):xt(u[1])?l=2:null!=St(u[1])?(l=1,f=Et(u[1]),d=St(u[1])):l=2,l){case 0:if(a instanceof Ni){e=r,n=Nt([Mi(a),Oi(Ti(a),void 0,Di(a),0)],c),t=i;continue e}e=r,n=Nt([void 0,Ii(Ti(a))],c),t=i;continue e;case 1:if(d instanceof Ni){e=r,n=o,t=Nt([Mi(d),Oi(Ti(d),void 0,Di(d),0)],f);continue e}e=r,n=o,t=Nt([void 0,Ii(Ti(d))],f);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}else{if(null==St(s[0])){e=r,n=Et(s[0]),t=Et(s[1]);continue e}{St(s[0]);const u=[o,i];let l,c,a,f,d;switch(xt(u[0])?xt(u[1])?l=2:null!=St(u[1])?(l=1,f=Et(u[1]),d=St(u[1])):l=2:null!=St(u[0])?(l=0,c=Et(u[0]),a=St(u[0])):xt(u[1])?l=2:null!=St(u[1])?(l=1,f=Et(u[1]),d=St(u[1])):l=2,l){case 0:if(a instanceof Ni){e=r,n=Nt([Mi(a),Oi(Ti(a),void 0,Di(a),0)],c),t=i;continue e}e=r,n=Nt([void 0,Ii(Ti(a))],c),t=i;continue e;case 1:if(d instanceof Ni){e=r,n=o,t=Nt([Mi(d),Oi(Ti(d),void 0,Di(d),0)],f);continue e}e=r,n=o,t=Nt([void 0,Ii(Ti(d))],f);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}}break}}(e,bt(n),bt(t))}function Zi(e,n,t){let r=t;ji((e=>{n[r]=e,r=r+1|0}),e)}function Ji(e,n){if(Be(n))return function(e,n){return ft(((n,t)=>Gi(e,t,n)),void 0,n)}(e,n);if(n instanceof ht)return function(e,n){return kt(((n,t)=>Gi(e,t,n)),void 0,n)}(e,n);{const t=Je(n);try{return function(e,n,t){for(;;){const r=e,o=n,i=t;if(!i["System.Collections.IEnumerator.MoveNext"]())return o;e=r,n=Gi(r,i["System.Collections.Generic.IEnumerator`1.get_Current"](),o),t=i}}(e,void 0,t)}finally{We(t)}}}class Yi{constructor(e,n){this.comparer=e,this.tree=n}GetHashCode(){return 0|function(e){let n,t=0;const r=Je(e);try{for(;r["System.Collections.IEnumerator.MoveNext"]();)t=0|(n=0|sn(r["System.Collections.Generic.IEnumerator`1.get_Current"]()),(t<<1)+n+631)}finally{We(r)}return 0|Math.abs(t)}(this)}Equals(e){return e instanceof Yi&&0===qi(Xi(this),Ki(this),Ki(e))}toString(){return"set ["+rt("; ",er((e=>Cn(e)),this))+"]"}get[Symbol.toStringTag](){return"FSharpSet"}toJSON(e){return Array.from(this)}CompareTo(e){return 0|qi(Xi(this),Ki(this),Ki(e))}"System.Collections.Generic.ICollection`1.Add2B595"(e){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Clear"(){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Remove2B595"(e){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Contains2B595"(e){return Hi(Xi(this),e,Ki(this))}"System.Collections.Generic.ICollection`1.CopyToZ2E171D71"(e,n){Zi(Ki(this),e,n)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return 0|Qi(this)}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return 0|Qi(this)}GetEnumerator(){return Wi(Ki(this))}[Symbol.iterator](){return Ye(this.GetEnumerator())}"System.Collections.IEnumerable.GetEnumerator"(){return Wi(Ki(this))}get size(){return 0|Qi(this)}add(e){throw new Error("Set cannot be mutated")}clear(){throw new Error("Set cannot be mutated")}delete(e){throw new Error("Set cannot be mutated")}has(e){return function(e,n){return Hi(Xi(e),n,Ki(e))}(this,e)}keys(){return er((e=>e),this)}values(){return er((e=>e),this)}entries(){return er((e=>[e,e]),this)}forEach(e,n){const t=this;Qt((n=>{e(n,n,t)}),t)}}function Xi(e){return e.comparer}function Ki(e){return e.tree}function Qi(e){return Fi(Ki(e))}function es(e,n,t){try{return"Expecting "+e+" but instead got:"+(t?"\n":" ")+JSON.stringify(n,null,4)}catch(n){return"Expecting "+e+" but decoder failed. Couldn't report given value due to circular structure."+(t?"\n":" ")}}function ns(e,n,t){const r=n(e,t);if(1===r.tag){const e=r.fields[0];return new yo(1,function(e,n){const t=2===n.tag?es(n.fields[0],n.fields[1],!0):1===n.tag?es(n.fields[0],n.fields[1],!1)+"\nReason: "+n.fields[2]:3===n.tag?es(n.fields[0],n.fields[1],!0):4===n.tag?es(n.fields[0],n.fields[1],!0)+"\nNode `"+n.fields[2]+"` is unkown.":5===n.tag?"Expecting "+n.fields[0]+".\n"+JSON.stringify(n.fields[1],null,4):7===n.tag?"The following errors were found:\n\n"+rt("\n\n",n.fields[0]):6===n.tag?"The following `failure` occurred with the decoder: "+n.fields[0]:es(n.fields[0],n.fields[1],!1);return 7===n.tag?t:"Error at: `"+e+"`\n"+t}(e[0],e[1]))}return new yo(0,r.fields[0])}function ts(e,n){try{return ns("$",e,JSON.parse(n))}catch(e){if(e instanceof SyntaxError)return new yo(1,"Given an invalid JSON: "+e.message);throw e}}function rs(e,n){return"string"==typeof n?new yo(0,n):new yo(1,[e,new Co(0,"a string",n)])}const os=e=>n=>{const t="a sbyte",r=e,o=n;if("number"==typeof o){const e=o;return isFinite(e)&&Math.floor(e)===e?-128<=e&&e<=127?new yo(0,(e+128&255)-128):new yo(1,[r,new Co(1,t,e,"Value was either too large or too small for a sbyte")]):new yo(1,[r,new Co(1,t,e,"Value is not an integral value")])}if("string"==typeof o){let e,n=0;return e=[Do(o,511,!1,8,new Sn((()=>n),(e=>{n=0|e}))),n],e[0]?new yo(0,e[1]):new yo(1,[r,new Co(0,t,o)])}return new yo(1,[r,new Co(0,t,o)])},is=e=>n=>{const t="a byte",r=e,o=n;if("number"==typeof o){const e=o;return isFinite(e)&&Math.floor(e)===e?0<=e&&e<=255?new yo(0,255&e):new yo(1,[r,new Co(1,t,e,"Value was either too large or too small for a byte")]):new yo(1,[r,new Co(1,t,e,"Value is not an integral value")])}if("string"==typeof o){let e,n=0;return e=[Do(o,511,!0,8,new Sn((()=>n),(e=>{n=e}))),n],e[0]?new yo(0,e[1]):new yo(1,[r,new Co(0,t,o)])}return new yo(1,[r,new Co(0,t,o)])},ss=e=>n=>{const t="an int16",r=e,o=n;if("number"==typeof o){const e=o;return isFinite(e)&&Math.floor(e)===e?-32768<=e&&e<=32767?new yo(0,(e+32768&65535)-32768):new yo(1,[r,new Co(1,t,e,"Value was either too large or too small for "+t)]):new yo(1,[r,new Co(1,t,e,"Value is not an integral value")])}if("string"==typeof o){let e,n=0;return e=[Do(o,511,!1,16,new Sn((()=>n),(e=>{n=0|e}))),n],e[0]?new yo(0,e[1]):new yo(1,[r,new Co(0,t,o)])}return new yo(1,[r,new Co(0,t,o)])},us=e=>n=>{const t="an uint16",r=e,o=n;if("number"==typeof o){const e=o;return isFinite(e)&&Math.floor(e)===e?0<=e&&e<=65535?new yo(0,65535&e):new yo(1,[r,new Co(1,t,e,"Value was either too large or too small for "+t)]):new yo(1,[r,new Co(1,t,e,"Value is not an integral value")])}if("string"==typeof o){let e,n=0;return e=[Do(o,511,!0,16,new Sn((()=>n),(e=>{n=e}))),n],e[0]?new yo(0,e[1]):new yo(1,[r,new Co(0,t,o)])}return new yo(1,[r,new Co(0,t,o)])},ls=e=>n=>{const t="an int",r=e,o=n;if("number"==typeof o){const e=o;return isFinite(e)&&Math.floor(e)===e?-2147483648<=e&&e<=2147483647?new yo(0,~~e):new yo(1,[r,new Co(1,t,e,"Value was either too large or too small for an int")]):new yo(1,[r,new Co(1,t,e,"Value is not an integral value")])}if("string"==typeof o){let e,n=0;return e=[Do(o,511,!1,32,new Sn((()=>n),(e=>{n=0|e}))),n],e[0]?new yo(0,e[1]):new yo(1,[r,new Co(0,t,o)])}return new yo(1,[r,new Co(0,t,o)])},cs=e=>n=>{const t="an uint32",r=e,o=n;if("number"==typeof o){const e=o;return isFinite(e)&&Math.floor(e)===e?0<=e&&e<=4294967295?new yo(0,e>>>0):new yo(1,[r,new Co(1,t,e,"Value was either too large or too small for "+t)]):new yo(1,[r,new Co(1,t,e,"Value is not an integral value")])}if("string"==typeof o){let e,n=0;return e=[Do(o,511,!0,32,new Sn((()=>n),(e=>{n=e}))),n],e[0]?new yo(0,e[1]):new yo(1,[r,new Co(0,t,o)])}return new yo(1,[r,new Co(0,t,o)])};function as(e,n,t,r){let o;const i=t+".["+en(e)+"]";if(Array.isArray(r)){const t=r;return e<t.length?n(i,t[e]):new yo(1,[i,new Co(5,"a longer array. Need index `"+en(e)+"` but there are only `"+(o=t.length,en(o)+"` entries"),r)])}return new yo(1,[i,new Co(0,"an array",r)])}function fs(e,n,t){if(Array.isArray(t)){let r=-1;return vo(It,ft(((t,o)=>{if(r=r+1|0,0===t.tag){const i=e(n+".["+en(r)+"]",o);return 0===i.tag?new yo(0,Ct(i.fields[0],t.fields[0])):new yo(1,i.fields[0])}return t}),new yo(0,vt()),t))}return new yo(1,[n,new Co(0,"a list",t)])}function ds(e,n,t){if(Array.isArray(t)){let r=-1;const o=t;return ft(((t,o)=>{if(r=r+1|0,0===t.tag){const i=t.fields[0],s=e(n+".["+en(r)+"]",o);return 0===s.tag?(i[r]=s.fields[0],new yo(0,i)):new yo(1,s.fields[0])}return t}),new yo(0,ct(new Array(o.length),0,o.length,null)),o)}return new yo(1,[n,new Co(0,"an array",t)])}function hs(e,n,t,r){const o=n(t,r);return 0===o.tag?e(o.fields[0],t,r):new yo(1,o.fields[0])}function ms(e,n){let t;const r=e;return t=e=>n=>as(0,r,e,n),e=>r=>hs(_n(3,(e=>{let t;const r=n;return t=e=>n=>as(1,r,e,n),n=>r=>hs(((n,t,r)=>new yo(0,[e,n])),_n(2,t),n,r)})),_n(2,t),e,r)}function ps(e){return Pr(e)}function ws(e){return function(e,n){return new Yi(e,n)}(n={Compare:mn},Ji(n,e));var n}function gs(e,n,t,r){let o;const i=n.length+e|0;if(i!==r.length)return new yo(1,[t,new Co(6,(o=0|r.length,Qn(Xn("Expected array of length %i but got %i"))(i)(o)))]);{let o=new yo(0,vt());for(let i=e;i<=r.length-1;i++)if(0===o.tag){const s=o.fields[0],u=Qn(Xn("%s[%i]"))(t)(i),l=n[i-e],c=r[i];o=vo((e=>Ct(e,s)),l(u)(c))}return vo(It,o)}}function _s(e,n,t,r,o,i){const s=function(e,n){return n.find((e=>no(e)===r))}(0,fo(t));if(null!=s){const t=s,r=at((t=>vs(e,n,!1,t[1])),_o(t));return vo((e=>function(e,n){const t=(e.fields||[]).length;if(n.length!==t)throw new Error(`Expected an array of length ${t} but got ${n.length}`);return null!=e.declaringType.construct?new e.declaringType.construct(e.tag,...n):{}}(t,At(e))),0===r.length&&i.length<=1?new yo(0,vt()):gs(1,r,o,i))}return new yo(1,[o,new Co(6,"Cannot find case "+r+" in "+to(t))])}function ys(e,n,t,r){const o=new Sn(null);let i;const s=to(r);let u;if(i=""===s?e:Hr(s,o,e),wo(r)){const e=at((e=>[Ao(n,no(e)),vs(i,n,!1,e[1])]),ho(r));u=n=>t=>vo((e=>function(e,n){const t=ho(e);if(t.length!==n.length)throw new Error(`Expected an array of length ${t.length} but got ${n.length}`);return null!=e.construct?new e.construct(...n):t.reduce(((e,[t,r],o)=>(e[t]=n[o],e)),{})}(r,At(e))),function(e,n,t){return null===t||Object.getPrototypeOf(t||!1)!==Object.prototype?new yo(1,[n,new Co(0,"an object",t)]):function(e,n,t){return n.reduceRight(((n,t)=>e(t,n)),t)}(_n(2,(e=>{const r=e[0];return o=>0===o.tag?vo((e=>Ct(e,o.fields[0])),e[1](n+"."+r)(t[r])):o})),e,new yo(0,vt()))}(e,n,t))}else if(po(r))u=e=>t=>{if("string"==typeof t)return _s(i,n,r,t,e,[]);if(Array.isArray(t)){const u=t;return o=t=>_s(i,n,r,t,e,u),0===(s=rs(e+"[0]",u[0])).tag?o(s.fields[0]):new yo(1,s.fields[0])}return new yo(1,[e,new Co(0,"a string or array",t)]);var o,s};else{if(!t){let e;const n=to(r);throw e=Qn(Xn("Cannot generate auto decoder for %s. Please pass an extra decoder.\n\nDocumentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders"))(n),new Error(e)}u=e=>n=>new yo(1,[e,new Co(2,"an extra coder for "+to(r),n)])}return o.contents=u,u}function vs(e,n,t,r){let o,i,s,u;const l=to(r),c=Lr(l,e);if(null==c){if(ro(r)){const t=vs(e,n,!1,oo(r));return e=>n=>ds(_n(2,t),e,n)}if(so(r)){const e=to(lo(r));if("System.SByte"===e)return e=>n=>{const t=r,o=e,i=n,s=os(o)(i);if(1===s.tag)return new yo(1,s.fields[0]);{const e=s.fields[0];return Xt(e,co(t),{Equals:(e,n)=>e===n,GetHashCode:rn})?new yo(0,ao(t,e.toString())):new yo(1,[o,new Co(1,to(t),i,"Unkown value provided for the enum")])}};if("System.Byte"===e)return e=>n=>{const t=r,o=e,i=n,s=is(o)(i);if(1===s.tag)return new yo(1,s.fields[0]);{const e=s.fields[0];return Xt(e,co(t),{Equals:(e,n)=>e===n,GetHashCode:rn})?new yo(0,ao(t,e.toString())):new yo(1,[o,new Co(1,to(t),i,"Unkown value provided for the enum")])}};if("System.Int16"===e)return e=>n=>{const t=r,o=e,i=n,s=ss(o)(i);if(1===s.tag)return new yo(1,s.fields[0]);{const e=s.fields[0];return Xt(e,co(t),{Equals:(e,n)=>e===n,GetHashCode:rn})?new yo(0,ao(t,e.toString(u))):new yo(1,[o,new Co(1,to(t),i,"Unkown value provided for the enum")])}var u};if("System.UInt16"===e)return e=>n=>{const t=r,o=e,i=n,s=us(o)(i);if(1===s.tag)return new yo(1,s.fields[0]);{const e=s.fields[0];return Xt(e,co(t),{Equals:(e,n)=>e===n,GetHashCode:rn})?new yo(0,ao(t,e.toString())):new yo(1,[o,new Co(1,to(t),i,"Unkown value provided for the enum")])}};if("System.Int32"===e)return e=>n=>{const t=r,o=e,i=n,s=ls(o)(i);if(1===s.tag)return new yo(1,s.fields[0]);{const e=s.fields[0];return Xt(e,co(t),{Equals:(e,n)=>e===n,GetHashCode:rn})?new yo(0,ao(t,en(e))):new yo(1,[o,new Co(1,to(t),i,"Unkown value provided for the enum")])}};if("System.UInt32"===e)return e=>n=>{const t=r,o=e,i=n,s=cs(o)(i);if(1===s.tag)return new yo(1,s.fields[0]);{const e=s.fields[0];return Xt(e,co(t),{Equals:(e,n)=>e===n,GetHashCode:rn})?new yo(0,ao(t,e.toString())):new yo(1,[o,new Co(1,to(t),i,"Unkown value provided for the enum")])}};{const e=to(r),n=et(Xn("Cannot generate auto decoder for %s.\nThoth.Json.Net only support the following enum types:\n- sbyte\n- byte\n- int16\n- uint16\n- int\n- uint32\nIf you can't use one of these types, please pass an extra decoder.\n "))(e);return e=>n(e)}}if(io(r)){if(go(r)){const t=at((t=>vs(e,n,!1,t)),mo(r));return e=>n=>Array.isArray(n)?vo((e=>At(e)),gs(0,t,e,n)):new yo(1,[e,new Co(0,"an array",n)])}{const l=to(uo(r));if("Microsoft.FSharp.Core.FSharpOption`1[System.Object]"===l)return o=vs(e,n,!0,Wr(r)[0]),e=>n=>{return t=_n(2,o),r=e,null==(i=n)?new yo(0,void 0):vo(kn,t(r,i));var t,r,i};if("Microsoft.FSharp.Collections.FSharpList`1[System.Object]"===l)return i=vs(e,n,!1,Wr(r)[0]),e=>n=>fs(_n(2,i),e,n);if("System.Collections.Generic.IEnumerable`1[System.Object]"===l)return s=vs(e,n,!1,Wr(r)[0]),e=>n=>function(e,n,t){if(Array.isArray(t)){let r=-1;return vo(tr,ft(((t,o)=>{if(r=r+1|0,0===t.tag){const i=e(n+".["+en(r)+"]",o);return 0===i.tag?new yo(0,Yt([i.fields[0]],t.fields[0])):new yo(1,i.fields[0])}return t}),new yo(0,[]),t))}return new yo(1,[n,new Co(0,"a seq",t)])}(_n(2,s),e,n);if("Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]"===l){const t=vs(e,n,!1,Wr(r)[0]),o=vs(e,n,!1,Wr(r)[1]);let i;const s=Ot([e=>n=>function(e,n,t,r){return null===r||Object.getPrototypeOf(r||!1)!==Object.prototype?new yo(1,[t,new Co(0,"an object",r)]):Kt(((o,i)=>{if(0===o.tag){const s=e(t,i);if(0===s.tag){const e=n(t+"."+i,r[i]);return 0===e.tag?new yo(0,Ct([s.fields[0],e.fields[0]],o.fields[0])):new yo(1,e.fields[0])}return new yo(1,s.fields[0])}return o}),new yo(0,vt()),Object.keys(r))}(_n(2,t),_n(2,o),e,n),(u=ms(_n(2,t),_n(2,o)),e=>n=>fs(_n(2,u),e,n))]);return i=e=>n=>{return t=e,r=n,((e,n)=>{e:for(;;){const o=e,i=n;if(xt(o))return new yo(1,[t,new Co(7,i)]);{const s=ns(t,_n(2,St(o)),r);if(1===s.tag){e=Et(o),n=Mt(i,bt(s.fields[0]));continue e}return new yo(0,s.fields[0])}}})(s,vt());var t,r},e=>n=>function(e,n,t,r){const o=n(t,r);return 1===o.tag?new yo(1,o.fields[0]):new yo(0,e(o.fields[0]))}(ps,_n(2,i),e,n)}if("Microsoft.FSharp.Collections.FSharpSet`1[System.Object]"===l){const t=vs(e,n,!1,Wr(r)[0]);return e=>n=>{const r=ds(_n(2,t),e,n);return 0===r.tag?new yo(0,ws(r.fields[0])):new yo(1,r.fields[0])}}return ys(e,n,t,r)}}return"System.Boolean"===l?e=>n=>{return t=e,"boolean"==typeof(r=n)?new yo(0,r):new yo(1,[t,new Co(0,"a boolean",r)]);var t,r}:"Microsoft.FSharp.Core.Unit"===l?e=>n=>{return t=e,null==(r=n)?new yo(0,void 0):new yo(1,[t,new Co(0,"null",r)]);var t,r}:"System.String"===l?e=>n=>rs(e,n):"System.Char"===l?e=>n=>function(e,n){if("string"==typeof n){const t=n;return 1===t.length?new yo(0,t[0]):new yo(1,[e,new Co(0,"a single character string",n)])}return new yo(1,[e,new Co(0,"a char",n)])}(e,n):"System.SByte"===l?os:"System.Byte"===l?is:"System.Int16"===l?ss:"System.UInt16"===l?us:"System.Int32"===l?ls:"System.UInt32"===l?cs:"System.Double"===l?e=>n=>{return t=e,"number"==typeof(r=n)?new yo(0,r):new yo(1,[t,new Co(0,"a float",r)]);var t,r}:"System.Single"===l?e=>n=>{return t=e,"number"==typeof(r=n)?new yo(0,r):new yo(1,[t,new Co(0,"a float32",r)]);var t,r}:"System.DateTime"===l?e=>n=>function(e,n){if("string"==typeof n){let r,o=Fn(-621355968e5,0);return r=[$n(n,new Sn((()=>o),(e=>{o=e}))),o],r[0]?new yo(0,1===(t=r[1]).kind?t:Fn(t.getTime(),1)):new yo(1,[e,new Co(0,"a datetime",n)])}var t;return new yo(1,[e,new Co(0,"a datetime",n)])}(e,n):"System.DateTimeOffset"===l?e=>n=>function(e,n){if("string"==typeof n){let t,r=Uo(-621355968e5,0);return t=[Po(n,new Sn((()=>r),(e=>{r=e}))),r],t[0]?new yo(0,t[1]):new yo(1,[e,new Co(0,"a datetimeoffset",n)])}return new yo(1,[e,new Co(0,"a datetime",n)])}(e,n):"System.TimeSpan"===l?e=>n=>function(e,n){if("string"==typeof n){let t,r=0;return t=[Ai(n,new Sn((()=>r),(e=>{r=e}))),r],t[0]?new yo(0,t[1]):new yo(1,[e,new Co(0,"a timespan",n)])}return new yo(1,[e,new Co(0,"a timespan",n)])}(e,n):"System.Guid"===l?e=>n=>function(e,n){if("string"==typeof n){let t,r="00000000-0000-0000-0000-000000000000";return t=[No(n,new Sn((()=>r),(e=>{r=e}))),r],t[0]?new yo(0,t[1]):new yo(1,[e,new Co(0,"a guid",n)])}return new yo(1,[e,new Co(0,"a guid",n)])}(e,n):"System.Object"===l?e=>e=>new yo(0,e):ys(e,n,t,r)}{const e=c;return n=>t=>e.contents(n)(t)}}function Cs(e,n,t){const r=Nn(n,new bo(0));return vs(function(e){return null!=e?Br(((e,n)=>new Sn(n[1])),e.Coders):Vr()}(t),r,!1,e)}class bs extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["AccessRole"]}}function xs(e){return new bs(0,e)}function Ss(e){return Ut(new bs(0,"SuperSelection.Access"),e,{Equals:an,GetHashCode:un})?kn(void 0):void 0}function Es(e){return Ut(new bs(0,"SuperSelection.EditPanel"),e,{Equals:an,GetHashCode:un})?kn(void 0):void 0}class As extends xn{constructor(e,n){super(),this.UserName=e,this.Roles=n}}function ks(e){let n;const t=st(null==e?"":e,["."],null,0);if(dt(((e,n)=>e===n),t,null)||3!==t.length)n=new yo(1,"Failed to identify the user");else{let e;const o=t[1];e=atob(o),n=ts(_n(2,Cs(Yr(["Name",eo],["Roles",(r=eo,new zr("[]",[r]))]),new bo(1),void 0)),e)}var r;if(1===n.tag)return new As(void 0,vt());{const e=n.fields[0];return new As(e.Name,Dt(xs,Ot(e.Roles)))}}class Is extends xn{constructor(e,n){super(),this.PromotedFunds=e,this.Configuration=n}}class Ts extends xn{constructor(e){super(),this.PromotedFunds=e}}class Ns extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Account","Partner"]}}class Os extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["PartnerId"]}}class Ms extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["AccountId"]}}const Ds=Le,Us=(e,n)=>{re((()=>{const n=e();return()=>{n.Dispose()}}),n)};function Ps(e,n,t,r){const o=Ds.memo(e,_n(2,Nn(function(e,n){return null==n||1===n.length?n:gn in n?n[gn]:yn([],e,n)}(2,t),null)));return Qt((n=>{e.displayName=n}),Tn(n)),e=>{const n=function(e,n){if(null==e)return n;{const t=e;return n.key=t(n),n}}(r,e);return Ds.createElement(o,n)}}function Fs(e){return{Dispose(){e()}}}function Rs(e){return Ds.useState(e)}function $s(e,n){Us(e,n)}function Gs(e){!function(e,n){Us((n=>(e(),Fs((()=>{})))),[])}(e)}function Hs(e){$s(e,[])}function js(e){return Ds.useRef(e)}function Ls(e){const n=js(e),t=function(e,t){const r=Nn([],[]);return Ds.useCallback((e=>n.current(e)),r)}();var r,o;return r=()=>{n.current=e},o=e=>(r(),Fs((()=>{}))),oe((()=>{const e=o();return()=>{e.Dispose()}})),t}class Bs{constructor(e=!1){this._id=0,this._cancelled=e,this._listeners=new Map}get isCancelled(){return this._cancelled}cancel(){if(!this._cancelled){this._cancelled=!0;for(const[,e]of this._listeners)e()}}addListener(e){const n=this._id;return this._listeners.set(this._id++,e),n}removeListener(e){return this._listeners.delete(e)}register(e,n){const t=this,r=this.addListener(null==n?e:()=>e(n));return{Dispose(){t.removeListener(r)}}}Dispose(){}}class Vs extends Error{constructor(){super("The operation was canceled"),Object.setPrototypeOf(this,Vs.prototype)}}class zs{constructor(){this.callCount=0}static get maxTrampolineCallCount(){return 2e3}incrementAndCheck(){return this.callCount++>zs.maxTrampolineCallCount}hijack(e){this.callCount=0,setTimeout(e,0)}}function Ws(e){return n=>{if(n.cancelToken.isCancelled)n.onCancel(new Vs);else if(n.trampoline.incrementAndCheck())n.trampoline.hijack((()=>{try{e(n)}catch(e){n.onError(En(e))}}));else try{e(n)}catch(e){n.onError(En(e))}}}const qs=new class{Bind(e,n){return function(e,n){return Ws((t=>{e({onSuccess:e=>{try{n(e)(t)}catch(e){t.onError(En(e))}},onError:t.onError,onCancel:t.onCancel,cancelToken:t.cancelToken,trampoline:t.trampoline})}))}(e,n)}Combine(e,n){return this.Bind(e,(()=>n))}Delay(e){return Ws((n=>e()(n)))}For(e,n){const t=e[Symbol.iterator]();let r=t.next();return this.While((()=>!r.done),this.Delay((()=>{const e=n(r.value);return r=t.next(),e})))}Return(e){return function(e){return Ws((n=>n.onSuccess(e)))}(e)}ReturnFrom(e){return e}TryFinally(e,n){return Ws((t=>{e({onSuccess:e=>{n(),t.onSuccess(e)},onError:e=>{n(),t.onError(e)},onCancel:e=>{n(),t.onCancel(e)},cancelToken:t.cancelToken,trampoline:t.trampoline})}))}TryWith(e,n){return Ws((t=>{e({onSuccess:t.onSuccess,onCancel:t.onCancel,cancelToken:t.cancelToken,trampoline:t.trampoline,onError:e=>{try{n(e)(t)}catch(e){t.onError(En(e))}}})}))}Using(e,n){return this.TryFinally(n(e),(()=>e.Dispose()))}While(e,n){return e()?this.Bind(n,(()=>this.While(e,n))):this.Return(void 0)}Zero(){return Ws((e=>e.onSuccess(void 0)))}};function Zs(e){}const Js=new Bs;function Ys(e,n){return function(e,n){return function(e,n,t,r,o){"function"!=typeof n&&(o=n,n=void 0);const i=new zs;e({onSuccess:n||Zs,onError:t||Zs,onCancel:r||Zs,cancelToken:o||Js,trampoline:i})}(e,n)}(e,n)}class Xs extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["HasNotStartedYet","InProgress","Resolved","Failed"]}}function Ks(e,n){const t=js(function(e){const n=new Bs(!1);return n}());return Hs((()=>Fs((()=>{t.current.cancel()})))),Ls((r=>{var o;null!=(o=t.current)&&o.isCancelled||Ys(qs.Delay((()=>qs.TryWith(qs.Delay((()=>(n(new Xs(1)),qs.Bind(e(r),(e=>(n(new Xs(2,e)),qs.Zero())))))),(e=>(n(new Xs(3,e)),qs.Zero()))))),t.current)}))}class Qs extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"]}}class eu extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Header"]}}class nu extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Empty","Text","Binary","Form"]}}class tu extends xn{constructor(e,n,t,r,o,i,s,u){super(),this.url=e,this.method=n,this.headers=t,this.withCredentials=r,this.overridenMimeType=o,this.overridenResponseType=i,this.timeout=s,this.content=u}}class ru extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Text","Blob","ArrayBuffer","Unknown"]}}class ou extends xn{constructor(e,n,t,r,o,i){super(),this.statusCode=0|e,this.responseText=n,this.responseType=t,this.responseUrl=r,this.responseHeaders=o,this.content=i}}const iu=new tu("",new Qs(0),vt(),!1,void 0,void 0,void 0,new nu(0));function su(e,n){return"string"!=typeof(t=n)||0===t.length?[n]:st(n,[e],null,0);var t}function uu(e){return new tu(e,iu.method,iu.headers,iu.withCredentials,iu.overridenMimeType,iu.overridenResponseType,iu.timeout,iu.content)}function lu(e,n){return new tu(n.url,e,n.headers,n.withCredentials,n.overridenMimeType,n.overridenResponseType,n.timeout,n.content)}function cu(e,n){return new tu(n.url,n.method,n.headers,n.withCredentials,n.overridenMimeType,n.overridenResponseType,n.timeout,e)}function au(e){return function(e){return Ws((n=>e([n.onSuccess,n.onError,n.onCancel])))}((n=>{const t=new XMLHttpRequest;t.open(function(e){switch(e.tag){case 1:return"POST";case 3:return"PATCH";case 2:return"PUT";case 4:return"DELETE";case 6:return"OPTIONS";case 5:return"HEAD";default:return"GET"}}(e.method),e.url),t.onreadystatechange=()=>{let e,r,o,i,s,u,l;4===t.readyState&&n[0]((r=t.responseType,e=""===r||"text"===r?t.responseText:"",o=0|t.status,i=t.responseType,u=t.responseType,s=""===u||"text"===u?new ru(0,t.responseText):new ru("arraybuffer"===u?2:"blob"===u?1:3,t.response),l=function(e){const n=Pt();return Ur(n,kr(n,e))}(function(e,n,t){const r=[];for(let t=0;t<=n.length-1;t++){const o=e(n[t]);if(null!=o){const e=In(o);r.push(e)}}return r}((e=>{const n=Ot(su(":",e));return xt(n)?void 0:[St(n).toLocaleLowerCase(),rt(":",Et(n)).trim()]}),su("\r\n",t.getAllResponseHeaders()))),new ou(o,e,i,t.responseURL,l,s)))};const r=Je(e.headers);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const e=r["System.Collections.Generic.IEnumerator`1.get_Current"]();t.setRequestHeader(e.fields[0],e.fields[1])}}finally{We(r)}t.withCredentials=e.withCredentials;const o=e.overridenMimeType;if(null==o);else{const e=o;t.overrideMimeType(e)}const i=e.overridenResponseType;null==i||(1===i.tag?t.responseType="blob":2===i.tag?t.responseType="arraybuffer":t.responseType="text");const s=e.timeout;if(null==s);else{const e=0|s;t.timeout=0|e}const u=e.content;switch(u.tag){case 1:case 3:case 2:t.send(kn(u.fields[0]));break;default:t.send()}}))}new ou(0,"","","",Vr(),new ru(0,""));class fu extends xn{constructor(e,n,t){super(),this.PartnerId=e,this.AccountId=n,this.Funds=t}}class du extends xn{constructor(e,n){super(),this.PartnerFunds=e,this.AccountFunds=n}}class hu extends xn{constructor(e){super(),this.DefaultFundUSI=e}}class mu extends xn{constructor(e,n){super(),this.Partner=e,this.Account=n}}class pu extends xn{constructor(e,n){super(),this.PartnerId=e,this.Name=n}}class wu extends xn{constructor(e,n){super(),this.AccountId=e,this.Name=n}}function gu(e){return e}function _u(e){return Array.from(e)}function yu(e){return Pn(e,"O")}function vu(e){return function(e,n="c",t){if(-1===["c","g","G"].indexOf(n))throw new Error("Custom formats are not supported");const r=Math.abs(function(e){return xi(e/864e5)}(e)),o=Math.abs(function(e){return xi(e%864e5/36e5)}(e)),i=Math.abs(function(e){return xi(e%36e5/6e4)}(e)),s=Math.abs(function(e){return xi(e%6e4/1e3)}(e)),u=Math.abs(function(e){return xi(e%1e3)}(e));return`${e<0?"-":""}${0!==r||"c"!==n&&"g"!==n?"c"===n?r+".":r+":":""}${"g"===n?o:Ke(o,2)}:${Ke(i,2)}:${Ke(s,2)}${0!==u||"c"!==n&&"g"!==n?"g"===n?"."+Ke(u,3):"."+function(e,n,t){let r=e.toString(10);for(;r.length<3;)r="0"+r;for(;r.length<7;)r+="0";return r}(u):""}`}(e)}function Cu(){return null}function bu(e){return Pn(e,"O")}function xu(e,n){return JSON.stringify(n,_n(2,null),kn(e))}function Su(e,n,t,r){const o=new Sn(null);let i;const s=to(r);let u;if(i=""===s?e:Hr(s,o,e),wo(r)){const e=at((e=>{const r=Ao(n,no(e)),o=Eu(i,n,t,e[1]);return n=>i=>{const s=function(e,n){return e[n[0]]}(n,e);return(!t||t&&null!=s)&&(i[r]=o(s)),i}}),ho(r));u=n=>Kt(((e,t)=>t(n)(e)),{},e)}else{if(!po(r)){let e;const n=to(r);throw e=Qn(Xn("Cannot generate auto encoder for %s. Please pass an extra encoder.\n\nDocumentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders"))(n),new Error(e)}u=e=>{const o=function(e,n){const t=fo(n)[e.tag];if(null==t)throw new Error(`Cannot find case ${e.name} in union type`);return[t,e.fields]}(e,r),s=o[0],u=o[1],l=0|u.length;if(0===l)return no(s);{const e=0|l,r=_o(s),o=ct(new Array(e+1),0,e+1,null);o[0]=no(s);for(let s=1;s<=e;s++){const e=Eu(i,n,t,r[s-1][1]);o[s]=e(u[s-1])}return o}}}return o.contents=u,u}function Eu(e,n,t,r){const o=to(r),i=Lr(o,e);if(null==i){if(ro(r)){const o=Eu(e,n,t,oo(r));return e=>_u(er(o,e))}if(so(r)){const e=to(lo(r));if("System.SByte"===e)return e=>e;if("System.Byte"===e)return e=>e;if("System.Int16"===e)return e=>e;if("System.UInt16"===e)return e=>e;if("System.Int32"===e)return e=>e;if("System.UInt32"===e)return e=>e;{const e=to(r);return et(Xn("Cannot generate auto encoder for %s.\nThoth.Json.Net only support the following enum types:\n- sbyte\n- byte\n- int16\n- uint16\n- int\n- uint32\n\nIf you can't use one of these types, please pass an extra encoder.\n\nDocumentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders\n "))(e)}}if(io(r)){if(go(r)){const o=at((r=>Eu(e,n,t,r)),mo(r));return e=>_u(nr(((e,n)=>o[e](n)),e))}{const o=to(uo(r));if("Microsoft.FSharp.Core.FSharpOption`1[System.Object]"===o){const o=new Xe((()=>{return o=Eu(e,n,t,Wr(r)[0]),e=>{return null!=(n=On(o,e))?In(n):null;var n};var o}));return e=>null==e?null:o.Value(e)}if("Microsoft.FSharp.Collections.FSharpList`1[System.Object]"===o||"Microsoft.FSharp.Collections.FSharpSet`1[System.Object]"===o||"System.Collections.Generic.IEnumerable`1[System.Object]"===o){const o=Eu(e,n,t,Wr(r)[0]);return e=>_u(er(o,e))}if("Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]"===o){const o=Wr(r)[0],i=Eu(e,n,t,Wr(r)[1]);if("System.String"===to(o)||"System.Guid"===to(o))return e=>Kt(((e,n)=>{const t=n;return e[t[0]]=i(t[1]),e}),{},e);{let r;const s=Eu(e,n,t,o);return r=s,e=>_u(er((e=>{const n=e;return[r(n[0]),i(n[1])]}),e))}}return Su(e,n,t,r)}}return"System.Boolean"===o?e=>e:"Microsoft.FSharp.Core.Unit"===o?Cu:"System.String"===o?e=>e:"System.Char"===o?e=>e:"System.SByte"===o?e=>e:"System.Byte"===o?e=>e:"System.Int16"===o?e=>e:"System.UInt16"===o?e=>e:"System.Int32"===o?e=>e:"System.UInt32"===o?e=>e:"System.Double"===o?e=>e:"System.Single"===o?e=>e:"System.DateTime"===o?bu:"System.DateTimeOffset"===o?yu:"System.TimeSpan"===o?vu:"System.Guid"===o?gu:"System.Object"===o?e=>e:Su(e,n,t,r)}{const e=i;return n=>e.contents(n)}}function Au(e,n,t,r){const o=Nn(n,new bo(0)),i=Nn(r,!0);return Eu(function(e){return null!=e?Br(((e,n)=>new Sn(n[0])),e.Coders):Vr()}(t),o,i,e)}function ku(e){return`${e}/super-selection/admin`}function Iu(e,n){return qs.Delay((()=>{const t=(r=function(e){return new eu(0,"Authorization",e)}(Qn(Xn("Bearer %s"))(e)),new tu((o=n).url,o.method,Mt(o.headers,bt(r)),o.withCredentials,o.overridenMimeType,o.overridenResponseType,o.timeout,o.content));var r,o;let i;const s=au(t);return i=qs.Bind(s,(e=>qs.Return(new yo(0,e)))),qs.Bind(i,(e=>{const n=e;if(1===n.tag)return qs.Return(new yo(1,n.fields[0]));{const e=n.fields[0];if(429===e.statusCode||e.statusCode>=500){const e=au(t);return qs.Bind(e,(e=>qs.Return(new yo(0,e))))}return qs.Return(new yo(0,e))}}))}))}function Tu(e,n){return qs.Delay((()=>{let t;const r=Iu(n,lu(new Qs(0),uu((t=ku(e),`${t}/promoted-funds`))));return qs.Bind(r,(e=>{const n=e;if(1===n.tag)return qs.Return(new yo(1,n.fields[0]));{const e=n.fields[0];switch(0|e.statusCode){case 200:{const n=ts(_n(2,Cs(Kr(Jr("SuperSelection.AdminUI.Dto.PromotedFundOverride",[],fu,(()=>[["PartnerId",eo],["AccountId",Xr(eo)],["Funds",Kr(eo)]]))),new bo(1),void 0)),e.responseText);return qs.Return(n)}case 401:return qs.Return(new yo(1,"You do not have the appropriate permissions to view this information"));default:return qs.Return(new yo(1,"Unexpected response from backend"))}}}))}))}function Nu(e,n,t,r){return qs.Delay((()=>{let o;const i=Iu(n,lu(new Qs(0),uu((null==r?e=>`${e}/promoted-funds/${t}`:(o=r,e=>`${e}/promoted-funds/${t}/${o}`))(ku(e)))));return qs.Bind(i,(e=>{const n=e;if(1===n.tag)return qs.Return(new yo(1,n.fields[0]));{const e=n.fields[0];if(200===e.statusCode){const n=ts(_n(2,Cs(Jr("SuperSelection.AdminUI.Dto.PromotedFunds",[],du,(()=>[["PartnerFunds",Kr(eo)],["AccountFunds",Kr(eo)]])),new bo(1),void 0)),e.responseText);return qs.Return(n)}return qs.Return(new yo(1,"Unexpected response from backend"))}}))}))}function Ou(e,n,t,r){return qs.Delay((()=>{let o;const i=Iu(n,lu(new Qs(4),uu((null==r?e=>`${e}/promoted-funds/${t}`:(o=r,e=>`${e}/promoted-funds/${t}/${o}`))(ku(e)))));return qs.Bind(i,(e=>{const n=e;if(1===n.tag)return qs.Return(new yo(1,n.fields[0]));{const e=n.fields[0];return 200===e.statusCode?qs.Return(new yo(0,void 0)):qs.Return(new yo(1,e.responseText))}}))}))}function Mu(e,n,t){Tt((t=>{try{t(n)}catch(n){e(n)}}),t)}function Du(){return vt()}function Uu(e){return bt(e)}class Pu extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["ColumnHeader"]}}function Fu(e){return e.fields[0]}class Ru extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["RowCell"]}}function $u(e){return new Ru(0,e)}function Gu(e){return e.fields[0]}function Hu(e){return n=d("th",wn(Ot([["className","px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"],["scope","col"],["children",e]]))),new Pu(0,n);var n}function ju(e,n){let t;return $u(d("td",wn(Ot([["className","px-6 py-4 whitespace-nowrap text-sm"],(t=[d("a",{className:"text-indigo-600 hover:text-indigo-900",children:n,href:e})],["children",Ds.Children.toArray(Array.from(t))])]))))}function Lu(e,n){return $u(d("td",{className:rt(" ",Yt(e,["px-6","py-4","whitespace-nowrap","text-sm"])),children:n}))}function Bu(e,n){return 0===n.indexOf(e)?n:void 0}function Vu(e,n){return function(e,n){const t=e.lastIndexOf(n);return t>=0&&t===e.length-n.length}(n,e)?n:void 0}function zu(e,n){return function(e){return 1===e?e=>{let n,t,r,o,i,s;return n=Bu("/",e),null!=n?(t=n,"#"+t):(r=Bu("#/",e),null!=r?(o=r,o):(i=Bu("#",e),null!=i?(s=i,"#/"+ut(s,1,s.length-1)):"#/"+e))}:e=>{let n,t;return n=Bu("/",e),null!=n?(t=n,t):"/"+e}}(n)(rt("/",Dt((e=>e.indexOf("?")>=0||0===e.indexOf("#")||0===e.indexOf("/")?e:encodeURIComponent(e)),e)))}Ps((e=>{const n=Ls((n=>{const t=Nn(e.onUrlChanged,(e=>{}));!function(e,n,t){var r,o;n((r=2===e?window.location.pathname+window.location.search:window.location.hash,o=e,function(e,n){let t,r;const o=pt();let i=o,s=n;for(;!gt(s);){let n=e(_t(s));for(;!gt(n);)t=i,r=new ht(_t(n),void 0),t.tail=r,i=r,n=yt(n);s=yt(s)}const u=i,l=pt();return u.tail=l,yt(o)}((e=>{if("string"!=typeof(n=e)||/^\s*$/.test(n))return vt();{const n=function(e,...n){return 0===n.length?e.trimEnd():e.replace(new RegExp("["+Wn(n.join(""))+"]+$"),"")}(e,"#");if("?"===n)return vt();if(null!=Bu("?",n))return bt(n);{const e=n.split("?");if(dt(((e,n)=>e===n),e,null)||1!==e.length){if(dt(((e,n)=>e===n),e,null)||2!==e.length)return vt();if(""===e[1]){const n=e[0];return bt(decodeURIComponent(n))}{const n=e[0],t=e[1];return Ot([decodeURIComponent(n),"?"+t])}}{const n=e[0];return bt(decodeURIComponent(n))}}}var n}),Ot(st(null!=Bu("#",r)?ut(r,1,r.length-1):1!==o||null==Vu("#",r)&&null==Vu("#/",r)?r:"",["/"],null,0)))))}(Nn(e.hashMode,1),t)}));Hs((()=>(window.navigator.userAgent.indexOf("Trident")>=0||window.navigator.userAgent.indexOf("MSIE")>=0?window.addEventListener("hashchange",n):window.addEventListener("popstate",n),window.addEventListener("CUSTOM_NAVIGATION_EVENT",n),Fs((()=>{window.navigator.userAgent.indexOf("Trident")>=0||window.navigator.userAgent.indexOf("MSIE")>=0?window.removeEventListener("hashchange",n):window.removeEventListener("popstate",n),window.removeEventListener("CUSTOM_NAVIGATION_EVENT",n)}))))),Gs((()=>{const e=document.createEvent("CustomEvent");e.initEvent("CUSTOM_NAVIGATION_EVENT",!0,!0),window.dispatchEvent(e)}));const t=e.application;return null==t?null:t}),void 0,void 0,void 0);function Wu(e,n){return e.replace(/[a-z]?[A-Z]/g,(e=>1===e.length?e.toLowerCase():e.charAt(0)+n+e.charAt(1).toLowerCase()))}function qu(e,n=0){const t={},r=n;function o(e){throw new Error("Cannot infer key and value of "+String(e))}function i(e,n,r){e=function(e,n){switch(n){case 1:return e.charAt(0).toLowerCase()+e.slice(1);case 2:return Wu(e,"_");case 3:return Wu(e,"_").toUpperCase();case 4:return Wu(e,"-");default:return e}}(e,n),t[e]=r}for(let n of e){let e=0;if(null==n&&o(n),n instanceof bn){const t=n.cases()[n.tag];n=0===n.fields.length?t:[t].concat(n.fields),e=r}if(Array.isArray(n))switch(n.length){case 0:o(n);break;case 1:i(n[0],e,!0);break;case 2:const t=n[1];i(n[0],e,t);break;default:i(n[0],e,n.slice(1))}else"string"==typeof n?i(n,e,!0):o(n)}return t}const Zu=ge((function(e,n){return d("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:n},e),d("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))})),Ju=ge((function(e,n){return d("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:n},e),d("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}))}));class Yu extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Pencil","Trash"]}}class Xu extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["ClassName"]}}function Ku(e,n){if(1===e.tag){const e=qu(n,1);return d(Zu,e)}{const e=qu(n,1);return d(Ju,e)}}class Qu extends xn{constructor(e,n){super(),this.Text=e,this.Action=n}}class el extends xn{constructor(e,n){super(),this.Text=e,this.Action=n}}class nl extends xn{constructor(e,n){super(),this.Text=e,this.Action=n}}function tl(e,n,t){let r;return d("button",wn(Ot([["className",rt(" ",["mr-2","w-14","px-4","py-2","border","border-transparent","shadow-sm","font-medium","rounded-md","text-white","focus:outline-none","focus:ring-2","focus:ring-offset-2","sm:text-sm",`bg-${n}-600`,`hover:bg-${n}-700`,`focus:ring-${n}-500`])],["type","button"],["onClick",t],(r=[Ku(e,bt(new Xu(0,"mr-3 flex-shrink-0 h-4 w-6")))],["children",Ds.Children.toArray(Array.from(r))])])))}const rl=e=>tl(new Yu(1),"red",e);function ol(e,n){return d("button",{className:rt(" ",["w-full","inline-flex","justify-center","rounded-md","border","border-transparent","shadow-sm","px-4","py-2","text-base","font-medium","text-white","focus:outline-none","focus:ring-2","focus:ring-offset-2","sm:ml-3","sm:w-auto","sm:text-sm",`focus:ring-${e}-500`,`bg-${e}-600`,`hover:bg-${e}-700`]),type:"button",children:n.Text,onClick:n.Action})}function il(e){return d("button",{className:rt(" ",["mt-3","w-full","inline-flex","justify-center","rounded-md","border","border-gray-300","shadow-sm","px-4","py-2","bg-white","text-base","font-medium","text-gray-700","hover:bg-gray-50","focus:outline-none","focus:ring-2","focus:ring-offset-2","focus:ring-indigo-500","sm:mt-0","sm:ml-3","sm:w-auto","sm:text-sm"]),type:"button",children:e.Text,onClick:e.Action})}function sl(e){return["strokeLinecap",e]}function ul(e){return["strokeLinejoin",e]}const ll=d("div",wn(Ot([["className",rt(" ",["mx-auto","flex-shrink-0","flex","items-center","justify-center","h-12","w-12","rounded-full","bg-red-100","sm:mx-0","sm:h-10","sm:w-10"])],(()=>{let e;const n=[d("svg",wn(Ot([["className",rt(" ",["h-6","w-6","text-red-600"])],["fill","none"],["stroke","currentColor"],["strokeWidth",2],["viewBox","0 0 24 24"],["xmlns","http://www.w3.org/2000/svg"],(e=bt(d("path",wn(Ot([sl("round"),ul("round"),["d","M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"]])))),["children",Ds.Children.toArray(Array.from(e))])])))];return["children",Ds.Children.toArray(Array.from(n))]})()]))),cl=d("div",wn(Ot([["className",rt(" ",["mx-auto","flex-shrink-0","flex","items-center","justify-center","h-12","w-12","rounded-full","bg-indigo-100","sm:mx-0","sm:h-10","sm:w-10"])],(()=>{let e;const n=[d("svg",wn(Ot([["className",rt(" ",["h-6","w-6","text-indigo-600"])],["fill","none"],["stroke","currentColor"],["strokeWidth",2],["viewBox","0 0 24 24"],["xmlns","http://www.w3.org/2000/svg"],(e=bt(d("path",wn(Ot([sl("round"),ul("round"),["d","M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"]])))),["children",Ds.Children.toArray(Array.from(e))])])))];return["children",Ds.Children.toArray(Array.from(n))]})()])));function al(e,n){let t;return d("div",wn(Ot([["className",rt(" ",["bg-gray-50","px-4","py-3","sm:px-6","sm:flex","sm:flex-row-reverse"])],(t=[ol("red",e),il(n)],["children",Ds.Children.toArray(Array.from(t))])])))}function fl(e){let n;return d("div",wn(Ot([["className","mt-2"],(n=[d("p",{className:rt(" ",["text-sm","text-gray-500"]),children:e})],["children",Ds.Children.toArray(Array.from(n))])])))}function dl(e,n,t,r){let o,i,s,u;return d("div",wn(Ot([["className",rt(" ",["relative","inline-block","align-bottom","bg-white","rounded-lg","text-left","overflow-hidden","shadow-xl","transform","transition-all","sm:my-8","sm:align-middle","sm:max-w-lg","sm:w-full"])],(o=[d("div",wn(Ot([["className",rt(" ",["bg-white","px-4","pt-5","pb-4","sm:p-6","sm:pb-4"])],(i=[d("div",wn(Ot([["className",rt(" ",["sm:flex","sm:items-start"])],(s=[ll,d("div",wn(Ot([["className",rt(" ",["mt-3","text-center","sm:mt-0","sm:ml-4","sm:text-left"])],(u=[(l=e,d("h3",{className:rt(" ",["text-lg","leading-6","font-medium","text-gray-900"]),id:"modal-title",children:l})),fl(n)],["children",Ds.Children.toArray(Array.from(u))])])))],["children",Ds.Children.toArray(Array.from(s))])])))],["children",Ds.Children.toArray(Array.from(i))])]))),al(t,r)],["children",Ds.Children.toArray(Array.from(o))])])));var l}function hl(e){let n,t,r;return d("div",wn(Ot([["className",rt(" ",["relative","z-10"])],["role",rt(" ",["dialog"])],(n=[d("div",{className:rt(" ",["fixed","inset-0","bg-gray-500","bg-opacity-75","transition-opacity"])}),d("div",wn(Ot([["className",rt(" ",["fixed","z-10","inset-0","overflow-y-auto"])],(t=[d("div",wn(Ot([["className",rt(" ",["flex","items-end","justify-center","min-h-screen","pt-4","px-4","pb-20","text-center","sm:block","sm:p-0"])],(r=[d("span",{className:rt(" ",["hidden","sm:inline-block","sm:align-middle","sm:h-screen"]),children:"​"}),dl(e.HeadingText,e.BodyText,e.ConfirmAction,e.CancelAction)],["children",Ds.Children.toArray(Array.from(r))])])))],["children",Ds.Children.toArray(Array.from(t))])])))],["children",Ds.Children.toArray(Array.from(n))])])))}function ml(e,n,t,r,o){const i=function(e,n,t,r){const o=0|mn(e,t);if(0===o)throw new Error("The step of a range cannot be zero");const i=o>0;return t=>{const o=0|mn(t,n);return i&&o<=0||!i&&o>=0?[t,r(t,e)]:void 0}}(n,t,r,o);return zt((()=>{return n=i,t=e,Bt((()=>function(e,n){let t,r=n;return jt((()=>{if(null!=t){const e=t[0];return t[1],e}return Rt()}),(()=>{if(t=e(r),null!=t){t[0];const e=t[1];return r=e,!0}return!1}),(()=>{}))}(n,t)));var n,t}))}class pl extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Writable","ReadWritable"]}}class wl{constructor(e){this.state=new pl(0,ct(new Array(pn(dn,e,10)),0,pn(dn,e,10),null),0)}}function gl(e){const n=e.state;if(1===n.tag){const t=0|n.fields[1],r=0|n.fields[2],o=n.fields[0],i=(r+1)%o.length|0;return e.state=i===t?new pl(0,o,t):new pl(1,o,t,i),kn(o[r])}}class _l extends xn{constructor(e,n,t,r,o,i,s){super(),this.init=e,this.update=n,this.subscribe=t,this.view=r,this.setState=o,this.onError=i,this.syncDispatch=s}}function yl(e,n){const t=n.init(e),r=t[0],o=new wl(10);let i=!1,s=r;const u=vn(1,n.syncDispatch,[e=>{if(i)!function(e,n){const t=e.state;if(1===t.tag){const i=0|t.fields[1],s=0|t.fields[2],u=t.fields[0];u[i]=n;const l=(i+1)%u.length|0;e.state=l===s?new pl(1,(r=s,o=u,Array.from(zt((()=>Yt(rr(r,o),zt((()=>{return Yt((e=r,n=o,Jt((()=>Vt(n)),((n,t)=>{if(n<e){if(t["System.Collections.IEnumerator.MoveNext"]())return kn(t["System.Collections.Generic.IEnumerator`1.get_Current"]());throw new Error(Ft+"\\nParameter name: source")}}),(e=>{We(e)}))),zt((()=>{return n=e=>qt(null),e=o.length,t=ml(0,1,e,0,((e,n)=>e+n)),zt((()=>Wt(er(n,t))));var e,n,t})));var e,n}))))))),u.length,0):new pl(1,u,l,s)}else{const r=0|t.fields[1],o=t.fields[0];o[r]=n;const i=(r+1)%o.length|0;e.state=new pl(1,o,i,r)}var r,o}(o,e);else{i=!0;let t=kn(e);for(;null!=t;){const e=In(t);try{const t=n.update(e,s),r=t[0];n.setState(r,u),Mu((t=>{n.onError([Qn(Xn("Error in command while handling: %A"))(e),t])}),u,t[1]),s=r}catch(t){n.onError([Qn(Xn("Unable to process the message: %A"))(e),t])}t=gl(o)}i=!1}}]);n.setState(r,u),Mu((e=>{n.onError(["Error intitializing:",e])}),u,function(e){const n=pt();let t=n;const r=e=>{t=kt(((e,n)=>{const t=new ht(n,void 0);return e.tail=t,t}),t,e)};if(Be(e))e.forEach(r);else if(e instanceof ht)Tt(r,e);else{const n=Je(e);try{for(;n["System.Collections.IEnumerator.MoveNext"]();)r(n["System.Collections.Generic.IEnumerator`1.get_Current"]())}finally{We(n)}}const o=t,i=pt();return o.tail=i,yt(n)}(Ot([(()=>{try{return n.subscribe(r)}catch(e){return n.onError(["Unable to subscribe:",e]),Du()}})(),t[1]])))}class vl{constructor(){this.hasDisposedOnce=!1,this.state=void 0,this.listener=void 0,this.dispatcher=void 0}}function Cl(){return new vl}function bl(e,n,t,r){yl(n,function(e,n){return new _l(n.init,n.update,n.subscribe,n.view,((e,n)=>{!function(e,n,t){e.state=kn(n),e.dispatcher=t;const r=e.listener;null!=r&&r(n)}(t,e,n)}),n.onError,n.syncDispatch)}(0,e()));const o=function(e){return e.state}(t);if(null!=o)return In(o);throw new Error("Elmish program has not initialized")}function xl(e,n){return function(e,n,t){const r=Rs(Cl)[0],o=Rs((()=>bl(e,n,r))),i=o[1];return $s((()=>(function(e){return e.hasDisposedOnce}(r)&&i(bl(e,n,r)),Fs((()=>{!function(e){const n=e.state;if(null!=n){const e=In(n);ze(e)&&We(e)}e.dispatcher=void 0,e.state=void 0,e.hasDisposedOnce=!0}(r)})))),Nn(t,[])),function(e,n){null==e.listener&&(e.listener=n)}(r,i),[o[0],e=>{!function(e,n){const t=e.dispatcher;null!=t&&t(n)}(r,e)}]}(e,void 0,n)}function Sl(e,n,t){return xl((()=>function(e,n,t){return new _l(e,n,(e=>Du()),t,_n(2,(e=>{const n=vn(1,t,[e]);return e=>{n(e)}})),(e=>{var n,t;n=e[0],t=e[1],console.error(kn(n),t)}),_n(2,(e=>e)))}(e,n,((e,n)=>{}))),t)}function El(){const e=bt(d("span",{children:["Please wait..."]}));return d("div",{children:Ds.Children.toArray(Array.from(e))})}function Al(e){const n=bt(d("span",{children:[e.error]}));return d("div",{children:Ds.Children.toArray(Array.from(n))})}class kl extends xn{constructor(e,n){super(),this.PartnerId=e,this.AccountId=n}}class Il extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["LoadData","LoadDetail","ShowResetModal","CloseModal","ResetPromotedFunds","Reload"]}}class Tl extends xn{constructor(e,n,t,r){super(),this.PromotedFundOverrides=e,this.FundLookup=n,this.User=t,this.ModalState=r}}class Nl extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["ShowModal","Hidden"]}}function Ol(e,n,t){if(null==n);else{const r=n;Ys(function(e,n,t,r){const o=[n,t];return qs.Delay((()=>{let n;const t=o[1];return n=null==t?void 0:t.fields[0],qs.Bind((i=e.backendUrl,s=e.accessToken,u=o[0].fields[0],l=n,qs.Delay((()=>{let e;const n=Iu(s,lu(new Qs(0),uu((null==l?e=>`${e}/account-registry/${u}`:(e=l,n=>`${n}/account-registry/${u}/${e}`))(ku(i)))));return qs.Bind(n,(e=>{const n=e;if(1===n.tag)return qs.Return(new yo(1,n.fields[0]));{const e=n.fields[0];if(200===e.statusCode){const n=ts(_n(2,Cs(Jr("SuperSelection.AdminUI.Dto.PromotedFundDetail",[],mu,(()=>[["Partner",Jr("SuperSelection.AdminUI.Dto.PartnerDetail",[],pu,(()=>[["PartnerId",eo],["Name",eo]]))],["Account",Xr(Jr("SuperSelection.AdminUI.Dto.AccountDetail",[],wu,(()=>[["AccountId",eo],["Name",eo]])))]])),new bo(1),void 0)),e.responseText);return qs.Return(n)}return qs.Return(new yo(1,"Unexpected response from backend"))}}))}))),(e=>(r(new Il(1,o,new Xs(2,e))),qs.Zero())));var i,s,u,l}))}(e,r[0],r[1],t))}}function Ml(e){const n=(t=(e,n)=>an(n,new Xs(0))?kn(e):void 0,function(e,n){return Sr(n,e.tree)}(e,t));var t;if(null==n)return[e,void 0];{const t=In(n);return[jr(t,(e=>{let n;return null==e?void 0:(n=e,new Xs(1))}),e),kn(t)]}}function Dl(e){let n;return[[new Os(0,e.PartnerId),(n=e.AccountId,null==n?void 0:new Ms(0,n))],new Xs(0)]}function Ul(e,n,t){let r,o,i,s,u,l,c;switch(1===n.tag?(r=2,s=n.fields[1],u=n.fields[0]):2===n.tag?(r=3,l=n.fields[0]):3===n.tag?r=4:4===n.tag?(r=5,c=n.fields[0]):5===n.tag?r=6:2===n.fields[0].tag&&0===n.fields[0].fields[0].tag?(r=0,o=n.fields[0].fields[0].fields[0]):(r=1,i=n.fields[0]),r){case 0:return function(e,n,t){const r=Ml(Pr(Dt(Dl,t)));return[new Tl(new Xs(2,new yo(0,t)),r[0],n.User,n.ModalState),Uu((n=>{Ol(e,r[1],n)}))]}(e,t,o);case 1:return[new Tl(i,t.FundLookup,t.User,t.ModalState),Du()];case 2:return function(e,n,t,r,o){const i=Ml(jr([t,r],(e=>null!=e?o:void 0),n.FundLookup));return[new Tl(n.PromotedFundOverrides,i[0],n.User,n.ModalState),Uu((n=>{Ol(e,i[1],n)}))]}(e,t,u[0],u[1],s);case 3:return[new Tl(t.PromotedFundOverrides,t.FundLookup,t.User,new Nl(0,l)),Du()];case 4:return[new Tl(t.PromotedFundOverrides,t.FundLookup,t.User,new Nl(1)),Du()];case 5:return[new Tl(new Xs(1),t.FundLookup,t.User,new Nl(1)),Uu((n=>{!function(e,n,t,r){Ys(function(e,n,t,r){return qs.Delay((()=>qs.Bind(Ou(e.backendUrl,e.accessToken,n,t),(e=>(r(new Il(5)),qs.Zero())))))}(e,n,t,r))}(e,c.PartnerId,c.AccountId,n)}))];case 6:return[new Tl(new Xs(1),t.FundLookup,t.User,t.ModalState),Uu((n=>{!function(e,n){Ys(function(e,n){return qs.Delay((()=>qs.Bind(Tu(e.backendUrl,e.accessToken),(e=>(n(new Il(0,new Xs(2,e))),qs.Zero())))))}(e,n))}(e,n)}))]}}const Pl=Ot([Hu("Partner"),Hu("Account"),Hu("Promoted Funds"),Hu("")]);function Fl(e,n){return zu(Ot(["account-registry","partners",e,"accounts",n,"super-configuration"]),1)}function Rl(e){let n;const t=Sl((()=>{return n=e.accessToken,[new Tl(new Xs(0),Vr(),ks(n),new Nl(1)),Du()];var n}),((n,t)=>Ul(e,n,t))),r=t[0],o=t[1];if(Gs(Ks((()=>function(e){return Tu(e.backendUrl,e.accessToken)}(e)),(e=>{o(new Il(0,e))}))),null==Ss(r.User.Roles))return d(Al,{error:"You do not have the appropriate permissions to view this information"});{const e=r.PromotedFundOverrides;let t,i,s,u;switch(1===e.tag?t=0:2===e.tag?0===e.fields[0].tag?(t=3,u=e.fields[0].fields[0]):(t=1,i=e.fields[0].fields[0]):3===e.tag?(t=2,s=e.fields[0]):t=0,t){case 0:return d(El,null);case 1:return d(Al,{error:i});case 2:return d(Al,{error:Cn(s)});case 3:return d("div",wn(bt((n=Zt(zt((()=>Yt(qt(d("h2",{className:"text-xl text-gray-900",children:"Promoted Fund Overrides"})),zt((()=>Yt(qt(d("p",{className:"mt-2 text-sm text-gray-700",children:"A list of all promoted fund overrides. This does not include accounts or partners that use the default configuration."})),zt((()=>Yt(qt(function(e,n){let t,r,o,i,s,u,l;return d("div",wn(Ot([["className","flex flex-col mt-4"],(t=[d("div",wn(Ot([["className","-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"],(r=[d("div",wn(Ot([["className","py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8"],(o=[d("div",wn(Ot([["className","shadow overflow-hidden border-b border-gray-200 sm:rounded-lg"],(i=[d("table",wn(Ot([["className","min-w-full divide-y divide-gray-200"],(s=[d("thead",{className:"bg-gray-50",children:(u=er(Fu,e),d("tr",{children:Ds.Children.toArray(Array.from(u))}))}),(l=nr(((e,n)=>(n=>{let t;return d("tr",wn(Ot([["className",e%2==0?"bg-white":"bg-gray-50"],(t=er(Gu,n),["children",Ds.Children.toArray(Array.from(t))])])))})(n)),n),d("tbody",{children:Ds.Children.toArray(Array.from(l))}))],["children",Ds.Children.toArray(Array.from(s))])])))],["children",Ds.Children.toArray(Array.from(i))])])))],["children",Ds.Children.toArray(Array.from(o))])])))],["children",Ds.Children.toArray(Array.from(r))])])))],["children",Ds.Children.toArray(Array.from(t))])])))}(Pl,Dt((e=>function(e,n,t){return Zt(zt((()=>{let r;const o=function(e,n){const t=Gr(e,[new Os(0,n.PartnerId),(r=n.AccountId,On((e=>new Ms(0,e)),r))]);var r;let o,i;switch(null!=t&&2===t.tag&&0===t.fields[0].tag?(o=0,i=t.fields[0].fields[0]):o=1,o){case 0:return i;case 1:return}}(e,t),i=function(e,n){let t;return Nn((t=n,null==t?void 0:t.Partner.Name),e)}(t.PartnerId,o),s=function(e,n){let t,r;return t=n,null==(o=null==t?void 0:(r=t.Account,null==r?void 0:r.Name))?e:o;var o}(t.AccountId,o);return Yt(qt((r=[(u=t.PartnerId,zu(Ot(["account-registry","partners",u,"super-configuration"]),1)),i],ju(r[0],r[1]))),zt((()=>{let e,r,o,i;return Yt((e=[t.AccountId,s],null!=e[0]&&null!=e[1]?(r=e[0],o=e[1],qt((i=[Fl(t.PartnerId,r),o],ju(i[0],i[1])))):qt(Lu(["text-gray-500"],"-"))),zt((()=>Yt(qt(Lu(["text-gray-500"],rt(", ",t.Funds))),zt((()=>{return qt((e=rl((e=>{n(new Il(2,new kl(t.PartnerId,t.AccountId)))})),$u(d("td",{className:rt(" ",["flex justify-center py-2"]),children:Ds.Children.toArray([e])}))));var e}))))))})));var u})))}(r.FundLookup,o,e)),u))),zt((()=>{const e=r.ModalState;return 0===e.tag?qt(function(e,n){let t;const r=e.AccountId;return t=null==r?`Partner: ${e.PartnerId}`:`Account: ${r}`,d(hl,{BodyText:`Are you sure you want to reset the current promoted funds for ${t}? This action cannot be undone.`,CancelAction:new el("Cancel",(e=>{n(new Il(3))})),ConfirmAction:new Qu("Reset",(t=>{n(new Il(4,e))})),HeadingText:"Reset Promoted Funds"})}(e.fields[0],o)):qt(null)})))))))))))),["children",Ds.Children.toArray(Array.from(n))]))))}}}class $l extends xn{constructor(e,n,t){super(),this.Data=e,this.User=n,this.ModalState=t}}class Gl extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["ResetModal","EditModal","Hidden"]}}class Hl extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["DefaultUsi","PromotedFunds"]}}class jl extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["LoadData","ShowEditModal","ShowResetModal","CloseModal","UpdateDefaultUsi","UpdatePromotedFunds","ResetDefaultUsi","ResetPromotedFunds","PromotedFundsUpdate"]}}class Ll extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Default","Inherited","Config"]}}function Bl(e){switch(e.tag){case 1:return e.fields[0]+" (inherited)";case 2:return e.fields[0];default:return e.fields[0]+" (default)"}}function Vl(e){switch(e.tag){case 1:default:return"";case 2:return e.fields[0]}}class zl extends xn{constructor(e,n,t,r){super(),this.UpdatePromotedFunds=e,this.DeletePromotedFunds=n,this.UpdateDefaultFundUsi=t,this.ReloadData=r}}function Wl(e,n,t){let r,o;return d("div",wn(Ot([["className","mt-2 w-full h-full"],(r=[d("div",wn(Ot([["className","h-30"],(o=[d("label",{className:"sr-only text-base",htmlFor:"field",children:n}),d("input",{type:"text",name:"field",id:"field",className:"shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-base border-gray-300 rounded-md",value:t,onChange:n=>{e(n.target.value)}})],["children",Ds.Children.toArray(Array.from(o))])])))],["children",Ds.Children.toArray(Array.from(r))])])))}function ql(e,n){let t;return d("div",wn(Ot([["className",rt(" ",["bg-gray-50","px-4","py-3","sm:px-6","sm:flex","sm:flex-row-reverse"])],(t=[ol("indigo",e),il(n)],["children",Ds.Children.toArray(Array.from(t))])])))}function Zl(e){let n,t,r,o,i,s,u;const l=(c=e.FieldValue,Ds.useState(c));var c;const a=l[0],f=function(e,n){return new Qu(e.Text,vn(1,e.Action,[n]))}(e.ConfirmAction,a);return d("div",wn(Ot([["className",rt(" ",["relative","z-10"])],["role",rt(" ",["dialog"])],(n=[d("div",{className:rt(" ",["fixed","inset-0","bg-gray-500","bg-opacity-75","transition-opacity"])}),d("div",wn(Ot([["className",rt(" ",["fixed","z-10","inset-0","overflow-y-auto"])],(t=[d("div",wn(Ot([["className",rt(" ",["flex","items-end","justify-center","min-h-screen","pt-4","px-4","pb-20","text-center","sm:block","sm:p-0"])],(r=[d("span",{className:rt(" ",["hidden","sm:inline-block","sm:align-middle","sm:h-screen"]),children:"​"}),d("div",wn(Ot([["className",rt(" ",["relative","inline-block","align-bottom","bg-white","rounded-lg","text-left","overflow-hidden","shadow-xl","transform","transition-all","sm:my-8","sm:align-middle","sm:max-w-lg","sm:w-full"])],(o=[d("div",wn(Ot([["className",rt(" ",["bg-white","px-4","pt-5","pb-4","sm:p-6","sm:pb-4"])],(i=[d("div",wn(Ot([["className",rt(" ",["sm:flex","sm:items-start"])],(s=[cl,d("div",wn(Ot([["className",rt(" ",["mt-3","text-center","sm:mt-0","sm:ml-4","sm:text-left","w-full"])],(u=[(h=e.HeadingText,d("h3",{className:rt(" ",["text-lg","leading-6","font-medium","text-gray-900"]),id:"modal-title",children:h})),Wl(l[1],e.FieldName,a)],["children",Ds.Children.toArray(Array.from(u))])])))],["children",Ds.Children.toArray(Array.from(s))])])))],["children",Ds.Children.toArray(Array.from(i))])]))),ql(f,e.CancelAction)],["children",Ds.Children.toArray(Array.from(o))])])))],["children",Ds.Children.toArray(Array.from(r))])])))],["children",Ds.Children.toArray(Array.from(t))])])))],["children",Ds.Children.toArray(Array.from(n))])])));var h}function Jl(e,n){return d(Zl,{CancelAction:new el("Cancel",(e=>{n(new jl(3))})),ConfirmAction:new nl("Save",((e,t)=>{n(new jl(5,e))})),FieldName:"Promoted Funds",FieldValue:e,HeadingText:"Edit Promoted Funds"})}function Yl(e){return d(hl,{BodyText:"Are you sure you want to reset the current promoted funds? This action cannot be undone.",CancelAction:new el("Cancel",(n=>{e(new jl(3))})),ConfirmAction:new Qu("Reset",(n=>{e(new jl(7))})),HeadingText:"Reset Promoted Funds"})}function Xl(e,n,t,r){return qs.Delay((()=>{const o=Nu(e,n,t,r);return qs.Bind(o,(t=>{const o=t;if(1===o.tag)return qs.Return(new yo(1,o.fields[0]));{const t=function(e,n,t){return qs.Delay((()=>{let r;const o=Iu(n,lu(new Qs(0),uu((r=ku(e),`${r}/configurations/${t}`))));return qs.Bind(o,(e=>{const n=e;if(1===n.tag)return qs.Return(new yo(1,n.fields[0]));{const e=n.fields[0];switch(0|e.statusCode){case 200:{const n=ts(_n(2,Cs(Jr("SuperSelection.AdminUI.Dto.AccountConfiguration",[],hu,(()=>[["DefaultFundUSI",Xr(eo)]])),new bo(1),void 0)),e.responseText);return qs.Return(n)}case 404:{const e=new yo(0,new hu(void 0));return qs.Return(e)}default:return qs.Return(new yo(1,"Unexpected response from backend"))}}}))}))}(e,n,r);return qs.Bind(t,(e=>{let n;const t=e;return n=1===t.tag?new yo(1,t.fields[0]):new yo(0,new Ns(0,new Is(o.fields[0],t.fields[0]))),qs.Return(n)}))}}))}))}function Kl(e,n,t){return qs.Delay((()=>{const r=Nu(e,n,t,void 0);return qs.Bind(r,(e=>{let n;const t=e;return n=1===t.tag?new yo(1,t.fields[0]):new yo(0,new Ns(1,new Ts(t.fields[0]))),qs.Return(n)}))}))}function Ql(e){return new zl(((n,t)=>function(e,n,t){return qs.Delay((()=>qs.Bind(function(e,n,t,r,o){return qs.Delay((()=>{let i;const s=(null==r?e=>`${e}/promoted-funds/${t}`:(i=r,e=>`${e}/promoted-funds/${t}/${i}`))(ku(e)),u=Iu(n,lu(new Qs(1),cu(new nu(1,xu(0,Au(Yr(["Funds",Kr(eo)]),new bo(1),void 0,void 0)(o))),uu(s))));return qs.Bind(u,(e=>{const n=e;if(1===n.tag)return qs.Return(new yo(1,n.fields[0]));{const e=n.fields[0];return 200===e.statusCode?qs.Return(new yo(0,void 0)):qs.Return(new yo(1,e.responseText))}}))}))}(e.backendUrl,e.accessToken,e.partnerId,e.accountId,n),(e=>(t(new jl(8,e)),qs.Zero())))))}(e,n,t)),(n=>function(e,n){return qs.Delay((()=>qs.Bind(Ou(e.backendUrl,e.accessToken,e.partnerId,e.accountId),(e=>(n(new jl(8,e)),qs.Zero())))))}(e,n)),((n,t)=>function(e,n,t){return qs.Delay((()=>{const r={DefaultFundUsi:n},o=e.accountId;if(null==o)return qs.Zero();{const n=o;return qs.Bind(function(e,n,t,r){return qs.Delay((()=>{let o;const i=Iu(n,lu(new Qs(2),cu(new nu(1,xu(0,Au(Yr(["DefaultFundUsi",eo]),new bo(1),void 0,void 0)(r))),uu((o=ku(e),`${o}/configurations/${t}`)))));return qs.Bind(i,(e=>{const n=e;return 1===n.tag?qs.Return(new yo(1,n.fields[0])):200===n.fields[0].statusCode?qs.Return(new yo(0,void 0)):qs.Return(new yo(1,"Unexpected response from backend"))}))}))}(e.backendUrl,e.accessToken,n,r),(e=>(t(new jl(8,e)),qs.Zero())))}}))}(e,n,t)),(n=>function(e,n){return qs.Delay((()=>{let t;return qs.Bind((t=e.accountId,null==t?Kl(e.backendUrl,e.accessToken,e.partnerId):Xl(e.backendUrl,e.accessToken,e.partnerId,t)),(e=>(n(new jl(0,new Xs(2,e))),qs.Zero())))}))}(e,n)))}function ec(e,n,t,r){let o,i,s,u,l;const c=Ot(Tn((o=t,null==o?void 0:(a=o,tl(new Yu(0),"indigo",a)))));var a;const f=Ot(Tn((i=r,null==i?void 0:rl(i))));return d("div",wn(Ot([["className",rt(" ",["px-4","py-5","sm:grid","sm:grid-cols-5","sm:gap-4","sm:px-6"])],(s=[d("dt",{className:rt(" ",["text-sm","font-medium","text-gray-500"]),children:e}),d("dd",wn(Ot([["className",rt(" ",["mt-1","text-sm","text-gray-900","sm:mt-0","sm:col-span-2"])],(u=[d("span",{className:"flex-grow",children:n})],["children",Ds.Children.toArray(Array.from(u))])]))),d("span",wn(Ot([["className","flex-grow"],(l=Zt(zt((()=>Yt(c,zt((()=>f)))))),["children",Ds.Children.toArray(Array.from(l))])])))],["children",Ds.Children.toArray(Array.from(s))])])))}function nc(e,n,t){return ec("Default USI",n,null!=(r=e,Ut(new bs(0,"SuperSelection.ChangeDefaultFund"),r,{Equals:an,GetHashCode:un})?kn(void 0):void 0)?e=>{t(new jl(1,new Hl(0)))}:void 0,void 0);var r}function tc(e,n,t){return ec("Promoted Funds",n,null!=Es(e)?e=>{t(new jl(1,new Hl(1)))}:void 0,null!=Es(e)?e=>{t(new jl(2,new Hl(1)))}:void 0)}function rc(e){let n,t;const r=Sl((()=>{return n=e.accessToken,[new $l(new Xs(0),ks(n),new Gl(2)),Du()];var n}),_n(2,(n=Ql(e),e=>t=>function(e,n,t){switch(n.tag){case 1:return[new $l(t.Data,t.User,new Gl(1,n.fields[0])),Du()];case 2:return[new $l(t.Data,t.User,new Gl(0,n.fields[0])),Du()];case 3:case 6:return[new $l(t.Data,t.User,new Gl(2)),Du()];case 4:return[new $l(t.Data,t.User,new Gl(2)),Uu((t=>{Ys(e.UpdateDefaultFundUsi(n.fields[0],t))}))];case 5:{const r=Ot(at((e=>e.trim()),st(n.fields[0],[","],null,0)));return[new $l(t.Data,t.User,new Gl(2)),Uu((n=>{Ys(e.UpdatePromotedFunds({Funds:r},n))}))]}case 7:return[new $l(t.Data,t.User,new Gl(2)),Uu((n=>{Ys(e.DeletePromotedFunds(n))}))];case 8:return[new $l(new Xs(1),t.User,t.ModalState),Uu((n=>{Ys(e.ReloadData(n))}))];default:return[new $l(n.fields[0],t.User,t.ModalState),Du()]}}(n,e,t)))),o=r[0],i=r[1];Gs(Ks((()=>function(e){const n=e.accountId;return null==n?Kl(e.backendUrl,e.accessToken,e.partnerId):Xl(e.backendUrl,e.accessToken,e.partnerId,n)}(e)),(e=>{i(new jl(0,e))})));const s=o.User.Roles;if(null==Ss(s))return d(Al,{error:"You do not have the appropriate permissions to view this information"});{const e=o.Data;let n,r,u,l;switch(1===e.tag?n=0:2===e.tag?1===e.fields[0].tag?(n=2,u=e.fields[0].fields[0]):(n=1,r=e.fields[0].fields[0]):3===e.tag?(n=3,l=e.fields[0]):n=0,n){case 0:return d(El,null);case 1:if(1===r.tag){const e=Zt(zt((()=>{let e;const n=function(e){const n=e.PartnerFunds;return xt(n)?new Ll(0,"slate"):new Ll(2,rt(", ",n))}(r.fields[0].PromotedFunds);return qt(d("div",wn(bt((e=Zt(zt((()=>{let e,t;return Yt(qt(d("div",wn(bt((e=[(t=bt(tc(s,Bl(n),i)),d("dl",{children:Ds.Children.toArray(Array.from(t))}))],["children",Ds.Children.toArray(Array.from(e))]))))),zt((()=>{const e=o.ModalState;switch(e.tag){case 1:return 1===e.fields[0].tag?qt(Jl(Vl(n),i)):qt(null);case 2:return qt(null);default:return 1===e.fields[0].tag?qt(Yl(i)):qt(null)}})))}))),["children",Ds.Children.toArray(Array.from(e))])))))})));return d("div",{children:Ds.Children.toArray(Array.from(e))})}{const e=r.fields[0],n=Nn(e.Configuration.DefaultFundUSI,"-"),u=Nn(e.Configuration.DefaultFundUSI,""),l=function(e){const n=[e.PartnerFunds,e.AccountFunds];let t,r;switch(xt(n[0])?xt(n[1])?t=0:(t=2,r=n[1]):xt(n[1])?t=1:(t=2,r=n[1]),t){case 0:return new Ll(0,"slate");case 1:return new Ll(1,rt(", ",n[0]));case 2:return new Ll(2,rt(", ",r))}}(e.PromotedFunds);return d("div",wn(bt((t=Zt(zt((()=>{let e,t;return Yt(qt(d("div",wn(bt((e=[(t=Ot([nc(s,n,i),tc(s,Bl(l),i)]),d("dl",{children:Ds.Children.toArray(Array.from(t))}))],["children",Ds.Children.toArray(Array.from(e))]))))),zt((()=>{const e=o.ModalState;switch(e.tag){case 1:return 1===e.fields[0].tag?qt(Jl(Vl(l),i)):qt(function(e,n){return d(Zl,{CancelAction:new el("Cancel",(e=>{n(new jl(3))})),ConfirmAction:new nl("Save",((e,t)=>{n(new jl(4,e))})),FieldName:"Default USI",FieldValue:e,HeadingText:"Edit Default USI"})}(u,i));case 2:return qt(null);default:return 1===e.fields[0].tag?qt(Yl(i)):qt(function(e){return d(hl,{BodyText:"Are you sure you want to reset the current Default USI? This action cannot be undone.",CancelAction:new el("Cancel",(n=>{e(new jl(3))})),ConfirmAction:new Qu("Reset",(n=>{e(new jl(6))})),HeadingText:"Reset Default USI"})}(i))}})))}))),["children",Ds.Children.toArray(Array.from(t))]))))}case 2:return d(Al,{error:u});case 3:return d(Al,{error:Cn(l)})}}}V((e=>d(Rl,e)),"superhero-super-selection"),V((e=>d(rc,e)),"superhero-super-configuration")})();
1
+ (()=>{"use strict";var e,n,t,r,o,i,s,u={},l=[],c=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function a(e,n){for(var t in n)e[t]=n[t];return e}function f(e){var n=e.parentNode;n&&n.removeChild(e)}function d(n,t,r){var o,i,s,u={};for(s in t)"key"==s?o=t[s]:"ref"==s?i=t[s]:u[s]=t[s];if(arguments.length>2&&(u.children=arguments.length>3?e.call(arguments,2):r),"function"==typeof n&&null!=n.defaultProps)for(s in n.defaultProps)void 0===u[s]&&(u[s]=n.defaultProps[s]);return h(n,u,o,i,null)}function h(e,r,o,i,s){var u={type:e,props:r,key:o,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==s?++t:s};return null==s&&null!=n.vnode&&n.vnode(u),u}function m(e){return e.children}function p(e,n){this.props=e,this.context=n}function w(e,n){if(null==n)return e.__?w(e.__,e.__.__k.indexOf(e)+1):null;for(var t;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e)return t.__e;return"function"==typeof e.type?w(e):null}function g(e){var n,t;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,n=0;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e){e.__e=e.__c.base=t.__e;break}return g(e)}}function y(e){(!e.__d&&(e.__d=!0)&&r.push(e)&&!_.__r++||i!==n.debounceRendering)&&((i=n.debounceRendering)||o)(_)}function _(){for(var e;_.__r=r.length;)e=r.sort((function(e,n){return e.__v.__b-n.__v.__b})),r=[],e.some((function(e){var n,t,r,o,i,s;e.__d&&(i=(o=(n=e).__v).__e,(s=n.__P)&&(t=[],(r=a({},o)).__v=o.__v+1,I(s,o,r,n.__n,void 0!==s.ownerSVGElement,null!=o.__h?[i]:null,t,null==i?w(o):i,o.__h),N(t,o),o.__e!=i&&g(o)))}))}function v(e,n,t,r,o,i,s,c,a,f){var d,p,g,y,_,v,b,S=r&&r.__k||l,E=S.length;for(t.__k=[],d=0;d<n.length;d++)if(null!=(y=t.__k[d]=null==(y=n[d])||"boolean"==typeof y?null:"string"==typeof y||"number"==typeof y||"bigint"==typeof y?h(null,y,null,null,y):Array.isArray(y)?h(m,{children:y},null,null,null):y.__b>0?h(y.type,y.props,y.key,null,y.__v):y)){if(y.__=t,y.__b=t.__b+1,null===(g=S[d])||g&&y.key==g.key&&y.type===g.type)S[d]=void 0;else for(p=0;p<E;p++){if((g=S[p])&&y.key==g.key&&y.type===g.type){S[p]=void 0;break}g=null}I(e,y,g=g||u,o,i,s,c,a,f),_=y.__e,(p=y.ref)&&g.ref!=p&&(b||(b=[]),g.ref&&b.push(g.ref,null,y),b.push(p,y.__c||_,y)),null!=_?(null==v&&(v=_),"function"==typeof y.type&&y.__k===g.__k?y.__d=a=C(y,a,e):a=x(e,y,g,S,_,a),"function"==typeof t.type&&(t.__d=a)):a&&g.__e==a&&a.parentNode!=e&&(a=w(g))}for(t.__e=v,d=E;d--;)null!=S[d]&&("function"==typeof t.type&&null!=S[d].__e&&S[d].__e==t.__d&&(t.__d=w(r,d+1)),M(S[d],S[d]));if(b)for(d=0;d<b.length;d++)O(b[d],b[++d],b[++d])}function C(e,n,t){for(var r,o=e.__k,i=0;o&&i<o.length;i++)(r=o[i])&&(r.__=e,n="function"==typeof r.type?C(r,n,t):x(t,r,r,o,r.__e,n));return n}function b(e,n){return n=n||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){b(e,n)})):n.push(e)),n}function x(e,n,t,r,o,i){var s,u,l;if(void 0!==n.__d)s=n.__d,n.__d=void 0;else if(null==t||o!=i||null==o.parentNode)e:if(null==i||i.parentNode!==e)e.appendChild(o),s=null;else{for(u=i,l=0;(u=u.nextSibling)&&l<r.length;l+=2)if(u==o)break e;e.insertBefore(o,i),s=i}return void 0!==s?s:o.nextSibling}function S(e,n,t){"-"===n[0]?e.setProperty(n,t):e[n]=null==t?"":"number"!=typeof t||c.test(n)?t:t+"px"}function E(e,n,t,r,o){var i;e:if("style"===n)if("string"==typeof t)e.style.cssText=t;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(n in r)t&&n in t||S(e.style,n,"");if(t)for(n in t)r&&t[n]===r[n]||S(e.style,n,t[n])}else if("o"===n[0]&&"n"===n[1])i=n!==(n=n.replace(/Capture$/,"")),n=n.toLowerCase()in e?n.toLowerCase().slice(2):n.slice(2),e.l||(e.l={}),e.l[n+i]=t,t?r||e.addEventListener(n,i?k:A,i):e.removeEventListener(n,i?k:A,i);else if("dangerouslySetInnerHTML"!==n){if(o)n=n.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==n&&"list"!==n&&"form"!==n&&"tabIndex"!==n&&"download"!==n&&n in e)try{e[n]=null==t?"":t;break e}catch(e){}"function"==typeof t||(null!=t&&(!1!==t||"a"===n[0]&&"r"===n[1])?e.setAttribute(n,t):e.removeAttribute(n))}}function A(e){this.l[e.type+!1](n.event?n.event(e):e)}function k(e){this.l[e.type+!0](n.event?n.event(e):e)}function I(e,t,r,o,i,s,u,l,c){var f,d,h,w,g,y,_,C,b,x,S,E=t.type;if(void 0!==t.constructor)return null;null!=r.__h&&(c=r.__h,l=t.__e=r.__e,t.__h=null,s=[l]),(f=n.__b)&&f(t);try{e:if("function"==typeof E){if(C=t.props,b=(f=E.contextType)&&o[f.__c],x=f?b?b.props.value:f.__:o,r.__c?_=(d=t.__c=r.__c).__=d.__E:("prototype"in E&&E.prototype.render?t.__c=d=new E(C,x):(t.__c=d=new p(C,x),d.constructor=E,d.render=D),b&&b.sub(d),d.props=C,d.state||(d.state={}),d.context=x,d.__n=o,h=d.__d=!0,d.__h=[]),null==d.__s&&(d.__s=d.state),null!=E.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=a({},d.__s)),a(d.__s,E.getDerivedStateFromProps(C,d.__s))),w=d.props,g=d.state,h)null==E.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==E.getDerivedStateFromProps&&C!==w&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(C,x),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(C,d.__s,x)||t.__v===r.__v){d.props=C,d.state=d.__s,t.__v!==r.__v&&(d.__d=!1),d.__v=t,t.__e=r.__e,t.__k=r.__k,t.__k.forEach((function(e){e&&(e.__=t)})),d.__h.length&&u.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(C,d.__s,x),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(w,g,y)}))}d.context=x,d.props=C,d.state=d.__s,(f=n.__r)&&f(t),d.__d=!1,d.__v=t,d.__P=e,f=d.render(d.props,d.state,d.context),d.state=d.__s,null!=d.getChildContext&&(o=a(a({},o),d.getChildContext())),h||null==d.getSnapshotBeforeUpdate||(y=d.getSnapshotBeforeUpdate(w,g)),S=null!=f&&f.type===m&&null==f.key?f.props.children:f,v(e,Array.isArray(S)?S:[S],t,r,o,i,s,u,l,c),d.base=t.__e,t.__h=null,d.__h.length&&u.push(d),_&&(d.__E=d.__=null),d.__e=!1}else null==s&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=T(r.__e,t,r,o,i,s,u,c);(f=n.diffed)&&f(t)}catch(e){t.__v=null,(c||null!=s)&&(t.__e=l,t.__h=!!c,s[s.indexOf(l)]=null),n.__e(e,t,r)}}function N(e,t){n.__c&&n.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){n.__e(e,t.__v)}}))}function T(n,t,r,o,i,s,l,c){var a,d,h,m=r.props,p=t.props,g=t.type,y=0;if("svg"===g&&(i=!0),null!=s)for(;y<s.length;y++)if((a=s[y])&&"setAttribute"in a==!!g&&(g?a.localName===g:3===a.nodeType)){n=a,s[y]=null;break}if(null==n){if(null===g)return document.createTextNode(p);n=i?document.createElementNS("http://www.w3.org/2000/svg",g):document.createElement(g,p.is&&p),s=null,c=!1}if(null===g)m===p||c&&n.data===p||(n.data=p);else{if(s=s&&e.call(n.childNodes),d=(m=r.props||u).dangerouslySetInnerHTML,h=p.dangerouslySetInnerHTML,!c){if(null!=s)for(m={},y=0;y<n.attributes.length;y++)m[n.attributes[y].name]=n.attributes[y].value;(h||d)&&(h&&(d&&h.__html==d.__html||h.__html===n.innerHTML)||(n.innerHTML=h&&h.__html||""))}if(function(e,n,t,r,o){var i;for(i in t)"children"===i||"key"===i||i in n||E(e,i,null,t[i],r);for(i in n)o&&"function"!=typeof n[i]||"children"===i||"key"===i||"value"===i||"checked"===i||t[i]===n[i]||E(e,i,n[i],t[i],r)}(n,p,m,i,c),h)t.__k=[];else if(y=t.props.children,v(n,Array.isArray(y)?y:[y],t,r,o,i&&"foreignObject"!==g,s,l,s?s[0]:r.__k&&w(r,0),c),null!=s)for(y=s.length;y--;)null!=s[y]&&f(s[y]);c||("value"in p&&void 0!==(y=p.value)&&(y!==n.value||"progress"===g&&!y||"option"===g&&y!==m.value)&&E(n,"value",y,m.value,!1),"checked"in p&&void 0!==(y=p.checked)&&y!==n.checked&&E(n,"checked",y,m.checked,!1))}return n}function O(e,t,r){try{"function"==typeof e?e(t):e.current=t}catch(e){n.__e(e,r)}}function M(e,t,r){var o,i;if(n.unmount&&n.unmount(e),(o=e.ref)&&(o.current&&o.current!==e.__e||O(o,null,t)),null!=(o=e.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(e){n.__e(e,t)}o.base=o.__P=null}if(o=e.__k)for(i=0;i<o.length;i++)o[i]&&M(o[i],t,"function"!=typeof e.type);r||null==e.__e||f(e.__e),e.__e=e.__d=void 0}function D(e,n,t){return this.constructor(e,t)}function F(t,r,o){var i,s,l;n.__&&n.__(t,r),s=(i="function"==typeof o)?null:o&&o.__k||r.__k,l=[],I(r,t=(!i&&o||r).__k=d(m,null,[t]),s||u,u,void 0!==r.ownerSVGElement,!i&&o?[o]:s?null:r.firstChild?e.call(r.childNodes):null,l,!i&&o?o:s?s.__e:r.firstChild,i),N(l,t)}function U(e,n){F(e,n,U)}function P(n,t,r){var o,i,s,u=a({},n.props);for(s in t)"key"==s?o=t[s]:"ref"==s?i=t[s]:u[s]=t[s];return arguments.length>2&&(u.children=arguments.length>3?e.call(arguments,2):r),h(n.type,u,o||n.key,i||n.ref,null)}function R(){return(R=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function $(e){this.getChildContext=function(){return e.context};var n=e.children,t=function(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n.indexOf(t=i[r])>=0||(o[t]=e[t]);return o}(e,["context","children"]);return P(n,t)}function G(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=d($,R({},this._props,{context:e.detail.context}),function e(n,t){if(3===n.nodeType)return n.data;if(1!==n.nodeType)return null;var r=[],o={},i=0,s=n.attributes,u=n.childNodes;for(i=s.length;i--;)"slot"!==s[i].name&&(o[s[i].name]=s[i].value,o[H(s[i].name)]=s[i].value);for(i=u.length;i--;){var l=e(u[i],null),c=u[i].slot;c?o[c]=d(B,{name:c},l):r[i]=l}var a=t?d(B,null,r):r;return d(t||n.nodeName.toLowerCase(),o,a)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?U:F)(this._vdom,this._root)}function H(e){return e.replace(/-(\w)/g,(function(e,n){return n?n.toUpperCase():""}))}function j(e,n,t){if(this._vdom){var r={};r[e]=t=null==t?void 0:t,r[H(e)]=t,this._vdom=P(this._vdom,r),F(this._vdom,this._root)}}function L(){F(this._vdom=null,this._root)}function B(e,n){var t=this;return d("slot",R({},e,{ref:function(e){e?(t.ref=e,t._listener||(t._listener=function(e){e.stopPropagation(),e.detail.context=n},e.addEventListener("_preact",t._listener))):t.ref.removeEventListener("_preact",t._listener)}}))}function V(e,n){!function(e,n,t,r){function o(){var n=Reflect.construct(HTMLElement,[],o);return n._vdomComponent=e,n._root=n,n}(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=G,o.prototype.attributeChangedCallback=j,o.prototype.disconnectedCallback=L,t=t||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=t,t.forEach((function(e){Object.defineProperty(o.prototype,e,{get:function(){return this._vdom.props[e]},set:function(n){this._vdom?this.attributeChangedCallback(e,null,n):(this._props||(this._props={}),this._props[e]=n,this.connectedCallback());var t=typeof n;null!=n&&"string"!==t&&"boolean"!==t&&"number"!==t||this.setAttribute(e,n)}})})),customElements.define(n||e.tagName||e.displayName||e.name,o)}(e,n)}e=l.slice,n={__e:function(e,n){for(var t,r,o;n=n.__;)if((t=n.__c)&&!t.__)try{if((r=t.constructor)&&null!=r.getDerivedStateFromError&&(t.setState(r.getDerivedStateFromError(e)),o=t.__d),null!=t.componentDidCatch&&(t.componentDidCatch(e),o=t.__d),o)return t.__E=t}catch(n){e=n}throw e}},t=0,p.prototype.setState=function(e,n){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=a({},this.state),"function"==typeof e&&(e=e(a({},t),this.props)),e&&a(t,e),null!=e&&this.__v&&(n&&this.__h.push(n),y(this))},p.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),y(this))},p.prototype.render=m,r=[],o="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,_.__r=0,s=0;var z,W,q,Z=0,J=[],Y=n.__b,X=n.__r,K=n.diffed,Q=n.__c,ee=n.unmount;function ne(e,t){n.__h&&n.__h(W,e,Z||t),Z=0;var r=W.__H||(W.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function te(e,n,t){var r=ne(z++,2);return r.t=e,r.__c||(r.__=[t?t(n):fe(void 0,n),function(e){var n=r.t(r.__[0],e);r.__[0]!==n&&(r.__=[n,r.__[1]],r.__c.setState({}))}],r.__c=W),r.__}function re(e,t){var r=ne(z++,3);!n.__s&&ae(r.__H,t)&&(r.__=e,r.__H=t,W.__H.__h.push(r))}function oe(e,t){var r=ne(z++,4);!n.__s&&ae(r.__H,t)&&(r.__=e,r.__H=t,W.__h.push(r))}function ie(e,n){var t=ne(z++,7);return ae(t.__H,n)&&(t.__=e(),t.__H=n,t.__h=e),t.__}function se(){for(var e;e=J.shift();)if(e.__P)try{e.__H.__h.forEach(le),e.__H.__h.forEach(ce),e.__H.__h=[]}catch(t){e.__H.__h=[],n.__e(t,e.__v)}}n.__b=function(e){W=null,Y&&Y(e)},n.__r=function(e){X&&X(e),z=0;var n=(W=e.__c).__H;n&&(n.__h.forEach(le),n.__h.forEach(ce),n.__h=[])},n.diffed=function(e){K&&K(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(1!==J.push(t)&&q===n.requestAnimationFrame||((q=n.requestAnimationFrame)||function(e){var n,t=function(){clearTimeout(r),ue&&cancelAnimationFrame(n),setTimeout(e)},r=setTimeout(t,100);ue&&(n=requestAnimationFrame(t))})(se)),W=null},n.__c=function(e,t){t.some((function(e){try{e.__h.forEach(le),e.__h=e.__h.filter((function(e){return!e.__||ce(e)}))}catch(r){t.some((function(e){e.__h&&(e.__h=[])})),t=[],n.__e(r,e.__v)}})),Q&&Q(e,t)},n.unmount=function(e){ee&&ee(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach((function(e){try{le(e)}catch(e){t=e}})),t&&n.__e(t,r.__v))};var ue="function"==typeof requestAnimationFrame;function le(e){var n=W,t=e.__c;"function"==typeof t&&(e.__c=void 0,t()),W=n}function ce(e){var n=W;e.__c=e.__(),W=n}function ae(e,n){return!e||e.length!==n.length||n.some((function(n,t){return n!==e[t]}))}function fe(e,n){return"function"==typeof n?n(e):n}function de(e,n){for(var t in n)e[t]=n[t];return e}function he(e,n){for(var t in e)if("__source"!==t&&!(t in n))return!0;for(var r in n)if("__source"!==r&&e[r]!==n[r])return!0;return!1}function me(e){this.props=e}(me.prototype=new p).isPureReactComponent=!0,me.prototype.shouldComponentUpdate=function(e,n){return he(this.props,e)||he(this.state,n)};var pe=n.__b;n.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),pe&&pe(e)};var we="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ge(e){function n(n,t){var r=de({},n);return delete r.ref,e(r,(t=n.ref||t)&&("object"!=typeof t||"current"in t)?t:null)}return n.$$typeof=we,n.render=n,n.prototype.isReactComponent=n.__f=!0,n.displayName="ForwardRef("+(e.displayName||e.name)+")",n}var ye=function(e,n){return null==e?null:b(b(e).map(n))},_e={map:ye,forEach:ye,count:function(e){return e?b(e).length:0},only:function(e){var n=b(e);if(1!==n.length)throw"Children.only";return n[0]},toArray:b},ve=n.__e;n.__e=function(e,n,t){if(e.then)for(var r,o=n;o=o.__;)if((r=o.__c)&&r.__c)return null==n.__e&&(n.__e=t.__e,n.__k=t.__k),r.__c(e,n);ve(e,n,t)};var Ce=n.unmount;function be(){this.__u=0,this.t=null,this.__b=null}function xe(e){var n=e.__.__c;return n&&n.__e&&n.__e(e)}function Se(){this.u=null,this.o=null}n.unmount=function(e){var n=e.__c;n&&n.__R&&n.__R(),n&&!0===e.__h&&(e.type=null),Ce&&Ce(e)},(be.prototype=new p).__c=function(e,n){var t=n.__c,r=this;null==r.t&&(r.t=[]),r.t.push(t);var o=xe(r.__v),i=!1,s=function(){i||(i=!0,t.__R=null,o?o(u):u())};t.__R=s;var u=function(){if(!--r.__u){if(r.state.__e){var e=r.state.__e;r.__v.__k[0]=function e(n,t,r){return n&&(n.__v=null,n.__k=n.__k&&n.__k.map((function(n){return e(n,t,r)})),n.__c&&n.__c.__P===t&&(n.__e&&r.insertBefore(n.__e,n.__d),n.__c.__e=!0,n.__c.__P=r)),n}(e,e.__c.__P,e.__c.__O)}var n;for(r.setState({__e:r.__b=null});n=r.t.pop();)n.forceUpdate()}},l=!0===n.__h;r.__u++||l||r.setState({__e:r.__b=r.__v.__k[0]}),e.then(s,s)},be.prototype.componentWillUnmount=function(){this.t=[]},be.prototype.render=function(e,n){if(this.__b){if(this.__v.__k){var t=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function e(n,t,r){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),n.__c.__H=null),null!=(n=de({},n)).__c&&(n.__c.__P===r&&(n.__c.__P=t),n.__c=null),n.__k=n.__k&&n.__k.map((function(n){return e(n,t,r)}))),n}(this.__b,t,r.__O=r.__P)}this.__b=null}var o=n.__e&&d(m,null,e.fallback);return o&&(o.__h=null),[d(m,null,n.__e?null:e.children),o]};var Ee=function(e,n,t){if(++t[1]===t[0]&&e.o.delete(n),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(t=e.u;t;){for(;t.length>3;)t.pop()();if(t[1]<t[0])break;e.u=t=t[2]}};function Ae(e){return this.getChildContext=function(){return e.context},e.children}function ke(e){var n=this,t=e.i;n.componentWillUnmount=function(){F(null,n.l),n.l=null,n.i=null},n.i&&n.i!==t&&n.componentWillUnmount(),e.__v?(n.l||(n.i=t,n.l={nodeType:1,parentNode:t,childNodes:[],appendChild:function(e){this.childNodes.push(e),n.i.appendChild(e)},insertBefore:function(e,t){this.childNodes.push(e),n.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),n.i.removeChild(e)}}),F(d(Ae,{context:n.context},e.__v),n.l)):n.l&&n.componentWillUnmount()}(Se.prototype=new p).__e=function(e){var n=this,t=xe(n.__v),r=n.o.get(e);return r[0]++,function(o){var i=function(){n.props.revealOrder?(r.push(o),Ee(n,e,r)):o()};t?t(i):i()}},Se.prototype.render=function(e){this.u=null,this.o=new Map;var n=b(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&n.reverse();for(var t=n.length;t--;)this.o.set(n[t],this.u=[1,0,this.u]);return e.children},Se.prototype.componentDidUpdate=Se.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(n,t){Ee(e,t,n)}))};var Ie="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Ne=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Te="undefined"!=typeof document,Oe=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};p.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(p.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(n){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:n})}})}));var Me=n.event;function De(){}function Fe(){return this.cancelBubble}function Ue(){return this.defaultPrevented}n.event=function(e){return Me&&(e=Me(e)),e.persist=De,e.isPropagationStopped=Fe,e.isDefaultPrevented=Ue,e.nativeEvent=e};var Pe,Re={configurable:!0,get:function(){return this.class}},$e=n.vnode;n.vnode=function(e){var n=e.type,t=e.props,r=t;if("string"==typeof n){var o=-1===n.indexOf("-");for(var i in r={},t){var s=t[i];Te&&"children"===i&&"noscript"===n||"value"===i&&"defaultValue"in t&&null==s||("defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===s?s="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+n)&&!Oe(t.type)?i="oninput":/^onfocus$/i.test(i)?i="onfocusin":/^onblur$/i.test(i)?i="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(i)?i=i.toLowerCase():o&&Ne.test(i)?i=i.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===s&&(s=void 0),r[i]=s)}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=b(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=b(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,t.class!=t.className&&(Re.enumerable="className"in t,null!=t.className&&(r.class=t.className),Object.defineProperty(r,"className",Re))}e.$$typeof=Ie,$e&&$e(e)};var Ge=n.__r;n.__r=function(e){Ge&&Ge(e),Pe=e.__c};var He={ReactCurrentDispatcher:{current:{readContext:function(e){return Pe.__n[e.__c].props.value}}}};function je(e){return!!e&&e.$$typeof===Ie}const Le={useState:function(e){return Z=1,te(fe,e)},useReducer:te,useEffect:re,useLayoutEffect:oe,useRef:function(e){return Z=5,ie((function(){return{current:e}}),[])},useImperativeHandle:function(e,n,t){Z=6,oe((function(){"function"==typeof e?e(n()):e&&(e.current=n())}),null==t?t:t.concat(e))},useMemo:ie,useCallback:function(e,n){return Z=8,ie((function(){return e}),n)},useContext:function(e){var n=W.context[e.__c],t=ne(z++,9);return t.c=e,n?(null==t.__&&(t.__=!0,n.sub(W)),n.props.value):e.__},useDebugValue:function(e,t){n.useDebugValue&&n.useDebugValue(t?t(e):e)},version:"17.0.2",Children:_e,render:function(e,n,t){return null==n.__k&&(n.textContent=""),F(e,n),"function"==typeof t&&t(),e?e.__c:null},hydrate:function(e,n,t){return U(e,n),"function"==typeof t&&t(),e?e.__c:null},unmountComponentAtNode:function(e){return!!e.__k&&(F(null,e),!0)},createPortal:function(e,n){return d(ke,{__v:e,i:n})},createElement:d,createContext:function(e,n){var t={__c:n="__cC"+s++,__:e,Consumer:function(e,n){return e.children(n)},Provider:function(e){var t,r;return this.getChildContext||(t=[],(r={})[n]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&t.some(y)},this.sub=function(e){t.push(e);var n=e.componentWillUnmount;e.componentWillUnmount=function(){t.splice(t.indexOf(e),1),n&&n.call(e)}}),e.children}};return t.Provider.__=t.Consumer.contextType=t},createFactory:function(e){return d.bind(null,e)},cloneElement:function(e){return je(e)?P.apply(null,arguments):e},createRef:function(){return{current:null}},Fragment:m,isValidElement:je,findDOMNode:function(e){return e&&(e.base||1===e.nodeType&&e)||null},Component:p,PureComponent:me,memo:function(e,n){function t(e){var t=this.props.ref,r=t==e.ref;return!r&&t&&(t.call?t(null):t.current=null),n?!n(this.props,e)||!r:he(this.props,e)}function r(n){return this.shouldComponentUpdate=t,d(e,n)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r},forwardRef:ge,flushSync:function(e,n){return e(n)},unstable_batchedUpdates:function(e,n){return e(n)},StrictMode:m,Suspense:be,SuspenseList:Se,lazy:function(e){var n,t,r;function o(o){if(n||(n=e()).then((function(e){t=e.default||e}),(function(e){r=e})),r)throw r;if(!t)throw n;return d(t,o)}return o.displayName="Lazy",o.__f=!0,o},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:He};function Be(e){return Array.isArray(e)||ArrayBuffer.isView(e)}function Ve(e){return"function"==typeof e.GetHashCode}function ze(e){return null!=e&&"function"==typeof e.Dispose}function We(e){ze(e)&&e.Dispose()}function qe(e,n){var t,r;return(null===(t=Object.getPrototypeOf(e))||void 0===t?void 0:t.constructor)===(null===(r=Object.getPrototypeOf(n))||void 0===r?void 0:r.constructor)}class Ze{constructor(e){this.iter=e}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current}"System.Collections.IEnumerator.get_Current"(){return this.current}"System.Collections.IEnumerator.MoveNext"(){const e=this.iter.next();return this.current=e.value,!e.done}"System.Collections.IEnumerator.Reset"(){throw new Error("JS iterators cannot be reset")}Dispose(){}}function Je(e){return"function"==typeof e.GetEnumerator?e.GetEnumerator():new Ze(e[Symbol.iterator]())}function Ye(e){return{[Symbol.iterator](){return this},next(){const n=e["System.Collections.IEnumerator.MoveNext"]();return{done:!n,value:n?e["System.Collections.IEnumerator.get_Current"]():void 0}}}}class Xe{constructor(e){this.factory=e,this.isValueCreated=!1}get Value(){return this.isValueCreated||(this.createdValue=this.factory(),this.isValueCreated=!0),this.createdValue}get IsValueCreated(){return this.isValueCreated}}function Ke(e,n){let t=e.toString(10);for(;t.length<n;)t="0"+t;return t}function Qe(e){const n=e;return"number"==typeof n.offset?n.offset:1===e.kind?0:-6e4*e.getTimezoneOffset()}function en(e,n){return(e=e<0&&null!=n&&10!==n?4294967295+e+1:e).toString(n)}class nn{static id(e){return nn.idMap.has(e)||nn.idMap.set(e,++nn.count),nn.idMap.get(e)}}function tn(e){let n=0,t=5381;const r=e.length;for(;n<r;)t=33*t^e.charCodeAt(n++);return t}function rn(e){return 2654435761*e|0}function on(e){return 0===e.length?0:e.reduce(((e,n)=>(e<<5)+e^n))}function sn(e){var n;if(null==e)return 0;switch(typeof e){case"boolean":return e?1:0;case"number":return rn(e);case"string":return tn(e);default:if(Ve(e))return e.GetHashCode();if(Be(e))return function(e){const n=e.length,t=new Array(n);for(let r=0;r<n;r++)t[r]=sn(e[r]);return on(t)}(e);if(e instanceof Date)return function(e){return e.getTime()}(e);if((null===(n=Object.getPrototypeOf(e))||void 0===n?void 0:n.constructor)===Object){const n=Object.values(e).map((e=>sn(e)));return on(n)}return rn(nn.id(e))}}function un(e){return null==e?0:Ve(e)?e.GetHashCode():rn(nn.id(e))}function ln(e,n,t){if(null==e)return null==n;if(null==n)return!1;if(e.length!==n.length)return!1;for(let r=0;r<e.length;r++)if(!t(e[r],n[r]))return!1;return!0}function cn(e,n){return ln(e,n,an)}function an(e,n){var t;return e===n||(null==e?null==n:null!=n&&"object"==typeof e&&(function(e){return"function"==typeof e.Equals}(e)?e.Equals(n):Be(e)?Be(n)&&cn(e,n):e instanceof Date?n instanceof Date&&0===fn(e,n):(null===(t=Object.getPrototypeOf(e))||void 0===t?void 0:t.constructor)===Object&&function(e,n){const t=Object.keys(e),r=Object.keys(n);if(t.length!==r.length)return!1;t.sort(),r.sort();for(let o=0;o<t.length;o++)if(t[o]!==r[o]||!an(e[t[o]],n[r[o]]))return!1;return!0}(e,n)))}function fn(e,n){let t,r;return"offset"in e&&"offset"in n?(t=e.getTime(),r=n.getTime()):(t=e.getTime()+Qe(e),r=n.getTime()+Qe(n)),t===r?0:t<r?-1:1}function dn(e,n){return e===n?0:e<n?-1:1}function hn(e,n){return function(e,n,t){if(null==e)return null==n?0:1;if(null==n)return-1;if(e.length!==n.length)return e.length<n.length?-1:1;for(let r=0,o=0;r<e.length;r++)if(o=t(e[r],n[r]),0!==o)return o;return 0}(e,n,mn)}function mn(e,n){var t;return e===n?0:null==e?null==n?0:-1:null==n?1:"object"!=typeof e?e<n?-1:1:function(e){return"function"==typeof e.CompareTo}(e)?e.CompareTo(n):Be(e)?Be(n)?hn(e,n):-1:e instanceof Date?n instanceof Date?fn(e,n):-1:(null===(t=Object.getPrototypeOf(e))||void 0===t?void 0:t.constructor)===Object?function(e,n){const t=Object.keys(e),r=Object.keys(n);if(t.length!==r.length)return t.length<r.length?-1:1;t.sort(),r.sort();for(let o=0,i=0;o<t.length;o++){const s=t[o];if(s!==r[o])return s<r[o]?-1:1;if(i=mn(e[s],n[s]),0!==i)return i}return 0}(e,n):-1}function pn(e,n,t){return e(n,t)>0?n:t}function wn(e){const n={};for(const t of e)n[t[0]]=t[1];return n}nn.idMap=new WeakMap,nn.count=0;const gn=Symbol("curried");function yn(e,n){if(null==n||n.length>1)return n;const t=(...t)=>{let r=n;for(let n=0;n<e;n++)r=r(t[n]);return r};return t[gn]=n,t}function _n(e,n,t){return r=>1===n?t(...e.concat([r])):_n(e.concat([r]),n-1,t)}function vn(e,n,t){if(null!=n){if(gn in n){n=n[gn];for(let e=0;e<t.length;e++)n=n(t[e]);return n}return _n(t,e,n)}}function Cn(e,n=0){var t,r;if(null!=e&&"object"==typeof e){if("function"==typeof e.toString)return e.toString();if(Symbol.iterator in e)return function(e){let n=0,t="[";for(const r of e){if(0===n)t+=Cn(r);else{if(100===n){t+="; ...";break}t+="; "+Cn(r)}n++}return t+"]"}(e);{const o=null===(t=Object.getPrototypeOf(e))||void 0===t?void 0:t.constructor;return o===Object&&n<10?"{ "+Object.entries(e).map((([e,t])=>e+" = "+Cn(t,n+1))).join("\n ")+" }":null!==(r=null==o?void 0:o.name)&&void 0!==r?r:""}}return String(e)}class bn{get name(){return this.cases()[this.tag]}toJSON(){return 0===this.fields.length?this.name:[this.name].concat(this.fields)}toString(){return function(e,n){if(0===n.length)return e;{let t="",r=!0;return 1===n.length?(t=Cn(n[0]),r=t.indexOf(" ")>=0):t=n.map((e=>Cn(e))).join(", "),e+(r?" (":" ")+t+(r?")":"")}}(this.name,this.fields)}GetHashCode(){const e=this.fields.map((e=>sn(e)));return e.splice(0,0,rn(this.tag)),on(e)}Equals(e){return this===e||!!qe(this,e)&&this.tag===e.tag&&cn(this.fields,e.fields)}CompareTo(e){return this===e?0:qe(this,e)?this.tag===e.tag?hn(this.fields,e.fields):this.tag<e.tag?-1:1:-1}}class xn{toJSON(){return function(e){const n={},t=Object.keys(e);for(let r=0;r<t.length;r++)n[t[r]]=e[t[r]];return n}(this)}toString(){return e=this,"{ "+Object.entries(e).map((([e,n])=>e+" = "+Cn(n))).join("\n ")+" }";var e}GetHashCode(){return function(e){const n=Object.values(e).map((e=>sn(e)));return on(n)}(this)}Equals(e){return function(e,n){if(e===n)return!0;if(qe(e,n)){const t=Object.keys(e);for(let r=0;r<t.length;r++)if(!an(e[t[r]],n[t[r]]))return!1;return!0}return!1}(this,e)}CompareTo(e){return function(e,n){if(e===n)return 0;if(qe(e,n)){const t=Object.keys(e);for(let r=0;r<t.length;r++){const o=mn(e[t[r]],n[t[r]]);if(0!==o)return o}return 0}return-1}(this,e)}}class Sn{constructor(e,n){"function"==typeof n?(this.getter=e,this.setter=n):(this.getter=()=>e,this.setter=n=>{e=n})}get contents(){return this.getter()}set contents(e){this.setter(e)}}function En(e){return function(e){return e instanceof class{constructor(e){this.message=e}}||e instanceof Error}(e)?e:new Error(String(e))}class An{constructor(e){this.value=e}toJSON(){return this.value}toString(){return String(this.value)}GetHashCode(){return sn(this.value)}Equals(e){return null!=e&&an(this.value,e instanceof An?e.value:e)}CompareTo(e){return null==e?1:mn(this.value,e instanceof An?e.value:e)}}function kn(e){return null==e||e instanceof An?new An(e):e}function In(e){if(null==e)throw new Error("Option has no value");return e instanceof An?e.value:e}function Nn(e){return null==e?[]:[In(e)]}function Tn(e,n){return null!=e?In(e):n}function On(e,n){return null!=n?kn(e(In(n))):void 0}function Mn(e){const n=e<0,t=(e=Math.abs(e))%36e5/6e4;return(n?"-":"+")+Ke(~~(e/36e5),2)+":"+Ke(t,2)}function Dn(e,n){const t=e.toISOString();return"first"===n?t.substring(0,t.indexOf("T")):t.substring(t.indexOf("T")+1,t.length-1)}function Fn(e,n,t){return n.replace(/(\w)\1*/g,(n=>{let r=Number.NaN;switch(n.substring(0,1)){case"y":const o=t?e.getUTCFullYear():e.getFullYear();r=n.length<4?o%100:o;break;case"M":r=(t?e.getUTCMonth():e.getMonth())+1;break;case"d":r=t?e.getUTCDate():e.getDate();break;case"H":r=t?e.getUTCHours():e.getHours();break;case"h":const i=t?e.getUTCHours():e.getHours();r=i>12?i%12:i;break;case"m":r=t?e.getUTCMinutes():e.getMinutes();break;case"s":r=t?e.getUTCSeconds():e.getSeconds();break;case"f":r=t?e.getUTCMilliseconds():e.getMilliseconds()}return Number.isNaN(r)?n:r<10&&n.length>1?"0"+r:""+r}))}function Un(e,n,t){return null!=e.offset?function(e,n){var t,r,o;const i=new Date(e.getTime()+(null!==(t=e.offset)&&void 0!==t?t:0));if("string"!=typeof n)return i.toISOString().replace(/\.\d+/,"").replace(/[A-Z]|\.\d+/g," ")+Mn(null!==(r=e.offset)&&void 0!==r?r:0);if(1!==n.length)return Fn(i,n,!0);switch(n){case"D":case"d":return Dn(i,"first");case"T":case"t":return Dn(i,"second");case"O":case"o":return function(e,n){const t=e.toISOString();return t.substring(0,t.length-1)+Mn(n)}(i,null!==(o=e.offset)&&void 0!==o?o:0);default:throw new Error("Unrecognized Date print format")}}(e,n):function(e,n){const t=1===e.kind;if("string"!=typeof n)return t?e.toUTCString():e.toLocaleString();if(1!==n.length)return Fn(e,n,t);switch(n){case"D":case"d":return t?Dn(e,"first"):e.toLocaleDateString();case"T":case"t":return t?Dn(e,"second"):e.toLocaleTimeString();case"O":case"o":return function(e,n){if(n)return e.toISOString();{const n=null==e.kind||2===e.kind;return Ke(e.getFullYear(),4)+"-"+Ke(e.getMonth()+1,2)+"-"+Ke(e.getDate(),2)+"T"+Ke(e.getHours(),2)+":"+Ke(e.getMinutes(),2)+":"+Ke(e.getSeconds(),2)+"."+Ke(e.getMilliseconds(),3)+(n?Mn(-6e4*e.getTimezoneOffset()):"")}}(e,t);default:throw new Error("Unrecognized Date print format")}}(e,n)}function Pn(e,n){const t=new Date(e);return t.kind=0|(null==n?0:n),t}function Rn(e){function n(){throw new Error(`The string is not a valid Date: ${e}`)}null!=e&&""!==e.trim()||n(),10===e.length&&"-"===e[4]&&"-"===e[7]&&(e+="T00:00:00");let t=new Date(e),r=null;if(isNaN(t.getTime())){const o=/^\s*(\d+[^\w\s:]\d+[^\w\s:]\d+)?\s*(\d+:\d+(?::\d+(?:\.\d+)?)?)?\s*([AaPp][Mm])?\s*(Z|[+-]([01]?\d):?([0-5]?\d)?)?\s*$/.exec(e);if(null!=o){let e,n=0;if(null!=o[2]){const e=o[2].split(":");n=3600*parseInt(e[0],10)+60*parseInt(e[1]||"0",10)+parseFloat(e[2]||"0"),null!=o[3]&&"PM"===o[3].toUpperCase()&&(n+=720)}if(null!=o[4]){if(null!=o[1])e=new Date(o[1]+" UTC");else{const n=new Date;e=new Date(n.getUTCFullYear()+"/"+(n.getUTCMonth()+1)+"/"+n.getUTCDate())}if("Z"===o[4])r="Z";else{let e=60*parseInt(o[5],10)+parseInt(o[6]||"0",10);"-"===o[4][0]&&(e*=-1),r=e,n-=60*e}}else if(null!=o[1])e=new Date(o[1]);else{const n=new Date;e=new Date(n.getFullYear()+"/"+(n.getMonth()+1)+"/"+n.getDate())}t=new Date(e.getTime()+1e3*n),t=new Date(t.getTime()+6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))}else n();isNaN(t.getTime())&&n()}return[t,r]}function $n(e,n){try{return n.contents=function(e,n=!1){const[t,r]=Rn(e),o=null!=r?n&&"Z"===r?1:2:0;return Pn(t.getTime(),o)}(e),!0}catch(e){return!1}}const Gn=Symbol("numeric");function Hn(e){return"number"==typeof e||(null==e?void 0:e[Gn])}function jn(e,n){return"number"==typeof e?e*n:e[Gn]().multiply(n)}function Ln(e,n){return"number"==typeof e?e.toFixed(n):e[Gn]().toFixed(n)}function Bn(e,n){return"number"==typeof e?e.toPrecision(n):e[Gn]().toPrecision(n)}function Vn(e,n){return"number"==typeof e?e.toExponential(n):e[Gn]().toExponential(n)}function zn(e){return"number"==typeof e?(Number(e)>>>0).toString(16):e[Gn]().toHex()}function Wn(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function qn(e,n,t=0){if(null==n)throw new Error("Input cannot ve null");if(!e.global)throw new Error("Non-global RegExp");e.lastIndex=t;const r=[];let o,i=-1;for(;null!=(o=e.exec(n));)o.index===i?e.lastIndex++:(i=o.index,r.push(o));return r}const Zn=/(^|[^%])%([0+\- ]*)(\*|\d+)?(?:\.(\d+))?(\w)/g,Jn=/\{(\d+)(,-?\d+)?(?:\:([a-zA-Z])(\d{0,2})|\:(.+?))?\}/g;function Yn(e,n){return function(e,n){return"number"==typeof e?e<n?-1:e>n?1:0:e.CompareTo(n)}(e,n)<0}function Xn(e){return{input:e,cont:(n=e,e=>{Zn.lastIndex=0;const t=[],r=[];let o=0,i=Zn.exec(n);for(;i;){const e=i.index+(i[1]||"").length;t.push(n.substring(o,e).replace(/%%/g,"%")),r.push(i),o=Zn.lastIndex,Zn.lastIndex-=1,i=Zn.exec(n)}return 0===t.length?e(n.replace(/%%/g,"%")):(t.push(n.substring(o).replace(/%%/g,"%")),tt(e,t,r))})};var n}function Kn(e,n){return"string"==typeof n?e(n):n.cont(e)}function Qn(e){return Kn((e=>e),e)}function et(e){return Kn((e=>{throw new Error(e)}),e)}function nt(e,n,t,r,o){let i="";if(n=n||"",o=o||"",Hn(e))switch("x"!==o.toLowerCase()&&(Yn(e,0)?(e=jn(e,-1),i="-"):n.indexOf(" ")>=0?i=" ":n.indexOf("+")>=0&&(i="+")),r=null==r?null:parseInt(r,10),o){case"f":case"F":e=Ln(e,r=null!=r?r:6);break;case"g":case"G":e=null!=r?Bn(e,r):Bn(e);break;case"e":case"E":e=null!=r?Vn(e,r):Vn(e);break;case"x":e=zn(e);break;case"X":e=zn(e).toUpperCase();break;default:e=String(e)}else e=e instanceof Date?Un(e):Cn(e);if(t="number"==typeof t?t:parseInt(t,10),isNaN(t))e=i+e;else{const r=n.indexOf("0")>=0,o=n.indexOf("-")>=0,s=o||!r?" ":"0";e="0"===s?i+(e=ot(e,t-i.length,s,o)):ot(i+e,t,s,o)}return e}function tt(e,n,t,r="",o=-1){return(...i)=>{let s=r;const u=n.slice(),l=t.slice();for(const e of i){const[,,n,t,r,i]=l[0];let c=t;if(o>=0)c=o,o=-1;else if("*"===c){if(e<0)throw new Error("Non-negative number required");o=e;continue}s+=u[0],s+=nt(e,n,c,r,i),u.splice(0,1),l.splice(0,1)}return 0===l.length?(s+=u[0],e(s)):tt(e,u,l,s,o)}}function rt(e,n){return Array.isArray(n)?n.join(e):Array.from(n).join(e)}function ot(e,n,t,r){t=t||" ",n-=e.length;for(let o=0;o<n;o++)e=r?e+t:t+e;return e}function it(e,n,t){return ot(e,n,t)}function st(e,n,t,r){if(r="number"==typeof r?r:0,(t="number"==typeof t?t:void 0)&&t<0)throw new Error("Count cannot be less than zero");if(0===t)return[];const o=1==(1&r),i=2==(2&r);n=(n=n||[]).filter((e=>e)).map(Wn),n=n.length>0?n:["\\s"];const s=[],u=new RegExp(n.join("|"),"g");let l=!0,c=0;do{const n=u.exec(e);if(null===n){const n=i?e.substring(c).trim():e.substring(c);(!o||n.length>0)&&s.push(n),l=!1}else{const r=i?e.substring(c,n.index).trim():e.substring(c,n.index);(!o||r.length>0)&&(null!=t&&s.length+1===t?(s.push(i?e.substring(c).trim():e.substring(c)),l=!1):s.push(r)),c=u.lastIndex}}while(l);return s}function ut(e,n,t){if(n+(t||0)>e.length)throw new Error("Invalid startIndex and/or length");return null!=t?e.substr(n,t):e.substr(n)}function lt(e,n){return"function"==typeof e?new e(n):new Array(n)}function ct(e,n,t,r){const o=0|n;return e.fill(r,o,o+t)}function at(e,n,t){const r=0|n.length,o=lt(t,r);for(let t=0;t<=r-1;t++)o[t]=e(n[t]);return o}function ft(e,n,t){return t.reduce(e,n)}function dt(e,n,t){if(null==n)return null==t;if(null==t)return!1;{let r=0,o=!0;const i=0|n.length,s=0|t.length;if(i>s)return!1;if(i<s)return!1;for(;r<i&&o;)o=e(n[r],t[r]),r=r+1|0;return o}}class ht extends xn{constructor(e,n){super(),this.head=e,this.tail=n}toString(){return"["+rt("; ",this)+"]"}Equals(e){return this===e||((e,n)=>{e:for(;;){const t=e,r=n,o=[t.tail,r.tail];if(null!=o[0]){if(null!=o[1]){const i=o[0],s=o[1];if(an(t.head,r.head)){e=i,n=s;continue e}return!1}return!1}return null==o[1]}})(this,e)}GetHashCode(){return 0|((e,n,t)=>{for(;;){const r=e,o=n,i=t,s=i.tail;if(null==s)return 0|o;{const u=s;if(r>18)return 0|o;e=r+1,n=(o<<1)+sn(i.head)+631*r,t=u}}})(0,0,this)}toJSON(e){return Array.from(this)}CompareTo(e){return 0|((e,n)=>{e:for(;;){const t=e,r=n,o=[t.tail,r.tail];if(null!=o[0]){if(null!=o[1]){const i=o[0],s=o[1],u=0|mn(t.head,r.head);if(0===u){e=i,n=s;continue e}return 0|u}return 1}return null!=o[1]?-1:0}})(this,e)}GetEnumerator(){return new mt(this)}[Symbol.iterator](){return Ye(this.GetEnumerator())}"System.Collections.IEnumerable.GetEnumerator"(){return Je(this)}}class mt{constructor(e){this.xs=e,this.it=this.xs,this.current=null}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current}"System.Collections.IEnumerator.get_Current"(){return this.current}"System.Collections.IEnumerator.MoveNext"(){const e=this,n=e.it.tail;if(null!=n){const t=n;return e.current=e.it.head,e.it=t,!0}return!1}"System.Collections.IEnumerator.Reset"(){const e=this;e.it=e.xs,e.current=null}Dispose(){}}function pt(){return new ht(null,void 0)}function wt(e,n){return new ht(e,n)}function gt(e){return null==e.tail}function yt(e){if(null!=e.tail)return e.head;throw new Error("Collection was empty.\\nParameter name: list")}function _t(e){const n=e.tail;if(null!=n)return n;throw new Error("Collection was empty.\\nParameter name: list")}function vt(){return pt()}function Ct(e,n){return wt(e,n)}function bt(e){return wt(e,pt())}function xt(e){return gt(e)}function St(e){return yt(e)}function Et(e){return _t(e)}function At(e){const n=0|function(e){return 0|((e,n)=>{for(;;){const t=e,r=n.tail;if(null==r)return 0|t;e=t+1,n=r}})(0,e)}(e),t=ct(new Array(n),0,n,null);return((e,n)=>{for(;;){const r=e,o=n;if(gt(o))break;t[r]=yt(o),e=r+1,n=_t(o)}})(0,e),t}function kt(e,n,t){let r=n,o=t;for(;!gt(o);)r=e(r,yt(o)),o=_t(o);return r}function It(e){return kt(((e,n)=>wt(n,e)),pt(),e)}function Nt(e,n){kt(((n,t)=>{e(t)}),void 0,n)}function Tt(e,n){let t=n;for(let n=e.length-1;n>=0;n--)t=wt(e[n],t);return t}function Ot(e){return Tt(e,pt())}function Mt(e,n){return kt(((e,n)=>wt(n,e)),n,It(e))}function Dt(e,n){const t=pt(),r=kt(((n,t)=>{const r=new ht(e(t),void 0);return n.tail=r,r}),t,n),o=pt();return r.tail=o,_t(t)}function Ft(e,n){return function(e,n){return(n=>{e:for(;;){const t=n;if(gt(t))return;{const r=e(yt(t));if(null==r){n=_t(t);continue e}return r}}})(n)}((n=>e(n)?kn(n):void 0),n)}function Ut(e,n,t){return null!=function(e,n){return((n,t)=>{for(;;){const r=n,o=t;if(gt(o))return;if(e(yt(o)))return r;n=r+1,t=_t(o)}})(0,n)}((n=>t.Equals(e,n)),n)}function Pt(){return e=mn,{Compare:(n,t)=>e(n,t)};var e}const Rt="The input sequence has an insufficient number of elements.";function $t(){throw new Error("Enumeration has not started. Call MoveNext.")}function Gt(){throw new Error("Enumeration already finished.")}class Ht{constructor(e){this.f=e}toString(){let e=0,n="seq [";const t=Je(this);try{for(;e<4&&t["System.Collections.IEnumerator.MoveNext"]();)e>0&&(n+="; "),n+=Cn(t["System.Collections.Generic.IEnumerator`1.get_Current"]()),e=e+1|0;return 4===e&&(n+="; ..."),n+"]"}finally{We(t)}}GetEnumerator(){return this.f()}[Symbol.iterator](){return Ye(this.GetEnumerator())}"System.Collections.IEnumerable.GetEnumerator"(){return this.f()}}class jt{constructor(e,n,t){this.current=e,this.next=n,this.dispose=t}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current()}"System.Collections.IEnumerator.get_Current"(){return this.current()}"System.Collections.IEnumerator.MoveNext"(){return this.next()}"System.Collections.IEnumerator.Reset"(){!function(){throw new Error("Reset is not supported on this enumerator.")}()}Dispose(){this.dispose()}}function Lt(e,n,t){return new jt(e,n,t)}function Bt(e,n,t){let r,o=!1,i=kn(e());const s=()=>{if(null!=i){const e=In(i);try{t(e)}finally{i=void 0}}},u=()=>{try{s()}finally{r=void 0}};return Lt((()=>(o||$t(),null!=r?In(r):Gt())),(()=>{if(o||(o=!0),null!=i){const e=In(i);let t;try{t=n(e)}catch(e){throw u(),e}return null!=t?(r=t,!0):(u(),!1)}return!1}),s)}function Vt(e){return function(e){return new Ht(e)}(e)}function zt(e){return n="source",null==e&&function(e){throw new Error(e)}(n),Je(e);var n}function Wt(e){return Vt((()=>Je(e())))}function qt(e){return Vt((()=>function(e){let n,t,r,o=!1,i=!1;const s=()=>{if(i=!0,null!=t){const e=t;try{We(e)}finally{t=void 0}}if(null!=n){const e=n;try{We(e)}finally{n=void 0}}};return Lt((()=>(o?i&&Gt():$t(),null!=r?In(r):Gt())),(()=>{let u;if(o||(o=!0),i)return!1;{let o;for(;null==o;){const i=[n,t];if(null!=i[0])if(null!=i[1]){const e=i[1];if(e["System.Collections.IEnumerator.MoveNext"]())r=kn(e["System.Collections.Generic.IEnumerator`1.get_Current"]()),o=!0;else try{We(e)}finally{t=void 0}}else{const e=i[0];e["System.Collections.IEnumerator.MoveNext"]()?(u=e["System.Collections.Generic.IEnumerator`1.get_Current"](),t=Je(u)):(s(),o=!1)}else n=Je(e)}return In(o)}}),(()=>{i||s()}))}(e)))}function Zt(e){return Wt((()=>function(e,n){const t=lt(void 0,1);return t[0]=e,t}(e)))}function Jt(e){return Be(e)?Ot(e):e instanceof ht?e:function(e){let n,t;if(Be(e))return Ot(e);if(e instanceof ht)return e;{const r=pt();let o=r;const i=Je(e);try{for(;i["System.Collections.IEnumerator.MoveNext"]();){const e=i["System.Collections.Generic.IEnumerator`1.get_Current"]();n=o,t=new ht(e,void 0),n.tail=t,o=t}}finally{We(i)}const s=o,u=pt();return s.tail=u,_t(r)}}(e)}function Yt(e,n,t){return Vt((()=>{let r=-1;return Bt(e,(e=>(r=r+1|0,n(r,e))),t)}))}function Xt(e,n){return qt([e,n])}function Kt(e,n,t){const r=zt(n);try{let n=!1;for(;!n&&r["System.Collections.IEnumerator.MoveNext"]();)n=t.Equals(e,r["System.Collections.Generic.IEnumerator`1.get_Current"]());return n}finally{We(r)}}function Qt(e,n,t){const r=zt(t);try{let t=n;for(;r["System.Collections.IEnumerator.MoveNext"]();)t=e(t,r["System.Collections.Generic.IEnumerator`1.get_Current"]());return t}finally{We(r)}}function er(e,n){Qt(((n,t)=>{e(t)}),void 0,n)}function nr(e,n){return t=()=>zt(n),r=n=>n["System.Collections.IEnumerator.MoveNext"]()?kn(e(n["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0,o=e=>{We(e)},Vt((()=>Bt(t,r,o)));var t,r,o}function tr(e,n){return Yt((()=>zt(n)),((n,t)=>t["System.Collections.IEnumerator.MoveNext"]()?kn(e(n,t["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0),(e=>{We(e)}))}function rr(e){return Wt((()=>function(e){return e.slice().reverse()}(function(e){return e instanceof ht?At(e):Array.from(e)}(e))))}function or(e,n){return Vt((()=>{const t=zt(n);try{for(let n=1;n<=e;n++)if(!t["System.Collections.IEnumerator.MoveNext"]())throw new Error(Rt+"\\nParameter name: source");return function(e,n){return Lt((()=>n["System.Collections.Generic.IEnumerator`1.get_Current"]()),(()=>n["System.Collections.IEnumerator.MoveNext"]()),(()=>{try{We(n)}finally{e()}}))}((()=>{}),t)}catch(e){throw We(t),e}}))}Symbol.iterator;class ir{constructor(e,n){this.k=e,this.v=n}}function sr(e,n){return new ir(e,n)}function ur(e){return e.k}function lr(e){return e.v}class cr extends ir{constructor(e,n,t,r,o){super(e,n),this.left=t,this.right=r,this.h=0|o}}function ar(e,n,t,r,o){return new cr(e,n,t,r,o)}function fr(e){return e.left}function dr(e){return e.right}function hr(e){return e.h}function mr(e,n){e:for(;;){const t=e,r=n;if(null!=r){const o=r;if(o instanceof cr){e=mr(t+1,fr(o)),n=dr(o);continue e}return t+1|0}return 0|t}}function pr(e){return mr(0,e)}function wr(e,n,t,r){let o,i;if(null!=e){const n=e;o=n instanceof cr?hr(n):1}else o=0;if(null!=r){const e=r;i=e instanceof cr?hr(e):1}else i=0;const s=0|(o<i?i:o);return 0===s?sr(n,t):ar(n,t,e,r,s+1)}function gr(e,n,t,r){let o,i,s,u,l,c;if(null!=e){const n=e;l=n instanceof cr?hr(n):1}else l=0;if(null!=r){const e=r;c=e instanceof cr?hr(e):1}else c=0;if(c>l+2){const s=In(r);if(s instanceof cr){if(o=fr(s),(null!=o?(i=o,i instanceof cr?hr(i):1):0)>l+1){const r=In(fr(s));if(r instanceof cr)return wr(wr(e,n,t,fr(r)),ur(r),lr(r),wr(dr(r),ur(s),lr(s),dr(s)));throw new Error("internal error: Map.rebalance")}return wr(wr(e,n,t,fr(s)),ur(s),lr(s),dr(s))}throw new Error("internal error: Map.rebalance")}if(l>c+2){const o=In(e);if(o instanceof cr){if(s=dr(o),(null!=s?(u=s,u instanceof cr?hr(u):1):0)>c+1){const e=In(dr(o));if(e instanceof cr)return wr(wr(fr(o),ur(o),lr(o),fr(e)),ur(e),lr(e),wr(dr(e),n,t,r));throw new Error("internal error: Map.rebalance")}return wr(fr(o),ur(o),lr(o),wr(dr(o),n,t,r))}throw new Error("internal error: Map.rebalance")}return wr(e,n,t,r)}function yr(e,n,t,r){if(null!=r){const o=r,i=0|e.Compare(n,ur(o));return o instanceof cr?i<0?gr(yr(e,n,t,fr(o)),ur(o),lr(o),dr(o)):0===i?ar(n,t,fr(o),dr(o),hr(o)):gr(fr(o),ur(o),lr(o),yr(e,n,t,dr(o))):i<0?ar(n,t,void 0,r,2):0===i?sr(n,t):ar(n,t,r,void 0,2)}return sr(n,t)}function _r(e,n,t){e:for(;;){const r=e,o=n,i=t;if(null!=i){const s=i,u=0|r.Compare(o,ur(s));if(0===u)return kn(lr(s));if(s instanceof cr){e=r,n=o,t=u<0?fr(s):dr(s);continue e}return}return}}function vr(e){if(null!=e){const n=e;if(n instanceof cr){if(null==fr(n))return[ur(n),lr(n),dr(n)];{const e=vr(fr(n));return[e[0],e[1],wr(e[2],ur(n),lr(n),dr(n))]}}return[ur(n),lr(n),void 0]}throw new Error("internal error: Map.spliceOutSuccessor")}function Cr(e,n,t,r){if(null!=r){const o=r;if(o instanceof cr){const r=0|e.Compare(n,ur(o));if(r<0)return gr(Cr(e,n,t,fr(o)),ur(o),lr(o),dr(o));if(0===r){const e=t(kn(lr(o)));if(null!=e)return ar(n,In(e),fr(o),dr(o),hr(o));if(null==fr(o))return dr(o);if(null==dr(o))return fr(o);{const e=vr(dr(o));return wr(fr(o),e[0],e[1],e[2])}}return gr(fr(o),ur(o),lr(o),Cr(e,n,t,dr(o)))}{const i=0|e.Compare(n,ur(o));if(i<0){const e=t(void 0);return null!=e?ar(n,In(e),void 0,r,2):r}if(0===i){const e=t(kn(lr(o)));return null!=e?sr(n,In(e)):void 0}{const e=t(void 0);return null!=e?ar(n,In(e),r,void 0,2):r}}}{const e=t(void 0);return null!=e?sr(n,In(e)):r}}function br(e,n){e:for(;;){const t=e,r=n;if(null!=r){const o=r;if(o instanceof cr){br(t,fr(o)),t(ur(o),lr(o)),e=t,n=dr(o);continue e}t(ur(o),lr(o))}break}}function xr(e,n){br(e,n)}function Sr(e,n){e:for(;;){const t=e,r=n;if(null!=r){const o=r;if(o instanceof cr){const r=Sr(t,fr(o));if(null==r){const r=t(ur(o),lr(o));if(null==r){e=t,n=dr(o);continue e}return r}return r}return t(ur(o),lr(o))}return}}function Er(e,n){return Sr(e,n)}function Ar(e,n){if(null!=n){const t=n;if(t instanceof cr){const n=Ar(e,fr(t)),r=e(ur(t),lr(t)),o=Ar(e,dr(t));return ar(ur(t),r,n,o,hr(t))}return sr(ur(t),e(ur(t),lr(t)))}}function kr(e,n){return Ar(e,n)}function Ir(e,n){let t;for(let r=0;r<=n.length-1;r++){const o=n[r];t=yr(e,o[0],o[1],t)}return t}class Nr extends xn{constructor(e,n){super(),this.stack=e,this.started=n}}function Tr(e){e:for(;;){const n=e;if(xt(n))return vt();{const t=Et(n),r=St(n);if(null!=r){const o=r;if(o instanceof cr){e=Tt([fr(o),sr(ur(o),lr(o)),dr(o)],t);continue e}return n}e=t;continue e}}}function Or(e){return new Nr(Tr(bt(e)),!1)}function Mr(e){if(e.started){const n=e.stack;if(xt(n))return function(){throw new Error("enumeration already finished")}();if(null!=St(n)){const e=St(n);if(e instanceof cr)throw new Error("Please report error: Map iterator, unexpected stack for current");return[ur(e),lr(e)]}throw new Error("Please report error: Map iterator, unexpected stack for current")}return function(){throw new Error("enumeration not started")}()}function Dr(e){let n=Or(e);return{"System.Collections.Generic.IEnumerator`1.get_Current":()=>Mr(n),"System.Collections.IEnumerator.get_Current":()=>Mr(n),"System.Collections.IEnumerator.MoveNext":()=>function(e){if(e.started){const n=e.stack;if(xt(n))return!1;if(null!=St(n)){if(St(n)instanceof cr)throw new Error("Please report error: Map iterator, unexpected stack for moveNext");return e.stack=Tr(Et(n)),!xt(e.stack)}throw new Error("Please report error: Map iterator, unexpected stack for moveNext")}return e.started=!0,!xt(e.stack)}(n),"System.Collections.IEnumerator.Reset"(){n=Or(e)},Dispose(){}}}class Fr{constructor(e,n){this.comparer=e,this.tree=n}GetHashCode(){return 0|function(e){const n=(e,n)=>(e<<1)+n+631;let t=0;const r=Je(e);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const e=r["System.Collections.Generic.IEnumerator`1.get_Current"]();t=0|n(t,sn(e[0])),t=0|n(t,sn(e[1]))}}finally{We(r)}return 0|t}(this)}Equals(e){if(!(e instanceof Fr))return!1;{const n=Je(this);try{const t=Je(e);try{const e=()=>{const r=n["System.Collections.IEnumerator.MoveNext"]();if(r===t["System.Collections.IEnumerator.MoveNext"]()){if(r){const r=n["System.Collections.Generic.IEnumerator`1.get_Current"](),o=t["System.Collections.Generic.IEnumerator`1.get_Current"]();return!(!an(r[0],o[0])||!an(r[1],o[1]))&&e()}return!0}return!1};return e()}finally{We(t)}}finally{We(n)}}}toString(){return"map ["+rt("; ",nr((e=>function(e,...n){return"object"==typeof e&&n.length>0&&(e=n[0],n.shift()),e.replace(Jn,((e,t,r,o,i,s)=>{if(t<0||t>=n.length)throw new Error("Index must be greater or equal to zero and less than the arguments' length.");let u=n[t];if(Hn(u))switch(i=null==i?null:parseInt(i,10),o){case"f":case"F":u=Ln(u,i=null!=i?i:2);break;case"g":case"G":u=null!=i?Bn(u,i):Bn(u);break;case"e":case"E":u=null!=i?Vn(u,i):Vn(u);break;case"p":case"P":i=null!=i?i:2,u=Ln(jn(u,100),i)+" %";break;case"d":case"D":u=null!=i?it(String(u),i,"0"):String(u);break;case"x":case"X":u=null!=i?it(zn(u),i,"0"):zn(u),"X"===o&&(u=u.toUpperCase());break;default:if(s){let e="";u=s.replace(/([0#,]+)(\.[0#]+)?/,((n,t,r)=>{Yn(u,0)&&(u=jn(u,-1),e="-"),r=null==r?"":r.substring(1),u=Ln(u,Math.max(r.length,0));let[o,i]=u.split(".");i||(i=""),o=it(o,t.replace(/,/g,"").replace(/^#+/,"").length,"0");const s=r.replace(/#+$/,"").length;if(s>i.length?i=function(e,n,t){return ot(e,n,"0",!0)}(i,s):s<i.length&&(i=i.substring(0,s)+i.substring(s).replace(/0+$/,"")),t.indexOf(",")>0){const e=o.length%3,n=Math.floor(o.length/3);let t=e>0?o.substr(0,e)+(n>0?",":""):"";for(let r=0;r<n;r++)t+=o.substr(e+3*r,3)+(r<n-1?",":"");o=t}return i.length>0?o+"."+i:o})),u=e+u}}else u=u instanceof Date?Un(u,s||o):Cn(u);return r=parseInt((r||" ").substring(1),10),isNaN(r)||(u=ot(String(u),Math.abs(r)," ",r<0)),u}))}("({0}, {1})",e[0],e[1])),this))+"]"}get[Symbol.toStringTag](){return"FSharpMap"}toJSON(e){return Array.from(this)}GetEnumerator(){return Dr(this.tree)}[Symbol.iterator](){return Ye(this.GetEnumerator())}"System.Collections.IEnumerable.GetEnumerator"(){return Dr(this.tree)}CompareTo(e){const n=this;if(e instanceof Fr)return 0|function(e,n,t){const r=zt(n);try{const n=zt(t);try{let t=0,o=r["System.Collections.IEnumerator.MoveNext"](),i=n["System.Collections.IEnumerator.MoveNext"]();for(;0===t&&o&&i;)t=0|e(r["System.Collections.Generic.IEnumerator`1.get_Current"](),n["System.Collections.Generic.IEnumerator`1.get_Current"]()),0===t&&(o=r["System.Collections.IEnumerator.MoveNext"](),i=n["System.Collections.IEnumerator.MoveNext"]());return 0|(0!==t?t:o?1:i?-1:0)}finally{We(n)}}finally{We(r)}}(((e,t)=>{const r=0|n.comparer.Compare(e[0],t[0]);return 0|(0!==r?r:mn(e[1],t[1]))}),n,e);throw new Error("not comparable\\nParameter name: obj")}"System.Collections.Generic.ICollection`1.Add2B595"(e){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Clear"(){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Remove2B595"(e){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Contains2B595"(e){return Gr(this,e[0])&&an(Rr(this,e[0]),e[1])}"System.Collections.Generic.ICollection`1.CopyToZ2E171D71"(e,n){!function(e,n,t){let r=t;xr(((e,t)=>{n[r]=[e,t],r=r+1|0}),e)}(this.tree,e,n)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return 0|$r(this)}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return 0|$r(this)}get size(){return 0|$r(this)}clear(){throw new Error("Map cannot be mutated")}delete(e){throw new Error("Map cannot be mutated")}entries(){return nr((e=>[e[0],e[1]]),this)}get(e){return Rr(this,e)}has(e){return Gr(this,e)}keys(){return nr((e=>e[0]),this)}set(e,n){throw new Error("Map cannot be mutated")}values(){return nr((e=>e[1]),this)}forEach(e,n){const t=this;er((n=>{e(n[1],n[0],t)}),t)}}function Ur(e,n){return new Fr(e,n)}function Pr(e){const n=Pt();return Ur(n,function(e,n){if(Be(n))return Ir(e,n);if(n instanceof ht)return function(e,n){return kt(((n,t)=>yr(e,t[0],t[1],n)),void 0,n)}(e,n);{const t=Je(n);try{return function(e,n,t){for(;;){const r=e,o=n,i=t;if(!i["System.Collections.IEnumerator.MoveNext"]())return o;{const s=i["System.Collections.Generic.IEnumerator`1.get_Current"]();e=r,n=yr(r,s[0],s[1],o),t=i}}}(e,void 0,t)}finally{We(t)}}}(n,e))}function Rr(e,n){return function(e,n,t){const r=_r(e,n,t);if(null==r)throw new Error;return In(r)}(e.comparer,n,e.tree)}function $r(e){return pr(e.tree)}function Gr(e,n){return function(e,n,t){e:for(;;){const r=e,o=n,i=t;if(null!=i){const s=i,u=0|r.Compare(o,ur(s));if(s instanceof cr){if(u<0){e=r,n=o,t=fr(s);continue e}if(0===u)return!0;e=r,n=o,t=dr(s);continue e}return 0===u}return!1}}(e.comparer,n,e.tree)}function Hr(e,n){return _r(e.comparer,n,e.tree)}function jr(e,n,t){return function(e,n,t){return Ur(e.comparer,yr(e.comparer,n,t,e.tree))}(t,e,n)}function Lr(e,n,t){return function(e,n,t){return Ur(e.comparer,Cr(e.comparer,n,t,e.tree))}(t,e,n)}function Br(e,n){return Hr(n,e)}function Vr(e,n){return function(e,n){return Ur(e.comparer,kr(n,e.tree))}(n,e)}function zr(){return Fr.empty}Fr.empty=Ur(Pt(),void 0);class Wr{constructor(e,n,t,r,o,i,s){this.fullname=e,this.generics=n,this.construct=t,this.parent=r,this.fields=o,this.cases=i,this.enumCases=s}toString(){return oo(this)}GetHashCode(){return Zr(this)}Equals(e){return Jr(this,e)}}function qr(e){return null!=e.generics?e.generics:[]}function Zr(e){return on([tn(e.fullname),...qr(e).map(Zr)])}function Jr(e,n){return""===e.fullname?""===n.fullname&&ln(po(e),po(n),(([e,n],[t,r])=>e===t&&Jr(n,r))):e.fullname===n.fullname&&ln(qr(e),qr(n),Jr)}function Yr(e,n,t,r){return new Wr(e,n,t,void 0,r)}function Xr(...e){return new Wr("",void 0,void 0,void 0,(()=>e))}function Kr(e){return new Wr("Microsoft.FSharp.Core.FSharpOption`1",[e])}function Qr(e){return new Wr("Microsoft.FSharp.Collections.FSharpList`1",[e])}const eo=new Wr("System.Object"),no=(new Wr("Microsoft.FSharp.Core.Unit"),new Wr("System.Char"),new Wr("System.String")),to=new Wr("System.Boolean");function ro(e){if(Array.isArray(e))return e[0];if(e instanceof Wr){const n=so(e);if(null!=n)return ro(n)+"[]";{const n=e.fullname.lastIndexOf(".");return-1===n?e.fullname:e.fullname.substr(n+1)}}return e.name}function oo(e){const n=so(e);return null!=n?oo(n)+"[]":null==e.generics||0===e.generics.length?e.fullname:e.fullname+"["+e.generics.map((e=>oo(e))).join(",")+"]"}function io(e){return null!=so(e)}function so(e){var n;return"[]"===e.fullname&&1===(null===(n=e.generics)||void 0===n?void 0:n.length)?e.generics[0]:void 0}function uo(e){return null!=e.generics&&e.generics.length>0}function lo(e){return null!=e.enumCases&&e.enumCases.length>0}function co(e){return null==e.generics?e:new Wr(e.fullname,e.generics.map((()=>eo)))}function ao(e){var n;return null===(n=e.generics)||void 0===n?void 0:n[0]}function fo(e){if(lo(e)&&null!=e.enumCases)return e.enumCases.map((e=>e[1]));throw new Error(`${e.fullname} is not an enum type`)}function ho(e,n){const t=parseInt(n,10);return function(e,n){if(null!=e.enumCases){if("string"==typeof n){for(const t of e.enumCases)if(t[0]===n)return t;throw new Error(`'${n}' was not found in ${e.fullname}`)}for(const t of e.enumCases)if(t[1]===n)return t;return["",n]}throw new Error(`${e.fullname} is not an enum type`)}(e,isNaN(t)?n:t)[1]}function mo(e){if(null!=e.cases)return e.cases();throw new Error(`${e.fullname} is not an F# union type`)}function po(e){if(null!=e.fields)return e.fields();throw new Error(`${e.fullname} is not an F# record type`)}function wo(e){if(_o(e)&&null!=e.generics)return e.generics;throw new Error(`${e.fullname} is not a tuple type`)}function go(e){return e instanceof Wr?null!=e.cases:e instanceof bn}function yo(e){return e instanceof Wr?null!=e.fields:e instanceof xn}function _o(e){return e.fullname.startsWith("System.Tuple")}function vo(e){return null==e.fields?[]:e.fields}new Wr("System.SByte"),new Wr("System.Byte"),new Wr("System.Int16"),new Wr("System.UInt16"),new Wr("System.Int32"),new Wr("System.UInt32"),new Wr("System.Single"),new Wr("System.Double"),new Wr("System.Decimal");class Co extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Ok","Error"]}}function bo(e,n){return 0===n.tag?new Co(0,e(n.fields[0])):new Co(1,n.fields[0])}class xo extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["BadPrimitive","BadPrimitiveExtra","BadType","BadField","BadPath","TooSmallArray","FailMessage","BadOneOf"]}}class So extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["PascalCase","CamelCase","SnakeCase"]}}class Eo{constructor(){this.cache=new Map([])}}function Ao(){return new Eo}function ko(e){return e.slice(void 0,1).toLowerCase()+e.slice(1,e.length)}function Io(e,n){switch(e.tag){case 2:return function(e,n,t,r,o=0){if("string"==typeof e){const t=e;e=function(e,n=0){if(0!=(-284&n))throw new Error("RegexOptions only supports: IgnoreCase, Multiline, Compiled, Singleline and ECMAScript");let t="gu";return t+=1&n?"i":"",t+=2&n?"m":"",t+=16&n?"s":"",new RegExp(e,t)}(n,null!=r?r:0),n=t,r=void 0}if("function"==typeof t)return r=null==r?-1:r,n.substring(0,o)+n.substring(o).replace(e,(function(){let e=arguments[0];if(r){r--;const n=[],o=arguments.length,i="string"!=typeof arguments[o-1];let s=i?o-3:o-2;for(let e=0;e<s;e++)n.push(arguments[e]);n.index=arguments[s++],n.input=arguments[s++],i&&(n.groups=arguments[s]),e=t(n)}return e}));if(t=t.replace(/\$0/g,(e=>"$&")).replace(/\${([^}]+)}/g,"$<$1>"),null!=r){let i;const s=n.substring(o),u=qn(e,s),l=qn.length>r?(i=u[r-1],s.substring(0,i.index+i[0].length)):s;return n.substring(0,o)+l.replace(e,t)+n.substring(o+l.length)}return n.replace(e,t)}(ko(n),"[A-Z]","_$0").toLowerCase();case 0:return n;default:return ko(n)}}Ao(),Ao();const No=/^[\(\{]{0,2}[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[\)\}]{0,2}$/,To=/^([0-9a-f]{8})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{12})$/,Oo=/^\{0x[0-9a-f]{8},(0x[0-9a-f]{4},){2}\{(0x[0-9a-f]{2},){7}0x[0-9a-f]{2}\}\}$/;function Mo(e,n){try{return n.contents=function(e){function n(e){return e.replace(To,"$1-$2-$3-$4-$5")}const t=e.trim().toLowerCase();if(No.test(t))return function(e,...n){if(0===n.length)return e.trim();const t="["+Wn(n.join(""))+"]+";return e.replace(new RegExp("^"+t),"").replace(new RegExp(t+"$"),"")}(t,"{","}","(",")");if(To.test(t))return n(t);if(Oo.test(t))return n(t.replace(/[\{\},]|0x/g,""));throw new Error("Guid should contain 32 digits with 4 dashes: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")}(e),!0}catch(e){return!1}}var Do;function Fo(e,n){switch(n){case 8:return e?[0,255]:[-128,127];case 16:return e?[0,65535]:[-32768,32767];case 32:return e?[0,4294967295]:[-2147483648,2147483647];default:throw new Error("Invalid bit size.")}}function Uo(e,n,t,r,o){try{return o.contents=function(e,n,t,r,o){const i=function(e,n,t){const r=/^\s*([\+\-])?(0[xXoObB])?([0-9a-fA-F]+)\s*$/.exec(e.replace(/_/g,""));if(null!=r){const[,,e,o]=r;t=t||function(e,n){if(n&Do.AllowHexSpecifier)return 16;switch(e){case"0b":case"0B":return 2;case"0o":case"0O":return 8;case"0x":case"0X":return 16;default:return 10}}(e,n);const i=function(e){switch(e){case 2:return/[^0-1]/;case 8:return/[^0-7]/;case 10:return/[^0-9]/;case 16:return/[^0-9a-fA-F]/;default:throw new Error("Invalid Base.")}}(t);if(!i.test(o))return function(e,n){const[,t,r,o]=e;return{sign:t||"",prefix:r||"",digits:o,radix:n}}(r,t)}return null}(e,n,void 0);if(null!=i){let e=Number.parseInt(i.sign+i.digits,i.radix);if(!Number.isNaN(e)){const[n,o]=Fo(!0,r);!t&&10!==i.radix&&e>=n&&e<=o&&(e=e<<32-r>>32-r);const[s,u]=Fo(t,r);if(e>=s&&e<=u)return e}}throw new Error("Input string was not in a correct format.")}(e,n,t,r),!0}catch(e){return!1}}function Po(e,n){!function(e){if(null!=e&&0!==e){if(e%6e4!=0)throw new Error("Offset must be specified in whole minutes.");if(Math.abs(e/36e5)>14)throw new Error("Offset must be within plus or minus 14 hours.")}}(n);const t=new Date(e);return t.offset=null!=n?n:-6e4*(new Date).getTimezoneOffset(),t}function Ro(e,n){try{return n.contents=function(e){const[n,t]=Rn(e),r=null==t?-6e4*n.getTimezoneOffset():"Z"===t?0:6e4*t;return Po(n.getTime(),r)}(e),!0}catch(e){return!1}}!function(e){e[e.AllowHexSpecifier=512]="AllowHexSpecifier"}(Do||(Do={}));var $o=null;try{$o=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(u){}function Go(e,n,t){this.low=0|e,this.high=0|n,this.unsigned=!!t}function Ho(e){return!0===(e&&e.__isLong__)}Go.prototype.GetHashCode=function(){let e=this.unsigned?1:0;return e=(e<<5)+e^this.high,e=(e<<5)+e^this.low,e},Go.prototype.Equals=function(e){return hi(this,e)},Go.prototype.CompareTo=function(e){return gi(this,e)},Go.prototype.toString=function(e){return ci(this,e)},Go.prototype.toJSON=function(){return ci(this)},Go.prototype[Gn]=function(){const e=this;return{multiply:n=>Ci(e,n),toPrecision:n=>String(e)+(0).toPrecision(n).substr(1),toExponential:n=>String(e)+(0).toExponential(n).substr(1),toFixed:n=>String(e)+(0).toFixed(n).substr(1),toHex:()=>{return ci(e.unsigned?e:function(e,n,t){return t?function(e,n){return new Go(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,n)}(e,n):function(e,n){return new Go(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],n)}(e,n)}((n=e,t?function(e){var n=e.high,t=e.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&n,n>>>8&255,n>>>16&255,n>>>24]}(n):function(e){var n=e.high,t=e.low;return[n>>>24,n>>>16&255,n>>>8&255,255&n,t>>>24,t>>>16&255,t>>>8&255,255&t]}(n)),!0),16);var n,t}}},Go.prototype.__isLong__,Object.defineProperty(Go.prototype,"__isLong__",{value:!0});var jo={},Lo={};function Bo(e,n){var t,r,o;return n?(o=0<=(e>>>=0)&&e<256)&&(r=Lo[e])?r:(t=zo(e,(0|e)<0?-1:0,!0),o&&(Lo[e]=t),t):(o=-128<=(e|=0)&&e<128)&&(r=jo[e])?r:(t=zo(e,e<0?-1:0,!1),o&&(jo[e]=t),t)}function Vo(e,n){if(isNaN(e))return n?ei:Qo;if(n){if(e<0)return ei;if(e>=Yo)return ii}else{if(e<=-Xo)return si;if(e+1>=Xo)return oi}return e<0?yi(Vo(-e,n)):zo(e%Jo|0,e/Jo|0,n)}function zo(e,n,t){return new Go(e,n,t)}var Wo=Math.pow;function qo(e,n,t){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return Qo;if("number"==typeof n?(t=n,n=!1):n=!!n,(t=t||10)<2||36<t)throw RangeError("radix");var r=e.indexOf("-");if(r>0)throw Error("interior hyphen");if(0===r)return yi(qo(e.substring(1),n,t));for(var o=Vo(Wo(t,8)),i=Qo,s=0;s<e.length;s+=8){var u=Math.min(8,e.length-s),l=parseInt(e.substring(s,s+u),t);i=_i(u<8?Ci(i,Vo(Wo(t,u))):i=Ci(i,o),Vo(l))}return i.unsigned=n,i}function Zo(e,n){return"number"==typeof e?Vo(e,n):"string"==typeof e?qo(e,n):zo(e.low,e.high,"boolean"==typeof n?n:e.unsigned)}var Jo=4294967296,Yo=Jo*Jo,Xo=Yo/2,Ko=Bo(1<<24),Qo=Bo(0),ei=Bo(0,!0),ni=Bo(1),ti=Bo(1,!0),ri=Bo(-1),oi=zo(-1,2147483647,!1),ii=zo(-1,-1,!0),si=zo(0,-2147483648,!1);function ui(e){return e.unsigned?e.low>>>0:e.low}function li(e){return e.unsigned?(e.high>>>0)*Jo+(e.low>>>0):e.high*Jo+(e.low>>>0)}function ci(e,n){if((n=n||10)<2||36<n)throw RangeError("radix");if(ai(e))return"0";if(fi(e)){if(hi(e,si)){var t=Vo(n),r=bi(e,t),o=vi(Ci(r,t),e);return ci(r,n)+ui(o).toString(n)}return"-"+ci(yi(e),n)}for(var i=Vo(Wo(n,6),e.unsigned),s=e,u="";;){var l=bi(s,i),c=(ui(vi(s,Ci(l,i)))>>>0).toString(n);if(ai(s=l))return c+u;for(;c.length<6;)c="0"+c;u=""+c+u}}function ai(e){return 0===e.high&&0===e.low}function fi(e){return!e.unsigned&&e.high<0}function di(e){return 1==(1&e.low)}function hi(e,n){return Ho(n)||(n=Zo(n)),(e.unsigned===n.unsigned||e.high>>>31!=1||n.high>>>31!=1)&&e.high===n.high&&e.low===n.low}function mi(e,n){return gi(e,n)<0}function pi(e,n){return gi(e,n)>0}function wi(e,n){return gi(e,n)>=0}function gi(e,n){if(Ho(n)||(n=Zo(n)),hi(e,n))return 0;var t=fi(e),r=fi(n);return t&&!r?-1:!t&&r?1:e.unsigned?n.high>>>0>e.high>>>0||n.high===e.high&&n.low>>>0>e.low>>>0?-1:1:fi(vi(e,n))?-1:1}function yi(e){return!e.unsigned&&hi(e,si)?si:_i(function(e){return zo(~e.low,~e.high,e.unsigned)}(e),ni)}function _i(e,n){Ho(n)||(n=Zo(n));var t=e.high>>>16,r=65535&e.high,o=e.low>>>16,i=65535&e.low,s=n.high>>>16,u=65535&n.high,l=n.low>>>16,c=0,a=0,f=0,d=0;return f+=(d+=i+(65535&n.low))>>>16,a+=(f+=o+l)>>>16,c+=(a+=r+u)>>>16,c+=t+s,zo((f&=65535)<<16|(d&=65535),(c&=65535)<<16|(a&=65535),e.unsigned)}function vi(e,n){return Ho(n)||(n=Zo(n)),_i(e,yi(n))}function Ci(e,n){if(ai(e))return e.unsigned?ei:Qo;if(Ho(n)||(n=Zo(n)),$o)return zo($o.mul(e.low,e.high,n.low,n.high),$o.get_high(),e.unsigned);if(ai(n))return e.unsigned?ei:Qo;if(hi(e,si))return di(n)?si:Qo;if(hi(n,si))return di(e)?si:Qo;if(fi(e))return fi(n)?Ci(yi(e),yi(n)):yi(Ci(yi(e),n));if(fi(n))return yi(Ci(e,yi(n)));if(mi(e,Ko)&&mi(n,Ko))return Vo(li(e)*li(n),e.unsigned);var t=e.high>>>16,r=65535&e.high,o=e.low>>>16,i=65535&e.low,s=n.high>>>16,u=65535&n.high,l=n.low>>>16,c=65535&n.low,a=0,f=0,d=0,h=0;return d+=(h+=i*c)>>>16,f+=(d+=o*c)>>>16,d&=65535,f+=(d+=i*l)>>>16,a+=(f+=r*c)>>>16,f&=65535,a+=(f+=o*l)>>>16,f&=65535,a+=(f+=i*u)>>>16,a+=t*c+r*l+o*u+i*s,zo((d&=65535)<<16|(h&=65535),(a&=65535)<<16|(f&=65535),e.unsigned)}function bi(e,n){if(Ho(n)||(n=Zo(n)),ai(n))throw Error("division by zero");var t,r,o;if($o)return e.unsigned||-2147483648!==e.high||-1!==n.low||-1!==n.high?zo((e.unsigned?$o.div_u:$o.div_s)(e.low,e.high,n.low,n.high),$o.get_high(),e.unsigned):e;if(ai(e))return e.unsigned?ei:Qo;if(e.unsigned){if(n.unsigned||(n=function(e){return e.unsigned?e:zo(e.low,e.high,!0)}(n)),pi(n,e))return ei;if(pi(n,function(e,n){if(Ho(n)&&(n=ui(n)),0==(n&=63))return e;var t=e.high;return n<32?zo(e.low>>>n|t<<32-n,t>>>n,e.unsigned):zo(32===n?t:t>>>n-32,0,e.unsigned)}(e,1)))return ti;o=ei}else{if(hi(e,si))return hi(n,ni)||hi(n,ri)?si:hi(n,si)?ni:hi(t=function(e,n){return Ho(n)&&(n=ui(n)),0==(n&=63)?e:n<32?zo(e.low<<n,e.high<<n|e.low>>>32-n,e.unsigned):zo(0,e.low<<n-32,e.unsigned)}(bi(function(e,n){return Ho(n)&&(n=ui(n)),0==(n&=63)?e:n<32?zo(e.low>>>n|e.high<<32-n,e.high>>n,e.unsigned):zo(e.high>>n-32,e.high>=0?0:-1,e.unsigned)}(e,1),n),1),Qo)?fi(n)?ni:ri:o=_i(t,bi(r=vi(e,Ci(n,t)),n));if(hi(n,si))return e.unsigned?ei:Qo;if(fi(e))return fi(n)?bi(yi(e),yi(n)):yi(bi(yi(e),n));if(fi(n))return yi(bi(e,yi(n)));o=Qo}for(r=e;wi(r,n);){t=Math.max(1,Math.floor(li(r)/li(n)));for(var i=Math.ceil(Math.log(t)/Math.LN2),s=i<=48?1:Wo(2,i-48),u=Vo(t),l=Ci(u,n);fi(l)||pi(l,r);)l=Ci(u=Vo(t-=s,e.unsigned),n);ai(u)&&(u=ni),o=_i(o,u),r=vi(r,l)}return o}const xi=bi,Si=li;function Ei(e){return e<0?Math.ceil(e):Math.floor(e)}function Ai(e=0,n=0,t=0,r=0,o=0){switch(arguments.length){case 1:return ki(arguments[0]);case 3:e=0,n=arguments[0],t=arguments[1],r=arguments[2],o=0}return 864e5*e+36e5*n+6e4*t+1e3*r+o}function ki(e){return Si(xi(e,1e4))}function Ii(e,n){try{return n.contents=function(e){const n=e.search("\\."),t=e.search("\\:");if(-1===n&&-1===t){const n=parseInt(e,0);if(isNaN(n))throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`);return Ai(n,0,0,0,0)}if(t>0){const n=/^(-?)((\d+)\.)?(?:0*)([0-9]|0[0-9]|1[0-9]|2[0-3]):(?:0*)([0-5][0-9]|[0-9])(:(?:0*)([0-5][0-9]|[0-9]))?\.?(\d+)?$/.exec(e);if(null!=n&&null!=n[4]&&null!=n[5]){let t=0,r=0,o=0;const i=null!=n[1]&&"-"===n[1]?-1:1,s=+n[4],u=+n[5];if(null!=n[3]&&(t=+n[3]),null!=n[7]&&(o=+n[7]),null!=n[8])switch(n[8].length){case 1:r=100*+n[8];break;case 2:r=10*+n[8];break;case 3:r=+n[8];break;case 4:r=+n[8]/10;break;case 5:r=+n[8]/100;break;case 6:r=+n[8]/1e3;break;case 7:r=+n[8]/1e4;break;default:throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}return i*Ai(t,s,u,o,r)}}throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}(e),!0}catch(e){return!1}}class Ni{constructor(e){this.k=e}}function Ti(e){return new Ni(e)}function Oi(e){return e.k}class Mi extends Ni{constructor(e,n,t,r){super(e),this.left=n,this.right=t,this.h=0|r}}function Di(e,n,t,r){return new Mi(e,n,t,r)}function Fi(e){return e.left}function Ui(e){return e.right}function Pi(e){return e.h}function Ri(e,n){e:for(;;){const t=e,r=n;if(null!=t){const o=t;if(o instanceof Mi){e=Fi(o),n=Ri(Ui(o),r+1);continue e}return r+1|0}return 0|r}}function $i(e){return Ri(e,0)}function Gi(e,n,t){let r,o;if(null!=e){const n=e;r=n instanceof Mi?Pi(n):1}else r=0;if(null!=t){const e=t;o=e instanceof Mi?Pi(e):1}else o=0;const i=0|(r<o?o:r);return 0===i?Ti(n):Di(n,e,t,i+1)}function Hi(e,n,t){let r,o,i,s,u,l;if(null!=e){const n=e;u=n instanceof Mi?Pi(n):1}else u=0;if(null!=t){const e=t;l=e instanceof Mi?Pi(e):1}else l=0;if(l>u+2){const i=In(t);if(i instanceof Mi){if(r=Fi(i),(null!=r?(o=r,o instanceof Mi?Pi(o):1):0)>u+1){const t=In(Fi(i));if(t instanceof Mi)return Gi(Gi(e,n,Fi(t)),Oi(t),Gi(Ui(t),Oi(i),Ui(i)));throw new Error("internal error: Set.rebalance")}return Gi(Gi(e,n,Fi(i)),Oi(i),Ui(i))}throw new Error("internal error: Set.rebalance")}if(u>l+2){const r=In(e);if(r instanceof Mi){if(i=Ui(r),(null!=i?(s=i,s instanceof Mi?Pi(s):1):0)>l+1){const e=In(Ui(r));if(e instanceof Mi)return Gi(Gi(Fi(r),Oi(r),Fi(e)),Oi(e),Gi(Ui(e),n,t));throw new Error("internal error: Set.rebalance")}return Gi(Fi(r),Oi(r),Gi(Ui(r),n,t))}throw new Error("internal error: Set.rebalance")}return Gi(e,n,t)}function ji(e,n,t){if(null!=t){const r=t,o=0|e.Compare(n,Oi(r));if(r instanceof Mi)return o<0?Hi(ji(e,n,Fi(r)),Oi(r),Ui(r)):0===o?t:Hi(Fi(r),Oi(r),ji(e,n,Ui(r)));{const o=0|e.Compare(n,Oi(r));return o<0?Di(n,void 0,t,2):0===o?t:Di(n,t,void 0,2)}}return Ti(n)}function Li(e,n,t){e:for(;;){const r=e,o=n,i=t;if(null!=i){const s=i,u=0|r.Compare(o,Oi(s));if(s instanceof Mi){if(u<0){e=r,n=o,t=Fi(s);continue e}if(0===u)return!0;e=r,n=o,t=Ui(s);continue e}return 0===u}return!1}}function Bi(e,n){e:for(;;){const t=e,r=n;if(null!=r){const o=r;if(o instanceof Mi){Bi(t,Fi(o)),t(Oi(o)),e=t,n=Ui(o);continue e}t(Oi(o))}break}}class Vi extends xn{constructor(e,n){super(),this.stack=e,this.started=n}}function zi(e){e:for(;;){const n=e;if(xt(n))return vt();{const t=St(n),r=Et(n);if(null!=t){const o=t;if(o instanceof Mi){e=Tt([Fi(o),Ti(Oi(o)),Ui(o)],r);continue e}return n}e=r;continue e}}}function Wi(e){return new Vi(zi(bt(e)),!1)}function qi(e){if(e.started){const n=e.stack;if(xt(n))return function(){throw new Error("Enumeration already started")}();if(null!=St(n))return Oi(St(n));throw new Error("Please report error: Set iterator, unexpected stack for current")}return function(){throw new Error("Enumeration not started")}()}function Zi(e){let n=Wi(e);return{"System.Collections.Generic.IEnumerator`1.get_Current":()=>qi(n),"System.Collections.IEnumerator.get_Current":()=>qi(n),"System.Collections.IEnumerator.MoveNext":()=>function(e){if(e.started){const n=e.stack;if(xt(n))return!1;if(null!=St(n)){if(St(n)instanceof Mi)throw new Error("Please report error: Set iterator, unexpected stack for moveNext");return e.stack=zi(Et(n)),!xt(e.stack)}throw new Error("Please report error: Set iterator, unexpected stack for moveNext")}return e.started=!0,!xt(e.stack)}(n),"System.Collections.IEnumerator.Reset"(){n=Wi(e)},Dispose(){}}}function Ji(e,n,t){return null==n?null==t?0:-1:null==t?1:0|function(e,n,t){e:for(;;){const r=e,o=n,i=t,s=[o,i];if(xt(s[0]))return xt(s[1])?0:-1;if(xt(s[1]))return 1;if(null!=St(s[1]))if(null!=St(s[0])){const u=St(s[0]),l=St(s[1]);if(u instanceof Mi)if(null==Fi(u)){if(!(l instanceof Mi)){const o=0|r.Compare(Oi(u),Oi(l));if(0!==o)return 0|o;e=r,n=Ct(Ui(u),Et(s[0])),t=Ct(void 0,Et(s[1]));continue e}if(null==Fi(l)){const o=0|r.Compare(Oi(u),Oi(l));if(0!==o)return 0|o;e=r,n=Ct(Ui(u),Et(s[0])),t=Ct(Ui(l),Et(s[1]));continue e}{const s=[o,i];let u,l,c,a,f;switch(xt(s[0])?xt(s[1])?u=2:null!=St(s[1])?(u=1,a=Et(s[1]),f=St(s[1])):u=2:null!=St(s[0])?(u=0,l=Et(s[0]),c=St(s[0])):xt(s[1])?u=2:null!=St(s[1])?(u=1,a=Et(s[1]),f=St(s[1])):u=2,u){case 0:if(c instanceof Mi){e=r,n=Tt([Fi(c),Di(Oi(c),void 0,Ui(c),0)],l),t=i;continue e}e=r,n=Tt([void 0,Ti(Oi(c))],l),t=i;continue e;case 1:if(f instanceof Mi){e=r,n=o,t=Tt([Fi(f),Di(Oi(f),void 0,Ui(f),0)],a);continue e}e=r,n=o,t=Tt([void 0,Ti(Oi(f))],a);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}}else{const s=[o,i];let u,l,c,a,f;switch(xt(s[0])?xt(s[1])?u=2:null!=St(s[1])?(u=1,a=Et(s[1]),f=St(s[1])):u=2:null!=St(s[0])?(u=0,l=Et(s[0]),c=St(s[0])):xt(s[1])?u=2:null!=St(s[1])?(u=1,a=Et(s[1]),f=St(s[1])):u=2,u){case 0:if(c instanceof Mi){e=r,n=Tt([Fi(c),Di(Oi(c),void 0,Ui(c),0)],l),t=i;continue e}e=r,n=Tt([void 0,Ti(Oi(c))],l),t=i;continue e;case 1:if(f instanceof Mi){e=r,n=o,t=Tt([Fi(f),Di(Oi(f),void 0,Ui(f),0)],a);continue e}e=r,n=o,t=Tt([void 0,Ti(Oi(f))],a);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}else{if(!(l instanceof Mi)){const o=0|r.Compare(Oi(u),Oi(l));if(0!==o)return 0|o;e=r,n=Et(s[0]),t=Et(s[1]);continue e}if(null==Fi(l)){const o=0|r.Compare(Oi(u),Oi(l));if(0!==o)return 0|o;e=r,n=Ct(void 0,Et(s[0])),t=Ct(Ui(l),Et(s[1]));continue e}{const s=[o,i];let u,l,c,a,f;switch(xt(s[0])?xt(s[1])?u=2:null!=St(s[1])?(u=1,a=Et(s[1]),f=St(s[1])):u=2:null!=St(s[0])?(u=0,l=Et(s[0]),c=St(s[0])):xt(s[1])?u=2:null!=St(s[1])?(u=1,a=Et(s[1]),f=St(s[1])):u=2,u){case 0:if(c instanceof Mi){e=r,n=Tt([Fi(c),Di(Oi(c),void 0,Ui(c),0)],l),t=i;continue e}e=r,n=Tt([void 0,Ti(Oi(c))],l),t=i;continue e;case 1:if(f instanceof Mi){e=r,n=o,t=Tt([Fi(f),Di(Oi(f),void 0,Ui(f),0)],a);continue e}e=r,n=o,t=Tt([void 0,Ti(Oi(f))],a);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}}}else{St(s[1]);const u=[o,i];let l,c,a,f,d;switch(xt(u[0])?xt(u[1])?l=2:null!=St(u[1])?(l=1,f=Et(u[1]),d=St(u[1])):l=2:null!=St(u[0])?(l=0,c=Et(u[0]),a=St(u[0])):xt(u[1])?l=2:null!=St(u[1])?(l=1,f=Et(u[1]),d=St(u[1])):l=2,l){case 0:if(a instanceof Mi){e=r,n=Tt([Fi(a),Di(Oi(a),void 0,Ui(a),0)],c),t=i;continue e}e=r,n=Tt([void 0,Ti(Oi(a))],c),t=i;continue e;case 1:if(d instanceof Mi){e=r,n=o,t=Tt([Fi(d),Di(Oi(d),void 0,Ui(d),0)],f);continue e}e=r,n=o,t=Tt([void 0,Ti(Oi(d))],f);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}else{if(null==St(s[0])){e=r,n=Et(s[0]),t=Et(s[1]);continue e}{St(s[0]);const u=[o,i];let l,c,a,f,d;switch(xt(u[0])?xt(u[1])?l=2:null!=St(u[1])?(l=1,f=Et(u[1]),d=St(u[1])):l=2:null!=St(u[0])?(l=0,c=Et(u[0]),a=St(u[0])):xt(u[1])?l=2:null!=St(u[1])?(l=1,f=Et(u[1]),d=St(u[1])):l=2,l){case 0:if(a instanceof Mi){e=r,n=Tt([Fi(a),Di(Oi(a),void 0,Ui(a),0)],c),t=i;continue e}e=r,n=Tt([void 0,Ti(Oi(a))],c),t=i;continue e;case 1:if(d instanceof Mi){e=r,n=o,t=Tt([Fi(d),Di(Oi(d),void 0,Ui(d),0)],f);continue e}e=r,n=o,t=Tt([void 0,Ti(Oi(d))],f);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}}break}}(e,bt(n),bt(t))}function Yi(e,n,t){let r=t;Bi((e=>{n[r]=e,r=r+1|0}),e)}function Xi(e,n){if(Be(n))return function(e,n){return ft(((n,t)=>ji(e,t,n)),void 0,n)}(e,n);if(n instanceof ht)return function(e,n){return kt(((n,t)=>ji(e,t,n)),void 0,n)}(e,n);{const t=Je(n);try{return function(e,n,t){for(;;){const r=e,o=n,i=t;if(!i["System.Collections.IEnumerator.MoveNext"]())return o;e=r,n=ji(r,i["System.Collections.Generic.IEnumerator`1.get_Current"](),o),t=i}}(e,void 0,t)}finally{We(t)}}}class Ki{constructor(e,n){this.comparer=e,this.tree=n}GetHashCode(){return 0|function(e){let n,t=0;const r=Je(e);try{for(;r["System.Collections.IEnumerator.MoveNext"]();)t=0|(n=0|sn(r["System.Collections.Generic.IEnumerator`1.get_Current"]()),(t<<1)+n+631)}finally{We(r)}return 0|Math.abs(t)}(this)}Equals(e){return e instanceof Ki&&0===Ji(Qi(this),es(this),es(e))}toString(){return"set ["+rt("; ",nr((e=>Cn(e)),this))+"]"}get[Symbol.toStringTag](){return"FSharpSet"}toJSON(e){return Array.from(this)}CompareTo(e){return 0|Ji(Qi(this),es(this),es(e))}"System.Collections.Generic.ICollection`1.Add2B595"(e){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Clear"(){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Remove2B595"(e){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Contains2B595"(e){return Li(Qi(this),e,es(this))}"System.Collections.Generic.ICollection`1.CopyToZ2E171D71"(e,n){Yi(es(this),e,n)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return 0|ns(this)}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return 0|ns(this)}GetEnumerator(){return Zi(es(this))}[Symbol.iterator](){return Ye(this.GetEnumerator())}"System.Collections.IEnumerable.GetEnumerator"(){return Zi(es(this))}get size(){return 0|ns(this)}add(e){throw new Error("Set cannot be mutated")}clear(){throw new Error("Set cannot be mutated")}delete(e){throw new Error("Set cannot be mutated")}has(e){return function(e,n){return Li(Qi(e),n,es(e))}(this,e)}keys(){return nr((e=>e),this)}values(){return nr((e=>e),this)}entries(){return nr((e=>[e,e]),this)}forEach(e,n){const t=this;er((n=>{e(n,n,t)}),t)}}function Qi(e){return e.comparer}function es(e){return e.tree}function ns(e){return $i(es(e))}function ts(e,n,t){try{return"Expecting "+e+" but instead got:"+(t?"\n":" ")+JSON.stringify(n,null,4)}catch(n){return"Expecting "+e+" but decoder failed. Couldn't report given value due to circular structure."+(t?"\n":" ")}}function rs(e,n,t){const r=n(e,t);if(1===r.tag){const e=r.fields[0];return new Co(1,function(e,n){const t=2===n.tag?ts(n.fields[0],n.fields[1],!0):1===n.tag?ts(n.fields[0],n.fields[1],!1)+"\nReason: "+n.fields[2]:3===n.tag?ts(n.fields[0],n.fields[1],!0):4===n.tag?ts(n.fields[0],n.fields[1],!0)+"\nNode `"+n.fields[2]+"` is unkown.":5===n.tag?"Expecting "+n.fields[0]+".\n"+JSON.stringify(n.fields[1],null,4):7===n.tag?"The following errors were found:\n\n"+rt("\n\n",n.fields[0]):6===n.tag?"The following `failure` occurred with the decoder: "+n.fields[0]:ts(n.fields[0],n.fields[1],!1);return 7===n.tag?t:"Error at: `"+e+"`\n"+t}(e[0],e[1]))}return new Co(0,r.fields[0])}function os(e,n){try{return rs("$",e,JSON.parse(n))}catch(e){if(e instanceof SyntaxError)return new Co(1,"Given an invalid JSON: "+e.message);throw e}}function is(e,n){return"string"==typeof n?new Co(0,n):new Co(1,[e,new xo(0,"a string",n)])}const ss=e=>n=>{const t="a sbyte",r=e,o=n;if("number"==typeof o){const e=o;return isFinite(e)&&Math.floor(e)===e?-128<=e&&e<=127?new Co(0,(e+128&255)-128):new Co(1,[r,new xo(1,t,e,"Value was either too large or too small for a sbyte")]):new Co(1,[r,new xo(1,t,e,"Value is not an integral value")])}if("string"==typeof o){let e,n=0;return e=[Uo(o,511,!1,8,new Sn((()=>n),(e=>{n=0|e}))),n],e[0]?new Co(0,e[1]):new Co(1,[r,new xo(0,t,o)])}return new Co(1,[r,new xo(0,t,o)])},us=e=>n=>{const t="a byte",r=e,o=n;if("number"==typeof o){const e=o;return isFinite(e)&&Math.floor(e)===e?0<=e&&e<=255?new Co(0,255&e):new Co(1,[r,new xo(1,t,e,"Value was either too large or too small for a byte")]):new Co(1,[r,new xo(1,t,e,"Value is not an integral value")])}if("string"==typeof o){let e,n=0;return e=[Uo(o,511,!0,8,new Sn((()=>n),(e=>{n=e}))),n],e[0]?new Co(0,e[1]):new Co(1,[r,new xo(0,t,o)])}return new Co(1,[r,new xo(0,t,o)])},ls=e=>n=>{const t="an int16",r=e,o=n;if("number"==typeof o){const e=o;return isFinite(e)&&Math.floor(e)===e?-32768<=e&&e<=32767?new Co(0,(e+32768&65535)-32768):new Co(1,[r,new xo(1,t,e,"Value was either too large or too small for "+t)]):new Co(1,[r,new xo(1,t,e,"Value is not an integral value")])}if("string"==typeof o){let e,n=0;return e=[Uo(o,511,!1,16,new Sn((()=>n),(e=>{n=0|e}))),n],e[0]?new Co(0,e[1]):new Co(1,[r,new xo(0,t,o)])}return new Co(1,[r,new xo(0,t,o)])},cs=e=>n=>{const t="an uint16",r=e,o=n;if("number"==typeof o){const e=o;return isFinite(e)&&Math.floor(e)===e?0<=e&&e<=65535?new Co(0,65535&e):new Co(1,[r,new xo(1,t,e,"Value was either too large or too small for "+t)]):new Co(1,[r,new xo(1,t,e,"Value is not an integral value")])}if("string"==typeof o){let e,n=0;return e=[Uo(o,511,!0,16,new Sn((()=>n),(e=>{n=e}))),n],e[0]?new Co(0,e[1]):new Co(1,[r,new xo(0,t,o)])}return new Co(1,[r,new xo(0,t,o)])},as=e=>n=>{const t="an int",r=e,o=n;if("number"==typeof o){const e=o;return isFinite(e)&&Math.floor(e)===e?-2147483648<=e&&e<=2147483647?new Co(0,~~e):new Co(1,[r,new xo(1,t,e,"Value was either too large or too small for an int")]):new Co(1,[r,new xo(1,t,e,"Value is not an integral value")])}if("string"==typeof o){let e,n=0;return e=[Uo(o,511,!1,32,new Sn((()=>n),(e=>{n=0|e}))),n],e[0]?new Co(0,e[1]):new Co(1,[r,new xo(0,t,o)])}return new Co(1,[r,new xo(0,t,o)])},fs=e=>n=>{const t="an uint32",r=e,o=n;if("number"==typeof o){const e=o;return isFinite(e)&&Math.floor(e)===e?0<=e&&e<=4294967295?new Co(0,e>>>0):new Co(1,[r,new xo(1,t,e,"Value was either too large or too small for "+t)]):new Co(1,[r,new xo(1,t,e,"Value is not an integral value")])}if("string"==typeof o){let e,n=0;return e=[Uo(o,511,!0,32,new Sn((()=>n),(e=>{n=e}))),n],e[0]?new Co(0,e[1]):new Co(1,[r,new xo(0,t,o)])}return new Co(1,[r,new xo(0,t,o)])};function ds(e,n,t,r){let o;const i=t+".["+en(e)+"]";if(Array.isArray(r)){const t=r;return e<t.length?n(i,t[e]):new Co(1,[i,new xo(5,"a longer array. Need index `"+en(e)+"` but there are only `"+(o=t.length,en(o)+"` entries"),r)])}return new Co(1,[i,new xo(0,"an array",r)])}function hs(e,n,t){if(Array.isArray(t)){let r=-1;return bo(It,ft(((t,o)=>{if(r=r+1|0,0===t.tag){const i=e(n+".["+en(r)+"]",o);return 0===i.tag?new Co(0,Ct(i.fields[0],t.fields[0])):new Co(1,i.fields[0])}return t}),new Co(0,vt()),t))}return new Co(1,[n,new xo(0,"a list",t)])}function ms(e,n,t){if(Array.isArray(t)){let r=-1;const o=t;return ft(((t,o)=>{if(r=r+1|0,0===t.tag){const i=t.fields[0],s=e(n+".["+en(r)+"]",o);return 0===s.tag?(i[r]=s.fields[0],new Co(0,i)):new Co(1,s.fields[0])}return t}),new Co(0,ct(new Array(o.length),0,o.length,null)),o)}return new Co(1,[n,new xo(0,"an array",t)])}function ps(e,n,t,r){const o=n(t,r);return 0===o.tag?e(o.fields[0],t,r):new Co(1,o.fields[0])}function ws(e,n){let t;const r=e;return t=e=>n=>ds(0,r,e,n),e=>r=>ps(yn(3,(e=>{let t;const r=n;return t=e=>n=>ds(1,r,e,n),n=>r=>ps(((n,t,r)=>new Co(0,[e,n])),yn(2,t),n,r)})),yn(2,t),e,r)}function gs(e){return Pr(e)}function ys(e){return function(e,n){return new Ki(e,n)}(n={Compare:mn},Xi(n,e));var n}function _s(e,n,t,r){let o;const i=n.length+e|0;if(i!==r.length)return new Co(1,[t,new xo(6,(o=0|r.length,Qn(Xn("Expected array of length %i but got %i"))(i)(o)))]);{let o=new Co(0,vt());for(let i=e;i<=r.length-1;i++)if(0===o.tag){const s=o.fields[0],u=Qn(Xn("%s[%i]"))(t)(i),l=n[i-e],c=r[i];o=bo((e=>Ct(e,s)),l(u)(c))}return bo(It,o)}}function vs(e,n,t,r,o,i){const s=function(e,n){return n.find((e=>ro(e)===r))}(0,mo(t));if(null!=s){const t=s,r=at((t=>bs(e,n,!1,t[1])),vo(t));return bo((e=>function(e,n){const t=(e.fields||[]).length;if(n.length!==t)throw new Error(`Expected an array of length ${t} but got ${n.length}`);return null!=e.declaringType.construct?new e.declaringType.construct(e.tag,...n):{}}(t,At(e))),0===r.length&&i.length<=1?new Co(0,vt()):_s(1,r,o,i))}return new Co(1,[o,new xo(6,"Cannot find case "+r+" in "+oo(t))])}function Cs(e,n,t,r){const o=new Sn(null);let i;const s=oo(r);let u;if(i=""===s?e:jr(s,o,e),yo(r)){const e=at((e=>[Io(n,ro(e)),bs(i,n,!1,e[1])]),po(r));u=n=>t=>bo((e=>function(e,n){const t=po(e);if(t.length!==n.length)throw new Error(`Expected an array of length ${t.length} but got ${n.length}`);return null!=e.construct?new e.construct(...n):t.reduce(((e,[t,r],o)=>(e[t]=n[o],e)),{})}(r,At(e))),function(e,n,t){return null===t||Object.getPrototypeOf(t||!1)!==Object.prototype?new Co(1,[n,new xo(0,"an object",t)]):function(e,n,t){return n.reduceRight(((n,t)=>e(t,n)),t)}(yn(2,(e=>{const r=e[0];return o=>0===o.tag?bo((e=>Ct(e,o.fields[0])),e[1](n+"."+r)(t[r])):o})),e,new Co(0,vt()))}(e,n,t))}else if(go(r))u=e=>t=>{if("string"==typeof t)return vs(i,n,r,t,e,[]);if(Array.isArray(t)){const u=t;return o=t=>vs(i,n,r,t,e,u),0===(s=is(e+"[0]",u[0])).tag?o(s.fields[0]):new Co(1,s.fields[0])}return new Co(1,[e,new xo(0,"a string or array",t)]);var o,s};else{if(!t){let e;const n=oo(r);throw e=Qn(Xn("Cannot generate auto decoder for %s. Please pass an extra decoder.\n\nDocumentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders"))(n),new Error(e)}u=e=>n=>new Co(1,[e,new xo(2,"an extra coder for "+oo(r),n)])}return o.contents=u,u}function bs(e,n,t,r){let o,i,s,u;const l=oo(r),c=Br(l,e);if(null==c){if(io(r)){const t=bs(e,n,!1,so(r));return e=>n=>ms(yn(2,t),e,n)}if(lo(r)){const e=oo(ao(r));if("System.SByte"===e)return e=>n=>{const t=r,o=e,i=n,s=ss(o)(i);if(1===s.tag)return new Co(1,s.fields[0]);{const e=s.fields[0];return Kt(e,fo(t),{Equals:(e,n)=>e===n,GetHashCode:rn})?new Co(0,ho(t,e.toString())):new Co(1,[o,new xo(1,oo(t),i,"Unkown value provided for the enum")])}};if("System.Byte"===e)return e=>n=>{const t=r,o=e,i=n,s=us(o)(i);if(1===s.tag)return new Co(1,s.fields[0]);{const e=s.fields[0];return Kt(e,fo(t),{Equals:(e,n)=>e===n,GetHashCode:rn})?new Co(0,ho(t,e.toString())):new Co(1,[o,new xo(1,oo(t),i,"Unkown value provided for the enum")])}};if("System.Int16"===e)return e=>n=>{const t=r,o=e,i=n,s=ls(o)(i);if(1===s.tag)return new Co(1,s.fields[0]);{const e=s.fields[0];return Kt(e,fo(t),{Equals:(e,n)=>e===n,GetHashCode:rn})?new Co(0,ho(t,e.toString(u))):new Co(1,[o,new xo(1,oo(t),i,"Unkown value provided for the enum")])}var u};if("System.UInt16"===e)return e=>n=>{const t=r,o=e,i=n,s=cs(o)(i);if(1===s.tag)return new Co(1,s.fields[0]);{const e=s.fields[0];return Kt(e,fo(t),{Equals:(e,n)=>e===n,GetHashCode:rn})?new Co(0,ho(t,e.toString())):new Co(1,[o,new xo(1,oo(t),i,"Unkown value provided for the enum")])}};if("System.Int32"===e)return e=>n=>{const t=r,o=e,i=n,s=as(o)(i);if(1===s.tag)return new Co(1,s.fields[0]);{const e=s.fields[0];return Kt(e,fo(t),{Equals:(e,n)=>e===n,GetHashCode:rn})?new Co(0,ho(t,en(e))):new Co(1,[o,new xo(1,oo(t),i,"Unkown value provided for the enum")])}};if("System.UInt32"===e)return e=>n=>{const t=r,o=e,i=n,s=fs(o)(i);if(1===s.tag)return new Co(1,s.fields[0]);{const e=s.fields[0];return Kt(e,fo(t),{Equals:(e,n)=>e===n,GetHashCode:rn})?new Co(0,ho(t,e.toString())):new Co(1,[o,new xo(1,oo(t),i,"Unkown value provided for the enum")])}};{const e=oo(r),n=et(Xn("Cannot generate auto decoder for %s.\nThoth.Json.Net only support the following enum types:\n- sbyte\n- byte\n- int16\n- uint16\n- int\n- uint32\nIf you can't use one of these types, please pass an extra decoder.\n "))(e);return e=>n(e)}}if(uo(r)){if(_o(r)){const t=at((t=>bs(e,n,!1,t)),wo(r));return e=>n=>Array.isArray(n)?bo((e=>At(e)),_s(0,t,e,n)):new Co(1,[e,new xo(0,"an array",n)])}{const l=oo(co(r));if("Microsoft.FSharp.Core.FSharpOption`1[System.Object]"===l)return o=bs(e,n,!0,qr(r)[0]),e=>n=>{return t=yn(2,o),r=e,null==(i=n)?new Co(0,void 0):bo(kn,t(r,i));var t,r,i};if("Microsoft.FSharp.Collections.FSharpList`1[System.Object]"===l)return i=bs(e,n,!1,qr(r)[0]),e=>n=>hs(yn(2,i),e,n);if("System.Collections.Generic.IEnumerable`1[System.Object]"===l)return s=bs(e,n,!1,qr(r)[0]),e=>n=>function(e,n,t){if(Array.isArray(t)){let r=-1;return bo(rr,ft(((t,o)=>{if(r=r+1|0,0===t.tag){const i=e(n+".["+en(r)+"]",o);return 0===i.tag?new Co(0,Xt([i.fields[0]],t.fields[0])):new Co(1,i.fields[0])}return t}),new Co(0,[]),t))}return new Co(1,[n,new xo(0,"a seq",t)])}(yn(2,s),e,n);if("Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]"===l){const t=bs(e,n,!1,qr(r)[0]),o=bs(e,n,!1,qr(r)[1]);let i;const s=Ot([e=>n=>function(e,n,t,r){return null===r||Object.getPrototypeOf(r||!1)!==Object.prototype?new Co(1,[t,new xo(0,"an object",r)]):Qt(((o,i)=>{if(0===o.tag){const s=e(t,i);if(0===s.tag){const e=n(t+"."+i,r[i]);return 0===e.tag?new Co(0,Ct([s.fields[0],e.fields[0]],o.fields[0])):new Co(1,e.fields[0])}return new Co(1,s.fields[0])}return o}),new Co(0,vt()),Object.keys(r))}(yn(2,t),yn(2,o),e,n),(u=ws(yn(2,t),yn(2,o)),e=>n=>hs(yn(2,u),e,n))]);return i=e=>n=>{return t=e,r=n,((e,n)=>{e:for(;;){const o=e,i=n;if(xt(o))return new Co(1,[t,new xo(7,i)]);{const s=rs(t,yn(2,St(o)),r);if(1===s.tag){e=Et(o),n=Mt(i,bt(s.fields[0]));continue e}return new Co(0,s.fields[0])}}})(s,vt());var t,r},e=>n=>function(e,n,t,r){const o=n(t,r);return 1===o.tag?new Co(1,o.fields[0]):new Co(0,e(o.fields[0]))}(gs,yn(2,i),e,n)}if("Microsoft.FSharp.Collections.FSharpSet`1[System.Object]"===l){const t=bs(e,n,!1,qr(r)[0]);return e=>n=>{const r=ms(yn(2,t),e,n);return 0===r.tag?new Co(0,ys(r.fields[0])):new Co(1,r.fields[0])}}return Cs(e,n,t,r)}}return"System.Boolean"===l?e=>n=>{return t=e,"boolean"==typeof(r=n)?new Co(0,r):new Co(1,[t,new xo(0,"a boolean",r)]);var t,r}:"Microsoft.FSharp.Core.Unit"===l?e=>n=>{return t=e,null==(r=n)?new Co(0,void 0):new Co(1,[t,new xo(0,"null",r)]);var t,r}:"System.String"===l?e=>n=>is(e,n):"System.Char"===l?e=>n=>function(e,n){if("string"==typeof n){const t=n;return 1===t.length?new Co(0,t[0]):new Co(1,[e,new xo(0,"a single character string",n)])}return new Co(1,[e,new xo(0,"a char",n)])}(e,n):"System.SByte"===l?ss:"System.Byte"===l?us:"System.Int16"===l?ls:"System.UInt16"===l?cs:"System.Int32"===l?as:"System.UInt32"===l?fs:"System.Double"===l?e=>n=>{return t=e,"number"==typeof(r=n)?new Co(0,r):new Co(1,[t,new xo(0,"a float",r)]);var t,r}:"System.Single"===l?e=>n=>{return t=e,"number"==typeof(r=n)?new Co(0,r):new Co(1,[t,new xo(0,"a float32",r)]);var t,r}:"System.DateTime"===l?e=>n=>function(e,n){if("string"==typeof n){let r,o=Pn(-621355968e5,0);return r=[$n(n,new Sn((()=>o),(e=>{o=e}))),o],r[0]?new Co(0,1===(t=r[1]).kind?t:Pn(t.getTime(),1)):new Co(1,[e,new xo(0,"a datetime",n)])}var t;return new Co(1,[e,new xo(0,"a datetime",n)])}(e,n):"System.DateTimeOffset"===l?e=>n=>function(e,n){if("string"==typeof n){let t,r=Po(-621355968e5,0);return t=[Ro(n,new Sn((()=>r),(e=>{r=e}))),r],t[0]?new Co(0,t[1]):new Co(1,[e,new xo(0,"a datetimeoffset",n)])}return new Co(1,[e,new xo(0,"a datetime",n)])}(e,n):"System.TimeSpan"===l?e=>n=>function(e,n){if("string"==typeof n){let t,r=0;return t=[Ii(n,new Sn((()=>r),(e=>{r=e}))),r],t[0]?new Co(0,t[1]):new Co(1,[e,new xo(0,"a timespan",n)])}return new Co(1,[e,new xo(0,"a timespan",n)])}(e,n):"System.Guid"===l?e=>n=>function(e,n){if("string"==typeof n){let t,r="00000000-0000-0000-0000-000000000000";return t=[Mo(n,new Sn((()=>r),(e=>{r=e}))),r],t[0]?new Co(0,t[1]):new Co(1,[e,new xo(0,"a guid",n)])}return new Co(1,[e,new xo(0,"a guid",n)])}(e,n):"System.Object"===l?e=>e=>new Co(0,e):Cs(e,n,t,r)}{const e=c;return n=>t=>e.contents(n)(t)}}function xs(e,n,t){const r=Tn(n,new So(0));return bs(function(e){return null!=e?Vr(((e,n)=>new Sn(n[1])),e.Coders):zr()}(t),r,!1,e)}class Ss extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["AccessRole"]}}function Es(e){return new Ss(0,e)}function As(e){return Ut(new Ss(0,"SuperSelection.Access"),e,{Equals:an,GetHashCode:un})?kn(void 0):void 0}function ks(e){return Ut(new Ss(0,"SuperSelection.EditPanel"),e,{Equals:an,GetHashCode:un})?kn(void 0):void 0}class Is extends xn{constructor(e,n){super(),this.UserName=e,this.Roles=n}}function Ns(e){let n;const t=st(null==e?"":e,["."],null,0);if(dt(((e,n)=>e===n),t,null)||3!==t.length)n=new Co(1,"Failed to identify the user");else{let e;const o=t[1];e=atob(o),n=os(yn(2,xs(Xr(["Name",no],["Roles",(r=no,new Wr("[]",[r]))]),new So(1),void 0)),e)}var r;if(1===n.tag)return new Is(void 0,vt());{const e=n.fields[0];return new Is(e.Name,Dt(Es,Ot(e.Roles)))}}class Ts extends xn{constructor(e,n){super(),this.PromotedFunds=e,this.Configuration=n}}class Os extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["PartnerId"]}}class Ms extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["AccountId"]}}const Ds=Le,Fs=(e,n)=>{re((()=>{const n=e();return()=>{n.Dispose()}}),n)};function Us(e,n,t,r){const o=Ds.memo(e,yn(2,Tn(function(e,n){return null==n||1===n.length?n:gn in n?n[gn]:_n([],e,n)}(2,t),null)));return er((n=>{e.displayName=n}),Nn(n)),e=>{const n=function(e,n){if(null==e)return n;{const t=e;return n.key=t(n),n}}(r,e);return Ds.createElement(o,n)}}function Ps(e){return{Dispose(){e()}}}function Rs(e){return Ds.useState(e)}function $s(e,n){Fs(e,n)}function Gs(e){!function(e,n){Fs((n=>(e(),Ps((()=>{})))),[])}(e)}function Hs(e){$s(e,[])}function js(e){return Ds.useRef(e)}function Ls(e){const n=js(e),t=function(e,t){const r=Tn([],[]);return Ds.useCallback((e=>n.current(e)),r)}();var r,o;return r=()=>{n.current=e},o=e=>(r(),Ps((()=>{}))),oe((()=>{const e=o();return()=>{e.Dispose()}})),t}class Bs{constructor(e=!1){this._id=0,this._cancelled=e,this._listeners=new Map}get isCancelled(){return this._cancelled}cancel(){if(!this._cancelled){this._cancelled=!0;for(const[,e]of this._listeners)e()}}addListener(e){const n=this._id;return this._listeners.set(this._id++,e),n}removeListener(e){return this._listeners.delete(e)}register(e,n){const t=this,r=this.addListener(null==n?e:()=>e(n));return{Dispose(){t.removeListener(r)}}}Dispose(){}}class Vs extends Error{constructor(){super("The operation was canceled"),Object.setPrototypeOf(this,Vs.prototype)}}class zs{constructor(){this.callCount=0}static get maxTrampolineCallCount(){return 2e3}incrementAndCheck(){return this.callCount++>zs.maxTrampolineCallCount}hijack(e){this.callCount=0,setTimeout(e,0)}}function Ws(e){return n=>{if(n.cancelToken.isCancelled)n.onCancel(new Vs);else if(n.trampoline.incrementAndCheck())n.trampoline.hijack((()=>{try{e(n)}catch(e){n.onError(En(e))}}));else try{e(n)}catch(e){n.onError(En(e))}}}const qs=new class{Bind(e,n){return function(e,n){return Ws((t=>{e({onSuccess:e=>{try{n(e)(t)}catch(e){t.onError(En(e))}},onError:t.onError,onCancel:t.onCancel,cancelToken:t.cancelToken,trampoline:t.trampoline})}))}(e,n)}Combine(e,n){return this.Bind(e,(()=>n))}Delay(e){return Ws((n=>e()(n)))}For(e,n){const t=e[Symbol.iterator]();let r=t.next();return this.While((()=>!r.done),this.Delay((()=>{const e=n(r.value);return r=t.next(),e})))}Return(e){return function(e){return Ws((n=>n.onSuccess(e)))}(e)}ReturnFrom(e){return e}TryFinally(e,n){return Ws((t=>{e({onSuccess:e=>{n(),t.onSuccess(e)},onError:e=>{n(),t.onError(e)},onCancel:e=>{n(),t.onCancel(e)},cancelToken:t.cancelToken,trampoline:t.trampoline})}))}TryWith(e,n){return Ws((t=>{e({onSuccess:t.onSuccess,onCancel:t.onCancel,cancelToken:t.cancelToken,trampoline:t.trampoline,onError:e=>{try{n(e)(t)}catch(e){t.onError(En(e))}}})}))}Using(e,n){return this.TryFinally(n(e),(()=>e.Dispose()))}While(e,n){return e()?this.Bind(n,(()=>this.While(e,n))):this.Return(void 0)}Zero(){return Ws((e=>e.onSuccess(void 0)))}};function Zs(e){}const Js=new Bs;function Ys(e,n){return function(e,n){return function(e,n,t,r,o){"function"!=typeof n&&(o=n,n=void 0);const i=new zs;e({onSuccess:n||Zs,onError:t||Zs,onCancel:r||Zs,cancelToken:o||Js,trampoline:i})}(e,n)}(e,n)}class Xs extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["HasNotStartedYet","InProgress","Resolved","Failed"]}}function Ks(e,n){const t=js(function(e){const n=new Bs(!1);return n}());return Hs((()=>Ps((()=>{t.current.cancel()})))),Ls((r=>{var o;null!=(o=t.current)&&o.isCancelled||Ys(qs.Delay((()=>qs.TryWith(qs.Delay((()=>(n(new Xs(1)),qs.Bind(e(r),(e=>(n(new Xs(2,e)),qs.Zero())))))),(e=>(n(new Xs(3,e)),qs.Zero()))))),t.current)}))}class Qs extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"]}}class eu extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Header"]}}class nu extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Empty","Text","Binary","Form"]}}class tu extends xn{constructor(e,n,t,r,o,i,s,u){super(),this.url=e,this.method=n,this.headers=t,this.withCredentials=r,this.overridenMimeType=o,this.overridenResponseType=i,this.timeout=s,this.content=u}}class ru extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Text","Blob","ArrayBuffer","Unknown"]}}class ou extends xn{constructor(e,n,t,r,o,i){super(),this.statusCode=0|e,this.responseText=n,this.responseType=t,this.responseUrl=r,this.responseHeaders=o,this.content=i}}const iu=new tu("",new Qs(0),vt(),!1,void 0,void 0,void 0,new nu(0));function su(e,n){return"string"!=typeof(t=n)||0===t.length?[n]:st(n,[e],null,0);var t}function uu(e){return new tu(e,iu.method,iu.headers,iu.withCredentials,iu.overridenMimeType,iu.overridenResponseType,iu.timeout,iu.content)}function lu(e,n){return new tu(n.url,e,n.headers,n.withCredentials,n.overridenMimeType,n.overridenResponseType,n.timeout,n.content)}function cu(e,n){return new tu(n.url,n.method,n.headers,n.withCredentials,n.overridenMimeType,n.overridenResponseType,n.timeout,e)}function au(e){return function(e){return Ws((n=>e([n.onSuccess,n.onError,n.onCancel])))}((n=>{const t=new XMLHttpRequest;t.open(function(e){switch(e.tag){case 1:return"POST";case 3:return"PATCH";case 2:return"PUT";case 4:return"DELETE";case 6:return"OPTIONS";case 5:return"HEAD";default:return"GET"}}(e.method),e.url),t.onreadystatechange=()=>{let e,r,o,i,s,u,l;4===t.readyState&&n[0]((r=t.responseType,e=""===r||"text"===r?t.responseText:"",o=0|t.status,i=t.responseType,u=t.responseType,s=""===u||"text"===u?new ru(0,t.responseText):new ru("arraybuffer"===u?2:"blob"===u?1:3,t.response),l=function(e){const n=Pt();return Ur(n,Ir(n,e))}(function(e,n,t){const r=[];for(let t=0;t<=n.length-1;t++){const o=e(n[t]);if(null!=o){const e=In(o);r.push(e)}}return r}((e=>{const n=Ot(su(":",e));return xt(n)?void 0:[St(n).toLocaleLowerCase(),rt(":",Et(n)).trim()]}),su("\r\n",t.getAllResponseHeaders()))),new ou(o,e,i,t.responseURL,l,s)))};const r=Je(e.headers);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const e=r["System.Collections.Generic.IEnumerator`1.get_Current"]();t.setRequestHeader(e.fields[0],e.fields[1])}}finally{We(r)}t.withCredentials=e.withCredentials;const o=e.overridenMimeType;if(null==o);else{const e=o;t.overrideMimeType(e)}const i=e.overridenResponseType;null==i||(1===i.tag?t.responseType="blob":2===i.tag?t.responseType="arraybuffer":t.responseType="text");const s=e.timeout;if(null==s);else{const e=0|s;t.timeout=0|e}const u=e.content;switch(u.tag){case 1:case 3:case 2:t.send(kn(u.fields[0]));break;default:t.send()}}))}new ou(0,"","","",zr(),new ru(0,""));class fu extends xn{constructor(e,n,t){super(),this.PartnerId=e,this.AccountId=n,this.Funds=t}}class du extends xn{constructor(e,n){super(),this.PartnerFunds=e,this.AccountFunds=n}}class hu extends xn{constructor(e){super(),this.DefaultFundUSI=e}}class mu extends xn{constructor(e,n){super(),this.Partner=e,this.Account=n}}class pu extends xn{constructor(e,n){super(),this.PartnerId=e,this.Name=n}}class wu extends xn{constructor(e,n){super(),this.AccountId=e,this.Name=n}}class gu extends xn{constructor(e,n,t,r){super(),this.Id=e,this.PartnerId=n,this.Enabled=t,this.Editor=r}}function yu(e){return e}function _u(e){return Array.from(e)}function vu(e){return Un(e,"O")}function Cu(e){return function(e,n="c",t){if(-1===["c","g","G"].indexOf(n))throw new Error("Custom formats are not supported");const r=Math.abs(function(e){return Ei(e/864e5)}(e)),o=Math.abs(function(e){return Ei(e%864e5/36e5)}(e)),i=Math.abs(function(e){return Ei(e%36e5/6e4)}(e)),s=Math.abs(function(e){return Ei(e%6e4/1e3)}(e)),u=Math.abs(function(e){return Ei(e%1e3)}(e));return`${e<0?"-":""}${0!==r||"c"!==n&&"g"!==n?"c"===n?r+".":r+":":""}${"g"===n?o:Ke(o,2)}:${Ke(i,2)}:${Ke(s,2)}${0!==u||"c"!==n&&"g"!==n?"g"===n?"."+Ke(u,3):"."+function(e,n,t){let r=e.toString(10);for(;r.length<3;)r="0"+r;for(;r.length<7;)r+="0";return r}(u):""}`}(e)}function bu(){return null}function xu(e){return Un(e,"O")}function Su(e,n){return JSON.stringify(n,yn(2,null),kn(e))}function Eu(e,n,t,r){const o=new Sn(null);let i;const s=oo(r);let u;if(i=""===s?e:jr(s,o,e),yo(r)){const e=at((e=>{const r=Io(n,ro(e)),o=Au(i,n,t,e[1]);return n=>i=>{const s=function(e,n){return e[n[0]]}(n,e);return(!t||t&&null!=s)&&(i[r]=o(s)),i}}),po(r));u=n=>Qt(((e,t)=>t(n)(e)),{},e)}else{if(!go(r)){let e;const n=oo(r);throw e=Qn(Xn("Cannot generate auto encoder for %s. Please pass an extra encoder.\n\nDocumentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders"))(n),new Error(e)}u=e=>{const o=function(e,n){const t=mo(n)[e.tag];if(null==t)throw new Error(`Cannot find case ${e.name} in union type`);return[t,e.fields]}(e,r),s=o[0],u=o[1],l=0|u.length;if(0===l)return ro(s);{const e=0|l,r=vo(s),o=ct(new Array(e+1),0,e+1,null);o[0]=ro(s);for(let s=1;s<=e;s++){const e=Au(i,n,t,r[s-1][1]);o[s]=e(u[s-1])}return o}}}return o.contents=u,u}function Au(e,n,t,r){const o=oo(r),i=Br(o,e);if(null==i){if(io(r)){const o=Au(e,n,t,so(r));return e=>_u(nr(o,e))}if(lo(r)){const e=oo(ao(r));if("System.SByte"===e)return e=>e;if("System.Byte"===e)return e=>e;if("System.Int16"===e)return e=>e;if("System.UInt16"===e)return e=>e;if("System.Int32"===e)return e=>e;if("System.UInt32"===e)return e=>e;{const e=oo(r);return et(Xn("Cannot generate auto encoder for %s.\nThoth.Json.Net only support the following enum types:\n- sbyte\n- byte\n- int16\n- uint16\n- int\n- uint32\n\nIf you can't use one of these types, please pass an extra encoder.\n\nDocumentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders\n "))(e)}}if(uo(r)){if(_o(r)){const o=at((r=>Au(e,n,t,r)),wo(r));return e=>_u(tr(((e,n)=>o[e](n)),e))}{const o=oo(co(r));if("Microsoft.FSharp.Core.FSharpOption`1[System.Object]"===o){const o=new Xe((()=>{return o=Au(e,n,t,qr(r)[0]),e=>{return null!=(n=On(o,e))?In(n):null;var n};var o}));return e=>null==e?null:o.Value(e)}if("Microsoft.FSharp.Collections.FSharpList`1[System.Object]"===o||"Microsoft.FSharp.Collections.FSharpSet`1[System.Object]"===o||"System.Collections.Generic.IEnumerable`1[System.Object]"===o){const o=Au(e,n,t,qr(r)[0]);return e=>_u(nr(o,e))}if("Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]"===o){const o=qr(r)[0],i=Au(e,n,t,qr(r)[1]);if("System.String"===oo(o)||"System.Guid"===oo(o))return e=>Qt(((e,n)=>{const t=n;return e[t[0]]=i(t[1]),e}),{},e);{let r;const s=Au(e,n,t,o);return r=s,e=>_u(nr((e=>{const n=e;return[r(n[0]),i(n[1])]}),e))}}return Eu(e,n,t,r)}}return"System.Boolean"===o?e=>e:"Microsoft.FSharp.Core.Unit"===o?bu:"System.String"===o?e=>e:"System.Char"===o?e=>e:"System.SByte"===o?e=>e:"System.Byte"===o?e=>e:"System.Int16"===o?e=>e:"System.UInt16"===o?e=>e:"System.Int32"===o?e=>e:"System.UInt32"===o?e=>e:"System.Double"===o?e=>e:"System.Single"===o?e=>e:"System.DateTime"===o?xu:"System.DateTimeOffset"===o?vu:"System.TimeSpan"===o?Cu:"System.Guid"===o?yu:"System.Object"===o?e=>e:Eu(e,n,t,r)}{const e=i;return n=>e.contents(n)}}function ku(e,n,t,r){const o=Tn(n,new So(0)),i=Tn(r,!0);return Au(function(e){return null!=e?Vr(((e,n)=>new Sn(n[0])),e.Coders):zr()}(t),o,i,e)}function Iu(e){return`${e}/super-selection/admin`}function Nu(e,n){return qs.Delay((()=>{const t=(r=function(e){return new eu(0,"Authorization",e)}(Qn(Xn("Bearer %s"))(e)),new tu((o=n).url,o.method,Mt(o.headers,bt(r)),o.withCredentials,o.overridenMimeType,o.overridenResponseType,o.timeout,o.content));var r,o;let i;const s=au(t);return i=qs.Bind(s,(e=>qs.Return(new Co(0,e)))),qs.Bind(i,(e=>{const n=e;if(1===n.tag)return qs.Return(new Co(1,n.fields[0]));{const e=n.fields[0];if(429===e.statusCode||e.statusCode>=500){const e=au(t);return qs.Bind(e,(e=>qs.Return(new Co(0,e))))}return qs.Return(new Co(0,e))}}))}))}function Tu(e,n){return qs.Delay((()=>{let t;const r=Nu(n,lu(new Qs(0),uu((t=Iu(e),`${t}/promoted-funds`))));return qs.Bind(r,(e=>{const n=e;if(1===n.tag)return qs.Return(new Co(1,n.fields[0]));{const e=n.fields[0];switch(0|e.statusCode){case 200:{const n=os(yn(2,xs(Qr(Yr("SuperSelection.AdminUI.Dto.PromotedFundOverride",[],fu,(()=>[["PartnerId",no],["AccountId",Kr(no)],["Funds",Qr(no)]]))),new So(1),void 0)),e.responseText);return qs.Return(n)}case 401:return qs.Return(new Co(1,"You do not have the appropriate permissions to view this information"));default:return qs.Return(new Co(1,"Unexpected response from backend"))}}}))}))}function Ou(e,n,t,r){return qs.Delay((()=>{let o;const i=Nu(n,lu(new Qs(0),uu((null==r?e=>`${e}/promoted-funds/${t}`:(o=r,e=>`${e}/promoted-funds/${t}/${o}`))(Iu(e)))));return qs.Bind(i,(e=>{const n=e;if(1===n.tag)return qs.Return(new Co(1,n.fields[0]));{const e=n.fields[0];if(200===e.statusCode){const n=os(yn(2,xs(Yr("SuperSelection.AdminUI.Dto.PromotedFunds",[],du,(()=>[["PartnerFunds",Qr(no)],["AccountFunds",Qr(no)]])),new So(1),void 0)),e.responseText);return qs.Return(n)}return qs.Return(new Co(1,"Unexpected response from backend"))}}))}))}function Mu(e,n,t,r){return qs.Delay((()=>{let o;const i=Nu(n,lu(new Qs(4),uu((null==r?e=>`${e}/promoted-funds/${t}`:(o=r,e=>`${e}/promoted-funds/${t}/${o}`))(Iu(e)))));return qs.Bind(i,(e=>{const n=e;if(1===n.tag)return qs.Return(new Co(1,n.fields[0]));{const e=n.fields[0];return 200===e.statusCode?qs.Return(new Co(0,void 0)):qs.Return(new Co(1,e.responseText))}}))}))}function Du(e,n,t){Nt((t=>{try{t(n)}catch(n){e(n)}}),t)}function Fu(){return vt()}function Uu(e){return bt(e)}class Pu extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["ColumnHeader"]}}function Ru(e){return e.fields[0]}class $u extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["RowCell"]}}function Gu(e){return new $u(0,e)}function Hu(e){return e.fields[0]}function ju(e){return n=d("th",wn(Ot([["className","px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"],["scope","col"],["children",e]]))),new Pu(0,n);var n}function Lu(e,n){let t;return Gu(d("td",wn(Ot([["className","px-6 py-4 whitespace-nowrap text-sm"],(t=[d("a",{className:"text-indigo-600 hover:text-indigo-900",children:n,href:e})],["children",Ds.Children.toArray(Array.from(t))])]))))}function Bu(e,n){return Gu(d("td",{className:rt(" ",Xt(e,["px-6","py-4","whitespace-nowrap","text-sm"])),children:n}))}function Vu(e,n){return 0===n.indexOf(e)?n:void 0}function zu(e,n){return function(e,n){const t=e.lastIndexOf(n);return t>=0&&t===e.length-n.length}(n,e)?n:void 0}function Wu(e,n){return function(e){return 1===e?e=>{let n,t,r,o,i,s;return n=Vu("/",e),null!=n?(t=n,"#"+t):(r=Vu("#/",e),null!=r?(o=r,o):(i=Vu("#",e),null!=i?(s=i,"#/"+ut(s,1,s.length-1)):"#/"+e))}:e=>{let n,t;return n=Vu("/",e),null!=n?(t=n,t):"/"+e}}(n)(rt("/",Dt((e=>e.indexOf("?")>=0||0===e.indexOf("#")||0===e.indexOf("/")?e:encodeURIComponent(e)),e)))}Us((e=>{const n=Ls((n=>{const t=Tn(e.onUrlChanged,(e=>{}));!function(e,n,t){var r,o;n((r=2===e?window.location.pathname+window.location.search:window.location.hash,o=e,function(e,n){let t,r;const o=pt();let i=o,s=n;for(;!gt(s);){let n=e(yt(s));for(;!gt(n);)t=i,r=new ht(yt(n),void 0),t.tail=r,i=r,n=_t(n);s=_t(s)}const u=i,l=pt();return u.tail=l,_t(o)}((e=>{if("string"!=typeof(n=e)||/^\s*$/.test(n))return vt();{const n=function(e,...n){return 0===n.length?e.trimEnd():e.replace(new RegExp("["+Wn(n.join(""))+"]+$"),"")}(e,"#");if("?"===n)return vt();if(null!=Vu("?",n))return bt(n);{const e=n.split("?");if(dt(((e,n)=>e===n),e,null)||1!==e.length){if(dt(((e,n)=>e===n),e,null)||2!==e.length)return vt();if(""===e[1]){const n=e[0];return bt(decodeURIComponent(n))}{const n=e[0],t=e[1];return Ot([decodeURIComponent(n),"?"+t])}}{const n=e[0];return bt(decodeURIComponent(n))}}}var n}),Ot(st(null!=Vu("#",r)?ut(r,1,r.length-1):1!==o||null==zu("#",r)&&null==zu("#/",r)?r:"",["/"],null,0)))))}(Tn(e.hashMode,1),t)}));Hs((()=>(window.navigator.userAgent.indexOf("Trident")>=0||window.navigator.userAgent.indexOf("MSIE")>=0?window.addEventListener("hashchange",n):window.addEventListener("popstate",n),window.addEventListener("CUSTOM_NAVIGATION_EVENT",n),Ps((()=>{window.navigator.userAgent.indexOf("Trident")>=0||window.navigator.userAgent.indexOf("MSIE")>=0?window.removeEventListener("hashchange",n):window.removeEventListener("popstate",n),window.removeEventListener("CUSTOM_NAVIGATION_EVENT",n)}))))),Gs((()=>{const e=document.createEvent("CustomEvent");e.initEvent("CUSTOM_NAVIGATION_EVENT",!0,!0),window.dispatchEvent(e)}));const t=e.application;return null==t?null:t}),void 0,void 0,void 0);function qu(e,n){return e.replace(/[a-z]?[A-Z]/g,(e=>1===e.length?e.toLowerCase():e.charAt(0)+n+e.charAt(1).toLowerCase()))}function Zu(e,n=0){const t={},r=n;function o(e){throw new Error("Cannot infer key and value of "+String(e))}function i(e,n,r){e=function(e,n){switch(n){case 1:return e.charAt(0).toLowerCase()+e.slice(1);case 2:return qu(e,"_");case 3:return qu(e,"_").toUpperCase();case 4:return qu(e,"-");default:return e}}(e,n),t[e]=r}for(let n of e){let e=0;if(null==n&&o(n),n instanceof bn){const t=n.cases()[n.tag];n=0===n.fields.length?t:[t].concat(n.fields),e=r}if(Array.isArray(n))switch(n.length){case 0:o(n);break;case 1:i(n[0],e,!0);break;case 2:const t=n[1];i(n[0],e,t);break;default:i(n[0],e,n.slice(1))}else"string"==typeof n?i(n,e,!0):o(n)}return t}const Ju=ge((function(e,n){return d("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:n},e),d("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))})),Yu=ge((function(e,n){return d("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:n},e),d("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}))}));class Xu extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Pencil","Trash"]}}class Ku extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["ClassName"]}}function Qu(e,n){if(1===e.tag){const e=Zu(n,1);return d(Ju,e)}{const e=Zu(n,1);return d(Yu,e)}}class el extends xn{constructor(e,n){super(),this.Text=e,this.Action=n}}class nl extends xn{constructor(e,n){super(),this.Text=e,this.Action=n}}class tl extends xn{constructor(e,n){super(),this.Text=e,this.Action=n}}function rl(e,n){return new el(e.Text,vn(1,e.Action,[n]))}function ol(e,n,t){let r;return d("button",wn(Ot([["className",rt(" ",["mr-2","w-14","px-4","py-2","border","border-transparent","shadow-sm","font-medium","rounded-md","text-white","focus:outline-none","focus:ring-2","focus:ring-offset-2","sm:text-sm",`bg-${n}-600`,`hover:bg-${n}-700`,`focus:ring-${n}-500`])],["type","button"],["onClick",t],(r=[Qu(e,bt(new Ku(0,"mr-3 flex-shrink-0 h-4 w-6")))],["children",Ds.Children.toArray(Array.from(r))])])))}const il=e=>ol(new Xu(1),"red",e);function sl(e,n){return d("button",{className:rt(" ",["w-full","inline-flex","justify-center","rounded-md","border","border-transparent","shadow-sm","px-4","py-2","text-base","font-medium","text-white","focus:outline-none","focus:ring-2","focus:ring-offset-2","sm:ml-3","sm:w-auto","sm:text-sm",`focus:ring-${e}-500`,`bg-${e}-600`,`hover:bg-${e}-700`]),type:"button",children:n.Text,onClick:n.Action})}function ul(e){return d("button",{className:rt(" ",["mt-3","w-full","inline-flex","justify-center","rounded-md","border","border-gray-300","shadow-sm","px-4","py-2","bg-white","text-base","font-medium","text-gray-700","hover:bg-gray-50","focus:outline-none","focus:ring-2","focus:ring-offset-2","focus:ring-indigo-500","sm:mt-0","sm:ml-3","sm:w-auto","sm:text-sm"]),type:"button",children:e.Text,onClick:e.Action})}function ll(e){return["strokeLinecap",e]}function cl(e){return["strokeLinejoin",e]}const al=d("div",wn(Ot([["className",rt(" ",["mx-auto","flex-shrink-0","flex","items-center","justify-center","h-12","w-12","rounded-full","bg-red-100","sm:mx-0","sm:h-10","sm:w-10"])],(()=>{let e;const n=[d("svg",wn(Ot([["className",rt(" ",["h-6","w-6","text-red-600"])],["fill","none"],["stroke","currentColor"],["strokeWidth",2],["viewBox","0 0 24 24"],["xmlns","http://www.w3.org/2000/svg"],(e=bt(d("path",wn(Ot([ll("round"),cl("round"),["d","M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"]])))),["children",Ds.Children.toArray(Array.from(e))])])))];return["children",Ds.Children.toArray(Array.from(n))]})()]))),fl=d("div",wn(Ot([["className",rt(" ",["mx-auto","flex-shrink-0","flex","items-center","justify-center","h-12","w-12","rounded-full","bg-indigo-100","sm:mx-0","sm:h-10","sm:w-10"])],(()=>{let e;const n=[d("svg",wn(Ot([["className",rt(" ",["h-6","w-6","text-indigo-600"])],["fill","none"],["stroke","currentColor"],["strokeWidth",2],["viewBox","0 0 24 24"],["xmlns","http://www.w3.org/2000/svg"],(e=bt(d("path",wn(Ot([ll("round"),cl("round"),["d","M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"]])))),["children",Ds.Children.toArray(Array.from(e))])])))];return["children",Ds.Children.toArray(Array.from(n))]})()])));function dl(e,n){let t;return d("div",wn(Ot([["className",rt(" ",["bg-gray-50","px-4","py-3","sm:px-6","sm:flex","sm:flex-row-reverse"])],(t=[sl("red",e),ul(n)],["children",Ds.Children.toArray(Array.from(t))])])))}function hl(e){let n;return d("div",wn(Ot([["className","mt-2"],(n=[d("p",{className:rt(" ",["text-sm","text-gray-500"]),children:e})],["children",Ds.Children.toArray(Array.from(n))])])))}function ml(e,n,t,r){let o,i,s,u;return d("div",wn(Ot([["className",rt(" ",["relative","inline-block","align-bottom","bg-white","rounded-lg","text-left","overflow-hidden","shadow-xl","transform","transition-all","sm:my-8","sm:align-middle","sm:max-w-lg","sm:w-full"])],(o=[d("div",wn(Ot([["className",rt(" ",["bg-white","px-4","pt-5","pb-4","sm:p-6","sm:pb-4"])],(i=[d("div",wn(Ot([["className",rt(" ",["sm:flex","sm:items-start"])],(s=[al,d("div",wn(Ot([["className",rt(" ",["mt-3","text-center","sm:mt-0","sm:ml-4","sm:text-left"])],(u=[(l=e,d("h3",{className:rt(" ",["text-lg","leading-6","font-medium","text-gray-900"]),id:"modal-title",children:l})),hl(n)],["children",Ds.Children.toArray(Array.from(u))])])))],["children",Ds.Children.toArray(Array.from(s))])])))],["children",Ds.Children.toArray(Array.from(i))])]))),dl(t,r)],["children",Ds.Children.toArray(Array.from(o))])])));var l}function pl(e){let n,t,r;return d("div",wn(Ot([["className",rt(" ",["relative","z-10"])],["role",rt(" ",["dialog"])],(n=[d("div",{className:rt(" ",["fixed","inset-0","bg-gray-500","bg-opacity-75","transition-opacity"])}),d("div",wn(Ot([["className",rt(" ",["fixed","z-10","inset-0","overflow-y-auto"])],(t=[d("div",wn(Ot([["className",rt(" ",["flex","min-h-full","items-end","justify-center","p-4","text-center","sm:items-center","sm:p-0"])],(r=[d("span",{className:rt(" ",["hidden","sm:inline-block","sm:align-middle","sm:h-screen"]),children:"​"}),ml(e.HeadingText,e.BodyText,e.ConfirmAction,e.CancelAction)],["children",Ds.Children.toArray(Array.from(r))])])))],["children",Ds.Children.toArray(Array.from(t))])])))],["children",Ds.Children.toArray(Array.from(n))])])))}function wl(e,n,t,r,o){const i=function(e,n,t,r){const o=0|mn(e,t);if(0===o)throw new Error("The step of a range cannot be zero");const i=o>0;return t=>{const o=0|mn(t,n);return i&&o<=0||!i&&o>=0?[t,r(t,e)]:void 0}}(n,t,r,o);return Wt((()=>{return n=i,t=e,Vt((()=>function(e,n){let t,r=n;return Lt((()=>{if(null!=t){const e=t[0];return t[1],e}return $t()}),(()=>{if(t=e(r),null!=t){t[0];const e=t[1];return r=e,!0}return!1}),(()=>{}))}(n,t)));var n,t}))}class gl extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Writable","ReadWritable"]}}class yl{constructor(e){this.state=new gl(0,ct(new Array(pn(dn,e,10)),0,pn(dn,e,10),null),0)}}function _l(e){const n=e.state;if(1===n.tag){const t=0|n.fields[1],r=0|n.fields[2],o=n.fields[0],i=(r+1)%o.length|0;return e.state=i===t?new gl(0,o,t):new gl(1,o,t,i),kn(o[r])}}class vl extends xn{constructor(e,n,t,r,o,i,s){super(),this.init=e,this.update=n,this.subscribe=t,this.view=r,this.setState=o,this.onError=i,this.syncDispatch=s}}function Cl(e,n){const t=n.init(e),r=t[0],o=new yl(10);let i=!1,s=r;const u=vn(1,n.syncDispatch,[e=>{if(i)!function(e,n){const t=e.state;if(1===t.tag){const i=0|t.fields[1],s=0|t.fields[2],u=t.fields[0];u[i]=n;const l=(i+1)%u.length|0;e.state=l===s?new gl(1,(r=s,o=u,Array.from(Wt((()=>Xt(or(r,o),Wt((()=>{return Xt((e=r,n=o,Yt((()=>zt(n)),((n,t)=>{if(n<e){if(t["System.Collections.IEnumerator.MoveNext"]())return kn(t["System.Collections.Generic.IEnumerator`1.get_Current"]());throw new Error(Rt+"\\nParameter name: source")}}),(e=>{We(e)}))),Wt((()=>{return n=e=>Zt(null),e=o.length,t=wl(0,1,e,0,((e,n)=>e+n)),Wt((()=>qt(nr(n,t))));var e,n,t})));var e,n}))))))),u.length,0):new gl(1,u,l,s)}else{const r=0|t.fields[1],o=t.fields[0];o[r]=n;const i=(r+1)%o.length|0;e.state=new gl(1,o,i,r)}var r,o}(o,e);else{i=!0;let t=kn(e);for(;null!=t;){const e=In(t);try{const t=n.update(e,s),r=t[0];n.setState(r,u),Du((t=>{n.onError([Qn(Xn("Error in command while handling: %A"))(e),t])}),u,t[1]),s=r}catch(t){n.onError([Qn(Xn("Unable to process the message: %A"))(e),t])}t=_l(o)}i=!1}}]);n.setState(r,u),Du((e=>{n.onError(["Error intitializing:",e])}),u,function(e){const n=pt();let t=n;const r=e=>{t=kt(((e,n)=>{const t=new ht(n,void 0);return e.tail=t,t}),t,e)};if(Be(e))e.forEach(r);else if(e instanceof ht)Nt(r,e);else{const n=Je(e);try{for(;n["System.Collections.IEnumerator.MoveNext"]();)r(n["System.Collections.Generic.IEnumerator`1.get_Current"]())}finally{We(n)}}const o=t,i=pt();return o.tail=i,_t(n)}(Ot([(()=>{try{return n.subscribe(r)}catch(e){return n.onError(["Unable to subscribe:",e]),Fu()}})(),t[1]])))}class bl{constructor(){this.hasDisposedOnce=!1,this.state=void 0,this.listener=void 0,this.dispatcher=void 0}}function xl(){return new bl}function Sl(e,n,t,r){Cl(n,function(e,n){return new vl(n.init,n.update,n.subscribe,n.view,((e,n)=>{!function(e,n,t){e.state=kn(n),e.dispatcher=t;const r=e.listener;null!=r&&r(n)}(t,e,n)}),n.onError,n.syncDispatch)}(0,e()));const o=function(e){return e.state}(t);if(null!=o)return In(o);throw new Error("Elmish program has not initialized")}function El(e,n){return function(e,n,t){const r=Rs(xl)[0],o=Rs((()=>Sl(e,n,r))),i=o[1];return $s((()=>(function(e){return e.hasDisposedOnce}(r)&&i(Sl(e,n,r)),Ps((()=>{!function(e){const n=e.state;if(null!=n){const e=In(n);ze(e)&&We(e)}e.dispatcher=void 0,e.state=void 0,e.hasDisposedOnce=!0}(r)})))),Tn(t,[])),function(e,n){null==e.listener&&(e.listener=n)}(r,i),[o[0],e=>{!function(e,n){const t=e.dispatcher;null!=t&&t(n)}(r,e)}]}(e,void 0,n)}function Al(e,n,t){return El((()=>function(e,n,t){return new vl(e,n,(e=>Fu()),t,yn(2,(e=>{const n=vn(1,t,[e]);return e=>{n(e)}})),(e=>{var n,t;n=e[0],t=e[1],console.error(kn(n),t)}),yn(2,(e=>e)))}(e,n,((e,n)=>{}))),t)}function kl(){const e=bt(d("span",{children:["Please wait..."]}));return d("div",{children:Ds.Children.toArray(Array.from(e))})}function Il(e){const n=bt(d("span",{children:[e.error]}));return d("div",{children:Ds.Children.toArray(Array.from(n))})}class Nl extends xn{constructor(e,n){super(),this.PartnerId=e,this.AccountId=n}}class Tl extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["LoadData","LoadDetail","ShowResetModal","CloseModal","ResetPromotedFunds","Reload"]}}class Ol extends xn{constructor(e,n,t,r){super(),this.PromotedFundOverrides=e,this.FundLookup=n,this.User=t,this.ModalState=r}}class Ml extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["ShowModal","Hidden"]}}function Dl(e,n,t){if(null==n);else{const r=n;Ys(function(e,n,t,r){const o=[n,t];return qs.Delay((()=>{let n;const t=o[1];return n=null==t?void 0:t.fields[0],qs.Bind((i=e.backendUrl,s=e.accessToken,u=o[0].fields[0],l=n,qs.Delay((()=>{let e;const n=Nu(s,lu(new Qs(0),uu((null==l?e=>`${e}/account-registry/${u}`:(e=l,n=>`${n}/account-registry/${u}/${e}`))(Iu(i)))));return qs.Bind(n,(e=>{const n=e;if(1===n.tag)return qs.Return(new Co(1,n.fields[0]));{const e=n.fields[0];if(200===e.statusCode){const n=os(yn(2,xs(Yr("SuperSelection.AdminUI.Dto.PromotedFundDetail",[],mu,(()=>[["Partner",Yr("SuperSelection.AdminUI.Dto.PartnerDetail",[],pu,(()=>[["PartnerId",no],["Name",no]]))],["Account",Kr(Yr("SuperSelection.AdminUI.Dto.AccountDetail",[],wu,(()=>[["AccountId",no],["Name",no]])))]])),new So(1),void 0)),e.responseText);return qs.Return(n)}return qs.Return(new Co(1,"Unexpected response from backend"))}}))}))),(e=>(r(new Tl(1,o,new Xs(2,e))),qs.Zero())));var i,s,u,l}))}(e,r[0],r[1],t))}}function Fl(e){const n=(t=(e,n)=>an(n,new Xs(0))?kn(e):void 0,function(e,n){return Er(n,e.tree)}(e,t));var t;if(null==n)return[e,void 0];{const t=In(n);return[Lr(t,(e=>{let n;return null==e?void 0:(n=e,new Xs(1))}),e),kn(t)]}}function Ul(e){let n;return[[new Os(0,e.PartnerId),(n=e.AccountId,null==n?void 0:new Ms(0,n))],new Xs(0)]}function Pl(e,n,t){let r,o,i,s,u,l,c;switch(1===n.tag?(r=2,s=n.fields[1],u=n.fields[0]):2===n.tag?(r=3,l=n.fields[0]):3===n.tag?r=4:4===n.tag?(r=5,c=n.fields[0]):5===n.tag?r=6:2===n.fields[0].tag&&0===n.fields[0].fields[0].tag?(r=0,o=n.fields[0].fields[0].fields[0]):(r=1,i=n.fields[0]),r){case 0:return function(e,n,t){const r=Fl(Pr(Dt(Ul,t)));return[new Ol(new Xs(2,new Co(0,t)),r[0],n.User,n.ModalState),Uu((n=>{Dl(e,r[1],n)}))]}(e,t,o);case 1:return[new Ol(i,t.FundLookup,t.User,t.ModalState),Fu()];case 2:return function(e,n,t,r,o){const i=Fl(Lr([t,r],(e=>null!=e?o:void 0),n.FundLookup));return[new Ol(n.PromotedFundOverrides,i[0],n.User,n.ModalState),Uu((n=>{Dl(e,i[1],n)}))]}(e,t,u[0],u[1],s);case 3:return[new Ol(t.PromotedFundOverrides,t.FundLookup,t.User,new Ml(0,l)),Fu()];case 4:return[new Ol(t.PromotedFundOverrides,t.FundLookup,t.User,new Ml(1)),Fu()];case 5:return[new Ol(new Xs(1),t.FundLookup,t.User,new Ml(1)),Uu((n=>{!function(e,n,t,r){Ys(function(e,n,t,r){return qs.Delay((()=>qs.Bind(Mu(e.backendUrl,e.accessToken,n,t),(e=>(r(new Tl(5)),qs.Zero())))))}(e,n,t,r))}(e,c.PartnerId,c.AccountId,n)}))];case 6:return[new Ol(new Xs(1),t.FundLookup,t.User,t.ModalState),Uu((n=>{!function(e,n){Ys(function(e,n){return qs.Delay((()=>qs.Bind(Tu(e.backendUrl,e.accessToken),(e=>(n(new Tl(0,new Xs(2,e))),qs.Zero())))))}(e,n))}(e,n)}))]}}const Rl=Ot([ju("Partner"),ju("Account"),ju("Promoted Funds"),ju("")]);function $l(e,n){return Wu(Ot(["account-registry","partners",e,"accounts",n,"super-configuration"]),1)}function Gl(e){let n;const t=Al((()=>{return n=e.accessToken,[new Ol(new Xs(0),zr(),Ns(n),new Ml(1)),Fu()];var n}),((n,t)=>Pl(e,n,t))),r=t[0],o=t[1];if(Gs(Ks((()=>function(e){return Tu(e.backendUrl,e.accessToken)}(e)),(e=>{o(new Tl(0,e))}))),null==As(r.User.Roles))return d(Il,{error:"You do not have the appropriate permissions to view this information"});{const e=r.PromotedFundOverrides;let t,i,s,u;switch(1===e.tag?t=0:2===e.tag?0===e.fields[0].tag?(t=3,u=e.fields[0].fields[0]):(t=1,i=e.fields[0].fields[0]):3===e.tag?(t=2,s=e.fields[0]):t=0,t){case 0:return d(kl,null);case 1:return d(Il,{error:i});case 2:return d(Il,{error:Cn(s)});case 3:return d("div",wn(bt((n=Jt(Wt((()=>Xt(Zt(d("h2",{className:"text-xl text-gray-900",children:"Promoted Fund Overrides"})),Wt((()=>Xt(Zt(d("p",{className:"mt-2 text-sm text-gray-700",children:"A list of all promoted fund overrides. This does not include accounts or partners that use the default configuration."})),Wt((()=>Xt(Zt(function(e,n){let t,r,o,i,s,u,l;return d("div",wn(Ot([["className","flex flex-col mt-4"],(t=[d("div",wn(Ot([["className","-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"],(r=[d("div",wn(Ot([["className","py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8"],(o=[d("div",wn(Ot([["className","shadow overflow-hidden border-b border-gray-200 sm:rounded-lg"],(i=[d("table",wn(Ot([["className","min-w-full divide-y divide-gray-200"],(s=[d("thead",{className:"bg-gray-50",children:(u=nr(Ru,e),d("tr",{children:Ds.Children.toArray(Array.from(u))}))}),(l=tr(((e,n)=>(n=>{let t;return d("tr",wn(Ot([["className",e%2==0?"bg-white":"bg-gray-50"],(t=nr(Hu,n),["children",Ds.Children.toArray(Array.from(t))])])))})(n)),n),d("tbody",{children:Ds.Children.toArray(Array.from(l))}))],["children",Ds.Children.toArray(Array.from(s))])])))],["children",Ds.Children.toArray(Array.from(i))])])))],["children",Ds.Children.toArray(Array.from(o))])])))],["children",Ds.Children.toArray(Array.from(r))])])))],["children",Ds.Children.toArray(Array.from(t))])])))}(Rl,Dt((e=>function(e,n,t){return Jt(Wt((()=>{let r;const o=function(e,n){const t=Hr(e,[new Os(0,n.PartnerId),(r=n.AccountId,On((e=>new Ms(0,e)),r))]);var r;let o,i;switch(null!=t&&2===t.tag&&0===t.fields[0].tag?(o=0,i=t.fields[0].fields[0]):o=1,o){case 0:return i;case 1:return}}(e,t),i=function(e,n){let t;return Tn((t=n,null==t?void 0:t.Partner.Name),e)}(t.PartnerId,o),s=function(e,n){let t,r;return t=n,null==(o=null==t?void 0:(r=t.Account,null==r?void 0:r.Name))?e:o;var o}(t.AccountId,o);return Xt(Zt((r=[(u=t.PartnerId,Wu(Ot(["account-registry","partners",u,"super-configuration"]),1)),i],Lu(r[0],r[1]))),Wt((()=>{let e,r,o,i;return Xt((e=[t.AccountId,s],null!=e[0]&&null!=e[1]?(r=e[0],o=e[1],Zt((i=[$l(t.PartnerId,r),o],Lu(i[0],i[1])))):Zt(Bu(["text-gray-500"],"-"))),Wt((()=>Xt(Zt(Bu(["text-gray-500"],rt(", ",t.Funds))),Wt((()=>{return Zt((e=il((e=>{n(new Tl(2,new Nl(t.PartnerId,t.AccountId)))})),Gu(d("td",{className:rt(" ",["flex justify-center py-2"]),children:Ds.Children.toArray([e])}))));var e}))))))})));var u})))}(r.FundLookup,o,e)),u))),Wt((()=>{const e=r.ModalState;return 0===e.tag?Zt(function(e,n){let t;const r=e.AccountId;return t=null==r?`Partner: ${e.PartnerId}`:`Account: ${r}`,d(pl,{BodyText:`Are you sure you want to reset the current promoted funds for ${t}? This action cannot be undone.`,CancelAction:new nl("Cancel",(e=>{n(new Tl(3))})),ConfirmAction:new el("Reset",(t=>{n(new Tl(4,e))})),HeadingText:"Reset Promoted Funds"})}(e.fields[0],o)):Zt(null)})))))))))))),["children",Ds.Children.toArray(Array.from(n))]))))}}}class Hl extends xn{constructor(e,n,t){super(),this.Id=e,this.PartnerId=n,this.Enabled=t}}const jl=bt("CampaignConnect");class Ll extends xn{constructor(e,n){super(),this.PromotedFunds=e,this.FeatureFlags=n}}class Bl extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Account","Partner"]}}class Vl extends xn{constructor(e,n,t){super(),this.Data=e,this.User=n,this.ModalState=t}}class zl extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["ResetModal","EditModal","Hidden"]}}class Wl extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["DefaultUsi","PromotedFunds","FeatureFlag"]}}class ql extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["LoadData","ShowEditModal","ShowResetModal","ShowFeatureFlagModal","EnableFeatureFlag","DisableFeatureFlag","CloseModal","UpdateDefaultUsi","UpdatePromotedFunds","ResetDefaultUsi","ResetPromotedFunds","PromotedFundsUpdate","FeatureFlagUpdate"]}}class Zl extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Default","Inherited","Config"]}}function Jl(e){switch(e.tag){case 1:return e.fields[0]+" (inherited)";case 2:return e.fields[0];default:return e.fields[0]+" (default)"}}function Yl(e){switch(e.tag){case 1:default:return"";case 2:return e.fields[0]}}class Xl extends xn{constructor(e,n,t,r,o){super(),this.UpdatePromotedFunds=e,this.DeletePromotedFunds=n,this.UpdateDefaultFundUsi=t,this.UpdateFeatureFlag=r,this.ReloadData=o}}function Kl(e,n,t){let r,o;return d("div",wn(Ot([["className","mt-2 w-full h-full"],(r=[d("div",wn(Ot([["className","h-30"],(o=[d("label",{className:"sr-only text-base",htmlFor:"field",children:n}),d("input",{type:"text",name:"field",id:"field",className:"shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-base border-gray-300 rounded-md",value:t,onChange:n=>{e(n.target.value)}})],["children",Ds.Children.toArray(Array.from(o))])])))],["children",Ds.Children.toArray(Array.from(r))])])))}function Ql(e,n){let t;return d("div",wn(Ot([["className",rt(" ",["bg-gray-50","px-4","py-3","sm:px-6","sm:flex","sm:flex-row-reverse"])],(t=[sl("indigo",e),ul(n)],["children",Ds.Children.toArray(Array.from(t))])])))}function ec(e){let n,t,r,o,i,s,u;const l=(c=e.FieldValue,Ds.useState(c));var c;const a=l[0],f=rl(e.ConfirmAction,a);return d("div",wn(Ot([["className",rt(" ",["relative","z-10"])],["role",rt(" ",["dialog"])],(n=[d("div",{className:rt(" ",["fixed","inset-0","bg-gray-500","bg-opacity-75","transition-opacity"])}),d("div",wn(Ot([["className",rt(" ",["fixed","z-10","inset-0","overflow-y-auto"])],(t=[d("div",wn(Ot([["className",rt(" ",["flex","min-h-full","items-end","justify-center","p-4","text-center","sm:items-center","sm:p-0"])],(r=[d("span",{className:rt(" ",["hidden","sm:inline-block","sm:align-middle","sm:h-screen"]),children:"​"}),d("div",wn(Ot([["className",rt(" ",["relative","inline-block","align-bottom","bg-white","rounded-lg","text-left","overflow-hidden","shadow-xl","transform","transition-all","sm:my-8","sm:align-middle","sm:max-w-lg","sm:w-full"])],(o=[d("div",wn(Ot([["className",rt(" ",["bg-white","px-4","pt-5","pb-4","sm:p-6","sm:pb-4"])],(i=[d("div",wn(Ot([["className",rt(" ",["sm:flex","sm:items-start"])],(s=[fl,d("div",wn(Ot([["className",rt(" ",["mt-3","text-center","sm:mt-0","sm:ml-4","sm:text-left","w-full"])],(u=[(h=e.HeadingText,d("h3",{className:rt(" ",["text-lg","leading-6","font-medium","text-gray-900"]),id:"modal-title",children:h})),Kl(l[1],e.FieldName,a)],["children",Ds.Children.toArray(Array.from(u))])])))],["children",Ds.Children.toArray(Array.from(s))])])))],["children",Ds.Children.toArray(Array.from(i))])]))),Ql(f,e.CancelAction)],["children",Ds.Children.toArray(Array.from(o))])])))],["children",Ds.Children.toArray(Array.from(r))])])))],["children",Ds.Children.toArray(Array.from(t))])])))],["children",Ds.Children.toArray(Array.from(n))])])));var h}function nc(e){let n,t,r;return d("div",wn(Ot([["className","mt-2 w-full h-full"],(n=[d("div",wn(Ot([["className","h-30"],(t=[d("p",{className:"shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-base border-gray-300 rounded-md",value:e}),d("div",wn(Ot([["className","mt-2"],(r=[d("p",{className:"text-sm text-gray-500",children:e})],["children",Ds.Children.toArray(Array.from(r))])])))],["children",Ds.Children.toArray(Array.from(t))])])))],["children",Ds.Children.toArray(Array.from(n))])])))}function tc(e,n){let t;return d("div",wn(Ot([["className",rt(" ",["bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse"])],(t=[sl("indigo",e),ul(n)],["children",Ds.Children.toArray(Array.from(t))])])))}function rc(e){let n,t,r,o,i,s,u;const l=rl(e.ConfirmAction,"");return d("div",wn(Ot([["className","relative z-10"],["role",rt(" ",["dialog"])],(n=[d("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"}),d("div",wn(Ot([["className","fixed z-10 inset-0 overflow-y-auto"],(t=[d("div",wn(Ot([["className","flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0"],(r=[d("span",{className:"hidden sm:inline-block sm:align-middle sm:h-screen",children:"​"}),d("div",wn(Ot([["className","relative inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full"],(o=[d("div",wn(Ot([["className","bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4"],(i=[d("div",wn(Ot([["className","sm:flex sm:items-start"],(s=[fl,d("div",wn(Ot([["className","mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"],(u=[(c=e.HeadingText,d("h3",{className:rt(" ",["text-lg leading-6 font-medium text-gray-900"]),id:"modal-title",children:c})),nc(e.Subtext)],["children",Ds.Children.toArray(Array.from(u))])])))],["children",Ds.Children.toArray(Array.from(s))])])))],["children",Ds.Children.toArray(Array.from(i))])]))),tc(l,e.CancelAction)],["children",Ds.Children.toArray(Array.from(o))])])))],["children",Ds.Children.toArray(Array.from(r))])])))],["children",Ds.Children.toArray(Array.from(t))])])))],["children",Ds.Children.toArray(Array.from(n))])])));var c}function oc(e,n){return d(ec,{CancelAction:new nl("Cancel",(e=>{n(new ql(6))})),ConfirmAction:new tl("Save",((e,t)=>{n(new ql(8,e))})),FieldName:"Promoted Funds",FieldValue:e,HeadingText:"Edit Promoted Funds"})}function ic(e,n){const t=e.Enabled?["Disable",e=>new ql(5,e)]:["Enable",e=>new ql(4,e)],r=t[0];return d(rc,{CancelAction:new nl("Cancel",(e=>{n(new ql(6))})),ConfirmAction:new tl(r,((r,o)=>{n(t[1](e))})),HeadingText:e.Id,Subtext:`This will ${r.toLocaleLowerCase()} the ${e.Id} feature`})}function sc(e){return d(pl,{BodyText:"Are you sure you want to reset the current promoted funds? This action cannot be undone.",CancelAction:new nl("Cancel",(n=>{e(new ql(6))})),ConfirmAction:new el("Reset",(n=>{e(new ql(10))})),HeadingText:"Reset Promoted Funds"})}function uc(e,n){Ys(e.ReloadData(n))}function lc(e,n,t,r){return qs.Delay((()=>{const o=Ou(e,n,t,r);return qs.Bind(o,(t=>{const o=t;if(1===o.tag)return qs.Return(new Co(1,o.fields[0]));{const t=function(e,n,t){return qs.Delay((()=>{let r;const o=Nu(n,lu(new Qs(0),uu((r=Iu(e),`${r}/configurations/${t}`))));return qs.Bind(o,(e=>{const n=e;if(1===n.tag)return qs.Return(new Co(1,n.fields[0]));{const e=n.fields[0];switch(0|e.statusCode){case 200:{const n=os(yn(2,xs(Yr("SuperSelection.AdminUI.Dto.AccountConfiguration",[],hu,(()=>[["DefaultFundUSI",Kr(no)]])),new So(1),void 0)),e.responseText);return qs.Return(n)}case 404:{const e=new Co(0,new hu(void 0));return qs.Return(e)}default:return qs.Return(new Co(1,"Unexpected response from backend"))}}}))}))}(e,n,r);return qs.Bind(t,(e=>{let n;const t=e;return n=1===t.tag?new Co(1,t.fields[0]):new Co(0,new Bl(0,new Ts(o.fields[0],t.fields[0]))),qs.Return(n)}))}}))}))}function cc(e,n,t){return qs.Delay((()=>{const r=Ou(e,n,t,void 0);return qs.Bind(r,(r=>{const o=r;if(1===o.tag)return qs.Return(new Co(1,o.fields[0]));{const r=function(e,n,t){return qs.Delay((()=>{let r;const o=Nu(n,lu(new Qs(0),uu((r=Iu(e),`${r}/partner/${t}/feature-flags`))));return qs.Bind(o,(e=>{const n=e;if(1===n.tag)return qs.Return(new Co(1,n.fields[0]));{const e=n.fields[0];switch(0|e.statusCode){case 200:{let n;const t=os(yn(2,xs(Xr(["Items",Qr(Yr("SuperSelection.AdminUI.Dto.FeatureFlag",[],gu,(()=>[["Id",no],["PartnerId",no],["Enabled",to],["Editor",no]])))]),new So(1),void 0)),e.responseText);return n=qs.Return(t),qs.Bind(n,(e=>{let n;const t=e;return n=1===t.tag?new Co(1,t.fields[0]):new Co(0,t.fields[0].Items),qs.Return(n)}))}case 404:return qs.Return(new Co(0,vt()));default:return qs.Return(new Co(1,"Unexpected response from backend"))}}}))}))}(e,n,t);return qs.Bind(r,(e=>{let n;const r=e;var i,s;return n=1===r.tag?new Co(1,r.fields[0]):new Co(0,new Bl(1,new Ll(o.fields[0],(i=t,s=r.fields[0],Dt((e=>{const n=Ft((n=>n.Id===e),s);if(null==n)return new Hl(e,i,!1);{const e=n;return new Hl(e.Id,i,e.Enabled)}}),jl))))),qs.Return(n)}))}}))}))}function ac(e){return new Xl(((n,t)=>function(e,n,t){return qs.Delay((()=>qs.Bind(function(e,n,t,r,o){return qs.Delay((()=>{let i;const s=(null==r?e=>`${e}/promoted-funds/${t}`:(i=r,e=>`${e}/promoted-funds/${t}/${i}`))(Iu(e)),u=Nu(n,lu(new Qs(1),cu(new nu(1,Su(0,ku(Xr(["Funds",Qr(no)]),new So(1),void 0,void 0)(o))),uu(s))));return qs.Bind(u,(e=>{const n=e;if(1===n.tag)return qs.Return(new Co(1,n.fields[0]));{const e=n.fields[0];return 200===e.statusCode?qs.Return(new Co(0,void 0)):qs.Return(new Co(1,e.responseText))}}))}))}(e.backendUrl,e.accessToken,e.partnerId,e.accountId,n),(e=>(t(new ql(11,e)),qs.Zero())))))}(e,n,t)),(n=>function(e,n){return qs.Delay((()=>qs.Bind(Mu(e.backendUrl,e.accessToken,e.partnerId,e.accountId),(e=>(n(new ql(11,e)),qs.Zero())))))}(e,n)),((n,t)=>function(e,n,t){return qs.Delay((()=>{const r={DefaultFundUsi:n},o=e.accountId;if(null==o)return qs.Zero();{const n=o;return qs.Bind(function(e,n,t,r){return qs.Delay((()=>{let o;const i=Nu(n,lu(new Qs(2),cu(new nu(1,Su(0,ku(Xr(["DefaultFundUsi",no]),new So(1),void 0,void 0)(r))),uu((o=Iu(e),`${o}/configurations/${t}`)))));return qs.Bind(i,(e=>{const n=e;return 1===n.tag?qs.Return(new Co(1,n.fields[0])):200===n.fields[0].statusCode?qs.Return(new Co(0,void 0)):qs.Return(new Co(1,"Unexpected response from backend"))}))}))}(e.backendUrl,e.accessToken,n,r),(e=>(t(new ql(11,e)),qs.Zero())))}}))}(e,n,t)),((n,t)=>function(e,n,t,r){return qs.Delay((()=>qs.Bind(function(e,n,t,r,o){return qs.Delay((()=>{let i;const s=`${Iu(e)}/partner/${t}/feature-flags/${r}`,u=Nu(n,lu(new Qs(2),cu(new nu(1,(i={Enabled:o,PartnerId:t},Su(0,ku(Xr(["Enabled",to],["PartnerId",no]),new So(1),void 0,void 0)(i)))),uu(s))));return qs.Bind(u,(e=>{const n=e;if(1===n.tag)return qs.Return(new Co(1,n.fields[0]));{const e=n.fields[0];return 200===e.statusCode?qs.Return(new Co(0,void 0)):qs.Return(new Co(1,e.responseText))}}))}))}(e.backendUrl,e.accessToken,e.partnerId,n,t),(e=>(r(new ql(12,e)),qs.Zero())))))}(e,n[0],n[1],t)),(n=>function(e,n){return qs.Delay((()=>{let t;return qs.Bind((t=e.accountId,null==t?cc(e.backendUrl,e.accessToken,e.partnerId):lc(e.backendUrl,e.accessToken,e.partnerId,t)),(e=>(n(new ql(0,new Xs(2,e))),qs.Zero())))}))}(e,n)))}function fc(e,n,t,r){let o,i,s,u,l;const c=Ot(Nn((o=t,null==o?void 0:(a=o,ol(new Xu(0),"indigo",a)))));var a;const f=Ot(Nn((i=r,null==i?void 0:il(i))));return d("div",wn(Ot([["className",rt(" ",["px-4","py-5","sm:grid","sm:grid-cols-5","sm:gap-4","sm:px-6"])],(s=[d("dt",{className:rt(" ",["text-sm","font-medium","text-gray-500"]),children:e}),d("dd",wn(Ot([["className",rt(" ",["mt-1","text-sm","text-gray-900","sm:mt-0","sm:col-span-2"])],(u=[d("span",{className:"flex-grow",children:n})],["children",Ds.Children.toArray(Array.from(u))])]))),d("span",wn(Ot([["className","flex-grow"],(l=Jt(Wt((()=>Xt(c,Wt((()=>f)))))),["children",Ds.Children.toArray(Array.from(l))])])))],["children",Ds.Children.toArray(Array.from(s))])])))}function dc(e,n,t){return fc("Default USI",n,null!=(r=e,Ut(new Ss(0,"SuperSelection.ChangeDefaultFund"),r,{Equals:an,GetHashCode:un})?kn(void 0):void 0)?e=>{t(new ql(1,new Wl(0)))}:void 0,void 0);var r}function hc(e,n,t){return fc("Funds",n,null!=ks(e)?e=>{t(new ql(1,new Wl(1)))}:void 0,null!=ks(e)?e=>{t(new ql(2,new Wl(1)))}:void 0)}function mc(e){let n;return d("div",wn(Ot([["className",rt(" ",["px-4 py-4 sm:px-0"])],(n=[d("h3",{className:rt(" ",["text-lg font-semibold leading-7 text-gray-900"]),children:e})],["children",Ds.Children.toArray(Array.from(n))])])))}function pc(e){let n,t;const r=Al((()=>{return n=e.accessToken,[new Vl(new Xs(0),Ns(n),new zl(2)),Fu()];var n}),yn(2,(n=ac(e),e=>t=>function(e,n,t){switch(n.tag){case 1:return[new Vl(t.Data,t.User,new zl(1,n.fields[0])),Fu()];case 2:return[new Vl(t.Data,t.User,new zl(0,n.fields[0])),Fu()];case 6:case 9:return[new Vl(t.Data,t.User,new zl(2)),Fu()];case 7:return[new Vl(t.Data,t.User,new zl(2)),Uu((t=>{Ys(e.UpdateDefaultFundUsi(n.fields[0],t))}))];case 8:{const r=Ot(at((e=>e.trim()),st(n.fields[0],[","],null,0)));return[new Vl(t.Data,t.User,new zl(2)),Uu((n=>{Ys(e.UpdatePromotedFunds({Funds:r},n))}))]}case 10:return[new Vl(t.Data,t.User,new zl(2)),Uu((n=>{Ys(e.DeletePromotedFunds(n))}))];case 11:return[new Vl(new Xs(1),t.User,t.ModalState),Uu((n=>{uc(e,n)}))];case 3:return[new Vl(t.Data,t.User,new zl(1,new Wl(2,n.fields[0]))),Fu()];case 4:return[new Vl(t.Data,t.User,new zl(2)),Uu((t=>{Ys(e.UpdateFeatureFlag([n.fields[0].Id,!0],t))}))];case 5:return[new Vl(t.Data,t.User,new zl(2)),Uu((t=>{Ys(e.UpdateFeatureFlag([n.fields[0].Id,!1],t))}))];case 12:return[new Vl(new Xs(1),t.User,t.ModalState),Uu((n=>{uc(e,n)}))];default:return[new Vl(n.fields[0],t.User,t.ModalState),Fu()]}}(n,e,t)))),o=r[0],i=r[1];Gs(Ks((()=>function(e){const n=e.accountId;return null==n?cc(e.backendUrl,e.accessToken,e.partnerId):lc(e.backendUrl,e.accessToken,e.partnerId,n)}(e)),(e=>{i(new ql(0,e))})));const s=o.User.Roles;if(null==As(s))return d(Il,{error:"You do not have the appropriate permissions to view this information"});{const e=o.Data;let n,r,u,l;switch(1===e.tag?n=0:2===e.tag?1===e.fields[0].tag?(n=2,u=e.fields[0].fields[0]):(n=1,r=e.fields[0].fields[0]):3===e.tag?(n=3,l=e.fields[0]):n=0,n){case 0:return d(kl,null);case 1:if(1===r.tag){const e=r.fields[0],n=Jt(Wt((()=>{let n;const t=function(e){const n=e.PartnerFunds;return xt(n)?new Zl(0,"slate"):new Zl(2,rt(", ",n))}(e.PromotedFunds),r=Jt(Wt((()=>nr((e=>function(e,n,t){let r,o,i;const s=null!=ks(e)?e=>{t(new ql(3,n))}:e=>{},u=!(null!=ks(e)),l=d("button",wn(Ot([["className",rt(" ",Jt(Wt((()=>Xt(Zt("relative inline-flex h-6 w-11 gap-4 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-indigo-600 focus:ring-offset-2"),Wt((()=>Xt(Zt(u?"cursor-not-allowed":""),Wt((()=>n.Enabled?Zt("bg-indigo-600"):Zt("bg-gray-300")))))))))))],["role",rt(" ",["switch"])],["type","button"],["onClick",s],(r=[d("span",{className:rt(" ",Jt(Wt((()=>Xt(Zt("pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out"),Wt((()=>n.Enabled?Zt("translate-x-5"):Zt("translate-x-0"))))))))})],["children",Ds.Children.toArray(Array.from(r))])])));return d("div",wn(Ot([["className",rt(" ",["px-4 py-5 sm:grid sm:grid-cols-5 sm:gap-4 sm:px-6"])],(o=[d("dt",{className:rt(" ",["text-sm font-medium text-gray-500"]),children:n.Id}),d("dd",wn(Ot([["className",rt(" ",["mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2"])],(i=[d("span",{className:"flex-grow",children:Ds.Children.toArray([l])})],["children",Ds.Children.toArray(Array.from(i))])])))],["children",Ds.Children.toArray(Array.from(o))])])))}(s,e,i)),e.FeatureFlags))));return Zt(d("div",wn(bt((n=Jt(Wt((()=>{let e,n,u;return Xt(Zt(d("div",wn(bt((e=[mc("Promoted Funds"),(n=bt(hc(s,Jl(t),i)),d("dl",{children:Ds.Children.toArray(Array.from(n))})),mc("Feature Flags"),(u=Jt(Wt((()=>r))),d("dl",{children:Ds.Children.toArray(Array.from(u))}))],["children",Ds.Children.toArray(Array.from(e))]))))),Wt((()=>{const e=o.ModalState;switch(e.tag){case 1:{const n=e.fields[0];switch(n.tag){case 1:return Zt(oc(Yl(t),i));case 2:return Zt(ic(n.fields[0],i));default:return Zt(null)}}case 2:return Zt(null);default:return 1===e.fields[0].tag?Zt(sc(i)):Zt(null)}})))}))),["children",Ds.Children.toArray(Array.from(n))])))))})));return d("div",{children:Ds.Children.toArray(Array.from(n))})}{const e=r.fields[0],n=Tn(e.Configuration.DefaultFundUSI,"-"),u=Tn(e.Configuration.DefaultFundUSI,""),l=function(e){const n=[e.PartnerFunds,e.AccountFunds];let t,r;switch(xt(n[0])?xt(n[1])?t=0:(t=2,r=n[1]):xt(n[1])?t=1:(t=2,r=n[1]),t){case 0:return new Zl(0,"slate");case 1:return new Zl(1,rt(", ",n[0]));case 2:return new Zl(2,rt(", ",r))}}(e.PromotedFunds);return d("div",wn(bt((t=Jt(Wt((()=>{let e,t;return Xt(Zt(d("div",wn(bt((e=[(t=Ot([dc(s,n,i),hc(s,Jl(l),i)]),d("dl",{children:Ds.Children.toArray(Array.from(t))}))],["children",Ds.Children.toArray(Array.from(e))]))))),Wt((()=>{const e=o.ModalState;switch(e.tag){case 1:{const n=e.fields[0];switch(n.tag){case 1:return Zt(oc(Yl(l),i));case 2:return Zt(ic(n.fields[0],i));default:return Zt(function(e,n){return d(ec,{CancelAction:new nl("Cancel",(e=>{n(new ql(6))})),ConfirmAction:new tl("Save",((e,t)=>{n(new ql(7,e))})),FieldName:"Default USI",FieldValue:e,HeadingText:"Edit Default USI"})}(u,i))}}case 2:return Zt(null);default:switch(e.fields[0].tag){case 1:return Zt(sc(i));case 2:return Zt(null);default:return Zt(function(e){return d(pl,{BodyText:"Are you sure you want to reset the current Default USI? This action cannot be undone.",CancelAction:new nl("Cancel",(n=>{e(new ql(6))})),ConfirmAction:new el("Reset",(n=>{e(new ql(9))})),HeadingText:"Reset Default USI"})}(i))}}})))}))),["children",Ds.Children.toArray(Array.from(t))]))))}case 2:return d(Il,{error:u});case 3:return d(Il,{error:Cn(l)})}}}V((e=>d(Gl,e)),"superhero-super-selection"),V((e=>d(pc,e)),"superhero-super-configuration")})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flarehr/superhero-super-selection",
3
- "version": "4.38.35531",
3
+ "version": "4.40.35800",
4
4
  "description": "Flare Superhero Super Selection Component",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "files": [