@flarehr/superhero-super-selection 3.48.59061 → 3.51.59881

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 _(e,n){if(null==n)return e.__?_(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?_(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 w(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,T(s,o,r,n.__n,void 0!==s.ownerSVGElement,null!=o.__h?[i]:null,t,null==i?_(o):i,o.__h),I(t,o),o.__e!=i&&g(o)))}))}function v(e,n,t,r,o,i,s,c,a,f){var d,p,g,w,y,v,b,S=r&&r.__k||l,E=S.length;for(t.__k=[],d=0;d<n.length;d++)if(null!=(w=t.__k[d]=null==(w=n[d])||"boolean"==typeof w?null:"string"==typeof w||"number"==typeof w||"bigint"==typeof w?h(null,w,null,null,w):Array.isArray(w)?h(m,{children:w},null,null,null):w.__b>0?h(w.type,w.props,w.key,null,w.__v):w)){if(w.__=t,w.__b=t.__b+1,null===(g=S[d])||g&&w.key==g.key&&w.type===g.type)S[d]=void 0;else for(p=0;p<E;p++){if((g=S[p])&&w.key==g.key&&w.type===g.type){S[p]=void 0;break}g=null}T(e,w,g=g||u,o,i,s,c,a,f),y=w.__e,(p=w.ref)&&g.ref!=p&&(b||(b=[]),g.ref&&b.push(g.ref,null,w),b.push(p,w.__c||y,w)),null!=y?(null==v&&(v=y),"function"==typeof w.type&&w.__k===g.__k?w.__d=a=C(w,a,e):a=x(e,w,g,S,y,a),"function"==typeof t.type&&(t.__d=a)):a&&g.__e==a&&a.parentNode!=e&&(a=_(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=_(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 T(e,t,r,o,i,s,u,l,c){var f,d,h,_,g,w,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))),_=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!==_&&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(_,g,w)}))}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||(w=d.getSnapshotBeforeUpdate(_,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 I(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,w=0;if("svg"===g&&(i=!0),null!=s)for(;w<s.length;w++)if((a=s[w])&&"setAttribute"in a==!!g&&(g?a.localName===g:3===a.nodeType)){n=a,s[w]=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={},w=0;w<n.attributes.length;w++)m[n.attributes[w].name]=n.attributes[w].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(w=t.props.children,v(n,Array.isArray(w)?w:[w],t,r,o,i&&"foreignObject"!==g,s,l,s?s[0]:r.__k&&_(r,0),c),null!=s)for(w=s.length;w--;)null!=s[w]&&f(s[w]);c||("value"in p&&void 0!==(w=p.value)&&(w!==n.value||"progress"===g&&!w||"option"===g&&w!==m.value)&&E(n,"value",w,m.value,!1),"checked"in p&&void 0!==(w=p.checked)&&w!==n.checked&&E(n,"checked",w,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=[],T(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),I(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 G(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 j(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=d(G,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 L(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 $(){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=j,o.prototype.attributeChangedCallback=L,o.prototype.disconnectedCallback=$,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),w(this))},p.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),w(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 _e="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=_e,n.render=n,n.prototype.isReactComponent=n.__f=!0,n.displayName="ForwardRef("+(e.displayName||e.name)+")",n}var we=function(e,n){return null==e?null:b(b(e).map(n))},ye={map:we,forEach:we,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 Te="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Ie=/^(?: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 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}},Ge=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&&Ie.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=Te,Ge&&Ge(e)};var je=n.__r;n.__r=function(e){je&&je(e),Pe=e.__c};var He={ReactCurrentDispatcher:{current:{readContext:function(e){return Pe.__n[e.__c].props.value}}}};function Le(e){return!!e&&e.$$typeof===Te}const $e={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=""),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(w)},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 Le(e)?P.apply(null,arguments):e},createRef:function(){return{current:null}},Fragment:m,isValidElement:Le,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){return Object.getPrototypeOf(e).constructor===Object.getPrototypeOf(n).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){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(Object.getPrototypeOf(e).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){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):Object.getPrototypeOf(e).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){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:Object.getPrototypeOf(e).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 _n(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 wn(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){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 t=Object.getPrototypeOf(e).constructor;return t===Object&&n<10?"{ "+Object.entries(e).map((([e,t])=>e+" = "+Cn(t,n+1))).join("\n ")+" }":t.name}}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)}}class En{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 En?e.value:e)}CompareTo(e){return null==e?1:mn(this.value,e instanceof En?e.value:e)}}function An(e){return null==e||e instanceof En?new En(e):e}function kn(e){if(null==e)throw new Error("Option has no value");return e instanceof En?e.value:e}function Tn(e){return null==e?null:kn(e)}function In(e){return null==e?[]:[kn(e)]}function Nn(e,n){return null!=e?kn(e):n}function On(e,n){return null!=n?An(e(kn(n))):void 0}function Mn(){return e=mn,{Compare:(n,t)=>e(n,t)};var e}function Dn(e,n){return"function"==typeof e?new e(n):new Array(n)}function Fn(e,n,t,r){const o=0|n;return e.fill(r,o,o+t)}function Un(e,n,t){const r=0|n.length,o=Dn(t,r);for(let t=0;t<=r-1;t++)o[t]=e(n[t]);return o}function Pn(e,n,t){return t.reduce(e,n)}function Rn(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}}function Gn(e,n,t,r){return function(e,n,t,r){let o=r;n.length!==t.length&&function(){throw new Error("Arrays had different lengths")}();const i=0|n.length;for(let r=1;r<=i;r++)o=e(0,n[i-r],t[i-r],o);return o}(((n,t,r,o)=>e(t,r,o)),n,t,r)}function jn(e){const n=e<0,t=(e=Math.abs(e))%36e5/6e4;return(n?"-":"+")+Ke(~~(e/36e5),2)+":"+Ke(t,2)}function Hn(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 Ln(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 $n(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," ")+jn(null!==(r=e.offset)&&void 0!==r?r:0);if(1!==n.length)return Ln(i,n,!0);switch(n){case"D":case"d":return Hn(i,"first");case"T":case"t":return Hn(i,"second");case"O":case"o":return function(e,n){const t=e.toISOString();return t.substring(0,t.length-1)+jn(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 Ln(e,n,t);switch(n){case"D":case"d":return t?Hn(e,"first"):e.toLocaleDateString();case"T":case"t":return t?Hn(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?jn(-6e4*e.getTimezoneOffset()):"")}}(e,t);default:throw new Error("Unrecognized Date print format")}}(e,n)}function Bn(e,n){const t=new Date(e);return t.kind=0|(null==n?0:n),t}function Vn(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 zn(e,n){try{return n.contents=function(e,n=!1){const[t,r]=Vn(e),o=null!=r?n&&"Z"===r?1:2:0;return Bn(t.getTime(),o)}(e),!0}catch(e){return!1}}const Wn=Symbol("numeric");function qn(e){return"number"==typeof e||(null==e?void 0:e[Wn])}function Zn(e,n){return"number"==typeof e?e*n:e[Wn]().multiply(n)}function Jn(e,n){return"number"==typeof e?e.toFixed(n):e[Wn]().toFixed(n)}function Yn(e,n){return"number"==typeof e?e.toPrecision(n):e[Wn]().toPrecision(n)}function Xn(e,n){return"number"==typeof e?e.toExponential(n):e[Wn]().toExponential(n)}function Kn(e){return"number"==typeof e?(Number(e)>>>0).toString(16):e[Wn]().toHex()}function Qn(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function et(e,n,t=0){if(e.lastIndex=t,!e.global)throw new Error("Non-global RegExp");let r=e.exec(n);const o=[];for(;null!==r;)o.push(r),r=e.exec(n);return o}const nt=/(^|[^%])%([0+\- ]*)(\*|\d+)?(?:\.(\d+))?(\w)/g,tt=/\{(\d+)(,-?\d+)?(?:\:([a-zA-Z])(\d{0,2})|\:(.+?))?\}/g;function rt(e,n){return function(e,n){return"number"==typeof e?e<n?-1:e>n?1:0:e.CompareTo(n)}(e,n)<0}function ot(e){return{input:e,cont:(n=e,e=>{nt.lastIndex=0;const t=[],r=[];let o=0,i=nt.exec(n);for(;i;){const e=i.index+(i[1]||"").length;t.push(n.substring(o,e).replace(/%%/g,"%")),r.push(i),o=nt.lastIndex,nt.lastIndex-=1,i=nt.exec(n)}return 0===t.length?e(n.replace(/%%/g,"%")):(t.push(n.substring(o).replace(/%%/g,"%")),ct(e,t,r))})};var n}function it(e,n){return"string"==typeof n?e(n):n.cont(e)}function st(e){return it((e=>e),e)}function ut(e){return it((e=>{throw new Error(e)}),e)}function lt(e,n,t,r,o){let i="";if(n=n||"",o=o||"",qn(e))switch("x"!==o.toLowerCase()&&(rt(e,0)?(e=Zn(e,-1),i="-"):n.indexOf(" ")>=0?i=" ":n.indexOf("+")>=0&&(i="+")),r=null==r?null:parseInt(r,10),o){case"f":case"F":e=Jn(e,r=null!=r?r:6);break;case"g":case"G":e=null!=r?Yn(e,r):Yn(e);break;case"e":case"E":e=null!=r?Xn(e,r):Xn(e);break;case"x":e=Kn(e);break;case"X":e=Kn(e).toUpperCase();break;default:e=String(e)}else e=e instanceof Date?$n(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=ft(e,t-i.length,s,o)):ft(i+e,t,s,o)}return e}function ct(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+=lt(e,n,c,r,i),u.splice(0,1),l.splice(0,1)}return 0===l.length?(s+=u[0],e(s)):ct(e,u,l,s,o)}}function at(e,n){return Array.isArray(n)?n.join(e):Array.from(n).join(e)}function ft(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 dt(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(Qn),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 ht(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)}class mt extends xn{constructor(e,n){super(),this.head=e,this.tail=n}toString(){return"["+at("; ",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 pt(this)}[Symbol.iterator](){return Ye(this.GetEnumerator())}"System.Collections.IEnumerable.GetEnumerator"(){return Je(this)}}class pt{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 _t(){return new mt(null,void 0)}function gt(e,n){return new mt(e,n)}function wt(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 vt(e){const n=e.tail;if(null!=n)return n;throw new Error("Collection was empty.\\nParameter name: list")}function Ct(){return _t()}function bt(e,n){return gt(e,n)}function xt(e){return gt(e,_t())}function St(e){return wt(e)}function Et(e){return yt(e)}function At(e){return vt(e)}function kt(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=Fn(new Array(n),0,n,null);return((e,n)=>{for(;;){const r=e,o=n;if(wt(o))break;t[r]=yt(o),e=r+1,n=vt(o)}})(0,e),t}function Tt(e,n,t){let r=n,o=t;for(;!wt(o);)r=e(r,yt(o)),o=vt(o);return r}function It(e){return Tt(((e,n)=>gt(n,e)),_t(),e)}function Nt(e,n){Tt(((n,t)=>{e(t)}),void 0,n)}function Ot(e,n){let t=n;for(let n=e.length-1;n>=0;n--)t=gt(e[n],t);return t}function Mt(e){return Ot(e,_t())}function Dt(e,n){return Tt(((e,n)=>gt(n,e)),n,It(e))}function Ft(e,n){const t=_t(),r=Tt(((n,t)=>{let r;return r=new mt(e(t),void 0),n.tail=r,r}),t,n),o=_t();return r.tail=o,vt(t)}function Ut(e,n,t){return null!=function(e,n){return((n,t)=>{for(;;){const r=n,o=t;if(wt(o))return;if(e(yt(o)))return r;n=r+1,t=vt(o)}})(0,n)}((n=>t.Equals(e,n)),n)}const Pt="The input sequence has an insufficient number of elements.";function Rt(){throw new Error("Enumeration has not started. Call MoveNext.")}function Gt(){throw new Error("Enumeration already finished.")}class jt{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 Lt(e,n,t){return new Ht(e,n,t)}function $t(e,n,t){let r,o=!1,i=An(e());const s=()=>{if(null!=i){const e=kn(i);try{t(e)}finally{i=void 0}}},u=()=>{try{s()}finally{r=void 0}};return Lt((()=>(o||Rt(),null!=r?kn(r):Gt())),(()=>{if(o||(o=!0),null!=i){const e=kn(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 jt(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 Lt((()=>(o?i&&Gt():Rt(),null!=r?kn(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=An(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 kn(o)}}),(()=>{i||s()}))}(e)))}function qt(e){return zt((()=>function(e,n){const t=Dn(void 0,1);return t[0]=e,t}(e)))}function Zt(e){return Be(e)?Mt(e):e instanceof mt?e:function(e){let n,t;if(Be(e))return Mt(e);if(e instanceof mt)return e;{const r=_t();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 mt(e,void 0),n.tail=t,o=t}}finally{We(i)}const s=o,u=_t();return s.tail=u,vt(r)}}(e)}function Jt(e,n,t){return Bt((()=>{let r=-1;return $t(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"]()?An(e(n["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0,o=We,Bt((()=>$t(t,r,o)));var t,r,o}function nr(e,n){return Jt((()=>Vt(n)),((n,t)=>t["System.Collections.IEnumerator.MoveNext"]()?An(e(n,t["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0),We)}function tr(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(Pt+"\\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;const rr=$e,or=(e,n)=>{re((()=>{const n=e();return()=>{n.Dispose()}}),n)};function ir(e,n,t,r){const o=rr.memo(e,wn(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}),In(n)),e=>{const n=function(e,n){if(null==e)return n;{const t=e;return n.key=t(n),n}}(r,e);return rr.createElement(o,n)}}function sr(e){return{Dispose(){e()}}}function ur(e){return rr.useState(e)}function lr(e){var n;n=e,re((()=>{const e=n();return()=>{e.Dispose()}}))}function cr(e,n){or(e,n)}function ar(e){!function(e,n){or((n=>(e(),sr((()=>{})))),[])}(e)}function fr(e){return rr.useRef(e)}function dr(e,n){const t=Nn(n,[]);return rr.useMemo(e,t)}function hr(e){const n=fr(e),t=function(e,t){const r=Nn([],[]);return rr.useCallback((e=>n.current(e)),r)}();var r,o;return r=()=>{n.current=e},o=e=>(r(),sr((()=>{}))),oe((()=>{const e=o();return()=>{e.Dispose()}})),t}class mr{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)}}}}class pr extends Error{constructor(){super("The operation was canceled"),Object.setPrototypeOf(this,pr.prototype)}}class _r{constructor(){this.callCount=0}static get maxTrampolineCallCount(){return 2e3}incrementAndCheck(){return this.callCount++>_r.maxTrampolineCallCount}hijack(e){this.callCount=0,setTimeout(e,0)}}function gr(e){return n=>{if(n.cancelToken.isCancelled)n.onCancel(new pr);else if(n.trampoline.incrementAndCheck())n.trampoline.hijack((()=>{try{e(n)}catch(e){n.onError(e)}}));else try{e(n)}catch(e){n.onError(e)}}}const wr=new class{Bind(e,n){return function(e,n){return gr((t=>{e({onSuccess:e=>{try{n(e)(t)}catch(e){t.onError(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 gr((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 gr((n=>n.onSuccess(e)))}(e)}ReturnFrom(e){return e}TryFinally(e,n){return gr((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 gr((t=>{e({onSuccess:t.onSuccess,onCancel:t.onCancel,cancelToken:t.cancelToken,trampoline:t.trampoline,onError:e=>{try{n(e)(t)}catch(e){t.onError(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 gr((e=>e.onSuccess(void 0)))}};function yr(e){}const vr=new mr;function Cr(e,n){return function(e,n){return function(e,n,t,r,o){"function"!=typeof n&&(o=n,n=void 0);const i=new _r;e({onSuccess:n||yr,onError:t||yr,onCancel:r||yr,cancelToken:o||vr,trampoline:i})}(e,n)}(e,n)}class br extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["HasNotStartedYet","InProgress","Resolved","Failed"]}}function xr(e,n){const t=fr(function(e){const n=new mr(!1);return n}());return cr((()=>sr((()=>{t.current.cancel()}))),[]),hr((r=>{var o;null!=(o=t.current)&&o.isCancelled||Cr(wr.Delay((()=>wr.TryWith(wr.Delay((()=>(n(new br(1)),wr.Bind(e(r),(e=>(n(new br(2,e)),wr.Zero())))))),(e=>(n(new br(3,e)),wr.Zero()))))),t.current)}))}class Sr{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 Ur(this)}GetHashCode(){return Ar(this)}Equals(e){return kr(this,e)}}function Er(e){return null!=e.generics?e.generics:[]}function Ar(e){return on([tn(e.fullname),...Er(e).map(Ar)])}function kr(e,n){return""===e.fullname?""===n.fullname&&ln(zr(e),zr(n),(([e,n],[t,r])=>e===t&&kr(n,r))):e.fullname===n.fullname&&ln(Er(e),Er(n),kr)}function Tr(e,n,t,r){return new Sr(e,n,t,void 0,r)}function Ir(...e){return new Sr("",void 0,void 0,void 0,(()=>e))}function Nr(e){return new Sr("Microsoft.FSharp.Core.FSharpOption`1",[e])}function Or(e){return new Sr("Microsoft.FSharp.Collections.FSharpList`1",[e])}const Mr=new Sr("System.Object"),Dr=(new Sr("Microsoft.FSharp.Core.Unit"),new Sr("System.Char"),new Sr("System.String"));function Fr(e){if(Array.isArray(e))return e[0];if(e instanceof Sr){const n=Rr(e);if(null!=n)return Fr(n)+"[]";{const n=e.fullname.lastIndexOf(".");return-1===n?e.fullname:e.fullname.substr(n+1)}}return e.name}function Ur(e){const n=Rr(e);return null!=n?Ur(n)+"[]":null==e.generics||0===e.generics.length?e.fullname:e.fullname+"["+e.generics.map((e=>Ur(e))).join(",")+"]"}function Pr(e){return null!=Rr(e)}function Rr(e){var n;return"[]"===e.fullname&&1===(null===(n=e.generics)||void 0===n?void 0:n.length)?e.generics[0]:void 0}function Gr(e){return null!=e.generics&&e.generics.length>0}function jr(e){return null!=e.enumCases&&e.enumCases.length>0}function Hr(e){return null==e.generics?e:new Sr(e.fullname,e.generics.map((()=>Mr)))}function Lr(e){var n;return null===(n=e.generics)||void 0===n?void 0:n[0]}function $r(e){if(jr(e)&&null!=e.enumCases)return e.enumCases.map((e=>e[1]));throw new Error(`${e.fullname} is not an enum type`)}function Br(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 Vr(e){if(null!=e.cases)return e.cases();throw new Error(`${e.fullname} is not an F# union type`)}function zr(e){if(null!=e.fields)return e.fields();throw new Error(`${e.fullname} is not an F# record type`)}function Wr(e){if(Jr(e)&&null!=e.generics)return e.generics;throw new Error(`${e.fullname} is not a tuple type`)}function qr(e){return e instanceof Sr?null!=e.cases:e instanceof bn}function Zr(e){return e instanceof Sr?null!=e.fields:e instanceof xn}function Jr(e){return e.fullname.startsWith("System.Tuple")}function Yr(e){return null==e.fields?[]:e.fields}function Xr(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):{}}new Sr("System.Boolean"),new Sr("System.SByte"),new Sr("System.Byte"),new Sr("System.Int16"),new Sr("System.UInt16"),new Sr("System.Int32"),new Sr("System.UInt32"),new Sr("System.Single"),new Sr("System.Double"),new Sr("System.Decimal");class Kr extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Ok","Error"]}}function Qr(e,n){return 0===n.tag?new Kr(0,e(n.fields[0])):new Kr(1,n.fields[0])}class eo extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["BadPrimitive","BadPrimitiveExtra","BadType","BadField","BadPath","TooSmallArray","FailMessage","BadOneOf"]}}class no extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["PascalCase","CamelCase","SnakeCase"]}}class to{constructor(){this.cache=new Map([])}}function ro(){return new to}function oo(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!=(-276&n))throw new Error("RegexOptions only supports: IgnoreCase, Multiline, Singleline and ECMAScript");let t="g";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=et(e,s),l=et.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)}(oo(n),"[A-Z]","_$0").toLowerCase();case 0:return n;default:return oo(n)}}ro(),ro();const so=/^[\(\{]{0,2}[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[\)\}]{0,2}$/,uo=/^([0-9a-f]{8})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{12})$/,lo=/^\{0x[0-9a-f]{8},(0x[0-9a-f]{4},){2}\{(0x[0-9a-f]{2},){7}0x[0-9a-f]{2}\}\}$/;function co(e,n){try{return n.contents=function(e){function n(e){return e.replace(uo,"$1-$2-$3-$4-$5")}const t=e.trim().toLowerCase();if(so.test(t))return function(e,...n){if(0===n.length)return e.trim();const t="["+Qn(n.join(""))+"]+";return e.replace(new RegExp("^"+t),"").replace(new RegExp(t+"$"),"")}(t,"{","}","(",")");if(uo.test(t))return n(t);if(lo.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 ao;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 ho(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&ao.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 mo(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]=Vn(e),r=null==t?-6e4*n.getTimezoneOffset():"Z"===t?0:6e4*t;return mo(n.getTime(),r)}(e),!0}catch(e){return!1}}!function(e){e[e.AllowHexSpecifier=512]="AllowHexSpecifier"}(ao||(ao={}));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 wo(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 zo(this,e)},go.prototype.CompareTo=function(e){return Jo(this,e)},go.prototype.toString=function(e){return Lo(this,e)},go.prototype.toJSON=function(){return Lo(this)},go.prototype[Wn]=function(){const e=this;return{multiply:n=>Qo(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 Lo(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 yo={},vo={};function Co(e,n){var t,r,o;return n?(o=0<=(e>>>=0)&&e<256)&&(r=vo[e])?r:(t=xo(e,(0|e)<0?-1:0,!0),o&&(vo[e]=t),t):(o=-128<=(e|=0)&&e<128)&&(r=yo[e])?r:(t=xo(e,e<0?-1:0,!1),o&&(yo[e]=t),t)}function bo(e,n){if(isNaN(e))return n?Mo:Oo;if(n){if(e<0)return Mo;if(e>=To)return Ro}else{if(e<=-Io)return Go;if(e+1>=Io)return Po}return e<0?Yo(bo(-e,n)):xo(e%ko|0,e/ko|0,n)}function xo(e,n,t){return new go(e,n,t)}var So=Math.pow;function Eo(e,n,t){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return Oo;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 Yo(Eo(e.substring(1),n,t));for(var o=bo(So(t,8)),i=Oo,s=0;s<e.length;s+=8){var u=Math.min(8,e.length-s),l=parseInt(e.substring(s,s+u),t);i=Xo(u<8?Qo(i,bo(So(t,u))):i=Qo(i,o),bo(l))}return i.unsigned=n,i}function Ao(e,n){return"number"==typeof e?bo(e,n):"string"==typeof e?Eo(e,n):xo(e.low,e.high,"boolean"==typeof n?n:e.unsigned)}var ko=4294967296,To=ko*ko,Io=To/2,No=Co(1<<24),Oo=Co(0),Mo=Co(0,!0),Do=Co(1),Fo=Co(1,!0),Uo=Co(-1),Po=xo(-1,2147483647,!1),Ro=xo(-1,-1,!0),Go=xo(0,-2147483648,!1);function jo(e){return e.unsigned?e.low>>>0:e.low}function Ho(e){return e.unsigned?(e.high>>>0)*ko+(e.low>>>0):e.high*ko+(e.low>>>0)}function Lo(e,n){if((n=n||10)<2||36<n)throw RangeError("radix");if($o(e))return"0";if(Bo(e)){if(zo(e,Go)){var t=bo(n),r=ei(e,t),o=Ko(Qo(r,t),e);return Lo(r,n)+jo(o).toString(n)}return"-"+Lo(Yo(e),n)}for(var i=bo(So(n,6),e.unsigned),s=e,u="";;){var l=ei(s,i),c=(jo(Ko(s,Qo(l,i)))>>>0).toString(n);if($o(s=l))return c+u;for(;c.length<6;)c="0"+c;u=""+c+u}}function $o(e){return 0===e.high&&0===e.low}function Bo(e){return!e.unsigned&&e.high<0}function Vo(e){return 1==(1&e.low)}function zo(e,n){return wo(n)||(n=Ao(n)),(e.unsigned===n.unsigned||e.high>>>31!=1||n.high>>>31!=1)&&e.high===n.high&&e.low===n.low}function Wo(e,n){return Jo(e,n)<0}function qo(e,n){return Jo(e,n)>0}function Zo(e,n){return Jo(e,n)>=0}function Jo(e,n){if(wo(n)||(n=Ao(n)),zo(e,n))return 0;var t=Bo(e),r=Bo(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:Bo(Ko(e,n))?-1:1}function Yo(e){return!e.unsigned&&zo(e,Go)?Go:Xo(function(e){return xo(~e.low,~e.high,e.unsigned)}(e),Do)}function Xo(e,n){wo(n)||(n=Ao(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,xo((f&=65535)<<16|(d&=65535),(c&=65535)<<16|(a&=65535),e.unsigned)}function Ko(e,n){return wo(n)||(n=Ao(n)),Xo(e,Yo(n))}function Qo(e,n){if($o(e))return e.unsigned?Mo:Oo;if(wo(n)||(n=Ao(n)),_o)return xo(_o.mul(e.low,e.high,n.low,n.high),_o.get_high(),e.unsigned);if($o(n))return e.unsigned?Mo:Oo;if(zo(e,Go))return Vo(n)?Go:Oo;if(zo(n,Go))return Vo(e)?Go:Oo;if(Bo(e))return Bo(n)?Qo(Yo(e),Yo(n)):Yo(Qo(Yo(e),n));if(Bo(n))return Yo(Qo(e,Yo(n)));if(Wo(e,No)&&Wo(n,No))return bo(Ho(e)*Ho(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,xo((d&=65535)<<16|(h&=65535),(a&=65535)<<16|(f&=65535),e.unsigned)}function ei(e,n){if(wo(n)||(n=Ao(n)),$o(n))throw Error("division by zero");var t,r,o;if(_o)return e.unsigned||-2147483648!==e.high||-1!==n.low||-1!==n.high?xo((e.unsigned?_o.div_u:_o.div_s)(e.low,e.high,n.low,n.high),_o.get_high(),e.unsigned):e;if($o(e))return e.unsigned?Mo:Oo;if(e.unsigned){if(n.unsigned||(n=function(e){return e.unsigned?e:xo(e.low,e.high,!0)}(n)),qo(n,e))return Mo;if(qo(n,function(e,n){if(wo(n)&&(n=jo(n)),0==(n&=63))return e;var t=e.high;return n<32?xo(e.low>>>n|t<<32-n,t>>>n,e.unsigned):xo(32===n?t:t>>>n-32,0,e.unsigned)}(e,1)))return Fo;o=Mo}else{if(zo(e,Go))return zo(n,Do)||zo(n,Uo)?Go:zo(n,Go)?Do:zo(t=function(e,n){return wo(n)&&(n=jo(n)),0==(n&=63)?e:n<32?xo(e.low<<n,e.high<<n|e.low>>>32-n,e.unsigned):xo(0,e.low<<n-32,e.unsigned)}(ei(function(e,n){return wo(n)&&(n=jo(n)),0==(n&=63)?e:n<32?xo(e.low>>>n|e.high<<32-n,e.high>>n,e.unsigned):xo(e.high>>n-32,e.high>=0?0:-1,e.unsigned)}(e,1),n),1),Oo)?Bo(n)?Do:Uo:o=Xo(t,ei(r=Ko(e,Qo(n,t)),n));if(zo(n,Go))return e.unsigned?Mo:Oo;if(Bo(e))return Bo(n)?ei(Yo(e),Yo(n)):Yo(ei(Yo(e),n));if(Bo(n))return Yo(ei(e,Yo(n)));o=Oo}for(r=e;Zo(r,n);){t=Math.max(1,Math.floor(Ho(r)/Ho(n)));for(var i=Math.ceil(Math.log(t)/Math.LN2),s=i<=48?1:So(2,i-48),u=bo(t),l=Qo(u,n);Bo(l)||qo(l,r);)l=Qo(u=bo(t-=s,e.unsigned),n);$o(u)&&(u=Do),o=Xo(o,u),r=Ko(r,l)}return o}const ni=ei,ti=Ho;function ri(e){return e<0?Math.ceil(e):Math.floor(e)}function oi(e=0,n=0,t=0,r=0,o=0){switch(arguments.length){case 1:return ii(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 ii(e){return ti(ni(e,1e4))}function si(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 oi(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*oi(t,s,u,o,r)}}throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}(e),!0}catch(e){return!1}}class ui{constructor(e,n){this.k=e,this.v=n}}function li(e,n){return new ui(e,n)}function ci(e){return e.k}function ai(e){return e.v}class fi extends ui{constructor(e,n,t,r,o){super(e,n),this.left=t,this.right=r,this.h=0|o}}function di(e,n,t,r,o){return new fi(e,n,t,r,o)}function hi(e){return e.left}function mi(e){return e.right}function pi(e){return e.h}function _i(e,n){e:for(;;){const t=e,r=n;if(null!=r){const o=r;if(o instanceof fi){e=_i(t+1,hi(o)),n=mi(o);continue e}return t+1|0}return 0|t}}function gi(e){return _i(0,e)}function wi(e,n,t,r){let o,i;if(null!=e){const n=e;o=n instanceof fi?pi(n):1}else o=0;if(null!=r){const e=r;i=e instanceof fi?pi(e):1}else i=0;const s=0|(o<i?i:o);return 0===s?li(n,t):di(n,t,e,r,s+1)}function yi(e,n,t,r){let o,i,s,u,l,c;if(null!=e){const n=e;l=n instanceof fi?pi(n):1}else l=0;if(null!=r){const e=r;c=e instanceof fi?pi(e):1}else c=0;if(c>l+2){const s=kn(r);if(s instanceof fi){if(o=hi(s),(null!=o?(i=o,i instanceof fi?pi(i):1):0)>l+1){const r=kn(hi(s));if(r instanceof fi)return wi(wi(e,n,t,hi(r)),ci(r),ai(r),wi(mi(r),ci(s),ai(s),mi(s)));throw new Error("internal error: Map.rebalance")}return wi(wi(e,n,t,hi(s)),ci(s),ai(s),mi(s))}throw new Error("internal error: Map.rebalance")}if(l>c+2){const o=kn(e);if(o instanceof fi){if(s=mi(o),(null!=s?(u=s,u instanceof fi?pi(u):1):0)>c+1){const e=kn(mi(o));if(e instanceof fi)return wi(wi(hi(o),ci(o),ai(o),hi(e)),ci(e),ai(e),wi(mi(e),n,t,r));throw new Error("internal error: Map.rebalance")}return wi(hi(o),ci(o),ai(o),wi(mi(o),n,t,r))}throw new Error("internal error: Map.rebalance")}return wi(e,n,t,r)}function vi(e,n,t,r){if(null!=r){const o=r,i=0|e.Compare(n,ci(o));return o instanceof fi?i<0?yi(vi(e,n,t,hi(o)),ci(o),ai(o),mi(o)):0===i?di(n,t,hi(o),mi(o),pi(o)):yi(hi(o),ci(o),ai(o),vi(e,n,t,mi(o))):i<0?di(n,t,void 0,r,2):0===i?li(n,t):di(n,t,r,void 0,2)}return li(n,t)}function Ci(e,n,t){e:for(;;){const r=e,o=n,i=t;if(null!=i){const s=i,u=0|r.Compare(o,ci(s));if(0===u)return An(ai(s));if(s instanceof fi){e=r,n=o,t=u<0?hi(s):mi(s);continue e}return}return}}function bi(e,n){e:for(;;){const t=e,r=n;if(null!=r){const o=r;if(o instanceof fi){bi(t,hi(o)),t(ci(o),ai(o)),e=t,n=mi(o);continue e}t(ci(o),ai(o))}break}}function xi(e,n){bi(e,n)}function Si(e,n){if(null!=n){const t=n;if(t instanceof fi){const n=Si(e,hi(t)),r=e(ci(t),ai(t)),o=Si(e,mi(t));return di(ci(t),r,n,o,pi(t))}return li(ci(t),e(ci(t),ai(t)))}}function Ei(e,n){return Si(e,n)}function Ai(e,n){let t;for(let r=0;r<=n.length-1;r++){const o=n[r];t=vi(e,o[0],o[1],t)}return t}class ki extends xn{constructor(e,n){super(),this.stack=e,this.started=n}}function Ti(e){e:for(;;){const n=e;if(St(n))return Ct();{const t=At(n),r=Et(n);if(null!=r){const o=r;if(o instanceof fi){e=Ot([hi(o),li(ci(o),ai(o)),mi(o)],t);continue e}return n}e=t;continue e}}}function Ii(e){return new ki(Ti(xt(e)),!1)}function Ni(e){if(e.started){const n=e.stack;if(St(n))return function(){throw new Error("enumeration already finished")}();if(null!=Et(n)){const e=Et(n);if(e instanceof fi)throw new Error("Please report error: Map iterator, unexpected stack for current");return[ci(e),ai(e)]}throw new Error("Please report error: Map iterator, unexpected stack for current")}return function(){throw new Error("enumeration not started")}()}function Oi(e){let n=Ii(e);return{"System.Collections.Generic.IEnumerator`1.get_Current":()=>Ni(n),"System.Collections.IEnumerator.get_Current":()=>Ni(n),"System.Collections.IEnumerator.MoveNext":()=>function(e){if(e.started){const n=e.stack;if(St(n))return!1;if(null!=Et(n)){if(Et(n)instanceof fi)throw new Error("Please report error: Map iterator, unexpected stack for moveNext");return e.stack=Ti(At(n)),!St(e.stack)}throw new Error("Please report error: Map iterator, unexpected stack for moveNext")}return e.started=!0,!St(e.stack)}(n),"System.Collections.IEnumerator.Reset"(){n=Ii(e)},Dispose(){}}}class Mi{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 Mi))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 ["+at("; ",er((e=>function(e,...n){return"object"==typeof e&&n.length>0&&(e=n[0],n.shift()),e.replace(tt,((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(qn(u))switch(i=null==i?null:parseInt(i,10),o){case"f":case"F":u=Jn(u,i=null!=i?i:2);break;case"g":case"G":u=null!=i?Yn(u,i):Yn(u);break;case"e":case"E":u=null!=i?Xn(u,i):Xn(u);break;case"p":case"P":i=null!=i?i:2,u=Jn(Zn(u,100),i)+" %";break;case"d":case"D":u=null!=i?ft(String(u),i,"0"):String(u);break;case"x":case"X":u=null!=i?ft(Kn(u),i,"0"):Kn(u),"X"===o&&(u=u.toUpperCase());break;default:if(s){let e="";u=s.replace(/([0#,]+)(\.[0#]+)?/,((n,t,r)=>{rt(u,0)&&(u=Zn(u,-1),e="-");const o=null!=r?r.length:0;if(u=Jn(u,Math.max(o-1,0)),t.indexOf(",")>0){const[e,n]=u.split("."),t=e.length%3,r=Math.floor(e.length/3);let o=t>0?e.substr(0,t)+(r>0?",":""):"";for(let n=0;n<r;n++)o+=e.substr(t+3*n,3)+(n<r-1?",":"");u=n?o+"."+n:o}const i=(t=t.replace(/,/g,"")).length>0&&"0"===t[0]?t.length:0;return ft(u,i-e.length+o,"0")})),u=e+u}}else u=u instanceof Date?$n(u,s||o):Cn(u);return r=parseInt((r||" ").substring(1),10),isNaN(r)||(u=ft(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 Oi(this.tree)}[Symbol.iterator](){return Ye(this.GetEnumerator())}"System.Collections.IEnumerable.GetEnumerator"(){return Oi(this.tree)}CompareTo(e){const n=this;if(e instanceof Mi)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 Ri(this,e[0])&&an(Ui(this,e[0]),e[1])}"System.Collections.Generic.ICollection`1.CopyToZ2E171D71"(e,n){!function(e,n,t){let r=t;xi(((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|Pi(this)}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return 0|Pi(this)}get size(){return 0|Pi(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 Ui(this,e)}has(e){return Ri(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 Di(e,n){return new Mi(e,n)}function Fi(e){const n=Mn();return Di(n,function(e,n){if(Be(n))return Ai(e,n);if(n instanceof mt)return function(e,n){return Tt(((n,t)=>vi(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=vi(r,s[0],s[1],o),t=i}}}(e,void 0,t)}finally{We(t)}}}(n,e))}function Ui(e,n){return function(e,n,t){const r=Ci(e,n,t);if(null==r)throw new Error;return kn(r)}(e.comparer,n,e.tree)}function Pi(e){return gi(e.tree)}function Ri(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,ci(s));if(s instanceof fi){if(u<0){e=r,n=o,t=hi(s);continue e}if(0===u)return!0;e=r,n=o,t=mi(s);continue e}return 0===u}return!1}}(e.comparer,n,e.tree)}function Gi(e,n,t){return function(e,n,t){return Di(e.comparer,vi(e.comparer,n,t,e.tree))}(t,e,n)}function ji(e,n){return function(e,n){return Ci(e.comparer,n,e.tree)}(n,e)}function Hi(e,n){return function(e,n){return Di(e.comparer,Ei(n,e.tree))}(n,e)}function Li(){return Mi.empty}Mi.empty=Di(Mn(),void 0);class $i{constructor(e){this.k=e}}function Bi(e){return new $i(e)}function Vi(e){return e.k}class zi extends $i{constructor(e,n,t,r){super(e),this.left=n,this.right=t,this.h=0|r}}function Wi(e,n,t,r){return new zi(e,n,t,r)}function qi(e){return e.left}function Zi(e){return e.right}function Ji(e){return e.h}function Yi(e,n){e:for(;;){const t=e,r=n;if(null!=t){const o=t;if(o instanceof zi){e=qi(o),n=Yi(Zi(o),r+1);continue e}return r+1|0}return 0|r}}function Xi(e){return Yi(e,0)}function Ki(e,n,t){let r,o;if(null!=e){const n=e;r=n instanceof zi?Ji(n):1}else r=0;if(null!=t){const e=t;o=e instanceof zi?Ji(e):1}else o=0;const i=0|(r<o?o:r);return 0===i?Bi(n):Wi(n,e,t,i+1)}function Qi(e,n,t){let r,o,i,s,u,l;if(null!=e){const n=e;u=n instanceof zi?Ji(n):1}else u=0;if(null!=t){const e=t;l=e instanceof zi?Ji(e):1}else l=0;if(l>u+2){const i=kn(t);if(i instanceof zi){if(r=qi(i),(null!=r?(o=r,o instanceof zi?Ji(o):1):0)>u+1){const t=kn(qi(i));if(t instanceof zi)return Ki(Ki(e,n,qi(t)),Vi(t),Ki(Zi(t),Vi(i),Zi(i)));throw new Error("internal error: Set.rebalance")}return Ki(Ki(e,n,qi(i)),Vi(i),Zi(i))}throw new Error("internal error: Set.rebalance")}if(u>l+2){const r=kn(e);if(r instanceof zi){if(i=Zi(r),(null!=i?(s=i,s instanceof zi?Ji(s):1):0)>l+1){const e=kn(Zi(r));if(e instanceof zi)return Ki(Ki(qi(r),Vi(r),qi(e)),Vi(e),Ki(Zi(e),n,t));throw new Error("internal error: Set.rebalance")}return Ki(qi(r),Vi(r),Ki(Zi(r),n,t))}throw new Error("internal error: Set.rebalance")}return Ki(e,n,t)}function es(e,n,t){if(null!=t){const r=t,o=0|e.Compare(n,Vi(r));if(r instanceof zi)return o<0?Qi(es(e,n,qi(r)),Vi(r),Zi(r)):0===o?t:Qi(qi(r),Vi(r),es(e,n,Zi(r)));{const o=0|e.Compare(n,Vi(r));return o<0?Wi(n,void 0,t,2):0===o?t:Wi(n,t,void 0,2)}}return Bi(n)}function ns(e,n,t){e:for(;;){const r=e,o=n,i=t;if(null!=i){const s=i,u=0|r.Compare(o,Vi(s));if(s instanceof zi){if(u<0){e=r,n=o,t=qi(s);continue e}if(0===u)return!0;e=r,n=o,t=Zi(s);continue e}return 0===u}return!1}}function ts(e,n){e:for(;;){const t=e,r=n;if(null!=r){const o=r;if(o instanceof zi){ts(t,qi(o)),t(Vi(o)),e=t,n=Zi(o);continue e}t(Vi(o))}break}}class rs extends xn{constructor(e,n){super(),this.stack=e,this.started=n}}function os(e){e:for(;;){const n=e;if(St(n))return Ct();{const t=Et(n),r=At(n);if(null!=t){const o=t;if(o instanceof zi){e=Ot([qi(o),Bi(Vi(o)),Zi(o)],r);continue e}return n}e=r;continue e}}}function is(e){return new rs(os(xt(e)),!1)}function ss(e){if(e.started){const n=e.stack;if(St(n))return function(){throw new Error("Enumeration already started")}();if(null!=Et(n))return Vi(Et(n));throw new Error("Please report error: Set iterator, unexpected stack for current")}return function(){throw new Error("Enumeration not started")}()}function us(e){let n=is(e);return{"System.Collections.Generic.IEnumerator`1.get_Current":()=>ss(n),"System.Collections.IEnumerator.get_Current":()=>ss(n),"System.Collections.IEnumerator.MoveNext":()=>function(e){if(e.started){const n=e.stack;if(St(n))return!1;if(null!=Et(n)){if(Et(n)instanceof zi)throw new Error("Please report error: Set iterator, unexpected stack for moveNext");return e.stack=os(At(n)),!St(e.stack)}throw new Error("Please report error: Set iterator, unexpected stack for moveNext")}return e.started=!0,!St(e.stack)}(n),"System.Collections.IEnumerator.Reset"(){n=is(e)},Dispose(){}}}function ls(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(St(s[0]))return St(s[1])?0:-1;if(St(s[1]))return 1;if(null!=Et(s[1]))if(null!=Et(s[0])){const u=Et(s[0]),l=Et(s[1]);if(u instanceof zi)if(null==qi(u)){if(!(l instanceof zi)){const o=0|r.Compare(Vi(u),Vi(l));if(0!==o)return 0|o;e=r,n=bt(Zi(u),At(s[0])),t=bt(void 0,At(s[1]));continue e}if(null==qi(l)){const o=0|r.Compare(Vi(u),Vi(l));if(0!==o)return 0|o;e=r,n=bt(Zi(u),At(s[0])),t=bt(Zi(l),At(s[1]));continue e}{const s=[o,i];let u,l,c,a,f;switch(St(s[0])?St(s[1])?u=2:null!=Et(s[1])?(u=1,a=At(s[1]),f=Et(s[1])):u=2:null!=Et(s[0])?(u=0,l=At(s[0]),c=Et(s[0])):St(s[1])?u=2:null!=Et(s[1])?(u=1,a=At(s[1]),f=Et(s[1])):u=2,u){case 0:if(c instanceof zi){e=r,n=Ot([qi(c),Wi(Vi(c),void 0,Zi(c),0)],l),t=i;continue e}e=r,n=Ot([void 0,Bi(Vi(c))],l),t=i;continue e;case 1:if(f instanceof zi){e=r,n=o,t=Ot([qi(f),Wi(Vi(f),void 0,Zi(f),0)],a);continue e}e=r,n=o,t=Ot([void 0,Bi(Vi(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(St(s[0])?St(s[1])?u=2:null!=Et(s[1])?(u=1,a=At(s[1]),f=Et(s[1])):u=2:null!=Et(s[0])?(u=0,l=At(s[0]),c=Et(s[0])):St(s[1])?u=2:null!=Et(s[1])?(u=1,a=At(s[1]),f=Et(s[1])):u=2,u){case 0:if(c instanceof zi){e=r,n=Ot([qi(c),Wi(Vi(c),void 0,Zi(c),0)],l),t=i;continue e}e=r,n=Ot([void 0,Bi(Vi(c))],l),t=i;continue e;case 1:if(f instanceof zi){e=r,n=o,t=Ot([qi(f),Wi(Vi(f),void 0,Zi(f),0)],a);continue e}e=r,n=o,t=Ot([void 0,Bi(Vi(f))],a);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}else{if(!(l instanceof zi)){const o=0|r.Compare(Vi(u),Vi(l));if(0!==o)return 0|o;e=r,n=At(s[0]),t=At(s[1]);continue e}if(null==qi(l)){const o=0|r.Compare(Vi(u),Vi(l));if(0!==o)return 0|o;e=r,n=bt(void 0,At(s[0])),t=bt(Zi(l),At(s[1]));continue e}{const s=[o,i];let u,l,c,a,f;switch(St(s[0])?St(s[1])?u=2:null!=Et(s[1])?(u=1,a=At(s[1]),f=Et(s[1])):u=2:null!=Et(s[0])?(u=0,l=At(s[0]),c=Et(s[0])):St(s[1])?u=2:null!=Et(s[1])?(u=1,a=At(s[1]),f=Et(s[1])):u=2,u){case 0:if(c instanceof zi){e=r,n=Ot([qi(c),Wi(Vi(c),void 0,Zi(c),0)],l),t=i;continue e}e=r,n=Ot([void 0,Bi(Vi(c))],l),t=i;continue e;case 1:if(f instanceof zi){e=r,n=o,t=Ot([qi(f),Wi(Vi(f),void 0,Zi(f),0)],a);continue e}e=r,n=o,t=Ot([void 0,Bi(Vi(f))],a);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}}}else{Et(s[1]);const u=[o,i];let l,c,a,f,d;switch(St(u[0])?St(u[1])?l=2:null!=Et(u[1])?(l=1,f=At(u[1]),d=Et(u[1])):l=2:null!=Et(u[0])?(l=0,c=At(u[0]),a=Et(u[0])):St(u[1])?l=2:null!=Et(u[1])?(l=1,f=At(u[1]),d=Et(u[1])):l=2,l){case 0:if(a instanceof zi){e=r,n=Ot([qi(a),Wi(Vi(a),void 0,Zi(a),0)],c),t=i;continue e}e=r,n=Ot([void 0,Bi(Vi(a))],c),t=i;continue e;case 1:if(d instanceof zi){e=r,n=o,t=Ot([qi(d),Wi(Vi(d),void 0,Zi(d),0)],f);continue e}e=r,n=o,t=Ot([void 0,Bi(Vi(d))],f);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}else{if(null==Et(s[0])){e=r,n=At(s[0]),t=At(s[1]);continue e}{Et(s[0]);const u=[o,i];let l,c,a,f,d;switch(St(u[0])?St(u[1])?l=2:null!=Et(u[1])?(l=1,f=At(u[1]),d=Et(u[1])):l=2:null!=Et(u[0])?(l=0,c=At(u[0]),a=Et(u[0])):St(u[1])?l=2:null!=Et(u[1])?(l=1,f=At(u[1]),d=Et(u[1])):l=2,l){case 0:if(a instanceof zi){e=r,n=Ot([qi(a),Wi(Vi(a),void 0,Zi(a),0)],c),t=i;continue e}e=r,n=Ot([void 0,Bi(Vi(a))],c),t=i;continue e;case 1:if(d instanceof zi){e=r,n=o,t=Ot([qi(d),Wi(Vi(d),void 0,Zi(d),0)],f);continue e}e=r,n=o,t=Ot([void 0,Bi(Vi(d))],f);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}}break}}(e,xt(n),xt(t))}function cs(e,n,t){let r=t;ts((e=>{n[r]=e,r=r+1|0}),e)}function as(e,n){if(Be(n))return function(e,n){return Pn(((n,t)=>es(e,t,n)),void 0,n)}(e,n);if(n instanceof mt)return function(e,n){return Tt(((n,t)=>es(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=es(r,i["System.Collections.Generic.IEnumerator`1.get_Current"](),o),t=i}}(e,void 0,t)}finally{We(t)}}}class fs{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 fs&&0===ls(ds(this),hs(this),hs(e))}toString(){return"set ["+at("; ",er((e=>Cn(e)),this))+"]"}get[Symbol.toStringTag](){return"FSharpSet"}toJSON(e){return Array.from(this)}CompareTo(e){return 0|ls(ds(this),hs(this),hs(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 ns(ds(this),e,hs(this))}"System.Collections.Generic.ICollection`1.CopyToZ2E171D71"(e,n){cs(hs(this),e,n)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return 0|ms(this)}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return 0|ms(this)}GetEnumerator(){return us(hs(this))}[Symbol.iterator](){return Ye(this.GetEnumerator())}"System.Collections.IEnumerable.GetEnumerator"(){return us(hs(this))}get size(){return 0|ms(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 ns(ds(e),n,hs(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 ds(e){return e.comparer}function hs(e){return e.tree}function ms(e){return Xi(hs(e))}function ps(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 _s(e,n,t){const r=n(e,t);if(1===r.tag){const e=r.fields[0];return new Kr(1,function(e,n){const t=2===n.tag?ps(n.fields[0],n.fields[1],!0):1===n.tag?ps(n.fields[0],n.fields[1],!1)+"\nReason: "+n.fields[2]:3===n.tag?ps(n.fields[0],n.fields[1],!0):4===n.tag?ps(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"+at("\n\n",n.fields[0]):6===n.tag?"The following `failure` occurred with the decoder: "+n.fields[0]:ps(n.fields[0],n.fields[1],!1);return 7===n.tag?t:"Error at: `"+e+"`\n"+t}(e[0],e[1]))}return new Kr(0,r.fields[0])}function gs(e,n){try{return _s("$",e,JSON.parse(n))}catch(e){if(e instanceof SyntaxError)return new Kr(1,"Given an invalid JSON: "+e.message);throw e}}const ws=e=>n=>{let t,r,o;const i="a sbyte",s=e,u=n;return"number"==typeof u?(t=u,isFinite(t)&&Math.floor(t)===t?-128<=t&&t<=127?new Kr(0,(t+128&255)-128):(f=[s,new eo(1,i,t,"Value was either too large or too small for a sbyte")],new Kr(1,f)):(a=[s,new eo(1,i,t,"Value is not an integral value")],new Kr(1,a))):"string"==typeof u?(o=0,r=[ho(u,511,!1,8,new Sn((()=>o),(e=>{o=0|e}))),o],r[0]?new Kr(0,r[1]):(c=[s,new eo(0,i,u)],new Kr(1,c))):(l=[s,new eo(0,i,u)],new Kr(1,l));var l,c,a,f},ys=e=>n=>{let t,r,o;const i="a byte",s=e,u=n;return"number"==typeof u?(t=u,isFinite(t)&&Math.floor(t)===t?0<=t&&t<=255?new Kr(0,255&t):(f=[s,new eo(1,i,t,"Value was either too large or too small for a byte")],new Kr(1,f)):(a=[s,new eo(1,i,t,"Value is not an integral value")],new Kr(1,a))):"string"==typeof u?(o=0,r=[ho(u,511,!0,8,new Sn((()=>o),(e=>{o=e}))),o],r[0]?new Kr(0,r[1]):(c=[s,new eo(0,i,u)],new Kr(1,c))):(l=[s,new eo(0,i,u)],new Kr(1,l));var l,c,a,f},vs=e=>n=>{let t,r,o;const i="an int16",s=e,u=n;return"number"==typeof u?(t=u,isFinite(t)&&Math.floor(t)===t?-32768<=t&&t<=32767?new Kr(0,(t+32768&65535)-32768):(f=[s,new eo(1,i,t,"Value was either too large or too small for "+i)],new Kr(1,f)):(a=[s,new eo(1,i,t,"Value is not an integral value")],new Kr(1,a))):"string"==typeof u?(o=0,r=[ho(u,511,!1,16,new Sn((()=>o),(e=>{o=0|e}))),o],r[0]?new Kr(0,r[1]):(c=[s,new eo(0,i,u)],new Kr(1,c))):(l=[s,new eo(0,i,u)],new Kr(1,l));var l,c,a,f},Cs=e=>n=>{let t,r,o;const i="an uint16",s=e,u=n;return"number"==typeof u?(t=u,isFinite(t)&&Math.floor(t)===t?0<=t&&t<=65535?new Kr(0,65535&t):(f=[s,new eo(1,i,t,"Value was either too large or too small for "+i)],new Kr(1,f)):(a=[s,new eo(1,i,t,"Value is not an integral value")],new Kr(1,a))):"string"==typeof u?(o=0,r=[ho(u,511,!0,16,new Sn((()=>o),(e=>{o=e}))),o],r[0]?new Kr(0,r[1]):(c=[s,new eo(0,i,u)],new Kr(1,c))):(l=[s,new eo(0,i,u)],new Kr(1,l));var l,c,a,f},bs=e=>n=>{let t,r,o;const i="an int",s=e,u=n;return"number"==typeof u?(t=u,isFinite(t)&&Math.floor(t)===t?-2147483648<=t&&t<=2147483647?new Kr(0,~~t):(f=[s,new eo(1,i,t,"Value was either too large or too small for an int")],new Kr(1,f)):(a=[s,new eo(1,i,t,"Value is not an integral value")],new Kr(1,a))):"string"==typeof u?(o=0,r=[ho(u,511,!1,32,new Sn((()=>o),(e=>{o=0|e}))),o],r[0]?new Kr(0,r[1]):(c=[s,new eo(0,i,u)],new Kr(1,c))):(l=[s,new eo(0,i,u)],new Kr(1,l));var l,c,a,f},xs=e=>n=>{let t,r,o;const i="an uint32",s=e,u=n;return"number"==typeof u?(t=u,isFinite(t)&&Math.floor(t)===t?0<=t&&t<=4294967295?new Kr(0,t>>>0):(f=[s,new eo(1,i,t,"Value was either too large or too small for "+i)],new Kr(1,f)):(a=[s,new eo(1,i,t,"Value is not an integral value")],new Kr(1,a))):"string"==typeof u?(o=0,r=[ho(u,511,!0,32,new Sn((()=>o),(e=>{o=e}))),o],r[0]?new Kr(0,r[1]):(c=[s,new eo(0,i,u)],new Kr(1,c))):(l=[s,new eo(0,i,u)],new Kr(1,l));var l,c,a,f};function Ss(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 Kr(1,[i,new eo(5,"a longer array. Need index `"+en(e)+"` but there are only `"+(o=t.length,en(o)+"` entries"),r)])}return new Kr(1,[i,new eo(0,"an array",r)])}function Es(e,n,t){if(Array.isArray(t)){let r=-1;return Qr(It,Pn(((t,o)=>{if(r=r+1|0,0===t.tag){const i=e(n+".["+en(r)+"]",o);return 0===i.tag?new Kr(0,bt(i.fields[0],t.fields[0])):new Kr(1,i.fields[0])}return t}),new Kr(0,Ct()),t))}return new Kr(1,[n,new eo(0,"a list",t)])}function As(e,n,t){if(Array.isArray(t)){let r=-1;const o=t;return Pn(((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 Kr(0,i)):new Kr(1,s.fields[0])}return t}),new Kr(0,Fn(new Array(o.length),0,o.length,null)),o)}return new Kr(1,[n,new eo(0,"an array",t)])}function ks(e,n,t,r){const o=n(t,r);return 0===o.tag?e(o.fields[0],t,r):new Kr(1,o.fields[0])}function Ts(e,n){let t;const r=e;return t=e=>n=>Ss(0,r,e,n),e=>r=>ks(wn(3,(e=>{let t;const r=n;return t=e=>n=>Ss(1,r,e,n),n=>r=>ks(((n,t,r)=>new Kr(0,[e,n])),wn(2,t),n,r)})),wn(2,t),e,r)}function Is(e){return Fi(e)}function Ns(e){return function(e,n){return new fs(e,n)}(n={Compare:mn},as(n,e));var n}function Os(e,n,t,r){let o,i;return n.length!==r.length?new Kr(1,[t,new eo(6,(o=0|r.length,i=0|n.length,st(ot("Expected %i %s but got %i"))(i)(e)(o)))]):Gn(((e,n,r)=>0===r.tag?Qr((e=>bt(e,r.fields[0])),n(t)(e)):r),r,n,new Kr(0,Ct()))}function Ms(e,n,t,r,o,i){const s=function(e,n){return n.find((e=>Fr(e)===r))}(0,Vr(t));if(null!=s){const t=s;return 0===i.length?new Kr(0,Xr(t,[])):Qr((e=>Xr(t,kt(e))),Os("union fields",Un((t=>Fs(e,n,!1,t[1])),Yr(t)),o,i))}return new Kr(1,[o,new eo(6,"Cannot find case "+r+" in "+Ur(t))])}function Ds(e,n,t,r){const o=new Sn(null),i=Gi(Ur(r),o,e);let s;if(Zr(r)){const e=Un((e=>[io(n,Fr(e)),Fs(i,n,!1,e[1])]),zr(r));s=n=>t=>Qr((e=>function(e,n){const t=zr(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,kt(e))),function(e,n,t){return null===t||Object.getPrototypeOf(t||!1)!==Object.prototype?new Kr(1,[n,new eo(0,"an object",t)]):function(e,n,t){return n.reduceRight(((n,t)=>e(t,n)),t)}(wn(2,(e=>{const r=e[0];return o=>0===o.tag?Qr((e=>bt(e,o.fields[0])),e[1](n+"."+r)(t[r])):o})),e,new Kr(0,Ct()))}(e,n,t))}else if(qr(r))s=e=>t=>{if("string"==typeof t)return Ms(i,n,r,t,e,[]);if(Array.isArray(t)){const o=t;return Ms(i,n,r,o[0],e,o.slice(1,o.length))}return new Kr(1,[e,new eo(0,"a string or array",t)])};else{if(!t){let e;const n=Ur(r);throw e=st(ot("Cannot generate auto decoder for %s. Please pass an extra decoder."))(n),new Error(e)}s=e=>n=>new Kr(1,[e,new eo(2,"an extra coder for "+Ur(r),n)])}return o.contents=s,s}function Fs(e,n,t,r){let o,i,s;const u=Ur(r),l=ji(u,e);if(null==l){if(Pr(r)){const t=Fs(e,n,!1,Rr(r));return e=>n=>As(wn(2,t),e,n)}if(jr(r)){const e=Ur(Lr(r));if("System.SByte"===e)return e=>n=>{const t=r,o=e,i=n,s=ws(o)(i);if(1===s.tag)return new Kr(1,s.fields[0]);{const e=s.fields[0];return Xt(e,$r(t),{Equals:(e,n)=>e===n,GetHashCode:rn})?new Kr(0,Br(t,e.toString())):new Kr(1,[o,new eo(1,Ur(t),i,"Unkown value provided for the enum")])}};if("System.Byte"===e)return e=>n=>{const t=r,o=e,i=n,s=ys(o)(i);if(1===s.tag)return new Kr(1,s.fields[0]);{const e=s.fields[0];return Xt(e,$r(t),{Equals:(e,n)=>e===n,GetHashCode:rn})?new Kr(0,Br(t,e.toString())):new Kr(1,[o,new eo(1,Ur(t),i,"Unkown value provided for the enum")])}};if("System.Int16"===e)return e=>n=>{const t=r,o=e,i=n,s=vs(o)(i);if(1===s.tag)return new Kr(1,s.fields[0]);{const e=s.fields[0];return Xt(e,$r(t),{Equals:(e,n)=>e===n,GetHashCode:rn})?new Kr(0,Br(t,e.toString(u))):new Kr(1,[o,new eo(1,Ur(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 Kr(1,s.fields[0]);{const e=s.fields[0];return Xt(e,$r(t),{Equals:(e,n)=>e===n,GetHashCode:rn})?new Kr(0,Br(t,e.toString())):new Kr(1,[o,new eo(1,Ur(t),i,"Unkown value provided for the enum")])}};if("System.Int32"===e)return e=>n=>{const t=r,o=e,i=n,s=bs(o)(i);if(1===s.tag)return new Kr(1,s.fields[0]);{const e=s.fields[0];return Xt(e,$r(t),{Equals:(e,n)=>e===n,GetHashCode:rn})?new Kr(0,Br(t,en(e))):new Kr(1,[o,new eo(1,Ur(t),i,"Unkown value provided for the enum")])}};if("System.UInt32"===e)return e=>n=>{const t=r,o=e,i=n,s=xs(o)(i);if(1===s.tag)return new Kr(1,s.fields[0]);{const e=s.fields[0];return Xt(e,$r(t),{Equals:(e,n)=>e===n,GetHashCode:rn})?new Kr(0,Br(t,e.toString())):new Kr(1,[o,new eo(1,Ur(t),i,"Unkown value provided for the enum")])}};{const e=Ur(r),n=ut(ot("Cannot generate auto decoder for %s.\nThoth.Json.Net only support the folluwing 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(Gr(r)){if(Jr(r)){const t=Un((t=>Fs(e,n,!1,t)),Wr(r));return e=>n=>Array.isArray(n)?Qr((e=>kt(e)),Os("tuple elements",t,e,n)):new Kr(1,[e,new eo(0,"an array",n)])}{const u=Ur(Hr(r));if("Microsoft.FSharp.Core.FSharpOption`1[System.Object]"===u)return o=Fs(e,n,!0,Er(r)[0]),e=>n=>{return t=wn(2,o),r=e,null==(i=n)?new Kr(0,void 0):Qr(An,t(r,i));var t,r,i};if("Microsoft.FSharp.Collections.FSharpList`1[System.Object]"===u)return i=Fs(e,n,!1,Er(r)[0]),e=>n=>Es(wn(2,i),e,n);if("Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]"===u){const t=Fs(e,n,!1,Er(r)[0]),o=Fs(e,n,!1,Er(r)[1]);let i;const u=Mt([e=>n=>function(e,n,t,r){return null===r||Object.getPrototypeOf(r||!1)!==Object.prototype?new Kr(1,[t,new eo(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 Kr(0,bt([s.fields[0],e.fields[0]],o.fields[0])):new Kr(1,e.fields[0])}return new Kr(1,s.fields[0])}return o}),new Kr(0,Ct()),Object.keys(r))}(wn(2,t),wn(2,o),e,n),(s=Ts(wn(2,t),wn(2,o)),e=>n=>Es(wn(2,s),e,n))]);return i=e=>n=>{return t=e,r=n,((e,n)=>{e:for(;;){const o=e,i=n;if(St(o))return new Kr(1,[t,new eo(7,i)]);{const s=_s(t,wn(2,Et(o)),r);if(1===s.tag){e=At(o),n=Dt(i,xt(s.fields[0]));continue e}return new Kr(0,s.fields[0])}}})(u,Ct());var t,r},e=>n=>function(e,n,t,r){const o=n(t,r);return 1===o.tag?new Kr(1,o.fields[0]):new Kr(0,e(o.fields[0]))}(Is,wn(2,i),e,n)}if("Microsoft.FSharp.Collections.FSharpSet`1[System.Object]"===u){const t=Fs(e,n,!1,Er(r)[0]);return e=>n=>{const r=As(wn(2,t),e,n);return 0===r.tag?new Kr(0,Ns(r.fields[0])):new Kr(1,r.fields[0])}}return Ds(e,n,t,r)}}return"System.Boolean"===u?e=>n=>{return t=e,"boolean"==typeof(r=n)?new Kr(0,r):new Kr(1,[t,new eo(0,"a boolean",r)]);var t,r}:"Microsoft.FSharp.Core.Unit"===u?e=>n=>{return t=e,null==(r=n)?new Kr(0,void 0):new Kr(1,[t,new eo(0,"null",r)]);var t,r}:"System.String"===u?e=>n=>{return t=e,"string"==typeof(r=n)?new Kr(0,r):new Kr(1,[t,new eo(0,"a string",r)]);var t,r}:"System.SByte"===u?ws:"System.Byte"===u?ys:"System.Int16"===u?vs:"System.UInt16"===u?Cs:"System.Int32"===u?bs:"System.UInt32"===u?xs:"System.Double"===u?e=>n=>{return t=e,"number"==typeof(r=n)?new Kr(0,r):new Kr(1,[t,new eo(0,"a float",r)]);var t,r}:"System.Single"===u?e=>n=>{return t=e,"number"==typeof(r=n)?new Kr(0,r):new Kr(1,[t,new eo(0,"a float32",r)]);var t,r}:"System.DateTime"===u?e=>n=>function(e,n){if("string"==typeof n){let r,o=Bn(-621355968e5,0);return r=[zn(n,new Sn((()=>o),(e=>{o=e}))),o],r[0]?new Kr(0,1===(t=r[1]).kind?t:Bn(t.getTime(),1)):new Kr(1,[e,new eo(0,"a datetime",n)])}var t;return new Kr(1,[e,new eo(0,"a datetime",n)])}(e,n):"System.DateTimeOffset"===u?e=>n=>function(e,n){if("string"==typeof n){let t,r=mo(-621355968e5,0);return t=[po(n,new Sn((()=>r),(e=>{r=e}))),r],t[0]?new Kr(0,t[1]):new Kr(1,[e,new eo(0,"a datetimeoffset",n)])}return new Kr(1,[e,new eo(0,"a datetime",n)])}(e,n):"System.TimeSpan"===u?e=>n=>function(e,n){if("string"==typeof n){let t,r=0;return t=[si(n,new Sn((()=>r),(e=>{r=e}))),r],t[0]?new Kr(0,t[1]):new Kr(1,[e,new eo(0,"a timespan",n)])}return new Kr(1,[e,new eo(0,"a timespan",n)])}(e,n):"System.Guid"===u?e=>n=>function(e,n){if("string"==typeof n){let t,r="00000000-0000-0000-0000-000000000000";return t=[co(n,new Sn((()=>r),(e=>{r=e}))),r],t[0]?new Kr(0,t[1]):new Kr(1,[e,new eo(0,"a guid",n)])}return new Kr(1,[e,new eo(0,"a guid",n)])}(e,n):"System.Object"===u?e=>e=>new Kr(0,e):Ds(e,n,t,r)}{const e=l;return n=>t=>e.contents(n)(t)}}function Us(e,n,t){const r=Nn(n,new no(0));return Fs(function(e){return null!=e?Hi(((e,n)=>new Sn(n[1])),e.Coders):Li()}(t),r,!1,e)}function Ps(e,n,t){Nt((t=>{try{t(n)}catch(n){e(n)}}),t)}function Rs(){return Ct()}function Gs(e){return xt(e)}class js extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["AccessRole"]}}function Hs(e){return new js(0,e)}function Ls(e){return Ut(new js(0,"SuperSelection.Access"),e,{Equals:an,GetHashCode:un})?An(void 0):void 0}function $s(e){return Ut(new js(0,"SuperSelection.EditPanel"),e,{Equals:an,GetHashCode:un})?An(void 0):void 0}class Bs extends xn{constructor(e,n){super(),this.UserName=e,this.Roles=n}}function Vs(e){let n;const t=dt(null==e?"":e,["."],null,0);if(Rn(((e,n)=>e===n),t,null)||3!==t.length)n=new Kr(1,"Failed to identify the user");else{let e;const o=t[1];e=atob(o),n=gs(wn(2,Us(Ir(["Name",Dr],["Roles",(r=Dr,new Sr("[]",[r]))]),new no(1),void 0)),e)}var r;if(1===n.tag)return new Bs(void 0,Ct());{const e=n.fields[0];return new Bs(e.Name,Ft(Hs,Mt(e.Roles)))}}class zs extends xn{constructor(e,n){super(),this.PromotedFunds=e,this.Configuration=n}}class Ws extends xn{constructor(e){super(),this.PromotedFunds=e}}class qs extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Account","Partner"]}}class Zs extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["DefaultUsi","PromotedFunds"]}}class Js extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["ResetModal","EditModal","Hidden"]}}class Ys 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 Xs extends xn{constructor(e,n,t){super(),this.Data=e,this.User=n,this.ModalState=t}}class Ks extends xn{constructor(e,n,t){super(),this.UpdatePromotedFunds=e,this.DeletePromotedFunds=n,this.ReloadData=t}}new class{constructor(){}};function Qs(e,n){const t=function(e,n){return new Kr(0,n)}(0,n);return wr.Return(t)}function eu(e,n){return wr.Delay(n)}new class{constructor(){}};class nu extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"]}}class tu extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Header"]}}class ru extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Empty","Text","Binary","Form"]}}class ou 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 iu extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Text","Blob","ArrayBuffer","Unknown"]}}class su extends xn{constructor(e,n,t,r,o){super(),this.statusCode=0|e,this.responseText=n,this.responseType=t,this.responseHeaders=r,this.content=o}}const uu=new ou("",new nu(0),Ct(),!1,void 0,void 0,void 0,new ru(0));function lu(e,n){return"string"!=typeof(t=n)||0===t.length?[n]:dt(n,[e],null,0);var t}function cu(e){return new ou(e,uu.method,uu.headers,uu.withCredentials,uu.overridenMimeType,uu.overridenResponseType,uu.timeout,uu.content)}function au(e,n){return new ou(n.url,e,n.headers,n.withCredentials,n.overridenMimeType,n.overridenResponseType,n.timeout,n.content)}function fu(e){return function(e){return gr((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;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 iu(0,t.responseText):new iu("arraybuffer"===u?2:"blob"===u?1:3,t.response),new su(o,e,i,function(e){const n=Mn();return Di(n,Ai(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=kn(o);r.push(e)}}return r}((e=>{const n=Mt(lu(":",e));return St(n)?void 0:[Et(n).toLocaleLowerCase(),at(":",At(n)).trim()]}),lu("\r\n",t.getAllResponseHeaders()))),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.method,e.content];0===u[0].tag?t.send(An(void 0)):1===u[1].tag||3===u[1].tag||2===u[1].tag?t.send(An(u[1].fields[0])):t.send(An(void 0))}))}new su(0,"","",Li(),new iu(0,""));class du extends xn{constructor(e,n,t){super(),this.PartnerId=e,this.AccountId=n,this.Funds=t}}class hu extends xn{constructor(e,n){super(),this.PartnerFunds=e,this.AccountFunds=n}}class mu extends xn{constructor(e){super(),this.DefaultFundUSI=e}}function pu(e){return e}function _u(e){return Array.from(e)}function gu(e){return $n(e,"O")}function wu(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 ri(e/864e5)}(e)),o=Math.abs(function(e){return ri(e%864e5/36e5)}(e)),i=Math.abs(function(e){return ri(e%36e5/6e4)}(e)),s=Math.abs(function(e){return ri(e%6e4/1e3)}(e)),u=Math.abs(function(e){return ri(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 yu(){return null}function vu(e){return $n(e,"O")}function Cu(e,n,t,r){const o=new Sn(null),i=Gi(Ur(r),o,e);let s;if(Zr(r)){const e=Un((e=>{const r=io(n,Fr(e)),o=bu(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}}),zr(r));s=n=>Kt(((e,t)=>t(n)(e)),{},e)}else{if(!qr(r)){let e;const n=Ur(r);throw e=st(ot("Cannot generate auto encoder for %s. Please pass an extra encoder."))(n),new Error(e)}s=e=>{const o=function(e,n){const t=Vr(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 Fr(s);{const e=0|l,r=Yr(s),o=Fn(new Array(e+1),0,e+1,null);o[0]=Fr(s);for(let s=1;s<=e;s++){const e=bu(i,n,t,r[s-1][1]);o[s]=e(u[s-1])}return o}}}return o.contents=s,s}function bu(e,n,t,r){const o=Ur(r),i=ji(o,e);if(null==i){if(Pr(r)){const o=bu(e,n,t,Rr(r));return e=>_u(er(o,e))}if(jr(r)){const e=Ur(Lr(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=Ur(r);return ut(ot("Cannot generate auto encoder for %s.\nThoth.Json.Net only support the folluwing 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 encoder.\n "))(e)}}if(Gr(r)){if(Jr(r)){const o=Un((r=>bu(e,n,t,r)),Wr(r));return e=>_u(nr(((e,n)=>o[e](n)),e))}{const o=Ur(Hr(r));if("Microsoft.FSharp.Core.FSharpOption`1[System.Object]"===o){const o=new Xe((()=>{return o=bu(e,n,t,Er(r)[0]),e=>{return null!=(n=On(o,e))?kn(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){const o=bu(e,n,t,Er(r)[0]);return e=>_u(er(o,e))}if("Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]"===o){const o=Er(r)[0],i=bu(e,n,t,Er(r)[1]);if("System.String"===Ur(o)||"System.Guid"===Ur(o))return e=>Kt(((e,n)=>{const t=n;return e[t[0]]=i(t[1]),e}),{},e);{let r;const s=bu(e,n,t,o);return r=s,e=>_u(er((e=>{const n=e;return[r(n[0]),i(n[1])]}),e))}}return Cu(e,n,t,r)}}return"System.Boolean"===o?e=>e:"Microsoft.FSharp.Core.Unit"===o?yu:"System.String"===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?vu:"System.DateTimeOffset"===o?gu:"System.TimeSpan"===o?wu:"System.Guid"===o?pu:"System.Object"===o?e=>e:Cu(e,n,t,r)}{const e=i;return n=>e.contents(n)}}function xu(e){return`${e}/super-selection/admin`}function Su(e,n){return eu(0,(()=>{const t=(r=function(e){return new tu(0,"Authorization",e)}(st(ot("Bearer %s"))(e)),new ou((o=n).url,o.method,Dt(o.headers,xt(r)),o.withCredentials,o.overridenMimeType,o.overridenResponseType,o.timeout,o.content));var r,o;const i=(e=>{return n=e,wr.Bind(n,(e=>(e=>{return n=e,wr.Return(n);var n})(new Kr(0,e))));var n})(fu(t));return wr.Delay((()=>wr.Bind(i,(e=>{let n;const r=e;return 1===r.tag?wr.Return(new Kr(1,r.fields[0])):wr.ReturnFrom((n=r.fields[0],429===n.statusCode||n.statusCode>=500?(o=fu(t),wr.Bind(o,(e=>{return n=new Kr(0,e),t=n,wr.Return(t);var n,t}))):Qs(0,n)));var o}))))}))}function Eu(e,n,t,r){return eu(0,(()=>{let o;const i=Su(n,au(new nu(0),cu((o=xu(e),`${o}/promoted-funds/${t}/${Tn(r)}`))));return wr.Delay((()=>wr.Bind(i,(e=>{let n;const t=e;return 1===t.tag?wr.Return(new Kr(1,t.fields[0])):wr.ReturnFrom((n=t.fields[0],200===n.statusCode?(o=gs(wn(2,Us(Tr("SuperSelection.AdminUI.Dto.PromotedFunds",[],hu,(()=>[["PartnerFunds",Or(Dr)],["AccountFunds",Or(Dr)]])),new no(1),void 0)),n.responseText),wr.Return(o)):(r=new Kr(1,"Unexpected response from backend"),wr.Return(r))));var r,o}))))}))}function Au(e,n,t,r,o){return eu(0,(()=>{let i;i=`${xu(e)}/promoted-funds/${t}/${Tn(r)}`;const s=Su(n,au(new nu(1),(u=new ru(1,function(e,n){return JSON.stringify(n,wn(2,null),An(e))}(0,function(e,n,t,r){const o=Nn(n,new no(0)),i=Nn(void 0,!0);return bu(function(e){return null!=e?Hi(((e,n)=>new Sn(n[0])),e.Coders):Li()}(void 0),o,i,e)}(Ir(["Funds",Or(Dr)]),new no(1))(o))),l=cu(i),new ou(l.url,l.method,l.headers,l.withCredentials,l.overridenMimeType,l.overridenResponseType,l.timeout,u))));var u,l;return wr.Delay((()=>wr.Bind(s,(e=>{let n;const t=e;return 1===t.tag?wr.Return(new Kr(1,t.fields[0])):wr.ReturnFrom((n=t.fields[0],200===n.statusCode?(o=new Kr(0,void 0),wr.Return(o)):(r=new Kr(1,n.responseText),wr.Return(r))));var r,o}))))}))}class ku extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["ColumnHeader"]}}function Tu(e){return e.fields[0]}class Iu extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["RowCell"]}}function Nu(e){return new Iu(0,e)}function Ou(e){return e.fields[0]}function Mu(e){return n=d("th",_n(Mt([["className","px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"],["scope","col"],["children",e]]))),new ku(0,n);var n}function Du(e,n){let t;return Nu(d("td",_n(Mt([["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",rr.Children.toArray(Array.from(t))])]))))}function Fu(e,n){return Nu(d("td",{className:at(" ",Yt(e,["px-6","py-4","whitespace-nowrap","text-sm"])),children:n}))}function Uu(e,n){let t,r,o,i,s,u,l;return d("div",_n(Mt([["className","flex flex-col mt-4"],(t=[d("div",_n(Mt([["className","-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"],(r=[d("div",_n(Mt([["className","py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8"],(o=[d("div",_n(Mt([["className","shadow overflow-hidden border-b border-gray-200 sm:rounded-lg"],(i=[d("table",_n(Mt([["className","min-w-full divide-y divide-gray-200"],(s=[d("thead",{className:"bg-gray-50",children:(u=er(Tu,e),d("tr",{children:rr.Children.toArray(Array.from(u))}))}),(l=nr(((e,n)=>(n=>{let t;return d("tr",_n(Mt([["className",e%2==0?"bg-white":"bg-gray-50"],(t=er(Ou,n),["children",rr.Children.toArray(Array.from(t))])])))})(n)),n),d("tbody",{children:rr.Children.toArray(Array.from(l))}))],["children",rr.Children.toArray(Array.from(s))])])))],["children",rr.Children.toArray(Array.from(i))])])))],["children",rr.Children.toArray(Array.from(o))])])))],["children",rr.Children.toArray(Array.from(r))])])))],["children",rr.Children.toArray(Array.from(t))])])))}const Pu=(()=>{try{if("undefined"!=typeof window&&"function"==typeof window.addEventListener){const e={passive:!0};window.addEventListener("testPassiveEventSupport",(e=>{}),e),window.removeEventListener("testPassiveEventSupport",(e=>{}))}}catch(e){}return!1})();function Ru(e){return On((e=>e.passive&&!Pu?{capture:e.capture,once:e.once,passive:!1}:e),e)}function Gu(e){return null!=(n=e)?(e=>e.capture?{capture:!0}:void 0)(kn(n)):void 0;var n}function ju(e,n){return 0===n.indexOf(e)?n:void 0}function Hu(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 Lu(e,n){return function(e){return 1===e?e=>{let n,t,r,o,i,s;return n=ju("/",e),null!=n?(t=n,"#"+t):(r=ju("#/",e),null!=r?(o=r,o):(i=ju("#",e),null!=i?(s=i,"#/"+ht(s,1,s.length-1)):"#/"+e))}:e=>{let n,t;return n=ju("/",e),null!=n?(t=n,t):"/"+e}}(n)(at("/",Ft((e=>e.indexOf("?")>=0||0===e.indexOf("#")||0===e.indexOf("/")?e:encodeURIComponent(e)),e)))}function $u(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 Lt((()=>{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}))}ir((e=>{const n=hr((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=_t();let i=o,s=n;for(;!wt(s);){let n=e(yt(s));for(;!wt(n);)t=i,r=new mt(yt(n),void 0),t.tail=r,i=r,n=vt(n);s=vt(s)}const u=i,l=_t();return u.tail=l,vt(o)}((e=>{if("string"!=typeof(n=e)||/^\s*$/.test(n))return Ct();{const n=function(e,...n){return 0===n.length?e.trimEnd():e.replace(new RegExp("["+Qn(n.join(""))+"]+$"),"")}(e,"#");if("?"===n)return Ct();if(null!=ju("?",n))return xt(n);{const e=n.split("?");if(Rn(((e,n)=>e===n),e,null)||1!==e.length){if(Rn(((e,n)=>e===n),e,null)||2!==e.length)return Ct();if(""===e[1]){const n=e[0];return xt(decodeURIComponent(n))}{const n=e[0],t=e[1];return Mt([decodeURIComponent(n),"?"+t])}}{const n=e[0];return xt(decodeURIComponent(n))}}}var n}),Mt(dt(null!=ju("#",r)?ht(r,1,r.length-1):1!==o||null==Hu("#",r)&&null==Hu("#/",r)?r:"",["/"],null,0)))))}(Nn(e.hashMode,1),t)}));if(window.navigator.userAgent.indexOf("Trident")>=0||window.navigator.userAgent.indexOf("MSIE")>=0){const e="hashchange",t=n,r=void 0,o=dr((()=>Ru(r)),[r]),i=dr((()=>Gu(r)),[r]),s=dr((()=>t),[t]);lr(hr((()=>{if(null==o)window.addEventListener(e,s);else{const n=o;window.addEventListener(e,s,n)}return sr((()=>{if(null==i)window.removeEventListener(e,s);else{const n=i;window.removeEventListener(e,s,n)}}))})))}else{const e="popstate",t=n,r=void 0,o=dr((()=>Ru(r)),[r]),i=dr((()=>Gu(r)),[r]),s=dr((()=>t),[t]);lr(hr((()=>{if(null==o)window.addEventListener(e,s);else{const n=o;window.addEventListener(e,s,n)}return sr((()=>{if(null==i)window.removeEventListener(e,s);else{const n=i;window.removeEventListener(e,s,n)}}))})))}const t="CUSTOM_NAVIGATION_EVENT",r=n,o=void 0,i=dr((()=>Ru(o)),[o]),s=dr((()=>Gu(o)),[o]),u=dr((()=>r),[r]);lr(hr((()=>{if(null==i)window.addEventListener(t,u);else{const e=i;window.addEventListener(t,u,e)}return sr((()=>{if(null==s)window.removeEventListener(t,u);else{const e=s;window.removeEventListener(t,u,e)}}))})));const l=e.application;return null==l?null:l}),void 0,void 0,void 0);class Bu extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Writable","ReadWritable"]}}class Vu{constructor(e){this.state=new Bu(0,Fn(new Array(pn(dn,e,10)),0,pn(dn,e,10),null),0)}}function zu(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 Bu(0,o,t):new Bu(1,o,t,i),An(o[r])}}class Wu 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 qu(e,n){const t=n.init(e),r=t[0],o=new Vu(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 Bu(1,(r=s,o=u,Array.from(zt((()=>Yt(tr(r,o),zt((()=>{return Yt((e=r,n=o,Jt((()=>Vt(n)),((n,t)=>{if(n<e){if(t["System.Collections.IEnumerator.MoveNext"]())return An(t["System.Collections.Generic.IEnumerator`1.get_Current"]());throw new Error(Pt+"\\nParameter name: source")}}),We)),zt((()=>{return n=e=>qt(null),e=o.length,t=$u(0,1,e,0,((e,n)=>e+n)),zt((()=>Wt(er(n,t))));var e,n,t})));var e,n}))))))),u.length,0):new Bu(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 Bu(1,o,i,r)}var r,o}(o,e);else{i=!0;let t=An(e);for(;null!=t;){const e=kn(t);try{const t=n.update(e,s),r=t[0];n.setState(r,u),Ps((t=>{n.onError([st(ot("Error in command while handling: %A"))(e),t])}),u,t[1]),s=r}catch(t){n.onError([st(ot("Unable to process the message: %A"))(e),t])}t=zu(o)}i=!1}}]);n.setState(r,u),Ps((e=>{n.onError(["Error intitializing:",e])}),u,function(e){const n=_t();let t=n;const r=e=>{t=Tt(((e,n)=>{const t=new mt(n,void 0);return e.tail=t,t}),t,e)};if(Be(e))e.forEach(r);else if(e instanceof mt)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=_t();return o.tail=i,vt(n)}(Mt([(()=>{try{return n.subscribe(r)}catch(e){return n.onError(["Unable to subscribe:",e]),Rs()}})(),t[1]])))}class Zu{constructor(){this.hasDisposedOnce=!1,this.state=void 0,this.listener=void 0,this.dispatcher=void 0}}function Ju(){return new Zu}function Yu(e,n,t,r){qu(n,function(e,n){return new Wu(n.init,n.update,n.subscribe,n.view,((e,n)=>{!function(e,n,t){e.state=An(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 kn(o);throw new Error("Elmish program has not initialized")}function Xu(e,n){return function(e,n,t){const r=ur(Ju)[0],o=ur((()=>Yu(e,n,r))),i=o[1];return cr((()=>(function(e){return e.hasDisposedOnce}(r)&&i(Yu(e,n,r)),sr((()=>{!function(e){const n=e.state;if(null!=n){const e=kn(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 Ku(e,n,t){return Xu((()=>function(e,n,t){return new Wu(e,n,(e=>Rs()),t,((e,n)=>{t(e,n)}),(e=>{var n,t;n=e[0],t=e[1],console.error(An(n),t)}),wn(2,(e=>e)))}(e,n,((e,n)=>{}))),t)}function Qu(){const e=xt(d("span",{children:["Please wait..."]}));return d("div",{children:rr.Children.toArray(Array.from(e))})}function el(e){const n=xt(d("span",{children:[e.error]}));return d("div",{children:rr.Children.toArray(Array.from(n))})}class nl extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["LoadData"]}}class tl extends xn{constructor(e,n){super(),this.PromotedFundOverrides=e,this.User=n}}function rl(e,n){return[new tl(e.fields[0],n.User),Rs()]}const ol=Mt([Mu("Partner Id"),Mu("Account Id"),Mu("Promoted Funds")]);function il(e,n){return Lu(Mt(["account-registry","partners",e,"accounts",n,"super-configuration"]),1)}function sl(e){return Zt(zt((()=>{let n;return Yt(qt((n=[(t=e.PartnerId,Lu(Mt(["account-registry","partners",t,"super-configuration"]),1)),e.PartnerId],Du(n[0],n[1]))),zt((()=>{let n,t,r;return Yt((n=e.AccountId,null==n?qt(Fu(["text-gray-500"],"-")):(t=n,qt((r=[il(e.PartnerId,t),t],Du(r[0],r[1]))))),zt((()=>qt(Fu(["text-gray-500"],at(", ",e.Funds))))))})));var t})))}function ul(e){let n;const t=Ku((()=>{return n=e.accessToken,[new tl(new br(0),Vs(n)),Rs()];var n}),rl),r=t[0];if(ar(xr((()=>function(e){return n=e.backendUrl,t=e.accessToken,eu(0,(()=>{let e;const r=Su(t,au(new nu(0),cu((e=xu(n),`${e}/promoted-funds`))));return wr.Delay((()=>wr.Bind(r,(e=>{let n,t;const r=e;return 1===r.tag?wr.Return(new Kr(1,r.fields[0])):wr.ReturnFrom((n=r.fields[0],t=0|n.statusCode,200===t?(s=gs(wn(2,Us(Or(Tr("SuperSelection.AdminUI.Dto.PromotedFundOverride",[],du,(()=>[["PartnerId",Dr],["AccountId",Nr(Dr)],["Funds",Or(Dr)]]))),new no(1),void 0)),n.responseText),wr.Return(s)):401===t?(i=new Kr(1,"You do not have the appropriate permissions to view this information"),wr.Return(i)):(o=new Kr(1,"Unexpected response from backend"),wr.Return(o))));var o,i,s}))))}));var n,t}(e)),(e=>{t[1](new nl(0,e))}))),null==Ls(r.User.Roles))return d(el,{error:"You do not have the appropriate permissions to view this information"});{const e=r.PromotedFundOverrides;let t,o,i,s;switch(1===e.tag?t=0:2===e.tag?0===e.fields[0].tag?(t=3,s=e.fields[0].fields[0]):(t=1,o=e.fields[0].fields[0]):3===e.tag?(t=2,i=e.fields[0]):t=0,t){case 0:return d(Qu,null);case 1:return d(el,{error:o});case 2:return d(el,{error:Cn(i)});case 3:return d("div",_n(xt((n=[d("h2",{className:"text-xl text-gray-900",children:"Promoted Fund Overrides"}),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."}),Uu(ol,Ft(sl,s))],["children",rr.Children.toArray(Array.from(n))]))))}}}function ll(e){return["strokeLinecap",e]}function cl(e){return["strokeLinejoin",e]}const al=d("div",_n(Mt([["className",at(" ",["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",_n(Mt([["className",at(" ",["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=xt(d("path",_n(Mt([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",rr.Children.toArray(Array.from(e))])])))];return["children",rr.Children.toArray(Array.from(n))]})()]))),fl=d("div",_n(Mt([["className",at(" ",["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",_n(Mt([["className",at(" ",["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=xt(d("path",_n(Mt([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",rr.Children.toArray(Array.from(e))])])))];return["children",rr.Children.toArray(Array.from(n))]})()])));function dl(e,n,t){let r,o;return d("div",_n(Mt([["className","mt-2 w-full h-full"],(r=[d("div",_n(Mt([["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",rr.Children.toArray(Array.from(o))])])))],["children",rr.Children.toArray(Array.from(r))])])))}function hl(e,n,t,r){let o;return d("div",_n(Mt([["className",at(" ",["bg-gray-50","px-4","py-3","sm:px-6","sm:flex","sm:flex-row-reverse"])],(o=[d("button",{className:at(" ",["w-full","inline-flex","justify-center","rounded-md","border","border-transparent","shadow-sm","px-4","py-2","bg-indigo-600","text-base","font-medium","text-white","hover:bg-indigo-700","focus:outline-none","focus:ring-2","focus:ring-offset-2","focus:ring-indigo-500","sm:ml-3","sm:w-auto","sm:text-sm"]),type:"button",children:e,onClick:n}),d("button",{className:at(" ",["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:t,onClick:r})],["children",rr.Children.toArray(Array.from(o))])])))}function ml(e){let n,t,r,o,i,s,u;const l=(c=e.FieldValue,rr.useState(c));var c,a;return d("div",_n(Mt([["className",at(" ",["relative","z-10"])],["role",at(" ",["dialog"])],(n=[d("div",{className:at(" ",["fixed","inset-0","bg-gray-500","bg-opacity-75","transition-opacity"])}),d("div",_n(Mt([["className",at(" ",["fixed","z-10","inset-0","overflow-y-auto"])],(t=[d("div",_n(Mt([["className",at(" ",["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:at(" ",["hidden","sm:inline-block","sm:align-middle","sm:h-screen"]),children:"​"}),d("div",_n(Mt([["className",at(" ",["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",_n(Mt([["className",at(" ",["bg-white","px-4","pt-5","pb-4","sm:p-6","sm:pb-4"])],(i=[d("div",_n(Mt([["className",at(" ",["sm:flex","sm:items-start"])],(s=[fl,d("div",_n(Mt([["className",at(" ",["mt-3","text-center","sm:mt-0","sm:ml-4","sm:text-left","w-full"])],(u=[(a=e.HeadingText,d("h3",{className:at(" ",["text-lg","leading-6","font-medium","text-gray-900"]),id:"modal-title",children:a})),dl(l[1],e.FieldName,e.FieldValue)],["children",rr.Children.toArray(Array.from(u))])])))],["children",rr.Children.toArray(Array.from(s))])])))],["children",rr.Children.toArray(Array.from(i))])]))),hl(e.ConfirmAction.ActionText,vn(1,e.ConfirmAction.Action,[l[0]]),e.CancelAction.ActionText,e.CancelAction.Action)],["children",rr.Children.toArray(Array.from(o))])])))],["children",rr.Children.toArray(Array.from(r))])])))],["children",rr.Children.toArray(Array.from(t))])])))],["children",rr.Children.toArray(Array.from(n))])])))}function pl(e,n){let t;return d("div",_n(Mt([["className",at(" ",["bg-gray-50","px-4","py-3","sm:px-6","sm:flex","sm:flex-row-reverse"])],(t=[d("button",{className:at(" ",["w-full","inline-flex","justify-center","rounded-md","border","border-transparent","shadow-sm","px-4","py-2","bg-red-600","text-base","font-medium","text-white","hover:bg-red-700","focus:outline-none","focus:ring-2","focus:ring-offset-2","focus:ring-red-500","sm:ml-3","sm:w-auto","sm:text-sm"]),type:"button",children:e.ActionText,onClick:e.Action}),d("button",{className:at(" ",["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:n.ActionText,onClick:n.Action})],["children",rr.Children.toArray(Array.from(t))])])))}function _l(e){let n;return d("div",_n(Mt([["className","mt-2"],(n=[d("p",{className:at(" ",["text-sm","text-gray-500"]),children:e})],["children",rr.Children.toArray(Array.from(n))])])))}function gl(e,n,t,r){let o,i,s,u;return d("div",_n(Mt([["className",at(" ",["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",_n(Mt([["className",at(" ",["bg-white","px-4","pt-5","pb-4","sm:p-6","sm:pb-4"])],(i=[d("div",_n(Mt([["className",at(" ",["sm:flex","sm:items-start"])],(s=[al,d("div",_n(Mt([["className",at(" ",["mt-3","text-center","sm:mt-0","sm:ml-4","sm:text-left"])],(u=[(l=e,d("h3",{className:at(" ",["text-lg","leading-6","font-medium","text-gray-900"]),id:"modal-title",children:l})),_l(n)],["children",rr.Children.toArray(Array.from(u))])])))],["children",rr.Children.toArray(Array.from(s))])])))],["children",rr.Children.toArray(Array.from(i))])]))),pl(t,r)],["children",rr.Children.toArray(Array.from(o))])])));var l}function wl(e){let n,t,r;return d("div",_n(Mt([["className",at(" ",["relative","z-10"])],["role",at(" ",["dialog"])],(n=[d("div",{className:at(" ",["fixed","inset-0","bg-gray-500","bg-opacity-75","transition-opacity"])}),d("div",_n(Mt([["className",at(" ",["fixed","z-10","inset-0","overflow-y-auto"])],(t=[d("div",_n(Mt([["className",at(" ",["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:at(" ",["hidden","sm:inline-block","sm:align-middle","sm:h-screen"]),children:"​"}),gl(e.HeadingText,e.BodyText,e.ConfirmAction,e.CancelAction)],["children",rr.Children.toArray(Array.from(r))])])))],["children",rr.Children.toArray(Array.from(t))])])))],["children",rr.Children.toArray(Array.from(n))])])))}function yl(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 vl(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 yl(e,"_");case 3:return yl(e,"_").toUpperCase();case 4:return yl(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 Cl=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"}))})),bl=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 xl extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Pencil","Trash"]}}class Sl extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["ClassName"]}}function El(e,n){if(1===e.tag){const e=vl(n,1);return d(Cl,e)}{const e=vl(n,1);return d(bl,e)}}class Al extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Default","Inherited","Config"]}}function kl(e){switch(e.tag){case 1:return e.fields[0]+" (inherited)";case 2:return e.fields[0];default:return e.fields[0]+" (default)"}}function Tl(e){switch(e.tag){case 1:default:return"";case 2:return e.fields[0]}}function Il(e,n,t,r){return eu(0,(()=>{const o=Eu(e,n,t,r);return wr.Delay((()=>wr.Bind(o,(t=>{const o=t;return 1===o.tag?wr.Return(new Kr(1,o.fields[0])):wr.ReturnFrom((i=function(e,n,t){return eu(0,(()=>{let r;const o=Su(n,au(new nu(0),cu((r=xu(e),`${r}/configurations/${t}`))));return wr.Delay((()=>wr.Bind(o,(e=>{let n,t;const r=e;return 1===r.tag?wr.Return(new Kr(1,r.fields[0])):wr.ReturnFrom((n=r.fields[0],t=0|n.statusCode,200===t?(i=gs(wn(2,Us(Tr("SuperSelection.AdminUI.Dto.AccountConfiguration",[],mu,(()=>[["DefaultFundUSI",Nr(Dr)]])),new no(1),void 0)),n.responseText),wr.Return(i)):404===t?Qs(0,new mu(void 0)):(o=new Kr(1,"Unexpected response from backend"),wr.Return(o))));var o,i}))))}))}(e,n,r),wr.Bind(i,(e=>(e=>{return n=e,wr.Return(n);var n})(Qr((e=>new qs(0,new zs(o.fields[0],e))),e))))));var i}))))}))}function Nl(e,n,t){return eu(0,(()=>{return r=Eu(e,n,t,void 0),wr.Bind(r,(e=>(e=>{return n=e,wr.Return(n);var n})(Qr((e=>new qs(1,new Ws(e))),e))));var r}))}function Ol(e){return new Ks(((n,t)=>function(e,n,t){return wr.Delay((()=>wr.Bind(Au(e.backendUrl,e.accessToken,e.partnerId,e.accountId,n),(e=>(t(new Ys(8,e)),wr.Zero())))))}(e,n,t)),(n=>function(e,n){return wr.Delay((()=>{return wr.Bind((t=e.backendUrl,r=e.accessToken,o=e.partnerId,i=e.accountId,eu(0,(()=>{let e;const n=Su(r,au(new nu(4),cu((e=xu(t),`${e}/promoted-funds/${o}/${Tn(i)}`))));return wr.Delay((()=>wr.Bind(n,(e=>{let n;const t=e;return 1===t.tag?wr.Return(new Kr(1,t.fields[0])):wr.ReturnFrom((n=t.fields[0],200===n.statusCode?(o=new Kr(0,void 0),wr.Return(o)):(r=new Kr(1,n.responseText),wr.Return(r))));var r,o}))))}))),(e=>(n(new Ys(8,e)),wr.Zero())));var t,r,o,i}))}(e,n)),(n=>function(e,n){return wr.Delay((()=>{let t;return wr.Bind((t=e.accountId,null==t?Nl(e.backendUrl,e.accessToken,e.partnerId):Il(e.backendUrl,e.accessToken,e.partnerId,t)),(e=>(n(new Ys(0,new br(2,e))),wr.Zero())))}))}(e,n)))}function Ml(e){const n=[e.PartnerFunds,e.AccountFunds];let t,r;switch(St(n[0])?St(n[1])?t=0:(t=2,r=n[1]):St(n[1])?t=1:(t=2,r=n[1]),t){case 0:return new Al(0,"australian-retirement-trust, slate");case 1:return new Al(1,at(", ",n[0]));case 2:return new Al(2,at(", ",r))}}function Dl(e,n){return d(ml,{CancelAction:{Action:e=>{n(new Ys(3))},ActionText:"Cancel"},ConfirmAction:{Action:(e,t)=>{n(new Ys(5,e))},ActionText:"Save"},FieldName:"Promoted Funds",FieldValue:e,HeadingText:"Edit Promoted Funds"})}function Fl(e){return d(wl,{BodyText:"Are you sure you want to reset the current promoted funds? This action cannot be undone.",CancelAction:{Action:n=>{e(new Ys(3))},ActionText:"Cancel"},ConfirmAction:{Action:n=>{e(new Ys(7))},ActionText:"Reset"},HeadingText:"Reset Promoted Funds"})}function Ul(e,n,t,r){let o,i,s;const u=(e,n,t)=>{let r;return d("button",_n(Mt([["className",at(" ",["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=[El(e,xt(new Sl(0,"mr-3 flex-shrink-0 h-4 w-6")))],["children",rr.Children.toArray(Array.from(r))])])))},l=Mt(In(On((e=>u(new xl(0),"indigo",e)),t))),c=Mt(In(On((e=>u(new xl(1),"red",e)),r)));return d("div",_n(Mt([["className",at(" ",["px-4","py-5","sm:grid","sm:grid-cols-5","sm:gap-4","sm:px-6"])],(o=[d("dt",{className:at(" ",["text-sm","font-medium","text-gray-500"]),children:e}),d("dd",_n(Mt([["className",at(" ",["mt-1","text-sm","text-gray-900","sm:mt-0","sm:col-span-2"])],(i=[d("span",{className:"flex-grow",children:n})],["children",rr.Children.toArray(Array.from(i))])]))),d("span",_n(Mt([["className","flex-grow"],(s=Zt(zt((()=>Yt(l,zt((()=>c)))))),["children",rr.Children.toArray(Array.from(s))])])))],["children",rr.Children.toArray(Array.from(o))])])))}function Pl(e,n,t){return Ul("Default USI",n,null!=$s(e)?e=>{t(new Ys(1,new Zs(0)))}:void 0,null!=$s(e)?e=>{t(new Ys(2,new Zs(0)))}:void 0)}function Rl(e,n,t){return Ul("Promoted Funds",n,null!=$s(e)?e=>{t(new Ys(1,new Zs(1)))}:void 0,null!=$s(e)?e=>{t(new Ys(2,new Zs(1)))}:void 0)}function Gl(e){let n,t;const r=Ku((()=>{return n=e.accessToken,[new Xs(new br(0),Vs(n),new Js(2)),Rs()];var n}),wn(2,(n=Ol(e),e=>t=>function(e,n,t){switch(n.tag){case 1:return[new Xs(t.Data,t.User,new Js(1,n.fields[0])),Rs()];case 2:return[new Xs(t.Data,t.User,new Js(0,n.fields[0])),Rs()];case 3:case 4:case 6:return[new Xs(t.Data,t.User,new Js(2)),Rs()];case 5:{const r=Mt(Un((e=>e.trim()),dt(n.fields[0],[","],null,0)));return[new Xs(t.Data,t.User,new Js(2)),Gs((n=>{Cr(e.UpdatePromotedFunds({Funds:r},n))}))]}case 7:return[new Xs(t.Data,t.User,new Js(2)),Gs((n=>{Cr(e.DeletePromotedFunds(n))}))];case 8:return[new Xs(new br(1),t.User,t.ModalState),Gs((n=>{Cr(e.ReloadData(n))}))];default:return[new Xs(n.fields[0],t.User,t.ModalState),Rs()]}}(n,e,t)))),o=r[0],i=r[1];ar(xr((()=>function(e){const n=e.accountId;return null==n?Nl(e.backendUrl,e.accessToken,e.partnerId):Il(e.backendUrl,e.accessToken,e.partnerId,n)}(e)),(e=>{i(new Ys(0,e))})));const s=o.User.Roles;if(null==Ls(s))return d(el,{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(Qu,null);case 1:if(1===r.tag){const e=Zt(zt((()=>{let e;const n=Ml(r.fields[0].PromotedFunds);return qt(d("div",_n(xt((e=Zt(zt((()=>{let e,t;return Yt(qt(d("div",_n(xt((e=[(t=xt(Rl(s,kl(n),i)),d("dl",{children:rr.Children.toArray(Array.from(t))}))],["children",rr.Children.toArray(Array.from(e))]))))),zt((()=>{const e=o.ModalState;switch(e.tag){case 1:return 1===e.fields[0].tag?qt(Dl(Tl(n),i)):qt(null);case 2:return qt(null);default:return 1===e.fields[0].tag?qt(Fl(i)):qt(null)}})))}))),["children",rr.Children.toArray(Array.from(e))])))))})));return d("div",{children:rr.Children.toArray(Array.from(e))})}{const e=r.fields[0],n=Nn(e.Configuration.DefaultFundUSI,"-"),u=Ml(e.PromotedFunds);return d("div",_n(xt((t=Zt(zt((()=>{let e,t;return Yt(qt(d("div",_n(xt((e=[(t=Mt([Pl(s,n,i),Rl(s,kl(u),i)]),d("dl",{children:rr.Children.toArray(Array.from(t))}))],["children",rr.Children.toArray(Array.from(e))]))))),zt((()=>{const e=o.ModalState;switch(e.tag){case 1:return 1===e.fields[0].tag?qt(Dl(Tl(u),i)):qt(function(e,n){return d(ml,{CancelAction:{Action:e=>{n(new Ys(3))},ActionText:"Cancel"},ConfirmAction:{Action:(e,t)=>{n(new Ys(4,e))},ActionText:"Save"},FieldName:"Default USI",FieldValue:e,HeadingText:"Edit Default USI"})}(n,i));case 2:return qt(null);default:return 1===e.fields[0].tag?qt(Fl(i)):qt(function(e){return d(wl,{BodyText:"Are you sure you want to reset the current Default USI? This action cannot be undone.",CancelAction:{Action:n=>{e(new Ys(3))},ActionText:"Cancel"},ConfirmAction:{Action:n=>{e(new Ys(6))},ActionText:"Reset"},HeadingText:"Reset Default USI"})}(i))}})))}))),["children",rr.Children.toArray(Array.from(t))]))))}case 2:return d(el,{error:u});case 3:return d(el,{error:Cn(l)})}}}V((e=>d(ul,e)),"superhero-super-selection"),V((e=>d(Gl,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 _(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 _(e)}}function g(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&&_(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!=(g=t.__k[d]=null==(g=n[d])||"boolean"==typeof g?null:"string"==typeof g||"number"==typeof g||"bigint"==typeof g?h(null,g,null,null,g):Array.isArray(g)?h(m,{children:g},null,null,null):g.__b>0?h(g.type,g.props,g.key,null,g.__v):g)){if(g.__=t,g.__b=t.__b+1,null===(_=S[d])||_&&g.key==_.key&&g.type===_.type)S[d]=void 0;else for(p=0;p<E;p++){if((_=S[p])&&g.key==_.key&&g.type===_.type){S[p]=void 0;break}_=null}I(e,g,_=_||u,o,i,s,c,a,f),y=g.__e,(p=g.ref)&&_.ref!=p&&(b||(b=[]),_.ref&&b.push(_.ref,null,g),b.push(p,g.__c||y,g)),null!=y?(null==v&&(v=y),"function"==typeof g.type&&g.__k===_.__k?g.__d=a=C(g,a,e):a=x(e,g,_,S,y,a),"function"==typeof t.type&&(t.__d=a)):a&&_.__e==a&&a.parentNode!=e&&(a=w(_))}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?A:k,i):e.removeEventListener(n,i?A:k,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 k(e){this.l[e.type+!1](n.event?n.event(e):e)}function A(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,_=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||(g=d.getSnapshotBeforeUpdate(w,_)),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,_=t.type,g=0;if("svg"===_&&(i=!0),null!=s)for(;g<s.length;g++)if((a=s[g])&&"setAttribute"in a==!!_&&(_?a.localName===_:3===a.nodeType)){n=a,s[g]=null;break}if(null==n){if(null===_)return document.createTextNode(p);n=i?document.createElementNS("http://www.w3.org/2000/svg",_):document.createElement(_,p.is&&p),s=null,c=!1}if(null===_)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={},g=0;g<n.attributes.length;g++)m[n.attributes[g].name]=n.attributes[g].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(g=t.props.children,v(n,Array.isArray(g)?g:[g],t,r,o,i&&"foreignObject"!==_,s,l,s?s[0]:r.__k&&w(r,0),c),null!=s)for(g=s.length;g--;)null!=s[g]&&f(s[g]);c||("value"in p&&void 0!==(g=p.value)&&(g!==n.value||"progress"===_&&!g||"option"===_&&g!==m.value)&&E(n,"value",g,m.value,!1),"checked"in p&&void 0!==(g=p.checked)&&g!==n.checked&&E(n,"checked",g,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 F(e,n){U(e,n,F)}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[L(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")?F:U)(this._vdom,this._root)}function L(e){return e.replace(/-(\w)/g,(function(e,n){return n?n.toUpperCase():""}))}function H(e,n,t){if(this._vdom){var r={};r[e]=t=null==t?void 0:t,r[L(e)]=t,this._vdom=P(this._vdom,r),U(this._vdom,this._root)}}function j(){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=H,o.prototype.disconnectedCallback=j,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),g(this))},p.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),g(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 _e(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 ge=function(e,n){return null==e?null:b(b(e).map(n))},ye={map:ge,forEach:ge,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 ke(e){return this.getChildContext=function(){return e.context},e.children}function Ae(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(ke,{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 Fe(){return this.defaultPrevented}n.event=function(e){return Me&&(e=Me(e)),e.persist=De,e.isPropagationStopped=Ue,e.isDefaultPrevented=Fe,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];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),Pe=e.__c};var Le={ReactCurrentDispatcher:{current:{readContext:function(e){return Pe.__n[e.__c].props.value}}}};function He(e){return!!e&&e.$$typeof===Ie}const je={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 F(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(Ae,{__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(g)},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 He(e)?P.apply(null,arguments):e},createRef:function(){return{current:null}},Fragment:m,isValidElement:He,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:_e,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:Le};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){return Object.getPrototypeOf(e).constructor===Object.getPrototypeOf(n).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){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(Object.getPrototypeOf(e).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){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):Object.getPrototypeOf(e).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){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:Object.getPrototypeOf(e).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 _n=Symbol("curried");function gn(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[_n]=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(_n in n){n=n[_n];for(let e=0;e<t.length;e++)n=n(t[e]);return n}return yn(t,e,n)}}function Cn(e,n=0){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 t=Object.getPrototypeOf(e).constructor;return t===Object&&n<10?"{ "+Object.entries(e).map((([e,t])=>e+" = "+Cn(t,n+1))).join("\n ")+" }":t.name}}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)}}class En{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 En?e.value:e)}CompareTo(e){return null==e?1:mn(this.value,e instanceof En?e.value:e)}}function kn(e){return null==e||e instanceof En?new En(e):e}function An(e){if(null==e)throw new Error("Option has no value");return e instanceof En?e.value:e}function In(e){return null==e?[]:[An(e)]}function Tn(e,n){return null!=e?An(e):n}function Nn(e,n){return null!=e?An(e):n()}function On(e,n){return null!=n?kn(e(An(n))):void 0}function Mn(e,n){return null!=n?e(An(n)):void 0}function Dn(e){const n=e<0,t=(e=Math.abs(e))%36e5/6e4;return(n?"-":"+")+Ke(~~(e/36e5),2)+":"+Ke(t,2)}function Un(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 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," ")+Dn(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 Un(i,"first");case"T":case"t":return Un(i,"second");case"O":case"o":return function(e,n){const t=e.toISOString();return t.substring(0,t.length-1)+Dn(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?Un(e,"first"):e.toLocaleDateString();case"T":case"t":return t?Un(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?Dn(-6e4*e.getTimezoneOffset()):"")}}(e,t);default:throw new Error("Unrecognized Date print format")}}(e,n)}function Rn(e,n){const t=new Date(e);return t.kind=0|(null==n?0:n),t}function $n(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 Gn(e,n){try{return n.contents=function(e,n=!1){const[t,r]=$n(e),o=null!=r?n&&"Z"===r?1:2:0;return Rn(t.getTime(),o)}(e),!0}catch(e){return!1}}const Ln=Symbol("numeric");function Hn(e){return"number"==typeof e||(null==e?void 0:e[Ln])}function jn(e,n){return"number"==typeof e?e*n:e[Ln]().multiply(n)}function Bn(e,n){return"number"==typeof e?e.toFixed(n):e[Ln]().toFixed(n)}function Vn(e,n){return"number"==typeof e?e.toPrecision(n):e[Ln]().toPrecision(n)}function zn(e,n){return"number"==typeof e?e.toExponential(n):e[Ln]().toExponential(n)}function Wn(e){return"number"==typeof e?(Number(e)>>>0).toString(16):e[Ln]().toHex()}function qn(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function Zn(e,n,t=0){if(e.lastIndex=t,!e.global)throw new Error("Non-global RegExp");let r=e.exec(n);const o=[];for(;null!==r;)o.push(r),r=e.exec(n);return o}const Jn=/(^|[^%])%([0+\- ]*)(\*|\d+)?(?:\.(\d+))?(\w)/g,Yn=/\{(\d+)(,-?\d+)?(?:\:([a-zA-Z])(\d{0,2})|\:(.+?))?\}/g;function Xn(e,n){return function(e,n){return"number"==typeof e?e<n?-1:e>n?1:0:e.CompareTo(n)}(e,n)<0}function Kn(e){return{input:e,cont:(n=e,e=>{Jn.lastIndex=0;const t=[],r=[];let o=0,i=Jn.exec(n);for(;i;){const e=i.index+(i[1]||"").length;t.push(n.substring(o,e).replace(/%%/g,"%")),r.push(i),o=Jn.lastIndex,Jn.lastIndex-=1,i=Jn.exec(n)}return 0===t.length?e(n.replace(/%%/g,"%")):(t.push(n.substring(o).replace(/%%/g,"%")),rt(e,t,r))})};var n}function Qn(e,n){return"string"==typeof n?e(n):n.cont(e)}function et(e){return Qn((e=>e),e)}function nt(e){return Qn((e=>{throw new Error(e)}),e)}function tt(e,n,t,r,o){let i="";if(n=n||"",o=o||"",Hn(e))switch("x"!==o.toLowerCase()&&(Xn(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=Bn(e,r=null!=r?r:6);break;case"g":case"G":e=null!=r?Vn(e,r):Vn(e);break;case"e":case"E":e=null!=r?zn(e,r):zn(e);break;case"x":e=Wn(e);break;case"X":e=Wn(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=it(e,t-i.length,s,o)):it(i+e,t,s,o)}return e}function rt(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+=tt(e,n,c,r,i),u.splice(0,1),l.splice(0,1)}return 0===l.length?(s+=u[0],e(s)):rt(e,u,l,s,o)}}function ot(e,n){return Array.isArray(n)?n.join(e):Array.from(n).join(e)}function it(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 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(qn),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}}function ht(e,n,t,r){return function(e,n,t,r){let o=r;n.length!==t.length&&function(){throw new Error("Arrays had different lengths")}();const i=0|n.length;for(let r=1;r<=i;r++)o=e(0,n[i-r],t[i-r],o);return o}(((n,t,r,o)=>e(t,r,o)),n,t,r)}class mt extends xn{constructor(e,n){super(),this.head=e,this.tail=n}toString(){return"["+ot("; ",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 pt(this)}[Symbol.iterator](){return Ye(this.GetEnumerator())}"System.Collections.IEnumerable.GetEnumerator"(){return Je(this)}}class pt{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 wt(){return new mt(null,void 0)}function _t(e,n){return new mt(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 vt(e){const n=e.tail;if(null!=n)return n;throw new Error("Collection was empty.\\nParameter name: list")}function Ct(){return wt()}function bt(e,n){return _t(e,n)}function xt(e){return _t(e,wt())}function St(e){return gt(e)}function Et(e){return yt(e)}function kt(e){return vt(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=vt(o)}})(0,e),t}function It(e,n,t){let r=n,o=t;for(;!gt(o);)r=e(r,yt(o)),o=vt(o);return r}function Tt(e){return It(((e,n)=>_t(n,e)),wt(),e)}function Nt(e,n){It(((n,t)=>{e(t)}),void 0,n)}function Ot(e,n){let t=n;for(let n=e.length-1;n>=0;n--)t=_t(e[n],t);return t}function Mt(e){return Ot(e,wt())}function Dt(e,n){return It(((e,n)=>_t(n,e)),n,Tt(e))}function Ut(e,n){const t=wt(),r=It(((n,t)=>{let r;return r=new mt(e(t),void 0),n.tail=r,r}),t,n),o=wt();return r.tail=o,vt(t)}function Ft(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=vt(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 Lt{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 Bt(e,n,t){let r,o=!1,i=kn(e());const s=()=>{if(null!=i){const e=An(i);try{t(e)}finally{i=void 0}}},u=()=>{try{s()}finally{r=void 0}};return jt((()=>(o||$t(),null!=r?An(r):Gt())),(()=>{if(o||(o=!0),null!=i){const e=An(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 Lt(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 jt((()=>(o?i&&Gt():$t(),null!=r?An(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 An(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)?Mt(e):e instanceof mt?e:function(e){let n,t;if(Be(e))return Mt(e);if(e instanceof mt)return e;{const r=wt();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 mt(e,void 0),n.tail=t,o=t}}finally{We(i)}const s=o,u=wt();return s.tail=u,vt(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=We,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),We)}function rr(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 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=An(r);if(s instanceof lr){if(o=ar(s),(null!=o?(i=o,i instanceof lr?dr(i):1):0)>l+1){const r=An(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=An(e);if(o instanceof lr){if(s=fr(o),(null!=s?(u=s,u instanceof lr?dr(u):1):0)>c+1){const e=An(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 _r(e,n,t,r){if(null!=r){const o=r,i=0|e.Compare(n,sr(o));return o instanceof lr?i<0?wr(_r(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),_r(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 gr(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,An(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,An(e),void 0,r,2):r}if(0===i){const e=t(kn(ur(o)));return null!=e?ir(n,An(e)):void 0}{const e=t(void 0);return null!=e?cr(n,An(e),r,void 0,2):r}}}{const e=t(void 0);return null!=e?ir(n,An(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 kr(e,n){return Er(e,n)}function Ar(e,n){let t;for(let r=0;r<=n.length-1;r++){const o=n[r];t=_r(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(St(n))return Ct();{const t=kt(n),r=Et(n);if(null!=r){const o=r;if(o instanceof lr){e=Ot([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(xt(e)),!1)}function Or(e){if(e.started){const n=e.stack;if(St(n))return function(){throw new Error("enumeration already finished")}();if(null!=Et(n)){const e=Et(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(St(n))return!1;if(null!=Et(n)){if(Et(n)instanceof lr)throw new Error("Please report error: Map iterator, unexpected stack for moveNext");return e.stack=Tr(kt(n)),!St(e.stack)}throw new Error("Please report error: Map iterator, unexpected stack for moveNext")}return e.started=!0,!St(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 ["+ot("; ",nr((e=>function(e,...n){return"object"==typeof e&&n.length>0&&(e=n[0],n.shift()),e.replace(Yn,((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=Bn(u,i=null!=i?i:2);break;case"g":case"G":u=null!=i?Vn(u,i):Vn(u);break;case"e":case"E":u=null!=i?zn(u,i):zn(u);break;case"p":case"P":i=null!=i?i:2,u=Bn(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(Wn(u),i,"0"):Wn(u),"X"===o&&(u=u.toUpperCase());break;default:if(s){let e="";u=s.replace(/([0#,]+)(\.[0#]+)?/,((n,t,r)=>{Xn(u,0)&&(u=jn(u,-1),e="-");const o=null!=r?r.length:0;if(u=Bn(u,Math.max(o-1,0)),t.indexOf(",")>0){const[e,n]=u.split("."),t=e.length%3,r=Math.floor(e.length/3);let o=t>0?e.substr(0,t)+(r>0?",":""):"";for(let n=0;n<r;n++)o+=e.substr(t+3*n,3)+(n<r-1?",":"");u=n?o+"."+n:o}const i=(t=t.replace(/,/g,"")).length>0&&"0"===t[0]?t.length:0;return it(u,i-e.length+o,"0")})),u=e+u}}else u=u instanceof Date?Pn(u,s||o):Cn(u);return r=parseInt((r||" ").substring(1),10),isNaN(r)||(u=it(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=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 $r(this,e[0])&&an(Pr(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 nr((e=>[e[0],e[1]]),this)}get(e){return Pr(this,e)}has(e){return $r(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 Dr(e,n)}function Fr(e){const n=Pt();return Ur(n,function(e,n){if(Be(n))return Ar(e,n);if(n instanceof mt)return function(e,n){return It(((n,t)=>_r(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=_r(r,s[0],s[1],o),t=i}}}(e,void 0,t)}finally{We(t)}}}(n,e))}function Pr(e,n){return function(e,n,t){const r=gr(e,n,t);if(null==r)throw new Error;return An(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 gr(e.comparer,n,e.tree)}function Lr(e,n,t){return function(e,n,t){return Ur(e.comparer,_r(e.comparer,n,t,e.tree))}(t,e,n)}function Hr(e,n,t){return function(e,n,t){return Ur(e.comparer,vr(e.comparer,n,t,e.tree))}(t,e,n)}function jr(e,n){return Gr(n,e)}function Br(e,n){return function(e,n){return Ur(e.comparer,kr(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(_o(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 _o(e){return e.fullname.startsWith("System.Tuple")}function go(e){return null==e.fields?[]:e.fields}function yo(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):{}}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 vo extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Ok","Error"]}}function Co(e,n){return 0===n.tag?new vo(0,e(n.fields[0])):new vo(1,n.fields[0])}class bo extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["BadPrimitive","BadPrimitiveExtra","BadType","BadField","BadPath","TooSmallArray","FailMessage","BadOneOf"]}}class xo extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["PascalCase","CamelCase","SnakeCase"]}}class So{constructor(){this.cache=new Map([])}}function Eo(){return new So}function ko(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!=(-276&n))throw new Error("RegexOptions only supports: IgnoreCase, Multiline, Singleline and ECMAScript");let t="g";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=Zn(e,s),l=Zn.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)}}Eo(),Eo();const Io=/^[\(\{]{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})$/,No=/^\{0x[0-9a-f]{8},(0x[0-9a-f]{4},){2}\{(0x[0-9a-f]{2},){7}0x[0-9a-f]{2}\}\}$/;function Oo(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(Io.test(t))return function(e,...n){if(0===n.length)return e.trim();const t="["+qn(n.join(""))+"]+";return e.replace(new RegExp("^"+t),"").replace(new RegExp(t+"$"),"")}(t,"{","}","(",")");if(To.test(t))return n(t);if(No.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 Mo;function Do(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&Mo.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]=Do(!0,r);!t&&10!==i.radix&&e>=n&&e<=o&&(e=e<<32-r>>32-r);const[s,u]=Do(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 Fo(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]=$n(e),r=null==t?-6e4*n.getTimezoneOffset():"Z"===t?0:6e4*t;return Fo(n.getTime(),r)}(e),!0}catch(e){return!1}}!function(e){e[e.AllowHexSpecifier=512]="AllowHexSpecifier"}(Mo||(Mo={}));var Ro=null;try{Ro=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 $o(e,n,t){this.low=0|e,this.high=0|n,this.unsigned=!!t}function Go(e){return!0===(e&&e.__isLong__)}$o.prototype.GetHashCode=function(){let e=this.unsigned?1:0;return e=(e<<5)+e^this.high,e=(e<<5)+e^this.low,e},$o.prototype.Equals=function(e){return di(this,e)},$o.prototype.CompareTo=function(e){return wi(this,e)},$o.prototype.toString=function(e){return li(this,e)},$o.prototype.toJSON=function(){return li(this)},$o.prototype[Ln]=function(){const e=this;return{multiply:n=>vi(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 li(e.unsigned?e:function(e,n,t){return t?function(e,n){return new $o(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 $o(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}}},$o.prototype.__isLong__,Object.defineProperty($o.prototype,"__isLong__",{value:!0});var Lo={},Ho={};function jo(e,n){var t,r,o;return n?(o=0<=(e>>>=0)&&e<256)&&(r=Ho[e])?r:(t=Vo(e,(0|e)<0?-1:0,!0),o&&(Ho[e]=t),t):(o=-128<=(e|=0)&&e<128)&&(r=Lo[e])?r:(t=Vo(e,e<0?-1:0,!1),o&&(Lo[e]=t),t)}function Bo(e,n){if(isNaN(e))return n?Qo:Ko;if(n){if(e<0)return Qo;if(e>=Jo)return oi}else{if(e<=-Yo)return ii;if(e+1>=Yo)return ri}return e<0?_i(Bo(-e,n)):Vo(e%Zo|0,e/Zo|0,n)}function Vo(e,n,t){return new $o(e,n,t)}var zo=Math.pow;function Wo(e,n,t){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return Ko;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 _i(Wo(e.substring(1),n,t));for(var o=Bo(zo(t,8)),i=Ko,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?vi(i,Bo(zo(t,u))):i=vi(i,o),Bo(l))}return i.unsigned=n,i}function qo(e,n){return"number"==typeof e?Bo(e,n):"string"==typeof e?Wo(e,n):Vo(e.low,e.high,"boolean"==typeof n?n:e.unsigned)}var Zo=4294967296,Jo=Zo*Zo,Yo=Jo/2,Xo=jo(1<<24),Ko=jo(0),Qo=jo(0,!0),ei=jo(1),ni=jo(1,!0),ti=jo(-1),ri=Vo(-1,2147483647,!1),oi=Vo(-1,-1,!0),ii=Vo(0,-2147483648,!1);function si(e){return e.unsigned?e.low>>>0:e.low}function ui(e){return e.unsigned?(e.high>>>0)*Zo+(e.low>>>0):e.high*Zo+(e.low>>>0)}function li(e,n){if((n=n||10)<2||36<n)throw RangeError("radix");if(ci(e))return"0";if(ai(e)){if(di(e,ii)){var t=Bo(n),r=Ci(e,t),o=yi(vi(r,t),e);return li(r,n)+si(o).toString(n)}return"-"+li(_i(e),n)}for(var i=Bo(zo(n,6),e.unsigned),s=e,u="";;){var l=Ci(s,i),c=(si(yi(s,vi(l,i)))>>>0).toString(n);if(ci(s=l))return c+u;for(;c.length<6;)c="0"+c;u=""+c+u}}function ci(e){return 0===e.high&&0===e.low}function ai(e){return!e.unsigned&&e.high<0}function fi(e){return 1==(1&e.low)}function di(e,n){return Go(n)||(n=qo(n)),(e.unsigned===n.unsigned||e.high>>>31!=1||n.high>>>31!=1)&&e.high===n.high&&e.low===n.low}function hi(e,n){return wi(e,n)<0}function mi(e,n){return wi(e,n)>0}function pi(e,n){return wi(e,n)>=0}function wi(e,n){if(Go(n)||(n=qo(n)),di(e,n))return 0;var t=ai(e),r=ai(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:ai(yi(e,n))?-1:1}function _i(e){return!e.unsigned&&di(e,ii)?ii:gi(function(e){return Vo(~e.low,~e.high,e.unsigned)}(e),ei)}function gi(e,n){Go(n)||(n=qo(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,Vo((f&=65535)<<16|(d&=65535),(c&=65535)<<16|(a&=65535),e.unsigned)}function yi(e,n){return Go(n)||(n=qo(n)),gi(e,_i(n))}function vi(e,n){if(ci(e))return e.unsigned?Qo:Ko;if(Go(n)||(n=qo(n)),Ro)return Vo(Ro.mul(e.low,e.high,n.low,n.high),Ro.get_high(),e.unsigned);if(ci(n))return e.unsigned?Qo:Ko;if(di(e,ii))return fi(n)?ii:Ko;if(di(n,ii))return fi(e)?ii:Ko;if(ai(e))return ai(n)?vi(_i(e),_i(n)):_i(vi(_i(e),n));if(ai(n))return _i(vi(e,_i(n)));if(hi(e,Xo)&&hi(n,Xo))return Bo(ui(e)*ui(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,Vo((d&=65535)<<16|(h&=65535),(a&=65535)<<16|(f&=65535),e.unsigned)}function Ci(e,n){if(Go(n)||(n=qo(n)),ci(n))throw Error("division by zero");var t,r,o;if(Ro)return e.unsigned||-2147483648!==e.high||-1!==n.low||-1!==n.high?Vo((e.unsigned?Ro.div_u:Ro.div_s)(e.low,e.high,n.low,n.high),Ro.get_high(),e.unsigned):e;if(ci(e))return e.unsigned?Qo:Ko;if(e.unsigned){if(n.unsigned||(n=function(e){return e.unsigned?e:Vo(e.low,e.high,!0)}(n)),mi(n,e))return Qo;if(mi(n,function(e,n){if(Go(n)&&(n=si(n)),0==(n&=63))return e;var t=e.high;return n<32?Vo(e.low>>>n|t<<32-n,t>>>n,e.unsigned):Vo(32===n?t:t>>>n-32,0,e.unsigned)}(e,1)))return ni;o=Qo}else{if(di(e,ii))return di(n,ei)||di(n,ti)?ii:di(n,ii)?ei:di(t=function(e,n){return Go(n)&&(n=si(n)),0==(n&=63)?e:n<32?Vo(e.low<<n,e.high<<n|e.low>>>32-n,e.unsigned):Vo(0,e.low<<n-32,e.unsigned)}(Ci(function(e,n){return Go(n)&&(n=si(n)),0==(n&=63)?e:n<32?Vo(e.low>>>n|e.high<<32-n,e.high>>n,e.unsigned):Vo(e.high>>n-32,e.high>=0?0:-1,e.unsigned)}(e,1),n),1),Ko)?ai(n)?ei:ti:o=gi(t,Ci(r=yi(e,vi(n,t)),n));if(di(n,ii))return e.unsigned?Qo:Ko;if(ai(e))return ai(n)?Ci(_i(e),_i(n)):_i(Ci(_i(e),n));if(ai(n))return _i(Ci(e,_i(n)));o=Ko}for(r=e;pi(r,n);){t=Math.max(1,Math.floor(ui(r)/ui(n)));for(var i=Math.ceil(Math.log(t)/Math.LN2),s=i<=48?1:zo(2,i-48),u=Bo(t),l=vi(u,n);ai(l)||mi(l,r);)l=vi(u=Bo(t-=s,e.unsigned),n);ci(u)&&(u=ei),o=gi(o,u),r=yi(r,l)}return o}const bi=Ci,xi=ui;function Si(e){return e<0?Math.ceil(e):Math.floor(e)}function Ei(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 xi(bi(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 Ei(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*Ei(t,s,u,o,r)}}throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}(e),!0}catch(e){return!1}}class Ii{constructor(e){this.k=e}}function Ti(e){return new Ii(e)}function Ni(e){return e.k}class Oi extends Ii{constructor(e,n,t,r){super(e),this.left=n,this.right=t,this.h=0|r}}function Mi(e,n,t,r){return new Oi(e,n,t,r)}function Di(e){return e.left}function Ui(e){return e.right}function Fi(e){return e.h}function Pi(e,n){e:for(;;){const t=e,r=n;if(null!=t){const o=t;if(o instanceof Oi){e=Di(o),n=Pi(Ui(o),r+1);continue e}return r+1|0}return 0|r}}function Ri(e){return Pi(e,0)}function $i(e,n,t){let r,o;if(null!=e){const n=e;r=n instanceof Oi?Fi(n):1}else r=0;if(null!=t){const e=t;o=e instanceof Oi?Fi(e):1}else o=0;const i=0|(r<o?o:r);return 0===i?Ti(n):Mi(n,e,t,i+1)}function Gi(e,n,t){let r,o,i,s,u,l;if(null!=e){const n=e;u=n instanceof Oi?Fi(n):1}else u=0;if(null!=t){const e=t;l=e instanceof Oi?Fi(e):1}else l=0;if(l>u+2){const i=An(t);if(i instanceof Oi){if(r=Di(i),(null!=r?(o=r,o instanceof Oi?Fi(o):1):0)>u+1){const t=An(Di(i));if(t instanceof Oi)return $i($i(e,n,Di(t)),Ni(t),$i(Ui(t),Ni(i),Ui(i)));throw new Error("internal error: Set.rebalance")}return $i($i(e,n,Di(i)),Ni(i),Ui(i))}throw new Error("internal error: Set.rebalance")}if(u>l+2){const r=An(e);if(r instanceof Oi){if(i=Ui(r),(null!=i?(s=i,s instanceof Oi?Fi(s):1):0)>l+1){const e=An(Ui(r));if(e instanceof Oi)return $i($i(Di(r),Ni(r),Di(e)),Ni(e),$i(Ui(e),n,t));throw new Error("internal error: Set.rebalance")}return $i(Di(r),Ni(r),$i(Ui(r),n,t))}throw new Error("internal error: Set.rebalance")}return $i(e,n,t)}function Li(e,n,t){if(null!=t){const r=t,o=0|e.Compare(n,Ni(r));if(r instanceof Oi)return o<0?Gi(Li(e,n,Di(r)),Ni(r),Ui(r)):0===o?t:Gi(Di(r),Ni(r),Li(e,n,Ui(r)));{const o=0|e.Compare(n,Ni(r));return o<0?Mi(n,void 0,t,2):0===o?t:Mi(n,t,void 0,2)}}return Ti(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,Ni(s));if(s instanceof Oi){if(u<0){e=r,n=o,t=Di(s);continue e}if(0===u)return!0;e=r,n=o,t=Ui(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 Oi){ji(t,Di(o)),t(Ni(o)),e=t,n=Ui(o);continue e}t(Ni(o))}break}}class Bi extends xn{constructor(e,n){super(),this.stack=e,this.started=n}}function Vi(e){e:for(;;){const n=e;if(St(n))return Ct();{const t=Et(n),r=kt(n);if(null!=t){const o=t;if(o instanceof Oi){e=Ot([Di(o),Ti(Ni(o)),Ui(o)],r);continue e}return n}e=r;continue e}}}function zi(e){return new Bi(Vi(xt(e)),!1)}function Wi(e){if(e.started){const n=e.stack;if(St(n))return function(){throw new Error("Enumeration already started")}();if(null!=Et(n))return Ni(Et(n));throw new Error("Please report error: Set iterator, unexpected stack for current")}return function(){throw new Error("Enumeration not started")}()}function qi(e){let n=zi(e);return{"System.Collections.Generic.IEnumerator`1.get_Current":()=>Wi(n),"System.Collections.IEnumerator.get_Current":()=>Wi(n),"System.Collections.IEnumerator.MoveNext":()=>function(e){if(e.started){const n=e.stack;if(St(n))return!1;if(null!=Et(n)){if(Et(n)instanceof Oi)throw new Error("Please report error: Set iterator, unexpected stack for moveNext");return e.stack=Vi(kt(n)),!St(e.stack)}throw new Error("Please report error: Set iterator, unexpected stack for moveNext")}return e.started=!0,!St(e.stack)}(n),"System.Collections.IEnumerator.Reset"(){n=zi(e)},Dispose(){}}}function Zi(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(St(s[0]))return St(s[1])?0:-1;if(St(s[1]))return 1;if(null!=Et(s[1]))if(null!=Et(s[0])){const u=Et(s[0]),l=Et(s[1]);if(u instanceof Oi)if(null==Di(u)){if(!(l instanceof Oi)){const o=0|r.Compare(Ni(u),Ni(l));if(0!==o)return 0|o;e=r,n=bt(Ui(u),kt(s[0])),t=bt(void 0,kt(s[1]));continue e}if(null==Di(l)){const o=0|r.Compare(Ni(u),Ni(l));if(0!==o)return 0|o;e=r,n=bt(Ui(u),kt(s[0])),t=bt(Ui(l),kt(s[1]));continue e}{const s=[o,i];let u,l,c,a,f;switch(St(s[0])?St(s[1])?u=2:null!=Et(s[1])?(u=1,a=kt(s[1]),f=Et(s[1])):u=2:null!=Et(s[0])?(u=0,l=kt(s[0]),c=Et(s[0])):St(s[1])?u=2:null!=Et(s[1])?(u=1,a=kt(s[1]),f=Et(s[1])):u=2,u){case 0:if(c instanceof Oi){e=r,n=Ot([Di(c),Mi(Ni(c),void 0,Ui(c),0)],l),t=i;continue e}e=r,n=Ot([void 0,Ti(Ni(c))],l),t=i;continue e;case 1:if(f instanceof Oi){e=r,n=o,t=Ot([Di(f),Mi(Ni(f),void 0,Ui(f),0)],a);continue e}e=r,n=o,t=Ot([void 0,Ti(Ni(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(St(s[0])?St(s[1])?u=2:null!=Et(s[1])?(u=1,a=kt(s[1]),f=Et(s[1])):u=2:null!=Et(s[0])?(u=0,l=kt(s[0]),c=Et(s[0])):St(s[1])?u=2:null!=Et(s[1])?(u=1,a=kt(s[1]),f=Et(s[1])):u=2,u){case 0:if(c instanceof Oi){e=r,n=Ot([Di(c),Mi(Ni(c),void 0,Ui(c),0)],l),t=i;continue e}e=r,n=Ot([void 0,Ti(Ni(c))],l),t=i;continue e;case 1:if(f instanceof Oi){e=r,n=o,t=Ot([Di(f),Mi(Ni(f),void 0,Ui(f),0)],a);continue e}e=r,n=o,t=Ot([void 0,Ti(Ni(f))],a);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}else{if(!(l instanceof Oi)){const o=0|r.Compare(Ni(u),Ni(l));if(0!==o)return 0|o;e=r,n=kt(s[0]),t=kt(s[1]);continue e}if(null==Di(l)){const o=0|r.Compare(Ni(u),Ni(l));if(0!==o)return 0|o;e=r,n=bt(void 0,kt(s[0])),t=bt(Ui(l),kt(s[1]));continue e}{const s=[o,i];let u,l,c,a,f;switch(St(s[0])?St(s[1])?u=2:null!=Et(s[1])?(u=1,a=kt(s[1]),f=Et(s[1])):u=2:null!=Et(s[0])?(u=0,l=kt(s[0]),c=Et(s[0])):St(s[1])?u=2:null!=Et(s[1])?(u=1,a=kt(s[1]),f=Et(s[1])):u=2,u){case 0:if(c instanceof Oi){e=r,n=Ot([Di(c),Mi(Ni(c),void 0,Ui(c),0)],l),t=i;continue e}e=r,n=Ot([void 0,Ti(Ni(c))],l),t=i;continue e;case 1:if(f instanceof Oi){e=r,n=o,t=Ot([Di(f),Mi(Ni(f),void 0,Ui(f),0)],a);continue e}e=r,n=o,t=Ot([void 0,Ti(Ni(f))],a);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}}}else{Et(s[1]);const u=[o,i];let l,c,a,f,d;switch(St(u[0])?St(u[1])?l=2:null!=Et(u[1])?(l=1,f=kt(u[1]),d=Et(u[1])):l=2:null!=Et(u[0])?(l=0,c=kt(u[0]),a=Et(u[0])):St(u[1])?l=2:null!=Et(u[1])?(l=1,f=kt(u[1]),d=Et(u[1])):l=2,l){case 0:if(a instanceof Oi){e=r,n=Ot([Di(a),Mi(Ni(a),void 0,Ui(a),0)],c),t=i;continue e}e=r,n=Ot([void 0,Ti(Ni(a))],c),t=i;continue e;case 1:if(d instanceof Oi){e=r,n=o,t=Ot([Di(d),Mi(Ni(d),void 0,Ui(d),0)],f);continue e}e=r,n=o,t=Ot([void 0,Ti(Ni(d))],f);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}else{if(null==Et(s[0])){e=r,n=kt(s[0]),t=kt(s[1]);continue e}{Et(s[0]);const u=[o,i];let l,c,a,f,d;switch(St(u[0])?St(u[1])?l=2:null!=Et(u[1])?(l=1,f=kt(u[1]),d=Et(u[1])):l=2:null!=Et(u[0])?(l=0,c=kt(u[0]),a=Et(u[0])):St(u[1])?l=2:null!=Et(u[1])?(l=1,f=kt(u[1]),d=Et(u[1])):l=2,l){case 0:if(a instanceof Oi){e=r,n=Ot([Di(a),Mi(Ni(a),void 0,Ui(a),0)],c),t=i;continue e}e=r,n=Ot([void 0,Ti(Ni(a))],c),t=i;continue e;case 1:if(d instanceof Oi){e=r,n=o,t=Ot([Di(d),Mi(Ni(d),void 0,Ui(d),0)],f);continue e}e=r,n=o,t=Ot([void 0,Ti(Ni(d))],f);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}}break}}(e,xt(n),xt(t))}function Ji(e,n,t){let r=t;ji((e=>{n[r]=e,r=r+1|0}),e)}function Yi(e,n){if(Be(n))return function(e,n){return ft(((n,t)=>Li(e,t,n)),void 0,n)}(e,n);if(n instanceof mt)return function(e,n){return It(((n,t)=>Li(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=Li(r,i["System.Collections.Generic.IEnumerator`1.get_Current"](),o),t=i}}(e,void 0,t)}finally{We(t)}}}class Xi{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 Xi&&0===Zi(Ki(this),Qi(this),Qi(e))}toString(){return"set ["+ot("; ",nr((e=>Cn(e)),this))+"]"}get[Symbol.toStringTag](){return"FSharpSet"}toJSON(e){return Array.from(this)}CompareTo(e){return 0|Zi(Ki(this),Qi(this),Qi(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(Ki(this),e,Qi(this))}"System.Collections.Generic.ICollection`1.CopyToZ2E171D71"(e,n){Ji(Qi(this),e,n)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return 0|es(this)}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return 0|es(this)}GetEnumerator(){return qi(Qi(this))}[Symbol.iterator](){return Ye(this.GetEnumerator())}"System.Collections.IEnumerable.GetEnumerator"(){return qi(Qi(this))}get size(){return 0|es(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(Ki(e),n,Qi(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 Ki(e){return e.comparer}function Qi(e){return e.tree}function es(e){return Ri(Qi(e))}function ns(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 ts(e,n,t){const r=n(e,t);if(1===r.tag){const e=r.fields[0];return new vo(1,function(e,n){const t=2===n.tag?ns(n.fields[0],n.fields[1],!0):1===n.tag?ns(n.fields[0],n.fields[1],!1)+"\nReason: "+n.fields[2]:3===n.tag?ns(n.fields[0],n.fields[1],!0):4===n.tag?ns(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"+ot("\n\n",n.fields[0]):6===n.tag?"The following `failure` occurred with the decoder: "+n.fields[0]:ns(n.fields[0],n.fields[1],!1);return 7===n.tag?t:"Error at: `"+e+"`\n"+t}(e[0],e[1]))}return new vo(0,r.fields[0])}function rs(e,n){try{return ts("$",e,JSON.parse(n))}catch(e){if(e instanceof SyntaxError)return new vo(1,"Given an invalid JSON: "+e.message);throw e}}const os=e=>n=>{let t,r,o;const i="a sbyte",s=e,u=n;return"number"==typeof u?(t=u,isFinite(t)&&Math.floor(t)===t?-128<=t&&t<=127?new vo(0,(t+128&255)-128):(f=[s,new bo(1,i,t,"Value was either too large or too small for a sbyte")],new vo(1,f)):(a=[s,new bo(1,i,t,"Value is not an integral value")],new vo(1,a))):"string"==typeof u?(o=0,r=[Uo(u,511,!1,8,new Sn((()=>o),(e=>{o=0|e}))),o],r[0]?new vo(0,r[1]):(c=[s,new bo(0,i,u)],new vo(1,c))):(l=[s,new bo(0,i,u)],new vo(1,l));var l,c,a,f},is=e=>n=>{let t,r,o;const i="a byte",s=e,u=n;return"number"==typeof u?(t=u,isFinite(t)&&Math.floor(t)===t?0<=t&&t<=255?new vo(0,255&t):(f=[s,new bo(1,i,t,"Value was either too large or too small for a byte")],new vo(1,f)):(a=[s,new bo(1,i,t,"Value is not an integral value")],new vo(1,a))):"string"==typeof u?(o=0,r=[Uo(u,511,!0,8,new Sn((()=>o),(e=>{o=e}))),o],r[0]?new vo(0,r[1]):(c=[s,new bo(0,i,u)],new vo(1,c))):(l=[s,new bo(0,i,u)],new vo(1,l));var l,c,a,f},ss=e=>n=>{let t,r,o;const i="an int16",s=e,u=n;return"number"==typeof u?(t=u,isFinite(t)&&Math.floor(t)===t?-32768<=t&&t<=32767?new vo(0,(t+32768&65535)-32768):(f=[s,new bo(1,i,t,"Value was either too large or too small for "+i)],new vo(1,f)):(a=[s,new bo(1,i,t,"Value is not an integral value")],new vo(1,a))):"string"==typeof u?(o=0,r=[Uo(u,511,!1,16,new Sn((()=>o),(e=>{o=0|e}))),o],r[0]?new vo(0,r[1]):(c=[s,new bo(0,i,u)],new vo(1,c))):(l=[s,new bo(0,i,u)],new vo(1,l));var l,c,a,f},us=e=>n=>{let t,r,o;const i="an uint16",s=e,u=n;return"number"==typeof u?(t=u,isFinite(t)&&Math.floor(t)===t?0<=t&&t<=65535?new vo(0,65535&t):(f=[s,new bo(1,i,t,"Value was either too large or too small for "+i)],new vo(1,f)):(a=[s,new bo(1,i,t,"Value is not an integral value")],new vo(1,a))):"string"==typeof u?(o=0,r=[Uo(u,511,!0,16,new Sn((()=>o),(e=>{o=e}))),o],r[0]?new vo(0,r[1]):(c=[s,new bo(0,i,u)],new vo(1,c))):(l=[s,new bo(0,i,u)],new vo(1,l));var l,c,a,f},ls=e=>n=>{let t,r,o;const i="an int",s=e,u=n;return"number"==typeof u?(t=u,isFinite(t)&&Math.floor(t)===t?-2147483648<=t&&t<=2147483647?new vo(0,~~t):(f=[s,new bo(1,i,t,"Value was either too large or too small for an int")],new vo(1,f)):(a=[s,new bo(1,i,t,"Value is not an integral value")],new vo(1,a))):"string"==typeof u?(o=0,r=[Uo(u,511,!1,32,new Sn((()=>o),(e=>{o=0|e}))),o],r[0]?new vo(0,r[1]):(c=[s,new bo(0,i,u)],new vo(1,c))):(l=[s,new bo(0,i,u)],new vo(1,l));var l,c,a,f},cs=e=>n=>{let t,r,o;const i="an uint32",s=e,u=n;return"number"==typeof u?(t=u,isFinite(t)&&Math.floor(t)===t?0<=t&&t<=4294967295?new vo(0,t>>>0):(f=[s,new bo(1,i,t,"Value was either too large or too small for "+i)],new vo(1,f)):(a=[s,new bo(1,i,t,"Value is not an integral value")],new vo(1,a))):"string"==typeof u?(o=0,r=[Uo(u,511,!0,32,new Sn((()=>o),(e=>{o=e}))),o],r[0]?new vo(0,r[1]):(c=[s,new bo(0,i,u)],new vo(1,c))):(l=[s,new bo(0,i,u)],new vo(1,l));var l,c,a,f};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 vo(1,[i,new bo(5,"a longer array. Need index `"+en(e)+"` but there are only `"+(o=t.length,en(o)+"` entries"),r)])}return new vo(1,[i,new bo(0,"an array",r)])}function fs(e,n,t){if(Array.isArray(t)){let r=-1;return Co(Tt,ft(((t,o)=>{if(r=r+1|0,0===t.tag){const i=e(n+".["+en(r)+"]",o);return 0===i.tag?new vo(0,bt(i.fields[0],t.fields[0])):new vo(1,i.fields[0])}return t}),new vo(0,Ct()),t))}return new vo(1,[n,new bo(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 vo(0,i)):new vo(1,s.fields[0])}return t}),new vo(0,ct(new Array(o.length),0,o.length,null)),o)}return new vo(1,[n,new bo(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 vo(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(gn(3,(e=>{let t;const r=n;return t=e=>n=>as(1,r,e,n),n=>r=>hs(((n,t,r)=>new vo(0,[e,n])),gn(2,t),n,r)})),gn(2,t),e,r)}function ps(e){return Fr(e)}function ws(e){return function(e,n){return new Xi(e,n)}(n={Compare:mn},Yi(n,e));var n}function _s(e,n,t,r){let o,i;return n.length!==r.length?new vo(1,[t,new bo(6,(o=0|r.length,i=0|n.length,et(Kn("Expected %i %s but got %i"))(i)(e)(o)))]):ht(((e,n,r)=>0===r.tag?Co((e=>bt(e,r.fields[0])),n(t)(e)):r),r,n,new vo(0,Ct()))}function gs(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;return 0===i.length?new vo(0,yo(t,[])):Co((e=>yo(t,At(e))),_s("union fields",at((t=>vs(e,n,!1,t[1])),go(t)),o,i))}return new vo(1,[o,new bo(6,"Cannot find case "+r+" in "+to(t))])}function ys(e,n,t,r){const o=new Sn(null),i=Lr(to(r),o,e);let s;if(wo(r)){const e=at((e=>[Ao(n,no(e)),vs(i,n,!1,e[1])]),ho(r));s=n=>t=>Co((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 vo(1,[n,new bo(0,"an object",t)]):function(e,n,t){return n.reduceRight(((n,t)=>e(t,n)),t)}(gn(2,(e=>{const r=e[0];return o=>0===o.tag?Co((e=>bt(e,o.fields[0])),e[1](n+"."+r)(t[r])):o})),e,new vo(0,Ct()))}(e,n,t))}else if(po(r))s=e=>t=>{if("string"==typeof t)return gs(i,n,r,t,e,[]);if(Array.isArray(t)){const o=t;return gs(i,n,r,o[0],e,o.slice(1,o.length))}return new vo(1,[e,new bo(0,"a string or array",t)])};else{if(!t){let e;const n=to(r);throw e=et(Kn("Cannot generate auto decoder for %s. Please pass an extra decoder."))(n),new Error(e)}s=e=>n=>new vo(1,[e,new bo(2,"an extra coder for "+to(r),n)])}return o.contents=s,s}function vs(e,n,t,r){let o,i,s;const u=to(r),l=jr(u,e);if(null==l){if(ro(r)){const t=vs(e,n,!1,oo(r));return e=>n=>ds(gn(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 vo(1,s.fields[0]);{const e=s.fields[0];return Kt(e,co(t),{Equals:(e,n)=>e===n,GetHashCode:rn})?new vo(0,ao(t,e.toString())):new vo(1,[o,new bo(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 vo(1,s.fields[0]);{const e=s.fields[0];return Kt(e,co(t),{Equals:(e,n)=>e===n,GetHashCode:rn})?new vo(0,ao(t,e.toString())):new vo(1,[o,new bo(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 vo(1,s.fields[0]);{const e=s.fields[0];return Kt(e,co(t),{Equals:(e,n)=>e===n,GetHashCode:rn})?new vo(0,ao(t,e.toString(u))):new vo(1,[o,new bo(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 vo(1,s.fields[0]);{const e=s.fields[0];return Kt(e,co(t),{Equals:(e,n)=>e===n,GetHashCode:rn})?new vo(0,ao(t,e.toString())):new vo(1,[o,new bo(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 vo(1,s.fields[0]);{const e=s.fields[0];return Kt(e,co(t),{Equals:(e,n)=>e===n,GetHashCode:rn})?new vo(0,ao(t,en(e))):new vo(1,[o,new bo(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 vo(1,s.fields[0]);{const e=s.fields[0];return Kt(e,co(t),{Equals:(e,n)=>e===n,GetHashCode:rn})?new vo(0,ao(t,e.toString())):new vo(1,[o,new bo(1,to(t),i,"Unkown value provided for the enum")])}};{const e=to(r),n=nt(Kn("Cannot generate auto decoder for %s.\nThoth.Json.Net only support the folluwing 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(_o(r)){const t=at((t=>vs(e,n,!1,t)),mo(r));return e=>n=>Array.isArray(n)?Co((e=>At(e)),_s("tuple elements",t,e,n)):new vo(1,[e,new bo(0,"an array",n)])}{const u=to(uo(r));if("Microsoft.FSharp.Core.FSharpOption`1[System.Object]"===u)return o=vs(e,n,!0,Wr(r)[0]),e=>n=>{return t=gn(2,o),r=e,null==(i=n)?new vo(0,void 0):Co(kn,t(r,i));var t,r,i};if("Microsoft.FSharp.Collections.FSharpList`1[System.Object]"===u)return i=vs(e,n,!1,Wr(r)[0]),e=>n=>fs(gn(2,i),e,n);if("Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]"===u){const t=vs(e,n,!1,Wr(r)[0]),o=vs(e,n,!1,Wr(r)[1]);let i;const u=Mt([e=>n=>function(e,n,t,r){return null===r||Object.getPrototypeOf(r||!1)!==Object.prototype?new vo(1,[t,new bo(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 vo(0,bt([s.fields[0],e.fields[0]],o.fields[0])):new vo(1,e.fields[0])}return new vo(1,s.fields[0])}return o}),new vo(0,Ct()),Object.keys(r))}(gn(2,t),gn(2,o),e,n),(s=ms(gn(2,t),gn(2,o)),e=>n=>fs(gn(2,s),e,n))]);return i=e=>n=>{return t=e,r=n,((e,n)=>{e:for(;;){const o=e,i=n;if(St(o))return new vo(1,[t,new bo(7,i)]);{const s=ts(t,gn(2,Et(o)),r);if(1===s.tag){e=kt(o),n=Dt(i,xt(s.fields[0]));continue e}return new vo(0,s.fields[0])}}})(u,Ct());var t,r},e=>n=>function(e,n,t,r){const o=n(t,r);return 1===o.tag?new vo(1,o.fields[0]):new vo(0,e(o.fields[0]))}(ps,gn(2,i),e,n)}if("Microsoft.FSharp.Collections.FSharpSet`1[System.Object]"===u){const t=vs(e,n,!1,Wr(r)[0]);return e=>n=>{const r=ds(gn(2,t),e,n);return 0===r.tag?new vo(0,ws(r.fields[0])):new vo(1,r.fields[0])}}return ys(e,n,t,r)}}return"System.Boolean"===u?e=>n=>{return t=e,"boolean"==typeof(r=n)?new vo(0,r):new vo(1,[t,new bo(0,"a boolean",r)]);var t,r}:"Microsoft.FSharp.Core.Unit"===u?e=>n=>{return t=e,null==(r=n)?new vo(0,void 0):new vo(1,[t,new bo(0,"null",r)]);var t,r}:"System.String"===u?e=>n=>{return t=e,"string"==typeof(r=n)?new vo(0,r):new vo(1,[t,new bo(0,"a string",r)]);var t,r}:"System.SByte"===u?os:"System.Byte"===u?is:"System.Int16"===u?ss:"System.UInt16"===u?us:"System.Int32"===u?ls:"System.UInt32"===u?cs:"System.Double"===u?e=>n=>{return t=e,"number"==typeof(r=n)?new vo(0,r):new vo(1,[t,new bo(0,"a float",r)]);var t,r}:"System.Single"===u?e=>n=>{return t=e,"number"==typeof(r=n)?new vo(0,r):new vo(1,[t,new bo(0,"a float32",r)]);var t,r}:"System.DateTime"===u?e=>n=>function(e,n){if("string"==typeof n){let r,o=Rn(-621355968e5,0);return r=[Gn(n,new Sn((()=>o),(e=>{o=e}))),o],r[0]?new vo(0,1===(t=r[1]).kind?t:Rn(t.getTime(),1)):new vo(1,[e,new bo(0,"a datetime",n)])}var t;return new vo(1,[e,new bo(0,"a datetime",n)])}(e,n):"System.DateTimeOffset"===u?e=>n=>function(e,n){if("string"==typeof n){let t,r=Fo(-621355968e5,0);return t=[Po(n,new Sn((()=>r),(e=>{r=e}))),r],t[0]?new vo(0,t[1]):new vo(1,[e,new bo(0,"a datetimeoffset",n)])}return new vo(1,[e,new bo(0,"a datetime",n)])}(e,n):"System.TimeSpan"===u?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 vo(0,t[1]):new vo(1,[e,new bo(0,"a timespan",n)])}return new vo(1,[e,new bo(0,"a timespan",n)])}(e,n):"System.Guid"===u?e=>n=>function(e,n){if("string"==typeof n){let t,r="00000000-0000-0000-0000-000000000000";return t=[Oo(n,new Sn((()=>r),(e=>{r=e}))),r],t[0]?new vo(0,t[1]):new vo(1,[e,new bo(0,"a guid",n)])}return new vo(1,[e,new bo(0,"a guid",n)])}(e,n):"System.Object"===u?e=>e=>new vo(0,e):ys(e,n,t,r)}{const e=l;return n=>t=>e.contents(n)(t)}}function Cs(e,n,t){const r=Tn(n,new xo(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 Ft(new bs(0,"SuperSelection.Access"),e,{Equals:an,GetHashCode:un})?kn(void 0):void 0}function Es(e){return Ft(new bs(0,"SuperSelection.EditPanel"),e,{Equals:an,GetHashCode:un})?kn(void 0):void 0}class ks extends xn{constructor(e,n){super(),this.UserName=e,this.Roles=n}}function As(e){let n;const t=st(null==e?"":e,["."],null,0);if(dt(((e,n)=>e===n),t,null)||3!==t.length)n=new vo(1,"Failed to identify the user");else{let e;const o=t[1];e=atob(o),n=rs(gn(2,Cs(Yr(["Name",eo],["Roles",(r=eo,new zr("[]",[r]))]),new xo(1),void 0)),e)}var r;if(1===n.tag)return new ks(void 0,Ct());{const e=n.fields[0];return new ks(e.Name,Ut(xs,Mt(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"]}}function Ds(e){return e.fields[0]}const Us=je,Fs=(e,n)=>{re((()=>{const n=e();return()=>{n.Dispose()}}),n)};function Ps(e,n,t,r){const o=Us.memo(e,gn(2,Tn(function(e,n){return null==n||1===n.length?n:_n in n?n[_n]:yn([],e,n)}(2,t),null)));return er((n=>{e.displayName=n}),In(n)),e=>{const n=function(e,n){if(null==e)return n;{const t=e;return n.key=t(n),n}}(r,e);return Us.createElement(o,n)}}function Rs(e){return{Dispose(){e()}}}function $s(e){return Us.useState(e)}function Gs(e){var n;n=e,re((()=>{const e=n();return()=>{e.Dispose()}}))}function Ls(e,n){Fs(e,n)}function Hs(e){!function(e,n){Fs((n=>(e(),Rs((()=>{})))),[])}(e)}function js(e){return Us.useRef(e)}function Bs(e,n){const t=Tn(n,[]);return Us.useMemo(e,t)}function Vs(e){const n=js(e),t=function(e,t){const r=Tn([],[]);return Us.useCallback((e=>n.current(e)),r)}();var r,o;return r=()=>{n.current=e},o=e=>(r(),Rs((()=>{}))),oe((()=>{const e=o();return()=>{e.Dispose()}})),t}class zs{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)}}}}class Ws extends Error{constructor(){super("The operation was canceled"),Object.setPrototypeOf(this,Ws.prototype)}}class qs{constructor(){this.callCount=0}static get maxTrampolineCallCount(){return 2e3}incrementAndCheck(){return this.callCount++>qs.maxTrampolineCallCount}hijack(e){this.callCount=0,setTimeout(e,0)}}function Zs(e){return n=>{if(n.cancelToken.isCancelled)n.onCancel(new Ws);else if(n.trampoline.incrementAndCheck())n.trampoline.hijack((()=>{try{e(n)}catch(e){n.onError(e)}}));else try{e(n)}catch(e){n.onError(e)}}}const Js=new class{Bind(e,n){return function(e,n){return Zs((t=>{e({onSuccess:e=>{try{n(e)(t)}catch(e){t.onError(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 Zs((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 Zs((n=>n.onSuccess(e)))}(e)}ReturnFrom(e){return e}TryFinally(e,n){return Zs((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 Zs((t=>{e({onSuccess:t.onSuccess,onCancel:t.onCancel,cancelToken:t.cancelToken,trampoline:t.trampoline,onError:e=>{try{n(e)(t)}catch(e){t.onError(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 Zs((e=>e.onSuccess(void 0)))}};function Ys(e){}const Xs=new zs;function Ks(e,n){return function(e,n){return function(e,n,t,r,o){"function"!=typeof n&&(o=n,n=void 0);const i=new qs;e({onSuccess:n||Ys,onError:t||Ys,onCancel:r||Ys,cancelToken:o||Xs,trampoline:i})}(e,n)}(e,n)}class Qs extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["HasNotStartedYet","InProgress","Resolved","Failed"]}}function eu(e,n){const t=js(function(e){const n=new zs(!1);return n}());return Ls((()=>Rs((()=>{t.current.cancel()}))),[]),Vs((r=>{var o;null!=(o=t.current)&&o.isCancelled||Ks(Js.Delay((()=>Js.TryWith(Js.Delay((()=>(n(new Qs(1)),Js.Bind(e(r),(e=>(n(new Qs(2,e)),Js.Zero())))))),(e=>(n(new Qs(3,e)),Js.Zero()))))),t.current)}))}new class{constructor(){}};function nu(e,n){const t=function(e,n){return new vo(0,n)}(0,n);return Js.Return(t)}function tu(e,n){return Js.Delay(n)}new class{constructor(){}};class ru extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"]}}class ou extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Header"]}}class iu extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Empty","Text","Binary","Form"]}}class su 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 uu extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Text","Blob","ArrayBuffer","Unknown"]}}class lu extends xn{constructor(e,n,t,r,o){super(),this.statusCode=0|e,this.responseText=n,this.responseType=t,this.responseHeaders=r,this.content=o}}const cu=new su("",new ru(0),Ct(),!1,void 0,void 0,void 0,new iu(0));function au(e,n){return"string"!=typeof(t=n)||0===t.length?[n]:st(n,[e],null,0);var t}function fu(e){return new su(e,cu.method,cu.headers,cu.withCredentials,cu.overridenMimeType,cu.overridenResponseType,cu.timeout,cu.content)}function du(e,n){return new su(n.url,e,n.headers,n.withCredentials,n.overridenMimeType,n.overridenResponseType,n.timeout,n.content)}function hu(e,n){return new su(n.url,n.method,n.headers,n.withCredentials,n.overridenMimeType,n.overridenResponseType,n.timeout,e)}function mu(e){return function(e){return Zs((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;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 uu(0,t.responseText):new uu("arraybuffer"===u?2:"blob"===u?1:3,t.response),new lu(o,e,i,function(e){const n=Pt();return Ur(n,Ar(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=An(o);r.push(e)}}return r}((e=>{const n=Mt(au(":",e));return St(n)?void 0:[Et(n).toLocaleLowerCase(),ot(":",kt(n)).trim()]}),au("\r\n",t.getAllResponseHeaders()))),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.method,e.content];0===u[0].tag?t.send(kn(void 0)):1===u[1].tag||3===u[1].tag||2===u[1].tag?t.send(kn(u[1].fields[0])):t.send(kn(void 0))}))}new lu(0,"","",Vr(),new uu(0,""));class pu extends xn{constructor(e,n,t){super(),this.PartnerId=e,this.AccountId=n,this.Funds=t}}class wu extends xn{constructor(e,n){super(),this.PartnerFunds=e,this.AccountFunds=n}}class _u extends xn{constructor(e){super(),this.DefaultFundUSI=e}}class gu extends xn{constructor(e,n){super(),this.Partner=e,this.Account=n}}class yu extends xn{constructor(e,n){super(),this.PartnerId=e,this.Name=n}}class vu extends xn{constructor(e,n){super(),this.AccountId=e,this.Name=n}}function Cu(e){return e}function bu(e){return Array.from(e)}function xu(e){return Pn(e,"O")}function Su(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 Si(e/864e5)}(e)),o=Math.abs(function(e){return Si(e%864e5/36e5)}(e)),i=Math.abs(function(e){return Si(e%36e5/6e4)}(e)),s=Math.abs(function(e){return Si(e%6e4/1e3)}(e)),u=Math.abs(function(e){return Si(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 Eu(){return null}function ku(e){return Pn(e,"O")}function Au(e,n){return JSON.stringify(n,gn(2,null),kn(e))}function Iu(e,n,t,r){const o=new Sn(null),i=Lr(to(r),o,e);let s;if(wo(r)){const e=at((e=>{const r=Ao(n,no(e)),o=Tu(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));s=n=>Qt(((e,t)=>t(n)(e)),{},e)}else{if(!po(r)){let e;const n=to(r);throw e=et(Kn("Cannot generate auto encoder for %s. Please pass an extra encoder."))(n),new Error(e)}s=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=go(s),o=ct(new Array(e+1),0,e+1,null);o[0]=no(s);for(let s=1;s<=e;s++){const e=Tu(i,n,t,r[s-1][1]);o[s]=e(u[s-1])}return o}}}return o.contents=s,s}function Tu(e,n,t,r){const o=to(r),i=jr(o,e);if(null==i){if(ro(r)){const o=Tu(e,n,t,oo(r));return e=>bu(nr(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 nt(Kn("Cannot generate auto encoder for %s.\nThoth.Json.Net only support the folluwing 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 encoder.\n "))(e)}}if(io(r)){if(_o(r)){const o=at((r=>Tu(e,n,t,r)),mo(r));return e=>bu(tr(((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=Tu(e,n,t,Wr(r)[0]),e=>Nn(On(o,e),(()=>null));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){const o=Tu(e,n,t,Wr(r)[0]);return e=>bu(nr(o,e))}if("Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]"===o){const o=Wr(r)[0],i=Tu(e,n,t,Wr(r)[1]);if("System.String"===to(o)||"System.Guid"===to(o))return e=>Qt(((e,n)=>{const t=n;return e[t[0]]=i(t[1]),e}),{},e);{let r;const s=Tu(e,n,t,o);return r=s,e=>bu(nr((e=>{const n=e;return[r(n[0]),i(n[1])]}),e))}}return Iu(e,n,t,r)}}return"System.Boolean"===o?e=>e:"Microsoft.FSharp.Core.Unit"===o?Eu:"System.String"===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?ku:"System.DateTimeOffset"===o?xu:"System.TimeSpan"===o?Su:"System.Guid"===o?Cu:"System.Object"===o?e=>e:Iu(e,n,t,r)}{const e=i;return n=>e.contents(n)}}function Nu(e,n,t,r){const o=Tn(n,new xo(0)),i=Tn(r,!0);return Tu(function(e){return null!=e?Br(((e,n)=>new Sn(n[0])),e.Coders):Vr()}(t),o,i,e)}function Ou(e){return`${e}/super-selection/admin`}function Mu(e,n){return tu(0,(()=>{const t=(r=function(e){return new ou(0,"Authorization",e)}(et(Kn("Bearer %s"))(e)),new su((o=n).url,o.method,Dt(o.headers,xt(r)),o.withCredentials,o.overridenMimeType,o.overridenResponseType,o.timeout,o.content));var r,o;const i=(e=>{return n=e,Js.Bind(n,(e=>(e=>{return n=e,Js.Return(n);var n})(new vo(0,e))));var n})(mu(t));return Js.Delay((()=>Js.Bind(i,(e=>{let n;const r=e;return 1===r.tag?Js.Return(new vo(1,r.fields[0])):Js.ReturnFrom((n=r.fields[0],429===n.statusCode||n.statusCode>=500?(o=mu(t),Js.Bind(o,(e=>{return n=new vo(0,e),t=n,Js.Return(t);var n,t}))):nu(0,n)));var o}))))}))}function Du(e,n){return tu(0,(()=>{let t;const r=Mu(n,du(new ru(0),fu((t=Ou(e),`${t}/promoted-funds`))));return Js.Delay((()=>Js.Bind(r,(e=>{let n,t;const r=e;return 1===r.tag?Js.Return(new vo(1,r.fields[0])):Js.ReturnFrom((n=r.fields[0],t=0|n.statusCode,200===t?(s=rs(gn(2,Cs(Kr(Jr("SuperSelection.AdminUI.Dto.PromotedFundOverride",[],pu,(()=>[["PartnerId",eo],["AccountId",Xr(eo)],["Funds",Kr(eo)]]))),new xo(1),void 0)),n.responseText),Js.Return(s)):401===t?(i=new vo(1,"You do not have the appropriate permissions to view this information"),Js.Return(i)):(o=new vo(1,"Unexpected response from backend"),Js.Return(o))));var o,i,s}))))}))}function Uu(e,n,t,r){return tu(0,(()=>{let o;const i=Mu(n,du(new ru(0),fu((null==r?e=>`${e}/promoted-funds/${t}`:(o=r,e=>`${e}/promoted-funds/${t}/${o}`))(Ou(e)))));return Js.Delay((()=>Js.Bind(i,(e=>{let n;const t=e;return 1===t.tag?Js.Return(new vo(1,t.fields[0])):Js.ReturnFrom((n=t.fields[0],200===n.statusCode?(o=rs(gn(2,Cs(Jr("SuperSelection.AdminUI.Dto.PromotedFunds",[],wu,(()=>[["PartnerFunds",Kr(eo)],["AccountFunds",Kr(eo)]])),new xo(1),void 0)),n.responseText),Js.Return(o)):(r=new vo(1,"Unexpected response from backend"),Js.Return(r))));var r,o}))))}))}function Fu(e,n,t,r){return tu(0,(()=>{let o;const i=Mu(n,du(new ru(4),fu((null==r?e=>`${e}/promoted-funds/${t}`:(o=r,e=>`${e}/promoted-funds/${t}/${o}`))(Ou(e)))));return Js.Delay((()=>Js.Bind(i,(e=>{let n;const t=e;return 1===t.tag?Js.Return(new vo(1,t.fields[0])):Js.ReturnFrom((n=t.fields[0],200===n.statusCode?(o=new vo(0,void 0),Js.Return(o)):(r=new vo(1,n.responseText),Js.Return(r))));var r,o}))))}))}function Pu(e,n,t){Nt((t=>{try{t(n)}catch(n){e(n)}}),t)}function Ru(){return Ct()}function $u(e){return xt(e)}class Gu extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["ColumnHeader"]}}function Lu(e){return e.fields[0]}class Hu extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["RowCell"]}}function ju(e){return new Hu(0,e)}function Bu(e){return e.fields[0]}function Vu(e){return n=d("th",wn(Mt([["className","px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"],["scope","col"],["children",e]]))),new Gu(0,n);var n}function zu(e,n){let t;return ju(d("td",wn(Mt([["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",Us.Children.toArray(Array.from(t))])]))))}function Wu(e,n){return ju(d("td",{className:ot(" ",Xt(e,["px-6","py-4","whitespace-nowrap","text-sm"])),children:n}))}const qu=(()=>{try{if("undefined"!=typeof window&&"function"==typeof window.addEventListener){const e={passive:!0};window.addEventListener("testPassiveEventSupport",(e=>{}),e),window.removeEventListener("testPassiveEventSupport",(e=>{}))}}catch(e){}return!1})();function Zu(e){return On((e=>e.passive&&!qu?{capture:e.capture,once:e.once,passive:!1}:e),e)}function Ju(e){return Mn((e=>e.capture?{capture:!0}:void 0),e)}function Yu(e,n){return 0===n.indexOf(e)?n:void 0}function Xu(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 Ku(e,n){return function(e){return 1===e?e=>{let n,t,r,o,i,s;return n=Yu("/",e),null!=n?(t=n,"#"+t):(r=Yu("#/",e),null!=r?(o=r,o):(i=Yu("#",e),null!=i?(s=i,"#/"+ut(s,1,s.length-1)):"#/"+e))}:e=>{let n,t;return n=Yu("/",e),null!=n?(t=n,t):"/"+e}}(n)(ot("/",Ut((e=>e.indexOf("?")>=0||0===e.indexOf("#")||0===e.indexOf("/")?e:encodeURIComponent(e)),e)))}Ps((e=>{const n=Vs((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=wt();let i=o,s=n;for(;!gt(s);){let n=e(yt(s));for(;!gt(n);)t=i,r=new mt(yt(n),void 0),t.tail=r,i=r,n=vt(n);s=vt(s)}const u=i,l=wt();return u.tail=l,vt(o)}((e=>{if("string"!=typeof(n=e)||/^\s*$/.test(n))return Ct();{const n=function(e,...n){return 0===n.length?e.trimEnd():e.replace(new RegExp("["+qn(n.join(""))+"]+$"),"")}(e,"#");if("?"===n)return Ct();if(null!=Yu("?",n))return xt(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 Ct();if(""===e[1]){const n=e[0];return xt(decodeURIComponent(n))}{const n=e[0],t=e[1];return Mt([decodeURIComponent(n),"?"+t])}}{const n=e[0];return xt(decodeURIComponent(n))}}}var n}),Mt(st(null!=Yu("#",r)?ut(r,1,r.length-1):1!==o||null==Xu("#",r)&&null==Xu("#/",r)?r:"",["/"],null,0)))))}(Tn(e.hashMode,1),t)}));if(window.navigator.userAgent.indexOf("Trident")>=0||window.navigator.userAgent.indexOf("MSIE")>=0){const e="hashchange",t=n,r=void 0,o=Bs((()=>Zu(r)),[r]),i=Bs((()=>Ju(r)),[r]),s=Bs((()=>t),[t]);Gs(Vs((()=>{if(null==o)window.addEventListener(e,s);else{const n=o;window.addEventListener(e,s,n)}return Rs((()=>{if(null==i)window.removeEventListener(e,s);else{const n=i;window.removeEventListener(e,s,n)}}))})))}else{const e="popstate",t=n,r=void 0,o=Bs((()=>Zu(r)),[r]),i=Bs((()=>Ju(r)),[r]),s=Bs((()=>t),[t]);Gs(Vs((()=>{if(null==o)window.addEventListener(e,s);else{const n=o;window.addEventListener(e,s,n)}return Rs((()=>{if(null==i)window.removeEventListener(e,s);else{const n=i;window.removeEventListener(e,s,n)}}))})))}const t="CUSTOM_NAVIGATION_EVENT",r=n,o=void 0,i=Bs((()=>Zu(o)),[o]),s=Bs((()=>Ju(o)),[o]),u=Bs((()=>r),[r]);Gs(Vs((()=>{if(null==i)window.addEventListener(t,u);else{const e=i;window.addEventListener(t,u,e)}return Rs((()=>{if(null==s)window.removeEventListener(t,u);else{const e=s;window.removeEventListener(t,u,e)}}))})));const l=e.application;return null==l?null:l}),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 el(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 nl=_e((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"}))})),tl=_e((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 rl extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Pencil","Trash"]}}class ol extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["ClassName"]}}function il(e,n){if(1===e.tag){const e=el(n,1);return d(nl,e)}{const e=el(n,1);return d(tl,e)}}class sl extends xn{constructor(e,n){super(),this.Text=e,this.Action=n}}class ul extends xn{constructor(e,n){super(),this.Text=e,this.Action=n}}class ll extends xn{constructor(e,n){super(),this.Text=e,this.Action=n}}function cl(e,n,t){let r;return d("button",wn(Mt([["className",ot(" ",["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=[il(e,xt(new ol(0,"mr-3 flex-shrink-0 h-4 w-6")))],["children",Us.Children.toArray(Array.from(r))])])))}const al=e=>cl(new rl(0),"indigo",e),fl=e=>cl(new rl(1),"red",e);function dl(e,n){return d("button",{className:ot(" ",["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 hl(e){return d("button",{className:ot(" ",["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 ml(e){return["strokeLinecap",e]}function pl(e){return["strokeLinejoin",e]}const wl=d("div",wn(Mt([["className",ot(" ",["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(Mt([["className",ot(" ",["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=xt(d("path",wn(Mt([ml("round"),pl("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",Us.Children.toArray(Array.from(e))])])))];return["children",Us.Children.toArray(Array.from(n))]})()]))),_l=d("div",wn(Mt([["className",ot(" ",["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(Mt([["className",ot(" ",["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=xt(d("path",wn(Mt([ml("round"),pl("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",Us.Children.toArray(Array.from(e))])])))];return["children",Us.Children.toArray(Array.from(n))]})()])));function gl(e,n){let t;return d("div",wn(Mt([["className",ot(" ",["bg-gray-50","px-4","py-3","sm:px-6","sm:flex","sm:flex-row-reverse"])],(t=[dl("red",e),hl(n)],["children",Us.Children.toArray(Array.from(t))])])))}function yl(e){let n;return d("div",wn(Mt([["className","mt-2"],(n=[d("p",{className:ot(" ",["text-sm","text-gray-500"]),children:e})],["children",Us.Children.toArray(Array.from(n))])])))}function vl(e,n,t,r){let o,i,s,u;return d("div",wn(Mt([["className",ot(" ",["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(Mt([["className",ot(" ",["bg-white","px-4","pt-5","pb-4","sm:p-6","sm:pb-4"])],(i=[d("div",wn(Mt([["className",ot(" ",["sm:flex","sm:items-start"])],(s=[wl,d("div",wn(Mt([["className",ot(" ",["mt-3","text-center","sm:mt-0","sm:ml-4","sm:text-left"])],(u=[(l=e,d("h3",{className:ot(" ",["text-lg","leading-6","font-medium","text-gray-900"]),id:"modal-title",children:l})),yl(n)],["children",Us.Children.toArray(Array.from(u))])])))],["children",Us.Children.toArray(Array.from(s))])])))],["children",Us.Children.toArray(Array.from(i))])]))),gl(t,r)],["children",Us.Children.toArray(Array.from(o))])])));var l}function Cl(e){let n,t,r;return d("div",wn(Mt([["className",ot(" ",["relative","z-10"])],["role",ot(" ",["dialog"])],(n=[d("div",{className:ot(" ",["fixed","inset-0","bg-gray-500","bg-opacity-75","transition-opacity"])}),d("div",wn(Mt([["className",ot(" ",["fixed","z-10","inset-0","overflow-y-auto"])],(t=[d("div",wn(Mt([["className",ot(" ",["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:ot(" ",["hidden","sm:inline-block","sm:align-middle","sm:h-screen"]),children:"​"}),vl(e.HeadingText,e.BodyText,e.ConfirmAction,e.CancelAction)],["children",Us.Children.toArray(Array.from(r))])])))],["children",Us.Children.toArray(Array.from(t))])])))],["children",Us.Children.toArray(Array.from(n))])])))}function bl(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 jt((()=>{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 xl extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Writable","ReadWritable"]}}class Sl{constructor(e){this.state=new xl(0,ct(new Array(pn(dn,e,10)),0,pn(dn,e,10),null),0)}}function El(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 xl(0,o,t):new xl(1,o,t,i),kn(o[r])}}class kl 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 Al(e,n){const t=n.init(e),r=t[0],o=new Sl(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 xl(1,(r=s,o=u,Array.from(Wt((()=>Xt(rr(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")}}),We)),Wt((()=>{return n=e=>Zt(null),e=o.length,t=bl(0,1,e,0,((e,n)=>e+n)),Wt((()=>qt(nr(n,t))));var e,n,t})));var e,n}))))))),u.length,0):new xl(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 xl(1,o,i,r)}var r,o}(o,e);else{i=!0;let t=kn(e);for(;null!=t;){const e=An(t);try{const t=n.update(e,s),r=t[0];n.setState(r,u),Pu((t=>{n.onError([et(Kn("Error in command while handling: %A"))(e),t])}),u,t[1]),s=r}catch(t){n.onError([et(Kn("Unable to process the message: %A"))(e),t])}t=El(o)}i=!1}}]);n.setState(r,u),Pu((e=>{n.onError(["Error intitializing:",e])}),u,function(e){const n=wt();let t=n;const r=e=>{t=It(((e,n)=>{const t=new mt(n,void 0);return e.tail=t,t}),t,e)};if(Be(e))e.forEach(r);else if(e instanceof mt)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=wt();return o.tail=i,vt(n)}(Mt([(()=>{try{return n.subscribe(r)}catch(e){return n.onError(["Unable to subscribe:",e]),Ru()}})(),t[1]])))}class Il{constructor(){this.hasDisposedOnce=!1,this.state=void 0,this.listener=void 0,this.dispatcher=void 0}}function Tl(){return new Il}function Nl(e,n,t,r){Al(n,function(e,n){return new kl(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 An(o);throw new Error("Elmish program has not initialized")}function Ol(e,n){return function(e,n,t){const r=$s(Tl)[0],o=$s((()=>Nl(e,n,r))),i=o[1];return Ls((()=>(function(e){return e.hasDisposedOnce}(r)&&i(Nl(e,n,r)),Rs((()=>{!function(e){const n=e.state;if(null!=n){const e=An(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 Ml(e,n,t){return Ol((()=>function(e,n,t){return new kl(e,n,(e=>Ru()),t,((e,n)=>{t(e,n)}),(e=>{var n,t;n=e[0],t=e[1],console.error(kn(n),t)}),gn(2,(e=>e)))}(e,n,((e,n)=>{}))),t)}function Dl(){const e=xt(d("span",{children:["Please wait..."]}));return d("div",{children:Us.Children.toArray(Array.from(e))})}function Ul(e){const n=xt(d("span",{children:[e.error]}));return d("div",{children:Us.Children.toArray(Array.from(n))})}class Fl extends xn{constructor(e,n){super(),this.PartnerId=e,this.AccountId=n}}class Pl extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["LoadData","LoadDetail","ShowResetModal","CloseModal","ResetPromotedFunds","Reload"]}}class Rl extends xn{constructor(e,n,t,r){super(),this.PromotedFundOverrides=e,this.FundLookup=n,this.User=t,this.ModalState=r}}class $l extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["ShowModal","Hidden"]}}function Gl(e,n,t){if(null==n);else{const r=n;Ks(function(e,n,t,r){const o=[n,t];return Js.Delay((()=>{const n=On(Ds,o[1]);return Js.Bind((t=e.backendUrl,i=e.accessToken,s=o[0].fields[0],u=n,tu(0,(()=>{let e;const n=Mu(i,du(new ru(0),fu((null==u?e=>`${e}/account-registry/${s}`:(e=u,n=>`${n}/account-registry/${s}/${e}`))(Ou(t)))));return Js.Delay((()=>Js.Bind(n,(e=>{let n;const t=e;return 1===t.tag?Js.Return(new vo(1,t.fields[0])):Js.ReturnFrom((n=t.fields[0],200===n.statusCode?(o=rs(gn(2,Cs(Jr("SuperSelection.AdminUI.Dto.PromotedFundDetail",[],gu,(()=>[["Partner",Jr("SuperSelection.AdminUI.Dto.PartnerDetail",[],yu,(()=>[["PartnerId",eo],["Name",eo]]))],["Account",Xr(Jr("SuperSelection.AdminUI.Dto.AccountDetail",[],vu,(()=>[["AccountId",eo],["Name",eo]])))]])),new xo(1),void 0)),n.responseText),Js.Return(o)):(r=new vo(1,"Unexpected response from backend"),Js.Return(r))));var r,o}))))}))),(e=>(r(new Pl(1,o,new Qs(2,e))),Js.Zero())));var t,i,s,u}))}(e,r[0],r[1],t))}}function Ll(e){const n=(t=(e,n)=>an(n,new Qs(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=An(n);return[Hr(t,(e=>On((e=>new Qs(1)),e)),e),kn(t)]}}function Hl(e){return[[new Os(0,e.PartnerId),On((e=>new Ms(0,e)),e.AccountId)],new Qs(0)]}function jl(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=Ll(Fr(Ut(Hl,t)));return[new Rl(new Qs(2,new vo(0,t)),r[0],n.User,n.ModalState),$u((n=>{Gl(e,r[1],n)}))]}(e,t,o);case 1:return[new Rl(i,t.FundLookup,t.User,t.ModalState),Ru()];case 2:return function(e,n,t,r,o){const i=Ll(Hr([t,r],(e=>null!=e?o:void 0),n.FundLookup));return[new Rl(n.PromotedFundOverrides,i[0],n.User,n.ModalState),$u((n=>{Gl(e,i[1],n)}))]}(e,t,u[0],u[1],s);case 3:return[new Rl(t.PromotedFundOverrides,t.FundLookup,t.User,new $l(0,l)),Ru()];case 4:return[new Rl(t.PromotedFundOverrides,t.FundLookup,t.User,new $l(1)),Ru()];case 5:return[new Rl(new Qs(1),t.FundLookup,t.User,new $l(1)),$u((n=>{!function(e,n,t,r){Ks(function(e,n,t,r){return Js.Delay((()=>Js.Bind(Fu(e.backendUrl,e.accessToken,n,t),(e=>(r(new Pl(5)),Js.Zero())))))}(e,n,t,r))}(e,c.PartnerId,c.AccountId,n)}))];case 6:return[new Rl(new Qs(1),t.FundLookup,t.User,t.ModalState),$u((n=>{!function(e,n){Ks(function(e,n){return Js.Delay((()=>Js.Bind(Du(e.backendUrl,e.accessToken),(e=>(n(new Pl(0,new Qs(2,e))),Js.Zero())))))}(e,n))}(e,n)}))]}}const Bl=Mt([Vu("Partner"),Vu("Account"),Vu("Promoted Funds"),Vu("")]);function Vl(e){return Ku(Mt(["account-registry","partners",e,"super-configuration"]),1)}function zl(e,n){return Ku(Mt(["account-registry","partners",e,"accounts",n,"super-configuration"]),1)}function Wl(e){let n;const t=Ml((()=>{return n=e.accessToken,[new Rl(new Qs(0),Vr(),As(n),new $l(1)),Ru()];var n}),((n,t)=>jl(e,n,t))),r=t[0],o=t[1];if(Hs(eu((()=>function(e){return Du(e.backendUrl,e.accessToken)}(e)),(e=>{o(new Pl(0,e))}))),null==Ss(r.User.Roles))return d(Ul,{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(Dl,null);case 1:return d(Ul,{error:i});case 2:return d(Ul,{error:Cn(s)});case 3:return d("div",wn(xt((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(Mt([["className","flex flex-col mt-4"],(t=[d("div",wn(Mt([["className","-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"],(r=[d("div",wn(Mt([["className","py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8"],(o=[d("div",wn(Mt([["className","shadow overflow-hidden border-b border-gray-200 sm:rounded-lg"],(i=[d("table",wn(Mt([["className","min-w-full divide-y divide-gray-200"],(s=[d("thead",{className:"bg-gray-50",children:(u=nr(Lu,e),d("tr",{children:Us.Children.toArray(Array.from(u))}))}),(l=tr(((e,n)=>(n=>{let t;return d("tr",wn(Mt([["className",e%2==0?"bg-white":"bg-gray-50"],(t=nr(Bu,n),["children",Us.Children.toArray(Array.from(t))])])))})(n)),n),d("tbody",{children:Us.Children.toArray(Array.from(l))}))],["children",Us.Children.toArray(Array.from(s))])])))],["children",Us.Children.toArray(Array.from(i))])])))],["children",Us.Children.toArray(Array.from(o))])])))],["children",Us.Children.toArray(Array.from(r))])])))],["children",Us.Children.toArray(Array.from(t))])])))}(Bl,Ut((e=>function(e,n,t){return Jt(Wt((()=>{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=(s=t.PartnerId,Tn(On((e=>e.Partner.Name),o),s));var s;const u=(l=t.AccountId,Nn(Mn((e=>On((e=>e.Name),e.Account)),o),(()=>l)));var l;return Xt(Zt((r=[Vl(t.PartnerId),i],zu(r[0],r[1]))),Wt((()=>{let e,r,o,i;return Xt((e=[t.AccountId,u],null!=e[0]&&null!=e[1]?(r=e[0],o=e[1],Zt((i=[zl(t.PartnerId,r),o],zu(i[0],i[1])))):Zt(Wu(["text-gray-500"],"-"))),Wt((()=>Xt(Zt(Wu(["text-gray-500"],ot(", ",t.Funds))),Wt((()=>{return Zt((e=fl((e=>{n(new Pl(2,new Fl(t.PartnerId,t.AccountId)))})),ju(d("td",{className:ot(" ",["flex justify-center py-2"]),children:Us.Children.toArray([e])}))));var e}))))))})))})))}(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(Cl,{BodyText:`Are you sure you want to reset the current promoted funds for ${t}? This action cannot be undone.`,CancelAction:new ul("Cancel",(e=>{n(new Pl(3))})),ConfirmAction:new sl("Reset",(t=>{n(new Pl(4,e))})),HeadingText:"Reset Promoted Funds"})}(e.fields[0],o)):Zt(null)})))))))))))),["children",Us.Children.toArray(Array.from(n))]))))}}}class ql 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 Jl extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["DefaultUsi","PromotedFunds"]}}class Yl 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 Xl extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Default","Inherited","Config"]}}function Kl(e){switch(e.tag){case 1:return e.fields[0]+" (inherited)";case 2:return e.fields[0];default:return e.fields[0]+" (default)"}}function Ql(e){switch(e.tag){case 1:default:return"";case 2:return e.fields[0]}}class ec extends xn{constructor(e,n,t,r){super(),this.UpdatePromotedFunds=e,this.DeletePromotedFunds=n,this.UpdateDefaultFundUsi=t,this.ReloadData=r}}function nc(e,n,t){let r,o;return d("div",wn(Mt([["className","mt-2 w-full h-full"],(r=[d("div",wn(Mt([["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",Us.Children.toArray(Array.from(o))])])))],["children",Us.Children.toArray(Array.from(r))])])))}function tc(e,n){let t;return d("div",wn(Mt([["className",ot(" ",["bg-gray-50","px-4","py-3","sm:px-6","sm:flex","sm:flex-row-reverse"])],(t=[dl("indigo",e),hl(n)],["children",Us.Children.toArray(Array.from(t))])])))}function rc(e){let n,t,r,o,i,s,u;const l=(c=e.FieldValue,Us.useState(c));var c;const a=l[0],f=function(e,n){return new sl(e.Text,vn(1,e.Action,[n]))}(e.ConfirmAction,a);return d("div",wn(Mt([["className",ot(" ",["relative","z-10"])],["role",ot(" ",["dialog"])],(n=[d("div",{className:ot(" ",["fixed","inset-0","bg-gray-500","bg-opacity-75","transition-opacity"])}),d("div",wn(Mt([["className",ot(" ",["fixed","z-10","inset-0","overflow-y-auto"])],(t=[d("div",wn(Mt([["className",ot(" ",["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:ot(" ",["hidden","sm:inline-block","sm:align-middle","sm:h-screen"]),children:"​"}),d("div",wn(Mt([["className",ot(" ",["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(Mt([["className",ot(" ",["bg-white","px-4","pt-5","pb-4","sm:p-6","sm:pb-4"])],(i=[d("div",wn(Mt([["className",ot(" ",["sm:flex","sm:items-start"])],(s=[_l,d("div",wn(Mt([["className",ot(" ",["mt-3","text-center","sm:mt-0","sm:ml-4","sm:text-left","w-full"])],(u=[(h=e.HeadingText,d("h3",{className:ot(" ",["text-lg","leading-6","font-medium","text-gray-900"]),id:"modal-title",children:h})),nc(l[1],e.FieldName,a)],["children",Us.Children.toArray(Array.from(u))])])))],["children",Us.Children.toArray(Array.from(s))])])))],["children",Us.Children.toArray(Array.from(i))])]))),tc(f,e.CancelAction)],["children",Us.Children.toArray(Array.from(o))])])))],["children",Us.Children.toArray(Array.from(r))])])))],["children",Us.Children.toArray(Array.from(t))])])))],["children",Us.Children.toArray(Array.from(n))])])));var h}function oc(e,n){return d(rc,{CancelAction:new ul("Cancel",(e=>{n(new Yl(3))})),ConfirmAction:new ll("Save",((e,t)=>{n(new Yl(5,e))})),FieldName:"Promoted Funds",FieldValue:e,HeadingText:"Edit Promoted Funds"})}function ic(e){return d(Cl,{BodyText:"Are you sure you want to reset the current promoted funds? This action cannot be undone.",CancelAction:new ul("Cancel",(n=>{e(new Yl(3))})),ConfirmAction:new sl("Reset",(n=>{e(new Yl(7))})),HeadingText:"Reset Promoted Funds"})}function sc(e,n,t,r){return tu(0,(()=>{const o=Uu(e,n,t,r);return Js.Delay((()=>Js.Bind(o,(t=>{const o=t;return 1===o.tag?Js.Return(new vo(1,o.fields[0])):Js.ReturnFrom((i=function(e,n,t){return tu(0,(()=>{let r;const o=Mu(n,du(new ru(0),fu((r=Ou(e),`${r}/configurations/${t}`))));return Js.Delay((()=>Js.Bind(o,(e=>{let n,t;const r=e;return 1===r.tag?Js.Return(new vo(1,r.fields[0])):Js.ReturnFrom((n=r.fields[0],t=0|n.statusCode,200===t?(i=rs(gn(2,Cs(Jr("SuperSelection.AdminUI.Dto.AccountConfiguration",[],_u,(()=>[["DefaultFundUSI",Xr(eo)]])),new xo(1),void 0)),n.responseText),Js.Return(i)):404===t?nu(0,new _u(void 0)):(o=new vo(1,"Unexpected response from backend"),Js.Return(o))));var o,i}))))}))}(e,n,r),Js.Bind(i,(e=>(e=>{return n=e,Js.Return(n);var n})(Co((e=>new Ns(0,new Is(o.fields[0],e))),e))))));var i}))))}))}function uc(e,n,t){return tu(0,(()=>{return r=Uu(e,n,t,void 0),Js.Bind(r,(e=>(e=>{return n=e,Js.Return(n);var n})(Co((e=>new Ns(1,new Ts(e))),e))));var r}))}function lc(e){return new ec(((n,t)=>function(e,n,t){return Js.Delay((()=>Js.Bind(function(e,n,t,r,o){return tu(0,(()=>{let i;const s=(null==r?e=>`${e}/promoted-funds/${t}`:(i=r,e=>`${e}/promoted-funds/${t}/${i}`))(Ou(e)),u=Mu(n,du(new ru(1),hu(new iu(1,Au(0,Nu(Yr(["Funds",Kr(eo)]),new xo(1),void 0,void 0)(o))),fu(s))));return Js.Delay((()=>Js.Bind(u,(e=>{let n;const t=e;return 1===t.tag?Js.Return(new vo(1,t.fields[0])):Js.ReturnFrom((n=t.fields[0],200===n.statusCode?(o=new vo(0,void 0),Js.Return(o)):(r=new vo(1,n.responseText),Js.Return(r))));var r,o}))))}))}(e.backendUrl,e.accessToken,e.partnerId,e.accountId,n),(e=>(t(new Yl(8,e)),Js.Zero())))))}(e,n,t)),(n=>function(e,n){return Js.Delay((()=>Js.Bind(Fu(e.backendUrl,e.accessToken,e.partnerId,e.accountId),(e=>(n(new Yl(8,e)),Js.Zero())))))}(e,n)),((n,t)=>function(e,n,t){return Js.Delay((()=>{const r={DefaultFundUsi:n},o=e.accountId;if(null==o)return Js.Zero();{const n=o;return Js.Bind(function(e,n,t,r){return tu(0,(()=>{let o;const i=Mu(n,du(new ru(2),hu(new iu(1,Au(0,Nu(Yr(["DefaultFundUsi",eo]),new xo(1),void 0,void 0)(r))),fu((o=Ou(e),`${o}/configurations/${t}`)))));return Js.Delay((()=>Js.Bind(i,(e=>{const n=e;return 1===n.tag?Js.Return(new vo(1,n.fields[0])):Js.ReturnFrom(200===n.fields[0].statusCode?(r=new vo(0,void 0),Js.Return(r)):(t=new vo(1,"Unexpected response from backend"),Js.Return(t)));var t,r}))))}))}(e.backendUrl,e.accessToken,n,r),(e=>(t(new Yl(8,e)),Js.Zero())))}}))}(e,n,t)),(n=>function(e,n){return Js.Delay((()=>{let t;return Js.Bind((t=e.accountId,null==t?uc(e.backendUrl,e.accessToken,e.partnerId):sc(e.backendUrl,e.accessToken,e.partnerId,t)),(e=>(n(new Yl(0,new Qs(2,e))),Js.Zero())))}))}(e,n)))}function cc(e,n,t,r){let o,i,s;const u=Mt(In(On(al,t))),l=Mt(In(On(fl,r)));return d("div",wn(Mt([["className",ot(" ",["px-4","py-5","sm:grid","sm:grid-cols-5","sm:gap-4","sm:px-6"])],(o=[d("dt",{className:ot(" ",["text-sm","font-medium","text-gray-500"]),children:e}),d("dd",wn(Mt([["className",ot(" ",["mt-1","text-sm","text-gray-900","sm:mt-0","sm:col-span-2"])],(i=[d("span",{className:"flex-grow",children:n})],["children",Us.Children.toArray(Array.from(i))])]))),d("span",wn(Mt([["className","flex-grow"],(s=Jt(Wt((()=>Xt(u,Wt((()=>l)))))),["children",Us.Children.toArray(Array.from(s))])])))],["children",Us.Children.toArray(Array.from(o))])])))}function ac(e,n,t){return cc("Default USI",n,null!=(r=e,Ft(new bs(0,"SuperSelection.ChangeDefaultFund"),r,{Equals:an,GetHashCode:un})?kn(void 0):void 0)?e=>{t(new Yl(1,new Jl(0)))}:void 0,void 0);var r}function fc(e,n,t){return cc("Promoted Funds",n,null!=Es(e)?e=>{t(new Yl(1,new Jl(1)))}:void 0,null!=Es(e)?e=>{t(new Yl(2,new Jl(1)))}:void 0)}function dc(e){let n,t;const r=Ml((()=>{return n=e.accessToken,[new ql(new Qs(0),As(n),new Zl(2)),Ru()];var n}),gn(2,(n=lc(e),e=>t=>function(e,n,t){switch(n.tag){case 1:return[new ql(t.Data,t.User,new Zl(1,n.fields[0])),Ru()];case 2:return[new ql(t.Data,t.User,new Zl(0,n.fields[0])),Ru()];case 3:case 6:return[new ql(t.Data,t.User,new Zl(2)),Ru()];case 4:return[new ql(t.Data,t.User,new Zl(2)),$u((t=>{Ks(e.UpdateDefaultFundUsi(n.fields[0],t))}))];case 5:{const r=Mt(at((e=>e.trim()),st(n.fields[0],[","],null,0)));return[new ql(t.Data,t.User,new Zl(2)),$u((n=>{Ks(e.UpdatePromotedFunds({Funds:r},n))}))]}case 7:return[new ql(t.Data,t.User,new Zl(2)),$u((n=>{Ks(e.DeletePromotedFunds(n))}))];case 8:return[new ql(new Qs(1),t.User,t.ModalState),$u((n=>{Ks(e.ReloadData(n))}))];default:return[new ql(n.fields[0],t.User,t.ModalState),Ru()]}}(n,e,t)))),o=r[0],i=r[1];Hs(eu((()=>function(e){const n=e.accountId;return null==n?uc(e.backendUrl,e.accessToken,e.partnerId):sc(e.backendUrl,e.accessToken,e.partnerId,n)}(e)),(e=>{i(new Yl(0,e))})));const s=o.User.Roles;if(null==Ss(s))return d(Ul,{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(Dl,null);case 1:if(1===r.tag){const e=Jt(Wt((()=>{let e;const n=function(e){const n=e.PartnerFunds;return St(n)?new Xl(0,"australian-retirement-trust, slate"):new Xl(2,ot(", ",n))}(r.fields[0].PromotedFunds);return Zt(d("div",wn(xt((e=Jt(Wt((()=>{let e,t;return Xt(Zt(d("div",wn(xt((e=[(t=xt(fc(s,Kl(n),i)),d("dl",{children:Us.Children.toArray(Array.from(t))}))],["children",Us.Children.toArray(Array.from(e))]))))),Wt((()=>{const e=o.ModalState;switch(e.tag){case 1:return 1===e.fields[0].tag?Zt(oc(Ql(n),i)):Zt(null);case 2:return Zt(null);default:return 1===e.fields[0].tag?Zt(ic(i)):Zt(null)}})))}))),["children",Us.Children.toArray(Array.from(e))])))))})));return d("div",{children:Us.Children.toArray(Array.from(e))})}{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(St(n[0])?St(n[1])?t=0:(t=2,r=n[1]):St(n[1])?t=1:(t=2,r=n[1]),t){case 0:return new Xl(0,"australian-retirement-trust, slate");case 1:return new Xl(1,ot(", ",n[0]));case 2:return new Xl(2,ot(", ",r))}}(e.PromotedFunds);return d("div",wn(xt((t=Jt(Wt((()=>{let e,t;return Xt(Zt(d("div",wn(xt((e=[(t=Mt([ac(s,n,i),fc(s,Kl(l),i)]),d("dl",{children:Us.Children.toArray(Array.from(t))}))],["children",Us.Children.toArray(Array.from(e))]))))),Wt((()=>{const e=o.ModalState;switch(e.tag){case 1:return 1===e.fields[0].tag?Zt(oc(Ql(l),i)):Zt(function(e,n){return d(rc,{CancelAction:new ul("Cancel",(e=>{n(new Yl(3))})),ConfirmAction:new ll("Save",((e,t)=>{n(new Yl(4,e))})),FieldName:"Default USI",FieldValue:e,HeadingText:"Edit Default USI"})}(u,i));case 2:return Zt(null);default:return 1===e.fields[0].tag?Zt(ic(i)):Zt(function(e){return d(Cl,{BodyText:"Are you sure you want to reset the current Default USI? This action cannot be undone.",CancelAction:new ul("Cancel",(n=>{e(new Yl(3))})),ConfirmAction:new sl("Reset",(n=>{e(new Yl(6))})),HeadingText:"Reset Default USI"})}(i))}})))}))),["children",Us.Children.toArray(Array.from(t))]))))}case 2:return d(Ul,{error:u});case 3:return d(Ul,{error:Cn(l)})}}}V((e=>d(Wl,e)),"superhero-super-selection"),V((e=>d(dc,e)),"superhero-super-configuration")})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flarehr/superhero-super-selection",
3
- "version": "3.48.59061",
3
+ "version": "3.51.59881",
4
4
  "description": "Flare Superhero Super Selection Component",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "files": [