@flarehr/superhero-account-registry 2.13.30 → 2.14.31
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";function e(e){return Array.isArray(e)||ArrayBuffer.isView(e)}function n(e){return"function"==typeof e.GetHashCode}function t(e){return null!=e&&"function"==typeof e.Dispose}function r(e){t(e)&&e.Dispose()}function o(e,n){var t,r;return(null===(t=Object.getPrototypeOf(e))||void 0===t?void 0:t.constructor)===(null===(r=Object.getPrototypeOf(n))||void 0===r?void 0:r.constructor)}class i{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 s(e){return"function"==typeof e.GetEnumerator?e.GetEnumerator():new i(e[Symbol.iterator]())}function u(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}}}}function c(e,n){let t=e.toString(10);for(;t.length<n;)t="0"+t;return t}function a(e){const n=e;return"number"==typeof n.offset?n.offset:1===e.kind?0:-6e4*e.getTimezoneOffset()}function l(e,n){return(e=e<0&&null!=n&&10!==n?4294967295+e+1:e).toString(n)}class f{static id(e){return f.idMap.has(e)||f.idMap.set(e,++f.count),f.idMap.get(e)}}function d(e){let n=0,t=5381;const r=e.length;for(;n<r;)t=33*t^e.charCodeAt(n++);return t}function h(e){return 2654435761*e|0}function p(e){return 0===e.length?0:e.reduce(((e,n)=>(e<<5)+e^n))}function m(t){var r;if(null==t)return 0;switch(typeof t){case"boolean":return t?1:0;case"number":return h(t);case"string":return d(t);default:if(n(t))return t.GetHashCode();if(e(t))return function(e){const n=e.length,t=new Array(n);for(let r=0;r<n;r++)t[r]=m(e[r]);return p(t)}(t);if(t instanceof Date)return function(e){return e.getTime()}(t);if((null===(r=Object.getPrototypeOf(t))||void 0===r?void 0:r.constructor)===Object){const e=Object.values(t).map((e=>m(e)));return p(e)}return h(f.id(t))}}function g(e){return null==e?0:n(e)?e.GetHashCode():h(f.id(e))}function w(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 _(e,n){return w(e,n,y)}function y(n,t){var r;return n===t||(null==n?null==t:null!=t&&"object"==typeof n&&(function(e){return"function"==typeof e.Equals}(n)?n.Equals(t):e(n)?e(t)&&_(n,t):n instanceof Date?t instanceof Date&&0===v(n,t):(null===(r=Object.getPrototypeOf(n))||void 0===r?void 0:r.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]||!y(e[t[o]],n[r[o]]))return!1;return!0}(n,t)))}function v(e,n){let t,r;return"offset"in e&&"offset"in n?(t=e.getTime(),r=n.getTime()):(t=e.getTime()+a(e),r=n.getTime()+a(n)),t===r?0:t<r?-1:1}function b(e,n){return e===n?0:e<n?-1:1}function C(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,x)}function x(n,t){var r;return n===t?0:null==n?null==t?0:-1:null==t?1:"object"!=typeof n?n<t?-1:1:function(e){return"function"==typeof e.CompareTo}(n)?n.CompareTo(t):e(n)?e(t)?C(n,t):-1:n instanceof Date?t instanceof Date?v(n,t):-1:(null===(r=Object.getPrototypeOf(n))||void 0===r?void 0:r.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=x(e[s],n[s]),0!==i)return i}return 0}(n,t):-1}function S(e,n,t){return e(n,t)>0?n:t}function E(e){const n={};for(const t of e)n[t[0]]=t[1];return n}f.idMap=new WeakMap,f.count=0;const k=Symbol("curried");function I(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[k]=n,t}function A(e,n,t){return r=>1===n?t(...e.concat([r])):A(e.concat([r]),n-1,t)}function N(e,n){return null==n||1===n.length?n:k in n?n[k]:A([],e,n)}function T(e,n=0){var t,r;if(null!=e&&"object"==typeof e){if("function"==typeof e.toString)return e.toString();if(Symbol.iterator in e)return function(e){let n=0,t="[";for(const r of e){if(0===n)t+=T(r);else{if(100===n){t+="; ...";break}t+="; "+T(r)}n++}return t+"]"}(e);{const o=null===(t=Object.getPrototypeOf(e))||void 0===t?void 0:t.constructor;return o===Object&&n<10?"{ "+Object.entries(e).map((([e,t])=>e+" = "+T(t,n+1))).join("\n ")+" }":null!==(r=null==o?void 0:o.name)&&void 0!==r?r:""}}return String(e)}class D{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=T(n[0]),r=t.indexOf(" ")>=0):t=n.map((e=>T(e))).join(", "),e+(r?" (":" ")+t+(r?")":"")}}(this.name,this.fields)}GetHashCode(){const e=this.fields.map((e=>m(e)));return e.splice(0,0,h(this.tag)),p(e)}Equals(e){return this===e||!!o(this,e)&&this.tag===e.tag&&_(this.fields,e.fields)}CompareTo(e){return this===e?0:o(this,e)?this.tag===e.tag?C(this.fields,e.fields):this.tag<e.tag?-1:1:-1}}class P{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+" = "+T(n))).join("\n ")+" }";var e}GetHashCode(){return function(e){const n=Object.values(e).map((e=>m(e)));return p(n)}(this)}Equals(e){return function(e,n){if(e===n)return!0;if(o(e,n)){const t=Object.keys(e);for(let r=0;r<t.length;r++)if(!y(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(o(e,n)){const t=Object.keys(e);for(let r=0;r<t.length;r++){const o=x(e[t[r]],n[t[r]]);if(0!==o)return o}return 0}return-1}(this,e)}}class O{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 M{constructor(e){this.message=e}}function U(e){return function(e){return e instanceof M||e instanceof Error}(e)?e:new Error(String(e))}class B extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Name"]}}function L(e){return new B(0,e)}function F(e){return e.fields[0]}class G extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Website"]}}class R extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["FirstName"]}}class H extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["LastName"]}}class j extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Email"]}}class $ extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["MobilePhone"]}}class W extends P{constructor(e,n,t,r){super(),this.FirstName=e,this.LastName=n,this.Email=t,this.MobilePhone=r}}class z extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Notes"]}}class V extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["PartnerId"]}}function q(e){return e.fields[0]}function Z(e){return new V(0,e)}function J(e){return q(e)}class K extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["AccountId"]}}function Y(e){return e.fields[0]}function X(e){return new K(0,e)}class Q{constructor(e){this.value=e}toJSON(){return this.value}toString(){return String(this.value)}GetHashCode(){return m(this.value)}Equals(e){return null!=e&&y(this.value,e instanceof Q?e.value:e)}CompareTo(e){return null==e?1:x(this.value,e instanceof Q?e.value:e)}}function ee(e){return null==e||e instanceof Q?new Q(e):e}function ne(e){if(null==e)throw new Error("Option has no value");return e instanceof Q?e.value:e}function te(e){return null==e?[]:[ne(e)]}function re(e,n){return null!=e?ne(e):n}function oe(e,n){return null!=n?ee(e(ne(n))):void 0}function ie(){return e=x,{Compare:(n,t)=>e(n,t)};var e}function se(e,n){return"function"==typeof e?new e(n):new Array(n)}function ue(e,n,t,r){const o=0|n;return e.fill(r,o,o+t)}function ce(e,n,t){const r=0|n.length,o=se(t,r);for(let t=0;t<=r-1;t++)o[t]=e(n[t]);return o}function ae(e,n,t){return t.reduce(e,n)}function le(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 fe(e){const n=e<0,t=(e=Math.abs(e))%36e5/6e4;return(n?"-":"+")+c(~~(e/36e5),2)+":"+c(t,2)}function de(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 he(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 pe(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," ")+fe(null!==(r=e.offset)&&void 0!==r?r:0);if(1!==n.length)return he(i,n,!0);switch(n){case"D":case"d":return de(i,"first");case"T":case"t":return de(i,"second");case"O":case"o":return function(e,n){const t=e.toISOString();return t.substring(0,t.length-1)+fe(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 he(e,n,t);switch(n){case"D":case"d":return t?de(e,"first"):e.toLocaleDateString();case"T":case"t":return t?de(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 c(e.getFullYear(),4)+"-"+c(e.getMonth()+1,2)+"-"+c(e.getDate(),2)+"T"+c(e.getHours(),2)+":"+c(e.getMinutes(),2)+":"+c(e.getSeconds(),2)+"."+c(e.getMilliseconds(),3)+(n?fe(-6e4*e.getTimezoneOffset()):"")}}(e,t);default:throw new Error("Unrecognized Date print format")}}(e,n)}function me(e,n){const t=new Date(e);return t.kind=0|(null==n?0:n),t}function ge(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 we(e,n){try{return n.contents=function(e,n=!1){const[t,r]=ge(e),o=null!=r?n&&"Z"===r?1:2:0;return me(t.getTime(),o)}(e),!0}catch(e){return!1}}const _e=Symbol("numeric");function ye(e){return"number"==typeof e||(null==e?void 0:e[_e])}function ve(e,n){return"number"==typeof e?e*n:e[_e]().multiply(n)}function be(e,n){return"number"==typeof e?e.toFixed(n):e[_e]().toFixed(n)}function Ce(e,n){return"number"==typeof e?e.toPrecision(n):e[_e]().toPrecision(n)}function xe(e,n){return"number"==typeof e?e.toExponential(n):e[_e]().toExponential(n)}function Se(e){return"number"==typeof e?(Number(e)>>>0).toString(16):e[_e]().toHex()}function Ee(e,n=0){if(0!=(-284&n))throw new Error("RegexOptions only supports: IgnoreCase, Multiline, Compiled, Singleline and ECMAScript");let t="gu";return t+=1&n?"i":"",t+=2&n?"m":"",t+=16&n?"s":"",new RegExp(e,t)}function ke(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function Ie(e,n,t=0){if(null==n)throw new Error("Input cannot ve null");if(!e.global)throw new Error("Non-global RegExp");e.lastIndex=t;const r=[];let o,i=-1;for(;null!=(o=e.exec(n));)o.index===i?e.lastIndex++:(i=o.index,r.push(o));return r}const Ae=/(^|[^%])%([0+\- ]*)(\*|\d+)?(?:\.(\d+))?(\w)/g,Ne=/(?:(^|[^%])%([0+\- ]*)(\d+)?(?:\.(\d+))?(\w))?%P\(\)/g,Te=/\{(\d+)(,-?\d+)?(?:\:([a-zA-Z])(\d{0,2})|\:(.+?))?\}/g;function De(e,n){return function(e,n){return"number"==typeof e?e<n?-1:e>n?1:0:e.CompareTo(n)}(e,n)<0}function Pe(e){return{input:e,cont:(n=e,e=>{Ae.lastIndex=0;const t=[],r=[];let o=0,i=Ae.exec(n);for(;i;){const e=i.index+(i[1]||"").length;t.push(n.substring(o,e).replace(/%%/g,"%")),r.push(i),o=Ae.lastIndex,Ae.lastIndex-=1,i=Ae.exec(n)}return 0===t.length?e(n.replace(/%%/g,"%")):(t.push(n.substring(o).replace(/%%/g,"%")),Le(e,t,r))})};var n}function Oe(e,n){let t=0,r=0,o="";Ne.lastIndex=0;let i=Ne.exec(e);for(;i;){const s=i.index+(i[1]||"").length;o+=e.substring(r,s).replace(/%%/g,"%");const[,,u,c,a,l]=i;r=Ne.lastIndex,o+=Be(n[t++],u,c,a,l),Ne.lastIndex=r-1,i=Ne.exec(e)}return o+=e.substring(r).replace(/%%/g,"%"),o}function Me(e,n){return"string"==typeof n?e(n):n.cont(e)}function Ue(e){return Me((e=>e),e)}function Be(e,n,t,r,o){let i="";if(n=n||"",o=o||"",ye(e))switch("x"!==o.toLowerCase()&&(De(e,0)?(e=ve(e,-1),i="-"):n.indexOf(" ")>=0?i=" ":n.indexOf("+")>=0&&(i="+")),r=null==r?null:parseInt(r,10),o){case"f":case"F":e=be(e,r=null!=r?r:6);break;case"g":case"G":e=null!=r?Ce(e,r):Ce(e);break;case"e":case"E":e=null!=r?xe(e,r):xe(e);break;case"x":e=Se(e);break;case"X":e=Se(e).toUpperCase();break;default:e=String(e)}else e=e instanceof Date?pe(e):T(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=je(e,t-i.length,s,o)):je(i+e,t,s,o)}return e}function Le(e,n,t,r="",o=-1){return(...i)=>{let s=r;const u=n.slice(),c=t.slice();for(const e of i){const[,,n,t,r,i]=c[0];let a=t;if(o>=0)a=o,o=-1;else if("*"===a){if(e<0)throw new Error("Non-negative number required");o=e;continue}s+=u[0],s+=Be(e,n,a,r,i),u.splice(0,1),c.splice(0,1)}return 0===c.length?(s+=u[0],e(s)):Le(e,u,c,s,o)}}function Fe(e,...n){return"object"==typeof e&&n.length>0&&(e=n[0],n.shift()),e.replace(Te,((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(ye(u))switch(i=null==i?null:parseInt(i,10),o){case"f":case"F":u=be(u,i=null!=i?i:2);break;case"g":case"G":u=null!=i?Ce(u,i):Ce(u);break;case"e":case"E":u=null!=i?xe(u,i):xe(u);break;case"p":case"P":i=null!=i?i:2,u=be(ve(u,100),i)+" %";break;case"d":case"D":u=null!=i?$e(String(u),i,"0"):String(u);break;case"x":case"X":u=null!=i?$e(Se(u),i,"0"):Se(u),"X"===o&&(u=u.toUpperCase());break;default:if(s){let e="";u=s.replace(/([0#,]+)(\.[0#]+)?/,((n,t,r)=>{De(u,0)&&(u=ve(u,-1),e="-"),r=null==r?"":r.substring(1),u=be(u,Math.max(r.length,0));let[o,i]=u.split(".");i||(i=""),o=$e(o,t.replace(/,/g,"").replace(/^#+/,"").length,"0");const s=r.replace(/#+$/,"").length;if(s>i.length?i=function(e,n,t){return je(e,n,"0",!0)}(i,s):s<i.length&&(i=i.substring(0,s)+i.substring(s).replace(/0+$/,"")),t.indexOf(",")>0){const e=o.length%3,n=Math.floor(o.length/3);let t=e>0?o.substr(0,e)+(n>0?",":""):"";for(let r=0;r<n;r++)t+=o.substr(e+3*r,3)+(r<n-1?",":"");o=t}return i.length>0?o+"."+i:o})),u=e+u}}else u=u instanceof Date?pe(u,s||o):T(u);return r=parseInt((r||" ").substring(1),10),isNaN(r)||(u=je(String(u),Math.abs(r)," ",r<0)),u}))}function Ge(e){return"string"!=typeof e||0===e.length}function Re(e){return"string"!=typeof e||/^\s*$/.test(e)}function He(e,n){return Array.isArray(n)?n.join(e):Array.from(n).join(e)}function je(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 $e(e,n,t){return je(e,n,t)}function We(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(ke),n=n.length>0?n:["\\s"];const s=[],u=new RegExp(n.join("|"),"g");let c=!0,a=0;do{const n=u.exec(e);if(null===n){const n=i?e.substring(a).trim():e.substring(a);(!o||n.length>0)&&s.push(n),c=!1}else{const r=i?e.substring(a,n.index).trim():e.substring(a,n.index);(!o||r.length>0)&&(null!=t&&s.length+1===t?(s.push(i?e.substring(a).trim():e.substring(a)),c=!1):s.push(r)),a=u.lastIndex}}while(c);return s}function ze(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)}const Ve="Collection was empty.";class qe extends P{constructor(e,n){super(),this.head=e,this.tail=n}toString(){return"["+He("; ",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(y(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)+m(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|x(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 Ze(this)}[Symbol.iterator](){return u(this.GetEnumerator())}"System.Collections.IEnumerable.GetEnumerator"(){return s(this)}}class Ze{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 Je(){return new qe(null,void 0)}function Ke(e,n){return new qe(e,n)}function Ye(e){return null==e.tail}function Xe(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)}function Qe(e){if(null!=e.tail)return e.head;throw new Error(Ve+"\\nParameter name: list")}function en(e){const n=e.tail;if(null!=n)return n;throw new Error(Ve+"\\nParameter name: list")}function nn(){return Je()}function tn(e,n){return Ke(e,n)}function rn(e){return Ke(e,Je())}function on(e){return Ye(e)}function sn(e){return Xe(e)}function un(e){return Qe(e)}function cn(e){return en(e)}function an(e){const n=0|Xe(e),t=ue(new Array(n),0,n,null);return((e,n)=>{for(;;){const r=e,o=n;if(Ye(o))break;t[r]=Qe(o),e=r+1,n=en(o)}})(0,e),t}function ln(e,n,t){let r=n,o=t;for(;!Ye(o);)r=e(r,Qe(o)),o=en(o);return r}function fn(e){return ln(((e,n)=>Ke(n,e)),Je(),e)}function dn(e,n){ln(((n,t)=>{e(t)}),void 0,n)}function hn(e,n){let t=n;for(let n=e.length-1;n>=0;n--)t=Ke(e[n],t);return t}function pn(e){return hn(e,Je())}function mn(e,n){return ln(((e,n)=>Ke(n,e)),n,fn(e))}function gn(e,n){const t=Je(),r=function(e,n,t){return((n,t,r)=>{for(;;){const o=n,i=t,s=r;if(Ye(s))return i;n=o+1,t=e(o,i,Qe(s)),r=en(s)}})(0,n,t)}(((n,t,r)=>{const o=new qe(e(n,r),void 0);return t.tail=o,o}),t,n),o=Je();return r.tail=o,en(t)}function wn(e,n){const t=Je(),r=ln(((n,t)=>{const r=new qe(e(t),void 0);return n.tail=r,r}),t,n),o=Je();return r.tail=o,en(t)}function _n(e,n){return function(e,n){return(n=>{e:for(;;){const t=n;if(Ye(t))return;{const r=e(Qe(t));if(null==r){n=en(t);continue e}return r}}})(n)}((n=>e(n)?ee(n):void 0),n)}const yn="Enumeration already finished.",vn="Enumeration has not started. Call MoveNext.";function bn(){throw new Error(vn)}function Cn(){throw new Error(yn)}class xn{constructor(e){this.f=e}toString(){let e=0,n="seq [";const t=s(this);try{for(;e<4&&t["System.Collections.IEnumerator.MoveNext"]();)e>0&&(n+="; "),n+=T(t["System.Collections.Generic.IEnumerator`1.get_Current"]()),e=e+1|0;return 4===e&&(n+="; ..."),n+"]"}finally{r(t)}}GetEnumerator(){return this.f()}[Symbol.iterator](){return u(this.GetEnumerator())}"System.Collections.IEnumerable.GetEnumerator"(){return this.f()}}class Sn{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 En(e,n,t){return new Sn(e,n,t)}function kn(e,n,t){let r,o=!1,i=ee(e());const s=()=>{if(null!=i){const e=ne(i);try{t(e)}finally{i=void 0}}},u=()=>{try{s()}finally{r=void 0}};return En((()=>(o||bn(),null!=r?ne(r):Cn())),(()=>{if(o||(o=!0),null!=i){const e=ne(i);let t;try{t=n(e)}catch(e){throw u(),e}return null!=t?(r=t,!0):(u(),!1)}return!1}),s)}function In(e){return function(e){return new xn(e)}(e)}function An(e){return n="source",null==e&&function(e){throw new Error(e)}(n),s(e);var n}function Nn(e){return In((()=>s(e())))}function Tn(e){return In((()=>function(e){let n,t,o,i=!1,u=!1;const c=()=>{if(u=!0,null!=t){const e=t;try{r(e)}finally{t=void 0}}if(null!=n){const e=n;try{r(e)}finally{n=void 0}}};return En((()=>(i?u&&Cn():bn(),null!=o?ne(o):Cn())),(()=>{let a;if(i||(i=!0),u)return!1;{let i;for(;null==i;){const u=[n,t];if(null!=u[0])if(null!=u[1]){const e=u[1];if(e["System.Collections.IEnumerator.MoveNext"]())o=ee(e["System.Collections.Generic.IEnumerator`1.get_Current"]()),i=!0;else try{r(e)}finally{t=void 0}}else{const e=u[0];e["System.Collections.IEnumerator.MoveNext"]()?(a=e["System.Collections.Generic.IEnumerator`1.get_Current"](),t=s(a)):(c(),i=!1)}else n=s(e)}return ne(i)}}),(()=>{u||c()}))}(e)))}function Dn(){return Nn((()=>new Array(0)))}function Pn(e){return Nn((()=>function(e,n){const t=se(void 0,1);return t[0]=e,t}(e)))}function On(e){return e instanceof qe?an(e):Array.from(e)}function Mn(n){return e(n)?pn(n):n instanceof qe?n:function(n){let t,o;if(e(n))return pn(n);if(n instanceof qe)return n;{const e=Je();let i=e;const u=s(n);try{for(;u["System.Collections.IEnumerator.MoveNext"]();){const e=u["System.Collections.Generic.IEnumerator`1.get_Current"]();t=i,o=new qe(e,void 0),t.tail=o,i=o}}finally{r(u)}const c=i,a=Je();return c.tail=a,en(e)}}(n)}function Un(e,n,t){return In((()=>kn(e,n,t)))}function Bn(e,n){return Tn([e,n])}function Ln(e,n){return Un((()=>An(n)),(n=>{let t;for(;null==t&&n["System.Collections.IEnumerator.MoveNext"]();)t=e(n["System.Collections.Generic.IEnumerator`1.get_Current"]());return t}),(e=>{r(e)}))}function Fn(e,n,t){const o=An(n);try{let n=!1;for(;!n&&o["System.Collections.IEnumerator.MoveNext"]();)n=t.Equals(e,o["System.Collections.Generic.IEnumerator`1.get_Current"]());return n}finally{r(o)}}function Gn(e,n,t){const o=An(t);try{let t=n;for(;o["System.Collections.IEnumerator.MoveNext"]();)t=e(t,o["System.Collections.Generic.IEnumerator`1.get_Current"]());return t}finally{r(o)}}function Rn(e,n){Gn(((n,t)=>{e(t)}),void 0,n)}function Hn(e,n){return Un((()=>An(n)),(n=>n["System.Collections.IEnumerator.MoveNext"]()?ee(e(n["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0),(e=>{r(e)}))}function jn(e,n){return t=()=>An(n),o=(n,t)=>t["System.Collections.IEnumerator.MoveNext"]()?ee(e(n,t["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0,i=e=>{r(e)},In((()=>{let e=-1;return kn(t,(n=>(e=e+1|0,o(e,n))),i)}));var t,o,i}class $n{constructor(e,n){this.cleanup=e,this.res=n}Dispose(){this.cleanup()}GetEnumerator(){return getEnumerator(this.res)}[Symbol.iterator](){return toIterator(this.GetEnumerator())}"System.Collections.IEnumerable.GetEnumerator"(){return getEnumerator(this.res)}}function Wn(e){return Nn((()=>function(e){return e.slice().reverse()}(On(e))))}const zn={None:0,LowerFirst:1,SnakeCase:2,SnakeCaseAllCaps:3,KebabCase:4};function Vn(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 qn(e,n=zn.None){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 zn.LowerFirst:return e.charAt(0).toLowerCase()+e.slice(1);case zn.SnakeCase:return Vn(e,"_");case zn.SnakeCaseAllCaps:return Vn(e,"_").toUpperCase();case zn.KebabCase:return Vn(e,"-");case zn.None:default:return e}}(e,n),t[e]=r}for(let n of e){let e=zn.None;if(null==n&&o(n),n instanceof D){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}function Zn(e,n,t){return!!e.has(n)&&(t.contents=e.get(n),!0)}function Jn(e,n){if(e.has(n))return e.get(n);throw new Error(`The given key '${n}' was not present in the dictionary.`)}class Kn{constructor(e,n){const t=new O(null);this.comparer=n,t.contents=this,this.hashMap=new Map([]),this["init@8-1"]=1;const o=s(e);try{for(;o["System.Collections.IEnumerator.MoveNext"]();){const e=o["System.Collections.Generic.IEnumerator`1.get_Current"]();rt(t.contents,e[0],e[1])}}finally{r(o)}}get[Symbol.toStringTag](){return"Dictionary"}toJSON(e){return Array.from(this)}"System.Collections.IEnumerable.GetEnumerator"(){return s(this)}GetEnumerator(){return s(Tn(this.hashMap.values()))}[Symbol.iterator](){return u(this.GetEnumerator())}"System.Collections.Generic.ICollection`1.Add2B595"(e){rt(this,e[0],e[1])}"System.Collections.Generic.ICollection`1.Clear"(){Qn(this)}"System.Collections.Generic.ICollection`1.Contains2B595"(e){const n=Xn(this,e[0]);let t;switch(t=null!=n&&y(n[1],e[1])?0:1,t){case 0:return!0;case 1:return!1}}"System.Collections.Generic.ICollection`1.CopyToZ2E171D71"(e,n){var t;t=(t,r)=>{e[n+t]=r},Gn(((e,n)=>(t(e,n),e+1|0)),0,this)}"System.Collections.Generic.ICollection`1.get_Count"(){return 0|et(this)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!1}"System.Collections.Generic.ICollection`1.Remove2B595"(e){const n=Xn(this,e[0]);return null!=n&&(y(n[1],e[1])&&it(this,e[0]),!0)}"System.Collections.Generic.IDictionary`2.Add5BDDA1"(e,n){rt(this,e,n)}"System.Collections.Generic.IDictionary`2.ContainsKey2B595"(e){return ot(this,e)}"System.Collections.Generic.IDictionary`2.get_Item2B595"(e){return nt(this,e)}"System.Collections.Generic.IDictionary`2.set_Item5BDDA1"(e,n){tt(this,e,n)}"System.Collections.Generic.IDictionary`2.get_Keys"(){const e=this;return On(Nn((()=>Hn((e=>e[0]),e))))}"System.Collections.Generic.IDictionary`2.Remove2B595"(e){return it(this,e)}"System.Collections.Generic.IDictionary`2.TryGetValue23A0B95A"(e,n){const t=Xn(this,e);if(null!=t){const e=t;return n.contents=e[1],!0}return!1}"System.Collections.Generic.IDictionary`2.get_Values"(){const e=this;return On(Nn((()=>Hn((e=>e[1]),e))))}get size(){return 0|et(this)}clear(){Qn(this)}delete(e){return it(this,e)}entries(){return Hn((e=>[e[0],e[1]]),this)}get(e){return nt(this,e)}has(e){return ot(this,e)}keys(){return Hn((e=>e[0]),this)}set(e,n){return tt(this,e,n),this}values(){return Hn((e=>e[1]),this)}forEach(e,n){const t=this;Rn((n=>{e(n[1],n[0],t)}),t)}}function Yn(e,n){const t=0|e.comparer.GetHashCode(n);let r,o=null;return r=[Zn(e.hashMap,t,new O((()=>o),(e=>{o=e}))),o],r[0]?[!0,t,r[1].findIndex((t=>e.comparer.Equals(n,t[0])))]:[!1,t,-1]}function Xn(e,n){const t=Yn(e,n);let r;switch(r=t[0]&&t[2]>-1?0:1,r){case 0:return Jn(e.hashMap,t[1])[t[2]];case 1:return}}function Qn(e){e.hashMap.clear()}function et(e){let n=0,t=s(e.hashMap.values());try{for(;t["System.Collections.IEnumerator.MoveNext"]();)n=n+t["System.Collections.Generic.IEnumerator`1.get_Current"]().length|0}finally{r(t)}return 0|n}function nt(e,n){const t=Xn(e,n);if(null!=t)return t[1];throw new Error("The item was not found in collection")}function tt(e,n,t){const r=Yn(e,n);r[0]?r[2]>-1?Jn(e.hashMap,r[1])[r[2]]=[n,t]:Jn(e.hashMap,r[1]).push([n,t]):e.hashMap.set(r[1],[[n,t]])}function rt(e,n,t){const r=Yn(e,n);if(r[0]){if(r[2]>-1){const e=Fe("An item with the same key has already been added. Key: {0}",n);throw new Error(e)}Jn(e.hashMap,r[1]).push([n,t])}else e.hashMap.set(r[1],[[n,t]])}function ot(e,n){const t=Yn(e,n);let r;switch(r=t[0]&&t[2]>-1?0:1,r){case 0:return!0;case 1:return!1}}function it(e,n){const t=Yn(e,n);let r;switch(r=t[0]&&t[2]>-1?0:1,r){case 0:return Jn(e.hashMap,t[1]).splice(t[2],1),!0;case 1:return!1}}class st extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Ok","Error"]}}function ut(e,n){return 0===n.tag?new st(0,e(n.fields[0])):new st(1,n.fields[0])}class ct extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Choice1Of2","Choice2Of2"]}}var at,lt,ft,dt,ht,pt,mt,gt,wt={},_t=[],yt=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function vt(e,n){for(var t in n)e[t]=n[t];return e}function bt(e){var n=e.parentNode;n&&n.removeChild(e)}function Ct(e,n,t){var r,o,i,s={};for(i in n)"key"==i?r=n[i]:"ref"==i?o=n[i]:s[i]=n[i];if(arguments.length>2&&(s.children=arguments.length>3?at.call(arguments,2):t),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===s[i]&&(s[i]=e.defaultProps[i]);return xt(e,s,r,o,null)}function xt(e,n,t,r,o){var i={type:e,props:n,key:t,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++ft:o};return null==o&&null!=lt.vnode&<.vnode(i),i}function St(e){return e.children}function Et(e,n){this.props=e,this.context=n}function kt(e,n){if(null==n)return e.__?kt(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?kt(e):null}function It(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 It(e)}}function At(e){(!e.__d&&(e.__d=!0)&&dt.push(e)&&!Nt.__r++||ht!==lt.debounceRendering)&&((ht=lt.debounceRendering)||pt)(Nt)}function Nt(){var e,n,t,r,o,i,s,u;for(dt.sort(mt);e=dt.shift();)e.__d&&(n=dt.length,r=void 0,o=void 0,s=(i=(t=e).__v).__e,(u=t.__P)&&(r=[],(o=vt({},i)).__v=i.__v+1,Gt(u,i,o,t.__n,void 0!==u.ownerSVGElement,null!=i.__h?[s]:null,r,null==s?kt(i):s,i.__h),Rt(r,i),i.__e!=s&&It(i)),dt.length>n&&dt.sort(mt));Nt.__r=0}function Tt(e,n,t,r,o,i,s,u,c,a){var l,f,d,h,p,m,g,w=r&&r.__k||_t,_=w.length;for(t.__k=[],l=0;l<n.length;l++)if(null!=(h=t.__k[l]=null==(h=n[l])||"boolean"==typeof h||"function"==typeof h?null:"string"==typeof h||"number"==typeof h||"bigint"==typeof h?xt(null,h,null,null,h):Array.isArray(h)?xt(St,{children:h},null,null,null):h.__b>0?xt(h.type,h.props,h.key,h.ref?h.ref:null,h.__v):h)){if(h.__=t,h.__b=t.__b+1,null===(d=w[l])||d&&h.key==d.key&&h.type===d.type)w[l]=void 0;else for(f=0;f<_;f++){if((d=w[f])&&h.key==d.key&&h.type===d.type){w[f]=void 0;break}d=null}Gt(e,h,d=d||wt,o,i,s,u,c,a),p=h.__e,(f=h.ref)&&d.ref!=f&&(g||(g=[]),d.ref&&g.push(d.ref,null,h),g.push(f,h.__c||p,h)),null!=p?(null==m&&(m=p),"function"==typeof h.type&&h.__k===d.__k?h.__d=c=Dt(h,c,e):c=Ot(e,h,d,w,p,c),"function"==typeof t.type&&(t.__d=c)):c&&d.__e==c&&c.parentNode!=e&&(c=kt(d))}for(t.__e=m,l=_;l--;)null!=w[l]&&("function"==typeof t.type&&null!=w[l].__e&&w[l].__e==t.__d&&(t.__d=Mt(r).nextSibling),$t(w[l],w[l]));if(g)for(l=0;l<g.length;l++)jt(g[l],g[++l],g[++l])}function Dt(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?Dt(r,n,t):Ot(t,r,r,o,r.__e,n));return n}function Pt(e,n){return n=n||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){Pt(e,n)})):n.push(e)),n}function Ot(e,n,t,r,o,i){var s,u,c;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,c=0;(u=u.nextSibling)&&c<r.length;c+=1)if(u==o)break e;e.insertBefore(o,i),s=i}return void 0!==s?s:o.nextSibling}function Mt(e){var n,t,r;if(null==e.type||"string"==typeof e.type)return e.__e;if(e.__k)for(n=e.__k.length-1;n>=0;n--)if((t=e.__k[n])&&(r=Mt(t)))return r;return null}function Ut(e,n,t){"-"===n[0]?e.setProperty(n,null==t?"":t):e[n]=null==t?"":"number"!=typeof t||yt.test(n)?t:t+"px"}function Bt(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||Ut(e.style,n,"");if(t)for(n in t)r&&t[n]===r[n]||Ut(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?Ft:Lt,i):e.removeEventListener(n,i?Ft:Lt,i);else if("dangerouslySetInnerHTML"!==n){if(o)n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==n&&"height"!==n&&"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&&"-"!==n[4]?e.removeAttribute(n):e.setAttribute(n,t))}}function Lt(e){return this.l[e.type+!1](lt.event?lt.event(e):e)}function Ft(e){return this.l[e.type+!0](lt.event?lt.event(e):e)}function Gt(e,n,t,r,o,i,s,u,c){var a,l,f,d,h,p,m,g,w,_,y,v,b,C,x,S=n.type;if(void 0!==n.constructor)return null;null!=t.__h&&(c=t.__h,u=n.__e=t.__e,n.__h=null,i=[u]),(a=lt.__b)&&a(n);try{e:if("function"==typeof S){if(g=n.props,w=(a=S.contextType)&&r[a.__c],_=a?w?w.props.value:a.__:r,t.__c?m=(l=n.__c=t.__c).__=l.__E:("prototype"in S&&S.prototype.render?n.__c=l=new S(g,_):(n.__c=l=new Et(g,_),l.constructor=S,l.render=Wt),w&&w.sub(l),l.props=g,l.state||(l.state={}),l.context=_,l.__n=r,f=l.__d=!0,l.__h=[],l._sb=[]),null==l.__s&&(l.__s=l.state),null!=S.getDerivedStateFromProps&&(l.__s==l.state&&(l.__s=vt({},l.__s)),vt(l.__s,S.getDerivedStateFromProps(g,l.__s))),d=l.props,h=l.state,l.__v=n,f)null==S.getDerivedStateFromProps&&null!=l.componentWillMount&&l.componentWillMount(),null!=l.componentDidMount&&l.__h.push(l.componentDidMount);else{if(null==S.getDerivedStateFromProps&&g!==d&&null!=l.componentWillReceiveProps&&l.componentWillReceiveProps(g,_),!l.__e&&null!=l.shouldComponentUpdate&&!1===l.shouldComponentUpdate(g,l.__s,_)||n.__v===t.__v){for(n.__v!==t.__v&&(l.props=g,l.state=l.__s,l.__d=!1),l.__e=!1,n.__e=t.__e,n.__k=t.__k,n.__k.forEach((function(e){e&&(e.__=n)})),y=0;y<l._sb.length;y++)l.__h.push(l._sb[y]);l._sb=[],l.__h.length&&s.push(l);break e}null!=l.componentWillUpdate&&l.componentWillUpdate(g,l.__s,_),null!=l.componentDidUpdate&&l.__h.push((function(){l.componentDidUpdate(d,h,p)}))}if(l.context=_,l.props=g,l.__P=e,v=lt.__r,b=0,"prototype"in S&&S.prototype.render){for(l.state=l.__s,l.__d=!1,v&&v(n),a=l.render(l.props,l.state,l.context),C=0;C<l._sb.length;C++)l.__h.push(l._sb[C]);l._sb=[]}else do{l.__d=!1,v&&v(n),a=l.render(l.props,l.state,l.context),l.state=l.__s}while(l.__d&&++b<25);l.state=l.__s,null!=l.getChildContext&&(r=vt(vt({},r),l.getChildContext())),f||null==l.getSnapshotBeforeUpdate||(p=l.getSnapshotBeforeUpdate(d,h)),x=null!=a&&a.type===St&&null==a.key?a.props.children:a,Tt(e,Array.isArray(x)?x:[x],n,t,r,o,i,s,u,c),l.base=n.__e,n.__h=null,l.__h.length&&s.push(l),m&&(l.__E=l.__=null),l.__e=!1}else null==i&&n.__v===t.__v?(n.__k=t.__k,n.__e=t.__e):n.__e=Ht(t.__e,n,t,r,o,i,s,c);(a=lt.diffed)&&a(n)}catch(e){n.__v=null,(c||null!=i)&&(n.__e=u,n.__h=!!c,i[i.indexOf(u)]=null),lt.__e(e,n,t)}}function Rt(e,n){lt.__c&<.__c(n,e),e.some((function(n){try{e=n.__h,n.__h=[],e.some((function(e){e.call(n)}))}catch(e){lt.__e(e,n.__v)}}))}function Ht(e,n,t,r,o,i,s,u){var c,a,l,f=t.props,d=n.props,h=n.type,p=0;if("svg"===h&&(o=!0),null!=i)for(;p<i.length;p++)if((c=i[p])&&"setAttribute"in c==!!h&&(h?c.localName===h:3===c.nodeType)){e=c,i[p]=null;break}if(null==e){if(null===h)return document.createTextNode(d);e=o?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,d.is&&d),i=null,u=!1}if(null===h)f===d||u&&e.data===d||(e.data=d);else{if(i=i&&at.call(e.childNodes),a=(f=t.props||wt).dangerouslySetInnerHTML,l=d.dangerouslySetInnerHTML,!u){if(null!=i)for(f={},p=0;p<e.attributes.length;p++)f[e.attributes[p].name]=e.attributes[p].value;(l||a)&&(l&&(a&&l.__html==a.__html||l.__html===e.innerHTML)||(e.innerHTML=l&&l.__html||""))}if(function(e,n,t,r,o){var i;for(i in t)"children"===i||"key"===i||i in n||Bt(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]||Bt(e,i,n[i],t[i],r)}(e,d,f,o,u),l)n.__k=[];else if(p=n.props.children,Tt(e,Array.isArray(p)?p:[p],n,t,r,o&&"foreignObject"!==h,i,s,i?i[0]:t.__k&&kt(t,0),u),null!=i)for(p=i.length;p--;)null!=i[p]&&bt(i[p]);u||("value"in d&&void 0!==(p=d.value)&&(p!==e.value||"progress"===h&&!p||"option"===h&&p!==f.value)&&Bt(e,"value",p,f.value,!1),"checked"in d&&void 0!==(p=d.checked)&&p!==e.checked&&Bt(e,"checked",p,f.checked,!1))}return e}function jt(e,n,t){try{"function"==typeof e?e(n):e.current=n}catch(e){lt.__e(e,t)}}function $t(e,n,t){var r,o;if(lt.unmount&<.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||jt(r,null,n)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){lt.__e(e,n)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&$t(r[o],n,t||"function"!=typeof e.type);t||null==e.__e||bt(e.__e),e.__=e.__e=e.__d=void 0}function Wt(e,n,t){return this.constructor(e,t)}function zt(e,n,t){var r,o,i;lt.__&<.__(e,n),o=(r="function"==typeof t)?null:t&&t.__k||n.__k,i=[],Gt(n,e=(!r&&t||n).__k=Ct(St,null,[e]),o||wt,wt,void 0!==n.ownerSVGElement,!r&&t?[t]:o?null:n.firstChild?at.call(n.childNodes):null,i,!r&&t?t:o?o.__e:n.firstChild,r),Rt(i,e)}function Vt(e,n){zt(e,n,Vt)}function qt(e,n,t){var r,o,i,s=vt({},e.props);for(i in n)"key"==i?r=n[i]:"ref"==i?o=n[i]:s[i]=n[i];return arguments.length>2&&(s.children=arguments.length>3?at.call(arguments,2):t),xt(e.type,s,r||e.key,o||e.ref,null)}function Zt(e,n){var t={__c:n="__cC"+gt++,__: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((function(e){e.__e=!0,At(e)}))},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}at=_t.slice,lt={__e:function(e,n,t,r){for(var o,i,s;n=n.__;)if((o=n.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(n){e=n}throw e}},ft=0,Et.prototype.setState=function(e,n){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=vt({},this.state),"function"==typeof e&&(e=e(vt({},t),this.props)),e&&vt(t,e),null!=e&&this.__v&&(n&&this._sb.push(n),At(this))},Et.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),At(this))},Et.prototype.render=St,dt=[],pt="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,mt=function(e,n){return e.__v.__b-n.__v.__b},Nt.__r=0,gt=0;var Jt,Kt,Yt,Xt,Qt=0,er=[],nr=[],tr=lt.__b,rr=lt.__r,or=lt.diffed,ir=lt.__c,sr=lt.unmount;function ur(e,n){lt.__h&<.__h(Kt,e,Qt||n),Qt=0;var t=Kt.__H||(Kt.__H={__:[],__h:[]});return e>=t.__.length&&t.__.push({__V:nr}),t.__[e]}function cr(e){return Qt=1,ar(Cr,e)}function ar(e,n,t){var r=ur(Jt++,2);if(r.t=e,!r.__c&&(r.__=[t?t(n):Cr(void 0,n),function(e){var n=r.__N?r.__N[0]:r.__[0],t=r.t(n,e);n!==t&&(r.__N=[t,r.__[1]],r.__c.setState({}))}],r.__c=Kt,!Kt.u)){var o=function(e,n,t){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter((function(e){return e.__c}));if(o.every((function(e){return!e.__N})))return!i||i.call(this,e,n,t);var s=!1;return o.forEach((function(e){if(e.__N){var n=e.__[0];e.__=e.__N,e.__N=void 0,n!==e.__[0]&&(s=!0)}})),!(!s&&r.__c.props===e)&&(!i||i.call(this,e,n,t))};Kt.u=!0;var i=Kt.shouldComponentUpdate,s=Kt.componentWillUpdate;Kt.componentWillUpdate=function(e,n,t){if(this.__e){var r=i;i=void 0,o(e,n,t),i=r}s&&s.call(this,e,n,t)},Kt.shouldComponentUpdate=o}return r.__N||r.__}function lr(e,n){var t=ur(Jt++,3);!lt.__s&&br(t.__H,n)&&(t.__=e,t.i=n,Kt.__H.__h.push(t))}function fr(e,n){var t=ur(Jt++,4);!lt.__s&&br(t.__H,n)&&(t.__=e,t.i=n,Kt.__h.push(t))}function dr(e){return Qt=5,hr((function(){return{current:e}}),[])}function hr(e,n){var t=ur(Jt++,7);return br(t.__H,n)?(t.__V=e(),t.i=n,t.__h=e,t.__V):t.__}function pr(e,n){return Qt=8,hr((function(){return e}),n)}function mr(e){var n=Kt.context[e.__c],t=ur(Jt++,9);return t.c=e,n?(null==t.__&&(t.__=!0,n.sub(Kt)),n.props.value):e.__}function gr(){for(var e;e=er.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(yr),e.__H.__h.forEach(vr),e.__H.__h=[]}catch(n){e.__H.__h=[],lt.__e(n,e.__v)}}lt.__b=function(e){Kt=null,tr&&tr(e)},lt.__r=function(e){rr&&rr(e),Jt=0;var n=(Kt=e.__c).__H;n&&(Yt===Kt?(n.__h=[],Kt.__h=[],n.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=nr,e.__N=e.i=void 0}))):(n.__h.forEach(yr),n.__h.forEach(vr),n.__h=[])),Yt=Kt},lt.diffed=function(e){or&&or(e);var n=e.__c;n&&n.__H&&(n.__H.__h.length&&(1!==er.push(n)&&Xt===lt.requestAnimationFrame||((Xt=lt.requestAnimationFrame)||_r)(gr)),n.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==nr&&(e.__=e.__V),e.i=void 0,e.__V=nr}))),Yt=Kt=null},lt.__c=function(e,n){n.some((function(e){try{e.__h.forEach(yr),e.__h=e.__h.filter((function(e){return!e.__||vr(e)}))}catch(t){n.some((function(e){e.__h&&(e.__h=[])})),n=[],lt.__e(t,e.__v)}})),ir&&ir(e,n)},lt.unmount=function(e){sr&&sr(e);var n,t=e.__c;t&&t.__H&&(t.__H.__.forEach((function(e){try{yr(e)}catch(e){n=e}})),t.__H=void 0,n&<.__e(n,t.__v))};var wr="function"==typeof requestAnimationFrame;function _r(e){var n,t=function(){clearTimeout(r),wr&&cancelAnimationFrame(n),setTimeout(e)},r=setTimeout(t,100);wr&&(n=requestAnimationFrame(t))}function yr(e){var n=Kt,t=e.__c;"function"==typeof t&&(e.__c=void 0,t()),Kt=n}function vr(e){var n=Kt;e.__c=e.__(),Kt=n}function br(e,n){return!e||e.length!==n.length||n.some((function(n,t){return n!==e[t]}))}function Cr(e,n){return"function"==typeof n?n(e):n}function xr(e,n){for(var t in n)e[t]=n[t];return e}function Sr(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 Er(e,n){return e===n&&(0!==e||1/e==1/n)||e!=e&&n!=n}function kr(e){this.props=e}(kr.prototype=new Et).isPureReactComponent=!0,kr.prototype.shouldComponentUpdate=function(e,n){return Sr(this.props,e)||Sr(this.state,n)};var Ir=lt.__b;lt.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ir&&Ir(e)};var Ar="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Nr(e){function n(n){var t=xr({},n);return delete t.ref,e(t,n.ref||null)}return n.$$typeof=Ar,n.render=n,n.prototype.isReactComponent=n.__f=!0,n.displayName="ForwardRef("+(e.displayName||e.name)+")",n}var Tr=function(e,n){return null==e?null:Pt(Pt(e).map(n))},Dr={map:Tr,forEach:Tr,count:function(e){return e?Pt(e).length:0},only:function(e){var n=Pt(e);if(1!==n.length)throw"Children.only";return n[0]},toArray:Pt},Pr=lt.__e;lt.__e=function(e,n,t,r){if(e.then)for(var o,i=n;i=i.__;)if((o=i.__c)&&o.__c)return null==n.__e&&(n.__e=t.__e,n.__k=t.__k),o.__c(e,n);Pr(e,n,t,r)};var Or=lt.unmount;function Mr(e,n,t){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=xr({},e)).__c&&(e.__c.__P===t&&(e.__c.__P=n),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Mr(e,n,t)}))),e}function Ur(e,n,t){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Ur(e,n,t)})),e.__c&&e.__c.__P===n&&(e.__e&&t.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=t)),e}function Br(){this.__u=0,this.t=null,this.__b=null}function Lr(e){var n=e.__.__c;return n&&n.__a&&n.__a(e)}function Fr(){this.u=null,this.o=null}lt.unmount=function(e){var n=e.__c;n&&n.__R&&n.__R(),n&&!0===e.__h&&(e.type=null),Or&&Or(e)},(Br.prototype=new Et).__c=function(e,n){var t=n.__c,r=this;null==r.t&&(r.t=[]),r.t.push(t);var o=Lr(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.__a){var e=r.state.__a;r.__v.__k[0]=Ur(e,e.__c.__P,e.__c.__O)}var n;for(r.setState({__a:r.__b=null});n=r.t.pop();)n.forceUpdate()}},c=!0===n.__h;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},Br.prototype.componentWillUnmount=function(){this.t=[]},Br.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]=Mr(this.__b,t,r.__O=r.__P)}this.__b=null}var o=n.__a&&Ct(St,null,e.fallback);return o&&(o.__h=null),[Ct(St,null,n.__a?null:e.children),o]};var Gr=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 Rr(e){return this.getChildContext=function(){return e.context},e.children}function Hr(e){var n=this,t=e.i;n.componentWillUnmount=function(){zt(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)}}),zt(Ct(Rr,{context:n.context},e.__v),n.l)):n.l&&n.componentWillUnmount()}(Fr.prototype=new Et).__a=function(e){var n=this,t=Lr(n.__v),r=n.o.get(e);return r[0]++,function(o){var i=function(){n.props.revealOrder?(r.push(o),Gr(n,e,r)):o()};t?t(i):i()}},Fr.prototype.render=function(e){this.u=null,this.o=new Map;var n=Pt(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},Fr.prototype.componentDidUpdate=Fr.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(n,t){Gr(e,t,n)}))};var jr="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,$r=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Wr=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,zr=/[A-Z0-9]/g,Vr="undefined"!=typeof document,qr=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};Et.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(Et.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(n){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:n})}})}));var Zr=lt.event;function Jr(){}function Kr(){return this.cancelBubble}function Yr(){return this.defaultPrevented}lt.event=function(e){return Zr&&(e=Zr(e)),e.persist=Jr,e.isPropagationStopped=Kr,e.isDefaultPrevented=Yr,e.nativeEvent=e};var Xr,Qr={enumerable:!1,configurable:!0,get:function(){return this.class}},eo=lt.vnode;lt.vnode=function(e){"string"==typeof e.type&&function(e){var n=e.props,t=e.type,r={};for(var o in n){var i=n[o];if(!("value"===o&&"defaultValue"in n&&null==i||Vr&&"children"===o&&"noscript"===t||"class"===o||"className"===o)){var s=o.toLowerCase();"defaultValue"===o&&"value"in n&&null==n.value?o="value":"download"===o&&!0===i?i="":"ondoubleclick"===s?o="ondblclick":"onchange"!==s||"input"!==t&&"textarea"!==t||qr(n.type)?"onfocus"===s?o="onfocusin":"onblur"===s?o="onfocusout":Wr.test(o)?o=s:-1===t.indexOf("-")&&$r.test(o)?o=o.replace(zr,"-$&").toLowerCase():null===i&&(i=void 0):s=o="oninput","oninput"===s&&r[o=s]&&(o="oninputCapture"),r[o]=i}}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=Pt(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=Pt(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),n.class&&!n.className?(r.class=n.class,Object.defineProperty(r,"className",Qr)):(n.className&&!n.class||n.class&&n.className)&&(r.class=r.className=n.className),e.props=r}(e),e.$$typeof=jr,eo&&eo(e)};var no=lt.__r;lt.__r=function(e){no&&no(e),Xr=e.__c};var to=lt.diffed;lt.diffed=function(e){to&&to(e);var n=e.props,t=e.__e;null!=t&&"textarea"===e.type&&"value"in n&&n.value!==t.value&&(t.value=null==n.value?"":n.value),Xr=null};var ro={ReactCurrentDispatcher:{current:{readContext:function(e){return Xr.__n[e.__c].props.value}}}};function oo(e){return!!e&&e.$$typeof===jr}function io(e){return oo(e)?qt.apply(null,arguments):e}function so(e){e()}var uo={useState:cr,useId:function(){var e=ur(Jt++,11);if(!e.__){for(var n=Kt.__v;null!==n&&!n.__m&&null!==n.__;)n=n.__;var t=n.__m||(n.__m=[0,0]);e.__="P"+t[0]+"-"+t[1]++}return e.__},useReducer:ar,useEffect:lr,useLayoutEffect:fr,useInsertionEffect:fr,useTransition:function(){return[!1,so]},useDeferredValue:function(e){return e},useSyncExternalStore:function(e,n){var t=n(),r=cr({h:{__:t,v:n}}),o=r[0].h,i=r[1];return fr((function(){o.__=t,o.v=n,Er(o.__,n())||i({h:o})}),[e,t,n]),lr((function(){return Er(o.__,o.v())||i({h:o}),e((function(){Er(o.__,o.v())||i({h:o})}))}),[e]),t},startTransition:so,useRef:dr,useImperativeHandle:function(e,n,t){Qt=6,fr((function(){return"function"==typeof e?(e(n()),function(){return e(null)}):e?(e.current=n(),function(){return e.current=null}):void 0}),null==t?t:t.concat(e))},useMemo:hr,useCallback:pr,useContext:mr,useDebugValue:function(e,n){lt.useDebugValue&<.useDebugValue(n?n(e):e)},version:"17.0.2",Children:Dr,render:function(e,n,t){return null==n.__k&&(n.textContent=""),zt(e,n),"function"==typeof t&&t(),e?e.__c:null},hydrate:function(e,n,t){return Vt(e,n),"function"==typeof t&&t(),e?e.__c:null},unmountComponentAtNode:function(e){return!!e.__k&&(zt(null,e),!0)},createPortal:function(e,n){var t=Ct(Hr,{__v:e,i:n});return t.containerInfo=n,t},createElement:Ct,createContext:Zt,createFactory:function(e){return Ct.bind(null,e)},cloneElement:io,createRef:function(){return{current:null}},Fragment:St,isValidElement:oo,findDOMNode:function(e){return e&&(e.base||1===e.nodeType&&e)||null},Component:Et,PureComponent:kr,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:Sr(this.props,e)}function r(n){return this.shouldComponentUpdate=t,Ct(e,n)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r},forwardRef:Nr,flushSync:function(e,n){return e(n)},unstable_batchedUpdates:function(e,n){return e(n)},StrictMode:St,Suspense:Br,SuspenseList:Fr,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 Ct(t,o)}return o.displayName="Lazy",o.__f=!0,o},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ro};const co=uo,ao=e=>{lr((()=>{const n=e();return()=>{n.Dispose()}}))},lo=(e,n)=>{lr((()=>{const n=e();return()=>{n.Dispose()}}),n)},fo=e=>{fr((()=>{const n=e();return()=>{n.Dispose()}}))};function ho(e){return{Dispose(){e()}}}function po(e){ao(e)}function mo(e,n){lo(e,n)}function go(e){yo(e,[])}function wo(e){mo(e,[])}function _o(e){ao((n=>(e(),ho((()=>{})))))}function yo(e,n){lo((n=>(e(),ho((()=>{})))),n)}function vo(e){return co.useRef(e)}function bo(e,n){const t=re(n,[]);return co.useMemo(e,t)}function Co(e){const n=vo(e),t=function(e,t){const r=re([],[]);return co.useCallback((e=>n.current(e)),r)}();var r;return r=()=>{n.current=e},fo((e=>(r(),ho((()=>{}))))),t}function xo(e){return co.useState(e)}class So{constructor(e=!1){this._id=0,this._cancelled=e,this._listeners=new Map}get isCancelled(){return this._cancelled}cancel(){if(!this._cancelled){this._cancelled=!0;for(const[,e]of this._listeners)e()}}addListener(e){const n=this._id;return this._listeners.set(this._id++,e),n}removeListener(e){return this._listeners.delete(e)}register(e,n){const t=this,r=this.addListener(null==n?e:()=>e(n));return{Dispose(){t.removeListener(r)}}}Dispose(){}}class Eo extends Error{constructor(){super("The operation was canceled"),Object.setPrototypeOf(this,Eo.prototype)}}class ko{constructor(){this.callCount=0}static get maxTrampolineCallCount(){return 2e3}incrementAndCheck(){return this.callCount++>ko.maxTrampolineCallCount}hijack(e){this.callCount=0,setTimeout(e,0)}}function Io(e){return n=>{if(n.cancelToken.isCancelled)n.onCancel(new Eo);else if(n.trampoline.incrementAndCheck())n.trampoline.hijack((()=>{try{e(n)}catch(e){n.onError(U(e))}}));else try{e(n)}catch(e){n.onError(U(e))}}}const Ao=new class{Bind(e,n){return function(e,n){return Io((t=>{e({onSuccess:e=>{try{n(e)(t)}catch(e){t.onError(U(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 Io((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 Io((n=>n.onSuccess(e)))}(e)}ReturnFrom(e){return e}TryFinally(e,n){return Io((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 Io((t=>{e({onSuccess:t.onSuccess,onCancel:t.onCancel,cancelToken:t.cancelToken,trampoline:t.trampoline,onError:e=>{try{n(e)(t)}catch(e){t.onError(U(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 Io((e=>e.onSuccess(void 0)))}};function No(e){}function To(e){const n=new So("boolean"==typeof e&&e);return"number"==typeof e&&setTimeout((()=>{n.cancel()}),e),n}function Do(e){e.cancel()}function Po(e){return null!=e&&e.isCancelled}const Oo=new So;function Mo(e,n){return function(e,n){return function(e,n,t,r,o){"function"!=typeof n&&(o=n,n=void 0);const i=new ko;e({onSuccess:n||No,onError:t||No,onCancel:r||No,cancelToken:o||Oo,trampoline:i})}(e,n)}(e,n)}class Uo extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["HasNotStartedYet","InProgress","Resolved","Failed"]}}function Bo(e,n){const t=vo(To());return wo((()=>ho((()=>{Do(t.current)})))),Co((r=>{Po(t.current)||Mo(Ao.Delay((()=>Ao.TryWith(Ao.Delay((()=>(n(new Uo(1)),Ao.Bind(e(r),(e=>(n(new Uo(2,e)),Ao.Zero())))))),(e=>(n(new Uo(3,e)),Ao.Zero()))))),t.current)}))}class Lo extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["StreamId"]}}function Fo(e){return e.fields[0]}class Go{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 Jo(this)}GetHashCode(){return Ho(this)}Equals(e){return jo(this,e)}}function Ro(e){return null!=e.generics?e.generics:[]}function Ho(e){return p([d(e.fullname),...Ro(e).map(Ho)])}function jo(e,n){return""===e.fullname?""===n.fullname&&w(ei(e),ei(n),(([e,n],[t,r])=>e===t&&jo(n,r))):e.fullname===n.fullname&&w(Ro(e),Ro(n),jo)}function $o(e,n,t,r){return new Go(e,n,t,void 0,r)}function Wo(e){return new Go("Microsoft.FSharp.Core.FSharpOption`1",[e])}function zo(e){return new Go("Microsoft.FSharp.Collections.FSharpList`1",[e])}const Vo=new Go("System.Object"),qo=(new Go("Microsoft.FSharp.Core.Unit"),new Go("System.Char"),new Go("System.String"));function Zo(e){if(Array.isArray(e))return e[0];if(e instanceof Go){const n=Ko(e);if(null!=n)return Zo(n)+"[]";{const n=e.fullname.lastIndexOf(".");return-1===n?e.fullname:e.fullname.substr(n+1)}}return e.name}function Jo(e){const n=Ko(e);return null!=n?Jo(n)+"[]":null==e.generics||0===e.generics.length?e.fullname:e.fullname+"["+e.generics.map((e=>Jo(e))).join(",")+"]"}function Ko(e){var n;return"[]"===e.fullname&&1===(null===(n=e.generics)||void 0===n?void 0:n.length)?e.generics[0]:void 0}function Yo(e){return null!=e.enumCases&&e.enumCases.length>0}function Xo(e){if(Yo(e)&&null!=e.enumCases)return e.enumCases.map((e=>e[1]));throw new Error(`${e.fullname} is not an enum type`)}function Qo(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 ei(e){if(null!=e.fields)return e.fields();throw new Error(`${e.fullname} is not an F# record type`)}function ni(e){return e.fullname.startsWith("System.Tuple")}function ti(e,n){return Ge(n)?new st(1,Ue(Pe("%s cannot be null or empty"))(e)):new st(0,n)}function ri(e){return F(e)}function oi(e){return e.fields[0]}function ii(e){return e.fields[0]}function si(e){return e.fields[0]}function ui(e){let n;const t=ti("Email",e);return n=1===t.tag?new st(1,t.fields[0]):function(e){const n=function(e){let n;const t=function(e,n){const t=function(e,n,t=0){return e.lastIndex=t,e.exec(n)}(Ee(".*?@(.*)"),n);return null!=t?cn(Mn(Nn((()=>Hn((e=>e||""),t))))):void 0}(0,e);switch(n=null!=t?on(t)?1:on(cn(t))?0:1:1,n){case 0:return e;case 1:return}}(e);return null!=n?new st(0,n):new st(1,"Email is not in the correct format")}(t.fields[0]),1===n.tag?new st(1,n.fields[0]):new st(0,new j(0,n.fields[0]))}function ci(e){return e.fields[0]}new Go("System.Boolean"),new Go("System.SByte"),new Go("System.Byte"),new Go("System.Int16"),new Go("System.UInt16"),new Go("System.Int32"),new Go("System.UInt32"),new Go("System.Single"),new Go("System.Double"),new Go("System.Decimal");class ai extends P{constructor(e,n,t,r){super(),this.FirstName=e,this.LastName=n,this.Email=t,this.MobilePhone=r}}function li(){return $o("Dto.Primitives.ContactDetails",[],ai,(()=>[["FirstName",qo],["LastName",qo],["Email",qo],["MobilePhone",qo]]))}function fi(e){return q(e)}function di(e){return Y(e)}class hi extends P{constructor(e,n,t,r,o,i,s,u,c){super(),this.BusinessName=e,this.BusinessNumber=n,this.Address1=t,this.Address2=r,this.City=o,this.Postcode=i,this.State=s,this.Phone=u,this.CountryCode=c}}const pi=(()=>{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 mi(e){return oe((e=>e.passive&&!pi?{capture:e.capture,once:e.once,passive:!1}:e),e)}function gi(e){return null!=(n=e)?(e=>e.capture?{capture:!0}:void 0)(ne(n)):void 0;var n}function wi(e,n){return 0===n.indexOf(e)?n:void 0}function _i(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 yi(e,n){return function(e){return 1===e?e=>{let n,t,r,o,i,s;return n=wi("/",e),null!=n?(t=n,"#"+t):(r=wi("#/",e),null!=r?(o=r,o):(i=wi("#",e),null!=i?(s=i,"#/"+ze(s,1,s.length-1)):"#/"+e))}:e=>{let n,t;return n=wi("/",e),null!=n?(t=n,t):"/"+e}}(n)(He("/",wn((e=>e.indexOf("?")>=0||0===e.indexOf("#")||0===e.indexOf("/")?e:encodeURIComponent(e)),e)))}function vi(e,n,t){1===n?history.pushState(void 0,"",yi(e,t)):history.replaceState(void 0,"",yi(e,t));const r=document.createEvent("CustomEvent");r.initEvent("CUSTOM_NAVIGATION_EVENT",!0,!0),window.dispatchEvent(r)}function bi(e,n){return function(e,n){let t,r;const o=Je();let i=o,s=n;for(;!Ye(s);){let n=e(Qe(s));for(;!Ye(n);)t=i,r=new qe(Qe(n),void 0),t.tail=r,i=r,n=en(n);s=en(s)}const u=i,c=Je();return u.tail=c,en(o)}((e=>{if(Re(e))return nn();{const n=function(e,...n){return 0===n.length?e.trimEnd():e.replace(new RegExp("["+ke(n.join(""))+"]+$"),"")}(e,"#");if("?"===n)return nn();if(null!=wi("?",n))return rn(n);{const e=n.split("?");if(le(((e,n)=>e===n),e,null)||1!==e.length){if(le(((e,n)=>e===n),e,null)||2!==e.length)return nn();if(""===e[1]){const n=e[0];return rn(decodeURIComponent(n))}{const n=e[0],t=e[1];return pn([decodeURIComponent(n),"?"+t])}}{const n=e[0];return rn(decodeURIComponent(n))}}}}),pn(We(null!=wi("#",e)?ze(e,1,e.length-1):1!==n||null==_i("#",e)&&null==_i("#/",e)?e:"",["/"],null,0)))}const Ci=function(e,n,t,r){const o=co.memo(e,I(2,re(N(2,t),null)));return Rn((n=>{e.displayName=n}),te(n)),e=>{const n=function(e,n){if(null==e)return n;{const t=e;return n.key=t(n),n}}(r,e);return co.createElement(o,n)}}((e=>{const n=Co((n=>{const t=re(e.onUrlChanged,(e=>{}));!function(e,n,t){n(bi(2===e?window.location.pathname+window.location.search:window.location.hash,e))}(re(e.hashMode,1),t)}));if(window.navigator.userAgent.indexOf("Trident")>=0||window.navigator.userAgent.indexOf("MSIE")>=0){const e="hashchange",t=e=>{n(e)},r=void 0,o=bo((()=>mi(r)),[r]),i=bo((()=>gi(r)),[r]),s=bo((()=>e=>{t(e)}),[t]);po(Co((()=>{if(null==o)window.addEventListener(e,s);else{const n=o;window.addEventListener(e,s,n)}return ho((()=>{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=bo((()=>mi(r)),[r]),i=bo((()=>gi(r)),[r]),s=bo((()=>e=>{t(e)}),[t]);po(Co((()=>{if(null==o)window.addEventListener(e,s);else{const n=o;window.addEventListener(e,s,n)}return ho((()=>{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=bo((()=>mi(o)),[o]),s=bo((()=>gi(o)),[o]),u=bo((()=>e=>{r(e)}),[r]);po(Co((()=>{if(null==i)window.addEventListener(t,u);else{const e=i;window.addEventListener(t,u,e)}return ho((()=>{if(null==s)window.removeEventListener(t,u);else{const e=s;window.removeEventListener(t,u,e)}}))})));const c=e.application;return null==c?null:c}),void 0,void 0,void 0);class xi extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["AccountId","Name"]}}class Si extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Asc","Desc"]}}function Ei(e){return 0===e.tag?new Si(1):new Si(0)}class ki extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Sort"]}}const Ii=new ki(0,new xi(1),new Si(0));function Ai(e){return e.fields[0]}function Ni(e){return e.fields[1]}function Ti(e,n){const t=n.fields[1],r=[e,n.fields[0]];return 1===r[0].tag?1===r[1].tag?new ki(0,new xi(1),Ei(t)):new ki(0,new xi(1),new Si(0)):0===r[1].tag?new ki(0,new xi(0),Ei(t)):new ki(0,new xi(0),new Si(0))}class Di extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["SearchText"]}}const Pi=new Di(0,"");function Oi(e){return e.fields[0]}class Mi extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["PageSize"]}}function Ui(e){return e.fields[0]}class Bi extends P{constructor(e,n,t){super(),this.SearchText=e,this.Sort=n,this.PageSize=t}}class Li extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["AccountKey"]}}class Fi extends P{constructor(e,n,t,r,o){super(),this.StreamId=e,this.Name=n,this.Website=t,this.ContactDetails=r,this.Notes=o}}function Gi(e){const n=function(e){const n=ti("Name",e);return 1===n.tag?new st(1,n.fields[0]):new st(0,L(n.fields[0]))}(e.Name);if(1===n.tag)return new st(1,n.fields[0]);{const t=function(e){const n=ti("Website",e);return 1===n.tag?new st(1,n.fields[0]):new st(0,new G(0,n.fields[0]))}(e.Website);if(1===t.tag)return new st(1,t.fields[0]);{const r=function(e){const n=function(e){const n=ti("FirstName",e);return 1===n.tag?new st(1,n.fields[0]):new st(0,new R(0,n.fields[0]))}(e.FirstName);if(1===n.tag)return new st(1,n.fields[0]);{const t=function(e){const n=ti("LastName",e);return 1===n.tag?new st(1,n.fields[0]):new st(0,new H(0,n.fields[0]))}(e.LastName);if(1===t.tag)return new st(1,t.fields[0]);{const r=ui(e.Email);if(1===r.tag)return new st(1,r.fields[0]);{const o=function(e){const n=ti("MobilePhone",e);return 1===n.tag?new st(1,n.fields[0]):new st(0,new $(0,n.fields[0]))}(e.MobilePhone);return 1===o.tag?new st(1,o.fields[0]):new st(0,new W(n.fields[0],t.fields[0],r.fields[0],o.fields[0]))}}}}(e.ContactDetails);return 1===r.tag?new st(1,r.fields[0]):new st(0,new Fi(new Lo(0,e.StreamId),n.fields[0],t.fields[0],r.fields[0],function(e){return null==e?void 0:new z(0,e)}(e.Notes)))}}}function Ri(e,n){return _n((e=>Fo(e.StreamId)===J(n)),e)}class Hi extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["PartnerList","Partner","PartnerProfilesDirectory","PartnerAccountList","PartnerSuperConfiguration","PartnerBenefitsOnboardingConfiguration","PartnerBankDetailsConfiguration","Account","AccountProfilesDirectory","AccountSuperConfiguration","AccountBenefitsOnboardingConfiguration","AccountBankDetailsConfiguration","AccountSalaryPackagingConfiguration","NotFound"]}}function ji(e){let n,t,r,o,i,s,u,c,a,l,f,d,h,p,m,g,w,_,y;switch(on(e)?n=13:"account-registry"===un(e)?on(cn(e))?n=13:"partners"===un(cn(e))?on(cn(cn(e)))?n=0:on(cn(cn(cn(e))))?(n=1,t=un(cn(cn(e)))):"accounts"===un(cn(cn(cn(e))))?on(cn(cn(cn(cn(e)))))?(n=2,r=un(cn(cn(e)))):on(cn(cn(cn(cn(cn(e))))))?(n=7,c=un(cn(cn(cn(cn(e))))),a=un(cn(cn(e)))):"directory"===un(cn(cn(cn(cn(cn(e))))))?on(cn(cn(cn(cn(cn(cn(e)))))))?(n=8,l=un(cn(cn(cn(cn(e))))),f=un(cn(cn(e)))):n=13:"super-configuration"===un(cn(cn(cn(cn(cn(e))))))?on(cn(cn(cn(cn(cn(cn(e)))))))?(n=9,d=un(cn(cn(cn(cn(e))))),h=un(cn(cn(e)))):n=13:"benefits-onboarding-configuration"===un(cn(cn(cn(cn(cn(e))))))?on(cn(cn(cn(cn(cn(cn(e)))))))?(n=10,p=un(cn(cn(cn(cn(e))))),m=un(cn(cn(e)))):n=13:"bank-details-configuration"===un(cn(cn(cn(cn(cn(e))))))?on(cn(cn(cn(cn(cn(cn(e)))))))?(n=11,g=un(cn(cn(cn(cn(e))))),w=un(cn(cn(e)))):n=13:"salary-packaging-configuration"===un(cn(cn(cn(cn(cn(e))))))&&on(cn(cn(cn(cn(cn(cn(e)))))))?(n=12,_=un(cn(cn(cn(cn(e))))),y=un(cn(cn(e)))):n=13:"super-configuration"===un(cn(cn(cn(e))))?on(cn(cn(cn(cn(e)))))?(n=3,o=un(cn(cn(e)))):n=13:"benefits-onboarding-configuration"===un(cn(cn(cn(e))))?on(cn(cn(cn(cn(e)))))?(n=4,i=un(cn(cn(e)))):n=13:"directory"===un(cn(cn(cn(e))))?on(cn(cn(cn(cn(e)))))?(n=5,s=un(cn(cn(e)))):n=13:"bank-details-configuration"===un(cn(cn(cn(e))))&&on(cn(cn(cn(cn(e)))))?(n=6,u=un(cn(cn(e)))):n=13:n=13:n=13,n){case 0:return new Hi(0);case 1:return new Hi(1,Z(t));case 2:return new Hi(3,Z(r));case 3:return new Hi(4,Z(o));case 4:return new Hi(5,Z(i));case 5:return new Hi(2,Z(s));case 6:return new Hi(6,Z(u));case 7:return new Hi(7,Z(a),X(c));case 8:return new Hi(8,Z(f),X(l));case 9:return new Hi(9,Z(h),X(d));case 10:return new Hi(10,Z(m),X(p));case 11:return new Hi(11,Z(w),X(g));case 12:return new Hi(12,Z(y),X(_));case 13:return new Hi(13)}}function $i(e){switch(e.tag){case 1:return pn(["account-registry","partners",fi(e.fields[0])]);case 3:return pn(["account-registry","partners",fi(e.fields[0]),"accounts"]);case 4:return pn(["account-registry","partners",fi(e.fields[0]),"super-configuration"]);case 5:return pn(["account-registry","partners",fi(e.fields[0]),"benefits-onboarding-configuration"]);case 6:return pn(["account-registry","partners",fi(e.fields[0]),"bank-details-configuration"]);case 2:return pn(["account-registry","partners",fi(e.fields[0]),"directory"]);case 7:return pn(["account-registry","partners",fi(e.fields[0]),"accounts",di(e.fields[1])]);case 8:return pn(["account-registry","partners",fi(e.fields[0]),"accounts",di(e.fields[1]),"directory"]);case 9:return pn(["account-registry","partners",fi(e.fields[0]),"accounts",di(e.fields[1]),"super-configuration"]);case 10:return pn(["account-registry","partners",fi(e.fields[0]),"accounts",di(e.fields[1]),"benefits-onboarding-configuration"]);case 11:return pn(["account-registry","partners",fi(e.fields[0]),"accounts",di(e.fields[1]),"bank-details-configuration"]);case 12:return pn(["account-registry","partners",fi(e.fields[0]),"accounts",di(e.fields[1]),"salary-packaging-configuration"]);default:return pn(["account-registry","partners"])}}function Wi(e){switch(e.tag){case 1:{const n=["account-registry","partners",fi(e.fields[0])];return rn((e=>{vi(pn(n),1,1)}))}case 3:{const n=["account-registry","partners",fi(e.fields[0]),"accounts"];return rn((e=>{vi(pn(n),1,1)}))}case 4:{const n=["account-registry","partners",fi(e.fields[0]),"super-configuration"];return rn((e=>{vi(pn(n),1,1)}))}case 5:{const n=["account-registry","partners",fi(e.fields[0]),"benefits-onboarding-configuration"];return rn((e=>{vi(pn(n),1,1)}))}case 6:{const n=["account-registry","partners",fi(e.fields[0]),"bank-details-configuration"];return rn((e=>{vi(pn(n),1,1)}))}case 2:{const n=["account-registry","partners",fi(e.fields[0]),"directory"];return rn((e=>{vi(pn(n),1,1)}))}case 7:{const n=["account-registry","partners",fi(e.fields[0]),"accounts",di(e.fields[1])];return rn((e=>{vi(pn(n),1,1)}))}case 8:{const n=["account-registry","partners",fi(e.fields[0]),"accounts",di(e.fields[1]),"directory"];return rn((e=>{vi(pn(n),1,1)}))}case 9:{const n=["account-registry","partners",fi(e.fields[0]),"accounts",di(e.fields[1]),"super-configuration"];return rn((e=>{vi(pn(n),1,1)}))}case 10:{const n=["account-registry","partners",fi(e.fields[0]),"accounts",di(e.fields[1]),"benefits-onboarding-configuration"];return rn((e=>{vi(pn(n),1,1)}))}case 11:{const n=["account-registry","partners",fi(e.fields[0]),"accounts",di(e.fields[1]),"bank-details-configuration"];return rn((e=>{vi(pn(n),1,1)}))}case 12:{const n=["account-registry","partners",fi(e.fields[0]),"accounts",di(e.fields[1]),"salary-packaging-configuration"];return rn((e=>{vi(pn(n),1,1)}))}default:{const e=["account-registry","partners"];return rn((n=>{vi(pn(e),1,1)}))}}}function zi(e,n){return 1===n.tag?new Uo(1):2===n.tag?1===n.fields[0].tag?new Uo(2,new st(1,n.fields[0].fields[0])):new Uo(2,new st(0,e(n.fields[0].fields[0]))):3===n.tag?new Uo(3,n.fields[0]):new Uo(0)}const Vi=class{constructor(){this.delegates=[]}Add(e){this._addHandler(e)}get Publish(){return this}Trigger(e,n){let t,r;void 0===n?(t=null,r=e):(t=e,r=n),this.delegates.forEach((e=>1===e.length?e(r):e(t,r)))}AddHandler(e){this._addHandler(e)}RemoveHandler(e){this._removeHandler(e)}Subscribe(e){const n="function"==typeof e?e:e.OnNext;return this._addHandler(n),{Dispose:()=>{this._removeHandler(n)}}}_addHandler(e){this.delegates.push(e)}_removeHandler(e){const n=this.delegates.indexOf(e);n>-1&&this.delegates.splice(n,1)}},qi=class{constructor(e){this._enabled=!1,this._isDisposed=!1,this._intervalId=0,this._timeoutId=0,this.Interval=e&&e>0?e:100,this.AutoReset=!0,this._elapsed=new Vi}Elapsed(){return this._elapsed}get Enabled(){return this._enabled}set Enabled(e){this._isDisposed||this._enabled===e||(this._enabled=e,this._enabled?this.AutoReset?this._intervalId=setInterval((()=>{this.AutoReset||(this.Enabled=!1),this._elapsed.Trigger(new Date)}),this.Interval):this._timeoutId=setTimeout((()=>{this.Enabled=!1,this._timeoutId=0,this.AutoReset&&(this.Enabled=!0),this._elapsed.Trigger(new Date)}),this.Interval):(this._timeoutId&&(clearTimeout(this._timeoutId),this._timeoutId=0),this._intervalId&&(clearInterval(this._intervalId),this._intervalId=0)))}Dispose(){this.Enabled=!1,this._isDisposed=!0}Close(){this.Dispose()}Start(){this.Enabled=!0}Stop(){this.Enabled=!1}};class Zi{constructor(e,n,t){this.OnNext=e,this.OnError=n||(e=>{}),this.OnCompleted=t||(()=>{})}}function Ji(){return nn()}function Ki(e){return rn(e)}function Yi(e,n,t,r){return function(e,n,t,r){return rn((e=>{(e=>{!function(e){!function(e,n){let t,r=new qi(e);r.AutoReset=!1,t=r,function(e,n){n.Subscribe(new Zi(e))}(n,t.Elapsed()),t.Enabled=!0,t.Start()}(0,(n=>{Mo(e)}))}(e)})(Ao.Delay((()=>{return Ao.Bind((o=n(t),Io((e=>{o({onSuccess:n=>e.onSuccess(function(e){return new ct(0,e)}(n)),onError:n=>e.onSuccess(function(e){return new ct(1,e)}(n)),onCancel:e.onCancel,cancelToken:e.cancelToken,trampoline:e.trampoline})}))),(n=>{const t=n;return 0===t.tag?(e(r(t.fields[0])),Ao.Zero()):Ao.Zero()}));var o})))}))}(0,e,n,(e=>1===e.tag?r(e.fields[0]):t(e.fields[0])))}function Xi(e,n,t){return n()?t.then((()=>Xi(e,n,t))):Promise.resolve(void 0)}function Qi(e,n){return{then:(e,t)=>{try{return n().then(e,t)}catch(e){if(y(t,null))return Promise.reject(e);try{return Promise.resolve(t(e))}catch(e){return Promise.reject(e)}}},catch:e=>{try{return n().catch(e)}catch(n){try{return Promise.resolve(e(n))}catch(e){return Promise.reject(e)}}}}}const es=new class{constructor(){}};class ns extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Writable","ReadWritable"]}}class ts{constructor(e){this.state=new ns(0,ue(new Array(S(b,e,10)),0,S(b,e,10),null),0)}}function rs(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 ns(0,o,t):new ns(1,o,t,i),ee(o[r])}}function os(e,n,o){const i=vo(e[0]),s=vo(new ts(10)),u=xo(e[0]);let c;const a=vo(To()),l=vo(a.current);wo((()=>ho((()=>{Do(a.current)})))),c=l;const f=()=>{setTimeout((()=>{let e;e=c.current,Po(e)||u[1](i.current)}),0)},d=e=>{const t=function(e,n){return new Promise(((e,t)=>{try{Promise.resolve(n).then(e,t)}catch(e){t(e)}}))}(0,Qi(0,(()=>{let t=ee(e);return Xi(es,(()=>{let e;return null!=t&&(e=c.current,!Po(e))}),Qi(0,(()=>{const e=n(ne(t),i.current);return dn((e=>{e(d)}),e[1]),t=rs(s.current),i.current=e[0],f(),Promise.resolve()})))})));t.then()},h=Co(d);return mo((()=>ho((()=>{let e;Rn((e=>{r(e)}),te((e=i.current,t(e)?e:void 0)))}))),o),yo((()=>{i.current=e[0],f(),dn((e=>{e(h)}),e[1])}),o),_o((()=>{Rn(h,te(rs(s.current)))})),[u[0],h]}function is(e,n,t){return os(bo(e,t),n,t)}class ss extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"]}}class us extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Header"]}}class cs extends P{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 as extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Text","Blob","ArrayBuffer","Unknown"]}}class ls extends P{constructor(e,n,t,r,o,i){super(),this.statusCode=0|e,this.responseText=n,this.responseType=t,this.responseUrl=r,this.responseHeaders=o,this.content=i}}class fs{constructor(e,n){this.k=e,this.v=n}}function ds(e,n){return new fs(e,n)}function hs(e){return e.k}function ps(e){return e.v}class ms extends fs{constructor(e,n,t,r,o){super(e,n),this.left=t,this.right=r,this.h=0|o}}function gs(e,n,t,r,o){return new ms(e,n,t,r,o)}function ws(e){return e.left}function _s(e){return e.right}function ys(e){return e.h}function vs(e,n){e:for(;;){const t=e;if(null!=n){const r=n;if(r instanceof ms){e=vs(t+1,ws(r)),n=_s(r);continue e}return t+1|0}return 0|t}}function bs(e){return vs(0,e)}function Cs(e,n,t,r){let o,i;o=null!=e?e instanceof ms?ys(e):1:0,i=null!=r?r instanceof ms?ys(r):1:0;const s=0|(o<i?i:o);return 0===s?ds(n,t):gs(n,t,e,r,s+1)}function xs(e,n,t,r){let o,i,s,u,c,a;if(c=null!=e?e instanceof ms?ys(e):1:0,a=null!=r?r instanceof ms?ys(r):1:0,a>c+2){const s=ne(r);if(s instanceof ms){if(o=ws(s),(null!=o?(i=o,i instanceof ms?ys(i):1):0)>c+1){const r=ne(ws(s));if(r instanceof ms)return Cs(Cs(e,n,t,ws(r)),hs(r),ps(r),Cs(_s(r),hs(s),ps(s),_s(s)));throw new Error("internal error: Map.rebalance")}return Cs(Cs(e,n,t,ws(s)),hs(s),ps(s),_s(s))}throw new Error("internal error: Map.rebalance")}if(c>a+2){const o=ne(e);if(o instanceof ms){if(s=_s(o),(null!=s?(u=s,u instanceof ms?ys(u):1):0)>a+1){const e=ne(_s(o));if(e instanceof ms)return Cs(Cs(ws(o),hs(o),ps(o),ws(e)),hs(e),ps(e),Cs(_s(e),n,t,r));throw new Error("internal error: Map.rebalance")}return Cs(ws(o),hs(o),ps(o),Cs(_s(o),n,t,r))}throw new Error("internal error: Map.rebalance")}return Cs(e,n,t,r)}function Ss(e,n,t,r){if(null!=r){const o=r,i=0|e.Compare(n,hs(o));return o instanceof ms?i<0?xs(Ss(e,n,t,ws(o)),hs(o),ps(o),_s(o)):0===i?gs(n,t,ws(o),_s(o),ys(o)):xs(ws(o),hs(o),ps(o),Ss(e,n,t,_s(o))):i<0?gs(n,t,void 0,r,2):0===i?ds(n,t):gs(n,t,r,void 0,2)}return ds(n,t)}function Es(e,n,t){e:for(;;){const r=e,o=n;if(null!=t){const i=t,s=0|r.Compare(o,hs(i));if(0===s)return ee(ps(i));if(i instanceof ms){e=r,n=o,t=s<0?ws(i):_s(i);continue e}return}return}}function ks(e,n){e:for(;;){const t=e;if(null!=n){const r=n;if(r instanceof ms){ks(t,ws(r)),t(hs(r),ps(r)),e=t,n=_s(r);continue e}t(hs(r),ps(r))}break}}function Is(e,n){ks(e,n)}function As(e,n){if(null!=n){const t=n;if(t instanceof ms){const n=As(e,ws(t)),r=e(hs(t),ps(t)),o=As(e,_s(t));return gs(hs(t),r,n,o,ys(t))}return ds(hs(t),e(hs(t),ps(t)))}}function Ns(e,n){return As(e,n)}function Ts(e,n){let t;for(let r=0;r<=n.length-1;r++){const o=n[r];t=Ss(e,o[0],o[1],t)}return t}class Ds extends P{constructor(e,n){super(),this.stack=e,this.started=n}}function Ps(e){e:for(;;){const n=e;if(on(n))return nn();{const t=cn(n),r=un(n);if(null!=r){const o=r;if(o instanceof ms){e=hn([ws(o),ds(hs(o),ps(o)),_s(o)],t);continue e}return n}e=t;continue e}}}function Os(e){return new Ds(Ps(rn(e)),!1)}function Ms(e){if(e.started){const n=e.stack;if(on(n))return function(){throw new Error("enumeration already finished")}();if(null!=un(n)){const e=un(n);if(e instanceof ms)throw new Error("Please report error: Map iterator, unexpected stack for current");return[hs(e),ps(e)]}throw new Error("Please report error: Map iterator, unexpected stack for current")}return function(){throw new Error("enumeration not started")}()}function Us(e){let n=Os(e);return{"System.Collections.Generic.IEnumerator`1.get_Current":()=>Ms(n),"System.Collections.IEnumerator.get_Current":()=>Ms(n),"System.Collections.IEnumerator.MoveNext":()=>function(e){if(e.started){const n=e.stack;if(on(n))return!1;if(null!=un(n)){if(un(n)instanceof ms)throw new Error("Please report error: Map iterator, unexpected stack for moveNext");return e.stack=Ps(cn(n)),!on(e.stack)}throw new Error("Please report error: Map iterator, unexpected stack for moveNext")}return e.started=!0,!on(e.stack)}(n),"System.Collections.IEnumerator.Reset"(){n=Os(e)},Dispose(){}}}class Bs{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 o=s(e);try{for(;o["System.Collections.IEnumerator.MoveNext"]();){const e=o["System.Collections.Generic.IEnumerator`1.get_Current"]();t=0|n(t,m(e[0])),t=0|n(t,m(e[1]))}}finally{r(o)}return 0|t}(this)}Equals(e){if(!(e instanceof Bs))return!1;{const n=s(this);try{const t=s(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!(!y(r[0],o[0])||!y(r[1],o[1]))&&e()}return!0}return!1};return e()}finally{r(t)}}finally{r(n)}}}toString(){return"map ["+He("; ",Hn((e=>Fe("({0}, {1})",e[0],e[1])),this))+"]"}get[Symbol.toStringTag](){return"FSharpMap"}toJSON(e){return Array.from(this)}GetEnumerator(){return Us(this.tree)}[Symbol.iterator](){return u(this.GetEnumerator())}"System.Collections.IEnumerable.GetEnumerator"(){return Us(this.tree)}CompareTo(e){const n=this;if(e instanceof Bs)return 0|function(e,n,t){const o=An(n);try{const n=An(t);try{let t=0,r=o["System.Collections.IEnumerator.MoveNext"](),i=n["System.Collections.IEnumerator.MoveNext"]();for(;0===t&&r&&i;)t=0|e(o["System.Collections.Generic.IEnumerator`1.get_Current"](),n["System.Collections.Generic.IEnumerator`1.get_Current"]()),0===t&&(r=o["System.Collections.IEnumerator.MoveNext"](),i=n["System.Collections.IEnumerator.MoveNext"]());return 0|(0!==t?t:r?1:i?-1:0)}finally{r(n)}}finally{r(o)}}(((e,t)=>{const r=0|n.comparer.Compare(e[0],t[0]);return 0|(0!==r?r:x(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 Hs(this,e[0])&&y(Gs(this,e[0]),e[1])}"System.Collections.Generic.ICollection`1.CopyToZ2E171D71"(e,n){!function(e,n,t){let r=t;Is(((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|Rs(this)}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return 0|Rs(this)}get size(){return 0|Rs(this)}clear(){throw new Error("Map cannot be mutated")}delete(e){throw new Error("Map cannot be mutated")}entries(){return Hn((e=>[e[0],e[1]]),this)}get(e){return Gs(this,e)}has(e){return Hs(this,e)}keys(){return Hn((e=>e[0]),this)}set(e,n){throw new Error("Map cannot be mutated")}values(){return Hn((e=>e[1]),this)}forEach(e,n){const t=this;Rn((n=>{e(n[1],n[0],t)}),t)}}function Ls(e,n){return new Bs(e,n)}function Fs(n){const t=ie();return Ls(t,function(n,t){if(e(t))return Ts(n,t);if(t instanceof qe)return function(e,n){return ln(((n,t)=>Ss(e,t[0],t[1],n)),void 0,n)}(n,t);{const e=s(t);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=Ss(r,s[0],s[1],o),t=i}}}(n,void 0,e)}finally{r(e)}}}(t,n))}function Gs(e,n){return function(e,n,t){const r=Es(e,n,t);if(null==r)throw new Error;return ne(r)}(e.comparer,n,e.tree)}function Rs(e){return bs(e.tree)}function Hs(e,n){return function(e,n,t){e:for(;;){const r=e,o=n;if(null!=t){const i=t,s=0|r.Compare(o,hs(i));if(i instanceof ms){if(s<0){e=r,n=o,t=ws(i);continue e}if(0===s)return!0;e=r,n=o,t=_s(i);continue e}return 0===s}return!1}}(e.comparer,n,e.tree)}function js(){return Bs.empty}Bs.empty=Ls(ie(),void 0);const $s=new cs("",new ss(0),nn(),!1,void 0,void 0,void 0,new class extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Empty","Text","Binary","Form"]}}(0));function Ws(e,n){return Ge(n)?[n]:We(n,[e],null,0)}function zs(e){return new cs(e,$s.method,$s.headers,$s.withCredentials,$s.overridenMimeType,$s.overridenResponseType,$s.timeout,$s.content)}function Vs(e,n){return new cs(n.url,e,n.headers,n.withCredentials,n.overridenMimeType,n.overridenResponseType,n.timeout,n.content)}function qs(e,n){return new cs(n.url,n.method,mn(n.headers,rn(e)),n.withCredentials,n.overridenMimeType,n.overridenResponseType,n.timeout,n.content)}function Zs(e){return function(e){return Io((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,c;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 as(0,t.responseText):new as("arraybuffer"===u?2:"blob"===u?1:3,t.response),c=function(e){const n=ie();return Ls(n,Ts(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=ne(o);r.push(e)}}return r}((e=>{const n=pn(Ws(":",e));return on(n)?void 0:[un(n).toLocaleLowerCase(),He(":",cn(n)).trim()]}),Ws("\r\n",t.getAllResponseHeaders()))),new ls(o,e,i,t.responseURL,c,s)))};const o=s(e.headers);try{for(;o["System.Collections.IEnumerator.MoveNext"]();){const e=o["System.Collections.Generic.IEnumerator`1.get_Current"]();t.setRequestHeader(e.fields[0],e.fields[1])}}finally{r(o)}t.withCredentials=e.withCredentials;const i=e.overridenMimeType;if(null==i);else{const e=i;t.overrideMimeType(e)}const u=e.overridenResponseType;null==u||(1===u.tag?t.responseType="blob":2===u.tag?t.responseType="arraybuffer":t.responseType="text");const c=e.timeout;if(null==c);else{const e=0|c;t.timeout=0|e}const a=e.content;switch(a.tag){case 1:case 3:case 2:t.send(ee(a.fields[0]));break;default:t.send()}}))}new ls(0,"","","",js(),new as(0,""));class Js extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["BadPrimitive","BadPrimitiveExtra","BadType","BadField","BadPath","TooSmallArray","FailMessage","BadOneOf"]}}class Ks extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["PascalCase","CamelCase","SnakeCase"]}}class Ys{constructor(){this.cache=new Map([])}}function Xs(){return new Ys}function Qs(e){return e.slice(void 0,1).toLowerCase()+e.slice(1,e.length)}function eu(e,n){switch(e.tag){case 2:return function(e,n,t,r,o=0){if("string"==typeof e){const t=e;e=Ee(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=Ie(e,s),c=Ie.length>r?(i=u[r-1],s.substring(0,i.index+i[0].length)):s;return n.substring(0,o)+c.replace(e,t)+n.substring(o+c.length)}return n.replace(e,t)}(Qs(n),"[A-Z]","_$0").toLowerCase();case 0:return n;default:return Qs(n)}}Xs(),Xs();const nu=/^[\(\{]{0,2}[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[\)\}]{0,2}$/,tu=/^([0-9a-f]{8})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{12})$/,ru=/^\{0x[0-9a-f]{8},(0x[0-9a-f]{4},){2}\{(0x[0-9a-f]{2},){7}0x[0-9a-f]{2}\}\}$/;function ou(e,n){try{return n.contents=function(e){function n(e){return e.replace(tu,"$1-$2-$3-$4-$5")}const t=e.trim().toLowerCase();if(nu.test(t))return function(e,...n){if(0===n.length)return e.trim();const t="["+ke(n.join(""))+"]+";return e.replace(new RegExp("^"+t),"").replace(new RegExp(t+"$"),"")}(t,"{","}","(",")");if(tu.test(t))return n(t);if(ru.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 iu;function su(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 uu(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&iu.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]=su(!0,r);!t&&10!==i.radix&&e>=n&&e<=o&&(e=e<<32-r>>32-r);const[s,u]=su(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 cu(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 au(e,n){try{return n.contents=function(e){const[n,t]=ge(e),r=null==t?-6e4*n.getTimezoneOffset():"Z"===t?0:6e4*t;return cu(n.getTime(),r)}(e),!0}catch(e){return!1}}!function(e){e[e.AllowHexSpecifier=512]="AllowHexSpecifier"}(iu||(iu={}));var lu=null;try{lu=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(gt){}function fu(e,n,t){this.low=0|e,this.high=0|n,this.unsigned=!!t}function du(e){return!0===(e&&e.__isLong__)}fu.prototype.GetHashCode=function(){let e=this.unsigned?1:0;return e=(e<<5)+e^this.high,e=(e<<5)+e^this.low,e},fu.prototype.Equals=function(e){return Gu(this,e)},fu.prototype.CompareTo=function(e){return $u(this,e)},fu.prototype.toString=function(e){return Uu(this,e)},fu.prototype.toJSON=function(){return Uu(this)},fu.prototype[_e]=function(){const e=this;return{multiply:n=>qu(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 Uu(e.unsigned?e:function(e,n,t){return t?function(e,n){return new fu(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 fu(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}}},fu.prototype.__isLong__,Object.defineProperty(fu.prototype,"__isLong__",{value:!0});var hu={},pu={};function mu(e,n){var t,r,o;return n?(o=0<=(e>>>=0)&&e<256)&&(r=pu[e])?r:(t=wu(e,(0|e)<0?-1:0,!0),o&&(pu[e]=t),t):(o=-128<=(e|=0)&&e<128)&&(r=hu[e])?r:(t=wu(e,e<0?-1:0,!1),o&&(hu[e]=t),t)}function gu(e,n){if(isNaN(e))return n?ku:Eu;if(n){if(e<0)return ku;if(e>=Cu)return Du}else{if(e<=-xu)return Pu;if(e+1>=xu)return Tu}return e<0?Wu(gu(-e,n)):wu(e%bu|0,e/bu|0,n)}function wu(e,n,t){return new fu(e,n,t)}var _u=Math.pow;function yu(e,n,t){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return Eu;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 Wu(yu(e.substring(1),n,t));for(var o=gu(_u(t,8)),i=Eu,s=0;s<e.length;s+=8){var u=Math.min(8,e.length-s),c=parseInt(e.substring(s,s+u),t);i=zu(u<8?qu(i,gu(_u(t,u))):i=qu(i,o),gu(c))}return i.unsigned=n,i}function vu(e,n){return"number"==typeof e?gu(e,n):"string"==typeof e?yu(e,n):wu(e.low,e.high,"boolean"==typeof n?n:e.unsigned)}var bu=4294967296,Cu=bu*bu,xu=Cu/2,Su=mu(1<<24),Eu=mu(0),ku=mu(0,!0),Iu=mu(1),Au=mu(1,!0),Nu=mu(-1),Tu=wu(-1,2147483647,!1),Du=wu(-1,-1,!0),Pu=wu(0,-2147483648,!1);function Ou(e){return e.unsigned?e.low>>>0:e.low}function Mu(e){return e.unsigned?(e.high>>>0)*bu+(e.low>>>0):e.high*bu+(e.low>>>0)}function Uu(e,n){if((n=n||10)<2||36<n)throw RangeError("radix");if(Bu(e))return"0";if(Lu(e)){if(Gu(e,Pu)){var t=gu(n),r=Zu(e,t),o=Vu(qu(r,t),e);return Uu(r,n)+Ou(o).toString(n)}return"-"+Uu(Wu(e),n)}for(var i=gu(_u(n,6),e.unsigned),s=e,u="";;){var c=Zu(s,i),a=(Ou(Vu(s,qu(c,i)))>>>0).toString(n);if(Bu(s=c))return a+u;for(;a.length<6;)a="0"+a;u=""+a+u}}function Bu(e){return 0===e.high&&0===e.low}function Lu(e){return!e.unsigned&&e.high<0}function Fu(e){return 1==(1&e.low)}function Gu(e,n){return du(n)||(n=vu(n)),(e.unsigned===n.unsigned||e.high>>>31!=1||n.high>>>31!=1)&&e.high===n.high&&e.low===n.low}function Ru(e,n){return $u(e,n)<0}function Hu(e,n){return $u(e,n)>0}function ju(e,n){return $u(e,n)>=0}function $u(e,n){if(du(n)||(n=vu(n)),Gu(e,n))return 0;var t=Lu(e),r=Lu(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:Lu(Vu(e,n))?-1:1}function Wu(e){return!e.unsigned&&Gu(e,Pu)?Pu:zu(function(e){return wu(~e.low,~e.high,e.unsigned)}(e),Iu)}function zu(e,n){du(n)||(n=vu(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,c=n.low>>>16,a=0,l=0,f=0,d=0;return f+=(d+=i+(65535&n.low))>>>16,l+=(f+=o+c)>>>16,a+=(l+=r+u)>>>16,a+=t+s,wu((f&=65535)<<16|(d&=65535),(a&=65535)<<16|(l&=65535),e.unsigned)}function Vu(e,n){return du(n)||(n=vu(n)),zu(e,Wu(n))}function qu(e,n){if(Bu(e))return e.unsigned?ku:Eu;if(du(n)||(n=vu(n)),lu)return wu(lu.mul(e.low,e.high,n.low,n.high),lu.get_high(),e.unsigned);if(Bu(n))return e.unsigned?ku:Eu;if(Gu(e,Pu))return Fu(n)?Pu:Eu;if(Gu(n,Pu))return Fu(e)?Pu:Eu;if(Lu(e))return Lu(n)?qu(Wu(e),Wu(n)):Wu(qu(Wu(e),n));if(Lu(n))return Wu(qu(e,Wu(n)));if(Ru(e,Su)&&Ru(n,Su))return gu(Mu(e)*Mu(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,c=n.low>>>16,a=65535&n.low,l=0,f=0,d=0,h=0;return d+=(h+=i*a)>>>16,f+=(d+=o*a)>>>16,d&=65535,f+=(d+=i*c)>>>16,l+=(f+=r*a)>>>16,f&=65535,l+=(f+=o*c)>>>16,f&=65535,l+=(f+=i*u)>>>16,l+=t*a+r*c+o*u+i*s,wu((d&=65535)<<16|(h&=65535),(l&=65535)<<16|(f&=65535),e.unsigned)}function Zu(e,n){if(du(n)||(n=vu(n)),Bu(n))throw Error("division by zero");var t,r,o;if(lu)return e.unsigned||-2147483648!==e.high||-1!==n.low||-1!==n.high?wu((e.unsigned?lu.div_u:lu.div_s)(e.low,e.high,n.low,n.high),lu.get_high(),e.unsigned):e;if(Bu(e))return e.unsigned?ku:Eu;if(e.unsigned){if(n.unsigned||(n=function(e){return e.unsigned?e:wu(e.low,e.high,!0)}(n)),Hu(n,e))return ku;if(Hu(n,function(e,n){if(du(n)&&(n=Ou(n)),0==(n&=63))return e;var t=e.high;return n<32?wu(e.low>>>n|t<<32-n,t>>>n,e.unsigned):wu(32===n?t:t>>>n-32,0,e.unsigned)}(e,1)))return Au;o=ku}else{if(Gu(e,Pu))return Gu(n,Iu)||Gu(n,Nu)?Pu:Gu(n,Pu)?Iu:Gu(t=function(e,n){return du(n)&&(n=Ou(n)),0==(n&=63)?e:n<32?wu(e.low<<n,e.high<<n|e.low>>>32-n,e.unsigned):wu(0,e.low<<n-32,e.unsigned)}(Zu(function(e,n){return du(n)&&(n=Ou(n)),0==(n&=63)?e:n<32?wu(e.low>>>n|e.high<<32-n,e.high>>n,e.unsigned):wu(e.high>>n-32,e.high>=0?0:-1,e.unsigned)}(e,1),n),1),Eu)?Lu(n)?Iu:Nu:o=zu(t,Zu(r=Vu(e,qu(n,t)),n));if(Gu(n,Pu))return e.unsigned?ku:Eu;if(Lu(e))return Lu(n)?Zu(Wu(e),Wu(n)):Wu(Zu(Wu(e),n));if(Lu(n))return Wu(Zu(e,Wu(n)));o=Eu}for(r=e;ju(r,n);){t=Math.max(1,Math.floor(Mu(r)/Mu(n)));for(var i=Math.ceil(Math.log(t)/Math.LN2),s=i<=48?1:_u(2,i-48),u=gu(t),c=qu(u,n);Lu(c)||Hu(c,r);)c=qu(u=gu(t-=s,e.unsigned),n);Bu(u)&&(u=Iu),o=zu(o,u),r=Vu(r,c)}return o}const Ju=Zu,Ku=Mu;function Yu(e=0,n=0,t=0,r=0,o=0){switch(arguments.length){case 1:return Ku(Ju(arguments[0],1e4));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 Xu(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 Yu(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*Yu(t,s,u,o,r)}}throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}(e),!0}catch(e){return!1}}class Qu{constructor(e){this.k=e}}function ec(e){return new Qu(e)}function nc(e){return e.k}class tc extends Qu{constructor(e,n,t,r){super(e),this.left=n,this.right=t,this.h=0|r}}function rc(e,n,t,r){return new tc(e,n,t,r)}function oc(e){return e.left}function ic(e){return e.right}function sc(e){return e.h}function uc(e,n){e:for(;;){const t=n;if(null!=e){const r=e;if(r instanceof tc){e=oc(r),n=uc(ic(r),t+1);continue e}return t+1|0}return 0|t}}function cc(e){return uc(e,0)}function ac(e,n,t){let r,o;r=null!=e?e instanceof tc?sc(e):1:0,o=null!=t?t instanceof tc?sc(t):1:0;const i=0|(r<o?o:r);return 0===i?ec(n):rc(n,e,t,i+1)}function lc(e,n,t){let r,o,i,s,u,c;if(u=null!=e?e instanceof tc?sc(e):1:0,c=null!=t?t instanceof tc?sc(t):1:0,c>u+2){const i=ne(t);if(i instanceof tc){if(r=oc(i),(null!=r?(o=r,o instanceof tc?sc(o):1):0)>u+1){const t=ne(oc(i));if(t instanceof tc)return ac(ac(e,n,oc(t)),nc(t),ac(ic(t),nc(i),ic(i)));throw new Error("internal error: Set.rebalance")}return ac(ac(e,n,oc(i)),nc(i),ic(i))}throw new Error("internal error: Set.rebalance")}if(u>c+2){const r=ne(e);if(r instanceof tc){if(i=ic(r),(null!=i?(s=i,s instanceof tc?sc(s):1):0)>c+1){const e=ne(ic(r));if(e instanceof tc)return ac(ac(oc(r),nc(r),oc(e)),nc(e),ac(ic(e),n,t));throw new Error("internal error: Set.rebalance")}return ac(oc(r),nc(r),ac(ic(r),n,t))}throw new Error("internal error: Set.rebalance")}return ac(e,n,t)}function fc(e,n,t){if(null!=t){const r=t,o=0|e.Compare(n,nc(r));if(r instanceof tc)return o<0?lc(fc(e,n,oc(r)),nc(r),ic(r)):0===o?t:lc(oc(r),nc(r),fc(e,n,ic(r)));{const o=0|e.Compare(n,nc(r));return o<0?rc(n,void 0,t,2):0===o?t:rc(n,t,void 0,2)}}return ec(n)}function dc(e,n,t){e:for(;;){const r=e,o=n;if(null!=t){const i=t,s=0|r.Compare(o,nc(i));if(i instanceof tc){if(s<0){e=r,n=o,t=oc(i);continue e}if(0===s)return!0;e=r,n=o,t=ic(i);continue e}return 0===s}return!1}}function hc(e,n){e:for(;;){const t=e;if(null!=n){const r=n;if(r instanceof tc){hc(t,oc(r)),t(nc(r)),e=t,n=ic(r);continue e}t(nc(r))}break}}class pc extends P{constructor(e,n){super(),this.stack=e,this.started=n}}function mc(e){e:for(;;){const n=e;if(on(n))return nn();{const t=un(n),r=cn(n);if(null!=t){const o=t;if(o instanceof tc){e=hn([oc(o),ec(nc(o)),ic(o)],r);continue e}return n}e=r;continue e}}}function gc(e){return new pc(mc(rn(e)),!1)}function wc(e){if(e.started){const n=e.stack;if(on(n))return function(){throw new Error("Enumeration already started")}();if(null!=un(n))return nc(un(n));throw new Error("Please report error: Set iterator, unexpected stack for current")}return function(){throw new Error("Enumeration not started")}()}function _c(e){let n=gc(e);return{"System.Collections.Generic.IEnumerator`1.get_Current":()=>wc(n),"System.Collections.IEnumerator.get_Current":()=>wc(n),"System.Collections.IEnumerator.MoveNext":()=>function(e){if(e.started){const n=e.stack;if(on(n))return!1;if(null!=un(n)){if(un(n)instanceof tc)throw new Error("Please report error: Set iterator, unexpected stack for moveNext");return e.stack=mc(cn(n)),!on(e.stack)}throw new Error("Please report error: Set iterator, unexpected stack for moveNext")}return e.started=!0,!on(e.stack)}(n),"System.Collections.IEnumerator.Reset"(){n=gc(e)},Dispose(){}}}function yc(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(on(s[0]))return on(s[1])?0:-1;if(on(s[1]))return 1;if(null!=un(s[1]))if(null!=un(s[0])){const u=un(s[0]),c=un(s[1]);if(u instanceof tc)if(null==oc(u)){if(!(c instanceof tc)){const o=0|r.Compare(nc(u),nc(c));if(0!==o)return 0|o;e=r,n=tn(ic(u),cn(s[0])),t=tn(void 0,cn(s[1]));continue e}if(null==oc(c)){const o=0|r.Compare(nc(u),nc(c));if(0!==o)return 0|o;e=r,n=tn(ic(u),cn(s[0])),t=tn(ic(c),cn(s[1]));continue e}{const s=[o,i];let u,c,a,l,f;switch(on(s[0])?on(s[1])?u=2:null!=un(s[1])?(u=1,l=cn(s[1]),f=un(s[1])):u=2:null!=un(s[0])?(u=0,c=cn(s[0]),a=un(s[0])):on(s[1])?u=2:null!=un(s[1])?(u=1,l=cn(s[1]),f=un(s[1])):u=2,u){case 0:if(a instanceof tc){e=r,n=hn([oc(a),rc(nc(a),void 0,ic(a),0)],c),t=i;continue e}e=r,n=hn([void 0,ec(nc(a))],c),t=i;continue e;case 1:if(f instanceof tc){e=r,n=o,t=hn([oc(f),rc(nc(f),void 0,ic(f),0)],l);continue e}e=r,n=o,t=hn([void 0,ec(nc(f))],l);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}}else{const s=[o,i];let u,c,a,l,f;switch(on(s[0])?on(s[1])?u=2:null!=un(s[1])?(u=1,l=cn(s[1]),f=un(s[1])):u=2:null!=un(s[0])?(u=0,c=cn(s[0]),a=un(s[0])):on(s[1])?u=2:null!=un(s[1])?(u=1,l=cn(s[1]),f=un(s[1])):u=2,u){case 0:if(a instanceof tc){e=r,n=hn([oc(a),rc(nc(a),void 0,ic(a),0)],c),t=i;continue e}e=r,n=hn([void 0,ec(nc(a))],c),t=i;continue e;case 1:if(f instanceof tc){e=r,n=o,t=hn([oc(f),rc(nc(f),void 0,ic(f),0)],l);continue e}e=r,n=o,t=hn([void 0,ec(nc(f))],l);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}else{if(!(c instanceof tc)){const o=0|r.Compare(nc(u),nc(c));if(0!==o)return 0|o;e=r,n=cn(s[0]),t=cn(s[1]);continue e}if(null==oc(c)){const o=0|r.Compare(nc(u),nc(c));if(0!==o)return 0|o;e=r,n=tn(void 0,cn(s[0])),t=tn(ic(c),cn(s[1]));continue e}{const s=[o,i];let u,c,a,l,f;switch(on(s[0])?on(s[1])?u=2:null!=un(s[1])?(u=1,l=cn(s[1]),f=un(s[1])):u=2:null!=un(s[0])?(u=0,c=cn(s[0]),a=un(s[0])):on(s[1])?u=2:null!=un(s[1])?(u=1,l=cn(s[1]),f=un(s[1])):u=2,u){case 0:if(a instanceof tc){e=r,n=hn([oc(a),rc(nc(a),void 0,ic(a),0)],c),t=i;continue e}e=r,n=hn([void 0,ec(nc(a))],c),t=i;continue e;case 1:if(f instanceof tc){e=r,n=o,t=hn([oc(f),rc(nc(f),void 0,ic(f),0)],l);continue e}e=r,n=o,t=hn([void 0,ec(nc(f))],l);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}}}else{un(s[1]);const u=[o,i];let c,a,l,f,d;switch(on(u[0])?on(u[1])?c=2:null!=un(u[1])?(c=1,f=cn(u[1]),d=un(u[1])):c=2:null!=un(u[0])?(c=0,a=cn(u[0]),l=un(u[0])):on(u[1])?c=2:null!=un(u[1])?(c=1,f=cn(u[1]),d=un(u[1])):c=2,c){case 0:if(l instanceof tc){e=r,n=hn([oc(l),rc(nc(l),void 0,ic(l),0)],a),t=i;continue e}e=r,n=hn([void 0,ec(nc(l))],a),t=i;continue e;case 1:if(d instanceof tc){e=r,n=o,t=hn([oc(d),rc(nc(d),void 0,ic(d),0)],f);continue e}e=r,n=o,t=hn([void 0,ec(nc(d))],f);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}else{if(null==un(s[0])){e=r,n=cn(s[0]),t=cn(s[1]);continue e}{un(s[0]);const u=[o,i];let c,a,l,f,d;switch(on(u[0])?on(u[1])?c=2:null!=un(u[1])?(c=1,f=cn(u[1]),d=un(u[1])):c=2:null!=un(u[0])?(c=0,a=cn(u[0]),l=un(u[0])):on(u[1])?c=2:null!=un(u[1])?(c=1,f=cn(u[1]),d=un(u[1])):c=2,c){case 0:if(l instanceof tc){e=r,n=hn([oc(l),rc(nc(l),void 0,ic(l),0)],a),t=i;continue e}e=r,n=hn([void 0,ec(nc(l))],a),t=i;continue e;case 1:if(d instanceof tc){e=r,n=o,t=hn([oc(d),rc(nc(d),void 0,ic(d),0)],f);continue e}e=r,n=o,t=hn([void 0,ec(nc(d))],f);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}}break}}(e,rn(n),rn(t))}function vc(e,n,t){let r=t;hc((e=>{n[r]=e,r=r+1|0}),e)}function bc(n,t){if(e(t))return function(e,n){return ae(((n,t)=>fc(e,t,n)),void 0,n)}(n,t);if(t instanceof qe)return function(e,n){return ln(((n,t)=>fc(e,t,n)),void 0,n)}(n,t);{const e=s(t);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=fc(r,i["System.Collections.Generic.IEnumerator`1.get_Current"](),o),t=i}}(n,void 0,e)}finally{r(e)}}}class Cc{constructor(e,n){this.comparer=e,this.tree=n}GetHashCode(){return 0|function(e){let n,t=0;const o=s(e);try{for(;o["System.Collections.IEnumerator.MoveNext"]();)t=0|(n=0|m(o["System.Collections.Generic.IEnumerator`1.get_Current"]()),(t<<1)+n+631)}finally{r(o)}return 0|Math.abs(t)}(this)}Equals(e){return e instanceof Cc&&0===yc(xc(this),Sc(this),Sc(e))}toString(){return"set ["+He("; ",Hn((e=>T(e)),this))+"]"}get[Symbol.toStringTag](){return"FSharpSet"}toJSON(e){return Array.from(this)}CompareTo(e){return 0|yc(xc(this),Sc(this),Sc(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 dc(xc(this),e,Sc(this))}"System.Collections.Generic.ICollection`1.CopyToZ2E171D71"(e,n){vc(Sc(this),e,n)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return 0|Ec(this)}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return 0|Ec(this)}GetEnumerator(){return _c(Sc(this))}[Symbol.iterator](){return u(this.GetEnumerator())}"System.Collections.IEnumerable.GetEnumerator"(){return _c(Sc(this))}get size(){return 0|Ec(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 dc(xc(e),n,Sc(e))}(this,e)}keys(){return Hn((e=>e),this)}values(){return Hn((e=>e),this)}entries(){return Hn((e=>[e,e]),this)}forEach(e,n){const t=this;Rn((n=>{e(n,n,t)}),t)}}function xc(e){return e.comparer}function Sc(e){return e.tree}function Ec(e){return cc(Sc(e))}function kc(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 Ic(e,n,t){const r=n(e,t);if(1===r.tag){const e=r.fields[0];return new st(1,function(e,n){const t=2===n.tag?kc(n.fields[0],n.fields[1],!0):1===n.tag?kc(n.fields[0],n.fields[1],!1)+"\nReason: "+n.fields[2]:3===n.tag?kc(n.fields[0],n.fields[1],!0):4===n.tag?kc(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"+He("\n\n",n.fields[0]):6===n.tag?"The following `failure` occurred with the decoder: "+n.fields[0]:kc(n.fields[0],n.fields[1],!1);return 7===n.tag?t:"Error at: `"+e+"`\n"+t}(e[0],e[1]))}return new st(0,r.fields[0])}function Ac(e,n){try{return Ic("$",e,JSON.parse(n))}catch(e){if(e instanceof SyntaxError)return new st(1,"Given an invalid JSON: "+e.message);throw e}}function Nc(e,n){return"string"==typeof n?new st(0,n):new st(1,[e,new Js(0,"a string",n)])}const Tc=e=>n=>{const t="a sbyte",r=e,o=n;if("number"==typeof o){const e=o;return isFinite(e)&&Math.floor(e)===e?-128<=e&&e<=127?new st(0,(e+128&255)-128):new st(1,[r,new Js(1,t,e,"Value was either too large or too small for "+t)]):new st(1,[r,new Js(1,t,e,"Value is not an integral value")])}if("string"==typeof o){let e,n=0;return e=[uu(o,511,!1,8,new O((()=>n),(e=>{n=0|e}))),n],e[0]?new st(0,e[1]):new st(1,[r,new Js(0,t,o)])}return new st(1,[r,new Js(0,t,o)])},Dc=e=>n=>{const t="a byte",r=e,o=n;if("number"==typeof o){const e=o;return isFinite(e)&&Math.floor(e)===e?0<=e&&e<=255?new st(0,255&e):new st(1,[r,new Js(1,t,e,"Value was either too large or too small for "+t)]):new st(1,[r,new Js(1,t,e,"Value is not an integral value")])}if("string"==typeof o){let e,n=0;return e=[uu(o,511,!0,8,new O((()=>n),(e=>{n=e}))),n],e[0]?new st(0,e[1]):new st(1,[r,new Js(0,t,o)])}return new st(1,[r,new Js(0,t,o)])},Pc=e=>n=>{const t="an int16",r=e,o=n;if("number"==typeof o){const e=o;return isFinite(e)&&Math.floor(e)===e?-32768<=e&&e<=32767?new st(0,(e+32768&65535)-32768):new st(1,[r,new Js(1,t,e,"Value was either too large or too small for "+t)]):new st(1,[r,new Js(1,t,e,"Value is not an integral value")])}if("string"==typeof o){let e,n=0;return e=[uu(o,511,!1,16,new O((()=>n),(e=>{n=0|e}))),n],e[0]?new st(0,e[1]):new st(1,[r,new Js(0,t,o)])}return new st(1,[r,new Js(0,t,o)])},Oc=e=>n=>{const t="an uint16",r=e,o=n;if("number"==typeof o){const e=o;return isFinite(e)&&Math.floor(e)===e?0<=e&&e<=65535?new st(0,65535&e):new st(1,[r,new Js(1,t,e,"Value was either too large or too small for "+t)]):new st(1,[r,new Js(1,t,e,"Value is not an integral value")])}if("string"==typeof o){let e,n=0;return e=[uu(o,511,!0,16,new O((()=>n),(e=>{n=e}))),n],e[0]?new st(0,e[1]):new st(1,[r,new Js(0,t,o)])}return new st(1,[r,new Js(0,t,o)])},Mc=e=>n=>{const t="an int",r=e,o=n;if("number"==typeof o){const e=o;return isFinite(e)&&Math.floor(e)===e?-2147483648<=e&&e<=2147483647?new st(0,~~e):new st(1,[r,new Js(1,t,e,"Value was either too large or too small for "+t)]):new st(1,[r,new Js(1,t,e,"Value is not an integral value")])}if("string"==typeof o){let e,n=0;return e=[uu(o,511,!1,32,new O((()=>n),(e=>{n=0|e}))),n],e[0]?new st(0,e[1]):new st(1,[r,new Js(0,t,o)])}return new st(1,[r,new Js(0,t,o)])},Uc=e=>n=>{const t="an uint32",r=e,o=n;if("number"==typeof o){const e=o;return isFinite(e)&&Math.floor(e)===e?0<=e&&e<=4294967295?new st(0,e>>>0):new st(1,[r,new Js(1,t,e,"Value was either too large or too small for "+t)]):new st(1,[r,new Js(1,t,e,"Value is not an integral value")])}if("string"==typeof o){let e,n=0;return e=[uu(o,511,!0,32,new O((()=>n),(e=>{n=e}))),n],e[0]?new st(0,e[1]):new st(1,[r,new Js(0,t,o)])}return new st(1,[r,new Js(0,t,o)])};function Bc(e,n,t,r){let o;const i=t+".["+l(e)+"]";if(Array.isArray(r)){const t=r;return e<t.length?n(i,t[e]):new st(1,[i,new Js(5,"a longer array. Need index `"+l(e)+"` but there are only `"+(o=t.length,l(o)+"` entries"),r)])}return new st(1,[i,new Js(0,"an array",r)])}function Lc(e,n,t){if(Array.isArray(t)){let r=-1;return ut(fn,ae(((t,o)=>{if(r=r+1|0,0===t.tag){const i=e(n+".["+l(r)+"]",o);return 0===i.tag?new st(0,tn(i.fields[0],t.fields[0])):new st(1,i.fields[0])}return t}),new st(0,nn()),t))}return new st(1,[n,new Js(0,"a list",t)])}function Fc(e,n,t){if(Array.isArray(t)){let r=-1;const o=t;return ae(((t,o)=>{if(r=r+1|0,0===t.tag){const i=t.fields[0],s=e(n+".["+l(r)+"]",o);return 0===s.tag?(i[r]=s.fields[0],new st(0,i)):new st(1,s.fields[0])}return t}),new st(0,ue(new Array(o.length),0,o.length,null)),o)}return new st(1,[n,new Js(0,"an array",t)])}function Gc(e,n,t,r){const o=n(t,r);return 0===o.tag?e(o.fields[0],t,r):new st(1,o.fields[0])}function Rc(e,n){let t;const r=e;return t=e=>n=>Bc(0,r,e,n),e=>r=>Gc(I(3,(e=>{let t;const r=n;return t=e=>n=>Bc(1,r,e,n),n=>r=>Gc(((n,t,r)=>new st(0,[e,n])),I(2,t),n,r)})),I(2,t),e,r)}function Hc(e){return Fs(e)}function jc(e){return function(e,n){return new Cc(e,n)}(n={Compare:x},bc(n,e));var n}function $c(e,n,t,r){let o;const i=n.length+e|0;if(i!==r.length)return new st(1,[t,new Js(6,(o=0|r.length,Ue(Pe("Expected array of length %i but got %i"))(i)(o)))]);{let o=new st(0,nn());for(let i=e;i<=r.length-1;i++)if(0===o.tag){const s=o.fields[0],u=Ue(Pe("%s[%i]"))(t)(i),c=n[i-e],a=r[i];o=ut((e=>tn(e,s)),c(u)(a))}return ut(fn,o)}}function Wc(e,n,t,r,o,i){const s=function(e,n){return n.find((e=>Zo(e)===r))}(0,function(e){if(null!=e.cases)return e.cases();throw new Error(`${e.fullname} is not an F# union type`)}(t));if(null!=s){const t=s,r=ce((t=>Vc(e,n,!1,t[1])),function(e){return null==e.fields?[]:e.fields}(t));return ut((e=>function(e,n){const t=(e.fields||[]).length;if(n.length!==t)throw new Error(`Expected an array of length ${t} but got ${n.length}`);return null!=e.declaringType.construct?new e.declaringType.construct(e.tag,...n):{}}(t,an(e))),0===r.length&&i.length<=1?new st(0,nn()):$c(1,r,o,i))}return new st(1,[o,new Js(6,"Cannot find case "+r+" in "+Jo(t))])}function zc(e,n,t,r){const o=new O(null);let i;const s=Jo(r);let u;if(i=""===s?e:function(e,n,t){return Ls(e.comparer,Ss(e.comparer,n,t,e.tree))}(e,s,o),function(e){return e instanceof Go?null!=e.fields:e instanceof P}(r)){const e=ce((e=>[eu(n,Zo(e)),Vc(i,n,!1,e[1])]),ei(r));u=n=>t=>ut((e=>function(e,n){const t=ei(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,an(e))),function(e,n,t){return null===t||Object.getPrototypeOf(t||!1)!==Object.prototype?new st(1,[n,new Js(0,"an object",t)]):function(e,n,t){return n.reduceRight(((n,t)=>e(t,n)),t)}(I(2,(e=>{const r=e[0];return o=>0===o.tag?ut((e=>tn(e,o.fields[0])),e[1](n+"."+r)(t[r])):o})),e,new st(0,nn()))}(e,n,t))}else if(function(e){return e instanceof Go?null!=e.cases:e instanceof D}(r))u=e=>t=>{if("string"==typeof t)return Wc(i,n,r,t,e,[]);if(Array.isArray(t)){const u=t;return 0===(o=Nc(e+"[0]",u[0])).tag?(s=o.fields[0],Wc(i,n,r,s,e,u)):new st(1,o.fields[0])}var o,s;return new st(1,[e,new Js(0,"a string or array",t)])};else{if(!t){let e;const n=Jo(r);throw e=Ue(Pe("Cannot generate auto decoder for %s. Please pass an extra decoder.\n\nDocumentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders"))(n),new Error(e)}u=e=>n=>new st(1,[e,new Js(2,"an extra coder for "+Jo(r),n)])}return o.contents=u,u}function Vc(e,n,t,r){let o,i,s,u;const c=Jo(r),a=function(e,n){return Es(e.comparer,n,e.tree)}(e,c);if(null==a){if(function(e){return null!=Ko(e)}(r)){const t=Vc(e,n,!1,Ko(r));return e=>n=>Fc(I(2,t),e,n)}if(Yo(r)){const e=Jo(function(e){var n;return null===(n=e.generics)||void 0===n?void 0:n[0]}(r));if("System.SByte"===e)return e=>n=>{const t=r,o=e,i=n,s=Tc(o)(i);if(1===s.tag)return new st(1,s.fields[0]);{const e=s.fields[0];return Fn(e,Xo(t),{Equals:(e,n)=>e===n,GetHashCode:h})?new st(0,Qo(t,e.toString())):new st(1,[o,new Js(1,Jo(t),i,"Unkown value provided for the enum")])}};if("System.Byte"===e)return e=>n=>{const t=r,o=e,i=n,s=Dc(o)(i);if(1===s.tag)return new st(1,s.fields[0]);{const e=s.fields[0];return Fn(e,Xo(t),{Equals:(e,n)=>e===n,GetHashCode:h})?new st(0,Qo(t,e.toString())):new st(1,[o,new Js(1,Jo(t),i,"Unkown value provided for the enum")])}};if("System.Int16"===e)return e=>n=>{const t=r,o=e,i=n,s=Pc(o)(i);if(1===s.tag)return new st(1,s.fields[0]);{const e=s.fields[0];return Fn(e,Xo(t),{Equals:(e,n)=>e===n,GetHashCode:h})?new st(0,Qo(t,e.toString(u))):new st(1,[o,new Js(1,Jo(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=Oc(o)(i);if(1===s.tag)return new st(1,s.fields[0]);{const e=s.fields[0];return Fn(e,Xo(t),{Equals:(e,n)=>e===n,GetHashCode:h})?new st(0,Qo(t,e.toString())):new st(1,[o,new Js(1,Jo(t),i,"Unkown value provided for the enum")])}};if("System.Int32"===e)return e=>n=>{const t=r,o=e,i=n,s=Mc(o)(i);if(1===s.tag)return new st(1,s.fields[0]);{const e=s.fields[0];return Fn(e,Xo(t),{Equals:(e,n)=>e===n,GetHashCode:h})?new st(0,Qo(t,l(e))):new st(1,[o,new Js(1,Jo(t),i,"Unkown value provided for the enum")])}};if("System.UInt32"===e)return e=>n=>{const t=r,o=e,i=n,s=Uc(o)(i);if(1===s.tag)return new st(1,s.fields[0]);{const e=s.fields[0];return Fn(e,Xo(t),{Equals:(e,n)=>e===n,GetHashCode:h})?new st(0,Qo(t,e.toString())):new st(1,[o,new Js(1,Jo(t),i,"Unkown value provided for the enum")])}};{const e=Jo(r),n=Me((e=>{throw new Error(e)}),Pe("Cannot generate auto decoder for %s.\nThoth.Json.Net only support the following enum types:\n- sbyte\n- byte\n- int16\n- uint16\n- int\n- uint32\nIf you can't use one of these types, please pass an extra decoder.\n "))(e);return e=>n(e)}}if(function(e){return null!=e.generics&&e.generics.length>0}(r)){if(ni(r)){const t=ce((t=>Vc(e,n,!1,t)),function(e){if(ni(e)&&null!=e.generics)return e.generics;throw new Error(`${e.fullname} is not a tuple type`)}(r));return e=>n=>Array.isArray(n)?ut((e=>an(e)),$c(0,t,e,n)):new st(1,[e,new Js(0,"an array",n)])}{const c=Jo(function(e){return null==e.generics?e:new Go(e.fullname,e.generics.map((()=>Vo)))}(r));if("Microsoft.FSharp.Core.FSharpOption`1[System.Object]"===c)return o=Vc(e,n,!0,Ro(r)[0]),e=>n=>{return t=I(2,o),r=e,null==(i=n)?new st(0,void 0):ut(ee,t(r,i));var t,r,i};if("Microsoft.FSharp.Collections.FSharpList`1[System.Object]"===c)return i=Vc(e,n,!1,Ro(r)[0]),e=>n=>Lc(I(2,i),e,n);if("System.Collections.Generic.IEnumerable`1[System.Object]"===c)return s=Vc(e,n,!1,Ro(r)[0]),e=>n=>function(e,n,t){if(Array.isArray(t)){let r=-1;return ut(Wn,ae(((t,o)=>{if(r=r+1|0,0===t.tag){const i=e(n+".["+l(r)+"]",o);return 0===i.tag?new st(0,Bn([i.fields[0]],t.fields[0])):new st(1,i.fields[0])}return t}),new st(0,[]),t))}return new st(1,[n,new Js(0,"a seq",t)])}(I(2,s),e,n);if("Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]"===c){const t=Vc(e,n,!1,Ro(r)[0]),o=Vc(e,n,!1,Ro(r)[1]);let i;const s=pn([e=>n=>function(e,n,t,r){return null===r||Object.getPrototypeOf(r||!1)!==Object.prototype?new st(1,[t,new Js(0,"an object",r)]):Gn(((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 st(0,tn([s.fields[0],e.fields[0]],o.fields[0])):new st(1,e.fields[0])}return new st(1,s.fields[0])}return o}),new st(0,nn()),Object.keys(r))}(I(2,t),I(2,o),e,n),(u=Rc(I(2,t),I(2,o)),e=>n=>Lc(I(2,u),e,n))]);return i=e=>n=>{return t=e,r=n,((e,n)=>{e:for(;;){const o=e,i=n;if(on(o))return new st(1,[t,new Js(7,i)]);{const s=Ic(t,I(2,un(o)),r);if(1===s.tag){e=cn(o),n=mn(i,rn(s.fields[0]));continue e}return new st(0,s.fields[0])}}})(s,nn());var t,r},e=>n=>function(e,n,t,r){const o=n(t,r);return 1===o.tag?new st(1,o.fields[0]):new st(0,e(o.fields[0]))}(Hc,I(2,i),e,n)}if("Microsoft.FSharp.Collections.FSharpSet`1[System.Object]"===c){const t=Vc(e,n,!1,Ro(r)[0]);return e=>n=>{const r=Fc(I(2,t),e,n);return 0===r.tag?new st(0,jc(r.fields[0])):new st(1,r.fields[0])}}return zc(e,n,t,r)}}return"System.Boolean"===c?e=>n=>{return t=e,"boolean"==typeof(r=n)?new st(0,r):new st(1,[t,new Js(0,"a boolean",r)]);var t,r}:"Microsoft.FSharp.Core.Unit"===c?e=>n=>{return t=e,null==(r=n)?new st(0,void 0):new st(1,[t,new Js(0,"null",r)]);var t,r}:"System.String"===c?e=>n=>Nc(e,n):"System.Char"===c?e=>n=>function(e,n){if("string"==typeof n){const t=n;return 1===t.length?new st(0,t[0]):new st(1,[e,new Js(0,"a single character string",n)])}return new st(1,[e,new Js(0,"a char",n)])}(e,n):"System.SByte"===c?Tc:"System.Byte"===c?Dc:"System.Int16"===c?Pc:"System.UInt16"===c?Oc:"System.Int32"===c?Mc:"System.UInt32"===c?Uc:"System.Double"===c?e=>n=>{return t=e,"number"==typeof(r=n)?new st(0,r):new st(1,[t,new Js(0,"a float",r)]);var t,r}:"System.Single"===c?e=>n=>{return t=e,"number"==typeof(r=n)?new st(0,r):new st(1,[t,new Js(0,"a float32",r)]);var t,r}:"System.DateTime"===c?e=>n=>function(e,n){if("string"==typeof n){let r,o=me(-621355968e5,0);return r=[we(n,new O((()=>o),(e=>{o=e}))),o],r[0]?new st(0,1===(t=r[1]).kind?t:me(t.getTime(),1)):new st(1,[e,new Js(0,"a datetime",n)])}var t;return new st(1,[e,new Js(0,"a datetime",n)])}(e,n):"System.DateTimeOffset"===c?e=>n=>function(e,n){if("string"==typeof n){let t,r=cu(-621355968e5,0);return t=[au(n,new O((()=>r),(e=>{r=e}))),r],t[0]?new st(0,t[1]):new st(1,[e,new Js(0,"a datetimeoffset",n)])}return new st(1,[e,new Js(0,"a datetime",n)])}(e,n):"System.TimeSpan"===c?e=>n=>function(e,n){if("string"==typeof n){let t,r=0;return t=[Xu(n,new O((()=>r),(e=>{r=e}))),r],t[0]?new st(0,t[1]):new st(1,[e,new Js(0,"a timespan",n)])}return new st(1,[e,new Js(0,"a timespan",n)])}(e,n):"System.Guid"===c?e=>n=>function(e,n){if("string"==typeof n){let t,r="00000000-0000-0000-0000-000000000000";return t=[ou(n,new O((()=>r),(e=>{r=e}))),r],t[0]?new st(0,t[1]):new st(1,[e,new Js(0,"a guid",n)])}return new st(1,[e,new Js(0,"a guid",n)])}(e,n):"System.Object"===c?e=>e=>new st(0,e):zc(e,n,t,r)}{const e=a;return n=>t=>e.contents(n)(t)}}function qc(e){return null!=e?(n=(e,n)=>new O(n[1]),function(e,n){return Ls(e.comparer,Ns(n,e.tree))}(e.Coders,n)):js();var n}function Zc(e,n,t){const r=re(n,new Ks(0));return Vc(qc(t),r,!1,e)}class Jc extends P{constructor(e,n,t,r,o){super(),this.StreamId=e,this.Name=n,this.Website=t,this.ContactDetails=r,this.Notes=o}}class Kc extends P{constructor(e,n,t,r,o,i,s,u,c){super(),this.StreamId=e,this.PartnerId=n,this.Name=t,this.Website=r,this.ContactDetails=o,this.Notes=i,this.LegalEntity=s,this.ExternalId=u,this.ChannelId=c}}class Yc extends P{constructor(e,n,t,r,o,i,s,u,c){super(),this.AccountId=e,this.Name=n,this.Contact=t,this.ContactMobilePhone=r,this.Website=o,this.BusinessName=i,this.BusinessNumber=s,this.ExternalId=u,this.ChannelId=c}}class Xc extends P{constructor(e,n){super(),this.Accounts=e,this.Token=n}}function Qc(e){return new Lo(0,q(e))}function ea(e){return`${e}/account-registry/admin`}function na(e,n){return Ao.Delay((()=>{const t=qs((r=Ue(Pe("Bearer %s"))(e),new us(0,"Authorization",r)),n);var r;let o;const i=Zs(t);return o=Ao.Bind(i,(e=>Ao.Return(new st(0,e)))),Ao.Bind(o,(e=>{const n=e;if(1===n.tag)return Ao.Return(new st(1,n.fields[0]));{const e=n.fields[0];if(429===e.statusCode||e.statusCode>=500){const e=Zs(t);return Ao.Bind(e,(e=>Ao.Return(new st(0,e))))}return Ao.Return(new st(0,e))}}))}))}function ta(e,n){return Ao.Delay((()=>{let t;const r=na(n,Vs(new ss(0),zs((t=ea(e),`${t}/partners`))));return Ao.Bind(r,(e=>{const n=e;if(1===n.tag)return Ao.Return(new st(1,n.fields[0]));{const e=n.fields[0];if(200===e.statusCode){let n;const t=Ac(I(2,Zc(zo($o("Dto.AdminApi.Partner",[],Jc,(()=>[["StreamId",qo],["Name",qo],["Website",qo],["ContactDetails",li()],["Notes",Wo(qo)]]))),new Ks(1),void 0)),e.responseText);return n=1===t.tag?new st(1,t.fields[0]):function(e,n){return function(e,n,t){e:for(;;){const r=e,o=n,i=t;if(on(i)){const e=r;return 1===e.tag?new st(1,e.fields[0]):new st(0,fn(e.fields[0]))}{let s;const u=o(un(i));if(1===u.tag)s=new st(1,u.fields[0]);else{const e=r;s=1===e.tag?new st(1,e.fields[0]):new st(0,tn(u.fields[0],e.fields[0]))}if(1===s.tag)return s;e=s,n=o,t=cn(i);continue e}}}(new st(0,nn()),e,n)}((e=>e),wn(Gi,t.fields[0])),Ao.Return(n)}return Ao.Return(new st(1,"Unexpected response from backend"))}}))}))}function ra(e,n,t,r,o){return Ao.Delay((()=>{let i,s,u,c,a;const l="?"+He("&",function(e,n){const t=Je(),r=ln(((e,n)=>{if(null==n)return e;{const t=new qe(ne(n),void 0);return e.tail=t,t}}),t,n),o=Je();return r.tail=o,en(t)}(0,pn([(i=Oi(r.SearchText),Re(i)?void 0:`search=${encodeURIComponent(i)}`),(f=r.Sort,s=[f.fields[0],f.fields[1]],1===s[0].tag?1===s[1].tag?"sort_by=name&sort_direction=desc":"sort_by=name&sort_direction=asc":1===s[1].tag?"sort_by=accountid&sort_direction=desc":"sort_by=accountid&sort_direction=asc"),(u=0|Ui(r.PageSize),u<=100&&u>=10?`page_size=${u}`:void 0)])));var f;const d=na(n,(c=Vs(new ss(0),zs((a=ea(e),`${a}/partners/${Fo(t)}/accounts${l}`))),null==o?c:qs(new us(0,"token",o),c)));return Ao.Bind(d,(e=>{const n=e;if(1===n.tag)return Ao.Return(new st(1,n.fields[0]));{const e=n.fields[0];if(200===e.statusCode){const n=Ac(I(2,Zc($o("Dto.AdminApi.AccountLookup",[],Xc,(()=>[["Accounts",zo($o("Dto.AdminApi.AccountLookupItem",[],Yc,(()=>[["AccountId",qo],["Name",qo],["Contact",qo],["ContactMobilePhone",qo],["Website",qo],["BusinessName",Wo(qo)],["BusinessNumber",Wo(qo)],["ExternalId",Wo(qo)],["ChannelId",Wo(qo)]])))],["Token",Wo(qo)]])),new Ks(1),void 0)),e.responseText);return Ao.Return(n)}return Ao.Return(new st(1,"Unexpected response from backend"))}}))}))}const oa=Nr((function(e,n){return Ct("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:n},e),Ct("path",{fillRule:"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",clipRule:"evenodd"}))}));class ia extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["BreadCrumb"]}}function sa(){return new ia(0,["Partners",$i(new Hi(0))])}function ua(e,n){return new ia(0,[n,$i(new Hi(1,e))])}function ca(e){return new ia(0,[e,void 0])}function aa(e){let n,t;const r=e.partner;if(null==r)t="...";else{const e=r,n=e.Name;t=2===n.tag?1===n.fields[0].tag?J(e.Id):F(n.fields[0].fields[0]):"..."}let o;const i=e.account;if(null==i)o="...";else{const e=i,n=e.Name;o=2===n.tag?1===n.fields[0].tag?Y(e.Id):F(n.fields[0].fields[0]):"..."}let s;const u=[e.partner,e.account];let c,a,l,f;switch(null==u[0]?c=2:null==u[1]?(c=1,f=u[0]):(c=0,a=u[1],l=u[0]),c){case 0:s=pn([sa(),ua(l.Id,t),(d=l.Id,new ia(0,["Accounts",$i(new Hi(3,d))])),ca(o)]);break;case 1:s=pn([sa(),ua(f.Id,t)]);break;case 2:s=nn()}var d;return function(e){let n,t;return Ct("nav",E(pn([["className","pt-2"],["aria-label","Breadcrumb"],(n=[Ct("ol",E(pn([["className","-ml-3 max-w-screen-xl w-full flex space-x-4"],(t=gn(((e,n)=>function(e,n,t,r){let o,i;return Ct("li",E(pn([["key",e],["className","flex"],(o=[Ct("div",E(pn([["className","flex items-center"],(i=Mn(Nn((()=>{let r;return Bn(t?Dn():Pn((r={className:"flex-shrink-0 h-5 w-5 text-gray-400"},Ct(oa,r))),Nn((()=>Pn(Ct("a",E(Mn(Nn((()=>Bn(Pn(["children",e]),Nn((()=>Bn(null!=n?Pn(["href",yi(ne(n),1)]):Dn(),Nn((()=>Pn(["className","ml-4 text-sm font-medium text-gray-500 hover:text-gray-700"]))))))))))))))))}))),["children",co.Children.toArray(Array.from(i))])])))],["children",co.Children.toArray(Array.from(o))])])))}(n.fields[0][0],n.fields[0][1],0===e)),e),["children",co.Children.toArray(Array.from(t))])])))],["children",co.Children.toArray(Array.from(n))])])))}((n=e.page,13===n.tag||1===n.tag||3===n.tag?s:4===n.tag?mn(s,rn(function(e){return new ia(0,["Super",$i(new Hi(4,e))])}(n.fields[0]))):5===n.tag?mn(s,rn(function(e){return new ia(0,["Benefits",$i(new Hi(5,e))])}(n.fields[0]))):6===n.tag?mn(s,rn(function(e){return new ia(0,["Bank Details",$i(new Hi(6,e))])}(n.fields[0]))):2===n.tag?mn(s,rn(function(e){return new ia(0,["Directory",$i(new Hi(2,e))])}(n.fields[0]))):7===n.tag?s:8===n.tag?mn(s,rn(function(e,n){let t;return new ia(0,["Directory",$i((t=[e,n],new Hi(8,t[0],t[1])))])}(n.fields[0],n.fields[1]))):9===n.tag?mn(s,rn(function(e,n){let t;return new ia(0,["Super",$i((t=[e,n],new Hi(9,t[0],t[1])))])}(n.fields[0],n.fields[1]))):10===n.tag?mn(s,rn(function(e,n){let t;return new ia(0,["Benefits",$i((t=[e,n],new Hi(10,t[0],t[1])))])}(n.fields[0],n.fields[1]))):11===n.tag?mn(s,rn(function(e,n){let t;return new ia(0,["Bank Details",$i((t=[e,n],new Hi(11,t[0],t[1])))])}(n.fields[0],n.fields[1]))):12===n.tag?mn(s,rn(function(e,n){let t;return new ia(0,["Salary Packaging",$i((t=[e,n],new Hi(12,t[0],t[1])))])}(n.fields[0],n.fields[1]))):s))}class la extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Tab"]}}function fa(e){return e.fields[0]}function da(e,n){const t=(null!=n?"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300":"border-indigo-500 text-indigo-600")+" whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm";return r=Ct("a",E(Mn(Nn((()=>Bn(Pn(["key",e]),Nn((()=>Bn(Pn(["children",e]),Nn((()=>Bn(Pn(["className",t]),Nn((()=>null!=n?Pn(["href",yi(rn(ne(n)),1)]):Dn())))))))))))))),new la(0,r);var r}function ha(e){let n,t;return Ct("div",E(pn([["className","border-b border-gray-200"],(n=[Ct("nav",E(pn([["className","-mb-px flex space-x-8"],["aria-label","Tabs"],(t=Hn(fa,e),["children",co.Children.toArray(Array.from(t))])])))],["children",co.Children.toArray(Array.from(n))])])))}class pa extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["UpdateSearchText","UpdateSort","LoadAccountLookup","UpdateAccountLookup","QueryAccountLookup"]}}class ma{constructor(e){this.props=e}}function ga(e){return n=>t=>Ao.Delay((()=>{const r=Qc(e.props.partnerId);return Ao.Bind(ra(e.props.backendUrl,e.props.accessToken,r,n,void 0),(e=>(t(new pa(2,new Uo(2,e))),Ao.Zero())))}))}class wa extends P{constructor(e,n,t,r){super(),this.Data=e,this.SearchText=n,this.Sort=t,this.PageSize=r}}function _a(){return[new wa(new Uo(0),Pi,Ii,(20,new Mi(0,20))),Ji()]}class ya extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["ColumnHeader"]}}function va(e){return new ya(0,e)}function ba(e){return e.fields[0]}class Ca extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["RowCell"]}}function xa(e){return new Ca(0,e)}function Sa(e){return e.fields[0]}function Ea(e){return va(Ct("th",E(pn([["className","px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"],["scope","col"],["children",e]]))))}function ka(e,n){let t;return xa(Ct("td",E(pn([["className","px-6 py-4 whitespace-nowrap text-sm"],(t=[Ct("a",{className:"text-indigo-600 hover:text-indigo-900",children:n,href:e})],["children",co.Children.toArray(Array.from(t))])]))))}function Ia(e,n){return xa(Ct("td",{className:He(" ",Bn(e,["px-6","py-4","whitespace-nowrap","text-sm"])),children:n}))}function Aa(e){return["fillRule",e]}function Na(e){return["clipRule",e]}const Ta=Ct("svg",E(pn([["className",He(" ",["h-5","w-5"])],["fill","currentColor"],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],(()=>{const e=rn(Ct("path",E(pn([["d","M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"],Aa("evenodd"),Na("evenodd")]))));return["children",co.Children.toArray(Array.from(e))]})()]))),Da=Ct("svg",E(pn([["className",He(" ",["h-5","w-5"])],["fill","currentColor"],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],(()=>{const e=rn(Ct("path",E(pn([["d","M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z"],Aa("evenodd"),Na("evenodd")]))));return["children",co.Children.toArray(Array.from(e))]})()])));function Pa(e,n,t,r){let o,i,s;return va(Ct("th",E(pn([["className",He(" ",["px-6","py-3","text-left","text-xs","font-medium","text-gray-500","sm:pl-6","uppercase","tracking-wider"])],["scope","col"],(o=[Ct("a",E(pn([["className",He(" ",["group","inline-flex","cursor-pointer"])],["onClick",t],(i=[r,Ct("span",E(pn([["className",He(" ",(u=!e,c=rn("invisible"),a=pn(["ml-2","flex-none","rounded","text-gray-400","group-hover:visible","group-focus:visible"]),u?mn(a,c):a))],(s=Mn(Nn((()=>Pn(n?Ta:Da)))),["children",co.Children.toArray(Array.from(s))])])))],["children",co.Children.toArray(Array.from(i))])])))],["children",co.Children.toArray(Array.from(o))])]))));var u,c,a}function Oa(e,n){return Pa(y(Ai(e.Sort),new xi(1)),y(Ni(e.Sort),new Si(0)),(t=>{n(new pa(1,Ti(new xi(1),e.Sort)))}),"Name")}function Ma(e,n){return Pa(y(Ai(e.Sort),new xi(0)),y(Ni(e.Sort),new Si(0)),(t=>{n(new pa(1,Ti(new xi(0),e.Sort)))}),"Id")}class Ua extends P{constructor(e,n){super(),this.Data=e,this.LoadNext=n}}class Ba extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Resolved","InProgress"]}}class La extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Known","Unknown"]}}function Fa(e,n){let t;return Ct("tr",E(pn([["className",e%2==0?"bg-white":"bg-gray-50"],(t=Hn(Sa,n),["children",co.Children.toArray(Array.from(t))])])))}function Ga(e){let n,t,r,o,i;const s=e.data,u=e.pageSize,c=e.renderRowCells,a=e.columnHeaders,l=(p=u,m=s.Data,pn(ce(pn,function(e,n){if(e<1)throw new Error("The input must be positive.\\nParameter name: size");if(0===n.length)return[[]];{const t=[];for(let r=0;r<=~~Math.ceil(n.length/e)-1;r++){let o;const i=r*e|0;o=n.slice(i,i+e),t.push(o)}return t}}(p,an(m))))),f=function(e,n){const t=xo(1),r=t[1],o=0|t[0];return[o,t=>{if(o===e)if(null==n);else{const e=n;Me((e=>console.log(e)),Pe("Calling Load")),e(),r(o+1)}else r(o+1)},e=>{r(o-1)}]}(sn(l),s.LoadNext),d=0|f[0],h=f[1];var p,m;let g;const w=function(e,n){return((n,t)=>{for(;;){const r=n,o=t;if(Ye(o))return;if(r===e)return ee(Qe(o));n=r+1,t=en(o)}})(0,n)}(d-1,l);g=null==w?new Ba(1):new Ba(0,w);const _=0|sn(s.Data),y=null==s.LoadNext?new La(0,_):new La(1),v=1===g.tag?void 0:_>=1?(d-1)*u+1:void 0,b=1===g.tag?void 0:_>=1?(d-1)*u+sn(g.fields[0]):void 0,C=1===d?void 0:f[2],x=d===sn(l)?null!=s.LoadNext?h:void 0:d<sn(l)?h:void 0;return Ct("div",E(pn([["className","flex flex-col mt-4"],(n=[Ct("div",E(pn([["className","-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"],(t=[Ct("div",E(pn([["className","py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8"],(r=[Ct("div",E(pn([["className","shadow overflow-hidden border-b border-gray-200 sm:rounded-lg"],(o=[Ct("table",E(pn([["className","min-w-full divide-y divide-gray-200"],(i=Mn(Nn((()=>Bn(Pn(function(e){let n;return Ct("thead",{className:"bg-gray-50",children:(n=Hn(ba,e),Ct("tr",{children:co.Children.toArray(Array.from(n))}))})}(a)),Nn((()=>{let e,n;return Bn((e=g,1===e.tag?Pn(null):Pn((n=jn(Fa,c(e.fields[0])),Ct("tbody",{children:co.Children.toArray(Array.from(n))})))),Nn((()=>Pn(function(e,n,t,r,o,i){let s,u,c,a,l,f;const d=[n,t];let h,p,m;switch(null!=d[0]&&null!=d[1]?(h=0,p=d[0],m=d[1]):h=1,h){case 0:f=Mn(Nn((()=>Bn(Pn("Showing "),Nn((()=>Bn(Pn(Ct("span",{className:"font-medium",children:`${p}`})),Nn((()=>Bn(Pn(" to "),Nn((()=>Bn(Pn(Ct("span",{className:"font-medium",children:`${m}`})),Nn((()=>Bn(Pn(" of "),Nn((()=>1===r.tag?rn(" many"):pn([Ct("span",{className:"font-medium",children:T(r.fields[0])})," results"])))))))))))))))))));break;case 1:f=rn(null)}const g=Mn(Nn((()=>{let e,n;return Bn((e=i,null==e?Pn(null):(n=e,Pn(Ct("a",{className:He(" ",["relative","inline-flex","items-center","px-4","py-2","border","border-gray-300","text-sm","font-medium","rounded-md","text-gray-700","bg-white","hover:bg-gray-50","cursor-pointer"]),onClick:n,children:"Previous "})))),Nn((()=>{const e=o;if(null==e)return Pn(null);{const n=e;return Pn(Ct("a",{className:He(" ",["ml-3","relative","inline-flex","items-center","px-4","py-2","border","border-gray-300","text-sm","font-medium","rounded-md","text-gray-700","bg-white","hover:bg-gray-50","cursor-pointer"]),onClick:n,children:" Next"}))}})))})));return Ct("tfoot",E(pn([["className",He(" ",["w-full"])],(s=[Ct("tr",E(rn((u=[Ct("td",E(pn([["colSpan",e],(c=[Ct("nav",E(pn([["className",He(" ",["bg-white","px-4","py-3","flex","items-center","justify-between","border-t-1","border-gray-200","sm:px-6"])],(a=[Ct("div",E(pn([["className",He(" ",["hidden","sm:block"])],(l=[Ct("p",{className:He(" ",["text-sm","text-gray-700"]),children:co.Children.toArray(Array.from(f))})],["children",co.Children.toArray(Array.from(l))])]))),Ct("div",{className:He(" ",["flex-1","flex","justify-between","sm:justify-end"]),children:co.Children.toArray(Array.from(g))})],["children",co.Children.toArray(Array.from(a))])])))],["children",co.Children.toArray(Array.from(c))])])))],["children",co.Children.toArray(Array.from(u))]))))],["children",co.Children.toArray(Array.from(s))])])))}(sn(a),v,b,y,x,C)))))})))))),["children",co.Children.toArray(Array.from(i))])])))],["children",co.Children.toArray(Array.from(o))])])))],["children",co.Children.toArray(Array.from(r))])])))],["children",co.Children.toArray(Array.from(t))])])))],["children",co.Children.toArray(Array.from(n))])])))}function Ra(e){const n=rn(Ct("span",{children:[e.error]}));return Ct("div",{children:co.Children.toArray(Array.from(n))})}function Ha(){const e=rn(Ct("span",{children:["Please wait..."]}));return Ct("div",{children:co.Children.toArray(Array.from(e))})}function ja(e,n,t){let r,o;return Ct("div",E(pn([["className",He(" ",["flex-grow","max-w-md"])],(r=[Ct("label",{for:"search",children:"Search",className:He(" ",["block","text-sm","font-medium","text-gray-700"])}),Ct("div",E(pn([["className","mt-1"],(o=[Ct("input",{id:"search",name:"search",type:"text",className:He(" ",["py-2","shadow-sm","focus:ring-indigo-500","focus:border-indigo-500","block","w-full","sm:text-sm","border-gray-300","rounded-md"]),placeholder:"Account Id, Name or Legal Entity",value:e,onKeyUp:e=>{"Enter"===e.key&&t()},onChange:e=>{n(e.target.value)}})],["children",co.Children.toArray(Array.from(o))])])))],["children",co.Children.toArray(Array.from(r))])])))}function $a(e){let n,t;return Ct("div",E(pn([["className","pt-6"],(n=[Ct("div",E(pn([["className",He(" ",["flex","justify-end"])],(t=[Ct("button",{type:"search",children:"Search",className:He(" ",["ml-3","inline-flex","justify-center","py-2","px-4","border","border-transparent","shadow-sm","text-sm","font-medium","rounded-md","text-white","bg-indigo-600","hover:bg-indigo-700","focus:outline-none","focus:ring-2","focus:ring-offset-2","focus:ring-indigo-500"]),onClick:e})],["children",co.Children.toArray(Array.from(t))])])))],["children",co.Children.toArray(Array.from(n))])])))}function Wa(e){let n,t,r,o,i,s,u;const c=function(e){return new ma(e)}(e),a=is(_a,((e,n)=>function(e,n,t){let r,o,i,s;switch(n.tag){case 1:{const r=n.fields[0];return[new wa(new Uo(1),t.SearchText,r,t.PageSize),Ki((n=>{const o=new Bi(t.SearchText,r,t.PageSize);Mo(ga(e)(o)(n))}))]}case 2:return[new wa(n.fields[0],t.SearchText,t.Sort,t.PageSize),Ji()];case 3:return[new wa((r=[t.Data,n.fields[0]],2===r[0].tag?0===r[0].fields[0].tag?(o=r[1],1===o.tag?new Uo(2,new st(1,o.fields[0])):new Uo(2,new st(0,new Xc(mn(r[0].fields[0].fields[0].Accounts,o.fields[0].Accounts),o.fields[0].Token)))):(i=r[1],1===i.tag?new Uo(2,new st(1,i.fields[0])):new Uo(3,new Error("Failed to retrieve the account data"))):(s=r[1],1===s.tag?new Uo(2,new st(1,s.fields[0])):new Uo(3,new Error("Failed to retrieve the account data")))),t.SearchText,t.Sort,t.PageSize),Ji()];case 4:return[new wa(new Uo(1),t.SearchText,t.Sort,t.PageSize),Ki((n=>{const r=new Bi(t.SearchText,t.Sort,t.PageSize);Mo(ga(e)(r)(n))}))];default:return[new wa(t.Data,(u=n.fields[0],new Di(0,u.trim())),t.Sort,t.PageSize),Ji()]}var u}(c,e,n)),[]),l=a[0],f=a[1],d=new Bi(l.SearchText,l.Sort,l.PageSize);go((n=[()=>function(e,n,t){return ra(e.props.backendUrl,e.props.accessToken,Qc(e.props.partnerId),n,void 0)}(c,d),e=>{f(new pa(2,e))}],Bo(n[0],n[1])));const h=e=>{f(new pa(4))},p=l.Data;let m,g,w,_;switch(0===p.tag||1===p.tag?m=2:3===p.tag?(m=3,_=p.fields[0]):1===p.fields[0].tag?(m=1,w=p.fields[0].fields[0]):(m=0,g=p.fields[0].fields[0]),m){case 0:{const n=pn([Ct("div",E(pn([["className",He(" ",["grid","grid-cols-2","pt-2","sm:-mr-6","lg:mr-0"])],(t=[Ct("div",E(pn([["className",He(" ",["flex","flex-row","gap-4","sm:-mr-6","lg:mr-0"])],(r=[ja(Oi(l.SearchText),(e=>{f(new pa(0,e))}),h),$a(h)],["children",co.Children.toArray(Array.from(r))])])))],["children",co.Children.toArray(Array.from(t))])]))),(o=g,i=pn([Ma(l,f),Oa(l,f),Ea("Contact"),Ea("Website")]),s=new Ua(o.Accounts,oe((e=>n=>{Mo(function(e){return n=>t=>r=>Ao.Delay((()=>{const o=Qc(e.props.partnerId);return Ao.Bind(ra(e.props.backendUrl,e.props.accessToken,o,n,t),(e=>(r(new pa(3,e)),Ao.Zero())))}))}(c)(d)(e)(f))}),o.Token)),u=0|Ui(l.PageSize),Ct(Ga,{columnHeaders:i,renderRowCells:n=>wn((n=>function(e,n){const t=X(n.AccountId);return Mn(Nn((()=>{let r;return Bn(Pn(function(e,n,t,r){let o;return xa(Ct("td",E(pn([["className","px-6 py-2 whitespace-nowrap text-sm align-top"],(o=Mn(Nn((()=>Bn(Pn(Ct("a",{className:"text-indigo-600 hover:text-indigo-900",children:n,href:e})),Nn((()=>{let e,n;return Bn((e=r,null==e?Pn(null):(n=e,Bn(Pn(Ct("br",{})),Nn((()=>{let e;return Pn((e=`Channel ID: ${n}`,Ct("span",{children:[e]})))}))))),Nn((()=>{const e=t;if(null==e)return Pn(null);{const n=e;return Bn(Pn(Ct("br",{})),Nn((()=>{let e;return Pn((e=`External ID: ${n}`,Ct("span",{children:[e]})))})))}})))})))))),["children",co.Children.toArray(Array.from(o))])]))))}(yi($i((r=[e,t],new Hi(7,r[0],r[1]))),1),n.AccountId,n.ExternalId,n.ChannelId)),Nn((()=>Bn(Pn(function(e,n,t){let r;return xa(Ct("td",E(pn([["className",He(" ",["text-gray-500","px-6","py-2","whitespace-nowrap","text-sm","align-top"])],(r=Mn(Nn((()=>{let r;return Bn(Pn(Ct("div",E(pn([["className",He(" ",["font-medium"])],(r=[Ct("span",{children:[e]})],["children",co.Children.toArray(Array.from(r))])])))),Nn((()=>{let e,r;return Bn((e=n,Pn(null==e?null:(r="Legal Entity: "+e,Ct("span",{children:[r]})))),Nn((()=>{const e=t;if(null==e)return Pn(null);{const n=e;return Bn(Pn(Ct("br",{})),Nn((()=>{let e;return Pn((e="ABN: "+n,Ct("span",{children:[e]})))})))}})))})))}))),["children",co.Children.toArray(Array.from(r))])]))))}(n.Name,n.BusinessName,n.BusinessNumber)),Nn((()=>Bn(Pn(function(e,n){let t;return xa(Ct("td",E(pn([["className",He(" ",["text-gray-500","px-6","py-2","whitespace-nowrap","text-sm","align-top"])],(t=[Ct("span",{children:[e]}),Ct("br",{}),Ct("span",{children:[n]})],["children",co.Children.toArray(Array.from(t))])]))))}(n.Contact,n.ContactMobilePhone)),Nn((()=>{return Pn((e=n.Website,xa(Ct("td",{className:He(" ",["px-6","py-2","whitespace-nowrap","text-sm","text-gray-500","align-top"]),children:e}))));var e})))))))))})))}(e.partnerId,n)),n),pageSize:u,data:s}))]);return Ct("div",{children:co.Children.toArray(Array.from(n))})}case 1:return Ct(Ra,{error:w});case 2:return Ct(Ha,null);case 3:return Ct(Ra,{error:T(_)})}}class za extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}}function Va(e){const n=e.accessToken,t=e.backendUrl,r=e.accountId,o=Ln((e=>e),[new za(1,n),new za(0,t),new za(2,q(e.partnerId)),oe((e=>new za(3,Y(e))),r)]);return Ct("superhero-super-configuration",qn(o,1))}class qa extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}}function Za(e){const n=e.accessToken,t=e.backendUrl,r=e.accountId,o=Ln((e=>e),[new qa(1,n),new qa(0,t),new qa(2,q(e.partnerId)),oe((e=>new qa(3,Y(e))),r)]);return Ct("superhero-benefits-onboarding-configuration",qn(o,1))}class Ja extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}}function Ka(e){const n=e.accessToken,t=e.backendUrl,r=e.accountId,o=Ln((e=>e),[new Ja(1,n),new Ja(0,t),new Ja(2,q(e.partnerId)),oe((e=>new Ja(3,Y(e))),r)]);return Ct("superhero-bank-details",qn(o,1))}class Ya extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}}function Xa(e){const n=e.accessToken,t=e.backendUrl,r=e.accountId,o=Ln((e=>e),[new Ya(1,n),new Ya(0,t),new Ya(2,q(e.partnerId)),oe((e=>new Ya(3,Y(e))),r)]);return Ct("superhero-profile-directory-app",qn(o,1))}function Qa(...e){return e.filter(Boolean).join(" ")}function el(e,n,...t){if(e in n){let r=n[e];return"function"==typeof r?r(...t):r}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(n).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,el),r}var nl=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(nl||{}),tl=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(tl||{});function rl({ourProps:e,theirProps:n,slot:t,defaultTag:r,features:o,visible:i=!0,name:s}){let u=il(n,e);if(i)return ol(u,t,r,s);let c=null!=o?o:0;if(2&c){let{static:e=!1,...n}=u;if(e)return ol(n,t,r,s)}if(1&c){let{unmount:e=!0,...n}=u;return el(e?0:1,{0:()=>null,1:()=>ol({...n,hidden:!0,style:{display:"none"}},t,r,s)})}return ol(u,t,r,s)}function ol(e,n={},t,r){let{as:o=t,children:i,refName:s="ref",...u}=cl(e,["unmount","static"]),c=void 0!==e.ref?{[s]:e.ref}:{},a="function"==typeof i?i(n):i;"className"in u&&u.className&&"function"==typeof u.className&&(u.className=u.className(n));let l={};if(n){let e=!1,t=[];for(let[r,o]of Object.entries(n))"boolean"==typeof o&&(e=!0),!0===o&&t.push(r);e&&(l["data-headlessui-state"]=t.join(" "))}if(o===St&&Object.keys(ul(u)).length>0){if(!oo(a)||Array.isArray(a)&&a.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(u).map((e=>` - ${e}`)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((e=>` - ${e}`)).join("\n")].join("\n"));let e=a.props,n="function"==typeof(null==e?void 0:e.className)?(...n)=>Qa(null==e?void 0:e.className(...n),u.className):Qa(null==e?void 0:e.className,u.className),t=n?{className:n}:{};return io(a,Object.assign({},il(a.props,ul(cl(u,["ref"]))),l,c,function(...e){return{ref:e.every((e=>null==e))?void 0:n=>{for(let t of e)null!=t&&("function"==typeof t?t(n):t.current=n)}}}(a.ref,c.ref),t))}return Ct(o,Object.assign({},cl(u,["ref"]),o!==St&&c,o!==St&&l),a)}function il(...e){if(0===e.length)return{};if(1===e.length)return e[0];let n={},t={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=t[e]||(t[e]=[]),t[e].push(r[e])):n[e]=r[e];if(n.disabled||n["aria-disabled"])return Object.assign(n,Object.fromEntries(Object.keys(t).map((e=>[e,void 0]))));for(let e in t)Object.assign(n,{[e](n,...r){let o=t[e];for(let e of o){if((n instanceof Event||(null==n?void 0:n.nativeEvent)instanceof Event)&&n.defaultPrevented)return;e(n,...r)}}});return n}function sl(e){var n;return Object.assign(Nr(e),{displayName:null!=(n=e.displayName)?n:e.name})}function ul(e){let n=Object.assign({},e);for(let e in n)void 0===n[e]&&delete n[e];return n}function cl(e,n=[]){let t=Object.assign({},e);for(let e of n)e in t&&delete t[e];return t}let al=Zt(null);al.displayName="OpenClosedContext";var ll=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ll||{});function fl(){return mr(al)}function dl({value:e,children:n}){return uo.createElement(al.Provider,{value:e},n)}var hl=Object.defineProperty,pl=(e,n,t)=>(((e,n,t)=>{n in e?hl(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t})(e,"symbol"!=typeof n?n+"":n,t),t);let ml=new class{constructor(){pl(this,"current",this.detect()),pl(this,"handoffState","pending"),pl(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}},gl=(e,n)=>{ml.isServer?lr(e,n):fr(e,n)};function wl(){let e=dr(!1);return gl((()=>(e.current=!0,()=>{e.current=!1})),[]),e}function _l(e){let n=dr(e);return gl((()=>{n.current=e}),[e]),n}function yl(){let[e,n]=cr(ml.isHandoffComplete);return e&&!1===ml.isHandoffComplete&&n(!1),lr((()=>{!0!==e&&n(!0)}),[e]),lr((()=>ml.handoff()),[]),e}let vl=function(e){let n=_l(e);return uo.useCallback(((...e)=>n.current(...e)),[n])},bl=Symbol();function Cl(...e){let n=dr(e);lr((()=>{n.current=e}),[e]);let t=vl((e=>{for(let t of n.current)null!=t&&("function"==typeof t?t(e):t.current=e)}));return e.every((e=>null==e||(null==e?void 0:e[bl])))?void 0:t}function xl(){let e=[],n={addEventListener:(e,t,r,o)=>(e.addEventListener(t,r,o),n.add((()=>e.removeEventListener(t,r,o)))),requestAnimationFrame(...e){let t=requestAnimationFrame(...e);return n.add((()=>cancelAnimationFrame(t)))},nextFrame:(...e)=>n.requestAnimationFrame((()=>n.requestAnimationFrame(...e))),setTimeout(...e){let t=setTimeout(...e);return n.add((()=>clearTimeout(t)))},microTask(...e){let t={current:!0};return function(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}((()=>{t.current&&e[0]()})),n.add((()=>{t.current=!1}))},style(e,n,t){let r=e.style.getPropertyValue(n);return Object.assign(e.style,{[n]:t}),this.add((()=>{Object.assign(e.style,{[n]:r})}))},group(e){let n=xl();return e(n),this.add((()=>n.dispose()))},add:n=>(e.push(n),()=>{let t=e.indexOf(n);if(t>=0)for(let n of e.splice(t,1))n()}),dispose(){for(let n of e.splice(0))n()}};return n}function Sl(e,...n){e&&n.length>0&&e.classList.add(...n)}function El(e,...n){e&&n.length>0&&e.classList.remove(...n)}function kl(){let[e]=cr(xl);return lr((()=>()=>e.dispose()),[e]),e}function Il(e=""){return e.split(" ").filter((e=>e.trim().length>1))}let Al=Zt(null);Al.displayName="TransitionContext";var Nl=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Nl||{});let Tl=Zt(null);function Dl(e){return"children"in e?Dl(e.children):e.current.filter((({el:e})=>null!==e.current)).filter((({state:e})=>"visible"===e)).length>0}function Pl(e,n){let t=_l(e),r=dr([]),o=wl(),i=kl(),s=vl(((e,n=tl.Hidden)=>{let s=r.current.findIndex((({el:n})=>n===e));-1!==s&&(el(n,{[tl.Unmount](){r.current.splice(s,1)},[tl.Hidden](){r.current[s].state="hidden"}}),i.microTask((()=>{var e;!Dl(r)&&o.current&&(null==(e=t.current)||e.call(t))})))})),u=vl((e=>{let n=r.current.find((({el:n})=>n===e));return n?"visible"!==n.state&&(n.state="visible"):r.current.push({el:e,state:"visible"}),()=>s(e,tl.Unmount)})),c=dr([]),a=dr(Promise.resolve()),l=dr({enter:[],leave:[],idle:[]}),f=vl(((e,t,r)=>{c.current.splice(0),n&&(n.chains.current[t]=n.chains.current[t].filter((([n])=>n!==e))),null==n||n.chains.current[t].push([e,new Promise((e=>{c.current.push(e)}))]),null==n||n.chains.current[t].push([e,new Promise((e=>{Promise.all(l.current[t].map((([e,n])=>n))).then((()=>e()))}))]),"enter"===t?a.current=a.current.then((()=>null==n?void 0:n.wait.current)).then((()=>r(t))):r(t)})),d=vl(((e,n,t)=>{Promise.all(l.current[n].splice(0).map((([e,n])=>n))).then((()=>{var e;null==(e=c.current.shift())||e()})).then((()=>t(n)))}));return hr((()=>({children:r,register:u,unregister:s,onStart:f,onStop:d,wait:a,chains:l})),[u,s,r,f,d,l,a])}function Ol(){}Tl.displayName="NestingContext";let Ml=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Ul(e){var n;let t={};for(let r of Ml)t[r]=null!=(n=e[r])?n:Ol;return t}let Bl=nl.RenderStrategy,Ll=sl((function(e,n){let{show:t,appear:r=!1,unmount:o,...i}=e,s=dr(null),u=Cl(s,n);yl();let c=fl();if(void 0===t&&null!==c&&(t=(c&ll.Open)===ll.Open),![!0,!1].includes(t))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[a,l]=cr(t?"visible":"hidden"),f=Pl((()=>{l("hidden")})),[d,h]=cr(!0),p=dr([t]);gl((()=>{!1!==d&&p.current[p.current.length-1]!==t&&(p.current.push(t),h(!1))}),[p,t]);let m=hr((()=>({show:t,appear:r,initial:d})),[t,r,d]);lr((()=>{if(t)l("visible");else if(Dl(f)){let e=s.current;if(!e)return;let n=e.getBoundingClientRect();0===n.x&&0===n.y&&0===n.width&&0===n.height&&l("hidden")}else l("hidden")}),[t,f]);let g={unmount:o};return uo.createElement(Tl.Provider,{value:f},uo.createElement(Al.Provider,{value:m},rl({ourProps:{...g,as:St,children:uo.createElement(Fl,{ref:u,...g,...i})},theirProps:{},defaultTag:St,features:Bl,visible:"visible"===a,name:"Transition"})))})),Fl=sl((function(e,n){let{beforeEnter:t,afterEnter:r,beforeLeave:o,afterLeave:i,enter:s,enterFrom:u,enterTo:c,entered:a,leave:l,leaveFrom:f,leaveTo:d,...h}=e,p=dr(null),m=Cl(p,n),g=h.unmount?tl.Unmount:tl.Hidden,{show:w,appear:_,initial:y}=function(){let e=mr(Al);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),[v,b]=cr(w?"visible":"hidden"),C=function(){let e=mr(Tl);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),{register:x,unregister:S}=C,E=dr(null);lr((()=>x(p)),[x,p]),lr((()=>{if(g===tl.Hidden&&p.current)return w&&"visible"!==v?void b("visible"):el(v,{hidden:()=>S(p),visible:()=>x(p)})}),[v,p,x,S,w,g]);let k=_l({enter:Il(s),enterFrom:Il(u),enterTo:Il(c),entered:Il(a),leave:Il(l),leaveFrom:Il(f),leaveTo:Il(d)}),I=function(e){let n=dr(Ul(e));return lr((()=>{n.current=Ul(e)}),[e]),n}({beforeEnter:t,afterEnter:r,beforeLeave:o,afterLeave:i}),A=yl();lr((()=>{if(A&&"visible"===v&&null===p.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[p,v,A]);let N=y&&!_,T=!A||N||E.current===w?"idle":w?"enter":"leave",D=function(e=0){let[n,t]=cr(e),r=wl(),o=pr((e=>{r.current&&t((n=>n|e))}),[n,r]),i=pr((e=>Boolean(n&e)),[n]),s=pr((e=>{r.current&&t((n=>n&~e))}),[t,r]),u=pr((e=>{r.current&&t((n=>n^e))}),[t]);return{flags:n,addFlag:o,hasFlag:i,removeFlag:s,toggleFlag:u}}(0),P=vl((e=>el(e,{enter:()=>{D.addFlag(ll.Opening),I.current.beforeEnter()},leave:()=>{D.addFlag(ll.Closing),I.current.beforeLeave()},idle:()=>{}}))),O=vl((e=>el(e,{enter:()=>{D.removeFlag(ll.Opening),I.current.afterEnter()},leave:()=>{D.removeFlag(ll.Closing),I.current.afterLeave()},idle:()=>{}}))),M=Pl((()=>{b("hidden"),S(p)}),C);(function({container:e,direction:n,classes:t,onStart:r,onStop:o}){let i=wl(),s=kl(),u=_l(n);gl((()=>{let n=xl();s.add(n.dispose);let c=e.current;if(c&&"idle"!==u.current&&i.current)return n.dispose(),r.current(u.current),n.add(function(e,n,t,r){let o=t?"enter":"leave",i=xl(),s=void 0!==r?function(e){let n={called:!1};return(...t)=>{if(!n.called)return n.called=!0,e(...t)}}(r):()=>{};"enter"===o&&(e.removeAttribute("hidden"),e.style.display="");let u=el(o,{enter:()=>n.enter,leave:()=>n.leave}),c=el(o,{enter:()=>n.enterTo,leave:()=>n.leaveTo}),a=el(o,{enter:()=>n.enterFrom,leave:()=>n.leaveFrom});return El(e,...n.enter,...n.enterTo,...n.enterFrom,...n.leave,...n.leaveFrom,...n.leaveTo,...n.entered),Sl(e,...u,...a),i.nextFrame((()=>{El(e,...a),Sl(e,...c),function(e,n){let t=xl();if(!e)return t.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[i,s]=[r,o].map((e=>{let[n=0]=e.split(",").filter(Boolean).map((e=>e.includes("ms")?parseFloat(e):1e3*parseFloat(e))).sort(((e,n)=>n-e));return n})),u=i+s;if(0!==u){t.group((t=>{t.setTimeout((()=>{n(),t.dispose()}),u),t.addEventListener(e,"transitionrun",(e=>{e.target===e.currentTarget&&t.dispose()}))}));let r=t.addEventListener(e,"transitionend",(e=>{e.target===e.currentTarget&&(n(),r())}))}else n();t.add((()=>n())),t.dispose}(e,(()=>(El(e,...u),Sl(e,...n.entered),s())))})),i.dispose}(c,t.current,"enter"===u.current,(()=>{n.dispose(),o.current(u.current)}))),n.dispose}),[n])})({container:p,classes:k,direction:T,onStart:_l((e=>{M.onStart(p,e,P)})),onStop:_l((e=>{M.onStop(p,e,O),"leave"===e&&!Dl(M)&&(b("hidden"),S(p))}))}),lr((()=>{N&&(g===tl.Hidden?E.current=null:E.current=w)}),[w,N,v]);let U=h,B={ref:m};return _&&w&&(U={...U,className:Qa(h.className,...k.current.enter,...k.current.enterFrom)}),uo.createElement(Tl.Provider,{value:M},uo.createElement(dl,{value:el(v,{visible:ll.Open,hidden:ll.Closed})|D.flags},rl({ourProps:B,theirProps:U,defaultTag:"div",features:Bl,visible:"visible"===v,name:"Transition.Child"})))})),Gl=sl((function(e,n){let t=null!==mr(Al),r=null!==fl();return uo.createElement(uo.Fragment,null,!t&&r?uo.createElement(Ll,{ref:n,...e}):uo.createElement(Fl,{ref:n,...e}))})),Rl=Object.assign(Ll,{Child:Gl,Root:Ll});class Hl extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Key","Appear","Show","ClassName","Enter","EnterFrom","EnterTo","Leave","LeaveFrom","LeaveTo","Children"]}}function jl(e){const n=qn(e,1);return Ct(Rl,n)}function $l(e,n){let t;return Ct("div",E(pn([["className","px-4 py-4 sm:px-0"],(t=[Ct("h3",{className:"text-lg font-semibold leading-7 text-gray-900",children:e}),re(oe((e=>Ct("p",{className:"mt-1 max-w-2xl text-sm leading-6 text-gray-500",children:e})),n),null)],["children",co.Children.toArray(Array.from(t))])])))}function Wl(e,n){let t;return Ct("div",E(pn([["className","px-4 py-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0"],(t=[Ct("dt",{className:"text-sm font-medium leading-6 text-gray-700",children:e}),Ct("dd",{className:"px-1 mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0",children:n})],["children",co.Children.toArray(Array.from(t))])])))}function zl(e){let n,t;const r=e.value,o=e.label,i=xo(!1),s=i[0],u=i[1];return _o((()=>{Mo(Ao.Delay((()=>s?Ao.Bind((2e3,Io((e=>{let n;const t=setTimeout((()=>{e.cancelToken.removeListener(n),e.onSuccess(void 0)}),2e3);n=e.cancelToken.addListener((()=>{clearTimeout(t),e.onCancel(new Eo)}))}))),(()=>(u(!1),Ao.Zero()))):Ao.Zero())))})),Ct("div",E(pn([["className","px-4 py-2 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0"],(n=[Ct("dt",{className:"text-sm font-medium leading-6 text-gray-700",children:o}),Ct("dd",E(pn([["className","flex mt-1 text-sm leading-6 text-primary-700 sm:col-span-2 sm:mt-0 relative"],(t=[jl(pn([new Hl(3,"absolute bottom-8 flex flex-row bg-gray-900 items-start w-[69px] h-8 shadow-md px-3 py-2 rounded-md"),new Hl(2,s),new Hl(4,"transition-opacity ease-in duration-100"),new Hl(5,"opacity-0"),new Hl(6,"opacity-90"),new Hl(7,"transition-opacity ease-out duration-500"),new Hl(8,"opacity-90"),new Hl(9,"opacity-0"),new Hl(10,[Ct("div",{className:"w-[45px] h-4 not-italic font-medium text-xs leading-4 text-white flex-none order-none grow-0",children:"Copied"})])])),Ct("div",{className:"px-1 cursor-pointer hover:text-primary-900 hover:bg-gray-300 rounded-md shrink",children:r})],["children",co.Children.toArray(Array.from(t))]),["onClick",e=>{navigator.clipboard.writeText(r),u(!0)}]])))],["children",co.Children.toArray(Array.from(n))])])))}function Vl(e,n){let t;const r=pn([e,Ct("div",E(pn([["className","mt-2 border-b border-gray-200"],(t=[Ct("dl",{className:"divide-y divide-gray-200 px-0 sm:px-4 max-w-2xl",children:co.Children.toArray(Array.from(n))})],["children",co.Children.toArray(Array.from(t))])])))]);return Ct("div",{children:co.Children.toArray(Array.from(r))})}function ql(e){let n,t,r,o,i,s;return Vl($l("Partner Information",void 0),pn([(n=["ID",Fo(e.StreamId)],Ct(zl,{label:n[0],value:n[1]})),(t=["Name",ri(e.Name)],Wl(t[0],t[1])),(r=["Contact",`${ii(e.ContactDetails.FirstName)} ${si(e.ContactDetails.LastName)}`],Wl(r[0],r[1])),(o=["Phone",ci(e.ContactDetails.MobilePhone)],Wl(o[0],o[1])),(i=["Website",oi(e.Website)],Wl(i[0],i[1])),(s=["Notes",re((u=e.Notes,null!=u?u.fields[0]:void 0),"")],Wl(s[0],s[1]))]));var u}class Zl extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Details","AccountList","SuperConfiguration","BenefitsOnboardingConfiguration","BankDetailsConfiguration","ProfileDirectory"]}}class Jl extends P{constructor(e,n,t){super(),this.PartnerId=e,this.BackendUrl=n,this.AccessToken=t}}class Kl extends P{constructor(e,n,t){super(),this.PartnerId=e,this.BackendUrl=n,this.AccessToken=t}}class Yl extends P{constructor(e,n,t){super(),this.PartnerId=e,this.BackendUrl=n,this.AccessToken=t}}class Xl extends P{constructor(e,n,t){super(),this.PartnerId=e,this.BackendUrl=n,this.AccessToken=t}}function Ql(e){let n,t,r,o,i,s;return ha(1===e.tag?(n=e.fields[0],pn([da("Details",yi($i(new Hi(1,n.partnerId)),1)),da("Accounts",void 0),da("Super",yi($i(new Hi(4,n.partnerId)),1)),da("Benefits",yi($i(new Hi(5,n.partnerId)),1)),da("Bank Details",yi($i(new Hi(6,n.partnerId)),1)),da("Directory",yi($i(new Hi(2,n.partnerId)),1))])):2===e.tag?(t=e.fields[0].PartnerId,pn([da("Details",yi($i(new Hi(1,t)),1)),da("Accounts",yi($i(new Hi(3,t)),1)),da("Super",void 0),da("Benefits",yi($i(new Hi(5,t)),1)),da("Bank Details",yi($i(new Hi(6,t)),1)),da("Directory",yi($i(new Hi(2,t)),1))])):3===e.tag?(r=e.fields[0].PartnerId,pn([da("Details",yi($i(new Hi(1,r)),1)),da("Accounts",yi($i(new Hi(3,r)),1)),da("Super",yi($i(new Hi(4,r)),1)),da("Benefits",void 0),da("Bank Details",yi($i(new Hi(6,r)),1)),da("Directory",yi($i(new Hi(2,r)),1))])):4===e.tag?(o=e.fields[0].PartnerId,pn([da("Details",yi($i(new Hi(1,o)),1)),da("Accounts",yi($i(new Hi(3,o)),1)),da("Super",yi($i(new Hi(4,o)),1)),da("Benefits",yi($i(new Hi(5,o)),1)),da("Bank Details",void 0),da("Directory",yi($i(new Hi(2,o)),1))])):5===e.tag?(i=e.fields[0].PartnerId,pn([da("Details",yi($i(new Hi(1,i)),1)),da("Accounts",yi($i(new Hi(3,i)),1)),da("Super",yi($i(new Hi(4,i)),1)),da("Benefits",yi($i(new Hi(5,i)),1)),da("Bank Details",yi($i(new Hi(6,i)),1)),da("Directory",void 0)])):(s=e.fields[0],pn([da("Details",void 0),da("Accounts",yi($i(new Hi(3,Z(Fo(s.StreamId)))),1)),da("Super",yi($i(new Hi(4,Z(Fo(s.StreamId)))),1)),da("Benefits",yi($i(new Hi(5,Z(Fo(s.StreamId)))),1)),da("Bank Details",yi($i(new Hi(6,Z(Fo(s.StreamId)))),1)),da("Directory",yi($i(new Hi(2,Z(Fo(s.StreamId)))),1))])))}function ef(e){switch(e.tag){case 1:{const n=e.fields[0];return Ct(Wa,{accessToken:n.accessToken,backendUrl:n.backendUrl,partnerId:n.partnerId})}case 2:return Ct(Va,{partnerId:e.fields[0].PartnerId,accountId:void 0,backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken});case 3:return Ct(Za,{partnerId:e.fields[0].PartnerId,accountId:void 0,backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken});case 4:return Ct(Ka,{partnerId:e.fields[0].PartnerId,accountId:void 0,backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken});case 5:return Ct(Xa,{partnerId:e.fields[0].PartnerId,accountId:void 0,backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken});default:return Ct(ql,e.fields[0])}}function nf(e){let n;const t=e.mode;return Ct("div",E(rn((n=[Ql(t),ef(t)],["children",co.Children.toArray(Array.from(n))]))))}class tf extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["backend-url","access-token","account-id"]}}function rf(e){const n=Ln((e=>e),[new tf(1,e.accessToken),new tf(0,e.backendUrl),oe((e=>new tf(2,Y(e))),e.accountId)]);return Ct("superhero-salpac-profile-admin",qn(n,1))}function of(e){let n,t,r,o,i,s,u;return Vl($l("Account Information",void 0),pn([(n=["ID",e.StreamId],Ct(zl,{label:n[0],value:n[1]})),(t=["Name",e.Name],Ct(zl,{label:t[0],value:t[1]})),(r=["External ID",re(e.ExternalId,"")],Wl(r[0],r[1])),(o=["Channel ID",re(e.ChannelId,"")],Wl(o[0],o[1])),(i=["Contact",`${e.ContactDetails.FirstName} ${e.ContactDetails.LastName}`],Wl(i[0],i[1])),(s=["Phone",e.ContactDetails.MobilePhone],Wl(s[0],s[1])),(u=["Email",e.ContactDetails.Email],Wl(u[0],u[1]))]))}function sf(e){let n,t,r,o,i,s,u;if(null==e)return null;{const c=e;return Vl($l("Legal Entity",void 0),pn([(n=["Business Name",c.BusinessName],Wl(n[0],n[1])),(t=["Business Number",c.BusinessNumber],Wl(t[0],t[1])),(r=["Address Line 1",c.Address1],Wl(r[0],r[1])),(o=["Address Line 2",re(c.Address2,"")],Wl(o[0],o[1])),(i=["City",c.City],Wl(i[0],i[1])),(s=["State",re(c.State,"")],Wl(s[0],s[1])),(u=["Postcode",c.Postcode],Wl(u[0],u[1]))]))}}function uf(e){let n;if(null==e)return null;{const t=e;return Vl($l("Legal Entity",void 0),rn((n=["Notes",t],Wl(n[0],n[1]))))}}function cf(e){const n=pn([of(e),sf(e.LegalEntity),uf(e.Notes)]);return Ct("div",{children:co.Children.toArray(Array.from(n))})}class af extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Details","ProfilesDirectory","SuperConfiguration","BenefitsOnboardingConfiguration","BankDetailsConfiguration","SalaryPackagingConfiguration"]}}function lf(e,n,t){let r,o,i,s,u,c,a,l,f,d,h,p,m,g,w,_,y,v,b,C,x,S,E,k,I,A,N,T,D,P;const O=[e,n];return ha(1===t.tag?pn([da("Details",yi($i((r=O,new Hi(7,r[0],r[1]))),1)),da("Directory",void 0),da("Super",yi($i((o=O,new Hi(9,o[0],o[1]))),1)),da("Benefits",yi($i((i=O,new Hi(10,i[0],i[1]))),1)),da("Bank Details",yi($i((s=O,new Hi(11,s[0],s[1]))),1)),da("Salary Packaging",yi($i((u=O,new Hi(12,u[0],u[1]))),1))]):2===t.tag?pn([da("Details",yi($i((c=O,new Hi(7,c[0],c[1]))),1)),da("Directory",yi($i((a=O,new Hi(8,a[0],a[1]))),1)),da("Super",void 0),da("Benefits",yi($i((l=O,new Hi(10,l[0],l[1]))),1)),da("Bank Details",yi($i((f=O,new Hi(11,f[0],f[1]))),1)),da("Salary Packaging",yi($i((d=O,new Hi(12,d[0],d[1]))),1))]):3===t.tag?pn([da("Details",yi($i((h=O,new Hi(7,h[0],h[1]))),1)),da("Directory",yi($i((p=O,new Hi(8,p[0],p[1]))),1)),da("Super",yi($i((m=O,new Hi(9,m[0],m[1]))),1)),da("Benefits",void 0),da("Bank Details",yi($i((g=O,new Hi(11,g[0],g[1]))),1)),da("Salary Packaging",yi($i((w=O,new Hi(12,w[0],w[1]))),1))]):4===t.tag?pn([da("Details",yi($i((_=O,new Hi(7,_[0],_[1]))),1)),da("Directory",yi($i((y=O,new Hi(8,y[0],y[1]))),1)),da("Super",yi($i((v=O,new Hi(9,v[0],v[1]))),1)),da("Benefits",yi($i((b=O,new Hi(10,b[0],b[1]))),1)),da("Bank Details",void 0),da("Salary Packaging",yi($i((C=O,new Hi(12,C[0],C[1]))),1))]):5===t.tag?pn([da("Details",yi($i((x=O,new Hi(7,x[0],x[1]))),1)),da("Directory",yi($i((S=O,new Hi(8,S[0],S[1]))),1)),da("Super",yi($i((E=O,new Hi(9,E[0],E[1]))),1)),da("Benefits",yi($i((k=O,new Hi(10,k[0],k[1]))),1)),da("Bank Details",yi($i((I=O,new Hi(11,I[0],I[1]))),1)),da("Salary Packaging",void 0)]):pn([da("Details",void 0),da("Directory",yi($i((A=O,new Hi(8,A[0],A[1]))),1)),da("Super",yi($i((N=O,new Hi(9,N[0],N[1]))),1)),da("Benefits",yi($i((T=O,new Hi(10,T[0],T[1]))),1)),da("Bank Details",yi($i((D=O,new Hi(11,D[0],D[1]))),1)),da("Salary Packaging",yi($i((P=O,new Hi(12,P[0],P[1]))),1))]))}function ff(e,n,t){switch(n.tag){case 1:{const n=e.accountDetails;return Ct(Xa,{partnerId:n[0],accountId:n[1],backendUrl:e.backendUrl,accessToken:e.accessToken})}case 2:{const n=e.accountDetails;return Ct(Va,{partnerId:n[0],accountId:n[1],backendUrl:e.backendUrl,accessToken:e.accessToken})}case 3:{const n=e.accountDetails;return Ct(Za,{partnerId:n[0],accountId:n[1],backendUrl:e.backendUrl,accessToken:e.accessToken})}case 4:{const n=e.accountDetails;return Ct(Ka,{partnerId:n[0],accountId:n[1],backendUrl:e.backendUrl,accessToken:e.accessToken})}case 5:return Ct(rf,{accountId:e.accountDetails[1],backendUrl:e.backendUrl,accessToken:e.accessToken});default:{let e,n,r;switch(0===t.tag||1===t.tag?e=2:3===t.tag?(e=3,r=t.fields[0]):0===t.fields[0].tag?(e=0,n=t.fields[0].fields[0]):e=1,e){case 0:return Ct(cf,n);case 1:return Ct(Ra,{error:"There was an error retrieving account "});case 2:return Ct(Ha,null);case 3:return Ct(Ra,{error:T(r)})}}}}function df(e){let n,t;const r=e.account,o=e.mode,i=e.props;return Ct("div",E(rn((n=[(t=i.accountDetails,lf(t[0],t[1],o)),ff(i,o,r)],["children",co.Children.toArray(Array.from(n))]))))}function hf(e){const n=e.partnerList;return function(e,n){let t,r,o,i,s,u,c;return Ct("div",E(pn([["className","flex flex-col mt-4"],(t=[Ct("div",E(pn([["className","-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"],(r=[Ct("div",E(pn([["className","py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8"],(o=[Ct("div",E(pn([["className","shadow overflow-hidden border-b border-gray-200 sm:rounded-lg"],(i=[Ct("table",E(pn([["className","min-w-full divide-y divide-gray-200"],(s=[Ct("thead",{className:"bg-gray-50",children:(u=Hn(ba,e),Ct("tr",{children:co.Children.toArray(Array.from(u))}))}),(c=jn(((e,n)=>(n=>{let t;return Ct("tr",E(pn([["className",e%2==0?"bg-white":"bg-gray-50"],(t=Hn(Sa,n),["children",co.Children.toArray(Array.from(t))])])))})(n)),n),Ct("tbody",{children:co.Children.toArray(Array.from(c))}))],["children",co.Children.toArray(Array.from(s))])])))],["children",co.Children.toArray(Array.from(i))])])))],["children",co.Children.toArray(Array.from(o))])])))],["children",co.Children.toArray(Array.from(r))])])))],["children",co.Children.toArray(Array.from(t))])])))}(pn([Ea("ID"),Ea("Name"),Ea("Contact"),Ea("Phone"),Ea("Website")]),wn((e=>{let n;const t=Fo(e.StreamId);return pn([(n=[yi($i(new Hi(1,Z(t))),1),t],ka(n[0],n[1])),Ia(["text-gray-500"],ri(e.Name)),Ia(["text-gray-500"],`${ii(e.ContactDetails.FirstName)} ${si(e.ContactDetails.LastName)}`),Ia(["text-gray-500"],ci(e.ContactDetails.MobilePhone)),Ia(["text-gray-500"],oi(e.Website))])}),n))}function pf(){return(pf=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 mf(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 qt(n,t)}function gf(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=Ct(mf,pf({},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[wf(s[i].name)]=s[i].value);for(i=u.length;i--;){var c=e(u[i],null),a=u[i].slot;a?o[a]=Ct(vf,{name:a},c):r[i]=c}var l=t?Ct(vf,null,r):r;return Ct(t||n.nodeName.toLowerCase(),o,l)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?Vt:zt)(this._vdom,this._root)}function wf(e){return e.replace(/-(\w)/g,(function(e,n){return n?n.toUpperCase():""}))}function _f(e,n,t){if(this._vdom){var r={};r[e]=t=null==t?void 0:t,r[wf(e)]=t,this._vdom=qt(this._vdom,r),zt(this._vdom,this._root)}}function yf(){zt(this._vdom=null,this._root)}function vf(e,n){var t=this;return Ct("slot",pf({},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)}}))}class bf extends P{constructor(e,n,t){super(),this.Partners=e,this.Accounts=n,this.CurrentPage=t}}class Cf extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["PageChanged","GetAccountName","AppendAccount","LoadPartners"]}}function xf(){const e=ji(bi(window.location.hash,1)),n=13===e.tag?Wi(new Hi(0)):Ji();return[new bf(new Uo(0),new Kn([],{Equals:y,GetHashCode:g}),e),n]}function Sf(e){let n,t;const r=is(xf,((n,t)=>function(e,n,t){switch(n.tag){case 1:{const r=n.fields[0];return[t,Yi(e,r,(e=>new Cf(2,r,new Uo(2,new st(0,e)))),(e=>new Cf(2,r,new Uo(2,new st(1,"Failed to retrieve account name")))))]}case 2:return[new bf(t.Partners,(r=t.Accounts,o=n.fields[0],i=n.fields[1],function(e,n,t){if(e.has(n))throw new Error("An item with the same key has already been added. Key: "+n);e.set(n,t)}(r,o,i),r),t.CurrentPage),Ji()];case 0:{const e=n.fields[0];return 13===e.tag?[t,Wi(e)]:[new bf(t.Partners,t.Accounts,e),Ji()]}default:return[new bf(n.fields[0],t.Accounts,t.CurrentPage),Ji()]}var r,o,i}((n=>{const t=function(e){const n=function(e){return[e.fields[0],e.fields[1]]}(e);return[n[0],n[1]]}(n);return function(e,n,t,r){const o=q(t),i=Y(r);return Ao.Delay((()=>{let t;const r=na(n,Vs(new ss(0),zs((t=ea(e),`${t}/partners/${o}/accounts/${i}`))));return Ao.Bind(r,(e=>{const n=e;if(1===n.tag)return Ao.Return(new st(1,n.fields[0]));{const e=n.fields[0];if(200===e.statusCode){const n=Ac(I(2,Zc($o("Dto.AdminApi.Account",[],Kc,(()=>[["StreamId",qo],["PartnerId",qo],["Name",qo],["Website",qo],["ContactDetails",li()],["Notes",Wo(qo)],["LegalEntity",Wo($o("Dto.Primitives.LegalEntity",[],hi,(()=>[["BusinessName",qo],["BusinessNumber",qo],["Address1",qo],["Address2",Wo(qo)],["City",qo],["Postcode",qo],["State",Wo(qo)],["Phone",qo],["CountryCode",Wo(qo)]])))],["ExternalId",Wo(qo)],["ChannelId",Wo(qo)]])),new Ks(1),void 0)),e.responseText);return Ao.Return(n)}return Ao.Return(new st(1,"Unexpected response from backend"))}}))}))}(e.backendUrl,e.accessToken,t[0],t[1])}),n,t)),[]),o=r[0],i=r[1];go(Bo((()=>ta(e.backendUrl,e.accessToken)),(e=>{i(new Cf(3,e))})));const s=e=>{let n;const t=o.Partners;return 0===t.tag?new Uo(0):1===t.tag?new Uo(1):3===t.tag?new Uo(3,t.fields[0]):1===t.fields[0].tag?new Uo(2,new st(1,Ue(Oe("Unknown partner: %A%P()",[e])))):new Uo(2,(n=Ri(t.fields[0].fields[0],e),null==n?new st(1,Ue(Oe("Unknown partner: %A%P()",[e]))):new st(0,n.Name)))},u=e=>Ct(aa,{account:void 0,page:o.CurrentPage,partner:{Id:e,Name:s(e)}}),c=(e,n)=>{const t=Ct(nf,{mode:n});return[u(e),t]},a=n=>{const t=n[0],r=n[1];return n=>{let u,c,a,l,f;const d=[t,r];var h,p;let m;return f=new Li(0,d[0],d[1]),h=function(e,n){let t,r=null;return t=[Zn(e,n,new O((()=>r),(e=>{r=e}))),r],t[0]?t[1]:void 0}(o.Accounts,f),p=()=>(i(new Cf(1,f)),new Uo(1)),l=null!=h?ne(h):p(),m=Ct(df,{props:{accessToken:e.accessToken,accountDetails:[t,r],backendUrl:e.backendUrl},mode:n,account:l}),[(u=[t,r,l],c=u[0],Ct(aa,(a={Id:c,Name:s(c)},{account:{Id:u[1],Name:zi((e=>L(e.Name)),u[2])},page:o.CurrentPage,partner:a}))),m]}};let l;const f=o.Partners;let d,h,p,m;switch(1===f.tag?d=0:2===f.tag?1===f.fields[0].tag?(d=2,p=f.fields[0].fields[0]):(d=1,h=f.fields[0].fields[0]):3===f.tag?(d=3,m=f.fields[0]):d=0,d){case 0:l=[Ct(Ha,null),Ct(Ha,null)];break;case 1:{const t=o.CurrentPage;switch(t.tag){case 1:{const e=t.fields[0],r=u(e),o=Ri(h,e);l=null==o?[r,Ct(Ra,{error:"Unknown Partner"})]:[r,(n=new Zl(0,o),Ct(nf,{mode:n}))];break}case 3:{const n=t.fields[0];l=c(n,new Zl(1,{accessToken:e.accessToken,backendUrl:e.backendUrl,partnerId:n}));break}case 4:{const n=t.fields[0];l=c(n,new Zl(2,new Jl(n,e.backendUrl,e.accessToken)));break}case 5:{const n=t.fields[0];l=c(n,new Zl(3,new Kl(n,e.backendUrl,e.accessToken)));break}case 6:{const n=t.fields[0];l=c(n,new Zl(4,new Yl(n,e.backendUrl,e.accessToken)));break}case 2:{const n=t.fields[0];l=c(n,new Zl(5,new Xl(n,e.backendUrl,e.accessToken)));break}case 7:l=a([t.fields[0],t.fields[1]])(new af(0));break;case 8:l=a([t.fields[0],t.fields[1]])(new af(1));break;case 9:l=a([t.fields[0],t.fields[1]])(new af(2));break;case 10:l=a([t.fields[0],t.fields[1]])(new af(3));break;case 11:l=a([t.fields[0],t.fields[1]])(new af(4));break;case 12:l=a([t.fields[0],t.fields[1]])(new af(5));break;default:l=[Ct(aa,{account:void 0,page:o.CurrentPage,partner:void 0}),Ct(hf,{partnerList:h})]}break}case 2:l=[Ct(aa,{account:void 0,page:o.CurrentPage,partner:void 0}),Ct(Ra,{error:p})];break;case 3:l=[Ct(aa,{account:void 0,page:o.CurrentPage,partner:void 0}),(t=T(m),Ct(Ra,{error:t}))]}return Ci({onUrlChanged:e=>{i(new Cf(0,ji(e)))},application:Ct(St,{},l[0],l[1])})}!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=gf,o.prototype.attributeChangedCallback=_f,o.prototype.disconnectedCallback=yf,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("superhero-account-registry",o)}((e=>Ct(Sf,e)))})();
|
|
1
|
+
(()=>{"use strict";function e(e){return Array.isArray(e)||ArrayBuffer.isView(e)}function n(e){return"function"==typeof e.GetHashCode}function t(e){return null!=e&&"function"==typeof e.Dispose}function r(e){t(e)&&e.Dispose()}function o(e,n){var t,r;return(null===(t=Object.getPrototypeOf(e))||void 0===t?void 0:t.constructor)===(null===(r=Object.getPrototypeOf(n))||void 0===r?void 0:r.constructor)}class i{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 s(e){return"function"==typeof e.GetEnumerator?e.GetEnumerator():new i(e[Symbol.iterator]())}function u(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}}}}function c(e,n){let t=e.toString(10);for(;t.length<n;)t="0"+t;return t}function a(e){const n=e;return"number"==typeof n.offset?n.offset:1===e.kind?0:-6e4*e.getTimezoneOffset()}function l(e,n){return(e=e<0&&null!=n&&10!==n?4294967295+e+1:e).toString(n)}class f{static id(e){return f.idMap.has(e)||f.idMap.set(e,++f.count),f.idMap.get(e)}}function d(e){let n=0,t=5381;const r=e.length;for(;n<r;)t=33*t^e.charCodeAt(n++);return t}function h(e){return 2654435761*e|0}function p(e){return 0===e.length?0:e.reduce(((e,n)=>(e<<5)+e^n))}function m(t){var r;if(null==t)return 0;switch(typeof t){case"boolean":return t?1:0;case"number":return h(t);case"string":return d(t);default:if(n(t))return t.GetHashCode();if(e(t))return function(e){const n=e.length,t=new Array(n);for(let r=0;r<n;r++)t[r]=m(e[r]);return p(t)}(t);if(t instanceof Date)return function(e){return e.getTime()}(t);if((null===(r=Object.getPrototypeOf(t))||void 0===r?void 0:r.constructor)===Object){const e=Object.values(t).map((e=>m(e)));return p(e)}return h(f.id(t))}}function g(e){return null==e?0:n(e)?e.GetHashCode():h(f.id(e))}function w(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 _(e,n){return w(e,n,y)}function y(n,t){var r;return n===t||(null==n?null==t:null!=t&&"object"==typeof n&&(function(e){return"function"==typeof e.Equals}(n)?n.Equals(t):e(n)?e(t)&&_(n,t):n instanceof Date?t instanceof Date&&0===v(n,t):(null===(r=Object.getPrototypeOf(n))||void 0===r?void 0:r.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]||!y(e[t[o]],n[r[o]]))return!1;return!0}(n,t)))}function v(e,n){let t,r;return"offset"in e&&"offset"in n?(t=e.getTime(),r=n.getTime()):(t=e.getTime()+a(e),r=n.getTime()+a(n)),t===r?0:t<r?-1:1}function b(e,n){return e===n?0:e<n?-1:1}function C(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,x)}function x(n,t){var r;return n===t?0:null==n?null==t?0:-1:null==t?1:"object"!=typeof n?n<t?-1:1:function(e){return"function"==typeof e.CompareTo}(n)?n.CompareTo(t):e(n)?e(t)?C(n,t):-1:n instanceof Date?t instanceof Date?v(n,t):-1:(null===(r=Object.getPrototypeOf(n))||void 0===r?void 0:r.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=x(e[s],n[s]),0!==i)return i}return 0}(n,t):-1}function S(e,n,t){return e(n,t)>0?n:t}function E(e){const n={};for(const t of e)n[t[0]]=t[1];return n}f.idMap=new WeakMap,f.count=0;const k=Symbol("curried");function I(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[k]=n,t}function A(e,n,t){return r=>1===n?t(...e.concat([r])):A(e.concat([r]),n-1,t)}function N(e,n){return null==n||1===n.length?n:k in n?n[k]:A([],e,n)}function T(e,n=0){var t,r;if(null!=e&&"object"==typeof e){if("function"==typeof e.toString)return e.toString();if(Symbol.iterator in e)return function(e){let n=0,t="[";for(const r of e){if(0===n)t+=T(r);else{if(100===n){t+="; ...";break}t+="; "+T(r)}n++}return t+"]"}(e);{const o=null===(t=Object.getPrototypeOf(e))||void 0===t?void 0:t.constructor;return o===Object&&n<10?"{ "+Object.entries(e).map((([e,t])=>e+" = "+T(t,n+1))).join("\n ")+" }":null!==(r=null==o?void 0:o.name)&&void 0!==r?r:""}}return String(e)}class D{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=T(n[0]),r=t.indexOf(" ")>=0):t=n.map((e=>T(e))).join(", "),e+(r?" (":" ")+t+(r?")":"")}}(this.name,this.fields)}GetHashCode(){const e=this.fields.map((e=>m(e)));return e.splice(0,0,h(this.tag)),p(e)}Equals(e){return this===e||!!o(this,e)&&this.tag===e.tag&&_(this.fields,e.fields)}CompareTo(e){return this===e?0:o(this,e)?this.tag===e.tag?C(this.fields,e.fields):this.tag<e.tag?-1:1:-1}}class P{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+" = "+T(n))).join("\n ")+" }";var e}GetHashCode(){return function(e){const n=Object.values(e).map((e=>m(e)));return p(n)}(this)}Equals(e){return function(e,n){if(e===n)return!0;if(o(e,n)){const t=Object.keys(e);for(let r=0;r<t.length;r++)if(!y(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(o(e,n)){const t=Object.keys(e);for(let r=0;r<t.length;r++){const o=x(e[t[r]],n[t[r]]);if(0!==o)return o}return 0}return-1}(this,e)}}class O{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 M{constructor(e){this.message=e}}function U(e){return function(e){return e instanceof M||e instanceof Error}(e)?e:new Error(String(e))}class L extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Name"]}}function B(e){return new L(0,e)}function F(e){return e.fields[0]}class G extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Website"]}}class R extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["FirstName"]}}class H extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["LastName"]}}class j extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Email"]}}class $ extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["MobilePhone"]}}class W extends P{constructor(e,n,t,r){super(),this.FirstName=e,this.LastName=n,this.Email=t,this.MobilePhone=r}}class z extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Notes"]}}class V extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["PartnerId"]}}function q(e){return e.fields[0]}function Z(e){return new V(0,e)}function J(e){return q(e)}class K extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["AccountId"]}}function Y(e){return e.fields[0]}function X(e){return new K(0,e)}class Q{constructor(e){this.value=e}toJSON(){return this.value}toString(){return String(this.value)}GetHashCode(){return m(this.value)}Equals(e){return null!=e&&y(this.value,e instanceof Q?e.value:e)}CompareTo(e){return null==e?1:x(this.value,e instanceof Q?e.value:e)}}function ee(e){return null==e||e instanceof Q?new Q(e):e}function ne(e){if(null==e)throw new Error("Option has no value");return e instanceof Q?e.value:e}function te(e){return null==e?[]:[ne(e)]}function re(e,n){return null!=e?ne(e):n}function oe(e,n){return null!=n?ee(e(ne(n))):void 0}function ie(){return e=x,{Compare:(n,t)=>e(n,t)};var e}function se(e,n){return"function"==typeof e?new e(n):new Array(n)}function ue(e,n,t,r){const o=0|n;return e.fill(r,o,o+t)}function ce(e,n,t){const r=0|n.length,o=se(t,r);for(let t=0;t<=r-1;t++)o[t]=e(n[t]);return o}function ae(e,n,t){return t.reduce(e,n)}function le(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 fe(e){const n=e<0,t=(e=Math.abs(e))%36e5/6e4;return(n?"-":"+")+c(~~(e/36e5),2)+":"+c(t,2)}function de(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 he(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 pe(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," ")+fe(null!==(r=e.offset)&&void 0!==r?r:0);if(1!==n.length)return he(i,n,!0);switch(n){case"D":case"d":return de(i,"first");case"T":case"t":return de(i,"second");case"O":case"o":return function(e,n){const t=e.toISOString();return t.substring(0,t.length-1)+fe(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 he(e,n,t);switch(n){case"D":case"d":return t?de(e,"first"):e.toLocaleDateString();case"T":case"t":return t?de(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 c(e.getFullYear(),4)+"-"+c(e.getMonth()+1,2)+"-"+c(e.getDate(),2)+"T"+c(e.getHours(),2)+":"+c(e.getMinutes(),2)+":"+c(e.getSeconds(),2)+"."+c(e.getMilliseconds(),3)+(n?fe(-6e4*e.getTimezoneOffset()):"")}}(e,t);default:throw new Error("Unrecognized Date print format")}}(e,n)}function me(e,n){const t=new Date(e);return t.kind=0|(null==n?0:n),t}function ge(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 we(e,n){try{return n.contents=function(e,n=!1){const[t,r]=ge(e),o=null!=r?n&&"Z"===r?1:2:0;return me(t.getTime(),o)}(e),!0}catch(e){return!1}}const _e=Symbol("numeric");function ye(e){return"number"==typeof e||(null==e?void 0:e[_e])}function ve(e,n){return"number"==typeof e?e*n:e[_e]().multiply(n)}function be(e,n){return"number"==typeof e?e.toFixed(n):e[_e]().toFixed(n)}function Ce(e,n){return"number"==typeof e?e.toPrecision(n):e[_e]().toPrecision(n)}function xe(e,n){return"number"==typeof e?e.toExponential(n):e[_e]().toExponential(n)}function Se(e){return"number"==typeof e?(Number(e)>>>0).toString(16):e[_e]().toHex()}function Ee(e,n=0){if(0!=(-284&n))throw new Error("RegexOptions only supports: IgnoreCase, Multiline, Compiled, Singleline and ECMAScript");let t="gu";return t+=1&n?"i":"",t+=2&n?"m":"",t+=16&n?"s":"",new RegExp(e,t)}function ke(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function Ie(e,n,t=0){if(null==n)throw new Error("Input cannot ve null");if(!e.global)throw new Error("Non-global RegExp");e.lastIndex=t;const r=[];let o,i=-1;for(;null!=(o=e.exec(n));)o.index===i?e.lastIndex++:(i=o.index,r.push(o));return r}const Ae=/(^|[^%])%([0+\- ]*)(\*|\d+)?(?:\.(\d+))?(\w)/g,Ne=/(?:(^|[^%])%([0+\- ]*)(\d+)?(?:\.(\d+))?(\w))?%P\(\)/g,Te=/\{(\d+)(,-?\d+)?(?:\:([a-zA-Z])(\d{0,2})|\:(.+?))?\}/g;function De(e,n){return function(e,n){return"number"==typeof e?e<n?-1:e>n?1:0:e.CompareTo(n)}(e,n)<0}function Pe(e){return{input:e,cont:(n=e,e=>{Ae.lastIndex=0;const t=[],r=[];let o=0,i=Ae.exec(n);for(;i;){const e=i.index+(i[1]||"").length;t.push(n.substring(o,e).replace(/%%/g,"%")),r.push(i),o=Ae.lastIndex,Ae.lastIndex-=1,i=Ae.exec(n)}return 0===t.length?e(n.replace(/%%/g,"%")):(t.push(n.substring(o).replace(/%%/g,"%")),Be(e,t,r))})};var n}function Oe(e,n){let t=0,r=0,o="";Ne.lastIndex=0;let i=Ne.exec(e);for(;i;){const s=i.index+(i[1]||"").length;o+=e.substring(r,s).replace(/%%/g,"%");const[,,u,c,a,l]=i;r=Ne.lastIndex,o+=Le(n[t++],u,c,a,l),Ne.lastIndex=r-1,i=Ne.exec(e)}return o+=e.substring(r).replace(/%%/g,"%"),o}function Me(e,n){return"string"==typeof n?e(n):n.cont(e)}function Ue(e){return Me((e=>e),e)}function Le(e,n,t,r,o){let i="";if(n=n||"",o=o||"",ye(e))switch("x"!==o.toLowerCase()&&(De(e,0)?(e=ve(e,-1),i="-"):n.indexOf(" ")>=0?i=" ":n.indexOf("+")>=0&&(i="+")),r=null==r?null:parseInt(r,10),o){case"f":case"F":e=be(e,r=null!=r?r:6);break;case"g":case"G":e=null!=r?Ce(e,r):Ce(e);break;case"e":case"E":e=null!=r?xe(e,r):xe(e);break;case"x":e=Se(e);break;case"X":e=Se(e).toUpperCase();break;default:e=String(e)}else e=e instanceof Date?pe(e):T(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=je(e,t-i.length,s,o)):je(i+e,t,s,o)}return e}function Be(e,n,t,r="",o=-1){return(...i)=>{let s=r;const u=n.slice(),c=t.slice();for(const e of i){const[,,n,t,r,i]=c[0];let a=t;if(o>=0)a=o,o=-1;else if("*"===a){if(e<0)throw new Error("Non-negative number required");o=e;continue}s+=u[0],s+=Le(e,n,a,r,i),u.splice(0,1),c.splice(0,1)}return 0===c.length?(s+=u[0],e(s)):Be(e,u,c,s,o)}}function Fe(e,...n){return"object"==typeof e&&n.length>0&&(e=n[0],n.shift()),e.replace(Te,((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(ye(u))switch(i=null==i?null:parseInt(i,10),o){case"f":case"F":u=be(u,i=null!=i?i:2);break;case"g":case"G":u=null!=i?Ce(u,i):Ce(u);break;case"e":case"E":u=null!=i?xe(u,i):xe(u);break;case"p":case"P":i=null!=i?i:2,u=be(ve(u,100),i)+" %";break;case"d":case"D":u=null!=i?$e(String(u),i,"0"):String(u);break;case"x":case"X":u=null!=i?$e(Se(u),i,"0"):Se(u),"X"===o&&(u=u.toUpperCase());break;default:if(s){let e="";u=s.replace(/([0#,]+)(\.[0#]+)?/,((n,t,r)=>{De(u,0)&&(u=ve(u,-1),e="-"),r=null==r?"":r.substring(1),u=be(u,Math.max(r.length,0));let[o,i]=u.split(".");i||(i=""),o=$e(o,t.replace(/,/g,"").replace(/^#+/,"").length,"0");const s=r.replace(/#+$/,"").length;if(s>i.length?i=function(e,n,t){return je(e,n,"0",!0)}(i,s):s<i.length&&(i=i.substring(0,s)+i.substring(s).replace(/0+$/,"")),t.indexOf(",")>0){const e=o.length%3,n=Math.floor(o.length/3);let t=e>0?o.substr(0,e)+(n>0?",":""):"";for(let r=0;r<n;r++)t+=o.substr(e+3*r,3)+(r<n-1?",":"");o=t}return i.length>0?o+"."+i:o})),u=e+u}}else u=u instanceof Date?pe(u,s||o):T(u);return r=parseInt((r||" ").substring(1),10),isNaN(r)||(u=je(String(u),Math.abs(r)," ",r<0)),u}))}function Ge(e){return"string"!=typeof e||0===e.length}function Re(e){return"string"!=typeof e||/^\s*$/.test(e)}function He(e,n){return Array.isArray(n)?n.join(e):Array.from(n).join(e)}function je(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 $e(e,n,t){return je(e,n,t)}function We(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(ke),n=n.length>0?n:["\\s"];const s=[],u=new RegExp(n.join("|"),"g");let c=!0,a=0;do{const n=u.exec(e);if(null===n){const n=i?e.substring(a).trim():e.substring(a);(!o||n.length>0)&&s.push(n),c=!1}else{const r=i?e.substring(a,n.index).trim():e.substring(a,n.index);(!o||r.length>0)&&(null!=t&&s.length+1===t?(s.push(i?e.substring(a).trim():e.substring(a)),c=!1):s.push(r)),a=u.lastIndex}}while(c);return s}function ze(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)}const Ve="Collection was empty.";class qe extends P{constructor(e,n){super(),this.head=e,this.tail=n}toString(){return"["+He("; ",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(y(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)+m(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|x(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 Ze(this)}[Symbol.iterator](){return u(this.GetEnumerator())}"System.Collections.IEnumerable.GetEnumerator"(){return s(this)}}class Ze{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 Je(){return new qe(null,void 0)}function Ke(e,n){return new qe(e,n)}function Ye(e){return null==e.tail}function Xe(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)}function Qe(e){if(null!=e.tail)return e.head;throw new Error(Ve+"\\nParameter name: list")}function en(e){const n=e.tail;if(null!=n)return n;throw new Error(Ve+"\\nParameter name: list")}function nn(){return Je()}function tn(e,n){return Ke(e,n)}function rn(e){return Ke(e,Je())}function on(e){return Ye(e)}function sn(e){return Xe(e)}function un(e){return Qe(e)}function cn(e){return en(e)}function an(e){const n=0|Xe(e),t=ue(new Array(n),0,n,null);return((e,n)=>{for(;;){const r=e,o=n;if(Ye(o))break;t[r]=Qe(o),e=r+1,n=en(o)}})(0,e),t}function ln(e,n,t){let r=n,o=t;for(;!Ye(o);)r=e(r,Qe(o)),o=en(o);return r}function fn(e){return ln(((e,n)=>Ke(n,e)),Je(),e)}function dn(e,n){ln(((n,t)=>{e(t)}),void 0,n)}function hn(e,n){let t=n;for(let n=e.length-1;n>=0;n--)t=Ke(e[n],t);return t}function pn(e){return hn(e,Je())}function mn(e,n){return ln(((e,n)=>Ke(n,e)),n,fn(e))}function gn(e,n){const t=Je(),r=function(e,n,t){return((n,t,r)=>{for(;;){const o=n,i=t,s=r;if(Ye(s))return i;n=o+1,t=e(o,i,Qe(s)),r=en(s)}})(0,n,t)}(((n,t,r)=>{const o=new qe(e(n,r),void 0);return t.tail=o,o}),t,n),o=Je();return r.tail=o,en(t)}function wn(e,n){const t=Je(),r=ln(((n,t)=>{const r=new qe(e(t),void 0);return n.tail=r,r}),t,n),o=Je();return r.tail=o,en(t)}function _n(e,n){return function(e,n){return(n=>{e:for(;;){const t=n;if(Ye(t))return;{const r=e(Qe(t));if(null==r){n=en(t);continue e}return r}}})(n)}((n=>e(n)?ee(n):void 0),n)}const yn="Enumeration already finished.",vn="Enumeration has not started. Call MoveNext.";function bn(){throw new Error(vn)}function Cn(){throw new Error(yn)}class xn{constructor(e){this.f=e}toString(){let e=0,n="seq [";const t=s(this);try{for(;e<4&&t["System.Collections.IEnumerator.MoveNext"]();)e>0&&(n+="; "),n+=T(t["System.Collections.Generic.IEnumerator`1.get_Current"]()),e=e+1|0;return 4===e&&(n+="; ..."),n+"]"}finally{r(t)}}GetEnumerator(){return this.f()}[Symbol.iterator](){return u(this.GetEnumerator())}"System.Collections.IEnumerable.GetEnumerator"(){return this.f()}}class Sn{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 En(e,n,t){return new Sn(e,n,t)}function kn(e,n,t){let r,o=!1,i=ee(e());const s=()=>{if(null!=i){const e=ne(i);try{t(e)}finally{i=void 0}}},u=()=>{try{s()}finally{r=void 0}};return En((()=>(o||bn(),null!=r?ne(r):Cn())),(()=>{if(o||(o=!0),null!=i){const e=ne(i);let t;try{t=n(e)}catch(e){throw u(),e}return null!=t?(r=t,!0):(u(),!1)}return!1}),s)}function In(e){return function(e){return new xn(e)}(e)}function An(e){return n="source",null==e&&function(e){throw new Error(e)}(n),s(e);var n}function Nn(e){return In((()=>s(e())))}function Tn(e){return In((()=>function(e){let n,t,o,i=!1,u=!1;const c=()=>{if(u=!0,null!=t){const e=t;try{r(e)}finally{t=void 0}}if(null!=n){const e=n;try{r(e)}finally{n=void 0}}};return En((()=>(i?u&&Cn():bn(),null!=o?ne(o):Cn())),(()=>{let a;if(i||(i=!0),u)return!1;{let i;for(;null==i;){const u=[n,t];if(null!=u[0])if(null!=u[1]){const e=u[1];if(e["System.Collections.IEnumerator.MoveNext"]())o=ee(e["System.Collections.Generic.IEnumerator`1.get_Current"]()),i=!0;else try{r(e)}finally{t=void 0}}else{const e=u[0];e["System.Collections.IEnumerator.MoveNext"]()?(a=e["System.Collections.Generic.IEnumerator`1.get_Current"](),t=s(a)):(c(),i=!1)}else n=s(e)}return ne(i)}}),(()=>{u||c()}))}(e)))}function Dn(){return Nn((()=>new Array(0)))}function Pn(e){return Nn((()=>function(e,n){const t=se(void 0,1);return t[0]=e,t}(e)))}function On(e){return e instanceof qe?an(e):Array.from(e)}function Mn(n){return e(n)?pn(n):n instanceof qe?n:function(n){let t,o;if(e(n))return pn(n);if(n instanceof qe)return n;{const e=Je();let i=e;const u=s(n);try{for(;u["System.Collections.IEnumerator.MoveNext"]();){const e=u["System.Collections.Generic.IEnumerator`1.get_Current"]();t=i,o=new qe(e,void 0),t.tail=o,i=o}}finally{r(u)}const c=i,a=Je();return c.tail=a,en(e)}}(n)}function Un(e,n,t){return In((()=>kn(e,n,t)))}function Ln(e,n){return Tn([e,n])}function Bn(e,n){return Un((()=>An(n)),(n=>{let t;for(;null==t&&n["System.Collections.IEnumerator.MoveNext"]();)t=e(n["System.Collections.Generic.IEnumerator`1.get_Current"]());return t}),(e=>{r(e)}))}function Fn(e,n,t){const o=An(n);try{let n=!1;for(;!n&&o["System.Collections.IEnumerator.MoveNext"]();)n=t.Equals(e,o["System.Collections.Generic.IEnumerator`1.get_Current"]());return n}finally{r(o)}}function Gn(e,n,t){const o=An(t);try{let t=n;for(;o["System.Collections.IEnumerator.MoveNext"]();)t=e(t,o["System.Collections.Generic.IEnumerator`1.get_Current"]());return t}finally{r(o)}}function Rn(e,n){Gn(((n,t)=>{e(t)}),void 0,n)}function Hn(e,n){return Un((()=>An(n)),(n=>n["System.Collections.IEnumerator.MoveNext"]()?ee(e(n["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0),(e=>{r(e)}))}function jn(e,n){return t=()=>An(n),o=(n,t)=>t["System.Collections.IEnumerator.MoveNext"]()?ee(e(n,t["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0,i=e=>{r(e)},In((()=>{let e=-1;return kn(t,(n=>(e=e+1|0,o(e,n))),i)}));var t,o,i}class $n{constructor(e,n){this.cleanup=e,this.res=n}Dispose(){this.cleanup()}GetEnumerator(){return getEnumerator(this.res)}[Symbol.iterator](){return toIterator(this.GetEnumerator())}"System.Collections.IEnumerable.GetEnumerator"(){return getEnumerator(this.res)}}function Wn(e){return Nn((()=>function(e){return e.slice().reverse()}(On(e))))}const zn={None:0,LowerFirst:1,SnakeCase:2,SnakeCaseAllCaps:3,KebabCase:4};function Vn(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 qn(e,n=zn.None){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 zn.LowerFirst:return e.charAt(0).toLowerCase()+e.slice(1);case zn.SnakeCase:return Vn(e,"_");case zn.SnakeCaseAllCaps:return Vn(e,"_").toUpperCase();case zn.KebabCase:return Vn(e,"-");case zn.None:default:return e}}(e,n),t[e]=r}for(let n of e){let e=zn.None;if(null==n&&o(n),n instanceof D){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}function Zn(e,n,t){return!!e.has(n)&&(t.contents=e.get(n),!0)}function Jn(e,n){if(e.has(n))return e.get(n);throw new Error(`The given key '${n}' was not present in the dictionary.`)}class Kn{constructor(e,n){const t=new O(null);this.comparer=n,t.contents=this,this.hashMap=new Map([]),this["init@8-1"]=1;const o=s(e);try{for(;o["System.Collections.IEnumerator.MoveNext"]();){const e=o["System.Collections.Generic.IEnumerator`1.get_Current"]();rt(t.contents,e[0],e[1])}}finally{r(o)}}get[Symbol.toStringTag](){return"Dictionary"}toJSON(e){return Array.from(this)}"System.Collections.IEnumerable.GetEnumerator"(){return s(this)}GetEnumerator(){return s(Tn(this.hashMap.values()))}[Symbol.iterator](){return u(this.GetEnumerator())}"System.Collections.Generic.ICollection`1.Add2B595"(e){rt(this,e[0],e[1])}"System.Collections.Generic.ICollection`1.Clear"(){Qn(this)}"System.Collections.Generic.ICollection`1.Contains2B595"(e){const n=Xn(this,e[0]);let t;switch(t=null!=n&&y(n[1],e[1])?0:1,t){case 0:return!0;case 1:return!1}}"System.Collections.Generic.ICollection`1.CopyToZ2E171D71"(e,n){var t;t=(t,r)=>{e[n+t]=r},Gn(((e,n)=>(t(e,n),e+1|0)),0,this)}"System.Collections.Generic.ICollection`1.get_Count"(){return 0|et(this)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!1}"System.Collections.Generic.ICollection`1.Remove2B595"(e){const n=Xn(this,e[0]);return null!=n&&(y(n[1],e[1])&&it(this,e[0]),!0)}"System.Collections.Generic.IDictionary`2.Add5BDDA1"(e,n){rt(this,e,n)}"System.Collections.Generic.IDictionary`2.ContainsKey2B595"(e){return ot(this,e)}"System.Collections.Generic.IDictionary`2.get_Item2B595"(e){return nt(this,e)}"System.Collections.Generic.IDictionary`2.set_Item5BDDA1"(e,n){tt(this,e,n)}"System.Collections.Generic.IDictionary`2.get_Keys"(){const e=this;return On(Nn((()=>Hn((e=>e[0]),e))))}"System.Collections.Generic.IDictionary`2.Remove2B595"(e){return it(this,e)}"System.Collections.Generic.IDictionary`2.TryGetValue23A0B95A"(e,n){const t=Xn(this,e);if(null!=t){const e=t;return n.contents=e[1],!0}return!1}"System.Collections.Generic.IDictionary`2.get_Values"(){const e=this;return On(Nn((()=>Hn((e=>e[1]),e))))}get size(){return 0|et(this)}clear(){Qn(this)}delete(e){return it(this,e)}entries(){return Hn((e=>[e[0],e[1]]),this)}get(e){return nt(this,e)}has(e){return ot(this,e)}keys(){return Hn((e=>e[0]),this)}set(e,n){return tt(this,e,n),this}values(){return Hn((e=>e[1]),this)}forEach(e,n){const t=this;Rn((n=>{e(n[1],n[0],t)}),t)}}function Yn(e,n){const t=0|e.comparer.GetHashCode(n);let r,o=null;return r=[Zn(e.hashMap,t,new O((()=>o),(e=>{o=e}))),o],r[0]?[!0,t,r[1].findIndex((t=>e.comparer.Equals(n,t[0])))]:[!1,t,-1]}function Xn(e,n){const t=Yn(e,n);let r;switch(r=t[0]&&t[2]>-1?0:1,r){case 0:return Jn(e.hashMap,t[1])[t[2]];case 1:return}}function Qn(e){e.hashMap.clear()}function et(e){let n=0,t=s(e.hashMap.values());try{for(;t["System.Collections.IEnumerator.MoveNext"]();)n=n+t["System.Collections.Generic.IEnumerator`1.get_Current"]().length|0}finally{r(t)}return 0|n}function nt(e,n){const t=Xn(e,n);if(null!=t)return t[1];throw new Error("The item was not found in collection")}function tt(e,n,t){const r=Yn(e,n);r[0]?r[2]>-1?Jn(e.hashMap,r[1])[r[2]]=[n,t]:Jn(e.hashMap,r[1]).push([n,t]):e.hashMap.set(r[1],[[n,t]])}function rt(e,n,t){const r=Yn(e,n);if(r[0]){if(r[2]>-1){const e=Fe("An item with the same key has already been added. Key: {0}",n);throw new Error(e)}Jn(e.hashMap,r[1]).push([n,t])}else e.hashMap.set(r[1],[[n,t]])}function ot(e,n){const t=Yn(e,n);let r;switch(r=t[0]&&t[2]>-1?0:1,r){case 0:return!0;case 1:return!1}}function it(e,n){const t=Yn(e,n);let r;switch(r=t[0]&&t[2]>-1?0:1,r){case 0:return Jn(e.hashMap,t[1]).splice(t[2],1),!0;case 1:return!1}}class st extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Ok","Error"]}}function ut(e,n){return 0===n.tag?new st(0,e(n.fields[0])):new st(1,n.fields[0])}class ct extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Choice1Of2","Choice2Of2"]}}var at,lt,ft,dt,ht,pt,mt,gt,wt={},_t=[],yt=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function vt(e,n){for(var t in n)e[t]=n[t];return e}function bt(e){var n=e.parentNode;n&&n.removeChild(e)}function Ct(e,n,t){var r,o,i,s={};for(i in n)"key"==i?r=n[i]:"ref"==i?o=n[i]:s[i]=n[i];if(arguments.length>2&&(s.children=arguments.length>3?at.call(arguments,2):t),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===s[i]&&(s[i]=e.defaultProps[i]);return xt(e,s,r,o,null)}function xt(e,n,t,r,o){var i={type:e,props:n,key:t,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++ft:o};return null==o&&null!=lt.vnode&<.vnode(i),i}function St(e){return e.children}function Et(e,n){this.props=e,this.context=n}function kt(e,n){if(null==n)return e.__?kt(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?kt(e):null}function It(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 It(e)}}function At(e){(!e.__d&&(e.__d=!0)&&dt.push(e)&&!Nt.__r++||ht!==lt.debounceRendering)&&((ht=lt.debounceRendering)||pt)(Nt)}function Nt(){var e,n,t,r,o,i,s,u;for(dt.sort(mt);e=dt.shift();)e.__d&&(n=dt.length,r=void 0,o=void 0,s=(i=(t=e).__v).__e,(u=t.__P)&&(r=[],(o=vt({},i)).__v=i.__v+1,Gt(u,i,o,t.__n,void 0!==u.ownerSVGElement,null!=i.__h?[s]:null,r,null==s?kt(i):s,i.__h),Rt(r,i),i.__e!=s&&It(i)),dt.length>n&&dt.sort(mt));Nt.__r=0}function Tt(e,n,t,r,o,i,s,u,c,a){var l,f,d,h,p,m,g,w=r&&r.__k||_t,_=w.length;for(t.__k=[],l=0;l<n.length;l++)if(null!=(h=t.__k[l]=null==(h=n[l])||"boolean"==typeof h||"function"==typeof h?null:"string"==typeof h||"number"==typeof h||"bigint"==typeof h?xt(null,h,null,null,h):Array.isArray(h)?xt(St,{children:h},null,null,null):h.__b>0?xt(h.type,h.props,h.key,h.ref?h.ref:null,h.__v):h)){if(h.__=t,h.__b=t.__b+1,null===(d=w[l])||d&&h.key==d.key&&h.type===d.type)w[l]=void 0;else for(f=0;f<_;f++){if((d=w[f])&&h.key==d.key&&h.type===d.type){w[f]=void 0;break}d=null}Gt(e,h,d=d||wt,o,i,s,u,c,a),p=h.__e,(f=h.ref)&&d.ref!=f&&(g||(g=[]),d.ref&&g.push(d.ref,null,h),g.push(f,h.__c||p,h)),null!=p?(null==m&&(m=p),"function"==typeof h.type&&h.__k===d.__k?h.__d=c=Dt(h,c,e):c=Ot(e,h,d,w,p,c),"function"==typeof t.type&&(t.__d=c)):c&&d.__e==c&&c.parentNode!=e&&(c=kt(d))}for(t.__e=m,l=_;l--;)null!=w[l]&&("function"==typeof t.type&&null!=w[l].__e&&w[l].__e==t.__d&&(t.__d=Mt(r).nextSibling),$t(w[l],w[l]));if(g)for(l=0;l<g.length;l++)jt(g[l],g[++l],g[++l])}function Dt(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?Dt(r,n,t):Ot(t,r,r,o,r.__e,n));return n}function Pt(e,n){return n=n||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){Pt(e,n)})):n.push(e)),n}function Ot(e,n,t,r,o,i){var s,u,c;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,c=0;(u=u.nextSibling)&&c<r.length;c+=1)if(u==o)break e;e.insertBefore(o,i),s=i}return void 0!==s?s:o.nextSibling}function Mt(e){var n,t,r;if(null==e.type||"string"==typeof e.type)return e.__e;if(e.__k)for(n=e.__k.length-1;n>=0;n--)if((t=e.__k[n])&&(r=Mt(t)))return r;return null}function Ut(e,n,t){"-"===n[0]?e.setProperty(n,null==t?"":t):e[n]=null==t?"":"number"!=typeof t||yt.test(n)?t:t+"px"}function Lt(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||Ut(e.style,n,"");if(t)for(n in t)r&&t[n]===r[n]||Ut(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?Ft:Bt,i):e.removeEventListener(n,i?Ft:Bt,i);else if("dangerouslySetInnerHTML"!==n){if(o)n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==n&&"height"!==n&&"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&&"-"!==n[4]?e.removeAttribute(n):e.setAttribute(n,t))}}function Bt(e){return this.l[e.type+!1](lt.event?lt.event(e):e)}function Ft(e){return this.l[e.type+!0](lt.event?lt.event(e):e)}function Gt(e,n,t,r,o,i,s,u,c){var a,l,f,d,h,p,m,g,w,_,y,v,b,C,x,S=n.type;if(void 0!==n.constructor)return null;null!=t.__h&&(c=t.__h,u=n.__e=t.__e,n.__h=null,i=[u]),(a=lt.__b)&&a(n);try{e:if("function"==typeof S){if(g=n.props,w=(a=S.contextType)&&r[a.__c],_=a?w?w.props.value:a.__:r,t.__c?m=(l=n.__c=t.__c).__=l.__E:("prototype"in S&&S.prototype.render?n.__c=l=new S(g,_):(n.__c=l=new Et(g,_),l.constructor=S,l.render=Wt),w&&w.sub(l),l.props=g,l.state||(l.state={}),l.context=_,l.__n=r,f=l.__d=!0,l.__h=[],l._sb=[]),null==l.__s&&(l.__s=l.state),null!=S.getDerivedStateFromProps&&(l.__s==l.state&&(l.__s=vt({},l.__s)),vt(l.__s,S.getDerivedStateFromProps(g,l.__s))),d=l.props,h=l.state,l.__v=n,f)null==S.getDerivedStateFromProps&&null!=l.componentWillMount&&l.componentWillMount(),null!=l.componentDidMount&&l.__h.push(l.componentDidMount);else{if(null==S.getDerivedStateFromProps&&g!==d&&null!=l.componentWillReceiveProps&&l.componentWillReceiveProps(g,_),!l.__e&&null!=l.shouldComponentUpdate&&!1===l.shouldComponentUpdate(g,l.__s,_)||n.__v===t.__v){for(n.__v!==t.__v&&(l.props=g,l.state=l.__s,l.__d=!1),l.__e=!1,n.__e=t.__e,n.__k=t.__k,n.__k.forEach((function(e){e&&(e.__=n)})),y=0;y<l._sb.length;y++)l.__h.push(l._sb[y]);l._sb=[],l.__h.length&&s.push(l);break e}null!=l.componentWillUpdate&&l.componentWillUpdate(g,l.__s,_),null!=l.componentDidUpdate&&l.__h.push((function(){l.componentDidUpdate(d,h,p)}))}if(l.context=_,l.props=g,l.__P=e,v=lt.__r,b=0,"prototype"in S&&S.prototype.render){for(l.state=l.__s,l.__d=!1,v&&v(n),a=l.render(l.props,l.state,l.context),C=0;C<l._sb.length;C++)l.__h.push(l._sb[C]);l._sb=[]}else do{l.__d=!1,v&&v(n),a=l.render(l.props,l.state,l.context),l.state=l.__s}while(l.__d&&++b<25);l.state=l.__s,null!=l.getChildContext&&(r=vt(vt({},r),l.getChildContext())),f||null==l.getSnapshotBeforeUpdate||(p=l.getSnapshotBeforeUpdate(d,h)),x=null!=a&&a.type===St&&null==a.key?a.props.children:a,Tt(e,Array.isArray(x)?x:[x],n,t,r,o,i,s,u,c),l.base=n.__e,n.__h=null,l.__h.length&&s.push(l),m&&(l.__E=l.__=null),l.__e=!1}else null==i&&n.__v===t.__v?(n.__k=t.__k,n.__e=t.__e):n.__e=Ht(t.__e,n,t,r,o,i,s,c);(a=lt.diffed)&&a(n)}catch(e){n.__v=null,(c||null!=i)&&(n.__e=u,n.__h=!!c,i[i.indexOf(u)]=null),lt.__e(e,n,t)}}function Rt(e,n){lt.__c&<.__c(n,e),e.some((function(n){try{e=n.__h,n.__h=[],e.some((function(e){e.call(n)}))}catch(e){lt.__e(e,n.__v)}}))}function Ht(e,n,t,r,o,i,s,u){var c,a,l,f=t.props,d=n.props,h=n.type,p=0;if("svg"===h&&(o=!0),null!=i)for(;p<i.length;p++)if((c=i[p])&&"setAttribute"in c==!!h&&(h?c.localName===h:3===c.nodeType)){e=c,i[p]=null;break}if(null==e){if(null===h)return document.createTextNode(d);e=o?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,d.is&&d),i=null,u=!1}if(null===h)f===d||u&&e.data===d||(e.data=d);else{if(i=i&&at.call(e.childNodes),a=(f=t.props||wt).dangerouslySetInnerHTML,l=d.dangerouslySetInnerHTML,!u){if(null!=i)for(f={},p=0;p<e.attributes.length;p++)f[e.attributes[p].name]=e.attributes[p].value;(l||a)&&(l&&(a&&l.__html==a.__html||l.__html===e.innerHTML)||(e.innerHTML=l&&l.__html||""))}if(function(e,n,t,r,o){var i;for(i in t)"children"===i||"key"===i||i in n||Lt(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]||Lt(e,i,n[i],t[i],r)}(e,d,f,o,u),l)n.__k=[];else if(p=n.props.children,Tt(e,Array.isArray(p)?p:[p],n,t,r,o&&"foreignObject"!==h,i,s,i?i[0]:t.__k&&kt(t,0),u),null!=i)for(p=i.length;p--;)null!=i[p]&&bt(i[p]);u||("value"in d&&void 0!==(p=d.value)&&(p!==e.value||"progress"===h&&!p||"option"===h&&p!==f.value)&&Lt(e,"value",p,f.value,!1),"checked"in d&&void 0!==(p=d.checked)&&p!==e.checked&&Lt(e,"checked",p,f.checked,!1))}return e}function jt(e,n,t){try{"function"==typeof e?e(n):e.current=n}catch(e){lt.__e(e,t)}}function $t(e,n,t){var r,o;if(lt.unmount&<.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||jt(r,null,n)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){lt.__e(e,n)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&$t(r[o],n,t||"function"!=typeof e.type);t||null==e.__e||bt(e.__e),e.__=e.__e=e.__d=void 0}function Wt(e,n,t){return this.constructor(e,t)}function zt(e,n,t){var r,o,i;lt.__&<.__(e,n),o=(r="function"==typeof t)?null:t&&t.__k||n.__k,i=[],Gt(n,e=(!r&&t||n).__k=Ct(St,null,[e]),o||wt,wt,void 0!==n.ownerSVGElement,!r&&t?[t]:o?null:n.firstChild?at.call(n.childNodes):null,i,!r&&t?t:o?o.__e:n.firstChild,r),Rt(i,e)}function Vt(e,n){zt(e,n,Vt)}function qt(e,n,t){var r,o,i,s=vt({},e.props);for(i in n)"key"==i?r=n[i]:"ref"==i?o=n[i]:s[i]=n[i];return arguments.length>2&&(s.children=arguments.length>3?at.call(arguments,2):t),xt(e.type,s,r||e.key,o||e.ref,null)}function Zt(e,n){var t={__c:n="__cC"+gt++,__: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((function(e){e.__e=!0,At(e)}))},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}at=_t.slice,lt={__e:function(e,n,t,r){for(var o,i,s;n=n.__;)if((o=n.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(n){e=n}throw e}},ft=0,Et.prototype.setState=function(e,n){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=vt({},this.state),"function"==typeof e&&(e=e(vt({},t),this.props)),e&&vt(t,e),null!=e&&this.__v&&(n&&this._sb.push(n),At(this))},Et.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),At(this))},Et.prototype.render=St,dt=[],pt="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,mt=function(e,n){return e.__v.__b-n.__v.__b},Nt.__r=0,gt=0;var Jt,Kt,Yt,Xt,Qt=0,er=[],nr=[],tr=lt.__b,rr=lt.__r,or=lt.diffed,ir=lt.__c,sr=lt.unmount;function ur(e,n){lt.__h&<.__h(Kt,e,Qt||n),Qt=0;var t=Kt.__H||(Kt.__H={__:[],__h:[]});return e>=t.__.length&&t.__.push({__V:nr}),t.__[e]}function cr(e){return Qt=1,ar(Cr,e)}function ar(e,n,t){var r=ur(Jt++,2);if(r.t=e,!r.__c&&(r.__=[t?t(n):Cr(void 0,n),function(e){var n=r.__N?r.__N[0]:r.__[0],t=r.t(n,e);n!==t&&(r.__N=[t,r.__[1]],r.__c.setState({}))}],r.__c=Kt,!Kt.u)){var o=function(e,n,t){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter((function(e){return e.__c}));if(o.every((function(e){return!e.__N})))return!i||i.call(this,e,n,t);var s=!1;return o.forEach((function(e){if(e.__N){var n=e.__[0];e.__=e.__N,e.__N=void 0,n!==e.__[0]&&(s=!0)}})),!(!s&&r.__c.props===e)&&(!i||i.call(this,e,n,t))};Kt.u=!0;var i=Kt.shouldComponentUpdate,s=Kt.componentWillUpdate;Kt.componentWillUpdate=function(e,n,t){if(this.__e){var r=i;i=void 0,o(e,n,t),i=r}s&&s.call(this,e,n,t)},Kt.shouldComponentUpdate=o}return r.__N||r.__}function lr(e,n){var t=ur(Jt++,3);!lt.__s&&br(t.__H,n)&&(t.__=e,t.i=n,Kt.__H.__h.push(t))}function fr(e,n){var t=ur(Jt++,4);!lt.__s&&br(t.__H,n)&&(t.__=e,t.i=n,Kt.__h.push(t))}function dr(e){return Qt=5,hr((function(){return{current:e}}),[])}function hr(e,n){var t=ur(Jt++,7);return br(t.__H,n)?(t.__V=e(),t.i=n,t.__h=e,t.__V):t.__}function pr(e,n){return Qt=8,hr((function(){return e}),n)}function mr(e){var n=Kt.context[e.__c],t=ur(Jt++,9);return t.c=e,n?(null==t.__&&(t.__=!0,n.sub(Kt)),n.props.value):e.__}function gr(){for(var e;e=er.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(yr),e.__H.__h.forEach(vr),e.__H.__h=[]}catch(n){e.__H.__h=[],lt.__e(n,e.__v)}}lt.__b=function(e){Kt=null,tr&&tr(e)},lt.__r=function(e){rr&&rr(e),Jt=0;var n=(Kt=e.__c).__H;n&&(Yt===Kt?(n.__h=[],Kt.__h=[],n.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=nr,e.__N=e.i=void 0}))):(n.__h.forEach(yr),n.__h.forEach(vr),n.__h=[])),Yt=Kt},lt.diffed=function(e){or&&or(e);var n=e.__c;n&&n.__H&&(n.__H.__h.length&&(1!==er.push(n)&&Xt===lt.requestAnimationFrame||((Xt=lt.requestAnimationFrame)||_r)(gr)),n.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==nr&&(e.__=e.__V),e.i=void 0,e.__V=nr}))),Yt=Kt=null},lt.__c=function(e,n){n.some((function(e){try{e.__h.forEach(yr),e.__h=e.__h.filter((function(e){return!e.__||vr(e)}))}catch(t){n.some((function(e){e.__h&&(e.__h=[])})),n=[],lt.__e(t,e.__v)}})),ir&&ir(e,n)},lt.unmount=function(e){sr&&sr(e);var n,t=e.__c;t&&t.__H&&(t.__H.__.forEach((function(e){try{yr(e)}catch(e){n=e}})),t.__H=void 0,n&<.__e(n,t.__v))};var wr="function"==typeof requestAnimationFrame;function _r(e){var n,t=function(){clearTimeout(r),wr&&cancelAnimationFrame(n),setTimeout(e)},r=setTimeout(t,100);wr&&(n=requestAnimationFrame(t))}function yr(e){var n=Kt,t=e.__c;"function"==typeof t&&(e.__c=void 0,t()),Kt=n}function vr(e){var n=Kt;e.__c=e.__(),Kt=n}function br(e,n){return!e||e.length!==n.length||n.some((function(n,t){return n!==e[t]}))}function Cr(e,n){return"function"==typeof n?n(e):n}function xr(e,n){for(var t in n)e[t]=n[t];return e}function Sr(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 Er(e,n){return e===n&&(0!==e||1/e==1/n)||e!=e&&n!=n}function kr(e){this.props=e}(kr.prototype=new Et).isPureReactComponent=!0,kr.prototype.shouldComponentUpdate=function(e,n){return Sr(this.props,e)||Sr(this.state,n)};var Ir=lt.__b;lt.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ir&&Ir(e)};var Ar="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Nr(e){function n(n){var t=xr({},n);return delete t.ref,e(t,n.ref||null)}return n.$$typeof=Ar,n.render=n,n.prototype.isReactComponent=n.__f=!0,n.displayName="ForwardRef("+(e.displayName||e.name)+")",n}var Tr=function(e,n){return null==e?null:Pt(Pt(e).map(n))},Dr={map:Tr,forEach:Tr,count:function(e){return e?Pt(e).length:0},only:function(e){var n=Pt(e);if(1!==n.length)throw"Children.only";return n[0]},toArray:Pt},Pr=lt.__e;lt.__e=function(e,n,t,r){if(e.then)for(var o,i=n;i=i.__;)if((o=i.__c)&&o.__c)return null==n.__e&&(n.__e=t.__e,n.__k=t.__k),o.__c(e,n);Pr(e,n,t,r)};var Or=lt.unmount;function Mr(e,n,t){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=xr({},e)).__c&&(e.__c.__P===t&&(e.__c.__P=n),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Mr(e,n,t)}))),e}function Ur(e,n,t){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Ur(e,n,t)})),e.__c&&e.__c.__P===n&&(e.__e&&t.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=t)),e}function Lr(){this.__u=0,this.t=null,this.__b=null}function Br(e){var n=e.__.__c;return n&&n.__a&&n.__a(e)}function Fr(){this.u=null,this.o=null}lt.unmount=function(e){var n=e.__c;n&&n.__R&&n.__R(),n&&!0===e.__h&&(e.type=null),Or&&Or(e)},(Lr.prototype=new Et).__c=function(e,n){var t=n.__c,r=this;null==r.t&&(r.t=[]),r.t.push(t);var o=Br(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.__a){var e=r.state.__a;r.__v.__k[0]=Ur(e,e.__c.__P,e.__c.__O)}var n;for(r.setState({__a:r.__b=null});n=r.t.pop();)n.forceUpdate()}},c=!0===n.__h;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},Lr.prototype.componentWillUnmount=function(){this.t=[]},Lr.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]=Mr(this.__b,t,r.__O=r.__P)}this.__b=null}var o=n.__a&&Ct(St,null,e.fallback);return o&&(o.__h=null),[Ct(St,null,n.__a?null:e.children),o]};var Gr=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 Rr(e){return this.getChildContext=function(){return e.context},e.children}function Hr(e){var n=this,t=e.i;n.componentWillUnmount=function(){zt(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)}}),zt(Ct(Rr,{context:n.context},e.__v),n.l)):n.l&&n.componentWillUnmount()}(Fr.prototype=new Et).__a=function(e){var n=this,t=Br(n.__v),r=n.o.get(e);return r[0]++,function(o){var i=function(){n.props.revealOrder?(r.push(o),Gr(n,e,r)):o()};t?t(i):i()}},Fr.prototype.render=function(e){this.u=null,this.o=new Map;var n=Pt(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},Fr.prototype.componentDidUpdate=Fr.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(n,t){Gr(e,t,n)}))};var jr="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,$r=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Wr=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,zr=/[A-Z0-9]/g,Vr="undefined"!=typeof document,qr=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};Et.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(Et.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(n){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:n})}})}));var Zr=lt.event;function Jr(){}function Kr(){return this.cancelBubble}function Yr(){return this.defaultPrevented}lt.event=function(e){return Zr&&(e=Zr(e)),e.persist=Jr,e.isPropagationStopped=Kr,e.isDefaultPrevented=Yr,e.nativeEvent=e};var Xr,Qr={enumerable:!1,configurable:!0,get:function(){return this.class}},eo=lt.vnode;lt.vnode=function(e){"string"==typeof e.type&&function(e){var n=e.props,t=e.type,r={};for(var o in n){var i=n[o];if(!("value"===o&&"defaultValue"in n&&null==i||Vr&&"children"===o&&"noscript"===t||"class"===o||"className"===o)){var s=o.toLowerCase();"defaultValue"===o&&"value"in n&&null==n.value?o="value":"download"===o&&!0===i?i="":"ondoubleclick"===s?o="ondblclick":"onchange"!==s||"input"!==t&&"textarea"!==t||qr(n.type)?"onfocus"===s?o="onfocusin":"onblur"===s?o="onfocusout":Wr.test(o)?o=s:-1===t.indexOf("-")&&$r.test(o)?o=o.replace(zr,"-$&").toLowerCase():null===i&&(i=void 0):s=o="oninput","oninput"===s&&r[o=s]&&(o="oninputCapture"),r[o]=i}}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=Pt(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=Pt(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),n.class&&!n.className?(r.class=n.class,Object.defineProperty(r,"className",Qr)):(n.className&&!n.class||n.class&&n.className)&&(r.class=r.className=n.className),e.props=r}(e),e.$$typeof=jr,eo&&eo(e)};var no=lt.__r;lt.__r=function(e){no&&no(e),Xr=e.__c};var to=lt.diffed;lt.diffed=function(e){to&&to(e);var n=e.props,t=e.__e;null!=t&&"textarea"===e.type&&"value"in n&&n.value!==t.value&&(t.value=null==n.value?"":n.value),Xr=null};var ro={ReactCurrentDispatcher:{current:{readContext:function(e){return Xr.__n[e.__c].props.value}}}};function oo(e){return!!e&&e.$$typeof===jr}function io(e){return oo(e)?qt.apply(null,arguments):e}function so(e){e()}var uo={useState:cr,useId:function(){var e=ur(Jt++,11);if(!e.__){for(var n=Kt.__v;null!==n&&!n.__m&&null!==n.__;)n=n.__;var t=n.__m||(n.__m=[0,0]);e.__="P"+t[0]+"-"+t[1]++}return e.__},useReducer:ar,useEffect:lr,useLayoutEffect:fr,useInsertionEffect:fr,useTransition:function(){return[!1,so]},useDeferredValue:function(e){return e},useSyncExternalStore:function(e,n){var t=n(),r=cr({h:{__:t,v:n}}),o=r[0].h,i=r[1];return fr((function(){o.__=t,o.v=n,Er(o.__,n())||i({h:o})}),[e,t,n]),lr((function(){return Er(o.__,o.v())||i({h:o}),e((function(){Er(o.__,o.v())||i({h:o})}))}),[e]),t},startTransition:so,useRef:dr,useImperativeHandle:function(e,n,t){Qt=6,fr((function(){return"function"==typeof e?(e(n()),function(){return e(null)}):e?(e.current=n(),function(){return e.current=null}):void 0}),null==t?t:t.concat(e))},useMemo:hr,useCallback:pr,useContext:mr,useDebugValue:function(e,n){lt.useDebugValue&<.useDebugValue(n?n(e):e)},version:"17.0.2",Children:Dr,render:function(e,n,t){return null==n.__k&&(n.textContent=""),zt(e,n),"function"==typeof t&&t(),e?e.__c:null},hydrate:function(e,n,t){return Vt(e,n),"function"==typeof t&&t(),e?e.__c:null},unmountComponentAtNode:function(e){return!!e.__k&&(zt(null,e),!0)},createPortal:function(e,n){var t=Ct(Hr,{__v:e,i:n});return t.containerInfo=n,t},createElement:Ct,createContext:Zt,createFactory:function(e){return Ct.bind(null,e)},cloneElement:io,createRef:function(){return{current:null}},Fragment:St,isValidElement:oo,findDOMNode:function(e){return e&&(e.base||1===e.nodeType&&e)||null},Component:Et,PureComponent:kr,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:Sr(this.props,e)}function r(n){return this.shouldComponentUpdate=t,Ct(e,n)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r},forwardRef:Nr,flushSync:function(e,n){return e(n)},unstable_batchedUpdates:function(e,n){return e(n)},StrictMode:St,Suspense:Lr,SuspenseList:Fr,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 Ct(t,o)}return o.displayName="Lazy",o.__f=!0,o},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ro};const co=uo,ao=e=>{lr((()=>{const n=e();return()=>{n.Dispose()}}))},lo=(e,n)=>{lr((()=>{const n=e();return()=>{n.Dispose()}}),n)},fo=e=>{fr((()=>{const n=e();return()=>{n.Dispose()}}))};function ho(e){return{Dispose(){e()}}}function po(e){ao(e)}function mo(e,n){lo(e,n)}function go(e){yo(e,[])}function wo(e){mo(e,[])}function _o(e){ao((n=>(e(),ho((()=>{})))))}function yo(e,n){lo((n=>(e(),ho((()=>{})))),n)}function vo(e){return co.useRef(e)}function bo(e,n){const t=re(n,[]);return co.useMemo(e,t)}function Co(e){const n=vo(e),t=function(e,t){const r=re([],[]);return co.useCallback((e=>n.current(e)),r)}();var r;return r=()=>{n.current=e},fo((e=>(r(),ho((()=>{}))))),t}function xo(e){return co.useState(e)}class So{constructor(e=!1){this._id=0,this._cancelled=e,this._listeners=new Map}get isCancelled(){return this._cancelled}cancel(){if(!this._cancelled){this._cancelled=!0;for(const[,e]of this._listeners)e()}}addListener(e){const n=this._id;return this._listeners.set(this._id++,e),n}removeListener(e){return this._listeners.delete(e)}register(e,n){const t=this,r=this.addListener(null==n?e:()=>e(n));return{Dispose(){t.removeListener(r)}}}Dispose(){}}class Eo extends Error{constructor(){super("The operation was canceled"),Object.setPrototypeOf(this,Eo.prototype)}}class ko{constructor(){this.callCount=0}static get maxTrampolineCallCount(){return 2e3}incrementAndCheck(){return this.callCount++>ko.maxTrampolineCallCount}hijack(e){this.callCount=0,setTimeout(e,0)}}function Io(e){return n=>{if(n.cancelToken.isCancelled)n.onCancel(new Eo);else if(n.trampoline.incrementAndCheck())n.trampoline.hijack((()=>{try{e(n)}catch(e){n.onError(U(e))}}));else try{e(n)}catch(e){n.onError(U(e))}}}const Ao=new class{Bind(e,n){return function(e,n){return Io((t=>{e({onSuccess:e=>{try{n(e)(t)}catch(e){t.onError(U(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 Io((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 Io((n=>n.onSuccess(e)))}(e)}ReturnFrom(e){return e}TryFinally(e,n){return Io((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 Io((t=>{e({onSuccess:t.onSuccess,onCancel:t.onCancel,cancelToken:t.cancelToken,trampoline:t.trampoline,onError:e=>{try{n(e)(t)}catch(e){t.onError(U(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 Io((e=>e.onSuccess(void 0)))}};function No(e){}function To(e){const n=new So("boolean"==typeof e&&e);return"number"==typeof e&&setTimeout((()=>{n.cancel()}),e),n}function Do(e){e.cancel()}function Po(e){return null!=e&&e.isCancelled}const Oo=new So;function Mo(e,n){return function(e,n){return function(e,n,t,r,o){"function"!=typeof n&&(o=n,n=void 0);const i=new ko;e({onSuccess:n||No,onError:t||No,onCancel:r||No,cancelToken:o||Oo,trampoline:i})}(e,n)}(e,n)}class Uo extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["HasNotStartedYet","InProgress","Resolved","Failed"]}}function Lo(e,n){const t=vo(To());return wo((()=>ho((()=>{Do(t.current)})))),Co((r=>{Po(t.current)||Mo(Ao.Delay((()=>Ao.TryWith(Ao.Delay((()=>(n(new Uo(1)),Ao.Bind(e(r),(e=>(n(new Uo(2,e)),Ao.Zero())))))),(e=>(n(new Uo(3,e)),Ao.Zero()))))),t.current)}))}class Bo extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["StreamId"]}}function Fo(e){return e.fields[0]}class Go{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 Jo(this)}GetHashCode(){return Ho(this)}Equals(e){return jo(this,e)}}function Ro(e){return null!=e.generics?e.generics:[]}function Ho(e){return p([d(e.fullname),...Ro(e).map(Ho)])}function jo(e,n){return""===e.fullname?""===n.fullname&&w(ei(e),ei(n),(([e,n],[t,r])=>e===t&&jo(n,r))):e.fullname===n.fullname&&w(Ro(e),Ro(n),jo)}function $o(e,n,t,r){return new Go(e,n,t,void 0,r)}function Wo(e){return new Go("Microsoft.FSharp.Core.FSharpOption`1",[e])}function zo(e){return new Go("Microsoft.FSharp.Collections.FSharpList`1",[e])}const Vo=new Go("System.Object"),qo=(new Go("Microsoft.FSharp.Core.Unit"),new Go("System.Char"),new Go("System.String"));function Zo(e){if(Array.isArray(e))return e[0];if(e instanceof Go){const n=Ko(e);if(null!=n)return Zo(n)+"[]";{const n=e.fullname.lastIndexOf(".");return-1===n?e.fullname:e.fullname.substr(n+1)}}return e.name}function Jo(e){const n=Ko(e);return null!=n?Jo(n)+"[]":null==e.generics||0===e.generics.length?e.fullname:e.fullname+"["+e.generics.map((e=>Jo(e))).join(",")+"]"}function Ko(e){var n;return"[]"===e.fullname&&1===(null===(n=e.generics)||void 0===n?void 0:n.length)?e.generics[0]:void 0}function Yo(e){return null!=e.enumCases&&e.enumCases.length>0}function Xo(e){if(Yo(e)&&null!=e.enumCases)return e.enumCases.map((e=>e[1]));throw new Error(`${e.fullname} is not an enum type`)}function Qo(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 ei(e){if(null!=e.fields)return e.fields();throw new Error(`${e.fullname} is not an F# record type`)}function ni(e){return e.fullname.startsWith("System.Tuple")}function ti(e,n){return Ge(n)?new st(1,Ue(Pe("%s cannot be null or empty"))(e)):new st(0,n)}function ri(e){return F(e)}function oi(e){return e.fields[0]}function ii(e){return e.fields[0]}function si(e){return e.fields[0]}function ui(e){let n;const t=ti("Email",e);return n=1===t.tag?new st(1,t.fields[0]):function(e){const n=function(e){let n;const t=function(e,n){const t=function(e,n,t=0){return e.lastIndex=t,e.exec(n)}(Ee(".*?@(.*)"),n);return null!=t?cn(Mn(Nn((()=>Hn((e=>e||""),t))))):void 0}(0,e);switch(n=null!=t?on(t)?1:on(cn(t))?0:1:1,n){case 0:return e;case 1:return}}(e);return null!=n?new st(0,n):new st(1,"Email is not in the correct format")}(t.fields[0]),1===n.tag?new st(1,n.fields[0]):new st(0,new j(0,n.fields[0]))}function ci(e){return e.fields[0]}new Go("System.Boolean"),new Go("System.SByte"),new Go("System.Byte"),new Go("System.Int16"),new Go("System.UInt16"),new Go("System.Int32"),new Go("System.UInt32"),new Go("System.Single"),new Go("System.Double"),new Go("System.Decimal");class ai extends P{constructor(e,n,t,r){super(),this.FirstName=e,this.LastName=n,this.Email=t,this.MobilePhone=r}}function li(){return $o("Dto.Primitives.ContactDetails",[],ai,(()=>[["FirstName",qo],["LastName",qo],["Email",qo],["MobilePhone",qo]]))}function fi(e){return q(e)}function di(e){return Y(e)}class hi extends P{constructor(e,n,t,r,o,i,s,u,c){super(),this.BusinessName=e,this.BusinessNumber=n,this.Address1=t,this.Address2=r,this.City=o,this.Postcode=i,this.State=s,this.Phone=u,this.CountryCode=c}}const pi=(()=>{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 mi(e){return oe((e=>e.passive&&!pi?{capture:e.capture,once:e.once,passive:!1}:e),e)}function gi(e){return null!=(n=e)?(e=>e.capture?{capture:!0}:void 0)(ne(n)):void 0;var n}function wi(e,n){return 0===n.indexOf(e)?n:void 0}function _i(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 yi(e,n){return function(e){return 1===e?e=>{let n,t,r,o,i,s;return n=wi("/",e),null!=n?(t=n,"#"+t):(r=wi("#/",e),null!=r?(o=r,o):(i=wi("#",e),null!=i?(s=i,"#/"+ze(s,1,s.length-1)):"#/"+e))}:e=>{let n,t;return n=wi("/",e),null!=n?(t=n,t):"/"+e}}(n)(He("/",wn((e=>e.indexOf("?")>=0||0===e.indexOf("#")||0===e.indexOf("/")?e:encodeURIComponent(e)),e)))}function vi(e,n,t){1===n?history.pushState(void 0,"",yi(e,t)):history.replaceState(void 0,"",yi(e,t));const r=document.createEvent("CustomEvent");r.initEvent("CUSTOM_NAVIGATION_EVENT",!0,!0),window.dispatchEvent(r)}function bi(e,n){return function(e,n){let t,r;const o=Je();let i=o,s=n;for(;!Ye(s);){let n=e(Qe(s));for(;!Ye(n);)t=i,r=new qe(Qe(n),void 0),t.tail=r,i=r,n=en(n);s=en(s)}const u=i,c=Je();return u.tail=c,en(o)}((e=>{if(Re(e))return nn();{const n=function(e,...n){return 0===n.length?e.trimEnd():e.replace(new RegExp("["+ke(n.join(""))+"]+$"),"")}(e,"#");if("?"===n)return nn();if(null!=wi("?",n))return rn(n);{const e=n.split("?");if(le(((e,n)=>e===n),e,null)||1!==e.length){if(le(((e,n)=>e===n),e,null)||2!==e.length)return nn();if(""===e[1]){const n=e[0];return rn(decodeURIComponent(n))}{const n=e[0],t=e[1];return pn([decodeURIComponent(n),"?"+t])}}{const n=e[0];return rn(decodeURIComponent(n))}}}}),pn(We(null!=wi("#",e)?ze(e,1,e.length-1):1!==n||null==_i("#",e)&&null==_i("#/",e)?e:"",["/"],null,0)))}const Ci=function(e,n,t,r){const o=co.memo(e,I(2,re(N(2,t),null)));return Rn((n=>{e.displayName=n}),te(n)),e=>{const n=function(e,n){if(null==e)return n;{const t=e;return n.key=t(n),n}}(r,e);return co.createElement(o,n)}}((e=>{const n=Co((n=>{const t=re(e.onUrlChanged,(e=>{}));!function(e,n,t){n(bi(2===e?window.location.pathname+window.location.search:window.location.hash,e))}(re(e.hashMode,1),t)}));if(window.navigator.userAgent.indexOf("Trident")>=0||window.navigator.userAgent.indexOf("MSIE")>=0){const e="hashchange",t=e=>{n(e)},r=void 0,o=bo((()=>mi(r)),[r]),i=bo((()=>gi(r)),[r]),s=bo((()=>e=>{t(e)}),[t]);po(Co((()=>{if(null==o)window.addEventListener(e,s);else{const n=o;window.addEventListener(e,s,n)}return ho((()=>{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=bo((()=>mi(r)),[r]),i=bo((()=>gi(r)),[r]),s=bo((()=>e=>{t(e)}),[t]);po(Co((()=>{if(null==o)window.addEventListener(e,s);else{const n=o;window.addEventListener(e,s,n)}return ho((()=>{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=bo((()=>mi(o)),[o]),s=bo((()=>gi(o)),[o]),u=bo((()=>e=>{r(e)}),[r]);po(Co((()=>{if(null==i)window.addEventListener(t,u);else{const e=i;window.addEventListener(t,u,e)}return ho((()=>{if(null==s)window.removeEventListener(t,u);else{const e=s;window.removeEventListener(t,u,e)}}))})));const c=e.application;return null==c?null:c}),void 0,void 0,void 0);class xi extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["AccountId","Name"]}}class Si extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Asc","Desc"]}}function Ei(e){return 0===e.tag?new Si(1):new Si(0)}class ki extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Sort"]}}const Ii=new ki(0,new xi(1),new Si(0));function Ai(e){return e.fields[0]}function Ni(e){return e.fields[1]}function Ti(e,n){const t=n.fields[1],r=[e,n.fields[0]];return 1===r[0].tag?1===r[1].tag?new ki(0,new xi(1),Ei(t)):new ki(0,new xi(1),new Si(0)):0===r[1].tag?new ki(0,new xi(0),Ei(t)):new ki(0,new xi(0),new Si(0))}class Di extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["SearchText"]}}const Pi=new Di(0,"");function Oi(e){return e.fields[0]}class Mi extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["PageSize"]}}function Ui(e){return e.fields[0]}class Li extends P{constructor(e,n,t){super(),this.SearchText=e,this.Sort=n,this.PageSize=t}}class Bi extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["AccountKey"]}}class Fi extends P{constructor(e,n,t,r,o){super(),this.StreamId=e,this.Name=n,this.Website=t,this.ContactDetails=r,this.Notes=o}}function Gi(e){const n=function(e){const n=ti("Name",e);return 1===n.tag?new st(1,n.fields[0]):new st(0,B(n.fields[0]))}(e.Name);if(1===n.tag)return new st(1,n.fields[0]);{const t=function(e){const n=ti("Website",e);return 1===n.tag?new st(1,n.fields[0]):new st(0,new G(0,n.fields[0]))}(e.Website);if(1===t.tag)return new st(1,t.fields[0]);{const r=function(e){const n=function(e){const n=ti("FirstName",e);return 1===n.tag?new st(1,n.fields[0]):new st(0,new R(0,n.fields[0]))}(e.FirstName);if(1===n.tag)return new st(1,n.fields[0]);{const t=function(e){const n=ti("LastName",e);return 1===n.tag?new st(1,n.fields[0]):new st(0,new H(0,n.fields[0]))}(e.LastName);if(1===t.tag)return new st(1,t.fields[0]);{const r=ui(e.Email);if(1===r.tag)return new st(1,r.fields[0]);{const o=function(e){const n=ti("MobilePhone",e);return 1===n.tag?new st(1,n.fields[0]):new st(0,new $(0,n.fields[0]))}(e.MobilePhone);return 1===o.tag?new st(1,o.fields[0]):new st(0,new W(n.fields[0],t.fields[0],r.fields[0],o.fields[0]))}}}}(e.ContactDetails);return 1===r.tag?new st(1,r.fields[0]):new st(0,new Fi(new Bo(0,e.StreamId),n.fields[0],t.fields[0],r.fields[0],function(e){return null==e?void 0:new z(0,e)}(e.Notes)))}}}function Ri(e,n){return _n((e=>Fo(e.StreamId)===J(n)),e)}class Hi extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["PartnerList","Partner","PartnerProfilesDirectory","PartnerAccountList","PartnerSuperConfiguration","PartnerBenefitsOnboardingConfiguration","PartnerBankDetailsConfiguration","Account","AccountProfilesDirectory","AccountSuperConfiguration","AccountBenefitsOnboardingConfiguration","AccountBankDetailsConfiguration","AccountSalaryPackagingConfiguration","NotFound"]}}function ji(e){let n,t,r,o,i,s,u,c,a,l,f,d,h,p,m,g,w,_,y;switch(on(e)?n=13:"account-registry"===un(e)?on(cn(e))?n=13:"partners"===un(cn(e))?on(cn(cn(e)))?n=0:on(cn(cn(cn(e))))?(n=1,t=un(cn(cn(e)))):"accounts"===un(cn(cn(cn(e))))?on(cn(cn(cn(cn(e)))))?(n=2,r=un(cn(cn(e)))):on(cn(cn(cn(cn(cn(e))))))?(n=7,c=un(cn(cn(cn(cn(e))))),a=un(cn(cn(e)))):"directory"===un(cn(cn(cn(cn(cn(e))))))?on(cn(cn(cn(cn(cn(cn(e)))))))?(n=8,l=un(cn(cn(cn(cn(e))))),f=un(cn(cn(e)))):n=13:"super-configuration"===un(cn(cn(cn(cn(cn(e))))))?on(cn(cn(cn(cn(cn(cn(e)))))))?(n=9,d=un(cn(cn(cn(cn(e))))),h=un(cn(cn(e)))):n=13:"benefits-onboarding-configuration"===un(cn(cn(cn(cn(cn(e))))))?on(cn(cn(cn(cn(cn(cn(e)))))))?(n=10,p=un(cn(cn(cn(cn(e))))),m=un(cn(cn(e)))):n=13:"bank-details-configuration"===un(cn(cn(cn(cn(cn(e))))))?on(cn(cn(cn(cn(cn(cn(e)))))))?(n=11,g=un(cn(cn(cn(cn(e))))),w=un(cn(cn(e)))):n=13:"salary-packaging-configuration"===un(cn(cn(cn(cn(cn(e))))))&&on(cn(cn(cn(cn(cn(cn(e)))))))?(n=12,_=un(cn(cn(cn(cn(e))))),y=un(cn(cn(e)))):n=13:"super-configuration"===un(cn(cn(cn(e))))?on(cn(cn(cn(cn(e)))))?(n=3,o=un(cn(cn(e)))):n=13:"benefits-onboarding-configuration"===un(cn(cn(cn(e))))?on(cn(cn(cn(cn(e)))))?(n=4,i=un(cn(cn(e)))):n=13:"directory"===un(cn(cn(cn(e))))?on(cn(cn(cn(cn(e)))))?(n=5,s=un(cn(cn(e)))):n=13:"bank-details-configuration"===un(cn(cn(cn(e))))&&on(cn(cn(cn(cn(e)))))?(n=6,u=un(cn(cn(e)))):n=13:n=13:n=13,n){case 0:return new Hi(0);case 1:return new Hi(1,Z(t));case 2:return new Hi(3,Z(r));case 3:return new Hi(4,Z(o));case 4:return new Hi(5,Z(i));case 5:return new Hi(2,Z(s));case 6:return new Hi(6,Z(u));case 7:return new Hi(7,Z(a),X(c));case 8:return new Hi(8,Z(f),X(l));case 9:return new Hi(9,Z(h),X(d));case 10:return new Hi(10,Z(m),X(p));case 11:return new Hi(11,Z(w),X(g));case 12:return new Hi(12,Z(y),X(_));case 13:return new Hi(13)}}function $i(e){switch(e.tag){case 1:return pn(["account-registry","partners",fi(e.fields[0])]);case 3:return pn(["account-registry","partners",fi(e.fields[0]),"accounts"]);case 4:return pn(["account-registry","partners",fi(e.fields[0]),"super-configuration"]);case 5:return pn(["account-registry","partners",fi(e.fields[0]),"benefits-onboarding-configuration"]);case 6:return pn(["account-registry","partners",fi(e.fields[0]),"bank-details-configuration"]);case 2:return pn(["account-registry","partners",fi(e.fields[0]),"directory"]);case 7:return pn(["account-registry","partners",fi(e.fields[0]),"accounts",di(e.fields[1])]);case 8:return pn(["account-registry","partners",fi(e.fields[0]),"accounts",di(e.fields[1]),"directory"]);case 9:return pn(["account-registry","partners",fi(e.fields[0]),"accounts",di(e.fields[1]),"super-configuration"]);case 10:return pn(["account-registry","partners",fi(e.fields[0]),"accounts",di(e.fields[1]),"benefits-onboarding-configuration"]);case 11:return pn(["account-registry","partners",fi(e.fields[0]),"accounts",di(e.fields[1]),"bank-details-configuration"]);case 12:return pn(["account-registry","partners",fi(e.fields[0]),"accounts",di(e.fields[1]),"salary-packaging-configuration"]);default:return pn(["account-registry","partners"])}}function Wi(e){switch(e.tag){case 1:{const n=["account-registry","partners",fi(e.fields[0])];return rn((e=>{vi(pn(n),1,1)}))}case 3:{const n=["account-registry","partners",fi(e.fields[0]),"accounts"];return rn((e=>{vi(pn(n),1,1)}))}case 4:{const n=["account-registry","partners",fi(e.fields[0]),"super-configuration"];return rn((e=>{vi(pn(n),1,1)}))}case 5:{const n=["account-registry","partners",fi(e.fields[0]),"benefits-onboarding-configuration"];return rn((e=>{vi(pn(n),1,1)}))}case 6:{const n=["account-registry","partners",fi(e.fields[0]),"bank-details-configuration"];return rn((e=>{vi(pn(n),1,1)}))}case 2:{const n=["account-registry","partners",fi(e.fields[0]),"directory"];return rn((e=>{vi(pn(n),1,1)}))}case 7:{const n=["account-registry","partners",fi(e.fields[0]),"accounts",di(e.fields[1])];return rn((e=>{vi(pn(n),1,1)}))}case 8:{const n=["account-registry","partners",fi(e.fields[0]),"accounts",di(e.fields[1]),"directory"];return rn((e=>{vi(pn(n),1,1)}))}case 9:{const n=["account-registry","partners",fi(e.fields[0]),"accounts",di(e.fields[1]),"super-configuration"];return rn((e=>{vi(pn(n),1,1)}))}case 10:{const n=["account-registry","partners",fi(e.fields[0]),"accounts",di(e.fields[1]),"benefits-onboarding-configuration"];return rn((e=>{vi(pn(n),1,1)}))}case 11:{const n=["account-registry","partners",fi(e.fields[0]),"accounts",di(e.fields[1]),"bank-details-configuration"];return rn((e=>{vi(pn(n),1,1)}))}case 12:{const n=["account-registry","partners",fi(e.fields[0]),"accounts",di(e.fields[1]),"salary-packaging-configuration"];return rn((e=>{vi(pn(n),1,1)}))}default:{const e=["account-registry","partners"];return rn((n=>{vi(pn(e),1,1)}))}}}function zi(e,n){return 1===n.tag?new Uo(1):2===n.tag?1===n.fields[0].tag?new Uo(2,new st(1,n.fields[0].fields[0])):new Uo(2,new st(0,e(n.fields[0].fields[0]))):3===n.tag?new Uo(3,n.fields[0]):new Uo(0)}const Vi=class{constructor(){this.delegates=[]}Add(e){this._addHandler(e)}get Publish(){return this}Trigger(e,n){let t,r;void 0===n?(t=null,r=e):(t=e,r=n),this.delegates.forEach((e=>1===e.length?e(r):e(t,r)))}AddHandler(e){this._addHandler(e)}RemoveHandler(e){this._removeHandler(e)}Subscribe(e){const n="function"==typeof e?e:e.OnNext;return this._addHandler(n),{Dispose:()=>{this._removeHandler(n)}}}_addHandler(e){this.delegates.push(e)}_removeHandler(e){const n=this.delegates.indexOf(e);n>-1&&this.delegates.splice(n,1)}},qi=class{constructor(e){this._enabled=!1,this._isDisposed=!1,this._intervalId=0,this._timeoutId=0,this.Interval=e&&e>0?e:100,this.AutoReset=!0,this._elapsed=new Vi}Elapsed(){return this._elapsed}get Enabled(){return this._enabled}set Enabled(e){this._isDisposed||this._enabled===e||(this._enabled=e,this._enabled?this.AutoReset?this._intervalId=setInterval((()=>{this.AutoReset||(this.Enabled=!1),this._elapsed.Trigger(new Date)}),this.Interval):this._timeoutId=setTimeout((()=>{this.Enabled=!1,this._timeoutId=0,this.AutoReset&&(this.Enabled=!0),this._elapsed.Trigger(new Date)}),this.Interval):(this._timeoutId&&(clearTimeout(this._timeoutId),this._timeoutId=0),this._intervalId&&(clearInterval(this._intervalId),this._intervalId=0)))}Dispose(){this.Enabled=!1,this._isDisposed=!0}Close(){this.Dispose()}Start(){this.Enabled=!0}Stop(){this.Enabled=!1}};class Zi{constructor(e,n,t){this.OnNext=e,this.OnError=n||(e=>{}),this.OnCompleted=t||(()=>{})}}function Ji(){return nn()}function Ki(e){return rn(e)}function Yi(e,n,t,r){return function(e,n,t,r){return rn((e=>{(e=>{!function(e){!function(e,n){let t,r=new qi(e);r.AutoReset=!1,t=r,function(e,n){n.Subscribe(new Zi(e))}(n,t.Elapsed()),t.Enabled=!0,t.Start()}(0,(n=>{Mo(e)}))}(e)})(Ao.Delay((()=>{return Ao.Bind((o=n(t),Io((e=>{o({onSuccess:n=>e.onSuccess(function(e){return new ct(0,e)}(n)),onError:n=>e.onSuccess(function(e){return new ct(1,e)}(n)),onCancel:e.onCancel,cancelToken:e.cancelToken,trampoline:e.trampoline})}))),(n=>{const t=n;return 0===t.tag?(e(r(t.fields[0])),Ao.Zero()):Ao.Zero()}));var o})))}))}(0,e,n,(e=>1===e.tag?r(e.fields[0]):t(e.fields[0])))}function Xi(e,n,t){return n()?t.then((()=>Xi(e,n,t))):Promise.resolve(void 0)}function Qi(e,n){return{then:(e,t)=>{try{return n().then(e,t)}catch(e){if(y(t,null))return Promise.reject(e);try{return Promise.resolve(t(e))}catch(e){return Promise.reject(e)}}},catch:e=>{try{return n().catch(e)}catch(n){try{return Promise.resolve(e(n))}catch(e){return Promise.reject(e)}}}}}const es=new class{constructor(){}};class ns extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Writable","ReadWritable"]}}class ts{constructor(e){this.state=new ns(0,ue(new Array(S(b,e,10)),0,S(b,e,10),null),0)}}function rs(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 ns(0,o,t):new ns(1,o,t,i),ee(o[r])}}function os(e,n,o){const i=vo(e[0]),s=vo(new ts(10)),u=xo(e[0]);let c;const a=vo(To()),l=vo(a.current);wo((()=>ho((()=>{Do(a.current)})))),c=l;const f=()=>{setTimeout((()=>{let e;e=c.current,Po(e)||u[1](i.current)}),0)},d=e=>{const t=function(e,n){return new Promise(((e,t)=>{try{Promise.resolve(n).then(e,t)}catch(e){t(e)}}))}(0,Qi(0,(()=>{let t=ee(e);return Xi(es,(()=>{let e;return null!=t&&(e=c.current,!Po(e))}),Qi(0,(()=>{const e=n(ne(t),i.current);return dn((e=>{e(d)}),e[1]),t=rs(s.current),i.current=e[0],f(),Promise.resolve()})))})));t.then()},h=Co(d);return mo((()=>ho((()=>{let e;Rn((e=>{r(e)}),te((e=i.current,t(e)?e:void 0)))}))),o),yo((()=>{i.current=e[0],f(),dn((e=>{e(h)}),e[1])}),o),_o((()=>{Rn(h,te(rs(s.current)))})),[u[0],h]}function is(e,n,t){return os(bo(e,t),n,t)}class ss extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"]}}class us extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Header"]}}class cs extends P{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 as extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Text","Blob","ArrayBuffer","Unknown"]}}class ls extends P{constructor(e,n,t,r,o,i){super(),this.statusCode=0|e,this.responseText=n,this.responseType=t,this.responseUrl=r,this.responseHeaders=o,this.content=i}}class fs{constructor(e,n){this.k=e,this.v=n}}function ds(e,n){return new fs(e,n)}function hs(e){return e.k}function ps(e){return e.v}class ms extends fs{constructor(e,n,t,r,o){super(e,n),this.left=t,this.right=r,this.h=0|o}}function gs(e,n,t,r,o){return new ms(e,n,t,r,o)}function ws(e){return e.left}function _s(e){return e.right}function ys(e){return e.h}function vs(e,n){e:for(;;){const t=e;if(null!=n){const r=n;if(r instanceof ms){e=vs(t+1,ws(r)),n=_s(r);continue e}return t+1|0}return 0|t}}function bs(e){return vs(0,e)}function Cs(e,n,t,r){let o,i;o=null!=e?e instanceof ms?ys(e):1:0,i=null!=r?r instanceof ms?ys(r):1:0;const s=0|(o<i?i:o);return 0===s?ds(n,t):gs(n,t,e,r,s+1)}function xs(e,n,t,r){let o,i,s,u,c,a;if(c=null!=e?e instanceof ms?ys(e):1:0,a=null!=r?r instanceof ms?ys(r):1:0,a>c+2){const s=ne(r);if(s instanceof ms){if(o=ws(s),(null!=o?(i=o,i instanceof ms?ys(i):1):0)>c+1){const r=ne(ws(s));if(r instanceof ms)return Cs(Cs(e,n,t,ws(r)),hs(r),ps(r),Cs(_s(r),hs(s),ps(s),_s(s)));throw new Error("internal error: Map.rebalance")}return Cs(Cs(e,n,t,ws(s)),hs(s),ps(s),_s(s))}throw new Error("internal error: Map.rebalance")}if(c>a+2){const o=ne(e);if(o instanceof ms){if(s=_s(o),(null!=s?(u=s,u instanceof ms?ys(u):1):0)>a+1){const e=ne(_s(o));if(e instanceof ms)return Cs(Cs(ws(o),hs(o),ps(o),ws(e)),hs(e),ps(e),Cs(_s(e),n,t,r));throw new Error("internal error: Map.rebalance")}return Cs(ws(o),hs(o),ps(o),Cs(_s(o),n,t,r))}throw new Error("internal error: Map.rebalance")}return Cs(e,n,t,r)}function Ss(e,n,t,r){if(null!=r){const o=r,i=0|e.Compare(n,hs(o));return o instanceof ms?i<0?xs(Ss(e,n,t,ws(o)),hs(o),ps(o),_s(o)):0===i?gs(n,t,ws(o),_s(o),ys(o)):xs(ws(o),hs(o),ps(o),Ss(e,n,t,_s(o))):i<0?gs(n,t,void 0,r,2):0===i?ds(n,t):gs(n,t,r,void 0,2)}return ds(n,t)}function Es(e,n,t){e:for(;;){const r=e,o=n;if(null!=t){const i=t,s=0|r.Compare(o,hs(i));if(0===s)return ee(ps(i));if(i instanceof ms){e=r,n=o,t=s<0?ws(i):_s(i);continue e}return}return}}function ks(e,n){e:for(;;){const t=e;if(null!=n){const r=n;if(r instanceof ms){ks(t,ws(r)),t(hs(r),ps(r)),e=t,n=_s(r);continue e}t(hs(r),ps(r))}break}}function Is(e,n){ks(e,n)}function As(e,n){if(null!=n){const t=n;if(t instanceof ms){const n=As(e,ws(t)),r=e(hs(t),ps(t)),o=As(e,_s(t));return gs(hs(t),r,n,o,ys(t))}return ds(hs(t),e(hs(t),ps(t)))}}function Ns(e,n){return As(e,n)}function Ts(e,n){let t;for(let r=0;r<=n.length-1;r++){const o=n[r];t=Ss(e,o[0],o[1],t)}return t}class Ds extends P{constructor(e,n){super(),this.stack=e,this.started=n}}function Ps(e){e:for(;;){const n=e;if(on(n))return nn();{const t=cn(n),r=un(n);if(null!=r){const o=r;if(o instanceof ms){e=hn([ws(o),ds(hs(o),ps(o)),_s(o)],t);continue e}return n}e=t;continue e}}}function Os(e){return new Ds(Ps(rn(e)),!1)}function Ms(e){if(e.started){const n=e.stack;if(on(n))return function(){throw new Error("enumeration already finished")}();if(null!=un(n)){const e=un(n);if(e instanceof ms)throw new Error("Please report error: Map iterator, unexpected stack for current");return[hs(e),ps(e)]}throw new Error("Please report error: Map iterator, unexpected stack for current")}return function(){throw new Error("enumeration not started")}()}function Us(e){let n=Os(e);return{"System.Collections.Generic.IEnumerator`1.get_Current":()=>Ms(n),"System.Collections.IEnumerator.get_Current":()=>Ms(n),"System.Collections.IEnumerator.MoveNext":()=>function(e){if(e.started){const n=e.stack;if(on(n))return!1;if(null!=un(n)){if(un(n)instanceof ms)throw new Error("Please report error: Map iterator, unexpected stack for moveNext");return e.stack=Ps(cn(n)),!on(e.stack)}throw new Error("Please report error: Map iterator, unexpected stack for moveNext")}return e.started=!0,!on(e.stack)}(n),"System.Collections.IEnumerator.Reset"(){n=Os(e)},Dispose(){}}}class Ls{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 o=s(e);try{for(;o["System.Collections.IEnumerator.MoveNext"]();){const e=o["System.Collections.Generic.IEnumerator`1.get_Current"]();t=0|n(t,m(e[0])),t=0|n(t,m(e[1]))}}finally{r(o)}return 0|t}(this)}Equals(e){if(!(e instanceof Ls))return!1;{const n=s(this);try{const t=s(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!(!y(r[0],o[0])||!y(r[1],o[1]))&&e()}return!0}return!1};return e()}finally{r(t)}}finally{r(n)}}}toString(){return"map ["+He("; ",Hn((e=>Fe("({0}, {1})",e[0],e[1])),this))+"]"}get[Symbol.toStringTag](){return"FSharpMap"}toJSON(e){return Array.from(this)}GetEnumerator(){return Us(this.tree)}[Symbol.iterator](){return u(this.GetEnumerator())}"System.Collections.IEnumerable.GetEnumerator"(){return Us(this.tree)}CompareTo(e){const n=this;if(e instanceof Ls)return 0|function(e,n,t){const o=An(n);try{const n=An(t);try{let t=0,r=o["System.Collections.IEnumerator.MoveNext"](),i=n["System.Collections.IEnumerator.MoveNext"]();for(;0===t&&r&&i;)t=0|e(o["System.Collections.Generic.IEnumerator`1.get_Current"](),n["System.Collections.Generic.IEnumerator`1.get_Current"]()),0===t&&(r=o["System.Collections.IEnumerator.MoveNext"](),i=n["System.Collections.IEnumerator.MoveNext"]());return 0|(0!==t?t:r?1:i?-1:0)}finally{r(n)}}finally{r(o)}}(((e,t)=>{const r=0|n.comparer.Compare(e[0],t[0]);return 0|(0!==r?r:x(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 Hs(this,e[0])&&y(Gs(this,e[0]),e[1])}"System.Collections.Generic.ICollection`1.CopyToZ2E171D71"(e,n){!function(e,n,t){let r=t;Is(((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|Rs(this)}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return 0|Rs(this)}get size(){return 0|Rs(this)}clear(){throw new Error("Map cannot be mutated")}delete(e){throw new Error("Map cannot be mutated")}entries(){return Hn((e=>[e[0],e[1]]),this)}get(e){return Gs(this,e)}has(e){return Hs(this,e)}keys(){return Hn((e=>e[0]),this)}set(e,n){throw new Error("Map cannot be mutated")}values(){return Hn((e=>e[1]),this)}forEach(e,n){const t=this;Rn((n=>{e(n[1],n[0],t)}),t)}}function Bs(e,n){return new Ls(e,n)}function Fs(n){const t=ie();return Bs(t,function(n,t){if(e(t))return Ts(n,t);if(t instanceof qe)return function(e,n){return ln(((n,t)=>Ss(e,t[0],t[1],n)),void 0,n)}(n,t);{const e=s(t);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=Ss(r,s[0],s[1],o),t=i}}}(n,void 0,e)}finally{r(e)}}}(t,n))}function Gs(e,n){return function(e,n,t){const r=Es(e,n,t);if(null==r)throw new Error;return ne(r)}(e.comparer,n,e.tree)}function Rs(e){return bs(e.tree)}function Hs(e,n){return function(e,n,t){e:for(;;){const r=e,o=n;if(null!=t){const i=t,s=0|r.Compare(o,hs(i));if(i instanceof ms){if(s<0){e=r,n=o,t=ws(i);continue e}if(0===s)return!0;e=r,n=o,t=_s(i);continue e}return 0===s}return!1}}(e.comparer,n,e.tree)}function js(){return Ls.empty}Ls.empty=Bs(ie(),void 0);const $s=new cs("",new ss(0),nn(),!1,void 0,void 0,void 0,new class extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Empty","Text","Binary","Form"]}}(0));function Ws(e,n){return Ge(n)?[n]:We(n,[e],null,0)}function zs(e){return new cs(e,$s.method,$s.headers,$s.withCredentials,$s.overridenMimeType,$s.overridenResponseType,$s.timeout,$s.content)}function Vs(e,n){return new cs(n.url,e,n.headers,n.withCredentials,n.overridenMimeType,n.overridenResponseType,n.timeout,n.content)}function qs(e,n){return new cs(n.url,n.method,mn(n.headers,rn(e)),n.withCredentials,n.overridenMimeType,n.overridenResponseType,n.timeout,n.content)}function Zs(e){return function(e){return Io((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,c;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 as(0,t.responseText):new as("arraybuffer"===u?2:"blob"===u?1:3,t.response),c=function(e){const n=ie();return Bs(n,Ts(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=ne(o);r.push(e)}}return r}((e=>{const n=pn(Ws(":",e));return on(n)?void 0:[un(n).toLocaleLowerCase(),He(":",cn(n)).trim()]}),Ws("\r\n",t.getAllResponseHeaders()))),new ls(o,e,i,t.responseURL,c,s)))};const o=s(e.headers);try{for(;o["System.Collections.IEnumerator.MoveNext"]();){const e=o["System.Collections.Generic.IEnumerator`1.get_Current"]();t.setRequestHeader(e.fields[0],e.fields[1])}}finally{r(o)}t.withCredentials=e.withCredentials;const i=e.overridenMimeType;if(null==i);else{const e=i;t.overrideMimeType(e)}const u=e.overridenResponseType;null==u||(1===u.tag?t.responseType="blob":2===u.tag?t.responseType="arraybuffer":t.responseType="text");const c=e.timeout;if(null==c);else{const e=0|c;t.timeout=0|e}const a=e.content;switch(a.tag){case 1:case 3:case 2:t.send(ee(a.fields[0]));break;default:t.send()}}))}new ls(0,"","","",js(),new as(0,""));class Js extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["BadPrimitive","BadPrimitiveExtra","BadType","BadField","BadPath","TooSmallArray","FailMessage","BadOneOf"]}}class Ks extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["PascalCase","CamelCase","SnakeCase"]}}class Ys{constructor(){this.cache=new Map([])}}function Xs(){return new Ys}function Qs(e){return e.slice(void 0,1).toLowerCase()+e.slice(1,e.length)}function eu(e,n){switch(e.tag){case 2:return function(e,n,t,r,o=0){if("string"==typeof e){const t=e;e=Ee(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=Ie(e,s),c=Ie.length>r?(i=u[r-1],s.substring(0,i.index+i[0].length)):s;return n.substring(0,o)+c.replace(e,t)+n.substring(o+c.length)}return n.replace(e,t)}(Qs(n),"[A-Z]","_$0").toLowerCase();case 0:return n;default:return Qs(n)}}Xs(),Xs();const nu=/^[\(\{]{0,2}[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[\)\}]{0,2}$/,tu=/^([0-9a-f]{8})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{12})$/,ru=/^\{0x[0-9a-f]{8},(0x[0-9a-f]{4},){2}\{(0x[0-9a-f]{2},){7}0x[0-9a-f]{2}\}\}$/;function ou(e,n){try{return n.contents=function(e){function n(e){return e.replace(tu,"$1-$2-$3-$4-$5")}const t=e.trim().toLowerCase();if(nu.test(t))return function(e,...n){if(0===n.length)return e.trim();const t="["+ke(n.join(""))+"]+";return e.replace(new RegExp("^"+t),"").replace(new RegExp(t+"$"),"")}(t,"{","}","(",")");if(tu.test(t))return n(t);if(ru.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 iu;function su(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 uu(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&iu.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]=su(!0,r);!t&&10!==i.radix&&e>=n&&e<=o&&(e=e<<32-r>>32-r);const[s,u]=su(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 cu(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 au(e,n){try{return n.contents=function(e){const[n,t]=ge(e),r=null==t?-6e4*n.getTimezoneOffset():"Z"===t?0:6e4*t;return cu(n.getTime(),r)}(e),!0}catch(e){return!1}}!function(e){e[e.AllowHexSpecifier=512]="AllowHexSpecifier"}(iu||(iu={}));var lu=null;try{lu=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(gt){}function fu(e,n,t){this.low=0|e,this.high=0|n,this.unsigned=!!t}function du(e){return!0===(e&&e.__isLong__)}fu.prototype.GetHashCode=function(){let e=this.unsigned?1:0;return e=(e<<5)+e^this.high,e=(e<<5)+e^this.low,e},fu.prototype.Equals=function(e){return Gu(this,e)},fu.prototype.CompareTo=function(e){return $u(this,e)},fu.prototype.toString=function(e){return Uu(this,e)},fu.prototype.toJSON=function(){return Uu(this)},fu.prototype[_e]=function(){const e=this;return{multiply:n=>qu(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 Uu(e.unsigned?e:function(e,n,t){return t?function(e,n){return new fu(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 fu(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}}},fu.prototype.__isLong__,Object.defineProperty(fu.prototype,"__isLong__",{value:!0});var hu={},pu={};function mu(e,n){var t,r,o;return n?(o=0<=(e>>>=0)&&e<256)&&(r=pu[e])?r:(t=wu(e,(0|e)<0?-1:0,!0),o&&(pu[e]=t),t):(o=-128<=(e|=0)&&e<128)&&(r=hu[e])?r:(t=wu(e,e<0?-1:0,!1),o&&(hu[e]=t),t)}function gu(e,n){if(isNaN(e))return n?ku:Eu;if(n){if(e<0)return ku;if(e>=Cu)return Du}else{if(e<=-xu)return Pu;if(e+1>=xu)return Tu}return e<0?Wu(gu(-e,n)):wu(e%bu|0,e/bu|0,n)}function wu(e,n,t){return new fu(e,n,t)}var _u=Math.pow;function yu(e,n,t){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return Eu;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 Wu(yu(e.substring(1),n,t));for(var o=gu(_u(t,8)),i=Eu,s=0;s<e.length;s+=8){var u=Math.min(8,e.length-s),c=parseInt(e.substring(s,s+u),t);i=zu(u<8?qu(i,gu(_u(t,u))):i=qu(i,o),gu(c))}return i.unsigned=n,i}function vu(e,n){return"number"==typeof e?gu(e,n):"string"==typeof e?yu(e,n):wu(e.low,e.high,"boolean"==typeof n?n:e.unsigned)}var bu=4294967296,Cu=bu*bu,xu=Cu/2,Su=mu(1<<24),Eu=mu(0),ku=mu(0,!0),Iu=mu(1),Au=mu(1,!0),Nu=mu(-1),Tu=wu(-1,2147483647,!1),Du=wu(-1,-1,!0),Pu=wu(0,-2147483648,!1);function Ou(e){return e.unsigned?e.low>>>0:e.low}function Mu(e){return e.unsigned?(e.high>>>0)*bu+(e.low>>>0):e.high*bu+(e.low>>>0)}function Uu(e,n){if((n=n||10)<2||36<n)throw RangeError("radix");if(Lu(e))return"0";if(Bu(e)){if(Gu(e,Pu)){var t=gu(n),r=Zu(e,t),o=Vu(qu(r,t),e);return Uu(r,n)+Ou(o).toString(n)}return"-"+Uu(Wu(e),n)}for(var i=gu(_u(n,6),e.unsigned),s=e,u="";;){var c=Zu(s,i),a=(Ou(Vu(s,qu(c,i)))>>>0).toString(n);if(Lu(s=c))return a+u;for(;a.length<6;)a="0"+a;u=""+a+u}}function Lu(e){return 0===e.high&&0===e.low}function Bu(e){return!e.unsigned&&e.high<0}function Fu(e){return 1==(1&e.low)}function Gu(e,n){return du(n)||(n=vu(n)),(e.unsigned===n.unsigned||e.high>>>31!=1||n.high>>>31!=1)&&e.high===n.high&&e.low===n.low}function Ru(e,n){return $u(e,n)<0}function Hu(e,n){return $u(e,n)>0}function ju(e,n){return $u(e,n)>=0}function $u(e,n){if(du(n)||(n=vu(n)),Gu(e,n))return 0;var t=Bu(e),r=Bu(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:Bu(Vu(e,n))?-1:1}function Wu(e){return!e.unsigned&&Gu(e,Pu)?Pu:zu(function(e){return wu(~e.low,~e.high,e.unsigned)}(e),Iu)}function zu(e,n){du(n)||(n=vu(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,c=n.low>>>16,a=0,l=0,f=0,d=0;return f+=(d+=i+(65535&n.low))>>>16,l+=(f+=o+c)>>>16,a+=(l+=r+u)>>>16,a+=t+s,wu((f&=65535)<<16|(d&=65535),(a&=65535)<<16|(l&=65535),e.unsigned)}function Vu(e,n){return du(n)||(n=vu(n)),zu(e,Wu(n))}function qu(e,n){if(Lu(e))return e.unsigned?ku:Eu;if(du(n)||(n=vu(n)),lu)return wu(lu.mul(e.low,e.high,n.low,n.high),lu.get_high(),e.unsigned);if(Lu(n))return e.unsigned?ku:Eu;if(Gu(e,Pu))return Fu(n)?Pu:Eu;if(Gu(n,Pu))return Fu(e)?Pu:Eu;if(Bu(e))return Bu(n)?qu(Wu(e),Wu(n)):Wu(qu(Wu(e),n));if(Bu(n))return Wu(qu(e,Wu(n)));if(Ru(e,Su)&&Ru(n,Su))return gu(Mu(e)*Mu(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,c=n.low>>>16,a=65535&n.low,l=0,f=0,d=0,h=0;return d+=(h+=i*a)>>>16,f+=(d+=o*a)>>>16,d&=65535,f+=(d+=i*c)>>>16,l+=(f+=r*a)>>>16,f&=65535,l+=(f+=o*c)>>>16,f&=65535,l+=(f+=i*u)>>>16,l+=t*a+r*c+o*u+i*s,wu((d&=65535)<<16|(h&=65535),(l&=65535)<<16|(f&=65535),e.unsigned)}function Zu(e,n){if(du(n)||(n=vu(n)),Lu(n))throw Error("division by zero");var t,r,o;if(lu)return e.unsigned||-2147483648!==e.high||-1!==n.low||-1!==n.high?wu((e.unsigned?lu.div_u:lu.div_s)(e.low,e.high,n.low,n.high),lu.get_high(),e.unsigned):e;if(Lu(e))return e.unsigned?ku:Eu;if(e.unsigned){if(n.unsigned||(n=function(e){return e.unsigned?e:wu(e.low,e.high,!0)}(n)),Hu(n,e))return ku;if(Hu(n,function(e,n){if(du(n)&&(n=Ou(n)),0==(n&=63))return e;var t=e.high;return n<32?wu(e.low>>>n|t<<32-n,t>>>n,e.unsigned):wu(32===n?t:t>>>n-32,0,e.unsigned)}(e,1)))return Au;o=ku}else{if(Gu(e,Pu))return Gu(n,Iu)||Gu(n,Nu)?Pu:Gu(n,Pu)?Iu:Gu(t=function(e,n){return du(n)&&(n=Ou(n)),0==(n&=63)?e:n<32?wu(e.low<<n,e.high<<n|e.low>>>32-n,e.unsigned):wu(0,e.low<<n-32,e.unsigned)}(Zu(function(e,n){return du(n)&&(n=Ou(n)),0==(n&=63)?e:n<32?wu(e.low>>>n|e.high<<32-n,e.high>>n,e.unsigned):wu(e.high>>n-32,e.high>=0?0:-1,e.unsigned)}(e,1),n),1),Eu)?Bu(n)?Iu:Nu:o=zu(t,Zu(r=Vu(e,qu(n,t)),n));if(Gu(n,Pu))return e.unsigned?ku:Eu;if(Bu(e))return Bu(n)?Zu(Wu(e),Wu(n)):Wu(Zu(Wu(e),n));if(Bu(n))return Wu(Zu(e,Wu(n)));o=Eu}for(r=e;ju(r,n);){t=Math.max(1,Math.floor(Mu(r)/Mu(n)));for(var i=Math.ceil(Math.log(t)/Math.LN2),s=i<=48?1:_u(2,i-48),u=gu(t),c=qu(u,n);Bu(c)||Hu(c,r);)c=qu(u=gu(t-=s,e.unsigned),n);Lu(u)&&(u=Iu),o=zu(o,u),r=Vu(r,c)}return o}const Ju=Zu,Ku=Mu;function Yu(e=0,n=0,t=0,r=0,o=0){switch(arguments.length){case 1:return Ku(Ju(arguments[0],1e4));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 Xu(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 Yu(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*Yu(t,s,u,o,r)}}throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}(e),!0}catch(e){return!1}}class Qu{constructor(e){this.k=e}}function ec(e){return new Qu(e)}function nc(e){return e.k}class tc extends Qu{constructor(e,n,t,r){super(e),this.left=n,this.right=t,this.h=0|r}}function rc(e,n,t,r){return new tc(e,n,t,r)}function oc(e){return e.left}function ic(e){return e.right}function sc(e){return e.h}function uc(e,n){e:for(;;){const t=n;if(null!=e){const r=e;if(r instanceof tc){e=oc(r),n=uc(ic(r),t+1);continue e}return t+1|0}return 0|t}}function cc(e){return uc(e,0)}function ac(e,n,t){let r,o;r=null!=e?e instanceof tc?sc(e):1:0,o=null!=t?t instanceof tc?sc(t):1:0;const i=0|(r<o?o:r);return 0===i?ec(n):rc(n,e,t,i+1)}function lc(e,n,t){let r,o,i,s,u,c;if(u=null!=e?e instanceof tc?sc(e):1:0,c=null!=t?t instanceof tc?sc(t):1:0,c>u+2){const i=ne(t);if(i instanceof tc){if(r=oc(i),(null!=r?(o=r,o instanceof tc?sc(o):1):0)>u+1){const t=ne(oc(i));if(t instanceof tc)return ac(ac(e,n,oc(t)),nc(t),ac(ic(t),nc(i),ic(i)));throw new Error("internal error: Set.rebalance")}return ac(ac(e,n,oc(i)),nc(i),ic(i))}throw new Error("internal error: Set.rebalance")}if(u>c+2){const r=ne(e);if(r instanceof tc){if(i=ic(r),(null!=i?(s=i,s instanceof tc?sc(s):1):0)>c+1){const e=ne(ic(r));if(e instanceof tc)return ac(ac(oc(r),nc(r),oc(e)),nc(e),ac(ic(e),n,t));throw new Error("internal error: Set.rebalance")}return ac(oc(r),nc(r),ac(ic(r),n,t))}throw new Error("internal error: Set.rebalance")}return ac(e,n,t)}function fc(e,n,t){if(null!=t){const r=t,o=0|e.Compare(n,nc(r));if(r instanceof tc)return o<0?lc(fc(e,n,oc(r)),nc(r),ic(r)):0===o?t:lc(oc(r),nc(r),fc(e,n,ic(r)));{const o=0|e.Compare(n,nc(r));return o<0?rc(n,void 0,t,2):0===o?t:rc(n,t,void 0,2)}}return ec(n)}function dc(e,n,t){e:for(;;){const r=e,o=n;if(null!=t){const i=t,s=0|r.Compare(o,nc(i));if(i instanceof tc){if(s<0){e=r,n=o,t=oc(i);continue e}if(0===s)return!0;e=r,n=o,t=ic(i);continue e}return 0===s}return!1}}function hc(e,n){e:for(;;){const t=e;if(null!=n){const r=n;if(r instanceof tc){hc(t,oc(r)),t(nc(r)),e=t,n=ic(r);continue e}t(nc(r))}break}}class pc extends P{constructor(e,n){super(),this.stack=e,this.started=n}}function mc(e){e:for(;;){const n=e;if(on(n))return nn();{const t=un(n),r=cn(n);if(null!=t){const o=t;if(o instanceof tc){e=hn([oc(o),ec(nc(o)),ic(o)],r);continue e}return n}e=r;continue e}}}function gc(e){return new pc(mc(rn(e)),!1)}function wc(e){if(e.started){const n=e.stack;if(on(n))return function(){throw new Error("Enumeration already started")}();if(null!=un(n))return nc(un(n));throw new Error("Please report error: Set iterator, unexpected stack for current")}return function(){throw new Error("Enumeration not started")}()}function _c(e){let n=gc(e);return{"System.Collections.Generic.IEnumerator`1.get_Current":()=>wc(n),"System.Collections.IEnumerator.get_Current":()=>wc(n),"System.Collections.IEnumerator.MoveNext":()=>function(e){if(e.started){const n=e.stack;if(on(n))return!1;if(null!=un(n)){if(un(n)instanceof tc)throw new Error("Please report error: Set iterator, unexpected stack for moveNext");return e.stack=mc(cn(n)),!on(e.stack)}throw new Error("Please report error: Set iterator, unexpected stack for moveNext")}return e.started=!0,!on(e.stack)}(n),"System.Collections.IEnumerator.Reset"(){n=gc(e)},Dispose(){}}}function yc(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(on(s[0]))return on(s[1])?0:-1;if(on(s[1]))return 1;if(null!=un(s[1]))if(null!=un(s[0])){const u=un(s[0]),c=un(s[1]);if(u instanceof tc)if(null==oc(u)){if(!(c instanceof tc)){const o=0|r.Compare(nc(u),nc(c));if(0!==o)return 0|o;e=r,n=tn(ic(u),cn(s[0])),t=tn(void 0,cn(s[1]));continue e}if(null==oc(c)){const o=0|r.Compare(nc(u),nc(c));if(0!==o)return 0|o;e=r,n=tn(ic(u),cn(s[0])),t=tn(ic(c),cn(s[1]));continue e}{const s=[o,i];let u,c,a,l,f;switch(on(s[0])?on(s[1])?u=2:null!=un(s[1])?(u=1,l=cn(s[1]),f=un(s[1])):u=2:null!=un(s[0])?(u=0,c=cn(s[0]),a=un(s[0])):on(s[1])?u=2:null!=un(s[1])?(u=1,l=cn(s[1]),f=un(s[1])):u=2,u){case 0:if(a instanceof tc){e=r,n=hn([oc(a),rc(nc(a),void 0,ic(a),0)],c),t=i;continue e}e=r,n=hn([void 0,ec(nc(a))],c),t=i;continue e;case 1:if(f instanceof tc){e=r,n=o,t=hn([oc(f),rc(nc(f),void 0,ic(f),0)],l);continue e}e=r,n=o,t=hn([void 0,ec(nc(f))],l);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}}else{const s=[o,i];let u,c,a,l,f;switch(on(s[0])?on(s[1])?u=2:null!=un(s[1])?(u=1,l=cn(s[1]),f=un(s[1])):u=2:null!=un(s[0])?(u=0,c=cn(s[0]),a=un(s[0])):on(s[1])?u=2:null!=un(s[1])?(u=1,l=cn(s[1]),f=un(s[1])):u=2,u){case 0:if(a instanceof tc){e=r,n=hn([oc(a),rc(nc(a),void 0,ic(a),0)],c),t=i;continue e}e=r,n=hn([void 0,ec(nc(a))],c),t=i;continue e;case 1:if(f instanceof tc){e=r,n=o,t=hn([oc(f),rc(nc(f),void 0,ic(f),0)],l);continue e}e=r,n=o,t=hn([void 0,ec(nc(f))],l);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}else{if(!(c instanceof tc)){const o=0|r.Compare(nc(u),nc(c));if(0!==o)return 0|o;e=r,n=cn(s[0]),t=cn(s[1]);continue e}if(null==oc(c)){const o=0|r.Compare(nc(u),nc(c));if(0!==o)return 0|o;e=r,n=tn(void 0,cn(s[0])),t=tn(ic(c),cn(s[1]));continue e}{const s=[o,i];let u,c,a,l,f;switch(on(s[0])?on(s[1])?u=2:null!=un(s[1])?(u=1,l=cn(s[1]),f=un(s[1])):u=2:null!=un(s[0])?(u=0,c=cn(s[0]),a=un(s[0])):on(s[1])?u=2:null!=un(s[1])?(u=1,l=cn(s[1]),f=un(s[1])):u=2,u){case 0:if(a instanceof tc){e=r,n=hn([oc(a),rc(nc(a),void 0,ic(a),0)],c),t=i;continue e}e=r,n=hn([void 0,ec(nc(a))],c),t=i;continue e;case 1:if(f instanceof tc){e=r,n=o,t=hn([oc(f),rc(nc(f),void 0,ic(f),0)],l);continue e}e=r,n=o,t=hn([void 0,ec(nc(f))],l);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}}}else{un(s[1]);const u=[o,i];let c,a,l,f,d;switch(on(u[0])?on(u[1])?c=2:null!=un(u[1])?(c=1,f=cn(u[1]),d=un(u[1])):c=2:null!=un(u[0])?(c=0,a=cn(u[0]),l=un(u[0])):on(u[1])?c=2:null!=un(u[1])?(c=1,f=cn(u[1]),d=un(u[1])):c=2,c){case 0:if(l instanceof tc){e=r,n=hn([oc(l),rc(nc(l),void 0,ic(l),0)],a),t=i;continue e}e=r,n=hn([void 0,ec(nc(l))],a),t=i;continue e;case 1:if(d instanceof tc){e=r,n=o,t=hn([oc(d),rc(nc(d),void 0,ic(d),0)],f);continue e}e=r,n=o,t=hn([void 0,ec(nc(d))],f);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}else{if(null==un(s[0])){e=r,n=cn(s[0]),t=cn(s[1]);continue e}{un(s[0]);const u=[o,i];let c,a,l,f,d;switch(on(u[0])?on(u[1])?c=2:null!=un(u[1])?(c=1,f=cn(u[1]),d=un(u[1])):c=2:null!=un(u[0])?(c=0,a=cn(u[0]),l=un(u[0])):on(u[1])?c=2:null!=un(u[1])?(c=1,f=cn(u[1]),d=un(u[1])):c=2,c){case 0:if(l instanceof tc){e=r,n=hn([oc(l),rc(nc(l),void 0,ic(l),0)],a),t=i;continue e}e=r,n=hn([void 0,ec(nc(l))],a),t=i;continue e;case 1:if(d instanceof tc){e=r,n=o,t=hn([oc(d),rc(nc(d),void 0,ic(d),0)],f);continue e}e=r,n=o,t=hn([void 0,ec(nc(d))],f);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}}break}}(e,rn(n),rn(t))}function vc(e,n,t){let r=t;hc((e=>{n[r]=e,r=r+1|0}),e)}function bc(n,t){if(e(t))return function(e,n){return ae(((n,t)=>fc(e,t,n)),void 0,n)}(n,t);if(t instanceof qe)return function(e,n){return ln(((n,t)=>fc(e,t,n)),void 0,n)}(n,t);{const e=s(t);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=fc(r,i["System.Collections.Generic.IEnumerator`1.get_Current"](),o),t=i}}(n,void 0,e)}finally{r(e)}}}class Cc{constructor(e,n){this.comparer=e,this.tree=n}GetHashCode(){return 0|function(e){let n,t=0;const o=s(e);try{for(;o["System.Collections.IEnumerator.MoveNext"]();)t=0|(n=0|m(o["System.Collections.Generic.IEnumerator`1.get_Current"]()),(t<<1)+n+631)}finally{r(o)}return 0|Math.abs(t)}(this)}Equals(e){return e instanceof Cc&&0===yc(xc(this),Sc(this),Sc(e))}toString(){return"set ["+He("; ",Hn((e=>T(e)),this))+"]"}get[Symbol.toStringTag](){return"FSharpSet"}toJSON(e){return Array.from(this)}CompareTo(e){return 0|yc(xc(this),Sc(this),Sc(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 dc(xc(this),e,Sc(this))}"System.Collections.Generic.ICollection`1.CopyToZ2E171D71"(e,n){vc(Sc(this),e,n)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return 0|Ec(this)}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return 0|Ec(this)}GetEnumerator(){return _c(Sc(this))}[Symbol.iterator](){return u(this.GetEnumerator())}"System.Collections.IEnumerable.GetEnumerator"(){return _c(Sc(this))}get size(){return 0|Ec(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 dc(xc(e),n,Sc(e))}(this,e)}keys(){return Hn((e=>e),this)}values(){return Hn((e=>e),this)}entries(){return Hn((e=>[e,e]),this)}forEach(e,n){const t=this;Rn((n=>{e(n,n,t)}),t)}}function xc(e){return e.comparer}function Sc(e){return e.tree}function Ec(e){return cc(Sc(e))}function kc(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 Ic(e,n,t){const r=n(e,t);if(1===r.tag){const e=r.fields[0];return new st(1,function(e,n){const t=2===n.tag?kc(n.fields[0],n.fields[1],!0):1===n.tag?kc(n.fields[0],n.fields[1],!1)+"\nReason: "+n.fields[2]:3===n.tag?kc(n.fields[0],n.fields[1],!0):4===n.tag?kc(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"+He("\n\n",n.fields[0]):6===n.tag?"The following `failure` occurred with the decoder: "+n.fields[0]:kc(n.fields[0],n.fields[1],!1);return 7===n.tag?t:"Error at: `"+e+"`\n"+t}(e[0],e[1]))}return new st(0,r.fields[0])}function Ac(e,n){try{return Ic("$",e,JSON.parse(n))}catch(e){if(e instanceof SyntaxError)return new st(1,"Given an invalid JSON: "+e.message);throw e}}function Nc(e,n){return"string"==typeof n?new st(0,n):new st(1,[e,new Js(0,"a string",n)])}const Tc=e=>n=>{const t="a sbyte",r=e,o=n;if("number"==typeof o){const e=o;return isFinite(e)&&Math.floor(e)===e?-128<=e&&e<=127?new st(0,(e+128&255)-128):new st(1,[r,new Js(1,t,e,"Value was either too large or too small for "+t)]):new st(1,[r,new Js(1,t,e,"Value is not an integral value")])}if("string"==typeof o){let e,n=0;return e=[uu(o,511,!1,8,new O((()=>n),(e=>{n=0|e}))),n],e[0]?new st(0,e[1]):new st(1,[r,new Js(0,t,o)])}return new st(1,[r,new Js(0,t,o)])},Dc=e=>n=>{const t="a byte",r=e,o=n;if("number"==typeof o){const e=o;return isFinite(e)&&Math.floor(e)===e?0<=e&&e<=255?new st(0,255&e):new st(1,[r,new Js(1,t,e,"Value was either too large or too small for "+t)]):new st(1,[r,new Js(1,t,e,"Value is not an integral value")])}if("string"==typeof o){let e,n=0;return e=[uu(o,511,!0,8,new O((()=>n),(e=>{n=e}))),n],e[0]?new st(0,e[1]):new st(1,[r,new Js(0,t,o)])}return new st(1,[r,new Js(0,t,o)])},Pc=e=>n=>{const t="an int16",r=e,o=n;if("number"==typeof o){const e=o;return isFinite(e)&&Math.floor(e)===e?-32768<=e&&e<=32767?new st(0,(e+32768&65535)-32768):new st(1,[r,new Js(1,t,e,"Value was either too large or too small for "+t)]):new st(1,[r,new Js(1,t,e,"Value is not an integral value")])}if("string"==typeof o){let e,n=0;return e=[uu(o,511,!1,16,new O((()=>n),(e=>{n=0|e}))),n],e[0]?new st(0,e[1]):new st(1,[r,new Js(0,t,o)])}return new st(1,[r,new Js(0,t,o)])},Oc=e=>n=>{const t="an uint16",r=e,o=n;if("number"==typeof o){const e=o;return isFinite(e)&&Math.floor(e)===e?0<=e&&e<=65535?new st(0,65535&e):new st(1,[r,new Js(1,t,e,"Value was either too large or too small for "+t)]):new st(1,[r,new Js(1,t,e,"Value is not an integral value")])}if("string"==typeof o){let e,n=0;return e=[uu(o,511,!0,16,new O((()=>n),(e=>{n=e}))),n],e[0]?new st(0,e[1]):new st(1,[r,new Js(0,t,o)])}return new st(1,[r,new Js(0,t,o)])},Mc=e=>n=>{const t="an int",r=e,o=n;if("number"==typeof o){const e=o;return isFinite(e)&&Math.floor(e)===e?-2147483648<=e&&e<=2147483647?new st(0,~~e):new st(1,[r,new Js(1,t,e,"Value was either too large or too small for "+t)]):new st(1,[r,new Js(1,t,e,"Value is not an integral value")])}if("string"==typeof o){let e,n=0;return e=[uu(o,511,!1,32,new O((()=>n),(e=>{n=0|e}))),n],e[0]?new st(0,e[1]):new st(1,[r,new Js(0,t,o)])}return new st(1,[r,new Js(0,t,o)])},Uc=e=>n=>{const t="an uint32",r=e,o=n;if("number"==typeof o){const e=o;return isFinite(e)&&Math.floor(e)===e?0<=e&&e<=4294967295?new st(0,e>>>0):new st(1,[r,new Js(1,t,e,"Value was either too large or too small for "+t)]):new st(1,[r,new Js(1,t,e,"Value is not an integral value")])}if("string"==typeof o){let e,n=0;return e=[uu(o,511,!0,32,new O((()=>n),(e=>{n=e}))),n],e[0]?new st(0,e[1]):new st(1,[r,new Js(0,t,o)])}return new st(1,[r,new Js(0,t,o)])};function Lc(e,n,t,r){let o;const i=t+".["+l(e)+"]";if(Array.isArray(r)){const t=r;return e<t.length?n(i,t[e]):new st(1,[i,new Js(5,"a longer array. Need index `"+l(e)+"` but there are only `"+(o=t.length,l(o)+"` entries"),r)])}return new st(1,[i,new Js(0,"an array",r)])}function Bc(e,n,t){if(Array.isArray(t)){let r=-1;return ut(fn,ae(((t,o)=>{if(r=r+1|0,0===t.tag){const i=e(n+".["+l(r)+"]",o);return 0===i.tag?new st(0,tn(i.fields[0],t.fields[0])):new st(1,i.fields[0])}return t}),new st(0,nn()),t))}return new st(1,[n,new Js(0,"a list",t)])}function Fc(e,n,t){if(Array.isArray(t)){let r=-1;const o=t;return ae(((t,o)=>{if(r=r+1|0,0===t.tag){const i=t.fields[0],s=e(n+".["+l(r)+"]",o);return 0===s.tag?(i[r]=s.fields[0],new st(0,i)):new st(1,s.fields[0])}return t}),new st(0,ue(new Array(o.length),0,o.length,null)),o)}return new st(1,[n,new Js(0,"an array",t)])}function Gc(e,n,t,r){const o=n(t,r);return 0===o.tag?e(o.fields[0],t,r):new st(1,o.fields[0])}function Rc(e,n){let t;const r=e;return t=e=>n=>Lc(0,r,e,n),e=>r=>Gc(I(3,(e=>{let t;const r=n;return t=e=>n=>Lc(1,r,e,n),n=>r=>Gc(((n,t,r)=>new st(0,[e,n])),I(2,t),n,r)})),I(2,t),e,r)}function Hc(e){return Fs(e)}function jc(e){return function(e,n){return new Cc(e,n)}(n={Compare:x},bc(n,e));var n}function $c(e,n,t,r){let o;const i=n.length+e|0;if(i!==r.length)return new st(1,[t,new Js(6,(o=0|r.length,Ue(Pe("Expected array of length %i but got %i"))(i)(o)))]);{let o=new st(0,nn());for(let i=e;i<=r.length-1;i++)if(0===o.tag){const s=o.fields[0],u=Ue(Pe("%s[%i]"))(t)(i),c=n[i-e],a=r[i];o=ut((e=>tn(e,s)),c(u)(a))}return ut(fn,o)}}function Wc(e,n,t,r,o,i){const s=function(e,n){return n.find((e=>Zo(e)===r))}(0,function(e){if(null!=e.cases)return e.cases();throw new Error(`${e.fullname} is not an F# union type`)}(t));if(null!=s){const t=s,r=ce((t=>Vc(e,n,!1,t[1])),function(e){return null==e.fields?[]:e.fields}(t));return ut((e=>function(e,n){const t=(e.fields||[]).length;if(n.length!==t)throw new Error(`Expected an array of length ${t} but got ${n.length}`);return null!=e.declaringType.construct?new e.declaringType.construct(e.tag,...n):{}}(t,an(e))),0===r.length&&i.length<=1?new st(0,nn()):$c(1,r,o,i))}return new st(1,[o,new Js(6,"Cannot find case "+r+" in "+Jo(t))])}function zc(e,n,t,r){const o=new O(null);let i;const s=Jo(r);let u;if(i=""===s?e:function(e,n,t){return Bs(e.comparer,Ss(e.comparer,n,t,e.tree))}(e,s,o),function(e){return e instanceof Go?null!=e.fields:e instanceof P}(r)){const e=ce((e=>[eu(n,Zo(e)),Vc(i,n,!1,e[1])]),ei(r));u=n=>t=>ut((e=>function(e,n){const t=ei(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,an(e))),function(e,n,t){return null===t||Object.getPrototypeOf(t||!1)!==Object.prototype?new st(1,[n,new Js(0,"an object",t)]):function(e,n,t){return n.reduceRight(((n,t)=>e(t,n)),t)}(I(2,(e=>{const r=e[0];return o=>0===o.tag?ut((e=>tn(e,o.fields[0])),e[1](n+"."+r)(t[r])):o})),e,new st(0,nn()))}(e,n,t))}else if(function(e){return e instanceof Go?null!=e.cases:e instanceof D}(r))u=e=>t=>{if("string"==typeof t)return Wc(i,n,r,t,e,[]);if(Array.isArray(t)){const u=t;return 0===(o=Nc(e+"[0]",u[0])).tag?(s=o.fields[0],Wc(i,n,r,s,e,u)):new st(1,o.fields[0])}var o,s;return new st(1,[e,new Js(0,"a string or array",t)])};else{if(!t){let e;const n=Jo(r);throw e=Ue(Pe("Cannot generate auto decoder for %s. Please pass an extra decoder.\n\nDocumentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders"))(n),new Error(e)}u=e=>n=>new st(1,[e,new Js(2,"an extra coder for "+Jo(r),n)])}return o.contents=u,u}function Vc(e,n,t,r){let o,i,s,u;const c=Jo(r),a=function(e,n){return Es(e.comparer,n,e.tree)}(e,c);if(null==a){if(function(e){return null!=Ko(e)}(r)){const t=Vc(e,n,!1,Ko(r));return e=>n=>Fc(I(2,t),e,n)}if(Yo(r)){const e=Jo(function(e){var n;return null===(n=e.generics)||void 0===n?void 0:n[0]}(r));if("System.SByte"===e)return e=>n=>{const t=r,o=e,i=n,s=Tc(o)(i);if(1===s.tag)return new st(1,s.fields[0]);{const e=s.fields[0];return Fn(e,Xo(t),{Equals:(e,n)=>e===n,GetHashCode:h})?new st(0,Qo(t,e.toString())):new st(1,[o,new Js(1,Jo(t),i,"Unkown value provided for the enum")])}};if("System.Byte"===e)return e=>n=>{const t=r,o=e,i=n,s=Dc(o)(i);if(1===s.tag)return new st(1,s.fields[0]);{const e=s.fields[0];return Fn(e,Xo(t),{Equals:(e,n)=>e===n,GetHashCode:h})?new st(0,Qo(t,e.toString())):new st(1,[o,new Js(1,Jo(t),i,"Unkown value provided for the enum")])}};if("System.Int16"===e)return e=>n=>{const t=r,o=e,i=n,s=Pc(o)(i);if(1===s.tag)return new st(1,s.fields[0]);{const e=s.fields[0];return Fn(e,Xo(t),{Equals:(e,n)=>e===n,GetHashCode:h})?new st(0,Qo(t,e.toString(u))):new st(1,[o,new Js(1,Jo(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=Oc(o)(i);if(1===s.tag)return new st(1,s.fields[0]);{const e=s.fields[0];return Fn(e,Xo(t),{Equals:(e,n)=>e===n,GetHashCode:h})?new st(0,Qo(t,e.toString())):new st(1,[o,new Js(1,Jo(t),i,"Unkown value provided for the enum")])}};if("System.Int32"===e)return e=>n=>{const t=r,o=e,i=n,s=Mc(o)(i);if(1===s.tag)return new st(1,s.fields[0]);{const e=s.fields[0];return Fn(e,Xo(t),{Equals:(e,n)=>e===n,GetHashCode:h})?new st(0,Qo(t,l(e))):new st(1,[o,new Js(1,Jo(t),i,"Unkown value provided for the enum")])}};if("System.UInt32"===e)return e=>n=>{const t=r,o=e,i=n,s=Uc(o)(i);if(1===s.tag)return new st(1,s.fields[0]);{const e=s.fields[0];return Fn(e,Xo(t),{Equals:(e,n)=>e===n,GetHashCode:h})?new st(0,Qo(t,e.toString())):new st(1,[o,new Js(1,Jo(t),i,"Unkown value provided for the enum")])}};{const e=Jo(r),n=Me((e=>{throw new Error(e)}),Pe("Cannot generate auto decoder for %s.\nThoth.Json.Net only support the following enum types:\n- sbyte\n- byte\n- int16\n- uint16\n- int\n- uint32\nIf you can't use one of these types, please pass an extra decoder.\n "))(e);return e=>n(e)}}if(function(e){return null!=e.generics&&e.generics.length>0}(r)){if(ni(r)){const t=ce((t=>Vc(e,n,!1,t)),function(e){if(ni(e)&&null!=e.generics)return e.generics;throw new Error(`${e.fullname} is not a tuple type`)}(r));return e=>n=>Array.isArray(n)?ut((e=>an(e)),$c(0,t,e,n)):new st(1,[e,new Js(0,"an array",n)])}{const c=Jo(function(e){return null==e.generics?e:new Go(e.fullname,e.generics.map((()=>Vo)))}(r));if("Microsoft.FSharp.Core.FSharpOption`1[System.Object]"===c)return o=Vc(e,n,!0,Ro(r)[0]),e=>n=>{return t=I(2,o),r=e,null==(i=n)?new st(0,void 0):ut(ee,t(r,i));var t,r,i};if("Microsoft.FSharp.Collections.FSharpList`1[System.Object]"===c)return i=Vc(e,n,!1,Ro(r)[0]),e=>n=>Bc(I(2,i),e,n);if("System.Collections.Generic.IEnumerable`1[System.Object]"===c)return s=Vc(e,n,!1,Ro(r)[0]),e=>n=>function(e,n,t){if(Array.isArray(t)){let r=-1;return ut(Wn,ae(((t,o)=>{if(r=r+1|0,0===t.tag){const i=e(n+".["+l(r)+"]",o);return 0===i.tag?new st(0,Ln([i.fields[0]],t.fields[0])):new st(1,i.fields[0])}return t}),new st(0,[]),t))}return new st(1,[n,new Js(0,"a seq",t)])}(I(2,s),e,n);if("Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]"===c){const t=Vc(e,n,!1,Ro(r)[0]),o=Vc(e,n,!1,Ro(r)[1]);let i;const s=pn([e=>n=>function(e,n,t,r){return null===r||Object.getPrototypeOf(r||!1)!==Object.prototype?new st(1,[t,new Js(0,"an object",r)]):Gn(((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 st(0,tn([s.fields[0],e.fields[0]],o.fields[0])):new st(1,e.fields[0])}return new st(1,s.fields[0])}return o}),new st(0,nn()),Object.keys(r))}(I(2,t),I(2,o),e,n),(u=Rc(I(2,t),I(2,o)),e=>n=>Bc(I(2,u),e,n))]);return i=e=>n=>{return t=e,r=n,((e,n)=>{e:for(;;){const o=e,i=n;if(on(o))return new st(1,[t,new Js(7,i)]);{const s=Ic(t,I(2,un(o)),r);if(1===s.tag){e=cn(o),n=mn(i,rn(s.fields[0]));continue e}return new st(0,s.fields[0])}}})(s,nn());var t,r},e=>n=>function(e,n,t,r){const o=n(t,r);return 1===o.tag?new st(1,o.fields[0]):new st(0,e(o.fields[0]))}(Hc,I(2,i),e,n)}if("Microsoft.FSharp.Collections.FSharpSet`1[System.Object]"===c){const t=Vc(e,n,!1,Ro(r)[0]);return e=>n=>{const r=Fc(I(2,t),e,n);return 0===r.tag?new st(0,jc(r.fields[0])):new st(1,r.fields[0])}}return zc(e,n,t,r)}}return"System.Boolean"===c?e=>n=>{return t=e,"boolean"==typeof(r=n)?new st(0,r):new st(1,[t,new Js(0,"a boolean",r)]);var t,r}:"Microsoft.FSharp.Core.Unit"===c?e=>n=>{return t=e,null==(r=n)?new st(0,void 0):new st(1,[t,new Js(0,"null",r)]);var t,r}:"System.String"===c?e=>n=>Nc(e,n):"System.Char"===c?e=>n=>function(e,n){if("string"==typeof n){const t=n;return 1===t.length?new st(0,t[0]):new st(1,[e,new Js(0,"a single character string",n)])}return new st(1,[e,new Js(0,"a char",n)])}(e,n):"System.SByte"===c?Tc:"System.Byte"===c?Dc:"System.Int16"===c?Pc:"System.UInt16"===c?Oc:"System.Int32"===c?Mc:"System.UInt32"===c?Uc:"System.Double"===c?e=>n=>{return t=e,"number"==typeof(r=n)?new st(0,r):new st(1,[t,new Js(0,"a float",r)]);var t,r}:"System.Single"===c?e=>n=>{return t=e,"number"==typeof(r=n)?new st(0,r):new st(1,[t,new Js(0,"a float32",r)]);var t,r}:"System.DateTime"===c?e=>n=>function(e,n){if("string"==typeof n){let r,o=me(-621355968e5,0);return r=[we(n,new O((()=>o),(e=>{o=e}))),o],r[0]?new st(0,1===(t=r[1]).kind?t:me(t.getTime(),1)):new st(1,[e,new Js(0,"a datetime",n)])}var t;return new st(1,[e,new Js(0,"a datetime",n)])}(e,n):"System.DateTimeOffset"===c?e=>n=>function(e,n){if("string"==typeof n){let t,r=cu(-621355968e5,0);return t=[au(n,new O((()=>r),(e=>{r=e}))),r],t[0]?new st(0,t[1]):new st(1,[e,new Js(0,"a datetimeoffset",n)])}return new st(1,[e,new Js(0,"a datetime",n)])}(e,n):"System.TimeSpan"===c?e=>n=>function(e,n){if("string"==typeof n){let t,r=0;return t=[Xu(n,new O((()=>r),(e=>{r=e}))),r],t[0]?new st(0,t[1]):new st(1,[e,new Js(0,"a timespan",n)])}return new st(1,[e,new Js(0,"a timespan",n)])}(e,n):"System.Guid"===c?e=>n=>function(e,n){if("string"==typeof n){let t,r="00000000-0000-0000-0000-000000000000";return t=[ou(n,new O((()=>r),(e=>{r=e}))),r],t[0]?new st(0,t[1]):new st(1,[e,new Js(0,"a guid",n)])}return new st(1,[e,new Js(0,"a guid",n)])}(e,n):"System.Object"===c?e=>e=>new st(0,e):zc(e,n,t,r)}{const e=a;return n=>t=>e.contents(n)(t)}}function qc(e){return null!=e?(n=(e,n)=>new O(n[1]),function(e,n){return Bs(e.comparer,Ns(n,e.tree))}(e.Coders,n)):js();var n}function Zc(e,n,t){const r=re(n,new Ks(0));return Vc(qc(t),r,!1,e)}class Jc extends P{constructor(e,n,t,r,o){super(),this.StreamId=e,this.Name=n,this.Website=t,this.ContactDetails=r,this.Notes=o}}class Kc extends P{constructor(e,n,t,r,o,i,s,u,c){super(),this.StreamId=e,this.PartnerId=n,this.Name=t,this.Website=r,this.ContactDetails=o,this.Notes=i,this.LegalEntity=s,this.ExternalId=u,this.ChannelId=c}}class Yc extends P{constructor(e,n,t,r,o,i,s,u,c){super(),this.AccountId=e,this.Name=n,this.Contact=t,this.ContactMobilePhone=r,this.Website=o,this.BusinessName=i,this.BusinessNumber=s,this.ExternalId=u,this.ChannelId=c}}class Xc extends P{constructor(e,n){super(),this.Accounts=e,this.Token=n}}function Qc(e){return new Bo(0,q(e))}function ea(e){return`${e}/account-registry/admin`}function na(e,n){return Ao.Delay((()=>{const t=qs((r=Ue(Pe("Bearer %s"))(e),new us(0,"Authorization",r)),n);var r;let o;const i=Zs(t);return o=Ao.Bind(i,(e=>Ao.Return(new st(0,e)))),Ao.Bind(o,(e=>{const n=e;if(1===n.tag)return Ao.Return(new st(1,n.fields[0]));{const e=n.fields[0];if(429===e.statusCode||e.statusCode>=500){const e=Zs(t);return Ao.Bind(e,(e=>Ao.Return(new st(0,e))))}return Ao.Return(new st(0,e))}}))}))}function ta(e,n){return Ao.Delay((()=>{let t;const r=na(n,Vs(new ss(0),zs((t=ea(e),`${t}/partners`))));return Ao.Bind(r,(e=>{const n=e;if(1===n.tag)return Ao.Return(new st(1,n.fields[0]));{const e=n.fields[0];if(200===e.statusCode){let n;const t=Ac(I(2,Zc(zo($o("Dto.AdminApi.Partner",[],Jc,(()=>[["StreamId",qo],["Name",qo],["Website",qo],["ContactDetails",li()],["Notes",Wo(qo)]]))),new Ks(1),void 0)),e.responseText);return n=1===t.tag?new st(1,t.fields[0]):function(e,n){return function(e,n,t){e:for(;;){const r=e,o=n,i=t;if(on(i)){const e=r;return 1===e.tag?new st(1,e.fields[0]):new st(0,fn(e.fields[0]))}{let s;const u=o(un(i));if(1===u.tag)s=new st(1,u.fields[0]);else{const e=r;s=1===e.tag?new st(1,e.fields[0]):new st(0,tn(u.fields[0],e.fields[0]))}if(1===s.tag)return s;e=s,n=o,t=cn(i);continue e}}}(new st(0,nn()),e,n)}((e=>e),wn(Gi,t.fields[0])),Ao.Return(n)}return Ao.Return(new st(1,"Unexpected response from backend"))}}))}))}function ra(e,n,t,r,o){return Ao.Delay((()=>{let i,s,u,c,a;const l="?"+He("&",function(e,n){const t=Je(),r=ln(((e,n)=>{if(null==n)return e;{const t=new qe(ne(n),void 0);return e.tail=t,t}}),t,n),o=Je();return r.tail=o,en(t)}(0,pn([(i=Oi(r.SearchText),Re(i)?void 0:`search=${encodeURIComponent(i)}`),(f=r.Sort,s=[f.fields[0],f.fields[1]],1===s[0].tag?1===s[1].tag?"sort_by=name&sort_direction=desc":"sort_by=name&sort_direction=asc":1===s[1].tag?"sort_by=accountid&sort_direction=desc":"sort_by=accountid&sort_direction=asc"),(u=0|Ui(r.PageSize),u<=100&&u>=10?`page_size=${u}`:void 0)])));var f;const d=na(n,(c=Vs(new ss(0),zs((a=ea(e),`${a}/partners/${Fo(t)}/accounts${l}`))),null==o?c:qs(new us(0,"token",o),c)));return Ao.Bind(d,(e=>{const n=e;if(1===n.tag)return Ao.Return(new st(1,n.fields[0]));{const e=n.fields[0];if(200===e.statusCode){const n=Ac(I(2,Zc($o("Dto.AdminApi.AccountLookup",[],Xc,(()=>[["Accounts",zo($o("Dto.AdminApi.AccountLookupItem",[],Yc,(()=>[["AccountId",qo],["Name",qo],["Contact",qo],["ContactMobilePhone",qo],["Website",qo],["BusinessName",Wo(qo)],["BusinessNumber",Wo(qo)],["ExternalId",Wo(qo)],["ChannelId",Wo(qo)]])))],["Token",Wo(qo)]])),new Ks(1),void 0)),e.responseText);return Ao.Return(n)}return Ao.Return(new st(1,"Unexpected response from backend"))}}))}))}const oa=Nr((function(e,n){return Ct("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:n},e),Ct("path",{fillRule:"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",clipRule:"evenodd"}))}));class ia extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["BreadCrumb"]}}function sa(){return new ia(0,["Partners",$i(new Hi(0))])}function ua(e,n){return new ia(0,[n,$i(new Hi(1,e))])}function ca(e){return new ia(0,[e,void 0])}function aa(e){let n,t;const r=e.partner;if(null==r)t="...";else{const e=r,n=e.Name;t=2===n.tag?1===n.fields[0].tag?J(e.Id):F(n.fields[0].fields[0]):"..."}let o;const i=e.account;if(null==i)o="...";else{const e=i,n=e.Name;o=2===n.tag?1===n.fields[0].tag?Y(e.Id):F(n.fields[0].fields[0]):"..."}let s;const u=[e.partner,e.account];let c,a,l,f;switch(null==u[0]?c=2:null==u[1]?(c=1,f=u[0]):(c=0,a=u[1],l=u[0]),c){case 0:s=pn([sa(),ua(l.Id,t),(d=l.Id,new ia(0,["Accounts",$i(new Hi(3,d))])),ca(o)]);break;case 1:s=pn([sa(),ua(f.Id,t)]);break;case 2:s=nn()}var d;return function(e){let n,t;return Ct("nav",E(pn([["className","pt-2"],["aria-label","Breadcrumb"],(n=[Ct("ol",E(pn([["className","-ml-3 max-w-screen-xl w-full flex space-x-4"],(t=gn(((e,n)=>function(e,n,t,r){let o,i;return Ct("li",E(pn([["key",e],["className","flex"],(o=[Ct("div",E(pn([["className","flex items-center"],(i=Mn(Nn((()=>{let r;return Ln(t?Dn():Pn((r={className:"flex-shrink-0 h-5 w-5 text-gray-400"},Ct(oa,r))),Nn((()=>Pn(Ct("a",E(Mn(Nn((()=>Ln(Pn(["children",e]),Nn((()=>Ln(null!=n?Pn(["href",yi(ne(n),1)]):Dn(),Nn((()=>Pn(["className","ml-4 text-sm font-medium text-gray-500 hover:text-gray-700"]))))))))))))))))}))),["children",co.Children.toArray(Array.from(i))])])))],["children",co.Children.toArray(Array.from(o))])])))}(n.fields[0][0],n.fields[0][1],0===e)),e),["children",co.Children.toArray(Array.from(t))])])))],["children",co.Children.toArray(Array.from(n))])])))}((n=e.page,13===n.tag||1===n.tag||3===n.tag?s:4===n.tag?mn(s,rn(function(e){return new ia(0,["Super",$i(new Hi(4,e))])}(n.fields[0]))):5===n.tag?mn(s,rn(function(e){return new ia(0,["Benefits",$i(new Hi(5,e))])}(n.fields[0]))):6===n.tag?mn(s,rn(function(e){return new ia(0,["Bank Details",$i(new Hi(6,e))])}(n.fields[0]))):2===n.tag?mn(s,rn(function(e){return new ia(0,["Directory",$i(new Hi(2,e))])}(n.fields[0]))):7===n.tag?s:8===n.tag?mn(s,rn(function(e,n){let t;return new ia(0,["Directory",$i((t=[e,n],new Hi(8,t[0],t[1])))])}(n.fields[0],n.fields[1]))):9===n.tag?mn(s,rn(function(e,n){let t;return new ia(0,["Super",$i((t=[e,n],new Hi(9,t[0],t[1])))])}(n.fields[0],n.fields[1]))):10===n.tag?mn(s,rn(function(e,n){let t;return new ia(0,["Benefits",$i((t=[e,n],new Hi(10,t[0],t[1])))])}(n.fields[0],n.fields[1]))):11===n.tag?mn(s,rn(function(e,n){let t;return new ia(0,["Bank Details",$i((t=[e,n],new Hi(11,t[0],t[1])))])}(n.fields[0],n.fields[1]))):12===n.tag?mn(s,rn(function(e,n){let t;return new ia(0,["Salary Packaging",$i((t=[e,n],new Hi(12,t[0],t[1])))])}(n.fields[0],n.fields[1]))):s))}class la extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Tab"]}}function fa(e){return e.fields[0]}function da(e,n){const t=(null!=n?"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300":"border-indigo-500 text-indigo-600")+" whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm";return r=Ct("a",E(Mn(Nn((()=>Ln(Pn(["key",e]),Nn((()=>Ln(Pn(["children",e]),Nn((()=>Ln(Pn(["className",t]),Nn((()=>null!=n?Pn(["href",yi(rn(ne(n)),1)]):Dn())))))))))))))),new la(0,r);var r}function ha(e){let n,t;return Ct("div",E(pn([["className","border-b border-gray-200"],(n=[Ct("nav",E(pn([["className","-mb-px flex space-x-8"],["aria-label","Tabs"],(t=Hn(fa,e),["children",co.Children.toArray(Array.from(t))])])))],["children",co.Children.toArray(Array.from(n))])])))}class pa extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["UpdateSearchText","UpdateSort","LoadAccountLookup","UpdateAccountLookup","QueryAccountLookup"]}}class ma{constructor(e){this.props=e}}function ga(e){return n=>t=>Ao.Delay((()=>{const r=Qc(e.props.partnerId);return Ao.Bind(ra(e.props.backendUrl,e.props.accessToken,r,n,void 0),(e=>(t(new pa(2,new Uo(2,e))),Ao.Zero())))}))}class wa extends P{constructor(e,n,t,r){super(),this.Data=e,this.SearchText=n,this.Sort=t,this.PageSize=r}}function _a(){return[new wa(new Uo(0),Pi,Ii,(20,new Mi(0,20))),Ji()]}function ya(e,n,t,r){let o,i;return Ct("div",E(pn([["className",He(" ",["flex-grow","max-w-md"])],(o=[Ct("label",{for:"search",children:"Search",className:He(" ",["block","text-sm","font-medium","text-gray-700"])}),Ct("div",E(pn([["className","mt-1"],(i=[Ct("input",{id:"search",name:"search",type:"text",className:He(" ",["py-2","shadow-sm","focus:ring-indigo-500","focus:border-indigo-500","block","w-full","sm:text-sm","border-gray-300","rounded-md"]),placeholder:n,value:e,onKeyUp:e=>{"Enter"===e.key&&r()},onChange:e=>{t(e.target.value)}})],["children",co.Children.toArray(Array.from(i))])])))],["children",co.Children.toArray(Array.from(o))])])))}function va(e){let n,t;return Ct("div",E(pn([["className","pt-6"],(n=[Ct("div",E(pn([["className",He(" ",["flex","justify-end"])],(t=[Ct("button",{type:"search",children:"Search",className:He(" ",["ml-3","inline-flex","justify-center","py-2","px-4","border","border-transparent","shadow-sm","text-sm","font-medium","rounded-md","text-white","bg-indigo-600","hover:bg-indigo-700","focus:outline-none","focus:ring-2","focus:ring-offset-2","focus:ring-indigo-500"]),onClick:e})],["children",co.Children.toArray(Array.from(t))])])))],["children",co.Children.toArray(Array.from(n))])])))}class ba extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["ColumnHeader"]}}function Ca(e){return new ba(0,e)}function xa(e){return e.fields[0]}class Sa extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["RowCell"]}}function Ea(e){return new Sa(0,e)}function ka(e){return e.fields[0]}function Ia(e){return Ca(Ct("th",E(pn([["className","px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"],["scope","col"],["children",e]]))))}function Aa(e,n){let t;return Ea(Ct("td",E(pn([["className","px-6 py-4 whitespace-nowrap text-sm"],(t=[Ct("a",{className:"text-indigo-600 hover:text-indigo-900",children:n,href:e})],["children",co.Children.toArray(Array.from(t))])]))))}function Na(e,n){return Ea(Ct("td",{className:He(" ",Ln(e,["px-6","py-4","whitespace-nowrap","text-sm"])),children:n}))}function Ta(e,n){let t,r,o,i,s,u,c;return Ct("div",E(pn([["className","flex flex-col mt-4"],(t=[Ct("div",E(pn([["className","-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"],(r=[Ct("div",E(pn([["className","py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8"],(o=[Ct("div",E(pn([["className","shadow overflow-hidden border-b border-gray-200 sm:rounded-lg"],(i=[Ct("table",E(pn([["className","min-w-full divide-y divide-gray-200"],(s=[Ct("thead",{className:"bg-gray-50",children:(u=Hn(xa,e),Ct("tr",{children:co.Children.toArray(Array.from(u))}))}),(c=jn(((e,n)=>(n=>{let t;return Ct("tr",E(pn([["className",e%2==0?"bg-white":"bg-gray-50"],(t=Hn(ka,n),["children",co.Children.toArray(Array.from(t))])])))})(n)),n),Ct("tbody",{children:co.Children.toArray(Array.from(c))}))],["children",co.Children.toArray(Array.from(s))])])))],["children",co.Children.toArray(Array.from(i))])])))],["children",co.Children.toArray(Array.from(o))])])))],["children",co.Children.toArray(Array.from(r))])])))],["children",co.Children.toArray(Array.from(t))])])))}function Da(e){return["fillRule",e]}function Pa(e){return["clipRule",e]}const Oa=Ct("svg",E(pn([["className",He(" ",["h-5","w-5"])],["fill","currentColor"],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],(()=>{const e=rn(Ct("path",E(pn([["d","M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"],Da("evenodd"),Pa("evenodd")]))));return["children",co.Children.toArray(Array.from(e))]})()]))),Ma=Ct("svg",E(pn([["className",He(" ",["h-5","w-5"])],["fill","currentColor"],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],(()=>{const e=rn(Ct("path",E(pn([["d","M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z"],Da("evenodd"),Pa("evenodd")]))));return["children",co.Children.toArray(Array.from(e))]})()])));function Ua(e,n,t,r){let o,i,s;return Ca(Ct("th",E(pn([["className",He(" ",["px-6","py-3","text-left","text-xs","font-medium","text-gray-500","sm:pl-6","uppercase","tracking-wider"])],["scope","col"],(o=[Ct("a",E(pn([["className",He(" ",["group","inline-flex","cursor-pointer"])],["onClick",t],(i=[r,Ct("span",E(pn([["className",He(" ",(u=!e,c=rn("invisible"),a=pn(["ml-2","flex-none","rounded","text-gray-400","group-hover:visible","group-focus:visible"]),u?mn(a,c):a))],(s=Mn(Nn((()=>Pn(n?Oa:Ma)))),["children",co.Children.toArray(Array.from(s))])])))],["children",co.Children.toArray(Array.from(i))])])))],["children",co.Children.toArray(Array.from(o))])]))));var u,c,a}function La(e,n){return Ua(y(Ai(e.Sort),new xi(1)),y(Ni(e.Sort),new Si(0)),(t=>{n(new pa(1,Ti(new xi(1),e.Sort)))}),"Name")}function Ba(e,n){return Ua(y(Ai(e.Sort),new xi(0)),y(Ni(e.Sort),new Si(0)),(t=>{n(new pa(1,Ti(new xi(0),e.Sort)))}),"Id")}class Fa extends P{constructor(e,n){super(),this.Data=e,this.LoadNext=n}}class Ga extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Resolved","InProgress"]}}class Ra extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Known","Unknown"]}}function Ha(e,n){let t;return Ct("tr",E(pn([["className",e%2==0?"bg-white":"bg-gray-50"],(t=Hn(ka,n),["children",co.Children.toArray(Array.from(t))])])))}function ja(e){let n,t,r,o,i;const s=e.data,u=e.pageSize,c=e.renderRowCells,a=e.columnHeaders,l=(p=u,m=s.Data,pn(ce(pn,function(e,n){if(e<1)throw new Error("The input must be positive.\\nParameter name: size");if(0===n.length)return[[]];{const t=[];for(let r=0;r<=~~Math.ceil(n.length/e)-1;r++){let o;const i=r*e|0;o=n.slice(i,i+e),t.push(o)}return t}}(p,an(m))))),f=function(e,n){const t=xo(1),r=t[1],o=0|t[0];return[o,t=>{if(o===e)if(null==n);else{const e=n;Me((e=>console.log(e)),Pe("Calling Load")),e(),r(o+1)}else r(o+1)},e=>{r(o-1)}]}(sn(l),s.LoadNext),d=0|f[0],h=f[1];var p,m;let g;const w=function(e,n){return((n,t)=>{for(;;){const r=n,o=t;if(Ye(o))return;if(r===e)return ee(Qe(o));n=r+1,t=en(o)}})(0,n)}(d-1,l);g=null==w?new Ga(1):new Ga(0,w);const _=0|sn(s.Data),y=null==s.LoadNext?new Ra(0,_):new Ra(1),v=1===g.tag?void 0:_>=1?(d-1)*u+1:void 0,b=1===g.tag?void 0:_>=1?(d-1)*u+sn(g.fields[0]):void 0,C=1===d?void 0:f[2],x=d===sn(l)?null!=s.LoadNext?h:void 0:d<sn(l)?h:void 0;return Ct("div",E(pn([["className","flex flex-col mt-4"],(n=[Ct("div",E(pn([["className","-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"],(t=[Ct("div",E(pn([["className","py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8"],(r=[Ct("div",E(pn([["className","shadow overflow-hidden border-b border-gray-200 sm:rounded-lg"],(o=[Ct("table",E(pn([["className","min-w-full divide-y divide-gray-200"],(i=Mn(Nn((()=>Ln(Pn(function(e){let n;return Ct("thead",{className:"bg-gray-50",children:(n=Hn(xa,e),Ct("tr",{children:co.Children.toArray(Array.from(n))}))})}(a)),Nn((()=>{let e,n;return Ln((e=g,1===e.tag?Pn(null):Pn((n=jn(Ha,c(e.fields[0])),Ct("tbody",{children:co.Children.toArray(Array.from(n))})))),Nn((()=>Pn(function(e,n,t,r,o,i){let s,u,c,a,l,f;const d=[n,t];let h,p,m;switch(null!=d[0]&&null!=d[1]?(h=0,p=d[0],m=d[1]):h=1,h){case 0:f=Mn(Nn((()=>Ln(Pn("Showing "),Nn((()=>Ln(Pn(Ct("span",{className:"font-medium",children:`${p}`})),Nn((()=>Ln(Pn(" to "),Nn((()=>Ln(Pn(Ct("span",{className:"font-medium",children:`${m}`})),Nn((()=>Ln(Pn(" of "),Nn((()=>1===r.tag?rn(" many"):pn([Ct("span",{className:"font-medium",children:T(r.fields[0])})," results"])))))))))))))))))));break;case 1:f=rn(null)}const g=Mn(Nn((()=>{let e,n;return Ln((e=i,null==e?Pn(null):(n=e,Pn(Ct("a",{className:He(" ",["relative","inline-flex","items-center","px-4","py-2","border","border-gray-300","text-sm","font-medium","rounded-md","text-gray-700","bg-white","hover:bg-gray-50","cursor-pointer"]),onClick:n,children:"Previous "})))),Nn((()=>{const e=o;if(null==e)return Pn(null);{const n=e;return Pn(Ct("a",{className:He(" ",["ml-3","relative","inline-flex","items-center","px-4","py-2","border","border-gray-300","text-sm","font-medium","rounded-md","text-gray-700","bg-white","hover:bg-gray-50","cursor-pointer"]),onClick:n,children:" Next"}))}})))})));return Ct("tfoot",E(pn([["className",He(" ",["w-full"])],(s=[Ct("tr",E(rn((u=[Ct("td",E(pn([["colSpan",e],(c=[Ct("nav",E(pn([["className",He(" ",["bg-white","px-4","py-3","flex","items-center","justify-between","border-t-1","border-gray-200","sm:px-6"])],(a=[Ct("div",E(pn([["className",He(" ",["hidden","sm:block"])],(l=[Ct("p",{className:He(" ",["text-sm","text-gray-700"]),children:co.Children.toArray(Array.from(f))})],["children",co.Children.toArray(Array.from(l))])]))),Ct("div",{className:He(" ",["flex-1","flex","justify-between","sm:justify-end"]),children:co.Children.toArray(Array.from(g))})],["children",co.Children.toArray(Array.from(a))])])))],["children",co.Children.toArray(Array.from(c))])])))],["children",co.Children.toArray(Array.from(u))]))))],["children",co.Children.toArray(Array.from(s))])])))}(sn(a),v,b,y,x,C)))))})))))),["children",co.Children.toArray(Array.from(i))])])))],["children",co.Children.toArray(Array.from(o))])])))],["children",co.Children.toArray(Array.from(r))])])))],["children",co.Children.toArray(Array.from(t))])])))],["children",co.Children.toArray(Array.from(n))])])))}function $a(e){const n=rn(Ct("span",{children:[e.error]}));return Ct("div",{children:co.Children.toArray(Array.from(n))})}function Wa(){const e=rn(Ct("span",{children:["Please wait..."]}));return Ct("div",{children:co.Children.toArray(Array.from(e))})}function za(e){let n,t,r,o,i,s,u;const c=function(e){return new ma(e)}(e),a=is(_a,((e,n)=>function(e,n,t){let r,o,i,s;switch(n.tag){case 1:{const r=n.fields[0];return[new wa(new Uo(1),t.SearchText,r,t.PageSize),Ki((n=>{const o=new Li(t.SearchText,r,t.PageSize);Mo(ga(e)(o)(n))}))]}case 2:return[new wa(n.fields[0],t.SearchText,t.Sort,t.PageSize),Ji()];case 3:return[new wa((r=[t.Data,n.fields[0]],2===r[0].tag?0===r[0].fields[0].tag?(o=r[1],1===o.tag?new Uo(2,new st(1,o.fields[0])):new Uo(2,new st(0,new Xc(mn(r[0].fields[0].fields[0].Accounts,o.fields[0].Accounts),o.fields[0].Token)))):(i=r[1],1===i.tag?new Uo(2,new st(1,i.fields[0])):new Uo(3,new Error("Failed to retrieve the account data"))):(s=r[1],1===s.tag?new Uo(2,new st(1,s.fields[0])):new Uo(3,new Error("Failed to retrieve the account data")))),t.SearchText,t.Sort,t.PageSize),Ji()];case 4:return[new wa(new Uo(1),t.SearchText,t.Sort,t.PageSize),Ki((n=>{const r=new Li(t.SearchText,t.Sort,t.PageSize);Mo(ga(e)(r)(n))}))];default:return[new wa(t.Data,(u=n.fields[0],new Di(0,u.trim())),t.Sort,t.PageSize),Ji()]}var u}(c,e,n)),[]),l=a[0],f=a[1],d=new Li(l.SearchText,l.Sort,l.PageSize);go((n=[()=>function(e,n,t){return ra(e.props.backendUrl,e.props.accessToken,Qc(e.props.partnerId),n,void 0)}(c,d),e=>{f(new pa(2,e))}],Lo(n[0],n[1])));const h=e=>{f(new pa(4))},p=l.Data;let m,g,w,_;switch(0===p.tag||1===p.tag?m=2:3===p.tag?(m=3,_=p.fields[0]):1===p.fields[0].tag?(m=1,w=p.fields[0].fields[0]):(m=0,g=p.fields[0].fields[0]),m){case 0:{const n=pn([Ct("div",E(pn([["className",He(" ",["grid","grid-cols-2","pt-2","sm:-mr-6","lg:mr-0"])],(t=[Ct("div",E(pn([["className",He(" ",["flex","flex-row","gap-4","sm:-mr-6","lg:mr-0"])],(r=[ya(Oi(l.SearchText),"Account ID, Name, Legal Entity, Channel ID or External ID",(e=>{f(new pa(0,e))}),h),va(h)],["children",co.Children.toArray(Array.from(r))])])))],["children",co.Children.toArray(Array.from(t))])]))),(o=g,i=pn([Ba(l,f),La(l,f),Ia("Contact"),Ia("Website")]),s=new Fa(o.Accounts,oe((e=>n=>{Mo(function(e){return n=>t=>r=>Ao.Delay((()=>{const o=Qc(e.props.partnerId);return Ao.Bind(ra(e.props.backendUrl,e.props.accessToken,o,n,t),(e=>(r(new pa(3,e)),Ao.Zero())))}))}(c)(d)(e)(f))}),o.Token)),u=0|Ui(l.PageSize),Ct(ja,{columnHeaders:i,renderRowCells:n=>wn((n=>function(e,n){const t=X(n.AccountId);return Mn(Nn((()=>{let r;return Ln(Pn(function(e,n,t,r){let o;return Ea(Ct("td",E(pn([["className","px-6 py-2 whitespace-nowrap text-sm align-top"],(o=Mn(Nn((()=>Ln(Pn(Ct("a",{className:"text-indigo-600 hover:text-indigo-900",children:n,href:e})),Nn((()=>{let e,n;return Ln((e=r,null==e?Pn(null):(n=e,Ln(Pn(Ct("br",{})),Nn((()=>{let e;return Pn((e=`Channel ID: ${n}`,Ct("span",{children:[e]})))}))))),Nn((()=>{const e=t;if(null==e)return Pn(null);{const n=e;return Ln(Pn(Ct("br",{})),Nn((()=>{let e;return Pn((e=`External ID: ${n}`,Ct("span",{children:[e]})))})))}})))})))))),["children",co.Children.toArray(Array.from(o))])]))))}(yi($i((r=[e,t],new Hi(7,r[0],r[1]))),1),n.AccountId,n.ExternalId,n.ChannelId)),Nn((()=>Ln(Pn(function(e,n,t){let r;return Ea(Ct("td",E(pn([["className",He(" ",["text-gray-500","px-6","py-2","whitespace-nowrap","text-sm","align-top"])],(r=Mn(Nn((()=>{let r;return Ln(Pn(Ct("div",E(pn([["className",He(" ",["font-medium"])],(r=[Ct("span",{children:[e]})],["children",co.Children.toArray(Array.from(r))])])))),Nn((()=>{let e,r;return Ln((e=n,Pn(null==e?null:(r="Legal Entity: "+e,Ct("span",{children:[r]})))),Nn((()=>{const e=t;if(null==e)return Pn(null);{const n=e;return Ln(Pn(Ct("br",{})),Nn((()=>{let e;return Pn((e="ABN: "+n,Ct("span",{children:[e]})))})))}})))})))}))),["children",co.Children.toArray(Array.from(r))])]))))}(n.Name,n.BusinessName,n.BusinessNumber)),Nn((()=>Ln(Pn(function(e,n){let t;return Ea(Ct("td",E(pn([["className",He(" ",["text-gray-500","px-6","py-2","whitespace-nowrap","text-sm","align-top"])],(t=[Ct("span",{children:[e]}),Ct("br",{}),Ct("span",{children:[n]})],["children",co.Children.toArray(Array.from(t))])]))))}(n.Contact,n.ContactMobilePhone)),Nn((()=>{return Pn((e=n.Website,Ea(Ct("td",{className:He(" ",["px-6","py-2","whitespace-nowrap","text-sm","text-gray-500","align-top"]),children:e}))));var e})))))))))})))}(e.partnerId,n)),n),pageSize:u,data:s}))]);return Ct("div",{children:co.Children.toArray(Array.from(n))})}case 1:return Ct($a,{error:w});case 2:return Ct(Wa,null);case 3:return Ct($a,{error:T(_)})}}class Va extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}}function qa(e){const n=e.accessToken,t=e.backendUrl,r=e.accountId,o=Bn((e=>e),[new Va(1,n),new Va(0,t),new Va(2,q(e.partnerId)),oe((e=>new Va(3,Y(e))),r)]);return Ct("superhero-super-configuration",qn(o,1))}class Za extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}}function Ja(e){const n=e.accessToken,t=e.backendUrl,r=e.accountId,o=Bn((e=>e),[new Za(1,n),new Za(0,t),new Za(2,q(e.partnerId)),oe((e=>new Za(3,Y(e))),r)]);return Ct("superhero-benefits-onboarding-configuration",qn(o,1))}class Ka extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}}function Ya(e){const n=e.accessToken,t=e.backendUrl,r=e.accountId,o=Bn((e=>e),[new Ka(1,n),new Ka(0,t),new Ka(2,q(e.partnerId)),oe((e=>new Ka(3,Y(e))),r)]);return Ct("superhero-bank-details",qn(o,1))}class Xa extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}}function Qa(e){const n=e.accessToken,t=e.backendUrl,r=e.accountId,o=Bn((e=>e),[new Xa(1,n),new Xa(0,t),new Xa(2,q(e.partnerId)),oe((e=>new Xa(3,Y(e))),r)]);return Ct("superhero-profile-directory-app",qn(o,1))}function el(...e){return e.filter(Boolean).join(" ")}function nl(e,n,...t){if(e in n){let r=n[e];return"function"==typeof r?r(...t):r}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(n).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,nl),r}var tl=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(tl||{}),rl=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(rl||{});function ol({ourProps:e,theirProps:n,slot:t,defaultTag:r,features:o,visible:i=!0,name:s}){let u=sl(n,e);if(i)return il(u,t,r,s);let c=null!=o?o:0;if(2&c){let{static:e=!1,...n}=u;if(e)return il(n,t,r,s)}if(1&c){let{unmount:e=!0,...n}=u;return nl(e?0:1,{0:()=>null,1:()=>il({...n,hidden:!0,style:{display:"none"}},t,r,s)})}return il(u,t,r,s)}function il(e,n={},t,r){let{as:o=t,children:i,refName:s="ref",...u}=al(e,["unmount","static"]),c=void 0!==e.ref?{[s]:e.ref}:{},a="function"==typeof i?i(n):i;"className"in u&&u.className&&"function"==typeof u.className&&(u.className=u.className(n));let l={};if(n){let e=!1,t=[];for(let[r,o]of Object.entries(n))"boolean"==typeof o&&(e=!0),!0===o&&t.push(r);e&&(l["data-headlessui-state"]=t.join(" "))}if(o===St&&Object.keys(cl(u)).length>0){if(!oo(a)||Array.isArray(a)&&a.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(u).map((e=>` - ${e}`)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((e=>` - ${e}`)).join("\n")].join("\n"));let e=a.props,n="function"==typeof(null==e?void 0:e.className)?(...n)=>el(null==e?void 0:e.className(...n),u.className):el(null==e?void 0:e.className,u.className),t=n?{className:n}:{};return io(a,Object.assign({},sl(a.props,cl(al(u,["ref"]))),l,c,function(...e){return{ref:e.every((e=>null==e))?void 0:n=>{for(let t of e)null!=t&&("function"==typeof t?t(n):t.current=n)}}}(a.ref,c.ref),t))}return Ct(o,Object.assign({},al(u,["ref"]),o!==St&&c,o!==St&&l),a)}function sl(...e){if(0===e.length)return{};if(1===e.length)return e[0];let n={},t={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=t[e]||(t[e]=[]),t[e].push(r[e])):n[e]=r[e];if(n.disabled||n["aria-disabled"])return Object.assign(n,Object.fromEntries(Object.keys(t).map((e=>[e,void 0]))));for(let e in t)Object.assign(n,{[e](n,...r){let o=t[e];for(let e of o){if((n instanceof Event||(null==n?void 0:n.nativeEvent)instanceof Event)&&n.defaultPrevented)return;e(n,...r)}}});return n}function ul(e){var n;return Object.assign(Nr(e),{displayName:null!=(n=e.displayName)?n:e.name})}function cl(e){let n=Object.assign({},e);for(let e in n)void 0===n[e]&&delete n[e];return n}function al(e,n=[]){let t=Object.assign({},e);for(let e of n)e in t&&delete t[e];return t}let ll=Zt(null);ll.displayName="OpenClosedContext";var fl=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(fl||{});function dl(){return mr(ll)}function hl({value:e,children:n}){return uo.createElement(ll.Provider,{value:e},n)}var pl=Object.defineProperty,ml=(e,n,t)=>(((e,n,t)=>{n in e?pl(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t})(e,"symbol"!=typeof n?n+"":n,t),t);let gl=new class{constructor(){ml(this,"current",this.detect()),ml(this,"handoffState","pending"),ml(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}},wl=(e,n)=>{gl.isServer?lr(e,n):fr(e,n)};function _l(){let e=dr(!1);return wl((()=>(e.current=!0,()=>{e.current=!1})),[]),e}function yl(e){let n=dr(e);return wl((()=>{n.current=e}),[e]),n}function vl(){let[e,n]=cr(gl.isHandoffComplete);return e&&!1===gl.isHandoffComplete&&n(!1),lr((()=>{!0!==e&&n(!0)}),[e]),lr((()=>gl.handoff()),[]),e}let bl=function(e){let n=yl(e);return uo.useCallback(((...e)=>n.current(...e)),[n])},Cl=Symbol();function xl(...e){let n=dr(e);lr((()=>{n.current=e}),[e]);let t=bl((e=>{for(let t of n.current)null!=t&&("function"==typeof t?t(e):t.current=e)}));return e.every((e=>null==e||(null==e?void 0:e[Cl])))?void 0:t}function Sl(){let e=[],n={addEventListener:(e,t,r,o)=>(e.addEventListener(t,r,o),n.add((()=>e.removeEventListener(t,r,o)))),requestAnimationFrame(...e){let t=requestAnimationFrame(...e);return n.add((()=>cancelAnimationFrame(t)))},nextFrame:(...e)=>n.requestAnimationFrame((()=>n.requestAnimationFrame(...e))),setTimeout(...e){let t=setTimeout(...e);return n.add((()=>clearTimeout(t)))},microTask(...e){let t={current:!0};return function(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}((()=>{t.current&&e[0]()})),n.add((()=>{t.current=!1}))},style(e,n,t){let r=e.style.getPropertyValue(n);return Object.assign(e.style,{[n]:t}),this.add((()=>{Object.assign(e.style,{[n]:r})}))},group(e){let n=Sl();return e(n),this.add((()=>n.dispose()))},add:n=>(e.push(n),()=>{let t=e.indexOf(n);if(t>=0)for(let n of e.splice(t,1))n()}),dispose(){for(let n of e.splice(0))n()}};return n}function El(e,...n){e&&n.length>0&&e.classList.add(...n)}function kl(e,...n){e&&n.length>0&&e.classList.remove(...n)}function Il(){let[e]=cr(Sl);return lr((()=>()=>e.dispose()),[e]),e}function Al(e=""){return e.split(" ").filter((e=>e.trim().length>1))}let Nl=Zt(null);Nl.displayName="TransitionContext";var Tl=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Tl||{});let Dl=Zt(null);function Pl(e){return"children"in e?Pl(e.children):e.current.filter((({el:e})=>null!==e.current)).filter((({state:e})=>"visible"===e)).length>0}function Ol(e,n){let t=yl(e),r=dr([]),o=_l(),i=Il(),s=bl(((e,n=rl.Hidden)=>{let s=r.current.findIndex((({el:n})=>n===e));-1!==s&&(nl(n,{[rl.Unmount](){r.current.splice(s,1)},[rl.Hidden](){r.current[s].state="hidden"}}),i.microTask((()=>{var e;!Pl(r)&&o.current&&(null==(e=t.current)||e.call(t))})))})),u=bl((e=>{let n=r.current.find((({el:n})=>n===e));return n?"visible"!==n.state&&(n.state="visible"):r.current.push({el:e,state:"visible"}),()=>s(e,rl.Unmount)})),c=dr([]),a=dr(Promise.resolve()),l=dr({enter:[],leave:[],idle:[]}),f=bl(((e,t,r)=>{c.current.splice(0),n&&(n.chains.current[t]=n.chains.current[t].filter((([n])=>n!==e))),null==n||n.chains.current[t].push([e,new Promise((e=>{c.current.push(e)}))]),null==n||n.chains.current[t].push([e,new Promise((e=>{Promise.all(l.current[t].map((([e,n])=>n))).then((()=>e()))}))]),"enter"===t?a.current=a.current.then((()=>null==n?void 0:n.wait.current)).then((()=>r(t))):r(t)})),d=bl(((e,n,t)=>{Promise.all(l.current[n].splice(0).map((([e,n])=>n))).then((()=>{var e;null==(e=c.current.shift())||e()})).then((()=>t(n)))}));return hr((()=>({children:r,register:u,unregister:s,onStart:f,onStop:d,wait:a,chains:l})),[u,s,r,f,d,l,a])}function Ml(){}Dl.displayName="NestingContext";let Ul=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Ll(e){var n;let t={};for(let r of Ul)t[r]=null!=(n=e[r])?n:Ml;return t}let Bl=tl.RenderStrategy,Fl=ul((function(e,n){let{show:t,appear:r=!1,unmount:o,...i}=e,s=dr(null),u=xl(s,n);vl();let c=dl();if(void 0===t&&null!==c&&(t=(c&fl.Open)===fl.Open),![!0,!1].includes(t))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[a,l]=cr(t?"visible":"hidden"),f=Ol((()=>{l("hidden")})),[d,h]=cr(!0),p=dr([t]);wl((()=>{!1!==d&&p.current[p.current.length-1]!==t&&(p.current.push(t),h(!1))}),[p,t]);let m=hr((()=>({show:t,appear:r,initial:d})),[t,r,d]);lr((()=>{if(t)l("visible");else if(Pl(f)){let e=s.current;if(!e)return;let n=e.getBoundingClientRect();0===n.x&&0===n.y&&0===n.width&&0===n.height&&l("hidden")}else l("hidden")}),[t,f]);let g={unmount:o};return uo.createElement(Dl.Provider,{value:f},uo.createElement(Nl.Provider,{value:m},ol({ourProps:{...g,as:St,children:uo.createElement(Gl,{ref:u,...g,...i})},theirProps:{},defaultTag:St,features:Bl,visible:"visible"===a,name:"Transition"})))})),Gl=ul((function(e,n){let{beforeEnter:t,afterEnter:r,beforeLeave:o,afterLeave:i,enter:s,enterFrom:u,enterTo:c,entered:a,leave:l,leaveFrom:f,leaveTo:d,...h}=e,p=dr(null),m=xl(p,n),g=h.unmount?rl.Unmount:rl.Hidden,{show:w,appear:_,initial:y}=function(){let e=mr(Nl);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),[v,b]=cr(w?"visible":"hidden"),C=function(){let e=mr(Dl);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),{register:x,unregister:S}=C,E=dr(null);lr((()=>x(p)),[x,p]),lr((()=>{if(g===rl.Hidden&&p.current)return w&&"visible"!==v?void b("visible"):nl(v,{hidden:()=>S(p),visible:()=>x(p)})}),[v,p,x,S,w,g]);let k=yl({enter:Al(s),enterFrom:Al(u),enterTo:Al(c),entered:Al(a),leave:Al(l),leaveFrom:Al(f),leaveTo:Al(d)}),I=function(e){let n=dr(Ll(e));return lr((()=>{n.current=Ll(e)}),[e]),n}({beforeEnter:t,afterEnter:r,beforeLeave:o,afterLeave:i}),A=vl();lr((()=>{if(A&&"visible"===v&&null===p.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[p,v,A]);let N=y&&!_,T=!A||N||E.current===w?"idle":w?"enter":"leave",D=function(e=0){let[n,t]=cr(e),r=_l(),o=pr((e=>{r.current&&t((n=>n|e))}),[n,r]),i=pr((e=>Boolean(n&e)),[n]),s=pr((e=>{r.current&&t((n=>n&~e))}),[t,r]),u=pr((e=>{r.current&&t((n=>n^e))}),[t]);return{flags:n,addFlag:o,hasFlag:i,removeFlag:s,toggleFlag:u}}(0),P=bl((e=>nl(e,{enter:()=>{D.addFlag(fl.Opening),I.current.beforeEnter()},leave:()=>{D.addFlag(fl.Closing),I.current.beforeLeave()},idle:()=>{}}))),O=bl((e=>nl(e,{enter:()=>{D.removeFlag(fl.Opening),I.current.afterEnter()},leave:()=>{D.removeFlag(fl.Closing),I.current.afterLeave()},idle:()=>{}}))),M=Ol((()=>{b("hidden"),S(p)}),C);(function({container:e,direction:n,classes:t,onStart:r,onStop:o}){let i=_l(),s=Il(),u=yl(n);wl((()=>{let n=Sl();s.add(n.dispose);let c=e.current;if(c&&"idle"!==u.current&&i.current)return n.dispose(),r.current(u.current),n.add(function(e,n,t,r){let o=t?"enter":"leave",i=Sl(),s=void 0!==r?function(e){let n={called:!1};return(...t)=>{if(!n.called)return n.called=!0,e(...t)}}(r):()=>{};"enter"===o&&(e.removeAttribute("hidden"),e.style.display="");let u=nl(o,{enter:()=>n.enter,leave:()=>n.leave}),c=nl(o,{enter:()=>n.enterTo,leave:()=>n.leaveTo}),a=nl(o,{enter:()=>n.enterFrom,leave:()=>n.leaveFrom});return kl(e,...n.enter,...n.enterTo,...n.enterFrom,...n.leave,...n.leaveFrom,...n.leaveTo,...n.entered),El(e,...u,...a),i.nextFrame((()=>{kl(e,...a),El(e,...c),function(e,n){let t=Sl();if(!e)return t.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[i,s]=[r,o].map((e=>{let[n=0]=e.split(",").filter(Boolean).map((e=>e.includes("ms")?parseFloat(e):1e3*parseFloat(e))).sort(((e,n)=>n-e));return n})),u=i+s;if(0!==u){t.group((t=>{t.setTimeout((()=>{n(),t.dispose()}),u),t.addEventListener(e,"transitionrun",(e=>{e.target===e.currentTarget&&t.dispose()}))}));let r=t.addEventListener(e,"transitionend",(e=>{e.target===e.currentTarget&&(n(),r())}))}else n();t.add((()=>n())),t.dispose}(e,(()=>(kl(e,...u),El(e,...n.entered),s())))})),i.dispose}(c,t.current,"enter"===u.current,(()=>{n.dispose(),o.current(u.current)}))),n.dispose}),[n])})({container:p,classes:k,direction:T,onStart:yl((e=>{M.onStart(p,e,P)})),onStop:yl((e=>{M.onStop(p,e,O),"leave"===e&&!Pl(M)&&(b("hidden"),S(p))}))}),lr((()=>{N&&(g===rl.Hidden?E.current=null:E.current=w)}),[w,N,v]);let U=h,L={ref:m};return _&&w&&(U={...U,className:el(h.className,...k.current.enter,...k.current.enterFrom)}),uo.createElement(Dl.Provider,{value:M},uo.createElement(hl,{value:nl(v,{visible:fl.Open,hidden:fl.Closed})|D.flags},ol({ourProps:L,theirProps:U,defaultTag:"div",features:Bl,visible:"visible"===v,name:"Transition.Child"})))})),Rl=ul((function(e,n){let t=null!==mr(Nl),r=null!==dl();return uo.createElement(uo.Fragment,null,!t&&r?uo.createElement(Fl,{ref:n,...e}):uo.createElement(Gl,{ref:n,...e}))})),Hl=Object.assign(Fl,{Child:Rl,Root:Fl});class jl extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Key","Appear","Show","ClassName","Enter","EnterFrom","EnterTo","Leave","LeaveFrom","LeaveTo","Children"]}}function $l(e){const n=qn(e,1);return Ct(Hl,n)}function Wl(e,n){let t;return Ct("div",E(pn([["className","px-4 py-4 sm:px-0"],(t=[Ct("h3",{className:"text-lg font-semibold leading-7 text-gray-900",children:e}),re(oe((e=>Ct("p",{className:"mt-1 max-w-2xl text-sm leading-6 text-gray-500",children:e})),n),null)],["children",co.Children.toArray(Array.from(t))])])))}function zl(e,n){let t;return Ct("div",E(pn([["className","px-4 py-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0"],(t=[Ct("dt",{className:"text-sm font-medium leading-6 text-gray-700",children:e}),Ct("dd",{className:"px-1 mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0",children:n})],["children",co.Children.toArray(Array.from(t))])])))}function Vl(e){let n,t;const r=e.value,o=e.label,i=xo(!1),s=i[0],u=i[1];return _o((()=>{Mo(Ao.Delay((()=>s?Ao.Bind((2e3,Io((e=>{let n;const t=setTimeout((()=>{e.cancelToken.removeListener(n),e.onSuccess(void 0)}),2e3);n=e.cancelToken.addListener((()=>{clearTimeout(t),e.onCancel(new Eo)}))}))),(()=>(u(!1),Ao.Zero()))):Ao.Zero())))})),Ct("div",E(pn([["className","px-4 py-2 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0"],(n=[Ct("dt",{className:"text-sm font-medium leading-6 text-gray-700",children:o}),Ct("dd",E(pn([["className","flex mt-1 text-sm leading-6 text-primary-700 sm:col-span-2 sm:mt-0 relative"],(t=[$l(pn([new jl(3,"absolute bottom-8 flex flex-row bg-gray-900 items-start w-[69px] h-8 shadow-md px-3 py-2 rounded-md"),new jl(2,s),new jl(4,"transition-opacity ease-in duration-100"),new jl(5,"opacity-0"),new jl(6,"opacity-90"),new jl(7,"transition-opacity ease-out duration-500"),new jl(8,"opacity-90"),new jl(9,"opacity-0"),new jl(10,[Ct("div",{className:"w-[45px] h-4 not-italic font-medium text-xs leading-4 text-white flex-none order-none grow-0",children:"Copied"})])])),Ct("div",{className:"px-1 cursor-pointer hover:text-primary-900 hover:bg-gray-300 rounded-md shrink",children:r})],["children",co.Children.toArray(Array.from(t))]),["onClick",e=>{navigator.clipboard.writeText(r),u(!0)}]])))],["children",co.Children.toArray(Array.from(n))])])))}function ql(e,n){let t;const r=pn([e,Ct("div",E(pn([["className","mt-2 border-b border-gray-200"],(t=[Ct("dl",{className:"divide-y divide-gray-200 px-0 sm:px-4 max-w-2xl",children:co.Children.toArray(Array.from(n))})],["children",co.Children.toArray(Array.from(t))])])))]);return Ct("div",{children:co.Children.toArray(Array.from(r))})}function Zl(e){let n,t,r,o,i,s;return ql(Wl("Partner Information",void 0),pn([(n=["ID",Fo(e.StreamId)],Ct(Vl,{label:n[0],value:n[1]})),(t=["Name",ri(e.Name)],zl(t[0],t[1])),(r=["Contact",`${ii(e.ContactDetails.FirstName)} ${si(e.ContactDetails.LastName)}`],zl(r[0],r[1])),(o=["Phone",ci(e.ContactDetails.MobilePhone)],zl(o[0],o[1])),(i=["Website",oi(e.Website)],zl(i[0],i[1])),(s=["Notes",re((u=e.Notes,null!=u?u.fields[0]:void 0),"")],zl(s[0],s[1]))]));var u}class Jl extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Details","AccountList","SuperConfiguration","BenefitsOnboardingConfiguration","BankDetailsConfiguration","ProfileDirectory"]}}class Kl extends P{constructor(e,n,t){super(),this.PartnerId=e,this.BackendUrl=n,this.AccessToken=t}}class Yl extends P{constructor(e,n,t){super(),this.PartnerId=e,this.BackendUrl=n,this.AccessToken=t}}class Xl extends P{constructor(e,n,t){super(),this.PartnerId=e,this.BackendUrl=n,this.AccessToken=t}}class Ql extends P{constructor(e,n,t){super(),this.PartnerId=e,this.BackendUrl=n,this.AccessToken=t}}function ef(e){let n,t,r,o,i,s;return ha(1===e.tag?(n=e.fields[0],pn([da("Details",yi($i(new Hi(1,n.partnerId)),1)),da("Accounts",void 0),da("Super",yi($i(new Hi(4,n.partnerId)),1)),da("Benefits",yi($i(new Hi(5,n.partnerId)),1)),da("Bank Details",yi($i(new Hi(6,n.partnerId)),1)),da("Directory",yi($i(new Hi(2,n.partnerId)),1))])):2===e.tag?(t=e.fields[0].PartnerId,pn([da("Details",yi($i(new Hi(1,t)),1)),da("Accounts",yi($i(new Hi(3,t)),1)),da("Super",void 0),da("Benefits",yi($i(new Hi(5,t)),1)),da("Bank Details",yi($i(new Hi(6,t)),1)),da("Directory",yi($i(new Hi(2,t)),1))])):3===e.tag?(r=e.fields[0].PartnerId,pn([da("Details",yi($i(new Hi(1,r)),1)),da("Accounts",yi($i(new Hi(3,r)),1)),da("Super",yi($i(new Hi(4,r)),1)),da("Benefits",void 0),da("Bank Details",yi($i(new Hi(6,r)),1)),da("Directory",yi($i(new Hi(2,r)),1))])):4===e.tag?(o=e.fields[0].PartnerId,pn([da("Details",yi($i(new Hi(1,o)),1)),da("Accounts",yi($i(new Hi(3,o)),1)),da("Super",yi($i(new Hi(4,o)),1)),da("Benefits",yi($i(new Hi(5,o)),1)),da("Bank Details",void 0),da("Directory",yi($i(new Hi(2,o)),1))])):5===e.tag?(i=e.fields[0].PartnerId,pn([da("Details",yi($i(new Hi(1,i)),1)),da("Accounts",yi($i(new Hi(3,i)),1)),da("Super",yi($i(new Hi(4,i)),1)),da("Benefits",yi($i(new Hi(5,i)),1)),da("Bank Details",yi($i(new Hi(6,i)),1)),da("Directory",void 0)])):(s=e.fields[0],pn([da("Details",void 0),da("Accounts",yi($i(new Hi(3,Z(Fo(s.StreamId)))),1)),da("Super",yi($i(new Hi(4,Z(Fo(s.StreamId)))),1)),da("Benefits",yi($i(new Hi(5,Z(Fo(s.StreamId)))),1)),da("Bank Details",yi($i(new Hi(6,Z(Fo(s.StreamId)))),1)),da("Directory",yi($i(new Hi(2,Z(Fo(s.StreamId)))),1))])))}function nf(e){switch(e.tag){case 1:{const n=e.fields[0];return Ct(za,{accessToken:n.accessToken,backendUrl:n.backendUrl,partnerId:n.partnerId})}case 2:return Ct(qa,{partnerId:e.fields[0].PartnerId,accountId:void 0,backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken});case 3:return Ct(Ja,{partnerId:e.fields[0].PartnerId,accountId:void 0,backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken});case 4:return Ct(Ya,{partnerId:e.fields[0].PartnerId,accountId:void 0,backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken});case 5:return Ct(Qa,{partnerId:e.fields[0].PartnerId,accountId:void 0,backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken});default:return Ct(Zl,e.fields[0])}}function tf(e){let n;const t=e.mode;return Ct("div",E(rn((n=[ef(t),nf(t)],["children",co.Children.toArray(Array.from(n))]))))}class rf extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["backend-url","access-token","account-id"]}}function of(e){const n=Bn((e=>e),[new rf(1,e.accessToken),new rf(0,e.backendUrl),oe((e=>new rf(2,Y(e))),e.accountId)]);return Ct("superhero-salpac-profile-admin",qn(n,1))}function sf(e){let n,t,r,o,i,s,u;return ql(Wl("Account Information",void 0),pn([(n=["ID",e.StreamId],Ct(Vl,{label:n[0],value:n[1]})),(t=["Name",e.Name],Ct(Vl,{label:t[0],value:t[1]})),(r=["External ID",re(e.ExternalId,"")],zl(r[0],r[1])),(o=["Channel ID",re(e.ChannelId,"")],zl(o[0],o[1])),(i=["Contact",`${e.ContactDetails.FirstName} ${e.ContactDetails.LastName}`],zl(i[0],i[1])),(s=["Phone",e.ContactDetails.MobilePhone],zl(s[0],s[1])),(u=["Email",e.ContactDetails.Email],zl(u[0],u[1]))]))}function uf(e){let n,t,r,o,i,s,u;if(null==e)return null;{const c=e;return ql(Wl("Legal Entity",void 0),pn([(n=["Business Name",c.BusinessName],zl(n[0],n[1])),(t=["Business Number",c.BusinessNumber],zl(t[0],t[1])),(r=["Address Line 1",c.Address1],zl(r[0],r[1])),(o=["Address Line 2",re(c.Address2,"")],zl(o[0],o[1])),(i=["City",c.City],zl(i[0],i[1])),(s=["State",re(c.State,"")],zl(s[0],s[1])),(u=["Postcode",c.Postcode],zl(u[0],u[1]))]))}}function cf(e){let n;if(null==e)return null;{const t=e;return ql(Wl("Legal Entity",void 0),rn((n=["Notes",t],zl(n[0],n[1]))))}}function af(e){const n=pn([sf(e),uf(e.LegalEntity),cf(e.Notes)]);return Ct("div",{children:co.Children.toArray(Array.from(n))})}class lf extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Details","ProfilesDirectory","SuperConfiguration","BenefitsOnboardingConfiguration","BankDetailsConfiguration","SalaryPackagingConfiguration"]}}function ff(e,n,t){let r,o,i,s,u,c,a,l,f,d,h,p,m,g,w,_,y,v,b,C,x,S,E,k,I,A,N,T,D,P;const O=[e,n];return ha(1===t.tag?pn([da("Details",yi($i((r=O,new Hi(7,r[0],r[1]))),1)),da("Directory",void 0),da("Super",yi($i((o=O,new Hi(9,o[0],o[1]))),1)),da("Benefits",yi($i((i=O,new Hi(10,i[0],i[1]))),1)),da("Bank Details",yi($i((s=O,new Hi(11,s[0],s[1]))),1)),da("Salary Packaging",yi($i((u=O,new Hi(12,u[0],u[1]))),1))]):2===t.tag?pn([da("Details",yi($i((c=O,new Hi(7,c[0],c[1]))),1)),da("Directory",yi($i((a=O,new Hi(8,a[0],a[1]))),1)),da("Super",void 0),da("Benefits",yi($i((l=O,new Hi(10,l[0],l[1]))),1)),da("Bank Details",yi($i((f=O,new Hi(11,f[0],f[1]))),1)),da("Salary Packaging",yi($i((d=O,new Hi(12,d[0],d[1]))),1))]):3===t.tag?pn([da("Details",yi($i((h=O,new Hi(7,h[0],h[1]))),1)),da("Directory",yi($i((p=O,new Hi(8,p[0],p[1]))),1)),da("Super",yi($i((m=O,new Hi(9,m[0],m[1]))),1)),da("Benefits",void 0),da("Bank Details",yi($i((g=O,new Hi(11,g[0],g[1]))),1)),da("Salary Packaging",yi($i((w=O,new Hi(12,w[0],w[1]))),1))]):4===t.tag?pn([da("Details",yi($i((_=O,new Hi(7,_[0],_[1]))),1)),da("Directory",yi($i((y=O,new Hi(8,y[0],y[1]))),1)),da("Super",yi($i((v=O,new Hi(9,v[0],v[1]))),1)),da("Benefits",yi($i((b=O,new Hi(10,b[0],b[1]))),1)),da("Bank Details",void 0),da("Salary Packaging",yi($i((C=O,new Hi(12,C[0],C[1]))),1))]):5===t.tag?pn([da("Details",yi($i((x=O,new Hi(7,x[0],x[1]))),1)),da("Directory",yi($i((S=O,new Hi(8,S[0],S[1]))),1)),da("Super",yi($i((E=O,new Hi(9,E[0],E[1]))),1)),da("Benefits",yi($i((k=O,new Hi(10,k[0],k[1]))),1)),da("Bank Details",yi($i((I=O,new Hi(11,I[0],I[1]))),1)),da("Salary Packaging",void 0)]):pn([da("Details",void 0),da("Directory",yi($i((A=O,new Hi(8,A[0],A[1]))),1)),da("Super",yi($i((N=O,new Hi(9,N[0],N[1]))),1)),da("Benefits",yi($i((T=O,new Hi(10,T[0],T[1]))),1)),da("Bank Details",yi($i((D=O,new Hi(11,D[0],D[1]))),1)),da("Salary Packaging",yi($i((P=O,new Hi(12,P[0],P[1]))),1))]))}function df(e,n,t){switch(n.tag){case 1:{const n=e.accountDetails;return Ct(Qa,{partnerId:n[0],accountId:n[1],backendUrl:e.backendUrl,accessToken:e.accessToken})}case 2:{const n=e.accountDetails;return Ct(qa,{partnerId:n[0],accountId:n[1],backendUrl:e.backendUrl,accessToken:e.accessToken})}case 3:{const n=e.accountDetails;return Ct(Ja,{partnerId:n[0],accountId:n[1],backendUrl:e.backendUrl,accessToken:e.accessToken})}case 4:{const n=e.accountDetails;return Ct(Ya,{partnerId:n[0],accountId:n[1],backendUrl:e.backendUrl,accessToken:e.accessToken})}case 5:return Ct(of,{accountId:e.accountDetails[1],backendUrl:e.backendUrl,accessToken:e.accessToken});default:{let e,n,r;switch(0===t.tag||1===t.tag?e=2:3===t.tag?(e=3,r=t.fields[0]):0===t.fields[0].tag?(e=0,n=t.fields[0].fields[0]):e=1,e){case 0:return Ct(af,n);case 1:return Ct($a,{error:"There was an error retrieving account "});case 2:return Ct(Wa,null);case 3:return Ct($a,{error:T(r)})}}}}function hf(e){let n,t;const r=e.account,o=e.mode,i=e.props;return Ct("div",E(rn((n=[(t=i.accountDetails,ff(t[0],t[1],o)),df(i,o,r)],["children",co.Children.toArray(Array.from(n))]))))}function pf(e){const n=(t=e=>e.Name,r=e.partnerList,o={Compare:x},function(e,n){const t=an(n);return t.sort(e),pn(t)}(((e,n)=>o.Compare(t(e),t(n))),r));var t,r,o;const i=xo(n),s=xo(""),u=pn([Ia("ID"),Ia("Name"),Ia("Contact"),Ia("Phone"),Ia("Website")]),c=pn([ya(s[0],"Partner ID or Name",(e=>{s[1](e),i[1](function(e,n){return function(e,n){const t=Je(),r=ln(((n,t)=>{if(e(t)){const e=new qe(t,void 0);return n.tail=e,e}return n}),t,n),o=Je();return r.tail=o,en(t)}((n=>Fo(n.StreamId).toLocaleLowerCase().indexOf(e)>=0||ri(n.Name).toLocaleLowerCase().indexOf(e)>=0),n)}(e,n))}),(()=>{})),Ta(u,wn((e=>{let n;const t=Fo(e.StreamId);return pn([(n=[yi($i(new Hi(1,Z(t))),1),t],Aa(n[0],n[1])),Na(["text-gray-500"],ri(e.Name)),Na(["text-gray-500"],`${ii(e.ContactDetails.FirstName)} ${si(e.ContactDetails.LastName)}`),Na(["text-gray-500"],ci(e.ContactDetails.MobilePhone)),Na(["text-gray-500"],oi(e.Website))])}),i[0]))]);return Ct("div",{children:co.Children.toArray(Array.from(c))})}function mf(){return(mf=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 gf(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 qt(n,t)}function wf(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=Ct(gf,mf({},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[_f(s[i].name)]=s[i].value);for(i=u.length;i--;){var c=e(u[i],null),a=u[i].slot;a?o[a]=Ct(bf,{name:a},c):r[i]=c}var l=t?Ct(bf,null,r):r;return Ct(t||n.nodeName.toLowerCase(),o,l)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?Vt:zt)(this._vdom,this._root)}function _f(e){return e.replace(/-(\w)/g,(function(e,n){return n?n.toUpperCase():""}))}function yf(e,n,t){if(this._vdom){var r={};r[e]=t=null==t?void 0:t,r[_f(e)]=t,this._vdom=qt(this._vdom,r),zt(this._vdom,this._root)}}function vf(){zt(this._vdom=null,this._root)}function bf(e,n){var t=this;return Ct("slot",mf({},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)}}))}class Cf extends P{constructor(e,n,t){super(),this.Partners=e,this.Accounts=n,this.CurrentPage=t}}class xf extends D{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["PageChanged","GetAccountName","AppendAccount","LoadPartners"]}}function Sf(){const e=ji(bi(window.location.hash,1)),n=13===e.tag?Wi(new Hi(0)):Ji();return[new Cf(new Uo(0),new Kn([],{Equals:y,GetHashCode:g}),e),n]}function Ef(e){let n,t;const r=is(Sf,((n,t)=>function(e,n,t){switch(n.tag){case 1:{const r=n.fields[0];return[t,Yi(e,r,(e=>new xf(2,r,new Uo(2,new st(0,e)))),(e=>new xf(2,r,new Uo(2,new st(1,"Failed to retrieve account name")))))]}case 2:return[new Cf(t.Partners,(r=t.Accounts,o=n.fields[0],i=n.fields[1],function(e,n,t){if(e.has(n))throw new Error("An item with the same key has already been added. Key: "+n);e.set(n,t)}(r,o,i),r),t.CurrentPage),Ji()];case 0:{const e=n.fields[0];return 13===e.tag?[t,Wi(e)]:[new Cf(t.Partners,t.Accounts,e),Ji()]}default:return[new Cf(n.fields[0],t.Accounts,t.CurrentPage),Ji()]}var r,o,i}((n=>{const t=function(e){const n=function(e){return[e.fields[0],e.fields[1]]}(e);return[n[0],n[1]]}(n);return function(e,n,t,r){const o=q(t),i=Y(r);return Ao.Delay((()=>{let t;const r=na(n,Vs(new ss(0),zs((t=ea(e),`${t}/partners/${o}/accounts/${i}`))));return Ao.Bind(r,(e=>{const n=e;if(1===n.tag)return Ao.Return(new st(1,n.fields[0]));{const e=n.fields[0];if(200===e.statusCode){const n=Ac(I(2,Zc($o("Dto.AdminApi.Account",[],Kc,(()=>[["StreamId",qo],["PartnerId",qo],["Name",qo],["Website",qo],["ContactDetails",li()],["Notes",Wo(qo)],["LegalEntity",Wo($o("Dto.Primitives.LegalEntity",[],hi,(()=>[["BusinessName",qo],["BusinessNumber",qo],["Address1",qo],["Address2",Wo(qo)],["City",qo],["Postcode",qo],["State",Wo(qo)],["Phone",qo],["CountryCode",Wo(qo)]])))],["ExternalId",Wo(qo)],["ChannelId",Wo(qo)]])),new Ks(1),void 0)),e.responseText);return Ao.Return(n)}return Ao.Return(new st(1,"Unexpected response from backend"))}}))}))}(e.backendUrl,e.accessToken,t[0],t[1])}),n,t)),[]),o=r[0],i=r[1];go(Lo((()=>ta(e.backendUrl,e.accessToken)),(e=>{i(new xf(3,e))})));const s=e=>{let n;const t=o.Partners;return 0===t.tag?new Uo(0):1===t.tag?new Uo(1):3===t.tag?new Uo(3,t.fields[0]):1===t.fields[0].tag?new Uo(2,new st(1,Ue(Oe("Unknown partner: %A%P()",[e])))):new Uo(2,(n=Ri(t.fields[0].fields[0],e),null==n?new st(1,Ue(Oe("Unknown partner: %A%P()",[e]))):new st(0,n.Name)))},u=e=>Ct(aa,{account:void 0,page:o.CurrentPage,partner:{Id:e,Name:s(e)}}),c=(e,n)=>{const t=Ct(tf,{mode:n});return[u(e),t]},a=n=>{const t=n[0],r=n[1];return n=>{let u,c,a,l,f;const d=[t,r];var h,p;let m;return f=new Bi(0,d[0],d[1]),h=function(e,n){let t,r=null;return t=[Zn(e,n,new O((()=>r),(e=>{r=e}))),r],t[0]?t[1]:void 0}(o.Accounts,f),p=()=>(i(new xf(1,f)),new Uo(1)),l=null!=h?ne(h):p(),m=Ct(hf,{props:{accessToken:e.accessToken,accountDetails:[t,r],backendUrl:e.backendUrl},mode:n,account:l}),[(u=[t,r,l],c=u[0],Ct(aa,(a={Id:c,Name:s(c)},{account:{Id:u[1],Name:zi((e=>B(e.Name)),u[2])},page:o.CurrentPage,partner:a}))),m]}};let l;const f=o.Partners;let d,h,p,m;switch(1===f.tag?d=0:2===f.tag?1===f.fields[0].tag?(d=2,p=f.fields[0].fields[0]):(d=1,h=f.fields[0].fields[0]):3===f.tag?(d=3,m=f.fields[0]):d=0,d){case 0:l=[Ct(Wa,null),Ct(Wa,null)];break;case 1:{const t=o.CurrentPage;switch(t.tag){case 1:{const e=t.fields[0],r=u(e),o=Ri(h,e);l=null==o?[r,Ct($a,{error:"Unknown Partner"})]:[r,(n=new Jl(0,o),Ct(tf,{mode:n}))];break}case 3:{const n=t.fields[0];l=c(n,new Jl(1,{accessToken:e.accessToken,backendUrl:e.backendUrl,partnerId:n}));break}case 4:{const n=t.fields[0];l=c(n,new Jl(2,new Kl(n,e.backendUrl,e.accessToken)));break}case 5:{const n=t.fields[0];l=c(n,new Jl(3,new Yl(n,e.backendUrl,e.accessToken)));break}case 6:{const n=t.fields[0];l=c(n,new Jl(4,new Xl(n,e.backendUrl,e.accessToken)));break}case 2:{const n=t.fields[0];l=c(n,new Jl(5,new Ql(n,e.backendUrl,e.accessToken)));break}case 7:l=a([t.fields[0],t.fields[1]])(new lf(0));break;case 8:l=a([t.fields[0],t.fields[1]])(new lf(1));break;case 9:l=a([t.fields[0],t.fields[1]])(new lf(2));break;case 10:l=a([t.fields[0],t.fields[1]])(new lf(3));break;case 11:l=a([t.fields[0],t.fields[1]])(new lf(4));break;case 12:l=a([t.fields[0],t.fields[1]])(new lf(5));break;default:l=[Ct(aa,{account:void 0,page:o.CurrentPage,partner:void 0}),Ct(pf,{partnerList:h})]}break}case 2:l=[Ct(aa,{account:void 0,page:o.CurrentPage,partner:void 0}),Ct($a,{error:p})];break;case 3:l=[Ct(aa,{account:void 0,page:o.CurrentPage,partner:void 0}),(t=T(m),Ct($a,{error:t}))]}return Ci({onUrlChanged:e=>{i(new xf(0,ji(e)))},application:Ct(St,{},l[0],l[1])})}!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=wf,o.prototype.attributeChangedCallback=yf,o.prototype.disconnectedCallback=vf,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("superhero-account-registry",o)}((e=>Ct(Ef,e)))})();
|