@flarehr/superhero-account-registry 2.54.72 → 2.56.74

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,16 +1,16 @@
1
- (function(){"use strict";function Qt(e){return Array.isArray(e)||ArrayBuffer.isView(e)}function Sh(e){return e!=null&&typeof e.GetEnumerator=="function"}function kh(e){return e!=null&&typeof e.CompareTo=="function"}function Ah(e){return e!=null&&typeof e.Equals=="function"}function Xa(e){return e!=null&&typeof e.GetHashCode=="function"}function Ko(e){return e!=null&&typeof e.Dispose=="function"}function ye(e){Ko(e)&&e.Dispose()}function pe(){return null}function Vs(e,t){var n,r;return((n=Object.getPrototypeOf(e))==null?void 0:n.constructor)===((r=Object.getPrototypeOf(t))==null?void 0:r.constructor)}class Eh{constructor(t){this.iter=t,this.current=pe()}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current}"System.Collections.IEnumerator.get_Current"(){return this.current}"System.Collections.IEnumerator.MoveNext"(){const t=this.iter.next();return this.current=t.value,!t.done}"System.Collections.IEnumerator.Reset"(){throw new Error("JS iterators cannot be reset")}Dispose(){}}function Pe(e){return Sh(e)?e.GetEnumerator():new Eh(e[Symbol.iterator]())}function Jr(e){return{next(){const t=e["System.Collections.IEnumerator.MoveNext"](),n=t?e["System.Collections.Generic.IEnumerator`1.get_Current"]():void 0;return{done:!t,value:n}}}}class Ih{constructor(t){this.factory=t,this.isValueCreated=!1}get Value(){return this.isValueCreated||(this.createdValue=this.factory(),this.isValueCreated=!0),this.createdValue}get IsValueCreated(){return this.isValueCreated}}function ge(e,t){return e.toString(10).padStart(t,"0")}function Th(e,t,n){return e.toString(10).padStart(t,"0").padEnd(n,"0")}function Qa(e){const t=e;return typeof t.offset=="number"?t.offset:e.kind===1?0:e.getTimezoneOffset()*-6e4}function Nh(e,t){return e=e,e.toString(t)}function Hn(e,t){return e=e,e.toString(t)}class cn{static id(t){return cn.idMap.has(t)||cn.idMap.set(t,++cn.count),cn.idMap.get(t)}}cn.idMap=new WeakMap,cn.count=0;function yr(e){let t=0,n=5381;const r=e.length;for(;t<r;)n=n*33^e.charCodeAt(t++);return n}function Bt(e){return e*2654435761|0}function el(e){return yr(e.toString(32))}function Yr(e){let t=0;const n=e.length;for(let r=0;r<n;r++){const s=e[r];t=(t<<5)+t^s}return t}function Mh(e){if(e==null)return 0;switch(typeof e){case"boolean":return e?1:0;case"number":return Bt(e);case"bigint":return el(e);case"string":return yr(e);default:return Bt(cn.id(e))}}function Rh(e){return Xa(e)?e.GetHashCode():Mh(e)}function Ph(e){return e.getTime()}function Oh(e){const t=e.length,n=new Array(t);for(let r=0;r<t;r++)n[r]=un(e[r]);return Yr(n)}function un(e){var t;if(e==null)return 0;switch(typeof e){case"boolean":return e?1:0;case"number":return Bt(e);case"bigint":return el(e);case"string":return yr(e);default:{if(Xa(e))return e.GetHashCode();if(Qt(e))return Oh(e);if(e instanceof Date)return Ph(e);if(((t=Object.getPrototypeOf(e))==null?void 0:t.constructor)===Object){const n=Object.values(e).map(r=>un(r));return Yr(n)}else return Bt(cn.id(e))}}}function Dh(e){return Rh(e)}function Zo(e,t,n){if(e==null)return t==null;if(t==null||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function tl(e,t){return Zo(e,t,Be)}function Fh(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;n.sort(),r.sort();for(let s=0;s<n.length;s++)if(n[s]!==r[s]||!Be(e[n[s]],t[r[s]]))return!1;return!0}function Be(e,t){var n;return e===t?!0:e==null?t==null:t==null?!1:Ah(e)?e.Equals(t):Qt(e)?Qt(t)&&tl(e,t):typeof e!="object"?!1:e instanceof Date?t instanceof Date&&nl(e,t)===0:((n=Object.getPrototypeOf(e))==null?void 0:n.constructor)===Object&&Fh(e,t)}function nl(e,t){let n,r;return"offset"in e&&"offset"in t?(n=e.getTime(),r=t.getTime()):(n=e.getTime()+Qa(e),r=t.getTime()+Qa(t)),n===r?0:n<r?-1:1}function Xr(e,t){return e===t?0:e<t?-1:1}function Vh(e,t,n){if(e==null)return t==null?0:1;if(t==null)return-1;if(e.length!==t.length)return e.length<t.length?-1:1;for(let r=0,s=0;r<e.length;r++)if(s=n(e[r],t[r]),s!==0)return s;return 0}function rl(e,t){return Vh(e,t,Vt)}function Lh(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return n.length<r.length?-1:1;n.sort(),r.sort();for(let s=0,o=0;s<n.length;s++){const i=n[s];if(i!==r[s])return i<r[s]?-1:1;if(o=Vt(e[i],t[i]),o!==0)return o}return 0}function Vt(e,t){var n;return e===t?0:e==null?t==null?0:-1:t==null?1:kh(e)?e.CompareTo(t):Qt(e)?Qt(t)?rl(e,t):-1:typeof e!="object"?e<t?-1:1:e instanceof Date?t instanceof Date?nl(e,t):-1:((n=Object.getPrototypeOf(e))==null?void 0:n.constructor)===Object?Lh(e,t):-1}function P(e){const t={};for(const n of e)t[n[0]]=n[1];return t}function Bh(e){Qt(e)?e.splice(0):e.clear()}const Ls=new WeakMap;function be(e){if(e==null)return null;const t=(n,r)=>e(n)(r);return Ls.set(t,e),t}function kn(e){return Ls.get(e)??(t=>n=>e(t,n))}function Jo(e){if(e==null)return null;const t=(n,r,s)=>e(n)(r)(s);return Ls.set(t,e),t}function Yo(e){return Ls.get(e)??(t=>n=>r=>e(t,n,r))}function Uh(e){let t=0,n="[";for(const r of e){if(t===0)n+=pt(r);else if(t===100){n+="; ...";break}else n+="; "+pt(r);t++}return n+"]"}function pt(e,t=0){var n;if(e!=null&&typeof e=="object"){if(typeof e.toString=="function")return e.toString();if(Symbol.iterator in e)return Uh(e);{const r=(n=Object.getPrototypeOf(e))==null?void 0:n.constructor;return r===Object&&t<10?"{ "+Object.entries(e).map(([s,o])=>s+" = "+pt(o,t+1)).join(`
2
- `)+" }":(r==null?void 0:r.name)??""}}return String(e)}function zh(e,t){if(t.length===0)return e;{let n,r=!0;return t.length===1?(n=pt(t[0]),r=n.indexOf(" ")>=0):n=t.map(s=>pt(s)).join(", "),e+(r?" (":" ")+n+(r?")":"")}}class H{get name(){return this.cases()[this.tag]}toJSON(){return this.fields.length===0?this.name:[this.name].concat(this.fields)}toString(){return zh(this.name,this.fields)}GetHashCode(){const t=this.fields.map(n=>un(n));return t.splice(0,0,Bt(this.tag)),Yr(t)}Equals(t){return this===t?!0:Vs(this,t)&&this.tag===t.tag?tl(this.fields,t.fields):!1}CompareTo(t){return this===t?0:Vs(this,t)?this.tag===t.tag?rl(this.fields,t.fields):this.tag<t.tag?-1:1:-1}}function jh(e){const t={},n=Object.keys(e);for(let r=0;r<n.length;r++)t[n[r]]=e[n[r]];return t}function Hh(e){return"{ "+Object.entries(e).map(([t,n])=>t+" = "+pt(n)).join(`
3
- `)+" }"}function Wh(e){const t=Object.values(e).map(n=>un(n));return Yr(t)}function Gh(e,t){if(e===t)return!0;if(Vs(e,t)){const n=Object.keys(e);for(let r=0;r<n.length;r++)if(!Be(e[n[r]],t[n[r]]))return!1;return!0}else return!1}function qh(e,t){if(e===t)return 0;if(Vs(e,t)){const n=Object.keys(e);for(let r=0;r<n.length;r++){const s=Vt(e[n[r]],t[n[r]]);if(s!==0)return s}return 0}else return-1}class ee{toJSON(){return jh(this)}toString(){return Hh(this)}GetHashCode(){return Wh(this)}Equals(t){return Gh(this,t)}CompareTo(t){return qh(this,t)}}class $t{get contents(){return this.getter()}set contents(t){this.setter(t)}constructor(t,n){typeof n=="function"?(this.getter=t,this.setter=n):(this.getter=()=>t,this.setter=r=>{t=r})}}class Kh{constructor(t){this.message=t}}function Zh(e){return e instanceof Kh||e instanceof Error}function Jh(e){return e instanceof Promise}function Bs(e){return Zh(e)||Jh(e)?e:new Error(String(e))}const br=Symbol("numeric");function sl(e){return typeof e=="number"||typeof e=="bigint"||(e==null?void 0:e[br])}function Yh(e,t){return typeof e=="number"||typeof e=="bigint"?e<t?-1:e>t?1:0:e.CompareTo(t)}function Xo(e,t){return typeof e=="number"?e*t:typeof e=="bigint"?e*BigInt(t):e[br]().multiply(t)}function Us(e,t){return typeof e=="number"?e.toFixed(t):typeof e=="bigint"?e:e[br]().toFixed(t)}function zs(e,t){return typeof e=="number"?e.toPrecision(t):typeof e=="bigint"?e:e[br]().toPrecision(t)}function js(e,t){return typeof e=="number"?e.toExponential(t):typeof e=="bigint"?e:e[br]().toExponential(t)}function Hs(e){return typeof e=="number"?(Number(e)>>>0).toString(16):typeof e=="bigint"?BigInt.asUintN(64,e).toString(16):e[br]().toHex()}class Xh{constructor(t,n,r,s){this.declaringType=t,this.tag=n,this.name=r,this.fields=s}}class Ut{constructor(t,n,r,s,o,i,a){this.fullname=t,this.generics=n,this.construct=r,this.parent=s,this.fields=o,this.cases=i,this.enumCases=a}toString(){return Re(this)}GetHashCode(){return ol(this)}Equals(t){return Qo(this,t)}}function At(e){return e.generics!=null?e.generics:[]}function ol(e){const t=yr(e.fullname),n=At(e).map(ol);return Yr([t,...n])}function Qo(e,t){return e.fullname===""?t.fullname===""&&Zo(es(e),es(t),([n,r],[s,o])=>n===s&&Qo(r,o)):e.fullname===t.fullname&&Zo(At(e),At(t),Qo)}function ct(e,t,n,r){return new Ut(e,t,n,void 0,r)}function il(e,t,n,r){const s=new Ut(e,t,n,void 0,void 0,()=>{const o=n.prototype.cases();return r().map((i,a)=>new Xh(s,a,o[a],i))});return s}function we(e){return new Ut("Microsoft.FSharp.Core.FSharpOption`1",[e])}function ei(e){return new Ut("Microsoft.FSharp.Collections.FSharpList`1",[e])}function al(e){return new Ut("[]",[e])}const Qh=new Ut("System.Object"),j=new Ut("System.String");function _r(e){if(Array.isArray(e))return e[0];if(e instanceof Ut){const t=Qr(e);if(t!=null)return _r(t)+"[]";{const n=e.fullname.lastIndexOf(".");return n===-1?e.fullname:e.fullname.substr(n+1)}}else return e.name}function Re(e){const t=Qr(e);return t!=null?Re(t)+"[]":e.generics==null||e.generics.length===0?e.fullname:e.fullname+"["+e.generics.map(n=>Re(n)).join(",")+"]"}function ll(e){return Qr(e)!=null}function Qr(e){var t;return e.fullname==="[]"&&((t=e.generics)==null?void 0:t.length)===1?e.generics[0]:void 0}function cl(e){return e.generics!=null&&e.generics.length>0}function ti(e){return e.enumCases!=null&&e.enumCases.length>0}function ul(e){return e.generics==null?e:new Ut(e.fullname,e.generics.map(()=>Qh))}function dl(e){var t;return(t=e.generics)==null?void 0:t[0]}function vr(e){if(ti(e)&&e.enumCases!=null)return e.enumCases.map(t=>t[1]);throw new Error(`${e.fullname} is not an enum type`)}function em(e,t){if(e.enumCases!=null)if(typeof t=="string"){for(const n of e.enumCases)if(n[0]===t)return n;throw new Error(`'${t}' was not found in ${e.fullname}`)}else{for(const n of e.enumCases)if(n[1]===t)return n;return["",t]}else throw new Error(`${e.fullname} is not an enum type`)}function xr(e,t){const n=parseInt(t,10);return em(e,isNaN(n)?t:n)[1]}function fl(e){if(e.cases!=null)return e.cases();throw new Error(`${e.fullname} is not an F# union type`)}function es(e){if(e.fields!=null)return e.fields();throw new Error(`${e.fullname} is not an F# record type`)}function hl(e){if(ni(e)&&e.generics!=null)return e.generics;throw new Error(`${e.fullname} is not a tuple type`)}function ml(e){return e instanceof Ut?e.cases!=null:e instanceof H}function pl(e){return e instanceof Ut?e.fields!=null:e instanceof ee}function ni(e){return e.fullname.startsWith("System.Tuple")}function tm(e,t){const r=fl(t)[e.tag];if(r==null)throw new Error(`Cannot find case ${e.name} in union type`);return[r,e.fields]}function $l(e){return e.fields==null?[]:e.fields}function nm(e,t){return e[t[0]]}function Ov(e){return e}function rm(e,t){const n=(e.fields||[]).length;if(t.length!==n)throw new Error(`Expected an array of length ${n} but got ${t.length}`);const r=e.declaringType.construct;return r==null?{}:(e.declaringType.cases?e.declaringType.cases().length==1:!1)?new r(...t):new r(e.tag,t)}function sm(e,t){const n=es(e);if(n.length!==t.length)throw new Error(`Expected an array of length ${n.length} but got ${t.length}`);return e.construct!=null?new e.construct(...t):n.reduce((r,[s,o],i)=>(r[s]=t[i],r),{})}function om(e,t){return e}const im=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],am=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],lm=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],cm=["January","February","March","April","May","June","July","August","September","October","November","December"];function Et(e,t,n){let r=0,s=t;for(;s<e.length&&e[s]===n;)s++,r++;return r}function gl(e,t){return t>=e.length-1?-1:e.charCodeAt(t+1)}function um(e,t){let n=t;const r=e[t];let s="",o=!1;for(;t<e.length;){t++;const i=e[t];if(i===r){o=!0;break}else if(i==="\\")if(t<e.length)t++,s+=e[t];else throw new Error("Invalid string format");else s+=i}if(!o)throw new Error(`Invalid string format could not find matching quote for ${r}`);return[s,t-n+1]}function ri(e,t,n){let r=0,s=0,o="";const i=n?ts(e.getTime(),1):e;for(;r<t.length;){const a=t[r];switch(a){case"d":switch(s=Et(t,r,"d"),r+=s,s){case 1:o+=bl(i);break;case 2:o+=ge(bl(i),2);break;case 3:o+=im[xl(i)];break;case 4:o+=am[xl(i)];break}break;case"f":if(s=Et(t,r,"f"),r+=s,s<=3){const $=10**(3-s);o+=ge(Math.floor(Ks(i)/$),s)}else s<=7&&(o+=(""+Ks(i)).padEnd(s,"0"));break;case"F":if(s=Et(t,r,"F"),r+=s,s<=3){const $=10**(3-s),v=Math.floor(Ks(i)/$);v!=0&&(o+=ge(v,s))}else if(s<=7){const $=Ks(i);$!=0&&(o+=ge($,3))}break;case"g":s=Et(t,r,"g"),r+=s,s<=2&&(o+="A.D.");break;case"h":switch(s=Et(t,r,"h"),r+=s,s){case 1:o+=qs(i)%12;break;case 2:o+=ge(qs(i)%12,2);break}break;case"H":switch(s=Et(t,r,"H"),r+=s,s){case 1:o+=qs(i);break;case 2:o+=ge(qs(i),2);break}break;case"K":switch(s=Et(t,r,"K"),r+=s,s){case 1:switch(wl(i)){case 1:o+="Z";break;case 2:o+=Cr(i.getTimezoneOffset()*-6e4);break}break}break;case"m":switch(s=Et(t,r,"m"),r+=s,s){case 1:o+=_l(i);break;case 2:o+=ge(_l(i),2);break}break;case"M":switch(s=Et(t,r,"M"),r+=s,s){case 1:o+=Zs(i);break;case 2:o+=ge(Zs(i),2);break;case 3:o+=lm[Zs(i)-1];break;case 4:o+=cm[Zs(i)-1];break}break;case"s":switch(s=Et(t,r,"s"),r+=s,s){case 1:o+=vl(i);break;case 2:o+=ge(vl(i),2);break}break;case"t":switch(s=Et(t,r,"t"),r+=s,s){case 1:o+=i.getHours()<12?"A":"P";break;case 2:o+=i.getHours()<12?"AM":"PM";break}break;case"y":switch(s=Et(t,r,"y"),r+=s,s){case 1:o+=i.getFullYear()%100;break;case 2:o+=ge(i.getFullYear()%100,2);break;case 3:o+=ge(i.getFullYear(),3);break;case 4:o+=ge(i.getFullYear(),4);break;case 5:o+=ge(i.getFullYear(),5);break}break;case"z":s=Et(t,r,"z"),r+=s;let l="";switch(wl(i)){case 1:l="+00:00";break;case 2:l=Cr(i.getTimezoneOffset()*-6e4);break;case 0:l=Cr(ym(i).getTimezoneOffset()*-6e4);break}const c=l[0]==="-"?"-":"+",d=parseInt(l.substring(1,3),10),u=parseInt(l.substring(4,6),10);switch(s){case 1:o+=`${c}${d}`;break;case 2:o+=`${c}${ge(d,2)}`;break;default:o+=`${c}${ge(d,2)}:${ge(u,2)}`;break}break;case":":o+=":",r++;break;case"/":o+="/",r++;break;case"'":case'"':const[h,f]=um(t,r);o+=h,r+=f;break;case"%":const m=gl(t,r);if(m>=0&&m!==37)r+=2,o+=ri(i,String.fromCharCode(m),n);else throw new Error("Invalid format string");break;case"\\":const w=gl(t,r);if(w>=0)r+=2,o+=String.fromCharCode(w);else throw new Error("Invalid format string");break;default:r++,o+=a;break}}return o}function wl(e){return e.kind||0}function Cr(e){const t=e<0;e=Math.abs(e);const n=~~(e/36e5),r=e%36e5/6e4;return(t?"-":"+")+ge(n,2)+":"+ge(r,2)}function Ws(e,t){const n=e.toISOString();return t==="first"?n.substring(0,n.indexOf("T")):n.substring(n.indexOf("T")+1,n.length-1)}function dm(e,t){if(t)return e.toISOString();{const n=e.kind==null?!0:e.kind===2;return ge(e.getFullYear(),4)+"-"+ge(e.getMonth()+1,2)+"-"+ge(e.getDate(),2)+"T"+ge(e.getHours(),2)+":"+ge(e.getMinutes(),2)+":"+ge(e.getSeconds(),2)+"."+ge(e.getMilliseconds(),3)+(n?Cr(e.getTimezoneOffset()*-6e4):"")}}function fm(e,t){const n=e.toISOString();return n.substring(0,n.length-1)+Cr(t)}function hm(e,t){const n=new Date(e.getTime()+(e.offset??0));if(typeof t!="string")return n.toISOString().replace(/\.\d+/,"").replace(/[A-Z]|\.\d+/g," ")+Cr(e.offset??0);if(t.length===1)switch(t){case"D":case"d":return Ws(n,"first");case"T":case"t":return Ws(n,"second");case"O":case"o":return fm(n,e.offset??0);default:throw new Error("Unrecognized Date print format")}else return ri(n,t,!0)}function mm(e,t){const n=e.kind===1;if(typeof t!="string")return n?e.toUTCString():e.toLocaleString();if(t.length===1)switch(t){case"D":case"d":return n?Ws(e,"first"):e.toLocaleDateString();case"T":case"t":return n?Ws(e,"second"):e.toLocaleTimeString();case"O":case"o":return dm(e,n);default:throw new Error("Unrecognized Date print format")}else return ri(e,t,n)}function Gs(e,t,n){return e.offset!=null?hm(e,t):mm(e,t)}function ts(e,t){const n=new Date(e);return n.kind=(t??0)|0,n}function pm(){return ts(-621355968e5,1)}function yl(e){function t(){throw new Error(`The string is not a valid Date: ${e}`)}(e==null||e.trim()==="")&&t(),e.length===10&&e[4]==="-"&&e[7]==="-"&&(e+="T00:00:00");let n=new Date(e),r=null;if(isNaN(n.getTime())){const s=/^\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(s!=null){let o,i=0;if(s[2]!=null){const a=s[2].split(":"),l=parseInt(a[0],10);i=l*3600+parseInt(a[1]||"0",10)*60+parseFloat(a[2]||"0"),s[3]!=null&&s[3].toUpperCase()==="PM"&&l<12&&(i+=720)}if(s[4]!=null){if(s[1]!=null)o=new Date(s[1]+" UTC");else{const a=new Date;o=new Date(a.getUTCFullYear()+"/"+(a.getUTCMonth()+1)+"/"+a.getUTCDate())}if(s[4]==="Z")r="Z";else{let a=parseInt(s[5],10)*60+parseInt(s[6]||"0",10);s[4][0]==="-"&&(a*=-1),r=a,i-=a*60}}else if(s[1]!=null)o=new Date(s[1]);else{const a=new Date;o=new Date(a.getFullYear()+"/"+(a.getMonth()+1)+"/"+a.getDate())}n=new Date(o.getTime()+i*1e3),n=new Date(n.getTime()+(n.getTimezoneOffset()-o.getTimezoneOffset())*6e4)}else t();isNaN(n.getTime())&&t()}return[n,r]}function $m(e,t=!1){const[n,r]=yl(e),s=r!=null?t&&r==="Z"?1:2:0;return ts(n.getTime(),s)}function gm(e,t){try{return t.contents=$m(e),!0}catch{return!1}}function wm(e){return e.kind===1?e:ts(e.getTime(),1)}function ym(e){return e.kind===2?e:ts(e.getTime(),2)}function bl(e){return e.kind===1?e.getUTCDate():e.getDate()}function qs(e){return e.kind===1?e.getUTCHours():e.getHours()}function Ks(e){return e.kind===1?e.getUTCMilliseconds():e.getMilliseconds()}function _l(e){return e.kind===1?e.getUTCMinutes():e.getMinutes()}function Zs(e){return(e.kind===1?e.getUTCMonth():e.getMonth())+1}function vl(e){return e.kind===1?e.getUTCSeconds():e.getSeconds()}function xl(e){return e.kind===1?e.getUTCDay():e.getDay()}function Cl(e,t=0){if((t&-284)!==0)throw new Error("RegexOptions only supports: IgnoreCase, Multiline, Compiled, Singleline and ECMAScript");let n="gu";return n+=t&1?"i":"",n+=t&2?"m":"",n+=t&16?"s":"",new RegExp(e,n)}function si(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function bm(e,t,n=0){return e.lastIndex=n,e.exec(t)}function Sl(e,t,n=0){if(t==null)throw new Error("Input cannot ve null");if(!e.global)throw new Error("Non-global RegExp");e.lastIndex=n;const r=[];let s,o=-1;for(;(s=e.exec(t))!=null;)s.index===o?e.lastIndex++:(o=s.index,r.push(s));return r}function _m(e,t,n,r,s=0){function o(){let i=arguments[0];if(r){r--;const a=[],l=arguments.length,c=typeof arguments[l-1]!="string";let d=c?l-3:l-2;for(let u=0;u<d;u++)a.push(arguments[u]);a.index=arguments[d++],a.input=arguments[d++],c&&(a.groups=arguments[d]),i=n(a)}return i}if(typeof e=="string"){const i=e;e=Cl(t,r??0),t=i,r=void 0}if(typeof n=="function")return r=r??-1,t.substring(0,s)+t.substring(s).replace(e,o);if(n=n.replace(/\$0/g,i=>"$&").replace(/\${([^}]+)}/g,"$<$1>"),r!=null){let i;const a=t.substring(s),l=Sl(e,a),c=Sl.length>r?(i=l[r-1],a.substring(0,i.index+i[0].length)):a;return t.substring(0,s)+c.replace(e,n)+t.substring(s+c.length)}else return t.replace(e,n)}const ns=/(^|[^%])%([0+\- ]*)(\*|\d+)?(?:\.(\d+))?(\w)/g,rs=/(?:(^|[^%])%([0+\- ]*)(\d+)?(?:\.(\d+))?(\w))?%P\(\)/g,vm=/\{(\d+)(,-?\d+)?(?:\:([a-zA-Z])(\d{0,2})|\:(.+?))?\}/g;function kl(e,t){return Yh(e,t)<0}function zt(e){return{input:e,cont:xm(e)}}function Al(e,t){let n=0,r=0,s="";rs.lastIndex=0;let o=rs.exec(e);for(;o;){const i=o.index+(o[1]||"").length;s+=e.substring(r,i).replace(/%%/g,"%");const[,,a,l,c,d]=o;r=rs.lastIndex,s+=Tl(t[n++],a,l,c,d),rs.lastIndex=r-1,o=rs.exec(e)}return s+=e.substring(r).replace(/%%/g,"%"),s}function oi(e,t){return typeof t=="string"?e(t):t.cont(e)}function El(e){return oi(t=>console.log(t),e)}function en(e){return oi(t=>t,e)}function Il(e){return oi(t=>{throw new Error(t)},e)}function Tl(e,t,n,r,s){let o="";if(t=t||"",s=s||"",sl(e))switch(s.toLowerCase()!=="x"&&(kl(e,0)?(e=Xo(e,-1),o="-"):t.indexOf(" ")>=0?o=" ":t.indexOf("+")>=0&&(o="+")),r=r==null?null:parseInt(r,10),s){case"f":case"F":r=r??6,e=Us(e,r);break;case"g":case"G":e=r!=null?zs(e,r):zs(e);break;case"e":case"E":e=r!=null?js(e,r):js(e);break;case"x":e=Hs(e);break;case"X":e=Hs(e).toUpperCase();break;default:e=String(e);break}else e instanceof Date?e=Gs(e):e=pt(e);if(n=typeof n=="number"?n:parseInt(n,10),isNaN(n))e=o+e;else{const i=t.indexOf("0")>=0,a=t.indexOf("-")>=0,l=a||!i?" ":"0";l==="0"?(e=ss(e,n-o.length,l,a),e=o+e):e=ss(o+e,n,l,a)}return e}function Nl(e,t,n,r="",s=-1){return(...o)=>{let i=r;const a=t.slice(),l=n.slice();for(const c of o){const[,,d,u,h,f]=l[0];let m=u;if(s>=0)m=s,s=-1;else if(m==="*"){if(c<0)throw new Error("Non-negative number required");s=c;continue}i+=a[0],i+=Tl(c,d,m,h,f),a.splice(0,1),l.splice(0,1)}return l.length===0?(i+=a[0],e(i)):Nl(e,a,l,i,s)}}function xm(e){return t=>{ns.lastIndex=0;const n=[],r=[];let s=0,o=ns.exec(e);for(;o;){const i=o.index+(o[1]||"").length;n.push(e.substring(s,i).replace(/%%/g,"%")),r.push(o),s=ns.lastIndex,ns.lastIndex-=1,o=ns.exec(e)}return n.length===0?t(e.replace(/%%/g,"%")):(n.push(e.substring(s).replace(/%%/g,"%")),Nl(t,n,r))}}function Ml(e,...t){let n;return typeof e=="object"?(n=String(t[0]),t.shift()):n=e,n.replace(vm,(r,s,o,i,a,l)=>{if(s<0||s>=t.length)throw new Error("Index must be greater or equal to zero and less than the arguments' length.");let c=t[s];if(sl(c))switch(a=a==null?null:parseInt(a,10),i){case"f":case"F":a=a??2,c=Us(c,a);break;case"g":case"G":c=a!=null?zs(c,a):zs(c);break;case"e":case"E":c=a!=null?js(c,a):js(c);break;case"p":case"P":a=a??2,c=Us(Xo(c,100),a)+" %";break;case"d":case"D":c=a!=null?ii(String(c),a,"0"):String(c);break;case"x":case"X":c=a!=null?ii(Hs(c),a,"0"):Hs(c),i==="X"&&(c=c.toUpperCase());break;default:if(l){let d="";c=l.replace(/([0#,]+)(\.[0#]+)?/,(u,h,f)=>{kl(c,0)&&(c=Xo(c,-1),d="-"),f=f==null?"":f.substring(1),c=Us(c,Math.max(f.length,0));let[m,w]=c.split(".");w||(w="");const $=h.replace(/,/g,"").replace(/^#+/,"").length;m=ii(m,$,"0");const v=f.replace(/#+$/,"").length;if(v>w.length?w=Sm(w,v,"0"):v<w.length&&(w=w.substring(0,v)+w.substring(v).replace(/0+$/,"")),h.indexOf(",")>0){const _=m.length%3,C=Math.floor(m.length/3);let R=_>0?m.substr(0,_)+(C>0?",":""):"";for(let D=0;D<C;D++)R+=m.substr(_+D*3,3)+(D<C-1?",":"");m=R}return w.length>0?m+"."+w:m}),c=d+c}}else c instanceof Date?c=Gs(c,l||i):c=pt(c);return o=parseInt((o||" ").substring(1),10),isNaN(o)||(c=ss(String(c),Math.abs(o)," ",o<0)),c})}function Cm(e,t){const n=e.lastIndexOf(t);return n>=0&&n===e.length-t.length}function Js(e){return typeof e!="string"||e.length===0}function Rl(e){return typeof e!="string"||/^\s*$/.test(e)}function oe(e,t){return Array.isArray(t)?t.join(e):Array.from(t).join(e)}function ss(e,t,n,r){n=n||" ",t=t-e.length;for(let s=0;s<t;s++)e=r?e+n:n+e;return e}function ii(e,t,n){return ss(e,t,n)}function Sm(e,t,n){return ss(e,t,n,!0)}function ai(e,t,n,r){if(n=typeof n=="number"?n:void 0,r=typeof r=="number"?r:0,n&&n<0)throw new Error("Count cannot be less than zero");if(n===0)return[];const s=(r&1)===1,o=(r&2)===2;t=t||[],t=t.filter(d=>d).map(si),t=t.length>0?t:["\\s"];const i=[],a=new RegExp(t.join("|"),"g");let l=!0,c=0;do{const d=a.exec(e);if(d===null){const u=o?e.substring(c).trim():e.substring(c);(!s||u.length>0)&&i.push(u),l=!1}else{const u=o?e.substring(c,d.index).trim():e.substring(c,d.index);(!s||u.length>0)&&(n!=null&&i.length+1===n?(i.push(o?e.substring(c).trim():e.substring(c)),l=!1):i.push(u)),c=a.lastIndex}}while(l);return i}function km(e,...t){if(t.length===0)return e.trim();const n="["+si(t.join(""))+"]+";return e.replace(new RegExp("^"+n),"").replace(new RegExp(n+"$"),"")}function Am(e,...t){return t.length===0?e.trimEnd():e.replace(new RegExp("["+si(t.join(""))+"]+$"),"")}function Pl(e,t,n){if(t+(n||0)>e.length)throw new Error("Invalid startIndex and/or length");return n!=null?e.substr(t,n):e.substr(t)}class Wn{constructor(t){this.value=t}toJSON(){return this.value}toString(){return String(this.value)}GetHashCode(){return un(this.value)}Equals(t){return t==null?!1:Be(this.value,t instanceof Wn?t.value:t)}CompareTo(t){return t==null?1:Vt(this.value,t instanceof Wn?t.value:t)}}function M(e){if(e==null)throw new Error("Option has no value");return e instanceof Wn?e.value:e}function li(e){return e instanceof Wn?e.value:e}function nt(e){return e==null||e instanceof Wn?new Wn(e):e}function Em(e){return e??void 0}function ci(e){return e==null?[]:[M(e)]}function He(e,t){return e!=null?M(e):t}function Ol(e,t){return e!=null?M(e):t()}function rt(e,t){return t!=null?nt(e(M(t))):void 0}const Dl="Collection was empty.";function ui(e,t){return typeof e=="function"?new e(t):new Array(t)}function Fl(e,t){return e>t?e:t}function Ys(e,t,n,r){const s=t|0;return e.fill(r,s,s+n)}function An(e,t,n){const r=t.length|0,s=ui(n,r);for(let o=0;o<=r-1;o++)It(s,o,e(he(o,t)));return s}function Im(e,t,n,r){if(t.length!==n.length)throw new Error("Arrays had different lengths");const s=ui(r,t.length);for(let o=0;o<=t.length-1;o++)It(s,o,e(he(o,t),he(o,n)));return s}function Tm(e,t){const n=ui(t,1);return It(n,0,e),n}function Nm(e){return e.slice().reverse()}function Mm(e,t){return t.find(e)}function Rm(e,t,n){const r=[];for(let s=0;s<=t.length-1;s++){const o=e(he(s,t));if(o!=null){const i=M(o);r.push(i)}}return Be(n,pe())?r:An(s=>s,r,n)}function Xs(e,t,n){const r=e;return n.reduce(r,t)}function Pm(e,t){if(e<1)throw new Error("The input must be positive.\\nParameter name: size");if(t.length===0)return[[]];{const n=[];for(let r=0;r<=~~Math.ceil(t.length/e)-1;r++){let s;const o=r*e|0;s=t.slice(o,o+e),n.push(s)}return n}}function di(e,t,n){return t==null}function he(e,t){if(e<0||e>=t.length)throw new Error("Index was outside the bounds of the array.\\nParameter name: index");return t[e]}function It(e,t,n){if(t<0||t>=e.length)throw new Error("Index was outside the bounds of the array.\\nParameter name: index");e[t]=n}function Vl(e,t,n){return t.reduceRight((r,s)=>e(s,r),n)}function Om(e,t){let n=t.GetZero();for(let r=0;r<=e.length-1;r++)n=t.Add(n,he(r,e));return n}class gt extends ee{constructor(t,n){super(),this.head=t,this.tail=n}toString(){return"["+oe("; ",this)+"]"}Equals(t){const n=this;return n===t?!0:((s,o)=>{e:for(;;){const i=s,a=o,l=i.tail,c=a.tail;if(l!=null)if(c!=null){const d=M(l),u=M(c);if(Be(i.head,a.head)){s=d,o=u;continue e}else return!1}else return!1;else return c==null}})(n,t)}GetHashCode(){return((r,s,o)=>{e:for(;;){const i=r,a=s,l=o,c=l.tail;if(c!=null){const d=M(c);if(i>18)return a|0;r=i+1,s=(a<<1)+un(l.head)+631*i,o=d;continue e}else return a|0}})(0,0,this)|0}toJSON(){const t=this;return Array.from(t)}CompareTo(t){return((s,o)=>{e:for(;;){const i=s,a=o,l=i.tail,c=a.tail;if(l!=null)if(c!=null){const d=M(l),u=M(c),h=Vt(i.head,a.head)|0;if(h===0){s=d,o=u;continue e}else return h|0}else return 1;else return c!=null?-1:0}})(this,t)|0}GetEnumerator(){return Fm(this)}[Symbol.iterator](){return Jr(Pe(this))}"System.Collections.IEnumerable.GetEnumerator"(){return Pe(this)}}class Dm{constructor(t){this.xs=t,this.it=this.xs,this.current=pe()}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current}"System.Collections.IEnumerator.get_Current"(){return this.current}"System.Collections.IEnumerator.MoveNext"(){const t=this,n=t.it.tail;if(n!=null){const r=M(n);return t.current=t.it.head,t.it=r,!0}else return!1}"System.Collections.IEnumerator.Reset"(){const t=this;t.it=t.xs,t.current=pe()}Dispose(){}}function Fm(e){return new Dm(e)}function We(){return new gt(pe(),void 0)}function os(e,t){return new gt(e,t)}function dn(e){return e.tail==null}function Ll(e){return((n,r)=>{e:for(;;){const s=n,i=r.tail;if(i!=null){n=s+1,r=M(i);continue e}else return s|0}})(0,e)|0}function En(e){if(e.tail!=null)return e.head;throw new Error(Dl+"\\nParameter name: list")}function st(e){const t=e.tail;if(t!=null)return M(t);throw new Error(Dl+"\\nParameter name: list")}function Ue(){return We()}function Tt(e,t){return os(e,t)}function ne(e){return os(e,We())}function K(e){return dn(e)}function Sr(e){return Ll(e)}function F(e){return En(e)}function b(e){return st(e)}function Gn(e){const t=Ll(e)|0,n=Ys(new Array(t),0,t,null);return((s,o)=>{e:for(;;){const i=s,a=o;if(!dn(a)){It(n,i,En(a)),s=i+1,o=st(a);continue e}break}})(0,e),n}function fn(e,t,n){let r=t,s=n;for(;!dn(s);)r=e(r,F(s)),s=st(s);return r}function Qs(e){return fn((t,n)=>os(n,t),We(),e)}function Vm(e,t,n){return Vl(e,Gn(t),n)}function Lm(e,t,n){return((s,o,i)=>{e:for(;;){const a=s,l=o,c=i;if(dn(c))return l;s=a+1,o=e(a,l,En(c)),i=st(c);continue e}})(0,t,n)}function eo(e,t){fn((n,r)=>{e(r)},void 0,t)}function De(e,t){let n=t;for(let r=e.length-1;r>=0;r--)n=os(he(r,e),n);return n}function k(e){return De(e,We())}function Bm(e){let t,n;if(Qt(e))return k(e);if(e instanceof gt)return e;{const r=We();let s=r;const o=Pe(e);try{for(;o["System.Collections.IEnumerator.MoveNext"]();){const l=o["System.Collections.Generic.IEnumerator`1.get_Current"]();s=(t=s,n=new gt(l,void 0),t.tail=n,n)}}finally{ye(o)}const i=s,a=We();return i.tail=a,st(r)}}function ot(e,t){return fn((n,r)=>os(r,n),t,Qs(e))}function Um(e,t){let n,r;const s=We();let o=s,i=t;for(;!dn(i);){let c=e(En(i));for(;!dn(c);)o=(n=o,r=new gt(En(c),void 0),n.tail=r,r),c=st(c);i=st(i)}const a=o,l=We();return a.tail=l,st(s)}function zm(e,t){const n=We(),r=Lm((o,i,a)=>{const l=new gt(e(o,a),void 0);return i.tail=l,l},n,t),s=We();return r.tail=s,st(n)}function qn(e,t){const n=We(),r=fn((o,i)=>{const a=new gt(e(i),void 0);return o.tail=a,a},n,t),s=We();return r.tail=s,st(n)}function jm(e,t){return(r=>{e:for(;;){const s=r;if(dn(s))return;{const o=e(En(s));if(o==null){r=st(s);continue e}else return o}}})(t)}function Hm(e,t){return jm(n=>e(n)?nt(n):void 0,t)}function Wm(e,t){return((r,s)=>{e:for(;;){const o=r,i=s;if(dn(i))return;if(e(En(i)))return o;r=o+1,s=st(i);continue e}})(0,t)}function Gm(e,t){return((r,s)=>{e:for(;;){const o=r,i=s;if(dn(i))return;if(o===e)return nt(En(i));r=o+1,s=st(i);continue e}})(0,t)}function Bl(e,t){const n=We(),r=fn((o,i)=>{if(e(i)){const a=new gt(i,void 0);return o.tail=a,a}else return o},n,t),s=We();return r.tail=s,st(n)}function qm(e,t){const n=We(),r=We(),s=n,o=fn((l,c)=>{let d,u;const h=l[0],f=l[1];return e(c)?[(d=new gt(c,void 0),h.tail=d,d),f]:[h,(u=new gt(c,void 0),f.tail=u,u)]},[s,r],t),i=We();o[0].tail=i;const a=We();return o[1].tail=a,[st(s),st(r)]}function Ul(e,t){const n=We(),r=fn((o,i)=>{const a=e(i);if(a==null)return o;{const l=new gt(M(a),void 0);return o.tail=l,l}},n,t),s=We();return r.tail=s,st(n)}function zl(e,t,n){return Wm(r=>n.Equals(e,r),t)!=null}function Km(e,t){const n=Gn(t);return n.sort(e),k(n)}function Zm(e,t,n){return Km((r,s)=>n.Compare(e(r),e(s)),t)}function Jm(e,t){return k(An(k,Pm(e,Gn(t))))}function Ym(e){return new g(0,[e])}function jl(e){return new g(1,[e])}class g extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Ok","Error"]}}function hn(e,t){return t.tag===0?Ym(e(t.fields[0])):jl(t.fields[0])}function Xm(e,t){return t.tag===0?e(t.fields[0]):jl(t.fields[0])}function ut(e){return e.tag===0}class Qm extends H{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Name"]}}function Hl(e){return new Qm(e)}function fi(e){return e.fields[0]}class ep extends H{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Website"]}}class tp extends H{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["FirstName"]}}class np extends H{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["LastName"]}}class rp extends H{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Email"]}}class sp extends H{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["MobilePhone"]}}let op=class extends ee{constructor(t,n,r,s){super(),this.FirstName=t,this.LastName=n,this.Email=r,this.MobilePhone=s}};class ip extends H{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Notes"]}}class ap extends H{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["PartnerId"]}}function tn(e){return e.fields[0]}function it(e){return new ap(e)}function to(e){return tn(e)}class lp extends H{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["AccountId"]}}function nn(e){return e.fields[0]}function jt(e){return new lp(e)}function no(e){return nn(e)}class cp extends H{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["BusinessName"]}}class up extends H{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["BusinessNumber"]}}class dp extends H{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Address1"]}}class fp extends H{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Address2"]}}class hp extends H{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["City"]}}class mp extends H{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Postcode"]}}let pp=class extends H{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["State"]}};class $p extends H{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["SalesforceParentRecordId"]}}class gp extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["ExternalApi","Admin"]}}new gp(0,[]);function wp(e){throw new Error(e)}const yp="Enumeration already finished.",bp="Enumeration has not started. Call MoveNext.",Wl="The input sequence has an insufficient number of elements.",_p="Reset is not supported on this enumerator.";function vp(){throw new Error(_p)}function hi(){throw new Error(bp)}function mi(){throw new Error(yp)}class xp{constructor(t){this.f=t}toString(){const t=this;let n=0,r="seq [";const s=Pe(t);try{for(;n<4&&s["System.Collections.IEnumerator.MoveNext"]();)n>0&&(r=r+"; "),r=r+pt(s["System.Collections.Generic.IEnumerator`1.get_Current"]()),n=n+1|0;return n===4&&(r=r+"; ..."),r+"]"}finally{ye(s)}}GetEnumerator(){return this.f()}[Symbol.iterator](){return Jr(Pe(this))}"System.Collections.IEnumerable.GetEnumerator"(){return this.f()}}function Cp(e){return new xp(e)}class Sp{constructor(t,n,r){this.current=t,this.next=n,this.dispose=r}"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"(){vp()}Dispose(){this.dispose()}}function ro(e,t,n){return new Sp(e,t,n)}function kp(e){let t,n,r=!1,s=!1,o;const i=()=>{if(s=!0,n!=null){const a=M(n);try{ye(a)}finally{n=void 0}}if(t!=null){const a=M(t);try{ye(a)}finally{t=void 0}}};return ro(()=>(r?s&&mi():hi(),o!=null?M(o):mi()),()=>{let a;if(r||(r=!0),s)return!1;{let l;for(;l==null;){const c=t,d=n;if(c!=null)if(d!=null){const u=M(d);if(u["System.Collections.IEnumerator.MoveNext"]())o=nt(u["System.Collections.Generic.IEnumerator`1.get_Current"]()),l=!0;else try{ye(u)}finally{n=void 0}}else{const u=M(c);u["System.Collections.IEnumerator.MoveNext"]()?n=(a=u["System.Collections.Generic.IEnumerator`1.get_Current"](),Pe(a)):(i(),l=!1)}else t=Pe(e)}return M(l)}},()=>{s||i()})}function Ap(e,t){return ro(()=>t["System.Collections.Generic.IEnumerator`1.get_Current"](),()=>t["System.Collections.IEnumerator.MoveNext"](),()=>{try{ye(t)}finally{}})}function Gl(e,t,n){let r=!1,s,o=nt(e());const i=()=>{if(o!=null){const l=M(o);try{n(l)}finally{o=void 0}}},a=()=>{try{i()}finally{s=void 0}};return ro(()=>(r||hi(),s!=null?M(s):mi()),()=>{if(r||(r=!0),o!=null){const l=M(o);let c;try{c=t(l)}catch(d){throw a(),d}return c!=null?(s=c,!0):(a(),!1)}else return!1},i)}function Ep(e,t){let n,r=t;return ro(()=>{if(n!=null){const s=M(n)[0];return M(n)[1],s}else return hi()},()=>(n=e(r),n!=null?(M(n)[0],r=M(n)[1],!0):!1),()=>{})}function Ip(e,t){t==null&&wp(e)}function kr(e){return Cp(e)}function mn(e){return Ip("source",e),Pe(e)}function A(e){return kr(()=>Pe(e()))}function pi(e){return kr(()=>kp(e))}function Tp(e,t){return kr(()=>Ep(e,t))}function wt(){return A(()=>new Array(0))}function I(e){return A(()=>Tm(e))}function Dv(e){return e}function $i(e){return e instanceof gt?Gn(e):Array.from(e)}function _e(e){return Qt(e)?k(e):e instanceof gt?e:Bm(e)}function ql(e,t,n){return kr(()=>Gl(e,t,n))}function Kl(e,t,n){return kr(()=>{let r=-1;return Gl(e,s=>(r=r+1|0,t(r,s)),n)})}function B(e,t){return pi([e,t])}function is(e,t){return ql(()=>mn(t),n=>{let r;for(;r==null&&n["System.Collections.IEnumerator.MoveNext"]();)r=e(n["System.Collections.Generic.IEnumerator`1.get_Current"]());return r},n=>{ye(n)})}function Np(e,t,n){const r=mn(t);try{const s=mn(n);try{let o=0,i=r["System.Collections.IEnumerator.MoveNext"](),a=s["System.Collections.IEnumerator.MoveNext"]();for(;o===0&&i&&a;)o=e(r["System.Collections.Generic.IEnumerator`1.get_Current"](),s["System.Collections.Generic.IEnumerator`1.get_Current"]())|0,o===0&&(i=r["System.Collections.IEnumerator.MoveNext"](),a=s["System.Collections.IEnumerator.MoveNext"]());return(o!==0?o:i?1:a?-1:0)|0}finally{ye(s)}}finally{ye(r)}}function Ar(e,t,n){const r=mn(t);try{let s=!1;for(;!s&&r["System.Collections.IEnumerator.MoveNext"]();)s=n.Equals(e,r["System.Collections.Generic.IEnumerator`1.get_Current"]());return s}finally{ye(r)}}function as(e,t,n){const r=mn(n);try{let s=t;for(;r["System.Collections.IEnumerator.MoveNext"]();)s=e(s,r["System.Collections.Generic.IEnumerator`1.get_Current"]());return s}finally{ye(r)}}function Er(e,t){as((n,r)=>{e(r)},void 0,t)}function Mp(e,t){as((n,r)=>(e(n,r),n+1|0),0,t)}function Fe(e,t){return ql(()=>mn(t),n=>n["System.Collections.IEnumerator.MoveNext"]()?nt(e(n["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0,n=>{ye(n)})}function gi(e,t){return Kl(()=>mn(t),(n,r)=>r["System.Collections.IEnumerator.MoveNext"]()?nt(e(n,r["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0,n=>{ye(n)})}function Rp(e){return A(()=>Nm($i(e)))}function Pp(e,t){return kr(()=>{const n=mn(t);try{for(let r=1;r<=e;r++)if(!n["System.Collections.IEnumerator.MoveNext"]())throw new Error(Wl+"\\nParameter name: source");return Ap(()=>{},n)}catch(r){throw ye(n),r}})}function Op(e,t){return Kl(()=>mn(t),(n,r)=>{if(n<e){if(r["System.Collections.IEnumerator.MoveNext"]())return nt(r["System.Collections.Generic.IEnumerator`1.get_Current"]());throw new Error(Wl+"\\nParameter name: source")}else return},n=>{ye(n)})}function Dp(e,t){return A(()=>pi(Fe(e,t)))}const Kn={None:0,LowerFirst:1,SnakeCase:2,SnakeCaseAllCaps:3,KebabCase:4};function wi(e,t){return e.replace(/[a-z]?[A-Z]/g,n=>n.length===1?n.toLowerCase():n.charAt(0)+t+n.charAt(1).toLowerCase())}function Fp(e,t){switch(t){case Kn.LowerFirst:return e.charAt(0).toLowerCase()+e.slice(1);case Kn.SnakeCase:return wi(e,"_");case Kn.SnakeCaseAllCaps:return wi(e,"_").toUpperCase();case Kn.KebabCase:return wi(e,"-");case Kn.None:default:return e}}function In(e,t=Kn.None){const n={},r=t;function s(i){throw new Error("Cannot infer key and value of "+String(i))}function o(i,a,l){i=Fp(i,a),n[i]=l}for(let i of e){let a=Kn.None;if(i==null&&s(i),i instanceof H){const l=i.cases()[i.tag];i=i.fields.length===0?l:[l].concat(i.fields),a=r}if(Array.isArray(i))switch(i.length){case 0:s(i);break;case 1:o(i[0],a,!0);break;case 2:const l=i[1];o(i[0],a,l);break;default:o(i[0],a,i.slice(1))}else typeof i=="string"?o(i,a,!0):s(i)}return n}function Zl(e,t,n){return e.has(t)?(n.contents=e.get(t),!0):!1}function ls(e,t){if(e.has(t))return e.get(t);throw new Error(`The given key '${t}' was not present in the dictionary.`)}class Vp{constructor(t,n){const r=new $t(pe());this.comparer=n,r.contents=this,this.hashMap=new Map([]),this["init@9"]=1;const s=Pe(t);try{for(;s["System.Collections.IEnumerator.MoveNext"]();){const o=s["System.Collections.Generic.IEnumerator`1.get_Current"]();yi(r.contents,o[0],o[1])}}finally{ye(s)}}get[Symbol.toStringTag](){return"Dictionary"}toJSON(){const t=this;return Array.from(t)}"System.Collections.IEnumerable.GetEnumerator"(){return Pe(this)}GetEnumerator(){return Pe(pi(this.hashMap.values()))}[Symbol.iterator](){return Jr(Pe(this))}"System.Collections.Generic.ICollection`1.Add2B595"(t){yi(this,t[0],t[1])}"System.Collections.Generic.ICollection`1.Clear"(){Jl(this)}"System.Collections.Generic.ICollection`1.Contains2B595"(t){const r=so(this,t[0]);let s;switch(r!=null&&Be(M(r)[1],t[1])?(s=0,M(r)):s=1,s){case 0:return!0;default:return!1}}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(t,n){Mp((s,o)=>{It(t,n+s,o)},this)}"System.Collections.Generic.ICollection`1.get_Count"(){return Yl(this)|0}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!1}"System.Collections.Generic.ICollection`1.Remove2B595"(t){const n=this,r=so(n,t[0]);return r!=null?(Be(M(r)[1],t[1])&&bi(n,t[0]),!0):!1}"System.Collections.Generic.IDictionary`2.Add5BDDA1"(t,n){yi(this,t,n)}"System.Collections.Generic.IDictionary`2.ContainsKey2B595"(t){return ec(this,t)}"System.Collections.Generic.IDictionary`2.get_Item2B595"(t){return Xl(this,t)}"System.Collections.Generic.IDictionary`2.set_Item5BDDA1"(t,n){Ql(this,t,n)}"System.Collections.Generic.IDictionary`2.get_Keys"(){const t=this;return $i(A(()=>Fe(n=>n[0],t)))}"System.Collections.Generic.IDictionary`2.Remove2B595"(t){return bi(this,t)}"System.Collections.Generic.IDictionary`2.TryGetValue6DC89625"(t,n){const s=so(this,t);if(s!=null){const o=M(s);return n.contents=o[1],!0}else return!1}"System.Collections.Generic.IDictionary`2.get_Values"(){const t=this;return $i(A(()=>Fe(n=>n[1],t)))}get size(){return Yl(this)|0}clear(){Jl(this)}delete(t){return bi(this,t)}entries(){return Fe(n=>[n[0],n[1]],this)}get(t){return Xl(this,t)}has(t){return ec(this,t)}keys(){return Fe(n=>n[0],this)}set(t,n){const r=this;return Ql(r,t,n),r}values(){return Fe(n=>n[1],this)}forEach(t,n){const r=this;Er(s=>{t(s[1],s[0],r)},r)}}function cs(e,t){const n=e.comparer.GetHashCode(t)|0;let r,s=pe();return r=[Zl(e.hashMap,n,new $t(()=>s,o=>{s=o})),s],r[0]?[!0,n,r[1].findIndex(o=>e.comparer.Equals(t,o[0]))]:[!1,n,-1]}function so(e,t){const n=cs(e,t);let r;switch(n[0]&&n[2]>-1?r=0:r=1,r){case 0:return ls(e.hashMap,n[1])[n[2]];default:return}}function Jl(e){e.hashMap.clear()}function Yl(e){let t=0,n=Pe(e.hashMap.values());try{for(;n["System.Collections.IEnumerator.MoveNext"]();){const r=n["System.Collections.Generic.IEnumerator`1.get_Current"]();t=t+r.length|0}}finally{ye(n)}return t|0}function Xl(e,t){const n=so(e,t);if(n!=null)return M(n)[1];throw new Error("The item was not found in collection")}function Ql(e,t,n){const r=cs(e,t);r[0]?r[2]>-1?ls(e.hashMap,r[1])[r[2]]=[t,n]:ls(e.hashMap,r[1]).push([t,n]):e.hashMap.set(r[1],[[t,n]])}function yi(e,t,n){const r=cs(e,t);if(r[0]){if(r[2]>-1)throw new Error(Ml("An item with the same key has already been added. Key: {0}",t));ls(e.hashMap,r[1]).push([t,n])}else e.hashMap.set(r[1],[[t,n]])}function ec(e,t){const n=cs(e,t);let r;switch(n[0]&&n[2]>-1?r=0:r=1,r){case 0:return!0;default:return!1}}function bi(e,t){const n=cs(e,t);let r;switch(n[0]&&n[2]>-1?r=0:r=1,r){case 0:return ls(e.hashMap,n[1]).splice(n[2],1),!0;default:return!1}}function Lp(e){return new tc(0,[e])}function Bp(e){return new tc(1,[e])}class tc extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Choice1Of2","Choice2Of2"]}}function Up(e){return Lp(e)}function zp(e){return Bp(e)}const jp=/^[\(\{]{0,2}[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[\)\}]{0,2}$/,nc=/^([0-9a-f]{8})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{12})$/,Hp=/^\{0x[0-9a-f]{8},(0x[0-9a-f]{4},){2}\{(0x[0-9a-f]{2},){7}0x[0-9a-f]{2}\}\}$/;function Wp(e){function t(r){return r.replace(nc,"$1-$2-$3-$4-$5")}const n=e.trim().toLowerCase();if(jp.test(n))return km(n,"{","}","(",")");if(nc.test(n))return t(n);if(Hp.test(n))return t(n.replace(/[\{\},]|0x/g,""));throw new Error("Guid should contain 32 digits with 4 dashes: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")}function Gp(e,t){try{return t.contents=Wp(e),!0}catch{return!1}}class rc extends H{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["StreamId"]}}function Ir(e){return e.fields[0]}var _i;(function(e){e[e.AllowHexSpecifier=512]="AllowHexSpecifier"})(_i||(_i={}));function qp(e,t){const[,n,r,s]=e;return{sign:n||"",prefix:r||"",digits:s,radix:t}}function sc(e,t){switch(t){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 Kp(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.")}}function Zp(e,t){if(t&_i.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}}function Jp(e,t,n){const s=/^\s*([\+\-])?(0[xXoObB])?([0-9a-fA-F]+)\s*$/.exec(e.replace(/_/g,""));if(s!=null){const[,,o,i]=s;if(n=n||Zp(o,t),!Kp(n).test(i))return qp(s,n)}return null}function Yp(e,t,n,r,s){const o=Jp(e,t,s);if(o!=null){let i=Number.parseInt(o.sign+o.digits,o.radix);if(!Number.isNaN(i)){const[a,l]=sc(!0,r);!n&&o.radix!==10&&i>=a&&i<=l&&(i=i<<32-r>>32-r);const[c,d]=sc(n,r);if(i>=c&&i<=d)return i}}throw new Error(`The input string ${e} was not in a correct format.`)}function Tr(e,t,n,r,s){try{return s.contents=Yp(e,t,n,r),!0}catch{return!1}}const Xp="#C$&$&$$$$$$%-%&%=$$$$$$=$$$$D$$'$$$$$$$$$$$$%$$%$$$$&$:$*;$+$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$$$$$$$$$$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$&%$$$%$&%'$%$&&%$%$$$$$%$$%$$%$&$$$%%$$&'$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$$$$$$$$$$$$$%$$$$$&$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*%$%%$$'$$$$$$$$h$>5'/1(*$$$4“$$$$$$$$%$&$$'%$$&$$$%$4$,F$%&&$$$$$$$$$$$$$$$$$$$$$$$($$$$$%%VS$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$(%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$$$$$$$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$I%$)L$$%%$$P$$$%$%$$+>''%.)&%$%%.$$$%C$-8-'%$†$$*$$)%%$'%-&%$1$$$$A>%|.$1-D,%$&$%$%9'$,$&$(%2$<&%$$.X8$5.2$C$Y$$$$&+'$%$*-%%-$$2$%$+%%%9$*$$&'%$$&'%%%%$$+$'%$&%%-%%)$$$$$%%$$)'%%9$*$%$%$%%$$&%'%%&&$*'$$*-%&$$-%$$,$&$9$*$%$(%$$&($%$$%$%$2%%%-$$*$)$$%$+%%%9$*$%$(%$$$$$'%%%%$*%$'%$&%%-$$)-$$$)&&$'&%$$$%&%&&&/'%$%&&$&$%$)$1-&)$$($&$+$&$:$3&$&'$&$'*%$&(%%%-*$*$$$%$+$&$:$-$(%$$$$($$%$%%*%*$$%%%-$%0%%,$&$L%$&'$&$&$$$'&$*&%%-,$)$$%$5&;$,$$%*&$'&&$$$+)-%%$/S$%*'$)$+$-%H%$$$($;$$$-$%,$%($$$)%-%'C$&2$$&%)--$$$$$$$$$$%+$G'1$($%(.$G$+$)$%('%HN%'$)$%%%$-))%%'&$&%*&'0$%%)$$$-&$%I$$($%N$$&Ŭ$'%*$$$'%L$'%D$'%*$$$'%2$\\$'%f%&,7&3-)y%)%$ʏ$$4$=$$&n&&+*0$'&.5&%,5%/0$&$%/W%$*+$%.&$&$$$%-)-))$'&$$-)F$X*(%E$$(i-B$&'%&'%$)&'$&%-A%(.O'=)-$&E:%%$%%X$$$*$$$$%+)-%$-)-)*$)%1$%b'$R$$($$($%*'-*-,,&%$A$'%%$&%-O$$%&$$&%+'G++%%&(-&&-A)%,*N%&++&$0$*'$)$%$%$(Ob0$EH]$($$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$,$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$,+)%)%++++)%)%+$$$$$$$$++1%++++++($%'$$$&&$%'$&'%%'$&+(&%&$%'$%$.()%$$$%$$$+$$($,$$'%&$$$.$$$-$($-$$%)&$$$-&$$$0&C30'$&/2%$'$%$&%&$$$%$()$$$$$$'$$'$'$%%%($'$$%$$3F$$'$%'((%'$%$%$*$B%%$$$Bį+$$$$7%*$$t$A<K)h<.8_q9Ú$,$Y+’$ě$$$$$$$$$$$$$$AO($$B$$$$$$$$$$3ģ¦$$$$$$$$$$$$$$$$$$$$$$b$$$$C$$ĥS8%)J%C$ŒR$R$$$&%$$$$$$'$$%$)%&$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%)$$$$&$$('$%I$$($%[*$$1$:,*$*$*$*$*$*$*$*$C%$$$$&$$$$$,$%$$$$%$$$$$$$$$$($-%'$$$0%$P=$|/ù=/'$&$$$$$$$$$$$$$$%$$$$$$$$$$%$,'%$(%&$$$%$y%%%%$$}$&$(N$$%'-CG/3B$-A+$2C-J2ţ᧣c删&8$Қ&Z,K)%į$&3-%7$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$&$-$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%%i-%)+:,%$$$$$$$$$$$$$&$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$+$$$$%$$$$$$$$$$%$$$$$$$$&$$$$$$$$$$$$$$$$$$$$($($$$$$$$$$$$%$$'$$$M$$$%$*$&$'$:%%$'$&)%$$)W'+%U3%+%-)5)&$$%$-?+%:.%.$@&&$R$%'%%&0$$-'%($$,-($L)%%%%,&$+$$%-%'3$)&$$$$U$$&%%(%$$$;%$%.$%%%$%$$-)%)%),*$*$N$',$%'sF%$%$%$$$%-)⯇/:'T'ࠣᤣƑ%I*/(($$-$0$($$$%$%$34Ǝ$$3c%YK/$$%3*$$$)3$%%$$$$$$$$$$$$$$$$%$$'&&$'$$$$$$$&$$&$$$%'($ª%$$&$&$$$$$$%-%&%=$$$$$$=$$$$$$$$$%-$P%B&)%)%)%&&%$$$%$$'%-&%%/$=$6$%$2%1Ež(&'P&,X'4%&$0&$RP$¥@&T2$>'C',7$+$(I((A$$G'+$(MKKq%-)G'G'K+W.$³Ś,9-+»)%$$O$%&$%:$$+:%*B+,S6$%((9)&$=($c['%%3%Q$&$%(''$&$@%&'$,*,*@%$@&C+$?%'(*,Y&*9%+6(+5*'/*slZV0V*)G'+-ʼnB$M$%$%%q@-$+9.'(y8*7:,$$$X2*'7-2&$P&'%%%$'.$%<*-)&G($+$-'$%$+F$%$,%$S&,%'''$$$-$$$&$7.5$<&&%$$%)$d*$$$'$2$-$)R$&+(-)%%$+%%%9$*$%$($%$%$'%%%&%$)$((%%*&(®X&+%&$$'(-%$$$&AS&)$$'%$%%$$+-ÉR&'%'%$%:'%ES&+%$$%&$.-)06N$$$%)$$$*-Y>%&%'$('-%&$ãO&,$%$‡CC-,/+%$%+$%$;)$%%%$$$$$$$&,-i+%J&'%%'$$$$$>$-K)$$'+$+$)%&Q0$%&$(@\\Ī,$H$*$)$$$(--6&%A%9$$*$%$%l*$%$I)&$$%$*$$+-))$%$C($%$%$$$$*-ř6%%%Ú$28+'40$ν‰’$(.ç૟ђ$,࿪ɪ⇜ɜ*B$-'%ƒA%($-S*(''$$--$*$8(6˓CC:'ˆn'$$Z*'0c%$$$.%1᠛+ӹM,⌚łT&4'+ƯधŽ(0&,*-%$%$'፿ę-J%_%&&)++%*A'^:e&$½7/z,<ª===*$5==$$%%$%%%'$+'$$$*$.==%$'%+$*$=%$'$($$&*$============?%<$<$)<$<$)<$<$)<$<$)<$<$)$$%UȣZ'U+$1$%(2($2ճ*$4%*$%$(øP&**%-'$$ƓO'-($ԣè%,*LEE*$'-'%̴^$&$'oP$2å'$>$%$$%$$-$'$$$$)$'$$$$$$&$%$$%$$$$$$$$$$%$$%'$*$'$'$$$-$4(&$($4W%ıO'‡/2%2$2$H-0Ä[@0O',*%1)½Ğ(˻+0&0&—/|*/7/'[+-)K+A%%qœ$u$ª/1%(&&(*,<**,&0*L¶$ZH-Щ꜁Eၘ.ā%ᚥ1ᵔూɁ؅፮򮳙$Aƒ£ē︳𐀡%𐀡",Qp="1.;=;78;<;6;+;<;#7;8>5>$7<8<1.;=?;>?'9<2?>?<->$;>-':-;#<#$<$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$'#$'#%$#%$#%$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#%$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$'$&>&>&>&>&>(#$#$&>#$@&$;#@>#;#@#@#$#@#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$<#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$?(*#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$@#@&;$;6@?=@(6(;(;(;(@'@';@2<;=;?(;2@;'&'(+;'(';'(2?(&(?('+'?';@2'('(@'('@+'(&?;&@(='(&(&(&(@;@'(@;@'@'@'@(2()'()(')()()'('(;+;&'()@'@'@'@'@'@'@(')(@)@)('@)@'@'(@+'=-?=';(@()@'@'@'@'@'@'@'@(@)(@(@(@(@'@'@+('(;@()@'@'@'@'@'@'@(')(@()@)(@'@'(@+;=@'(@()@'@'@'@'@'@'@(')()(@)@)(@()@'@'(@+?'-@('@'@'@'@'@'@'@'@'@'@)()@)@)(@'@)@+-?=?@()('@'@'@'@'()@(@(@(@'@'(@+@;-?'();'@'@'@'@'@(')()@()@)(@)@'@'(@+@'@()'@'@'(')(@)@)('?@')-'(@+-?'@()@'@'@'@'@'@(@)(@(@)@+@);@'('(@='&(;+;@'@'@'@'@'@'('('@'@&@(@+@'@'?;?;?(?+-?(?(?(7878)'@'@()(;('(@(@?(?@?;?;@')()()()('+;')('(')')'('()()(')+)(?#@#@#@$;&$'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@(;-@'?@#@$@6'?;'.'78@';,'@'@'(@'(;@'(@'@'@(@'()()()(;&;='(@+@-@;6;(2@+@'&'@'('('@'@'@()()@)()(@?@;+'@'@'@'@+-@?'()(@;')()(@()()()(@(+@+@;&;@(*(@()'()()()()'@+;?(?@()')()()('+'()()()()@;')()(@;+@'+'&;$@#@#;@(;()('('(')('@$&$&$&(@(#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$@#@$#$#$@#@$@#@#@#@#$#$@$%$%$%$@$#%>$>$@$#%>$@$#@>$#>@$@$#%>@.26;9:79:79;/02.;9:;5;<78;<;5;.2@2-&@-<78&-<78@&@=@(*(*(@?#?#?$#$#$?#?<#?#?#?#?#?$#$'$?$#<#$?<?$?-,#$,-?@<?<?<?<?<?<?<?<?<?<?7878?<?78?<?<?<?@?@-?-?<?<?<?<?78787878787878-?<78<7878787878<?<7878787878787878787878<7878<78<?<?<?@?@?#@$@#$#$#$#$#$#$#$#$&#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$?#$#$(#$@;-;$@$@$@'@&;@('@'@'@'@'@'@'@'@'@(;9:9:;9:;9:;6;6;9:;9:78787878;&;6;6;7;?;@?@?@?@?@.;?&',7878787878?78787878678?,()6&?,&';?@'@(>&'6';&'@'@'@?-?'?@'?@-?-?-?-?-?'?'@'&'@?@'&;'&;'+'@#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$'(*;(;&#$#$#$#$#$#$#$#$#$#$#$#$#$#$&(',(;@>&>#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$&$#$#$#$#$#$#$#$&>#$#$'#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$@#$#$#$@#$'&$'('('(')()?(@-?=?@';@)')(@;+@(';';'(+'(;'()@;'@()'()()();@&+@;'(&'+'@'()()(@'('()@+@;'&'?')()'('('('('('@'&;')();'&)(@'@'@'@'@'@$>&$&>@$')()();)(@+@'@'@'@34'@'@$@$@'('<'@'@'@'@'@'>@'87@'@'@'=?@(;78;@(;657878787878787878;78;5;@;6787878;<6<@;=;@'@'@2@;=;78;<;6;+;<;#7;8>5>$7<8<78;78;'&'&'@'@'@'@'@=<>?=@?<?@2?@'@'@'@'@'@'@'@;@-@?,-?-?@?@?@?(@'@'@(-@'-@',',@'(@'@;'@';,@#$'@+@#@$@'@'@;@'@'@'@'@'@'@'@'@'@;-'?-'@-@'@'@-'-@;'@;@'@-'-@-'(@(@('@'@'@(@(-@;@'-;'-@'?'(@-;@'@;'@-'@-'@;@-@'@#@$@-'(@+@-@'@(6@'@'-'@'(-;@'-@'@)()'(;@-+@()')()(;2;@2@'@+@('()(@+;')'@'(;'@()')()';(;)(+';';@-@'@')()()(;(@'@'@'@'@';@'()(@+@()@'@'@'@'@'@'@(')()@)@)@'@)@')@(@(@')()()(';+;@;('@')()()()(';'@+@')(@)()(;'(@')()()(;'@+@;@'()()()('@+@'@()()(@+-;?@')()(;@#$+-@'@'@'@'@')@)@()(')')(;@+@'@')(@()(';')@'('()'(;(@'()('()(;';@'@'@')(@()(';@+-@;'@(@)()()(@'@'@'(@(@(@('(@+@'@'@')@(@)()('@+@'();@'@-?=?@;'@,@;@'@'@2@'@'@'@+@;@'@(;@'(;?&;?@+@-@'@'@#$-;@'@(')@(&@&;&(@)@'@'@'@'@'@'@'@'@'@'@'@?(;2@?@?@?)(?)2(?(?(?@?(?@-@?@-@#$#$@$#$#@#@#@#@#@#$@$@$@$#$#@#@#@#@$#@#@#@#@#@$#$#$#$#$#$#$@#<$<$#<$<$#<$<$#<$<$#<$<$#$@+?(?(?(?(?;@(@(@(@(@(@(@(@'@(&@+@'?@'(+@=@'@-(@#$(&@+@;@-?-=-@-?-@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@<@?@?@?@?@?@?@-?@?@?@?@?@?@?>?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@+@'@'@'@'@'@'@'@2@2@(@4@4@";function e$(){const t=[...Xp].map(o=>(o.codePointAt(0)??0)-35),n=[...Qp].map(o=>(o.codePointAt(0)??0)-35),r=new Uint32Array(t),s=new Uint8Array(n);for(let o=1;o<r.length;++o)r[o]+=r[o-1];return o=>{let i=r.length,a=0;for(;i-a>1;){const l=Math.floor((i+a)/2),c=r[l];if(o<c)i=l;else if(o===c){i=a=l;break}else c<o&&(a=l)}return s[a]}}const t$=256,n$=e$();function r$(e,t){if(t<e.length)return e.charCodeAt(t);throw new Error("Index out of range.")}const s$=e=>i$(e,0);function o$(e,t){const n=r$(e,t);return n$(n)}function i$(e,t){return(1<<o$(e,t)&t$)!==0}function a$(e,t){const n=bm(Cl(e),t);if(n!=null)return b(_e(A(()=>Fe(r=>r||"",n))))}function l$(e){let t;const n=a$(".*?@(.*)",e);switch(n!=null?K(n)?t=1:K(b(n))?t=0:t=1:t=1,t){case 0:return e;default:return}}function Nt(e,t){return Js(t)?new g(1,[en(zt("%s cannot be null or empty"))(e)]):new g(0,[t])}function c$(e){const t=l$(e);if(t!=null){const n=t;return new g(0,[n])}else return new g(1,["Email is not in the correct format"])}function u$(e){return~~e.charCodeAt(0)-48}function d$(e){let t;const n=new g(1,["BusinessNumber is not valid"]),r=new Int32Array([10,1,3,5,7,9,11,13,15,17,19]),s=An(u$,(t=e.split(""),t.filter(s$)),Int32Array);return s.length===11?(It(s,0,he(0,s)-1|0),Om(Im((o,i)=>o*i,s,r,Int32Array),{GetZero:()=>0,Add:(o,i)=>o+i})%89===0?new g(0,[e]):n):n}function vi(e){const t=Nt("Name",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[Hl(t.fields[0])])}function oo(e){return fi(e)}function oc(e){const t=Nt("Website",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new ep(t.fields[0])])}function ic(e){return e.fields[0]}function ac(e){const t=Nt("FirstName",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new tp(t.fields[0])])}function lc(e){return e.fields[0]}function cc(e){const t=Nt("LastName",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new np(t.fields[0])])}function uc(e){return e.fields[0]}function dc(e){let t;const n=Nt("Email",e);return t=n.tag===1?new g(1,[n.fields[0]]):c$(n.fields[0]),t.tag===1?new g(1,[t.fields[0]]):new g(0,[new rp(t.fields[0])])}function fc(e){const t=Nt("MobilePhone",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new sp(t.fields[0])])}function hc(e){return e.fields[0]}class mc extends ee{constructor(t,n,r,s){super(),this.FirstName=t,this.LastName=n,this.Email=r,this.MobilePhone=s}}function xi(){return ct("AccountRegistry.Shared.Primitives.ContactDetails",[],mc,()=>[["FirstName",j],["LastName",j],["Email",j],["MobilePhone",j]])}function f$(e){const t=ac(e.FirstName);if(t.tag===1)return new g(1,[t.fields[0]]);{const n=cc(e.LastName);if(n.tag===1)return new g(1,[n.fields[0]]);{const r=dc(e.Email);if(r.tag===1)return new g(1,[r.fields[0]]);{const s=fc(e.MobilePhone);return s.tag===1?new g(1,[s.fields[0]]):new g(0,[new op(t.fields[0],n.fields[0],r.fields[0],s.fields[0])])}}}}function h$(e){const t=e;if(t!=null)return new ip(t)}function m$(e){if(e!=null)return e.fields[0]}function dt(e){return tn(e)}function pn(e){return nn(e)}function pc(e){const t=Nt("BusinessName",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new cp(t.fields[0])])}function $c(e){let t;const n=Nt("BusinessNumber",e);return t=n.tag===1?new g(1,[n.fields[0]]):d$(n.fields[0]),t.tag===1?new g(1,[t.fields[0]]):new g(0,[new up(t.fields[0])])}function p$(e){const t=Nt("Address1",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new dp(t.fields[0])])}function $$(e){const t=e;if(t!=null)return new fp(t)}function g$(e){const t=Nt("City",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new hp(t.fields[0])])}function w$(e){const t=Nt("Postcode",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new mp(t.fields[0])])}function y$(e){const t=Nt("State",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new pp(t.fields[0])])}class gc extends ee{constructor(t,n,r,s,o,i,a,l,c){super(),this.BusinessName=t,this.BusinessNumber=n,this.Address1=r,this.Address2=s,this.City=o,this.Postcode=i,this.State=a,this.Phone=l,this.CountryCode=c}}function b$(){return ct("AccountRegistry.Shared.Primitives.LegalEntity",[],gc,()=>[["BusinessName",j],["BusinessNumber",j],["Address1",j],["Address2",we(j)],["City",j],["Postcode",j],["State",we(j)],["Phone",j],["CountryCode",we(j)]])}function _$(e){const t=Nt("SalesforceParentRecordId",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new $p(t.fields[0])])}class wc extends ee{constructor(t,n){super(),this.SalesforceParentRecordId=t,this.SalesforceRecordId=n}}function v$(){return ct("AccountRegistry.Shared.Primitives.SalesforceInfo",[],wc,()=>[["SalesforceParentRecordId",j],["SalesforceRecordId",we(j)]])}class yc extends ee{constructor(t,n){super(),this.Code=t,this.Name=n}}function x$(){return ct("AccountRegistry.Shared.Primitives.AnzsicClassifier",[],yc,()=>[["Code",j],["Name",j]])}class C$ extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Api","Direct"]}}function Ci(){return il("AccountRegistry.Shared.Primitives.AccountProvisioningModeDto",[],C$,()=>[[],[]])}let S$=class extends ee{constructor(t,n,r,s,o,i){super(),this.StreamId=t,this.Name=n,this.Website=r,this.ContactDetails=s,this.Notes=o,this.AccountProvisioningMode=i}};function k$(){return ct("AccountRegistry.Shared.AdminApi.Partner",[],S$,()=>[["StreamId",j],["Name",j],["Website",j],["ContactDetails",we(xi())],["Notes",we(j)],["AccountProvisioningMode",Ci()]])}class bc extends ee{constructor(t,n,r,s,o,i,a,l,c,d){super(),this.StreamId=t,this.PartnerId=n,this.Name=r,this.Website=s,this.ContactDetails=o,this.Notes=i,this.LegalEntity=a,this.ExternalId=l,this.ChannelId=c,this.ProvisioningMode=d}}function A$(){return ct("AccountRegistry.Shared.AdminApi.Account",[],bc,()=>[["StreamId",j],["PartnerId",j],["Name",j],["Website",j],["ContactDetails",we(xi())],["Notes",we(j)],["LegalEntity",we(b$())],["ExternalId",we(j)],["ChannelId",we(j)],["ProvisioningMode",Ci()]])}class E$ extends ee{constructor(t,n,r,s,o,i,a,l,c,d){super(),this.AccountId=t,this.Name=n,this.Contact=r,this.ContactMobilePhone=s,this.Website=o,this.BusinessName=i,this.BusinessNumber=a,this.ExternalId=l,this.ChannelId=c,this.ProvisioningMode=d}}function I$(){return ct("AccountRegistry.Shared.AdminApi.AccountLookupItem",[],E$,()=>[["AccountId",j],["Name",j],["Contact",we(j)],["ContactMobilePhone",we(j)],["Website",j],["BusinessName",we(j)],["BusinessNumber",we(j)],["ExternalId",we(j)],["ChannelId",we(j)],["ProvisioningMode",Ci()]])}class _c extends ee{constructor(t,n){super(),this.Accounts=t,this.Token=n}}function T$(){return ct("AccountRegistry.Shared.AdminApi.AccountLookup",[],_c,()=>[["Accounts",ei(I$())],["Token",we(j)]])}class N$ extends ee{constructor(t,n){super(),this.PartnerId=t,this.AccountId=n}}function M$(){return ct("AccountRegistry.Shared.AdminApi.FindAccountResponse",[],N$,()=>[["PartnerId",j],["AccountId",j]])}class R$ extends ee{constructor(t,n){super(),this.ClassCode=t,this.ClassTitle=n}}function P$(){return ct("AccountRegistry.Shared.AdminApi.AnzsicClass",[],R$,()=>[["ClassCode",j],["ClassTitle",j]])}class O$ extends ee{constructor(t,n,r){super(),this.GroupCode=t,this.GroupTitle=n,this.Classes=r}}function D$(){return ct("AccountRegistry.Shared.AdminApi.AnzsicGroup",[],O$,()=>[["GroupCode",j],["GroupTitle",j],["Classes",al(P$())]])}class F$ extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Success","TooManyResults"]}}function V$(){return il("AccountRegistry.Shared.AdminApi.AnzsicSearchResult",[],F$,()=>[[["Item",al(D$())]],[]])}class vc extends ee{constructor(t,n,r,s,o,i,a,l,c){super(),this.BusinessName=t,this.BusinessNumber=n,this.Address1=r,this.Address2=s,this.City=o,this.Postcode=i,this.State=a,this.Phone=l,this.CountryCode=c}}function L$(){return ct("AccountRegistry.Shared.AdminApi.Write.LegalEntityV2",[],vc,()=>[["BusinessName",j],["BusinessNumber",j],["Address1",j],["Address2",we(j)],["City",j],["Postcode",j],["State",we(j)],["Phone",j],["CountryCode",j]])}class xc extends ee{constructor(t,n,r,s,o,i,a,l,c){super(),this.Name=t,this.Website=n,this.ContactDetails=r,this.Notes=s,this.LegalEntity=o,this.ExternalId=i,this.ChannelId=a,this.SalesforceInfo=l,this.AnzsicClassifier=c}}function B$(){return ct("AccountRegistry.Shared.AdminApi.Write.AccountPost",[],xc,()=>[["Name",j],["Website",j],["ContactDetails",xi()],["Notes",we(j)],["LegalEntity",we(L$())],["ExternalId",we(j)],["ChannelId",we(j)],["SalesforceInfo",we(v$())],["AnzsicClassifier",we(x$())]])}class U$ extends ee{constructor(t){super(),this.Id=t}}function z$(){return ct("AccountRegistry.Shared.AdminApi.Write.AccountPostResponse",[],U$,()=>[["Id",j]])}class Cc extends ee{constructor(t,n,r){super(),this.Name=t,this.BusinessName=n,this.BusinessNumber=r}}function j$(){return ct("AccountRegistry.Shared.AdminApi.Write.PatchAccountDto",[],Cc,()=>[["Name",we(j)],["BusinessName",we(j)],["BusinessNumber",we(j)]])}var us,re,Sc,Zn,kc,Ac,Si,ki,Ai,Ei,Ec,ds={},Ic=[],H$=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,io=Array.isArray;function $n(e,t){for(var n in t)e[n]=t[n];return e}function Tc(e){var t=e.parentNode;t&&t.removeChild(e)}function p(e,t,n){var r,s,o,i={};for(o in t)o=="key"?r=t[o]:o=="ref"?s=t[o]:i[o]=t[o];if(arguments.length>2&&(i.children=arguments.length>3?us.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)i[o]===void 0&&(i[o]=e.defaultProps[o]);return fs(e,i,r,s,null)}function fs(e,t,n,r,s){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:s??++Sc,__i:-1,__u:0};return s==null&&re.vnode!=null&&re.vnode(o),o}function Ii(){return{current:null}}function Ie(e){return e.children}function Ht(e,t){this.props=e,this.context=t}function Jn(e,t){if(t==null)return e.__?Jn(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Jn(e):null}function Nc(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return Nc(e)}}function Ti(e){(!e.__d&&(e.__d=!0)&&Zn.push(e)&&!ao.__r++||kc!==re.debounceRendering)&&((kc=re.debounceRendering)||Ac)(ao)}function ao(){var e,t,n,r,s,o,i,a;for(Zn.sort(Si);e=Zn.shift();)e.__d&&(t=Zn.length,r=void 0,o=(s=(n=e).__v).__e,i=[],a=[],n.__P&&((r=$n({},s)).__v=s.__v+1,re.vnode&&re.vnode(r),Ni(n.__P,r,s,n.__n,n.__P.namespaceURI,32&s.__u?[o]:null,i,o??Jn(s),!!(32&s.__u),a),r.__v=s.__v,r.__.__k[r.__i]=r,Dc(i,r,a),r.__e!=o&&Nc(r)),Zn.length>t&&Zn.sort(Si));ao.__r=0}function Mc(e,t,n,r,s,o,i,a,l,c,d){var u,h,f,m,w,$=r&&r.__k||Ic,v=t.length;for(n.__d=l,W$(n,t,$),l=n.__d,u=0;u<v;u++)(f=n.__k[u])!=null&&typeof f!="boolean"&&typeof f!="function"&&(h=f.__i===-1?ds:$[f.__i]||ds,f.__i=u,Ni(e,f,h,s,o,i,a,l,c,d),m=f.__e,f.ref&&h.ref!=f.ref&&(h.ref&&Mi(h.ref,null,f),d.push(f.ref,f.__c||m,f)),w==null&&m!=null&&(w=m),65536&f.__u||h.__k===f.__k?(l&&!l.isConnected&&(l=Jn(h)),l=Rc(f,l,e)):typeof f.type=="function"&&f.__d!==void 0?l=f.__d:m&&(l=m.nextSibling),f.__d=void 0,f.__u&=-196609);n.__d=l,n.__e=w}function W$(e,t,n){var r,s,o,i,a,l=t.length,c=n.length,d=c,u=0;for(e.__k=[],r=0;r<l;r++)i=r+u,(s=e.__k[r]=(s=t[r])==null||typeof s=="boolean"||typeof s=="function"?null:typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?fs(null,s,null,null,null):io(s)?fs(Ie,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?fs(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s)!=null?(s.__=e,s.__b=e.__b+1,a=G$(s,n,i,d),s.__i=a,o=null,a!==-1&&(d--,(o=n[a])&&(o.__u|=131072)),o==null||o.__v===null?(a==-1&&u--,typeof s.type!="function"&&(s.__u|=65536)):a!==i&&(a===i+1?u++:a>i?d>l-i?u+=a-i:u--:a<i?a==i-1&&(u=a-i):u=0,a!==r+u&&(s.__u|=65536))):(o=n[i])&&o.key==null&&o.__e&&(131072&o.__u)==0&&(o.__e==e.__d&&(e.__d=Jn(o)),Ri(o,o,!1),n[i]=null,d--);if(d)for(r=0;r<c;r++)(o=n[r])!=null&&(131072&o.__u)==0&&(o.__e==e.__d&&(e.__d=Jn(o)),Ri(o,o))}function Rc(e,t,n){var r,s;if(typeof e.type=="function"){for(r=e.__k,s=0;r&&s<r.length;s++)r[s]&&(r[s].__=e,t=Rc(r[s],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function gn(e,t){return t=t||[],e==null||typeof e=="boolean"||(io(e)?e.some(function(n){gn(n,t)}):t.push(e)),t}function G$(e,t,n,r){var s=e.key,o=e.type,i=n-1,a=n+1,l=t[n];if(l===null||l&&s==l.key&&o===l.type&&(131072&l.__u)==0)return n;if(r>(l!=null&&(131072&l.__u)==0?1:0))for(;i>=0||a<t.length;){if(i>=0){if((l=t[i])&&(131072&l.__u)==0&&s==l.key&&o===l.type)return i;i--}if(a<t.length){if((l=t[a])&&(131072&l.__u)==0&&s==l.key&&o===l.type)return a;a++}}return-1}function Pc(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||H$.test(t)?n:n+"px"}function lo(e,t,n,r,s){var o;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Pc(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Pc(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||t==="onFocusOut"||t==="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n.u=r.u:(n.u=ki,e.addEventListener(t,o?Ei:Ai,o)):e.removeEventListener(t,o?Ei:Ai,o);else{if(s=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function Oc(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=ki++;else if(t.t<n.u)return;return n(re.event?re.event(t):t)}}}function Ni(e,t,n,r,s,o,i,a,l,c){var d,u,h,f,m,w,$,v,_,C,R,D,Y,de,ve,fe=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),o=[a=t.__e=n.__e]),(d=re.__b)&&d(t);e:if(typeof fe=="function")try{if(v=t.props,_=(d=fe.contextType)&&r[d.__c],C=d?_?_.props.value:d.__:r,n.__c?$=(u=t.__c=n.__c).__=u.__E:("prototype"in fe&&fe.prototype.render?t.__c=u=new fe(v,C):(t.__c=u=new Ht(v,C),u.constructor=fe,u.render=K$),_&&_.sub(u),u.props=v,u.state||(u.state={}),u.context=C,u.__n=r,h=u.__d=!0,u.__h=[],u._sb=[]),u.__s==null&&(u.__s=u.state),fe.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=$n({},u.__s)),$n(u.__s,fe.getDerivedStateFromProps(v,u.__s))),f=u.props,m=u.state,u.__v=t,h)fe.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(fe.getDerivedStateFromProps==null&&v!==f&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(v,C),!u.__e&&(u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(v,u.__s,C)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(u.props=v,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(X){X&&(X.__=t)}),R=0;R<u._sb.length;R++)u.__h.push(u._sb[R]);u._sb=[],u.__h.length&&i.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(v,u.__s,C),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(f,m,w)})}if(u.context=C,u.props=v,u.__P=e,u.__e=!1,D=re.__r,Y=0,"prototype"in fe&&fe.prototype.render){for(u.state=u.__s,u.__d=!1,D&&D(t),d=u.render(u.props,u.state,u.context),de=0;de<u._sb.length;de++)u.__h.push(u._sb[de]);u._sb=[]}else do u.__d=!1,D&&D(t),d=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++Y<25);u.state=u.__s,u.getChildContext!=null&&(r=$n($n({},r),u.getChildContext())),h||u.getSnapshotBeforeUpdate==null||(w=u.getSnapshotBeforeUpdate(f,m)),Mc(e,io(ve=d!=null&&d.type===Ie&&d.key==null?d.props.children:d)?ve:[ve],t,n,r,s,o,i,a,l,c),u.base=t.__e,t.__u&=-161,u.__h.length&&i.push(u),$&&(u.__E=u.__=null)}catch(X){t.__v=null,l||o!=null?(t.__e=a,t.__u|=l?160:32,o[o.indexOf(a)]=null):(t.__e=n.__e,t.__k=n.__k),re.__e(X,t,n)}else o==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=q$(n.__e,t,n,r,s,o,i,l,c);(d=re.diffed)&&d(t)}function Dc(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)Mi(n[r],n[++r],n[++r]);re.__c&&re.__c(t,e),e.some(function(s){try{e=s.__h,s.__h=[],e.some(function(o){o.call(s)})}catch(o){re.__e(o,s.__v)}})}function q$(e,t,n,r,s,o,i,a,l){var c,d,u,h,f,m,w,$=n.props,v=t.props,_=t.type;if(_==="svg"?s="http://www.w3.org/2000/svg":_==="math"?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),o!=null){for(c=0;c<o.length;c++)if((f=o[c])&&"setAttribute"in f==!!_&&(_?f.localName===_:f.nodeType===3)){e=f,o[c]=null;break}}if(e==null){if(_===null)return document.createTextNode(v);e=document.createElementNS(s,_,v.is&&v),o=null,a=!1}if(_===null)$===v||a&&e.data===v||(e.data=v);else{if(o=o&&us.call(e.childNodes),$=n.props||ds,!a&&o!=null)for($={},c=0;c<e.attributes.length;c++)$[(f=e.attributes[c]).name]=f.value;for(c in $)if(f=$[c],c!="children"){if(c=="dangerouslySetInnerHTML")u=f;else if(c!=="key"&&!(c in v)){if(c=="value"&&"defaultValue"in v||c=="checked"&&"defaultChecked"in v)continue;lo(e,c,null,f,s)}}for(c in v)f=v[c],c=="children"?h=f:c=="dangerouslySetInnerHTML"?d=f:c=="value"?m=f:c=="checked"?w=f:c==="key"||a&&typeof f!="function"||$[c]===f||lo(e,c,f,$[c],s);if(d)a||u&&(d.__html===u.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(u&&(e.innerHTML=""),Mc(e,io(h)?h:[h],t,n,r,_==="foreignObject"?"http://www.w3.org/1999/xhtml":s,o,i,o?o[0]:n.__k&&Jn(n,0),a,l),o!=null)for(c=o.length;c--;)o[c]!=null&&Tc(o[c]);a||(c="value",m!==void 0&&(m!==e[c]||_==="progress"&&!m||_==="option"&&m!==$[c])&&lo(e,c,m,$[c],s),c="checked",w!==void 0&&w!==e[c]&&lo(e,c,w,$[c],s))}return e}function Mi(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){re.__e(r,n)}}function Ri(e,t,n){var r,s;if(re.unmount&&re.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Mi(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){re.__e(o,t)}r.base=r.__P=null}if(r=e.__k)for(s=0;s<r.length;s++)r[s]&&Ri(r[s],t,n||typeof e.type!="function");n||e.__e==null||Tc(e.__e),e.__c=e.__=e.__e=e.__d=void 0}function K$(e,t,n){return this.constructor(e,n)}function Tn(e,t,n){var r,s,o,i;re.__&&re.__(e,t),s=(r=typeof n=="function")?null:n&&n.__k||t.__k,o=[],i=[],Ni(t,e=(!r&&n||t).__k=p(Ie,null,[e]),s||ds,ds,t.namespaceURI,!r&&n?[n]:s?null:t.firstChild?us.call(t.childNodes):null,o,!r&&n?n:s?s.__e:t.firstChild,r,i),Dc(o,e,i)}function Pi(e,t){Tn(e,t,Pi)}function Oi(e,t,n){var r,s,o,i,a=$n({},e.props);for(o in e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)o=="key"?r=t[o]:o=="ref"?s=t[o]:a[o]=t[o]===void 0&&i!==void 0?i[o]:t[o];return arguments.length>2&&(a.children=arguments.length>3?us.call(arguments,2):n),fs(e.type,a,r||e.key,s||e.ref,null)}function Nn(e,t){var n={__c:t="__cC"+Ec++,__:e,Consumer:function(r,s){return r.children(s)},Provider:function(r){var s,o;return this.getChildContext||(s=[],(o={})[t]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(i){this.props.value!==i.value&&s.some(function(a){a.__e=!0,Ti(a)})},this.sub=function(i){s.push(i);var a=i.componentWillUnmount;i.componentWillUnmount=function(){s.splice(s.indexOf(i),1),a&&a.call(i)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}us=Ic.slice,re={__e:function(e,t,n,r){for(var s,o,i;t=t.__;)if((s=t.__c)&&!s.__)try{if((o=s.constructor)&&o.getDerivedStateFromError!=null&&(s.setState(o.getDerivedStateFromError(e)),i=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(e,r||{}),i=s.__d),i)return s.__E=s}catch(a){e=a}throw e}},Sc=0,Ht.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=$n({},this.state),typeof e=="function"&&(e=e($n({},n),this.props)),e&&$n(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Ti(this))},Ht.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ti(this))},Ht.prototype.render=Ie,Zn=[],Ac=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Si=function(e,t){return e.__v.__b-t.__v.__b},ao.__r=0,ki=0,Ai=Oc(!1),Ei=Oc(!0),Ec=0;var wn,Ce,Di,Fc,Nr=0,Vc=[],co=[],Ve=re,Lc=Ve.__b,Bc=Ve.__r,Uc=Ve.diffed,zc=Ve.__c,jc=Ve.unmount,Hc=Ve.__;function Yn(e,t){Ve.__h&&Ve.__h(Ce,e,Nr||t),Nr=0;var n=Ce.__H||(Ce.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:co}),n.__[e]}function Ge(e){return Nr=1,Mr(Gc,e)}function Mr(e,t,n){var r=Yn(wn++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Gc(void 0,t),function(a){var l=r.__N?r.__N[0]:r.__[0],c=r.t(l,a);l!==c&&(r.__N=[c,r.__[1]],r.__c.setState({}))}],r.__c=Ce,!Ce.u)){var s=function(a,l,c){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(h){return!!h.__c});if(d.every(function(h){return!h.__N}))return!o||o.call(this,a,l,c);var u=!1;return d.forEach(function(h){if(h.__N){var f=h.__[0];h.__=h.__N,h.__N=void 0,f!==h.__[0]&&(u=!0)}}),!(!u&&r.__c.props===a)&&(!o||o.call(this,a,l,c))};Ce.u=!0;var o=Ce.shouldComponentUpdate,i=Ce.componentWillUpdate;Ce.componentWillUpdate=function(a,l,c){if(this.__e){var d=o;o=void 0,s(a,l,c),o=d}i&&i.call(this,a,l,c)},Ce.shouldComponentUpdate=s}return r.__N||r.__}function Te(e,t){var n=Yn(wn++,3);!Ve.__s&&Ui(n.__H,t)&&(n.__=e,n.i=t,Ce.__H.__h.push(n))}function yn(e,t){var n=Yn(wn++,4);!Ve.__s&&Ui(n.__H,t)&&(n.__=e,n.i=t,Ce.__h.push(n))}function ce(e){return Nr=5,at(function(){return{current:e}},[])}function Fi(e,t,n){Nr=6,yn(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function at(e,t){var n=Yn(wn++,7);return Ui(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Mn(e,t){return Nr=8,at(function(){return e},t)}function rn(e){var t=Ce.context[e.__c],n=Yn(wn++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(Ce)),t.props.value):e.__}function Vi(e,t){Ve.useDebugValue&&Ve.useDebugValue(t?t(e):e)}function Z$(e){var t=Yn(wn++,10),n=Ge();return t.__=e,Ce.componentDidCatch||(Ce.componentDidCatch=function(r,s){t.__&&t.__(r,s),n[1](r)}),[n[0],function(){n[1](void 0)}]}function Li(){var e=Yn(wn++,11);if(!e.__){for(var t=Ce.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function J$(){for(var e;e=Vc.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(uo),e.__H.__h.forEach(Bi),e.__H.__h=[]}catch(t){e.__H.__h=[],Ve.__e(t,e.__v)}}Ve.__b=function(e){Ce=null,Lc&&Lc(e)},Ve.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Hc&&Hc(e,t)},Ve.__r=function(e){Bc&&Bc(e),wn=0;var t=(Ce=e.__c).__H;t&&(Di===Ce?(t.__h=[],Ce.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=co,n.__N=n.i=void 0})):(t.__h.forEach(uo),t.__h.forEach(Bi),t.__h=[],wn=0)),Di=Ce},Ve.diffed=function(e){Uc&&Uc(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Vc.push(t)!==1&&Fc===Ve.requestAnimationFrame||((Fc=Ve.requestAnimationFrame)||Y$)(J$)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==co&&(n.__=n.__V),n.i=void 0,n.__V=co})),Di=Ce=null},Ve.__c=function(e,t){t.some(function(n){try{n.__h.forEach(uo),n.__h=n.__h.filter(function(r){return!r.__||Bi(r)})}catch(r){t.some(function(s){s.__h&&(s.__h=[])}),t=[],Ve.__e(r,n.__v)}}),zc&&zc(e,t)},Ve.unmount=function(e){jc&&jc(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{uo(r)}catch(s){t=s}}),n.__H=void 0,t&&Ve.__e(t,n.__v))};var Wc=typeof requestAnimationFrame=="function";function Y$(e){var t,n=function(){clearTimeout(r),Wc&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Wc&&(t=requestAnimationFrame(n))}function uo(e){var t=Ce,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),Ce=t}function Bi(e){var t=Ce;e.__c=e.__(),Ce=t}function Ui(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Gc(e,t){return typeof t=="function"?t(e):t}function qc(e,t){for(var n in t)e[n]=t[n];return e}function zi(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function fo(e,t){this.props=e,this.context=t}function Kc(e,t){function n(s){var o=this.props.ref,i=o==s.ref;return!i&&o&&(o.call?o(null):o.current=null),t?!t(this.props,s)||!i:zi(this.props,s)}function r(s){return this.shouldComponentUpdate=n,p(e,s)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(fo.prototype=new Ht).isPureReactComponent=!0,fo.prototype.shouldComponentUpdate=function(e,t){return zi(this.props,e)||zi(this.state,t)};var Zc=re.__b;re.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Zc&&Zc(e)};var X$=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Rn(e){function t(n){var r=qc({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=X$,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Jc=function(e,t){return e==null?null:gn(gn(e).map(t))},Yc={map:Jc,forEach:Jc,count:function(e){return e?gn(e).length:0},only:function(e){var t=gn(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:gn},Q$=re.__e;re.__e=function(e,t,n,r){if(e.then){for(var s,o=t;o=o.__;)if((s=o.__c)&&s.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),s.__c(e,t)}Q$(e,t,n,r)};var Xc=re.unmount;function Qc(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=qc({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return Qc(r,t,n)})),e}function eu(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return eu(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function hs(){this.__u=0,this.t=null,this.__b=null}function tu(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function nu(e){var t,n,r;function s(o){if(t||(t=e()).then(function(i){n=i.default||i},function(i){r=i}),r)throw r;if(!n)throw t;return p(n,o)}return s.displayName="Lazy",s.__f=!0,s}function Rr(){this.u=null,this.o=null}re.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Xc&&Xc(e)},(hs.prototype=new Ht).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var s=tu(r.__v),o=!1,i=function(){o||(o=!0,n.__R=null,s?s(a):a())};n.__R=i;var a=function(){if(!--r.__u){if(r.state.__a){var l=r.state.__a;r.__v.__k[0]=eu(l,l.__c.__P,l.__c.__O)}var c;for(r.setState({__a:r.__b=null});c=r.t.pop();)c.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(i,i)},hs.prototype.componentWillUnmount=function(){this.t=[]},hs.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Qc(this.__b,n,r.__O=r.__P)}this.__b=null}var s=t.__a&&p(Ie,null,e.fallback);return s&&(s.__u&=-33),[p(Ie,null,t.__a?null:e.children),s]};var ru=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function e0(e){return this.getChildContext=function(){return e.context},e.children}function t0(e){var t=this,n=e.i;t.componentWillUnmount=function(){Tn(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(r){this.childNodes.push(r),t.i.appendChild(r)},insertBefore:function(r,s){this.childNodes.push(r),t.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.i.removeChild(r)}}),Tn(p(e0,{context:t.context},e.__v),t.l)}function su(e,t){var n=p(t0,{__v:e,i:t});return n.containerInfo=t,n}(Rr.prototype=new Ht).__a=function(e){var t=this,n=tu(t.__v),r=t.o.get(e);return r[0]++,function(s){var o=function(){t.props.revealOrder?(r.push(s),ru(t,e,r)):s()};n?n(o):o()}},Rr.prototype.render=function(e){this.u=null,this.o=new Map;var t=gn(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},Rr.prototype.componentDidUpdate=Rr.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){ru(e,n,t)})};var ou=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,n0=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|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]/,r0=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,s0=/[A-Z0-9]/g,o0=typeof document<"u",i0=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function iu(e,t,n){return t.__k==null&&(t.textContent=""),Tn(e,t),typeof n=="function"&&n(),e?e.__c:null}function au(e,t,n){return Pi(e,t),typeof n=="function"&&n(),e?e.__c:null}Ht.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Ht.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var lu=re.event;function a0(){}function l0(){return this.cancelBubble}function c0(){return this.defaultPrevented}re.event=function(e){return lu&&(e=lu(e)),e.persist=a0,e.isPropagationStopped=l0,e.isDefaultPrevented=c0,e.nativeEvent=e};var ji,u0={enumerable:!1,configurable:!0,get:function(){return this.class}},cu=re.vnode;re.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,s={};for(var o in n){var i=n[o];if(!(o==="value"&&"defaultValue"in n&&i==null||o0&&o==="children"&&r==="noscript"||o==="class"||o==="className")){var a=o.toLowerCase();o==="defaultValue"&&"value"in n&&n.value==null?o="value":o==="download"&&i===!0?i="":a==="translate"&&i==="no"?i=!1:a==="ondoubleclick"?o="ondblclick":a!=="onchange"||r!=="input"&&r!=="textarea"||i0(n.type)?a==="onfocus"?o="onfocusin":a==="onblur"?o="onfocusout":r0.test(o)?o=a:r.indexOf("-")===-1&&n0.test(o)?o=o.replace(s0,"-$&").toLowerCase():i===null&&(i=void 0):a=o="oninput",a==="oninput"&&s[o=a]&&(o="oninputCapture"),s[o]=i}}r=="select"&&s.multiple&&Array.isArray(s.value)&&(s.value=gn(n.children).forEach(function(l){l.props.selected=s.value.indexOf(l.props.value)!=-1})),r=="select"&&s.defaultValue!=null&&(s.value=gn(n.children).forEach(function(l){l.props.selected=s.multiple?s.defaultValue.indexOf(l.props.value)!=-1:s.defaultValue==l.props.value})),n.class&&!n.className?(s.class=n.class,Object.defineProperty(s,"className",u0)):(n.className&&!n.class||n.class&&n.className)&&(s.class=s.className=n.className),t.props=s}(e),e.$$typeof=ou,cu&&cu(e)};var uu=re.__r;re.__r=function(e){uu&&uu(e),ji=e.__c};var du=re.diffed;re.diffed=function(e){du&&du(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),ji=null};var fu={ReactCurrentDispatcher:{current:{readContext:function(e){return ji.__n[e.__c].props.value},useCallback:Mn,useContext:rn,useDebugValue:Vi,useDeferredValue:qi,useEffect:Te,useId:Li,useImperativeHandle:Fi,useInsertionEffect:Zi,useLayoutEffect:yn,useMemo:at,useReducer:Mr,useRef:ce,useState:Ge,useSyncExternalStore:Ji,useTransition:Ki}}},d0="17.0.2";function hu(e){return p.bind(null,e)}function Pr(e){return!!e&&e.$$typeof===ou}function mu(e){return Pr(e)&&e.type===Ie}function pu(e){return!!e&&!!e.displayName&&(typeof e.displayName=="string"||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function Hi(e){return Pr(e)?Oi.apply(null,arguments):e}function $u(e){return!!e.__k&&(Tn(null,e),!0)}function gu(e){return e&&(e.base||e.nodeType===1&&e)||null}var wu=function(e,t){return e(t)},Wi=function(e,t){return e(t)},yu=Ie;function Gi(e){e()}function qi(e){return e}function Ki(){return[!1,Gi]}var Zi=yn,bu=Pr;function Ji(e,t){var n=t(),r=Ge({h:{__:n,v:t}}),s=r[0].h,o=r[1];return yn(function(){s.__=n,s.v=t,Yi(s)&&o({h:s})},[e,n,t]),Te(function(){return Yi(s)&&o({h:s}),e(function(){Yi(s)&&o({h:s})})},[e]),n}function Yi(e){var t,n,r=e.v,s=e.__;try{var o=r();return!((t=s)===(n=o)&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}}var q={useState:Ge,useId:Li,useReducer:Mr,useEffect:Te,useLayoutEffect:yn,useInsertionEffect:Zi,useTransition:Ki,useDeferredValue:qi,useSyncExternalStore:Ji,startTransition:Gi,useRef:ce,useImperativeHandle:Fi,useMemo:at,useCallback:Mn,useContext:rn,useDebugValue:Vi,version:"17.0.2",Children:Yc,render:iu,hydrate:au,unmountComponentAtNode:$u,createPortal:su,createElement:p,createContext:Nn,createFactory:hu,cloneElement:Hi,createRef:Ii,Fragment:Ie,isValidElement:Pr,isElement:bu,isFragment:mu,isMemo:pu,findDOMNode:gu,Component:Ht,PureComponent:fo,memo:Kc,forwardRef:Rn,flushSync:Wi,unstable_batchedUpdates:wu,StrictMode:yu,Suspense:hs,SuspenseList:Rr,lazy:nu,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:fu};const Xi=Object.freeze(Object.defineProperty({__proto__:null,Children:Yc,Component:Ht,Fragment:Ie,PureComponent:fo,StrictMode:yu,Suspense:hs,SuspenseList:Rr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:fu,cloneElement:Hi,createContext:Nn,createElement:p,createFactory:hu,createPortal:su,createRef:Ii,default:q,findDOMNode:gu,flushSync:Wi,forwardRef:Rn,hydrate:au,isElement:bu,isFragment:mu,isMemo:pu,isValidElement:Pr,lazy:nu,memo:Kc,render:iu,startTransition:Gi,unmountComponentAtNode:$u,unstable_batchedUpdates:wu,useCallback:Mn,useContext:rn,useDebugValue:Vi,useDeferredValue:qi,useEffect:Te,useErrorBoundary:Z$,useId:Li,useImperativeHandle:Fi,useInsertionEffect:Zi,useLayoutEffect:yn,useMemo:at,useReducer:Mr,useRef:ce,useState:Ge,useSyncExternalStore:Ji,useTransition:Ki,version:d0},Symbol.toStringTag,{value:"Module"})),f0=e=>{Te(()=>{const t=e();return()=>{t.Dispose()}})},h0=(e,t)=>{Te(()=>{const n=e();return()=>{n.Dispose()}},t)},m0=e=>{yn(()=>{const t=e();return()=>{t.Dispose()}})},E=q,p0=f0,_u=h0,$0=m0;function g0(e,t,n,r){const s=E.memo(e,be(He(rt(kn,n),pe())));return Er(o=>{e.displayName=o},ci(t)),o=>{const i=w0(r,o);return E.createElement(s,i)}}function w0(e,t){if(e==null)return t;{const n=e;return t.key=n(t),t}}function ms(e){return{Dispose(){e()}}}function vu(e,t){_u(e,t)}function y0(e){$0(t=>(e(),ms(()=>{})))}function Qi(e){const t=E.useRef(!1);_0(()=>{t.current||(t.current=!0,e())},[])}function xu(e){const t=E.useRef(void 0),n=E.useRef(!1),r=E.useRef(!1);n.current&&(r.current=!0),vu(()=>{let s;return n.current?s=void 0:(n.current=!0,t.current=nt(e()),s=r.current?t.current:void 0),{Dispose(){Er(o=>{ye(o)},ci(s))}}},[])}function b0(e){p0(t=>(e(),ms(()=>{})))}function _0(e,t){_u(n=>(e(),ms(()=>{})),t)}function v0(e,t){const n=He(t,[]);return E.useCallback(e,n)}function Cu(e){return E.useRef(e)}function x0(e,t,n){return g0(e,void 0,li(n),li(t))}function C0(e,t){const n=E.createContext(He(t,void 0));return Er(r=>{n.displayName=r},ci(e)),n}function S0(e,t,n){return E.createElement(e.Provider,{value:t},...n)}function Xn(e){return E.useContext(e)}function Su(e){const t=Cu(e),n=v0(r=>t.current(r),[]);return y0(()=>{t.current=e}),n}function Pn(e){return E.useState(e)}class ku{constructor(t=!1){this._id=0,this._cancelled=t,this._listeners=new Map}get isCancelled(){return this._cancelled}cancel(){if(!this._cancelled){this._cancelled=!0;for(const[,t]of this._listeners)t()}}addListener(t){const n=this._id;return this._listeners.set(this._id++,t),n}removeListener(t){return this._listeners.delete(t)}register(t,n){const r=this,s=this.addListener(n==null?t:()=>t(n));return{Dispose(){r.removeListener(s)}}}Dispose(){}}class ho extends Error{constructor(){super("The operation was canceled"),Object.setPrototypeOf(this,ho.prototype)}}class ea{static get maxTrampolineCallCount(){return 2e3}constructor(){this.callCount=0}incrementAndCheck(){return this.callCount++>ea.maxTrampolineCallCount}hijack(t){this.callCount=0,setTimeout(t,0)}}function bn(e){return t=>{if(t.cancelToken.isCancelled)t.onCancel(new ho);else if(t.trampoline.incrementAndCheck())t.trampoline.hijack(()=>{try{e(t)}catch(n){t.onError(Bs(n))}});else try{e(t)}catch(n){t.onError(Bs(n))}}}function k0(e,t){return bn(n=>{e({onSuccess:r=>{try{t(r)(n)}catch(s){n.onError(Bs(s))}},onError:n.onError,onCancel:n.onCancel,cancelToken:n.cancelToken,trampoline:n.trampoline})})}function A0(e){return bn(t=>t.onSuccess(e))}class E0{Bind(t,n){return k0(t,n)}Combine(t,n){return this.Bind(t,()=>n)}Delay(t){return bn(n=>t()(n))}For(t,n){const r=t[Symbol.iterator]();let s=r.next();return this.While(()=>!s.done,this.Delay(()=>{const o=n(s.value);return s=r.next(),o}))}Return(t){return A0(t)}ReturnFrom(t){return t}TryFinally(t,n){return bn(r=>{t({onSuccess:s=>{n(),r.onSuccess(s)},onError:s=>{n(),r.onError(s)},onCancel:s=>{n(),r.onCancel(s)},cancelToken:r.cancelToken,trampoline:r.trampoline})})}TryWith(t,n){return bn(r=>{t({onSuccess:r.onSuccess,onCancel:r.onCancel,cancelToken:r.cancelToken,trampoline:r.trampoline,onError:s=>{try{n(s)(r)}catch(o){r.onError(Bs(o))}}})})}Using(t,n){return this.TryFinally(n(t),()=>t.Dispose())}While(t,n){return t()?this.Bind(n,()=>this.While(t,n)):this.Return(void 0)}Zero(){return bn(t=>t.onSuccess(void 0))}}const U=new E0;function ta(e){}function I0(e){return new ku(!1)}function T0(e){e.cancel()}function N0(e){return e!=null&&e.isCancelled}const Au=new ku;function M0(e){return bn(t=>{e({onSuccess:n=>t.onSuccess(Up(n)),onError:n=>t.onSuccess(zp(n)),onCancel:t.onCancel,cancelToken:t.cancelToken,trampoline:t.trampoline})})}function R0(e){return bn(t=>e([t.onSuccess,t.onError,t.onCancel]))}function Eu(e){return bn(t=>{let n;const r=setTimeout(()=>{t.cancelToken.removeListener(n),t.onSuccess(void 0)},e);n=t.cancelToken.addListener(()=>{clearTimeout(r),t.onCancel(new ho)})})}function P0(e,t){return Iu(e,t)}function Or(e,t){return P0(e,t)}function Iu(e,t,n,r,s){typeof t!="function"&&(s=t,t=void 0);const o=new ea;e({onSuccess:t||ta,onError:n||ta,onCancel:r||ta,cancelToken:s||Au,trampoline:o})}function O0(e,t){return new Promise((n,r)=>Iu(e,n,r,r,Au))}class Tu{constructor(t,n){this.k=t,this.v=n}}function mo(e,t){return new Tu(e,t)}function yt(e){return e.k}function Mt(e){return e.v}class qe extends Tu{constructor(t,n,r,s,o){super(t,n),this.left=r,this.right=s,this.h=o|0}}function po(e,t,n,r,s){return new qe(e,t,n,r,s)}function bt(e){return e.left}function _t(e){return e.right}function Qn(e){return e.h}function Fv(){}function Nu(e,t){e:for(;;){const n=e,r=t;if(r!=null){const s=M(r);if(s instanceof qe){const o=s;e=Nu(n+1,bt(o)),t=_t(o);continue e}else return n+1|0}else return n|0}}function D0(e){return Nu(0,e)}function Wt(e,t,n,r){let s,o,i;const a=e;if(a!=null){const u=M(a);i=u instanceof qe?(s=u,Qn(s)):1}else i=0;let l;const c=r;if(c!=null){const u=M(c);l=u instanceof qe?(o=u,Qn(o)):1}else l=0;const d=(i<l?l:i)|0;return d===0?mo(t,n):po(t,n,e,r,d+1)}function Mu(e,t,n,r){let s,o,i,a,l,c,d,u,h;const f=e;if(f!=null){const $=M(f);h=$ instanceof qe?(s=$,Qn(s)):1}else h=0;let m;const w=r;if(w!=null){const $=M(w);m=$ instanceof qe?(o=$,Qn(o)):1}else m=0;if(m>h+2){const $=M(r);if($ instanceof qe){const v=$;if(i=bt(v),(i!=null?(a=M(i),a instanceof qe?(l=a,Qn(l)):1):0)>h+1){const _=M(bt(v));if(_ instanceof qe){const C=_;return Wt(Wt(e,t,n,bt(C)),yt(C),Mt(C),Wt(_t(C),yt(v),Mt(v),_t(v)))}else throw new Error("internal error: Map.rebalance")}else return Wt(Wt(e,t,n,bt(v)),yt(v),Mt(v),_t(v))}else throw new Error("internal error: Map.rebalance")}else if(h>m+2){const $=M(e);if($ instanceof qe){const v=$;if(c=_t(v),(c!=null?(d=M(c),d instanceof qe?(u=d,Qn(u)):1):0)>m+1){const _=M(_t(v));if(_ instanceof qe){const C=_;return Wt(Wt(bt(v),yt(v),Mt(v),bt(C)),yt(C),Mt(C),Wt(_t(C),t,n,r))}else throw new Error("internal error: Map.rebalance")}else return Wt(bt(v),yt(v),Mt(v),Wt(_t(v),t,n,r))}else throw new Error("internal error: Map.rebalance")}else return Wt(e,t,n,r)}function Dr(e,t,n,r){if(r!=null){const s=M(r),o=e.Compare(t,yt(s))|0;if(s instanceof qe){const i=s;return o<0?Mu(Dr(e,t,n,bt(i)),yt(i),Mt(i),_t(i)):o===0?po(t,n,bt(i),_t(i),Qn(i)):Mu(bt(i),yt(i),Mt(i),Dr(e,t,n,_t(i)))}else return o<0?po(t,n,void 0,r,2):o===0?mo(t,n):po(t,n,r,void 0,2)}else return mo(t,n)}function Ru(e,t,n){e:for(;;){const r=e,s=t,o=n;if(o!=null){const i=M(o),a=r.Compare(s,yt(i))|0;if(a===0)return nt(Mt(i));if(i instanceof qe){const l=i;e=r,t=s,n=a<0?bt(l):_t(l);continue e}else return}else return}}function F0(e,t,n){const r=Ru(e,t,n);if(r==null)throw new Error;return M(r)}function V0(e,t,n){e:for(;;){const r=e,s=t,o=n;if(o!=null){const i=M(o),a=r.Compare(s,yt(i))|0;if(i instanceof qe){const l=i;if(a<0){e=r,t=s,n=bt(l);continue e}else{if(a===0)return!0;e=r,t=s,n=_t(l);continue e}}else return a===0}else return!1}}function Pu(e,t){e:for(;;){const n=e,r=t;if(r!=null){const s=M(r);if(s instanceof qe){const o=s;Pu(n,bt(o)),n(yt(o),Mt(o)),e=n,t=_t(o);continue e}else n(yt(s),Mt(s))}break}}function L0(e,t){Pu(e,t)}function B0(e,t,n){let r=n;L0((s,o)=>{It(t,r,[s,o]),r=r+1|0},e)}function U0(e,t){return fn((n,r)=>Dr(e,r[0],r[1],n),void 0,t)}function z0(e,t,n){e:for(;;){const r=e,s=t,o=n;if(o["System.Collections.IEnumerator.MoveNext"]()){const i=o["System.Collections.Generic.IEnumerator`1.get_Current"]();e=r,t=Dr(r,i[0],i[1],s),n=o;continue e}else return s}}function j0(e,t){let n=void 0;for(let r=0;r<=t.length-1;r++){const s=he(r,t);n=Dr(e,s[0],s[1],n)}return n}function Ou(e,t){if(Qt(t))return j0(e,t);if(t instanceof gt)return U0(e,t);{const n=Pe(t);try{return z0(e,void 0,n)}finally{ye(n)}}}class H0 extends ee{constructor(t,n){super(),this.stack=t,this.started=n}}function Du(e){e:for(;;){const t=e;if(K(t))return Ue();{const n=b(t),r=F(t);if(r!=null){const s=M(r);if(s instanceof qe){const o=s;e=De([bt(o),mo(yt(o),Mt(o)),_t(o)],n);continue e}else return t}else{e=n;continue e}}}}function Fu(e){return new H0(Du(ne(e)),!1)}function W0(){throw new Error("enumeration not started")}function G0(){throw new Error("enumeration already finished")}function Vu(e){if(e.started){const t=e.stack;if(K(t))return G0();if(F(t)!=null){const n=M(F(t));if(n instanceof qe)throw new Error("Please report error: Map iterator, unexpected stack for current");return[yt(n),Mt(n)]}else throw new Error("Please report error: Map iterator, unexpected stack for current")}else return W0()}function q0(e){if(e.started){const t=e.stack;if(K(t))return!1;if(F(t)!=null){if(M(F(t))instanceof qe)throw new Error("Please report error: Map iterator, unexpected stack for moveNext");return e.stack=Du(b(t)),!K(e.stack)}else throw new Error("Please report error: Map iterator, unexpected stack for moveNext")}else return e.started=!0,!K(e.stack)}function Lu(e){let t=Fu(e);return{"System.Collections.Generic.IEnumerator`1.get_Current"(){return Vu(t)},"System.Collections.IEnumerator.get_Current"(){return Vu(t)},"System.Collections.IEnumerator.MoveNext"(){return q0(t)},"System.Collections.IEnumerator.Reset"(){t=Fu(e)},Dispose(){}}}class $o{constructor(t,n){this.comparer=t,this.tree=n}GetHashCode(){return Y0(this)|0}Equals(t){const n=this;if(t instanceof $o){const r=t,s=Pe(n);try{const o=Pe(r);try{const i=()=>{const a=s["System.Collections.IEnumerator.MoveNext"]();if(a===o["System.Collections.IEnumerator.MoveNext"]())if(a){const l=s["System.Collections.Generic.IEnumerator`1.get_Current"](),c=o["System.Collections.Generic.IEnumerator`1.get_Current"]();return Be(l[0],c[0])&&Be(l[1],c[1])?i():!1}else return!0;else return!1};return i()}finally{ye(o)}}finally{ye(s)}}else return!1}toString(){return"map ["+oe("; ",Fe(n=>Ml("({0}, {1})",n[0],n[1]),this))+"]"}get[Symbol.toStringTag](){return"FSharpMap"}toJSON(){const t=this;return Array.from(t)}GetEnumerator(){return Lu(this.tree)}[Symbol.iterator](){return Jr(Pe(this))}"System.Collections.IEnumerable.GetEnumerator"(){return Lu(this.tree)}CompareTo(t){const n=this;if(t instanceof $o)return Np((s,o)=>{const i=n.comparer.Compare(s[0],o[0])|0;return(i!==0?i:Vt(s[1],o[1]))|0},n,t)|0;throw new Error("not comparable\\nParameter name: obj")}"System.Collections.Generic.ICollection`1.Add2B595"(t){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"(t){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Contains2B595"(t){const n=this;return Uu(n,t[0])&&Be(Bu(n,t[0]),t[1])}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(t,n){B0(this.tree,t,n)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return na(this)|0}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return na(this)|0}get size(){return na(this)|0}clear(){throw new Error("Map cannot be mutated")}delete(t){throw new Error("Map cannot be mutated")}entries(){return Fe(n=>[n[0],n[1]],this)}get(t){return Bu(this,t)}has(t){return Uu(this,t)}keys(){return Fe(n=>n[0],this)}set(t,n){throw new Error("Map cannot be mutated")}values(){return Fe(n=>n[1],this)}forEach(t,n){const r=this;Er(s=>{t(s[1],s[0],r)},r)}}function go(e,t){return new $o(e,t)}function K0(e){return go(e,void 0)}function Z0(e,t,n){return go(e.comparer,Dr(e.comparer,t,n,e.tree))}function Bu(e,t){return F0(e.comparer,t,e.tree)}function na(e){return D0(e.tree)}function Uu(e,t){return V0(e.comparer,t,e.tree)}function J0(e,t){return Ru(e.comparer,t,e.tree)}function Y0(e){const t=(s,o)=>(s<<1)+o+631;let n=0;const r=Pe(e);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const s=r["System.Collections.Generic.IEnumerator`1.get_Current"]();n=t(n,un(s[0]))|0,n=t(n,un(s[1]))|0}}finally{ye(r)}return n|0}function zu(e,t,n){return Z0(n,e,t)}function ju(e,t){return J0(t,e)}function X0(e,t){return go(t,Ou(t,e))}function Q0(e,t){return go(t,Ou(t,e))}function ra(e){return K0(e)}class me extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["HasNotStartedYet","InProgress","Resolved","Failed"]}}function Hu(e,t){const n=Cu(I0());return xu(()=>ms(()=>{T0(n.current)})),Su(r=>{N0(n.current)||Or(U.Delay(()=>U.TryWith(U.Delay(()=>(t(new me(1,[])),U.Bind(e(r),s=>(t(new me(2,[s])),U.Zero())))),s=>(t(new me(3,[s])),U.Zero()))),n.current)})}class eg{constructor(t,n,r){this.OnNext=t,this.OnError=n||(s=>{}),this.OnCompleted=r||(()=>{})}}function tg(e,t){t.Subscribe(new eg(e))}class ng{constructor(){this.delegates=[]}_add(t){this.delegates.push(t)}_remove(t){const n=this.delegates.indexOf(t);n>-1&&this.delegates.splice(n,1)}get Publish(){return sg(t=>{this._add(t)},t=>{this._remove(t)})}Trigger(t,n){let r=null;const s=n===void 0?t:(r=t,n);this.delegates.forEach(o=>{o(r,s)})}}let rg=class extends ng{};function sg(e,t){return{AddHandler(n){e(n)},RemoveHandler(n){t(n)},Subscribe(n){const r=(s,o)=>n.OnNext(o);return e(r),{Dispose(){t(r)}}}}}class og{constructor(t){this._enabled=!1,this._isDisposed=!1,this._intervalId=0,this._timeoutId=0,this.Interval=t&&t>0?t:100,this.AutoReset=!0,this._elapsed=new rg}Elapsed(){return this._elapsed.Publish}get Enabled(){return this._enabled}set Enabled(t){!this._isDisposed&&this._enabled!==t&&(this._enabled=t,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}}function ig(e,t){console.error(nt(e),t)}function ag(e,t){let n,r=new og(e);r.AutoReset=!1,n=r,tg(t,n.Elapsed()),n.Enabled=!0,n.Start()}function Wu(e,t,n){eo(r=>{try{r(t)}catch(s){e(s)}},n)}function Oe(){return Ue()}function Xe(e){return ne(e)}function Gu(e,t,n,r){return ne(s=>{e(U.Delay(()=>U.Bind(M0(t(n)),o=>{const i=o;return i.tag===0&&s(r(i.fields[0])),U.Zero()})))})}function qu(e){ag(1,t=>{Or(e)})}function ps(e,t){if(t.indexOf(e)===0)return t}function Ku(e,t){if(Cm(t,e))return t}function lg(e){return t=>{let n,r,s,o,i,a;return n=ps("/",t),n!=null?(r=n,"#"+r):(s=ps("#/",t),s!=null?(o=s,o):(i=ps("#",t),i!=null?(a=i,"#/"+Pl(a,1,a.length-1)):"#/"+t))}}function er(e,t){return lg()(oe("/",qn(n=>n.indexOf("?")>=0||n.indexOf("#")===0||n.indexOf("/")===0?n:encodeURIComponent(n),e)))}function ft(e,t,n){history.pushState(void 0,"",er(e));const r=document.createEvent("CustomEvent");r.initEvent("CUSTOM_NAVIGATION_EVENT",!0,!0),window.dispatchEvent(r)}function Zu(e,t){return Um(n=>{if(Rl(n))return Ue();{const r=Am(n,"#");if(r==="?")return Ue();if(ps("?",r)!=null)return ne(r);{const s=r.split("?");if(!di((o,i)=>o===i,s)&&s.length===1){const o=he(0,s);return ne(decodeURIComponent(o))}else if(!di((o,i)=>o===i,s)&&s.length===2)if(he(1,s)===""){const o=he(0,s);return ne(decodeURIComponent(o))}else{const o=he(0,s),i=he(1,s);return k([decodeURIComponent(o),"?"+i])}else return Ue()}}},k(ai(ps("#",e)!=null?Pl(e,1,e.length-1):t===1&&(Ku("#",e)!=null||Ku("#/",e)!=null)?"":e,["/"],void 0,0)))}function cg(e,t,n){return t(Zu(e===2?window.location.pathname+window.location.search:window.location.hash,e))}const ug=x0(e=>{const t=Su(r=>{const s=He(e.onUrlChanged,o=>{});cg(He(e.hashMode,1),s)});xu(()=>(window.navigator.userAgent.indexOf("Trident")>=0||window.navigator.userAgent.indexOf("MSIE")>=0?window.addEventListener("hashchange",t):window.addEventListener("popstate",t),window.addEventListener("CUSTOM_NAVIGATION_EVENT",t),ms(()=>{window.navigator.userAgent.indexOf("Trident")>=0||window.navigator.userAgent.indexOf("MSIE")>=0?window.removeEventListener("hashchange",t):window.removeEventListener("popstate",t),window.removeEventListener("CUSTOM_NAVIGATION_EVENT",t)}))),Qi(()=>{const r=document.createEvent("CustomEvent");r.initEvent("CUSTOM_NAVIGATION_EVENT",!0,!0),window.dispatchEvent(r)});const n=e.application;return n??pe()});class _n extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["AccountId","Name"]}}class tr extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Asc","Desc"]}}function Ju(e){return e.tag===0?new tr(1,[]):new tr(0,[])}class $s extends H{constructor(t,n){super(),this.tag=0,this.fields=[t,n]}cases(){return["Sort"]}}const dg=new $s(new _n(1,[]),new tr(0,[]));function fg(e){return[e.fields[0],e.fields[1]]}function Yu(e){return e.fields[0]}function Xu(e){return e.fields[1]}function Qu(e,t){const n=t.fields[0],r=t.fields[1];return e.tag===1?n.tag===1?new $s(new _n(1,[]),Ju(r)):new $s(new _n(1,[]),new tr(0,[])):n.tag===0?new $s(new _n(0,[]),Ju(r)):new $s(new _n(0,[]),new tr(0,[]))}class ed extends H{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["SearchText"]}}const hg=new ed("");function mg(e){return new ed(e)}function td(e){return e.fields[0]}class pg extends H{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["PageSize"]}}function $g(e){return new pg(e)}function nd(e){return e.fields[0]}class sa extends ee{constructor(t,n,r){super(),this.SearchText=t,this.Sort=n,this.PageSize=r}}class gg extends H{constructor(t,n){super(),this.tag=0,this.fields=[t,n]}cases(){return["AccountKey"]}}function rd(e){return[e.fields[0],e.fields[1]]}function wg(e,t){return new gg(e,t)}function yg(e){const t=rd(e);return[t[0],t[1]]}function bg(){return new Vp([],{Equals:Be,GetHashCode:Dh})}function sd(e,t){let n,r=pe();if(n=[Zl(e,t,new $t(()=>r,s=>{r=s})),r],n[0])return n[1]}function oa(e,t,n){return e.set(t,n),e}class _g extends ee{constructor(t,n,r,s,o,i){super(),this.StreamId=t,this.Name=n,this.Website=r,this.ContactDetails=s,this.Notes=o,this.AccountProvisioningMode=i}}function vg(e){const t=vi(e.Name);if(t.tag===1)return new g(1,[t.fields[0]]);{const n=oc(e.Website);if(n.tag===1)return new g(1,[n.fields[0]]);{let r;const s=e.ContactDetails;if(s!=null){const o=f$(s);r=o.tag===1?new g(1,[o.fields[0]]):new g(0,[o.fields[0]])}else r=new g(0,[void 0]);return r.tag===1?new g(1,[r.fields[0]]):new g(0,[new _g(new rc(e.StreamId),t.fields[0],n.fields[0],r.fields[0],h$(e.Notes),e.AccountProvisioningMode)])}}}function ia(e,t){return Hm(n=>Ir(n.StreamId)===to(t),e)}class J extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["PartnerList","Partner","PartnerProfilesDirectory","PartnerAccountList","PartnerSuperConfiguration","PartnerBenefitsOnboardingConfiguration","PartnerBankDetailsConfiguration","PartnerWorkspace","Account","AccountProfilesDirectory","AccountUsers","AccountSuperConfiguration","AccountBenefitsOnboardingConfiguration","AccountBankDetailsConfiguration","AccountSalaryPackagingConfiguration","AccountWorkspace","NotFound"]}}function od(e){let t,n,r,s,o,i,a,l,c,d,u,h,f,m,w,$,v,_,C,R,D,Y,de,ve;if(K(e))t=16;else if(F(e)==="account-registry")if(K(b(e)))t=16;else if(F(b(e))==="partners")if(K(b(b(e))))t=0;else if(K(b(b(b(e)))))t=1,n=F(b(b(e)));else switch(F(b(b(b(e))))){case"accounts":{if(K(b(b(b(b(e))))))t=2,r=F(b(b(e)));else if(K(b(b(b(b(b(e)))))))t=8,c=F(b(b(b(b(e))))),d=F(b(b(e)));else switch(F(b(b(b(b(b(e))))))){case"directory":{K(b(b(b(b(b(b(e)))))))?(t=9,u=F(b(b(b(b(e))))),h=F(b(b(e)))):t=16;break}case"users":{K(b(b(b(b(b(b(e)))))))?(t=10,f=F(b(b(b(b(e))))),m=F(b(b(e)))):t=16;break}case"super-configuration":{K(b(b(b(b(b(b(e)))))))?(t=11,w=F(b(b(b(b(e))))),$=F(b(b(e)))):t=16;break}case"benefits-onboarding-configuration":{K(b(b(b(b(b(b(e)))))))?(t=12,v=F(b(b(b(b(e))))),_=F(b(b(e)))):t=16;break}case"bank-details-configuration":{K(b(b(b(b(b(b(e)))))))?(t=13,C=F(b(b(b(b(e))))),R=F(b(b(e)))):t=16;break}case"salary-packaging-configuration":{K(b(b(b(b(b(b(e)))))))?(t=14,D=F(b(b(b(b(e))))),Y=F(b(b(e)))):t=16;break}case"workspace":{K(b(b(b(b(b(b(e)))))))?(t=15,de=F(b(b(b(b(e))))),ve=F(b(b(e)))):t=16;break}default:t=16}break}case"super-configuration":{K(b(b(b(b(e)))))?(t=3,s=F(b(b(e)))):t=16;break}case"benefits-onboarding-configuration":{K(b(b(b(b(e)))))?(t=4,o=F(b(b(e)))):t=16;break}case"directory":{K(b(b(b(b(e)))))?(t=5,i=F(b(b(e)))):t=16;break}case"bank-details-configuration":{K(b(b(b(b(e)))))?(t=6,a=F(b(b(e)))):t=16;break}case"workspace":{K(b(b(b(b(e)))))?(t=7,l=F(b(b(e)))):t=16;break}default:t=16}else t=16;else t=16;switch(t){case 0:return new J(0,[]);case 1:return new J(1,[it(n)]);case 2:return new J(3,[it(r)]);case 3:return new J(4,[it(s)]);case 4:return new J(5,[it(o)]);case 5:return new J(2,[it(i)]);case 6:return new J(6,[it(a)]);case 7:return new J(7,[it(l)]);case 8:return new J(8,[it(d),jt(c)]);case 9:return new J(9,[it(h),jt(u)]);case 10:return new J(10,[it(m),jt(f)]);case 11:return new J(11,[it($),jt(w)]);case 12:return new J(12,[it(_),jt(v)]);case 13:return new J(13,[it(R),jt(C)]);case 14:return new J(14,[it(Y),jt(D)]);case 15:return new J(15,[it(ve),jt(de)]);default:return new J(16,[])}}function gs(e){const t=(r,s)=>_e(A(()=>B(I("account-registry"),A(()=>B(I("partners"),A(()=>B(I(dt(r)),A(()=>s)))))))),n=(r,s,o)=>{const i=_e(A(()=>B(I("accounts"),A(()=>B(I(pn(s)),A(()=>o))))));return t(r,i)};switch(e.tag){case 3:return t(e.fields[0],["accounts"]);case 4:return t(e.fields[0],["super-configuration"]);case 5:return t(e.fields[0],["benefits-onboarding-configuration"]);case 6:return t(e.fields[0],["bank-details-configuration"]);case 2:return t(e.fields[0],["directory"]);case 7:return t(e.fields[0],["workspace"]);case 8:return n(e.fields[0],e.fields[1],[]);case 9:return n(e.fields[0],e.fields[1],["directory"]);case 10:return n(e.fields[0],e.fields[1],["users"]);case 11:return n(e.fields[0],e.fields[1],["super-configuration"]);case 12:return n(e.fields[0],e.fields[1],["benefits-onboarding-configuration"]);case 13:return n(e.fields[0],e.fields[1],["bank-details-configuration"]);case 14:return n(e.fields[0],e.fields[1],["salary-packaging-configuration"]);case 15:return n(e.fields[0],e.fields[1],["workspace"]);case 16:case 0:return k(["account-registry","partners"]);default:return t(e.fields[0],[])}}function aa(e){switch(e.tag){case 3:{const t=["account-registry","partners",dt(e.fields[0]),"accounts"];return Xe(n=>{ft(k(t))})}case 4:{const t=["account-registry","partners",dt(e.fields[0]),"super-configuration"];return Xe(n=>{ft(k(t))})}case 5:{const t=["account-registry","partners",dt(e.fields[0]),"benefits-onboarding-configuration"];return Xe(n=>{ft(k(t))})}case 6:{const t=["account-registry","partners",dt(e.fields[0]),"bank-details-configuration"];return Xe(n=>{ft(k(t))})}case 2:{const t=["account-registry","partners",dt(e.fields[0]),"directory"];return Xe(n=>{ft(k(t))})}case 7:{const t=["account-registry","partners",dt(e.fields[0]),"workspace"];return Xe(n=>{ft(k(t))})}case 8:{const t=["account-registry","partners",dt(e.fields[0]),"accounts",pn(e.fields[1])];return Xe(n=>{ft(k(t))})}case 9:{const t=["account-registry","partners",dt(e.fields[0]),"accounts",pn(e.fields[1]),"directory"];return Xe(n=>{ft(k(t))})}case 10:{const t=["account-registry","partners",dt(e.fields[0]),"accounts",pn(e.fields[1]),"users"];return Xe(n=>{ft(k(t))})}case 11:{const t=["account-registry","partners",dt(e.fields[0]),"accounts",pn(e.fields[1]),"super-configuration"];return Xe(n=>{ft(k(t))})}case 12:{const t=["account-registry","partners",dt(e.fields[0]),"accounts",pn(e.fields[1]),"benefits-onboarding-configuration"];return Xe(n=>{ft(k(t))})}case 13:{const t=["account-registry","partners",dt(e.fields[0]),"accounts",pn(e.fields[1]),"bank-details-configuration"];return Xe(n=>{ft(k(t))})}case 14:{const t=["account-registry","partners",dt(e.fields[0]),"accounts",pn(e.fields[1]),"salary-packaging-configuration"];return Xe(n=>{ft(k(t))})}case 15:{const t=["account-registry","partners",dt(e.fields[0]),"accounts",pn(e.fields[1]),"workspace"];return Xe(n=>{ft(k(t))})}case 0:case 16:return Oe();default:{const t=["account-registry","partners",dt(e.fields[0])];return Xe(n=>{ft(k(t))})}}}function xg(e,t){switch(t.tag){case 1:return new me(1,[]);case 2:return t.fields[0].tag===1?new me(2,[new g(1,[t.fields[0].fields[0]])]):new me(2,[new g(0,[e(t.fields[0].fields[0])])]);case 3:return new me(3,[t.fields[0]]);default:return new me(0,[])}}class id extends ee{constructor(t,n){super(),this.Name=t,this.LegalEntity=n}}class ad extends ee{constructor(t,n){super(),this.BusinessName=t,this.BusinessNumber=n}}class ld extends ee{constructor(t,n){super(),this.ReadProtectedData=t,this.ProvisionAccounts=n}}function Cg(e){return new ld(zl("AccountRegistry.ReadProtectedData",e.Roles,{Equals:(t,n)=>t===n,GetHashCode:yr}),zl("AccountRegistry.ProvisionAccounts",e.Roles,{Equals:(t,n)=>t===n,GetHashCode:yr}))}const Sg=new ld(!1,!1);class W extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["BadPrimitive","BadPrimitiveExtra","BadType","BadField","BadPath","TooSmallArray","FailMessage","BadOneOf"]}}class Gt extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["PascalCase","CamelCase","SnakeCase"]}}function cd(e){return e.slice(void 0,1).toLowerCase()+e.slice(1,e.length)}function ud(e,t){switch(e.tag){case 2:return _m(cd(t),"[A-Z]","_$0").toLowerCase();case 0:return t;default:return cd(t)}}function dd(e,t){kg(t);const n=new Date(e);return n.offset=t??new Date().getTimezoneOffset()*-6e4,n}function kg(e){if(e!=null&&e!==0){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.")}}function Ag(){return dd(-621355968e5,0)}function Eg(e){const[t,n]=yl(e),r=n==null?t.getTimezoneOffset()*-6e4:n==="Z"?0:n*6e4;return dd(t.getTime(),r)}function Ig(e,t){try{return t.contents=Eg(e),!0}catch{return!1}}function ws(e){return e<0?Math.ceil(e):Math.floor(e)}function fd(e=0,t=0,n=0,r=0,s=0){switch(arguments.length){case 1:return Tg(arguments[0]);case 3:e=0,t=arguments[0],n=arguments[1],r=arguments[2],s=0;break}return e*864e5+t*36e5+n*6e4+r*1e3+s}function Tg(e){return Number(BigInt(e)/10000n)}function Ng(e){return ws(e/864e5)}function Mg(e){return ws(e%864e5/36e5)}function Rg(e){return ws(e%36e5/6e4)}function Pg(e){return ws(e%6e4/1e3)}function Og(e){return ws(e%1e3)}function Dg(e,t="c",n){if(["c","g","G"].indexOf(t)===-1)throw new Error("Custom formats are not supported");const r=Math.abs(Ng(e)),s=Math.abs(Mg(e)),o=Math.abs(Rg(e)),i=Math.abs(Pg(e)),a=Math.abs(Og(e));return`${e<0?"-":""}${r===0&&(t==="c"||t==="g")?"":t==="c"?r+".":r+":"}${t==="g"?s:ge(s,2)}:${ge(o,2)}:${ge(i,2)}${a===0&&(t==="c"||t==="g")?"":t==="g"?"."+ge(a,3):"."+Th(a,3,7)}`}function Fg(e){const t=e.search("\\."),n=e.search("\\:");if(t===-1&&n===-1){const r=parseInt(e,0);if(isNaN(r))throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`);return fd(r,0,0,0,0)}if(n>0){const r=/^(-?)((\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(r!=null&&r[4]!=null&&r[5]!=null){let s=0,o=0,i=0;const a=r[1]!=null&&r[1]==="-"?-1:1,l=+r[4],c=+r[5];if(r[3]!=null&&(s=+r[3]),r[7]!=null&&(i=+r[7]),r[8]!=null)switch(r[8].length){case 1:o=+r[8]*100;break;case 2:o=+r[8]*10;break;case 3:o=+r[8];break;case 4:o=+r[8]/10;break;case 5:o=+r[8]/100;break;case 6:o=+r[8]/1e3;break;case 7:o=+r[8]/1e4;break;default:throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}return a*fd(s,l,c,i,o)}}throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}function Vg(e,t){try{return t.contents=Fg(e),!0}catch{return!1}}class hd{constructor(t){this.k=t}}function Rt(e){return new hd(e)}function Q(e){return e.k}class $e extends hd{constructor(t,n,r,s){super(t),this.left=n,this.right=r,this.h=s|0}}function Pt(e,t,n,r){return new $e(e,t,n,r)}function Ne(e){return e.left}function Se(e){return e.right}function Fr(e){return e.h}function Vv(){}function md(e,t){e:for(;;){const n=e,r=t;if(n!=null){const s=M(n);if(s instanceof $e){const o=s;e=Ne(o),t=md(Se(o),r+1);continue e}else return r+1|0}else return r|0}}function Lg(e){return md(e,0)}function qt(e,t,n){let r,s,o;const i=e;if(i!=null){const d=M(i);o=d instanceof $e?(r=d,Fr(r)):1}else o=0;let a;const l=n;if(l!=null){const d=M(l);a=d instanceof $e?(s=d,Fr(s)):1}else a=0;const c=(o<a?a:o)|0;return c===0?Rt(t):Pt(t,e,n,c+1)}function pd(e,t,n){let r,s,o,i,a,l,c,d,u;const h=e;if(h!=null){const w=M(h);u=w instanceof $e?(r=w,Fr(r)):1}else u=0;let f;const m=n;if(m!=null){const w=M(m);f=w instanceof $e?(s=w,Fr(s)):1}else f=0;if(f>u+2){const w=M(n);if(w instanceof $e){const $=w;if(o=Ne($),(o!=null?(i=M(o),i instanceof $e?(a=i,Fr(a)):1):0)>u+1){const v=M(Ne($));if(v instanceof $e){const _=v;return qt(qt(e,t,Ne(_)),Q(_),qt(Se(_),Q($),Se($)))}else throw new Error("internal error: Set.rebalance")}else return qt(qt(e,t,Ne($)),Q($),Se($))}else throw new Error("internal error: Set.rebalance")}else if(u>f+2){const w=M(e);if(w instanceof $e){const $=w;if(l=Se($),(l!=null?(c=M(l),c instanceof $e?(d=c,Fr(d)):1):0)>f+1){const v=M(Se($));if(v instanceof $e){const _=v;return qt(qt(Ne($),Q($),Ne(_)),Q(_),qt(Se(_),t,n))}else throw new Error("internal error: Set.rebalance")}else return qt(Ne($),Q($),qt(Se($),t,n))}else throw new Error("internal error: Set.rebalance")}else return qt(e,t,n)}function Vr(e,t,n){if(n!=null){const r=M(n),s=e.Compare(t,Q(r))|0;if(r instanceof $e){const o=r;return s<0?pd(Vr(e,t,Ne(o)),Q(o),Se(o)):s===0?n:pd(Ne(o),Q(o),Vr(e,t,Se(o)))}else{const o=e.Compare(t,Q(r))|0;return o<0?Pt(t,void 0,n,2):o===0?n:Pt(t,n,void 0,2)}}else return Rt(t)}function $d(e,t,n){e:for(;;){const r=e,s=t,o=n;if(o!=null){const i=M(o),a=r.Compare(s,Q(i))|0;if(i instanceof $e){const l=i;if(a<0){e=r,t=s,n=Ne(l);continue e}else{if(a===0)return!0;e=r,t=s,n=Se(l);continue e}}else return a===0}else return!1}}function gd(e,t){e:for(;;){const n=e,r=t;if(r!=null){const s=M(r);if(s instanceof $e){const o=s;gd(n,Ne(o)),n(Q(o)),e=n,t=Se(o);continue e}else n(Q(s))}break}}class Bg extends ee{constructor(t,n){super(),this.stack=t,this.started=n}}function wd(e){e:for(;;){const t=e;if(K(t))return Ue();{const n=F(t),r=b(t);if(n!=null){const s=M(n);if(s instanceof $e){const o=s;e=De([Ne(o),Rt(Q(o)),Se(o)],r);continue e}else return t}else{e=r;continue e}}}}function yd(e){return new Bg(wd(ne(e)),!1)}function Ug(){throw new Error("Enumeration not started")}function zg(){throw new Error("Enumeration already started")}function bd(e){if(e.started){const t=e.stack;if(K(t))return zg();if(F(t)!=null){const n=M(F(t));return Q(n)}else throw new Error("Please report error: Set iterator, unexpected stack for current")}else return Ug()}function jg(e){if(e.started){const t=e.stack;if(K(t))return!1;if(F(t)!=null){if(M(F(t))instanceof $e)throw new Error("Please report error: Set iterator, unexpected stack for moveNext");return e.stack=wd(b(t)),!K(e.stack)}else throw new Error("Please report error: Set iterator, unexpected stack for moveNext")}else return e.started=!0,!K(e.stack)}function _d(e){let t=yd(e);return{"System.Collections.Generic.IEnumerator`1.get_Current"(){return bd(t)},"System.Collections.IEnumerator.get_Current"(){return bd(t)},"System.Collections.IEnumerator.MoveNext"(){return jg(t)},"System.Collections.IEnumerator.Reset"(){t=yd(e)},Dispose(){}}}function Hg(e,t,n){e:for(;;){const r=e,s=t,o=n;if(K(s))return K(o)?0:-1;if(K(o))return 1;if(F(o)!=null)if(F(s)!=null){const i=M(F(s)),a=M(F(o));if(i instanceof $e){const l=i;if(Ne(l)==null)if(a instanceof $e){const c=a;if(Ne(c)==null){const d=r.Compare(Q(l),Q(c))|0;if(d!==0)return d|0;e=r,t=Tt(Se(l),b(s)),n=Tt(Se(c),b(o));continue e}else{let d,u,h,f,m;switch(K(s)?K(o)?d=2:F(o)!=null?(d=1,f=b(o),m=M(F(o))):d=2:F(s)!=null?(d=0,u=b(s),h=M(F(s))):K(o)?d=2:F(o)!=null?(d=1,f=b(o),m=M(F(o))):d=2,d){case 0:if(h instanceof $e){const w=h;e=r,t=De([Ne(w),Pt(Q(w),void 0,Se(w),0)],u),n=o;continue e}else{e=r,t=De([void 0,Rt(Q(h))],u),n=o;continue e}case 1:if(m instanceof $e){const w=m;e=r,t=s,n=De([Ne(w),Pt(Q(w),void 0,Se(w),0)],f);continue e}else{e=r,t=s,n=De([void 0,Rt(Q(m))],f);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}}else{const c=r.Compare(Q(l),Q(a))|0;if(c!==0)return c|0;e=r,t=Tt(Se(l),b(s)),n=Tt(void 0,b(o));continue e}else{let c,d,u,h,f;switch(K(s)?K(o)?c=2:F(o)!=null?(c=1,h=b(o),f=M(F(o))):c=2:F(s)!=null?(c=0,d=b(s),u=M(F(s))):K(o)?c=2:F(o)!=null?(c=1,h=b(o),f=M(F(o))):c=2,c){case 0:if(u instanceof $e){const m=u;e=r,t=De([Ne(m),Pt(Q(m),void 0,Se(m),0)],d),n=o;continue e}else{e=r,t=De([void 0,Rt(Q(u))],d),n=o;continue e}case 1:if(f instanceof $e){const m=f;e=r,t=s,n=De([Ne(m),Pt(Q(m),void 0,Se(m),0)],h);continue e}else{e=r,t=s,n=De([void 0,Rt(Q(f))],h);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}}else if(a instanceof $e){const l=a;if(Ne(l)==null){const c=r.Compare(Q(i),Q(l))|0;if(c!==0)return c|0;e=r,t=Tt(void 0,b(s)),n=Tt(Se(l),b(o));continue e}else{let c,d,u,h,f;switch(K(s)?K(o)?c=2:F(o)!=null?(c=1,h=b(o),f=M(F(o))):c=2:F(s)!=null?(c=0,d=b(s),u=M(F(s))):K(o)?c=2:F(o)!=null?(c=1,h=b(o),f=M(F(o))):c=2,c){case 0:if(u instanceof $e){const m=u;e=r,t=De([Ne(m),Pt(Q(m),void 0,Se(m),0)],d),n=o;continue e}else{e=r,t=De([void 0,Rt(Q(u))],d),n=o;continue e}case 1:if(f instanceof $e){const m=f;e=r,t=s,n=De([Ne(m),Pt(Q(m),void 0,Se(m),0)],h);continue e}else{e=r,t=s,n=De([void 0,Rt(Q(f))],h);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}}else{const l=r.Compare(Q(i),Q(a))|0;if(l!==0)return l|0;e=r,t=b(s),n=b(o);continue e}}else{M(F(o));let i,a,l,c,d;switch(K(s)?K(o)?i=2:F(o)!=null?(i=1,c=b(o),d=M(F(o))):i=2:F(s)!=null?(i=0,a=b(s),l=M(F(s))):K(o)?i=2:F(o)!=null?(i=1,c=b(o),d=M(F(o))):i=2,i){case 0:if(l instanceof $e){const u=l;e=r,t=De([Ne(u),Pt(Q(u),void 0,Se(u),0)],a),n=o;continue e}else{e=r,t=De([void 0,Rt(Q(l))],a),n=o;continue e}case 1:if(d instanceof $e){const u=d;e=r,t=s,n=De([Ne(u),Pt(Q(u),void 0,Se(u),0)],c);continue e}else{e=r,t=s,n=De([void 0,Rt(Q(d))],c);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}else if(F(s)!=null){M(F(s));let i,a,l,c,d;switch(K(s)?K(o)?i=2:F(o)!=null?(i=1,c=b(o),d=M(F(o))):i=2:F(s)!=null?(i=0,a=b(s),l=M(F(s))):K(o)?i=2:F(o)!=null?(i=1,c=b(o),d=M(F(o))):i=2,i){case 0:if(l instanceof $e){const u=l;e=r,t=De([Ne(u),Pt(Q(u),void 0,Se(u),0)],a),n=o;continue e}else{e=r,t=De([void 0,Rt(Q(l))],a),n=o;continue e}case 1:if(d instanceof $e){const u=d;e=r,t=s,n=De([Ne(u),Pt(Q(u),void 0,Se(u),0)],c);continue e}else{e=r,t=s,n=De([void 0,Rt(Q(d))],c);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}else{e=r,t=b(s),n=b(o);continue e}}}function vd(e,t,n){return t==null?n==null?0:-1:n==null?1:Hg(e,ne(t),ne(n))|0}function Wg(e,t,n){let r=n;gd(s=>{It(t,r,s),r=r+1|0},e)}function Gg(e,t,n){e:for(;;){const r=e,s=t,o=n;if(o["System.Collections.IEnumerator.MoveNext"]()){e=r,t=Vr(r,o["System.Collections.Generic.IEnumerator`1.get_Current"](),s),n=o;continue e}else return s}}function qg(e,t){return Xs((n,r)=>Vr(e,r,n),void 0,t)}function Kg(e,t){return fn((n,r)=>Vr(e,r,n),void 0,t)}function xd(e,t){if(Qt(t))return qg(e,t);if(t instanceof gt)return Kg(e,t);{const n=Pe(t);try{return Gg(e,void 0,n)}finally{ye(n)}}}class la{constructor(t,n){this.comparer=t,this.tree=n}GetHashCode(){return Yg(this)|0}Equals(t){let n;const r=this;return t instanceof la&&(n=t,vd(Lr(r),Kt(r),Kt(n))===0)}toString(){return"set ["+oe("; ",Fe(n=>pt(n),this))+"]"}get[Symbol.toStringTag](){return"FSharpSet"}toJSON(){const t=this;return Array.from(t)}CompareTo(t){const n=this;return vd(Lr(n),Kt(n),Kt(t))|0}"System.Collections.Generic.ICollection`1.Add2B595"(t){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Clear"(){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Remove2B595"(t){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Contains2B595"(t){const n=this;return $d(Lr(n),t,Kt(n))}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(t,n){Wg(Kt(this),t,n)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return ca(this)|0}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return ca(this)|0}GetEnumerator(){return _d(Kt(this))}[Symbol.iterator](){return Jr(Pe(this))}"System.Collections.IEnumerable.GetEnumerator"(){return _d(Kt(this))}get size(){return ca(this)|0}add(t){throw new Error("Set cannot be mutated")}clear(){throw new Error("Set cannot be mutated")}delete(t){throw new Error("Set cannot be mutated")}has(t){return Cd(this,t)}keys(){return Fe(n=>n,this)}values(){return Fe(n=>n,this)}entries(){return Fe(n=>[n,n],this)}forEach(t,n){const r=this;Er(s=>{t(s,s,r)},r)}}function wo(e,t){return new la(e,t)}function Lr(e){return e.comparer}function Kt(e){return e.tree}function Zg(e){return wo(e,void 0)}function Jg(e,t){return wo(Lr(e),Vr(Lr(e),t,Kt(e)))}function ca(e){return Lg(Kt(e))}function Cd(e,t){return $d(Lr(e),t,Kt(e))}function Yg(e){let t=0;const n=Pe(e);try{for(;n["System.Collections.IEnumerator.MoveNext"]();){const r=n["System.Collections.Generic.IEnumerator`1.get_Current"]();t=(t<<1)+un(r)+631|0}}finally{ye(n)}return Math.abs(t)|0}function ua(e,t){return Cd(t,e)}function Xg(e,t){return Jg(t,e)}function Qg(e){return Zg(e)}function ew(e,t){return wo(t,xd(t,e))}function tw(e,t){return wo(t,xd(t,e))}function ys(e,t,n){try{return"Expecting "+e+" but instead got:"+(n?`
1
+ (function(){"use strict";function an(e){return Array.isArray(e)||ArrayBuffer.isView(e)}function Lh(e){return e!=null&&typeof e.GetEnumerator=="function"}function Bh(e){return e!=null&&typeof e.CompareTo=="function"}function Uh(e){return e!=null&&typeof e.Equals=="function"}function gl(e){return e!=null&&typeof e.GetHashCode=="function"}function so(e){return e!=null&&typeof e.Dispose=="function"}function xe(e){so(e)&&e.Dispose()}function $e(){return null}function Zs(e,t){var n,r;return((n=Object.getPrototypeOf(e))==null?void 0:n.constructor)===((r=Object.getPrototypeOf(t))==null?void 0:r.constructor)}class jh{constructor(t){this.iter=t,this.current=$e()}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current}"System.Collections.IEnumerator.get_Current"(){return this.current}"System.Collections.IEnumerator.MoveNext"(){const t=this.iter.next();return this.current=t.value,!t.done}"System.Collections.IEnumerator.Reset"(){throw new Error("JS iterators cannot be reset")}Dispose(){}}function De(e){return Lh(e)?e.GetEnumerator():new jh(e[Symbol.iterator]())}function is(e){return{next(){const t=e["System.Collections.IEnumerator.MoveNext"](),n=t?e["System.Collections.Generic.IEnumerator`1.get_Current"]():void 0;return{done:!t,value:n}}}}class zh{constructor(t){this.factory=t,this.isValueCreated=!1}get Value(){return this.isValueCreated||(this.createdValue=this.factory(),this.isValueCreated=!0),this.createdValue}get IsValueCreated(){return this.isValueCreated}}function be(e,t){return e.toString(10).padStart(t,"0")}function Hh(e,t,n){return e.toString(10).padStart(t,"0").padEnd(n,"0")}function $l(e){const t=e;return typeof t.offset=="number"?t.offset:e.kind===1?0:e.getTimezoneOffset()*-6e4}function Wh(e,t){return e=e,e.toString(t)}function Yn(e,t){return e=e,e.toString(t)}class wn{static id(t){return wn.idMap.has(t)||wn.idMap.set(t,++wn.count),wn.idMap.get(t)}}wn.idMap=new WeakMap,wn.count=0;function xr(e){let t=0,n=5381;const r=e.length;for(;t<r;)n=n*33^e.charCodeAt(t++);return n}function Ht(e){return e*2654435761|0}function wl(e){return xr(e.toString(32))}function os(e){let t=0;const n=e.length;for(let r=0;r<n;r++){const s=e[r];t=(t<<5)+t^s}return t}function Gh(e){if(e==null)return 0;switch(typeof e){case"boolean":return e?1:0;case"number":return Ht(e);case"bigint":return wl(e);case"string":return xr(e);default:return Ht(wn.id(e))}}function qh(e){return gl(e)?e.GetHashCode():Gh(e)}function Kh(e){return e.getTime()}function Zh(e){const t=e.length,n=new Array(t);for(let r=0;r<t;r++)n[r]=yn(e[r]);return os(n)}function yn(e){var t;if(e==null)return 0;switch(typeof e){case"boolean":return e?1:0;case"number":return Ht(e);case"bigint":return wl(e);case"string":return xr(e);default:{if(gl(e))return e.GetHashCode();if(an(e))return Zh(e);if(e instanceof Date)return Kh(e);if(((t=Object.getPrototypeOf(e))==null?void 0:t.constructor)===Object){const n=Object.values(e).map(r=>yn(r));return os(n)}else return Ht(wn.id(e))}}}function Jh(e){return qh(e)}function io(e,t,n){if(e==null)return t==null;if(t==null||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function yl(e,t){return io(e,t,Pe)}function Yh(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;n.sort(),r.sort();for(let s=0;s<n.length;s++)if(n[s]!==r[s]||!Pe(e[n[s]],t[r[s]]))return!1;return!0}function Pe(e,t){var n;return e===t?!0:e==null?t==null:t==null?!1:Uh(e)?e.Equals(t):an(e)?an(t)&&yl(e,t):typeof e!="object"?!1:e instanceof Date?t instanceof Date&&_l(e,t)===0:((n=Object.getPrototypeOf(e))==null?void 0:n.constructor)===Object&&Yh(e,t)}function _l(e,t){let n,r;return"offset"in e&&"offset"in t?(n=e.getTime(),r=t.getTime()):(n=e.getTime()+$l(e),r=t.getTime()+$l(t)),n===r?0:n<r?-1:1}function as(e,t){return e===t?0:e<t?-1:1}function Xh(e,t,n){if(e==null)return t==null?0:1;if(t==null)return-1;if(e.length!==t.length)return e.length<t.length?-1:1;for(let r=0,s=0;r<e.length;r++)if(s=n(e[r],t[r]),s!==0)return s;return 0}function bl(e,t){return Xh(e,t,Lt)}function Qh(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return n.length<r.length?-1:1;n.sort(),r.sort();for(let s=0,i=0;s<n.length;s++){const o=n[s];if(o!==r[s])return o<r[s]?-1:1;if(i=Lt(e[o],t[o]),i!==0)return i}return 0}function Lt(e,t){var n;return e===t?0:e==null?t==null?0:-1:t==null?1:Bh(e)?e.CompareTo(t):an(e)?an(t)?bl(e,t):-1:typeof e!="object"?e<t?-1:1:e instanceof Date?t instanceof Date?_l(e,t):-1:((n=Object.getPrototypeOf(e))==null?void 0:n.constructor)===Object?Qh(e,t):-1}function S(e){const t={};for(const n of e)t[n[0]]=n[1];return t}function em(e){an(e)?e.splice(0):e.clear()}const Js=new WeakMap;function pe(e){if(e==null)return null;const t=(n,r)=>e(n)(r);return Js.set(t,e),t}function On(e){return Js.get(e)??(t=>n=>e(t,n))}function oo(e){if(e==null)return null;const t=(n,r,s)=>e(n)(r)(s);return Js.set(t,e),t}function ao(e){return Js.get(e)??(t=>n=>r=>e(t,n,r))}function tm(e){let t=0,n="[";for(const r of e){if(t===0)n+=ft(r);else if(t===100){n+="; ...";break}else n+="; "+ft(r);t++}return n+"]"}function ft(e,t=0){var n;if(e!=null&&typeof e=="object"){if(typeof e.toString=="function")return e.toString();if(Symbol.iterator in e)return tm(e);{const r=(n=Object.getPrototypeOf(e))==null?void 0:n.constructor;return r===Object&&t<10?"{ "+Object.entries(e).map(([s,i])=>s+" = "+ft(i,t+1)).join(`
2
+ `)+" }":(r==null?void 0:r.name)??""}}return String(e)}function nm(e,t){if(t.length===0)return e;{let n,r=!0;return t.length===1?(n=ft(t[0]),r=n.indexOf(" ")>=0):n=t.map(s=>ft(s)).join(", "),e+(r?" (":" ")+n+(r?")":"")}}class z{get name(){return this.cases()[this.tag]}toJSON(){return this.fields.length===0?this.name:[this.name].concat(this.fields)}toString(){return nm(this.name,this.fields)}GetHashCode(){const t=this.fields.map(n=>yn(n));return t.splice(0,0,Ht(this.tag)),os(t)}Equals(t){return this===t?!0:Zs(this,t)&&this.tag===t.tag?yl(this.fields,t.fields):!1}CompareTo(t){return this===t?0:Zs(this,t)?this.tag===t.tag?bl(this.fields,t.fields):this.tag<t.tag?-1:1:-1}}function rm(e){const t={},n=Object.keys(e);for(let r=0;r<n.length;r++)t[n[r]]=e[n[r]];return t}function sm(e){return"{ "+Object.entries(e).map(([t,n])=>t+" = "+ft(n)).join(`
3
+ `)+" }"}function im(e){const t=Object.values(e).map(n=>yn(n));return os(t)}function om(e,t){if(e===t)return!0;if(Zs(e,t)){const n=Object.keys(e);for(let r=0;r<n.length;r++)if(!Pe(e[n[r]],t[n[r]]))return!1;return!0}else return!1}function am(e,t){if(e===t)return 0;if(Zs(e,t)){const n=Object.keys(e);for(let r=0;r<n.length;r++){const s=Lt(e[n[r]],t[n[r]]);if(s!==0)return s}return 0}else return-1}class ee{toJSON(){return rm(this)}toString(){return sm(this)}GetHashCode(){return im(this)}Equals(t){return om(this,t)}CompareTo(t){return am(this,t)}}class wt{get contents(){return this.getter()}set contents(t){this.setter(t)}constructor(t,n){typeof n=="function"?(this.getter=t,this.setter=n):(this.getter=()=>t,this.setter=r=>{t=r})}}class lm{constructor(t){this.message=t}}function cm(e){return e instanceof lm||e instanceof Error}function um(e){return e instanceof Promise}function Ys(e){return cm(e)||um(e)?e:new Error(String(e))}const Cr=Symbol("numeric");function vl(e){return typeof e=="number"||typeof e=="bigint"||(e==null?void 0:e[Cr])}function dm(e,t){return typeof e=="number"||typeof e=="bigint"?e<t?-1:e>t?1:0:e.CompareTo(t)}function lo(e,t){return typeof e=="number"?e*t:typeof e=="bigint"?e*BigInt(t):e[Cr]().multiply(t)}function Xs(e,t){return typeof e=="number"?e.toFixed(t):typeof e=="bigint"?e:e[Cr]().toFixed(t)}function Qs(e,t){return typeof e=="number"?e.toPrecision(t):typeof e=="bigint"?e:e[Cr]().toPrecision(t)}function ei(e,t){return typeof e=="number"?e.toExponential(t):typeof e=="bigint"?e:e[Cr]().toExponential(t)}function ti(e){return typeof e=="number"?(Number(e)>>>0).toString(16):typeof e=="bigint"?BigInt.asUintN(64,e).toString(16):e[Cr]().toHex()}class fm{constructor(t,n,r,s){this.declaringType=t,this.tag=n,this.name=r,this.fields=s}}class Bt{constructor(t,n,r,s,i,o,a){this.fullname=t,this.generics=n,this.construct=r,this.parent=s,this.fields=i,this.cases=o,this.enumCases=a}toString(){return Oe(this)}GetHashCode(){return xl(this)}Equals(t){return co(this,t)}}function Et(e){return e.generics!=null?e.generics:[]}function xl(e){const t=xr(e.fullname),n=Et(e).map(xl);return os([t,...n])}function co(e,t){return e.fullname===""?t.fullname===""&&io(cs(e),cs(t),([n,r],[s,i])=>n===s&&co(r,i)):e.fullname===t.fullname&&io(Et(e),Et(t),co)}function uo(e,t,n,r){return new Bt(e,t,n,r)}function ht(e,t,n,r){return new Bt(e,t,n,void 0,r)}function fo(e,t,n,r){const s=new Bt(e,t,n,void 0,void 0,()=>{const i=n.prototype.cases();return r().map((o,a)=>new fm(s,a,i[a],o))});return s}function ye(e){return new Bt("Microsoft.FSharp.Core.FSharpOption`1",[e])}function ho(e){return new Bt("Microsoft.FSharp.Collections.FSharpList`1",[e])}function Cl(e){return new Bt("[]",[e])}const hm=new Bt("System.Object"),H=new Bt("System.String");function Sr(e){if(Array.isArray(e))return e[0];if(e instanceof Bt){const t=ls(e);if(t!=null)return Sr(t)+"[]";{const n=e.fullname.lastIndexOf(".");return n===-1?e.fullname:e.fullname.substr(n+1)}}else return e.name}function Oe(e){const t=ls(e);return t!=null?Oe(t)+"[]":e.generics==null||e.generics.length===0?e.fullname:e.fullname+"["+e.generics.map(n=>Oe(n)).join(",")+"]"}function Sl(e){return ls(e)!=null}function ls(e){var t;return e.fullname==="[]"&&((t=e.generics)==null?void 0:t.length)===1?e.generics[0]:void 0}function Al(e){return e.generics!=null&&e.generics.length>0}function mo(e){return e.enumCases!=null&&e.enumCases.length>0}function kl(e){return e.generics==null?e:new Bt(e.fullname,e.generics.map(()=>hm))}function El(e){var t;return(t=e.generics)==null?void 0:t[0]}function Ar(e){if(mo(e)&&e.enumCases!=null)return e.enumCases.map(t=>t[1]);throw new Error(`${e.fullname} is not an enum type`)}function mm(e,t){if(e.enumCases!=null)if(typeof t=="string"){for(const n of e.enumCases)if(n[0]===t)return n;throw new Error(`'${t}' was not found in ${e.fullname}`)}else{for(const n of e.enumCases)if(n[1]===t)return n;return["",t]}else throw new Error(`${e.fullname} is not an enum type`)}function kr(e,t){const n=parseInt(t,10);return mm(e,isNaN(n)?t:n)[1]}function Il(e){if(e.cases!=null)return e.cases();throw new Error(`${e.fullname} is not an F# union type`)}function cs(e){if(e.fields!=null)return e.fields();throw new Error(`${e.fullname} is not an F# record type`)}function Nl(e){if(po(e)&&e.generics!=null)return e.generics;throw new Error(`${e.fullname} is not a tuple type`)}function Tl(e){return e instanceof Bt?e.cases!=null:e instanceof z}function Rl(e){return e instanceof Bt?e.fields!=null:e instanceof ee}function po(e){return e.fullname.startsWith("System.Tuple")}function pm(e,t){const r=Il(t)[e.tag];if(r==null)throw new Error(`Cannot find case ${e.name} in union type`);return[r,e.fields]}function Ml(e){return e.fields==null?[]:e.fields}function gm(e,t){return e[t[0]]}function yx(e){return e}function $m(e,t){const n=(e.fields||[]).length;if(t.length!==n)throw new Error(`Expected an array of length ${n} but got ${t.length}`);const r=e.declaringType.construct;return r==null?{}:(e.declaringType.cases?e.declaringType.cases().length==1:!1)?new r(...t):new r(e.tag,t)}function wm(e,t){const n=cs(e);if(n.length!==t.length)throw new Error(`Expected an array of length ${n.length} but got ${t.length}`);return e.construct!=null?new e.construct(...t):n.reduce((r,[s,i],o)=>(r[s]=t[o],r),{})}function ym(e,t){return e}const _m=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],bm=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],vm=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],xm=["January","February","March","April","May","June","July","August","September","October","November","December"];function It(e,t,n){let r=0,s=t;for(;s<e.length&&e[s]===n;)s++,r++;return r}function Pl(e,t){return t>=e.length-1?-1:e.charCodeAt(t+1)}function Cm(e,t){let n=t;const r=e[t];let s="",i=!1;for(;t<e.length;){t++;const o=e[t];if(o===r){i=!0;break}else if(o==="\\")if(t<e.length)t++,s+=e[t];else throw new Error("Invalid string format");else s+=o}if(!i)throw new Error(`Invalid string format could not find matching quote for ${r}`);return[s,t-n+1]}function go(e,t,n){let r=0,s=0,i="";const o=n?us(e.getTime(),1):e;for(;r<t.length;){const a=t[r];switch(a){case"d":switch(s=It(t,r,"d"),r+=s,s){case 1:i+=Fl(o);break;case 2:i+=be(Fl(o),2);break;case 3:i+=_m[Bl(o)];break;case 4:i+=bm[Bl(o)];break}break;case"f":if(s=It(t,r,"f"),r+=s,s<=3){const g=10**(3-s);i+=be(Math.floor(si(o)/g),s)}else s<=7&&(i+=(""+si(o)).padEnd(s,"0"));break;case"F":if(s=It(t,r,"F"),r+=s,s<=3){const g=10**(3-s),C=Math.floor(si(o)/g);C!=0&&(i+=be(C,s))}else if(s<=7){const g=si(o);g!=0&&(i+=be(g,3))}break;case"g":s=It(t,r,"g"),r+=s,s<=2&&(i+="A.D.");break;case"h":switch(s=It(t,r,"h"),r+=s,s){case 1:i+=ri(o)%12;break;case 2:i+=be(ri(o)%12,2);break}break;case"H":switch(s=It(t,r,"H"),r+=s,s){case 1:i+=ri(o);break;case 2:i+=be(ri(o),2);break}break;case"K":switch(s=It(t,r,"K"),r+=s,s){case 1:switch(Ol(o)){case 1:i+="Z";break;case 2:i+=Er(o.getTimezoneOffset()*-6e4);break}break}break;case"m":switch(s=It(t,r,"m"),r+=s,s){case 1:i+=Vl(o);break;case 2:i+=be(Vl(o),2);break}break;case"M":switch(s=It(t,r,"M"),r+=s,s){case 1:i+=ii(o);break;case 2:i+=be(ii(o),2);break;case 3:i+=vm[ii(o)-1];break;case 4:i+=xm[ii(o)-1];break}break;case"s":switch(s=It(t,r,"s"),r+=s,s){case 1:i+=Ll(o);break;case 2:i+=be(Ll(o),2);break}break;case"t":switch(s=It(t,r,"t"),r+=s,s){case 1:i+=o.getHours()<12?"A":"P";break;case 2:i+=o.getHours()<12?"AM":"PM";break}break;case"y":switch(s=It(t,r,"y"),r+=s,s){case 1:i+=o.getFullYear()%100;break;case 2:i+=be(o.getFullYear()%100,2);break;case 3:i+=be(o.getFullYear(),3);break;case 4:i+=be(o.getFullYear(),4);break;case 5:i+=be(o.getFullYear(),5);break}break;case"z":s=It(t,r,"z"),r+=s;let l="";switch(Ol(o)){case 1:l="+00:00";break;case 2:l=Er(o.getTimezoneOffset()*-6e4);break;case 0:l=Er(Mm(o).getTimezoneOffset()*-6e4);break}const c=l[0]==="-"?"-":"+",d=parseInt(l.substring(1,3),10),u=parseInt(l.substring(4,6),10);switch(s){case 1:i+=`${c}${d}`;break;case 2:i+=`${c}${be(d,2)}`;break;default:i+=`${c}${be(d,2)}:${be(u,2)}`;break}break;case":":i+=":",r++;break;case"/":i+="/",r++;break;case"'":case'"':const[m,h]=Cm(t,r);i+=m,r+=h;break;case"%":const p=Pl(t,r);if(p>=0&&p!==37)r+=2,i+=go(o,String.fromCharCode(p),n);else throw new Error("Invalid format string");break;case"\\":const w=Pl(t,r);if(w>=0)r+=2,i+=String.fromCharCode(w);else throw new Error("Invalid format string");break;default:r++,i+=a;break}}return i}function Ol(e){return e.kind||0}function Er(e){const t=e<0;e=Math.abs(e);const n=~~(e/36e5),r=e%36e5/6e4;return(t?"-":"+")+be(n,2)+":"+be(r,2)}function ni(e,t){const n=e.toISOString();return t==="first"?n.substring(0,n.indexOf("T")):n.substring(n.indexOf("T")+1,n.length-1)}function Sm(e,t){if(t)return e.toISOString();{const n=e.kind==null?!0:e.kind===2;return be(e.getFullYear(),4)+"-"+be(e.getMonth()+1,2)+"-"+be(e.getDate(),2)+"T"+be(e.getHours(),2)+":"+be(e.getMinutes(),2)+":"+be(e.getSeconds(),2)+"."+be(e.getMilliseconds(),3)+(n?Er(e.getTimezoneOffset()*-6e4):"")}}function Am(e,t){const n=e.toISOString();return n.substring(0,n.length-1)+Er(t)}function km(e,t){const n=new Date(e.getTime()+(e.offset??0));if(typeof t!="string")return n.toISOString().replace(/\.\d+/,"").replace(/[A-Z]|\.\d+/g," ")+Er(e.offset??0);if(t.length===1)switch(t){case"D":case"d":return ni(n,"first");case"T":case"t":return ni(n,"second");case"O":case"o":return Am(n,e.offset??0);default:throw new Error("Unrecognized Date print format")}else return go(n,t,!0)}function Em(e,t){const n=e.kind===1;if(typeof t!="string")return n?e.toUTCString():e.toLocaleString();if(t.length===1)switch(t){case"D":case"d":return n?ni(e,"first"):e.toLocaleDateString();case"T":case"t":return n?ni(e,"second"):e.toLocaleTimeString();case"O":case"o":return Sm(e,n);default:throw new Error("Unrecognized Date print format")}else return go(e,t,n)}function Ir(e,t,n){return e.offset!=null?km(e,t):Em(e,t)}function us(e,t){const n=new Date(e);return n.kind=(t??0)|0,n}function Im(){return us(-621355968e5,1)}function Dl(e){function t(){throw new Error(`The string is not a valid Date: ${e}`)}(e==null||e.trim()==="")&&t(),e.length===10&&e[4]==="-"&&e[7]==="-"&&(e+="T00:00:00");let n=new Date(e),r=null;if(isNaN(n.getTime())){const s=/^\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(s!=null){let i,o=0;if(s[2]!=null){const a=s[2].split(":"),l=parseInt(a[0],10);o=l*3600+parseInt(a[1]||"0",10)*60+parseFloat(a[2]||"0"),s[3]!=null&&s[3].toUpperCase()==="PM"&&l<12&&(o+=720)}if(s[4]!=null){if(s[1]!=null)i=new Date(s[1]+" UTC");else{const a=new Date;i=new Date(a.getUTCFullYear()+"/"+(a.getUTCMonth()+1)+"/"+a.getUTCDate())}if(s[4]==="Z")r="Z";else{let a=parseInt(s[5],10)*60+parseInt(s[6]||"0",10);s[4][0]==="-"&&(a*=-1),r=a,o-=a*60}}else if(s[1]!=null)i=new Date(s[1]);else{const a=new Date;i=new Date(a.getFullYear()+"/"+(a.getMonth()+1)+"/"+a.getDate())}n=new Date(i.getTime()+o*1e3),n=new Date(n.getTime()+(n.getTimezoneOffset()-i.getTimezoneOffset())*6e4)}else t();isNaN(n.getTime())&&t()}return[n,r]}function Nm(e,t=!1){const[n,r]=Dl(e),s=r!=null?t&&r==="Z"?1:2:0;return us(n.getTime(),s)}function Tm(e,t){try{return t.contents=Nm(e),!0}catch{return!1}}function Rm(e){return e.kind===1?e:us(e.getTime(),1)}function Mm(e){return e.kind===2?e:us(e.getTime(),2)}function Fl(e){return e.kind===1?e.getUTCDate():e.getDate()}function ri(e){return e.kind===1?e.getUTCHours():e.getHours()}function si(e){return e.kind===1?e.getUTCMilliseconds():e.getMilliseconds()}function Vl(e){return e.kind===1?e.getUTCMinutes():e.getMinutes()}function ii(e){return(e.kind===1?e.getUTCMonth():e.getMonth())+1}function Ll(e){return e.kind===1?e.getUTCSeconds():e.getSeconds()}function Bl(e){return e.kind===1?e.getUTCDay():e.getDay()}function Ul(e,t=0){if((t&-284)!==0)throw new Error("RegexOptions only supports: IgnoreCase, Multiline, Compiled, Singleline and ECMAScript");let n="gu";return n+=t&1?"i":"",n+=t&2?"m":"",n+=t&16?"s":"",new RegExp(e,n)}function $o(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function Pm(e,t,n=0){return e.lastIndex=n,e.exec(t)}function jl(e,t,n=0){if(t==null)throw new Error("Input cannot ve null");if(!e.global)throw new Error("Non-global RegExp");e.lastIndex=n;const r=[];let s,i=-1;for(;(s=e.exec(t))!=null;)s.index===i?e.lastIndex++:(i=s.index,r.push(s));return r}function Om(e,t,n,r,s=0){function i(){let o=arguments[0];if(r){r--;const a=[],l=arguments.length,c=typeof arguments[l-1]!="string";let d=c?l-3:l-2;for(let u=0;u<d;u++)a.push(arguments[u]);a.index=arguments[d++],a.input=arguments[d++],c&&(a.groups=arguments[d]),o=n(a)}return o}if(typeof e=="string"){const o=e;e=Ul(t,r??0),t=o,r=void 0}if(typeof n=="function")return r=r??-1,t.substring(0,s)+t.substring(s).replace(e,i);if(n=n.replace(/\$0/g,o=>"$&").replace(/\${([^}]+)}/g,"$<$1>"),r!=null){let o;const a=t.substring(s),l=jl(e,a),c=jl.length>r?(o=l[r-1],a.substring(0,o.index+o[0].length)):a;return t.substring(0,s)+c.replace(e,n)+t.substring(s+c.length)}else return t.replace(e,n)}const ds=/(^|[^%])%([0+\- ]*)(\*|\d+)?(?:\.(\d+))?(\w)/g,fs=/(?:(^|[^%])%([0+\- ]*)(\d+)?(?:\.(\d+))?(\w))?%P\(\)/g,Dm=/\{(\d+)(,-?\d+)?(?:\:([a-zA-Z])(\d{0,2})|\:(.+?))?\}/g;function zl(e,t){return dm(e,t)<0}function Ut(e){return{input:e,cont:Fm(e)}}function Hl(e,t){let n=0,r=0,s="";fs.lastIndex=0;let i=fs.exec(e);for(;i;){const o=i.index+(i[1]||"").length;s+=e.substring(r,o).replace(/%%/g,"%");const[,,a,l,c,d]=i;r=fs.lastIndex,s+=ql(t[n++],a,l,c,d),fs.lastIndex=r-1,i=fs.exec(e)}return s+=e.substring(r).replace(/%%/g,"%"),s}function wo(e,t){return typeof t=="string"?e(t):t.cont(e)}function Wl(e){return wo(t=>console.log(t),e)}function Wt(e){return wo(t=>t,e)}function Gl(e){return wo(t=>{throw new Error(t)},e)}function ql(e,t,n,r,s){let i="";if(t=t||"",s=s||"",vl(e))switch(s.toLowerCase()!=="x"&&(zl(e,0)?(e=lo(e,-1),i="-"):t.indexOf(" ")>=0?i=" ":t.indexOf("+")>=0&&(i="+")),r=r==null?null:parseInt(r,10),s){case"f":case"F":r=r??6,e=Xs(e,r);break;case"g":case"G":e=r!=null?Qs(e,r):Qs(e);break;case"e":case"E":e=r!=null?ei(e,r):ei(e);break;case"x":e=ti(e);break;case"X":e=ti(e).toUpperCase();break;default:e=String(e);break}else e instanceof Date?e=Ir(e):e=ft(e);if(n=typeof n=="number"?n:parseInt(n,10),isNaN(n))e=i+e;else{const o=t.indexOf("0")>=0,a=t.indexOf("-")>=0,l=a||!o?" ":"0";l==="0"?(e=hs(e,n-i.length,l,a),e=i+e):e=hs(i+e,n,l,a)}return e}function Kl(e,t,n,r="",s=-1){return(...i)=>{let o=r;const a=t.slice(),l=n.slice();for(const c of i){const[,,d,u,m,h]=l[0];let p=u;if(s>=0)p=s,s=-1;else if(p==="*"){if(c<0)throw new Error("Non-negative number required");s=c;continue}o+=a[0],o+=ql(c,d,p,m,h),a.splice(0,1),l.splice(0,1)}return l.length===0?(o+=a[0],e(o)):Kl(e,a,l,o,s)}}function Fm(e){return t=>{ds.lastIndex=0;const n=[],r=[];let s=0,i=ds.exec(e);for(;i;){const o=i.index+(i[1]||"").length;n.push(e.substring(s,o).replace(/%%/g,"%")),r.push(i),s=ds.lastIndex,ds.lastIndex-=1,i=ds.exec(e)}return n.length===0?t(e.replace(/%%/g,"%")):(n.push(e.substring(s).replace(/%%/g,"%")),Kl(t,n,r))}}function Zl(e,...t){let n;return typeof e=="object"?(n=String(t[0]),t.shift()):n=e,n.replace(Dm,(r,s,i,o,a,l)=>{if(s<0||s>=t.length)throw new Error("Index must be greater or equal to zero and less than the arguments' length.");let c=t[s];if(vl(c))switch(a=a==null?null:parseInt(a,10),o){case"f":case"F":a=a??2,c=Xs(c,a);break;case"g":case"G":c=a!=null?Qs(c,a):Qs(c);break;case"e":case"E":c=a!=null?ei(c,a):ei(c);break;case"p":case"P":a=a??2,c=Xs(lo(c,100),a)+" %";break;case"d":case"D":c=a!=null?yo(String(c),a,"0"):String(c);break;case"x":case"X":c=a!=null?yo(ti(c),a,"0"):ti(c),o==="X"&&(c=c.toUpperCase());break;default:if(l){let d="";c=l.replace(/([0#,]+)(\.[0#]+)?/,(u,m,h)=>{zl(c,0)&&(c=lo(c,-1),d="-"),h=h==null?"":h.substring(1),c=Xs(c,Math.max(h.length,0));let[p,w]=c.split(".");w||(w="");const g=m.replace(/,/g,"").replace(/^#+/,"").length;p=yo(p,g,"0");const C=h.replace(/#+$/,"").length;if(C>w.length?w=Lm(w,C,"0"):C<w.length&&(w=w.substring(0,C)+w.substring(C).replace(/0+$/,"")),m.indexOf(",")>0){const x=p.length%3,A=Math.floor(p.length/3);let P=x>0?p.substr(0,x)+(A>0?",":""):"";for(let V=0;V<A;V++)P+=p.substr(x+V*3,3)+(V<A-1?",":"");p=P}return w.length>0?p+"."+w:p}),c=d+c}}else c instanceof Date?c=Ir(c,l||o):c=ft(c);return i=parseInt((i||" ").substring(1),10),isNaN(i)||(c=hs(String(c),Math.abs(i)," ",i<0)),c})}function Vm(e,t){const n=e.lastIndexOf(t);return n>=0&&n===e.length-t.length}function oi(e){return typeof e!="string"||e.length===0}function Jl(e){return typeof e!="string"||/^\s*$/.test(e)}function re(e,t){return Array.isArray(t)?t.join(e):Array.from(t).join(e)}function hs(e,t,n,r){n=n||" ",t=t-e.length;for(let s=0;s<t;s++)e=r?e+n:n+e;return e}function yo(e,t,n){return hs(e,t,n)}function Lm(e,t,n){return hs(e,t,n,!0)}function _o(e,t,n,r){if(n=typeof n=="number"?n:void 0,r=typeof r=="number"?r:0,n&&n<0)throw new Error("Count cannot be less than zero");if(n===0)return[];const s=(r&1)===1,i=(r&2)===2;t=t||[],t=t.filter(d=>d).map($o),t=t.length>0?t:["\\s"];const o=[],a=new RegExp(t.join("|"),"g");let l=!0,c=0;do{const d=a.exec(e);if(d===null){const u=i?e.substring(c).trim():e.substring(c);(!s||u.length>0)&&o.push(u),l=!1}else{const u=i?e.substring(c,d.index).trim():e.substring(c,d.index);(!s||u.length>0)&&(n!=null&&o.length+1===n?(o.push(i?e.substring(c).trim():e.substring(c)),l=!1):o.push(u)),c=a.lastIndex}}while(l);return o}function Bm(e,...t){if(t.length===0)return e.trim();const n="["+$o(t.join(""))+"]+";return e.replace(new RegExp("^"+n),"").replace(new RegExp(n+"$"),"")}function Um(e,...t){return t.length===0?e.trimEnd():e.replace(new RegExp("["+$o(t.join(""))+"]+$"),"")}function Yl(e,t,n){if(t+(n||0)>e.length)throw new Error("Invalid startIndex and/or length");return n!=null?e.substr(t,n):e.substr(t)}class Xn{constructor(t){this.value=t}toJSON(){return this.value}toString(){return String(this.value)}GetHashCode(){return yn(this.value)}Equals(t){return t==null?!1:Pe(this.value,t instanceof Xn?t.value:t)}CompareTo(t){return t==null?1:Lt(this.value,t instanceof Xn?t.value:t)}}function O(e){if(e==null)throw new Error("Option has no value");return e instanceof Xn?e.value:e}function bo(e){return e instanceof Xn?e.value:e}function ot(e){return e==null||e instanceof Xn?new Xn(e):e}function jm(e){return e??void 0}function vo(e){return e==null?[]:[O(e)]}function We(e,t){return e!=null?O(e):t}function Xl(e,t){return e!=null?O(e):t()}function Ge(e,t){return t!=null?ot(e(O(t))):void 0}const Ql="Collection was empty.";function xo(e,t){return typeof e=="function"?new e(t):new Array(t)}function ec(e,t){return e>t?e:t}function ai(e,t,n,r){const s=t|0;return e.fill(r,s,s+n)}function Dn(e,t,n){const r=t.length|0,s=xo(n,r);for(let i=0;i<=r-1;i++)Nt(s,i,e(ge(i,t)));return s}function zm(e,t,n,r){if(t.length!==n.length)throw new Error("Arrays had different lengths");const s=xo(r,t.length);for(let i=0;i<=t.length-1;i++)Nt(s,i,e(ge(i,t),ge(i,n)));return s}function Hm(e,t){const n=xo(t,1);return Nt(n,0,e),n}function Wm(e){return e.slice().reverse()}function Gm(e,t){return t.find(e)}function qm(e,t,n){const r=[];for(let s=0;s<=t.length-1;s++){const i=e(ge(s,t));if(i!=null){const o=O(i);r.push(o)}}return Pe(n,$e())?r:Dn(s=>s,r,n)}function li(e,t,n){const r=e;return n.reduce(r,t)}function Km(e,t){if(e<1)throw new Error("The input must be positive.\\nParameter name: size");if(t.length===0)return[[]];{const n=[];for(let r=0;r<=~~Math.ceil(t.length/e)-1;r++){let s;const i=r*e|0;s=t.slice(i,i+e),n.push(s)}return n}}function Co(e,t,n){return t==null}function ge(e,t){if(e<0||e>=t.length)throw new Error("Index was outside the bounds of the array.\\nParameter name: index");return t[e]}function Nt(e,t,n){if(t<0||t>=e.length)throw new Error("Index was outside the bounds of the array.\\nParameter name: index");e[t]=n}function tc(e,t,n){return t.reduceRight((r,s)=>e(s,r),n)}function Zm(e,t){let n=t.GetZero();for(let r=0;r<=e.length-1;r++)n=t.Add(n,ge(r,e));return n}class yt extends ee{constructor(t,n){super(),this.head=t,this.tail=n}toString(){return"["+re("; ",this)+"]"}Equals(t){const n=this;return n===t?!0:((s,i)=>{e:for(;;){const o=s,a=i,l=o.tail,c=a.tail;if(l!=null)if(c!=null){const d=O(l),u=O(c);if(Pe(o.head,a.head)){s=d,i=u;continue e}else return!1}else return!1;else return c==null}})(n,t)}GetHashCode(){return((r,s,i)=>{e:for(;;){const o=r,a=s,l=i,c=l.tail;if(c!=null){const d=O(c);if(o>18)return a|0;r=o+1,s=(a<<1)+yn(l.head)+631*o,i=d;continue e}else return a|0}})(0,0,this)|0}toJSON(){const t=this;return Array.from(t)}CompareTo(t){return((s,i)=>{e:for(;;){const o=s,a=i,l=o.tail,c=a.tail;if(l!=null)if(c!=null){const d=O(l),u=O(c),m=Lt(o.head,a.head)|0;if(m===0){s=d,i=u;continue e}else return m|0}else return 1;else return c!=null?-1:0}})(this,t)|0}GetEnumerator(){return Ym(this)}[Symbol.iterator](){return is(De(this))}"System.Collections.IEnumerable.GetEnumerator"(){return De(this)}}class Jm{constructor(t){this.xs=t,this.it=this.xs,this.current=$e()}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current}"System.Collections.IEnumerator.get_Current"(){return this.current}"System.Collections.IEnumerator.MoveNext"(){const t=this,n=t.it.tail;if(n!=null){const r=O(n);return t.current=t.it.head,t.it=r,!0}else return!1}"System.Collections.IEnumerator.Reset"(){const t=this;t.it=t.xs,t.current=$e()}Dispose(){}}function Ym(e){return new Jm(e)}function qe(){return new yt($e(),void 0)}function ms(e,t){return new yt(e,t)}function _n(e){return e.tail==null}function nc(e){return((n,r)=>{e:for(;;){const s=n,o=r.tail;if(o!=null){n=s+1,r=O(o);continue e}else return s|0}})(0,e)|0}function Fn(e){if(e.tail!=null)return e.head;throw new Error(Ql+"\\nParameter name: list")}function at(e){const t=e.tail;if(t!=null)return O(t);throw new Error(Ql+"\\nParameter name: list")}function je(){return qe()}function Tt(e,t){return ms(e,t)}function te(e){return ms(e,qe())}function K(e){return _n(e)}function Nr(e){return nc(e)}function L(e){return Fn(e)}function b(e){return at(e)}function Qn(e){const t=nc(e)|0,n=ai(new Array(t),0,t,null);return((s,i)=>{e:for(;;){const o=s,a=i;if(!_n(a)){Nt(n,o,Fn(a)),s=o+1,i=at(a);continue e}break}})(0,e),n}function bn(e,t,n){let r=t,s=n;for(;!_n(s);)r=e(r,L(s)),s=at(s);return r}function ci(e){return bn((t,n)=>ms(n,t),qe(),e)}function Xm(e,t,n){return tc(e,Qn(t),n)}function Qm(e,t,n){return((s,i,o)=>{e:for(;;){const a=s,l=i,c=o;if(_n(c))return l;s=a+1,i=e(a,l,Fn(c)),o=at(c);continue e}})(0,t,n)}function ui(e,t){bn((n,r)=>{e(r)},void 0,t)}function Fe(e,t){let n=t;for(let r=e.length-1;r>=0;r--)n=ms(ge(r,e),n);return n}function y(e){return Fe(e,qe())}function ep(e){let t,n;if(an(e))return y(e);if(e instanceof yt)return e;{const r=qe();let s=r;const i=De(e);try{for(;i["System.Collections.IEnumerator.MoveNext"]();){const l=i["System.Collections.Generic.IEnumerator`1.get_Current"]();s=(t=s,n=new yt(l,void 0),t.tail=n,n)}}finally{xe(i)}const o=s,a=qe();return o.tail=a,at(r)}}function nt(e,t){return bn((n,r)=>ms(r,n),t,ci(e))}function tp(e,t){let n,r;const s=qe();let i=s,o=t;for(;!_n(o);){let c=e(Fn(o));for(;!_n(c);)i=(n=i,r=new yt(Fn(c),void 0),n.tail=r,r),c=at(c);o=at(o)}const a=i,l=qe();return a.tail=l,at(s)}function np(e,t){const n=qe(),r=Qm((i,o,a)=>{const l=new yt(e(i,a),void 0);return o.tail=l,l},n,t),s=qe();return r.tail=s,at(n)}function er(e,t){const n=qe(),r=bn((i,o)=>{const a=new yt(e(o),void 0);return i.tail=a,a},n,t),s=qe();return r.tail=s,at(n)}function rp(e,t){return(r=>{e:for(;;){const s=r;if(_n(s))return;{const i=e(Fn(s));if(i==null){r=at(s);continue e}else return i}}})(t)}function sp(e,t){return rp(n=>e(n)?ot(n):void 0,t)}function ip(e,t){return((r,s)=>{e:for(;;){const i=r,o=s;if(_n(o))return;if(e(Fn(o)))return i;r=i+1,s=at(o);continue e}})(0,t)}function op(e,t){return((r,s)=>{e:for(;;){const i=r,o=s;if(_n(o))return;if(i===e)return ot(Fn(o));r=i+1,s=at(o);continue e}})(0,t)}function rc(e,t){const n=qe(),r=bn((i,o)=>{if(e(o)){const a=new yt(o,void 0);return i.tail=a,a}else return i},n,t),s=qe();return r.tail=s,at(n)}function ap(e,t){const n=qe(),r=qe(),s=n,i=bn((l,c)=>{let d,u;const m=l[0],h=l[1];return e(c)?[(d=new yt(c,void 0),m.tail=d,d),h]:[m,(u=new yt(c,void 0),h.tail=u,u)]},[s,r],t),o=qe();i[0].tail=o;const a=qe();return i[1].tail=a,[at(s),at(r)]}function sc(e,t){const n=qe(),r=bn((i,o)=>{const a=e(o);if(a==null)return i;{const l=new yt(O(a),void 0);return i.tail=l,l}},n,t),s=qe();return r.tail=s,at(n)}function ic(e,t,n){return ip(r=>n.Equals(e,r),t)!=null}function lp(e,t){const n=Qn(t);return n.sort(e),y(n)}function cp(e,t,n){return lp((r,s)=>n.Compare(e(r),e(s)),t)}function up(e,t){return y(Dn(y,Km(e,Qn(t))))}function dp(e){return new $(0,[e])}function oc(e){return new $(1,[e])}class $ extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Ok","Error"]}}function vn(e,t){return t.tag===0?dp(e(t.fields[0])):oc(t.fields[0])}function fp(e,t){return t.tag===0?e(t.fields[0]):oc(t.fields[0])}function mt(e){return e.tag===0}class hp extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Name"]}}function ac(e){return new hp(e)}function So(e){return e.fields[0]}class mp extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Website"]}}class pp extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["FirstName"]}}class gp extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["LastName"]}}class $p extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Email"]}}class wp extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["MobilePhone"]}}let yp=class extends ee{constructor(t,n,r,s){super(),this.FirstName=t,this.LastName=n,this.Email=r,this.MobilePhone=s}};class _p extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Notes"]}}class bp extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["PartnerId"]}}function ln(e){return e.fields[0]}function Ue(e){return new bp(e)}function di(e){return ln(e)}class vp extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["AccountId"]}}function cn(e){return e.fields[0]}function jt(e){return new vp(e)}function fi(e){return cn(e)}class xp extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["BusinessName"]}}class Cp extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["BusinessNumber"]}}class Sp extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Address1"]}}class Ap extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Address2"]}}class kp extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["City"]}}class Ep extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Postcode"]}}let Ip=class extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["State"]}};class Np extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["SalesforceParentRecordId"]}}class Tp extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["ExternalApi","Admin"]}}new Tp(0,[]);function Rp(e){throw new Error(e)}const Mp="Enumeration already finished.",Pp="Enumeration has not started. Call MoveNext.",lc="The input sequence has an insufficient number of elements.",Op="Reset is not supported on this enumerator.";function Dp(){throw new Error(Op)}function Ao(){throw new Error(Pp)}function ko(){throw new Error(Mp)}class Fp{constructor(t){this.f=t}toString(){const t=this;let n=0,r="seq [";const s=De(t);try{for(;n<4&&s["System.Collections.IEnumerator.MoveNext"]();)n>0&&(r=r+"; "),r=r+ft(s["System.Collections.Generic.IEnumerator`1.get_Current"]()),n=n+1|0;return n===4&&(r=r+"; ..."),r+"]"}finally{xe(s)}}GetEnumerator(){return this.f()}[Symbol.iterator](){return is(De(this))}"System.Collections.IEnumerable.GetEnumerator"(){return this.f()}}function Vp(e){return new Fp(e)}class Lp{constructor(t,n,r){this.current=t,this.next=n,this.dispose=r}"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"(){Dp()}Dispose(){this.dispose()}}function hi(e,t,n){return new Lp(e,t,n)}function Bp(e){let t,n,r=!1,s=!1,i;const o=()=>{if(s=!0,n!=null){const a=O(n);try{xe(a)}finally{n=void 0}}if(t!=null){const a=O(t);try{xe(a)}finally{t=void 0}}};return hi(()=>(r?s&&ko():Ao(),i!=null?O(i):ko()),()=>{let a;if(r||(r=!0),s)return!1;{let l;for(;l==null;){const c=t,d=n;if(c!=null)if(d!=null){const u=O(d);if(u["System.Collections.IEnumerator.MoveNext"]())i=ot(u["System.Collections.Generic.IEnumerator`1.get_Current"]()),l=!0;else try{xe(u)}finally{n=void 0}}else{const u=O(c);u["System.Collections.IEnumerator.MoveNext"]()?n=(a=u["System.Collections.Generic.IEnumerator`1.get_Current"](),De(a)):(o(),l=!1)}else t=De(e)}return O(l)}},()=>{s||o()})}function Up(e,t){return hi(()=>t["System.Collections.Generic.IEnumerator`1.get_Current"](),()=>t["System.Collections.IEnumerator.MoveNext"](),()=>{try{xe(t)}finally{}})}function cc(e,t,n){let r=!1,s,i=ot(e());const o=()=>{if(i!=null){const l=O(i);try{n(l)}finally{i=void 0}}},a=()=>{try{o()}finally{s=void 0}};return hi(()=>(r||Ao(),s!=null?O(s):ko()),()=>{if(r||(r=!0),i!=null){const l=O(i);let c;try{c=t(l)}catch(d){throw a(),d}return c!=null?(s=c,!0):(a(),!1)}else return!1},o)}function jp(e,t){let n,r=t;return hi(()=>{if(n!=null){const s=O(n)[0];return O(n)[1],s}else return Ao()},()=>(n=e(r),n!=null?(O(n)[0],r=O(n)[1],!0):!1),()=>{})}function zp(e,t){t==null&&Rp(e)}function Tr(e){return Vp(e)}function xn(e){return zp("source",e),De(e)}function I(e){return Tr(()=>De(e()))}function Eo(e){return Tr(()=>Bp(e))}function Hp(e,t){return Tr(()=>jp(e,t))}function Ke(){return I(()=>new Array(0))}function E(e){return I(()=>Hm(e))}function _x(e){return e}function Io(e){return e instanceof yt?Qn(e):Array.from(e)}function me(e){return an(e)?y(e):e instanceof yt?e:ep(e)}function uc(e,t,n){return Tr(()=>cc(e,t,n))}function dc(e,t,n){return Tr(()=>{let r=-1;return cc(e,s=>(r=r+1|0,t(r,s)),n)})}function D(e,t){return Eo([e,t])}function ps(e,t){return uc(()=>xn(t),n=>{let r;for(;r==null&&n["System.Collections.IEnumerator.MoveNext"]();)r=e(n["System.Collections.Generic.IEnumerator`1.get_Current"]());return r},n=>{xe(n)})}function Wp(e,t,n){const r=xn(t);try{const s=xn(n);try{let i=0,o=r["System.Collections.IEnumerator.MoveNext"](),a=s["System.Collections.IEnumerator.MoveNext"]();for(;i===0&&o&&a;)i=e(r["System.Collections.Generic.IEnumerator`1.get_Current"](),s["System.Collections.Generic.IEnumerator`1.get_Current"]())|0,i===0&&(o=r["System.Collections.IEnumerator.MoveNext"](),a=s["System.Collections.IEnumerator.MoveNext"]());return(i!==0?i:o?1:a?-1:0)|0}finally{xe(s)}}finally{xe(r)}}function Rr(e,t,n){const r=xn(t);try{let s=!1;for(;!s&&r["System.Collections.IEnumerator.MoveNext"]();)s=n.Equals(e,r["System.Collections.Generic.IEnumerator`1.get_Current"]());return s}finally{xe(r)}}function gs(e,t,n){const r=xn(n);try{let s=t;for(;r["System.Collections.IEnumerator.MoveNext"]();)s=e(s,r["System.Collections.Generic.IEnumerator`1.get_Current"]());return s}finally{xe(r)}}function Mr(e,t){gs((n,r)=>{e(r)},void 0,t)}function Gp(e,t){gs((n,r)=>(e(n,r),n+1|0),0,t)}function Ve(e,t){return uc(()=>xn(t),n=>n["System.Collections.IEnumerator.MoveNext"]()?ot(e(n["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0,n=>{xe(n)})}function No(e,t){return dc(()=>xn(t),(n,r)=>r["System.Collections.IEnumerator.MoveNext"]()?ot(e(n,r["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0,n=>{xe(n)})}function qp(e){return I(()=>Wm(Io(e)))}function Kp(e,t){return Tr(()=>{const n=xn(t);try{for(let r=1;r<=e;r++)if(!n["System.Collections.IEnumerator.MoveNext"]())throw new Error(lc+"\\nParameter name: source");return Up(()=>{},n)}catch(r){throw xe(n),r}})}function Zp(e,t){return dc(()=>xn(t),(n,r)=>{if(n<e){if(r["System.Collections.IEnumerator.MoveNext"]())return ot(r["System.Collections.Generic.IEnumerator`1.get_Current"]());throw new Error(lc+"\\nParameter name: source")}else return},n=>{xe(n)})}function Jp(e,t){return I(()=>Eo(Ve(e,t)))}const tr={None:0,LowerFirst:1,SnakeCase:2,SnakeCaseAllCaps:3,KebabCase:4};function To(e,t){return e.replace(/[a-z]?[A-Z]/g,n=>n.length===1?n.toLowerCase():n.charAt(0)+t+n.charAt(1).toLowerCase())}function Yp(e,t){switch(t){case tr.LowerFirst:return e.charAt(0).toLowerCase()+e.slice(1);case tr.SnakeCase:return To(e,"_");case tr.SnakeCaseAllCaps:return To(e,"_").toUpperCase();case tr.KebabCase:return To(e,"-");case tr.None:default:return e}}function Vn(e,t=tr.None){const n={},r=t;function s(o){throw new Error("Cannot infer key and value of "+String(o))}function i(o,a,l){o=Yp(o,a),n[o]=l}for(let o of e){let a=tr.None;if(o==null&&s(o),o instanceof z){const l=o.cases()[o.tag];o=o.fields.length===0?l:[l].concat(o.fields),a=r}if(Array.isArray(o))switch(o.length){case 0:s(o);break;case 1:i(o[0],a,!0);break;case 2:const l=o[1];i(o[0],a,l);break;default:i(o[0],a,o.slice(1))}else typeof o=="string"?i(o,a,!0):s(o)}return n}function fc(e,t,n){return e.has(t)?(n.contents=e.get(t),!0):!1}function $s(e,t){if(e.has(t))return e.get(t);throw new Error(`The given key '${t}' was not present in the dictionary.`)}class Xp{constructor(t,n){const r=new wt($e());this.comparer=n,r.contents=this,this.hashMap=new Map([]),this["init@9"]=1;const s=De(t);try{for(;s["System.Collections.IEnumerator.MoveNext"]();){const i=s["System.Collections.Generic.IEnumerator`1.get_Current"]();Ro(r.contents,i[0],i[1])}}finally{xe(s)}}get[Symbol.toStringTag](){return"Dictionary"}toJSON(){const t=this;return Array.from(t)}"System.Collections.IEnumerable.GetEnumerator"(){return De(this)}GetEnumerator(){return De(Eo(this.hashMap.values()))}[Symbol.iterator](){return is(De(this))}"System.Collections.Generic.ICollection`1.Add2B595"(t){Ro(this,t[0],t[1])}"System.Collections.Generic.ICollection`1.Clear"(){hc(this)}"System.Collections.Generic.ICollection`1.Contains2B595"(t){const r=mi(this,t[0]);let s;switch(r!=null&&Pe(O(r)[1],t[1])?(s=0,O(r)):s=1,s){case 0:return!0;default:return!1}}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(t,n){Gp((s,i)=>{Nt(t,n+s,i)},this)}"System.Collections.Generic.ICollection`1.get_Count"(){return mc(this)|0}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!1}"System.Collections.Generic.ICollection`1.Remove2B595"(t){const n=this,r=mi(n,t[0]);return r!=null?(Pe(O(r)[1],t[1])&&Mo(n,t[0]),!0):!1}"System.Collections.Generic.IDictionary`2.Add5BDDA1"(t,n){Ro(this,t,n)}"System.Collections.Generic.IDictionary`2.ContainsKey2B595"(t){return $c(this,t)}"System.Collections.Generic.IDictionary`2.get_Item2B595"(t){return pc(this,t)}"System.Collections.Generic.IDictionary`2.set_Item5BDDA1"(t,n){gc(this,t,n)}"System.Collections.Generic.IDictionary`2.get_Keys"(){const t=this;return Io(I(()=>Ve(n=>n[0],t)))}"System.Collections.Generic.IDictionary`2.Remove2B595"(t){return Mo(this,t)}"System.Collections.Generic.IDictionary`2.TryGetValue6DC89625"(t,n){const s=mi(this,t);if(s!=null){const i=O(s);return n.contents=i[1],!0}else return!1}"System.Collections.Generic.IDictionary`2.get_Values"(){const t=this;return Io(I(()=>Ve(n=>n[1],t)))}get size(){return mc(this)|0}clear(){hc(this)}delete(t){return Mo(this,t)}entries(){return Ve(n=>[n[0],n[1]],this)}get(t){return pc(this,t)}has(t){return $c(this,t)}keys(){return Ve(n=>n[0],this)}set(t,n){const r=this;return gc(r,t,n),r}values(){return Ve(n=>n[1],this)}forEach(t,n){const r=this;Mr(s=>{t(s[1],s[0],r)},r)}}function ws(e,t){const n=e.comparer.GetHashCode(t)|0;let r,s=$e();return r=[fc(e.hashMap,n,new wt(()=>s,i=>{s=i})),s],r[0]?[!0,n,r[1].findIndex(i=>e.comparer.Equals(t,i[0]))]:[!1,n,-1]}function mi(e,t){const n=ws(e,t);let r;switch(n[0]&&n[2]>-1?r=0:r=1,r){case 0:return $s(e.hashMap,n[1])[n[2]];default:return}}function hc(e){e.hashMap.clear()}function mc(e){let t=0,n=De(e.hashMap.values());try{for(;n["System.Collections.IEnumerator.MoveNext"]();){const r=n["System.Collections.Generic.IEnumerator`1.get_Current"]();t=t+r.length|0}}finally{xe(n)}return t|0}function pc(e,t){const n=mi(e,t);if(n!=null)return O(n)[1];throw new Error("The item was not found in collection")}function gc(e,t,n){const r=ws(e,t);r[0]?r[2]>-1?$s(e.hashMap,r[1])[r[2]]=[t,n]:$s(e.hashMap,r[1]).push([t,n]):e.hashMap.set(r[1],[[t,n]])}function Ro(e,t,n){const r=ws(e,t);if(r[0]){if(r[2]>-1)throw new Error(Zl("An item with the same key has already been added. Key: {0}",t));$s(e.hashMap,r[1]).push([t,n])}else e.hashMap.set(r[1],[[t,n]])}function $c(e,t){const n=ws(e,t);let r;switch(n[0]&&n[2]>-1?r=0:r=1,r){case 0:return!0;default:return!1}}function Mo(e,t){const n=ws(e,t);let r;switch(n[0]&&n[2]>-1?r=0:r=1,r){case 0:return $s(e.hashMap,n[1]).splice(n[2],1),!0;default:return!1}}function Qp(e){return new wc(0,[e])}function e0(e){return new wc(1,[e])}class wc extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Choice1Of2","Choice2Of2"]}}function t0(e){return Qp(e)}function n0(e){return e0(e)}const r0=/^[\(\{]{0,2}[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[\)\}]{0,2}$/,yc=/^([0-9a-f]{8})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{12})$/,s0=/^\{0x[0-9a-f]{8},(0x[0-9a-f]{4},){2}\{(0x[0-9a-f]{2},){7}0x[0-9a-f]{2}\}\}$/;function i0(e){function t(r){return r.replace(yc,"$1-$2-$3-$4-$5")}const n=e.trim().toLowerCase();if(r0.test(n))return Bm(n,"{","}","(",")");if(yc.test(n))return t(n);if(s0.test(n))return t(n.replace(/[\{\},]|0x/g,""));throw new Error("Guid should contain 32 digits with 4 dashes: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")}function o0(e,t){try{return t.contents=i0(e),!0}catch{return!1}}class _c extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["StreamId"]}}function Pr(e){return e.fields[0]}var Po;(function(e){e[e.AllowHexSpecifier=512]="AllowHexSpecifier"})(Po||(Po={}));function a0(e,t){const[,n,r,s]=e;return{sign:n||"",prefix:r||"",digits:s,radix:t}}function bc(e,t){switch(t){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 l0(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.")}}function c0(e,t){if(t&Po.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}}function u0(e,t,n){const s=/^\s*([\+\-])?(0[xXoObB])?([0-9a-fA-F]+)\s*$/.exec(e.replace(/_/g,""));if(s!=null){const[,,i,o]=s;if(n=n||c0(i,t),!l0(n).test(o))return a0(s,n)}return null}function d0(e,t,n,r,s){const i=u0(e,t,s);if(i!=null){let o=Number.parseInt(i.sign+i.digits,i.radix);if(!Number.isNaN(o)){const[a,l]=bc(!0,r);!n&&i.radix!==10&&o>=a&&o<=l&&(o=o<<32-r>>32-r);const[c,d]=bc(n,r);if(o>=c&&o<=d)return o}}throw new Error(`The input string ${e} was not in a correct format.`)}function Or(e,t,n,r,s){try{return s.contents=d0(e,t,n,r),!0}catch{return!1}}const f0="#C$&$&$$$$$$%-%&%=$$$$$$=$$$$D$$'$$$$$$$$$$$$%$$%$$$$&$:$*;$+$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$$$$$$$$$$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$&%$$$%$&%'$%$&&%$%$$$$$%$$%$$%$&$$$%%$$&'$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$$$$$$$$$$$$$%$$$$$&$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*%$%%$$'$$$$$$$$h$>5'/1(*$$$4“$$$$$$$$%$&$$'%$$&$$$%$4$,F$%&&$$$$$$$$$$$$$$$$$$$$$$$($$$$$%%VS$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$(%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$$$$$$$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$I%$)L$$%%$$P$$$%$%$$+>''%.)&%$%%.$$$%C$-8-'%$†$$*$$)%%$'%-&%$1$$$$A>%|.$1-D,%$&$%$%9'$,$&$(%2$<&%$$.X8$5.2$C$Y$$$$&+'$%$*-%%-$$2$%$+%%%9$*$$&'%$$&'%%%%$$+$'%$&%%-%%)$$$$$%%$$)'%%9$*$%$%$%%$$&%'%%&&$*'$$*-%&$$-%$$,$&$9$*$%$(%$$&($%$$%$%$2%%%-$$*$)$$%$+%%%9$*$%$(%$$$$$'%%%%$*%$'%$&%%-$$)-$$$)&&$'&%$$$%&%&&&/'%$%&&$&$%$)$1-&)$$($&$+$&$:$3&$&'$&$'*%$&(%%%-*$*$$$%$+$&$:$-$(%$$$$($$%$%%*%*$$%%%-$%0%%,$&$L%$&'$&$&$$$'&$*&%%-,$)$$%$5&;$,$$%*&$'&&$$$+)-%%$/S$%*'$)$+$-%H%$$$($;$$$-$%,$%($$$)%-%'C$&2$$&%)--$$$$$$$$$$%+$G'1$($%(.$G$+$)$%('%HN%'$)$%%%$-))%%'&$&%*&'0$%%)$$$-&$%I$$($%N$$&Ŭ$'%*$$$'%L$'%D$'%*$$$'%2$\\$'%f%&,7&3-)y%)%$ʏ$$4$=$$&n&&+*0$'&.5&%,5%/0$&$%/W%$*+$%.&$&$$$%-)-))$'&$$-)F$X*(%E$$(i-B$&'%&'%$)&'$&%-A%(.O'=)-$&E:%%$%%X$$$*$$$$%+)-%$-)-)*$)%1$%b'$R$$($$($%*'-*-,,&%$A$'%%$&%-O$$%&$$&%+'G++%%&(-&&-A)%,*N%&++&$0$*'$)$%$%$(Ob0$EH]$($$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$,$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$,+)%)%++++)%)%+$$$$$$$$++1%++++++($%'$$$&&$%'$&'%%'$&+(&%&$%'$%$.()%$$$%$$$+$$($,$$'%&$$$.$$$-$($-$$%)&$$$-&$$$0&C30'$&/2%$'$%$&%&$$$%$()$$$$$$'$$'$'$%%%($'$$%$$3F$$'$%'((%'$%$%$*$B%%$$$Bį+$$$$7%*$$t$A<K)h<.8_q9Ú$,$Y+’$ě$$$$$$$$$$$$$$AO($$B$$$$$$$$$$3ģ¦$$$$$$$$$$$$$$$$$$$$$$b$$$$C$$ĥS8%)J%C$ŒR$R$$$&%$$$$$$'$$%$)%&$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%)$$$$&$$('$%I$$($%[*$$1$:,*$*$*$*$*$*$*$*$C%$$$$&$$$$$,$%$$$$%$$$$$$$$$$($-%'$$$0%$P=$|/ù=/'$&$$$$$$$$$$$$$$%$$$$$$$$$$%$,'%$(%&$$$%$y%%%%$$}$&$(N$$%'-CG/3B$-A+$2C-J2ţ᧣c删&8$Қ&Z,K)%į$&3-%7$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$&$-$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%%i-%)+:,%$$$$$$$$$$$$$&$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$+$$$$%$$$$$$$$$$%$$$$$$$$&$$$$$$$$$$$$$$$$$$$$($($$$$$$$$$$$%$$'$$$M$$$%$*$&$'$:%%$'$&)%$$)W'+%U3%+%-)5)&$$%$-?+%:.%.$@&&$R$%'%%&0$$-'%($$,-($L)%%%%,&$+$$%-%'3$)&$$$$U$$&%%(%$$$;%$%.$%%%$%$$-)%)%),*$*$N$',$%'sF%$%$%$$$%-)⯇/:'T'ࠣᤣƑ%I*/(($$-$0$($$$%$%$34Ǝ$$3c%YK/$$%3*$$$)3$%%$$$$$$$$$$$$$$$$%$$'&&$'$$$$$$$&$$&$$$%'($ª%$$&$&$$$$$$%-%&%=$$$$$$=$$$$$$$$$%-$P%B&)%)%)%&&%$$$%$$'%-&%%/$=$6$%$2%1Ež(&'P&,X'4%&$0&$RP$¥@&T2$>'C',7$+$(I((A$$G'+$(MKKq%-)G'G'K+W.$³Ś,9-+»)%$$O$%&$%:$$+:%*B+,S6$%((9)&$=($c['%%3%Q$&$%(''$&$@%&'$,*,*@%$@&C+$?%'(*,Y&*9%+6(+5*'/*slZV0V*)G'+-ʼnB$M$%$%%q@-$+9.'(y8*7:,$$$X2*'7-2&$P&'%%%$'.$%<*-)&G($+$-'$%$+F$%$,%$S&,%'''$$$-$$$&$7.5$<&&%$$%)$d*$$$'$2$-$)R$&+(-)%%$+%%%9$*$%$($%$%$'%%%&%$)$((%%*&(®X&+%&$$'(-%$$$&AS&)$$'%$%%$$+-ÉR&'%'%$%:'%ES&+%$$%&$.-)06N$$$%)$$$*-Y>%&%'$('-%&$ãO&,$%$‡CC-,/+%$%+$%$;)$%%%$$$$$$$&,-i+%J&'%%'$$$$$>$-K)$$'+$+$)%&Q0$%&$(@\\Ī,$H$*$)$$$(--6&%A%9$$*$%$%l*$%$I)&$$%$*$$+-))$%$C($%$%$$$$*-ř6%%%Ú$28+'40$ν‰’$(.ç૟ђ$,࿪ɪ⇜ɜ*B$-'%ƒA%($-S*(''$$--$*$8(6˓CC:'ˆn'$$Z*'0c%$$$.%1᠛+ӹM,⌚łT&4'+ƯधŽ(0&,*-%$%$'፿ę-J%_%&&)++%*A'^:e&$½7/z,<ª===*$5==$$%%$%%%'$+'$$$*$.==%$'%+$*$=%$'$($$&*$============?%<$<$)<$<$)<$<$)<$<$)<$<$)$$%UȣZ'U+$1$%(2($2ճ*$4%*$%$(øP&**%-'$$ƓO'-($ԣè%,*LEE*$'-'%̴^$&$'oP$2å'$>$%$$%$$-$'$$$$)$'$$$$$$&$%$$%$$$$$$$$$$%$$%'$*$'$'$$$-$4(&$($4W%ıO'‡/2%2$2$H-0Ä[@0O',*%1)½Ğ(˻+0&0&—/|*/7/'[+-)K+A%%qœ$u$ª/1%(&&(*,<**,&0*L¶$ZH-Щ꜁Eၘ.ā%ᚥ1ᵔూɁ؅፮򮳙$Aƒ£ē︳𐀡%𐀡",h0="1.;=;78;<;6;+;<;#7;8>5>$7<8<1.;=?;>?'9<2?>?<->$;>-':-;#<#$<$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$'#$'#%$#%$#%$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#%$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$'$&>&>&>&>&>(#$#$&>#$@&$;#@>#;#@#@#$#@#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$<#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$?(*#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$@#@&;$;6@?=@(6(;(;(;(@'@';@2<;=;?(;2@;'&'(+;'(';'(2?(&(?('+'?';@2'('(@'('@+'(&?;&@(='(&(&(&(@;@'(@;@'@'@'@(2()'()(')()()'('(;+;&'()@'@'@'@'@'@'@(')(@)@)('@)@'@'(@+'=-?=';(@()@'@'@'@'@'@'@'@(@)(@(@(@(@'@'@+('(;@()@'@'@'@'@'@'@(')(@()@)(@'@'(@+;=@'(@()@'@'@'@'@'@'@(')()(@)@)(@()@'@'(@+?'-@('@'@'@'@'@'@'@'@'@'@)()@)@)(@'@)@+-?=?@()('@'@'@'@'()@(@(@(@'@'(@+@;-?'();'@'@'@'@'@(')()@()@)(@)@'@'(@+@'@()'@'@'(')(@)@)('?@')-'(@+-?'@()@'@'@'@'@'@(@)(@(@)@+@);@'('(@='&(;+;@'@'@'@'@'@'('('@'@&@(@+@'@'?;?;?(?+-?(?(?(7878)'@'@()(;('(@(@?(?@?;?;@')()()()('+;')('(')')'('()()(')+)(?#@#@#@$;&$'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@(;-@'?@#@$@6'?;'.'78@';,'@'@'(@'(;@'(@'@'@(@'()()()(;&;='(@+@-@;6;(2@+@'&'@'('('@'@'@()()@)()(@?@;+'@'@'@'@+-@?'()(@;')()(@()()()(@(+@+@;&;@(*(@()'()()()()'@+;?(?@()')()()('+'()()()()@;')()(@;+@'+'&;$@#@#;@(;()('('(')('@$&$&$&(@(#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$@#@$#$#$@#@$@#@#@#@#$#$@$%$%$%$@$#%>$>$@$#%>$@$#@>$#>@$@$#%>@.26;9:79:79;/02.;9:;5;<78;<;5;.2@2-&@-<78&-<78@&@=@(*(*(@?#?#?$#$#$?#?<#?#?#?#?#?$#$'$?$#<#$?<?$?-,#$,-?@<?<?<?<?<?<?<?<?<?<?7878?<?78?<?<?<?@?@-?-?<?<?<?<?78787878787878-?<78<7878787878<?<7878787878787878787878<7878<78<?<?<?@?@?#@$@#$#$#$#$#$#$#$#$&#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$?#$#$(#$@;-;$@$@$@'@&;@('@'@'@'@'@'@'@'@'@(;9:9:;9:;9:;6;6;9:;9:78787878;&;6;6;7;?;@?@?@?@?@.;?&',7878787878?78787878678?,()6&?,&';?@'@(>&'6';&'@'@'@?-?'?@'?@-?-?-?-?-?'?'@'&'@?@'&;'&;'+'@#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$'(*;(;&#$#$#$#$#$#$#$#$#$#$#$#$#$#$&(',(;@>&>#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$&$#$#$#$#$#$#$#$&>#$#$'#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$@#$#$#$@#$'&$'('('(')()?(@-?=?@';@)')(@;+@(';';'(+'(;'()@;'@()'()()();@&+@;'(&'+'@'()()(@'('()@+@;'&'?')()'('('('('('@'&;')();'&)(@'@'@'@'@'@$>&$&>@$')()();)(@+@'@'@'@34'@'@$@$@'('<'@'@'@'@'@'>@'87@'@'@'=?@(;78;@(;657878787878787878;78;5;@;6787878;<6<@;=;@'@'@2@;=;78;<;6;+;<;#7;8>5>$7<8<78;78;'&'&'@'@'@'@'@=<>?=@?<?@2?@'@'@'@'@'@'@'@;@-@?,-?-?@?@?@?(@'@'@(-@'-@',',@'(@'@;'@';,@#$'@+@#@$@'@'@;@'@'@'@'@'@'@'@'@'@;-'?-'@-@'@'@-'-@;'@;@'@-'-@-'(@(@('@'@'@(@(-@;@'-;'-@'?'(@-;@'@;'@-'@-'@;@-@'@#@$@-'(@+@-@'@(6@'@'-'@'(-;@'-@'@)()'(;@-+@()')()(;2;@2@'@+@('()(@+;')'@'(;'@()')()';(;)(+';';@-@'@')()()(;(@'@'@'@'@';@'()(@+@()@'@'@'@'@'@'@(')()@)@)@'@)@')@(@(@')()()(';+;@;('@')()()()(';'@+@')(@)()(;'(@')()()(;'@+@;@'()()()('@+@'@()()(@+-;?@')()(;@#$+-@'@'@'@'@')@)@()(')')(;@+@'@')(@()(';')@'('()'(;(@'()('()(;';@'@'@')(@()(';@+-@;'@(@)()()(@'@'@'(@(@(@('(@+@'@'@')@(@)()('@+@'();@'@-?=?@;'@,@;@'@'@2@'@'@'@+@;@'@(;@'(;?&;?@+@-@'@'@#$-;@'@(')@(&@&;&(@)@'@'@'@'@'@'@'@'@'@'@'@?(;2@?@?@?)(?)2(?(?(?@?(?@-@?@-@#$#$@$#$#@#@#@#@#@#$@$@$@$#$#@#@#@#@$#@#@#@#@#@$#$#$#$#$#$#$@#<$<$#<$<$#<$<$#<$<$#<$<$#$@+?(?(?(?(?;@(@(@(@(@(@(@(@'@(&@+@'?@'(+@=@'@-(@#$(&@+@;@-?-=-@-?-@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@<@?@?@?@?@?@?@-?@?@?@?@?@?@?>?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@+@'@'@'@'@'@'@'@2@2@(@4@4@";function m0(){const t=[...f0].map(i=>(i.codePointAt(0)??0)-35),n=[...h0].map(i=>(i.codePointAt(0)??0)-35),r=new Uint32Array(t),s=new Uint8Array(n);for(let i=1;i<r.length;++i)r[i]+=r[i-1];return i=>{let o=r.length,a=0;for(;o-a>1;){const l=Math.floor((o+a)/2),c=r[l];if(i<c)o=l;else if(i===c){o=a=l;break}else c<i&&(a=l)}return s[a]}}const p0=256,g0=m0();function $0(e,t){if(t<e.length)return e.charCodeAt(t);throw new Error("Index out of range.")}const w0=e=>_0(e,0);function y0(e,t){const n=$0(e,t);return g0(n)}function _0(e,t){return(1<<y0(e,t)&p0)!==0}function b0(e,t){const n=Pm(Ul(e),t);if(n!=null)return b(me(I(()=>Ve(r=>r||"",n))))}function v0(e){let t;const n=b0(".*?@(.*)",e);switch(n!=null?K(n)?t=1:K(b(n))?t=0:t=1:t=1,t){case 0:return e;default:return}}function Rt(e,t){return oi(t)?new $(1,[Wt(Ut("%s cannot be null or empty"))(e)]):new $(0,[t])}function x0(e){const t=v0(e);if(t!=null){const n=t;return new $(0,[n])}else return new $(1,["Email is not in the correct format"])}function C0(e){return~~e.charCodeAt(0)-48}function S0(e){let t;const n=new $(1,["BusinessNumber is not valid"]),r=new Int32Array([10,1,3,5,7,9,11,13,15,17,19]),s=Dn(C0,(t=e.split(""),t.filter(w0)),Int32Array);return s.length===11?(Nt(s,0,ge(0,s)-1|0),Zm(zm((i,o)=>i*o,s,r,Int32Array),{GetZero:()=>0,Add:(i,o)=>i+o})%89===0?new $(0,[e]):n):n}function Oo(e){const t=Rt("Name",e);return t.tag===1?new $(1,[t.fields[0]]):new $(0,[ac(t.fields[0])])}function pi(e){return So(e)}function vc(e){const t=Rt("Website",e);return t.tag===1?new $(1,[t.fields[0]]):new $(0,[new mp(t.fields[0])])}function xc(e){return e.fields[0]}function Cc(e){const t=Rt("FirstName",e);return t.tag===1?new $(1,[t.fields[0]]):new $(0,[new pp(t.fields[0])])}function Sc(e){return e.fields[0]}function Ac(e){const t=Rt("LastName",e);return t.tag===1?new $(1,[t.fields[0]]):new $(0,[new gp(t.fields[0])])}function kc(e){return e.fields[0]}function Ec(e){let t;const n=Rt("Email",e);return t=n.tag===1?new $(1,[n.fields[0]]):x0(n.fields[0]),t.tag===1?new $(1,[t.fields[0]]):new $(0,[new $p(t.fields[0])])}function Ic(e){const t=Rt("MobilePhone",e);return t.tag===1?new $(1,[t.fields[0]]):new $(0,[new wp(t.fields[0])])}function Nc(e){return e.fields[0]}class Tc extends ee{constructor(t,n,r,s){super(),this.FirstName=t,this.LastName=n,this.Email=r,this.MobilePhone=s}}function Do(){return ht("AccountRegistry.Shared.Primitives.ContactDetails",[],Tc,()=>[["FirstName",H],["LastName",H],["Email",H],["MobilePhone",H]])}function A0(e){const t=Cc(e.FirstName);if(t.tag===1)return new $(1,[t.fields[0]]);{const n=Ac(e.LastName);if(n.tag===1)return new $(1,[n.fields[0]]);{const r=Ec(e.Email);if(r.tag===1)return new $(1,[r.fields[0]]);{const s=Ic(e.MobilePhone);return s.tag===1?new $(1,[s.fields[0]]):new $(0,[new yp(t.fields[0],n.fields[0],r.fields[0],s.fields[0])])}}}}function k0(e){const t=e;if(t!=null)return new _p(t)}function E0(e){if(e!=null)return e.fields[0]}function lt(e){return ln(e)}function un(e){return cn(e)}function Rc(e){const t=Rt("BusinessName",e);return t.tag===1?new $(1,[t.fields[0]]):new $(0,[new xp(t.fields[0])])}function Mc(e){let t;const n=Rt("BusinessNumber",e);return t=n.tag===1?new $(1,[n.fields[0]]):S0(n.fields[0]),t.tag===1?new $(1,[t.fields[0]]):new $(0,[new Cp(t.fields[0])])}function I0(e){const t=Rt("Address1",e);return t.tag===1?new $(1,[t.fields[0]]):new $(0,[new Sp(t.fields[0])])}function N0(e){const t=e;if(t!=null)return new Ap(t)}function T0(e){const t=Rt("City",e);return t.tag===1?new $(1,[t.fields[0]]):new $(0,[new kp(t.fields[0])])}function R0(e){const t=Rt("Postcode",e);return t.tag===1?new $(1,[t.fields[0]]):new $(0,[new Ep(t.fields[0])])}function M0(e){const t=Rt("State",e);return t.tag===1?new $(1,[t.fields[0]]):new $(0,[new Ip(t.fields[0])])}class Pc extends ee{constructor(t,n,r,s,i,o,a,l,c){super(),this.BusinessName=t,this.BusinessNumber=n,this.Address1=r,this.Address2=s,this.City=i,this.Postcode=o,this.State=a,this.Phone=l,this.CountryCode=c}}function P0(){return ht("AccountRegistry.Shared.Primitives.LegalEntity",[],Pc,()=>[["BusinessName",H],["BusinessNumber",H],["Address1",H],["Address2",ye(H)],["City",H],["Postcode",H],["State",ye(H)],["Phone",H],["CountryCode",ye(H)]])}function O0(e){const t=Rt("SalesforceParentRecordId",e);return t.tag===1?new $(1,[t.fields[0]]):new $(0,[new Np(t.fields[0])])}class Oc extends ee{constructor(t,n){super(),this.SalesforceParentRecordId=t,this.SalesforceRecordId=n}}function D0(){return ht("AccountRegistry.Shared.Primitives.SalesforceInfo",[],Oc,()=>[["SalesforceParentRecordId",H],["SalesforceRecordId",ye(H)]])}class Dc extends ee{constructor(t,n){super(),this.Code=t,this.Name=n}}function F0(){return ht("AccountRegistry.Shared.Primitives.AnzsicClassifier",[],Dc,()=>[["Code",H],["Name",H]])}class V0 extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Api","Direct"]}}function Fo(){return fo("AccountRegistry.Shared.Primitives.AccountProvisioningModeDto",[],V0,()=>[[],[]])}let L0=class extends ee{constructor(t,n,r,s,i,o){super(),this.StreamId=t,this.Name=n,this.Website=r,this.ContactDetails=s,this.Notes=i,this.AccountProvisioningMode=o}};function B0(){return ht("AccountRegistry.Shared.AdminApi.Partner",[],L0,()=>[["StreamId",H],["Name",H],["Website",H],["ContactDetails",ye(Do())],["Notes",ye(H)],["AccountProvisioningMode",Fo()]])}class Fc extends ee{constructor(t,n,r,s,i,o,a,l,c,d){super(),this.StreamId=t,this.PartnerId=n,this.Name=r,this.Website=s,this.ContactDetails=i,this.Notes=o,this.LegalEntity=a,this.ExternalId=l,this.ChannelId=c,this.ProvisioningMode=d}}function U0(){return ht("AccountRegistry.Shared.AdminApi.Account",[],Fc,()=>[["StreamId",H],["PartnerId",H],["Name",H],["Website",H],["ContactDetails",ye(Do())],["Notes",ye(H)],["LegalEntity",ye(P0())],["ExternalId",ye(H)],["ChannelId",ye(H)],["ProvisioningMode",Fo()]])}class j0 extends ee{constructor(t,n,r,s,i,o,a,l,c,d){super(),this.AccountId=t,this.Name=n,this.Contact=r,this.ContactMobilePhone=s,this.Website=i,this.BusinessName=o,this.BusinessNumber=a,this.ExternalId=l,this.ChannelId=c,this.ProvisioningMode=d}}function z0(){return ht("AccountRegistry.Shared.AdminApi.AccountLookupItem",[],j0,()=>[["AccountId",H],["Name",H],["Contact",ye(H)],["ContactMobilePhone",ye(H)],["Website",H],["BusinessName",ye(H)],["BusinessNumber",ye(H)],["ExternalId",ye(H)],["ChannelId",ye(H)],["ProvisioningMode",Fo()]])}class Vc extends ee{constructor(t,n){super(),this.Accounts=t,this.Token=n}}function H0(){return ht("AccountRegistry.Shared.AdminApi.AccountLookup",[],Vc,()=>[["Accounts",ho(z0())],["Token",ye(H)]])}class W0 extends ee{constructor(t,n){super(),this.PartnerId=t,this.AccountId=n}}function G0(){return ht("AccountRegistry.Shared.AdminApi.FindAccountResponse",[],W0,()=>[["PartnerId",H],["AccountId",H]])}class q0 extends ee{constructor(t,n){super(),this.ClassCode=t,this.ClassTitle=n}}function K0(){return ht("AccountRegistry.Shared.AdminApi.AnzsicClass",[],q0,()=>[["ClassCode",H],["ClassTitle",H]])}class Z0 extends ee{constructor(t,n,r){super(),this.GroupCode=t,this.GroupTitle=n,this.Classes=r}}function J0(){return ht("AccountRegistry.Shared.AdminApi.AnzsicGroup",[],Z0,()=>[["GroupCode",H],["GroupTitle",H],["Classes",Cl(K0())]])}class Y0 extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Success","TooManyResults"]}}function X0(){return fo("AccountRegistry.Shared.AdminApi.AnzsicSearchResult",[],Y0,()=>[[["Item",Cl(J0())]],[]])}class Lc extends ee{constructor(t,n,r,s,i,o,a,l,c){super(),this.BusinessName=t,this.BusinessNumber=n,this.Address1=r,this.Address2=s,this.City=i,this.Postcode=o,this.State=a,this.Phone=l,this.CountryCode=c}}function Q0(){return ht("AccountRegistry.Shared.AdminApi.Write.LegalEntityV2",[],Lc,()=>[["BusinessName",H],["BusinessNumber",H],["Address1",H],["Address2",ye(H)],["City",H],["Postcode",H],["State",ye(H)],["Phone",H],["CountryCode",H]])}class Bc extends ee{constructor(t,n,r,s,i,o,a,l,c){super(),this.Name=t,this.Website=n,this.ContactDetails=r,this.Notes=s,this.LegalEntity=i,this.ExternalId=o,this.ChannelId=a,this.SalesforceInfo=l,this.AnzsicClassifier=c}}function eg(){return ht("AccountRegistry.Shared.AdminApi.Write.AccountPost",[],Bc,()=>[["Name",H],["Website",H],["ContactDetails",Do()],["Notes",ye(H)],["LegalEntity",ye(Q0())],["ExternalId",ye(H)],["ChannelId",ye(H)],["SalesforceInfo",ye(D0())],["AnzsicClassifier",ye(F0())]])}class tg extends ee{constructor(t){super(),this.Id=t}}function ng(){return ht("AccountRegistry.Shared.AdminApi.Write.AccountPostResponse",[],tg,()=>[["Id",H]])}class Uc extends ee{constructor(t,n,r){super(),this.Name=t,this.BusinessName=n,this.BusinessNumber=r}}function rg(){return ht("AccountRegistry.Shared.AdminApi.Write.PatchAccountDto",[],Uc,()=>[["Name",ye(H)],["BusinessName",ye(H)],["BusinessNumber",ye(H)]])}var ys,se,jc,nr,zc,Hc,Vo,Lo,Bo,Uo,Wc,_s={},Gc=[],sg=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,gi=Array.isArray;function Cn(e,t){for(var n in t)e[n]=t[n];return e}function qc(e){var t=e.parentNode;t&&t.removeChild(e)}function f(e,t,n){var r,s,i,o={};for(i in t)i=="key"?r=t[i]:i=="ref"?s=t[i]:o[i]=t[i];if(arguments.length>2&&(o.children=arguments.length>3?ys.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)o[i]===void 0&&(o[i]=e.defaultProps[i]);return bs(e,o,r,s,null)}function bs(e,t,n,r,s){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:s??++jc,__i:-1,__u:0};return s==null&&se.vnode!=null&&se.vnode(i),i}function jo(){return{current:null}}function ve(e){return e.children}function Gt(e,t){this.props=e,this.context=t}function rr(e,t){if(t==null)return e.__?rr(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?rr(e):null}function Kc(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return Kc(e)}}function zo(e){(!e.__d&&(e.__d=!0)&&nr.push(e)&&!$i.__r++||zc!==se.debounceRendering)&&((zc=se.debounceRendering)||Hc)($i)}function $i(){var e,t,n,r,s,i,o,a;for(nr.sort(Vo);e=nr.shift();)e.__d&&(t=nr.length,r=void 0,i=(s=(n=e).__v).__e,o=[],a=[],n.__P&&((r=Cn({},s)).__v=s.__v+1,se.vnode&&se.vnode(r),Ho(n.__P,r,s,n.__n,n.__P.namespaceURI,32&s.__u?[i]:null,o,i??rr(s),!!(32&s.__u),a),r.__v=s.__v,r.__.__k[r.__i]=r,Qc(o,r,a),r.__e!=i&&Kc(r)),nr.length>t&&nr.sort(Vo));$i.__r=0}function Zc(e,t,n,r,s,i,o,a,l,c,d){var u,m,h,p,w,g=r&&r.__k||Gc,C=t.length;for(n.__d=l,ig(n,t,g),l=n.__d,u=0;u<C;u++)(h=n.__k[u])!=null&&typeof h!="boolean"&&typeof h!="function"&&(m=h.__i===-1?_s:g[h.__i]||_s,h.__i=u,Ho(e,h,m,s,i,o,a,l,c,d),p=h.__e,h.ref&&m.ref!=h.ref&&(m.ref&&Wo(m.ref,null,h),d.push(h.ref,h.__c||p,h)),w==null&&p!=null&&(w=p),65536&h.__u||m.__k===h.__k?(l&&!l.isConnected&&(l=rr(m)),l=Jc(h,l,e)):typeof h.type=="function"&&h.__d!==void 0?l=h.__d:p&&(l=p.nextSibling),h.__d=void 0,h.__u&=-196609);n.__d=l,n.__e=w}function ig(e,t,n){var r,s,i,o,a,l=t.length,c=n.length,d=c,u=0;for(e.__k=[],r=0;r<l;r++)o=r+u,(s=e.__k[r]=(s=t[r])==null||typeof s=="boolean"||typeof s=="function"?null:typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?bs(null,s,null,null,null):gi(s)?bs(ve,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?bs(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s)!=null?(s.__=e,s.__b=e.__b+1,a=og(s,n,o,d),s.__i=a,i=null,a!==-1&&(d--,(i=n[a])&&(i.__u|=131072)),i==null||i.__v===null?(a==-1&&u--,typeof s.type!="function"&&(s.__u|=65536)):a!==o&&(a===o+1?u++:a>o?d>l-o?u+=a-o:u--:a<o?a==o-1&&(u=a-o):u=0,a!==r+u&&(s.__u|=65536))):(i=n[o])&&i.key==null&&i.__e&&(131072&i.__u)==0&&(i.__e==e.__d&&(e.__d=rr(i)),Go(i,i,!1),n[o]=null,d--);if(d)for(r=0;r<c;r++)(i=n[r])!=null&&(131072&i.__u)==0&&(i.__e==e.__d&&(e.__d=rr(i)),Go(i,i))}function Jc(e,t,n){var r,s;if(typeof e.type=="function"){for(r=e.__k,s=0;r&&s<r.length;s++)r[s]&&(r[s].__=e,t=Jc(r[s],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function Sn(e,t){return t=t||[],e==null||typeof e=="boolean"||(gi(e)?e.some(function(n){Sn(n,t)}):t.push(e)),t}function og(e,t,n,r){var s=e.key,i=e.type,o=n-1,a=n+1,l=t[n];if(l===null||l&&s==l.key&&i===l.type&&(131072&l.__u)==0)return n;if(r>(l!=null&&(131072&l.__u)==0?1:0))for(;o>=0||a<t.length;){if(o>=0){if((l=t[o])&&(131072&l.__u)==0&&s==l.key&&i===l.type)return o;o--}if(a<t.length){if((l=t[a])&&(131072&l.__u)==0&&s==l.key&&i===l.type)return a;a++}}return-1}function Yc(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||sg.test(t)?n:n+"px"}function wi(e,t,n,r,s){var i;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Yc(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Yc(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||t==="onFocusOut"||t==="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=Lo,e.addEventListener(t,i?Uo:Bo,i)):e.removeEventListener(t,i?Uo:Bo,i);else{if(s=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function Xc(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=Lo++;else if(t.t<n.u)return;return n(se.event?se.event(t):t)}}}function Ho(e,t,n,r,s,i,o,a,l,c){var d,u,m,h,p,w,g,C,x,A,P,V,Y,ce,Ce,le=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),i=[a=t.__e=n.__e]),(d=se.__b)&&d(t);e:if(typeof le=="function")try{if(C=t.props,x=(d=le.contextType)&&r[d.__c],A=d?x?x.props.value:d.__:r,n.__c?g=(u=t.__c=n.__c).__=u.__E:("prototype"in le&&le.prototype.render?t.__c=u=new le(C,A):(t.__c=u=new Gt(C,A),u.constructor=le,u.render=lg),x&&x.sub(u),u.props=C,u.state||(u.state={}),u.context=A,u.__n=r,m=u.__d=!0,u.__h=[],u._sb=[]),u.__s==null&&(u.__s=u.state),le.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=Cn({},u.__s)),Cn(u.__s,le.getDerivedStateFromProps(C,u.__s))),h=u.props,p=u.state,u.__v=t,m)le.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(le.getDerivedStateFromProps==null&&C!==h&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(C,A),!u.__e&&(u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(C,u.__s,A)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(u.props=C,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(X){X&&(X.__=t)}),P=0;P<u._sb.length;P++)u.__h.push(u._sb[P]);u._sb=[],u.__h.length&&o.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(C,u.__s,A),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(h,p,w)})}if(u.context=A,u.props=C,u.__P=e,u.__e=!1,V=se.__r,Y=0,"prototype"in le&&le.prototype.render){for(u.state=u.__s,u.__d=!1,V&&V(t),d=u.render(u.props,u.state,u.context),ce=0;ce<u._sb.length;ce++)u.__h.push(u._sb[ce]);u._sb=[]}else do u.__d=!1,V&&V(t),d=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++Y<25);u.state=u.__s,u.getChildContext!=null&&(r=Cn(Cn({},r),u.getChildContext())),m||u.getSnapshotBeforeUpdate==null||(w=u.getSnapshotBeforeUpdate(h,p)),Zc(e,gi(Ce=d!=null&&d.type===ve&&d.key==null?d.props.children:d)?Ce:[Ce],t,n,r,s,i,o,a,l,c),u.base=t.__e,t.__u&=-161,u.__h.length&&o.push(u),g&&(u.__E=u.__=null)}catch(X){t.__v=null,l||i!=null?(t.__e=a,t.__u|=l?160:32,i[i.indexOf(a)]=null):(t.__e=n.__e,t.__k=n.__k),se.__e(X,t,n)}else i==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=ag(n.__e,t,n,r,s,i,o,l,c);(d=se.diffed)&&d(t)}function Qc(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)Wo(n[r],n[++r],n[++r]);se.__c&&se.__c(t,e),e.some(function(s){try{e=s.__h,s.__h=[],e.some(function(i){i.call(s)})}catch(i){se.__e(i,s.__v)}})}function ag(e,t,n,r,s,i,o,a,l){var c,d,u,m,h,p,w,g=n.props,C=t.props,x=t.type;if(x==="svg"?s="http://www.w3.org/2000/svg":x==="math"?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),i!=null){for(c=0;c<i.length;c++)if((h=i[c])&&"setAttribute"in h==!!x&&(x?h.localName===x:h.nodeType===3)){e=h,i[c]=null;break}}if(e==null){if(x===null)return document.createTextNode(C);e=document.createElementNS(s,x,C.is&&C),i=null,a=!1}if(x===null)g===C||a&&e.data===C||(e.data=C);else{if(i=i&&ys.call(e.childNodes),g=n.props||_s,!a&&i!=null)for(g={},c=0;c<e.attributes.length;c++)g[(h=e.attributes[c]).name]=h.value;for(c in g)if(h=g[c],c!="children"){if(c=="dangerouslySetInnerHTML")u=h;else if(c!=="key"&&!(c in C)){if(c=="value"&&"defaultValue"in C||c=="checked"&&"defaultChecked"in C)continue;wi(e,c,null,h,s)}}for(c in C)h=C[c],c=="children"?m=h:c=="dangerouslySetInnerHTML"?d=h:c=="value"?p=h:c=="checked"?w=h:c==="key"||a&&typeof h!="function"||g[c]===h||wi(e,c,h,g[c],s);if(d)a||u&&(d.__html===u.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(u&&(e.innerHTML=""),Zc(e,gi(m)?m:[m],t,n,r,x==="foreignObject"?"http://www.w3.org/1999/xhtml":s,i,o,i?i[0]:n.__k&&rr(n,0),a,l),i!=null)for(c=i.length;c--;)i[c]!=null&&qc(i[c]);a||(c="value",p!==void 0&&(p!==e[c]||x==="progress"&&!p||x==="option"&&p!==g[c])&&wi(e,c,p,g[c],s),c="checked",w!==void 0&&w!==e[c]&&wi(e,c,w,g[c],s))}return e}function Wo(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){se.__e(r,n)}}function Go(e,t,n){var r,s;if(se.unmount&&se.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Wo(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){se.__e(i,t)}r.base=r.__P=null}if(r=e.__k)for(s=0;s<r.length;s++)r[s]&&Go(r[s],t,n||typeof e.type!="function");n||e.__e==null||qc(e.__e),e.__c=e.__=e.__e=e.__d=void 0}function lg(e,t,n){return this.constructor(e,n)}function Ln(e,t,n){var r,s,i,o;se.__&&se.__(e,t),s=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],o=[],Ho(t,e=(!r&&n||t).__k=f(ve,null,[e]),s||_s,_s,t.namespaceURI,!r&&n?[n]:s?null:t.firstChild?ys.call(t.childNodes):null,i,!r&&n?n:s?s.__e:t.firstChild,r,o),Qc(i,e,o)}function qo(e,t){Ln(e,t,qo)}function Ko(e,t,n){var r,s,i,o,a=Cn({},e.props);for(i in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)i=="key"?r=t[i]:i=="ref"?s=t[i]:a[i]=t[i]===void 0&&o!==void 0?o[i]:t[i];return arguments.length>2&&(a.children=arguments.length>3?ys.call(arguments,2):n),bs(e.type,a,r||e.key,s||e.ref,null)}function Bn(e,t){var n={__c:t="__cC"+Wc++,__:e,Consumer:function(r,s){return r.children(s)},Provider:function(r){var s,i;return this.getChildContext||(s=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&s.some(function(a){a.__e=!0,zo(a)})},this.sub=function(o){s.push(o);var a=o.componentWillUnmount;o.componentWillUnmount=function(){s.splice(s.indexOf(o),1),a&&a.call(o)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}ys=Gc.slice,se={__e:function(e,t,n,r){for(var s,i,o;t=t.__;)if((s=t.__c)&&!s.__)try{if((i=s.constructor)&&i.getDerivedStateFromError!=null&&(s.setState(i.getDerivedStateFromError(e)),o=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(e,r||{}),o=s.__d),o)return s.__E=s}catch(a){e=a}throw e}},jc=0,Gt.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Cn({},this.state),typeof e=="function"&&(e=e(Cn({},n),this.props)),e&&Cn(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),zo(this))},Gt.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),zo(this))},Gt.prototype.render=ve,nr=[],Hc=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Vo=function(e,t){return e.__v.__b-t.__v.__b},$i.__r=0,Lo=0,Bo=Xc(!1),Uo=Xc(!0),Wc=0;var An,Ae,Zo,eu,Dr=0,tu=[],yi=[],Le=se,nu=Le.__b,ru=Le.__r,su=Le.diffed,iu=Le.__c,ou=Le.unmount,au=Le.__;function sr(e,t){Le.__h&&Le.__h(Ae,e,Dr||t),Dr=0;var n=Ae.__H||(Ae.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:yi}),n.__[e]}function Ze(e){return Dr=1,Fr(cu,e)}function Fr(e,t,n){var r=sr(An++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):cu(void 0,t),function(a){var l=r.__N?r.__N[0]:r.__[0],c=r.t(l,a);l!==c&&(r.__N=[c,r.__[1]],r.__c.setState({}))}],r.__c=Ae,!Ae.u)){var s=function(a,l,c){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(m){return!!m.__c});if(d.every(function(m){return!m.__N}))return!i||i.call(this,a,l,c);var u=!1;return d.forEach(function(m){if(m.__N){var h=m.__[0];m.__=m.__N,m.__N=void 0,h!==m.__[0]&&(u=!0)}}),!(!u&&r.__c.props===a)&&(!i||i.call(this,a,l,c))};Ae.u=!0;var i=Ae.shouldComponentUpdate,o=Ae.componentWillUpdate;Ae.componentWillUpdate=function(a,l,c){if(this.__e){var d=i;i=void 0,s(a,l,c),i=d}o&&o.call(this,a,l,c)},Ae.shouldComponentUpdate=s}return r.__N||r.__}function Te(e,t){var n=sr(An++,3);!Le.__s&&ea(n.__H,t)&&(n.__=e,n.i=t,Ae.__H.__h.push(n))}function kn(e,t){var n=sr(An++,4);!Le.__s&&ea(n.__H,t)&&(n.__=e,n.i=t,Ae.__h.push(n))}function de(e){return Dr=5,ct(function(){return{current:e}},[])}function Jo(e,t,n){Dr=6,kn(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function ct(e,t){var n=sr(An++,7);return ea(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Un(e,t){return Dr=8,ct(function(){return e},t)}function dn(e){var t=Ae.context[e.__c],n=sr(An++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(Ae)),t.props.value):e.__}function Yo(e,t){Le.useDebugValue&&Le.useDebugValue(t?t(e):e)}function cg(e){var t=sr(An++,10),n=Ze();return t.__=e,Ae.componentDidCatch||(Ae.componentDidCatch=function(r,s){t.__&&t.__(r,s),n[1](r)}),[n[0],function(){n[1](void 0)}]}function Xo(){var e=sr(An++,11);if(!e.__){for(var t=Ae.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function ug(){for(var e;e=tu.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(_i),e.__H.__h.forEach(Qo),e.__H.__h=[]}catch(t){e.__H.__h=[],Le.__e(t,e.__v)}}Le.__b=function(e){Ae=null,nu&&nu(e)},Le.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),au&&au(e,t)},Le.__r=function(e){ru&&ru(e),An=0;var t=(Ae=e.__c).__H;t&&(Zo===Ae?(t.__h=[],Ae.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=yi,n.__N=n.i=void 0})):(t.__h.forEach(_i),t.__h.forEach(Qo),t.__h=[],An=0)),Zo=Ae},Le.diffed=function(e){su&&su(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(tu.push(t)!==1&&eu===Le.requestAnimationFrame||((eu=Le.requestAnimationFrame)||dg)(ug)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==yi&&(n.__=n.__V),n.i=void 0,n.__V=yi})),Zo=Ae=null},Le.__c=function(e,t){t.some(function(n){try{n.__h.forEach(_i),n.__h=n.__h.filter(function(r){return!r.__||Qo(r)})}catch(r){t.some(function(s){s.__h&&(s.__h=[])}),t=[],Le.__e(r,n.__v)}}),iu&&iu(e,t)},Le.unmount=function(e){ou&&ou(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{_i(r)}catch(s){t=s}}),n.__H=void 0,t&&Le.__e(t,n.__v))};var lu=typeof requestAnimationFrame=="function";function dg(e){var t,n=function(){clearTimeout(r),lu&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);lu&&(t=requestAnimationFrame(n))}function _i(e){var t=Ae,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),Ae=t}function Qo(e){var t=Ae;e.__c=e.__(),Ae=t}function ea(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function cu(e,t){return typeof t=="function"?t(e):t}function uu(e,t){for(var n in t)e[n]=t[n];return e}function ta(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function bi(e,t){this.props=e,this.context=t}function du(e,t){function n(s){var i=this.props.ref,o=i==s.ref;return!o&&i&&(i.call?i(null):i.current=null),t?!t(this.props,s)||!o:ta(this.props,s)}function r(s){return this.shouldComponentUpdate=n,f(e,s)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(bi.prototype=new Gt).isPureReactComponent=!0,bi.prototype.shouldComponentUpdate=function(e,t){return ta(this.props,e)||ta(this.state,t)};var fu=se.__b;se.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),fu&&fu(e)};var fg=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function jn(e){function t(n){var r=uu({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=fg,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var hu=function(e,t){return e==null?null:Sn(Sn(e).map(t))},mu={map:hu,forEach:hu,count:function(e){return e?Sn(e).length:0},only:function(e){var t=Sn(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Sn},hg=se.__e;se.__e=function(e,t,n,r){if(e.then){for(var s,i=t;i=i.__;)if((s=i.__c)&&s.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),s.__c(e,t)}hg(e,t,n,r)};var pu=se.unmount;function gu(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=uu({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return gu(r,t,n)})),e}function $u(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return $u(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function vs(){this.__u=0,this.t=null,this.__b=null}function wu(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function yu(e){var t,n,r;function s(i){if(t||(t=e()).then(function(o){n=o.default||o},function(o){r=o}),r)throw r;if(!n)throw t;return f(n,i)}return s.displayName="Lazy",s.__f=!0,s}function Vr(){this.u=null,this.o=null}se.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),pu&&pu(e)},(vs.prototype=new Gt).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var s=wu(r.__v),i=!1,o=function(){i||(i=!0,n.__R=null,s?s(a):a())};n.__R=o;var a=function(){if(!--r.__u){if(r.state.__a){var l=r.state.__a;r.__v.__k[0]=$u(l,l.__c.__P,l.__c.__O)}var c;for(r.setState({__a:r.__b=null});c=r.t.pop();)c.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},vs.prototype.componentWillUnmount=function(){this.t=[]},vs.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=gu(this.__b,n,r.__O=r.__P)}this.__b=null}var s=t.__a&&f(ve,null,e.fallback);return s&&(s.__u&=-33),[f(ve,null,t.__a?null:e.children),s]};var _u=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function mg(e){return this.getChildContext=function(){return e.context},e.children}function pg(e){var t=this,n=e.i;t.componentWillUnmount=function(){Ln(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(r){this.childNodes.push(r),t.i.appendChild(r)},insertBefore:function(r,s){this.childNodes.push(r),t.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.i.removeChild(r)}}),Ln(f(mg,{context:t.context},e.__v),t.l)}function bu(e,t){var n=f(pg,{__v:e,i:t});return n.containerInfo=t,n}(Vr.prototype=new Gt).__a=function(e){var t=this,n=wu(t.__v),r=t.o.get(e);return r[0]++,function(s){var i=function(){t.props.revealOrder?(r.push(s),_u(t,e,r)):s()};n?n(i):i()}},Vr.prototype.render=function(e){this.u=null,this.o=new Map;var t=Sn(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},Vr.prototype.componentDidUpdate=Vr.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){_u(e,n,t)})};var vu=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,gg=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|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]/,$g=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,wg=/[A-Z0-9]/g,yg=typeof document<"u",_g=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function xu(e,t,n){return t.__k==null&&(t.textContent=""),Ln(e,t),typeof n=="function"&&n(),e?e.__c:null}function Cu(e,t,n){return qo(e,t),typeof n=="function"&&n(),e?e.__c:null}Gt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Gt.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Su=se.event;function bg(){}function vg(){return this.cancelBubble}function xg(){return this.defaultPrevented}se.event=function(e){return Su&&(e=Su(e)),e.persist=bg,e.isPropagationStopped=vg,e.isDefaultPrevented=xg,e.nativeEvent=e};var na,Cg={enumerable:!1,configurable:!0,get:function(){return this.class}},Au=se.vnode;se.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,s={};for(var i in n){var o=n[i];if(!(i==="value"&&"defaultValue"in n&&o==null||yg&&i==="children"&&r==="noscript"||i==="class"||i==="className")){var a=i.toLowerCase();i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&o===!0?o="":a==="translate"&&o==="no"?o=!1:a==="ondoubleclick"?i="ondblclick":a!=="onchange"||r!=="input"&&r!=="textarea"||_g(n.type)?a==="onfocus"?i="onfocusin":a==="onblur"?i="onfocusout":$g.test(i)?i=a:r.indexOf("-")===-1&&gg.test(i)?i=i.replace(wg,"-$&").toLowerCase():o===null&&(o=void 0):a=i="oninput",a==="oninput"&&s[i=a]&&(i="oninputCapture"),s[i]=o}}r=="select"&&s.multiple&&Array.isArray(s.value)&&(s.value=Sn(n.children).forEach(function(l){l.props.selected=s.value.indexOf(l.props.value)!=-1})),r=="select"&&s.defaultValue!=null&&(s.value=Sn(n.children).forEach(function(l){l.props.selected=s.multiple?s.defaultValue.indexOf(l.props.value)!=-1:s.defaultValue==l.props.value})),n.class&&!n.className?(s.class=n.class,Object.defineProperty(s,"className",Cg)):(n.className&&!n.class||n.class&&n.className)&&(s.class=s.className=n.className),t.props=s}(e),e.$$typeof=vu,Au&&Au(e)};var ku=se.__r;se.__r=function(e){ku&&ku(e),na=e.__c};var Eu=se.diffed;se.diffed=function(e){Eu&&Eu(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),na=null};var Iu={ReactCurrentDispatcher:{current:{readContext:function(e){return na.__n[e.__c].props.value},useCallback:Un,useContext:dn,useDebugValue:Yo,useDeferredValue:oa,useEffect:Te,useId:Xo,useImperativeHandle:Jo,useInsertionEffect:la,useLayoutEffect:kn,useMemo:ct,useReducer:Fr,useRef:de,useState:Ze,useSyncExternalStore:ca,useTransition:aa}}},Sg="17.0.2";function Nu(e){return f.bind(null,e)}function Lr(e){return!!e&&e.$$typeof===vu}function Tu(e){return Lr(e)&&e.type===ve}function Ru(e){return!!e&&!!e.displayName&&(typeof e.displayName=="string"||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function ra(e){return Lr(e)?Ko.apply(null,arguments):e}function Mu(e){return!!e.__k&&(Ln(null,e),!0)}function Pu(e){return e&&(e.base||e.nodeType===1&&e)||null}var Ou=function(e,t){return e(t)},sa=function(e,t){return e(t)},Du=ve;function ia(e){e()}function oa(e){return e}function aa(){return[!1,ia]}var la=kn,Fu=Lr;function ca(e,t){var n=t(),r=Ze({h:{__:n,v:t}}),s=r[0].h,i=r[1];return kn(function(){s.__=n,s.v=t,ua(s)&&i({h:s})},[e,n,t]),Te(function(){return ua(s)&&i({h:s}),e(function(){ua(s)&&i({h:s})})},[e]),n}function ua(e){var t,n,r=e.v,s=e.__;try{var i=r();return!((t=s)===(n=i)&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}}var Z={useState:Ze,useId:Xo,useReducer:Fr,useEffect:Te,useLayoutEffect:kn,useInsertionEffect:la,useTransition:aa,useDeferredValue:oa,useSyncExternalStore:ca,startTransition:ia,useRef:de,useImperativeHandle:Jo,useMemo:ct,useCallback:Un,useContext:dn,useDebugValue:Yo,version:"17.0.2",Children:mu,render:xu,hydrate:Cu,unmountComponentAtNode:Mu,createPortal:bu,createElement:f,createContext:Bn,createFactory:Nu,cloneElement:ra,createRef:jo,Fragment:ve,isValidElement:Lr,isElement:Fu,isFragment:Tu,isMemo:Ru,findDOMNode:Pu,Component:Gt,PureComponent:bi,memo:du,forwardRef:jn,flushSync:sa,unstable_batchedUpdates:Ou,StrictMode:Du,Suspense:vs,SuspenseList:Vr,lazy:yu,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Iu};const da=Object.freeze(Object.defineProperty({__proto__:null,Children:mu,Component:Gt,Fragment:ve,PureComponent:bi,StrictMode:Du,Suspense:vs,SuspenseList:Vr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Iu,cloneElement:ra,createContext:Bn,createElement:f,createFactory:Nu,createPortal:bu,createRef:jo,default:Z,findDOMNode:Pu,flushSync:sa,forwardRef:jn,hydrate:Cu,isElement:Fu,isFragment:Tu,isMemo:Ru,isValidElement:Lr,lazy:yu,memo:du,render:xu,startTransition:ia,unmountComponentAtNode:Mu,unstable_batchedUpdates:Ou,useCallback:Un,useContext:dn,useDebugValue:Yo,useDeferredValue:oa,useEffect:Te,useErrorBoundary:cg,useId:Xo,useImperativeHandle:Jo,useInsertionEffect:la,useLayoutEffect:kn,useMemo:ct,useReducer:Fr,useRef:de,useState:Ze,useSyncExternalStore:ca,useTransition:aa,version:Sg},Symbol.toStringTag,{value:"Module"})),Ag=e=>{Te(()=>{const t=e();return()=>{t.Dispose()}})},kg=(e,t)=>{Te(()=>{const n=e();return()=>{n.Dispose()}},t)},Eg=e=>{kn(()=>{const t=e();return()=>{t.Dispose()}})},v=Z,Ig=Ag,Vu=kg,Ng=Eg;function Tg(e,t,n,r){const s=v.memo(e,pe(We(Ge(On,n),$e())));return Mr(i=>{e.displayName=i},vo(t)),i=>{const o=Rg(r,i);return v.createElement(s,o)}}function Rg(e,t){if(e==null)return t;{const n=e;return t.key=n(t),t}}function xs(e){return{Dispose(){e()}}}function Lu(e,t){Vu(e,t)}function Mg(e){Ng(t=>(e(),xs(()=>{})))}function fa(e){const t=v.useRef(!1);Og(()=>{t.current||(t.current=!0,e())},[])}function Bu(e){const t=v.useRef(void 0),n=v.useRef(!1),r=v.useRef(!1);n.current&&(r.current=!0),Lu(()=>{let s;return n.current?s=void 0:(n.current=!0,t.current=ot(e()),s=r.current?t.current:void 0),{Dispose(){Mr(i=>{xe(i)},vo(s))}}},[])}function Pg(e){Ig(t=>(e(),xs(()=>{})))}function Og(e,t){Vu(n=>(e(),xs(()=>{})),t)}function Dg(e,t){const n=We(t,[]);return v.useCallback(e,n)}function Uu(e){return v.useRef(e)}function Fg(e,t,n){return Tg(e,void 0,bo(n),bo(t))}function Vg(e,t){const n=v.createContext(We(t,void 0));return Mr(r=>{n.displayName=r},vo(e)),n}function Lg(e,t,n){return v.createElement(e.Provider,{value:t},...n)}function ir(e){return v.useContext(e)}function ju(e){const t=Uu(e),n=Dg(r=>t.current(r),[]);return Mg(()=>{t.current=e}),n}function zn(e){return v.useState(e)}class zu{constructor(t=!1){this._id=0,this._cancelled=t,this._listeners=new Map}get isCancelled(){return this._cancelled}cancel(){if(!this._cancelled){this._cancelled=!0;for(const[,t]of this._listeners)t()}}addListener(t){const n=this._id;return this._listeners.set(this._id++,t),n}removeListener(t){return this._listeners.delete(t)}register(t,n){const r=this,s=this.addListener(n==null?t:()=>t(n));return{Dispose(){r.removeListener(s)}}}Dispose(){}}class vi extends Error{constructor(){super("The operation was canceled"),Object.setPrototypeOf(this,vi.prototype)}}class ha{static get maxTrampolineCallCount(){return 2e3}constructor(){this.callCount=0}incrementAndCheck(){return this.callCount++>ha.maxTrampolineCallCount}hijack(t){this.callCount=0,setTimeout(t,0)}}function En(e){return t=>{if(t.cancelToken.isCancelled)t.onCancel(new vi);else if(t.trampoline.incrementAndCheck())t.trampoline.hijack(()=>{try{e(t)}catch(n){t.onError(Ys(n))}});else try{e(t)}catch(n){t.onError(Ys(n))}}}function Bg(e,t){return En(n=>{e({onSuccess:r=>{try{t(r)(n)}catch(s){n.onError(Ys(s))}},onError:n.onError,onCancel:n.onCancel,cancelToken:n.cancelToken,trampoline:n.trampoline})})}function Ug(e){return En(t=>t.onSuccess(e))}class jg{Bind(t,n){return Bg(t,n)}Combine(t,n){return this.Bind(t,()=>n)}Delay(t){return En(n=>t()(n))}For(t,n){const r=t[Symbol.iterator]();let s=r.next();return this.While(()=>!s.done,this.Delay(()=>{const i=n(s.value);return s=r.next(),i}))}Return(t){return Ug(t)}ReturnFrom(t){return t}TryFinally(t,n){return En(r=>{t({onSuccess:s=>{n(),r.onSuccess(s)},onError:s=>{n(),r.onError(s)},onCancel:s=>{n(),r.onCancel(s)},cancelToken:r.cancelToken,trampoline:r.trampoline})})}TryWith(t,n){return En(r=>{t({onSuccess:r.onSuccess,onCancel:r.onCancel,cancelToken:r.cancelToken,trampoline:r.trampoline,onError:s=>{try{n(s)(r)}catch(i){r.onError(Ys(i))}}})})}Using(t,n){return this.TryFinally(n(t),()=>t.Dispose())}While(t,n){return t()?this.Bind(n,()=>this.While(t,n)):this.Return(void 0)}Zero(){return En(t=>t.onSuccess(void 0))}}const T=new jg;function ma(e){}function zg(e){return new zu(!1)}function Hg(e){e.cancel()}function Wg(e){return e!=null&&e.isCancelled}const Hu=new zu;function Gg(e){return En(t=>{e({onSuccess:n=>t.onSuccess(t0(n)),onError:n=>t.onSuccess(n0(n)),onCancel:t.onCancel,cancelToken:t.cancelToken,trampoline:t.trampoline})})}function qg(e){return En(t=>e([t.onSuccess,t.onError,t.onCancel]))}function pa(e){return En(t=>{let n;const r=setTimeout(()=>{t.cancelToken.removeListener(n),t.onSuccess(void 0)},e);n=t.cancelToken.addListener(()=>{clearTimeout(r),t.onCancel(new vi)})})}function Kg(e,t){return Wu(e,t)}function Br(e,t){return Kg(e,t)}function Wu(e,t,n,r,s){typeof t!="function"&&(s=t,t=void 0);const i=new ha;e({onSuccess:t||ma,onError:n||ma,onCancel:r||ma,cancelToken:s||Hu,trampoline:i})}function Zg(e,t){return new Promise((n,r)=>Wu(e,n,r,r,Hu))}class Gu{constructor(t,n){this.k=t,this.v=n}}function xi(e,t){return new Gu(e,t)}function _t(e){return e.k}function Mt(e){return e.v}class Je extends Gu{constructor(t,n,r,s,i){super(t,n),this.left=r,this.right=s,this.h=i|0}}function Ci(e,t,n,r,s){return new Je(e,t,n,r,s)}function bt(e){return e.left}function vt(e){return e.right}function or(e){return e.h}function bx(){}function qu(e,t){e:for(;;){const n=e,r=t;if(r!=null){const s=O(r);if(s instanceof Je){const i=s;e=qu(n+1,bt(i)),t=vt(i);continue e}else return n+1|0}else return n|0}}function Jg(e){return qu(0,e)}function qt(e,t,n,r){let s,i,o;const a=e;if(a!=null){const u=O(a);o=u instanceof Je?(s=u,or(s)):1}else o=0;let l;const c=r;if(c!=null){const u=O(c);l=u instanceof Je?(i=u,or(i)):1}else l=0;const d=(o<l?l:o)|0;return d===0?xi(t,n):Ci(t,n,e,r,d+1)}function Ku(e,t,n,r){let s,i,o,a,l,c,d,u,m;const h=e;if(h!=null){const g=O(h);m=g instanceof Je?(s=g,or(s)):1}else m=0;let p;const w=r;if(w!=null){const g=O(w);p=g instanceof Je?(i=g,or(i)):1}else p=0;if(p>m+2){const g=O(r);if(g instanceof Je){const C=g;if(o=bt(C),(o!=null?(a=O(o),a instanceof Je?(l=a,or(l)):1):0)>m+1){const x=O(bt(C));if(x instanceof Je){const A=x;return qt(qt(e,t,n,bt(A)),_t(A),Mt(A),qt(vt(A),_t(C),Mt(C),vt(C)))}else throw new Error("internal error: Map.rebalance")}else return qt(qt(e,t,n,bt(C)),_t(C),Mt(C),vt(C))}else throw new Error("internal error: Map.rebalance")}else if(m>p+2){const g=O(e);if(g instanceof Je){const C=g;if(c=vt(C),(c!=null?(d=O(c),d instanceof Je?(u=d,or(u)):1):0)>p+1){const x=O(vt(C));if(x instanceof Je){const A=x;return qt(qt(bt(C),_t(C),Mt(C),bt(A)),_t(A),Mt(A),qt(vt(A),t,n,r))}else throw new Error("internal error: Map.rebalance")}else return qt(bt(C),_t(C),Mt(C),qt(vt(C),t,n,r))}else throw new Error("internal error: Map.rebalance")}else return qt(e,t,n,r)}function Ur(e,t,n,r){if(r!=null){const s=O(r),i=e.Compare(t,_t(s))|0;if(s instanceof Je){const o=s;return i<0?Ku(Ur(e,t,n,bt(o)),_t(o),Mt(o),vt(o)):i===0?Ci(t,n,bt(o),vt(o),or(o)):Ku(bt(o),_t(o),Mt(o),Ur(e,t,n,vt(o)))}else return i<0?Ci(t,n,void 0,r,2):i===0?xi(t,n):Ci(t,n,r,void 0,2)}else return xi(t,n)}function Zu(e,t,n){e:for(;;){const r=e,s=t,i=n;if(i!=null){const o=O(i),a=r.Compare(s,_t(o))|0;if(a===0)return ot(Mt(o));if(o instanceof Je){const l=o;e=r,t=s,n=a<0?bt(l):vt(l);continue e}else return}else return}}function Yg(e,t,n){const r=Zu(e,t,n);if(r==null)throw new Error;return O(r)}function Xg(e,t,n){e:for(;;){const r=e,s=t,i=n;if(i!=null){const o=O(i),a=r.Compare(s,_t(o))|0;if(o instanceof Je){const l=o;if(a<0){e=r,t=s,n=bt(l);continue e}else{if(a===0)return!0;e=r,t=s,n=vt(l);continue e}}else return a===0}else return!1}}function Ju(e,t){e:for(;;){const n=e,r=t;if(r!=null){const s=O(r);if(s instanceof Je){const i=s;Ju(n,bt(i)),n(_t(i),Mt(i)),e=n,t=vt(i);continue e}else n(_t(s),Mt(s))}break}}function Qg(e,t){Ju(e,t)}function e$(e,t,n){let r=n;Qg((s,i)=>{Nt(t,r,[s,i]),r=r+1|0},e)}function t$(e,t){return bn((n,r)=>Ur(e,r[0],r[1],n),void 0,t)}function n$(e,t,n){e:for(;;){const r=e,s=t,i=n;if(i["System.Collections.IEnumerator.MoveNext"]()){const o=i["System.Collections.Generic.IEnumerator`1.get_Current"]();e=r,t=Ur(r,o[0],o[1],s),n=i;continue e}else return s}}function r$(e,t){let n=void 0;for(let r=0;r<=t.length-1;r++){const s=ge(r,t);n=Ur(e,s[0],s[1],n)}return n}function Yu(e,t){if(an(t))return r$(e,t);if(t instanceof yt)return t$(e,t);{const n=De(t);try{return n$(e,void 0,n)}finally{xe(n)}}}class s$ extends ee{constructor(t,n){super(),this.stack=t,this.started=n}}function Xu(e){e:for(;;){const t=e;if(K(t))return je();{const n=b(t),r=L(t);if(r!=null){const s=O(r);if(s instanceof Je){const i=s;e=Fe([bt(i),xi(_t(i),Mt(i)),vt(i)],n);continue e}else return t}else{e=n;continue e}}}}function Qu(e){return new s$(Xu(te(e)),!1)}function i$(){throw new Error("enumeration not started")}function o$(){throw new Error("enumeration already finished")}function ed(e){if(e.started){const t=e.stack;if(K(t))return o$();if(L(t)!=null){const n=O(L(t));if(n instanceof Je)throw new Error("Please report error: Map iterator, unexpected stack for current");return[_t(n),Mt(n)]}else throw new Error("Please report error: Map iterator, unexpected stack for current")}else return i$()}function a$(e){if(e.started){const t=e.stack;if(K(t))return!1;if(L(t)!=null){if(O(L(t))instanceof Je)throw new Error("Please report error: Map iterator, unexpected stack for moveNext");return e.stack=Xu(b(t)),!K(e.stack)}else throw new Error("Please report error: Map iterator, unexpected stack for moveNext")}else return e.started=!0,!K(e.stack)}function td(e){let t=Qu(e);return{"System.Collections.Generic.IEnumerator`1.get_Current"(){return ed(t)},"System.Collections.IEnumerator.get_Current"(){return ed(t)},"System.Collections.IEnumerator.MoveNext"(){return a$(t)},"System.Collections.IEnumerator.Reset"(){t=Qu(e)},Dispose(){}}}class Si{constructor(t,n){this.comparer=t,this.tree=n}GetHashCode(){return d$(this)|0}Equals(t){const n=this;if(t instanceof Si){const r=t,s=De(n);try{const i=De(r);try{const o=()=>{const a=s["System.Collections.IEnumerator.MoveNext"]();if(a===i["System.Collections.IEnumerator.MoveNext"]())if(a){const l=s["System.Collections.Generic.IEnumerator`1.get_Current"](),c=i["System.Collections.Generic.IEnumerator`1.get_Current"]();return Pe(l[0],c[0])&&Pe(l[1],c[1])?o():!1}else return!0;else return!1};return o()}finally{xe(i)}}finally{xe(s)}}else return!1}toString(){return"map ["+re("; ",Ve(n=>Zl("({0}, {1})",n[0],n[1]),this))+"]"}get[Symbol.toStringTag](){return"FSharpMap"}toJSON(){const t=this;return Array.from(t)}GetEnumerator(){return td(this.tree)}[Symbol.iterator](){return is(De(this))}"System.Collections.IEnumerable.GetEnumerator"(){return td(this.tree)}CompareTo(t){const n=this;if(t instanceof Si)return Wp((s,i)=>{const o=n.comparer.Compare(s[0],i[0])|0;return(o!==0?o:Lt(s[1],i[1]))|0},n,t)|0;throw new Error("not comparable\\nParameter name: obj")}"System.Collections.Generic.ICollection`1.Add2B595"(t){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"(t){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Contains2B595"(t){const n=this;return rd(n,t[0])&&Pe(nd(n,t[0]),t[1])}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(t,n){e$(this.tree,t,n)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return ga(this)|0}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return ga(this)|0}get size(){return ga(this)|0}clear(){throw new Error("Map cannot be mutated")}delete(t){throw new Error("Map cannot be mutated")}entries(){return Ve(n=>[n[0],n[1]],this)}get(t){return nd(this,t)}has(t){return rd(this,t)}keys(){return Ve(n=>n[0],this)}set(t,n){throw new Error("Map cannot be mutated")}values(){return Ve(n=>n[1],this)}forEach(t,n){const r=this;Mr(s=>{t(s[1],s[0],r)},r)}}function Ai(e,t){return new Si(e,t)}function l$(e){return Ai(e,void 0)}function c$(e,t,n){return Ai(e.comparer,Ur(e.comparer,t,n,e.tree))}function nd(e,t){return Yg(e.comparer,t,e.tree)}function ga(e){return Jg(e.tree)}function rd(e,t){return Xg(e.comparer,t,e.tree)}function u$(e,t){return Zu(e.comparer,t,e.tree)}function d$(e){const t=(s,i)=>(s<<1)+i+631;let n=0;const r=De(e);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const s=r["System.Collections.Generic.IEnumerator`1.get_Current"]();n=t(n,yn(s[0]))|0,n=t(n,yn(s[1]))|0}}finally{xe(r)}return n|0}function sd(e,t,n){return c$(n,e,t)}function id(e,t){return u$(t,e)}function f$(e,t){return Ai(t,Yu(t,e))}function h$(e,t){return Ai(t,Yu(t,e))}function $a(e){return l$(e)}class we extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["HasNotStartedYet","InProgress","Resolved","Failed"]}}function od(e,t){const n=Uu(zg());return Bu(()=>xs(()=>{Hg(n.current)})),ju(r=>{Wg(n.current)||Br(T.Delay(()=>T.TryWith(T.Delay(()=>(t(new we(1,[])),T.Bind(e(r),s=>(t(new we(2,[s])),T.Zero())))),s=>(t(new we(3,[s])),T.Zero()))),n.current)})}class m${constructor(t,n,r){this.OnNext=t,this.OnError=n||(s=>{}),this.OnCompleted=r||(()=>{})}}function p$(e,t){t.Subscribe(new m$(e))}class g${constructor(){this.delegates=[]}_add(t){this.delegates.push(t)}_remove(t){const n=this.delegates.indexOf(t);n>-1&&this.delegates.splice(n,1)}get Publish(){return w$(t=>{this._add(t)},t=>{this._remove(t)})}Trigger(t,n){let r=null;const s=n===void 0?t:(r=t,n);this.delegates.forEach(i=>{i(r,s)})}}let $$=class extends g${};function w$(e,t){return{AddHandler(n){e(n)},RemoveHandler(n){t(n)},Subscribe(n){const r=(s,i)=>n.OnNext(i);return e(r),{Dispose(){t(r)}}}}}class y${constructor(t){this._enabled=!1,this._isDisposed=!1,this._intervalId=0,this._timeoutId=0,this.Interval=t&&t>0?t:100,this.AutoReset=!0,this._elapsed=new $$}Elapsed(){return this._elapsed.Publish}get Enabled(){return this._enabled}set Enabled(t){!this._isDisposed&&this._enabled!==t&&(this._enabled=t,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}}function _$(e,t){console.error(ot(e),t)}function b$(e,t){let n,r=new y$(e);r.AutoReset=!1,n=r,p$(t,n.Elapsed()),n.Enabled=!0,n.Start()}function ad(e,t,n){ui(r=>{try{r(t)}catch(s){e(s)}},n)}function fe(){return je()}function Ye(e){return te(e)}function wa(e,t,n,r){return te(s=>{e(T.Delay(()=>T.Bind(Gg(t(n)),i=>{const o=i;return o.tag===0&&s(r(o.fields[0])),T.Zero()})))})}function ya(e){b$(1,t=>{Br(e)})}function Cs(e,t){if(t.indexOf(e)===0)return t}function ld(e,t){if(Vm(t,e))return t}function v$(e){return t=>{let n,r,s,i,o,a;return n=Cs("/",t),n!=null?(r=n,"#"+r):(s=Cs("#/",t),s!=null?(i=s,i):(o=Cs("#",t),o!=null?(a=o,"#/"+Yl(a,1,a.length-1)):"#/"+t))}}function ar(e,t){return v$()(re("/",er(n=>n.indexOf("?")>=0||n.indexOf("#")===0||n.indexOf("/")===0?n:encodeURIComponent(n),e)))}function ut(e,t,n){history.pushState(void 0,"",ar(e));const r=document.createEvent("CustomEvent");r.initEvent("CUSTOM_NAVIGATION_EVENT",!0,!0),window.dispatchEvent(r)}function cd(e,t){return tp(n=>{if(Jl(n))return je();{const r=Um(n,"#");if(r==="?")return je();if(Cs("?",r)!=null)return te(r);{const s=r.split("?");if(!Co((i,o)=>i===o,s)&&s.length===1){const i=ge(0,s);return te(decodeURIComponent(i))}else if(!Co((i,o)=>i===o,s)&&s.length===2)if(ge(1,s)===""){const i=ge(0,s);return te(decodeURIComponent(i))}else{const i=ge(0,s),o=ge(1,s);return y([decodeURIComponent(i),"?"+o])}else return je()}}},y(_o(Cs("#",e)!=null?Yl(e,1,e.length-1):t===1&&(ld("#",e)!=null||ld("#/",e)!=null)?"":e,["/"],void 0,0)))}function x$(e,t,n){return t(cd(e===2?window.location.pathname+window.location.search:window.location.hash,e))}const C$=Fg(e=>{const t=ju(r=>{const s=We(e.onUrlChanged,i=>{});x$(We(e.hashMode,1),s)});Bu(()=>(window.navigator.userAgent.indexOf("Trident")>=0||window.navigator.userAgent.indexOf("MSIE")>=0?window.addEventListener("hashchange",t):window.addEventListener("popstate",t),window.addEventListener("CUSTOM_NAVIGATION_EVENT",t),xs(()=>{window.navigator.userAgent.indexOf("Trident")>=0||window.navigator.userAgent.indexOf("MSIE")>=0?window.removeEventListener("hashchange",t):window.removeEventListener("popstate",t),window.removeEventListener("CUSTOM_NAVIGATION_EVENT",t)}))),fa(()=>{const r=document.createEvent("CustomEvent");r.initEvent("CUSTOM_NAVIGATION_EVENT",!0,!0),window.dispatchEvent(r)});const n=e.application;return n??$e()});class In extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["AccountId","Name"]}}class lr extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Asc","Desc"]}}function ud(e){return e.tag===0?new lr(1,[]):new lr(0,[])}class Ss extends z{constructor(t,n){super(),this.tag=0,this.fields=[t,n]}cases(){return["Sort"]}}const S$=new Ss(new In(1,[]),new lr(0,[]));function A$(e){return[e.fields[0],e.fields[1]]}function dd(e){return e.fields[0]}function fd(e){return e.fields[1]}function hd(e,t){const n=t.fields[0],r=t.fields[1];return e.tag===1?n.tag===1?new Ss(new In(1,[]),ud(r)):new Ss(new In(1,[]),new lr(0,[])):n.tag===0?new Ss(new In(0,[]),ud(r)):new Ss(new In(0,[]),new lr(0,[]))}class md extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["SearchText"]}}const k$=new md("");function E$(e){return new md(e)}function pd(e){return e.fields[0]}class I$ extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["PageSize"]}}function N$(e){return new I$(e)}function gd(e){return e.fields[0]}class _a extends ee{constructor(t,n,r){super(),this.SearchText=t,this.Sort=n,this.PageSize=r}}class T$ extends z{constructor(t,n){super(),this.tag=0,this.fields=[t,n]}cases(){return["AccountKey"]}}function $d(e){return[e.fields[0],e.fields[1]]}function R$(e,t){return new T$(e,t)}function M$(e){const t=$d(e);return[t[0],t[1]]}function P$(){return new Xp([],{Equals:Pe,GetHashCode:Jh})}function wd(e,t){let n,r=$e();if(n=[fc(e,t,new wt(()=>r,s=>{r=s})),r],n[0])return n[1]}function ba(e,t,n){return e.set(t,n),e}class O$ extends ee{constructor(t,n,r,s,i,o){super(),this.StreamId=t,this.Name=n,this.Website=r,this.ContactDetails=s,this.Notes=i,this.AccountProvisioningMode=o}}function D$(e){const t=Oo(e.Name);if(t.tag===1)return new $(1,[t.fields[0]]);{const n=vc(e.Website);if(n.tag===1)return new $(1,[n.fields[0]]);{let r;const s=e.ContactDetails;if(s!=null){const i=A0(s);r=i.tag===1?new $(1,[i.fields[0]]):new $(0,[i.fields[0]])}else r=new $(0,[void 0]);return r.tag===1?new $(1,[r.fields[0]]):new $(0,[new O$(new _c(e.StreamId),t.fields[0],n.fields[0],r.fields[0],k0(e.Notes),e.AccountProvisioningMode)])}}}function va(e,t){return sp(n=>Pr(n.StreamId)===di(t),e)}class q extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["PartnerList","Partner","PartnerProfilesDirectory","PartnerAccountList","PartnerSuperConfiguration","PartnerBenefitsOnboardingConfiguration","PartnerBankDetailsConfiguration","PartnerWorkspace","Account","AccountProfilesDirectory","AccountUsers","AccountSuperConfiguration","AccountBenefitsOnboardingConfiguration","AccountBankDetailsConfiguration","AccountSalaryPackagingConfiguration","AccountWorkspace","AccountHrisMigration","NotFound"]}}function yd(e){let t,n,r,s,i,o,a,l,c,d,u,m,h,p,w,g,C,x,A,P,V,Y,ce,Ce,le,X;if(K(e))t=17;else if(L(e)==="account-registry")if(K(b(e)))t=17;else if(L(b(e))==="partners")if(K(b(b(e))))t=0;else if(K(b(b(b(e)))))t=1,n=L(b(b(e)));else switch(L(b(b(b(e))))){case"accounts":{if(K(b(b(b(b(e))))))t=2,r=L(b(b(e)));else if(K(b(b(b(b(b(e)))))))t=8,c=L(b(b(b(b(e))))),d=L(b(b(e)));else switch(L(b(b(b(b(b(e))))))){case"directory":{K(b(b(b(b(b(b(e)))))))?(t=9,u=L(b(b(b(b(e))))),m=L(b(b(e)))):t=17;break}case"users":{K(b(b(b(b(b(b(e)))))))?(t=10,h=L(b(b(b(b(e))))),p=L(b(b(e)))):t=17;break}case"super-configuration":{K(b(b(b(b(b(b(e)))))))?(t=11,w=L(b(b(b(b(e))))),g=L(b(b(e)))):t=17;break}case"benefits-onboarding-configuration":{K(b(b(b(b(b(b(e)))))))?(t=12,C=L(b(b(b(b(e))))),x=L(b(b(e)))):t=17;break}case"bank-details-configuration":{K(b(b(b(b(b(b(e)))))))?(t=13,A=L(b(b(b(b(e))))),P=L(b(b(e)))):t=17;break}case"salary-packaging-configuration":{K(b(b(b(b(b(b(e)))))))?(t=14,V=L(b(b(b(b(e))))),Y=L(b(b(e)))):t=17;break}case"workspace":{K(b(b(b(b(b(b(e)))))))?(t=15,ce=L(b(b(b(b(e))))),Ce=L(b(b(e)))):t=17;break}case"hris-migration":{K(b(b(b(b(b(b(e)))))))?(t=16,le=L(b(b(b(b(e))))),X=L(b(b(e)))):t=17;break}default:t=17}break}case"super-configuration":{K(b(b(b(b(e)))))?(t=3,s=L(b(b(e)))):t=17;break}case"benefits-onboarding-configuration":{K(b(b(b(b(e)))))?(t=4,i=L(b(b(e)))):t=17;break}case"directory":{K(b(b(b(b(e)))))?(t=5,o=L(b(b(e)))):t=17;break}case"bank-details-configuration":{K(b(b(b(b(e)))))?(t=6,a=L(b(b(e)))):t=17;break}case"workspace":{K(b(b(b(b(e)))))?(t=7,l=L(b(b(e)))):t=17;break}default:t=17}else t=17;else t=17;switch(t){case 0:return new q(0,[]);case 1:return new q(1,[Ue(n)]);case 2:return new q(3,[Ue(r)]);case 3:return new q(4,[Ue(s)]);case 4:return new q(5,[Ue(i)]);case 5:return new q(2,[Ue(o)]);case 6:return new q(6,[Ue(a)]);case 7:return new q(7,[Ue(l)]);case 8:return new q(8,[Ue(d),jt(c)]);case 9:return new q(9,[Ue(m),jt(u)]);case 10:return new q(10,[Ue(p),jt(h)]);case 11:return new q(11,[Ue(g),jt(w)]);case 12:return new q(12,[Ue(x),jt(C)]);case 13:return new q(13,[Ue(P),jt(A)]);case 14:return new q(14,[Ue(Y),jt(V)]);case 15:return new q(15,[Ue(Ce),jt(ce)]);case 16:return new q(16,[Ue(X),jt(le)]);default:return new q(17,[])}}function As(e){const t=(r,s)=>me(I(()=>D(E("account-registry"),I(()=>D(E("partners"),I(()=>D(E(lt(r)),I(()=>s)))))))),n=(r,s,i)=>{const o=me(I(()=>D(E("accounts"),I(()=>D(E(un(s)),I(()=>i))))));return t(r,o)};switch(e.tag){case 3:return t(e.fields[0],["accounts"]);case 4:return t(e.fields[0],["super-configuration"]);case 5:return t(e.fields[0],["benefits-onboarding-configuration"]);case 6:return t(e.fields[0],["bank-details-configuration"]);case 2:return t(e.fields[0],["directory"]);case 7:return t(e.fields[0],["workspace"]);case 8:return n(e.fields[0],e.fields[1],[]);case 9:return n(e.fields[0],e.fields[1],["directory"]);case 10:return n(e.fields[0],e.fields[1],["users"]);case 11:return n(e.fields[0],e.fields[1],["super-configuration"]);case 12:return n(e.fields[0],e.fields[1],["benefits-onboarding-configuration"]);case 13:return n(e.fields[0],e.fields[1],["bank-details-configuration"]);case 14:return n(e.fields[0],e.fields[1],["salary-packaging-configuration"]);case 15:return n(e.fields[0],e.fields[1],["workspace"]);case 16:return n(e.fields[0],e.fields[1],["hris-migration"]);case 17:case 0:return y(["account-registry","partners"]);default:return t(e.fields[0],[])}}function xa(e){switch(e.tag){case 3:{const t=["account-registry","partners",lt(e.fields[0]),"accounts"];return Ye(n=>{ut(y(t))})}case 4:{const t=["account-registry","partners",lt(e.fields[0]),"super-configuration"];return Ye(n=>{ut(y(t))})}case 5:{const t=["account-registry","partners",lt(e.fields[0]),"benefits-onboarding-configuration"];return Ye(n=>{ut(y(t))})}case 6:{const t=["account-registry","partners",lt(e.fields[0]),"bank-details-configuration"];return Ye(n=>{ut(y(t))})}case 2:{const t=["account-registry","partners",lt(e.fields[0]),"directory"];return Ye(n=>{ut(y(t))})}case 7:{const t=["account-registry","partners",lt(e.fields[0]),"workspace"];return Ye(n=>{ut(y(t))})}case 8:{const t=["account-registry","partners",lt(e.fields[0]),"accounts",un(e.fields[1])];return Ye(n=>{ut(y(t))})}case 9:{const t=["account-registry","partners",lt(e.fields[0]),"accounts",un(e.fields[1]),"directory"];return Ye(n=>{ut(y(t))})}case 10:{const t=["account-registry","partners",lt(e.fields[0]),"accounts",un(e.fields[1]),"users"];return Ye(n=>{ut(y(t))})}case 11:{const t=["account-registry","partners",lt(e.fields[0]),"accounts",un(e.fields[1]),"super-configuration"];return Ye(n=>{ut(y(t))})}case 12:{const t=["account-registry","partners",lt(e.fields[0]),"accounts",un(e.fields[1]),"benefits-onboarding-configuration"];return Ye(n=>{ut(y(t))})}case 13:{const t=["account-registry","partners",lt(e.fields[0]),"accounts",un(e.fields[1]),"bank-details-configuration"];return Ye(n=>{ut(y(t))})}case 14:{const t=["account-registry","partners",lt(e.fields[0]),"accounts",un(e.fields[1]),"salary-packaging-configuration"];return Ye(n=>{ut(y(t))})}case 15:{const t=["account-registry","partners",lt(e.fields[0]),"accounts",un(e.fields[1]),"workspace"];return Ye(n=>{ut(y(t))})}case 16:{const t=["account-registry","partners",lt(e.fields[0]),"accounts",un(e.fields[1]),"hris-migration"];return Ye(n=>{ut(y(t))})}case 0:case 17:return fe();default:{const t=["account-registry","partners",lt(e.fields[0])];return Ye(n=>{ut(y(t))})}}}function F$(e,t){switch(t.tag){case 1:return new we(1,[]);case 2:return t.fields[0].tag===1?new we(2,[new $(1,[t.fields[0].fields[0]])]):new we(2,[new $(0,[e(t.fields[0].fields[0])])]);case 3:return new we(3,[t.fields[0]]);default:return new we(0,[])}}class _d extends ee{constructor(t,n){super(),this.Name=t,this.LegalEntity=n}}class bd extends ee{constructor(t,n){super(),this.BusinessName=t,this.BusinessNumber=n}}class vd extends ee{constructor(t,n){super(),this.ReadProtectedData=t,this.ProvisionAccounts=n}}function V$(e){return new vd(ic("AccountRegistry.ReadProtectedData",e.Roles,{Equals:(t,n)=>t===n,GetHashCode:xr}),ic("AccountRegistry.ProvisionAccounts",e.Roles,{Equals:(t,n)=>t===n,GetHashCode:xr}))}const L$=new vd(!1,!1);class W extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["BadPrimitive","BadPrimitiveExtra","BadType","BadField","BadPath","TooSmallArray","FailMessage","BadOneOf"]}}class xt extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["PascalCase","CamelCase","SnakeCase"]}}function xd(e){return e.slice(void 0,1).toLowerCase()+e.slice(1,e.length)}function Cd(e,t){switch(e.tag){case 2:return Om(xd(t),"[A-Z]","_$0").toLowerCase();case 0:return t;default:return xd(t)}}function Sd(e,t){B$(t);const n=new Date(e);return n.offset=t??new Date().getTimezoneOffset()*-6e4,n}function B$(e){if(e!=null&&e!==0){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.")}}function U$(){return Sd(-621355968e5,0)}function j$(e){const[t,n]=Dl(e),r=n==null?t.getTimezoneOffset()*-6e4:n==="Z"?0:n*6e4;return Sd(t.getTime(),r)}function z$(e,t){try{return t.contents=j$(e),!0}catch{return!1}}function ks(e){return e<0?Math.ceil(e):Math.floor(e)}function Ad(e=0,t=0,n=0,r=0,s=0){switch(arguments.length){case 1:return H$(arguments[0]);case 3:e=0,t=arguments[0],n=arguments[1],r=arguments[2],s=0;break}return e*864e5+t*36e5+n*6e4+r*1e3+s}function H$(e){return Number(BigInt(e)/10000n)}function W$(e){return ks(e/864e5)}function G$(e){return ks(e%864e5/36e5)}function q$(e){return ks(e%36e5/6e4)}function K$(e){return ks(e%6e4/1e3)}function Z$(e){return ks(e%1e3)}function J$(e,t="c",n){if(["c","g","G"].indexOf(t)===-1)throw new Error("Custom formats are not supported");const r=Math.abs(W$(e)),s=Math.abs(G$(e)),i=Math.abs(q$(e)),o=Math.abs(K$(e)),a=Math.abs(Z$(e));return`${e<0?"-":""}${r===0&&(t==="c"||t==="g")?"":t==="c"?r+".":r+":"}${t==="g"?s:be(s,2)}:${be(i,2)}:${be(o,2)}${a===0&&(t==="c"||t==="g")?"":t==="g"?"."+be(a,3):"."+Hh(a,3,7)}`}function Y$(e){const t=e.search("\\."),n=e.search("\\:");if(t===-1&&n===-1){const r=parseInt(e,0);if(isNaN(r))throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`);return Ad(r,0,0,0,0)}if(n>0){const r=/^(-?)((\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(r!=null&&r[4]!=null&&r[5]!=null){let s=0,i=0,o=0;const a=r[1]!=null&&r[1]==="-"?-1:1,l=+r[4],c=+r[5];if(r[3]!=null&&(s=+r[3]),r[7]!=null&&(o=+r[7]),r[8]!=null)switch(r[8].length){case 1:i=+r[8]*100;break;case 2:i=+r[8]*10;break;case 3:i=+r[8];break;case 4:i=+r[8]/10;break;case 5:i=+r[8]/100;break;case 6:i=+r[8]/1e3;break;case 7:i=+r[8]/1e4;break;default:throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}return a*Ad(s,l,c,o,i)}}throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}function X$(e,t){try{return t.contents=Y$(e),!0}catch{return!1}}class kd{constructor(t){this.k=t}}function Pt(e){return new kd(e)}function Q(e){return e.k}class _e extends kd{constructor(t,n,r,s){super(t),this.left=n,this.right=r,this.h=s|0}}function Ot(e,t,n,r){return new _e(e,t,n,r)}function Re(e){return e.left}function ke(e){return e.right}function jr(e){return e.h}function vx(){}function Ed(e,t){e:for(;;){const n=e,r=t;if(n!=null){const s=O(n);if(s instanceof _e){const i=s;e=Re(i),t=Ed(ke(i),r+1);continue e}else return r+1|0}else return r|0}}function Q$(e){return Ed(e,0)}function Kt(e,t,n){let r,s,i;const o=e;if(o!=null){const d=O(o);i=d instanceof _e?(r=d,jr(r)):1}else i=0;let a;const l=n;if(l!=null){const d=O(l);a=d instanceof _e?(s=d,jr(s)):1}else a=0;const c=(i<a?a:i)|0;return c===0?Pt(t):Ot(t,e,n,c+1)}function Id(e,t,n){let r,s,i,o,a,l,c,d,u;const m=e;if(m!=null){const w=O(m);u=w instanceof _e?(r=w,jr(r)):1}else u=0;let h;const p=n;if(p!=null){const w=O(p);h=w instanceof _e?(s=w,jr(s)):1}else h=0;if(h>u+2){const w=O(n);if(w instanceof _e){const g=w;if(i=Re(g),(i!=null?(o=O(i),o instanceof _e?(a=o,jr(a)):1):0)>u+1){const C=O(Re(g));if(C instanceof _e){const x=C;return Kt(Kt(e,t,Re(x)),Q(x),Kt(ke(x),Q(g),ke(g)))}else throw new Error("internal error: Set.rebalance")}else return Kt(Kt(e,t,Re(g)),Q(g),ke(g))}else throw new Error("internal error: Set.rebalance")}else if(u>h+2){const w=O(e);if(w instanceof _e){const g=w;if(l=ke(g),(l!=null?(c=O(l),c instanceof _e?(d=c,jr(d)):1):0)>h+1){const C=O(ke(g));if(C instanceof _e){const x=C;return Kt(Kt(Re(g),Q(g),Re(x)),Q(x),Kt(ke(x),t,n))}else throw new Error("internal error: Set.rebalance")}else return Kt(Re(g),Q(g),Kt(ke(g),t,n))}else throw new Error("internal error: Set.rebalance")}else return Kt(e,t,n)}function zr(e,t,n){if(n!=null){const r=O(n),s=e.Compare(t,Q(r))|0;if(r instanceof _e){const i=r;return s<0?Id(zr(e,t,Re(i)),Q(i),ke(i)):s===0?n:Id(Re(i),Q(i),zr(e,t,ke(i)))}else{const i=e.Compare(t,Q(r))|0;return i<0?Ot(t,void 0,n,2):i===0?n:Ot(t,n,void 0,2)}}else return Pt(t)}function Nd(e,t,n){e:for(;;){const r=e,s=t,i=n;if(i!=null){const o=O(i),a=r.Compare(s,Q(o))|0;if(o instanceof _e){const l=o;if(a<0){e=r,t=s,n=Re(l);continue e}else{if(a===0)return!0;e=r,t=s,n=ke(l);continue e}}else return a===0}else return!1}}function Td(e,t){e:for(;;){const n=e,r=t;if(r!=null){const s=O(r);if(s instanceof _e){const i=s;Td(n,Re(i)),n(Q(i)),e=n,t=ke(i);continue e}else n(Q(s))}break}}class e1 extends ee{constructor(t,n){super(),this.stack=t,this.started=n}}function Rd(e){e:for(;;){const t=e;if(K(t))return je();{const n=L(t),r=b(t);if(n!=null){const s=O(n);if(s instanceof _e){const i=s;e=Fe([Re(i),Pt(Q(i)),ke(i)],r);continue e}else return t}else{e=r;continue e}}}}function Md(e){return new e1(Rd(te(e)),!1)}function t1(){throw new Error("Enumeration not started")}function n1(){throw new Error("Enumeration already started")}function Pd(e){if(e.started){const t=e.stack;if(K(t))return n1();if(L(t)!=null){const n=O(L(t));return Q(n)}else throw new Error("Please report error: Set iterator, unexpected stack for current")}else return t1()}function r1(e){if(e.started){const t=e.stack;if(K(t))return!1;if(L(t)!=null){if(O(L(t))instanceof _e)throw new Error("Please report error: Set iterator, unexpected stack for moveNext");return e.stack=Rd(b(t)),!K(e.stack)}else throw new Error("Please report error: Set iterator, unexpected stack for moveNext")}else return e.started=!0,!K(e.stack)}function Od(e){let t=Md(e);return{"System.Collections.Generic.IEnumerator`1.get_Current"(){return Pd(t)},"System.Collections.IEnumerator.get_Current"(){return Pd(t)},"System.Collections.IEnumerator.MoveNext"(){return r1(t)},"System.Collections.IEnumerator.Reset"(){t=Md(e)},Dispose(){}}}function s1(e,t,n){e:for(;;){const r=e,s=t,i=n;if(K(s))return K(i)?0:-1;if(K(i))return 1;if(L(i)!=null)if(L(s)!=null){const o=O(L(s)),a=O(L(i));if(o instanceof _e){const l=o;if(Re(l)==null)if(a instanceof _e){const c=a;if(Re(c)==null){const d=r.Compare(Q(l),Q(c))|0;if(d!==0)return d|0;e=r,t=Tt(ke(l),b(s)),n=Tt(ke(c),b(i));continue e}else{let d,u,m,h,p;switch(K(s)?K(i)?d=2:L(i)!=null?(d=1,h=b(i),p=O(L(i))):d=2:L(s)!=null?(d=0,u=b(s),m=O(L(s))):K(i)?d=2:L(i)!=null?(d=1,h=b(i),p=O(L(i))):d=2,d){case 0:if(m instanceof _e){const w=m;e=r,t=Fe([Re(w),Ot(Q(w),void 0,ke(w),0)],u),n=i;continue e}else{e=r,t=Fe([void 0,Pt(Q(m))],u),n=i;continue e}case 1:if(p instanceof _e){const w=p;e=r,t=s,n=Fe([Re(w),Ot(Q(w),void 0,ke(w),0)],h);continue e}else{e=r,t=s,n=Fe([void 0,Pt(Q(p))],h);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}}else{const c=r.Compare(Q(l),Q(a))|0;if(c!==0)return c|0;e=r,t=Tt(ke(l),b(s)),n=Tt(void 0,b(i));continue e}else{let c,d,u,m,h;switch(K(s)?K(i)?c=2:L(i)!=null?(c=1,m=b(i),h=O(L(i))):c=2:L(s)!=null?(c=0,d=b(s),u=O(L(s))):K(i)?c=2:L(i)!=null?(c=1,m=b(i),h=O(L(i))):c=2,c){case 0:if(u instanceof _e){const p=u;e=r,t=Fe([Re(p),Ot(Q(p),void 0,ke(p),0)],d),n=i;continue e}else{e=r,t=Fe([void 0,Pt(Q(u))],d),n=i;continue e}case 1:if(h instanceof _e){const p=h;e=r,t=s,n=Fe([Re(p),Ot(Q(p),void 0,ke(p),0)],m);continue e}else{e=r,t=s,n=Fe([void 0,Pt(Q(h))],m);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}}else if(a instanceof _e){const l=a;if(Re(l)==null){const c=r.Compare(Q(o),Q(l))|0;if(c!==0)return c|0;e=r,t=Tt(void 0,b(s)),n=Tt(ke(l),b(i));continue e}else{let c,d,u,m,h;switch(K(s)?K(i)?c=2:L(i)!=null?(c=1,m=b(i),h=O(L(i))):c=2:L(s)!=null?(c=0,d=b(s),u=O(L(s))):K(i)?c=2:L(i)!=null?(c=1,m=b(i),h=O(L(i))):c=2,c){case 0:if(u instanceof _e){const p=u;e=r,t=Fe([Re(p),Ot(Q(p),void 0,ke(p),0)],d),n=i;continue e}else{e=r,t=Fe([void 0,Pt(Q(u))],d),n=i;continue e}case 1:if(h instanceof _e){const p=h;e=r,t=s,n=Fe([Re(p),Ot(Q(p),void 0,ke(p),0)],m);continue e}else{e=r,t=s,n=Fe([void 0,Pt(Q(h))],m);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}}else{const l=r.Compare(Q(o),Q(a))|0;if(l!==0)return l|0;e=r,t=b(s),n=b(i);continue e}}else{O(L(i));let o,a,l,c,d;switch(K(s)?K(i)?o=2:L(i)!=null?(o=1,c=b(i),d=O(L(i))):o=2:L(s)!=null?(o=0,a=b(s),l=O(L(s))):K(i)?o=2:L(i)!=null?(o=1,c=b(i),d=O(L(i))):o=2,o){case 0:if(l instanceof _e){const u=l;e=r,t=Fe([Re(u),Ot(Q(u),void 0,ke(u),0)],a),n=i;continue e}else{e=r,t=Fe([void 0,Pt(Q(l))],a),n=i;continue e}case 1:if(d instanceof _e){const u=d;e=r,t=s,n=Fe([Re(u),Ot(Q(u),void 0,ke(u),0)],c);continue e}else{e=r,t=s,n=Fe([void 0,Pt(Q(d))],c);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}else if(L(s)!=null){O(L(s));let o,a,l,c,d;switch(K(s)?K(i)?o=2:L(i)!=null?(o=1,c=b(i),d=O(L(i))):o=2:L(s)!=null?(o=0,a=b(s),l=O(L(s))):K(i)?o=2:L(i)!=null?(o=1,c=b(i),d=O(L(i))):o=2,o){case 0:if(l instanceof _e){const u=l;e=r,t=Fe([Re(u),Ot(Q(u),void 0,ke(u),0)],a),n=i;continue e}else{e=r,t=Fe([void 0,Pt(Q(l))],a),n=i;continue e}case 1:if(d instanceof _e){const u=d;e=r,t=s,n=Fe([Re(u),Ot(Q(u),void 0,ke(u),0)],c);continue e}else{e=r,t=s,n=Fe([void 0,Pt(Q(d))],c);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}else{e=r,t=b(s),n=b(i);continue e}}}function Dd(e,t,n){return t==null?n==null?0:-1:n==null?1:s1(e,te(t),te(n))|0}function i1(e,t,n){let r=n;Td(s=>{Nt(t,r,s),r=r+1|0},e)}function o1(e,t,n){e:for(;;){const r=e,s=t,i=n;if(i["System.Collections.IEnumerator.MoveNext"]()){e=r,t=zr(r,i["System.Collections.Generic.IEnumerator`1.get_Current"](),s),n=i;continue e}else return s}}function a1(e,t){return li((n,r)=>zr(e,r,n),void 0,t)}function l1(e,t){return bn((n,r)=>zr(e,r,n),void 0,t)}function Fd(e,t){if(an(t))return a1(e,t);if(t instanceof yt)return l1(e,t);{const n=De(t);try{return o1(e,void 0,n)}finally{xe(n)}}}class Ca{constructor(t,n){this.comparer=t,this.tree=n}GetHashCode(){return d1(this)|0}Equals(t){let n;const r=this;return t instanceof Ca&&(n=t,Dd(Hr(r),Zt(r),Zt(n))===0)}toString(){return"set ["+re("; ",Ve(n=>ft(n),this))+"]"}get[Symbol.toStringTag](){return"FSharpSet"}toJSON(){const t=this;return Array.from(t)}CompareTo(t){const n=this;return Dd(Hr(n),Zt(n),Zt(t))|0}"System.Collections.Generic.ICollection`1.Add2B595"(t){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Clear"(){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Remove2B595"(t){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Contains2B595"(t){const n=this;return Nd(Hr(n),t,Zt(n))}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(t,n){i1(Zt(this),t,n)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return Sa(this)|0}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return Sa(this)|0}GetEnumerator(){return Od(Zt(this))}[Symbol.iterator](){return is(De(this))}"System.Collections.IEnumerable.GetEnumerator"(){return Od(Zt(this))}get size(){return Sa(this)|0}add(t){throw new Error("Set cannot be mutated")}clear(){throw new Error("Set cannot be mutated")}delete(t){throw new Error("Set cannot be mutated")}has(t){return Vd(this,t)}keys(){return Ve(n=>n,this)}values(){return Ve(n=>n,this)}entries(){return Ve(n=>[n,n],this)}forEach(t,n){const r=this;Mr(s=>{t(s,s,r)},r)}}function ki(e,t){return new Ca(e,t)}function Hr(e){return e.comparer}function Zt(e){return e.tree}function c1(e){return ki(e,void 0)}function u1(e,t){return ki(Hr(e),zr(Hr(e),t,Zt(e)))}function Sa(e){return Q$(Zt(e))}function Vd(e,t){return Nd(Hr(e),t,Zt(e))}function d1(e){let t=0;const n=De(e);try{for(;n["System.Collections.IEnumerator.MoveNext"]();){const r=n["System.Collections.Generic.IEnumerator`1.get_Current"]();t=(t<<1)+yn(r)+631|0}}finally{xe(n)}return Math.abs(t)|0}function Aa(e,t){return Vd(t,e)}function f1(e,t){return u1(t,e)}function h1(e){return c1(e)}function m1(e,t){return ki(t,Fd(t,e))}function p1(e,t){return ki(t,Fd(t,e))}function Es(e,t,n){try{return"Expecting "+e+" but instead got:"+(n?`
4
4
  `:" ")+(JSON.stringify(t,null,4)+"")}catch{return"Expecting "+e+" but decoder failed. Couldn't report given value due to circular structure."+(n?`
5
- `:" ")}}function nw(e,t){const n=t.tag===2?ys(t.fields[0],t.fields[1],!0):t.tag===1?ys(t.fields[0],t.fields[1],!1)+`
6
- Reason: `+t.fields[2]:t.tag===3?ys(t.fields[0],t.fields[1],!0):t.tag===4?ys(t.fields[0],t.fields[1],!0)+("\nNode `"+t.fields[2]+"` is unkown."):t.tag===5?"Expecting "+t.fields[0]+`.
5
+ `:" ")}}function g1(e,t){const n=t.tag===2?Es(t.fields[0],t.fields[1],!0):t.tag===1?Es(t.fields[0],t.fields[1],!1)+`
6
+ Reason: `+t.fields[2]:t.tag===3?Es(t.fields[0],t.fields[1],!0):t.tag===4?Es(t.fields[0],t.fields[1],!0)+("\nNode `"+t.fields[2]+"` is unkown."):t.tag===5?"Expecting "+t.fields[0]+`.
7
7
  `+(JSON.stringify(t.fields[1],null,4)+""):t.tag===7?`The following errors were found:
8
8
 
9
- `+oe(`
9
+ `+re(`
10
10
 
11
- `,t.fields[0]):t.tag===6?"The following `failure` occurred with the decoder: "+t.fields[0]:ys(t.fields[0],t.fields[1],!1);return t.tag===7?n:"Error at: `"+e+"`\n"+n}function Sd(e,t,n){const r=t(e,n);if(r.tag===1){const s=r.fields[0];return new g(1,[nw(s[0],s[1])])}else return new g(0,[r.fields[0]])}function nr(e,t){try{return Sd("$",e,JSON.parse(t))}catch(n){if(n instanceof SyntaxError)return new g(1,["Given an invalid JSON: "+n.message]);throw n}}function kd(e,t){return typeof t=="string"?new g(0,[t]):new g(1,[[e,new W(0,["a string",t])]])}function rw(e,t){if(typeof t=="string"){const n=t;return n.length===1?new g(0,[n[0]]):new g(1,[[e,new W(0,["a single character string",t])]])}else return new g(1,[[e,new W(0,["a char",t])]])}function sw(e,t){if(typeof t=="string"){let n,r="00000000-0000-0000-0000-000000000000";return n=[Gp(t,new $t(()=>r,s=>{r=s})),r],n[0]?new g(0,[n[1]]):new g(1,[[e,new W(0,["a guid",t])]])}else return new g(1,[[e,new W(0,["a guid",t])]])}function ow(e,t){return t==null?new g(0,[void 0]):new g(1,[[e,new W(0,["null",t])]])}const Ad=e=>t=>{const n=e,r=t;if(typeof r=="number"){const s=r;return isFinite(s)&&Math.floor(s)===s?-128<=s&&s<=127?new g(0,[(s+128&255)-128]):new g(1,[[n,new W(1,["a sbyte",s,"Value was either too large or too small for a sbyte"])]]):new g(1,[[n,new W(1,["a sbyte",s,"Value is not an integral value"])]])}else if(typeof r=="string"){let s,o=0;return s=[Tr(r,511,!1,8,new $t(()=>o,i=>{o=i|0})),o],s[0]?new g(0,[s[1]]):new g(1,[[n,new W(0,["a sbyte",r])]])}else return new g(1,[[n,new W(0,["a sbyte",r])]])},Ed=e=>t=>{const n=e,r=t;if(typeof r=="number"){const s=r;return isFinite(s)&&Math.floor(s)===s?0<=s&&s<=255?new g(0,[s&255]):new g(1,[[n,new W(1,["a byte",s,"Value was either too large or too small for a byte"])]]):new g(1,[[n,new W(1,["a byte",s,"Value is not an integral value"])]])}else if(typeof r=="string"){let s,o=0;return s=[Tr(r,511,!0,8,new $t(()=>o,i=>{o=i})),o],s[0]?new g(0,[s[1]]):new g(1,[[n,new W(0,["a byte",r])]])}else return new g(1,[[n,new W(0,["a byte",r])]])},Id=e=>t=>{const n=e,r=t;if(typeof r=="number"){const s=r;return isFinite(s)&&Math.floor(s)===s?-32768<=s&&s<=32767?new g(0,[(s+32768&65535)-32768]):new g(1,[[n,new W(1,["an int16",s,"Value was either too large or too small for an int16"])]]):new g(1,[[n,new W(1,["an int16",s,"Value is not an integral value"])]])}else if(typeof r=="string"){let s,o=0;return s=[Tr(r,511,!1,16,new $t(()=>o,i=>{o=i|0})),o],s[0]?new g(0,[s[1]]):new g(1,[[n,new W(0,["an int16",r])]])}else return new g(1,[[n,new W(0,["an int16",r])]])},Td=e=>t=>{const n=e,r=t;if(typeof r=="number"){const s=r;return isFinite(s)&&Math.floor(s)===s?0<=s&&s<=65535?new g(0,[s&65535]):new g(1,[[n,new W(1,["an uint16",s,"Value was either too large or too small for an uint16"])]]):new g(1,[[n,new W(1,["an uint16",s,"Value is not an integral value"])]])}else if(typeof r=="string"){let s,o=0;return s=[Tr(r,511,!0,16,new $t(()=>o,i=>{o=i})),o],s[0]?new g(0,[s[1]]):new g(1,[[n,new W(0,["an uint16",r])]])}else return new g(1,[[n,new W(0,["an uint16",r])]])},Nd=e=>t=>{const n=e,r=t;if(typeof r=="number"){const s=r;return isFinite(s)&&Math.floor(s)===s?-2147483648<=s&&s<=2147483647?new g(0,[~~s]):new g(1,[[n,new W(1,["an int",s,"Value was either too large or too small for an int"])]]):new g(1,[[n,new W(1,["an int",s,"Value is not an integral value"])]])}else if(typeof r=="string"){let s,o=0;return s=[Tr(r,511,!1,32,new $t(()=>o,i=>{o=i|0})),o],s[0]?new g(0,[s[1]]):new g(1,[[n,new W(0,["an int",r])]])}else return new g(1,[[n,new W(0,["an int",r])]])},Md=e=>t=>{const n=e,r=t;if(typeof r=="number"){const s=r;return isFinite(s)&&Math.floor(s)===s?0<=s&&s<=4294967295?new g(0,[s>>>0]):new g(1,[[n,new W(1,["an uint32",s,"Value was either too large or too small for an uint32"])]]):new g(1,[[n,new W(1,["an uint32",s,"Value is not an integral value"])]])}else if(typeof r=="string"){let s,o=0;return s=[Tr(r,511,!0,32,new $t(()=>o,i=>{o=i})),o],s[0]?new g(0,[s[1]]):new g(1,[[n,new W(0,["an uint32",r])]])}else return new g(1,[[n,new W(0,["an uint32",r])]])};function iw(e,t){return typeof t=="boolean"?new g(0,[t]):new g(1,[[e,new W(0,["a boolean",t])]])}function aw(e,t){return typeof t=="number"?new g(0,[t]):new g(1,[[e,new W(0,["a float",t])]])}function lw(e,t){return typeof t=="number"?new g(0,[t]):new g(1,[[e,new W(0,["a float32",t])]])}function cw(e,t){if(typeof t=="string"){let n,r=pm();return n=[gm(t,new $t(()=>r,s=>{r=s})),r],n[0]?new g(0,[wm(n[1])]):new g(1,[[e,new W(0,["a datetime",t])]])}else return new g(1,[[e,new W(0,["a datetime",t])]])}function uw(e,t){if(typeof t=="string"){let n,r=Ag();return n=[Ig(t,new $t(()=>r,s=>{r=s})),r],n[0]?new g(0,[n[1]]):new g(1,[[e,new W(0,["a datetimeoffset",t])]])}else return new g(1,[[e,new W(0,["a datetime",t])]])}function dw(e,t){if(typeof t=="string"){let n,r=0;return n=[Vg(t,new $t(()=>r,s=>{r=s})),r],n[0]?new g(0,[n[1]]):new g(1,[[e,new W(0,["a timespan",t])]])}else return new g(1,[[e,new W(0,["a timespan",t])]])}function Rd(e,t,n,r){let s;const o=n+".["+Hn(e)+"]";if(Array.isArray(r)){const i=r;return e<i.length?t(o,he(e,i)):new g(1,[[o,new W(5,["a longer array. Need index `"+Hn(e)+"` but there are only `"+(s=i.length,Hn(s))+"` entries",r])]])}else return new g(1,[[o,new W(0,["an array",r])]])}function fw(e,t,n){return n==null?new g(0,[void 0]):hn(nt,e(t,n))}function Pd(e,t,n){if(Array.isArray(n)){let r=-1;return hn(Qs,Xs((s,o)=>{if(r=r+1|0,s.tag===0){const i=e(t+".["+Hn(r)+"]",o);return i.tag===0?new g(0,[Tt(i.fields[0],s.fields[0])]):new g(1,[i.fields[0]])}else return s},new g(0,[Ue()]),n))}else return new g(1,[[t,new W(0,["a list",n])]])}function hw(e,t,n){if(Array.isArray(n)){let r=-1;return hn(Rp,Xs((s,o)=>{if(r=r+1|0,s.tag===0){const i=e(t+".["+Hn(r)+"]",o);return i.tag===0?new g(0,[B([i.fields[0]],s.fields[0])]):new g(1,[i.fields[0]])}else return s},new g(0,[[]]),n))}else return new g(1,[[t,new W(0,["a seq",n])]])}function Od(e,t,n){if(Array.isArray(n)){let r=-1;const s=n;return Xs((o,i)=>{if(r=r+1|0,o.tag===0){const a=o.fields[0],l=e(t+".["+Hn(r)+"]",i);return l.tag===0?(It(a,r,l.fields[0]),new g(0,[a])):new g(1,[l.fields[0]])}else return o},new g(0,[Ys(new Array(s.length),0,s.length,null)]),s)}else return new g(1,[[t,new W(0,["an array",n])]])}function mw(e,t,n){return((s,o)=>{e:for(;;){const i=s,a=o;if(K(i))return new g(1,[[t,new W(7,[a])]]);{const l=Sd(t,be(F(i)),n);if(l.tag===1){s=b(i),o=ot(a,ne(l.fields[0]));continue e}else return new g(0,[l.fields[0]])}}})(e,Ue())}function pw(e,t,n){return new g(0,[e])}function Dd(e,t,n,r){const s=t(n,r);return s.tag===0?e(s.fields[0],n,r):new g(1,[s.fields[0]])}function $w(e,t,n,r){const s=t(n,r);return s.tag===1?new g(1,[s.fields[0]]):new g(0,[e(s.fields[0])])}function gw(e,t){let n;const r=e;return n=s=>o=>Rd(0,r,s,o),s=>o=>Dd(Jo(i=>{let a;const l=t;return a=c=>d=>Rd(1,l,c,d),c=>d=>Dd((u,h,f)=>pw([i,u]),be(a),c,d)}),be(n),s,o)}function ww(e){return X0(e,{Compare:Vt})}function yw(e){return tw(e,{Compare:Vt})}function bw(e,t,n){return n!==null&&Object.getPrototypeOf(n||!1)===Object.prototype?Vl((r,s)=>{const o=r[0];return s.tag===0?hn(i=>Tt(i,s.fields[0]),r[1](t+"."+o)(n[o])):s},e,new g(0,[Ue()])):new g(1,[[t,new W(0,["an object",n])]])}function _w(e,t,n,r){return r!==null&&Object.getPrototypeOf(r||!1)===Object.prototype?as((s,o)=>{if(s.tag===0){const i=e(n,o);if(i.tag===0){const a=t(n+"."+o,r[o]);return a.tag===0?new g(0,[Tt([i.fields[0],a.fields[0]],s.fields[0])]):new g(1,[a.fields[0]])}else return new g(1,[i.fields[0]])}else return s},new g(0,[Ue()]),Object.keys(r)):new g(1,[[n,new W(0,["an object",r])]])}function Fd(e,t,n,r){let s;const o=t.length+e|0;if(o!==r.length)return new g(1,[[n,new W(6,[(s=r.length|0,en(zt("Expected array of length %i but got %i"))(o)(s))])]]);{let i=new g(0,[Ue()]);for(let a=e;a<=r.length-1;a++)if(i.tag===0){const l=i.fields[0],c=en(zt("%s[%i]"))(n)(a),d=he(a-e,t),u=he(a,r);i=hn(h=>Tt(h,l),d(c)(u))}return hn(Qs,i)}}function Vd(e,t,n,r,s,o){const i=Mm(a=>_r(a)===r,fl(n));if(i!=null){const a=i,l=An(c=>Zt(e,t,!1,c[1]),$l(a));return hn(c=>rm(a,Gn(c)),l.length===0&&o.length<=1?new g(0,[Ue()]):Fd(1,l,s,o))}else return new g(1,[[s,new W(6,["Cannot find case "+r+" in "+Re(n)])]])}function Ld(e,t,n,r){let s;const o=new $t(pe());let i;const a=Re(r);i=a===""?e:zu(a,o,e);let l;if(pl(r)){const c=An(d=>[ud(t,_r(d)),Zt(i,t,!1,d[1])],es(r));l=d=>u=>hn(h=>sm(r,Gn(h)),bw(c,d,u))}else if(ml(r))l=c=>d=>{if(typeof d=="string")return Vd(i,t,r,d,c,[]);if(Array.isArray(d)){const u=d;return Xm(h=>Vd(i,t,r,h,c,u),kd(c+"[0]",he(0,u)))}else return new g(1,[[c,new W(0,["a string or array",d])]])};else if(n)l=c=>d=>new g(1,[[c,new W(2,["an extra coder for "+Re(r),d])]]);else throw new Error((s=Re(r),en(zt(`Cannot generate auto decoder for %s. Please pass an extra decoder.
11
+ `,t.fields[0]):t.tag===6?"The following `failure` occurred with the decoder: "+t.fields[0]:Es(t.fields[0],t.fields[1],!1);return t.tag===7?n:"Error at: `"+e+"`\n"+n}function Ld(e,t,n){const r=t(e,n);if(r.tag===1){const s=r.fields[0];return new $(1,[g1(s[0],s[1])])}else return new $(0,[r.fields[0]])}function Jt(e,t){try{return Ld("$",e,JSON.parse(t))}catch(n){if(n instanceof SyntaxError)return new $(1,["Given an invalid JSON: "+n.message]);throw n}}function Bd(e,t){return typeof t=="string"?new $(0,[t]):new $(1,[[e,new W(0,["a string",t])]])}function $1(e,t){if(typeof t=="string"){const n=t;return n.length===1?new $(0,[n[0]]):new $(1,[[e,new W(0,["a single character string",t])]])}else return new $(1,[[e,new W(0,["a char",t])]])}function w1(e,t){if(typeof t=="string"){let n,r="00000000-0000-0000-0000-000000000000";return n=[o0(t,new wt(()=>r,s=>{r=s})),r],n[0]?new $(0,[n[1]]):new $(1,[[e,new W(0,["a guid",t])]])}else return new $(1,[[e,new W(0,["a guid",t])]])}function y1(e,t){return t==null?new $(0,[void 0]):new $(1,[[e,new W(0,["null",t])]])}const Ud=e=>t=>{const n=e,r=t;if(typeof r=="number"){const s=r;return isFinite(s)&&Math.floor(s)===s?-128<=s&&s<=127?new $(0,[(s+128&255)-128]):new $(1,[[n,new W(1,["a sbyte",s,"Value was either too large or too small for a sbyte"])]]):new $(1,[[n,new W(1,["a sbyte",s,"Value is not an integral value"])]])}else if(typeof r=="string"){let s,i=0;return s=[Or(r,511,!1,8,new wt(()=>i,o=>{i=o|0})),i],s[0]?new $(0,[s[1]]):new $(1,[[n,new W(0,["a sbyte",r])]])}else return new $(1,[[n,new W(0,["a sbyte",r])]])},jd=e=>t=>{const n=e,r=t;if(typeof r=="number"){const s=r;return isFinite(s)&&Math.floor(s)===s?0<=s&&s<=255?new $(0,[s&255]):new $(1,[[n,new W(1,["a byte",s,"Value was either too large or too small for a byte"])]]):new $(1,[[n,new W(1,["a byte",s,"Value is not an integral value"])]])}else if(typeof r=="string"){let s,i=0;return s=[Or(r,511,!0,8,new wt(()=>i,o=>{i=o})),i],s[0]?new $(0,[s[1]]):new $(1,[[n,new W(0,["a byte",r])]])}else return new $(1,[[n,new W(0,["a byte",r])]])},zd=e=>t=>{const n=e,r=t;if(typeof r=="number"){const s=r;return isFinite(s)&&Math.floor(s)===s?-32768<=s&&s<=32767?new $(0,[(s+32768&65535)-32768]):new $(1,[[n,new W(1,["an int16",s,"Value was either too large or too small for an int16"])]]):new $(1,[[n,new W(1,["an int16",s,"Value is not an integral value"])]])}else if(typeof r=="string"){let s,i=0;return s=[Or(r,511,!1,16,new wt(()=>i,o=>{i=o|0})),i],s[0]?new $(0,[s[1]]):new $(1,[[n,new W(0,["an int16",r])]])}else return new $(1,[[n,new W(0,["an int16",r])]])},Hd=e=>t=>{const n=e,r=t;if(typeof r=="number"){const s=r;return isFinite(s)&&Math.floor(s)===s?0<=s&&s<=65535?new $(0,[s&65535]):new $(1,[[n,new W(1,["an uint16",s,"Value was either too large or too small for an uint16"])]]):new $(1,[[n,new W(1,["an uint16",s,"Value is not an integral value"])]])}else if(typeof r=="string"){let s,i=0;return s=[Or(r,511,!0,16,new wt(()=>i,o=>{i=o})),i],s[0]?new $(0,[s[1]]):new $(1,[[n,new W(0,["an uint16",r])]])}else return new $(1,[[n,new W(0,["an uint16",r])]])},Wd=e=>t=>{const n=e,r=t;if(typeof r=="number"){const s=r;return isFinite(s)&&Math.floor(s)===s?-2147483648<=s&&s<=2147483647?new $(0,[~~s]):new $(1,[[n,new W(1,["an int",s,"Value was either too large or too small for an int"])]]):new $(1,[[n,new W(1,["an int",s,"Value is not an integral value"])]])}else if(typeof r=="string"){let s,i=0;return s=[Or(r,511,!1,32,new wt(()=>i,o=>{i=o|0})),i],s[0]?new $(0,[s[1]]):new $(1,[[n,new W(0,["an int",r])]])}else return new $(1,[[n,new W(0,["an int",r])]])},Gd=e=>t=>{const n=e,r=t;if(typeof r=="number"){const s=r;return isFinite(s)&&Math.floor(s)===s?0<=s&&s<=4294967295?new $(0,[s>>>0]):new $(1,[[n,new W(1,["an uint32",s,"Value was either too large or too small for an uint32"])]]):new $(1,[[n,new W(1,["an uint32",s,"Value is not an integral value"])]])}else if(typeof r=="string"){let s,i=0;return s=[Or(r,511,!0,32,new wt(()=>i,o=>{i=o})),i],s[0]?new $(0,[s[1]]):new $(1,[[n,new W(0,["an uint32",r])]])}else return new $(1,[[n,new W(0,["an uint32",r])]])};function _1(e,t){return typeof t=="boolean"?new $(0,[t]):new $(1,[[e,new W(0,["a boolean",t])]])}function b1(e,t){return typeof t=="number"?new $(0,[t]):new $(1,[[e,new W(0,["a float",t])]])}function v1(e,t){return typeof t=="number"?new $(0,[t]):new $(1,[[e,new W(0,["a float32",t])]])}function x1(e,t){if(typeof t=="string"){let n,r=Im();return n=[Tm(t,new wt(()=>r,s=>{r=s})),r],n[0]?new $(0,[Rm(n[1])]):new $(1,[[e,new W(0,["a datetime",t])]])}else return new $(1,[[e,new W(0,["a datetime",t])]])}function C1(e,t){if(typeof t=="string"){let n,r=U$();return n=[z$(t,new wt(()=>r,s=>{r=s})),r],n[0]?new $(0,[n[1]]):new $(1,[[e,new W(0,["a datetimeoffset",t])]])}else return new $(1,[[e,new W(0,["a datetime",t])]])}function S1(e,t){if(typeof t=="string"){let n,r=0;return n=[X$(t,new wt(()=>r,s=>{r=s})),r],n[0]?new $(0,[n[1]]):new $(1,[[e,new W(0,["a timespan",t])]])}else return new $(1,[[e,new W(0,["a timespan",t])]])}function qd(e,t,n,r){let s;const i=n+".["+Yn(e)+"]";if(Array.isArray(r)){const o=r;return e<o.length?t(i,ge(e,o)):new $(1,[[i,new W(5,["a longer array. Need index `"+Yn(e)+"` but there are only `"+(s=o.length,Yn(s))+"` entries",r])]])}else return new $(1,[[i,new W(0,["an array",r])]])}function A1(e,t,n){return n==null?new $(0,[void 0]):vn(ot,e(t,n))}function Kd(e,t,n){if(Array.isArray(n)){let r=-1;return vn(ci,li((s,i)=>{if(r=r+1|0,s.tag===0){const o=e(t+".["+Yn(r)+"]",i);return o.tag===0?new $(0,[Tt(o.fields[0],s.fields[0])]):new $(1,[o.fields[0]])}else return s},new $(0,[je()]),n))}else return new $(1,[[t,new W(0,["a list",n])]])}function k1(e,t,n){if(Array.isArray(n)){let r=-1;return vn(qp,li((s,i)=>{if(r=r+1|0,s.tag===0){const o=e(t+".["+Yn(r)+"]",i);return o.tag===0?new $(0,[D([o.fields[0]],s.fields[0])]):new $(1,[o.fields[0]])}else return s},new $(0,[[]]),n))}else return new $(1,[[t,new W(0,["a seq",n])]])}function Zd(e,t,n){if(Array.isArray(n)){let r=-1;const s=n;return li((i,o)=>{if(r=r+1|0,i.tag===0){const a=i.fields[0],l=e(t+".["+Yn(r)+"]",o);return l.tag===0?(Nt(a,r,l.fields[0]),new $(0,[a])):new $(1,[l.fields[0]])}else return i},new $(0,[ai(new Array(s.length),0,s.length,null)]),s)}else return new $(1,[[t,new W(0,["an array",n])]])}function E1(e,t,n){return((s,i)=>{e:for(;;){const o=s,a=i;if(K(o))return new $(1,[[t,new W(7,[a])]]);{const l=Ld(t,pe(L(o)),n);if(l.tag===1){s=b(o),i=nt(a,te(l.fields[0]));continue e}else return new $(0,[l.fields[0]])}}})(e,je())}function I1(e,t,n){return new $(0,[e])}function Jd(e,t,n,r){const s=t(n,r);return s.tag===0?e(s.fields[0],n,r):new $(1,[s.fields[0]])}function N1(e,t,n,r){const s=t(n,r);return s.tag===1?new $(1,[s.fields[0]]):new $(0,[e(s.fields[0])])}function T1(e,t){let n;const r=e;return n=s=>i=>qd(0,r,s,i),s=>i=>Jd(oo(o=>{let a;const l=t;return a=c=>d=>qd(1,l,c,d),c=>d=>Jd((u,m,h)=>I1([o,u]),pe(a),c,d)}),pe(n),s,i)}function R1(e){return f$(e,{Compare:Lt})}function M1(e){return p1(e,{Compare:Lt})}function P1(e,t,n){return n!==null&&Object.getPrototypeOf(n||!1)===Object.prototype?tc((r,s)=>{const i=r[0];return s.tag===0?vn(o=>Tt(o,s.fields[0]),r[1](t+"."+i)(n[i])):s},e,new $(0,[je()])):new $(1,[[t,new W(0,["an object",n])]])}function O1(e,t,n,r){return r!==null&&Object.getPrototypeOf(r||!1)===Object.prototype?gs((s,i)=>{if(s.tag===0){const o=e(n,i);if(o.tag===0){const a=t(n+"."+i,r[i]);return a.tag===0?new $(0,[Tt([o.fields[0],a.fields[0]],s.fields[0])]):new $(1,[a.fields[0]])}else return new $(1,[o.fields[0]])}else return s},new $(0,[je()]),Object.keys(r)):new $(1,[[n,new W(0,["an object",r])]])}function Yd(e,t,n,r){let s;const i=t.length+e|0;if(i!==r.length)return new $(1,[[n,new W(6,[(s=r.length|0,Wt(Ut("Expected array of length %i but got %i"))(i)(s))])]]);{let o=new $(0,[je()]);for(let a=e;a<=r.length-1;a++)if(o.tag===0){const l=o.fields[0],c=Wt(Ut("%s[%i]"))(n)(a),d=ge(a-e,t),u=ge(a,r);o=vn(m=>Tt(m,l),d(c)(u))}return vn(ci,o)}}function Xd(e,t,n,r,s,i){const o=Gm(a=>Sr(a)===r,Il(n));if(o!=null){const a=o,l=Dn(c=>Yt(e,t,!1,c[1]),Ml(a));return vn(c=>$m(a,Qn(c)),l.length===0&&i.length<=1?new $(0,[je()]):Yd(1,l,s,i))}else return new $(1,[[s,new W(6,["Cannot find case "+r+" in "+Oe(n)])]])}function Qd(e,t,n,r){let s;const i=new wt($e());let o;const a=Oe(r);o=a===""?e:sd(a,i,e);let l;if(Rl(r)){const c=Dn(d=>[Cd(t,Sr(d)),Yt(o,t,!1,d[1])],cs(r));l=d=>u=>vn(m=>wm(r,Qn(m)),P1(c,d,u))}else if(Tl(r))l=c=>d=>{if(typeof d=="string")return Xd(o,t,r,d,c,[]);if(Array.isArray(d)){const u=d;return fp(m=>Xd(o,t,r,m,c,u),Bd(c+"[0]",ge(0,u)))}else return new $(1,[[c,new W(0,["a string or array",d])]])};else if(n)l=c=>d=>new $(1,[[c,new W(2,["an extra coder for "+Oe(r),d])]]);else throw new Error((s=Oe(r),Wt(Ut(`Cannot generate auto decoder for %s. Please pass an extra decoder.
12
12
 
13
- Documentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders`))(s)));return o.contents=l,l}function Zt(e,t,n,r){let s,o,i,a;const l=Re(r),c=ju(l,e);if(c==null)if(ll(r)){const d=Zt(e,t,!1,Qr(r));return u=>h=>Od(be(d),u,h)}else if(ti(r))switch(Re(dl(r))){case"System.SByte":return u=>h=>{const f=r,m=u,w=h,$=Ad(m)(w);if($.tag===1)return new g(1,[$.fields[0]]);{const v=$.fields[0]|0;return Ar(v,vr(f),{Equals:(_,C)=>_===C,GetHashCode:Bt})?new g(0,[xr(f,v.toString())]):new g(1,[[m,new W(1,[Re(f),w,"Unkown value provided for the enum"])]])}};case"System.Byte":return u=>h=>{const f=r,m=u,w=h,$=Ed(m)(w);if($.tag===1)return new g(1,[$.fields[0]]);{const v=$.fields[0];return Ar(v,vr(f),{Equals:(_,C)=>_===C,GetHashCode:Bt})?new g(0,[xr(f,v.toString())]):new g(1,[[m,new W(1,[Re(f),w,"Unkown value provided for the enum"])]])}};case"System.Int16":return u=>h=>{const f=r,m=u,w=h,$=Id(m)(w);if($.tag===1)return new g(1,[$.fields[0]]);{const v=$.fields[0]|0;return Ar(v,vr(f),{Equals:(_,C)=>_===C,GetHashCode:Bt})?new g(0,[xr(f,Nh(v))]):new g(1,[[m,new W(1,[Re(f),w,"Unkown value provided for the enum"])]])}};case"System.UInt16":return u=>h=>{const f=r,m=u,w=h,$=Td(m)(w);if($.tag===1)return new g(1,[$.fields[0]]);{const v=$.fields[0];return Ar(v,vr(f),{Equals:(_,C)=>_===C,GetHashCode:Bt})?new g(0,[xr(f,v.toString())]):new g(1,[[m,new W(1,[Re(f),w,"Unkown value provided for the enum"])]])}};case"System.Int32":return u=>h=>{const f=r,m=u,w=h,$=Nd(m)(w);if($.tag===1)return new g(1,[$.fields[0]]);{const v=$.fields[0]|0;return Ar(v,vr(f),{Equals:(_,C)=>_===C,GetHashCode:Bt})?new g(0,[xr(f,Hn(v))]):new g(1,[[m,new W(1,[Re(f),w,"Unkown value provided for the enum"])]])}};case"System.UInt32":return u=>h=>{const f=r,m=u,w=h,$=Md(m)(w);if($.tag===1)return new g(1,[$.fields[0]]);{const v=$.fields[0];return Ar(v,vr(f),{Equals:(_,C)=>_===C,GetHashCode:Bt})?new g(0,[xr(f,v.toString())]):new g(1,[[m,new W(1,[Re(f),w,"Unkown value provided for the enum"])]])}};default:{const u=Re(r),h=Il(zt(`Cannot generate auto decoder for %s.
13
+ Documentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders`))(s)));return i.contents=l,l}function Yt(e,t,n,r){let s,i,o,a;const l=Oe(r),c=id(l,e);if(c==null)if(Sl(r)){const d=Yt(e,t,!1,ls(r));return u=>m=>Zd(pe(d),u,m)}else if(mo(r))switch(Oe(El(r))){case"System.SByte":return u=>m=>{const h=r,p=u,w=m,g=Ud(p)(w);if(g.tag===1)return new $(1,[g.fields[0]]);{const C=g.fields[0]|0;return Rr(C,Ar(h),{Equals:(x,A)=>x===A,GetHashCode:Ht})?new $(0,[kr(h,C.toString())]):new $(1,[[p,new W(1,[Oe(h),w,"Unkown value provided for the enum"])]])}};case"System.Byte":return u=>m=>{const h=r,p=u,w=m,g=jd(p)(w);if(g.tag===1)return new $(1,[g.fields[0]]);{const C=g.fields[0];return Rr(C,Ar(h),{Equals:(x,A)=>x===A,GetHashCode:Ht})?new $(0,[kr(h,C.toString())]):new $(1,[[p,new W(1,[Oe(h),w,"Unkown value provided for the enum"])]])}};case"System.Int16":return u=>m=>{const h=r,p=u,w=m,g=zd(p)(w);if(g.tag===1)return new $(1,[g.fields[0]]);{const C=g.fields[0]|0;return Rr(C,Ar(h),{Equals:(x,A)=>x===A,GetHashCode:Ht})?new $(0,[kr(h,Wh(C))]):new $(1,[[p,new W(1,[Oe(h),w,"Unkown value provided for the enum"])]])}};case"System.UInt16":return u=>m=>{const h=r,p=u,w=m,g=Hd(p)(w);if(g.tag===1)return new $(1,[g.fields[0]]);{const C=g.fields[0];return Rr(C,Ar(h),{Equals:(x,A)=>x===A,GetHashCode:Ht})?new $(0,[kr(h,C.toString())]):new $(1,[[p,new W(1,[Oe(h),w,"Unkown value provided for the enum"])]])}};case"System.Int32":return u=>m=>{const h=r,p=u,w=m,g=Wd(p)(w);if(g.tag===1)return new $(1,[g.fields[0]]);{const C=g.fields[0]|0;return Rr(C,Ar(h),{Equals:(x,A)=>x===A,GetHashCode:Ht})?new $(0,[kr(h,Yn(C))]):new $(1,[[p,new W(1,[Oe(h),w,"Unkown value provided for the enum"])]])}};case"System.UInt32":return u=>m=>{const h=r,p=u,w=m,g=Gd(p)(w);if(g.tag===1)return new $(1,[g.fields[0]]);{const C=g.fields[0];return Rr(C,Ar(h),{Equals:(x,A)=>x===A,GetHashCode:Ht})?new $(0,[kr(h,C.toString())]):new $(1,[[p,new W(1,[Oe(h),w,"Unkown value provided for the enum"])]])}};default:{const u=Oe(r),m=Gl(Ut(`Cannot generate auto decoder for %s.
14
14
  Thoth.Json.Net only support the following enum types:
15
15
  - sbyte
16
16
  - byte
@@ -19,7 +19,7 @@ Thoth.Json.Net only support the following enum types:
19
19
  - int
20
20
  - uint32
21
21
  If you can't use one of these types, please pass an extra decoder.
22
- `))(u);return f=>h(f)}}else if(cl(r))if(ni(r)){const d=An(u=>Zt(e,t,!1,u),hl(r));return u=>h=>Array.isArray(h)?hn(f=>om(Gn(f)),Fd(0,d,u,h)):new g(1,[[u,new W(0,["an array",h])]])}else switch(Re(ul(r))){case"Microsoft.FSharp.Core.FSharpOption`1[System.Object]":return s=Zt(e,t,!0,he(0,At(r))),u=>h=>fw(be(s),u,h);case"Microsoft.FSharp.Collections.FSharpList`1[System.Object]":return o=Zt(e,t,!1,he(0,At(r))),u=>h=>Pd(be(o),u,h);case"System.Collections.Generic.IEnumerable`1[System.Object]":return i=Zt(e,t,!1,he(0,At(r))),u=>h=>hw(be(i),u,h);case"Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]":{const u=Zt(e,t,!1,he(0,At(r))),h=Zt(e,t,!1,he(1,At(r)));let f;const m=k([w=>$=>_w(be(u),be(h),w,$),(a=gw(be(u),be(h)),w=>$=>Pd(be(a),w,$))]);return f=w=>$=>mw(m,w,$),w=>$=>$w(ww,be(f),w,$)}case"Microsoft.FSharp.Collections.FSharpSet`1[System.Object]":{const u=Zt(e,t,!1,he(0,At(r)));return h=>f=>{const m=Od(be(u),h,f);return m.tag===0?new g(0,[yw(m.fields[0])]):new g(1,[m.fields[0]])}}default:return Ld(e,t,n,r)}else switch(l){case"System.Boolean":return d=>u=>iw(d,u);case"Microsoft.FSharp.Core.Unit":return d=>u=>ow(d,u);case"System.String":return d=>u=>kd(d,u);case"System.Char":return d=>u=>rw(d,u);case"System.SByte":return Ad;case"System.Byte":return Ed;case"System.Int16":return Id;case"System.UInt16":return Td;case"System.Int32":return Nd;case"System.UInt32":return Md;case"System.Double":return d=>u=>aw(d,u);case"System.Single":return d=>u=>lw(d,u);case"System.DateTime":return d=>u=>cw(d,u);case"System.DateTimeOffset":return d=>u=>uw(d,u);case"System.TimeSpan":return d=>u=>dw(d,u);case"System.Guid":return d=>u=>sw(d,u);case"System.Object":return d=>u=>new g(0,[u]);default:return Ld(e,t,n,r)}else{const d=c;return u=>h=>d.contents(u)(h)}}function vw(e){return ra({Compare:Xr})}function rr(e,t,n){const r=He(t,new Gt(0,[]));return Zt(vw(),r,!1,e)}class xw extends ee{constructor(t){super(),this.Roles=t}}function Cw(){return ct("AccountRegistry.AdminUI.Jwt.JwtPayload",[],xw,()=>[["Roles",ei(j)]])}function Sw(e){const t=ai(e??"",["."],void 0,0);if(!di((n,r)=>n===r,t)&&t.length===3){let n;const r=he(1,t);return n=atob(r),nr(be(rr(Cw(),new Gt(1,[]))),n)}else return new g(1,["Failed to decode access token"])}function da(e,t,n,r){return Gu(s=>{qu(s)},e,t,s=>s.tag===1?r(s.fields[0]):n(s.fields[0]))}function kw(){return Ue()}function fa(e){return oe("/",e)}function Aw(e,t){const n=new Error("Duplicate SubId");return e(["Duplicate SubId: "+fa(t),n])}function Bd(e,t,n){try{ye(n)}catch(r){e(["Error stopping subscription: "+fa(t),r])}}function Ew(e,t,n,r){try{return[n,r(t)]}catch(s){e(["Error starting subscription: "+fa(n),s]);return}}function Iw(e,t){eo(n=>{Bd(e,n[0],n[1])},t)}function Ud(e,t,n,r,s,o){return eo(i=>{Aw(e,i)},n),eo(i=>{Bd(e,i[0],i[1])},r),ot(s,Ul(i=>Ew(e,t,i[0],i[1]),o))}function Tw(){return[Ue(),Qg({Compare:Vt}),Ue()]}function Nw(e,t,n,r,s){return ua(e,r)?[Tt(e,n),r,s]:[n,Xg(e,r),Tt([e,t],s)]}function Mw(e){return Vm((t,n)=>Nw(t[0],t[1],n[0],n[1],n[2]),e,Tw())}const Rw=Ue();function zd(e,t){const n=ew(qn(i=>i[0],e),{Compare:Vt}),r=Mw(t),s=r[1],o=r[0];if(n.Equals(s))return[o,Ue(),e,Ue()];{const i=qm(a=>ua(a[0],s),e);return[o,i[1],i[0],Bl(a=>!ua(a[0],n),r[2])]}}function Pw(e,t,n,r){const s=Vt(e,n)|0;if(s===0)throw new Error("The step of a range cannot be zero");const o=s>0;return i=>{const a=Vt(i,t)|0;return o&&a<=0||!o&&a>=0?[i,r(i,e)]:void 0}}function Ow(e,t,n,r,s){const o=Pw(t,n,r,s);return A(()=>Tp(o,e))}function Dw(e,t,n){return Ow(e,t,n,0,(r,s)=>r+s)}class Br extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Writable","ReadWritable"]}}class Fw{constructor(t){this.state=new Br(0,[Ys(new Array(Fl(t,10)),0,Fl(t,10),null),0])}}function Vw(e){return new Fw(e)}function jd(e){const t=e.state;if(t.tag===1){const n=t.fields[1]|0,r=t.fields[2]|0,s=t.fields[0],o=(r+1)%s.length|0;return o===n?e.state=new Br(0,[s,n]):e.state=new Br(1,[s,n,o]),nt(he(r,s))}else return}function Lw(e,t){const n=e.state;if(n.tag===1){const r=n.fields[1]|0,s=n.fields[2]|0,o=n.fields[0];It(o,r,t);const i=(r+1)%o.length|0;i===s?e.state=new Br(1,[Bw(e,s,o),o.length,0]):e.state=new Br(1,[o,i,s])}else{const r=n.fields[1]|0,s=n.fields[0];It(s,r,t);const o=(r+1)%s.length|0;e.state=new Br(1,[s,o,r])}}function Bw(e,t,n){return Array.from(A(()=>B(Pp(t,n),A(()=>B(Op(t,n),A(()=>Dp(r=>I(pe()),Dw(0,1,n.length))))))))}class ha extends ee{constructor(t,n,r,s,o,i,a){super(),this.init=t,this.update=n,this.subscribe=r,this.view=s,this.setState=o,this.onError=i,this.termination=a}}function yo(e,t,n){return new ha(e,t,r=>kw(),n,be(r=>{const s=kn(n)(r);return o=>{s(o)}}),r=>{ig(r[0],r[1])},[r=>!1,r=>{}])}function Uw(e,t){return new ha(t.init,t.update,t.subscribe,t.view,e,t.onError,t.termination)}function zw(e){return e.init}function jw(e,t,n,r,s,o,i){const a=kn(e)(i.init),l=Yo(t)(kn(i.update)),c=Yo(n)(kn(i.view)),d=Yo(r)(kn(i.setState));return new ha(a,be(l),kn(s)(i.subscribe),be(c),be(d),i.onError,o(i.termination))}function Hw(e,t,n){let r;const s=n.init(t),o=s[0],i=n.subscribe(o),a=n.termination,l=Vw(10);let c=!1,d=o,u=Rw,h=!1;const f=$=>{h||(Lw(l,$),c||(c=!0,w(),c=!1))},m=kn(e)(f),w=()=>{let $,v=jd(l);for(;!h&&v!=null;){const _=M(v);if(a[0](_))Iw(n.onError,u),a[1](d),h=!0;else{const C=n.update(_,d),R=C[0],D=n.subscribe(R);n.setState(R,m),Wu(Y=>{n.onError([en(zt("Error handling the message: %A"))(_),Y])},m,C[1]),d=R,u=($=zd(u,D),Ud(n.onError,m,$[0],$[1],$[2],$[3])),v=jd(l)}}};c=!0,n.setState(o,m),Wu($=>{n.onError([en(zt("Error intitializing:")),$])},m,s[1]),u=(r=zd(u,i),Ud(n.onError,m,r[0],r[1],r[2],r[3])),w(),c=!1}function Ww(e,t){Hw(be(n=>n),e,t)}function Gw(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return e[r]}})}),n}var ma={exports:{}},pa={};const qw=Gw(Xi);/**
22
+ `))(u);return h=>m(h)}}else if(Al(r))if(po(r)){const d=Dn(u=>Yt(e,t,!1,u),Nl(r));return u=>m=>Array.isArray(m)?vn(h=>ym(Qn(h)),Yd(0,d,u,m)):new $(1,[[u,new W(0,["an array",m])]])}else switch(Oe(kl(r))){case"Microsoft.FSharp.Core.FSharpOption`1[System.Object]":return s=Yt(e,t,!0,ge(0,Et(r))),u=>m=>A1(pe(s),u,m);case"Microsoft.FSharp.Collections.FSharpList`1[System.Object]":return i=Yt(e,t,!1,ge(0,Et(r))),u=>m=>Kd(pe(i),u,m);case"System.Collections.Generic.IEnumerable`1[System.Object]":return o=Yt(e,t,!1,ge(0,Et(r))),u=>m=>k1(pe(o),u,m);case"Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]":{const u=Yt(e,t,!1,ge(0,Et(r))),m=Yt(e,t,!1,ge(1,Et(r)));let h;const p=y([w=>g=>O1(pe(u),pe(m),w,g),(a=T1(pe(u),pe(m)),w=>g=>Kd(pe(a),w,g))]);return h=w=>g=>E1(p,w,g),w=>g=>N1(R1,pe(h),w,g)}case"Microsoft.FSharp.Collections.FSharpSet`1[System.Object]":{const u=Yt(e,t,!1,ge(0,Et(r)));return m=>h=>{const p=Zd(pe(u),m,h);return p.tag===0?new $(0,[M1(p.fields[0])]):new $(1,[p.fields[0]])}}default:return Qd(e,t,n,r)}else switch(l){case"System.Boolean":return d=>u=>_1(d,u);case"Microsoft.FSharp.Core.Unit":return d=>u=>y1(d,u);case"System.String":return d=>u=>Bd(d,u);case"System.Char":return d=>u=>$1(d,u);case"System.SByte":return Ud;case"System.Byte":return jd;case"System.Int16":return zd;case"System.UInt16":return Hd;case"System.Int32":return Wd;case"System.UInt32":return Gd;case"System.Double":return d=>u=>b1(d,u);case"System.Single":return d=>u=>v1(d,u);case"System.DateTime":return d=>u=>x1(d,u);case"System.DateTimeOffset":return d=>u=>C1(d,u);case"System.TimeSpan":return d=>u=>S1(d,u);case"System.Guid":return d=>u=>w1(d,u);case"System.Object":return d=>u=>new $(0,[u]);default:return Qd(e,t,n,r)}else{const d=c;return u=>m=>d.contents(u)(m)}}function D1(e){return $a({Compare:as})}function Xt(e,t,n){const r=We(t,new xt(0,[]));return Yt(D1(),r,!1,e)}class F1 extends ee{constructor(t){super(),this.Roles=t}}function V1(){return ht("AccountRegistry.AdminUI.Jwt.JwtPayload",[],F1,()=>[["Roles",ho(H)]])}function L1(e){const t=_o(e??"",["."],void 0,0);if(!Co((n,r)=>n===r,t)&&t.length===3){let n;const r=ge(1,t);return n=atob(r),Jt(pe(Xt(V1(),new xt(1,[]))),n)}else return new $(1,["Failed to decode access token"])}function Wr(e,t,n,r){return wa(s=>{ya(s)},e,t,s=>s.tag===1?r(s.fields[0]):n(s.fields[0]))}function B1(){return je()}function ka(e){return re("/",e)}function U1(e,t){const n=new Error("Duplicate SubId");return e(["Duplicate SubId: "+ka(t),n])}function ef(e,t,n){try{xe(n)}catch(r){e(["Error stopping subscription: "+ka(t),r])}}function j1(e,t,n,r){try{return[n,r(t)]}catch(s){e(["Error starting subscription: "+ka(n),s]);return}}function z1(e,t){ui(n=>{ef(e,n[0],n[1])},t)}function tf(e,t,n,r,s,i){return ui(o=>{U1(e,o)},n),ui(o=>{ef(e,o[0],o[1])},r),nt(s,sc(o=>j1(e,t,o[0],o[1]),i))}function H1(){return[je(),h1({Compare:Lt}),je()]}function W1(e,t,n,r,s){return Aa(e,r)?[Tt(e,n),r,s]:[n,f1(e,r),Tt([e,t],s)]}function G1(e){return Xm((t,n)=>W1(t[0],t[1],n[0],n[1],n[2]),e,H1())}const q1=je();function nf(e,t){const n=m1(er(o=>o[0],e),{Compare:Lt}),r=G1(t),s=r[1],i=r[0];if(n.Equals(s))return[i,je(),e,je()];{const o=ap(a=>Aa(a[0],s),e);return[i,o[1],o[0],rc(a=>!Aa(a[0],n),r[2])]}}function K1(e,t,n,r){const s=Lt(e,n)|0;if(s===0)throw new Error("The step of a range cannot be zero");const i=s>0;return o=>{const a=Lt(o,t)|0;return i&&a<=0||!i&&a>=0?[o,r(o,e)]:void 0}}function Z1(e,t,n,r,s){const i=K1(t,n,r,s);return I(()=>Hp(i,e))}function J1(e,t,n){return Z1(e,t,n,0,(r,s)=>r+s)}class Gr extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Writable","ReadWritable"]}}class Y1{constructor(t){this.state=new Gr(0,[ai(new Array(ec(t,10)),0,ec(t,10),null),0])}}function X1(e){return new Y1(e)}function rf(e){const t=e.state;if(t.tag===1){const n=t.fields[1]|0,r=t.fields[2]|0,s=t.fields[0],i=(r+1)%s.length|0;return i===n?e.state=new Gr(0,[s,n]):e.state=new Gr(1,[s,n,i]),ot(ge(r,s))}else return}function Q1(e,t){const n=e.state;if(n.tag===1){const r=n.fields[1]|0,s=n.fields[2]|0,i=n.fields[0];Nt(i,r,t);const o=(r+1)%i.length|0;o===s?e.state=new Gr(1,[ew(e,s,i),i.length,0]):e.state=new Gr(1,[i,o,s])}else{const r=n.fields[1]|0,s=n.fields[0];Nt(s,r,t);const i=(r+1)%s.length|0;e.state=new Gr(1,[s,i,r])}}function ew(e,t,n){return Array.from(I(()=>D(Kp(t,n),I(()=>D(Zp(t,n),I(()=>Jp(r=>E($e()),J1(0,1,n.length))))))))}class Ea extends ee{constructor(t,n,r,s,i,o,a){super(),this.init=t,this.update=n,this.subscribe=r,this.view=s,this.setState=i,this.onError=o,this.termination=a}}function qr(e,t,n){return new Ea(e,t,r=>B1(),n,pe(r=>{const s=On(n)(r);return i=>{s(i)}}),r=>{_$(r[0],r[1])},[r=>!1,r=>{}])}function tw(e,t){return new Ea(t.init,t.update,t.subscribe,t.view,e,t.onError,t.termination)}function nw(e){return e.init}function rw(e,t,n,r,s,i,o){const a=On(e)(o.init),l=ao(t)(On(o.update)),c=ao(n)(On(o.view)),d=ao(r)(On(o.setState));return new Ea(a,pe(l),On(s)(o.subscribe),pe(c),pe(d),o.onError,i(o.termination))}function sw(e,t,n){let r;const s=n.init(t),i=s[0],o=n.subscribe(i),a=n.termination,l=X1(10);let c=!1,d=i,u=q1,m=!1;const h=g=>{m||(Q1(l,g),c||(c=!0,w(),c=!1))},p=On(e)(h),w=()=>{let g,C=rf(l);for(;!m&&C!=null;){const x=O(C);if(a[0](x))z1(n.onError,u),a[1](d),m=!0;else{const A=n.update(x,d),P=A[0],V=n.subscribe(P);n.setState(P,p),ad(Y=>{n.onError([Wt(Ut("Error handling the message: %A"))(x),Y])},p,A[1]),d=P,u=(g=nf(u,V),tf(n.onError,p,g[0],g[1],g[2],g[3])),C=rf(l)}}};c=!0,n.setState(i,p),ad(g=>{n.onError([Wt(Ut("Error intitializing:")),g])},p,s[1]),u=(r=nf(u,o),tf(n.onError,p,r[0],r[1],r[2],r[3])),w(),c=!1}function iw(e,t){sw(pe(n=>n),e,t)}function ow(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return e[r]}})}),n}var Ia={exports:{}},Na={};const aw=ow(da);/**
23
23
  * @license React
24
24
  * use-sync-external-store-shim.production.min.js
25
25
  *
@@ -27,10 +27,10 @@ If you can't use one of these types, please pass an extra decoder.
27
27
  *
28
28
  * This source code is licensed under the MIT license found in the
29
29
  * LICENSE file in the root directory of this source tree.
30
- */var Hd;function Kw(){if(Hd)return pa;Hd=1;var e=qw;function t(u,h){return u===h&&(u!==0||1/u===1/h)||u!==u&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,s=e.useEffect,o=e.useLayoutEffect,i=e.useDebugValue;function a(u,h){var f=h(),m=r({inst:{value:f,getSnapshot:h}}),w=m[0].inst,$=m[1];return o(function(){w.value=f,w.getSnapshot=h,l(w)&&$({inst:w})},[u,f,h]),s(function(){return l(w)&&$({inst:w}),u(function(){l(w)&&$({inst:w})})},[u]),i(f),f}function l(u){var h=u.getSnapshot;u=u.value;try{var f=h();return!n(u,f)}catch{return!0}}function c(u,h){return h()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return pa.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,pa}var Wd;function Zw(){return Wd||(Wd=1,ma.exports=Kw()),ma.exports}var Jw=Zw();class Yw{constructor(t,n,r){this.arg=n,this.dependencies=r;const s=t(),o=[];this.finalDispatch=void 0;let i;const a=zw(s)(this.arg);let l=a[0],c=a[1];i=[[l,d=>{const u=this.finalDispatch;u==null?o.push(d):u(d)},!1,o],c],this.state=i[0],this.cmd=i[1],this.subscribe=d=>{let u=!1;const h=Ko(this.state[0]);return Ww(this.arg,Uw((f,m)=>{const w=this.state;this.finalDispatch=m,this.state=[f,w[1],!0,o],f!==w[0]&&d()},jw((f,m)=>{const w=this.cmd;return this.cmd=Oe(),[this.state[0],w]},(f,m,w)=>f(m)(this.state[0]),Jo(f=>f),Jo(f=>f),be(f=>f),f=>[m=>f[0](m)?!0:h&&u,m=>{const w=m;Ko(w)?ye(w):f[1](m)}],s))),()=>{u=!0}}}}function Gd(e,t,n){return new Yw(e,t,n)}function Xw(e){return e.state}function Qw(e){return e.subscribe}function e1(e,t,n){return Be(e.arg,t)?!Be(e.dependencies,n):!0}function bo(e,t,n){const r=Ge(()=>Gd(e,t,n)),s=r[0];e1(s,t,n)&&r[1](Gd(e,t,n));const o=Jw.useSyncExternalStore(Qw(s),()=>Xw(s)),i=o[2],a=o[3],l=o[1];return Te(()=>{if(i&&a.length>0){let c=Pe(a);try{for(;c["System.Collections.IEnumerator.MoveNext"]();){const d=c["System.Collections.Generic.IEnumerator`1.get_Current"]();setTimeout(()=>{l(d)})}}finally{ye(c)}Bh(a)}},[i,a]),[o[0],l]}class sr extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"]}}class qd extends H{constructor(t,n){super(),this.tag=0,this.fields=[t,n]}cases(){return["Header"]}}class $a extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Empty","Text","Binary","Form"]}}class bs extends ee{constructor(t,n,r,s,o,i,a,l){super(),this.url=t,this.method=n,this.headers=r,this.withCredentials=s,this.overridenMimeType=o,this.overridenResponseType=i,this.timeout=a,this.content=l}}class Ur extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Text","Blob","ArrayBuffer","Unknown"]}}class Kd extends ee{constructor(t,n,r,s,o,i){super(),this.statusCode=t|0,this.responseText=n,this.responseType=r,this.responseUrl=s,this.responseHeaders=o,this.content=i}}function Zd(e){return new qd("Authorization",e)}const or=new bs("",new sr(0,[]),Ue(),!1,void 0,void 0,void 0,new $a(0,[]));new Kd(0,"","","",ra({Compare:Xr}),new Ur(0,[""]));function Jd(e,t){return Js(t)?new Array(0):ai(t,[e],void 0,0)}function t1(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"}}function ir(e){return new bs(e,or.method,or.headers,or.withCredentials,or.overridenMimeType,or.overridenResponseType,or.timeout,or.content)}function zr(e,t){return new bs(t.url,e,t.headers,t.withCredentials,t.overridenMimeType,t.overridenResponseType,t.timeout,t.content)}function ga(e,t){return new bs(t.url,t.method,ot(t.headers,ne(e)),t.withCredentials,t.overridenMimeType,t.overridenResponseType,t.timeout,t.content)}function Yd(e,t){return new bs(t.url,t.method,t.headers,t.withCredentials,t.overridenMimeType,t.overridenResponseType,t.timeout,e)}function Xd(e){return R0(t=>{const n=new XMLHttpRequest;n.open(t1(e.method),e.url),n.onreadystatechange=()=>{let l,c,d,u,h,f,m;n.readyState===4&&t[0]((l=(c=n.responseType,c===""||c==="text"?n.responseText:""),d=n.status|0,u=n.responseType,h=(f=n.responseType,f===""?new Ur(0,[n.responseText]):f==="text"?new Ur(0,[n.responseText]):f==="arraybuffer"?new Ur(2,[n.response]):f==="blob"?new Ur(1,[n.response]):new Ur(3,[n.response])),m=Q0(Rm(w=>{const $=k(Jd(":",w));if(!K($))return[F($).toLocaleLowerCase(),oe(":",b($)).trim()]},Jd(`\r
31
- `,n.getAllResponseHeaders())),{Compare:Xr}),new Kd(d,l,u,n.responseURL,m,h)))};const r=Pe(e.headers);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const l=r["System.Collections.Generic.IEnumerator`1.get_Current"]();n.setRequestHeader(l.fields[0],l.fields[1])}}finally{ye(r)}n.withCredentials=e.withCredentials;const s=e.overridenMimeType;if(s!=null){const l=s;n.overrideMimeType(l)}const o=e.overridenResponseType;if(o!=null)switch(o.tag){case 1:{n.responseType="blob";break}case 2:{n.responseType="arraybuffer";break}default:n.responseType="text"}const i=e.timeout;if(i!=null){const l=i|0;n.timeout=l|0}const a=e.content;switch(a.tag){case 1:{n.send(nt(a.fields[0]));break}case 3:{n.send(nt(a.fields[0]));break}case 2:{n.send(nt(a.fields[0]));break}default:n.send()}})}function n1(e,t,n){e:for(;;){const r=e,s=t,o=n;if(K(o)){const i=r;return i.tag===1?new g(1,[i.fields[0]]):new g(0,[Qs(i.fields[0])])}else{let i;const a=s(F(o));if(a.tag===1)i=new g(1,[a.fields[0]]);else{const l=r;i=l.tag===1?new g(1,[l.fields[0]]):new g(0,[Tt(a.fields[0],l.fields[0])])}if(i.tag===1)return i;e=i,t=s,n=b(o);continue e}}}function r1(e,t){return n1(new g(0,[Ue()]),e,t)}function s1(e){return r1(t=>t,e)}function o1(e){return e}const Qd=pe();function _o(e){return Array.from(e)}function i1(e){return Gs(e,"O")}function a1(e){return Dg(e)}function l1(){return pe()}function c1(e){return Gs(e,"O")}function ef(e,t){return JSON.stringify(t,void 0,nt(e))}function u1(e){return t=>Ol(rt(e,t),()=>Qd)}function tf(e,t,n,r){let s;const o=new $t(pe());let i;const a=Re(r);i=a===""?e:zu(a,o,e);let l;if(pl(r)){const c=An(d=>{const u=ud(t,_r(d)),h=vn(i,t,n,d[1]);return f=>m=>{const w=nm(f,d);return(!n||n&&w!=null)&&(m[u]=h(w)),m}},es(r));l=d=>as((u,h)=>h(d)(u),{},c)}else if(ml(r))l=c=>{const d=tm(c,r),u=d[0],h=d[1],f=h.length|0;if(f===0)return _r(u);{const m=f|0,w=$l(u),$=Ys(new Array(m+1),0,m+1,null);It($,0,_r(u));for(let v=1;v<=m;v++){const _=vn(i,t,n,he(v-1,w)[1]);It($,v,_(he(v-1,h)))}return $}};else throw new Error((s=Re(r),en(zt(`Cannot generate auto encoder for %s. Please pass an extra encoder.
30
+ */var sf;function lw(){if(sf)return Na;sf=1;var e=aw;function t(u,m){return u===m&&(u!==0||1/u===1/m)||u!==u&&m!==m}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,s=e.useEffect,i=e.useLayoutEffect,o=e.useDebugValue;function a(u,m){var h=m(),p=r({inst:{value:h,getSnapshot:m}}),w=p[0].inst,g=p[1];return i(function(){w.value=h,w.getSnapshot=m,l(w)&&g({inst:w})},[u,h,m]),s(function(){return l(w)&&g({inst:w}),u(function(){l(w)&&g({inst:w})})},[u]),o(h),h}function l(u){var m=u.getSnapshot;u=u.value;try{var h=m();return!n(u,h)}catch{return!0}}function c(u,m){return m()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return Na.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,Na}var of;function cw(){return of||(of=1,Ia.exports=lw()),Ia.exports}var uw=cw();class dw{constructor(t,n,r){this.arg=n,this.dependencies=r;const s=t(),i=[];this.finalDispatch=void 0;let o;const a=nw(s)(this.arg);let l=a[0],c=a[1];o=[[l,d=>{const u=this.finalDispatch;u==null?i.push(d):u(d)},!1,i],c],this.state=o[0],this.cmd=o[1],this.subscribe=d=>{let u=!1;const m=so(this.state[0]);return iw(this.arg,tw((h,p)=>{const w=this.state;this.finalDispatch=p,this.state=[h,w[1],!0,i],h!==w[0]&&d()},rw((h,p)=>{const w=this.cmd;return this.cmd=fe(),[this.state[0],w]},(h,p,w)=>h(p)(this.state[0]),oo(h=>h),oo(h=>h),pe(h=>h),h=>[p=>h[0](p)?!0:m&&u,p=>{const w=p;so(w)?xe(w):h[1](p)}],s))),()=>{u=!0}}}}function af(e,t,n){return new dw(e,t,n)}function fw(e){return e.state}function hw(e){return e.subscribe}function mw(e,t,n){return Pe(e.arg,t)?!Pe(e.dependencies,n):!0}function Kr(e,t,n){const r=Ze(()=>af(e,t,n)),s=r[0];mw(s,t,n)&&r[1](af(e,t,n));const i=uw.useSyncExternalStore(hw(s),()=>fw(s)),o=i[2],a=i[3],l=i[1];return Te(()=>{if(o&&a.length>0){let c=De(a);try{for(;c["System.Collections.IEnumerator.MoveNext"]();){const d=c["System.Collections.Generic.IEnumerator`1.get_Current"]();setTimeout(()=>{l(d)})}}finally{xe(c)}em(a)}},[o,a]),[i[0],l]}class Qt extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"]}}class lf extends z{constructor(t,n){super(),this.tag=0,this.fields=[t,n]}cases(){return["Header"]}}class Ta extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Empty","Text","Binary","Form"]}}class Is extends ee{constructor(t,n,r,s,i,o,a,l){super(),this.url=t,this.method=n,this.headers=r,this.withCredentials=s,this.overridenMimeType=i,this.overridenResponseType=o,this.timeout=a,this.content=l}}class Zr extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Text","Blob","ArrayBuffer","Unknown"]}}class cf extends ee{constructor(t,n,r,s,i,o){super(),this.statusCode=t|0,this.responseText=n,this.responseType=r,this.responseUrl=s,this.responseHeaders=i,this.content=o}}function Ra(e){return new lf("Authorization",e)}const cr=new Is("",new Qt(0,[]),je(),!1,void 0,void 0,void 0,new Ta(0,[]));new cf(0,"","","",$a({Compare:as}),new Zr(0,[""]));function uf(e,t){return oi(t)?new Array(0):_o(t,[e],void 0,0)}function pw(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"}}function en(e){return new Is(e,cr.method,cr.headers,cr.withCredentials,cr.overridenMimeType,cr.overridenResponseType,cr.timeout,cr.content)}function fn(e,t){return new Is(t.url,e,t.headers,t.withCredentials,t.overridenMimeType,t.overridenResponseType,t.timeout,t.content)}function Ei(e,t){return new Is(t.url,t.method,nt(t.headers,te(e)),t.withCredentials,t.overridenMimeType,t.overridenResponseType,t.timeout,t.content)}function df(e,t){return new Is(t.url,t.method,t.headers,t.withCredentials,t.overridenMimeType,t.overridenResponseType,t.timeout,e)}function Ma(e){return qg(t=>{const n=new XMLHttpRequest;n.open(pw(e.method),e.url),n.onreadystatechange=()=>{let l,c,d,u,m,h,p;n.readyState===4&&t[0]((l=(c=n.responseType,c===""||c==="text"?n.responseText:""),d=n.status|0,u=n.responseType,m=(h=n.responseType,h===""?new Zr(0,[n.responseText]):h==="text"?new Zr(0,[n.responseText]):h==="arraybuffer"?new Zr(2,[n.response]):h==="blob"?new Zr(1,[n.response]):new Zr(3,[n.response])),p=h$(qm(w=>{const g=y(uf(":",w));if(!K(g))return[L(g).toLocaleLowerCase(),re(":",b(g)).trim()]},uf(`\r
31
+ `,n.getAllResponseHeaders())),{Compare:as}),new cf(d,l,u,n.responseURL,p,m)))};const r=De(e.headers);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const l=r["System.Collections.Generic.IEnumerator`1.get_Current"]();n.setRequestHeader(l.fields[0],l.fields[1])}}finally{xe(r)}n.withCredentials=e.withCredentials;const s=e.overridenMimeType;if(s!=null){const l=s;n.overrideMimeType(l)}const i=e.overridenResponseType;if(i!=null)switch(i.tag){case 1:{n.responseType="blob";break}case 2:{n.responseType="arraybuffer";break}default:n.responseType="text"}const o=e.timeout;if(o!=null){const l=o|0;n.timeout=l|0}const a=e.content;switch(a.tag){case 1:{n.send(ot(a.fields[0]));break}case 3:{n.send(ot(a.fields[0]));break}case 2:{n.send(ot(a.fields[0]));break}default:n.send()}})}function gw(e,t,n){e:for(;;){const r=e,s=t,i=n;if(K(i)){const o=r;return o.tag===1?new $(1,[o.fields[0]]):new $(0,[ci(o.fields[0])])}else{let o;const a=s(L(i));if(a.tag===1)o=new $(1,[a.fields[0]]);else{const l=r;o=l.tag===1?new $(1,[l.fields[0]]):new $(0,[Tt(a.fields[0],l.fields[0])])}if(o.tag===1)return o;e=o,t=s,n=b(i);continue e}}}function $w(e,t){return gw(new $(0,[je()]),e,t)}function ww(e){return $w(t=>t,e)}function yw(e){return e}const ff=$e();function Ii(e){return Array.from(e)}function _w(e){return Ir(e,"O")}function bw(e){return J$(e)}function vw(){return $e()}function xw(e){return Ir(e,"O")}function hf(e,t){return JSON.stringify(t,void 0,ot(e))}function Cw(e){return t=>Xl(Ge(e,t),()=>ff)}function mf(e,t,n,r){let s;const i=new wt($e());let o;const a=Oe(r);o=a===""?e:sd(a,i,e);let l;if(Rl(r)){const c=Dn(d=>{const u=Cd(t,Sr(d)),m=Nn(o,t,n,d[1]);return h=>p=>{const w=gm(h,d);return(!n||n&&w!=null)&&(p[u]=m(w)),p}},cs(r));l=d=>gs((u,m)=>m(d)(u),{},c)}else if(Tl(r))l=c=>{const d=pm(c,r),u=d[0],m=d[1],h=m.length|0;if(h===0)return Sr(u);{const p=h|0,w=Ml(u),g=ai(new Array(p+1),0,p+1,null);Nt(g,0,Sr(u));for(let C=1;C<=p;C++){const x=Nn(o,t,n,ge(C-1,w)[1]);Nt(g,C,x(ge(C-1,m)))}return g}};else throw new Error((s=Oe(r),Wt(Ut(`Cannot generate auto encoder for %s. Please pass an extra encoder.
32
32
 
33
- Documentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders`))(s)));return o.contents=l,l}function vn(e,t,n,r){const s=Re(r),o=ju(s,e);if(o==null)if(ll(r)){const i=vn(e,t,n,Qr(r));return a=>_o(Fe(i,a))}else if(ti(r))switch(Re(dl(r))){case"System.SByte":return a=>a;case"System.Byte":return a=>a;case"System.Int16":return a=>a;case"System.UInt16":return a=>a;case"System.Int32":return a=>a;case"System.UInt32":return a=>a;default:{const a=Re(r);return Il(zt(`Cannot generate auto encoder for %s.
33
+ Documentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders`))(s)));return i.contents=l,l}function Nn(e,t,n,r){const s=Oe(r),i=id(s,e);if(i==null)if(Sl(r)){const o=Nn(e,t,n,ls(r));return a=>Ii(Ve(o,a))}else if(mo(r))switch(Oe(El(r))){case"System.SByte":return a=>a;case"System.Byte":return a=>a;case"System.Int16":return a=>a;case"System.UInt16":return a=>a;case"System.Int32":return a=>a;case"System.UInt32":return a=>a;default:{const a=Oe(r);return Gl(Ut(`Cannot generate auto encoder for %s.
34
34
  Thoth.Json.Net only support the following enum types:
35
35
  - sbyte
36
36
  - byte
@@ -42,12 +42,12 @@ Thoth.Json.Net only support the following enum types:
42
42
  If you can't use one of these types, please pass an extra encoder.
43
43
 
44
44
  Documentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders
45
- `))(a)}}else if(cl(r))if(ni(r)){const i=An(a=>vn(e,t,n,a),hl(r));return a=>_o(gi((l,c)=>he(l,i)(c),a))}else{const i=Re(ul(r));if(i==="Microsoft.FSharp.Core.FSharpOption`1[System.Object]"){const a=new Ih(()=>u1(vn(e,t,n,he(0,At(r)))));return l=>l==null?Qd:a.Value(l)}else if(i==="Microsoft.FSharp.Collections.FSharpList`1[System.Object]"||i==="Microsoft.FSharp.Collections.FSharpSet`1[System.Object]"||i==="System.Collections.Generic.IEnumerable`1[System.Object]"){const a=vn(e,t,n,he(0,At(r)));return l=>_o(Fe(a,l))}else if(i==="Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]"){const a=he(0,At(r)),l=vn(e,t,n,he(1,At(r)));if(Re(a)==="System.String"||Re(a)==="System.Guid")return c=>as((d,u)=>{const h=u;return d[h[0]]=l(h[1]),d},{},c);{let c;return c=vn(e,t,n,a),u=>_o(Fe(h=>{const f=h;return[c(f[0]),l(f[1])]},u))}}else return tf(e,t,n,r)}else switch(s){case"System.Boolean":return i=>i;case"Microsoft.FSharp.Core.Unit":return l1;case"System.String":return i=>i;case"System.Char":return i=>i;case"System.SByte":return i=>i;case"System.Byte":return i=>i;case"System.Int16":return i=>i;case"System.UInt16":return i=>i;case"System.Int32":return i=>i;case"System.UInt32":return i=>i;case"System.Double":return i=>i;case"System.Single":return i=>i;case"System.DateTime":return c1;case"System.DateTimeOffset":return i1;case"System.TimeSpan":return a1;case"System.Guid":return o1;case"System.Object":return i=>i;default:return tf(e,t,n,r)}else{const i=o;return a=>i.contents(a)}}function d1(e){return ra({Compare:Xr})}function nf(e,t,n,r){const s=He(t,new Gt(0,[])),o=He(r,!0);return vn(d1(),s,o,e)}function wa(e){return new rc(tn(e))}function _s(e){return`${e}/account-registry/admin`}const f1=5,h1=1e3;function rf(e,t,n,r){return U.Delay(()=>{const s=ga(Zd(en(zt("Bearer %s"))(n)),r);return U.Bind(Xd(s),o=>{let i,a;const l=o,c=l.statusCode|0;return i=c|0,i>=200&&i<=299?U.Return(l):(a=c|0,(a===429?!0:a>=500)&&e>=1?U.Bind(Eu(t),()=>U.ReturnFrom(rf(e-1,t,n,r))):U.Return(l))})})}const vs=e=>t=>rf(f1,h1,e,t);function m1(e,t){return U.Delay(()=>{let n;const r=vs(t)(zr(new sr(0,[]),ir(`${_s(e)}/partners`)));return n=U.Bind(r,s=>U.Return(new g(0,[s]))),U.Bind(n,s=>{const o=s;if(o.tag===1)return U.Return(new g(1,[o.fields[0]]));{const i=o.fields[0];if(i.statusCode===200){let a;const l=nr(be(rr(ei(k$()),new Gt(1,[]))),i.responseText);return a=l.tag===1?new g(1,[l.fields[0]]):s1(qn(vg,l.fields[0])),U.Return(a)}else return U.Return(new g(1,["Unexpected response from backend"]))}})})}function p1(e,t,n,r){const s=tn(n),o=nn(r);return U.Delay(()=>{let i;const a=vs(t)(zr(new sr(0,[]),ir(`${_s(e)}/partners/${s}/accounts/${o}`)));return i=U.Bind(a,l=>U.Return(new g(0,[l]))),U.Bind(i,l=>{const c=l;if(c.tag===1)return U.Return(new g(1,[c.fields[0]]));{const d=c.fields[0];if(d.statusCode===200){const u=nr(be(rr(A$(),new Gt(1,[]))),d.responseText);return U.Return(u)}else return U.Return(new g(1,["Unexpected response from backend"]))}})})}function $1(e,t,n,r,s){const o=tn(n),i=nn(r);return U.Delay(()=>{const a=ef(0,nf(j$(),new Gt(1,[]),void 0,void 0)(s));let l;const c=vs(t)(Yd(new $a(1,[a]),zr(new sr(3,[]),ir(`${_s(e)}/partners/${o}/accounts/${i}`))));return l=U.Bind(c,d=>U.Return(new g(0,[d]))),U.Bind(l,d=>{const u=d;if(u.tag===1)return U.Return(new g(1,[u.fields[0]]));{let h;const f=u.fields[0].statusCode===204?new g(0,[void 0]):new g(1,["Unexpected response from backend"]);return h=U.Return(f),U.Bind(h,m=>{let w;const $=m;return w=$.tag===1?new g(1,[$.fields[0]]):new g(0,[void 0]),U.Return(w)})}})})}function ya(e,t,n,r,s){return U.Delay(()=>{let o,i,a,l;const c="?"+oe("&",Ul(h=>h,k([(o=td(r.SearchText),Rl(o)?void 0:`search=${encodeURIComponent(o.trim())}`),(i=fg(r.Sort),i[0].tag===1?i[1].tag===1?"sort_by=name&sort_direction=desc":"sort_by=name&sort_direction=asc":i[1].tag===1?"sort_by=accountid&sort_direction=desc":"sort_by=accountid&sort_direction=asc"),(a=nd(r.PageSize)|0,a<=100&&a>=10?`page_size=${a}`:void 0)])));let d;const u=vs(t)((l=zr(new sr(0,[]),ir(`${_s(e)}/partners/${Ir(n)}/accounts${c}`)),s==null?l:ga(new qd("token",s),l)));return d=U.Bind(u,h=>U.Return(new g(0,[h]))),U.Bind(d,h=>{const f=h;if(f.tag===1)return U.Return(new g(1,[f.fields[0]]));{const m=f.fields[0];if(m.statusCode===200){const w=nr(be(rr(T$(),new Gt(1,[]))),m.responseText);return U.Return(w)}else return U.Return(new g(1,["Unexpected response from backend"]))}})})}function g1(e,t,n){const r=nn(n);return U.Delay(()=>{let s;const o=vs(t)(zr(new sr(0,[]),ir(`${_s(e)}/search-by-id/${r}`)));return s=U.Bind(o,i=>U.Return(new g(0,[i]))),U.Bind(s,i=>{const a=i;if(a.tag===1)return U.Return(new g(1,[a.fields[0]]));{const l=a.fields[0];if(l.statusCode===200){const c=nr(be(rr(M$(),new Gt(1,[]))),l.responseText);return U.Return(c)}else return U.Return(new g(1,["Unexpected response from backend"]))}})})}function w1(e,t){return p("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),p("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"}))}const y1=Rn(w1);function b1(e,t){return p("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),p("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"}))}const _1=Rn(b1);function v1(e,t){return p("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),p("path",{fillRule:"evenodd",d:"M11.49 3.17c-.38-1.56-2.6-1.56-2.98 0a1.532 1.532 0 01-2.286.948c-1.372-.836-2.942.734-2.106 2.106.54.886.061 2.042-.947 2.287-1.561.379-1.561 2.6 0 2.978a1.532 1.532 0 01.947 2.287c-.836 1.372.734 2.942 2.106 2.106a1.532 1.532 0 012.287.947c.379 1.561 2.6 1.561 2.978 0a1.533 1.533 0 012.287-.947c1.372.836 2.942-.734 2.106-2.106a1.533 1.533 0 01.947-2.287c1.561-.379 1.561-2.6 0-2.978a1.532 1.532 0 01-.947-2.287c.836-1.372-.734-2.942-2.106-2.106a1.532 1.532 0 01-2.287-.947zM10 13a3 3 0 100-6 3 3 0 000 6z",clipRule:"evenodd"}))}const x1=Rn(v1);function C1(e,t){return p("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),p("path",{fillRule:"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z",clipRule:"evenodd"}))}const S1=Rn(C1);function k1(e,t){return p("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),p("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"}))}const A1=Rn(k1);class sf extends H{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["BreadCrumb"]}}function E1(e,t,n){let r,s;return p("li",P(k([["key",e],["className","flex"],(r=[p("div",P(k([["className","flex items-center"],(s=_e(A(()=>{let o;return B(n?wt():I((o={className:"flex-shrink-0 h-5 w-5 text-gray-400"},p(_1,o))),A(()=>I(p("a",P(_e(A(()=>B(I(["children",e]),A(()=>B(t!=null?I(["href",er(M(t))]):wt(),A(()=>I(["className","ml-4 text-sm font-medium text-gray-500 hover:text-gray-700"]))))))))))))})),["children",E.Children.toArray(Array.from(s))])])))],["children",E.Children.toArray(Array.from(r))])])))}function I1(e){let t,n;return p("nav",P(k([["className","pt-2 mb-6"],["aria-label","Breadcrumb"],(t=[p("ol",P(k([["className","-ml-3 max-w-screen-xl w-full flex space-x-4"],(n=zm((r,s)=>E1(s.fields[0][0],s.fields[0][1],r===0),e),["children",E.Children.toArray(Array.from(n))])])))],["children",E.Children.toArray(Array.from(t))])])))}function vt(e,t){return new sf([e,gs(t)])}function of(){return vt("Partners",new J(0,[]))}function af(e,t){return vt(t,new J(1,[e]))}function T1(e){return vt("Super",new J(4,[e]))}function N1(e){return vt("Benefits",new J(5,[e]))}function M1(e){return vt("Bank Details",new J(6,[e]))}function R1(e){return vt("Directory",new J(2,[e]))}function P1(e){return vt("Workspace",new J(7,[e]))}function O1(e){return vt("Accounts",new J(3,[e]))}function D1(e){return new sf([e,void 0])}function F1(e,t){let n;return vt("Directory",(n=[e,t],new J(9,[n[0],n[1]])))}function V1(e,t){let n;return vt("Users",(n=[e,t],new J(10,[n[0],n[1]])))}function L1(e,t){let n;return vt("Super",(n=[e,t],new J(11,[n[0],n[1]])))}function B1(e,t){let n;return vt("Benefits",(n=[e,t],new J(12,[n[0],n[1]])))}function U1(e,t){let n;return vt("Bank Details",(n=[e,t],new J(13,[n[0],n[1]])))}function z1(e,t){let n;return vt("Salary Packaging",(n=[e,t],new J(14,[n[0],n[1]])))}function j1(e,t){let n;return vt("Workspace",(n=[e,t],new J(15,[n[0],n[1]])))}function xs(e){let t,n;const r=e.partner;if(r==null)n="...";else{const h=r,f=h.Name;n=f.tag===2?f.fields[0].tag===1?to(h.Id):fi(f.fields[0].fields[0]):"..."}let s;const o=e.account;if(o==null)s="...";else{const h=o,f=h.Name;s=f.tag===2?f.fields[0].tag===1?no(h.Id):fi(f.fields[0].fields[0]):"..."}let i;const a=e.partner,l=e.account;let c,d,u;switch(a==null?(l==null,c=2):l==null?(c=1,u=a):(c=0,d=a),c){case 0:{i=k([of(),af(d.Id,n),O1(d.Id),D1(s)]);break}case 1:{i=k([of(),af(u.Id,n)]);break}default:i=Ue()}return I1((t=e.page,t.tag===16||t.tag===1||t.tag===3?i:t.tag===4?ot(i,ne(T1(t.fields[0]))):t.tag===5?ot(i,ne(N1(t.fields[0]))):t.tag===6?ot(i,ne(M1(t.fields[0]))):t.tag===2?ot(i,ne(R1(t.fields[0]))):t.tag===7?ot(i,ne(P1(t.fields[0]))):t.tag===8?i:t.tag===9?ot(i,ne(F1(t.fields[0],t.fields[1]))):t.tag===10?ot(i,ne(V1(t.fields[0],t.fields[1]))):t.tag===11?ot(i,ne(L1(t.fields[0],t.fields[1]))):t.tag===12?ot(i,ne(B1(t.fields[0],t.fields[1]))):t.tag===13?ot(i,ne(U1(t.fields[0],t.fields[1]))):t.tag===14?ot(i,ne(z1(t.fields[0],t.fields[1]))):t.tag===15?ot(i,ne(j1(t.fields[0],t.fields[1]))):i))}class H1 extends H{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Tab"]}}function W1(e){return new H1(e)}function G1(e){return e.fields[0]}function lf(e,t,n){const r=(e===t?"border-indigo-500 text-indigo-600 bg-indigo-100":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300 hover:bg-gray-200")+" whitespace-nowrap p-3 border-r-2 font-medium text-sm";return W1(p("a",P(_e(A(()=>B(I(["key",t]),A(()=>B(I(["children",t]),A(()=>B(I(["className",r]),A(()=>e!==t?I(["href",er(ne(n))]):wt())))))))))))}function cf(e){let t,n;const r=e.headers,s=Pn(100);return p("div",P(k([["ref",o=>{const i=Em(o);if(i!=null){const a=i;s[1](~~a.offsetTop)}}],["className","relative"],(t=[p("div",{className:"w-40 mr-6"}),p("nav",P(k([["className","fixed bottom-14 flex flex-col w-40 border-r border-gray-300 mr-6"],["style",{top:s[0]}],(n=Fe(G1,r),["children",E.Children.toArray(Array.from(n))])])))],["children",E.Children.toArray(Array.from(t))])])))}class q1 extends ee{constructor(t,n,r){super(),this.Roles=t,this.BackendUrl=n,this.AccessToken=r}}const On=C0();let ar=class extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["UpdateSearchText","UpdateSort","LoadAccountLookup","UpdateAccountLookup","QueryAccountLookup"]}};class K1{constructor(t){this.props=t}}function Z1(e){return new K1(e)}function uf(e){return t=>n=>U.Delay(()=>{const r=wa(e.props.partnerId);return U.Bind(ya(e.props.backendUrl,e.props.accessToken,r,t,void 0),s=>(n(new ar(2,[new me(2,[s])])),U.Zero()))})}function J1(e){return t=>n=>r=>U.Delay(()=>{const s=wa(e.props.partnerId);return U.Bind(ya(e.props.backendUrl,e.props.accessToken,s,t,n),o=>(r(new ar(3,[o])),U.Zero()))})}function Y1(e,t,n){return ya(e.props.backendUrl,e.props.accessToken,wa(e.props.partnerId),t,void 0)}let jr=class extends ee{constructor(t,n,r,s){super(),this.Data=t,this.SearchText=n,this.Sort=r,this.PageSize=s}};function X1(){return[new jr(new me(0,[]),hg,dg,$g(20)),Oe()]}function Q1(e,t,n){let r,s,o,i;switch(t.tag){case 1:{const a=t.fields[0];return[new jr(new me(1,[]),n.SearchText,a,n.PageSize),Xe(l=>{const c=new sa(n.SearchText,a,n.PageSize);Or(uf(e)(c)(l))})]}case 2:return[new jr(t.fields[0],n.SearchText,n.Sort,n.PageSize),Oe()];case 3:{const a=t.fields[0];return[new jr((r=n.Data,r.tag===2?r.fields[0].tag===0?(s=a,s.tag===1?new me(2,[new g(1,[s.fields[0]])]):new me(2,[new g(0,[new _c(ot(r.fields[0].fields[0].Accounts,s.fields[0].Accounts),s.fields[0].Token)])])):(o=a,o.tag===1?new me(2,[new g(1,[o.fields[0]])]):new me(3,[new Error("Failed to retrieve the account data")])):(i=a,i.tag===1?new me(2,[new g(1,[i.fields[0]])]):new me(3,[new Error("Failed to retrieve the account data")]))),n.SearchText,n.Sort,n.PageSize),Oe()]}case 4:return[new jr(new me(1,[]),n.SearchText,n.Sort,n.PageSize),Xe(a=>{const l=new sa(n.SearchText,n.Sort,n.PageSize);Or(uf(e)(l)(a))})];default:return[new jr(n.Data,mg(t.fields[0]),n.Sort,n.PageSize),Oe()]}}function df(e,t,n,r){let s,o;return p("div",P(k([["className",oe(" ",["flex-grow","max-w-md"])],(s=[p("label",{for:"search",children:"Search",className:oe(" ",["block","text-sm","font-medium","text-gray-700"])}),p("div",P(k([["className","mt-1"],(o=[p("input",{id:"search",name:"search",type:"text",className:oe(" ",["py-2","shadow-sm","focus:ring-indigo-500","focus:border-indigo-500","block","w-full","sm:text-sm","border-gray-300","rounded-md"]),placeholder:t,value:e,onKeyUp:i=>{i.key==="Enter"&&r()},onChange:i=>{n(i.target.value)}})],["children",E.Children.toArray(Array.from(o))])])))],["children",E.Children.toArray(Array.from(s))])])))}function ey(e){let t,n;return p("div",P(k([["className","pt-6"],(t=[p("div",P(k([["className",oe(" ",["flex","justify-end"])],(n=[p("button",{type:"search",children:"Search",className:oe(" ",["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",E.Children.toArray(Array.from(n))])])))],["children",E.Children.toArray(Array.from(t))])])))}function ff(e){return["fillRule",e]}function hf(e){return["clipRule",e]}const ty=p("svg",P(k([["className","w-6 h-6"],["fill","none"],["stroke","currentColor"],["strokeWidth",1.5],["viewBox","0 0 24 24"],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e;const t=ne(p("path",P(k([["strokeLinecap","round"],["strokeLinejoin","round"],(e="M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L6.832 19.82a4.5 4.5 0 01-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 011.13-1.897L16.863 4.487zm0 0L19.5 7.125",["d",e])]))));return["children",E.Children.toArray(Array.from(t))]})()]))),ny=p("svg",P(k([["className",oe(" ",["h-5","w-5"])],["fill","currentColor"],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e;const t=ne(p("path",P(k([(e="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",["d",e]),ff("evenodd"),hf("evenodd")]))));return["children",E.Children.toArray(Array.from(t))]})()]))),ry=p("svg",P(k([["className",oe(" ",["h-5","w-5"])],["fill","currentColor"],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e;const t=ne(p("path",P(k([(e="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",["d",e]),ff("evenodd"),hf("evenodd")]))));return["children",E.Children.toArray(Array.from(t))]})()]))),mf=p("svg",P(k([["className","size-6"],["fill","none"],["stroke","currentColor"],["strokeWidth",1.5],["viewBox","0 0 24 24"],["xmlns","http://www.w3.org/2000/svg"],(()=>{const e=ne(p("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}));return["children",E.Children.toArray(Array.from(e))]})()]))),sy=p("svg",P(k([["className",oe(" ",["h-5","w-5"])],["fill","none"],["stroke","currentColor"],["strokeWidth",1.5],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],(()=>{const e=ne(p("path",{d:"M10 5V10M10 10V15M10 10H15M10 10L5 10",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}));return["children",E.Children.toArray(Array.from(e))]})()])));function ba(e){const t=e.child,n=e.onClose;return vu(()=>{const r=s=>{s.key==="Escape"&&n()};return window.addEventListener("keydown",r),{Dispose(){window.removeEventListener("keydown",r)}}},[]),t}class oy{constructor(t,n){this.accessToken=n,this.adminUrl=`${t}/account-registry/admin`}QueryAnzsic(t){const n=this;return O0(U.Delay(()=>U.Bind(pf(n,ir(`${n.adminUrl}/anzsic?maxRecordCount=15&search=${t}`)),r=>{const s=nr(be(rr(V$(),new Gt(1,[]))),r.responseText);return U.Return(s.tag===1?new Array(0):s.fields[0].tag===0?s.fields[0].fields[0]:new Array(0))})))}CreateAccount(t,n,r,s){const o=this;return U.Delay(()=>{let i,a;const l=pf(o,Yd(new $a(1,[(i=new xc(n.AccountName,n.WebsiteUrl,new mc(r.FirstName,r.LastName,r.Email,r.MobilePhone),void 0,new vc(n.LegalEntityName,n.Abn,s.Line1,Js(s.Line2)?void 0:s.Line2,s.City,s.Postcode,s.State,r.MobilePhone,"AU"),void 0,void 0,new wc(n.SalesforceParentRecordId,void 0),new yc(n.Industry.ClassCode,n.Industry.ClassTitle)),ef(0,nf(B$(),new Gt(1,[]),void 0,void 0)(i)))]),zr(new sr(1,[]),ir(`${o.adminUrl}/partners/${to(t)}/accounts`))));return a=U.Bind(l,c=>U.Return(new g(0,[c]))),U.Bind(a,c=>{const d=c;if(d.tag===1)return U.Return(new g(1,[d.fields[0]]));{let u;const h=nr(be(rr(z$(),new Gt(1,[]))),d.fields[0].responseText);return u=h.tag===1?new g(1,[void 0]):new g(0,[h.fields[0].Id]),U.Return(u)}})})}}function iy(e,t){return new oy(e,t)}function pf(e,t){return Xd(ga(Zd(`Bearer ${e.accessToken}`),t))}let ay=class extends ee{constructor(t,n,r){super(),this.Name=t,this.BusinessName=n,this.BusinessNumber=r}};class lr extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["AccountDetailsForm","PrimaryContactForm","BusinessAddressForm"]}}let Jt=class extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["NextForm","PreviousForm","SetAccountDetailsForm","SetPrimaryContactForm","SetBusinessAddressForm","StartAccountCreation","FinishAccountCreation"]}},Dn=class extends ee{constructor(t,n,r,s,o){super(),this.AccountDetailsForm=t,this.PrimaryContactForm=n,this.BusinessAddressForm=r,this.CurrentView=s,this.AccountCreation=o}};function ly(e){const t=e.AccountCreation;let n;switch(t.tag){case 2:{t.fields[0].tag===1?n=1:n=0;break}case 3:{n=1;break}default:n=0}switch(n){case 0:return!1;default:return!0}}function cy(e){switch(e.AccountCreation.tag){case 0:case 2:case 3:return!1;default:return!0}}const uy=[new Dn({},{},{},new lr(0,[]),new me(0,[])),Oe()];function dy(e,t,n,r){let s,o;switch(n.tag){case 1:return[new Dn(r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm,(s=r.CurrentView,s.tag===1?new lr(0,[]):s.tag===2?new lr(1,[]):new lr(0,[])),r.AccountCreation),Oe()];case 2:return[new Dn(n.fields[0],r.PrimaryContactForm,r.BusinessAddressForm,r.CurrentView,r.AccountCreation),Oe()];case 3:return[new Dn(r.AccountDetailsForm,n.fields[0],r.BusinessAddressForm,r.CurrentView,r.AccountCreation),Oe()];case 4:return[new Dn(r.AccountDetailsForm,r.PrimaryContactForm,n.fields[0],r.CurrentView,r.AccountCreation),Oe()];case 5:{const i=r.AccountCreation;let a;switch(i.tag){case 0:case 3:{a=1;break}case 2:{i.fields[0].tag===1?a=1:a=0;break}default:a=0}switch(a){case 0:return[r,Oe()];default:return[new Dn(r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm,r.CurrentView,new me(1,[])),Gu(l=>{qu(l)},l=>t.CreateAccount(l[0],l[1],l[2],l[3]),[e,r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm],l=>new Jt(6,[l]))]}}case 6:{const i=n.fields[0];return[new Dn(r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm,r.CurrentView,new me(2,[i])),i.tag===1?Oe():aa(new J(15,[e,jt(i.fields[0])]))]}default:return[new Dn(r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm,(o=r.CurrentView,o.tag===1?new lr(2,[]):o.tag===2?new lr(2,[]):new lr(1,[])),r.AccountCreation),Oe()]}}var fy=0;function T(e,t,n,r,s,o){t||(t={});var i,a,l=t;if("ref"in l)for(a in l={},t)a=="ref"?i=t[a]:l[a]=t[a];var c={type:e,props:l,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--fy,__i:-1,__u:0,__source:s,__self:o};if(typeof e=="function"&&(i=e.defaultProps))for(a in i)l[a]===void 0&&(l[a]=i[a]);return re.vnode&&re.vnode(c),c}var Cs=e=>e.type==="checkbox",cr=e=>e instanceof Date,xt=e=>e==null;const $f=e=>typeof e=="object";var ze=e=>!xt(e)&&!Array.isArray(e)&&$f(e)&&!cr(e),gf=e=>ze(e)&&e.target?Cs(e.target)?e.target.checked:e.target.value:e,hy=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,wf=(e,t)=>e.has(hy(t)),my=e=>{const t=e.constructor&&e.constructor.prototype;return ze(t)&&t.hasOwnProperty("isPrototypeOf")},_a=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ct(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(_a&&(e instanceof Blob||r))&&(n||ze(e)))if(t=n?[]:{},!n&&!my(e))t=e;else for(const s in e)e.hasOwnProperty(s)&&(t[s]=Ct(e[s]));else return e;return t}var vo=e=>Array.isArray(e)?e.filter(Boolean):[],je=e=>e===void 0,V=(e,t,n)=>{if(!t||!ze(e))return n;const r=vo(t.split(/[,[\].]+?/)).reduce((s,o)=>xt(s)?s:s[o],e);return je(r)||r===e?je(e[t])?n:e[t]:r},Lt=e=>typeof e=="boolean",va=e=>/^\w*$/.test(e),yf=e=>vo(e.replace(/["|']|\]/g,"").split(/\.|\[/)),ke=(e,t,n)=>{let r=-1;const s=va(t)?[t]:yf(t),o=s.length,i=o-1;for(;++r<o;){const a=s[r];let l=n;if(r!==i){const c=e[a];l=ze(c)||Array.isArray(c)?c:isNaN(+s[r+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;e[a]=l,e=e[a]}return e};const xo={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Yt={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},xn={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},py=q.createContext(null),xa=()=>q.useContext(py);var bf=(e,t,n,r=!0)=>{const s={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(s,o,{get:()=>{const i=o;return t._proxyFormState[i]!==Yt.all&&(t._proxyFormState[i]=!r||Yt.all),n&&(n[i]=!0),e[i]}});return s},St=e=>ze(e)&&!Object.keys(e).length,_f=(e,t,n,r)=>{n(e);const{name:s,...o}=e;return St(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(i=>t[i]===(!r||Yt.all))},Ss=e=>Array.isArray(e)?e:[e],vf=(e,t,n)=>!e||!t||e===t||Ss(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function Ca(e){const t=q.useRef(e);t.current=e,q.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function $y(e){const t=xa(),{control:n=t.control,disabled:r,name:s,exact:o}=e||{},[i,a]=q.useState(n._formState),l=q.useRef(!0),c=q.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=q.useRef(s);return d.current=s,Ca({disabled:r,next:u=>l.current&&vf(d.current,u.name,o)&&_f(u,c.current,n._updateFormState)&&a({...n._formState,...u}),subject:n._subjects.state}),q.useEffect(()=>(l.current=!0,c.current.isValid&&n._updateValid(!0),()=>{l.current=!1}),[n]),q.useMemo(()=>bf(i,n,c.current,!1),[i,n])}var sn=e=>typeof e=="string",xf=(e,t,n,r,s)=>sn(e)?(r&&t.watch.add(e),V(n,e,s)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),V(n,o))):(r&&(t.watchAll=!0),n);function gy(e){const t=xa(),{control:n=t.control,name:r,defaultValue:s,disabled:o,exact:i}=e||{},a=q.useRef(r);a.current=r,Ca({disabled:o,subject:n._subjects.values,next:d=>{vf(a.current,d.name,i)&&c(Ct(xf(a.current,n._names,d.values||n._formValues,!1,s)))}});const[l,c]=q.useState(n._getWatch(r,s));return q.useEffect(()=>n._removeUnmounted()),l}function Cf(e){const t=xa(),{name:n,disabled:r,control:s=t.control,shouldUnregister:o}=e,i=wf(s._names.array,n),a=gy({control:s,name:n,defaultValue:V(s._formValues,n,V(s._defaultValues,n,e.defaultValue)),exact:!0}),l=$y({control:s,name:n,exact:!0}),c=q.useRef(s.register(n,{...e.rules,value:a,...Lt(e.disabled)?{disabled:e.disabled}:{}})),d=q.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!V(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!V(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!V(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!V(l.validatingFields,n)},error:{enumerable:!0,get:()=>V(l.errors,n)}}),[l,n]),u=q.useMemo(()=>({name:n,value:a,...Lt(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:h=>c.current.onChange({target:{value:gf(h),name:n},type:xo.CHANGE}),onBlur:()=>c.current.onBlur({target:{value:V(s._formValues,n),name:n},type:xo.BLUR}),ref:h=>{const f=V(s._fields,n);f&&h&&(f._f.ref={focus:()=>h.focus(),select:()=>h.select(),setCustomValidity:m=>h.setCustomValidity(m),reportValidity:()=>h.reportValidity()})}}),[n,s._formValues,r,l.disabled,a,s._fields]);return q.useEffect(()=>{const h=s._options.shouldUnregister||o,f=(m,w)=>{const $=V(s._fields,m);$&&$._f&&($._f.mount=w)};if(f(n,!0),h){const m=Ct(V(s._options.defaultValues,n));ke(s._defaultValues,n,m),je(V(s._formValues,n))&&ke(s._formValues,n,m)}return!i&&s.register(n),()=>{(i?h&&!s._state.action:h)?s.unregister(n):f(n,!1)}},[n,s,i,o]),q.useEffect(()=>{s._updateDisabledField({disabled:r,fields:s._fields,name:n})},[r,n,s]),q.useMemo(()=>({field:u,formState:l,fieldState:d}),[u,l,d])}var wy=(e,t,n,r,s)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:s||!0}}:{},Sf=e=>({isOnSubmit:!e||e===Yt.onSubmit,isOnBlur:e===Yt.onBlur,isOnChange:e===Yt.onChange,isOnAll:e===Yt.all,isOnTouch:e===Yt.onTouched}),kf=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const ks=(e,t,n,r)=>{for(const s of n||Object.keys(e)){const o=V(e,s);if(o){const{_f:i,...a}=o;if(i){if(i.refs&&i.refs[0]&&t(i.refs[0],s)&&!r)return!0;if(i.ref&&t(i.ref,i.name)&&!r)return!0;if(ks(a,t))break}else if(ze(a)&&ks(a,t))break}}};var yy=(e,t,n)=>{const r=Ss(V(e,n));return ke(r,"root",t[n]),ke(e,n,r),e},Sa=e=>e.type==="file",on=e=>typeof e=="function",Co=e=>{if(!_a)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},So=e=>sn(e),ka=e=>e.type==="radio",ko=e=>e instanceof RegExp;const Af={value:!1,isValid:!1},Ef={value:!0,isValid:!0};var If=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!je(e[0].attributes.value)?je(e[0].value)||e[0].value===""?Ef:{value:e[0].value,isValid:!0}:Ef:Af}return Af};const Tf={isValid:!1,value:null};var Nf=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,Tf):Tf;function Mf(e,t,n="validate"){if(So(e)||Array.isArray(e)&&e.every(So)||Lt(e)&&!e)return{type:n,message:So(e)?e:"",ref:t}}var Hr=e=>ze(e)&&!ko(e)?e:{value:e,message:""},Rf=async(e,t,n,r,s,o)=>{const{ref:i,refs:a,required:l,maxLength:c,minLength:d,min:u,max:h,pattern:f,validate:m,name:w,valueAsNumber:$,mount:v}=e._f,_=V(n,w);if(!v||t.has(w))return{};const C=a?a[0]:i,R=G=>{s&&C.reportValidity&&(C.setCustomValidity(Lt(G)?"":G||""),C.reportValidity())},D={},Y=ka(i),de=Cs(i),ve=Y||de,fe=($||Sa(i))&&je(i.value)&&je(_)||Co(i)&&i.value===""||_===""||Array.isArray(_)&&!_.length,X=wy.bind(null,w,r,D),ue=(G,te,Me,N=xn.maxLength,xe=xn.minLength)=>{const le=G?te:Me;D[w]={type:G?N:xe,message:le,ref:i,...X(G?N:xe,le)}};if(o?!Array.isArray(_)||!_.length:l&&(!ve&&(fe||xt(_))||Lt(_)&&!_||de&&!If(a).isValid||Y&&!Nf(a).isValid)){const{value:G,message:te}=So(l)?{value:!!l,message:l}:Hr(l);if(G&&(D[w]={type:xn.required,message:te,ref:C,...X(xn.required,te)},!r))return R(te),D}if(!fe&&(!xt(u)||!xt(h))){let G,te;const Me=Hr(h),N=Hr(u);if(!xt(_)&&!isNaN(_)){const xe=i.valueAsNumber||_&&+_;xt(Me.value)||(G=xe>Me.value),xt(N.value)||(te=xe<N.value)}else{const xe=i.valueAsDate||new Date(_),le=Le=>new Date(new Date().toDateString()+" "+Le),Ye=i.type=="time",Ae=i.type=="week";sn(Me.value)&&_&&(G=Ye?le(_)>le(Me.value):Ae?_>Me.value:xe>new Date(Me.value)),sn(N.value)&&_&&(te=Ye?le(_)<le(N.value):Ae?_<N.value:xe<new Date(N.value))}if((G||te)&&(ue(!!G,Me.message,N.message,xn.max,xn.min),!r))return R(D[w].message),D}if((c||d)&&!fe&&(sn(_)||o&&Array.isArray(_))){const G=Hr(c),te=Hr(d),Me=!xt(G.value)&&_.length>+G.value,N=!xt(te.value)&&_.length<+te.value;if((Me||N)&&(ue(Me,G.message,te.message),!r))return R(D[w].message),D}if(f&&!fe&&sn(_)){const{value:G,message:te}=Hr(f);if(ko(G)&&!_.match(G)&&(D[w]={type:xn.pattern,message:te,ref:i,...X(xn.pattern,te)},!r))return R(te),D}if(m){if(on(m)){const G=await m(_,n),te=Mf(G,C);if(te&&(D[w]={...te,...X(xn.validate,te.message)},!r))return R(te.message),D}else if(ze(m)){let G={};for(const te in m){if(!St(G)&&!r)break;const Me=Mf(await m[te](_,n),C,te);Me&&(G={...Me,...X(te,Me.message)},R(Me.message),r&&(D[w]=G))}if(!St(G)&&(D[w]={ref:C,...G},!r))return D}}return R(!0),D};function by(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=je(e)?r++:e[t[r++]];return e}function _y(e){for(const t in e)if(e.hasOwnProperty(t)&&!je(e[t]))return!1;return!0}function Ke(e,t){const n=Array.isArray(t)?t:va(t)?[t]:yf(t),r=n.length===1?e:by(e,n),s=n.length-1,o=n[s];return r&&delete r[o],s!==0&&(ze(r)&&St(r)||Array.isArray(r)&&_y(r))&&Ke(e,n.slice(0,-1)),e}var Aa=()=>{let e=[];return{get observers(){return e},next:s=>{for(const o of e)o.next&&o.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(o=>o!==s)}}),unsubscribe:()=>{e=[]}}},Ea=e=>xt(e)||!$f(e);function Fn(e,t){if(Ea(e)||Ea(t))return e===t;if(cr(e)&&cr(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const s of n){const o=e[s];if(!r.includes(s))return!1;if(s!=="ref"){const i=t[s];if(cr(o)&&cr(i)||ze(o)&&ze(i)||Array.isArray(o)&&Array.isArray(i)?!Fn(o,i):o!==i)return!1}}return!0}var Pf=e=>e.type==="select-multiple",vy=e=>ka(e)||Cs(e),Ia=e=>Co(e)&&e.isConnected,Of=e=>{for(const t in e)if(on(e[t]))return!0;return!1};function Ao(e,t={}){const n=Array.isArray(e);if(ze(e)||n)for(const r in e)Array.isArray(e[r])||ze(e[r])&&!Of(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Ao(e[r],t[r])):xt(e[r])||(t[r]=!0);return t}function Df(e,t,n){const r=Array.isArray(e);if(ze(e)||r)for(const s in e)Array.isArray(e[s])||ze(e[s])&&!Of(e[s])?je(t)||Ea(n[s])?n[s]=Array.isArray(e[s])?Ao(e[s],[]):{...Ao(e[s])}:Df(e[s],xt(t)?{}:t[s],n[s]):n[s]=!Fn(e[s],t[s]);return n}var As=(e,t)=>Df(e,t,Ao(t)),Ff=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>je(e)?e:t?e===""?NaN:e&&+e:n&&sn(e)?new Date(e):r?r(e):e;function Ta(e){const t=e.ref;return Sa(t)?t.files:ka(t)?Nf(e.refs).value:Pf(t)?[...t.selectedOptions].map(({value:n})=>n):Cs(t)?If(e.refs).value:Ff(je(t.value)?e.ref.value:t.value,e)}var xy=(e,t,n,r)=>{const s={};for(const o of e){const i=V(t,o);i&&ke(s,o,i._f)}return{criteriaMode:n,names:[...e],fields:s,shouldUseNativeValidation:r}},Es=e=>je(e)?e:ko(e)?e.source:ze(e)?ko(e.value)?e.value.source:e.value:e;const Vf="AsyncFunction";var Cy=e=>!!e&&!!e.validate&&!!(on(e.validate)&&e.validate.constructor.name===Vf||ze(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Vf)),Sy=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Lf(e,t,n){const r=V(e,n);if(r||va(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const o=s.join("."),i=V(t,o),a=V(e,o);if(i&&!Array.isArray(i)&&n!==o)return{name:n};if(a&&a.type)return{name:o,error:a};s.pop()}return{name:n}}var ky=(e,t,n,r,s)=>s.isOnAll?!1:!n&&s.isOnTouch?!(t||e):(n?r.isOnBlur:s.isOnBlur)?!e:(n?r.isOnChange:s.isOnChange)?e:!0,Ay=(e,t)=>!vo(V(e,t)).length&&Ke(e,t);const Ey={mode:Yt.onSubmit,reValidateMode:Yt.onChange,shouldFocusError:!0};function Iy(e={}){let t={...Ey,...e},n={submitCount:0,isDirty:!1,isLoading:on(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},s=ze(t.defaultValues)||ze(t.values)?Ct(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:Ct(s),i={action:!1,mount:!1,watch:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,c=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},u={values:Aa(),array:Aa(),state:Aa()},h=Sf(t.mode),f=Sf(t.reValidateMode),m=t.criteriaMode===Yt.all,w=y=>x=>{clearTimeout(c),c=setTimeout(y,x)},$=async y=>{if(!t.disabled&&(d.isValid||y)){const x=t.resolver?St((await ve()).errors):await X(r,!0);x!==n.isValid&&u.state.next({isValid:x})}},v=(y,x)=>{!t.disabled&&(d.isValidating||d.validatingFields)&&((y||Array.from(a.mount)).forEach(S=>{S&&(x?ke(n.validatingFields,S,x):Ke(n.validatingFields,S))}),u.state.next({validatingFields:n.validatingFields,isValidating:!St(n.validatingFields)}))},_=(y,x=[],S,z,L=!0,O=!0)=>{if(z&&S&&!t.disabled){if(i.action=!0,O&&Array.isArray(V(r,y))){const Z=S(V(r,y),z.argA,z.argB);L&&ke(r,y,Z)}if(O&&Array.isArray(V(n.errors,y))){const Z=S(V(n.errors,y),z.argA,z.argB);L&&ke(n.errors,y,Z),Ay(n.errors,y)}if(d.touchedFields&&O&&Array.isArray(V(n.touchedFields,y))){const Z=S(V(n.touchedFields,y),z.argA,z.argB);L&&ke(n.touchedFields,y,Z)}d.dirtyFields&&(n.dirtyFields=As(s,o)),u.state.next({name:y,isDirty:G(y,x),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else ke(o,y,x)},C=(y,x)=>{ke(n.errors,y,x),u.state.next({errors:n.errors})},R=y=>{n.errors=y,u.state.next({errors:n.errors,isValid:!1})},D=(y,x,S,z)=>{const L=V(r,y);if(L){const O=V(o,y,je(S)?V(s,y):S);je(O)||z&&z.defaultChecked||x?ke(o,y,x?O:Ta(L._f)):N(y,O),i.mount&&$()}},Y=(y,x,S,z,L)=>{let O=!1,Z=!1;const ae={name:y};if(!t.disabled){const et=!!(V(r,y)&&V(r,y)._f&&V(r,y)._f.disabled);if(!S||z){d.isDirty&&(Z=n.isDirty,n.isDirty=ae.isDirty=G(),O=Z!==ae.isDirty);const tt=et||Fn(V(s,y),x);Z=!!(!et&&V(n.dirtyFields,y)),tt||et?Ke(n.dirtyFields,y):ke(n.dirtyFields,y,!0),ae.dirtyFields=n.dirtyFields,O=O||d.dirtyFields&&Z!==!tt}if(S){const tt=V(n.touchedFields,y);tt||(ke(n.touchedFields,y,S),ae.touchedFields=n.touchedFields,O=O||d.touchedFields&&tt!==S)}O&&L&&u.state.next(ae)}return O?ae:{}},de=(y,x,S,z)=>{const L=V(n.errors,y),O=d.isValid&&Lt(x)&&n.isValid!==x;if(t.delayError&&S?(l=w(()=>C(y,S)),l(t.delayError)):(clearTimeout(c),l=null,S?ke(n.errors,y,S):Ke(n.errors,y)),(S?!Fn(L,S):L)||!St(z)||O){const Z={...z,...O&&Lt(x)?{isValid:x}:{},errors:n.errors,name:y};n={...n,...Z},u.state.next(Z)}},ve=async y=>{v(y,!0);const x=await t.resolver(o,t.context,xy(y||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return v(y),x},fe=async y=>{const{errors:x}=await ve(y);if(y)for(const S of y){const z=V(x,S);z?ke(n.errors,S,z):Ke(n.errors,S)}else n.errors=x;return x},X=async(y,x,S={valid:!0})=>{for(const z in y){const L=y[z];if(L){const{_f:O,...Z}=L;if(O){const ae=a.array.has(O.name),et=L._f&&Cy(L._f);et&&d.validatingFields&&v([z],!0);const tt=await Rf(L,a.disabled,o,m,t.shouldUseNativeValidation&&!x,ae);if(et&&d.validatingFields&&v([z]),tt[O.name]&&(S.valid=!1,x))break;!x&&(V(tt,O.name)?ae?yy(n.errors,tt,O.name):ke(n.errors,O.name,tt[O.name]):Ke(n.errors,O.name))}!St(Z)&&await X(Z,x,S)}}return S.valid},ue=()=>{for(const y of a.unMount){const x=V(r,y);x&&(x._f.refs?x._f.refs.every(S=>!Ia(S)):!Ia(x._f.ref))&&Os(y)}a.unMount=new Set},G=(y,x)=>!t.disabled&&(y&&x&&ke(o,y,x),!Fn(kt(),s)),te=(y,x,S)=>xf(y,a,{...i.mount?o:je(x)?s:sn(y)?{[y]:x}:x},S,x),Me=y=>vo(V(i.mount?o:s,y,t.shouldUnregister?V(s,y,[]):[])),N=(y,x,S={})=>{const z=V(r,y);let L=x;if(z){const O=z._f;O&&(!O.disabled&&ke(o,y,Ff(x,O)),L=Co(O.ref)&&xt(x)?"":x,Pf(O.ref)?[...O.ref.options].forEach(Z=>Z.selected=L.includes(Z.value)):O.refs?Cs(O.ref)?O.refs.length>1?O.refs.forEach(Z=>(!Z.defaultChecked||!Z.disabled)&&(Z.checked=Array.isArray(L)?!!L.find(ae=>ae===Z.value):L===Z.value)):O.refs[0]&&(O.refs[0].checked=!!L):O.refs.forEach(Z=>Z.checked=Z.value===L):Sa(O.ref)?O.ref.value="":(O.ref.value=L,O.ref.type||u.values.next({name:y,values:{...o}})))}(S.shouldDirty||S.shouldTouch)&&Y(y,L,S.shouldTouch,S.shouldDirty,!0),S.shouldValidate&&Le(y)},xe=(y,x,S)=>{for(const z in x){const L=x[z],O=`${y}.${z}`,Z=V(r,O);(a.array.has(y)||ze(L)||Z&&!Z._f)&&!cr(L)?xe(O,L,S):N(O,L,S)}},le=(y,x,S={})=>{const z=V(r,y),L=a.array.has(y),O=Ct(x);ke(o,y,O),L?(u.array.next({name:y,values:{...o}}),(d.isDirty||d.dirtyFields)&&S.shouldDirty&&u.state.next({name:y,dirtyFields:As(s,o),isDirty:G(y,O)})):z&&!z._f&&!xt(O)?xe(y,O,S):N(y,O,S),kf(y,a)&&u.state.next({...n}),u.values.next({name:i.mount?y:void 0,values:{...o}})},Ye=async y=>{i.mount=!0;const x=y.target;let S=x.name,z=!0;const L=V(r,S),O=()=>x.type?Ta(L._f):gf(y),Z=ae=>{z=Number.isNaN(ae)||cr(ae)&&isNaN(ae.getTime())||Fn(ae,V(o,S,ae))};if(L){let ae,et;const tt=O(),jn=y.type===xo.BLUR||y.type===xo.FOCUS_OUT,Mv=!Sy(L._f)&&!t.resolver&&!V(n.errors,S)&&!L._f.deps||ky(jn,V(n.touchedFields,S),n.isSubmitted,f,h),Ja=kf(S,a,jn);ke(o,S,tt),jn?(L._f.onBlur&&L._f.onBlur(y),l&&l(0)):L._f.onChange&&L._f.onChange(y);const Ya=Y(S,tt,jn,!1),Rv=!St(Ya)||Ja;if(!jn&&u.values.next({name:S,type:y.type,values:{...o}}),Mv)return d.isValid&&(t.mode==="onBlur"&&jn?$():jn||$()),Rv&&u.state.next({name:S,...Ja?{}:Ya});if(!jn&&Ja&&u.state.next({...n}),t.resolver){const{errors:xh}=await ve([S]);if(Z(tt),z){const Pv=Lf(n.errors,r,S),Ch=Lf(xh,r,Pv.name||S);ae=Ch.error,S=Ch.name,et=St(xh)}}else v([S],!0),ae=(await Rf(L,a.disabled,o,m,t.shouldUseNativeValidation))[S],v([S]),Z(tt),z&&(ae?et=!1:d.isValid&&(et=await X(r,!0)));z&&(L._f.deps&&Le(L._f.deps),de(S,et,ae,Ya))}},Ae=(y,x)=>{if(V(n.errors,x)&&y.focus)return y.focus(),1},Le=async(y,x={})=>{let S,z;const L=Ss(y);if(t.resolver){const O=await fe(je(y)?y:L);S=St(O),z=y?!L.some(Z=>V(O,Z)):S}else y?(z=(await Promise.all(L.map(async O=>{const Z=V(r,O);return await X(Z&&Z._f?{[O]:Z}:Z)}))).every(Boolean),!(!z&&!n.isValid)&&$()):z=S=await X(r);return u.state.next({...!sn(y)||d.isValid&&S!==n.isValid?{}:{name:y},...t.resolver||!y?{isValid:S}:{},errors:n.errors}),x.shouldFocus&&!z&&ks(r,Ae,y?L:a.mount),z},kt=y=>{const x={...i.mount?o:s};return je(y)?x:sn(y)?V(x,y):y.map(S=>V(x,S))},Xt=(y,x)=>({invalid:!!V((x||n).errors,y),isDirty:!!V((x||n).dirtyFields,y),error:V((x||n).errors,y),isValidating:!!V(n.validatingFields,y),isTouched:!!V((x||n).touchedFields,y)}),gr=y=>{y&&Ss(y).forEach(x=>Ke(n.errors,x)),u.state.next({errors:y?n.errors:{}})},Ft=(y,x,S)=>{const z=(V(r,y,{_f:{}})._f||{}).ref,L=V(n.errors,y)||{},{ref:O,message:Z,type:ae,...et}=L;ke(n.errors,y,{...et,...x,ref:z}),u.state.next({name:y,errors:n.errors,isValid:!1}),S&&S.shouldFocus&&z&&z.focus&&z.focus()},Ps=(y,x)=>on(y)?u.values.subscribe({next:S=>y(te(void 0,x),S)}):te(y,x,!0),Os=(y,x={})=>{for(const S of y?Ss(y):a.mount)a.mount.delete(S),a.array.delete(S),x.keepValue||(Ke(r,S),Ke(o,S)),!x.keepError&&Ke(n.errors,S),!x.keepDirty&&Ke(n.dirtyFields,S),!x.keepTouched&&Ke(n.touchedFields,S),!x.keepIsValidating&&Ke(n.validatingFields,S),!t.shouldUnregister&&!x.keepDefaultValue&&Ke(s,S);u.values.next({values:{...o}}),u.state.next({...n,...x.keepDirty?{isDirty:G()}:{}}),!x.keepIsValid&&$()},wr=({disabled:y,name:x,field:S,fields:z})=>{(Lt(y)&&i.mount||y||a.disabled.has(x))&&(y?a.disabled.add(x):a.disabled.delete(x),Y(x,Ta(S?S._f:V(z,x)._f),!1,!1,!0))},Ds=(y,x={})=>{let S=V(r,y);const z=Lt(x.disabled)||Lt(t.disabled);return ke(r,y,{...S||{},_f:{...S&&S._f?S._f:{ref:{name:y}},name:y,mount:!0,...x}}),a.mount.add(y),S?wr({field:S,disabled:Lt(x.disabled)?x.disabled:t.disabled,name:y}):D(y,!0,x.value),{...z?{disabled:x.disabled||t.disabled}:{},...t.progressive?{required:!!x.required,min:Es(x.min),max:Es(x.max),minLength:Es(x.minLength),maxLength:Es(x.maxLength),pattern:Es(x.pattern)}:{},name:y,onChange:Ye,onBlur:Ye,ref:L=>{if(L){Ds(y,x),S=V(r,y);const O=je(L.value)&&L.querySelectorAll&&L.querySelectorAll("input,select,textarea")[0]||L,Z=vy(O),ae=S._f.refs||[];if(Z?ae.find(et=>et===O):O===S._f.ref)return;ke(r,y,{_f:{...S._f,...Z?{refs:[...ae.filter(Ia),O,...Array.isArray(V(s,y))?[{}]:[]],ref:{type:O.type,name:y}}:{ref:O}}}),D(y,!1,void 0,O)}else S=V(r,y,{}),S._f&&(S._f.mount=!1),(t.shouldUnregister||x.shouldUnregister)&&!(wf(a.array,y)&&i.action)&&a.unMount.add(y)}}},se=()=>t.shouldFocusError&&ks(r,Ae,a.mount),Ee=y=>{Lt(y)&&(u.state.next({disabled:y}),ks(r,(x,S)=>{const z=V(r,S);z&&(x.disabled=z._f.disabled||y,Array.isArray(z._f.refs)&&z._f.refs.forEach(L=>{L.disabled=z._f.disabled||y}))},0,!1))},mt=(y,x)=>async S=>{let z;S&&(S.preventDefault&&S.preventDefault(),S.persist&&S.persist());let L=Ct(o);if(a.disabled.size)for(const O of a.disabled)ke(L,O,void 0);if(u.state.next({isSubmitting:!0}),t.resolver){const{errors:O,values:Z}=await ve();n.errors=O,L=Z}else await X(r);if(Ke(n.errors,"root"),St(n.errors)){u.state.next({errors:{}});try{await y(L,S)}catch(O){z=O}}else x&&await x({...n.errors},S),se(),setTimeout(se);if(u.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:St(n.errors)&&!z,submitCount:n.submitCount+1,errors:n.errors}),z)throw z},Zr=(y,x={})=>{V(r,y)&&(je(x.defaultValue)?le(y,Ct(V(s,y))):(le(y,x.defaultValue),ke(s,y,Ct(x.defaultValue))),x.keepTouched||Ke(n.touchedFields,y),x.keepDirty||(Ke(n.dirtyFields,y),n.isDirty=x.defaultValue?G(y,Ct(V(s,y))):G()),x.keepError||(Ke(n.errors,y),d.isValid&&$()),u.state.next({...n}))},Fs=(y,x={})=>{const S=y?Ct(y):s,z=Ct(S),L=St(y),O=L?s:z;if(x.keepDefaultValues||(s=S),!x.keepValues){if(x.keepDirtyValues){const Z=new Set([...a.mount,...Object.keys(As(s,o))]);for(const ae of Array.from(Z))V(n.dirtyFields,ae)?ke(O,ae,V(o,ae)):le(ae,V(O,ae))}else{if(_a&&je(y))for(const Z of a.mount){const ae=V(r,Z);if(ae&&ae._f){const et=Array.isArray(ae._f.refs)?ae._f.refs[0]:ae._f.ref;if(Co(et)){const tt=et.closest("form");if(tt){tt.reset();break}}}}r={}}o=t.shouldUnregister?x.keepDefaultValues?Ct(s):{}:Ct(O),u.array.next({values:{...O}}),u.values.next({values:{...O}})}a={mount:x.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!d.isValid||!!x.keepIsValid||!!x.keepDirtyValues,i.watch=!!t.shouldUnregister,u.state.next({submitCount:x.keepSubmitCount?n.submitCount:0,isDirty:L?!1:x.keepDirty?n.isDirty:!!(x.keepDefaultValues&&!Fn(y,s)),isSubmitted:x.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:L?{}:x.keepDirtyValues?x.keepDefaultValues&&o?As(s,o):n.dirtyFields:x.keepDefaultValues&&y?As(s,y):x.keepDirty?n.dirtyFields:{},touchedFields:x.keepTouched?n.touchedFields:{},errors:x.keepErrors?n.errors:{},isSubmitSuccessful:x.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},vh=(y,x)=>Fs(on(y)?y(o):y,x);return{control:{register:Ds,unregister:Os,getFieldState:Xt,handleSubmit:mt,setError:Ft,_executeSchema:ve,_getWatch:te,_getDirty:G,_updateValid:$,_removeUnmounted:ue,_updateFieldArray:_,_updateDisabledField:wr,_getFieldArray:Me,_reset:Fs,_resetDefaultValues:()=>on(t.defaultValues)&&t.defaultValues().then(y=>{vh(y,t.resetOptions),u.state.next({isLoading:!1})}),_updateFormState:y=>{n={...n,...y}},_disableForm:Ee,_subjects:u,_proxyFormState:d,_setErrors:R,get _fields(){return r},get _formValues(){return o},get _state(){return i},set _state(y){i=y},get _defaultValues(){return s},get _names(){return a},set _names(y){a=y},get _formState(){return n},set _formState(y){n=y},get _options(){return t},set _options(y){t={...t,...y}}},trigger:Le,register:Ds,handleSubmit:mt,watch:Ps,setValue:le,getValues:kt,reset:vh,resetField:Zr,clearErrors:gr,unregister:Os,setError:Ft,setFocus:(y,x={})=>{const S=V(r,y),z=S&&S._f;if(z){const L=z.refs?z.refs[0]:z.ref;L.focus&&(L.focus(),x.shouldSelect&&on(L.select)&&L.select())}},getFieldState:Xt}}function Eo(e={}){const t=q.useRef(void 0),n=q.useRef(void 0),[r,s]=q.useState({isDirty:!1,isValidating:!1,isLoading:on(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:on(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Iy(e),formState:r});const o=t.current.control;return o._options=e,Ca({subject:o._subjects.state,next:i=>{_f(i,o._proxyFormState,o._updateFormState,!0)&&s({...o._formState})}}),q.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),q.useEffect(()=>{if(o._proxyFormState.isDirty){const i=o._getDirty();i!==r.isDirty&&o._subjects.state.next({isDirty:i})}},[o,r.isDirty]),q.useEffect(()=>{e.values&&!Fn(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,s(i=>({...i}))):o._resetDefaultValues()},[e.values,o]),q.useEffect(()=>{e.errors&&o._setErrors(e.errors)},[e.errors,o]),q.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),q.useEffect(()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})},[e.shouldUnregister,o]),t.current.formState=bf(r,o),t.current}function Ty(e){const t=e==null?void 0:e.match(/\d+/g);return t?t.join(""):""}function ht({label:e,name:t,control:n,validate:r,placeholder:s,optional:o,isNumber:i}){const{field:a,fieldState:l}=Cf({name:t,control:n,rules:{validate:r}});return T("div",{children:[T("div",{className:"flex justify-between",children:[T("label",{className:"block text-sm font-medium",children:e}),o&&T("p",{className:"text-sm text-gray-500 font-normal",children:"Optional"})]}),T("div",{className:"mt-2",children:T("input",{...a,placeholder:s,className:"block w-full rounded-md bg-white px-2 py-[9px] text-sm border border-gray-300 focus:ring-2 focus:ring-indigo-600 focus:border-indigo-600",onChange:c=>i?a.onChange(Ty(c.target.value)):a.onChange(c)})}),l.invalid&&T("p",{className:"mt-2 text-sm text-red-600",children:[e," is invalid"]})]})}function Io({primaryLabel:e,secondaryLabel:t,secondaryOnClick:n,isBusy:r}){return T("div",{className:"flex flex-row-reverse pt-4 pb-6 gap-3 border-t -mx-6 px-6",children:[T("button",{type:"submit",className:"rounded-md bg-indigo-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600",disabled:r,children:r?T("div",{className:"animate-spin size-5",children:T(x1,{})}):e}),T("button",{type:"button",className:"rounded-md bg-white px-3.5 py-2.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:n,disabled:r,children:t})]})}function Ny({defaultValues:e,validateFirstName:t,validateLastName:n,validateEmail:r,validateMobilePhone:s,onSubmit:o,onBack:i}){const{handleSubmit:a,control:l,getValues:c}=Eo({mode:"onChange",defaultValues:e});return T(Ie,{children:[T("div",{className:"font-bold text-lg mb-4",children:"Primary contact"}),T("form",{className:"space-y-6",onSubmit:a(o),children:[T("div",{className:"grid grid-cols-2 gap-3",children:[T(ht,{label:"Given name",name:"FirstName",control:l,placeholder:"e.g. Sam",validate:t}),T(ht,{label:"Family name / surname",name:"LastName",control:l,placeholder:"e.g. Smith",validate:n})]}),T(ht,{label:"Email",name:"Email",control:l,placeholder:"e.g. sam.smith@example.com",validate:r}),T("div",{className:"grid grid-cols-2 gap-3",children:T(ht,{label:"Mobile phone number",name:"MobilePhone",control:l,placeholder:"e.g. +61400111222",validate:s})}),T(Io,{primaryLabel:"Next",secondaryLabel:"Back",secondaryOnClick:()=>i(c())})]})]})}function My(e,t){return p(Ny,{defaultValues:e,validateFirstName:n=>ut(ac(n)),validateLastName:n=>ut(cc(n)),validateEmail:n=>ut(dc(n)),validateMobilePhone:n=>ut(fc(n)),onSubmit:n=>{t(new Jt(3,[n])),t(new Jt(0,[]))},onBack:n=>{t(new Jt(3,[n])),t(new Jt(1,[]))}})}function Ry(){return T("div",{className:"rounded-md bg-red-50 p-4 mb-2",children:T("div",{className:"flex",children:[T("div",{className:"shrink-0",children:T(A1,{"aria-hidden":"true",className:"size-5 text-red-400"})}),T("div",{className:"ml-3",children:[T("h3",{className:"text-sm font-medium text-red-800",children:"We're having trouble creating the account"}),T("div",{className:"mt-2 text-sm text-red-700",children:T("p",{children:"Please try again. If this keeps happening, please contact support."})})]})]})})}function Py({defaultValues:e,validateAddress1:t,validateAddress2:n,validateCity:r,validateState:s,validatePostcode:o,accountCreationInProgress:i,accountCreationFailed:a,onSubmit:l,onBack:c}){const{handleSubmit:d,control:u,register:h,getValues:f}=Eo({mode:"onChange",defaultValues:e});return T(Ie,{children:[a&&T(Ry,{}),T("div",{className:"font-bold text-lg mb-4",children:"Business address"}),T("form",{className:"space-y-6",onSubmit:d(l),children:[T(ht,{label:"Address (Line one)",name:"Line1",control:u,placeholder:"e.g. 100 Example Street",validate:t}),T(ht,{label:"Address (Line two)",name:"Line2",control:u,placeholder:"Example: Floor, Unit, Building name, etc.",validate:n,optional:!0}),T("div",{className:"grid grid-cols-2 gap-3",children:[T(ht,{label:"City / Suburb",name:"City",control:u,placeholder:"e.g. Sydney",validate:r}),T("div",{children:[T("label",{className:"block text-sm font-medium",children:"State"}),T("select",{className:"mt-2 w-full appearance-none rounded-md bg-white px-2 py-[9px] text-sm border border-gray-300 focus:ring-2 focus:ring-indigo-600 focus:border-indigo-600",...h("State",{validate:s}),children:[T("option",{children:"NSW"}),T("option",{children:"VIC"}),T("option",{children:"QLD"}),T("option",{children:"SA"}),T("option",{children:"WA"}),T("option",{children:"NT"}),T("option",{children:"TAS"}),T("option",{children:"ACT"})]})]})]}),T("div",{className:"grid grid-cols-2 gap-3",children:T(ht,{label:"Postcode",name:"Postcode",control:u,placeholder:"e.g. 2000",validate:o,isNumber:!0})}),T(Io,{primaryLabel:"Add account",secondaryLabel:"Back",secondaryOnClick:()=>c(f()),isBusy:i})]})]})}function Oy(e,t,n,r){return p(Py,{defaultValues:e,validateAddress1:s=>ut(p$(s)),validateAddress2:s=>Js(s)?!0:$$(s)!=null,validateCity:s=>ut(g$(s)),validateState:s=>ut(y$(s)),validatePostcode:s=>ut(w$(s)),accountCreationInProgress:t,accountCreationFailed:n,onSubmit:s=>{r(new Jt(4,[s])),r(new Jt(5,[]))},onBack:s=>{r(new Jt(4,[s])),r(new Jt(1,[]))}})}function Is(e,t,n){let r=n.initialDeps??[],s;return()=>{var o,i,a,l;let c;n.key&&((o=n.debug)!=null&&o.call(n))&&(c=Date.now());const d=e();if(!(d.length!==r.length||d.some((f,m)=>r[m]!==f)))return s;r=d;let h;if(n.key&&((i=n.debug)!=null&&i.call(n))&&(h=Date.now()),s=t(...d),n.key&&((a=n.debug)!=null&&a.call(n))){const f=Math.round((Date.now()-c)*100)/100,m=Math.round((Date.now()-h)*100)/100,w=m/16,$=(v,_)=>{for(v=String(v);v.length<_;)v=" "+v;return v};console.info(`%c⏱ ${$(m,5)} /${$(f,5)} ms`,`
45
+ `))(a)}}else if(Al(r))if(po(r)){const o=Dn(a=>Nn(e,t,n,a),Nl(r));return a=>Ii(No((l,c)=>ge(l,o)(c),a))}else{const o=Oe(kl(r));if(o==="Microsoft.FSharp.Core.FSharpOption`1[System.Object]"){const a=new zh(()=>Cw(Nn(e,t,n,ge(0,Et(r)))));return l=>l==null?ff:a.Value(l)}else if(o==="Microsoft.FSharp.Collections.FSharpList`1[System.Object]"||o==="Microsoft.FSharp.Collections.FSharpSet`1[System.Object]"||o==="System.Collections.Generic.IEnumerable`1[System.Object]"){const a=Nn(e,t,n,ge(0,Et(r)));return l=>Ii(Ve(a,l))}else if(o==="Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]"){const a=ge(0,Et(r)),l=Nn(e,t,n,ge(1,Et(r)));if(Oe(a)==="System.String"||Oe(a)==="System.Guid")return c=>gs((d,u)=>{const m=u;return d[m[0]]=l(m[1]),d},{},c);{let c;return c=Nn(e,t,n,a),u=>Ii(Ve(m=>{const h=m;return[c(h[0]),l(h[1])]},u))}}else return mf(e,t,n,r)}else switch(s){case"System.Boolean":return o=>o;case"Microsoft.FSharp.Core.Unit":return vw;case"System.String":return o=>o;case"System.Char":return o=>o;case"System.SByte":return o=>o;case"System.Byte":return o=>o;case"System.Int16":return o=>o;case"System.UInt16":return o=>o;case"System.Int32":return o=>o;case"System.UInt32":return o=>o;case"System.Double":return o=>o;case"System.Single":return o=>o;case"System.DateTime":return xw;case"System.DateTimeOffset":return _w;case"System.TimeSpan":return bw;case"System.Guid":return yw;case"System.Object":return o=>o;default:return mf(e,t,n,r)}else{const o=i;return a=>o.contents(a)}}function Sw(e){return $a({Compare:as})}function pf(e,t,n,r){const s=We(t,new xt(0,[])),i=We(r,!0);return Nn(Sw(),s,i,e)}function Pa(e){return new _c(ln(e))}function Ns(e){return`${e}/account-registry/admin`}const Aw=5,kw=1e3;function gf(e,t,n,r){return T.Delay(()=>{const s=Ei(Ra(Wt(Ut("Bearer %s"))(n)),r);return T.Bind(Ma(s),i=>{let o,a;const l=i,c=l.statusCode|0;return o=c|0,o>=200&&o<=299?T.Return(l):(a=c|0,(a===429?!0:a>=500)&&e>=1?T.Bind(pa(t),()=>T.ReturnFrom(gf(e-1,t,n,r))):T.Return(l))})})}const Ts=e=>t=>gf(Aw,kw,e,t);function Ew(e,t){return T.Delay(()=>{let n;const r=Ts(t)(fn(new Qt(0,[]),en(`${Ns(e)}/partners`)));return n=T.Bind(r,s=>T.Return(new $(0,[s]))),T.Bind(n,s=>{const i=s;if(i.tag===1)return T.Return(new $(1,[i.fields[0]]));{const o=i.fields[0];if(o.statusCode===200){let a;const l=Jt(pe(Xt(ho(B0()),new xt(1,[]))),o.responseText);return a=l.tag===1?new $(1,[l.fields[0]]):ww(er(D$,l.fields[0])),T.Return(a)}else return T.Return(new $(1,["Unexpected response from backend"]))}})})}function Iw(e,t,n,r){const s=ln(n),i=cn(r);return T.Delay(()=>{let o;const a=Ts(t)(fn(new Qt(0,[]),en(`${Ns(e)}/partners/${s}/accounts/${i}`)));return o=T.Bind(a,l=>T.Return(new $(0,[l]))),T.Bind(o,l=>{const c=l;if(c.tag===1)return T.Return(new $(1,[c.fields[0]]));{const d=c.fields[0];if(d.statusCode===200){const u=Jt(pe(Xt(U0(),new xt(1,[]))),d.responseText);return T.Return(u)}else return T.Return(new $(1,["Unexpected response from backend"]))}})})}function Nw(e,t,n,r,s){const i=ln(n),o=cn(r);return T.Delay(()=>{const a=hf(0,pf(rg(),new xt(1,[]),void 0,void 0)(s));let l;const c=Ts(t)(df(new Ta(1,[a]),fn(new Qt(3,[]),en(`${Ns(e)}/partners/${i}/accounts/${o}`))));return l=T.Bind(c,d=>T.Return(new $(0,[d]))),T.Bind(l,d=>{const u=d;if(u.tag===1)return T.Return(new $(1,[u.fields[0]]));{let m;const h=u.fields[0].statusCode===204?new $(0,[void 0]):new $(1,["Unexpected response from backend"]);return m=T.Return(h),T.Bind(m,p=>{let w;const g=p;return w=g.tag===1?new $(1,[g.fields[0]]):new $(0,[void 0]),T.Return(w)})}})})}function Oa(e,t,n,r,s){return T.Delay(()=>{let i,o,a,l;const c="?"+re("&",sc(m=>m,y([(i=pd(r.SearchText),Jl(i)?void 0:`search=${encodeURIComponent(i.trim())}`),(o=A$(r.Sort),o[0].tag===1?o[1].tag===1?"sort_by=name&sort_direction=desc":"sort_by=name&sort_direction=asc":o[1].tag===1?"sort_by=accountid&sort_direction=desc":"sort_by=accountid&sort_direction=asc"),(a=gd(r.PageSize)|0,a<=100&&a>=10?`page_size=${a}`:void 0)])));let d;const u=Ts(t)((l=fn(new Qt(0,[]),en(`${Ns(e)}/partners/${Pr(n)}/accounts${c}`)),s==null?l:Ei(new lf("token",s),l)));return d=T.Bind(u,m=>T.Return(new $(0,[m]))),T.Bind(d,m=>{const h=m;if(h.tag===1)return T.Return(new $(1,[h.fields[0]]));{const p=h.fields[0];if(p.statusCode===200){const w=Jt(pe(Xt(H0(),new xt(1,[]))),p.responseText);return T.Return(w)}else return T.Return(new $(1,["Unexpected response from backend"]))}})})}function Tw(e,t,n){const r=cn(n);return T.Delay(()=>{let s;const i=Ts(t)(fn(new Qt(0,[]),en(`${Ns(e)}/search-by-id/${r}`)));return s=T.Bind(i,o=>T.Return(new $(0,[o]))),T.Bind(s,o=>{const a=o;if(a.tag===1)return T.Return(new $(1,[a.fields[0]]));{const l=a.fields[0];if(l.statusCode===200){const c=Jt(pe(Xt(G0(),new xt(1,[]))),l.responseText);return T.Return(c)}else return T.Return(new $(1,["Unexpected response from backend"]))}})})}function Rw(e,t){return f("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),f("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"}))}const Mw=jn(Rw);function Pw(e,t){return f("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),f("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"}))}const Ow=jn(Pw);function Dw(e,t){return f("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),f("path",{fillRule:"evenodd",d:"M11.49 3.17c-.38-1.56-2.6-1.56-2.98 0a1.532 1.532 0 01-2.286.948c-1.372-.836-2.942.734-2.106 2.106.54.886.061 2.042-.947 2.287-1.561.379-1.561 2.6 0 2.978a1.532 1.532 0 01.947 2.287c-.836 1.372.734 2.942 2.106 2.106a1.532 1.532 0 012.287.947c.379 1.561 2.6 1.561 2.978 0a1.533 1.533 0 012.287-.947c1.372.836 2.942-.734 2.106-2.106a1.533 1.533 0 01.947-2.287c1.561-.379 1.561-2.6 0-2.978a1.532 1.532 0 01-.947-2.287c.836-1.372-.734-2.942-2.106-2.106a1.532 1.532 0 01-2.287-.947zM10 13a3 3 0 100-6 3 3 0 000 6z",clipRule:"evenodd"}))}const Fw=jn(Dw);function Vw(e,t){return f("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),f("path",{fillRule:"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z",clipRule:"evenodd"}))}const Lw=jn(Vw);function Bw(e,t){return f("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),f("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"}))}const Uw=jn(Bw);class $f extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["BreadCrumb"]}}function jw(e,t,n){let r,s;return f("li",S(y([["key",e],["className","flex"],(r=[f("div",S(y([["className","flex items-center"],(s=me(I(()=>{let i;return D(n?Ke():E((i={className:"flex-shrink-0 h-5 w-5 text-gray-400"},f(Ow,i))),I(()=>E(f("a",S(me(I(()=>D(E(["children",e]),I(()=>D(t!=null?E(["href",ar(O(t))]):Ke(),I(()=>E(["className","ml-4 text-sm font-medium text-gray-500 hover:text-gray-700"]))))))))))))})),["children",v.Children.toArray(Array.from(s))])])))],["children",v.Children.toArray(Array.from(r))])])))}function zw(e){let t,n;return f("nav",S(y([["className","pt-2 mb-6"],["aria-label","Breadcrumb"],(t=[f("ol",S(y([["className","-ml-3 max-w-screen-xl w-full flex space-x-4"],(n=np((r,s)=>jw(s.fields[0][0],s.fields[0][1],r===0),e),["children",v.Children.toArray(Array.from(n))])])))],["children",v.Children.toArray(Array.from(t))])])))}function pt(e,t){return new $f([e,As(t)])}function wf(){return pt("Partners",new q(0,[]))}function yf(e,t){return pt(t,new q(1,[e]))}function Hw(e){return pt("Super",new q(4,[e]))}function Ww(e){return pt("Benefits",new q(5,[e]))}function Gw(e){return pt("Bank Details",new q(6,[e]))}function qw(e){return pt("Directory",new q(2,[e]))}function Kw(e){return pt("Workspace",new q(7,[e]))}function Zw(e){return pt("Accounts",new q(3,[e]))}function Jw(e){return new $f([e,void 0])}function Yw(e,t){let n;return pt("Directory",(n=[e,t],new q(9,[n[0],n[1]])))}function Xw(e,t){let n;return pt("Users",(n=[e,t],new q(10,[n[0],n[1]])))}function Qw(e,t){let n;return pt("Super",(n=[e,t],new q(11,[n[0],n[1]])))}function ey(e,t){let n;return pt("Benefits",(n=[e,t],new q(12,[n[0],n[1]])))}function ty(e,t){let n;return pt("Bank Details",(n=[e,t],new q(13,[n[0],n[1]])))}function ny(e,t){let n;return pt("Salary Packaging",(n=[e,t],new q(14,[n[0],n[1]])))}function ry(e,t){let n;return pt("Workspace",(n=[e,t],new q(15,[n[0],n[1]])))}function sy(e,t){let n;return pt("HRIS Migration",(n=[e,t],new q(16,[n[0],n[1]])))}function Rs(e){let t,n;const r=e.partner;if(r==null)n="...";else{const m=r,h=m.Name;n=h.tag===2?h.fields[0].tag===1?di(m.Id):So(h.fields[0].fields[0]):"..."}let s;const i=e.account;if(i==null)s="...";else{const m=i,h=m.Name;s=h.tag===2?h.fields[0].tag===1?fi(m.Id):So(h.fields[0].fields[0]):"..."}let o;const a=e.partner,l=e.account;let c,d,u;switch(a==null?(l==null,c=2):l==null?(c=1,u=a):(c=0,d=a),c){case 0:{o=y([wf(),yf(d.Id,n),Zw(d.Id),Jw(s)]);break}case 1:{o=y([wf(),yf(u.Id,n)]);break}default:o=je()}return zw((t=e.page,t.tag===17||t.tag===1||t.tag===3?o:t.tag===4?nt(o,te(Hw(t.fields[0]))):t.tag===5?nt(o,te(Ww(t.fields[0]))):t.tag===6?nt(o,te(Gw(t.fields[0]))):t.tag===2?nt(o,te(qw(t.fields[0]))):t.tag===7?nt(o,te(Kw(t.fields[0]))):t.tag===8?o:t.tag===9?nt(o,te(Yw(t.fields[0],t.fields[1]))):t.tag===10?nt(o,te(Xw(t.fields[0],t.fields[1]))):t.tag===11?nt(o,te(Qw(t.fields[0],t.fields[1]))):t.tag===12?nt(o,te(ey(t.fields[0],t.fields[1]))):t.tag===13?nt(o,te(ty(t.fields[0],t.fields[1]))):t.tag===14?nt(o,te(ny(t.fields[0],t.fields[1]))):t.tag===15?nt(o,te(ry(t.fields[0],t.fields[1]))):t.tag===16?nt(o,te(sy(t.fields[0],t.fields[1]))):o))}class iy extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Tab"]}}function oy(e){return new iy(e)}function ay(e){return e.fields[0]}function _f(e,t,n){const r=(e===t?"border-indigo-500 text-indigo-600 bg-indigo-100":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300 hover:bg-gray-200")+" whitespace-nowrap p-3 border-r-2 font-medium text-sm";return oy(f("a",S(me(I(()=>D(E(["key",t]),I(()=>D(E(["children",t]),I(()=>D(E(["className",r]),I(()=>e!==t?E(["href",ar(te(n))]):Ke())))))))))))}function bf(e){let t,n;const r=e.headers,s=zn(100);return f("div",S(y([["ref",i=>{const o=jm(i);if(o!=null){const a=o;s[1](~~a.offsetTop)}}],["className","relative"],(t=[f("div",{className:"w-40 mr-6"}),f("nav",S(y([["className","fixed bottom-14 flex flex-col w-40 border-r border-gray-300 mr-6"],["style",{top:s[0]}],(n=Ve(ay,r),["children",v.Children.toArray(Array.from(n))])])))],["children",v.Children.toArray(Array.from(t))])])))}class ly extends ee{constructor(t,n,r){super(),this.Roles=t,this.BackendUrl=n,this.AccessToken=r}}const Hn=Vg();let ur=class extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["UpdateSearchText","UpdateSort","LoadAccountLookup","UpdateAccountLookup","QueryAccountLookup"]}};class cy{constructor(t){this.props=t}}function uy(e){return new cy(e)}function vf(e){return t=>n=>T.Delay(()=>{const r=Pa(e.props.partnerId);return T.Bind(Oa(e.props.backendUrl,e.props.accessToken,r,t,void 0),s=>(n(new ur(2,[new we(2,[s])])),T.Zero()))})}function dy(e){return t=>n=>r=>T.Delay(()=>{const s=Pa(e.props.partnerId);return T.Bind(Oa(e.props.backendUrl,e.props.accessToken,s,t,n),i=>(r(new ur(3,[i])),T.Zero()))})}function fy(e,t,n){return Oa(e.props.backendUrl,e.props.accessToken,Pa(e.props.partnerId),t,void 0)}let Jr=class extends ee{constructor(t,n,r,s){super(),this.Data=t,this.SearchText=n,this.Sort=r,this.PageSize=s}};function hy(){return[new Jr(new we(0,[]),k$,S$,N$(20)),fe()]}function my(e,t,n){let r,s,i,o;switch(t.tag){case 1:{const a=t.fields[0];return[new Jr(new we(1,[]),n.SearchText,a,n.PageSize),Ye(l=>{const c=new _a(n.SearchText,a,n.PageSize);Br(vf(e)(c)(l))})]}case 2:return[new Jr(t.fields[0],n.SearchText,n.Sort,n.PageSize),fe()];case 3:{const a=t.fields[0];return[new Jr((r=n.Data,r.tag===2?r.fields[0].tag===0?(s=a,s.tag===1?new we(2,[new $(1,[s.fields[0]])]):new we(2,[new $(0,[new Vc(nt(r.fields[0].fields[0].Accounts,s.fields[0].Accounts),s.fields[0].Token)])])):(i=a,i.tag===1?new we(2,[new $(1,[i.fields[0]])]):new we(3,[new Error("Failed to retrieve the account data")])):(o=a,o.tag===1?new we(2,[new $(1,[o.fields[0]])]):new we(3,[new Error("Failed to retrieve the account data")]))),n.SearchText,n.Sort,n.PageSize),fe()]}case 4:return[new Jr(new we(1,[]),n.SearchText,n.Sort,n.PageSize),Ye(a=>{const l=new _a(n.SearchText,n.Sort,n.PageSize);Br(vf(e)(l)(a))})];default:return[new Jr(n.Data,E$(t.fields[0]),n.Sort,n.PageSize),fe()]}}function xf(e,t,n,r){let s,i;return f("div",S(y([["className",re(" ",["flex-grow","max-w-md"])],(s=[f("label",{for:"search",children:"Search",className:re(" ",["block","text-sm","font-medium","text-gray-700"])}),f("div",S(y([["className","mt-1"],(i=[f("input",{id:"search",name:"search",type:"text",className:re(" ",["py-2","shadow-sm","focus:ring-indigo-500","focus:border-indigo-500","block","w-full","sm:text-sm","border-gray-300","rounded-md"]),placeholder:t,value:e,onKeyUp:o=>{o.key==="Enter"&&r()},onChange:o=>{n(o.target.value)}})],["children",v.Children.toArray(Array.from(i))])])))],["children",v.Children.toArray(Array.from(s))])])))}function py(e){let t,n;return f("div",S(y([["className","pt-6"],(t=[f("div",S(y([["className",re(" ",["flex","justify-end"])],(n=[f("button",{type:"search",children:"Search",className:re(" ",["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",v.Children.toArray(Array.from(n))])])))],["children",v.Children.toArray(Array.from(t))])])))}function Cf(e){return["fillRule",e]}function Sf(e){return["clipRule",e]}const gy=f("svg",S(y([["className","w-6 h-6"],["fill","none"],["stroke","currentColor"],["strokeWidth",1.5],["viewBox","0 0 24 24"],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e;const t=te(f("path",S(y([["strokeLinecap","round"],["strokeLinejoin","round"],(e="M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L6.832 19.82a4.5 4.5 0 01-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 011.13-1.897L16.863 4.487zm0 0L19.5 7.125",["d",e])]))));return["children",v.Children.toArray(Array.from(t))]})()]))),$y=f("svg",S(y([["className",re(" ",["h-5","w-5"])],["fill","currentColor"],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e;const t=te(f("path",S(y([(e="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",["d",e]),Cf("evenodd"),Sf("evenodd")]))));return["children",v.Children.toArray(Array.from(t))]})()]))),wy=f("svg",S(y([["className",re(" ",["h-5","w-5"])],["fill","currentColor"],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e;const t=te(f("path",S(y([(e="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",["d",e]),Cf("evenodd"),Sf("evenodd")]))));return["children",v.Children.toArray(Array.from(t))]})()]))),Af=f("svg",S(y([["className","size-6"],["fill","none"],["stroke","currentColor"],["strokeWidth",1.5],["viewBox","0 0 24 24"],["xmlns","http://www.w3.org/2000/svg"],(()=>{const e=te(f("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}));return["children",v.Children.toArray(Array.from(e))]})()]))),yy=f("svg",S(y([["className",re(" ",["h-5","w-5"])],["fill","none"],["stroke","currentColor"],["strokeWidth",1.5],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],(()=>{const e=te(f("path",{d:"M10 5V10M10 10V15M10 10H15M10 10L5 10",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}));return["children",v.Children.toArray(Array.from(e))]})()]))),_y=f("svg",S(y([["className",re(" ",["h-5","w-5"])],["fill","none"],["viewBox","0 0 18 18"],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e,t;const n=y([f("path",S(y([(e="M15.25 2H10.5C10.086 2 9.75002 2.336 9.75002 2.75C9.75002 3.164 10.086 3.5 10.5 3.5H13.439L8.46902 8.47C8.17602 8.763 8.17602 9.238 8.46902 9.531C8.61502 9.677 8.80702 9.751 8.99902 9.751C9.19102 9.751 9.38302 9.678 9.52902 9.531L14.499 4.561V7.5C14.499 7.914 14.835 8.25 15.249 8.25C15.663 8.25 15.999 7.914 15.999 7.5V2.75C15.999 2.336 15.663 2 15.249 2H15.25Z",["d",e]),["fill","#1D4ED8"]]))),f("path",S(y([(t="M13.25 9.75C12.836 9.75 12.5 10.086 12.5 10.5V13.25C12.5 13.939 11.939 14.5 11.25 14.5H4.75C4.061 14.5 3.5 13.939 3.5 13.25V6.75C3.5 6.061 4.061 5.5 4.75 5.5H7.5C7.914 5.5 8.25 5.164 8.25 4.75C8.25 4.336 7.914 4 7.5 4H4.75C3.233 4 2 5.233 2 6.75V13.25C2 14.767 3.233 16 4.75 16H11.25C12.767 16 14 14.767 14 13.25V10.5C14 10.086 13.664 9.75 13.25 9.75Z",["d",t]),["fill","#1D4ED8"]])))]);return["children",v.Children.toArray(Array.from(n))]})()]))),Da=f("svg",S(y([["className",re(" ",["h-5","w-5"])],["fill","white"],["viewBox","0 0 24 24"],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e,t;const n=y([f("path",S(y([(e="M1.24302 18.953L10.152 2.11098C10.33 1.77464 10.5963 1.49318 10.9222 1.29687C11.2482 1.10056 11.6215 0.996826 12.002 0.996826C12.3825 0.996826 12.7559 1.10056 13.0818 1.29687C13.4078 1.49318 13.6741 1.77464 13.852 2.11098L22.761 18.953C22.9282 19.2708 23.0103 19.6265 22.9991 19.9855C22.988 20.3445 22.8841 20.6944 22.6975 21.0013C22.5109 21.3081 22.2479 21.5614 21.9343 21.7364C21.6207 21.9114 21.2672 22.0022 20.908 22H3.09202C2.73323 22.0015 2.38014 21.9102 2.06709 21.7349C1.75404 21.5596 1.49169 21.3063 1.30555 20.9995C1.11942 20.6928 1.01583 20.3431 1.00488 19.9845C0.993918 19.6259 1.07596 19.2705 1.24302 18.953V18.953Z",["d",e]),["stroke","#111827"],["strokeWidth",2],["strokeLinecap","round"],["strokeLinejoin","round"]]))),f("path",{d:"M12 8V14",stroke:"#DC2626",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),f("path",S(y([(t="M12 19C12.8284 19 13.5 18.3284 13.5 17.5C13.5 16.6716 12.8284 16 12 16C11.1716 16 10.5 16.6716 10.5 17.5C10.5 18.3284 11.1716 19 12 19Z",["d",t]),["fill","#DC2626"]])))]);return["children",v.Children.toArray(Array.from(n))]})()]))),Fa=f("svg",S(y([["fill","none"],["height",20],["width",20],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e,t;const n=y([f("path",S(y([(e="M18 10C18 14.4183 14.4183 18 10 18C5.58172 18 2 14.4183 2 10C2 5.58172 5.58172 2 10 2C14.4183 2 18 5.58172 18 10ZM3.99743 10C3.99743 13.3151 6.68487 16.0026 10 16.0026C13.3151 16.0026 16.0026 13.3151 16.0026 10C16.0026 6.68487 13.3151 3.99743 10 3.99743C6.68487 3.99743 3.99743 6.68487 3.99743 10Z",["d",e]),["fill","#D6E2FC"]]))),f("path",S(y([(t="M10 3C10 2.44772 10.4494 1.99356 10.9974 2.06242C11.7053 2.15137 12.3996 2.3348 13.0615 2.60896C14.0321 3.011 14.914 3.60028 15.6569 4.34315C16.3997 5.08602 16.989 5.96793 17.391 6.93853C17.6652 7.60043 17.8486 8.29473 17.9376 9.0026C18.0064 9.55057 17.5523 10 17 10C16.4477 10 16.0085 9.54925 15.9169 9.00462C15.842 8.55939 15.7169 8.12298 15.5433 7.7039C15.2417 6.97595 14.7998 6.31451 14.2426 5.75736C13.6855 5.20021 13.0241 4.75825 12.2961 4.45672C11.877 4.28313 11.4406 4.15804 10.9954 4.08314C10.4508 3.99152 10 3.55228 10 3Z",["d",t]),["fill","#2E66F7"]])))]);return["children",v.Children.toArray(Array.from(n))]})()])));function Yr(e){const t=e.child,n=e.onClose;return Lu(()=>{const r=s=>{s.key==="Escape"&&n()};return window.addEventListener("keydown",r),{Dispose(){window.removeEventListener("keydown",r)}}},[]),t}class by{constructor(t,n){this.accessToken=n,this.adminUrl=`${t}/account-registry/admin`}QueryAnzsic(t){const n=this;return Zg(T.Delay(()=>T.Bind(kf(n,en(`${n.adminUrl}/anzsic?maxRecordCount=15&search=${t}`)),r=>{const s=Jt(pe(Xt(X0(),new xt(1,[]))),r.responseText);return T.Return(s.tag===1?new Array(0):s.fields[0].tag===0?s.fields[0].fields[0]:new Array(0))})))}CreateAccount(t,n,r,s){const i=this;return T.Delay(()=>{let o,a;const l=kf(i,df(new Ta(1,[(o=new Bc(n.AccountName,n.WebsiteUrl,new Tc(r.FirstName,r.LastName,r.Email,r.MobilePhone),void 0,new Lc(n.LegalEntityName,n.Abn,s.Line1,oi(s.Line2)?void 0:s.Line2,s.City,s.Postcode,s.State,r.MobilePhone,"AU"),void 0,void 0,new Oc(n.SalesforceParentRecordId,void 0),new Dc(n.Industry.ClassCode,n.Industry.ClassTitle)),hf(0,pf(eg(),new xt(1,[]),void 0,void 0)(o)))]),fn(new Qt(1,[]),en(`${i.adminUrl}/partners/${di(t)}/accounts`))));return a=T.Bind(l,c=>T.Return(new $(0,[c]))),T.Bind(a,c=>{const d=c;if(d.tag===1)return T.Return(new $(1,[d.fields[0]]));{let u;const m=Jt(pe(Xt(ng(),new xt(1,[]))),d.fields[0].responseText);return u=m.tag===1?new $(1,[void 0]):new $(0,[m.fields[0].Id]),T.Return(u)}})})}}function vy(e,t){return new by(e,t)}function kf(e,t){return Ma(Ei(Ra(`Bearer ${e.accessToken}`),t))}let xy=class extends ee{constructor(t,n,r){super(),this.Name=t,this.BusinessName=n,this.BusinessNumber=r}};class dr extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["AccountDetailsForm","PrimaryContactForm","BusinessAddressForm"]}}let tn=class extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["NextForm","PreviousForm","SetAccountDetailsForm","SetPrimaryContactForm","SetBusinessAddressForm","StartAccountCreation","FinishAccountCreation"]}},Wn=class extends ee{constructor(t,n,r,s,i){super(),this.AccountDetailsForm=t,this.PrimaryContactForm=n,this.BusinessAddressForm=r,this.CurrentView=s,this.AccountCreation=i}};function Cy(e){const t=e.AccountCreation;let n;switch(t.tag){case 2:{t.fields[0].tag===1?n=1:n=0;break}case 3:{n=1;break}default:n=0}switch(n){case 0:return!1;default:return!0}}function Sy(e){switch(e.AccountCreation.tag){case 0:case 2:case 3:return!1;default:return!0}}const Ay=[new Wn({},{},{},new dr(0,[]),new we(0,[])),fe()];function ky(e,t,n,r){let s,i;switch(n.tag){case 1:return[new Wn(r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm,(s=r.CurrentView,s.tag===1?new dr(0,[]):s.tag===2?new dr(1,[]):new dr(0,[])),r.AccountCreation),fe()];case 2:return[new Wn(n.fields[0],r.PrimaryContactForm,r.BusinessAddressForm,r.CurrentView,r.AccountCreation),fe()];case 3:return[new Wn(r.AccountDetailsForm,n.fields[0],r.BusinessAddressForm,r.CurrentView,r.AccountCreation),fe()];case 4:return[new Wn(r.AccountDetailsForm,r.PrimaryContactForm,n.fields[0],r.CurrentView,r.AccountCreation),fe()];case 5:{const o=r.AccountCreation;let a;switch(o.tag){case 0:case 3:{a=1;break}case 2:{o.fields[0].tag===1?a=1:a=0;break}default:a=0}switch(a){case 0:return[r,fe()];default:return[new Wn(r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm,r.CurrentView,new we(1,[])),wa(l=>{ya(l)},l=>t.CreateAccount(l[0],l[1],l[2],l[3]),[e,r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm],l=>new tn(6,[l]))]}}case 6:{const o=n.fields[0];return[new Wn(r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm,r.CurrentView,new we(2,[o])),o.tag===1?fe():xa(new q(15,[e,jt(o.fields[0])]))]}default:return[new Wn(r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm,(i=r.CurrentView,i.tag===1?new dr(2,[]):i.tag===2?new dr(2,[]):new dr(1,[])),r.AccountCreation),fe()]}}var Ey=0;function R(e,t,n,r,s,i){t||(t={});var o,a,l=t;if("ref"in l)for(a in l={},t)a=="ref"?o=t[a]:l[a]=t[a];var c={type:e,props:l,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--Ey,__i:-1,__u:0,__source:s,__self:i};if(typeof e=="function"&&(o=e.defaultProps))for(a in o)l[a]===void 0&&(l[a]=o[a]);return se.vnode&&se.vnode(c),c}var Ms=e=>e.type==="checkbox",fr=e=>e instanceof Date,Ct=e=>e==null;const Ef=e=>typeof e=="object";var ze=e=>!Ct(e)&&!Array.isArray(e)&&Ef(e)&&!fr(e),If=e=>ze(e)&&e.target?Ms(e.target)?e.target.checked:e.target.value:e,Iy=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Nf=(e,t)=>e.has(Iy(t)),Ny=e=>{const t=e.constructor&&e.constructor.prototype;return ze(t)&&t.hasOwnProperty("isPrototypeOf")},Va=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function St(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(Va&&(e instanceof Blob||r))&&(n||ze(e)))if(t=n?[]:{},!n&&!Ny(e))t=e;else for(const s in e)e.hasOwnProperty(s)&&(t[s]=St(e[s]));else return e;return t}var Ni=e=>Array.isArray(e)?e.filter(Boolean):[],He=e=>e===void 0,B=(e,t,n)=>{if(!t||!ze(e))return n;const r=Ni(t.split(/[,[\].]+?/)).reduce((s,i)=>Ct(s)?s:s[i],e);return He(r)||r===e?He(e[t])?n:e[t]:r},zt=e=>typeof e=="boolean",La=e=>/^\w*$/.test(e),Tf=e=>Ni(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Ee=(e,t,n)=>{let r=-1;const s=La(t)?[t]:Tf(t),i=s.length,o=i-1;for(;++r<i;){const a=s[r];let l=n;if(r!==o){const c=e[a];l=ze(c)||Array.isArray(c)?c:isNaN(+s[r+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;e[a]=l,e=e[a]}return e};const Ti={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},nn={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Tn={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Ty=Z.createContext(null),Ba=()=>Z.useContext(Ty);var Rf=(e,t,n,r=!0)=>{const s={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(s,i,{get:()=>{const o=i;return t._proxyFormState[o]!==nn.all&&(t._proxyFormState[o]=!r||nn.all),n&&(n[o]=!0),e[o]}});return s},At=e=>ze(e)&&!Object.keys(e).length,Mf=(e,t,n,r)=>{n(e);const{name:s,...i}=e;return At(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(o=>t[o]===(!r||nn.all))},Ps=e=>Array.isArray(e)?e:[e],Pf=(e,t,n)=>!e||!t||e===t||Ps(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function Ua(e){const t=Z.useRef(e);t.current=e,Z.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function Ry(e){const t=Ba(),{control:n=t.control,disabled:r,name:s,exact:i}=e||{},[o,a]=Z.useState(n._formState),l=Z.useRef(!0),c=Z.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=Z.useRef(s);return d.current=s,Ua({disabled:r,next:u=>l.current&&Pf(d.current,u.name,i)&&Mf(u,c.current,n._updateFormState)&&a({...n._formState,...u}),subject:n._subjects.state}),Z.useEffect(()=>(l.current=!0,c.current.isValid&&n._updateValid(!0),()=>{l.current=!1}),[n]),Z.useMemo(()=>Rf(o,n,c.current,!1),[o,n])}var hn=e=>typeof e=="string",Of=(e,t,n,r,s)=>hn(e)?(r&&t.watch.add(e),B(n,e,s)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),B(n,i))):(r&&(t.watchAll=!0),n);function My(e){const t=Ba(),{control:n=t.control,name:r,defaultValue:s,disabled:i,exact:o}=e||{},a=Z.useRef(r);a.current=r,Ua({disabled:i,subject:n._subjects.values,next:d=>{Pf(a.current,d.name,o)&&c(St(Of(a.current,n._names,d.values||n._formValues,!1,s)))}});const[l,c]=Z.useState(n._getWatch(r,s));return Z.useEffect(()=>n._removeUnmounted()),l}function Df(e){const t=Ba(),{name:n,disabled:r,control:s=t.control,shouldUnregister:i}=e,o=Nf(s._names.array,n),a=My({control:s,name:n,defaultValue:B(s._formValues,n,B(s._defaultValues,n,e.defaultValue)),exact:!0}),l=Ry({control:s,name:n,exact:!0}),c=Z.useRef(s.register(n,{...e.rules,value:a,...zt(e.disabled)?{disabled:e.disabled}:{}})),d=Z.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!B(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!B(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!B(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!B(l.validatingFields,n)},error:{enumerable:!0,get:()=>B(l.errors,n)}}),[l,n]),u=Z.useMemo(()=>({name:n,value:a,...zt(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:m=>c.current.onChange({target:{value:If(m),name:n},type:Ti.CHANGE}),onBlur:()=>c.current.onBlur({target:{value:B(s._formValues,n),name:n},type:Ti.BLUR}),ref:m=>{const h=B(s._fields,n);h&&m&&(h._f.ref={focus:()=>m.focus(),select:()=>m.select(),setCustomValidity:p=>m.setCustomValidity(p),reportValidity:()=>m.reportValidity()})}}),[n,s._formValues,r,l.disabled,a,s._fields]);return Z.useEffect(()=>{const m=s._options.shouldUnregister||i,h=(p,w)=>{const g=B(s._fields,p);g&&g._f&&(g._f.mount=w)};if(h(n,!0),m){const p=St(B(s._options.defaultValues,n));Ee(s._defaultValues,n,p),He(B(s._formValues,n))&&Ee(s._formValues,n,p)}return!o&&s.register(n),()=>{(o?m&&!s._state.action:m)?s.unregister(n):h(n,!1)}},[n,s,o,i]),Z.useEffect(()=>{s._updateDisabledField({disabled:r,fields:s._fields,name:n})},[r,n,s]),Z.useMemo(()=>({field:u,formState:l,fieldState:d}),[u,l,d])}var Py=(e,t,n,r,s)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:s||!0}}:{},Ff=e=>({isOnSubmit:!e||e===nn.onSubmit,isOnBlur:e===nn.onBlur,isOnChange:e===nn.onChange,isOnAll:e===nn.all,isOnTouch:e===nn.onTouched}),Vf=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Os=(e,t,n,r)=>{for(const s of n||Object.keys(e)){const i=B(e,s);if(i){const{_f:o,...a}=i;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],s)&&!r)return!0;if(o.ref&&t(o.ref,o.name)&&!r)return!0;if(Os(a,t))break}else if(ze(a)&&Os(a,t))break}}};var Oy=(e,t,n)=>{const r=Ps(B(e,n));return Ee(r,"root",t[n]),Ee(e,n,r),e},ja=e=>e.type==="file",mn=e=>typeof e=="function",Ri=e=>{if(!Va)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Mi=e=>hn(e),za=e=>e.type==="radio",Pi=e=>e instanceof RegExp;const Lf={value:!1,isValid:!1},Bf={value:!0,isValid:!0};var Uf=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!He(e[0].attributes.value)?He(e[0].value)||e[0].value===""?Bf:{value:e[0].value,isValid:!0}:Bf:Lf}return Lf};const jf={isValid:!1,value:null};var zf=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,jf):jf;function Hf(e,t,n="validate"){if(Mi(e)||Array.isArray(e)&&e.every(Mi)||zt(e)&&!e)return{type:n,message:Mi(e)?e:"",ref:t}}var Xr=e=>ze(e)&&!Pi(e)?e:{value:e,message:""},Wf=async(e,t,n,r,s,i)=>{const{ref:o,refs:a,required:l,maxLength:c,minLength:d,min:u,max:m,pattern:h,validate:p,name:w,valueAsNumber:g,mount:C}=e._f,x=B(n,w);if(!C||t.has(w))return{};const A=a?a[0]:o,P=G=>{s&&A.reportValidity&&(A.setCustomValidity(zt(G)?"":G||""),A.reportValidity())},V={},Y=za(o),ce=Ms(o),Ce=Y||ce,le=(g||ja(o))&&He(o.value)&&He(x)||Ri(o)&&o.value===""||x===""||Array.isArray(x)&&!x.length,X=Py.bind(null,w,r,V),he=(G,ne,Me,M=Tn.maxLength,Se=Tn.minLength)=>{const ue=G?ne:Me;V[w]={type:G?M:Se,message:ue,ref:o,...X(G?M:Se,ue)}};if(i?!Array.isArray(x)||!x.length:l&&(!Ce&&(le||Ct(x))||zt(x)&&!x||ce&&!Uf(a).isValid||Y&&!zf(a).isValid)){const{value:G,message:ne}=Mi(l)?{value:!!l,message:l}:Xr(l);if(G&&(V[w]={type:Tn.required,message:ne,ref:A,...X(Tn.required,ne)},!r))return P(ne),V}if(!le&&(!Ct(u)||!Ct(m))){let G,ne;const Me=Xr(m),M=Xr(u);if(!Ct(x)&&!isNaN(x)){const Se=o.valueAsNumber||x&&+x;Ct(Me.value)||(G=Se>Me.value),Ct(M.value)||(ne=Se<M.value)}else{const Se=o.valueAsDate||new Date(x),ue=Be=>new Date(new Date().toDateString()+" "+Be),tt=o.type=="time",Ie=o.type=="week";hn(Me.value)&&x&&(G=tt?ue(x)>ue(Me.value):Ie?x>Me.value:Se>new Date(Me.value)),hn(M.value)&&x&&(ne=tt?ue(x)<ue(M.value):Ie?x<M.value:Se<new Date(M.value))}if((G||ne)&&(he(!!G,Me.message,M.message,Tn.max,Tn.min),!r))return P(V[w].message),V}if((c||d)&&!le&&(hn(x)||i&&Array.isArray(x))){const G=Xr(c),ne=Xr(d),Me=!Ct(G.value)&&x.length>+G.value,M=!Ct(ne.value)&&x.length<+ne.value;if((Me||M)&&(he(Me,G.message,ne.message),!r))return P(V[w].message),V}if(h&&!le&&hn(x)){const{value:G,message:ne}=Xr(h);if(Pi(G)&&!x.match(G)&&(V[w]={type:Tn.pattern,message:ne,ref:o,...X(Tn.pattern,ne)},!r))return P(ne),V}if(p){if(mn(p)){const G=await p(x,n),ne=Hf(G,A);if(ne&&(V[w]={...ne,...X(Tn.validate,ne.message)},!r))return P(ne.message),V}else if(ze(p)){let G={};for(const ne in p){if(!At(G)&&!r)break;const Me=Hf(await p[ne](x,n),A,ne);Me&&(G={...Me,...X(ne,Me.message)},P(Me.message),r&&(V[w]=G))}if(!At(G)&&(V[w]={ref:A,...G},!r))return V}}return P(!0),V};function Dy(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=He(e)?r++:e[t[r++]];return e}function Fy(e){for(const t in e)if(e.hasOwnProperty(t)&&!He(e[t]))return!1;return!0}function Xe(e,t){const n=Array.isArray(t)?t:La(t)?[t]:Tf(t),r=n.length===1?e:Dy(e,n),s=n.length-1,i=n[s];return r&&delete r[i],s!==0&&(ze(r)&&At(r)||Array.isArray(r)&&Fy(r))&&Xe(e,n.slice(0,-1)),e}var Ha=()=>{let e=[];return{get observers(){return e},next:s=>{for(const i of e)i.next&&i.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(i=>i!==s)}}),unsubscribe:()=>{e=[]}}},Wa=e=>Ct(e)||!Ef(e);function Gn(e,t){if(Wa(e)||Wa(t))return e===t;if(fr(e)&&fr(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const s of n){const i=e[s];if(!r.includes(s))return!1;if(s!=="ref"){const o=t[s];if(fr(i)&&fr(o)||ze(i)&&ze(o)||Array.isArray(i)&&Array.isArray(o)?!Gn(i,o):i!==o)return!1}}return!0}var Gf=e=>e.type==="select-multiple",Vy=e=>za(e)||Ms(e),Ga=e=>Ri(e)&&e.isConnected,qf=e=>{for(const t in e)if(mn(e[t]))return!0;return!1};function Oi(e,t={}){const n=Array.isArray(e);if(ze(e)||n)for(const r in e)Array.isArray(e[r])||ze(e[r])&&!qf(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Oi(e[r],t[r])):Ct(e[r])||(t[r]=!0);return t}function Kf(e,t,n){const r=Array.isArray(e);if(ze(e)||r)for(const s in e)Array.isArray(e[s])||ze(e[s])&&!qf(e[s])?He(t)||Wa(n[s])?n[s]=Array.isArray(e[s])?Oi(e[s],[]):{...Oi(e[s])}:Kf(e[s],Ct(t)?{}:t[s],n[s]):n[s]=!Gn(e[s],t[s]);return n}var Ds=(e,t)=>Kf(e,t,Oi(t)),Zf=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>He(e)?e:t?e===""?NaN:e&&+e:n&&hn(e)?new Date(e):r?r(e):e;function qa(e){const t=e.ref;return ja(t)?t.files:za(t)?zf(e.refs).value:Gf(t)?[...t.selectedOptions].map(({value:n})=>n):Ms(t)?Uf(e.refs).value:Zf(He(t.value)?e.ref.value:t.value,e)}var Ly=(e,t,n,r)=>{const s={};for(const i of e){const o=B(t,i);o&&Ee(s,i,o._f)}return{criteriaMode:n,names:[...e],fields:s,shouldUseNativeValidation:r}},Fs=e=>He(e)?e:Pi(e)?e.source:ze(e)?Pi(e.value)?e.value.source:e.value:e;const Jf="AsyncFunction";var By=e=>!!e&&!!e.validate&&!!(mn(e.validate)&&e.validate.constructor.name===Jf||ze(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Jf)),Uy=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Yf(e,t,n){const r=B(e,n);if(r||La(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const i=s.join("."),o=B(t,i),a=B(e,i);if(o&&!Array.isArray(o)&&n!==i)return{name:n};if(a&&a.type)return{name:i,error:a};s.pop()}return{name:n}}var jy=(e,t,n,r,s)=>s.isOnAll?!1:!n&&s.isOnTouch?!(t||e):(n?r.isOnBlur:s.isOnBlur)?!e:(n?r.isOnChange:s.isOnChange)?e:!0,zy=(e,t)=>!Ni(B(e,t)).length&&Xe(e,t);const Hy={mode:nn.onSubmit,reValidateMode:nn.onChange,shouldFocusError:!0};function Wy(e={}){let t={...Hy,...e},n={submitCount:0,isDirty:!1,isLoading:mn(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},s=ze(t.defaultValues)||ze(t.values)?St(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:St(s),o={action:!1,mount:!1,watch:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,c=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},u={values:Ha(),array:Ha(),state:Ha()},m=Ff(t.mode),h=Ff(t.reValidateMode),p=t.criteriaMode===nn.all,w=_=>k=>{clearTimeout(c),c=setTimeout(_,k)},g=async _=>{if(!t.disabled&&(d.isValid||_)){const k=t.resolver?At((await Ce()).errors):await X(r,!0);k!==n.isValid&&u.state.next({isValid:k})}},C=(_,k)=>{!t.disabled&&(d.isValidating||d.validatingFields)&&((_||Array.from(a.mount)).forEach(N=>{N&&(k?Ee(n.validatingFields,N,k):Xe(n.validatingFields,N))}),u.state.next({validatingFields:n.validatingFields,isValidating:!At(n.validatingFields)}))},x=(_,k=[],N,j,U=!0,F=!0)=>{if(j&&N&&!t.disabled){if(o.action=!0,F&&Array.isArray(B(r,_))){const J=N(B(r,_),j.argA,j.argB);U&&Ee(r,_,J)}if(F&&Array.isArray(B(n.errors,_))){const J=N(B(n.errors,_),j.argA,j.argB);U&&Ee(n.errors,_,J),zy(n.errors,_)}if(d.touchedFields&&F&&Array.isArray(B(n.touchedFields,_))){const J=N(B(n.touchedFields,_),j.argA,j.argB);U&&Ee(n.touchedFields,_,J)}d.dirtyFields&&(n.dirtyFields=Ds(s,i)),u.state.next({name:_,isDirty:G(_,k),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Ee(i,_,k)},A=(_,k)=>{Ee(n.errors,_,k),u.state.next({errors:n.errors})},P=_=>{n.errors=_,u.state.next({errors:n.errors,isValid:!1})},V=(_,k,N,j)=>{const U=B(r,_);if(U){const F=B(i,_,He(N)?B(s,_):N);He(F)||j&&j.defaultChecked||k?Ee(i,_,k?F:qa(U._f)):M(_,F),o.mount&&g()}},Y=(_,k,N,j,U)=>{let F=!1,J=!1;const ae={name:_};if(!t.disabled){const st=!!(B(r,_)&&B(r,_)._f&&B(r,_)._f.disabled);if(!N||j){d.isDirty&&(J=n.isDirty,n.isDirty=ae.isDirty=G(),F=J!==ae.isDirty);const it=st||Gn(B(s,_),k);J=!!(!st&&B(n.dirtyFields,_)),it||st?Xe(n.dirtyFields,_):Ee(n.dirtyFields,_,!0),ae.dirtyFields=n.dirtyFields,F=F||d.dirtyFields&&J!==!it}if(N){const it=B(n.touchedFields,_);it||(Ee(n.touchedFields,_,N),ae.touchedFields=n.touchedFields,F=F||d.touchedFields&&it!==N)}F&&U&&u.state.next(ae)}return F?ae:{}},ce=(_,k,N,j)=>{const U=B(n.errors,_),F=d.isValid&&zt(k)&&n.isValid!==k;if(t.delayError&&N?(l=w(()=>A(_,N)),l(t.delayError)):(clearTimeout(c),l=null,N?Ee(n.errors,_,N):Xe(n.errors,_)),(N?!Gn(U,N):U)||!At(j)||F){const J={...j,...F&&zt(k)?{isValid:k}:{},errors:n.errors,name:_};n={...n,...J},u.state.next(J)}},Ce=async _=>{C(_,!0);const k=await t.resolver(i,t.context,Ly(_||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return C(_),k},le=async _=>{const{errors:k}=await Ce(_);if(_)for(const N of _){const j=B(k,N);j?Ee(n.errors,N,j):Xe(n.errors,N)}else n.errors=k;return k},X=async(_,k,N={valid:!0})=>{for(const j in _){const U=_[j];if(U){const{_f:F,...J}=U;if(F){const ae=a.array.has(F.name),st=U._f&&By(U._f);st&&d.validatingFields&&C([j],!0);const it=await Wf(U,a.disabled,i,p,t.shouldUseNativeValidation&&!k,ae);if(st&&d.validatingFields&&C([j]),it[F.name]&&(N.valid=!1,k))break;!k&&(B(it,F.name)?ae?Oy(n.errors,it,F.name):Ee(n.errors,F.name,it[F.name]):Xe(n.errors,F.name))}!At(J)&&await X(J,k,N)}}return N.valid},he=()=>{for(const _ of a.unMount){const k=B(r,_);k&&(k._f.refs?k._f.refs.every(N=>!Ga(N)):!Ga(k._f.ref))&&Gs(_)}a.unMount=new Set},G=(_,k)=>!t.disabled&&(_&&k&&Ee(i,_,k),!Gn(kt(),s)),ne=(_,k,N)=>Of(_,a,{...o.mount?i:He(k)?s:hn(_)?{[_]:k}:k},N,k),Me=_=>Ni(B(o.mount?i:s,_,t.shouldUnregister?B(s,_,[]):[])),M=(_,k,N={})=>{const j=B(r,_);let U=k;if(j){const F=j._f;F&&(!F.disabled&&Ee(i,_,Zf(k,F)),U=Ri(F.ref)&&Ct(k)?"":k,Gf(F.ref)?[...F.ref.options].forEach(J=>J.selected=U.includes(J.value)):F.refs?Ms(F.ref)?F.refs.length>1?F.refs.forEach(J=>(!J.defaultChecked||!J.disabled)&&(J.checked=Array.isArray(U)?!!U.find(ae=>ae===J.value):U===J.value)):F.refs[0]&&(F.refs[0].checked=!!U):F.refs.forEach(J=>J.checked=J.value===U):ja(F.ref)?F.ref.value="":(F.ref.value=U,F.ref.type||u.values.next({name:_,values:{...i}})))}(N.shouldDirty||N.shouldTouch)&&Y(_,U,N.shouldTouch,N.shouldDirty,!0),N.shouldValidate&&Be(_)},Se=(_,k,N)=>{for(const j in k){const U=k[j],F=`${_}.${j}`,J=B(r,F);(a.array.has(_)||ze(U)||J&&!J._f)&&!fr(U)?Se(F,U,N):M(F,U,N)}},ue=(_,k,N={})=>{const j=B(r,_),U=a.array.has(_),F=St(k);Ee(i,_,F),U?(u.array.next({name:_,values:{...i}}),(d.isDirty||d.dirtyFields)&&N.shouldDirty&&u.state.next({name:_,dirtyFields:Ds(s,i),isDirty:G(_,F)})):j&&!j._f&&!Ct(F)?Se(_,F,N):M(_,F,N),Vf(_,a)&&u.state.next({...n}),u.values.next({name:o.mount?_:void 0,values:{...i}})},tt=async _=>{o.mount=!0;const k=_.target;let N=k.name,j=!0;const U=B(r,N),F=()=>k.type?qa(U._f):If(_),J=ae=>{j=Number.isNaN(ae)||fr(ae)&&isNaN(ae.getTime())||Gn(ae,B(i,N,ae))};if(U){let ae,st;const it=F(),Jn=_.type===Ti.BLUR||_.type===Ti.FOCUS_OUT,gx=!Uy(U._f)&&!t.resolver&&!B(n.errors,N)&&!U._f.deps||jy(Jn,B(n.touchedFields,N),n.isSubmitted,h,m),ml=Vf(N,a,Jn);Ee(i,N,it),Jn?(U._f.onBlur&&U._f.onBlur(_),l&&l(0)):U._f.onChange&&U._f.onChange(_);const pl=Y(N,it,Jn,!1),$x=!At(pl)||ml;if(!Jn&&u.values.next({name:N,type:_.type,values:{...i}}),gx)return d.isValid&&(t.mode==="onBlur"&&Jn?g():Jn||g()),$x&&u.state.next({name:N,...ml?{}:pl});if(!Jn&&ml&&u.state.next({...n}),t.resolver){const{errors:Fh}=await Ce([N]);if(J(it),j){const wx=Yf(n.errors,r,N),Vh=Yf(Fh,r,wx.name||N);ae=Vh.error,N=Vh.name,st=At(Fh)}}else C([N],!0),ae=(await Wf(U,a.disabled,i,p,t.shouldUseNativeValidation))[N],C([N]),J(it),j&&(ae?st=!1:d.isValid&&(st=await X(r,!0)));j&&(U._f.deps&&Be(U._f.deps),ce(N,st,ae,pl))}},Ie=(_,k)=>{if(B(n.errors,k)&&_.focus)return _.focus(),1},Be=async(_,k={})=>{let N,j;const U=Ps(_);if(t.resolver){const F=await le(He(_)?_:U);N=At(F),j=_?!U.some(J=>B(F,J)):N}else _?(j=(await Promise.all(U.map(async F=>{const J=B(r,F);return await X(J&&J._f?{[F]:J}:J)}))).every(Boolean),!(!j&&!n.isValid)&&g()):j=N=await X(r);return u.state.next({...!hn(_)||d.isValid&&N!==n.isValid?{}:{name:_},...t.resolver||!_?{isValid:N}:{},errors:n.errors}),k.shouldFocus&&!j&&Os(r,Ie,_?U:a.mount),j},kt=_=>{const k={...o.mount?i:s};return He(_)?k:hn(_)?B(k,_):_.map(N=>B(k,N))},on=(_,k)=>({invalid:!!B((k||n).errors,_),isDirty:!!B((k||n).dirtyFields,_),error:B((k||n).errors,_),isValidating:!!B(n.validatingFields,_),isTouched:!!B((k||n).touchedFields,_)}),br=_=>{_&&Ps(_).forEach(k=>Xe(n.errors,k)),u.state.next({errors:_?n.errors:{}})},Vt=(_,k,N)=>{const j=(B(r,_,{_f:{}})._f||{}).ref,U=B(n.errors,_)||{},{ref:F,message:J,type:ae,...st}=U;Ee(n.errors,_,{...st,...k,ref:j}),u.state.next({name:_,errors:n.errors,isValid:!1}),N&&N.shouldFocus&&j&&j.focus&&j.focus()},Ws=(_,k)=>mn(_)?u.values.subscribe({next:N=>_(ne(void 0,k),N)}):ne(_,k,!0),Gs=(_,k={})=>{for(const N of _?Ps(_):a.mount)a.mount.delete(N),a.array.delete(N),k.keepValue||(Xe(r,N),Xe(i,N)),!k.keepError&&Xe(n.errors,N),!k.keepDirty&&Xe(n.dirtyFields,N),!k.keepTouched&&Xe(n.touchedFields,N),!k.keepIsValidating&&Xe(n.validatingFields,N),!t.shouldUnregister&&!k.keepDefaultValue&&Xe(s,N);u.values.next({values:{...i}}),u.state.next({...n,...k.keepDirty?{isDirty:G()}:{}}),!k.keepIsValid&&g()},vr=({disabled:_,name:k,field:N,fields:j})=>{(zt(_)&&o.mount||_||a.disabled.has(k))&&(_?a.disabled.add(k):a.disabled.delete(k),Y(k,qa(N?N._f:B(j,k)._f),!1,!1,!0))},qs=(_,k={})=>{let N=B(r,_);const j=zt(k.disabled)||zt(t.disabled);return Ee(r,_,{...N||{},_f:{...N&&N._f?N._f:{ref:{name:_}},name:_,mount:!0,...k}}),a.mount.add(_),N?vr({field:N,disabled:zt(k.disabled)?k.disabled:t.disabled,name:_}):V(_,!0,k.value),{...j?{disabled:k.disabled||t.disabled}:{},...t.progressive?{required:!!k.required,min:Fs(k.min),max:Fs(k.max),minLength:Fs(k.minLength),maxLength:Fs(k.maxLength),pattern:Fs(k.pattern)}:{},name:_,onChange:tt,onBlur:tt,ref:U=>{if(U){qs(_,k),N=B(r,_);const F=He(U.value)&&U.querySelectorAll&&U.querySelectorAll("input,select,textarea")[0]||U,J=Vy(F),ae=N._f.refs||[];if(J?ae.find(st=>st===F):F===N._f.ref)return;Ee(r,_,{_f:{...N._f,...J?{refs:[...ae.filter(Ga),F,...Array.isArray(B(s,_))?[{}]:[]],ref:{type:F.type,name:_}}:{ref:F}}}),V(_,!1,void 0,F)}else N=B(r,_,{}),N._f&&(N._f.mount=!1),(t.shouldUnregister||k.shouldUnregister)&&!(Nf(a.array,_)&&o.action)&&a.unMount.add(_)}}},ie=()=>t.shouldFocusError&&Os(r,Ie,a.mount),Ne=_=>{zt(_)&&(u.state.next({disabled:_}),Os(r,(k,N)=>{const j=B(r,N);j&&(k.disabled=j._f.disabled||_,Array.isArray(j._f.refs)&&j._f.refs.forEach(U=>{U.disabled=j._f.disabled||_}))},0,!1))},$t=(_,k)=>async N=>{let j;N&&(N.preventDefault&&N.preventDefault(),N.persist&&N.persist());let U=St(i);if(a.disabled.size)for(const F of a.disabled)Ee(U,F,void 0);if(u.state.next({isSubmitting:!0}),t.resolver){const{errors:F,values:J}=await Ce();n.errors=F,U=J}else await X(r);if(Xe(n.errors,"root"),At(n.errors)){u.state.next({errors:{}});try{await _(U,N)}catch(F){j=F}}else k&&await k({...n.errors},N),ie(),setTimeout(ie);if(u.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:At(n.errors)&&!j,submitCount:n.submitCount+1,errors:n.errors}),j)throw j},ss=(_,k={})=>{B(r,_)&&(He(k.defaultValue)?ue(_,St(B(s,_))):(ue(_,k.defaultValue),Ee(s,_,St(k.defaultValue))),k.keepTouched||Xe(n.touchedFields,_),k.keepDirty||(Xe(n.dirtyFields,_),n.isDirty=k.defaultValue?G(_,St(B(s,_))):G()),k.keepError||(Xe(n.errors,_),d.isValid&&g()),u.state.next({...n}))},Ks=(_,k={})=>{const N=_?St(_):s,j=St(N),U=At(_),F=U?s:j;if(k.keepDefaultValues||(s=N),!k.keepValues){if(k.keepDirtyValues){const J=new Set([...a.mount,...Object.keys(Ds(s,i))]);for(const ae of Array.from(J))B(n.dirtyFields,ae)?Ee(F,ae,B(i,ae)):ue(ae,B(F,ae))}else{if(Va&&He(_))for(const J of a.mount){const ae=B(r,J);if(ae&&ae._f){const st=Array.isArray(ae._f.refs)?ae._f.refs[0]:ae._f.ref;if(Ri(st)){const it=st.closest("form");if(it){it.reset();break}}}}r={}}i=t.shouldUnregister?k.keepDefaultValues?St(s):{}:St(F),u.array.next({values:{...F}}),u.values.next({values:{...F}})}a={mount:k.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!d.isValid||!!k.keepIsValid||!!k.keepDirtyValues,o.watch=!!t.shouldUnregister,u.state.next({submitCount:k.keepSubmitCount?n.submitCount:0,isDirty:U?!1:k.keepDirty?n.isDirty:!!(k.keepDefaultValues&&!Gn(_,s)),isSubmitted:k.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:U?{}:k.keepDirtyValues?k.keepDefaultValues&&i?Ds(s,i):n.dirtyFields:k.keepDefaultValues&&_?Ds(s,_):k.keepDirty?n.dirtyFields:{},touchedFields:k.keepTouched?n.touchedFields:{},errors:k.keepErrors?n.errors:{},isSubmitSuccessful:k.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Dh=(_,k)=>Ks(mn(_)?_(i):_,k);return{control:{register:qs,unregister:Gs,getFieldState:on,handleSubmit:$t,setError:Vt,_executeSchema:Ce,_getWatch:ne,_getDirty:G,_updateValid:g,_removeUnmounted:he,_updateFieldArray:x,_updateDisabledField:vr,_getFieldArray:Me,_reset:Ks,_resetDefaultValues:()=>mn(t.defaultValues)&&t.defaultValues().then(_=>{Dh(_,t.resetOptions),u.state.next({isLoading:!1})}),_updateFormState:_=>{n={...n,..._}},_disableForm:Ne,_subjects:u,_proxyFormState:d,_setErrors:P,get _fields(){return r},get _formValues(){return i},get _state(){return o},set _state(_){o=_},get _defaultValues(){return s},get _names(){return a},set _names(_){a=_},get _formState(){return n},set _formState(_){n=_},get _options(){return t},set _options(_){t={...t,..._}}},trigger:Be,register:qs,handleSubmit:$t,watch:Ws,setValue:ue,getValues:kt,reset:Dh,resetField:ss,clearErrors:br,unregister:Gs,setError:Vt,setFocus:(_,k={})=>{const N=B(r,_),j=N&&N._f;if(j){const U=j.refs?j.refs[0]:j.ref;U.focus&&(U.focus(),k.shouldSelect&&mn(U.select)&&U.select())}},getFieldState:on}}function Di(e={}){const t=Z.useRef(void 0),n=Z.useRef(void 0),[r,s]=Z.useState({isDirty:!1,isValidating:!1,isLoading:mn(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:mn(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Wy(e),formState:r});const i=t.current.control;return i._options=e,Ua({subject:i._subjects.state,next:o=>{Mf(o,i._proxyFormState,i._updateFormState,!0)&&s({...i._formState})}}),Z.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),Z.useEffect(()=>{if(i._proxyFormState.isDirty){const o=i._getDirty();o!==r.isDirty&&i._subjects.state.next({isDirty:o})}},[i,r.isDirty]),Z.useEffect(()=>{e.values&&!Gn(e.values,n.current)?(i._reset(e.values,i._options.resetOptions),n.current=e.values,s(o=>({...o}))):i._resetDefaultValues()},[e.values,i]),Z.useEffect(()=>{e.errors&&i._setErrors(e.errors)},[e.errors,i]),Z.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),Z.useEffect(()=>{e.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})},[e.shouldUnregister,i]),t.current.formState=Rf(r,i),t.current}function Gy(e){const t=e==null?void 0:e.match(/\d+/g);return t?t.join(""):""}function gt({label:e,name:t,control:n,validate:r,placeholder:s,optional:i,isNumber:o}){const{field:a,fieldState:l}=Df({name:t,control:n,rules:{validate:r}});return R("div",{children:[R("div",{className:"flex justify-between",children:[R("label",{className:"block text-sm font-medium",children:e}),i&&R("p",{className:"text-sm text-gray-500 font-normal",children:"Optional"})]}),R("div",{className:"mt-2",children:R("input",{...a,placeholder:s,className:"block w-full rounded-md bg-white px-2 py-[9px] text-sm border border-gray-300 focus:ring-2 focus:ring-indigo-600 focus:border-indigo-600",onChange:c=>o?a.onChange(Gy(c.target.value)):a.onChange(c)})}),l.invalid&&R("p",{className:"mt-2 text-sm text-red-600",children:[e," is invalid"]})]})}function Fi({primaryLabel:e,secondaryLabel:t,secondaryOnClick:n,isBusy:r}){return R("div",{className:"flex flex-row-reverse pt-4 pb-6 gap-3 border-t -mx-6 px-6",children:[R("button",{type:"submit",className:"rounded-md bg-indigo-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600",disabled:r,children:r?R("div",{className:"animate-spin size-5",children:R(Fw,{})}):e}),R("button",{type:"button",className:"rounded-md bg-white px-3.5 py-2.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:n,disabled:r,children:t})]})}function qy({defaultValues:e,validateFirstName:t,validateLastName:n,validateEmail:r,validateMobilePhone:s,onSubmit:i,onBack:o}){const{handleSubmit:a,control:l,getValues:c}=Di({mode:"onChange",defaultValues:e});return R(ve,{children:[R("div",{className:"font-bold text-lg mb-4",children:"Primary contact"}),R("form",{className:"space-y-6",onSubmit:a(i),children:[R("div",{className:"grid grid-cols-2 gap-3",children:[R(gt,{label:"Given name",name:"FirstName",control:l,placeholder:"e.g. Sam",validate:t}),R(gt,{label:"Family name / surname",name:"LastName",control:l,placeholder:"e.g. Smith",validate:n})]}),R(gt,{label:"Email",name:"Email",control:l,placeholder:"e.g. sam.smith@example.com",validate:r}),R("div",{className:"grid grid-cols-2 gap-3",children:R(gt,{label:"Mobile phone number",name:"MobilePhone",control:l,placeholder:"e.g. +61400111222",validate:s})}),R(Fi,{primaryLabel:"Next",secondaryLabel:"Back",secondaryOnClick:()=>o(c())})]})]})}function Ky(e,t){return f(qy,{defaultValues:e,validateFirstName:n=>mt(Cc(n)),validateLastName:n=>mt(Ac(n)),validateEmail:n=>mt(Ec(n)),validateMobilePhone:n=>mt(Ic(n)),onSubmit:n=>{t(new tn(3,[n])),t(new tn(0,[]))},onBack:n=>{t(new tn(3,[n])),t(new tn(1,[]))}})}function Zy(){return R("div",{className:"rounded-md bg-red-50 p-4 mb-2",children:R("div",{className:"flex",children:[R("div",{className:"shrink-0",children:R(Uw,{"aria-hidden":"true",className:"size-5 text-red-400"})}),R("div",{className:"ml-3",children:[R("h3",{className:"text-sm font-medium text-red-800",children:"We're having trouble creating the account"}),R("div",{className:"mt-2 text-sm text-red-700",children:R("p",{children:"Please try again. If this keeps happening, please contact support."})})]})]})})}function Jy({defaultValues:e,validateAddress1:t,validateAddress2:n,validateCity:r,validateState:s,validatePostcode:i,accountCreationInProgress:o,accountCreationFailed:a,onSubmit:l,onBack:c}){const{handleSubmit:d,control:u,register:m,getValues:h}=Di({mode:"onChange",defaultValues:e});return R(ve,{children:[a&&R(Zy,{}),R("div",{className:"font-bold text-lg mb-4",children:"Business address"}),R("form",{className:"space-y-6",onSubmit:d(l),children:[R(gt,{label:"Address (Line one)",name:"Line1",control:u,placeholder:"e.g. 100 Example Street",validate:t}),R(gt,{label:"Address (Line two)",name:"Line2",control:u,placeholder:"Example: Floor, Unit, Building name, etc.",validate:n,optional:!0}),R("div",{className:"grid grid-cols-2 gap-3",children:[R(gt,{label:"City / Suburb",name:"City",control:u,placeholder:"e.g. Sydney",validate:r}),R("div",{children:[R("label",{className:"block text-sm font-medium",children:"State"}),R("select",{className:"mt-2 w-full appearance-none rounded-md bg-white px-2 py-[9px] text-sm border border-gray-300 focus:ring-2 focus:ring-indigo-600 focus:border-indigo-600",...m("State",{validate:s}),children:[R("option",{children:"NSW"}),R("option",{children:"VIC"}),R("option",{children:"QLD"}),R("option",{children:"SA"}),R("option",{children:"WA"}),R("option",{children:"NT"}),R("option",{children:"TAS"}),R("option",{children:"ACT"})]})]})]}),R("div",{className:"grid grid-cols-2 gap-3",children:R(gt,{label:"Postcode",name:"Postcode",control:u,placeholder:"e.g. 2000",validate:i,isNumber:!0})}),R(Fi,{primaryLabel:"Add account",secondaryLabel:"Back",secondaryOnClick:()=>c(h()),isBusy:o})]})]})}function Yy(e,t,n,r){return f(Jy,{defaultValues:e,validateAddress1:s=>mt(I0(s)),validateAddress2:s=>oi(s)?!0:N0(s)!=null,validateCity:s=>mt(T0(s)),validateState:s=>mt(M0(s)),validatePostcode:s=>mt(R0(s)),accountCreationInProgress:t,accountCreationFailed:n,onSubmit:s=>{r(new tn(4,[s])),r(new tn(5,[]))},onBack:s=>{r(new tn(4,[s])),r(new tn(1,[]))}})}function Vs(e,t,n){let r=n.initialDeps??[],s;return()=>{var i,o,a,l;let c;n.key&&((i=n.debug)!=null&&i.call(n))&&(c=Date.now());const d=e();if(!(d.length!==r.length||d.some((h,p)=>r[p]!==h)))return s;r=d;let m;if(n.key&&((o=n.debug)!=null&&o.call(n))&&(m=Date.now()),s=t(...d),n.key&&((a=n.debug)!=null&&a.call(n))){const h=Math.round((Date.now()-c)*100)/100,p=Math.round((Date.now()-m)*100)/100,w=p/16,g=(C,x)=>{for(C=String(C);C.length<x;)C=" "+C;return C};console.info(`%c⏱ ${g(p,5)} /${g(h,5)} ms`,`
46
46
  font-size: .6rem;
47
47
  font-weight: bold;
48
- color: hsl(${Math.max(0,Math.min(120-120*w,120))}deg 100% 31%);`,n==null?void 0:n.key)}return(l=n==null?void 0:n.onChange)==null||l.call(n,s),s}}function Na(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Dy=(e,t)=>Math.abs(e-t)<1,Fy=(e,t,n)=>{let r;return function(...s){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,s),n)}},Vy=e=>e,Ly=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let s=t;s<=n;s++)r.push(s);return r},By=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const s=i=>{const{width:a,height:l}=i;t({width:Math.round(a),height:Math.round(l)})};if(s(n.getBoundingClientRect()),!r.ResizeObserver)return()=>{};const o=new r.ResizeObserver(i=>{const a=i[0];if(a!=null&&a.borderBoxSize){const l=a.borderBoxSize[0];if(l){s({width:l.inlineSize,height:l.blockSize});return}}s(n.getBoundingClientRect())});return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}},Bf={passive:!0},Uy=typeof window>"u"?!0:"onscrollend"in window,zy=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let s=0;const o=Uy?()=>{}:Fy(r,()=>{t(s,!1)},e.options.isScrollingResetDelay),i=c=>()=>{s=n[e.options.horizontal?"scrollLeft":"scrollTop"],o(),t(s,c)},a=i(!0),l=i(!1);return l(),n.addEventListener("scroll",a,Bf),n.addEventListener("scrollend",l,Bf),()=>{n.removeEventListener("scroll",a),n.removeEventListener("scrollend",l)}},jy=(e,t,n)=>{if(t!=null&&t.borderBoxSize){const r=t.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[n.options.horizontal?"width":"height"])},Hy=(e,{adjustments:t=0,behavior:n},r)=>{var s,o;const i=e+t;(o=(s=r.scrollElement)==null?void 0:s.scrollTo)==null||o.call(s,{[r.options.horizontal?"left":"top"]:i,behavior:n})};class Wy{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(s=>{s.forEach(o=>{this._measureElement(o.target,o)})}));return{disconnect:()=>{var s;return(s=r())==null?void 0:s.disconnect()},observe:s=>{var o;return(o=r())==null?void 0:o.observe(s,{box:"border-box"})},unobserve:s=>{var o;return(o=r())==null?void 0:o.unobserve(s)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,s])=>{typeof s>"u"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Vy,rangeExtractor:Ly,onChange:()=>{},measureElement:jy,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,...n}},this.notify=(n,r)=>{var s,o;const{startIndex:i,endIndex:a}=this.range??{startIndex:void 0,endIndex:void 0},l=this.calculateRange();(n||i!==(l==null?void 0:l.startIndex)||a!==(l==null?void 0:l.endIndex))&&((o=(s=this.options).onChange)==null||o.call(s,this,r))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.notify(!1,!1);return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(s,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<s?"forward":"backward":null,this.scrollOffset=s;const i=this.isScrolling;this.isScrolling=o,this.notify(i!==o,o)}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,r)=>{const s=new Map,o=new Map;for(let i=r-1;i>=0;i--){const a=n[i];if(s.has(a.lane))continue;const l=o.get(a.lane);if(l==null||a.end>l.end?o.set(a.lane,a):a.end<l.end&&s.set(a.lane,!0),s.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((i,a)=>i.end===a.end?i.index-a.index:i.end-a.end)[0]:void 0},this.getMeasurementOptions=Is(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,r,s,o,i)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:s,getItemKey:o,enabled:i}),{key:!1}),this.getMeasurements=Is(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:s,getItemKey:o,enabled:i},a)=>{var l;if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(u=>{this.itemSizeCache.set(u.key,u.size)}));const c=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const d=this.measurementsCache.slice(0,c);for(let u=c;u<n;u++){let h=(l=this.measurementsCache[u])==null?void 0:l.measureElement;h||(h=R=>{const D=o(u),Y=this.elementsCache.get(D);if(!R){Y&&(this.observer.unobserve(Y),this.elementsCache.delete(D));return}Y!==R&&(Y&&this.observer.unobserve(Y),this.observer.observe(R),this.elementsCache.set(D,R)),R.isConnected&&this.resizeItem(u,this.options.measureElement(R,void 0,this))});const f=o(u),m=this.options.lanes===1?d[u-1]:this.getFurthestMeasurement(d,u),w=m?m.end+this.options.gap:r+s,$=a.get(f),v=typeof $=="number"?$:this.options.estimateSize(u),_=w+v,C=m?m.lane:u%this.options.lanes;d[u]={index:u,start:w,size:v,end:_,key:f,lane:C,measureElement:h}}return this.measurementsCache=d,d},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Is(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(n,r,s)=>this.range=n.length>0&&r>0?Gy({measurements:n,outerSize:r,scrollOffset:s}):null,{key:!1,debug:()=>this.options.debug}),this.getIndexes=Is(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(n,r,s,o)=>r===null?[]:n({startIndex:r.startIndex,endIndex:r.endIndex,overscan:s,count:o}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,s=n.getAttribute(r);return s?parseInt(s,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(n,r)=>{const s=this.indexFromElement(n),o=this.getMeasurements()[s];if(!o||!n.isConnected){this.elementsCache.forEach((a,l)=>{a===n&&(this.observer.unobserve(n),this.elementsCache.delete(l))});return}const i=this.elementsCache.get(o.key);i!==n&&(i&&this.observer.unobserve(i),this.observer.observe(n),this.elementsCache.set(o.key,n)),this.resizeItem(s,this.options.measureElement(n,r,this))},this.resizeItem=(n,r)=>{const s=this.getMeasurements()[n];if(!s)return;const o=this.itemSizeCache.get(s.key)??s.size,i=r-o;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(s,i,this):s.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(s.index),this.itemSizeCache=new Map(this.itemSizeCache.set(s.key,r)),this.notify(!0,!1))},this.measureElement=n=>{n&&this._measureElement(n,void 0)},this.getVirtualItems=Is(()=>[this.getIndexes(),this.getMeasurements()],(n,r)=>{const s=[];for(let o=0,i=n.length;o<i;o++){const a=n[o],l=r[a];s.push(l)}return s},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length!==0)return Na(r[Uf(0,r.length-1,s=>Na(r[s]).start,n)])},this.getOffsetForAlignment=(n,r)=>{const s=this.getSize(),o=this.getScrollOffset();r==="auto"&&(n<=o?r="start":n>=o+s?r="end":r="start"),r==="start"?n=n:r==="end"?n=n-s:r==="center"&&(n=n-s/2);const i=this.options.horizontal?"scrollWidth":"scrollHeight",l=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[i]:this.scrollElement[i]:0)-s;return Math.max(Math.min(l,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const s=this.getMeasurements()[n];if(!s)return;const o=this.getSize(),i=this.getScrollOffset();if(r==="auto")if(s.end>=i+o-this.options.scrollPaddingEnd)r="end";else if(s.start<=i+this.options.scrollPaddingStart)r="start";else return[i,r];const a=r==="end"?s.end+this.options.scrollPaddingEnd:s.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,r),r]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(n,{align:r="start",behavior:s}={})=>{this.cancelScrollToIndex(),s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,r),{adjustments:void 0,behavior:s})},this.scrollToIndex=(n,{align:r="auto",behavior:s}={})=>{n=Math.max(0,Math.min(n,this.options.count-1)),this.cancelScrollToIndex(),s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const o=this.getOffsetForIndex(n,r);if(!o)return;const[i,a]=o;this._scrollToOffset(i,{adjustments:void 0,behavior:s}),s!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(n))){const[c]=Na(this.getOffsetForIndex(n,a));Dy(c,this.getScrollOffset())||this.scrollToIndex(n,{align:a,behavior:s})}else this.scrollToIndex(n,{align:a,behavior:s})}))},this.scrollBy=(n,{behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let s;return r.length===0?s=this.options.paddingStart:s=this.options.lanes===1?((n=r[r.length-1])==null?void 0:n.end)??0:Math.max(...r.slice(-this.options.lanes).map(o=>o.end)),s-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(n,{adjustments:r,behavior:s})=>{this.options.scrollToFn(n,{behavior:s,adjustments:r},this)},this.measure=()=>{var n,r;this.itemSizeCache=new Map,(r=(n=this.options).onChange)==null||r.call(n,this,!1)},this.setOptions(t)}}const Uf=(e,t,n,r)=>{for(;e<=t;){const s=(e+t)/2|0,o=n(s);if(o<r)e=s+1;else if(o>r)t=s-1;else return s}return e>0?e-1:0};function Gy({measurements:e,outerSize:t,scrollOffset:n}){const r=e.length-1,o=Uf(0,r,a=>e[a].start,n);let i=o;for(;i<r&&e[i].end<n+t;)i++;return{startIndex:o,endIndex:i}}const qy=typeof document<"u"?yn:Te;function Ky(e){const t=Mr(()=>({}),{})[1],n={...e,onChange:(s,o)=>{var i;o?Wi(t):t(),(i=e.onChange)==null||i.call(e,s,o)}},[r]=Ge(()=>new Wy(n));return r.setOptions(n),Te(()=>r._didMount(),[]),qy(()=>r._willUpdate()),r}function Zy(e){return Ky({observeElementRect:By,observeElementOffset:zy,scrollToFn:Hy,...e})}var Jy=Object.defineProperty,Yy=(e,t,n)=>t in e?Jy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ma=(e,t,n)=>(Yy(e,typeof t!="symbol"?t+"":t,n),n);let Xy=class{constructor(){Ma(this,"current",this.detect()),Ma(this,"handoffState","pending"),Ma(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},ur=new Xy,Ze=(e,t)=>{ur.isServer?Te(e,t):yn(e,t)};function an(e){let t=ce(e);return Ze(()=>{t.current=e},[e]),t}function Ra(e,t){let[n,r]=Ge(e),s=an(e);return Ze(()=>r(s.current),[s,r,...t]),n}let ie=function(e){let t=an(e);return q.useCallback((...n)=>t.current(...n),[t])};function Qy(e,t,n){let[r,s]=Ge(n),o=e!==void 0,i=ce(o),a=ce(!1),l=ce(!1);return o&&!i.current&&!a.current?(a.current=!0,i.current=o,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!o&&i.current&&!l.current&&(l.current=!0,i.current=o,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[o?e:r,ie(c=>(o||s(c),t==null?void 0:t(c)))]}function eb(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function dr(){let e=[],t={addEventListener(n,r,s,o){return n.addEventListener(r,s,o),t.add(()=>n.removeEventListener(r,s,o))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return eb(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,s){let o=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:s}),this.add(()=>{Object.assign(n.style,{[r]:o})})},group(n){let r=dr();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let s of e.splice(r,1))s()}},dispose(){for(let n of e.splice(0))n()}};return t}function Ts(){let[e]=Ge(dr);return Te(()=>()=>e.dispose(),[e]),e}function tb(){let e=typeof document>"u";return"useSyncExternalStore"in Xi?(t=>t.useSyncExternalStore)(Xi)(()=>()=>{},()=>!1,()=>!e):!1}function Pa(){let e=tb(),[t,n]=Ge(ur.isHandoffComplete);return t&&ur.isHandoffComplete===!1&&n(!1),Te(()=>{t!==!0&&n(!0)},[t]),Te(()=>ur.handoff(),[]),e?!1:t}var zf;let Ns=(zf=q.useId)!=null?zf:function(){let e=Pa(),[t,n]=q.useState(e?()=>ur.nextId():null);return Ze(()=>{t===null&&n(ur.nextId())},[t]),t!=null?""+t:void 0};function lt(e,t,...n){if(e in t){let s=t[e];return typeof s=="function"?s(...n):s}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(s=>`"${s}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,lt),r}function Oa(e){return ur.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let jf=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var nb=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(nb||{}),rb=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(rb||{}),sb=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(sb||{}),Hf=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Hf||{});function ob(e,t=0){var n;return e===((n=Oa(e))==null?void 0:n.body)?!1:lt(t,{0(){return e.matches(jf)},1(){let r=e;for(;r!==null;){if(r.matches(jf))return!0;r=r.parentElement}return!1}})}var ib=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(ib||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function ab(e,t=n=>n){return e.slice().sort((n,r)=>{let s=t(n),o=t(r);if(s===null||o===null)return 0;let i=s.compareDocumentPosition(o);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function lb(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function cb(){return/Android/gi.test(window.navigator.userAgent)}function Wf(){return lb()||cb()}function To(e,t,n){let r=an(t);Te(()=>{function s(o){r.current(o)}return document.addEventListener(e,s,n),()=>document.removeEventListener(e,s,n)},[e,n])}function ub(e,t,n){let r=an(t);Te(()=>{function s(o){r.current(o)}return window.addEventListener(e,s,n),()=>window.removeEventListener(e,s,n)},[e,n])}function db(e,t,n=!0){let r=ce(!1);Te(()=>{requestAnimationFrame(()=>{r.current=n})},[n]);function s(i,a){if(!r.current||i.defaultPrevented)return;let l=a(i);if(l===null||!l.getRootNode().contains(l)||!l.isConnected)return;let c=function d(u){return typeof u=="function"?d(u()):Array.isArray(u)||u instanceof Set?u:[u]}(e);for(let d of c){if(d===null)continue;let u=d instanceof HTMLElement?d:d.current;if(u!=null&&u.contains(l)||i.composed&&i.composedPath().includes(u))return}return!ob(l,Hf.Loose)&&l.tabIndex!==-1&&i.preventDefault(),t(i,l)}let o=ce(null);To("pointerdown",i=>{var a,l;r.current&&(o.current=((l=(a=i.composedPath)==null?void 0:a.call(i))==null?void 0:l[0])||i.target)},!0),To("mousedown",i=>{var a,l;r.current&&(o.current=((l=(a=i.composedPath)==null?void 0:a.call(i))==null?void 0:l[0])||i.target)},!0),To("click",i=>{Wf()||o.current&&(s(i,()=>o.current),o.current=null)},!0),To("touchend",i=>s(i,()=>i.target instanceof HTMLElement?i.target:null),!0),ub("blur",i=>s(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function fb(...e){return at(()=>Oa(...e),[...e])}function Gf(e){var t;if(e.type)return e.type;let n=(t=e.as)!=null?t:"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function hb(e,t){let[n,r]=Ge(()=>Gf(e));return Ze(()=>{r(Gf(e))},[e.type,e.as]),Ze(()=>{n||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&r("button")},[n,t]),n}let mb=Symbol();function fr(...e){let t=ce(e);Te(()=>{t.current=e},[e]);let n=ie(r=>{for(let s of t.current)s!=null&&(typeof s=="function"?s(r):s.current=r)});return e.every(r=>r==null||(r==null?void 0:r[mb]))?void 0:n}function qf(e){return[e.screenX,e.screenY]}function pb(){let e=ce([-1,-1]);return{wasMoved(t){let n=qf(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=qf(t)}}}function $b({container:e,accept:t,walk:n,enabled:r=!0}){let s=ce(t),o=ce(n);Te(()=>{s.current=t,o.current=n},[t,n]),Ze(()=>{if(!e||!r)return;let i=Oa(e);if(!i)return;let a=s.current,l=o.current,c=Object.assign(u=>a(u),{acceptNode:a}),d=i.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,c,!1);for(;d.nextNode();)l(d.currentNode)},[e,r,s,o])}function Kf(e,t){let n=ce([]),r=ie(e);Te(()=>{let s=[...n.current];for(let[o,i]of t.entries())if(n.current[o]!==i){let a=r(t,s);return n.current=t,a}},[r,...t])}function No(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var Mo=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Mo||{}),Vn=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Vn||{});function Cn({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:s,visible:o=!0,name:i,mergeRefs:a}){a=a??gb;let l=Zf(t,e);if(o)return Ro(l,n,r,i,a);let c=s??0;if(c&2){let{static:d=!1,...u}=l;if(d)return Ro(u,n,r,i,a)}if(c&1){let{unmount:d=!0,...u}=l;return lt(d?0:1,{0(){return null},1(){return Ro({...u,hidden:!0,style:{display:"none"}},n,r,i,a)}})}return Ro(l,n,r,i,a)}function Ro(e,t={},n,r,s){let{as:o=n,children:i,refName:a="ref",...l}=Fa(e,["unmount","static"]),c=e.ref!==void 0?{[a]:e.ref}:{},d=typeof i=="function"?i(t):i;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t));let u={};if(t){let h=!1,f=[];for(let[m,w]of Object.entries(t))typeof w=="boolean"&&(h=!0),w===!0&&f.push(m);h&&(u["data-headlessui-state"]=f.join(" "))}if(o===Ie&&Object.keys(Da(l)).length>0){if(!Pr(d)||Array.isArray(d)&&d.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(l).map(w=>` - ${w}`).join(`
48
+ color: hsl(${Math.max(0,Math.min(120-120*w,120))}deg 100% 31%);`,n==null?void 0:n.key)}return(l=n==null?void 0:n.onChange)==null||l.call(n,s),s}}function Ka(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Xy=(e,t)=>Math.abs(e-t)<1,Qy=(e,t,n)=>{let r;return function(...s){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,s),n)}},e_=e=>e,t_=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let s=t;s<=n;s++)r.push(s);return r},n_=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const s=o=>{const{width:a,height:l}=o;t({width:Math.round(a),height:Math.round(l)})};if(s(n.getBoundingClientRect()),!r.ResizeObserver)return()=>{};const i=new r.ResizeObserver(o=>{const a=o[0];if(a!=null&&a.borderBoxSize){const l=a.borderBoxSize[0];if(l){s({width:l.inlineSize,height:l.blockSize});return}}s(n.getBoundingClientRect())});return i.observe(n,{box:"border-box"}),()=>{i.unobserve(n)}},Xf={passive:!0},r_=typeof window>"u"?!0:"onscrollend"in window,s_=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let s=0;const i=r_?()=>{}:Qy(r,()=>{t(s,!1)},e.options.isScrollingResetDelay),o=c=>()=>{s=n[e.options.horizontal?"scrollLeft":"scrollTop"],i(),t(s,c)},a=o(!0),l=o(!1);return l(),n.addEventListener("scroll",a,Xf),n.addEventListener("scrollend",l,Xf),()=>{n.removeEventListener("scroll",a),n.removeEventListener("scrollend",l)}},i_=(e,t,n)=>{if(t!=null&&t.borderBoxSize){const r=t.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[n.options.horizontal?"width":"height"])},o_=(e,{adjustments:t=0,behavior:n},r)=>{var s,i;const o=e+t;(i=(s=r.scrollElement)==null?void 0:s.scrollTo)==null||i.call(s,{[r.options.horizontal?"left":"top"]:o,behavior:n})};class a_{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(s=>{s.forEach(i=>{this._measureElement(i.target,i)})}));return{disconnect:()=>{var s;return(s=r())==null?void 0:s.disconnect()},observe:s=>{var i;return(i=r())==null?void 0:i.observe(s,{box:"border-box"})},unobserve:s=>{var i;return(i=r())==null?void 0:i.unobserve(s)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,s])=>{typeof s>"u"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:e_,rangeExtractor:t_,onChange:()=>{},measureElement:i_,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,...n}},this.notify=(n,r)=>{var s,i;const{startIndex:o,endIndex:a}=this.range??{startIndex:void 0,endIndex:void 0},l=this.calculateRange();(n||o!==(l==null?void 0:l.startIndex)||a!==(l==null?void 0:l.endIndex))&&((i=(s=this.options).onChange)==null||i.call(s,this,r))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.notify(!1,!1);return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(s,i)=>{this.scrollAdjustments=0,this.scrollDirection=i?this.getScrollOffset()<s?"forward":"backward":null,this.scrollOffset=s;const o=this.isScrolling;this.isScrolling=i,this.notify(o!==i,i)}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,r)=>{const s=new Map,i=new Map;for(let o=r-1;o>=0;o--){const a=n[o];if(s.has(a.lane))continue;const l=i.get(a.lane);if(l==null||a.end>l.end?i.set(a.lane,a):a.end<l.end&&s.set(a.lane,!0),s.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((o,a)=>o.end===a.end?o.index-a.index:o.end-a.end)[0]:void 0},this.getMeasurementOptions=Vs(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,r,s,i,o)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:s,getItemKey:i,enabled:o}),{key:!1}),this.getMeasurements=Vs(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:s,getItemKey:i,enabled:o},a)=>{var l;if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(u=>{this.itemSizeCache.set(u.key,u.size)}));const c=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const d=this.measurementsCache.slice(0,c);for(let u=c;u<n;u++){let m=(l=this.measurementsCache[u])==null?void 0:l.measureElement;m||(m=P=>{const V=i(u),Y=this.elementsCache.get(V);if(!P){Y&&(this.observer.unobserve(Y),this.elementsCache.delete(V));return}Y!==P&&(Y&&this.observer.unobserve(Y),this.observer.observe(P),this.elementsCache.set(V,P)),P.isConnected&&this.resizeItem(u,this.options.measureElement(P,void 0,this))});const h=i(u),p=this.options.lanes===1?d[u-1]:this.getFurthestMeasurement(d,u),w=p?p.end+this.options.gap:r+s,g=a.get(h),C=typeof g=="number"?g:this.options.estimateSize(u),x=w+C,A=p?p.lane:u%this.options.lanes;d[u]={index:u,start:w,size:C,end:x,key:h,lane:A,measureElement:m}}return this.measurementsCache=d,d},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Vs(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(n,r,s)=>this.range=n.length>0&&r>0?l_({measurements:n,outerSize:r,scrollOffset:s}):null,{key:!1,debug:()=>this.options.debug}),this.getIndexes=Vs(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(n,r,s,i)=>r===null?[]:n({startIndex:r.startIndex,endIndex:r.endIndex,overscan:s,count:i}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,s=n.getAttribute(r);return s?parseInt(s,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(n,r)=>{const s=this.indexFromElement(n),i=this.getMeasurements()[s];if(!i||!n.isConnected){this.elementsCache.forEach((a,l)=>{a===n&&(this.observer.unobserve(n),this.elementsCache.delete(l))});return}const o=this.elementsCache.get(i.key);o!==n&&(o&&this.observer.unobserve(o),this.observer.observe(n),this.elementsCache.set(i.key,n)),this.resizeItem(s,this.options.measureElement(n,r,this))},this.resizeItem=(n,r)=>{const s=this.getMeasurements()[n];if(!s)return;const i=this.itemSizeCache.get(s.key)??s.size,o=r-i;o!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(s,o,this):s.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=o,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(s.index),this.itemSizeCache=new Map(this.itemSizeCache.set(s.key,r)),this.notify(!0,!1))},this.measureElement=n=>{n&&this._measureElement(n,void 0)},this.getVirtualItems=Vs(()=>[this.getIndexes(),this.getMeasurements()],(n,r)=>{const s=[];for(let i=0,o=n.length;i<o;i++){const a=n[i],l=r[a];s.push(l)}return s},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length!==0)return Ka(r[Qf(0,r.length-1,s=>Ka(r[s]).start,n)])},this.getOffsetForAlignment=(n,r)=>{const s=this.getSize(),i=this.getScrollOffset();r==="auto"&&(n<=i?r="start":n>=i+s?r="end":r="start"),r==="start"?n=n:r==="end"?n=n-s:r==="center"&&(n=n-s/2);const o=this.options.horizontal?"scrollWidth":"scrollHeight",l=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[o]:this.scrollElement[o]:0)-s;return Math.max(Math.min(l,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const s=this.getMeasurements()[n];if(!s)return;const i=this.getSize(),o=this.getScrollOffset();if(r==="auto")if(s.end>=o+i-this.options.scrollPaddingEnd)r="end";else if(s.start<=o+this.options.scrollPaddingStart)r="start";else return[o,r];const a=r==="end"?s.end+this.options.scrollPaddingEnd:s.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,r),r]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(n,{align:r="start",behavior:s}={})=>{this.cancelScrollToIndex(),s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,r),{adjustments:void 0,behavior:s})},this.scrollToIndex=(n,{align:r="auto",behavior:s}={})=>{n=Math.max(0,Math.min(n,this.options.count-1)),this.cancelScrollToIndex(),s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const i=this.getOffsetForIndex(n,r);if(!i)return;const[o,a]=i;this._scrollToOffset(o,{adjustments:void 0,behavior:s}),s!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(n))){const[c]=Ka(this.getOffsetForIndex(n,a));Xy(c,this.getScrollOffset())||this.scrollToIndex(n,{align:a,behavior:s})}else this.scrollToIndex(n,{align:a,behavior:s})}))},this.scrollBy=(n,{behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let s;return r.length===0?s=this.options.paddingStart:s=this.options.lanes===1?((n=r[r.length-1])==null?void 0:n.end)??0:Math.max(...r.slice(-this.options.lanes).map(i=>i.end)),s-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(n,{adjustments:r,behavior:s})=>{this.options.scrollToFn(n,{behavior:s,adjustments:r},this)},this.measure=()=>{var n,r;this.itemSizeCache=new Map,(r=(n=this.options).onChange)==null||r.call(n,this,!1)},this.setOptions(t)}}const Qf=(e,t,n,r)=>{for(;e<=t;){const s=(e+t)/2|0,i=n(s);if(i<r)e=s+1;else if(i>r)t=s-1;else return s}return e>0?e-1:0};function l_({measurements:e,outerSize:t,scrollOffset:n}){const r=e.length-1,i=Qf(0,r,a=>e[a].start,n);let o=i;for(;o<r&&e[o].end<n+t;)o++;return{startIndex:i,endIndex:o}}const c_=typeof document<"u"?kn:Te;function u_(e){const t=Fr(()=>({}),{})[1],n={...e,onChange:(s,i)=>{var o;i?sa(t):t(),(o=e.onChange)==null||o.call(e,s,i)}},[r]=Ze(()=>new a_(n));return r.setOptions(n),Te(()=>r._didMount(),[]),c_(()=>r._willUpdate()),r}function d_(e){return u_({observeElementRect:n_,observeElementOffset:s_,scrollToFn:o_,...e})}var f_=Object.defineProperty,h_=(e,t,n)=>t in e?f_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Za=(e,t,n)=>(h_(e,typeof t!="symbol"?t+"":t,n),n);let m_=class{constructor(){Za(this,"current",this.detect()),Za(this,"handoffState","pending"),Za(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},hr=new m_,Qe=(e,t)=>{hr.isServer?Te(e,t):kn(e,t)};function pn(e){let t=de(e);return Qe(()=>{t.current=e},[e]),t}function Ja(e,t){let[n,r]=Ze(e),s=pn(e);return Qe(()=>r(s.current),[s,r,...t]),n}let oe=function(e){let t=pn(e);return Z.useCallback((...n)=>t.current(...n),[t])};function p_(e,t,n){let[r,s]=Ze(n),i=e!==void 0,o=de(i),a=de(!1),l=de(!1);return i&&!o.current&&!a.current?(a.current=!0,o.current=i,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!i&&o.current&&!l.current&&(l.current=!0,o.current=i,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[i?e:r,oe(c=>(i||s(c),t==null?void 0:t(c)))]}function g_(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function mr(){let e=[],t={addEventListener(n,r,s,i){return n.addEventListener(r,s,i),t.add(()=>n.removeEventListener(r,s,i))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return g_(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,s){let i=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:s}),this.add(()=>{Object.assign(n.style,{[r]:i})})},group(n){let r=mr();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let s of e.splice(r,1))s()}},dispose(){for(let n of e.splice(0))n()}};return t}function Ls(){let[e]=Ze(mr);return Te(()=>()=>e.dispose(),[e]),e}function $_(){let e=typeof document>"u";return"useSyncExternalStore"in da?(t=>t.useSyncExternalStore)(da)(()=>()=>{},()=>!1,()=>!e):!1}function Ya(){let e=$_(),[t,n]=Ze(hr.isHandoffComplete);return t&&hr.isHandoffComplete===!1&&n(!1),Te(()=>{t!==!0&&n(!0)},[t]),Te(()=>hr.handoff(),[]),e?!1:t}var eh;let Bs=(eh=Z.useId)!=null?eh:function(){let e=Ya(),[t,n]=Z.useState(e?()=>hr.nextId():null);return Qe(()=>{t===null&&n(hr.nextId())},[t]),t!=null?""+t:void 0};function dt(e,t,...n){if(e in t){let s=t[e];return typeof s=="function"?s(...n):s}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(s=>`"${s}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,dt),r}function Xa(e){return hr.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let th=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var w_=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(w_||{}),y_=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(y_||{}),__=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(__||{}),nh=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(nh||{});function b_(e,t=0){var n;return e===((n=Xa(e))==null?void 0:n.body)?!1:dt(t,{0(){return e.matches(th)},1(){let r=e;for(;r!==null;){if(r.matches(th))return!0;r=r.parentElement}return!1}})}var v_=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(v_||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function x_(e,t=n=>n){return e.slice().sort((n,r)=>{let s=t(n),i=t(r);if(s===null||i===null)return 0;let o=s.compareDocumentPosition(i);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function C_(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function S_(){return/Android/gi.test(window.navigator.userAgent)}function rh(){return C_()||S_()}function Vi(e,t,n){let r=pn(t);Te(()=>{function s(i){r.current(i)}return document.addEventListener(e,s,n),()=>document.removeEventListener(e,s,n)},[e,n])}function A_(e,t,n){let r=pn(t);Te(()=>{function s(i){r.current(i)}return window.addEventListener(e,s,n),()=>window.removeEventListener(e,s,n)},[e,n])}function k_(e,t,n=!0){let r=de(!1);Te(()=>{requestAnimationFrame(()=>{r.current=n})},[n]);function s(o,a){if(!r.current||o.defaultPrevented)return;let l=a(o);if(l===null||!l.getRootNode().contains(l)||!l.isConnected)return;let c=function d(u){return typeof u=="function"?d(u()):Array.isArray(u)||u instanceof Set?u:[u]}(e);for(let d of c){if(d===null)continue;let u=d instanceof HTMLElement?d:d.current;if(u!=null&&u.contains(l)||o.composed&&o.composedPath().includes(u))return}return!b_(l,nh.Loose)&&l.tabIndex!==-1&&o.preventDefault(),t(o,l)}let i=de(null);Vi("pointerdown",o=>{var a,l;r.current&&(i.current=((l=(a=o.composedPath)==null?void 0:a.call(o))==null?void 0:l[0])||o.target)},!0),Vi("mousedown",o=>{var a,l;r.current&&(i.current=((l=(a=o.composedPath)==null?void 0:a.call(o))==null?void 0:l[0])||o.target)},!0),Vi("click",o=>{rh()||i.current&&(s(o,()=>i.current),i.current=null)},!0),Vi("touchend",o=>s(o,()=>o.target instanceof HTMLElement?o.target:null),!0),A_("blur",o=>s(o,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function E_(...e){return ct(()=>Xa(...e),[...e])}function sh(e){var t;if(e.type)return e.type;let n=(t=e.as)!=null?t:"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function I_(e,t){let[n,r]=Ze(()=>sh(e));return Qe(()=>{r(sh(e))},[e.type,e.as]),Qe(()=>{n||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&r("button")},[n,t]),n}let N_=Symbol();function pr(...e){let t=de(e);Te(()=>{t.current=e},[e]);let n=oe(r=>{for(let s of t.current)s!=null&&(typeof s=="function"?s(r):s.current=r)});return e.every(r=>r==null||(r==null?void 0:r[N_]))?void 0:n}function ih(e){return[e.screenX,e.screenY]}function T_(){let e=de([-1,-1]);return{wasMoved(t){let n=ih(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=ih(t)}}}function R_({container:e,accept:t,walk:n,enabled:r=!0}){let s=de(t),i=de(n);Te(()=>{s.current=t,i.current=n},[t,n]),Qe(()=>{if(!e||!r)return;let o=Xa(e);if(!o)return;let a=s.current,l=i.current,c=Object.assign(u=>a(u),{acceptNode:a}),d=o.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,c,!1);for(;d.nextNode();)l(d.currentNode)},[e,r,s,i])}function oh(e,t){let n=de([]),r=oe(e);Te(()=>{let s=[...n.current];for(let[i,o]of t.entries())if(n.current[i]!==o){let a=r(t,s);return n.current=t,a}},[r,...t])}function Li(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var Bi=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Bi||{}),qn=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(qn||{});function Rn({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:s,visible:i=!0,name:o,mergeRefs:a}){a=a??M_;let l=ah(t,e);if(i)return Ui(l,n,r,o,a);let c=s??0;if(c&2){let{static:d=!1,...u}=l;if(d)return Ui(u,n,r,o,a)}if(c&1){let{unmount:d=!0,...u}=l;return dt(d?0:1,{0(){return null},1(){return Ui({...u,hidden:!0,style:{display:"none"}},n,r,o,a)}})}return Ui(l,n,r,o,a)}function Ui(e,t={},n,r,s){let{as:i=n,children:o,refName:a="ref",...l}=el(e,["unmount","static"]),c=e.ref!==void 0?{[a]:e.ref}:{},d=typeof o=="function"?o(t):o;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t));let u={};if(t){let m=!1,h=[];for(let[p,w]of Object.entries(t))typeof w=="boolean"&&(m=!0),w===!0&&h.push(p);m&&(u["data-headlessui-state"]=h.join(" "))}if(i===ve&&Object.keys(Qa(l)).length>0){if(!Lr(d)||Array.isArray(d)&&d.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(l).map(w=>` - ${w}`).join(`
49
49
  `),"","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(w=>` - ${w}`).join(`
50
50
  `)].join(`
51
- `));let h=d.props,f=typeof(h==null?void 0:h.className)=="function"?(...w)=>No(h==null?void 0:h.className(...w),l.className):No(h==null?void 0:h.className,l.className),m=f?{className:f}:{};return Hi(d,Object.assign({},Zf(d.props,Da(Fa(l,["ref"]))),u,c,{ref:s(d.ref,c.ref)},m))}return p(o,Object.assign({},Fa(l,["ref"]),o!==Ie&&c,o!==Ie&&u),d)}function gb(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function Zf(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let s in r)s.startsWith("on")&&typeof r[s]=="function"?(n[s]!=null||(n[s]=[]),n[s].push(r[s])):t[s]=r[s];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](s,...o){let i=n[r];for(let a of i){if((s instanceof Event||(s==null?void 0:s.nativeEvent)instanceof Event)&&s.defaultPrevented)return;a(s,...o)}}});return t}function ln(e){var t;return Object.assign(Rn(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Da(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Fa(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}let wb="div";var Jf=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Jf||{});function yb(e,t){var n;let{features:r=1,...s}=e,o={ref:t,"aria-hidden":(r&2)===2?!0:(n=s["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return Cn({ourProps:o,theirProps:s,slot:{},defaultTag:wb,name:"Hidden"})}let bb=ln(yb),Va=Nn(null);Va.displayName="OpenClosedContext";var Ot=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Ot||{});function La(){return rn(Va)}function Yf({value:e,children:t}){return q.createElement(Va.Provider,{value:e},t)}function _b(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let hr=[];_b(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&hr[0]!==t.target&&(hr.unshift(t.target),hr=hr.filter(n=>n!=null&&n.isConnected),hr.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function vb(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&xb(n)?!1:r}function xb(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}function Cb(e){throw new Error("Unexpected object: "+e)}var Je=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Je||{});function Xf(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),s=r??-1;switch(e.focus){case 0:{for(let o=0;o<n.length;++o)if(!t.resolveDisabled(n[o],o,n))return o;return r}case 1:{for(let o=s-1;o>=0;--o)if(!t.resolveDisabled(n[o],o,n))return o;return r}case 2:{for(let o=s+1;o<n.length;++o)if(!t.resolveDisabled(n[o],o,n))return o;return r}case 3:{for(let o=n.length-1;o>=0;--o)if(!t.resolveDisabled(n[o],o,n))return o;return r}case 4:{for(let o=0;o<n.length;++o)if(t.resolveId(n[o],o,n)===e.id)return o;return r}case 5:return null;default:Cb(e)}}function Qf(e={},t=null,n=[]){for(let[r,s]of Object.entries(e))th(n,eh(t,r),s);return n}function eh(e,t){return e?e+"["+t+"]":t}function th(e,t,n){if(Array.isArray(n))for(let[r,s]of n.entries())th(e,eh(t,r.toString()),s);else n instanceof Date?e.push([t,n.toISOString()]):typeof n=="boolean"?e.push([t,n?"1":"0"]):typeof n=="string"?e.push([t,n]):typeof n=="number"?e.push([t,`${n}`]):n==null?e.push([t,""]):Qf(n,t,e)}var Dt=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Dt||{}),Sb={},kb=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(kb||{}),Ab=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Ab||{}),Eb=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(Eb||{}),Ib=(e=>(e[e.OpenCombobox=0]="OpenCombobox",e[e.CloseCombobox=1]="CloseCombobox",e[e.GoToOption=2]="GoToOption",e[e.RegisterOption=3]="RegisterOption",e[e.UnregisterOption=4]="UnregisterOption",e[e.RegisterLabel=5]="RegisterLabel",e[e.SetActivationTrigger=6]="SetActivationTrigger",e[e.UpdateVirtualOptions=7]="UpdateVirtualOptions",e))(Ib||{});function Ba(e,t=n=>n){let n=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=t(e.options.slice()),s=r.length>0&&r[0].dataRef.current.order!==null?r.sort((i,a)=>i.dataRef.current.order-a.dataRef.current.order):ab(r,i=>i.dataRef.current.domRef.current),o=n?s.indexOf(n):null;return o===-1&&(o=null),{options:s,activeOptionIndex:o}}let Tb={1(e){var t;return(t=e.dataRef.current)!=null&&t.disabled||e.comboboxState===1?e:{...e,activeOptionIndex:null,comboboxState:1}},0(e){var t,n;if((t=e.dataRef.current)!=null&&t.disabled||e.comboboxState===0)return e;if((n=e.dataRef.current)!=null&&n.value){let r=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(r!==-1)return{...e,activeOptionIndex:r,comboboxState:0}}return{...e,comboboxState:0}},2(e,t){var n,r,s,o,i;if((n=e.dataRef.current)!=null&&n.disabled||(r=e.dataRef.current)!=null&&r.optionsRef.current&&!((s=e.dataRef.current)!=null&&s.optionsPropsRef.current.static)&&e.comboboxState===1)return e;if(e.virtual){let d=t.focus===Je.Specific?t.idx:Xf(t,{resolveItems:()=>e.virtual.options,resolveActiveIndex:()=>{var h,f;return(f=(h=e.activeOptionIndex)!=null?h:e.virtual.options.findIndex(m=>!e.virtual.disabled(m)))!=null?f:null},resolveDisabled:e.virtual.disabled,resolveId(){throw new Error("Function not implemented.")}}),u=(o=t.trigger)!=null?o:2;return e.activeOptionIndex===d&&e.activationTrigger===u?e:{...e,activeOptionIndex:d,activationTrigger:u}}let a=Ba(e);if(a.activeOptionIndex===null){let d=a.options.findIndex(u=>!u.dataRef.current.disabled);d!==-1&&(a.activeOptionIndex=d)}let l=t.focus===Je.Specific?t.idx:Xf(t,{resolveItems:()=>a.options,resolveActiveIndex:()=>a.activeOptionIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled}),c=(i=t.trigger)!=null?i:2;return e.activeOptionIndex===l&&e.activationTrigger===c?e:{...e,...a,activeOptionIndex:l,activationTrigger:c}},3:(e,t)=>{var n,r,s;if((n=e.dataRef.current)!=null&&n.virtual)return{...e,options:[...e.options,t.payload]};let o=t.payload,i=Ba(e,l=>(l.push(o),l));e.activeOptionIndex===null&&(r=e.dataRef.current)!=null&&r.isSelected(t.payload.dataRef.current.value)&&(i.activeOptionIndex=i.options.indexOf(o));let a={...e,...i,activationTrigger:2};return(s=e.dataRef.current)!=null&&s.__demoMode&&e.dataRef.current.value===void 0&&(a.activeOptionIndex=0),a},4:(e,t)=>{var n;if((n=e.dataRef.current)!=null&&n.virtual)return{...e,options:e.options.filter(s=>s.id!==t.id)};let r=Ba(e,s=>{let o=s.findIndex(i=>i.id===t.id);return o!==-1&&s.splice(o,1),s});return{...e,...r,activationTrigger:2}},5:(e,t)=>e.labelId===t.id?e:{...e,labelId:t.id},6:(e,t)=>e.activationTrigger===t.trigger?e:{...e,activationTrigger:t.trigger},7:(e,t)=>{var n;if(((n=e.virtual)==null?void 0:n.options)===t.options)return e;let r=e.activeOptionIndex;if(e.activeOptionIndex!==null){let s=t.options.indexOf(e.virtual.options[e.activeOptionIndex]);s!==-1?r=s:r=null}return{...e,activeOptionIndex:r,virtual:Object.assign({},e.virtual,{options:t.options})}}},Ua=Nn(null);Ua.displayName="ComboboxActionsContext";function Ms(e){let t=rn(Ua);if(t===null){let n=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Ms),n}return t}let nh=Nn(null);function Nb(e){var t;let n=mr("VirtualProvider"),[r,s]=at(()=>{let l=n.optionsRef.current;if(!l)return[0,0];let c=window.getComputedStyle(l);return[parseFloat(c.paddingBlockStart||c.paddingTop),parseFloat(c.paddingBlockEnd||c.paddingBottom)]},[n.optionsRef.current]),o=Zy({scrollPaddingStart:r,scrollPaddingEnd:s,count:n.virtual.options.length,estimateSize(){return 40},getScrollElement(){var l;return(l=n.optionsRef.current)!=null?l:null},overscan:12}),[i,a]=Ge(0);return Ze(()=>{a(l=>l+1)},[(t=n.virtual)==null?void 0:t.options]),q.createElement(nh.Provider,{value:o},q.createElement("div",{style:{position:"relative",width:"100%",height:`${o.getTotalSize()}px`},ref:l=>{if(l){if(typeof process<"u"&&Sb.JEST_WORKER_ID!==void 0||n.activationTrigger===0)return;n.activeOptionIndex!==null&&n.virtual.options.length>n.activeOptionIndex&&o.scrollToIndex(n.activeOptionIndex)}}},o.getVirtualItems().map(l=>{var c;return q.createElement(Ie,{key:l.key},q.cloneElement((c=e.children)==null?void 0:c.call(e,{option:n.virtual.options[l.index],open:n.comboboxState===0}),{key:`${i}-${l.key}`,"data-index":l.index,"aria-setsize":n.virtual.options.length,"aria-posinset":l.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${l.start}px)`,overflowAnchor:"none"}}))})))}let za=Nn(null);za.displayName="ComboboxDataContext";function mr(e){let t=rn(za);if(t===null){let n=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,mr),n}return t}function Mb(e,t){return lt(t.type,Tb,e,t)}let Rb=Ie;function Pb(e,t){let{value:n,defaultValue:r,onChange:s,form:o,name:i,by:a=null,disabled:l=!1,__demoMode:c=!1,nullable:d=!1,multiple:u=!1,immediate:h=!1,virtual:f=null,...m}=e,w=!1,$=null,[v=u?[]:void 0,_]=Qy(n,s,r),[C,R]=Mr(Mb,{dataRef:Ii(),comboboxState:c?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),D=ce(!1),Y=ce({static:!1,hold:!1}),de=ce(null),ve=ce(null),fe=ce(null),X=ce(null),ue=ie(typeof a=="string"?(se,Ee)=>{let mt=a;return(se==null?void 0:se[mt])===(Ee==null?void 0:Ee[mt])}:a??((se,Ee)=>se===Ee)),G=ie(se=>C.options.findIndex(Ee=>ue(Ee.dataRef.current.value,se))),te=Mn(se=>lt(N.mode,{1:()=>v.some(Ee=>ue(Ee,se)),0:()=>ue(v,se)}),[v]),Me=ie(se=>C.activeOptionIndex===G(se)),N=at(()=>({...C,immediate:w,optionsPropsRef:Y,labelRef:de,inputRef:ve,buttonRef:fe,optionsRef:X,value:v,defaultValue:r,disabled:l,mode:u?1:0,virtual:C.virtual,get activeOptionIndex(){if(D.current&&C.activeOptionIndex===null&&C.options.length>0){let se=C.options.findIndex(Ee=>!Ee.dataRef.current.disabled);if(se!==-1)return se}return C.activeOptionIndex},calculateIndex:G,compare:ue,isSelected:te,isActive:Me,nullable:d,__demoMode:c}),[v,r,l,u,d,c,C,$]);Ze(()=>{},[$,void 0]),Ze(()=>{C.dataRef.current=N},[N]),db([N.buttonRef,N.inputRef,N.optionsRef],()=>Ps.closeCombobox(),N.comboboxState===0);let xe=at(()=>{var se,Ee,mt;return{open:N.comboboxState===0,disabled:l,activeIndex:N.activeOptionIndex,activeOption:N.activeOptionIndex===null?null:N.virtual?N.virtual.options[(se=N.activeOptionIndex)!=null?se:0]:(mt=(Ee=N.options[N.activeOptionIndex])==null?void 0:Ee.dataRef.current.value)!=null?mt:null,value:v}},[N,l,v]),le=ie(()=>{if(N.activeOptionIndex!==null){if(N.virtual)gr(N.virtual.options[N.activeOptionIndex]);else{let{dataRef:se}=N.options[N.activeOptionIndex];gr(se.current.value)}Ps.goToOption(Je.Specific,N.activeOptionIndex)}}),Ye=ie(()=>{R({type:0}),D.current=!0}),Ae=ie(()=>{R({type:1}),D.current=!1}),Le=ie((se,Ee,mt)=>(D.current=!1,se===Je.Specific?R({type:2,focus:Je.Specific,idx:Ee,trigger:mt}):R({type:2,focus:se,trigger:mt}))),kt=ie((se,Ee)=>(R({type:3,payload:{id:se,dataRef:Ee}}),()=>{N.isActive(Ee.current.value)&&(D.current=!0),R({type:4,id:se})})),Xt=ie(se=>(R({type:5,id:se}),()=>R({type:5,id:null}))),gr=ie(se=>lt(N.mode,{0(){return _==null?void 0:_(se)},1(){let Ee=N.value.slice(),mt=Ee.findIndex(Zr=>ue(Zr,se));return mt===-1?Ee.push(se):Ee.splice(mt,1),_==null?void 0:_(Ee)}})),Ft=ie(se=>{R({type:6,trigger:se})}),Ps=at(()=>({onChange:gr,registerOption:kt,registerLabel:Xt,goToOption:Le,closeCombobox:Ae,openCombobox:Ye,setActivationTrigger:Ft,selectActiveOption:le}),[]),Os=t===null?{}:{ref:t},wr=ce(null),Ds=Ts();return Te(()=>{wr.current&&r!==void 0&&Ds.addEventListener(wr.current,"reset",()=>{_==null||_(r)})},[wr,_]),q.createElement(Ua.Provider,{value:Ps},q.createElement(za.Provider,{value:N},q.createElement(Yf,{value:lt(N.comboboxState,{0:Ot.Open,1:Ot.Closed})},i!=null&&v!=null&&Qf({[i]:v}).map(([se,Ee],mt)=>q.createElement(bb,{features:Jf.Hidden,ref:mt===0?Zr=>{var Fs;wr.current=(Fs=Zr==null?void 0:Zr.closest("form"))!=null?Fs:null}:void 0,...Da({key:se,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:o,disabled:l,name:se,value:Ee})})),Cn({ourProps:Os,theirProps:m,slot:xe,defaultTag:Rb,name:"Combobox"}))))}let Ob="input";function Db(e,t){var n,r,s,o,i;let a=Ns(),{id:l=`headlessui-combobox-input-${a}`,onChange:c,displayValue:d,type:u="text",...h}=e,f=mr("Combobox.Input"),m=Ms("Combobox.Input"),w=fr(f.inputRef,t),$=fb(f.inputRef),v=ce(!1),_=Ts(),C=ie(()=>{m.onChange(null),f.optionsRef.current&&(f.optionsRef.current.scrollTop=0),m.goToOption(Je.Nothing)}),R=function(){var N;return typeof d=="function"&&f.value!==void 0?(N=d(f.value))!=null?N:"":typeof f.value=="string"?f.value:""}();Kf(([N,xe],[le,Ye])=>{if(v.current)return;let Ae=f.inputRef.current;Ae&&((Ye===0&&xe===1||N!==le)&&(Ae.value=N),requestAnimationFrame(()=>{if(v.current||!Ae||($==null?void 0:$.activeElement)!==Ae)return;let{selectionStart:Le,selectionEnd:kt}=Ae;Math.abs((kt??0)-(Le??0))===0&&Le===0&&Ae.setSelectionRange(Ae.value.length,Ae.value.length)}))},[R,f.comboboxState,$]),Kf(([N],[xe])=>{if(N===0&&xe===1){if(v.current)return;let le=f.inputRef.current;if(!le)return;let Ye=le.value,{selectionStart:Ae,selectionEnd:Le,selectionDirection:kt}=le;le.value="",le.value=Ye,kt!==null?le.setSelectionRange(Ae,Le,kt):le.setSelectionRange(Ae,Le)}},[f.comboboxState]);let D=ce(!1),Y=ie(()=>{D.current=!0}),de=ie(()=>{_.nextFrame(()=>{D.current=!1})}),ve=ie(N=>{switch(v.current=!0,N.key){case Dt.Enter:if(v.current=!1,f.comboboxState!==0||D.current)return;if(N.preventDefault(),N.stopPropagation(),f.activeOptionIndex===null){m.closeCombobox();return}m.selectActiveOption(),f.mode===0&&m.closeCombobox();break;case Dt.ArrowDown:return v.current=!1,N.preventDefault(),N.stopPropagation(),lt(f.comboboxState,{0:()=>m.goToOption(Je.Next),1:()=>m.openCombobox()});case Dt.ArrowUp:return v.current=!1,N.preventDefault(),N.stopPropagation(),lt(f.comboboxState,{0:()=>m.goToOption(Je.Previous),1:()=>{m.openCombobox(),_.nextFrame(()=>{f.value||m.goToOption(Je.Last)})}});case Dt.Home:if(N.shiftKey)break;return v.current=!1,N.preventDefault(),N.stopPropagation(),m.goToOption(Je.First);case Dt.PageUp:return v.current=!1,N.preventDefault(),N.stopPropagation(),m.goToOption(Je.First);case Dt.End:if(N.shiftKey)break;return v.current=!1,N.preventDefault(),N.stopPropagation(),m.goToOption(Je.Last);case Dt.PageDown:return v.current=!1,N.preventDefault(),N.stopPropagation(),m.goToOption(Je.Last);case Dt.Escape:return v.current=!1,f.comboboxState!==0?void 0:(N.preventDefault(),f.optionsRef.current&&!f.optionsPropsRef.current.static&&N.stopPropagation(),f.nullable&&f.mode===0&&f.value===null&&C(),m.closeCombobox());case Dt.Tab:if(v.current=!1,f.comboboxState!==0)return;f.mode===0&&f.activationTrigger!==1&&m.selectActiveOption(),m.closeCombobox();break}}),fe=ie(N=>{c==null||c(N),f.nullable&&f.mode===0&&N.target.value===""&&C(),m.openCombobox()}),X=ie(N=>{var xe,le,Ye;let Ae=(xe=N.relatedTarget)!=null?xe:hr.find(Le=>Le!==N.currentTarget);if(v.current=!1,!((le=f.optionsRef.current)!=null&&le.contains(Ae))&&!((Ye=f.buttonRef.current)!=null&&Ye.contains(Ae))&&f.comboboxState===0)return N.preventDefault(),f.mode===0&&(f.nullable&&f.value===null?C():f.activationTrigger!==1&&m.selectActiveOption()),m.closeCombobox()}),ue=ie(N=>{var xe,le,Ye;let Ae=(xe=N.relatedTarget)!=null?xe:hr.find(Le=>Le!==N.currentTarget);(le=f.buttonRef.current)!=null&&le.contains(Ae)||(Ye=f.optionsRef.current)!=null&&Ye.contains(Ae)||f.disabled||f.immediate&&f.comboboxState!==0&&(m.openCombobox(),_.nextFrame(()=>{m.setActivationTrigger(1)}))}),G=Ra(()=>{if(f.labelId)return[f.labelId].join(" ")},[f.labelId]),te=at(()=>({open:f.comboboxState===0,disabled:f.disabled}),[f]),Me={ref:w,id:l,role:"combobox",type:u,"aria-controls":(n=f.optionsRef.current)==null?void 0:n.id,"aria-expanded":f.comboboxState===0,"aria-activedescendant":f.activeOptionIndex===null?void 0:f.virtual?(r=f.options.find(N=>{var xe;return!((xe=f.virtual)!=null&&xe.disabled(N.dataRef.current.value))&&f.compare(N.dataRef.current.value,f.virtual.options[f.activeOptionIndex])}))==null?void 0:r.id:(s=f.options[f.activeOptionIndex])==null?void 0:s.id,"aria-labelledby":G,"aria-autocomplete":"list",defaultValue:(i=(o=e.defaultValue)!=null?o:f.defaultValue!==void 0?d==null?void 0:d(f.defaultValue):null)!=null?i:f.defaultValue,disabled:f.disabled,onCompositionStart:Y,onCompositionEnd:de,onKeyDown:ve,onChange:fe,onFocus:ue,onBlur:X};return Cn({ourProps:Me,theirProps:h,slot:te,defaultTag:Ob,name:"Combobox.Input"})}let Fb="button";function Vb(e,t){var n;let r=mr("Combobox.Button"),s=Ms("Combobox.Button"),o=fr(r.buttonRef,t),i=Ns(),{id:a=`headlessui-combobox-button-${i}`,...l}=e,c=Ts(),d=ie(w=>{switch(w.key){case Dt.ArrowDown:return w.preventDefault(),w.stopPropagation(),r.comboboxState===1&&s.openCombobox(),c.nextFrame(()=>{var $;return($=r.inputRef.current)==null?void 0:$.focus({preventScroll:!0})});case Dt.ArrowUp:return w.preventDefault(),w.stopPropagation(),r.comboboxState===1&&(s.openCombobox(),c.nextFrame(()=>{r.value||s.goToOption(Je.Last)})),c.nextFrame(()=>{var $;return($=r.inputRef.current)==null?void 0:$.focus({preventScroll:!0})});case Dt.Escape:return r.comboboxState!==0?void 0:(w.preventDefault(),r.optionsRef.current&&!r.optionsPropsRef.current.static&&w.stopPropagation(),s.closeCombobox(),c.nextFrame(()=>{var $;return($=r.inputRef.current)==null?void 0:$.focus({preventScroll:!0})}));default:return}}),u=ie(w=>{if(vb(w.currentTarget))return w.preventDefault();r.comboboxState===0?s.closeCombobox():(w.preventDefault(),s.openCombobox()),c.nextFrame(()=>{var $;return($=r.inputRef.current)==null?void 0:$.focus({preventScroll:!0})})}),h=Ra(()=>{if(r.labelId)return[r.labelId,a].join(" ")},[r.labelId,a]),f=at(()=>({open:r.comboboxState===0,disabled:r.disabled,value:r.value}),[r]),m={ref:o,id:a,type:hb(e,r.buttonRef),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(n=r.optionsRef.current)==null?void 0:n.id,"aria-expanded":r.comboboxState===0,"aria-labelledby":h,disabled:r.disabled,onClick:u,onKeyDown:d};return Cn({ourProps:m,theirProps:l,slot:f,defaultTag:Fb,name:"Combobox.Button"})}let Lb="label";function Bb(e,t){let n=Ns(),{id:r=`headlessui-combobox-label-${n}`,...s}=e,o=mr("Combobox.Label"),i=Ms("Combobox.Label"),a=fr(o.labelRef,t);Ze(()=>i.registerLabel(r),[r]);let l=ie(()=>{var d;return(d=o.inputRef.current)==null?void 0:d.focus({preventScroll:!0})}),c=at(()=>({open:o.comboboxState===0,disabled:o.disabled}),[o]);return Cn({ourProps:{ref:a,id:r,onClick:l},theirProps:s,slot:c,defaultTag:Lb,name:"Combobox.Label"})}let Ub="ul",zb=Mo.RenderStrategy|Mo.Static;function jb(e,t){let n=Ns(),{id:r=`headlessui-combobox-options-${n}`,hold:s=!1,...o}=e,i=mr("Combobox.Options"),a=fr(i.optionsRef,t),l=La(),c=l!==null?(l&Ot.Open)===Ot.Open:i.comboboxState===0;Ze(()=>{var f;i.optionsPropsRef.current.static=(f=e.static)!=null?f:!1},[i.optionsPropsRef,e.static]),Ze(()=>{i.optionsPropsRef.current.hold=s},[i.optionsPropsRef,s]),$b({container:i.optionsRef.current,enabled:i.comboboxState===0,accept(f){return f.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:f.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(f){f.setAttribute("role","none")}});let d=Ra(()=>{var f,m;return(m=i.labelId)!=null?m:(f=i.buttonRef.current)==null?void 0:f.id},[i.labelId,i.buttonRef.current]),u=at(()=>({open:i.comboboxState===0,option:void 0}),[i]),h={"aria-labelledby":d,role:"listbox","aria-multiselectable":i.mode===1?!0:void 0,id:r,ref:a};return i.virtual&&i.comboboxState===0&&Object.assign(o,{children:q.createElement(Nb,null,o.children)}),Cn({ourProps:h,theirProps:o,slot:u,defaultTag:Ub,features:zb,visible:c,name:"Combobox.Options"})}let Hb="li";function Wb(e,t){var n;let r=Ns(),{id:s=`headlessui-combobox-option-${r}`,disabled:o=!1,value:i,order:a=null,...l}=e,c=mr("Combobox.Option"),d=Ms("Combobox.Option"),u=c.virtual?c.activeOptionIndex===c.calculateIndex(i):c.activeOptionIndex===null?!1:((n=c.options[c.activeOptionIndex])==null?void 0:n.id)===s,h=c.isSelected(i),f=ce(null),m=an({disabled:o,value:i,domRef:f,order:a}),w=rn(nh),$=fr(t,f,w?w.measureElement:null),v=ie(()=>d.onChange(i));Ze(()=>d.registerOption(s,m),[m,s]);let _=ce(!(c.virtual||c.__demoMode));Ze(()=>{if(!c.virtual||!c.__demoMode)return;let X=dr();return X.requestAnimationFrame(()=>{_.current=!0}),X.dispose},[c.virtual,c.__demoMode]),Ze(()=>{if(!_.current||c.comboboxState!==0||!u||c.activationTrigger===0)return;let X=dr();return X.requestAnimationFrame(()=>{var ue,G;(G=(ue=f.current)==null?void 0:ue.scrollIntoView)==null||G.call(ue,{block:"nearest"})}),X.dispose},[f,u,c.comboboxState,c.activationTrigger,c.activeOptionIndex]);let C=ie(X=>{var ue;if(o||(ue=c.virtual)!=null&&ue.disabled(i))return X.preventDefault();v(),Wf()||requestAnimationFrame(()=>{var G;return(G=c.inputRef.current)==null?void 0:G.focus({preventScroll:!0})}),c.mode===0&&requestAnimationFrame(()=>d.closeCombobox())}),R=ie(()=>{var X;if(o||(X=c.virtual)!=null&&X.disabled(i))return d.goToOption(Je.Nothing);let ue=c.calculateIndex(i);d.goToOption(Je.Specific,ue)}),D=pb(),Y=ie(X=>D.update(X)),de=ie(X=>{var ue;if(!D.wasMoved(X)||o||(ue=c.virtual)!=null&&ue.disabled(i)||u)return;let G=c.calculateIndex(i);d.goToOption(Je.Specific,G,0)}),ve=ie(X=>{var ue;D.wasMoved(X)&&(o||(ue=c.virtual)!=null&&ue.disabled(i)||u&&(c.optionsPropsRef.current.hold||d.goToOption(Je.Nothing)))}),fe=at(()=>({active:u,selected:h,disabled:o}),[u,h,o]);return Cn({ourProps:{id:s,ref:$,role:"option",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,"aria-selected":h,disabled:void 0,onClick:C,onFocus:R,onPointerEnter:Y,onMouseEnter:Y,onPointerMove:de,onMouseMove:de,onPointerLeave:ve,onMouseLeave:ve},theirProps:l,slot:fe,defaultTag:Hb,name:"Combobox.Option"})}let Gb=ln(Pb),qb=ln(Vb),Kb=ln(Db),Zb=ln(Bb),Jb=ln(jb),Yb=ln(Wb),Rs=Object.assign(Gb,{Input:Kb,Button:qb,Label:Zb,Options:Jb,Option:Yb});function ja(){let e=ce(!1);return Ze(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Xb(e=0){let[t,n]=Ge(e),r=ja(),s=Mn(l=>{r.current&&n(c=>c|l)},[t,r]),o=Mn(l=>!!(t&l),[t]),i=Mn(l=>{r.current&&n(c=>c&~l)},[n,r]),a=Mn(l=>{r.current&&n(c=>c^l)},[n]);return{flags:t,addFlag:s,hasFlag:o,removeFlag:i,toggleFlag:a}}function Qb(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function Ha(e,...t){e&&t.length>0&&e.classList.add(...t)}function Wa(e,...t){e&&t.length>0&&e.classList.remove(...t)}function e_(e,t){let n=dr();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:s}=getComputedStyle(e),[o,i]=[r,s].map(l=>{let[c=0]=l.split(",").filter(Boolean).map(d=>d.includes("ms")?parseFloat(d):parseFloat(d)*1e3).sort((d,u)=>u-d);return c}),a=o+i;if(a!==0){n.group(c=>{c.setTimeout(()=>{t(),c.dispose()},a),c.addEventListener(e,"transitionrun",d=>{d.target===d.currentTarget&&c.dispose()})});let l=n.addEventListener(e,"transitionend",c=>{c.target===c.currentTarget&&(t(),l())})}else t();return n.add(()=>t()),n.dispose}function t_(e,t,n,r){let s=n?"enter":"leave",o=dr(),i=r!==void 0?Qb(r):()=>{};s==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let a=lt(s,{enter:()=>t.enter,leave:()=>t.leave}),l=lt(s,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),c=lt(s,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return Wa(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),Ha(e,...t.base,...a,...c),o.nextFrame(()=>{Wa(e,...t.base,...a,...c),Ha(e,...t.base,...a,...l),e_(e,()=>(Wa(e,...t.base,...a),Ha(e,...t.base,...t.entered),i()))}),o.dispose}function n_({immediate:e,container:t,direction:n,classes:r,onStart:s,onStop:o}){let i=ja(),a=Ts(),l=an(n);Ze(()=>{e&&(l.current="enter")},[e]),Ze(()=>{let c=dr();a.add(c.dispose);let d=t.current;if(d&&l.current!=="idle"&&i.current)return c.dispose(),s.current(l.current),c.add(t_(d,r.current,l.current==="enter",()=>{c.dispose(),o.current(l.current)})),c.dispose},[n])}function Ln(e=""){return e.split(/\s+/).filter(t=>t.length>1)}let Po=Nn(null);Po.displayName="TransitionContext";var r_=(e=>(e.Visible="visible",e.Hidden="hidden",e))(r_||{});function s_(){let e=rn(Po);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function o_(){let e=rn(Oo);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let Oo=Nn(null);Oo.displayName="NestingContext";function Do(e){return"children"in e?Do(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function rh(e,t){let n=an(e),r=ce([]),s=ja(),o=Ts(),i=ie((f,m=Vn.Hidden)=>{let w=r.current.findIndex(({el:$})=>$===f);w!==-1&&(lt(m,{[Vn.Unmount](){r.current.splice(w,1)},[Vn.Hidden](){r.current[w].state="hidden"}}),o.microTask(()=>{var $;!Do(r)&&s.current&&(($=n.current)==null||$.call(n))}))}),a=ie(f=>{let m=r.current.find(({el:w})=>w===f);return m?m.state!=="visible"&&(m.state="visible"):r.current.push({el:f,state:"visible"}),()=>i(f,Vn.Unmount)}),l=ce([]),c=ce(Promise.resolve()),d=ce({enter:[],leave:[],idle:[]}),u=ie((f,m,w)=>{l.current.splice(0),t&&(t.chains.current[m]=t.chains.current[m].filter(([$])=>$!==f)),t==null||t.chains.current[m].push([f,new Promise($=>{l.current.push($)})]),t==null||t.chains.current[m].push([f,new Promise($=>{Promise.all(d.current[m].map(([v,_])=>_)).then(()=>$())})]),m==="enter"?c.current=c.current.then(()=>t==null?void 0:t.wait.current).then(()=>w(m)):w(m)}),h=ie((f,m,w)=>{Promise.all(d.current[m].splice(0).map(([$,v])=>v)).then(()=>{var $;($=l.current.shift())==null||$()}).then(()=>w(m))});return at(()=>({children:r,register:a,unregister:i,onStart:u,onStop:h,wait:c,chains:d}),[a,i,r,u,h,d,c])}function i_(){}let a_=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function sh(e){var t;let n={};for(let r of a_)n[r]=(t=e[r])!=null?t:i_;return n}function l_(e){let t=ce(sh(e));return Te(()=>{t.current=sh(e)},[e]),t}let c_="div",oh=Mo.RenderStrategy;function u_(e,t){var n,r;let{beforeEnter:s,afterEnter:o,beforeLeave:i,afterLeave:a,enter:l,enterFrom:c,enterTo:d,entered:u,leave:h,leaveFrom:f,leaveTo:m,...w}=e,$=ce(null),v=fr($,t),_=(n=w.unmount)==null||n?Vn.Unmount:Vn.Hidden,{show:C,appear:R,initial:D}=s_(),[Y,de]=Ge(C?"visible":"hidden"),ve=o_(),{register:fe,unregister:X}=ve;Te(()=>fe($),[fe,$]),Te(()=>{if(_===Vn.Hidden&&$.current){if(C&&Y!=="visible"){de("visible");return}return lt(Y,{hidden:()=>X($),visible:()=>fe($)})}},[Y,$,fe,X,C,_]);let ue=an({base:Ln(w.className),enter:Ln(l),enterFrom:Ln(c),enterTo:Ln(d),entered:Ln(u),leave:Ln(h),leaveFrom:Ln(f),leaveTo:Ln(m)}),G=l_({beforeEnter:s,afterEnter:o,beforeLeave:i,afterLeave:a}),te=Pa();Te(()=>{if(te&&Y==="visible"&&$.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[$,Y,te]);let Me=D&&!R,N=R&&C&&D,xe=!te||Me?"idle":C?"enter":"leave",le=Xb(0),Ye=ie(Ft=>lt(Ft,{enter:()=>{le.addFlag(Ot.Opening),G.current.beforeEnter()},leave:()=>{le.addFlag(Ot.Closing),G.current.beforeLeave()},idle:()=>{}})),Ae=ie(Ft=>lt(Ft,{enter:()=>{le.removeFlag(Ot.Opening),G.current.afterEnter()},leave:()=>{le.removeFlag(Ot.Closing),G.current.afterLeave()},idle:()=>{}})),Le=rh(()=>{de("hidden"),X($)},ve),kt=ce(!1);n_({immediate:N,container:$,classes:ue,direction:xe,onStart:an(Ft=>{kt.current=!0,Le.onStart($,Ft,Ye)}),onStop:an(Ft=>{kt.current=!1,Le.onStop($,Ft,Ae),Ft==="leave"&&!Do(Le)&&(de("hidden"),X($))})});let Xt=w,gr={ref:v};return N?Xt={...Xt,className:No(w.className,...ue.current.enter,...ue.current.enterFrom)}:kt.current&&(Xt.className=No(w.className,(r=$.current)==null?void 0:r.className),Xt.className===""&&delete Xt.className),q.createElement(Oo.Provider,{value:Le},q.createElement(Yf,{value:lt(Y,{visible:Ot.Open,hidden:Ot.Closed})|le.flags},Cn({ourProps:gr,theirProps:Xt,defaultTag:c_,features:oh,visible:Y==="visible",name:"Transition.Child"})))}function d_(e,t){let{show:n,appear:r=!1,unmount:s=!0,...o}=e,i=ce(null),a=fr(i,t);Pa();let l=La();if(n===void 0&&l!==null&&(n=(l&Ot.Open)===Ot.Open),![!0,!1].includes(n))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,d]=Ge(n?"visible":"hidden"),u=rh(()=>{d("hidden")}),[h,f]=Ge(!0),m=ce([n]);Ze(()=>{h!==!1&&m.current[m.current.length-1]!==n&&(m.current.push(n),f(!1))},[m,n]);let w=at(()=>({show:n,appear:r,initial:h}),[n,r,h]);Te(()=>{if(n)d("visible");else if(!Do(u))d("hidden");else{let C=i.current;if(!C)return;let R=C.getBoundingClientRect();R.x===0&&R.y===0&&R.width===0&&R.height===0&&d("hidden")}},[n,u]);let $={unmount:s},v=ie(()=>{var C;h&&f(!1),(C=e.beforeEnter)==null||C.call(e)}),_=ie(()=>{var C;h&&f(!1),(C=e.beforeLeave)==null||C.call(e)});return q.createElement(Oo.Provider,{value:u},q.createElement(Po.Provider,{value:w},Cn({ourProps:{...$,as:Ie,children:q.createElement(ih,{ref:a,...$,...o,beforeEnter:v,beforeLeave:_})},theirProps:{},defaultTag:Ie,features:oh,visible:c==="visible",name:"Transition"})))}function f_(e,t){let n=rn(Po)!==null,r=La()!==null;return q.createElement(q.Fragment,null,!n&&r?q.createElement(Ga,{ref:t,...e}):q.createElement(ih,{ref:t,...e}))}let Ga=ln(d_),ih=ln(u_),h_=ln(f_),m_=Object.assign(Ga,{Child:h_,Root:Ga});function p_({name:e,control:t,queryAnzsic:n}){const[r,s]=Ge(""),[o,i]=Ge([]),a=async()=>{try{if(r.length>=2){const d=await n(r);i(d)}else i([])}catch(d){console.error("Error fetching data:",d),i([])}};Te(()=>{const d=setTimeout(()=>{a()},500);return()=>clearTimeout(d)},[r]);const{field:l,fieldState:c}=Cf({name:e,control:t,rules:{required:!0}});return T("div",{children:T(Rs,{onChange:l.onChange,value:l.value??null,name:l.name,children:[T(Rs.Label,{className:"block text-sm font-medium text-gray-900",children:"Industry"}),T("div",{className:"relative mt-2",children:[T("div",{className:"grid grid-cols-1",children:[T(Rs.Input,{className:"col-start-1 row-start-1 block w-full rounded-md bg-white py-[9px] pl-9 pr-2 text-gray-900 placeholder:text-gray-400 text-sm border border-gray-300 focus:ring-2 focus:ring-indigo-600 focus:border-indigo-600",onChange:d=>s(d.target.value),onBlur:()=>s(""),placeholder:"Type to search industries",displayValue:d=>{const u=l.value;return u!=null&&u.ClassTitle?`${u.ClassCode} ${u.ClassTitle}`:""}}),T(S1,{className:"pointer-events-none col-start-1 row-start-1 ml-3 self-center text-gray-400 size-4"})]}),o.length>0&&T(Rs.Options,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 shadow-lg ring-1 ring-black/5 focus:outline-none",children:o.map(d=>T(Ie,{children:[T("div",{className:"flex items-center text-xs text-gray-500 font-semibold mb-1 mx-3 mt-2 uppercase",children:[T("span",{className:"self-start",children:d.GroupCode}),T("span",{className:"ml-2",children:d.GroupTitle})]}),d.Classes.map(u=>{var h,f;return T(Rs.Option,{value:u,className:({active:m})=>`group relative cursor-pointer select-none py-2 pl-3 pr-9 ${m?"bg-indigo-600 text-white outline-none":"text-gray-900"}`,children:[T("div",{className:`flex items-center text-sm ${((h=l.value)==null?void 0:h.ClassCode)===u.ClassCode?"font-semibold":"font-normal"}`,children:[T("span",{className:"self-start",children:u.ClassCode}),T("span",{className:"ml-2",children:u.ClassTitle})]}),T("span",{className:`absolute inset-y-0 right-0 items-center pr-4 text-indigo-600 group-hover:text-white ${((f=l.value)==null?void 0:f.ClassCode)===u.ClassCode?"flex":"hidden"}`,children:T(y1,{className:"size-5"})})]},u.ClassCode)})]}))}),r.length>1&&o.length===0&&T("div",{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 shadow-lg ring-1 ring-black/5 focus:outline-none",children:T("div",{className:"group relative cursor-default select-none py-2 pl-3 pr-9 text-gray-400 text-sm",children:"Keep typing to search industries"})})]}),c.invalid&&T("p",{className:"mt-2 text-sm text-red-600",children:"Industry is required"})]})})}function $_({defaultValues:e,validateAccountName:t,validateLegalEntityName:n,validateAbn:r,validateSalesforceParentRecordId:s,validateWebsiteUrl:o,queryAnzsic:i,onSubmit:a,closeModal:l}){const{handleSubmit:c,control:d}=Eo({mode:"onChange",defaultValues:e});return T(Ie,{children:[T("div",{className:"font-bold text-lg mb-4",children:"Account details"}),T("form",{className:"space-y-6",onSubmit:c(a),children:[T("div",{children:[T(ht,{label:"Account name",name:"AccountName",control:d,placeholder:"e.g. Acme Co",validate:t}),T("p",{className:"mt-2 text-sm font-normal text-gray-500",children:"This will be used as a display name."})]}),T(ht,{label:"Legal entity name",name:"LegalEntityName",control:d,placeholder:"e.g. ACME LTD PTY",validate:n}),T("div",{className:"grid grid-cols-2 gap-3",children:[T(ht,{label:"ABN",name:"Abn",control:d,validate:r,isNumber:!0}),T(ht,{label:"Salesforce parent RecordID",name:"SalesforceParentRecordId",control:d,validate:s})]}),T(ht,{label:"Website URL",name:"WebsiteUrl",control:d,placeholder:"https://acme.com.au",validate:o}),T(p_,{name:"Industry",control:d,queryAnzsic:i}),T(Io,{primaryLabel:"Next",secondaryLabel:"Cancel",secondaryOnClick:l})]})]})}function g_(e,t,n,r){return p($_,{defaultValues:e,validateAccountName:s=>ut(vi(s)),validateLegalEntityName:s=>ut(pc(s)),validateAbn:s=>ut($c(s)),validateSalesforceParentRecordId:s=>ut(_$(s)),validateWebsiteUrl:s=>ut(oc(s)),queryAnzsic:t,onSubmit:s=>{r(new Jt(2,[s])),r(new Jt(0,[]))},closeModal:n})}function ah(e,t){let n,r,s;const o=p("div",{className:"pt-6 px-6 pb-4 border-b font-bold text-xl",children:"Add a new account"}),i=p("div",P(k([["className","pt-4 mx-6"],(n=_e(A(()=>t)),["children",E.Children.toArray(Array.from(n))])])));return p(ba,{onClose:e,child:(r=[p("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),p("div",P(k([["className","fixed inset-0 z-10 w-screen overflow-y-auto h-full flex items-center justify-center"],(s=[p("div",{className:"w-[480px] bg-white shadow-xl rounded-lg",children:E.Children.toArray([o,i])})],["children",E.Children.toArray(Array.from(s))])])))],p(Ie,{},...r))})}function w_(e,t){let n;const r=p("div",P(k([["className","mb-4 text-sm font-normal text-gray-500"],(n=["All fields are required unless labelled as ",p("span",{className:"font-semibold",children:"optional"}),"."],["children",E.Children.toArray(Array.from(n))])])));return ah(e,_e(A(()=>B(I(r),A(()=>t)))))}function y_(e){let t,n,r,s;return ah(e,[p("div",P(k([["className","text-sm mb-4"],(t=[p("p",{children:["You do not have sufficient permissions."]}),(n=k(["For details, please see ",p("a",{className:"font-medium text-blue-600 hover:underline",href:"https://myobconfluence.atlassian.net/wiki/spaces/ENG/pages/9811993991/SuperHero+Module+Permissions",target:"_blank",children:"SuperHero Module Permissions"})]),p("p",{children:E.Children.toArray(Array.from(n))})),p("div",P(k([["className","flex justify-end"],(r=[p("button",P(k([(s="rounded-md bg-indigo-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-xs hover:bg-indigo-500 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600",["className",s]),["type","button"],["onClick",o=>{e()}],["children","Close"]])))],["children",E.Children.toArray(Array.from(r))])])))],["children",E.Children.toArray(Array.from(t))])])))])}function b_(e){const t=e.closeModal,n=e.partnerId,r=Xn(On),s=iy(r.BackendUrl,r.AccessToken),o=bo(()=>yo(()=>uy,(l,c)=>dy(n,s,l,c),(l,c)=>{}),void 0,void 0),i=o[0],a=o[1];return r.Roles.ProvisionAccounts?w_(t,_e(A(()=>{const l=i.CurrentView;return l.tag===1?I(My(i.PrimaryContactForm,a)):l.tag===2?I(Oy(i.BusinessAddressForm,cy(i),ly(i),a)):I(g_(i.AccountDetailsForm,c=>s.QueryAnzsic(c),t,a))}))):y_(t)}function __(e){const t=e.partnerId,n=Pn(!1),r=n[1],s=_e(A(()=>{let o;return B(I(p("button",P(k([["type","button"],(o="inline-flex items-center gap-x-2 rounded-md bg-indigo-600 px-3.5 py-[8.5px] text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600",["className",o]),["onClick",i=>{r(!0)}],["children",E.Children.toArray([sy,"Add account"])]])))),A(()=>n[0]?I(p(b_,{partnerId:t,closeModal:()=>{r(!1)}})):wt()))}));return p(Ie,{},...s)}class v_ extends H{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["ColumnHeader"]}}function lh(e){return new v_(e)}function ch(e){return e.fields[0]}class x_ extends H{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["RowCell"]}}function Wr(e){return new x_(e)}function uh(e){return e.fields[0]}function C_(){return["scope","col"]}function pr(e){return lh(p("th",P(k([["className","px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"],C_(),["children",e]]))))}function S_(e,t){let n;return Wr(p("td",P(k([["className","px-6 py-4 whitespace-nowrap text-sm"],(n=[p("a",{className:"text-indigo-600 hover:text-indigo-900",children:t,href:e})],["children",E.Children.toArray(Array.from(n))])]))))}function Fo(e,t){return Wr(p("td",{className:oe(" ",B(e,["px-6","py-4","whitespace-nowrap","text-sm"])),children:t}))}function k_(e,t){let n,r,s,o,i,a,l;return p("div",P(k([["className","flex flex-col mt-4"],(n=[p("div",P(k([["className","-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"],(r=[p("div",P(k([["className","py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8"],(s=[p("div",P(k([["className","shadow overflow-hidden border-b border-gray-200 sm:rounded-lg"],(o=[p("table",P(k([["className","min-w-full divide-y divide-gray-200"],(i=[p("thead",{className:"bg-gray-50",children:(a=Fe(ch,e),p("tr",{children:E.Children.toArray(Array.from(a))}))}),(l=gi((c,d)=>(u=>{let h;return p("tr",P(k([["className",c%2===0?"bg-white":"bg-gray-50"],(h=Fe(uh,u),["children",E.Children.toArray(Array.from(h))])])))})(d),t),p("tbody",{children:E.Children.toArray(Array.from(l))}))],["children",E.Children.toArray(Array.from(i))])])))],["children",E.Children.toArray(Array.from(o))])])))],["children",E.Children.toArray(Array.from(s))])])))],["children",E.Children.toArray(Array.from(r))])])))],["children",E.Children.toArray(Array.from(n))])])))}function A_(e,t,n){return e?ot(n,t):n}function dh(e,t,n,r){let s,o,i;return lh(p("th",P(k([["className",oe(" ",["px-6","py-3","text-left","text-xs","font-medium","text-gray-500","sm:pl-6","uppercase","tracking-wider"])],["scope","col"],(s=[p("a",P(k([["className",oe(" ",["group","inline-flex","cursor-pointer"])],["onClick",n],(o=[r,p("span",P(k([["className",oe(" ",A_(!e,ne("invisible"),k(["ml-2","flex-none","rounded","text-gray-400","group-hover:visible","group-focus:visible"])))],(i=_e(A(()=>I(t?ny:ry))),["children",E.Children.toArray(Array.from(i))])])))],["children",E.Children.toArray(Array.from(o))])])))],["children",E.Children.toArray(Array.from(s))])]))))}function E_(e,t){return dh(Be(Yu(e.Sort),new _n(1,[])),Be(Xu(e.Sort),new tr(0,[])),n=>{t(new ar(1,[Qu(new _n(1,[]),e.Sort)]))},"Name")}function I_(e,t){return dh(Be(Yu(e.Sort),new _n(0,[])),Be(Xu(e.Sort),new tr(0,[])),n=>{t(new ar(1,[Qu(new _n(0,[]),e.Sort)]))},"Id")}function T_(e,t){let n;return Wr(p("td",P(k([["className",oe(" ",["text-gray-500","px-6","py-2","whitespace-nowrap","text-sm","align-top"])],(n=[p("span",{children:[e]}),p("br",{}),p("span",{children:[t]})],["children",E.Children.toArray(Array.from(n))])]))))}function N_(e,t,n){let r;return Wr(p("td",P(k([["className",oe(" ",["text-gray-500","px-6","py-2","whitespace-nowrap","text-sm","align-top"])],(r=_e(A(()=>{let s;return B(I(p("div",P(k([["className",oe(" ",["font-medium"])],(s=[p("span",{children:[e]})],["children",E.Children.toArray(Array.from(s))])])))),A(()=>{let o;return B((o=t,o==null?I(pe()):I(p("span",{children:["Legal Entity: "+o]}))),A(()=>{const i=n;if(i==null)return I(pe());{const a=i;return B(I(p("br",{})),A(()=>I(p("span",{children:["ABN: "+a]}))))}}))}))})),["children",E.Children.toArray(Array.from(r))])]))))}function M_(e){return Wr(p("td",{className:oe(" ",["px-6","py-2","whitespace-nowrap","text-sm","text-gray-500","align-top"]),children:e}))}function R_(e,t,n,r){let s;return Wr(p("td",P(k([["className","px-6 py-2 whitespace-nowrap text-sm align-top"],(s=_e(A(()=>B(I(p("a",{className:"text-indigo-600 hover:text-indigo-900",children:t,href:e})),A(()=>{let o,i;return B((o=r,o==null?I(pe()):(i=o,B(I(p("br",{})),A(()=>I(p("span",{children:[`Channel ID: ${i}`]})))))),A(()=>{const a=n;if(a==null)return I(pe());{const l=a;return B(I(p("br",{})),A(()=>I(p("span",{children:[`External ID: ${l}`]}))))}}))})))),["children",E.Children.toArray(Array.from(s))])]))))}function P_(e,t,n){const r=jt(n.AccountId);return _e(A(()=>{let s;return B(I(R_(er(gs((s=[e,r],new J(8,[s[0],s[1]])))),n.AccountId,n.ExternalId,n.ChannelId)),A(()=>B(I(N_(n.Name,n.BusinessName,n.BusinessNumber)),A(()=>B(t.ReadProtectedData?I(T_(He(n.Contact,""),He(n.ContactMobilePhone,""))):wt(),A(()=>I(M_(n.Website))))))))}))}class O_ extends ee{constructor(t,n){super(),this.Data=t,this.LoadNext=n}}class fh extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Resolved","InProgress"]}}class hh extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Known","Unknown"]}}function D_(e){let t;return p("thead",{className:"bg-gray-50",children:(t=Fe(ch,e),p("tr",{children:E.Children.toArray(Array.from(t))}))})}function F_(e,t){let n;return p("tr",P(k([["className",e%2===0?"bg-white":"bg-gray-50"],(n=Fe(uh,t),["children",E.Children.toArray(Array.from(n))])])))}function V_(e,t,n,r,s,o){let i,a,l,c,d,u,h;const f=t!=null&&n!=null?(i=t|0,a=n|0,_e(A(()=>B(I("Showing "),A(()=>B(I(p("span",{className:"font-medium",children:`${i}`})),A(()=>B(I(" to "),A(()=>B(I(p("span",{className:"font-medium",children:`${a}`})),A(()=>B(I(" of "),A(()=>r.tag===1?ne(" many"):k([p("span",{className:"font-medium",children:pt(r.fields[0])})," results"])))))))))))))):ne(pe()),m=_e(A(()=>{let w,$;return B((w=o,w==null?I(pe()):($=w,I(p("a",{className:oe(" ",["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:$,children:"Previous "})))),A(()=>{const v=s;if(v==null)return I(pe());{const _=v;return I(p("a",{className:oe(" ",["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:_,children:" Next"}))}}))}));return p("tfoot",P(k([["className",oe(" ",["w-full"])],(l=[p("tr",P(ne((c=[p("td",P(k([["colSpan",e],(d=[p("nav",P(k([["className",oe(" ",["bg-white","px-4","py-3","flex","items-center","justify-between","border-t-1","border-gray-200","sm:px-6"])],(u=[p("div",P(k([["className",oe(" ",["hidden","sm:block"])],(h=[p("p",{className:oe(" ",["text-sm","text-gray-700"]),children:E.Children.toArray(Array.from(f))})],["children",E.Children.toArray(Array.from(h))])]))),p("div",{className:oe(" ",["flex-1","flex","justify-between","sm:justify-end"]),children:E.Children.toArray(Array.from(m))})],["children",E.Children.toArray(Array.from(u))])])))],["children",E.Children.toArray(Array.from(d))])])))],["children",E.Children.toArray(Array.from(c))]))))],["children",E.Children.toArray(Array.from(l))])])))}function L_(e,t){const n=Pn(1),r=n[1],s=n[0]|0;return[s,o=>{if(s===e){if(t!=null){const i=t;El(zt("Calling Load")),i(),r(s+1)}}else r(s+1)},o=>{r(s-1)}]}function B_(e){let t,n,r,s,o;const i=e.data,a=e.pageSize,l=e.renderRowCells,c=e.columnHeaders,d=Jm(a,i.Data),u=L_(Sr(d),i.LoadNext),h=u[0]|0,f=u[1];let m;const w=Gm(h-1,d);m=w==null?new fh(1,[]):new fh(0,[w]);const $=Sr(i.Data)|0,v=i.LoadNext==null?new hh(0,[$]):new hh(1,[]),_=m.tag===1?void 0:$>=1?(h-1)*a+1:void 0,C=m.tag===1?void 0:$>=1?(h-1)*a+Sr(m.fields[0]):void 0,R=h===1?void 0:u[2],D=h===Sr(d)?i.LoadNext!=null?f:void 0:h<Sr(d)?f:void 0;return p("div",P(k([["className","flex flex-col mt-4"],(t=[p("div",P(k([["className","-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"],(n=[p("div",P(k([["className","py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8"],(r=[p("div",P(k([["className","shadow overflow-hidden border-b border-gray-200 sm:rounded-lg"],(s=[p("table",P(k([["className","min-w-full divide-y divide-gray-200"],(o=_e(A(()=>B(I(D_(c)),A(()=>{let Y,de;return B((Y=m,Y.tag===1?I(pe()):I((de=gi(F_,l(Y.fields[0])),p("tbody",{children:E.Children.toArray(Array.from(de))})))),A(()=>I(V_(Sr(c),_,C,v,D,R))))})))),["children",E.Children.toArray(Array.from(o))])])))],["children",E.Children.toArray(Array.from(s))])])))],["children",E.Children.toArray(Array.from(r))])])))],["children",E.Children.toArray(Array.from(n))])])))],["children",E.Children.toArray(Array.from(t))])])))}function Bn(e){const t=e.error,n=ne(p("span",{children:[t]}));return p("div",{children:E.Children.toArray(Array.from(n))})}function Vo(){const e=ne(p("span",{children:["Please wait..."]}));return p("div",{children:E.Children.toArray(Array.from(e))})}function U_(e){let t,n,r,s,o,i;const a=Xn(On),l=Z1({accessToken:a.AccessToken,backendUrl:a.BackendUrl,partnerId:e.partnerId}),c=bo(()=>yo(X1,(C,R)=>Q1(l,C,R),(C,R)=>{}),void 0,void 0),d=c[0],u=c[1],h=new sa(d.SearchText,d.Sort,d.PageSize);Qi((t=[()=>Y1(l,h),C=>{u(new ar(2,[C]))}],Hu(t[0],t[1])));const f=C=>{u(new ar(4,[]))},m=d.Data;let w,$,v,_;switch(m.tag){case 0:case 1:{w=2;break}case 3:{w=3,_=m.fields[0];break}default:m.fields[0].tag===1?(w=1,v=m.fields[0].fields[0]):(w=0,$=m.fields[0].fields[0])}switch(w){case 0:{const C=k([p("div",P(k([["className",oe(" ",["flex","justify-between","items-end","pt-2","sm:-mr-6","lg:mr-0"])],(n=_e(A(()=>{let R;return B(I(p("div",P(k([["className",oe(" ",["flex","flex-row","gap-4","sm:-mr-6","lg:mr-0","w-[560px]"])],(R=[df(td(d.SearchText),"Account ID, Name, Legal Entity, Channel ID or External ID",D=>{u(new ar(0,[D]))},f),ey(f)],["children",E.Children.toArray(Array.from(R))])])))),A(()=>e.accountProvisioningMode.tag===0?I(pe()):I(p(__,{partnerId:e.partnerId}))))})),["children",E.Children.toArray(Array.from(n))])]))),(r=$,s=_e(A(()=>B(I(I_(d,u)),A(()=>B(I(E_(d,u)),A(()=>B(a.Roles.ReadProtectedData?I(pr("Contact")):wt(),A(()=>I(pr("Website")))))))))),o=new O_(r.Accounts,rt(R=>()=>{Or(J1(l)(h)(R)(u))},r.Token)),i=nd(d.PageSize)|0,p(B_,{columnHeaders:s,renderRowCells:R=>qn(D=>P_(e.partnerId,a.Roles,D),R),pageSize:i,data:o}))]);return p("div",{children:E.Children.toArray(Array.from(C))})}case 1:return p(Bn,{error:v});case 2:return p(Vo,null);default:{const C=pt(_);return p(Bn,{error:C})}}}let Lo=class extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function mh(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,s=e.partnerId,o=is(i=>i,[new Lo(1,[t]),new Lo(0,[n]),new Lo(2,[tn(s)]),rt(i=>new Lo(3,[nn(i)]),r)]);return p("superhero-super-configuration",In(o,1))}let Bo=class extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function ph(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,s=e.partnerId,o=is(i=>i,[new Bo(1,[t]),new Bo(0,[n]),new Bo(2,[tn(s)]),rt(i=>new Bo(3,[nn(i)]),r)]);return p("superhero-benefits-onboarding-configuration",In(o,1))}let Uo=class extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function $h(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,s=e.partnerId,o=is(i=>i,[new Uo(1,[t]),new Uo(0,[n]),new Uo(2,[tn(s)]),rt(i=>new Uo(3,[nn(i)]),r)]);return p("superhero-bank-details",In(o,1))}let zo=class extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function gh(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,s=e.partnerId,o=is(i=>i,[new zo(1,[t]),new zo(0,[n]),new zo(2,[tn(s)]),rt(i=>new zo(3,[nn(i)]),r)]);return p("superhero-profile-directory-app",In(o,1))}let jo=class extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function wh(e){const t=e.accountId,n=e.partnerId,r=e.accessToken,s=e.backendUrl,o=is(i=>i,[new jo(1,[r]),new jo(0,[s]),new jo(2,[tn(n)]),rt(i=>new jo(3,[nn(i)]),t)]);return p("workspace-account-registry-app",In(o,1))}let Sn=class extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Key","Appear","Show","ClassName","Enter","EnterFrom","EnterTo","Leave","LeaveFrom","LeaveTo","Children"]}};function z_(e){const t=In(e,1);return p(m_,t)}function Ho(e,t){let n;return p("div",P(k([["className","px-4 py-4 sm:px-0"],(n=[p("h3",{className:"text-lg font-semibold leading-7 text-gray-900",children:e}),He(rt(r=>p("p",{className:"mt-1 max-w-2xl text-sm leading-6 text-gray-500",children:r}),t),pe())],["children",E.Children.toArray(Array.from(n))])])))}function Qe(e,t){let n;return p("div",P(k([["className","px-4 py-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0"],(n=[p("dt",{className:"text-sm font-medium leading-6 text-gray-700",children:e}),p("dd",{className:"px-1 mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0",children:t})],["children",E.Children.toArray(Array.from(n))])])))}function qa(e){let t,n;const r=e.value,s=e.label,o=Pn(!1),i=o[0],a=o[1];return b0(()=>{Or(U.Delay(()=>i?U.Bind(Eu(2e3),()=>(a(!1),U.Zero())):U.Zero()))}),p("div",P(k([["className","px-4 py-2 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0"],(t=[p("dt",{className:"text-sm font-medium leading-6 text-gray-700",children:s}),p("dd",P(k([["className","flex mt-1 text-sm leading-6 text-primary-700 sm:col-span-2 sm:mt-0 relative"],(n=[z_(k([new Sn(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 Sn(2,[i]),new Sn(4,["transition-opacity ease-in duration-100"]),new Sn(5,["opacity-0"]),new Sn(6,["opacity-90"]),new Sn(7,["transition-opacity ease-out duration-500"]),new Sn(8,["opacity-90"]),new Sn(9,["opacity-0"]),new Sn(10,[[p("div",{className:"w-[45px] h-4 not-italic font-medium text-xs leading-4 text-white flex-none order-none grow-0",children:"Copied"})]])])),p("div",{className:"px-1 cursor-pointer hover:text-primary-900 hover:bg-gray-300 rounded-md shrink",children:r})],["children",E.Children.toArray(Array.from(n))]),["onClick",l=>{navigator.clipboard.writeText(r),a(!0)}]])))],["children",E.Children.toArray(Array.from(t))])])))}function Wo(e,t){let n;const r=k([e,p("div",P(k([["className","mt-2 border-b border-gray-200"],(n=[p("dl",{className:"divide-y divide-gray-200 px-0 sm:px-4 max-w-2xl",children:E.Children.toArray(Array.from(t))})],["children",E.Children.toArray(Array.from(n))])])))]);return p("div",{children:E.Children.toArray(Array.from(r))})}function j_(e){const t=Xn(On);return Wo(Ho("Partner Information",void 0),_e(A(()=>{let n;return B(I((n=["ID",Ir(e.StreamId)],p(qa,{label:n[0],value:n[1]}))),A(()=>{let r;return B(I((r=["Name",oo(e.Name)],Qe(r[0],r[1]))),A(()=>{let s,o,i;return B(t.Roles.ReadProtectedData?(s=e.ContactDetails,s!=null?(o=s,B(I((i=["Contact",`${lc(o.FirstName)} ${uc(o.LastName)}`],Qe(i[0],i[1]))),A(()=>{let a;return I((a=["Phone",hc(o.MobilePhone)],Qe(a[0],a[1])))}))):wt()):wt(),A(()=>{let a;return B(I((a=["Website",ic(e.Website)],Qe(a[0],a[1]))),A(()=>{let l;return I((l=["Notes",He(m$(e.Notes),"")],Qe(l[0],l[1])))}))}))}))}))})))}let $r=class extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Details","AccountList","SuperConfiguration","BenefitsOnboardingConfiguration","BankDetailsConfiguration","ProfileDirectory","Workspace"]}};class H_ extends ee{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}class W_ extends ee{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}class G_ extends ee{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}class q_ extends ee{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}class K_ extends ee{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}function Z_(e){switch(e.tag){case 1:return"Accounts";case 2:return"Super";case 3:return"Benefits";case 4:return"Bank Details";case 5:return"Directory";case 6:return"Workspace";default:return"Details"}}function J_(e){switch(e.tag){case 1:return e.fields[0].partnerId;case 2:return e.fields[0].PartnerId;case 3:return e.fields[0].PartnerId;case 4:return e.fields[0].PartnerId;case 5:return e.fields[0].PartnerId;case 6:return e.fields[0].PartnerId;default:return it(Ir(e.fields[0].StreamId))}}function Y_(e){const t=qn(n=>lf(Z_(e),n[0],er(gs(n[1](J_(e))))),k([["Details",n=>new J(1,[n])],["Accounts",n=>new J(3,[n])],["Super",n=>new J(4,[n])],["Benefits",n=>new J(5,[n])],["Bank Details",n=>new J(6,[n])],["Directory",n=>new J(2,[n])]]));return p(cf,{headers:t})}function X_(e){switch(e.tag){case 1:return p(U_,e.fields[0]);case 2:return p(mh,{partnerId:e.fields[0].PartnerId,backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken});case 3:return p(ph,{partnerId:e.fields[0].PartnerId,backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken});case 4:return p($h,{partnerId:e.fields[0].PartnerId,backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken});case 5:return p(gh,{partnerId:e.fields[0].PartnerId,backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken});case 6:return p(wh,{backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken,partnerId:e.fields[0].PartnerId});default:return p(j_,e.fields[0])}}function yh(e){let t,n;const r=e.mode;return p("div",P(k([["className","flex flex-row"],(t=[Y_(r),p("div",P(k([["className","w-full"],(n=[X_(r)],["children",E.Children.toArray(Array.from(n))])])))],["children",E.Children.toArray(Array.from(t))])])))}let Go=class extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function Q_(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,s=e.partnerId,o=A(()=>B(I(new Go(1,[t])),A(()=>B(I(new Go(0,[n])),A(()=>B(I(new Go(2,[to(s)])),A(()=>I(new Go(3,[no(r)])))))))));return p("superhero-import-app",In(o,1))}class Ka extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","account-id"]}}function ev(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,s=A(()=>B(I(new Ka(1,[t])),A(()=>B(I(new Ka(0,[n])),A(()=>I(new Ka(2,[no(r)])))))));return p("superhero-salpac-profile-admin",In(s,1))}function tv({hasLegalEntity:e,defaultValues:t,validateName:n,validateBusinessName:r,validateBusinessNumber:s,onSubmit:o,closeModal:i}){const{handleSubmit:a,control:l}=Eo({mode:"onChange",defaultValues:t});return T(Ie,{children:[T("div",{className:"font-bold text-lg mb-4",children:"Account details"}),T("form",{className:"space-y-6",onSubmit:a(o),children:[T("div",{children:[T(ht,{label:"Name",name:"Name",control:l,placeholder:"e.g. Acme Co",validate:n}),T("p",{className:"mt-2 text-sm font-normal text-gray-500",children:"This will be used as a display name."})]}),e&&T(ht,{label:"Business Name",name:"BusinessName",control:l,placeholder:"e.g. ACME LTD PTY",validate:r}),e&&T(ht,{label:"Business Number",name:"BusinessNumber",control:l,validate:s,isNumber:!0}),T(Io,{primaryLabel:"Update",secondaryLabel:"Cancel",secondaryOnClick:i})]})]})}function nv(e,t,n){return p(tv,{hasLegalEntity:n.LegalEntity!=null,defaultValues:new ay(n.Name,He(rt(r=>r.BusinessName,n.LegalEntity),""),He(rt(r=>r.BusinessNumber,n.LegalEntity),"")),validateName:r=>ut(vi(r)),validateBusinessName:r=>ut(pc(r)),validateBusinessNumber:r=>ut($c(r)),onSubmit:r=>{const s=new id(r.Name,rt(o=>new ad(r.BusinessName,r.BusinessNumber),n.LegalEntity));Be(s,n)?e():t(s)},closeModal:e})}function rv(e){const t=e.account,n=e.updateAccount,r=Xn(On),s=Pn(!1),o=s[1],i=_e(A(()=>{let a;return B(I(Wo(p("div",P(k([["className","flex flex-row space-x-4 items-center"],(a=[Ho("Account Information",void 0),p("button",{className:oe(" ",_e(A(()=>B(r.Roles.ProvisionAccounts?wt():I("hidden"),A(()=>I("inline-flex items-center rounded border border-transparent bg-indigo-600 px-2.5 py-1.5 mr-2 text-xs font-medium text-white shadow-sm hover:bg-indigo-700 focus:outline-none")))))),onClick:l=>{o(!0)},type:"button",children:E.Children.toArray([ty])})],["children",E.Children.toArray(Array.from(a))])]))),_e(A(()=>{let l;return B(I((l=["ID",t.StreamId],p(qa,{label:l[0],value:l[1]}))),A(()=>{let c;return B(I((c=["Name",t.Name],p(qa,{label:c[0],value:c[1]}))),A(()=>{let d;return B(I((d=["External ID",He(t.ExternalId,"")],Qe(d[0],d[1]))),A(()=>{let u;return B(I((u=["Channel ID",He(t.ChannelId,"")],Qe(u[0],u[1]))),A(()=>{let h;if(r.Roles.ReadProtectedData){const f=t.ContactDetails;if(f!=null){const m=f;return B(I((h=["Contact",`${m.FirstName} ${m.LastName}`],Qe(h[0],h[1]))),A(()=>{let w;return B(I((w=["Phone",m.MobilePhone],Qe(w[0],w[1]))),A(()=>{let $;return I(($=["Email",m.Email],Qe($[0],$[1])))}))}))}else return wt()}else return wt()}))}))}))}))})))),A(()=>{let l,c,d,u,h,f,m;return s[0]?I((l=()=>{o(!1)},c=new id(t.Name,rt(w=>new ad(w.BusinessName,w.BusinessNumber),t.LegalEntity)),p(ba,{onClose:l,child:p("div",P(ne((d=[p("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),p("div",P(k([["className","fixed inset-0 z-10 w-screen overflow-y-auto"],(u=[p("div",P(k([["className","fixed inset-0 z-10 w-screen overflow-y-auto h-full flex items-center justify-center"],(h=[p("div",P(k([["className","w-[480px] bg-white shadow-xl rounded-lg"],(f=[p("div",{className:"pt-6 px-6 pb-4 border-b font-bold text-xl",children:"Update account"}),p("div",P(k([["className","pt-4 mx-6"],(m=[p("div",{className:"mb-4 text-sm font-normal text-gray-500",children:E.Children.toArray(["All fields are required."])}),nv(l,w=>{n(w),o(!1)},c)],["children",E.Children.toArray(Array.from(m))])])))],["children",E.Children.toArray(Array.from(f))])])))],["children",E.Children.toArray(Array.from(h))])])))],["children",E.Children.toArray(Array.from(u))])])))],["children",E.Children.toArray(Array.from(d))]))))}))):wt()}))}));return p(Ie,{},...i)}function sv(e){let t,n,r,s,o,i,a;if(e==null)return pe();{const l=e;return Wo(Ho("Legal Entity",void 0),k([(t=["Business Name",l.BusinessName],Qe(t[0],t[1])),(n=["Business Number",l.BusinessNumber],Qe(n[0],n[1])),(r=["Address Line 1",l.Address1],Qe(r[0],r[1])),(s=["Address Line 2",He(l.Address2,"")],Qe(s[0],s[1])),(o=["City",l.City],Qe(o[0],o[1])),(i=["State",He(l.State,"")],Qe(i[0],i[1])),(a=["Postcode",l.Postcode],Qe(a[0],a[1]))]))}}function ov(e){let t;if(e==null)return pe();{const n=e;return Wo(Ho("Legal Entity",void 0),ne((t=["Notes",n],Qe(t[0],t[1]))))}}function iv(e){const t=e.account,n=e.updateAccount,r=k([p(rv,{updateAccount:n,account:t}),sv(t.LegalEntity),ov(t.Notes)]);return p("div",{children:E.Children.toArray(Array.from(r))})}class Un extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Details","ProfilesDirectory","Users","SuperConfiguration","BenefitsOnboardingConfiguration","BankDetailsConfiguration","SalaryPackagingConfiguration","Workspace"]}}function av(e){switch(e.tag){case 1:return"Directory";case 2:return"Users";case 3:return"Super";case 4:return"Benefits";case 5:return"Bank Details";case 6:return"Salary Packaging";case 7:return"Workspace";default:return"Details"}}function lv(e,t,n){const r=qn(s=>lf(av(n),s[0],er(gs(s[1]([e,t])))),k([["Details",s=>new J(8,[s[0],s[1]])],["Workspace",s=>new J(15,[s[0],s[1]])],["Directory",s=>new J(9,[s[0],s[1]])],["Users",s=>new J(10,[s[0],s[1]])],["Super",s=>new J(11,[s[0],s[1]])],["Benefits",s=>new J(12,[s[0],s[1]])],["Bank Details",s=>new J(13,[s[0],s[1]])],["Salary Packaging",s=>new J(14,[s[0],s[1]])]]));return p(cf,{headers:r})}function cv(e){const t=e.account,n=e.mode,r=e.props,s=e.updateAccount,o=Xn(On),i=r.accountDetails,a=i[0],l=i[1];switch(n.tag){case 1:return p(gh,{partnerId:a,accountId:l,backendUrl:o.BackendUrl,accessToken:o.AccessToken});case 2:return p(Q_,{partnerId:a,accountId:l,backendUrl:o.BackendUrl,accessToken:o.AccessToken});case 3:return p(mh,{partnerId:a,accountId:l,backendUrl:o.BackendUrl,accessToken:o.AccessToken});case 4:return p(ph,{partnerId:a,accountId:l,backendUrl:o.BackendUrl,accessToken:o.AccessToken});case 5:return p($h,{partnerId:a,accountId:l,backendUrl:o.BackendUrl,accessToken:o.AccessToken});case 6:return p(ev,{accountId:l,backendUrl:o.BackendUrl,accessToken:o.AccessToken});case 7:return p(wh,{backendUrl:o.BackendUrl,accessToken:o.AccessToken,partnerId:a,accountId:l});default:{let c,d,u;switch(t.tag){case 0:case 1:{c=2;break}case 3:{c=3,u=t.fields[0];break}default:t.fields[0].tag===0?(c=0,d=t.fields[0].fields[0]):c=1}switch(c){case 0:return p(iv,{updateAccount:s,account:d});case 1:return p(Bn,{error:"There was an error retrieving account "});case 2:return p(Vo,null);default:{const h=pt(u);return p(Bn,{error:h})}}}}}function uv(e){let t,n,r;const s=e.account,o=e.mode,i=e.props,a=e.updateAccount;return p("div",P(k([["className","flex flex-row"],(t=[(n=i.accountDetails,lv(n[0],n[1],o)),p("div",P(k([["className","w-full"],(r=[p(cv,{updateAccount:a,props:i,mode:o,account:s})],["children",E.Children.toArray(Array.from(r))])])))],["children",E.Children.toArray(Array.from(t))])])))}class Gr extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["NotStarted","Started","Finished","Failed"]}}let qo=class extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["UpdateAccountId","Search","SearchSuccess","SearchFailure"]}},qr=class extends ee{constructor(t,n){super(),this.AccountId=t,this.AccountDetails=n}};function dv(){return[new qr(void 0,new Gr(0,[])),Oe()]}function fv(e,t,n,r){let s,o;switch(n.tag){case 1:{const i=r.AccountId;if(i!=null){const a=i;return[new qr(r.AccountId,new Gr(1,[])),da(()=>g1(e,t,a),void 0,l=>new qo(2,[l]),l=>new qo(3,[l]))]}else return[new qr(r.AccountId,new Gr(3,["Account Id is required"])),Oe()]}case 2:{const i=n.fields[0];return[new qr(r.AccountId,new Gr(2,[i])),(s=["account-registry","partners",`${i.PartnerId}`,"accounts",`${i.AccountId}`],o=[s[0],s[1],s[2],s[3],s[4]],Xe(a=>{ft(k(o))}))]}case 3:return[new qr(r.AccountId,new Gr(3,["Account not found"])),Oe()];default:return[new qr(jt(n.fields[0]),r.AccountDetails),Oe()]}}const hv=p("h3",{className:"text-base font-semibold text-gray-900",id:"modal-title",children:"Account Search"}),mv=p("div",P(k([["className","mt-2"],(()=>{let e;const t=[p("p",P(k([["className","text-sm text-gray-500 whitespace-pre-line"],(e=`Enter an Account Id below to search for an account.
51
+ `));let m=d.props,h=typeof(m==null?void 0:m.className)=="function"?(...w)=>Li(m==null?void 0:m.className(...w),l.className):Li(m==null?void 0:m.className,l.className),p=h?{className:h}:{};return ra(d,Object.assign({},ah(d.props,Qa(el(l,["ref"]))),u,c,{ref:s(d.ref,c.ref)},p))}return f(i,Object.assign({},el(l,["ref"]),i!==ve&&c,i!==ve&&u),d)}function M_(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function ah(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let s in r)s.startsWith("on")&&typeof r[s]=="function"?(n[s]!=null||(n[s]=[]),n[s].push(r[s])):t[s]=r[s];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](s,...i){let o=n[r];for(let a of o){if((s instanceof Event||(s==null?void 0:s.nativeEvent)instanceof Event)&&s.defaultPrevented)return;a(s,...i)}}});return t}function gn(e){var t;return Object.assign(jn(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Qa(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function el(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}let P_="div";var lh=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(lh||{});function O_(e,t){var n;let{features:r=1,...s}=e,i={ref:t,"aria-hidden":(r&2)===2?!0:(n=s["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return Rn({ourProps:i,theirProps:s,slot:{},defaultTag:P_,name:"Hidden"})}let D_=gn(O_),tl=Bn(null);tl.displayName="OpenClosedContext";var Dt=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Dt||{});function nl(){return dn(tl)}function ch({value:e,children:t}){return Z.createElement(tl.Provider,{value:e},t)}function F_(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let gr=[];F_(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&gr[0]!==t.target&&(gr.unshift(t.target),gr=gr.filter(n=>n!=null&&n.isConnected),gr.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function V_(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&L_(n)?!1:r}function L_(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}function B_(e){throw new Error("Unexpected object: "+e)}var et=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(et||{});function uh(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),s=r??-1;switch(e.focus){case 0:{for(let i=0;i<n.length;++i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 1:{for(let i=s-1;i>=0;--i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 2:{for(let i=s+1;i<n.length;++i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 3:{for(let i=n.length-1;i>=0;--i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 4:{for(let i=0;i<n.length;++i)if(t.resolveId(n[i],i,n)===e.id)return i;return r}case 5:return null;default:B_(e)}}function dh(e={},t=null,n=[]){for(let[r,s]of Object.entries(e))hh(n,fh(t,r),s);return n}function fh(e,t){return e?e+"["+t+"]":t}function hh(e,t,n){if(Array.isArray(n))for(let[r,s]of n.entries())hh(e,fh(t,r.toString()),s);else n instanceof Date?e.push([t,n.toISOString()]):typeof n=="boolean"?e.push([t,n?"1":"0"]):typeof n=="string"?e.push([t,n]):typeof n=="number"?e.push([t,`${n}`]):n==null?e.push([t,""]):dh(n,t,e)}var Ft=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Ft||{}),U_={},j_=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(j_||{}),z_=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(z_||{}),H_=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(H_||{}),W_=(e=>(e[e.OpenCombobox=0]="OpenCombobox",e[e.CloseCombobox=1]="CloseCombobox",e[e.GoToOption=2]="GoToOption",e[e.RegisterOption=3]="RegisterOption",e[e.UnregisterOption=4]="UnregisterOption",e[e.RegisterLabel=5]="RegisterLabel",e[e.SetActivationTrigger=6]="SetActivationTrigger",e[e.UpdateVirtualOptions=7]="UpdateVirtualOptions",e))(W_||{});function rl(e,t=n=>n){let n=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=t(e.options.slice()),s=r.length>0&&r[0].dataRef.current.order!==null?r.sort((o,a)=>o.dataRef.current.order-a.dataRef.current.order):x_(r,o=>o.dataRef.current.domRef.current),i=n?s.indexOf(n):null;return i===-1&&(i=null),{options:s,activeOptionIndex:i}}let G_={1(e){var t;return(t=e.dataRef.current)!=null&&t.disabled||e.comboboxState===1?e:{...e,activeOptionIndex:null,comboboxState:1}},0(e){var t,n;if((t=e.dataRef.current)!=null&&t.disabled||e.comboboxState===0)return e;if((n=e.dataRef.current)!=null&&n.value){let r=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(r!==-1)return{...e,activeOptionIndex:r,comboboxState:0}}return{...e,comboboxState:0}},2(e,t){var n,r,s,i,o;if((n=e.dataRef.current)!=null&&n.disabled||(r=e.dataRef.current)!=null&&r.optionsRef.current&&!((s=e.dataRef.current)!=null&&s.optionsPropsRef.current.static)&&e.comboboxState===1)return e;if(e.virtual){let d=t.focus===et.Specific?t.idx:uh(t,{resolveItems:()=>e.virtual.options,resolveActiveIndex:()=>{var m,h;return(h=(m=e.activeOptionIndex)!=null?m:e.virtual.options.findIndex(p=>!e.virtual.disabled(p)))!=null?h:null},resolveDisabled:e.virtual.disabled,resolveId(){throw new Error("Function not implemented.")}}),u=(i=t.trigger)!=null?i:2;return e.activeOptionIndex===d&&e.activationTrigger===u?e:{...e,activeOptionIndex:d,activationTrigger:u}}let a=rl(e);if(a.activeOptionIndex===null){let d=a.options.findIndex(u=>!u.dataRef.current.disabled);d!==-1&&(a.activeOptionIndex=d)}let l=t.focus===et.Specific?t.idx:uh(t,{resolveItems:()=>a.options,resolveActiveIndex:()=>a.activeOptionIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled}),c=(o=t.trigger)!=null?o:2;return e.activeOptionIndex===l&&e.activationTrigger===c?e:{...e,...a,activeOptionIndex:l,activationTrigger:c}},3:(e,t)=>{var n,r,s;if((n=e.dataRef.current)!=null&&n.virtual)return{...e,options:[...e.options,t.payload]};let i=t.payload,o=rl(e,l=>(l.push(i),l));e.activeOptionIndex===null&&(r=e.dataRef.current)!=null&&r.isSelected(t.payload.dataRef.current.value)&&(o.activeOptionIndex=o.options.indexOf(i));let a={...e,...o,activationTrigger:2};return(s=e.dataRef.current)!=null&&s.__demoMode&&e.dataRef.current.value===void 0&&(a.activeOptionIndex=0),a},4:(e,t)=>{var n;if((n=e.dataRef.current)!=null&&n.virtual)return{...e,options:e.options.filter(s=>s.id!==t.id)};let r=rl(e,s=>{let i=s.findIndex(o=>o.id===t.id);return i!==-1&&s.splice(i,1),s});return{...e,...r,activationTrigger:2}},5:(e,t)=>e.labelId===t.id?e:{...e,labelId:t.id},6:(e,t)=>e.activationTrigger===t.trigger?e:{...e,activationTrigger:t.trigger},7:(e,t)=>{var n;if(((n=e.virtual)==null?void 0:n.options)===t.options)return e;let r=e.activeOptionIndex;if(e.activeOptionIndex!==null){let s=t.options.indexOf(e.virtual.options[e.activeOptionIndex]);s!==-1?r=s:r=null}return{...e,activeOptionIndex:r,virtual:Object.assign({},e.virtual,{options:t.options})}}},sl=Bn(null);sl.displayName="ComboboxActionsContext";function Us(e){let t=dn(sl);if(t===null){let n=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Us),n}return t}let mh=Bn(null);function q_(e){var t;let n=$r("VirtualProvider"),[r,s]=ct(()=>{let l=n.optionsRef.current;if(!l)return[0,0];let c=window.getComputedStyle(l);return[parseFloat(c.paddingBlockStart||c.paddingTop),parseFloat(c.paddingBlockEnd||c.paddingBottom)]},[n.optionsRef.current]),i=d_({scrollPaddingStart:r,scrollPaddingEnd:s,count:n.virtual.options.length,estimateSize(){return 40},getScrollElement(){var l;return(l=n.optionsRef.current)!=null?l:null},overscan:12}),[o,a]=Ze(0);return Qe(()=>{a(l=>l+1)},[(t=n.virtual)==null?void 0:t.options]),Z.createElement(mh.Provider,{value:i},Z.createElement("div",{style:{position:"relative",width:"100%",height:`${i.getTotalSize()}px`},ref:l=>{if(l){if(typeof process<"u"&&U_.JEST_WORKER_ID!==void 0||n.activationTrigger===0)return;n.activeOptionIndex!==null&&n.virtual.options.length>n.activeOptionIndex&&i.scrollToIndex(n.activeOptionIndex)}}},i.getVirtualItems().map(l=>{var c;return Z.createElement(ve,{key:l.key},Z.cloneElement((c=e.children)==null?void 0:c.call(e,{option:n.virtual.options[l.index],open:n.comboboxState===0}),{key:`${o}-${l.key}`,"data-index":l.index,"aria-setsize":n.virtual.options.length,"aria-posinset":l.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${l.start}px)`,overflowAnchor:"none"}}))})))}let il=Bn(null);il.displayName="ComboboxDataContext";function $r(e){let t=dn(il);if(t===null){let n=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,$r),n}return t}function K_(e,t){return dt(t.type,G_,e,t)}let Z_=ve;function J_(e,t){let{value:n,defaultValue:r,onChange:s,form:i,name:o,by:a=null,disabled:l=!1,__demoMode:c=!1,nullable:d=!1,multiple:u=!1,immediate:m=!1,virtual:h=null,...p}=e,w=!1,g=null,[C=u?[]:void 0,x]=p_(n,s,r),[A,P]=Fr(K_,{dataRef:jo(),comboboxState:c?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),V=de(!1),Y=de({static:!1,hold:!1}),ce=de(null),Ce=de(null),le=de(null),X=de(null),he=oe(typeof a=="string"?(ie,Ne)=>{let $t=a;return(ie==null?void 0:ie[$t])===(Ne==null?void 0:Ne[$t])}:a??((ie,Ne)=>ie===Ne)),G=oe(ie=>A.options.findIndex(Ne=>he(Ne.dataRef.current.value,ie))),ne=Un(ie=>dt(M.mode,{1:()=>C.some(Ne=>he(Ne,ie)),0:()=>he(C,ie)}),[C]),Me=oe(ie=>A.activeOptionIndex===G(ie)),M=ct(()=>({...A,immediate:w,optionsPropsRef:Y,labelRef:ce,inputRef:Ce,buttonRef:le,optionsRef:X,value:C,defaultValue:r,disabled:l,mode:u?1:0,virtual:A.virtual,get activeOptionIndex(){if(V.current&&A.activeOptionIndex===null&&A.options.length>0){let ie=A.options.findIndex(Ne=>!Ne.dataRef.current.disabled);if(ie!==-1)return ie}return A.activeOptionIndex},calculateIndex:G,compare:he,isSelected:ne,isActive:Me,nullable:d,__demoMode:c}),[C,r,l,u,d,c,A,g]);Qe(()=>{},[g,void 0]),Qe(()=>{A.dataRef.current=M},[M]),k_([M.buttonRef,M.inputRef,M.optionsRef],()=>Ws.closeCombobox(),M.comboboxState===0);let Se=ct(()=>{var ie,Ne,$t;return{open:M.comboboxState===0,disabled:l,activeIndex:M.activeOptionIndex,activeOption:M.activeOptionIndex===null?null:M.virtual?M.virtual.options[(ie=M.activeOptionIndex)!=null?ie:0]:($t=(Ne=M.options[M.activeOptionIndex])==null?void 0:Ne.dataRef.current.value)!=null?$t:null,value:C}},[M,l,C]),ue=oe(()=>{if(M.activeOptionIndex!==null){if(M.virtual)br(M.virtual.options[M.activeOptionIndex]);else{let{dataRef:ie}=M.options[M.activeOptionIndex];br(ie.current.value)}Ws.goToOption(et.Specific,M.activeOptionIndex)}}),tt=oe(()=>{P({type:0}),V.current=!0}),Ie=oe(()=>{P({type:1}),V.current=!1}),Be=oe((ie,Ne,$t)=>(V.current=!1,ie===et.Specific?P({type:2,focus:et.Specific,idx:Ne,trigger:$t}):P({type:2,focus:ie,trigger:$t}))),kt=oe((ie,Ne)=>(P({type:3,payload:{id:ie,dataRef:Ne}}),()=>{M.isActive(Ne.current.value)&&(V.current=!0),P({type:4,id:ie})})),on=oe(ie=>(P({type:5,id:ie}),()=>P({type:5,id:null}))),br=oe(ie=>dt(M.mode,{0(){return x==null?void 0:x(ie)},1(){let Ne=M.value.slice(),$t=Ne.findIndex(ss=>he(ss,ie));return $t===-1?Ne.push(ie):Ne.splice($t,1),x==null?void 0:x(Ne)}})),Vt=oe(ie=>{P({type:6,trigger:ie})}),Ws=ct(()=>({onChange:br,registerOption:kt,registerLabel:on,goToOption:Be,closeCombobox:Ie,openCombobox:tt,setActivationTrigger:Vt,selectActiveOption:ue}),[]),Gs=t===null?{}:{ref:t},vr=de(null),qs=Ls();return Te(()=>{vr.current&&r!==void 0&&qs.addEventListener(vr.current,"reset",()=>{x==null||x(r)})},[vr,x]),Z.createElement(sl.Provider,{value:Ws},Z.createElement(il.Provider,{value:M},Z.createElement(ch,{value:dt(M.comboboxState,{0:Dt.Open,1:Dt.Closed})},o!=null&&C!=null&&dh({[o]:C}).map(([ie,Ne],$t)=>Z.createElement(D_,{features:lh.Hidden,ref:$t===0?ss=>{var Ks;vr.current=(Ks=ss==null?void 0:ss.closest("form"))!=null?Ks:null}:void 0,...Qa({key:ie,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:i,disabled:l,name:ie,value:Ne})})),Rn({ourProps:Gs,theirProps:p,slot:Se,defaultTag:Z_,name:"Combobox"}))))}let Y_="input";function X_(e,t){var n,r,s,i,o;let a=Bs(),{id:l=`headlessui-combobox-input-${a}`,onChange:c,displayValue:d,type:u="text",...m}=e,h=$r("Combobox.Input"),p=Us("Combobox.Input"),w=pr(h.inputRef,t),g=E_(h.inputRef),C=de(!1),x=Ls(),A=oe(()=>{p.onChange(null),h.optionsRef.current&&(h.optionsRef.current.scrollTop=0),p.goToOption(et.Nothing)}),P=function(){var M;return typeof d=="function"&&h.value!==void 0?(M=d(h.value))!=null?M:"":typeof h.value=="string"?h.value:""}();oh(([M,Se],[ue,tt])=>{if(C.current)return;let Ie=h.inputRef.current;Ie&&((tt===0&&Se===1||M!==ue)&&(Ie.value=M),requestAnimationFrame(()=>{if(C.current||!Ie||(g==null?void 0:g.activeElement)!==Ie)return;let{selectionStart:Be,selectionEnd:kt}=Ie;Math.abs((kt??0)-(Be??0))===0&&Be===0&&Ie.setSelectionRange(Ie.value.length,Ie.value.length)}))},[P,h.comboboxState,g]),oh(([M],[Se])=>{if(M===0&&Se===1){if(C.current)return;let ue=h.inputRef.current;if(!ue)return;let tt=ue.value,{selectionStart:Ie,selectionEnd:Be,selectionDirection:kt}=ue;ue.value="",ue.value=tt,kt!==null?ue.setSelectionRange(Ie,Be,kt):ue.setSelectionRange(Ie,Be)}},[h.comboboxState]);let V=de(!1),Y=oe(()=>{V.current=!0}),ce=oe(()=>{x.nextFrame(()=>{V.current=!1})}),Ce=oe(M=>{switch(C.current=!0,M.key){case Ft.Enter:if(C.current=!1,h.comboboxState!==0||V.current)return;if(M.preventDefault(),M.stopPropagation(),h.activeOptionIndex===null){p.closeCombobox();return}p.selectActiveOption(),h.mode===0&&p.closeCombobox();break;case Ft.ArrowDown:return C.current=!1,M.preventDefault(),M.stopPropagation(),dt(h.comboboxState,{0:()=>p.goToOption(et.Next),1:()=>p.openCombobox()});case Ft.ArrowUp:return C.current=!1,M.preventDefault(),M.stopPropagation(),dt(h.comboboxState,{0:()=>p.goToOption(et.Previous),1:()=>{p.openCombobox(),x.nextFrame(()=>{h.value||p.goToOption(et.Last)})}});case Ft.Home:if(M.shiftKey)break;return C.current=!1,M.preventDefault(),M.stopPropagation(),p.goToOption(et.First);case Ft.PageUp:return C.current=!1,M.preventDefault(),M.stopPropagation(),p.goToOption(et.First);case Ft.End:if(M.shiftKey)break;return C.current=!1,M.preventDefault(),M.stopPropagation(),p.goToOption(et.Last);case Ft.PageDown:return C.current=!1,M.preventDefault(),M.stopPropagation(),p.goToOption(et.Last);case Ft.Escape:return C.current=!1,h.comboboxState!==0?void 0:(M.preventDefault(),h.optionsRef.current&&!h.optionsPropsRef.current.static&&M.stopPropagation(),h.nullable&&h.mode===0&&h.value===null&&A(),p.closeCombobox());case Ft.Tab:if(C.current=!1,h.comboboxState!==0)return;h.mode===0&&h.activationTrigger!==1&&p.selectActiveOption(),p.closeCombobox();break}}),le=oe(M=>{c==null||c(M),h.nullable&&h.mode===0&&M.target.value===""&&A(),p.openCombobox()}),X=oe(M=>{var Se,ue,tt;let Ie=(Se=M.relatedTarget)!=null?Se:gr.find(Be=>Be!==M.currentTarget);if(C.current=!1,!((ue=h.optionsRef.current)!=null&&ue.contains(Ie))&&!((tt=h.buttonRef.current)!=null&&tt.contains(Ie))&&h.comboboxState===0)return M.preventDefault(),h.mode===0&&(h.nullable&&h.value===null?A():h.activationTrigger!==1&&p.selectActiveOption()),p.closeCombobox()}),he=oe(M=>{var Se,ue,tt;let Ie=(Se=M.relatedTarget)!=null?Se:gr.find(Be=>Be!==M.currentTarget);(ue=h.buttonRef.current)!=null&&ue.contains(Ie)||(tt=h.optionsRef.current)!=null&&tt.contains(Ie)||h.disabled||h.immediate&&h.comboboxState!==0&&(p.openCombobox(),x.nextFrame(()=>{p.setActivationTrigger(1)}))}),G=Ja(()=>{if(h.labelId)return[h.labelId].join(" ")},[h.labelId]),ne=ct(()=>({open:h.comboboxState===0,disabled:h.disabled}),[h]),Me={ref:w,id:l,role:"combobox",type:u,"aria-controls":(n=h.optionsRef.current)==null?void 0:n.id,"aria-expanded":h.comboboxState===0,"aria-activedescendant":h.activeOptionIndex===null?void 0:h.virtual?(r=h.options.find(M=>{var Se;return!((Se=h.virtual)!=null&&Se.disabled(M.dataRef.current.value))&&h.compare(M.dataRef.current.value,h.virtual.options[h.activeOptionIndex])}))==null?void 0:r.id:(s=h.options[h.activeOptionIndex])==null?void 0:s.id,"aria-labelledby":G,"aria-autocomplete":"list",defaultValue:(o=(i=e.defaultValue)!=null?i:h.defaultValue!==void 0?d==null?void 0:d(h.defaultValue):null)!=null?o:h.defaultValue,disabled:h.disabled,onCompositionStart:Y,onCompositionEnd:ce,onKeyDown:Ce,onChange:le,onFocus:he,onBlur:X};return Rn({ourProps:Me,theirProps:m,slot:ne,defaultTag:Y_,name:"Combobox.Input"})}let Q_="button";function eb(e,t){var n;let r=$r("Combobox.Button"),s=Us("Combobox.Button"),i=pr(r.buttonRef,t),o=Bs(),{id:a=`headlessui-combobox-button-${o}`,...l}=e,c=Ls(),d=oe(w=>{switch(w.key){case Ft.ArrowDown:return w.preventDefault(),w.stopPropagation(),r.comboboxState===1&&s.openCombobox(),c.nextFrame(()=>{var g;return(g=r.inputRef.current)==null?void 0:g.focus({preventScroll:!0})});case Ft.ArrowUp:return w.preventDefault(),w.stopPropagation(),r.comboboxState===1&&(s.openCombobox(),c.nextFrame(()=>{r.value||s.goToOption(et.Last)})),c.nextFrame(()=>{var g;return(g=r.inputRef.current)==null?void 0:g.focus({preventScroll:!0})});case Ft.Escape:return r.comboboxState!==0?void 0:(w.preventDefault(),r.optionsRef.current&&!r.optionsPropsRef.current.static&&w.stopPropagation(),s.closeCombobox(),c.nextFrame(()=>{var g;return(g=r.inputRef.current)==null?void 0:g.focus({preventScroll:!0})}));default:return}}),u=oe(w=>{if(V_(w.currentTarget))return w.preventDefault();r.comboboxState===0?s.closeCombobox():(w.preventDefault(),s.openCombobox()),c.nextFrame(()=>{var g;return(g=r.inputRef.current)==null?void 0:g.focus({preventScroll:!0})})}),m=Ja(()=>{if(r.labelId)return[r.labelId,a].join(" ")},[r.labelId,a]),h=ct(()=>({open:r.comboboxState===0,disabled:r.disabled,value:r.value}),[r]),p={ref:i,id:a,type:I_(e,r.buttonRef),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(n=r.optionsRef.current)==null?void 0:n.id,"aria-expanded":r.comboboxState===0,"aria-labelledby":m,disabled:r.disabled,onClick:u,onKeyDown:d};return Rn({ourProps:p,theirProps:l,slot:h,defaultTag:Q_,name:"Combobox.Button"})}let tb="label";function nb(e,t){let n=Bs(),{id:r=`headlessui-combobox-label-${n}`,...s}=e,i=$r("Combobox.Label"),o=Us("Combobox.Label"),a=pr(i.labelRef,t);Qe(()=>o.registerLabel(r),[r]);let l=oe(()=>{var d;return(d=i.inputRef.current)==null?void 0:d.focus({preventScroll:!0})}),c=ct(()=>({open:i.comboboxState===0,disabled:i.disabled}),[i]);return Rn({ourProps:{ref:a,id:r,onClick:l},theirProps:s,slot:c,defaultTag:tb,name:"Combobox.Label"})}let rb="ul",sb=Bi.RenderStrategy|Bi.Static;function ib(e,t){let n=Bs(),{id:r=`headlessui-combobox-options-${n}`,hold:s=!1,...i}=e,o=$r("Combobox.Options"),a=pr(o.optionsRef,t),l=nl(),c=l!==null?(l&Dt.Open)===Dt.Open:o.comboboxState===0;Qe(()=>{var h;o.optionsPropsRef.current.static=(h=e.static)!=null?h:!1},[o.optionsPropsRef,e.static]),Qe(()=>{o.optionsPropsRef.current.hold=s},[o.optionsPropsRef,s]),R_({container:o.optionsRef.current,enabled:o.comboboxState===0,accept(h){return h.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:h.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(h){h.setAttribute("role","none")}});let d=Ja(()=>{var h,p;return(p=o.labelId)!=null?p:(h=o.buttonRef.current)==null?void 0:h.id},[o.labelId,o.buttonRef.current]),u=ct(()=>({open:o.comboboxState===0,option:void 0}),[o]),m={"aria-labelledby":d,role:"listbox","aria-multiselectable":o.mode===1?!0:void 0,id:r,ref:a};return o.virtual&&o.comboboxState===0&&Object.assign(i,{children:Z.createElement(q_,null,i.children)}),Rn({ourProps:m,theirProps:i,slot:u,defaultTag:rb,features:sb,visible:c,name:"Combobox.Options"})}let ob="li";function ab(e,t){var n;let r=Bs(),{id:s=`headlessui-combobox-option-${r}`,disabled:i=!1,value:o,order:a=null,...l}=e,c=$r("Combobox.Option"),d=Us("Combobox.Option"),u=c.virtual?c.activeOptionIndex===c.calculateIndex(o):c.activeOptionIndex===null?!1:((n=c.options[c.activeOptionIndex])==null?void 0:n.id)===s,m=c.isSelected(o),h=de(null),p=pn({disabled:i,value:o,domRef:h,order:a}),w=dn(mh),g=pr(t,h,w?w.measureElement:null),C=oe(()=>d.onChange(o));Qe(()=>d.registerOption(s,p),[p,s]);let x=de(!(c.virtual||c.__demoMode));Qe(()=>{if(!c.virtual||!c.__demoMode)return;let X=mr();return X.requestAnimationFrame(()=>{x.current=!0}),X.dispose},[c.virtual,c.__demoMode]),Qe(()=>{if(!x.current||c.comboboxState!==0||!u||c.activationTrigger===0)return;let X=mr();return X.requestAnimationFrame(()=>{var he,G;(G=(he=h.current)==null?void 0:he.scrollIntoView)==null||G.call(he,{block:"nearest"})}),X.dispose},[h,u,c.comboboxState,c.activationTrigger,c.activeOptionIndex]);let A=oe(X=>{var he;if(i||(he=c.virtual)!=null&&he.disabled(o))return X.preventDefault();C(),rh()||requestAnimationFrame(()=>{var G;return(G=c.inputRef.current)==null?void 0:G.focus({preventScroll:!0})}),c.mode===0&&requestAnimationFrame(()=>d.closeCombobox())}),P=oe(()=>{var X;if(i||(X=c.virtual)!=null&&X.disabled(o))return d.goToOption(et.Nothing);let he=c.calculateIndex(o);d.goToOption(et.Specific,he)}),V=T_(),Y=oe(X=>V.update(X)),ce=oe(X=>{var he;if(!V.wasMoved(X)||i||(he=c.virtual)!=null&&he.disabled(o)||u)return;let G=c.calculateIndex(o);d.goToOption(et.Specific,G,0)}),Ce=oe(X=>{var he;V.wasMoved(X)&&(i||(he=c.virtual)!=null&&he.disabled(o)||u&&(c.optionsPropsRef.current.hold||d.goToOption(et.Nothing)))}),le=ct(()=>({active:u,selected:m,disabled:i}),[u,m,i]);return Rn({ourProps:{id:s,ref:g,role:"option",tabIndex:i===!0?void 0:-1,"aria-disabled":i===!0?!0:void 0,"aria-selected":m,disabled:void 0,onClick:A,onFocus:P,onPointerEnter:Y,onMouseEnter:Y,onPointerMove:ce,onMouseMove:ce,onPointerLeave:Ce,onMouseLeave:Ce},theirProps:l,slot:le,defaultTag:ob,name:"Combobox.Option"})}let lb=gn(J_),cb=gn(eb),ub=gn(X_),db=gn(nb),fb=gn(ib),hb=gn(ab),js=Object.assign(lb,{Input:ub,Button:cb,Label:db,Options:fb,Option:hb});function ol(){let e=de(!1);return Qe(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function mb(e=0){let[t,n]=Ze(e),r=ol(),s=Un(l=>{r.current&&n(c=>c|l)},[t,r]),i=Un(l=>!!(t&l),[t]),o=Un(l=>{r.current&&n(c=>c&~l)},[n,r]),a=Un(l=>{r.current&&n(c=>c^l)},[n]);return{flags:t,addFlag:s,hasFlag:i,removeFlag:o,toggleFlag:a}}function pb(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function al(e,...t){e&&t.length>0&&e.classList.add(...t)}function ll(e,...t){e&&t.length>0&&e.classList.remove(...t)}function gb(e,t){let n=mr();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:s}=getComputedStyle(e),[i,o]=[r,s].map(l=>{let[c=0]=l.split(",").filter(Boolean).map(d=>d.includes("ms")?parseFloat(d):parseFloat(d)*1e3).sort((d,u)=>u-d);return c}),a=i+o;if(a!==0){n.group(c=>{c.setTimeout(()=>{t(),c.dispose()},a),c.addEventListener(e,"transitionrun",d=>{d.target===d.currentTarget&&c.dispose()})});let l=n.addEventListener(e,"transitionend",c=>{c.target===c.currentTarget&&(t(),l())})}else t();return n.add(()=>t()),n.dispose}function $b(e,t,n,r){let s=n?"enter":"leave",i=mr(),o=r!==void 0?pb(r):()=>{};s==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let a=dt(s,{enter:()=>t.enter,leave:()=>t.leave}),l=dt(s,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),c=dt(s,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return ll(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),al(e,...t.base,...a,...c),i.nextFrame(()=>{ll(e,...t.base,...a,...c),al(e,...t.base,...a,...l),gb(e,()=>(ll(e,...t.base,...a),al(e,...t.base,...t.entered),o()))}),i.dispose}function wb({immediate:e,container:t,direction:n,classes:r,onStart:s,onStop:i}){let o=ol(),a=Ls(),l=pn(n);Qe(()=>{e&&(l.current="enter")},[e]),Qe(()=>{let c=mr();a.add(c.dispose);let d=t.current;if(d&&l.current!=="idle"&&o.current)return c.dispose(),s.current(l.current),c.add($b(d,r.current,l.current==="enter",()=>{c.dispose(),i.current(l.current)})),c.dispose},[n])}function Kn(e=""){return e.split(/\s+/).filter(t=>t.length>1)}let ji=Bn(null);ji.displayName="TransitionContext";var yb=(e=>(e.Visible="visible",e.Hidden="hidden",e))(yb||{});function _b(){let e=dn(ji);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function bb(){let e=dn(zi);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let zi=Bn(null);zi.displayName="NestingContext";function Hi(e){return"children"in e?Hi(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function ph(e,t){let n=pn(e),r=de([]),s=ol(),i=Ls(),o=oe((h,p=qn.Hidden)=>{let w=r.current.findIndex(({el:g})=>g===h);w!==-1&&(dt(p,{[qn.Unmount](){r.current.splice(w,1)},[qn.Hidden](){r.current[w].state="hidden"}}),i.microTask(()=>{var g;!Hi(r)&&s.current&&((g=n.current)==null||g.call(n))}))}),a=oe(h=>{let p=r.current.find(({el:w})=>w===h);return p?p.state!=="visible"&&(p.state="visible"):r.current.push({el:h,state:"visible"}),()=>o(h,qn.Unmount)}),l=de([]),c=de(Promise.resolve()),d=de({enter:[],leave:[],idle:[]}),u=oe((h,p,w)=>{l.current.splice(0),t&&(t.chains.current[p]=t.chains.current[p].filter(([g])=>g!==h)),t==null||t.chains.current[p].push([h,new Promise(g=>{l.current.push(g)})]),t==null||t.chains.current[p].push([h,new Promise(g=>{Promise.all(d.current[p].map(([C,x])=>x)).then(()=>g())})]),p==="enter"?c.current=c.current.then(()=>t==null?void 0:t.wait.current).then(()=>w(p)):w(p)}),m=oe((h,p,w)=>{Promise.all(d.current[p].splice(0).map(([g,C])=>C)).then(()=>{var g;(g=l.current.shift())==null||g()}).then(()=>w(p))});return ct(()=>({children:r,register:a,unregister:o,onStart:u,onStop:m,wait:c,chains:d}),[a,o,r,u,m,d,c])}function vb(){}let xb=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function gh(e){var t;let n={};for(let r of xb)n[r]=(t=e[r])!=null?t:vb;return n}function Cb(e){let t=de(gh(e));return Te(()=>{t.current=gh(e)},[e]),t}let Sb="div",$h=Bi.RenderStrategy;function Ab(e,t){var n,r;let{beforeEnter:s,afterEnter:i,beforeLeave:o,afterLeave:a,enter:l,enterFrom:c,enterTo:d,entered:u,leave:m,leaveFrom:h,leaveTo:p,...w}=e,g=de(null),C=pr(g,t),x=(n=w.unmount)==null||n?qn.Unmount:qn.Hidden,{show:A,appear:P,initial:V}=_b(),[Y,ce]=Ze(A?"visible":"hidden"),Ce=bb(),{register:le,unregister:X}=Ce;Te(()=>le(g),[le,g]),Te(()=>{if(x===qn.Hidden&&g.current){if(A&&Y!=="visible"){ce("visible");return}return dt(Y,{hidden:()=>X(g),visible:()=>le(g)})}},[Y,g,le,X,A,x]);let he=pn({base:Kn(w.className),enter:Kn(l),enterFrom:Kn(c),enterTo:Kn(d),entered:Kn(u),leave:Kn(m),leaveFrom:Kn(h),leaveTo:Kn(p)}),G=Cb({beforeEnter:s,afterEnter:i,beforeLeave:o,afterLeave:a}),ne=Ya();Te(()=>{if(ne&&Y==="visible"&&g.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[g,Y,ne]);let Me=V&&!P,M=P&&A&&V,Se=!ne||Me?"idle":A?"enter":"leave",ue=mb(0),tt=oe(Vt=>dt(Vt,{enter:()=>{ue.addFlag(Dt.Opening),G.current.beforeEnter()},leave:()=>{ue.addFlag(Dt.Closing),G.current.beforeLeave()},idle:()=>{}})),Ie=oe(Vt=>dt(Vt,{enter:()=>{ue.removeFlag(Dt.Opening),G.current.afterEnter()},leave:()=>{ue.removeFlag(Dt.Closing),G.current.afterLeave()},idle:()=>{}})),Be=ph(()=>{ce("hidden"),X(g)},Ce),kt=de(!1);wb({immediate:M,container:g,classes:he,direction:Se,onStart:pn(Vt=>{kt.current=!0,Be.onStart(g,Vt,tt)}),onStop:pn(Vt=>{kt.current=!1,Be.onStop(g,Vt,Ie),Vt==="leave"&&!Hi(Be)&&(ce("hidden"),X(g))})});let on=w,br={ref:C};return M?on={...on,className:Li(w.className,...he.current.enter,...he.current.enterFrom)}:kt.current&&(on.className=Li(w.className,(r=g.current)==null?void 0:r.className),on.className===""&&delete on.className),Z.createElement(zi.Provider,{value:Be},Z.createElement(ch,{value:dt(Y,{visible:Dt.Open,hidden:Dt.Closed})|ue.flags},Rn({ourProps:br,theirProps:on,defaultTag:Sb,features:$h,visible:Y==="visible",name:"Transition.Child"})))}function kb(e,t){let{show:n,appear:r=!1,unmount:s=!0,...i}=e,o=de(null),a=pr(o,t);Ya();let l=nl();if(n===void 0&&l!==null&&(n=(l&Dt.Open)===Dt.Open),![!0,!1].includes(n))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,d]=Ze(n?"visible":"hidden"),u=ph(()=>{d("hidden")}),[m,h]=Ze(!0),p=de([n]);Qe(()=>{m!==!1&&p.current[p.current.length-1]!==n&&(p.current.push(n),h(!1))},[p,n]);let w=ct(()=>({show:n,appear:r,initial:m}),[n,r,m]);Te(()=>{if(n)d("visible");else if(!Hi(u))d("hidden");else{let A=o.current;if(!A)return;let P=A.getBoundingClientRect();P.x===0&&P.y===0&&P.width===0&&P.height===0&&d("hidden")}},[n,u]);let g={unmount:s},C=oe(()=>{var A;m&&h(!1),(A=e.beforeEnter)==null||A.call(e)}),x=oe(()=>{var A;m&&h(!1),(A=e.beforeLeave)==null||A.call(e)});return Z.createElement(zi.Provider,{value:u},Z.createElement(ji.Provider,{value:w},Rn({ourProps:{...g,as:ve,children:Z.createElement(wh,{ref:a,...g,...i,beforeEnter:C,beforeLeave:x})},theirProps:{},defaultTag:ve,features:$h,visible:c==="visible",name:"Transition"})))}function Eb(e,t){let n=dn(ji)!==null,r=nl()!==null;return Z.createElement(Z.Fragment,null,!n&&r?Z.createElement(cl,{ref:t,...e}):Z.createElement(wh,{ref:t,...e}))}let cl=gn(kb),wh=gn(Ab),Ib=gn(Eb),Nb=Object.assign(cl,{Child:Ib,Root:cl});function Tb({name:e,control:t,queryAnzsic:n}){const[r,s]=Ze(""),[i,o]=Ze([]),a=async()=>{try{if(r.length>=2){const d=await n(r);o(d)}else o([])}catch(d){console.error("Error fetching data:",d),o([])}};Te(()=>{const d=setTimeout(()=>{a()},500);return()=>clearTimeout(d)},[r]);const{field:l,fieldState:c}=Df({name:e,control:t,rules:{required:!0}});return R("div",{children:R(js,{onChange:l.onChange,value:l.value??null,name:l.name,children:[R(js.Label,{className:"block text-sm font-medium text-gray-900",children:"Industry"}),R("div",{className:"relative mt-2",children:[R("div",{className:"grid grid-cols-1",children:[R(js.Input,{className:"col-start-1 row-start-1 block w-full rounded-md bg-white py-[9px] pl-9 pr-2 text-gray-900 placeholder:text-gray-400 text-sm border border-gray-300 focus:ring-2 focus:ring-indigo-600 focus:border-indigo-600",onChange:d=>s(d.target.value),onBlur:()=>s(""),placeholder:"Type to search industries",displayValue:d=>{const u=l.value;return u!=null&&u.ClassTitle?`${u.ClassCode} ${u.ClassTitle}`:""}}),R(Lw,{className:"pointer-events-none col-start-1 row-start-1 ml-3 self-center text-gray-400 size-4"})]}),i.length>0&&R(js.Options,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 shadow-lg ring-1 ring-black/5 focus:outline-none",children:i.map(d=>R(ve,{children:[R("div",{className:"flex items-center text-xs text-gray-500 font-semibold mb-1 mx-3 mt-2 uppercase",children:[R("span",{className:"self-start",children:d.GroupCode}),R("span",{className:"ml-2",children:d.GroupTitle})]}),d.Classes.map(u=>{var m,h;return R(js.Option,{value:u,className:({active:p})=>`group relative cursor-pointer select-none py-2 pl-3 pr-9 ${p?"bg-indigo-600 text-white outline-none":"text-gray-900"}`,children:[R("div",{className:`flex items-center text-sm ${((m=l.value)==null?void 0:m.ClassCode)===u.ClassCode?"font-semibold":"font-normal"}`,children:[R("span",{className:"self-start",children:u.ClassCode}),R("span",{className:"ml-2",children:u.ClassTitle})]}),R("span",{className:`absolute inset-y-0 right-0 items-center pr-4 text-indigo-600 group-hover:text-white ${((h=l.value)==null?void 0:h.ClassCode)===u.ClassCode?"flex":"hidden"}`,children:R(Mw,{className:"size-5"})})]},u.ClassCode)})]}))}),r.length>1&&i.length===0&&R("div",{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 shadow-lg ring-1 ring-black/5 focus:outline-none",children:R("div",{className:"group relative cursor-default select-none py-2 pl-3 pr-9 text-gray-400 text-sm",children:"Keep typing to search industries"})})]}),c.invalid&&R("p",{className:"mt-2 text-sm text-red-600",children:"Industry is required"})]})})}function Rb({defaultValues:e,validateAccountName:t,validateLegalEntityName:n,validateAbn:r,validateSalesforceParentRecordId:s,validateWebsiteUrl:i,queryAnzsic:o,onSubmit:a,closeModal:l}){const{handleSubmit:c,control:d}=Di({mode:"onChange",defaultValues:e});return R(ve,{children:[R("div",{className:"font-bold text-lg mb-4",children:"Account details"}),R("form",{className:"space-y-6",onSubmit:c(a),children:[R("div",{children:[R(gt,{label:"Account name",name:"AccountName",control:d,placeholder:"e.g. Acme Co",validate:t}),R("p",{className:"mt-2 text-sm font-normal text-gray-500",children:"This will be used as a display name."})]}),R(gt,{label:"Legal entity name",name:"LegalEntityName",control:d,placeholder:"e.g. ACME LTD PTY",validate:n}),R("div",{className:"grid grid-cols-2 gap-3",children:[R(gt,{label:"ABN",name:"Abn",control:d,validate:r,isNumber:!0}),R(gt,{label:"Salesforce parent RecordID",name:"SalesforceParentRecordId",control:d,validate:s})]}),R(gt,{label:"Website URL",name:"WebsiteUrl",control:d,placeholder:"https://acme.com.au",validate:i}),R(Tb,{name:"Industry",control:d,queryAnzsic:o}),R(Fi,{primaryLabel:"Next",secondaryLabel:"Cancel",secondaryOnClick:l})]})]})}function Mb(e,t,n,r){return f(Rb,{defaultValues:e,validateAccountName:s=>mt(Oo(s)),validateLegalEntityName:s=>mt(Rc(s)),validateAbn:s=>mt(Mc(s)),validateSalesforceParentRecordId:s=>mt(O0(s)),validateWebsiteUrl:s=>mt(vc(s)),queryAnzsic:t,onSubmit:s=>{r(new tn(2,[s])),r(new tn(0,[]))},closeModal:n})}function yh(e,t){let n,r,s;const i=f("div",{className:"pt-6 px-6 pb-4 border-b font-bold text-xl",children:"Add a new account"}),o=f("div",S(y([["className","pt-4 mx-6"],(n=me(I(()=>t)),["children",v.Children.toArray(Array.from(n))])])));return f(Yr,{onClose:e,child:(r=[f("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),f("div",S(y([["className","fixed inset-0 z-10 w-screen overflow-y-auto h-full flex items-center justify-center"],(s=[f("div",{className:"w-[480px] bg-white shadow-xl rounded-lg",children:v.Children.toArray([i,o])})],["children",v.Children.toArray(Array.from(s))])])))],f(ve,{},...r))})}function Pb(e,t){let n;const r=f("div",S(y([["className","mb-4 text-sm font-normal text-gray-500"],(n=["All fields are required unless labelled as ",f("span",{className:"font-semibold",children:"optional"}),"."],["children",v.Children.toArray(Array.from(n))])])));return yh(e,me(I(()=>D(E(r),I(()=>t)))))}function Ob(e){let t,n,r,s;return yh(e,[f("div",S(y([["className","text-sm mb-4"],(t=[f("p",{children:["You do not have sufficient permissions."]}),(n=y(["For details, please see ",f("a",{className:"font-medium text-blue-600 hover:underline",href:"https://myobconfluence.atlassian.net/wiki/spaces/ENG/pages/9811993991/SuperHero+Module+Permissions",target:"_blank",children:"SuperHero Module Permissions"})]),f("p",{children:v.Children.toArray(Array.from(n))})),f("div",S(y([["className","flex justify-end"],(r=[f("button",S(y([(s="rounded-md bg-indigo-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-xs hover:bg-indigo-500 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600",["className",s]),["type","button"],["onClick",i=>{e()}],["children","Close"]])))],["children",v.Children.toArray(Array.from(r))])])))],["children",v.Children.toArray(Array.from(t))])])))])}function Db(e){const t=e.closeModal,n=e.partnerId,r=ir(Hn),s=vy(r.BackendUrl,r.AccessToken),i=Kr(()=>qr(()=>Ay,(l,c)=>ky(n,s,l,c),(l,c)=>{}),void 0,void 0),o=i[0],a=i[1];return r.Roles.ProvisionAccounts?Pb(t,me(I(()=>{const l=o.CurrentView;return l.tag===1?E(Ky(o.PrimaryContactForm,a)):l.tag===2?E(Yy(o.BusinessAddressForm,Sy(o),Cy(o),a)):E(Mb(o.AccountDetailsForm,c=>s.QueryAnzsic(c),t,a))}))):Ob(t)}function Fb(e){const t=e.partnerId,n=zn(!1),r=n[1],s=me(I(()=>{let i;return D(E(f("button",S(y([["type","button"],(i="inline-flex items-center gap-x-2 rounded-md bg-indigo-600 px-3.5 py-[8.5px] text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600",["className",i]),["onClick",o=>{r(!0)}],["children",v.Children.toArray([yy,"Add account"])]])))),I(()=>n[0]?E(f(Db,{partnerId:t,closeModal:()=>{r(!1)}})):Ke()))}));return f(ve,{},...s)}class Vb extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["ColumnHeader"]}}function _h(e){return new Vb(e)}function bh(e){return e.fields[0]}class Lb extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["RowCell"]}}function Qr(e){return new Lb(e)}function vh(e){return e.fields[0]}function Bb(){return["scope","col"]}function wr(e){return _h(f("th",S(y([["className","px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"],Bb(),["children",e]]))))}function Ub(e,t){let n;return Qr(f("td",S(y([["className","px-6 py-4 whitespace-nowrap text-sm"],(n=[f("a",{className:"text-indigo-600 hover:text-indigo-900",children:t,href:e})],["children",v.Children.toArray(Array.from(n))])]))))}function Wi(e,t){return Qr(f("td",{className:re(" ",D(e,["px-6","py-4","whitespace-nowrap","text-sm"])),children:t}))}function jb(e,t){let n,r,s,i,o,a,l;return f("div",S(y([["className","flex flex-col mt-4"],(n=[f("div",S(y([["className","-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"],(r=[f("div",S(y([["className","py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8"],(s=[f("div",S(y([["className","shadow overflow-hidden border-b border-gray-200 sm:rounded-lg"],(i=[f("table",S(y([["className","min-w-full divide-y divide-gray-200"],(o=[f("thead",{className:"bg-gray-50",children:(a=Ve(bh,e),f("tr",{children:v.Children.toArray(Array.from(a))}))}),(l=No((c,d)=>(u=>{let m;return f("tr",S(y([["className",c%2===0?"bg-white":"bg-gray-50"],(m=Ve(vh,u),["children",v.Children.toArray(Array.from(m))])])))})(d),t),f("tbody",{children:v.Children.toArray(Array.from(l))}))],["children",v.Children.toArray(Array.from(o))])])))],["children",v.Children.toArray(Array.from(i))])])))],["children",v.Children.toArray(Array.from(s))])])))],["children",v.Children.toArray(Array.from(r))])])))],["children",v.Children.toArray(Array.from(n))])])))}function zb(e,t,n){return e?nt(n,t):n}function xh(e,t,n,r){let s,i,o;return _h(f("th",S(y([["className",re(" ",["px-6","py-3","text-left","text-xs","font-medium","text-gray-500","sm:pl-6","uppercase","tracking-wider"])],["scope","col"],(s=[f("a",S(y([["className",re(" ",["group","inline-flex","cursor-pointer"])],["onClick",n],(i=[r,f("span",S(y([["className",re(" ",zb(!e,te("invisible"),y(["ml-2","flex-none","rounded","text-gray-400","group-hover:visible","group-focus:visible"])))],(o=me(I(()=>E(t?$y:wy))),["children",v.Children.toArray(Array.from(o))])])))],["children",v.Children.toArray(Array.from(i))])])))],["children",v.Children.toArray(Array.from(s))])]))))}function Hb(e,t){return xh(Pe(dd(e.Sort),new In(1,[])),Pe(fd(e.Sort),new lr(0,[])),n=>{t(new ur(1,[hd(new In(1,[]),e.Sort)]))},"Name")}function Wb(e,t){return xh(Pe(dd(e.Sort),new In(0,[])),Pe(fd(e.Sort),new lr(0,[])),n=>{t(new ur(1,[hd(new In(0,[]),e.Sort)]))},"Id")}function Gb(e,t){let n;return Qr(f("td",S(y([["className",re(" ",["text-gray-500","px-6","py-2","whitespace-nowrap","text-sm","align-top"])],(n=[f("span",{children:[e]}),f("br",{}),f("span",{children:[t]})],["children",v.Children.toArray(Array.from(n))])]))))}function qb(e,t,n){let r;return Qr(f("td",S(y([["className",re(" ",["text-gray-500","px-6","py-2","whitespace-nowrap","text-sm","align-top"])],(r=me(I(()=>{let s;return D(E(f("div",S(y([["className",re(" ",["font-medium"])],(s=[f("span",{children:[e]})],["children",v.Children.toArray(Array.from(s))])])))),I(()=>{let i;return D((i=t,i==null?E($e()):E(f("span",{children:["Legal Entity: "+i]}))),I(()=>{const o=n;if(o==null)return E($e());{const a=o;return D(E(f("br",{})),I(()=>E(f("span",{children:["ABN: "+a]}))))}}))}))})),["children",v.Children.toArray(Array.from(r))])]))))}function Kb(e){return Qr(f("td",{className:re(" ",["px-6","py-2","whitespace-nowrap","text-sm","text-gray-500","align-top"]),children:e}))}function Zb(e,t,n,r){let s;return Qr(f("td",S(y([["className","px-6 py-2 whitespace-nowrap text-sm align-top"],(s=me(I(()=>D(E(f("a",{className:"text-indigo-600 hover:text-indigo-900",children:t,href:e})),I(()=>{let i,o;return D((i=r,i==null?E($e()):(o=i,D(E(f("br",{})),I(()=>E(f("span",{children:[`Channel ID: ${o}`]})))))),I(()=>{const a=n;if(a==null)return E($e());{const l=a;return D(E(f("br",{})),I(()=>E(f("span",{children:[`External ID: ${l}`]}))))}}))})))),["children",v.Children.toArray(Array.from(s))])]))))}function Jb(e,t,n){const r=jt(n.AccountId);return me(I(()=>{let s;return D(E(Zb(ar(As((s=[e,r],new q(8,[s[0],s[1]])))),n.AccountId,n.ExternalId,n.ChannelId)),I(()=>D(E(qb(n.Name,n.BusinessName,n.BusinessNumber)),I(()=>D(t.ReadProtectedData?E(Gb(We(n.Contact,""),We(n.ContactMobilePhone,""))):Ke(),I(()=>E(Kb(n.Website))))))))}))}class Yb extends ee{constructor(t,n){super(),this.Data=t,this.LoadNext=n}}class Ch extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Resolved","InProgress"]}}class Sh extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Known","Unknown"]}}function Xb(e){let t;return f("thead",{className:"bg-gray-50",children:(t=Ve(bh,e),f("tr",{children:v.Children.toArray(Array.from(t))}))})}function Qb(e,t){let n;return f("tr",S(y([["className",e%2===0?"bg-white":"bg-gray-50"],(n=Ve(vh,t),["children",v.Children.toArray(Array.from(n))])])))}function ev(e,t,n,r,s,i){let o,a,l,c,d,u,m;const h=t!=null&&n!=null?(o=t|0,a=n|0,me(I(()=>D(E("Showing "),I(()=>D(E(f("span",{className:"font-medium",children:`${o}`})),I(()=>D(E(" to "),I(()=>D(E(f("span",{className:"font-medium",children:`${a}`})),I(()=>D(E(" of "),I(()=>r.tag===1?te(" many"):y([f("span",{className:"font-medium",children:ft(r.fields[0])})," results"])))))))))))))):te($e()),p=me(I(()=>{let w,g;return D((w=i,w==null?E($e()):(g=w,E(f("a",{className:re(" ",["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:g,children:"Previous "})))),I(()=>{const C=s;if(C==null)return E($e());{const x=C;return E(f("a",{className:re(" ",["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:x,children:" Next"}))}}))}));return f("tfoot",S(y([["className",re(" ",["w-full"])],(l=[f("tr",S(te((c=[f("td",S(y([["colSpan",e],(d=[f("nav",S(y([["className",re(" ",["bg-white","px-4","py-3","flex","items-center","justify-between","border-t-1","border-gray-200","sm:px-6"])],(u=[f("div",S(y([["className",re(" ",["hidden","sm:block"])],(m=[f("p",{className:re(" ",["text-sm","text-gray-700"]),children:v.Children.toArray(Array.from(h))})],["children",v.Children.toArray(Array.from(m))])]))),f("div",{className:re(" ",["flex-1","flex","justify-between","sm:justify-end"]),children:v.Children.toArray(Array.from(p))})],["children",v.Children.toArray(Array.from(u))])])))],["children",v.Children.toArray(Array.from(d))])])))],["children",v.Children.toArray(Array.from(c))]))))],["children",v.Children.toArray(Array.from(l))])])))}function tv(e,t){const n=zn(1),r=n[1],s=n[0]|0;return[s,i=>{if(s===e){if(t!=null){const o=t;Wl(Ut("Calling Load")),o(),r(s+1)}}else r(s+1)},i=>{r(s-1)}]}function nv(e){let t,n,r,s,i;const o=e.data,a=e.pageSize,l=e.renderRowCells,c=e.columnHeaders,d=up(a,o.Data),u=tv(Nr(d),o.LoadNext),m=u[0]|0,h=u[1];let p;const w=op(m-1,d);p=w==null?new Ch(1,[]):new Ch(0,[w]);const g=Nr(o.Data)|0,C=o.LoadNext==null?new Sh(0,[g]):new Sh(1,[]),x=p.tag===1?void 0:g>=1?(m-1)*a+1:void 0,A=p.tag===1?void 0:g>=1?(m-1)*a+Nr(p.fields[0]):void 0,P=m===1?void 0:u[2],V=m===Nr(d)?o.LoadNext!=null?h:void 0:m<Nr(d)?h:void 0;return f("div",S(y([["className","flex flex-col mt-4"],(t=[f("div",S(y([["className","-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"],(n=[f("div",S(y([["className","py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8"],(r=[f("div",S(y([["className","shadow overflow-hidden border-b border-gray-200 sm:rounded-lg"],(s=[f("table",S(y([["className","min-w-full divide-y divide-gray-200"],(i=me(I(()=>D(E(Xb(c)),I(()=>{let Y,ce;return D((Y=p,Y.tag===1?E($e()):E((ce=No(Qb,l(Y.fields[0])),f("tbody",{children:v.Children.toArray(Array.from(ce))})))),I(()=>E(ev(Nr(c),x,A,C,V,P))))})))),["children",v.Children.toArray(Array.from(i))])])))],["children",v.Children.toArray(Array.from(s))])])))],["children",v.Children.toArray(Array.from(r))])])))],["children",v.Children.toArray(Array.from(n))])])))],["children",v.Children.toArray(Array.from(t))])])))}function rn(e){const t=e.error,n=te(f("span",{children:[t]}));return f("div",{children:v.Children.toArray(Array.from(n))})}function zs(){const e=te(f("span",{children:["Please wait..."]}));return f("div",{children:v.Children.toArray(Array.from(e))})}function rv(e){let t,n,r,s,i,o;const a=ir(Hn),l=uy({accessToken:a.AccessToken,backendUrl:a.BackendUrl,partnerId:e.partnerId}),c=Kr(()=>qr(hy,(A,P)=>my(l,A,P),(A,P)=>{}),void 0,void 0),d=c[0],u=c[1],m=new _a(d.SearchText,d.Sort,d.PageSize);fa((t=[()=>fy(l,m),A=>{u(new ur(2,[A]))}],od(t[0],t[1])));const h=A=>{u(new ur(4,[]))},p=d.Data;let w,g,C,x;switch(p.tag){case 0:case 1:{w=2;break}case 3:{w=3,x=p.fields[0];break}default:p.fields[0].tag===1?(w=1,C=p.fields[0].fields[0]):(w=0,g=p.fields[0].fields[0])}switch(w){case 0:{const A=y([f("div",S(y([["className",re(" ",["flex","justify-between","items-end","pt-2","sm:-mr-6","lg:mr-0"])],(n=me(I(()=>{let P;return D(E(f("div",S(y([["className",re(" ",["flex","flex-row","gap-4","sm:-mr-6","lg:mr-0","w-[560px]"])],(P=[xf(pd(d.SearchText),"Account ID, Name, Legal Entity, Channel ID or External ID",V=>{u(new ur(0,[V]))},h),py(h)],["children",v.Children.toArray(Array.from(P))])])))),I(()=>e.accountProvisioningMode.tag===0?E($e()):E(f(Fb,{partnerId:e.partnerId}))))})),["children",v.Children.toArray(Array.from(n))])]))),(r=g,s=me(I(()=>D(E(Wb(d,u)),I(()=>D(E(Hb(d,u)),I(()=>D(a.Roles.ReadProtectedData?E(wr("Contact")):Ke(),I(()=>E(wr("Website")))))))))),i=new Yb(r.Accounts,Ge(P=>()=>{Br(dy(l)(m)(P)(u))},r.Token)),o=gd(d.PageSize)|0,f(nv,{columnHeaders:s,renderRowCells:P=>er(V=>Jb(e.partnerId,a.Roles,V),P),pageSize:o,data:i}))]);return f("div",{children:v.Children.toArray(Array.from(A))})}case 1:return f(rn,{error:C});case 2:return f(zs,null);default:{const A=ft(x);return f(rn,{error:A})}}}let Gi=class extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function Ah(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,s=e.partnerId,i=ps(o=>o,[new Gi(1,[t]),new Gi(0,[n]),new Gi(2,[ln(s)]),Ge(o=>new Gi(3,[cn(o)]),r)]);return f("superhero-super-configuration",Vn(i,1))}let qi=class extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function kh(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,s=e.partnerId,i=ps(o=>o,[new qi(1,[t]),new qi(0,[n]),new qi(2,[ln(s)]),Ge(o=>new qi(3,[cn(o)]),r)]);return f("superhero-benefits-onboarding-configuration",Vn(i,1))}let Ki=class extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function Eh(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,s=e.partnerId,i=ps(o=>o,[new Ki(1,[t]),new Ki(0,[n]),new Ki(2,[ln(s)]),Ge(o=>new Ki(3,[cn(o)]),r)]);return f("superhero-bank-details",Vn(i,1))}let Zi=class extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function Ih(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,s=e.partnerId,i=ps(o=>o,[new Zi(1,[t]),new Zi(0,[n]),new Zi(2,[ln(s)]),Ge(o=>new Zi(3,[cn(o)]),r)]);return f("superhero-profile-directory-app",Vn(i,1))}let Ji=class extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function Nh(e){const t=e.accountId,n=e.partnerId,r=e.accessToken,s=e.backendUrl,i=ps(o=>o,[new Ji(1,[r]),new Ji(0,[s]),new Ji(2,[ln(n)]),Ge(o=>new Ji(3,[cn(o)]),t)]);return f("workspace-account-registry-app",Vn(i,1))}let Mn=class extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Key","Appear","Show","ClassName","Enter","EnterFrom","EnterTo","Leave","LeaveFrom","LeaveTo","Children"]}};function sv(e){const t=Vn(e,1);return f(Nb,t)}function Yi(e,t){let n;return f("div",S(y([["className","px-4 py-4 sm:px-0"],(n=[f("h3",{className:"text-lg font-semibold leading-7 text-gray-900",children:e}),We(Ge(r=>f("p",{className:"mt-1 max-w-2xl text-sm leading-6 text-gray-500",children:r}),t),$e())],["children",v.Children.toArray(Array.from(n))])])))}function rt(e,t){let n;return f("div",S(y([["className","px-4 py-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0"],(n=[f("dt",{className:"text-sm font-medium leading-6 text-gray-700",children:e}),f("dd",{className:"px-1 mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0",children:t})],["children",v.Children.toArray(Array.from(n))])])))}function ul(e){let t,n;const r=e.value,s=e.label,i=zn(!1),o=i[0],a=i[1];return Pg(()=>{Br(T.Delay(()=>o?T.Bind(pa(2e3),()=>(a(!1),T.Zero())):T.Zero()))}),f("div",S(y([["className","px-4 py-2 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0"],(t=[f("dt",{className:"text-sm font-medium leading-6 text-gray-700",children:s}),f("dd",S(y([["className","flex mt-1 text-sm leading-6 text-primary-700 sm:col-span-2 sm:mt-0 relative"],(n=[sv(y([new Mn(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 Mn(2,[o]),new Mn(4,["transition-opacity ease-in duration-100"]),new Mn(5,["opacity-0"]),new Mn(6,["opacity-90"]),new Mn(7,["transition-opacity ease-out duration-500"]),new Mn(8,["opacity-90"]),new Mn(9,["opacity-0"]),new Mn(10,[[f("div",{className:"w-[45px] h-4 not-italic font-medium text-xs leading-4 text-white flex-none order-none grow-0",children:"Copied"})]])])),f("div",{className:"px-1 cursor-pointer hover:text-primary-900 hover:bg-gray-300 rounded-md shrink",children:r})],["children",v.Children.toArray(Array.from(n))]),["onClick",l=>{navigator.clipboard.writeText(r),a(!0)}]])))],["children",v.Children.toArray(Array.from(t))])])))}function Xi(e,t){let n;const r=y([e,f("div",S(y([["className","mt-2 border-b border-gray-200"],(n=[f("dl",{className:"divide-y divide-gray-200 px-0 sm:px-4 max-w-2xl",children:v.Children.toArray(Array.from(t))})],["children",v.Children.toArray(Array.from(n))])])))]);return f("div",{children:v.Children.toArray(Array.from(r))})}function iv(e){const t=ir(Hn);return Xi(Yi("Partner Information",void 0),me(I(()=>{let n;return D(E((n=["ID",Pr(e.StreamId)],f(ul,{label:n[0],value:n[1]}))),I(()=>{let r;return D(E((r=["Name",pi(e.Name)],rt(r[0],r[1]))),I(()=>{let s,i,o;return D(t.Roles.ReadProtectedData?(s=e.ContactDetails,s!=null?(i=s,D(E((o=["Contact",`${Sc(i.FirstName)} ${kc(i.LastName)}`],rt(o[0],o[1]))),I(()=>{let a;return E((a=["Phone",Nc(i.MobilePhone)],rt(a[0],a[1])))}))):Ke()):Ke(),I(()=>{let a;return D(E((a=["Website",xc(e.Website)],rt(a[0],a[1]))),I(()=>{let l;return E((l=["Notes",We(E0(e.Notes),"")],rt(l[0],l[1])))}))}))}))}))})))}let yr=class extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Details","AccountList","SuperConfiguration","BenefitsOnboardingConfiguration","BankDetailsConfiguration","ProfileDirectory","Workspace"]}};class ov extends ee{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}class av extends ee{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}class lv extends ee{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}class cv extends ee{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}class uv extends ee{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}function dv(e){switch(e.tag){case 1:return"Accounts";case 2:return"Super";case 3:return"Benefits";case 4:return"Bank Details";case 5:return"Directory";case 6:return"Workspace";default:return"Details"}}function fv(e){switch(e.tag){case 1:return e.fields[0].partnerId;case 2:return e.fields[0].PartnerId;case 3:return e.fields[0].PartnerId;case 4:return e.fields[0].PartnerId;case 5:return e.fields[0].PartnerId;case 6:return e.fields[0].PartnerId;default:return Ue(Pr(e.fields[0].StreamId))}}function hv(e){const t=er(n=>_f(dv(e),n[0],ar(As(n[1](fv(e))))),y([["Details",n=>new q(1,[n])],["Accounts",n=>new q(3,[n])],["Super",n=>new q(4,[n])],["Benefits",n=>new q(5,[n])],["Bank Details",n=>new q(6,[n])],["Directory",n=>new q(2,[n])]]));return f(bf,{headers:t})}function mv(e){switch(e.tag){case 1:return f(rv,e.fields[0]);case 2:return f(Ah,{partnerId:e.fields[0].PartnerId,backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken});case 3:return f(kh,{partnerId:e.fields[0].PartnerId,backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken});case 4:return f(Eh,{partnerId:e.fields[0].PartnerId,backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken});case 5:return f(Ih,{partnerId:e.fields[0].PartnerId,backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken});case 6:return f(Nh,{backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken,partnerId:e.fields[0].PartnerId});default:return f(iv,e.fields[0])}}function Th(e){let t,n;const r=e.mode;return f("div",S(y([["className","flex flex-row"],(t=[hv(r),f("div",S(y([["className","w-full"],(n=[mv(r)],["children",v.Children.toArray(Array.from(n))])])))],["children",v.Children.toArray(Array.from(t))])])))}let Qi=class extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function pv(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,s=e.partnerId,i=I(()=>D(E(new Qi(1,[t])),I(()=>D(E(new Qi(0,[n])),I(()=>D(E(new Qi(2,[di(s)])),I(()=>E(new Qi(3,[fi(r)])))))))));return f("superhero-import-app",Vn(i,1))}class dl extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","account-id"]}}function gv(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,s=I(()=>D(E(new dl(1,[t])),I(()=>D(E(new dl(0,[n])),I(()=>E(new dl(2,[fi(r)])))))));return f("superhero-salpac-profile-admin",Vn(s,1))}class $v extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["RedirectionOff","RedirectionOn","Complete"]}}function eo(){return fo("AccountRegistry.AdminUI.FlareIdentityService.MigrationStateDto",[],$v,()=>[[["lastUpdated",ye(uo("System.DateTime"))]],[["lastUpdated",uo("System.DateTime")]],[["lastUpdated",uo("System.DateTime")]]])}function to(e){return`${e}/flare-identity/admin`}const wv=5,yv=1e3;function Rh(e,t,n,r){return T.Delay(()=>{const s=Ei(Ra(Wt(Ut("Bearer %s"))(n)),r);return T.Bind(Ma(s),i=>{let o,a;const l=i,c=l.statusCode|0;return o=c|0,o>=200&&o<=299?T.Return(l):(a=c|0,(a===429?!0:a>=500)&&e>=1?T.Bind(pa(t),()=>T.ReturnFrom(Rh(e-1,t,n,r))):T.Return(l))})})}const no=e=>t=>Rh(wv,yv,e,t);function _v(e,t,n,r){return T.Delay(()=>{let s;const i=no(t)(fn(new Qt(0,[]),en(`${to(e)}/accounts/${n}/migration`)));return s=T.Bind(i,o=>T.Return(new $(0,[o]))),T.Bind(s,o=>{const a=o;if(a.tag===1)return T.Return(new $(1,[a.fields[0]]));{const l=a.fields[0];if(l.statusCode===200){const c=Jt(pe(Xt(eo(),new xt(1,[]))),l.responseText);return T.Return(c)}else return T.Return(new $(1,["Unexpected response from flare identity backend"]))}})})}function bv(e,t,n,r){return T.Delay(()=>{let s;const i=no(t)(fn(new Qt(2,[]),en(`${to(e)}/accounts/${n}/migration/start`)));return s=T.Bind(i,o=>T.Return(new $(0,[o]))),T.Bind(s,o=>{const a=o;if(a.tag===1)return T.Return(new $(1,[a.fields[0]]));{const l=a.fields[0];if(l.statusCode===200){let c;const d=Jt(pe(Xt(eo(),new xt(1,[]))),l.responseText);return c=T.Return(d),T.Bind(c,u=>{const m=u;if(m.tag===1)return T.Return(new $(1,[m.fields[0]]));{const h=m.fields[0];return h.tag===1?T.Return(new $(0,[h.fields[0]])):T.Return(new $(1,["Unexpected migration state after starting migration"]))}})}else return T.Return(new $(1,["Unexpected response from flare identity backend"]))}})})}function vv(e,t,n,r){return T.Delay(()=>{let s;const i=no(t)(fn(new Qt(2,[]),en(`${to(e)}/accounts/${n}/migration/rollback`)));return s=T.Bind(i,o=>T.Return(new $(0,[o]))),T.Bind(s,o=>{const a=o;if(a.tag===1)return T.Return(new $(1,[a.fields[0]]));{const l=a.fields[0];if(l.statusCode===200){let c;const d=Jt(pe(Xt(eo(),new xt(1,[]))),l.responseText);return c=T.Return(d),T.Bind(c,u=>{const m=u;return m.tag===1?T.Return(new $(1,[m.fields[0]])):m.fields[0].tag===0?T.Return(new $(0,[void 0])):T.Return(new $(1,["Unexpected migration state after rolling back migration"]))})}else return T.Return(new $(1,["Unexpected response from flare identity backend"]))}})})}function xv(e,t,n,r){return T.Delay(()=>{let s;const i=no(t)(fn(new Qt(2,[]),en(`${to(e)}/accounts/${n}/migration/stop`)));return s=T.Bind(i,o=>T.Return(new $(0,[o]))),T.Bind(s,o=>{const a=o;if(a.tag===1)return T.Return(new $(1,[a.fields[0]]));{const l=a.fields[0];if(l.statusCode===200){let c;const d=Jt(pe(Xt(eo(),new xt(1,[]))),l.responseText);return c=T.Return(d),T.Bind(c,u=>{const m=u;if(m.tag===1)return T.Return(new $(1,[m.fields[0]]));{const h=m.fields[0];return h.tag===2?T.Return(new $(0,[h.fields[0]])):T.Return(new $(1,["Unexpected migration state after stopping migration"]))}})}else return T.Return(new $(1,["Unexpected response from flare identity backend"]))}})})}class _r extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["RedirectionOff","RedirectionOn","Complete","Failed"]}}class es extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["ConfirmStartRedirection","ConfirmRollbackRedirection","ConfirmStopMigration"]}}function fl(e){switch(e.tag){case 1:return new es(1,[!0]);case 2:return new es(2,[!0]);default:return new es(0,[!0])}}class $n extends ee{constructor(t,n){super(),this.Status=t,this.CurrentModal=n}}let sn=class extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["ShowModal","HideModal","RequestStartRedirection","RedirectionStarted","RequestRollbackRedirection","RedirectionRolledBack","RequestStopMigration","MigrationStopped","OperationFailed"]}};function Cv(e,t){return[new $n(e,void 0),fe()]}function Sv(e,t,n,r,s){switch(r.tag){case 1:return[new $n(s.Status,void 0),fe()];case 2:return[new $n(s.Status,Ge(fl,s.CurrentModal)),Wr(e,void 0,i=>new sn(3,[i]),i=>new sn(8,[i]))];case 3:return[new $n(new _r(1,[r.fields[0]]),void 0),fe()];case 4:return[new $n(s.Status,Ge(fl,s.CurrentModal)),Wr(t,void 0,()=>new sn(5,[void 0]),i=>new sn(8,[i]))];case 5:return[new $n(new _r(0,[]),void 0),fe()];case 6:return[new $n(s.Status,Ge(fl,s.CurrentModal)),Wr(n,void 0,i=>new sn(7,[i]),i=>new sn(8,[i]))];case 7:return[new $n(new _r(2,[r.fields[0]]),void 0),fe()];case 8:return[new $n(new _r(3,[r.fields[0]]),void 0),fe()];default:return[new $n(s.Status,r.fields[0]),fe()]}}function Av(e,t,n){let r,s,i,o,a,l,c,d,u,m,h,p,w,g;return f(Yr,{onClose:e,child:(r=[f("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),f("div",S(y([["className","fixed inset-0 z-10 w-screen overflow-y-auto h-full flex items-center justify-center"],["onClick",C=>{e()}],(s=[f("div",S(y([(i="w-[512px] p-6 bg-white rounded-lg shadow-xl inline-flex justify-start items-start gap-4 overflow-hidden",["className",i]),["onClick",C=>{C.preventDefault(),C.stopPropagation()}],(o=[f("div",S(y([["className","w-10 h-10 relative bg-gradient-to-bl from-red-200 to-red-200/0 rounded"],(a=[f("div",{className:"w-6 h-6 left-[8px] top-[8px] absolute overflow-hidden",children:v.Children.toArray([Da])})],["children",v.Children.toArray(Array.from(a))])]))),f("div",S(y([["className","flex-1 inline-flex flex-col justify-start items-start gap-4"],(l=[f("div",S(y([["className","self-stretch flex flex-col justify-start items-start gap-2"],(c=[f("div",{className:"self-stretch justify-start text-gray-900 text-lg font-semibold leading-6",children:"Turn off redirection?"}),f("div",S(y([["className","self-stretch justify-start"],(d=[f("div",{className:"text-gray-700 text-sm font-normal leading-5",children:v.Children.toArray(["Employees will be able to log into HRIS again."])})],["children",v.Children.toArray(Array.from(d))])])))],["children",v.Children.toArray(Array.from(c))])]))),f("div",S(y([["className","self-stretch inline-flex justify-end items-center gap-3"],(u=[f("button",S(y([(m="px-[17px] py-[9px] bg-white rounded-md outline outline-1 outline-offset-[-1px] outline-gray-300 flex justify-center items-center overflow-hidden",["className",m]),(h=[f("div",{className:"justify-start text-gray-700 text-sm font-medium leading-tight",children:"Cancel",onClick:C=>{e()}})],["children",v.Children.toArray(Array.from(h))])]))),f("div",S(y([["className","flex justify-start items-start gap-2"],(p=[f("button",S(y([(w="min-h-[34px] px-[13px] py-[9px] bg-[#2563EB] rounded-md flex justify-center items-center overflow-hidden",["className",w]),(g=me(I(()=>D(E(f("div",{className:"justify-start text-white text-sm font-medium leading-none",children:"Turn off redirection",onClick:C=>{t()}})),I(()=>n?E(f("span",{className:"animate-spin",children:v.Children.toArray([Fa])})):Ke())))),["children",v.Children.toArray(Array.from(g))])])))],["children",v.Children.toArray(Array.from(p))])])))],["children",v.Children.toArray(Array.from(u))])])))],["children",v.Children.toArray(Array.from(l))])])))],["children",v.Children.toArray(Array.from(o))])])))],["children",v.Children.toArray(Array.from(s))])])))],f(ve,{},...r))})}function kv(e,t,n){let r,s,i,o,a,l,c,d,u,m,h,p,w,g,C,x;return f(Yr,{onClose:e,child:(r=[f("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),f("div",S(y([["className","fixed inset-0 z-10 w-screen overflow-y-auto h-full flex items-center justify-center"],["onClick",A=>{e()}],(s=[f("div",S(y([(i="w-[512px] p-6 bg-white rounded-lg shadow-xl inline-flex justify-start items-start gap-4 overflow-hidden",["className",i]),["onClick",A=>{A.preventDefault(),A.stopPropagation()}],(o=[f("div",S(y([["className","w-10 h-10 relative bg-gradient-to-bl from-red-200 to-red-200/0 rounded"],(a=[f("div",{className:"w-6 h-6 left-[8px] top-[8px] absolute overflow-hidden",children:v.Children.toArray([Da])})],["children",v.Children.toArray(Array.from(a))])]))),f("div",S(y([["className","flex-1 inline-flex flex-col justify-start items-start gap-4"],(l=[f("div",S(y([["className","self-stretch flex flex-col justify-start items-start gap-2"],(c=[f("div",{className:"self-stretch justify-start text-gray-900 text-lg font-semibold leading-6",children:"Finalise redirection?"}),f("div",S(y([["className","self-stretch justify-start"],(d=[f("div",S(y([["className","text-gray-700 text-sm font-normal leading-5"],(u=[(m="This will make the new login the default: end users can only access their accounts through Workspace.",m)],["children",v.Children.toArray(Array.from(u))])]))),f("div",{className:"text-gray-700 text-sm font-bold leading-5 mt-2",children:"This action is not reversible."})],["children",v.Children.toArray(Array.from(d))])])))],["children",v.Children.toArray(Array.from(c))])]))),f("div",S(y([["className","self-stretch inline-flex justify-end items-center gap-3"],(h=[f("button",S(y([(p="px-[17px] py-[9px] bg-white rounded-md outline outline-1 outline-offset-[-1px] outline-gray-300 flex justify-center items-center overflow-hidden",["className",p]),(w=[f("div",{className:"justify-start text-gray-700 text-sm font-medium leading-tight",children:"Cancel",onClick:A=>{e()}})],["children",v.Children.toArray(Array.from(w))])]))),f("div",S(y([["className","flex justify-start items-start gap-2"],(g=[f("button",S(y([(C="min-h-[34px] px-[13px] py-[9px] bg-[#2563EB] rounded-md flex justify-center items-center overflow-hidden",["className",C]),(x=me(I(()=>D(E(f("div",{className:"justify-start text-white text-sm font-medium leading-none",children:"Finalise redirection",onClick:A=>{t()}})),I(()=>n?E(f("span",{className:"animate-spin",children:v.Children.toArray([Fa])})):Ke())))),["children",v.Children.toArray(Array.from(x))])])))],["children",v.Children.toArray(Array.from(g))])])))],["children",v.Children.toArray(Array.from(h))])])))],["children",v.Children.toArray(Array.from(l))])])))],["children",v.Children.toArray(Array.from(o))])])))],["children",v.Children.toArray(Array.from(s))])])))],f(ve,{},...r))})}function Ev(e,t,n){let r,s,i,o,a,l,c,d,u,m,h,p,w,g,C,x;return f(Yr,{onClose:e,child:(r=[f("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),f("div",S(y([["className","fixed inset-0 z-10 w-screen overflow-y-auto h-full flex items-center justify-center"],["onClick",A=>{e()}],(s=[f("div",S(y([(i="w-[512px] p-6 bg-white rounded-lg shadow-xl inline-flex justify-start items-start gap-4 overflow-hidden",["className",i]),["onClick",A=>{A.preventDefault(),A.stopPropagation()}],(o=[f("div",S(y([["className","w-10 h-10 relative bg-gradient-to-bl from-red-200 to-red-200/0 rounded"],(a=[f("div",{className:"w-6 h-6 left-[8px] top-[8px] absolute overflow-hidden",children:v.Children.toArray([Da])})],["children",v.Children.toArray(Array.from(a))])]))),f("div",S(y([["className","flex-1 inline-flex flex-col justify-start items-start gap-4"],(l=[f("div",S(y([["className","self-stretch flex flex-col justify-start items-start gap-2"],(c=[f("div",{className:"self-stretch justify-start text-gray-900 text-lg font-semibold leading-6",children:"Turn on redirection?"}),f("div",S(y([["className","self-stretch justify-start"],(d=[f("div",S(y([["className","text-gray-700 text-sm font-normal leading-5"],(u=[(m="Employees will no longer be able to log into HRIS, they will see a message telling them to use the Flare App for benefits instead.",m)],["children",v.Children.toArray(Array.from(u))])]))),f("div",{className:"text-gray-700 text-sm font-bold leading-5 mt-2",children:"You can turn this off anytime."})],["children",v.Children.toArray(Array.from(d))])])))],["children",v.Children.toArray(Array.from(c))])]))),f("div",S(y([["className","self-stretch inline-flex justify-end items-center gap-3"],(h=[f("button",S(y([(p="px-[17px] py-[9px] bg-white rounded-md outline outline-1 outline-offset-[-1px] outline-gray-300 flex justify-center items-center overflow-hidden",["className",p]),(w=[f("div",{className:"justify-start text-gray-700 text-sm font-medium leading-tight",children:"Cancel",onClick:A=>{e()}})],["children",v.Children.toArray(Array.from(w))])]))),f("div",S(y([["className","flex justify-start items-start gap-2"],(g=[f("button",S(y([(C="min-h-[34px] px-[13px] py-[9px] bg-[#2563EB] rounded-md flex justify-center items-center overflow-hidden",["className",C]),(x=me(I(()=>D(E(f("div",{className:"justify-start text-white text-sm font-medium leading-none",children:"Turn on redirection",onClick:A=>{t()}})),I(()=>n?E(f("span",{className:"animate-spin",children:v.Children.toArray([Fa])})):Ke())))),["children",v.Children.toArray(Array.from(x))])])))],["children",v.Children.toArray(Array.from(g))])])))],["children",v.Children.toArray(Array.from(h))])])))],["children",v.Children.toArray(Array.from(l))])])))],["children",v.Children.toArray(Array.from(o))])])))],["children",v.Children.toArray(Array.from(s))])])))],f(ve,{},...r))})}const Iv=f("h3",{className:"justify-start text-xl leading-6 font-semibold text-gray-900",children:"HRIS Migration - Redirection"}),Nv=f("div",S(y([["className","flex flex-col gap-2"],(()=>{let e,t,n,r;const s=[f("div",S(y([["className","self-stretch justify-start"],(e=[f("span",{className:"text-sm font-normal text-gray-700 leading-tight tracking-tight",children:"For accounts in the "}),f("span",{className:"text-sm font-semibold text-gray-700 leading-tight tracking-tight",children:"partial migration phase"}),f("span",S(y([["className","text-sm font-normal text-gray-700 leading-tight tracking-tight"],(t=[(n=", end users are redirected to the Flare App to access their benefits. The redirection remains active until turned off and/or the migration is complete. ",n)," ","The redirection setting is managed manually."],["children",v.Children.toArray(Array.from(t))])])))],["children",v.Children.toArray(Array.from(e))])]))),f("button",S(y([["className","inline-flex items-center justify-start gap-1"],(r=[f("div",{className:"justify-start text-[#1D4ED8] text-sm font-medium leading-tight",children:"Learn more about HRIS migration"}),_y],["children",v.Children.toArray(Array.from(r))])])))];return["children",v.Children.toArray(Array.from(s))]})()])));function Tv(e){let t,n,r,s,i,o,a,l,c,d,u,m;return f("div",S(y([(t="w-full max-w-[480px] min-w-[280px] p-6 bg-white rounded-lg inline-flex flex-col justify-start items-start gap-4 overflow-hidden",["className",t]),(n=[f("div",S(y([["className","self-stretch flex flex-col justify-start items-start gap-2"],(r=[f("div",S(y([["className","self-stretch inline-flex justify-start items-center gap-3"],(s=[f("h4",{className:"justify-start text-base font-bold leading-5 text-gray-900",children:"Redirection"}),f("div",S(y([["className","flex justify-start items-start"],(i=[f("div",S(y([["className","px-2.5 py-0.5 bg-gray-100 rounded flex justify-center items-center"],(o=[f("div",{className:"text-center justify-start text-gray-800 text-xs font-medium leading-none",children:"Inactive"})],["children",v.Children.toArray(Array.from(o))])])))],["children",v.Children.toArray(Array.from(i))])])))],["children",v.Children.toArray(Array.from(s))])])))],["children",v.Children.toArray(Array.from(r))])]))),f("div",S(y([["className","self-stretch justify-start"],(a=[f("span",{className:"text-black text-sm font-semibold leading-tight tracking-tight",children:"When redirection is on, it will:"}),f("ul",S(y([["className","list-disc list-outside mt-2 mb-4 pl-6"],(l=[f("li",{className:"text-black text-sm font-normal",children:"Prevent end users from logging into HRIS."}),f("li",S(y([["className","text-black text-sm font-normal"],(c="Redirect end users to a temporary screen that prompts them to set up and access their benefits from the Flare App.",["children",c])])))],["children",v.Children.toArray(Array.from(l))])]))),f("div",{className:"text-black text-sm font-normal leading-tight tracking-tight",children:"You can turn this setting off at any time."})],["children",v.Children.toArray(Array.from(a))])]))),f("div",S(y([["className","inline-flex justify-start items-start gap-2"],(d=[f("div",S(y([(u="min-h-[34px] px-[13px] py-[9px] bg-[#2563EB] rounded-md flex justify-center items-center overflow-hidden",["className",u]),(m=[f("button",{className:"justify-start text-white text-sm font-medium leading-4",children:"Turn on redirection",onClick:e})],["children",v.Children.toArray(Array.from(m))])])))],["children",v.Children.toArray(Array.from(d))])])))],["children",v.Children.toArray(Array.from(n))])])))}function Rv(e,t,n){let r,s,i,o,a,l,c,d,u,m,h,p,w,g,C,x,A,P,V,Y;const ce=Ir(e,"dd/MM/yyyy");return f("div",S(y([(r="w-full max-w-[480px] min-w-[280px] p-6 bg-white rounded-lg inline-flex flex-col justify-start items-start gap-4 overflow-hidden",["className",r]),(s=[f("div",S(y([["className","self-stretch flex flex-col justify-start items-start gap-2"],(i=[f("div",S(y([["className","self-stretch inline-flex justify-start items-center gap-3"],(o=[f("div",{className:"justify-start text-base font-bold leading-tight text-gray-900",children:"Redirection"}),f("div",S(y([["className","flex justify-start items-start"],(a=[f("div",S(y([["className","pl-2 pr-2.5 py-0.5 bg-gray-100 rounded flex justify-center items-center gap-1.5"],(l=[f("div",S(y([["className","w-2 h-2 relative"],(c=[f("div",{className:"w-1.5 h-1.5 left-[1px] top-[1px] absolute bg-green-400 rounded-full"})],["children",v.Children.toArray(Array.from(c))])]))),f("div",{className:"text-center justify-start text-gray-800 text-xs font-medium leading-none",children:"Active"})],["children",v.Children.toArray(Array.from(l))])])))],["children",v.Children.toArray(Array.from(a))])])))],["children",v.Children.toArray(Array.from(o))])]))),f("div",S(y([["className","self-stretch inline-flex justify-start items-start gap-2"],(d=[f("div",{className:"justify-start text-sm font-normal text-[#686F7D] leading-tight tracking-tight",children:`Started ${ce}`})],["children",v.Children.toArray(Array.from(d))])])))],["children",v.Children.toArray(Array.from(i))])]))),f("div",S(y([["className","self-stretch justify-start"],(u=[f("span",{className:"text-black text-sm font-semibold leading-tight tracking-tight",children:"Redirection is currently active, it will:"}),f("ul",S(y([["className","list-disc list-outside mt-2 mb-4 pl-6"],(m=[f("li",{className:"text-black text-sm font-normal",children:"Prevent end users from logging into HRIS."}),f("li",S(y([["className","text-black text-sm font-normal"],(h="Redirect end users to a temporary screen that prompts them to set up and access their benefits from the Flare App.",["children",h])])))],["children",v.Children.toArray(Array.from(m))])])))],["children",v.Children.toArray(Array.from(u))])]))),f("div",S(y([["className","inline-flex justify-start items-start gap-2"],(p=[f("div",S(y([(w="min-h-[34px] px-[13px] py-[9px] bg-white rounded-md outline outline-1 outline-offset-[-1px] outline-gray-300 flex justify-center items-center overflow-hidden",["className",w]),(g=[f("button",{className:"justify-start text-gray-700 text-sm font-medium leading-4",children:"Turn off redirection",onClick:t})],["children",v.Children.toArray(Array.from(g))])])))],["children",v.Children.toArray(Array.from(p))])]))),f("div",S(y([["className","py-3 flex flex-col justify-start items-start gap-2.5"],(C=[f("div",{className:"w-[432px] h-0 outline outline-1 outline-offset-[-0.50px] outline-gray-100"})],["children",v.Children.toArray(Array.from(C))])]))),f("div",S(y([["className","self-stretch justify-start"],(x=[f("div",{className:"text-black text-sm font-semibold leading-tight tracking-tight",children:v.Children.toArray(["Has the migration finished?"])}),f("div",S(y([["className","mt-4 text-black text-sm font-normal leading-tight tracking-tight"],(A="If all other migration steps are complete, you can make the new login the default by clicking on “Finalise redirection”. From then on, end users will only access their accounts through Workspace.",["children",A])])))],["children",v.Children.toArray(Array.from(x))])]))),f("div",S(y([["className","inline-flex justify-start items-start gap-2"],(P=[f("div",S(y([(V="min-h-[34px] px-[13px] py-[9px] bg-white rounded-md outline outline-1 outline-offset-[-1px] outline-gray-300 flex justify-center items-center overflow-hidden",["className",V]),(Y=[f("button",{className:"justify-start text-gray-700 text-sm font-medium leading-none",children:"Finalise redirection",onClick:n})],["children",v.Children.toArray(Array.from(Y))])])))],["children",v.Children.toArray(Array.from(P))])])))],["children",v.Children.toArray(Array.from(s))])])))}function Mv(e){let t,n,r,s,i,o,a;const l=Ir(e,"dd/MM/yyyy");return f("div",S(y([(t="w-full max-w-[480px] min-w-[280px] p-6 bg-white rounded-lg inline-flex flex-col justify-start items-start gap-4 overflow-hidden",["className",t]),(n=[f("div",S(y([["className","self-stretch flex flex-col justify-start items-start gap-2"],(r=[f("div",S(y([["className","self-stretch inline-flex justify-start items-center gap-3"],(s=[f("h4",{className:"justify-start text-gray-900 text-base font-bold leading-tight",children:"Redirection"}),f("div",S(y([["className","flex justify-start items-start"],(i=[f("div",S(y([["className","px-2.5 py-0.5 bg-green-100 rounded flex justify-center items-center"],(o=[f("div",{className:"text-center justify-start text-green-800 text-xs font-medium leading-none",children:"Completed"})],["children",v.Children.toArray(Array.from(o))])])))],["children",v.Children.toArray(Array.from(i))])])))],["children",v.Children.toArray(Array.from(s))])]))),f("div",S(y([["className","self-stretch inline-flex justify-start items-start gap-2"],(a=[f("div",{className:"justify-start text-sm font-normal text-[#686F7D] leading-tight tracking-tight",children:`Completed on ${l}`})],["children",v.Children.toArray(Array.from(a))])])))],["children",v.Children.toArray(Array.from(r))])]))),f("div",{className:"self-stretch justify-start text-black text-sm font-normal leading-tight tracking-tight",children:"Redirection for this account has been completed as part of migration. No further action is needed."})],["children",v.Children.toArray(Array.from(n))])])))}function Pv(e){let t,n;const r=e.stopMigration,s=e.rollbackRedirection,i=e.startRedirection,o=e.migrationStatus,a=Kr(()=>qr(()=>Cv(o),(m,h)=>Sv(i,s,r,m,h),(m,h)=>{}),void 0,void 0),l=a[0],c=a[1],d=m=>{c(new sn(0,[m]))},u=()=>{c(new sn(1,[]))};return f("div",S(y([["className","flex flex-col gap-4 bg-gray-100"],(t=[Iv,Nv,f("div",S(y([["className","flex mb-4 gap-6 flex-col"],(n=me(I(()=>{let m;return D((m=l.Status,m.tag===1?E(Rv(m.fields[0],h=>{d(new es(1,[!1]))},h=>{d(new es(2,[!1]))})):m.tag===2?E(Mv(m.fields[0])):m.tag===3?E(f("div",{className:"text-red-600",children:`Operation failed: ${m.fields[0]}`})):E(Tv(h=>{d(new es(0,[!1]))}))),I(()=>{let h,p,w;const g=l.CurrentModal;return g==null?E($e()):g.tag===1?(h=g.fields[0],E(Av(u,()=>{c(new sn(4,[]))},h))):g.tag===2?(p=g.fields[0],E(kv(u,()=>{c(new sn(6,[]))},p))):(w=g.fields[0],E(Ev(u,()=>{c(new sn(2,[]))},w)))}))})),["children",v.Children.toArray(Array.from(n))])])))],["children",v.Children.toArray(Array.from(t))])])))}let Mh=class extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Initialise","LoadedMigrationStatus"]}},Hs=class extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Loading","Loaded","Failed"]}};function Ov(){return[new Hs(0,[]),te(e=>{e(new Mh(0,[]))})]}function Dv(e,t,n){if(t.tag===1){if(t.fields[0].tag===1)return[new Hs(2,[]),fe()];switch(t.fields[0].fields[0].tag){case 1:return[new Hs(1,[new _r(1,[t.fields[0].fields[0].fields[0]])]),fe()];case 2:return[new Hs(1,[new _r(2,[t.fields[0].fields[0].fields[0]])]),fe()];default:return[new Hs(1,[new _r(0,[])]),fe()]}}else return[n,wa(r=>{ya(r)},e,void 0,r=>new Mh(1,[r]))]}function Fv(e){const t=e.flareAccountId,n=e.accessToken,r=e.backendUrl,s=Kr(()=>qr(Ov,(o,a)=>Dv(()=>_v(r,n,t),o,a),(o,a)=>{}),void 0,void 0)[0],i=me(I(()=>s.tag===1?E(f(Pv,{migrationStatus:s.fields[0],startRedirection:()=>bv(r,n,t),rollbackRedirection:()=>vv(r,n,t),stopMigration:()=>xv(r,n,t)})):s.tag===2?E(f("div",{children:"We are unable to load the HRIS Migration component at this time."})):E(f("div",{children:"Loading..."}))));return f("div",{children:v.Children.toArray(Array.from(i))})}function Vv({hasLegalEntity:e,defaultValues:t,validateName:n,validateBusinessName:r,validateBusinessNumber:s,onSubmit:i,closeModal:o}){const{handleSubmit:a,control:l}=Di({mode:"onChange",defaultValues:t});return R(ve,{children:[R("div",{className:"font-bold text-lg mb-4",children:"Account details"}),R("form",{className:"space-y-6",onSubmit:a(i),children:[R("div",{children:[R(gt,{label:"Name",name:"Name",control:l,placeholder:"e.g. Acme Co",validate:n}),R("p",{className:"mt-2 text-sm font-normal text-gray-500",children:"This will be used as a display name."})]}),e&&R(gt,{label:"Business Name",name:"BusinessName",control:l,placeholder:"e.g. ACME LTD PTY",validate:r}),e&&R(gt,{label:"Business Number",name:"BusinessNumber",control:l,validate:s,isNumber:!0}),R(Fi,{primaryLabel:"Update",secondaryLabel:"Cancel",secondaryOnClick:o})]})]})}function Lv(e,t,n){return f(Vv,{hasLegalEntity:n.LegalEntity!=null,defaultValues:new xy(n.Name,We(Ge(r=>r.BusinessName,n.LegalEntity),""),We(Ge(r=>r.BusinessNumber,n.LegalEntity),"")),validateName:r=>mt(Oo(r)),validateBusinessName:r=>mt(Rc(r)),validateBusinessNumber:r=>mt(Mc(r)),onSubmit:r=>{const s=new _d(r.Name,Ge(i=>new bd(r.BusinessName,r.BusinessNumber),n.LegalEntity));Pe(s,n)?e():t(s)},closeModal:e})}function Bv(e){const t=e.account,n=e.updateAccount,r=ir(Hn),s=zn(!1),i=s[1],o=me(I(()=>{let a;return D(E(Xi(f("div",S(y([["className","flex flex-row space-x-4 items-center"],(a=[Yi("Account Information",void 0),f("button",{className:re(" ",me(I(()=>D(r.Roles.ProvisionAccounts?Ke():E("hidden"),I(()=>E("inline-flex items-center rounded border border-transparent bg-indigo-600 px-2.5 py-1.5 mr-2 text-xs font-medium text-white shadow-sm hover:bg-indigo-700 focus:outline-none")))))),onClick:l=>{i(!0)},type:"button",children:v.Children.toArray([gy])})],["children",v.Children.toArray(Array.from(a))])]))),me(I(()=>{let l;return D(E((l=["ID",t.StreamId],f(ul,{label:l[0],value:l[1]}))),I(()=>{let c;return D(E((c=["Name",t.Name],f(ul,{label:c[0],value:c[1]}))),I(()=>{let d;return D(E((d=["External ID",We(t.ExternalId,"")],rt(d[0],d[1]))),I(()=>{let u;return D(E((u=["Channel ID",We(t.ChannelId,"")],rt(u[0],u[1]))),I(()=>{let m;if(r.Roles.ReadProtectedData){const h=t.ContactDetails;if(h!=null){const p=h;return D(E((m=["Contact",`${p.FirstName} ${p.LastName}`],rt(m[0],m[1]))),I(()=>{let w;return D(E((w=["Phone",p.MobilePhone],rt(w[0],w[1]))),I(()=>{let g;return E((g=["Email",p.Email],rt(g[0],g[1])))}))}))}else return Ke()}else return Ke()}))}))}))}))})))),I(()=>{let l,c,d,u,m,h,p;return s[0]?E((l=()=>{i(!1)},c=new _d(t.Name,Ge(w=>new bd(w.BusinessName,w.BusinessNumber),t.LegalEntity)),f(Yr,{onClose:l,child:f("div",S(te((d=[f("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),f("div",S(y([["className","fixed inset-0 z-10 w-screen overflow-y-auto"],(u=[f("div",S(y([["className","fixed inset-0 z-10 w-screen overflow-y-auto h-full flex items-center justify-center"],(m=[f("div",S(y([["className","w-[480px] bg-white shadow-xl rounded-lg"],(h=[f("div",{className:"pt-6 px-6 pb-4 border-b font-bold text-xl",children:"Update account"}),f("div",S(y([["className","pt-4 mx-6"],(p=[f("div",{className:"mb-4 text-sm font-normal text-gray-500",children:v.Children.toArray(["All fields are required."])}),Lv(l,w=>{n(w),i(!1)},c)],["children",v.Children.toArray(Array.from(p))])])))],["children",v.Children.toArray(Array.from(h))])])))],["children",v.Children.toArray(Array.from(m))])])))],["children",v.Children.toArray(Array.from(u))])])))],["children",v.Children.toArray(Array.from(d))]))))}))):Ke()}))}));return f(ve,{},...o)}function Uv(e){let t,n,r,s,i,o,a;if(e==null)return $e();{const l=e;return Xi(Yi("Legal Entity",void 0),y([(t=["Business Name",l.BusinessName],rt(t[0],t[1])),(n=["Business Number",l.BusinessNumber],rt(n[0],n[1])),(r=["Address Line 1",l.Address1],rt(r[0],r[1])),(s=["Address Line 2",We(l.Address2,"")],rt(s[0],s[1])),(i=["City",l.City],rt(i[0],i[1])),(o=["State",We(l.State,"")],rt(o[0],o[1])),(a=["Postcode",l.Postcode],rt(a[0],a[1]))]))}}function jv(e){let t;if(e==null)return $e();{const n=e;return Xi(Yi("Legal Entity",void 0),te((t=["Notes",n],rt(t[0],t[1]))))}}function zv(e){const t=e.account,n=e.updateAccount,r=y([f(Bv,{updateAccount:n,account:t}),Uv(t.LegalEntity),jv(t.Notes)]);return f("div",{children:v.Children.toArray(Array.from(r))})}class Pn extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Details","ProfilesDirectory","Users","SuperConfiguration","BenefitsOnboardingConfiguration","BankDetailsConfiguration","SalaryPackagingConfiguration","Workspace","HrisMigration"]}}function Hv(e){switch(e.tag){case 1:return"Directory";case 2:return"Users";case 3:return"Super";case 4:return"Benefits";case 5:return"Bank Details";case 6:return"Salary Packaging";case 7:return"Workspace";case 8:return"HRIS Migration";default:return"Details"}}function Wv(e,t){const n=[e,t];return Pe(n[0],Ue("7cb0e66f-74b7-49f1-a3aa-be7970b48cb3"))||Pe(n[0],Ue("1c74bcf9-b795-42c6-88dc-d45c8f8827d4"))||Pe(n[0],Ue("89837631-c6b3-4635-a08d-fdd3383f4fbb"))?!0:Pe(n[0],Ue("e8269f8b-4f5e-482a-863e-4512cca40ec6"))}function Gv(e,t,n){const r=[e,t],s=er(i=>_f(Hv(n),i[0],ar(As(i[1](r)))),me(I(()=>D(E(["Details",i=>new q(8,[i[0],i[1]])]),I(()=>D(E(["Workspace",i=>new q(15,[i[0],i[1]])]),I(()=>D(E(["Directory",i=>new q(9,[i[0],i[1]])]),I(()=>D(E(["Users",i=>new q(10,[i[0],i[1]])]),I(()=>D(E(["Super",i=>new q(11,[i[0],i[1]])]),I(()=>D(E(["Benefits",i=>new q(12,[i[0],i[1]])]),I(()=>D(E(["Bank Details",i=>new q(13,[i[0],i[1]])]),I(()=>D(E(["Salary Packaging",i=>new q(14,[i[0],i[1]])]),I(()=>Wv(r[0],r[1])?E(["HRIS Migration",i=>new q(16,[i[0],i[1]])]):Ke())))))))))))))))))));return f(bf,{headers:s})}function qv(e){const t=e.account,n=e.mode,r=e.props,s=e.updateAccount,i=ir(Hn),o=r.accountDetails,a=o[0],l=o[1];switch(n.tag){case 1:return f(Ih,{partnerId:a,accountId:l,backendUrl:i.BackendUrl,accessToken:i.AccessToken});case 2:return f(pv,{partnerId:a,accountId:l,backendUrl:i.BackendUrl,accessToken:i.AccessToken});case 3:return f(Ah,{partnerId:a,accountId:l,backendUrl:i.BackendUrl,accessToken:i.AccessToken});case 4:return f(kh,{partnerId:a,accountId:l,backendUrl:i.BackendUrl,accessToken:i.AccessToken});case 5:return f(Eh,{partnerId:a,accountId:l,backendUrl:i.BackendUrl,accessToken:i.AccessToken});case 6:return f(gv,{accountId:l,backendUrl:i.BackendUrl,accessToken:i.AccessToken});case 7:return f(Nh,{backendUrl:i.BackendUrl,accessToken:i.AccessToken,partnerId:a,accountId:l});case 8:{let c,d,u;switch(t.tag){case 0:case 1:{c=2;break}case 3:{c=3,u=t.fields[0];break}default:t.fields[0].tag===0?(c=0,d=t.fields[0].fields[0]):c=1}switch(c){case 0:{const m=d.ExternalId;if(m==null)return f(rn,{error:"This account does not have externalId (Flare AccountId)"});{const h=m;return f(Fv,{backendUrl:i.BackendUrl,accessToken:i.AccessToken,flareAccountId:h})}}case 1:return f(rn,{error:"There was an error retrieving account"});case 2:return f(zs,null);default:{const m=ft(u);return f(rn,{error:m})}}}default:{let c,d,u;switch(t.tag){case 0:case 1:{c=2;break}case 3:{c=3,u=t.fields[0];break}default:t.fields[0].tag===0?(c=0,d=t.fields[0].fields[0]):c=1}switch(c){case 0:return f(zv,{updateAccount:s,account:d});case 1:return f(rn,{error:"There was an error retrieving account "});case 2:return f(zs,null);default:{const m=ft(u);return f(rn,{error:m})}}}}}function Kv(e){let t,n,r;const s=e.account,i=e.mode,o=e.props,a=e.updateAccount;return f("div",S(y([["className","flex flex-row"],(t=[(n=o.accountDetails,Gv(n[0],n[1],i)),f("div",S(y([["className","w-full"],(r=[f(qv,{updateAccount:a,props:o,mode:i,account:s})],["children",v.Children.toArray(Array.from(r))])])))],["children",v.Children.toArray(Array.from(t))])])))}class ts extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["NotStarted","Started","Finished","Failed"]}}let ro=class extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["UpdateAccountId","Search","SearchSuccess","SearchFailure"]}},ns=class extends ee{constructor(t,n){super(),this.AccountId=t,this.AccountDetails=n}};function Zv(){return[new ns(void 0,new ts(0,[])),fe()]}function Jv(e,t,n,r){let s,i;switch(n.tag){case 1:{const o=r.AccountId;if(o!=null){const a=o;return[new ns(r.AccountId,new ts(1,[])),Wr(()=>Tw(e,t,a),void 0,l=>new ro(2,[l]),l=>new ro(3,[l]))]}else return[new ns(r.AccountId,new ts(3,["Account Id is required"])),fe()]}case 2:{const o=n.fields[0];return[new ns(r.AccountId,new ts(2,[o])),(s=["account-registry","partners",`${o.PartnerId}`,"accounts",`${o.AccountId}`],i=[s[0],s[1],s[2],s[3],s[4]],Ye(a=>{ut(y(i))}))]}case 3:return[new ns(r.AccountId,new ts(3,["Account not found"])),fe()];default:return[new ns(jt(n.fields[0]),r.AccountDetails),fe()]}}const Yv=f("h3",{className:"text-base font-semibold text-gray-900",id:"modal-title",children:"Account Search"}),Xv=f("div",S(y([["className","mt-2"],(()=>{let e;const t=[f("p",S(y([["className","text-sm text-gray-500 whitespace-pre-line"],(e=`Enter an Account Id below to search for an account.
52
52
 
53
- If the account is found you will be redirected to the account details page.`,["children",e])])))];return["children",E.Children.toArray(Array.from(t))]})()])));function pv(e){let t,n,r,s;return p("div",P(k([["className","absolute right-0 top-0 hidden pr-4 pt-4 sm:block"],(t=[p("button",P(k([(n="rounded-md bg-white text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",["className",n]),["type","button"],["onClick",e],(r=[p("span",{className:"sr-only",children:"Close"}),p("svg",P(k([["className","h-6 w-6"],["fill","none"],["stroke","currentColor"],["strokeWidth",1.5],["viewBox","0 0 24 24"],(s=ne(p("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})),["children",E.Children.toArray(Array.from(s))])])))],["children",E.Children.toArray(Array.from(r))])])))],["children",E.Children.toArray(Array.from(t))])])))}function $v(e,t,n,r){let s,o,i;return p("div",P(k([["className","mt-5 sm:flex sm:items-center"],(s=[p("div",P(k([["className","w-full sm:max-w-xs"],(o=[p("label",{className:"sr-only",for:"account-id",children:"Account Id"}),p("input",P(_e(A(()=>B(I(["id","account-id"]),A(()=>B(I(["autoComplete","off"]),A(()=>{let a;return B(I((a="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm/6",["className",a])),A(()=>B(I(["placeholder","Account Id"]),A(()=>B(I(["disabled",!n]),A(()=>B(I(["onChange",l=>{e(l.target.value)}]),A(()=>{const l=r;return l==null?wt():I(["value",no(l)])}))))))))}))))))))],["children",E.Children.toArray(Array.from(o))])]))),p("button",P(k([["className",oe(" ",["mt-3 inline-flex w-full items-center justify-center rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm","hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600","sm:ml-3 sm:mt-0 sm:w-auto","disabled:opacity-50"])],(i=_e(A(()=>I(n?p("span",{children:["Search"]}):p("span",{children:["Searching..."]})))),["children",E.Children.toArray(Array.from(i))]),["onClick",t],["disabled",!n]])))],["children",E.Children.toArray(Array.from(s))])])))}function gv(e){let t,n,r,s,o,i,a;const l=e.closeModal,c=Xn(On),d=bo(()=>yo(dv,($,v)=>fv(c.BackendUrl,c.AccessToken,$,v),($,v)=>{}),void 0,void 0),u=d[0],h=d[1],f=$v($=>{h(new qo(0,[$]))},$=>{h(new qo(1,[]))},!Be(u.AccountDetails,new Gr(1,[])),u.AccountId);let m;const w=u.AccountDetails;return m=w.tag===3?p("div",{className:oe(" ",["mt-2 text-sm text-red-600"]),children:w.fields[0]}):pe(),p(ba,{onClose:l,child:p("div",P(k([["className","relative z-10"],["role",oe(" ",["dialog"])],(t=[p("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),p("div",P(k([["className","fixed inset-0 z-10 w-screen overflow-y-auto"],(n=[p("div",P(k([["className","flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0"],["onClick",$=>{l()}],(r=[p("div",P(k([(s="relative transform overflow-hidden rounded-lg bg-white px-4 pb-4 pt-5 text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg sm:p-6",["className",s]),["onClick",$=>{$.preventDefault(),$.stopPropagation()}],(o=[pv($=>{l()}),p("div",P(k([["className","sm:flex sm:items-start"],(i=[p("div",P(k([(a="mx-auto flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-full bg-indigo-100 sm:mx-0 sm:h-10 sm:w-10",["className",a]),["children",E.Children.toArray([mf])]]))),p("div",{className:"mt-3 text-center sm:ml-4 sm:mt-0 sm:text-left",children:E.Children.toArray([hv,mv,f,m])})],["children",E.Children.toArray(Array.from(i))])])))],["children",E.Children.toArray(Array.from(o))])])))],["children",E.Children.toArray(Array.from(r))])])))],["children",E.Children.toArray(Array.from(n))])])))],["children",E.Children.toArray(Array.from(t))])])))})}function wv(e,t){return Bl(n=>{const r=e.toLocaleLowerCase();return Ir(n.StreamId).toLocaleLowerCase().indexOf(r)>=0?!0:oo(n.Name).toLocaleLowerCase().indexOf(r)>=0},t)}function yv(e){const t=Xn(On),n=Zm(c=>oo(c.Name).toLocaleLowerCase(),e.partnerList,{Compare:Xr}),r=Pn(n),s=Pn(""),o=Pn(!1),i=o[1],a=_e(A(()=>B(I(pr("ID")),A(()=>B(I(pr("Name")),A(()=>B(t.Roles.ReadProtectedData?B(I(pr("Contact")),A(()=>I(pr("Phone")))):wt(),A(()=>I(pr("Website")))))))))),l=_e(A(()=>B(o[0]?I(p(gv,{closeModal:()=>{i(!1)}})):I(pe()),A(()=>{let c;return B(I(p("div",P(k([["className","flex items-end place-content-between"],(c=[df(s[0],"Partner ID or Name",d=>{s[1](d),r[1](wv(d,n))},()=>{}),p("button",{className:oe(" ",["max-h-10 inline-flex items-center gap-x-2 rounded-md bg-indigo-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm","hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"]),type:"button",onClick:d=>{i(!0)},children:E.Children.toArray(["Account Search ",mf])})],["children",E.Children.toArray(Array.from(c))])])))),A(()=>I(k_(a,qn(d=>{const u=Ir(d.StreamId),h=it(u);return _e(A(()=>{let f;return B(I((f=[er(gs(new J(1,[h]))),u],S_(f[0],f[1]))),A(()=>B(I(Fo(["text-gray-500"],oo(d.Name))),A(()=>B(t.Roles.ReadProtectedData?B(I(Fo(["text-gray-500"],He(rt(m=>`${lc(m.FirstName)} ${uc(m.LastName)}`,d.ContactDetails),""))),A(()=>I(Fo(["text-gray-500"],He(rt(m=>hc(m.MobilePhone),d.ContactDetails),""))))):wt(),A(()=>I(Fo(["text-gray-500"],ic(d.Website)))))))))}))},r[0])))))}))));return p("div",{children:E.Children.toArray(Array.from(l))})}const bv=`*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}[type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,input:where(:not([type])):focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}@media (forced-colors: active){[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.\\!visible{visibility:visible!important}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.bottom-14{bottom:3.5rem}.bottom-8{bottom:2rem}.right-0{right:0}.top-0{top:0}.z-10{z-index:10}.order-none{order:0}.col-start-1{grid-column-start:1}.row-start-1{grid-row-start:1}.-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.-my-2{margin-top:-.5rem;margin-bottom:-.5rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.mx-auto{margin-left:auto;margin-right:auto}.-ml-3{margin-left:-.75rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.mr-2{margin-right:.5rem}.mr-6{margin-right:1.5rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.inline-table{display:inline-table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row-group{display:table-row-group}.table-row{display:table-row}.flow-root{display:flow-root}.grid{display:grid}.inline-grid{display:inline-grid}.contents{display:contents}.list-item{display:list-item}.hidden{display:none}.size-4{width:1rem;height:1rem}.size-5{width:1.25rem;height:1.25rem}.size-6{width:1.5rem;height:1.5rem}.h-12{height:3rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-full{height:100%}.max-h-10{max-height:2.5rem}.max-h-60{max-height:15rem}.min-h-full{min-height:100%}.w-12{width:3rem}.w-40{width:10rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-\\[45px\\]{width:45px}.w-\\[480px\\]{width:480px}.w-\\[560px\\]{width:560px}.w-\\[69px\\]{width:69px}.w-full{width:100%}.w-screen{width:100vw}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-md{max-width:28rem}.max-w-screen-xl{max-width:1280px}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.grow-0{flex-grow:0}.border-collapse{border-collapse:collapse}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-content-between{place-content:space-between}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity))}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.self-center{align-self:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-0{border-width:0px}.border-b{border-bottom-width:1px}.border-r{border-right-width:1px}.border-r-2{border-right-width:2px}.border-t{border-top-width:1px}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-indigo-500{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-indigo-100{--tw-bg-opacity: 1;background-color:rgb(224 231 255 / var(--tw-bg-opacity))}.bg-indigo-600{--tw-bg-opacity: 1;background-color:rgb(79 70 229 / var(--tw-bg-opacity))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-opacity-75{--tw-bg-opacity: .75}.p-3{padding:.75rem}.p-4{padding:1rem}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-\\[8\\.5px\\]{padding-top:8.5px;padding-bottom:8.5px}.py-\\[9px\\]{padding-top:9px;padding-bottom:9px}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pl-3{padding-left:.75rem}.pl-9{padding-left:2.25rem}.pr-2{padding-right:.5rem}.pr-4{padding-right:1rem}.pr-9{padding-right:2.25rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.not-italic{font-style:normal}.leading-4{line-height:1rem}.leading-6{line-height:1.5rem}.leading-7{line-height:1.75rem}.tracking-wider{letter-spacing:.05em}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.overline{text-decoration-line:overline}.line-through{text-decoration-line:line-through}.opacity-0{opacity:0}.opacity-90{opacity:.9}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.ring-black\\/5{--tw-ring-color: rgb(0 0 0 / .05)}.ring-gray-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-500{transition-duration:.5s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.placeholder\\:text-gray-400::-moz-placeholder{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.placeholder\\:text-gray-400::placeholder{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.hover\\:border-gray-300:hover{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.hover\\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.hover\\:bg-gray-300:hover{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.hover\\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\\:bg-indigo-500:hover{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity))}.hover\\:bg-indigo-700:hover{--tw-bg-opacity: 1;background-color:rgb(67 56 202 / var(--tw-bg-opacity))}.hover\\:text-gray-500:hover{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.hover\\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.hover\\:text-indigo-900:hover{--tw-text-opacity: 1;color:rgb(49 46 129 / var(--tw-text-opacity))}.hover\\:underline:hover{text-decoration-line:underline}.focus\\:border-indigo-500:focus{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity))}.focus\\:border-indigo-600:focus{--tw-border-opacity: 1;border-color:rgb(79 70 229 / var(--tw-border-opacity))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-inset:focus{--tw-ring-inset: inset}.focus\\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.focus\\:ring-indigo-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(79 70 229 / var(--tw-ring-opacity))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\\:outline:focus-visible{outline-style:solid}.focus-visible\\:outline-2:focus-visible{outline-width:2px}.focus-visible\\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\\:outline-indigo-600:focus-visible{outline-color:#4f46e5}.disabled\\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\\:visible{visibility:visible}.group:hover .group-hover\\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.group:focus .group-focus\\:visible{visibility:visible}@media (min-width: 640px){.sm\\:col-span-2{grid-column:span 2 / span 2}.sm\\:-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.sm\\:mx-0{margin-left:0;margin-right:0}.sm\\:my-8{margin-top:2rem;margin-bottom:2rem}.sm\\:-mr-6{margin-right:-1.5rem}.sm\\:ml-3{margin-left:.75rem}.sm\\:ml-4{margin-left:1rem}.sm\\:mt-0{margin-top:0}.sm\\:block{display:block}.sm\\:flex{display:flex}.sm\\:grid{display:grid}.sm\\:h-10{height:2.5rem}.sm\\:w-10{width:2.5rem}.sm\\:w-auto{width:auto}.sm\\:w-full{width:100%}.sm\\:max-w-lg{max-width:32rem}.sm\\:max-w-xs{max-width:20rem}.sm\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\\:items-start{align-items:flex-start}.sm\\:items-center{align-items:center}.sm\\:justify-end{justify-content:flex-end}.sm\\:gap-4{gap:1rem}.sm\\:rounded-lg{border-radius:.5rem}.sm\\:p-0{padding:0}.sm\\:p-6{padding:1.5rem}.sm\\:px-0{padding-left:0;padding-right:0}.sm\\:px-4{padding-left:1rem;padding-right:1rem}.sm\\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\\:pl-6{padding-left:1.5rem}.sm\\:text-left{text-align:left}.sm\\:text-sm{font-size:.875rem;line-height:1.25rem}.sm\\:text-sm\\/6{font-size:.875rem;line-height:1.5rem}}@media (min-width: 1024px){.lg\\:-mx-8{margin-left:-2rem;margin-right:-2rem}.lg\\:mr-0{margin-right:0}.lg\\:px-8{padding-left:2rem;padding-right:2rem}}`,_v=pt(bv);function Za(){return(Za=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var vv=["context","children"];function xv(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(r,s){if(r==null)return{};var o,i,a={},l=Object.keys(r);for(i=0;i<l.length;i++)s.indexOf(o=l[i])>=0||(a[o]=r[o]);return a}(e,vv);return Oi(t,n)}function Cv(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=p(xv,Za({},this._props,{context:e.detail.context}),function t(n,r){if(n.nodeType===3)return n.data;if(n.nodeType!==1)return null;var s=[],o={},i=0,a=n.attributes,l=n.childNodes;for(i=a.length;i--;)a[i].name!=="slot"&&(o[a[i].name]=a[i].value,o[bh(a[i].name)]=a[i].value);for(i=l.length;i--;){var c=t(l[i],null),d=l[i].slot;d?o[d]=p(_h,{name:d},c):s[i]=c}var u=r?p(_h,null,s):s;return p(r||n.nodeName.toLowerCase(),o,u)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?Pi:Tn)(this._vdom,this._root)}function bh(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function Sv(e,t,n){if(this._vdom){var r={};r[e]=n=n??void 0,r[bh(e)]=n,this._vdom=Oi(this._vdom,r),Tn(this._vdom,this._root)}}function kv(){Tn(this._vdom=null,this._root)}function _h(e,t){var n=this;return p("slot",Za({},e,{ref:function(r){r?(n.ref=r,n._listener||(n._listener=function(s){s.stopPropagation(),s.detail.context=t},r.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}function Av(e,t,n,r){function s(){var o=Reflect.construct(HTMLElement,[],s);return o._vdomComponent=e,o._root=r&&r.shadow?o.attachShadow({mode:r.mode||"open"}):o,o}return(s.prototype=Object.create(HTMLElement.prototype)).constructor=s,s.prototype.connectedCallback=Cv,s.prototype.attributeChangedCallback=Sv,s.prototype.disconnectedCallback=kv,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),s.observedAttributes=n,n.forEach(function(o){Object.defineProperty(s.prototype,o,{get:function(){return this._vdom.props[o]},set:function(i){this._vdom?this.attributeChangedCallback(o,null,i):(this._props||(this._props={}),this._props[o]=i,this.connectedCallback());var a=typeof i;i!=null&&a!=="string"&&a!=="boolean"&&a!=="number"||this.setAttribute(o,i)}})}),customElements.define(t,s)}function Ev(e,t){Av(e,t,void 0,{shadow:!0})}class Kr extends ee{constructor(t,n,r,s){super(),this.Partners=t,this.Accounts=n,this.CurrentPage=r,this.Roles=s}}class zn extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["PageChanged","GetAccountName","AppendAccount","LoadPartners","UpdateAccount"]}}function Iv(e){let t;const n=od(Zu(window.location.hash,1)),r=n.tag===16?aa(new J(0,[])):Oe();return[new Kr(new me(0,[]),bg(),n,(t=Sw(e),t.tag===1?(El(`Failed to decode jwt: ${t.fields[0]}`),Sg):Cg(t.fields[0]))),r]}function Tv(e,t,n,r){let s,o,i,a;switch(n.tag){case 1:{const l=n.fields[0],c=da(e,l,d=>new zn(2,[l,new g(0,[d])]),d=>new zn(2,[l,new g(1,["Failed to retrieve account name"])]));return[new Kr(r.Partners,oa(r.Accounts,l,new me(1,[])),r.CurrentPage,r.Roles),c]}case 2:return[new Kr(r.Partners,oa(r.Accounts,n.fields[0],new me(2,[n.fields[1]])),r.CurrentPage,r.Roles),Oe()];case 0:{const l=n.fields[0];return l.tag===16?[r,aa(l)]:[new Kr(r.Partners,r.Accounts,l,r.Roles),Oe()]}case 4:{const l=n.fields[1],c=n.fields[0],d=sd(r.Accounts,c);let u,h;switch(d!=null&&d.tag===2&&d.fields[0].tag===0?(u=0,h=d.fields[0].fields[0]):u=1,u){case 0:{const f=new bc(h.StreamId,h.PartnerId,l.Name,h.Website,h.ContactDetails,h.Notes,(s=l.LegalEntity,o=h.LegalEntity,s!=null&&o!=null?(i=o,a=s,new gc(a.BusinessName,a.BusinessNumber,i.Address1,i.Address2,i.City,i.Postcode,i.State,i.Phone,i.CountryCode)):h.LegalEntity),h.ExternalId,h.ChannelId,h.ProvisioningMode);if(Be(f,h))return[r,Oe()];{const m=da(t,[c,l],()=>new zn(2,[c,new g(0,[f])]),w=>new zn(2,[c,new g(1,[w])]));return[new Kr(r.Partners,oa(r.Accounts,c,new me(1,[])),r.CurrentPage,r.Roles),m]}}default:return[r,Oe()]}}default:return[new Kr(n.fields[0],r.Accounts,r.CurrentPage,r.Roles),Oe()]}}function Nv(e){let t,n,r,s;const o=Iv(e.accessToken);s=bo(()=>yo(()=>o,(_,C)=>Tv(R=>{const D=yg(R);return p1(e.backendUrl,e.accessToken,D[0],D[1])},R=>{const D=R[1],Y=rd(R[0]);return $1(e.backendUrl,e.accessToken,Y[0],Y[1],new Cc(D.Name,rt(de=>de.BusinessName,D.LegalEntity),rt(de=>de.BusinessNumber,D.LegalEntity)))},_,C),(_,C)=>{}),void 0,void 0);const i=s[0],a=s[1];Qi(Hu(()=>m1(e.backendUrl,e.accessToken),_=>{a(new zn(3,[_]))}));const l=_=>{let C;const R=i.Partners;switch(R.tag){case 0:return new me(0,[]);case 1:return new me(1,[]);case 3:return new me(3,[R.fields[0]]);default:return R.fields[0].tag===1?new me(2,[new g(1,[en(Al("Unknown partner: %A%P()",[_]))])]):new me(2,[(C=ia(R.fields[0].fields[0],_),C==null?new g(1,[en(Al("Unknown partner: %A%P()",[_]))]):new g(0,[C.Name]))])}},c=_=>p(xs,{page:i.CurrentPage,partner:{Id:_,Name:l(_)}}),d=(_,C)=>{const R=p(yh,{mode:C});return[c(_),R]},u=(_,C)=>{let R,D,Y;const de=_[0],ve=_[1];let fe;const X=[de,ve];fe=wg(X[0],X[1]);let ue;const G=fe;ue=Ol(sd(i.Accounts,G),()=>(a(new zn(1,[G])),new me(0,[])));let te;return te=p(uv,{updateAccount:N=>{a(new zn(4,[fe,N]))},props:{accountDetails:[de,ve]},mode:C,account:ue}),[(R=[de,ve,ue],D=R[0],p(xs,(Y={Id:D,Name:l(D)},{account:{Id:R[1],Name:xg(N=>Hl(N.Name),R[2])},page:i.CurrentPage,partner:li(Y)}))),te]};let h;const f=i.Partners;let m,w,$,v;switch(f.tag){case 2:{f.fields[0].tag===1?(m=2,$=f.fields[0].fields[0]):(m=1,w=f.fields[0].fields[0]);break}case 3:{m=3,v=f.fields[0];break}default:m=0}switch(m){case 0:{h=[p(Vo,null),p(Vo,null)];break}case 1:{const _=i.CurrentPage;switch(_.tag){case 3:{const C=_.fields[0],R=c(C),D=ia(w,C);if(D==null)h=[R,p(Bn,{error:"Unknown Partner"})];else{const Y=D;h=d(C,new $r(1,[{accountProvisioningMode:Y.AccountProvisioningMode,partnerId:C}]))}break}case 4:{const C=_.fields[0];h=d(C,new $r(2,[new H_(C,e.backendUrl,e.accessToken)]));break}case 5:{const C=_.fields[0];h=d(C,new $r(3,[new W_(C,e.backendUrl,e.accessToken)]));break}case 6:{const C=_.fields[0];h=d(C,new $r(4,[new G_(C,e.backendUrl,e.accessToken)]));break}case 2:{const C=_.fields[0];h=d(C,new $r(5,[new q_(C,e.backendUrl,e.accessToken)]));break}case 7:{const C=_.fields[0];h=d(C,new $r(6,[new K_(C,e.backendUrl,e.accessToken)]));break}case 8:{h=u([_.fields[0],_.fields[1]],new Un(0,[]));break}case 9:{h=u([_.fields[0],_.fields[1]],new Un(1,[]));break}case 10:{h=u([_.fields[0],_.fields[1]],new Un(2,[]));break}case 11:{h=u([_.fields[0],_.fields[1]],new Un(3,[]));break}case 12:{h=u([_.fields[0],_.fields[1]],new Un(4,[]));break}case 13:{h=u([_.fields[0],_.fields[1]],new Un(5,[]));break}case 14:{h=u([_.fields[0],_.fields[1]],new Un(6,[]));break}case 15:{h=u([_.fields[0],_.fields[1]],new Un(7,[]));break}case 0:case 16:{h=[p(xs,{page:i.CurrentPage}),p(yv,{partnerList:w})];break}default:{const C=_.fields[0],R=c(C),D=ia(w,C);h=D==null?[R,p(Bn,{error:"Unknown Partner"})]:[R,(t=new $r(0,[D]),p(yh,{mode:t}))]}}break}case 2:{h=[p(xs,{page:i.CurrentPage}),p(Bn,{error:$})];break}default:h=[p(xs,{page:i.CurrentPage}),(n=pt(v),p(Bn,{error:n}))]}return S0(On,new q1(i.Roles,e.backendUrl,e.accessToken),ne((r=k([p("style",{children:[_v]}),ug({onUrlChanged:_=>{a(new zn(0,[od(_)]))},application:p(Ie,{},h[0],h[1])})]),p("div",{children:E.Children.toArray(Array.from(r))}))))}Ev(e=>p(Nv,e),"superhero-account-registry")})();
53
+ If the account is found you will be redirected to the account details page.`,["children",e])])))];return["children",v.Children.toArray(Array.from(t))]})()])));function Qv(e){let t,n,r,s;return f("div",S(y([["className","absolute right-0 top-0 hidden pr-4 pt-4 sm:block"],(t=[f("button",S(y([(n="rounded-md bg-white text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",["className",n]),["type","button"],["onClick",e],(r=[f("span",{className:"sr-only",children:"Close"}),f("svg",S(y([["className","h-6 w-6"],["fill","none"],["stroke","currentColor"],["strokeWidth",1.5],["viewBox","0 0 24 24"],(s=te(f("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})),["children",v.Children.toArray(Array.from(s))])])))],["children",v.Children.toArray(Array.from(r))])])))],["children",v.Children.toArray(Array.from(t))])])))}function ex(e,t,n,r){let s,i,o;return f("div",S(y([["className","mt-5 sm:flex sm:items-center"],(s=[f("div",S(y([["className","w-full sm:max-w-xs"],(i=[f("label",{className:"sr-only",for:"account-id",children:"Account Id"}),f("input",S(me(I(()=>D(E(["id","account-id"]),I(()=>D(E(["autoComplete","off"]),I(()=>{let a;return D(E((a="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm/6",["className",a])),I(()=>D(E(["placeholder","Account Id"]),I(()=>D(E(["disabled",!n]),I(()=>D(E(["onChange",l=>{e(l.target.value)}]),I(()=>{const l=r;return l==null?Ke():E(["value",fi(l)])}))))))))}))))))))],["children",v.Children.toArray(Array.from(i))])]))),f("button",S(y([["className",re(" ",["mt-3 inline-flex w-full items-center justify-center rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm","hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600","sm:ml-3 sm:mt-0 sm:w-auto","disabled:opacity-50"])],(o=me(I(()=>E(n?f("span",{children:["Search"]}):f("span",{children:["Searching..."]})))),["children",v.Children.toArray(Array.from(o))]),["onClick",t],["disabled",!n]])))],["children",v.Children.toArray(Array.from(s))])])))}function tx(e){let t,n,r,s,i,o,a;const l=e.closeModal,c=ir(Hn),d=Kr(()=>qr(Zv,(g,C)=>Jv(c.BackendUrl,c.AccessToken,g,C),(g,C)=>{}),void 0,void 0),u=d[0],m=d[1],h=ex(g=>{m(new ro(0,[g]))},g=>{m(new ro(1,[]))},!Pe(u.AccountDetails,new ts(1,[])),u.AccountId);let p;const w=u.AccountDetails;return p=w.tag===3?f("div",{className:re(" ",["mt-2 text-sm text-red-600"]),children:w.fields[0]}):$e(),f(Yr,{onClose:l,child:f("div",S(y([["className","relative z-10"],["role",re(" ",["dialog"])],(t=[f("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),f("div",S(y([["className","fixed inset-0 z-10 w-screen overflow-y-auto"],(n=[f("div",S(y([["className","flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0"],["onClick",g=>{l()}],(r=[f("div",S(y([(s="relative transform overflow-hidden rounded-lg bg-white px-4 pb-4 pt-5 text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg sm:p-6",["className",s]),["onClick",g=>{g.preventDefault(),g.stopPropagation()}],(i=[Qv(g=>{l()}),f("div",S(y([["className","sm:flex sm:items-start"],(o=[f("div",S(y([(a="mx-auto flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-full bg-indigo-100 sm:mx-0 sm:h-10 sm:w-10",["className",a]),["children",v.Children.toArray([Af])]]))),f("div",{className:"mt-3 text-center sm:ml-4 sm:mt-0 sm:text-left",children:v.Children.toArray([Yv,Xv,h,p])})],["children",v.Children.toArray(Array.from(o))])])))],["children",v.Children.toArray(Array.from(i))])])))],["children",v.Children.toArray(Array.from(r))])])))],["children",v.Children.toArray(Array.from(n))])])))],["children",v.Children.toArray(Array.from(t))])])))})}function nx(e,t){return rc(n=>{const r=e.toLocaleLowerCase();return Pr(n.StreamId).toLocaleLowerCase().indexOf(r)>=0?!0:pi(n.Name).toLocaleLowerCase().indexOf(r)>=0},t)}function rx(e){const t=ir(Hn),n=cp(c=>pi(c.Name).toLocaleLowerCase(),e.partnerList,{Compare:as}),r=zn(n),s=zn(""),i=zn(!1),o=i[1],a=me(I(()=>D(E(wr("ID")),I(()=>D(E(wr("Name")),I(()=>D(t.Roles.ReadProtectedData?D(E(wr("Contact")),I(()=>E(wr("Phone")))):Ke(),I(()=>E(wr("Website")))))))))),l=me(I(()=>D(i[0]?E(f(tx,{closeModal:()=>{o(!1)}})):E($e()),I(()=>{let c;return D(E(f("div",S(y([["className","flex items-end place-content-between"],(c=[xf(s[0],"Partner ID or Name",d=>{s[1](d),r[1](nx(d,n))},()=>{}),f("button",{className:re(" ",["max-h-10 inline-flex items-center gap-x-2 rounded-md bg-indigo-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm","hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"]),type:"button",onClick:d=>{o(!0)},children:v.Children.toArray(["Account Search ",Af])})],["children",v.Children.toArray(Array.from(c))])])))),I(()=>E(jb(a,er(d=>{const u=Pr(d.StreamId),m=Ue(u);return me(I(()=>{let h;return D(E((h=[ar(As(new q(1,[m]))),u],Ub(h[0],h[1]))),I(()=>D(E(Wi(["text-gray-500"],pi(d.Name))),I(()=>D(t.Roles.ReadProtectedData?D(E(Wi(["text-gray-500"],We(Ge(p=>`${Sc(p.FirstName)} ${kc(p.LastName)}`,d.ContactDetails),""))),I(()=>E(Wi(["text-gray-500"],We(Ge(p=>Nc(p.MobilePhone),d.ContactDetails),""))))):Ke(),I(()=>E(Wi(["text-gray-500"],xc(d.Website)))))))))}))},r[0])))))}))));return f("div",{children:v.Children.toArray(Array.from(l))})}const sx=`*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}[type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,input:where(:not([type])):focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}@media (forced-colors: active){[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.\\!visible{visibility:visible!important}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.bottom-14{bottom:3.5rem}.bottom-8{bottom:2rem}.left-\\[1px\\]{left:1px}.left-\\[8px\\]{left:8px}.right-0{right:0}.top-0{top:0}.top-\\[1px\\]{top:1px}.top-\\[8px\\]{top:8px}.z-10{z-index:10}.order-none{order:0}.col-start-1{grid-column-start:1}.row-start-1{grid-row-start:1}.-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.-my-2{margin-top:-.5rem;margin-bottom:-.5rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.mx-auto{margin-left:auto;margin-right:auto}.-ml-3{margin-left:-.75rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.mr-2{margin-right:.5rem}.mr-6{margin-right:1.5rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.inline-table{display:inline-table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row-group{display:table-row-group}.table-row{display:table-row}.flow-root{display:flow-root}.grid{display:grid}.inline-grid{display:inline-grid}.contents{display:contents}.list-item{display:list-item}.hidden{display:none}.size-4{width:1rem;height:1rem}.size-5{width:1.25rem;height:1.25rem}.size-6{width:1.5rem;height:1.5rem}.h-0{height:0px}.h-1\\.5{height:.375rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-2{height:.5rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-full{height:100%}.max-h-10{max-height:2.5rem}.max-h-60{max-height:15rem}.min-h-\\[34px\\]{min-height:34px}.min-h-full{min-height:100%}.w-1\\.5{width:.375rem}.w-10{width:2.5rem}.w-12{width:3rem}.w-2{width:.5rem}.w-40{width:10rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-\\[432px\\]{width:432px}.w-\\[45px\\]{width:45px}.w-\\[480px\\]{width:480px}.w-\\[512px\\]{width:512px}.w-\\[560px\\]{width:560px}.w-\\[69px\\]{width:69px}.w-full{width:100%}.w-screen{width:100vw}.min-w-\\[280px\\]{min-width:280px}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-\\[480px\\]{max-width:480px}.max-w-md{max-width:28rem}.max-w-screen-xl{max-width:1280px}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.grow-0{flex-grow:0}.border-collapse{border-collapse:collapse}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.list-outside{list-style-position:outside}.list-disc{list-style-type:disc}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-content-between{place-content:space-between}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity))}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.self-center{align-self:center}.self-stretch{align-self:stretch}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-0{border-width:0px}.border-b{border-bottom-width:1px}.border-r{border-right-width:1px}.border-r-2{border-right-width:2px}.border-t{border-top-width:1px}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-indigo-500{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.bg-\\[\\#2563EB\\]{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity))}.bg-green-400{--tw-bg-opacity: 1;background-color:rgb(74 222 128 / var(--tw-bg-opacity))}.bg-indigo-100{--tw-bg-opacity: 1;background-color:rgb(224 231 255 / var(--tw-bg-opacity))}.bg-indigo-600{--tw-bg-opacity: 1;background-color:rgb(79 70 229 / var(--tw-bg-opacity))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-opacity-75{--tw-bg-opacity: .75}.bg-gradient-to-bl{background-image:linear-gradient(to bottom left,var(--tw-gradient-stops))}.from-red-200{--tw-gradient-from: #fecaca var(--tw-gradient-from-position);--tw-gradient-to: rgb(254 202 202 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-red-200\\/0{--tw-gradient-to: rgb(254 202 202 / 0) var(--tw-gradient-to-position)}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-\\[13px\\]{padding-left:13px;padding-right:13px}.px-\\[17px\\]{padding-left:17px;padding-right:17px}.py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-\\[8\\.5px\\]{padding-top:8.5px;padding-bottom:8.5px}.py-\\[9px\\]{padding-top:9px;padding-bottom:9px}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-6{padding-left:1.5rem}.pl-9{padding-left:2.25rem}.pr-2{padding-right:.5rem}.pr-2\\.5{padding-right:.625rem}.pr-4{padding-right:1rem}.pr-9{padding-right:2.25rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.not-italic{font-style:normal}.leading-4{line-height:1rem}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.leading-7{line-height:1.75rem}.leading-none{line-height:1}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wider{letter-spacing:.05em}.text-\\[\\#1D4ED8\\]{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity))}.text-\\[\\#686F7D\\]{--tw-text-opacity: 1;color:rgb(104 111 125 / var(--tw-text-opacity))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.overline{text-decoration-line:overline}.line-through{text-decoration-line:line-through}.opacity-0{opacity:0}.opacity-90{opacity:.9}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.outline-1{outline-width:1px}.outline-offset-\\[-0\\.50px\\]{outline-offset:-.5px}.outline-offset-\\[-1px\\]{outline-offset:-1px}.outline-gray-100{outline-color:#f3f4f6}.outline-gray-300{outline-color:#d1d5db}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.ring-black\\/5{--tw-ring-color: rgb(0 0 0 / .05)}.ring-gray-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-500{transition-duration:.5s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.placeholder\\:text-gray-400::-moz-placeholder{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.placeholder\\:text-gray-400::placeholder{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.hover\\:border-gray-300:hover{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.hover\\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.hover\\:bg-gray-300:hover{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.hover\\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\\:bg-indigo-500:hover{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity))}.hover\\:bg-indigo-700:hover{--tw-bg-opacity: 1;background-color:rgb(67 56 202 / var(--tw-bg-opacity))}.hover\\:text-gray-500:hover{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.hover\\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.hover\\:text-indigo-900:hover{--tw-text-opacity: 1;color:rgb(49 46 129 / var(--tw-text-opacity))}.hover\\:underline:hover{text-decoration-line:underline}.focus\\:border-indigo-500:focus{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity))}.focus\\:border-indigo-600:focus{--tw-border-opacity: 1;border-color:rgb(79 70 229 / var(--tw-border-opacity))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-inset:focus{--tw-ring-inset: inset}.focus\\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.focus\\:ring-indigo-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(79 70 229 / var(--tw-ring-opacity))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\\:outline:focus-visible{outline-style:solid}.focus-visible\\:outline-2:focus-visible{outline-width:2px}.focus-visible\\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\\:outline-indigo-600:focus-visible{outline-color:#4f46e5}.disabled\\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\\:visible{visibility:visible}.group:hover .group-hover\\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.group:focus .group-focus\\:visible{visibility:visible}@media (min-width: 640px){.sm\\:col-span-2{grid-column:span 2 / span 2}.sm\\:-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.sm\\:mx-0{margin-left:0;margin-right:0}.sm\\:my-8{margin-top:2rem;margin-bottom:2rem}.sm\\:-mr-6{margin-right:-1.5rem}.sm\\:ml-3{margin-left:.75rem}.sm\\:ml-4{margin-left:1rem}.sm\\:mt-0{margin-top:0}.sm\\:block{display:block}.sm\\:flex{display:flex}.sm\\:grid{display:grid}.sm\\:h-10{height:2.5rem}.sm\\:w-10{width:2.5rem}.sm\\:w-auto{width:auto}.sm\\:w-full{width:100%}.sm\\:max-w-lg{max-width:32rem}.sm\\:max-w-xs{max-width:20rem}.sm\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\\:items-start{align-items:flex-start}.sm\\:items-center{align-items:center}.sm\\:justify-end{justify-content:flex-end}.sm\\:gap-4{gap:1rem}.sm\\:rounded-lg{border-radius:.5rem}.sm\\:p-0{padding:0}.sm\\:p-6{padding:1.5rem}.sm\\:px-0{padding-left:0;padding-right:0}.sm\\:px-4{padding-left:1rem;padding-right:1rem}.sm\\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\\:pl-6{padding-left:1.5rem}.sm\\:text-left{text-align:left}.sm\\:text-sm{font-size:.875rem;line-height:1.25rem}.sm\\:text-sm\\/6{font-size:.875rem;line-height:1.5rem}}@media (min-width: 1024px){.lg\\:-mx-8{margin-left:-2rem;margin-right:-2rem}.lg\\:mr-0{margin-right:0}.lg\\:px-8{padding-left:2rem;padding-right:2rem}}`,ix=ft(sx);function hl(){return(hl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var ox=["context","children"];function ax(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(r,s){if(r==null)return{};var i,o,a={},l=Object.keys(r);for(o=0;o<l.length;o++)s.indexOf(i=l[o])>=0||(a[i]=r[i]);return a}(e,ox);return Ko(t,n)}function lx(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=f(ax,hl({},this._props,{context:e.detail.context}),function t(n,r){if(n.nodeType===3)return n.data;if(n.nodeType!==1)return null;var s=[],i={},o=0,a=n.attributes,l=n.childNodes;for(o=a.length;o--;)a[o].name!=="slot"&&(i[a[o].name]=a[o].value,i[Ph(a[o].name)]=a[o].value);for(o=l.length;o--;){var c=t(l[o],null),d=l[o].slot;d?i[d]=f(Oh,{name:d},c):s[o]=c}var u=r?f(Oh,null,s):s;return f(r||n.nodeName.toLowerCase(),i,u)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?qo:Ln)(this._vdom,this._root)}function Ph(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function cx(e,t,n){if(this._vdom){var r={};r[e]=n=n??void 0,r[Ph(e)]=n,this._vdom=Ko(this._vdom,r),Ln(this._vdom,this._root)}}function ux(){Ln(this._vdom=null,this._root)}function Oh(e,t){var n=this;return f("slot",hl({},e,{ref:function(r){r?(n.ref=r,n._listener||(n._listener=function(s){s.stopPropagation(),s.detail.context=t},r.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}function dx(e,t,n,r){function s(){var i=Reflect.construct(HTMLElement,[],s);return i._vdomComponent=e,i._root=r&&r.shadow?i.attachShadow({mode:r.mode||"open"}):i,i}return(s.prototype=Object.create(HTMLElement.prototype)).constructor=s,s.prototype.connectedCallback=lx,s.prototype.attributeChangedCallback=cx,s.prototype.disconnectedCallback=ux,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),s.observedAttributes=n,n.forEach(function(i){Object.defineProperty(s.prototype,i,{get:function(){return this._vdom.props[i]},set:function(o){this._vdom?this.attributeChangedCallback(i,null,o):(this._props||(this._props={}),this._props[i]=o,this.connectedCallback());var a=typeof o;o!=null&&a!=="string"&&a!=="boolean"&&a!=="number"||this.setAttribute(i,o)}})}),customElements.define(t,s)}function fx(e,t){dx(e,t,void 0,{shadow:!0})}class rs extends ee{constructor(t,n,r,s){super(),this.Partners=t,this.Accounts=n,this.CurrentPage=r,this.Roles=s}}class Zn extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["PageChanged","GetAccountName","AppendAccount","LoadPartners","UpdateAccount"]}}function hx(e){let t;const n=yd(cd(window.location.hash,1)),r=n.tag===17?xa(new q(0,[])):fe();return[new rs(new we(0,[]),P$(),n,(t=L1(e),t.tag===1?(Wl(`Failed to decode jwt: ${t.fields[0]}`),L$):V$(t.fields[0]))),r]}function mx(e,t,n,r){let s,i,o,a;switch(n.tag){case 1:{const l=n.fields[0],c=Wr(e,l,d=>new Zn(2,[l,new $(0,[d])]),d=>new Zn(2,[l,new $(1,["Failed to retrieve account name"])]));return[new rs(r.Partners,ba(r.Accounts,l,new we(1,[])),r.CurrentPage,r.Roles),c]}case 2:return[new rs(r.Partners,ba(r.Accounts,n.fields[0],new we(2,[n.fields[1]])),r.CurrentPage,r.Roles),fe()];case 0:{const l=n.fields[0];return l.tag===17?[r,xa(l)]:[new rs(r.Partners,r.Accounts,l,r.Roles),fe()]}case 4:{const l=n.fields[1],c=n.fields[0],d=wd(r.Accounts,c);let u,m;switch(d!=null&&d.tag===2&&d.fields[0].tag===0?(u=0,m=d.fields[0].fields[0]):u=1,u){case 0:{const h=new Fc(m.StreamId,m.PartnerId,l.Name,m.Website,m.ContactDetails,m.Notes,(s=l.LegalEntity,i=m.LegalEntity,s!=null&&i!=null?(o=i,a=s,new Pc(a.BusinessName,a.BusinessNumber,o.Address1,o.Address2,o.City,o.Postcode,o.State,o.Phone,o.CountryCode)):m.LegalEntity),m.ExternalId,m.ChannelId,m.ProvisioningMode);if(Pe(h,m))return[r,fe()];{const p=Wr(t,[c,l],()=>new Zn(2,[c,new $(0,[h])]),w=>new Zn(2,[c,new $(1,[w])]));return[new rs(r.Partners,ba(r.Accounts,c,new we(1,[])),r.CurrentPage,r.Roles),p]}}default:return[r,fe()]}}default:return[new rs(n.fields[0],r.Accounts,r.CurrentPage,r.Roles),fe()]}}function px(e){let t,n,r,s;const i=hx(e.accessToken);s=Kr(()=>qr(()=>i,(x,A)=>mx(P=>{const V=M$(P);return Iw(e.backendUrl,e.accessToken,V[0],V[1])},P=>{const V=P[1],Y=$d(P[0]);return Nw(e.backendUrl,e.accessToken,Y[0],Y[1],new Uc(V.Name,Ge(ce=>ce.BusinessName,V.LegalEntity),Ge(ce=>ce.BusinessNumber,V.LegalEntity)))},x,A),(x,A)=>{}),void 0,void 0);const o=s[0],a=s[1];fa(od(()=>Ew(e.backendUrl,e.accessToken),x=>{a(new Zn(3,[x]))}));const l=x=>{let A;const P=o.Partners;switch(P.tag){case 0:return new we(0,[]);case 1:return new we(1,[]);case 3:return new we(3,[P.fields[0]]);default:return P.fields[0].tag===1?new we(2,[new $(1,[Wt(Hl("Unknown partner: %A%P()",[x]))])]):new we(2,[(A=va(P.fields[0].fields[0],x),A==null?new $(1,[Wt(Hl("Unknown partner: %A%P()",[x]))]):new $(0,[A.Name]))])}},c=x=>f(Rs,{page:o.CurrentPage,partner:{Id:x,Name:l(x)}}),d=(x,A)=>{const P=f(Th,{mode:A});return[c(x),P]},u=(x,A)=>{let P,V,Y;const ce=x[0],Ce=x[1];let le;const X=[ce,Ce];le=R$(X[0],X[1]);let he;const G=le;he=Xl(wd(o.Accounts,G),()=>(a(new Zn(1,[G])),new we(0,[])));let ne;return ne=f(Kv,{updateAccount:M=>{a(new Zn(4,[le,M]))},props:{accountDetails:[ce,Ce]},mode:A,account:he}),[(P=[ce,Ce,he],V=P[0],f(Rs,(Y={Id:V,Name:l(V)},{account:{Id:P[1],Name:F$(M=>ac(M.Name),P[2])},page:o.CurrentPage,partner:bo(Y)}))),ne]};let m;const h=o.Partners;let p,w,g,C;switch(h.tag){case 2:{h.fields[0].tag===1?(p=2,g=h.fields[0].fields[0]):(p=1,w=h.fields[0].fields[0]);break}case 3:{p=3,C=h.fields[0];break}default:p=0}switch(p){case 0:{m=[f(zs,null),f(zs,null)];break}case 1:{const x=o.CurrentPage;switch(x.tag){case 3:{const A=x.fields[0],P=c(A),V=va(w,A);if(V==null)m=[P,f(rn,{error:"Unknown Partner"})];else{const Y=V;m=d(A,new yr(1,[{accountProvisioningMode:Y.AccountProvisioningMode,partnerId:A}]))}break}case 4:{const A=x.fields[0];m=d(A,new yr(2,[new ov(A,e.backendUrl,e.accessToken)]));break}case 5:{const A=x.fields[0];m=d(A,new yr(3,[new av(A,e.backendUrl,e.accessToken)]));break}case 6:{const A=x.fields[0];m=d(A,new yr(4,[new lv(A,e.backendUrl,e.accessToken)]));break}case 2:{const A=x.fields[0];m=d(A,new yr(5,[new cv(A,e.backendUrl,e.accessToken)]));break}case 7:{const A=x.fields[0];m=d(A,new yr(6,[new uv(A,e.backendUrl,e.accessToken)]));break}case 16:{m=u([x.fields[0],x.fields[1]],new Pn(8,[]));break}case 8:{m=u([x.fields[0],x.fields[1]],new Pn(0,[]));break}case 9:{m=u([x.fields[0],x.fields[1]],new Pn(1,[]));break}case 10:{m=u([x.fields[0],x.fields[1]],new Pn(2,[]));break}case 11:{m=u([x.fields[0],x.fields[1]],new Pn(3,[]));break}case 12:{m=u([x.fields[0],x.fields[1]],new Pn(4,[]));break}case 13:{m=u([x.fields[0],x.fields[1]],new Pn(5,[]));break}case 14:{m=u([x.fields[0],x.fields[1]],new Pn(6,[]));break}case 15:{m=u([x.fields[0],x.fields[1]],new Pn(7,[]));break}case 0:case 17:{m=[f(Rs,{page:o.CurrentPage}),f(rx,{partnerList:w})];break}default:{const A=x.fields[0],P=c(A),V=va(w,A);m=V==null?[P,f(rn,{error:"Unknown Partner"})]:[P,(t=new yr(0,[V]),f(Th,{mode:t}))]}}break}case 2:{m=[f(Rs,{page:o.CurrentPage}),f(rn,{error:g})];break}default:m=[f(Rs,{page:o.CurrentPage}),(n=ft(C),f(rn,{error:n}))]}return Lg(Hn,new ly(o.Roles,e.backendUrl,e.accessToken),te((r=y([f("style",{children:[ix]}),C$({onUrlChanged:x=>{a(new Zn(0,[yd(x)]))},application:f(ve,{},m[0],m[1])})]),f("div",{children:v.Children.toArray(Array.from(r))}))))}fx(e=>f(px,e),"superhero-account-registry")})();